@hivcd-printshop/design-system 1.2.2 → 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 +352 -257
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +341 -247
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -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 = ({
|
|
@@ -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,26 +1033,26 @@ 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,
|
|
955
1051
|
onClick: onClose,
|
|
956
|
-
className: cn("fixed inset-0 z-1000 bg-
|
|
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
|
);
|
|
@@ -1348,29 +1427,30 @@ var RadioToggleItem = ({
|
|
|
1348
1427
|
}) => {
|
|
1349
1428
|
const rowBg = !open ? "bg-white hover:bg-gray00" : color ? void 0 : printColor ? printColorBgClass[printColor] : "bg-gray00";
|
|
1350
1429
|
const style = open && color ? { backgroundColor: color } : void 0;
|
|
1351
|
-
return /* @__PURE__ */
|
|
1352
|
-
/* @__PURE__ */
|
|
1430
|
+
return /* @__PURE__ */ jsxs19("div", { className: "w-full", children: [
|
|
1431
|
+
/* @__PURE__ */ jsxs19(
|
|
1353
1432
|
"button",
|
|
1354
1433
|
{
|
|
1355
1434
|
type: "button",
|
|
1356
1435
|
onClick: onSelect,
|
|
1357
1436
|
style,
|
|
1358
1437
|
className: cn(
|
|
1359
|
-
"w-full flex items-center gap-1.5 p-3",
|
|
1360
|
-
"text-body1-regular text-
|
|
1438
|
+
"group w-full flex items-center gap-1.5 p-3",
|
|
1439
|
+
"text-body1-regular text-left cursor-pointer",
|
|
1440
|
+
open ? "text-strong" : "text-secondary",
|
|
1361
1441
|
rowBg,
|
|
1362
1442
|
className
|
|
1363
1443
|
),
|
|
1364
1444
|
children: [
|
|
1365
|
-
/* @__PURE__ */
|
|
1366
|
-
/* @__PURE__ */
|
|
1445
|
+
/* @__PURE__ */ jsx34(Radio, { selected: open }),
|
|
1446
|
+
/* @__PURE__ */ jsx34("span", { children: title })
|
|
1367
1447
|
]
|
|
1368
1448
|
}
|
|
1369
1449
|
),
|
|
1370
|
-
open && /* @__PURE__ */
|
|
1371
|
-
/* @__PURE__ */
|
|
1372
|
-
badges && badges.length > 0 && /* @__PURE__ */
|
|
1373
|
-
labelTextButton && /* @__PURE__ */
|
|
1450
|
+
open && /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-2 px-3 py-3 bg-white", children: [
|
|
1451
|
+
/* @__PURE__ */ jsx34("p", { className: "text-caption-regular text-secondary", children: content }),
|
|
1452
|
+
badges && badges.length > 0 && /* @__PURE__ */ jsx34("div", { className: "flex flex-wrap gap-1", children: badges.map((badge) => /* @__PURE__ */ jsx34(Badge, { label: badge }, badge)) }),
|
|
1453
|
+
labelTextButton && /* @__PURE__ */ jsx34(
|
|
1374
1454
|
TextButton2,
|
|
1375
1455
|
{
|
|
1376
1456
|
label: labelTextButton,
|
|
@@ -1384,10 +1464,24 @@ var RadioToggleItem = ({
|
|
|
1384
1464
|
};
|
|
1385
1465
|
var Radio = ({ selected = false, className }) => {
|
|
1386
1466
|
const Icon = selected ? IconRadioSelected : IconRadioUnselected;
|
|
1387
|
-
return
|
|
1467
|
+
return (
|
|
1468
|
+
// 디자인 스펙(Figma "radio" 5:781): 아이콘 자체 색은 고정, hover/pressed 시
|
|
1469
|
+
// 24px 원형 배경 칩만 나타난다(gray00/gray01). 부모 버튼의 group-hover/active로 동기화.
|
|
1470
|
+
/* @__PURE__ */ jsx34(
|
|
1471
|
+
"span",
|
|
1472
|
+
{
|
|
1473
|
+
className: cn(
|
|
1474
|
+
"inline-flex size-6 shrink-0 items-center justify-center rounded-full transition-colors",
|
|
1475
|
+
"group-hover:bg-gray00 group-active:bg-gray01",
|
|
1476
|
+
className
|
|
1477
|
+
),
|
|
1478
|
+
children: /* @__PURE__ */ jsx34(Icon, { className: "size-6" })
|
|
1479
|
+
}
|
|
1480
|
+
)
|
|
1481
|
+
);
|
|
1388
1482
|
};
|
|
1389
1483
|
var TextButton2 = ({ label, onClick, showIcon = false, className }) => {
|
|
1390
|
-
return /* @__PURE__ */
|
|
1484
|
+
return /* @__PURE__ */ jsxs19(
|
|
1391
1485
|
"button",
|
|
1392
1486
|
{
|
|
1393
1487
|
type: "button",
|
|
@@ -1400,14 +1494,14 @@ var TextButton2 = ({ label, onClick, showIcon = false, className }) => {
|
|
|
1400
1494
|
className
|
|
1401
1495
|
),
|
|
1402
1496
|
children: [
|
|
1403
|
-
showIcon && /* @__PURE__ */
|
|
1497
|
+
showIcon && /* @__PURE__ */ jsx34(IconExclamation, {}),
|
|
1404
1498
|
label
|
|
1405
1499
|
]
|
|
1406
1500
|
}
|
|
1407
1501
|
);
|
|
1408
1502
|
};
|
|
1409
1503
|
var Badge = ({ label, className }) => {
|
|
1410
|
-
return /* @__PURE__ */
|
|
1504
|
+
return /* @__PURE__ */ jsx34(
|
|
1411
1505
|
"div",
|
|
1412
1506
|
{
|
|
1413
1507
|
className: cn(
|
|
@@ -1421,7 +1515,7 @@ var Badge = ({ label, className }) => {
|
|
|
1421
1515
|
};
|
|
1422
1516
|
|
|
1423
1517
|
// src/components/Tag/Tag.tsx
|
|
1424
|
-
import { jsx as
|
|
1518
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1425
1519
|
var Tag = ({
|
|
1426
1520
|
className,
|
|
1427
1521
|
children,
|
|
@@ -1431,7 +1525,7 @@ var Tag = ({
|
|
|
1431
1525
|
onClick,
|
|
1432
1526
|
...props
|
|
1433
1527
|
}) => {
|
|
1434
|
-
return /* @__PURE__ */
|
|
1528
|
+
return /* @__PURE__ */ jsx35(
|
|
1435
1529
|
"button",
|
|
1436
1530
|
{
|
|
1437
1531
|
className: cn(
|
|
@@ -1450,16 +1544,16 @@ var Tag = ({
|
|
|
1450
1544
|
disabled,
|
|
1451
1545
|
style: bgColor ? { backgroundColor: bgColor, border: "none" } : void 0,
|
|
1452
1546
|
...props,
|
|
1453
|
-
children: /* @__PURE__ */
|
|
1547
|
+
children: /* @__PURE__ */ jsx35("span", { children })
|
|
1454
1548
|
}
|
|
1455
1549
|
);
|
|
1456
1550
|
};
|
|
1457
1551
|
|
|
1458
1552
|
// src/components/Timetable/Timetable.tsx
|
|
1459
|
-
import { forwardRef as
|
|
1553
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
1460
1554
|
|
|
1461
1555
|
// src/components/Timetable/WeekNavigation.tsx
|
|
1462
|
-
import { forwardRef as
|
|
1556
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
1463
1557
|
|
|
1464
1558
|
// src/components/Timetable/dateUtils.ts
|
|
1465
1559
|
var KOREAN_WEEKDAYS = ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"];
|
|
@@ -1492,18 +1586,18 @@ var formatWeekRange = (weekStart) => {
|
|
|
1492
1586
|
};
|
|
1493
1587
|
|
|
1494
1588
|
// src/components/Timetable/WeekNavigation.tsx
|
|
1495
|
-
import { jsx as
|
|
1589
|
+
import { jsx as jsx36, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1496
1590
|
var weekLabel = {
|
|
1497
1591
|
thisWeek: "\uC774\uBC88 \uC8FC",
|
|
1498
1592
|
nextWeek: "\uB2E4\uC74C \uC8FC",
|
|
1499
1593
|
twoWeeksLater: "\uB2E4\uB2E4\uC74C \uC8FC"
|
|
1500
1594
|
};
|
|
1501
|
-
var WeekNavigation =
|
|
1595
|
+
var WeekNavigation = forwardRef3(
|
|
1502
1596
|
function WeekNavigation2({ date, week, label, canPrev, canNext, onPrevWeek, onNextWeek, className }, ref) {
|
|
1503
1597
|
const showPrev = canPrev ?? (week ? week !== "thisWeek" : true);
|
|
1504
1598
|
const showNext = canNext ?? (week ? week !== "twoWeeksLater" : true);
|
|
1505
1599
|
const text = label ?? (week ? `${weekLabel[week]} (${formatWeekRange(date)})` : formatWeekRange(date));
|
|
1506
|
-
return /* @__PURE__ */
|
|
1600
|
+
return /* @__PURE__ */ jsxs20(
|
|
1507
1601
|
"div",
|
|
1508
1602
|
{
|
|
1509
1603
|
ref,
|
|
@@ -1515,26 +1609,26 @@ var WeekNavigation = forwardRef2(
|
|
|
1515
1609
|
className
|
|
1516
1610
|
),
|
|
1517
1611
|
children: [
|
|
1518
|
-
/* @__PURE__ */
|
|
1519
|
-
/* @__PURE__ */
|
|
1520
|
-
/* @__PURE__ */
|
|
1612
|
+
/* @__PURE__ */ jsx36(ArrowButton, { direction: "left", visible: showPrev, onClick: onPrevWeek }),
|
|
1613
|
+
/* @__PURE__ */ jsx36("span", { className: "flex flex-1 items-center justify-center text-center", children: text }),
|
|
1614
|
+
/* @__PURE__ */ jsx36(ArrowButton, { direction: "right", visible: showNext, onClick: onNextWeek })
|
|
1521
1615
|
]
|
|
1522
1616
|
}
|
|
1523
1617
|
);
|
|
1524
1618
|
}
|
|
1525
1619
|
);
|
|
1526
1620
|
var ArrowButton = ({ direction, visible, onClick }) => {
|
|
1527
|
-
const divider = /* @__PURE__ */
|
|
1621
|
+
const divider = /* @__PURE__ */ jsx36("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" });
|
|
1528
1622
|
if (!visible) {
|
|
1529
|
-
return /* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ jsxs20("div", { className: "flex items-stretch", children: [
|
|
1530
1624
|
direction === "right" && divider,
|
|
1531
|
-
/* @__PURE__ */
|
|
1625
|
+
/* @__PURE__ */ jsx36("span", { className: "w-[42px]" }),
|
|
1532
1626
|
direction === "left" && divider
|
|
1533
1627
|
] });
|
|
1534
1628
|
}
|
|
1535
|
-
return /* @__PURE__ */
|
|
1629
|
+
return /* @__PURE__ */ jsxs20("div", { className: "flex items-stretch", children: [
|
|
1536
1630
|
direction === "right" && divider,
|
|
1537
|
-
/* @__PURE__ */
|
|
1631
|
+
/* @__PURE__ */ jsx36(
|
|
1538
1632
|
"button",
|
|
1539
1633
|
{
|
|
1540
1634
|
type: "button",
|
|
@@ -1544,7 +1638,7 @@ var ArrowButton = ({ direction, visible, onClick }) => {
|
|
|
1544
1638
|
"text-gray06 cursor-pointer transition-colors",
|
|
1545
1639
|
"hover:bg-gray00 active:bg-gray01"
|
|
1546
1640
|
),
|
|
1547
|
-
children: /* @__PURE__ */
|
|
1641
|
+
children: /* @__PURE__ */ jsx36(
|
|
1548
1642
|
IconChevronDownXS,
|
|
1549
1643
|
{
|
|
1550
1644
|
className: direction === "left" ? "rotate-90" : "-rotate-90",
|
|
@@ -1558,7 +1652,7 @@ var ArrowButton = ({ direction, visible, onClick }) => {
|
|
|
1558
1652
|
};
|
|
1559
1653
|
|
|
1560
1654
|
// src/components/Timetable/Timetable.tsx
|
|
1561
|
-
import { jsx as
|
|
1655
|
+
import { jsx as jsx37, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1562
1656
|
var printColorHoverClass = {
|
|
1563
1657
|
Plotter: "hover:bg-print-plotter",
|
|
1564
1658
|
Printer: "hover:bg-print-printer",
|
|
@@ -1568,7 +1662,7 @@ var printColorHoverClass = {
|
|
|
1568
1662
|
"Seet Cutting": "hover:bg-print-seet-cutting",
|
|
1569
1663
|
"Laser Cutting": "hover:bg-print-laser-cutting"
|
|
1570
1664
|
};
|
|
1571
|
-
var Timetable =
|
|
1665
|
+
var Timetable = forwardRef4(function Timetable2({
|
|
1572
1666
|
weekStart,
|
|
1573
1667
|
week,
|
|
1574
1668
|
days,
|
|
@@ -1581,8 +1675,8 @@ var Timetable = forwardRef3(function Timetable2({
|
|
|
1581
1675
|
canNextWeek,
|
|
1582
1676
|
className
|
|
1583
1677
|
}, ref) {
|
|
1584
|
-
return /* @__PURE__ */
|
|
1585
|
-
!hideWeekNavigation && /* @__PURE__ */
|
|
1678
|
+
return /* @__PURE__ */ jsxs21("div", { ref, className: cn(fluid && "w-full", className), children: [
|
|
1679
|
+
!hideWeekNavigation && /* @__PURE__ */ jsx37(
|
|
1586
1680
|
WeekNavigation,
|
|
1587
1681
|
{
|
|
1588
1682
|
date: weekStart,
|
|
@@ -1593,7 +1687,7 @@ var Timetable = forwardRef3(function Timetable2({
|
|
|
1593
1687
|
onNextWeek
|
|
1594
1688
|
}
|
|
1595
1689
|
),
|
|
1596
|
-
/* @__PURE__ */
|
|
1690
|
+
/* @__PURE__ */ jsx37("div", { className: cn("flex", fluid && "w-full"), children: days.map((day) => /* @__PURE__ */ jsx37(
|
|
1597
1691
|
DailyTimetable,
|
|
1598
1692
|
{
|
|
1599
1693
|
date: day.date,
|
|
@@ -1606,9 +1700,9 @@ var Timetable = forwardRef3(function Timetable2({
|
|
|
1606
1700
|
] });
|
|
1607
1701
|
});
|
|
1608
1702
|
var DailyTimetable = ({ date, slots, fluid, onSelectTime, className }) => {
|
|
1609
|
-
return /* @__PURE__ */
|
|
1610
|
-
/* @__PURE__ */
|
|
1611
|
-
slots.map((slot) => /* @__PURE__ */
|
|
1703
|
+
return /* @__PURE__ */ jsxs21("div", { className: cn("flex flex-col", fluid ? "flex-1 min-w-0" : "w-18", className), children: [
|
|
1704
|
+
/* @__PURE__ */ jsx37("div", { className: "h-12 flex items-center justify-center border-b border-gray02 text-body1-regular text-secondary", children: formatDayLabel(date) }),
|
|
1705
|
+
slots.map((slot) => /* @__PURE__ */ jsx37(
|
|
1612
1706
|
TimeItem,
|
|
1613
1707
|
{
|
|
1614
1708
|
state: slot.state,
|
|
@@ -1634,16 +1728,17 @@ var TimeItem = ({
|
|
|
1634
1728
|
}) => {
|
|
1635
1729
|
const clickable = (state === "default" || state === "selected") && !!onClick;
|
|
1636
1730
|
const style = state === "default" && color ? { "--tt-hover": color } : void 0;
|
|
1637
|
-
return /* @__PURE__ */
|
|
1731
|
+
return /* @__PURE__ */ jsx37(
|
|
1638
1732
|
"div",
|
|
1639
1733
|
{
|
|
1640
1734
|
onClick: clickable ? onClick : void 0,
|
|
1641
1735
|
style,
|
|
1642
1736
|
className: cn(
|
|
1643
|
-
"h-18 flex items-center justify-center
|
|
1737
|
+
"h-18 flex items-center justify-center",
|
|
1644
1738
|
fluid ? "w-full" : "w-18",
|
|
1645
1739
|
"text-body1-medium text-center bg-white text-primary",
|
|
1646
|
-
|
|
1740
|
+
// "none"(일정 없음)은 구분선을 그리지 않아 연속된 빈 칸이 하나의 덩어리로 보이게 한다.
|
|
1741
|
+
state === "none" ? "bg-gray00 text-transparent" : "border-b border-gray02",
|
|
1647
1742
|
state === "selected" && "bg-black text-white hover:cursor-pointer",
|
|
1648
1743
|
state === "disabled" && "bg-gray00 text-gray03",
|
|
1649
1744
|
state === "default" && [
|
|
@@ -1660,11 +1755,11 @@ var TimeItem = ({
|
|
|
1660
1755
|
// src/components/TNB/TNB.tsx
|
|
1661
1756
|
import {
|
|
1662
1757
|
Fragment as Fragment2,
|
|
1663
|
-
forwardRef as
|
|
1758
|
+
forwardRef as forwardRef5,
|
|
1664
1759
|
useCallback as useCallback2,
|
|
1665
1760
|
useState as useState6
|
|
1666
1761
|
} from "react";
|
|
1667
|
-
import { jsx as
|
|
1762
|
+
import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1668
1763
|
function useControllableState2(controlled, defaultValue) {
|
|
1669
1764
|
const isControlled = controlled !== void 0;
|
|
1670
1765
|
const [uncontrolled, setUncontrolled] = useState6(defaultValue);
|
|
@@ -1677,7 +1772,7 @@ function useControllableState2(controlled, defaultValue) {
|
|
|
1677
1772
|
);
|
|
1678
1773
|
return [value, setValue, isControlled];
|
|
1679
1774
|
}
|
|
1680
|
-
var TNB =
|
|
1775
|
+
var TNB = forwardRef5(function TNB2({
|
|
1681
1776
|
logo,
|
|
1682
1777
|
upperPartItemList,
|
|
1683
1778
|
upperPartIconList,
|
|
@@ -1716,8 +1811,8 @@ var TNB = forwardRef4(function TNB2({
|
|
|
1716
1811
|
setLowerValue(label);
|
|
1717
1812
|
onSelectedLowerChange?.(label);
|
|
1718
1813
|
};
|
|
1719
|
-
return /* @__PURE__ */
|
|
1720
|
-
/* @__PURE__ */
|
|
1814
|
+
return /* @__PURE__ */ jsxs22("nav", { ref, "aria-label": ariaLabel, className: cn("w-full bg-white", className), children: [
|
|
1815
|
+
/* @__PURE__ */ jsx38(
|
|
1721
1816
|
UpperPart,
|
|
1722
1817
|
{
|
|
1723
1818
|
logo,
|
|
@@ -1728,7 +1823,7 @@ var TNB = forwardRef4(function TNB2({
|
|
|
1728
1823
|
linkComponent
|
|
1729
1824
|
}
|
|
1730
1825
|
),
|
|
1731
|
-
/* @__PURE__ */
|
|
1826
|
+
/* @__PURE__ */ jsx38(
|
|
1732
1827
|
LowerPart,
|
|
1733
1828
|
{
|
|
1734
1829
|
lowerPartItemList: currentLowerItemList,
|
|
@@ -1739,11 +1834,11 @@ var TNB = forwardRef4(function TNB2({
|
|
|
1739
1834
|
)
|
|
1740
1835
|
] });
|
|
1741
1836
|
});
|
|
1742
|
-
var NavClickable =
|
|
1837
|
+
var NavClickable = forwardRef5(function NavClickable2({ href, onClick, linkComponent: Link, current, disabled, className, children }, ref) {
|
|
1743
1838
|
const ariaCurrent = current ? "page" : void 0;
|
|
1744
1839
|
if (href && !disabled) {
|
|
1745
1840
|
if (Link) {
|
|
1746
|
-
return /* @__PURE__ */
|
|
1841
|
+
return /* @__PURE__ */ jsx38(
|
|
1747
1842
|
Link,
|
|
1748
1843
|
{
|
|
1749
1844
|
href,
|
|
@@ -1755,7 +1850,7 @@ var NavClickable = forwardRef4(function NavClickable2({ href, onClick, linkCompo
|
|
|
1755
1850
|
}
|
|
1756
1851
|
);
|
|
1757
1852
|
}
|
|
1758
|
-
return /* @__PURE__ */
|
|
1853
|
+
return /* @__PURE__ */ jsx38(
|
|
1759
1854
|
"a",
|
|
1760
1855
|
{
|
|
1761
1856
|
href,
|
|
@@ -1767,7 +1862,7 @@ var NavClickable = forwardRef4(function NavClickable2({ href, onClick, linkCompo
|
|
|
1767
1862
|
}
|
|
1768
1863
|
);
|
|
1769
1864
|
}
|
|
1770
|
-
return /* @__PURE__ */
|
|
1865
|
+
return /* @__PURE__ */ jsx38(
|
|
1771
1866
|
"button",
|
|
1772
1867
|
{
|
|
1773
1868
|
type: "button",
|
|
@@ -1789,7 +1884,7 @@ var UpperPart = ({
|
|
|
1789
1884
|
linkComponent,
|
|
1790
1885
|
className
|
|
1791
1886
|
}) => {
|
|
1792
|
-
return /* @__PURE__ */
|
|
1887
|
+
return /* @__PURE__ */ jsxs22(
|
|
1793
1888
|
"div",
|
|
1794
1889
|
{
|
|
1795
1890
|
className: cn(
|
|
@@ -1797,12 +1892,12 @@ var UpperPart = ({
|
|
|
1797
1892
|
className
|
|
1798
1893
|
),
|
|
1799
1894
|
children: [
|
|
1800
|
-
/* @__PURE__ */
|
|
1801
|
-
/* @__PURE__ */
|
|
1802
|
-
/* @__PURE__ */
|
|
1803
|
-
/* @__PURE__ */
|
|
1804
|
-
upperPartItemList.map((item) => /* @__PURE__ */
|
|
1805
|
-
/* @__PURE__ */
|
|
1895
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-stretch", children: [
|
|
1896
|
+
/* @__PURE__ */ jsx38("div", { className: "flex w-14 shrink-0 items-center justify-center px-3", children: /* @__PURE__ */ jsx38(NavIconButton, { ...logo, linkComponent }) }),
|
|
1897
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-stretch", children: [
|
|
1898
|
+
/* @__PURE__ */ jsx38("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" }),
|
|
1899
|
+
upperPartItemList.map((item) => /* @__PURE__ */ jsxs22(Fragment2, { children: [
|
|
1900
|
+
/* @__PURE__ */ jsx38(
|
|
1806
1901
|
UpperPartTab,
|
|
1807
1902
|
{
|
|
1808
1903
|
label: item.label,
|
|
@@ -1815,20 +1910,16 @@ var UpperPart = ({
|
|
|
1815
1910
|
}
|
|
1816
1911
|
}
|
|
1817
1912
|
),
|
|
1818
|
-
/* @__PURE__ */
|
|
1913
|
+
/* @__PURE__ */ jsx38("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" })
|
|
1819
1914
|
] }, item.id ?? item.label))
|
|
1820
1915
|
] })
|
|
1821
1916
|
] }),
|
|
1822
|
-
/* @__PURE__ */
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
upperPartIconList.map((icon, index) => /* @__PURE__ */
|
|
1825
|
-
NavIconButton,
|
|
1826
|
-
{
|
|
1827
|
-
|
|
1828
|
-
linkComponent
|
|
1829
|
-
},
|
|
1830
|
-
icon.id ?? icon.src ?? icon.label ?? index
|
|
1831
|
-
))
|
|
1917
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-stretch", children: [
|
|
1918
|
+
/* @__PURE__ */ jsx38("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" }),
|
|
1919
|
+
upperPartIconList.map((icon, index) => /* @__PURE__ */ jsxs22(Fragment2, { children: [
|
|
1920
|
+
/* @__PURE__ */ jsx38(NavIconButton, { ...icon, linkComponent }),
|
|
1921
|
+
/* @__PURE__ */ jsx38("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" })
|
|
1922
|
+
] }, icon.id ?? icon.src ?? icon.label ?? index))
|
|
1832
1923
|
] })
|
|
1833
1924
|
]
|
|
1834
1925
|
}
|
|
@@ -1842,7 +1933,7 @@ var UpperPartTab = ({
|
|
|
1842
1933
|
linkComponent,
|
|
1843
1934
|
className
|
|
1844
1935
|
}) => {
|
|
1845
|
-
return /* @__PURE__ */
|
|
1936
|
+
return /* @__PURE__ */ jsxs22(
|
|
1846
1937
|
NavClickable,
|
|
1847
1938
|
{
|
|
1848
1939
|
href,
|
|
@@ -1850,22 +1941,24 @@ var UpperPartTab = ({
|
|
|
1850
1941
|
linkComponent,
|
|
1851
1942
|
current: selected,
|
|
1852
1943
|
className: cn(
|
|
1853
|
-
|
|
1944
|
+
// 헤더 바닥 border-b와 언더라인이 겹치도록 높이를 52px로 고정하고
|
|
1945
|
+
// justify-between으로 라벨/언더라인을 위-아래 끝에 붙인다.
|
|
1946
|
+
"inline-flex h-13 flex-col items-center justify-between pt-2.5 cursor-pointer no-underline",
|
|
1854
1947
|
"transition-colors hover:bg-gray00 active:bg-gray01",
|
|
1855
1948
|
className
|
|
1856
1949
|
),
|
|
1857
1950
|
children: [
|
|
1858
|
-
/* @__PURE__ */
|
|
1859
|
-
/* @__PURE__ */
|
|
1951
|
+
/* @__PURE__ */ jsx38("span", { className: cn("px-5 text-head1-medium", selected ? "text-strong" : "text-quaternary"), children: label }),
|
|
1952
|
+
/* @__PURE__ */ jsx38("span", { className: cn("h-0.5 w-full", selected ? "bg-black" : "bg-transparent") })
|
|
1860
1953
|
]
|
|
1861
1954
|
}
|
|
1862
1955
|
);
|
|
1863
1956
|
};
|
|
1864
|
-
var NavIconButton =
|
|
1957
|
+
var NavIconButton = forwardRef5(
|
|
1865
1958
|
function NavIconButton2({ src, icon, alt, label, href, onClick, selected, badge, className, linkComponent }, forwardedRef) {
|
|
1866
1959
|
const interactive = Boolean(onClick || href);
|
|
1867
1960
|
const showBadge = badge !== void 0 && badge !== null && badge !== false;
|
|
1868
|
-
return /* @__PURE__ */
|
|
1961
|
+
return /* @__PURE__ */ jsxs22(
|
|
1869
1962
|
NavClickable,
|
|
1870
1963
|
{
|
|
1871
1964
|
ref: forwardedRef,
|
|
@@ -1881,9 +1974,9 @@ var NavIconButton = forwardRef4(
|
|
|
1881
1974
|
className
|
|
1882
1975
|
),
|
|
1883
1976
|
children: [
|
|
1884
|
-
icon ? /* @__PURE__ */
|
|
1885
|
-
label ? /* @__PURE__ */
|
|
1886
|
-
showBadge ? /* @__PURE__ */
|
|
1977
|
+
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,
|
|
1978
|
+
label ? /* @__PURE__ */ jsx38("span", { className: cn("text-body2-regular", selected ? "text-white" : "text-secondary"), children: label }) : null,
|
|
1979
|
+
showBadge ? /* @__PURE__ */ jsx38(
|
|
1887
1980
|
"span",
|
|
1888
1981
|
{
|
|
1889
1982
|
"aria-hidden": badge === true,
|
|
@@ -1909,14 +2002,14 @@ var LowerPart = ({
|
|
|
1909
2002
|
if (lowerPartItemList.length === 0) {
|
|
1910
2003
|
return null;
|
|
1911
2004
|
}
|
|
1912
|
-
return /* @__PURE__ */
|
|
2005
|
+
return /* @__PURE__ */ jsxs22(
|
|
1913
2006
|
"div",
|
|
1914
2007
|
{
|
|
1915
2008
|
className: cn("w-full h-[42px] pl-14 flex items-stretch border-b border-gray02", className),
|
|
1916
2009
|
children: [
|
|
1917
|
-
/* @__PURE__ */
|
|
1918
|
-
lowerPartItemList.map((item) => /* @__PURE__ */
|
|
1919
|
-
/* @__PURE__ */
|
|
2010
|
+
/* @__PURE__ */ jsx38("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" }),
|
|
2011
|
+
lowerPartItemList.map((item) => /* @__PURE__ */ jsxs22(Fragment2, { children: [
|
|
2012
|
+
/* @__PURE__ */ jsx38(
|
|
1920
2013
|
LowerPartItemButton,
|
|
1921
2014
|
{
|
|
1922
2015
|
label: item.label,
|
|
@@ -1929,7 +2022,7 @@ var LowerPart = ({
|
|
|
1929
2022
|
}
|
|
1930
2023
|
}
|
|
1931
2024
|
),
|
|
1932
|
-
/* @__PURE__ */
|
|
2025
|
+
/* @__PURE__ */ jsx38("span", { "aria-hidden": true, className: "w-px self-stretch bg-gray02" })
|
|
1933
2026
|
] }, item.id ?? item.label))
|
|
1934
2027
|
]
|
|
1935
2028
|
}
|
|
@@ -1943,7 +2036,7 @@ var LowerPartItemButton = ({
|
|
|
1943
2036
|
linkComponent,
|
|
1944
2037
|
className
|
|
1945
2038
|
}) => {
|
|
1946
|
-
return /* @__PURE__ */
|
|
2039
|
+
return /* @__PURE__ */ jsx38(
|
|
1947
2040
|
NavClickable,
|
|
1948
2041
|
{
|
|
1949
2042
|
href,
|
|
@@ -1962,10 +2055,10 @@ var LowerPartItemButton = ({
|
|
|
1962
2055
|
};
|
|
1963
2056
|
|
|
1964
2057
|
// src/components/Toast/Toast.tsx
|
|
1965
|
-
import { forwardRef as
|
|
1966
|
-
import { jsx as
|
|
2058
|
+
import { forwardRef as forwardRef6, useEffect as useEffect3, useState as useState7 } from "react";
|
|
2059
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1967
2060
|
var EXIT_MS = 300;
|
|
1968
|
-
var Toast =
|
|
2061
|
+
var Toast = forwardRef6(function Toast2({ message, open, duration = 3e3, onClose, position = "none", className }, ref) {
|
|
1969
2062
|
const controlled = open !== void 0;
|
|
1970
2063
|
const [mounted, setMounted] = useState7(!controlled || open);
|
|
1971
2064
|
const [visible, setVisible] = useState7(!controlled || open);
|
|
@@ -1986,7 +2079,7 @@ var Toast = forwardRef5(function Toast2({ message, open, duration = 3e3, onClose
|
|
|
1986
2079
|
return () => clearTimeout(timer);
|
|
1987
2080
|
}, [controlled, open, duration, onClose]);
|
|
1988
2081
|
if (!mounted) return null;
|
|
1989
|
-
const banner = /* @__PURE__ */
|
|
2082
|
+
const banner = /* @__PURE__ */ jsx39(
|
|
1990
2083
|
"div",
|
|
1991
2084
|
{
|
|
1992
2085
|
ref,
|
|
@@ -2004,7 +2097,7 @@ var Toast = forwardRef5(function Toast2({ message, open, duration = 3e3, onClose
|
|
|
2004
2097
|
}
|
|
2005
2098
|
);
|
|
2006
2099
|
if (position === "none") return banner;
|
|
2007
|
-
return /* @__PURE__ */
|
|
2100
|
+
return /* @__PURE__ */ jsx39(
|
|
2008
2101
|
"div",
|
|
2009
2102
|
{
|
|
2010
2103
|
className: cn(
|
|
@@ -2016,6 +2109,7 @@ var Toast = forwardRef5(function Toast2({ message, open, duration = 3e3, onClose
|
|
|
2016
2109
|
);
|
|
2017
2110
|
});
|
|
2018
2111
|
export {
|
|
2112
|
+
Accordion,
|
|
2019
2113
|
BackButton,
|
|
2020
2114
|
BasicFormField,
|
|
2021
2115
|
CTA,
|