@scglab/admin-ui 0.1.3 → 0.1.5

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.cjs CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,12 +17,46 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/index.ts
21
31
  var index_exports = {};
22
32
  __export(index_exports, {
33
+ BorderRadiusBox: () => BorderRadiusBox_default,
34
+ BulletText: () => BulletText_default,
35
+ Button: () => Button_default,
36
+ Checkbox: () => Checkbox_default,
37
+ CommonTable: () => CommonTable_default,
38
+ Divider: () => Divider_default,
39
+ EmailInput: () => EmailInput_default,
40
+ Input: () => Input_default,
41
+ Label: () => Label_default,
42
+ MultiSelectCheckbox: () => MultiSelectCheckbox_default,
43
+ Paging: () => Paging,
44
+ Radio: () => Radio_default,
45
+ RequiredDot: () => RequiredDot_default,
46
+ SelectBox: () => SelectBox_default,
47
+ Stack: () => Stack_default,
48
+ Table: () => Table_default,
49
+ TableTop: () => TableTop_default,
50
+ Tag: () => Tag,
51
+ TagInput: () => TagInput_default,
23
52
  Text: () => Text,
53
+ TextArea: () => TextArea_default,
54
+ TextButton: () => TextButton_default,
55
+ Toggle: () => Toggle_default,
56
+ ToolTipBox: () => ToolTipBox_default,
57
+ Tooltip: () => Tooltip_default,
58
+ TooltipInfo: () => TooltipInfo_default,
59
+ WarningBox: () => WarningBox_default,
24
60
  alignSelfs: () => alignSelfs,
25
61
  aligns: () => aligns,
26
62
  colors: () => colors,
@@ -189,9 +225,3385 @@ function Text({
189
225
  };
190
226
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { id, style: styles, className, ...props, children });
191
227
  }
228
+
229
+ // src/utils/helperUtils.ts
230
+ var import_moment = __toESM(require("moment"), 1);
231
+ var toRemFunction2 = (px) => {
232
+ return `${px / 14}rem`;
233
+ };
234
+ var formatNumberWithComma = (num) => {
235
+ if (!num) return "0";
236
+ const numStr = num.toString().replace(/[^\d]/g, "");
237
+ return numStr.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
238
+ };
239
+ var formatDate = (date) => {
240
+ return date ? (0, import_moment.default)(date).format("YYYY.MM.DD") : "";
241
+ };
242
+ var formatDateTime = (date) => {
243
+ return date ? (0, import_moment.default)(date).format("YYYY-MM-DD HH:mm:ss") : "";
244
+ };
245
+
246
+ // src/components/ui/BorderRadiusBox/BorderRadiusBox.tsx
247
+ var import_jsx_runtime2 = require("react/jsx-runtime");
248
+ function BorderRadiusBox({
249
+ active = false,
250
+ paddingX = 22,
251
+ paddingY = 20,
252
+ radius = 12,
253
+ children,
254
+ onClick,
255
+ className,
256
+ fullWidth = false,
257
+ bgColor = "white",
258
+ borderColor = "line"
259
+ }) {
260
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
261
+ "div",
262
+ {
263
+ className: `border ${fullWidth ? "w-full" : ""} ${active ? "border-primary bg-primary10" : `border-${borderColor} bg-${bgColor}`} ${onClick ? "cursor-pointer" : ""} ${className}`,
264
+ style: {
265
+ paddingLeft: toRemFunction2(paddingX),
266
+ paddingRight: toRemFunction2(paddingX),
267
+ paddingTop: toRemFunction2(paddingY),
268
+ paddingBottom: toRemFunction2(paddingY),
269
+ borderRadius: toRemFunction2(radius)
270
+ },
271
+ onClick,
272
+ children
273
+ }
274
+ );
275
+ }
276
+ var BorderRadiusBox_default = BorderRadiusBox;
277
+
278
+ // src/components/ui/Tooltip/Tooltip.tsx
279
+ var import_react = require("react");
280
+
281
+ // src/assets/colorIcon/ColorIcTagClose.tsx
282
+ var import_jsx_runtime3 = require("react/jsx-runtime");
283
+ function ColorIcTagClose({
284
+ width = 10,
285
+ height = 10,
286
+ color = "text"
287
+ }) {
288
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
289
+ "svg",
290
+ {
291
+ width,
292
+ height,
293
+ viewBox: "0 0 10 10",
294
+ fill: "none",
295
+ xmlns: "http://www.w3.org/2000/svg",
296
+ style: { color: `var(--color-${color})` },
297
+ children: [
298
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("g", { clipPath: "url(#clip0_848_3903)", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
299
+ "path",
300
+ {
301
+ d: "M5.5 5L9.3125 1.1875C9.45312 1.04688 9.45312 0.828125 9.3125 0.6875C9.17188 0.546875 8.95312 0.546875 8.8125 0.6875L5 4.5L1.1875 0.6875C1.04687 0.546875 0.828125 0.546875 0.6875 0.6875C0.546875 0.828125 0.546875 1.04688 0.6875 1.1875L4.5 5L0.6875 8.8125C0.546875 8.95313 0.546875 9.17188 0.6875 9.3125C0.75 9.375 0.84375 9.42188 0.9375 9.42188C1.03125 9.42188 1.125 9.39063 1.1875 9.3125L5 5.5L8.8125 9.3125C8.875 9.375 8.96875 9.42188 9.0625 9.42188C9.15625 9.42188 9.25 9.39063 9.3125 9.3125C9.45312 9.17188 9.45312 8.95313 9.3125 8.8125L5.5 5Z",
302
+ fill: "currentColor"
303
+ }
304
+ ) }),
305
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("clipPath", { id: "clip0_848_3903", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { width: "10", height: "10", fill: "white" }) }) })
306
+ ]
307
+ }
308
+ );
309
+ }
310
+ var ColorIcTagClose_default = ColorIcTagClose;
311
+
312
+ // src/assets/colorIcon/ColorIcTooltip.tsx
313
+ var import_jsx_runtime4 = require("react/jsx-runtime");
314
+ function ColorIcTooltip({
315
+ width = 14,
316
+ height = 14,
317
+ color = "text"
318
+ }) {
319
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
320
+ "svg",
321
+ {
322
+ width,
323
+ height,
324
+ viewBox: "0 0 14 14",
325
+ fill: "none",
326
+ xmlns: "http://www.w3.org/2000/svg",
327
+ style: { color: `var(--color-${color})` },
328
+ children: [
329
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
330
+ "path",
331
+ {
332
+ d: "M6.97882 4.26364H6.95761C6.70306 4.26364 6.46973 4.47576 6.46973 4.75152C6.46973 5.02728 6.68185 5.2394 6.95761 5.2394H6.97882C7.23336 5.2394 7.4667 5.02728 7.4667 4.75152C7.4667 4.47576 7.25458 4.26364 6.97882 4.26364Z",
333
+ fill: "currentColor"
334
+ }
335
+ ),
336
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
337
+ "path",
338
+ {
339
+ d: "M6.97872 5.93941C6.72418 5.93941 6.49084 6.15153 6.49084 6.42729V9.69395C6.49084 9.9485 6.70297 10.1818 6.97872 10.1818C7.23327 10.1818 7.4666 9.96971 7.4666 9.69395V6.40607C7.4666 6.15153 7.25448 5.93941 6.97872 5.93941Z",
340
+ fill: "currentColor"
341
+ }
342
+ ),
343
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
344
+ "path",
345
+ {
346
+ d: "M6.97866 0.593945C3.43624 0.593945 0.551392 3.45758 0.551392 7.00001C0.551392 10.5424 3.43624 13.4273 6.97866 13.4273C10.5211 13.4273 13.3847 10.5424 13.3847 7.00001C13.3847 3.45758 10.5211 0.593945 6.97866 0.593945ZM6.97866 12.4727C3.96654 12.4727 1.50594 10.0121 1.50594 7.00001C1.50594 3.98788 3.96654 1.52728 6.97866 1.52728C9.99079 1.52728 12.4302 3.98788 12.4302 7.00001C12.4302 10.0121 9.99079 12.4727 6.97866 12.4727Z",
347
+ fill: "currentColor"
348
+ }
349
+ )
350
+ ]
351
+ }
352
+ );
353
+ }
354
+ var ColorIcTooltip_default = ColorIcTooltip;
355
+
356
+ // src/components/ui/Tooltip/Tooltip.tsx
357
+ var import_jsx_runtime5 = require("react/jsx-runtime");
358
+ function Tooltip({ tooltipInfo, position = "right" }) {
359
+ const [isOpen, setIsOpen] = (0, import_react.useState)(false);
360
+ (0, import_react.useEffect)(() => {
361
+ if (isOpen) {
362
+ }
363
+ }, [isOpen]);
364
+ const positionStyle = {
365
+ left: position === "right" ? "17px" : "50%",
366
+ top: position === "right" ? "50%" : "17px",
367
+ transform: position === "right" ? "translate(0, -50%)" : "translate(-62%, 0)"
368
+ };
369
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "tooltip relative ml-2", children: [
370
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
371
+ "div",
372
+ {
373
+ className: "relative",
374
+ onClick: (e) => {
375
+ e.stopPropagation();
376
+ setIsOpen(!isOpen);
377
+ },
378
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ColorIcTooltip_default, { width: 14, height: 14 })
379
+ }
380
+ ),
381
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
382
+ "div",
383
+ {
384
+ className: `absolute z-10 rounded-md`,
385
+ style: {
386
+ ...positionStyle
387
+ },
388
+ children: [
389
+ tooltipInfo,
390
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "absolute top-10 right-10 cursor-pointer", onClick: (e) => {
391
+ e.stopPropagation();
392
+ setIsOpen(false);
393
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ColorIcTagClose_default, { width: 10, height: 10, color: "text" }) })
394
+ ]
395
+ }
396
+ )
397
+ ] });
398
+ }
399
+ var Tooltip_default = Tooltip;
400
+
401
+ // src/components/ui/BulletText/BulletText.tsx
402
+ var import_jsx_runtime6 = require("react/jsx-runtime");
403
+ var BulletText = ({
404
+ label,
405
+ bulletColor = "secondaryText",
406
+ tooltip,
407
+ textColor = "text",
408
+ textSize = "body14",
409
+ fontWeight: fontWeight2 = "bold"
410
+ }) => {
411
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: `flex flex-none relative label-mobile`, children: [
412
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
413
+ "span",
414
+ {
415
+ className: `inline-block w-3 h-3 bg-${bulletColor} mr-4 ${textSize === "body12" ? "mt-7" : "mt-9"}`
416
+ }
417
+ ),
418
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { size: textSize, color: textColor, fontWeight: fontWeight2, children: label }),
419
+ tooltip && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Tooltip_default, { tooltipInfo: tooltip })
420
+ ] });
421
+ };
422
+ var BulletText_default = BulletText;
423
+
424
+ // src/components/ui/Button/Button.tsx
425
+ var import_jsx_runtime7 = require("react/jsx-runtime");
426
+ var Button = ({
427
+ children,
428
+ variant = "primary",
429
+ size = "large",
430
+ fontWeight: fontWeight2 = "bold",
431
+ isLoading = false,
432
+ disabled,
433
+ className = "",
434
+ alignSelf = "center",
435
+ justifySelf = "center",
436
+ cornerStyle = "square",
437
+ icon,
438
+ iconPosition = "right",
439
+ type = "button",
440
+ customWidth,
441
+ wFull = false,
442
+ ...props
443
+ }) => {
444
+ const getVariantStyles = () => {
445
+ switch (variant) {
446
+ case "primary":
447
+ return `bg-primary text-white border border-primary hover:bg-blue-600 ${cornerStyle === "round" ? "rounded-full" : "rounded-md"}`;
448
+ case "secondary":
449
+ return `bg-primary10 border border-primary10 text-primary ${cornerStyle === "round" ? "rounded-full" : "rounded-md"}`;
450
+ case "danger":
451
+ return `bg-warningLight border border-warningLight text-warning hover:bg-warningLight ${cornerStyle === "round" ? "rounded-full" : "rounded-md"}`;
452
+ case "lower":
453
+ return `bg-gray2 text-dark5 border border-gray2 hover:bg-gray3 ${cornerStyle === "round" ? "rounded-full" : "rounded-md"}`;
454
+ case "neutral":
455
+ return `bg-white border border-primary text-primary ${cornerStyle === "round" ? "rounded-full" : "rounded-md"}`;
456
+ case "neutralGray":
457
+ return `bg-white border border-line text-text ${cornerStyle === "round" ? "rounded-full" : "rounded-md"}`;
458
+ case "blue":
459
+ return `bg-blueLight text-blue border border-blueLight ${cornerStyle === "round" ? "rounded-full" : "rounded-md"}`;
460
+ case "orange":
461
+ return `bg-orangeLight text-orange border border-orangeLight ${cornerStyle === "round" ? "rounded-full" : "rounded-md"}`;
462
+ case "green":
463
+ return `bg-greenLight text-green border border-greenLight ${cornerStyle === "round" ? "rounded-full" : "rounded-md"}`;
464
+ }
465
+ };
466
+ const getSizeStyles = () => {
467
+ switch (size) {
468
+ case "small":
469
+ return "px-10 py-1 text-sm";
470
+ case "medium":
471
+ return `px-16 pt-7 pb-8 text-body14 font-${fontWeight2}`;
472
+ case "large":
473
+ return `px-28 py-13 text-body16 font-${fontWeight2} min-w-[140px]`;
474
+ }
475
+ };
476
+ const baseStyles = "flex items-center justify-center transition-colors whitespace-nowrap cursor-pointer focus:outline-none";
477
+ const disabledStyles = `bg-gray1 text-dark7 cursor-not-allowed border border-gray1 ${cornerStyle === "round" ? "rounded-full" : "rounded-md"}`;
478
+ const buttonStyles = `
479
+ ${baseStyles}
480
+ ${getSizeStyles()}
481
+ ${disabled || isLoading ? disabledStyles : getVariantStyles()}
482
+ ${alignSelfs[alignSelf]}
483
+ ${justifySelfs[justifySelf]}
484
+ `;
485
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
486
+ "button",
487
+ {
488
+ className: `${buttonStyles} ${className}`,
489
+ disabled: disabled || isLoading,
490
+ type,
491
+ style: {
492
+ width: wFull ? "100%" : customWidth ? `${customWidth}px` : ""
493
+ },
494
+ ...props,
495
+ children: [
496
+ icon && iconPosition === "left" && (typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("img", { src: icon, alt: "icon", className: "w-16 h-16 mr-4" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "mr-4", children: icon })),
497
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "flex items-center justify-center", children: [
498
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
499
+ "svg",
500
+ {
501
+ className: "animate-spin -ml-1 mr-2 h-14 w-14 text-current",
502
+ xmlns: "http://www.w3.org/2000/svg",
503
+ fill: "none",
504
+ viewBox: "0 0 24 24",
505
+ children: [
506
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
507
+ "circle",
508
+ {
509
+ className: "opacity-25",
510
+ cx: "12",
511
+ cy: "12",
512
+ r: "10",
513
+ stroke: "currentColor",
514
+ strokeWidth: "4"
515
+ }
516
+ ),
517
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
518
+ "path",
519
+ {
520
+ className: "opacity-75",
521
+ fill: "currentColor",
522
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
523
+ }
524
+ )
525
+ ]
526
+ }
527
+ ),
528
+ "\uCC98\uB9AC \uC911..."
529
+ ] }) : children,
530
+ icon && iconPosition === "right" && (typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("img", { src: icon, alt: "icon", className: "w-16 h-16 ml-3" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "mr-4", children: icon }))
531
+ ]
532
+ }
533
+ );
534
+ };
535
+ var Button_default = Button;
536
+
537
+ // src/components/ui/Checkbox/Checkbox.tsx
538
+ var import_react2 = require("react");
539
+
540
+ // src/assets/colorIcon/ColorIcCheckDim.tsx
541
+ var import_jsx_runtime8 = require("react/jsx-runtime");
542
+ function ColorIcCheckDim({
543
+ width = 21,
544
+ height = 20,
545
+ fillColor = "gray3",
546
+ strokeColor = "stroke",
547
+ iconColor = "white"
548
+ }) {
549
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
550
+ "svg",
551
+ {
552
+ width,
553
+ height,
554
+ viewBox: "0 0 21 20",
555
+ fill: "none",
556
+ xmlns: "http://www.w3.org/2000/svg",
557
+ children: [
558
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
559
+ "rect",
560
+ {
561
+ x: "1",
562
+ y: "0.5",
563
+ width: "19",
564
+ height: "19",
565
+ rx: "3.5",
566
+ fill: `var(--color-${fillColor})`
567
+ }
568
+ ),
569
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
570
+ "rect",
571
+ {
572
+ x: "1",
573
+ y: "0.5",
574
+ width: "19",
575
+ height: "19",
576
+ rx: "3.5",
577
+ stroke: `var(--color-${strokeColor})`
578
+ }
579
+ ),
580
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
581
+ "path",
582
+ {
583
+ d: "M13.9658 5.92676C14.1349 5.75801 14.4042 5.75793 14.5732 5.92676C14.7212 6.07465 14.74 6.29972 14.6289 6.4668L14.5732 6.53418L11.1133 10.001L14.5596 13.4688C14.7286 13.6376 14.7293 13.9071 14.5605 14.0762C14.4836 14.153 14.367 14.2002 14.2627 14.2002C14.1584 14.2002 14.0427 14.153 13.9658 14.0762H13.9648L10.5059 10.6084L7.03418 14.0762C6.95726 14.153 6.84163 14.2002 6.7373 14.2002C6.63295 14.2002 6.5164 14.153 6.43945 14.0762C6.27071 13.9072 6.27047 13.6376 6.43945 13.4688L9.89746 10.002L6.42676 6.54785V6.54688C6.25778 6.37786 6.25763 6.10837 6.42676 5.93945C6.59574 5.77069 6.8651 5.77085 7.03418 5.93945L10.5059 9.39453L13.9648 5.92676H13.9658Z",
584
+ fill: `var(--color-${iconColor})`,
585
+ stroke: `var(--color-${iconColor})`,
586
+ strokeWidth: "0.4"
587
+ }
588
+ )
589
+ ]
590
+ }
591
+ );
592
+ }
593
+ var ColorIcCheckDim_default = ColorIcCheckDim;
594
+
595
+ // src/components/ui/Checkbox/Checkbox.tsx
596
+ var import_jsx_runtime9 = require("react/jsx-runtime");
597
+ var Checkbox = (0, import_react2.forwardRef)(
598
+ ({
599
+ label,
600
+ error,
601
+ className = "",
602
+ id,
603
+ type = "filled",
604
+ checked,
605
+ checkboxWidth,
606
+ disabled = false,
607
+ ...props
608
+ }, ref) => {
609
+ const checkboxId = id || `checkbox-${Math.random().toString(36).substring(2, 9)}`;
610
+ const [isChecked, setIsChecked] = (0, import_react2.useState)(checked || false);
611
+ (0, import_react2.useEffect)(() => {
612
+ setIsChecked(checked || false);
613
+ }, [checked]);
614
+ const handleInputChange = (e) => {
615
+ setIsChecked(e.target.checked);
616
+ if (props.onChange) {
617
+ props.onChange(e);
618
+ }
619
+ };
620
+ const handleCheckboxClick = (e) => {
621
+ e.preventDefault();
622
+ e.stopPropagation();
623
+ if (disabled) {
624
+ return;
625
+ }
626
+ const newChecked = !isChecked;
627
+ setIsChecked(newChecked);
628
+ const event = {
629
+ target: {
630
+ checked: newChecked,
631
+ value: props.value || "",
632
+ name: props.name || "",
633
+ type: "checkbox"
634
+ },
635
+ currentTarget: {
636
+ checked: newChecked,
637
+ value: props.value || "",
638
+ name: props.name || "",
639
+ type: "checkbox"
640
+ }
641
+ };
642
+ if (props.onChange) {
643
+ props.onChange(event);
644
+ }
645
+ };
646
+ const handleLabelClick = (e) => {
647
+ e.preventDefault();
648
+ e.stopPropagation();
649
+ if (disabled) {
650
+ return;
651
+ }
652
+ const newChecked = !isChecked;
653
+ setIsChecked(newChecked);
654
+ const event = {
655
+ target: {
656
+ checked: newChecked,
657
+ value: props.value || "",
658
+ name: props.name || "",
659
+ type: "checkbox"
660
+ },
661
+ currentTarget: {
662
+ checked: newChecked,
663
+ value: props.value || "",
664
+ name: props.name || "",
665
+ type: "checkbox"
666
+ }
667
+ };
668
+ if (props.onChange) {
669
+ props.onChange(event);
670
+ }
671
+ };
672
+ const getTypeNoneCheckedClass = () => {
673
+ if (type === "filled") {
674
+ return "border border-line rounded";
675
+ }
676
+ if (type === "outline") {
677
+ return "bg-white";
678
+ }
679
+ };
680
+ const getTypeCheckedClass = () => {
681
+ if (type === "filled") {
682
+ if (isChecked) {
683
+ return "bg-primary border-primary";
684
+ }
685
+ return "bg-white";
686
+ }
687
+ if (type === "outline") {
688
+ return "bg-white";
689
+ }
690
+ };
691
+ const getTypeCheckedIconClass = () => {
692
+ if (type === "filled") {
693
+ return "text-white";
694
+ }
695
+ if (type === "outline") {
696
+ if (isChecked) {
697
+ return "text-primary";
698
+ }
699
+ return "text-line";
700
+ }
701
+ };
702
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
703
+ "div",
704
+ {
705
+ className: `flex items-center py-1 px-1 ${checkboxWidth}`,
706
+ style: {
707
+ width: checkboxWidth ? `${toRemFunction2(checkboxWidth)}` : ""
708
+ },
709
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative flex items-center", children: [
710
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center h-5", children: [
711
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
712
+ "input",
713
+ {
714
+ ref,
715
+ id: checkboxId,
716
+ type: "checkbox",
717
+ checked: isChecked,
718
+ onChange: handleInputChange,
719
+ disabled,
720
+ className: "sr-only",
721
+ ...props
722
+ }
723
+ ),
724
+ disabled ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ColorIcCheckDim_default, { width: 18, height: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
725
+ "div",
726
+ {
727
+ className: `
728
+ h-18 w-18
729
+ ${getTypeNoneCheckedClass()}
730
+ transition-all duration-200
731
+ flex items-center justify-center
732
+ ${getTypeCheckedClass()}
733
+ ${error ? "border-red" : ""}
734
+ ${className}
735
+ `,
736
+ onClick: handleCheckboxClick,
737
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: `${getTypeCheckedIconClass()} flex items-center justify-center`, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
738
+ "svg",
739
+ {
740
+ width: "18",
741
+ height: "18",
742
+ viewBox: "0 0 20 20",
743
+ fill: "none",
744
+ xmlns: "http://www.w3.org/2000/svg",
745
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
746
+ "path",
747
+ {
748
+ d: "M15.292 5.93848C15.5167 5.687 15.8864 5.68757 16.1104 5.94043L16.1172 5.94727L16.123 5.95508C16.2977 6.1856 16.3012 6.54196 16.0713 6.77832L16.0723 6.7793L9.55078 13.9229L9.55176 13.9238C9.36406 14.1357 9.1186 14.25 8.84668 14.25C8.59606 14.25 8.33167 14.1383 8.1416 13.9238V13.9229L4.90918 10.373L4.90625 10.3701C4.69767 10.1343 4.69773 9.77005 4.90625 9.53418C5.12992 9.2815 5.49974 9.28064 5.72461 9.53125L8.86426 12.9795L15.292 5.9375V5.93848Z",
749
+ fill: "currentColor",
750
+ stroke: "currentColor",
751
+ strokeWidth: "0.5"
752
+ }
753
+ )
754
+ }
755
+ ) })
756
+ }
757
+ )
758
+ ] }),
759
+ label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: `text-sm ${type === "outline" ? "ml-4" : "ml-8"}`, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
760
+ "label",
761
+ {
762
+ htmlFor: checkboxId,
763
+ onClick: handleLabelClick,
764
+ className: ` text-body14 ${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"} select-none ${type === "outline" ? "text-primaryText " : "text-primaryText"}`,
765
+ children: label
766
+ }
767
+ ) })
768
+ ] })
769
+ }
770
+ );
771
+ }
772
+ );
773
+ Checkbox.displayName = "Checkbox";
774
+ var Checkbox_default = Checkbox;
775
+
776
+ // src/components/ui/Divider/Divider.tsx
777
+ var import_jsx_runtime10 = require("react/jsx-runtime");
778
+ function Divider({
779
+ className = "",
780
+ orientation = "horizontal",
781
+ variant = "solid",
782
+ width
783
+ }) {
784
+ const baseClasses = orientation === "horizontal" ? "w-full border-t" : "h-full border-l";
785
+ const variantClasses = {
786
+ solid: "border-solid",
787
+ dashed: "border-dashed",
788
+ dotted: "border-dotted"
789
+ };
790
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
791
+ "div",
792
+ {
793
+ className: `${baseClasses} ${variantClasses[variant]} border-line ${className}`,
794
+ style: { width: width ? toRemFunction2(width) : "100%" },
795
+ role: "separator"
796
+ }
797
+ );
798
+ }
799
+ var Divider_default = Divider;
800
+
801
+ // src/components/ui/EmailInput/EmailInput.tsx
802
+ var import_react5 = require("react");
803
+
804
+ // src/components/ui/Stack/Stack.tsx
805
+ var import_clsx = __toESM(require("clsx"), 1);
806
+ var import_react3 = require("react");
807
+ var import_jsx_runtime11 = require("react/jsx-runtime");
808
+ var Stack = (0, import_react3.forwardRef)(
809
+ ({
810
+ direction = "col",
811
+ justify,
812
+ align,
813
+ even = false,
814
+ className = "",
815
+ children,
816
+ gap,
817
+ rowGap = 0,
818
+ columnGap = 0,
819
+ wFull = false,
820
+ hFull = false,
821
+ onClick,
822
+ childSizes,
823
+ flexWrap = false
824
+ }, ref) => {
825
+ const classes = (0, import_clsx.default)(
826
+ "flex",
827
+ flexWrap && "flex-wrap",
828
+ directions[direction],
829
+ justify && justifies[justify],
830
+ align && aligns[align],
831
+ {
832
+ even,
833
+ "w-full": wFull,
834
+ "h-full": hFull
835
+ },
836
+ className
837
+ );
838
+ const renderChildren = () => {
839
+ if (!childSizes) return children;
840
+ const childrenArray = import_react3.Children.toArray(children);
841
+ const result = [];
842
+ const maxLength = Math.max(childSizes.length, childrenArray.length);
843
+ for (let index = 0; index < maxLength; index++) {
844
+ const size = childSizes[index];
845
+ const child = childrenArray[index];
846
+ if (!child) {
847
+ if (size !== void 0 && size !== null && size !== -1) {
848
+ let sizeValue;
849
+ if (typeof size === "string") {
850
+ if (/^\d+$/.test(size)) {
851
+ sizeValue = `${size}px`;
852
+ } else {
853
+ sizeValue = size;
854
+ }
855
+ } else if (typeof size === "number" && size > 0) {
856
+ sizeValue = `${size}px`;
857
+ } else {
858
+ continue;
859
+ }
860
+ const sizeStyle2 = {
861
+ flexBasis: sizeValue,
862
+ flexShrink: 0,
863
+ flexGrow: 0
864
+ };
865
+ result.push(/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: sizeStyle2 }, `spacer-${index}`));
866
+ }
867
+ continue;
868
+ }
869
+ if (!(0, import_react3.isValidElement)(child)) {
870
+ result.push(child);
871
+ continue;
872
+ }
873
+ let sizeStyle;
874
+ if (size === -1 || size === void 0 || size === null) {
875
+ sizeStyle = {
876
+ flex: 1
877
+ };
878
+ } else {
879
+ let sizeValue;
880
+ if (typeof size === "string") {
881
+ if (/^\d+$/.test(size)) {
882
+ sizeValue = `${size}px`;
883
+ } else {
884
+ sizeValue = size;
885
+ }
886
+ } else {
887
+ sizeValue = `${size}px`;
888
+ }
889
+ sizeStyle = {
890
+ flexBasis: sizeValue,
891
+ flexShrink: 0,
892
+ flexGrow: 0
893
+ };
894
+ }
895
+ result.push(
896
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: sizeStyle, children: child }, index)
897
+ );
898
+ }
899
+ return result;
900
+ };
901
+ const gapStyle = gap ? { gap: toRemFunction2(gap) } : { rowGap: toRemFunction2(rowGap), columnGap: toRemFunction2(columnGap) };
902
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
903
+ "div",
904
+ {
905
+ ref,
906
+ className: classes,
907
+ style: gapStyle ? gapStyle : void 0,
908
+ onClick,
909
+ children: renderChildren()
910
+ }
911
+ );
912
+ }
913
+ );
914
+ Stack.displayName = "Stack";
915
+ var Stack_default = Stack;
916
+
917
+ // src/components/ui/RequiredDot/RequiredDot.tsx
918
+ var import_jsx_runtime12 = require("react/jsx-runtime");
919
+ function RequiredDot() {
920
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "inline-block w-6 h-6 bg-red rounded-full bg-warning ml-4" });
921
+ }
922
+ var RequiredDot_default = RequiredDot;
923
+
924
+ // src/components/ui/Label/Label.tsx
925
+ var import_jsx_runtime13 = require("react/jsx-runtime");
926
+ var Label = ({
927
+ isDot = true,
928
+ label,
929
+ required = false,
930
+ inputId,
931
+ width,
932
+ tooltip,
933
+ labelHidden = false,
934
+ subText,
935
+ fontWeight: fontWeight2 = "bold",
936
+ align
937
+ }) => {
938
+ if (!label || labelHidden) return null;
939
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
940
+ "label",
941
+ {
942
+ htmlFor: inputId ? inputId : "",
943
+ className: `leading-none flex items-center flex-none relative label-mobile ${align === "end" ? "justify-end" : ""}`,
944
+ style: { width: width ? toRemFunction2(width) : "auto" },
945
+ children: [
946
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { size: "body14", color: "primaryText", fontWeight: fontWeight2, children: label }),
947
+ subText,
948
+ tooltip && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Tooltip_default, { tooltipInfo: tooltip }),
949
+ required && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RequiredDot_default, {})
950
+ ]
951
+ }
952
+ );
953
+ };
954
+ var Label_default = Label;
955
+
956
+ // src/components/ui/Input/Input.tsx
957
+ var import_jsx_runtime14 = require("react/jsx-runtime");
958
+ var Input = ({
959
+ isDot = true,
960
+ label,
961
+ type = "text",
962
+ error,
963
+ fullWidth = false,
964
+ id,
965
+ className = "",
966
+ originRef,
967
+ direction = "row",
968
+ textAlign = "left",
969
+ value,
970
+ description,
971
+ onChange,
972
+ customWidth,
973
+ tooltip,
974
+ labelWidth,
975
+ disabled,
976
+ onlyData = false,
977
+ labelHidden,
978
+ rightIcon,
979
+ onRightIconClick,
980
+ ...props
981
+ }) => {
982
+ const inputId = id || `input-${Math.random().toString(36).substring(2, 9)}`;
983
+ const displayValue = type === "number" && value ? formatNumberWithComma(value) : value;
984
+ const handleChange = (e) => {
985
+ if (type === "number") {
986
+ const rawValue = e.target.value.replace(/[^\d]/g, "");
987
+ if (onChange) {
988
+ const newEvent = {
989
+ ...e,
990
+ target: {
991
+ ...e.target,
992
+ value: rawValue
993
+ // 숫자값만 전달
994
+ }
995
+ };
996
+ onChange(newEvent);
997
+ }
998
+ } else if (onChange) {
999
+ onChange(e);
1000
+ }
1001
+ };
1002
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1003
+ Stack_default,
1004
+ {
1005
+ direction,
1006
+ wFull: fullWidth,
1007
+ gap: direction === "row" ? 14 : 4,
1008
+ align: direction === "row" ? "center" : "start",
1009
+ children: [
1010
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1011
+ Label_default,
1012
+ {
1013
+ label,
1014
+ isDot,
1015
+ width: labelWidth,
1016
+ required: props.required,
1017
+ inputId,
1018
+ tooltip,
1019
+ labelHidden
1020
+ }
1021
+ ),
1022
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1023
+ Stack_default,
1024
+ {
1025
+ gap: 5,
1026
+ className: `${fullWidth ? "flex-auto" : ""} relative`,
1027
+ wFull: direction === "row" ? false : fullWidth,
1028
+ children: [
1029
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "relative w-full", children: [
1030
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1031
+ "input",
1032
+ {
1033
+ id: inputId,
1034
+ ref: originRef,
1035
+ type: type === "number" ? "text" : type,
1036
+ value: displayValue,
1037
+ onChange: handleChange,
1038
+ autoComplete: props.autoComplete || "off",
1039
+ className: `
1040
+ px-12 h-36 border rounded-md leading-[36px]
1041
+ ${error ? "border-red" : "border-line"}
1042
+ focus:border-primary
1043
+ ${fullWidth && "w-full"}
1044
+ ${className}
1045
+ ${type === "number" ? "no-spinner" : ""}
1046
+ ${disabled ? "bg-gray1 border-line" : ""}
1047
+ ${onlyData && "bg-white"}
1048
+ ${rightIcon ? "pr-40" : ""}
1049
+ `,
1050
+ style: {
1051
+ textAlign,
1052
+ // autofill 배경색 제거를 위한 강력한 스타일
1053
+ // WebkitBoxShadow: "0 0 0 1000px white inset",
1054
+ WebkitTextFillColor: "inherit",
1055
+ // transition: "background-color 5000s ease-in-out 0s",
1056
+ width: customWidth ? `${toRemFunction2(customWidth)}` : "100%"
1057
+ // backgroundColor: disabled ? "var(--gray)" : "white",
1058
+ },
1059
+ disabled: disabled || onlyData,
1060
+ ...props,
1061
+ "aria-required": props.required
1062
+ }
1063
+ ),
1064
+ rightIcon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1065
+ "div",
1066
+ {
1067
+ className: `absolute inset-y-0 right-0 flex items-center pr-12 ${onRightIconClick ? "cursor-pointer" : "pointer-events-none"}`,
1068
+ onClick: onRightIconClick,
1069
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("img", { src: rightIcon, alt: "icon", width: 16, height: 16 })
1070
+ }
1071
+ )
1072
+ ] }),
1073
+ description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { size: "body12", color: "gray", children: description })
1074
+ ]
1075
+ }
1076
+ )
1077
+ ]
1078
+ }
1079
+ );
1080
+ };
1081
+ var Input_default = Input;
1082
+
1083
+ // src/components/ui/SelectBox/SelectBox.tsx
1084
+ var import_react4 = require("react");
1085
+
1086
+ // src/assets/colorIcon/ColorIcArrow.tsx
1087
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1088
+ function ColorIcArrow({
1089
+ isOpen = false,
1090
+ rotate = 0,
1091
+ width = 14,
1092
+ height = 14,
1093
+ color = "primary"
1094
+ }) {
1095
+ const rotateAngle = isOpen ? 90 : 0;
1096
+ const finalRotate = rotate + rotateAngle;
1097
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1098
+ "span",
1099
+ {
1100
+ className: "cursor-pointer",
1101
+ style: {
1102
+ color: `var(--color-${color})`,
1103
+ transform: `rotate(${finalRotate}deg)`,
1104
+ transition: "transform 200ms",
1105
+ display: "inline-flex",
1106
+ alignItems: "center",
1107
+ justifyContent: "center"
1108
+ },
1109
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1110
+ "svg",
1111
+ {
1112
+ width,
1113
+ height,
1114
+ viewBox: "0 0 14 14",
1115
+ fill: "none",
1116
+ xmlns: "http://www.w3.org/2000/svg",
1117
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1118
+ "path",
1119
+ {
1120
+ d: "M4.38402 1.8246C4.46631 1.74231 4.58724 1.74171 4.67015 1.82264V1.82362L9.61351 6.85487L9.61546 6.85585C9.69844 6.93882 9.69844 7.06096 9.61546 7.14393L9.61351 7.14589L4.6721 12.1752C4.62893 12.2184 4.56875 12.2424 4.52855 12.2426C4.47778 12.2426 4.43387 12.2297 4.37425 12.1849C4.30224 12.1026 4.30507 11.9888 4.38402 11.9096L4.38695 11.9066L8.9807 7.2035L9.17992 6.9994L8.97972 6.7953L4.38597 2.11464L4.38402 2.11268L4.35765 2.07948C4.30316 1.99948 4.3114 1.89721 4.38402 1.8246Z",
1121
+ fill: "currentColor",
1122
+ stroke: "currentColor",
1123
+ strokeWidth: "0.583333"
1124
+ }
1125
+ )
1126
+ }
1127
+ )
1128
+ }
1129
+ );
1130
+ }
1131
+ var ColorIcArrow_default = ColorIcArrow;
1132
+
1133
+ // src/components/ui/SelectBox/SelectBox.tsx
1134
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1135
+ var SelectBox = (0, import_react4.forwardRef)(
1136
+ ({
1137
+ isDot = true,
1138
+ label,
1139
+ error,
1140
+ fullWidth = false,
1141
+ options,
1142
+ id,
1143
+ direction = "row",
1144
+ className = "",
1145
+ placeholder = "\uC120\uD0DD\uD558\uC138\uC694",
1146
+ value,
1147
+ onChange,
1148
+ onFocus,
1149
+ onBlur,
1150
+ onEmptyClick,
1151
+ disabled = false,
1152
+ required = false,
1153
+ customWidth,
1154
+ labelHidden,
1155
+ emptyMessage = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",
1156
+ labelWidth,
1157
+ tooltip
1158
+ }, ref) => {
1159
+ const [isOpen, setIsOpen] = (0, import_react4.useState)(false);
1160
+ const [dropdownPosition, setDropdownPosition] = (0, import_react4.useState)(
1161
+ "bottom"
1162
+ );
1163
+ const dropdownRef = (0, import_react4.useRef)(null);
1164
+ const selectButtonRef = (0, import_react4.useRef)(null);
1165
+ const selectId = id || `select-${Math.random().toString(36).substring(2, 9)}`;
1166
+ const selectedOption = options.find((option) => option.value === value);
1167
+ const calculateMinWidth = () => {
1168
+ if (!options.length) return "auto";
1169
+ const maxLength = Math.max(
1170
+ ...options.map((option) => option.label.length),
1171
+ placeholder.length
1172
+ );
1173
+ const calculatedWidth = Math.min(Math.max(maxLength * 8 + 80, 120), 400);
1174
+ return `${calculatedWidth}px`;
1175
+ };
1176
+ const minWidth = calculateMinWidth();
1177
+ const calculateDropdownPosition = () => {
1178
+ if (!selectButtonRef.current) return "bottom";
1179
+ const selectRect = selectButtonRef.current.getBoundingClientRect();
1180
+ const viewportHeight = window.innerHeight;
1181
+ const dropdownHeight = Math.min(240, options.length * 40 + 20);
1182
+ const spaceBelow = viewportHeight - selectRect.bottom;
1183
+ const spaceAbove = selectRect.top;
1184
+ if (spaceBelow >= dropdownHeight) {
1185
+ return "bottom";
1186
+ } else if (spaceAbove >= dropdownHeight) {
1187
+ return "top";
1188
+ } else {
1189
+ return spaceBelow > spaceAbove ? "bottom" : "top";
1190
+ }
1191
+ };
1192
+ (0, import_react4.useEffect)(() => {
1193
+ if (isOpen) {
1194
+ const position = calculateDropdownPosition();
1195
+ setDropdownPosition(position);
1196
+ }
1197
+ }, [isOpen, options.length]);
1198
+ (0, import_react4.useEffect)(() => {
1199
+ const handleClickOutside = (event) => {
1200
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
1201
+ setIsOpen(false);
1202
+ }
1203
+ };
1204
+ document.addEventListener("mousedown", handleClickOutside);
1205
+ return () => {
1206
+ document.removeEventListener("mousedown", handleClickOutside);
1207
+ };
1208
+ }, []);
1209
+ const handleSelect = (optionValue) => {
1210
+ setIsOpen(false);
1211
+ onChange?.(optionValue);
1212
+ };
1213
+ const handleButtonClick = () => {
1214
+ if (disabled) return;
1215
+ if (!options || options.length === 0) {
1216
+ onEmptyClick?.();
1217
+ } else {
1218
+ setIsOpen(!isOpen);
1219
+ }
1220
+ };
1221
+ const handleKeyDown = (event) => {
1222
+ if (disabled) return;
1223
+ switch (event.key) {
1224
+ case "Enter":
1225
+ case " ":
1226
+ event.preventDefault();
1227
+ handleButtonClick();
1228
+ break;
1229
+ case "Escape":
1230
+ setIsOpen(false);
1231
+ break;
1232
+ }
1233
+ };
1234
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1235
+ Stack_default,
1236
+ {
1237
+ ref,
1238
+ direction,
1239
+ wFull: fullWidth,
1240
+ gap: direction === "row" ? 14 : 4,
1241
+ align: direction === "row" ? "center" : "start",
1242
+ children: [
1243
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1244
+ Label_default,
1245
+ {
1246
+ isDot,
1247
+ label,
1248
+ required,
1249
+ inputId: selectId,
1250
+ labelHidden,
1251
+ width: labelWidth,
1252
+ tooltip
1253
+ }
1254
+ ),
1255
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1256
+ Stack_default,
1257
+ {
1258
+ gap: 10,
1259
+ className: "flex-auto relative",
1260
+ wFull: direction === "row" ? false : fullWidth,
1261
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1262
+ "div",
1263
+ {
1264
+ ref: dropdownRef,
1265
+ className: `relative ${fullWidth ? "w-full" : ""}`,
1266
+ style: !fullWidth ? {
1267
+ minWidth,
1268
+ width: customWidth ? `${toRemFunction2(customWidth)}` : "100%"
1269
+ } : {},
1270
+ children: [
1271
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1272
+ "div",
1273
+ {
1274
+ ref: selectButtonRef,
1275
+ id: selectId,
1276
+ className: `
1277
+ relative w-full px-12 h-36 text-left border rounded-md cursor-pointer
1278
+ content-center leading-none
1279
+ ${error ? "border-red" : "border-line"}
1280
+ ${disabled ? "text-dark5 cursor-not-allowed bg-gray1 border-line" : "focus:border-primary bg-white"}
1281
+ ${className}
1282
+ `,
1283
+ onClick: handleButtonClick,
1284
+ onKeyDown: handleKeyDown,
1285
+ onFocus,
1286
+ onBlur,
1287
+ tabIndex: disabled ? -1 : 0,
1288
+ role: "combobox",
1289
+ "aria-haspopup": "listbox",
1290
+ "aria-expanded": isOpen,
1291
+ "aria-labelledby": label ? `${selectId}-label` : void 0,
1292
+ "aria-required": required,
1293
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-between h-full", children: [
1294
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center space-x-2 h-full", children: [
1295
+ selectedOption?.icon && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "flex-shrink-0", children: selectedOption.icon }),
1296
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1297
+ "span",
1298
+ {
1299
+ className: `block truncate leading-36 ${!value && selectedOption?.label !== "\uC804\uCCB4" ? "text-secondaryText" : "text-primaryText"}`,
1300
+ children: selectedOption?.label || placeholder
1301
+ }
1302
+ )
1303
+ ] }),
1304
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1305
+ ColorIcArrow_default,
1306
+ {
1307
+ isOpen,
1308
+ rotate: isOpen ? 270 : 90,
1309
+ color: "text"
1310
+ }
1311
+ )
1312
+ ] })
1313
+ }
1314
+ ),
1315
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1316
+ "div",
1317
+ {
1318
+ className: `absolute z-50 w-full bg-white border border-line rounded-md shadow-sm max-h-200 overflow-auto
1319
+ ${dropdownPosition === "bottom" ? "mt-2" : "mb-2 bottom-full"}
1320
+ `,
1321
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "py-4", role: "listbox", children: options.map((option, index) => {
1322
+ if (option.divider) {
1323
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Divider_default, { className: "my-10" }, index);
1324
+ }
1325
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1326
+ "li",
1327
+ {
1328
+ className: `
1329
+ relative cursor-pointer select-none py-7 px-16
1330
+ ${option.disabled ? "text-text cursor-not-allowed bg-gray-50" : "text-text hover:bg-primary hover:text-white"}
1331
+ ${value === option.value ? "bg-primary10 text-primary" : ""}
1332
+ `,
1333
+ onClick: () => !option.disabled && handleSelect(option.value),
1334
+ role: "option",
1335
+ "aria-selected": value === option.value,
1336
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center space-x-2", children: [
1337
+ option.icon && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "flex-shrink-0", children: option.icon }),
1338
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex-1", children: [
1339
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "font-medium", children: option.label }),
1340
+ option.description && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "text-sm text-gray", children: option.description })
1341
+ ] })
1342
+ ] })
1343
+ },
1344
+ option.value
1345
+ );
1346
+ }) })
1347
+ }
1348
+ )
1349
+ ]
1350
+ }
1351
+ )
1352
+ }
1353
+ )
1354
+ ]
1355
+ }
1356
+ );
1357
+ }
1358
+ );
1359
+ SelectBox.displayName = "SelectBox";
1360
+ var SelectBox_default = SelectBox;
1361
+
1362
+ // src/components/ui/EmailInput/EmailInput.tsx
1363
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1364
+ var EmailInput = ({
1365
+ value,
1366
+ onChange,
1367
+ error,
1368
+ label = "\uC774\uBA54\uC77C",
1369
+ placeholder = "\uC774\uBA54\uC77C \uC8FC\uC18C",
1370
+ required = false,
1371
+ direction = "row",
1372
+ fullWidth = false,
1373
+ onBlur,
1374
+ triggerValidation,
1375
+ labelHidden = false,
1376
+ className,
1377
+ customWidth
1378
+ }) => {
1379
+ const [localPart, setLocalPart] = (0, import_react5.useState)("");
1380
+ const [domain, setDomain] = (0, import_react5.useState)("");
1381
+ const [selectedDomain, setSelectedDomain] = (0, import_react5.useState)("");
1382
+ const [isCustomDomain, setIsCustomDomain] = (0, import_react5.useState)(false);
1383
+ const [isFocused, setIsFocused] = (0, import_react5.useState)(false);
1384
+ const domainOptions = [
1385
+ { value: "", label: "\uC120\uD0DD" },
1386
+ { value: "gmail.com", label: "gmail.com" },
1387
+ { value: "naver.com", label: "naver.com" },
1388
+ { value: "daum.net", label: "daum.net" },
1389
+ { value: "custom", label: "\uC9C1\uC811 \uC785\uB825" }
1390
+ ];
1391
+ (0, import_react5.useEffect)(() => {
1392
+ if (value) {
1393
+ const parts = value.split("@");
1394
+ if (parts.length === 2) {
1395
+ setLocalPart(parts[0]);
1396
+ setDomain(parts[1]);
1397
+ const domainOption = domainOptions.find(
1398
+ (option) => option.value === parts[1] && option.value !== "custom"
1399
+ );
1400
+ if (domainOption) {
1401
+ setSelectedDomain(parts[1]);
1402
+ setIsCustomDomain(false);
1403
+ } else {
1404
+ setSelectedDomain("custom");
1405
+ setIsCustomDomain(true);
1406
+ }
1407
+ } else {
1408
+ setLocalPart(value);
1409
+ setSelectedDomain("");
1410
+ setDomain("");
1411
+ }
1412
+ }
1413
+ }, [value]);
1414
+ const handleValueChange = (newValue) => {
1415
+ onChange(newValue);
1416
+ if (triggerValidation) {
1417
+ triggerValidation();
1418
+ }
1419
+ };
1420
+ const handleLocalPartChange = (e) => {
1421
+ const newLocalPart = e.target.value;
1422
+ setLocalPart(newLocalPart);
1423
+ updateEmail(newLocalPart, domain);
1424
+ };
1425
+ const handleDomainSelect = (selectedValue) => {
1426
+ setSelectedDomain(selectedValue);
1427
+ if (selectedValue === "custom") {
1428
+ setIsCustomDomain(true);
1429
+ updateEmail(localPart, domain);
1430
+ } else {
1431
+ setIsCustomDomain(false);
1432
+ setDomain(selectedValue);
1433
+ updateEmail(localPart, selectedValue || "");
1434
+ }
1435
+ };
1436
+ const handleCustomDomainChange = (e) => {
1437
+ const newDomain = e.target.value;
1438
+ const cleanDomain = newDomain.replace(/@/g, "");
1439
+ setDomain(cleanDomain);
1440
+ updateEmail(localPart, cleanDomain);
1441
+ };
1442
+ const updateEmail = (local, dmn) => {
1443
+ if (local && dmn) {
1444
+ handleValueChange(`${local}@${dmn}`);
1445
+ } else if (local) {
1446
+ handleValueChange(local);
1447
+ } else {
1448
+ handleValueChange("");
1449
+ }
1450
+ };
1451
+ const handleFocus = () => {
1452
+ setIsFocused(true);
1453
+ };
1454
+ const handleBlur = () => {
1455
+ setIsFocused(false);
1456
+ if (onBlur) {
1457
+ onBlur();
1458
+ }
1459
+ };
1460
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: `${fullWidth ? "w-full" : ""}`, "aria-required": required, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1461
+ Stack_default,
1462
+ {
1463
+ direction,
1464
+ wFull: fullWidth,
1465
+ gap: direction === "row" ? 14 : 4,
1466
+ align: direction === "row" ? "center" : "start",
1467
+ className,
1468
+ children: [
1469
+ !labelHidden && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Label_default, { label, required }),
1470
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1471
+ Stack_default,
1472
+ {
1473
+ gap: 10,
1474
+ className: "flex-auto relative",
1475
+ wFull: direction === "row" ? false : fullWidth,
1476
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1477
+ "div",
1478
+ {
1479
+ className: `flex items-center border rounded-md ${error ? "border-red" : isFocused ? "border-primary" : "border-line"}`,
1480
+ style: !fullWidth ? {
1481
+ width: customWidth ? `${toRemFunction2(customWidth)}` : "100%"
1482
+ } : {},
1483
+ children: [
1484
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1485
+ Input_default,
1486
+ {
1487
+ value: localPart,
1488
+ onChange: handleLocalPartChange,
1489
+ onFocus: handleFocus,
1490
+ onBlur: handleBlur,
1491
+ placeholder,
1492
+ className: `border-0 border-r rounded-r-none ${isFocused && "border-primary"}`,
1493
+ error: "",
1494
+ fullWidth: true
1495
+ }
1496
+ ),
1497
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: `px-10 flex items-center`, children: "@" }),
1498
+ isCustomDomain && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1499
+ Input_default,
1500
+ {
1501
+ value: domain,
1502
+ onChange: handleCustomDomainChange,
1503
+ onFocus: handleFocus,
1504
+ onBlur: handleBlur,
1505
+ placeholder: "\uB3C4\uBA54\uC778 \uC785\uB825",
1506
+ className: `border-0 border-l rounded-l-none ${isFocused && "border-primary"}`,
1507
+ error: "",
1508
+ fullWidth: true
1509
+ }
1510
+ ),
1511
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1512
+ SelectBox_default,
1513
+ {
1514
+ value: selectedDomain,
1515
+ onChange: handleDomainSelect,
1516
+ onFocus: handleFocus,
1517
+ onBlur: handleBlur,
1518
+ options: domainOptions,
1519
+ className: `border-0 border-l rounded-l-none ${isFocused && "border-primary"}`,
1520
+ fullWidth: true
1521
+ }
1522
+ )
1523
+ ]
1524
+ }
1525
+ )
1526
+ }
1527
+ )
1528
+ ]
1529
+ }
1530
+ ) });
1531
+ };
1532
+ var EmailInput_default = EmailInput;
1533
+
1534
+ // src/components/ui/MultiSelectCheckbox/MultiSelectCheckbox.tsx
1535
+ var import_react6 = require("react");
1536
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1537
+ var MultiSelectCheckbox = (0, import_react6.forwardRef)(
1538
+ ({
1539
+ isDot = true,
1540
+ label,
1541
+ error,
1542
+ fullWidth = false,
1543
+ options,
1544
+ id,
1545
+ direction = "row",
1546
+ className = "",
1547
+ placeholder = "\uC120\uD0DD\uD558\uC138\uC694",
1548
+ value = [],
1549
+ onChange,
1550
+ onConfirm,
1551
+ onFocus,
1552
+ onBlur,
1553
+ onEmptyClick,
1554
+ disabled = false,
1555
+ required = false,
1556
+ customWidth,
1557
+ labelHidden,
1558
+ emptyMessage = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",
1559
+ labelWidth,
1560
+ tooltip,
1561
+ confirmButtonText = "\uC120\uD0DD \uC644\uB8CC"
1562
+ }, ref) => {
1563
+ const toSafeArray = (val) => {
1564
+ if (Array.isArray(val)) return val;
1565
+ if (typeof val === "string" && val.length > 0) {
1566
+ return val.split(",").map((v) => v.trim()).filter((v) => v !== "");
1567
+ }
1568
+ return [];
1569
+ };
1570
+ const [isOpen, setIsOpen] = (0, import_react6.useState)(false);
1571
+ const [tempSelectedValues, setTempSelectedValues] = (0, import_react6.useState)(toSafeArray(value));
1572
+ const [originalValues, setOriginalValues] = (0, import_react6.useState)(
1573
+ toSafeArray(value)
1574
+ );
1575
+ const [dropdownPosition, setDropdownPosition] = (0, import_react6.useState)(
1576
+ "bottom"
1577
+ );
1578
+ const dropdownRef = (0, import_react6.useRef)(null);
1579
+ const selectButtonRef = (0, import_react6.useRef)(null);
1580
+ const selectId = id || `multi-select-${Math.random().toString(36).substring(2, 9)}`;
1581
+ (0, import_react6.useEffect)(() => {
1582
+ const safeValue = toSafeArray(value);
1583
+ setTempSelectedValues(safeValue);
1584
+ setOriginalValues(safeValue);
1585
+ }, [value]);
1586
+ const getDisplayText = () => {
1587
+ if (!tempSelectedValues || tempSelectedValues.length === 0) {
1588
+ return placeholder;
1589
+ }
1590
+ if (tempSelectedValues.length === options.length) {
1591
+ return "\uC804\uCCB4";
1592
+ }
1593
+ if (tempSelectedValues.length === 1) {
1594
+ const selectedOption = options.find(
1595
+ (opt) => opt.value === tempSelectedValues[0]
1596
+ );
1597
+ return selectedOption?.label || placeholder;
1598
+ }
1599
+ return `${tempSelectedValues.length}\uAC1C \uC120\uD0DD\uB428`;
1600
+ };
1601
+ const calculateMinWidth = () => {
1602
+ if (!options.length) return "auto";
1603
+ const maxLength = Math.max(
1604
+ ...options.map((option) => option.label.length),
1605
+ placeholder.length
1606
+ );
1607
+ const calculatedWidth = Math.min(Math.max(maxLength * 8 + 80, 120), 400);
1608
+ return `${calculatedWidth}px`;
1609
+ };
1610
+ const minWidth = calculateMinWidth();
1611
+ const calculateDropdownPosition = () => {
1612
+ if (!selectButtonRef.current) return "bottom";
1613
+ const selectRect = selectButtonRef.current.getBoundingClientRect();
1614
+ const viewportHeight = window.innerHeight;
1615
+ const dropdownHeight = Math.min(320, options.length * 40 + 100);
1616
+ const spaceBelow = viewportHeight - selectRect.bottom;
1617
+ const spaceAbove = selectRect.top;
1618
+ if (spaceBelow >= dropdownHeight) {
1619
+ return "bottom";
1620
+ } else if (spaceAbove >= dropdownHeight) {
1621
+ return "top";
1622
+ } else {
1623
+ return spaceBelow > spaceAbove ? "bottom" : "top";
1624
+ }
1625
+ };
1626
+ (0, import_react6.useEffect)(() => {
1627
+ if (isOpen) {
1628
+ const position = calculateDropdownPosition();
1629
+ setDropdownPosition(position);
1630
+ }
1631
+ }, [isOpen, options.length]);
1632
+ (0, import_react6.useEffect)(() => {
1633
+ const handleClickOutside = (event) => {
1634
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
1635
+ setTempSelectedValues(originalValues);
1636
+ onChange?.(originalValues);
1637
+ setIsOpen(false);
1638
+ }
1639
+ };
1640
+ document.addEventListener("mousedown", handleClickOutside);
1641
+ return () => {
1642
+ document.removeEventListener("mousedown", handleClickOutside);
1643
+ };
1644
+ }, [originalValues, onChange]);
1645
+ const handleButtonClick = () => {
1646
+ if (disabled) return;
1647
+ if (!options || options.length === 0) {
1648
+ onEmptyClick?.();
1649
+ } else {
1650
+ if (!isOpen) {
1651
+ setOriginalValues(tempSelectedValues);
1652
+ }
1653
+ setIsOpen(!isOpen);
1654
+ }
1655
+ };
1656
+ const handleKeyDown = (event) => {
1657
+ if (disabled) return;
1658
+ switch (event.key) {
1659
+ case "Enter":
1660
+ case " ":
1661
+ event.preventDefault();
1662
+ handleButtonClick();
1663
+ break;
1664
+ case "Escape":
1665
+ setTempSelectedValues(originalValues);
1666
+ onChange?.(originalValues);
1667
+ setIsOpen(false);
1668
+ break;
1669
+ }
1670
+ };
1671
+ const handleSelectAll = () => {
1672
+ const enabledOptions2 = options.filter((opt) => !opt.disabled);
1673
+ const allEnabledValues = enabledOptions2.map((opt) => opt.value);
1674
+ const allEnabledSelected = enabledOptions2.every(
1675
+ (opt) => tempSelectedValues.includes(opt.value)
1676
+ );
1677
+ if (allEnabledSelected) {
1678
+ setTempSelectedValues([]);
1679
+ onChange?.([]);
1680
+ } else {
1681
+ setTempSelectedValues(allEnabledValues);
1682
+ onChange?.(allEnabledValues);
1683
+ }
1684
+ };
1685
+ const handleCheckboxChange = (optionValue) => {
1686
+ const newValues = tempSelectedValues.includes(optionValue) ? tempSelectedValues.filter((v) => v !== optionValue) : [...tempSelectedValues, optionValue];
1687
+ setTempSelectedValues(newValues);
1688
+ onChange?.(newValues);
1689
+ };
1690
+ const handleConfirm = () => {
1691
+ setOriginalValues(tempSelectedValues);
1692
+ setIsOpen(false);
1693
+ onConfirm?.(tempSelectedValues);
1694
+ };
1695
+ const enabledOptions = options.filter((opt) => !opt.disabled);
1696
+ const isAllSelected = enabledOptions.length > 0 && enabledOptions.every((opt) => tempSelectedValues.includes(opt.value));
1697
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1698
+ Stack_default,
1699
+ {
1700
+ ref,
1701
+ direction,
1702
+ wFull: fullWidth,
1703
+ gap: direction === "row" ? 14 : 4,
1704
+ align: direction === "row" ? "center" : "start",
1705
+ children: [
1706
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1707
+ Label_default,
1708
+ {
1709
+ isDot,
1710
+ label,
1711
+ required,
1712
+ inputId: selectId,
1713
+ labelHidden,
1714
+ width: labelWidth,
1715
+ tooltip
1716
+ }
1717
+ ),
1718
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1719
+ Stack_default,
1720
+ {
1721
+ gap: 10,
1722
+ className: "flex-auto relative",
1723
+ wFull: direction === "row" ? false : fullWidth,
1724
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1725
+ "div",
1726
+ {
1727
+ ref: dropdownRef,
1728
+ className: `relative ${fullWidth ? "w-full" : ""}`,
1729
+ style: !fullWidth ? {
1730
+ minWidth,
1731
+ width: customWidth ? `${toRemFunction2(customWidth)}` : "100%"
1732
+ } : {},
1733
+ children: [
1734
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1735
+ "div",
1736
+ {
1737
+ ref: selectButtonRef,
1738
+ id: selectId,
1739
+ className: `
1740
+ relative w-full px-12 h-36 text-left border rounded-md cursor-pointer
1741
+ content-center leading-none
1742
+ ${error ? "border-red" : "border-line"}
1743
+ ${disabled ? "text-dark5 cursor-not-allowed bg-gray1 border-line" : "focus:border-primary bg-white"}
1744
+ ${className}
1745
+ `,
1746
+ onClick: handleButtonClick,
1747
+ onKeyDown: handleKeyDown,
1748
+ onFocus,
1749
+ onBlur,
1750
+ tabIndex: disabled ? -1 : 0,
1751
+ role: "combobox",
1752
+ "aria-haspopup": "listbox",
1753
+ "aria-expanded": isOpen,
1754
+ "aria-labelledby": label ? `${selectId}-label` : void 0,
1755
+ "aria-required": required,
1756
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center justify-between h-full", children: [
1757
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1758
+ "span",
1759
+ {
1760
+ className: `block truncate leading-36 ${tempSelectedValues.length === 0 ? "text-secondaryText" : "text-primaryText"}`,
1761
+ children: getDisplayText()
1762
+ }
1763
+ ),
1764
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1765
+ ColorIcArrow_default,
1766
+ {
1767
+ isOpen,
1768
+ rotate: isOpen ? 270 : 90,
1769
+ color: "text"
1770
+ }
1771
+ )
1772
+ ] })
1773
+ }
1774
+ ),
1775
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1776
+ "div",
1777
+ {
1778
+ className: `absolute z-50 w-full bg-white border border-line rounded-md shadow-sm
1779
+ ${dropdownPosition === "bottom" ? "mt-2" : "mb-2 bottom-full"}
1780
+ `,
1781
+ children: [
1782
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1783
+ "div",
1784
+ {
1785
+ className: " py-8 px-16 cursor-pointer hover:bg-gray1",
1786
+ onClick: (e) => {
1787
+ e.stopPropagation();
1788
+ handleSelectAll();
1789
+ },
1790
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-8 pointer-events-none", children: [
1791
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Checkbox_default, { checked: isAllSelected, onChange: () => {
1792
+ } }),
1793
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { children: "\uC804\uCCB4" })
1794
+ ] })
1795
+ }
1796
+ ),
1797
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "px-10", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Divider_default, {}) }),
1798
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "max-h-200 overflow-auto py-4", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { role: "listbox", children: options.map((option) => {
1799
+ const isChecked = tempSelectedValues.includes(
1800
+ option.value
1801
+ );
1802
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1803
+ "li",
1804
+ {
1805
+ className: `
1806
+ relative select-none py-7 px-16
1807
+ ${option.disabled ? "text-text cursor-not-allowed bg-gray-50" : "text-text hover:bg-gray1 cursor-pointer"}
1808
+ `,
1809
+ onClick: (e) => {
1810
+ e.stopPropagation();
1811
+ if (!option.disabled) {
1812
+ handleCheckboxChange(option.value);
1813
+ }
1814
+ },
1815
+ role: "option",
1816
+ "aria-selected": isChecked,
1817
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-8 pointer-events-none", children: [
1818
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1819
+ Checkbox_default,
1820
+ {
1821
+ checked: isChecked,
1822
+ onChange: () => {
1823
+ },
1824
+ disabled: option.disabled
1825
+ }
1826
+ ),
1827
+ option.color && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1828
+ "div",
1829
+ {
1830
+ className: `w-16 h-16 rounded-full flex-shrink-0 bg-${option.color}`
1831
+ }
1832
+ ),
1833
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { children: option.label })
1834
+ ] })
1835
+ },
1836
+ option.value
1837
+ );
1838
+ }) }) }),
1839
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "px-10", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Divider_default, {}) }),
1840
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: " p-9", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Stack_default, { direction: "row", align: "end", justify: "end", wFull: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1841
+ Button_default,
1842
+ {
1843
+ variant: "lower",
1844
+ size: "medium",
1845
+ onClick: handleConfirm,
1846
+ children: confirmButtonText
1847
+ }
1848
+ ) }) })
1849
+ ]
1850
+ }
1851
+ )
1852
+ ]
1853
+ }
1854
+ )
1855
+ }
1856
+ )
1857
+ ]
1858
+ }
1859
+ );
1860
+ }
1861
+ );
1862
+ MultiSelectCheckbox.displayName = "MultiSelectCheckbox";
1863
+ var MultiSelectCheckbox_default = MultiSelectCheckbox;
1864
+
1865
+ // src/assets/colorIcon/ColorIcFormArrow.tsx
1866
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1867
+ function ColorIcFormArrow({
1868
+ isOpen = false,
1869
+ rotate = 0,
1870
+ width = 16,
1871
+ height = 16,
1872
+ color = "secondaryText"
1873
+ }) {
1874
+ const rotateAngle = isOpen ? 180 : 0;
1875
+ const finalRotate = rotate + rotateAngle;
1876
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1877
+ "span",
1878
+ {
1879
+ className: "cursor-pointer",
1880
+ style: {
1881
+ color: `var(--color-${color})`,
1882
+ transform: `rotate(${finalRotate}deg)`,
1883
+ transition: "transform 200ms",
1884
+ display: "inline-flex",
1885
+ alignItems: "center",
1886
+ justifyContent: "center"
1887
+ },
1888
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1889
+ "svg",
1890
+ {
1891
+ width,
1892
+ height,
1893
+ viewBox: "0 0 16 16",
1894
+ fill: "none",
1895
+ xmlns: "http://www.w3.org/2000/svg",
1896
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1897
+ "path",
1898
+ {
1899
+ d: "M13.5854 4.9856C13.6683 4.90272 13.7851 4.89236 13.8765 4.95435L13.9146 4.9856C14.0086 5.07977 14.0094 5.21801 13.9165 5.31274L8.1665 10.9622L8.16455 10.9641C8.06824 11.0604 8.02264 11.0667 7.99951 11.0667C7.93967 11.0666 7.88852 11.0508 7.81689 10.9954L2.0835 5.36255C2.0024 5.2798 1.9927 5.16414 2.0542 5.07349L2.08545 5.0354C2.16829 4.95264 2.28515 4.94226 2.37646 5.00415L2.41455 5.0354L2.41748 5.03833L7.76709 10.2639L8.00146 10.4924L8.23389 10.262L13.5835 4.98755L13.5854 4.9856Z",
1900
+ fill: "currentColor",
1901
+ stroke: "currentColor",
1902
+ strokeWidth: "0.666667"
1903
+ }
1904
+ )
1905
+ }
1906
+ )
1907
+ }
1908
+ );
1909
+ }
1910
+ var ColorIcFormArrow_default = ColorIcFormArrow;
1911
+
1912
+ // src/components/ui/Paging/Paging.tsx
1913
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1914
+ function getPagination(current, total) {
1915
+ const pages = [];
1916
+ if (total <= 7) {
1917
+ for (let i = 1; i <= total; i++) pages.push(i);
1918
+ return pages;
1919
+ }
1920
+ if (current <= 4) {
1921
+ pages.push(1, 2, 3, 4, 5, "...", total);
1922
+ } else if (current >= total - 3) {
1923
+ pages.push(1, "...", total - 4, total - 3, total - 2, total - 1, total);
1924
+ } else {
1925
+ pages.push(1, "...", current - 1, current, current + 1, "...", total);
1926
+ }
1927
+ return pages;
1928
+ }
1929
+ function Paging({
1930
+ page,
1931
+ total,
1932
+ limit,
1933
+ onPageChange
1934
+ }) {
1935
+ const totalPages = Math.ceil(total / limit);
1936
+ const pages = getPagination(page, totalPages);
1937
+ if (!total) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, {});
1938
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center justify-center gap-2 mt-8", children: [
1939
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1940
+ "span",
1941
+ {
1942
+ onClick: () => {
1943
+ if (page === 1) return;
1944
+ onPageChange(page - 2);
1945
+ },
1946
+ className: `rounded flex p-6 ${page === 1 ? "opacity-0 " : "cursor-pointer "} hover:bg-gray2`,
1947
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ColorIcFormArrow_default, { rotate: 90 })
1948
+ }
1949
+ ),
1950
+ pages.map(
1951
+ (p, i) => typeof p === "number" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1952
+ "span",
1953
+ {
1954
+ onClick: () => onPageChange(p - 1),
1955
+ className: `inline-block rounded h-24 w-24 pt-5 text-center leading-none text-body16 ${page === p ? "bg-primary text-white cursor-not-allowed" : "text-text cursor-pointer"}`,
1956
+ children: p
1957
+ },
1958
+ p
1959
+ ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1960
+ "span",
1961
+ {
1962
+ className: "px-10 inline-block text-gray-400 text-lg",
1963
+ children: "..."
1964
+ },
1965
+ `ellipsis-${i}`
1966
+ )
1967
+ ),
1968
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1969
+ "span",
1970
+ {
1971
+ onClick: () => {
1972
+ if (page === totalPages) return;
1973
+ onPageChange(page);
1974
+ },
1975
+ className: `rounded flex p-6 ${page === totalPages ? "opacity-0 " : "cursor-pointer"} hover:bg-gray2`,
1976
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ColorIcFormArrow_default, { rotate: 270 })
1977
+ }
1978
+ )
1979
+ ] });
1980
+ }
1981
+
1982
+ // src/components/ui/Radio/Radio.tsx
1983
+ var import_react7 = require("react");
1984
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1985
+ var Radio = (0, import_react7.forwardRef)(
1986
+ ({ label, error, className = "", id, radioWidth, checked, ...props }, ref) => {
1987
+ const radioId = id || `radio-${Math.random().toString(36).substring(2, 9)}`;
1988
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1989
+ "div",
1990
+ {
1991
+ className: "flex items-center h-36",
1992
+ style: {
1993
+ width: radioWidth ? `${toRemFunction2(radioWidth)}` : "auto"
1994
+ },
1995
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative flex items-center gap-10", children: [
1996
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center", children: [
1997
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1998
+ "input",
1999
+ {
2000
+ ref,
2001
+ id: radioId,
2002
+ type: "radio",
2003
+ className: "sr-only",
2004
+ checked,
2005
+ ...props
2006
+ }
2007
+ ),
2008
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2009
+ "label",
2010
+ {
2011
+ htmlFor: radioId,
2012
+ className: `
2013
+ relative flex items-center justify-center w-20 h-20 rounded-full cursor-pointer
2014
+ border transition-all duration-100
2015
+ ${checked ? "bg-primary border-primary" : "bg-line border-line"}
2016
+ ${error ? "border-red" : ""}
2017
+ ${props.disabled ? "opacity-50 cursor-not-allowed" : ""}
2018
+ ${className}
2019
+ `,
2020
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2021
+ "div",
2022
+ {
2023
+ className: ` bg-white rounded-full items-center ${checked ? "w-10 h-10 border-primary" : "w-18 h-18 border-line"}`
2024
+ }
2025
+ )
2026
+ }
2027
+ )
2028
+ ] }),
2029
+ label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2030
+ "label",
2031
+ {
2032
+ htmlFor: radioId,
2033
+ className: "text-body14 text-primaryText cursor-pointer",
2034
+ children: label
2035
+ }
2036
+ ) })
2037
+ ] })
2038
+ }
2039
+ );
2040
+ }
2041
+ );
2042
+ Radio.displayName = "Radio";
2043
+ var Radio_default = Radio;
2044
+
2045
+ // src/components/ui/Table/Table.tsx
2046
+ var import_react8 = require("react");
2047
+
2048
+ // src/assets/common/ic-sort-arrow-up.svg
2049
+ var ic_sort_arrow_up_default = "./ic-sort-arrow-up-DJQRDWHQ.svg";
2050
+
2051
+ // src/assets/common/ic-sort-arrow-down.svg
2052
+ var ic_sort_arrow_down_default = "./ic-sort-arrow-down-H56K6AN4.svg";
2053
+
2054
+ // src/components/ui/Table/Table.tsx
2055
+ var import_react9 = __toESM(require("react"), 1);
2056
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2057
+ function Table({
2058
+ columns,
2059
+ datas = [],
2060
+ footers,
2061
+ isRadioOption = false,
2062
+ isCheckboxOption = false,
2063
+ isModify = false,
2064
+ overWidth,
2065
+ emptyMessage = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",
2066
+ disabledCheckboxCondition,
2067
+ onButtonClick,
2068
+ onLinkClick,
2069
+ onChangeInput,
2070
+ onChangeCheckbox,
2071
+ onChangeToggle,
2072
+ onCheckboxOption,
2073
+ onRadioOption,
2074
+ onMoveUp,
2075
+ onMoveDown,
2076
+ onSort
2077
+ }) {
2078
+ const headersKeys = columns.map((col) => col.key);
2079
+ const linkKeys = columns.filter((col) => col.type === "link").map((col) => col.key);
2080
+ const dateKeys = columns.filter((col) => col.type === "date").map((col) => col.key);
2081
+ const dateTimeKeys = columns.filter((col) => col.type === "dateTime").map((col) => col.key);
2082
+ const amountKeys = columns.filter((col) => col.type === "amount").map((col) => col.key);
2083
+ const persentKeys = columns.filter((col) => col.type === "percent").map((col) => col.key);
2084
+ const inputKeys = columns.filter((col) => col.type === "input").map((col) => col.key);
2085
+ const checkboxKeys = columns.filter((col) => col.type === "checkbox").map((col) => col.key);
2086
+ const thAlignLeftKeys = columns.filter((col) => (col.thAlign || col.align) === "left").map((col) => col.key);
2087
+ const thAlignRightKeys = columns.filter((col) => (col.thAlign || col.align) === "right").map((col) => col.key);
2088
+ const tdAlignLeftKeys = columns.filter((col) => (col.tdAlign || col.align) === "left").map((col) => col.key);
2089
+ const tdAlignRightKeys = columns.filter((col) => (col.tdAlign || col.align) === "right").map((col) => col.key);
2090
+ const textBoldKeys = columns.filter((col) => col.bold).map((col) => col.key);
2091
+ const noWrapKeys = columns.filter((col) => col.noWrap).map((col) => col.key);
2092
+ const requiredKeys = columns.filter((col) => col.required).map((col) => col.key);
2093
+ const importantColorKeys = columns.filter((col) => col.important).map((col) => col.key);
2094
+ const sortKeys = columns.filter((col) => col.sortable).map((col) => col.key);
2095
+ const mergeDuplicateKeys = columns.filter((col) => col.mergeDuplicate).map((col) => col.key);
2096
+ const [selectedIds, setSelectedIds] = (0, import_react8.useState)([]);
2097
+ const [sortState, setSortState] = (0, import_react8.useState)(null);
2098
+ const enabledDatas = datas.filter(
2099
+ (data) => !disabledCheckboxCondition?.(data)
2100
+ );
2101
+ const isAllSelected = enabledDatas.length > 0 && selectedIds.length === enabledDatas.length;
2102
+ const getCellSpan = (rowIndex, colIndex, headerKey) => {
2103
+ if (!mergeDuplicateKeys.includes(headerKey)) return 1;
2104
+ const currentRow = datas[rowIndex];
2105
+ const currentOrderNo = currentRow["orderNo"];
2106
+ const currentValue = JSON.stringify(currentRow[headerKey]);
2107
+ let span = 1;
2108
+ for (let i = rowIndex + 1; i < datas.length; i++) {
2109
+ const nextRow = datas[i];
2110
+ const nextOrderNo = nextRow["orderNo"];
2111
+ const nextValue = JSON.stringify(nextRow[headerKey]);
2112
+ if (JSON.stringify(nextOrderNo) !== JSON.stringify(currentOrderNo)) {
2113
+ break;
2114
+ }
2115
+ if (nextValue !== currentValue) {
2116
+ break;
2117
+ }
2118
+ span++;
2119
+ }
2120
+ return span;
2121
+ };
2122
+ const getMergedCellClassName = (rowSpan) => {
2123
+ if (rowSpan <= 1) return "border-b border-line px-20 py-8";
2124
+ return "border-b border-r border-line px-20 py-8";
2125
+ };
2126
+ const shouldRenderCell = (rowIndex, colIndex, headerKey) => {
2127
+ if (!mergeDuplicateKeys.includes(headerKey)) return true;
2128
+ if (rowIndex > 0) {
2129
+ const currentRow = datas[rowIndex];
2130
+ const previousRow = datas[rowIndex - 1];
2131
+ const currentOrderNo = currentRow["orderNo"];
2132
+ const previousOrderNo = previousRow["orderNo"];
2133
+ const currentValue = JSON.stringify(currentRow[headerKey]);
2134
+ const previousValue = JSON.stringify(previousRow[headerKey]);
2135
+ if (JSON.stringify(currentOrderNo) === JSON.stringify(previousOrderNo) && currentValue === previousValue) {
2136
+ return false;
2137
+ }
2138
+ }
2139
+ return true;
2140
+ };
2141
+ const handleSelectAll = () => {
2142
+ if (isAllSelected) {
2143
+ setSelectedIds([]);
2144
+ onCheckboxOption?.([]);
2145
+ } else {
2146
+ const enabledIds = enabledDatas.map((data) => data.id).filter(Boolean);
2147
+ setSelectedIds(enabledIds.map(String));
2148
+ onCheckboxOption?.(enabledIds.map(String));
2149
+ }
2150
+ };
2151
+ const handleSelectItem = (id) => {
2152
+ const data = datas.find((item) => String(item.id) === id);
2153
+ if (data && disabledCheckboxCondition?.(data)) {
2154
+ return;
2155
+ }
2156
+ const newSelectedIds = selectedIds.includes(id) ? selectedIds.filter((selectedId) => selectedId !== id) : [...selectedIds, id];
2157
+ setSelectedIds(newSelectedIds);
2158
+ onCheckboxOption?.(newSelectedIds);
2159
+ };
2160
+ const handleSelectRadioItem = (id) => {
2161
+ setSelectedIds([id]);
2162
+ onRadioOption?.(id);
2163
+ };
2164
+ const handleMoveUp = (id) => {
2165
+ onMoveUp?.(id);
2166
+ };
2167
+ const handleMoveDown = (id) => {
2168
+ onMoveDown?.(id);
2169
+ };
2170
+ const handleSort = (key) => {
2171
+ if (!sortKeys.includes(key)) return;
2172
+ let newDirection;
2173
+ if (sortState?.key === key) {
2174
+ if (sortState.direction === "asc") {
2175
+ newDirection = "desc";
2176
+ } else if (sortState.direction === "desc") {
2177
+ newDirection = "none";
2178
+ } else {
2179
+ newDirection = "asc";
2180
+ }
2181
+ } else {
2182
+ newDirection = "asc";
2183
+ }
2184
+ if (newDirection === "none") {
2185
+ setSortState(null);
2186
+ } else {
2187
+ setSortState({ key, direction: newDirection });
2188
+ }
2189
+ onSort?.(key, newDirection);
2190
+ };
2191
+ const getSortedData = (data, sortKey, direction) => {
2192
+ if (!sortKey || direction === "none") return data;
2193
+ return [...data].sort((a, b) => {
2194
+ const aValue = a[sortKey];
2195
+ const bValue = b[sortKey];
2196
+ if (aValue === null || aValue === void 0)
2197
+ return direction === "asc" ? -1 : 1;
2198
+ if (bValue === null || bValue === void 0)
2199
+ return direction === "asc" ? 1 : -1;
2200
+ if (typeof aValue === "number" && typeof bValue === "number") {
2201
+ return direction === "asc" ? aValue - bValue : bValue - aValue;
2202
+ }
2203
+ if (dateKeys.includes(sortKey)) {
2204
+ const aDate = new Date(String(aValue)).getTime();
2205
+ const bDate = new Date(String(bValue)).getTime();
2206
+ return direction === "asc" ? aDate - bDate : bDate - aDate;
2207
+ }
2208
+ if (dateTimeKeys.includes(sortKey)) {
2209
+ const aDate = new Date(String(aValue)).getTime();
2210
+ const bDate = new Date(String(bValue)).getTime();
2211
+ return direction === "asc" ? aDate - bDate : bDate - aDate;
2212
+ }
2213
+ const aString = String(aValue).toLowerCase();
2214
+ const bString = String(bValue).toLowerCase();
2215
+ if (aString < bString) return direction === "asc" ? -1 : 1;
2216
+ if (aString > bString) return direction === "asc" ? 1 : -1;
2217
+ return 0;
2218
+ });
2219
+ };
2220
+ const sortedData = sortState ? getSortedData(datas, sortState.key, sortState.direction) : datas;
2221
+ (0, import_react8.useEffect)(() => {
2222
+ const currentIds = sortedData.map((data) => String(data.id)).filter(Boolean);
2223
+ const validSelectedIds = selectedIds.filter(
2224
+ (id) => currentIds.includes(id)
2225
+ );
2226
+ if (validSelectedIds.length !== selectedIds.length) {
2227
+ setSelectedIds(validSelectedIds);
2228
+ onCheckboxOption?.(validSelectedIds);
2229
+ }
2230
+ }, [sortedData, selectedIds, onCheckboxOption]);
2231
+ const cellData = (data, headerKey, rowIndex, colIndex) => {
2232
+ const value = data[headerKey];
2233
+ if (!shouldRenderCell(rowIndex, colIndex, headerKey)) {
2234
+ return null;
2235
+ }
2236
+ const rowSpan = getCellSpan(rowIndex, colIndex, headerKey);
2237
+ const column = columns.find((col) => col.key === headerKey);
2238
+ if (column?.render) {
2239
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2240
+ "td",
2241
+ {
2242
+ className: `${getMergedCellClassName(rowSpan)} ${tdAlignLeftKeys?.includes(headerKey) ? "text-left" : tdAlignRightKeys?.includes(headerKey) ? "text-right" : "text-center"} ${noWrapKeys?.includes(headerKey) ? "whitespace-nowrap" : ""} ${textBoldKeys?.includes(headerKey) ? "font-bold" : ""} ${column.tdClassName || ""}`,
2243
+ rowSpan: rowSpan > 1 ? rowSpan : void 0,
2244
+ children: column.render(value, data, rowIndex)
2245
+ },
2246
+ `${rowIndex}-${colIndex}`
2247
+ );
2248
+ }
2249
+ if (inputKeys?.includes(headerKey)) {
2250
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2251
+ "td",
2252
+ {
2253
+ className: `${getMergedCellClassName(rowSpan)} ${tdAlignLeftKeys?.includes(headerKey) ? "text-left" : tdAlignRightKeys?.includes(headerKey) ? "text-right" : "text-center"} ${noWrapKeys?.includes(headerKey) ? "whitespace-nowrap" : ""}`,
2254
+ rowSpan: rowSpan > 1 ? rowSpan : void 0,
2255
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Stack_default, { direction: "row", gap: 4, align: "center", justify: "center", children: [
2256
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2257
+ Input_default,
2258
+ {
2259
+ type: "number",
2260
+ textAlign: "right",
2261
+ direction: "row",
2262
+ value: String(value),
2263
+ customWidth: 120,
2264
+ onChange: (e) => {
2265
+ onChangeInput?.(
2266
+ data.id,
2267
+ String(e.target.value),
2268
+ headerKey
2269
+ );
2270
+ }
2271
+ }
2272
+ ),
2273
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { children: "\uC6D0" })
2274
+ ] })
2275
+ },
2276
+ `${rowIndex}-${colIndex}`
2277
+ );
2278
+ }
2279
+ if (checkboxKeys?.includes(headerKey)) {
2280
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2281
+ "td",
2282
+ {
2283
+ className: `${getMergedCellClassName(rowSpan)} ${noWrapKeys?.includes(headerKey) ? "whitespace-nowrap" : ""}`,
2284
+ rowSpan: rowSpan > 1 ? rowSpan : void 0,
2285
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Stack_default, { direction: "row", gap: 4, align: "center", justify: "start", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2286
+ Checkbox_default,
2287
+ {
2288
+ checked: value,
2289
+ onChange: (e) => onChangeCheckbox?.(
2290
+ data.id,
2291
+ e.target.checked,
2292
+ headerKey
2293
+ )
2294
+ }
2295
+ ) })
2296
+ },
2297
+ `${rowIndex}-${colIndex}`
2298
+ );
2299
+ }
2300
+ if (amountKeys?.includes(headerKey)) {
2301
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2302
+ "td",
2303
+ {
2304
+ className: `${getMergedCellClassName(rowSpan)} ${tdAlignLeftKeys?.includes(headerKey) ? "text-left" : tdAlignRightKeys?.includes(headerKey) ? "text-right" : "text-center"} ${noWrapKeys?.includes(headerKey) ? "whitespace-nowrap" : ""}`,
2305
+ rowSpan: rowSpan > 1 ? rowSpan : void 0,
2306
+ children: [
2307
+ formatNumberWithComma(String(value)),
2308
+ "\uC6D0"
2309
+ ]
2310
+ },
2311
+ `${rowIndex}-${colIndex}`
2312
+ );
2313
+ }
2314
+ if (dateKeys?.includes(headerKey)) {
2315
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2316
+ "td",
2317
+ {
2318
+ className: `${getMergedCellClassName(rowSpan)} ${tdAlignLeftKeys?.includes(headerKey) ? "text-left" : tdAlignRightKeys?.includes(headerKey) ? "text-right" : "text-center"} ${noWrapKeys?.includes(headerKey) ? "whitespace-nowrap" : ""}`,
2319
+ rowSpan: rowSpan > 1 ? rowSpan : void 0,
2320
+ children: formatDate(String(value))
2321
+ },
2322
+ `${rowIndex}-${colIndex}`
2323
+ );
2324
+ }
2325
+ if (dateTimeKeys?.includes(headerKey)) {
2326
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2327
+ "td",
2328
+ {
2329
+ className: `${getMergedCellClassName(rowSpan)} ${tdAlignLeftKeys?.includes(headerKey) ? "text-left" : tdAlignRightKeys?.includes(headerKey) ? "text-right" : "text-center"} ${noWrapKeys?.includes(headerKey) ? "whitespace-nowrap" : ""}`,
2330
+ rowSpan: rowSpan > 1 ? rowSpan : void 0,
2331
+ children: value ? formatDateTime(String(value)) : "-"
2332
+ },
2333
+ `${rowIndex}-${colIndex}`
2334
+ );
2335
+ }
2336
+ if (import_react9.default.isValidElement(value)) {
2337
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2338
+ "td",
2339
+ {
2340
+ className: `${getMergedCellClassName(rowSpan)} ${tdAlignLeftKeys?.includes(headerKey) ? "text-left" : tdAlignRightKeys?.includes(headerKey) ? "text-right" : "text-center"} ${noWrapKeys?.includes(headerKey) ? "whitespace-nowrap" : ""}`,
2341
+ rowSpan: rowSpan > 1 ? rowSpan : void 0,
2342
+ children: value
2343
+ },
2344
+ `${rowIndex}-${colIndex}`
2345
+ );
2346
+ }
2347
+ let cellContent = value?.toString() || "";
2348
+ if (persentKeys?.includes(headerKey)) {
2349
+ cellContent = `${formatNumberWithComma(String(value))}%`;
2350
+ }
2351
+ if (typeof value === "object" && value !== null) {
2352
+ cellContent = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Stack_default, { direction: "row", gap: 8, align: "center", children: Object.entries(value).map(
2353
+ ([key, val], index) => {
2354
+ if (key === "image" && val) {
2355
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2356
+ "img",
2357
+ {
2358
+ src: String(val),
2359
+ alt: "\uC0C1\uD488 \uC774\uBBF8\uC9C0",
2360
+ className: "w-40 h-40 object-cover rounded border border-line"
2361
+ },
2362
+ `${key}-${index}`
2363
+ );
2364
+ }
2365
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2366
+ "span",
2367
+ {
2368
+ className: `${key === "name" || key === "title" ? "" : ""} `,
2369
+ children: val?.toString() || ""
2370
+ },
2371
+ `${key}-${index}`
2372
+ );
2373
+ }
2374
+ ) });
2375
+ }
2376
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2377
+ "td",
2378
+ {
2379
+ className: `${getMergedCellClassName(rowSpan)}
2380
+ ${linkKeys?.includes(headerKey) && "text-primary underline cursor-pointer"}
2381
+ ${tdAlignLeftKeys?.includes(headerKey) ? "text-left" : tdAlignRightKeys?.includes(headerKey) ? "text-right" : "text-center"}
2382
+ ${noWrapKeys?.includes(headerKey) ? "whitespace-nowrap" : ""}
2383
+ ${textBoldKeys?.includes(headerKey) ? "font-bold" : ""}
2384
+ `,
2385
+ rowSpan: rowSpan > 1 ? rowSpan : void 0,
2386
+ onClick: () => {
2387
+ if (!linkKeys?.includes(headerKey)) {
2388
+ return;
2389
+ }
2390
+ onLinkClick?.(data.id, String(value), headerKey);
2391
+ },
2392
+ children: cellContent
2393
+ },
2394
+ `${rowIndex}-${colIndex}`
2395
+ );
2396
+ };
2397
+ const renderTableBody = () => {
2398
+ if (sortedData.length === 0) {
2399
+ const colSpanCount = headersKeys.length + (isCheckboxOption ? 1 : 0) + (isRadioOption ? 1 : 0) + (isModify ? 1 : 0);
2400
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2401
+ "td",
2402
+ {
2403
+ colSpan: colSpanCount,
2404
+ className: "text-center border-b border-line px-20 py-8",
2405
+ children: emptyMessage
2406
+ }
2407
+ ) });
2408
+ }
2409
+ return sortedData.map((data, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2410
+ "tr",
2411
+ {
2412
+ className: `${mergeDuplicateKeys.length === 0 ? "hover:bg-gray1" : ""} ${isCheckboxOption && mergeDuplicateKeys.length === 0 && selectedIds.includes(String(data.id)) && "bg-primary5"}`,
2413
+ children: [
2414
+ isCheckboxOption && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "border-b border-line px-20 py-8 text-center w-30 ", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2415
+ Checkbox_default,
2416
+ {
2417
+ checked: selectedIds.includes(String(data.id)),
2418
+ disabled: disabledCheckboxCondition?.(data) || false,
2419
+ onChange: () => handleSelectItem(String(data.id))
2420
+ }
2421
+ ) }),
2422
+ isRadioOption && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "border-b border-line px-20 py-8 text-center w-50", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2423
+ Radio_default,
2424
+ {
2425
+ checked: selectedIds.includes(String(data.id)),
2426
+ onChange: () => handleSelectRadioItem(String(data.id))
2427
+ }
2428
+ ) }),
2429
+ isModify && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: "border-b border-line px-20 py-8 text-center w-60", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex justify-center gap-1", children: [
2430
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2431
+ "img",
2432
+ {
2433
+ src: ic_sort_arrow_up_default,
2434
+ alt: "\uC704\uB85C \uC774\uB3D9",
2435
+ className: `w-16 h-16 cursor-pointer ${rowIndex === 0 ? "opacity-30 cursor-not-allowed" : "hover:opacity-70"}`,
2436
+ onClick: () => {
2437
+ if (rowIndex > 0) {
2438
+ handleMoveUp(String(data.id));
2439
+ }
2440
+ }
2441
+ }
2442
+ ),
2443
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2444
+ "img",
2445
+ {
2446
+ src: ic_sort_arrow_down_default,
2447
+ alt: "\uC544\uB798\uB85C \uC774\uB3D9",
2448
+ className: `w-16 h-16 cursor-pointer ${rowIndex === sortedData.length - 1 ? "opacity-30 cursor-not-allowed" : "hover:opacity-70"}`,
2449
+ onClick: () => {
2450
+ if (rowIndex < sortedData.length - 1) {
2451
+ handleMoveDown(String(data.id));
2452
+ }
2453
+ }
2454
+ }
2455
+ )
2456
+ ] }) }),
2457
+ headersKeys.map((headerKey, colIndex) => {
2458
+ const cell = cellData(data, headerKey, rowIndex, colIndex);
2459
+ return cell;
2460
+ }).filter(Boolean)
2461
+ ]
2462
+ },
2463
+ data.id ? String(data.id) : rowIndex
2464
+ ));
2465
+ };
2466
+ (0, import_react8.useEffect)(() => {
2467
+ if (selectedIds.length > 0) {
2468
+ setSelectedIds([]);
2469
+ }
2470
+ }, [datas]);
2471
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: `${overWidth ? "overflow-x-auto" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2472
+ "table",
2473
+ {
2474
+ className: "border-collapse border-line border-t w-full table",
2475
+ style: {
2476
+ minWidth: overWidth ? toRemFunction2(overWidth) : "100%"
2477
+ },
2478
+ children: [
2479
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("tr", { children: [
2480
+ isCheckboxOption && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: "border-b border-line px-20 py-8 bg-gray1 text-center w-30 vertical-middle", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2481
+ Checkbox_default,
2482
+ {
2483
+ checked: isAllSelected,
2484
+ onChange: handleSelectAll
2485
+ }
2486
+ ) }),
2487
+ isRadioOption && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: "border-b border-line px-20 py-8 bg-gray1 text-center w-30", children: "\uC120\uD0DD" }),
2488
+ isModify && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: "border-b border-line px-20 py-8 bg-gray1 text-center w-60 whitespace-nowrap", children: "\uD3B8\uC9D1" }),
2489
+ columns.map((column, index) => {
2490
+ const title = column.header;
2491
+ const colSpan = column.colSpan;
2492
+ const headerKey = column.key;
2493
+ const isSortable = sortKeys.includes(headerKey);
2494
+ const isCurrentSort = sortState?.key === headerKey;
2495
+ const isImportantColor = importantColorKeys.includes(headerKey);
2496
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2497
+ "th",
2498
+ {
2499
+ colSpan,
2500
+ className: `border-b border-line px-20 py-7 bg-gray1 whitespace-nowrap text-body14 text-text font-medium ${thAlignLeftKeys?.includes(headerKey) ? "text-left" : thAlignRightKeys?.includes(headerKey) ? "text-right" : "text-center"} ${isSortable ? "cursor-pointer hover:bg-gray-200" : ""}
2501
+ ${isImportantColor ? "text-primary bg-primary10" : ""}
2502
+ ${column.thClassName || ""}`,
2503
+ onClick: () => isSortable && handleSort(headerKey),
2504
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
2505
+ typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: title }) : title,
2506
+ requiredKeys?.includes(headerKey) && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2507
+ "span",
2508
+ {
2509
+ className: "inline-block -mt-2",
2510
+ style: { verticalAlign: "top" },
2511
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(RequiredDot_default, {})
2512
+ }
2513
+ ),
2514
+ isSortable && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex flex-col inline-block ml-5 vertical-middle", children: [
2515
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2516
+ "img",
2517
+ {
2518
+ src: ic_sort_arrow_up_default,
2519
+ alt: "\uC624\uB984\uCC28\uC21C",
2520
+ className: `w-12 h-12 ${isCurrentSort && sortState.direction === "asc" ? "opacity-100" : "opacity-30"}`
2521
+ }
2522
+ ),
2523
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2524
+ "img",
2525
+ {
2526
+ src: ic_sort_arrow_down_default,
2527
+ alt: "\uB0B4\uB9BC\uCC28\uC21C",
2528
+ className: `w-12 h-12 ${isCurrentSort && sortState.direction === "desc" ? "opacity-100" : "opacity-30"}`
2529
+ }
2530
+ )
2531
+ ] })
2532
+ ] })
2533
+ },
2534
+ index
2535
+ );
2536
+ })
2537
+ ] }) }),
2538
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tbody", { children: renderTableBody() }),
2539
+ footers && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tfoot", { children: footers })
2540
+ ]
2541
+ }
2542
+ ) }) });
2543
+ }
2544
+ var Table_default = Table;
2545
+
2546
+ // src/constants/common.ts
2547
+ var LIST_PAGE_SIZE = 10;
2548
+
2549
+ // src/components/ui/Table/TableTop.tsx
2550
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2551
+ function TableTop({
2552
+ type = "search",
2553
+ count,
2554
+ pageSize = LIST_PAGE_SIZE,
2555
+ countText = "\uAC1C \uC0C1\uD488 \uC870\uD68C",
2556
+ leftButtons,
2557
+ rightButtons,
2558
+ registText = "\uC0C1\uD488 \uB4F1\uB85D",
2559
+ sortOptionValue,
2560
+ sortOptions,
2561
+ useDivider = true,
2562
+ isPageCount = true,
2563
+ useCountOption = true,
2564
+ deleteText = "\uC120\uD0DD \uC0AD\uC81C",
2565
+ onChangeSort,
2566
+ onChangePageSize,
2567
+ onDelete,
2568
+ onExcelDownload,
2569
+ onSelectExcelDownload,
2570
+ handleRegist
2571
+ }) {
2572
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Stack_default, { direction: "col", gap: 6, children: [
2573
+ (sortOptions || useCountOption || isPageCount) && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Stack_default, { direction: "row", gap: 10, justify: "between", align: "end", children: [
2574
+ isPageCount && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Stack_default, { direction: "row", gap: 10, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Text, { size: "body14", fontWeight: "bold", children: [
2575
+ "\uCD1D",
2576
+ "\xA0",
2577
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { size: "body14", fontWeight: "bold", color: "primary", children: count }),
2578
+ countText
2579
+ ] }) }),
2580
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Stack_default, { direction: "row", gap: 10, align: "center", children: [
2581
+ rightButtons,
2582
+ sortOptions && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2583
+ SelectBox_default,
2584
+ {
2585
+ value: sortOptionValue,
2586
+ options: sortOptions,
2587
+ customWidth: 160,
2588
+ onChange: (value) => {
2589
+ if (onChangeSort) {
2590
+ onChangeSort(value);
2591
+ }
2592
+ }
2593
+ }
2594
+ ),
2595
+ useCountOption && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2596
+ SelectBox_default,
2597
+ {
2598
+ value: pageSize,
2599
+ options: [
2600
+ { label: "10 \uAC74\uC529 \uBCF4\uAE30", value: 10 },
2601
+ { label: "20 \uAC74\uC529 \uBCF4\uAE30", value: 20 },
2602
+ { label: "30 \uAC74\uC529 \uBCF4\uAE30", value: 30 },
2603
+ { label: "50 \uAC74\uC529 \uBCF4\uAE30", value: 50 },
2604
+ { label: "100 \uAC74\uC529 \uBCF4\uAE30", value: 100 }
2605
+ ],
2606
+ customWidth: 160,
2607
+ onChange: (value) => {
2608
+ if (onChangePageSize) {
2609
+ onChangePageSize(value);
2610
+ }
2611
+ }
2612
+ }
2613
+ )
2614
+ ] })
2615
+ ] }),
2616
+ type === "search" && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
2617
+ useDivider && isPageCount && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Divider_default, {}),
2618
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Stack_default, { direction: "row", gap: 10, justify: "between", children: [
2619
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Stack_default, { direction: "row", gap: 4, children: leftButtons }),
2620
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Stack_default, { direction: "row", gap: 4, children: handleRegist && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2621
+ Button_default,
2622
+ {
2623
+ size: "medium",
2624
+ variant: "primary",
2625
+ onClick: () => {
2626
+ handleRegist?.();
2627
+ },
2628
+ children: registText
2629
+ }
2630
+ ) })
2631
+ ] })
2632
+ ] })
2633
+ ] });
2634
+ }
2635
+ var TableTop_default = TableTop;
2636
+
2637
+ // src/components/ui/Table/CommonTable.tsx
2638
+ var import_jsx_runtime24 = require("react/jsx-runtime");
2639
+ function CommonTable({ tableTop, tableBody, pagination }) {
2640
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Stack_default, { direction: "col", gap: 20, wFull: true, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Stack_default, { direction: "col", gap: 7, children: [
2641
+ tableTop && tableTop,
2642
+ tableBody && tableBody,
2643
+ pagination && pagination
2644
+ ] }) });
2645
+ }
2646
+ var CommonTable_default = CommonTable;
2647
+
2648
+ // src/components/ui/Tag/Tag.tsx
2649
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2650
+ function Tag({
2651
+ id,
2652
+ children,
2653
+ color = "text",
2654
+ bgColor,
2655
+ size = "body12",
2656
+ fontWeight: fontWeightProp = "bold",
2657
+ className = "",
2658
+ variant = "filled",
2659
+ style,
2660
+ ...props
2661
+ }) {
2662
+ const getVariantStyles = () => {
2663
+ if (variant === "outlined") {
2664
+ return {
2665
+ backgroundColor: colors.white,
2666
+ color: colors[color],
2667
+ border: `1px solid ${colors.line}`
2668
+ };
2669
+ }
2670
+ const bgColorKey = bgColor || `${color}Light`;
2671
+ return {
2672
+ backgroundColor: colors[bgColorKey] || colors[`${color}Light`] || colors.textLight,
2673
+ color: colors[color]
2674
+ };
2675
+ };
2676
+ const styles = {
2677
+ display: "inline-block",
2678
+ fontSize: fontSize[size],
2679
+ fontWeight: fontWeight[fontWeightProp],
2680
+ paddingLeft: "6px",
2681
+ paddingRight: "6px",
2682
+ height: "26px",
2683
+ borderRadius: "6px",
2684
+ touchAction: "none",
2685
+ lineHeight: "26px",
2686
+ whiteSpace: "nowrap",
2687
+ ...getVariantStyles(),
2688
+ ...style
2689
+ // 사용자 정의 style을 마지막에 배치하여 오버라이드 가능하게
2690
+ };
2691
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { id, style: styles, className, ...props, children });
2692
+ }
2693
+
2694
+ // src/components/ui/TagInput/TagInput.tsx
2695
+ var import_react10 = require("react");
2696
+ var import_core = require("@dnd-kit/core");
2697
+ var import_sortable = require("@dnd-kit/sortable");
2698
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2699
+ var SimpleTag = ({
2700
+ tag,
2701
+ index,
2702
+ onRemove,
2703
+ disabled
2704
+ }) => {
2705
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-center gap-8 bg-primary3 text-text text-body14 font-medium px-12 h-36 rounded-md border border-line leading-[36px]", children: [
2706
+ !disabled && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "cursor-pointer", onClick: () => onRemove(index), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ColorIcTagClose_default, { width: 10, height: 10, color: "text" }) }),
2707
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: tag })
2708
+ ] });
2709
+ };
2710
+ var SortableTag = ({
2711
+ tag,
2712
+ index,
2713
+ onRemove,
2714
+ disabled
2715
+ }) => {
2716
+ const {
2717
+ attributes,
2718
+ listeners,
2719
+ setNodeRef,
2720
+ transform,
2721
+ transition,
2722
+ isDragging
2723
+ } = (0, import_sortable.useSortable)({ id: tag });
2724
+ const style = {
2725
+ transform: transform ? `translate3d(${transform.x}px, ${transform.y}px, 0)` : void 0,
2726
+ transition,
2727
+ opacity: isDragging ? 0 : 1
2728
+ // 드래그 중인 원본 항목은 투명하게 처리
2729
+ };
2730
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2731
+ "div",
2732
+ {
2733
+ ref: setNodeRef,
2734
+ style,
2735
+ ...attributes,
2736
+ ...listeners,
2737
+ className: "flex items-center justify-center gap-8 bg-primary3 text-text text-body14 font-medium px-12 h-36 rounded-md touch-none border border-line leading-[36px]",
2738
+ children: [
2739
+ !disabled && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2740
+ "span",
2741
+ {
2742
+ onPointerDown: (e) => {
2743
+ e.stopPropagation();
2744
+ onRemove(index);
2745
+ },
2746
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ColorIcTagClose_default, { width: 10, height: 10, color: "text" })
2747
+ }
2748
+ ),
2749
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: tag })
2750
+ ]
2751
+ }
2752
+ );
2753
+ };
2754
+ var TagInput = (0, import_react10.forwardRef)(
2755
+ ({
2756
+ label,
2757
+ labelHidden,
2758
+ tags,
2759
+ onChange,
2760
+ placeholder = "\uC785\uB825 \uD6C4 Enter",
2761
+ disabled = false,
2762
+ className = "",
2763
+ id,
2764
+ required = false,
2765
+ error,
2766
+ tooltip,
2767
+ onlyView = true,
2768
+ draggable = true,
2769
+ // 기본값: 드래그 가능
2770
+ onDuplicateTag
2771
+ }, ref) => {
2772
+ const [inputValue, setInputValue] = (0, import_react10.useState)("");
2773
+ const [activeId, setActiveId] = (0, import_react10.useState)(null);
2774
+ const [draggedWidth, setDraggedWidth] = (0, import_react10.useState)(null);
2775
+ const activeTag = (0, import_react10.useMemo)(
2776
+ () => tags.find((tag) => tag === activeId),
2777
+ [activeId, tags]
2778
+ );
2779
+ const inputId = id || `tag-input-${Math.random().toString(36).substring(2, 9)}`;
2780
+ const sensors = (0, import_core.useSensors)(
2781
+ (0, import_core.useSensor)(import_core.PointerSensor),
2782
+ (0, import_core.useSensor)(import_core.KeyboardSensor, {
2783
+ coordinateGetter: import_sortable.sortableKeyboardCoordinates
2784
+ })
2785
+ );
2786
+ const handleInputChange = (e) => {
2787
+ setInputValue(e.target.value);
2788
+ };
2789
+ const handleKeyDown = (e) => {
2790
+ if (e.key === "Enter" && !e.nativeEvent.isComposing) {
2791
+ e.preventDefault();
2792
+ const newTag = inputValue.trim();
2793
+ if (newTag && !tags.includes(newTag)) {
2794
+ onChange([...tags, newTag]);
2795
+ setInputValue("");
2796
+ } else if (newTag && onDuplicateTag) {
2797
+ onDuplicateTag(newTag);
2798
+ }
2799
+ }
2800
+ };
2801
+ const removeTag = (indexToRemove) => {
2802
+ if (disabled) return;
2803
+ onChange(tags.filter((_, index) => index !== indexToRemove));
2804
+ };
2805
+ const handleDragStart = (event) => {
2806
+ setActiveId(event.active.id);
2807
+ if (event.active.rect.current.initial) {
2808
+ setDraggedWidth(event.active.rect.current.initial.width);
2809
+ }
2810
+ };
2811
+ const handleDragEnd = (event) => {
2812
+ const { active, over } = event;
2813
+ if (over && active.id !== over.id) {
2814
+ const oldIndex = tags.findIndex((tag) => tag === active.id);
2815
+ const newIndex = tags.findIndex((tag) => tag === over.id);
2816
+ onChange((0, import_sortable.arrayMove)(tags, oldIndex, newIndex));
2817
+ }
2818
+ setActiveId(null);
2819
+ setDraggedWidth(null);
2820
+ };
2821
+ const handleDragCancel = () => {
2822
+ setActiveId(null);
2823
+ setDraggedWidth(null);
2824
+ };
2825
+ if (!draggable) {
2826
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Stack_default, { direction: "col", gap: 4, className, wFull: true, children: [
2827
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2828
+ Label_default,
2829
+ {
2830
+ label,
2831
+ required,
2832
+ tooltip,
2833
+ inputId,
2834
+ labelHidden
2835
+ }
2836
+ ),
2837
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2838
+ "div",
2839
+ {
2840
+ className: `
2841
+ flex items-center flex-wrap gap-8 rounded-md
2842
+ min-h-36
2843
+ ${error ? "border-red" : "border-line"}
2844
+ ${disabled ? "bg-gray1" : "bg-white"}
2845
+ `,
2846
+ children: tags.map((tag, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2847
+ SimpleTag,
2848
+ {
2849
+ tag,
2850
+ index,
2851
+ onRemove: removeTag,
2852
+ disabled
2853
+ },
2854
+ tag
2855
+ ))
2856
+ }
2857
+ )
2858
+ ] });
2859
+ }
2860
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Stack_default, { direction: "col", gap: 4, className, wFull: true, children: [
2861
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2862
+ Label_default,
2863
+ {
2864
+ label,
2865
+ required,
2866
+ tooltip,
2867
+ inputId,
2868
+ labelHidden
2869
+ }
2870
+ ),
2871
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2872
+ import_core.DndContext,
2873
+ {
2874
+ sensors,
2875
+ collisionDetection: import_core.closestCenter,
2876
+ onDragStart: handleDragStart,
2877
+ onDragEnd: handleDragEnd,
2878
+ onDragCancel: handleDragCancel,
2879
+ measuring: {
2880
+ droppable: {
2881
+ strategy: import_core.MeasuringStrategy.Always
2882
+ }
2883
+ },
2884
+ children: [
2885
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_sortable.SortableContext, { items: tags, strategy: import_sortable.rectSortingStrategy, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2886
+ "div",
2887
+ {
2888
+ className: `
2889
+ flex items-center flex-wrap gap-8 rounded-md
2890
+ min-h-36
2891
+ ${error ? "border-red" : "border-line"}
2892
+ ${disabled ? "bg-gray1" : "bg-white"}
2893
+ `,
2894
+ children: [
2895
+ tags.map((tag, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2896
+ SortableTag,
2897
+ {
2898
+ tag,
2899
+ index,
2900
+ onRemove: removeTag,
2901
+ disabled
2902
+ },
2903
+ tag
2904
+ )),
2905
+ !onlyView && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2906
+ "input",
2907
+ {
2908
+ ref,
2909
+ id: inputId,
2910
+ type: "text",
2911
+ value: inputValue,
2912
+ onChange: handleInputChange,
2913
+ onKeyDown: handleKeyDown,
2914
+ placeholder: tags.length === 0 ? placeholder : "",
2915
+ disabled,
2916
+ className: " text-text text-body14 font-medium px-12 h-36 rounded-md text-text "
2917
+ }
2918
+ )
2919
+ ]
2920
+ }
2921
+ ) }),
2922
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_core.DragOverlay, { dropAnimation: null, adjustScale: false, children: activeTag ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2923
+ "div",
2924
+ {
2925
+ className: "flex items-center justify-center gap-8 bg-primary3 text-text text-body14 font-medium px-12 h-36 rounded-md border border-line leading-[36px] shadow-lg",
2926
+ style: {
2927
+ width: draggedWidth ? `${draggedWidth}px` : "auto"
2928
+ },
2929
+ children: [
2930
+ !disabled && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ColorIcTagClose_default, { width: 10, height: 10, color: "text" }) }),
2931
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: activeTag })
2932
+ ]
2933
+ }
2934
+ ) : null })
2935
+ ]
2936
+ }
2937
+ )
2938
+ ] });
2939
+ }
2940
+ );
2941
+ TagInput.displayName = "TagInput";
2942
+ var TagInput_default = TagInput;
2943
+
2944
+ // src/components/ui/TextArea/TextArea.tsx
2945
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2946
+ var TextArea = ({
2947
+ label,
2948
+ labelHidden,
2949
+ labelWidth,
2950
+ error,
2951
+ fullWidth = false,
2952
+ required = false,
2953
+ direction = "row",
2954
+ id,
2955
+ className = "",
2956
+ rows = 5,
2957
+ areaHeight = 80,
2958
+ maxLength,
2959
+ ...props
2960
+ }) => {
2961
+ const textareaId = id || `textarea-${Math.random().toString(36).substring(2, 9)}`;
2962
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2963
+ Stack_default,
2964
+ {
2965
+ direction,
2966
+ wFull: fullWidth,
2967
+ gap: direction === "row" ? 14 : 4,
2968
+ align: direction === "row" ? "center" : "start",
2969
+ children: [
2970
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2971
+ Label_default,
2972
+ {
2973
+ label,
2974
+ required,
2975
+ width: labelWidth,
2976
+ labelHidden
2977
+ }
2978
+ ),
2979
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2980
+ Stack_default,
2981
+ {
2982
+ gap: 0,
2983
+ className: "flex-auto relative",
2984
+ wFull: direction === "row" ? false : fullWidth,
2985
+ children: [
2986
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2987
+ "textarea",
2988
+ {
2989
+ id: textareaId,
2990
+ rows,
2991
+ className: `
2992
+ px-12 py-10 border rounded-md w-full
2993
+ ${error ? "border-red" : "border-line"}
2994
+ focus:border-primary
2995
+ resize-vertical
2996
+ ${className}
2997
+ `,
2998
+ style: { height: `${toRemFunction2(areaHeight)}` },
2999
+ ...props,
3000
+ maxLength
3001
+ }
3002
+ ),
3003
+ maxLength && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { color: "primaryText", justify: "end", children: [
3004
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: "red", children: props.value?.toString().length || 0 }),
3005
+ "/",
3006
+ maxLength
3007
+ ] })
3008
+ ]
3009
+ }
3010
+ )
3011
+ ]
3012
+ }
3013
+ );
3014
+ };
3015
+ var TextArea_default = TextArea;
3016
+
3017
+ // src/components/ui/TextButton/TextButton.tsx
3018
+ var import_jsx_runtime28 = require("react/jsx-runtime");
3019
+ function TextButton({
3020
+ text,
3021
+ isOpen = false,
3022
+ onClick,
3023
+ color = "primaryText",
3024
+ type = "arrow",
3025
+ size = "body14"
3026
+ }) {
3027
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
3028
+ Stack_default,
3029
+ {
3030
+ direction: "row",
3031
+ align: "center",
3032
+ justify: "center",
3033
+ onClick,
3034
+ className: "cursor-pointer",
3035
+ children: [
3036
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3037
+ Text,
3038
+ {
3039
+ size,
3040
+ fontWeight: "bold",
3041
+ color,
3042
+ textDecoration: type === "underline" ? "underline" : "none",
3043
+ className: "leading-none",
3044
+ children: text
3045
+ }
3046
+ ),
3047
+ type === "arrow" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ColorIcArrow_default, { isOpen, color })
3048
+ ]
3049
+ }
3050
+ );
3051
+ }
3052
+ var TextButton_default = TextButton;
3053
+
3054
+ // src/components/ui/Toggle/Toggle.tsx
3055
+ var import_react11 = require("react");
3056
+ var import_jsx_runtime29 = require("react/jsx-runtime");
3057
+ var Toggle = (0, import_react11.forwardRef)(
3058
+ ({
3059
+ checked = false,
3060
+ onChange,
3061
+ label,
3062
+ disabled = false,
3063
+ size = "medium",
3064
+ textToggleSize = 76,
3065
+ className = "",
3066
+ id,
3067
+ required = false,
3068
+ error,
3069
+ tooltip,
3070
+ onText,
3071
+ offText,
3072
+ labelWidth,
3073
+ isDot = false
3074
+ }, ref) => {
3075
+ const toggleId = id || `toggle-${Math.random().toString(36).substring(2, 9)}`;
3076
+ const onRef = (0, import_react11.useRef)(null);
3077
+ const offRef = (0, import_react11.useRef)(null);
3078
+ const [sliderStyle, setSliderStyle] = (0, import_react11.useState)({});
3079
+ const handleToggle = () => {
3080
+ if (!disabled && onChange) {
3081
+ onChange(!checked);
3082
+ }
3083
+ };
3084
+ const handleKeyDown = (e) => {
3085
+ if (disabled) return;
3086
+ if (e.key === "Enter" || e.key === " ") {
3087
+ e.preventDefault();
3088
+ handleToggle();
3089
+ }
3090
+ };
3091
+ (0, import_react11.useEffect)(() => {
3092
+ if (!onText || !offText) return;
3093
+ const targetRef = checked ? onRef : offRef;
3094
+ if (targetRef.current) {
3095
+ setSliderStyle({
3096
+ width: targetRef.current.offsetWidth,
3097
+ transform: `translateX(${targetRef.current.offsetLeft - 4}px)`
3098
+ });
3099
+ }
3100
+ }, [checked, onText, offText]);
3101
+ if (onText && offText) {
3102
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Stack_default, { direction: "row", align: "center", gap: 14, className, children: [
3103
+ label && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3104
+ Label_default,
3105
+ {
3106
+ label,
3107
+ width: labelWidth,
3108
+ required,
3109
+ tooltip,
3110
+ isDot
3111
+ }
3112
+ ),
3113
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Stack_default, { direction: "col", gap: 4, className: "flex-auto", children: [
3114
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3115
+ "button",
3116
+ {
3117
+ ref,
3118
+ id: toggleId,
3119
+ type: "button",
3120
+ role: "switch",
3121
+ "aria-checked": checked,
3122
+ disabled,
3123
+ onClick: handleToggle,
3124
+ onKeyDown: handleKeyDown,
3125
+ className: `
3126
+ relative flex items-center rounded-full h-36 p-4
3127
+ bg-gray1 border border-line
3128
+ w-fit
3129
+ ${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"}
3130
+ `,
3131
+ children: [
3132
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3133
+ "div",
3134
+ {
3135
+ className: "absolute h-[calc(100%-6px)] top-[3px] bg-primary rounded-full transition-all duration-300 ease-in-out",
3136
+ style: sliderStyle
3137
+ }
3138
+ ),
3139
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3140
+ "span",
3141
+ {
3142
+ ref: onRef,
3143
+ className: `relative text-center leading-none text-body14 ${checked ? "text-white font-bold" : "font-semibold text-text"}`,
3144
+ style: { width: `${toRemFunction2(textToggleSize)}` },
3145
+ children: onText
3146
+ }
3147
+ ),
3148
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3149
+ "span",
3150
+ {
3151
+ ref: offRef,
3152
+ className: `relative text-body14 leading-none ${!checked ? "text-white font-bold" : "font-semibold text-text"}`,
3153
+ style: { width: `${toRemFunction2(textToggleSize)}` },
3154
+ children: offText
3155
+ }
3156
+ )
3157
+ ]
3158
+ }
3159
+ ),
3160
+ error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-red text-body12", children: error })
3161
+ ] })
3162
+ ] });
3163
+ }
3164
+ const getSizeClasses = () => {
3165
+ switch (size) {
3166
+ case "small":
3167
+ return "w-32 h-18";
3168
+ case "large":
3169
+ return "w-56 h-32";
3170
+ default:
3171
+ return "w-44 h-24";
3172
+ }
3173
+ };
3174
+ const getSliderSizeClasses = () => {
3175
+ switch (size) {
3176
+ case "small":
3177
+ return "w-14 h-14";
3178
+ case "large":
3179
+ return "w-28 h-28";
3180
+ default:
3181
+ return "w-20 h-20";
3182
+ }
3183
+ };
3184
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Stack_default, { direction: "row", gap: 10, align: "center", className, children: [
3185
+ label && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Label_default, { label, required, tooltip }),
3186
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Stack_default, { direction: "col", gap: 4, className: "flex-auto", children: [
3187
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3188
+ "button",
3189
+ {
3190
+ ref,
3191
+ id: toggleId,
3192
+ type: "button",
3193
+ role: "switch",
3194
+ "aria-checked": checked,
3195
+ "aria-labelledby": label ? `${toggleId}-label` : void 0,
3196
+ disabled,
3197
+ onClick: handleToggle,
3198
+ onKeyDown: handleKeyDown,
3199
+ className: `
3200
+ relative inline-flex items-center rounded-full transition-colors duration-200 ease-in-out
3201
+ focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2
3202
+ ${getSizeClasses()}
3203
+ ${checked ? "bg-primary" : "bg-gray3 "}
3204
+ ${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer hover:opacity-80"}
3205
+ `,
3206
+ tabIndex: disabled ? -1 : 0,
3207
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3208
+ "span",
3209
+ {
3210
+ className: `
3211
+ inline-block rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out
3212
+ ${getSliderSizeClasses()}
3213
+ ${checked ? "translate-x-22" : "translate-x-2"}
3214
+ ${size === "large" ? "translate-x-8" : ""}
3215
+ ${size === "small" ? "translate-x-4" : ""}
3216
+ `
3217
+ }
3218
+ )
3219
+ }
3220
+ ),
3221
+ error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-red text-body12", children: error })
3222
+ ] })
3223
+ ] });
3224
+ }
3225
+ );
3226
+ Toggle.displayName = "Toggle";
3227
+ var Toggle_default = Toggle;
3228
+
3229
+ // src/components/ui/ToolTipBox/ToolTipBox.tsx
3230
+ var import_react12 = require("react");
3231
+
3232
+ // src/assets/colorIcon/ColorIcTooltipArrow.tsx
3233
+ var import_jsx_runtime30 = require("react/jsx-runtime");
3234
+ function ColorIcTooltipArrow({
3235
+ width = 14,
3236
+ height = 14,
3237
+ color = "primary"
3238
+ }) {
3239
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3240
+ "svg",
3241
+ {
3242
+ width,
3243
+ height,
3244
+ viewBox: "0 0 14 14",
3245
+ fill: "none",
3246
+ xmlns: "http://www.w3.org/2000/svg",
3247
+ style: { color: `var(--color-${color})` },
3248
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3249
+ "path",
3250
+ {
3251
+ d: "M12.0309 9.9748C11.8996 9.9748 11.7902 9.93106 11.6809 9.84356L6.99961 5.22793L2.31836 9.82168C2.12148 10.0186 1.81523 10.0186 1.61836 9.82168C1.42148 9.62481 1.42148 9.31856 1.61836 9.12168L6.64961 4.17793C6.84648 3.98105 7.15273 3.98105 7.34961 4.17793L12.3809 9.12168C12.5777 9.31856 12.5777 9.62481 12.3809 9.82168C12.2934 9.90918 12.1621 9.9748 12.0309 9.9748Z",
3252
+ fill: "currentColor"
3253
+ }
3254
+ )
3255
+ }
3256
+ );
3257
+ }
3258
+ var ColorIcTooltipArrow_default = ColorIcTooltipArrow;
3259
+
3260
+ // src/assets/colorIcon/ColorIcTooltipBlue.tsx
3261
+ var import_jsx_runtime31 = require("react/jsx-runtime");
3262
+ function ColorIcTooltipBlue({
3263
+ width = 16,
3264
+ height = 16,
3265
+ color = "primary"
3266
+ }) {
3267
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
3268
+ "svg",
3269
+ {
3270
+ width,
3271
+ height,
3272
+ viewBox: "0 0 16 16",
3273
+ fill: "none",
3274
+ xmlns: "http://www.w3.org/2000/svg",
3275
+ style: { color: `var(--color-${color})` },
3276
+ children: [
3277
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("g", { clipPath: "url(#clip0_175_11783)", children: [
3278
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3279
+ "path",
3280
+ {
3281
+ d: "M7.9744 4.87305H7.95015C7.65924 4.87305 7.39258 5.11547 7.39258 5.43062C7.39258 5.74577 7.635 5.9882 7.95015 5.9882H7.9744C8.26531 5.9882 8.53197 5.74577 8.53197 5.43062C8.53197 5.11547 8.28955 4.87305 7.9744 4.87305Z",
3282
+ fill: "currentColor"
3283
+ }
3284
+ ),
3285
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3286
+ "path",
3287
+ {
3288
+ d: "M7.97554 6.78809C7.68464 6.78809 7.41797 7.03051 7.41797 7.34566V11.079C7.41797 11.3699 7.66039 11.6366 7.97554 11.6366C8.26645 11.6366 8.53312 11.3941 8.53312 11.079V7.32142C8.53312 7.03051 8.2907 6.78809 7.97554 6.78809Z",
3289
+ fill: "currentColor"
3290
+ }
3291
+ ),
3292
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3293
+ "path",
3294
+ {
3295
+ d: "M7.97631 0.678711C3.92783 0.678711 0.630859 3.95144 0.630859 7.99992C0.630859 12.0484 3.92783 15.3454 7.97631 15.3454C12.0248 15.3454 15.2975 12.0484 15.2975 7.99992C15.2975 3.95144 12.0248 0.678711 7.97631 0.678711ZM7.97631 14.2545C4.53389 14.2545 1.72177 11.4423 1.72177 7.99992C1.72177 4.5575 4.53389 1.74538 7.97631 1.74538C11.4187 1.74538 14.2066 4.5575 14.2066 7.99992C14.2066 11.4423 11.4187 14.2545 7.97631 14.2545Z",
3296
+ fill: "currentColor"
3297
+ }
3298
+ )
3299
+ ] }),
3300
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("clipPath", { id: "clip0_175_11783", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
3301
+ ]
3302
+ }
3303
+ );
3304
+ }
3305
+ var ColorIcTooltipBlue_default = ColorIcTooltipBlue;
3306
+
3307
+ // src/components/ui/ToolTipBox/ToolTipBox.tsx
3308
+ var import_jsx_runtime32 = require("react/jsx-runtime");
3309
+ function ToolTipBox({ title, children }) {
3310
+ const [isOpen, setIsOpen] = (0, import_react12.useState)(false);
3311
+ const contentRef = (0, import_react12.useRef)(null);
3312
+ const [contentHeight, setContentHeight] = (0, import_react12.useState)(0);
3313
+ (0, import_react12.useEffect)(() => {
3314
+ if (contentRef.current) {
3315
+ setContentHeight(contentRef.current.scrollHeight);
3316
+ }
3317
+ }, [children]);
3318
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3319
+ BorderRadiusBox_default,
3320
+ {
3321
+ borderColor: "primary3Border",
3322
+ bgColor: "primary3",
3323
+ paddingX: 20,
3324
+ paddingY: 12,
3325
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Stack_default, { direction: "col", children: [
3326
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
3327
+ Stack_default,
3328
+ {
3329
+ direction: "row",
3330
+ gap: 3,
3331
+ align: "center",
3332
+ justify: "between",
3333
+ onClick: () => {
3334
+ setIsOpen(!isOpen);
3335
+ },
3336
+ className: "cursor-pointer",
3337
+ children: [
3338
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Stack_default, { direction: "row", gap: 3, align: "center", children: [
3339
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ColorIcTooltipBlue_default, { width: 14, height: 14 }),
3340
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { size: "body14", fontWeight: "bold", color: "primary", children: title })
3341
+ ] }),
3342
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: `w-16 h-16 cursor-pointer transition-transform duration-300 ${isOpen ? "" : "rotate-180"}`, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ColorIcTooltipArrow_default, { width: 14, height: 14, color: "primary" }) })
3343
+ ]
3344
+ }
3345
+ ),
3346
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3347
+ "div",
3348
+ {
3349
+ className: "overflow-hidden transition-all duration-300 ease-in-out",
3350
+ style: {
3351
+ height: isOpen ? `${contentHeight}px` : "0px",
3352
+ opacity: isOpen ? 1 : 0
3353
+ },
3354
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { ref: contentRef, className: "grid grid-cols-2 gap-2 mt-4", children: children.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3355
+ BulletText_default,
3356
+ {
3357
+ label: child,
3358
+ textColor: "primary",
3359
+ textSize: "body12",
3360
+ fontWeight: "regular",
3361
+ bulletColor: "dark6"
3362
+ },
3363
+ index
3364
+ )) })
3365
+ }
3366
+ )
3367
+ ] })
3368
+ }
3369
+ );
3370
+ }
3371
+ var ToolTipBox_default = ToolTipBox;
3372
+
3373
+ // src/components/ui/TooltipInfo/TooltipInfo.tsx
3374
+ var import_jsx_runtime33 = require("react/jsx-runtime");
3375
+ function TooltipInfo({ title, children }) {
3376
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3377
+ BorderRadiusBox_default,
3378
+ {
3379
+ radius: 6,
3380
+ paddingX: 0,
3381
+ paddingY: 0,
3382
+ className: " border-none overflow-hidden",
3383
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { backgroundColor: "#4B5563E5" }, className: "px-12 py-10", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Stack_default, { gap: 5, direction: "col", children: [
3384
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3385
+ Text,
3386
+ {
3387
+ size: "body14",
3388
+ fontWeight: "bold",
3389
+ color: "white",
3390
+ className: "whitespace-nowrap",
3391
+ style: {
3392
+ lineHeight: "1.4"
3393
+ },
3394
+ children: title
3395
+ }
3396
+ ),
3397
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Stack_default, { gap: 2, direction: "col", children: children.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3398
+ "div",
3399
+ {
3400
+ className: `whitespace-nowrap flex items-baseline flex-none relative w-full`,
3401
+ children: [
3402
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3403
+ "span",
3404
+ {
3405
+ className: "inline-block w-3 h-3 bg-dark6 mr-4 ",
3406
+ style: {
3407
+ verticalAlign: "top",
3408
+ position: "relative",
3409
+ top: "-2px"
3410
+ }
3411
+ }
3412
+ ),
3413
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3414
+ Text,
3415
+ {
3416
+ size: "body12",
3417
+ color: "white",
3418
+ fontWeight: "regular",
3419
+ style: {
3420
+ lineHeight: "1.4"
3421
+ },
3422
+ children: child
3423
+ },
3424
+ "tooltipInfoText" + index
3425
+ )
3426
+ ]
3427
+ },
3428
+ "tooltipInfo" + index
3429
+ )) })
3430
+ ] }) })
3431
+ },
3432
+ "tooltipInfo"
3433
+ );
3434
+ }
3435
+ var TooltipInfo_default = TooltipInfo;
3436
+
3437
+ // src/assets/colorIcon/ColorIcInfo.tsx
3438
+ var import_jsx_runtime34 = require("react/jsx-runtime");
3439
+ function ColorIcInfo({
3440
+ width = 12,
3441
+ height = 12,
3442
+ color = "gray"
3443
+ }) {
3444
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3445
+ "span",
3446
+ {
3447
+ style: {
3448
+ color: `var(--color-${color})`,
3449
+ display: "inline-flex",
3450
+ alignItems: "center",
3451
+ justifyContent: "center"
3452
+ },
3453
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
3454
+ "svg",
3455
+ {
3456
+ width,
3457
+ height,
3458
+ viewBox: "0 0 12 12",
3459
+ fill: "none",
3460
+ xmlns: "http://www.w3.org/2000/svg",
3461
+ children: [
3462
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("rect", { width: "12", height: "12", rx: "6", fill: "currentColor" }),
3463
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("g", { clipPath: "url(#clip0_603_10414)", children: [
3464
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3465
+ "path",
3466
+ {
3467
+ d: "M6.81978 8.68161H6.09194V4.57706C6.09194 4.24297 5.81751 3.98047 5.49535 3.98047H4.82717C4.68398 3.98047 4.55273 4.09979 4.55273 4.2549C4.55273 4.41001 4.67205 4.52933 4.82717 4.52933H5.49535C5.53114 4.52933 5.55501 4.5532 5.55501 4.58899V8.68161H4.82717C4.68398 8.68161 4.55273 8.80092 4.55273 8.95604C4.55273 9.11115 4.67205 9.23047 4.82717 9.23047H6.83171C6.97489 9.23047 7.10614 9.11115 7.10614 8.95604C7.10614 8.80092 6.96296 8.68161 6.81978 8.68161Z",
3468
+ fill: "white"
3469
+ }
3470
+ ),
3471
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3472
+ "path",
3473
+ {
3474
+ d: "M5.75835 3.3956C5.95604 3.3956 6.1163 3.23533 6.1163 3.03764C6.1163 2.83995 5.95604 2.67969 5.75835 2.67969C5.56065 2.67969 5.40039 2.83995 5.40039 3.03764C5.40039 3.23533 5.56065 3.3956 5.75835 3.3956Z",
3475
+ fill: "white"
3476
+ }
3477
+ )
3478
+ ] }),
3479
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("clipPath", { id: "clip0_603_10414", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3480
+ "rect",
3481
+ {
3482
+ width: "7.63636",
3483
+ height: "7.63636",
3484
+ fill: "white",
3485
+ transform: "translate(2 2)"
3486
+ }
3487
+ ) }) })
3488
+ ]
3489
+ }
3490
+ )
3491
+ }
3492
+ );
3493
+ }
3494
+ var ColorIcInfo_default = ColorIcInfo;
3495
+
3496
+ // src/assets/colorIcon/ColorIcWarning.tsx
3497
+ var import_jsx_runtime35 = require("react/jsx-runtime");
3498
+ function ColorIcWarning({
3499
+ width = 16,
3500
+ height = 16,
3501
+ color = "warning"
3502
+ }) {
3503
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3504
+ "span",
3505
+ {
3506
+ style: {
3507
+ color: `var(--color-${color})`,
3508
+ display: "inline-flex",
3509
+ alignItems: "center",
3510
+ justifyContent: "center"
3511
+ },
3512
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3513
+ "svg",
3514
+ {
3515
+ width,
3516
+ height,
3517
+ viewBox: "0 0 16 16",
3518
+ fill: "none",
3519
+ xmlns: "http://www.w3.org/2000/svg",
3520
+ children: [
3521
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("rect", { width: "16", height: "16", rx: "8", fill: "currentColor" }),
3522
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3523
+ "path",
3524
+ {
3525
+ d: "M12.5343 9.47947L9.1297 4.00144C8.85925 3.63553 8.44561 3.42871 8.00016 3.42871C7.53879 3.42871 7.12516 3.63553 6.87061 4.00144L3.46607 9.47947C3.14789 9.90901 3.10016 10.4658 3.3388 10.9431C3.57743 11.4204 4.0547 11.7227 4.59561 11.7227H11.4047C11.9456 11.7227 12.4229 11.4204 12.6615 10.9431C12.9002 10.4817 12.8524 9.90901 12.5343 9.47947ZM12.0252 10.6249C11.8979 10.8636 11.6752 11.0067 11.4047 11.0067H4.59561C4.32516 11.0067 4.10243 10.8636 3.97516 10.6249C3.8638 10.3863 3.8797 10.1158 4.0388 9.90901L7.44334 4.43098C7.57061 4.25598 7.77743 4.14462 8.00016 4.14462C8.22289 4.14462 8.4297 4.24007 8.55698 4.43098L11.9615 9.90901C12.1206 10.1158 12.1365 10.3863 12.0252 10.6249Z",
3526
+ fill: "white"
3527
+ }
3528
+ ),
3529
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3530
+ "path",
3531
+ {
3532
+ d: "M8.00067 6.3877C7.80977 6.3877 7.63477 6.54679 7.63477 6.7536V8.4877C7.63477 8.6786 7.79386 8.8536 8.00067 8.8536C8.20749 8.8536 8.36658 8.69451 8.36658 8.4877V6.7377C8.36658 6.54679 8.19158 6.3877 8.00067 6.3877Z",
3533
+ fill: "white"
3534
+ }
3535
+ ),
3536
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3537
+ "path",
3538
+ {
3539
+ d: "M8.00067 9.27246C7.80977 9.27246 7.63477 9.43155 7.63477 9.63837V9.71792C7.63477 9.90882 7.79386 10.0838 8.00067 10.0838C8.20749 10.0838 8.36658 9.92473 8.36658 9.71792V9.62246C8.36658 9.43155 8.19158 9.27246 8.00067 9.27246Z",
3540
+ fill: "white"
3541
+ }
3542
+ )
3543
+ ]
3544
+ }
3545
+ )
3546
+ }
3547
+ );
3548
+ }
3549
+ var ColorIcWarning_default = ColorIcWarning;
3550
+
3551
+ // src/components/ui/WarningBox/WarningBox.tsx
3552
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3553
+ var WarningBox = ({
3554
+ children,
3555
+ color = "warning"
3556
+ }) => {
3557
+ const colorClass = `bg-${color}Light text-${color} `;
3558
+ const iconSize = color === "text" ? 14 : 16;
3559
+ const icon = color === "text" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ColorIcInfo_default, { width: iconSize, height: iconSize }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ColorIcWarning_default, { width: iconSize, height: iconSize });
3560
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3561
+ "div",
3562
+ {
3563
+ className: `opacity-80 relative ${colorClass} rounded-sm pl-2 before:content-[''] before:absolute before:left-0 before:top-0 before:bottom-0 before:w-[50px] ${color === "text" ? "before:bg-text" : "before:bg-warning"} before:rounded-tl-warnOut before:rounded-bl-warnOut `,
3564
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3565
+ "div",
3566
+ {
3567
+ className: `relative ${colorClass} inline-block text-body12 font-bold px-12 py-8 rounded-warn touch-none`,
3568
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Stack_default, { direction: "row", align: "start", gap: 4, children: [
3569
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: `${color === "text" ? "mt-4" : "mt-3"}`, children: icon }),
3570
+ children
3571
+ ] })
3572
+ }
3573
+ )
3574
+ }
3575
+ );
3576
+ };
3577
+ var WarningBox_default = WarningBox;
192
3578
  // Annotate the CommonJS export names for ESM import in node:
193
3579
  0 && (module.exports = {
3580
+ BorderRadiusBox,
3581
+ BulletText,
3582
+ Button,
3583
+ Checkbox,
3584
+ CommonTable,
3585
+ Divider,
3586
+ EmailInput,
3587
+ Input,
3588
+ Label,
3589
+ MultiSelectCheckbox,
3590
+ Paging,
3591
+ Radio,
3592
+ RequiredDot,
3593
+ SelectBox,
3594
+ Stack,
3595
+ Table,
3596
+ TableTop,
3597
+ Tag,
3598
+ TagInput,
194
3599
  Text,
3600
+ TextArea,
3601
+ TextButton,
3602
+ Toggle,
3603
+ ToolTipBox,
3604
+ Tooltip,
3605
+ TooltipInfo,
3606
+ WarningBox,
195
3607
  alignSelfs,
196
3608
  aligns,
197
3609
  colors,