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