@bestow-ui/react 0.11.0 → 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/README.md +31 -14
- package/dist/chunk-PFEZ3D2H.js +212 -0
- package/dist/chunk-PFEZ3D2H.js.map +1 -0
- package/dist/client.js +3112 -0
- package/dist/client.js.map +1 -0
- package/dist/index.cjs +1254 -718
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +218 -112
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +278 -87
- package/dist/index.d.ts +278 -87
- package/dist/index.js +2 -2981
- package/dist/shared.js +246 -0
- package/dist/shared.js.map +1 -0
- package/package.json +14 -8
- package/dist/index.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -29,8 +29,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
30
|
|
|
31
31
|
// src/index.ts
|
|
32
|
-
var
|
|
33
|
-
__export(
|
|
32
|
+
var src_exports = {};
|
|
33
|
+
__export(src_exports, {
|
|
34
34
|
Accordion: () => Accordion,
|
|
35
35
|
AccordionItem: () => AccordionItem,
|
|
36
36
|
AddressInput: () => AddressInput,
|
|
@@ -42,12 +42,14 @@ __export(index_exports, {
|
|
|
42
42
|
Breadcrumb: () => Breadcrumb,
|
|
43
43
|
BusinessNumberInput: () => BusinessNumberInput,
|
|
44
44
|
Button: () => Button,
|
|
45
|
+
Calendar: () => Calendar,
|
|
45
46
|
Card: () => Card,
|
|
46
47
|
CardBody: () => CardBody,
|
|
47
48
|
CardFooter: () => CardFooter,
|
|
48
49
|
CardHeader: () => CardHeader,
|
|
49
50
|
Checkbox: () => Checkbox,
|
|
50
51
|
Combobox: () => Combobox,
|
|
52
|
+
DatePicker: () => DatePicker,
|
|
51
53
|
Divider: () => Divider,
|
|
52
54
|
Drawer: () => Drawer,
|
|
53
55
|
DrawerClose: () => DrawerClose,
|
|
@@ -61,6 +63,7 @@ __export(index_exports, {
|
|
|
61
63
|
IconButton: () => IconButton,
|
|
62
64
|
Input: () => Input,
|
|
63
65
|
Link: () => Link,
|
|
66
|
+
LocaleProvider: () => LocaleProvider,
|
|
64
67
|
Modal: () => Modal,
|
|
65
68
|
ModalClose: () => ModalClose,
|
|
66
69
|
Pagination: () => Pagination,
|
|
@@ -97,20 +100,24 @@ __export(index_exports, {
|
|
|
97
100
|
contrastRatio: () => contrastRatio,
|
|
98
101
|
createIntentColors: () => createIntentColors,
|
|
99
102
|
createTheme: () => createTheme,
|
|
103
|
+
en: () => en,
|
|
100
104
|
formatBusinessNumber: () => formatBusinessNumber,
|
|
101
105
|
formatKoreanAmount: () => formatKoreanAmount,
|
|
106
|
+
formatKoreanDate: () => formatKoreanDate,
|
|
102
107
|
formatPhoneNumber: () => formatPhoneNumber,
|
|
103
108
|
hasAllRequiredAgreements: () => hasAllRequiredAgreements,
|
|
104
109
|
isValidBusinessNumber: () => isValidBusinessNumber,
|
|
105
110
|
kakaoPostcodeProvider: () => kakaoPostcodeProvider,
|
|
111
|
+
parseISODate: () => parseISODate,
|
|
106
112
|
themeClass: () => themeClass,
|
|
107
|
-
|
|
113
|
+
toISODate: () => toISODate,
|
|
114
|
+
useMessages: () => useMessages,
|
|
108
115
|
usePortalProps: () => usePortalProps,
|
|
109
116
|
useTheme: () => useTheme,
|
|
110
117
|
useToast: () => useToast,
|
|
111
118
|
vars: () => vars
|
|
112
119
|
});
|
|
113
|
-
module.exports = __toCommonJS(
|
|
120
|
+
module.exports = __toCommonJS(src_exports);
|
|
114
121
|
|
|
115
122
|
// src/theme/contract.css.ts
|
|
116
123
|
var themeClass = { light: "tkagtb0", dark: "tkagtb1" };
|
|
@@ -195,36 +202,43 @@ function hoverFor(base, delta, contrast) {
|
|
|
195
202
|
if (contrastRatio(contrast, preferred) >= 4.5) return preferred;
|
|
196
203
|
return withL(base, Math.min(1, Math.max(0, base.l - delta)));
|
|
197
204
|
}
|
|
198
|
-
function
|
|
205
|
+
function solidWithContrast(color) {
|
|
199
206
|
const white = import_tokens.palette.white;
|
|
200
207
|
const dark = import_tokens.palette.gray[900];
|
|
201
|
-
if (contrastRatio(white,
|
|
202
|
-
|
|
208
|
+
if (contrastRatio(white, color) >= 4.5) return { solid: color, contrast: white };
|
|
209
|
+
if (contrastRatio(dark, color) >= 4.5) return { solid: color, contrast: dark };
|
|
210
|
+
const base = rgbToOklch(parseHex(color));
|
|
211
|
+
for (let delta = 5e-3; delta <= 1; delta += 5e-3) {
|
|
212
|
+
const darker = withL(base, Math.max(0, base.l - delta));
|
|
213
|
+
if (contrastRatio(white, darker) >= 4.5) return { solid: darker, contrast: white };
|
|
214
|
+
const lighter = withL(base, Math.min(1, base.l + delta));
|
|
215
|
+
if (contrastRatio(dark, lighter) >= 4.5) return { solid: lighter, contrast: dark };
|
|
216
|
+
}
|
|
217
|
+
return { solid: import_tokens.palette.black, contrast: white };
|
|
203
218
|
}
|
|
204
219
|
var rgba = (hex, alpha) => {
|
|
205
220
|
const [r, g, b] = parseHex(hex).map((v) => Math.round(v * 255));
|
|
206
221
|
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
207
222
|
};
|
|
208
223
|
function createIntentColors(intent, color) {
|
|
209
|
-
const
|
|
210
|
-
const base = rgbToOklch(parseHex(
|
|
224
|
+
const input5 = toHex(parseHex(color));
|
|
225
|
+
const base = rgbToOklch(parseHex(input5));
|
|
211
226
|
const lightSubtle = withL(base, 0.97, Math.min(base.c, 0.12) * 0.3);
|
|
212
227
|
const lightSubtleHover = withL(base, 0.93, Math.min(base.c, 0.12) * 0.45);
|
|
213
|
-
const lightContrast =
|
|
228
|
+
const { solid, contrast: lightContrast } = solidWithContrast(input5);
|
|
214
229
|
const light = {
|
|
215
230
|
solid,
|
|
216
|
-
solidHover: hoverFor(
|
|
231
|
+
solidHover: hoverFor(rgbToOklch(parseHex(solid)), -0.06, lightContrast),
|
|
217
232
|
contrast: lightContrast,
|
|
218
233
|
subtle: lightSubtle,
|
|
219
234
|
subtleHover: lightSubtleHover,
|
|
220
235
|
text: findReadable(base, Math.min(base.l, 0.55), -0.02, [import_tokens.lightColors.bg.default, lightSubtle, lightSubtleHover])
|
|
221
236
|
};
|
|
222
237
|
const darkBg = import_tokens.darkColors.bg.default;
|
|
223
|
-
const darkSolid = base.l < 0.5 ? withL(base, 0.55) :
|
|
238
|
+
const { solid: darkSolid, contrast: darkContrast } = solidWithContrast(base.l < 0.5 ? withL(base, 0.55) : input5);
|
|
224
239
|
const darkBase = rgbToOklch(parseHex(darkSolid));
|
|
225
240
|
const darkSubtleOnBg = blend(darkSolid, 0.16, darkBg);
|
|
226
241
|
const darkSubtleHoverOnBg = blend(darkSolid, 0.26, darkBg);
|
|
227
|
-
const darkContrast = pickContrast(darkSolid);
|
|
228
242
|
const dark = {
|
|
229
243
|
solid: darkSolid,
|
|
230
244
|
solidHover: hoverFor(darkBase, 0.06, darkContrast),
|
|
@@ -287,6 +301,224 @@ function themeToStyle(theme, mode) {
|
|
|
287
301
|
return Object.keys(map).length ? (0, import_dynamic.assignInlineVars)(map) : void 0;
|
|
288
302
|
}
|
|
289
303
|
|
|
304
|
+
// src/i18n/en.ts
|
|
305
|
+
var WEEKDAYS_LONG = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
306
|
+
var MONTHS = [
|
|
307
|
+
"January",
|
|
308
|
+
"February",
|
|
309
|
+
"March",
|
|
310
|
+
"April",
|
|
311
|
+
"May",
|
|
312
|
+
"June",
|
|
313
|
+
"July",
|
|
314
|
+
"August",
|
|
315
|
+
"September",
|
|
316
|
+
"October",
|
|
317
|
+
"November",
|
|
318
|
+
"December"
|
|
319
|
+
];
|
|
320
|
+
var en = {
|
|
321
|
+
close: "Close",
|
|
322
|
+
loading: "Loading",
|
|
323
|
+
notifications: "Notifications",
|
|
324
|
+
breadcrumb: "Breadcrumb",
|
|
325
|
+
pagination: "Pagination",
|
|
326
|
+
paginationPrevious: "Previous page",
|
|
327
|
+
paginationNext: "Next page",
|
|
328
|
+
paginationPage: (page) => `Page ${page}`,
|
|
329
|
+
newWindow: "(opens in a new window)",
|
|
330
|
+
noResults: "No results",
|
|
331
|
+
openList: "Show options",
|
|
332
|
+
rangeStart: "minimum",
|
|
333
|
+
rangeEnd: "maximum",
|
|
334
|
+
agreeAll: "Agree to all",
|
|
335
|
+
required: "Required",
|
|
336
|
+
optional: "Optional",
|
|
337
|
+
show: "View",
|
|
338
|
+
hide: "Hide",
|
|
339
|
+
verificationCode: "Verification code",
|
|
340
|
+
verificationCodeHint: (length, type) => `Enter the ${length}-${type === "numeric" ? "digit" : "character"} code.`,
|
|
341
|
+
resend: "Resend",
|
|
342
|
+
verificationExpired: "The code has expired. Please request a new one.",
|
|
343
|
+
phoneNumber: "Phone number",
|
|
344
|
+
businessNumber: "Business registration number",
|
|
345
|
+
businessNumberInvalid: "This business registration number is not valid. Please check it again.",
|
|
346
|
+
businessNumberIncomplete: "Enter all 10 digits.",
|
|
347
|
+
amount: "Amount",
|
|
348
|
+
currencyUnit: "KRW",
|
|
349
|
+
address: "Address",
|
|
350
|
+
addressSearch: "Find address",
|
|
351
|
+
addressSearchDescription: "Search by road name, building name, or lot number.",
|
|
352
|
+
postalCode: "Postal code",
|
|
353
|
+
baseAddress: "Address",
|
|
354
|
+
baseAddressPlaceholder: 'Select "Find address" to choose an address',
|
|
355
|
+
detailAddress: "Address line 2",
|
|
356
|
+
detailAddressPlaceholder: "Apartment, suite, unit, etc.",
|
|
357
|
+
addressLoading: "Loading address search",
|
|
358
|
+
addressLoadError: "Could not load address search. Please try again later.",
|
|
359
|
+
previousMonth: "Previous month",
|
|
360
|
+
nextMonth: "Next month",
|
|
361
|
+
monthTitle: (year, month) => `${MONTHS[month - 1]} ${year}`,
|
|
362
|
+
weekdaysShort: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
363
|
+
weekdaysLong: WEEKDAYS_LONG,
|
|
364
|
+
dayLabel: (date, weekdayLong) => `${date.getDate()}, ${weekdayLong}, ${MONTHS[date.getMonth()]} ${date.getFullYear()}`,
|
|
365
|
+
holiday: "holiday",
|
|
366
|
+
today: "today",
|
|
367
|
+
date: "Date",
|
|
368
|
+
openCalendar: "Choose date",
|
|
369
|
+
calendar: "Calendar",
|
|
370
|
+
dateInvalid: "This date does not exist.",
|
|
371
|
+
dateUnavailable: "This date is not available.",
|
|
372
|
+
dateIncomplete: "Enter the date as YYYY-MM-DD."
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
// src/utils/koreanFormat.ts
|
|
376
|
+
var onlyDigits = (input5) => input5.replace(/\D/g, "");
|
|
377
|
+
function phoneNumberMaxDigits(digits) {
|
|
378
|
+
if (digits.startsWith("02")) return 10;
|
|
379
|
+
if (/^1[568]/.test(digits)) return 8;
|
|
380
|
+
return 11;
|
|
381
|
+
}
|
|
382
|
+
function formatPhoneNumber(input5) {
|
|
383
|
+
const d = onlyDigits(input5).slice(0, phoneNumberMaxDigits(onlyDigits(input5)));
|
|
384
|
+
if (d.startsWith("02")) {
|
|
385
|
+
if (d.length <= 2) return d;
|
|
386
|
+
if (d.length <= 5) return `${d.slice(0, 2)}-${d.slice(2)}`;
|
|
387
|
+
if (d.length <= 9) return `${d.slice(0, 2)}-${d.slice(2, 5)}-${d.slice(5)}`;
|
|
388
|
+
return `${d.slice(0, 2)}-${d.slice(2, 6)}-${d.slice(6)}`;
|
|
389
|
+
}
|
|
390
|
+
if (/^1[568]/.test(d)) {
|
|
391
|
+
return d.length <= 4 ? d : `${d.slice(0, 4)}-${d.slice(4)}`;
|
|
392
|
+
}
|
|
393
|
+
if (d.length <= 3) return d;
|
|
394
|
+
if (d.length <= 6) return `${d.slice(0, 3)}-${d.slice(3)}`;
|
|
395
|
+
if (d.length <= 10) return `${d.slice(0, 3)}-${d.slice(3, 6)}-${d.slice(6)}`;
|
|
396
|
+
return `${d.slice(0, 3)}-${d.slice(3, 7)}-${d.slice(7)}`;
|
|
397
|
+
}
|
|
398
|
+
function formatBusinessNumber(input5) {
|
|
399
|
+
const d = onlyDigits(input5).slice(0, 10);
|
|
400
|
+
if (d.length <= 3) return d;
|
|
401
|
+
if (d.length <= 5) return `${d.slice(0, 3)}-${d.slice(3)}`;
|
|
402
|
+
return `${d.slice(0, 3)}-${d.slice(3, 5)}-${d.slice(5)}`;
|
|
403
|
+
}
|
|
404
|
+
function isValidBusinessNumber(input5) {
|
|
405
|
+
const d = onlyDigits(input5);
|
|
406
|
+
if (d.length !== 10) return false;
|
|
407
|
+
const weights = [1, 3, 7, 1, 3, 7, 1, 3, 5];
|
|
408
|
+
const digits = [...d].map(Number);
|
|
409
|
+
let sum = weights.reduce((acc, w, i) => acc + w * digits[i], 0);
|
|
410
|
+
sum += Math.floor(digits[8] * 5 / 10);
|
|
411
|
+
return (10 - sum % 10) % 10 === digits[9];
|
|
412
|
+
}
|
|
413
|
+
function formatKoreanAmount(amount, unit = "\uC6D0") {
|
|
414
|
+
const n = Math.floor(Math.abs(amount));
|
|
415
|
+
if (n === 0) return `0${unit}`;
|
|
416
|
+
const units = [
|
|
417
|
+
{ value: 1e12, label: "\uC870" },
|
|
418
|
+
{ value: 1e8, label: "\uC5B5" },
|
|
419
|
+
{ value: 1e4, label: "\uB9CC" },
|
|
420
|
+
{ value: 1, label: "" }
|
|
421
|
+
];
|
|
422
|
+
let rest = n;
|
|
423
|
+
const parts = [];
|
|
424
|
+
for (const u of units) {
|
|
425
|
+
const q = Math.floor(rest / u.value);
|
|
426
|
+
rest %= u.value;
|
|
427
|
+
if (q > 0) parts.push(`${q.toLocaleString("ko-KR")}${u.label}`);
|
|
428
|
+
}
|
|
429
|
+
return `${amount < 0 ? "-" : ""}${parts.join(" ")}${unit}`;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// src/utils/date.ts
|
|
433
|
+
var pad = (n) => String(n).padStart(2, "0");
|
|
434
|
+
function toISODate(date) {
|
|
435
|
+
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
|
|
436
|
+
}
|
|
437
|
+
function parseISODate(value4) {
|
|
438
|
+
const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value4 ?? "");
|
|
439
|
+
if (!m) return null;
|
|
440
|
+
const [y, mo, d] = [Number(m[1]), Number(m[2]), Number(m[3])];
|
|
441
|
+
const date = new Date(y, mo - 1, d);
|
|
442
|
+
return date.getFullYear() === y && date.getMonth() === mo - 1 && date.getDate() === d ? date : null;
|
|
443
|
+
}
|
|
444
|
+
function addDays(date, days) {
|
|
445
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + days);
|
|
446
|
+
}
|
|
447
|
+
function addMonths(date, months) {
|
|
448
|
+
const target = new Date(date.getFullYear(), date.getMonth() + months, 1);
|
|
449
|
+
const lastDay = new Date(target.getFullYear(), target.getMonth() + 1, 0).getDate();
|
|
450
|
+
return new Date(target.getFullYear(), target.getMonth(), Math.min(date.getDate(), lastDay));
|
|
451
|
+
}
|
|
452
|
+
function isSameDay(a, b) {
|
|
453
|
+
return !!a && !!b && toISODate(a) === toISODate(b);
|
|
454
|
+
}
|
|
455
|
+
function isSameMonth(a, b) {
|
|
456
|
+
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth();
|
|
457
|
+
}
|
|
458
|
+
function compareDays(a, b) {
|
|
459
|
+
const x = toISODate(a);
|
|
460
|
+
const y = toISODate(b);
|
|
461
|
+
return x < y ? -1 : x > y ? 1 : 0;
|
|
462
|
+
}
|
|
463
|
+
function getCalendarWeeks(year, month) {
|
|
464
|
+
const first = new Date(year, month, 1);
|
|
465
|
+
const start = addDays(first, -first.getDay());
|
|
466
|
+
return Array.from({ length: 6 }, (_, week) => Array.from({ length: 7 }, (_2, day2) => addDays(start, week * 7 + day2)));
|
|
467
|
+
}
|
|
468
|
+
var KOREAN_WEEKDAYS = ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"];
|
|
469
|
+
function formatKoreanDate(date, withWeekday = true) {
|
|
470
|
+
const base = `${date.getFullYear()}\uB144 ${date.getMonth() + 1}\uC6D4 ${date.getDate()}\uC77C`;
|
|
471
|
+
return withWeekday ? `${base} ${KOREAN_WEEKDAYS[date.getDay()]}\uC694\uC77C` : base;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
// src/components/AddressInput/addressProviders.ts
|
|
475
|
+
var KAKAO_POSTCODE_SRC = "https://t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";
|
|
476
|
+
var loading = null;
|
|
477
|
+
function loadKakaoPostcode() {
|
|
478
|
+
const w = window;
|
|
479
|
+
const existing = w.kakao?.Postcode ?? w.daum?.Postcode;
|
|
480
|
+
if (existing) return Promise.resolve(existing);
|
|
481
|
+
loading ?? (loading = new Promise((resolve, reject) => {
|
|
482
|
+
const script = document.createElement("script");
|
|
483
|
+
script.src = KAKAO_POSTCODE_SRC;
|
|
484
|
+
script.async = true;
|
|
485
|
+
script.onload = () => {
|
|
486
|
+
const ctor = w.kakao?.Postcode ?? w.daum?.Postcode;
|
|
487
|
+
if (ctor) resolve(ctor);
|
|
488
|
+
else reject(new Error("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uCC3E\uC9C0 \uBABB\uD588\uC5B4\uC694"));
|
|
489
|
+
};
|
|
490
|
+
script.onerror = () => {
|
|
491
|
+
loading = null;
|
|
492
|
+
reject(new Error("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC5B4\uC694"));
|
|
493
|
+
};
|
|
494
|
+
document.head.appendChild(script);
|
|
495
|
+
}));
|
|
496
|
+
return loading;
|
|
497
|
+
}
|
|
498
|
+
function composeExtraAddress(data) {
|
|
499
|
+
if (data.userSelectedType !== "R") return "";
|
|
500
|
+
const parts = [];
|
|
501
|
+
if (data.bname && /[동로가]$/.test(data.bname)) parts.push(data.bname);
|
|
502
|
+
if (data.buildingName && data.apartment === "Y") parts.push(data.buildingName);
|
|
503
|
+
return parts.length ? ` (${parts.join(", ")})` : "";
|
|
504
|
+
}
|
|
505
|
+
var kakaoPostcodeProvider = async (container2, onSelect) => {
|
|
506
|
+
const Postcode = await loadKakaoPostcode();
|
|
507
|
+
new Postcode({
|
|
508
|
+
width: "100%",
|
|
509
|
+
height: "100%",
|
|
510
|
+
oncomplete: (data) => {
|
|
511
|
+
const address = data.userSelectedType === "R" ? data.roadAddress : data.jibunAddress || data.autoJibunAddress || "";
|
|
512
|
+
onSelect({ zonecode: data.zonecode, address, extraAddress: composeExtraAddress(data) });
|
|
513
|
+
}
|
|
514
|
+
}).embed(container2);
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
// src/components/AgreementGroup/agreements.ts
|
|
518
|
+
function hasAllRequiredAgreements(items2, value4) {
|
|
519
|
+
return items2.every((item7) => !item7.required || value4.includes(item7.value));
|
|
520
|
+
}
|
|
521
|
+
|
|
290
522
|
// src/theme/ThemeProvider.tsx
|
|
291
523
|
var import_react = require("react");
|
|
292
524
|
|
|
@@ -329,14 +561,24 @@ function usePortalProps() {
|
|
|
329
561
|
const { theme, style } = (0, import_react.useContext)(ThemeContext);
|
|
330
562
|
return { className: cx(themeClass[theme], portal), style };
|
|
331
563
|
}
|
|
332
|
-
|
|
333
|
-
|
|
564
|
+
|
|
565
|
+
// src/i18n/LocaleProvider.tsx
|
|
566
|
+
var import_react2 = require("react");
|
|
567
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
568
|
+
var MessagesContext = /* @__PURE__ */ (0, import_react2.createContext)({});
|
|
569
|
+
function LocaleProvider({ messages, children }) {
|
|
570
|
+
const parent = (0, import_react2.useContext)(MessagesContext);
|
|
571
|
+
const value4 = (0, import_react2.useMemo)(() => ({ ...parent, ...messages }), [parent, messages]);
|
|
572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MessagesContext.Provider, { value: value4, children });
|
|
573
|
+
}
|
|
574
|
+
function useMessages() {
|
|
575
|
+
return (0, import_react2.useContext)(MessagesContext);
|
|
334
576
|
}
|
|
335
577
|
|
|
336
578
|
// src/components/Accordion/Accordion.tsx
|
|
337
579
|
var RadixAccordion = __toESM(require("@radix-ui/react-accordion"), 1);
|
|
338
580
|
var import_icons = require("@bestow-ui/icons");
|
|
339
|
-
var
|
|
581
|
+
var import_react3 = require("react");
|
|
340
582
|
|
|
341
583
|
// src/components/Accordion/Accordion.css.ts
|
|
342
584
|
var chevron = "v58j0l4";
|
|
@@ -348,48 +590,50 @@ var root2 = "v58j0l0";
|
|
|
348
590
|
var trigger = "v58j0l3";
|
|
349
591
|
|
|
350
592
|
// src/components/Accordion/Accordion.tsx
|
|
351
|
-
var
|
|
352
|
-
var Accordion = /* @__PURE__ */ (0,
|
|
593
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
594
|
+
var Accordion = /* @__PURE__ */ (0, import_react3.forwardRef)(function Accordion2({ className, ...props }, ref) {
|
|
353
595
|
const { collapsible, ...multipleProps } = props;
|
|
354
596
|
const typedProps = props.type === "multiple" ? multipleProps : { ...multipleProps, collapsible };
|
|
355
597
|
const rootProps = "value" in props ? { ...typedProps, value: props.value ?? (props.type === "multiple" ? [] : "") } : typedProps;
|
|
356
|
-
return /* @__PURE__ */ (0,
|
|
598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RadixAccordion.Root, { ref, className: cx(root2, className), ...rootProps });
|
|
357
599
|
});
|
|
358
|
-
var AccordionItem = /* @__PURE__ */ (0,
|
|
600
|
+
var AccordionItem = /* @__PURE__ */ (0, import_react3.forwardRef)(function AccordionItem2({ title: title6, headingLevel = 3, className, children, ...rest }, ref) {
|
|
359
601
|
const Heading = `h${headingLevel}`;
|
|
360
|
-
return /* @__PURE__ */ (0,
|
|
361
|
-
/* @__PURE__ */ (0,
|
|
602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(RadixAccordion.Item, { ref, className: cx(item, className), ...rest, children: [
|
|
603
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RadixAccordion.Header, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Heading, { className: header, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(RadixAccordion.Trigger, { className: trigger, children: [
|
|
362
604
|
title6,
|
|
363
|
-
/* @__PURE__ */ (0,
|
|
605
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_icons.ChevronDownIcon, { size: 18, className: chevron })
|
|
364
606
|
] }) }) }),
|
|
365
|
-
/* @__PURE__ */ (0,
|
|
607
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RadixAccordion.Content, { className: content, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: contentInner, children }) })
|
|
366
608
|
] });
|
|
367
609
|
});
|
|
368
610
|
|
|
369
611
|
// src/components/AddressInput/AddressInput.tsx
|
|
370
|
-
var
|
|
612
|
+
var import_react9 = require("react");
|
|
371
613
|
|
|
372
614
|
// src/components/Button/Button.tsx
|
|
373
|
-
var
|
|
615
|
+
var import_react5 = require("react");
|
|
374
616
|
|
|
375
617
|
// src/components/Spinner/Spinner.tsx
|
|
376
618
|
var import_icons2 = require("@bestow-ui/icons");
|
|
377
|
-
var
|
|
619
|
+
var import_react4 = require("react");
|
|
378
620
|
|
|
379
621
|
// src/styles/visuallyHidden.css.ts
|
|
380
622
|
var visuallyHidden = "_1kdtbw10";
|
|
381
623
|
|
|
382
624
|
// src/components/Spinner/Spinner.css.ts
|
|
383
625
|
var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
384
|
-
var spinner = /* @__PURE__ */ (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_4b5tg40", variantClassNames: { color: {
|
|
626
|
+
var spinner = /* @__PURE__ */ (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_4b5tg40", variantClassNames: { color: { inherit: "_4b5tg41", primary: "_4b5tg42", neutral: "_4b5tg43", danger: "_4b5tg44" }, size: { sm: "_4b5tg45", md: "_4b5tg46", lg: "_4b5tg47" } }, defaultVariants: { color: "inherit", size: "md" }, compoundVariants: [] });
|
|
385
627
|
|
|
386
628
|
// src/components/Spinner/Spinner.tsx
|
|
387
|
-
var
|
|
388
|
-
var Spinner = /* @__PURE__ */ (0,
|
|
629
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
630
|
+
var Spinner = /* @__PURE__ */ (0, import_react4.forwardRef)(function Spinner2({ size, color, label: labelProp, className, ...rest }, ref) {
|
|
631
|
+
const m = useMessages();
|
|
632
|
+
const label6 = labelProp ?? m.loading ?? "\uB85C\uB529 \uC911";
|
|
389
633
|
const a11y = label6 ? { role: "status" } : { "aria-hidden": true };
|
|
390
|
-
return /* @__PURE__ */ (0,
|
|
391
|
-
/* @__PURE__ */ (0,
|
|
392
|
-
label6 && /* @__PURE__ */ (0,
|
|
634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { ref, className: cx(spinner({ size, color }), className), ...a11y, ...rest, children: [
|
|
635
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_icons2.LoaderIcon, { size: "100%" }),
|
|
636
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: visuallyHidden, children: label6 })
|
|
393
637
|
] });
|
|
394
638
|
});
|
|
395
639
|
|
|
@@ -399,8 +643,8 @@ var button = /* @__PURE__ */ (0, import_createRuntimeFn2.createRuntimeFn)({ defa
|
|
|
399
643
|
var icon = "xcekdai";
|
|
400
644
|
|
|
401
645
|
// src/components/Button/Button.tsx
|
|
402
|
-
var
|
|
403
|
-
var Button = /* @__PURE__ */ (0,
|
|
646
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
647
|
+
var Button = /* @__PURE__ */ (0, import_react5.forwardRef)(function Button2({
|
|
404
648
|
variant,
|
|
405
649
|
color,
|
|
406
650
|
size,
|
|
@@ -421,8 +665,8 @@ var Button = /* @__PURE__ */ (0, import_react4.forwardRef)(function Button2({
|
|
|
421
665
|
}
|
|
422
666
|
onClick?.(event);
|
|
423
667
|
};
|
|
424
|
-
const leading = loading2 ? /* @__PURE__ */ (0,
|
|
425
|
-
return /* @__PURE__ */ (0,
|
|
668
|
+
const leading = loading2 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Spinner, { size: "sm", label: "" }) : startIcon;
|
|
669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
426
670
|
"button",
|
|
427
671
|
{
|
|
428
672
|
ref,
|
|
@@ -433,9 +677,9 @@ var Button = /* @__PURE__ */ (0, import_react4.forwardRef)(function Button2({
|
|
|
433
677
|
onClick: handleClick,
|
|
434
678
|
...rest,
|
|
435
679
|
children: [
|
|
436
|
-
leading && /* @__PURE__ */ (0,
|
|
680
|
+
leading && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: icon, children: leading }),
|
|
437
681
|
children,
|
|
438
|
-
endIcon && /* @__PURE__ */ (0,
|
|
682
|
+
endIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: icon, children: endIcon })
|
|
439
683
|
]
|
|
440
684
|
}
|
|
441
685
|
);
|
|
@@ -453,18 +697,18 @@ var requiredMark = "_19p5zvha";
|
|
|
453
697
|
var root3 = /* @__PURE__ */ (0, import_createRuntimeFn3.createRuntimeFn)({ defaultClassName: "_19p5zvh0", variantClassNames: { size: { sm: "_19p5zvh1", md: "_19p5zvh2", lg: "_19p5zvh3" }, fullWidth: { true: "_19p5zvh4" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
454
698
|
|
|
455
699
|
// src/components/Input/Input.tsx
|
|
456
|
-
var
|
|
457
|
-
var
|
|
458
|
-
var Input = /* @__PURE__ */ (0,
|
|
459
|
-
return /* @__PURE__ */ (0,
|
|
700
|
+
var import_react6 = require("react");
|
|
701
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
702
|
+
var Input = /* @__PURE__ */ (0, import_react6.forwardRef)(function Input2({ size, invalid, fullWidth, startAdornment, endAdornment, rootClassName, className, disabled, ...rest }, ref) {
|
|
703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
460
704
|
"div",
|
|
461
705
|
{
|
|
462
706
|
className: cx(root3({ size, fullWidth }), rootClassName),
|
|
463
707
|
"data-invalid": invalid || void 0,
|
|
464
708
|
"data-disabled": disabled || void 0,
|
|
465
709
|
children: [
|
|
466
|
-
startAdornment && /* @__PURE__ */ (0,
|
|
467
|
-
/* @__PURE__ */ (0,
|
|
710
|
+
startAdornment && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: adornment, children: startAdornment }),
|
|
711
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
468
712
|
"input",
|
|
469
713
|
{
|
|
470
714
|
ref,
|
|
@@ -474,25 +718,25 @@ var Input = /* @__PURE__ */ (0, import_react5.forwardRef)(function Input2({ size
|
|
|
474
718
|
...rest
|
|
475
719
|
}
|
|
476
720
|
),
|
|
477
|
-
endAdornment && /* @__PURE__ */ (0,
|
|
721
|
+
endAdornment && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: adornment, children: endAdornment })
|
|
478
722
|
]
|
|
479
723
|
}
|
|
480
724
|
);
|
|
481
725
|
});
|
|
482
726
|
|
|
483
727
|
// src/components/Input/TextField.tsx
|
|
484
|
-
var
|
|
485
|
-
var
|
|
486
|
-
var TextField = /* @__PURE__ */ (0,
|
|
487
|
-
const generatedId = (0,
|
|
728
|
+
var import_react7 = require("react");
|
|
729
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
730
|
+
var TextField = /* @__PURE__ */ (0, import_react7.forwardRef)(function TextField2({ label: label6, helperText: helperText3, error, required, fullWidth, id, "aria-describedby": ariaDescribedBy, ...rest }, ref) {
|
|
731
|
+
const generatedId = (0, import_react7.useId)();
|
|
488
732
|
const inputId = id ?? generatedId;
|
|
489
733
|
const helperId = helperText3 ? `${inputId}-helper` : void 0;
|
|
490
|
-
return /* @__PURE__ */ (0,
|
|
491
|
-
label6 && /* @__PURE__ */ (0,
|
|
734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
735
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { htmlFor: inputId, className: label, children: [
|
|
492
736
|
label6,
|
|
493
|
-
required && /* @__PURE__ */ (0,
|
|
737
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
494
738
|
] }),
|
|
495
|
-
/* @__PURE__ */ (0,
|
|
739
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
496
740
|
Input,
|
|
497
741
|
{
|
|
498
742
|
ref,
|
|
@@ -504,7 +748,7 @@ var TextField = /* @__PURE__ */ (0, import_react6.forwardRef)(function TextField
|
|
|
504
748
|
...rest
|
|
505
749
|
}
|
|
506
750
|
),
|
|
507
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
751
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
508
752
|
] });
|
|
509
753
|
});
|
|
510
754
|
|
|
@@ -513,9 +757,9 @@ var Dialog = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
|
513
757
|
var import_icons3 = require("@bestow-ui/icons");
|
|
514
758
|
|
|
515
759
|
// src/utils/useReturnFocus.ts
|
|
516
|
-
var
|
|
760
|
+
var import_react8 = require("react");
|
|
517
761
|
function useReturnFocus(hasTrigger, onCloseAutoFocus) {
|
|
518
|
-
const returnTo = (0,
|
|
762
|
+
const returnTo = (0, import_react8.useRef)(null);
|
|
519
763
|
return {
|
|
520
764
|
onOpenAutoFocus: () => {
|
|
521
765
|
returnTo.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
@@ -545,7 +789,7 @@ var overlay = "_1pdsmv00";
|
|
|
545
789
|
var title = "_1pdsmv07";
|
|
546
790
|
|
|
547
791
|
// src/components/Modal/Modal.tsx
|
|
548
|
-
var
|
|
792
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
549
793
|
function Modal({
|
|
550
794
|
open,
|
|
551
795
|
defaultOpen,
|
|
@@ -562,12 +806,13 @@ function Modal({
|
|
|
562
806
|
onCloseAutoFocus
|
|
563
807
|
}) {
|
|
564
808
|
const portal2 = usePortalProps();
|
|
809
|
+
const m = useMessages();
|
|
565
810
|
const focus = useReturnFocus(Boolean(trigger4), onCloseAutoFocus);
|
|
566
|
-
return /* @__PURE__ */ (0,
|
|
567
|
-
trigger4 && /* @__PURE__ */ (0,
|
|
568
|
-
/* @__PURE__ */ (0,
|
|
569
|
-
/* @__PURE__ */ (0,
|
|
570
|
-
/* @__PURE__ */ (0,
|
|
811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Dialog.Root, { open, defaultOpen, onOpenChange, children: [
|
|
812
|
+
trigger4 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Dialog.Trigger, { asChild: true, children: trigger4 }),
|
|
813
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Dialog.Portal, { children: [
|
|
814
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Dialog.Overlay, { className: cx(portal2.className, overlay), style: portal2.style }),
|
|
815
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
571
816
|
Dialog.Content,
|
|
572
817
|
{
|
|
573
818
|
className: cx(portal2.className, content2({ size }), className),
|
|
@@ -577,15 +822,15 @@ function Modal({
|
|
|
577
822
|
onCloseAutoFocus: focus.onCloseAutoFocus,
|
|
578
823
|
...description6 ? {} : { "aria-describedby": void 0 },
|
|
579
824
|
children: [
|
|
580
|
-
/* @__PURE__ */ (0,
|
|
581
|
-
/* @__PURE__ */ (0,
|
|
582
|
-
/* @__PURE__ */ (0,
|
|
583
|
-
description6 && /* @__PURE__ */ (0,
|
|
825
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: header2, children: [
|
|
826
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: headings, children: [
|
|
827
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Dialog.Title, { className: title, children: title6 }),
|
|
828
|
+
description6 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Dialog.Description, { className: description, children: description6 })
|
|
584
829
|
] }),
|
|
585
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
830
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Dialog.Close, { className: closeButton, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons3.XIcon, { size: 16 }) })
|
|
586
831
|
] }),
|
|
587
|
-
children && /* @__PURE__ */ (0,
|
|
588
|
-
footer6 && /* @__PURE__ */ (0,
|
|
832
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: body, children }),
|
|
833
|
+
footer6 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: footer, children: footer6 })
|
|
589
834
|
]
|
|
590
835
|
}
|
|
591
836
|
)
|
|
@@ -594,49 +839,6 @@ function Modal({
|
|
|
594
839
|
}
|
|
595
840
|
var ModalClose = Dialog.Close;
|
|
596
841
|
|
|
597
|
-
// src/components/AddressInput/addressProviders.ts
|
|
598
|
-
var KAKAO_POSTCODE_SRC = "https://t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";
|
|
599
|
-
var loading = null;
|
|
600
|
-
function loadKakaoPostcode() {
|
|
601
|
-
const w = window;
|
|
602
|
-
const existing = w.kakao?.Postcode ?? w.daum?.Postcode;
|
|
603
|
-
if (existing) return Promise.resolve(existing);
|
|
604
|
-
loading ?? (loading = new Promise((resolve, reject) => {
|
|
605
|
-
const script = document.createElement("script");
|
|
606
|
-
script.src = KAKAO_POSTCODE_SRC;
|
|
607
|
-
script.async = true;
|
|
608
|
-
script.onload = () => {
|
|
609
|
-
const ctor = w.kakao?.Postcode ?? w.daum?.Postcode;
|
|
610
|
-
if (ctor) resolve(ctor);
|
|
611
|
-
else reject(new Error("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uCC3E\uC9C0 \uBABB\uD588\uC5B4\uC694"));
|
|
612
|
-
};
|
|
613
|
-
script.onerror = () => {
|
|
614
|
-
loading = null;
|
|
615
|
-
reject(new Error("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC5B4\uC694"));
|
|
616
|
-
};
|
|
617
|
-
document.head.appendChild(script);
|
|
618
|
-
}));
|
|
619
|
-
return loading;
|
|
620
|
-
}
|
|
621
|
-
function composeExtraAddress(data) {
|
|
622
|
-
if (data.userSelectedType !== "R") return "";
|
|
623
|
-
const parts = [];
|
|
624
|
-
if (data.bname && /[동로가]$/.test(data.bname)) parts.push(data.bname);
|
|
625
|
-
if (data.buildingName && data.apartment === "Y") parts.push(data.buildingName);
|
|
626
|
-
return parts.length ? ` (${parts.join(", ")})` : "";
|
|
627
|
-
}
|
|
628
|
-
var kakaoPostcodeProvider = async (container2, onSelect) => {
|
|
629
|
-
const Postcode = await loadKakaoPostcode();
|
|
630
|
-
new Postcode({
|
|
631
|
-
width: "100%",
|
|
632
|
-
height: "100%",
|
|
633
|
-
oncomplete: (data) => {
|
|
634
|
-
const address = data.userSelectedType === "R" ? data.roadAddress : data.jibunAddress || data.autoJibunAddress || "";
|
|
635
|
-
onSelect({ zonecode: data.zonecode, address, extraAddress: composeExtraAddress(data) });
|
|
636
|
-
}
|
|
637
|
-
}).embed(container2);
|
|
638
|
-
};
|
|
639
|
-
|
|
640
842
|
// src/components/AddressInput/AddressInput.css.ts
|
|
641
843
|
var fieldset = "_16fi7uy0";
|
|
642
844
|
var legend = "_16fi7uy1";
|
|
@@ -646,20 +848,21 @@ var searchStatus = "_16fi7uy5";
|
|
|
646
848
|
var zonecode = "_16fi7uy3";
|
|
647
849
|
|
|
648
850
|
// src/components/AddressInput/AddressInput.tsx
|
|
649
|
-
var
|
|
851
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
650
852
|
var EMPTY = { zonecode: "", address: "", extraAddress: "", detail: "" };
|
|
651
853
|
function SearchArea({
|
|
652
854
|
provider,
|
|
653
855
|
onSelect,
|
|
654
|
-
loadErrorText
|
|
856
|
+
loadErrorText,
|
|
857
|
+
loadingText
|
|
655
858
|
}) {
|
|
656
|
-
const containerRef = (0,
|
|
657
|
-
const [status, setStatus] = (0,
|
|
658
|
-
const onSelectRef = (0,
|
|
659
|
-
(0,
|
|
859
|
+
const containerRef = (0, import_react9.useRef)(null);
|
|
860
|
+
const [status, setStatus] = (0, import_react9.useState)("loading");
|
|
861
|
+
const onSelectRef = (0, import_react9.useRef)(onSelect);
|
|
862
|
+
(0, import_react9.useEffect)(() => {
|
|
660
863
|
onSelectRef.current = onSelect;
|
|
661
864
|
});
|
|
662
|
-
(0,
|
|
865
|
+
(0, import_react9.useEffect)(() => {
|
|
663
866
|
const container2 = containerRef.current;
|
|
664
867
|
if (!container2) return;
|
|
665
868
|
let cleanup;
|
|
@@ -676,36 +879,41 @@ function SearchArea({
|
|
|
676
879
|
cleanup?.();
|
|
677
880
|
};
|
|
678
881
|
}, [provider]);
|
|
679
|
-
return /* @__PURE__ */ (0,
|
|
680
|
-
/* @__PURE__ */ (0,
|
|
681
|
-
status !== "ready" && /* @__PURE__ */ (0,
|
|
882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: searchArea, children: [
|
|
883
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref: containerRef, style: { width: "100%", height: "100%" } }),
|
|
884
|
+
status !== "ready" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: searchStatus, role: "status", children: status === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Spinner, { label: loadingText }) : loadErrorText })
|
|
682
885
|
] });
|
|
683
886
|
}
|
|
684
|
-
var AddressInput = /* @__PURE__ */ (0,
|
|
887
|
+
var AddressInput = /* @__PURE__ */ (0, import_react9.forwardRef)(
|
|
685
888
|
function AddressInput2(props, ref) {
|
|
686
889
|
const {
|
|
687
890
|
value: value4,
|
|
688
891
|
defaultValue,
|
|
689
892
|
onValueChange,
|
|
690
|
-
label:
|
|
893
|
+
label: labelProp,
|
|
691
894
|
required,
|
|
692
895
|
helperText: helperText3,
|
|
693
896
|
error,
|
|
694
897
|
disabled,
|
|
695
898
|
provider = kakaoPostcodeProvider,
|
|
696
|
-
searchLabel
|
|
697
|
-
detailPlaceholder
|
|
698
|
-
loadErrorText
|
|
899
|
+
searchLabel: searchLabelProp,
|
|
900
|
+
detailPlaceholder: detailPlaceholderProp,
|
|
901
|
+
loadErrorText: loadErrorTextProp,
|
|
699
902
|
name,
|
|
700
903
|
className
|
|
701
904
|
} = props;
|
|
702
|
-
const
|
|
905
|
+
const m = useMessages();
|
|
906
|
+
const label6 = labelProp ?? m.address ?? "\uC8FC\uC18C";
|
|
907
|
+
const searchLabel = searchLabelProp ?? m.addressSearch ?? "\uC8FC\uC18C \uAC80\uC0C9";
|
|
908
|
+
const detailPlaceholder = detailPlaceholderProp ?? m.detailAddressPlaceholder ?? "\uC0C1\uC138 \uC8FC\uC18C (\uB3D9\xB7\uD638\uC218 \uB4F1)";
|
|
909
|
+
const loadErrorText = loadErrorTextProp ?? m.addressLoadError ?? "\uC8FC\uC18C \uAC80\uC0C9\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC5B4\uC694. \uC7A0\uC2DC \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.";
|
|
910
|
+
const baseId = (0, import_react9.useId)();
|
|
703
911
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
704
|
-
const detailRef = (0,
|
|
705
|
-
const selectedRef = (0,
|
|
706
|
-
const [open, setOpen] = (0,
|
|
912
|
+
const detailRef = (0, import_react9.useRef)(null);
|
|
913
|
+
const selectedRef = (0, import_react9.useRef)(false);
|
|
914
|
+
const [open, setOpen] = (0, import_react9.useState)(false);
|
|
707
915
|
const isControlled = "value" in props;
|
|
708
|
-
const [innerValue, setInnerValue] = (0,
|
|
916
|
+
const [innerValue, setInnerValue] = (0, import_react9.useState)(defaultValue ?? EMPTY);
|
|
709
917
|
const current2 = isControlled ? value4 ?? EMPTY : innerValue;
|
|
710
918
|
const update = (next) => {
|
|
711
919
|
if (!isControlled) setInnerValue(next);
|
|
@@ -727,45 +935,45 @@ var AddressInput = /* @__PURE__ */ (0, import_react8.forwardRef)(
|
|
|
727
935
|
setOpen(false);
|
|
728
936
|
};
|
|
729
937
|
const fullAddress = `${current2.address}${current2.extraAddress ?? ""}`;
|
|
730
|
-
return /* @__PURE__ */ (0,
|
|
731
|
-
/* @__PURE__ */ (0,
|
|
938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("fieldset", { ref, className: cx(fieldset, className), disabled, "aria-describedby": helperId, children: [
|
|
939
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("legend", { className: legend, children: [
|
|
732
940
|
label6,
|
|
733
|
-
required && /* @__PURE__ */ (0,
|
|
941
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
734
942
|
] }),
|
|
735
|
-
/* @__PURE__ */ (0,
|
|
736
|
-
/* @__PURE__ */ (0,
|
|
943
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: row, children: [
|
|
944
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
737
945
|
TextField,
|
|
738
946
|
{
|
|
739
|
-
"aria-label": "\uC6B0\uD3B8\uBC88\uD638",
|
|
947
|
+
"aria-label": m.postalCode ?? "\uC6B0\uD3B8\uBC88\uD638",
|
|
740
948
|
readOnly: true,
|
|
741
949
|
value: current2.zonecode,
|
|
742
|
-
placeholder: "\uC6B0\uD3B8\uBC88\uD638",
|
|
950
|
+
placeholder: m.postalCode ?? "\uC6B0\uD3B8\uBC88\uD638",
|
|
743
951
|
error: error && !current2.zonecode,
|
|
744
952
|
"aria-required": required || void 0,
|
|
745
953
|
rootClassName: zonecode,
|
|
746
954
|
onClick: openSearch
|
|
747
955
|
}
|
|
748
956
|
),
|
|
749
|
-
/* @__PURE__ */ (0,
|
|
957
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button, { variant: "outline", color: "neutral", onClick: openSearch, disabled, children: searchLabel })
|
|
750
958
|
] }),
|
|
751
|
-
/* @__PURE__ */ (0,
|
|
959
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
752
960
|
TextField,
|
|
753
961
|
{
|
|
754
|
-
"aria-label": "\uAE30\uBCF8 \uC8FC\uC18C",
|
|
962
|
+
"aria-label": m.baseAddress ?? "\uAE30\uBCF8 \uC8FC\uC18C",
|
|
755
963
|
readOnly: true,
|
|
756
964
|
value: fullAddress,
|
|
757
|
-
placeholder: `${searchLabel}\uC744 \uB20C\uB7EC \uC8FC\uC18C\uB97C \uACE0\uB974\uC138\uC694`,
|
|
965
|
+
placeholder: m.baseAddressPlaceholder ?? `${searchLabel}\uC744 \uB20C\uB7EC \uC8FC\uC18C\uB97C \uACE0\uB974\uC138\uC694`,
|
|
758
966
|
error: error && !current2.address,
|
|
759
967
|
"aria-required": required || void 0,
|
|
760
968
|
fullWidth: true,
|
|
761
969
|
onClick: openSearch
|
|
762
970
|
}
|
|
763
971
|
),
|
|
764
|
-
/* @__PURE__ */ (0,
|
|
972
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
765
973
|
TextField,
|
|
766
974
|
{
|
|
767
975
|
ref: detailRef,
|
|
768
|
-
"aria-label": "\uC0C1\uC138 \uC8FC\uC18C",
|
|
976
|
+
"aria-label": m.detailAddress ?? "\uC0C1\uC138 \uC8FC\uC18C",
|
|
769
977
|
value: current2.detail,
|
|
770
978
|
placeholder: detailPlaceholder,
|
|
771
979
|
onChange: (event) => update({ ...current2, detail: event.target.value }),
|
|
@@ -773,26 +981,34 @@ var AddressInput = /* @__PURE__ */ (0, import_react8.forwardRef)(
|
|
|
773
981
|
fullWidth: true
|
|
774
982
|
}
|
|
775
983
|
),
|
|
776
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
777
|
-
name && /* @__PURE__ */ (0,
|
|
778
|
-
/* @__PURE__ */ (0,
|
|
779
|
-
/* @__PURE__ */ (0,
|
|
780
|
-
/* @__PURE__ */ (0,
|
|
984
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
|
|
985
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
986
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("input", { type: "hidden", name: `${name}[zonecode]`, value: current2.zonecode }),
|
|
987
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("input", { type: "hidden", name: `${name}[address]`, value: fullAddress }),
|
|
988
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("input", { type: "hidden", name: `${name}[detail]`, value: current2.detail })
|
|
781
989
|
] }),
|
|
782
|
-
/* @__PURE__ */ (0,
|
|
990
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
783
991
|
Modal,
|
|
784
992
|
{
|
|
785
993
|
open,
|
|
786
994
|
onOpenChange: setOpen,
|
|
787
995
|
title: searchLabel,
|
|
788
|
-
description: "\uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC9C0\uBC88\uC73C\uB85C \uAC80\uC0C9\uD560 \uC218 \uC788\uC5B4\uC694.",
|
|
996
|
+
description: m.addressSearchDescription ?? "\uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC9C0\uBC88\uC73C\uB85C \uAC80\uC0C9\uD560 \uC218 \uC788\uC5B4\uC694.",
|
|
789
997
|
onCloseAutoFocus: (event) => {
|
|
790
998
|
if (selectedRef.current) {
|
|
791
999
|
event.preventDefault();
|
|
792
1000
|
detailRef.current?.focus();
|
|
793
1001
|
}
|
|
794
1002
|
},
|
|
795
|
-
children: /* @__PURE__ */ (0,
|
|
1003
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1004
|
+
SearchArea,
|
|
1005
|
+
{
|
|
1006
|
+
provider,
|
|
1007
|
+
onSelect: handleSelect,
|
|
1008
|
+
loadErrorText,
|
|
1009
|
+
loadingText: m.addressLoading ?? "\uC8FC\uC18C \uAC80\uC0C9\uC744 \uBD88\uB7EC\uC624\uB294 \uC911"
|
|
1010
|
+
}
|
|
1011
|
+
)
|
|
796
1012
|
}
|
|
797
1013
|
)
|
|
798
1014
|
] });
|
|
@@ -800,11 +1016,11 @@ var AddressInput = /* @__PURE__ */ (0, import_react8.forwardRef)(
|
|
|
800
1016
|
);
|
|
801
1017
|
|
|
802
1018
|
// src/components/AgreementGroup/AgreementGroup.tsx
|
|
803
|
-
var
|
|
1019
|
+
var import_react11 = require("react");
|
|
804
1020
|
var import_icons4 = require("@bestow-ui/icons");
|
|
805
1021
|
|
|
806
1022
|
// src/components/Checkbox/Checkbox.tsx
|
|
807
|
-
var
|
|
1023
|
+
var import_react10 = require("react");
|
|
808
1024
|
|
|
809
1025
|
// src/utils/mergeRefs.ts
|
|
810
1026
|
function mergeRefs(...refs) {
|
|
@@ -825,15 +1041,15 @@ var input2 = "_1y7mzsn6";
|
|
|
825
1041
|
var root4 = /* @__PURE__ */ (0, import_createRuntimeFn5.createRuntimeFn)({ defaultClassName: "_1y7mzsn0", variantClassNames: { size: { sm: "_1y7mzsn1", md: "_1y7mzsn2" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
826
1042
|
|
|
827
1043
|
// src/components/Checkbox/Checkbox.tsx
|
|
828
|
-
var
|
|
829
|
-
var Checkbox = /* @__PURE__ */ (0,
|
|
830
|
-
const innerRef = (0,
|
|
831
|
-
(0,
|
|
1044
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1045
|
+
var Checkbox = /* @__PURE__ */ (0, import_react10.forwardRef)(function Checkbox2({ label: label6, size, indeterminate = false, invalid, disabled, onChange, onCheckedChange, className, ...rest }, ref) {
|
|
1046
|
+
const innerRef = (0, import_react10.useRef)(null);
|
|
1047
|
+
(0, import_react10.useEffect)(() => {
|
|
832
1048
|
if (innerRef.current) innerRef.current.indeterminate = indeterminate;
|
|
833
1049
|
}, [indeterminate]);
|
|
834
|
-
return /* @__PURE__ */ (0,
|
|
835
|
-
/* @__PURE__ */ (0,
|
|
836
|
-
/* @__PURE__ */ (0,
|
|
1050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("label", { className: cx(root4({ size }), className), "data-disabled": disabled || void 0, children: [
|
|
1051
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: control({ size }), children: [
|
|
1052
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
837
1053
|
"input",
|
|
838
1054
|
{
|
|
839
1055
|
ref: mergeRefs(innerRef, ref),
|
|
@@ -841,10 +1057,14 @@ var Checkbox = /* @__PURE__ */ (0, import_react9.forwardRef)(function Checkbox2(
|
|
|
841
1057
|
className: input2,
|
|
842
1058
|
disabled,
|
|
843
1059
|
"aria-invalid": invalid || void 0,
|
|
1060
|
+
onChange: (event) => {
|
|
1061
|
+
onChange?.(event);
|
|
1062
|
+
onCheckedChange?.(event.target.checked);
|
|
1063
|
+
},
|
|
844
1064
|
...rest
|
|
845
1065
|
}
|
|
846
1066
|
),
|
|
847
|
-
/* @__PURE__ */ (0,
|
|
1067
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("svg", { className: checkIcon, viewBox: "0 0 20 20", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
848
1068
|
"path",
|
|
849
1069
|
{
|
|
850
1070
|
d: "M5 10.5l3.2 3L15 7",
|
|
@@ -854,7 +1074,7 @@ var Checkbox = /* @__PURE__ */ (0, import_react9.forwardRef)(function Checkbox2(
|
|
|
854
1074
|
strokeLinejoin: "round"
|
|
855
1075
|
}
|
|
856
1076
|
) }),
|
|
857
|
-
/* @__PURE__ */ (0,
|
|
1077
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("svg", { className: indeterminateIcon, viewBox: "0 0 20 20", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M6 10h8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
|
|
858
1078
|
] }),
|
|
859
1079
|
label6
|
|
860
1080
|
] });
|
|
@@ -874,11 +1094,8 @@ var tag = "j3uxdc7";
|
|
|
874
1094
|
var toggle = "j3uxdc8";
|
|
875
1095
|
|
|
876
1096
|
// src/components/AgreementGroup/AgreementGroup.tsx
|
|
877
|
-
var
|
|
878
|
-
|
|
879
|
-
return items2.every((item7) => !item7.required || value4.includes(item7.value));
|
|
880
|
-
}
|
|
881
|
-
var AgreementGroup = /* @__PURE__ */ (0, import_react10.forwardRef)(
|
|
1097
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1098
|
+
var AgreementGroup = /* @__PURE__ */ (0, import_react11.forwardRef)(
|
|
882
1099
|
function AgreementGroup2(props, ref) {
|
|
883
1100
|
const {
|
|
884
1101
|
items: items2,
|
|
@@ -886,23 +1103,29 @@ var AgreementGroup = /* @__PURE__ */ (0, import_react10.forwardRef)(
|
|
|
886
1103
|
defaultValue,
|
|
887
1104
|
onValueChange,
|
|
888
1105
|
label: label6,
|
|
889
|
-
allLabel
|
|
1106
|
+
allLabel: allLabelProp,
|
|
890
1107
|
helperText: helperText3,
|
|
891
1108
|
error,
|
|
892
1109
|
disabled,
|
|
893
|
-
requiredText
|
|
894
|
-
optionalText
|
|
895
|
-
showText
|
|
896
|
-
hideText
|
|
1110
|
+
requiredText: requiredTextProp,
|
|
1111
|
+
optionalText: optionalTextProp,
|
|
1112
|
+
showText: showTextProp,
|
|
1113
|
+
hideText: hideTextProp,
|
|
897
1114
|
name,
|
|
898
1115
|
className
|
|
899
1116
|
} = props;
|
|
900
|
-
const
|
|
1117
|
+
const m = useMessages();
|
|
1118
|
+
const allLabel = allLabelProp ?? m.agreeAll ?? "\uC804\uCCB4 \uB3D9\uC758";
|
|
1119
|
+
const requiredText = requiredTextProp ?? m.required ?? "\uD544\uC218";
|
|
1120
|
+
const optionalText = optionalTextProp ?? m.optional ?? "\uC120\uD0DD";
|
|
1121
|
+
const showText = showTextProp ?? m.show ?? "\uBCF4\uAE30";
|
|
1122
|
+
const hideText = hideTextProp ?? m.hide ?? "\uC811\uAE30";
|
|
1123
|
+
const baseId = (0, import_react11.useId)();
|
|
901
1124
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
902
1125
|
const isControlled = "value" in props;
|
|
903
|
-
const [innerValue, setInnerValue] = (0,
|
|
1126
|
+
const [innerValue, setInnerValue] = (0, import_react11.useState)(defaultValue ?? []);
|
|
904
1127
|
const agreed = isControlled ? value4 ?? [] : innerValue;
|
|
905
|
-
const [expanded, setExpanded] = (0,
|
|
1128
|
+
const [expanded, setExpanded] = (0, import_react11.useState)([]);
|
|
906
1129
|
const update = (next) => {
|
|
907
1130
|
if (!isControlled) setInnerValue(next);
|
|
908
1131
|
onValueChange?.(next);
|
|
@@ -911,7 +1134,7 @@ var AgreementGroup = /* @__PURE__ */ (0, import_react10.forwardRef)(
|
|
|
911
1134
|
const agreedCount = allValues.filter((v) => agreed.includes(v)).length;
|
|
912
1135
|
const allChecked = items2.length > 0 && agreedCount === items2.length;
|
|
913
1136
|
const toggleItem = (itemValue, checked) => update(checked ? [...agreed.filter((v) => v !== itemValue), itemValue] : agreed.filter((v) => v !== itemValue));
|
|
914
|
-
return /* @__PURE__ */ (0,
|
|
1137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
915
1138
|
"fieldset",
|
|
916
1139
|
{
|
|
917
1140
|
ref,
|
|
@@ -920,9 +1143,9 @@ var AgreementGroup = /* @__PURE__ */ (0, import_react10.forwardRef)(
|
|
|
920
1143
|
"aria-describedby": helperId,
|
|
921
1144
|
"data-invalid": error || void 0,
|
|
922
1145
|
children: [
|
|
923
|
-
label6 && /* @__PURE__ */ (0,
|
|
924
|
-
/* @__PURE__ */ (0,
|
|
925
|
-
/* @__PURE__ */ (0,
|
|
1146
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("legend", { className: legend2, children: label6 }),
|
|
1147
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: box, children: [
|
|
1148
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: all, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
926
1149
|
Checkbox,
|
|
927
1150
|
{
|
|
928
1151
|
label: allLabel,
|
|
@@ -931,28 +1154,28 @@ var AgreementGroup = /* @__PURE__ */ (0, import_react10.forwardRef)(
|
|
|
931
1154
|
onChange: (event) => update(event.target.checked ? allValues : [])
|
|
932
1155
|
}
|
|
933
1156
|
) }),
|
|
934
|
-
/* @__PURE__ */ (0,
|
|
1157
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { className: list, children: items2.map((item7) => {
|
|
935
1158
|
const labelId = `${baseId}-${item7.value}-label`;
|
|
936
1159
|
const toggleTextId = `${baseId}-${item7.value}-toggle`;
|
|
937
1160
|
const contentId = `${baseId}-${item7.value}-content`;
|
|
938
1161
|
const isOpen = expanded.includes(item7.value);
|
|
939
|
-
return /* @__PURE__ */ (0,
|
|
940
|
-
/* @__PURE__ */ (0,
|
|
941
|
-
/* @__PURE__ */ (0,
|
|
1162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { className: item2, children: [
|
|
1163
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: row2, children: [
|
|
1164
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
942
1165
|
Checkbox,
|
|
943
1166
|
{
|
|
944
1167
|
size: "sm",
|
|
945
1168
|
checked: agreed.includes(item7.value),
|
|
946
1169
|
invalid: error && item7.required && !agreed.includes(item7.value),
|
|
947
1170
|
onChange: (event) => toggleItem(item7.value, event.target.checked),
|
|
948
|
-
label: /* @__PURE__ */ (0,
|
|
949
|
-
/* @__PURE__ */ (0,
|
|
1171
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { id: labelId, children: [
|
|
1172
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: tag, "data-required": item7.required || void 0, children: item7.required ? requiredText : optionalText }),
|
|
950
1173
|
" ",
|
|
951
1174
|
item7.label
|
|
952
1175
|
] })
|
|
953
1176
|
}
|
|
954
1177
|
),
|
|
955
|
-
item7.content && /* @__PURE__ */ (0,
|
|
1178
|
+
item7.content && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
956
1179
|
"button",
|
|
957
1180
|
{
|
|
958
1181
|
type: "button",
|
|
@@ -962,20 +1185,20 @@ var AgreementGroup = /* @__PURE__ */ (0, import_react10.forwardRef)(
|
|
|
962
1185
|
"aria-labelledby": `${labelId} ${toggleTextId}`,
|
|
963
1186
|
onClick: () => setExpanded((prev) => isOpen ? prev.filter((v) => v !== item7.value) : [...prev, item7.value]),
|
|
964
1187
|
children: [
|
|
965
|
-
/* @__PURE__ */ (0,
|
|
966
|
-
/* @__PURE__ */ (0,
|
|
1188
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { id: toggleTextId, children: isOpen ? hideText : showText }),
|
|
1189
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_icons4.ChevronDownIcon, { size: 14, className: chevron2 })
|
|
967
1190
|
]
|
|
968
1191
|
}
|
|
969
1192
|
)
|
|
970
1193
|
] }),
|
|
971
1194
|
item7.content && isOpen && // 내용이 길면 스크롤된다 — 키보드로도 스크롤할 수 있게 포커스를 받는 이름 있는 영역으로 둔다
|
|
972
1195
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
973
|
-
/* @__PURE__ */ (0,
|
|
1196
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { id: contentId, role: "region", "aria-labelledby": labelId, tabIndex: 0, className: content3, children: item7.content })
|
|
974
1197
|
] }, item7.value);
|
|
975
1198
|
}) })
|
|
976
1199
|
] }),
|
|
977
|
-
name && agreed.map((v) => /* @__PURE__ */ (0,
|
|
978
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
1200
|
+
name && agreed.map((v) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("input", { type: "hidden", name, value: v }, v)),
|
|
1201
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
979
1202
|
]
|
|
980
1203
|
}
|
|
981
1204
|
);
|
|
@@ -983,7 +1206,7 @@ var AgreementGroup = /* @__PURE__ */ (0, import_react10.forwardRef)(
|
|
|
983
1206
|
);
|
|
984
1207
|
|
|
985
1208
|
// src/components/Alert/Alert.tsx
|
|
986
|
-
var
|
|
1209
|
+
var import_react12 = require("react");
|
|
987
1210
|
var import_icons5 = require("@bestow-ui/icons");
|
|
988
1211
|
|
|
989
1212
|
// src/components/Alert/Alert.css.ts
|
|
@@ -997,7 +1220,7 @@ var icon2 = "bsmpc0f";
|
|
|
997
1220
|
var title2 = "bsmpc0h";
|
|
998
1221
|
|
|
999
1222
|
// src/components/Alert/Alert.tsx
|
|
1000
|
-
var
|
|
1223
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1001
1224
|
var defaultIcons = {
|
|
1002
1225
|
primary: import_icons5.InfoIcon,
|
|
1003
1226
|
neutral: import_icons5.InfoIcon,
|
|
@@ -1005,82 +1228,44 @@ var defaultIcons = {
|
|
|
1005
1228
|
warning: import_icons5.TriangleAlertIcon,
|
|
1006
1229
|
danger: import_icons5.CircleAlertIcon
|
|
1007
1230
|
};
|
|
1008
|
-
var Alert = /* @__PURE__ */ (0,
|
|
1231
|
+
var Alert = /* @__PURE__ */ (0, import_react12.forwardRef)(function Alert2({
|
|
1232
|
+
variant,
|
|
1233
|
+
color = "primary",
|
|
1234
|
+
title: title6,
|
|
1235
|
+
icon: icon6,
|
|
1236
|
+
action: action3,
|
|
1237
|
+
onClose,
|
|
1238
|
+
closeLabel: closeLabelProp,
|
|
1239
|
+
className,
|
|
1240
|
+
children,
|
|
1241
|
+
...rest
|
|
1242
|
+
}, ref) {
|
|
1243
|
+
const m = useMessages();
|
|
1244
|
+
const closeLabel = closeLabelProp ?? m.close ?? "\uB2EB\uAE30";
|
|
1009
1245
|
const DefaultIcon = defaultIcons[color];
|
|
1010
|
-
const iconNode = icon6 === void 0 ? /* @__PURE__ */ (0,
|
|
1011
|
-
return /* @__PURE__ */ (0,
|
|
1012
|
-
iconNode !== false && iconNode !== null && /* @__PURE__ */ (0,
|
|
1013
|
-
/* @__PURE__ */ (0,
|
|
1014
|
-
title6 && /* @__PURE__ */ (0,
|
|
1015
|
-
children && /* @__PURE__ */ (0,
|
|
1246
|
+
const iconNode = icon6 === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DefaultIcon, { size: 18 }) : icon6;
|
|
1247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { ref, className: cx(alert({ variant, color }), className), ...rest, children: [
|
|
1248
|
+
iconNode !== false && iconNode !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: icon2, "aria-hidden": true, children: iconNode }),
|
|
1249
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: content4, children: [
|
|
1250
|
+
title6 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: title2, children: title6 }),
|
|
1251
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: description2, children })
|
|
1016
1252
|
] }),
|
|
1017
|
-
action3 && /* @__PURE__ */ (0,
|
|
1018
|
-
onClose && /* @__PURE__ */ (0,
|
|
1253
|
+
action3 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: action, children: action3 }),
|
|
1254
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: closeButton2, "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons5.XIcon, { size: 16 }) })
|
|
1019
1255
|
] });
|
|
1020
1256
|
});
|
|
1021
1257
|
|
|
1022
1258
|
// src/components/AmountInput/AmountInput.tsx
|
|
1023
|
-
var
|
|
1259
|
+
var import_react15 = require("react");
|
|
1024
1260
|
|
|
1025
|
-
// src/utils/
|
|
1026
|
-
var
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
}
|
|
1032
|
-
function formatPhoneNumber(input5) {
|
|
1033
|
-
const d = onlyDigits(input5).slice(0, phoneNumberMaxDigits(onlyDigits(input5)));
|
|
1034
|
-
if (d.startsWith("02")) {
|
|
1035
|
-
if (d.length <= 2) return d;
|
|
1036
|
-
if (d.length <= 5) return `${d.slice(0, 2)}-${d.slice(2)}`;
|
|
1037
|
-
if (d.length <= 9) return `${d.slice(0, 2)}-${d.slice(2, 5)}-${d.slice(5)}`;
|
|
1038
|
-
return `${d.slice(0, 2)}-${d.slice(2, 6)}-${d.slice(6)}`;
|
|
1039
|
-
}
|
|
1040
|
-
if (/^1[568]/.test(d)) {
|
|
1041
|
-
return d.length <= 4 ? d : `${d.slice(0, 4)}-${d.slice(4)}`;
|
|
1042
|
-
}
|
|
1043
|
-
if (d.length <= 3) return d;
|
|
1044
|
-
if (d.length <= 6) return `${d.slice(0, 3)}-${d.slice(3)}`;
|
|
1045
|
-
if (d.length <= 10) return `${d.slice(0, 3)}-${d.slice(3, 6)}-${d.slice(6)}`;
|
|
1046
|
-
return `${d.slice(0, 3)}-${d.slice(3, 7)}-${d.slice(7)}`;
|
|
1047
|
-
}
|
|
1048
|
-
function formatBusinessNumber(input5) {
|
|
1049
|
-
const d = onlyDigits(input5).slice(0, 10);
|
|
1050
|
-
if (d.length <= 3) return d;
|
|
1051
|
-
if (d.length <= 5) return `${d.slice(0, 3)}-${d.slice(3)}`;
|
|
1052
|
-
return `${d.slice(0, 3)}-${d.slice(3, 5)}-${d.slice(5)}`;
|
|
1053
|
-
}
|
|
1054
|
-
function isValidBusinessNumber(input5) {
|
|
1055
|
-
const d = onlyDigits(input5);
|
|
1056
|
-
if (d.length !== 10) return false;
|
|
1057
|
-
const weights = [1, 3, 7, 1, 3, 7, 1, 3, 5];
|
|
1058
|
-
const digits = [...d].map(Number);
|
|
1059
|
-
let sum = weights.reduce((acc, w, i) => acc + w * digits[i], 0);
|
|
1060
|
-
sum += Math.floor(digits[8] * 5 / 10);
|
|
1061
|
-
return (10 - sum % 10) % 10 === digits[9];
|
|
1062
|
-
}
|
|
1063
|
-
function formatKoreanAmount(amount, unit = "\uC6D0") {
|
|
1064
|
-
const n = Math.floor(Math.abs(amount));
|
|
1065
|
-
if (n === 0) return `0${unit}`;
|
|
1066
|
-
const units = [
|
|
1067
|
-
{ value: 1e12, label: "\uC870" },
|
|
1068
|
-
{ value: 1e8, label: "\uC5B5" },
|
|
1069
|
-
{ value: 1e4, label: "\uB9CC" },
|
|
1070
|
-
{ value: 1, label: "" }
|
|
1071
|
-
];
|
|
1072
|
-
let rest = n;
|
|
1073
|
-
const parts = [];
|
|
1074
|
-
for (const u of units) {
|
|
1075
|
-
const q = Math.floor(rest / u.value);
|
|
1076
|
-
rest %= u.value;
|
|
1077
|
-
if (q > 0) parts.push(`${q.toLocaleString("ko-KR")}${u.label}`);
|
|
1078
|
-
}
|
|
1079
|
-
return `${amount < 0 ? "-" : ""}${parts.join(" ")}${unit}`;
|
|
1080
|
-
}
|
|
1261
|
+
// src/utils/useFormattedInput.ts
|
|
1262
|
+
var import_react14 = require("react");
|
|
1263
|
+
|
|
1264
|
+
// src/utils/useIsomorphicLayoutEffect.ts
|
|
1265
|
+
var import_react13 = require("react");
|
|
1266
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? import_react13.useLayoutEffect : import_react13.useEffect;
|
|
1081
1267
|
|
|
1082
1268
|
// src/utils/useFormattedInput.ts
|
|
1083
|
-
var import_react12 = require("react");
|
|
1084
1269
|
function caretAfter(display, count2, isMeaningful) {
|
|
1085
1270
|
if (count2 <= 0) return 0;
|
|
1086
1271
|
let seen = 0;
|
|
@@ -1095,16 +1280,16 @@ function useFormattedInput({
|
|
|
1095
1280
|
value: value4,
|
|
1096
1281
|
defaultValue,
|
|
1097
1282
|
onValueChange,
|
|
1098
|
-
sanitize:
|
|
1099
|
-
format,
|
|
1283
|
+
sanitize: sanitize4,
|
|
1284
|
+
format: format2,
|
|
1100
1285
|
isMeaningful,
|
|
1101
1286
|
inputRef
|
|
1102
1287
|
}) {
|
|
1103
|
-
const [innerValue, setInnerValue] = (0,
|
|
1104
|
-
const raw = isControlled ?
|
|
1105
|
-
const display =
|
|
1106
|
-
const pendingCaret = (0,
|
|
1107
|
-
(
|
|
1288
|
+
const [innerValue, setInnerValue] = (0, import_react14.useState)(() => sanitize4(defaultValue ?? ""));
|
|
1289
|
+
const raw = isControlled ? sanitize4(value4 ?? "") : innerValue;
|
|
1290
|
+
const display = format2(raw);
|
|
1291
|
+
const pendingCaret = (0, import_react14.useRef)(null);
|
|
1292
|
+
useIsomorphicLayoutEffect(() => {
|
|
1108
1293
|
const input5 = inputRef.current;
|
|
1109
1294
|
if (pendingCaret.current === null || !input5 || document.activeElement !== input5) return;
|
|
1110
1295
|
const position = caretAfter(input5.value, pendingCaret.current, isMeaningful);
|
|
@@ -1118,8 +1303,8 @@ function useFormattedInput({
|
|
|
1118
1303
|
};
|
|
1119
1304
|
const onChange = (event) => {
|
|
1120
1305
|
const { value: typed, selectionStart } = event.target;
|
|
1121
|
-
const next =
|
|
1122
|
-
const before =
|
|
1306
|
+
const next = sanitize4(typed);
|
|
1307
|
+
const before = sanitize4(typed.slice(0, selectionStart ?? typed.length));
|
|
1123
1308
|
commit(next, Math.min(before.length, next.length));
|
|
1124
1309
|
};
|
|
1125
1310
|
const onKeyDown = (event) => {
|
|
@@ -1139,34 +1324,38 @@ function useFormattedInput({
|
|
|
1139
1324
|
commit(raw.slice(0, index) + raw.slice(index + 1), index);
|
|
1140
1325
|
}
|
|
1141
1326
|
};
|
|
1142
|
-
|
|
1327
|
+
const setRaw = (next) => setInnerValue(sanitize4(next));
|
|
1328
|
+
return { raw, display, onChange, onKeyDown, setRaw };
|
|
1143
1329
|
}
|
|
1144
1330
|
|
|
1145
1331
|
// src/components/AmountInput/AmountInput.css.ts
|
|
1146
1332
|
var input3 = "_70qkav0";
|
|
1147
1333
|
|
|
1148
1334
|
// src/components/AmountInput/AmountInput.tsx
|
|
1149
|
-
var
|
|
1335
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1150
1336
|
var MAX_DIGITS = 15;
|
|
1151
1337
|
var isDigit = (char) => /\d/.test(char);
|
|
1152
|
-
var AmountInput = /* @__PURE__ */ (0,
|
|
1338
|
+
var AmountInput = /* @__PURE__ */ (0, import_react15.forwardRef)(
|
|
1153
1339
|
function AmountInput2(props, ref) {
|
|
1154
1340
|
const {
|
|
1155
1341
|
value: value4,
|
|
1156
1342
|
defaultValue,
|
|
1157
1343
|
onValueChange,
|
|
1158
1344
|
max,
|
|
1159
|
-
unit
|
|
1345
|
+
unit: unitProp,
|
|
1160
1346
|
showKoreanAmount = true,
|
|
1161
|
-
label:
|
|
1347
|
+
label: labelProp,
|
|
1162
1348
|
placeholder = "0",
|
|
1163
1349
|
helperText: helperText3,
|
|
1164
1350
|
onKeyDown,
|
|
1165
1351
|
className,
|
|
1166
1352
|
...rest
|
|
1167
1353
|
} = props;
|
|
1168
|
-
const inputRef = (0,
|
|
1169
|
-
const
|
|
1354
|
+
const inputRef = (0, import_react15.useRef)(null);
|
|
1355
|
+
const m = useMessages();
|
|
1356
|
+
const unit = unitProp ?? m.currencyUnit ?? "\uC6D0";
|
|
1357
|
+
const label6 = labelProp ?? m.amount ?? "\uAE08\uC561";
|
|
1358
|
+
const sanitize4 = (input5) => {
|
|
1170
1359
|
let digits = input5.replace(/\D/g, "").replace(/^0+(?=\d)/, "").slice(0, MAX_DIGITS);
|
|
1171
1360
|
if (max !== void 0 && digits && Number(digits) > max) digits = String(Math.floor(max));
|
|
1172
1361
|
return digits;
|
|
@@ -1177,13 +1366,13 @@ var AmountInput = /* @__PURE__ */ (0, import_react13.forwardRef)(
|
|
|
1177
1366
|
value: toRaw(value4),
|
|
1178
1367
|
defaultValue: toRaw(defaultValue),
|
|
1179
1368
|
onValueChange: (digits) => onValueChange?.(digits === "" ? null : Number(digits)),
|
|
1180
|
-
sanitize:
|
|
1369
|
+
sanitize: sanitize4,
|
|
1181
1370
|
format: (digits) => digits === "" ? "" : Number(digits).toLocaleString("ko-KR"),
|
|
1182
1371
|
isMeaningful: isDigit,
|
|
1183
1372
|
inputRef
|
|
1184
1373
|
});
|
|
1185
1374
|
const reading = showKoreanAmount && field3.raw !== "" ? formatKoreanAmount(Number(field3.raw), unit) : null;
|
|
1186
|
-
return /* @__PURE__ */ (0,
|
|
1375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1187
1376
|
TextField,
|
|
1188
1377
|
{
|
|
1189
1378
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -1197,9 +1386,9 @@ var AmountInput = /* @__PURE__ */ (0, import_react13.forwardRef)(
|
|
|
1197
1386
|
onKeyDown?.(event);
|
|
1198
1387
|
},
|
|
1199
1388
|
endAdornment: unit,
|
|
1200
|
-
helperText: reading && helperText3 ? /* @__PURE__ */ (0,
|
|
1389
|
+
helperText: reading && helperText3 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1201
1390
|
reading,
|
|
1202
|
-
/* @__PURE__ */ (0,
|
|
1391
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("br", {}),
|
|
1203
1392
|
helperText3
|
|
1204
1393
|
] }) : reading ?? helperText3,
|
|
1205
1394
|
className: cx(input3, className),
|
|
@@ -1212,7 +1401,7 @@ var AmountInput = /* @__PURE__ */ (0, import_react13.forwardRef)(
|
|
|
1212
1401
|
// src/components/Avatar/Avatar.tsx
|
|
1213
1402
|
var RadixAvatar = __toESM(require("@radix-ui/react-avatar"), 1);
|
|
1214
1403
|
var import_icons6 = require("@bestow-ui/icons");
|
|
1215
|
-
var
|
|
1404
|
+
var import_react16 = require("react");
|
|
1216
1405
|
|
|
1217
1406
|
// src/components/Avatar/Avatar.css.ts
|
|
1218
1407
|
var import_createRuntimeFn7 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -1221,24 +1410,24 @@ var image = "_1fd2kp26";
|
|
|
1221
1410
|
var root5 = /* @__PURE__ */ (0, import_createRuntimeFn7.createRuntimeFn)({ defaultClassName: "_1fd2kp20", variantClassNames: { size: { sm: "_1fd2kp21", md: "_1fd2kp22", lg: "_1fd2kp23" }, shape: { circle: "_1fd2kp24", square: "_1fd2kp25" } }, defaultVariants: { size: "md", shape: "circle" }, compoundVariants: [] });
|
|
1222
1411
|
|
|
1223
1412
|
// src/components/Avatar/Avatar.tsx
|
|
1224
|
-
var
|
|
1413
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1225
1414
|
function getInitials(name) {
|
|
1226
1415
|
const [a = "", b = ""] = name.trim().split(/\s+/);
|
|
1227
1416
|
const first = (word) => Array.from(word)[0] ?? "";
|
|
1228
1417
|
return (first(a) + first(b)).toUpperCase();
|
|
1229
1418
|
}
|
|
1230
|
-
var Avatar = /* @__PURE__ */ (0,
|
|
1419
|
+
var Avatar = /* @__PURE__ */ (0, import_react16.forwardRef)(function Avatar2({ src, alt, name, fallback: fallback2, size, shape, className, ...rest }, ref) {
|
|
1231
1420
|
const label6 = alt ?? name;
|
|
1232
1421
|
const a11y = label6 ? { role: "img", "aria-label": label6 } : { "aria-hidden": true };
|
|
1233
1422
|
const initials = name ? getInitials(name) : "";
|
|
1234
|
-
return /* @__PURE__ */ (0,
|
|
1235
|
-
src && /* @__PURE__ */ (0,
|
|
1236
|
-
/* @__PURE__ */ (0,
|
|
1423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(RadixAvatar.Root, { ref, className: cx(root5({ size, shape }), className), ...a11y, ...rest, children: [
|
|
1424
|
+
src && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RadixAvatar.Image, { src, alt: "", className: image }),
|
|
1425
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RadixAvatar.Fallback, { className: fallback, children: fallback2 ?? (initials || /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons6.UserIcon, { size: "60%" })) })
|
|
1237
1426
|
] });
|
|
1238
1427
|
});
|
|
1239
1428
|
|
|
1240
1429
|
// src/components/Badge/Badge.tsx
|
|
1241
|
-
var
|
|
1430
|
+
var import_react17 = require("react");
|
|
1242
1431
|
|
|
1243
1432
|
// src/components/Badge/Badge.css.ts
|
|
1244
1433
|
var import_createRuntimeFn8 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -1246,21 +1435,21 @@ var badge = /* @__PURE__ */ (0, import_createRuntimeFn8.createRuntimeFn)({ defau
|
|
|
1246
1435
|
var icon3 = "_1295cfng";
|
|
1247
1436
|
|
|
1248
1437
|
// src/components/Badge/Badge.tsx
|
|
1249
|
-
var
|
|
1250
|
-
var Badge = /* @__PURE__ */ (0,
|
|
1251
|
-
return /* @__PURE__ */ (0,
|
|
1252
|
-
startIcon && /* @__PURE__ */ (0,
|
|
1438
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1439
|
+
var Badge = /* @__PURE__ */ (0, import_react17.forwardRef)(function Badge2({ variant, color, size, startIcon, className, children, ...rest }, ref) {
|
|
1440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { ref, className: cx(badge({ variant, color, size }), className), ...rest, children: [
|
|
1441
|
+
startIcon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: icon3, children: startIcon }),
|
|
1253
1442
|
children
|
|
1254
1443
|
] });
|
|
1255
1444
|
});
|
|
1256
1445
|
|
|
1257
1446
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
1258
|
-
var
|
|
1447
|
+
var import_react19 = require("react");
|
|
1259
1448
|
var import_icons8 = require("@bestow-ui/icons");
|
|
1260
1449
|
|
|
1261
1450
|
// src/components/Link/Link.tsx
|
|
1262
1451
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
1263
|
-
var
|
|
1452
|
+
var import_react18 = require("react");
|
|
1264
1453
|
var import_icons7 = require("@bestow-ui/icons");
|
|
1265
1454
|
|
|
1266
1455
|
// src/components/Link/Link.css.ts
|
|
@@ -1269,28 +1458,30 @@ var externalIcon = "_1t4hlp6";
|
|
|
1269
1458
|
var link = /* @__PURE__ */ (0, import_createRuntimeFn9.createRuntimeFn)({ defaultClassName: "_1t4hlp0", variantClassNames: { color: { primary: "_1t4hlp1", neutral: "_1t4hlp2", inherit: "_1t4hlp3" }, underline: { always: "_1t4hlp4", hover: "_1t4hlp5" } }, defaultVariants: { color: "primary", underline: "always" }, compoundVariants: [] });
|
|
1270
1459
|
|
|
1271
1460
|
// src/components/Link/Link.tsx
|
|
1272
|
-
var
|
|
1461
|
+
var import_jsx_runtime16 = (
|
|
1273
1462
|
// Slot 의 props 타입은 HTMLElement 기준이라 <a> 전용 속성(target·rel 등)은 그대로 넘기도록 단언한다
|
|
1274
1463
|
require("react/jsx-runtime")
|
|
1275
1464
|
);
|
|
1276
|
-
var Link = /* @__PURE__ */ (0,
|
|
1465
|
+
var Link = /* @__PURE__ */ (0, import_react18.forwardRef)(function Link2({
|
|
1277
1466
|
as: Component = "a",
|
|
1278
1467
|
asChild,
|
|
1279
1468
|
color,
|
|
1280
1469
|
underline,
|
|
1281
1470
|
external,
|
|
1282
|
-
externalLabel
|
|
1471
|
+
externalLabel: externalLabelProp,
|
|
1283
1472
|
target,
|
|
1284
1473
|
rel,
|
|
1285
1474
|
className,
|
|
1286
1475
|
children,
|
|
1287
1476
|
...rest
|
|
1288
1477
|
}, ref) {
|
|
1478
|
+
const m = useMessages();
|
|
1479
|
+
const externalLabel = externalLabelProp ?? m.newWindow ?? "(\uC0C8 \uCC3D)";
|
|
1289
1480
|
const linkClassName = cx(link({ color, underline }), className);
|
|
1290
1481
|
if (asChild) {
|
|
1291
|
-
return /* @__PURE__ */ (0,
|
|
1482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_slot.Slot, { ref, className: linkClassName, ...{ target, rel, ...rest }, children });
|
|
1292
1483
|
}
|
|
1293
|
-
return /* @__PURE__ */ (0,
|
|
1484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1294
1485
|
Component,
|
|
1295
1486
|
{
|
|
1296
1487
|
ref,
|
|
@@ -1300,10 +1491,10 @@ var Link = /* @__PURE__ */ (0, import_react16.forwardRef)(function Link2({
|
|
|
1300
1491
|
...rest,
|
|
1301
1492
|
children: [
|
|
1302
1493
|
children,
|
|
1303
|
-
external && /* @__PURE__ */ (0,
|
|
1494
|
+
external && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
1304
1495
|
" ",
|
|
1305
|
-
/* @__PURE__ */ (0,
|
|
1306
|
-
/* @__PURE__ */ (0,
|
|
1496
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons7.ExternalLinkIcon, { className: externalIcon }),
|
|
1497
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: visuallyHidden, children: externalLabel })
|
|
1307
1498
|
] })
|
|
1308
1499
|
]
|
|
1309
1500
|
}
|
|
@@ -1318,32 +1509,34 @@ var list2 = "_18t8ztt0";
|
|
|
1318
1509
|
var separator = "_18t8ztt4";
|
|
1319
1510
|
|
|
1320
1511
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
1321
|
-
var
|
|
1322
|
-
var Breadcrumb = /* @__PURE__ */ (0,
|
|
1323
|
-
const
|
|
1324
|
-
|
|
1512
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1513
|
+
var Breadcrumb = /* @__PURE__ */ (0, import_react19.forwardRef)(function Breadcrumb2({ items: items2, linkAs, separator: separator3, "aria-label": ariaLabelProp, className, ...rest }, ref) {
|
|
1514
|
+
const m = useMessages();
|
|
1515
|
+
const ariaLabel = ariaLabelProp ?? m.breadcrumb ?? "\uC774\uB3D9 \uACBD\uB85C";
|
|
1516
|
+
const sep = separator3 ?? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons8.ChevronRightIcon, { size: 14 });
|
|
1517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ol", { className: list2, children: items2.map((item7, index) => {
|
|
1325
1518
|
const isCurrent = index === items2.length - 1;
|
|
1326
|
-
return /* @__PURE__ */ (0,
|
|
1327
|
-
index > 0 && /* @__PURE__ */ (0,
|
|
1328
|
-
isCurrent || item7.href === void 0 ? /* @__PURE__ */ (0,
|
|
1519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: item3, children: [
|
|
1520
|
+
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: separator, "aria-hidden": true, children: sep }),
|
|
1521
|
+
isCurrent || item7.href === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: isCurrent ? current : void 0, "aria-current": isCurrent ? "page" : void 0, children: item7.label }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Link, { as: linkAs, href: item7.href, color: "neutral", underline: "hover", className: link2, children: item7.label })
|
|
1329
1522
|
] }, index);
|
|
1330
1523
|
}) }) });
|
|
1331
1524
|
});
|
|
1332
1525
|
|
|
1333
1526
|
// src/components/BusinessNumberInput/BusinessNumberInput.tsx
|
|
1334
|
-
var
|
|
1335
|
-
var
|
|
1527
|
+
var import_react20 = require("react");
|
|
1528
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1336
1529
|
var sanitize = (input5) => input5.replace(/\D/g, "").slice(0, 10);
|
|
1337
1530
|
var isDigit2 = (char) => /\d/.test(char);
|
|
1338
|
-
var BusinessNumberInput = /* @__PURE__ */ (0,
|
|
1531
|
+
var BusinessNumberInput = /* @__PURE__ */ (0, import_react20.forwardRef)(
|
|
1339
1532
|
function BusinessNumberInput2(props, ref) {
|
|
1340
1533
|
const {
|
|
1341
1534
|
value: value4,
|
|
1342
1535
|
defaultValue,
|
|
1343
1536
|
onValueChange,
|
|
1344
1537
|
validate = true,
|
|
1345
|
-
invalidText
|
|
1346
|
-
label:
|
|
1538
|
+
invalidText: invalidTextProp,
|
|
1539
|
+
label: labelProp,
|
|
1347
1540
|
placeholder = "000-00-00000",
|
|
1348
1541
|
error,
|
|
1349
1542
|
helperText: helperText3,
|
|
@@ -1351,8 +1544,12 @@ var BusinessNumberInput = /* @__PURE__ */ (0, import_react18.forwardRef)(
|
|
|
1351
1544
|
onKeyDown,
|
|
1352
1545
|
...rest
|
|
1353
1546
|
} = props;
|
|
1354
|
-
const inputRef = (0,
|
|
1355
|
-
const
|
|
1547
|
+
const inputRef = (0, import_react20.useRef)(null);
|
|
1548
|
+
const m = useMessages();
|
|
1549
|
+
const invalidText = invalidTextProp ?? m.businessNumberInvalid ?? "\uC62C\uBC14\uB978 \uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638\uAC00 \uC544\uB2C8\uC5D0\uC694. \uBC88\uD638\uB97C \uB2E4\uC2DC \uD655\uC778\uD574 \uC8FC\uC138\uC694.";
|
|
1550
|
+
const label6 = labelProp ?? m.businessNumber ?? "\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638";
|
|
1551
|
+
const incompleteText = m.businessNumberIncomplete ?? "10\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
|
|
1552
|
+
const [touched, setTouched] = (0, import_react20.useState)(false);
|
|
1356
1553
|
const field3 = useFormattedInput({
|
|
1357
1554
|
isControlled: "value" in props,
|
|
1358
1555
|
value: value4,
|
|
@@ -1366,7 +1563,7 @@ var BusinessNumberInput = /* @__PURE__ */ (0, import_react18.forwardRef)(
|
|
|
1366
1563
|
const complete = field3.raw.length === 10;
|
|
1367
1564
|
const autoInvalid = validate && field3.raw.length > 0 && (complete ? !isValidBusinessNumber(field3.raw) : touched);
|
|
1368
1565
|
const showAuto = autoInvalid && error === void 0;
|
|
1369
|
-
return /* @__PURE__ */ (0,
|
|
1566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1370
1567
|
TextField,
|
|
1371
1568
|
{
|
|
1372
1569
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -1384,42 +1581,240 @@ var BusinessNumberInput = /* @__PURE__ */ (0, import_react18.forwardRef)(
|
|
|
1384
1581
|
onBlur?.(event);
|
|
1385
1582
|
},
|
|
1386
1583
|
error: error ?? autoInvalid,
|
|
1387
|
-
helperText: showAuto ? complete ? invalidText :
|
|
1584
|
+
helperText: showAuto ? complete ? invalidText : incompleteText : helperText3,
|
|
1388
1585
|
...rest
|
|
1389
1586
|
}
|
|
1390
1587
|
);
|
|
1391
1588
|
}
|
|
1392
1589
|
);
|
|
1393
1590
|
|
|
1591
|
+
// src/components/Calendar/Calendar.tsx
|
|
1592
|
+
var import_react23 = require("react");
|
|
1593
|
+
var import_icons9 = require("@bestow-ui/icons");
|
|
1594
|
+
|
|
1595
|
+
// src/utils/useIsClient.ts
|
|
1596
|
+
var import_react21 = require("react");
|
|
1597
|
+
var subscribeNothing = () => () => {
|
|
1598
|
+
};
|
|
1599
|
+
function useIsClient() {
|
|
1600
|
+
return (0, import_react21.useSyncExternalStore)(
|
|
1601
|
+
subscribeNothing,
|
|
1602
|
+
() => true,
|
|
1603
|
+
() => false
|
|
1604
|
+
);
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
// src/components/IconButton/IconButton.tsx
|
|
1608
|
+
var import_react22 = require("react");
|
|
1609
|
+
|
|
1610
|
+
// src/components/IconButton/IconButton.css.ts
|
|
1611
|
+
var import_createRuntimeFn10 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
1612
|
+
var iconButton = /* @__PURE__ */ (0, import_createRuntimeFn10.createRuntimeFn)({ defaultClassName: "ip9et20", variantClassNames: { size: { sm: "ip9et21", md: "ip9et22", lg: "ip9et23" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
1613
|
+
|
|
1614
|
+
// src/components/IconButton/IconButton.tsx
|
|
1615
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1616
|
+
var IconButton = /* @__PURE__ */ (0, import_react22.forwardRef)(function IconButton2({ variant = "ghost", color = "neutral", size, loading: loading2, className, children, ...rest }, ref) {
|
|
1617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1618
|
+
Button,
|
|
1619
|
+
{
|
|
1620
|
+
ref,
|
|
1621
|
+
variant,
|
|
1622
|
+
color,
|
|
1623
|
+
size,
|
|
1624
|
+
loading: loading2,
|
|
1625
|
+
className: cx(iconButton({ size }), className),
|
|
1626
|
+
...rest,
|
|
1627
|
+
children: !loading2 && children
|
|
1628
|
+
}
|
|
1629
|
+
);
|
|
1630
|
+
});
|
|
1631
|
+
|
|
1632
|
+
// src/components/Calendar/Calendar.css.ts
|
|
1633
|
+
var cell = "_1qyq67b5";
|
|
1634
|
+
var day = "_1qyq67b6";
|
|
1635
|
+
var grid = "_1qyq67b3";
|
|
1636
|
+
var header3 = "_1qyq67b1";
|
|
1637
|
+
var heading = "_1qyq67b2";
|
|
1638
|
+
var root6 = "_1qyq67b0";
|
|
1639
|
+
var weekday = "_1qyq67b4";
|
|
1640
|
+
|
|
1641
|
+
// src/components/Calendar/Calendar.tsx
|
|
1642
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1643
|
+
var Calendar = /* @__PURE__ */ (0, import_react23.forwardRef)(function Calendar2(props, ref) {
|
|
1644
|
+
const {
|
|
1645
|
+
value: value4,
|
|
1646
|
+
defaultValue,
|
|
1647
|
+
onValueChange,
|
|
1648
|
+
min,
|
|
1649
|
+
max,
|
|
1650
|
+
isDateDisabled,
|
|
1651
|
+
isHoliday,
|
|
1652
|
+
today: todayProp,
|
|
1653
|
+
initialFocus,
|
|
1654
|
+
prevMonthLabel: prevMonthLabelProp,
|
|
1655
|
+
nextMonthLabel: nextMonthLabelProp,
|
|
1656
|
+
className
|
|
1657
|
+
} = props;
|
|
1658
|
+
const m = useMessages();
|
|
1659
|
+
const prevMonthLabel = prevMonthLabelProp ?? m.previousMonth ?? "\uC774\uC804 \uB2EC";
|
|
1660
|
+
const nextMonthLabel = nextMonthLabelProp ?? m.nextMonth ?? "\uB2E4\uC74C \uB2EC";
|
|
1661
|
+
const weekdaysShort = m.weekdaysShort ?? KOREAN_WEEKDAYS;
|
|
1662
|
+
const weekdaysLong = m.weekdaysLong ?? KOREAN_WEEKDAYS.map((name) => `${name}\uC694\uC77C`);
|
|
1663
|
+
const headingId = (0, import_react23.useId)();
|
|
1664
|
+
const gridRef = (0, import_react23.useRef)(null);
|
|
1665
|
+
const isControlled = "value" in props;
|
|
1666
|
+
const [innerValue, setInnerValue] = (0, import_react23.useState)(defaultValue ?? "");
|
|
1667
|
+
const selected = parseISODate(isControlled ? value4 : innerValue);
|
|
1668
|
+
const isClient = useIsClient();
|
|
1669
|
+
const today = parseISODate(todayProp) ?? (isClient ? /* @__PURE__ */ new Date() : null);
|
|
1670
|
+
const minDate = parseISODate(min);
|
|
1671
|
+
const maxDate = parseISODate(max);
|
|
1672
|
+
const clamp = (date) => {
|
|
1673
|
+
if (minDate && compareDays(date, minDate) < 0) return minDate;
|
|
1674
|
+
if (maxDate && compareDays(date, maxDate) > 0) return maxDate;
|
|
1675
|
+
return date;
|
|
1676
|
+
};
|
|
1677
|
+
const isDisabled = (date) => minDate !== null && compareDays(date, minDate) < 0 || maxDate !== null && compareDays(date, maxDate) > 0 || !!isDateDisabled?.(date);
|
|
1678
|
+
const [focusedState, setFocused] = (0, import_react23.useState)(null);
|
|
1679
|
+
const base = selected ?? today;
|
|
1680
|
+
const focused = focusedState ?? (base ? clamp(base) : null);
|
|
1681
|
+
const moveFocus = (0, import_react23.useRef)(initialFocus ?? false);
|
|
1682
|
+
const selectedIso = selected ? toISODate(selected) : "";
|
|
1683
|
+
(0, import_react23.useEffect)(() => {
|
|
1684
|
+
const date = parseISODate(selectedIso);
|
|
1685
|
+
if (date) setFocused((prev) => isSameDay(prev, date) ? prev : date);
|
|
1686
|
+
}, [selectedIso]);
|
|
1687
|
+
(0, import_react23.useEffect)(() => {
|
|
1688
|
+
if (!moveFocus.current || !focused) return;
|
|
1689
|
+
moveFocus.current = false;
|
|
1690
|
+
gridRef.current?.querySelector(`[data-date="${toISODate(focused)}"]`)?.focus();
|
|
1691
|
+
}, [focused]);
|
|
1692
|
+
const focusDate = (date) => {
|
|
1693
|
+
moveFocus.current = true;
|
|
1694
|
+
setFocused(clamp(date));
|
|
1695
|
+
};
|
|
1696
|
+
const select = (date) => {
|
|
1697
|
+
if (isDisabled(date)) return;
|
|
1698
|
+
const iso = toISODate(date);
|
|
1699
|
+
if (!isControlled) setInnerValue(iso);
|
|
1700
|
+
onValueChange?.(iso);
|
|
1701
|
+
setFocused(date);
|
|
1702
|
+
};
|
|
1703
|
+
const handleKeyDown = (event) => {
|
|
1704
|
+
if (!focused) return;
|
|
1705
|
+
const moves = {
|
|
1706
|
+
ArrowLeft: () => addDays(focused, -1),
|
|
1707
|
+
ArrowRight: () => addDays(focused, 1),
|
|
1708
|
+
ArrowUp: () => addDays(focused, -7),
|
|
1709
|
+
ArrowDown: () => addDays(focused, 7),
|
|
1710
|
+
Home: () => addDays(focused, -focused.getDay()),
|
|
1711
|
+
End: () => addDays(focused, 6 - focused.getDay()),
|
|
1712
|
+
PageUp: () => addMonths(focused, event.shiftKey ? -12 : -1),
|
|
1713
|
+
PageDown: () => addMonths(focused, event.shiftKey ? 12 : 1)
|
|
1714
|
+
};
|
|
1715
|
+
const move = moves[event.key];
|
|
1716
|
+
if (move) {
|
|
1717
|
+
event.preventDefault();
|
|
1718
|
+
focusDate(move());
|
|
1719
|
+
}
|
|
1720
|
+
};
|
|
1721
|
+
const visible = focused;
|
|
1722
|
+
const weeks = visible ? getCalendarWeeks(visible.getFullYear(), visible.getMonth()).filter(
|
|
1723
|
+
(week) => week.some((date) => isSameMonth(date, visible))
|
|
1724
|
+
) : [];
|
|
1725
|
+
const canPrev = !!visible && (!minDate || compareDays(new Date(visible.getFullYear(), visible.getMonth(), 0), minDate) >= 0);
|
|
1726
|
+
const canNext = !!visible && (!maxDate || compareDays(new Date(visible.getFullYear(), visible.getMonth() + 1, 1), maxDate) <= 0);
|
|
1727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { ref, className: cx(root6, className), children: [
|
|
1728
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: header3, children: [
|
|
1729
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1730
|
+
IconButton,
|
|
1731
|
+
{
|
|
1732
|
+
"aria-label": prevMonthLabel,
|
|
1733
|
+
size: "sm",
|
|
1734
|
+
disabled: !canPrev,
|
|
1735
|
+
onClick: () => visible && setFocused(clamp(addMonths(visible, -1))),
|
|
1736
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons9.ChevronLeftIcon, {})
|
|
1737
|
+
}
|
|
1738
|
+
),
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { id: headingId, className: heading, "aria-live": "polite", children: visible && (m.monthTitle?.(visible.getFullYear(), visible.getMonth() + 1) ?? `${visible.getFullYear()}\uB144 ${visible.getMonth() + 1}\uC6D4`) }),
|
|
1740
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1741
|
+
IconButton,
|
|
1742
|
+
{
|
|
1743
|
+
"aria-label": nextMonthLabel,
|
|
1744
|
+
size: "sm",
|
|
1745
|
+
disabled: !canNext,
|
|
1746
|
+
onClick: () => visible && setFocused(clamp(addMonths(visible, 1))),
|
|
1747
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons9.ChevronRightIcon, {})
|
|
1748
|
+
}
|
|
1749
|
+
)
|
|
1750
|
+
] }),
|
|
1751
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("table", { ref: gridRef, role: "grid", "aria-labelledby": headingId, className: grid, onKeyDown: handleKeyDown, children: [
|
|
1752
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tr", { children: weekdaysShort.map((name, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("th", { scope: "col", abbr: weekdaysLong[index], className: weekday, "data-weekday": index, children: name }, index)) }) }),
|
|
1753
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tbody", { children: weeks.map((week) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tr", { children: week.map((date) => {
|
|
1754
|
+
const iso = toISODate(date);
|
|
1755
|
+
if (!visible || !isSameMonth(date, visible))
|
|
1756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("td", { role: "gridcell", className: cell }, iso);
|
|
1757
|
+
const isSelected = isSameDay(date, selected);
|
|
1758
|
+
const isToday = isSameDay(date, today);
|
|
1759
|
+
const holiday = !!isHoliday?.(date);
|
|
1760
|
+
const disabled = isDisabled(date);
|
|
1761
|
+
const label6 = [
|
|
1762
|
+
m.dayLabel?.(date, weekdaysLong[date.getDay()]) ?? `${date.getDate()}, ${date.getFullYear()}\uB144 ${date.getMonth() + 1}\uC6D4 ${weekdaysLong[date.getDay()]}`,
|
|
1763
|
+
holiday && (m.holiday ?? "\uACF5\uD734\uC77C"),
|
|
1764
|
+
isToday && (m.today ?? "\uC624\uB298")
|
|
1765
|
+
].filter(Boolean).join(", ");
|
|
1766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("td", { role: "gridcell", "aria-selected": isSelected, className: cell, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1767
|
+
"button",
|
|
1768
|
+
{
|
|
1769
|
+
type: "button",
|
|
1770
|
+
className: day,
|
|
1771
|
+
"data-date": iso,
|
|
1772
|
+
"data-weekday": date.getDay(),
|
|
1773
|
+
"data-holiday": holiday || void 0,
|
|
1774
|
+
"data-selected": isSelected || void 0,
|
|
1775
|
+
tabIndex: isSameDay(date, focused) ? 0 : -1,
|
|
1776
|
+
"aria-label": label6,
|
|
1777
|
+
"aria-current": isToday ? "date" : void 0,
|
|
1778
|
+
"aria-disabled": disabled || void 0,
|
|
1779
|
+
onClick: () => select(date),
|
|
1780
|
+
onFocus: () => !isSameDay(date, focused) && setFocused(date),
|
|
1781
|
+
children: date.getDate()
|
|
1782
|
+
}
|
|
1783
|
+
) }, iso);
|
|
1784
|
+
}) }, toISODate(week[0]))) })
|
|
1785
|
+
] })
|
|
1786
|
+
] });
|
|
1787
|
+
});
|
|
1788
|
+
|
|
1394
1789
|
// src/components/Card/Card.tsx
|
|
1395
|
-
var
|
|
1790
|
+
var import_react24 = require("react");
|
|
1396
1791
|
|
|
1397
1792
|
// src/components/Card/Card.css.ts
|
|
1398
|
-
var
|
|
1793
|
+
var import_createRuntimeFn11 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
1399
1794
|
var body2 = "dnuf1u9";
|
|
1400
|
-
var card = /* @__PURE__ */ (0,
|
|
1795
|
+
var card = /* @__PURE__ */ (0, import_createRuntimeFn11.createRuntimeFn)({ defaultClassName: "dnuf1u0", variantClassNames: { variant: { outline: "dnuf1u1", elevated: "dnuf1u2", soft: "dnuf1u3" }, padding: { none: "dnuf1u4", sm: "dnuf1u5", md: "dnuf1u6", lg: "dnuf1u7" } }, defaultVariants: { variant: "outline", padding: "md" }, compoundVariants: [] });
|
|
1401
1796
|
var footer2 = "dnuf1ua";
|
|
1402
|
-
var
|
|
1797
|
+
var header4 = "dnuf1u8";
|
|
1403
1798
|
|
|
1404
1799
|
// src/components/Card/Card.tsx
|
|
1405
|
-
var
|
|
1406
|
-
var Card = /* @__PURE__ */ (0,
|
|
1407
|
-
return /* @__PURE__ */ (0,
|
|
1800
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1801
|
+
var Card = /* @__PURE__ */ (0, import_react24.forwardRef)(function Card2({ variant, padding, as: Component = "div", className, ...rest }, ref) {
|
|
1802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Component, { ref, className: cx(card({ variant, padding }), className), ...rest });
|
|
1408
1803
|
});
|
|
1409
|
-
var CardHeader = /* @__PURE__ */ (0,
|
|
1410
|
-
return /* @__PURE__ */ (0,
|
|
1804
|
+
var CardHeader = /* @__PURE__ */ (0, import_react24.forwardRef)(function CardHeader2({ className, ...rest }, ref) {
|
|
1805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { ref, className: cx(header4, className), ...rest });
|
|
1411
1806
|
});
|
|
1412
|
-
var CardBody = /* @__PURE__ */ (0,
|
|
1413
|
-
return /* @__PURE__ */ (0,
|
|
1807
|
+
var CardBody = /* @__PURE__ */ (0, import_react24.forwardRef)(function CardBody2({ className, ...rest }, ref) {
|
|
1808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { ref, className: cx(body2, className), ...rest });
|
|
1414
1809
|
});
|
|
1415
|
-
var CardFooter = /* @__PURE__ */ (0,
|
|
1416
|
-
return /* @__PURE__ */ (0,
|
|
1810
|
+
var CardFooter = /* @__PURE__ */ (0, import_react24.forwardRef)(function CardFooter2({ className, ...rest }, ref) {
|
|
1811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { ref, className: cx(footer2, className), ...rest });
|
|
1417
1812
|
});
|
|
1418
1813
|
|
|
1419
1814
|
// src/components/Combobox/Combobox.tsx
|
|
1420
1815
|
var Popover = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1421
|
-
var
|
|
1422
|
-
var
|
|
1816
|
+
var import_react25 = require("react");
|
|
1817
|
+
var import_icons10 = require("@bestow-ui/icons");
|
|
1423
1818
|
|
|
1424
1819
|
// src/components/Select/Select.css.ts
|
|
1425
1820
|
var content5 = "_1kx81e83";
|
|
@@ -1436,16 +1831,16 @@ var empty = "c2pbq72";
|
|
|
1436
1831
|
var toggle2 = "c2pbq70";
|
|
1437
1832
|
|
|
1438
1833
|
// src/components/Combobox/Combobox.tsx
|
|
1439
|
-
var
|
|
1834
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1440
1835
|
var defaultFilter = (option2, query) => option2.label.toLowerCase().includes(query.trim().toLowerCase());
|
|
1441
|
-
var Combobox = /* @__PURE__ */ (0,
|
|
1836
|
+
var Combobox = /* @__PURE__ */ (0, import_react25.forwardRef)(function Combobox2(props, ref) {
|
|
1442
1837
|
const {
|
|
1443
1838
|
options,
|
|
1444
1839
|
value: value4,
|
|
1445
1840
|
defaultValue,
|
|
1446
1841
|
onValueChange,
|
|
1447
1842
|
filter = defaultFilter,
|
|
1448
|
-
emptyMessage
|
|
1843
|
+
emptyMessage: emptyMessageProp,
|
|
1449
1844
|
placeholder,
|
|
1450
1845
|
label: label6,
|
|
1451
1846
|
helperText: helperText3,
|
|
@@ -1457,26 +1852,29 @@ var Combobox = /* @__PURE__ */ (0, import_react20.forwardRef)(function Combobox2
|
|
|
1457
1852
|
name,
|
|
1458
1853
|
id,
|
|
1459
1854
|
"aria-label": ariaLabel,
|
|
1460
|
-
toggleLabel
|
|
1855
|
+
toggleLabel: toggleLabelProp,
|
|
1461
1856
|
className
|
|
1462
1857
|
} = props;
|
|
1463
|
-
const
|
|
1858
|
+
const m = useMessages();
|
|
1859
|
+
const emptyMessage = emptyMessageProp ?? m.noResults ?? "\uACB0\uACFC\uAC00 \uC5C6\uC5B4\uC694";
|
|
1860
|
+
const toggleLabel = toggleLabelProp ?? m.openList ?? "\uBAA9\uB85D \uC5F4\uAE30";
|
|
1861
|
+
const generatedId = (0, import_react25.useId)();
|
|
1464
1862
|
const inputId = id ?? generatedId;
|
|
1465
1863
|
const labelId = `${inputId}-label`;
|
|
1466
1864
|
const listId = `${inputId}-listbox`;
|
|
1467
1865
|
const helperId = helperText3 ? `${inputId}-helper` : void 0;
|
|
1468
1866
|
const optionId = (index) => `${inputId}-option-${index}`;
|
|
1469
1867
|
const portal2 = usePortalProps();
|
|
1470
|
-
const inputRef = (0,
|
|
1471
|
-
const anchorRef = (0,
|
|
1868
|
+
const inputRef = (0, import_react25.useRef)(null);
|
|
1869
|
+
const anchorRef = (0, import_react25.useRef)(null);
|
|
1472
1870
|
const isControlled = "value" in props;
|
|
1473
|
-
const [innerValue, setInnerValue] = (0,
|
|
1871
|
+
const [innerValue, setInnerValue] = (0, import_react25.useState)(defaultValue);
|
|
1474
1872
|
const selectedValue = isControlled ? value4 : innerValue;
|
|
1475
1873
|
const selectedOption = options.find((o) => o.value === selectedValue);
|
|
1476
|
-
const [open, setOpen] = (0,
|
|
1477
|
-
const [query, setQuery] = (0,
|
|
1478
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
1479
|
-
const filtered = (0,
|
|
1874
|
+
const [open, setOpen] = (0, import_react25.useState)(false);
|
|
1875
|
+
const [query, setQuery] = (0, import_react25.useState)(null);
|
|
1876
|
+
const [activeIndex, setActiveIndex] = (0, import_react25.useState)(-1);
|
|
1877
|
+
const filtered = (0, import_react25.useMemo)(() => query ? options.filter((o) => filter(o, query)) : options, [options, filter, query]);
|
|
1480
1878
|
const inputText = query ?? selectedOption?.label ?? "";
|
|
1481
1879
|
const firstEnabled = (list5, from = 0, step = 1) => {
|
|
1482
1880
|
for (let i = from; i >= 0 && i < list5.length; i += step) if (!list5[i].disabled) return i;
|
|
@@ -1542,18 +1940,18 @@ var Combobox = /* @__PURE__ */ (0, import_react20.forwardRef)(function Combobox2
|
|
|
1542
1940
|
break;
|
|
1543
1941
|
}
|
|
1544
1942
|
};
|
|
1545
|
-
(0,
|
|
1943
|
+
(0, import_react25.useEffect)(() => {
|
|
1546
1944
|
if (!open || activeIndex < 0) return;
|
|
1547
1945
|
document.getElementById(optionId(activeIndex))?.scrollIntoView?.({ block: "nearest" });
|
|
1548
1946
|
}, [open, activeIndex]);
|
|
1549
1947
|
const hasOptions = filtered.length > 0;
|
|
1550
|
-
return /* @__PURE__ */ (0,
|
|
1551
|
-
label6 && /* @__PURE__ */ (0,
|
|
1948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
1949
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { id: labelId, htmlFor: inputId, className: label, children: [
|
|
1552
1950
|
label6,
|
|
1553
|
-
required && /* @__PURE__ */ (0,
|
|
1951
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
1554
1952
|
] }),
|
|
1555
|
-
/* @__PURE__ */ (0,
|
|
1556
|
-
/* @__PURE__ */ (0,
|
|
1953
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Popover.Root, { open: open && !disabled, onOpenChange: (next) => next ? openList() : close2(), children: [
|
|
1954
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Popover.Anchor, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1557
1955
|
"div",
|
|
1558
1956
|
{
|
|
1559
1957
|
ref: anchorRef,
|
|
@@ -1561,7 +1959,7 @@ var Combobox = /* @__PURE__ */ (0, import_react20.forwardRef)(function Combobox2
|
|
|
1561
1959
|
"data-invalid": error || void 0,
|
|
1562
1960
|
"data-disabled": disabled || void 0,
|
|
1563
1961
|
children: [
|
|
1564
|
-
/* @__PURE__ */ (0,
|
|
1962
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1565
1963
|
"input",
|
|
1566
1964
|
{
|
|
1567
1965
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -1588,7 +1986,7 @@ var Combobox = /* @__PURE__ */ (0, import_react20.forwardRef)(function Combobox2
|
|
|
1588
1986
|
className: input
|
|
1589
1987
|
}
|
|
1590
1988
|
),
|
|
1591
|
-
/* @__PURE__ */ (0,
|
|
1989
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1592
1990
|
"button",
|
|
1593
1991
|
{
|
|
1594
1992
|
type: "button",
|
|
@@ -1603,13 +2001,13 @@ var Combobox = /* @__PURE__ */ (0, import_react20.forwardRef)(function Combobox2
|
|
|
1603
2001
|
else openList(options);
|
|
1604
2002
|
inputRef.current?.focus();
|
|
1605
2003
|
},
|
|
1606
|
-
children: /* @__PURE__ */ (0,
|
|
2004
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons10.ChevronDownIcon, { size: 16 })
|
|
1607
2005
|
}
|
|
1608
2006
|
)
|
|
1609
2007
|
]
|
|
1610
2008
|
}
|
|
1611
2009
|
) }),
|
|
1612
|
-
/* @__PURE__ */ (0,
|
|
2010
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1613
2011
|
Popover.Content,
|
|
1614
2012
|
{
|
|
1615
2013
|
role: "presentation",
|
|
@@ -1624,7 +2022,7 @@ var Combobox = /* @__PURE__ */ (0, import_react20.forwardRef)(function Combobox2
|
|
|
1624
2022
|
onInteractOutside: (event) => {
|
|
1625
2023
|
if (anchorRef.current?.contains(event.target)) event.preventDefault();
|
|
1626
2024
|
},
|
|
1627
|
-
children: hasOptions ? /* @__PURE__ */ (0,
|
|
2025
|
+
children: hasOptions ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1628
2026
|
"div",
|
|
1629
2027
|
{
|
|
1630
2028
|
id: listId,
|
|
@@ -1636,7 +2034,7 @@ var Combobox = /* @__PURE__ */ (0, import_react20.forwardRef)(function Combobox2
|
|
|
1636
2034
|
return (
|
|
1637
2035
|
// aria-activedescendant 패턴: 포커스·키보드는 입력창이 맡고 항목은 포커스를 받지 않는다 (WAI-ARIA combobox)
|
|
1638
2036
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/interactive-supports-focus
|
|
1639
|
-
/* @__PURE__ */ (0,
|
|
2037
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1640
2038
|
"div",
|
|
1641
2039
|
{
|
|
1642
2040
|
id: optionId(index),
|
|
@@ -1652,7 +2050,7 @@ var Combobox = /* @__PURE__ */ (0, import_react20.forwardRef)(function Combobox2
|
|
|
1652
2050
|
onClick: () => select(option2),
|
|
1653
2051
|
children: [
|
|
1654
2052
|
option2.label,
|
|
1655
|
-
isSelected && /* @__PURE__ */ (0,
|
|
2053
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: itemIndicator, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons10.CheckIcon, { size: 16 }) })
|
|
1656
2054
|
]
|
|
1657
2055
|
},
|
|
1658
2056
|
option2.value
|
|
@@ -1660,81 +2058,259 @@ var Combobox = /* @__PURE__ */ (0, import_react20.forwardRef)(function Combobox2
|
|
|
1660
2058
|
);
|
|
1661
2059
|
})
|
|
1662
2060
|
}
|
|
1663
|
-
) : /* @__PURE__ */ (0,
|
|
2061
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: empty, role: "status", children: emptyMessage })
|
|
1664
2062
|
}
|
|
1665
2063
|
) })
|
|
1666
2064
|
] }),
|
|
1667
|
-
name && /* @__PURE__ */ (0,
|
|
1668
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
2065
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("input", { type: "hidden", name, value: selectedValue ?? "" }),
|
|
2066
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
1669
2067
|
] });
|
|
1670
2068
|
});
|
|
1671
2069
|
|
|
2070
|
+
// src/components/DatePicker/DatePicker.tsx
|
|
2071
|
+
var import_react27 = require("react");
|
|
2072
|
+
var import_icons12 = require("@bestow-ui/icons");
|
|
2073
|
+
|
|
2074
|
+
// src/components/Popover/Popover.tsx
|
|
2075
|
+
var RadixPopover = __toESM(require("@radix-ui/react-popover"), 1);
|
|
2076
|
+
var import_icons11 = require("@bestow-ui/icons");
|
|
2077
|
+
var import_react26 = require("react");
|
|
2078
|
+
|
|
2079
|
+
// src/components/Popover/Popover.css.ts
|
|
2080
|
+
var arrow = "_1j99p8x4";
|
|
2081
|
+
var closeButton3 = "_1j99p8x3";
|
|
2082
|
+
var content7 = "_1j99p8x0";
|
|
2083
|
+
var header5 = "_1j99p8x1";
|
|
2084
|
+
var title3 = "_1j99p8x2";
|
|
2085
|
+
|
|
2086
|
+
// src/components/Popover/Popover.tsx
|
|
2087
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2088
|
+
function Popover2({
|
|
2089
|
+
content: content12,
|
|
2090
|
+
children,
|
|
2091
|
+
title: title6,
|
|
2092
|
+
"aria-label": ariaLabel,
|
|
2093
|
+
showClose = false,
|
|
2094
|
+
showArrow = false,
|
|
2095
|
+
side = "bottom",
|
|
2096
|
+
align = "center",
|
|
2097
|
+
open,
|
|
2098
|
+
defaultOpen,
|
|
2099
|
+
onOpenChange,
|
|
2100
|
+
modal,
|
|
2101
|
+
className,
|
|
2102
|
+
style,
|
|
2103
|
+
onOpenAutoFocus
|
|
2104
|
+
}) {
|
|
2105
|
+
const portal2 = usePortalProps();
|
|
2106
|
+
const m = useMessages();
|
|
2107
|
+
const titleId = (0, import_react26.useId)();
|
|
2108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(RadixPopover.Root, { open, defaultOpen, onOpenChange, modal, children: [
|
|
2109
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(RadixPopover.Trigger, { asChild: true, children }),
|
|
2110
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(RadixPopover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2111
|
+
RadixPopover.Content,
|
|
2112
|
+
{
|
|
2113
|
+
side,
|
|
2114
|
+
align,
|
|
2115
|
+
sideOffset: 6,
|
|
2116
|
+
onOpenAutoFocus,
|
|
2117
|
+
collisionPadding: 8,
|
|
2118
|
+
"aria-labelledby": title6 ? titleId : void 0,
|
|
2119
|
+
"aria-label": title6 ? void 0 : ariaLabel,
|
|
2120
|
+
className: cx(portal2.className, content7, className),
|
|
2121
|
+
style: { ...portal2.style, ...style },
|
|
2122
|
+
children: [
|
|
2123
|
+
(title6 || showClose) && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: header5, children: [
|
|
2124
|
+
title6 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h2", { id: titleId, className: title3, children: title6 }),
|
|
2125
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(RadixPopover.Close, { className: closeButton3, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons11.XIcon, { size: 16 }) })
|
|
2126
|
+
] }),
|
|
2127
|
+
content12,
|
|
2128
|
+
showArrow && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(RadixPopover.Arrow, { className: arrow, width: 12, height: 6 })
|
|
2129
|
+
]
|
|
2130
|
+
}
|
|
2131
|
+
) })
|
|
2132
|
+
] });
|
|
2133
|
+
}
|
|
2134
|
+
var PopoverClose = RadixPopover.Close;
|
|
2135
|
+
|
|
2136
|
+
// src/components/DatePicker/DatePicker.tsx
|
|
2137
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2138
|
+
var sanitize2 = (input5) => input5.replace(/\D/g, "").slice(0, 8);
|
|
2139
|
+
var format = (digits) => digits.length <= 4 ? digits : digits.length <= 6 ? `${digits.slice(0, 4)}-${digits.slice(4)}` : `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}`;
|
|
2140
|
+
var isDigit3 = (char) => /\d/.test(char);
|
|
2141
|
+
var DatePicker = /* @__PURE__ */ (0, import_react27.forwardRef)(
|
|
2142
|
+
function DatePicker2(props, ref) {
|
|
2143
|
+
const {
|
|
2144
|
+
value: value4,
|
|
2145
|
+
defaultValue,
|
|
2146
|
+
onValueChange,
|
|
2147
|
+
min,
|
|
2148
|
+
max,
|
|
2149
|
+
isDateDisabled,
|
|
2150
|
+
isHoliday,
|
|
2151
|
+
today,
|
|
2152
|
+
label: labelProp,
|
|
2153
|
+
helperText: helperText3,
|
|
2154
|
+
error,
|
|
2155
|
+
required,
|
|
2156
|
+
disabled,
|
|
2157
|
+
fullWidth,
|
|
2158
|
+
placeholder = "YYYY-MM-DD",
|
|
2159
|
+
calendarLabel: calendarLabelProp,
|
|
2160
|
+
invalidText: invalidTextProp,
|
|
2161
|
+
unavailableText: unavailableTextProp,
|
|
2162
|
+
incompleteText: incompleteTextProp,
|
|
2163
|
+
name,
|
|
2164
|
+
id,
|
|
2165
|
+
className
|
|
2166
|
+
} = props;
|
|
2167
|
+
const inputRef = (0, import_react27.useRef)(null);
|
|
2168
|
+
const m = useMessages();
|
|
2169
|
+
const label6 = labelProp ?? m.date ?? "\uB0A0\uC9DC";
|
|
2170
|
+
const calendarLabel = calendarLabelProp ?? m.openCalendar ?? "\uB2EC\uB825 \uC5F4\uAE30";
|
|
2171
|
+
const invalidText = invalidTextProp ?? m.dateInvalid ?? "\uC62C\uBC14\uB978 \uB0A0\uC9DC\uAC00 \uC544\uB2C8\uC5D0\uC694.";
|
|
2172
|
+
const unavailableText = unavailableTextProp ?? m.dateUnavailable ?? "\uACE0\uB97C \uC218 \uC5C6\uB294 \uB0A0\uC9DC\uC608\uC694.";
|
|
2173
|
+
const incompleteText = incompleteTextProp ?? m.dateIncomplete ?? "\uB0A0\uC9DC\uB97C YYYY-MM-DD \uD615\uC2DD\uC73C\uB85C \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
|
|
2174
|
+
const [open, setOpen] = (0, import_react27.useState)(false);
|
|
2175
|
+
const [touched, setTouched] = (0, import_react27.useState)(false);
|
|
2176
|
+
const isControlled = "value" in props;
|
|
2177
|
+
const lastEmitted = (0, import_react27.useRef)(isControlled ? value4 ?? "" : defaultValue ?? "");
|
|
2178
|
+
const minDate = parseISODate(min);
|
|
2179
|
+
const maxDate = parseISODate(max);
|
|
2180
|
+
const toIso = (digits) => digits.length === 8 ? `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}` : "";
|
|
2181
|
+
const isUnavailable = (date2) => minDate !== null && compareDays(date2, minDate) < 0 || maxDate !== null && compareDays(date2, maxDate) > 0 || !!isDateDisabled?.(date2);
|
|
2182
|
+
const emit = (iso) => {
|
|
2183
|
+
if (iso === lastEmitted.current) return;
|
|
2184
|
+
lastEmitted.current = iso;
|
|
2185
|
+
onValueChange?.(iso);
|
|
2186
|
+
};
|
|
2187
|
+
const field3 = useFormattedInput({
|
|
2188
|
+
isControlled: false,
|
|
2189
|
+
value: void 0,
|
|
2190
|
+
defaultValue: (isControlled ? value4 : defaultValue)?.replace(/\D/g, ""),
|
|
2191
|
+
onValueChange: (digits) => {
|
|
2192
|
+
const date2 = parseISODate(toIso(digits));
|
|
2193
|
+
emit(date2 && !isUnavailable(date2) ? toIso(digits) : "");
|
|
2194
|
+
},
|
|
2195
|
+
sanitize: sanitize2,
|
|
2196
|
+
format,
|
|
2197
|
+
isMeaningful: isDigit3,
|
|
2198
|
+
inputRef
|
|
2199
|
+
});
|
|
2200
|
+
const textIso = toIso(field3.raw);
|
|
2201
|
+
const { setRaw } = field3;
|
|
2202
|
+
(0, import_react27.useEffect)(() => {
|
|
2203
|
+
if (!isControlled) return;
|
|
2204
|
+
const next = value4 ?? "";
|
|
2205
|
+
lastEmitted.current = next;
|
|
2206
|
+
if (next === textIso) return;
|
|
2207
|
+
const textDate = parseISODate(textIso);
|
|
2208
|
+
const textIsValid = textDate !== null && !isUnavailable(textDate);
|
|
2209
|
+
if (next === "" && !textIsValid) return;
|
|
2210
|
+
setRaw(next.replace(/\D/g, ""));
|
|
2211
|
+
}, [value4]);
|
|
2212
|
+
const date = parseISODate(textIso);
|
|
2213
|
+
const complete = field3.raw.length === 8;
|
|
2214
|
+
const autoError = complete ? !date ? invalidText : isUnavailable(date) ? unavailableText : null : touched && field3.raw.length > 0 ? incompleteText : null;
|
|
2215
|
+
const showAuto = autoError !== null && error === void 0;
|
|
2216
|
+
const selectedIso = date && !isUnavailable(date) ? textIso : "";
|
|
2217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
2218
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2219
|
+
TextField,
|
|
2220
|
+
{
|
|
2221
|
+
ref: mergeRefs(ref, inputRef),
|
|
2222
|
+
id,
|
|
2223
|
+
label: label6,
|
|
2224
|
+
placeholder,
|
|
2225
|
+
inputMode: "numeric",
|
|
2226
|
+
autoComplete: "off",
|
|
2227
|
+
value: field3.display,
|
|
2228
|
+
onChange: field3.onChange,
|
|
2229
|
+
onKeyDown: field3.onKeyDown,
|
|
2230
|
+
onBlur: () => setTouched(true),
|
|
2231
|
+
error: error ?? autoError !== null,
|
|
2232
|
+
helperText: showAuto ? autoError : helperText3,
|
|
2233
|
+
required,
|
|
2234
|
+
disabled,
|
|
2235
|
+
fullWidth,
|
|
2236
|
+
rootClassName: className,
|
|
2237
|
+
endAdornment: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2238
|
+
Popover2,
|
|
2239
|
+
{
|
|
2240
|
+
open,
|
|
2241
|
+
onOpenChange: setOpen,
|
|
2242
|
+
modal: true,
|
|
2243
|
+
align: "end",
|
|
2244
|
+
"aria-label": m.calendar ?? "\uB2EC\uB825",
|
|
2245
|
+
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
2246
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2247
|
+
Calendar,
|
|
2248
|
+
{
|
|
2249
|
+
value: selectedIso,
|
|
2250
|
+
onValueChange: (iso) => {
|
|
2251
|
+
setRaw(iso.replace(/\D/g, ""));
|
|
2252
|
+
emit(iso);
|
|
2253
|
+
setOpen(false);
|
|
2254
|
+
},
|
|
2255
|
+
min,
|
|
2256
|
+
max,
|
|
2257
|
+
isDateDisabled,
|
|
2258
|
+
isHoliday,
|
|
2259
|
+
today,
|
|
2260
|
+
initialFocus: true
|
|
2261
|
+
}
|
|
2262
|
+
),
|
|
2263
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconButton, { "aria-label": calendarLabel, size: "sm", disabled, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons12.CalendarIcon, {}) })
|
|
2264
|
+
}
|
|
2265
|
+
)
|
|
2266
|
+
}
|
|
2267
|
+
),
|
|
2268
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { type: "hidden", name, value: selectedIso })
|
|
2269
|
+
] });
|
|
2270
|
+
}
|
|
2271
|
+
);
|
|
2272
|
+
|
|
1672
2273
|
// src/components/Divider/Divider.tsx
|
|
1673
|
-
var
|
|
2274
|
+
var import_react28 = require("react");
|
|
1674
2275
|
|
|
1675
2276
|
// src/components/Divider/Divider.css.ts
|
|
1676
|
-
var
|
|
1677
|
-
var divider = /* @__PURE__ */ (0,
|
|
2277
|
+
var import_createRuntimeFn12 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
2278
|
+
var divider = /* @__PURE__ */ (0, import_createRuntimeFn12.createRuntimeFn)({ defaultClassName: "_1t3gq8v0", variantClassNames: { orientation: { horizontal: "_1t3gq8v1", vertical: "_1t3gq8v2" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
|
|
1678
2279
|
var labeled = "_1t3gq8v3";
|
|
1679
2280
|
var line = "_1t3gq8v4";
|
|
1680
2281
|
|
|
1681
2282
|
// src/components/Divider/Divider.tsx
|
|
1682
|
-
var
|
|
1683
|
-
var Divider = /* @__PURE__ */ (0,
|
|
2283
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2284
|
+
var Divider = /* @__PURE__ */ (0, import_react28.forwardRef)(function Divider2({ orientation = "horizontal", decorative, className, children, ...rest }, ref) {
|
|
1684
2285
|
if (children && orientation === "horizontal") {
|
|
1685
|
-
return /* @__PURE__ */ (0,
|
|
1686
|
-
/* @__PURE__ */ (0,
|
|
2286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref, className: cx(labeled, className), ...rest, children: [
|
|
2287
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: line, "aria-hidden": true }),
|
|
1687
2288
|
children,
|
|
1688
|
-
/* @__PURE__ */ (0,
|
|
2289
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: line, "aria-hidden": true })
|
|
1689
2290
|
] });
|
|
1690
2291
|
}
|
|
1691
2292
|
const a11y = decorative ? { role: "none" } : { role: "separator", "aria-orientation": orientation === "vertical" ? "vertical" : void 0 };
|
|
1692
|
-
return /* @__PURE__ */ (0,
|
|
2293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref, className: cx(divider({ orientation }), className), ...a11y, ...rest });
|
|
1693
2294
|
});
|
|
1694
2295
|
|
|
1695
2296
|
// src/components/Drawer/Drawer.tsx
|
|
1696
2297
|
var Dialog2 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1697
|
-
var
|
|
1698
|
-
|
|
1699
|
-
// src/components/IconButton/IconButton.tsx
|
|
1700
|
-
var import_react22 = require("react");
|
|
1701
|
-
|
|
1702
|
-
// src/components/IconButton/IconButton.css.ts
|
|
1703
|
-
var import_createRuntimeFn12 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
1704
|
-
var iconButton = /* @__PURE__ */ (0, import_createRuntimeFn12.createRuntimeFn)({ defaultClassName: "ip9et20", variantClassNames: { size: { sm: "ip9et21", md: "ip9et22", lg: "ip9et23" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
1705
|
-
|
|
1706
|
-
// src/components/IconButton/IconButton.tsx
|
|
1707
|
-
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1708
|
-
var IconButton = /* @__PURE__ */ (0, import_react22.forwardRef)(function IconButton2({ variant = "ghost", color = "neutral", size, loading: loading2, className, children, ...rest }, ref) {
|
|
1709
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1710
|
-
Button,
|
|
1711
|
-
{
|
|
1712
|
-
ref,
|
|
1713
|
-
variant,
|
|
1714
|
-
color,
|
|
1715
|
-
size,
|
|
1716
|
-
loading: loading2,
|
|
1717
|
-
className: cx(iconButton({ size }), className),
|
|
1718
|
-
...rest,
|
|
1719
|
-
children: !loading2 && children
|
|
1720
|
-
}
|
|
1721
|
-
);
|
|
1722
|
-
});
|
|
2298
|
+
var import_icons13 = require("@bestow-ui/icons");
|
|
1723
2299
|
|
|
1724
2300
|
// src/components/Drawer/Drawer.css.ts
|
|
1725
2301
|
var import_createRuntimeFn13 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
1726
2302
|
var body3 = "nmobyvy";
|
|
1727
|
-
var
|
|
1728
|
-
var
|
|
2303
|
+
var closeButton4 = "nmobyvx";
|
|
2304
|
+
var content8 = /* @__PURE__ */ (0, import_createRuntimeFn13.createRuntimeFn)({ defaultClassName: "nmobyv9", variantClassNames: { side: { right: "nmobyva", left: "nmobyvb", top: "nmobyvc", bottom: "nmobyvd" }, size: { sm: "nmobyve", md: "nmobyvf", lg: "nmobyvg" } }, defaultVariants: { side: "right", size: "md" }, compoundVariants: [[{ side: "right", size: "sm" }, "nmobyvh"], [{ side: "right", size: "md" }, "nmobyvi"], [{ side: "right", size: "lg" }, "nmobyvj"], [{ side: "left", size: "sm" }, "nmobyvk"], [{ side: "left", size: "md" }, "nmobyvl"], [{ side: "left", size: "lg" }, "nmobyvm"], [{ side: "top", size: "sm" }, "nmobyvn"], [{ side: "top", size: "md" }, "nmobyvo"], [{ side: "top", size: "lg" }, "nmobyvp"], [{ side: "bottom", size: "sm" }, "nmobyvq"], [{ side: "bottom", size: "md" }, "nmobyvr"], [{ side: "bottom", size: "lg" }, "nmobyvs"]] });
|
|
1729
2305
|
var description3 = "nmobyvw";
|
|
1730
2306
|
var footer3 = "nmobyvz";
|
|
1731
|
-
var
|
|
2307
|
+
var header6 = "nmobyvt";
|
|
1732
2308
|
var headings2 = "nmobyvu";
|
|
1733
2309
|
var overlay2 = "nmobyv0";
|
|
1734
|
-
var
|
|
2310
|
+
var title4 = "nmobyvv";
|
|
1735
2311
|
|
|
1736
2312
|
// src/components/Drawer/Drawer.tsx
|
|
1737
|
-
var
|
|
2313
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1738
2314
|
function Drawer({
|
|
1739
2315
|
open,
|
|
1740
2316
|
defaultOpen,
|
|
@@ -1751,15 +2327,16 @@ function Drawer({
|
|
|
1751
2327
|
className
|
|
1752
2328
|
}) {
|
|
1753
2329
|
const portal2 = usePortalProps();
|
|
2330
|
+
const m = useMessages();
|
|
1754
2331
|
const focus = useReturnFocus(Boolean(trigger4));
|
|
1755
|
-
return /* @__PURE__ */ (0,
|
|
1756
|
-
trigger4 && /* @__PURE__ */ (0,
|
|
1757
|
-
/* @__PURE__ */ (0,
|
|
1758
|
-
/* @__PURE__ */ (0,
|
|
1759
|
-
/* @__PURE__ */ (0,
|
|
2332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Dialog2.Root, { open, defaultOpen, onOpenChange, children: [
|
|
2333
|
+
trigger4 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Dialog2.Trigger, { asChild: true, children: trigger4 }),
|
|
2334
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Dialog2.Portal, { children: [
|
|
2335
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Dialog2.Overlay, { className: cx(portal2.className, overlay2), style: portal2.style }),
|
|
2336
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1760
2337
|
Dialog2.Content,
|
|
1761
2338
|
{
|
|
1762
|
-
className: cx(portal2.className,
|
|
2339
|
+
className: cx(portal2.className, content8({ side, size }), className),
|
|
1763
2340
|
style: portal2.style,
|
|
1764
2341
|
"data-side": side ?? "right",
|
|
1765
2342
|
onPointerDownOutside: closeOnOverlayClick ? void 0 : (event) => event.preventDefault(),
|
|
@@ -1767,15 +2344,15 @@ function Drawer({
|
|
|
1767
2344
|
onCloseAutoFocus: focus.onCloseAutoFocus,
|
|
1768
2345
|
...description6 ? {} : { "aria-describedby": void 0 },
|
|
1769
2346
|
children: [
|
|
1770
|
-
/* @__PURE__ */ (0,
|
|
1771
|
-
/* @__PURE__ */ (0,
|
|
1772
|
-
/* @__PURE__ */ (0,
|
|
1773
|
-
description6 && /* @__PURE__ */ (0,
|
|
2347
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: header6, children: [
|
|
2348
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: headings2, children: [
|
|
2349
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Dialog2.Title, { className: title4, children: title6 }),
|
|
2350
|
+
description6 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Dialog2.Description, { className: description3, children: description6 })
|
|
1774
2351
|
] }),
|
|
1775
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
2352
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(IconButton, { "aria-label": m.close ?? "\uB2EB\uAE30", size: "sm", className: closeButton4, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_icons13.XIcon, {}) }) })
|
|
1776
2353
|
] }),
|
|
1777
|
-
children && /* @__PURE__ */ (0,
|
|
1778
|
-
footer6 && /* @__PURE__ */ (0,
|
|
2354
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: body3, children }),
|
|
2355
|
+
footer6 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: footer3, children: footer6 })
|
|
1779
2356
|
]
|
|
1780
2357
|
}
|
|
1781
2358
|
)
|
|
@@ -1786,10 +2363,10 @@ var DrawerClose = Dialog2.Close;
|
|
|
1786
2363
|
|
|
1787
2364
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1788
2365
|
var RadixMenu = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
1789
|
-
var
|
|
2366
|
+
var import_react29 = require("react");
|
|
1790
2367
|
|
|
1791
2368
|
// src/components/DropdownMenu/DropdownMenu.css.ts
|
|
1792
|
-
var
|
|
2369
|
+
var content9 = "_1d7ahux0";
|
|
1793
2370
|
var danger = "_1d7ahux2";
|
|
1794
2371
|
var icon5 = "_1d7ahux3";
|
|
1795
2372
|
var item5 = "_1d7ahux1";
|
|
@@ -1798,14 +2375,14 @@ var separator2 = "_1d7ahux6";
|
|
|
1798
2375
|
var shortcut = "_1d7ahux4";
|
|
1799
2376
|
|
|
1800
2377
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1801
|
-
var
|
|
2378
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1802
2379
|
var DropdownMenu = RadixMenu.Root;
|
|
1803
2380
|
var DropdownMenuTrigger = RadixMenu.Trigger;
|
|
1804
2381
|
var DropdownMenuGroup = RadixMenu.Group;
|
|
1805
|
-
var DropdownMenuContent = /* @__PURE__ */ (0,
|
|
2382
|
+
var DropdownMenuContent = /* @__PURE__ */ (0, import_react29.forwardRef)(
|
|
1806
2383
|
function DropdownMenuContent2({ className, style, side = "bottom", align = "start", sideOffset = 4, collisionPadding = 8, ...rest }, ref) {
|
|
1807
2384
|
const portal2 = usePortalProps();
|
|
1808
|
-
return /* @__PURE__ */ (0,
|
|
2385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadixMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1809
2386
|
RadixMenu.Content,
|
|
1810
2387
|
{
|
|
1811
2388
|
ref,
|
|
@@ -1813,36 +2390,36 @@ var DropdownMenuContent = /* @__PURE__ */ (0, import_react23.forwardRef)(
|
|
|
1813
2390
|
align,
|
|
1814
2391
|
sideOffset,
|
|
1815
2392
|
collisionPadding,
|
|
1816
|
-
className: cx(portal2.className,
|
|
2393
|
+
className: cx(portal2.className, content9, className),
|
|
1817
2394
|
style: { ...portal2.style, ...style },
|
|
1818
2395
|
...rest
|
|
1819
2396
|
}
|
|
1820
2397
|
) });
|
|
1821
2398
|
}
|
|
1822
2399
|
);
|
|
1823
|
-
var DropdownMenuItem = /* @__PURE__ */ (0,
|
|
1824
|
-
function DropdownMenuItem2({ icon: icon6, shortcut: shortcut2, color = "
|
|
1825
|
-
return /* @__PURE__ */ (0,
|
|
1826
|
-
icon6 && /* @__PURE__ */ (0,
|
|
2400
|
+
var DropdownMenuItem = /* @__PURE__ */ (0, import_react29.forwardRef)(
|
|
2401
|
+
function DropdownMenuItem2({ icon: icon6, shortcut: shortcut2, color = "neutral", className, children, ...rest }, ref) {
|
|
2402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(RadixMenu.Item, { ref, className: cx(item5, color === "danger" && danger, className), ...rest, children: [
|
|
2403
|
+
icon6 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: icon5, "aria-hidden": true, children: icon6 }),
|
|
1827
2404
|
children,
|
|
1828
|
-
shortcut2 && /* @__PURE__ */ (0,
|
|
2405
|
+
shortcut2 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: shortcut, "aria-hidden": true, children: shortcut2 })
|
|
1829
2406
|
] });
|
|
1830
2407
|
}
|
|
1831
2408
|
);
|
|
1832
|
-
var DropdownMenuLabel = /* @__PURE__ */ (0,
|
|
2409
|
+
var DropdownMenuLabel = /* @__PURE__ */ (0, import_react29.forwardRef)(
|
|
1833
2410
|
function DropdownMenuLabel2({ className, ...rest }, ref) {
|
|
1834
|
-
return /* @__PURE__ */ (0,
|
|
2411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadixMenu.Label, { ref, className: cx(label2, className), ...rest });
|
|
1835
2412
|
}
|
|
1836
2413
|
);
|
|
1837
|
-
var DropdownMenuSeparator = /* @__PURE__ */ (0,
|
|
2414
|
+
var DropdownMenuSeparator = /* @__PURE__ */ (0, import_react29.forwardRef)(
|
|
1838
2415
|
function DropdownMenuSeparator2({ className, ...rest }, ref) {
|
|
1839
|
-
return /* @__PURE__ */ (0,
|
|
2416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadixMenu.Separator, { ref, className: cx(separator2, className), ...rest });
|
|
1840
2417
|
}
|
|
1841
2418
|
);
|
|
1842
2419
|
|
|
1843
2420
|
// src/components/Pagination/Pagination.tsx
|
|
1844
|
-
var
|
|
1845
|
-
var
|
|
2421
|
+
var import_icons14 = require("@bestow-ui/icons");
|
|
2422
|
+
var import_react30 = require("react");
|
|
1846
2423
|
|
|
1847
2424
|
// src/components/Pagination/getPaginationItems.ts
|
|
1848
2425
|
var range = (start, end) => end < start ? [] : Array.from({ length: end - start + 1 }, (_, i) => start + i);
|
|
@@ -1875,9 +2452,8 @@ var item6 = /* @__PURE__ */ (0, import_createRuntimeFn14.createRuntimeFn)({ defa
|
|
|
1875
2452
|
var list3 = "_1iraoak0";
|
|
1876
2453
|
|
|
1877
2454
|
// src/components/Pagination/Pagination.tsx
|
|
1878
|
-
var
|
|
1879
|
-
var
|
|
1880
|
-
var Pagination = /* @__PURE__ */ (0, import_react24.forwardRef)(function Pagination2({
|
|
2455
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2456
|
+
var Pagination = /* @__PURE__ */ (0, import_react30.forwardRef)(function Pagination2({
|
|
1881
2457
|
totalPages,
|
|
1882
2458
|
page: pageProp,
|
|
1883
2459
|
defaultPage = 1,
|
|
@@ -1885,12 +2461,15 @@ var Pagination = /* @__PURE__ */ (0, import_react24.forwardRef)(function Paginat
|
|
|
1885
2461
|
siblingCount = 1,
|
|
1886
2462
|
boundaryCount = 1,
|
|
1887
2463
|
size,
|
|
1888
|
-
getItemLabel
|
|
2464
|
+
getItemLabel: getItemLabelProp,
|
|
1889
2465
|
className,
|
|
1890
|
-
"aria-label":
|
|
2466
|
+
"aria-label": ariaLabelProp,
|
|
1891
2467
|
...rest
|
|
1892
2468
|
}, ref) {
|
|
1893
|
-
const [uncontrolledPage, setUncontrolledPage] = (0,
|
|
2469
|
+
const [uncontrolledPage, setUncontrolledPage] = (0, import_react30.useState)(defaultPage);
|
|
2470
|
+
const m = useMessages();
|
|
2471
|
+
const ariaLabel = ariaLabelProp ?? m.pagination ?? "\uD398\uC774\uC9C0 \uD0D0\uC0C9";
|
|
2472
|
+
const getItemLabel = getItemLabelProp ?? ((type, n) => type === "previous" ? m.paginationPrevious ?? "\uC774\uC804 \uD398\uC774\uC9C0" : type === "next" ? m.paginationNext ?? "\uB2E4\uC74C \uD398\uC774\uC9C0" : m.paginationPage?.(n) ?? `${n} \uD398\uC774\uC9C0`);
|
|
1894
2473
|
if (totalPages < 1) return null;
|
|
1895
2474
|
const page = Math.min(Math.max(pageProp ?? uncontrolledPage, 1), totalPages);
|
|
1896
2475
|
const goTo = (next) => {
|
|
@@ -1899,8 +2478,8 @@ var Pagination = /* @__PURE__ */ (0, import_react24.forwardRef)(function Paginat
|
|
|
1899
2478
|
onPageChange?.(next);
|
|
1900
2479
|
};
|
|
1901
2480
|
const itemClass = item6({ size });
|
|
1902
|
-
return /* @__PURE__ */ (0,
|
|
1903
|
-
/* @__PURE__ */ (0,
|
|
2481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("ul", { className: list3, children: [
|
|
2482
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1904
2483
|
"button",
|
|
1905
2484
|
{
|
|
1906
2485
|
type: "button",
|
|
@@ -1908,11 +2487,11 @@ var Pagination = /* @__PURE__ */ (0, import_react24.forwardRef)(function Paginat
|
|
|
1908
2487
|
"aria-label": getItemLabel("previous", page - 1),
|
|
1909
2488
|
disabled: page <= 1,
|
|
1910
2489
|
onClick: () => goTo(page - 1),
|
|
1911
|
-
children: /* @__PURE__ */ (0,
|
|
2490
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_icons14.ChevronLeftIcon, { size: 16 })
|
|
1912
2491
|
}
|
|
1913
2492
|
) }),
|
|
1914
2493
|
getPaginationItems(page, totalPages, siblingCount, boundaryCount).map(
|
|
1915
|
-
(item7) => typeof item7 === "number" ? /* @__PURE__ */ (0,
|
|
2494
|
+
(item7) => typeof item7 === "number" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1916
2495
|
"button",
|
|
1917
2496
|
{
|
|
1918
2497
|
type: "button",
|
|
@@ -1922,9 +2501,9 @@ var Pagination = /* @__PURE__ */ (0, import_react24.forwardRef)(function Paginat
|
|
|
1922
2501
|
onClick: () => goTo(item7),
|
|
1923
2502
|
children: item7
|
|
1924
2503
|
}
|
|
1925
|
-
) }, item7) : /* @__PURE__ */ (0,
|
|
2504
|
+
) }, item7) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("li", { "aria-hidden": true, className: cx(itemClass, ellipsis), children: "\u2026" }, item7)
|
|
1926
2505
|
),
|
|
1927
|
-
/* @__PURE__ */ (0,
|
|
2506
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1928
2507
|
"button",
|
|
1929
2508
|
{
|
|
1930
2509
|
type: "button",
|
|
@@ -1932,43 +2511,45 @@ var Pagination = /* @__PURE__ */ (0, import_react24.forwardRef)(function Paginat
|
|
|
1932
2511
|
"aria-label": getItemLabel("next", page + 1),
|
|
1933
2512
|
disabled: page >= totalPages,
|
|
1934
2513
|
onClick: () => goTo(page + 1),
|
|
1935
|
-
children: /* @__PURE__ */ (0,
|
|
2514
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_icons14.ChevronRightIcon, { size: 16 })
|
|
1936
2515
|
}
|
|
1937
2516
|
) })
|
|
1938
2517
|
] }) });
|
|
1939
2518
|
});
|
|
1940
2519
|
|
|
1941
2520
|
// src/components/PhoneNumberInput/PhoneNumberInput.tsx
|
|
1942
|
-
var
|
|
1943
|
-
var
|
|
1944
|
-
var
|
|
2521
|
+
var import_react31 = require("react");
|
|
2522
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2523
|
+
var sanitize3 = (input5) => {
|
|
1945
2524
|
const digits = input5.replace(/\D/g, "");
|
|
1946
2525
|
return digits.slice(0, phoneNumberMaxDigits(digits));
|
|
1947
2526
|
};
|
|
1948
|
-
var
|
|
1949
|
-
var PhoneNumberInput = /* @__PURE__ */ (0,
|
|
2527
|
+
var isDigit4 = (char) => /\d/.test(char);
|
|
2528
|
+
var PhoneNumberInput = /* @__PURE__ */ (0, import_react31.forwardRef)(
|
|
1950
2529
|
function PhoneNumberInput2(props, ref) {
|
|
1951
2530
|
const {
|
|
1952
2531
|
value: value4,
|
|
1953
2532
|
defaultValue,
|
|
1954
2533
|
onValueChange,
|
|
1955
|
-
label:
|
|
2534
|
+
label: labelProp,
|
|
1956
2535
|
placeholder = "010-0000-0000",
|
|
1957
2536
|
onKeyDown,
|
|
1958
2537
|
...rest
|
|
1959
2538
|
} = props;
|
|
1960
|
-
const inputRef = (0,
|
|
2539
|
+
const inputRef = (0, import_react31.useRef)(null);
|
|
2540
|
+
const m = useMessages();
|
|
2541
|
+
const label6 = labelProp ?? m.phoneNumber ?? "\uD734\uB300\uD3F0 \uBC88\uD638";
|
|
1961
2542
|
const field3 = useFormattedInput({
|
|
1962
2543
|
isControlled: "value" in props,
|
|
1963
2544
|
value: value4,
|
|
1964
2545
|
defaultValue,
|
|
1965
2546
|
onValueChange,
|
|
1966
|
-
sanitize:
|
|
2547
|
+
sanitize: sanitize3,
|
|
1967
2548
|
format: formatPhoneNumber,
|
|
1968
|
-
isMeaningful:
|
|
2549
|
+
isMeaningful: isDigit4,
|
|
1969
2550
|
inputRef
|
|
1970
2551
|
});
|
|
1971
|
-
return /* @__PURE__ */ (0,
|
|
2552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1972
2553
|
TextField,
|
|
1973
2554
|
{
|
|
1974
2555
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -1989,81 +2570,22 @@ var PhoneNumberInput = /* @__PURE__ */ (0, import_react25.forwardRef)(
|
|
|
1989
2570
|
}
|
|
1990
2571
|
);
|
|
1991
2572
|
|
|
1992
|
-
// src/components/Popover/Popover.tsx
|
|
1993
|
-
var RadixPopover = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1994
|
-
var import_icons12 = require("@bestow-ui/icons");
|
|
1995
|
-
var import_react26 = require("react");
|
|
1996
|
-
|
|
1997
|
-
// src/components/Popover/Popover.css.ts
|
|
1998
|
-
var arrow = "_1j99p8x4";
|
|
1999
|
-
var closeButton4 = "_1j99p8x3";
|
|
2000
|
-
var content9 = "_1j99p8x0";
|
|
2001
|
-
var header5 = "_1j99p8x1";
|
|
2002
|
-
var title4 = "_1j99p8x2";
|
|
2003
|
-
|
|
2004
|
-
// src/components/Popover/Popover.tsx
|
|
2005
|
-
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2006
|
-
function Popover2({
|
|
2007
|
-
content: content12,
|
|
2008
|
-
children,
|
|
2009
|
-
title: title6,
|
|
2010
|
-
"aria-label": ariaLabel,
|
|
2011
|
-
showClose = false,
|
|
2012
|
-
showArrow = false,
|
|
2013
|
-
side = "bottom",
|
|
2014
|
-
align = "center",
|
|
2015
|
-
open,
|
|
2016
|
-
defaultOpen,
|
|
2017
|
-
onOpenChange,
|
|
2018
|
-
modal,
|
|
2019
|
-
className,
|
|
2020
|
-
style
|
|
2021
|
-
}) {
|
|
2022
|
-
const portal2 = usePortalProps();
|
|
2023
|
-
const titleId = (0, import_react26.useId)();
|
|
2024
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(RadixPopover.Root, { open, defaultOpen, onOpenChange, modal, children: [
|
|
2025
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RadixPopover.Trigger, { asChild: true, children }),
|
|
2026
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RadixPopover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2027
|
-
RadixPopover.Content,
|
|
2028
|
-
{
|
|
2029
|
-
side,
|
|
2030
|
-
align,
|
|
2031
|
-
sideOffset: 6,
|
|
2032
|
-
collisionPadding: 8,
|
|
2033
|
-
"aria-labelledby": title6 ? titleId : void 0,
|
|
2034
|
-
"aria-label": title6 ? void 0 : ariaLabel,
|
|
2035
|
-
className: cx(portal2.className, content9, className),
|
|
2036
|
-
style: { ...portal2.style, ...style },
|
|
2037
|
-
children: [
|
|
2038
|
-
(title6 || showClose) && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: header5, children: [
|
|
2039
|
-
title6 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h2", { id: titleId, className: title4, children: title6 }),
|
|
2040
|
-
showClose && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RadixPopover.Close, { className: closeButton4, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_icons12.XIcon, { size: 16 }) })
|
|
2041
|
-
] }),
|
|
2042
|
-
content12,
|
|
2043
|
-
showArrow && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RadixPopover.Arrow, { className: arrow, width: 12, height: 6 })
|
|
2044
|
-
]
|
|
2045
|
-
}
|
|
2046
|
-
) })
|
|
2047
|
-
] });
|
|
2048
|
-
}
|
|
2049
|
-
var PopoverClose = RadixPopover.Close;
|
|
2050
|
-
|
|
2051
2573
|
// src/components/Progress/Progress.tsx
|
|
2052
|
-
var
|
|
2574
|
+
var import_react32 = require("react");
|
|
2053
2575
|
|
|
2054
2576
|
// src/components/Progress/Progress.css.ts
|
|
2055
2577
|
var import_createRuntimeFn15 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
2056
|
-
var
|
|
2578
|
+
var header7 = "_1tvkq001";
|
|
2057
2579
|
var indicator = /* @__PURE__ */ (0, import_createRuntimeFn15.createRuntimeFn)({ defaultClassName: "_1tvkq008", variantClassNames: { color: { primary: "_1tvkq009", neutral: "_1tvkq00a", success: "_1tvkq00b", warning: "_1tvkq00c", danger: "_1tvkq00d" } }, defaultVariants: { color: "primary" }, compoundVariants: [] });
|
|
2058
2580
|
var label3 = "_1tvkq002";
|
|
2059
|
-
var
|
|
2581
|
+
var root7 = "_1tvkq000";
|
|
2060
2582
|
var track = /* @__PURE__ */ (0, import_createRuntimeFn15.createRuntimeFn)({ defaultClassName: "_1tvkq004", variantClassNames: { size: { sm: "_1tvkq005", md: "_1tvkq006", lg: "_1tvkq007" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2061
2583
|
var value2 = "_1tvkq003";
|
|
2062
2584
|
|
|
2063
2585
|
// src/components/Progress/Progress.tsx
|
|
2064
|
-
var
|
|
2586
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2065
2587
|
var defaultFormat = (value4, max) => `${Math.round(value4 / max * 100)}%`;
|
|
2066
|
-
var Progress = /* @__PURE__ */ (0,
|
|
2588
|
+
var Progress = /* @__PURE__ */ (0, import_react32.forwardRef)(function Progress2({
|
|
2067
2589
|
value: value4,
|
|
2068
2590
|
max = 100,
|
|
2069
2591
|
label: label6,
|
|
@@ -2075,17 +2597,17 @@ var Progress = /* @__PURE__ */ (0, import_react27.forwardRef)(function Progress2
|
|
|
2075
2597
|
className,
|
|
2076
2598
|
...rest
|
|
2077
2599
|
}, ref) {
|
|
2078
|
-
const labelId = (0,
|
|
2600
|
+
const labelId = (0, import_react32.useId)();
|
|
2079
2601
|
const isIndeterminate = value4 === void 0 || value4 === null;
|
|
2080
2602
|
const safeMax = max > 0 ? max : 100;
|
|
2081
2603
|
const clamped = isIndeterminate ? 0 : Math.min(safeMax, Math.max(0, value4));
|
|
2082
2604
|
const valueText = isIndeterminate ? void 0 : formatValue(clamped, safeMax);
|
|
2083
|
-
return /* @__PURE__ */ (0,
|
|
2084
|
-
(label6 || showValue && valueText) && /* @__PURE__ */ (0,
|
|
2085
|
-
label6 && /* @__PURE__ */ (0,
|
|
2086
|
-
showValue && valueText && /* @__PURE__ */ (0,
|
|
2605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { ref, className: cx(root7, className), ...rest, children: [
|
|
2606
|
+
(label6 || showValue && valueText) && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: header7, children: [
|
|
2607
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { id: labelId, className: label3, children: label6 }),
|
|
2608
|
+
showValue && valueText && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: value2, "aria-hidden": true, children: valueText })
|
|
2087
2609
|
] }),
|
|
2088
|
-
/* @__PURE__ */ (0,
|
|
2610
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2089
2611
|
"div",
|
|
2090
2612
|
{
|
|
2091
2613
|
role: "progressbar",
|
|
@@ -2096,7 +2618,7 @@ var Progress = /* @__PURE__ */ (0, import_react27.forwardRef)(function Progress2
|
|
|
2096
2618
|
"aria-valuenow": isIndeterminate ? void 0 : clamped,
|
|
2097
2619
|
"aria-valuetext": valueText,
|
|
2098
2620
|
className: track({ size }),
|
|
2099
|
-
children: /* @__PURE__ */ (0,
|
|
2621
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2100
2622
|
"div",
|
|
2101
2623
|
{
|
|
2102
2624
|
className: indicator({ color }),
|
|
@@ -2111,7 +2633,7 @@ var Progress = /* @__PURE__ */ (0, import_react27.forwardRef)(function Progress2
|
|
|
2111
2633
|
|
|
2112
2634
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
2113
2635
|
var RadixRadioGroup = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
2114
|
-
var
|
|
2636
|
+
var import_react33 = require("react");
|
|
2115
2637
|
|
|
2116
2638
|
// src/components/RadioGroup/RadioGroup.css.ts
|
|
2117
2639
|
var import_createRuntimeFn16 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -2125,8 +2647,8 @@ var radio = /* @__PURE__ */ (0, import_createRuntimeFn16.createRuntimeFn)({ defa
|
|
|
2125
2647
|
var text = "_1w9iwjmb";
|
|
2126
2648
|
|
|
2127
2649
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
2128
|
-
var
|
|
2129
|
-
var RadioGroup = /* @__PURE__ */ (0,
|
|
2650
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2651
|
+
var RadioGroup = /* @__PURE__ */ (0, import_react33.forwardRef)(function RadioGroup2(props, ref) {
|
|
2130
2652
|
const {
|
|
2131
2653
|
options,
|
|
2132
2654
|
value: value4,
|
|
@@ -2145,16 +2667,16 @@ var RadioGroup = /* @__PURE__ */ (0, import_react28.forwardRef)(function RadioGr
|
|
|
2145
2667
|
className
|
|
2146
2668
|
} = props;
|
|
2147
2669
|
const isControlled = "value" in props;
|
|
2148
|
-
const generatedId = (0,
|
|
2670
|
+
const generatedId = (0, import_react33.useId)();
|
|
2149
2671
|
const baseId = id ?? generatedId;
|
|
2150
2672
|
const labelId = label6 ? `${baseId}-label` : void 0;
|
|
2151
2673
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
2152
|
-
return /* @__PURE__ */ (0,
|
|
2153
|
-
label6 && /* @__PURE__ */ (0,
|
|
2674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cx(field, className), children: [
|
|
2675
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { id: labelId, className: cx(label, groupLabel), children: [
|
|
2154
2676
|
label6,
|
|
2155
|
-
required && /* @__PURE__ */ (0,
|
|
2677
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2156
2678
|
] }),
|
|
2157
|
-
/* @__PURE__ */ (0,
|
|
2679
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2158
2680
|
RadixRadioGroup.Root,
|
|
2159
2681
|
{
|
|
2160
2682
|
ref,
|
|
@@ -2175,8 +2697,8 @@ var RadioGroup = /* @__PURE__ */ (0, import_react28.forwardRef)(function RadioGr
|
|
|
2175
2697
|
const itemId = `${baseId}-${option2.value}`;
|
|
2176
2698
|
const descriptionId = option2.description ? `${itemId}-description` : void 0;
|
|
2177
2699
|
const itemDisabled = disabled || option2.disabled;
|
|
2178
|
-
return /* @__PURE__ */ (0,
|
|
2179
|
-
/* @__PURE__ */ (0,
|
|
2700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: option({ size }), "data-disabled": itemDisabled || void 0, children: [
|
|
2701
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2180
2702
|
RadixRadioGroup.Item,
|
|
2181
2703
|
{
|
|
2182
2704
|
id: itemId,
|
|
@@ -2184,27 +2706,27 @@ var RadioGroup = /* @__PURE__ */ (0, import_react28.forwardRef)(function RadioGr
|
|
|
2184
2706
|
disabled: option2.disabled,
|
|
2185
2707
|
"aria-describedby": descriptionId,
|
|
2186
2708
|
className: radio({ size }),
|
|
2187
|
-
children: /* @__PURE__ */ (0,
|
|
2709
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(RadixRadioGroup.Indicator, { className: indicator2 })
|
|
2188
2710
|
}
|
|
2189
2711
|
),
|
|
2190
|
-
/* @__PURE__ */ (0,
|
|
2191
|
-
/* @__PURE__ */ (0,
|
|
2192
|
-
option2.description && /* @__PURE__ */ (0,
|
|
2712
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: text, children: [
|
|
2713
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: itemId, className: labelText, children: option2.label }),
|
|
2714
|
+
option2.description && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { id: descriptionId, className: description4, children: option2.description })
|
|
2193
2715
|
] })
|
|
2194
2716
|
] }, option2.value);
|
|
2195
2717
|
})
|
|
2196
2718
|
}
|
|
2197
2719
|
),
|
|
2198
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
2720
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
2199
2721
|
] });
|
|
2200
2722
|
});
|
|
2201
2723
|
|
|
2202
2724
|
// src/components/Select/Select.tsx
|
|
2203
2725
|
var RadixSelect = __toESM(require("@radix-ui/react-select"), 1);
|
|
2204
|
-
var
|
|
2205
|
-
var
|
|
2206
|
-
var
|
|
2207
|
-
var Select = /* @__PURE__ */ (0,
|
|
2726
|
+
var import_react34 = require("react");
|
|
2727
|
+
var import_icons15 = require("@bestow-ui/icons");
|
|
2728
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2729
|
+
var Select = /* @__PURE__ */ (0, import_react34.forwardRef)(function Select2(props, ref) {
|
|
2208
2730
|
const {
|
|
2209
2731
|
options,
|
|
2210
2732
|
value: value4,
|
|
@@ -2224,16 +2746,16 @@ var Select = /* @__PURE__ */ (0, import_react29.forwardRef)(function Select2(pro
|
|
|
2224
2746
|
className
|
|
2225
2747
|
} = props;
|
|
2226
2748
|
const isControlled = "value" in props;
|
|
2227
|
-
const generatedId = (0,
|
|
2749
|
+
const generatedId = (0, import_react34.useId)();
|
|
2228
2750
|
const triggerId = id ?? generatedId;
|
|
2229
2751
|
const helperId = helperText3 ? `${triggerId}-helper` : void 0;
|
|
2230
2752
|
const portal2 = usePortalProps();
|
|
2231
|
-
return /* @__PURE__ */ (0,
|
|
2232
|
-
label6 && /* @__PURE__ */ (0,
|
|
2753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
2754
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { htmlFor: triggerId, className: label, children: [
|
|
2233
2755
|
label6,
|
|
2234
|
-
required && /* @__PURE__ */ (0,
|
|
2756
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2235
2757
|
] }),
|
|
2236
|
-
/* @__PURE__ */ (0,
|
|
2758
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2237
2759
|
RadixSelect.Root,
|
|
2238
2760
|
{
|
|
2239
2761
|
value: isControlled ? value4 ?? "" : void 0,
|
|
@@ -2243,7 +2765,7 @@ var Select = /* @__PURE__ */ (0, import_react29.forwardRef)(function Select2(pro
|
|
|
2243
2765
|
required,
|
|
2244
2766
|
name,
|
|
2245
2767
|
children: [
|
|
2246
|
-
/* @__PURE__ */ (0,
|
|
2768
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2247
2769
|
RadixSelect.Trigger,
|
|
2248
2770
|
{
|
|
2249
2771
|
ref,
|
|
@@ -2254,12 +2776,12 @@ var Select = /* @__PURE__ */ (0, import_react29.forwardRef)(function Select2(pro
|
|
|
2254
2776
|
"data-invalid": error || void 0,
|
|
2255
2777
|
className: cx(root3({ size, fullWidth }), trigger2, className),
|
|
2256
2778
|
children: [
|
|
2257
|
-
/* @__PURE__ */ (0,
|
|
2258
|
-
/* @__PURE__ */ (0,
|
|
2779
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: value, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadixSelect.Value, { placeholder }) }),
|
|
2780
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadixSelect.Icon, { className: icon4, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_icons15.ChevronDownIcon, { size: 16 }) })
|
|
2259
2781
|
]
|
|
2260
2782
|
}
|
|
2261
2783
|
),
|
|
2262
|
-
/* @__PURE__ */ (0,
|
|
2784
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadixSelect.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2263
2785
|
RadixSelect.Content,
|
|
2264
2786
|
{
|
|
2265
2787
|
position: "popper",
|
|
@@ -2267,15 +2789,15 @@ var Select = /* @__PURE__ */ (0, import_react29.forwardRef)(function Select2(pro
|
|
|
2267
2789
|
collisionPadding: 8,
|
|
2268
2790
|
className: cx(portal2.className, content5),
|
|
2269
2791
|
style: portal2.style,
|
|
2270
|
-
children: /* @__PURE__ */ (0,
|
|
2792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadixSelect.Viewport, { className: viewport, children: options.map((option2) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2271
2793
|
RadixSelect.Item,
|
|
2272
2794
|
{
|
|
2273
2795
|
value: option2.value,
|
|
2274
2796
|
disabled: option2.disabled,
|
|
2275
2797
|
className: item4,
|
|
2276
2798
|
children: [
|
|
2277
|
-
/* @__PURE__ */ (0,
|
|
2278
|
-
/* @__PURE__ */ (0,
|
|
2799
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadixSelect.ItemText, { children: option2.label }),
|
|
2800
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadixSelect.ItemIndicator, { className: itemIndicator, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_icons15.CheckIcon, { size: 16 }) })
|
|
2279
2801
|
]
|
|
2280
2802
|
},
|
|
2281
2803
|
option2.value
|
|
@@ -2285,13 +2807,13 @@ var Select = /* @__PURE__ */ (0, import_react29.forwardRef)(function Select2(pro
|
|
|
2285
2807
|
]
|
|
2286
2808
|
}
|
|
2287
2809
|
),
|
|
2288
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
2810
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
2289
2811
|
] });
|
|
2290
2812
|
});
|
|
2291
2813
|
|
|
2292
2814
|
// src/components/Skeleton/Skeleton.tsx
|
|
2293
2815
|
var import_dynamic2 = require("@vanilla-extract/dynamic");
|
|
2294
|
-
var
|
|
2816
|
+
var import_react35 = require("react");
|
|
2295
2817
|
|
|
2296
2818
|
// src/components/Skeleton/Skeleton.css.ts
|
|
2297
2819
|
var import_createRuntimeFn17 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -2301,13 +2823,13 @@ var skeleton = /* @__PURE__ */ (0, import_createRuntimeFn17.createRuntimeFn)({ d
|
|
|
2301
2823
|
var width = "var(--_1s8datd0)";
|
|
2302
2824
|
|
|
2303
2825
|
// src/components/Skeleton/Skeleton.tsx
|
|
2304
|
-
var
|
|
2826
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2305
2827
|
var toCss = (value4) => typeof value4 === "number" ? `${value4}px` : value4;
|
|
2306
|
-
var Skeleton = /* @__PURE__ */ (0,
|
|
2828
|
+
var Skeleton = /* @__PURE__ */ (0, import_react35.forwardRef)(function Skeleton2({ variant = "text", width: width2, height: height2, lines: lines2 = 1, className, style, ...rest }, ref) {
|
|
2307
2829
|
const w = toCss(width2 ?? (variant === "circle" ? 40 : "100%"));
|
|
2308
2830
|
const h = toCss(height2 ?? (variant === "circle" ? w : variant === "rect" ? 100 : "1em"));
|
|
2309
2831
|
if (variant === "text" && lines2 > 1) {
|
|
2310
|
-
return /* @__PURE__ */ (0,
|
|
2832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2311
2833
|
"span",
|
|
2312
2834
|
{
|
|
2313
2835
|
ref,
|
|
@@ -2315,7 +2837,7 @@ var Skeleton = /* @__PURE__ */ (0, import_react30.forwardRef)(function Skeleton2
|
|
|
2315
2837
|
className: cx(lines, className),
|
|
2316
2838
|
style: { ...(0, import_dynamic2.assignInlineVars)({ [width]: w }), ...style },
|
|
2317
2839
|
...rest,
|
|
2318
|
-
children: Array.from({ length: lines2 }, (_, i) => /* @__PURE__ */ (0,
|
|
2840
|
+
children: Array.from({ length: lines2 }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2319
2841
|
"span",
|
|
2320
2842
|
{
|
|
2321
2843
|
className: skeleton({ variant }),
|
|
@@ -2326,7 +2848,7 @@ var Skeleton = /* @__PURE__ */ (0, import_react30.forwardRef)(function Skeleton2
|
|
|
2326
2848
|
}
|
|
2327
2849
|
);
|
|
2328
2850
|
}
|
|
2329
|
-
return /* @__PURE__ */ (0,
|
|
2851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2330
2852
|
"span",
|
|
2331
2853
|
{
|
|
2332
2854
|
ref,
|
|
@@ -2340,23 +2862,23 @@ var Skeleton = /* @__PURE__ */ (0, import_react30.forwardRef)(function Skeleton2
|
|
|
2340
2862
|
|
|
2341
2863
|
// src/components/Slider/Slider.tsx
|
|
2342
2864
|
var RadixSlider = __toESM(require("@radix-ui/react-slider"), 1);
|
|
2343
|
-
var
|
|
2865
|
+
var import_react36 = require("react");
|
|
2344
2866
|
|
|
2345
2867
|
// src/components/Slider/Slider.css.ts
|
|
2346
2868
|
var import_createRuntimeFn18 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
2347
2869
|
var field2 = "_126mzjm0";
|
|
2348
|
-
var
|
|
2870
|
+
var header8 = "_126mzjm1";
|
|
2349
2871
|
var helperText2 = "_126mzjm4";
|
|
2350
2872
|
var label4 = "_126mzjm2";
|
|
2351
2873
|
var range2 = "_126mzjmb";
|
|
2352
|
-
var
|
|
2874
|
+
var root8 = /* @__PURE__ */ (0, import_createRuntimeFn18.createRuntimeFn)({ defaultClassName: "_126mzjm5", variantClassNames: { size: { sm: "_126mzjm6", md: "_126mzjm7" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2353
2875
|
var thumb = /* @__PURE__ */ (0, import_createRuntimeFn18.createRuntimeFn)({ defaultClassName: "_126mzjmc", variantClassNames: { size: { sm: "_126mzjmd", md: "_126mzjme" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2354
2876
|
var track2 = /* @__PURE__ */ (0, import_createRuntimeFn18.createRuntimeFn)({ defaultClassName: "_126mzjm8", variantClassNames: { size: { sm: "_126mzjm9", md: "_126mzjma" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2355
2877
|
var value3 = "_126mzjm3";
|
|
2356
2878
|
|
|
2357
2879
|
// src/components/Slider/Slider.tsx
|
|
2358
|
-
var
|
|
2359
|
-
var Slider = /* @__PURE__ */ (0,
|
|
2880
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2881
|
+
var Slider = /* @__PURE__ */ (0, import_react36.forwardRef)(function Slider2(props, ref) {
|
|
2360
2882
|
const {
|
|
2361
2883
|
value: value4,
|
|
2362
2884
|
defaultValue,
|
|
@@ -2368,19 +2890,21 @@ var Slider = /* @__PURE__ */ (0, import_react31.forwardRef)(function Slider2(pro
|
|
|
2368
2890
|
helperText: helperText3,
|
|
2369
2891
|
showValue,
|
|
2370
2892
|
formatValue = String,
|
|
2371
|
-
thumbLabels
|
|
2893
|
+
thumbLabels: thumbLabelsProp,
|
|
2372
2894
|
size,
|
|
2373
2895
|
id,
|
|
2374
2896
|
className,
|
|
2375
2897
|
disabled,
|
|
2376
2898
|
...rest
|
|
2377
2899
|
} = props;
|
|
2378
|
-
const
|
|
2900
|
+
const m = useMessages();
|
|
2901
|
+
const thumbLabels = thumbLabelsProp ?? [m.rangeStart ?? "\uCD5C\uC18C", m.rangeEnd ?? "\uCD5C\uB300"];
|
|
2902
|
+
const generatedId = (0, import_react36.useId)();
|
|
2379
2903
|
const baseId = id ?? generatedId;
|
|
2380
2904
|
const labelId = `${baseId}-label`;
|
|
2381
2905
|
const helperId = `${baseId}-helper`;
|
|
2382
2906
|
const isControlled = "value" in props;
|
|
2383
|
-
const [innerValue, setInnerValue] = (0,
|
|
2907
|
+
const [innerValue, setInnerValue] = (0, import_react36.useState)(defaultValue ?? [min]);
|
|
2384
2908
|
const current2 = isControlled ? value4 ?? [min] : innerValue;
|
|
2385
2909
|
const isRange = current2.length > 1;
|
|
2386
2910
|
const handleChange = (next) => {
|
|
@@ -2388,12 +2912,12 @@ var Slider = /* @__PURE__ */ (0, import_react31.forwardRef)(function Slider2(pro
|
|
|
2388
2912
|
onValueChange?.(next);
|
|
2389
2913
|
};
|
|
2390
2914
|
const valueText = current2.map(formatValue).join(" \u2013 ");
|
|
2391
|
-
return /* @__PURE__ */ (0,
|
|
2392
|
-
(label6 || showValue) && /* @__PURE__ */ (0,
|
|
2393
|
-
label6 && /* @__PURE__ */ (0,
|
|
2394
|
-
showValue && /* @__PURE__ */ (0,
|
|
2915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: cx(field2, className), children: [
|
|
2916
|
+
(label6 || showValue) && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: header8, children: [
|
|
2917
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { id: labelId, className: label4, children: label6 }),
|
|
2918
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: value3, "aria-hidden": true, children: valueText })
|
|
2395
2919
|
] }),
|
|
2396
|
-
/* @__PURE__ */ (0,
|
|
2920
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2397
2921
|
RadixSlider.Root,
|
|
2398
2922
|
{
|
|
2399
2923
|
ref,
|
|
@@ -2403,13 +2927,13 @@ var Slider = /* @__PURE__ */ (0, import_react31.forwardRef)(function Slider2(pro
|
|
|
2403
2927
|
disabled,
|
|
2404
2928
|
value: current2,
|
|
2405
2929
|
onValueChange: handleChange,
|
|
2406
|
-
className:
|
|
2930
|
+
className: root8({ size }),
|
|
2407
2931
|
...rest,
|
|
2408
2932
|
children: [
|
|
2409
|
-
/* @__PURE__ */ (0,
|
|
2933
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RadixSlider.Track, { className: track2({ size }), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RadixSlider.Range, { className: range2 }) }),
|
|
2410
2934
|
current2.map((thumbValue, index) => {
|
|
2411
2935
|
const thumbLabelId = `${baseId}-thumb-${index}`;
|
|
2412
|
-
return /* @__PURE__ */ (0,
|
|
2936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2413
2937
|
RadixSlider.Thumb,
|
|
2414
2938
|
{
|
|
2415
2939
|
className: thumb({ size }),
|
|
@@ -2424,45 +2948,45 @@ var Slider = /* @__PURE__ */ (0, import_react31.forwardRef)(function Slider2(pro
|
|
|
2424
2948
|
]
|
|
2425
2949
|
}
|
|
2426
2950
|
),
|
|
2427
|
-
isRange && current2.map((_, index) => /* @__PURE__ */ (0,
|
|
2951
|
+
isRange && current2.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { id: `${baseId}-thumb-${index}`, hidden: true, children: [
|
|
2428
2952
|
label6 ? "" : ariaLabel ? `${ariaLabel} ` : "",
|
|
2429
2953
|
thumbLabels[index] ?? `${index + 1}`
|
|
2430
2954
|
] }, index)),
|
|
2431
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
2955
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { id: helperId, className: helperText2, children: helperText3 })
|
|
2432
2956
|
] });
|
|
2433
2957
|
});
|
|
2434
2958
|
|
|
2435
2959
|
// src/components/Stack/Stack.tsx
|
|
2436
|
-
var
|
|
2960
|
+
var import_react37 = require("react");
|
|
2437
2961
|
|
|
2438
2962
|
// src/components/Stack/Stack.css.ts
|
|
2439
2963
|
var import_createRuntimeFn19 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
2440
2964
|
var stack = /* @__PURE__ */ (0, import_createRuntimeFn19.createRuntimeFn)({ defaultClassName: "_1jz9hj90", variantClassNames: { direction: { row: "_1jz9hj91", column: "_1jz9hj92", "row-reverse": "_1jz9hj93", "column-reverse": "_1jz9hj94" }, gap: { "0": "_1jz9hj95", "1": "_1jz9hj96", "2": "_1jz9hj97", "3": "_1jz9hj98", "4": "_1jz9hj99", "5": "_1jz9hj9a", "6": "_1jz9hj9b", "8": "_1jz9hj9c", "10": "_1jz9hj9d", "12": "_1jz9hj9e", "16": "_1jz9hj9f" }, align: { start: "_1jz9hj9g", center: "_1jz9hj9h", end: "_1jz9hj9i", stretch: "_1jz9hj9j", baseline: "_1jz9hj9k" }, justify: { start: "_1jz9hj9l", center: "_1jz9hj9m", end: "_1jz9hj9n", between: "_1jz9hj9o", around: "_1jz9hj9p", evenly: "_1jz9hj9q" }, wrap: { true: "_1jz9hj9r" } }, defaultVariants: { direction: "column" }, compoundVariants: [] });
|
|
2441
2965
|
|
|
2442
2966
|
// src/components/Stack/Stack.tsx
|
|
2443
|
-
var
|
|
2444
|
-
var Stack = /* @__PURE__ */ (0,
|
|
2445
|
-
return /* @__PURE__ */ (0,
|
|
2967
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2968
|
+
var Stack = /* @__PURE__ */ (0, import_react37.forwardRef)(function Stack2({ as: Component = "div", direction, gap, align, justify, wrap, className, ...rest }, ref) {
|
|
2969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Component, { ref, className: cx(stack({ direction, gap, align, justify, wrap }), className), ...rest });
|
|
2446
2970
|
});
|
|
2447
2971
|
|
|
2448
2972
|
// src/components/Switch/Switch.tsx
|
|
2449
2973
|
var RadixSwitch = __toESM(require("@radix-ui/react-switch"), 1);
|
|
2450
|
-
var
|
|
2974
|
+
var import_react38 = require("react");
|
|
2451
2975
|
|
|
2452
2976
|
// src/components/Switch/Switch.css.ts
|
|
2453
2977
|
var import_createRuntimeFn20 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
2454
2978
|
var label5 = "o33ul29";
|
|
2455
|
-
var
|
|
2979
|
+
var root9 = /* @__PURE__ */ (0, import_createRuntimeFn20.createRuntimeFn)({ defaultClassName: "o33ul20", variantClassNames: { size: { sm: "o33ul21", md: "o33ul22" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2456
2980
|
var thumb2 = /* @__PURE__ */ (0, import_createRuntimeFn20.createRuntimeFn)({ defaultClassName: "o33ul26", variantClassNames: { size: { sm: "o33ul27", md: "o33ul28" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2457
2981
|
var track3 = /* @__PURE__ */ (0, import_createRuntimeFn20.createRuntimeFn)({ defaultClassName: "o33ul23", variantClassNames: { size: { sm: "o33ul24", md: "o33ul25" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2458
2982
|
|
|
2459
2983
|
// src/components/Switch/Switch.tsx
|
|
2460
|
-
var
|
|
2461
|
-
var Switch = /* @__PURE__ */ (0,
|
|
2462
|
-
const generatedId = (0,
|
|
2984
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2985
|
+
var Switch = /* @__PURE__ */ (0, import_react38.forwardRef)(function Switch2({ label: label6, size, id, className, disabled, "aria-label": ariaLabel, ...rest }, ref) {
|
|
2986
|
+
const generatedId = (0, import_react38.useId)();
|
|
2463
2987
|
const switchId = id ?? generatedId;
|
|
2464
|
-
return /* @__PURE__ */ (0,
|
|
2465
|
-
/* @__PURE__ */ (0,
|
|
2988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: cx(root9({ size }), className), "data-disabled": disabled || void 0, children: [
|
|
2989
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2466
2990
|
RadixSwitch.Root,
|
|
2467
2991
|
{
|
|
2468
2992
|
ref,
|
|
@@ -2471,27 +2995,27 @@ var Switch = /* @__PURE__ */ (0, import_react33.forwardRef)(function Switch2({ l
|
|
|
2471
2995
|
"aria-label": ariaLabel,
|
|
2472
2996
|
className: track3({ size }),
|
|
2473
2997
|
...rest,
|
|
2474
|
-
children: /* @__PURE__ */ (0,
|
|
2998
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixSwitch.Thumb, { className: thumb2({ size }) })
|
|
2475
2999
|
}
|
|
2476
3000
|
),
|
|
2477
|
-
label6 && /* @__PURE__ */ (0,
|
|
3001
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("label", { htmlFor: switchId, className: label5, children: label6 })
|
|
2478
3002
|
] });
|
|
2479
3003
|
});
|
|
2480
3004
|
|
|
2481
3005
|
// src/components/Table/Table.tsx
|
|
2482
|
-
var
|
|
2483
|
-
var
|
|
3006
|
+
var import_react39 = require("react");
|
|
3007
|
+
var import_icons16 = require("@bestow-ui/icons");
|
|
2484
3008
|
|
|
2485
3009
|
// src/components/Table/Table.css.ts
|
|
2486
3010
|
var import_createRuntimeFn21 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
2487
3011
|
var body4 = "l3ploy5";
|
|
2488
3012
|
var caption = "l3ploy2";
|
|
2489
|
-
var
|
|
3013
|
+
var cell2 = /* @__PURE__ */ (0, import_createRuntimeFn21.createRuntimeFn)({ defaultClassName: "l3ploy9", variantClassNames: { size: { sm: "l3ploya", md: "l3ployb" }, align: { left: "l3ployc", center: "l3ployd", right: "l3ploye" } }, defaultVariants: { size: "md", align: "left" }, compoundVariants: [] });
|
|
2490
3014
|
var container = "l3ploy0";
|
|
2491
3015
|
var footer4 = "l3ploy7";
|
|
2492
3016
|
var footerCell = "l3ployg";
|
|
2493
3017
|
var head = "l3ployf";
|
|
2494
|
-
var
|
|
3018
|
+
var header9 = "l3ploy3";
|
|
2495
3019
|
var row3 = "l3ploy8";
|
|
2496
3020
|
var sortButton = "l3ployh";
|
|
2497
3021
|
var sortIcon = "l3ployi";
|
|
@@ -2500,10 +3024,10 @@ var striped = "l3ploy6";
|
|
|
2500
3024
|
var table = "l3ploy1";
|
|
2501
3025
|
|
|
2502
3026
|
// src/components/Table/Table.tsx
|
|
2503
|
-
var
|
|
2504
|
-
var TableSizeContext = /* @__PURE__ */ (0,
|
|
2505
|
-
var TableSectionContext = /* @__PURE__ */ (0,
|
|
2506
|
-
var Table = /* @__PURE__ */ (0,
|
|
3027
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3028
|
+
var TableSizeContext = /* @__PURE__ */ (0, import_react39.createContext)("md");
|
|
3029
|
+
var TableSectionContext = /* @__PURE__ */ (0, import_react39.createContext)("body");
|
|
3030
|
+
var Table = /* @__PURE__ */ (0, import_react39.forwardRef)(function Table2({
|
|
2507
3031
|
size = "md",
|
|
2508
3032
|
striped: striped2,
|
|
2509
3033
|
stickyHeader: stickyHeader2,
|
|
@@ -2515,8 +3039,8 @@ var Table = /* @__PURE__ */ (0, import_react34.forwardRef)(function Table2({
|
|
|
2515
3039
|
children,
|
|
2516
3040
|
...rest
|
|
2517
3041
|
}, ref) {
|
|
2518
|
-
const captionId = (0,
|
|
2519
|
-
return /* @__PURE__ */ (0,
|
|
3042
|
+
const captionId = (0, import_react39.useId)();
|
|
3043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TableSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2520
3044
|
"div",
|
|
2521
3045
|
{
|
|
2522
3046
|
className: cx(container, containerClassName),
|
|
@@ -2525,7 +3049,7 @@ var Table = /* @__PURE__ */ (0, import_react34.forwardRef)(function Table2({
|
|
|
2525
3049
|
role: "region",
|
|
2526
3050
|
"aria-labelledby": caption2 ? captionId : void 0,
|
|
2527
3051
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
2528
|
-
children: /* @__PURE__ */ (0,
|
|
3052
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2529
3053
|
"table",
|
|
2530
3054
|
{
|
|
2531
3055
|
ref,
|
|
@@ -2533,7 +3057,7 @@ var Table = /* @__PURE__ */ (0, import_react34.forwardRef)(function Table2({
|
|
|
2533
3057
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
2534
3058
|
...rest,
|
|
2535
3059
|
children: [
|
|
2536
|
-
caption2 && /* @__PURE__ */ (0,
|
|
3060
|
+
caption2 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("caption", { id: captionId, className: caption, children: caption2 }),
|
|
2537
3061
|
children
|
|
2538
3062
|
]
|
|
2539
3063
|
}
|
|
@@ -2541,57 +3065,57 @@ var Table = /* @__PURE__ */ (0, import_react34.forwardRef)(function Table2({
|
|
|
2541
3065
|
}
|
|
2542
3066
|
) });
|
|
2543
3067
|
});
|
|
2544
|
-
var TableHeader = /* @__PURE__ */ (0,
|
|
3068
|
+
var TableHeader = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
2545
3069
|
function TableHeader2({ className, ...rest }, ref) {
|
|
2546
|
-
return /* @__PURE__ */ (0,
|
|
3070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TableSectionContext.Provider, { value: "header", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("thead", { ref, className: cx(header9, className), ...rest }) });
|
|
2547
3071
|
}
|
|
2548
3072
|
);
|
|
2549
|
-
var TableBody = /* @__PURE__ */ (0,
|
|
3073
|
+
var TableBody = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
2550
3074
|
function TableBody2({ className, ...rest }, ref) {
|
|
2551
|
-
return /* @__PURE__ */ (0,
|
|
3075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("tbody", { ref, className: cx(body4, className), ...rest }) });
|
|
2552
3076
|
}
|
|
2553
3077
|
);
|
|
2554
|
-
var TableFooter = /* @__PURE__ */ (0,
|
|
3078
|
+
var TableFooter = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
2555
3079
|
function TableFooter2({ className, ...rest }, ref) {
|
|
2556
|
-
return /* @__PURE__ */ (0,
|
|
3080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("tfoot", { ref, className: cx(footer4, className), ...rest }) });
|
|
2557
3081
|
}
|
|
2558
3082
|
);
|
|
2559
|
-
var TableRow = /* @__PURE__ */ (0,
|
|
2560
|
-
return /* @__PURE__ */ (0,
|
|
3083
|
+
var TableRow = /* @__PURE__ */ (0, import_react39.forwardRef)(function TableRow2({ selected, className, ...rest }, ref) {
|
|
3084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("tr", { ref, className: cx(row3, className), "data-state": selected ? "selected" : void 0, ...rest });
|
|
2561
3085
|
});
|
|
2562
|
-
var TableHead = /* @__PURE__ */ (0,
|
|
2563
|
-
const size = (0,
|
|
2564
|
-
const section = (0,
|
|
3086
|
+
var TableHead = /* @__PURE__ */ (0, import_react39.forwardRef)(function TableHead2({ align, sortDirection, onSort, scope, className, children, ...rest }, ref) {
|
|
3087
|
+
const size = (0, import_react39.useContext)(TableSizeContext);
|
|
3088
|
+
const section = (0, import_react39.useContext)(TableSectionContext);
|
|
2565
3089
|
const sortable = onSort !== void 0;
|
|
2566
3090
|
const direction = sortDirection ?? "none";
|
|
2567
|
-
const SortIcon = direction === "descending" ?
|
|
2568
|
-
return /* @__PURE__ */ (0,
|
|
3091
|
+
const SortIcon = direction === "descending" ? import_icons16.ArrowDownIcon : import_icons16.ArrowUpIcon;
|
|
3092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2569
3093
|
"th",
|
|
2570
3094
|
{
|
|
2571
3095
|
ref,
|
|
2572
3096
|
scope: scope ?? (section === "header" ? "col" : "row"),
|
|
2573
3097
|
"aria-sort": sortable && direction !== "none" ? direction : void 0,
|
|
2574
3098
|
className: cx(
|
|
2575
|
-
|
|
3099
|
+
cell2({ size, align }),
|
|
2576
3100
|
section === "header" ? head : section === "footer" ? footerCell : void 0,
|
|
2577
3101
|
className
|
|
2578
3102
|
),
|
|
2579
3103
|
...rest,
|
|
2580
|
-
children: sortable ? /* @__PURE__ */ (0,
|
|
3104
|
+
children: sortable ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("button", { type: "button", className: sortButton, onClick: onSort, children: [
|
|
2581
3105
|
children,
|
|
2582
|
-
/* @__PURE__ */ (0,
|
|
3106
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SortIcon, { size: 14, className: sortIcon, "data-active": direction !== "none", "aria-hidden": true })
|
|
2583
3107
|
] }) : children
|
|
2584
3108
|
}
|
|
2585
3109
|
);
|
|
2586
3110
|
});
|
|
2587
|
-
var TableCell = /* @__PURE__ */ (0,
|
|
2588
|
-
const size = (0,
|
|
2589
|
-
const section = (0,
|
|
2590
|
-
return /* @__PURE__ */ (0,
|
|
3111
|
+
var TableCell = /* @__PURE__ */ (0, import_react39.forwardRef)(function TableCell2({ align, className, ...rest }, ref) {
|
|
3112
|
+
const size = (0, import_react39.useContext)(TableSizeContext);
|
|
3113
|
+
const section = (0, import_react39.useContext)(TableSectionContext);
|
|
3114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2591
3115
|
"td",
|
|
2592
3116
|
{
|
|
2593
3117
|
ref,
|
|
2594
|
-
className: cx(
|
|
3118
|
+
className: cx(cell2({ size, align }), section === "footer" && footerCell, className),
|
|
2595
3119
|
...rest
|
|
2596
3120
|
}
|
|
2597
3121
|
);
|
|
@@ -2599,7 +3123,7 @@ var TableCell = /* @__PURE__ */ (0, import_react34.forwardRef)(function TableCel
|
|
|
2599
3123
|
|
|
2600
3124
|
// src/components/Tabs/Tabs.tsx
|
|
2601
3125
|
var RadixTabs = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
2602
|
-
var
|
|
3126
|
+
var import_react40 = require("react");
|
|
2603
3127
|
|
|
2604
3128
|
// src/components/Tabs/Tabs.css.ts
|
|
2605
3129
|
var import_createRuntimeFn22 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -2608,26 +3132,26 @@ var list4 = /* @__PURE__ */ (0, import_createRuntimeFn22.createRuntimeFn)({ defa
|
|
|
2608
3132
|
var trigger3 = /* @__PURE__ */ (0, import_createRuntimeFn22.createRuntimeFn)({ defaultClassName: "fvhbtd3", variantClassNames: { variant: { line: "fvhbtd4", soft: "fvhbtd5" }, size: { sm: "fvhbtd6", md: "fvhbtd7" } }, defaultVariants: { variant: "line", size: "md" }, compoundVariants: [[{ variant: "soft", size: "sm" }, "fvhbtd8"], [{ variant: "soft", size: "md" }, "fvhbtd9"]] });
|
|
2609
3133
|
|
|
2610
3134
|
// src/components/Tabs/Tabs.tsx
|
|
2611
|
-
var
|
|
2612
|
-
var TabsStyleContext = /* @__PURE__ */ (0,
|
|
2613
|
-
var Tabs = /* @__PURE__ */ (0,
|
|
3135
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3136
|
+
var TabsStyleContext = /* @__PURE__ */ (0, import_react40.createContext)({ variant: "line", size: "md" });
|
|
3137
|
+
var Tabs = /* @__PURE__ */ (0, import_react40.forwardRef)(function Tabs2({ variant = "line", size = "md", ...props }, ref) {
|
|
2614
3138
|
const controlled = "value" in props ? { value: props.value ?? "" } : {};
|
|
2615
|
-
return /* @__PURE__ */ (0,
|
|
3139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(RadixTabs.Root, { ref, ...props, ...controlled }) });
|
|
2616
3140
|
});
|
|
2617
|
-
var TabsList = /* @__PURE__ */ (0,
|
|
2618
|
-
const { variant } = (0,
|
|
2619
|
-
return /* @__PURE__ */ (0,
|
|
3141
|
+
var TabsList = /* @__PURE__ */ (0, import_react40.forwardRef)(function TabsList2({ className, ...rest }, ref) {
|
|
3142
|
+
const { variant } = (0, import_react40.useContext)(TabsStyleContext);
|
|
3143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(RadixTabs.List, { ref, className: cx(list4({ variant }), className), ...rest });
|
|
2620
3144
|
});
|
|
2621
|
-
var TabsTrigger = /* @__PURE__ */ (0,
|
|
2622
|
-
const { variant, size } = (0,
|
|
2623
|
-
return /* @__PURE__ */ (0,
|
|
3145
|
+
var TabsTrigger = /* @__PURE__ */ (0, import_react40.forwardRef)(function TabsTrigger2({ className, ...rest }, ref) {
|
|
3146
|
+
const { variant, size } = (0, import_react40.useContext)(TabsStyleContext);
|
|
3147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
|
|
2624
3148
|
});
|
|
2625
|
-
var TabsContent = /* @__PURE__ */ (0,
|
|
2626
|
-
return /* @__PURE__ */ (0,
|
|
3149
|
+
var TabsContent = /* @__PURE__ */ (0, import_react40.forwardRef)(function TabsContent2({ className, ...rest }, ref) {
|
|
3150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(RadixTabs.Content, { ref, className: cx(content10, className), ...rest });
|
|
2627
3151
|
});
|
|
2628
3152
|
|
|
2629
3153
|
// src/components/Textarea/Textarea.tsx
|
|
2630
|
-
var
|
|
3154
|
+
var import_react41 = require("react");
|
|
2631
3155
|
|
|
2632
3156
|
// src/components/Textarea/Textarea.css.ts
|
|
2633
3157
|
var import_createRuntimeFn23 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -2638,9 +3162,8 @@ var footer5 = "_1koawa8";
|
|
|
2638
3162
|
var textarea = /* @__PURE__ */ (0, import_createRuntimeFn23.createRuntimeFn)({ defaultClassName: "_1koawa0", variantClassNames: { size: { sm: "_1koawa1", md: "_1koawa2", lg: "_1koawa3" }, resize: { none: "_1koawa4", vertical: "_1koawa5", both: "_1koawa6" } }, defaultVariants: { size: "md", resize: "vertical" }, compoundVariants: [] });
|
|
2639
3163
|
|
|
2640
3164
|
// src/components/Textarea/Textarea.tsx
|
|
2641
|
-
var
|
|
2642
|
-
var
|
|
2643
|
-
var Textarea = /* @__PURE__ */ (0, import_react36.forwardRef)(function Textarea2({
|
|
3165
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3166
|
+
var Textarea = /* @__PURE__ */ (0, import_react41.forwardRef)(function Textarea2({
|
|
2644
3167
|
label: label6,
|
|
2645
3168
|
helperText: helperText3,
|
|
2646
3169
|
error,
|
|
@@ -2661,13 +3184,13 @@ var Textarea = /* @__PURE__ */ (0, import_react36.forwardRef)(function Textarea2
|
|
|
2661
3184
|
"aria-describedby": ariaDescribedBy,
|
|
2662
3185
|
...rest
|
|
2663
3186
|
}, ref) {
|
|
2664
|
-
const generatedId = (0,
|
|
3187
|
+
const generatedId = (0, import_react41.useId)();
|
|
2665
3188
|
const textareaId = id ?? generatedId;
|
|
2666
3189
|
const helperId = helperText3 ? `${textareaId}-helper` : void 0;
|
|
2667
|
-
const innerRef = (0,
|
|
2668
|
-
const [uncontrolledLength, setUncontrolledLength] = (0,
|
|
3190
|
+
const innerRef = (0, import_react41.useRef)(null);
|
|
3191
|
+
const [uncontrolledLength, setUncontrolledLength] = (0, import_react41.useState)(() => String(defaultValue ?? "").length);
|
|
2669
3192
|
const length = value4 !== void 0 ? String(value4).length : uncontrolledLength;
|
|
2670
|
-
const fitHeight = (0,
|
|
3193
|
+
const fitHeight = (0, import_react41.useCallback)(() => {
|
|
2671
3194
|
const el = innerRef.current;
|
|
2672
3195
|
if (!autoResize || !el) return;
|
|
2673
3196
|
el.style.height = "auto";
|
|
@@ -2680,12 +3203,12 @@ var Textarea = /* @__PURE__ */ (0, import_react36.forwardRef)(function Textarea2
|
|
|
2680
3203
|
fitHeight();
|
|
2681
3204
|
onChange?.(event);
|
|
2682
3205
|
};
|
|
2683
|
-
return /* @__PURE__ */ (0,
|
|
2684
|
-
label6 && /* @__PURE__ */ (0,
|
|
3206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
3207
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { htmlFor: textareaId, className: label, children: [
|
|
2685
3208
|
label6,
|
|
2686
|
-
required && /* @__PURE__ */ (0,
|
|
3209
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2687
3210
|
] }),
|
|
2688
|
-
/* @__PURE__ */ (0,
|
|
3211
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2689
3212
|
"textarea",
|
|
2690
3213
|
{
|
|
2691
3214
|
ref: mergeRefs(innerRef, ref),
|
|
@@ -2707,49 +3230,51 @@ var Textarea = /* @__PURE__ */ (0, import_react36.forwardRef)(function Textarea2
|
|
|
2707
3230
|
...rest
|
|
2708
3231
|
}
|
|
2709
3232
|
),
|
|
2710
|
-
(helperText3 || showCount) && /* @__PURE__ */ (0,
|
|
2711
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
2712
|
-
showCount && /* @__PURE__ */ (0,
|
|
3233
|
+
(helperText3 || showCount) && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: footer5, children: [
|
|
3234
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
|
|
3235
|
+
showCount && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cx(count, maxLength !== void 0 && length >= maxLength && countOver), children: maxLength !== void 0 ? `${length}/${maxLength}` : length })
|
|
2713
3236
|
] })
|
|
2714
3237
|
] });
|
|
2715
3238
|
});
|
|
2716
3239
|
|
|
2717
3240
|
// src/components/Toast/Toast.tsx
|
|
2718
3241
|
var RadixToast = __toESM(require("@radix-ui/react-toast"), 1);
|
|
2719
|
-
var
|
|
2720
|
-
var
|
|
3242
|
+
var import_react42 = require("react");
|
|
3243
|
+
var import_icons17 = require("@bestow-ui/icons");
|
|
2721
3244
|
|
|
2722
3245
|
// src/components/Toast/Toast.css.ts
|
|
2723
3246
|
var import_createRuntimeFn24 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
2724
|
-
var action2 = "
|
|
2725
|
-
var close = "
|
|
2726
|
-
var description5 = "
|
|
2727
|
-
var title5 = "
|
|
2728
|
-
var toast = /* @__PURE__ */ (0, import_createRuntimeFn24.createRuntimeFn)({ defaultClassName: "_1g11zvx1", variantClassNames: {
|
|
3247
|
+
var action2 = "_1g11zvx9";
|
|
3248
|
+
var close = "_1g11zvxa";
|
|
3249
|
+
var description5 = "_1g11zvx8";
|
|
3250
|
+
var title5 = "_1g11zvx7";
|
|
3251
|
+
var toast = /* @__PURE__ */ (0, import_createRuntimeFn24.createRuntimeFn)({ defaultClassName: "_1g11zvx1", variantClassNames: { color: { primary: "_1g11zvx2", neutral: "_1g11zvx3", success: "_1g11zvx4", warning: "_1g11zvx5", danger: "_1g11zvx6" } }, defaultVariants: { color: "neutral" }, compoundVariants: [] });
|
|
2729
3252
|
var viewport2 = "_1g11zvx0";
|
|
2730
3253
|
|
|
2731
3254
|
// src/components/Toast/Toast.tsx
|
|
2732
|
-
var
|
|
3255
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2733
3256
|
var REMOVE_DELAY = 500;
|
|
2734
|
-
var ToastContext = /* @__PURE__ */ (0,
|
|
2735
|
-
function ToastProvider({ children, duration = 5e3, label:
|
|
2736
|
-
const
|
|
2737
|
-
const
|
|
3257
|
+
var ToastContext = /* @__PURE__ */ (0, import_react42.createContext)(null);
|
|
3258
|
+
function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
3259
|
+
const m = useMessages();
|
|
3260
|
+
const label6 = labelProp ?? m.notifications ?? "\uC54C\uB9BC";
|
|
3261
|
+
const [toasts, setToasts] = (0, import_react42.useState)([]);
|
|
3262
|
+
const nextId = (0, import_react42.useRef)(0);
|
|
2738
3263
|
const portal2 = usePortalProps();
|
|
2739
|
-
const toast2 = (0,
|
|
3264
|
+
const toast2 = (0, import_react42.useCallback)((options) => {
|
|
2740
3265
|
const id = nextId.current++;
|
|
2741
3266
|
setToasts((prev) => [...prev, { ...options, id, open: true }]);
|
|
2742
3267
|
return id;
|
|
2743
3268
|
}, []);
|
|
2744
|
-
const dismiss = (0,
|
|
3269
|
+
const dismiss = (0, import_react42.useCallback)((id) => {
|
|
2745
3270
|
const isTarget = (t) => id === void 0 || t.id === id;
|
|
2746
3271
|
setToasts((prev) => prev.map((t) => isTarget(t) ? { ...t, open: false } : t));
|
|
2747
3272
|
setTimeout(() => setToasts((prev) => prev.filter((t) => t.open || !isTarget(t))), REMOVE_DELAY);
|
|
2748
3273
|
}, []);
|
|
2749
|
-
const value4 = (0,
|
|
2750
|
-
return /* @__PURE__ */ (0,
|
|
3274
|
+
const value4 = (0, import_react42.useMemo)(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
|
|
3275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ToastContext.Provider, { value: value4, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(RadixToast.Provider, { duration, label: label6, swipeDirection: "right", children: [
|
|
2751
3276
|
children,
|
|
2752
|
-
toasts.map(({ id, open, title: title6, description: description6,
|
|
3277
|
+
toasts.map(({ id, open, title: title6, description: description6, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2753
3278
|
RadixToast.Root,
|
|
2754
3279
|
{
|
|
2755
3280
|
open,
|
|
@@ -2757,21 +3282,21 @@ function ToastProvider({ children, duration = 5e3, label: label6 = "\uC54C\uB9BC
|
|
|
2757
3282
|
onOpenChange: (nextOpen) => {
|
|
2758
3283
|
if (!nextOpen) dismiss(id);
|
|
2759
3284
|
},
|
|
2760
|
-
className: toast({
|
|
3285
|
+
className: toast({ color }),
|
|
2761
3286
|
children: [
|
|
2762
|
-
/* @__PURE__ */ (0,
|
|
2763
|
-
description6 && /* @__PURE__ */ (0,
|
|
2764
|
-
action3 && /* @__PURE__ */ (0,
|
|
2765
|
-
/* @__PURE__ */ (0,
|
|
3287
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixToast.Title, { className: title5, children: title6 }),
|
|
3288
|
+
description6 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixToast.Description, { className: description5, children: description6 }),
|
|
3289
|
+
action3 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixToast.Action, { asChild: true, altText: action3.altText ?? action3.label, className: action2, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Button, { size: "sm", variant: "soft", color: "neutral", onClick: action3.onClick, children: action3.label }) }),
|
|
3290
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixToast.Close, { className: close, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons17.XIcon, { size: 16 }) })
|
|
2766
3291
|
]
|
|
2767
3292
|
},
|
|
2768
3293
|
id
|
|
2769
3294
|
)),
|
|
2770
|
-
/* @__PURE__ */ (0,
|
|
3295
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixToast.Viewport, { className: cx(portal2.className, viewport2), style: portal2.style })
|
|
2771
3296
|
] }) });
|
|
2772
3297
|
}
|
|
2773
3298
|
function useToast() {
|
|
2774
|
-
const context = (0,
|
|
3299
|
+
const context = (0, import_react42.useContext)(ToastContext);
|
|
2775
3300
|
if (!context) throw new Error("useToast \uB294 ToastProvider \uC548\uC5D0\uC11C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4.");
|
|
2776
3301
|
return context;
|
|
2777
3302
|
}
|
|
@@ -2784,7 +3309,7 @@ var arrow2 = "z7rufs1";
|
|
|
2784
3309
|
var content11 = "z7rufs0";
|
|
2785
3310
|
|
|
2786
3311
|
// src/components/Tooltip/Tooltip.tsx
|
|
2787
|
-
var
|
|
3312
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2788
3313
|
function Tooltip({
|
|
2789
3314
|
content: content12,
|
|
2790
3315
|
children,
|
|
@@ -2799,9 +3324,9 @@ function Tooltip({
|
|
|
2799
3324
|
}) {
|
|
2800
3325
|
const portal2 = usePortalProps();
|
|
2801
3326
|
if (disabled || content12 == null || content12 === "") return children;
|
|
2802
|
-
return /* @__PURE__ */ (0,
|
|
2803
|
-
/* @__PURE__ */ (0,
|
|
2804
|
-
/* @__PURE__ */ (0,
|
|
3327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(RadixTooltip.Provider, { delayDuration: delay, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(RadixTooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
3328
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(RadixTooltip.Trigger, { asChild: true, children }),
|
|
3329
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(RadixTooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
2805
3330
|
RadixTooltip.Content,
|
|
2806
3331
|
{
|
|
2807
3332
|
side,
|
|
@@ -2812,7 +3337,7 @@ function Tooltip({
|
|
|
2812
3337
|
style: portal2.style,
|
|
2813
3338
|
children: [
|
|
2814
3339
|
content12,
|
|
2815
|
-
/* @__PURE__ */ (0,
|
|
3340
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(RadixTooltip.Arrow, { className: arrow2, width: 10, height: 5 })
|
|
2816
3341
|
]
|
|
2817
3342
|
}
|
|
2818
3343
|
) })
|
|
@@ -2820,14 +3345,14 @@ function Tooltip({
|
|
|
2820
3345
|
}
|
|
2821
3346
|
|
|
2822
3347
|
// src/components/Typography/Typography.tsx
|
|
2823
|
-
var
|
|
3348
|
+
var import_react43 = require("react");
|
|
2824
3349
|
|
|
2825
3350
|
// src/components/Typography/Typography.css.ts
|
|
2826
3351
|
var import_createRuntimeFn25 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
2827
3352
|
var typography = /* @__PURE__ */ (0, import_createRuntimeFn25.createRuntimeFn)({ defaultClassName: "kiolio0", variantClassNames: { variant: { display: "kiolio1", h1: "kiolio2", h2: "kiolio3", h3: "kiolio4", h4: "kiolio5", "body-lg": "kiolio6", body: "kiolio7", "body-sm": "kiolio8", caption: "kiolio9" }, color: { "default": "kiolioa", muted: "kioliob", subtle: "kiolioc", primary: "kioliod", danger: "kiolioe", success: "kioliof", warning: "kioliog", inherit: "kiolioh" }, weight: { regular: "kiolioi", medium: "kiolioj", semibold: "kioliok", bold: "kioliol" }, align: { start: "kioliom", center: "kiolion", end: "kiolioo" }, truncate: { true: "kioliop" } }, defaultVariants: { variant: "body", color: "default" }, compoundVariants: [] });
|
|
2828
3353
|
|
|
2829
3354
|
// src/components/Typography/Typography.tsx
|
|
2830
|
-
var
|
|
3355
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2831
3356
|
var defaultElement = {
|
|
2832
3357
|
display: "h1",
|
|
2833
3358
|
h1: "h1",
|
|
@@ -2839,9 +3364,9 @@ var defaultElement = {
|
|
|
2839
3364
|
"body-sm": "p",
|
|
2840
3365
|
caption: "span"
|
|
2841
3366
|
};
|
|
2842
|
-
var Typography = /* @__PURE__ */ (0,
|
|
3367
|
+
var Typography = /* @__PURE__ */ (0, import_react43.forwardRef)(function Typography2({ variant = "body", as, color, weight, align, truncate, className, ...rest }, ref) {
|
|
2843
3368
|
const Component = as ?? defaultElement[variant];
|
|
2844
|
-
return /* @__PURE__ */ (0,
|
|
3369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2845
3370
|
Component,
|
|
2846
3371
|
{
|
|
2847
3372
|
ref,
|
|
@@ -2852,7 +3377,7 @@ var Typography = /* @__PURE__ */ (0, import_react38.forwardRef)(function Typogra
|
|
|
2852
3377
|
});
|
|
2853
3378
|
|
|
2854
3379
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
2855
|
-
var
|
|
3380
|
+
var import_react44 = require("react");
|
|
2856
3381
|
|
|
2857
3382
|
// src/components/VerificationCodeInput/VerificationCodeInput.css.ts
|
|
2858
3383
|
var input4 = "ea01812";
|
|
@@ -2862,9 +3387,9 @@ var slots = "ea01811";
|
|
|
2862
3387
|
var timer = "ea01814";
|
|
2863
3388
|
|
|
2864
3389
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
2865
|
-
var
|
|
3390
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2866
3391
|
var formatTime = (seconds) => `${String(Math.floor(seconds / 60)).padStart(2, "0")}:${String(seconds % 60).padStart(2, "0")}`;
|
|
2867
|
-
var VerificationCodeInput = /* @__PURE__ */ (0,
|
|
3392
|
+
var VerificationCodeInput = /* @__PURE__ */ (0, import_react44.forwardRef)(
|
|
2868
3393
|
function VerificationCodeInput2(props, ref) {
|
|
2869
3394
|
const {
|
|
2870
3395
|
length = 6,
|
|
@@ -2873,7 +3398,7 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
|
2873
3398
|
onValueChange,
|
|
2874
3399
|
onComplete,
|
|
2875
3400
|
type = "numeric",
|
|
2876
|
-
label:
|
|
3401
|
+
label: labelProp,
|
|
2877
3402
|
helperText: helperText3,
|
|
2878
3403
|
error,
|
|
2879
3404
|
disabled,
|
|
@@ -2881,29 +3406,33 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
|
2881
3406
|
expiresIn,
|
|
2882
3407
|
onExpire,
|
|
2883
3408
|
onResend,
|
|
2884
|
-
resendText
|
|
2885
|
-
expiredText
|
|
3409
|
+
resendText: resendTextProp,
|
|
3410
|
+
expiredText: expiredTextProp,
|
|
2886
3411
|
name,
|
|
2887
3412
|
id,
|
|
2888
3413
|
className
|
|
2889
3414
|
} = props;
|
|
2890
|
-
const
|
|
3415
|
+
const m = useMessages();
|
|
3416
|
+
const label6 = labelProp ?? m.verificationCode ?? "\uC778\uC99D\uBC88\uD638";
|
|
3417
|
+
const resendText = resendTextProp ?? m.resend ?? "\uC7AC\uC804\uC1A1";
|
|
3418
|
+
const expiredText = expiredTextProp ?? m.verificationExpired ?? "\uC778\uC99D \uC2DC\uAC04\uC774 \uC9C0\uB0AC\uC5B4\uC694. \uC7AC\uC804\uC1A1\uD574 \uC8FC\uC138\uC694.";
|
|
3419
|
+
const generatedId = (0, import_react44.useId)();
|
|
2891
3420
|
const inputId = id ?? generatedId;
|
|
2892
3421
|
const helperId = `${inputId}-helper`;
|
|
2893
3422
|
const statusId = `${inputId}-status`;
|
|
2894
|
-
const inputRef = (0,
|
|
3423
|
+
const inputRef = (0, import_react44.useRef)(null);
|
|
2895
3424
|
const isControlled = "value" in props;
|
|
2896
|
-
const [innerValue, setInnerValue] = (0,
|
|
3425
|
+
const [innerValue, setInnerValue] = (0, import_react44.useState)(defaultValue ?? "");
|
|
2897
3426
|
const code = (isControlled ? value4 ?? "" : innerValue).slice(0, length);
|
|
2898
|
-
const [focused, setFocused] = (0,
|
|
2899
|
-
const [endAt, setEndAt] = (0,
|
|
2900
|
-
const [remaining, setRemaining] = (0,
|
|
3427
|
+
const [focused, setFocused] = (0, import_react44.useState)(false);
|
|
3428
|
+
const [endAt, setEndAt] = (0, import_react44.useState)(() => expiresIn ? Date.now() + expiresIn * 1e3 : null);
|
|
3429
|
+
const [remaining, setRemaining] = (0, import_react44.useState)(expiresIn ?? 0);
|
|
2901
3430
|
const expired = expiresIn !== void 0 && remaining <= 0;
|
|
2902
|
-
const onExpireRef = (0,
|
|
2903
|
-
(0,
|
|
3431
|
+
const onExpireRef = (0, import_react44.useRef)(onExpire);
|
|
3432
|
+
(0, import_react44.useEffect)(() => {
|
|
2904
3433
|
onExpireRef.current = onExpire;
|
|
2905
3434
|
});
|
|
2906
|
-
(0,
|
|
3435
|
+
(0, import_react44.useEffect)(() => {
|
|
2907
3436
|
if (endAt === null) return;
|
|
2908
3437
|
const tick = () => {
|
|
2909
3438
|
const left = Math.max(0, Math.ceil((endAt - Date.now()) / 1e3));
|
|
@@ -2936,19 +3465,19 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
|
2936
3465
|
}
|
|
2937
3466
|
inputRef.current?.focus();
|
|
2938
3467
|
};
|
|
2939
|
-
const description6 = helperText3 ?? `${length}\uC790\uB9AC ${type === "numeric" ? "\uC22B\uC790" : "\uBB38\uC790"}\uB97C \uC785\uB825\uD558\uC138\uC694.`;
|
|
3468
|
+
const description6 = helperText3 ?? m.verificationCodeHint?.(length, type) ?? `${length}\uC790\uB9AC ${type === "numeric" ? "\uC22B\uC790" : "\uBB38\uC790"}\uB97C \uC785\uB825\uD558\uC138\uC694.`;
|
|
2940
3469
|
const activeIndex = Math.min(code.length, length - 1);
|
|
2941
|
-
return /* @__PURE__ */ (0,
|
|
3470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
2942
3471
|
"div",
|
|
2943
3472
|
{
|
|
2944
3473
|
className: cx(field, className),
|
|
2945
3474
|
"data-invalid": error || void 0,
|
|
2946
3475
|
"data-disabled": disabled || void 0,
|
|
2947
3476
|
children: [
|
|
2948
|
-
/* @__PURE__ */ (0,
|
|
2949
|
-
/* @__PURE__ */ (0,
|
|
2950
|
-
/* @__PURE__ */ (0,
|
|
2951
|
-
/* @__PURE__ */ (0,
|
|
3477
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("label", { htmlFor: inputId, className: label, children: label6 }),
|
|
3478
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: row4, children: [
|
|
3479
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: slots, children: [
|
|
3480
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2952
3481
|
"input",
|
|
2953
3482
|
{
|
|
2954
3483
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -2968,7 +3497,7 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
|
2968
3497
|
className: input4
|
|
2969
3498
|
}
|
|
2970
3499
|
),
|
|
2971
|
-
Array.from({ length }, (_, index) => /* @__PURE__ */ (0,
|
|
3500
|
+
Array.from({ length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2972
3501
|
"div",
|
|
2973
3502
|
{
|
|
2974
3503
|
className: slot,
|
|
@@ -2979,12 +3508,12 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
|
2979
3508
|
index
|
|
2980
3509
|
))
|
|
2981
3510
|
] }),
|
|
2982
|
-
expiresIn !== void 0 && /* @__PURE__ */ (0,
|
|
2983
|
-
onResend && /* @__PURE__ */ (0,
|
|
3511
|
+
expiresIn !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { role: "timer", className: timer, children: formatTime(remaining) }),
|
|
3512
|
+
onResend && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Button, { size: "sm", variant: "outline", color: "neutral", onClick: resend, disabled, children: resendText })
|
|
2984
3513
|
] }),
|
|
2985
|
-
/* @__PURE__ */ (0,
|
|
2986
|
-
/* @__PURE__ */ (0,
|
|
2987
|
-
name && /* @__PURE__ */ (0,
|
|
3514
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { id: helperId, className: helperText({ error }), children: description6 }),
|
|
3515
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { id: statusId, role: "status", className: helperText({ error: true }), children: expired ? expiredText : "" }),
|
|
3516
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("input", { type: "hidden", name, value: code })
|
|
2988
3517
|
]
|
|
2989
3518
|
}
|
|
2990
3519
|
);
|
|
@@ -3003,12 +3532,14 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
|
3003
3532
|
Breadcrumb,
|
|
3004
3533
|
BusinessNumberInput,
|
|
3005
3534
|
Button,
|
|
3535
|
+
Calendar,
|
|
3006
3536
|
Card,
|
|
3007
3537
|
CardBody,
|
|
3008
3538
|
CardFooter,
|
|
3009
3539
|
CardHeader,
|
|
3010
3540
|
Checkbox,
|
|
3011
3541
|
Combobox,
|
|
3542
|
+
DatePicker,
|
|
3012
3543
|
Divider,
|
|
3013
3544
|
Drawer,
|
|
3014
3545
|
DrawerClose,
|
|
@@ -3022,6 +3553,7 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
|
3022
3553
|
IconButton,
|
|
3023
3554
|
Input,
|
|
3024
3555
|
Link,
|
|
3556
|
+
LocaleProvider,
|
|
3025
3557
|
Modal,
|
|
3026
3558
|
ModalClose,
|
|
3027
3559
|
Pagination,
|
|
@@ -3058,14 +3590,18 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
|
3058
3590
|
contrastRatio,
|
|
3059
3591
|
createIntentColors,
|
|
3060
3592
|
createTheme,
|
|
3593
|
+
en,
|
|
3061
3594
|
formatBusinessNumber,
|
|
3062
3595
|
formatKoreanAmount,
|
|
3596
|
+
formatKoreanDate,
|
|
3063
3597
|
formatPhoneNumber,
|
|
3064
3598
|
hasAllRequiredAgreements,
|
|
3065
3599
|
isValidBusinessNumber,
|
|
3066
3600
|
kakaoPostcodeProvider,
|
|
3601
|
+
parseISODate,
|
|
3067
3602
|
themeClass,
|
|
3068
|
-
|
|
3603
|
+
toISODate,
|
|
3604
|
+
useMessages,
|
|
3069
3605
|
usePortalProps,
|
|
3070
3606
|
useTheme,
|
|
3071
3607
|
useToast,
|