@x-plat/design-system 0.7.2 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AutoResizeTextArea/index.css +2 -0
- package/dist/components/Button/index.css +2 -1
- package/dist/components/Button/index.d.cts +6 -0
- package/dist/components/Button/index.d.ts +6 -0
- package/dist/components/Chart/index.cjs +8 -1
- package/dist/components/Chart/index.js +8 -1
- package/dist/components/ChatInput/index.css +4 -0
- package/dist/components/DatePicker/index.cjs +388 -400
- package/dist/components/DatePicker/index.css +7 -1
- package/dist/components/DatePicker/index.js +375 -387
- package/dist/components/Dropdown/index.cjs +21 -26
- package/dist/components/Dropdown/index.js +20 -25
- package/dist/components/Input/index.css +2 -0
- package/dist/components/Link/index.cjs +64 -0
- package/dist/components/Link/index.css +25 -0
- package/dist/components/Link/index.d.cts +27 -0
- package/dist/components/Link/index.d.ts +27 -0
- package/dist/components/Link/index.js +37 -0
- package/dist/components/LinkButton/index.cjs +64 -0
- package/dist/components/LinkButton/index.css +106 -0
- package/dist/components/LinkButton/index.d.cts +28 -0
- package/dist/components/LinkButton/index.d.ts +28 -0
- package/dist/components/LinkButton/index.js +37 -0
- package/dist/components/Modal/index.cjs +18 -28
- package/dist/components/Modal/index.css +3 -0
- package/dist/components/Modal/index.js +17 -27
- package/dist/components/PopOver/index.cjs +18 -23
- package/dist/components/PopOver/index.js +17 -22
- package/dist/components/Select/index.cjs +337 -342
- package/dist/components/Select/index.js +336 -341
- package/dist/components/TextArea/index.css +2 -0
- package/dist/components/Tooltip/index.cjs +92 -52
- package/dist/components/Tooltip/index.d.cts +10 -2
- package/dist/components/Tooltip/index.d.ts +10 -2
- package/dist/components/Tooltip/index.js +91 -51
- package/dist/components/index.cjs +578 -488
- package/dist/components/index.css +39 -1
- package/dist/components/index.d.cts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +527 -439
- package/dist/index.cjs +602 -512
- package/dist/index.css +39 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +549 -461
- package/guidelines/AGENT_PROMPT.md +2 -2
- package/guidelines/Guidelines.md +2 -1
- package/guidelines/components/button.md +54 -0
- package/guidelines/components/card.md +15 -19
- package/guidelines/components/link.md +35 -0
- package/guidelines/components/overlay.md +30 -1
- package/package.json +1 -1
|
@@ -56,6 +56,8 @@ __export(components_exports, {
|
|
|
56
56
|
ImageSelector: () => ImageSelector_default,
|
|
57
57
|
Input: () => Input_default,
|
|
58
58
|
InputDatePicker: () => InputDatePicker_default,
|
|
59
|
+
Link: () => Link_default,
|
|
60
|
+
LinkButton: () => LinkButton_default,
|
|
59
61
|
Modal: () => Modal_default,
|
|
60
62
|
NotificationBadge: () => NotificationBadge_default,
|
|
61
63
|
Pagination: () => Pagination_default,
|
|
@@ -2301,9 +2303,16 @@ var useChartTooltip = (enabled) => {
|
|
|
2301
2303
|
}, []);
|
|
2302
2304
|
return { tooltip, show, hide, move, containerRef };
|
|
2303
2305
|
};
|
|
2306
|
+
var formatTick = (value, maxVal) => {
|
|
2307
|
+
const step = maxVal / 4;
|
|
2308
|
+
if (!Number.isFinite(step) || step <= 0) return "0";
|
|
2309
|
+
const decimals = step >= 1 ? 0 : Math.min(4, Math.ceil(-Math.log10(step)));
|
|
2310
|
+
const fixed = value.toFixed(decimals);
|
|
2311
|
+
return decimals === 0 ? Number(fixed).toLocaleString("en-US") : fixed;
|
|
2312
|
+
};
|
|
2304
2313
|
var GridLines = import_react6.default.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(import_jsx_runtime305.Fragment, { children: [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
|
|
2305
2314
|
const y = PADDING.top + (1 - ratio) * chartH;
|
|
2306
|
-
const val =
|
|
2315
|
+
const val = formatTick(maxVal * ratio, maxVal);
|
|
2307
2316
|
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
|
|
2308
2317
|
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
|
|
2309
2318
|
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
|
|
@@ -2973,7 +2982,7 @@ Chip.displayName = "Chip";
|
|
|
2973
2982
|
var Chip_default = Chip;
|
|
2974
2983
|
|
|
2975
2984
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
2976
|
-
var
|
|
2985
|
+
var import_react13 = __toESM(require("react"), 1);
|
|
2977
2986
|
|
|
2978
2987
|
// src/components/Input/Input.tsx
|
|
2979
2988
|
var import_react8 = __toESM(require("react"), 1);
|
|
@@ -3164,38 +3173,26 @@ PasswordInput.displayName = "PasswordInput";
|
|
|
3164
3173
|
var PasswordInput_default = PasswordInput;
|
|
3165
3174
|
|
|
3166
3175
|
// src/components/Modal/Modal.tsx
|
|
3167
|
-
var import_react12 = __toESM(require("react"), 1);
|
|
3168
|
-
var import_react_dom2 = require("react-dom");
|
|
3169
|
-
|
|
3170
|
-
// src/tokens/hooks/Portal.tsx
|
|
3171
3176
|
var import_react11 = __toESM(require("react"), 1);
|
|
3172
|
-
var import_react_dom =
|
|
3177
|
+
var import_react_dom = require("react-dom");
|
|
3173
3178
|
var import_jsx_runtime313 = require("react/jsx-runtime");
|
|
3174
|
-
var PortalContainerContext = import_react11.default.createContext(null);
|
|
3175
|
-
var PortalProvider = ({ container, children }) => /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(PortalContainerContext.Provider, { value: container, children });
|
|
3176
|
-
var Portal = ({ children }) => {
|
|
3177
|
-
const contextContainer = import_react11.default.useContext(PortalContainerContext);
|
|
3178
|
-
if (typeof document === "undefined") return null;
|
|
3179
|
-
const container = contextContainer ?? document.body;
|
|
3180
|
-
return import_react_dom.default.createPortal(children, container);
|
|
3181
|
-
};
|
|
3182
|
-
Portal.displayName = "Portal";
|
|
3183
|
-
var Portal_default = Portal;
|
|
3184
|
-
|
|
3185
|
-
// src/components/Modal/Modal.tsx
|
|
3186
|
-
var import_jsx_runtime314 = require("react/jsx-runtime");
|
|
3187
3179
|
var ANIMATION_DURATION_MS = 200;
|
|
3188
3180
|
var Modal = (props) => {
|
|
3189
3181
|
const { isOpen, onClose, children } = props;
|
|
3190
|
-
const [mounted, setMounted] =
|
|
3191
|
-
const [visible, setVisible] =
|
|
3192
|
-
const
|
|
3193
|
-
|
|
3182
|
+
const [mounted, setMounted] = import_react11.default.useState(false);
|
|
3183
|
+
const [visible, setVisible] = import_react11.default.useState(false);
|
|
3184
|
+
const [settled, setSettled] = import_react11.default.useState(false);
|
|
3185
|
+
import_react11.default.useEffect(() => {
|
|
3194
3186
|
if (isOpen) {
|
|
3195
3187
|
setMounted(true);
|
|
3196
|
-
const
|
|
3197
|
-
|
|
3188
|
+
const show = setTimeout(() => setVisible(true), 1);
|
|
3189
|
+
const settle = setTimeout(() => setSettled(true), ANIMATION_DURATION_MS + 50);
|
|
3190
|
+
return () => {
|
|
3191
|
+
clearTimeout(show);
|
|
3192
|
+
clearTimeout(settle);
|
|
3193
|
+
};
|
|
3198
3194
|
}
|
|
3195
|
+
setSettled(false);
|
|
3199
3196
|
setVisible(false);
|
|
3200
3197
|
const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS);
|
|
3201
3198
|
return () => clearTimeout(t);
|
|
@@ -3203,21 +3200,20 @@ var Modal = (props) => {
|
|
|
3203
3200
|
if (typeof document === "undefined") return null;
|
|
3204
3201
|
if (!mounted) return null;
|
|
3205
3202
|
const stateClass = visible ? "enter" : "exit";
|
|
3206
|
-
return (0,
|
|
3207
|
-
/* @__PURE__ */ (0,
|
|
3203
|
+
return (0, import_react_dom.createPortal)(
|
|
3204
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
|
|
3208
3205
|
"div",
|
|
3209
3206
|
{
|
|
3210
3207
|
className: clsx_default("lib-xplat-modal", "dim", stateClass),
|
|
3211
3208
|
onClick: onClose,
|
|
3212
|
-
children: /* @__PURE__ */ (0,
|
|
3209
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
|
|
3213
3210
|
"div",
|
|
3214
3211
|
{
|
|
3215
|
-
|
|
3216
|
-
className: clsx_default("lib-xplat-modal", "modal-box", stateClass),
|
|
3212
|
+
className: clsx_default("lib-xplat-modal", "modal-box", stateClass, settled && "settled"),
|
|
3217
3213
|
role: "dialog",
|
|
3218
3214
|
"aria-modal": "true",
|
|
3219
3215
|
onClick: (e) => e.stopPropagation(),
|
|
3220
|
-
children
|
|
3216
|
+
children
|
|
3221
3217
|
}
|
|
3222
3218
|
)
|
|
3223
3219
|
}
|
|
@@ -3229,9 +3225,9 @@ Modal.displayName = "Modal";
|
|
|
3229
3225
|
var Modal_default = Modal;
|
|
3230
3226
|
|
|
3231
3227
|
// src/components/DatePicker/SingleDatePicker/index.tsx
|
|
3232
|
-
var
|
|
3233
|
-
var
|
|
3234
|
-
var DayCell2 =
|
|
3228
|
+
var import_react12 = __toESM(require("react"), 1);
|
|
3229
|
+
var import_jsx_runtime314 = require("react/jsx-runtime");
|
|
3230
|
+
var DayCell2 = import_react12.default.memo(
|
|
3235
3231
|
({
|
|
3236
3232
|
day,
|
|
3237
3233
|
disabled,
|
|
@@ -3241,7 +3237,7 @@ var DayCell2 = import_react13.default.memo(
|
|
|
3241
3237
|
isEnd,
|
|
3242
3238
|
inRange,
|
|
3243
3239
|
onSelect
|
|
3244
|
-
}) => /* @__PURE__ */ (0,
|
|
3240
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
3245
3241
|
"button",
|
|
3246
3242
|
{
|
|
3247
3243
|
type: "button",
|
|
@@ -3283,26 +3279,26 @@ var SingleDatePicker = (props) => {
|
|
|
3283
3279
|
initialYear,
|
|
3284
3280
|
initialMonth
|
|
3285
3281
|
);
|
|
3286
|
-
const [pickerMode, setPickerMode] =
|
|
3287
|
-
const [yearRangeStart, setYearRangeStart] =
|
|
3282
|
+
const [pickerMode, setPickerMode] = import_react12.default.useState("days");
|
|
3283
|
+
const [yearRangeStart, setYearRangeStart] = import_react12.default.useState(
|
|
3288
3284
|
Math.floor((initialYear ?? (/* @__PURE__ */ new Date()).getFullYear()) / 12) * 12
|
|
3289
3285
|
);
|
|
3290
|
-
const minTime =
|
|
3286
|
+
const minTime = import_react12.default.useMemo(
|
|
3291
3287
|
() => minDate ? new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()).getTime() : -Infinity,
|
|
3292
3288
|
[minDate]
|
|
3293
3289
|
);
|
|
3294
|
-
const maxTime =
|
|
3290
|
+
const maxTime = import_react12.default.useMemo(
|
|
3295
3291
|
() => maxDate ? new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate()).getTime() : Infinity,
|
|
3296
3292
|
[maxDate]
|
|
3297
3293
|
);
|
|
3298
|
-
const highlightSet =
|
|
3294
|
+
const highlightSet = import_react12.default.useMemo(() => {
|
|
3299
3295
|
const set = /* @__PURE__ */ new Set();
|
|
3300
3296
|
for (const h of highlightDates) {
|
|
3301
3297
|
set.add(`${h.getFullYear()}-${h.getMonth()}-${h.getDate()}`);
|
|
3302
3298
|
}
|
|
3303
3299
|
return set;
|
|
3304
3300
|
}, [highlightDates]);
|
|
3305
|
-
const handleSelect =
|
|
3301
|
+
const handleSelect = import_react12.default.useCallback(
|
|
3306
3302
|
(date) => {
|
|
3307
3303
|
onChange?.(date);
|
|
3308
3304
|
},
|
|
@@ -3339,20 +3335,20 @@ var SingleDatePicker = (props) => {
|
|
|
3339
3335
|
const monthLabels = MONTH_LABELS[locale];
|
|
3340
3336
|
const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
|
|
3341
3337
|
const hasRange = rangeStart != null && rangeEnd != null;
|
|
3342
|
-
return /* @__PURE__ */ (0,
|
|
3338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
|
|
3343
3339
|
"div",
|
|
3344
3340
|
{
|
|
3345
3341
|
className: clsx_default("lib-xplat-datepicker", "single"),
|
|
3346
3342
|
children: [
|
|
3347
|
-
/* @__PURE__ */ (0,
|
|
3348
|
-
/* @__PURE__ */ (0,
|
|
3349
|
-
/* @__PURE__ */ (0,
|
|
3350
|
-
/* @__PURE__ */ (0,
|
|
3343
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-header", children: [
|
|
3344
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(ChevronLeftIcon_default, {}) }),
|
|
3345
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
|
|
3346
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("button", { className: "datepicker-nav", onClick: handleNext, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(ChevronRightIcon_default, {}) })
|
|
3351
3347
|
] }),
|
|
3352
|
-
/* @__PURE__ */ (0,
|
|
3353
|
-
pickerMode === "years" && /* @__PURE__ */ (0,
|
|
3348
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "datepicker-body", children: [
|
|
3349
|
+
pickerMode === "years" && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
|
|
3354
3350
|
const y = yearRangeStart + i;
|
|
3355
|
-
return /* @__PURE__ */ (0,
|
|
3351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
3356
3352
|
"button",
|
|
3357
3353
|
{
|
|
3358
3354
|
type: "button",
|
|
@@ -3363,7 +3359,7 @@ var SingleDatePicker = (props) => {
|
|
|
3363
3359
|
y
|
|
3364
3360
|
);
|
|
3365
3361
|
}) }),
|
|
3366
|
-
pickerMode === "months" && /* @__PURE__ */ (0,
|
|
3362
|
+
pickerMode === "months" && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
3367
3363
|
"button",
|
|
3368
3364
|
{
|
|
3369
3365
|
type: "button",
|
|
@@ -3373,8 +3369,8 @@ var SingleDatePicker = (props) => {
|
|
|
3373
3369
|
},
|
|
3374
3370
|
i
|
|
3375
3371
|
)) }),
|
|
3376
|
-
pickerMode === "days" && /* @__PURE__ */ (0,
|
|
3377
|
-
/* @__PURE__ */ (0,
|
|
3372
|
+
pickerMode === "days" && /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(import_jsx_runtime314.Fragment, { children: [
|
|
3373
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
3378
3374
|
"div",
|
|
3379
3375
|
{
|
|
3380
3376
|
className: clsx_default(
|
|
@@ -3386,7 +3382,7 @@ var SingleDatePicker = (props) => {
|
|
|
3386
3382
|
},
|
|
3387
3383
|
label
|
|
3388
3384
|
)) }),
|
|
3389
|
-
/* @__PURE__ */ (0,
|
|
3385
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "datepicker-grid", children: days.map((day, idx) => {
|
|
3390
3386
|
const t = day.date.getTime();
|
|
3391
3387
|
const disabled = t < minTime || t > maxTime;
|
|
3392
3388
|
const selected = value ? isSameDay(day.date, value) : false;
|
|
@@ -3396,7 +3392,7 @@ var SingleDatePicker = (props) => {
|
|
|
3396
3392
|
const isStart = hasRange ? isSameDay(day.date, rangeStart) : false;
|
|
3397
3393
|
const isEnd = hasRange ? isSameDay(day.date, rangeEnd) : false;
|
|
3398
3394
|
const inRangeVal = hasRange ? isInRange(day.date, rangeStart, rangeEnd) : false;
|
|
3399
|
-
return /* @__PURE__ */ (0,
|
|
3395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
3400
3396
|
DayCell2,
|
|
3401
3397
|
{
|
|
3402
3398
|
day,
|
|
@@ -3421,7 +3417,7 @@ SingleDatePicker.displayName = "SingleDatePicker";
|
|
|
3421
3417
|
var SingleDatePicker_default = SingleDatePicker;
|
|
3422
3418
|
|
|
3423
3419
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
3424
|
-
var
|
|
3420
|
+
var import_jsx_runtime315 = require("react/jsx-runtime");
|
|
3425
3421
|
var formatDate = (date) => {
|
|
3426
3422
|
if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
|
|
3427
3423
|
const y = date.getFullYear();
|
|
@@ -3431,8 +3427,8 @@ var formatDate = (date) => {
|
|
|
3431
3427
|
};
|
|
3432
3428
|
var InputDatePicker = (props) => {
|
|
3433
3429
|
const { value, onChange, minDate, maxDate, disabled, locale = "ko", placeholder } = props;
|
|
3434
|
-
const [isOpen, setIsOpen] =
|
|
3435
|
-
const [tempDate, setTempDate] =
|
|
3430
|
+
const [isOpen, setIsOpen] = import_react13.default.useState(false);
|
|
3431
|
+
const [tempDate, setTempDate] = import_react13.default.useState(value ?? /* @__PURE__ */ new Date());
|
|
3436
3432
|
const handleOpen = () => {
|
|
3437
3433
|
if (disabled) return;
|
|
3438
3434
|
setTempDate(value ?? /* @__PURE__ */ new Date());
|
|
@@ -3448,19 +3444,19 @@ var InputDatePicker = (props) => {
|
|
|
3448
3444
|
const handleClose = () => {
|
|
3449
3445
|
setIsOpen(false);
|
|
3450
3446
|
};
|
|
3451
|
-
return /* @__PURE__ */ (0,
|
|
3452
|
-
/* @__PURE__ */ (0,
|
|
3447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"), children: [
|
|
3448
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "input-datepicker-trigger", onClick: handleOpen, children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
3453
3449
|
Input_default,
|
|
3454
3450
|
{
|
|
3455
3451
|
value: formatDate(value),
|
|
3456
3452
|
placeholder,
|
|
3457
|
-
suffix: /* @__PURE__ */ (0,
|
|
3453
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(CalenderIcon_default, {}),
|
|
3458
3454
|
disabled,
|
|
3459
3455
|
readOnly: true
|
|
3460
3456
|
}
|
|
3461
3457
|
) }),
|
|
3462
|
-
/* @__PURE__ */ (0,
|
|
3463
|
-
/* @__PURE__ */ (0,
|
|
3458
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "lib-xplat-popup-datepicker-card", children: [
|
|
3459
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "popup-datepicker-content", children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
3464
3460
|
SingleDatePicker_default,
|
|
3465
3461
|
{
|
|
3466
3462
|
value: tempDate,
|
|
@@ -3470,9 +3466,9 @@ var InputDatePicker = (props) => {
|
|
|
3470
3466
|
locale
|
|
3471
3467
|
}
|
|
3472
3468
|
) }),
|
|
3473
|
-
/* @__PURE__ */ (0,
|
|
3474
|
-
/* @__PURE__ */ (0,
|
|
3475
|
-
/* @__PURE__ */ (0,
|
|
3469
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "popup-datepicker-footer", children: [
|
|
3470
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)(Button_default, { type: "secondary", onClick: handleClose, children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel" }),
|
|
3471
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)(Button_default, { type: "primary", onClick: handleApply, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
|
|
3476
3472
|
] })
|
|
3477
3473
|
] }) })
|
|
3478
3474
|
] });
|
|
@@ -3481,20 +3477,20 @@ InputDatePicker.displayName = "InputDatePicker";
|
|
|
3481
3477
|
var InputDatePicker_default = InputDatePicker;
|
|
3482
3478
|
|
|
3483
3479
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
3484
|
-
var
|
|
3480
|
+
var import_react17 = __toESM(require("react"), 1);
|
|
3485
3481
|
|
|
3486
3482
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
3487
|
-
var
|
|
3483
|
+
var import_react16 = __toESM(require("react"), 1);
|
|
3488
3484
|
|
|
3489
3485
|
// src/components/Tab/Tab.tsx
|
|
3490
|
-
var
|
|
3486
|
+
var import_react15 = __toESM(require("react"), 1);
|
|
3491
3487
|
|
|
3492
3488
|
// src/components/Tab/TabItem.tsx
|
|
3493
|
-
var
|
|
3494
|
-
var
|
|
3495
|
-
var TabItem =
|
|
3489
|
+
var import_react14 = __toESM(require("react"), 1);
|
|
3490
|
+
var import_jsx_runtime316 = require("react/jsx-runtime");
|
|
3491
|
+
var TabItem = import_react14.default.forwardRef((props, ref) => {
|
|
3496
3492
|
const { isActive: isActive2, title, onClick } = props;
|
|
3497
|
-
return /* @__PURE__ */ (0,
|
|
3493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
|
|
3498
3494
|
"div",
|
|
3499
3495
|
{
|
|
3500
3496
|
ref,
|
|
@@ -3508,25 +3504,25 @@ TabItem.displayName = "TabItem";
|
|
|
3508
3504
|
var TabItem_default = TabItem;
|
|
3509
3505
|
|
|
3510
3506
|
// src/components/Tab/Tab.tsx
|
|
3511
|
-
var
|
|
3507
|
+
var import_jsx_runtime317 = require("react/jsx-runtime");
|
|
3512
3508
|
var Tab = (props) => {
|
|
3513
3509
|
const { activeIndex, onChange, tabs, type, size = "md" } = props;
|
|
3514
|
-
const [underlineStyle, setUnderlineStyle] =
|
|
3510
|
+
const [underlineStyle, setUnderlineStyle] = import_react15.default.useState({
|
|
3515
3511
|
left: 0,
|
|
3516
3512
|
width: 0
|
|
3517
3513
|
});
|
|
3518
|
-
const itemRefs =
|
|
3514
|
+
const itemRefs = import_react15.default.useRef([]);
|
|
3519
3515
|
const handleChangeActiveTab = (tabItem, tabIdx) => {
|
|
3520
3516
|
onChange(tabItem, tabIdx);
|
|
3521
3517
|
};
|
|
3522
|
-
|
|
3518
|
+
import_react15.default.useEffect(() => {
|
|
3523
3519
|
const el = itemRefs.current[activeIndex];
|
|
3524
3520
|
if (el) {
|
|
3525
3521
|
setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
|
|
3526
3522
|
}
|
|
3527
3523
|
}, [activeIndex, tabs.length]);
|
|
3528
|
-
return /* @__PURE__ */ (0,
|
|
3529
|
-
tabs.map((tab, idx) => /* @__PURE__ */ (0,
|
|
3524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
|
|
3525
|
+
tabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
|
|
3530
3526
|
TabItem_default,
|
|
3531
3527
|
{
|
|
3532
3528
|
onClick: () => handleChangeActiveTab(tab, idx),
|
|
@@ -3538,7 +3534,7 @@ var Tab = (props) => {
|
|
|
3538
3534
|
},
|
|
3539
3535
|
`${tab.value}_${idx}`
|
|
3540
3536
|
)),
|
|
3541
|
-
type === "toggle" && /* @__PURE__ */ (0,
|
|
3537
|
+
type === "toggle" && /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
|
|
3542
3538
|
"div",
|
|
3543
3539
|
{
|
|
3544
3540
|
className: "tab-toggle-underline",
|
|
@@ -3554,7 +3550,7 @@ Tab.displayName = "Tab";
|
|
|
3554
3550
|
var Tab_default = Tab;
|
|
3555
3551
|
|
|
3556
3552
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
3557
|
-
var
|
|
3553
|
+
var import_jsx_runtime318 = require("react/jsx-runtime");
|
|
3558
3554
|
var RangePicker = (props) => {
|
|
3559
3555
|
const {
|
|
3560
3556
|
startDate,
|
|
@@ -3564,7 +3560,7 @@ var RangePicker = (props) => {
|
|
|
3564
3560
|
maxDate,
|
|
3565
3561
|
locale = "ko"
|
|
3566
3562
|
} = props;
|
|
3567
|
-
const [activeTab, setActiveTab] =
|
|
3563
|
+
const [activeTab, setActiveTab] = import_react16.default.useState("start");
|
|
3568
3564
|
const handleStartChange = (date) => {
|
|
3569
3565
|
if (!date) return;
|
|
3570
3566
|
const newStart = date > endDate ? endDate : date;
|
|
@@ -3577,8 +3573,8 @@ var RangePicker = (props) => {
|
|
|
3577
3573
|
};
|
|
3578
3574
|
const startMaxDate = maxDate && endDate < maxDate ? endDate : endDate;
|
|
3579
3575
|
const endMinDate = minDate && startDate > minDate ? startDate : startDate;
|
|
3580
|
-
return /* @__PURE__ */ (0,
|
|
3581
|
-
/* @__PURE__ */ (0,
|
|
3576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime318.jsxs)("div", { className: clsx_default("lib-xplat-datepicker", "range"), children: [
|
|
3577
|
+
/* @__PURE__ */ (0, import_jsx_runtime318.jsx)("div", { className: "datepicker-range-tabs", children: /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
|
|
3582
3578
|
Tab_default,
|
|
3583
3579
|
{
|
|
3584
3580
|
activeIndex: activeTab === "start" ? 0 : 1,
|
|
@@ -3591,8 +3587,8 @@ var RangePicker = (props) => {
|
|
|
3591
3587
|
size: "sm"
|
|
3592
3588
|
}
|
|
3593
3589
|
) }),
|
|
3594
|
-
/* @__PURE__ */ (0,
|
|
3595
|
-
/* @__PURE__ */ (0,
|
|
3590
|
+
/* @__PURE__ */ (0, import_jsx_runtime318.jsxs)("div", { className: "datepicker-range-panels", children: [
|
|
3591
|
+
/* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
|
|
3596
3592
|
SingleDatePicker_default,
|
|
3597
3593
|
{
|
|
3598
3594
|
value: startDate,
|
|
@@ -3604,7 +3600,7 @@ var RangePicker = (props) => {
|
|
|
3604
3600
|
locale
|
|
3605
3601
|
}
|
|
3606
3602
|
),
|
|
3607
|
-
/* @__PURE__ */ (0,
|
|
3603
|
+
/* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
|
|
3608
3604
|
SingleDatePicker_default,
|
|
3609
3605
|
{
|
|
3610
3606
|
value: endDate,
|
|
@@ -3617,7 +3613,7 @@ var RangePicker = (props) => {
|
|
|
3617
3613
|
}
|
|
3618
3614
|
)
|
|
3619
3615
|
] }),
|
|
3620
|
-
/* @__PURE__ */ (0,
|
|
3616
|
+
/* @__PURE__ */ (0, import_jsx_runtime318.jsx)("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
|
|
3621
3617
|
SingleDatePicker_default,
|
|
3622
3618
|
{
|
|
3623
3619
|
value: startDate,
|
|
@@ -3628,7 +3624,7 @@ var RangePicker = (props) => {
|
|
|
3628
3624
|
rangeEnd: endDate,
|
|
3629
3625
|
locale
|
|
3630
3626
|
}
|
|
3631
|
-
) : /* @__PURE__ */ (0,
|
|
3627
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
|
|
3632
3628
|
SingleDatePicker_default,
|
|
3633
3629
|
{
|
|
3634
3630
|
value: endDate,
|
|
@@ -3646,10 +3642,10 @@ RangePicker.displayName = "RangePicker";
|
|
|
3646
3642
|
var RangePicker_default = RangePicker;
|
|
3647
3643
|
|
|
3648
3644
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
3649
|
-
var
|
|
3645
|
+
var import_jsx_runtime319 = require("react/jsx-runtime");
|
|
3650
3646
|
var PopupPicker = (props) => {
|
|
3651
3647
|
const { component, type, locale } = props;
|
|
3652
|
-
const [isOpen, setIsOpen] =
|
|
3648
|
+
const [isOpen, setIsOpen] = import_react17.default.useState(false);
|
|
3653
3649
|
const handleClick = () => setIsOpen(true);
|
|
3654
3650
|
const handleClose = () => setIsOpen(false);
|
|
3655
3651
|
const handleSingleChange = (date) => {
|
|
@@ -3657,11 +3653,11 @@ var PopupPicker = (props) => {
|
|
|
3657
3653
|
props.onChange?.(date);
|
|
3658
3654
|
handleClose();
|
|
3659
3655
|
};
|
|
3660
|
-
return /* @__PURE__ */ (0,
|
|
3661
|
-
|
|
3662
|
-
/* @__PURE__ */ (0,
|
|
3663
|
-
/* @__PURE__ */ (0,
|
|
3664
|
-
type === "single" && /* @__PURE__ */ (0,
|
|
3656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "lib-xplat-popup-datepicker", children: [
|
|
3657
|
+
import_react17.default.cloneElement(component, { onClick: handleClick }),
|
|
3658
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
|
|
3659
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "popup-datepicker-content", children: [
|
|
3660
|
+
type === "single" && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
3665
3661
|
SingleDatePicker_default,
|
|
3666
3662
|
{
|
|
3667
3663
|
value: props.value,
|
|
@@ -3671,7 +3667,7 @@ var PopupPicker = (props) => {
|
|
|
3671
3667
|
locale
|
|
3672
3668
|
}
|
|
3673
3669
|
),
|
|
3674
|
-
type === "range" && /* @__PURE__ */ (0,
|
|
3670
|
+
type === "range" && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
3675
3671
|
RangePicker_default,
|
|
3676
3672
|
{
|
|
3677
3673
|
startDate: props.startDate,
|
|
@@ -3683,8 +3679,8 @@ var PopupPicker = (props) => {
|
|
|
3683
3679
|
}
|
|
3684
3680
|
)
|
|
3685
3681
|
] }),
|
|
3686
|
-
/* @__PURE__ */ (0,
|
|
3687
|
-
/* @__PURE__ */ (0,
|
|
3682
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "popup-datepicker-footer", children: [
|
|
3683
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
3688
3684
|
Button_default,
|
|
3689
3685
|
{
|
|
3690
3686
|
type: "secondary",
|
|
@@ -3692,7 +3688,7 @@ var PopupPicker = (props) => {
|
|
|
3692
3688
|
children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel"
|
|
3693
3689
|
}
|
|
3694
3690
|
),
|
|
3695
|
-
/* @__PURE__ */ (0,
|
|
3691
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)(Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
|
|
3696
3692
|
] })
|
|
3697
3693
|
] }) })
|
|
3698
3694
|
] });
|
|
@@ -3701,10 +3697,10 @@ PopupPicker.displayName = "PopupPicker";
|
|
|
3701
3697
|
var PopupPicker_default = PopupPicker;
|
|
3702
3698
|
|
|
3703
3699
|
// src/components/Divider/Divider.tsx
|
|
3704
|
-
var
|
|
3700
|
+
var import_jsx_runtime320 = require("react/jsx-runtime");
|
|
3705
3701
|
var Divider = (props) => {
|
|
3706
3702
|
const { orientation = "horizontal" } = props;
|
|
3707
|
-
return /* @__PURE__ */ (0,
|
|
3703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
|
|
3708
3704
|
"div",
|
|
3709
3705
|
{
|
|
3710
3706
|
className: clsx_default("lib-xplat-divider", orientation),
|
|
@@ -3717,15 +3713,15 @@ Divider.displayName = "Divider";
|
|
|
3717
3713
|
var Divider_default = Divider;
|
|
3718
3714
|
|
|
3719
3715
|
// src/components/Drawer/Drawer.tsx
|
|
3720
|
-
var
|
|
3721
|
-
var
|
|
3722
|
-
var
|
|
3716
|
+
var import_react18 = __toESM(require("react"), 1);
|
|
3717
|
+
var import_react_dom2 = require("react-dom");
|
|
3718
|
+
var import_jsx_runtime321 = require("react/jsx-runtime");
|
|
3723
3719
|
var ANIMATION_DURATION_MS2 = 250;
|
|
3724
3720
|
var Drawer = (props) => {
|
|
3725
3721
|
const { isOpen, onClose, placement = "right", size = "md", title, children } = props;
|
|
3726
|
-
const [mounted, setMounted] =
|
|
3727
|
-
const [visible, setVisible] =
|
|
3728
|
-
|
|
3722
|
+
const [mounted, setMounted] = import_react18.default.useState(false);
|
|
3723
|
+
const [visible, setVisible] = import_react18.default.useState(false);
|
|
3724
|
+
import_react18.default.useEffect(() => {
|
|
3729
3725
|
if (isOpen) {
|
|
3730
3726
|
setMounted(true);
|
|
3731
3727
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -3738,13 +3734,13 @@ var Drawer = (props) => {
|
|
|
3738
3734
|
if (typeof document === "undefined") return null;
|
|
3739
3735
|
if (!mounted) return null;
|
|
3740
3736
|
const stateClass = visible ? "enter" : "exit";
|
|
3741
|
-
return (0,
|
|
3742
|
-
/* @__PURE__ */ (0,
|
|
3737
|
+
return (0, import_react_dom2.createPortal)(
|
|
3738
|
+
/* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
|
|
3743
3739
|
"div",
|
|
3744
3740
|
{
|
|
3745
3741
|
className: clsx_default("lib-xplat-drawer-overlay", stateClass),
|
|
3746
3742
|
onClick: onClose,
|
|
3747
|
-
children: /* @__PURE__ */ (0,
|
|
3743
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)(
|
|
3748
3744
|
"div",
|
|
3749
3745
|
{
|
|
3750
3746
|
className: clsx_default("lib-xplat-drawer", placement, size, stateClass),
|
|
@@ -3752,11 +3748,11 @@ var Drawer = (props) => {
|
|
|
3752
3748
|
"aria-modal": "true",
|
|
3753
3749
|
onClick: (e) => e.stopPropagation(),
|
|
3754
3750
|
children: [
|
|
3755
|
-
title && /* @__PURE__ */ (0,
|
|
3756
|
-
/* @__PURE__ */ (0,
|
|
3757
|
-
/* @__PURE__ */ (0,
|
|
3751
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime321.jsxs)("div", { className: "drawer-header", children: [
|
|
3752
|
+
/* @__PURE__ */ (0, import_jsx_runtime321.jsx)("span", { className: "drawer-title", children: title }),
|
|
3753
|
+
/* @__PURE__ */ (0, import_jsx_runtime321.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
3758
3754
|
] }),
|
|
3759
|
-
/* @__PURE__ */ (0,
|
|
3755
|
+
/* @__PURE__ */ (0, import_jsx_runtime321.jsx)("div", { className: "drawer-body", children })
|
|
3760
3756
|
]
|
|
3761
3757
|
}
|
|
3762
3758
|
)
|
|
@@ -3769,16 +3765,25 @@ Drawer.displayName = "Drawer";
|
|
|
3769
3765
|
var Drawer_default = Drawer;
|
|
3770
3766
|
|
|
3771
3767
|
// src/components/Dropdown/Dropdown.tsx
|
|
3772
|
-
var
|
|
3768
|
+
var import_react21 = __toESM(require("react"), 1);
|
|
3769
|
+
|
|
3770
|
+
// src/tokens/hooks/Portal.tsx
|
|
3771
|
+
var import_react_dom3 = __toESM(require("react-dom"), 1);
|
|
3772
|
+
var Portal = ({ children }) => {
|
|
3773
|
+
if (typeof document === "undefined") return null;
|
|
3774
|
+
return import_react_dom3.default.createPortal(children, document.body);
|
|
3775
|
+
};
|
|
3776
|
+
Portal.displayName = "Portal";
|
|
3777
|
+
var Portal_default = Portal;
|
|
3773
3778
|
|
|
3774
3779
|
// src/tokens/hooks/useAutoPosition.ts
|
|
3775
|
-
var
|
|
3780
|
+
var import_react19 = __toESM(require("react"), 1);
|
|
3776
3781
|
var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
3777
|
-
const [position, setPosition] =
|
|
3782
|
+
const [position, setPosition] = import_react19.default.useState({
|
|
3778
3783
|
position: {},
|
|
3779
3784
|
direction: "bottom"
|
|
3780
3785
|
});
|
|
3781
|
-
const calculatePosition =
|
|
3786
|
+
const calculatePosition = import_react19.default.useCallback(() => {
|
|
3782
3787
|
if (!triggerRef.current || !popRef.current) return;
|
|
3783
3788
|
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
3784
3789
|
const popW = popRef.current.offsetWidth;
|
|
@@ -3805,13 +3810,13 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
3805
3810
|
direction
|
|
3806
3811
|
});
|
|
3807
3812
|
}, [triggerRef, popRef]);
|
|
3808
|
-
|
|
3813
|
+
import_react19.default.useLayoutEffect(() => {
|
|
3809
3814
|
if (!enabled) return;
|
|
3810
3815
|
calculatePosition();
|
|
3811
3816
|
const raf = requestAnimationFrame(calculatePosition);
|
|
3812
3817
|
return () => cancelAnimationFrame(raf);
|
|
3813
3818
|
}, [calculatePosition, enabled]);
|
|
3814
|
-
|
|
3819
|
+
import_react19.default.useEffect(() => {
|
|
3815
3820
|
if (!enabled || !popRef.current) return;
|
|
3816
3821
|
const observer = new ResizeObserver(() => {
|
|
3817
3822
|
calculatePosition();
|
|
@@ -3819,7 +3824,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
3819
3824
|
observer.observe(popRef.current);
|
|
3820
3825
|
return () => observer.disconnect();
|
|
3821
3826
|
}, [calculatePosition, enabled, popRef]);
|
|
3822
|
-
|
|
3827
|
+
import_react19.default.useEffect(() => {
|
|
3823
3828
|
if (!enabled) return;
|
|
3824
3829
|
window.addEventListener("resize", calculatePosition);
|
|
3825
3830
|
window.addEventListener("scroll", calculatePosition, true);
|
|
@@ -3833,9 +3838,9 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
3833
3838
|
var useAutoPosition_default = useAutoPosition;
|
|
3834
3839
|
|
|
3835
3840
|
// src/tokens/hooks/useClickOutside.ts
|
|
3836
|
-
var
|
|
3841
|
+
var import_react20 = __toESM(require("react"), 1);
|
|
3837
3842
|
var useClickOutside = (refs, handler, enabled = true) => {
|
|
3838
|
-
|
|
3843
|
+
import_react20.default.useEffect(() => {
|
|
3839
3844
|
if (!enabled) return;
|
|
3840
3845
|
const refArray = Array.isArray(refs) ? refs : [refs];
|
|
3841
3846
|
const listener = (event) => {
|
|
@@ -3858,17 +3863,17 @@ var useClickOutside = (refs, handler, enabled = true) => {
|
|
|
3858
3863
|
var useClickOutside_default = useClickOutside;
|
|
3859
3864
|
|
|
3860
3865
|
// src/components/Dropdown/Dropdown.tsx
|
|
3861
|
-
var
|
|
3866
|
+
var import_jsx_runtime322 = require("react/jsx-runtime");
|
|
3862
3867
|
var Dropdown = (props) => {
|
|
3863
3868
|
const { items, children } = props;
|
|
3864
|
-
const [isOpen, setIsOpen] =
|
|
3865
|
-
const [mounted, setMounted] =
|
|
3866
|
-
const [visible, setVisible] =
|
|
3867
|
-
const triggerRef =
|
|
3868
|
-
const menuRef =
|
|
3869
|
+
const [isOpen, setIsOpen] = import_react21.default.useState(false);
|
|
3870
|
+
const [mounted, setMounted] = import_react21.default.useState(false);
|
|
3871
|
+
const [visible, setVisible] = import_react21.default.useState(false);
|
|
3872
|
+
const triggerRef = import_react21.default.useRef(null);
|
|
3873
|
+
const menuRef = import_react21.default.useRef(null);
|
|
3869
3874
|
const { position, direction } = useAutoPosition_default(triggerRef, menuRef, mounted);
|
|
3870
3875
|
useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false), isOpen);
|
|
3871
|
-
|
|
3876
|
+
import_react21.default.useEffect(() => {
|
|
3872
3877
|
if (isOpen) {
|
|
3873
3878
|
setMounted(true);
|
|
3874
3879
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -3883,8 +3888,8 @@ var Dropdown = (props) => {
|
|
|
3883
3888
|
item.onClick?.();
|
|
3884
3889
|
setIsOpen(false);
|
|
3885
3890
|
};
|
|
3886
|
-
return /* @__PURE__ */ (0,
|
|
3887
|
-
/* @__PURE__ */ (0,
|
|
3891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "lib-xplat-dropdown", children: [
|
|
3892
|
+
/* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
|
|
3888
3893
|
"div",
|
|
3889
3894
|
{
|
|
3890
3895
|
ref: triggerRef,
|
|
@@ -3893,14 +3898,14 @@ var Dropdown = (props) => {
|
|
|
3893
3898
|
children
|
|
3894
3899
|
}
|
|
3895
3900
|
),
|
|
3896
|
-
mounted && /* @__PURE__ */ (0,
|
|
3901
|
+
mounted && /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(Portal_default, { children: /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
|
|
3897
3902
|
"div",
|
|
3898
3903
|
{
|
|
3899
3904
|
ref: menuRef,
|
|
3900
3905
|
className: clsx_default("lib-xplat-dropdown-menu", direction, { visible }),
|
|
3901
3906
|
style: { top: position.top, left: position.left },
|
|
3902
3907
|
role: "menu",
|
|
3903
|
-
children: items.map((item) => /* @__PURE__ */ (0,
|
|
3908
|
+
children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
|
|
3904
3909
|
"button",
|
|
3905
3910
|
{
|
|
3906
3911
|
className: clsx_default("dropdown-item", {
|
|
@@ -3922,8 +3927,8 @@ Dropdown.displayName = "Dropdown";
|
|
|
3922
3927
|
var Dropdown_default = Dropdown;
|
|
3923
3928
|
|
|
3924
3929
|
// src/components/Editor/Editor.tsx
|
|
3925
|
-
var
|
|
3926
|
-
var
|
|
3930
|
+
var import_react22 = __toESM(require("react"), 1);
|
|
3931
|
+
var import_jsx_runtime323 = require("react/jsx-runtime");
|
|
3927
3932
|
var DEFAULT_TOOLBAR = [
|
|
3928
3933
|
"bold",
|
|
3929
3934
|
"italic",
|
|
@@ -4030,21 +4035,21 @@ var Editor = (props) => {
|
|
|
4030
4035
|
onImageUpload,
|
|
4031
4036
|
minHeight = 200
|
|
4032
4037
|
} = props;
|
|
4033
|
-
const editorRef =
|
|
4034
|
-
const lastRangeRef =
|
|
4035
|
-
const composingRef =
|
|
4036
|
-
const [isFocused, setIsFocused] =
|
|
4037
|
-
const [isEmpty, setIsEmpty] =
|
|
4038
|
-
const [activeFormats, setActiveFormats] =
|
|
4039
|
-
const [slashOpen, setSlashOpen] =
|
|
4040
|
-
const [slashFilter, setSlashFilter] =
|
|
4041
|
-
const [slashIdx, setSlashIdx] =
|
|
4042
|
-
const [slashPos, setSlashPos] =
|
|
4043
|
-
const slashStartRangeRef =
|
|
4044
|
-
const [linkOpen, setLinkOpen] =
|
|
4045
|
-
const [linkValue, setLinkValue] =
|
|
4046
|
-
const [linkPos, setLinkPos] =
|
|
4047
|
-
|
|
4038
|
+
const editorRef = import_react22.default.useRef(null);
|
|
4039
|
+
const lastRangeRef = import_react22.default.useRef(null);
|
|
4040
|
+
const composingRef = import_react22.default.useRef(false);
|
|
4041
|
+
const [isFocused, setIsFocused] = import_react22.default.useState(false);
|
|
4042
|
+
const [isEmpty, setIsEmpty] = import_react22.default.useState(!value);
|
|
4043
|
+
const [activeFormats, setActiveFormats] = import_react22.default.useState(/* @__PURE__ */ new Set());
|
|
4044
|
+
const [slashOpen, setSlashOpen] = import_react22.default.useState(false);
|
|
4045
|
+
const [slashFilter, setSlashFilter] = import_react22.default.useState("");
|
|
4046
|
+
const [slashIdx, setSlashIdx] = import_react22.default.useState(0);
|
|
4047
|
+
const [slashPos, setSlashPos] = import_react22.default.useState({ top: 0, left: 0 });
|
|
4048
|
+
const slashStartRangeRef = import_react22.default.useRef(null);
|
|
4049
|
+
const [linkOpen, setLinkOpen] = import_react22.default.useState(false);
|
|
4050
|
+
const [linkValue, setLinkValue] = import_react22.default.useState("");
|
|
4051
|
+
const [linkPos, setLinkPos] = import_react22.default.useState({ top: 0, left: 0 });
|
|
4052
|
+
import_react22.default.useEffect(() => {
|
|
4048
4053
|
if (!editorRef.current) return;
|
|
4049
4054
|
if (editorRef.current.innerHTML !== value) {
|
|
4050
4055
|
editorRef.current.innerHTML = sanitizeHtml(value || "");
|
|
@@ -4158,7 +4163,7 @@ var Editor = (props) => {
|
|
|
4158
4163
|
setSlashIdx(0);
|
|
4159
4164
|
slashStartRangeRef.current = null;
|
|
4160
4165
|
};
|
|
4161
|
-
const filteredSlashItems =
|
|
4166
|
+
const filteredSlashItems = import_react22.default.useMemo(() => {
|
|
4162
4167
|
if (!slashFilter) return SLASH_ITEMS;
|
|
4163
4168
|
const f = slashFilter.toLowerCase();
|
|
4164
4169
|
return SLASH_ITEMS.filter((it) => it.label.toLowerCase().includes(f) || it.key.includes(f));
|
|
@@ -4443,8 +4448,8 @@ var Editor = (props) => {
|
|
|
4443
4448
|
break;
|
|
4444
4449
|
}
|
|
4445
4450
|
};
|
|
4446
|
-
return /* @__PURE__ */ (0,
|
|
4447
|
-
!readOnly && /* @__PURE__ */ (0,
|
|
4451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)("div", { className: clsx_default("lib-xplat-editor", isFocused && "focused", readOnly && "readonly"), children: [
|
|
4452
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
4448
4453
|
EditorToolbar,
|
|
4449
4454
|
{
|
|
4450
4455
|
items: toolbar,
|
|
@@ -4452,9 +4457,9 @@ var Editor = (props) => {
|
|
|
4452
4457
|
onAction: onToolbarAction
|
|
4453
4458
|
}
|
|
4454
4459
|
),
|
|
4455
|
-
/* @__PURE__ */ (0,
|
|
4456
|
-
isEmpty && !isFocused && /* @__PURE__ */ (0,
|
|
4457
|
-
/* @__PURE__ */ (0,
|
|
4460
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsxs)("div", { className: "lib-xplat-editor__content", style: { minHeight }, children: [
|
|
4461
|
+
isEmpty && !isFocused && /* @__PURE__ */ (0, import_jsx_runtime323.jsx)("div", { className: "lib-xplat-editor__placeholder", children: placeholder }),
|
|
4462
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
4458
4463
|
"div",
|
|
4459
4464
|
{
|
|
4460
4465
|
ref: editorRef,
|
|
@@ -4473,7 +4478,7 @@ var Editor = (props) => {
|
|
|
4473
4478
|
spellCheck: true
|
|
4474
4479
|
}
|
|
4475
4480
|
),
|
|
4476
|
-
slashOpen && filteredSlashItems.length > 0 && /* @__PURE__ */ (0,
|
|
4481
|
+
slashOpen && filteredSlashItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
4477
4482
|
SlashMenu,
|
|
4478
4483
|
{
|
|
4479
4484
|
position: slashPos,
|
|
@@ -4483,7 +4488,7 @@ var Editor = (props) => {
|
|
|
4483
4488
|
onClose: closeSlashMenu
|
|
4484
4489
|
}
|
|
4485
4490
|
),
|
|
4486
|
-
linkOpen && /* @__PURE__ */ (0,
|
|
4491
|
+
linkOpen && /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
4487
4492
|
LinkPopover,
|
|
4488
4493
|
{
|
|
4489
4494
|
position: linkPos,
|
|
@@ -4535,7 +4540,7 @@ var isActive = (item, active) => {
|
|
|
4535
4540
|
return active.has(item);
|
|
4536
4541
|
};
|
|
4537
4542
|
var EditorToolbar = ({ items, active, onAction }) => {
|
|
4538
|
-
return /* @__PURE__ */ (0,
|
|
4543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime323.jsx)("div", { className: "lib-xplat-editor__toolbar", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
4539
4544
|
"button",
|
|
4540
4545
|
{
|
|
4541
4546
|
type: "button",
|
|
@@ -4551,7 +4556,7 @@ var EditorToolbar = ({ items, active, onAction }) => {
|
|
|
4551
4556
|
)) });
|
|
4552
4557
|
};
|
|
4553
4558
|
var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
4554
|
-
|
|
4559
|
+
import_react22.default.useEffect(() => {
|
|
4555
4560
|
const handleClickOutside = (e) => {
|
|
4556
4561
|
const target = e.target;
|
|
4557
4562
|
const menu = document.querySelector(".lib-xplat-editor__slash-menu");
|
|
@@ -4560,12 +4565,12 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
4560
4565
|
window.addEventListener("mousedown", handleClickOutside);
|
|
4561
4566
|
return () => window.removeEventListener("mousedown", handleClickOutside);
|
|
4562
4567
|
}, [onClose]);
|
|
4563
|
-
return /* @__PURE__ */ (0,
|
|
4568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
4564
4569
|
"div",
|
|
4565
4570
|
{
|
|
4566
4571
|
className: "lib-xplat-editor__slash-menu",
|
|
4567
4572
|
style: { top: position.top, left: position.left },
|
|
4568
|
-
children: items.map((item, i) => /* @__PURE__ */ (0,
|
|
4573
|
+
children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(
|
|
4569
4574
|
"button",
|
|
4570
4575
|
{
|
|
4571
4576
|
type: "button",
|
|
@@ -4575,8 +4580,8 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
4575
4580
|
onSelect(item);
|
|
4576
4581
|
},
|
|
4577
4582
|
children: [
|
|
4578
|
-
/* @__PURE__ */ (0,
|
|
4579
|
-
item.hint && /* @__PURE__ */ (0,
|
|
4583
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)("span", { className: "label", children: item.label }),
|
|
4584
|
+
item.hint && /* @__PURE__ */ (0, import_jsx_runtime323.jsx)("span", { className: "hint", children: item.hint })
|
|
4580
4585
|
]
|
|
4581
4586
|
},
|
|
4582
4587
|
item.key
|
|
@@ -4585,17 +4590,17 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
4585
4590
|
);
|
|
4586
4591
|
};
|
|
4587
4592
|
var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
4588
|
-
const inputRef =
|
|
4589
|
-
|
|
4593
|
+
const inputRef = import_react22.default.useRef(null);
|
|
4594
|
+
import_react22.default.useEffect(() => {
|
|
4590
4595
|
inputRef.current?.focus();
|
|
4591
4596
|
}, []);
|
|
4592
|
-
return /* @__PURE__ */ (0,
|
|
4597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(
|
|
4593
4598
|
"div",
|
|
4594
4599
|
{
|
|
4595
4600
|
className: "lib-xplat-editor__link-popover",
|
|
4596
4601
|
style: { top: position.top, left: position.left },
|
|
4597
4602
|
children: [
|
|
4598
|
-
/* @__PURE__ */ (0,
|
|
4603
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
4599
4604
|
"input",
|
|
4600
4605
|
{
|
|
4601
4606
|
ref: inputRef,
|
|
@@ -4615,11 +4620,11 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
4615
4620
|
}
|
|
4616
4621
|
}
|
|
4617
4622
|
),
|
|
4618
|
-
/* @__PURE__ */ (0,
|
|
4623
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)("button", { type: "button", onMouseDown: (e) => {
|
|
4619
4624
|
e.preventDefault();
|
|
4620
4625
|
onConfirm();
|
|
4621
4626
|
}, children: "\uC801\uC6A9" }),
|
|
4622
|
-
/* @__PURE__ */ (0,
|
|
4627
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)("button", { type: "button", onMouseDown: (e) => {
|
|
4623
4628
|
e.preventDefault();
|
|
4624
4629
|
onClose();
|
|
4625
4630
|
}, children: "\uCDE8\uC18C" })
|
|
@@ -4629,23 +4634,23 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
4629
4634
|
};
|
|
4630
4635
|
|
|
4631
4636
|
// src/components/EmptyState/EmptyState.tsx
|
|
4632
|
-
var
|
|
4637
|
+
var import_jsx_runtime324 = require("react/jsx-runtime");
|
|
4633
4638
|
var EmptyState = (props) => {
|
|
4634
4639
|
const { icon, title = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", description, action } = props;
|
|
4635
|
-
return /* @__PURE__ */ (0,
|
|
4636
|
-
icon && /* @__PURE__ */ (0,
|
|
4637
|
-
!icon && /* @__PURE__ */ (0,
|
|
4638
|
-
/* @__PURE__ */ (0,
|
|
4639
|
-
description && /* @__PURE__ */ (0,
|
|
4640
|
-
action && /* @__PURE__ */ (0,
|
|
4640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)("div", { className: "lib-xplat-empty-state", children: [
|
|
4641
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "empty-icon", children: icon }),
|
|
4642
|
+
!icon && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "empty-icon", children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("path", { d: "M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z" }) }) }),
|
|
4643
|
+
/* @__PURE__ */ (0, import_jsx_runtime324.jsx)("p", { className: "empty-title", children: title }),
|
|
4644
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("p", { className: "empty-description", children: description }),
|
|
4645
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "empty-action", children: action })
|
|
4641
4646
|
] });
|
|
4642
4647
|
};
|
|
4643
4648
|
EmptyState.displayName = "EmptyState";
|
|
4644
4649
|
var EmptyState_default = EmptyState;
|
|
4645
4650
|
|
|
4646
4651
|
// src/components/FileUpload/FileUpload.tsx
|
|
4647
|
-
var
|
|
4648
|
-
var
|
|
4652
|
+
var import_react23 = __toESM(require("react"), 1);
|
|
4653
|
+
var import_jsx_runtime325 = require("react/jsx-runtime");
|
|
4649
4654
|
var FileUpload = (props) => {
|
|
4650
4655
|
const {
|
|
4651
4656
|
accept,
|
|
@@ -4655,8 +4660,8 @@ var FileUpload = (props) => {
|
|
|
4655
4660
|
label = "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8\uD558\uAC70\uB098 \uD074\uB9AD\uD558\uC5EC \uC5C5\uB85C\uB4DC",
|
|
4656
4661
|
description
|
|
4657
4662
|
} = props;
|
|
4658
|
-
const [isDragOver, setIsDragOver] =
|
|
4659
|
-
const inputRef =
|
|
4663
|
+
const [isDragOver, setIsDragOver] = import_react23.default.useState(false);
|
|
4664
|
+
const inputRef = import_react23.default.useRef(null);
|
|
4660
4665
|
const handleFiles = (fileList) => {
|
|
4661
4666
|
let files = Array.from(fileList);
|
|
4662
4667
|
if (maxSize) {
|
|
@@ -4686,7 +4691,7 @@ var FileUpload = (props) => {
|
|
|
4686
4691
|
handleFiles(e.target.files);
|
|
4687
4692
|
}
|
|
4688
4693
|
};
|
|
4689
|
-
return /* @__PURE__ */ (0,
|
|
4694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)(
|
|
4690
4695
|
"div",
|
|
4691
4696
|
{
|
|
4692
4697
|
className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }),
|
|
@@ -4695,7 +4700,7 @@ var FileUpload = (props) => {
|
|
|
4695
4700
|
onDragLeave: handleDragLeave,
|
|
4696
4701
|
onClick: () => inputRef.current?.click(),
|
|
4697
4702
|
children: [
|
|
4698
|
-
/* @__PURE__ */ (0,
|
|
4703
|
+
/* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
|
|
4699
4704
|
"input",
|
|
4700
4705
|
{
|
|
4701
4706
|
ref: inputRef,
|
|
@@ -4705,9 +4710,9 @@ var FileUpload = (props) => {
|
|
|
4705
4710
|
onChange: handleChange
|
|
4706
4711
|
}
|
|
4707
4712
|
),
|
|
4708
|
-
/* @__PURE__ */ (0,
|
|
4709
|
-
/* @__PURE__ */ (0,
|
|
4710
|
-
description && /* @__PURE__ */ (0,
|
|
4713
|
+
/* @__PURE__ */ (0, import_jsx_runtime325.jsx)("div", { className: "upload-icon", children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(UploadIcon_default, {}) }),
|
|
4714
|
+
/* @__PURE__ */ (0, import_jsx_runtime325.jsx)("p", { className: "upload-label", children: label }),
|
|
4715
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("p", { className: "upload-description", children: description })
|
|
4711
4716
|
]
|
|
4712
4717
|
}
|
|
4713
4718
|
);
|
|
@@ -4716,10 +4721,10 @@ FileUpload.displayName = "FileUpload";
|
|
|
4716
4721
|
var FileUpload_default = FileUpload;
|
|
4717
4722
|
|
|
4718
4723
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
4719
|
-
var
|
|
4724
|
+
var import_react25 = __toESM(require("react"), 1);
|
|
4720
4725
|
|
|
4721
4726
|
// src/components/HtmlTypeWriter/utils.ts
|
|
4722
|
-
var
|
|
4727
|
+
var import_react24 = __toESM(require("react"), 1);
|
|
4723
4728
|
var voidTags = /* @__PURE__ */ new Set([
|
|
4724
4729
|
"br",
|
|
4725
4730
|
"img",
|
|
@@ -4787,41 +4792,41 @@ var convertNodeToReactWithRange = (node, typedLen, rangeMap) => {
|
|
|
4787
4792
|
props[attr.name] = attr.value;
|
|
4788
4793
|
});
|
|
4789
4794
|
if (voidTags.has(tag)) {
|
|
4790
|
-
return
|
|
4795
|
+
return import_react24.default.createElement(tag, props);
|
|
4791
4796
|
}
|
|
4792
4797
|
const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
|
|
4793
|
-
return
|
|
4798
|
+
return import_react24.default.createElement(tag, props, ...children);
|
|
4794
4799
|
};
|
|
4795
4800
|
var htmlToReactProgressive = (root, typedLen, rangeMap) => {
|
|
4796
4801
|
const nodes = Array.from(root.childNodes).map((child, idx) => {
|
|
4797
4802
|
const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
|
|
4798
|
-
return node == null ? null :
|
|
4803
|
+
return node == null ? null : import_react24.default.createElement(import_react24.default.Fragment, { key: idx }, node);
|
|
4799
4804
|
}).filter(Boolean);
|
|
4800
4805
|
return nodes.length === 0 ? null : nodes;
|
|
4801
4806
|
};
|
|
4802
4807
|
|
|
4803
4808
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
4804
|
-
var
|
|
4809
|
+
var import_jsx_runtime326 = require("react/jsx-runtime");
|
|
4805
4810
|
var HtmlTypeWriter = ({
|
|
4806
4811
|
html,
|
|
4807
4812
|
duration = 20,
|
|
4808
4813
|
onDone,
|
|
4809
4814
|
onChange
|
|
4810
4815
|
}) => {
|
|
4811
|
-
const [typedLen, setTypedLen] =
|
|
4812
|
-
const doneCalledRef =
|
|
4813
|
-
const { doc, rangeMap, totalLength } =
|
|
4816
|
+
const [typedLen, setTypedLen] = import_react25.default.useState(0);
|
|
4817
|
+
const doneCalledRef = import_react25.default.useRef(false);
|
|
4818
|
+
const { doc, rangeMap, totalLength } = import_react25.default.useMemo(() => {
|
|
4814
4819
|
if (typeof window === "undefined") return { doc: null, rangeMap: /* @__PURE__ */ new Map(), totalLength: 0 };
|
|
4815
4820
|
const decoded = decodeHtmlEntities(html);
|
|
4816
4821
|
const doc2 = new DOMParser().parseFromString(decoded, "text/html");
|
|
4817
4822
|
const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
|
|
4818
4823
|
return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
|
|
4819
4824
|
}, [html]);
|
|
4820
|
-
|
|
4825
|
+
import_react25.default.useEffect(() => {
|
|
4821
4826
|
setTypedLen(0);
|
|
4822
4827
|
doneCalledRef.current = false;
|
|
4823
4828
|
}, [html]);
|
|
4824
|
-
|
|
4829
|
+
import_react25.default.useEffect(() => {
|
|
4825
4830
|
if (!totalLength) return;
|
|
4826
4831
|
if (typedLen >= totalLength) return;
|
|
4827
4832
|
const timer = window.setInterval(() => {
|
|
@@ -4829,33 +4834,33 @@ var HtmlTypeWriter = ({
|
|
|
4829
4834
|
}, duration);
|
|
4830
4835
|
return () => window.clearInterval(timer);
|
|
4831
4836
|
}, [typedLen, totalLength, duration]);
|
|
4832
|
-
|
|
4837
|
+
import_react25.default.useEffect(() => {
|
|
4833
4838
|
if (typedLen > 0 && typedLen < totalLength) {
|
|
4834
4839
|
onChange?.();
|
|
4835
4840
|
}
|
|
4836
4841
|
}, [typedLen, totalLength, onChange]);
|
|
4837
|
-
|
|
4842
|
+
import_react25.default.useEffect(() => {
|
|
4838
4843
|
if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
|
|
4839
4844
|
doneCalledRef.current = true;
|
|
4840
4845
|
onDone?.();
|
|
4841
4846
|
}
|
|
4842
4847
|
}, [typedLen, totalLength, onDone]);
|
|
4843
|
-
const parsed =
|
|
4848
|
+
const parsed = import_react25.default.useMemo(
|
|
4844
4849
|
() => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
|
|
4845
4850
|
[doc, typedLen, rangeMap]
|
|
4846
4851
|
);
|
|
4847
|
-
return /* @__PURE__ */ (0,
|
|
4852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
|
|
4848
4853
|
};
|
|
4849
4854
|
HtmlTypeWriter.displayName = "HtmlTypeWriter";
|
|
4850
4855
|
var HtmlTypeWriter_default = HtmlTypeWriter;
|
|
4851
4856
|
|
|
4852
4857
|
// src/components/ImageSelector/ImageSelector.tsx
|
|
4853
|
-
var
|
|
4854
|
-
var
|
|
4858
|
+
var import_react26 = __toESM(require("react"), 1);
|
|
4859
|
+
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
4855
4860
|
var ImageSelector = (props) => {
|
|
4856
4861
|
const { value, label, onChange } = props;
|
|
4857
|
-
const [previewUrl, setPreviewUrl] =
|
|
4858
|
-
|
|
4862
|
+
const [previewUrl, setPreviewUrl] = import_react26.default.useState();
|
|
4863
|
+
import_react26.default.useEffect(() => {
|
|
4859
4864
|
if (!value) {
|
|
4860
4865
|
setPreviewUrl(void 0);
|
|
4861
4866
|
return;
|
|
@@ -4864,7 +4869,7 @@ var ImageSelector = (props) => {
|
|
|
4864
4869
|
setPreviewUrl(url);
|
|
4865
4870
|
return () => URL.revokeObjectURL(url);
|
|
4866
4871
|
}, [value]);
|
|
4867
|
-
const inputRef =
|
|
4872
|
+
const inputRef = import_react26.default.useRef(null);
|
|
4868
4873
|
const handleFileChange = (e) => {
|
|
4869
4874
|
const selectedFile = e.target.files?.[0];
|
|
4870
4875
|
if (selectedFile) {
|
|
@@ -4877,8 +4882,8 @@ var ImageSelector = (props) => {
|
|
|
4877
4882
|
const handleOpenFileDialog = () => {
|
|
4878
4883
|
inputRef.current?.click();
|
|
4879
4884
|
};
|
|
4880
|
-
return /* @__PURE__ */ (0,
|
|
4881
|
-
/* @__PURE__ */ (0,
|
|
4885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
|
|
4886
|
+
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
4882
4887
|
"input",
|
|
4883
4888
|
{
|
|
4884
4889
|
type: "file",
|
|
@@ -4888,21 +4893,59 @@ var ImageSelector = (props) => {
|
|
|
4888
4893
|
ref: inputRef
|
|
4889
4894
|
}
|
|
4890
4895
|
),
|
|
4891
|
-
value && /* @__PURE__ */ (0,
|
|
4892
|
-
/* @__PURE__ */ (0,
|
|
4893
|
-
/* @__PURE__ */ (0,
|
|
4896
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className: "action-bar", children: [
|
|
4897
|
+
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(UploadIcon_default, {}) }),
|
|
4898
|
+
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(DeleteIcon_default, {}) })
|
|
4894
4899
|
] }),
|
|
4895
|
-
/* @__PURE__ */ (0,
|
|
4896
|
-
/* @__PURE__ */ (0,
|
|
4897
|
-
/* @__PURE__ */ (0,
|
|
4900
|
+
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)("div", { className: "content", children: previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
|
|
4901
|
+
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)("div", { className: "icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(ImageIcon_default, {}) }),
|
|
4902
|
+
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
|
|
4898
4903
|
] }) })
|
|
4899
4904
|
] });
|
|
4900
4905
|
};
|
|
4901
4906
|
ImageSelector.displayName = "ImageSelector";
|
|
4902
4907
|
var ImageSelector_default = ImageSelector;
|
|
4903
4908
|
|
|
4904
|
-
// src/components/
|
|
4909
|
+
// src/components/Link/Link.tsx
|
|
4910
|
+
var import_jsx_runtime328 = require("react/jsx-runtime");
|
|
4911
|
+
var Link = (props) => {
|
|
4912
|
+
const { children, href, underline = "always", target, rel, ...rest } = props;
|
|
4913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
4914
|
+
"a",
|
|
4915
|
+
{
|
|
4916
|
+
className: clsx_default("lib-xplat-link", `underline-${underline}`),
|
|
4917
|
+
href,
|
|
4918
|
+
target,
|
|
4919
|
+
rel: target === "_blank" ? rel ?? "noopener noreferrer" : rel,
|
|
4920
|
+
...rest,
|
|
4921
|
+
children
|
|
4922
|
+
}
|
|
4923
|
+
);
|
|
4924
|
+
};
|
|
4925
|
+
Link.displayName = "Link";
|
|
4926
|
+
var Link_default = Link;
|
|
4927
|
+
|
|
4928
|
+
// src/components/LinkButton/LinkButton.tsx
|
|
4905
4929
|
var import_jsx_runtime329 = require("react/jsx-runtime");
|
|
4930
|
+
var LinkButton = (props) => {
|
|
4931
|
+
const { children, href, type = "primary", size = "md", target, rel, ...rest } = props;
|
|
4932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime329.jsx)(
|
|
4933
|
+
"a",
|
|
4934
|
+
{
|
|
4935
|
+
className: clsx_default("lib-xplat-button", type, size),
|
|
4936
|
+
href,
|
|
4937
|
+
target,
|
|
4938
|
+
rel: target === "_blank" ? rel ?? "noopener noreferrer" : rel,
|
|
4939
|
+
...rest,
|
|
4940
|
+
children
|
|
4941
|
+
}
|
|
4942
|
+
);
|
|
4943
|
+
};
|
|
4944
|
+
LinkButton.displayName = "LinkButton";
|
|
4945
|
+
var LinkButton_default = LinkButton;
|
|
4946
|
+
|
|
4947
|
+
// src/components/NotificationBadge/NotificationBadge.tsx
|
|
4948
|
+
var import_jsx_runtime330 = require("react/jsx-runtime");
|
|
4906
4949
|
var NotificationBadge = (props) => {
|
|
4907
4950
|
const {
|
|
4908
4951
|
children,
|
|
@@ -4914,16 +4957,16 @@ var NotificationBadge = (props) => {
|
|
|
4914
4957
|
} = props;
|
|
4915
4958
|
const showBadge = dot || count !== void 0 && count > 0;
|
|
4916
4959
|
const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
|
|
4917
|
-
return /* @__PURE__ */ (0,
|
|
4960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime330.jsxs)("div", { className: clsx_default("lib-xplat-notification-badge", size), children: [
|
|
4918
4961
|
children,
|
|
4919
|
-
showBadge && /* @__PURE__ */ (0,
|
|
4962
|
+
showBadge && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
|
|
4920
4963
|
] });
|
|
4921
4964
|
};
|
|
4922
4965
|
NotificationBadge.displayName = "NotificationBadge";
|
|
4923
4966
|
var NotificationBadge_default = NotificationBadge;
|
|
4924
4967
|
|
|
4925
4968
|
// src/components/Pagination/Pagination.tsx
|
|
4926
|
-
var
|
|
4969
|
+
var import_jsx_runtime331 = require("react/jsx-runtime");
|
|
4927
4970
|
var getPageRange = (current, totalPages, siblingCount) => {
|
|
4928
4971
|
const totalNumbers = siblingCount * 2 + 5;
|
|
4929
4972
|
if (totalPages <= totalNumbers) {
|
|
@@ -4966,19 +5009,19 @@ var Pagination = (props) => {
|
|
|
4966
5009
|
onChange?.(page);
|
|
4967
5010
|
}
|
|
4968
5011
|
};
|
|
4969
|
-
return /* @__PURE__ */ (0,
|
|
4970
|
-
/* @__PURE__ */ (0,
|
|
5012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)("nav", { className: clsx_default("lib-xplat-pagination", size, type), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
|
|
5013
|
+
/* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
|
|
4971
5014
|
"button",
|
|
4972
5015
|
{
|
|
4973
5016
|
className: "page-btn prev",
|
|
4974
5017
|
disabled: current <= 1,
|
|
4975
5018
|
onClick: () => handleClick(current - 1),
|
|
4976
5019
|
"aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
|
|
4977
|
-
children: /* @__PURE__ */ (0,
|
|
5020
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(ChevronLeftIcon_default, {})
|
|
4978
5021
|
}
|
|
4979
5022
|
),
|
|
4980
5023
|
pages.map(
|
|
4981
|
-
(page, i) => page === "..." ? /* @__PURE__ */ (0,
|
|
5024
|
+
(page, i) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime331.jsx)("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
|
|
4982
5025
|
"button",
|
|
4983
5026
|
{
|
|
4984
5027
|
className: clsx_default("page-btn", { active: page === current }),
|
|
@@ -4989,14 +5032,14 @@ var Pagination = (props) => {
|
|
|
4989
5032
|
page
|
|
4990
5033
|
)
|
|
4991
5034
|
),
|
|
4992
|
-
/* @__PURE__ */ (0,
|
|
5035
|
+
/* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
|
|
4993
5036
|
"button",
|
|
4994
5037
|
{
|
|
4995
5038
|
className: "page-btn next",
|
|
4996
5039
|
disabled: current >= totalPages,
|
|
4997
5040
|
onClick: () => handleClick(current + 1),
|
|
4998
5041
|
"aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
|
|
4999
|
-
children: /* @__PURE__ */ (0,
|
|
5042
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime331.jsx)(ChevronRightIcon_default, {})
|
|
5000
5043
|
}
|
|
5001
5044
|
)
|
|
5002
5045
|
] });
|
|
@@ -5005,17 +5048,17 @@ Pagination.displayName = "Pagination";
|
|
|
5005
5048
|
var Pagination_default = Pagination;
|
|
5006
5049
|
|
|
5007
5050
|
// src/components/PopOver/PopOver.tsx
|
|
5008
|
-
var
|
|
5009
|
-
var
|
|
5051
|
+
var import_react27 = __toESM(require("react"), 1);
|
|
5052
|
+
var import_jsx_runtime332 = require("react/jsx-runtime");
|
|
5010
5053
|
var PopOver = (props) => {
|
|
5011
5054
|
const { children, isOpen, onClose, PopOverEl } = props;
|
|
5012
|
-
const popRef =
|
|
5013
|
-
const triggerRef =
|
|
5014
|
-
const [localOpen, setLocalOpen] =
|
|
5015
|
-
const [eventTrigger, setEventTrigger] =
|
|
5055
|
+
const popRef = import_react27.default.useRef(null);
|
|
5056
|
+
const triggerRef = import_react27.default.useRef(null);
|
|
5057
|
+
const [localOpen, setLocalOpen] = import_react27.default.useState(false);
|
|
5058
|
+
const [eventTrigger, setEventTrigger] = import_react27.default.useState(false);
|
|
5016
5059
|
useClickOutside_default([popRef, triggerRef], onClose, isOpen);
|
|
5017
5060
|
const position = useAutoPosition_default(triggerRef, popRef, localOpen);
|
|
5018
|
-
|
|
5061
|
+
import_react27.default.useEffect(() => {
|
|
5019
5062
|
if (isOpen) {
|
|
5020
5063
|
setLocalOpen(isOpen);
|
|
5021
5064
|
setTimeout(() => {
|
|
@@ -5028,7 +5071,7 @@ var PopOver = (props) => {
|
|
|
5028
5071
|
}, 200);
|
|
5029
5072
|
}
|
|
5030
5073
|
}, [isOpen]);
|
|
5031
|
-
return /* @__PURE__ */ (0,
|
|
5074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime332.jsxs)(
|
|
5032
5075
|
"div",
|
|
5033
5076
|
{
|
|
5034
5077
|
className: "lib-xplat-pop-over",
|
|
@@ -5038,7 +5081,7 @@ var PopOver = (props) => {
|
|
|
5038
5081
|
},
|
|
5039
5082
|
children: [
|
|
5040
5083
|
children,
|
|
5041
|
-
localOpen && /* @__PURE__ */ (0,
|
|
5084
|
+
localOpen && /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(Portal_default, { children: /* @__PURE__ */ (0, import_jsx_runtime332.jsx)(
|
|
5042
5085
|
"div",
|
|
5043
5086
|
{
|
|
5044
5087
|
className: clsx_default(
|
|
@@ -5061,7 +5104,7 @@ PopOver.displayName = "PopOver";
|
|
|
5061
5104
|
var PopOver_default = PopOver;
|
|
5062
5105
|
|
|
5063
5106
|
// src/components/Progress/Progress.tsx
|
|
5064
|
-
var
|
|
5107
|
+
var import_jsx_runtime333 = require("react/jsx-runtime");
|
|
5065
5108
|
var Progress = (props) => {
|
|
5066
5109
|
const {
|
|
5067
5110
|
value,
|
|
@@ -5071,8 +5114,8 @@ var Progress = (props) => {
|
|
|
5071
5114
|
showLabel = false
|
|
5072
5115
|
} = props;
|
|
5073
5116
|
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
5074
|
-
return /* @__PURE__ */ (0,
|
|
5075
|
-
/* @__PURE__ */ (0,
|
|
5117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
|
|
5118
|
+
/* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
|
|
5076
5119
|
"div",
|
|
5077
5120
|
{
|
|
5078
5121
|
className: "track",
|
|
@@ -5080,7 +5123,7 @@ var Progress = (props) => {
|
|
|
5080
5123
|
"aria-valuenow": value,
|
|
5081
5124
|
"aria-valuemin": 0,
|
|
5082
5125
|
"aria-valuemax": max,
|
|
5083
|
-
children: /* @__PURE__ */ (0,
|
|
5126
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
|
|
5084
5127
|
"div",
|
|
5085
5128
|
{
|
|
5086
5129
|
className: "bar",
|
|
@@ -5089,7 +5132,7 @@ var Progress = (props) => {
|
|
|
5089
5132
|
)
|
|
5090
5133
|
}
|
|
5091
5134
|
),
|
|
5092
|
-
showLabel && /* @__PURE__ */ (0,
|
|
5135
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)("span", { className: "label", children: [
|
|
5093
5136
|
Math.round(percentage),
|
|
5094
5137
|
"%"
|
|
5095
5138
|
] })
|
|
@@ -5099,17 +5142,17 @@ Progress.displayName = "Progress";
|
|
|
5099
5142
|
var Progress_default = Progress;
|
|
5100
5143
|
|
|
5101
5144
|
// src/components/Radio/RadioGroupContext.tsx
|
|
5102
|
-
var
|
|
5103
|
-
var RadioGroupContext =
|
|
5145
|
+
var import_react28 = __toESM(require("react"), 1);
|
|
5146
|
+
var RadioGroupContext = import_react28.default.createContext(
|
|
5104
5147
|
null
|
|
5105
5148
|
);
|
|
5106
5149
|
var useRadioGroupContext = () => {
|
|
5107
|
-
return
|
|
5150
|
+
return import_react28.default.useContext(RadioGroupContext);
|
|
5108
5151
|
};
|
|
5109
5152
|
var RadioGroupContext_default = RadioGroupContext;
|
|
5110
5153
|
|
|
5111
5154
|
// src/components/Radio/Radio.tsx
|
|
5112
|
-
var
|
|
5155
|
+
var import_jsx_runtime334 = require("react/jsx-runtime");
|
|
5113
5156
|
var Radio = (props) => {
|
|
5114
5157
|
const {
|
|
5115
5158
|
label,
|
|
@@ -5128,7 +5171,7 @@ var Radio = (props) => {
|
|
|
5128
5171
|
value,
|
|
5129
5172
|
onChange: rest.onChange
|
|
5130
5173
|
};
|
|
5131
|
-
return /* @__PURE__ */ (0,
|
|
5174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)(
|
|
5132
5175
|
"label",
|
|
5133
5176
|
{
|
|
5134
5177
|
className: clsx_default(
|
|
@@ -5139,18 +5182,18 @@ var Radio = (props) => {
|
|
|
5139
5182
|
className
|
|
5140
5183
|
),
|
|
5141
5184
|
children: [
|
|
5142
|
-
/* @__PURE__ */ (0,
|
|
5143
|
-
/* @__PURE__ */ (0,
|
|
5185
|
+
/* @__PURE__ */ (0, import_jsx_runtime334.jsx)("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
|
|
5186
|
+
/* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
5144
5187
|
"div",
|
|
5145
5188
|
{
|
|
5146
5189
|
className: clsx_default(
|
|
5147
5190
|
"circle",
|
|
5148
5191
|
localChecked ? "checked" : void 0
|
|
5149
5192
|
),
|
|
5150
|
-
children: localChecked && /* @__PURE__ */ (0,
|
|
5193
|
+
children: localChecked && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "inner-circle" })
|
|
5151
5194
|
}
|
|
5152
5195
|
),
|
|
5153
|
-
label && /* @__PURE__ */ (0,
|
|
5196
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("span", { children: label })
|
|
5154
5197
|
]
|
|
5155
5198
|
}
|
|
5156
5199
|
);
|
|
@@ -5159,28 +5202,28 @@ Radio.displayName = "Radio";
|
|
|
5159
5202
|
var Radio_default = Radio;
|
|
5160
5203
|
|
|
5161
5204
|
// src/components/Radio/RadioGroup.tsx
|
|
5162
|
-
var
|
|
5205
|
+
var import_jsx_runtime335 = require("react/jsx-runtime");
|
|
5163
5206
|
var RadioGroup = (props) => {
|
|
5164
5207
|
const { children, ...rest } = props;
|
|
5165
|
-
return /* @__PURE__ */ (0,
|
|
5208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(import_jsx_runtime335.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(RadioGroupContext_default.Provider, { value: rest, children }) });
|
|
5166
5209
|
};
|
|
5167
5210
|
RadioGroup.displayName = "RadioGroup";
|
|
5168
5211
|
var RadioGroup_default = RadioGroup;
|
|
5169
5212
|
|
|
5170
5213
|
// src/components/Select/Select.tsx
|
|
5171
|
-
var
|
|
5214
|
+
var import_react31 = __toESM(require("react"), 1);
|
|
5172
5215
|
|
|
5173
5216
|
// src/components/Select/context.ts
|
|
5174
|
-
var
|
|
5175
|
-
var SelectContext =
|
|
5217
|
+
var import_react29 = __toESM(require("react"), 1);
|
|
5218
|
+
var SelectContext = import_react29.default.createContext(null);
|
|
5176
5219
|
var context_default = SelectContext;
|
|
5177
5220
|
|
|
5178
5221
|
// src/components/Select/SelectItem.tsx
|
|
5179
|
-
var
|
|
5180
|
-
var
|
|
5222
|
+
var import_react30 = __toESM(require("react"), 1);
|
|
5223
|
+
var import_jsx_runtime336 = require("react/jsx-runtime");
|
|
5181
5224
|
var SelectItem = (props) => {
|
|
5182
5225
|
const { children, value, onClick, disabled = false } = props;
|
|
5183
|
-
const ctx =
|
|
5226
|
+
const ctx = import_react30.default.useContext(context_default);
|
|
5184
5227
|
const handleClick = (e) => {
|
|
5185
5228
|
e.preventDefault();
|
|
5186
5229
|
e.stopPropagation();
|
|
@@ -5190,7 +5233,7 @@ var SelectItem = (props) => {
|
|
|
5190
5233
|
onClick?.();
|
|
5191
5234
|
};
|
|
5192
5235
|
const isSelected = value !== void 0 ? ctx?.selectedValue === value : ctx?.selectedLabel === children;
|
|
5193
|
-
return /* @__PURE__ */ (0,
|
|
5236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
|
|
5194
5237
|
"div",
|
|
5195
5238
|
{
|
|
5196
5239
|
className: clsx_default("select-item", disabled && "disabled", isSelected && "is-selected"),
|
|
@@ -5211,7 +5254,7 @@ SelectItem.displayName = "Select.Item";
|
|
|
5211
5254
|
var SelectItem_default = SelectItem;
|
|
5212
5255
|
|
|
5213
5256
|
// src/components/Select/Select.tsx
|
|
5214
|
-
var
|
|
5257
|
+
var import_jsx_runtime337 = require("react/jsx-runtime");
|
|
5215
5258
|
var ANIMATION_DURATION_MS3 = 200;
|
|
5216
5259
|
var SelectRoot = (props) => {
|
|
5217
5260
|
const {
|
|
@@ -5223,28 +5266,28 @@ var SelectRoot = (props) => {
|
|
|
5223
5266
|
error = false,
|
|
5224
5267
|
size = "md"
|
|
5225
5268
|
} = props;
|
|
5226
|
-
const itemChildren =
|
|
5227
|
-
(child) =>
|
|
5269
|
+
const itemChildren = import_react31.default.Children.toArray(children).filter(
|
|
5270
|
+
(child) => import_react31.default.isValidElement(child) && child.type === SelectItem_default
|
|
5228
5271
|
);
|
|
5229
5272
|
const isControlled = valueProp !== void 0;
|
|
5230
|
-
const [isOpen, setOpen] =
|
|
5231
|
-
const [uncontrolledLabel, setUncontrolledLabel] =
|
|
5232
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
5233
|
-
const controlledLabel =
|
|
5273
|
+
const [isOpen, setOpen] = import_react31.default.useState(false);
|
|
5274
|
+
const [uncontrolledLabel, setUncontrolledLabel] = import_react31.default.useState(null);
|
|
5275
|
+
const [uncontrolledValue, setUncontrolledValue] = import_react31.default.useState(void 0);
|
|
5276
|
+
const controlledLabel = import_react31.default.useMemo(() => {
|
|
5234
5277
|
if (!isControlled) return null;
|
|
5235
5278
|
const match = itemChildren.find((child) => child.props.value === valueProp);
|
|
5236
5279
|
return match ? match.props.children : null;
|
|
5237
5280
|
}, [isControlled, valueProp, itemChildren]);
|
|
5238
5281
|
const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
|
|
5239
5282
|
const selectedValue = isControlled ? valueProp : uncontrolledValue;
|
|
5240
|
-
const triggerRef =
|
|
5241
|
-
const contentRef =
|
|
5242
|
-
const [mounted, setMounted] =
|
|
5243
|
-
const [visible, setVisible] =
|
|
5244
|
-
|
|
5283
|
+
const triggerRef = import_react31.default.useRef(null);
|
|
5284
|
+
const contentRef = import_react31.default.useRef(null);
|
|
5285
|
+
const [mounted, setMounted] = import_react31.default.useState(false);
|
|
5286
|
+
const [visible, setVisible] = import_react31.default.useState(false);
|
|
5287
|
+
import_react31.default.useEffect(() => {
|
|
5245
5288
|
if (disabled && isOpen) setOpen(false);
|
|
5246
5289
|
}, [disabled, isOpen]);
|
|
5247
|
-
|
|
5290
|
+
import_react31.default.useEffect(() => {
|
|
5248
5291
|
if (isOpen) {
|
|
5249
5292
|
setMounted(true);
|
|
5250
5293
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -5254,12 +5297,12 @@ var SelectRoot = (props) => {
|
|
|
5254
5297
|
const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
|
|
5255
5298
|
return () => clearTimeout(t);
|
|
5256
5299
|
}, [isOpen]);
|
|
5257
|
-
const open =
|
|
5258
|
-
const close =
|
|
5259
|
-
const toggle =
|
|
5300
|
+
const open = import_react31.default.useCallback(() => setOpen(true), []);
|
|
5301
|
+
const close = import_react31.default.useCallback(() => setOpen(false), []);
|
|
5302
|
+
const toggle = import_react31.default.useCallback(() => setOpen((prev) => !prev), []);
|
|
5260
5303
|
useClickOutside_default([contentRef, triggerRef], close, isOpen);
|
|
5261
5304
|
const position = useAutoPosition_default(triggerRef, contentRef, mounted);
|
|
5262
|
-
const setSelected =
|
|
5305
|
+
const setSelected = import_react31.default.useCallback(
|
|
5263
5306
|
(label, itemValue) => {
|
|
5264
5307
|
if (!isControlled) {
|
|
5265
5308
|
setUncontrolledLabel(label);
|
|
@@ -5269,7 +5312,7 @@ var SelectRoot = (props) => {
|
|
|
5269
5312
|
},
|
|
5270
5313
|
[isControlled, onChange]
|
|
5271
5314
|
);
|
|
5272
|
-
const ctxValue =
|
|
5315
|
+
const ctxValue = import_react31.default.useMemo(
|
|
5273
5316
|
() => ({
|
|
5274
5317
|
isOpen,
|
|
5275
5318
|
mounted,
|
|
@@ -5291,7 +5334,7 @@ var SelectRoot = (props) => {
|
|
|
5291
5334
|
if (disabled) return;
|
|
5292
5335
|
toggle();
|
|
5293
5336
|
};
|
|
5294
|
-
return /* @__PURE__ */ (0,
|
|
5337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
|
|
5295
5338
|
"div",
|
|
5296
5339
|
{
|
|
5297
5340
|
className: clsx_default(
|
|
@@ -5302,7 +5345,7 @@ var SelectRoot = (props) => {
|
|
|
5302
5345
|
mounted && "is-open"
|
|
5303
5346
|
),
|
|
5304
5347
|
children: [
|
|
5305
|
-
/* @__PURE__ */ (0,
|
|
5348
|
+
/* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
|
|
5306
5349
|
"div",
|
|
5307
5350
|
{
|
|
5308
5351
|
ref: triggerRef,
|
|
@@ -5326,7 +5369,7 @@ var SelectRoot = (props) => {
|
|
|
5326
5369
|
}
|
|
5327
5370
|
},
|
|
5328
5371
|
children: [
|
|
5329
|
-
/* @__PURE__ */ (0,
|
|
5372
|
+
/* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
|
|
5330
5373
|
"span",
|
|
5331
5374
|
{
|
|
5332
5375
|
className: clsx_default(
|
|
@@ -5336,25 +5379,25 @@ var SelectRoot = (props) => {
|
|
|
5336
5379
|
children: selectedLabel ?? placeholder
|
|
5337
5380
|
}
|
|
5338
5381
|
),
|
|
5339
|
-
/* @__PURE__ */ (0,
|
|
5382
|
+
/* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
|
|
5340
5383
|
"span",
|
|
5341
5384
|
{
|
|
5342
5385
|
className: clsx_default("select-trigger-icon", isOpen && "open"),
|
|
5343
5386
|
"aria-hidden": true,
|
|
5344
|
-
children: /* @__PURE__ */ (0,
|
|
5387
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(ChevronDownIcon_default, {})
|
|
5345
5388
|
}
|
|
5346
5389
|
)
|
|
5347
5390
|
]
|
|
5348
5391
|
}
|
|
5349
5392
|
),
|
|
5350
|
-
mounted && /* @__PURE__ */ (0,
|
|
5393
|
+
mounted && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(Portal_default, { children: /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
|
|
5351
5394
|
"div",
|
|
5352
5395
|
{
|
|
5353
5396
|
className: clsx_default("lib-xplat-select-content", size, position.direction, stateClass),
|
|
5354
5397
|
ref: contentRef,
|
|
5355
5398
|
style: { ...position.position, width: triggerRef.current?.offsetWidth },
|
|
5356
5399
|
role: "listbox",
|
|
5357
|
-
children: /* @__PURE__ */ (0,
|
|
5400
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(context_default.Provider, { value: ctxValue, children: itemChildren })
|
|
5358
5401
|
}
|
|
5359
5402
|
) })
|
|
5360
5403
|
]
|
|
@@ -5368,7 +5411,7 @@ var Select = Object.assign(SelectRoot, {
|
|
|
5368
5411
|
var Select_default = Select;
|
|
5369
5412
|
|
|
5370
5413
|
// src/components/Skeleton/Skeleton.tsx
|
|
5371
|
-
var
|
|
5414
|
+
var import_jsx_runtime338 = require("react/jsx-runtime");
|
|
5372
5415
|
var SIZE_MAP = {
|
|
5373
5416
|
xs: "var(--spacing-space-1)",
|
|
5374
5417
|
sm: "var(--spacing-space-2)",
|
|
@@ -5384,7 +5427,7 @@ var Skeleton = (props) => {
|
|
|
5384
5427
|
...width != null && { width: SIZE_MAP[width] },
|
|
5385
5428
|
...height != null && { height: SIZE_MAP[height] }
|
|
5386
5429
|
};
|
|
5387
|
-
return /* @__PURE__ */ (0,
|
|
5430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
|
|
5388
5431
|
"div",
|
|
5389
5432
|
{
|
|
5390
5433
|
className: clsx_default("lib-xplat-skeleton", variant),
|
|
@@ -5397,20 +5440,20 @@ Skeleton.displayName = "Skeleton";
|
|
|
5397
5440
|
var Skeleton_default = Skeleton;
|
|
5398
5441
|
|
|
5399
5442
|
// src/components/Spinner/Spinner.tsx
|
|
5400
|
-
var
|
|
5443
|
+
var import_jsx_runtime339 = require("react/jsx-runtime");
|
|
5401
5444
|
var Spinner = (props) => {
|
|
5402
5445
|
const {
|
|
5403
5446
|
size = "md",
|
|
5404
5447
|
type = "brand"
|
|
5405
5448
|
} = props;
|
|
5406
|
-
return /* @__PURE__ */ (0,
|
|
5449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
|
|
5407
5450
|
"div",
|
|
5408
5451
|
{
|
|
5409
5452
|
className: clsx_default("lib-xplat-spinner", size, type),
|
|
5410
5453
|
role: "status",
|
|
5411
5454
|
"aria-label": "\uB85C\uB529 \uC911",
|
|
5412
|
-
children: /* @__PURE__ */ (0,
|
|
5413
|
-
/* @__PURE__ */ (0,
|
|
5455
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
5456
|
+
/* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
|
|
5414
5457
|
"circle",
|
|
5415
5458
|
{
|
|
5416
5459
|
className: "track",
|
|
@@ -5420,7 +5463,7 @@ var Spinner = (props) => {
|
|
|
5420
5463
|
strokeWidth: "3"
|
|
5421
5464
|
}
|
|
5422
5465
|
),
|
|
5423
|
-
/* @__PURE__ */ (0,
|
|
5466
|
+
/* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
|
|
5424
5467
|
"circle",
|
|
5425
5468
|
{
|
|
5426
5469
|
className: "indicator",
|
|
@@ -5439,20 +5482,20 @@ Spinner.displayName = "Spinner";
|
|
|
5439
5482
|
var Spinner_default = Spinner;
|
|
5440
5483
|
|
|
5441
5484
|
// src/components/Steps/Steps.tsx
|
|
5442
|
-
var
|
|
5485
|
+
var import_jsx_runtime340 = require("react/jsx-runtime");
|
|
5443
5486
|
var Steps = (props) => {
|
|
5444
5487
|
const {
|
|
5445
5488
|
items,
|
|
5446
5489
|
current,
|
|
5447
5490
|
type = "brand"
|
|
5448
5491
|
} = props;
|
|
5449
|
-
return /* @__PURE__ */ (0,
|
|
5492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime340.jsx)("div", { className: clsx_default("lib-xplat-steps", type), children: items.map((item, index) => {
|
|
5450
5493
|
const status = index < current ? "completed" : index === current ? "active" : "pending";
|
|
5451
|
-
return /* @__PURE__ */ (0,
|
|
5452
|
-
/* @__PURE__ */ (0,
|
|
5453
|
-
/* @__PURE__ */ (0,
|
|
5454
|
-
/* @__PURE__ */ (0,
|
|
5455
|
-
item.description && /* @__PURE__ */ (0,
|
|
5494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime340.jsxs)("div", { className: clsx_default("step-item", status), children: [
|
|
5495
|
+
/* @__PURE__ */ (0, import_jsx_runtime340.jsx)("div", { className: "step-circle", children: status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(CheckIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime340.jsx)("span", { children: index + 1 }) }),
|
|
5496
|
+
/* @__PURE__ */ (0, import_jsx_runtime340.jsxs)("div", { className: "step-content", children: [
|
|
5497
|
+
/* @__PURE__ */ (0, import_jsx_runtime340.jsx)("span", { className: "step-title", children: item.title }),
|
|
5498
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime340.jsx)("span", { className: "step-description", children: item.description })
|
|
5456
5499
|
] })
|
|
5457
5500
|
] }, index);
|
|
5458
5501
|
}) });
|
|
@@ -5461,8 +5504,8 @@ Steps.displayName = "Steps";
|
|
|
5461
5504
|
var Steps_default = Steps;
|
|
5462
5505
|
|
|
5463
5506
|
// src/components/Swiper/Swiper.tsx
|
|
5464
|
-
var
|
|
5465
|
-
var
|
|
5507
|
+
var import_react32 = __toESM(require("react"), 1);
|
|
5508
|
+
var import_jsx_runtime341 = require("react/jsx-runtime");
|
|
5466
5509
|
var Swiper = (props) => {
|
|
5467
5510
|
const {
|
|
5468
5511
|
auto = false,
|
|
@@ -5486,26 +5529,26 @@ var Swiper = (props) => {
|
|
|
5486
5529
|
const maxIndex = Math.max(0, totalSlides - viewItemCount);
|
|
5487
5530
|
const useLoop = loop && canSlide;
|
|
5488
5531
|
const cloneCount = useLoop ? totalSlides : 0;
|
|
5489
|
-
const extendedItems =
|
|
5532
|
+
const extendedItems = import_react32.default.useMemo(() => {
|
|
5490
5533
|
if (!useLoop) return items;
|
|
5491
5534
|
return [...items, ...items, ...items];
|
|
5492
5535
|
}, [items, useLoop]);
|
|
5493
5536
|
const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
|
|
5494
|
-
const [innerIndex, setInnerIndex] =
|
|
5537
|
+
const [innerIndex, setInnerIndex] = import_react32.default.useState(
|
|
5495
5538
|
useLoop ? cloneCount + initialIdx : initialIdx
|
|
5496
5539
|
);
|
|
5497
|
-
const [isDragging, setIsDragging] =
|
|
5498
|
-
const [dragOffset, setDragOffset] =
|
|
5499
|
-
const [animated, setAnimated] =
|
|
5500
|
-
const [containerWidth, setContainerWidth] =
|
|
5501
|
-
const containerRef =
|
|
5502
|
-
const startXRef =
|
|
5503
|
-
const startTimeRef =
|
|
5504
|
-
const autoplayTimerRef =
|
|
5505
|
-
const resumeTimeoutRef =
|
|
5506
|
-
const [paused, setPaused] =
|
|
5507
|
-
const initializedRef =
|
|
5508
|
-
|
|
5540
|
+
const [isDragging, setIsDragging] = import_react32.default.useState(false);
|
|
5541
|
+
const [dragOffset, setDragOffset] = import_react32.default.useState(0);
|
|
5542
|
+
const [animated, setAnimated] = import_react32.default.useState(false);
|
|
5543
|
+
const [containerWidth, setContainerWidth] = import_react32.default.useState(0);
|
|
5544
|
+
const containerRef = import_react32.default.useRef(null);
|
|
5545
|
+
const startXRef = import_react32.default.useRef(0);
|
|
5546
|
+
const startTimeRef = import_react32.default.useRef(0);
|
|
5547
|
+
const autoplayTimerRef = import_react32.default.useRef(null);
|
|
5548
|
+
const resumeTimeoutRef = import_react32.default.useRef(null);
|
|
5549
|
+
const [paused, setPaused] = import_react32.default.useState(false);
|
|
5550
|
+
const initializedRef = import_react32.default.useRef(false);
|
|
5551
|
+
import_react32.default.useEffect(() => {
|
|
5509
5552
|
const el = containerRef.current;
|
|
5510
5553
|
if (!el) return;
|
|
5511
5554
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -5528,7 +5571,7 @@ var Swiper = (props) => {
|
|
|
5528
5571
|
return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
|
|
5529
5572
|
};
|
|
5530
5573
|
const realIndex = getRealIndex(innerIndex);
|
|
5531
|
-
const moveToInner =
|
|
5574
|
+
const moveToInner = import_react32.default.useCallback(
|
|
5532
5575
|
(idx, withAnim = true) => {
|
|
5533
5576
|
if (!useLoop) {
|
|
5534
5577
|
setAnimated(withAnim);
|
|
@@ -5556,7 +5599,7 @@ var Swiper = (props) => {
|
|
|
5556
5599
|
},
|
|
5557
5600
|
[useLoop, cloneCount, totalSlides]
|
|
5558
5601
|
);
|
|
5559
|
-
const handleTransitionEnd =
|
|
5602
|
+
const handleTransitionEnd = import_react32.default.useCallback(() => {
|
|
5560
5603
|
if (!useLoop) return;
|
|
5561
5604
|
const real = getRealIndex(innerIndex);
|
|
5562
5605
|
const canonical = cloneCount + real;
|
|
@@ -5566,7 +5609,7 @@ var Swiper = (props) => {
|
|
|
5566
5609
|
}
|
|
5567
5610
|
onChange?.(Math.min(real, maxIndex));
|
|
5568
5611
|
}, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange]);
|
|
5569
|
-
const slideTo =
|
|
5612
|
+
const slideTo = import_react32.default.useCallback(
|
|
5570
5613
|
(logicalIndex) => {
|
|
5571
5614
|
if (!canSlide) return;
|
|
5572
5615
|
const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
|
|
@@ -5576,7 +5619,7 @@ var Swiper = (props) => {
|
|
|
5576
5619
|
},
|
|
5577
5620
|
[canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
|
|
5578
5621
|
);
|
|
5579
|
-
const slideNext =
|
|
5622
|
+
const slideNext = import_react32.default.useCallback(() => {
|
|
5580
5623
|
if (!canSlide) return;
|
|
5581
5624
|
const nextInner = innerIndex + slideBy;
|
|
5582
5625
|
if (useLoop) {
|
|
@@ -5585,7 +5628,7 @@ var Swiper = (props) => {
|
|
|
5585
5628
|
moveToInner(Math.min(nextInner, maxIndex), true);
|
|
5586
5629
|
}
|
|
5587
5630
|
}, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
|
|
5588
|
-
const slidePrev =
|
|
5631
|
+
const slidePrev = import_react32.default.useCallback(() => {
|
|
5589
5632
|
if (!canSlide) return;
|
|
5590
5633
|
const prevInner = innerIndex - slideBy;
|
|
5591
5634
|
if (useLoop) {
|
|
@@ -5594,7 +5637,7 @@ var Swiper = (props) => {
|
|
|
5594
5637
|
moveToInner(Math.max(prevInner, 0), true);
|
|
5595
5638
|
}
|
|
5596
5639
|
}, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
|
|
5597
|
-
|
|
5640
|
+
import_react32.default.useEffect(() => {
|
|
5598
5641
|
if (indexProp === void 0) return;
|
|
5599
5642
|
const clamped = Math.max(0, Math.min(indexProp, maxIndex));
|
|
5600
5643
|
const target = useLoop ? cloneCount + clamped : clamped;
|
|
@@ -5602,12 +5645,12 @@ var Swiper = (props) => {
|
|
|
5602
5645
|
moveToInner(target, true);
|
|
5603
5646
|
}
|
|
5604
5647
|
}, [indexProp]);
|
|
5605
|
-
|
|
5648
|
+
import_react32.default.useImperativeHandle(swiperRef, () => ({
|
|
5606
5649
|
slidePrev,
|
|
5607
5650
|
slideNext,
|
|
5608
5651
|
slideTo
|
|
5609
5652
|
}));
|
|
5610
|
-
|
|
5653
|
+
import_react32.default.useEffect(() => {
|
|
5611
5654
|
if (!auto || !canSlide || paused) return;
|
|
5612
5655
|
autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
|
|
5613
5656
|
return () => {
|
|
@@ -5633,7 +5676,7 @@ var Swiper = (props) => {
|
|
|
5633
5676
|
resumeTimeoutRef.current = null;
|
|
5634
5677
|
}, pauseOnInteraction);
|
|
5635
5678
|
};
|
|
5636
|
-
|
|
5679
|
+
import_react32.default.useEffect(() => {
|
|
5637
5680
|
return () => {
|
|
5638
5681
|
if (resumeTimeoutRef.current) clearTimeout(resumeTimeoutRef.current);
|
|
5639
5682
|
};
|
|
@@ -5651,7 +5694,7 @@ var Swiper = (props) => {
|
|
|
5651
5694
|
startXRef.current = getClientX(e);
|
|
5652
5695
|
startTimeRef.current = Date.now();
|
|
5653
5696
|
};
|
|
5654
|
-
|
|
5697
|
+
import_react32.default.useEffect(() => {
|
|
5655
5698
|
if (!isDragging) return;
|
|
5656
5699
|
const handleMove = (e) => {
|
|
5657
5700
|
setDragOffset(getClientX(e) - startXRef.current);
|
|
@@ -5690,8 +5733,8 @@ var Swiper = (props) => {
|
|
|
5690
5733
|
}, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
|
|
5691
5734
|
const slideWidthPercent = 100 / viewItemCount;
|
|
5692
5735
|
const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
|
|
5693
|
-
const slideElements =
|
|
5694
|
-
() => extendedItems.map((item, idx) => /* @__PURE__ */ (0,
|
|
5736
|
+
const slideElements = import_react32.default.useMemo(
|
|
5737
|
+
() => extendedItems.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
|
|
5695
5738
|
"div",
|
|
5696
5739
|
{
|
|
5697
5740
|
className: "lib-xplat-swiper__slide",
|
|
@@ -5710,15 +5753,15 @@ var Swiper = (props) => {
|
|
|
5710
5753
|
Math.floor(realIndex / slideBy),
|
|
5711
5754
|
totalSteps - 1
|
|
5712
5755
|
);
|
|
5713
|
-
return /* @__PURE__ */ (0,
|
|
5714
|
-
/* @__PURE__ */ (0,
|
|
5756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime341.jsxs)("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
|
|
5757
|
+
/* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
|
|
5715
5758
|
"div",
|
|
5716
5759
|
{
|
|
5717
5760
|
className: "lib-xplat-swiper__viewport",
|
|
5718
5761
|
onMouseDown: handleDragStart,
|
|
5719
5762
|
onTouchStart: handleDragStart,
|
|
5720
5763
|
onDragStart: (e) => e.preventDefault(),
|
|
5721
|
-
children: /* @__PURE__ */ (0,
|
|
5764
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
|
|
5722
5765
|
"div",
|
|
5723
5766
|
{
|
|
5724
5767
|
className: clsx_default(
|
|
@@ -5736,7 +5779,7 @@ var Swiper = (props) => {
|
|
|
5736
5779
|
)
|
|
5737
5780
|
}
|
|
5738
5781
|
),
|
|
5739
|
-
showProgress && canSlide && /* @__PURE__ */ (0,
|
|
5782
|
+
showProgress && canSlide && /* @__PURE__ */ (0, import_jsx_runtime341.jsx)("div", { className: "lib-xplat-swiper__progress", children: /* @__PURE__ */ (0, import_jsx_runtime341.jsx)("div", { className: "lib-xplat-swiper__progress-track", children: /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
|
|
5740
5783
|
"span",
|
|
5741
5784
|
{
|
|
5742
5785
|
className: "lib-xplat-swiper__progress-fill",
|
|
@@ -5746,7 +5789,7 @@ var Swiper = (props) => {
|
|
|
5746
5789
|
}
|
|
5747
5790
|
}
|
|
5748
5791
|
) }) }),
|
|
5749
|
-
canSlide && /* @__PURE__ */ (0,
|
|
5792
|
+
canSlide && /* @__PURE__ */ (0, import_jsx_runtime341.jsx)("div", { className: "lib-xplat-swiper__dots", children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
|
|
5750
5793
|
"button",
|
|
5751
5794
|
{
|
|
5752
5795
|
className: clsx_default(
|
|
@@ -5764,8 +5807,8 @@ Swiper.displayName = "Swiper";
|
|
|
5764
5807
|
var Swiper_default = Swiper;
|
|
5765
5808
|
|
|
5766
5809
|
// src/components/Switch/Switch.tsx
|
|
5767
|
-
var
|
|
5768
|
-
var
|
|
5810
|
+
var import_react33 = __toESM(require("react"), 1);
|
|
5811
|
+
var import_jsx_runtime342 = require("react/jsx-runtime");
|
|
5769
5812
|
var KNOB_TRANSITION_MS = 250;
|
|
5770
5813
|
var Switch = (props) => {
|
|
5771
5814
|
const {
|
|
@@ -5775,9 +5818,9 @@ var Switch = (props) => {
|
|
|
5775
5818
|
disabled,
|
|
5776
5819
|
onChange
|
|
5777
5820
|
} = props;
|
|
5778
|
-
const [isAnimating, setIsAnimating] =
|
|
5779
|
-
const timeoutRef =
|
|
5780
|
-
|
|
5821
|
+
const [isAnimating, setIsAnimating] = import_react33.default.useState(false);
|
|
5822
|
+
const timeoutRef = import_react33.default.useRef(null);
|
|
5823
|
+
import_react33.default.useEffect(() => {
|
|
5781
5824
|
return () => {
|
|
5782
5825
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5783
5826
|
};
|
|
@@ -5792,7 +5835,7 @@ var Switch = (props) => {
|
|
|
5792
5835
|
timeoutRef.current = null;
|
|
5793
5836
|
}, KNOB_TRANSITION_MS);
|
|
5794
5837
|
};
|
|
5795
|
-
return /* @__PURE__ */ (0,
|
|
5838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
|
|
5796
5839
|
"div",
|
|
5797
5840
|
{
|
|
5798
5841
|
className: clsx_default(
|
|
@@ -5805,7 +5848,7 @@ var Switch = (props) => {
|
|
|
5805
5848
|
),
|
|
5806
5849
|
onClick: handleClick,
|
|
5807
5850
|
"aria-disabled": disabled || isAnimating,
|
|
5808
|
-
children: /* @__PURE__ */ (0,
|
|
5851
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime342.jsx)("div", { className: clsx_default("knob", value ? "checked" : void 0) })
|
|
5809
5852
|
}
|
|
5810
5853
|
);
|
|
5811
5854
|
};
|
|
@@ -5813,17 +5856,17 @@ Switch.displayName = "Switch";
|
|
|
5813
5856
|
var Switch_default = Switch;
|
|
5814
5857
|
|
|
5815
5858
|
// src/components/Table/TableContext.tsx
|
|
5816
|
-
var
|
|
5817
|
-
var TableContext =
|
|
5859
|
+
var import_react34 = __toESM(require("react"), 1);
|
|
5860
|
+
var TableContext = import_react34.default.createContext(null);
|
|
5818
5861
|
var useTableContext = () => {
|
|
5819
|
-
const ctx =
|
|
5862
|
+
const ctx = import_react34.default.useContext(TableContext);
|
|
5820
5863
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
5821
5864
|
return ctx;
|
|
5822
5865
|
};
|
|
5823
5866
|
var TableContext_default = TableContext;
|
|
5824
5867
|
|
|
5825
5868
|
// src/components/Table/Table.tsx
|
|
5826
|
-
var
|
|
5869
|
+
var import_jsx_runtime343 = require("react/jsx-runtime");
|
|
5827
5870
|
var Table = (props) => {
|
|
5828
5871
|
const {
|
|
5829
5872
|
children,
|
|
@@ -5833,7 +5876,7 @@ var Table = (props) => {
|
|
|
5833
5876
|
headerSticky = false,
|
|
5834
5877
|
stickyShadow = true
|
|
5835
5878
|
} = props;
|
|
5836
|
-
return /* @__PURE__ */ (0,
|
|
5879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime343.jsx)("div", { className: `lib-xplat-table-wrapper ${size}`, children: /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(
|
|
5837
5880
|
TableContext_default.Provider,
|
|
5838
5881
|
{
|
|
5839
5882
|
value: {
|
|
@@ -5842,7 +5885,7 @@ var Table = (props) => {
|
|
|
5842
5885
|
headerSticky,
|
|
5843
5886
|
stickyShadow
|
|
5844
5887
|
},
|
|
5845
|
-
children: /* @__PURE__ */ (0,
|
|
5888
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime343.jsx)("table", { className: "lib-xplat-table", children })
|
|
5846
5889
|
}
|
|
5847
5890
|
) });
|
|
5848
5891
|
};
|
|
@@ -5850,41 +5893,41 @@ Table.displayName = "Table";
|
|
|
5850
5893
|
var Table_default = Table;
|
|
5851
5894
|
|
|
5852
5895
|
// src/components/Table/TableBody.tsx
|
|
5853
|
-
var
|
|
5896
|
+
var import_jsx_runtime344 = require("react/jsx-runtime");
|
|
5854
5897
|
var TableBody = (props) => {
|
|
5855
5898
|
const { children } = props;
|
|
5856
|
-
return /* @__PURE__ */ (0,
|
|
5899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("tbody", { children });
|
|
5857
5900
|
};
|
|
5858
5901
|
TableBody.displayName = "TableBody";
|
|
5859
5902
|
var TableBody_default = TableBody;
|
|
5860
5903
|
|
|
5861
5904
|
// src/components/Table/TableCell.tsx
|
|
5862
|
-
var
|
|
5905
|
+
var import_react37 = __toESM(require("react"), 1);
|
|
5863
5906
|
|
|
5864
5907
|
// src/components/Table/TableHeadContext.tsx
|
|
5865
|
-
var
|
|
5866
|
-
var TableHeadContext =
|
|
5908
|
+
var import_react35 = __toESM(require("react"), 1);
|
|
5909
|
+
var TableHeadContext = import_react35.default.createContext(
|
|
5867
5910
|
null
|
|
5868
5911
|
);
|
|
5869
5912
|
var useTableHeadContext = () => {
|
|
5870
|
-
const ctx =
|
|
5913
|
+
const ctx = import_react35.default.useContext(TableHeadContext);
|
|
5871
5914
|
return ctx;
|
|
5872
5915
|
};
|
|
5873
5916
|
var TableHeadContext_default = TableHeadContext;
|
|
5874
5917
|
|
|
5875
5918
|
// src/components/Table/TableRowContext.tsx
|
|
5876
|
-
var
|
|
5877
|
-
var TableRowContext =
|
|
5919
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
5920
|
+
var TableRowContext = import_react36.default.createContext(null);
|
|
5878
5921
|
var useTableRowContext = () => {
|
|
5879
|
-
const ctx =
|
|
5922
|
+
const ctx = import_react36.default.useContext(TableRowContext);
|
|
5880
5923
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
5881
5924
|
return ctx;
|
|
5882
5925
|
};
|
|
5883
5926
|
var TableRowContext_default = TableRowContext;
|
|
5884
5927
|
|
|
5885
5928
|
// src/components/Table/TableCell.tsx
|
|
5886
|
-
var
|
|
5887
|
-
var TableCell =
|
|
5929
|
+
var import_jsx_runtime345 = require("react/jsx-runtime");
|
|
5930
|
+
var TableCell = import_react37.default.memo((props) => {
|
|
5888
5931
|
const {
|
|
5889
5932
|
children,
|
|
5890
5933
|
align = "center",
|
|
@@ -5898,9 +5941,9 @@ var TableCell = import_react38.default.memo((props) => {
|
|
|
5898
5941
|
const { registerStickyCell, stickyCells } = useTableRowContext();
|
|
5899
5942
|
const { stickyShadow } = useTableContext();
|
|
5900
5943
|
const headContext = useTableHeadContext();
|
|
5901
|
-
const [left, setLeft] =
|
|
5902
|
-
const cellRef =
|
|
5903
|
-
const calculateLeft =
|
|
5944
|
+
const [left, setLeft] = import_react37.default.useState(0);
|
|
5945
|
+
const cellRef = import_react37.default.useRef(null);
|
|
5946
|
+
const calculateLeft = import_react37.default.useCallback(() => {
|
|
5904
5947
|
if (!cellRef.current) return 0;
|
|
5905
5948
|
let totalLeft = 0;
|
|
5906
5949
|
for (const ref of stickyCells) {
|
|
@@ -5909,7 +5952,7 @@ var TableCell = import_react38.default.memo((props) => {
|
|
|
5909
5952
|
}
|
|
5910
5953
|
return totalLeft;
|
|
5911
5954
|
}, [stickyCells]);
|
|
5912
|
-
|
|
5955
|
+
import_react37.default.useEffect(() => {
|
|
5913
5956
|
if (!isSticky || !cellRef.current) return;
|
|
5914
5957
|
registerStickyCell(cellRef);
|
|
5915
5958
|
setLeft(calculateLeft());
|
|
@@ -5928,7 +5971,7 @@ var TableCell = import_react38.default.memo((props) => {
|
|
|
5928
5971
|
const CellTag = isHeaderCell ? "th" : "td";
|
|
5929
5972
|
const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
|
|
5930
5973
|
const enableHover = headContext && headContext.cellHover;
|
|
5931
|
-
return /* @__PURE__ */ (0,
|
|
5974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
|
|
5932
5975
|
CellTag,
|
|
5933
5976
|
{
|
|
5934
5977
|
ref: cellRef,
|
|
@@ -5955,21 +5998,21 @@ TableCell.displayName = "TableCell";
|
|
|
5955
5998
|
var TableCell_default = TableCell;
|
|
5956
5999
|
|
|
5957
6000
|
// src/components/Table/TableHead.tsx
|
|
5958
|
-
var
|
|
6001
|
+
var import_jsx_runtime346 = require("react/jsx-runtime");
|
|
5959
6002
|
var TableHead = ({
|
|
5960
6003
|
children,
|
|
5961
6004
|
cellHover = false
|
|
5962
6005
|
}) => {
|
|
5963
6006
|
const { headerSticky } = useTableContext();
|
|
5964
|
-
return /* @__PURE__ */ (0,
|
|
6007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime346.jsx)(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ (0, import_jsx_runtime346.jsx)("thead", { className: clsx_default(headerSticky ? "table-sticky" : null), children }) });
|
|
5965
6008
|
};
|
|
5966
6009
|
TableHead.displayName = "TableHead";
|
|
5967
6010
|
var TableHead_default = TableHead;
|
|
5968
6011
|
|
|
5969
6012
|
// src/components/Table/TableRow.tsx
|
|
5970
|
-
var
|
|
5971
|
-
var
|
|
5972
|
-
var TableRow =
|
|
6013
|
+
var import_react38 = __toESM(require("react"), 1);
|
|
6014
|
+
var import_jsx_runtime347 = require("react/jsx-runtime");
|
|
6015
|
+
var TableRow = import_react38.default.memo((props) => {
|
|
5973
6016
|
const {
|
|
5974
6017
|
children,
|
|
5975
6018
|
type = "secondary",
|
|
@@ -5978,14 +6021,14 @@ var TableRow = import_react39.default.memo((props) => {
|
|
|
5978
6021
|
onClick
|
|
5979
6022
|
} = props;
|
|
5980
6023
|
const { rowBorderUse } = useTableContext();
|
|
5981
|
-
const [stickyCells, setStickyCells] =
|
|
6024
|
+
const [stickyCells, setStickyCells] = import_react38.default.useState([]);
|
|
5982
6025
|
const registerStickyCell = (ref) => {
|
|
5983
6026
|
setStickyCells((prev) => {
|
|
5984
6027
|
if (prev.includes(ref)) return prev;
|
|
5985
6028
|
return [...prev, ref];
|
|
5986
6029
|
});
|
|
5987
6030
|
};
|
|
5988
|
-
return /* @__PURE__ */ (0,
|
|
6031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(
|
|
5989
6032
|
"tr",
|
|
5990
6033
|
{
|
|
5991
6034
|
className: clsx_default(
|
|
@@ -6009,7 +6052,7 @@ TableRow.displayName = "TableRow";
|
|
|
6009
6052
|
var TableRow_default = TableRow;
|
|
6010
6053
|
|
|
6011
6054
|
// src/components/Tag/Tag.tsx
|
|
6012
|
-
var
|
|
6055
|
+
var import_jsx_runtime348 = require("react/jsx-runtime");
|
|
6013
6056
|
var Tag = (props) => {
|
|
6014
6057
|
const {
|
|
6015
6058
|
children,
|
|
@@ -6019,7 +6062,7 @@ var Tag = (props) => {
|
|
|
6019
6062
|
disabled = false,
|
|
6020
6063
|
colorIndex
|
|
6021
6064
|
} = props;
|
|
6022
|
-
return /* @__PURE__ */ (0,
|
|
6065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime348.jsxs)(
|
|
6023
6066
|
"span",
|
|
6024
6067
|
{
|
|
6025
6068
|
className: clsx_default(
|
|
@@ -6030,8 +6073,8 @@ var Tag = (props) => {
|
|
|
6030
6073
|
disabled && "disabled"
|
|
6031
6074
|
),
|
|
6032
6075
|
children: [
|
|
6033
|
-
/* @__PURE__ */ (0,
|
|
6034
|
-
onClose && /* @__PURE__ */ (0,
|
|
6076
|
+
/* @__PURE__ */ (0, import_jsx_runtime348.jsx)("span", { className: "tag-label", children }),
|
|
6077
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime348.jsx)("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", disabled, children: /* @__PURE__ */ (0, import_jsx_runtime348.jsx)(XIcon_default, {}) })
|
|
6035
6078
|
]
|
|
6036
6079
|
}
|
|
6037
6080
|
);
|
|
@@ -6040,9 +6083,9 @@ Tag.displayName = "Tag";
|
|
|
6040
6083
|
var Tag_default = Tag;
|
|
6041
6084
|
|
|
6042
6085
|
// src/components/TextArea/TextArea.tsx
|
|
6043
|
-
var
|
|
6044
|
-
var
|
|
6045
|
-
var TextArea =
|
|
6086
|
+
var import_react39 = __toESM(require("react"), 1);
|
|
6087
|
+
var import_jsx_runtime349 = require("react/jsx-runtime");
|
|
6088
|
+
var TextArea = import_react39.default.forwardRef(
|
|
6046
6089
|
(props, ref) => {
|
|
6047
6090
|
const {
|
|
6048
6091
|
className,
|
|
@@ -6052,7 +6095,7 @@ var TextArea = import_react40.default.forwardRef(
|
|
|
6052
6095
|
disabled,
|
|
6053
6096
|
...textareaProps
|
|
6054
6097
|
} = props;
|
|
6055
|
-
return /* @__PURE__ */ (0,
|
|
6098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime349.jsx)("div", { className: clsx_default("lib-xplat-textarea-wrap", className), children: /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
|
|
6056
6099
|
"textarea",
|
|
6057
6100
|
{
|
|
6058
6101
|
...textareaProps,
|
|
@@ -6069,25 +6112,25 @@ TextArea.displayName = "TextArea";
|
|
|
6069
6112
|
var TextArea_default = TextArea;
|
|
6070
6113
|
|
|
6071
6114
|
// src/components/Toast/Toast.tsx
|
|
6072
|
-
var
|
|
6115
|
+
var import_react40 = __toESM(require("react"), 1);
|
|
6073
6116
|
var import_react_dom4 = require("react-dom");
|
|
6074
|
-
var
|
|
6075
|
-
var ToastContext =
|
|
6117
|
+
var import_jsx_runtime350 = require("react/jsx-runtime");
|
|
6118
|
+
var ToastContext = import_react40.default.createContext(null);
|
|
6076
6119
|
var useToast = () => {
|
|
6077
|
-
const ctx =
|
|
6120
|
+
const ctx = import_react40.default.useContext(ToastContext);
|
|
6078
6121
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
6079
6122
|
return ctx;
|
|
6080
6123
|
};
|
|
6081
6124
|
var EXIT_DURATION = 300;
|
|
6082
6125
|
var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
6083
|
-
const ref =
|
|
6084
|
-
const [height, setHeight] =
|
|
6085
|
-
|
|
6126
|
+
const ref = import_react40.default.useRef(null);
|
|
6127
|
+
const [height, setHeight] = import_react40.default.useState(void 0);
|
|
6128
|
+
import_react40.default.useEffect(() => {
|
|
6086
6129
|
if (ref.current && !isExiting) {
|
|
6087
6130
|
setHeight(ref.current.offsetHeight);
|
|
6088
6131
|
}
|
|
6089
6132
|
}, [isExiting]);
|
|
6090
|
-
return /* @__PURE__ */ (0,
|
|
6133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
|
|
6091
6134
|
"div",
|
|
6092
6135
|
{
|
|
6093
6136
|
className: clsx_default("lib-xplat-toast-wrapper", { exit: isExiting }),
|
|
@@ -6095,15 +6138,15 @@ var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
|
6095
6138
|
maxHeight: isExiting ? 0 : height ?? "none",
|
|
6096
6139
|
marginBottom: isExiting ? 0 : void 0
|
|
6097
6140
|
},
|
|
6098
|
-
children: /* @__PURE__ */ (0,
|
|
6141
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)(
|
|
6099
6142
|
"div",
|
|
6100
6143
|
{
|
|
6101
6144
|
ref,
|
|
6102
6145
|
className: clsx_default("lib-xplat-toast", item.type, { exit: isExiting }),
|
|
6103
6146
|
role: "alert",
|
|
6104
6147
|
children: [
|
|
6105
|
-
/* @__PURE__ */ (0,
|
|
6106
|
-
/* @__PURE__ */ (0,
|
|
6148
|
+
/* @__PURE__ */ (0, import_jsx_runtime350.jsx)("span", { className: "message", children: item.message }),
|
|
6149
|
+
/* @__PURE__ */ (0, import_jsx_runtime350.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
6107
6150
|
]
|
|
6108
6151
|
}
|
|
6109
6152
|
)
|
|
@@ -6114,13 +6157,13 @@ var ToastProvider = ({
|
|
|
6114
6157
|
children,
|
|
6115
6158
|
position = "top-right"
|
|
6116
6159
|
}) => {
|
|
6117
|
-
const [toasts, setToasts] =
|
|
6118
|
-
const [removing, setRemoving] =
|
|
6119
|
-
const [mounted, setMounted] =
|
|
6120
|
-
|
|
6160
|
+
const [toasts, setToasts] = import_react40.default.useState([]);
|
|
6161
|
+
const [removing, setRemoving] = import_react40.default.useState(/* @__PURE__ */ new Set());
|
|
6162
|
+
const [mounted, setMounted] = import_react40.default.useState(false);
|
|
6163
|
+
import_react40.default.useEffect(() => {
|
|
6121
6164
|
setMounted(true);
|
|
6122
6165
|
}, []);
|
|
6123
|
-
const remove =
|
|
6166
|
+
const remove = import_react40.default.useCallback((id) => {
|
|
6124
6167
|
setRemoving((prev) => new Set(prev).add(id));
|
|
6125
6168
|
setTimeout(() => {
|
|
6126
6169
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
@@ -6131,7 +6174,7 @@ var ToastProvider = ({
|
|
|
6131
6174
|
});
|
|
6132
6175
|
}, EXIT_DURATION);
|
|
6133
6176
|
}, []);
|
|
6134
|
-
const toast =
|
|
6177
|
+
const toast = import_react40.default.useCallback(
|
|
6135
6178
|
(type, message, duration = 3e3) => {
|
|
6136
6179
|
const id = `${Date.now()}-${Math.random()}`;
|
|
6137
6180
|
setToasts((prev) => [...prev, { id, type, message }]);
|
|
@@ -6141,10 +6184,10 @@ var ToastProvider = ({
|
|
|
6141
6184
|
},
|
|
6142
6185
|
[remove]
|
|
6143
6186
|
);
|
|
6144
|
-
return /* @__PURE__ */ (0,
|
|
6187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)(ToastContext.Provider, { value: { toast }, children: [
|
|
6145
6188
|
children,
|
|
6146
6189
|
mounted && (0, import_react_dom4.createPortal)(
|
|
6147
|
-
/* @__PURE__ */ (0,
|
|
6190
|
+
/* @__PURE__ */ (0, import_jsx_runtime350.jsx)("div", { className: clsx_default("lib-xplat-toast-container", position), children: toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
|
|
6148
6191
|
ToastItemComponent,
|
|
6149
6192
|
{
|
|
6150
6193
|
item: t,
|
|
@@ -6160,68 +6203,112 @@ var ToastProvider = ({
|
|
|
6160
6203
|
ToastProvider.displayName = "ToastProvider";
|
|
6161
6204
|
|
|
6162
6205
|
// src/components/Tooltip/Tooltip.tsx
|
|
6163
|
-
var
|
|
6164
|
-
var
|
|
6206
|
+
var import_react41 = __toESM(require("react"), 1);
|
|
6207
|
+
var import_jsx_runtime351 = require("react/jsx-runtime");
|
|
6165
6208
|
var OFFSET = 12;
|
|
6209
|
+
var GAP = 8;
|
|
6166
6210
|
var SHOW_DELAY = 300;
|
|
6167
6211
|
var Tooltip = (props) => {
|
|
6168
6212
|
const {
|
|
6169
|
-
|
|
6213
|
+
children,
|
|
6170
6214
|
title,
|
|
6171
6215
|
description,
|
|
6172
|
-
|
|
6216
|
+
type = "dark",
|
|
6217
|
+
follow = false,
|
|
6173
6218
|
disabled = false
|
|
6174
6219
|
} = props;
|
|
6175
|
-
const triggerRef =
|
|
6176
|
-
const tooltipRef =
|
|
6177
|
-
const [visible, setVisible] =
|
|
6178
|
-
const [pos, setPos] =
|
|
6179
|
-
const delayTimer =
|
|
6180
|
-
const
|
|
6220
|
+
const triggerRef = import_react41.default.useRef(null);
|
|
6221
|
+
const tooltipRef = import_react41.default.useRef(null);
|
|
6222
|
+
const [visible, setVisible] = import_react41.default.useState(false);
|
|
6223
|
+
const [pos, setPos] = import_react41.default.useState({ left: 0, top: 0 });
|
|
6224
|
+
const delayTimer = import_react41.default.useRef(0);
|
|
6225
|
+
const rafRef = import_react41.default.useRef(0);
|
|
6226
|
+
const cursor = import_react41.default.useRef(null);
|
|
6227
|
+
const clamp = import_react41.default.useCallback((left, top, w, h) => {
|
|
6228
|
+
const vw = window.innerWidth;
|
|
6229
|
+
const vh = window.innerHeight;
|
|
6230
|
+
return {
|
|
6231
|
+
left: Math.min(Math.max(GAP, left), Math.max(GAP, vw - w - GAP)),
|
|
6232
|
+
top: Math.min(Math.max(GAP, top), Math.max(GAP, vh - h - GAP))
|
|
6233
|
+
};
|
|
6234
|
+
}, []);
|
|
6235
|
+
const placeAtCursor = import_react41.default.useCallback((x, y) => {
|
|
6181
6236
|
const el = tooltipRef.current;
|
|
6182
6237
|
if (!el) return;
|
|
6183
6238
|
const w = el.offsetWidth;
|
|
6184
6239
|
const h = el.offsetHeight;
|
|
6185
|
-
|
|
6186
|
-
let
|
|
6187
|
-
|
|
6188
|
-
if (
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6240
|
+
let left = x + OFFSET;
|
|
6241
|
+
let top = y - h - OFFSET;
|
|
6242
|
+
if (left + w > window.innerWidth - GAP) left = x - w - OFFSET;
|
|
6243
|
+
if (top < GAP) top = y + OFFSET;
|
|
6244
|
+
setPos(clamp(left, top, w, h));
|
|
6245
|
+
}, [clamp]);
|
|
6246
|
+
const placeAtTrigger = import_react41.default.useCallback(() => {
|
|
6247
|
+
const el = tooltipRef.current;
|
|
6248
|
+
const trigger = triggerRef.current;
|
|
6249
|
+
if (!el || !trigger) return;
|
|
6250
|
+
const w = el.offsetWidth;
|
|
6251
|
+
const h = el.offsetHeight;
|
|
6252
|
+
const rect = trigger.getBoundingClientRect();
|
|
6253
|
+
let top = rect.top - h - GAP;
|
|
6254
|
+
if (top < GAP) top = rect.bottom + GAP;
|
|
6255
|
+
const left = rect.left + rect.width / 2 - w / 2;
|
|
6256
|
+
setPos(clamp(left, top, w, h));
|
|
6257
|
+
}, [clamp]);
|
|
6258
|
+
const reposition = import_react41.default.useCallback(() => {
|
|
6259
|
+
if (follow && cursor.current) {
|
|
6260
|
+
placeAtCursor(cursor.current.x, cursor.current.y);
|
|
6261
|
+
} else {
|
|
6262
|
+
placeAtTrigger();
|
|
6263
|
+
}
|
|
6264
|
+
}, [follow, placeAtCursor, placeAtTrigger]);
|
|
6265
|
+
const handleMouseEnter = import_react41.default.useCallback((e) => {
|
|
6194
6266
|
if (disabled) return;
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
}, SHOW_DELAY);
|
|
6267
|
+
cursor.current = { x: e.clientX, y: e.clientY };
|
|
6268
|
+
delayTimer.current = window.setTimeout(() => setVisible(true), SHOW_DELAY);
|
|
6198
6269
|
}, [disabled]);
|
|
6199
|
-
const handleMouseMove =
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
}, []);
|
|
6207
|
-
const
|
|
6270
|
+
const handleMouseMove = import_react41.default.useCallback((e) => {
|
|
6271
|
+
cursor.current = { x: e.clientX, y: e.clientY };
|
|
6272
|
+
if (!visible || !follow) return;
|
|
6273
|
+
cancelAnimationFrame(rafRef.current);
|
|
6274
|
+
rafRef.current = requestAnimationFrame(() => {
|
|
6275
|
+
if (cursor.current) placeAtCursor(cursor.current.x, cursor.current.y);
|
|
6276
|
+
});
|
|
6277
|
+
}, [visible, follow, placeAtCursor]);
|
|
6278
|
+
const close = import_react41.default.useCallback(() => {
|
|
6208
6279
|
window.clearTimeout(delayTimer.current);
|
|
6280
|
+
cancelAnimationFrame(rafRef.current);
|
|
6209
6281
|
setVisible(false);
|
|
6210
6282
|
}, []);
|
|
6211
|
-
const
|
|
6283
|
+
const handleMouseLeave = import_react41.default.useCallback(() => {
|
|
6284
|
+
cursor.current = null;
|
|
6285
|
+
close();
|
|
6286
|
+
}, [close]);
|
|
6287
|
+
const handleFocus = import_react41.default.useCallback(() => {
|
|
6212
6288
|
if (disabled) return;
|
|
6289
|
+
cursor.current = null;
|
|
6213
6290
|
setVisible(true);
|
|
6214
6291
|
}, [disabled]);
|
|
6215
|
-
|
|
6216
|
-
|
|
6292
|
+
import_react41.default.useLayoutEffect(() => {
|
|
6293
|
+
if (!visible) return;
|
|
6294
|
+
reposition();
|
|
6295
|
+
}, [visible, reposition]);
|
|
6296
|
+
import_react41.default.useEffect(() => {
|
|
6297
|
+
if (!visible || follow) return;
|
|
6298
|
+
const onChange = () => placeAtTrigger();
|
|
6299
|
+
window.addEventListener("scroll", onChange, true);
|
|
6300
|
+
window.addEventListener("resize", onChange);
|
|
6301
|
+
return () => {
|
|
6302
|
+
window.removeEventListener("scroll", onChange, true);
|
|
6303
|
+
window.removeEventListener("resize", onChange);
|
|
6304
|
+
};
|
|
6305
|
+
}, [visible, follow, placeAtTrigger]);
|
|
6306
|
+
import_react41.default.useEffect(() => () => {
|
|
6307
|
+
window.clearTimeout(delayTimer.current);
|
|
6308
|
+
cancelAnimationFrame(rafRef.current);
|
|
6217
6309
|
}, []);
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
const rect = triggerRef.current.getBoundingClientRect();
|
|
6221
|
-
calculatePos(rect.right, rect.top);
|
|
6222
|
-
}, [visible, calculatePos]);
|
|
6223
|
-
if (!title && !description) return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(import_jsx_runtime350.Fragment, { children });
|
|
6224
|
-
return /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)(
|
|
6310
|
+
if (!title && !description) return /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(import_jsx_runtime351.Fragment, { children });
|
|
6311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime351.jsxs)(
|
|
6225
6312
|
"div",
|
|
6226
6313
|
{
|
|
6227
6314
|
ref: triggerRef,
|
|
@@ -6229,20 +6316,21 @@ var Tooltip = (props) => {
|
|
|
6229
6316
|
onMouseEnter: handleMouseEnter,
|
|
6230
6317
|
onMouseMove: handleMouseMove,
|
|
6231
6318
|
onMouseLeave: handleMouseLeave,
|
|
6232
|
-
onClick:
|
|
6319
|
+
onClick: close,
|
|
6233
6320
|
onFocus: handleFocus,
|
|
6234
|
-
onBlur:
|
|
6321
|
+
onBlur: close,
|
|
6235
6322
|
children: [
|
|
6236
6323
|
children,
|
|
6237
|
-
visible && /* @__PURE__ */ (0,
|
|
6324
|
+
visible && /* @__PURE__ */ (0, import_jsx_runtime351.jsx)(Portal_default, { children: /* @__PURE__ */ (0, import_jsx_runtime351.jsxs)(
|
|
6238
6325
|
"div",
|
|
6239
6326
|
{
|
|
6240
6327
|
ref: tooltipRef,
|
|
6328
|
+
role: "tooltip",
|
|
6241
6329
|
className: clsx_default("lib-xplat-tooltip", type),
|
|
6242
6330
|
style: { position: "fixed", left: pos.left, top: pos.top },
|
|
6243
6331
|
children: [
|
|
6244
|
-
title && /* @__PURE__ */ (0,
|
|
6245
|
-
description && /* @__PURE__ */ (0,
|
|
6332
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime351.jsx)("div", { className: "tooltip-title", children: title }),
|
|
6333
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime351.jsx)("div", { className: "tooltip-desc", children: description })
|
|
6246
6334
|
]
|
|
6247
6335
|
}
|
|
6248
6336
|
) })
|
|
@@ -6254,11 +6342,11 @@ Tooltip.displayName = "Tooltip";
|
|
|
6254
6342
|
var Tooltip_default = Tooltip;
|
|
6255
6343
|
|
|
6256
6344
|
// src/components/Video/Video.tsx
|
|
6257
|
-
var
|
|
6258
|
-
var
|
|
6259
|
-
var PipIcon = () => /* @__PURE__ */ (0,
|
|
6260
|
-
/* @__PURE__ */ (0,
|
|
6261
|
-
/* @__PURE__ */ (0,
|
|
6345
|
+
var import_react42 = __toESM(require("react"), 1);
|
|
6346
|
+
var import_jsx_runtime352 = require("react/jsx-runtime");
|
|
6347
|
+
var PipIcon = () => /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
6348
|
+
/* @__PURE__ */ (0, import_jsx_runtime352.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
6349
|
+
/* @__PURE__ */ (0, import_jsx_runtime352.jsx)("rect", { x: "12", y: "11", width: "7", height: "6", rx: "1", fill: "currentColor" })
|
|
6262
6350
|
] });
|
|
6263
6351
|
var formatTime = (sec) => {
|
|
6264
6352
|
if (!Number.isFinite(sec) || sec < 0) return "0:00";
|
|
@@ -6266,7 +6354,7 @@ var formatTime = (sec) => {
|
|
|
6266
6354
|
const s = Math.floor(sec % 60);
|
|
6267
6355
|
return `${m}:${s.toString().padStart(2, "0")}`;
|
|
6268
6356
|
};
|
|
6269
|
-
var Video =
|
|
6357
|
+
var Video = import_react42.default.forwardRef((props, ref) => {
|
|
6270
6358
|
const {
|
|
6271
6359
|
src,
|
|
6272
6360
|
poster,
|
|
@@ -6290,21 +6378,21 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
6290
6378
|
children,
|
|
6291
6379
|
...rest
|
|
6292
6380
|
} = props;
|
|
6293
|
-
const containerRef =
|
|
6294
|
-
const videoRef =
|
|
6295
|
-
const [isPlaying, setIsPlaying] =
|
|
6296
|
-
const [isLoaded, setIsLoaded] =
|
|
6297
|
-
const [currentTime, setCurrentTime] =
|
|
6298
|
-
const [duration, setDuration] =
|
|
6299
|
-
const [buffered, setBuffered] =
|
|
6300
|
-
const [volume, setVolume] =
|
|
6301
|
-
const [isMuted, setIsMuted] =
|
|
6302
|
-
const [isFullscreen, setIsFullscreen] =
|
|
6303
|
-
const [playbackRate, setPlaybackRate] =
|
|
6304
|
-
const [rateMenuOpen, setRateMenuOpen] =
|
|
6305
|
-
const [captionsOn, setCaptionsOn] =
|
|
6306
|
-
const [isPip, setIsPip] =
|
|
6307
|
-
const setRefs =
|
|
6381
|
+
const containerRef = import_react42.default.useRef(null);
|
|
6382
|
+
const videoRef = import_react42.default.useRef(null);
|
|
6383
|
+
const [isPlaying, setIsPlaying] = import_react42.default.useState(Boolean(autoPlay));
|
|
6384
|
+
const [isLoaded, setIsLoaded] = import_react42.default.useState(false);
|
|
6385
|
+
const [currentTime, setCurrentTime] = import_react42.default.useState(0);
|
|
6386
|
+
const [duration, setDuration] = import_react42.default.useState(0);
|
|
6387
|
+
const [buffered, setBuffered] = import_react42.default.useState(0);
|
|
6388
|
+
const [volume, setVolume] = import_react42.default.useState(1);
|
|
6389
|
+
const [isMuted, setIsMuted] = import_react42.default.useState(Boolean(muted));
|
|
6390
|
+
const [isFullscreen, setIsFullscreen] = import_react42.default.useState(false);
|
|
6391
|
+
const [playbackRate, setPlaybackRate] = import_react42.default.useState(1);
|
|
6392
|
+
const [rateMenuOpen, setRateMenuOpen] = import_react42.default.useState(false);
|
|
6393
|
+
const [captionsOn, setCaptionsOn] = import_react42.default.useState(false);
|
|
6394
|
+
const [isPip, setIsPip] = import_react42.default.useState(false);
|
|
6395
|
+
const setRefs = import_react42.default.useCallback(
|
|
6308
6396
|
(el) => {
|
|
6309
6397
|
videoRef.current = el;
|
|
6310
6398
|
if (typeof ref === "function") ref(el);
|
|
@@ -6312,14 +6400,14 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
6312
6400
|
},
|
|
6313
6401
|
[ref]
|
|
6314
6402
|
);
|
|
6315
|
-
|
|
6403
|
+
import_react42.default.useEffect(() => {
|
|
6316
6404
|
const onFsChange = () => {
|
|
6317
6405
|
setIsFullscreen(document.fullscreenElement === containerRef.current);
|
|
6318
6406
|
};
|
|
6319
6407
|
document.addEventListener("fullscreenchange", onFsChange);
|
|
6320
6408
|
return () => document.removeEventListener("fullscreenchange", onFsChange);
|
|
6321
6409
|
}, []);
|
|
6322
|
-
|
|
6410
|
+
import_react42.default.useEffect(() => {
|
|
6323
6411
|
const v = videoRef.current;
|
|
6324
6412
|
if (!v) return;
|
|
6325
6413
|
const onEnter = () => setIsPip(true);
|
|
@@ -6433,13 +6521,13 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
6433
6521
|
const volumePct = (isMuted ? 0 : volume) * 100;
|
|
6434
6522
|
const VolumeGlyph = isMuted || volume === 0 ? VolumeXIcon_default : volume < 0.5 ? VolumeIcon_default : Volume2Icon_default;
|
|
6435
6523
|
const pipSupported = typeof document !== "undefined" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled;
|
|
6436
|
-
return /* @__PURE__ */ (0,
|
|
6524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)(
|
|
6437
6525
|
"div",
|
|
6438
6526
|
{
|
|
6439
6527
|
ref: containerRef,
|
|
6440
6528
|
className: clsx_default("lib-xplat-video", showControls && "has-controls"),
|
|
6441
6529
|
children: [
|
|
6442
|
-
/* @__PURE__ */ (0,
|
|
6530
|
+
/* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
|
|
6443
6531
|
"video",
|
|
6444
6532
|
{
|
|
6445
6533
|
ref: setRefs,
|
|
@@ -6460,7 +6548,7 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
6460
6548
|
children
|
|
6461
6549
|
}
|
|
6462
6550
|
),
|
|
6463
|
-
showCenterPlay && /* @__PURE__ */ (0,
|
|
6551
|
+
showCenterPlay && /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
|
|
6464
6552
|
"button",
|
|
6465
6553
|
{
|
|
6466
6554
|
type: "button",
|
|
@@ -6472,11 +6560,11 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
6472
6560
|
onClick: togglePlay,
|
|
6473
6561
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
6474
6562
|
tabIndex: -1,
|
|
6475
|
-
children: /* @__PURE__ */ (0,
|
|
6563
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime352.jsx)("span", { className: "center-play-icon", children: /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(PlayCircleIcon_default, {}) })
|
|
6476
6564
|
}
|
|
6477
6565
|
),
|
|
6478
|
-
showControls && /* @__PURE__ */ (0,
|
|
6479
|
-
/* @__PURE__ */ (0,
|
|
6566
|
+
showControls && /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)("div", { className: "controls", onClick: (e) => e.stopPropagation(), children: [
|
|
6567
|
+
/* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
|
|
6480
6568
|
"input",
|
|
6481
6569
|
{
|
|
6482
6570
|
type: "range",
|
|
@@ -6493,29 +6581,29 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
6493
6581
|
}
|
|
6494
6582
|
}
|
|
6495
6583
|
),
|
|
6496
|
-
/* @__PURE__ */ (0,
|
|
6497
|
-
/* @__PURE__ */ (0,
|
|
6584
|
+
/* @__PURE__ */ (0, import_jsx_runtime352.jsxs)("div", { className: "controls-row", children: [
|
|
6585
|
+
/* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
|
|
6498
6586
|
"button",
|
|
6499
6587
|
{
|
|
6500
6588
|
type: "button",
|
|
6501
6589
|
className: "control-btn",
|
|
6502
6590
|
onClick: togglePlay,
|
|
6503
6591
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
6504
|
-
children: isPlaying ? /* @__PURE__ */ (0,
|
|
6592
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(PauseIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(PlayIcon_default, {})
|
|
6505
6593
|
}
|
|
6506
6594
|
),
|
|
6507
|
-
/* @__PURE__ */ (0,
|
|
6508
|
-
/* @__PURE__ */ (0,
|
|
6595
|
+
/* @__PURE__ */ (0, import_jsx_runtime352.jsxs)("div", { className: "volume-group", children: [
|
|
6596
|
+
/* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
|
|
6509
6597
|
"button",
|
|
6510
6598
|
{
|
|
6511
6599
|
type: "button",
|
|
6512
6600
|
className: "control-btn",
|
|
6513
6601
|
onClick: toggleMute,
|
|
6514
6602
|
"aria-label": isMuted ? "\uC74C\uC18C\uAC70 \uD574\uC81C" : "\uC74C\uC18C\uAC70",
|
|
6515
|
-
children: /* @__PURE__ */ (0,
|
|
6603
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(VolumeGlyph, {})
|
|
6516
6604
|
}
|
|
6517
6605
|
),
|
|
6518
|
-
/* @__PURE__ */ (0,
|
|
6606
|
+
/* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
|
|
6519
6607
|
"input",
|
|
6520
6608
|
{
|
|
6521
6609
|
type: "range",
|
|
@@ -6530,14 +6618,14 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
6530
6618
|
}
|
|
6531
6619
|
)
|
|
6532
6620
|
] }),
|
|
6533
|
-
/* @__PURE__ */ (0,
|
|
6621
|
+
/* @__PURE__ */ (0, import_jsx_runtime352.jsxs)("span", { className: "time", children: [
|
|
6534
6622
|
formatTime(currentTime),
|
|
6535
6623
|
" / ",
|
|
6536
6624
|
formatTime(duration)
|
|
6537
6625
|
] }),
|
|
6538
|
-
/* @__PURE__ */ (0,
|
|
6539
|
-
playbackRates && playbackRates.length > 0 && /* @__PURE__ */ (0,
|
|
6540
|
-
/* @__PURE__ */ (0,
|
|
6626
|
+
/* @__PURE__ */ (0, import_jsx_runtime352.jsx)("div", { className: "controls-spacer" }),
|
|
6627
|
+
playbackRates && playbackRates.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)("div", { className: clsx_default("rate-group", rateMenuOpen && "is-open"), children: [
|
|
6628
|
+
/* @__PURE__ */ (0, import_jsx_runtime352.jsxs)(
|
|
6541
6629
|
"button",
|
|
6542
6630
|
{
|
|
6543
6631
|
type: "button",
|
|
@@ -6551,7 +6639,7 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
6551
6639
|
]
|
|
6552
6640
|
}
|
|
6553
6641
|
),
|
|
6554
|
-
rateMenuOpen && /* @__PURE__ */ (0,
|
|
6642
|
+
rateMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime352.jsx)("ul", { className: "rate-menu", role: "menu", children: playbackRates.map((r2) => /* @__PURE__ */ (0, import_jsx_runtime352.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)(
|
|
6555
6643
|
"button",
|
|
6556
6644
|
{
|
|
6557
6645
|
type: "button",
|
|
@@ -6565,7 +6653,7 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
6565
6653
|
}
|
|
6566
6654
|
) }, r2)) })
|
|
6567
6655
|
] }),
|
|
6568
|
-
showCaptions && /* @__PURE__ */ (0,
|
|
6656
|
+
showCaptions && /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
|
|
6569
6657
|
"button",
|
|
6570
6658
|
{
|
|
6571
6659
|
type: "button",
|
|
@@ -6573,37 +6661,37 @@ var Video = import_react43.default.forwardRef((props, ref) => {
|
|
|
6573
6661
|
onClick: toggleCaptions,
|
|
6574
6662
|
"aria-label": captionsOn ? "\uC790\uB9C9 \uB044\uAE30" : "\uC790\uB9C9 \uCF1C\uAE30",
|
|
6575
6663
|
"aria-pressed": captionsOn,
|
|
6576
|
-
children: /* @__PURE__ */ (0,
|
|
6664
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(TypeIcon_default, {})
|
|
6577
6665
|
}
|
|
6578
6666
|
),
|
|
6579
|
-
showPip && pipSupported && /* @__PURE__ */ (0,
|
|
6667
|
+
showPip && pipSupported && /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
|
|
6580
6668
|
"button",
|
|
6581
6669
|
{
|
|
6582
6670
|
type: "button",
|
|
6583
6671
|
className: clsx_default("control-btn", isPip && "is-active"),
|
|
6584
6672
|
onClick: togglePip,
|
|
6585
6673
|
"aria-label": isPip ? "PIP \uC885\uB8CC" : "PIP",
|
|
6586
|
-
children: /* @__PURE__ */ (0,
|
|
6674
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(PipIcon, {})
|
|
6587
6675
|
}
|
|
6588
6676
|
),
|
|
6589
|
-
showDownload && /* @__PURE__ */ (0,
|
|
6677
|
+
showDownload && /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
|
|
6590
6678
|
"a",
|
|
6591
6679
|
{
|
|
6592
6680
|
className: "control-btn",
|
|
6593
6681
|
href: src,
|
|
6594
6682
|
download: downloadFileName ?? true,
|
|
6595
6683
|
"aria-label": "\uB2E4\uC6B4\uB85C\uB4DC",
|
|
6596
|
-
children: /* @__PURE__ */ (0,
|
|
6684
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(DownloadIcon_default, {})
|
|
6597
6685
|
}
|
|
6598
6686
|
),
|
|
6599
|
-
/* @__PURE__ */ (0,
|
|
6687
|
+
/* @__PURE__ */ (0, import_jsx_runtime352.jsx)(
|
|
6600
6688
|
"button",
|
|
6601
6689
|
{
|
|
6602
6690
|
type: "button",
|
|
6603
6691
|
className: "control-btn",
|
|
6604
6692
|
onClick: toggleFullscreen,
|
|
6605
6693
|
"aria-label": isFullscreen ? "\uC804\uCCB4\uD654\uBA74 \uC885\uB8CC" : "\uC804\uCCB4\uD654\uBA74",
|
|
6606
|
-
children: isFullscreen ? /* @__PURE__ */ (0,
|
|
6694
|
+
children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(MinimizeIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime352.jsx)(MaximizeIcon_default, {})
|
|
6607
6695
|
}
|
|
6608
6696
|
)
|
|
6609
6697
|
] })
|
|
@@ -6642,6 +6730,8 @@ var Video_default = Video;
|
|
|
6642
6730
|
ImageSelector,
|
|
6643
6731
|
Input,
|
|
6644
6732
|
InputDatePicker,
|
|
6733
|
+
Link,
|
|
6734
|
+
LinkButton,
|
|
6645
6735
|
Modal,
|
|
6646
6736
|
NotificationBadge,
|
|
6647
6737
|
Pagination,
|