@pop-ui/core 0.0.37 → 0.0.39
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/core.css +1 -1
- package/dist/core.js +1615 -610
- package/dist/core.umd.cjs +323 -5
- package/dist/types/index.d.ts +154 -0
- package/package.json +3 -3
package/dist/core.js
CHANGED
|
@@ -1,171 +1,171 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { TextColorButtonTextPrimaryDefault as
|
|
5
|
-
import { notifications as
|
|
6
|
-
import { DatePicker as
|
|
7
|
-
import
|
|
1
|
+
import { jsx as l, jsxs as y, Fragment as ke } from "react/jsx-runtime";
|
|
2
|
+
import { Button as Ne, Loader as $e, Checkbox as Oe, Input as P, Tooltip as j, Select as ze, Modal as He, Radio as Re, Autocomplete as Ue, SegmentedControl as Ze, Tabs as Y, Textarea as Ye, ActionIcon as We, Switch as je, createTheme as Ve, MantineProvider as Ge } from "@mantine/core";
|
|
3
|
+
import { useMemo as U, useState as k, useCallback as b, useEffect as D, useRef as O, createContext as oe, useContext as re } from "react";
|
|
4
|
+
import { TextColorButtonTextPrimaryDefault as R, TextColorButtonTextBasicDefault as be, TextColorButtonTextPrimarylineDefault as Be, TextColorButtonTextWarningDisabled as se, BgColorButtonBgWarningDisabled as ae, TextColorButtonTextWarningFocused as ie, BgColorButtonBgWarningFocused as le, TextColorButtonTextWarningPressed as ce, BgColorButtonBgWarningPressed as de, TextColorButtonTextWarningHover as _e, BgColorButtonBgWarningHover as ue, TextColorButtonTextWarningDefault as me, BgColorButtonBgWarningDefault as pe, TextColorButtonTextSettingDisabled as Je, BgColorButtonBgSettingDisabled as Ke, TextColorButtonTextSettingFocused as qe, BgColorButtonBgSettingFocused as Qe, TextColorButtonTextSettingPressed as Xe, BgColorButtonBgSettingPressed as et, TextColorButtonTextSettingHover as tt, BgColorButtonBgSettingHover as ot, TextColorButtonTextSettingDefault as rt, BgColorButtonBgSettingDefault as nt, TextColorButtonTextBasicDisabled as st, BgColorButtonBgBasicDisabled as at, BorderColorButtonBorderBasicFocused as it, TextColorButtonTextBasicFocused as lt, BgColorButtonBgBasicFocused as ct, BorderColorButtonBorderBasicPressed as dt, TextColorButtonTextBasicPressed as _t, BgColorButtonBgBasicPreseed as ut, BorderColorButtonBorderBasicHover as mt, TextColorButtonTextBasicHover as pt, BgColorButtonBgBasicHover as gt, BorderColorButtonBorderBasicDefault as ht, BgColorButtonBgBasicDefault as ft, TextColorButtonTextPrimarylineDisabled as xt, BgColorButtonBgPrimarylineDisabled as yt, BorderColorButtonBorderPrimarylineFocused as Ct, TextColorButtonTextPrimarylineFocused as kt, BgColorButtonBgPrimarylineFocused as bt, BorderColorButtonBorderPrimarylinePressed as Bt, TextColorButtonTextPrimarylinePressed as Tt, BgColorButtonBgPrimarylinePressed as Mt, BorderColorButtonBorderPrimarylineHover as St, TextColorButtonTextPrimarylineHover as wt, BgColorButtonBgPrimarylineHover as vt, BorderColorButtonBorderPrimarylineDefault as Lt, BgColorButtonBgPrimarylineDefault as It, TextColorButtonTextPrimaryDisabled as Pt, BgColorButtonBgPrimaryDisabled as Dt, TextColorButtonTextPrimaryFocused as Ft, BgColorButtonBgPrimaryFocused as Et, TextColorButtonTextPrimaryPressed as At, BgColorButtonBgPrimaryPressed as Nt, TextColorButtonTextPrimaryHover as $t, BgColorButtonBgPrimaryHover as Ot, BgColorButtonBgPrimaryDefault as zt, IconChevronRight as Te, IconChevronLeft as Me, IconCalendar as ge, IconInfoCircle as ne, IconChevronUp as Ht, IconChevronDown as Rt, IconCloseCircle as Ut, IconPhoto as Zt, IconClose as Se, IconSearch as Yt, IconClock as Wt, colors as we, getCSSVariableName as jt, getCSSVariableRef as L, IconMap as Vt, ColorGray800 as Gt, IconMapMarker as Jt, ColorAqua500 as Kt } from "@pop-ui/foundation";
|
|
5
|
+
import { notifications as V, Notifications as qt } from "@mantine/notifications";
|
|
6
|
+
import { DatePicker as Qt, DateTimePicker as Xt, DatePickerInput as eo, TimeInput as to } from "@mantine/dates";
|
|
7
|
+
import w from "dayjs";
|
|
8
8
|
import "dayjs/locale/ko";
|
|
9
|
-
import { Dropzone as
|
|
10
|
-
const
|
|
11
|
-
primary:
|
|
12
|
-
primaryLine:
|
|
13
|
-
basic:
|
|
14
|
-
danger:
|
|
15
|
-
setting:
|
|
16
|
-
warning:
|
|
17
|
-
},
|
|
9
|
+
import { Dropzone as oo, IMAGE_MIME_TYPE as ro } from "@mantine/dropzone";
|
|
10
|
+
const no = {
|
|
11
|
+
primary: R,
|
|
12
|
+
primaryLine: Be,
|
|
13
|
+
basic: be,
|
|
14
|
+
danger: R,
|
|
15
|
+
setting: R,
|
|
16
|
+
warning: R
|
|
17
|
+
}, so = {
|
|
18
18
|
primary: {
|
|
19
19
|
default: {
|
|
20
|
-
backgroundColor:
|
|
21
|
-
color:
|
|
20
|
+
backgroundColor: zt,
|
|
21
|
+
color: R,
|
|
22
22
|
border: "none"
|
|
23
23
|
},
|
|
24
24
|
hover: {
|
|
25
|
-
backgroundColor:
|
|
26
|
-
color:
|
|
25
|
+
backgroundColor: Ot,
|
|
26
|
+
color: $t
|
|
27
27
|
},
|
|
28
28
|
active: {
|
|
29
|
-
backgroundColor:
|
|
30
|
-
color:
|
|
29
|
+
backgroundColor: Nt,
|
|
30
|
+
color: At
|
|
31
31
|
},
|
|
32
32
|
focus: {
|
|
33
|
-
backgroundColor:
|
|
34
|
-
color:
|
|
33
|
+
backgroundColor: Et,
|
|
34
|
+
color: Ft
|
|
35
35
|
},
|
|
36
36
|
disabled: {
|
|
37
|
-
backgroundColor:
|
|
38
|
-
color:
|
|
37
|
+
backgroundColor: Dt,
|
|
38
|
+
color: Pt,
|
|
39
39
|
cursor: "not-allowed"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
primaryLine: {
|
|
43
43
|
default: {
|
|
44
|
-
backgroundColor:
|
|
45
|
-
color:
|
|
46
|
-
border: `1px solid ${
|
|
44
|
+
backgroundColor: It,
|
|
45
|
+
color: Be,
|
|
46
|
+
border: `1px solid ${Lt}`
|
|
47
47
|
},
|
|
48
48
|
hover: {
|
|
49
|
-
backgroundColor:
|
|
50
|
-
color:
|
|
51
|
-
borderColor:
|
|
49
|
+
backgroundColor: vt,
|
|
50
|
+
color: wt,
|
|
51
|
+
borderColor: St
|
|
52
52
|
},
|
|
53
53
|
active: {
|
|
54
|
-
backgroundColor:
|
|
55
|
-
color:
|
|
56
|
-
borderColor:
|
|
54
|
+
backgroundColor: Mt,
|
|
55
|
+
color: Tt,
|
|
56
|
+
borderColor: Bt
|
|
57
57
|
},
|
|
58
58
|
focus: {
|
|
59
|
-
backgroundColor:
|
|
60
|
-
color:
|
|
61
|
-
borderColor:
|
|
59
|
+
backgroundColor: bt,
|
|
60
|
+
color: kt,
|
|
61
|
+
borderColor: Ct
|
|
62
62
|
},
|
|
63
63
|
disabled: {
|
|
64
|
-
backgroundColor:
|
|
65
|
-
color:
|
|
64
|
+
backgroundColor: yt,
|
|
65
|
+
color: xt,
|
|
66
66
|
cursor: "not-allowed"
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
basic: {
|
|
70
70
|
default: {
|
|
71
|
-
backgroundColor:
|
|
72
|
-
color:
|
|
73
|
-
border: `1px solid ${
|
|
71
|
+
backgroundColor: ft,
|
|
72
|
+
color: be,
|
|
73
|
+
border: `1px solid ${ht}`
|
|
74
74
|
},
|
|
75
75
|
hover: {
|
|
76
|
-
backgroundColor:
|
|
77
|
-
color:
|
|
78
|
-
borderColor:
|
|
76
|
+
backgroundColor: gt,
|
|
77
|
+
color: pt,
|
|
78
|
+
borderColor: mt
|
|
79
79
|
},
|
|
80
80
|
active: {
|
|
81
|
-
backgroundColor:
|
|
82
|
-
color:
|
|
83
|
-
borderColor:
|
|
81
|
+
backgroundColor: ut,
|
|
82
|
+
color: _t,
|
|
83
|
+
borderColor: dt
|
|
84
84
|
},
|
|
85
85
|
focus: {
|
|
86
|
-
backgroundColor:
|
|
87
|
-
color:
|
|
88
|
-
borderColor:
|
|
86
|
+
backgroundColor: ct,
|
|
87
|
+
color: lt,
|
|
88
|
+
borderColor: it
|
|
89
89
|
},
|
|
90
90
|
disabled: {
|
|
91
|
-
backgroundColor:
|
|
92
|
-
color:
|
|
91
|
+
backgroundColor: at,
|
|
92
|
+
color: st,
|
|
93
93
|
cursor: "not-allowed"
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
danger: {
|
|
97
97
|
default: {
|
|
98
|
-
backgroundColor:
|
|
99
|
-
color:
|
|
98
|
+
backgroundColor: pe,
|
|
99
|
+
color: me,
|
|
100
100
|
border: "none"
|
|
101
101
|
},
|
|
102
102
|
hover: {
|
|
103
|
-
backgroundColor:
|
|
104
|
-
color:
|
|
103
|
+
backgroundColor: ue,
|
|
104
|
+
color: _e
|
|
105
105
|
},
|
|
106
106
|
active: {
|
|
107
|
-
backgroundColor:
|
|
108
|
-
color:
|
|
107
|
+
backgroundColor: de,
|
|
108
|
+
color: ce
|
|
109
109
|
},
|
|
110
110
|
focus: {
|
|
111
|
-
backgroundColor:
|
|
112
|
-
color:
|
|
111
|
+
backgroundColor: le,
|
|
112
|
+
color: ie
|
|
113
113
|
},
|
|
114
114
|
disabled: {
|
|
115
|
-
backgroundColor:
|
|
116
|
-
color:
|
|
115
|
+
backgroundColor: ae,
|
|
116
|
+
color: se,
|
|
117
117
|
cursor: "not-allowed"
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
120
|
setting: {
|
|
121
121
|
default: {
|
|
122
|
-
backgroundColor:
|
|
123
|
-
color:
|
|
122
|
+
backgroundColor: nt,
|
|
123
|
+
color: rt,
|
|
124
124
|
border: "none"
|
|
125
125
|
},
|
|
126
126
|
hover: {
|
|
127
|
-
backgroundColor:
|
|
128
|
-
color:
|
|
127
|
+
backgroundColor: ot,
|
|
128
|
+
color: tt
|
|
129
129
|
},
|
|
130
130
|
active: {
|
|
131
|
-
backgroundColor:
|
|
132
|
-
color:
|
|
131
|
+
backgroundColor: et,
|
|
132
|
+
color: Xe
|
|
133
133
|
},
|
|
134
134
|
focus: {
|
|
135
|
-
backgroundColor:
|
|
136
|
-
color:
|
|
135
|
+
backgroundColor: Qe,
|
|
136
|
+
color: qe
|
|
137
137
|
},
|
|
138
138
|
disabled: {
|
|
139
|
-
backgroundColor:
|
|
140
|
-
color:
|
|
139
|
+
backgroundColor: Ke,
|
|
140
|
+
color: Je,
|
|
141
141
|
cursor: "not-allowed"
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
144
|
warning: {
|
|
145
145
|
default: {
|
|
146
|
-
backgroundColor:
|
|
147
|
-
color:
|
|
146
|
+
backgroundColor: pe,
|
|
147
|
+
color: me,
|
|
148
148
|
border: "none"
|
|
149
149
|
},
|
|
150
150
|
hover: {
|
|
151
|
-
backgroundColor:
|
|
152
|
-
color:
|
|
151
|
+
backgroundColor: ue,
|
|
152
|
+
color: _e
|
|
153
153
|
},
|
|
154
154
|
active: {
|
|
155
|
-
backgroundColor:
|
|
156
|
-
color:
|
|
155
|
+
backgroundColor: de,
|
|
156
|
+
color: ce
|
|
157
157
|
},
|
|
158
158
|
focus: {
|
|
159
|
-
backgroundColor:
|
|
160
|
-
color:
|
|
159
|
+
backgroundColor: le,
|
|
160
|
+
color: ie
|
|
161
161
|
},
|
|
162
162
|
disabled: {
|
|
163
|
-
backgroundColor:
|
|
164
|
-
color:
|
|
163
|
+
backgroundColor: ae,
|
|
164
|
+
color: se,
|
|
165
165
|
cursor: "not-allowed"
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
},
|
|
168
|
+
}, ao = {
|
|
169
169
|
lg: {
|
|
170
170
|
height: "50px",
|
|
171
171
|
padding: "0 20px",
|
|
@@ -194,32 +194,32 @@ const Uo = {
|
|
|
194
194
|
fontFamily: "Pretendard"
|
|
195
195
|
}
|
|
196
196
|
};
|
|
197
|
-
function
|
|
198
|
-
const
|
|
197
|
+
function io(t, s) {
|
|
198
|
+
const o = so[t];
|
|
199
199
|
return {
|
|
200
200
|
root: {
|
|
201
|
-
...
|
|
202
|
-
...
|
|
203
|
-
"&:hover:not(:disabled)":
|
|
204
|
-
"&:active:not(:disabled)":
|
|
205
|
-
"&:focus:not(:disabled)":
|
|
206
|
-
"&:disabled":
|
|
201
|
+
...ao[s],
|
|
202
|
+
...o.default,
|
|
203
|
+
"&:hover:not(:disabled)": o.hover,
|
|
204
|
+
"&:active:not(:disabled)": o.active,
|
|
205
|
+
"&:focus:not(:disabled)": o.focus,
|
|
206
|
+
"&:disabled": o.disabled
|
|
207
207
|
}
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
children:
|
|
212
|
-
size:
|
|
213
|
-
variant:
|
|
214
|
-
isLoading:
|
|
215
|
-
disabled:
|
|
216
|
-
...
|
|
210
|
+
function lo({
|
|
211
|
+
children: t,
|
|
212
|
+
size: s = "md",
|
|
213
|
+
variant: o = "primary",
|
|
214
|
+
isLoading: e = !1,
|
|
215
|
+
disabled: r = !1,
|
|
216
|
+
...a
|
|
217
217
|
}) {
|
|
218
|
-
const n =
|
|
219
|
-
() =>
|
|
220
|
-
[
|
|
221
|
-
),
|
|
222
|
-
switch (
|
|
218
|
+
const n = U(
|
|
219
|
+
() => io(o, s),
|
|
220
|
+
[o, s]
|
|
221
|
+
), i = no[o], c = U(() => {
|
|
222
|
+
switch (s) {
|
|
223
223
|
case "lg":
|
|
224
224
|
return 18;
|
|
225
225
|
case "sm":
|
|
@@ -228,92 +228,92 @@ function jt({
|
|
|
228
228
|
default:
|
|
229
229
|
return 16;
|
|
230
230
|
}
|
|
231
|
-
}, [
|
|
231
|
+
}, [s]);
|
|
232
232
|
return /* @__PURE__ */ l(
|
|
233
|
-
|
|
233
|
+
Ne,
|
|
234
234
|
{
|
|
235
235
|
type: "button",
|
|
236
236
|
styles: n,
|
|
237
|
-
disabled:
|
|
238
|
-
...
|
|
239
|
-
children:
|
|
237
|
+
disabled: r || e,
|
|
238
|
+
...a,
|
|
239
|
+
children: e ? /* @__PURE__ */ l($e, { color: i, size: c }) : t
|
|
240
240
|
}
|
|
241
241
|
);
|
|
242
242
|
}
|
|
243
|
-
const
|
|
243
|
+
const J = {
|
|
244
244
|
"Checkbox--Small": "styles-module__Checkbox--Small___VZGlw",
|
|
245
245
|
"Checkbox--Medium": "styles-module__Checkbox--Medium___Vwpa3",
|
|
246
246
|
"Checkbox--Large": "styles-module__Checkbox--Large___ybTGE"
|
|
247
|
-
},
|
|
248
|
-
let
|
|
249
|
-
return
|
|
250
|
-
|
|
247
|
+
}, Pr = ({ size: t = "md", ...s }) => {
|
|
248
|
+
let o = J["Checkbox--Medium"], e = 24;
|
|
249
|
+
return t === "sm" ? (o = J["Checkbox--Small"], e = 18) : t === "lg" && (o = J["Checkbox--Large"], e = 32), /* @__PURE__ */ l(
|
|
250
|
+
Oe,
|
|
251
251
|
{
|
|
252
|
-
className:
|
|
252
|
+
className: o,
|
|
253
253
|
styles: {
|
|
254
254
|
inner: {
|
|
255
|
-
width:
|
|
256
|
-
height:
|
|
255
|
+
width: e,
|
|
256
|
+
height: e
|
|
257
257
|
}
|
|
258
258
|
},
|
|
259
|
-
...
|
|
259
|
+
...s
|
|
260
260
|
}
|
|
261
261
|
);
|
|
262
|
-
},
|
|
263
|
-
datePickerWrapper:
|
|
264
|
-
todayIndicator:
|
|
265
|
-
day:
|
|
266
|
-
calendarHeader:
|
|
267
|
-
calendarHeaderLevel:
|
|
268
|
-
calendarHeaderControl:
|
|
269
|
-
month:
|
|
270
|
-
monthRow:
|
|
271
|
-
weekday:
|
|
272
|
-
},
|
|
273
|
-
excludedDays:
|
|
274
|
-
excludedDates:
|
|
262
|
+
}, co = "styles-module__datePickerWrapper___8Bdcn", _o = "styles-module__todayIndicator___Zl0e4", uo = "styles-module__day___DaYHh", mo = "styles-module__calendarHeader___9j1oi", po = "styles-module__calendarHeaderLevel___wHs50", go = "styles-module__calendarHeaderControl___k317W", ho = "styles-module__month___doF-A", fo = "styles-module__monthRow___ksziO", xo = "styles-module__weekday___PVnxV", E = {
|
|
263
|
+
datePickerWrapper: co,
|
|
264
|
+
todayIndicator: _o,
|
|
265
|
+
day: uo,
|
|
266
|
+
calendarHeader: mo,
|
|
267
|
+
calendarHeaderLevel: po,
|
|
268
|
+
calendarHeaderControl: go,
|
|
269
|
+
month: ho,
|
|
270
|
+
monthRow: fo,
|
|
271
|
+
weekday: xo
|
|
272
|
+
}, yo = ({
|
|
273
|
+
excludedDays: t = [],
|
|
274
|
+
excludedDates: s = []
|
|
275
275
|
}) => {
|
|
276
|
-
const
|
|
277
|
-
for (const n of
|
|
278
|
-
typeof n == "string" ?
|
|
279
|
-
const
|
|
276
|
+
const o = [], e = [];
|
|
277
|
+
for (const n of s)
|
|
278
|
+
typeof n == "string" ? o.push(n) : e.push(n);
|
|
279
|
+
const r = o.map((n) => w(n)).filter((n) => n.isValid()).map((n) => n.format("YYYY-MM-DD")), a = e.map(([n, i]) => [w(n), w(i)]).filter(([n, i]) => n.isValid() && i.isValid());
|
|
280
280
|
return (n) => {
|
|
281
|
-
const
|
|
282
|
-
if (!
|
|
283
|
-
if (Array.isArray(
|
|
281
|
+
const i = w(n);
|
|
282
|
+
if (!i.isValid()) return !1;
|
|
283
|
+
if (Array.isArray(t) && t.includes(i.day()) || r.includes(i.format("YYYY-MM-DD")))
|
|
284
284
|
return !0;
|
|
285
|
-
for (const [
|
|
286
|
-
if ((
|
|
285
|
+
for (const [c, m] of a)
|
|
286
|
+
if ((i.isSame(c, "day") || i.isAfter(c, "day")) && (i.isSame(m, "day") || i.isBefore(m, "day")))
|
|
287
287
|
return !0;
|
|
288
288
|
return !1;
|
|
289
289
|
};
|
|
290
|
-
},
|
|
291
|
-
const
|
|
292
|
-
for (const n of
|
|
290
|
+
}, Co = (t, s, o, e) => {
|
|
291
|
+
const r = w(t), a = w(s);
|
|
292
|
+
for (const n of o)
|
|
293
293
|
if (Array.isArray(n)) {
|
|
294
|
-
const
|
|
295
|
-
if (!
|
|
296
|
-
if (!(
|
|
294
|
+
const i = w(n[0]), c = w(n[1]);
|
|
295
|
+
if (!i.isValid() || !c.isValid()) continue;
|
|
296
|
+
if (!(a.isBefore(i, "day") || r.isAfter(c, "day")))
|
|
297
297
|
return !0;
|
|
298
298
|
}
|
|
299
|
-
for (const n of
|
|
299
|
+
for (const n of o)
|
|
300
300
|
if (typeof n == "string") {
|
|
301
|
-
const
|
|
302
|
-
if (!
|
|
303
|
-
if ((
|
|
301
|
+
const i = w(n);
|
|
302
|
+
if (!i.isValid()) continue;
|
|
303
|
+
if ((i.isSame(r, "day") || i.isAfter(r, "day")) && (i.isSame(a, "day") || i.isBefore(a, "day")))
|
|
304
304
|
return !0;
|
|
305
305
|
}
|
|
306
|
-
if (
|
|
307
|
-
let n =
|
|
308
|
-
for (; n.isBefore(
|
|
309
|
-
if (
|
|
306
|
+
if (e.length > 0) {
|
|
307
|
+
let n = r;
|
|
308
|
+
for (; n.isBefore(a, "day") || n.isSame(a, "day"); ) {
|
|
309
|
+
if (e.includes(n.day()))
|
|
310
310
|
return !0;
|
|
311
311
|
n = n.add(1, "day");
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
return !1;
|
|
315
|
-
},
|
|
316
|
-
switch (
|
|
315
|
+
}, $ = (t = "default") => {
|
|
316
|
+
switch (t) {
|
|
317
317
|
case "range":
|
|
318
318
|
return [null, null];
|
|
319
319
|
case "multiple":
|
|
@@ -321,131 +321,131 @@ const $ = {
|
|
|
321
321
|
default:
|
|
322
322
|
return null;
|
|
323
323
|
}
|
|
324
|
-
},
|
|
325
|
-
type:
|
|
326
|
-
externalValue:
|
|
327
|
-
internalValue:
|
|
328
|
-
}) =>
|
|
329
|
-
const
|
|
330
|
-
const
|
|
331
|
-
const
|
|
332
|
-
return
|
|
324
|
+
}, he = (t = "default", s) => s == null ? $(t) : t === "range" ? Array.isArray(s) ? s : $("range") : t === "multiple" ? Array.isArray(s) ? s : $("multiple") : Array.isArray(s) ? s[0] ?? null : s, ko = ({
|
|
325
|
+
type: t,
|
|
326
|
+
externalValue: s,
|
|
327
|
+
internalValue: o
|
|
328
|
+
}) => s !== void 0 ? he(t, s) : o !== void 0 ? he(t, o) : $(t), bo = (t, s) => {
|
|
329
|
+
const o = (e, r) => {
|
|
330
|
+
const a = Object.keys(e).reduce((n, i) => {
|
|
331
|
+
const c = i, m = e[c], _ = r[c], d = [m, _].filter(Boolean).join(" ");
|
|
332
|
+
return d && (n[c] = d), n;
|
|
333
333
|
}, {});
|
|
334
|
-
return Object.keys(
|
|
335
|
-
const
|
|
336
|
-
!(
|
|
337
|
-
}),
|
|
334
|
+
return Object.keys(r).forEach((n) => {
|
|
335
|
+
const i = n, c = r[i];
|
|
336
|
+
!(i in e) && c && (a[i] = c);
|
|
337
|
+
}), a;
|
|
338
338
|
};
|
|
339
|
-
return typeof
|
|
340
|
-
},
|
|
341
|
-
levelsGroup:
|
|
342
|
-
calendarHeader:
|
|
343
|
-
calendarHeaderLevel:
|
|
344
|
-
calendarHeaderControl:
|
|
345
|
-
month:
|
|
346
|
-
day:
|
|
347
|
-
monthRow:
|
|
348
|
-
weekday:
|
|
349
|
-
},
|
|
350
|
-
excludedDates:
|
|
351
|
-
excludedDays:
|
|
352
|
-
type:
|
|
353
|
-
value:
|
|
354
|
-
onChange:
|
|
355
|
-
highlightToday:
|
|
339
|
+
return typeof s == "function" ? (e, r, a) => o(t, s(e, r, a)) : typeof s == "object" && s !== null && !Array.isArray(s) ? o(t, s) : t;
|
|
340
|
+
}, Bo = {
|
|
341
|
+
levelsGroup: E.datePickerWrapper,
|
|
342
|
+
calendarHeader: E.calendarHeader,
|
|
343
|
+
calendarHeaderLevel: E.calendarHeaderLevel,
|
|
344
|
+
calendarHeaderControl: E.calendarHeaderControl,
|
|
345
|
+
month: E.month,
|
|
346
|
+
day: E.day,
|
|
347
|
+
monthRow: E.monthRow,
|
|
348
|
+
weekday: E.weekday
|
|
349
|
+
}, Dr = ({
|
|
350
|
+
excludedDates: t = [],
|
|
351
|
+
excludedDays: s = [],
|
|
352
|
+
type: o = "default",
|
|
353
|
+
value: e,
|
|
354
|
+
onChange: r,
|
|
355
|
+
highlightToday: a = !1,
|
|
356
356
|
...n
|
|
357
357
|
}) => {
|
|
358
|
-
const [
|
|
359
|
-
() =>
|
|
360
|
-
),
|
|
361
|
-
() =>
|
|
362
|
-
excludedDays:
|
|
363
|
-
excludedDates:
|
|
358
|
+
const [i, c] = k(
|
|
359
|
+
() => e ?? $(o)
|
|
360
|
+
), m = U(
|
|
361
|
+
() => yo({
|
|
362
|
+
excludedDays: s,
|
|
363
|
+
excludedDates: t
|
|
364
364
|
}),
|
|
365
|
-
[
|
|
366
|
-
),
|
|
367
|
-
if (
|
|
368
|
-
const [
|
|
369
|
-
if (
|
|
370
|
-
const
|
|
371
|
-
|
|
365
|
+
[s, t]
|
|
366
|
+
), _ = (f) => {
|
|
367
|
+
if (o === "range" && Array.isArray(f) && f.length === 2) {
|
|
368
|
+
const [x, M] = f;
|
|
369
|
+
if (x && M && Co(x, M, t, s)) {
|
|
370
|
+
const v = $("range");
|
|
371
|
+
c(v), r?.(v);
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
|
|
376
|
-
},
|
|
377
|
-
type:
|
|
378
|
-
externalValue:
|
|
379
|
-
internalValue:
|
|
380
|
-
}),
|
|
381
|
-
(
|
|
382
|
-
const
|
|
383
|
-
return /* @__PURE__ */
|
|
384
|
-
|
|
385
|
-
|
|
375
|
+
c(f), r?.(f);
|
|
376
|
+
}, d = ko({
|
|
377
|
+
type: o,
|
|
378
|
+
externalValue: e,
|
|
379
|
+
internalValue: i
|
|
380
|
+
}), p = b(
|
|
381
|
+
(f) => {
|
|
382
|
+
const x = w(f).date(), v = w(f).isSame(w(), "day") && a;
|
|
383
|
+
return /* @__PURE__ */ y(ke, { children: [
|
|
384
|
+
x,
|
|
385
|
+
v && /* @__PURE__ */ l("span", { className: E.todayIndicator, children: "오늘" })
|
|
386
386
|
] });
|
|
387
387
|
},
|
|
388
|
-
[
|
|
389
|
-
), { classNames:
|
|
388
|
+
[a]
|
|
389
|
+
), { classNames: u, ...g } = n, h = bo(Bo, u);
|
|
390
390
|
return /* @__PURE__ */ l(
|
|
391
|
-
|
|
391
|
+
Qt,
|
|
392
392
|
{
|
|
393
393
|
locale: "ko",
|
|
394
394
|
firstDayOfWeek: 0,
|
|
395
395
|
monthLabelFormat: "YYYY년 M월",
|
|
396
396
|
maxLevel: "month",
|
|
397
|
-
type:
|
|
398
|
-
previousIcon: /* @__PURE__ */ l(
|
|
397
|
+
type: o,
|
|
398
|
+
previousIcon: /* @__PURE__ */ l(Me, {}),
|
|
399
399
|
nextIcon: /* @__PURE__ */ l(Te, {}),
|
|
400
|
-
...
|
|
400
|
+
...g,
|
|
401
401
|
size: "lg",
|
|
402
|
-
onChange:
|
|
402
|
+
onChange: _,
|
|
403
403
|
weekendDays: [0],
|
|
404
|
-
highlightToday:
|
|
404
|
+
highlightToday: a,
|
|
405
405
|
classNames: h,
|
|
406
|
-
value:
|
|
407
|
-
excludeDate:
|
|
408
|
-
renderDay:
|
|
406
|
+
value: d,
|
|
407
|
+
excludeDate: m,
|
|
408
|
+
renderDay: p
|
|
409
409
|
}
|
|
410
410
|
);
|
|
411
|
-
},
|
|
411
|
+
}, K = {
|
|
412
412
|
"DatePicker--Small": "styles-module__DatePicker--Small___m8asv",
|
|
413
413
|
"DatePicker--Medium": "styles-module__DatePicker--Medium___Po2-B",
|
|
414
414
|
"DatePicker--Large": "styles-module__DatePicker--Large___oQ6EM"
|
|
415
|
-
},
|
|
416
|
-
size:
|
|
417
|
-
type:
|
|
418
|
-
withTime:
|
|
419
|
-
...
|
|
415
|
+
}, Fr = ({
|
|
416
|
+
size: t = "md",
|
|
417
|
+
type: s = "default",
|
|
418
|
+
withTime: o,
|
|
419
|
+
...e
|
|
420
420
|
}) => {
|
|
421
|
-
let
|
|
422
|
-
return
|
|
423
|
-
|
|
421
|
+
let r = K["DatePicker--Medium"], a = 18;
|
|
422
|
+
return t === "sm" ? (r = K["DatePicker--Small"], a = 14) : t === "lg" && (r = K["DatePicker--Large"], a = 24), o ? /* @__PURE__ */ l(
|
|
423
|
+
Xt,
|
|
424
424
|
{
|
|
425
|
-
className:
|
|
426
|
-
size:
|
|
425
|
+
className: r,
|
|
426
|
+
size: t,
|
|
427
427
|
locale: "ko",
|
|
428
428
|
firstDayOfWeek: 0,
|
|
429
429
|
monthLabelFormat: "YYYY년 MM월",
|
|
430
430
|
valueFormat: "YYYY-MM-DD | a hh:mm",
|
|
431
|
-
rightSection: /* @__PURE__ */ l(
|
|
432
|
-
...
|
|
431
|
+
rightSection: /* @__PURE__ */ l(ge, { size: a }),
|
|
432
|
+
...e
|
|
433
433
|
}
|
|
434
434
|
) : /* @__PURE__ */ l(
|
|
435
|
-
|
|
435
|
+
eo,
|
|
436
436
|
{
|
|
437
|
-
className:
|
|
438
|
-
type:
|
|
439
|
-
size:
|
|
437
|
+
className: r,
|
|
438
|
+
type: s,
|
|
439
|
+
size: t,
|
|
440
440
|
locale: "ko",
|
|
441
441
|
firstDayOfWeek: 0,
|
|
442
442
|
monthLabelFormat: "YYYY년 MM월",
|
|
443
443
|
valueFormat: "YYYY-MM-DD",
|
|
444
|
-
rightSection: /* @__PURE__ */ l(
|
|
445
|
-
...
|
|
444
|
+
rightSection: /* @__PURE__ */ l(ge, { size: a }),
|
|
445
|
+
...e
|
|
446
446
|
}
|
|
447
447
|
);
|
|
448
|
-
},
|
|
448
|
+
}, To = "styles-module__Dropdown__Description___OQ8bF", Mo = "styles-module__Dropdown__ErrorMsg___xTP0Y", S = {
|
|
449
449
|
"Dropdown--LeftLabel": "styles-module__Dropdown--LeftLabel___SFObq",
|
|
450
450
|
"Dropdown--TopLabel": "styles-module__Dropdown--TopLabel___-lPhr",
|
|
451
451
|
"Dropdown__Label--Small": "styles-module__Dropdown__Label--Small___xbzOR",
|
|
@@ -457,41 +457,41 @@ const $ = {
|
|
|
457
457
|
"Dropdown--Small": "styles-module__Dropdown--Small___dRIK7",
|
|
458
458
|
"Dropdown--Medium": "styles-module__Dropdown--Medium___-HZoU",
|
|
459
459
|
"Dropdown--Large": "styles-module__Dropdown--Large___BvV3M",
|
|
460
|
-
Dropdown__Description:
|
|
461
|
-
Dropdown__ErrorMsg:
|
|
462
|
-
},
|
|
463
|
-
label:
|
|
464
|
-
labelPosition:
|
|
465
|
-
size:
|
|
466
|
-
required:
|
|
467
|
-
tooltip:
|
|
468
|
-
tooltipPosition:
|
|
460
|
+
Dropdown__Description: To,
|
|
461
|
+
Dropdown__ErrorMsg: Mo
|
|
462
|
+
}, Er = ({
|
|
463
|
+
label: t,
|
|
464
|
+
labelPosition: s = "top",
|
|
465
|
+
size: o = "md",
|
|
466
|
+
required: e,
|
|
467
|
+
tooltip: r,
|
|
468
|
+
tooltipPosition: a = "top",
|
|
469
469
|
errorMsg: n,
|
|
470
|
-
description:
|
|
471
|
-
...
|
|
470
|
+
description: i,
|
|
471
|
+
...c
|
|
472
472
|
}) => {
|
|
473
|
-
const [
|
|
474
|
-
let
|
|
475
|
-
return
|
|
473
|
+
const [m, _] = k(!1);
|
|
474
|
+
let d = S["Dropdown__Label--Medium"], p = S["Dropdown--Medium"], u = S["Dropdown__Tooltip--Medium"], g = 18;
|
|
475
|
+
return o === "sm" ? (d = S["Dropdown__Label--Small"], p = S["Dropdown--Small"], u = S["Dropdown__Tooltip--Small"], g = 14) : o === "lg" && (d = S["Dropdown__Label--Large"], p = S["Dropdown--Large"], u = S["Dropdown__Tooltip--Large"], g = 24), /* @__PURE__ */ y(
|
|
476
476
|
"div",
|
|
477
477
|
{
|
|
478
|
-
className:
|
|
478
|
+
className: s === "top" ? S["Dropdown--TopLabel"] : S["Dropdown--LeftLabel"],
|
|
479
479
|
children: [
|
|
480
|
-
/* @__PURE__ */
|
|
481
|
-
|
|
482
|
-
|
|
480
|
+
/* @__PURE__ */ y("div", { children: [
|
|
481
|
+
t && /* @__PURE__ */ l(P.Label, { required: e, className: d, children: t }),
|
|
482
|
+
r && /* @__PURE__ */ l(j, { label: r, position: a, children: /* @__PURE__ */ l("div", { className: u, children: /* @__PURE__ */ l(ne, { size: o === "sm" ? 14 : o === "lg" ? 20 : 16 }) }) })
|
|
483
483
|
] }),
|
|
484
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ y("div", { children: [
|
|
485
485
|
/* @__PURE__ */ l(
|
|
486
|
-
|
|
486
|
+
ze,
|
|
487
487
|
{
|
|
488
|
-
...
|
|
489
|
-
size:
|
|
488
|
+
...c,
|
|
489
|
+
size: o,
|
|
490
490
|
error: n,
|
|
491
|
-
className:
|
|
492
|
-
rightSection:
|
|
493
|
-
onDropdownOpen: () =>
|
|
494
|
-
onDropdownClose: () =>
|
|
491
|
+
className: p,
|
|
492
|
+
rightSection: m ? /* @__PURE__ */ l(Ht, { size: g }) : /* @__PURE__ */ l(Rt, { size: g }),
|
|
493
|
+
onDropdownOpen: () => _(!0),
|
|
494
|
+
onDropdownClose: () => _(!1),
|
|
495
495
|
styles: {
|
|
496
496
|
option: {
|
|
497
497
|
"&[data-selected]": {
|
|
@@ -504,113 +504,113 @@ const $ = {
|
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
),
|
|
507
|
-
|
|
508
|
-
n && /* @__PURE__ */ l(
|
|
507
|
+
i && /* @__PURE__ */ l(P.Description, { className: S.Dropdown__Description, children: i }),
|
|
508
|
+
n && /* @__PURE__ */ l(P.Error, { className: S.Dropdown__ErrorMsg, children: n })
|
|
509
509
|
] })
|
|
510
510
|
]
|
|
511
511
|
}
|
|
512
512
|
);
|
|
513
|
-
},
|
|
514
|
-
ImageUploader:
|
|
515
|
-
ImageUploader__Preview:
|
|
516
|
-
ImageUploader__Wrapper:
|
|
517
|
-
ImageUploader__FileClearButton:
|
|
518
|
-
},
|
|
519
|
-
width:
|
|
520
|
-
height:
|
|
521
|
-
defaultMsg:
|
|
522
|
-
file:
|
|
523
|
-
onDrop:
|
|
524
|
-
showClearButton:
|
|
513
|
+
}, So = "styles-module__ImageUploader___pO3AP", wo = "styles-module__ImageUploader__Preview___DI5K4", vo = "styles-module__ImageUploader__Wrapper___SpAGM", Lo = "styles-module__ImageUploader__FileClearButton___w1HyS", W = {
|
|
514
|
+
ImageUploader: So,
|
|
515
|
+
ImageUploader__Preview: wo,
|
|
516
|
+
ImageUploader__Wrapper: vo,
|
|
517
|
+
ImageUploader__FileClearButton: Lo
|
|
518
|
+
}, Ar = ({
|
|
519
|
+
width: t,
|
|
520
|
+
height: s,
|
|
521
|
+
defaultMsg: o = "이미지 업로드",
|
|
522
|
+
file: e,
|
|
523
|
+
onDrop: r,
|
|
524
|
+
showClearButton: a,
|
|
525
525
|
onClear: n,
|
|
526
|
-
...
|
|
526
|
+
...i
|
|
527
527
|
}) => {
|
|
528
|
-
const [
|
|
529
|
-
|
|
528
|
+
const [c, m] = k(e), _ = b(() => {
|
|
529
|
+
m(void 0), n && n();
|
|
530
530
|
}, [n]);
|
|
531
|
-
return /* @__PURE__ */
|
|
532
|
-
|
|
531
|
+
return /* @__PURE__ */ y("div", { className: W.ImageUploader__Wrapper, children: [
|
|
532
|
+
a && c ? /* @__PURE__ */ l("div", { className: W.ImageUploader__FileClearButton, onClick: _, children: /* @__PURE__ */ l(Ut, { size: 24 }) }) : null,
|
|
533
533
|
/* @__PURE__ */ l(
|
|
534
|
-
|
|
534
|
+
oo,
|
|
535
535
|
{
|
|
536
|
-
...
|
|
536
|
+
...i,
|
|
537
537
|
maxFiles: 1,
|
|
538
|
-
className:
|
|
539
|
-
accept:
|
|
540
|
-
onDrop: (
|
|
541
|
-
|
|
538
|
+
className: W.ImageUploader,
|
|
539
|
+
accept: ro,
|
|
540
|
+
onDrop: (d) => {
|
|
541
|
+
m(d[0]), r && r(d);
|
|
542
542
|
},
|
|
543
543
|
style: {
|
|
544
|
-
width:
|
|
545
|
-
height:
|
|
544
|
+
width: t,
|
|
545
|
+
height: s
|
|
546
546
|
},
|
|
547
|
-
children: /* @__PURE__ */ l(
|
|
547
|
+
children: /* @__PURE__ */ l(ke, { children: c ? /* @__PURE__ */ l(
|
|
548
548
|
"img",
|
|
549
549
|
{
|
|
550
|
-
className:
|
|
551
|
-
src: typeof
|
|
552
|
-
alt: `파일명: ${typeof
|
|
553
|
-
title: `파일명: ${typeof
|
|
550
|
+
className: W.ImageUploader__Preview,
|
|
551
|
+
src: typeof c == "string" ? c : URL.createObjectURL(c),
|
|
552
|
+
alt: `파일명: ${typeof c == "string" ? c : c.name}`,
|
|
553
|
+
title: `파일명: ${typeof c == "string" ? c : c.name}`
|
|
554
554
|
}
|
|
555
|
-
) : /* @__PURE__ */
|
|
556
|
-
/* @__PURE__ */ l(
|
|
557
|
-
/* @__PURE__ */ l("span", { children:
|
|
555
|
+
) : /* @__PURE__ */ y("div", { children: [
|
|
556
|
+
/* @__PURE__ */ l(Zt, { size: 48 }),
|
|
557
|
+
/* @__PURE__ */ l("span", { children: o })
|
|
558
558
|
] }) })
|
|
559
559
|
}
|
|
560
560
|
)
|
|
561
561
|
] });
|
|
562
|
-
},
|
|
563
|
-
let
|
|
564
|
-
return
|
|
565
|
-
},
|
|
566
|
-
Pagination:
|
|
567
|
-
Pagination__PageIndex:
|
|
562
|
+
}, Nr = ({ size: t = "md", width: s, withCloseButton: o = !1, ...e }) => {
|
|
563
|
+
let r = 768;
|
|
564
|
+
return t === "xs" ? r = 360 : t === "sm" ? r = 544 : t === "lg" ? r = 1e3 : t === "xl" && (r = 1200), /* @__PURE__ */ l(He, { size: s || r, withCloseButton: o, ...e });
|
|
565
|
+
}, Io = "style-module__Pagination___xcR-Q", Po = "style-module__Pagination__PageIndex___50SZJ", Do = "style-module__Pagination__Arrow___74vp3", H = {
|
|
566
|
+
Pagination: Io,
|
|
567
|
+
Pagination__PageIndex: Po,
|
|
568
568
|
"Pagination__PageIndex--Active": "style-module__Pagination__PageIndex--Active___mSIwS",
|
|
569
|
-
Pagination__Arrow:
|
|
570
|
-
},
|
|
571
|
-
currentPageIdx:
|
|
572
|
-
rowsPerPage:
|
|
573
|
-
totalLength:
|
|
574
|
-
paginationSize:
|
|
575
|
-
onPageChange:
|
|
576
|
-
...
|
|
569
|
+
Pagination__Arrow: Do
|
|
570
|
+
}, $r = ({
|
|
571
|
+
currentPageIdx: t,
|
|
572
|
+
rowsPerPage: s,
|
|
573
|
+
totalLength: o,
|
|
574
|
+
paginationSize: e,
|
|
575
|
+
onPageChange: r,
|
|
576
|
+
...a
|
|
577
577
|
}) => {
|
|
578
|
-
const [n,
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
}, [
|
|
582
|
-
const
|
|
583
|
-
|
|
584
|
-
},
|
|
585
|
-
|
|
578
|
+
const [n, i] = k(t), c = s || 50, m = o || 1, _ = e || 5;
|
|
579
|
+
D(() => {
|
|
580
|
+
i(t);
|
|
581
|
+
}, [t]);
|
|
582
|
+
const d = () => {
|
|
583
|
+
r && r(n - (n % _ + 1)), i((u) => u - (u % _ + 1));
|
|
584
|
+
}, p = () => {
|
|
585
|
+
r && r(n + _ - n % _), i((u) => u + _ - u % _);
|
|
586
586
|
};
|
|
587
|
-
return /* @__PURE__ */
|
|
588
|
-
n >=
|
|
589
|
-
new Array(
|
|
590
|
-
const h = Math.floor(n /
|
|
591
|
-
if (!(h > Math.ceil(
|
|
587
|
+
return /* @__PURE__ */ y("div", { ...a, className: H.Pagination, children: [
|
|
588
|
+
n >= _ ? /* @__PURE__ */ l("button", { className: H.Pagination__Arrow, onClick: d, children: /* @__PURE__ */ l(Me, { size: 20 }) }) : null,
|
|
589
|
+
new Array(_).fill(0).map((u, g) => {
|
|
590
|
+
const h = Math.floor(n / _) * _ + g + 1;
|
|
591
|
+
if (!(h > Math.ceil(m / c)))
|
|
592
592
|
return /* @__PURE__ */ l(
|
|
593
593
|
"button",
|
|
594
594
|
{
|
|
595
|
-
className: n === h - 1 ?
|
|
595
|
+
className: n === h - 1 ? H["Pagination__PageIndex--Active"] : H.Pagination__PageIndex,
|
|
596
596
|
onClick: () => {
|
|
597
|
-
|
|
597
|
+
i(h - 1), r && r(h - 1);
|
|
598
598
|
},
|
|
599
599
|
children: h
|
|
600
600
|
},
|
|
601
|
-
`pagination_${
|
|
601
|
+
`pagination_${g}`
|
|
602
602
|
);
|
|
603
603
|
}),
|
|
604
|
-
Math.floor(n /
|
|
604
|
+
Math.floor(n / _) * _ + _ < Math.ceil(m / c) ? /* @__PURE__ */ l("button", { className: H.Pagination__Arrow, onClick: p, children: /* @__PURE__ */ l(Te, { size: 20 }) }) : null
|
|
605
605
|
] });
|
|
606
|
-
},
|
|
606
|
+
}, q = {
|
|
607
607
|
"Radio--Small": "styles-module__Radio--Small___izWI2",
|
|
608
608
|
"Radio--Medium": "styles-module__Radio--Medium___dwZfV",
|
|
609
609
|
"Radio--Large": "styles-module__Radio--Large___1gLra"
|
|
610
|
-
},
|
|
611
|
-
let
|
|
612
|
-
return
|
|
613
|
-
},
|
|
610
|
+
}, Or = ({ size: t = "md", ...s }) => {
|
|
611
|
+
let o = q["Radio--Medium"];
|
|
612
|
+
return t === "sm" ? o = q["Radio--Small"] : t === "lg" && (o = q["Radio--Large"]), /* @__PURE__ */ l(Re, { className: o, size: t, ...s });
|
|
613
|
+
}, Fo = "styles-module__SearchBar__Wrapper___oq49s", Eo = "styles-module__SearchBar__Description___vucS-", Ao = "styles-module__SearchBar__ErrorMsg___TOeoy", No = "styles-module__SearchBar__ClearButton___S-y4P", T = {
|
|
614
614
|
"SearchBar--LeftLabel": "styles-module__SearchBar--LeftLabel___CeYTM",
|
|
615
615
|
"SearchBar--TopLabel": "styles-module__SearchBar--TopLabel___spN3I",
|
|
616
616
|
"SearchBar__Label--Small": "styles-module__SearchBar__Label--Small___zS1L2",
|
|
@@ -619,93 +619,93 @@ const $ = {
|
|
|
619
619
|
"SearchBar__Tooltip--Small": "styles-module__SearchBar__Tooltip--Small___YhmEr",
|
|
620
620
|
"SearchBar__Tooltip--Medium": "styles-module__SearchBar__Tooltip--Medium___4JhOv",
|
|
621
621
|
"SearchBar__Tooltip--Large": "styles-module__SearchBar__Tooltip--Large___IEoPv",
|
|
622
|
-
SearchBar__Wrapper:
|
|
622
|
+
SearchBar__Wrapper: Fo,
|
|
623
623
|
"SearchBar--Small": "styles-module__SearchBar--Small___SY9CN",
|
|
624
624
|
"SearchBar--Medium": "styles-module__SearchBar--Medium___vLP08",
|
|
625
625
|
"SearchBar--Large": "styles-module__SearchBar--Large___JHfHP",
|
|
626
|
-
SearchBar__Description:
|
|
627
|
-
SearchBar__ErrorMsg:
|
|
628
|
-
SearchBar__ClearButton:
|
|
629
|
-
},
|
|
630
|
-
label:
|
|
631
|
-
labelPosition:
|
|
632
|
-
size:
|
|
633
|
-
required:
|
|
634
|
-
tooltip:
|
|
635
|
-
tooltipPosition:
|
|
626
|
+
SearchBar__Description: Eo,
|
|
627
|
+
SearchBar__ErrorMsg: Ao,
|
|
628
|
+
SearchBar__ClearButton: No
|
|
629
|
+
}, zr = ({
|
|
630
|
+
label: t,
|
|
631
|
+
labelPosition: s = "top",
|
|
632
|
+
size: o = "md",
|
|
633
|
+
required: e,
|
|
634
|
+
tooltip: r,
|
|
635
|
+
tooltipPosition: a = "top",
|
|
636
636
|
errorMsg: n,
|
|
637
|
-
description:
|
|
638
|
-
onChange:
|
|
639
|
-
onClear:
|
|
640
|
-
...
|
|
637
|
+
description: i,
|
|
638
|
+
onChange: c,
|
|
639
|
+
onClear: m,
|
|
640
|
+
..._
|
|
641
641
|
}) => {
|
|
642
|
-
const [
|
|
643
|
-
let
|
|
644
|
-
|
|
645
|
-
const
|
|
646
|
-
(
|
|
647
|
-
|
|
648
|
-
},
|
|
649
|
-
[
|
|
642
|
+
const [d, p] = k(0);
|
|
643
|
+
let u = T["SearchBar__Label--Medium"], g = T["SearchBar--Medium"], h = T["SearchBar__Tooltip--Medium"];
|
|
644
|
+
o === "sm" ? (u = T["SearchBar__Label--Small"], g = T["SearchBar--Small"], h = T["SearchBar__Tooltip--Small"]) : o === "lg" && (u = T["SearchBar__Label--Large"], g = T["SearchBar--Large"], h = T["SearchBar__Tooltip--Large"]);
|
|
645
|
+
const f = b(
|
|
646
|
+
(x) => {
|
|
647
|
+
c && (p(x?.length), c(x));
|
|
648
|
+
},
|
|
649
|
+
[c]
|
|
650
650
|
);
|
|
651
|
-
return /* @__PURE__ */
|
|
651
|
+
return /* @__PURE__ */ y(
|
|
652
652
|
"div",
|
|
653
653
|
{
|
|
654
|
-
className:
|
|
654
|
+
className: s === "top" ? T["SearchBar--TopLabel"] : T["SearchBar--LeftLabel"],
|
|
655
655
|
children: [
|
|
656
|
-
/* @__PURE__ */
|
|
657
|
-
|
|
658
|
-
|
|
656
|
+
/* @__PURE__ */ y("div", { children: [
|
|
657
|
+
t && /* @__PURE__ */ l(P.Label, { required: e, className: u, children: t }),
|
|
658
|
+
r && /* @__PURE__ */ l(j, { label: r, position: a, children: /* @__PURE__ */ l("div", { className: h, children: /* @__PURE__ */ l(ne, { size: o === "sm" ? 14 : o === "lg" ? 20 : 16 }) }) })
|
|
659
659
|
] }),
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
/* @__PURE__ */ l("div", { className:
|
|
662
|
-
|
|
660
|
+
/* @__PURE__ */ y("div", { children: [
|
|
661
|
+
/* @__PURE__ */ l("div", { className: T.SearchBar__Wrapper, children: /* @__PURE__ */ l(
|
|
662
|
+
Ue,
|
|
663
663
|
{
|
|
664
|
-
...
|
|
665
|
-
size:
|
|
664
|
+
..._,
|
|
665
|
+
size: o,
|
|
666
666
|
error: n,
|
|
667
|
-
className:
|
|
668
|
-
onChange:
|
|
669
|
-
leftSection: /* @__PURE__ */ l(
|
|
670
|
-
rightSection:
|
|
667
|
+
className: g,
|
|
668
|
+
onChange: f,
|
|
669
|
+
leftSection: /* @__PURE__ */ l(Yt, { size: o === "sm" ? 16 : o === "lg" ? 24 : 20 }),
|
|
670
|
+
rightSection: m && d > 0 ? /* @__PURE__ */ l("div", { className: T.SearchBar__ClearButton, onClick: m, children: /* @__PURE__ */ l(Se, { size: o === "sm" ? 16 : o === "lg" ? 24 : 20 }) }) : void 0
|
|
671
671
|
}
|
|
672
672
|
) }),
|
|
673
|
-
|
|
674
|
-
n && /* @__PURE__ */ l(
|
|
673
|
+
i && /* @__PURE__ */ l(P.Description, { className: T.SearchBar__Description, children: i }),
|
|
674
|
+
n && /* @__PURE__ */ l(P.Error, { className: T.SearchBar__ErrorMsg, children: n })
|
|
675
675
|
] })
|
|
676
676
|
]
|
|
677
677
|
}
|
|
678
678
|
);
|
|
679
|
-
},
|
|
679
|
+
}, Q = {
|
|
680
680
|
"SegmentButton--Small": "styles-module__SegmentButton--Small___o0Y3t",
|
|
681
681
|
"SegmentButton--Medium": "styles-module__SegmentButton--Medium___EgCJm",
|
|
682
682
|
"SegmentButton--Large": "styles-module__SegmentButton--Large___Ym86C"
|
|
683
|
-
},
|
|
684
|
-
let
|
|
685
|
-
return
|
|
686
|
-
|
|
683
|
+
}, Hr = ({ size: t = "md", radius: s = 6, ...o }) => {
|
|
684
|
+
let e = Q["SegmentButton--Medium"];
|
|
685
|
+
return t === "sm" ? e = Q["SegmentButton--Small"] : t === "lg" && (e = Q["SegmentButton--Large"]), /* @__PURE__ */ l(
|
|
686
|
+
Ze,
|
|
687
687
|
{
|
|
688
|
-
className:
|
|
689
|
-
size:
|
|
690
|
-
radius:
|
|
688
|
+
className: e,
|
|
689
|
+
size: t,
|
|
690
|
+
radius: s,
|
|
691
691
|
styles: {
|
|
692
692
|
control: {
|
|
693
693
|
borderWidth: "0 !important"
|
|
694
694
|
}
|
|
695
695
|
},
|
|
696
|
-
...
|
|
696
|
+
...o
|
|
697
697
|
}
|
|
698
698
|
);
|
|
699
|
-
},
|
|
700
|
-
Tab__TitleList:
|
|
701
|
-
Tab__BorderBottom:
|
|
702
|
-
},
|
|
703
|
-
/* @__PURE__ */ l(
|
|
704
|
-
|
|
705
|
-
/* @__PURE__ */ l("div", { className:
|
|
706
|
-
] }, `tab_${
|
|
707
|
-
|
|
708
|
-
] }),
|
|
699
|
+
}, $o = "styles-module__Tab__TitleList___urHWH", Oo = "styles-module__Tab__BorderBottom___eMTpl", fe = {
|
|
700
|
+
Tab__TitleList: $o,
|
|
701
|
+
Tab__BorderBottom: Oo
|
|
702
|
+
}, Rr = ({ tabList: t = [], containerPaddingTop: s, ...o }) => /* @__PURE__ */ y(Y, { ...o, children: [
|
|
703
|
+
/* @__PURE__ */ l(Y.List, { className: fe.Tab__TitleList, children: t?.map((e, r) => /* @__PURE__ */ y(Y.Tab, { value: e.value, leftSection: e.icon, children: [
|
|
704
|
+
e.title,
|
|
705
|
+
/* @__PURE__ */ l("div", { className: fe.Tab__BorderBottom })
|
|
706
|
+
] }, `tab_${r}`)) }),
|
|
707
|
+
t?.map((e, r) => /* @__PURE__ */ l(Y.Panel, { value: e.value, pt: s, children: e.body }, `tab_panel_${r}`))
|
|
708
|
+
] }), zo = "styles-module__TextField__Wrapper___u6p5Z", Ho = "styles-module__TextField__TextCounter___u1jM5", Ro = "styles-module__TextField__Description___J-kXP", Uo = "styles-module__TextField__ErrorMsg___fa6f6", Zo = "styles-module__TextField__ClearButton___bB5Ew", C = {
|
|
709
709
|
"TextField--LeftLabel": "styles-module__TextField--LeftLabel___hiNn3",
|
|
710
710
|
"TextField--TopLabel": "styles-module__TextField--TopLabel___V2otc",
|
|
711
711
|
"TextField__Label--Small": "styles-module__TextField__Label--Small___NkKKA",
|
|
@@ -714,319 +714,1324 @@ const $ = {
|
|
|
714
714
|
"TextField__Tooltip--Small": "styles-module__TextField__Tooltip--Small___GmQHE",
|
|
715
715
|
"TextField__Tooltip--Medium": "styles-module__TextField__Tooltip--Medium___5P3nA",
|
|
716
716
|
"TextField__Tooltip--Large": "styles-module__TextField__Tooltip--Large___YSCfu",
|
|
717
|
-
TextField__Wrapper:
|
|
718
|
-
TextField__TextCounter:
|
|
717
|
+
TextField__Wrapper: zo,
|
|
718
|
+
TextField__TextCounter: Ho,
|
|
719
719
|
"TextField--Textarea": "styles-module__TextField--Textarea___C2DL5",
|
|
720
720
|
"TextField--Small": "styles-module__TextField--Small___iuH4t",
|
|
721
721
|
"TextField--Medium": "styles-module__TextField--Medium___snYod",
|
|
722
722
|
"TextField--Large": "styles-module__TextField--Large___JoSYk",
|
|
723
|
-
TextField__Description:
|
|
724
|
-
TextField__ErrorMsg:
|
|
725
|
-
TextField__ClearButton:
|
|
726
|
-
},
|
|
723
|
+
TextField__Description: Ro,
|
|
724
|
+
TextField__ErrorMsg: Uo,
|
|
725
|
+
TextField__ClearButton: Zo
|
|
726
|
+
}, Ur = (t) => {
|
|
727
727
|
const {
|
|
728
|
-
label:
|
|
729
|
-
labelPosition:
|
|
730
|
-
size:
|
|
731
|
-
required:
|
|
732
|
-
tooltip:
|
|
728
|
+
label: s,
|
|
729
|
+
labelPosition: o = "top",
|
|
730
|
+
size: e = "md",
|
|
731
|
+
required: r,
|
|
732
|
+
tooltip: a,
|
|
733
733
|
tooltipPosition: n = "top",
|
|
734
|
-
errorMsg:
|
|
735
|
-
description:
|
|
736
|
-
textarea:
|
|
737
|
-
maxTextCount:
|
|
738
|
-
onChange:
|
|
739
|
-
onClear:
|
|
740
|
-
...
|
|
741
|
-
} =
|
|
742
|
-
let
|
|
743
|
-
|
|
744
|
-
const
|
|
745
|
-
(
|
|
746
|
-
if (
|
|
747
|
-
if (
|
|
734
|
+
errorMsg: i,
|
|
735
|
+
description: c,
|
|
736
|
+
textarea: m = !1,
|
|
737
|
+
maxTextCount: _,
|
|
738
|
+
onChange: d,
|
|
739
|
+
onClear: p,
|
|
740
|
+
...u
|
|
741
|
+
} = t, g = "minRows" in t ? t.minRows : void 0, [h, f] = k(0);
|
|
742
|
+
let x = C["TextField__Label--Medium"], M = C["TextField--Medium"], v = C["TextField__Tooltip--Medium"];
|
|
743
|
+
e === "sm" ? (x = C["TextField__Label--Small"], M = C["TextField--Small"], v = C["TextField__Tooltip--Small"]) : e === "lg" && (x = C["TextField__Label--Large"], M = C["TextField--Large"], v = C["TextField__Tooltip--Large"]);
|
|
744
|
+
const z = b(
|
|
745
|
+
(A) => {
|
|
746
|
+
if (_) {
|
|
747
|
+
if (A.currentTarget?.value?.length > _)
|
|
748
748
|
return;
|
|
749
|
-
|
|
749
|
+
f(A.currentTarget?.value?.length), d && d(A);
|
|
750
750
|
}
|
|
751
|
-
|
|
751
|
+
d && (f(A.currentTarget?.value?.length), d(A));
|
|
752
752
|
},
|
|
753
|
-
[
|
|
753
|
+
[_, d]
|
|
754
754
|
);
|
|
755
|
-
return /* @__PURE__ */
|
|
755
|
+
return /* @__PURE__ */ y(
|
|
756
756
|
"div",
|
|
757
757
|
{
|
|
758
|
-
className:
|
|
758
|
+
className: o === "top" ? C["TextField--TopLabel"] : C["TextField--LeftLabel"],
|
|
759
759
|
children: [
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
-
|
|
762
|
-
|
|
760
|
+
/* @__PURE__ */ y("div", { children: [
|
|
761
|
+
s && /* @__PURE__ */ l(P.Label, { required: r, className: x, children: s }),
|
|
762
|
+
a && /* @__PURE__ */ l(j, { label: a, position: n, children: /* @__PURE__ */ l("div", { className: v, children: /* @__PURE__ */ l(ne, { size: e === "sm" ? 14 : e === "lg" ? 20 : 16 }) }) })
|
|
763
763
|
] }),
|
|
764
|
-
/* @__PURE__ */
|
|
765
|
-
/* @__PURE__ */
|
|
766
|
-
|
|
767
|
-
|
|
764
|
+
/* @__PURE__ */ y("div", { children: [
|
|
765
|
+
/* @__PURE__ */ y("div", { className: C.TextField__Wrapper, children: [
|
|
766
|
+
m ? /* @__PURE__ */ l(
|
|
767
|
+
Ye,
|
|
768
768
|
{
|
|
769
|
-
className:
|
|
770
|
-
size:
|
|
771
|
-
minRows:
|
|
772
|
-
error:
|
|
773
|
-
onChange:
|
|
774
|
-
disabled:
|
|
775
|
-
...
|
|
769
|
+
className: C["TextField--Textarea"],
|
|
770
|
+
size: e,
|
|
771
|
+
minRows: g,
|
|
772
|
+
error: i,
|
|
773
|
+
onChange: z,
|
|
774
|
+
disabled: u?.disabled,
|
|
775
|
+
...u
|
|
776
776
|
}
|
|
777
777
|
) : /* @__PURE__ */ l(
|
|
778
|
-
|
|
778
|
+
P,
|
|
779
779
|
{
|
|
780
|
-
className:
|
|
781
|
-
error:
|
|
782
|
-
onChange:
|
|
783
|
-
rightSection:
|
|
784
|
-
...
|
|
780
|
+
className: M,
|
|
781
|
+
error: i,
|
|
782
|
+
onChange: z,
|
|
783
|
+
rightSection: p && h > 0 ? /* @__PURE__ */ l("div", { className: C.TextField__ClearButton, onClick: p, children: /* @__PURE__ */ l(Se, { size: e === "sm" ? 16 : e === "lg" ? 24 : 20 }) }) : void 0,
|
|
784
|
+
...u
|
|
785
785
|
}
|
|
786
786
|
),
|
|
787
|
-
|
|
787
|
+
_ && _ > 0 && /* @__PURE__ */ l(
|
|
788
788
|
"span",
|
|
789
789
|
{
|
|
790
|
-
className:
|
|
791
|
-
children: `${h}/${
|
|
790
|
+
className: C.TextField__TextCounter,
|
|
791
|
+
children: `${h}/${_}`
|
|
792
792
|
}
|
|
793
793
|
)
|
|
794
794
|
] }),
|
|
795
|
-
|
|
796
|
-
|
|
795
|
+
c && /* @__PURE__ */ l(P.Description, { className: C.TextField__Description, children: c }),
|
|
796
|
+
i && /* @__PURE__ */ l(P.Error, { className: C.TextField__ErrorMsg, children: i })
|
|
797
797
|
] })
|
|
798
798
|
]
|
|
799
799
|
}
|
|
800
800
|
);
|
|
801
|
-
},
|
|
801
|
+
}, X = {
|
|
802
802
|
"TimePicker--Small": "styles-module__TimePicker--Small___nHQa1",
|
|
803
803
|
"TimePicker--Medium": "styles-module__TimePicker--Medium___E9-rF",
|
|
804
804
|
"TimePicker--Large": "styles-module__TimePicker--Large___I0M7V"
|
|
805
|
-
},
|
|
806
|
-
const
|
|
807
|
-
let
|
|
808
|
-
return
|
|
809
|
-
|
|
805
|
+
}, Zr = ({ size: t = "md", ...s }) => {
|
|
806
|
+
const o = O(null);
|
|
807
|
+
let e = X["TimePicker--Medium"], r = 18;
|
|
808
|
+
return t === "sm" ? (e = X["TimePicker--Small"], r = 14) : t === "lg" && (e = X["TimePicker--Large"], r = 24), /* @__PURE__ */ l(
|
|
809
|
+
to,
|
|
810
810
|
{
|
|
811
|
-
ref:
|
|
812
|
-
className:
|
|
813
|
-
size:
|
|
814
|
-
...
|
|
811
|
+
ref: o,
|
|
812
|
+
className: e,
|
|
813
|
+
size: t,
|
|
814
|
+
...s,
|
|
815
815
|
rightSection: /* @__PURE__ */ l(
|
|
816
|
-
|
|
816
|
+
We,
|
|
817
817
|
{
|
|
818
818
|
onClick: () => {
|
|
819
|
-
|
|
819
|
+
o && o?.current?.showPicker();
|
|
820
820
|
},
|
|
821
|
-
children: /* @__PURE__ */ l(
|
|
821
|
+
children: /* @__PURE__ */ l(Wt, { size: r })
|
|
822
822
|
}
|
|
823
823
|
)
|
|
824
824
|
}
|
|
825
825
|
);
|
|
826
|
-
},
|
|
827
|
-
Toast:
|
|
828
|
-
Toast__Icon:
|
|
829
|
-
Toast__Body:
|
|
830
|
-
Toast__Message:
|
|
831
|
-
},
|
|
832
|
-
const
|
|
833
|
-
|
|
834
|
-
id:
|
|
835
|
-
message: /* @__PURE__ */ l("div", { className:
|
|
836
|
-
icon:
|
|
837
|
-
autoClose:
|
|
826
|
+
}, Yo = "styles-module__Toast___ZqZzU", Wo = "styles-module__Toast__Icon___PWXSy", jo = "styles-module__Toast__Body___wezPs", Vo = "styles-module__Toast__Message___NFsgm", N = {
|
|
827
|
+
Toast: Yo,
|
|
828
|
+
Toast__Icon: Wo,
|
|
829
|
+
Toast__Body: jo,
|
|
830
|
+
Toast__Message: Vo
|
|
831
|
+
}, Z = (t) => {
|
|
832
|
+
const s = typeof t == "string" ? { message: t } : t, { message: o, id: e, icon: r, autoClose: a } = s;
|
|
833
|
+
V.show({
|
|
834
|
+
id: e,
|
|
835
|
+
message: /* @__PURE__ */ l("div", { className: N.Toast__Message, children: o }),
|
|
836
|
+
icon: r,
|
|
837
|
+
autoClose: a,
|
|
838
838
|
classNames: {
|
|
839
|
-
root:
|
|
840
|
-
body:
|
|
841
|
-
icon:
|
|
839
|
+
root: N.Toast,
|
|
840
|
+
body: N.Toast__Body,
|
|
841
|
+
icon: N.Toast__Icon
|
|
842
842
|
},
|
|
843
843
|
withCloseButton: !1,
|
|
844
844
|
withBorder: !1
|
|
845
845
|
});
|
|
846
846
|
};
|
|
847
|
-
|
|
848
|
-
const
|
|
849
|
-
|
|
850
|
-
id:
|
|
851
|
-
message: /* @__PURE__ */ l("div", { className:
|
|
852
|
-
icon:
|
|
853
|
-
autoClose:
|
|
847
|
+
Z.update = (t, s) => {
|
|
848
|
+
const o = typeof s == "string" ? { message: s } : s, { message: e, icon: r, autoClose: a } = o;
|
|
849
|
+
V.update({
|
|
850
|
+
id: t,
|
|
851
|
+
message: /* @__PURE__ */ l("div", { className: N.Toast__Message, children: e }),
|
|
852
|
+
icon: r,
|
|
853
|
+
autoClose: a,
|
|
854
854
|
classNames: {
|
|
855
|
-
root:
|
|
856
|
-
body:
|
|
857
|
-
icon:
|
|
855
|
+
root: N.Toast,
|
|
856
|
+
body: N.Toast__Body,
|
|
857
|
+
icon: N.Toast__Icon
|
|
858
858
|
},
|
|
859
859
|
withCloseButton: !1,
|
|
860
860
|
withBorder: !1
|
|
861
861
|
});
|
|
862
862
|
};
|
|
863
|
-
|
|
864
|
-
|
|
863
|
+
Z.hide = (t) => {
|
|
864
|
+
V.hide(t);
|
|
865
865
|
};
|
|
866
|
-
|
|
867
|
-
|
|
866
|
+
Z.clean = () => {
|
|
867
|
+
V.clean();
|
|
868
868
|
};
|
|
869
|
-
const
|
|
869
|
+
const ee = {
|
|
870
870
|
"Toggle--Small": "styles-module__Toggle--Small___sOjUd",
|
|
871
871
|
"Toggle--Medium": "styles-module__Toggle--Medium___yIb8v",
|
|
872
872
|
"Toggle--Large": "styles-module__Toggle--Large___ZOJj1"
|
|
873
|
-
},
|
|
874
|
-
size:
|
|
875
|
-
labelPosition:
|
|
876
|
-
disabled:
|
|
877
|
-
onChange:
|
|
878
|
-
...
|
|
873
|
+
}, Yr = ({
|
|
874
|
+
size: t = "md",
|
|
875
|
+
labelPosition: s = "right",
|
|
876
|
+
disabled: o,
|
|
877
|
+
onChange: e,
|
|
878
|
+
...r
|
|
879
879
|
}) => {
|
|
880
|
-
const [
|
|
881
|
-
let
|
|
882
|
-
|
|
883
|
-
const
|
|
884
|
-
(
|
|
885
|
-
|
|
880
|
+
const [a, n] = k(r?.checked || !1);
|
|
881
|
+
let i = ee["Toggle--Medium"], c = 50;
|
|
882
|
+
t === "sm" ? (i = ee["Toggle--Small"], c = 38) : t === "lg" && (i = ee["Toggle--Large"], c = 67);
|
|
883
|
+
const m = b(
|
|
884
|
+
(_) => {
|
|
885
|
+
e && e(_), n(_?.target?.checked);
|
|
886
886
|
},
|
|
887
|
-
[
|
|
887
|
+
[e]
|
|
888
888
|
);
|
|
889
889
|
return /* @__PURE__ */ l(
|
|
890
|
-
|
|
890
|
+
je,
|
|
891
891
|
{
|
|
892
|
-
className:
|
|
893
|
-
size:
|
|
894
|
-
labelPosition:
|
|
895
|
-
disabled:
|
|
896
|
-
onChange:
|
|
892
|
+
className: i,
|
|
893
|
+
size: t,
|
|
894
|
+
labelPosition: s,
|
|
895
|
+
disabled: o,
|
|
896
|
+
onChange: m,
|
|
897
897
|
styles: () => ({
|
|
898
898
|
track: {
|
|
899
|
-
backgroundColor: !
|
|
900
|
-
borderColor: !
|
|
901
|
-
width:
|
|
899
|
+
backgroundColor: !o && a ? "#0fd3d8 !important" : void 0,
|
|
900
|
+
borderColor: !o && a ? "#0fd3d8 !important" : void 0,
|
|
901
|
+
width: c
|
|
902
902
|
}
|
|
903
903
|
}),
|
|
904
|
-
...
|
|
904
|
+
...r
|
|
905
905
|
}
|
|
906
906
|
);
|
|
907
|
-
},
|
|
908
|
-
Tooltip__Body:
|
|
909
|
-
Tooltip__Title:
|
|
910
|
-
Tooltip__Content:
|
|
911
|
-
},
|
|
912
|
-
title:
|
|
913
|
-
content:
|
|
914
|
-
maw:
|
|
915
|
-
multiline:
|
|
916
|
-
...
|
|
907
|
+
}, Go = "styles-module__Tooltip__Body___i1OTG", Jo = "styles-module__Tooltip__Title___E0LoV", Ko = "styles-module__Tooltip__Content___lU5gr", te = {
|
|
908
|
+
Tooltip__Body: Go,
|
|
909
|
+
Tooltip__Title: Jo,
|
|
910
|
+
Tooltip__Content: Ko
|
|
911
|
+
}, Wr = ({
|
|
912
|
+
title: t,
|
|
913
|
+
content: s,
|
|
914
|
+
maw: o = 280,
|
|
915
|
+
multiline: e = !0,
|
|
916
|
+
...r
|
|
917
917
|
}) => /* @__PURE__ */ l(
|
|
918
|
-
|
|
918
|
+
j,
|
|
919
919
|
{
|
|
920
|
-
...
|
|
921
|
-
maw:
|
|
922
|
-
multiline:
|
|
923
|
-
label: /* @__PURE__ */
|
|
924
|
-
|
|
925
|
-
/* @__PURE__ */ l("span", { className:
|
|
920
|
+
...r,
|
|
921
|
+
maw: o,
|
|
922
|
+
multiline: e,
|
|
923
|
+
label: /* @__PURE__ */ y("div", { className: te.Tooltip__Body, children: [
|
|
924
|
+
t && /* @__PURE__ */ l("span", { className: te.Tooltip__Title, children: t }),
|
|
925
|
+
/* @__PURE__ */ l("span", { className: te.Tooltip__Content, children: s })
|
|
926
926
|
] })
|
|
927
927
|
}
|
|
928
|
-
),
|
|
929
|
-
const
|
|
930
|
-
return
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
928
|
+
), qo = (t) => {
|
|
929
|
+
const { name: s, icon: o } = t;
|
|
930
|
+
return `
|
|
931
|
+
<div class="pin-marker">
|
|
932
|
+
${o ? `<img src="${o}" alt="${s}" width="40" height="40" />` : `
|
|
933
|
+
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
934
|
+
<g>
|
|
935
|
+
<path d="M18.7686 1.26235C11.6407 0.936128 5.75293 6.62941 5.75293 13.6913C5.75293 22.565 11.76 30.0415 15.1594 33.4869C16.8117 35.1766 19.5261 35.1761 21.1779 33.4854C24.318 30.2845 29.8102 23.653 30.5636 15.5539L30.5637 15.5531C31.2237 8.38935 26.1199 1.59187 18.7686 1.26235ZM18.7686 1.26235L18.7229 2.26131L18.7676 1.2623C18.768 1.26232 18.7683 1.26234 18.7686 1.26235Z" fill="#FF6C6C" stroke="white" stroke-width="2" stroke-miterlimit="10"/>
|
|
936
|
+
<path d="M18.4084 18.2387C20.8523 18.2387 22.8334 16.2575 22.8334 13.8137C22.8334 11.3698 20.8523 9.38867 18.4084 9.38867C15.9645 9.38867 13.9834 11.3698 13.9834 13.8137C13.9834 16.2575 15.9645 18.2387 18.4084 18.2387Z" fill="white"/>
|
|
937
|
+
</g>
|
|
938
|
+
</svg>
|
|
939
|
+
`}
|
|
940
|
+
<div class="pin-marker-name">${s}</div>
|
|
941
|
+
</div>
|
|
942
|
+
`;
|
|
943
|
+
}, Qo = (t) => {
|
|
944
|
+
const { discountRate: s, price: o, originalPrice: e, category: r, active: a, title: n } = t;
|
|
945
|
+
return `
|
|
946
|
+
<div class="popdeal-marker" active="${!!a}">
|
|
947
|
+
<div class="popdeal-marker-section">
|
|
948
|
+
<div class="popdeal-marker-section-header">
|
|
949
|
+
<span class="popdeal-marker-title">${n}</span>
|
|
950
|
+
${r ? `<span class="popdeal-marker-category">${r}</span>` : ""}
|
|
951
|
+
</div>
|
|
952
|
+
<div class="popdeal-marker-section-price">
|
|
953
|
+
${e ? `<span class="popdeal-marker-original_price">${e.toLocaleString()}원</span>` : ""}
|
|
954
|
+
${s ? `<span class="popdeal-marker-discount_rate">${s}%</span>` : ""}
|
|
955
|
+
<span class="popdeal-marker-discounted_price">${o.toLocaleString()}원</span>
|
|
956
|
+
</div>
|
|
957
|
+
</div>
|
|
958
|
+
</div>
|
|
959
|
+
`;
|
|
960
|
+
}, Xo = (t) => {
|
|
961
|
+
const { title: s, icon: o } = t;
|
|
962
|
+
return `
|
|
963
|
+
<div class="pi-marker">
|
|
964
|
+
${o ? `<img class="pi-marker-icon" src="${o}" alt="" width="32px" height="32px" />` : ""}
|
|
965
|
+
<span class="pi-marker-text">${s}</span>
|
|
966
|
+
</div>
|
|
967
|
+
`;
|
|
968
|
+
}, er = (t) => {
|
|
969
|
+
const { title: s, icon: o, address: e } = t;
|
|
970
|
+
return `
|
|
971
|
+
<div class="pi-expanded-marker">
|
|
972
|
+
${o ? `<img class="pi-expanded-marker-icon" src="${o}" alt="" width="32px" height="32px" />` : ""}
|
|
973
|
+
<div class="pi-expanded-marker-content">
|
|
974
|
+
<div class="pi-expanded-marker-title">${s}</div>
|
|
975
|
+
${e ? `<div class="pi-expanded-marker-address">${e}</div>` : ""}
|
|
976
|
+
</div>
|
|
977
|
+
</div>
|
|
978
|
+
`;
|
|
979
|
+
}, tr = (t) => `
|
|
980
|
+
<div class="cluster-marker">
|
|
981
|
+
<span class="cluster-marker-text">${t.count}</span>
|
|
982
|
+
</div>
|
|
983
|
+
`, xe = (t) => {
|
|
984
|
+
switch (t.type) {
|
|
985
|
+
case "pin":
|
|
986
|
+
return qo(t);
|
|
987
|
+
case "popdeal":
|
|
988
|
+
return Qo(t);
|
|
989
|
+
case "pi":
|
|
990
|
+
return Xo(t);
|
|
991
|
+
case "pi-expanded":
|
|
992
|
+
return er(t);
|
|
993
|
+
case "cluster":
|
|
994
|
+
return tr(t);
|
|
995
|
+
default:
|
|
996
|
+
return "";
|
|
997
|
+
}
|
|
998
|
+
}, or = `
|
|
999
|
+
/* Common marker styles */
|
|
1000
|
+
[class$="marker"] {
|
|
1001
|
+
user-select: none;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
/* Pin Marker */
|
|
1005
|
+
.pin-marker {
|
|
1006
|
+
position: relative;
|
|
1007
|
+
z-index: 10;
|
|
1008
|
+
transform: translate(-50%, -100%);
|
|
1009
|
+
display: flex;
|
|
1010
|
+
flex-direction: column;
|
|
1011
|
+
align-items: center;
|
|
1012
|
+
justify-content: center;
|
|
1013
|
+
gap: 8px;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
.pin-marker-name {
|
|
1017
|
+
min-width: max-content;
|
|
1018
|
+
color: #1A1A1A;
|
|
1019
|
+
text-align: center;
|
|
1020
|
+
font-weight: 700;
|
|
1021
|
+
font-size: 14px;
|
|
1022
|
+
line-height: 1.4;
|
|
1023
|
+
text-shadow:
|
|
1024
|
+
-2px -2px 0 white,
|
|
1025
|
+
2px -2px 0 white,
|
|
1026
|
+
-2px 2px 0 white,
|
|
1027
|
+
2px 2px 0 white;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
/* Popdeal Marker */
|
|
1031
|
+
.popdeal-marker {
|
|
1032
|
+
transform: translate(-50%, -100%);
|
|
1033
|
+
padding: 10px 16px;
|
|
1034
|
+
width: fit-content;
|
|
1035
|
+
max-width: 210px;
|
|
1036
|
+
position: relative;
|
|
1037
|
+
display: flex;
|
|
1038
|
+
flex-direction: column;
|
|
1039
|
+
justify-content: center;
|
|
1040
|
+
align-items: center;
|
|
1041
|
+
gap: 4px;
|
|
1042
|
+
transition: border-color 0.2s ease-in-out;
|
|
1043
|
+
word-break: keep-all;
|
|
1044
|
+
background: white;
|
|
1045
|
+
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.12);
|
|
1046
|
+
border-radius: 12px;
|
|
1047
|
+
color: #3D3D3D;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
.popdeal-marker:hover {
|
|
1051
|
+
z-index: 10;
|
|
1052
|
+
filter: drop-shadow(0px 4px 12px rgba(0, 0, 0, 0.12));
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
.popdeal-marker::after {
|
|
1056
|
+
content: "";
|
|
1057
|
+
display: block;
|
|
1058
|
+
width: 12px;
|
|
1059
|
+
height: 12px;
|
|
1060
|
+
position: absolute;
|
|
1061
|
+
bottom: -7px;
|
|
1062
|
+
left: 50%;
|
|
1063
|
+
right: 50%;
|
|
1064
|
+
background: white;
|
|
1065
|
+
transform: translate(-50%) rotate(45deg);
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
.popdeal-marker[active="true"] {
|
|
1069
|
+
z-index: 10;
|
|
1070
|
+
border: 2px solid #00C4C4;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
.popdeal-marker[active="true"]::after {
|
|
1074
|
+
border-right: 2px solid #00C4C4;
|
|
1075
|
+
border-bottom: 2px solid #00C4C4;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
.popdeal-marker[active="false"] {
|
|
1079
|
+
border: 1px solid #F5F5F5;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
.popdeal-marker[active="false"]::after {
|
|
1083
|
+
border-right: 1px solid #F5F5F5;
|
|
1084
|
+
border-bottom: 1px solid #F5F5F5;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.popdeal-marker-section {
|
|
1088
|
+
display: flex;
|
|
1089
|
+
flex-direction: column;
|
|
1090
|
+
justify-content: center;
|
|
1091
|
+
align-items: center;
|
|
1092
|
+
gap: 0;
|
|
1093
|
+
flex-wrap: nowrap;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
.popdeal-marker-section-header {
|
|
1097
|
+
display: flex;
|
|
1098
|
+
justify-content: center;
|
|
1099
|
+
align-items: center;
|
|
1100
|
+
gap: 4px;
|
|
1101
|
+
flex-wrap: nowrap;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
.popdeal-marker-section-price {
|
|
1105
|
+
display: flex;
|
|
1106
|
+
justify-content: center;
|
|
1107
|
+
align-items: center;
|
|
1108
|
+
gap: 0 4px;
|
|
1109
|
+
flex-wrap: wrap;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
.popdeal-marker-title {
|
|
1113
|
+
font-weight: 700;
|
|
1114
|
+
font-size: 14px;
|
|
1115
|
+
text-align: center;
|
|
1116
|
+
width: 100%;
|
|
1117
|
+
display: -webkit-box;
|
|
1118
|
+
-webkit-line-clamp: 2;
|
|
1119
|
+
-webkit-box-orient: vertical;
|
|
1120
|
+
overflow: hidden;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
.popdeal-marker-discount_rate {
|
|
1124
|
+
color: #00C4C4;
|
|
1125
|
+
font-weight: 600;
|
|
1126
|
+
font-size: 14px;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
.popdeal-marker-discounted_price {
|
|
1130
|
+
color: #3D3D3D;
|
|
1131
|
+
font-weight: 600;
|
|
1132
|
+
font-size: 14px;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
.popdeal-marker-original_price {
|
|
1136
|
+
width: 100%;
|
|
1137
|
+
color: #B3B3B3;
|
|
1138
|
+
text-align: center;
|
|
1139
|
+
font-size: 14px;
|
|
1140
|
+
text-decoration: line-through;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
.popdeal-marker-category {
|
|
1144
|
+
color: #6E6E6E;
|
|
1145
|
+
font-weight: 600;
|
|
1146
|
+
font-size: 12px;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
.popdeal-marker-category::before {
|
|
1150
|
+
content: "|";
|
|
1151
|
+
color: #B3B3B3;
|
|
1152
|
+
margin-right: 4px;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
/* PI Marker */
|
|
1156
|
+
.pi-marker {
|
|
1157
|
+
transform: translate(-50%, -50%);
|
|
1158
|
+
z-index: 10;
|
|
1159
|
+
position: relative;
|
|
1160
|
+
display: flex;
|
|
1161
|
+
flex-direction: column;
|
|
1162
|
+
align-items: center;
|
|
1163
|
+
justify-content: center;
|
|
1164
|
+
gap: 4px;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
.pi-marker-icon {
|
|
1168
|
+
width: 32px;
|
|
1169
|
+
height: 32px;
|
|
1170
|
+
object-fit: cover;
|
|
1171
|
+
border-radius: 50%;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
.pi-marker-text {
|
|
1175
|
+
position: absolute;
|
|
1176
|
+
top: calc(100% + 5px);
|
|
1177
|
+
left: 50%;
|
|
1178
|
+
transform: translateX(-50%);
|
|
1179
|
+
min-width: max-content;
|
|
1180
|
+
padding: 4px 8px;
|
|
1181
|
+
background: white;
|
|
1182
|
+
font-size: 12px;
|
|
1183
|
+
border-radius: 99px;
|
|
1184
|
+
color: #3D3D3D;
|
|
1185
|
+
box-shadow: 0 0.432px 0.864px 0 rgba(0, 0, 0, 0.28);
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
/* PI Expanded Marker */
|
|
1189
|
+
.pi-expanded-marker {
|
|
1190
|
+
transform: translate(-50%, -50%);
|
|
1191
|
+
z-index: 100;
|
|
1192
|
+
position: relative;
|
|
1193
|
+
display: flex;
|
|
1194
|
+
flex-direction: column;
|
|
1195
|
+
align-items: center;
|
|
1196
|
+
justify-content: center;
|
|
1197
|
+
gap: 4px;
|
|
1198
|
+
filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.pi-expanded-marker-icon {
|
|
1202
|
+
width: 32px;
|
|
1203
|
+
height: 32px;
|
|
1204
|
+
object-fit: cover;
|
|
1205
|
+
border-radius: 50%;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
.pi-expanded-marker-content {
|
|
1209
|
+
position: absolute;
|
|
1210
|
+
bottom: calc(100% + 10px);
|
|
1211
|
+
left: 50%;
|
|
1212
|
+
transform: translateX(-50%);
|
|
1213
|
+
width: max-content;
|
|
1214
|
+
max-width: 200px;
|
|
1215
|
+
padding: 16px;
|
|
1216
|
+
word-break: keep-all;
|
|
1217
|
+
display: flex;
|
|
1218
|
+
flex-direction: column;
|
|
1219
|
+
align-items: center;
|
|
1220
|
+
justify-content: center;
|
|
1221
|
+
background: white;
|
|
1222
|
+
border-radius: 8px;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
.pi-expanded-marker-title {
|
|
1226
|
+
font-weight: 600;
|
|
1227
|
+
font-size: 14px;
|
|
1228
|
+
text-align: center;
|
|
1229
|
+
color: #1A1A1A;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
.pi-expanded-marker-address {
|
|
1233
|
+
font-size: 14px;
|
|
1234
|
+
color: #6E6E6E;
|
|
1235
|
+
width: 100%;
|
|
1236
|
+
text-align: center;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
/* Cluster Marker */
|
|
1240
|
+
.cluster-marker {
|
|
1241
|
+
width: fit-content;
|
|
1242
|
+
min-width: 52px;
|
|
1243
|
+
height: 36px;
|
|
1244
|
+
padding: 13px;
|
|
1245
|
+
position: relative;
|
|
1246
|
+
display: flex;
|
|
1247
|
+
align-items: center;
|
|
1248
|
+
justify-content: center;
|
|
1249
|
+
border-radius: 12px;
|
|
1250
|
+
background: #00C4C4;
|
|
1251
|
+
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.12);
|
|
1252
|
+
transform: translate(-50%, -50%);
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
.cluster-marker-text {
|
|
1256
|
+
font-weight: 700;
|
|
1257
|
+
font-size: 15px;
|
|
1258
|
+
color: white;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
.cluster-marker::after {
|
|
1262
|
+
content: "";
|
|
1263
|
+
display: block;
|
|
1264
|
+
width: 12px;
|
|
1265
|
+
height: 12px;
|
|
1266
|
+
position: absolute;
|
|
1267
|
+
bottom: -2px;
|
|
1268
|
+
left: 50%;
|
|
1269
|
+
right: 50%;
|
|
1270
|
+
background: #00C4C4;
|
|
1271
|
+
transform: translate(-50%) rotate(45deg);
|
|
1272
|
+
}
|
|
1273
|
+
`, ve = oe(null), ye = "naver-map-script", rr = (t, s) => new Promise((o, e) => {
|
|
1274
|
+
if (typeof window < "u" && window.naver?.maps) {
|
|
1275
|
+
o();
|
|
1276
|
+
return;
|
|
1277
|
+
}
|
|
1278
|
+
const r = document.getElementById(ye);
|
|
1279
|
+
if (r) {
|
|
1280
|
+
r.addEventListener("load", () => o()), r.addEventListener(
|
|
1281
|
+
"error",
|
|
1282
|
+
() => e(new Error("Failed to load Naver Map script"))
|
|
1283
|
+
);
|
|
1284
|
+
return;
|
|
1285
|
+
}
|
|
1286
|
+
const a = document.createElement("script");
|
|
1287
|
+
a.id = ye, a.src = `https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=${t}&language=${s}`, a.async = !0, a.onload = () => {
|
|
1288
|
+
o();
|
|
1289
|
+
}, a.onerror = () => {
|
|
1290
|
+
e(new Error("Failed to load Naver Map script"));
|
|
1291
|
+
}, document.head.appendChild(a);
|
|
1292
|
+
}), nr = ({
|
|
1293
|
+
clientId: t,
|
|
1294
|
+
language: s = "ko",
|
|
1295
|
+
children: o
|
|
1296
|
+
}) => {
|
|
1297
|
+
const [e, r] = k(null), [a, n] = k({}), [i, c] = k(null);
|
|
1298
|
+
D(() => {
|
|
1299
|
+
typeof window > "u" || rr(t, s).then(() => {
|
|
1300
|
+
window.naver && r(window.naver);
|
|
1301
|
+
}).catch((_) => {
|
|
1302
|
+
console.error("Naver Map script loading failed:", _), c(_);
|
|
1303
|
+
});
|
|
1304
|
+
}, [t, s]);
|
|
1305
|
+
const m = b(
|
|
1306
|
+
(_, d) => {
|
|
1307
|
+
const p = e || (typeof window < "u" ? window.naver : null);
|
|
1308
|
+
if (!p || (!e && window.naver && r(window.naver), !_.current))
|
|
1309
|
+
return null;
|
|
1310
|
+
const u = _.current;
|
|
1311
|
+
if (!u.isConnected)
|
|
1312
|
+
return null;
|
|
1313
|
+
try {
|
|
1314
|
+
const g = {
|
|
1315
|
+
center: new p.maps.LatLng(37.5665, 126.978),
|
|
1316
|
+
// 서울 시청 기본 좌표
|
|
1317
|
+
zoom: 11,
|
|
1318
|
+
maxZoom: 20,
|
|
1319
|
+
minZoom: 11,
|
|
1320
|
+
mapTypeControl: !1,
|
|
1321
|
+
scaleControl: !1,
|
|
1322
|
+
logoControl: !1,
|
|
1323
|
+
mapDataControl: !1,
|
|
1324
|
+
zoomControl: !1,
|
|
1325
|
+
...d
|
|
1326
|
+
}, h = new p.maps.Map(u, g);
|
|
1327
|
+
return n((f) => {
|
|
1328
|
+
const x = u.getAttribute("id") || "default";
|
|
1329
|
+
return { ...f, [x]: h };
|
|
1330
|
+
}), h;
|
|
1331
|
+
} catch (g) {
|
|
1332
|
+
return console.error("Map creation error:", g), null;
|
|
1333
|
+
}
|
|
1334
|
+
},
|
|
1335
|
+
[e]
|
|
1336
|
+
);
|
|
1337
|
+
return i && console.error("NaverMapProvider error:", i), /* @__PURE__ */ l(ve.Provider, { value: { naver: e, createMap: m, maps: a }, children: o });
|
|
1338
|
+
}, Le = () => {
|
|
1339
|
+
const t = re(ve);
|
|
1340
|
+
if (!t)
|
|
1341
|
+
throw new Error("useNaverMap must be used within NaverMapProvider");
|
|
1342
|
+
return t;
|
|
1343
|
+
};
|
|
1344
|
+
function sr(t) {
|
|
1345
|
+
const s = function(e) {
|
|
1346
|
+
this.DEFAULT_OPTIONS = {
|
|
1347
|
+
map: null,
|
|
1348
|
+
markers: [],
|
|
1349
|
+
disableClickZoom: !0,
|
|
1350
|
+
minClusterSize: 2,
|
|
1351
|
+
maxZoom: 13,
|
|
1352
|
+
gridSize: 100,
|
|
1353
|
+
icons: [],
|
|
1354
|
+
indexGenerator: [10, 100, 200, 500, 1e3],
|
|
1355
|
+
averageCenter: !1,
|
|
1356
|
+
stylingFunction: function() {
|
|
1357
|
+
}
|
|
1358
|
+
}, this._clusters = [], this._mapRelations = null, this._markerRelations = [], this.setOptions(t.maps.Util.extend({}, this.DEFAULT_OPTIONS, e), !0), this.setMap(e.map || null);
|
|
1359
|
+
};
|
|
1360
|
+
t.maps.Util.ClassExtend(s, t.maps.OverlayView, {
|
|
1361
|
+
onAdd: function() {
|
|
1362
|
+
const e = this.getMap();
|
|
1363
|
+
this._mapRelations = t.maps.Event.addListener(
|
|
1364
|
+
e,
|
|
1365
|
+
"idle",
|
|
1366
|
+
t.maps.Util.bind(this._onIdle, this)
|
|
1367
|
+
), this.getMarkers().length > 0 && (this._createClusters(), this._updateClusters());
|
|
1368
|
+
},
|
|
1369
|
+
draw: t.maps.Util.noop,
|
|
1370
|
+
onRemove: function() {
|
|
1371
|
+
t.maps.Event.removeListener(this._mapRelation), this._clearClusters(), this._geoTree = null, this._mapRelation = null;
|
|
1372
|
+
},
|
|
1373
|
+
setOptions: function(e) {
|
|
1374
|
+
const r = this;
|
|
1375
|
+
if (typeof e == "string") {
|
|
1376
|
+
const a = e, n = arguments[1];
|
|
1377
|
+
r.set(a, n);
|
|
1378
|
+
} else {
|
|
1379
|
+
const a = arguments[1];
|
|
1380
|
+
t.maps.Util.forEach(e, function(n, i) {
|
|
1381
|
+
i !== "map" && r.set(i, n);
|
|
1382
|
+
}), e.map && !a && r.setMap(e.map);
|
|
1383
|
+
}
|
|
1384
|
+
},
|
|
1385
|
+
getOptions: function(e) {
|
|
1386
|
+
const r = this, a = {};
|
|
1387
|
+
return e !== void 0 ? r.get(e) : (t.maps.Util.forEach(r.DEFAULT_OPTIONS, function(n, i) {
|
|
1388
|
+
a[i] = r.get(i);
|
|
1389
|
+
}), a);
|
|
1390
|
+
},
|
|
1391
|
+
getMinClusterSize: function() {
|
|
1392
|
+
return this.getOptions("minClusterSize");
|
|
1393
|
+
},
|
|
1394
|
+
setMinClusterSize: function(e) {
|
|
1395
|
+
this.setOptions("minClusterSize", e);
|
|
1396
|
+
},
|
|
1397
|
+
getMaxZoom: function() {
|
|
1398
|
+
return this.getOptions("maxZoom");
|
|
1399
|
+
},
|
|
1400
|
+
setMaxZoom: function(e) {
|
|
1401
|
+
this.setOptions("maxZoom", e);
|
|
1402
|
+
},
|
|
1403
|
+
getGridSize: function() {
|
|
1404
|
+
return this.getOptions("gridSize");
|
|
1405
|
+
},
|
|
1406
|
+
setGridSize: function(e) {
|
|
1407
|
+
this.setOptions("gridSize", e);
|
|
1408
|
+
},
|
|
1409
|
+
getIndexGenerator: function() {
|
|
1410
|
+
return this.getOptions("indexGenerator");
|
|
1411
|
+
},
|
|
1412
|
+
setIndexGenerator: function(e) {
|
|
1413
|
+
this.setOptions("indexGenerator", e);
|
|
1414
|
+
},
|
|
1415
|
+
getMarkers: function() {
|
|
1416
|
+
return this.getOptions("markers");
|
|
1417
|
+
},
|
|
1418
|
+
setMarkers: function(e) {
|
|
1419
|
+
this.setOptions("markers", e);
|
|
1420
|
+
},
|
|
1421
|
+
getIcons: function() {
|
|
1422
|
+
return this.getOptions("icons");
|
|
1423
|
+
},
|
|
1424
|
+
setIcons: function(e) {
|
|
1425
|
+
this.setOptions("icons", e);
|
|
1426
|
+
},
|
|
1427
|
+
getStylingFunction: function() {
|
|
1428
|
+
return this.getOptions("stylingFunction");
|
|
1429
|
+
},
|
|
1430
|
+
setStylingFunction: function(e) {
|
|
1431
|
+
this.setOptions("stylingFunction", e);
|
|
1432
|
+
},
|
|
1433
|
+
getDisableClickZoom: function() {
|
|
1434
|
+
return this.getOptions("disableClickZoom");
|
|
1435
|
+
},
|
|
1436
|
+
setDisableClickZoom: function(e) {
|
|
1437
|
+
this.setOptions("disableClickZoom", e);
|
|
1438
|
+
},
|
|
1439
|
+
getAverageCenter: function() {
|
|
1440
|
+
return this.getOptions("averageCenter");
|
|
1441
|
+
},
|
|
1442
|
+
setAverageCenter: function(e) {
|
|
1443
|
+
this.setOptions("averageCenter", e);
|
|
1444
|
+
},
|
|
1445
|
+
changed: function(e, r) {
|
|
1446
|
+
if (this.getMap())
|
|
1447
|
+
switch (e) {
|
|
1448
|
+
case "marker":
|
|
1449
|
+
case "minClusterSize":
|
|
1450
|
+
case "gridSize":
|
|
1451
|
+
case "averageCenter":
|
|
1452
|
+
this._redraw();
|
|
1453
|
+
break;
|
|
1454
|
+
case "indexGenerator":
|
|
1455
|
+
case "icons":
|
|
1456
|
+
this._clusters.forEach(function(n) {
|
|
1457
|
+
n.updateIcon();
|
|
1458
|
+
});
|
|
1459
|
+
break;
|
|
1460
|
+
case "maxZoom":
|
|
1461
|
+
this._clusters.forEach(function(n) {
|
|
1462
|
+
n.getCount() > 1 && n.checkByZoomAndMinClusterSize();
|
|
1463
|
+
});
|
|
1464
|
+
break;
|
|
1465
|
+
case "stylingFunction":
|
|
1466
|
+
this._clusters.forEach(function(n) {
|
|
1467
|
+
n.updateCount();
|
|
1468
|
+
});
|
|
1469
|
+
break;
|
|
1470
|
+
case "disableClickZoom":
|
|
1471
|
+
let a = "enableClickZoom";
|
|
1472
|
+
r && (a = "disableClickZoom"), this._clusters.forEach(function(n) {
|
|
1473
|
+
n[a]();
|
|
1474
|
+
});
|
|
1475
|
+
break;
|
|
1476
|
+
}
|
|
1477
|
+
},
|
|
1478
|
+
_createClusters: function() {
|
|
1479
|
+
const e = this.getMap();
|
|
1480
|
+
if (!e) return;
|
|
1481
|
+
const r = e.getBounds(), a = this.getMarkers();
|
|
1482
|
+
for (let n = 0, i = a.length; n < i; n++) {
|
|
1483
|
+
const c = a[n], m = c.getPosition();
|
|
1484
|
+
if (!r.hasLatLng(m)) continue;
|
|
1485
|
+
this._getClosestCluster(m).addMarker(c), this._markerRelations.push(
|
|
1486
|
+
t.maps.Event.addListener(
|
|
1487
|
+
c,
|
|
1488
|
+
"dragend",
|
|
1489
|
+
t.maps.Util.bind(this._onDragEnd, this)
|
|
1490
|
+
)
|
|
1491
|
+
);
|
|
1492
|
+
}
|
|
1493
|
+
},
|
|
1494
|
+
_updateClusters: function() {
|
|
1495
|
+
const e = this._clusters;
|
|
1496
|
+
for (let r = 0, a = e.length; r < a; r++)
|
|
1497
|
+
e[r].updateCluster();
|
|
1498
|
+
},
|
|
1499
|
+
_clearClusters: function() {
|
|
1500
|
+
const e = this._clusters;
|
|
1501
|
+
for (let r = 0, a = e.length; r < a; r++)
|
|
1502
|
+
e[r].destroy();
|
|
1503
|
+
t.maps.Event.removeListener(this._markerRelations), this._markerRelations = [], this._clusters = [];
|
|
1504
|
+
},
|
|
1505
|
+
_redraw: function() {
|
|
1506
|
+
this._clearClusters(), this._createClusters(), this._updateClusters();
|
|
1507
|
+
},
|
|
1508
|
+
_getClosestCluster: function(e) {
|
|
1509
|
+
const r = this.getProjection(), a = this._clusters;
|
|
1510
|
+
let n = null, i = 1 / 0;
|
|
1511
|
+
for (let c = 0, m = a.length; c < m; c++) {
|
|
1512
|
+
const _ = a[c], d = _.getCenter();
|
|
1513
|
+
if (_.isInBounds(e)) {
|
|
1514
|
+
const p = r.getDistance(d, e);
|
|
1515
|
+
p < i && (i = p, n = _);
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
return n || (n = new o(this), this._clusters.push(n)), n;
|
|
1519
|
+
},
|
|
1520
|
+
_onIdle: function() {
|
|
1521
|
+
this._redraw();
|
|
1522
|
+
},
|
|
1523
|
+
_onDragEnd: function() {
|
|
1524
|
+
this._redraw();
|
|
1525
|
+
}
|
|
1526
|
+
});
|
|
1527
|
+
const o = function(e) {
|
|
1528
|
+
this._clusterCenter = null, this._clusterBounds = null, this._clusterMarker = null, this._relation = null, this._clusterMember = [], this._markerClusters = e;
|
|
1529
|
+
};
|
|
1530
|
+
return o.prototype = {
|
|
1531
|
+
constructor: o,
|
|
1532
|
+
addMarker: function(e) {
|
|
1533
|
+
if (!this._isMember(e)) {
|
|
1534
|
+
if (!this._clusterCenter) {
|
|
1535
|
+
const r = e.getPosition();
|
|
1536
|
+
this._clusterCenter = r, this._clusterBounds = this._calcBounds(r);
|
|
1537
|
+
}
|
|
1538
|
+
this._clusterMember.push(e);
|
|
1539
|
+
}
|
|
1540
|
+
},
|
|
1541
|
+
destroy: function() {
|
|
1542
|
+
t.maps.Event.removeListener(this._relation);
|
|
1543
|
+
const e = this._clusterMember;
|
|
1544
|
+
for (let r = 0, a = e.length; r < a; r++)
|
|
1545
|
+
e[r].setMap(null);
|
|
1546
|
+
this._clusterMarker.setMap(null), this._clusterMarker = null, this._clusterCenter = null, this._clusterBounds = null, this._relation = null, this._clusterMember = [];
|
|
1547
|
+
},
|
|
1548
|
+
getCenter: function() {
|
|
1549
|
+
return this._clusterCenter;
|
|
1550
|
+
},
|
|
1551
|
+
getBounds: function() {
|
|
1552
|
+
return this._clusterBounds;
|
|
1553
|
+
},
|
|
1554
|
+
getCount: function() {
|
|
1555
|
+
return this._clusterMember.length;
|
|
1556
|
+
},
|
|
1557
|
+
getClusterMember: function() {
|
|
1558
|
+
return this._clusterMember;
|
|
1559
|
+
},
|
|
1560
|
+
isInBounds: function(e) {
|
|
1561
|
+
return this._clusterBounds && this._clusterBounds.hasLatLng(e);
|
|
1562
|
+
},
|
|
1563
|
+
enableClickZoom: function() {
|
|
1564
|
+
if (this._relation) return;
|
|
1565
|
+
const e = this._markerClusters.getMap();
|
|
1566
|
+
this._relation = t.maps.Event.addListener(
|
|
1567
|
+
this._clusterMarker,
|
|
1568
|
+
"click",
|
|
1569
|
+
t.maps.Util.bind(function(r) {
|
|
1570
|
+
e.morph(r.coord, e.getZoom() + 1);
|
|
1571
|
+
}, this)
|
|
1572
|
+
);
|
|
1573
|
+
},
|
|
1574
|
+
disableClickZoom: function() {
|
|
1575
|
+
this._relation && (t.maps.Event.removeListener(this._relation), this._relation = null);
|
|
1576
|
+
},
|
|
1577
|
+
updateCluster: function() {
|
|
1578
|
+
if (!this._clusterMarker) {
|
|
1579
|
+
let e;
|
|
1580
|
+
this._markerClusters.getAverageCenter() ? e = this._calcAverageCenter(this._clusterMember) : e = this._clusterCenter, this._clusterMarker = new t.maps.Marker({
|
|
1581
|
+
position: e,
|
|
1582
|
+
map: this._markerClusters.getMap()
|
|
1583
|
+
}), this._markerClusters.getDisableClickZoom() || this.enableClickZoom();
|
|
1584
|
+
}
|
|
1585
|
+
this.updateIcon(), this.updateCount(), this.checkByZoomAndMinClusterSize();
|
|
1586
|
+
},
|
|
1587
|
+
checkByZoomAndMinClusterSize: function() {
|
|
1588
|
+
const e = this._markerClusters, r = e.getMinClusterSize(), a = e.getMaxZoom(), n = e.getMap().getZoom();
|
|
1589
|
+
this.getCount() < r ? this._showMember() : (this._hideMember(), a <= n && this._showMember());
|
|
1590
|
+
},
|
|
1591
|
+
updateCount: function() {
|
|
1592
|
+
const e = this._markerClusters.getStylingFunction();
|
|
1593
|
+
e && e(this._clusterMarker, this.getCount());
|
|
1594
|
+
},
|
|
1595
|
+
updateIcon: function() {
|
|
1596
|
+
const e = this.getCount();
|
|
1597
|
+
let r = this._getIndex(e);
|
|
1598
|
+
const a = this._markerClusters.getIcons();
|
|
1599
|
+
r = Math.max(r, 0), r = Math.min(r, a.length - 1), this._clusterMarker.setIcon(a[r]);
|
|
1600
|
+
},
|
|
1601
|
+
_showMember: function() {
|
|
1602
|
+
const e = this._markerClusters.getMap(), r = this._clusterMarker, a = this._clusterMember;
|
|
1603
|
+
for (let n = 0, i = a.length; n < i; n++)
|
|
1604
|
+
a[n].setMap(e);
|
|
1605
|
+
r && r.setMap(null);
|
|
1606
|
+
},
|
|
1607
|
+
_hideMember: function() {
|
|
1608
|
+
const e = this._markerClusters.getMap(), r = this._clusterMarker, a = this._clusterMember;
|
|
1609
|
+
for (let n = 0, i = a.length; n < i; n++)
|
|
1610
|
+
a[n].setMap(null);
|
|
1611
|
+
r && !r.getMap() && r.setMap(e);
|
|
1612
|
+
},
|
|
1613
|
+
_calcBounds: function(e) {
|
|
1614
|
+
const r = this._markerClusters.getMap(), a = new t.maps.LatLngBounds(e.clone(), e.clone()), n = r.getBounds(), i = r.getProjection(), c = i.fromCoordToOffset(n.getNE()), m = i.fromCoordToOffset(n.getSW()), _ = i.fromCoordToOffset(a.getNE()), d = i.fromCoordToOffset(a.getSW()), p = this._markerClusters.getGridSize() / 2;
|
|
1615
|
+
_.add(p, -p), d.add(-p, p);
|
|
1616
|
+
const u = Math.min(c.x, _.x), g = Math.max(c.y, _.y), h = Math.max(m.x, d.x), f = Math.min(m.y, d.y), x = i.fromOffsetToCoord(new t.maps.Point(u, g)), M = i.fromOffsetToCoord(new t.maps.Point(h, f));
|
|
1617
|
+
return new t.maps.LatLngBounds(M, x);
|
|
1618
|
+
},
|
|
1619
|
+
_getIndex: function(e) {
|
|
1620
|
+
const r = this._markerClusters.getIndexGenerator();
|
|
1621
|
+
if (t.maps.Util.isFunction(r))
|
|
1622
|
+
return r(e);
|
|
1623
|
+
if (t.maps.Util.isArray(r)) {
|
|
1624
|
+
let a = 0;
|
|
1625
|
+
for (let n = 0, i = r.length; n < i; n++) {
|
|
1626
|
+
const c = r[n];
|
|
1627
|
+
if (e < c) break;
|
|
1628
|
+
a++;
|
|
1629
|
+
}
|
|
1630
|
+
return a;
|
|
1631
|
+
}
|
|
1632
|
+
return 0;
|
|
1633
|
+
},
|
|
1634
|
+
_isMember: function(e) {
|
|
1635
|
+
return this._clusterMember.indexOf(e) !== -1;
|
|
1636
|
+
},
|
|
1637
|
+
_calcAverageCenter: function(e) {
|
|
1638
|
+
const r = e.length, a = [0, 0];
|
|
1639
|
+
for (let n = 0; n < r; n++)
|
|
1640
|
+
a[0] += e[n].position.x, a[1] += e[n].position.y;
|
|
1641
|
+
return a[0] /= r, a[1] /= r, new t.maps.Point(a[0], a[1]);
|
|
1642
|
+
}
|
|
1643
|
+
}, s;
|
|
1644
|
+
}
|
|
1645
|
+
const ar = (t) => {
|
|
1646
|
+
const { naver: s } = Le(), [o, e] = k([]), r = O(
|
|
1647
|
+
/* @__PURE__ */ new Map()
|
|
1648
|
+
), a = O(null), n = b(
|
|
1649
|
+
(d) => {
|
|
1650
|
+
if (!t || !s) return null;
|
|
1651
|
+
const p = xe(d), u = new s.maps.Marker({
|
|
1652
|
+
...d,
|
|
1653
|
+
position: new s.maps.LatLng(d.position.latitude, d.position.longitude),
|
|
1654
|
+
map: t,
|
|
1655
|
+
icon: {
|
|
1656
|
+
content: p
|
|
1657
|
+
}
|
|
1658
|
+
});
|
|
1659
|
+
return d.onClick && s.maps.Event.addListener(u, "click", () => {
|
|
1660
|
+
d.onClick(d.id);
|
|
1661
|
+
}), e((g) => [...g, u]), r.current.set(d.id, { marker: u, data: d }), u;
|
|
1662
|
+
},
|
|
1663
|
+
[t, s]
|
|
1664
|
+
), i = b(
|
|
1665
|
+
(d, p) => {
|
|
1666
|
+
const u = r.current.get(d);
|
|
1667
|
+
if (!u || !s)
|
|
1668
|
+
return;
|
|
1669
|
+
const { marker: g, data: h } = u, f = { ...h, ...p }, x = g.getElement();
|
|
1670
|
+
if (x) {
|
|
1671
|
+
const M = x.querySelector(".popdeal-marker");
|
|
1672
|
+
M && "active" in p && M.setAttribute("active", String(!!p.active));
|
|
1673
|
+
}
|
|
1674
|
+
r.current.set(d, { marker: g, data: f });
|
|
1675
|
+
},
|
|
1676
|
+
[s]
|
|
1677
|
+
), c = b(() => {
|
|
1678
|
+
o.forEach((d) => {
|
|
1679
|
+
d && d.setMap(null);
|
|
1680
|
+
}), e([]), r.current.clear(), a.current && (a.current.setMap(null), a.current = null);
|
|
1681
|
+
}, [o]), m = b(
|
|
1682
|
+
(d) => {
|
|
1683
|
+
!t || !s || t.panTo(new s.maps.LatLng(d.latitude, d.longitude));
|
|
1684
|
+
},
|
|
1685
|
+
[t, s]
|
|
1686
|
+
), _ = b(
|
|
1687
|
+
(d) => {
|
|
1688
|
+
if (!t || !s || d.length === 0) return;
|
|
1689
|
+
const p = new s.maps.LatLngBounds(
|
|
1690
|
+
new s.maps.LatLng(d[0].latitude, d[0].longitude),
|
|
1691
|
+
new s.maps.LatLng(d[0].latitude, d[0].longitude)
|
|
1692
|
+
);
|
|
1693
|
+
d.forEach((u) => {
|
|
1694
|
+
p.extend(new s.maps.LatLng(u.latitude, u.longitude));
|
|
1695
|
+
}), t.fitBounds(p);
|
|
1696
|
+
},
|
|
1697
|
+
[t, s]
|
|
1698
|
+
);
|
|
1699
|
+
return D(() => {
|
|
1700
|
+
if (!s || !t || o.length === 0) return;
|
|
1701
|
+
const d = sr(s), u = {
|
|
1702
|
+
content: xe({
|
|
1703
|
+
type: "cluster",
|
|
1704
|
+
count: 0
|
|
1705
|
+
}),
|
|
1706
|
+
size: new s.maps.Size(96, 96),
|
|
1707
|
+
anchor: new s.maps.Point(20, 20)
|
|
1708
|
+
}, g = new d({
|
|
1709
|
+
minClusterSize: 2,
|
|
1710
|
+
maxZoom: 17,
|
|
1711
|
+
map: t,
|
|
1712
|
+
markers: o,
|
|
1713
|
+
disableClickZoom: !1,
|
|
1714
|
+
gridSize: 120,
|
|
1715
|
+
icons: [u],
|
|
1716
|
+
indexGenerator: [10, 100, 200, 500, 1e3],
|
|
1717
|
+
averageCenter: !1,
|
|
1718
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1719
|
+
// @ts-ignore
|
|
1720
|
+
stylingFunction: (h, f) => {
|
|
1721
|
+
if (h && typeof h.getElement == "function") {
|
|
1722
|
+
const x = h.getElement().querySelector(".cluster-marker-text");
|
|
1723
|
+
x && (x.textContent = String(f));
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
934
1726
|
});
|
|
935
|
-
|
|
1727
|
+
return a.current = g, () => {
|
|
1728
|
+
g.setMap(null);
|
|
1729
|
+
};
|
|
1730
|
+
}, [s, t, o]), { addMarker: n, updateMarker: i, clearMarkers: c, panTo: m, fitBounds: _ };
|
|
1731
|
+
}, Ie = ({ options: t, onLoad: s }) => {
|
|
1732
|
+
const o = O(null), e = O(null), { createMap: r } = Le(), [a, n] = k(null), i = ar(a), { width: c = "100%", height: m = "100%", ..._ } = t || {}, d = U(() => _, [JSON.stringify(_)]);
|
|
1733
|
+
return D(() => {
|
|
1734
|
+
if (typeof document > "u" || document.getElementById("pop-ui-map-marker-styles")) return;
|
|
1735
|
+
const u = document.createElement("style");
|
|
1736
|
+
return u.id = "pop-ui-map-marker-styles", u.textContent = or, document.head.appendChild(u), e.current = u, () => {
|
|
1737
|
+
};
|
|
1738
|
+
}, []), D(() => {
|
|
1739
|
+
let p = null, u = null;
|
|
1740
|
+
if (a && (a.destroy(), n(null)), o.current && o.current.isConnected) {
|
|
1741
|
+
const g = () => o.current && o.current.isConnected && (p = r(o, d), p) ? (n(p), !0) : !1;
|
|
1742
|
+
if (!g()) {
|
|
1743
|
+
let h = 0;
|
|
1744
|
+
const f = 50;
|
|
1745
|
+
u = setInterval(() => {
|
|
1746
|
+
h++, (g() || h >= f) && u && (clearInterval(u), u = null);
|
|
1747
|
+
}, 100);
|
|
1748
|
+
}
|
|
1749
|
+
return () => {
|
|
1750
|
+
u && clearInterval(u), p && (p.destroy(), p = null);
|
|
1751
|
+
};
|
|
1752
|
+
}
|
|
1753
|
+
return () => {
|
|
1754
|
+
u && clearInterval(u), p && (p.destroy(), p = null);
|
|
1755
|
+
};
|
|
1756
|
+
}, [r, d]), D(() => {
|
|
1757
|
+
a && s && s({ map: a, ...i });
|
|
1758
|
+
}, [a, s, i]), /* @__PURE__ */ l(
|
|
1759
|
+
"div",
|
|
1760
|
+
{
|
|
1761
|
+
ref: o,
|
|
1762
|
+
style: {
|
|
1763
|
+
width: typeof c == "number" ? `${c}px` : c,
|
|
1764
|
+
height: typeof m == "number" ? `${m}px` : m
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
);
|
|
1768
|
+
};
|
|
1769
|
+
Ie.displayName = "Map";
|
|
1770
|
+
const ir = "위치 정보를 불러오는 데 실패했어요.", lr = "위치 서비스 권한과 네트워크 상태를 확인해주세요.", jr = ({
|
|
1771
|
+
isActive: t = !1,
|
|
1772
|
+
errorMessage: s = ir,
|
|
1773
|
+
errorDescription: o = lr
|
|
1774
|
+
}) => {
|
|
1775
|
+
const [e, r] = k(!1), [a, n] = k(!1), [i, c] = k(null), m = O(!1);
|
|
1776
|
+
return D(() => {
|
|
1777
|
+
if (t && typeof navigator < "u" && "geolocation" in navigator) {
|
|
1778
|
+
if (m.current) return;
|
|
1779
|
+
m.current = !0, requestAnimationFrame(() => {
|
|
1780
|
+
r(!0);
|
|
1781
|
+
});
|
|
1782
|
+
const _ = {
|
|
1783
|
+
enableHighAccuracy: !0,
|
|
1784
|
+
timeout: 1e4,
|
|
1785
|
+
maximumAge: 0
|
|
1786
|
+
};
|
|
1787
|
+
navigator.geolocation.getCurrentPosition(
|
|
1788
|
+
(d) => {
|
|
1789
|
+
c({
|
|
1790
|
+
latitude: d.coords.latitude,
|
|
1791
|
+
longitude: d.coords.longitude
|
|
1792
|
+
}), r(!1), n(!1), m.current = !1;
|
|
1793
|
+
},
|
|
1794
|
+
(d) => {
|
|
1795
|
+
c(null), console.error("Geolocation error:", d), Z({
|
|
1796
|
+
message: `${s} ${o}`
|
|
1797
|
+
}), r(!1), n(!0), m.current = !1;
|
|
1798
|
+
},
|
|
1799
|
+
_
|
|
1800
|
+
);
|
|
1801
|
+
}
|
|
1802
|
+
}, [t, s, o]), { position: i, isLoading: e, isError: a };
|
|
1803
|
+
}, Ce = (t = "light") => {
|
|
1804
|
+
const s = [];
|
|
1805
|
+
return Object.entries(we).forEach(([o, e]) => {
|
|
1806
|
+
Object.entries(e).forEach(([r, a]) => {
|
|
1807
|
+
const n = jt(o, r);
|
|
1808
|
+
s.push(`${n}: ${a};`);
|
|
1809
|
+
});
|
|
1810
|
+
}), s.join(`
|
|
936
1811
|
`);
|
|
937
|
-
},
|
|
938
|
-
const
|
|
939
|
-
|
|
940
|
-
const
|
|
941
|
-
|
|
1812
|
+
}, cr = (t = "light") => {
|
|
1813
|
+
const s = document.getElementById("pop-ui-theme-vars");
|
|
1814
|
+
s && s.remove();
|
|
1815
|
+
const o = document.createElement("style");
|
|
1816
|
+
o.id = "pop-ui-theme-vars", o.textContent = `
|
|
942
1817
|
:root {
|
|
943
|
-
${
|
|
1818
|
+
${Ce("light")}
|
|
944
1819
|
}
|
|
945
1820
|
|
|
946
1821
|
[data-theme="dark"] {
|
|
947
|
-
${
|
|
1822
|
+
${Ce("dark")}
|
|
948
1823
|
}
|
|
949
|
-
`, document.head.appendChild(
|
|
950
|
-
},
|
|
951
|
-
const
|
|
1824
|
+
`, document.head.appendChild(o);
|
|
1825
|
+
}, F = (t) => {
|
|
1826
|
+
const s = we[t], o = Object.keys(s).sort((r, a) => Number(r) - Number(a));
|
|
952
1827
|
return [
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
1828
|
+
L(t, o[0] || o[o.length - 1]),
|
|
1829
|
+
L(t, o[1] || o[o.length - 1]),
|
|
1830
|
+
L(t, o[2] || o[o.length - 1]),
|
|
1831
|
+
L(t, o[3] || o[o.length - 1]),
|
|
1832
|
+
L(t, o[4] || o[o.length - 1]),
|
|
1833
|
+
L(t, o[5] || o[o.length - 1]),
|
|
1834
|
+
L(t, o[6] || o[o.length - 1]),
|
|
1835
|
+
L(t, o[7] || o[o.length - 1]),
|
|
1836
|
+
L(t, o[8] || o[o.length - 1]),
|
|
1837
|
+
L(t, o[9] || o[o.length - 1])
|
|
963
1838
|
];
|
|
964
|
-
},
|
|
1839
|
+
}, dr = Ve({
|
|
965
1840
|
colors: {
|
|
966
|
-
gray:
|
|
967
|
-
aqua:
|
|
968
|
-
red:
|
|
969
|
-
orange:
|
|
970
|
-
yellow:
|
|
971
|
-
green:
|
|
972
|
-
blue:
|
|
973
|
-
purple:
|
|
974
|
-
grape:
|
|
1841
|
+
gray: F("gray"),
|
|
1842
|
+
aqua: F("aqua"),
|
|
1843
|
+
red: F("red"),
|
|
1844
|
+
orange: F("orange"),
|
|
1845
|
+
yellow: F("yellow"),
|
|
1846
|
+
green: F("green"),
|
|
1847
|
+
blue: F("blue"),
|
|
1848
|
+
purple: F("purple"),
|
|
1849
|
+
grape: F("grape")
|
|
975
1850
|
},
|
|
976
1851
|
primaryColor: "aqua",
|
|
977
1852
|
primaryShade: 5,
|
|
978
1853
|
fontFamily: 'Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
|
|
979
|
-
}),
|
|
980
|
-
children:
|
|
981
|
-
defaultTheme:
|
|
1854
|
+
}), Pe = oe(void 0), De = oe({}), Vr = ({
|
|
1855
|
+
children: t,
|
|
1856
|
+
defaultTheme: s = "light",
|
|
1857
|
+
naverClientId: o,
|
|
982
1858
|
notificationPosition: e = "bottom-center",
|
|
983
1859
|
notificationLimit: r = 5,
|
|
984
1860
|
notificationAutoClose: a,
|
|
985
|
-
notificationZIndex:
|
|
1861
|
+
notificationZIndex: n
|
|
986
1862
|
}) => {
|
|
987
|
-
const [
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
}, [
|
|
991
|
-
const
|
|
992
|
-
|
|
1863
|
+
const [i, c] = k(s);
|
|
1864
|
+
D(() => {
|
|
1865
|
+
cr(i), document.documentElement.setAttribute("data-theme", i);
|
|
1866
|
+
}, [i]);
|
|
1867
|
+
const m = () => {
|
|
1868
|
+
c((_) => _ === "light" ? "dark" : "light");
|
|
993
1869
|
};
|
|
994
|
-
return /* @__PURE__ */ l(
|
|
1870
|
+
return /* @__PURE__ */ l(Pe.Provider, { value: { theme: i, setTheme: c, toggleTheme: m }, children: /* @__PURE__ */ l(De.Provider, { value: { naverClientId: o }, children: /* @__PURE__ */ y(Ge, { theme: dr, children: [
|
|
995
1871
|
/* @__PURE__ */ l(
|
|
996
|
-
|
|
1872
|
+
qt,
|
|
997
1873
|
{
|
|
998
1874
|
position: e,
|
|
999
1875
|
limit: r,
|
|
1000
1876
|
autoClose: a,
|
|
1001
|
-
zIndex:
|
|
1877
|
+
zIndex: n
|
|
1002
1878
|
}
|
|
1003
1879
|
),
|
|
1004
|
-
|
|
1005
|
-
] }) });
|
|
1006
|
-
},
|
|
1007
|
-
const
|
|
1008
|
-
if (!
|
|
1880
|
+
t
|
|
1881
|
+
] }) }) });
|
|
1882
|
+
}, Gr = () => {
|
|
1883
|
+
const t = re(Pe);
|
|
1884
|
+
if (!t)
|
|
1009
1885
|
throw new Error("useTheme must be used within ThemeProvider");
|
|
1010
|
-
return
|
|
1886
|
+
return t;
|
|
1887
|
+
}, _r = () => re(De), ur = "styles-module__MapInfo___scB-5", mr = "styles-module__MapInfo__NoClientId___YBM4o", pr = "styles-module__MapInfo__Preview___FJbQN", gr = "styles-module__MapInfo__ExpandButton___8KySg", hr = "styles-module__MapInfo__AddressBar___mKkK6", fr = "styles-module__MapInfo__AddressContent___XG1Uz", xr = "styles-module__MapInfo__Address___iXO6N", yr = "styles-module__MapInfo__DirectionLink___eGnf-", Cr = "styles-module__MapInfo__DirectionButton___gTWpj", I = {
|
|
1888
|
+
MapInfo: ur,
|
|
1889
|
+
MapInfo__NoClientId: mr,
|
|
1890
|
+
MapInfo__Preview: pr,
|
|
1891
|
+
MapInfo__ExpandButton: gr,
|
|
1892
|
+
MapInfo__AddressBar: hr,
|
|
1893
|
+
MapInfo__AddressContent: fr,
|
|
1894
|
+
MapInfo__Address: xr,
|
|
1895
|
+
MapInfo__DirectionLink: yr,
|
|
1896
|
+
MapInfo__DirectionButton: Cr
|
|
1897
|
+
}, kr = 60, Jr = ({
|
|
1898
|
+
onClickMap: t,
|
|
1899
|
+
address: s,
|
|
1900
|
+
markerImageUrl: o,
|
|
1901
|
+
shopTitle: e,
|
|
1902
|
+
directionUrl: r,
|
|
1903
|
+
latitude: a,
|
|
1904
|
+
longitude: n,
|
|
1905
|
+
naverClientId: i,
|
|
1906
|
+
onExpandRequest: c,
|
|
1907
|
+
height: m = 200,
|
|
1908
|
+
directionLabel: _ = "길찾기",
|
|
1909
|
+
addressCopiedMessage: d = "주소 복사 완료"
|
|
1910
|
+
}) => {
|
|
1911
|
+
const p = _r(), u = i || p.naverClientId, [g, h] = k(null), f = m - kr, x = b((B) => {
|
|
1912
|
+
B && B.map && h(B);
|
|
1913
|
+
}, []), M = b(() => {
|
|
1914
|
+
c?.();
|
|
1915
|
+
}, [c]), v = b(
|
|
1916
|
+
(B, G, Ee) => {
|
|
1917
|
+
if (B && B.map && a && n)
|
|
1918
|
+
try {
|
|
1919
|
+
B.addMarker(G), Ee?.();
|
|
1920
|
+
} catch (Ae) {
|
|
1921
|
+
console.error("Error creating map marker:", Ae);
|
|
1922
|
+
}
|
|
1923
|
+
},
|
|
1924
|
+
[a, n]
|
|
1925
|
+
), z = b(
|
|
1926
|
+
(B, G) => {
|
|
1927
|
+
B && B.map && a && n && (B.clearMarkers(), v(
|
|
1928
|
+
B,
|
|
1929
|
+
{
|
|
1930
|
+
id: `shop-marker-${e}`,
|
|
1931
|
+
type: G,
|
|
1932
|
+
position: { latitude: a, longitude: n },
|
|
1933
|
+
title: e,
|
|
1934
|
+
icon: o ?? void 0,
|
|
1935
|
+
address: s ?? void 0
|
|
1936
|
+
},
|
|
1937
|
+
() => {
|
|
1938
|
+
B.panTo({ latitude: a, longitude: n });
|
|
1939
|
+
}
|
|
1940
|
+
));
|
|
1941
|
+
},
|
|
1942
|
+
[a, n, e, o, s, v]
|
|
1943
|
+
);
|
|
1944
|
+
D(() => {
|
|
1945
|
+
a && n && g && z(g, "pi");
|
|
1946
|
+
}, [g, a, n, z]), D(() => () => {
|
|
1947
|
+
h(null);
|
|
1948
|
+
}, []);
|
|
1949
|
+
const A = b(() => {
|
|
1950
|
+
typeof navigator < "u" && navigator.clipboard && (navigator.clipboard.writeText(s), Z(d));
|
|
1951
|
+
}, [s, d]), Fe = U(() => r || `https://map.naver.com/p/search/${encodeURIComponent(e)}`, [r, e]);
|
|
1952
|
+
return u ? /* @__PURE__ */ y("div", { className: I.MapInfo, style: { height: m }, onClick: t, children: [
|
|
1953
|
+
/* @__PURE__ */ l(nr, { clientId: u, children: /* @__PURE__ */ y("div", { className: I.MapInfo__Preview, onClick: M, children: [
|
|
1954
|
+
/* @__PURE__ */ l(
|
|
1955
|
+
Ie,
|
|
1956
|
+
{
|
|
1957
|
+
onLoad: x,
|
|
1958
|
+
options: {
|
|
1959
|
+
width: "100%",
|
|
1960
|
+
height: `${f}px`,
|
|
1961
|
+
center: {
|
|
1962
|
+
lat: a,
|
|
1963
|
+
lng: n
|
|
1964
|
+
},
|
|
1965
|
+
zoom: 15,
|
|
1966
|
+
minZoom: 15,
|
|
1967
|
+
maxZoom: 15,
|
|
1968
|
+
draggable: !1,
|
|
1969
|
+
keyboardShortcuts: !1,
|
|
1970
|
+
mapTypeControl: !1,
|
|
1971
|
+
scaleControl: !1,
|
|
1972
|
+
logoControl: !1,
|
|
1973
|
+
mapDataControl: !1,
|
|
1974
|
+
zoomControl: !1
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
),
|
|
1978
|
+
c && /* @__PURE__ */ l("div", { className: I.MapInfo__ExpandButton, children: /* @__PURE__ */ l(Vt, { color: Gt, size: 18 }) })
|
|
1979
|
+
] }) }),
|
|
1980
|
+
/* @__PURE__ */ y("div", { className: I.MapInfo__AddressBar, children: [
|
|
1981
|
+
/* @__PURE__ */ y("div", { className: I.MapInfo__AddressContent, children: [
|
|
1982
|
+
/* @__PURE__ */ l(Jt, { color: Kt, size: 24, filled: !0 }),
|
|
1983
|
+
/* @__PURE__ */ l(
|
|
1984
|
+
"span",
|
|
1985
|
+
{
|
|
1986
|
+
className: I.MapInfo__Address,
|
|
1987
|
+
onClick: A,
|
|
1988
|
+
role: "button",
|
|
1989
|
+
tabIndex: 0,
|
|
1990
|
+
onKeyDown: (B) => B.key === "Enter" && A(),
|
|
1991
|
+
children: s
|
|
1992
|
+
}
|
|
1993
|
+
)
|
|
1994
|
+
] }),
|
|
1995
|
+
/* @__PURE__ */ l(
|
|
1996
|
+
"a",
|
|
1997
|
+
{
|
|
1998
|
+
className: I.MapInfo__DirectionLink,
|
|
1999
|
+
href: Fe,
|
|
2000
|
+
target: "_blank",
|
|
2001
|
+
rel: "noreferrer",
|
|
2002
|
+
children: /* @__PURE__ */ l(lo, { variant: "basic", size: "sm", className: I.MapInfo__DirectionButton, children: _ })
|
|
2003
|
+
}
|
|
2004
|
+
)
|
|
2005
|
+
] })
|
|
2006
|
+
] }) : /* @__PURE__ */ l("div", { className: I.MapInfo, style: { height: m }, children: /* @__PURE__ */ l("div", { className: I.MapInfo__NoClientId, children: "naverClientId가 필요합니다. PopUIProvider 또는 props로 전달해주세요." }) });
|
|
1011
2007
|
};
|
|
1012
2008
|
export {
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
2009
|
+
lo as Button,
|
|
2010
|
+
Dr as CalendarDatePicker,
|
|
2011
|
+
Pr as Checkbox,
|
|
2012
|
+
Fr as DatePicker,
|
|
2013
|
+
Er as Dropdown,
|
|
2014
|
+
Ar as ImageUploader,
|
|
2015
|
+
Ie as Map,
|
|
2016
|
+
Jr as MapInfo,
|
|
2017
|
+
Nr as Modal,
|
|
2018
|
+
nr as NaverMapProvider,
|
|
2019
|
+
$r as Pagination,
|
|
2020
|
+
Vr as PopUiProvider,
|
|
2021
|
+
Or as Radio,
|
|
2022
|
+
zr as SearchBar,
|
|
2023
|
+
Hr as SegmentButton,
|
|
2024
|
+
Rr as Tab,
|
|
2025
|
+
Ur as TextField,
|
|
2026
|
+
Zr as TimePicker,
|
|
2027
|
+
Yr as Toggle,
|
|
2028
|
+
Wr as Tooltip,
|
|
2029
|
+
xe as getMarkerHTML,
|
|
2030
|
+
sr as makeMarkerClustering,
|
|
2031
|
+
or as markerStyles,
|
|
2032
|
+
Z as toast,
|
|
2033
|
+
jr as useLocation,
|
|
2034
|
+
ar as useMap,
|
|
2035
|
+
Le as useNaverMap,
|
|
2036
|
+
Gr as useTheme
|
|
1032
2037
|
};
|