@bestow-ui/react 0.12.0 → 1.1.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 +2 -2
- package/dist/chunk-PFEZ3D2H.js +212 -0
- package/dist/chunk-PFEZ3D2H.js.map +1 -0
- package/dist/client.js +3279 -0
- package/dist/client.js.map +1 -0
- package/dist/index.cjs +748 -575
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +119 -9
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +234 -108
- package/dist/index.d.ts +234 -108
- package/dist/index.js +2 -3507
- package/dist/shared.js +248 -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,
|
|
@@ -72,8 +72,10 @@ __export(index_exports, {
|
|
|
72
72
|
PopoverClose: () => PopoverClose,
|
|
73
73
|
Progress: () => Progress,
|
|
74
74
|
RadioGroup: () => RadioGroup,
|
|
75
|
+
SegmentedControl: () => SegmentedControl,
|
|
75
76
|
Select: () => Select,
|
|
76
77
|
Skeleton: () => Skeleton,
|
|
78
|
+
SkipLink: () => SkipLink,
|
|
77
79
|
Slider: () => Slider,
|
|
78
80
|
Spinner: () => Spinner,
|
|
79
81
|
Stack: () => Stack,
|
|
@@ -112,13 +114,12 @@ __export(index_exports, {
|
|
|
112
114
|
themeClass: () => themeClass,
|
|
113
115
|
toISODate: () => toISODate,
|
|
114
116
|
useMessages: () => useMessages,
|
|
115
|
-
usePortalClassName: () => usePortalClassName,
|
|
116
117
|
usePortalProps: () => usePortalProps,
|
|
117
118
|
useTheme: () => useTheme,
|
|
118
119
|
useToast: () => useToast,
|
|
119
120
|
vars: () => vars
|
|
120
121
|
});
|
|
121
|
-
module.exports = __toCommonJS(
|
|
122
|
+
module.exports = __toCommonJS(src_exports);
|
|
122
123
|
|
|
123
124
|
// src/theme/contract.css.ts
|
|
124
125
|
var themeClass = { light: "tkagtb0", dark: "tkagtb1" };
|
|
@@ -203,36 +204,43 @@ function hoverFor(base, delta, contrast) {
|
|
|
203
204
|
if (contrastRatio(contrast, preferred) >= 4.5) return preferred;
|
|
204
205
|
return withL(base, Math.min(1, Math.max(0, base.l - delta)));
|
|
205
206
|
}
|
|
206
|
-
function
|
|
207
|
+
function solidWithContrast(color) {
|
|
207
208
|
const white = import_tokens.palette.white;
|
|
208
209
|
const dark = import_tokens.palette.gray[900];
|
|
209
|
-
if (contrastRatio(white,
|
|
210
|
-
|
|
210
|
+
if (contrastRatio(white, color) >= 4.5) return { solid: color, contrast: white };
|
|
211
|
+
if (contrastRatio(dark, color) >= 4.5) return { solid: color, contrast: dark };
|
|
212
|
+
const base = rgbToOklch(parseHex(color));
|
|
213
|
+
for (let delta = 5e-3; delta <= 1; delta += 5e-3) {
|
|
214
|
+
const darker = withL(base, Math.max(0, base.l - delta));
|
|
215
|
+
if (contrastRatio(white, darker) >= 4.5) return { solid: darker, contrast: white };
|
|
216
|
+
const lighter = withL(base, Math.min(1, base.l + delta));
|
|
217
|
+
if (contrastRatio(dark, lighter) >= 4.5) return { solid: lighter, contrast: dark };
|
|
218
|
+
}
|
|
219
|
+
return { solid: import_tokens.palette.black, contrast: white };
|
|
211
220
|
}
|
|
212
221
|
var rgba = (hex, alpha) => {
|
|
213
222
|
const [r, g, b] = parseHex(hex).map((v) => Math.round(v * 255));
|
|
214
223
|
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
215
224
|
};
|
|
216
225
|
function createIntentColors(intent, color) {
|
|
217
|
-
const
|
|
218
|
-
const base = rgbToOklch(parseHex(
|
|
226
|
+
const input5 = toHex(parseHex(color));
|
|
227
|
+
const base = rgbToOklch(parseHex(input5));
|
|
219
228
|
const lightSubtle = withL(base, 0.97, Math.min(base.c, 0.12) * 0.3);
|
|
220
229
|
const lightSubtleHover = withL(base, 0.93, Math.min(base.c, 0.12) * 0.45);
|
|
221
|
-
const lightContrast =
|
|
230
|
+
const { solid, contrast: lightContrast } = solidWithContrast(input5);
|
|
222
231
|
const light = {
|
|
223
232
|
solid,
|
|
224
|
-
solidHover: hoverFor(
|
|
233
|
+
solidHover: hoverFor(rgbToOklch(parseHex(solid)), -0.06, lightContrast),
|
|
225
234
|
contrast: lightContrast,
|
|
226
235
|
subtle: lightSubtle,
|
|
227
236
|
subtleHover: lightSubtleHover,
|
|
228
237
|
text: findReadable(base, Math.min(base.l, 0.55), -0.02, [import_tokens.lightColors.bg.default, lightSubtle, lightSubtleHover])
|
|
229
238
|
};
|
|
230
239
|
const darkBg = import_tokens.darkColors.bg.default;
|
|
231
|
-
const darkSolid = base.l < 0.5 ? withL(base, 0.55) :
|
|
240
|
+
const { solid: darkSolid, contrast: darkContrast } = solidWithContrast(base.l < 0.5 ? withL(base, 0.55) : input5);
|
|
232
241
|
const darkBase = rgbToOklch(parseHex(darkSolid));
|
|
233
242
|
const darkSubtleOnBg = blend(darkSolid, 0.16, darkBg);
|
|
234
243
|
const darkSubtleHoverOnBg = blend(darkSolid, 0.26, darkBg);
|
|
235
|
-
const darkContrast = pickContrast(darkSolid);
|
|
236
244
|
const dark = {
|
|
237
245
|
solid: darkSolid,
|
|
238
246
|
solidHover: hoverFor(darkBase, 0.06, darkContrast),
|
|
@@ -295,65 +303,6 @@ function themeToStyle(theme, mode) {
|
|
|
295
303
|
return Object.keys(map).length ? (0, import_dynamic.assignInlineVars)(map) : void 0;
|
|
296
304
|
}
|
|
297
305
|
|
|
298
|
-
// src/theme/ThemeProvider.tsx
|
|
299
|
-
var import_react = require("react");
|
|
300
|
-
|
|
301
|
-
// src/utils/cx.ts
|
|
302
|
-
function cx(...classNames) {
|
|
303
|
-
return classNames.filter(Boolean).join(" ");
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
// src/theme/ThemeProvider.css.ts
|
|
307
|
-
var portal = "sfyhlv0";
|
|
308
|
-
var root = "sfyhlv1 sfyhlv0";
|
|
309
|
-
|
|
310
|
-
// src/theme/ThemeProvider.tsx
|
|
311
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
312
|
-
var ThemeContext = /* @__PURE__ */ (0, import_react.createContext)({ theme: "light" });
|
|
313
|
-
var ThemeProvider = /* @__PURE__ */ (0, import_react.forwardRef)(function ThemeProvider2({ theme: themeProp, overrides, className, style, children, ...rest }, ref) {
|
|
314
|
-
const parent = (0, import_react.useContext)(ThemeContext);
|
|
315
|
-
const theme = themeProp ?? parent.theme;
|
|
316
|
-
const merged = (0, import_react.useMemo)(() => mergeThemes(parent.overrides, overrides), [parent.overrides, overrides]);
|
|
317
|
-
const value4 = (0, import_react.useMemo)(
|
|
318
|
-
() => ({ theme, overrides: merged, style: themeToStyle(merged, theme) }),
|
|
319
|
-
[theme, merged]
|
|
320
|
-
);
|
|
321
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeContext.Provider, { value: value4, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
322
|
-
"div",
|
|
323
|
-
{
|
|
324
|
-
ref,
|
|
325
|
-
"data-theme": theme,
|
|
326
|
-
className: cx(themeClass[theme], root, className),
|
|
327
|
-
style: value4.style ? { ...value4.style, ...style } : style,
|
|
328
|
-
...rest,
|
|
329
|
-
children
|
|
330
|
-
}
|
|
331
|
-
) });
|
|
332
|
-
});
|
|
333
|
-
function useTheme() {
|
|
334
|
-
return (0, import_react.useContext)(ThemeContext).theme;
|
|
335
|
-
}
|
|
336
|
-
function usePortalProps() {
|
|
337
|
-
const { theme, style } = (0, import_react.useContext)(ThemeContext);
|
|
338
|
-
return { className: cx(themeClass[theme], portal), style };
|
|
339
|
-
}
|
|
340
|
-
function usePortalClassName() {
|
|
341
|
-
return usePortalProps().className;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
// src/i18n/LocaleProvider.tsx
|
|
345
|
-
var import_react2 = require("react");
|
|
346
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
347
|
-
var MessagesContext = /* @__PURE__ */ (0, import_react2.createContext)({});
|
|
348
|
-
function LocaleProvider({ messages, children }) {
|
|
349
|
-
const parent = (0, import_react2.useContext)(MessagesContext);
|
|
350
|
-
const value4 = (0, import_react2.useMemo)(() => ({ ...parent, ...messages }), [parent, messages]);
|
|
351
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MessagesContext.Provider, { value: value4, children });
|
|
352
|
-
}
|
|
353
|
-
function useMessages() {
|
|
354
|
-
return (0, import_react2.useContext)(MessagesContext);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
306
|
// src/i18n/en.ts
|
|
358
307
|
var WEEKDAYS_LONG = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
359
308
|
var MONTHS = [
|
|
@@ -382,6 +331,8 @@ var en = {
|
|
|
382
331
|
newWindow: "(opens in a new window)",
|
|
383
332
|
noResults: "No results",
|
|
384
333
|
openList: "Show options",
|
|
334
|
+
clearSelection: "Clear selection",
|
|
335
|
+
skipToContent: "Skip to main content",
|
|
385
336
|
rangeStart: "minimum",
|
|
386
337
|
rangeEnd: "maximum",
|
|
387
338
|
agreeAll: "Agree to all",
|
|
@@ -425,6 +376,209 @@ var en = {
|
|
|
425
376
|
dateIncomplete: "Enter the date as YYYY-MM-DD."
|
|
426
377
|
};
|
|
427
378
|
|
|
379
|
+
// src/utils/koreanFormat.ts
|
|
380
|
+
var onlyDigits = (input5) => input5.replace(/\D/g, "");
|
|
381
|
+
function phoneNumberMaxDigits(digits) {
|
|
382
|
+
if (digits.startsWith("02")) return 10;
|
|
383
|
+
if (/^1[568]/.test(digits)) return 8;
|
|
384
|
+
return 11;
|
|
385
|
+
}
|
|
386
|
+
function formatPhoneNumber(input5) {
|
|
387
|
+
const d = onlyDigits(input5).slice(0, phoneNumberMaxDigits(onlyDigits(input5)));
|
|
388
|
+
if (d.startsWith("02")) {
|
|
389
|
+
if (d.length <= 2) return d;
|
|
390
|
+
if (d.length <= 5) return `${d.slice(0, 2)}-${d.slice(2)}`;
|
|
391
|
+
if (d.length <= 9) return `${d.slice(0, 2)}-${d.slice(2, 5)}-${d.slice(5)}`;
|
|
392
|
+
return `${d.slice(0, 2)}-${d.slice(2, 6)}-${d.slice(6)}`;
|
|
393
|
+
}
|
|
394
|
+
if (/^1[568]/.test(d)) {
|
|
395
|
+
return d.length <= 4 ? d : `${d.slice(0, 4)}-${d.slice(4)}`;
|
|
396
|
+
}
|
|
397
|
+
if (d.length <= 3) return d;
|
|
398
|
+
if (d.length <= 6) return `${d.slice(0, 3)}-${d.slice(3)}`;
|
|
399
|
+
if (d.length <= 10) return `${d.slice(0, 3)}-${d.slice(3, 6)}-${d.slice(6)}`;
|
|
400
|
+
return `${d.slice(0, 3)}-${d.slice(3, 7)}-${d.slice(7)}`;
|
|
401
|
+
}
|
|
402
|
+
function formatBusinessNumber(input5) {
|
|
403
|
+
const d = onlyDigits(input5).slice(0, 10);
|
|
404
|
+
if (d.length <= 3) return d;
|
|
405
|
+
if (d.length <= 5) return `${d.slice(0, 3)}-${d.slice(3)}`;
|
|
406
|
+
return `${d.slice(0, 3)}-${d.slice(3, 5)}-${d.slice(5)}`;
|
|
407
|
+
}
|
|
408
|
+
function isValidBusinessNumber(input5) {
|
|
409
|
+
const d = onlyDigits(input5);
|
|
410
|
+
if (d.length !== 10) return false;
|
|
411
|
+
const weights = [1, 3, 7, 1, 3, 7, 1, 3, 5];
|
|
412
|
+
const digits = [...d].map(Number);
|
|
413
|
+
let sum = weights.reduce((acc, w, i) => acc + w * digits[i], 0);
|
|
414
|
+
sum += Math.floor(digits[8] * 5 / 10);
|
|
415
|
+
return (10 - sum % 10) % 10 === digits[9];
|
|
416
|
+
}
|
|
417
|
+
function formatKoreanAmount(amount, unit = "\uC6D0") {
|
|
418
|
+
const n = Math.floor(Math.abs(amount));
|
|
419
|
+
if (n === 0) return `0${unit}`;
|
|
420
|
+
const units = [
|
|
421
|
+
{ value: 1e12, label: "\uC870" },
|
|
422
|
+
{ value: 1e8, label: "\uC5B5" },
|
|
423
|
+
{ value: 1e4, label: "\uB9CC" },
|
|
424
|
+
{ value: 1, label: "" }
|
|
425
|
+
];
|
|
426
|
+
let rest = n;
|
|
427
|
+
const parts = [];
|
|
428
|
+
for (const u of units) {
|
|
429
|
+
const q = Math.floor(rest / u.value);
|
|
430
|
+
rest %= u.value;
|
|
431
|
+
if (q > 0) parts.push(`${q.toLocaleString("ko-KR")}${u.label}`);
|
|
432
|
+
}
|
|
433
|
+
return `${amount < 0 ? "-" : ""}${parts.join(" ")}${unit}`;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// src/utils/date.ts
|
|
437
|
+
var pad = (n) => String(n).padStart(2, "0");
|
|
438
|
+
function toISODate(date) {
|
|
439
|
+
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
|
|
440
|
+
}
|
|
441
|
+
function parseISODate(value4) {
|
|
442
|
+
const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value4 ?? "");
|
|
443
|
+
if (!m) return null;
|
|
444
|
+
const [y, mo, d] = [Number(m[1]), Number(m[2]), Number(m[3])];
|
|
445
|
+
const date = new Date(y, mo - 1, d);
|
|
446
|
+
return date.getFullYear() === y && date.getMonth() === mo - 1 && date.getDate() === d ? date : null;
|
|
447
|
+
}
|
|
448
|
+
function addDays(date, days) {
|
|
449
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + days);
|
|
450
|
+
}
|
|
451
|
+
function addMonths(date, months) {
|
|
452
|
+
const target = new Date(date.getFullYear(), date.getMonth() + months, 1);
|
|
453
|
+
const lastDay = new Date(target.getFullYear(), target.getMonth() + 1, 0).getDate();
|
|
454
|
+
return new Date(target.getFullYear(), target.getMonth(), Math.min(date.getDate(), lastDay));
|
|
455
|
+
}
|
|
456
|
+
function isSameDay(a, b) {
|
|
457
|
+
return !!a && !!b && toISODate(a) === toISODate(b);
|
|
458
|
+
}
|
|
459
|
+
function isSameMonth(a, b) {
|
|
460
|
+
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth();
|
|
461
|
+
}
|
|
462
|
+
function compareDays(a, b) {
|
|
463
|
+
const x = toISODate(a);
|
|
464
|
+
const y = toISODate(b);
|
|
465
|
+
return x < y ? -1 : x > y ? 1 : 0;
|
|
466
|
+
}
|
|
467
|
+
function getCalendarWeeks(year, month) {
|
|
468
|
+
const first = new Date(year, month, 1);
|
|
469
|
+
const start = addDays(first, -first.getDay());
|
|
470
|
+
return Array.from({ length: 6 }, (_, week) => Array.from({ length: 7 }, (_2, day2) => addDays(start, week * 7 + day2)));
|
|
471
|
+
}
|
|
472
|
+
var KOREAN_WEEKDAYS = ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"];
|
|
473
|
+
function formatKoreanDate(date, withWeekday = true) {
|
|
474
|
+
const base = `${date.getFullYear()}\uB144 ${date.getMonth() + 1}\uC6D4 ${date.getDate()}\uC77C`;
|
|
475
|
+
return withWeekday ? `${base} ${KOREAN_WEEKDAYS[date.getDay()]}\uC694\uC77C` : base;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// src/components/AddressInput/addressProviders.ts
|
|
479
|
+
var KAKAO_POSTCODE_SRC = "https://t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";
|
|
480
|
+
var loading = null;
|
|
481
|
+
function loadKakaoPostcode() {
|
|
482
|
+
const w = window;
|
|
483
|
+
const existing = w.kakao?.Postcode ?? w.daum?.Postcode;
|
|
484
|
+
if (existing) return Promise.resolve(existing);
|
|
485
|
+
loading ?? (loading = new Promise((resolve, reject) => {
|
|
486
|
+
const script = document.createElement("script");
|
|
487
|
+
script.src = KAKAO_POSTCODE_SRC;
|
|
488
|
+
script.async = true;
|
|
489
|
+
script.onload = () => {
|
|
490
|
+
const ctor = w.kakao?.Postcode ?? w.daum?.Postcode;
|
|
491
|
+
if (ctor) resolve(ctor);
|
|
492
|
+
else reject(new Error("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uCC3E\uC9C0 \uBABB\uD588\uC5B4\uC694"));
|
|
493
|
+
};
|
|
494
|
+
script.onerror = () => {
|
|
495
|
+
loading = null;
|
|
496
|
+
reject(new Error("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC5B4\uC694"));
|
|
497
|
+
};
|
|
498
|
+
document.head.appendChild(script);
|
|
499
|
+
}));
|
|
500
|
+
return loading;
|
|
501
|
+
}
|
|
502
|
+
function composeExtraAddress(data) {
|
|
503
|
+
if (data.userSelectedType !== "R") return "";
|
|
504
|
+
const parts = [];
|
|
505
|
+
if (data.bname && /[동로가]$/.test(data.bname)) parts.push(data.bname);
|
|
506
|
+
if (data.buildingName && data.apartment === "Y") parts.push(data.buildingName);
|
|
507
|
+
return parts.length ? ` (${parts.join(", ")})` : "";
|
|
508
|
+
}
|
|
509
|
+
var kakaoPostcodeProvider = async (container2, onSelect) => {
|
|
510
|
+
const Postcode = await loadKakaoPostcode();
|
|
511
|
+
new Postcode({
|
|
512
|
+
width: "100%",
|
|
513
|
+
height: "100%",
|
|
514
|
+
oncomplete: (data) => {
|
|
515
|
+
const address = data.userSelectedType === "R" ? data.roadAddress : data.jibunAddress || data.autoJibunAddress || "";
|
|
516
|
+
onSelect({ zonecode: data.zonecode, address, extraAddress: composeExtraAddress(data) });
|
|
517
|
+
}
|
|
518
|
+
}).embed(container2);
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
// src/components/AgreementGroup/agreements.ts
|
|
522
|
+
function hasAllRequiredAgreements(items2, value4) {
|
|
523
|
+
return items2.every((item8) => !item8.required || value4.includes(item8.value));
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
// src/theme/ThemeProvider.tsx
|
|
527
|
+
var import_react = require("react");
|
|
528
|
+
|
|
529
|
+
// src/utils/cx.ts
|
|
530
|
+
function cx(...classNames) {
|
|
531
|
+
return classNames.filter(Boolean).join(" ");
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
// src/theme/ThemeProvider.css.ts
|
|
535
|
+
var portal = "sfyhlv0";
|
|
536
|
+
var root = "sfyhlv1 sfyhlv0";
|
|
537
|
+
|
|
538
|
+
// src/theme/ThemeProvider.tsx
|
|
539
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
540
|
+
var ThemeContext = /* @__PURE__ */ (0, import_react.createContext)({ theme: "light" });
|
|
541
|
+
var ThemeProvider = /* @__PURE__ */ (0, import_react.forwardRef)(function ThemeProvider2({ theme: themeProp, overrides, className, style, children, ...rest }, ref) {
|
|
542
|
+
const parent = (0, import_react.useContext)(ThemeContext);
|
|
543
|
+
const theme = themeProp ?? parent.theme;
|
|
544
|
+
const merged = (0, import_react.useMemo)(() => mergeThemes(parent.overrides, overrides), [parent.overrides, overrides]);
|
|
545
|
+
const value4 = (0, import_react.useMemo)(
|
|
546
|
+
() => ({ theme, overrides: merged, style: themeToStyle(merged, theme) }),
|
|
547
|
+
[theme, merged]
|
|
548
|
+
);
|
|
549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeContext.Provider, { value: value4, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
550
|
+
"div",
|
|
551
|
+
{
|
|
552
|
+
ref,
|
|
553
|
+
"data-theme": theme,
|
|
554
|
+
className: cx(themeClass[theme], root, className),
|
|
555
|
+
style: value4.style ? { ...value4.style, ...style } : style,
|
|
556
|
+
...rest,
|
|
557
|
+
children
|
|
558
|
+
}
|
|
559
|
+
) });
|
|
560
|
+
});
|
|
561
|
+
function useTheme() {
|
|
562
|
+
return (0, import_react.useContext)(ThemeContext).theme;
|
|
563
|
+
}
|
|
564
|
+
function usePortalProps() {
|
|
565
|
+
const { theme, style } = (0, import_react.useContext)(ThemeContext);
|
|
566
|
+
return { className: cx(themeClass[theme], portal), style };
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
// src/i18n/LocaleProvider.tsx
|
|
570
|
+
var import_react2 = require("react");
|
|
571
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
572
|
+
var MessagesContext = /* @__PURE__ */ (0, import_react2.createContext)({});
|
|
573
|
+
function LocaleProvider({ messages, children }) {
|
|
574
|
+
const parent = (0, import_react2.useContext)(MessagesContext);
|
|
575
|
+
const value4 = (0, import_react2.useMemo)(() => ({ ...parent, ...messages }), [parent, messages]);
|
|
576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MessagesContext.Provider, { value: value4, children });
|
|
577
|
+
}
|
|
578
|
+
function useMessages() {
|
|
579
|
+
return (0, import_react2.useContext)(MessagesContext);
|
|
580
|
+
}
|
|
581
|
+
|
|
428
582
|
// src/components/Accordion/Accordion.tsx
|
|
429
583
|
var RadixAccordion = __toESM(require("@radix-ui/react-accordion"), 1);
|
|
430
584
|
var import_icons = require("@bestow-ui/icons");
|
|
@@ -475,23 +629,10 @@ var visuallyHidden = "_1kdtbw10";
|
|
|
475
629
|
var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
476
630
|
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: [] });
|
|
477
631
|
|
|
478
|
-
// src/utils/warnOnce.ts
|
|
479
|
-
var warned = /* @__PURE__ */ new Set();
|
|
480
|
-
function warnOnce(message) {
|
|
481
|
-
if (typeof process !== "undefined" && process.env.NODE_ENV === "production") return;
|
|
482
|
-
if (warned.has(message)) return;
|
|
483
|
-
warned.add(message);
|
|
484
|
-
console.warn(`[BestOW UI] ${message}`);
|
|
485
|
-
}
|
|
486
|
-
|
|
487
632
|
// src/components/Spinner/Spinner.tsx
|
|
488
633
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
489
634
|
var Spinner = /* @__PURE__ */ (0, import_react4.forwardRef)(function Spinner2({ size, color, label: labelProp, className, ...rest }, ref) {
|
|
490
635
|
const m = useMessages();
|
|
491
|
-
if (color === "current") {
|
|
492
|
-
warnOnce('Spinner \uC758 color="current" \uB294 deprecated \uC608\uC694. color="inherit" \uB97C \uC4F0\uC138\uC694 (1.0 \uC5D0\uC11C \uC81C\uAC70).');
|
|
493
|
-
color = "inherit";
|
|
494
|
-
}
|
|
495
636
|
const label6 = labelProp ?? m.loading ?? "\uB85C\uB529 \uC911";
|
|
496
637
|
const a11y = label6 ? { role: "status" } : { "aria-hidden": true };
|
|
497
638
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { ref, className: cx(spinner({ size, color }), className), ...a11y, ...rest, children: [
|
|
@@ -702,49 +843,6 @@ function Modal({
|
|
|
702
843
|
}
|
|
703
844
|
var ModalClose = Dialog.Close;
|
|
704
845
|
|
|
705
|
-
// src/components/AddressInput/addressProviders.ts
|
|
706
|
-
var KAKAO_POSTCODE_SRC = "https://t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";
|
|
707
|
-
var loading = null;
|
|
708
|
-
function loadKakaoPostcode() {
|
|
709
|
-
const w = window;
|
|
710
|
-
const existing = w.kakao?.Postcode ?? w.daum?.Postcode;
|
|
711
|
-
if (existing) return Promise.resolve(existing);
|
|
712
|
-
loading ?? (loading = new Promise((resolve, reject) => {
|
|
713
|
-
const script = document.createElement("script");
|
|
714
|
-
script.src = KAKAO_POSTCODE_SRC;
|
|
715
|
-
script.async = true;
|
|
716
|
-
script.onload = () => {
|
|
717
|
-
const ctor = w.kakao?.Postcode ?? w.daum?.Postcode;
|
|
718
|
-
if (ctor) resolve(ctor);
|
|
719
|
-
else reject(new Error("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uCC3E\uC9C0 \uBABB\uD588\uC5B4\uC694"));
|
|
720
|
-
};
|
|
721
|
-
script.onerror = () => {
|
|
722
|
-
loading = null;
|
|
723
|
-
reject(new Error("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC5B4\uC694"));
|
|
724
|
-
};
|
|
725
|
-
document.head.appendChild(script);
|
|
726
|
-
}));
|
|
727
|
-
return loading;
|
|
728
|
-
}
|
|
729
|
-
function composeExtraAddress(data) {
|
|
730
|
-
if (data.userSelectedType !== "R") return "";
|
|
731
|
-
const parts = [];
|
|
732
|
-
if (data.bname && /[동로가]$/.test(data.bname)) parts.push(data.bname);
|
|
733
|
-
if (data.buildingName && data.apartment === "Y") parts.push(data.buildingName);
|
|
734
|
-
return parts.length ? ` (${parts.join(", ")})` : "";
|
|
735
|
-
}
|
|
736
|
-
var kakaoPostcodeProvider = async (container2, onSelect) => {
|
|
737
|
-
const Postcode = await loadKakaoPostcode();
|
|
738
|
-
new Postcode({
|
|
739
|
-
width: "100%",
|
|
740
|
-
height: "100%",
|
|
741
|
-
oncomplete: (data) => {
|
|
742
|
-
const address = data.userSelectedType === "R" ? data.roadAddress : data.jibunAddress || data.autoJibunAddress || "";
|
|
743
|
-
onSelect({ zonecode: data.zonecode, address, extraAddress: composeExtraAddress(data) });
|
|
744
|
-
}
|
|
745
|
-
}).embed(container2);
|
|
746
|
-
};
|
|
747
|
-
|
|
748
846
|
// src/components/AddressInput/AddressInput.css.ts
|
|
749
847
|
var fieldset = "_16fi7uy0";
|
|
750
848
|
var legend = "_16fi7uy1";
|
|
@@ -1001,9 +1099,6 @@ var toggle = "j3uxdc8";
|
|
|
1001
1099
|
|
|
1002
1100
|
// src/components/AgreementGroup/AgreementGroup.tsx
|
|
1003
1101
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1004
|
-
function hasAllRequiredAgreements(items2, value4) {
|
|
1005
|
-
return items2.every((item7) => !item7.required || value4.includes(item7.value));
|
|
1006
|
-
}
|
|
1007
1102
|
var AgreementGroup = /* @__PURE__ */ (0, import_react11.forwardRef)(
|
|
1008
1103
|
function AgreementGroup2(props, ref) {
|
|
1009
1104
|
const {
|
|
@@ -1039,7 +1134,7 @@ var AgreementGroup = /* @__PURE__ */ (0, import_react11.forwardRef)(
|
|
|
1039
1134
|
if (!isControlled) setInnerValue(next);
|
|
1040
1135
|
onValueChange?.(next);
|
|
1041
1136
|
};
|
|
1042
|
-
const allValues = items2.map((
|
|
1137
|
+
const allValues = items2.map((item8) => item8.value);
|
|
1043
1138
|
const agreedCount = allValues.filter((v) => agreed.includes(v)).length;
|
|
1044
1139
|
const allChecked = items2.length > 0 && agreedCount === items2.length;
|
|
1045
1140
|
const toggleItem = (itemValue, checked) => update(checked ? [...agreed.filter((v) => v !== itemValue), itemValue] : agreed.filter((v) => v !== itemValue));
|
|
@@ -1063,28 +1158,28 @@ var AgreementGroup = /* @__PURE__ */ (0, import_react11.forwardRef)(
|
|
|
1063
1158
|
onChange: (event) => update(event.target.checked ? allValues : [])
|
|
1064
1159
|
}
|
|
1065
1160
|
) }),
|
|
1066
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { className: list, children: items2.map((
|
|
1067
|
-
const labelId = `${baseId}-${
|
|
1068
|
-
const toggleTextId = `${baseId}-${
|
|
1069
|
-
const contentId = `${baseId}-${
|
|
1070
|
-
const isOpen = expanded.includes(
|
|
1161
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { className: list, children: items2.map((item8) => {
|
|
1162
|
+
const labelId = `${baseId}-${item8.value}-label`;
|
|
1163
|
+
const toggleTextId = `${baseId}-${item8.value}-toggle`;
|
|
1164
|
+
const contentId = `${baseId}-${item8.value}-content`;
|
|
1165
|
+
const isOpen = expanded.includes(item8.value);
|
|
1071
1166
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { className: item2, children: [
|
|
1072
1167
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: row2, children: [
|
|
1073
1168
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1074
1169
|
Checkbox,
|
|
1075
1170
|
{
|
|
1076
1171
|
size: "sm",
|
|
1077
|
-
checked: agreed.includes(
|
|
1078
|
-
invalid: error &&
|
|
1079
|
-
onChange: (event) => toggleItem(
|
|
1172
|
+
checked: agreed.includes(item8.value),
|
|
1173
|
+
invalid: error && item8.required && !agreed.includes(item8.value),
|
|
1174
|
+
onChange: (event) => toggleItem(item8.value, event.target.checked),
|
|
1080
1175
|
label: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { id: labelId, children: [
|
|
1081
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: tag, "data-required":
|
|
1176
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: tag, "data-required": item8.required || void 0, children: item8.required ? requiredText : optionalText }),
|
|
1082
1177
|
" ",
|
|
1083
|
-
|
|
1178
|
+
item8.label
|
|
1084
1179
|
] })
|
|
1085
1180
|
}
|
|
1086
1181
|
),
|
|
1087
|
-
|
|
1182
|
+
item8.content && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1088
1183
|
"button",
|
|
1089
1184
|
{
|
|
1090
1185
|
type: "button",
|
|
@@ -1092,7 +1187,7 @@ var AgreementGroup = /* @__PURE__ */ (0, import_react11.forwardRef)(
|
|
|
1092
1187
|
"aria-expanded": isOpen,
|
|
1093
1188
|
"aria-controls": contentId,
|
|
1094
1189
|
"aria-labelledby": `${labelId} ${toggleTextId}`,
|
|
1095
|
-
onClick: () => setExpanded((prev) => isOpen ? prev.filter((v) => v !==
|
|
1190
|
+
onClick: () => setExpanded((prev) => isOpen ? prev.filter((v) => v !== item8.value) : [...prev, item8.value]),
|
|
1096
1191
|
children: [
|
|
1097
1192
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { id: toggleTextId, children: isOpen ? hideText : showText }),
|
|
1098
1193
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_icons4.ChevronDownIcon, { size: 14, className: chevron2 })
|
|
@@ -1100,10 +1195,10 @@ var AgreementGroup = /* @__PURE__ */ (0, import_react11.forwardRef)(
|
|
|
1100
1195
|
}
|
|
1101
1196
|
)
|
|
1102
1197
|
] }),
|
|
1103
|
-
|
|
1198
|
+
item8.content && isOpen && // 내용이 길면 스크롤된다 — 키보드로도 스크롤할 수 있게 포커스를 받는 이름 있는 영역으로 둔다
|
|
1104
1199
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
1105
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { id: contentId, role: "region", "aria-labelledby": labelId, tabIndex: 0, className: content3, children:
|
|
1106
|
-
] },
|
|
1200
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { id: contentId, role: "region", "aria-labelledby": labelId, tabIndex: 0, className: content3, children: item8.content })
|
|
1201
|
+
] }, item8.value);
|
|
1107
1202
|
}) })
|
|
1108
1203
|
] }),
|
|
1109
1204
|
name && agreed.map((v) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("input", { type: "hidden", name, value: v }, v)),
|
|
@@ -1121,111 +1216,60 @@ var import_icons5 = require("@bestow-ui/icons");
|
|
|
1121
1216
|
// src/components/Alert/Alert.css.ts
|
|
1122
1217
|
var import_createRuntimeFn6 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
1123
1218
|
var action = "bsmpc0j";
|
|
1124
|
-
var alert = /* @__PURE__ */ (0, import_createRuntimeFn6.createRuntimeFn)({ defaultClassName: "bsmpc06", variantClassNames: { variant: { soft: "bsmpc07", outline: "bsmpc08", solid: "bsmpc09" }, color: { primary: "bsmpc0a", neutral: "bsmpc0b", danger: "bsmpc0c", success: "bsmpc0d", warning: "bsmpc0e" } }, defaultVariants: { variant: "soft", color: "primary" }, compoundVariants: [] });
|
|
1125
|
-
var closeButton2 = "bsmpc0k";
|
|
1126
|
-
var content4 = "bsmpc0g";
|
|
1127
|
-
var description2 = "bsmpc0i";
|
|
1128
|
-
var icon2 = "bsmpc0f";
|
|
1129
|
-
var title2 = "bsmpc0h";
|
|
1130
|
-
|
|
1131
|
-
// src/components/Alert/Alert.tsx
|
|
1132
|
-
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1133
|
-
var defaultIcons = {
|
|
1134
|
-
primary: import_icons5.InfoIcon,
|
|
1135
|
-
neutral: import_icons5.InfoIcon,
|
|
1136
|
-
success: import_icons5.CircleCheckIcon,
|
|
1137
|
-
warning: import_icons5.TriangleAlertIcon,
|
|
1138
|
-
danger: import_icons5.CircleAlertIcon
|
|
1139
|
-
};
|
|
1140
|
-
var Alert = /* @__PURE__ */ (0, import_react12.forwardRef)(function Alert2({
|
|
1141
|
-
variant,
|
|
1142
|
-
color = "primary",
|
|
1143
|
-
title: title6,
|
|
1144
|
-
icon:
|
|
1145
|
-
action: action3,
|
|
1146
|
-
onClose,
|
|
1147
|
-
closeLabel: closeLabelProp,
|
|
1148
|
-
className,
|
|
1149
|
-
children,
|
|
1150
|
-
...rest
|
|
1151
|
-
}, ref) {
|
|
1152
|
-
const m = useMessages();
|
|
1153
|
-
const closeLabel = closeLabelProp ?? m.close ?? "\uB2EB\uAE30";
|
|
1154
|
-
const DefaultIcon = defaultIcons[color];
|
|
1155
|
-
const iconNode =
|
|
1156
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { ref, className: cx(alert({ variant, color }), className), ...rest, children: [
|
|
1157
|
-
iconNode !== false && iconNode !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: icon2, "aria-hidden": true, children: iconNode }),
|
|
1158
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: content4, children: [
|
|
1159
|
-
title6 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: title2, children: title6 }),
|
|
1160
|
-
children && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: description2, children })
|
|
1161
|
-
] }),
|
|
1162
|
-
action3 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: action, children: action3 }),
|
|
1163
|
-
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 }) })
|
|
1164
|
-
] });
|
|
1165
|
-
});
|
|
1166
|
-
|
|
1167
|
-
// src/components/AmountInput/AmountInput.tsx
|
|
1168
|
-
var
|
|
1169
|
-
|
|
1170
|
-
// src/utils/koreanFormat.ts
|
|
1171
|
-
var onlyDigits = (input5) => input5.replace(/\D/g, "");
|
|
1172
|
-
function phoneNumberMaxDigits(digits) {
|
|
1173
|
-
if (digits.startsWith("02")) return 10;
|
|
1174
|
-
if (/^1[568]/.test(digits)) return 8;
|
|
1175
|
-
return 11;
|
|
1176
|
-
}
|
|
1177
|
-
function formatPhoneNumber(input5) {
|
|
1178
|
-
const d = onlyDigits(input5).slice(0, phoneNumberMaxDigits(onlyDigits(input5)));
|
|
1179
|
-
if (d.startsWith("02")) {
|
|
1180
|
-
if (d.length <= 2) return d;
|
|
1181
|
-
if (d.length <= 5) return `${d.slice(0, 2)}-${d.slice(2)}`;
|
|
1182
|
-
if (d.length <= 9) return `${d.slice(0, 2)}-${d.slice(2, 5)}-${d.slice(5)}`;
|
|
1183
|
-
return `${d.slice(0, 2)}-${d.slice(2, 6)}-${d.slice(6)}`;
|
|
1184
|
-
}
|
|
1185
|
-
if (/^1[568]/.test(d)) {
|
|
1186
|
-
return d.length <= 4 ? d : `${d.slice(0, 4)}-${d.slice(4)}`;
|
|
1187
|
-
}
|
|
1188
|
-
if (d.length <= 3) return d;
|
|
1189
|
-
if (d.length <= 6) return `${d.slice(0, 3)}-${d.slice(3)}`;
|
|
1190
|
-
if (d.length <= 10) return `${d.slice(0, 3)}-${d.slice(3, 6)}-${d.slice(6)}`;
|
|
1191
|
-
return `${d.slice(0, 3)}-${d.slice(3, 7)}-${d.slice(7)}`;
|
|
1192
|
-
}
|
|
1193
|
-
function formatBusinessNumber(input5) {
|
|
1194
|
-
const d = onlyDigits(input5).slice(0, 10);
|
|
1195
|
-
if (d.length <= 3) return d;
|
|
1196
|
-
if (d.length <= 5) return `${d.slice(0, 3)}-${d.slice(3)}`;
|
|
1197
|
-
return `${d.slice(0, 3)}-${d.slice(3, 5)}-${d.slice(5)}`;
|
|
1198
|
-
}
|
|
1199
|
-
function isValidBusinessNumber(input5) {
|
|
1200
|
-
const d = onlyDigits(input5);
|
|
1201
|
-
if (d.length !== 10) return false;
|
|
1202
|
-
const weights = [1, 3, 7, 1, 3, 7, 1, 3, 5];
|
|
1203
|
-
const digits = [...d].map(Number);
|
|
1204
|
-
let sum = weights.reduce((acc, w, i) => acc + w * digits[i], 0);
|
|
1205
|
-
sum += Math.floor(digits[8] * 5 / 10);
|
|
1206
|
-
return (10 - sum % 10) % 10 === digits[9];
|
|
1207
|
-
}
|
|
1208
|
-
function formatKoreanAmount(amount, unit = "\uC6D0") {
|
|
1209
|
-
const n = Math.floor(Math.abs(amount));
|
|
1210
|
-
if (n === 0) return `0${unit}`;
|
|
1211
|
-
const units = [
|
|
1212
|
-
{ value: 1e12, label: "\uC870" },
|
|
1213
|
-
{ value: 1e8, label: "\uC5B5" },
|
|
1214
|
-
{ value: 1e4, label: "\uB9CC" },
|
|
1215
|
-
{ value: 1, label: "" }
|
|
1216
|
-
];
|
|
1217
|
-
let rest = n;
|
|
1218
|
-
const parts = [];
|
|
1219
|
-
for (const u of units) {
|
|
1220
|
-
const q = Math.floor(rest / u.value);
|
|
1221
|
-
rest %= u.value;
|
|
1222
|
-
if (q > 0) parts.push(`${q.toLocaleString("ko-KR")}${u.label}`);
|
|
1223
|
-
}
|
|
1224
|
-
return `${amount < 0 ? "-" : ""}${parts.join(" ")}${unit}`;
|
|
1225
|
-
}
|
|
1219
|
+
var alert = /* @__PURE__ */ (0, import_createRuntimeFn6.createRuntimeFn)({ defaultClassName: "bsmpc06", variantClassNames: { variant: { soft: "bsmpc07", outline: "bsmpc08", solid: "bsmpc09" }, color: { primary: "bsmpc0a", neutral: "bsmpc0b", danger: "bsmpc0c", success: "bsmpc0d", warning: "bsmpc0e" } }, defaultVariants: { variant: "soft", color: "primary" }, compoundVariants: [] });
|
|
1220
|
+
var closeButton2 = "bsmpc0k";
|
|
1221
|
+
var content4 = "bsmpc0g";
|
|
1222
|
+
var description2 = "bsmpc0i";
|
|
1223
|
+
var icon2 = "bsmpc0f";
|
|
1224
|
+
var title2 = "bsmpc0h";
|
|
1225
|
+
|
|
1226
|
+
// src/components/Alert/Alert.tsx
|
|
1227
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1228
|
+
var defaultIcons = {
|
|
1229
|
+
primary: import_icons5.InfoIcon,
|
|
1230
|
+
neutral: import_icons5.InfoIcon,
|
|
1231
|
+
success: import_icons5.CircleCheckIcon,
|
|
1232
|
+
warning: import_icons5.TriangleAlertIcon,
|
|
1233
|
+
danger: import_icons5.CircleAlertIcon
|
|
1234
|
+
};
|
|
1235
|
+
var Alert = /* @__PURE__ */ (0, import_react12.forwardRef)(function Alert2({
|
|
1236
|
+
variant,
|
|
1237
|
+
color = "primary",
|
|
1238
|
+
title: title6,
|
|
1239
|
+
icon: icon7,
|
|
1240
|
+
action: action3,
|
|
1241
|
+
onClose,
|
|
1242
|
+
closeLabel: closeLabelProp,
|
|
1243
|
+
className,
|
|
1244
|
+
children,
|
|
1245
|
+
...rest
|
|
1246
|
+
}, ref) {
|
|
1247
|
+
const m = useMessages();
|
|
1248
|
+
const closeLabel = closeLabelProp ?? m.close ?? "\uB2EB\uAE30";
|
|
1249
|
+
const DefaultIcon = defaultIcons[color];
|
|
1250
|
+
const iconNode = icon7 === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DefaultIcon, { size: 18 }) : icon7;
|
|
1251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { ref, className: cx(alert({ variant, color }), className), ...rest, children: [
|
|
1252
|
+
iconNode !== false && iconNode !== null && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: icon2, "aria-hidden": true, children: iconNode }),
|
|
1253
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: content4, children: [
|
|
1254
|
+
title6 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: title2, children: title6 }),
|
|
1255
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: description2, children })
|
|
1256
|
+
] }),
|
|
1257
|
+
action3 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: action, children: action3 }),
|
|
1258
|
+
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 }) })
|
|
1259
|
+
] });
|
|
1260
|
+
});
|
|
1261
|
+
|
|
1262
|
+
// src/components/AmountInput/AmountInput.tsx
|
|
1263
|
+
var import_react15 = require("react");
|
|
1226
1264
|
|
|
1227
1265
|
// src/utils/useFormattedInput.ts
|
|
1266
|
+
var import_react14 = require("react");
|
|
1267
|
+
|
|
1268
|
+
// src/utils/useIsomorphicLayoutEffect.ts
|
|
1228
1269
|
var import_react13 = require("react");
|
|
1270
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? import_react13.useLayoutEffect : import_react13.useEffect;
|
|
1271
|
+
|
|
1272
|
+
// src/utils/useFormattedInput.ts
|
|
1229
1273
|
function caretAfter(display, count2, isMeaningful) {
|
|
1230
1274
|
if (count2 <= 0) return 0;
|
|
1231
1275
|
let seen = 0;
|
|
@@ -1245,11 +1289,11 @@ function useFormattedInput({
|
|
|
1245
1289
|
isMeaningful,
|
|
1246
1290
|
inputRef
|
|
1247
1291
|
}) {
|
|
1248
|
-
const [innerValue, setInnerValue] = (0,
|
|
1292
|
+
const [innerValue, setInnerValue] = (0, import_react14.useState)(() => sanitize4(defaultValue ?? ""));
|
|
1249
1293
|
const raw = isControlled ? sanitize4(value4 ?? "") : innerValue;
|
|
1250
1294
|
const display = format2(raw);
|
|
1251
|
-
const pendingCaret = (0,
|
|
1252
|
-
(
|
|
1295
|
+
const pendingCaret = (0, import_react14.useRef)(null);
|
|
1296
|
+
useIsomorphicLayoutEffect(() => {
|
|
1253
1297
|
const input5 = inputRef.current;
|
|
1254
1298
|
if (pendingCaret.current === null || !input5 || document.activeElement !== input5) return;
|
|
1255
1299
|
const position = caretAfter(input5.value, pendingCaret.current, isMeaningful);
|
|
@@ -1295,7 +1339,7 @@ var input3 = "_70qkav0";
|
|
|
1295
1339
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1296
1340
|
var MAX_DIGITS = 15;
|
|
1297
1341
|
var isDigit = (char) => /\d/.test(char);
|
|
1298
|
-
var AmountInput = /* @__PURE__ */ (0,
|
|
1342
|
+
var AmountInput = /* @__PURE__ */ (0, import_react15.forwardRef)(
|
|
1299
1343
|
function AmountInput2(props, ref) {
|
|
1300
1344
|
const {
|
|
1301
1345
|
value: value4,
|
|
@@ -1311,7 +1355,7 @@ var AmountInput = /* @__PURE__ */ (0, import_react14.forwardRef)(
|
|
|
1311
1355
|
className,
|
|
1312
1356
|
...rest
|
|
1313
1357
|
} = props;
|
|
1314
|
-
const inputRef = (0,
|
|
1358
|
+
const inputRef = (0, import_react15.useRef)(null);
|
|
1315
1359
|
const m = useMessages();
|
|
1316
1360
|
const unit = unitProp ?? m.currencyUnit ?? "\uC6D0";
|
|
1317
1361
|
const label6 = labelProp ?? m.amount ?? "\uAE08\uC561";
|
|
@@ -1361,7 +1405,7 @@ var AmountInput = /* @__PURE__ */ (0, import_react14.forwardRef)(
|
|
|
1361
1405
|
// src/components/Avatar/Avatar.tsx
|
|
1362
1406
|
var RadixAvatar = __toESM(require("@radix-ui/react-avatar"), 1);
|
|
1363
1407
|
var import_icons6 = require("@bestow-ui/icons");
|
|
1364
|
-
var
|
|
1408
|
+
var import_react16 = require("react");
|
|
1365
1409
|
|
|
1366
1410
|
// src/components/Avatar/Avatar.css.ts
|
|
1367
1411
|
var import_createRuntimeFn7 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -1376,7 +1420,7 @@ function getInitials(name) {
|
|
|
1376
1420
|
const first = (word) => Array.from(word)[0] ?? "";
|
|
1377
1421
|
return (first(a) + first(b)).toUpperCase();
|
|
1378
1422
|
}
|
|
1379
|
-
var Avatar = /* @__PURE__ */ (0,
|
|
1423
|
+
var Avatar = /* @__PURE__ */ (0, import_react16.forwardRef)(function Avatar2({ src, alt, name, fallback: fallback2, size, shape, className, ...rest }, ref) {
|
|
1380
1424
|
const label6 = alt ?? name;
|
|
1381
1425
|
const a11y = label6 ? { role: "img", "aria-label": label6 } : { "aria-hidden": true };
|
|
1382
1426
|
const initials = name ? getInitials(name) : "";
|
|
@@ -1387,7 +1431,7 @@ var Avatar = /* @__PURE__ */ (0, import_react15.forwardRef)(function Avatar2({ s
|
|
|
1387
1431
|
});
|
|
1388
1432
|
|
|
1389
1433
|
// src/components/Badge/Badge.tsx
|
|
1390
|
-
var
|
|
1434
|
+
var import_react17 = require("react");
|
|
1391
1435
|
|
|
1392
1436
|
// src/components/Badge/Badge.css.ts
|
|
1393
1437
|
var import_createRuntimeFn8 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -1396,7 +1440,7 @@ var icon3 = "_1295cfng";
|
|
|
1396
1440
|
|
|
1397
1441
|
// src/components/Badge/Badge.tsx
|
|
1398
1442
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1399
|
-
var Badge = /* @__PURE__ */ (0,
|
|
1443
|
+
var Badge = /* @__PURE__ */ (0, import_react17.forwardRef)(function Badge2({ variant, color, size, startIcon, className, children, ...rest }, ref) {
|
|
1400
1444
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { ref, className: cx(badge({ variant, color, size }), className), ...rest, children: [
|
|
1401
1445
|
startIcon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: icon3, children: startIcon }),
|
|
1402
1446
|
children
|
|
@@ -1404,12 +1448,12 @@ var Badge = /* @__PURE__ */ (0, import_react16.forwardRef)(function Badge2({ var
|
|
|
1404
1448
|
});
|
|
1405
1449
|
|
|
1406
1450
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
1407
|
-
var
|
|
1451
|
+
var import_react19 = require("react");
|
|
1408
1452
|
var import_icons8 = require("@bestow-ui/icons");
|
|
1409
1453
|
|
|
1410
1454
|
// src/components/Link/Link.tsx
|
|
1411
1455
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
1412
|
-
var
|
|
1456
|
+
var import_react18 = require("react");
|
|
1413
1457
|
var import_icons7 = require("@bestow-ui/icons");
|
|
1414
1458
|
|
|
1415
1459
|
// src/components/Link/Link.css.ts
|
|
@@ -1422,7 +1466,7 @@ var import_jsx_runtime16 = (
|
|
|
1422
1466
|
// Slot 의 props 타입은 HTMLElement 기준이라 <a> 전용 속성(target·rel 등)은 그대로 넘기도록 단언한다
|
|
1423
1467
|
require("react/jsx-runtime")
|
|
1424
1468
|
);
|
|
1425
|
-
var Link = /* @__PURE__ */ (0,
|
|
1469
|
+
var Link = /* @__PURE__ */ (0, import_react18.forwardRef)(function Link2({
|
|
1426
1470
|
as: Component = "a",
|
|
1427
1471
|
asChild,
|
|
1428
1472
|
color,
|
|
@@ -1470,25 +1514,25 @@ var separator = "_18t8ztt4";
|
|
|
1470
1514
|
|
|
1471
1515
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
1472
1516
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1473
|
-
var Breadcrumb = /* @__PURE__ */ (0,
|
|
1517
|
+
var Breadcrumb = /* @__PURE__ */ (0, import_react19.forwardRef)(function Breadcrumb2({ items: items2, linkAs, separator: separator3, "aria-label": ariaLabelProp, className, ...rest }, ref) {
|
|
1474
1518
|
const m = useMessages();
|
|
1475
1519
|
const ariaLabel = ariaLabelProp ?? m.breadcrumb ?? "\uC774\uB3D9 \uACBD\uB85C";
|
|
1476
1520
|
const sep = separator3 ?? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons8.ChevronRightIcon, { size: 14 });
|
|
1477
|
-
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((
|
|
1521
|
+
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((item8, index) => {
|
|
1478
1522
|
const isCurrent = index === items2.length - 1;
|
|
1479
1523
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: item3, children: [
|
|
1480
1524
|
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: separator, "aria-hidden": true, children: sep }),
|
|
1481
|
-
isCurrent ||
|
|
1525
|
+
isCurrent || item8.href === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: isCurrent ? current : void 0, "aria-current": isCurrent ? "page" : void 0, children: item8.label }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Link, { as: linkAs, href: item8.href, color: "neutral", underline: "hover", className: link2, children: item8.label })
|
|
1482
1526
|
] }, index);
|
|
1483
1527
|
}) }) });
|
|
1484
1528
|
});
|
|
1485
1529
|
|
|
1486
1530
|
// src/components/BusinessNumberInput/BusinessNumberInput.tsx
|
|
1487
|
-
var
|
|
1531
|
+
var import_react20 = require("react");
|
|
1488
1532
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1489
1533
|
var sanitize = (input5) => input5.replace(/\D/g, "").slice(0, 10);
|
|
1490
1534
|
var isDigit2 = (char) => /\d/.test(char);
|
|
1491
|
-
var BusinessNumberInput = /* @__PURE__ */ (0,
|
|
1535
|
+
var BusinessNumberInput = /* @__PURE__ */ (0, import_react20.forwardRef)(
|
|
1492
1536
|
function BusinessNumberInput2(props, ref) {
|
|
1493
1537
|
const {
|
|
1494
1538
|
value: value4,
|
|
@@ -1504,12 +1548,12 @@ var BusinessNumberInput = /* @__PURE__ */ (0, import_react19.forwardRef)(
|
|
|
1504
1548
|
onKeyDown,
|
|
1505
1549
|
...rest
|
|
1506
1550
|
} = props;
|
|
1507
|
-
const inputRef = (0,
|
|
1551
|
+
const inputRef = (0, import_react20.useRef)(null);
|
|
1508
1552
|
const m = useMessages();
|
|
1509
1553
|
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.";
|
|
1510
1554
|
const label6 = labelProp ?? m.businessNumber ?? "\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638";
|
|
1511
1555
|
const incompleteText = m.businessNumberIncomplete ?? "10\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
|
|
1512
|
-
const [touched, setTouched] = (0,
|
|
1556
|
+
const [touched, setTouched] = (0, import_react20.useState)(false);
|
|
1513
1557
|
const field3 = useFormattedInput({
|
|
1514
1558
|
isControlled: "value" in props,
|
|
1515
1559
|
value: value4,
|
|
@@ -1549,53 +1593,23 @@ var BusinessNumberInput = /* @__PURE__ */ (0, import_react19.forwardRef)(
|
|
|
1549
1593
|
);
|
|
1550
1594
|
|
|
1551
1595
|
// src/components/Calendar/Calendar.tsx
|
|
1552
|
-
var
|
|
1596
|
+
var import_react23 = require("react");
|
|
1553
1597
|
var import_icons9 = require("@bestow-ui/icons");
|
|
1554
1598
|
|
|
1555
|
-
// src/utils/
|
|
1556
|
-
var
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
return date.getFullYear() === y && date.getMonth() === mo - 1 && date.getDate() === d ? date : null;
|
|
1566
|
-
}
|
|
1567
|
-
function addDays(date, days) {
|
|
1568
|
-
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + days);
|
|
1569
|
-
}
|
|
1570
|
-
function addMonths(date, months) {
|
|
1571
|
-
const target = new Date(date.getFullYear(), date.getMonth() + months, 1);
|
|
1572
|
-
const lastDay = new Date(target.getFullYear(), target.getMonth() + 1, 0).getDate();
|
|
1573
|
-
return new Date(target.getFullYear(), target.getMonth(), Math.min(date.getDate(), lastDay));
|
|
1574
|
-
}
|
|
1575
|
-
function isSameDay(a, b) {
|
|
1576
|
-
return !!a && !!b && toISODate(a) === toISODate(b);
|
|
1577
|
-
}
|
|
1578
|
-
function isSameMonth(a, b) {
|
|
1579
|
-
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth();
|
|
1580
|
-
}
|
|
1581
|
-
function compareDays(a, b) {
|
|
1582
|
-
const x = toISODate(a);
|
|
1583
|
-
const y = toISODate(b);
|
|
1584
|
-
return x < y ? -1 : x > y ? 1 : 0;
|
|
1585
|
-
}
|
|
1586
|
-
function getCalendarWeeks(year, month) {
|
|
1587
|
-
const first = new Date(year, month, 1);
|
|
1588
|
-
const start = addDays(first, -first.getDay());
|
|
1589
|
-
return Array.from({ length: 6 }, (_, week) => Array.from({ length: 7 }, (_2, day2) => addDays(start, week * 7 + day2)));
|
|
1590
|
-
}
|
|
1591
|
-
var KOREAN_WEEKDAYS = ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"];
|
|
1592
|
-
function formatKoreanDate(date, withWeekday = true) {
|
|
1593
|
-
const base = `${date.getFullYear()}\uB144 ${date.getMonth() + 1}\uC6D4 ${date.getDate()}\uC77C`;
|
|
1594
|
-
return withWeekday ? `${base} ${KOREAN_WEEKDAYS[date.getDay()]}\uC694\uC77C` : base;
|
|
1599
|
+
// src/utils/useIsClient.ts
|
|
1600
|
+
var import_react21 = require("react");
|
|
1601
|
+
var subscribeNothing = () => () => {
|
|
1602
|
+
};
|
|
1603
|
+
function useIsClient() {
|
|
1604
|
+
return (0, import_react21.useSyncExternalStore)(
|
|
1605
|
+
subscribeNothing,
|
|
1606
|
+
() => true,
|
|
1607
|
+
() => false
|
|
1608
|
+
);
|
|
1595
1609
|
}
|
|
1596
1610
|
|
|
1597
1611
|
// src/components/IconButton/IconButton.tsx
|
|
1598
|
-
var
|
|
1612
|
+
var import_react22 = require("react");
|
|
1599
1613
|
|
|
1600
1614
|
// src/components/IconButton/IconButton.css.ts
|
|
1601
1615
|
var import_createRuntimeFn10 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -1603,7 +1617,7 @@ var iconButton = /* @__PURE__ */ (0, import_createRuntimeFn10.createRuntimeFn)({
|
|
|
1603
1617
|
|
|
1604
1618
|
// src/components/IconButton/IconButton.tsx
|
|
1605
1619
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1606
|
-
var IconButton = /* @__PURE__ */ (0,
|
|
1620
|
+
var IconButton = /* @__PURE__ */ (0, import_react22.forwardRef)(function IconButton2({ variant = "ghost", color = "neutral", size, loading: loading2, className, children, ...rest }, ref) {
|
|
1607
1621
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1608
1622
|
Button,
|
|
1609
1623
|
{
|
|
@@ -1630,7 +1644,7 @@ var weekday = "_1qyq67b4";
|
|
|
1630
1644
|
|
|
1631
1645
|
// src/components/Calendar/Calendar.tsx
|
|
1632
1646
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1633
|
-
var Calendar = /* @__PURE__ */ (0,
|
|
1647
|
+
var Calendar = /* @__PURE__ */ (0, import_react23.forwardRef)(function Calendar2(props, ref) {
|
|
1634
1648
|
const {
|
|
1635
1649
|
value: value4,
|
|
1636
1650
|
defaultValue,
|
|
@@ -1650,12 +1664,13 @@ var Calendar = /* @__PURE__ */ (0, import_react21.forwardRef)(function Calendar2
|
|
|
1650
1664
|
const nextMonthLabel = nextMonthLabelProp ?? m.nextMonth ?? "\uB2E4\uC74C \uB2EC";
|
|
1651
1665
|
const weekdaysShort = m.weekdaysShort ?? KOREAN_WEEKDAYS;
|
|
1652
1666
|
const weekdaysLong = m.weekdaysLong ?? KOREAN_WEEKDAYS.map((name) => `${name}\uC694\uC77C`);
|
|
1653
|
-
const headingId = (0,
|
|
1654
|
-
const gridRef = (0,
|
|
1667
|
+
const headingId = (0, import_react23.useId)();
|
|
1668
|
+
const gridRef = (0, import_react23.useRef)(null);
|
|
1655
1669
|
const isControlled = "value" in props;
|
|
1656
|
-
const [innerValue, setInnerValue] = (0,
|
|
1670
|
+
const [innerValue, setInnerValue] = (0, import_react23.useState)(defaultValue ?? "");
|
|
1657
1671
|
const selected = parseISODate(isControlled ? value4 : innerValue);
|
|
1658
|
-
const
|
|
1672
|
+
const isClient = useIsClient();
|
|
1673
|
+
const today = parseISODate(todayProp) ?? (isClient ? /* @__PURE__ */ new Date() : null);
|
|
1659
1674
|
const minDate = parseISODate(min);
|
|
1660
1675
|
const maxDate = parseISODate(max);
|
|
1661
1676
|
const clamp = (date) => {
|
|
@@ -1664,15 +1679,17 @@ var Calendar = /* @__PURE__ */ (0, import_react21.forwardRef)(function Calendar2
|
|
|
1664
1679
|
return date;
|
|
1665
1680
|
};
|
|
1666
1681
|
const isDisabled = (date) => minDate !== null && compareDays(date, minDate) < 0 || maxDate !== null && compareDays(date, maxDate) > 0 || !!isDateDisabled?.(date);
|
|
1667
|
-
const [
|
|
1668
|
-
const
|
|
1682
|
+
const [focusedState, setFocused] = (0, import_react23.useState)(null);
|
|
1683
|
+
const base = selected ?? today;
|
|
1684
|
+
const focused = focusedState ?? (base ? clamp(base) : null);
|
|
1685
|
+
const moveFocus = (0, import_react23.useRef)(initialFocus ?? false);
|
|
1669
1686
|
const selectedIso = selected ? toISODate(selected) : "";
|
|
1670
|
-
(0,
|
|
1687
|
+
(0, import_react23.useEffect)(() => {
|
|
1671
1688
|
const date = parseISODate(selectedIso);
|
|
1672
1689
|
if (date) setFocused((prev) => isSameDay(prev, date) ? prev : date);
|
|
1673
1690
|
}, [selectedIso]);
|
|
1674
|
-
(0,
|
|
1675
|
-
if (!moveFocus.current) return;
|
|
1691
|
+
(0, import_react23.useEffect)(() => {
|
|
1692
|
+
if (!moveFocus.current || !focused) return;
|
|
1676
1693
|
moveFocus.current = false;
|
|
1677
1694
|
gridRef.current?.querySelector(`[data-date="${toISODate(focused)}"]`)?.focus();
|
|
1678
1695
|
}, [focused]);
|
|
@@ -1688,6 +1705,7 @@ var Calendar = /* @__PURE__ */ (0, import_react21.forwardRef)(function Calendar2
|
|
|
1688
1705
|
setFocused(date);
|
|
1689
1706
|
};
|
|
1690
1707
|
const handleKeyDown = (event) => {
|
|
1708
|
+
if (!focused) return;
|
|
1691
1709
|
const moves = {
|
|
1692
1710
|
ArrowLeft: () => addDays(focused, -1),
|
|
1693
1711
|
ArrowRight: () => addDays(focused, 1),
|
|
@@ -1705,13 +1723,11 @@ var Calendar = /* @__PURE__ */ (0, import_react21.forwardRef)(function Calendar2
|
|
|
1705
1723
|
}
|
|
1706
1724
|
};
|
|
1707
1725
|
const visible = focused;
|
|
1708
|
-
const weeks = getCalendarWeeks(visible.getFullYear(), visible.getMonth()).filter(
|
|
1726
|
+
const weeks = visible ? getCalendarWeeks(visible.getFullYear(), visible.getMonth()).filter(
|
|
1709
1727
|
(week) => week.some((date) => isSameMonth(date, visible))
|
|
1710
|
-
);
|
|
1711
|
-
const
|
|
1712
|
-
const
|
|
1713
|
-
const canPrev = !minDate || compareDays(new Date(visible.getFullYear(), visible.getMonth(), 0), minDate) >= 0;
|
|
1714
|
-
const canNext = !maxDate || compareDays(new Date(visible.getFullYear(), visible.getMonth() + 1, 1), maxDate) <= 0;
|
|
1728
|
+
) : [];
|
|
1729
|
+
const canPrev = !!visible && (!minDate || compareDays(new Date(visible.getFullYear(), visible.getMonth(), 0), minDate) >= 0);
|
|
1730
|
+
const canNext = !!visible && (!maxDate || compareDays(new Date(visible.getFullYear(), visible.getMonth() + 1, 1), maxDate) <= 0);
|
|
1715
1731
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { ref, className: cx(root6, className), children: [
|
|
1716
1732
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: header3, children: [
|
|
1717
1733
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
@@ -1720,18 +1736,18 @@ var Calendar = /* @__PURE__ */ (0, import_react21.forwardRef)(function Calendar2
|
|
|
1720
1736
|
"aria-label": prevMonthLabel,
|
|
1721
1737
|
size: "sm",
|
|
1722
1738
|
disabled: !canPrev,
|
|
1723
|
-
onClick: () => setFocused(clamp(
|
|
1739
|
+
onClick: () => visible && setFocused(clamp(addMonths(visible, -1))),
|
|
1724
1740
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons9.ChevronLeftIcon, {})
|
|
1725
1741
|
}
|
|
1726
1742
|
),
|
|
1727
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { id: headingId, className: heading, "aria-live": "polite", children: m.monthTitle?.(visible.getFullYear(), visible.getMonth() + 1) ?? `${visible.getFullYear()}\uB144 ${visible.getMonth() + 1}\uC6D4` }),
|
|
1743
|
+
/* @__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`) }),
|
|
1728
1744
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1729
1745
|
IconButton,
|
|
1730
1746
|
{
|
|
1731
1747
|
"aria-label": nextMonthLabel,
|
|
1732
1748
|
size: "sm",
|
|
1733
1749
|
disabled: !canNext,
|
|
1734
|
-
onClick: () => setFocused(clamp(
|
|
1750
|
+
onClick: () => visible && setFocused(clamp(addMonths(visible, 1))),
|
|
1735
1751
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons9.ChevronRightIcon, {})
|
|
1736
1752
|
}
|
|
1737
1753
|
)
|
|
@@ -1740,7 +1756,8 @@ var Calendar = /* @__PURE__ */ (0, import_react21.forwardRef)(function Calendar2
|
|
|
1740
1756
|
/* @__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)) }) }),
|
|
1741
1757
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tbody", { children: weeks.map((week) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tr", { children: week.map((date) => {
|
|
1742
1758
|
const iso = toISODate(date);
|
|
1743
|
-
if (!isSameMonth(date, visible))
|
|
1759
|
+
if (!visible || !isSameMonth(date, visible))
|
|
1760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("td", { role: "gridcell", className: cell }, iso);
|
|
1744
1761
|
const isSelected = isSameDay(date, selected);
|
|
1745
1762
|
const isToday = isSameDay(date, today);
|
|
1746
1763
|
const holiday = !!isHoliday?.(date);
|
|
@@ -1774,7 +1791,7 @@ var Calendar = /* @__PURE__ */ (0, import_react21.forwardRef)(function Calendar2
|
|
|
1774
1791
|
});
|
|
1775
1792
|
|
|
1776
1793
|
// src/components/Card/Card.tsx
|
|
1777
|
-
var
|
|
1794
|
+
var import_react24 = require("react");
|
|
1778
1795
|
|
|
1779
1796
|
// src/components/Card/Card.css.ts
|
|
1780
1797
|
var import_createRuntimeFn11 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -1785,22 +1802,22 @@ var header4 = "dnuf1u8";
|
|
|
1785
1802
|
|
|
1786
1803
|
// src/components/Card/Card.tsx
|
|
1787
1804
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1788
|
-
var Card = /* @__PURE__ */ (0,
|
|
1805
|
+
var Card = /* @__PURE__ */ (0, import_react24.forwardRef)(function Card2({ variant, padding, as: Component = "div", className, ...rest }, ref) {
|
|
1789
1806
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Component, { ref, className: cx(card({ variant, padding }), className), ...rest });
|
|
1790
1807
|
});
|
|
1791
|
-
var CardHeader = /* @__PURE__ */ (0,
|
|
1808
|
+
var CardHeader = /* @__PURE__ */ (0, import_react24.forwardRef)(function CardHeader2({ className, ...rest }, ref) {
|
|
1792
1809
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { ref, className: cx(header4, className), ...rest });
|
|
1793
1810
|
});
|
|
1794
|
-
var CardBody = /* @__PURE__ */ (0,
|
|
1811
|
+
var CardBody = /* @__PURE__ */ (0, import_react24.forwardRef)(function CardBody2({ className, ...rest }, ref) {
|
|
1795
1812
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { ref, className: cx(body2, className), ...rest });
|
|
1796
1813
|
});
|
|
1797
|
-
var CardFooter = /* @__PURE__ */ (0,
|
|
1814
|
+
var CardFooter = /* @__PURE__ */ (0, import_react24.forwardRef)(function CardFooter2({ className, ...rest }, ref) {
|
|
1798
1815
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { ref, className: cx(footer2, className), ...rest });
|
|
1799
1816
|
});
|
|
1800
1817
|
|
|
1801
1818
|
// src/components/Combobox/Combobox.tsx
|
|
1802
1819
|
var Popover = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1803
|
-
var
|
|
1820
|
+
var import_react25 = require("react");
|
|
1804
1821
|
var import_icons10 = require("@bestow-ui/icons");
|
|
1805
1822
|
|
|
1806
1823
|
// src/components/Select/Select.css.ts
|
|
@@ -1813,14 +1830,15 @@ var value = "_1kx81e81";
|
|
|
1813
1830
|
var viewport = "_1kx81e84";
|
|
1814
1831
|
|
|
1815
1832
|
// src/components/Combobox/Combobox.css.ts
|
|
1816
|
-
var
|
|
1817
|
-
var
|
|
1818
|
-
var
|
|
1833
|
+
var clear = "c2pbq72 c2pbq70";
|
|
1834
|
+
var content6 = "c2pbq73";
|
|
1835
|
+
var empty = "c2pbq74";
|
|
1836
|
+
var toggle2 = "c2pbq71 c2pbq70";
|
|
1819
1837
|
|
|
1820
1838
|
// src/components/Combobox/Combobox.tsx
|
|
1821
1839
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1822
1840
|
var defaultFilter = (option2, query) => option2.label.toLowerCase().includes(query.trim().toLowerCase());
|
|
1823
|
-
var Combobox = /* @__PURE__ */ (0,
|
|
1841
|
+
var Combobox = /* @__PURE__ */ (0, import_react25.forwardRef)(function Combobox2(props, ref) {
|
|
1824
1842
|
const {
|
|
1825
1843
|
options,
|
|
1826
1844
|
value: value4,
|
|
@@ -1840,28 +1858,31 @@ var Combobox = /* @__PURE__ */ (0, import_react23.forwardRef)(function Combobox2
|
|
|
1840
1858
|
id,
|
|
1841
1859
|
"aria-label": ariaLabel,
|
|
1842
1860
|
toggleLabel: toggleLabelProp,
|
|
1861
|
+
clearable,
|
|
1862
|
+
clearLabel: clearLabelProp,
|
|
1843
1863
|
className
|
|
1844
1864
|
} = props;
|
|
1845
1865
|
const m = useMessages();
|
|
1846
1866
|
const emptyMessage = emptyMessageProp ?? m.noResults ?? "\uACB0\uACFC\uAC00 \uC5C6\uC5B4\uC694";
|
|
1847
1867
|
const toggleLabel = toggleLabelProp ?? m.openList ?? "\uBAA9\uB85D \uC5F4\uAE30";
|
|
1848
|
-
const
|
|
1868
|
+
const clearLabel = clearLabelProp ?? m.clearSelection ?? "\uC120\uD0DD \uC9C0\uC6B0\uAE30";
|
|
1869
|
+
const generatedId = (0, import_react25.useId)();
|
|
1849
1870
|
const inputId = id ?? generatedId;
|
|
1850
1871
|
const labelId = `${inputId}-label`;
|
|
1851
1872
|
const listId = `${inputId}-listbox`;
|
|
1852
1873
|
const helperId = helperText3 ? `${inputId}-helper` : void 0;
|
|
1853
1874
|
const optionId = (index) => `${inputId}-option-${index}`;
|
|
1854
1875
|
const portal2 = usePortalProps();
|
|
1855
|
-
const inputRef = (0,
|
|
1856
|
-
const anchorRef = (0,
|
|
1876
|
+
const inputRef = (0, import_react25.useRef)(null);
|
|
1877
|
+
const anchorRef = (0, import_react25.useRef)(null);
|
|
1857
1878
|
const isControlled = "value" in props;
|
|
1858
|
-
const [innerValue, setInnerValue] = (0,
|
|
1879
|
+
const [innerValue, setInnerValue] = (0, import_react25.useState)(defaultValue);
|
|
1859
1880
|
const selectedValue = isControlled ? value4 : innerValue;
|
|
1860
1881
|
const selectedOption = options.find((o) => o.value === selectedValue);
|
|
1861
|
-
const [open, setOpen] = (0,
|
|
1862
|
-
const [query, setQuery] = (0,
|
|
1863
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
1864
|
-
const filtered = (0,
|
|
1882
|
+
const [open, setOpen] = (0, import_react25.useState)(false);
|
|
1883
|
+
const [query, setQuery] = (0, import_react25.useState)(null);
|
|
1884
|
+
const [activeIndex, setActiveIndex] = (0, import_react25.useState)(-1);
|
|
1885
|
+
const filtered = (0, import_react25.useMemo)(() => query ? options.filter((o) => filter(o, query)) : options, [options, filter, query]);
|
|
1865
1886
|
const inputText = query ?? selectedOption?.label ?? "";
|
|
1866
1887
|
const firstEnabled = (list5, from = 0, step = 1) => {
|
|
1867
1888
|
for (let i = from; i >= 0 && i < list5.length; i += step) if (!list5[i].disabled) return i;
|
|
@@ -1874,16 +1895,24 @@ var Combobox = /* @__PURE__ */ (0, import_react23.forwardRef)(function Combobox2
|
|
|
1874
1895
|
selectedIndex >= 0 && !list5[selectedIndex].disabled ? selectedIndex : preferLast ? firstEnabled(list5, list5.length - 1, -1) : firstEnabled(list5)
|
|
1875
1896
|
);
|
|
1876
1897
|
};
|
|
1877
|
-
const
|
|
1898
|
+
const reset = () => {
|
|
1878
1899
|
setOpen(false);
|
|
1879
1900
|
setQuery(null);
|
|
1880
1901
|
setActiveIndex(-1);
|
|
1881
1902
|
};
|
|
1903
|
+
const clearSelection = () => {
|
|
1904
|
+
if (!isControlled) setInnerValue(void 0);
|
|
1905
|
+
if (selectedValue) onValueChange?.("");
|
|
1906
|
+
};
|
|
1907
|
+
const close2 = () => {
|
|
1908
|
+
if (query === "" && selectedValue) clearSelection();
|
|
1909
|
+
reset();
|
|
1910
|
+
};
|
|
1882
1911
|
const select = (option2) => {
|
|
1883
1912
|
if (option2.disabled) return;
|
|
1884
1913
|
if (!isControlled) setInnerValue(option2.value);
|
|
1885
1914
|
if (option2.value !== selectedValue) onValueChange?.(option2.value);
|
|
1886
|
-
|
|
1915
|
+
reset();
|
|
1887
1916
|
};
|
|
1888
1917
|
const move = (step) => {
|
|
1889
1918
|
const start = activeIndex < 0 ? step === 1 ? 0 : filtered.length - 1 : activeIndex + step;
|
|
@@ -1895,7 +1924,7 @@ var Combobox = /* @__PURE__ */ (0, import_react23.forwardRef)(function Combobox2
|
|
|
1895
1924
|
const nextList = nextQuery ? options.filter((o) => filter(o, nextQuery)) : options;
|
|
1896
1925
|
setQuery(nextQuery);
|
|
1897
1926
|
setOpen(true);
|
|
1898
|
-
setActiveIndex(firstEnabled(nextList));
|
|
1927
|
+
setActiveIndex(nextQuery ? firstEnabled(nextList) : -1);
|
|
1899
1928
|
};
|
|
1900
1929
|
const handleKeyDown = (event) => {
|
|
1901
1930
|
switch (event.key) {
|
|
@@ -1914,6 +1943,7 @@ var Combobox = /* @__PURE__ */ (0, import_react23.forwardRef)(function Combobox2
|
|
|
1914
1943
|
event.preventDefault();
|
|
1915
1944
|
const option2 = filtered[activeIndex];
|
|
1916
1945
|
if (option2) select(option2);
|
|
1946
|
+
else close2();
|
|
1917
1947
|
}
|
|
1918
1948
|
break;
|
|
1919
1949
|
case "Escape":
|
|
@@ -1927,7 +1957,7 @@ var Combobox = /* @__PURE__ */ (0, import_react23.forwardRef)(function Combobox2
|
|
|
1927
1957
|
break;
|
|
1928
1958
|
}
|
|
1929
1959
|
};
|
|
1930
|
-
(0,
|
|
1960
|
+
(0, import_react25.useEffect)(() => {
|
|
1931
1961
|
if (!open || activeIndex < 0) return;
|
|
1932
1962
|
document.getElementById(optionId(activeIndex))?.scrollIntoView?.({ block: "nearest" });
|
|
1933
1963
|
}, [open, activeIndex]);
|
|
@@ -1973,6 +2003,22 @@ var Combobox = /* @__PURE__ */ (0, import_react23.forwardRef)(function Combobox2
|
|
|
1973
2003
|
className: input
|
|
1974
2004
|
}
|
|
1975
2005
|
),
|
|
2006
|
+
clearable && selectedOption && !disabled && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2007
|
+
"button",
|
|
2008
|
+
{
|
|
2009
|
+
type: "button",
|
|
2010
|
+
tabIndex: -1,
|
|
2011
|
+
"aria-label": clearLabel,
|
|
2012
|
+
className: clear,
|
|
2013
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
2014
|
+
onClick: () => {
|
|
2015
|
+
clearSelection();
|
|
2016
|
+
reset();
|
|
2017
|
+
inputRef.current?.focus();
|
|
2018
|
+
},
|
|
2019
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons10.XIcon, { size: 16 })
|
|
2020
|
+
}
|
|
2021
|
+
),
|
|
1976
2022
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1977
2023
|
"button",
|
|
1978
2024
|
{
|
|
@@ -2055,13 +2101,13 @@ var Combobox = /* @__PURE__ */ (0, import_react23.forwardRef)(function Combobox2
|
|
|
2055
2101
|
});
|
|
2056
2102
|
|
|
2057
2103
|
// src/components/DatePicker/DatePicker.tsx
|
|
2058
|
-
var
|
|
2104
|
+
var import_react27 = require("react");
|
|
2059
2105
|
var import_icons12 = require("@bestow-ui/icons");
|
|
2060
2106
|
|
|
2061
2107
|
// src/components/Popover/Popover.tsx
|
|
2062
2108
|
var RadixPopover = __toESM(require("@radix-ui/react-popover"), 1);
|
|
2063
2109
|
var import_icons11 = require("@bestow-ui/icons");
|
|
2064
|
-
var
|
|
2110
|
+
var import_react26 = require("react");
|
|
2065
2111
|
|
|
2066
2112
|
// src/components/Popover/Popover.css.ts
|
|
2067
2113
|
var arrow = "_1j99p8x4";
|
|
@@ -2091,7 +2137,7 @@ function Popover2({
|
|
|
2091
2137
|
}) {
|
|
2092
2138
|
const portal2 = usePortalProps();
|
|
2093
2139
|
const m = useMessages();
|
|
2094
|
-
const titleId = (0,
|
|
2140
|
+
const titleId = (0, import_react26.useId)();
|
|
2095
2141
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(RadixPopover.Root, { open, defaultOpen, onOpenChange, modal, children: [
|
|
2096
2142
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(RadixPopover.Trigger, { asChild: true, children }),
|
|
2097
2143
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(RadixPopover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
@@ -2125,7 +2171,7 @@ var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
|
2125
2171
|
var sanitize2 = (input5) => input5.replace(/\D/g, "").slice(0, 8);
|
|
2126
2172
|
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)}`;
|
|
2127
2173
|
var isDigit3 = (char) => /\d/.test(char);
|
|
2128
|
-
var DatePicker = /* @__PURE__ */ (0,
|
|
2174
|
+
var DatePicker = /* @__PURE__ */ (0, import_react27.forwardRef)(
|
|
2129
2175
|
function DatePicker2(props, ref) {
|
|
2130
2176
|
const {
|
|
2131
2177
|
value: value4,
|
|
@@ -2151,17 +2197,17 @@ var DatePicker = /* @__PURE__ */ (0, import_react25.forwardRef)(
|
|
|
2151
2197
|
id,
|
|
2152
2198
|
className
|
|
2153
2199
|
} = props;
|
|
2154
|
-
const inputRef = (0,
|
|
2200
|
+
const inputRef = (0, import_react27.useRef)(null);
|
|
2155
2201
|
const m = useMessages();
|
|
2156
2202
|
const label6 = labelProp ?? m.date ?? "\uB0A0\uC9DC";
|
|
2157
2203
|
const calendarLabel = calendarLabelProp ?? m.openCalendar ?? "\uB2EC\uB825 \uC5F4\uAE30";
|
|
2158
2204
|
const invalidText = invalidTextProp ?? m.dateInvalid ?? "\uC62C\uBC14\uB978 \uB0A0\uC9DC\uAC00 \uC544\uB2C8\uC5D0\uC694.";
|
|
2159
2205
|
const unavailableText = unavailableTextProp ?? m.dateUnavailable ?? "\uACE0\uB97C \uC218 \uC5C6\uB294 \uB0A0\uC9DC\uC608\uC694.";
|
|
2160
2206
|
const incompleteText = incompleteTextProp ?? m.dateIncomplete ?? "\uB0A0\uC9DC\uB97C YYYY-MM-DD \uD615\uC2DD\uC73C\uB85C \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
|
|
2161
|
-
const [open, setOpen] = (0,
|
|
2162
|
-
const [touched, setTouched] = (0,
|
|
2207
|
+
const [open, setOpen] = (0, import_react27.useState)(false);
|
|
2208
|
+
const [touched, setTouched] = (0, import_react27.useState)(false);
|
|
2163
2209
|
const isControlled = "value" in props;
|
|
2164
|
-
const lastEmitted = (0,
|
|
2210
|
+
const lastEmitted = (0, import_react27.useRef)(isControlled ? value4 ?? "" : defaultValue ?? "");
|
|
2165
2211
|
const minDate = parseISODate(min);
|
|
2166
2212
|
const maxDate = parseISODate(max);
|
|
2167
2213
|
const toIso = (digits) => digits.length === 8 ? `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}` : "";
|
|
@@ -2186,7 +2232,7 @@ var DatePicker = /* @__PURE__ */ (0, import_react25.forwardRef)(
|
|
|
2186
2232
|
});
|
|
2187
2233
|
const textIso = toIso(field3.raw);
|
|
2188
2234
|
const { setRaw } = field3;
|
|
2189
|
-
(0,
|
|
2235
|
+
(0, import_react27.useEffect)(() => {
|
|
2190
2236
|
if (!isControlled) return;
|
|
2191
2237
|
const next = value4 ?? "";
|
|
2192
2238
|
lastEmitted.current = next;
|
|
@@ -2258,7 +2304,7 @@ var DatePicker = /* @__PURE__ */ (0, import_react25.forwardRef)(
|
|
|
2258
2304
|
);
|
|
2259
2305
|
|
|
2260
2306
|
// src/components/Divider/Divider.tsx
|
|
2261
|
-
var
|
|
2307
|
+
var import_react28 = require("react");
|
|
2262
2308
|
|
|
2263
2309
|
// src/components/Divider/Divider.css.ts
|
|
2264
2310
|
var import_createRuntimeFn12 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -2268,7 +2314,7 @@ var line = "_1t3gq8v4";
|
|
|
2268
2314
|
|
|
2269
2315
|
// src/components/Divider/Divider.tsx
|
|
2270
2316
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2271
|
-
var Divider = /* @__PURE__ */ (0,
|
|
2317
|
+
var Divider = /* @__PURE__ */ (0, import_react28.forwardRef)(function Divider2({ orientation = "horizontal", decorative, className, children, ...rest }, ref) {
|
|
2272
2318
|
if (children && orientation === "horizontal") {
|
|
2273
2319
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref, className: cx(labeled, className), ...rest, children: [
|
|
2274
2320
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: line, "aria-hidden": true }),
|
|
@@ -2350,7 +2396,7 @@ var DrawerClose = Dialog2.Close;
|
|
|
2350
2396
|
|
|
2351
2397
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2352
2398
|
var RadixMenu = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
2353
|
-
var
|
|
2399
|
+
var import_react29 = require("react");
|
|
2354
2400
|
|
|
2355
2401
|
// src/components/DropdownMenu/DropdownMenu.css.ts
|
|
2356
2402
|
var content9 = "_1d7ahux0";
|
|
@@ -2366,7 +2412,7 @@ var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
|
2366
2412
|
var DropdownMenu = RadixMenu.Root;
|
|
2367
2413
|
var DropdownMenuTrigger = RadixMenu.Trigger;
|
|
2368
2414
|
var DropdownMenuGroup = RadixMenu.Group;
|
|
2369
|
-
var DropdownMenuContent = /* @__PURE__ */ (0,
|
|
2415
|
+
var DropdownMenuContent = /* @__PURE__ */ (0, import_react29.forwardRef)(
|
|
2370
2416
|
function DropdownMenuContent2({ className, style, side = "bottom", align = "start", sideOffset = 4, collisionPadding = 8, ...rest }, ref) {
|
|
2371
2417
|
const portal2 = usePortalProps();
|
|
2372
2418
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadixMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
@@ -2384,24 +2430,21 @@ var DropdownMenuContent = /* @__PURE__ */ (0, import_react27.forwardRef)(
|
|
|
2384
2430
|
) });
|
|
2385
2431
|
}
|
|
2386
2432
|
);
|
|
2387
|
-
var DropdownMenuItem = /* @__PURE__ */ (0,
|
|
2388
|
-
function DropdownMenuItem2({ icon:
|
|
2389
|
-
if (color === "default") {
|
|
2390
|
-
warnOnce('DropdownMenuItem \uC758 color="default" \uB294 deprecated \uC608\uC694. color="neutral" \uC744 \uC4F0\uC138\uC694 (1.0 \uC5D0\uC11C \uC81C\uAC70).');
|
|
2391
|
-
}
|
|
2433
|
+
var DropdownMenuItem = /* @__PURE__ */ (0, import_react29.forwardRef)(
|
|
2434
|
+
function DropdownMenuItem2({ icon: icon7, shortcut: shortcut2, color = "neutral", className, children, ...rest }, ref) {
|
|
2392
2435
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(RadixMenu.Item, { ref, className: cx(item5, color === "danger" && danger, className), ...rest, children: [
|
|
2393
|
-
|
|
2436
|
+
icon7 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: icon5, "aria-hidden": true, children: icon7 }),
|
|
2394
2437
|
children,
|
|
2395
2438
|
shortcut2 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: shortcut, "aria-hidden": true, children: shortcut2 })
|
|
2396
2439
|
] });
|
|
2397
2440
|
}
|
|
2398
2441
|
);
|
|
2399
|
-
var DropdownMenuLabel = /* @__PURE__ */ (0,
|
|
2442
|
+
var DropdownMenuLabel = /* @__PURE__ */ (0, import_react29.forwardRef)(
|
|
2400
2443
|
function DropdownMenuLabel2({ className, ...rest }, ref) {
|
|
2401
2444
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadixMenu.Label, { ref, className: cx(label2, className), ...rest });
|
|
2402
2445
|
}
|
|
2403
2446
|
);
|
|
2404
|
-
var DropdownMenuSeparator = /* @__PURE__ */ (0,
|
|
2447
|
+
var DropdownMenuSeparator = /* @__PURE__ */ (0, import_react29.forwardRef)(
|
|
2405
2448
|
function DropdownMenuSeparator2({ className, ...rest }, ref) {
|
|
2406
2449
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadixMenu.Separator, { ref, className: cx(separator2, className), ...rest });
|
|
2407
2450
|
}
|
|
@@ -2409,7 +2452,7 @@ var DropdownMenuSeparator = /* @__PURE__ */ (0, import_react27.forwardRef)(
|
|
|
2409
2452
|
|
|
2410
2453
|
// src/components/Pagination/Pagination.tsx
|
|
2411
2454
|
var import_icons14 = require("@bestow-ui/icons");
|
|
2412
|
-
var
|
|
2455
|
+
var import_react30 = require("react");
|
|
2413
2456
|
|
|
2414
2457
|
// src/components/Pagination/getPaginationItems.ts
|
|
2415
2458
|
var range = (start, end) => end < start ? [] : Array.from({ length: end - start + 1 }, (_, i) => start + i);
|
|
@@ -2443,7 +2486,7 @@ var list3 = "_1iraoak0";
|
|
|
2443
2486
|
|
|
2444
2487
|
// src/components/Pagination/Pagination.tsx
|
|
2445
2488
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2446
|
-
var Pagination = /* @__PURE__ */ (0,
|
|
2489
|
+
var Pagination = /* @__PURE__ */ (0, import_react30.forwardRef)(function Pagination2({
|
|
2447
2490
|
totalPages,
|
|
2448
2491
|
page: pageProp,
|
|
2449
2492
|
defaultPage = 1,
|
|
@@ -2456,7 +2499,7 @@ var Pagination = /* @__PURE__ */ (0, import_react28.forwardRef)(function Paginat
|
|
|
2456
2499
|
"aria-label": ariaLabelProp,
|
|
2457
2500
|
...rest
|
|
2458
2501
|
}, ref) {
|
|
2459
|
-
const [uncontrolledPage, setUncontrolledPage] = (0,
|
|
2502
|
+
const [uncontrolledPage, setUncontrolledPage] = (0, import_react30.useState)(defaultPage);
|
|
2460
2503
|
const m = useMessages();
|
|
2461
2504
|
const ariaLabel = ariaLabelProp ?? m.pagination ?? "\uD398\uC774\uC9C0 \uD0D0\uC0C9";
|
|
2462
2505
|
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`);
|
|
@@ -2481,17 +2524,17 @@ var Pagination = /* @__PURE__ */ (0, import_react28.forwardRef)(function Paginat
|
|
|
2481
2524
|
}
|
|
2482
2525
|
) }),
|
|
2483
2526
|
getPaginationItems(page, totalPages, siblingCount, boundaryCount).map(
|
|
2484
|
-
(
|
|
2527
|
+
(item8) => typeof item8 === "number" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2485
2528
|
"button",
|
|
2486
2529
|
{
|
|
2487
2530
|
type: "button",
|
|
2488
2531
|
className: itemClass,
|
|
2489
|
-
"aria-label": getItemLabel("page",
|
|
2490
|
-
"aria-current":
|
|
2491
|
-
onClick: () => goTo(
|
|
2492
|
-
children:
|
|
2532
|
+
"aria-label": getItemLabel("page", item8),
|
|
2533
|
+
"aria-current": item8 === page ? "page" : void 0,
|
|
2534
|
+
onClick: () => goTo(item8),
|
|
2535
|
+
children: item8
|
|
2493
2536
|
}
|
|
2494
|
-
) },
|
|
2537
|
+
) }, item8) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("li", { "aria-hidden": true, className: cx(itemClass, ellipsis), children: "\u2026" }, item8)
|
|
2495
2538
|
),
|
|
2496
2539
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2497
2540
|
"button",
|
|
@@ -2508,14 +2551,14 @@ var Pagination = /* @__PURE__ */ (0, import_react28.forwardRef)(function Paginat
|
|
|
2508
2551
|
});
|
|
2509
2552
|
|
|
2510
2553
|
// src/components/PhoneNumberInput/PhoneNumberInput.tsx
|
|
2511
|
-
var
|
|
2554
|
+
var import_react31 = require("react");
|
|
2512
2555
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2513
2556
|
var sanitize3 = (input5) => {
|
|
2514
2557
|
const digits = input5.replace(/\D/g, "");
|
|
2515
2558
|
return digits.slice(0, phoneNumberMaxDigits(digits));
|
|
2516
2559
|
};
|
|
2517
2560
|
var isDigit4 = (char) => /\d/.test(char);
|
|
2518
|
-
var PhoneNumberInput = /* @__PURE__ */ (0,
|
|
2561
|
+
var PhoneNumberInput = /* @__PURE__ */ (0, import_react31.forwardRef)(
|
|
2519
2562
|
function PhoneNumberInput2(props, ref) {
|
|
2520
2563
|
const {
|
|
2521
2564
|
value: value4,
|
|
@@ -2526,7 +2569,7 @@ var PhoneNumberInput = /* @__PURE__ */ (0, import_react29.forwardRef)(
|
|
|
2526
2569
|
onKeyDown,
|
|
2527
2570
|
...rest
|
|
2528
2571
|
} = props;
|
|
2529
|
-
const inputRef = (0,
|
|
2572
|
+
const inputRef = (0, import_react31.useRef)(null);
|
|
2530
2573
|
const m = useMessages();
|
|
2531
2574
|
const label6 = labelProp ?? m.phoneNumber ?? "\uD734\uB300\uD3F0 \uBC88\uD638";
|
|
2532
2575
|
const field3 = useFormattedInput({
|
|
@@ -2561,7 +2604,7 @@ var PhoneNumberInput = /* @__PURE__ */ (0, import_react29.forwardRef)(
|
|
|
2561
2604
|
);
|
|
2562
2605
|
|
|
2563
2606
|
// src/components/Progress/Progress.tsx
|
|
2564
|
-
var
|
|
2607
|
+
var import_react32 = require("react");
|
|
2565
2608
|
|
|
2566
2609
|
// src/components/Progress/Progress.css.ts
|
|
2567
2610
|
var import_createRuntimeFn15 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -2575,7 +2618,7 @@ var value2 = "_1tvkq003";
|
|
|
2575
2618
|
// src/components/Progress/Progress.tsx
|
|
2576
2619
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2577
2620
|
var defaultFormat = (value4, max) => `${Math.round(value4 / max * 100)}%`;
|
|
2578
|
-
var Progress = /* @__PURE__ */ (0,
|
|
2621
|
+
var Progress = /* @__PURE__ */ (0, import_react32.forwardRef)(function Progress2({
|
|
2579
2622
|
value: value4,
|
|
2580
2623
|
max = 100,
|
|
2581
2624
|
label: label6,
|
|
@@ -2587,7 +2630,7 @@ var Progress = /* @__PURE__ */ (0, import_react30.forwardRef)(function Progress2
|
|
|
2587
2630
|
className,
|
|
2588
2631
|
...rest
|
|
2589
2632
|
}, ref) {
|
|
2590
|
-
const labelId = (0,
|
|
2633
|
+
const labelId = (0, import_react32.useId)();
|
|
2591
2634
|
const isIndeterminate = value4 === void 0 || value4 === null;
|
|
2592
2635
|
const safeMax = max > 0 ? max : 100;
|
|
2593
2636
|
const clamped = isIndeterminate ? 0 : Math.min(safeMax, Math.max(0, value4));
|
|
@@ -2623,7 +2666,7 @@ var Progress = /* @__PURE__ */ (0, import_react30.forwardRef)(function Progress2
|
|
|
2623
2666
|
|
|
2624
2667
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
2625
2668
|
var RadixRadioGroup = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
2626
|
-
var
|
|
2669
|
+
var import_react33 = require("react");
|
|
2627
2670
|
|
|
2628
2671
|
// src/components/RadioGroup/RadioGroup.css.ts
|
|
2629
2672
|
var import_createRuntimeFn16 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -2638,7 +2681,7 @@ var text = "_1w9iwjmb";
|
|
|
2638
2681
|
|
|
2639
2682
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
2640
2683
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2641
|
-
var RadioGroup = /* @__PURE__ */ (0,
|
|
2684
|
+
var RadioGroup = /* @__PURE__ */ (0, import_react33.forwardRef)(function RadioGroup2(props, ref) {
|
|
2642
2685
|
const {
|
|
2643
2686
|
options,
|
|
2644
2687
|
value: value4,
|
|
@@ -2657,7 +2700,7 @@ var RadioGroup = /* @__PURE__ */ (0, import_react31.forwardRef)(function RadioGr
|
|
|
2657
2700
|
className
|
|
2658
2701
|
} = props;
|
|
2659
2702
|
const isControlled = "value" in props;
|
|
2660
|
-
const generatedId = (0,
|
|
2703
|
+
const generatedId = (0, import_react33.useId)();
|
|
2661
2704
|
const baseId = id ?? generatedId;
|
|
2662
2705
|
const labelId = label6 ? `${baseId}-label` : void 0;
|
|
2663
2706
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
@@ -2711,12 +2754,125 @@ var RadioGroup = /* @__PURE__ */ (0, import_react31.forwardRef)(function RadioGr
|
|
|
2711
2754
|
] });
|
|
2712
2755
|
});
|
|
2713
2756
|
|
|
2757
|
+
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
2758
|
+
var import_react34 = require("react");
|
|
2759
|
+
|
|
2760
|
+
// src/components/SegmentedControl/SegmentedControl.css.ts
|
|
2761
|
+
var import_createRuntimeFn17 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
2762
|
+
var icon6 = "_1h65mmo7";
|
|
2763
|
+
var item7 = /* @__PURE__ */ (0, import_createRuntimeFn17.createRuntimeFn)({ defaultClassName: "_1h65mmo2", variantClassNames: { size: { sm: "_1h65mmo3", md: "_1h65mmo4", lg: "_1h65mmo5" }, fullWidth: { true: "_1h65mmo6" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2764
|
+
var root8 = /* @__PURE__ */ (0, import_createRuntimeFn17.createRuntimeFn)({ defaultClassName: "_1h65mmo0", variantClassNames: { fullWidth: { true: "_1h65mmo1" } }, defaultVariants: {}, compoundVariants: [] });
|
|
2765
|
+
|
|
2766
|
+
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
2767
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2768
|
+
var NEXT_KEYS = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 };
|
|
2769
|
+
var SegmentedControl = /* @__PURE__ */ (0, import_react34.forwardRef)(
|
|
2770
|
+
function SegmentedControl2(props, ref) {
|
|
2771
|
+
const {
|
|
2772
|
+
options,
|
|
2773
|
+
value: value4,
|
|
2774
|
+
defaultValue,
|
|
2775
|
+
onValueChange,
|
|
2776
|
+
label: label6,
|
|
2777
|
+
"aria-label": ariaLabel,
|
|
2778
|
+
size,
|
|
2779
|
+
fullWidth,
|
|
2780
|
+
disabled,
|
|
2781
|
+
name,
|
|
2782
|
+
id,
|
|
2783
|
+
className
|
|
2784
|
+
} = props;
|
|
2785
|
+
const isControlled = "value" in props;
|
|
2786
|
+
const [innerValue, setInnerValue] = (0, import_react34.useState)(defaultValue ?? "");
|
|
2787
|
+
const current2 = isControlled ? value4 ?? "" : innerValue;
|
|
2788
|
+
const generatedId = (0, import_react34.useId)();
|
|
2789
|
+
const labelId = label6 ? `${id ?? generatedId}-label` : void 0;
|
|
2790
|
+
const itemRefs = (0, import_react34.useRef)([]);
|
|
2791
|
+
const isEnabled = (index) => !disabled && !options[index]?.disabled;
|
|
2792
|
+
const select = (index) => {
|
|
2793
|
+
const next = options[index].value;
|
|
2794
|
+
if (next === current2) return;
|
|
2795
|
+
if (!isControlled) setInnerValue(next);
|
|
2796
|
+
onValueChange?.(next);
|
|
2797
|
+
};
|
|
2798
|
+
const checkedIndex = options.findIndex((option2) => option2.value === current2);
|
|
2799
|
+
const tabStop = checkedIndex >= 0 && isEnabled(checkedIndex) ? checkedIndex : options.findIndex((_, i) => isEnabled(i));
|
|
2800
|
+
const handleKeyDown = (event, index) => {
|
|
2801
|
+
let target = -1;
|
|
2802
|
+
const step = NEXT_KEYS[event.key];
|
|
2803
|
+
if (step) {
|
|
2804
|
+
for (let i = 1; i <= options.length; i++) {
|
|
2805
|
+
const candidate = (index + step * i + options.length) % options.length;
|
|
2806
|
+
if (isEnabled(candidate)) {
|
|
2807
|
+
target = candidate;
|
|
2808
|
+
break;
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
} else if (event.key === "Home") {
|
|
2812
|
+
target = options.findIndex((_, i) => isEnabled(i));
|
|
2813
|
+
} else if (event.key === "End") {
|
|
2814
|
+
for (let i = options.length - 1; i >= 0 && target < 0; i--) if (isEnabled(i)) target = i;
|
|
2815
|
+
}
|
|
2816
|
+
if (target < 0) return;
|
|
2817
|
+
event.preventDefault();
|
|
2818
|
+
itemRefs.current[target]?.focus();
|
|
2819
|
+
select(target);
|
|
2820
|
+
};
|
|
2821
|
+
const group = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2822
|
+
"div",
|
|
2823
|
+
{
|
|
2824
|
+
ref,
|
|
2825
|
+
id,
|
|
2826
|
+
role: "radiogroup",
|
|
2827
|
+
"aria-labelledby": labelId,
|
|
2828
|
+
"aria-label": label6 ? void 0 : ariaLabel,
|
|
2829
|
+
"aria-disabled": disabled || void 0,
|
|
2830
|
+
className: cx(root8({ fullWidth }), !label6 && className),
|
|
2831
|
+
children: [
|
|
2832
|
+
options.map((option2, index) => {
|
|
2833
|
+
const checked = index === checkedIndex;
|
|
2834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2835
|
+
"button",
|
|
2836
|
+
{
|
|
2837
|
+
ref: (node) => {
|
|
2838
|
+
itemRefs.current[index] = node;
|
|
2839
|
+
},
|
|
2840
|
+
type: "button",
|
|
2841
|
+
role: "radio",
|
|
2842
|
+
"aria-checked": checked,
|
|
2843
|
+
tabIndex: index === tabStop ? 0 : -1,
|
|
2844
|
+
disabled: !isEnabled(index),
|
|
2845
|
+
"data-state": checked ? "checked" : "unchecked",
|
|
2846
|
+
"data-disabled": isEnabled(index) ? void 0 : "",
|
|
2847
|
+
className: item7({ size, fullWidth }),
|
|
2848
|
+
onClick: () => select(index),
|
|
2849
|
+
onKeyDown: (event) => handleKeyDown(event, index),
|
|
2850
|
+
children: [
|
|
2851
|
+
option2.icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { "aria-hidden": true, className: icon6, children: option2.icon }),
|
|
2852
|
+
option2.label
|
|
2853
|
+
]
|
|
2854
|
+
},
|
|
2855
|
+
option2.value
|
|
2856
|
+
);
|
|
2857
|
+
}),
|
|
2858
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("input", { type: "hidden", name, value: current2 })
|
|
2859
|
+
]
|
|
2860
|
+
}
|
|
2861
|
+
);
|
|
2862
|
+
if (!label6) return group;
|
|
2863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cx(field, className), children: [
|
|
2864
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { id: labelId, className: label, children: label6 }),
|
|
2865
|
+
group
|
|
2866
|
+
] });
|
|
2867
|
+
}
|
|
2868
|
+
);
|
|
2869
|
+
|
|
2714
2870
|
// src/components/Select/Select.tsx
|
|
2715
2871
|
var RadixSelect = __toESM(require("@radix-ui/react-select"), 1);
|
|
2716
|
-
var
|
|
2872
|
+
var import_react35 = require("react");
|
|
2717
2873
|
var import_icons15 = require("@bestow-ui/icons");
|
|
2718
|
-
var
|
|
2719
|
-
var Select = /* @__PURE__ */ (0,
|
|
2874
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2875
|
+
var Select = /* @__PURE__ */ (0, import_react35.forwardRef)(function Select2(props, ref) {
|
|
2720
2876
|
const {
|
|
2721
2877
|
options,
|
|
2722
2878
|
value: value4,
|
|
@@ -2736,16 +2892,16 @@ var Select = /* @__PURE__ */ (0, import_react32.forwardRef)(function Select2(pro
|
|
|
2736
2892
|
className
|
|
2737
2893
|
} = props;
|
|
2738
2894
|
const isControlled = "value" in props;
|
|
2739
|
-
const generatedId = (0,
|
|
2895
|
+
const generatedId = (0, import_react35.useId)();
|
|
2740
2896
|
const triggerId = id ?? generatedId;
|
|
2741
2897
|
const helperId = helperText3 ? `${triggerId}-helper` : void 0;
|
|
2742
2898
|
const portal2 = usePortalProps();
|
|
2743
|
-
return /* @__PURE__ */ (0,
|
|
2744
|
-
label6 && /* @__PURE__ */ (0,
|
|
2899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
2900
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { htmlFor: triggerId, className: label, children: [
|
|
2745
2901
|
label6,
|
|
2746
|
-
required && /* @__PURE__ */ (0,
|
|
2902
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2747
2903
|
] }),
|
|
2748
|
-
/* @__PURE__ */ (0,
|
|
2904
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2749
2905
|
RadixSelect.Root,
|
|
2750
2906
|
{
|
|
2751
2907
|
value: isControlled ? value4 ?? "" : void 0,
|
|
@@ -2755,7 +2911,7 @@ var Select = /* @__PURE__ */ (0, import_react32.forwardRef)(function Select2(pro
|
|
|
2755
2911
|
required,
|
|
2756
2912
|
name,
|
|
2757
2913
|
children: [
|
|
2758
|
-
/* @__PURE__ */ (0,
|
|
2914
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2759
2915
|
RadixSelect.Trigger,
|
|
2760
2916
|
{
|
|
2761
2917
|
ref,
|
|
@@ -2766,12 +2922,12 @@ var Select = /* @__PURE__ */ (0, import_react32.forwardRef)(function Select2(pro
|
|
|
2766
2922
|
"data-invalid": error || void 0,
|
|
2767
2923
|
className: cx(root3({ size, fullWidth }), trigger2, className),
|
|
2768
2924
|
children: [
|
|
2769
|
-
/* @__PURE__ */ (0,
|
|
2770
|
-
/* @__PURE__ */ (0,
|
|
2925
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: value, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadixSelect.Value, { placeholder }) }),
|
|
2926
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadixSelect.Icon, { className: icon4, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons15.ChevronDownIcon, { size: 16 }) })
|
|
2771
2927
|
]
|
|
2772
2928
|
}
|
|
2773
2929
|
),
|
|
2774
|
-
/* @__PURE__ */ (0,
|
|
2930
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadixSelect.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2775
2931
|
RadixSelect.Content,
|
|
2776
2932
|
{
|
|
2777
2933
|
position: "popper",
|
|
@@ -2779,15 +2935,15 @@ var Select = /* @__PURE__ */ (0, import_react32.forwardRef)(function Select2(pro
|
|
|
2779
2935
|
collisionPadding: 8,
|
|
2780
2936
|
className: cx(portal2.className, content5),
|
|
2781
2937
|
style: portal2.style,
|
|
2782
|
-
children: /* @__PURE__ */ (0,
|
|
2938
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadixSelect.Viewport, { className: viewport, children: options.map((option2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2783
2939
|
RadixSelect.Item,
|
|
2784
2940
|
{
|
|
2785
2941
|
value: option2.value,
|
|
2786
2942
|
disabled: option2.disabled,
|
|
2787
2943
|
className: item4,
|
|
2788
2944
|
children: [
|
|
2789
|
-
/* @__PURE__ */ (0,
|
|
2790
|
-
/* @__PURE__ */ (0,
|
|
2945
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadixSelect.ItemText, { children: option2.label }),
|
|
2946
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadixSelect.ItemIndicator, { className: itemIndicator, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons15.CheckIcon, { size: 16 }) })
|
|
2791
2947
|
]
|
|
2792
2948
|
},
|
|
2793
2949
|
option2.value
|
|
@@ -2797,29 +2953,29 @@ var Select = /* @__PURE__ */ (0, import_react32.forwardRef)(function Select2(pro
|
|
|
2797
2953
|
]
|
|
2798
2954
|
}
|
|
2799
2955
|
),
|
|
2800
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
2956
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
2801
2957
|
] });
|
|
2802
2958
|
});
|
|
2803
2959
|
|
|
2804
2960
|
// src/components/Skeleton/Skeleton.tsx
|
|
2805
2961
|
var import_dynamic2 = require("@vanilla-extract/dynamic");
|
|
2806
|
-
var
|
|
2962
|
+
var import_react36 = require("react");
|
|
2807
2963
|
|
|
2808
2964
|
// src/components/Skeleton/Skeleton.css.ts
|
|
2809
|
-
var
|
|
2965
|
+
var import_createRuntimeFn18 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
2810
2966
|
var height = "var(--_1s8datd1)";
|
|
2811
2967
|
var lines = "_1s8datd6";
|
|
2812
|
-
var skeleton = /* @__PURE__ */ (0,
|
|
2968
|
+
var skeleton = /* @__PURE__ */ (0, import_createRuntimeFn18.createRuntimeFn)({ defaultClassName: "_1s8datd2", variantClassNames: { variant: { text: "_1s8datd3", rect: "_1s8datd4", circle: "_1s8datd5" } }, defaultVariants: { variant: "text" }, compoundVariants: [] });
|
|
2813
2969
|
var width = "var(--_1s8datd0)";
|
|
2814
2970
|
|
|
2815
2971
|
// src/components/Skeleton/Skeleton.tsx
|
|
2816
|
-
var
|
|
2972
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2817
2973
|
var toCss = (value4) => typeof value4 === "number" ? `${value4}px` : value4;
|
|
2818
|
-
var Skeleton = /* @__PURE__ */ (0,
|
|
2974
|
+
var Skeleton = /* @__PURE__ */ (0, import_react36.forwardRef)(function Skeleton2({ variant = "text", width: width2, height: height2, lines: lines2 = 1, className, style, ...rest }, ref) {
|
|
2819
2975
|
const w = toCss(width2 ?? (variant === "circle" ? 40 : "100%"));
|
|
2820
2976
|
const h = toCss(height2 ?? (variant === "circle" ? w : variant === "rect" ? 100 : "1em"));
|
|
2821
2977
|
if (variant === "text" && lines2 > 1) {
|
|
2822
|
-
return /* @__PURE__ */ (0,
|
|
2978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2823
2979
|
"span",
|
|
2824
2980
|
{
|
|
2825
2981
|
ref,
|
|
@@ -2827,7 +2983,7 @@ var Skeleton = /* @__PURE__ */ (0, import_react33.forwardRef)(function Skeleton2
|
|
|
2827
2983
|
className: cx(lines, className),
|
|
2828
2984
|
style: { ...(0, import_dynamic2.assignInlineVars)({ [width]: w }), ...style },
|
|
2829
2985
|
...rest,
|
|
2830
|
-
children: Array.from({ length: lines2 }, (_, i) => /* @__PURE__ */ (0,
|
|
2986
|
+
children: Array.from({ length: lines2 }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2831
2987
|
"span",
|
|
2832
2988
|
{
|
|
2833
2989
|
className: skeleton({ variant }),
|
|
@@ -2838,7 +2994,7 @@ var Skeleton = /* @__PURE__ */ (0, import_react33.forwardRef)(function Skeleton2
|
|
|
2838
2994
|
}
|
|
2839
2995
|
);
|
|
2840
2996
|
}
|
|
2841
|
-
return /* @__PURE__ */ (0,
|
|
2997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2842
2998
|
"span",
|
|
2843
2999
|
{
|
|
2844
3000
|
ref,
|
|
@@ -2850,25 +3006,48 @@ var Skeleton = /* @__PURE__ */ (0, import_react33.forwardRef)(function Skeleton2
|
|
|
2850
3006
|
);
|
|
2851
3007
|
});
|
|
2852
3008
|
|
|
3009
|
+
// src/components/SkipLink/SkipLink.tsx
|
|
3010
|
+
var import_react37 = require("react");
|
|
3011
|
+
|
|
3012
|
+
// src/components/SkipLink/SkipLink.css.ts
|
|
3013
|
+
var skipLink = "_1t9jaar0";
|
|
3014
|
+
|
|
3015
|
+
// src/components/SkipLink/SkipLink.tsx
|
|
3016
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3017
|
+
var SkipLink = /* @__PURE__ */ (0, import_react37.forwardRef)(function SkipLink2({ href = "#main", className, children, onClick, ...rest }, ref) {
|
|
3018
|
+
const m = useMessages();
|
|
3019
|
+
const handleClick = (event) => {
|
|
3020
|
+
onClick?.(event);
|
|
3021
|
+
if (event.defaultPrevented || !href.startsWith("#")) return;
|
|
3022
|
+
const target = document.getElementById(decodeURIComponent(href.slice(1)));
|
|
3023
|
+
if (!target) return;
|
|
3024
|
+
event.preventDefault();
|
|
3025
|
+
if (!target.hasAttribute("tabindex")) target.setAttribute("tabindex", "-1");
|
|
3026
|
+
target.focus();
|
|
3027
|
+
target.scrollIntoView?.({ block: "start" });
|
|
3028
|
+
};
|
|
3029
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("a", { ref, href, className: cx(skipLink, className), onClick: handleClick, ...rest, children: children ?? m.skipToContent ?? "\uBCF8\uBB38 \uBC14\uB85C\uAC00\uAE30" });
|
|
3030
|
+
});
|
|
3031
|
+
|
|
2853
3032
|
// src/components/Slider/Slider.tsx
|
|
2854
3033
|
var RadixSlider = __toESM(require("@radix-ui/react-slider"), 1);
|
|
2855
|
-
var
|
|
3034
|
+
var import_react38 = require("react");
|
|
2856
3035
|
|
|
2857
3036
|
// src/components/Slider/Slider.css.ts
|
|
2858
|
-
var
|
|
3037
|
+
var import_createRuntimeFn19 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
2859
3038
|
var field2 = "_126mzjm0";
|
|
2860
3039
|
var header8 = "_126mzjm1";
|
|
2861
3040
|
var helperText2 = "_126mzjm4";
|
|
2862
3041
|
var label4 = "_126mzjm2";
|
|
2863
3042
|
var range2 = "_126mzjmb";
|
|
2864
|
-
var
|
|
2865
|
-
var thumb = /* @__PURE__ */ (0,
|
|
2866
|
-
var track2 = /* @__PURE__ */ (0,
|
|
3043
|
+
var root9 = /* @__PURE__ */ (0, import_createRuntimeFn19.createRuntimeFn)({ defaultClassName: "_126mzjm5", variantClassNames: { size: { sm: "_126mzjm6", md: "_126mzjm7" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3044
|
+
var thumb = /* @__PURE__ */ (0, import_createRuntimeFn19.createRuntimeFn)({ defaultClassName: "_126mzjmc", variantClassNames: { size: { sm: "_126mzjmd", md: "_126mzjme" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3045
|
+
var track2 = /* @__PURE__ */ (0, import_createRuntimeFn19.createRuntimeFn)({ defaultClassName: "_126mzjm8", variantClassNames: { size: { sm: "_126mzjm9", md: "_126mzjma" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2867
3046
|
var value3 = "_126mzjm3";
|
|
2868
3047
|
|
|
2869
3048
|
// src/components/Slider/Slider.tsx
|
|
2870
|
-
var
|
|
2871
|
-
var Slider = /* @__PURE__ */ (0,
|
|
3049
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3050
|
+
var Slider = /* @__PURE__ */ (0, import_react38.forwardRef)(function Slider2(props, ref) {
|
|
2872
3051
|
const {
|
|
2873
3052
|
value: value4,
|
|
2874
3053
|
defaultValue,
|
|
@@ -2889,12 +3068,12 @@ var Slider = /* @__PURE__ */ (0, import_react34.forwardRef)(function Slider2(pro
|
|
|
2889
3068
|
} = props;
|
|
2890
3069
|
const m = useMessages();
|
|
2891
3070
|
const thumbLabels = thumbLabelsProp ?? [m.rangeStart ?? "\uCD5C\uC18C", m.rangeEnd ?? "\uCD5C\uB300"];
|
|
2892
|
-
const generatedId = (0,
|
|
3071
|
+
const generatedId = (0, import_react38.useId)();
|
|
2893
3072
|
const baseId = id ?? generatedId;
|
|
2894
3073
|
const labelId = `${baseId}-label`;
|
|
2895
3074
|
const helperId = `${baseId}-helper`;
|
|
2896
3075
|
const isControlled = "value" in props;
|
|
2897
|
-
const [innerValue, setInnerValue] = (0,
|
|
3076
|
+
const [innerValue, setInnerValue] = (0, import_react38.useState)(defaultValue ?? [min]);
|
|
2898
3077
|
const current2 = isControlled ? value4 ?? [min] : innerValue;
|
|
2899
3078
|
const isRange = current2.length > 1;
|
|
2900
3079
|
const handleChange = (next) => {
|
|
@@ -2902,12 +3081,12 @@ var Slider = /* @__PURE__ */ (0, import_react34.forwardRef)(function Slider2(pro
|
|
|
2902
3081
|
onValueChange?.(next);
|
|
2903
3082
|
};
|
|
2904
3083
|
const valueText = current2.map(formatValue).join(" \u2013 ");
|
|
2905
|
-
return /* @__PURE__ */ (0,
|
|
2906
|
-
(label6 || showValue) && /* @__PURE__ */ (0,
|
|
2907
|
-
label6 && /* @__PURE__ */ (0,
|
|
2908
|
-
showValue && /* @__PURE__ */ (0,
|
|
3084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: cx(field2, className), children: [
|
|
3085
|
+
(label6 || showValue) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: header8, children: [
|
|
3086
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { id: labelId, className: label4, children: label6 }),
|
|
3087
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: value3, "aria-hidden": true, children: valueText })
|
|
2909
3088
|
] }),
|
|
2910
|
-
/* @__PURE__ */ (0,
|
|
3089
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2911
3090
|
RadixSlider.Root,
|
|
2912
3091
|
{
|
|
2913
3092
|
ref,
|
|
@@ -2917,13 +3096,13 @@ var Slider = /* @__PURE__ */ (0, import_react34.forwardRef)(function Slider2(pro
|
|
|
2917
3096
|
disabled,
|
|
2918
3097
|
value: current2,
|
|
2919
3098
|
onValueChange: handleChange,
|
|
2920
|
-
className:
|
|
3099
|
+
className: root9({ size }),
|
|
2921
3100
|
...rest,
|
|
2922
3101
|
children: [
|
|
2923
|
-
/* @__PURE__ */ (0,
|
|
3102
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixSlider.Track, { className: track2({ size }), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixSlider.Range, { className: range2 }) }),
|
|
2924
3103
|
current2.map((thumbValue, index) => {
|
|
2925
3104
|
const thumbLabelId = `${baseId}-thumb-${index}`;
|
|
2926
|
-
return /* @__PURE__ */ (0,
|
|
3105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2927
3106
|
RadixSlider.Thumb,
|
|
2928
3107
|
{
|
|
2929
3108
|
className: thumb({ size }),
|
|
@@ -2938,45 +3117,45 @@ var Slider = /* @__PURE__ */ (0, import_react34.forwardRef)(function Slider2(pro
|
|
|
2938
3117
|
]
|
|
2939
3118
|
}
|
|
2940
3119
|
),
|
|
2941
|
-
isRange && current2.map((_, index) => /* @__PURE__ */ (0,
|
|
3120
|
+
isRange && current2.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { id: `${baseId}-thumb-${index}`, hidden: true, children: [
|
|
2942
3121
|
label6 ? "" : ariaLabel ? `${ariaLabel} ` : "",
|
|
2943
3122
|
thumbLabels[index] ?? `${index + 1}`
|
|
2944
3123
|
] }, index)),
|
|
2945
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
3124
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { id: helperId, className: helperText2, children: helperText3 })
|
|
2946
3125
|
] });
|
|
2947
3126
|
});
|
|
2948
3127
|
|
|
2949
3128
|
// src/components/Stack/Stack.tsx
|
|
2950
|
-
var
|
|
3129
|
+
var import_react39 = require("react");
|
|
2951
3130
|
|
|
2952
3131
|
// src/components/Stack/Stack.css.ts
|
|
2953
|
-
var
|
|
2954
|
-
var stack = /* @__PURE__ */ (0,
|
|
3132
|
+
var import_createRuntimeFn20 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
3133
|
+
var stack = /* @__PURE__ */ (0, import_createRuntimeFn20.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: [] });
|
|
2955
3134
|
|
|
2956
3135
|
// src/components/Stack/Stack.tsx
|
|
2957
|
-
var
|
|
2958
|
-
var Stack = /* @__PURE__ */ (0,
|
|
2959
|
-
return /* @__PURE__ */ (0,
|
|
3136
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3137
|
+
var Stack = /* @__PURE__ */ (0, import_react39.forwardRef)(function Stack2({ as: Component = "div", direction, gap, align, justify, wrap, className, ...rest }, ref) {
|
|
3138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Component, { ref, className: cx(stack({ direction, gap, align, justify, wrap }), className), ...rest });
|
|
2960
3139
|
});
|
|
2961
3140
|
|
|
2962
3141
|
// src/components/Switch/Switch.tsx
|
|
2963
3142
|
var RadixSwitch = __toESM(require("@radix-ui/react-switch"), 1);
|
|
2964
|
-
var
|
|
3143
|
+
var import_react40 = require("react");
|
|
2965
3144
|
|
|
2966
3145
|
// src/components/Switch/Switch.css.ts
|
|
2967
|
-
var
|
|
3146
|
+
var import_createRuntimeFn21 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
2968
3147
|
var label5 = "o33ul29";
|
|
2969
|
-
var
|
|
2970
|
-
var thumb2 = /* @__PURE__ */ (0,
|
|
2971
|
-
var track3 = /* @__PURE__ */ (0,
|
|
3148
|
+
var root10 = /* @__PURE__ */ (0, import_createRuntimeFn21.createRuntimeFn)({ defaultClassName: "o33ul20", variantClassNames: { size: { sm: "o33ul21", md: "o33ul22" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3149
|
+
var thumb2 = /* @__PURE__ */ (0, import_createRuntimeFn21.createRuntimeFn)({ defaultClassName: "o33ul26", variantClassNames: { size: { sm: "o33ul27", md: "o33ul28" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3150
|
+
var track3 = /* @__PURE__ */ (0, import_createRuntimeFn21.createRuntimeFn)({ defaultClassName: "o33ul23", variantClassNames: { size: { sm: "o33ul24", md: "o33ul25" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2972
3151
|
|
|
2973
3152
|
// src/components/Switch/Switch.tsx
|
|
2974
|
-
var
|
|
2975
|
-
var Switch = /* @__PURE__ */ (0,
|
|
2976
|
-
const generatedId = (0,
|
|
3153
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3154
|
+
var Switch = /* @__PURE__ */ (0, import_react40.forwardRef)(function Switch2({ label: label6, size, id, className, disabled, "aria-label": ariaLabel, ...rest }, ref) {
|
|
3155
|
+
const generatedId = (0, import_react40.useId)();
|
|
2977
3156
|
const switchId = id ?? generatedId;
|
|
2978
|
-
return /* @__PURE__ */ (0,
|
|
2979
|
-
/* @__PURE__ */ (0,
|
|
3157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: cx(root10({ size }), className), "data-disabled": disabled || void 0, children: [
|
|
3158
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2980
3159
|
RadixSwitch.Root,
|
|
2981
3160
|
{
|
|
2982
3161
|
ref,
|
|
@@ -2985,22 +3164,22 @@ var Switch = /* @__PURE__ */ (0, import_react36.forwardRef)(function Switch2({ l
|
|
|
2985
3164
|
"aria-label": ariaLabel,
|
|
2986
3165
|
className: track3({ size }),
|
|
2987
3166
|
...rest,
|
|
2988
|
-
children: /* @__PURE__ */ (0,
|
|
3167
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(RadixSwitch.Thumb, { className: thumb2({ size }) })
|
|
2989
3168
|
}
|
|
2990
3169
|
),
|
|
2991
|
-
label6 && /* @__PURE__ */ (0,
|
|
3170
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("label", { htmlFor: switchId, className: label5, children: label6 })
|
|
2992
3171
|
] });
|
|
2993
3172
|
});
|
|
2994
3173
|
|
|
2995
3174
|
// src/components/Table/Table.tsx
|
|
2996
|
-
var
|
|
3175
|
+
var import_react41 = require("react");
|
|
2997
3176
|
var import_icons16 = require("@bestow-ui/icons");
|
|
2998
3177
|
|
|
2999
3178
|
// src/components/Table/Table.css.ts
|
|
3000
|
-
var
|
|
3179
|
+
var import_createRuntimeFn22 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
3001
3180
|
var body4 = "l3ploy5";
|
|
3002
3181
|
var caption = "l3ploy2";
|
|
3003
|
-
var cell2 = /* @__PURE__ */ (0,
|
|
3182
|
+
var cell2 = /* @__PURE__ */ (0, import_createRuntimeFn22.createRuntimeFn)({ defaultClassName: "l3ploy9", variantClassNames: { size: { sm: "l3ploya", md: "l3ployb" }, align: { left: "l3ployc", center: "l3ployd", right: "l3ploye" } }, defaultVariants: { size: "md", align: "left" }, compoundVariants: [] });
|
|
3004
3183
|
var container = "l3ploy0";
|
|
3005
3184
|
var footer4 = "l3ploy7";
|
|
3006
3185
|
var footerCell = "l3ployg";
|
|
@@ -3014,10 +3193,10 @@ var striped = "l3ploy6";
|
|
|
3014
3193
|
var table = "l3ploy1";
|
|
3015
3194
|
|
|
3016
3195
|
// src/components/Table/Table.tsx
|
|
3017
|
-
var
|
|
3018
|
-
var TableSizeContext = /* @__PURE__ */ (0,
|
|
3019
|
-
var TableSectionContext = /* @__PURE__ */ (0,
|
|
3020
|
-
var Table = /* @__PURE__ */ (0,
|
|
3196
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3197
|
+
var TableSizeContext = /* @__PURE__ */ (0, import_react41.createContext)("md");
|
|
3198
|
+
var TableSectionContext = /* @__PURE__ */ (0, import_react41.createContext)("body");
|
|
3199
|
+
var Table = /* @__PURE__ */ (0, import_react41.forwardRef)(function Table2({
|
|
3021
3200
|
size = "md",
|
|
3022
3201
|
striped: striped2,
|
|
3023
3202
|
stickyHeader: stickyHeader2,
|
|
@@ -3029,8 +3208,8 @@ var Table = /* @__PURE__ */ (0, import_react37.forwardRef)(function Table2({
|
|
|
3029
3208
|
children,
|
|
3030
3209
|
...rest
|
|
3031
3210
|
}, ref) {
|
|
3032
|
-
const captionId = (0,
|
|
3033
|
-
return /* @__PURE__ */ (0,
|
|
3211
|
+
const captionId = (0, import_react41.useId)();
|
|
3212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TableSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3034
3213
|
"div",
|
|
3035
3214
|
{
|
|
3036
3215
|
className: cx(container, containerClassName),
|
|
@@ -3039,7 +3218,7 @@ var Table = /* @__PURE__ */ (0, import_react37.forwardRef)(function Table2({
|
|
|
3039
3218
|
role: "region",
|
|
3040
3219
|
"aria-labelledby": caption2 ? captionId : void 0,
|
|
3041
3220
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
3042
|
-
children: /* @__PURE__ */ (0,
|
|
3221
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3043
3222
|
"table",
|
|
3044
3223
|
{
|
|
3045
3224
|
ref,
|
|
@@ -3047,7 +3226,7 @@ var Table = /* @__PURE__ */ (0, import_react37.forwardRef)(function Table2({
|
|
|
3047
3226
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
3048
3227
|
...rest,
|
|
3049
3228
|
children: [
|
|
3050
|
-
caption2 && /* @__PURE__ */ (0,
|
|
3229
|
+
caption2 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("caption", { id: captionId, className: caption, children: caption2 }),
|
|
3051
3230
|
children
|
|
3052
3231
|
]
|
|
3053
3232
|
}
|
|
@@ -3055,31 +3234,31 @@ var Table = /* @__PURE__ */ (0, import_react37.forwardRef)(function Table2({
|
|
|
3055
3234
|
}
|
|
3056
3235
|
) });
|
|
3057
3236
|
});
|
|
3058
|
-
var TableHeader = /* @__PURE__ */ (0,
|
|
3237
|
+
var TableHeader = /* @__PURE__ */ (0, import_react41.forwardRef)(
|
|
3059
3238
|
function TableHeader2({ className, ...rest }, ref) {
|
|
3060
|
-
return /* @__PURE__ */ (0,
|
|
3239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TableSectionContext.Provider, { value: "header", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("thead", { ref, className: cx(header9, className), ...rest }) });
|
|
3061
3240
|
}
|
|
3062
3241
|
);
|
|
3063
|
-
var TableBody = /* @__PURE__ */ (0,
|
|
3242
|
+
var TableBody = /* @__PURE__ */ (0, import_react41.forwardRef)(
|
|
3064
3243
|
function TableBody2({ className, ...rest }, ref) {
|
|
3065
|
-
return /* @__PURE__ */ (0,
|
|
3244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("tbody", { ref, className: cx(body4, className), ...rest }) });
|
|
3066
3245
|
}
|
|
3067
3246
|
);
|
|
3068
|
-
var TableFooter = /* @__PURE__ */ (0,
|
|
3247
|
+
var TableFooter = /* @__PURE__ */ (0, import_react41.forwardRef)(
|
|
3069
3248
|
function TableFooter2({ className, ...rest }, ref) {
|
|
3070
|
-
return /* @__PURE__ */ (0,
|
|
3249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("tfoot", { ref, className: cx(footer4, className), ...rest }) });
|
|
3071
3250
|
}
|
|
3072
3251
|
);
|
|
3073
|
-
var TableRow = /* @__PURE__ */ (0,
|
|
3074
|
-
return /* @__PURE__ */ (0,
|
|
3252
|
+
var TableRow = /* @__PURE__ */ (0, import_react41.forwardRef)(function TableRow2({ selected, className, ...rest }, ref) {
|
|
3253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("tr", { ref, className: cx(row3, className), "data-state": selected ? "selected" : void 0, ...rest });
|
|
3075
3254
|
});
|
|
3076
|
-
var TableHead = /* @__PURE__ */ (0,
|
|
3077
|
-
const size = (0,
|
|
3078
|
-
const section = (0,
|
|
3255
|
+
var TableHead = /* @__PURE__ */ (0, import_react41.forwardRef)(function TableHead2({ align, sortDirection, onSort, scope, className, children, ...rest }, ref) {
|
|
3256
|
+
const size = (0, import_react41.useContext)(TableSizeContext);
|
|
3257
|
+
const section = (0, import_react41.useContext)(TableSectionContext);
|
|
3079
3258
|
const sortable = onSort !== void 0;
|
|
3080
3259
|
const direction = sortDirection ?? "none";
|
|
3081
3260
|
const SortIcon = direction === "descending" ? import_icons16.ArrowDownIcon : import_icons16.ArrowUpIcon;
|
|
3082
|
-
return /* @__PURE__ */ (0,
|
|
3261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3083
3262
|
"th",
|
|
3084
3263
|
{
|
|
3085
3264
|
ref,
|
|
@@ -3091,17 +3270,17 @@ var TableHead = /* @__PURE__ */ (0, import_react37.forwardRef)(function TableHea
|
|
|
3091
3270
|
className
|
|
3092
3271
|
),
|
|
3093
3272
|
...rest,
|
|
3094
|
-
children: sortable ? /* @__PURE__ */ (0,
|
|
3273
|
+
children: sortable ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("button", { type: "button", className: sortButton, onClick: onSort, children: [
|
|
3095
3274
|
children,
|
|
3096
|
-
/* @__PURE__ */ (0,
|
|
3275
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SortIcon, { size: 14, className: sortIcon, "data-active": direction !== "none", "aria-hidden": true })
|
|
3097
3276
|
] }) : children
|
|
3098
3277
|
}
|
|
3099
3278
|
);
|
|
3100
3279
|
});
|
|
3101
|
-
var TableCell = /* @__PURE__ */ (0,
|
|
3102
|
-
const size = (0,
|
|
3103
|
-
const section = (0,
|
|
3104
|
-
return /* @__PURE__ */ (0,
|
|
3280
|
+
var TableCell = /* @__PURE__ */ (0, import_react41.forwardRef)(function TableCell2({ align, className, ...rest }, ref) {
|
|
3281
|
+
const size = (0, import_react41.useContext)(TableSizeContext);
|
|
3282
|
+
const section = (0, import_react41.useContext)(TableSectionContext);
|
|
3283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3105
3284
|
"td",
|
|
3106
3285
|
{
|
|
3107
3286
|
ref,
|
|
@@ -3113,48 +3292,47 @@ var TableCell = /* @__PURE__ */ (0, import_react37.forwardRef)(function TableCel
|
|
|
3113
3292
|
|
|
3114
3293
|
// src/components/Tabs/Tabs.tsx
|
|
3115
3294
|
var RadixTabs = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
3116
|
-
var
|
|
3295
|
+
var import_react42 = require("react");
|
|
3117
3296
|
|
|
3118
3297
|
// src/components/Tabs/Tabs.css.ts
|
|
3119
|
-
var
|
|
3298
|
+
var import_createRuntimeFn23 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
3120
3299
|
var content10 = "fvhbtda";
|
|
3121
|
-
var list4 = /* @__PURE__ */ (0,
|
|
3122
|
-
var trigger3 = /* @__PURE__ */ (0,
|
|
3300
|
+
var list4 = /* @__PURE__ */ (0, import_createRuntimeFn23.createRuntimeFn)({ defaultClassName: "fvhbtd0", variantClassNames: { variant: { line: "fvhbtd1", soft: "fvhbtd2" } }, defaultVariants: { variant: "line" }, compoundVariants: [] });
|
|
3301
|
+
var trigger3 = /* @__PURE__ */ (0, import_createRuntimeFn23.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"]] });
|
|
3123
3302
|
|
|
3124
3303
|
// src/components/Tabs/Tabs.tsx
|
|
3125
|
-
var
|
|
3126
|
-
var TabsStyleContext = /* @__PURE__ */ (0,
|
|
3127
|
-
var Tabs = /* @__PURE__ */ (0,
|
|
3304
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3305
|
+
var TabsStyleContext = /* @__PURE__ */ (0, import_react42.createContext)({ variant: "line", size: "md" });
|
|
3306
|
+
var Tabs = /* @__PURE__ */ (0, import_react42.forwardRef)(function Tabs2({ variant = "line", size = "md", ...props }, ref) {
|
|
3128
3307
|
const controlled = "value" in props ? { value: props.value ?? "" } : {};
|
|
3129
|
-
return /* @__PURE__ */ (0,
|
|
3308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixTabs.Root, { ref, ...props, ...controlled }) });
|
|
3130
3309
|
});
|
|
3131
|
-
var TabsList = /* @__PURE__ */ (0,
|
|
3132
|
-
const { variant } = (0,
|
|
3133
|
-
return /* @__PURE__ */ (0,
|
|
3310
|
+
var TabsList = /* @__PURE__ */ (0, import_react42.forwardRef)(function TabsList2({ className, ...rest }, ref) {
|
|
3311
|
+
const { variant } = (0, import_react42.useContext)(TabsStyleContext);
|
|
3312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixTabs.List, { ref, className: cx(list4({ variant }), className), ...rest });
|
|
3134
3313
|
});
|
|
3135
|
-
var TabsTrigger = /* @__PURE__ */ (0,
|
|
3136
|
-
const { variant, size } = (0,
|
|
3137
|
-
return /* @__PURE__ */ (0,
|
|
3314
|
+
var TabsTrigger = /* @__PURE__ */ (0, import_react42.forwardRef)(function TabsTrigger2({ className, ...rest }, ref) {
|
|
3315
|
+
const { variant, size } = (0, import_react42.useContext)(TabsStyleContext);
|
|
3316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
|
|
3138
3317
|
});
|
|
3139
|
-
var TabsContent = /* @__PURE__ */ (0,
|
|
3140
|
-
return /* @__PURE__ */ (0,
|
|
3318
|
+
var TabsContent = /* @__PURE__ */ (0, import_react42.forwardRef)(function TabsContent2({ className, ...rest }, ref) {
|
|
3319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixTabs.Content, { ref, className: cx(content10, className), ...rest });
|
|
3141
3320
|
});
|
|
3142
3321
|
|
|
3143
3322
|
// src/components/Textarea/Textarea.tsx
|
|
3144
|
-
var
|
|
3323
|
+
var import_react43 = require("react");
|
|
3145
3324
|
|
|
3146
3325
|
// src/components/Textarea/Textarea.css.ts
|
|
3147
|
-
var
|
|
3326
|
+
var import_createRuntimeFn24 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
3148
3327
|
var count = "_1koawa9";
|
|
3149
3328
|
var countOver = "_1koawaa";
|
|
3150
3329
|
var defaultWidth = "_1koawa7";
|
|
3151
3330
|
var footer5 = "_1koawa8";
|
|
3152
|
-
var textarea = /* @__PURE__ */ (0,
|
|
3331
|
+
var textarea = /* @__PURE__ */ (0, import_createRuntimeFn24.createRuntimeFn)({ defaultClassName: "_1koawa0", variantClassNames: { size: { sm: "_1koawa1", md: "_1koawa2", lg: "_1koawa3" }, resize: { none: "_1koawa4", vertical: "_1koawa5", both: "_1koawa6" } }, defaultVariants: { size: "md", resize: "vertical" }, compoundVariants: [] });
|
|
3153
3332
|
|
|
3154
3333
|
// src/components/Textarea/Textarea.tsx
|
|
3155
|
-
var
|
|
3156
|
-
var
|
|
3157
|
-
var Textarea = /* @__PURE__ */ (0, import_react39.forwardRef)(function Textarea2({
|
|
3334
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3335
|
+
var Textarea = /* @__PURE__ */ (0, import_react43.forwardRef)(function Textarea2({
|
|
3158
3336
|
label: label6,
|
|
3159
3337
|
helperText: helperText3,
|
|
3160
3338
|
error,
|
|
@@ -3175,13 +3353,13 @@ var Textarea = /* @__PURE__ */ (0, import_react39.forwardRef)(function Textarea2
|
|
|
3175
3353
|
"aria-describedby": ariaDescribedBy,
|
|
3176
3354
|
...rest
|
|
3177
3355
|
}, ref) {
|
|
3178
|
-
const generatedId = (0,
|
|
3356
|
+
const generatedId = (0, import_react43.useId)();
|
|
3179
3357
|
const textareaId = id ?? generatedId;
|
|
3180
3358
|
const helperId = helperText3 ? `${textareaId}-helper` : void 0;
|
|
3181
|
-
const innerRef = (0,
|
|
3182
|
-
const [uncontrolledLength, setUncontrolledLength] = (0,
|
|
3359
|
+
const innerRef = (0, import_react43.useRef)(null);
|
|
3360
|
+
const [uncontrolledLength, setUncontrolledLength] = (0, import_react43.useState)(() => String(defaultValue ?? "").length);
|
|
3183
3361
|
const length = value4 !== void 0 ? String(value4).length : uncontrolledLength;
|
|
3184
|
-
const fitHeight = (0,
|
|
3362
|
+
const fitHeight = (0, import_react43.useCallback)(() => {
|
|
3185
3363
|
const el = innerRef.current;
|
|
3186
3364
|
if (!autoResize || !el) return;
|
|
3187
3365
|
el.style.height = "auto";
|
|
@@ -3194,12 +3372,12 @@ var Textarea = /* @__PURE__ */ (0, import_react39.forwardRef)(function Textarea2
|
|
|
3194
3372
|
fitHeight();
|
|
3195
3373
|
onChange?.(event);
|
|
3196
3374
|
};
|
|
3197
|
-
return /* @__PURE__ */ (0,
|
|
3198
|
-
label6 && /* @__PURE__ */ (0,
|
|
3375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
3376
|
+
label6 && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { htmlFor: textareaId, className: label, children: [
|
|
3199
3377
|
label6,
|
|
3200
|
-
required && /* @__PURE__ */ (0,
|
|
3378
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
3201
3379
|
] }),
|
|
3202
|
-
/* @__PURE__ */ (0,
|
|
3380
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3203
3381
|
"textarea",
|
|
3204
3382
|
{
|
|
3205
3383
|
ref: mergeRefs(innerRef, ref),
|
|
@@ -3221,57 +3399,51 @@ var Textarea = /* @__PURE__ */ (0, import_react39.forwardRef)(function Textarea2
|
|
|
3221
3399
|
...rest
|
|
3222
3400
|
}
|
|
3223
3401
|
),
|
|
3224
|
-
(helperText3 || showCount) && /* @__PURE__ */ (0,
|
|
3225
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
3226
|
-
showCount && /* @__PURE__ */ (0,
|
|
3402
|
+
(helperText3 || showCount) && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: footer5, children: [
|
|
3403
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
|
|
3404
|
+
showCount && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: cx(count, maxLength !== void 0 && length >= maxLength && countOver), children: maxLength !== void 0 ? `${length}/${maxLength}` : length })
|
|
3227
3405
|
] })
|
|
3228
3406
|
] });
|
|
3229
3407
|
});
|
|
3230
3408
|
|
|
3231
3409
|
// src/components/Toast/Toast.tsx
|
|
3232
3410
|
var RadixToast = __toESM(require("@radix-ui/react-toast"), 1);
|
|
3233
|
-
var
|
|
3411
|
+
var import_react44 = require("react");
|
|
3234
3412
|
var import_icons17 = require("@bestow-ui/icons");
|
|
3235
3413
|
|
|
3236
3414
|
// src/components/Toast/Toast.css.ts
|
|
3237
|
-
var
|
|
3415
|
+
var import_createRuntimeFn25 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
3238
3416
|
var action2 = "_1g11zvx9";
|
|
3239
3417
|
var close = "_1g11zvxa";
|
|
3240
3418
|
var description5 = "_1g11zvx8";
|
|
3241
3419
|
var title5 = "_1g11zvx7";
|
|
3242
|
-
var toast = /* @__PURE__ */ (0,
|
|
3420
|
+
var toast = /* @__PURE__ */ (0, import_createRuntimeFn25.createRuntimeFn)({ defaultClassName: "_1g11zvx1", variantClassNames: { color: { primary: "_1g11zvx2", neutral: "_1g11zvx3", success: "_1g11zvx4", warning: "_1g11zvx5", danger: "_1g11zvx6" } }, defaultVariants: { color: "neutral" }, compoundVariants: [] });
|
|
3243
3421
|
var viewport2 = "_1g11zvx0";
|
|
3244
3422
|
|
|
3245
3423
|
// src/components/Toast/Toast.tsx
|
|
3246
|
-
var
|
|
3424
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3247
3425
|
var REMOVE_DELAY = 500;
|
|
3248
|
-
var ToastContext = /* @__PURE__ */ (0,
|
|
3426
|
+
var ToastContext = /* @__PURE__ */ (0, import_react44.createContext)(null);
|
|
3249
3427
|
function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
3250
3428
|
const m = useMessages();
|
|
3251
3429
|
const label6 = labelProp ?? m.notifications ?? "\uC54C\uB9BC";
|
|
3252
|
-
const [toasts, setToasts] = (0,
|
|
3253
|
-
const nextId = (0,
|
|
3430
|
+
const [toasts, setToasts] = (0, import_react44.useState)([]);
|
|
3431
|
+
const nextId = (0, import_react44.useRef)(0);
|
|
3254
3432
|
const portal2 = usePortalProps();
|
|
3255
|
-
const toast2 = (0,
|
|
3256
|
-
if (variant !== void 0) {
|
|
3257
|
-
warnOnce(
|
|
3258
|
-
'toast() \uC758 variant \uB294 deprecated \uC608\uC694. color \uB97C \uC4F0\uC138\uC694 (variant "default" \u2192 color "neutral", 1.0 \uC5D0\uC11C \uC81C\uAC70).'
|
|
3259
|
-
);
|
|
3260
|
-
}
|
|
3261
|
-
const color = options.color ?? (variant === "default" ? "neutral" : variant);
|
|
3433
|
+
const toast2 = (0, import_react44.useCallback)((options) => {
|
|
3262
3434
|
const id = nextId.current++;
|
|
3263
|
-
setToasts((prev) => [...prev, { ...options,
|
|
3435
|
+
setToasts((prev) => [...prev, { ...options, id, open: true }]);
|
|
3264
3436
|
return id;
|
|
3265
3437
|
}, []);
|
|
3266
|
-
const dismiss = (0,
|
|
3438
|
+
const dismiss = (0, import_react44.useCallback)((id) => {
|
|
3267
3439
|
const isTarget = (t) => id === void 0 || t.id === id;
|
|
3268
3440
|
setToasts((prev) => prev.map((t) => isTarget(t) ? { ...t, open: false } : t));
|
|
3269
3441
|
setTimeout(() => setToasts((prev) => prev.filter((t) => t.open || !isTarget(t))), REMOVE_DELAY);
|
|
3270
3442
|
}, []);
|
|
3271
|
-
const value4 = (0,
|
|
3272
|
-
return /* @__PURE__ */ (0,
|
|
3443
|
+
const value4 = (0, import_react44.useMemo)(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
|
|
3444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ToastContext.Provider, { value: value4, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(RadixToast.Provider, { duration, label: label6, swipeDirection: "right", children: [
|
|
3273
3445
|
children,
|
|
3274
|
-
toasts.map(({ id, open, title: title6, description: description6, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */ (0,
|
|
3446
|
+
toasts.map(({ id, open, title: title6, description: description6, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3275
3447
|
RadixToast.Root,
|
|
3276
3448
|
{
|
|
3277
3449
|
open,
|
|
@@ -3281,19 +3453,19 @@ function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
|
3281
3453
|
},
|
|
3282
3454
|
className: toast({ color }),
|
|
3283
3455
|
children: [
|
|
3284
|
-
/* @__PURE__ */ (0,
|
|
3285
|
-
description6 && /* @__PURE__ */ (0,
|
|
3286
|
-
action3 && /* @__PURE__ */ (0,
|
|
3287
|
-
/* @__PURE__ */ (0,
|
|
3456
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RadixToast.Title, { className: title5, children: title6 }),
|
|
3457
|
+
description6 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RadixToast.Description, { className: description5, children: description6 }),
|
|
3458
|
+
action3 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RadixToast.Action, { asChild: true, altText: action3.altText ?? action3.label, className: action2, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, { size: "sm", variant: "soft", color: "neutral", onClick: action3.onClick, children: action3.label }) }),
|
|
3459
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RadixToast.Close, { className: close, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons17.XIcon, { size: 16 }) })
|
|
3288
3460
|
]
|
|
3289
3461
|
},
|
|
3290
3462
|
id
|
|
3291
3463
|
)),
|
|
3292
|
-
/* @__PURE__ */ (0,
|
|
3464
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RadixToast.Viewport, { className: cx(portal2.className, viewport2), style: portal2.style })
|
|
3293
3465
|
] }) });
|
|
3294
3466
|
}
|
|
3295
3467
|
function useToast() {
|
|
3296
|
-
const context = (0,
|
|
3468
|
+
const context = (0, import_react44.useContext)(ToastContext);
|
|
3297
3469
|
if (!context) throw new Error("useToast \uB294 ToastProvider \uC548\uC5D0\uC11C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4.");
|
|
3298
3470
|
return context;
|
|
3299
3471
|
}
|
|
@@ -3306,7 +3478,7 @@ var arrow2 = "z7rufs1";
|
|
|
3306
3478
|
var content11 = "z7rufs0";
|
|
3307
3479
|
|
|
3308
3480
|
// src/components/Tooltip/Tooltip.tsx
|
|
3309
|
-
var
|
|
3481
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3310
3482
|
function Tooltip({
|
|
3311
3483
|
content: content12,
|
|
3312
3484
|
children,
|
|
@@ -3321,9 +3493,9 @@ function Tooltip({
|
|
|
3321
3493
|
}) {
|
|
3322
3494
|
const portal2 = usePortalProps();
|
|
3323
3495
|
if (disabled || content12 == null || content12 === "") return children;
|
|
3324
|
-
return /* @__PURE__ */ (0,
|
|
3325
|
-
/* @__PURE__ */ (0,
|
|
3326
|
-
/* @__PURE__ */ (0,
|
|
3496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(RadixTooltip.Provider, { delayDuration: delay, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(RadixTooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
3497
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(RadixTooltip.Trigger, { asChild: true, children }),
|
|
3498
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(RadixTooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3327
3499
|
RadixTooltip.Content,
|
|
3328
3500
|
{
|
|
3329
3501
|
side,
|
|
@@ -3334,7 +3506,7 @@ function Tooltip({
|
|
|
3334
3506
|
style: portal2.style,
|
|
3335
3507
|
children: [
|
|
3336
3508
|
content12,
|
|
3337
|
-
/* @__PURE__ */ (0,
|
|
3509
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(RadixTooltip.Arrow, { className: arrow2, width: 10, height: 5 })
|
|
3338
3510
|
]
|
|
3339
3511
|
}
|
|
3340
3512
|
) })
|
|
@@ -3342,14 +3514,14 @@ function Tooltip({
|
|
|
3342
3514
|
}
|
|
3343
3515
|
|
|
3344
3516
|
// src/components/Typography/Typography.tsx
|
|
3345
|
-
var
|
|
3517
|
+
var import_react45 = require("react");
|
|
3346
3518
|
|
|
3347
3519
|
// src/components/Typography/Typography.css.ts
|
|
3348
|
-
var
|
|
3349
|
-
var typography = /* @__PURE__ */ (0,
|
|
3520
|
+
var import_createRuntimeFn26 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
3521
|
+
var typography = /* @__PURE__ */ (0, import_createRuntimeFn26.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: [] });
|
|
3350
3522
|
|
|
3351
3523
|
// src/components/Typography/Typography.tsx
|
|
3352
|
-
var
|
|
3524
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3353
3525
|
var defaultElement = {
|
|
3354
3526
|
display: "h1",
|
|
3355
3527
|
h1: "h1",
|
|
@@ -3361,9 +3533,9 @@ var defaultElement = {
|
|
|
3361
3533
|
"body-sm": "p",
|
|
3362
3534
|
caption: "span"
|
|
3363
3535
|
};
|
|
3364
|
-
var Typography = /* @__PURE__ */ (0,
|
|
3536
|
+
var Typography = /* @__PURE__ */ (0, import_react45.forwardRef)(function Typography2({ variant = "body", as, color, weight, align, truncate, className, ...rest }, ref) {
|
|
3365
3537
|
const Component = as ?? defaultElement[variant];
|
|
3366
|
-
return /* @__PURE__ */ (0,
|
|
3538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3367
3539
|
Component,
|
|
3368
3540
|
{
|
|
3369
3541
|
ref,
|
|
@@ -3374,7 +3546,7 @@ var Typography = /* @__PURE__ */ (0, import_react41.forwardRef)(function Typogra
|
|
|
3374
3546
|
});
|
|
3375
3547
|
|
|
3376
3548
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
3377
|
-
var
|
|
3549
|
+
var import_react46 = require("react");
|
|
3378
3550
|
|
|
3379
3551
|
// src/components/VerificationCodeInput/VerificationCodeInput.css.ts
|
|
3380
3552
|
var input4 = "ea01812";
|
|
@@ -3384,9 +3556,9 @@ var slots = "ea01811";
|
|
|
3384
3556
|
var timer = "ea01814";
|
|
3385
3557
|
|
|
3386
3558
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
3387
|
-
var
|
|
3559
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3388
3560
|
var formatTime = (seconds) => `${String(Math.floor(seconds / 60)).padStart(2, "0")}:${String(seconds % 60).padStart(2, "0")}`;
|
|
3389
|
-
var VerificationCodeInput = /* @__PURE__ */ (0,
|
|
3561
|
+
var VerificationCodeInput = /* @__PURE__ */ (0, import_react46.forwardRef)(
|
|
3390
3562
|
function VerificationCodeInput2(props, ref) {
|
|
3391
3563
|
const {
|
|
3392
3564
|
length = 6,
|
|
@@ -3413,23 +3585,23 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react42.forwardRef)(
|
|
|
3413
3585
|
const label6 = labelProp ?? m.verificationCode ?? "\uC778\uC99D\uBC88\uD638";
|
|
3414
3586
|
const resendText = resendTextProp ?? m.resend ?? "\uC7AC\uC804\uC1A1";
|
|
3415
3587
|
const expiredText = expiredTextProp ?? m.verificationExpired ?? "\uC778\uC99D \uC2DC\uAC04\uC774 \uC9C0\uB0AC\uC5B4\uC694. \uC7AC\uC804\uC1A1\uD574 \uC8FC\uC138\uC694.";
|
|
3416
|
-
const generatedId = (0,
|
|
3588
|
+
const generatedId = (0, import_react46.useId)();
|
|
3417
3589
|
const inputId = id ?? generatedId;
|
|
3418
3590
|
const helperId = `${inputId}-helper`;
|
|
3419
3591
|
const statusId = `${inputId}-status`;
|
|
3420
|
-
const inputRef = (0,
|
|
3592
|
+
const inputRef = (0, import_react46.useRef)(null);
|
|
3421
3593
|
const isControlled = "value" in props;
|
|
3422
|
-
const [innerValue, setInnerValue] = (0,
|
|
3594
|
+
const [innerValue, setInnerValue] = (0, import_react46.useState)(defaultValue ?? "");
|
|
3423
3595
|
const code = (isControlled ? value4 ?? "" : innerValue).slice(0, length);
|
|
3424
|
-
const [focused, setFocused] = (0,
|
|
3425
|
-
const [endAt, setEndAt] = (0,
|
|
3426
|
-
const [remaining, setRemaining] = (0,
|
|
3596
|
+
const [focused, setFocused] = (0, import_react46.useState)(false);
|
|
3597
|
+
const [endAt, setEndAt] = (0, import_react46.useState)(() => expiresIn ? Date.now() + expiresIn * 1e3 : null);
|
|
3598
|
+
const [remaining, setRemaining] = (0, import_react46.useState)(expiresIn ?? 0);
|
|
3427
3599
|
const expired = expiresIn !== void 0 && remaining <= 0;
|
|
3428
|
-
const onExpireRef = (0,
|
|
3429
|
-
(0,
|
|
3600
|
+
const onExpireRef = (0, import_react46.useRef)(onExpire);
|
|
3601
|
+
(0, import_react46.useEffect)(() => {
|
|
3430
3602
|
onExpireRef.current = onExpire;
|
|
3431
3603
|
});
|
|
3432
|
-
(0,
|
|
3604
|
+
(0, import_react46.useEffect)(() => {
|
|
3433
3605
|
if (endAt === null) return;
|
|
3434
3606
|
const tick = () => {
|
|
3435
3607
|
const left = Math.max(0, Math.ceil((endAt - Date.now()) / 1e3));
|
|
@@ -3464,17 +3636,17 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react42.forwardRef)(
|
|
|
3464
3636
|
};
|
|
3465
3637
|
const description6 = helperText3 ?? m.verificationCodeHint?.(length, type) ?? `${length}\uC790\uB9AC ${type === "numeric" ? "\uC22B\uC790" : "\uBB38\uC790"}\uB97C \uC785\uB825\uD558\uC138\uC694.`;
|
|
3466
3638
|
const activeIndex = Math.min(code.length, length - 1);
|
|
3467
|
-
return /* @__PURE__ */ (0,
|
|
3639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3468
3640
|
"div",
|
|
3469
3641
|
{
|
|
3470
3642
|
className: cx(field, className),
|
|
3471
3643
|
"data-invalid": error || void 0,
|
|
3472
3644
|
"data-disabled": disabled || void 0,
|
|
3473
3645
|
children: [
|
|
3474
|
-
/* @__PURE__ */ (0,
|
|
3475
|
-
/* @__PURE__ */ (0,
|
|
3476
|
-
/* @__PURE__ */ (0,
|
|
3477
|
-
/* @__PURE__ */ (0,
|
|
3646
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("label", { htmlFor: inputId, className: label, children: label6 }),
|
|
3647
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: row4, children: [
|
|
3648
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: slots, children: [
|
|
3649
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3478
3650
|
"input",
|
|
3479
3651
|
{
|
|
3480
3652
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -3494,7 +3666,7 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react42.forwardRef)(
|
|
|
3494
3666
|
className: input4
|
|
3495
3667
|
}
|
|
3496
3668
|
),
|
|
3497
|
-
Array.from({ length }, (_, index) => /* @__PURE__ */ (0,
|
|
3669
|
+
Array.from({ length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3498
3670
|
"div",
|
|
3499
3671
|
{
|
|
3500
3672
|
className: slot,
|
|
@@ -3505,12 +3677,12 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react42.forwardRef)(
|
|
|
3505
3677
|
index
|
|
3506
3678
|
))
|
|
3507
3679
|
] }),
|
|
3508
|
-
expiresIn !== void 0 && /* @__PURE__ */ (0,
|
|
3509
|
-
onResend && /* @__PURE__ */ (0,
|
|
3680
|
+
expiresIn !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { role: "timer", className: timer, children: formatTime(remaining) }),
|
|
3681
|
+
onResend && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Button, { size: "sm", variant: "outline", color: "neutral", onClick: resend, disabled, children: resendText })
|
|
3510
3682
|
] }),
|
|
3511
|
-
/* @__PURE__ */ (0,
|
|
3512
|
-
/* @__PURE__ */ (0,
|
|
3513
|
-
name && /* @__PURE__ */ (0,
|
|
3683
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { id: helperId, className: helperText({ error }), children: description6 }),
|
|
3684
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { id: statusId, role: "status", className: helperText({ error: true }), children: expired ? expiredText : "" }),
|
|
3685
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("input", { type: "hidden", name, value: code })
|
|
3514
3686
|
]
|
|
3515
3687
|
}
|
|
3516
3688
|
);
|
|
@@ -3559,8 +3731,10 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react42.forwardRef)(
|
|
|
3559
3731
|
PopoverClose,
|
|
3560
3732
|
Progress,
|
|
3561
3733
|
RadioGroup,
|
|
3734
|
+
SegmentedControl,
|
|
3562
3735
|
Select,
|
|
3563
3736
|
Skeleton,
|
|
3737
|
+
SkipLink,
|
|
3564
3738
|
Slider,
|
|
3565
3739
|
Spinner,
|
|
3566
3740
|
Stack,
|
|
@@ -3599,7 +3773,6 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react42.forwardRef)(
|
|
|
3599
3773
|
themeClass,
|
|
3600
3774
|
toISODate,
|
|
3601
3775
|
useMessages,
|
|
3602
|
-
usePortalClassName,
|
|
3603
3776
|
usePortalProps,
|
|
3604
3777
|
useTheme,
|
|
3605
3778
|
useToast,
|