@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
package/dist/components/index.js
CHANGED
|
@@ -2207,9 +2207,16 @@ var useChartTooltip = (enabled) => {
|
|
|
2207
2207
|
}, []);
|
|
2208
2208
|
return { tooltip, show, hide, move, containerRef };
|
|
2209
2209
|
};
|
|
2210
|
+
var formatTick = (value, maxVal) => {
|
|
2211
|
+
const step = maxVal / 4;
|
|
2212
|
+
if (!Number.isFinite(step) || step <= 0) return "0";
|
|
2213
|
+
const decimals = step >= 1 ? 0 : Math.min(4, Math.ceil(-Math.log10(step)));
|
|
2214
|
+
const fixed = value.toFixed(decimals);
|
|
2215
|
+
return decimals === 0 ? Number(fixed).toLocaleString("en-US") : fixed;
|
|
2216
|
+
};
|
|
2210
2217
|
var GridLines = React6.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ jsx305(Fragment2, { children: [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
|
|
2211
2218
|
const y = PADDING.top + (1 - ratio) * chartH;
|
|
2212
|
-
const val =
|
|
2219
|
+
const val = formatTick(maxVal * ratio, maxVal);
|
|
2213
2220
|
return /* @__PURE__ */ jsxs195("g", { children: [
|
|
2214
2221
|
/* @__PURE__ */ jsx305("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
|
|
2215
2222
|
/* @__PURE__ */ jsx305("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
|
|
@@ -2879,7 +2886,7 @@ Chip.displayName = "Chip";
|
|
|
2879
2886
|
var Chip_default = Chip;
|
|
2880
2887
|
|
|
2881
2888
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
2882
|
-
import
|
|
2889
|
+
import React12 from "react";
|
|
2883
2890
|
|
|
2884
2891
|
// src/components/Input/Input.tsx
|
|
2885
2892
|
import React8 from "react";
|
|
@@ -3070,38 +3077,26 @@ PasswordInput.displayName = "PasswordInput";
|
|
|
3070
3077
|
var PasswordInput_default = PasswordInput;
|
|
3071
3078
|
|
|
3072
3079
|
// src/components/Modal/Modal.tsx
|
|
3073
|
-
import React11 from "react";
|
|
3074
|
-
import { createPortal } from "react-dom";
|
|
3075
|
-
|
|
3076
|
-
// src/tokens/hooks/Portal.tsx
|
|
3077
3080
|
import React10 from "react";
|
|
3078
|
-
import
|
|
3081
|
+
import { createPortal } from "react-dom";
|
|
3079
3082
|
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
3080
|
-
var PortalContainerContext = React10.createContext(null);
|
|
3081
|
-
var PortalProvider = ({ container, children }) => /* @__PURE__ */ jsx313(PortalContainerContext.Provider, { value: container, children });
|
|
3082
|
-
var Portal = ({ children }) => {
|
|
3083
|
-
const contextContainer = React10.useContext(PortalContainerContext);
|
|
3084
|
-
if (typeof document === "undefined") return null;
|
|
3085
|
-
const container = contextContainer ?? document.body;
|
|
3086
|
-
return ReactDOM.createPortal(children, container);
|
|
3087
|
-
};
|
|
3088
|
-
Portal.displayName = "Portal";
|
|
3089
|
-
var Portal_default = Portal;
|
|
3090
|
-
|
|
3091
|
-
// src/components/Modal/Modal.tsx
|
|
3092
|
-
import { jsx as jsx314 } from "react/jsx-runtime";
|
|
3093
3083
|
var ANIMATION_DURATION_MS = 200;
|
|
3094
3084
|
var Modal = (props) => {
|
|
3095
3085
|
const { isOpen, onClose, children } = props;
|
|
3096
|
-
const [mounted, setMounted] =
|
|
3097
|
-
const [visible, setVisible] =
|
|
3098
|
-
const
|
|
3099
|
-
|
|
3086
|
+
const [mounted, setMounted] = React10.useState(false);
|
|
3087
|
+
const [visible, setVisible] = React10.useState(false);
|
|
3088
|
+
const [settled, setSettled] = React10.useState(false);
|
|
3089
|
+
React10.useEffect(() => {
|
|
3100
3090
|
if (isOpen) {
|
|
3101
3091
|
setMounted(true);
|
|
3102
|
-
const
|
|
3103
|
-
|
|
3092
|
+
const show = setTimeout(() => setVisible(true), 1);
|
|
3093
|
+
const settle = setTimeout(() => setSettled(true), ANIMATION_DURATION_MS + 50);
|
|
3094
|
+
return () => {
|
|
3095
|
+
clearTimeout(show);
|
|
3096
|
+
clearTimeout(settle);
|
|
3097
|
+
};
|
|
3104
3098
|
}
|
|
3099
|
+
setSettled(false);
|
|
3105
3100
|
setVisible(false);
|
|
3106
3101
|
const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS);
|
|
3107
3102
|
return () => clearTimeout(t);
|
|
@@ -3110,20 +3105,19 @@ var Modal = (props) => {
|
|
|
3110
3105
|
if (!mounted) return null;
|
|
3111
3106
|
const stateClass = visible ? "enter" : "exit";
|
|
3112
3107
|
return createPortal(
|
|
3113
|
-
/* @__PURE__ */
|
|
3108
|
+
/* @__PURE__ */ jsx313(
|
|
3114
3109
|
"div",
|
|
3115
3110
|
{
|
|
3116
3111
|
className: clsx_default("lib-xplat-modal", "dim", stateClass),
|
|
3117
3112
|
onClick: onClose,
|
|
3118
|
-
children: /* @__PURE__ */
|
|
3113
|
+
children: /* @__PURE__ */ jsx313(
|
|
3119
3114
|
"div",
|
|
3120
3115
|
{
|
|
3121
|
-
|
|
3122
|
-
className: clsx_default("lib-xplat-modal", "modal-box", stateClass),
|
|
3116
|
+
className: clsx_default("lib-xplat-modal", "modal-box", stateClass, settled && "settled"),
|
|
3123
3117
|
role: "dialog",
|
|
3124
3118
|
"aria-modal": "true",
|
|
3125
3119
|
onClick: (e) => e.stopPropagation(),
|
|
3126
|
-
children
|
|
3120
|
+
children
|
|
3127
3121
|
}
|
|
3128
3122
|
)
|
|
3129
3123
|
}
|
|
@@ -3135,9 +3129,9 @@ Modal.displayName = "Modal";
|
|
|
3135
3129
|
var Modal_default = Modal;
|
|
3136
3130
|
|
|
3137
3131
|
// src/components/DatePicker/SingleDatePicker/index.tsx
|
|
3138
|
-
import
|
|
3139
|
-
import { Fragment as Fragment3, jsx as
|
|
3140
|
-
var DayCell2 =
|
|
3132
|
+
import React11 from "react";
|
|
3133
|
+
import { Fragment as Fragment3, jsx as jsx314, jsxs as jsxs200 } from "react/jsx-runtime";
|
|
3134
|
+
var DayCell2 = React11.memo(
|
|
3141
3135
|
({
|
|
3142
3136
|
day,
|
|
3143
3137
|
disabled,
|
|
@@ -3147,7 +3141,7 @@ var DayCell2 = React12.memo(
|
|
|
3147
3141
|
isEnd,
|
|
3148
3142
|
inRange,
|
|
3149
3143
|
onSelect
|
|
3150
|
-
}) => /* @__PURE__ */
|
|
3144
|
+
}) => /* @__PURE__ */ jsx314(
|
|
3151
3145
|
"button",
|
|
3152
3146
|
{
|
|
3153
3147
|
type: "button",
|
|
@@ -3189,26 +3183,26 @@ var SingleDatePicker = (props) => {
|
|
|
3189
3183
|
initialYear,
|
|
3190
3184
|
initialMonth
|
|
3191
3185
|
);
|
|
3192
|
-
const [pickerMode, setPickerMode] =
|
|
3193
|
-
const [yearRangeStart, setYearRangeStart] =
|
|
3186
|
+
const [pickerMode, setPickerMode] = React11.useState("days");
|
|
3187
|
+
const [yearRangeStart, setYearRangeStart] = React11.useState(
|
|
3194
3188
|
Math.floor((initialYear ?? (/* @__PURE__ */ new Date()).getFullYear()) / 12) * 12
|
|
3195
3189
|
);
|
|
3196
|
-
const minTime =
|
|
3190
|
+
const minTime = React11.useMemo(
|
|
3197
3191
|
() => minDate ? new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()).getTime() : -Infinity,
|
|
3198
3192
|
[minDate]
|
|
3199
3193
|
);
|
|
3200
|
-
const maxTime =
|
|
3194
|
+
const maxTime = React11.useMemo(
|
|
3201
3195
|
() => maxDate ? new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate()).getTime() : Infinity,
|
|
3202
3196
|
[maxDate]
|
|
3203
3197
|
);
|
|
3204
|
-
const highlightSet =
|
|
3198
|
+
const highlightSet = React11.useMemo(() => {
|
|
3205
3199
|
const set = /* @__PURE__ */ new Set();
|
|
3206
3200
|
for (const h of highlightDates) {
|
|
3207
3201
|
set.add(`${h.getFullYear()}-${h.getMonth()}-${h.getDate()}`);
|
|
3208
3202
|
}
|
|
3209
3203
|
return set;
|
|
3210
3204
|
}, [highlightDates]);
|
|
3211
|
-
const handleSelect =
|
|
3205
|
+
const handleSelect = React11.useCallback(
|
|
3212
3206
|
(date) => {
|
|
3213
3207
|
onChange?.(date);
|
|
3214
3208
|
},
|
|
@@ -3251,14 +3245,14 @@ var SingleDatePicker = (props) => {
|
|
|
3251
3245
|
className: clsx_default("lib-xplat-datepicker", "single"),
|
|
3252
3246
|
children: [
|
|
3253
3247
|
/* @__PURE__ */ jsxs200("div", { className: "datepicker-header", children: [
|
|
3254
|
-
/* @__PURE__ */
|
|
3255
|
-
/* @__PURE__ */
|
|
3256
|
-
/* @__PURE__ */
|
|
3248
|
+
/* @__PURE__ */ jsx314("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ jsx314(ChevronLeftIcon_default, {}) }),
|
|
3249
|
+
/* @__PURE__ */ jsx314("button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
|
|
3250
|
+
/* @__PURE__ */ jsx314("button", { className: "datepicker-nav", onClick: handleNext, type: "button", children: /* @__PURE__ */ jsx314(ChevronRightIcon_default, {}) })
|
|
3257
3251
|
] }),
|
|
3258
3252
|
/* @__PURE__ */ jsxs200("div", { className: "datepicker-body", children: [
|
|
3259
|
-
pickerMode === "years" && /* @__PURE__ */
|
|
3253
|
+
pickerMode === "years" && /* @__PURE__ */ jsx314("div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
|
|
3260
3254
|
const y = yearRangeStart + i;
|
|
3261
|
-
return /* @__PURE__ */
|
|
3255
|
+
return /* @__PURE__ */ jsx314(
|
|
3262
3256
|
"button",
|
|
3263
3257
|
{
|
|
3264
3258
|
type: "button",
|
|
@@ -3269,7 +3263,7 @@ var SingleDatePicker = (props) => {
|
|
|
3269
3263
|
y
|
|
3270
3264
|
);
|
|
3271
3265
|
}) }),
|
|
3272
|
-
pickerMode === "months" && /* @__PURE__ */
|
|
3266
|
+
pickerMode === "months" && /* @__PURE__ */ jsx314("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ jsx314(
|
|
3273
3267
|
"button",
|
|
3274
3268
|
{
|
|
3275
3269
|
type: "button",
|
|
@@ -3280,7 +3274,7 @@ var SingleDatePicker = (props) => {
|
|
|
3280
3274
|
i
|
|
3281
3275
|
)) }),
|
|
3282
3276
|
pickerMode === "days" && /* @__PURE__ */ jsxs200(Fragment3, { children: [
|
|
3283
|
-
/* @__PURE__ */
|
|
3277
|
+
/* @__PURE__ */ jsx314("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ jsx314(
|
|
3284
3278
|
"div",
|
|
3285
3279
|
{
|
|
3286
3280
|
className: clsx_default(
|
|
@@ -3292,7 +3286,7 @@ var SingleDatePicker = (props) => {
|
|
|
3292
3286
|
},
|
|
3293
3287
|
label
|
|
3294
3288
|
)) }),
|
|
3295
|
-
/* @__PURE__ */
|
|
3289
|
+
/* @__PURE__ */ jsx314("div", { className: "datepicker-grid", children: days.map((day, idx) => {
|
|
3296
3290
|
const t = day.date.getTime();
|
|
3297
3291
|
const disabled = t < minTime || t > maxTime;
|
|
3298
3292
|
const selected = value ? isSameDay(day.date, value) : false;
|
|
@@ -3302,7 +3296,7 @@ var SingleDatePicker = (props) => {
|
|
|
3302
3296
|
const isStart = hasRange ? isSameDay(day.date, rangeStart) : false;
|
|
3303
3297
|
const isEnd = hasRange ? isSameDay(day.date, rangeEnd) : false;
|
|
3304
3298
|
const inRangeVal = hasRange ? isInRange(day.date, rangeStart, rangeEnd) : false;
|
|
3305
|
-
return /* @__PURE__ */
|
|
3299
|
+
return /* @__PURE__ */ jsx314(
|
|
3306
3300
|
DayCell2,
|
|
3307
3301
|
{
|
|
3308
3302
|
day,
|
|
@@ -3327,7 +3321,7 @@ SingleDatePicker.displayName = "SingleDatePicker";
|
|
|
3327
3321
|
var SingleDatePicker_default = SingleDatePicker;
|
|
3328
3322
|
|
|
3329
3323
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
3330
|
-
import { jsx as
|
|
3324
|
+
import { jsx as jsx315, jsxs as jsxs201 } from "react/jsx-runtime";
|
|
3331
3325
|
var formatDate = (date) => {
|
|
3332
3326
|
if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
|
|
3333
3327
|
const y = date.getFullYear();
|
|
@@ -3337,8 +3331,8 @@ var formatDate = (date) => {
|
|
|
3337
3331
|
};
|
|
3338
3332
|
var InputDatePicker = (props) => {
|
|
3339
3333
|
const { value, onChange, minDate, maxDate, disabled, locale = "ko", placeholder } = props;
|
|
3340
|
-
const [isOpen, setIsOpen] =
|
|
3341
|
-
const [tempDate, setTempDate] =
|
|
3334
|
+
const [isOpen, setIsOpen] = React12.useState(false);
|
|
3335
|
+
const [tempDate, setTempDate] = React12.useState(value ?? /* @__PURE__ */ new Date());
|
|
3342
3336
|
const handleOpen = () => {
|
|
3343
3337
|
if (disabled) return;
|
|
3344
3338
|
setTempDate(value ?? /* @__PURE__ */ new Date());
|
|
@@ -3355,18 +3349,18 @@ var InputDatePicker = (props) => {
|
|
|
3355
3349
|
setIsOpen(false);
|
|
3356
3350
|
};
|
|
3357
3351
|
return /* @__PURE__ */ jsxs201("div", { className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"), children: [
|
|
3358
|
-
/* @__PURE__ */
|
|
3352
|
+
/* @__PURE__ */ jsx315("div", { className: "input-datepicker-trigger", onClick: handleOpen, children: /* @__PURE__ */ jsx315(
|
|
3359
3353
|
Input_default,
|
|
3360
3354
|
{
|
|
3361
3355
|
value: formatDate(value),
|
|
3362
3356
|
placeholder,
|
|
3363
|
-
suffix: /* @__PURE__ */
|
|
3357
|
+
suffix: /* @__PURE__ */ jsx315(CalenderIcon_default, {}),
|
|
3364
3358
|
disabled,
|
|
3365
3359
|
readOnly: true
|
|
3366
3360
|
}
|
|
3367
3361
|
) }),
|
|
3368
|
-
/* @__PURE__ */
|
|
3369
|
-
/* @__PURE__ */
|
|
3362
|
+
/* @__PURE__ */ jsx315(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsxs201("div", { className: "lib-xplat-popup-datepicker-card", children: [
|
|
3363
|
+
/* @__PURE__ */ jsx315("div", { className: "popup-datepicker-content", children: /* @__PURE__ */ jsx315(
|
|
3370
3364
|
SingleDatePicker_default,
|
|
3371
3365
|
{
|
|
3372
3366
|
value: tempDate,
|
|
@@ -3377,8 +3371,8 @@ var InputDatePicker = (props) => {
|
|
|
3377
3371
|
}
|
|
3378
3372
|
) }),
|
|
3379
3373
|
/* @__PURE__ */ jsxs201("div", { className: "popup-datepicker-footer", children: [
|
|
3380
|
-
/* @__PURE__ */
|
|
3381
|
-
/* @__PURE__ */
|
|
3374
|
+
/* @__PURE__ */ jsx315(Button_default, { type: "secondary", onClick: handleClose, children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel" }),
|
|
3375
|
+
/* @__PURE__ */ jsx315(Button_default, { type: "primary", onClick: handleApply, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
|
|
3382
3376
|
] })
|
|
3383
3377
|
] }) })
|
|
3384
3378
|
] });
|
|
@@ -3387,20 +3381,20 @@ InputDatePicker.displayName = "InputDatePicker";
|
|
|
3387
3381
|
var InputDatePicker_default = InputDatePicker;
|
|
3388
3382
|
|
|
3389
3383
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
3390
|
-
import
|
|
3384
|
+
import React16 from "react";
|
|
3391
3385
|
|
|
3392
3386
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
3393
|
-
import
|
|
3387
|
+
import React15 from "react";
|
|
3394
3388
|
|
|
3395
3389
|
// src/components/Tab/Tab.tsx
|
|
3396
|
-
import
|
|
3390
|
+
import React14 from "react";
|
|
3397
3391
|
|
|
3398
3392
|
// src/components/Tab/TabItem.tsx
|
|
3399
|
-
import
|
|
3400
|
-
import { jsx as
|
|
3401
|
-
var TabItem =
|
|
3393
|
+
import React13 from "react";
|
|
3394
|
+
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
3395
|
+
var TabItem = React13.forwardRef((props, ref) => {
|
|
3402
3396
|
const { isActive: isActive2, title, onClick } = props;
|
|
3403
|
-
return /* @__PURE__ */
|
|
3397
|
+
return /* @__PURE__ */ jsx316(
|
|
3404
3398
|
"div",
|
|
3405
3399
|
{
|
|
3406
3400
|
ref,
|
|
@@ -3414,25 +3408,25 @@ TabItem.displayName = "TabItem";
|
|
|
3414
3408
|
var TabItem_default = TabItem;
|
|
3415
3409
|
|
|
3416
3410
|
// src/components/Tab/Tab.tsx
|
|
3417
|
-
import { jsx as
|
|
3411
|
+
import { jsx as jsx317, jsxs as jsxs202 } from "react/jsx-runtime";
|
|
3418
3412
|
var Tab = (props) => {
|
|
3419
3413
|
const { activeIndex, onChange, tabs, type, size = "md" } = props;
|
|
3420
|
-
const [underlineStyle, setUnderlineStyle] =
|
|
3414
|
+
const [underlineStyle, setUnderlineStyle] = React14.useState({
|
|
3421
3415
|
left: 0,
|
|
3422
3416
|
width: 0
|
|
3423
3417
|
});
|
|
3424
|
-
const itemRefs =
|
|
3418
|
+
const itemRefs = React14.useRef([]);
|
|
3425
3419
|
const handleChangeActiveTab = (tabItem, tabIdx) => {
|
|
3426
3420
|
onChange(tabItem, tabIdx);
|
|
3427
3421
|
};
|
|
3428
|
-
|
|
3422
|
+
React14.useEffect(() => {
|
|
3429
3423
|
const el = itemRefs.current[activeIndex];
|
|
3430
3424
|
if (el) {
|
|
3431
3425
|
setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
|
|
3432
3426
|
}
|
|
3433
3427
|
}, [activeIndex, tabs.length]);
|
|
3434
3428
|
return /* @__PURE__ */ jsxs202("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
|
|
3435
|
-
tabs.map((tab, idx) => /* @__PURE__ */
|
|
3429
|
+
tabs.map((tab, idx) => /* @__PURE__ */ jsx317(
|
|
3436
3430
|
TabItem_default,
|
|
3437
3431
|
{
|
|
3438
3432
|
onClick: () => handleChangeActiveTab(tab, idx),
|
|
@@ -3444,7 +3438,7 @@ var Tab = (props) => {
|
|
|
3444
3438
|
},
|
|
3445
3439
|
`${tab.value}_${idx}`
|
|
3446
3440
|
)),
|
|
3447
|
-
type === "toggle" && /* @__PURE__ */
|
|
3441
|
+
type === "toggle" && /* @__PURE__ */ jsx317(
|
|
3448
3442
|
"div",
|
|
3449
3443
|
{
|
|
3450
3444
|
className: "tab-toggle-underline",
|
|
@@ -3460,7 +3454,7 @@ Tab.displayName = "Tab";
|
|
|
3460
3454
|
var Tab_default = Tab;
|
|
3461
3455
|
|
|
3462
3456
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
3463
|
-
import { jsx as
|
|
3457
|
+
import { jsx as jsx318, jsxs as jsxs203 } from "react/jsx-runtime";
|
|
3464
3458
|
var RangePicker = (props) => {
|
|
3465
3459
|
const {
|
|
3466
3460
|
startDate,
|
|
@@ -3470,7 +3464,7 @@ var RangePicker = (props) => {
|
|
|
3470
3464
|
maxDate,
|
|
3471
3465
|
locale = "ko"
|
|
3472
3466
|
} = props;
|
|
3473
|
-
const [activeTab, setActiveTab] =
|
|
3467
|
+
const [activeTab, setActiveTab] = React15.useState("start");
|
|
3474
3468
|
const handleStartChange = (date) => {
|
|
3475
3469
|
if (!date) return;
|
|
3476
3470
|
const newStart = date > endDate ? endDate : date;
|
|
@@ -3484,7 +3478,7 @@ var RangePicker = (props) => {
|
|
|
3484
3478
|
const startMaxDate = maxDate && endDate < maxDate ? endDate : endDate;
|
|
3485
3479
|
const endMinDate = minDate && startDate > minDate ? startDate : startDate;
|
|
3486
3480
|
return /* @__PURE__ */ jsxs203("div", { className: clsx_default("lib-xplat-datepicker", "range"), children: [
|
|
3487
|
-
/* @__PURE__ */
|
|
3481
|
+
/* @__PURE__ */ jsx318("div", { className: "datepicker-range-tabs", children: /* @__PURE__ */ jsx318(
|
|
3488
3482
|
Tab_default,
|
|
3489
3483
|
{
|
|
3490
3484
|
activeIndex: activeTab === "start" ? 0 : 1,
|
|
@@ -3498,7 +3492,7 @@ var RangePicker = (props) => {
|
|
|
3498
3492
|
}
|
|
3499
3493
|
) }),
|
|
3500
3494
|
/* @__PURE__ */ jsxs203("div", { className: "datepicker-range-panels", children: [
|
|
3501
|
-
/* @__PURE__ */
|
|
3495
|
+
/* @__PURE__ */ jsx318(
|
|
3502
3496
|
SingleDatePicker_default,
|
|
3503
3497
|
{
|
|
3504
3498
|
value: startDate,
|
|
@@ -3510,7 +3504,7 @@ var RangePicker = (props) => {
|
|
|
3510
3504
|
locale
|
|
3511
3505
|
}
|
|
3512
3506
|
),
|
|
3513
|
-
/* @__PURE__ */
|
|
3507
|
+
/* @__PURE__ */ jsx318(
|
|
3514
3508
|
SingleDatePicker_default,
|
|
3515
3509
|
{
|
|
3516
3510
|
value: endDate,
|
|
@@ -3523,7 +3517,7 @@ var RangePicker = (props) => {
|
|
|
3523
3517
|
}
|
|
3524
3518
|
)
|
|
3525
3519
|
] }),
|
|
3526
|
-
/* @__PURE__ */
|
|
3520
|
+
/* @__PURE__ */ jsx318("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? /* @__PURE__ */ jsx318(
|
|
3527
3521
|
SingleDatePicker_default,
|
|
3528
3522
|
{
|
|
3529
3523
|
value: startDate,
|
|
@@ -3534,7 +3528,7 @@ var RangePicker = (props) => {
|
|
|
3534
3528
|
rangeEnd: endDate,
|
|
3535
3529
|
locale
|
|
3536
3530
|
}
|
|
3537
|
-
) : /* @__PURE__ */
|
|
3531
|
+
) : /* @__PURE__ */ jsx318(
|
|
3538
3532
|
SingleDatePicker_default,
|
|
3539
3533
|
{
|
|
3540
3534
|
value: endDate,
|
|
@@ -3552,10 +3546,10 @@ RangePicker.displayName = "RangePicker";
|
|
|
3552
3546
|
var RangePicker_default = RangePicker;
|
|
3553
3547
|
|
|
3554
3548
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
3555
|
-
import { jsx as
|
|
3549
|
+
import { jsx as jsx319, jsxs as jsxs204 } from "react/jsx-runtime";
|
|
3556
3550
|
var PopupPicker = (props) => {
|
|
3557
3551
|
const { component, type, locale } = props;
|
|
3558
|
-
const [isOpen, setIsOpen] =
|
|
3552
|
+
const [isOpen, setIsOpen] = React16.useState(false);
|
|
3559
3553
|
const handleClick = () => setIsOpen(true);
|
|
3560
3554
|
const handleClose = () => setIsOpen(false);
|
|
3561
3555
|
const handleSingleChange = (date) => {
|
|
@@ -3564,10 +3558,10 @@ var PopupPicker = (props) => {
|
|
|
3564
3558
|
handleClose();
|
|
3565
3559
|
};
|
|
3566
3560
|
return /* @__PURE__ */ jsxs204("div", { className: "lib-xplat-popup-datepicker", children: [
|
|
3567
|
-
|
|
3568
|
-
/* @__PURE__ */
|
|
3561
|
+
React16.cloneElement(component, { onClick: handleClick }),
|
|
3562
|
+
/* @__PURE__ */ jsx319(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsxs204("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
|
|
3569
3563
|
/* @__PURE__ */ jsxs204("div", { className: "popup-datepicker-content", children: [
|
|
3570
|
-
type === "single" && /* @__PURE__ */
|
|
3564
|
+
type === "single" && /* @__PURE__ */ jsx319(
|
|
3571
3565
|
SingleDatePicker_default,
|
|
3572
3566
|
{
|
|
3573
3567
|
value: props.value,
|
|
@@ -3577,7 +3571,7 @@ var PopupPicker = (props) => {
|
|
|
3577
3571
|
locale
|
|
3578
3572
|
}
|
|
3579
3573
|
),
|
|
3580
|
-
type === "range" && /* @__PURE__ */
|
|
3574
|
+
type === "range" && /* @__PURE__ */ jsx319(
|
|
3581
3575
|
RangePicker_default,
|
|
3582
3576
|
{
|
|
3583
3577
|
startDate: props.startDate,
|
|
@@ -3590,7 +3584,7 @@ var PopupPicker = (props) => {
|
|
|
3590
3584
|
)
|
|
3591
3585
|
] }),
|
|
3592
3586
|
/* @__PURE__ */ jsxs204("div", { className: "popup-datepicker-footer", children: [
|
|
3593
|
-
/* @__PURE__ */
|
|
3587
|
+
/* @__PURE__ */ jsx319(
|
|
3594
3588
|
Button_default,
|
|
3595
3589
|
{
|
|
3596
3590
|
type: "secondary",
|
|
@@ -3598,7 +3592,7 @@ var PopupPicker = (props) => {
|
|
|
3598
3592
|
children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel"
|
|
3599
3593
|
}
|
|
3600
3594
|
),
|
|
3601
|
-
/* @__PURE__ */
|
|
3595
|
+
/* @__PURE__ */ jsx319(Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
|
|
3602
3596
|
] })
|
|
3603
3597
|
] }) })
|
|
3604
3598
|
] });
|
|
@@ -3607,10 +3601,10 @@ PopupPicker.displayName = "PopupPicker";
|
|
|
3607
3601
|
var PopupPicker_default = PopupPicker;
|
|
3608
3602
|
|
|
3609
3603
|
// src/components/Divider/Divider.tsx
|
|
3610
|
-
import { jsx as
|
|
3604
|
+
import { jsx as jsx320 } from "react/jsx-runtime";
|
|
3611
3605
|
var Divider = (props) => {
|
|
3612
3606
|
const { orientation = "horizontal" } = props;
|
|
3613
|
-
return /* @__PURE__ */
|
|
3607
|
+
return /* @__PURE__ */ jsx320(
|
|
3614
3608
|
"div",
|
|
3615
3609
|
{
|
|
3616
3610
|
className: clsx_default("lib-xplat-divider", orientation),
|
|
@@ -3623,15 +3617,15 @@ Divider.displayName = "Divider";
|
|
|
3623
3617
|
var Divider_default = Divider;
|
|
3624
3618
|
|
|
3625
3619
|
// src/components/Drawer/Drawer.tsx
|
|
3626
|
-
import
|
|
3620
|
+
import React17 from "react";
|
|
3627
3621
|
import { createPortal as createPortal2 } from "react-dom";
|
|
3628
|
-
import { jsx as
|
|
3622
|
+
import { jsx as jsx321, jsxs as jsxs205 } from "react/jsx-runtime";
|
|
3629
3623
|
var ANIMATION_DURATION_MS2 = 250;
|
|
3630
3624
|
var Drawer = (props) => {
|
|
3631
3625
|
const { isOpen, onClose, placement = "right", size = "md", title, children } = props;
|
|
3632
|
-
const [mounted, setMounted] =
|
|
3633
|
-
const [visible, setVisible] =
|
|
3634
|
-
|
|
3626
|
+
const [mounted, setMounted] = React17.useState(false);
|
|
3627
|
+
const [visible, setVisible] = React17.useState(false);
|
|
3628
|
+
React17.useEffect(() => {
|
|
3635
3629
|
if (isOpen) {
|
|
3636
3630
|
setMounted(true);
|
|
3637
3631
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -3645,7 +3639,7 @@ var Drawer = (props) => {
|
|
|
3645
3639
|
if (!mounted) return null;
|
|
3646
3640
|
const stateClass = visible ? "enter" : "exit";
|
|
3647
3641
|
return createPortal2(
|
|
3648
|
-
/* @__PURE__ */
|
|
3642
|
+
/* @__PURE__ */ jsx321(
|
|
3649
3643
|
"div",
|
|
3650
3644
|
{
|
|
3651
3645
|
className: clsx_default("lib-xplat-drawer-overlay", stateClass),
|
|
@@ -3659,10 +3653,10 @@ var Drawer = (props) => {
|
|
|
3659
3653
|
onClick: (e) => e.stopPropagation(),
|
|
3660
3654
|
children: [
|
|
3661
3655
|
title && /* @__PURE__ */ jsxs205("div", { className: "drawer-header", children: [
|
|
3662
|
-
/* @__PURE__ */
|
|
3663
|
-
/* @__PURE__ */
|
|
3656
|
+
/* @__PURE__ */ jsx321("span", { className: "drawer-title", children: title }),
|
|
3657
|
+
/* @__PURE__ */ jsx321("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
3664
3658
|
] }),
|
|
3665
|
-
/* @__PURE__ */
|
|
3659
|
+
/* @__PURE__ */ jsx321("div", { className: "drawer-body", children })
|
|
3666
3660
|
]
|
|
3667
3661
|
}
|
|
3668
3662
|
)
|
|
@@ -3675,16 +3669,25 @@ Drawer.displayName = "Drawer";
|
|
|
3675
3669
|
var Drawer_default = Drawer;
|
|
3676
3670
|
|
|
3677
3671
|
// src/components/Dropdown/Dropdown.tsx
|
|
3678
|
-
import
|
|
3672
|
+
import React20 from "react";
|
|
3673
|
+
|
|
3674
|
+
// src/tokens/hooks/Portal.tsx
|
|
3675
|
+
import ReactDOM from "react-dom";
|
|
3676
|
+
var Portal = ({ children }) => {
|
|
3677
|
+
if (typeof document === "undefined") return null;
|
|
3678
|
+
return ReactDOM.createPortal(children, document.body);
|
|
3679
|
+
};
|
|
3680
|
+
Portal.displayName = "Portal";
|
|
3681
|
+
var Portal_default = Portal;
|
|
3679
3682
|
|
|
3680
3683
|
// src/tokens/hooks/useAutoPosition.ts
|
|
3681
|
-
import
|
|
3684
|
+
import React18 from "react";
|
|
3682
3685
|
var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
3683
|
-
const [position, setPosition] =
|
|
3686
|
+
const [position, setPosition] = React18.useState({
|
|
3684
3687
|
position: {},
|
|
3685
3688
|
direction: "bottom"
|
|
3686
3689
|
});
|
|
3687
|
-
const calculatePosition =
|
|
3690
|
+
const calculatePosition = React18.useCallback(() => {
|
|
3688
3691
|
if (!triggerRef.current || !popRef.current) return;
|
|
3689
3692
|
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
3690
3693
|
const popW = popRef.current.offsetWidth;
|
|
@@ -3711,13 +3714,13 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
3711
3714
|
direction
|
|
3712
3715
|
});
|
|
3713
3716
|
}, [triggerRef, popRef]);
|
|
3714
|
-
|
|
3717
|
+
React18.useLayoutEffect(() => {
|
|
3715
3718
|
if (!enabled) return;
|
|
3716
3719
|
calculatePosition();
|
|
3717
3720
|
const raf = requestAnimationFrame(calculatePosition);
|
|
3718
3721
|
return () => cancelAnimationFrame(raf);
|
|
3719
3722
|
}, [calculatePosition, enabled]);
|
|
3720
|
-
|
|
3723
|
+
React18.useEffect(() => {
|
|
3721
3724
|
if (!enabled || !popRef.current) return;
|
|
3722
3725
|
const observer = new ResizeObserver(() => {
|
|
3723
3726
|
calculatePosition();
|
|
@@ -3725,7 +3728,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
3725
3728
|
observer.observe(popRef.current);
|
|
3726
3729
|
return () => observer.disconnect();
|
|
3727
3730
|
}, [calculatePosition, enabled, popRef]);
|
|
3728
|
-
|
|
3731
|
+
React18.useEffect(() => {
|
|
3729
3732
|
if (!enabled) return;
|
|
3730
3733
|
window.addEventListener("resize", calculatePosition);
|
|
3731
3734
|
window.addEventListener("scroll", calculatePosition, true);
|
|
@@ -3739,9 +3742,9 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
3739
3742
|
var useAutoPosition_default = useAutoPosition;
|
|
3740
3743
|
|
|
3741
3744
|
// src/tokens/hooks/useClickOutside.ts
|
|
3742
|
-
import
|
|
3745
|
+
import React19 from "react";
|
|
3743
3746
|
var useClickOutside = (refs, handler, enabled = true) => {
|
|
3744
|
-
|
|
3747
|
+
React19.useEffect(() => {
|
|
3745
3748
|
if (!enabled) return;
|
|
3746
3749
|
const refArray = Array.isArray(refs) ? refs : [refs];
|
|
3747
3750
|
const listener = (event) => {
|
|
@@ -3764,17 +3767,17 @@ var useClickOutside = (refs, handler, enabled = true) => {
|
|
|
3764
3767
|
var useClickOutside_default = useClickOutside;
|
|
3765
3768
|
|
|
3766
3769
|
// src/components/Dropdown/Dropdown.tsx
|
|
3767
|
-
import { jsx as
|
|
3770
|
+
import { jsx as jsx322, jsxs as jsxs206 } from "react/jsx-runtime";
|
|
3768
3771
|
var Dropdown = (props) => {
|
|
3769
3772
|
const { items, children } = props;
|
|
3770
|
-
const [isOpen, setIsOpen] =
|
|
3771
|
-
const [mounted, setMounted] =
|
|
3772
|
-
const [visible, setVisible] =
|
|
3773
|
-
const triggerRef =
|
|
3774
|
-
const menuRef =
|
|
3773
|
+
const [isOpen, setIsOpen] = React20.useState(false);
|
|
3774
|
+
const [mounted, setMounted] = React20.useState(false);
|
|
3775
|
+
const [visible, setVisible] = React20.useState(false);
|
|
3776
|
+
const triggerRef = React20.useRef(null);
|
|
3777
|
+
const menuRef = React20.useRef(null);
|
|
3775
3778
|
const { position, direction } = useAutoPosition_default(triggerRef, menuRef, mounted);
|
|
3776
3779
|
useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false), isOpen);
|
|
3777
|
-
|
|
3780
|
+
React20.useEffect(() => {
|
|
3778
3781
|
if (isOpen) {
|
|
3779
3782
|
setMounted(true);
|
|
3780
3783
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -3790,7 +3793,7 @@ var Dropdown = (props) => {
|
|
|
3790
3793
|
setIsOpen(false);
|
|
3791
3794
|
};
|
|
3792
3795
|
return /* @__PURE__ */ jsxs206("div", { className: "lib-xplat-dropdown", children: [
|
|
3793
|
-
/* @__PURE__ */
|
|
3796
|
+
/* @__PURE__ */ jsx322(
|
|
3794
3797
|
"div",
|
|
3795
3798
|
{
|
|
3796
3799
|
ref: triggerRef,
|
|
@@ -3799,14 +3802,14 @@ var Dropdown = (props) => {
|
|
|
3799
3802
|
children
|
|
3800
3803
|
}
|
|
3801
3804
|
),
|
|
3802
|
-
mounted && /* @__PURE__ */
|
|
3805
|
+
mounted && /* @__PURE__ */ jsx322(Portal_default, { children: /* @__PURE__ */ jsx322(
|
|
3803
3806
|
"div",
|
|
3804
3807
|
{
|
|
3805
3808
|
ref: menuRef,
|
|
3806
3809
|
className: clsx_default("lib-xplat-dropdown-menu", direction, { visible }),
|
|
3807
3810
|
style: { top: position.top, left: position.left },
|
|
3808
3811
|
role: "menu",
|
|
3809
|
-
children: items.map((item) => /* @__PURE__ */
|
|
3812
|
+
children: items.map((item) => /* @__PURE__ */ jsx322(
|
|
3810
3813
|
"button",
|
|
3811
3814
|
{
|
|
3812
3815
|
className: clsx_default("dropdown-item", {
|
|
@@ -3828,8 +3831,8 @@ Dropdown.displayName = "Dropdown";
|
|
|
3828
3831
|
var Dropdown_default = Dropdown;
|
|
3829
3832
|
|
|
3830
3833
|
// src/components/Editor/Editor.tsx
|
|
3831
|
-
import
|
|
3832
|
-
import { jsx as
|
|
3834
|
+
import React21 from "react";
|
|
3835
|
+
import { jsx as jsx323, jsxs as jsxs207 } from "react/jsx-runtime";
|
|
3833
3836
|
var DEFAULT_TOOLBAR = [
|
|
3834
3837
|
"bold",
|
|
3835
3838
|
"italic",
|
|
@@ -3936,21 +3939,21 @@ var Editor = (props) => {
|
|
|
3936
3939
|
onImageUpload,
|
|
3937
3940
|
minHeight = 200
|
|
3938
3941
|
} = props;
|
|
3939
|
-
const editorRef =
|
|
3940
|
-
const lastRangeRef =
|
|
3941
|
-
const composingRef =
|
|
3942
|
-
const [isFocused, setIsFocused] =
|
|
3943
|
-
const [isEmpty, setIsEmpty] =
|
|
3944
|
-
const [activeFormats, setActiveFormats] =
|
|
3945
|
-
const [slashOpen, setSlashOpen] =
|
|
3946
|
-
const [slashFilter, setSlashFilter] =
|
|
3947
|
-
const [slashIdx, setSlashIdx] =
|
|
3948
|
-
const [slashPos, setSlashPos] =
|
|
3949
|
-
const slashStartRangeRef =
|
|
3950
|
-
const [linkOpen, setLinkOpen] =
|
|
3951
|
-
const [linkValue, setLinkValue] =
|
|
3952
|
-
const [linkPos, setLinkPos] =
|
|
3953
|
-
|
|
3942
|
+
const editorRef = React21.useRef(null);
|
|
3943
|
+
const lastRangeRef = React21.useRef(null);
|
|
3944
|
+
const composingRef = React21.useRef(false);
|
|
3945
|
+
const [isFocused, setIsFocused] = React21.useState(false);
|
|
3946
|
+
const [isEmpty, setIsEmpty] = React21.useState(!value);
|
|
3947
|
+
const [activeFormats, setActiveFormats] = React21.useState(/* @__PURE__ */ new Set());
|
|
3948
|
+
const [slashOpen, setSlashOpen] = React21.useState(false);
|
|
3949
|
+
const [slashFilter, setSlashFilter] = React21.useState("");
|
|
3950
|
+
const [slashIdx, setSlashIdx] = React21.useState(0);
|
|
3951
|
+
const [slashPos, setSlashPos] = React21.useState({ top: 0, left: 0 });
|
|
3952
|
+
const slashStartRangeRef = React21.useRef(null);
|
|
3953
|
+
const [linkOpen, setLinkOpen] = React21.useState(false);
|
|
3954
|
+
const [linkValue, setLinkValue] = React21.useState("");
|
|
3955
|
+
const [linkPos, setLinkPos] = React21.useState({ top: 0, left: 0 });
|
|
3956
|
+
React21.useEffect(() => {
|
|
3954
3957
|
if (!editorRef.current) return;
|
|
3955
3958
|
if (editorRef.current.innerHTML !== value) {
|
|
3956
3959
|
editorRef.current.innerHTML = sanitizeHtml(value || "");
|
|
@@ -4064,7 +4067,7 @@ var Editor = (props) => {
|
|
|
4064
4067
|
setSlashIdx(0);
|
|
4065
4068
|
slashStartRangeRef.current = null;
|
|
4066
4069
|
};
|
|
4067
|
-
const filteredSlashItems =
|
|
4070
|
+
const filteredSlashItems = React21.useMemo(() => {
|
|
4068
4071
|
if (!slashFilter) return SLASH_ITEMS;
|
|
4069
4072
|
const f = slashFilter.toLowerCase();
|
|
4070
4073
|
return SLASH_ITEMS.filter((it) => it.label.toLowerCase().includes(f) || it.key.includes(f));
|
|
@@ -4350,7 +4353,7 @@ var Editor = (props) => {
|
|
|
4350
4353
|
}
|
|
4351
4354
|
};
|
|
4352
4355
|
return /* @__PURE__ */ jsxs207("div", { className: clsx_default("lib-xplat-editor", isFocused && "focused", readOnly && "readonly"), children: [
|
|
4353
|
-
!readOnly && /* @__PURE__ */
|
|
4356
|
+
!readOnly && /* @__PURE__ */ jsx323(
|
|
4354
4357
|
EditorToolbar,
|
|
4355
4358
|
{
|
|
4356
4359
|
items: toolbar,
|
|
@@ -4359,8 +4362,8 @@ var Editor = (props) => {
|
|
|
4359
4362
|
}
|
|
4360
4363
|
),
|
|
4361
4364
|
/* @__PURE__ */ jsxs207("div", { className: "lib-xplat-editor__content", style: { minHeight }, children: [
|
|
4362
|
-
isEmpty && !isFocused && /* @__PURE__ */
|
|
4363
|
-
/* @__PURE__ */
|
|
4365
|
+
isEmpty && !isFocused && /* @__PURE__ */ jsx323("div", { className: "lib-xplat-editor__placeholder", children: placeholder }),
|
|
4366
|
+
/* @__PURE__ */ jsx323(
|
|
4364
4367
|
"div",
|
|
4365
4368
|
{
|
|
4366
4369
|
ref: editorRef,
|
|
@@ -4379,7 +4382,7 @@ var Editor = (props) => {
|
|
|
4379
4382
|
spellCheck: true
|
|
4380
4383
|
}
|
|
4381
4384
|
),
|
|
4382
|
-
slashOpen && filteredSlashItems.length > 0 && /* @__PURE__ */
|
|
4385
|
+
slashOpen && filteredSlashItems.length > 0 && /* @__PURE__ */ jsx323(
|
|
4383
4386
|
SlashMenu,
|
|
4384
4387
|
{
|
|
4385
4388
|
position: slashPos,
|
|
@@ -4389,7 +4392,7 @@ var Editor = (props) => {
|
|
|
4389
4392
|
onClose: closeSlashMenu
|
|
4390
4393
|
}
|
|
4391
4394
|
),
|
|
4392
|
-
linkOpen && /* @__PURE__ */
|
|
4395
|
+
linkOpen && /* @__PURE__ */ jsx323(
|
|
4393
4396
|
LinkPopover,
|
|
4394
4397
|
{
|
|
4395
4398
|
position: linkPos,
|
|
@@ -4441,7 +4444,7 @@ var isActive = (item, active) => {
|
|
|
4441
4444
|
return active.has(item);
|
|
4442
4445
|
};
|
|
4443
4446
|
var EditorToolbar = ({ items, active, onAction }) => {
|
|
4444
|
-
return /* @__PURE__ */
|
|
4447
|
+
return /* @__PURE__ */ jsx323("div", { className: "lib-xplat-editor__toolbar", children: items.map((item) => /* @__PURE__ */ jsx323(
|
|
4445
4448
|
"button",
|
|
4446
4449
|
{
|
|
4447
4450
|
type: "button",
|
|
@@ -4457,7 +4460,7 @@ var EditorToolbar = ({ items, active, onAction }) => {
|
|
|
4457
4460
|
)) });
|
|
4458
4461
|
};
|
|
4459
4462
|
var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
4460
|
-
|
|
4463
|
+
React21.useEffect(() => {
|
|
4461
4464
|
const handleClickOutside = (e) => {
|
|
4462
4465
|
const target = e.target;
|
|
4463
4466
|
const menu = document.querySelector(".lib-xplat-editor__slash-menu");
|
|
@@ -4466,7 +4469,7 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
4466
4469
|
window.addEventListener("mousedown", handleClickOutside);
|
|
4467
4470
|
return () => window.removeEventListener("mousedown", handleClickOutside);
|
|
4468
4471
|
}, [onClose]);
|
|
4469
|
-
return /* @__PURE__ */
|
|
4472
|
+
return /* @__PURE__ */ jsx323(
|
|
4470
4473
|
"div",
|
|
4471
4474
|
{
|
|
4472
4475
|
className: "lib-xplat-editor__slash-menu",
|
|
@@ -4481,8 +4484,8 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
4481
4484
|
onSelect(item);
|
|
4482
4485
|
},
|
|
4483
4486
|
children: [
|
|
4484
|
-
/* @__PURE__ */
|
|
4485
|
-
item.hint && /* @__PURE__ */
|
|
4487
|
+
/* @__PURE__ */ jsx323("span", { className: "label", children: item.label }),
|
|
4488
|
+
item.hint && /* @__PURE__ */ jsx323("span", { className: "hint", children: item.hint })
|
|
4486
4489
|
]
|
|
4487
4490
|
},
|
|
4488
4491
|
item.key
|
|
@@ -4491,8 +4494,8 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
4491
4494
|
);
|
|
4492
4495
|
};
|
|
4493
4496
|
var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
4494
|
-
const inputRef =
|
|
4495
|
-
|
|
4497
|
+
const inputRef = React21.useRef(null);
|
|
4498
|
+
React21.useEffect(() => {
|
|
4496
4499
|
inputRef.current?.focus();
|
|
4497
4500
|
}, []);
|
|
4498
4501
|
return /* @__PURE__ */ jsxs207(
|
|
@@ -4501,7 +4504,7 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
4501
4504
|
className: "lib-xplat-editor__link-popover",
|
|
4502
4505
|
style: { top: position.top, left: position.left },
|
|
4503
4506
|
children: [
|
|
4504
|
-
/* @__PURE__ */
|
|
4507
|
+
/* @__PURE__ */ jsx323(
|
|
4505
4508
|
"input",
|
|
4506
4509
|
{
|
|
4507
4510
|
ref: inputRef,
|
|
@@ -4521,11 +4524,11 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
4521
4524
|
}
|
|
4522
4525
|
}
|
|
4523
4526
|
),
|
|
4524
|
-
/* @__PURE__ */
|
|
4527
|
+
/* @__PURE__ */ jsx323("button", { type: "button", onMouseDown: (e) => {
|
|
4525
4528
|
e.preventDefault();
|
|
4526
4529
|
onConfirm();
|
|
4527
4530
|
}, children: "\uC801\uC6A9" }),
|
|
4528
|
-
/* @__PURE__ */
|
|
4531
|
+
/* @__PURE__ */ jsx323("button", { type: "button", onMouseDown: (e) => {
|
|
4529
4532
|
e.preventDefault();
|
|
4530
4533
|
onClose();
|
|
4531
4534
|
}, children: "\uCDE8\uC18C" })
|
|
@@ -4535,23 +4538,23 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
4535
4538
|
};
|
|
4536
4539
|
|
|
4537
4540
|
// src/components/EmptyState/EmptyState.tsx
|
|
4538
|
-
import { jsx as
|
|
4541
|
+
import { jsx as jsx324, jsxs as jsxs208 } from "react/jsx-runtime";
|
|
4539
4542
|
var EmptyState = (props) => {
|
|
4540
4543
|
const { icon, title = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", description, action } = props;
|
|
4541
4544
|
return /* @__PURE__ */ jsxs208("div", { className: "lib-xplat-empty-state", children: [
|
|
4542
|
-
icon && /* @__PURE__ */
|
|
4543
|
-
!icon && /* @__PURE__ */
|
|
4544
|
-
/* @__PURE__ */
|
|
4545
|
-
description && /* @__PURE__ */
|
|
4546
|
-
action && /* @__PURE__ */
|
|
4545
|
+
icon && /* @__PURE__ */ jsx324("div", { className: "empty-icon", children: icon }),
|
|
4546
|
+
!icon && /* @__PURE__ */ jsx324("div", { className: "empty-icon", children: /* @__PURE__ */ jsx324("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx324("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" }) }) }),
|
|
4547
|
+
/* @__PURE__ */ jsx324("p", { className: "empty-title", children: title }),
|
|
4548
|
+
description && /* @__PURE__ */ jsx324("p", { className: "empty-description", children: description }),
|
|
4549
|
+
action && /* @__PURE__ */ jsx324("div", { className: "empty-action", children: action })
|
|
4547
4550
|
] });
|
|
4548
4551
|
};
|
|
4549
4552
|
EmptyState.displayName = "EmptyState";
|
|
4550
4553
|
var EmptyState_default = EmptyState;
|
|
4551
4554
|
|
|
4552
4555
|
// src/components/FileUpload/FileUpload.tsx
|
|
4553
|
-
import
|
|
4554
|
-
import { jsx as
|
|
4556
|
+
import React22 from "react";
|
|
4557
|
+
import { jsx as jsx325, jsxs as jsxs209 } from "react/jsx-runtime";
|
|
4555
4558
|
var FileUpload = (props) => {
|
|
4556
4559
|
const {
|
|
4557
4560
|
accept,
|
|
@@ -4561,8 +4564,8 @@ var FileUpload = (props) => {
|
|
|
4561
4564
|
label = "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8\uD558\uAC70\uB098 \uD074\uB9AD\uD558\uC5EC \uC5C5\uB85C\uB4DC",
|
|
4562
4565
|
description
|
|
4563
4566
|
} = props;
|
|
4564
|
-
const [isDragOver, setIsDragOver] =
|
|
4565
|
-
const inputRef =
|
|
4567
|
+
const [isDragOver, setIsDragOver] = React22.useState(false);
|
|
4568
|
+
const inputRef = React22.useRef(null);
|
|
4566
4569
|
const handleFiles = (fileList) => {
|
|
4567
4570
|
let files = Array.from(fileList);
|
|
4568
4571
|
if (maxSize) {
|
|
@@ -4601,7 +4604,7 @@ var FileUpload = (props) => {
|
|
|
4601
4604
|
onDragLeave: handleDragLeave,
|
|
4602
4605
|
onClick: () => inputRef.current?.click(),
|
|
4603
4606
|
children: [
|
|
4604
|
-
/* @__PURE__ */
|
|
4607
|
+
/* @__PURE__ */ jsx325(
|
|
4605
4608
|
"input",
|
|
4606
4609
|
{
|
|
4607
4610
|
ref: inputRef,
|
|
@@ -4611,9 +4614,9 @@ var FileUpload = (props) => {
|
|
|
4611
4614
|
onChange: handleChange
|
|
4612
4615
|
}
|
|
4613
4616
|
),
|
|
4614
|
-
/* @__PURE__ */
|
|
4615
|
-
/* @__PURE__ */
|
|
4616
|
-
description && /* @__PURE__ */
|
|
4617
|
+
/* @__PURE__ */ jsx325("div", { className: "upload-icon", children: /* @__PURE__ */ jsx325(UploadIcon_default, {}) }),
|
|
4618
|
+
/* @__PURE__ */ jsx325("p", { className: "upload-label", children: label }),
|
|
4619
|
+
description && /* @__PURE__ */ jsx325("p", { className: "upload-description", children: description })
|
|
4617
4620
|
]
|
|
4618
4621
|
}
|
|
4619
4622
|
);
|
|
@@ -4622,10 +4625,10 @@ FileUpload.displayName = "FileUpload";
|
|
|
4622
4625
|
var FileUpload_default = FileUpload;
|
|
4623
4626
|
|
|
4624
4627
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
4625
|
-
import
|
|
4628
|
+
import React24 from "react";
|
|
4626
4629
|
|
|
4627
4630
|
// src/components/HtmlTypeWriter/utils.ts
|
|
4628
|
-
import
|
|
4631
|
+
import React23 from "react";
|
|
4629
4632
|
var voidTags = /* @__PURE__ */ new Set([
|
|
4630
4633
|
"br",
|
|
4631
4634
|
"img",
|
|
@@ -4693,41 +4696,41 @@ var convertNodeToReactWithRange = (node, typedLen, rangeMap) => {
|
|
|
4693
4696
|
props[attr.name] = attr.value;
|
|
4694
4697
|
});
|
|
4695
4698
|
if (voidTags.has(tag)) {
|
|
4696
|
-
return
|
|
4699
|
+
return React23.createElement(tag, props);
|
|
4697
4700
|
}
|
|
4698
4701
|
const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
|
|
4699
|
-
return
|
|
4702
|
+
return React23.createElement(tag, props, ...children);
|
|
4700
4703
|
};
|
|
4701
4704
|
var htmlToReactProgressive = (root, typedLen, rangeMap) => {
|
|
4702
4705
|
const nodes = Array.from(root.childNodes).map((child, idx) => {
|
|
4703
4706
|
const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
|
|
4704
|
-
return node == null ? null :
|
|
4707
|
+
return node == null ? null : React23.createElement(React23.Fragment, { key: idx }, node);
|
|
4705
4708
|
}).filter(Boolean);
|
|
4706
4709
|
return nodes.length === 0 ? null : nodes;
|
|
4707
4710
|
};
|
|
4708
4711
|
|
|
4709
4712
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
4710
|
-
import { jsx as
|
|
4713
|
+
import { jsx as jsx326 } from "react/jsx-runtime";
|
|
4711
4714
|
var HtmlTypeWriter = ({
|
|
4712
4715
|
html,
|
|
4713
4716
|
duration = 20,
|
|
4714
4717
|
onDone,
|
|
4715
4718
|
onChange
|
|
4716
4719
|
}) => {
|
|
4717
|
-
const [typedLen, setTypedLen] =
|
|
4718
|
-
const doneCalledRef =
|
|
4719
|
-
const { doc, rangeMap, totalLength } =
|
|
4720
|
+
const [typedLen, setTypedLen] = React24.useState(0);
|
|
4721
|
+
const doneCalledRef = React24.useRef(false);
|
|
4722
|
+
const { doc, rangeMap, totalLength } = React24.useMemo(() => {
|
|
4720
4723
|
if (typeof window === "undefined") return { doc: null, rangeMap: /* @__PURE__ */ new Map(), totalLength: 0 };
|
|
4721
4724
|
const decoded = decodeHtmlEntities(html);
|
|
4722
4725
|
const doc2 = new DOMParser().parseFromString(decoded, "text/html");
|
|
4723
4726
|
const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
|
|
4724
4727
|
return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
|
|
4725
4728
|
}, [html]);
|
|
4726
|
-
|
|
4729
|
+
React24.useEffect(() => {
|
|
4727
4730
|
setTypedLen(0);
|
|
4728
4731
|
doneCalledRef.current = false;
|
|
4729
4732
|
}, [html]);
|
|
4730
|
-
|
|
4733
|
+
React24.useEffect(() => {
|
|
4731
4734
|
if (!totalLength) return;
|
|
4732
4735
|
if (typedLen >= totalLength) return;
|
|
4733
4736
|
const timer = window.setInterval(() => {
|
|
@@ -4735,33 +4738,33 @@ var HtmlTypeWriter = ({
|
|
|
4735
4738
|
}, duration);
|
|
4736
4739
|
return () => window.clearInterval(timer);
|
|
4737
4740
|
}, [typedLen, totalLength, duration]);
|
|
4738
|
-
|
|
4741
|
+
React24.useEffect(() => {
|
|
4739
4742
|
if (typedLen > 0 && typedLen < totalLength) {
|
|
4740
4743
|
onChange?.();
|
|
4741
4744
|
}
|
|
4742
4745
|
}, [typedLen, totalLength, onChange]);
|
|
4743
|
-
|
|
4746
|
+
React24.useEffect(() => {
|
|
4744
4747
|
if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
|
|
4745
4748
|
doneCalledRef.current = true;
|
|
4746
4749
|
onDone?.();
|
|
4747
4750
|
}
|
|
4748
4751
|
}, [typedLen, totalLength, onDone]);
|
|
4749
|
-
const parsed =
|
|
4752
|
+
const parsed = React24.useMemo(
|
|
4750
4753
|
() => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
|
|
4751
4754
|
[doc, typedLen, rangeMap]
|
|
4752
4755
|
);
|
|
4753
|
-
return /* @__PURE__ */
|
|
4756
|
+
return /* @__PURE__ */ jsx326("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
|
|
4754
4757
|
};
|
|
4755
4758
|
HtmlTypeWriter.displayName = "HtmlTypeWriter";
|
|
4756
4759
|
var HtmlTypeWriter_default = HtmlTypeWriter;
|
|
4757
4760
|
|
|
4758
4761
|
// src/components/ImageSelector/ImageSelector.tsx
|
|
4759
|
-
import
|
|
4760
|
-
import { jsx as
|
|
4762
|
+
import React25 from "react";
|
|
4763
|
+
import { jsx as jsx327, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
4761
4764
|
var ImageSelector = (props) => {
|
|
4762
4765
|
const { value, label, onChange } = props;
|
|
4763
|
-
const [previewUrl, setPreviewUrl] =
|
|
4764
|
-
|
|
4766
|
+
const [previewUrl, setPreviewUrl] = React25.useState();
|
|
4767
|
+
React25.useEffect(() => {
|
|
4765
4768
|
if (!value) {
|
|
4766
4769
|
setPreviewUrl(void 0);
|
|
4767
4770
|
return;
|
|
@@ -4770,7 +4773,7 @@ var ImageSelector = (props) => {
|
|
|
4770
4773
|
setPreviewUrl(url);
|
|
4771
4774
|
return () => URL.revokeObjectURL(url);
|
|
4772
4775
|
}, [value]);
|
|
4773
|
-
const inputRef =
|
|
4776
|
+
const inputRef = React25.useRef(null);
|
|
4774
4777
|
const handleFileChange = (e) => {
|
|
4775
4778
|
const selectedFile = e.target.files?.[0];
|
|
4776
4779
|
if (selectedFile) {
|
|
@@ -4784,7 +4787,7 @@ var ImageSelector = (props) => {
|
|
|
4784
4787
|
inputRef.current?.click();
|
|
4785
4788
|
};
|
|
4786
4789
|
return /* @__PURE__ */ jsxs210("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
|
|
4787
|
-
/* @__PURE__ */
|
|
4790
|
+
/* @__PURE__ */ jsx327(
|
|
4788
4791
|
"input",
|
|
4789
4792
|
{
|
|
4790
4793
|
type: "file",
|
|
@@ -4795,20 +4798,58 @@ var ImageSelector = (props) => {
|
|
|
4795
4798
|
}
|
|
4796
4799
|
),
|
|
4797
4800
|
value && /* @__PURE__ */ jsxs210("div", { className: "action-bar", children: [
|
|
4798
|
-
/* @__PURE__ */
|
|
4799
|
-
/* @__PURE__ */
|
|
4801
|
+
/* @__PURE__ */ jsx327("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ jsx327(UploadIcon_default, {}) }),
|
|
4802
|
+
/* @__PURE__ */ jsx327("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ jsx327(DeleteIcon_default, {}) })
|
|
4800
4803
|
] }),
|
|
4801
|
-
/* @__PURE__ */
|
|
4802
|
-
/* @__PURE__ */
|
|
4803
|
-
/* @__PURE__ */
|
|
4804
|
+
/* @__PURE__ */ jsx327("div", { className: "content", children: previewUrl ? /* @__PURE__ */ jsx327("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ jsxs210("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
|
|
4805
|
+
/* @__PURE__ */ jsx327("div", { className: "icon-wrapper", children: /* @__PURE__ */ jsx327(ImageIcon_default, {}) }),
|
|
4806
|
+
/* @__PURE__ */ jsx327("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
|
|
4804
4807
|
] }) })
|
|
4805
4808
|
] });
|
|
4806
4809
|
};
|
|
4807
4810
|
ImageSelector.displayName = "ImageSelector";
|
|
4808
4811
|
var ImageSelector_default = ImageSelector;
|
|
4809
4812
|
|
|
4813
|
+
// src/components/Link/Link.tsx
|
|
4814
|
+
import { jsx as jsx328 } from "react/jsx-runtime";
|
|
4815
|
+
var Link = (props) => {
|
|
4816
|
+
const { children, href, underline = "always", target, rel, ...rest } = props;
|
|
4817
|
+
return /* @__PURE__ */ jsx328(
|
|
4818
|
+
"a",
|
|
4819
|
+
{
|
|
4820
|
+
className: clsx_default("lib-xplat-link", `underline-${underline}`),
|
|
4821
|
+
href,
|
|
4822
|
+
target,
|
|
4823
|
+
rel: target === "_blank" ? rel ?? "noopener noreferrer" : rel,
|
|
4824
|
+
...rest,
|
|
4825
|
+
children
|
|
4826
|
+
}
|
|
4827
|
+
);
|
|
4828
|
+
};
|
|
4829
|
+
Link.displayName = "Link";
|
|
4830
|
+
var Link_default = Link;
|
|
4831
|
+
|
|
4832
|
+
// src/components/LinkButton/LinkButton.tsx
|
|
4833
|
+
import { jsx as jsx329 } from "react/jsx-runtime";
|
|
4834
|
+
var LinkButton = (props) => {
|
|
4835
|
+
const { children, href, type = "primary", size = "md", target, rel, ...rest } = props;
|
|
4836
|
+
return /* @__PURE__ */ jsx329(
|
|
4837
|
+
"a",
|
|
4838
|
+
{
|
|
4839
|
+
className: clsx_default("lib-xplat-button", type, size),
|
|
4840
|
+
href,
|
|
4841
|
+
target,
|
|
4842
|
+
rel: target === "_blank" ? rel ?? "noopener noreferrer" : rel,
|
|
4843
|
+
...rest,
|
|
4844
|
+
children
|
|
4845
|
+
}
|
|
4846
|
+
);
|
|
4847
|
+
};
|
|
4848
|
+
LinkButton.displayName = "LinkButton";
|
|
4849
|
+
var LinkButton_default = LinkButton;
|
|
4850
|
+
|
|
4810
4851
|
// src/components/NotificationBadge/NotificationBadge.tsx
|
|
4811
|
-
import { jsx as
|
|
4852
|
+
import { jsx as jsx330, jsxs as jsxs211 } from "react/jsx-runtime";
|
|
4812
4853
|
var NotificationBadge = (props) => {
|
|
4813
4854
|
const {
|
|
4814
4855
|
children,
|
|
@@ -4822,14 +4863,14 @@ var NotificationBadge = (props) => {
|
|
|
4822
4863
|
const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
|
|
4823
4864
|
return /* @__PURE__ */ jsxs211("div", { className: clsx_default("lib-xplat-notification-badge", size), children: [
|
|
4824
4865
|
children,
|
|
4825
|
-
showBadge && /* @__PURE__ */
|
|
4866
|
+
showBadge && /* @__PURE__ */ jsx330("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
|
|
4826
4867
|
] });
|
|
4827
4868
|
};
|
|
4828
4869
|
NotificationBadge.displayName = "NotificationBadge";
|
|
4829
4870
|
var NotificationBadge_default = NotificationBadge;
|
|
4830
4871
|
|
|
4831
4872
|
// src/components/Pagination/Pagination.tsx
|
|
4832
|
-
import { jsx as
|
|
4873
|
+
import { jsx as jsx331, jsxs as jsxs212 } from "react/jsx-runtime";
|
|
4833
4874
|
var getPageRange = (current, totalPages, siblingCount) => {
|
|
4834
4875
|
const totalNumbers = siblingCount * 2 + 5;
|
|
4835
4876
|
if (totalPages <= totalNumbers) {
|
|
@@ -4873,18 +4914,18 @@ var Pagination = (props) => {
|
|
|
4873
4914
|
}
|
|
4874
4915
|
};
|
|
4875
4916
|
return /* @__PURE__ */ jsxs212("nav", { className: clsx_default("lib-xplat-pagination", size, type), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
|
|
4876
|
-
/* @__PURE__ */
|
|
4917
|
+
/* @__PURE__ */ jsx331(
|
|
4877
4918
|
"button",
|
|
4878
4919
|
{
|
|
4879
4920
|
className: "page-btn prev",
|
|
4880
4921
|
disabled: current <= 1,
|
|
4881
4922
|
onClick: () => handleClick(current - 1),
|
|
4882
4923
|
"aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
|
|
4883
|
-
children: /* @__PURE__ */
|
|
4924
|
+
children: /* @__PURE__ */ jsx331(ChevronLeftIcon_default, {})
|
|
4884
4925
|
}
|
|
4885
4926
|
),
|
|
4886
4927
|
pages.map(
|
|
4887
|
-
(page, i) => page === "..." ? /* @__PURE__ */
|
|
4928
|
+
(page, i) => page === "..." ? /* @__PURE__ */ jsx331("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ jsx331(
|
|
4888
4929
|
"button",
|
|
4889
4930
|
{
|
|
4890
4931
|
className: clsx_default("page-btn", { active: page === current }),
|
|
@@ -4895,14 +4936,14 @@ var Pagination = (props) => {
|
|
|
4895
4936
|
page
|
|
4896
4937
|
)
|
|
4897
4938
|
),
|
|
4898
|
-
/* @__PURE__ */
|
|
4939
|
+
/* @__PURE__ */ jsx331(
|
|
4899
4940
|
"button",
|
|
4900
4941
|
{
|
|
4901
4942
|
className: "page-btn next",
|
|
4902
4943
|
disabled: current >= totalPages,
|
|
4903
4944
|
onClick: () => handleClick(current + 1),
|
|
4904
4945
|
"aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
|
|
4905
|
-
children: /* @__PURE__ */
|
|
4946
|
+
children: /* @__PURE__ */ jsx331(ChevronRightIcon_default, {})
|
|
4906
4947
|
}
|
|
4907
4948
|
)
|
|
4908
4949
|
] });
|
|
@@ -4911,17 +4952,17 @@ Pagination.displayName = "Pagination";
|
|
|
4911
4952
|
var Pagination_default = Pagination;
|
|
4912
4953
|
|
|
4913
4954
|
// src/components/PopOver/PopOver.tsx
|
|
4914
|
-
import
|
|
4915
|
-
import { jsx as
|
|
4955
|
+
import React26 from "react";
|
|
4956
|
+
import { jsx as jsx332, jsxs as jsxs213 } from "react/jsx-runtime";
|
|
4916
4957
|
var PopOver = (props) => {
|
|
4917
4958
|
const { children, isOpen, onClose, PopOverEl } = props;
|
|
4918
|
-
const popRef =
|
|
4919
|
-
const triggerRef =
|
|
4920
|
-
const [localOpen, setLocalOpen] =
|
|
4921
|
-
const [eventTrigger, setEventTrigger] =
|
|
4959
|
+
const popRef = React26.useRef(null);
|
|
4960
|
+
const triggerRef = React26.useRef(null);
|
|
4961
|
+
const [localOpen, setLocalOpen] = React26.useState(false);
|
|
4962
|
+
const [eventTrigger, setEventTrigger] = React26.useState(false);
|
|
4922
4963
|
useClickOutside_default([popRef, triggerRef], onClose, isOpen);
|
|
4923
4964
|
const position = useAutoPosition_default(triggerRef, popRef, localOpen);
|
|
4924
|
-
|
|
4965
|
+
React26.useEffect(() => {
|
|
4925
4966
|
if (isOpen) {
|
|
4926
4967
|
setLocalOpen(isOpen);
|
|
4927
4968
|
setTimeout(() => {
|
|
@@ -4944,7 +4985,7 @@ var PopOver = (props) => {
|
|
|
4944
4985
|
},
|
|
4945
4986
|
children: [
|
|
4946
4987
|
children,
|
|
4947
|
-
localOpen && /* @__PURE__ */
|
|
4988
|
+
localOpen && /* @__PURE__ */ jsx332(Portal_default, { children: /* @__PURE__ */ jsx332(
|
|
4948
4989
|
"div",
|
|
4949
4990
|
{
|
|
4950
4991
|
className: clsx_default(
|
|
@@ -4967,7 +5008,7 @@ PopOver.displayName = "PopOver";
|
|
|
4967
5008
|
var PopOver_default = PopOver;
|
|
4968
5009
|
|
|
4969
5010
|
// src/components/Progress/Progress.tsx
|
|
4970
|
-
import { jsx as
|
|
5011
|
+
import { jsx as jsx333, jsxs as jsxs214 } from "react/jsx-runtime";
|
|
4971
5012
|
var Progress = (props) => {
|
|
4972
5013
|
const {
|
|
4973
5014
|
value,
|
|
@@ -4978,7 +5019,7 @@ var Progress = (props) => {
|
|
|
4978
5019
|
} = props;
|
|
4979
5020
|
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
4980
5021
|
return /* @__PURE__ */ jsxs214("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
|
|
4981
|
-
/* @__PURE__ */
|
|
5022
|
+
/* @__PURE__ */ jsx333(
|
|
4982
5023
|
"div",
|
|
4983
5024
|
{
|
|
4984
5025
|
className: "track",
|
|
@@ -4986,7 +5027,7 @@ var Progress = (props) => {
|
|
|
4986
5027
|
"aria-valuenow": value,
|
|
4987
5028
|
"aria-valuemin": 0,
|
|
4988
5029
|
"aria-valuemax": max,
|
|
4989
|
-
children: /* @__PURE__ */
|
|
5030
|
+
children: /* @__PURE__ */ jsx333(
|
|
4990
5031
|
"div",
|
|
4991
5032
|
{
|
|
4992
5033
|
className: "bar",
|
|
@@ -5005,17 +5046,17 @@ Progress.displayName = "Progress";
|
|
|
5005
5046
|
var Progress_default = Progress;
|
|
5006
5047
|
|
|
5007
5048
|
// src/components/Radio/RadioGroupContext.tsx
|
|
5008
|
-
import
|
|
5009
|
-
var RadioGroupContext =
|
|
5049
|
+
import React27 from "react";
|
|
5050
|
+
var RadioGroupContext = React27.createContext(
|
|
5010
5051
|
null
|
|
5011
5052
|
);
|
|
5012
5053
|
var useRadioGroupContext = () => {
|
|
5013
|
-
return
|
|
5054
|
+
return React27.useContext(RadioGroupContext);
|
|
5014
5055
|
};
|
|
5015
5056
|
var RadioGroupContext_default = RadioGroupContext;
|
|
5016
5057
|
|
|
5017
5058
|
// src/components/Radio/Radio.tsx
|
|
5018
|
-
import { jsx as
|
|
5059
|
+
import { jsx as jsx334, jsxs as jsxs215 } from "react/jsx-runtime";
|
|
5019
5060
|
var Radio = (props) => {
|
|
5020
5061
|
const {
|
|
5021
5062
|
label,
|
|
@@ -5045,18 +5086,18 @@ var Radio = (props) => {
|
|
|
5045
5086
|
className
|
|
5046
5087
|
),
|
|
5047
5088
|
children: [
|
|
5048
|
-
/* @__PURE__ */
|
|
5049
|
-
/* @__PURE__ */
|
|
5089
|
+
/* @__PURE__ */ jsx334("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
|
|
5090
|
+
/* @__PURE__ */ jsx334(
|
|
5050
5091
|
"div",
|
|
5051
5092
|
{
|
|
5052
5093
|
className: clsx_default(
|
|
5053
5094
|
"circle",
|
|
5054
5095
|
localChecked ? "checked" : void 0
|
|
5055
5096
|
),
|
|
5056
|
-
children: localChecked && /* @__PURE__ */
|
|
5097
|
+
children: localChecked && /* @__PURE__ */ jsx334("div", { className: "inner-circle" })
|
|
5057
5098
|
}
|
|
5058
5099
|
),
|
|
5059
|
-
label && /* @__PURE__ */
|
|
5100
|
+
label && /* @__PURE__ */ jsx334("span", { children: label })
|
|
5060
5101
|
]
|
|
5061
5102
|
}
|
|
5062
5103
|
);
|
|
@@ -5065,28 +5106,28 @@ Radio.displayName = "Radio";
|
|
|
5065
5106
|
var Radio_default = Radio;
|
|
5066
5107
|
|
|
5067
5108
|
// src/components/Radio/RadioGroup.tsx
|
|
5068
|
-
import { Fragment as Fragment4, jsx as
|
|
5109
|
+
import { Fragment as Fragment4, jsx as jsx335 } from "react/jsx-runtime";
|
|
5069
5110
|
var RadioGroup = (props) => {
|
|
5070
5111
|
const { children, ...rest } = props;
|
|
5071
|
-
return /* @__PURE__ */
|
|
5112
|
+
return /* @__PURE__ */ jsx335(Fragment4, { children: /* @__PURE__ */ jsx335(RadioGroupContext_default.Provider, { value: rest, children }) });
|
|
5072
5113
|
};
|
|
5073
5114
|
RadioGroup.displayName = "RadioGroup";
|
|
5074
5115
|
var RadioGroup_default = RadioGroup;
|
|
5075
5116
|
|
|
5076
5117
|
// src/components/Select/Select.tsx
|
|
5077
|
-
import
|
|
5118
|
+
import React30 from "react";
|
|
5078
5119
|
|
|
5079
5120
|
// src/components/Select/context.ts
|
|
5080
|
-
import
|
|
5081
|
-
var SelectContext =
|
|
5121
|
+
import React28 from "react";
|
|
5122
|
+
var SelectContext = React28.createContext(null);
|
|
5082
5123
|
var context_default = SelectContext;
|
|
5083
5124
|
|
|
5084
5125
|
// src/components/Select/SelectItem.tsx
|
|
5085
|
-
import
|
|
5086
|
-
import { jsx as
|
|
5126
|
+
import React29 from "react";
|
|
5127
|
+
import { jsx as jsx336 } from "react/jsx-runtime";
|
|
5087
5128
|
var SelectItem = (props) => {
|
|
5088
5129
|
const { children, value, onClick, disabled = false } = props;
|
|
5089
|
-
const ctx =
|
|
5130
|
+
const ctx = React29.useContext(context_default);
|
|
5090
5131
|
const handleClick = (e) => {
|
|
5091
5132
|
e.preventDefault();
|
|
5092
5133
|
e.stopPropagation();
|
|
@@ -5096,7 +5137,7 @@ var SelectItem = (props) => {
|
|
|
5096
5137
|
onClick?.();
|
|
5097
5138
|
};
|
|
5098
5139
|
const isSelected = value !== void 0 ? ctx?.selectedValue === value : ctx?.selectedLabel === children;
|
|
5099
|
-
return /* @__PURE__ */
|
|
5140
|
+
return /* @__PURE__ */ jsx336(
|
|
5100
5141
|
"div",
|
|
5101
5142
|
{
|
|
5102
5143
|
className: clsx_default("select-item", disabled && "disabled", isSelected && "is-selected"),
|
|
@@ -5117,7 +5158,7 @@ SelectItem.displayName = "Select.Item";
|
|
|
5117
5158
|
var SelectItem_default = SelectItem;
|
|
5118
5159
|
|
|
5119
5160
|
// src/components/Select/Select.tsx
|
|
5120
|
-
import { jsx as
|
|
5161
|
+
import { jsx as jsx337, jsxs as jsxs216 } from "react/jsx-runtime";
|
|
5121
5162
|
var ANIMATION_DURATION_MS3 = 200;
|
|
5122
5163
|
var SelectRoot = (props) => {
|
|
5123
5164
|
const {
|
|
@@ -5129,28 +5170,28 @@ var SelectRoot = (props) => {
|
|
|
5129
5170
|
error = false,
|
|
5130
5171
|
size = "md"
|
|
5131
5172
|
} = props;
|
|
5132
|
-
const itemChildren =
|
|
5133
|
-
(child) =>
|
|
5173
|
+
const itemChildren = React30.Children.toArray(children).filter(
|
|
5174
|
+
(child) => React30.isValidElement(child) && child.type === SelectItem_default
|
|
5134
5175
|
);
|
|
5135
5176
|
const isControlled = valueProp !== void 0;
|
|
5136
|
-
const [isOpen, setOpen] =
|
|
5137
|
-
const [uncontrolledLabel, setUncontrolledLabel] =
|
|
5138
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
5139
|
-
const controlledLabel =
|
|
5177
|
+
const [isOpen, setOpen] = React30.useState(false);
|
|
5178
|
+
const [uncontrolledLabel, setUncontrolledLabel] = React30.useState(null);
|
|
5179
|
+
const [uncontrolledValue, setUncontrolledValue] = React30.useState(void 0);
|
|
5180
|
+
const controlledLabel = React30.useMemo(() => {
|
|
5140
5181
|
if (!isControlled) return null;
|
|
5141
5182
|
const match = itemChildren.find((child) => child.props.value === valueProp);
|
|
5142
5183
|
return match ? match.props.children : null;
|
|
5143
5184
|
}, [isControlled, valueProp, itemChildren]);
|
|
5144
5185
|
const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
|
|
5145
5186
|
const selectedValue = isControlled ? valueProp : uncontrolledValue;
|
|
5146
|
-
const triggerRef =
|
|
5147
|
-
const contentRef =
|
|
5148
|
-
const [mounted, setMounted] =
|
|
5149
|
-
const [visible, setVisible] =
|
|
5150
|
-
|
|
5187
|
+
const triggerRef = React30.useRef(null);
|
|
5188
|
+
const contentRef = React30.useRef(null);
|
|
5189
|
+
const [mounted, setMounted] = React30.useState(false);
|
|
5190
|
+
const [visible, setVisible] = React30.useState(false);
|
|
5191
|
+
React30.useEffect(() => {
|
|
5151
5192
|
if (disabled && isOpen) setOpen(false);
|
|
5152
5193
|
}, [disabled, isOpen]);
|
|
5153
|
-
|
|
5194
|
+
React30.useEffect(() => {
|
|
5154
5195
|
if (isOpen) {
|
|
5155
5196
|
setMounted(true);
|
|
5156
5197
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -5160,12 +5201,12 @@ var SelectRoot = (props) => {
|
|
|
5160
5201
|
const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
|
|
5161
5202
|
return () => clearTimeout(t);
|
|
5162
5203
|
}, [isOpen]);
|
|
5163
|
-
const open =
|
|
5164
|
-
const close =
|
|
5165
|
-
const toggle =
|
|
5204
|
+
const open = React30.useCallback(() => setOpen(true), []);
|
|
5205
|
+
const close = React30.useCallback(() => setOpen(false), []);
|
|
5206
|
+
const toggle = React30.useCallback(() => setOpen((prev) => !prev), []);
|
|
5166
5207
|
useClickOutside_default([contentRef, triggerRef], close, isOpen);
|
|
5167
5208
|
const position = useAutoPosition_default(triggerRef, contentRef, mounted);
|
|
5168
|
-
const setSelected =
|
|
5209
|
+
const setSelected = React30.useCallback(
|
|
5169
5210
|
(label, itemValue) => {
|
|
5170
5211
|
if (!isControlled) {
|
|
5171
5212
|
setUncontrolledLabel(label);
|
|
@@ -5175,7 +5216,7 @@ var SelectRoot = (props) => {
|
|
|
5175
5216
|
},
|
|
5176
5217
|
[isControlled, onChange]
|
|
5177
5218
|
);
|
|
5178
|
-
const ctxValue =
|
|
5219
|
+
const ctxValue = React30.useMemo(
|
|
5179
5220
|
() => ({
|
|
5180
5221
|
isOpen,
|
|
5181
5222
|
mounted,
|
|
@@ -5197,7 +5238,7 @@ var SelectRoot = (props) => {
|
|
|
5197
5238
|
if (disabled) return;
|
|
5198
5239
|
toggle();
|
|
5199
5240
|
};
|
|
5200
|
-
return /* @__PURE__ */
|
|
5241
|
+
return /* @__PURE__ */ jsx337(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxs216(
|
|
5201
5242
|
"div",
|
|
5202
5243
|
{
|
|
5203
5244
|
className: clsx_default(
|
|
@@ -5232,7 +5273,7 @@ var SelectRoot = (props) => {
|
|
|
5232
5273
|
}
|
|
5233
5274
|
},
|
|
5234
5275
|
children: [
|
|
5235
|
-
/* @__PURE__ */
|
|
5276
|
+
/* @__PURE__ */ jsx337(
|
|
5236
5277
|
"span",
|
|
5237
5278
|
{
|
|
5238
5279
|
className: clsx_default(
|
|
@@ -5242,25 +5283,25 @@ var SelectRoot = (props) => {
|
|
|
5242
5283
|
children: selectedLabel ?? placeholder
|
|
5243
5284
|
}
|
|
5244
5285
|
),
|
|
5245
|
-
/* @__PURE__ */
|
|
5286
|
+
/* @__PURE__ */ jsx337(
|
|
5246
5287
|
"span",
|
|
5247
5288
|
{
|
|
5248
5289
|
className: clsx_default("select-trigger-icon", isOpen && "open"),
|
|
5249
5290
|
"aria-hidden": true,
|
|
5250
|
-
children: /* @__PURE__ */
|
|
5291
|
+
children: /* @__PURE__ */ jsx337(ChevronDownIcon_default, {})
|
|
5251
5292
|
}
|
|
5252
5293
|
)
|
|
5253
5294
|
]
|
|
5254
5295
|
}
|
|
5255
5296
|
),
|
|
5256
|
-
mounted && /* @__PURE__ */
|
|
5297
|
+
mounted && /* @__PURE__ */ jsx337(Portal_default, { children: /* @__PURE__ */ jsx337(
|
|
5257
5298
|
"div",
|
|
5258
5299
|
{
|
|
5259
5300
|
className: clsx_default("lib-xplat-select-content", size, position.direction, stateClass),
|
|
5260
5301
|
ref: contentRef,
|
|
5261
5302
|
style: { ...position.position, width: triggerRef.current?.offsetWidth },
|
|
5262
5303
|
role: "listbox",
|
|
5263
|
-
children: /* @__PURE__ */
|
|
5304
|
+
children: /* @__PURE__ */ jsx337(context_default.Provider, { value: ctxValue, children: itemChildren })
|
|
5264
5305
|
}
|
|
5265
5306
|
) })
|
|
5266
5307
|
]
|
|
@@ -5274,7 +5315,7 @@ var Select = Object.assign(SelectRoot, {
|
|
|
5274
5315
|
var Select_default = Select;
|
|
5275
5316
|
|
|
5276
5317
|
// src/components/Skeleton/Skeleton.tsx
|
|
5277
|
-
import { jsx as
|
|
5318
|
+
import { jsx as jsx338 } from "react/jsx-runtime";
|
|
5278
5319
|
var SIZE_MAP = {
|
|
5279
5320
|
xs: "var(--spacing-space-1)",
|
|
5280
5321
|
sm: "var(--spacing-space-2)",
|
|
@@ -5290,7 +5331,7 @@ var Skeleton = (props) => {
|
|
|
5290
5331
|
...width != null && { width: SIZE_MAP[width] },
|
|
5291
5332
|
...height != null && { height: SIZE_MAP[height] }
|
|
5292
5333
|
};
|
|
5293
|
-
return /* @__PURE__ */
|
|
5334
|
+
return /* @__PURE__ */ jsx338(
|
|
5294
5335
|
"div",
|
|
5295
5336
|
{
|
|
5296
5337
|
className: clsx_default("lib-xplat-skeleton", variant),
|
|
@@ -5303,20 +5344,20 @@ Skeleton.displayName = "Skeleton";
|
|
|
5303
5344
|
var Skeleton_default = Skeleton;
|
|
5304
5345
|
|
|
5305
5346
|
// src/components/Spinner/Spinner.tsx
|
|
5306
|
-
import { jsx as
|
|
5347
|
+
import { jsx as jsx339, jsxs as jsxs217 } from "react/jsx-runtime";
|
|
5307
5348
|
var Spinner = (props) => {
|
|
5308
5349
|
const {
|
|
5309
5350
|
size = "md",
|
|
5310
5351
|
type = "brand"
|
|
5311
5352
|
} = props;
|
|
5312
|
-
return /* @__PURE__ */
|
|
5353
|
+
return /* @__PURE__ */ jsx339(
|
|
5313
5354
|
"div",
|
|
5314
5355
|
{
|
|
5315
5356
|
className: clsx_default("lib-xplat-spinner", size, type),
|
|
5316
5357
|
role: "status",
|
|
5317
5358
|
"aria-label": "\uB85C\uB529 \uC911",
|
|
5318
5359
|
children: /* @__PURE__ */ jsxs217("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
5319
|
-
/* @__PURE__ */
|
|
5360
|
+
/* @__PURE__ */ jsx339(
|
|
5320
5361
|
"circle",
|
|
5321
5362
|
{
|
|
5322
5363
|
className: "track",
|
|
@@ -5326,7 +5367,7 @@ var Spinner = (props) => {
|
|
|
5326
5367
|
strokeWidth: "3"
|
|
5327
5368
|
}
|
|
5328
5369
|
),
|
|
5329
|
-
/* @__PURE__ */
|
|
5370
|
+
/* @__PURE__ */ jsx339(
|
|
5330
5371
|
"circle",
|
|
5331
5372
|
{
|
|
5332
5373
|
className: "indicator",
|
|
@@ -5345,20 +5386,20 @@ Spinner.displayName = "Spinner";
|
|
|
5345
5386
|
var Spinner_default = Spinner;
|
|
5346
5387
|
|
|
5347
5388
|
// src/components/Steps/Steps.tsx
|
|
5348
|
-
import { jsx as
|
|
5389
|
+
import { jsx as jsx340, jsxs as jsxs218 } from "react/jsx-runtime";
|
|
5349
5390
|
var Steps = (props) => {
|
|
5350
5391
|
const {
|
|
5351
5392
|
items,
|
|
5352
5393
|
current,
|
|
5353
5394
|
type = "brand"
|
|
5354
5395
|
} = props;
|
|
5355
|
-
return /* @__PURE__ */
|
|
5396
|
+
return /* @__PURE__ */ jsx340("div", { className: clsx_default("lib-xplat-steps", type), children: items.map((item, index) => {
|
|
5356
5397
|
const status = index < current ? "completed" : index === current ? "active" : "pending";
|
|
5357
5398
|
return /* @__PURE__ */ jsxs218("div", { className: clsx_default("step-item", status), children: [
|
|
5358
|
-
/* @__PURE__ */
|
|
5399
|
+
/* @__PURE__ */ jsx340("div", { className: "step-circle", children: status === "completed" ? /* @__PURE__ */ jsx340(CheckIcon_default, {}) : /* @__PURE__ */ jsx340("span", { children: index + 1 }) }),
|
|
5359
5400
|
/* @__PURE__ */ jsxs218("div", { className: "step-content", children: [
|
|
5360
|
-
/* @__PURE__ */
|
|
5361
|
-
item.description && /* @__PURE__ */
|
|
5401
|
+
/* @__PURE__ */ jsx340("span", { className: "step-title", children: item.title }),
|
|
5402
|
+
item.description && /* @__PURE__ */ jsx340("span", { className: "step-description", children: item.description })
|
|
5362
5403
|
] })
|
|
5363
5404
|
] }, index);
|
|
5364
5405
|
}) });
|
|
@@ -5367,8 +5408,8 @@ Steps.displayName = "Steps";
|
|
|
5367
5408
|
var Steps_default = Steps;
|
|
5368
5409
|
|
|
5369
5410
|
// src/components/Swiper/Swiper.tsx
|
|
5370
|
-
import
|
|
5371
|
-
import { jsx as
|
|
5411
|
+
import React31 from "react";
|
|
5412
|
+
import { jsx as jsx341, jsxs as jsxs219 } from "react/jsx-runtime";
|
|
5372
5413
|
var Swiper = (props) => {
|
|
5373
5414
|
const {
|
|
5374
5415
|
auto = false,
|
|
@@ -5392,26 +5433,26 @@ var Swiper = (props) => {
|
|
|
5392
5433
|
const maxIndex = Math.max(0, totalSlides - viewItemCount);
|
|
5393
5434
|
const useLoop = loop && canSlide;
|
|
5394
5435
|
const cloneCount = useLoop ? totalSlides : 0;
|
|
5395
|
-
const extendedItems =
|
|
5436
|
+
const extendedItems = React31.useMemo(() => {
|
|
5396
5437
|
if (!useLoop) return items;
|
|
5397
5438
|
return [...items, ...items, ...items];
|
|
5398
5439
|
}, [items, useLoop]);
|
|
5399
5440
|
const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
|
|
5400
|
-
const [innerIndex, setInnerIndex] =
|
|
5441
|
+
const [innerIndex, setInnerIndex] = React31.useState(
|
|
5401
5442
|
useLoop ? cloneCount + initialIdx : initialIdx
|
|
5402
5443
|
);
|
|
5403
|
-
const [isDragging, setIsDragging] =
|
|
5404
|
-
const [dragOffset, setDragOffset] =
|
|
5405
|
-
const [animated, setAnimated] =
|
|
5406
|
-
const [containerWidth, setContainerWidth] =
|
|
5407
|
-
const containerRef =
|
|
5408
|
-
const startXRef =
|
|
5409
|
-
const startTimeRef =
|
|
5410
|
-
const autoplayTimerRef =
|
|
5411
|
-
const resumeTimeoutRef =
|
|
5412
|
-
const [paused, setPaused] =
|
|
5413
|
-
const initializedRef =
|
|
5414
|
-
|
|
5444
|
+
const [isDragging, setIsDragging] = React31.useState(false);
|
|
5445
|
+
const [dragOffset, setDragOffset] = React31.useState(0);
|
|
5446
|
+
const [animated, setAnimated] = React31.useState(false);
|
|
5447
|
+
const [containerWidth, setContainerWidth] = React31.useState(0);
|
|
5448
|
+
const containerRef = React31.useRef(null);
|
|
5449
|
+
const startXRef = React31.useRef(0);
|
|
5450
|
+
const startTimeRef = React31.useRef(0);
|
|
5451
|
+
const autoplayTimerRef = React31.useRef(null);
|
|
5452
|
+
const resumeTimeoutRef = React31.useRef(null);
|
|
5453
|
+
const [paused, setPaused] = React31.useState(false);
|
|
5454
|
+
const initializedRef = React31.useRef(false);
|
|
5455
|
+
React31.useEffect(() => {
|
|
5415
5456
|
const el = containerRef.current;
|
|
5416
5457
|
if (!el) return;
|
|
5417
5458
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -5434,7 +5475,7 @@ var Swiper = (props) => {
|
|
|
5434
5475
|
return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
|
|
5435
5476
|
};
|
|
5436
5477
|
const realIndex = getRealIndex(innerIndex);
|
|
5437
|
-
const moveToInner =
|
|
5478
|
+
const moveToInner = React31.useCallback(
|
|
5438
5479
|
(idx, withAnim = true) => {
|
|
5439
5480
|
if (!useLoop) {
|
|
5440
5481
|
setAnimated(withAnim);
|
|
@@ -5462,7 +5503,7 @@ var Swiper = (props) => {
|
|
|
5462
5503
|
},
|
|
5463
5504
|
[useLoop, cloneCount, totalSlides]
|
|
5464
5505
|
);
|
|
5465
|
-
const handleTransitionEnd =
|
|
5506
|
+
const handleTransitionEnd = React31.useCallback(() => {
|
|
5466
5507
|
if (!useLoop) return;
|
|
5467
5508
|
const real = getRealIndex(innerIndex);
|
|
5468
5509
|
const canonical = cloneCount + real;
|
|
@@ -5472,7 +5513,7 @@ var Swiper = (props) => {
|
|
|
5472
5513
|
}
|
|
5473
5514
|
onChange?.(Math.min(real, maxIndex));
|
|
5474
5515
|
}, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange]);
|
|
5475
|
-
const slideTo =
|
|
5516
|
+
const slideTo = React31.useCallback(
|
|
5476
5517
|
(logicalIndex) => {
|
|
5477
5518
|
if (!canSlide) return;
|
|
5478
5519
|
const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
|
|
@@ -5482,7 +5523,7 @@ var Swiper = (props) => {
|
|
|
5482
5523
|
},
|
|
5483
5524
|
[canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
|
|
5484
5525
|
);
|
|
5485
|
-
const slideNext =
|
|
5526
|
+
const slideNext = React31.useCallback(() => {
|
|
5486
5527
|
if (!canSlide) return;
|
|
5487
5528
|
const nextInner = innerIndex + slideBy;
|
|
5488
5529
|
if (useLoop) {
|
|
@@ -5491,7 +5532,7 @@ var Swiper = (props) => {
|
|
|
5491
5532
|
moveToInner(Math.min(nextInner, maxIndex), true);
|
|
5492
5533
|
}
|
|
5493
5534
|
}, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
|
|
5494
|
-
const slidePrev =
|
|
5535
|
+
const slidePrev = React31.useCallback(() => {
|
|
5495
5536
|
if (!canSlide) return;
|
|
5496
5537
|
const prevInner = innerIndex - slideBy;
|
|
5497
5538
|
if (useLoop) {
|
|
@@ -5500,7 +5541,7 @@ var Swiper = (props) => {
|
|
|
5500
5541
|
moveToInner(Math.max(prevInner, 0), true);
|
|
5501
5542
|
}
|
|
5502
5543
|
}, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
|
|
5503
|
-
|
|
5544
|
+
React31.useEffect(() => {
|
|
5504
5545
|
if (indexProp === void 0) return;
|
|
5505
5546
|
const clamped = Math.max(0, Math.min(indexProp, maxIndex));
|
|
5506
5547
|
const target = useLoop ? cloneCount + clamped : clamped;
|
|
@@ -5508,12 +5549,12 @@ var Swiper = (props) => {
|
|
|
5508
5549
|
moveToInner(target, true);
|
|
5509
5550
|
}
|
|
5510
5551
|
}, [indexProp]);
|
|
5511
|
-
|
|
5552
|
+
React31.useImperativeHandle(swiperRef, () => ({
|
|
5512
5553
|
slidePrev,
|
|
5513
5554
|
slideNext,
|
|
5514
5555
|
slideTo
|
|
5515
5556
|
}));
|
|
5516
|
-
|
|
5557
|
+
React31.useEffect(() => {
|
|
5517
5558
|
if (!auto || !canSlide || paused) return;
|
|
5518
5559
|
autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
|
|
5519
5560
|
return () => {
|
|
@@ -5539,7 +5580,7 @@ var Swiper = (props) => {
|
|
|
5539
5580
|
resumeTimeoutRef.current = null;
|
|
5540
5581
|
}, pauseOnInteraction);
|
|
5541
5582
|
};
|
|
5542
|
-
|
|
5583
|
+
React31.useEffect(() => {
|
|
5543
5584
|
return () => {
|
|
5544
5585
|
if (resumeTimeoutRef.current) clearTimeout(resumeTimeoutRef.current);
|
|
5545
5586
|
};
|
|
@@ -5557,7 +5598,7 @@ var Swiper = (props) => {
|
|
|
5557
5598
|
startXRef.current = getClientX(e);
|
|
5558
5599
|
startTimeRef.current = Date.now();
|
|
5559
5600
|
};
|
|
5560
|
-
|
|
5601
|
+
React31.useEffect(() => {
|
|
5561
5602
|
if (!isDragging) return;
|
|
5562
5603
|
const handleMove = (e) => {
|
|
5563
5604
|
setDragOffset(getClientX(e) - startXRef.current);
|
|
@@ -5596,8 +5637,8 @@ var Swiper = (props) => {
|
|
|
5596
5637
|
}, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
|
|
5597
5638
|
const slideWidthPercent = 100 / viewItemCount;
|
|
5598
5639
|
const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
|
|
5599
|
-
const slideElements =
|
|
5600
|
-
() => extendedItems.map((item, idx) => /* @__PURE__ */
|
|
5640
|
+
const slideElements = React31.useMemo(
|
|
5641
|
+
() => extendedItems.map((item, idx) => /* @__PURE__ */ jsx341(
|
|
5601
5642
|
"div",
|
|
5602
5643
|
{
|
|
5603
5644
|
className: "lib-xplat-swiper__slide",
|
|
@@ -5617,14 +5658,14 @@ var Swiper = (props) => {
|
|
|
5617
5658
|
totalSteps - 1
|
|
5618
5659
|
);
|
|
5619
5660
|
return /* @__PURE__ */ jsxs219("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
|
|
5620
|
-
/* @__PURE__ */
|
|
5661
|
+
/* @__PURE__ */ jsx341(
|
|
5621
5662
|
"div",
|
|
5622
5663
|
{
|
|
5623
5664
|
className: "lib-xplat-swiper__viewport",
|
|
5624
5665
|
onMouseDown: handleDragStart,
|
|
5625
5666
|
onTouchStart: handleDragStart,
|
|
5626
5667
|
onDragStart: (e) => e.preventDefault(),
|
|
5627
|
-
children: /* @__PURE__ */
|
|
5668
|
+
children: /* @__PURE__ */ jsx341(
|
|
5628
5669
|
"div",
|
|
5629
5670
|
{
|
|
5630
5671
|
className: clsx_default(
|
|
@@ -5642,7 +5683,7 @@ var Swiper = (props) => {
|
|
|
5642
5683
|
)
|
|
5643
5684
|
}
|
|
5644
5685
|
),
|
|
5645
|
-
showProgress && canSlide && /* @__PURE__ */
|
|
5686
|
+
showProgress && canSlide && /* @__PURE__ */ jsx341("div", { className: "lib-xplat-swiper__progress", children: /* @__PURE__ */ jsx341("div", { className: "lib-xplat-swiper__progress-track", children: /* @__PURE__ */ jsx341(
|
|
5646
5687
|
"span",
|
|
5647
5688
|
{
|
|
5648
5689
|
className: "lib-xplat-swiper__progress-fill",
|
|
@@ -5652,7 +5693,7 @@ var Swiper = (props) => {
|
|
|
5652
5693
|
}
|
|
5653
5694
|
}
|
|
5654
5695
|
) }) }),
|
|
5655
|
-
canSlide && /* @__PURE__ */
|
|
5696
|
+
canSlide && /* @__PURE__ */ jsx341("div", { className: "lib-xplat-swiper__dots", children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ jsx341(
|
|
5656
5697
|
"button",
|
|
5657
5698
|
{
|
|
5658
5699
|
className: clsx_default(
|
|
@@ -5670,8 +5711,8 @@ Swiper.displayName = "Swiper";
|
|
|
5670
5711
|
var Swiper_default = Swiper;
|
|
5671
5712
|
|
|
5672
5713
|
// src/components/Switch/Switch.tsx
|
|
5673
|
-
import
|
|
5674
|
-
import { jsx as
|
|
5714
|
+
import React32 from "react";
|
|
5715
|
+
import { jsx as jsx342 } from "react/jsx-runtime";
|
|
5675
5716
|
var KNOB_TRANSITION_MS = 250;
|
|
5676
5717
|
var Switch = (props) => {
|
|
5677
5718
|
const {
|
|
@@ -5681,9 +5722,9 @@ var Switch = (props) => {
|
|
|
5681
5722
|
disabled,
|
|
5682
5723
|
onChange
|
|
5683
5724
|
} = props;
|
|
5684
|
-
const [isAnimating, setIsAnimating] =
|
|
5685
|
-
const timeoutRef =
|
|
5686
|
-
|
|
5725
|
+
const [isAnimating, setIsAnimating] = React32.useState(false);
|
|
5726
|
+
const timeoutRef = React32.useRef(null);
|
|
5727
|
+
React32.useEffect(() => {
|
|
5687
5728
|
return () => {
|
|
5688
5729
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5689
5730
|
};
|
|
@@ -5698,7 +5739,7 @@ var Switch = (props) => {
|
|
|
5698
5739
|
timeoutRef.current = null;
|
|
5699
5740
|
}, KNOB_TRANSITION_MS);
|
|
5700
5741
|
};
|
|
5701
|
-
return /* @__PURE__ */
|
|
5742
|
+
return /* @__PURE__ */ jsx342(
|
|
5702
5743
|
"div",
|
|
5703
5744
|
{
|
|
5704
5745
|
className: clsx_default(
|
|
@@ -5711,7 +5752,7 @@ var Switch = (props) => {
|
|
|
5711
5752
|
),
|
|
5712
5753
|
onClick: handleClick,
|
|
5713
5754
|
"aria-disabled": disabled || isAnimating,
|
|
5714
|
-
children: /* @__PURE__ */
|
|
5755
|
+
children: /* @__PURE__ */ jsx342("div", { className: clsx_default("knob", value ? "checked" : void 0) })
|
|
5715
5756
|
}
|
|
5716
5757
|
);
|
|
5717
5758
|
};
|
|
@@ -5719,17 +5760,17 @@ Switch.displayName = "Switch";
|
|
|
5719
5760
|
var Switch_default = Switch;
|
|
5720
5761
|
|
|
5721
5762
|
// src/components/Table/TableContext.tsx
|
|
5722
|
-
import
|
|
5723
|
-
var TableContext =
|
|
5763
|
+
import React33 from "react";
|
|
5764
|
+
var TableContext = React33.createContext(null);
|
|
5724
5765
|
var useTableContext = () => {
|
|
5725
|
-
const ctx =
|
|
5766
|
+
const ctx = React33.useContext(TableContext);
|
|
5726
5767
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
5727
5768
|
return ctx;
|
|
5728
5769
|
};
|
|
5729
5770
|
var TableContext_default = TableContext;
|
|
5730
5771
|
|
|
5731
5772
|
// src/components/Table/Table.tsx
|
|
5732
|
-
import { jsx as
|
|
5773
|
+
import { jsx as jsx343 } from "react/jsx-runtime";
|
|
5733
5774
|
var Table = (props) => {
|
|
5734
5775
|
const {
|
|
5735
5776
|
children,
|
|
@@ -5739,7 +5780,7 @@ var Table = (props) => {
|
|
|
5739
5780
|
headerSticky = false,
|
|
5740
5781
|
stickyShadow = true
|
|
5741
5782
|
} = props;
|
|
5742
|
-
return /* @__PURE__ */
|
|
5783
|
+
return /* @__PURE__ */ jsx343("div", { className: `lib-xplat-table-wrapper ${size}`, children: /* @__PURE__ */ jsx343(
|
|
5743
5784
|
TableContext_default.Provider,
|
|
5744
5785
|
{
|
|
5745
5786
|
value: {
|
|
@@ -5748,7 +5789,7 @@ var Table = (props) => {
|
|
|
5748
5789
|
headerSticky,
|
|
5749
5790
|
stickyShadow
|
|
5750
5791
|
},
|
|
5751
|
-
children: /* @__PURE__ */
|
|
5792
|
+
children: /* @__PURE__ */ jsx343("table", { className: "lib-xplat-table", children })
|
|
5752
5793
|
}
|
|
5753
5794
|
) });
|
|
5754
5795
|
};
|
|
@@ -5756,41 +5797,41 @@ Table.displayName = "Table";
|
|
|
5756
5797
|
var Table_default = Table;
|
|
5757
5798
|
|
|
5758
5799
|
// src/components/Table/TableBody.tsx
|
|
5759
|
-
import { jsx as
|
|
5800
|
+
import { jsx as jsx344 } from "react/jsx-runtime";
|
|
5760
5801
|
var TableBody = (props) => {
|
|
5761
5802
|
const { children } = props;
|
|
5762
|
-
return /* @__PURE__ */
|
|
5803
|
+
return /* @__PURE__ */ jsx344("tbody", { children });
|
|
5763
5804
|
};
|
|
5764
5805
|
TableBody.displayName = "TableBody";
|
|
5765
5806
|
var TableBody_default = TableBody;
|
|
5766
5807
|
|
|
5767
5808
|
// src/components/Table/TableCell.tsx
|
|
5768
|
-
import
|
|
5809
|
+
import React36 from "react";
|
|
5769
5810
|
|
|
5770
5811
|
// src/components/Table/TableHeadContext.tsx
|
|
5771
|
-
import
|
|
5772
|
-
var TableHeadContext =
|
|
5812
|
+
import React34 from "react";
|
|
5813
|
+
var TableHeadContext = React34.createContext(
|
|
5773
5814
|
null
|
|
5774
5815
|
);
|
|
5775
5816
|
var useTableHeadContext = () => {
|
|
5776
|
-
const ctx =
|
|
5817
|
+
const ctx = React34.useContext(TableHeadContext);
|
|
5777
5818
|
return ctx;
|
|
5778
5819
|
};
|
|
5779
5820
|
var TableHeadContext_default = TableHeadContext;
|
|
5780
5821
|
|
|
5781
5822
|
// src/components/Table/TableRowContext.tsx
|
|
5782
|
-
import
|
|
5783
|
-
var TableRowContext =
|
|
5823
|
+
import React35 from "react";
|
|
5824
|
+
var TableRowContext = React35.createContext(null);
|
|
5784
5825
|
var useTableRowContext = () => {
|
|
5785
|
-
const ctx =
|
|
5826
|
+
const ctx = React35.useContext(TableRowContext);
|
|
5786
5827
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
5787
5828
|
return ctx;
|
|
5788
5829
|
};
|
|
5789
5830
|
var TableRowContext_default = TableRowContext;
|
|
5790
5831
|
|
|
5791
5832
|
// src/components/Table/TableCell.tsx
|
|
5792
|
-
import { jsx as
|
|
5793
|
-
var TableCell =
|
|
5833
|
+
import { jsx as jsx345 } from "react/jsx-runtime";
|
|
5834
|
+
var TableCell = React36.memo((props) => {
|
|
5794
5835
|
const {
|
|
5795
5836
|
children,
|
|
5796
5837
|
align = "center",
|
|
@@ -5804,9 +5845,9 @@ var TableCell = React37.memo((props) => {
|
|
|
5804
5845
|
const { registerStickyCell, stickyCells } = useTableRowContext();
|
|
5805
5846
|
const { stickyShadow } = useTableContext();
|
|
5806
5847
|
const headContext = useTableHeadContext();
|
|
5807
|
-
const [left, setLeft] =
|
|
5808
|
-
const cellRef =
|
|
5809
|
-
const calculateLeft =
|
|
5848
|
+
const [left, setLeft] = React36.useState(0);
|
|
5849
|
+
const cellRef = React36.useRef(null);
|
|
5850
|
+
const calculateLeft = React36.useCallback(() => {
|
|
5810
5851
|
if (!cellRef.current) return 0;
|
|
5811
5852
|
let totalLeft = 0;
|
|
5812
5853
|
for (const ref of stickyCells) {
|
|
@@ -5815,7 +5856,7 @@ var TableCell = React37.memo((props) => {
|
|
|
5815
5856
|
}
|
|
5816
5857
|
return totalLeft;
|
|
5817
5858
|
}, [stickyCells]);
|
|
5818
|
-
|
|
5859
|
+
React36.useEffect(() => {
|
|
5819
5860
|
if (!isSticky || !cellRef.current) return;
|
|
5820
5861
|
registerStickyCell(cellRef);
|
|
5821
5862
|
setLeft(calculateLeft());
|
|
@@ -5834,7 +5875,7 @@ var TableCell = React37.memo((props) => {
|
|
|
5834
5875
|
const CellTag = isHeaderCell ? "th" : "td";
|
|
5835
5876
|
const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
|
|
5836
5877
|
const enableHover = headContext && headContext.cellHover;
|
|
5837
|
-
return /* @__PURE__ */
|
|
5878
|
+
return /* @__PURE__ */ jsx345(
|
|
5838
5879
|
CellTag,
|
|
5839
5880
|
{
|
|
5840
5881
|
ref: cellRef,
|
|
@@ -5861,21 +5902,21 @@ TableCell.displayName = "TableCell";
|
|
|
5861
5902
|
var TableCell_default = TableCell;
|
|
5862
5903
|
|
|
5863
5904
|
// src/components/Table/TableHead.tsx
|
|
5864
|
-
import { jsx as
|
|
5905
|
+
import { jsx as jsx346 } from "react/jsx-runtime";
|
|
5865
5906
|
var TableHead = ({
|
|
5866
5907
|
children,
|
|
5867
5908
|
cellHover = false
|
|
5868
5909
|
}) => {
|
|
5869
5910
|
const { headerSticky } = useTableContext();
|
|
5870
|
-
return /* @__PURE__ */
|
|
5911
|
+
return /* @__PURE__ */ jsx346(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ jsx346("thead", { className: clsx_default(headerSticky ? "table-sticky" : null), children }) });
|
|
5871
5912
|
};
|
|
5872
5913
|
TableHead.displayName = "TableHead";
|
|
5873
5914
|
var TableHead_default = TableHead;
|
|
5874
5915
|
|
|
5875
5916
|
// src/components/Table/TableRow.tsx
|
|
5876
|
-
import
|
|
5877
|
-
import { jsx as
|
|
5878
|
-
var TableRow =
|
|
5917
|
+
import React37 from "react";
|
|
5918
|
+
import { jsx as jsx347 } from "react/jsx-runtime";
|
|
5919
|
+
var TableRow = React37.memo((props) => {
|
|
5879
5920
|
const {
|
|
5880
5921
|
children,
|
|
5881
5922
|
type = "secondary",
|
|
@@ -5884,14 +5925,14 @@ var TableRow = React38.memo((props) => {
|
|
|
5884
5925
|
onClick
|
|
5885
5926
|
} = props;
|
|
5886
5927
|
const { rowBorderUse } = useTableContext();
|
|
5887
|
-
const [stickyCells, setStickyCells] =
|
|
5928
|
+
const [stickyCells, setStickyCells] = React37.useState([]);
|
|
5888
5929
|
const registerStickyCell = (ref) => {
|
|
5889
5930
|
setStickyCells((prev) => {
|
|
5890
5931
|
if (prev.includes(ref)) return prev;
|
|
5891
5932
|
return [...prev, ref];
|
|
5892
5933
|
});
|
|
5893
5934
|
};
|
|
5894
|
-
return /* @__PURE__ */
|
|
5935
|
+
return /* @__PURE__ */ jsx347(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ jsx347(
|
|
5895
5936
|
"tr",
|
|
5896
5937
|
{
|
|
5897
5938
|
className: clsx_default(
|
|
@@ -5915,7 +5956,7 @@ TableRow.displayName = "TableRow";
|
|
|
5915
5956
|
var TableRow_default = TableRow;
|
|
5916
5957
|
|
|
5917
5958
|
// src/components/Tag/Tag.tsx
|
|
5918
|
-
import { jsx as
|
|
5959
|
+
import { jsx as jsx348, jsxs as jsxs220 } from "react/jsx-runtime";
|
|
5919
5960
|
var Tag = (props) => {
|
|
5920
5961
|
const {
|
|
5921
5962
|
children,
|
|
@@ -5936,8 +5977,8 @@ var Tag = (props) => {
|
|
|
5936
5977
|
disabled && "disabled"
|
|
5937
5978
|
),
|
|
5938
5979
|
children: [
|
|
5939
|
-
/* @__PURE__ */
|
|
5940
|
-
onClose && /* @__PURE__ */
|
|
5980
|
+
/* @__PURE__ */ jsx348("span", { className: "tag-label", children }),
|
|
5981
|
+
onClose && /* @__PURE__ */ jsx348("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", disabled, children: /* @__PURE__ */ jsx348(XIcon_default, {}) })
|
|
5941
5982
|
]
|
|
5942
5983
|
}
|
|
5943
5984
|
);
|
|
@@ -5946,9 +5987,9 @@ Tag.displayName = "Tag";
|
|
|
5946
5987
|
var Tag_default = Tag;
|
|
5947
5988
|
|
|
5948
5989
|
// src/components/TextArea/TextArea.tsx
|
|
5949
|
-
import
|
|
5950
|
-
import { jsx as
|
|
5951
|
-
var TextArea =
|
|
5990
|
+
import React38 from "react";
|
|
5991
|
+
import { jsx as jsx349 } from "react/jsx-runtime";
|
|
5992
|
+
var TextArea = React38.forwardRef(
|
|
5952
5993
|
(props, ref) => {
|
|
5953
5994
|
const {
|
|
5954
5995
|
className,
|
|
@@ -5958,7 +5999,7 @@ var TextArea = React39.forwardRef(
|
|
|
5958
5999
|
disabled,
|
|
5959
6000
|
...textareaProps
|
|
5960
6001
|
} = props;
|
|
5961
|
-
return /* @__PURE__ */
|
|
6002
|
+
return /* @__PURE__ */ jsx349("div", { className: clsx_default("lib-xplat-textarea-wrap", className), children: /* @__PURE__ */ jsx349(
|
|
5962
6003
|
"textarea",
|
|
5963
6004
|
{
|
|
5964
6005
|
...textareaProps,
|
|
@@ -5975,25 +6016,25 @@ TextArea.displayName = "TextArea";
|
|
|
5975
6016
|
var TextArea_default = TextArea;
|
|
5976
6017
|
|
|
5977
6018
|
// src/components/Toast/Toast.tsx
|
|
5978
|
-
import
|
|
6019
|
+
import React39 from "react";
|
|
5979
6020
|
import { createPortal as createPortal3 } from "react-dom";
|
|
5980
|
-
import { jsx as
|
|
5981
|
-
var ToastContext =
|
|
6021
|
+
import { jsx as jsx350, jsxs as jsxs221 } from "react/jsx-runtime";
|
|
6022
|
+
var ToastContext = React39.createContext(null);
|
|
5982
6023
|
var useToast = () => {
|
|
5983
|
-
const ctx =
|
|
6024
|
+
const ctx = React39.useContext(ToastContext);
|
|
5984
6025
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
5985
6026
|
return ctx;
|
|
5986
6027
|
};
|
|
5987
6028
|
var EXIT_DURATION = 300;
|
|
5988
6029
|
var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
5989
|
-
const ref =
|
|
5990
|
-
const [height, setHeight] =
|
|
5991
|
-
|
|
6030
|
+
const ref = React39.useRef(null);
|
|
6031
|
+
const [height, setHeight] = React39.useState(void 0);
|
|
6032
|
+
React39.useEffect(() => {
|
|
5992
6033
|
if (ref.current && !isExiting) {
|
|
5993
6034
|
setHeight(ref.current.offsetHeight);
|
|
5994
6035
|
}
|
|
5995
6036
|
}, [isExiting]);
|
|
5996
|
-
return /* @__PURE__ */
|
|
6037
|
+
return /* @__PURE__ */ jsx350(
|
|
5997
6038
|
"div",
|
|
5998
6039
|
{
|
|
5999
6040
|
className: clsx_default("lib-xplat-toast-wrapper", { exit: isExiting }),
|
|
@@ -6008,8 +6049,8 @@ var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
|
6008
6049
|
className: clsx_default("lib-xplat-toast", item.type, { exit: isExiting }),
|
|
6009
6050
|
role: "alert",
|
|
6010
6051
|
children: [
|
|
6011
|
-
/* @__PURE__ */
|
|
6012
|
-
/* @__PURE__ */
|
|
6052
|
+
/* @__PURE__ */ jsx350("span", { className: "message", children: item.message }),
|
|
6053
|
+
/* @__PURE__ */ jsx350("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
6013
6054
|
]
|
|
6014
6055
|
}
|
|
6015
6056
|
)
|
|
@@ -6020,13 +6061,13 @@ var ToastProvider = ({
|
|
|
6020
6061
|
children,
|
|
6021
6062
|
position = "top-right"
|
|
6022
6063
|
}) => {
|
|
6023
|
-
const [toasts, setToasts] =
|
|
6024
|
-
const [removing, setRemoving] =
|
|
6025
|
-
const [mounted, setMounted] =
|
|
6026
|
-
|
|
6064
|
+
const [toasts, setToasts] = React39.useState([]);
|
|
6065
|
+
const [removing, setRemoving] = React39.useState(/* @__PURE__ */ new Set());
|
|
6066
|
+
const [mounted, setMounted] = React39.useState(false);
|
|
6067
|
+
React39.useEffect(() => {
|
|
6027
6068
|
setMounted(true);
|
|
6028
6069
|
}, []);
|
|
6029
|
-
const remove =
|
|
6070
|
+
const remove = React39.useCallback((id) => {
|
|
6030
6071
|
setRemoving((prev) => new Set(prev).add(id));
|
|
6031
6072
|
setTimeout(() => {
|
|
6032
6073
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
@@ -6037,7 +6078,7 @@ var ToastProvider = ({
|
|
|
6037
6078
|
});
|
|
6038
6079
|
}, EXIT_DURATION);
|
|
6039
6080
|
}, []);
|
|
6040
|
-
const toast =
|
|
6081
|
+
const toast = React39.useCallback(
|
|
6041
6082
|
(type, message, duration = 3e3) => {
|
|
6042
6083
|
const id = `${Date.now()}-${Math.random()}`;
|
|
6043
6084
|
setToasts((prev) => [...prev, { id, type, message }]);
|
|
@@ -6050,7 +6091,7 @@ var ToastProvider = ({
|
|
|
6050
6091
|
return /* @__PURE__ */ jsxs221(ToastContext.Provider, { value: { toast }, children: [
|
|
6051
6092
|
children,
|
|
6052
6093
|
mounted && createPortal3(
|
|
6053
|
-
/* @__PURE__ */
|
|
6094
|
+
/* @__PURE__ */ jsx350("div", { className: clsx_default("lib-xplat-toast-container", position), children: toasts.map((t) => /* @__PURE__ */ jsx350(
|
|
6054
6095
|
ToastItemComponent,
|
|
6055
6096
|
{
|
|
6056
6097
|
item: t,
|
|
@@ -6066,67 +6107,111 @@ var ToastProvider = ({
|
|
|
6066
6107
|
ToastProvider.displayName = "ToastProvider";
|
|
6067
6108
|
|
|
6068
6109
|
// src/components/Tooltip/Tooltip.tsx
|
|
6069
|
-
import
|
|
6070
|
-
import { Fragment as Fragment5, jsx as
|
|
6110
|
+
import React40 from "react";
|
|
6111
|
+
import { Fragment as Fragment5, jsx as jsx351, jsxs as jsxs222 } from "react/jsx-runtime";
|
|
6071
6112
|
var OFFSET = 12;
|
|
6113
|
+
var GAP = 8;
|
|
6072
6114
|
var SHOW_DELAY = 300;
|
|
6073
6115
|
var Tooltip = (props) => {
|
|
6074
6116
|
const {
|
|
6075
|
-
|
|
6117
|
+
children,
|
|
6076
6118
|
title,
|
|
6077
6119
|
description,
|
|
6078
|
-
|
|
6120
|
+
type = "dark",
|
|
6121
|
+
follow = false,
|
|
6079
6122
|
disabled = false
|
|
6080
6123
|
} = props;
|
|
6081
|
-
const triggerRef =
|
|
6082
|
-
const tooltipRef =
|
|
6083
|
-
const [visible, setVisible] =
|
|
6084
|
-
const [pos, setPos] =
|
|
6085
|
-
const delayTimer =
|
|
6086
|
-
const
|
|
6124
|
+
const triggerRef = React40.useRef(null);
|
|
6125
|
+
const tooltipRef = React40.useRef(null);
|
|
6126
|
+
const [visible, setVisible] = React40.useState(false);
|
|
6127
|
+
const [pos, setPos] = React40.useState({ left: 0, top: 0 });
|
|
6128
|
+
const delayTimer = React40.useRef(0);
|
|
6129
|
+
const rafRef = React40.useRef(0);
|
|
6130
|
+
const cursor = React40.useRef(null);
|
|
6131
|
+
const clamp = React40.useCallback((left, top, w, h) => {
|
|
6132
|
+
const vw = window.innerWidth;
|
|
6133
|
+
const vh = window.innerHeight;
|
|
6134
|
+
return {
|
|
6135
|
+
left: Math.min(Math.max(GAP, left), Math.max(GAP, vw - w - GAP)),
|
|
6136
|
+
top: Math.min(Math.max(GAP, top), Math.max(GAP, vh - h - GAP))
|
|
6137
|
+
};
|
|
6138
|
+
}, []);
|
|
6139
|
+
const placeAtCursor = React40.useCallback((x, y) => {
|
|
6087
6140
|
const el = tooltipRef.current;
|
|
6088
6141
|
if (!el) return;
|
|
6089
6142
|
const w = el.offsetWidth;
|
|
6090
6143
|
const h = el.offsetHeight;
|
|
6091
|
-
|
|
6092
|
-
let
|
|
6093
|
-
|
|
6094
|
-
if (
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6144
|
+
let left = x + OFFSET;
|
|
6145
|
+
let top = y - h - OFFSET;
|
|
6146
|
+
if (left + w > window.innerWidth - GAP) left = x - w - OFFSET;
|
|
6147
|
+
if (top < GAP) top = y + OFFSET;
|
|
6148
|
+
setPos(clamp(left, top, w, h));
|
|
6149
|
+
}, [clamp]);
|
|
6150
|
+
const placeAtTrigger = React40.useCallback(() => {
|
|
6151
|
+
const el = tooltipRef.current;
|
|
6152
|
+
const trigger = triggerRef.current;
|
|
6153
|
+
if (!el || !trigger) return;
|
|
6154
|
+
const w = el.offsetWidth;
|
|
6155
|
+
const h = el.offsetHeight;
|
|
6156
|
+
const rect = trigger.getBoundingClientRect();
|
|
6157
|
+
let top = rect.top - h - GAP;
|
|
6158
|
+
if (top < GAP) top = rect.bottom + GAP;
|
|
6159
|
+
const left = rect.left + rect.width / 2 - w / 2;
|
|
6160
|
+
setPos(clamp(left, top, w, h));
|
|
6161
|
+
}, [clamp]);
|
|
6162
|
+
const reposition = React40.useCallback(() => {
|
|
6163
|
+
if (follow && cursor.current) {
|
|
6164
|
+
placeAtCursor(cursor.current.x, cursor.current.y);
|
|
6165
|
+
} else {
|
|
6166
|
+
placeAtTrigger();
|
|
6167
|
+
}
|
|
6168
|
+
}, [follow, placeAtCursor, placeAtTrigger]);
|
|
6169
|
+
const handleMouseEnter = React40.useCallback((e) => {
|
|
6100
6170
|
if (disabled) return;
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
}, SHOW_DELAY);
|
|
6171
|
+
cursor.current = { x: e.clientX, y: e.clientY };
|
|
6172
|
+
delayTimer.current = window.setTimeout(() => setVisible(true), SHOW_DELAY);
|
|
6104
6173
|
}, [disabled]);
|
|
6105
|
-
const handleMouseMove =
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
}, []);
|
|
6113
|
-
const
|
|
6174
|
+
const handleMouseMove = React40.useCallback((e) => {
|
|
6175
|
+
cursor.current = { x: e.clientX, y: e.clientY };
|
|
6176
|
+
if (!visible || !follow) return;
|
|
6177
|
+
cancelAnimationFrame(rafRef.current);
|
|
6178
|
+
rafRef.current = requestAnimationFrame(() => {
|
|
6179
|
+
if (cursor.current) placeAtCursor(cursor.current.x, cursor.current.y);
|
|
6180
|
+
});
|
|
6181
|
+
}, [visible, follow, placeAtCursor]);
|
|
6182
|
+
const close = React40.useCallback(() => {
|
|
6114
6183
|
window.clearTimeout(delayTimer.current);
|
|
6184
|
+
cancelAnimationFrame(rafRef.current);
|
|
6115
6185
|
setVisible(false);
|
|
6116
6186
|
}, []);
|
|
6117
|
-
const
|
|
6187
|
+
const handleMouseLeave = React40.useCallback(() => {
|
|
6188
|
+
cursor.current = null;
|
|
6189
|
+
close();
|
|
6190
|
+
}, [close]);
|
|
6191
|
+
const handleFocus = React40.useCallback(() => {
|
|
6118
6192
|
if (disabled) return;
|
|
6193
|
+
cursor.current = null;
|
|
6119
6194
|
setVisible(true);
|
|
6120
6195
|
}, [disabled]);
|
|
6121
|
-
|
|
6122
|
-
|
|
6196
|
+
React40.useLayoutEffect(() => {
|
|
6197
|
+
if (!visible) return;
|
|
6198
|
+
reposition();
|
|
6199
|
+
}, [visible, reposition]);
|
|
6200
|
+
React40.useEffect(() => {
|
|
6201
|
+
if (!visible || follow) return;
|
|
6202
|
+
const onChange = () => placeAtTrigger();
|
|
6203
|
+
window.addEventListener("scroll", onChange, true);
|
|
6204
|
+
window.addEventListener("resize", onChange);
|
|
6205
|
+
return () => {
|
|
6206
|
+
window.removeEventListener("scroll", onChange, true);
|
|
6207
|
+
window.removeEventListener("resize", onChange);
|
|
6208
|
+
};
|
|
6209
|
+
}, [visible, follow, placeAtTrigger]);
|
|
6210
|
+
React40.useEffect(() => () => {
|
|
6211
|
+
window.clearTimeout(delayTimer.current);
|
|
6212
|
+
cancelAnimationFrame(rafRef.current);
|
|
6123
6213
|
}, []);
|
|
6124
|
-
|
|
6125
|
-
if (!visible || !triggerRef.current) return;
|
|
6126
|
-
const rect = triggerRef.current.getBoundingClientRect();
|
|
6127
|
-
calculatePos(rect.right, rect.top);
|
|
6128
|
-
}, [visible, calculatePos]);
|
|
6129
|
-
if (!title && !description) return /* @__PURE__ */ jsx350(Fragment5, { children });
|
|
6214
|
+
if (!title && !description) return /* @__PURE__ */ jsx351(Fragment5, { children });
|
|
6130
6215
|
return /* @__PURE__ */ jsxs222(
|
|
6131
6216
|
"div",
|
|
6132
6217
|
{
|
|
@@ -6135,20 +6220,21 @@ var Tooltip = (props) => {
|
|
|
6135
6220
|
onMouseEnter: handleMouseEnter,
|
|
6136
6221
|
onMouseMove: handleMouseMove,
|
|
6137
6222
|
onMouseLeave: handleMouseLeave,
|
|
6138
|
-
onClick:
|
|
6223
|
+
onClick: close,
|
|
6139
6224
|
onFocus: handleFocus,
|
|
6140
|
-
onBlur:
|
|
6225
|
+
onBlur: close,
|
|
6141
6226
|
children: [
|
|
6142
6227
|
children,
|
|
6143
|
-
visible && /* @__PURE__ */
|
|
6228
|
+
visible && /* @__PURE__ */ jsx351(Portal_default, { children: /* @__PURE__ */ jsxs222(
|
|
6144
6229
|
"div",
|
|
6145
6230
|
{
|
|
6146
6231
|
ref: tooltipRef,
|
|
6232
|
+
role: "tooltip",
|
|
6147
6233
|
className: clsx_default("lib-xplat-tooltip", type),
|
|
6148
6234
|
style: { position: "fixed", left: pos.left, top: pos.top },
|
|
6149
6235
|
children: [
|
|
6150
|
-
title && /* @__PURE__ */
|
|
6151
|
-
description && /* @__PURE__ */
|
|
6236
|
+
title && /* @__PURE__ */ jsx351("div", { className: "tooltip-title", children: title }),
|
|
6237
|
+
description && /* @__PURE__ */ jsx351("div", { className: "tooltip-desc", children: description })
|
|
6152
6238
|
]
|
|
6153
6239
|
}
|
|
6154
6240
|
) })
|
|
@@ -6160,11 +6246,11 @@ Tooltip.displayName = "Tooltip";
|
|
|
6160
6246
|
var Tooltip_default = Tooltip;
|
|
6161
6247
|
|
|
6162
6248
|
// src/components/Video/Video.tsx
|
|
6163
|
-
import
|
|
6164
|
-
import { jsx as
|
|
6249
|
+
import React41 from "react";
|
|
6250
|
+
import { jsx as jsx352, jsxs as jsxs223 } from "react/jsx-runtime";
|
|
6165
6251
|
var PipIcon = () => /* @__PURE__ */ jsxs223("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
6166
|
-
/* @__PURE__ */
|
|
6167
|
-
/* @__PURE__ */
|
|
6252
|
+
/* @__PURE__ */ jsx352("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
6253
|
+
/* @__PURE__ */ jsx352("rect", { x: "12", y: "11", width: "7", height: "6", rx: "1", fill: "currentColor" })
|
|
6168
6254
|
] });
|
|
6169
6255
|
var formatTime = (sec) => {
|
|
6170
6256
|
if (!Number.isFinite(sec) || sec < 0) return "0:00";
|
|
@@ -6172,7 +6258,7 @@ var formatTime = (sec) => {
|
|
|
6172
6258
|
const s = Math.floor(sec % 60);
|
|
6173
6259
|
return `${m}:${s.toString().padStart(2, "0")}`;
|
|
6174
6260
|
};
|
|
6175
|
-
var Video =
|
|
6261
|
+
var Video = React41.forwardRef((props, ref) => {
|
|
6176
6262
|
const {
|
|
6177
6263
|
src,
|
|
6178
6264
|
poster,
|
|
@@ -6196,21 +6282,21 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
6196
6282
|
children,
|
|
6197
6283
|
...rest
|
|
6198
6284
|
} = props;
|
|
6199
|
-
const containerRef =
|
|
6200
|
-
const videoRef =
|
|
6201
|
-
const [isPlaying, setIsPlaying] =
|
|
6202
|
-
const [isLoaded, setIsLoaded] =
|
|
6203
|
-
const [currentTime, setCurrentTime] =
|
|
6204
|
-
const [duration, setDuration] =
|
|
6205
|
-
const [buffered, setBuffered] =
|
|
6206
|
-
const [volume, setVolume] =
|
|
6207
|
-
const [isMuted, setIsMuted] =
|
|
6208
|
-
const [isFullscreen, setIsFullscreen] =
|
|
6209
|
-
const [playbackRate, setPlaybackRate] =
|
|
6210
|
-
const [rateMenuOpen, setRateMenuOpen] =
|
|
6211
|
-
const [captionsOn, setCaptionsOn] =
|
|
6212
|
-
const [isPip, setIsPip] =
|
|
6213
|
-
const setRefs =
|
|
6285
|
+
const containerRef = React41.useRef(null);
|
|
6286
|
+
const videoRef = React41.useRef(null);
|
|
6287
|
+
const [isPlaying, setIsPlaying] = React41.useState(Boolean(autoPlay));
|
|
6288
|
+
const [isLoaded, setIsLoaded] = React41.useState(false);
|
|
6289
|
+
const [currentTime, setCurrentTime] = React41.useState(0);
|
|
6290
|
+
const [duration, setDuration] = React41.useState(0);
|
|
6291
|
+
const [buffered, setBuffered] = React41.useState(0);
|
|
6292
|
+
const [volume, setVolume] = React41.useState(1);
|
|
6293
|
+
const [isMuted, setIsMuted] = React41.useState(Boolean(muted));
|
|
6294
|
+
const [isFullscreen, setIsFullscreen] = React41.useState(false);
|
|
6295
|
+
const [playbackRate, setPlaybackRate] = React41.useState(1);
|
|
6296
|
+
const [rateMenuOpen, setRateMenuOpen] = React41.useState(false);
|
|
6297
|
+
const [captionsOn, setCaptionsOn] = React41.useState(false);
|
|
6298
|
+
const [isPip, setIsPip] = React41.useState(false);
|
|
6299
|
+
const setRefs = React41.useCallback(
|
|
6214
6300
|
(el) => {
|
|
6215
6301
|
videoRef.current = el;
|
|
6216
6302
|
if (typeof ref === "function") ref(el);
|
|
@@ -6218,14 +6304,14 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
6218
6304
|
},
|
|
6219
6305
|
[ref]
|
|
6220
6306
|
);
|
|
6221
|
-
|
|
6307
|
+
React41.useEffect(() => {
|
|
6222
6308
|
const onFsChange = () => {
|
|
6223
6309
|
setIsFullscreen(document.fullscreenElement === containerRef.current);
|
|
6224
6310
|
};
|
|
6225
6311
|
document.addEventListener("fullscreenchange", onFsChange);
|
|
6226
6312
|
return () => document.removeEventListener("fullscreenchange", onFsChange);
|
|
6227
6313
|
}, []);
|
|
6228
|
-
|
|
6314
|
+
React41.useEffect(() => {
|
|
6229
6315
|
const v = videoRef.current;
|
|
6230
6316
|
if (!v) return;
|
|
6231
6317
|
const onEnter = () => setIsPip(true);
|
|
@@ -6345,7 +6431,7 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
6345
6431
|
ref: containerRef,
|
|
6346
6432
|
className: clsx_default("lib-xplat-video", showControls && "has-controls"),
|
|
6347
6433
|
children: [
|
|
6348
|
-
/* @__PURE__ */
|
|
6434
|
+
/* @__PURE__ */ jsx352(
|
|
6349
6435
|
"video",
|
|
6350
6436
|
{
|
|
6351
6437
|
ref: setRefs,
|
|
@@ -6366,7 +6452,7 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
6366
6452
|
children
|
|
6367
6453
|
}
|
|
6368
6454
|
),
|
|
6369
|
-
showCenterPlay && /* @__PURE__ */
|
|
6455
|
+
showCenterPlay && /* @__PURE__ */ jsx352(
|
|
6370
6456
|
"button",
|
|
6371
6457
|
{
|
|
6372
6458
|
type: "button",
|
|
@@ -6378,11 +6464,11 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
6378
6464
|
onClick: togglePlay,
|
|
6379
6465
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
6380
6466
|
tabIndex: -1,
|
|
6381
|
-
children: /* @__PURE__ */
|
|
6467
|
+
children: /* @__PURE__ */ jsx352("span", { className: "center-play-icon", children: /* @__PURE__ */ jsx352(PlayCircleIcon_default, {}) })
|
|
6382
6468
|
}
|
|
6383
6469
|
),
|
|
6384
6470
|
showControls && /* @__PURE__ */ jsxs223("div", { className: "controls", onClick: (e) => e.stopPropagation(), children: [
|
|
6385
|
-
/* @__PURE__ */
|
|
6471
|
+
/* @__PURE__ */ jsx352(
|
|
6386
6472
|
"input",
|
|
6387
6473
|
{
|
|
6388
6474
|
type: "range",
|
|
@@ -6400,28 +6486,28 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
6400
6486
|
}
|
|
6401
6487
|
),
|
|
6402
6488
|
/* @__PURE__ */ jsxs223("div", { className: "controls-row", children: [
|
|
6403
|
-
/* @__PURE__ */
|
|
6489
|
+
/* @__PURE__ */ jsx352(
|
|
6404
6490
|
"button",
|
|
6405
6491
|
{
|
|
6406
6492
|
type: "button",
|
|
6407
6493
|
className: "control-btn",
|
|
6408
6494
|
onClick: togglePlay,
|
|
6409
6495
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
6410
|
-
children: isPlaying ? /* @__PURE__ */
|
|
6496
|
+
children: isPlaying ? /* @__PURE__ */ jsx352(PauseIcon_default, {}) : /* @__PURE__ */ jsx352(PlayIcon_default, {})
|
|
6411
6497
|
}
|
|
6412
6498
|
),
|
|
6413
6499
|
/* @__PURE__ */ jsxs223("div", { className: "volume-group", children: [
|
|
6414
|
-
/* @__PURE__ */
|
|
6500
|
+
/* @__PURE__ */ jsx352(
|
|
6415
6501
|
"button",
|
|
6416
6502
|
{
|
|
6417
6503
|
type: "button",
|
|
6418
6504
|
className: "control-btn",
|
|
6419
6505
|
onClick: toggleMute,
|
|
6420
6506
|
"aria-label": isMuted ? "\uC74C\uC18C\uAC70 \uD574\uC81C" : "\uC74C\uC18C\uAC70",
|
|
6421
|
-
children: /* @__PURE__ */
|
|
6507
|
+
children: /* @__PURE__ */ jsx352(VolumeGlyph, {})
|
|
6422
6508
|
}
|
|
6423
6509
|
),
|
|
6424
|
-
/* @__PURE__ */
|
|
6510
|
+
/* @__PURE__ */ jsx352(
|
|
6425
6511
|
"input",
|
|
6426
6512
|
{
|
|
6427
6513
|
type: "range",
|
|
@@ -6441,7 +6527,7 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
6441
6527
|
" / ",
|
|
6442
6528
|
formatTime(duration)
|
|
6443
6529
|
] }),
|
|
6444
|
-
/* @__PURE__ */
|
|
6530
|
+
/* @__PURE__ */ jsx352("div", { className: "controls-spacer" }),
|
|
6445
6531
|
playbackRates && playbackRates.length > 0 && /* @__PURE__ */ jsxs223("div", { className: clsx_default("rate-group", rateMenuOpen && "is-open"), children: [
|
|
6446
6532
|
/* @__PURE__ */ jsxs223(
|
|
6447
6533
|
"button",
|
|
@@ -6457,7 +6543,7 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
6457
6543
|
]
|
|
6458
6544
|
}
|
|
6459
6545
|
),
|
|
6460
|
-
rateMenuOpen && /* @__PURE__ */
|
|
6546
|
+
rateMenuOpen && /* @__PURE__ */ jsx352("ul", { className: "rate-menu", role: "menu", children: playbackRates.map((r2) => /* @__PURE__ */ jsx352("li", { children: /* @__PURE__ */ jsxs223(
|
|
6461
6547
|
"button",
|
|
6462
6548
|
{
|
|
6463
6549
|
type: "button",
|
|
@@ -6471,7 +6557,7 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
6471
6557
|
}
|
|
6472
6558
|
) }, r2)) })
|
|
6473
6559
|
] }),
|
|
6474
|
-
showCaptions && /* @__PURE__ */
|
|
6560
|
+
showCaptions && /* @__PURE__ */ jsx352(
|
|
6475
6561
|
"button",
|
|
6476
6562
|
{
|
|
6477
6563
|
type: "button",
|
|
@@ -6479,37 +6565,37 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
6479
6565
|
onClick: toggleCaptions,
|
|
6480
6566
|
"aria-label": captionsOn ? "\uC790\uB9C9 \uB044\uAE30" : "\uC790\uB9C9 \uCF1C\uAE30",
|
|
6481
6567
|
"aria-pressed": captionsOn,
|
|
6482
|
-
children: /* @__PURE__ */
|
|
6568
|
+
children: /* @__PURE__ */ jsx352(TypeIcon_default, {})
|
|
6483
6569
|
}
|
|
6484
6570
|
),
|
|
6485
|
-
showPip && pipSupported && /* @__PURE__ */
|
|
6571
|
+
showPip && pipSupported && /* @__PURE__ */ jsx352(
|
|
6486
6572
|
"button",
|
|
6487
6573
|
{
|
|
6488
6574
|
type: "button",
|
|
6489
6575
|
className: clsx_default("control-btn", isPip && "is-active"),
|
|
6490
6576
|
onClick: togglePip,
|
|
6491
6577
|
"aria-label": isPip ? "PIP \uC885\uB8CC" : "PIP",
|
|
6492
|
-
children: /* @__PURE__ */
|
|
6578
|
+
children: /* @__PURE__ */ jsx352(PipIcon, {})
|
|
6493
6579
|
}
|
|
6494
6580
|
),
|
|
6495
|
-
showDownload && /* @__PURE__ */
|
|
6581
|
+
showDownload && /* @__PURE__ */ jsx352(
|
|
6496
6582
|
"a",
|
|
6497
6583
|
{
|
|
6498
6584
|
className: "control-btn",
|
|
6499
6585
|
href: src,
|
|
6500
6586
|
download: downloadFileName ?? true,
|
|
6501
6587
|
"aria-label": "\uB2E4\uC6B4\uB85C\uB4DC",
|
|
6502
|
-
children: /* @__PURE__ */
|
|
6588
|
+
children: /* @__PURE__ */ jsx352(DownloadIcon_default, {})
|
|
6503
6589
|
}
|
|
6504
6590
|
),
|
|
6505
|
-
/* @__PURE__ */
|
|
6591
|
+
/* @__PURE__ */ jsx352(
|
|
6506
6592
|
"button",
|
|
6507
6593
|
{
|
|
6508
6594
|
type: "button",
|
|
6509
6595
|
className: "control-btn",
|
|
6510
6596
|
onClick: toggleFullscreen,
|
|
6511
6597
|
"aria-label": isFullscreen ? "\uC804\uCCB4\uD654\uBA74 \uC885\uB8CC" : "\uC804\uCCB4\uD654\uBA74",
|
|
6512
|
-
children: isFullscreen ? /* @__PURE__ */
|
|
6598
|
+
children: isFullscreen ? /* @__PURE__ */ jsx352(MinimizeIcon_default, {}) : /* @__PURE__ */ jsx352(MaximizeIcon_default, {})
|
|
6513
6599
|
}
|
|
6514
6600
|
)
|
|
6515
6601
|
] })
|
|
@@ -6547,6 +6633,8 @@ export {
|
|
|
6547
6633
|
ImageSelector_default as ImageSelector,
|
|
6548
6634
|
Input_default as Input,
|
|
6549
6635
|
InputDatePicker_default as InputDatePicker,
|
|
6636
|
+
Link_default as Link,
|
|
6637
|
+
LinkButton_default as LinkButton,
|
|
6550
6638
|
Modal_default as Modal,
|
|
6551
6639
|
NotificationBadge_default as NotificationBadge,
|
|
6552
6640
|
Pagination_default as Pagination,
|