@idbrnd/design-system 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button/BasicIcon/BasicIconButton.d.ts +10 -0
- package/dist/components/Button/Fill/FillButton.d.ts +15 -0
- package/dist/components/Button/FillIcon/FillIconButton.d.ts +12 -0
- package/dist/components/Button/Outline/OutlineButton.d.ts +15 -0
- package/dist/components/Button/OutlineIcon/OutlineIconButton.d.ts +10 -0
- package/dist/components/Button/Text/TextButton.d.ts +15 -0
- package/dist/components/Button/Weak/WeakButton.d.ts +15 -0
- package/dist/components/Input/Input.d.ts +25 -0
- package/dist/components/Input/Input.types.d.ts +103 -0
- package/dist/components/Input/InputTrailing.d.ts +7 -0
- package/dist/components/Input/useInputState.d.ts +18 -0
- package/dist/components/PushBadge/PushBadge.d.ts +13 -0
- package/dist/components/SearchBar/SearchBar.d.ts +31 -0
- package/dist/components/Snackbar/Snackbar.d.ts +14 -0
- package/dist/components/Spinner/Spinner.d.ts +20 -0
- package/dist/components/Toast/Toast.d.ts +10 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +1085 -0
- package/dist/style.css +1 -0
- package/package.json +53 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1085 @@
|
|
|
1
|
+
import { jsx as n, jsxs as k, Fragment as xe } from "react/jsx-runtime";
|
|
2
|
+
import { Children as le, useMemo as q, useState as oe, useId as Ae, useRef as Me, useEffect as Re } from "react";
|
|
3
|
+
import De from "react-dom";
|
|
4
|
+
import './style.css';const qe = "_button_150dq_1", Le = "_large_150dq_36", Fe = "_small_150dq_47", ye = {
|
|
5
|
+
button: qe,
|
|
6
|
+
large: Le,
|
|
7
|
+
small: Fe
|
|
8
|
+
};
|
|
9
|
+
function He({
|
|
10
|
+
size: e = "large",
|
|
11
|
+
disabled: o = !1,
|
|
12
|
+
keepFocusOnClick: t = !1,
|
|
13
|
+
customStyle: i = {},
|
|
14
|
+
onClick: l,
|
|
15
|
+
className: c,
|
|
16
|
+
children: u,
|
|
17
|
+
type: r = "button",
|
|
18
|
+
...a
|
|
19
|
+
}) {
|
|
20
|
+
const _ = [
|
|
21
|
+
ye.button,
|
|
22
|
+
ye[e],
|
|
23
|
+
c ?? ""
|
|
24
|
+
].filter(Boolean).join(" ");
|
|
25
|
+
return /* @__PURE__ */ n(
|
|
26
|
+
"button",
|
|
27
|
+
{
|
|
28
|
+
"data-idb-component": !0,
|
|
29
|
+
type: r,
|
|
30
|
+
className: _,
|
|
31
|
+
onClick: (d) => {
|
|
32
|
+
l?.(d), !t && !d.defaultPrevented && d.currentTarget.blur();
|
|
33
|
+
},
|
|
34
|
+
disabled: o,
|
|
35
|
+
style: i,
|
|
36
|
+
...a,
|
|
37
|
+
children: u
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
const Oe = "_clipWrapper_3mxht_1", We = "_clip_3mxht_1", je = "_sync_3mxht_59", Pe = "_syncDot_3mxht_65", Ke = "_fade_3mxht_72", Ve = "_fadeBar_3mxht_77", F = {
|
|
42
|
+
clipWrapper: Oe,
|
|
43
|
+
clip: We,
|
|
44
|
+
sync: je,
|
|
45
|
+
syncDot: Pe,
|
|
46
|
+
fade: Ke,
|
|
47
|
+
fadeBar: Ve
|
|
48
|
+
}, ge = "var(--semantic-before-main)";
|
|
49
|
+
function Yo() {
|
|
50
|
+
return /* @__PURE__ */ n(Ue, {});
|
|
51
|
+
}
|
|
52
|
+
function Ue({ color: e = ge, size: o = 10 }) {
|
|
53
|
+
const t = Math.max(2, Math.round(o)), i = Math.max(2, Math.round(o * 0.5));
|
|
54
|
+
return (
|
|
55
|
+
// 점 3개를 가로로 배치하는 컨테이너
|
|
56
|
+
/* @__PURE__ */ n("span", { className: F.sync, style: { color: e, gap: i }, children: Array.from({ length: 3 }).map((l, c) => /* @__PURE__ */ n(
|
|
57
|
+
"span",
|
|
58
|
+
{
|
|
59
|
+
className: F.syncDot,
|
|
60
|
+
style: {
|
|
61
|
+
width: t,
|
|
62
|
+
height: t,
|
|
63
|
+
animationDelay: `${c * 0.12}s`
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
c
|
|
67
|
+
)) })
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
function Z({ color: e = ge, size: o = 10, text: t = "" }) {
|
|
71
|
+
const i = Math.max(2, Math.round(o / 12)), l = {
|
|
72
|
+
width: o,
|
|
73
|
+
height: o,
|
|
74
|
+
"--clip-size": `${o}px`,
|
|
75
|
+
"--clip-stroke": `${i}px`
|
|
76
|
+
};
|
|
77
|
+
return /* @__PURE__ */ k(
|
|
78
|
+
"span",
|
|
79
|
+
{
|
|
80
|
+
className: F.clipWrapper,
|
|
81
|
+
style: {
|
|
82
|
+
color: e
|
|
83
|
+
},
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ n("span", { className: F.clip, style: l }),
|
|
86
|
+
t ? /* @__PURE__ */ n("span", { style: { color: "var(--semantic-bg-default)", fontSize: "1rem", marginTop: "10px" }, children: t }) : null
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
function Xo({ color: e = ge, width: o = 4, height: t = 12, radius: i = 2, margin: l = 2 }) {
|
|
92
|
+
const u = Math.max(6, Math.round(t + l + 1)), r = u * 2 + t, a = 1, _ = a / 8;
|
|
93
|
+
return (
|
|
94
|
+
// 원형 막대 스피너의 기준 좌표가 되는 컨테이너(막대 위치는 고정)
|
|
95
|
+
/* @__PURE__ */ n("span", { className: F.fade, style: { color: e, width: r, height: r }, children: Array.from({ length: 8 }).map((p, d) => /* @__PURE__ */ n(
|
|
96
|
+
"span",
|
|
97
|
+
{
|
|
98
|
+
className: F.fadeBar,
|
|
99
|
+
style: {
|
|
100
|
+
width: o,
|
|
101
|
+
height: t,
|
|
102
|
+
borderRadius: i,
|
|
103
|
+
transform: `translate(-50%, -50%) rotate(${360 / 8 * d}deg) translateY(-${u}px)`,
|
|
104
|
+
animationDelay: `${-(7 - d) * _}s`,
|
|
105
|
+
animationDuration: `${a}s`
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
d
|
|
109
|
+
)) })
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
const ze = "_button_1h0bn_1", Ze = "_content_1h0bn_12", Ye = "_fixed_1h0bn_33", Xe = "_fixedContent_1h0bn_39", Ge = "_node_1h0bn_48", Je = "_text_1h0bn_54", Qe = "_large_1h0bn_64", en = "_medium_1h0bn_65", nn = "_small_1h0bn_66", tn = "_xsmall_1h0bn_70", on = "_flexible_1h0bn_74", sn = "_primary_1h0bn_90", ln = "_loading_1h0bn_90", rn = "_assistive_1h0bn_91", an = "_error_1h0bn_92", cn = "_spinnerWrapper_1h0bn_151", E = {
|
|
113
|
+
button: ze,
|
|
114
|
+
content: Ze,
|
|
115
|
+
fixed: Ye,
|
|
116
|
+
fixedContent: Xe,
|
|
117
|
+
node: Ge,
|
|
118
|
+
text: Je,
|
|
119
|
+
large: Qe,
|
|
120
|
+
medium: en,
|
|
121
|
+
small: nn,
|
|
122
|
+
xsmall: tn,
|
|
123
|
+
flexible: on,
|
|
124
|
+
primary: sn,
|
|
125
|
+
loading: ln,
|
|
126
|
+
assistive: rn,
|
|
127
|
+
error: an,
|
|
128
|
+
spinnerWrapper: cn,
|
|
129
|
+
"spinner-primary": "_spinner-primary_1h0bn_157",
|
|
130
|
+
"spinner-error": "_spinner-error_1h0bn_158",
|
|
131
|
+
"spinner-assistive": "_spinner-assistive_1h0bn_162"
|
|
132
|
+
};
|
|
133
|
+
function Go({
|
|
134
|
+
widthType: e = "flexible",
|
|
135
|
+
variant: o = "primary",
|
|
136
|
+
size: t = "medium",
|
|
137
|
+
disabled: i = !1,
|
|
138
|
+
loading: l = !1,
|
|
139
|
+
keepFocusOnClick: c = !1,
|
|
140
|
+
customStyle: u = {},
|
|
141
|
+
onClick: r,
|
|
142
|
+
className: a,
|
|
143
|
+
children: _,
|
|
144
|
+
type: p = "button",
|
|
145
|
+
...d
|
|
146
|
+
}) {
|
|
147
|
+
const h = [
|
|
148
|
+
E.button,
|
|
149
|
+
E[e],
|
|
150
|
+
E[o],
|
|
151
|
+
E[t],
|
|
152
|
+
l ? E.loading : "",
|
|
153
|
+
a ?? ""
|
|
154
|
+
].filter(Boolean).join(" "), b = [E.spinnerWrapper, E[`spinner-${o}`]].filter(Boolean).join(" "), x = [E.content, e === "fixed" ? E.fixedContent : ""].filter(Boolean).join(" "), N = e === "fixed" ? le.map(_, (s) => {
|
|
155
|
+
const y = typeof s == "string" || typeof s == "number" ? E.text : E.node;
|
|
156
|
+
return /* @__PURE__ */ n("span", { className: y, children: s });
|
|
157
|
+
}) : _, C = q(() => ({
|
|
158
|
+
large: 24,
|
|
159
|
+
medium: 24,
|
|
160
|
+
small: 24,
|
|
161
|
+
xsmall: 16
|
|
162
|
+
})[t], [t]);
|
|
163
|
+
return /* @__PURE__ */ n(
|
|
164
|
+
"button",
|
|
165
|
+
{
|
|
166
|
+
"data-idb-component": !0,
|
|
167
|
+
type: p,
|
|
168
|
+
className: h,
|
|
169
|
+
onClick: l ? void 0 : (s) => {
|
|
170
|
+
r?.(s), !c && !s.defaultPrevented && s.currentTarget.blur();
|
|
171
|
+
},
|
|
172
|
+
disabled: i,
|
|
173
|
+
style: u,
|
|
174
|
+
...d,
|
|
175
|
+
children: l ? /* @__PURE__ */ n("span", { className: b, children: /* @__PURE__ */ n(Z, { size: C, color: "currentColor" }) }) : /* @__PURE__ */ n("span", { className: x, children: N })
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
const un = "_button_lqb7w_1", _n = "_basic_lqb7w_27", dn = "_overlay_lqb7w_45", mn = "_primary_lqb7w_63", pn = "_large_lqb7w_83", fn = "_medium_lqb7w_94", de = {
|
|
180
|
+
button: un,
|
|
181
|
+
basic: _n,
|
|
182
|
+
overlay: dn,
|
|
183
|
+
primary: mn,
|
|
184
|
+
large: pn,
|
|
185
|
+
medium: fn
|
|
186
|
+
};
|
|
187
|
+
function Jo({
|
|
188
|
+
variant: e = "basic",
|
|
189
|
+
size: o = "medium",
|
|
190
|
+
disabled: t = !1,
|
|
191
|
+
keepFocusOnClick: i = !1,
|
|
192
|
+
customStyle: l = {},
|
|
193
|
+
onClick: c,
|
|
194
|
+
children: u,
|
|
195
|
+
type: r = "button",
|
|
196
|
+
...a
|
|
197
|
+
}) {
|
|
198
|
+
const _ = [de.button, de[e], de[o]].filter(Boolean).join(" ");
|
|
199
|
+
return /* @__PURE__ */ n(
|
|
200
|
+
"button",
|
|
201
|
+
{
|
|
202
|
+
"data-idb-component": !0,
|
|
203
|
+
type: r,
|
|
204
|
+
className: _,
|
|
205
|
+
onClick: (d) => {
|
|
206
|
+
c?.(d), !i && !d.defaultPrevented && d.currentTarget.blur();
|
|
207
|
+
},
|
|
208
|
+
disabled: t,
|
|
209
|
+
style: l,
|
|
210
|
+
...a,
|
|
211
|
+
children: u
|
|
212
|
+
}
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
const hn = "_root_15y9v_1", gn = "_label_15y9v_8", xn = "_labelDisabled_15y9v_16", yn = "_requiredMark_15y9v_20", bn = "_controlRow_15y9v_24", Cn = "_control_15y9v_24", vn = "_small_15y9v_48", $n = "_outline_15y9v_53", Nn = "_fill_15y9v_57", wn = "_basic_15y9v_61", kn = "_success_15y9v_65", Bn = "_error_15y9v_70", En = "_focused_15y9v_86", Sn = "_typing_15y9v_87", Tn = "_disabled_15y9v_103", In = "_leadingIcon_15y9v_118", An = "_trailingIcon_15y9v_119", Mn = "_trailingText_15y9v_120", Rn = "_readOnly_15y9v_124", Dn = "_inputField_15y9v_146", qn = "_trailingButton_15y9v_193", Ln = "_trailingIconButton_15y9v_194", Fn = "_trailingSlot_15y9v_198", Hn = "_trailingSlotDisabled_15y9v_205", On = "_trailingBasicIconButton_15y9v_209", Wn = "_helper_15y9v_290", jn = "_helperFixed_15y9v_296", Pn = "_helperPlaceholder_15y9v_300", Kn = "_errorHelper_15y9v_304", Vn = "_errorHelperBounce_15y9v_308", Un = "_errorMessageBounceY_15y9v_1", zn = "_helperDisabled_15y9v_312", m = {
|
|
216
|
+
root: hn,
|
|
217
|
+
label: gn,
|
|
218
|
+
labelDisabled: xn,
|
|
219
|
+
requiredMark: yn,
|
|
220
|
+
controlRow: bn,
|
|
221
|
+
control: Cn,
|
|
222
|
+
default: "_default_15y9v_43",
|
|
223
|
+
small: vn,
|
|
224
|
+
outline: $n,
|
|
225
|
+
fill: Nn,
|
|
226
|
+
basic: wn,
|
|
227
|
+
success: kn,
|
|
228
|
+
error: Bn,
|
|
229
|
+
focused: En,
|
|
230
|
+
typing: Sn,
|
|
231
|
+
disabled: Tn,
|
|
232
|
+
leadingIcon: In,
|
|
233
|
+
trailingIcon: An,
|
|
234
|
+
trailingText: Mn,
|
|
235
|
+
readOnly: Rn,
|
|
236
|
+
inputField: Dn,
|
|
237
|
+
"input-default": "_input-default_15y9v_157",
|
|
238
|
+
"input-small": "_input-small_15y9v_161",
|
|
239
|
+
trailingButton: qn,
|
|
240
|
+
trailingIconButton: Ln,
|
|
241
|
+
trailingSlot: Fn,
|
|
242
|
+
trailingSlotDisabled: Hn,
|
|
243
|
+
trailingBasicIconButton: On,
|
|
244
|
+
helper: Wn,
|
|
245
|
+
helperFixed: jn,
|
|
246
|
+
helperPlaceholder: Pn,
|
|
247
|
+
errorHelper: Kn,
|
|
248
|
+
errorHelperBounce: Vn,
|
|
249
|
+
errorMessageBounceY: Un,
|
|
250
|
+
helperDisabled: zn
|
|
251
|
+
};
|
|
252
|
+
function Zn({
|
|
253
|
+
content: e,
|
|
254
|
+
disabled: o = !1
|
|
255
|
+
}) {
|
|
256
|
+
if (e == null)
|
|
257
|
+
return null;
|
|
258
|
+
const t = (i) => {
|
|
259
|
+
i.preventDefault();
|
|
260
|
+
};
|
|
261
|
+
return /* @__PURE__ */ n(
|
|
262
|
+
"span",
|
|
263
|
+
{
|
|
264
|
+
className: [m.trailingSlot, o ? m.trailingSlotDisabled : ""].filter(Boolean).join(" "),
|
|
265
|
+
onMouseDownCapture: t,
|
|
266
|
+
children: e
|
|
267
|
+
}
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
function Yn({
|
|
271
|
+
value: e,
|
|
272
|
+
onFocus: o,
|
|
273
|
+
onBlur: t,
|
|
274
|
+
onChange: i
|
|
275
|
+
}) {
|
|
276
|
+
const [l, c] = oe(!1), [u, r] = oe(!1);
|
|
277
|
+
return {
|
|
278
|
+
currentValue: e,
|
|
279
|
+
isFocused: l,
|
|
280
|
+
isTyping: u,
|
|
281
|
+
handleFocus: (h) => {
|
|
282
|
+
c(!0), r(!1), o?.(h);
|
|
283
|
+
},
|
|
284
|
+
handleBlur: (h) => {
|
|
285
|
+
c(!1), r(!1), t?.(h);
|
|
286
|
+
},
|
|
287
|
+
handleChange: (h) => {
|
|
288
|
+
r(!0), i?.(h);
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
function Xn({
|
|
293
|
+
type: e = "text",
|
|
294
|
+
// input HTML 타입
|
|
295
|
+
designType: o = "outline",
|
|
296
|
+
// 인풋 외형 타입
|
|
297
|
+
size: t = "default",
|
|
298
|
+
// 인풋 높이 크기
|
|
299
|
+
variant: i,
|
|
300
|
+
// 상태 variant
|
|
301
|
+
width: l,
|
|
302
|
+
// 루트 너비
|
|
303
|
+
heading: c = !0,
|
|
304
|
+
// 라벨 표시 여부
|
|
305
|
+
headingContent: u = "Label",
|
|
306
|
+
// 라벨 내용
|
|
307
|
+
required: r = !1,
|
|
308
|
+
// 라벨 우측 *
|
|
309
|
+
description: a = !1,
|
|
310
|
+
// 하단 안내 문구
|
|
311
|
+
fixedDescriptionHeight: _ = !0,
|
|
312
|
+
// 하단 문구 영역 높이 고정 여부
|
|
313
|
+
errorMessage: p,
|
|
314
|
+
// 에러 상태 문구
|
|
315
|
+
leadingIcon: d,
|
|
316
|
+
// 좌측 아이콘 슬롯
|
|
317
|
+
trailingContent: h,
|
|
318
|
+
// 우측 trailing 슬롯 콘텐츠
|
|
319
|
+
customStyle: b = {},
|
|
320
|
+
// 루트 커스텀 스타일
|
|
321
|
+
id: x,
|
|
322
|
+
// input id
|
|
323
|
+
onFocus: N,
|
|
324
|
+
// 포커스 진입 핸들러
|
|
325
|
+
onBlur: C,
|
|
326
|
+
// 포커스 이탈 핸들러
|
|
327
|
+
onChange: w,
|
|
328
|
+
// 값 변경 핸들러
|
|
329
|
+
value: s,
|
|
330
|
+
// 현재 값
|
|
331
|
+
disabled: y = !1,
|
|
332
|
+
// 전체 비활성화 여부
|
|
333
|
+
readOnly: Y = !1,
|
|
334
|
+
// 읽기 전용 여부
|
|
335
|
+
...re
|
|
336
|
+
}) {
|
|
337
|
+
const ae = Ae(), D = x ?? ae, A = c, O = u, { currentValue: B, isFocused: W, isTyping: X, handleFocus: ce, handleBlur: ue, handleChange: _e } = Yn(
|
|
338
|
+
{
|
|
339
|
+
value: s,
|
|
340
|
+
onFocus: N,
|
|
341
|
+
onBlur: C,
|
|
342
|
+
onChange: w
|
|
343
|
+
}
|
|
344
|
+
), G = q(() => B == null ? !1 : Array.isArray(B) ? B.length > 0 : typeof B == "number" ? !0 : String(B).length > 0, [B]), f = q(() => i !== void 0 ? i : X && W ? "onTyping" : W ? "onFocus" : G ? "typed" : "basic", [i, X, W, G]), M = f === "error", ke = f === "success", Be = [
|
|
345
|
+
m.control,
|
|
346
|
+
m[o],
|
|
347
|
+
M ? m.error : ke ? m.success : m.basic,
|
|
348
|
+
m[t],
|
|
349
|
+
!y && (f === "onFocus" || f === "onTyping") ? m.focused : "",
|
|
350
|
+
!y && f === "onTyping" ? m.typing : "",
|
|
351
|
+
y ? m.disabled : "",
|
|
352
|
+
Y ? m.readOnly : ""
|
|
353
|
+
].filter(Boolean).join(" "), Ee = [m.inputField, m[`input-${t}`]].join(" "), Se = m.root, Te = [m.label, y ? m.labelDisabled : ""].filter(Boolean).join(" "), J = q(() => M ? p ?? "에러 메시지가 표시됩니다." : a === !1 || a === void 0 || a === null ? null : a === !0 ? "2~19자 이내로 입력해 주세요." : a, [a, p, M]), Ie = [
|
|
354
|
+
m.helper,
|
|
355
|
+
_ ? m.helperFixed : "",
|
|
356
|
+
M ? m.errorHelper : "",
|
|
357
|
+
M && J !== null ? m.errorHelperBounce : "",
|
|
358
|
+
y ? m.helperDisabled : "",
|
|
359
|
+
_ && J === null ? m.helperPlaceholder : ""
|
|
360
|
+
].filter(Boolean).join(" ");
|
|
361
|
+
return /* @__PURE__ */ k(
|
|
362
|
+
"div",
|
|
363
|
+
{
|
|
364
|
+
"data-idb-component": !0,
|
|
365
|
+
className: Se,
|
|
366
|
+
style: {
|
|
367
|
+
width: l ?? "100%",
|
|
368
|
+
...b
|
|
369
|
+
},
|
|
370
|
+
children: [
|
|
371
|
+
A ? /* @__PURE__ */ k("label", { htmlFor: D, className: Te, children: [
|
|
372
|
+
/* @__PURE__ */ n("span", { children: O }),
|
|
373
|
+
r ? /* @__PURE__ */ n("span", { className: m.requiredMark, children: "*" }) : null
|
|
374
|
+
] }) : null,
|
|
375
|
+
/* @__PURE__ */ n("div", { className: m.controlRow, children: /* @__PURE__ */ k("div", { className: Be, children: [
|
|
376
|
+
d ? /* @__PURE__ */ n("span", { className: m.leadingIcon, children: d }) : null,
|
|
377
|
+
/* @__PURE__ */ n(
|
|
378
|
+
"input",
|
|
379
|
+
{
|
|
380
|
+
id: D,
|
|
381
|
+
type: e,
|
|
382
|
+
value: B,
|
|
383
|
+
className: Ee,
|
|
384
|
+
onFocus: ce,
|
|
385
|
+
onBlur: ue,
|
|
386
|
+
onChange: _e,
|
|
387
|
+
disabled: y,
|
|
388
|
+
readOnly: Y,
|
|
389
|
+
required: r,
|
|
390
|
+
...re
|
|
391
|
+
}
|
|
392
|
+
),
|
|
393
|
+
/* @__PURE__ */ n(
|
|
394
|
+
Zn,
|
|
395
|
+
{
|
|
396
|
+
content: h,
|
|
397
|
+
disabled: y
|
|
398
|
+
}
|
|
399
|
+
)
|
|
400
|
+
] }) }),
|
|
401
|
+
_ || J !== null ? /* @__PURE__ */ n("p", { className: Ie, children: J }) : null
|
|
402
|
+
]
|
|
403
|
+
}
|
|
404
|
+
);
|
|
405
|
+
}
|
|
406
|
+
const Gn = "_button_1wh5k_1", Jn = "_content_1wh5k_19", Qn = "_fixed_1wh5k_37", et = "_fixedContent_1wh5k_43", nt = "_node_1wh5k_53", tt = "_text_1wh5k_59", ot = "_large_1wh5k_69", st = "_medium_1wh5k_70", it = "_small_1wh5k_71", lt = "_xsmall_1wh5k_75", rt = "_flexible_1wh5k_80", at = "_primary_1wh5k_98", ct = "_secondary_1wh5k_99", ut = "_assistive_1wh5k_100", _t = "_loading_1wh5k_101", dt = "_spinnerWrapper_1wh5k_172", S = {
|
|
407
|
+
button: Gn,
|
|
408
|
+
content: Jn,
|
|
409
|
+
fixed: Qn,
|
|
410
|
+
fixedContent: et,
|
|
411
|
+
node: nt,
|
|
412
|
+
text: tt,
|
|
413
|
+
large: ot,
|
|
414
|
+
medium: st,
|
|
415
|
+
small: it,
|
|
416
|
+
xsmall: lt,
|
|
417
|
+
flexible: rt,
|
|
418
|
+
primary: at,
|
|
419
|
+
secondary: ct,
|
|
420
|
+
assistive: ut,
|
|
421
|
+
loading: _t,
|
|
422
|
+
spinnerWrapper: dt,
|
|
423
|
+
"spinner-primary": "_spinner-primary_1wh5k_179",
|
|
424
|
+
"spinner-assistive": "_spinner-assistive_1wh5k_180",
|
|
425
|
+
"spinner-secondary": "_spinner-secondary_1wh5k_184"
|
|
426
|
+
};
|
|
427
|
+
function Qo({
|
|
428
|
+
widthType: e = "flexible",
|
|
429
|
+
variant: o = "primary",
|
|
430
|
+
size: t = "medium",
|
|
431
|
+
disabled: i = !1,
|
|
432
|
+
loading: l = !1,
|
|
433
|
+
keepFocusOnClick: c = !1,
|
|
434
|
+
customStyle: u = {},
|
|
435
|
+
onClick: r,
|
|
436
|
+
className: a,
|
|
437
|
+
children: _,
|
|
438
|
+
type: p = "button",
|
|
439
|
+
...d
|
|
440
|
+
}) {
|
|
441
|
+
const h = [
|
|
442
|
+
S.button,
|
|
443
|
+
S[e],
|
|
444
|
+
S[o],
|
|
445
|
+
S[t],
|
|
446
|
+
l ? S.loading : "",
|
|
447
|
+
a ?? ""
|
|
448
|
+
].filter(Boolean).join(" "), b = [S.spinnerWrapper, S[`spinner-${o}`]].filter(Boolean).join(" "), x = [S.content, e === "fixed" ? S.fixedContent : ""].filter(Boolean).join(" "), N = e === "fixed" ? le.map(_, (s) => {
|
|
449
|
+
const y = typeof s == "string" || typeof s == "number" ? S.text : S.node;
|
|
450
|
+
return /* @__PURE__ */ n("span", { className: y, children: s });
|
|
451
|
+
}) : _, C = q(() => ({
|
|
452
|
+
large: 24,
|
|
453
|
+
medium: 24,
|
|
454
|
+
small: 24,
|
|
455
|
+
xsmall: 16
|
|
456
|
+
})[t], [t]);
|
|
457
|
+
return /* @__PURE__ */ n(
|
|
458
|
+
"button",
|
|
459
|
+
{
|
|
460
|
+
"data-idb-component": !0,
|
|
461
|
+
type: p,
|
|
462
|
+
className: h,
|
|
463
|
+
onClick: l ? void 0 : (s) => {
|
|
464
|
+
r?.(s), !c && !s.defaultPrevented && s.currentTarget.blur();
|
|
465
|
+
},
|
|
466
|
+
disabled: i,
|
|
467
|
+
style: u,
|
|
468
|
+
...d,
|
|
469
|
+
children: l ? /* @__PURE__ */ n("span", { className: b, children: /* @__PURE__ */ n(Z, { size: C, color: "currentColor" }) }) : /* @__PURE__ */ n("span", { className: x, children: N })
|
|
470
|
+
}
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
const mt = "_button_lctga_1", pt = "_large_lctga_40", ft = "_medium_lctga_51", be = {
|
|
474
|
+
button: mt,
|
|
475
|
+
large: pt,
|
|
476
|
+
medium: ft
|
|
477
|
+
};
|
|
478
|
+
function es({
|
|
479
|
+
size: e = "medium",
|
|
480
|
+
disabled: o = !1,
|
|
481
|
+
keepFocusOnClick: t = !1,
|
|
482
|
+
customStyle: i = {},
|
|
483
|
+
onClick: l,
|
|
484
|
+
children: c,
|
|
485
|
+
type: u = "button",
|
|
486
|
+
...r
|
|
487
|
+
}) {
|
|
488
|
+
const a = [be.button, be[e]].filter(Boolean).join(" ");
|
|
489
|
+
return /* @__PURE__ */ n(
|
|
490
|
+
"button",
|
|
491
|
+
{
|
|
492
|
+
"data-idb-component": !0,
|
|
493
|
+
type: u,
|
|
494
|
+
className: a,
|
|
495
|
+
onClick: (p) => {
|
|
496
|
+
l?.(p), !t && !p.defaultPrevented && p.currentTarget.blur();
|
|
497
|
+
},
|
|
498
|
+
disabled: o,
|
|
499
|
+
style: i,
|
|
500
|
+
...r,
|
|
501
|
+
children: c
|
|
502
|
+
}
|
|
503
|
+
);
|
|
504
|
+
}
|
|
505
|
+
const ht = "_badge_iiym7_1", gt = "_dot_iiym7_16", xt = "_number_iiym7_23", yt = "_info_iiym7_36", Ce = {
|
|
506
|
+
badge: ht,
|
|
507
|
+
dot: gt,
|
|
508
|
+
number: xt,
|
|
509
|
+
info: yt
|
|
510
|
+
};
|
|
511
|
+
function ns({
|
|
512
|
+
variant: e = "number",
|
|
513
|
+
count: o = 1,
|
|
514
|
+
bgColor: t,
|
|
515
|
+
color: i,
|
|
516
|
+
disabled: l = !1,
|
|
517
|
+
customStyle: c = {},
|
|
518
|
+
className: u
|
|
519
|
+
}) {
|
|
520
|
+
if (l)
|
|
521
|
+
return null;
|
|
522
|
+
const r = o > 999 ? "999+" : o, a = {
|
|
523
|
+
...t ? { backgroundColor: t } : {},
|
|
524
|
+
...i ? { color: i } : {},
|
|
525
|
+
...c
|
|
526
|
+
}, _ = [Ce.badge, Ce[e], u ?? ""].filter(Boolean).join(" ");
|
|
527
|
+
return /* @__PURE__ */ k("span", { "data-idb-component": !0, className: _, style: a, children: [
|
|
528
|
+
e === "number" ? r : null,
|
|
529
|
+
e === "info" ? "?" : null
|
|
530
|
+
] });
|
|
531
|
+
}
|
|
532
|
+
function ts({
|
|
533
|
+
value: e,
|
|
534
|
+
// 검색어 값
|
|
535
|
+
onChange: o,
|
|
536
|
+
// 입력 변경 핸들러
|
|
537
|
+
onSearch: t,
|
|
538
|
+
// 검색 실행 핸들러
|
|
539
|
+
size: i = "default",
|
|
540
|
+
// 인풋 크기
|
|
541
|
+
width: l,
|
|
542
|
+
// 컴포넌트 너비
|
|
543
|
+
designType: c = "outline",
|
|
544
|
+
// 인풋 외형 타입
|
|
545
|
+
heading: u = !1,
|
|
546
|
+
// 라벨 표시 여부
|
|
547
|
+
headingContent: r,
|
|
548
|
+
// 라벨 내용
|
|
549
|
+
variant: a,
|
|
550
|
+
// 인풋 상태 variant
|
|
551
|
+
description: _ = !1,
|
|
552
|
+
// 하단 안내 문구
|
|
553
|
+
fixedDescriptionHeight: p = !0,
|
|
554
|
+
// 하단 문구 영역 높이 고정 여부
|
|
555
|
+
disabled: d = !1,
|
|
556
|
+
// 전체 비활성화 여부
|
|
557
|
+
readOnly: h = !1,
|
|
558
|
+
// 읽기 전용 여부
|
|
559
|
+
id: b,
|
|
560
|
+
// input id
|
|
561
|
+
name: x,
|
|
562
|
+
// input name
|
|
563
|
+
placeholder: N,
|
|
564
|
+
// placeholder 텍스트
|
|
565
|
+
leadingIcon: C,
|
|
566
|
+
// 좌측 아이콘 슬롯
|
|
567
|
+
maxLength: w = 20,
|
|
568
|
+
// 최대 입력 길이
|
|
569
|
+
required: s = !1,
|
|
570
|
+
// 필수 입력 여부
|
|
571
|
+
errorMessage: y,
|
|
572
|
+
// 에러 상태 문구
|
|
573
|
+
onBlur: Y,
|
|
574
|
+
// 포커스 이탈 핸들러
|
|
575
|
+
onKeyDown: re,
|
|
576
|
+
// 키다운 핸들러
|
|
577
|
+
...ae
|
|
578
|
+
}) {
|
|
579
|
+
const [D, A] = oe(null), O = (f) => f.length >= w, B = (f) => f.length === 1, W = (f) => {
|
|
580
|
+
const M = f.target.value;
|
|
581
|
+
O(M) ? A("max") : D !== null && A(null), o(f);
|
|
582
|
+
}, X = () => {
|
|
583
|
+
if (O(e)) {
|
|
584
|
+
A("max");
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
if (B(e)) {
|
|
588
|
+
A("min");
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
A(null), t(e);
|
|
592
|
+
}, ce = (f) => {
|
|
593
|
+
const M = f.currentTarget.value;
|
|
594
|
+
O(M) ? A("max") : B(M) ? A("min") : A(null), Y?.(f);
|
|
595
|
+
}, ue = (f) => {
|
|
596
|
+
re?.(f), !f.defaultPrevented && (f.key !== "Enter" || f.nativeEvent.isComposing || (f.preventDefault(), X()));
|
|
597
|
+
}, _e = D !== null ? "error" : a, G = D === "max" ? `최대 ${Math.max(0, w - 1)}자 까지 가능합니다.` : D === "min" ? "최소 2자 이상 입력해 주세요." : y;
|
|
598
|
+
return /* @__PURE__ */ n(
|
|
599
|
+
Xn,
|
|
600
|
+
{
|
|
601
|
+
...ae,
|
|
602
|
+
id: b,
|
|
603
|
+
name: x,
|
|
604
|
+
value: e,
|
|
605
|
+
placeholder: N,
|
|
606
|
+
onChange: W,
|
|
607
|
+
onBlur: ce,
|
|
608
|
+
onKeyDown: ue,
|
|
609
|
+
type: "text",
|
|
610
|
+
width: l,
|
|
611
|
+
designType: c,
|
|
612
|
+
size: i,
|
|
613
|
+
heading: u,
|
|
614
|
+
headingContent: r,
|
|
615
|
+
required: s,
|
|
616
|
+
description: _,
|
|
617
|
+
fixedDescriptionHeight: p,
|
|
618
|
+
variant: _e,
|
|
619
|
+
errorMessage: G,
|
|
620
|
+
leadingIcon: C,
|
|
621
|
+
maxLength: w,
|
|
622
|
+
disabled: d,
|
|
623
|
+
readOnly: h
|
|
624
|
+
}
|
|
625
|
+
);
|
|
626
|
+
}
|
|
627
|
+
var L = {}, ve;
|
|
628
|
+
function bt() {
|
|
629
|
+
if (ve) return L;
|
|
630
|
+
ve = 1;
|
|
631
|
+
var e = De;
|
|
632
|
+
if (process.env.NODE_ENV === "production")
|
|
633
|
+
L.createRoot = e.createRoot, L.hydrateRoot = e.hydrateRoot;
|
|
634
|
+
else {
|
|
635
|
+
var o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
636
|
+
L.createRoot = function(t, i) {
|
|
637
|
+
o.usingClientEntryPoint = !0;
|
|
638
|
+
try {
|
|
639
|
+
return e.createRoot(t, i);
|
|
640
|
+
} finally {
|
|
641
|
+
o.usingClientEntryPoint = !1;
|
|
642
|
+
}
|
|
643
|
+
}, L.hydrateRoot = function(t, i, l) {
|
|
644
|
+
o.usingClientEntryPoint = !0;
|
|
645
|
+
try {
|
|
646
|
+
return e.hydrateRoot(t, i, l);
|
|
647
|
+
} finally {
|
|
648
|
+
o.usingClientEntryPoint = !1;
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
return L;
|
|
653
|
+
}
|
|
654
|
+
var $e = bt();
|
|
655
|
+
const Ct = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1969_3981)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.9354%204.93441C14.2478%204.62219%2014.7539%204.62206%2015.0662%204.93441C15.3786%205.24677%2015.3785%205.75284%2015.0662%206.06527L11.1307%2010.0008L15.0643%2013.9344C15.3767%2014.2468%2015.3767%2014.7529%2015.0643%2015.0653C14.7519%2015.3777%2014.2459%2015.3777%2013.9334%2015.0653L9.99984%2011.1317L6.06625%2015.0653C5.75383%2015.3777%205.24781%2015.3777%204.93539%2015.0653C4.62297%2014.7529%204.62297%2014.2468%204.93539%2013.9344L8.86898%2010.0008L4.93344%206.06527C4.62121%205.75284%204.62108%205.24677%204.93344%204.93441C5.24579%204.62206%205.75186%204.62219%206.06429%204.93441L9.99984%208.86996L13.9354%204.93441Z'%20fill='%2370737C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1969_3981'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", vt = "_button_xqfx2_1", $t = "_content_xqfx2_18", Nt = "_fixed_xqfx2_36", wt = "_fixedContent_xqfx2_42", kt = "_node_xqfx2_52", Bt = "_text_xqfx2_58", Et = "_large_xqfx2_68", St = "_medium_xqfx2_69", Tt = "_small_xqfx2_70", It = "_xsmall_xqfx2_74", At = "_flexible_xqfx2_79", Mt = "_primary_xqfx2_109", Rt = "_secondary_xqfx2_110", Dt = "_assistive_xqfx2_111", qt = "_loading_xqfx2_112", Lt = "_spinnerWrapper_xqfx2_180", T = {
|
|
656
|
+
button: vt,
|
|
657
|
+
content: $t,
|
|
658
|
+
fixed: Nt,
|
|
659
|
+
fixedContent: wt,
|
|
660
|
+
node: kt,
|
|
661
|
+
text: Bt,
|
|
662
|
+
large: Et,
|
|
663
|
+
medium: St,
|
|
664
|
+
small: Tt,
|
|
665
|
+
xsmall: It,
|
|
666
|
+
flexible: At,
|
|
667
|
+
primary: Mt,
|
|
668
|
+
secondary: Rt,
|
|
669
|
+
assistive: Dt,
|
|
670
|
+
loading: qt,
|
|
671
|
+
spinnerWrapper: Lt,
|
|
672
|
+
"spinner-primary": "_spinner-primary_xqfx2_187",
|
|
673
|
+
"spinner-secondary": "_spinner-secondary_xqfx2_191",
|
|
674
|
+
"spinner-assistive": "_spinner-assistive_xqfx2_192"
|
|
675
|
+
};
|
|
676
|
+
function Ft({
|
|
677
|
+
widthType: e = "flexible",
|
|
678
|
+
variant: o = "primary",
|
|
679
|
+
size: t = "medium",
|
|
680
|
+
disabled: i = !1,
|
|
681
|
+
loading: l = !1,
|
|
682
|
+
keepFocusOnClick: c = !1,
|
|
683
|
+
customStyle: u = {},
|
|
684
|
+
onClick: r,
|
|
685
|
+
className: a,
|
|
686
|
+
children: _,
|
|
687
|
+
type: p = "button",
|
|
688
|
+
...d
|
|
689
|
+
}) {
|
|
690
|
+
const h = [
|
|
691
|
+
T.button,
|
|
692
|
+
T[e],
|
|
693
|
+
T[o],
|
|
694
|
+
T[t],
|
|
695
|
+
l ? T.loading : "",
|
|
696
|
+
a ?? ""
|
|
697
|
+
].filter(Boolean).join(" "), b = [T.spinnerWrapper, T[`spinner-${o}`]].filter(Boolean).join(" "), x = [T.content, e === "fixed" ? T.fixedContent : ""].filter(Boolean).join(" "), N = e === "fixed" ? le.map(_, (s) => {
|
|
698
|
+
const y = typeof s == "string" || typeof s == "number" ? T.text : T.node;
|
|
699
|
+
return /* @__PURE__ */ n("span", { className: y, children: s });
|
|
700
|
+
}) : _, C = q(() => ({
|
|
701
|
+
large: 24,
|
|
702
|
+
medium: 24,
|
|
703
|
+
small: 24,
|
|
704
|
+
xsmall: 16
|
|
705
|
+
})[t], [t]);
|
|
706
|
+
return /* @__PURE__ */ n(
|
|
707
|
+
"button",
|
|
708
|
+
{
|
|
709
|
+
"data-idb-component": !0,
|
|
710
|
+
type: p,
|
|
711
|
+
className: h,
|
|
712
|
+
onClick: l ? void 0 : (s) => {
|
|
713
|
+
r?.(s), !c && !s.defaultPrevented && s.currentTarget.blur();
|
|
714
|
+
},
|
|
715
|
+
disabled: i,
|
|
716
|
+
style: u,
|
|
717
|
+
...d,
|
|
718
|
+
children: l ? /* @__PURE__ */ n("span", { className: b, children: /* @__PURE__ */ n(Z, { size: C, color: "currentColor" }) }) : /* @__PURE__ */ n("span", { className: x, children: N })
|
|
719
|
+
}
|
|
720
|
+
);
|
|
721
|
+
}
|
|
722
|
+
const Ht = "_designContainer_2k7ic_1", Ot = "_snackbar_2k7ic_12", Wt = "_snackbarEnter_2k7ic_1", jt = "_content_2k7ic_32", Pt = "_leading_2k7ic_41", Kt = "_iconSlot_2k7ic_51", Vt = "_message_2k7ic_67", Ut = "_heading_2k7ic_77", zt = "_description_2k7ic_78", Zt = "_measureContent_2k7ic_93", Yt = "_closeButton_2k7ic_107", Xt = "_trailing_2k7ic_111", Gt = "_actionButton_2k7ic_118", Jt = "_closeIcon_2k7ic_122", Qt = "_basic_2k7ic_129", eo = "_loading_2k7ic_130", no = "_snackbarExit_2k7ic_138", g = {
|
|
723
|
+
designContainer: Ht,
|
|
724
|
+
snackbar: Ot,
|
|
725
|
+
snackbarEnter: Wt,
|
|
726
|
+
content: jt,
|
|
727
|
+
leading: Pt,
|
|
728
|
+
iconSlot: Kt,
|
|
729
|
+
message: Vt,
|
|
730
|
+
heading: Ut,
|
|
731
|
+
description: zt,
|
|
732
|
+
measureContent: Zt,
|
|
733
|
+
closeButton: Yt,
|
|
734
|
+
trailing: Xt,
|
|
735
|
+
actionButton: Gt,
|
|
736
|
+
closeIcon: Jt,
|
|
737
|
+
basic: Qt,
|
|
738
|
+
loading: eo,
|
|
739
|
+
snackbarExit: no
|
|
740
|
+
}, to = 6e3, oo = 1e4, so = 180;
|
|
741
|
+
let j = null, $ = null, io = 0, P = null, ee = null, se = null, U = 0;
|
|
742
|
+
function K(e) {
|
|
743
|
+
return e != null && typeof e != "boolean" && (typeof e != "string" || e.trim() !== "");
|
|
744
|
+
}
|
|
745
|
+
function H() {
|
|
746
|
+
P !== null && (window.clearTimeout(P), P = null), se = null;
|
|
747
|
+
}
|
|
748
|
+
function z() {
|
|
749
|
+
ee !== null && (window.clearTimeout(ee), ee = null);
|
|
750
|
+
}
|
|
751
|
+
function lo() {
|
|
752
|
+
if (typeof window > "u" || typeof document > "u")
|
|
753
|
+
return !1;
|
|
754
|
+
if (j)
|
|
755
|
+
return !0;
|
|
756
|
+
const e = document.createElement("div");
|
|
757
|
+
return e.setAttribute("data-idb-snackbar-root", "true"), document.body.appendChild(e), j = $e.createRoot(e), !0;
|
|
758
|
+
}
|
|
759
|
+
function ro() {
|
|
760
|
+
if (P === null || se === null || !$ || $.isExiting)
|
|
761
|
+
return;
|
|
762
|
+
const e = Date.now() - se;
|
|
763
|
+
U = Math.max(0, U - e), H();
|
|
764
|
+
}
|
|
765
|
+
function me() {
|
|
766
|
+
if (!$ || $.isExiting)
|
|
767
|
+
return;
|
|
768
|
+
H(), z(), $ = {
|
|
769
|
+
...$,
|
|
770
|
+
isExiting: !0
|
|
771
|
+
};
|
|
772
|
+
const e = $.renderKey;
|
|
773
|
+
pe(), ee = window.setTimeout(() => {
|
|
774
|
+
$?.renderKey === e && $.isExiting && ($ = null, pe()), z();
|
|
775
|
+
}, so);
|
|
776
|
+
}
|
|
777
|
+
function Ne() {
|
|
778
|
+
if (!(!$ || $.isExiting)) {
|
|
779
|
+
if (U <= 0) {
|
|
780
|
+
me();
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
H(), se = Date.now(), P = window.setTimeout(() => {
|
|
784
|
+
me();
|
|
785
|
+
}, U);
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
function ao(e) {
|
|
789
|
+
H(), z(), U = e, Ne();
|
|
790
|
+
}
|
|
791
|
+
function co({ snackbar: e, onPauseAutoHide: o, onResumeAutoHide: t, onClose: i }) {
|
|
792
|
+
const l = Me(null), [c, u] = oe(!1), r = K(e.heading), a = K(e.description);
|
|
793
|
+
Re(() => {
|
|
794
|
+
if (!r) {
|
|
795
|
+
u(!1);
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
const b = l.current;
|
|
799
|
+
if (!b)
|
|
800
|
+
return;
|
|
801
|
+
let x = null;
|
|
802
|
+
const N = () => {
|
|
803
|
+
u(b.scrollHeight > b.clientHeight + 1);
|
|
804
|
+
}, C = () => {
|
|
805
|
+
x !== null && window.cancelAnimationFrame(x), x = window.requestAnimationFrame(N);
|
|
806
|
+
};
|
|
807
|
+
C();
|
|
808
|
+
const w = typeof ResizeObserver < "u";
|
|
809
|
+
let s = null;
|
|
810
|
+
return w ? (s = new ResizeObserver(C), s.observe(b)) : window.addEventListener("resize", C), () => {
|
|
811
|
+
x !== null && window.cancelAnimationFrame(x), s?.disconnect(), w || window.removeEventListener("resize", C);
|
|
812
|
+
};
|
|
813
|
+
}, [r, e.description, e.heading]);
|
|
814
|
+
const _ = r && !c, p = r ? a ? /* @__PURE__ */ k(xe, { children: [
|
|
815
|
+
e.heading,
|
|
816
|
+
" ",
|
|
817
|
+
e.description
|
|
818
|
+
] }) : e.heading : e.description, d = e.icon ? /* @__PURE__ */ n("span", { className: g.iconSlot, children: e.icon }) : e.variant === "loading" ? /* @__PURE__ */ n(Z, { size: 20, color: "currentColor" }) : null, h = K(e.actionLabel);
|
|
819
|
+
return /* @__PURE__ */ n("div", { className: g.designContainer, children: /* @__PURE__ */ n(
|
|
820
|
+
"div",
|
|
821
|
+
{
|
|
822
|
+
"data-idb-component": !0,
|
|
823
|
+
className: [
|
|
824
|
+
g.snackbar,
|
|
825
|
+
g[e.variant],
|
|
826
|
+
e.isExiting ? g.snackbarExit : ""
|
|
827
|
+
].filter(Boolean).join(" "),
|
|
828
|
+
style: e.customStyle,
|
|
829
|
+
role: "status",
|
|
830
|
+
"aria-live": "polite",
|
|
831
|
+
onMouseEnter: o,
|
|
832
|
+
onMouseLeave: t,
|
|
833
|
+
children: /* @__PURE__ */ k("div", { className: g.content, children: [
|
|
834
|
+
d ? /* @__PURE__ */ n("span", { className: g.leading, children: d }) : null,
|
|
835
|
+
/* @__PURE__ */ k("div", { className: g.message, children: [
|
|
836
|
+
_ ? /* @__PURE__ */ k(xe, { children: [
|
|
837
|
+
/* @__PURE__ */ n("p", { className: g.heading, children: e.heading }),
|
|
838
|
+
a ? /* @__PURE__ */ n("p", { className: g.description, children: e.description }) : null
|
|
839
|
+
] }) : /* @__PURE__ */ n("p", { className: g.description, children: p }),
|
|
840
|
+
r ? (
|
|
841
|
+
// 실제 화면에는 보이지 않지만 heading 2줄 초과 여부를 안정적으로 측정하기 위한 숨김 영역
|
|
842
|
+
/* @__PURE__ */ k("div", { ref: l, className: g.measureContent, "aria-hidden": "true", children: [
|
|
843
|
+
/* @__PURE__ */ n("p", { className: g.heading, children: e.heading }),
|
|
844
|
+
a ? /* @__PURE__ */ n("p", { className: g.description, children: e.description }) : null
|
|
845
|
+
] })
|
|
846
|
+
) : null
|
|
847
|
+
] }),
|
|
848
|
+
h || e.closeButton ? /* @__PURE__ */ k("span", { className: g.trailing, children: [
|
|
849
|
+
h ? /* @__PURE__ */ n(
|
|
850
|
+
Ft,
|
|
851
|
+
{
|
|
852
|
+
widthType: "flexible",
|
|
853
|
+
variant: "primary",
|
|
854
|
+
className: g.actionButton,
|
|
855
|
+
onClick: e.onActionClick,
|
|
856
|
+
children: e.actionLabel
|
|
857
|
+
}
|
|
858
|
+
) : null,
|
|
859
|
+
e.closeButton ? /* @__PURE__ */ n(
|
|
860
|
+
He,
|
|
861
|
+
{
|
|
862
|
+
size: "small",
|
|
863
|
+
className: g.closeButton,
|
|
864
|
+
onClick: i,
|
|
865
|
+
children: /* @__PURE__ */ n("img", { src: Ct, alt: "", "aria-hidden": "true", className: g.closeIcon })
|
|
866
|
+
}
|
|
867
|
+
) : null
|
|
868
|
+
] }) : null
|
|
869
|
+
] })
|
|
870
|
+
},
|
|
871
|
+
e.renderKey
|
|
872
|
+
) });
|
|
873
|
+
}
|
|
874
|
+
function pe() {
|
|
875
|
+
if (j) {
|
|
876
|
+
if (!$) {
|
|
877
|
+
H(), z(), j.render(null);
|
|
878
|
+
return;
|
|
879
|
+
}
|
|
880
|
+
j.render(
|
|
881
|
+
/* @__PURE__ */ n(
|
|
882
|
+
co,
|
|
883
|
+
{
|
|
884
|
+
snackbar: $,
|
|
885
|
+
onPauseAutoHide: ro,
|
|
886
|
+
onResumeAutoHide: Ne,
|
|
887
|
+
onClose: uo
|
|
888
|
+
}
|
|
889
|
+
)
|
|
890
|
+
);
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
function os({
|
|
894
|
+
variant: e = "basic",
|
|
895
|
+
heading: o,
|
|
896
|
+
description: t,
|
|
897
|
+
icon: i,
|
|
898
|
+
actionLabel: l,
|
|
899
|
+
onActionClick: c,
|
|
900
|
+
closeButton: u = !1,
|
|
901
|
+
customStyle: r
|
|
902
|
+
}) {
|
|
903
|
+
if (!K(o) && !K(t) || !lo())
|
|
904
|
+
return;
|
|
905
|
+
H(), z();
|
|
906
|
+
const a = u ? oo : to;
|
|
907
|
+
$ = {
|
|
908
|
+
variant: e,
|
|
909
|
+
heading: o,
|
|
910
|
+
description: t,
|
|
911
|
+
icon: i,
|
|
912
|
+
actionLabel: l,
|
|
913
|
+
onActionClick: c,
|
|
914
|
+
closeButton: u,
|
|
915
|
+
customStyle: r,
|
|
916
|
+
isExiting: !1,
|
|
917
|
+
renderKey: io++
|
|
918
|
+
}, pe(), ao(a);
|
|
919
|
+
}
|
|
920
|
+
function uo() {
|
|
921
|
+
me();
|
|
922
|
+
}
|
|
923
|
+
const _o = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M1.74995%2010C1.74995%205.44365%205.44359%201.75%209.99992%201.75C14.5562%201.75%2018.2499%205.44365%2018.2499%2010C18.2499%2014.5563%2014.5562%2018.25%209.99992%2018.25C5.44359%2018.25%201.74995%2014.5563%201.74995%2010ZM13.8722%208.22987C14.1602%207.93224%2014.1525%207.45743%2013.8549%207.16935C13.5572%206.88127%2013.0824%206.88901%2012.7944%207.18664L8.89773%2011.2124L7.20623%209.4601C6.91856%209.16208%206.44376%209.15369%206.14574%209.44137C5.84772%209.72904%205.83933%2010.2038%206.12701%2010.5019L8.35739%2012.8125C8.4986%2012.9588%208.69316%2013.0414%208.89649%2013.0416C9.09982%2013.0417%209.29449%2012.9593%209.4359%2012.8132L13.8722%208.22987Z'%20fill='%2300CC89'/%3e%3c/svg%3e", mo = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.01687%202.58344C9.64256%202.30487%2010.3571%202.30487%2010.9828%202.58344C11.4189%202.77761%2011.7337%203.13353%2012.0073%203.52081C12.2786%203.90474%2012.577%204.42169%2012.9401%205.05063L17.1992%2012.4276C17.5623%2013.0565%2017.8608%2013.5734%2018.0576%2014.0003C18.2562%2014.4309%2018.407%2014.8815%2018.3571%2015.3563C18.2855%2016.0374%2017.9283%2016.6562%2017.3742%2017.0588C16.988%2017.3394%2016.5223%2017.4341%2016.0501%2017.4774C15.582%2017.5204%2014.9851%2017.5204%2014.2588%2017.5203H5.74078C5.01454%2017.5204%204.41762%2017.5204%203.94949%2017.4774C3.4773%2017.4341%203.01164%2017.3394%202.62544%2017.0588C2.07134%2016.6562%201.71409%2016.0374%201.64249%2015.3563C1.59259%2014.8815%201.74341%2014.4309%201.94199%2014.0003C2.13886%2013.5734%202.43733%2013.0565%202.80046%2012.4275L7.0595%205.05064C7.42261%204.42169%207.72106%203.90474%207.99231%203.5208C8.26593%203.13353%208.58077%202.77761%209.01687%202.58344ZM9.99995%206.74951C10.4142%206.74951%2010.7499%207.0853%2010.7499%207.49951V10.8328C10.7499%2011.2471%2010.4142%2011.5828%209.99995%2011.5828C9.58574%2011.5828%209.24995%2011.2471%209.24995%2010.8328V7.49951C9.24995%207.0853%209.58574%206.74951%209.99995%206.74951ZM10.8332%2013.7495C10.8332%2014.2097%2010.4601%2014.5828%209.99985%2014.5828C9.53961%2014.5828%209.16652%2014.2097%209.16652%2013.7495C9.16652%2013.2893%209.53961%2012.9162%209.99985%2012.9162C10.4601%2012.9162%2010.8332%2013.2893%2010.8332%2013.7495Z'%20fill='%23FF334B'/%3e%3c/svg%3e", po = "_designContainer_1kal7_1", fo = "_toast_1kal7_11", ho = "_toastEnter_1kal7_1", go = "_basic_1kal7_32", xo = "_positive_1kal7_36", yo = "_negative_1kal7_40", bo = "_content_1kal7_44", Co = "_iconSlot_1kal7_55", vo = "_message_1kal7_64", $o = "_icon_1kal7_55", No = "_toastExit_1kal7_89", R = {
|
|
924
|
+
designContainer: po,
|
|
925
|
+
toast: fo,
|
|
926
|
+
toastEnter: ho,
|
|
927
|
+
basic: go,
|
|
928
|
+
positive: xo,
|
|
929
|
+
negative: yo,
|
|
930
|
+
content: bo,
|
|
931
|
+
iconSlot: Co,
|
|
932
|
+
message: vo,
|
|
933
|
+
icon: $o,
|
|
934
|
+
toastExit: No
|
|
935
|
+
}, wo = 3e3, ko = 180;
|
|
936
|
+
let V = null, Q = null, v = null, Bo = 0, ne = null, te = null;
|
|
937
|
+
function fe() {
|
|
938
|
+
ne !== null && (window.clearTimeout(ne), ne = null);
|
|
939
|
+
}
|
|
940
|
+
function he() {
|
|
941
|
+
te !== null && (window.clearTimeout(te), te = null);
|
|
942
|
+
}
|
|
943
|
+
function ie() {
|
|
944
|
+
if (!V)
|
|
945
|
+
return;
|
|
946
|
+
if (!v) {
|
|
947
|
+
V.render(null);
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
950
|
+
const e = v.variant === "positive" ? /* @__PURE__ */ n("img", { src: _o, className: R.icon, alt: "", "aria-hidden": "true" }) : v.variant === "negative" ? /* @__PURE__ */ n("img", { src: mo, className: R.icon, alt: "", "aria-hidden": "true" }) : null, o = v.icon !== void 0 ? v.icon : e;
|
|
951
|
+
V.render(
|
|
952
|
+
/* @__PURE__ */ n("div", { className: R.designContainer, children: /* @__PURE__ */ n(
|
|
953
|
+
"div",
|
|
954
|
+
{
|
|
955
|
+
className: [
|
|
956
|
+
R.toast,
|
|
957
|
+
R[v.variant],
|
|
958
|
+
v.isExiting ? R.toastExit : ""
|
|
959
|
+
].filter(Boolean).join(" "),
|
|
960
|
+
style: v.customStyle,
|
|
961
|
+
children: /* @__PURE__ */ k("span", { className: R.content, children: [
|
|
962
|
+
o ? /* @__PURE__ */ n("span", { className: R.iconSlot, children: o }) : null,
|
|
963
|
+
/* @__PURE__ */ n("span", { className: R.message, children: v.message })
|
|
964
|
+
] })
|
|
965
|
+
},
|
|
966
|
+
v.renderKey
|
|
967
|
+
) })
|
|
968
|
+
);
|
|
969
|
+
}
|
|
970
|
+
function we() {
|
|
971
|
+
!v || v.isExiting || (fe(), he(), v = {
|
|
972
|
+
...v,
|
|
973
|
+
isExiting: !0
|
|
974
|
+
}, ie(), te = window.setTimeout(() => {
|
|
975
|
+
v = null, ie(), he();
|
|
976
|
+
}, ko));
|
|
977
|
+
}
|
|
978
|
+
function Eo() {
|
|
979
|
+
fe(), he(), ne = window.setTimeout(() => {
|
|
980
|
+
we(), fe();
|
|
981
|
+
}, wo);
|
|
982
|
+
}
|
|
983
|
+
function So() {
|
|
984
|
+
return typeof window > "u" || typeof document > "u" ? !1 : (V || (Q = document.createElement("div"), Q.setAttribute("data-idb-toast-root", "true"), document.body.appendChild(Q), V = $e.createRoot(Q), ie()), !0);
|
|
985
|
+
}
|
|
986
|
+
function ss({ message: e, variant: o = "basic", customStyle: t, icon: i }) {
|
|
987
|
+
e != null && So() && (v = {
|
|
988
|
+
message: e,
|
|
989
|
+
variant: o,
|
|
990
|
+
customStyle: t,
|
|
991
|
+
icon: i,
|
|
992
|
+
isExiting: !1,
|
|
993
|
+
renderKey: Bo++
|
|
994
|
+
}, ie(), Eo());
|
|
995
|
+
}
|
|
996
|
+
function is() {
|
|
997
|
+
we();
|
|
998
|
+
}
|
|
999
|
+
const To = "_button_16957_1", Io = "_content_16957_18", Ao = "_fixed_16957_36", Mo = "_fixedContent_16957_42", Ro = "_node_16957_52", Do = "_text_16957_58", qo = "_large_16957_68", Lo = "_medium_16957_69", Fo = "_small_16957_70", Ho = "_xsmall_16957_74", Oo = "_flexible_16957_79", Wo = "_primary_16957_97", jo = "_assistive_16957_98", Po = "_error_16957_99", Ko = "_loading_16957_100", Vo = "_spinnerWrapper_16957_171", I = {
|
|
1000
|
+
button: To,
|
|
1001
|
+
content: Io,
|
|
1002
|
+
fixed: Ao,
|
|
1003
|
+
fixedContent: Mo,
|
|
1004
|
+
node: Ro,
|
|
1005
|
+
text: Do,
|
|
1006
|
+
large: qo,
|
|
1007
|
+
medium: Lo,
|
|
1008
|
+
small: Fo,
|
|
1009
|
+
xsmall: Ho,
|
|
1010
|
+
flexible: Oo,
|
|
1011
|
+
primary: Wo,
|
|
1012
|
+
assistive: jo,
|
|
1013
|
+
error: Po,
|
|
1014
|
+
loading: Ko,
|
|
1015
|
+
spinnerWrapper: Vo,
|
|
1016
|
+
"spinner-primary": "_spinner-primary_16957_178",
|
|
1017
|
+
"spinner-error": "_spinner-error_16957_182",
|
|
1018
|
+
"spinner-assistive": "_spinner-assistive_16957_183"
|
|
1019
|
+
};
|
|
1020
|
+
function ls({
|
|
1021
|
+
widthType: e = "flexible",
|
|
1022
|
+
variant: o = "primary",
|
|
1023
|
+
size: t = "medium",
|
|
1024
|
+
disabled: i = !1,
|
|
1025
|
+
loading: l = !1,
|
|
1026
|
+
keepFocusOnClick: c = !1,
|
|
1027
|
+
customStyle: u = {},
|
|
1028
|
+
onClick: r,
|
|
1029
|
+
className: a,
|
|
1030
|
+
children: _,
|
|
1031
|
+
type: p = "button",
|
|
1032
|
+
...d
|
|
1033
|
+
}) {
|
|
1034
|
+
const h = [
|
|
1035
|
+
I.button,
|
|
1036
|
+
I[e],
|
|
1037
|
+
I[o],
|
|
1038
|
+
I[t],
|
|
1039
|
+
l ? I.loading : "",
|
|
1040
|
+
a ?? ""
|
|
1041
|
+
].filter(Boolean).join(" "), b = [I.spinnerWrapper, I[`spinner-${o}`]].filter(Boolean).join(" "), x = [I.content, e === "fixed" ? I.fixedContent : ""].filter(Boolean).join(" "), N = e === "fixed" ? le.map(_, (s) => {
|
|
1042
|
+
const y = typeof s == "string" || typeof s == "number" ? I.text : I.node;
|
|
1043
|
+
return /* @__PURE__ */ n("span", { className: y, children: s });
|
|
1044
|
+
}) : _, C = q(() => ({
|
|
1045
|
+
large: 24,
|
|
1046
|
+
medium: 24,
|
|
1047
|
+
small: 24,
|
|
1048
|
+
xsmall: 16
|
|
1049
|
+
})[t], [t]);
|
|
1050
|
+
return /* @__PURE__ */ n(
|
|
1051
|
+
"button",
|
|
1052
|
+
{
|
|
1053
|
+
"data-idb-component": !0,
|
|
1054
|
+
type: p,
|
|
1055
|
+
className: h,
|
|
1056
|
+
onClick: l ? void 0 : (s) => {
|
|
1057
|
+
r?.(s), !c && !s.defaultPrevented && s.currentTarget.blur();
|
|
1058
|
+
},
|
|
1059
|
+
disabled: i,
|
|
1060
|
+
style: u,
|
|
1061
|
+
...d,
|
|
1062
|
+
children: l ? /* @__PURE__ */ n("span", { className: b, children: /* @__PURE__ */ n(Z, { size: C, color: "currentColor" }) }) : /* @__PURE__ */ n("span", { className: x, children: N })
|
|
1063
|
+
}
|
|
1064
|
+
);
|
|
1065
|
+
}
|
|
1066
|
+
export {
|
|
1067
|
+
He as BasicIconButton,
|
|
1068
|
+
Z as Clip,
|
|
1069
|
+
Ue as CustomSpinner,
|
|
1070
|
+
Xo as FadeSpinner,
|
|
1071
|
+
Go as FillButton,
|
|
1072
|
+
Jo as FillIconButton,
|
|
1073
|
+
Xn as Input,
|
|
1074
|
+
Qo as OutlineButton,
|
|
1075
|
+
es as OutlineIconButton,
|
|
1076
|
+
ns as PushBadge,
|
|
1077
|
+
ts as SearchBar,
|
|
1078
|
+
Yo as Spinner,
|
|
1079
|
+
Ft as TextButton,
|
|
1080
|
+
ls as WeakButton,
|
|
1081
|
+
uo as dismissSnackbar,
|
|
1082
|
+
is as dismissToast,
|
|
1083
|
+
os as showSnackbar,
|
|
1084
|
+
ss as showToast
|
|
1085
|
+
};
|