@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.js
CHANGED
|
@@ -221,6 +221,90 @@ function usePortalClassName() {
|
|
|
221
221
|
return usePortalProps().className;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
+
// src/i18n/LocaleProvider.tsx
|
|
225
|
+
import { createContext as createContext2, useContext as useContext2, useMemo as useMemo2 } from "react";
|
|
226
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
227
|
+
var MessagesContext = /* @__PURE__ */ createContext2({});
|
|
228
|
+
function LocaleProvider({ messages, children }) {
|
|
229
|
+
const parent = useContext2(MessagesContext);
|
|
230
|
+
const value4 = useMemo2(() => ({ ...parent, ...messages }), [parent, messages]);
|
|
231
|
+
return /* @__PURE__ */ jsx2(MessagesContext.Provider, { value: value4, children });
|
|
232
|
+
}
|
|
233
|
+
function useMessages() {
|
|
234
|
+
return useContext2(MessagesContext);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// src/i18n/en.ts
|
|
238
|
+
var WEEKDAYS_LONG = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
239
|
+
var MONTHS = [
|
|
240
|
+
"January",
|
|
241
|
+
"February",
|
|
242
|
+
"March",
|
|
243
|
+
"April",
|
|
244
|
+
"May",
|
|
245
|
+
"June",
|
|
246
|
+
"July",
|
|
247
|
+
"August",
|
|
248
|
+
"September",
|
|
249
|
+
"October",
|
|
250
|
+
"November",
|
|
251
|
+
"December"
|
|
252
|
+
];
|
|
253
|
+
var en = {
|
|
254
|
+
close: "Close",
|
|
255
|
+
loading: "Loading",
|
|
256
|
+
notifications: "Notifications",
|
|
257
|
+
breadcrumb: "Breadcrumb",
|
|
258
|
+
pagination: "Pagination",
|
|
259
|
+
paginationPrevious: "Previous page",
|
|
260
|
+
paginationNext: "Next page",
|
|
261
|
+
paginationPage: (page) => `Page ${page}`,
|
|
262
|
+
newWindow: "(opens in a new window)",
|
|
263
|
+
noResults: "No results",
|
|
264
|
+
openList: "Show options",
|
|
265
|
+
rangeStart: "minimum",
|
|
266
|
+
rangeEnd: "maximum",
|
|
267
|
+
agreeAll: "Agree to all",
|
|
268
|
+
required: "Required",
|
|
269
|
+
optional: "Optional",
|
|
270
|
+
show: "View",
|
|
271
|
+
hide: "Hide",
|
|
272
|
+
verificationCode: "Verification code",
|
|
273
|
+
verificationCodeHint: (length, type) => `Enter the ${length}-${type === "numeric" ? "digit" : "character"} code.`,
|
|
274
|
+
resend: "Resend",
|
|
275
|
+
verificationExpired: "The code has expired. Please request a new one.",
|
|
276
|
+
phoneNumber: "Phone number",
|
|
277
|
+
businessNumber: "Business registration number",
|
|
278
|
+
businessNumberInvalid: "This business registration number is not valid. Please check it again.",
|
|
279
|
+
businessNumberIncomplete: "Enter all 10 digits.",
|
|
280
|
+
amount: "Amount",
|
|
281
|
+
currencyUnit: "KRW",
|
|
282
|
+
address: "Address",
|
|
283
|
+
addressSearch: "Find address",
|
|
284
|
+
addressSearchDescription: "Search by road name, building name, or lot number.",
|
|
285
|
+
postalCode: "Postal code",
|
|
286
|
+
baseAddress: "Address",
|
|
287
|
+
baseAddressPlaceholder: 'Select "Find address" to choose an address',
|
|
288
|
+
detailAddress: "Address line 2",
|
|
289
|
+
detailAddressPlaceholder: "Apartment, suite, unit, etc.",
|
|
290
|
+
addressLoading: "Loading address search",
|
|
291
|
+
addressLoadError: "Could not load address search. Please try again later.",
|
|
292
|
+
previousMonth: "Previous month",
|
|
293
|
+
nextMonth: "Next month",
|
|
294
|
+
monthTitle: (year, month) => `${MONTHS[month - 1]} ${year}`,
|
|
295
|
+
weekdaysShort: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
296
|
+
weekdaysLong: WEEKDAYS_LONG,
|
|
297
|
+
dayLabel: (date, weekdayLong) => `${date.getDate()}, ${weekdayLong}, ${MONTHS[date.getMonth()]} ${date.getFullYear()}`,
|
|
298
|
+
holiday: "holiday",
|
|
299
|
+
today: "today",
|
|
300
|
+
date: "Date",
|
|
301
|
+
openCalendar: "Choose date",
|
|
302
|
+
calendar: "Calendar",
|
|
303
|
+
dateInvalid: "This date does not exist.",
|
|
304
|
+
dateUnavailable: "This date is not available.",
|
|
305
|
+
dateIncomplete: "Enter the date as YYYY-MM-DD."
|
|
306
|
+
};
|
|
307
|
+
|
|
224
308
|
// src/components/Accordion/Accordion.tsx
|
|
225
309
|
import * as RadixAccordion from "@radix-ui/react-accordion";
|
|
226
310
|
import { ChevronDownIcon } from "@bestow-ui/icons";
|
|
@@ -236,21 +320,21 @@ var root2 = "v58j0l0";
|
|
|
236
320
|
var trigger = "v58j0l3";
|
|
237
321
|
|
|
238
322
|
// src/components/Accordion/Accordion.tsx
|
|
239
|
-
import { jsx as
|
|
323
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
240
324
|
var Accordion = /* @__PURE__ */ forwardRef2(function Accordion2({ className, ...props }, ref) {
|
|
241
325
|
const { collapsible, ...multipleProps } = props;
|
|
242
326
|
const typedProps = props.type === "multiple" ? multipleProps : { ...multipleProps, collapsible };
|
|
243
327
|
const rootProps = "value" in props ? { ...typedProps, value: props.value ?? (props.type === "multiple" ? [] : "") } : typedProps;
|
|
244
|
-
return /* @__PURE__ */
|
|
328
|
+
return /* @__PURE__ */ jsx3(RadixAccordion.Root, { ref, className: cx(root2, className), ...rootProps });
|
|
245
329
|
});
|
|
246
330
|
var AccordionItem = /* @__PURE__ */ forwardRef2(function AccordionItem2({ title: title6, headingLevel = 3, className, children, ...rest }, ref) {
|
|
247
331
|
const Heading = `h${headingLevel}`;
|
|
248
332
|
return /* @__PURE__ */ jsxs(RadixAccordion.Item, { ref, className: cx(item, className), ...rest, children: [
|
|
249
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ jsx3(RadixAccordion.Header, { asChild: true, children: /* @__PURE__ */ jsx3(Heading, { className: header, children: /* @__PURE__ */ jsxs(RadixAccordion.Trigger, { className: trigger, children: [
|
|
250
334
|
title6,
|
|
251
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ jsx3(ChevronDownIcon, { size: 18, className: chevron })
|
|
252
336
|
] }) }) }),
|
|
253
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ jsx3(RadixAccordion.Content, { className: content, children: /* @__PURE__ */ jsx3("div", { className: contentInner, children }) })
|
|
254
338
|
] });
|
|
255
339
|
});
|
|
256
340
|
|
|
@@ -269,15 +353,30 @@ var visuallyHidden = "_1kdtbw10";
|
|
|
269
353
|
|
|
270
354
|
// src/components/Spinner/Spinner.css.ts
|
|
271
355
|
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
272
|
-
var spinner = /* @__PURE__ */ _7a468({ defaultClassName: "_4b5tg40", variantClassNames: { color: {
|
|
356
|
+
var spinner = /* @__PURE__ */ _7a468({ 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: [] });
|
|
357
|
+
|
|
358
|
+
// src/utils/warnOnce.ts
|
|
359
|
+
var warned = /* @__PURE__ */ new Set();
|
|
360
|
+
function warnOnce(message) {
|
|
361
|
+
if (typeof process !== "undefined" && process.env.NODE_ENV === "production") return;
|
|
362
|
+
if (warned.has(message)) return;
|
|
363
|
+
warned.add(message);
|
|
364
|
+
console.warn(`[BestOW UI] ${message}`);
|
|
365
|
+
}
|
|
273
366
|
|
|
274
367
|
// src/components/Spinner/Spinner.tsx
|
|
275
|
-
import { jsx as
|
|
276
|
-
var Spinner = /* @__PURE__ */ forwardRef3(function Spinner2({ size, color, label:
|
|
368
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
369
|
+
var Spinner = /* @__PURE__ */ forwardRef3(function Spinner2({ size, color, label: labelProp, className, ...rest }, ref) {
|
|
370
|
+
const m = useMessages();
|
|
371
|
+
if (color === "current") {
|
|
372
|
+
warnOnce('Spinner \uC758 color="current" \uB294 deprecated \uC608\uC694. color="inherit" \uB97C \uC4F0\uC138\uC694 (1.0 \uC5D0\uC11C \uC81C\uAC70).');
|
|
373
|
+
color = "inherit";
|
|
374
|
+
}
|
|
375
|
+
const label6 = labelProp ?? m.loading ?? "\uB85C\uB529 \uC911";
|
|
277
376
|
const a11y = label6 ? { role: "status" } : { "aria-hidden": true };
|
|
278
377
|
return /* @__PURE__ */ jsxs2("span", { ref, className: cx(spinner({ size, color }), className), ...a11y, ...rest, children: [
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
label6 && /* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ jsx4(LoaderIcon, { size: "100%" }),
|
|
379
|
+
label6 && /* @__PURE__ */ jsx4("span", { className: visuallyHidden, children: label6 })
|
|
281
380
|
] });
|
|
282
381
|
});
|
|
283
382
|
|
|
@@ -287,7 +386,7 @@ var button = /* @__PURE__ */ _7a4682({ defaultClassName: "xcekda6", variantClass
|
|
|
287
386
|
var icon = "xcekdai";
|
|
288
387
|
|
|
289
388
|
// src/components/Button/Button.tsx
|
|
290
|
-
import { jsx as
|
|
389
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
291
390
|
var Button = /* @__PURE__ */ forwardRef4(function Button2({
|
|
292
391
|
variant,
|
|
293
392
|
color,
|
|
@@ -309,7 +408,7 @@ var Button = /* @__PURE__ */ forwardRef4(function Button2({
|
|
|
309
408
|
}
|
|
310
409
|
onClick?.(event);
|
|
311
410
|
};
|
|
312
|
-
const leading = loading2 ? /* @__PURE__ */
|
|
411
|
+
const leading = loading2 ? /* @__PURE__ */ jsx5(Spinner, { size: "sm", label: "" }) : startIcon;
|
|
313
412
|
return /* @__PURE__ */ jsxs3(
|
|
314
413
|
"button",
|
|
315
414
|
{
|
|
@@ -321,9 +420,9 @@ var Button = /* @__PURE__ */ forwardRef4(function Button2({
|
|
|
321
420
|
onClick: handleClick,
|
|
322
421
|
...rest,
|
|
323
422
|
children: [
|
|
324
|
-
leading && /* @__PURE__ */
|
|
423
|
+
leading && /* @__PURE__ */ jsx5("span", { className: icon, children: leading }),
|
|
325
424
|
children,
|
|
326
|
-
endIcon && /* @__PURE__ */
|
|
425
|
+
endIcon && /* @__PURE__ */ jsx5("span", { className: icon, children: endIcon })
|
|
327
426
|
]
|
|
328
427
|
}
|
|
329
428
|
);
|
|
@@ -342,7 +441,7 @@ var root3 = /* @__PURE__ */ _7a4683({ defaultClassName: "_19p5zvh0", variantClas
|
|
|
342
441
|
|
|
343
442
|
// src/components/Input/Input.tsx
|
|
344
443
|
import { forwardRef as forwardRef5 } from "react";
|
|
345
|
-
import { jsx as
|
|
444
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
346
445
|
var Input = /* @__PURE__ */ forwardRef5(function Input2({ size, invalid, fullWidth, startAdornment, endAdornment, rootClassName, className, disabled, ...rest }, ref) {
|
|
347
446
|
return /* @__PURE__ */ jsxs4(
|
|
348
447
|
"div",
|
|
@@ -351,8 +450,8 @@ var Input = /* @__PURE__ */ forwardRef5(function Input2({ size, invalid, fullWid
|
|
|
351
450
|
"data-invalid": invalid || void 0,
|
|
352
451
|
"data-disabled": disabled || void 0,
|
|
353
452
|
children: [
|
|
354
|
-
startAdornment && /* @__PURE__ */
|
|
355
|
-
/* @__PURE__ */
|
|
453
|
+
startAdornment && /* @__PURE__ */ jsx6("span", { className: adornment, children: startAdornment }),
|
|
454
|
+
/* @__PURE__ */ jsx6(
|
|
356
455
|
"input",
|
|
357
456
|
{
|
|
358
457
|
ref,
|
|
@@ -362,7 +461,7 @@ var Input = /* @__PURE__ */ forwardRef5(function Input2({ size, invalid, fullWid
|
|
|
362
461
|
...rest
|
|
363
462
|
}
|
|
364
463
|
),
|
|
365
|
-
endAdornment && /* @__PURE__ */
|
|
464
|
+
endAdornment && /* @__PURE__ */ jsx6("span", { className: adornment, children: endAdornment })
|
|
366
465
|
]
|
|
367
466
|
}
|
|
368
467
|
);
|
|
@@ -370,7 +469,7 @@ var Input = /* @__PURE__ */ forwardRef5(function Input2({ size, invalid, fullWid
|
|
|
370
469
|
|
|
371
470
|
// src/components/Input/TextField.tsx
|
|
372
471
|
import { forwardRef as forwardRef6, useId } from "react";
|
|
373
|
-
import { jsx as
|
|
472
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
374
473
|
var TextField = /* @__PURE__ */ forwardRef6(function TextField2({ label: label6, helperText: helperText3, error, required, fullWidth, id, "aria-describedby": ariaDescribedBy, ...rest }, ref) {
|
|
375
474
|
const generatedId = useId();
|
|
376
475
|
const inputId = id ?? generatedId;
|
|
@@ -378,9 +477,9 @@ var TextField = /* @__PURE__ */ forwardRef6(function TextField2({ label: label6,
|
|
|
378
477
|
return /* @__PURE__ */ jsxs5("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
379
478
|
label6 && /* @__PURE__ */ jsxs5("label", { htmlFor: inputId, className: label, children: [
|
|
380
479
|
label6,
|
|
381
|
-
required && /* @__PURE__ */
|
|
480
|
+
required && /* @__PURE__ */ jsx7("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
382
481
|
] }),
|
|
383
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ jsx7(
|
|
384
483
|
Input,
|
|
385
484
|
{
|
|
386
485
|
ref,
|
|
@@ -392,7 +491,7 @@ var TextField = /* @__PURE__ */ forwardRef6(function TextField2({ label: label6,
|
|
|
392
491
|
...rest
|
|
393
492
|
}
|
|
394
493
|
),
|
|
395
|
-
helperText3 && /* @__PURE__ */
|
|
494
|
+
helperText3 && /* @__PURE__ */ jsx7("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
396
495
|
] });
|
|
397
496
|
});
|
|
398
497
|
|
|
@@ -433,7 +532,7 @@ var overlay = "_1pdsmv00";
|
|
|
433
532
|
var title = "_1pdsmv07";
|
|
434
533
|
|
|
435
534
|
// src/components/Modal/Modal.tsx
|
|
436
|
-
import { jsx as
|
|
535
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
437
536
|
function Modal({
|
|
438
537
|
open,
|
|
439
538
|
defaultOpen,
|
|
@@ -450,11 +549,12 @@ function Modal({
|
|
|
450
549
|
onCloseAutoFocus
|
|
451
550
|
}) {
|
|
452
551
|
const portal2 = usePortalProps();
|
|
552
|
+
const m = useMessages();
|
|
453
553
|
const focus = useReturnFocus(Boolean(trigger4), onCloseAutoFocus);
|
|
454
554
|
return /* @__PURE__ */ jsxs6(Dialog.Root, { open, defaultOpen, onOpenChange, children: [
|
|
455
|
-
trigger4 && /* @__PURE__ */
|
|
555
|
+
trigger4 && /* @__PURE__ */ jsx8(Dialog.Trigger, { asChild: true, children: trigger4 }),
|
|
456
556
|
/* @__PURE__ */ jsxs6(Dialog.Portal, { children: [
|
|
457
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ jsx8(Dialog.Overlay, { className: cx(portal2.className, overlay), style: portal2.style }),
|
|
458
558
|
/* @__PURE__ */ jsxs6(
|
|
459
559
|
Dialog.Content,
|
|
460
560
|
{
|
|
@@ -467,13 +567,13 @@ function Modal({
|
|
|
467
567
|
children: [
|
|
468
568
|
/* @__PURE__ */ jsxs6("div", { className: header2, children: [
|
|
469
569
|
/* @__PURE__ */ jsxs6("div", { className: headings, children: [
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
-
description6 && /* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ jsx8(Dialog.Title, { className: title, children: title6 }),
|
|
571
|
+
description6 && /* @__PURE__ */ jsx8(Dialog.Description, { className: description, children: description6 })
|
|
472
572
|
] }),
|
|
473
|
-
!hideCloseButton && /* @__PURE__ */
|
|
573
|
+
!hideCloseButton && /* @__PURE__ */ jsx8(Dialog.Close, { className: closeButton, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ jsx8(XIcon, { size: 16 }) })
|
|
474
574
|
] }),
|
|
475
|
-
children && /* @__PURE__ */
|
|
476
|
-
footer6 && /* @__PURE__ */
|
|
575
|
+
children && /* @__PURE__ */ jsx8("div", { className: body, children }),
|
|
576
|
+
footer6 && /* @__PURE__ */ jsx8("div", { className: footer, children: footer6 })
|
|
477
577
|
]
|
|
478
578
|
}
|
|
479
579
|
)
|
|
@@ -534,12 +634,13 @@ var searchStatus = "_16fi7uy5";
|
|
|
534
634
|
var zonecode = "_16fi7uy3";
|
|
535
635
|
|
|
536
636
|
// src/components/AddressInput/AddressInput.tsx
|
|
537
|
-
import { Fragment, jsx as
|
|
637
|
+
import { Fragment, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
538
638
|
var EMPTY = { zonecode: "", address: "", extraAddress: "", detail: "" };
|
|
539
639
|
function SearchArea({
|
|
540
640
|
provider,
|
|
541
641
|
onSelect,
|
|
542
|
-
loadErrorText
|
|
642
|
+
loadErrorText,
|
|
643
|
+
loadingText
|
|
543
644
|
}) {
|
|
544
645
|
const containerRef = useRef2(null);
|
|
545
646
|
const [status, setStatus] = useState("loading");
|
|
@@ -565,8 +666,8 @@ function SearchArea({
|
|
|
565
666
|
};
|
|
566
667
|
}, [provider]);
|
|
567
668
|
return /* @__PURE__ */ jsxs7("div", { className: searchArea, children: [
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
status !== "ready" && /* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ jsx9("div", { ref: containerRef, style: { width: "100%", height: "100%" } }),
|
|
670
|
+
status !== "ready" && /* @__PURE__ */ jsx9("div", { className: searchStatus, role: "status", children: status === "loading" ? /* @__PURE__ */ jsx9(Spinner, { label: loadingText }) : loadErrorText })
|
|
570
671
|
] });
|
|
571
672
|
}
|
|
572
673
|
var AddressInput = /* @__PURE__ */ forwardRef7(
|
|
@@ -575,18 +676,23 @@ var AddressInput = /* @__PURE__ */ forwardRef7(
|
|
|
575
676
|
value: value4,
|
|
576
677
|
defaultValue,
|
|
577
678
|
onValueChange,
|
|
578
|
-
label:
|
|
679
|
+
label: labelProp,
|
|
579
680
|
required,
|
|
580
681
|
helperText: helperText3,
|
|
581
682
|
error,
|
|
582
683
|
disabled,
|
|
583
684
|
provider = kakaoPostcodeProvider,
|
|
584
|
-
searchLabel
|
|
585
|
-
detailPlaceholder
|
|
586
|
-
loadErrorText
|
|
685
|
+
searchLabel: searchLabelProp,
|
|
686
|
+
detailPlaceholder: detailPlaceholderProp,
|
|
687
|
+
loadErrorText: loadErrorTextProp,
|
|
587
688
|
name,
|
|
588
689
|
className
|
|
589
690
|
} = props;
|
|
691
|
+
const m = useMessages();
|
|
692
|
+
const label6 = labelProp ?? m.address ?? "\uC8FC\uC18C";
|
|
693
|
+
const searchLabel = searchLabelProp ?? m.addressSearch ?? "\uC8FC\uC18C \uAC80\uC0C9";
|
|
694
|
+
const detailPlaceholder = detailPlaceholderProp ?? m.detailAddressPlaceholder ?? "\uC0C1\uC138 \uC8FC\uC18C (\uB3D9\xB7\uD638\uC218 \uB4F1)";
|
|
695
|
+
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.";
|
|
590
696
|
const baseId = useId2();
|
|
591
697
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
592
698
|
const detailRef = useRef2(null);
|
|
@@ -618,42 +724,42 @@ var AddressInput = /* @__PURE__ */ forwardRef7(
|
|
|
618
724
|
return /* @__PURE__ */ jsxs7("fieldset", { ref, className: cx(fieldset, className), disabled, "aria-describedby": helperId, children: [
|
|
619
725
|
/* @__PURE__ */ jsxs7("legend", { className: legend, children: [
|
|
620
726
|
label6,
|
|
621
|
-
required && /* @__PURE__ */
|
|
727
|
+
required && /* @__PURE__ */ jsx9("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
622
728
|
] }),
|
|
623
729
|
/* @__PURE__ */ jsxs7("div", { className: row, children: [
|
|
624
|
-
/* @__PURE__ */
|
|
730
|
+
/* @__PURE__ */ jsx9(
|
|
625
731
|
TextField,
|
|
626
732
|
{
|
|
627
|
-
"aria-label": "\uC6B0\uD3B8\uBC88\uD638",
|
|
733
|
+
"aria-label": m.postalCode ?? "\uC6B0\uD3B8\uBC88\uD638",
|
|
628
734
|
readOnly: true,
|
|
629
735
|
value: current2.zonecode,
|
|
630
|
-
placeholder: "\uC6B0\uD3B8\uBC88\uD638",
|
|
736
|
+
placeholder: m.postalCode ?? "\uC6B0\uD3B8\uBC88\uD638",
|
|
631
737
|
error: error && !current2.zonecode,
|
|
632
738
|
"aria-required": required || void 0,
|
|
633
739
|
rootClassName: zonecode,
|
|
634
740
|
onClick: openSearch
|
|
635
741
|
}
|
|
636
742
|
),
|
|
637
|
-
/* @__PURE__ */
|
|
743
|
+
/* @__PURE__ */ jsx9(Button, { variant: "outline", color: "neutral", onClick: openSearch, disabled, children: searchLabel })
|
|
638
744
|
] }),
|
|
639
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ jsx9(
|
|
640
746
|
TextField,
|
|
641
747
|
{
|
|
642
|
-
"aria-label": "\uAE30\uBCF8 \uC8FC\uC18C",
|
|
748
|
+
"aria-label": m.baseAddress ?? "\uAE30\uBCF8 \uC8FC\uC18C",
|
|
643
749
|
readOnly: true,
|
|
644
750
|
value: fullAddress,
|
|
645
|
-
placeholder: `${searchLabel}\uC744 \uB20C\uB7EC \uC8FC\uC18C\uB97C \uACE0\uB974\uC138\uC694`,
|
|
751
|
+
placeholder: m.baseAddressPlaceholder ?? `${searchLabel}\uC744 \uB20C\uB7EC \uC8FC\uC18C\uB97C \uACE0\uB974\uC138\uC694`,
|
|
646
752
|
error: error && !current2.address,
|
|
647
753
|
"aria-required": required || void 0,
|
|
648
754
|
fullWidth: true,
|
|
649
755
|
onClick: openSearch
|
|
650
756
|
}
|
|
651
757
|
),
|
|
652
|
-
/* @__PURE__ */
|
|
758
|
+
/* @__PURE__ */ jsx9(
|
|
653
759
|
TextField,
|
|
654
760
|
{
|
|
655
761
|
ref: detailRef,
|
|
656
|
-
"aria-label": "\uC0C1\uC138 \uC8FC\uC18C",
|
|
762
|
+
"aria-label": m.detailAddress ?? "\uC0C1\uC138 \uC8FC\uC18C",
|
|
657
763
|
value: current2.detail,
|
|
658
764
|
placeholder: detailPlaceholder,
|
|
659
765
|
onChange: (event) => update({ ...current2, detail: event.target.value }),
|
|
@@ -661,26 +767,34 @@ var AddressInput = /* @__PURE__ */ forwardRef7(
|
|
|
661
767
|
fullWidth: true
|
|
662
768
|
}
|
|
663
769
|
),
|
|
664
|
-
helperText3 && /* @__PURE__ */
|
|
770
|
+
helperText3 && /* @__PURE__ */ jsx9("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
|
|
665
771
|
name && /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
666
|
-
/* @__PURE__ */
|
|
667
|
-
/* @__PURE__ */
|
|
668
|
-
/* @__PURE__ */
|
|
772
|
+
/* @__PURE__ */ jsx9("input", { type: "hidden", name: `${name}[zonecode]`, value: current2.zonecode }),
|
|
773
|
+
/* @__PURE__ */ jsx9("input", { type: "hidden", name: `${name}[address]`, value: fullAddress }),
|
|
774
|
+
/* @__PURE__ */ jsx9("input", { type: "hidden", name: `${name}[detail]`, value: current2.detail })
|
|
669
775
|
] }),
|
|
670
|
-
/* @__PURE__ */
|
|
776
|
+
/* @__PURE__ */ jsx9(
|
|
671
777
|
Modal,
|
|
672
778
|
{
|
|
673
779
|
open,
|
|
674
780
|
onOpenChange: setOpen,
|
|
675
781
|
title: searchLabel,
|
|
676
|
-
description: "\uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC9C0\uBC88\uC73C\uB85C \uAC80\uC0C9\uD560 \uC218 \uC788\uC5B4\uC694.",
|
|
782
|
+
description: m.addressSearchDescription ?? "\uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC9C0\uBC88\uC73C\uB85C \uAC80\uC0C9\uD560 \uC218 \uC788\uC5B4\uC694.",
|
|
677
783
|
onCloseAutoFocus: (event) => {
|
|
678
784
|
if (selectedRef.current) {
|
|
679
785
|
event.preventDefault();
|
|
680
786
|
detailRef.current?.focus();
|
|
681
787
|
}
|
|
682
788
|
},
|
|
683
|
-
children: /* @__PURE__ */
|
|
789
|
+
children: /* @__PURE__ */ jsx9(
|
|
790
|
+
SearchArea,
|
|
791
|
+
{
|
|
792
|
+
provider,
|
|
793
|
+
onSelect: handleSelect,
|
|
794
|
+
loadErrorText,
|
|
795
|
+
loadingText: m.addressLoading ?? "\uC8FC\uC18C \uAC80\uC0C9\uC744 \uBD88\uB7EC\uC624\uB294 \uC911"
|
|
796
|
+
}
|
|
797
|
+
)
|
|
684
798
|
}
|
|
685
799
|
)
|
|
686
800
|
] });
|
|
@@ -713,15 +827,15 @@ var input2 = "_1y7mzsn6";
|
|
|
713
827
|
var root4 = /* @__PURE__ */ _7a4685({ defaultClassName: "_1y7mzsn0", variantClassNames: { size: { sm: "_1y7mzsn1", md: "_1y7mzsn2" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
714
828
|
|
|
715
829
|
// src/components/Checkbox/Checkbox.tsx
|
|
716
|
-
import { jsx as
|
|
717
|
-
var Checkbox = /* @__PURE__ */ forwardRef8(function Checkbox2({ label: label6, size, indeterminate = false, invalid, disabled, className, ...rest }, ref) {
|
|
830
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
831
|
+
var Checkbox = /* @__PURE__ */ forwardRef8(function Checkbox2({ label: label6, size, indeterminate = false, invalid, disabled, onChange, onCheckedChange, className, ...rest }, ref) {
|
|
718
832
|
const innerRef = useRef3(null);
|
|
719
833
|
useEffect2(() => {
|
|
720
834
|
if (innerRef.current) innerRef.current.indeterminate = indeterminate;
|
|
721
835
|
}, [indeterminate]);
|
|
722
836
|
return /* @__PURE__ */ jsxs8("label", { className: cx(root4({ size }), className), "data-disabled": disabled || void 0, children: [
|
|
723
837
|
/* @__PURE__ */ jsxs8("span", { className: control({ size }), children: [
|
|
724
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ jsx10(
|
|
725
839
|
"input",
|
|
726
840
|
{
|
|
727
841
|
ref: mergeRefs(innerRef, ref),
|
|
@@ -729,10 +843,14 @@ var Checkbox = /* @__PURE__ */ forwardRef8(function Checkbox2({ label: label6, s
|
|
|
729
843
|
className: input2,
|
|
730
844
|
disabled,
|
|
731
845
|
"aria-invalid": invalid || void 0,
|
|
846
|
+
onChange: (event) => {
|
|
847
|
+
onChange?.(event);
|
|
848
|
+
onCheckedChange?.(event.target.checked);
|
|
849
|
+
},
|
|
732
850
|
...rest
|
|
733
851
|
}
|
|
734
852
|
),
|
|
735
|
-
/* @__PURE__ */
|
|
853
|
+
/* @__PURE__ */ jsx10("svg", { className: checkIcon, viewBox: "0 0 20 20", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx10(
|
|
736
854
|
"path",
|
|
737
855
|
{
|
|
738
856
|
d: "M5 10.5l3.2 3L15 7",
|
|
@@ -742,7 +860,7 @@ var Checkbox = /* @__PURE__ */ forwardRef8(function Checkbox2({ label: label6, s
|
|
|
742
860
|
strokeLinejoin: "round"
|
|
743
861
|
}
|
|
744
862
|
) }),
|
|
745
|
-
/* @__PURE__ */
|
|
863
|
+
/* @__PURE__ */ jsx10("svg", { className: indeterminateIcon, viewBox: "0 0 20 20", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx10("path", { d: "M6 10h8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
|
|
746
864
|
] }),
|
|
747
865
|
label6
|
|
748
866
|
] });
|
|
@@ -762,7 +880,7 @@ var tag = "j3uxdc7";
|
|
|
762
880
|
var toggle = "j3uxdc8";
|
|
763
881
|
|
|
764
882
|
// src/components/AgreementGroup/AgreementGroup.tsx
|
|
765
|
-
import { jsx as
|
|
883
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
766
884
|
function hasAllRequiredAgreements(items2, value4) {
|
|
767
885
|
return items2.every((item7) => !item7.required || value4.includes(item7.value));
|
|
768
886
|
}
|
|
@@ -774,17 +892,23 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
|
|
|
774
892
|
defaultValue,
|
|
775
893
|
onValueChange,
|
|
776
894
|
label: label6,
|
|
777
|
-
allLabel
|
|
895
|
+
allLabel: allLabelProp,
|
|
778
896
|
helperText: helperText3,
|
|
779
897
|
error,
|
|
780
898
|
disabled,
|
|
781
|
-
requiredText
|
|
782
|
-
optionalText
|
|
783
|
-
showText
|
|
784
|
-
hideText
|
|
899
|
+
requiredText: requiredTextProp,
|
|
900
|
+
optionalText: optionalTextProp,
|
|
901
|
+
showText: showTextProp,
|
|
902
|
+
hideText: hideTextProp,
|
|
785
903
|
name,
|
|
786
904
|
className
|
|
787
905
|
} = props;
|
|
906
|
+
const m = useMessages();
|
|
907
|
+
const allLabel = allLabelProp ?? m.agreeAll ?? "\uC804\uCCB4 \uB3D9\uC758";
|
|
908
|
+
const requiredText = requiredTextProp ?? m.required ?? "\uD544\uC218";
|
|
909
|
+
const optionalText = optionalTextProp ?? m.optional ?? "\uC120\uD0DD";
|
|
910
|
+
const showText = showTextProp ?? m.show ?? "\uBCF4\uAE30";
|
|
911
|
+
const hideText = hideTextProp ?? m.hide ?? "\uC811\uAE30";
|
|
788
912
|
const baseId = useId3();
|
|
789
913
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
790
914
|
const isControlled = "value" in props;
|
|
@@ -808,9 +932,9 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
|
|
|
808
932
|
"aria-describedby": helperId,
|
|
809
933
|
"data-invalid": error || void 0,
|
|
810
934
|
children: [
|
|
811
|
-
label6 && /* @__PURE__ */
|
|
935
|
+
label6 && /* @__PURE__ */ jsx11("legend", { className: legend2, children: label6 }),
|
|
812
936
|
/* @__PURE__ */ jsxs9("div", { className: box, children: [
|
|
813
|
-
/* @__PURE__ */
|
|
937
|
+
/* @__PURE__ */ jsx11("div", { className: all, children: /* @__PURE__ */ jsx11(
|
|
814
938
|
Checkbox,
|
|
815
939
|
{
|
|
816
940
|
label: allLabel,
|
|
@@ -819,14 +943,14 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
|
|
|
819
943
|
onChange: (event) => update(event.target.checked ? allValues : [])
|
|
820
944
|
}
|
|
821
945
|
) }),
|
|
822
|
-
/* @__PURE__ */
|
|
946
|
+
/* @__PURE__ */ jsx11("ul", { className: list, children: items2.map((item7) => {
|
|
823
947
|
const labelId = `${baseId}-${item7.value}-label`;
|
|
824
948
|
const toggleTextId = `${baseId}-${item7.value}-toggle`;
|
|
825
949
|
const contentId = `${baseId}-${item7.value}-content`;
|
|
826
950
|
const isOpen = expanded.includes(item7.value);
|
|
827
951
|
return /* @__PURE__ */ jsxs9("li", { className: item2, children: [
|
|
828
952
|
/* @__PURE__ */ jsxs9("div", { className: row2, children: [
|
|
829
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ jsx11(
|
|
830
954
|
Checkbox,
|
|
831
955
|
{
|
|
832
956
|
size: "sm",
|
|
@@ -834,7 +958,7 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
|
|
|
834
958
|
invalid: error && item7.required && !agreed.includes(item7.value),
|
|
835
959
|
onChange: (event) => toggleItem(item7.value, event.target.checked),
|
|
836
960
|
label: /* @__PURE__ */ jsxs9("span", { id: labelId, children: [
|
|
837
|
-
/* @__PURE__ */
|
|
961
|
+
/* @__PURE__ */ jsx11("span", { className: tag, "data-required": item7.required || void 0, children: item7.required ? requiredText : optionalText }),
|
|
838
962
|
" ",
|
|
839
963
|
item7.label
|
|
840
964
|
] })
|
|
@@ -850,20 +974,20 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
|
|
|
850
974
|
"aria-labelledby": `${labelId} ${toggleTextId}`,
|
|
851
975
|
onClick: () => setExpanded((prev) => isOpen ? prev.filter((v) => v !== item7.value) : [...prev, item7.value]),
|
|
852
976
|
children: [
|
|
853
|
-
/* @__PURE__ */
|
|
854
|
-
/* @__PURE__ */
|
|
977
|
+
/* @__PURE__ */ jsx11("span", { id: toggleTextId, children: isOpen ? hideText : showText }),
|
|
978
|
+
/* @__PURE__ */ jsx11(ChevronDownIcon2, { size: 14, className: chevron2 })
|
|
855
979
|
]
|
|
856
980
|
}
|
|
857
981
|
)
|
|
858
982
|
] }),
|
|
859
983
|
item7.content && isOpen && // 내용이 길면 스크롤된다 — 키보드로도 스크롤할 수 있게 포커스를 받는 이름 있는 영역으로 둔다
|
|
860
984
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
861
|
-
/* @__PURE__ */
|
|
985
|
+
/* @__PURE__ */ jsx11("div", { id: contentId, role: "region", "aria-labelledby": labelId, tabIndex: 0, className: content3, children: item7.content })
|
|
862
986
|
] }, item7.value);
|
|
863
987
|
}) })
|
|
864
988
|
] }),
|
|
865
|
-
name && agreed.map((v) => /* @__PURE__ */
|
|
866
|
-
helperText3 && /* @__PURE__ */
|
|
989
|
+
name && agreed.map((v) => /* @__PURE__ */ jsx11("input", { type: "hidden", name, value: v }, v)),
|
|
990
|
+
helperText3 && /* @__PURE__ */ jsx11("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
867
991
|
]
|
|
868
992
|
}
|
|
869
993
|
);
|
|
@@ -885,7 +1009,7 @@ var icon2 = "bsmpc0f";
|
|
|
885
1009
|
var title2 = "bsmpc0h";
|
|
886
1010
|
|
|
887
1011
|
// src/components/Alert/Alert.tsx
|
|
888
|
-
import { jsx as
|
|
1012
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
889
1013
|
var defaultIcons = {
|
|
890
1014
|
primary: InfoIcon,
|
|
891
1015
|
neutral: InfoIcon,
|
|
@@ -893,17 +1017,30 @@ var defaultIcons = {
|
|
|
893
1017
|
warning: TriangleAlertIcon,
|
|
894
1018
|
danger: CircleAlertIcon
|
|
895
1019
|
};
|
|
896
|
-
var Alert = /* @__PURE__ */ forwardRef10(function Alert2({
|
|
1020
|
+
var Alert = /* @__PURE__ */ forwardRef10(function Alert2({
|
|
1021
|
+
variant,
|
|
1022
|
+
color = "primary",
|
|
1023
|
+
title: title6,
|
|
1024
|
+
icon: icon6,
|
|
1025
|
+
action: action3,
|
|
1026
|
+
onClose,
|
|
1027
|
+
closeLabel: closeLabelProp,
|
|
1028
|
+
className,
|
|
1029
|
+
children,
|
|
1030
|
+
...rest
|
|
1031
|
+
}, ref) {
|
|
1032
|
+
const m = useMessages();
|
|
1033
|
+
const closeLabel = closeLabelProp ?? m.close ?? "\uB2EB\uAE30";
|
|
897
1034
|
const DefaultIcon = defaultIcons[color];
|
|
898
|
-
const iconNode = icon6 === void 0 ? /* @__PURE__ */
|
|
1035
|
+
const iconNode = icon6 === void 0 ? /* @__PURE__ */ jsx12(DefaultIcon, { size: 18 }) : icon6;
|
|
899
1036
|
return /* @__PURE__ */ jsxs10("div", { ref, className: cx(alert({ variant, color }), className), ...rest, children: [
|
|
900
|
-
iconNode !== false && iconNode !== null && /* @__PURE__ */
|
|
1037
|
+
iconNode !== false && iconNode !== null && /* @__PURE__ */ jsx12("span", { className: icon2, "aria-hidden": true, children: iconNode }),
|
|
901
1038
|
/* @__PURE__ */ jsxs10("div", { className: content4, children: [
|
|
902
|
-
title6 && /* @__PURE__ */
|
|
903
|
-
children && /* @__PURE__ */
|
|
1039
|
+
title6 && /* @__PURE__ */ jsx12("div", { className: title2, children: title6 }),
|
|
1040
|
+
children && /* @__PURE__ */ jsx12("div", { className: description2, children })
|
|
904
1041
|
] }),
|
|
905
|
-
action3 && /* @__PURE__ */
|
|
906
|
-
onClose && /* @__PURE__ */
|
|
1042
|
+
action3 && /* @__PURE__ */ jsx12("div", { className: action, children: action3 }),
|
|
1043
|
+
onClose && /* @__PURE__ */ jsx12("button", { type: "button", className: closeButton2, "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx12(XIcon2, { size: 16 }) })
|
|
907
1044
|
] });
|
|
908
1045
|
});
|
|
909
1046
|
|
|
@@ -983,14 +1120,14 @@ function useFormattedInput({
|
|
|
983
1120
|
value: value4,
|
|
984
1121
|
defaultValue,
|
|
985
1122
|
onValueChange,
|
|
986
|
-
sanitize:
|
|
987
|
-
format,
|
|
1123
|
+
sanitize: sanitize4,
|
|
1124
|
+
format: format2,
|
|
988
1125
|
isMeaningful,
|
|
989
1126
|
inputRef
|
|
990
1127
|
}) {
|
|
991
|
-
const [innerValue, setInnerValue] = useState3(() =>
|
|
992
|
-
const raw = isControlled ?
|
|
993
|
-
const display =
|
|
1128
|
+
const [innerValue, setInnerValue] = useState3(() => sanitize4(defaultValue ?? ""));
|
|
1129
|
+
const raw = isControlled ? sanitize4(value4 ?? "") : innerValue;
|
|
1130
|
+
const display = format2(raw);
|
|
994
1131
|
const pendingCaret = useRef4(null);
|
|
995
1132
|
useLayoutEffect(() => {
|
|
996
1133
|
const input5 = inputRef.current;
|
|
@@ -1006,8 +1143,8 @@ function useFormattedInput({
|
|
|
1006
1143
|
};
|
|
1007
1144
|
const onChange = (event) => {
|
|
1008
1145
|
const { value: typed, selectionStart } = event.target;
|
|
1009
|
-
const next =
|
|
1010
|
-
const before =
|
|
1146
|
+
const next = sanitize4(typed);
|
|
1147
|
+
const before = sanitize4(typed.slice(0, selectionStart ?? typed.length));
|
|
1011
1148
|
commit(next, Math.min(before.length, next.length));
|
|
1012
1149
|
};
|
|
1013
1150
|
const onKeyDown = (event) => {
|
|
@@ -1027,14 +1164,15 @@ function useFormattedInput({
|
|
|
1027
1164
|
commit(raw.slice(0, index) + raw.slice(index + 1), index);
|
|
1028
1165
|
}
|
|
1029
1166
|
};
|
|
1030
|
-
|
|
1167
|
+
const setRaw = (next) => setInnerValue(sanitize4(next));
|
|
1168
|
+
return { raw, display, onChange, onKeyDown, setRaw };
|
|
1031
1169
|
}
|
|
1032
1170
|
|
|
1033
1171
|
// src/components/AmountInput/AmountInput.css.ts
|
|
1034
1172
|
var input3 = "_70qkav0";
|
|
1035
1173
|
|
|
1036
1174
|
// src/components/AmountInput/AmountInput.tsx
|
|
1037
|
-
import { Fragment as Fragment2, jsx as
|
|
1175
|
+
import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1038
1176
|
var MAX_DIGITS = 15;
|
|
1039
1177
|
var isDigit = (char) => /\d/.test(char);
|
|
1040
1178
|
var AmountInput = /* @__PURE__ */ forwardRef11(
|
|
@@ -1044,9 +1182,9 @@ var AmountInput = /* @__PURE__ */ forwardRef11(
|
|
|
1044
1182
|
defaultValue,
|
|
1045
1183
|
onValueChange,
|
|
1046
1184
|
max,
|
|
1047
|
-
unit
|
|
1185
|
+
unit: unitProp,
|
|
1048
1186
|
showKoreanAmount = true,
|
|
1049
|
-
label:
|
|
1187
|
+
label: labelProp,
|
|
1050
1188
|
placeholder = "0",
|
|
1051
1189
|
helperText: helperText3,
|
|
1052
1190
|
onKeyDown,
|
|
@@ -1054,7 +1192,10 @@ var AmountInput = /* @__PURE__ */ forwardRef11(
|
|
|
1054
1192
|
...rest
|
|
1055
1193
|
} = props;
|
|
1056
1194
|
const inputRef = useRef5(null);
|
|
1057
|
-
const
|
|
1195
|
+
const m = useMessages();
|
|
1196
|
+
const unit = unitProp ?? m.currencyUnit ?? "\uC6D0";
|
|
1197
|
+
const label6 = labelProp ?? m.amount ?? "\uAE08\uC561";
|
|
1198
|
+
const sanitize4 = (input5) => {
|
|
1058
1199
|
let digits = input5.replace(/\D/g, "").replace(/^0+(?=\d)/, "").slice(0, MAX_DIGITS);
|
|
1059
1200
|
if (max !== void 0 && digits && Number(digits) > max) digits = String(Math.floor(max));
|
|
1060
1201
|
return digits;
|
|
@@ -1065,13 +1206,13 @@ var AmountInput = /* @__PURE__ */ forwardRef11(
|
|
|
1065
1206
|
value: toRaw(value4),
|
|
1066
1207
|
defaultValue: toRaw(defaultValue),
|
|
1067
1208
|
onValueChange: (digits) => onValueChange?.(digits === "" ? null : Number(digits)),
|
|
1068
|
-
sanitize:
|
|
1209
|
+
sanitize: sanitize4,
|
|
1069
1210
|
format: (digits) => digits === "" ? "" : Number(digits).toLocaleString("ko-KR"),
|
|
1070
1211
|
isMeaningful: isDigit,
|
|
1071
1212
|
inputRef
|
|
1072
1213
|
});
|
|
1073
1214
|
const reading = showKoreanAmount && field3.raw !== "" ? formatKoreanAmount(Number(field3.raw), unit) : null;
|
|
1074
|
-
return /* @__PURE__ */
|
|
1215
|
+
return /* @__PURE__ */ jsx13(
|
|
1075
1216
|
TextField,
|
|
1076
1217
|
{
|
|
1077
1218
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -1087,7 +1228,7 @@ var AmountInput = /* @__PURE__ */ forwardRef11(
|
|
|
1087
1228
|
endAdornment: unit,
|
|
1088
1229
|
helperText: reading && helperText3 ? /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
1089
1230
|
reading,
|
|
1090
|
-
/* @__PURE__ */
|
|
1231
|
+
/* @__PURE__ */ jsx13("br", {}),
|
|
1091
1232
|
helperText3
|
|
1092
1233
|
] }) : reading ?? helperText3,
|
|
1093
1234
|
className: cx(input3, className),
|
|
@@ -1109,7 +1250,7 @@ var image = "_1fd2kp26";
|
|
|
1109
1250
|
var root5 = /* @__PURE__ */ _7a4687({ defaultClassName: "_1fd2kp20", variantClassNames: { size: { sm: "_1fd2kp21", md: "_1fd2kp22", lg: "_1fd2kp23" }, shape: { circle: "_1fd2kp24", square: "_1fd2kp25" } }, defaultVariants: { size: "md", shape: "circle" }, compoundVariants: [] });
|
|
1110
1251
|
|
|
1111
1252
|
// src/components/Avatar/Avatar.tsx
|
|
1112
|
-
import { jsx as
|
|
1253
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1113
1254
|
function getInitials(name) {
|
|
1114
1255
|
const [a = "", b = ""] = name.trim().split(/\s+/);
|
|
1115
1256
|
const first = (word) => Array.from(word)[0] ?? "";
|
|
@@ -1120,8 +1261,8 @@ var Avatar = /* @__PURE__ */ forwardRef12(function Avatar2({ src, alt, name, fal
|
|
|
1120
1261
|
const a11y = label6 ? { role: "img", "aria-label": label6 } : { "aria-hidden": true };
|
|
1121
1262
|
const initials = name ? getInitials(name) : "";
|
|
1122
1263
|
return /* @__PURE__ */ jsxs12(RadixAvatar.Root, { ref, className: cx(root5({ size, shape }), className), ...a11y, ...rest, children: [
|
|
1123
|
-
src && /* @__PURE__ */
|
|
1124
|
-
/* @__PURE__ */
|
|
1264
|
+
src && /* @__PURE__ */ jsx14(RadixAvatar.Image, { src, alt: "", className: image }),
|
|
1265
|
+
/* @__PURE__ */ jsx14(RadixAvatar.Fallback, { className: fallback, children: fallback2 ?? (initials || /* @__PURE__ */ jsx14(UserIcon, { size: "60%" })) })
|
|
1125
1266
|
] });
|
|
1126
1267
|
});
|
|
1127
1268
|
|
|
@@ -1134,10 +1275,10 @@ var badge = /* @__PURE__ */ _7a4688({ defaultClassName: "_1295cfn4", variantClas
|
|
|
1134
1275
|
var icon3 = "_1295cfng";
|
|
1135
1276
|
|
|
1136
1277
|
// src/components/Badge/Badge.tsx
|
|
1137
|
-
import { jsx as
|
|
1278
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1138
1279
|
var Badge = /* @__PURE__ */ forwardRef13(function Badge2({ variant, color, size, startIcon, className, children, ...rest }, ref) {
|
|
1139
1280
|
return /* @__PURE__ */ jsxs13("span", { ref, className: cx(badge({ variant, color, size }), className), ...rest, children: [
|
|
1140
|
-
startIcon && /* @__PURE__ */
|
|
1281
|
+
startIcon && /* @__PURE__ */ jsx15("span", { className: icon3, children: startIcon }),
|
|
1141
1282
|
children
|
|
1142
1283
|
] });
|
|
1143
1284
|
});
|
|
@@ -1157,25 +1298,27 @@ var externalIcon = "_1t4hlp6";
|
|
|
1157
1298
|
var link = /* @__PURE__ */ _7a4689({ defaultClassName: "_1t4hlp0", variantClassNames: { color: { primary: "_1t4hlp1", neutral: "_1t4hlp2", inherit: "_1t4hlp3" }, underline: { always: "_1t4hlp4", hover: "_1t4hlp5" } }, defaultVariants: { color: "primary", underline: "always" }, compoundVariants: [] });
|
|
1158
1299
|
|
|
1159
1300
|
// src/components/Link/Link.tsx
|
|
1160
|
-
import { Fragment as Fragment3, jsx as
|
|
1301
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1161
1302
|
var Link = /* @__PURE__ */ forwardRef14(function Link2({
|
|
1162
1303
|
as: Component = "a",
|
|
1163
1304
|
asChild,
|
|
1164
1305
|
color,
|
|
1165
1306
|
underline,
|
|
1166
1307
|
external,
|
|
1167
|
-
externalLabel
|
|
1308
|
+
externalLabel: externalLabelProp,
|
|
1168
1309
|
target,
|
|
1169
1310
|
rel,
|
|
1170
1311
|
className,
|
|
1171
1312
|
children,
|
|
1172
1313
|
...rest
|
|
1173
1314
|
}, ref) {
|
|
1315
|
+
const m = useMessages();
|
|
1316
|
+
const externalLabel = externalLabelProp ?? m.newWindow ?? "(\uC0C8 \uCC3D)";
|
|
1174
1317
|
const linkClassName = cx(link({ color, underline }), className);
|
|
1175
1318
|
if (asChild) {
|
|
1176
1319
|
return (
|
|
1177
1320
|
// Slot 의 props 타입은 HTMLElement 기준이라 <a> 전용 속성(target·rel 등)은 그대로 넘기도록 단언한다
|
|
1178
|
-
/* @__PURE__ */
|
|
1321
|
+
/* @__PURE__ */ jsx16(Slot, { ref, className: linkClassName, ...{ target, rel, ...rest }, children })
|
|
1179
1322
|
);
|
|
1180
1323
|
}
|
|
1181
1324
|
return /* @__PURE__ */ jsxs14(
|
|
@@ -1190,8 +1333,8 @@ var Link = /* @__PURE__ */ forwardRef14(function Link2({
|
|
|
1190
1333
|
children,
|
|
1191
1334
|
external && /* @__PURE__ */ jsxs14(Fragment3, { children: [
|
|
1192
1335
|
" ",
|
|
1193
|
-
/* @__PURE__ */
|
|
1194
|
-
/* @__PURE__ */
|
|
1336
|
+
/* @__PURE__ */ jsx16(ExternalLinkIcon, { className: externalIcon }),
|
|
1337
|
+
/* @__PURE__ */ jsx16("span", { className: visuallyHidden, children: externalLabel })
|
|
1195
1338
|
] })
|
|
1196
1339
|
]
|
|
1197
1340
|
}
|
|
@@ -1206,21 +1349,23 @@ var list2 = "_18t8ztt0";
|
|
|
1206
1349
|
var separator = "_18t8ztt4";
|
|
1207
1350
|
|
|
1208
1351
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
1209
|
-
import { jsx as
|
|
1210
|
-
var Breadcrumb = /* @__PURE__ */ forwardRef15(function Breadcrumb2({ items: items2, linkAs, separator: separator3, "aria-label":
|
|
1211
|
-
const
|
|
1212
|
-
|
|
1352
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1353
|
+
var Breadcrumb = /* @__PURE__ */ forwardRef15(function Breadcrumb2({ items: items2, linkAs, separator: separator3, "aria-label": ariaLabelProp, className, ...rest }, ref) {
|
|
1354
|
+
const m = useMessages();
|
|
1355
|
+
const ariaLabel = ariaLabelProp ?? m.breadcrumb ?? "\uC774\uB3D9 \uACBD\uB85C";
|
|
1356
|
+
const sep = separator3 ?? /* @__PURE__ */ jsx17(ChevronRightIcon, { size: 14 });
|
|
1357
|
+
return /* @__PURE__ */ jsx17("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsx17("ol", { className: list2, children: items2.map((item7, index) => {
|
|
1213
1358
|
const isCurrent = index === items2.length - 1;
|
|
1214
1359
|
return /* @__PURE__ */ jsxs15("li", { className: item3, children: [
|
|
1215
|
-
index > 0 && /* @__PURE__ */
|
|
1216
|
-
isCurrent || item7.href === void 0 ? /* @__PURE__ */
|
|
1360
|
+
index > 0 && /* @__PURE__ */ jsx17("span", { className: separator, "aria-hidden": true, children: sep }),
|
|
1361
|
+
isCurrent || item7.href === void 0 ? /* @__PURE__ */ jsx17("span", { className: isCurrent ? current : void 0, "aria-current": isCurrent ? "page" : void 0, children: item7.label }) : /* @__PURE__ */ jsx17(Link, { as: linkAs, href: item7.href, color: "neutral", underline: "hover", className: link2, children: item7.label })
|
|
1217
1362
|
] }, index);
|
|
1218
1363
|
}) }) });
|
|
1219
1364
|
});
|
|
1220
1365
|
|
|
1221
1366
|
// src/components/BusinessNumberInput/BusinessNumberInput.tsx
|
|
1222
1367
|
import { forwardRef as forwardRef16, useRef as useRef6, useState as useState4 } from "react";
|
|
1223
|
-
import { jsx as
|
|
1368
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1224
1369
|
var sanitize = (input5) => input5.replace(/\D/g, "").slice(0, 10);
|
|
1225
1370
|
var isDigit2 = (char) => /\d/.test(char);
|
|
1226
1371
|
var BusinessNumberInput = /* @__PURE__ */ forwardRef16(
|
|
@@ -1230,8 +1375,8 @@ var BusinessNumberInput = /* @__PURE__ */ forwardRef16(
|
|
|
1230
1375
|
defaultValue,
|
|
1231
1376
|
onValueChange,
|
|
1232
1377
|
validate = true,
|
|
1233
|
-
invalidText
|
|
1234
|
-
label:
|
|
1378
|
+
invalidText: invalidTextProp,
|
|
1379
|
+
label: labelProp,
|
|
1235
1380
|
placeholder = "000-00-00000",
|
|
1236
1381
|
error,
|
|
1237
1382
|
helperText: helperText3,
|
|
@@ -1240,6 +1385,10 @@ var BusinessNumberInput = /* @__PURE__ */ forwardRef16(
|
|
|
1240
1385
|
...rest
|
|
1241
1386
|
} = props;
|
|
1242
1387
|
const inputRef = useRef6(null);
|
|
1388
|
+
const m = useMessages();
|
|
1389
|
+
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.";
|
|
1390
|
+
const label6 = labelProp ?? m.businessNumber ?? "\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638";
|
|
1391
|
+
const incompleteText = m.businessNumberIncomplete ?? "10\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
|
|
1243
1392
|
const [touched, setTouched] = useState4(false);
|
|
1244
1393
|
const field3 = useFormattedInput({
|
|
1245
1394
|
isControlled: "value" in props,
|
|
@@ -1254,7 +1403,7 @@ var BusinessNumberInput = /* @__PURE__ */ forwardRef16(
|
|
|
1254
1403
|
const complete = field3.raw.length === 10;
|
|
1255
1404
|
const autoInvalid = validate && field3.raw.length > 0 && (complete ? !isValidBusinessNumber(field3.raw) : touched);
|
|
1256
1405
|
const showAuto = autoInvalid && error === void 0;
|
|
1257
|
-
return /* @__PURE__ */
|
|
1406
|
+
return /* @__PURE__ */ jsx18(
|
|
1258
1407
|
TextField,
|
|
1259
1408
|
{
|
|
1260
1409
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -1272,47 +1421,272 @@ var BusinessNumberInput = /* @__PURE__ */ forwardRef16(
|
|
|
1272
1421
|
onBlur?.(event);
|
|
1273
1422
|
},
|
|
1274
1423
|
error: error ?? autoInvalid,
|
|
1275
|
-
helperText: showAuto ? complete ? invalidText :
|
|
1424
|
+
helperText: showAuto ? complete ? invalidText : incompleteText : helperText3,
|
|
1276
1425
|
...rest
|
|
1277
1426
|
}
|
|
1278
1427
|
);
|
|
1279
1428
|
}
|
|
1280
1429
|
);
|
|
1281
1430
|
|
|
1282
|
-
// src/components/
|
|
1431
|
+
// src/components/Calendar/Calendar.tsx
|
|
1432
|
+
import { forwardRef as forwardRef18, useEffect as useEffect3, useId as useId4, useRef as useRef7, useState as useState5 } from "react";
|
|
1433
|
+
import { ChevronLeftIcon, ChevronRightIcon as ChevronRightIcon2 } from "@bestow-ui/icons";
|
|
1434
|
+
|
|
1435
|
+
// src/utils/date.ts
|
|
1436
|
+
var pad = (n) => String(n).padStart(2, "0");
|
|
1437
|
+
function toISODate(date) {
|
|
1438
|
+
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
|
|
1439
|
+
}
|
|
1440
|
+
function parseISODate(value4) {
|
|
1441
|
+
const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value4 ?? "");
|
|
1442
|
+
if (!m) return null;
|
|
1443
|
+
const [y, mo, d] = [Number(m[1]), Number(m[2]), Number(m[3])];
|
|
1444
|
+
const date = new Date(y, mo - 1, d);
|
|
1445
|
+
return date.getFullYear() === y && date.getMonth() === mo - 1 && date.getDate() === d ? date : null;
|
|
1446
|
+
}
|
|
1447
|
+
function addDays(date, days) {
|
|
1448
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + days);
|
|
1449
|
+
}
|
|
1450
|
+
function addMonths(date, months) {
|
|
1451
|
+
const target = new Date(date.getFullYear(), date.getMonth() + months, 1);
|
|
1452
|
+
const lastDay = new Date(target.getFullYear(), target.getMonth() + 1, 0).getDate();
|
|
1453
|
+
return new Date(target.getFullYear(), target.getMonth(), Math.min(date.getDate(), lastDay));
|
|
1454
|
+
}
|
|
1455
|
+
function isSameDay(a, b) {
|
|
1456
|
+
return !!a && !!b && toISODate(a) === toISODate(b);
|
|
1457
|
+
}
|
|
1458
|
+
function isSameMonth(a, b) {
|
|
1459
|
+
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth();
|
|
1460
|
+
}
|
|
1461
|
+
function compareDays(a, b) {
|
|
1462
|
+
const x = toISODate(a);
|
|
1463
|
+
const y = toISODate(b);
|
|
1464
|
+
return x < y ? -1 : x > y ? 1 : 0;
|
|
1465
|
+
}
|
|
1466
|
+
function getCalendarWeeks(year, month) {
|
|
1467
|
+
const first = new Date(year, month, 1);
|
|
1468
|
+
const start = addDays(first, -first.getDay());
|
|
1469
|
+
return Array.from({ length: 6 }, (_, week) => Array.from({ length: 7 }, (_2, day2) => addDays(start, week * 7 + day2)));
|
|
1470
|
+
}
|
|
1471
|
+
var KOREAN_WEEKDAYS = ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"];
|
|
1472
|
+
function formatKoreanDate(date, withWeekday = true) {
|
|
1473
|
+
const base = `${date.getFullYear()}\uB144 ${date.getMonth() + 1}\uC6D4 ${date.getDate()}\uC77C`;
|
|
1474
|
+
return withWeekday ? `${base} ${KOREAN_WEEKDAYS[date.getDay()]}\uC694\uC77C` : base;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
// src/components/IconButton/IconButton.tsx
|
|
1283
1478
|
import { forwardRef as forwardRef17 } from "react";
|
|
1284
1479
|
|
|
1285
|
-
// src/components/
|
|
1480
|
+
// src/components/IconButton/IconButton.css.ts
|
|
1286
1481
|
import { createRuntimeFn as _7a46810 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1482
|
+
var iconButton = /* @__PURE__ */ _7a46810({ defaultClassName: "ip9et20", variantClassNames: { size: { sm: "ip9et21", md: "ip9et22", lg: "ip9et23" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
1483
|
+
|
|
1484
|
+
// src/components/IconButton/IconButton.tsx
|
|
1485
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1486
|
+
var IconButton = /* @__PURE__ */ forwardRef17(function IconButton2({ variant = "ghost", color = "neutral", size, loading: loading2, className, children, ...rest }, ref) {
|
|
1487
|
+
return /* @__PURE__ */ jsx19(
|
|
1488
|
+
Button,
|
|
1489
|
+
{
|
|
1490
|
+
ref,
|
|
1491
|
+
variant,
|
|
1492
|
+
color,
|
|
1493
|
+
size,
|
|
1494
|
+
loading: loading2,
|
|
1495
|
+
className: cx(iconButton({ size }), className),
|
|
1496
|
+
...rest,
|
|
1497
|
+
children: !loading2 && children
|
|
1498
|
+
}
|
|
1499
|
+
);
|
|
1500
|
+
});
|
|
1501
|
+
|
|
1502
|
+
// src/components/Calendar/Calendar.css.ts
|
|
1503
|
+
var cell = "_1qyq67b5";
|
|
1504
|
+
var day = "_1qyq67b6";
|
|
1505
|
+
var grid = "_1qyq67b3";
|
|
1506
|
+
var header3 = "_1qyq67b1";
|
|
1507
|
+
var heading = "_1qyq67b2";
|
|
1508
|
+
var root6 = "_1qyq67b0";
|
|
1509
|
+
var weekday = "_1qyq67b4";
|
|
1510
|
+
|
|
1511
|
+
// src/components/Calendar/Calendar.tsx
|
|
1512
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1513
|
+
var Calendar = /* @__PURE__ */ forwardRef18(function Calendar2(props, ref) {
|
|
1514
|
+
const {
|
|
1515
|
+
value: value4,
|
|
1516
|
+
defaultValue,
|
|
1517
|
+
onValueChange,
|
|
1518
|
+
min,
|
|
1519
|
+
max,
|
|
1520
|
+
isDateDisabled,
|
|
1521
|
+
isHoliday,
|
|
1522
|
+
today: todayProp,
|
|
1523
|
+
initialFocus,
|
|
1524
|
+
prevMonthLabel: prevMonthLabelProp,
|
|
1525
|
+
nextMonthLabel: nextMonthLabelProp,
|
|
1526
|
+
className
|
|
1527
|
+
} = props;
|
|
1528
|
+
const m = useMessages();
|
|
1529
|
+
const prevMonthLabel = prevMonthLabelProp ?? m.previousMonth ?? "\uC774\uC804 \uB2EC";
|
|
1530
|
+
const nextMonthLabel = nextMonthLabelProp ?? m.nextMonth ?? "\uB2E4\uC74C \uB2EC";
|
|
1531
|
+
const weekdaysShort = m.weekdaysShort ?? KOREAN_WEEKDAYS;
|
|
1532
|
+
const weekdaysLong = m.weekdaysLong ?? KOREAN_WEEKDAYS.map((name) => `${name}\uC694\uC77C`);
|
|
1533
|
+
const headingId = useId4();
|
|
1534
|
+
const gridRef = useRef7(null);
|
|
1535
|
+
const isControlled = "value" in props;
|
|
1536
|
+
const [innerValue, setInnerValue] = useState5(defaultValue ?? "");
|
|
1537
|
+
const selected = parseISODate(isControlled ? value4 : innerValue);
|
|
1538
|
+
const today = parseISODate(todayProp) ?? /* @__PURE__ */ new Date();
|
|
1539
|
+
const minDate = parseISODate(min);
|
|
1540
|
+
const maxDate = parseISODate(max);
|
|
1541
|
+
const clamp = (date) => {
|
|
1542
|
+
if (minDate && compareDays(date, minDate) < 0) return minDate;
|
|
1543
|
+
if (maxDate && compareDays(date, maxDate) > 0) return maxDate;
|
|
1544
|
+
return date;
|
|
1545
|
+
};
|
|
1546
|
+
const isDisabled = (date) => minDate !== null && compareDays(date, minDate) < 0 || maxDate !== null && compareDays(date, maxDate) > 0 || !!isDateDisabled?.(date);
|
|
1547
|
+
const [focused, setFocused] = useState5(() => clamp(selected ?? today));
|
|
1548
|
+
const moveFocus = useRef7(initialFocus ?? false);
|
|
1549
|
+
const selectedIso = selected ? toISODate(selected) : "";
|
|
1550
|
+
useEffect3(() => {
|
|
1551
|
+
const date = parseISODate(selectedIso);
|
|
1552
|
+
if (date) setFocused((prev) => isSameDay(prev, date) ? prev : date);
|
|
1553
|
+
}, [selectedIso]);
|
|
1554
|
+
useEffect3(() => {
|
|
1555
|
+
if (!moveFocus.current) return;
|
|
1556
|
+
moveFocus.current = false;
|
|
1557
|
+
gridRef.current?.querySelector(`[data-date="${toISODate(focused)}"]`)?.focus();
|
|
1558
|
+
}, [focused]);
|
|
1559
|
+
const focusDate = (date) => {
|
|
1560
|
+
moveFocus.current = true;
|
|
1561
|
+
setFocused(clamp(date));
|
|
1562
|
+
};
|
|
1563
|
+
const select = (date) => {
|
|
1564
|
+
if (isDisabled(date)) return;
|
|
1565
|
+
const iso = toISODate(date);
|
|
1566
|
+
if (!isControlled) setInnerValue(iso);
|
|
1567
|
+
onValueChange?.(iso);
|
|
1568
|
+
setFocused(date);
|
|
1569
|
+
};
|
|
1570
|
+
const handleKeyDown = (event) => {
|
|
1571
|
+
const moves = {
|
|
1572
|
+
ArrowLeft: () => addDays(focused, -1),
|
|
1573
|
+
ArrowRight: () => addDays(focused, 1),
|
|
1574
|
+
ArrowUp: () => addDays(focused, -7),
|
|
1575
|
+
ArrowDown: () => addDays(focused, 7),
|
|
1576
|
+
Home: () => addDays(focused, -focused.getDay()),
|
|
1577
|
+
End: () => addDays(focused, 6 - focused.getDay()),
|
|
1578
|
+
PageUp: () => addMonths(focused, event.shiftKey ? -12 : -1),
|
|
1579
|
+
PageDown: () => addMonths(focused, event.shiftKey ? 12 : 1)
|
|
1580
|
+
};
|
|
1581
|
+
const move = moves[event.key];
|
|
1582
|
+
if (move) {
|
|
1583
|
+
event.preventDefault();
|
|
1584
|
+
focusDate(move());
|
|
1585
|
+
}
|
|
1586
|
+
};
|
|
1587
|
+
const visible = focused;
|
|
1588
|
+
const weeks = getCalendarWeeks(visible.getFullYear(), visible.getMonth()).filter(
|
|
1589
|
+
(week) => week.some((date) => isSameMonth(date, visible))
|
|
1590
|
+
);
|
|
1591
|
+
const prevMonth = addMonths(visible, -1);
|
|
1592
|
+
const nextMonth = addMonths(visible, 1);
|
|
1593
|
+
const canPrev = !minDate || compareDays(new Date(visible.getFullYear(), visible.getMonth(), 0), minDate) >= 0;
|
|
1594
|
+
const canNext = !maxDate || compareDays(new Date(visible.getFullYear(), visible.getMonth() + 1, 1), maxDate) <= 0;
|
|
1595
|
+
return /* @__PURE__ */ jsxs16("div", { ref, className: cx(root6, className), children: [
|
|
1596
|
+
/* @__PURE__ */ jsxs16("div", { className: header3, children: [
|
|
1597
|
+
/* @__PURE__ */ jsx20(
|
|
1598
|
+
IconButton,
|
|
1599
|
+
{
|
|
1600
|
+
"aria-label": prevMonthLabel,
|
|
1601
|
+
size: "sm",
|
|
1602
|
+
disabled: !canPrev,
|
|
1603
|
+
onClick: () => setFocused(clamp(prevMonth)),
|
|
1604
|
+
children: /* @__PURE__ */ jsx20(ChevronLeftIcon, {})
|
|
1605
|
+
}
|
|
1606
|
+
),
|
|
1607
|
+
/* @__PURE__ */ jsx20("div", { id: headingId, className: heading, "aria-live": "polite", children: m.monthTitle?.(visible.getFullYear(), visible.getMonth() + 1) ?? `${visible.getFullYear()}\uB144 ${visible.getMonth() + 1}\uC6D4` }),
|
|
1608
|
+
/* @__PURE__ */ jsx20(
|
|
1609
|
+
IconButton,
|
|
1610
|
+
{
|
|
1611
|
+
"aria-label": nextMonthLabel,
|
|
1612
|
+
size: "sm",
|
|
1613
|
+
disabled: !canNext,
|
|
1614
|
+
onClick: () => setFocused(clamp(nextMonth)),
|
|
1615
|
+
children: /* @__PURE__ */ jsx20(ChevronRightIcon2, {})
|
|
1616
|
+
}
|
|
1617
|
+
)
|
|
1618
|
+
] }),
|
|
1619
|
+
/* @__PURE__ */ jsxs16("table", { ref: gridRef, role: "grid", "aria-labelledby": headingId, className: grid, onKeyDown: handleKeyDown, children: [
|
|
1620
|
+
/* @__PURE__ */ jsx20("thead", { children: /* @__PURE__ */ jsx20("tr", { children: weekdaysShort.map((name, index) => /* @__PURE__ */ jsx20("th", { scope: "col", abbr: weekdaysLong[index], className: weekday, "data-weekday": index, children: name }, index)) }) }),
|
|
1621
|
+
/* @__PURE__ */ jsx20("tbody", { children: weeks.map((week) => /* @__PURE__ */ jsx20("tr", { children: week.map((date) => {
|
|
1622
|
+
const iso = toISODate(date);
|
|
1623
|
+
if (!isSameMonth(date, visible)) return /* @__PURE__ */ jsx20("td", { role: "gridcell", className: cell }, iso);
|
|
1624
|
+
const isSelected = isSameDay(date, selected);
|
|
1625
|
+
const isToday = isSameDay(date, today);
|
|
1626
|
+
const holiday = !!isHoliday?.(date);
|
|
1627
|
+
const disabled = isDisabled(date);
|
|
1628
|
+
const label6 = [
|
|
1629
|
+
m.dayLabel?.(date, weekdaysLong[date.getDay()]) ?? `${date.getDate()}, ${date.getFullYear()}\uB144 ${date.getMonth() + 1}\uC6D4 ${weekdaysLong[date.getDay()]}`,
|
|
1630
|
+
holiday && (m.holiday ?? "\uACF5\uD734\uC77C"),
|
|
1631
|
+
isToday && (m.today ?? "\uC624\uB298")
|
|
1632
|
+
].filter(Boolean).join(", ");
|
|
1633
|
+
return /* @__PURE__ */ jsx20("td", { role: "gridcell", "aria-selected": isSelected, className: cell, children: /* @__PURE__ */ jsx20(
|
|
1634
|
+
"button",
|
|
1635
|
+
{
|
|
1636
|
+
type: "button",
|
|
1637
|
+
className: day,
|
|
1638
|
+
"data-date": iso,
|
|
1639
|
+
"data-weekday": date.getDay(),
|
|
1640
|
+
"data-holiday": holiday || void 0,
|
|
1641
|
+
"data-selected": isSelected || void 0,
|
|
1642
|
+
tabIndex: isSameDay(date, focused) ? 0 : -1,
|
|
1643
|
+
"aria-label": label6,
|
|
1644
|
+
"aria-current": isToday ? "date" : void 0,
|
|
1645
|
+
"aria-disabled": disabled || void 0,
|
|
1646
|
+
onClick: () => select(date),
|
|
1647
|
+
onFocus: () => !isSameDay(date, focused) && setFocused(date),
|
|
1648
|
+
children: date.getDate()
|
|
1649
|
+
}
|
|
1650
|
+
) }, iso);
|
|
1651
|
+
}) }, toISODate(week[0]))) })
|
|
1652
|
+
] })
|
|
1653
|
+
] });
|
|
1654
|
+
});
|
|
1655
|
+
|
|
1656
|
+
// src/components/Card/Card.tsx
|
|
1657
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
1658
|
+
|
|
1659
|
+
// src/components/Card/Card.css.ts
|
|
1660
|
+
import { createRuntimeFn as _7a46811 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1287
1661
|
var body2 = "dnuf1u9";
|
|
1288
|
-
var card = /* @__PURE__ */
|
|
1662
|
+
var card = /* @__PURE__ */ _7a46811({ 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: [] });
|
|
1289
1663
|
var footer2 = "dnuf1ua";
|
|
1290
|
-
var
|
|
1664
|
+
var header4 = "dnuf1u8";
|
|
1291
1665
|
|
|
1292
1666
|
// src/components/Card/Card.tsx
|
|
1293
|
-
import { jsx as
|
|
1294
|
-
var Card = /* @__PURE__ */
|
|
1295
|
-
return /* @__PURE__ */
|
|
1667
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1668
|
+
var Card = /* @__PURE__ */ forwardRef19(function Card2({ variant, padding, as: Component = "div", className, ...rest }, ref) {
|
|
1669
|
+
return /* @__PURE__ */ jsx21(Component, { ref, className: cx(card({ variant, padding }), className), ...rest });
|
|
1296
1670
|
});
|
|
1297
|
-
var CardHeader = /* @__PURE__ */
|
|
1298
|
-
return /* @__PURE__ */
|
|
1671
|
+
var CardHeader = /* @__PURE__ */ forwardRef19(function CardHeader2({ className, ...rest }, ref) {
|
|
1672
|
+
return /* @__PURE__ */ jsx21("div", { ref, className: cx(header4, className), ...rest });
|
|
1299
1673
|
});
|
|
1300
|
-
var CardBody = /* @__PURE__ */
|
|
1301
|
-
return /* @__PURE__ */
|
|
1674
|
+
var CardBody = /* @__PURE__ */ forwardRef19(function CardBody2({ className, ...rest }, ref) {
|
|
1675
|
+
return /* @__PURE__ */ jsx21("div", { ref, className: cx(body2, className), ...rest });
|
|
1302
1676
|
});
|
|
1303
|
-
var CardFooter = /* @__PURE__ */
|
|
1304
|
-
return /* @__PURE__ */
|
|
1677
|
+
var CardFooter = /* @__PURE__ */ forwardRef19(function CardFooter2({ className, ...rest }, ref) {
|
|
1678
|
+
return /* @__PURE__ */ jsx21("div", { ref, className: cx(footer2, className), ...rest });
|
|
1305
1679
|
});
|
|
1306
1680
|
|
|
1307
1681
|
// src/components/Combobox/Combobox.tsx
|
|
1308
1682
|
import * as Popover from "@radix-ui/react-popover";
|
|
1309
1683
|
import {
|
|
1310
|
-
forwardRef as
|
|
1311
|
-
useEffect as
|
|
1312
|
-
useId as
|
|
1313
|
-
useMemo as
|
|
1314
|
-
useRef as
|
|
1315
|
-
useState as
|
|
1684
|
+
forwardRef as forwardRef20,
|
|
1685
|
+
useEffect as useEffect4,
|
|
1686
|
+
useId as useId5,
|
|
1687
|
+
useMemo as useMemo3,
|
|
1688
|
+
useRef as useRef8,
|
|
1689
|
+
useState as useState6
|
|
1316
1690
|
} from "react";
|
|
1317
1691
|
import { CheckIcon, ChevronDownIcon as ChevronDownIcon3 } from "@bestow-ui/icons";
|
|
1318
1692
|
|
|
@@ -1331,16 +1705,16 @@ var empty = "c2pbq72";
|
|
|
1331
1705
|
var toggle2 = "c2pbq70";
|
|
1332
1706
|
|
|
1333
1707
|
// src/components/Combobox/Combobox.tsx
|
|
1334
|
-
import { jsx as
|
|
1708
|
+
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1335
1709
|
var defaultFilter = (option2, query) => option2.label.toLowerCase().includes(query.trim().toLowerCase());
|
|
1336
|
-
var Combobox = /* @__PURE__ */
|
|
1710
|
+
var Combobox = /* @__PURE__ */ forwardRef20(function Combobox2(props, ref) {
|
|
1337
1711
|
const {
|
|
1338
1712
|
options,
|
|
1339
1713
|
value: value4,
|
|
1340
1714
|
defaultValue,
|
|
1341
1715
|
onValueChange,
|
|
1342
1716
|
filter = defaultFilter,
|
|
1343
|
-
emptyMessage
|
|
1717
|
+
emptyMessage: emptyMessageProp,
|
|
1344
1718
|
placeholder,
|
|
1345
1719
|
label: label6,
|
|
1346
1720
|
helperText: helperText3,
|
|
@@ -1352,26 +1726,29 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1352
1726
|
name,
|
|
1353
1727
|
id,
|
|
1354
1728
|
"aria-label": ariaLabel,
|
|
1355
|
-
toggleLabel
|
|
1729
|
+
toggleLabel: toggleLabelProp,
|
|
1356
1730
|
className
|
|
1357
1731
|
} = props;
|
|
1358
|
-
const
|
|
1732
|
+
const m = useMessages();
|
|
1733
|
+
const emptyMessage = emptyMessageProp ?? m.noResults ?? "\uACB0\uACFC\uAC00 \uC5C6\uC5B4\uC694";
|
|
1734
|
+
const toggleLabel = toggleLabelProp ?? m.openList ?? "\uBAA9\uB85D \uC5F4\uAE30";
|
|
1735
|
+
const generatedId = useId5();
|
|
1359
1736
|
const inputId = id ?? generatedId;
|
|
1360
1737
|
const labelId = `${inputId}-label`;
|
|
1361
1738
|
const listId = `${inputId}-listbox`;
|
|
1362
1739
|
const helperId = helperText3 ? `${inputId}-helper` : void 0;
|
|
1363
1740
|
const optionId = (index) => `${inputId}-option-${index}`;
|
|
1364
1741
|
const portal2 = usePortalProps();
|
|
1365
|
-
const inputRef =
|
|
1366
|
-
const anchorRef =
|
|
1742
|
+
const inputRef = useRef8(null);
|
|
1743
|
+
const anchorRef = useRef8(null);
|
|
1367
1744
|
const isControlled = "value" in props;
|
|
1368
|
-
const [innerValue, setInnerValue] =
|
|
1745
|
+
const [innerValue, setInnerValue] = useState6(defaultValue);
|
|
1369
1746
|
const selectedValue = isControlled ? value4 : innerValue;
|
|
1370
1747
|
const selectedOption = options.find((o) => o.value === selectedValue);
|
|
1371
|
-
const [open, setOpen] =
|
|
1372
|
-
const [query, setQuery] =
|
|
1373
|
-
const [activeIndex, setActiveIndex] =
|
|
1374
|
-
const filtered =
|
|
1748
|
+
const [open, setOpen] = useState6(false);
|
|
1749
|
+
const [query, setQuery] = useState6(null);
|
|
1750
|
+
const [activeIndex, setActiveIndex] = useState6(-1);
|
|
1751
|
+
const filtered = useMemo3(() => query ? options.filter((o) => filter(o, query)) : options, [options, filter, query]);
|
|
1375
1752
|
const inputText = query ?? selectedOption?.label ?? "";
|
|
1376
1753
|
const firstEnabled = (list5, from = 0, step = 1) => {
|
|
1377
1754
|
for (let i = from; i >= 0 && i < list5.length; i += step) if (!list5[i].disabled) return i;
|
|
@@ -1437,18 +1814,18 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1437
1814
|
break;
|
|
1438
1815
|
}
|
|
1439
1816
|
};
|
|
1440
|
-
|
|
1817
|
+
useEffect4(() => {
|
|
1441
1818
|
if (!open || activeIndex < 0) return;
|
|
1442
1819
|
document.getElementById(optionId(activeIndex))?.scrollIntoView?.({ block: "nearest" });
|
|
1443
1820
|
}, [open, activeIndex]);
|
|
1444
1821
|
const hasOptions = filtered.length > 0;
|
|
1445
|
-
return /* @__PURE__ */
|
|
1446
|
-
label6 && /* @__PURE__ */
|
|
1822
|
+
return /* @__PURE__ */ jsxs17("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
1823
|
+
label6 && /* @__PURE__ */ jsxs17("label", { id: labelId, htmlFor: inputId, className: label, children: [
|
|
1447
1824
|
label6,
|
|
1448
|
-
required && /* @__PURE__ */
|
|
1825
|
+
required && /* @__PURE__ */ jsx22("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
1449
1826
|
] }),
|
|
1450
|
-
/* @__PURE__ */
|
|
1451
|
-
/* @__PURE__ */
|
|
1827
|
+
/* @__PURE__ */ jsxs17(Popover.Root, { open: open && !disabled, onOpenChange: (next) => next ? openList() : close2(), children: [
|
|
1828
|
+
/* @__PURE__ */ jsx22(Popover.Anchor, { asChild: true, children: /* @__PURE__ */ jsxs17(
|
|
1452
1829
|
"div",
|
|
1453
1830
|
{
|
|
1454
1831
|
ref: anchorRef,
|
|
@@ -1456,7 +1833,7 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1456
1833
|
"data-invalid": error || void 0,
|
|
1457
1834
|
"data-disabled": disabled || void 0,
|
|
1458
1835
|
children: [
|
|
1459
|
-
/* @__PURE__ */
|
|
1836
|
+
/* @__PURE__ */ jsx22(
|
|
1460
1837
|
"input",
|
|
1461
1838
|
{
|
|
1462
1839
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -1483,7 +1860,7 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1483
1860
|
className: input
|
|
1484
1861
|
}
|
|
1485
1862
|
),
|
|
1486
|
-
/* @__PURE__ */
|
|
1863
|
+
/* @__PURE__ */ jsx22(
|
|
1487
1864
|
"button",
|
|
1488
1865
|
{
|
|
1489
1866
|
type: "button",
|
|
@@ -1498,13 +1875,13 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1498
1875
|
else openList(options);
|
|
1499
1876
|
inputRef.current?.focus();
|
|
1500
1877
|
},
|
|
1501
|
-
children: /* @__PURE__ */
|
|
1878
|
+
children: /* @__PURE__ */ jsx22(ChevronDownIcon3, { size: 16 })
|
|
1502
1879
|
}
|
|
1503
1880
|
)
|
|
1504
1881
|
]
|
|
1505
1882
|
}
|
|
1506
1883
|
) }),
|
|
1507
|
-
/* @__PURE__ */
|
|
1884
|
+
/* @__PURE__ */ jsx22(Popover.Portal, { children: /* @__PURE__ */ jsx22(
|
|
1508
1885
|
Popover.Content,
|
|
1509
1886
|
{
|
|
1510
1887
|
role: "presentation",
|
|
@@ -1519,7 +1896,7 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1519
1896
|
onInteractOutside: (event) => {
|
|
1520
1897
|
if (anchorRef.current?.contains(event.target)) event.preventDefault();
|
|
1521
1898
|
},
|
|
1522
|
-
children: hasOptions ? /* @__PURE__ */
|
|
1899
|
+
children: hasOptions ? /* @__PURE__ */ jsx22(
|
|
1523
1900
|
"div",
|
|
1524
1901
|
{
|
|
1525
1902
|
id: listId,
|
|
@@ -1531,7 +1908,7 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1531
1908
|
return (
|
|
1532
1909
|
// aria-activedescendant 패턴: 포커스·키보드는 입력창이 맡고 항목은 포커스를 받지 않는다 (WAI-ARIA combobox)
|
|
1533
1910
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/interactive-supports-focus
|
|
1534
|
-
/* @__PURE__ */
|
|
1911
|
+
/* @__PURE__ */ jsxs17(
|
|
1535
1912
|
"div",
|
|
1536
1913
|
{
|
|
1537
1914
|
id: optionId(index),
|
|
@@ -1547,7 +1924,7 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1547
1924
|
onClick: () => select(option2),
|
|
1548
1925
|
children: [
|
|
1549
1926
|
option2.label,
|
|
1550
|
-
isSelected && /* @__PURE__ */
|
|
1927
|
+
isSelected && /* @__PURE__ */ jsx22("span", { className: itemIndicator, "aria-hidden": true, children: /* @__PURE__ */ jsx22(CheckIcon, { size: 16 }) })
|
|
1551
1928
|
]
|
|
1552
1929
|
},
|
|
1553
1930
|
option2.value
|
|
@@ -1555,81 +1932,259 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1555
1932
|
);
|
|
1556
1933
|
})
|
|
1557
1934
|
}
|
|
1558
|
-
) : /* @__PURE__ */
|
|
1935
|
+
) : /* @__PURE__ */ jsx22("div", { className: empty, role: "status", children: emptyMessage })
|
|
1559
1936
|
}
|
|
1560
1937
|
) })
|
|
1561
1938
|
] }),
|
|
1562
|
-
name && /* @__PURE__ */
|
|
1563
|
-
helperText3 && /* @__PURE__ */
|
|
1939
|
+
name && /* @__PURE__ */ jsx22("input", { type: "hidden", name, value: selectedValue ?? "" }),
|
|
1940
|
+
helperText3 && /* @__PURE__ */ jsx22("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
1564
1941
|
] });
|
|
1565
1942
|
});
|
|
1566
1943
|
|
|
1944
|
+
// src/components/DatePicker/DatePicker.tsx
|
|
1945
|
+
import { forwardRef as forwardRef21, useEffect as useEffect5, useRef as useRef9, useState as useState7 } from "react";
|
|
1946
|
+
import { CalendarIcon } from "@bestow-ui/icons";
|
|
1947
|
+
|
|
1948
|
+
// src/components/Popover/Popover.tsx
|
|
1949
|
+
import * as RadixPopover from "@radix-ui/react-popover";
|
|
1950
|
+
import { XIcon as XIcon3 } from "@bestow-ui/icons";
|
|
1951
|
+
import { useId as useId6 } from "react";
|
|
1952
|
+
|
|
1953
|
+
// src/components/Popover/Popover.css.ts
|
|
1954
|
+
var arrow = "_1j99p8x4";
|
|
1955
|
+
var closeButton3 = "_1j99p8x3";
|
|
1956
|
+
var content7 = "_1j99p8x0";
|
|
1957
|
+
var header5 = "_1j99p8x1";
|
|
1958
|
+
var title3 = "_1j99p8x2";
|
|
1959
|
+
|
|
1960
|
+
// src/components/Popover/Popover.tsx
|
|
1961
|
+
import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1962
|
+
function Popover2({
|
|
1963
|
+
content: content12,
|
|
1964
|
+
children,
|
|
1965
|
+
title: title6,
|
|
1966
|
+
"aria-label": ariaLabel,
|
|
1967
|
+
showClose = false,
|
|
1968
|
+
showArrow = false,
|
|
1969
|
+
side = "bottom",
|
|
1970
|
+
align = "center",
|
|
1971
|
+
open,
|
|
1972
|
+
defaultOpen,
|
|
1973
|
+
onOpenChange,
|
|
1974
|
+
modal,
|
|
1975
|
+
className,
|
|
1976
|
+
style,
|
|
1977
|
+
onOpenAutoFocus
|
|
1978
|
+
}) {
|
|
1979
|
+
const portal2 = usePortalProps();
|
|
1980
|
+
const m = useMessages();
|
|
1981
|
+
const titleId = useId6();
|
|
1982
|
+
return /* @__PURE__ */ jsxs18(RadixPopover.Root, { open, defaultOpen, onOpenChange, modal, children: [
|
|
1983
|
+
/* @__PURE__ */ jsx23(RadixPopover.Trigger, { asChild: true, children }),
|
|
1984
|
+
/* @__PURE__ */ jsx23(RadixPopover.Portal, { children: /* @__PURE__ */ jsxs18(
|
|
1985
|
+
RadixPopover.Content,
|
|
1986
|
+
{
|
|
1987
|
+
side,
|
|
1988
|
+
align,
|
|
1989
|
+
sideOffset: 6,
|
|
1990
|
+
onOpenAutoFocus,
|
|
1991
|
+
collisionPadding: 8,
|
|
1992
|
+
"aria-labelledby": title6 ? titleId : void 0,
|
|
1993
|
+
"aria-label": title6 ? void 0 : ariaLabel,
|
|
1994
|
+
className: cx(portal2.className, content7, className),
|
|
1995
|
+
style: { ...portal2.style, ...style },
|
|
1996
|
+
children: [
|
|
1997
|
+
(title6 || showClose) && /* @__PURE__ */ jsxs18("div", { className: header5, children: [
|
|
1998
|
+
title6 && /* @__PURE__ */ jsx23("h2", { id: titleId, className: title3, children: title6 }),
|
|
1999
|
+
showClose && /* @__PURE__ */ jsx23(RadixPopover.Close, { className: closeButton3, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ jsx23(XIcon3, { size: 16 }) })
|
|
2000
|
+
] }),
|
|
2001
|
+
content12,
|
|
2002
|
+
showArrow && /* @__PURE__ */ jsx23(RadixPopover.Arrow, { className: arrow, width: 12, height: 6 })
|
|
2003
|
+
]
|
|
2004
|
+
}
|
|
2005
|
+
) })
|
|
2006
|
+
] });
|
|
2007
|
+
}
|
|
2008
|
+
var PopoverClose = RadixPopover.Close;
|
|
2009
|
+
|
|
2010
|
+
// src/components/DatePicker/DatePicker.tsx
|
|
2011
|
+
import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2012
|
+
var sanitize2 = (input5) => input5.replace(/\D/g, "").slice(0, 8);
|
|
2013
|
+
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)}`;
|
|
2014
|
+
var isDigit3 = (char) => /\d/.test(char);
|
|
2015
|
+
var DatePicker = /* @__PURE__ */ forwardRef21(
|
|
2016
|
+
function DatePicker2(props, ref) {
|
|
2017
|
+
const {
|
|
2018
|
+
value: value4,
|
|
2019
|
+
defaultValue,
|
|
2020
|
+
onValueChange,
|
|
2021
|
+
min,
|
|
2022
|
+
max,
|
|
2023
|
+
isDateDisabled,
|
|
2024
|
+
isHoliday,
|
|
2025
|
+
today,
|
|
2026
|
+
label: labelProp,
|
|
2027
|
+
helperText: helperText3,
|
|
2028
|
+
error,
|
|
2029
|
+
required,
|
|
2030
|
+
disabled,
|
|
2031
|
+
fullWidth,
|
|
2032
|
+
placeholder = "YYYY-MM-DD",
|
|
2033
|
+
calendarLabel: calendarLabelProp,
|
|
2034
|
+
invalidText: invalidTextProp,
|
|
2035
|
+
unavailableText: unavailableTextProp,
|
|
2036
|
+
incompleteText: incompleteTextProp,
|
|
2037
|
+
name,
|
|
2038
|
+
id,
|
|
2039
|
+
className
|
|
2040
|
+
} = props;
|
|
2041
|
+
const inputRef = useRef9(null);
|
|
2042
|
+
const m = useMessages();
|
|
2043
|
+
const label6 = labelProp ?? m.date ?? "\uB0A0\uC9DC";
|
|
2044
|
+
const calendarLabel = calendarLabelProp ?? m.openCalendar ?? "\uB2EC\uB825 \uC5F4\uAE30";
|
|
2045
|
+
const invalidText = invalidTextProp ?? m.dateInvalid ?? "\uC62C\uBC14\uB978 \uB0A0\uC9DC\uAC00 \uC544\uB2C8\uC5D0\uC694.";
|
|
2046
|
+
const unavailableText = unavailableTextProp ?? m.dateUnavailable ?? "\uACE0\uB97C \uC218 \uC5C6\uB294 \uB0A0\uC9DC\uC608\uC694.";
|
|
2047
|
+
const incompleteText = incompleteTextProp ?? m.dateIncomplete ?? "\uB0A0\uC9DC\uB97C YYYY-MM-DD \uD615\uC2DD\uC73C\uB85C \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
|
|
2048
|
+
const [open, setOpen] = useState7(false);
|
|
2049
|
+
const [touched, setTouched] = useState7(false);
|
|
2050
|
+
const isControlled = "value" in props;
|
|
2051
|
+
const lastEmitted = useRef9(isControlled ? value4 ?? "" : defaultValue ?? "");
|
|
2052
|
+
const minDate = parseISODate(min);
|
|
2053
|
+
const maxDate = parseISODate(max);
|
|
2054
|
+
const toIso = (digits) => digits.length === 8 ? `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}` : "";
|
|
2055
|
+
const isUnavailable = (date2) => minDate !== null && compareDays(date2, minDate) < 0 || maxDate !== null && compareDays(date2, maxDate) > 0 || !!isDateDisabled?.(date2);
|
|
2056
|
+
const emit = (iso) => {
|
|
2057
|
+
if (iso === lastEmitted.current) return;
|
|
2058
|
+
lastEmitted.current = iso;
|
|
2059
|
+
onValueChange?.(iso);
|
|
2060
|
+
};
|
|
2061
|
+
const field3 = useFormattedInput({
|
|
2062
|
+
isControlled: false,
|
|
2063
|
+
value: void 0,
|
|
2064
|
+
defaultValue: (isControlled ? value4 : defaultValue)?.replace(/\D/g, ""),
|
|
2065
|
+
onValueChange: (digits) => {
|
|
2066
|
+
const date2 = parseISODate(toIso(digits));
|
|
2067
|
+
emit(date2 && !isUnavailable(date2) ? toIso(digits) : "");
|
|
2068
|
+
},
|
|
2069
|
+
sanitize: sanitize2,
|
|
2070
|
+
format,
|
|
2071
|
+
isMeaningful: isDigit3,
|
|
2072
|
+
inputRef
|
|
2073
|
+
});
|
|
2074
|
+
const textIso = toIso(field3.raw);
|
|
2075
|
+
const { setRaw } = field3;
|
|
2076
|
+
useEffect5(() => {
|
|
2077
|
+
if (!isControlled) return;
|
|
2078
|
+
const next = value4 ?? "";
|
|
2079
|
+
lastEmitted.current = next;
|
|
2080
|
+
if (next === textIso) return;
|
|
2081
|
+
const textDate = parseISODate(textIso);
|
|
2082
|
+
const textIsValid = textDate !== null && !isUnavailable(textDate);
|
|
2083
|
+
if (next === "" && !textIsValid) return;
|
|
2084
|
+
setRaw(next.replace(/\D/g, ""));
|
|
2085
|
+
}, [value4]);
|
|
2086
|
+
const date = parseISODate(textIso);
|
|
2087
|
+
const complete = field3.raw.length === 8;
|
|
2088
|
+
const autoError = complete ? !date ? invalidText : isUnavailable(date) ? unavailableText : null : touched && field3.raw.length > 0 ? incompleteText : null;
|
|
2089
|
+
const showAuto = autoError !== null && error === void 0;
|
|
2090
|
+
const selectedIso = date && !isUnavailable(date) ? textIso : "";
|
|
2091
|
+
return /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
2092
|
+
/* @__PURE__ */ jsx24(
|
|
2093
|
+
TextField,
|
|
2094
|
+
{
|
|
2095
|
+
ref: mergeRefs(ref, inputRef),
|
|
2096
|
+
id,
|
|
2097
|
+
label: label6,
|
|
2098
|
+
placeholder,
|
|
2099
|
+
inputMode: "numeric",
|
|
2100
|
+
autoComplete: "off",
|
|
2101
|
+
value: field3.display,
|
|
2102
|
+
onChange: field3.onChange,
|
|
2103
|
+
onKeyDown: field3.onKeyDown,
|
|
2104
|
+
onBlur: () => setTouched(true),
|
|
2105
|
+
error: error ?? autoError !== null,
|
|
2106
|
+
helperText: showAuto ? autoError : helperText3,
|
|
2107
|
+
required,
|
|
2108
|
+
disabled,
|
|
2109
|
+
fullWidth,
|
|
2110
|
+
rootClassName: className,
|
|
2111
|
+
endAdornment: /* @__PURE__ */ jsx24(
|
|
2112
|
+
Popover2,
|
|
2113
|
+
{
|
|
2114
|
+
open,
|
|
2115
|
+
onOpenChange: setOpen,
|
|
2116
|
+
modal: true,
|
|
2117
|
+
align: "end",
|
|
2118
|
+
"aria-label": m.calendar ?? "\uB2EC\uB825",
|
|
2119
|
+
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
2120
|
+
content: /* @__PURE__ */ jsx24(
|
|
2121
|
+
Calendar,
|
|
2122
|
+
{
|
|
2123
|
+
value: selectedIso,
|
|
2124
|
+
onValueChange: (iso) => {
|
|
2125
|
+
setRaw(iso.replace(/\D/g, ""));
|
|
2126
|
+
emit(iso);
|
|
2127
|
+
setOpen(false);
|
|
2128
|
+
},
|
|
2129
|
+
min,
|
|
2130
|
+
max,
|
|
2131
|
+
isDateDisabled,
|
|
2132
|
+
isHoliday,
|
|
2133
|
+
today,
|
|
2134
|
+
initialFocus: true
|
|
2135
|
+
}
|
|
2136
|
+
),
|
|
2137
|
+
children: /* @__PURE__ */ jsx24(IconButton, { "aria-label": calendarLabel, size: "sm", disabled, children: /* @__PURE__ */ jsx24(CalendarIcon, {}) })
|
|
2138
|
+
}
|
|
2139
|
+
)
|
|
2140
|
+
}
|
|
2141
|
+
),
|
|
2142
|
+
name && /* @__PURE__ */ jsx24("input", { type: "hidden", name, value: selectedIso })
|
|
2143
|
+
] });
|
|
2144
|
+
}
|
|
2145
|
+
);
|
|
2146
|
+
|
|
1567
2147
|
// src/components/Divider/Divider.tsx
|
|
1568
|
-
import { forwardRef as
|
|
2148
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
1569
2149
|
|
|
1570
2150
|
// src/components/Divider/Divider.css.ts
|
|
1571
|
-
import { createRuntimeFn as
|
|
1572
|
-
var divider = /* @__PURE__ */
|
|
2151
|
+
import { createRuntimeFn as _7a46812 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2152
|
+
var divider = /* @__PURE__ */ _7a46812({ defaultClassName: "_1t3gq8v0", variantClassNames: { orientation: { horizontal: "_1t3gq8v1", vertical: "_1t3gq8v2" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
|
|
1573
2153
|
var labeled = "_1t3gq8v3";
|
|
1574
2154
|
var line = "_1t3gq8v4";
|
|
1575
2155
|
|
|
1576
2156
|
// src/components/Divider/Divider.tsx
|
|
1577
|
-
import { jsx as
|
|
1578
|
-
var Divider = /* @__PURE__ */
|
|
2157
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2158
|
+
var Divider = /* @__PURE__ */ forwardRef22(function Divider2({ orientation = "horizontal", decorative, className, children, ...rest }, ref) {
|
|
1579
2159
|
if (children && orientation === "horizontal") {
|
|
1580
|
-
return /* @__PURE__ */
|
|
1581
|
-
/* @__PURE__ */
|
|
2160
|
+
return /* @__PURE__ */ jsxs20("div", { ref, className: cx(labeled, className), ...rest, children: [
|
|
2161
|
+
/* @__PURE__ */ jsx25("span", { className: line, "aria-hidden": true }),
|
|
1582
2162
|
children,
|
|
1583
|
-
/* @__PURE__ */
|
|
2163
|
+
/* @__PURE__ */ jsx25("span", { className: line, "aria-hidden": true })
|
|
1584
2164
|
] });
|
|
1585
2165
|
}
|
|
1586
2166
|
const a11y = decorative ? { role: "none" } : { role: "separator", "aria-orientation": orientation === "vertical" ? "vertical" : void 0 };
|
|
1587
|
-
return /* @__PURE__ */
|
|
2167
|
+
return /* @__PURE__ */ jsx25("div", { ref, className: cx(divider({ orientation }), className), ...a11y, ...rest });
|
|
1588
2168
|
});
|
|
1589
2169
|
|
|
1590
2170
|
// src/components/Drawer/Drawer.tsx
|
|
1591
2171
|
import * as Dialog2 from "@radix-ui/react-dialog";
|
|
1592
|
-
import { XIcon as
|
|
1593
|
-
|
|
1594
|
-
// src/components/IconButton/IconButton.tsx
|
|
1595
|
-
import { forwardRef as forwardRef20 } from "react";
|
|
1596
|
-
|
|
1597
|
-
// src/components/IconButton/IconButton.css.ts
|
|
1598
|
-
import { createRuntimeFn as _7a46812 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1599
|
-
var iconButton = /* @__PURE__ */ _7a46812({ defaultClassName: "ip9et20", variantClassNames: { size: { sm: "ip9et21", md: "ip9et22", lg: "ip9et23" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
1600
|
-
|
|
1601
|
-
// src/components/IconButton/IconButton.tsx
|
|
1602
|
-
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1603
|
-
var IconButton = /* @__PURE__ */ forwardRef20(function IconButton2({ variant = "ghost", color = "neutral", size, loading: loading2, className, children, ...rest }, ref) {
|
|
1604
|
-
return /* @__PURE__ */ jsx21(
|
|
1605
|
-
Button,
|
|
1606
|
-
{
|
|
1607
|
-
ref,
|
|
1608
|
-
variant,
|
|
1609
|
-
color,
|
|
1610
|
-
size,
|
|
1611
|
-
loading: loading2,
|
|
1612
|
-
className: cx(iconButton({ size }), className),
|
|
1613
|
-
...rest,
|
|
1614
|
-
children: !loading2 && children
|
|
1615
|
-
}
|
|
1616
|
-
);
|
|
1617
|
-
});
|
|
2172
|
+
import { XIcon as XIcon4 } from "@bestow-ui/icons";
|
|
1618
2173
|
|
|
1619
2174
|
// src/components/Drawer/Drawer.css.ts
|
|
1620
2175
|
import { createRuntimeFn as _7a46813 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1621
2176
|
var body3 = "nmobyvy";
|
|
1622
|
-
var
|
|
1623
|
-
var
|
|
2177
|
+
var closeButton4 = "nmobyvx";
|
|
2178
|
+
var content8 = /* @__PURE__ */ _7a46813({ 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"]] });
|
|
1624
2179
|
var description3 = "nmobyvw";
|
|
1625
2180
|
var footer3 = "nmobyvz";
|
|
1626
|
-
var
|
|
2181
|
+
var header6 = "nmobyvt";
|
|
1627
2182
|
var headings2 = "nmobyvu";
|
|
1628
2183
|
var overlay2 = "nmobyv0";
|
|
1629
|
-
var
|
|
2184
|
+
var title4 = "nmobyvv";
|
|
1630
2185
|
|
|
1631
2186
|
// src/components/Drawer/Drawer.tsx
|
|
1632
|
-
import { jsx as
|
|
2187
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1633
2188
|
function Drawer({
|
|
1634
2189
|
open,
|
|
1635
2190
|
defaultOpen,
|
|
@@ -1646,15 +2201,16 @@ function Drawer({
|
|
|
1646
2201
|
className
|
|
1647
2202
|
}) {
|
|
1648
2203
|
const portal2 = usePortalProps();
|
|
2204
|
+
const m = useMessages();
|
|
1649
2205
|
const focus = useReturnFocus(Boolean(trigger4));
|
|
1650
|
-
return /* @__PURE__ */
|
|
1651
|
-
trigger4 && /* @__PURE__ */
|
|
1652
|
-
/* @__PURE__ */
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
/* @__PURE__ */
|
|
2206
|
+
return /* @__PURE__ */ jsxs21(Dialog2.Root, { open, defaultOpen, onOpenChange, children: [
|
|
2207
|
+
trigger4 && /* @__PURE__ */ jsx26(Dialog2.Trigger, { asChild: true, children: trigger4 }),
|
|
2208
|
+
/* @__PURE__ */ jsxs21(Dialog2.Portal, { children: [
|
|
2209
|
+
/* @__PURE__ */ jsx26(Dialog2.Overlay, { className: cx(portal2.className, overlay2), style: portal2.style }),
|
|
2210
|
+
/* @__PURE__ */ jsxs21(
|
|
1655
2211
|
Dialog2.Content,
|
|
1656
2212
|
{
|
|
1657
|
-
className: cx(portal2.className,
|
|
2213
|
+
className: cx(portal2.className, content8({ side, size }), className),
|
|
1658
2214
|
style: portal2.style,
|
|
1659
2215
|
"data-side": side ?? "right",
|
|
1660
2216
|
onPointerDownOutside: closeOnOverlayClick ? void 0 : (event) => event.preventDefault(),
|
|
@@ -1662,15 +2218,15 @@ function Drawer({
|
|
|
1662
2218
|
onCloseAutoFocus: focus.onCloseAutoFocus,
|
|
1663
2219
|
...description6 ? {} : { "aria-describedby": void 0 },
|
|
1664
2220
|
children: [
|
|
1665
|
-
/* @__PURE__ */
|
|
1666
|
-
/* @__PURE__ */
|
|
1667
|
-
/* @__PURE__ */
|
|
1668
|
-
description6 && /* @__PURE__ */
|
|
2221
|
+
/* @__PURE__ */ jsxs21("div", { className: header6, children: [
|
|
2222
|
+
/* @__PURE__ */ jsxs21("div", { className: headings2, children: [
|
|
2223
|
+
/* @__PURE__ */ jsx26(Dialog2.Title, { className: title4, children: title6 }),
|
|
2224
|
+
description6 && /* @__PURE__ */ jsx26(Dialog2.Description, { className: description3, children: description6 })
|
|
1669
2225
|
] }),
|
|
1670
|
-
!hideCloseButton && /* @__PURE__ */
|
|
2226
|
+
!hideCloseButton && /* @__PURE__ */ jsx26(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ jsx26(IconButton, { "aria-label": m.close ?? "\uB2EB\uAE30", size: "sm", className: closeButton4, children: /* @__PURE__ */ jsx26(XIcon4, {}) }) })
|
|
1671
2227
|
] }),
|
|
1672
|
-
children && /* @__PURE__ */
|
|
1673
|
-
footer6 && /* @__PURE__ */
|
|
2228
|
+
children && /* @__PURE__ */ jsx26("div", { className: body3, children }),
|
|
2229
|
+
footer6 && /* @__PURE__ */ jsx26("div", { className: footer3, children: footer6 })
|
|
1674
2230
|
]
|
|
1675
2231
|
}
|
|
1676
2232
|
)
|
|
@@ -1681,10 +2237,10 @@ var DrawerClose = Dialog2.Close;
|
|
|
1681
2237
|
|
|
1682
2238
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1683
2239
|
import * as RadixMenu from "@radix-ui/react-dropdown-menu";
|
|
1684
|
-
import { forwardRef as
|
|
2240
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
1685
2241
|
|
|
1686
2242
|
// src/components/DropdownMenu/DropdownMenu.css.ts
|
|
1687
|
-
var
|
|
2243
|
+
var content9 = "_1d7ahux0";
|
|
1688
2244
|
var danger = "_1d7ahux2";
|
|
1689
2245
|
var icon5 = "_1d7ahux3";
|
|
1690
2246
|
var item5 = "_1d7ahux1";
|
|
@@ -1693,14 +2249,14 @@ var separator2 = "_1d7ahux6";
|
|
|
1693
2249
|
var shortcut = "_1d7ahux4";
|
|
1694
2250
|
|
|
1695
2251
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1696
|
-
import { jsx as
|
|
2252
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1697
2253
|
var DropdownMenu = RadixMenu.Root;
|
|
1698
2254
|
var DropdownMenuTrigger = RadixMenu.Trigger;
|
|
1699
2255
|
var DropdownMenuGroup = RadixMenu.Group;
|
|
1700
|
-
var DropdownMenuContent = /* @__PURE__ */
|
|
2256
|
+
var DropdownMenuContent = /* @__PURE__ */ forwardRef23(
|
|
1701
2257
|
function DropdownMenuContent2({ className, style, side = "bottom", align = "start", sideOffset = 4, collisionPadding = 8, ...rest }, ref) {
|
|
1702
2258
|
const portal2 = usePortalProps();
|
|
1703
|
-
return /* @__PURE__ */
|
|
2259
|
+
return /* @__PURE__ */ jsx27(RadixMenu.Portal, { children: /* @__PURE__ */ jsx27(
|
|
1704
2260
|
RadixMenu.Content,
|
|
1705
2261
|
{
|
|
1706
2262
|
ref,
|
|
@@ -1708,36 +2264,39 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef21(
|
|
|
1708
2264
|
align,
|
|
1709
2265
|
sideOffset,
|
|
1710
2266
|
collisionPadding,
|
|
1711
|
-
className: cx(portal2.className,
|
|
2267
|
+
className: cx(portal2.className, content9, className),
|
|
1712
2268
|
style: { ...portal2.style, ...style },
|
|
1713
2269
|
...rest
|
|
1714
2270
|
}
|
|
1715
2271
|
) });
|
|
1716
2272
|
}
|
|
1717
2273
|
);
|
|
1718
|
-
var DropdownMenuItem = /* @__PURE__ */
|
|
1719
|
-
function DropdownMenuItem2({ icon: icon6, shortcut: shortcut2, color = "
|
|
1720
|
-
|
|
1721
|
-
|
|
2274
|
+
var DropdownMenuItem = /* @__PURE__ */ forwardRef23(
|
|
2275
|
+
function DropdownMenuItem2({ icon: icon6, shortcut: shortcut2, color = "neutral", className, children, ...rest }, ref) {
|
|
2276
|
+
if (color === "default") {
|
|
2277
|
+
warnOnce('DropdownMenuItem \uC758 color="default" \uB294 deprecated \uC608\uC694. color="neutral" \uC744 \uC4F0\uC138\uC694 (1.0 \uC5D0\uC11C \uC81C\uAC70).');
|
|
2278
|
+
}
|
|
2279
|
+
return /* @__PURE__ */ jsxs22(RadixMenu.Item, { ref, className: cx(item5, color === "danger" && danger, className), ...rest, children: [
|
|
2280
|
+
icon6 && /* @__PURE__ */ jsx27("span", { className: icon5, "aria-hidden": true, children: icon6 }),
|
|
1722
2281
|
children,
|
|
1723
|
-
shortcut2 && /* @__PURE__ */
|
|
2282
|
+
shortcut2 && /* @__PURE__ */ jsx27("span", { className: shortcut, "aria-hidden": true, children: shortcut2 })
|
|
1724
2283
|
] });
|
|
1725
2284
|
}
|
|
1726
2285
|
);
|
|
1727
|
-
var DropdownMenuLabel = /* @__PURE__ */
|
|
2286
|
+
var DropdownMenuLabel = /* @__PURE__ */ forwardRef23(
|
|
1728
2287
|
function DropdownMenuLabel2({ className, ...rest }, ref) {
|
|
1729
|
-
return /* @__PURE__ */
|
|
2288
|
+
return /* @__PURE__ */ jsx27(RadixMenu.Label, { ref, className: cx(label2, className), ...rest });
|
|
1730
2289
|
}
|
|
1731
2290
|
);
|
|
1732
|
-
var DropdownMenuSeparator = /* @__PURE__ */
|
|
2291
|
+
var DropdownMenuSeparator = /* @__PURE__ */ forwardRef23(
|
|
1733
2292
|
function DropdownMenuSeparator2({ className, ...rest }, ref) {
|
|
1734
|
-
return /* @__PURE__ */
|
|
2293
|
+
return /* @__PURE__ */ jsx27(RadixMenu.Separator, { ref, className: cx(separator2, className), ...rest });
|
|
1735
2294
|
}
|
|
1736
2295
|
);
|
|
1737
2296
|
|
|
1738
2297
|
// src/components/Pagination/Pagination.tsx
|
|
1739
|
-
import { ChevronLeftIcon, ChevronRightIcon as
|
|
1740
|
-
import { forwardRef as
|
|
2298
|
+
import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon3 } from "@bestow-ui/icons";
|
|
2299
|
+
import { forwardRef as forwardRef24, useState as useState8 } from "react";
|
|
1741
2300
|
|
|
1742
2301
|
// src/components/Pagination/getPaginationItems.ts
|
|
1743
2302
|
var range = (start, end) => end < start ? [] : Array.from({ length: end - start + 1 }, (_, i) => start + i);
|
|
@@ -1770,9 +2329,8 @@ var item6 = /* @__PURE__ */ _7a46814({ defaultClassName: "_1iraoak1", variantCla
|
|
|
1770
2329
|
var list3 = "_1iraoak0";
|
|
1771
2330
|
|
|
1772
2331
|
// src/components/Pagination/Pagination.tsx
|
|
1773
|
-
import { jsx as
|
|
1774
|
-
var
|
|
1775
|
-
var Pagination = /* @__PURE__ */ forwardRef22(function Pagination2({
|
|
2332
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2333
|
+
var Pagination = /* @__PURE__ */ forwardRef24(function Pagination2({
|
|
1776
2334
|
totalPages,
|
|
1777
2335
|
page: pageProp,
|
|
1778
2336
|
defaultPage = 1,
|
|
@@ -1780,12 +2338,15 @@ var Pagination = /* @__PURE__ */ forwardRef22(function Pagination2({
|
|
|
1780
2338
|
siblingCount = 1,
|
|
1781
2339
|
boundaryCount = 1,
|
|
1782
2340
|
size,
|
|
1783
|
-
getItemLabel
|
|
2341
|
+
getItemLabel: getItemLabelProp,
|
|
1784
2342
|
className,
|
|
1785
|
-
"aria-label":
|
|
2343
|
+
"aria-label": ariaLabelProp,
|
|
1786
2344
|
...rest
|
|
1787
2345
|
}, ref) {
|
|
1788
|
-
const [uncontrolledPage, setUncontrolledPage] =
|
|
2346
|
+
const [uncontrolledPage, setUncontrolledPage] = useState8(defaultPage);
|
|
2347
|
+
const m = useMessages();
|
|
2348
|
+
const ariaLabel = ariaLabelProp ?? m.pagination ?? "\uD398\uC774\uC9C0 \uD0D0\uC0C9";
|
|
2349
|
+
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`);
|
|
1789
2350
|
if (totalPages < 1) return null;
|
|
1790
2351
|
const page = Math.min(Math.max(pageProp ?? uncontrolledPage, 1), totalPages);
|
|
1791
2352
|
const goTo = (next) => {
|
|
@@ -1794,8 +2355,8 @@ var Pagination = /* @__PURE__ */ forwardRef22(function Pagination2({
|
|
|
1794
2355
|
onPageChange?.(next);
|
|
1795
2356
|
};
|
|
1796
2357
|
const itemClass = item6({ size });
|
|
1797
|
-
return /* @__PURE__ */
|
|
1798
|
-
/* @__PURE__ */
|
|
2358
|
+
return /* @__PURE__ */ jsx28("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsxs23("ul", { className: list3, children: [
|
|
2359
|
+
/* @__PURE__ */ jsx28("li", { children: /* @__PURE__ */ jsx28(
|
|
1799
2360
|
"button",
|
|
1800
2361
|
{
|
|
1801
2362
|
type: "button",
|
|
@@ -1803,11 +2364,11 @@ var Pagination = /* @__PURE__ */ forwardRef22(function Pagination2({
|
|
|
1803
2364
|
"aria-label": getItemLabel("previous", page - 1),
|
|
1804
2365
|
disabled: page <= 1,
|
|
1805
2366
|
onClick: () => goTo(page - 1),
|
|
1806
|
-
children: /* @__PURE__ */
|
|
2367
|
+
children: /* @__PURE__ */ jsx28(ChevronLeftIcon2, { size: 16 })
|
|
1807
2368
|
}
|
|
1808
2369
|
) }),
|
|
1809
2370
|
getPaginationItems(page, totalPages, siblingCount, boundaryCount).map(
|
|
1810
|
-
(item7) => typeof item7 === "number" ? /* @__PURE__ */
|
|
2371
|
+
(item7) => typeof item7 === "number" ? /* @__PURE__ */ jsx28("li", { children: /* @__PURE__ */ jsx28(
|
|
1811
2372
|
"button",
|
|
1812
2373
|
{
|
|
1813
2374
|
type: "button",
|
|
@@ -1817,9 +2378,9 @@ var Pagination = /* @__PURE__ */ forwardRef22(function Pagination2({
|
|
|
1817
2378
|
onClick: () => goTo(item7),
|
|
1818
2379
|
children: item7
|
|
1819
2380
|
}
|
|
1820
|
-
) }, item7) : /* @__PURE__ */
|
|
2381
|
+
) }, item7) : /* @__PURE__ */ jsx28("li", { "aria-hidden": true, className: cx(itemClass, ellipsis), children: "\u2026" }, item7)
|
|
1821
2382
|
),
|
|
1822
|
-
/* @__PURE__ */
|
|
2383
|
+
/* @__PURE__ */ jsx28("li", { children: /* @__PURE__ */ jsx28(
|
|
1823
2384
|
"button",
|
|
1824
2385
|
{
|
|
1825
2386
|
type: "button",
|
|
@@ -1827,43 +2388,45 @@ var Pagination = /* @__PURE__ */ forwardRef22(function Pagination2({
|
|
|
1827
2388
|
"aria-label": getItemLabel("next", page + 1),
|
|
1828
2389
|
disabled: page >= totalPages,
|
|
1829
2390
|
onClick: () => goTo(page + 1),
|
|
1830
|
-
children: /* @__PURE__ */
|
|
2391
|
+
children: /* @__PURE__ */ jsx28(ChevronRightIcon3, { size: 16 })
|
|
1831
2392
|
}
|
|
1832
2393
|
) })
|
|
1833
2394
|
] }) });
|
|
1834
2395
|
});
|
|
1835
2396
|
|
|
1836
2397
|
// src/components/PhoneNumberInput/PhoneNumberInput.tsx
|
|
1837
|
-
import { forwardRef as
|
|
1838
|
-
import { jsx as
|
|
1839
|
-
var
|
|
2398
|
+
import { forwardRef as forwardRef25, useRef as useRef10 } from "react";
|
|
2399
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2400
|
+
var sanitize3 = (input5) => {
|
|
1840
2401
|
const digits = input5.replace(/\D/g, "");
|
|
1841
2402
|
return digits.slice(0, phoneNumberMaxDigits(digits));
|
|
1842
2403
|
};
|
|
1843
|
-
var
|
|
1844
|
-
var PhoneNumberInput = /* @__PURE__ */
|
|
2404
|
+
var isDigit4 = (char) => /\d/.test(char);
|
|
2405
|
+
var PhoneNumberInput = /* @__PURE__ */ forwardRef25(
|
|
1845
2406
|
function PhoneNumberInput2(props, ref) {
|
|
1846
2407
|
const {
|
|
1847
2408
|
value: value4,
|
|
1848
2409
|
defaultValue,
|
|
1849
2410
|
onValueChange,
|
|
1850
|
-
label:
|
|
2411
|
+
label: labelProp,
|
|
1851
2412
|
placeholder = "010-0000-0000",
|
|
1852
2413
|
onKeyDown,
|
|
1853
2414
|
...rest
|
|
1854
2415
|
} = props;
|
|
1855
|
-
const inputRef =
|
|
2416
|
+
const inputRef = useRef10(null);
|
|
2417
|
+
const m = useMessages();
|
|
2418
|
+
const label6 = labelProp ?? m.phoneNumber ?? "\uD734\uB300\uD3F0 \uBC88\uD638";
|
|
1856
2419
|
const field3 = useFormattedInput({
|
|
1857
2420
|
isControlled: "value" in props,
|
|
1858
2421
|
value: value4,
|
|
1859
2422
|
defaultValue,
|
|
1860
2423
|
onValueChange,
|
|
1861
|
-
sanitize:
|
|
2424
|
+
sanitize: sanitize3,
|
|
1862
2425
|
format: formatPhoneNumber,
|
|
1863
|
-
isMeaningful:
|
|
2426
|
+
isMeaningful: isDigit4,
|
|
1864
2427
|
inputRef
|
|
1865
2428
|
});
|
|
1866
|
-
return /* @__PURE__ */
|
|
2429
|
+
return /* @__PURE__ */ jsx29(
|
|
1867
2430
|
TextField,
|
|
1868
2431
|
{
|
|
1869
2432
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -1884,81 +2447,22 @@ var PhoneNumberInput = /* @__PURE__ */ forwardRef23(
|
|
|
1884
2447
|
}
|
|
1885
2448
|
);
|
|
1886
2449
|
|
|
1887
|
-
// src/components/Popover/Popover.tsx
|
|
1888
|
-
import * as RadixPopover from "@radix-ui/react-popover";
|
|
1889
|
-
import { XIcon as XIcon4 } from "@bestow-ui/icons";
|
|
1890
|
-
import { useId as useId5 } from "react";
|
|
1891
|
-
|
|
1892
|
-
// src/components/Popover/Popover.css.ts
|
|
1893
|
-
var arrow = "_1j99p8x4";
|
|
1894
|
-
var closeButton4 = "_1j99p8x3";
|
|
1895
|
-
var content9 = "_1j99p8x0";
|
|
1896
|
-
var header5 = "_1j99p8x1";
|
|
1897
|
-
var title4 = "_1j99p8x2";
|
|
1898
|
-
|
|
1899
|
-
// src/components/Popover/Popover.tsx
|
|
1900
|
-
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1901
|
-
function Popover2({
|
|
1902
|
-
content: content12,
|
|
1903
|
-
children,
|
|
1904
|
-
title: title6,
|
|
1905
|
-
"aria-label": ariaLabel,
|
|
1906
|
-
showClose = false,
|
|
1907
|
-
showArrow = false,
|
|
1908
|
-
side = "bottom",
|
|
1909
|
-
align = "center",
|
|
1910
|
-
open,
|
|
1911
|
-
defaultOpen,
|
|
1912
|
-
onOpenChange,
|
|
1913
|
-
modal,
|
|
1914
|
-
className,
|
|
1915
|
-
style
|
|
1916
|
-
}) {
|
|
1917
|
-
const portal2 = usePortalProps();
|
|
1918
|
-
const titleId = useId5();
|
|
1919
|
-
return /* @__PURE__ */ jsxs21(RadixPopover.Root, { open, defaultOpen, onOpenChange, modal, children: [
|
|
1920
|
-
/* @__PURE__ */ jsx26(RadixPopover.Trigger, { asChild: true, children }),
|
|
1921
|
-
/* @__PURE__ */ jsx26(RadixPopover.Portal, { children: /* @__PURE__ */ jsxs21(
|
|
1922
|
-
RadixPopover.Content,
|
|
1923
|
-
{
|
|
1924
|
-
side,
|
|
1925
|
-
align,
|
|
1926
|
-
sideOffset: 6,
|
|
1927
|
-
collisionPadding: 8,
|
|
1928
|
-
"aria-labelledby": title6 ? titleId : void 0,
|
|
1929
|
-
"aria-label": title6 ? void 0 : ariaLabel,
|
|
1930
|
-
className: cx(portal2.className, content9, className),
|
|
1931
|
-
style: { ...portal2.style, ...style },
|
|
1932
|
-
children: [
|
|
1933
|
-
(title6 || showClose) && /* @__PURE__ */ jsxs21("div", { className: header5, children: [
|
|
1934
|
-
title6 && /* @__PURE__ */ jsx26("h2", { id: titleId, className: title4, children: title6 }),
|
|
1935
|
-
showClose && /* @__PURE__ */ jsx26(RadixPopover.Close, { className: closeButton4, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx26(XIcon4, { size: 16 }) })
|
|
1936
|
-
] }),
|
|
1937
|
-
content12,
|
|
1938
|
-
showArrow && /* @__PURE__ */ jsx26(RadixPopover.Arrow, { className: arrow, width: 12, height: 6 })
|
|
1939
|
-
]
|
|
1940
|
-
}
|
|
1941
|
-
) })
|
|
1942
|
-
] });
|
|
1943
|
-
}
|
|
1944
|
-
var PopoverClose = RadixPopover.Close;
|
|
1945
|
-
|
|
1946
2450
|
// src/components/Progress/Progress.tsx
|
|
1947
|
-
import { forwardRef as
|
|
2451
|
+
import { forwardRef as forwardRef26, useId as useId7 } from "react";
|
|
1948
2452
|
|
|
1949
2453
|
// src/components/Progress/Progress.css.ts
|
|
1950
2454
|
import { createRuntimeFn as _7a46815 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
1951
|
-
var
|
|
2455
|
+
var header7 = "_1tvkq001";
|
|
1952
2456
|
var indicator = /* @__PURE__ */ _7a46815({ defaultClassName: "_1tvkq008", variantClassNames: { color: { primary: "_1tvkq009", neutral: "_1tvkq00a", success: "_1tvkq00b", warning: "_1tvkq00c", danger: "_1tvkq00d" } }, defaultVariants: { color: "primary" }, compoundVariants: [] });
|
|
1953
2457
|
var label3 = "_1tvkq002";
|
|
1954
|
-
var
|
|
2458
|
+
var root7 = "_1tvkq000";
|
|
1955
2459
|
var track = /* @__PURE__ */ _7a46815({ defaultClassName: "_1tvkq004", variantClassNames: { size: { sm: "_1tvkq005", md: "_1tvkq006", lg: "_1tvkq007" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
1956
2460
|
var value2 = "_1tvkq003";
|
|
1957
2461
|
|
|
1958
2462
|
// src/components/Progress/Progress.tsx
|
|
1959
|
-
import { jsx as
|
|
2463
|
+
import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1960
2464
|
var defaultFormat = (value4, max) => `${Math.round(value4 / max * 100)}%`;
|
|
1961
|
-
var Progress = /* @__PURE__ */
|
|
2465
|
+
var Progress = /* @__PURE__ */ forwardRef26(function Progress2({
|
|
1962
2466
|
value: value4,
|
|
1963
2467
|
max = 100,
|
|
1964
2468
|
label: label6,
|
|
@@ -1970,17 +2474,17 @@ var Progress = /* @__PURE__ */ forwardRef24(function Progress2({
|
|
|
1970
2474
|
className,
|
|
1971
2475
|
...rest
|
|
1972
2476
|
}, ref) {
|
|
1973
|
-
const labelId =
|
|
2477
|
+
const labelId = useId7();
|
|
1974
2478
|
const isIndeterminate = value4 === void 0 || value4 === null;
|
|
1975
2479
|
const safeMax = max > 0 ? max : 100;
|
|
1976
2480
|
const clamped = isIndeterminate ? 0 : Math.min(safeMax, Math.max(0, value4));
|
|
1977
2481
|
const valueText = isIndeterminate ? void 0 : formatValue(clamped, safeMax);
|
|
1978
|
-
return /* @__PURE__ */
|
|
1979
|
-
(label6 || showValue && valueText) && /* @__PURE__ */
|
|
1980
|
-
label6 && /* @__PURE__ */
|
|
1981
|
-
showValue && valueText && /* @__PURE__ */
|
|
2482
|
+
return /* @__PURE__ */ jsxs24("div", { ref, className: cx(root7, className), ...rest, children: [
|
|
2483
|
+
(label6 || showValue && valueText) && /* @__PURE__ */ jsxs24("div", { className: header7, children: [
|
|
2484
|
+
label6 && /* @__PURE__ */ jsx30("span", { id: labelId, className: label3, children: label6 }),
|
|
2485
|
+
showValue && valueText && /* @__PURE__ */ jsx30("span", { className: value2, "aria-hidden": true, children: valueText })
|
|
1982
2486
|
] }),
|
|
1983
|
-
/* @__PURE__ */
|
|
2487
|
+
/* @__PURE__ */ jsx30(
|
|
1984
2488
|
"div",
|
|
1985
2489
|
{
|
|
1986
2490
|
role: "progressbar",
|
|
@@ -1991,7 +2495,7 @@ var Progress = /* @__PURE__ */ forwardRef24(function Progress2({
|
|
|
1991
2495
|
"aria-valuenow": isIndeterminate ? void 0 : clamped,
|
|
1992
2496
|
"aria-valuetext": valueText,
|
|
1993
2497
|
className: track({ size }),
|
|
1994
|
-
children: /* @__PURE__ */
|
|
2498
|
+
children: /* @__PURE__ */ jsx30(
|
|
1995
2499
|
"div",
|
|
1996
2500
|
{
|
|
1997
2501
|
className: indicator({ color }),
|
|
@@ -2006,7 +2510,7 @@ var Progress = /* @__PURE__ */ forwardRef24(function Progress2({
|
|
|
2006
2510
|
|
|
2007
2511
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
2008
2512
|
import * as RadixRadioGroup from "@radix-ui/react-radio-group";
|
|
2009
|
-
import { forwardRef as
|
|
2513
|
+
import { forwardRef as forwardRef27, useId as useId8 } from "react";
|
|
2010
2514
|
|
|
2011
2515
|
// src/components/RadioGroup/RadioGroup.css.ts
|
|
2012
2516
|
import { createRuntimeFn as _7a46816 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -2020,8 +2524,8 @@ var radio = /* @__PURE__ */ _7a46816({ defaultClassName: "_1w9iwjm7", variantCla
|
|
|
2020
2524
|
var text = "_1w9iwjmb";
|
|
2021
2525
|
|
|
2022
2526
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
2023
|
-
import { jsx as
|
|
2024
|
-
var RadioGroup = /* @__PURE__ */
|
|
2527
|
+
import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2528
|
+
var RadioGroup = /* @__PURE__ */ forwardRef27(function RadioGroup2(props, ref) {
|
|
2025
2529
|
const {
|
|
2026
2530
|
options,
|
|
2027
2531
|
value: value4,
|
|
@@ -2040,16 +2544,16 @@ var RadioGroup = /* @__PURE__ */ forwardRef25(function RadioGroup2(props, ref) {
|
|
|
2040
2544
|
className
|
|
2041
2545
|
} = props;
|
|
2042
2546
|
const isControlled = "value" in props;
|
|
2043
|
-
const generatedId =
|
|
2547
|
+
const generatedId = useId8();
|
|
2044
2548
|
const baseId = id ?? generatedId;
|
|
2045
2549
|
const labelId = label6 ? `${baseId}-label` : void 0;
|
|
2046
2550
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
2047
|
-
return /* @__PURE__ */
|
|
2048
|
-
label6 && /* @__PURE__ */
|
|
2551
|
+
return /* @__PURE__ */ jsxs25("div", { className: cx(field, className), children: [
|
|
2552
|
+
label6 && /* @__PURE__ */ jsxs25("span", { id: labelId, className: cx(label, groupLabel), children: [
|
|
2049
2553
|
label6,
|
|
2050
|
-
required && /* @__PURE__ */
|
|
2554
|
+
required && /* @__PURE__ */ jsx31("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2051
2555
|
] }),
|
|
2052
|
-
/* @__PURE__ */
|
|
2556
|
+
/* @__PURE__ */ jsx31(
|
|
2053
2557
|
RadixRadioGroup.Root,
|
|
2054
2558
|
{
|
|
2055
2559
|
ref,
|
|
@@ -2070,8 +2574,8 @@ var RadioGroup = /* @__PURE__ */ forwardRef25(function RadioGroup2(props, ref) {
|
|
|
2070
2574
|
const itemId = `${baseId}-${option2.value}`;
|
|
2071
2575
|
const descriptionId = option2.description ? `${itemId}-description` : void 0;
|
|
2072
2576
|
const itemDisabled = disabled || option2.disabled;
|
|
2073
|
-
return /* @__PURE__ */
|
|
2074
|
-
/* @__PURE__ */
|
|
2577
|
+
return /* @__PURE__ */ jsxs25("div", { className: option({ size }), "data-disabled": itemDisabled || void 0, children: [
|
|
2578
|
+
/* @__PURE__ */ jsx31(
|
|
2075
2579
|
RadixRadioGroup.Item,
|
|
2076
2580
|
{
|
|
2077
2581
|
id: itemId,
|
|
@@ -2079,27 +2583,27 @@ var RadioGroup = /* @__PURE__ */ forwardRef25(function RadioGroup2(props, ref) {
|
|
|
2079
2583
|
disabled: option2.disabled,
|
|
2080
2584
|
"aria-describedby": descriptionId,
|
|
2081
2585
|
className: radio({ size }),
|
|
2082
|
-
children: /* @__PURE__ */
|
|
2586
|
+
children: /* @__PURE__ */ jsx31(RadixRadioGroup.Indicator, { className: indicator2 })
|
|
2083
2587
|
}
|
|
2084
2588
|
),
|
|
2085
|
-
/* @__PURE__ */
|
|
2086
|
-
/* @__PURE__ */
|
|
2087
|
-
option2.description && /* @__PURE__ */
|
|
2589
|
+
/* @__PURE__ */ jsxs25("span", { className: text, children: [
|
|
2590
|
+
/* @__PURE__ */ jsx31("label", { htmlFor: itemId, className: labelText, children: option2.label }),
|
|
2591
|
+
option2.description && /* @__PURE__ */ jsx31("span", { id: descriptionId, className: description4, children: option2.description })
|
|
2088
2592
|
] })
|
|
2089
2593
|
] }, option2.value);
|
|
2090
2594
|
})
|
|
2091
2595
|
}
|
|
2092
2596
|
),
|
|
2093
|
-
helperText3 && /* @__PURE__ */
|
|
2597
|
+
helperText3 && /* @__PURE__ */ jsx31("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
2094
2598
|
] });
|
|
2095
2599
|
});
|
|
2096
2600
|
|
|
2097
2601
|
// src/components/Select/Select.tsx
|
|
2098
2602
|
import * as RadixSelect from "@radix-ui/react-select";
|
|
2099
|
-
import { forwardRef as
|
|
2603
|
+
import { forwardRef as forwardRef28, useId as useId9 } from "react";
|
|
2100
2604
|
import { CheckIcon as CheckIcon2, ChevronDownIcon as ChevronDownIcon4 } from "@bestow-ui/icons";
|
|
2101
|
-
import { jsx as
|
|
2102
|
-
var Select = /* @__PURE__ */
|
|
2605
|
+
import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2606
|
+
var Select = /* @__PURE__ */ forwardRef28(function Select2(props, ref) {
|
|
2103
2607
|
const {
|
|
2104
2608
|
options,
|
|
2105
2609
|
value: value4,
|
|
@@ -2119,16 +2623,16 @@ var Select = /* @__PURE__ */ forwardRef26(function Select2(props, ref) {
|
|
|
2119
2623
|
className
|
|
2120
2624
|
} = props;
|
|
2121
2625
|
const isControlled = "value" in props;
|
|
2122
|
-
const generatedId =
|
|
2626
|
+
const generatedId = useId9();
|
|
2123
2627
|
const triggerId = id ?? generatedId;
|
|
2124
2628
|
const helperId = helperText3 ? `${triggerId}-helper` : void 0;
|
|
2125
2629
|
const portal2 = usePortalProps();
|
|
2126
|
-
return /* @__PURE__ */
|
|
2127
|
-
label6 && /* @__PURE__ */
|
|
2630
|
+
return /* @__PURE__ */ jsxs26("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
2631
|
+
label6 && /* @__PURE__ */ jsxs26("label", { htmlFor: triggerId, className: label, children: [
|
|
2128
2632
|
label6,
|
|
2129
|
-
required && /* @__PURE__ */
|
|
2633
|
+
required && /* @__PURE__ */ jsx32("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2130
2634
|
] }),
|
|
2131
|
-
/* @__PURE__ */
|
|
2635
|
+
/* @__PURE__ */ jsxs26(
|
|
2132
2636
|
RadixSelect.Root,
|
|
2133
2637
|
{
|
|
2134
2638
|
value: isControlled ? value4 ?? "" : void 0,
|
|
@@ -2138,7 +2642,7 @@ var Select = /* @__PURE__ */ forwardRef26(function Select2(props, ref) {
|
|
|
2138
2642
|
required,
|
|
2139
2643
|
name,
|
|
2140
2644
|
children: [
|
|
2141
|
-
/* @__PURE__ */
|
|
2645
|
+
/* @__PURE__ */ jsxs26(
|
|
2142
2646
|
RadixSelect.Trigger,
|
|
2143
2647
|
{
|
|
2144
2648
|
ref,
|
|
@@ -2149,12 +2653,12 @@ var Select = /* @__PURE__ */ forwardRef26(function Select2(props, ref) {
|
|
|
2149
2653
|
"data-invalid": error || void 0,
|
|
2150
2654
|
className: cx(root3({ size, fullWidth }), trigger2, className),
|
|
2151
2655
|
children: [
|
|
2152
|
-
/* @__PURE__ */
|
|
2153
|
-
/* @__PURE__ */
|
|
2656
|
+
/* @__PURE__ */ jsx32("span", { className: value, children: /* @__PURE__ */ jsx32(RadixSelect.Value, { placeholder }) }),
|
|
2657
|
+
/* @__PURE__ */ jsx32(RadixSelect.Icon, { className: icon4, children: /* @__PURE__ */ jsx32(ChevronDownIcon4, { size: 16 }) })
|
|
2154
2658
|
]
|
|
2155
2659
|
}
|
|
2156
2660
|
),
|
|
2157
|
-
/* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ jsx32(RadixSelect.Portal, { children: /* @__PURE__ */ jsx32(
|
|
2158
2662
|
RadixSelect.Content,
|
|
2159
2663
|
{
|
|
2160
2664
|
position: "popper",
|
|
@@ -2162,15 +2666,15 @@ var Select = /* @__PURE__ */ forwardRef26(function Select2(props, ref) {
|
|
|
2162
2666
|
collisionPadding: 8,
|
|
2163
2667
|
className: cx(portal2.className, content5),
|
|
2164
2668
|
style: portal2.style,
|
|
2165
|
-
children: /* @__PURE__ */
|
|
2669
|
+
children: /* @__PURE__ */ jsx32(RadixSelect.Viewport, { className: viewport, children: options.map((option2) => /* @__PURE__ */ jsxs26(
|
|
2166
2670
|
RadixSelect.Item,
|
|
2167
2671
|
{
|
|
2168
2672
|
value: option2.value,
|
|
2169
2673
|
disabled: option2.disabled,
|
|
2170
2674
|
className: item4,
|
|
2171
2675
|
children: [
|
|
2172
|
-
/* @__PURE__ */
|
|
2173
|
-
/* @__PURE__ */
|
|
2676
|
+
/* @__PURE__ */ jsx32(RadixSelect.ItemText, { children: option2.label }),
|
|
2677
|
+
/* @__PURE__ */ jsx32(RadixSelect.ItemIndicator, { className: itemIndicator, children: /* @__PURE__ */ jsx32(CheckIcon2, { size: 16 }) })
|
|
2174
2678
|
]
|
|
2175
2679
|
},
|
|
2176
2680
|
option2.value
|
|
@@ -2180,13 +2684,13 @@ var Select = /* @__PURE__ */ forwardRef26(function Select2(props, ref) {
|
|
|
2180
2684
|
]
|
|
2181
2685
|
}
|
|
2182
2686
|
),
|
|
2183
|
-
helperText3 && /* @__PURE__ */
|
|
2687
|
+
helperText3 && /* @__PURE__ */ jsx32("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
2184
2688
|
] });
|
|
2185
2689
|
});
|
|
2186
2690
|
|
|
2187
2691
|
// src/components/Skeleton/Skeleton.tsx
|
|
2188
2692
|
import { assignInlineVars as assignInlineVars2 } from "@vanilla-extract/dynamic";
|
|
2189
|
-
import { forwardRef as
|
|
2693
|
+
import { forwardRef as forwardRef29 } from "react";
|
|
2190
2694
|
|
|
2191
2695
|
// src/components/Skeleton/Skeleton.css.ts
|
|
2192
2696
|
import { createRuntimeFn as _7a46817 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -2196,13 +2700,13 @@ var skeleton = /* @__PURE__ */ _7a46817({ defaultClassName: "_1s8datd2", variant
|
|
|
2196
2700
|
var width = "var(--_1s8datd0)";
|
|
2197
2701
|
|
|
2198
2702
|
// src/components/Skeleton/Skeleton.tsx
|
|
2199
|
-
import { jsx as
|
|
2703
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2200
2704
|
var toCss = (value4) => typeof value4 === "number" ? `${value4}px` : value4;
|
|
2201
|
-
var Skeleton = /* @__PURE__ */
|
|
2705
|
+
var Skeleton = /* @__PURE__ */ forwardRef29(function Skeleton2({ variant = "text", width: width2, height: height2, lines: lines2 = 1, className, style, ...rest }, ref) {
|
|
2202
2706
|
const w = toCss(width2 ?? (variant === "circle" ? 40 : "100%"));
|
|
2203
2707
|
const h = toCss(height2 ?? (variant === "circle" ? w : variant === "rect" ? 100 : "1em"));
|
|
2204
2708
|
if (variant === "text" && lines2 > 1) {
|
|
2205
|
-
return /* @__PURE__ */
|
|
2709
|
+
return /* @__PURE__ */ jsx33(
|
|
2206
2710
|
"span",
|
|
2207
2711
|
{
|
|
2208
2712
|
ref,
|
|
@@ -2210,7 +2714,7 @@ var Skeleton = /* @__PURE__ */ forwardRef27(function Skeleton2({ variant = "text
|
|
|
2210
2714
|
className: cx(lines, className),
|
|
2211
2715
|
style: { ...assignInlineVars2({ [width]: w }), ...style },
|
|
2212
2716
|
...rest,
|
|
2213
|
-
children: Array.from({ length: lines2 }, (_, i) => /* @__PURE__ */
|
|
2717
|
+
children: Array.from({ length: lines2 }, (_, i) => /* @__PURE__ */ jsx33(
|
|
2214
2718
|
"span",
|
|
2215
2719
|
{
|
|
2216
2720
|
className: skeleton({ variant }),
|
|
@@ -2221,7 +2725,7 @@ var Skeleton = /* @__PURE__ */ forwardRef27(function Skeleton2({ variant = "text
|
|
|
2221
2725
|
}
|
|
2222
2726
|
);
|
|
2223
2727
|
}
|
|
2224
|
-
return /* @__PURE__ */
|
|
2728
|
+
return /* @__PURE__ */ jsx33(
|
|
2225
2729
|
"span",
|
|
2226
2730
|
{
|
|
2227
2731
|
ref,
|
|
@@ -2235,23 +2739,23 @@ var Skeleton = /* @__PURE__ */ forwardRef27(function Skeleton2({ variant = "text
|
|
|
2235
2739
|
|
|
2236
2740
|
// src/components/Slider/Slider.tsx
|
|
2237
2741
|
import * as RadixSlider from "@radix-ui/react-slider";
|
|
2238
|
-
import { forwardRef as
|
|
2742
|
+
import { forwardRef as forwardRef30, useId as useId10, useState as useState9 } from "react";
|
|
2239
2743
|
|
|
2240
2744
|
// src/components/Slider/Slider.css.ts
|
|
2241
2745
|
import { createRuntimeFn as _7a46818 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2242
2746
|
var field2 = "_126mzjm0";
|
|
2243
|
-
var
|
|
2747
|
+
var header8 = "_126mzjm1";
|
|
2244
2748
|
var helperText2 = "_126mzjm4";
|
|
2245
2749
|
var label4 = "_126mzjm2";
|
|
2246
2750
|
var range2 = "_126mzjmb";
|
|
2247
|
-
var
|
|
2751
|
+
var root8 = /* @__PURE__ */ _7a46818({ defaultClassName: "_126mzjm5", variantClassNames: { size: { sm: "_126mzjm6", md: "_126mzjm7" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2248
2752
|
var thumb = /* @__PURE__ */ _7a46818({ defaultClassName: "_126mzjmc", variantClassNames: { size: { sm: "_126mzjmd", md: "_126mzjme" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2249
2753
|
var track2 = /* @__PURE__ */ _7a46818({ defaultClassName: "_126mzjm8", variantClassNames: { size: { sm: "_126mzjm9", md: "_126mzjma" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2250
2754
|
var value3 = "_126mzjm3";
|
|
2251
2755
|
|
|
2252
2756
|
// src/components/Slider/Slider.tsx
|
|
2253
|
-
import { jsx as
|
|
2254
|
-
var Slider = /* @__PURE__ */
|
|
2757
|
+
import { jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2758
|
+
var Slider = /* @__PURE__ */ forwardRef30(function Slider2(props, ref) {
|
|
2255
2759
|
const {
|
|
2256
2760
|
value: value4,
|
|
2257
2761
|
defaultValue,
|
|
@@ -2263,19 +2767,21 @@ var Slider = /* @__PURE__ */ forwardRef28(function Slider2(props, ref) {
|
|
|
2263
2767
|
helperText: helperText3,
|
|
2264
2768
|
showValue,
|
|
2265
2769
|
formatValue = String,
|
|
2266
|
-
thumbLabels
|
|
2770
|
+
thumbLabels: thumbLabelsProp,
|
|
2267
2771
|
size,
|
|
2268
2772
|
id,
|
|
2269
2773
|
className,
|
|
2270
2774
|
disabled,
|
|
2271
2775
|
...rest
|
|
2272
2776
|
} = props;
|
|
2273
|
-
const
|
|
2777
|
+
const m = useMessages();
|
|
2778
|
+
const thumbLabels = thumbLabelsProp ?? [m.rangeStart ?? "\uCD5C\uC18C", m.rangeEnd ?? "\uCD5C\uB300"];
|
|
2779
|
+
const generatedId = useId10();
|
|
2274
2780
|
const baseId = id ?? generatedId;
|
|
2275
2781
|
const labelId = `${baseId}-label`;
|
|
2276
2782
|
const helperId = `${baseId}-helper`;
|
|
2277
2783
|
const isControlled = "value" in props;
|
|
2278
|
-
const [innerValue, setInnerValue] =
|
|
2784
|
+
const [innerValue, setInnerValue] = useState9(defaultValue ?? [min]);
|
|
2279
2785
|
const current2 = isControlled ? value4 ?? [min] : innerValue;
|
|
2280
2786
|
const isRange = current2.length > 1;
|
|
2281
2787
|
const handleChange = (next) => {
|
|
@@ -2283,12 +2789,12 @@ var Slider = /* @__PURE__ */ forwardRef28(function Slider2(props, ref) {
|
|
|
2283
2789
|
onValueChange?.(next);
|
|
2284
2790
|
};
|
|
2285
2791
|
const valueText = current2.map(formatValue).join(" \u2013 ");
|
|
2286
|
-
return /* @__PURE__ */
|
|
2287
|
-
(label6 || showValue) && /* @__PURE__ */
|
|
2288
|
-
label6 && /* @__PURE__ */
|
|
2289
|
-
showValue && /* @__PURE__ */
|
|
2792
|
+
return /* @__PURE__ */ jsxs27("div", { className: cx(field2, className), children: [
|
|
2793
|
+
(label6 || showValue) && /* @__PURE__ */ jsxs27("div", { className: header8, children: [
|
|
2794
|
+
label6 && /* @__PURE__ */ jsx34("span", { id: labelId, className: label4, children: label6 }),
|
|
2795
|
+
showValue && /* @__PURE__ */ jsx34("span", { className: value3, "aria-hidden": true, children: valueText })
|
|
2290
2796
|
] }),
|
|
2291
|
-
/* @__PURE__ */
|
|
2797
|
+
/* @__PURE__ */ jsxs27(
|
|
2292
2798
|
RadixSlider.Root,
|
|
2293
2799
|
{
|
|
2294
2800
|
ref,
|
|
@@ -2298,13 +2804,13 @@ var Slider = /* @__PURE__ */ forwardRef28(function Slider2(props, ref) {
|
|
|
2298
2804
|
disabled,
|
|
2299
2805
|
value: current2,
|
|
2300
2806
|
onValueChange: handleChange,
|
|
2301
|
-
className:
|
|
2807
|
+
className: root8({ size }),
|
|
2302
2808
|
...rest,
|
|
2303
2809
|
children: [
|
|
2304
|
-
/* @__PURE__ */
|
|
2810
|
+
/* @__PURE__ */ jsx34(RadixSlider.Track, { className: track2({ size }), children: /* @__PURE__ */ jsx34(RadixSlider.Range, { className: range2 }) }),
|
|
2305
2811
|
current2.map((thumbValue, index) => {
|
|
2306
2812
|
const thumbLabelId = `${baseId}-thumb-${index}`;
|
|
2307
|
-
return /* @__PURE__ */
|
|
2813
|
+
return /* @__PURE__ */ jsx34(
|
|
2308
2814
|
RadixSlider.Thumb,
|
|
2309
2815
|
{
|
|
2310
2816
|
className: thumb({ size }),
|
|
@@ -2319,45 +2825,45 @@ var Slider = /* @__PURE__ */ forwardRef28(function Slider2(props, ref) {
|
|
|
2319
2825
|
]
|
|
2320
2826
|
}
|
|
2321
2827
|
),
|
|
2322
|
-
isRange && current2.map((_, index) => /* @__PURE__ */
|
|
2828
|
+
isRange && current2.map((_, index) => /* @__PURE__ */ jsxs27("span", { id: `${baseId}-thumb-${index}`, hidden: true, children: [
|
|
2323
2829
|
label6 ? "" : ariaLabel ? `${ariaLabel} ` : "",
|
|
2324
2830
|
thumbLabels[index] ?? `${index + 1}`
|
|
2325
2831
|
] }, index)),
|
|
2326
|
-
helperText3 && /* @__PURE__ */
|
|
2832
|
+
helperText3 && /* @__PURE__ */ jsx34("span", { id: helperId, className: helperText2, children: helperText3 })
|
|
2327
2833
|
] });
|
|
2328
2834
|
});
|
|
2329
2835
|
|
|
2330
2836
|
// src/components/Stack/Stack.tsx
|
|
2331
|
-
import { forwardRef as
|
|
2837
|
+
import { forwardRef as forwardRef31 } from "react";
|
|
2332
2838
|
|
|
2333
2839
|
// src/components/Stack/Stack.css.ts
|
|
2334
2840
|
import { createRuntimeFn as _7a46819 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2335
2841
|
var stack = /* @__PURE__ */ _7a46819({ 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: [] });
|
|
2336
2842
|
|
|
2337
2843
|
// src/components/Stack/Stack.tsx
|
|
2338
|
-
import { jsx as
|
|
2339
|
-
var Stack = /* @__PURE__ */
|
|
2340
|
-
return /* @__PURE__ */
|
|
2844
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2845
|
+
var Stack = /* @__PURE__ */ forwardRef31(function Stack2({ as: Component = "div", direction, gap, align, justify, wrap, className, ...rest }, ref) {
|
|
2846
|
+
return /* @__PURE__ */ jsx35(Component, { ref, className: cx(stack({ direction, gap, align, justify, wrap }), className), ...rest });
|
|
2341
2847
|
});
|
|
2342
2848
|
|
|
2343
2849
|
// src/components/Switch/Switch.tsx
|
|
2344
2850
|
import * as RadixSwitch from "@radix-ui/react-switch";
|
|
2345
|
-
import { forwardRef as
|
|
2851
|
+
import { forwardRef as forwardRef32, useId as useId11 } from "react";
|
|
2346
2852
|
|
|
2347
2853
|
// src/components/Switch/Switch.css.ts
|
|
2348
2854
|
import { createRuntimeFn as _7a46820 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2349
2855
|
var label5 = "o33ul29";
|
|
2350
|
-
var
|
|
2856
|
+
var root9 = /* @__PURE__ */ _7a46820({ defaultClassName: "o33ul20", variantClassNames: { size: { sm: "o33ul21", md: "o33ul22" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2351
2857
|
var thumb2 = /* @__PURE__ */ _7a46820({ defaultClassName: "o33ul26", variantClassNames: { size: { sm: "o33ul27", md: "o33ul28" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2352
2858
|
var track3 = /* @__PURE__ */ _7a46820({ defaultClassName: "o33ul23", variantClassNames: { size: { sm: "o33ul24", md: "o33ul25" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2353
2859
|
|
|
2354
2860
|
// src/components/Switch/Switch.tsx
|
|
2355
|
-
import { jsx as
|
|
2356
|
-
var Switch = /* @__PURE__ */
|
|
2357
|
-
const generatedId =
|
|
2861
|
+
import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2862
|
+
var Switch = /* @__PURE__ */ forwardRef32(function Switch2({ label: label6, size, id, className, disabled, "aria-label": ariaLabel, ...rest }, ref) {
|
|
2863
|
+
const generatedId = useId11();
|
|
2358
2864
|
const switchId = id ?? generatedId;
|
|
2359
|
-
return /* @__PURE__ */
|
|
2360
|
-
/* @__PURE__ */
|
|
2865
|
+
return /* @__PURE__ */ jsxs28("span", { className: cx(root9({ size }), className), "data-disabled": disabled || void 0, children: [
|
|
2866
|
+
/* @__PURE__ */ jsx36(
|
|
2361
2867
|
RadixSwitch.Root,
|
|
2362
2868
|
{
|
|
2363
2869
|
ref,
|
|
@@ -2366,19 +2872,19 @@ var Switch = /* @__PURE__ */ forwardRef30(function Switch2({ label: label6, size
|
|
|
2366
2872
|
"aria-label": ariaLabel,
|
|
2367
2873
|
className: track3({ size }),
|
|
2368
2874
|
...rest,
|
|
2369
|
-
children: /* @__PURE__ */
|
|
2875
|
+
children: /* @__PURE__ */ jsx36(RadixSwitch.Thumb, { className: thumb2({ size }) })
|
|
2370
2876
|
}
|
|
2371
2877
|
),
|
|
2372
|
-
label6 && /* @__PURE__ */
|
|
2878
|
+
label6 && /* @__PURE__ */ jsx36("label", { htmlFor: switchId, className: label5, children: label6 })
|
|
2373
2879
|
] });
|
|
2374
2880
|
});
|
|
2375
2881
|
|
|
2376
2882
|
// src/components/Table/Table.tsx
|
|
2377
2883
|
import {
|
|
2378
|
-
createContext as
|
|
2379
|
-
forwardRef as
|
|
2380
|
-
useContext as
|
|
2381
|
-
useId as
|
|
2884
|
+
createContext as createContext3,
|
|
2885
|
+
forwardRef as forwardRef33,
|
|
2886
|
+
useContext as useContext3,
|
|
2887
|
+
useId as useId12
|
|
2382
2888
|
} from "react";
|
|
2383
2889
|
import { ArrowDownIcon, ArrowUpIcon } from "@bestow-ui/icons";
|
|
2384
2890
|
|
|
@@ -2386,12 +2892,12 @@ import { ArrowDownIcon, ArrowUpIcon } from "@bestow-ui/icons";
|
|
|
2386
2892
|
import { createRuntimeFn as _7a46821 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2387
2893
|
var body4 = "l3ploy5";
|
|
2388
2894
|
var caption = "l3ploy2";
|
|
2389
|
-
var
|
|
2895
|
+
var cell2 = /* @__PURE__ */ _7a46821({ defaultClassName: "l3ploy9", variantClassNames: { size: { sm: "l3ploya", md: "l3ployb" }, align: { left: "l3ployc", center: "l3ployd", right: "l3ploye" } }, defaultVariants: { size: "md", align: "left" }, compoundVariants: [] });
|
|
2390
2896
|
var container = "l3ploy0";
|
|
2391
2897
|
var footer4 = "l3ploy7";
|
|
2392
2898
|
var footerCell = "l3ployg";
|
|
2393
2899
|
var head = "l3ployf";
|
|
2394
|
-
var
|
|
2900
|
+
var header9 = "l3ploy3";
|
|
2395
2901
|
var row3 = "l3ploy8";
|
|
2396
2902
|
var sortButton = "l3ployh";
|
|
2397
2903
|
var sortIcon = "l3ployi";
|
|
@@ -2400,10 +2906,10 @@ var striped = "l3ploy6";
|
|
|
2400
2906
|
var table = "l3ploy1";
|
|
2401
2907
|
|
|
2402
2908
|
// src/components/Table/Table.tsx
|
|
2403
|
-
import { jsx as
|
|
2404
|
-
var TableSizeContext = /* @__PURE__ */
|
|
2405
|
-
var TableSectionContext = /* @__PURE__ */
|
|
2406
|
-
var Table = /* @__PURE__ */
|
|
2909
|
+
import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2910
|
+
var TableSizeContext = /* @__PURE__ */ createContext3("md");
|
|
2911
|
+
var TableSectionContext = /* @__PURE__ */ createContext3("body");
|
|
2912
|
+
var Table = /* @__PURE__ */ forwardRef33(function Table2({
|
|
2407
2913
|
size = "md",
|
|
2408
2914
|
striped: striped2,
|
|
2409
2915
|
stickyHeader: stickyHeader2,
|
|
@@ -2415,8 +2921,8 @@ var Table = /* @__PURE__ */ forwardRef31(function Table2({
|
|
|
2415
2921
|
children,
|
|
2416
2922
|
...rest
|
|
2417
2923
|
}, ref) {
|
|
2418
|
-
const captionId =
|
|
2419
|
-
return /* @__PURE__ */
|
|
2924
|
+
const captionId = useId12();
|
|
2925
|
+
return /* @__PURE__ */ jsx37(TableSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx37(
|
|
2420
2926
|
"div",
|
|
2421
2927
|
{
|
|
2422
2928
|
className: cx(container, containerClassName),
|
|
@@ -2425,7 +2931,7 @@ var Table = /* @__PURE__ */ forwardRef31(function Table2({
|
|
|
2425
2931
|
role: "region",
|
|
2426
2932
|
"aria-labelledby": caption2 ? captionId : void 0,
|
|
2427
2933
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
2428
|
-
children: /* @__PURE__ */
|
|
2934
|
+
children: /* @__PURE__ */ jsxs29(
|
|
2429
2935
|
"table",
|
|
2430
2936
|
{
|
|
2431
2937
|
ref,
|
|
@@ -2433,7 +2939,7 @@ var Table = /* @__PURE__ */ forwardRef31(function Table2({
|
|
|
2433
2939
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
2434
2940
|
...rest,
|
|
2435
2941
|
children: [
|
|
2436
|
-
caption2 && /* @__PURE__ */
|
|
2942
|
+
caption2 && /* @__PURE__ */ jsx37("caption", { id: captionId, className: caption, children: caption2 }),
|
|
2437
2943
|
children
|
|
2438
2944
|
]
|
|
2439
2945
|
}
|
|
@@ -2441,57 +2947,57 @@ var Table = /* @__PURE__ */ forwardRef31(function Table2({
|
|
|
2441
2947
|
}
|
|
2442
2948
|
) });
|
|
2443
2949
|
});
|
|
2444
|
-
var TableHeader = /* @__PURE__ */
|
|
2950
|
+
var TableHeader = /* @__PURE__ */ forwardRef33(
|
|
2445
2951
|
function TableHeader2({ className, ...rest }, ref) {
|
|
2446
|
-
return /* @__PURE__ */
|
|
2952
|
+
return /* @__PURE__ */ jsx37(TableSectionContext.Provider, { value: "header", children: /* @__PURE__ */ jsx37("thead", { ref, className: cx(header9, className), ...rest }) });
|
|
2447
2953
|
}
|
|
2448
2954
|
);
|
|
2449
|
-
var TableBody = /* @__PURE__ */
|
|
2955
|
+
var TableBody = /* @__PURE__ */ forwardRef33(
|
|
2450
2956
|
function TableBody2({ className, ...rest }, ref) {
|
|
2451
|
-
return /* @__PURE__ */
|
|
2957
|
+
return /* @__PURE__ */ jsx37(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx37("tbody", { ref, className: cx(body4, className), ...rest }) });
|
|
2452
2958
|
}
|
|
2453
2959
|
);
|
|
2454
|
-
var TableFooter = /* @__PURE__ */
|
|
2960
|
+
var TableFooter = /* @__PURE__ */ forwardRef33(
|
|
2455
2961
|
function TableFooter2({ className, ...rest }, ref) {
|
|
2456
|
-
return /* @__PURE__ */
|
|
2962
|
+
return /* @__PURE__ */ jsx37(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx37("tfoot", { ref, className: cx(footer4, className), ...rest }) });
|
|
2457
2963
|
}
|
|
2458
2964
|
);
|
|
2459
|
-
var TableRow = /* @__PURE__ */
|
|
2460
|
-
return /* @__PURE__ */
|
|
2965
|
+
var TableRow = /* @__PURE__ */ forwardRef33(function TableRow2({ selected, className, ...rest }, ref) {
|
|
2966
|
+
return /* @__PURE__ */ jsx37("tr", { ref, className: cx(row3, className), "data-state": selected ? "selected" : void 0, ...rest });
|
|
2461
2967
|
});
|
|
2462
|
-
var TableHead = /* @__PURE__ */
|
|
2463
|
-
const size =
|
|
2464
|
-
const section =
|
|
2968
|
+
var TableHead = /* @__PURE__ */ forwardRef33(function TableHead2({ align, sortDirection, onSort, scope, className, children, ...rest }, ref) {
|
|
2969
|
+
const size = useContext3(TableSizeContext);
|
|
2970
|
+
const section = useContext3(TableSectionContext);
|
|
2465
2971
|
const sortable = onSort !== void 0;
|
|
2466
2972
|
const direction = sortDirection ?? "none";
|
|
2467
2973
|
const SortIcon = direction === "descending" ? ArrowDownIcon : ArrowUpIcon;
|
|
2468
|
-
return /* @__PURE__ */
|
|
2974
|
+
return /* @__PURE__ */ jsx37(
|
|
2469
2975
|
"th",
|
|
2470
2976
|
{
|
|
2471
2977
|
ref,
|
|
2472
2978
|
scope: scope ?? (section === "header" ? "col" : "row"),
|
|
2473
2979
|
"aria-sort": sortable && direction !== "none" ? direction : void 0,
|
|
2474
2980
|
className: cx(
|
|
2475
|
-
|
|
2981
|
+
cell2({ size, align }),
|
|
2476
2982
|
section === "header" ? head : section === "footer" ? footerCell : void 0,
|
|
2477
2983
|
className
|
|
2478
2984
|
),
|
|
2479
2985
|
...rest,
|
|
2480
|
-
children: sortable ? /* @__PURE__ */
|
|
2986
|
+
children: sortable ? /* @__PURE__ */ jsxs29("button", { type: "button", className: sortButton, onClick: onSort, children: [
|
|
2481
2987
|
children,
|
|
2482
|
-
/* @__PURE__ */
|
|
2988
|
+
/* @__PURE__ */ jsx37(SortIcon, { size: 14, className: sortIcon, "data-active": direction !== "none", "aria-hidden": true })
|
|
2483
2989
|
] }) : children
|
|
2484
2990
|
}
|
|
2485
2991
|
);
|
|
2486
2992
|
});
|
|
2487
|
-
var TableCell = /* @__PURE__ */
|
|
2488
|
-
const size =
|
|
2489
|
-
const section =
|
|
2490
|
-
return /* @__PURE__ */
|
|
2993
|
+
var TableCell = /* @__PURE__ */ forwardRef33(function TableCell2({ align, className, ...rest }, ref) {
|
|
2994
|
+
const size = useContext3(TableSizeContext);
|
|
2995
|
+
const section = useContext3(TableSectionContext);
|
|
2996
|
+
return /* @__PURE__ */ jsx37(
|
|
2491
2997
|
"td",
|
|
2492
2998
|
{
|
|
2493
2999
|
ref,
|
|
2494
|
-
className: cx(
|
|
3000
|
+
className: cx(cell2({ size, align }), section === "footer" && footerCell, className),
|
|
2495
3001
|
...rest
|
|
2496
3002
|
}
|
|
2497
3003
|
);
|
|
@@ -2499,7 +3005,7 @@ var TableCell = /* @__PURE__ */ forwardRef31(function TableCell2({ align, classN
|
|
|
2499
3005
|
|
|
2500
3006
|
// src/components/Tabs/Tabs.tsx
|
|
2501
3007
|
import * as RadixTabs from "@radix-ui/react-tabs";
|
|
2502
|
-
import { createContext as
|
|
3008
|
+
import { createContext as createContext4, forwardRef as forwardRef34, useContext as useContext4 } from "react";
|
|
2503
3009
|
|
|
2504
3010
|
// src/components/Tabs/Tabs.css.ts
|
|
2505
3011
|
import { createRuntimeFn as _7a46822 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -2508,33 +3014,33 @@ var list4 = /* @__PURE__ */ _7a46822({ defaultClassName: "fvhbtd0", variantClass
|
|
|
2508
3014
|
var trigger3 = /* @__PURE__ */ _7a46822({ 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"]] });
|
|
2509
3015
|
|
|
2510
3016
|
// src/components/Tabs/Tabs.tsx
|
|
2511
|
-
import { jsx as
|
|
2512
|
-
var TabsStyleContext = /* @__PURE__ */
|
|
2513
|
-
var Tabs = /* @__PURE__ */
|
|
3017
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3018
|
+
var TabsStyleContext = /* @__PURE__ */ createContext4({ variant: "line", size: "md" });
|
|
3019
|
+
var Tabs = /* @__PURE__ */ forwardRef34(function Tabs2({ variant = "line", size = "md", ...props }, ref) {
|
|
2514
3020
|
const controlled = "value" in props ? { value: props.value ?? "" } : {};
|
|
2515
|
-
return /* @__PURE__ */
|
|
3021
|
+
return /* @__PURE__ */ jsx38(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx38(RadixTabs.Root, { ref, ...props, ...controlled }) });
|
|
2516
3022
|
});
|
|
2517
|
-
var TabsList = /* @__PURE__ */
|
|
2518
|
-
const { variant } =
|
|
2519
|
-
return /* @__PURE__ */
|
|
3023
|
+
var TabsList = /* @__PURE__ */ forwardRef34(function TabsList2({ className, ...rest }, ref) {
|
|
3024
|
+
const { variant } = useContext4(TabsStyleContext);
|
|
3025
|
+
return /* @__PURE__ */ jsx38(RadixTabs.List, { ref, className: cx(list4({ variant }), className), ...rest });
|
|
2520
3026
|
});
|
|
2521
|
-
var TabsTrigger = /* @__PURE__ */
|
|
2522
|
-
const { variant, size } =
|
|
2523
|
-
return /* @__PURE__ */
|
|
3027
|
+
var TabsTrigger = /* @__PURE__ */ forwardRef34(function TabsTrigger2({ className, ...rest }, ref) {
|
|
3028
|
+
const { variant, size } = useContext4(TabsStyleContext);
|
|
3029
|
+
return /* @__PURE__ */ jsx38(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
|
|
2524
3030
|
});
|
|
2525
|
-
var TabsContent = /* @__PURE__ */
|
|
2526
|
-
return /* @__PURE__ */
|
|
3031
|
+
var TabsContent = /* @__PURE__ */ forwardRef34(function TabsContent2({ className, ...rest }, ref) {
|
|
3032
|
+
return /* @__PURE__ */ jsx38(RadixTabs.Content, { ref, className: cx(content10, className), ...rest });
|
|
2527
3033
|
});
|
|
2528
3034
|
|
|
2529
3035
|
// src/components/Textarea/Textarea.tsx
|
|
2530
3036
|
import {
|
|
2531
|
-
forwardRef as
|
|
3037
|
+
forwardRef as forwardRef35,
|
|
2532
3038
|
useCallback,
|
|
2533
|
-
useEffect as
|
|
2534
|
-
useId as
|
|
3039
|
+
useEffect as useEffect6,
|
|
3040
|
+
useId as useId13,
|
|
2535
3041
|
useLayoutEffect as useLayoutEffect2,
|
|
2536
|
-
useRef as
|
|
2537
|
-
useState as
|
|
3042
|
+
useRef as useRef11,
|
|
3043
|
+
useState as useState10
|
|
2538
3044
|
} from "react";
|
|
2539
3045
|
|
|
2540
3046
|
// src/components/Textarea/Textarea.css.ts
|
|
@@ -2546,9 +3052,9 @@ var footer5 = "_1koawa8";
|
|
|
2546
3052
|
var textarea = /* @__PURE__ */ _7a46823({ defaultClassName: "_1koawa0", variantClassNames: { size: { sm: "_1koawa1", md: "_1koawa2", lg: "_1koawa3" }, resize: { none: "_1koawa4", vertical: "_1koawa5", both: "_1koawa6" } }, defaultVariants: { size: "md", resize: "vertical" }, compoundVariants: [] });
|
|
2547
3053
|
|
|
2548
3054
|
// src/components/Textarea/Textarea.tsx
|
|
2549
|
-
import { jsx as
|
|
2550
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect2 :
|
|
2551
|
-
var Textarea = /* @__PURE__ */
|
|
3055
|
+
import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3056
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect2 : useEffect6;
|
|
3057
|
+
var Textarea = /* @__PURE__ */ forwardRef35(function Textarea2({
|
|
2552
3058
|
label: label6,
|
|
2553
3059
|
helperText: helperText3,
|
|
2554
3060
|
error,
|
|
@@ -2569,11 +3075,11 @@ var Textarea = /* @__PURE__ */ forwardRef33(function Textarea2({
|
|
|
2569
3075
|
"aria-describedby": ariaDescribedBy,
|
|
2570
3076
|
...rest
|
|
2571
3077
|
}, ref) {
|
|
2572
|
-
const generatedId =
|
|
3078
|
+
const generatedId = useId13();
|
|
2573
3079
|
const textareaId = id ?? generatedId;
|
|
2574
3080
|
const helperId = helperText3 ? `${textareaId}-helper` : void 0;
|
|
2575
|
-
const innerRef =
|
|
2576
|
-
const [uncontrolledLength, setUncontrolledLength] =
|
|
3081
|
+
const innerRef = useRef11(null);
|
|
3082
|
+
const [uncontrolledLength, setUncontrolledLength] = useState10(() => String(defaultValue ?? "").length);
|
|
2577
3083
|
const length = value4 !== void 0 ? String(value4).length : uncontrolledLength;
|
|
2578
3084
|
const fitHeight = useCallback(() => {
|
|
2579
3085
|
const el = innerRef.current;
|
|
@@ -2588,12 +3094,12 @@ var Textarea = /* @__PURE__ */ forwardRef33(function Textarea2({
|
|
|
2588
3094
|
fitHeight();
|
|
2589
3095
|
onChange?.(event);
|
|
2590
3096
|
};
|
|
2591
|
-
return /* @__PURE__ */
|
|
2592
|
-
label6 && /* @__PURE__ */
|
|
3097
|
+
return /* @__PURE__ */ jsxs30("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
3098
|
+
label6 && /* @__PURE__ */ jsxs30("label", { htmlFor: textareaId, className: label, children: [
|
|
2593
3099
|
label6,
|
|
2594
|
-
required && /* @__PURE__ */
|
|
3100
|
+
required && /* @__PURE__ */ jsx39("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2595
3101
|
] }),
|
|
2596
|
-
/* @__PURE__ */
|
|
3102
|
+
/* @__PURE__ */ jsx39(
|
|
2597
3103
|
"textarea",
|
|
2598
3104
|
{
|
|
2599
3105
|
ref: mergeRefs(innerRef, ref),
|
|
@@ -2615,38 +3121,46 @@ var Textarea = /* @__PURE__ */ forwardRef33(function Textarea2({
|
|
|
2615
3121
|
...rest
|
|
2616
3122
|
}
|
|
2617
3123
|
),
|
|
2618
|
-
(helperText3 || showCount) && /* @__PURE__ */
|
|
2619
|
-
helperText3 && /* @__PURE__ */
|
|
2620
|
-
showCount && /* @__PURE__ */
|
|
3124
|
+
(helperText3 || showCount) && /* @__PURE__ */ jsxs30("div", { className: footer5, children: [
|
|
3125
|
+
helperText3 && /* @__PURE__ */ jsx39("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
|
|
3126
|
+
showCount && /* @__PURE__ */ jsx39("span", { className: cx(count, maxLength !== void 0 && length >= maxLength && countOver), children: maxLength !== void 0 ? `${length}/${maxLength}` : length })
|
|
2621
3127
|
] })
|
|
2622
3128
|
] });
|
|
2623
3129
|
});
|
|
2624
3130
|
|
|
2625
3131
|
// src/components/Toast/Toast.tsx
|
|
2626
3132
|
import * as RadixToast from "@radix-ui/react-toast";
|
|
2627
|
-
import { createContext as
|
|
3133
|
+
import { createContext as createContext5, useCallback as useCallback2, useContext as useContext5, useMemo as useMemo4, useRef as useRef12, useState as useState11 } from "react";
|
|
2628
3134
|
import { XIcon as XIcon5 } from "@bestow-ui/icons";
|
|
2629
3135
|
|
|
2630
3136
|
// src/components/Toast/Toast.css.ts
|
|
2631
3137
|
import { createRuntimeFn as _7a46824 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2632
|
-
var action2 = "
|
|
2633
|
-
var close = "
|
|
2634
|
-
var description5 = "
|
|
2635
|
-
var title5 = "
|
|
2636
|
-
var toast = /* @__PURE__ */ _7a46824({ defaultClassName: "_1g11zvx1", variantClassNames: {
|
|
3138
|
+
var action2 = "_1g11zvx9";
|
|
3139
|
+
var close = "_1g11zvxa";
|
|
3140
|
+
var description5 = "_1g11zvx8";
|
|
3141
|
+
var title5 = "_1g11zvx7";
|
|
3142
|
+
var toast = /* @__PURE__ */ _7a46824({ defaultClassName: "_1g11zvx1", variantClassNames: { color: { primary: "_1g11zvx2", neutral: "_1g11zvx3", success: "_1g11zvx4", warning: "_1g11zvx5", danger: "_1g11zvx6" } }, defaultVariants: { color: "neutral" }, compoundVariants: [] });
|
|
2637
3143
|
var viewport2 = "_1g11zvx0";
|
|
2638
3144
|
|
|
2639
3145
|
// src/components/Toast/Toast.tsx
|
|
2640
|
-
import { jsx as
|
|
3146
|
+
import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2641
3147
|
var REMOVE_DELAY = 500;
|
|
2642
|
-
var ToastContext = /* @__PURE__ */
|
|
2643
|
-
function ToastProvider({ children, duration = 5e3, label:
|
|
2644
|
-
const
|
|
2645
|
-
const
|
|
3148
|
+
var ToastContext = /* @__PURE__ */ createContext5(null);
|
|
3149
|
+
function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
3150
|
+
const m = useMessages();
|
|
3151
|
+
const label6 = labelProp ?? m.notifications ?? "\uC54C\uB9BC";
|
|
3152
|
+
const [toasts, setToasts] = useState11([]);
|
|
3153
|
+
const nextId = useRef12(0);
|
|
2646
3154
|
const portal2 = usePortalProps();
|
|
2647
|
-
const toast2 = useCallback2((options) => {
|
|
3155
|
+
const toast2 = useCallback2(({ variant, ...options }) => {
|
|
3156
|
+
if (variant !== void 0) {
|
|
3157
|
+
warnOnce(
|
|
3158
|
+
'toast() \uC758 variant \uB294 deprecated \uC608\uC694. color \uB97C \uC4F0\uC138\uC694 (variant "default" \u2192 color "neutral", 1.0 \uC5D0\uC11C \uC81C\uAC70).'
|
|
3159
|
+
);
|
|
3160
|
+
}
|
|
3161
|
+
const color = options.color ?? (variant === "default" ? "neutral" : variant);
|
|
2648
3162
|
const id = nextId.current++;
|
|
2649
|
-
setToasts((prev) => [...prev, { ...options, id, open: true }]);
|
|
3163
|
+
setToasts((prev) => [...prev, { ...options, color, id, open: true }]);
|
|
2650
3164
|
return id;
|
|
2651
3165
|
}, []);
|
|
2652
3166
|
const dismiss = useCallback2((id) => {
|
|
@@ -2654,10 +3168,10 @@ function ToastProvider({ children, duration = 5e3, label: label6 = "\uC54C\uB9BC
|
|
|
2654
3168
|
setToasts((prev) => prev.map((t) => isTarget(t) ? { ...t, open: false } : t));
|
|
2655
3169
|
setTimeout(() => setToasts((prev) => prev.filter((t) => t.open || !isTarget(t))), REMOVE_DELAY);
|
|
2656
3170
|
}, []);
|
|
2657
|
-
const value4 =
|
|
2658
|
-
return /* @__PURE__ */
|
|
3171
|
+
const value4 = useMemo4(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
|
|
3172
|
+
return /* @__PURE__ */ jsx40(ToastContext.Provider, { value: value4, children: /* @__PURE__ */ jsxs31(RadixToast.Provider, { duration, label: label6, swipeDirection: "right", children: [
|
|
2659
3173
|
children,
|
|
2660
|
-
toasts.map(({ id, open, title: title6, description: description6,
|
|
3174
|
+
toasts.map(({ id, open, title: title6, description: description6, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */ jsxs31(
|
|
2661
3175
|
RadixToast.Root,
|
|
2662
3176
|
{
|
|
2663
3177
|
open,
|
|
@@ -2665,21 +3179,21 @@ function ToastProvider({ children, duration = 5e3, label: label6 = "\uC54C\uB9BC
|
|
|
2665
3179
|
onOpenChange: (nextOpen) => {
|
|
2666
3180
|
if (!nextOpen) dismiss(id);
|
|
2667
3181
|
},
|
|
2668
|
-
className: toast({
|
|
3182
|
+
className: toast({ color }),
|
|
2669
3183
|
children: [
|
|
2670
|
-
/* @__PURE__ */
|
|
2671
|
-
description6 && /* @__PURE__ */
|
|
2672
|
-
action3 && /* @__PURE__ */
|
|
2673
|
-
/* @__PURE__ */
|
|
3184
|
+
/* @__PURE__ */ jsx40(RadixToast.Title, { className: title5, children: title6 }),
|
|
3185
|
+
description6 && /* @__PURE__ */ jsx40(RadixToast.Description, { className: description5, children: description6 }),
|
|
3186
|
+
action3 && /* @__PURE__ */ jsx40(RadixToast.Action, { asChild: true, altText: action3.altText ?? action3.label, className: action2, children: /* @__PURE__ */ jsx40(Button, { size: "sm", variant: "soft", color: "neutral", onClick: action3.onClick, children: action3.label }) }),
|
|
3187
|
+
/* @__PURE__ */ jsx40(RadixToast.Close, { className: close, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ jsx40(XIcon5, { size: 16 }) })
|
|
2674
3188
|
]
|
|
2675
3189
|
},
|
|
2676
3190
|
id
|
|
2677
3191
|
)),
|
|
2678
|
-
/* @__PURE__ */
|
|
3192
|
+
/* @__PURE__ */ jsx40(RadixToast.Viewport, { className: cx(portal2.className, viewport2), style: portal2.style })
|
|
2679
3193
|
] }) });
|
|
2680
3194
|
}
|
|
2681
3195
|
function useToast() {
|
|
2682
|
-
const context =
|
|
3196
|
+
const context = useContext5(ToastContext);
|
|
2683
3197
|
if (!context) throw new Error("useToast \uB294 ToastProvider \uC548\uC5D0\uC11C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4.");
|
|
2684
3198
|
return context;
|
|
2685
3199
|
}
|
|
@@ -2692,7 +3206,7 @@ var arrow2 = "z7rufs1";
|
|
|
2692
3206
|
var content11 = "z7rufs0";
|
|
2693
3207
|
|
|
2694
3208
|
// src/components/Tooltip/Tooltip.tsx
|
|
2695
|
-
import { jsx as
|
|
3209
|
+
import { jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2696
3210
|
function Tooltip({
|
|
2697
3211
|
content: content12,
|
|
2698
3212
|
children,
|
|
@@ -2707,9 +3221,9 @@ function Tooltip({
|
|
|
2707
3221
|
}) {
|
|
2708
3222
|
const portal2 = usePortalProps();
|
|
2709
3223
|
if (disabled || content12 == null || content12 === "") return children;
|
|
2710
|
-
return /* @__PURE__ */
|
|
2711
|
-
/* @__PURE__ */
|
|
2712
|
-
/* @__PURE__ */
|
|
3224
|
+
return /* @__PURE__ */ jsx41(RadixTooltip.Provider, { delayDuration: delay, children: /* @__PURE__ */ jsxs32(RadixTooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
3225
|
+
/* @__PURE__ */ jsx41(RadixTooltip.Trigger, { asChild: true, children }),
|
|
3226
|
+
/* @__PURE__ */ jsx41(RadixTooltip.Portal, { children: /* @__PURE__ */ jsxs32(
|
|
2713
3227
|
RadixTooltip.Content,
|
|
2714
3228
|
{
|
|
2715
3229
|
side,
|
|
@@ -2720,7 +3234,7 @@ function Tooltip({
|
|
|
2720
3234
|
style: portal2.style,
|
|
2721
3235
|
children: [
|
|
2722
3236
|
content12,
|
|
2723
|
-
/* @__PURE__ */
|
|
3237
|
+
/* @__PURE__ */ jsx41(RadixTooltip.Arrow, { className: arrow2, width: 10, height: 5 })
|
|
2724
3238
|
]
|
|
2725
3239
|
}
|
|
2726
3240
|
) })
|
|
@@ -2728,14 +3242,14 @@ function Tooltip({
|
|
|
2728
3242
|
}
|
|
2729
3243
|
|
|
2730
3244
|
// src/components/Typography/Typography.tsx
|
|
2731
|
-
import { forwardRef as
|
|
3245
|
+
import { forwardRef as forwardRef36 } from "react";
|
|
2732
3246
|
|
|
2733
3247
|
// src/components/Typography/Typography.css.ts
|
|
2734
3248
|
import { createRuntimeFn as _7a46825 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2735
3249
|
var typography = /* @__PURE__ */ _7a46825({ 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: [] });
|
|
2736
3250
|
|
|
2737
3251
|
// src/components/Typography/Typography.tsx
|
|
2738
|
-
import { jsx as
|
|
3252
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2739
3253
|
var defaultElement = {
|
|
2740
3254
|
display: "h1",
|
|
2741
3255
|
h1: "h1",
|
|
@@ -2747,9 +3261,9 @@ var defaultElement = {
|
|
|
2747
3261
|
"body-sm": "p",
|
|
2748
3262
|
caption: "span"
|
|
2749
3263
|
};
|
|
2750
|
-
var Typography = /* @__PURE__ */
|
|
3264
|
+
var Typography = /* @__PURE__ */ forwardRef36(function Typography2({ variant = "body", as, color, weight, align, truncate, className, ...rest }, ref) {
|
|
2751
3265
|
const Component = as ?? defaultElement[variant];
|
|
2752
|
-
return /* @__PURE__ */
|
|
3266
|
+
return /* @__PURE__ */ jsx42(
|
|
2753
3267
|
Component,
|
|
2754
3268
|
{
|
|
2755
3269
|
ref,
|
|
@@ -2760,7 +3274,7 @@ var Typography = /* @__PURE__ */ forwardRef34(function Typography2({ variant = "
|
|
|
2760
3274
|
});
|
|
2761
3275
|
|
|
2762
3276
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
2763
|
-
import { forwardRef as
|
|
3277
|
+
import { forwardRef as forwardRef37, useEffect as useEffect7, useId as useId14, useRef as useRef13, useState as useState12 } from "react";
|
|
2764
3278
|
|
|
2765
3279
|
// src/components/VerificationCodeInput/VerificationCodeInput.css.ts
|
|
2766
3280
|
var input4 = "ea01812";
|
|
@@ -2770,9 +3284,9 @@ var slots = "ea01811";
|
|
|
2770
3284
|
var timer = "ea01814";
|
|
2771
3285
|
|
|
2772
3286
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
2773
|
-
import { jsx as
|
|
3287
|
+
import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
2774
3288
|
var formatTime = (seconds) => `${String(Math.floor(seconds / 60)).padStart(2, "0")}:${String(seconds % 60).padStart(2, "0")}`;
|
|
2775
|
-
var VerificationCodeInput = /* @__PURE__ */
|
|
3289
|
+
var VerificationCodeInput = /* @__PURE__ */ forwardRef37(
|
|
2776
3290
|
function VerificationCodeInput2(props, ref) {
|
|
2777
3291
|
const {
|
|
2778
3292
|
length = 6,
|
|
@@ -2781,7 +3295,7 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef35(
|
|
|
2781
3295
|
onValueChange,
|
|
2782
3296
|
onComplete,
|
|
2783
3297
|
type = "numeric",
|
|
2784
|
-
label:
|
|
3298
|
+
label: labelProp,
|
|
2785
3299
|
helperText: helperText3,
|
|
2786
3300
|
error,
|
|
2787
3301
|
disabled,
|
|
@@ -2789,29 +3303,33 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef35(
|
|
|
2789
3303
|
expiresIn,
|
|
2790
3304
|
onExpire,
|
|
2791
3305
|
onResend,
|
|
2792
|
-
resendText
|
|
2793
|
-
expiredText
|
|
3306
|
+
resendText: resendTextProp,
|
|
3307
|
+
expiredText: expiredTextProp,
|
|
2794
3308
|
name,
|
|
2795
3309
|
id,
|
|
2796
3310
|
className
|
|
2797
3311
|
} = props;
|
|
2798
|
-
const
|
|
3312
|
+
const m = useMessages();
|
|
3313
|
+
const label6 = labelProp ?? m.verificationCode ?? "\uC778\uC99D\uBC88\uD638";
|
|
3314
|
+
const resendText = resendTextProp ?? m.resend ?? "\uC7AC\uC804\uC1A1";
|
|
3315
|
+
const expiredText = expiredTextProp ?? m.verificationExpired ?? "\uC778\uC99D \uC2DC\uAC04\uC774 \uC9C0\uB0AC\uC5B4\uC694. \uC7AC\uC804\uC1A1\uD574 \uC8FC\uC138\uC694.";
|
|
3316
|
+
const generatedId = useId14();
|
|
2799
3317
|
const inputId = id ?? generatedId;
|
|
2800
3318
|
const helperId = `${inputId}-helper`;
|
|
2801
3319
|
const statusId = `${inputId}-status`;
|
|
2802
|
-
const inputRef =
|
|
3320
|
+
const inputRef = useRef13(null);
|
|
2803
3321
|
const isControlled = "value" in props;
|
|
2804
|
-
const [innerValue, setInnerValue] =
|
|
3322
|
+
const [innerValue, setInnerValue] = useState12(defaultValue ?? "");
|
|
2805
3323
|
const code = (isControlled ? value4 ?? "" : innerValue).slice(0, length);
|
|
2806
|
-
const [focused, setFocused] =
|
|
2807
|
-
const [endAt, setEndAt] =
|
|
2808
|
-
const [remaining, setRemaining] =
|
|
3324
|
+
const [focused, setFocused] = useState12(false);
|
|
3325
|
+
const [endAt, setEndAt] = useState12(() => expiresIn ? Date.now() + expiresIn * 1e3 : null);
|
|
3326
|
+
const [remaining, setRemaining] = useState12(expiresIn ?? 0);
|
|
2809
3327
|
const expired = expiresIn !== void 0 && remaining <= 0;
|
|
2810
|
-
const onExpireRef =
|
|
2811
|
-
|
|
3328
|
+
const onExpireRef = useRef13(onExpire);
|
|
3329
|
+
useEffect7(() => {
|
|
2812
3330
|
onExpireRef.current = onExpire;
|
|
2813
3331
|
});
|
|
2814
|
-
|
|
3332
|
+
useEffect7(() => {
|
|
2815
3333
|
if (endAt === null) return;
|
|
2816
3334
|
const tick = () => {
|
|
2817
3335
|
const left = Math.max(0, Math.ceil((endAt - Date.now()) / 1e3));
|
|
@@ -2844,19 +3362,19 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef35(
|
|
|
2844
3362
|
}
|
|
2845
3363
|
inputRef.current?.focus();
|
|
2846
3364
|
};
|
|
2847
|
-
const description6 = helperText3 ?? `${length}\uC790\uB9AC ${type === "numeric" ? "\uC22B\uC790" : "\uBB38\uC790"}\uB97C \uC785\uB825\uD558\uC138\uC694.`;
|
|
3365
|
+
const description6 = helperText3 ?? m.verificationCodeHint?.(length, type) ?? `${length}\uC790\uB9AC ${type === "numeric" ? "\uC22B\uC790" : "\uBB38\uC790"}\uB97C \uC785\uB825\uD558\uC138\uC694.`;
|
|
2848
3366
|
const activeIndex = Math.min(code.length, length - 1);
|
|
2849
|
-
return /* @__PURE__ */
|
|
3367
|
+
return /* @__PURE__ */ jsxs33(
|
|
2850
3368
|
"div",
|
|
2851
3369
|
{
|
|
2852
3370
|
className: cx(field, className),
|
|
2853
3371
|
"data-invalid": error || void 0,
|
|
2854
3372
|
"data-disabled": disabled || void 0,
|
|
2855
3373
|
children: [
|
|
2856
|
-
/* @__PURE__ */
|
|
2857
|
-
/* @__PURE__ */
|
|
2858
|
-
/* @__PURE__ */
|
|
2859
|
-
/* @__PURE__ */
|
|
3374
|
+
/* @__PURE__ */ jsx43("label", { htmlFor: inputId, className: label, children: label6 }),
|
|
3375
|
+
/* @__PURE__ */ jsxs33("div", { className: row4, children: [
|
|
3376
|
+
/* @__PURE__ */ jsxs33("div", { className: slots, children: [
|
|
3377
|
+
/* @__PURE__ */ jsx43(
|
|
2860
3378
|
"input",
|
|
2861
3379
|
{
|
|
2862
3380
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -2876,7 +3394,7 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef35(
|
|
|
2876
3394
|
className: input4
|
|
2877
3395
|
}
|
|
2878
3396
|
),
|
|
2879
|
-
Array.from({ length }, (_, index) => /* @__PURE__ */
|
|
3397
|
+
Array.from({ length }, (_, index) => /* @__PURE__ */ jsx43(
|
|
2880
3398
|
"div",
|
|
2881
3399
|
{
|
|
2882
3400
|
className: slot,
|
|
@@ -2887,12 +3405,12 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef35(
|
|
|
2887
3405
|
index
|
|
2888
3406
|
))
|
|
2889
3407
|
] }),
|
|
2890
|
-
expiresIn !== void 0 && /* @__PURE__ */
|
|
2891
|
-
onResend && /* @__PURE__ */
|
|
3408
|
+
expiresIn !== void 0 && /* @__PURE__ */ jsx43("span", { role: "timer", className: timer, children: formatTime(remaining) }),
|
|
3409
|
+
onResend && /* @__PURE__ */ jsx43(Button, { size: "sm", variant: "outline", color: "neutral", onClick: resend, disabled, children: resendText })
|
|
2892
3410
|
] }),
|
|
2893
|
-
/* @__PURE__ */
|
|
2894
|
-
/* @__PURE__ */
|
|
2895
|
-
name && /* @__PURE__ */
|
|
3411
|
+
/* @__PURE__ */ jsx43("p", { id: helperId, className: helperText({ error }), children: description6 }),
|
|
3412
|
+
/* @__PURE__ */ jsx43("p", { id: statusId, role: "status", className: helperText({ error: true }), children: expired ? expiredText : "" }),
|
|
3413
|
+
name && /* @__PURE__ */ jsx43("input", { type: "hidden", name, value: code })
|
|
2896
3414
|
]
|
|
2897
3415
|
}
|
|
2898
3416
|
);
|
|
@@ -2910,12 +3428,14 @@ export {
|
|
|
2910
3428
|
Breadcrumb,
|
|
2911
3429
|
BusinessNumberInput,
|
|
2912
3430
|
Button,
|
|
3431
|
+
Calendar,
|
|
2913
3432
|
Card,
|
|
2914
3433
|
CardBody,
|
|
2915
3434
|
CardFooter,
|
|
2916
3435
|
CardHeader,
|
|
2917
3436
|
Checkbox,
|
|
2918
3437
|
Combobox,
|
|
3438
|
+
DatePicker,
|
|
2919
3439
|
Divider,
|
|
2920
3440
|
Drawer,
|
|
2921
3441
|
DrawerClose,
|
|
@@ -2929,6 +3449,7 @@ export {
|
|
|
2929
3449
|
IconButton,
|
|
2930
3450
|
Input,
|
|
2931
3451
|
Link,
|
|
3452
|
+
LocaleProvider,
|
|
2932
3453
|
Modal,
|
|
2933
3454
|
ModalClose,
|
|
2934
3455
|
Pagination,
|
|
@@ -2965,13 +3486,18 @@ export {
|
|
|
2965
3486
|
contrastRatio,
|
|
2966
3487
|
createIntentColors,
|
|
2967
3488
|
createTheme,
|
|
3489
|
+
en,
|
|
2968
3490
|
formatBusinessNumber,
|
|
2969
3491
|
formatKoreanAmount,
|
|
3492
|
+
formatKoreanDate,
|
|
2970
3493
|
formatPhoneNumber,
|
|
2971
3494
|
hasAllRequiredAgreements,
|
|
2972
3495
|
isValidBusinessNumber,
|
|
2973
3496
|
kakaoPostcodeProvider,
|
|
3497
|
+
parseISODate,
|
|
2974
3498
|
themeClass,
|
|
3499
|
+
toISODate,
|
|
3500
|
+
useMessages,
|
|
2975
3501
|
usePortalClassName,
|
|
2976
3502
|
usePortalProps,
|
|
2977
3503
|
useTheme,
|