@pop-ui/core 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/core.css +1 -1
- package/dist/core.js +327 -310
- package/dist/core.umd.cjs +11 -11
- package/dist/types/index.d.ts +20 -20
- package/package.json +2 -2
package/dist/core.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsxs as x, jsx as l, Fragment as Xe } from "react/jsx-runtime";
|
|
3
3
|
import { Button as Pt, Loader as qe, Checkbox as Mt, Popover as xe, Input as J, Tooltip as ye, Select as bt, Modal as St, Stack as Tt, Group as wt, Radio as It, Autocomplete as Lt, SegmentedControl as Bt, Tabs as ce, Textarea as vt, ActionIcon as Et, Switch as At, createTheme as Nt, MantineProvider as Ft } from "@mantine/core";
|
|
4
4
|
import { DatePicker as $t, DateTimePicker as Rt, TimeInput as Ot } from "@mantine/dates";
|
|
5
|
-
import { IconChevronRight as Qe, IconChevronLeft as et, parseDateValue as Re, formatDateDisplay as zt, IconCalendar as Ht, toValueString as Yt, IconInfoCircle as Ee, ColorBlack as Wt, ColorGray100 as Zt, IconChevronUp as jt, IconChevronDown as Ut,
|
|
5
|
+
import { IconChevronRight as Qe, IconChevronLeft as et, parseDateValue as Re, formatDateDisplay as zt, IconCalendar as Ht, toValueString as Yt, IconInfoCircle as Ee, ColorBlack as Wt, ColorGray100 as Zt, IconChevronUp as jt, IconChevronDown as Ut, IconX as Ae, ColorGray600 as tt, ColorGray900 as Vt, ColorWhite as Oe, IconXCircle as Gt, ColorAqua500 as ue, IconDragMenu as Kt, IconPhoto as me, ColorRed700 as pe, ColorAqua700 as fe, IconSearch as Jt, BorderRadius150 as Xt, IconClock as qt, colors as rt, getCSSVariableName as Qt, getCSSVariableRef as ee, IconMap as er, ColorGray800 as tr, IconMapMarker as rr } from "@pop-ui/foundation";
|
|
6
6
|
import H from "dayjs";
|
|
7
7
|
import "dayjs/locale/ko.js";
|
|
8
8
|
import { useState as L, useMemo as Ne, useCallback as Y, useRef as oe, useEffect as X, createContext as Fe, useContext as $e } from "react";
|
|
@@ -76,10 +76,10 @@ function he({
|
|
|
76
76
|
disabled: i = !1,
|
|
77
77
|
className: c,
|
|
78
78
|
classNames: p,
|
|
79
|
-
loaderProps:
|
|
79
|
+
loaderProps: m,
|
|
80
80
|
..._
|
|
81
81
|
}) {
|
|
82
|
-
const
|
|
82
|
+
const u = ur[r], d = o || s, f = i || d;
|
|
83
83
|
return /* @__PURE__ */ x(
|
|
84
84
|
Pt,
|
|
85
85
|
{
|
|
@@ -96,7 +96,7 @@ function he({
|
|
|
96
96
|
disabled: f,
|
|
97
97
|
..._,
|
|
98
98
|
children: [
|
|
99
|
-
d && /* @__PURE__ */ l(qe, { color: "currentColor", size:
|
|
99
|
+
d && /* @__PURE__ */ l(qe, { color: "currentColor", size: u, ...m }),
|
|
100
100
|
/* @__PURE__ */ l("span", { className: j.Button__Label, children: d && a ? null : e })
|
|
101
101
|
]
|
|
102
102
|
}
|
|
@@ -114,7 +114,7 @@ const Me = {
|
|
|
114
114
|
sm: 18,
|
|
115
115
|
md: 24,
|
|
116
116
|
lg: 32
|
|
117
|
-
},
|
|
117
|
+
}, fa = ({ size: e = "md", ...r }) => {
|
|
118
118
|
const n = Pr[e], t = Mr[e];
|
|
119
119
|
return /* @__PURE__ */ l(
|
|
120
120
|
Mt,
|
|
@@ -205,7 +205,7 @@ const Me = {
|
|
|
205
205
|
const n = (t, o) => {
|
|
206
206
|
const s = Object.keys(t).reduce(
|
|
207
207
|
(a, i) => {
|
|
208
|
-
const c = i, p = t[c],
|
|
208
|
+
const c = i, p = t[c], m = o[c], _ = [p, m].filter(Boolean).join(" ");
|
|
209
209
|
return _ && (a[c] = _), a;
|
|
210
210
|
},
|
|
211
211
|
{}
|
|
@@ -249,7 +249,7 @@ const Me = {
|
|
|
249
249
|
highlightToday: s = !1,
|
|
250
250
|
...a
|
|
251
251
|
}) => {
|
|
252
|
-
const { classNames: i, date: c, defaultDate: p, onDateChange:
|
|
252
|
+
const { classNames: i, date: c, defaultDate: p, onDateChange: m, getDayProps: _, ...u } = a, [d, f] = L(
|
|
253
253
|
() => t ?? ne(n)
|
|
254
254
|
), [h, y] = L(() => c || p || (Hr(t ?? ne(n)) ?? /* @__PURE__ */ new Date())), g = Ne(
|
|
255
255
|
() => Or({
|
|
@@ -259,9 +259,9 @@ const Me = {
|
|
|
259
259
|
[r, e]
|
|
260
260
|
), k = Y(
|
|
261
261
|
(C) => {
|
|
262
|
-
c === void 0 && y(C),
|
|
262
|
+
c === void 0 && y(C), m?.(C);
|
|
263
263
|
},
|
|
264
|
-
[c,
|
|
264
|
+
[c, m]
|
|
265
265
|
), P = (C) => {
|
|
266
266
|
if (n === "range" && Array.isArray(C) && C.length === 2) {
|
|
267
267
|
const [E, A] = C;
|
|
@@ -307,7 +307,7 @@ const Me = {
|
|
|
307
307
|
type: n,
|
|
308
308
|
previousIcon: /* @__PURE__ */ l(et, {}),
|
|
309
309
|
nextIcon: /* @__PURE__ */ l(Qe, {}),
|
|
310
|
-
...
|
|
310
|
+
...u,
|
|
311
311
|
size: "lg",
|
|
312
312
|
onChange: P,
|
|
313
313
|
weekendDays: [0],
|
|
@@ -384,7 +384,7 @@ const fn = {
|
|
|
384
384
|
return new Date(r[0], r[1] - 1, r[2]);
|
|
385
385
|
}
|
|
386
386
|
return null;
|
|
387
|
-
},
|
|
387
|
+
}, ha = ({
|
|
388
388
|
size: e = "md",
|
|
389
389
|
type: r = "default",
|
|
390
390
|
withTime: n,
|
|
@@ -395,9 +395,9 @@ const fn = {
|
|
|
395
395
|
value: i,
|
|
396
396
|
defaultValue: c,
|
|
397
397
|
onChange: p,
|
|
398
|
-
placeholder:
|
|
398
|
+
placeholder: m,
|
|
399
399
|
disabled: _,
|
|
400
|
-
minDate:
|
|
400
|
+
minDate: u,
|
|
401
401
|
maxDate: d,
|
|
402
402
|
displayValueFormat: f = "YYYY년 MM월 DD일",
|
|
403
403
|
valueFormat: h,
|
|
@@ -454,9 +454,9 @@ const fn = {
|
|
|
454
454
|
onChange: (D) => {
|
|
455
455
|
p?.(D ? H(D).format(P) : null);
|
|
456
456
|
},
|
|
457
|
-
placeholder:
|
|
457
|
+
placeholder: m,
|
|
458
458
|
disabled: _,
|
|
459
|
-
minDate:
|
|
459
|
+
minDate: u,
|
|
460
460
|
maxDate: d
|
|
461
461
|
}
|
|
462
462
|
);
|
|
@@ -515,7 +515,7 @@ const fn = {
|
|
|
515
515
|
rightSectionWidth: a ?? C,
|
|
516
516
|
"data-expanded": O ? !0 : void 0,
|
|
517
517
|
"data-disabled": _ ? !0 : void 0,
|
|
518
|
-
children: $ ? /* @__PURE__ */ l("span", { children: $ }) : /* @__PURE__ */ l("span", { className: b.DatePicker__Placeholder, children:
|
|
518
|
+
children: $ ? /* @__PURE__ */ l("span", { children: $ }) : /* @__PURE__ */ l("span", { className: b.DatePicker__Placeholder, children: m })
|
|
519
519
|
}
|
|
520
520
|
)
|
|
521
521
|
}
|
|
@@ -529,7 +529,7 @@ const fn = {
|
|
|
529
529
|
excludedDates: y,
|
|
530
530
|
excludedDays: g,
|
|
531
531
|
highlightToday: k,
|
|
532
|
-
minDate:
|
|
532
|
+
minDate: u,
|
|
533
533
|
maxDate: d
|
|
534
534
|
}
|
|
535
535
|
) })
|
|
@@ -552,7 +552,7 @@ const fn = {
|
|
|
552
552
|
"Dropdown--Large": "styles-module__Dropdown--Large___BvV3M",
|
|
553
553
|
Dropdown__Description: gn,
|
|
554
554
|
Dropdown__ErrorMsg: yn
|
|
555
|
-
},
|
|
555
|
+
}, ga = ({
|
|
556
556
|
label: e,
|
|
557
557
|
labelPosition: r = "top",
|
|
558
558
|
size: n = "md",
|
|
@@ -563,9 +563,9 @@ const fn = {
|
|
|
563
563
|
description: i,
|
|
564
564
|
...c
|
|
565
565
|
}) => {
|
|
566
|
-
const [p,
|
|
567
|
-
let _ = K["Dropdown__Label--Medium"],
|
|
568
|
-
return n === "sm" ? (_ = K["Dropdown__Label--Small"],
|
|
566
|
+
const [p, m] = L(!1);
|
|
567
|
+
let _ = K["Dropdown__Label--Medium"], u = K["Dropdown--Medium"], d = K["Dropdown__Tooltip--Medium"], f = 18;
|
|
568
|
+
return n === "sm" ? (_ = K["Dropdown__Label--Small"], u = K["Dropdown--Small"], d = K["Dropdown__Tooltip--Small"], f = 14) : n === "lg" && (_ = K["Dropdown__Label--Large"], u = K["Dropdown--Large"], d = K["Dropdown__Tooltip--Large"], f = 24), /* @__PURE__ */ x(
|
|
569
569
|
"div",
|
|
570
570
|
{
|
|
571
571
|
className: r === "top" ? K["Dropdown--TopLabel"] : K["Dropdown--LeftLabel"],
|
|
@@ -581,10 +581,10 @@ const fn = {
|
|
|
581
581
|
...c,
|
|
582
582
|
size: n,
|
|
583
583
|
error: a,
|
|
584
|
-
className:
|
|
584
|
+
className: u,
|
|
585
585
|
rightSection: p ? /* @__PURE__ */ l(jt, { size: f }) : /* @__PURE__ */ l(Ut, { size: f }),
|
|
586
|
-
onDropdownOpen: () =>
|
|
587
|
-
onDropdownClose: () =>
|
|
586
|
+
onDropdownOpen: () => m(!0),
|
|
587
|
+
onDropdownClose: () => m(!1),
|
|
588
588
|
styles: {
|
|
589
589
|
option: {
|
|
590
590
|
"&[data-selected]": {
|
|
@@ -651,39 +651,52 @@ function Sn(e) {
|
|
|
651
651
|
for (const r of e)
|
|
652
652
|
r.url?.startsWith("blob:") && URL.revokeObjectURL(r.url);
|
|
653
653
|
}
|
|
654
|
-
const Tn = (
|
|
655
|
-
|
|
656
|
-
|
|
654
|
+
const Tn = (e) => ({
|
|
655
|
+
// fullScreen이면 Mantine의 radius 0을 인라인 radius로 덮지 않는다.
|
|
656
|
+
...e ? {} : { content: { borderRadius: "12px" } },
|
|
657
|
+
title: {
|
|
658
|
+
fontSize: "16px",
|
|
659
|
+
fontWeight: "700",
|
|
660
|
+
lineHeight: "150%",
|
|
661
|
+
color: Vt
|
|
662
|
+
},
|
|
663
|
+
header: {
|
|
664
|
+
padding: "16px"
|
|
665
|
+
},
|
|
666
|
+
body: {
|
|
667
|
+
paddingInline: 0
|
|
668
|
+
}
|
|
669
|
+
}), wn = (e, r) => {
|
|
670
|
+
if (typeof e == "function")
|
|
671
|
+
return e;
|
|
672
|
+
const n = Tn(r), t = { ...n, ...e };
|
|
673
|
+
return Object.keys(n).forEach((o) => {
|
|
674
|
+
t[o] = { ...n[o], ...e?.[o] };
|
|
675
|
+
}), t;
|
|
676
|
+
}, In = ({
|
|
677
|
+
size: e = "md",
|
|
678
|
+
width: r,
|
|
679
|
+
withCloseButton: n = !1,
|
|
680
|
+
fullScreen: t = !1,
|
|
681
|
+
styles: o,
|
|
682
|
+
...s
|
|
683
|
+
}) => {
|
|
684
|
+
let a = 768;
|
|
685
|
+
return e === "xs" ? a = 360 : e === "sm" ? a = 544 : e === "lg" ? a = 1e3 : e === "xl" && (a = 1200), /* @__PURE__ */ l(
|
|
657
686
|
St,
|
|
658
687
|
{
|
|
659
|
-
size: r ||
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
borderRadius: "12px"
|
|
663
|
-
},
|
|
664
|
-
title: {
|
|
665
|
-
fontSize: "16px",
|
|
666
|
-
fontWeight: "700",
|
|
667
|
-
lineHeight: "150%",
|
|
668
|
-
color: Vt
|
|
669
|
-
},
|
|
670
|
-
header: {
|
|
671
|
-
padding: "16px"
|
|
672
|
-
},
|
|
673
|
-
body: {
|
|
674
|
-
paddingLeft: "0px",
|
|
675
|
-
paddingRight: "0px"
|
|
676
|
-
}
|
|
677
|
-
},
|
|
688
|
+
size: r || a,
|
|
689
|
+
fullScreen: t,
|
|
690
|
+
styles: wn(o, t),
|
|
678
691
|
withCloseButton: n,
|
|
679
692
|
closeButtonProps: {
|
|
680
693
|
icon: /* @__PURE__ */ l(Ae, { size: 18, color: tt })
|
|
681
694
|
},
|
|
682
|
-
...
|
|
695
|
+
...s
|
|
683
696
|
}
|
|
684
697
|
);
|
|
685
698
|
};
|
|
686
|
-
async function
|
|
699
|
+
async function Ln(e, r) {
|
|
687
700
|
const n = e.url ?? "";
|
|
688
701
|
if (!n) return null;
|
|
689
702
|
const t = await new Promise((i, c) => {
|
|
@@ -711,26 +724,26 @@ async function wn(e, r) {
|
|
|
711
724
|
}, "image/jpeg");
|
|
712
725
|
});
|
|
713
726
|
}
|
|
714
|
-
function
|
|
727
|
+
function Bn({
|
|
715
728
|
item: e,
|
|
716
729
|
isOpen: r,
|
|
717
730
|
aspect: n = 1,
|
|
718
731
|
onClose: t,
|
|
719
732
|
onSubmit: o
|
|
720
733
|
}) {
|
|
721
|
-
const [s, a] = L({ x: 0, y: 0 }), [i, c] = L(1), [p,
|
|
734
|
+
const [s, a] = L({ x: 0, y: 0 }), [i, c] = L(1), [p, m] = L(null), [_, u] = L(!1), d = async () => {
|
|
722
735
|
if (!(!p || !e)) {
|
|
723
|
-
|
|
736
|
+
u(!0);
|
|
724
737
|
try {
|
|
725
|
-
const f = await
|
|
738
|
+
const f = await Ln(e, p);
|
|
726
739
|
f && o(f);
|
|
727
740
|
} finally {
|
|
728
|
-
|
|
741
|
+
u(!1);
|
|
729
742
|
}
|
|
730
743
|
}
|
|
731
744
|
};
|
|
732
745
|
return /* @__PURE__ */ l(
|
|
733
|
-
|
|
746
|
+
In,
|
|
734
747
|
{
|
|
735
748
|
opened: r && !!e,
|
|
736
749
|
onClose: t,
|
|
@@ -750,7 +763,7 @@ function In({
|
|
|
750
763
|
objectFit: "cover",
|
|
751
764
|
onCropChange: a,
|
|
752
765
|
onZoomChange: c,
|
|
753
|
-
onCropComplete: (f, h) =>
|
|
766
|
+
onCropComplete: (f, h) => m(h),
|
|
754
767
|
style: { containerStyle: { backgroundColor: Oe } }
|
|
755
768
|
}
|
|
756
769
|
) }),
|
|
@@ -763,24 +776,24 @@ function In({
|
|
|
763
776
|
e?.id
|
|
764
777
|
);
|
|
765
778
|
}
|
|
766
|
-
const
|
|
767
|
-
Container:
|
|
768
|
-
TileImage:
|
|
769
|
-
EditButton:
|
|
770
|
-
PlaceholderText:
|
|
771
|
-
PlaceholderTextError:
|
|
772
|
-
},
|
|
773
|
-
TileContainer:
|
|
774
|
-
DeleteButton:
|
|
775
|
-
Tile:
|
|
776
|
-
TileDragOver:
|
|
777
|
-
LoadingOverlay:
|
|
778
|
-
ActionBar:
|
|
779
|
-
DragHandle:
|
|
780
|
-
LinkButton:
|
|
781
|
-
DropzoneOuter:
|
|
782
|
-
Placeholder:
|
|
783
|
-
PlaceholderError:
|
|
779
|
+
const vn = "styles-module__Container___ZyeJM", En = "styles-module__TileImage___6aKmW", An = "styles-module__EditButton___1Xyg9", Nn = "styles-module__PlaceholderText___nhLhy", Fn = "styles-module__PlaceholderTextError___jYZ8j", ae = {
|
|
780
|
+
Container: vn,
|
|
781
|
+
TileImage: En,
|
|
782
|
+
EditButton: An,
|
|
783
|
+
PlaceholderText: Nn,
|
|
784
|
+
PlaceholderTextError: Fn
|
|
785
|
+
}, $n = "styles-module__TileContainer___5-y01", Rn = "styles-module__DeleteButton___0zsXm", On = "styles-module__Tile___3Cezo", zn = "styles-module__TileDragOver___e7GXF", Hn = "styles-module__LoadingOverlay___4CyDQ", Yn = "styles-module__ActionBar___mJYpe", Wn = "styles-module__DragHandle___lzKhb", Zn = "styles-module__LinkButton___bISyz", jn = "styles-module__DropzoneOuter___BIO2N", Un = "styles-module__Placeholder___q30Yw", Vn = "styles-module__PlaceholderError___fCOYe", Q = {
|
|
786
|
+
TileContainer: $n,
|
|
787
|
+
DeleteButton: Rn,
|
|
788
|
+
Tile: On,
|
|
789
|
+
TileDragOver: zn,
|
|
790
|
+
LoadingOverlay: Hn,
|
|
791
|
+
ActionBar: Yn,
|
|
792
|
+
DragHandle: Wn,
|
|
793
|
+
LinkButton: Zn,
|
|
794
|
+
DropzoneOuter: jn,
|
|
795
|
+
Placeholder: Un,
|
|
796
|
+
PlaceholderError: Vn
|
|
784
797
|
};
|
|
785
798
|
function ge({
|
|
786
799
|
width: e,
|
|
@@ -805,14 +818,14 @@ function ge({
|
|
|
805
818
|
}
|
|
806
819
|
) });
|
|
807
820
|
}
|
|
808
|
-
const
|
|
821
|
+
const Gn = (e) => {
|
|
809
822
|
const { isSorting: r, wasDragging: n } = e;
|
|
810
823
|
return r || n ? !1 : st(e);
|
|
811
824
|
};
|
|
812
825
|
function ut({ id: e, children: r }) {
|
|
813
826
|
const { setNodeRef: n, transform: t, transition: o, isOver: s } = at({
|
|
814
827
|
id: e,
|
|
815
|
-
animateLayoutChanges:
|
|
828
|
+
animateLayoutChanges: Gn
|
|
816
829
|
});
|
|
817
830
|
return /* @__PURE__ */ l(
|
|
818
831
|
"div",
|
|
@@ -838,9 +851,9 @@ function mt({
|
|
|
838
851
|
canDelete: i,
|
|
839
852
|
hasLink: c,
|
|
840
853
|
linkUrl: p,
|
|
841
|
-
onLinkClick:
|
|
854
|
+
onLinkClick: m,
|
|
842
855
|
onDelete: _,
|
|
843
|
-
deleteAriaLabel:
|
|
856
|
+
deleteAriaLabel: u = "삭제",
|
|
844
857
|
actionBarExtra: d,
|
|
845
858
|
onTileClick: f,
|
|
846
859
|
onFileDrop: h,
|
|
@@ -863,7 +876,7 @@ function mt({
|
|
|
863
876
|
id: e,
|
|
864
877
|
disabled: o,
|
|
865
878
|
animateLayoutChanges: z
|
|
866
|
-
}), v = !o && r > 1 || c && !!p && !!
|
|
879
|
+
}), v = !o && r > 1 || c && !!p && !!m || !!d, $ = o || s || a || !f ? "default" : "pointer";
|
|
867
880
|
return /* @__PURE__ */ x(
|
|
868
881
|
"div",
|
|
869
882
|
{
|
|
@@ -881,7 +894,7 @@ function mt({
|
|
|
881
894
|
type: "button",
|
|
882
895
|
className: Q.DeleteButton,
|
|
883
896
|
onClick: _,
|
|
884
|
-
"aria-label":
|
|
897
|
+
"aria-label": u,
|
|
885
898
|
children: /* @__PURE__ */ l(Gt, { size: 24 })
|
|
886
899
|
}
|
|
887
900
|
),
|
|
@@ -913,14 +926,14 @@ function mt({
|
|
|
913
926
|
children: /* @__PURE__ */ l(Kt, { size: 20, color: tt })
|
|
914
927
|
}
|
|
915
928
|
),
|
|
916
|
-
c && p &&
|
|
929
|
+
c && p && m && /* @__PURE__ */ l("button", { type: "button", className: Q.LinkButton, onClick: m, children: "링크" }),
|
|
917
930
|
d
|
|
918
931
|
] })
|
|
919
932
|
]
|
|
920
933
|
}
|
|
921
934
|
);
|
|
922
935
|
}
|
|
923
|
-
function
|
|
936
|
+
function Kn({
|
|
924
937
|
items: e,
|
|
925
938
|
onReorder: r
|
|
926
939
|
}) {
|
|
@@ -936,7 +949,7 @@ function Vn({
|
|
|
936
949
|
}
|
|
937
950
|
const be = "__slot-";
|
|
938
951
|
function pt({ value: e, length: r, minLength: n, maxLength: t, onChange: o }) {
|
|
939
|
-
const s = r ?? n, a = r ?? t, i = s != null && a != null && s === a, c = i ? 0 : Cn(e, s, a), p = i ? Array.from({ length: a }, (y, g) => `${be}${g}`) : [],
|
|
952
|
+
const s = r ?? n, a = r ?? t, i = s != null && a != null && s === a, c = i ? 0 : Cn(e, s, a), p = i ? Array.from({ length: a }, (y, g) => `${be}${g}`) : [], m = i ? p : e.map((y) => y.id), { sensors: _, handleDragEnd: u } = Kn({
|
|
940
953
|
items: e,
|
|
941
954
|
onReorder: (y, g) => {
|
|
942
955
|
const k = kn(e, y, g), P = e[y];
|
|
@@ -955,7 +968,7 @@ function pt({ value: e, length: r, minLength: n, maxLength: t, onChange: o }) {
|
|
|
955
968
|
resolvedMaxLength: a,
|
|
956
969
|
placeholderCount: c,
|
|
957
970
|
slotIds: p,
|
|
958
|
-
sortableItems:
|
|
971
|
+
sortableItems: m,
|
|
959
972
|
sensors: _,
|
|
960
973
|
handleDragEnd: i ? (y) => {
|
|
961
974
|
const { active: g, over: k } = y;
|
|
@@ -970,14 +983,14 @@ function pt({ value: e, length: r, minLength: n, maxLength: t, onChange: o }) {
|
|
|
970
983
|
previousIndex: P,
|
|
971
984
|
nextIndex: O
|
|
972
985
|
});
|
|
973
|
-
} :
|
|
986
|
+
} : u,
|
|
974
987
|
getMetaIndex: (y) => {
|
|
975
988
|
const g = e.find((k) => k.id === y);
|
|
976
989
|
return i && g ? g.position ?? 0 : e.findIndex((k) => k.id === y);
|
|
977
990
|
}
|
|
978
991
|
};
|
|
979
992
|
}
|
|
980
|
-
function
|
|
993
|
+
function Jn(e) {
|
|
981
994
|
return e ? e.join(",") : "image/*";
|
|
982
995
|
}
|
|
983
996
|
function Ze({
|
|
@@ -991,9 +1004,9 @@ function Ze({
|
|
|
991
1004
|
canDelete: i,
|
|
992
1005
|
hasLink: c,
|
|
993
1006
|
hasEdit: p,
|
|
994
|
-
readOnly:
|
|
1007
|
+
readOnly: m,
|
|
995
1008
|
isLoading: _,
|
|
996
|
-
onLinkClick:
|
|
1009
|
+
onLinkClick: u,
|
|
997
1010
|
onDelete: d,
|
|
998
1011
|
onReplace: f,
|
|
999
1012
|
onEdit: h
|
|
@@ -1006,13 +1019,13 @@ function Ze({
|
|
|
1006
1019
|
totalCount: t,
|
|
1007
1020
|
width: o,
|
|
1008
1021
|
height: s,
|
|
1009
|
-
readOnly:
|
|
1022
|
+
readOnly: m,
|
|
1010
1023
|
isLoading: _,
|
|
1011
1024
|
itemIsLoading: e.isLoading,
|
|
1012
1025
|
canDelete: i,
|
|
1013
1026
|
hasLink: c,
|
|
1014
1027
|
linkUrl: e.url,
|
|
1015
|
-
onLinkClick:
|
|
1028
|
+
onLinkClick: u ? () => u(e) : void 0,
|
|
1016
1029
|
onDelete: () => d(e.id),
|
|
1017
1030
|
deleteAriaLabel: "이미지 삭제",
|
|
1018
1031
|
onTileClick: () => y.current?.click(),
|
|
@@ -1022,7 +1035,7 @@ function Ze({
|
|
|
1022
1035
|
} else if (!g.type.startsWith("image/")) return;
|
|
1023
1036
|
f(e.id, g);
|
|
1024
1037
|
},
|
|
1025
|
-
actionBarExtra: !
|
|
1038
|
+
actionBarExtra: !m && p ? /* @__PURE__ */ l(
|
|
1026
1039
|
he,
|
|
1027
1040
|
{
|
|
1028
1041
|
variant: "basic",
|
|
@@ -1039,7 +1052,7 @@ function Ze({
|
|
|
1039
1052
|
{
|
|
1040
1053
|
ref: y,
|
|
1041
1054
|
type: "file",
|
|
1042
|
-
accept:
|
|
1055
|
+
accept: Jn(a),
|
|
1043
1056
|
style: { display: "none" },
|
|
1044
1057
|
onChange: (g) => {
|
|
1045
1058
|
const k = g.target.files?.[0];
|
|
@@ -1059,7 +1072,7 @@ function Ze({
|
|
|
1059
1072
|
}
|
|
1060
1073
|
);
|
|
1061
1074
|
}
|
|
1062
|
-
const
|
|
1075
|
+
const ya = ({
|
|
1063
1076
|
value: e = [],
|
|
1064
1077
|
onChange: r,
|
|
1065
1078
|
accept: n,
|
|
@@ -1070,9 +1083,9 @@ const ha = ({
|
|
|
1070
1083
|
hasIcon: i = !0,
|
|
1071
1084
|
hasLink: c = !1,
|
|
1072
1085
|
onLinkClick: p,
|
|
1073
|
-
hasEdit:
|
|
1086
|
+
hasEdit: m = !1,
|
|
1074
1087
|
canDelete: _ = !0,
|
|
1075
|
-
minLength:
|
|
1088
|
+
minLength: u,
|
|
1076
1089
|
maxLength: d,
|
|
1077
1090
|
errorMsg: f,
|
|
1078
1091
|
isLoading: h,
|
|
@@ -1088,7 +1101,7 @@ const ha = ({
|
|
|
1088
1101
|
sensors: z,
|
|
1089
1102
|
handleDragEnd: B,
|
|
1090
1103
|
getMetaIndex: M
|
|
1091
|
-
} = pt({ value: e, length: t, minLength:
|
|
1104
|
+
} = pt({ value: e, length: t, minLength: u, maxLength: d, onChange: r }), C = !!f, [E, A] = L(null), S = oe(e);
|
|
1092
1105
|
X(() => {
|
|
1093
1106
|
S.current = e;
|
|
1094
1107
|
}, [e]), X(() => () => Sn(S.current), []);
|
|
@@ -1142,7 +1155,7 @@ const ha = ({
|
|
|
1142
1155
|
accept: n,
|
|
1143
1156
|
canDelete: _,
|
|
1144
1157
|
hasLink: c,
|
|
1145
|
-
hasEdit:
|
|
1158
|
+
hasEdit: m,
|
|
1146
1159
|
readOnly: y ?? !1,
|
|
1147
1160
|
isLoading: h,
|
|
1148
1161
|
onLinkClick: p,
|
|
@@ -1185,7 +1198,7 @@ const ha = ({
|
|
|
1185
1198
|
accept: n,
|
|
1186
1199
|
canDelete: _,
|
|
1187
1200
|
hasLink: c,
|
|
1188
|
-
hasEdit:
|
|
1201
|
+
hasEdit: m,
|
|
1189
1202
|
readOnly: y ?? !1,
|
|
1190
1203
|
isLoading: h,
|
|
1191
1204
|
onLinkClick: p,
|
|
@@ -1220,8 +1233,8 @@ const ha = ({
|
|
|
1220
1233
|
))
|
|
1221
1234
|
] }) }) }) }),
|
|
1222
1235
|
C && /* @__PURE__ */ l(J.Error, { mt: 8, children: f }),
|
|
1223
|
-
|
|
1224
|
-
|
|
1236
|
+
m && /* @__PURE__ */ l(
|
|
1237
|
+
Bn,
|
|
1225
1238
|
{
|
|
1226
1239
|
item: E,
|
|
1227
1240
|
isOpen: !!E,
|
|
@@ -1249,17 +1262,17 @@ function ve(e) {
|
|
|
1249
1262
|
}, n.onerror = () => r(null), n.readAsText(e);
|
|
1250
1263
|
});
|
|
1251
1264
|
}
|
|
1252
|
-
function
|
|
1265
|
+
function Xn(e, r, n) {
|
|
1253
1266
|
const t = [...r].sort((i, c) => i.name.localeCompare(c.name)), o = n != null ? n - e.length : 1 / 0, a = t.slice(0, o).map((i) => ({
|
|
1254
1267
|
id: Ce(),
|
|
1255
1268
|
file: i
|
|
1256
1269
|
}));
|
|
1257
1270
|
return [...e, ...a];
|
|
1258
1271
|
}
|
|
1259
|
-
function
|
|
1272
|
+
function qn(e, r) {
|
|
1260
1273
|
return e.filter((n) => n.id !== r);
|
|
1261
1274
|
}
|
|
1262
|
-
function
|
|
1275
|
+
function Qn(e, r, n) {
|
|
1263
1276
|
const t = {
|
|
1264
1277
|
id: Ce(),
|
|
1265
1278
|
file: r,
|
|
@@ -1267,16 +1280,16 @@ function Xn(e, r, n) {
|
|
|
1267
1280
|
};
|
|
1268
1281
|
return [...e, t];
|
|
1269
1282
|
}
|
|
1270
|
-
const
|
|
1271
|
-
Container:
|
|
1272
|
-
Empty:
|
|
1273
|
-
PlaceholderText:
|
|
1274
|
-
PlaceholderTextError:
|
|
1275
|
-
},
|
|
1276
|
-
Toast:
|
|
1277
|
-
Toast__Icon:
|
|
1278
|
-
Toast__Body:
|
|
1279
|
-
Toast__Message:
|
|
1283
|
+
const eo = "styles-module__Container___cJqG-", to = "styles-module__Empty___gexrS", ro = "styles-module__PlaceholderText___x2ya0", no = "styles-module__PlaceholderTextError___i8VXv", ie = {
|
|
1284
|
+
Container: eo,
|
|
1285
|
+
Empty: to,
|
|
1286
|
+
PlaceholderText: ro,
|
|
1287
|
+
PlaceholderTextError: no
|
|
1288
|
+
}, oo = "styles-module__Toast___ZqZzU", ao = "styles-module__Toast__Icon___PWXSy", so = "styles-module__Toast__Body___wezPs", io = "styles-module__Toast__Message___NFsgm", de = {
|
|
1289
|
+
Toast: oo,
|
|
1290
|
+
Toast__Icon: ao,
|
|
1291
|
+
Toast__Body: so,
|
|
1292
|
+
Toast__Message: io
|
|
1280
1293
|
}, ht = (e) => typeof e == "string" ? { message: e } : e, gt = (e, r) => {
|
|
1281
1294
|
const { autoClose: n, icon: t, message: o } = ht(e);
|
|
1282
1295
|
return {
|
|
@@ -1317,22 +1330,22 @@ function Ue({
|
|
|
1317
1330
|
canDelete: i,
|
|
1318
1331
|
hasLink: c,
|
|
1319
1332
|
onLinkClick: p,
|
|
1320
|
-
onDelete:
|
|
1333
|
+
onDelete: m
|
|
1321
1334
|
}) {
|
|
1322
|
-
const
|
|
1335
|
+
const u = !e.animationData && !!(e.file || e.url) ? `${e.id}|${e.file ? `${e.file.name}:${e.file.size}` : e.url ?? ""}` : "", [d, f] = L({ key: "", data: null }), h = e.animationData ?? (d.key === u ? d.data : null), y = !!u && d.key !== u;
|
|
1323
1336
|
return X(() => {
|
|
1324
|
-
if (!
|
|
1337
|
+
if (!u) return;
|
|
1325
1338
|
let g = !1;
|
|
1326
1339
|
return (e.file ? ve(e.file) : fetch(e.url).then((P) => P.json()).then(
|
|
1327
1340
|
(P) => ft(P) ? P : null
|
|
1328
1341
|
)).then((P) => {
|
|
1329
|
-
g || f({ key:
|
|
1342
|
+
g || f({ key: u, data: P });
|
|
1330
1343
|
}).catch(() => {
|
|
1331
|
-
g || f({ key:
|
|
1344
|
+
g || f({ key: u, data: null });
|
|
1332
1345
|
}), () => {
|
|
1333
1346
|
g = !0;
|
|
1334
1347
|
};
|
|
1335
|
-
}, [
|
|
1348
|
+
}, [u, e.file, e.url]), /* @__PURE__ */ l(
|
|
1336
1349
|
mt,
|
|
1337
1350
|
{
|
|
1338
1351
|
id: r ?? e.id,
|
|
@@ -1346,7 +1359,7 @@ function Ue({
|
|
|
1346
1359
|
hasLink: c,
|
|
1347
1360
|
linkUrl: e.url,
|
|
1348
1361
|
onLinkClick: p ? () => p(e) : void 0,
|
|
1349
|
-
onDelete: () =>
|
|
1362
|
+
onDelete: () => m(e.id),
|
|
1350
1363
|
deleteAriaLabel: "Lottie 삭제",
|
|
1351
1364
|
children: h ? /* @__PURE__ */ l(
|
|
1352
1365
|
_r,
|
|
@@ -1360,7 +1373,7 @@ function Ue({
|
|
|
1360
1373
|
}
|
|
1361
1374
|
);
|
|
1362
1375
|
}
|
|
1363
|
-
const
|
|
1376
|
+
const ka = ({
|
|
1364
1377
|
value: e = [],
|
|
1365
1378
|
onChange: r,
|
|
1366
1379
|
width: n = 160,
|
|
@@ -1371,9 +1384,9 @@ const ga = ({
|
|
|
1371
1384
|
onLinkClick: i,
|
|
1372
1385
|
length: c,
|
|
1373
1386
|
minLength: p,
|
|
1374
|
-
maxLength:
|
|
1387
|
+
maxLength: m,
|
|
1375
1388
|
errorMsg: _,
|
|
1376
|
-
isLoading:
|
|
1389
|
+
isLoading: u,
|
|
1377
1390
|
readOnly: d,
|
|
1378
1391
|
gap: f = 8,
|
|
1379
1392
|
canDelete: h = !0
|
|
@@ -1387,7 +1400,7 @@ const ga = ({
|
|
|
1387
1400
|
sensors: N,
|
|
1388
1401
|
handleDragEnd: W,
|
|
1389
1402
|
getMetaIndex: z
|
|
1390
|
-
} = pt({ value: e, length: c, minLength: p, maxLength:
|
|
1403
|
+
} = pt({ value: e, length: c, minLength: p, maxLength: m, onChange: r }), B = !!_, M = async (S) => {
|
|
1391
1404
|
if (d) return;
|
|
1392
1405
|
const v = [...S].sort((I, D) => I.name.localeCompare(D.name)), $ = await Promise.all(v.map(ve));
|
|
1393
1406
|
let w = 0;
|
|
@@ -1396,7 +1409,7 @@ const ga = ({
|
|
|
1396
1409
|
id: "invalid-lottie-files",
|
|
1397
1410
|
message: w === 1 ? "유효하지 않은 Lottie JSON 파일입니다" : `${w}개의 파일이 유효하지 않은 Lottie JSON입니다`
|
|
1398
1411
|
}), T.length === 0) return;
|
|
1399
|
-
const R = e.length, U =
|
|
1412
|
+
const R = e.length, U = Xn(e, T, g);
|
|
1400
1413
|
U.length !== R && r?.(U, {
|
|
1401
1414
|
action: "create",
|
|
1402
1415
|
itemId: U[R].id,
|
|
@@ -1413,7 +1426,7 @@ const ga = ({
|
|
|
1413
1426
|
});
|
|
1414
1427
|
return;
|
|
1415
1428
|
}
|
|
1416
|
-
const T =
|
|
1429
|
+
const T = Qn(e, $, S);
|
|
1417
1430
|
r?.(T, {
|
|
1418
1431
|
action: "create",
|
|
1419
1432
|
itemId: T[T.length - 1].id,
|
|
@@ -1421,7 +1434,7 @@ const ga = ({
|
|
|
1421
1434
|
});
|
|
1422
1435
|
}, E = (S) => {
|
|
1423
1436
|
if (d) return;
|
|
1424
|
-
const v = z(S), $ =
|
|
1437
|
+
const v = z(S), $ = qn(e, S);
|
|
1425
1438
|
r?.($, { action: "delete", itemId: S, index: v });
|
|
1426
1439
|
}, A = (S) => {
|
|
1427
1440
|
const v = typeof o == "function" ? o(S) : o;
|
|
@@ -1440,7 +1453,7 @@ const ga = ({
|
|
|
1440
1453
|
width: n,
|
|
1441
1454
|
height: t,
|
|
1442
1455
|
readOnly: d ?? !1,
|
|
1443
|
-
isLoading:
|
|
1456
|
+
isLoading: u,
|
|
1444
1457
|
canDelete: h,
|
|
1445
1458
|
hasLink: a,
|
|
1446
1459
|
onLinkClick: i,
|
|
@@ -1453,7 +1466,7 @@ const ga = ({
|
|
|
1453
1466
|
onDrop: (T) => C(v, T),
|
|
1454
1467
|
accept: je,
|
|
1455
1468
|
multiple: !1,
|
|
1456
|
-
isLoading:
|
|
1469
|
+
isLoading: u,
|
|
1457
1470
|
isError: B,
|
|
1458
1471
|
width: n,
|
|
1459
1472
|
height: t,
|
|
@@ -1478,7 +1491,7 @@ const ga = ({
|
|
|
1478
1491
|
width: n,
|
|
1479
1492
|
height: t,
|
|
1480
1493
|
readOnly: d ?? !1,
|
|
1481
|
-
isLoading:
|
|
1494
|
+
isLoading: u,
|
|
1482
1495
|
canDelete: h,
|
|
1483
1496
|
hasLink: a,
|
|
1484
1497
|
onLinkClick: i,
|
|
@@ -1492,7 +1505,7 @@ const ga = ({
|
|
|
1492
1505
|
onDrop: M,
|
|
1493
1506
|
accept: je,
|
|
1494
1507
|
multiple: g !== 1,
|
|
1495
|
-
isLoading:
|
|
1508
|
+
isLoading: u,
|
|
1496
1509
|
isError: B,
|
|
1497
1510
|
width: n,
|
|
1498
1511
|
height: t,
|
|
@@ -1512,12 +1525,12 @@ const ga = ({
|
|
|
1512
1525
|
] }) }) }) }),
|
|
1513
1526
|
B && /* @__PURE__ */ l(J.Error, { mt: 8, children: _ })
|
|
1514
1527
|
] });
|
|
1515
|
-
},
|
|
1516
|
-
Pagination:
|
|
1517
|
-
Pagination__PageIndex:
|
|
1528
|
+
}, lo = "style-module__Pagination___xcR-Q", co = "style-module__Pagination__PageIndex___50SZJ", _o = "style-module__Pagination__Arrow___74vp3", le = {
|
|
1529
|
+
Pagination: lo,
|
|
1530
|
+
Pagination__PageIndex: co,
|
|
1518
1531
|
"Pagination__PageIndex--Active": "style-module__Pagination__PageIndex--Active___mSIwS",
|
|
1519
|
-
Pagination__Arrow:
|
|
1520
|
-
},
|
|
1532
|
+
Pagination__Arrow: _o
|
|
1533
|
+
}, Ca = ({
|
|
1521
1534
|
currentPageIdx: e,
|
|
1522
1535
|
rowsPerPage: r,
|
|
1523
1536
|
totalLength: n,
|
|
@@ -1525,19 +1538,19 @@ const ga = ({
|
|
|
1525
1538
|
onPageChange: o,
|
|
1526
1539
|
...s
|
|
1527
1540
|
}) => {
|
|
1528
|
-
const [a, i] = L(e), c = r || 50, p = n || 1,
|
|
1541
|
+
const [a, i] = L(e), c = r || 50, p = n || 1, m = t || 5;
|
|
1529
1542
|
X(() => {
|
|
1530
1543
|
i(e);
|
|
1531
1544
|
}, [e]);
|
|
1532
1545
|
const _ = () => {
|
|
1533
|
-
o && o(a - (a %
|
|
1534
|
-
},
|
|
1535
|
-
o && o(a +
|
|
1546
|
+
o && o(a - (a % m + 1)), i((d) => d - (d % m + 1));
|
|
1547
|
+
}, u = () => {
|
|
1548
|
+
o && o(a + m - a % m), i((d) => d + m - d % m);
|
|
1536
1549
|
};
|
|
1537
1550
|
return /* @__PURE__ */ x("div", { ...s, className: le.Pagination, children: [
|
|
1538
|
-
a >=
|
|
1539
|
-
new Array(
|
|
1540
|
-
const h = Math.floor(a /
|
|
1551
|
+
a >= m ? /* @__PURE__ */ l("button", { className: le.Pagination__Arrow, onClick: _, children: /* @__PURE__ */ l(et, { size: 20 }) }) : null,
|
|
1552
|
+
new Array(m).fill(0).map((d, f) => {
|
|
1553
|
+
const h = Math.floor(a / m) * m + f + 1;
|
|
1541
1554
|
if (!(h > Math.ceil(p / c)))
|
|
1542
1555
|
return /* @__PURE__ */ l(
|
|
1543
1556
|
"button",
|
|
@@ -1551,22 +1564,22 @@ const ga = ({
|
|
|
1551
1564
|
`pagination_${f}`
|
|
1552
1565
|
);
|
|
1553
1566
|
}),
|
|
1554
|
-
Math.floor(a /
|
|
1567
|
+
Math.floor(a / m) * m + m < Math.ceil(p / c) ? /* @__PURE__ */ l("button", { className: le.Pagination__Arrow, onClick: u, children: /* @__PURE__ */ l(Qe, { size: 20 }) }) : null
|
|
1555
1568
|
] });
|
|
1556
1569
|
}, Se = {
|
|
1557
1570
|
"Radio--Small": "styles-module__Radio--Small___izWI2",
|
|
1558
1571
|
"Radio--Medium": "styles-module__Radio--Medium___dwZfV",
|
|
1559
1572
|
"Radio--Large": "styles-module__Radio--Large___1gLra"
|
|
1560
|
-
},
|
|
1573
|
+
}, uo = {
|
|
1561
1574
|
sm: Se["Radio--Small"],
|
|
1562
1575
|
md: Se["Radio--Medium"],
|
|
1563
1576
|
lg: Se["Radio--Large"]
|
|
1564
|
-
},
|
|
1577
|
+
}, mo = {
|
|
1565
1578
|
sm: 18,
|
|
1566
1579
|
md: 24,
|
|
1567
1580
|
lg: 32
|
|
1568
|
-
},
|
|
1569
|
-
const n =
|
|
1581
|
+
}, Da = ({ size: e = "md", ...r }) => {
|
|
1582
|
+
const n = uo[e], t = mo[e];
|
|
1570
1583
|
return /* @__PURE__ */ l(
|
|
1571
1584
|
It,
|
|
1572
1585
|
{
|
|
@@ -1578,7 +1591,7 @@ const ga = ({
|
|
|
1578
1591
|
...r
|
|
1579
1592
|
}
|
|
1580
1593
|
);
|
|
1581
|
-
},
|
|
1594
|
+
}, po = "styles-module__SearchBar__Wrapper___oq49s", fo = "styles-module__SearchBar__Description___vucS-", ho = "styles-module__SearchBar__ErrorMsg___TOeoy", go = "styles-module__SearchBar__ClearButton___S-y4P", V = {
|
|
1582
1595
|
"SearchBar--LeftLabel": "styles-module__SearchBar--LeftLabel___CeYTM",
|
|
1583
1596
|
"SearchBar--TopLabel": "styles-module__SearchBar--TopLabel___spN3I",
|
|
1584
1597
|
"SearchBar__Label--Small": "styles-module__SearchBar__Label--Small___zS1L2",
|
|
@@ -1587,14 +1600,14 @@ const ga = ({
|
|
|
1587
1600
|
"SearchBar__Tooltip--Small": "styles-module__SearchBar__Tooltip--Small___YhmEr",
|
|
1588
1601
|
"SearchBar__Tooltip--Medium": "styles-module__SearchBar__Tooltip--Medium___4JhOv",
|
|
1589
1602
|
"SearchBar__Tooltip--Large": "styles-module__SearchBar__Tooltip--Large___IEoPv",
|
|
1590
|
-
SearchBar__Wrapper:
|
|
1603
|
+
SearchBar__Wrapper: po,
|
|
1591
1604
|
"SearchBar--Small": "styles-module__SearchBar--Small___SY9CN",
|
|
1592
1605
|
"SearchBar--Medium": "styles-module__SearchBar--Medium___vLP08",
|
|
1593
1606
|
"SearchBar--Large": "styles-module__SearchBar--Large___JHfHP",
|
|
1594
|
-
SearchBar__Description:
|
|
1595
|
-
SearchBar__ErrorMsg:
|
|
1596
|
-
SearchBar__ClearButton:
|
|
1597
|
-
},
|
|
1607
|
+
SearchBar__Description: fo,
|
|
1608
|
+
SearchBar__ErrorMsg: ho,
|
|
1609
|
+
SearchBar__ClearButton: go
|
|
1610
|
+
}, xa = ({
|
|
1598
1611
|
label: e,
|
|
1599
1612
|
labelPosition: r = "top",
|
|
1600
1613
|
size: n = "md",
|
|
@@ -1605,14 +1618,14 @@ const ga = ({
|
|
|
1605
1618
|
description: i,
|
|
1606
1619
|
onChange: c,
|
|
1607
1620
|
onClear: p,
|
|
1608
|
-
...
|
|
1621
|
+
...m
|
|
1609
1622
|
}) => {
|
|
1610
|
-
const [_,
|
|
1623
|
+
const [_, u] = L(0);
|
|
1611
1624
|
let d = V["SearchBar__Label--Medium"], f = V["SearchBar--Medium"], h = V["SearchBar__Tooltip--Medium"];
|
|
1612
1625
|
n === "sm" ? (d = V["SearchBar__Label--Small"], f = V["SearchBar--Small"], h = V["SearchBar__Tooltip--Small"]) : n === "lg" && (d = V["SearchBar__Label--Large"], f = V["SearchBar--Large"], h = V["SearchBar__Tooltip--Large"]);
|
|
1613
1626
|
const y = Y(
|
|
1614
1627
|
(g) => {
|
|
1615
|
-
c && (
|
|
1628
|
+
c && (u(g?.length), c(g));
|
|
1616
1629
|
},
|
|
1617
1630
|
[c]
|
|
1618
1631
|
);
|
|
@@ -1629,7 +1642,7 @@ const ga = ({
|
|
|
1629
1642
|
/* @__PURE__ */ l("div", { className: V.SearchBar__Wrapper, children: /* @__PURE__ */ l(
|
|
1630
1643
|
Lt,
|
|
1631
1644
|
{
|
|
1632
|
-
...
|
|
1645
|
+
...m,
|
|
1633
1646
|
size: n,
|
|
1634
1647
|
error: a,
|
|
1635
1648
|
className: f,
|
|
@@ -1648,7 +1661,7 @@ const ga = ({
|
|
|
1648
1661
|
"SegmentButton--Small": "styles-module__SegmentButton--Small___o0Y3t",
|
|
1649
1662
|
"SegmentButton--Medium": "styles-module__SegmentButton--Medium___EgCJm",
|
|
1650
1663
|
"SegmentButton--Large": "styles-module__SegmentButton--Large___Ym86C"
|
|
1651
|
-
},
|
|
1664
|
+
}, Pa = ({
|
|
1652
1665
|
size: e = "md",
|
|
1653
1666
|
radius: r = Xt,
|
|
1654
1667
|
...n
|
|
@@ -1664,16 +1677,16 @@ const ga = ({
|
|
|
1664
1677
|
...n
|
|
1665
1678
|
}
|
|
1666
1679
|
);
|
|
1667
|
-
},
|
|
1668
|
-
Tab__TitleList:
|
|
1669
|
-
Tab__BorderBottom:
|
|
1670
|
-
},
|
|
1680
|
+
}, yo = "styles-module__Tab__TitleList___urHWH", ko = "styles-module__Tab__BorderBottom___eMTpl", Ve = {
|
|
1681
|
+
Tab__TitleList: yo,
|
|
1682
|
+
Tab__BorderBottom: ko
|
|
1683
|
+
}, Ma = ({ tabList: e = [], containerPaddingTop: r, ...n }) => /* @__PURE__ */ x(ce, { ...n, children: [
|
|
1671
1684
|
/* @__PURE__ */ l(ce.List, { className: Ve.Tab__TitleList, children: e?.map((t, o) => /* @__PURE__ */ x(ce.Tab, { value: t.value, leftSection: t.icon, children: [
|
|
1672
1685
|
t.title,
|
|
1673
1686
|
/* @__PURE__ */ l("div", { className: Ve.Tab__BorderBottom })
|
|
1674
1687
|
] }, `tab_${o}`)) }),
|
|
1675
1688
|
e?.map((t, o) => /* @__PURE__ */ l(ce.Panel, { value: t.value, pt: r, children: t.body }, `tab_panel_${o}`))
|
|
1676
|
-
] }),
|
|
1689
|
+
] }), Co = "styles-module__TextField__Wrapper___u6p5Z", Do = "styles-module__TextField__TextCounter___u1jM5", xo = "styles-module__TextField__Description___J-kXP", Po = "styles-module__TextField__ErrorMsg___fa6f6", Mo = "styles-module__TextField__ClearButton___bB5Ew", Z = {
|
|
1677
1690
|
"TextField--LeftLabel": "styles-module__TextField--LeftLabel___hiNn3",
|
|
1678
1691
|
"TextField--TopLabel": "styles-module__TextField--TopLabel___V2otc",
|
|
1679
1692
|
"TextField__Label--Small": "styles-module__TextField__Label--Small___NkKKA",
|
|
@@ -1682,16 +1695,16 @@ const ga = ({
|
|
|
1682
1695
|
"TextField__Tooltip--Small": "styles-module__TextField__Tooltip--Small___GmQHE",
|
|
1683
1696
|
"TextField__Tooltip--Medium": "styles-module__TextField__Tooltip--Medium___5P3nA",
|
|
1684
1697
|
"TextField__Tooltip--Large": "styles-module__TextField__Tooltip--Large___YSCfu",
|
|
1685
|
-
TextField__Wrapper:
|
|
1686
|
-
TextField__TextCounter:
|
|
1698
|
+
TextField__Wrapper: Co,
|
|
1699
|
+
TextField__TextCounter: Do,
|
|
1687
1700
|
"TextField--Textarea": "styles-module__TextField--Textarea___C2DL5",
|
|
1688
1701
|
"TextField--Small": "styles-module__TextField--Small___iuH4t",
|
|
1689
1702
|
"TextField--Medium": "styles-module__TextField--Medium___snYod",
|
|
1690
1703
|
"TextField--Large": "styles-module__TextField--Large___JoSYk",
|
|
1691
|
-
TextField__Description:
|
|
1692
|
-
TextField__ErrorMsg:
|
|
1693
|
-
TextField__ClearButton:
|
|
1694
|
-
},
|
|
1704
|
+
TextField__Description: xo,
|
|
1705
|
+
TextField__ErrorMsg: Po,
|
|
1706
|
+
TextField__ClearButton: Mo
|
|
1707
|
+
}, bo = (e) => typeof e == "string" ? e.length : typeof e == "number" ? String(e).length : Array.isArray(e) ? e.join("").length : 0, ba = (e) => {
|
|
1695
1708
|
const {
|
|
1696
1709
|
label: r,
|
|
1697
1710
|
labelPosition: n = "top",
|
|
@@ -1702,9 +1715,9 @@ const ga = ({
|
|
|
1702
1715
|
errorMsg: i,
|
|
1703
1716
|
description: c,
|
|
1704
1717
|
textarea: p = !1,
|
|
1705
|
-
maxTextCount:
|
|
1718
|
+
maxTextCount: m,
|
|
1706
1719
|
onChange: _,
|
|
1707
|
-
onClear:
|
|
1720
|
+
onClear: u,
|
|
1708
1721
|
...d
|
|
1709
1722
|
} = e, f = "minRows" in e ? e.minRows : void 0, {
|
|
1710
1723
|
value: h,
|
|
@@ -1712,18 +1725,18 @@ const ga = ({
|
|
|
1712
1725
|
...g
|
|
1713
1726
|
} = d, k = h !== void 0, [P, O] = L(
|
|
1714
1727
|
String(h ?? y ?? "")
|
|
1715
|
-
), N = k ? h : P, W =
|
|
1728
|
+
), N = k ? h : P, W = bo(N);
|
|
1716
1729
|
let z = Z["TextField__Label--Medium"], B = Z["TextField--Medium"], M = Z["TextField__Tooltip--Medium"];
|
|
1717
1730
|
t === "sm" ? (z = Z["TextField__Label--Small"], B = Z["TextField--Small"], M = Z["TextField__Tooltip--Small"]) : t === "lg" && (z = Z["TextField__Label--Large"], B = Z["TextField--Large"], M = Z["TextField__Tooltip--Large"]);
|
|
1718
1731
|
const C = Y(
|
|
1719
1732
|
(A) => {
|
|
1720
1733
|
const S = A.currentTarget.value;
|
|
1721
|
-
|
|
1734
|
+
m && S.length > m || (k || O(S), _ && _(A));
|
|
1722
1735
|
},
|
|
1723
|
-
[k,
|
|
1736
|
+
[k, m, _]
|
|
1724
1737
|
), E = Y(() => {
|
|
1725
|
-
k || O(""),
|
|
1726
|
-
}, [k,
|
|
1738
|
+
k || O(""), u?.();
|
|
1739
|
+
}, [k, u]);
|
|
1727
1740
|
return /* @__PURE__ */ x(
|
|
1728
1741
|
"div",
|
|
1729
1742
|
{
|
|
@@ -1753,7 +1766,7 @@ const ga = ({
|
|
|
1753
1766
|
error: i,
|
|
1754
1767
|
onChange: C,
|
|
1755
1768
|
value: N,
|
|
1756
|
-
rightSection:
|
|
1769
|
+
rightSection: u && W > 0 ? /* @__PURE__ */ l(
|
|
1757
1770
|
"button",
|
|
1758
1771
|
{
|
|
1759
1772
|
type: "button",
|
|
@@ -1766,11 +1779,11 @@ const ga = ({
|
|
|
1766
1779
|
...g
|
|
1767
1780
|
}
|
|
1768
1781
|
),
|
|
1769
|
-
|
|
1782
|
+
m && m > 0 && /* @__PURE__ */ l(
|
|
1770
1783
|
"span",
|
|
1771
1784
|
{
|
|
1772
1785
|
className: Z.TextField__TextCounter,
|
|
1773
|
-
children: `${W}/${
|
|
1786
|
+
children: `${W}/${m}`
|
|
1774
1787
|
}
|
|
1775
1788
|
)
|
|
1776
1789
|
] }),
|
|
@@ -1784,7 +1797,7 @@ const ga = ({
|
|
|
1784
1797
|
"TimePicker--Small": "styles-module__TimePicker--Small___nHQa1",
|
|
1785
1798
|
"TimePicker--Medium": "styles-module__TimePicker--Medium___E9-rF",
|
|
1786
1799
|
"TimePicker--Large": "styles-module__TimePicker--Large___I0M7V"
|
|
1787
|
-
},
|
|
1800
|
+
}, Sa = ({ size: e = "md", ...r }) => {
|
|
1788
1801
|
const n = oe(null);
|
|
1789
1802
|
let t = we["TimePicker--Medium"], o = 18;
|
|
1790
1803
|
return e === "sm" ? (t = we["TimePicker--Small"], o = 14) : e === "lg" && (t = we["TimePicker--Large"], o = 24), /* @__PURE__ */ l(
|
|
@@ -1810,45 +1823,49 @@ const ga = ({
|
|
|
1810
1823
|
"Toggle--Small": "styles-module__Toggle--Small___sOjUd",
|
|
1811
1824
|
"Toggle--Medium": "styles-module__Toggle--Medium___yIb8v",
|
|
1812
1825
|
"Toggle--Large": "styles-module__Toggle--Large___ZOJj1"
|
|
1813
|
-
},
|
|
1826
|
+
}, Ta = ({
|
|
1814
1827
|
size: e = "md",
|
|
1815
1828
|
labelPosition: r = "right",
|
|
1816
1829
|
disabled: n,
|
|
1817
|
-
|
|
1818
|
-
|
|
1830
|
+
checked: t,
|
|
1831
|
+
defaultChecked: o,
|
|
1832
|
+
onChange: s,
|
|
1833
|
+
...a
|
|
1819
1834
|
}) => {
|
|
1820
|
-
const [
|
|
1821
|
-
let
|
|
1822
|
-
e === "sm" ? (
|
|
1823
|
-
const
|
|
1824
|
-
(
|
|
1825
|
-
|
|
1835
|
+
const i = t !== void 0, [c, p] = L(o ?? !1), m = i ? t : c;
|
|
1836
|
+
let _ = Ie["Toggle--Medium"], u = 50;
|
|
1837
|
+
e === "sm" ? (_ = Ie["Toggle--Small"], u = 38) : e === "lg" && (_ = Ie["Toggle--Large"], u = 67);
|
|
1838
|
+
const d = Y(
|
|
1839
|
+
(f) => {
|
|
1840
|
+
s && s(f), i || p(f?.target?.checked);
|
|
1826
1841
|
},
|
|
1827
|
-
[
|
|
1842
|
+
[i, s]
|
|
1828
1843
|
);
|
|
1829
1844
|
return /* @__PURE__ */ l(
|
|
1830
1845
|
At,
|
|
1831
1846
|
{
|
|
1832
|
-
className:
|
|
1847
|
+
className: _,
|
|
1833
1848
|
size: e,
|
|
1834
1849
|
labelPosition: r,
|
|
1835
1850
|
disabled: n,
|
|
1836
|
-
|
|
1851
|
+
checked: t,
|
|
1852
|
+
defaultChecked: o,
|
|
1853
|
+
onChange: d,
|
|
1837
1854
|
styles: () => ({
|
|
1838
1855
|
track: {
|
|
1839
|
-
backgroundColor: !n &&
|
|
1840
|
-
borderColor: !n &&
|
|
1841
|
-
width:
|
|
1856
|
+
backgroundColor: !n && m ? `${ue} !important` : void 0,
|
|
1857
|
+
borderColor: !n && m ? `${ue} !important` : void 0,
|
|
1858
|
+
width: u
|
|
1842
1859
|
}
|
|
1843
1860
|
}),
|
|
1844
|
-
...
|
|
1861
|
+
...a
|
|
1845
1862
|
}
|
|
1846
1863
|
);
|
|
1847
|
-
},
|
|
1848
|
-
Tooltip__Body:
|
|
1849
|
-
Tooltip__Title:
|
|
1850
|
-
Tooltip__Content:
|
|
1851
|
-
},
|
|
1864
|
+
}, So = "styles-module__Tooltip__Body___i1OTG", To = "styles-module__Tooltip__Title___E0LoV", wo = "styles-module__Tooltip__Content___lU5gr", Le = {
|
|
1865
|
+
Tooltip__Body: So,
|
|
1866
|
+
Tooltip__Title: To,
|
|
1867
|
+
Tooltip__Content: wo
|
|
1868
|
+
}, wa = ({
|
|
1852
1869
|
title: e,
|
|
1853
1870
|
content: r,
|
|
1854
1871
|
maw: n = 280,
|
|
@@ -1865,7 +1882,7 @@ const ga = ({
|
|
|
1865
1882
|
/* @__PURE__ */ l("span", { className: Le.Tooltip__Content, children: r })
|
|
1866
1883
|
] })
|
|
1867
1884
|
}
|
|
1868
|
-
),
|
|
1885
|
+
), Io = (e) => {
|
|
1869
1886
|
const { name: r, icon: n } = e;
|
|
1870
1887
|
return `
|
|
1871
1888
|
<div class="pin-marker">
|
|
@@ -1880,7 +1897,7 @@ const ga = ({
|
|
|
1880
1897
|
<div class="pin-marker-name">${r}</div>
|
|
1881
1898
|
</div>
|
|
1882
1899
|
`;
|
|
1883
|
-
},
|
|
1900
|
+
}, Lo = (e) => {
|
|
1884
1901
|
const { discountRate: r, price: n, originalPrice: t, category: o, active: s, title: a } = e;
|
|
1885
1902
|
return `
|
|
1886
1903
|
<div class="popdeal-marker" active="${!!s}">
|
|
@@ -1897,7 +1914,7 @@ const ga = ({
|
|
|
1897
1914
|
</div>
|
|
1898
1915
|
</div>
|
|
1899
1916
|
`;
|
|
1900
|
-
},
|
|
1917
|
+
}, Bo = (e) => {
|
|
1901
1918
|
const { title: r, icon: n } = e;
|
|
1902
1919
|
return `
|
|
1903
1920
|
<div class="pi-marker">
|
|
@@ -1905,7 +1922,7 @@ const ga = ({
|
|
|
1905
1922
|
<span class="pi-marker-text">${r}</span>
|
|
1906
1923
|
</div>
|
|
1907
1924
|
`;
|
|
1908
|
-
},
|
|
1925
|
+
}, vo = (e) => {
|
|
1909
1926
|
const { title: r, icon: n, address: t } = e;
|
|
1910
1927
|
return `
|
|
1911
1928
|
<div class="pi-expanded-marker">
|
|
@@ -1916,26 +1933,26 @@ const ga = ({
|
|
|
1916
1933
|
</div>
|
|
1917
1934
|
</div>
|
|
1918
1935
|
`;
|
|
1919
|
-
},
|
|
1936
|
+
}, Eo = (e) => `
|
|
1920
1937
|
<div class="cluster-marker">
|
|
1921
1938
|
<span class="cluster-marker-text">${e.count}</span>
|
|
1922
1939
|
</div>
|
|
1923
1940
|
`, Ge = (e) => {
|
|
1924
1941
|
switch (e.type) {
|
|
1925
1942
|
case "pin":
|
|
1926
|
-
return
|
|
1943
|
+
return Io(e);
|
|
1927
1944
|
case "popdeal":
|
|
1928
|
-
return
|
|
1945
|
+
return Lo(e);
|
|
1929
1946
|
case "pi":
|
|
1930
|
-
return
|
|
1947
|
+
return Bo(e);
|
|
1931
1948
|
case "pi-expanded":
|
|
1932
|
-
return
|
|
1949
|
+
return vo(e);
|
|
1933
1950
|
case "cluster":
|
|
1934
|
-
return
|
|
1951
|
+
return Eo(e);
|
|
1935
1952
|
default:
|
|
1936
1953
|
return "";
|
|
1937
1954
|
}
|
|
1938
|
-
},
|
|
1955
|
+
}, Ao = `
|
|
1939
1956
|
/* Common marker styles */
|
|
1940
1957
|
[class$="marker"] {
|
|
1941
1958
|
user-select: none;
|
|
@@ -2210,7 +2227,7 @@ const ga = ({
|
|
|
2210
2227
|
background: #00C4C4;
|
|
2211
2228
|
transform: translate(-50%) rotate(45deg);
|
|
2212
2229
|
}
|
|
2213
|
-
`, yt = Fe(null), Ke = "naver-map-script",
|
|
2230
|
+
`, yt = Fe(null), Ke = "naver-map-script", No = (e, r) => new Promise((n, t) => {
|
|
2214
2231
|
if (typeof window < "u" && window.naver?.maps) {
|
|
2215
2232
|
n();
|
|
2216
2233
|
return;
|
|
@@ -2229,30 +2246,30 @@ const ga = ({
|
|
|
2229
2246
|
}, s.onerror = () => {
|
|
2230
2247
|
t(new Error("Failed to load Naver Map script"));
|
|
2231
2248
|
}, document.head.appendChild(s);
|
|
2232
|
-
}),
|
|
2249
|
+
}), Fo = ({
|
|
2233
2250
|
clientId: e,
|
|
2234
2251
|
language: r = "ko",
|
|
2235
2252
|
children: n
|
|
2236
2253
|
}) => {
|
|
2237
2254
|
const [t, o] = L(null), [s, a] = L({}), [i, c] = L(null);
|
|
2238
2255
|
X(() => {
|
|
2239
|
-
typeof window > "u" ||
|
|
2256
|
+
typeof window > "u" || No(e, r).then(() => {
|
|
2240
2257
|
window.naver && o(window.naver);
|
|
2241
|
-
}).catch((
|
|
2242
|
-
console.error("Naver Map script loading failed:",
|
|
2258
|
+
}).catch((m) => {
|
|
2259
|
+
console.error("Naver Map script loading failed:", m), c(m);
|
|
2243
2260
|
});
|
|
2244
2261
|
}, [e, r]);
|
|
2245
2262
|
const p = Y(
|
|
2246
|
-
(
|
|
2247
|
-
const
|
|
2248
|
-
if (!
|
|
2263
|
+
(m, _) => {
|
|
2264
|
+
const u = t || (typeof window < "u" ? window.naver : null);
|
|
2265
|
+
if (!u || (!t && window.naver && o(window.naver), !m.current))
|
|
2249
2266
|
return null;
|
|
2250
|
-
const d =
|
|
2267
|
+
const d = m.current;
|
|
2251
2268
|
if (!d.isConnected)
|
|
2252
2269
|
return null;
|
|
2253
2270
|
try {
|
|
2254
2271
|
const f = {
|
|
2255
|
-
center: new
|
|
2272
|
+
center: new u.maps.LatLng(37.5665, 126.978),
|
|
2256
2273
|
// 서울 시청 기본 좌표
|
|
2257
2274
|
zoom: 11,
|
|
2258
2275
|
maxZoom: 20,
|
|
@@ -2263,7 +2280,7 @@ const ga = ({
|
|
|
2263
2280
|
mapDataControl: !1,
|
|
2264
2281
|
zoomControl: !1,
|
|
2265
2282
|
..._
|
|
2266
|
-
}, h = new
|
|
2283
|
+
}, h = new u.maps.Map(d, f);
|
|
2267
2284
|
return a((y) => {
|
|
2268
2285
|
const g = d.getAttribute("id") || "default";
|
|
2269
2286
|
return { ...y, [g]: h };
|
|
@@ -2281,7 +2298,7 @@ const ga = ({
|
|
|
2281
2298
|
throw new Error("useNaverMap must be used within NaverMapProvider");
|
|
2282
2299
|
return e;
|
|
2283
2300
|
};
|
|
2284
|
-
function
|
|
2301
|
+
function $o(e) {
|
|
2285
2302
|
const r = function(t) {
|
|
2286
2303
|
this.DEFAULT_OPTIONS = {
|
|
2287
2304
|
map: null,
|
|
@@ -2449,10 +2466,10 @@ function No(e) {
|
|
|
2449
2466
|
const o = this.getProjection(), s = this._clusters;
|
|
2450
2467
|
let a = null, i = 1 / 0;
|
|
2451
2468
|
for (let c = 0, p = s.length; c < p; c++) {
|
|
2452
|
-
const
|
|
2453
|
-
if (
|
|
2454
|
-
const
|
|
2455
|
-
|
|
2469
|
+
const m = s[c], _ = m.getCenter();
|
|
2470
|
+
if (m.isInBounds(t)) {
|
|
2471
|
+
const u = o.getDistance(_, t);
|
|
2472
|
+
u < i && (i = u, a = m);
|
|
2456
2473
|
}
|
|
2457
2474
|
}
|
|
2458
2475
|
return a || (a = new n(this), this._clusters.push(a)), a;
|
|
@@ -2551,9 +2568,9 @@ function No(e) {
|
|
|
2551
2568
|
o && !o.getMap() && o.setMap(t);
|
|
2552
2569
|
},
|
|
2553
2570
|
_calcBounds: function(t) {
|
|
2554
|
-
const o = this._markerClusters.getMap(), s = new e.maps.LatLngBounds(t.clone(), t.clone()), a = o.getBounds(), i = o.getProjection(), c = i.fromCoordToOffset(a.getNE()), p = i.fromCoordToOffset(a.getSW()),
|
|
2555
|
-
|
|
2556
|
-
const d = Math.min(c.x,
|
|
2571
|
+
const o = this._markerClusters.getMap(), s = new e.maps.LatLngBounds(t.clone(), t.clone()), a = o.getBounds(), i = o.getProjection(), c = i.fromCoordToOffset(a.getNE()), p = i.fromCoordToOffset(a.getSW()), m = i.fromCoordToOffset(s.getNE()), _ = i.fromCoordToOffset(s.getSW()), u = this._markerClusters.getGridSize() / 2;
|
|
2572
|
+
m.add(u, -u), _.add(-u, u);
|
|
2573
|
+
const d = Math.min(c.x, m.x), f = Math.max(c.y, m.y), h = Math.max(p.x, _.x), y = Math.min(p.y, _.y), g = i.fromOffsetToCoord(new e.maps.Point(d, f)), k = i.fromOffsetToCoord(new e.maps.Point(h, y));
|
|
2557
2574
|
return new e.maps.LatLngBounds(k, g);
|
|
2558
2575
|
},
|
|
2559
2576
|
_getIndex: function(t) {
|
|
@@ -2582,18 +2599,18 @@ function No(e) {
|
|
|
2582
2599
|
}
|
|
2583
2600
|
}, r;
|
|
2584
2601
|
}
|
|
2585
|
-
const
|
|
2602
|
+
const Ro = (e) => {
|
|
2586
2603
|
const { naver: r } = kt(), [n, t] = L([]), o = oe(
|
|
2587
2604
|
/* @__PURE__ */ new Map()
|
|
2588
2605
|
), s = oe(null), a = Y(
|
|
2589
2606
|
(_) => {
|
|
2590
2607
|
if (!e || !r) return null;
|
|
2591
|
-
const
|
|
2608
|
+
const u = Ge(_), d = new r.maps.Marker({
|
|
2592
2609
|
..._,
|
|
2593
2610
|
position: new r.maps.LatLng(_.position.latitude, _.position.longitude),
|
|
2594
2611
|
map: e,
|
|
2595
2612
|
icon: {
|
|
2596
|
-
content:
|
|
2613
|
+
content: u
|
|
2597
2614
|
}
|
|
2598
2615
|
});
|
|
2599
2616
|
return _.onClick && r.maps.Event.addListener(d, "click", () => {
|
|
@@ -2602,14 +2619,14 @@ const Fo = (e) => {
|
|
|
2602
2619
|
},
|
|
2603
2620
|
[e, r]
|
|
2604
2621
|
), i = Y(
|
|
2605
|
-
(_,
|
|
2622
|
+
(_, u) => {
|
|
2606
2623
|
const d = o.current.get(_);
|
|
2607
2624
|
if (!d || !r)
|
|
2608
2625
|
return;
|
|
2609
|
-
const { marker: f, data: h } = d, y = { ...h, ...
|
|
2626
|
+
const { marker: f, data: h } = d, y = { ...h, ...u }, g = f.getElement();
|
|
2610
2627
|
if (g) {
|
|
2611
2628
|
const k = g.querySelector(".popdeal-marker");
|
|
2612
|
-
k && "active" in
|
|
2629
|
+
k && "active" in u && k.setAttribute("active", String(!!u.active));
|
|
2613
2630
|
}
|
|
2614
2631
|
o.current.set(_, { marker: f, data: y });
|
|
2615
2632
|
},
|
|
@@ -2623,22 +2640,22 @@ const Fo = (e) => {
|
|
|
2623
2640
|
!e || !r || e.panTo(new r.maps.LatLng(_.latitude, _.longitude));
|
|
2624
2641
|
},
|
|
2625
2642
|
[e, r]
|
|
2626
|
-
),
|
|
2643
|
+
), m = Y(
|
|
2627
2644
|
(_) => {
|
|
2628
2645
|
if (!e || !r || _.length === 0) return;
|
|
2629
|
-
const
|
|
2646
|
+
const u = new r.maps.LatLngBounds(
|
|
2630
2647
|
new r.maps.LatLng(_[0].latitude, _[0].longitude),
|
|
2631
2648
|
new r.maps.LatLng(_[0].latitude, _[0].longitude)
|
|
2632
2649
|
);
|
|
2633
2650
|
_.forEach((d) => {
|
|
2634
|
-
|
|
2635
|
-
}), e.fitBounds(
|
|
2651
|
+
u.extend(new r.maps.LatLng(d.latitude, d.longitude));
|
|
2652
|
+
}), e.fitBounds(u);
|
|
2636
2653
|
},
|
|
2637
2654
|
[e, r]
|
|
2638
2655
|
);
|
|
2639
2656
|
return X(() => {
|
|
2640
2657
|
if (!r || !e || n.length === 0) return;
|
|
2641
|
-
const _ =
|
|
2658
|
+
const _ = $o(r), d = {
|
|
2642
2659
|
content: Ge({
|
|
2643
2660
|
type: "cluster",
|
|
2644
2661
|
count: 0
|
|
@@ -2667,18 +2684,18 @@ const Fo = (e) => {
|
|
|
2667
2684
|
return s.current = f, () => {
|
|
2668
2685
|
f.setMap(null);
|
|
2669
2686
|
};
|
|
2670
|
-
}, [r, e, n]), { addMarker: a, updateMarker: i, clearMarkers: c, panTo: p, fitBounds:
|
|
2687
|
+
}, [r, e, n]), { addMarker: a, updateMarker: i, clearMarkers: c, panTo: p, fitBounds: m };
|
|
2671
2688
|
}, Ct = ({ options: e, onLoad: r }) => {
|
|
2672
|
-
const n = oe(null), t = oe(null), { createMap: o } = kt(), [s, a] = L(null), i =
|
|
2689
|
+
const n = oe(null), t = oe(null), { createMap: o } = kt(), [s, a] = L(null), i = Ro(s), { width: c = "100%", height: p = "100%", ...m } = e || {}, _ = Ne(() => m, [JSON.stringify(m)]);
|
|
2673
2690
|
return X(() => {
|
|
2674
2691
|
if (typeof document > "u" || document.getElementById("pop-ui-map-marker-styles")) return;
|
|
2675
2692
|
const d = document.createElement("style");
|
|
2676
|
-
return d.id = "pop-ui-map-marker-styles", d.textContent =
|
|
2693
|
+
return d.id = "pop-ui-map-marker-styles", d.textContent = Ao, document.head.appendChild(d), t.current = d, () => {
|
|
2677
2694
|
};
|
|
2678
2695
|
}, []), X(() => {
|
|
2679
|
-
let
|
|
2696
|
+
let u = null, d = null;
|
|
2680
2697
|
if (s && (s.destroy(), a(null)), n.current && n.current.isConnected) {
|
|
2681
|
-
const f = () => n.current && n.current.isConnected && (
|
|
2698
|
+
const f = () => n.current && n.current.isConnected && (u = o(n, _), u) ? (a(u), !0) : !1;
|
|
2682
2699
|
if (!f()) {
|
|
2683
2700
|
let h = 0;
|
|
2684
2701
|
const y = 50;
|
|
@@ -2687,11 +2704,11 @@ const Fo = (e) => {
|
|
|
2687
2704
|
}, 100);
|
|
2688
2705
|
}
|
|
2689
2706
|
return () => {
|
|
2690
|
-
d && clearInterval(d),
|
|
2707
|
+
d && clearInterval(d), u && (u.destroy(), u = null);
|
|
2691
2708
|
};
|
|
2692
2709
|
}
|
|
2693
2710
|
return () => {
|
|
2694
|
-
d && clearInterval(d),
|
|
2711
|
+
d && clearInterval(d), u && (u.destroy(), u = null);
|
|
2695
2712
|
};
|
|
2696
2713
|
}, [o, _]), X(() => {
|
|
2697
2714
|
s && r && r({ map: s, ...i });
|
|
@@ -2707,10 +2724,10 @@ const Fo = (e) => {
|
|
|
2707
2724
|
);
|
|
2708
2725
|
};
|
|
2709
2726
|
Ct.displayName = "Map";
|
|
2710
|
-
const
|
|
2727
|
+
const Oo = "위치 정보를 불러오는 데 실패했어요.", zo = "위치 서비스 권한과 네트워크 상태를 확인해주세요.", Ia = ({
|
|
2711
2728
|
isActive: e = !1,
|
|
2712
|
-
errorMessage: r =
|
|
2713
|
-
errorDescription: n =
|
|
2729
|
+
errorMessage: r = Oo,
|
|
2730
|
+
errorDescription: n = zo
|
|
2714
2731
|
}) => {
|
|
2715
2732
|
const [t, o] = L(!1), [s, a] = L(!1), [i, c] = L(null), p = oe(!1);
|
|
2716
2733
|
return X(() => {
|
|
@@ -2719,7 +2736,7 @@ const $o = "위치 정보를 불러오는 데 실패했어요.", Ro = "위치
|
|
|
2719
2736
|
p.current = !0, requestAnimationFrame(() => {
|
|
2720
2737
|
o(!0);
|
|
2721
2738
|
});
|
|
2722
|
-
const
|
|
2739
|
+
const m = {
|
|
2723
2740
|
enableHighAccuracy: !0,
|
|
2724
2741
|
timeout: 1e4,
|
|
2725
2742
|
maximumAge: 0
|
|
@@ -2736,7 +2753,7 @@ const $o = "위치 정보를 불러오는 데 실패했어요.", Ro = "위치
|
|
|
2736
2753
|
message: `${r} ${n}`
|
|
2737
2754
|
}), o(!1), a(!0), p.current = !1;
|
|
2738
2755
|
},
|
|
2739
|
-
|
|
2756
|
+
m
|
|
2740
2757
|
);
|
|
2741
2758
|
}
|
|
2742
2759
|
}, [e, r, n]), { position: i, isLoading: t, isError: s };
|
|
@@ -2749,7 +2766,7 @@ const $o = "위치 정보를 불러오는 데 실패했어요.", Ro = "위치
|
|
|
2749
2766
|
});
|
|
2750
2767
|
}), r.join(`
|
|
2751
2768
|
`);
|
|
2752
|
-
},
|
|
2769
|
+
}, Ho = (e = "light") => {
|
|
2753
2770
|
const r = document.getElementById("pop-ui-theme-vars");
|
|
2754
2771
|
r && r.remove();
|
|
2755
2772
|
const n = document.createElement("style");
|
|
@@ -2776,7 +2793,7 @@ const $o = "위치 정보를 불러오는 데 실패했어요.", Ro = "위치
|
|
|
2776
2793
|
ee(e, n[8] || n[n.length - 1]),
|
|
2777
2794
|
ee(e, n[9] || n[n.length - 1])
|
|
2778
2795
|
];
|
|
2779
|
-
},
|
|
2796
|
+
}, Yo = Nt({
|
|
2780
2797
|
colors: {
|
|
2781
2798
|
gray: re("gray"),
|
|
2782
2799
|
aqua: re("aqua"),
|
|
@@ -2791,7 +2808,7 @@ const $o = "위치 정보를 불러오는 데 실패했어요.", Ro = "위치
|
|
|
2791
2808
|
primaryColor: "aqua",
|
|
2792
2809
|
primaryShade: 5,
|
|
2793
2810
|
fontFamily: 'Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
|
|
2794
|
-
}), Dt = Fe(void 0), xt = Fe({}),
|
|
2811
|
+
}), Dt = Fe(void 0), xt = Fe({}), La = ({
|
|
2795
2812
|
children: e,
|
|
2796
2813
|
defaultTheme: r = "light",
|
|
2797
2814
|
naverClientId: n,
|
|
@@ -2802,12 +2819,12 @@ const $o = "위치 정보를 불러오는 데 실패했어요.", Ro = "위치
|
|
|
2802
2819
|
}) => {
|
|
2803
2820
|
const [i, c] = L(r);
|
|
2804
2821
|
X(() => {
|
|
2805
|
-
|
|
2822
|
+
Ho(i), document.documentElement.setAttribute("data-theme", i);
|
|
2806
2823
|
}, [i]);
|
|
2807
2824
|
const p = () => {
|
|
2808
|
-
c((
|
|
2825
|
+
c((m) => m === "light" ? "dark" : "light");
|
|
2809
2826
|
};
|
|
2810
|
-
return /* @__PURE__ */ l(Dt.Provider, { value: { theme: i, setTheme: c, toggleTheme: p }, children: /* @__PURE__ */ l(xt.Provider, { value: { naverClientId: n }, children: /* @__PURE__ */ x(Ft, { theme:
|
|
2827
|
+
return /* @__PURE__ */ l(Dt.Provider, { value: { theme: i, setTheme: c, toggleTheme: p }, children: /* @__PURE__ */ l(xt.Provider, { value: { naverClientId: n }, children: /* @__PURE__ */ x(Ft, { theme: Yo, children: [
|
|
2811
2828
|
/* @__PURE__ */ l(
|
|
2812
2829
|
dr,
|
|
2813
2830
|
{
|
|
@@ -2819,22 +2836,22 @@ const $o = "위치 정보를 불러오는 데 실패했어요.", Ro = "위치
|
|
|
2819
2836
|
),
|
|
2820
2837
|
e
|
|
2821
2838
|
] }) }) });
|
|
2822
|
-
},
|
|
2839
|
+
}, Ba = () => {
|
|
2823
2840
|
const e = $e(Dt);
|
|
2824
2841
|
if (!e)
|
|
2825
2842
|
throw new Error("useTheme must be used within ThemeProvider");
|
|
2826
2843
|
return e;
|
|
2827
|
-
},
|
|
2828
|
-
MapInfo:
|
|
2829
|
-
MapInfo__NoClientId:
|
|
2830
|
-
MapInfo__Preview:
|
|
2831
|
-
MapInfo__ExpandButton:
|
|
2832
|
-
MapInfo__AddressBar:
|
|
2833
|
-
MapInfo__AddressContent:
|
|
2834
|
-
MapInfo__Address:
|
|
2835
|
-
MapInfo__DirectionLink:
|
|
2836
|
-
MapInfo__DirectionButton:
|
|
2837
|
-
},
|
|
2844
|
+
}, Wo = () => $e(xt), Zo = "styles-module__MapInfo___scB-5", jo = "styles-module__MapInfo__NoClientId___YBM4o", Uo = "styles-module__MapInfo__Preview___FJbQN", Vo = "styles-module__MapInfo__ExpandButton___8KySg", Go = "styles-module__MapInfo__AddressBar___mKkK6", Ko = "styles-module__MapInfo__AddressContent___XG1Uz", Jo = "styles-module__MapInfo__Address___iXO6N", Xo = "styles-module__MapInfo__DirectionLink___eGnf-", qo = "styles-module__MapInfo__DirectionButton___gTWpj", te = {
|
|
2845
|
+
MapInfo: Zo,
|
|
2846
|
+
MapInfo__NoClientId: jo,
|
|
2847
|
+
MapInfo__Preview: Uo,
|
|
2848
|
+
MapInfo__ExpandButton: Vo,
|
|
2849
|
+
MapInfo__AddressBar: Go,
|
|
2850
|
+
MapInfo__AddressContent: Ko,
|
|
2851
|
+
MapInfo__Address: Jo,
|
|
2852
|
+
MapInfo__DirectionLink: Xo,
|
|
2853
|
+
MapInfo__DirectionButton: qo
|
|
2854
|
+
}, Qo = 60, va = ({
|
|
2838
2855
|
location: e,
|
|
2839
2856
|
marker: r,
|
|
2840
2857
|
direction: n,
|
|
@@ -2844,49 +2861,49 @@ const $o = "위치 정보를 불러오는 데 실패했어요.", Ro = "위치
|
|
|
2844
2861
|
onClick: a,
|
|
2845
2862
|
height: i = 200
|
|
2846
2863
|
}) => {
|
|
2847
|
-
const c =
|
|
2864
|
+
const c = Wo(), p = o || c.naverClientId, { title: m, address: _, latitude: u, longitude: d } = e, f = n?.label ?? "길찾기", h = t?.addressCopied ?? "주소 복사 완료", [y, g] = L(null), k = i - Qo, P = Y((M) => {
|
|
2848
2865
|
M && M.map && g(M);
|
|
2849
2866
|
}, []), O = Y(() => {
|
|
2850
2867
|
s?.();
|
|
2851
2868
|
}, [s]), N = Y(
|
|
2852
2869
|
(M, C, E) => {
|
|
2853
|
-
if (M && M.map &&
|
|
2870
|
+
if (M && M.map && u && d)
|
|
2854
2871
|
try {
|
|
2855
2872
|
M.addMarker(C), E?.();
|
|
2856
2873
|
} catch (A) {
|
|
2857
2874
|
console.error("Error creating map marker:", A);
|
|
2858
2875
|
}
|
|
2859
2876
|
},
|
|
2860
|
-
[
|
|
2877
|
+
[u, d]
|
|
2861
2878
|
), W = Y(
|
|
2862
2879
|
(M, C) => {
|
|
2863
|
-
M && M.map &&
|
|
2880
|
+
M && M.map && u && d && (M.clearMarkers(), N(
|
|
2864
2881
|
M,
|
|
2865
2882
|
{
|
|
2866
|
-
id: `location-marker-${
|
|
2883
|
+
id: `location-marker-${m}`,
|
|
2867
2884
|
type: C,
|
|
2868
|
-
position: { latitude:
|
|
2869
|
-
title:
|
|
2885
|
+
position: { latitude: u, longitude: d },
|
|
2886
|
+
title: m,
|
|
2870
2887
|
icon: r?.imageUrl,
|
|
2871
2888
|
address: _
|
|
2872
2889
|
},
|
|
2873
2890
|
() => {
|
|
2874
|
-
M.panTo({ latitude:
|
|
2891
|
+
M.panTo({ latitude: u, longitude: d });
|
|
2875
2892
|
}
|
|
2876
2893
|
));
|
|
2877
2894
|
},
|
|
2878
|
-
[
|
|
2895
|
+
[u, d, m, r?.imageUrl, _, N]
|
|
2879
2896
|
);
|
|
2880
2897
|
X(() => {
|
|
2881
|
-
|
|
2882
|
-
}, [y,
|
|
2898
|
+
u && d && y && W(y, "pi");
|
|
2899
|
+
}, [y, u, d, W]), X(() => () => {
|
|
2883
2900
|
g(null);
|
|
2884
2901
|
}, []);
|
|
2885
2902
|
const z = Y(() => {
|
|
2886
2903
|
typeof navigator < "u" && navigator.clipboard && (navigator.clipboard.writeText(_), se(h));
|
|
2887
|
-
}, [_, h]), B = Ne(() => n?.url ? n.url : `https://map.naver.com/p/search/${encodeURIComponent(
|
|
2904
|
+
}, [_, h]), B = Ne(() => n?.url ? n.url : `https://map.naver.com/p/search/${encodeURIComponent(m)}`, [n?.url, m]);
|
|
2888
2905
|
return p ? /* @__PURE__ */ x("div", { className: te.MapInfo, style: { height: i }, onClick: a, children: [
|
|
2889
|
-
/* @__PURE__ */ l(
|
|
2906
|
+
/* @__PURE__ */ l(Fo, { clientId: p, children: /* @__PURE__ */ x("div", { className: te.MapInfo__Preview, onClick: O, children: [
|
|
2890
2907
|
/* @__PURE__ */ l(
|
|
2891
2908
|
Ct,
|
|
2892
2909
|
{
|
|
@@ -2895,7 +2912,7 @@ const $o = "위치 정보를 불러오는 데 실패했어요.", Ro = "위치
|
|
|
2895
2912
|
width: "100%",
|
|
2896
2913
|
height: `${k}px`,
|
|
2897
2914
|
center: {
|
|
2898
|
-
lat:
|
|
2915
|
+
lat: u,
|
|
2899
2916
|
lng: d
|
|
2900
2917
|
},
|
|
2901
2918
|
zoom: 15,
|
|
@@ -2944,32 +2961,32 @@ const $o = "위치 정보를 불러오는 데 실패했어요.", Ro = "위치
|
|
|
2944
2961
|
export {
|
|
2945
2962
|
he as Button,
|
|
2946
2963
|
Wr as CalendarDatePicker,
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2964
|
+
fa as Checkbox,
|
|
2965
|
+
ha as DatePicker,
|
|
2966
|
+
ga as Dropdown,
|
|
2967
|
+
ya as ImageInput,
|
|
2968
|
+
ka as LottieInput,
|
|
2952
2969
|
Ct as Map,
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2970
|
+
va as MapInfo,
|
|
2971
|
+
In as Modal,
|
|
2972
|
+
Fo as NaverMapProvider,
|
|
2973
|
+
Ca as Pagination,
|
|
2974
|
+
La as PopUiProvider,
|
|
2975
|
+
Da as Radio,
|
|
2976
|
+
xa as SearchBar,
|
|
2977
|
+
Pa as SegmentButton,
|
|
2978
|
+
Ma as Tab,
|
|
2979
|
+
ba as TextField,
|
|
2980
|
+
Sa as TimePicker,
|
|
2981
|
+
Ta as Toggle,
|
|
2982
|
+
wa as Tooltip,
|
|
2966
2983
|
Ge as getMarkerHTML,
|
|
2967
|
-
|
|
2968
|
-
|
|
2984
|
+
$o as makeMarkerClustering,
|
|
2985
|
+
Ao as markerStyles,
|
|
2969
2986
|
se as toast,
|
|
2970
|
-
|
|
2971
|
-
|
|
2987
|
+
Ia as useLocation,
|
|
2988
|
+
Ro as useMap,
|
|
2972
2989
|
kt as useNaverMap,
|
|
2973
|
-
|
|
2974
|
-
|
|
2990
|
+
Wo as usePopUIConfig,
|
|
2991
|
+
Ba as useTheme
|
|
2975
2992
|
};
|