@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/index.js
CHANGED
|
@@ -6297,9 +6297,16 @@ var useChartTooltip = (enabled) => {
|
|
|
6297
6297
|
}, []);
|
|
6298
6298
|
return { tooltip, show, hide, move, containerRef };
|
|
6299
6299
|
};
|
|
6300
|
+
var formatTick = (value, maxVal) => {
|
|
6301
|
+
const step = maxVal / 4;
|
|
6302
|
+
if (!Number.isFinite(step) || step <= 0) return "0";
|
|
6303
|
+
const decimals = step >= 1 ? 0 : Math.min(4, Math.ceil(-Math.log10(step)));
|
|
6304
|
+
const fixed = value.toFixed(decimals);
|
|
6305
|
+
return decimals === 0 ? Number(fixed).toLocaleString("en-US") : fixed;
|
|
6306
|
+
};
|
|
6300
6307
|
var GridLines = React6.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ jsx305(Fragment2, { children: [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
|
|
6301
6308
|
const y = PADDING.top + (1 - ratio) * chartH;
|
|
6302
|
-
const val =
|
|
6309
|
+
const val = formatTick(maxVal * ratio, maxVal);
|
|
6303
6310
|
return /* @__PURE__ */ jsxs195("g", { children: [
|
|
6304
6311
|
/* @__PURE__ */ jsx305("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
|
|
6305
6312
|
/* @__PURE__ */ jsx305("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
|
|
@@ -6982,7 +6989,7 @@ Chip.displayName = "Chip";
|
|
|
6982
6989
|
var Chip_default = Chip;
|
|
6983
6990
|
|
|
6984
6991
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
6985
|
-
import
|
|
6992
|
+
import React12 from "react";
|
|
6986
6993
|
|
|
6987
6994
|
// src/components/Input/Input.tsx
|
|
6988
6995
|
import React8 from "react";
|
|
@@ -7173,38 +7180,26 @@ PasswordInput.displayName = "PasswordInput";
|
|
|
7173
7180
|
var PasswordInput_default = PasswordInput;
|
|
7174
7181
|
|
|
7175
7182
|
// src/components/Modal/Modal.tsx
|
|
7176
|
-
import React11 from "react";
|
|
7177
|
-
import { createPortal } from "react-dom";
|
|
7178
|
-
|
|
7179
|
-
// src/tokens/hooks/Portal.tsx
|
|
7180
7183
|
import React10 from "react";
|
|
7181
|
-
import
|
|
7184
|
+
import { createPortal } from "react-dom";
|
|
7182
7185
|
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
7183
|
-
var PortalContainerContext = React10.createContext(null);
|
|
7184
|
-
var PortalProvider = ({ container, children }) => /* @__PURE__ */ jsx313(PortalContainerContext.Provider, { value: container, children });
|
|
7185
|
-
var Portal = ({ children }) => {
|
|
7186
|
-
const contextContainer = React10.useContext(PortalContainerContext);
|
|
7187
|
-
if (typeof document === "undefined") return null;
|
|
7188
|
-
const container = contextContainer ?? document.body;
|
|
7189
|
-
return ReactDOM.createPortal(children, container);
|
|
7190
|
-
};
|
|
7191
|
-
Portal.displayName = "Portal";
|
|
7192
|
-
var Portal_default = Portal;
|
|
7193
|
-
|
|
7194
|
-
// src/components/Modal/Modal.tsx
|
|
7195
|
-
import { jsx as jsx314 } from "react/jsx-runtime";
|
|
7196
7186
|
var ANIMATION_DURATION_MS = 200;
|
|
7197
7187
|
var Modal = (props) => {
|
|
7198
7188
|
const { isOpen, onClose, children } = props;
|
|
7199
|
-
const [mounted, setMounted] =
|
|
7200
|
-
const [visible, setVisible] =
|
|
7201
|
-
const
|
|
7202
|
-
|
|
7189
|
+
const [mounted, setMounted] = React10.useState(false);
|
|
7190
|
+
const [visible, setVisible] = React10.useState(false);
|
|
7191
|
+
const [settled, setSettled] = React10.useState(false);
|
|
7192
|
+
React10.useEffect(() => {
|
|
7203
7193
|
if (isOpen) {
|
|
7204
7194
|
setMounted(true);
|
|
7205
|
-
const
|
|
7206
|
-
|
|
7195
|
+
const show = setTimeout(() => setVisible(true), 1);
|
|
7196
|
+
const settle = setTimeout(() => setSettled(true), ANIMATION_DURATION_MS + 50);
|
|
7197
|
+
return () => {
|
|
7198
|
+
clearTimeout(show);
|
|
7199
|
+
clearTimeout(settle);
|
|
7200
|
+
};
|
|
7207
7201
|
}
|
|
7202
|
+
setSettled(false);
|
|
7208
7203
|
setVisible(false);
|
|
7209
7204
|
const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS);
|
|
7210
7205
|
return () => clearTimeout(t);
|
|
@@ -7213,20 +7208,19 @@ var Modal = (props) => {
|
|
|
7213
7208
|
if (!mounted) return null;
|
|
7214
7209
|
const stateClass = visible ? "enter" : "exit";
|
|
7215
7210
|
return createPortal(
|
|
7216
|
-
/* @__PURE__ */
|
|
7211
|
+
/* @__PURE__ */ jsx313(
|
|
7217
7212
|
"div",
|
|
7218
7213
|
{
|
|
7219
7214
|
className: clsx_default("lib-xplat-modal", "dim", stateClass),
|
|
7220
7215
|
onClick: onClose,
|
|
7221
|
-
children: /* @__PURE__ */
|
|
7216
|
+
children: /* @__PURE__ */ jsx313(
|
|
7222
7217
|
"div",
|
|
7223
7218
|
{
|
|
7224
|
-
|
|
7225
|
-
className: clsx_default("lib-xplat-modal", "modal-box", stateClass),
|
|
7219
|
+
className: clsx_default("lib-xplat-modal", "modal-box", stateClass, settled && "settled"),
|
|
7226
7220
|
role: "dialog",
|
|
7227
7221
|
"aria-modal": "true",
|
|
7228
7222
|
onClick: (e) => e.stopPropagation(),
|
|
7229
|
-
children
|
|
7223
|
+
children
|
|
7230
7224
|
}
|
|
7231
7225
|
)
|
|
7232
7226
|
}
|
|
@@ -7238,9 +7232,9 @@ Modal.displayName = "Modal";
|
|
|
7238
7232
|
var Modal_default = Modal;
|
|
7239
7233
|
|
|
7240
7234
|
// src/components/DatePicker/SingleDatePicker/index.tsx
|
|
7241
|
-
import
|
|
7242
|
-
import { Fragment as Fragment3, jsx as
|
|
7243
|
-
var DayCell2 =
|
|
7235
|
+
import React11 from "react";
|
|
7236
|
+
import { Fragment as Fragment3, jsx as jsx314, jsxs as jsxs200 } from "react/jsx-runtime";
|
|
7237
|
+
var DayCell2 = React11.memo(
|
|
7244
7238
|
({
|
|
7245
7239
|
day,
|
|
7246
7240
|
disabled,
|
|
@@ -7250,7 +7244,7 @@ var DayCell2 = React12.memo(
|
|
|
7250
7244
|
isEnd,
|
|
7251
7245
|
inRange,
|
|
7252
7246
|
onSelect
|
|
7253
|
-
}) => /* @__PURE__ */
|
|
7247
|
+
}) => /* @__PURE__ */ jsx314(
|
|
7254
7248
|
"button",
|
|
7255
7249
|
{
|
|
7256
7250
|
type: "button",
|
|
@@ -7292,26 +7286,26 @@ var SingleDatePicker = (props) => {
|
|
|
7292
7286
|
initialYear,
|
|
7293
7287
|
initialMonth
|
|
7294
7288
|
);
|
|
7295
|
-
const [pickerMode, setPickerMode] =
|
|
7296
|
-
const [yearRangeStart, setYearRangeStart] =
|
|
7289
|
+
const [pickerMode, setPickerMode] = React11.useState("days");
|
|
7290
|
+
const [yearRangeStart, setYearRangeStart] = React11.useState(
|
|
7297
7291
|
Math.floor((initialYear ?? (/* @__PURE__ */ new Date()).getFullYear()) / 12) * 12
|
|
7298
7292
|
);
|
|
7299
|
-
const minTime =
|
|
7293
|
+
const minTime = React11.useMemo(
|
|
7300
7294
|
() => minDate ? new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()).getTime() : -Infinity,
|
|
7301
7295
|
[minDate]
|
|
7302
7296
|
);
|
|
7303
|
-
const maxTime =
|
|
7297
|
+
const maxTime = React11.useMemo(
|
|
7304
7298
|
() => maxDate ? new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate()).getTime() : Infinity,
|
|
7305
7299
|
[maxDate]
|
|
7306
7300
|
);
|
|
7307
|
-
const highlightSet =
|
|
7301
|
+
const highlightSet = React11.useMemo(() => {
|
|
7308
7302
|
const set = /* @__PURE__ */ new Set();
|
|
7309
7303
|
for (const h of highlightDates) {
|
|
7310
7304
|
set.add(`${h.getFullYear()}-${h.getMonth()}-${h.getDate()}`);
|
|
7311
7305
|
}
|
|
7312
7306
|
return set;
|
|
7313
7307
|
}, [highlightDates]);
|
|
7314
|
-
const handleSelect =
|
|
7308
|
+
const handleSelect = React11.useCallback(
|
|
7315
7309
|
(date) => {
|
|
7316
7310
|
onChange?.(date);
|
|
7317
7311
|
},
|
|
@@ -7354,14 +7348,14 @@ var SingleDatePicker = (props) => {
|
|
|
7354
7348
|
className: clsx_default("lib-xplat-datepicker", "single"),
|
|
7355
7349
|
children: [
|
|
7356
7350
|
/* @__PURE__ */ jsxs200("div", { className: "datepicker-header", children: [
|
|
7357
|
-
/* @__PURE__ */
|
|
7358
|
-
/* @__PURE__ */
|
|
7359
|
-
/* @__PURE__ */
|
|
7351
|
+
/* @__PURE__ */ jsx314("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ jsx314(ChevronLeftIcon_default, {}) }),
|
|
7352
|
+
/* @__PURE__ */ jsx314("button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
|
|
7353
|
+
/* @__PURE__ */ jsx314("button", { className: "datepicker-nav", onClick: handleNext, type: "button", children: /* @__PURE__ */ jsx314(ChevronRightIcon_default, {}) })
|
|
7360
7354
|
] }),
|
|
7361
7355
|
/* @__PURE__ */ jsxs200("div", { className: "datepicker-body", children: [
|
|
7362
|
-
pickerMode === "years" && /* @__PURE__ */
|
|
7356
|
+
pickerMode === "years" && /* @__PURE__ */ jsx314("div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
|
|
7363
7357
|
const y = yearRangeStart + i;
|
|
7364
|
-
return /* @__PURE__ */
|
|
7358
|
+
return /* @__PURE__ */ jsx314(
|
|
7365
7359
|
"button",
|
|
7366
7360
|
{
|
|
7367
7361
|
type: "button",
|
|
@@ -7372,7 +7366,7 @@ var SingleDatePicker = (props) => {
|
|
|
7372
7366
|
y
|
|
7373
7367
|
);
|
|
7374
7368
|
}) }),
|
|
7375
|
-
pickerMode === "months" && /* @__PURE__ */
|
|
7369
|
+
pickerMode === "months" && /* @__PURE__ */ jsx314("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ jsx314(
|
|
7376
7370
|
"button",
|
|
7377
7371
|
{
|
|
7378
7372
|
type: "button",
|
|
@@ -7383,7 +7377,7 @@ var SingleDatePicker = (props) => {
|
|
|
7383
7377
|
i
|
|
7384
7378
|
)) }),
|
|
7385
7379
|
pickerMode === "days" && /* @__PURE__ */ jsxs200(Fragment3, { children: [
|
|
7386
|
-
/* @__PURE__ */
|
|
7380
|
+
/* @__PURE__ */ jsx314("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ jsx314(
|
|
7387
7381
|
"div",
|
|
7388
7382
|
{
|
|
7389
7383
|
className: clsx_default(
|
|
@@ -7395,7 +7389,7 @@ var SingleDatePicker = (props) => {
|
|
|
7395
7389
|
},
|
|
7396
7390
|
label
|
|
7397
7391
|
)) }),
|
|
7398
|
-
/* @__PURE__ */
|
|
7392
|
+
/* @__PURE__ */ jsx314("div", { className: "datepicker-grid", children: days.map((day, idx) => {
|
|
7399
7393
|
const t = day.date.getTime();
|
|
7400
7394
|
const disabled = t < minTime || t > maxTime;
|
|
7401
7395
|
const selected = value ? isSameDay(day.date, value) : false;
|
|
@@ -7405,7 +7399,7 @@ var SingleDatePicker = (props) => {
|
|
|
7405
7399
|
const isStart = hasRange ? isSameDay(day.date, rangeStart) : false;
|
|
7406
7400
|
const isEnd = hasRange ? isSameDay(day.date, rangeEnd) : false;
|
|
7407
7401
|
const inRangeVal = hasRange ? isInRange(day.date, rangeStart, rangeEnd) : false;
|
|
7408
|
-
return /* @__PURE__ */
|
|
7402
|
+
return /* @__PURE__ */ jsx314(
|
|
7409
7403
|
DayCell2,
|
|
7410
7404
|
{
|
|
7411
7405
|
day,
|
|
@@ -7430,7 +7424,7 @@ SingleDatePicker.displayName = "SingleDatePicker";
|
|
|
7430
7424
|
var SingleDatePicker_default = SingleDatePicker;
|
|
7431
7425
|
|
|
7432
7426
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
7433
|
-
import { jsx as
|
|
7427
|
+
import { jsx as jsx315, jsxs as jsxs201 } from "react/jsx-runtime";
|
|
7434
7428
|
var formatDate = (date) => {
|
|
7435
7429
|
if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
|
|
7436
7430
|
const y = date.getFullYear();
|
|
@@ -7440,8 +7434,8 @@ var formatDate = (date) => {
|
|
|
7440
7434
|
};
|
|
7441
7435
|
var InputDatePicker = (props) => {
|
|
7442
7436
|
const { value, onChange, minDate, maxDate, disabled, locale = "ko", placeholder } = props;
|
|
7443
|
-
const [isOpen, setIsOpen] =
|
|
7444
|
-
const [tempDate, setTempDate] =
|
|
7437
|
+
const [isOpen, setIsOpen] = React12.useState(false);
|
|
7438
|
+
const [tempDate, setTempDate] = React12.useState(value ?? /* @__PURE__ */ new Date());
|
|
7445
7439
|
const handleOpen = () => {
|
|
7446
7440
|
if (disabled) return;
|
|
7447
7441
|
setTempDate(value ?? /* @__PURE__ */ new Date());
|
|
@@ -7458,18 +7452,18 @@ var InputDatePicker = (props) => {
|
|
|
7458
7452
|
setIsOpen(false);
|
|
7459
7453
|
};
|
|
7460
7454
|
return /* @__PURE__ */ jsxs201("div", { className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"), children: [
|
|
7461
|
-
/* @__PURE__ */
|
|
7455
|
+
/* @__PURE__ */ jsx315("div", { className: "input-datepicker-trigger", onClick: handleOpen, children: /* @__PURE__ */ jsx315(
|
|
7462
7456
|
Input_default,
|
|
7463
7457
|
{
|
|
7464
7458
|
value: formatDate(value),
|
|
7465
7459
|
placeholder,
|
|
7466
|
-
suffix: /* @__PURE__ */
|
|
7460
|
+
suffix: /* @__PURE__ */ jsx315(CalenderIcon_default, {}),
|
|
7467
7461
|
disabled,
|
|
7468
7462
|
readOnly: true
|
|
7469
7463
|
}
|
|
7470
7464
|
) }),
|
|
7471
|
-
/* @__PURE__ */
|
|
7472
|
-
/* @__PURE__ */
|
|
7465
|
+
/* @__PURE__ */ jsx315(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsxs201("div", { className: "lib-xplat-popup-datepicker-card", children: [
|
|
7466
|
+
/* @__PURE__ */ jsx315("div", { className: "popup-datepicker-content", children: /* @__PURE__ */ jsx315(
|
|
7473
7467
|
SingleDatePicker_default,
|
|
7474
7468
|
{
|
|
7475
7469
|
value: tempDate,
|
|
@@ -7480,8 +7474,8 @@ var InputDatePicker = (props) => {
|
|
|
7480
7474
|
}
|
|
7481
7475
|
) }),
|
|
7482
7476
|
/* @__PURE__ */ jsxs201("div", { className: "popup-datepicker-footer", children: [
|
|
7483
|
-
/* @__PURE__ */
|
|
7484
|
-
/* @__PURE__ */
|
|
7477
|
+
/* @__PURE__ */ jsx315(Button_default, { type: "secondary", onClick: handleClose, children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel" }),
|
|
7478
|
+
/* @__PURE__ */ jsx315(Button_default, { type: "primary", onClick: handleApply, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
|
|
7485
7479
|
] })
|
|
7486
7480
|
] }) })
|
|
7487
7481
|
] });
|
|
@@ -7490,20 +7484,20 @@ InputDatePicker.displayName = "InputDatePicker";
|
|
|
7490
7484
|
var InputDatePicker_default = InputDatePicker;
|
|
7491
7485
|
|
|
7492
7486
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
7493
|
-
import
|
|
7487
|
+
import React16 from "react";
|
|
7494
7488
|
|
|
7495
7489
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
7496
|
-
import
|
|
7490
|
+
import React15 from "react";
|
|
7497
7491
|
|
|
7498
7492
|
// src/components/Tab/Tab.tsx
|
|
7499
|
-
import
|
|
7493
|
+
import React14 from "react";
|
|
7500
7494
|
|
|
7501
7495
|
// src/components/Tab/TabItem.tsx
|
|
7502
|
-
import
|
|
7503
|
-
import { jsx as
|
|
7504
|
-
var TabItem =
|
|
7496
|
+
import React13 from "react";
|
|
7497
|
+
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
7498
|
+
var TabItem = React13.forwardRef((props, ref) => {
|
|
7505
7499
|
const { isActive: isActive2, title, onClick } = props;
|
|
7506
|
-
return /* @__PURE__ */
|
|
7500
|
+
return /* @__PURE__ */ jsx316(
|
|
7507
7501
|
"div",
|
|
7508
7502
|
{
|
|
7509
7503
|
ref,
|
|
@@ -7517,25 +7511,25 @@ TabItem.displayName = "TabItem";
|
|
|
7517
7511
|
var TabItem_default = TabItem;
|
|
7518
7512
|
|
|
7519
7513
|
// src/components/Tab/Tab.tsx
|
|
7520
|
-
import { jsx as
|
|
7514
|
+
import { jsx as jsx317, jsxs as jsxs202 } from "react/jsx-runtime";
|
|
7521
7515
|
var Tab = (props) => {
|
|
7522
7516
|
const { activeIndex, onChange, tabs, type, size = "md" } = props;
|
|
7523
|
-
const [underlineStyle, setUnderlineStyle] =
|
|
7517
|
+
const [underlineStyle, setUnderlineStyle] = React14.useState({
|
|
7524
7518
|
left: 0,
|
|
7525
7519
|
width: 0
|
|
7526
7520
|
});
|
|
7527
|
-
const itemRefs =
|
|
7521
|
+
const itemRefs = React14.useRef([]);
|
|
7528
7522
|
const handleChangeActiveTab = (tabItem, tabIdx) => {
|
|
7529
7523
|
onChange(tabItem, tabIdx);
|
|
7530
7524
|
};
|
|
7531
|
-
|
|
7525
|
+
React14.useEffect(() => {
|
|
7532
7526
|
const el = itemRefs.current[activeIndex];
|
|
7533
7527
|
if (el) {
|
|
7534
7528
|
setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
|
|
7535
7529
|
}
|
|
7536
7530
|
}, [activeIndex, tabs.length]);
|
|
7537
7531
|
return /* @__PURE__ */ jsxs202("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
|
|
7538
|
-
tabs.map((tab, idx) => /* @__PURE__ */
|
|
7532
|
+
tabs.map((tab, idx) => /* @__PURE__ */ jsx317(
|
|
7539
7533
|
TabItem_default,
|
|
7540
7534
|
{
|
|
7541
7535
|
onClick: () => handleChangeActiveTab(tab, idx),
|
|
@@ -7547,7 +7541,7 @@ var Tab = (props) => {
|
|
|
7547
7541
|
},
|
|
7548
7542
|
`${tab.value}_${idx}`
|
|
7549
7543
|
)),
|
|
7550
|
-
type === "toggle" && /* @__PURE__ */
|
|
7544
|
+
type === "toggle" && /* @__PURE__ */ jsx317(
|
|
7551
7545
|
"div",
|
|
7552
7546
|
{
|
|
7553
7547
|
className: "tab-toggle-underline",
|
|
@@ -7563,7 +7557,7 @@ Tab.displayName = "Tab";
|
|
|
7563
7557
|
var Tab_default = Tab;
|
|
7564
7558
|
|
|
7565
7559
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
7566
|
-
import { jsx as
|
|
7560
|
+
import { jsx as jsx318, jsxs as jsxs203 } from "react/jsx-runtime";
|
|
7567
7561
|
var RangePicker = (props) => {
|
|
7568
7562
|
const {
|
|
7569
7563
|
startDate,
|
|
@@ -7573,7 +7567,7 @@ var RangePicker = (props) => {
|
|
|
7573
7567
|
maxDate,
|
|
7574
7568
|
locale = "ko"
|
|
7575
7569
|
} = props;
|
|
7576
|
-
const [activeTab, setActiveTab] =
|
|
7570
|
+
const [activeTab, setActiveTab] = React15.useState("start");
|
|
7577
7571
|
const handleStartChange = (date) => {
|
|
7578
7572
|
if (!date) return;
|
|
7579
7573
|
const newStart = date > endDate ? endDate : date;
|
|
@@ -7587,7 +7581,7 @@ var RangePicker = (props) => {
|
|
|
7587
7581
|
const startMaxDate = maxDate && endDate < maxDate ? endDate : endDate;
|
|
7588
7582
|
const endMinDate = minDate && startDate > minDate ? startDate : startDate;
|
|
7589
7583
|
return /* @__PURE__ */ jsxs203("div", { className: clsx_default("lib-xplat-datepicker", "range"), children: [
|
|
7590
|
-
/* @__PURE__ */
|
|
7584
|
+
/* @__PURE__ */ jsx318("div", { className: "datepicker-range-tabs", children: /* @__PURE__ */ jsx318(
|
|
7591
7585
|
Tab_default,
|
|
7592
7586
|
{
|
|
7593
7587
|
activeIndex: activeTab === "start" ? 0 : 1,
|
|
@@ -7601,7 +7595,7 @@ var RangePicker = (props) => {
|
|
|
7601
7595
|
}
|
|
7602
7596
|
) }),
|
|
7603
7597
|
/* @__PURE__ */ jsxs203("div", { className: "datepicker-range-panels", children: [
|
|
7604
|
-
/* @__PURE__ */
|
|
7598
|
+
/* @__PURE__ */ jsx318(
|
|
7605
7599
|
SingleDatePicker_default,
|
|
7606
7600
|
{
|
|
7607
7601
|
value: startDate,
|
|
@@ -7613,7 +7607,7 @@ var RangePicker = (props) => {
|
|
|
7613
7607
|
locale
|
|
7614
7608
|
}
|
|
7615
7609
|
),
|
|
7616
|
-
/* @__PURE__ */
|
|
7610
|
+
/* @__PURE__ */ jsx318(
|
|
7617
7611
|
SingleDatePicker_default,
|
|
7618
7612
|
{
|
|
7619
7613
|
value: endDate,
|
|
@@ -7626,7 +7620,7 @@ var RangePicker = (props) => {
|
|
|
7626
7620
|
}
|
|
7627
7621
|
)
|
|
7628
7622
|
] }),
|
|
7629
|
-
/* @__PURE__ */
|
|
7623
|
+
/* @__PURE__ */ jsx318("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? /* @__PURE__ */ jsx318(
|
|
7630
7624
|
SingleDatePicker_default,
|
|
7631
7625
|
{
|
|
7632
7626
|
value: startDate,
|
|
@@ -7637,7 +7631,7 @@ var RangePicker = (props) => {
|
|
|
7637
7631
|
rangeEnd: endDate,
|
|
7638
7632
|
locale
|
|
7639
7633
|
}
|
|
7640
|
-
) : /* @__PURE__ */
|
|
7634
|
+
) : /* @__PURE__ */ jsx318(
|
|
7641
7635
|
SingleDatePicker_default,
|
|
7642
7636
|
{
|
|
7643
7637
|
value: endDate,
|
|
@@ -7655,10 +7649,10 @@ RangePicker.displayName = "RangePicker";
|
|
|
7655
7649
|
var RangePicker_default = RangePicker;
|
|
7656
7650
|
|
|
7657
7651
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
7658
|
-
import { jsx as
|
|
7652
|
+
import { jsx as jsx319, jsxs as jsxs204 } from "react/jsx-runtime";
|
|
7659
7653
|
var PopupPicker = (props) => {
|
|
7660
7654
|
const { component, type, locale } = props;
|
|
7661
|
-
const [isOpen, setIsOpen] =
|
|
7655
|
+
const [isOpen, setIsOpen] = React16.useState(false);
|
|
7662
7656
|
const handleClick = () => setIsOpen(true);
|
|
7663
7657
|
const handleClose = () => setIsOpen(false);
|
|
7664
7658
|
const handleSingleChange = (date) => {
|
|
@@ -7667,10 +7661,10 @@ var PopupPicker = (props) => {
|
|
|
7667
7661
|
handleClose();
|
|
7668
7662
|
};
|
|
7669
7663
|
return /* @__PURE__ */ jsxs204("div", { className: "lib-xplat-popup-datepicker", children: [
|
|
7670
|
-
|
|
7671
|
-
/* @__PURE__ */
|
|
7664
|
+
React16.cloneElement(component, { onClick: handleClick }),
|
|
7665
|
+
/* @__PURE__ */ jsx319(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsxs204("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
|
|
7672
7666
|
/* @__PURE__ */ jsxs204("div", { className: "popup-datepicker-content", children: [
|
|
7673
|
-
type === "single" && /* @__PURE__ */
|
|
7667
|
+
type === "single" && /* @__PURE__ */ jsx319(
|
|
7674
7668
|
SingleDatePicker_default,
|
|
7675
7669
|
{
|
|
7676
7670
|
value: props.value,
|
|
@@ -7680,7 +7674,7 @@ var PopupPicker = (props) => {
|
|
|
7680
7674
|
locale
|
|
7681
7675
|
}
|
|
7682
7676
|
),
|
|
7683
|
-
type === "range" && /* @__PURE__ */
|
|
7677
|
+
type === "range" && /* @__PURE__ */ jsx319(
|
|
7684
7678
|
RangePicker_default,
|
|
7685
7679
|
{
|
|
7686
7680
|
startDate: props.startDate,
|
|
@@ -7693,7 +7687,7 @@ var PopupPicker = (props) => {
|
|
|
7693
7687
|
)
|
|
7694
7688
|
] }),
|
|
7695
7689
|
/* @__PURE__ */ jsxs204("div", { className: "popup-datepicker-footer", children: [
|
|
7696
|
-
/* @__PURE__ */
|
|
7690
|
+
/* @__PURE__ */ jsx319(
|
|
7697
7691
|
Button_default,
|
|
7698
7692
|
{
|
|
7699
7693
|
type: "secondary",
|
|
@@ -7701,7 +7695,7 @@ var PopupPicker = (props) => {
|
|
|
7701
7695
|
children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel"
|
|
7702
7696
|
}
|
|
7703
7697
|
),
|
|
7704
|
-
/* @__PURE__ */
|
|
7698
|
+
/* @__PURE__ */ jsx319(Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
|
|
7705
7699
|
] })
|
|
7706
7700
|
] }) })
|
|
7707
7701
|
] });
|
|
@@ -7710,10 +7704,10 @@ PopupPicker.displayName = "PopupPicker";
|
|
|
7710
7704
|
var PopupPicker_default = PopupPicker;
|
|
7711
7705
|
|
|
7712
7706
|
// src/components/Divider/Divider.tsx
|
|
7713
|
-
import { jsx as
|
|
7707
|
+
import { jsx as jsx320 } from "react/jsx-runtime";
|
|
7714
7708
|
var Divider = (props) => {
|
|
7715
7709
|
const { orientation = "horizontal" } = props;
|
|
7716
|
-
return /* @__PURE__ */
|
|
7710
|
+
return /* @__PURE__ */ jsx320(
|
|
7717
7711
|
"div",
|
|
7718
7712
|
{
|
|
7719
7713
|
className: clsx_default("lib-xplat-divider", orientation),
|
|
@@ -7726,15 +7720,15 @@ Divider.displayName = "Divider";
|
|
|
7726
7720
|
var Divider_default = Divider;
|
|
7727
7721
|
|
|
7728
7722
|
// src/components/Drawer/Drawer.tsx
|
|
7729
|
-
import
|
|
7723
|
+
import React17 from "react";
|
|
7730
7724
|
import { createPortal as createPortal2 } from "react-dom";
|
|
7731
|
-
import { jsx as
|
|
7725
|
+
import { jsx as jsx321, jsxs as jsxs205 } from "react/jsx-runtime";
|
|
7732
7726
|
var ANIMATION_DURATION_MS2 = 250;
|
|
7733
7727
|
var Drawer = (props) => {
|
|
7734
7728
|
const { isOpen, onClose, placement = "right", size = "md", title, children } = props;
|
|
7735
|
-
const [mounted, setMounted] =
|
|
7736
|
-
const [visible, setVisible] =
|
|
7737
|
-
|
|
7729
|
+
const [mounted, setMounted] = React17.useState(false);
|
|
7730
|
+
const [visible, setVisible] = React17.useState(false);
|
|
7731
|
+
React17.useEffect(() => {
|
|
7738
7732
|
if (isOpen) {
|
|
7739
7733
|
setMounted(true);
|
|
7740
7734
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -7748,7 +7742,7 @@ var Drawer = (props) => {
|
|
|
7748
7742
|
if (!mounted) return null;
|
|
7749
7743
|
const stateClass = visible ? "enter" : "exit";
|
|
7750
7744
|
return createPortal2(
|
|
7751
|
-
/* @__PURE__ */
|
|
7745
|
+
/* @__PURE__ */ jsx321(
|
|
7752
7746
|
"div",
|
|
7753
7747
|
{
|
|
7754
7748
|
className: clsx_default("lib-xplat-drawer-overlay", stateClass),
|
|
@@ -7762,10 +7756,10 @@ var Drawer = (props) => {
|
|
|
7762
7756
|
onClick: (e) => e.stopPropagation(),
|
|
7763
7757
|
children: [
|
|
7764
7758
|
title && /* @__PURE__ */ jsxs205("div", { className: "drawer-header", children: [
|
|
7765
|
-
/* @__PURE__ */
|
|
7766
|
-
/* @__PURE__ */
|
|
7759
|
+
/* @__PURE__ */ jsx321("span", { className: "drawer-title", children: title }),
|
|
7760
|
+
/* @__PURE__ */ jsx321("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
7767
7761
|
] }),
|
|
7768
|
-
/* @__PURE__ */
|
|
7762
|
+
/* @__PURE__ */ jsx321("div", { className: "drawer-body", children })
|
|
7769
7763
|
]
|
|
7770
7764
|
}
|
|
7771
7765
|
)
|
|
@@ -7778,16 +7772,25 @@ Drawer.displayName = "Drawer";
|
|
|
7778
7772
|
var Drawer_default = Drawer;
|
|
7779
7773
|
|
|
7780
7774
|
// src/components/Dropdown/Dropdown.tsx
|
|
7781
|
-
import
|
|
7775
|
+
import React20 from "react";
|
|
7776
|
+
|
|
7777
|
+
// src/tokens/hooks/Portal.tsx
|
|
7778
|
+
import ReactDOM from "react-dom";
|
|
7779
|
+
var Portal = ({ children }) => {
|
|
7780
|
+
if (typeof document === "undefined") return null;
|
|
7781
|
+
return ReactDOM.createPortal(children, document.body);
|
|
7782
|
+
};
|
|
7783
|
+
Portal.displayName = "Portal";
|
|
7784
|
+
var Portal_default = Portal;
|
|
7782
7785
|
|
|
7783
7786
|
// src/tokens/hooks/useAutoPosition.ts
|
|
7784
|
-
import
|
|
7787
|
+
import React18 from "react";
|
|
7785
7788
|
var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
7786
|
-
const [position, setPosition] =
|
|
7789
|
+
const [position, setPosition] = React18.useState({
|
|
7787
7790
|
position: {},
|
|
7788
7791
|
direction: "bottom"
|
|
7789
7792
|
});
|
|
7790
|
-
const calculatePosition =
|
|
7793
|
+
const calculatePosition = React18.useCallback(() => {
|
|
7791
7794
|
if (!triggerRef.current || !popRef.current) return;
|
|
7792
7795
|
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
7793
7796
|
const popW = popRef.current.offsetWidth;
|
|
@@ -7814,13 +7817,13 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
7814
7817
|
direction
|
|
7815
7818
|
});
|
|
7816
7819
|
}, [triggerRef, popRef]);
|
|
7817
|
-
|
|
7820
|
+
React18.useLayoutEffect(() => {
|
|
7818
7821
|
if (!enabled) return;
|
|
7819
7822
|
calculatePosition();
|
|
7820
7823
|
const raf = requestAnimationFrame(calculatePosition);
|
|
7821
7824
|
return () => cancelAnimationFrame(raf);
|
|
7822
7825
|
}, [calculatePosition, enabled]);
|
|
7823
|
-
|
|
7826
|
+
React18.useEffect(() => {
|
|
7824
7827
|
if (!enabled || !popRef.current) return;
|
|
7825
7828
|
const observer = new ResizeObserver(() => {
|
|
7826
7829
|
calculatePosition();
|
|
@@ -7828,7 +7831,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
7828
7831
|
observer.observe(popRef.current);
|
|
7829
7832
|
return () => observer.disconnect();
|
|
7830
7833
|
}, [calculatePosition, enabled, popRef]);
|
|
7831
|
-
|
|
7834
|
+
React18.useEffect(() => {
|
|
7832
7835
|
if (!enabled) return;
|
|
7833
7836
|
window.addEventListener("resize", calculatePosition);
|
|
7834
7837
|
window.addEventListener("scroll", calculatePosition, true);
|
|
@@ -7842,9 +7845,9 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
7842
7845
|
var useAutoPosition_default = useAutoPosition;
|
|
7843
7846
|
|
|
7844
7847
|
// src/tokens/hooks/useClickOutside.ts
|
|
7845
|
-
import
|
|
7848
|
+
import React19 from "react";
|
|
7846
7849
|
var useClickOutside = (refs, handler, enabled = true) => {
|
|
7847
|
-
|
|
7850
|
+
React19.useEffect(() => {
|
|
7848
7851
|
if (!enabled) return;
|
|
7849
7852
|
const refArray = Array.isArray(refs) ? refs : [refs];
|
|
7850
7853
|
const listener = (event) => {
|
|
@@ -7867,17 +7870,17 @@ var useClickOutside = (refs, handler, enabled = true) => {
|
|
|
7867
7870
|
var useClickOutside_default = useClickOutside;
|
|
7868
7871
|
|
|
7869
7872
|
// src/components/Dropdown/Dropdown.tsx
|
|
7870
|
-
import { jsx as
|
|
7873
|
+
import { jsx as jsx322, jsxs as jsxs206 } from "react/jsx-runtime";
|
|
7871
7874
|
var Dropdown = (props) => {
|
|
7872
7875
|
const { items, children } = props;
|
|
7873
|
-
const [isOpen, setIsOpen] =
|
|
7874
|
-
const [mounted, setMounted] =
|
|
7875
|
-
const [visible, setVisible] =
|
|
7876
|
-
const triggerRef =
|
|
7877
|
-
const menuRef =
|
|
7876
|
+
const [isOpen, setIsOpen] = React20.useState(false);
|
|
7877
|
+
const [mounted, setMounted] = React20.useState(false);
|
|
7878
|
+
const [visible, setVisible] = React20.useState(false);
|
|
7879
|
+
const triggerRef = React20.useRef(null);
|
|
7880
|
+
const menuRef = React20.useRef(null);
|
|
7878
7881
|
const { position, direction } = useAutoPosition_default(triggerRef, menuRef, mounted);
|
|
7879
7882
|
useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false), isOpen);
|
|
7880
|
-
|
|
7883
|
+
React20.useEffect(() => {
|
|
7881
7884
|
if (isOpen) {
|
|
7882
7885
|
setMounted(true);
|
|
7883
7886
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -7893,7 +7896,7 @@ var Dropdown = (props) => {
|
|
|
7893
7896
|
setIsOpen(false);
|
|
7894
7897
|
};
|
|
7895
7898
|
return /* @__PURE__ */ jsxs206("div", { className: "lib-xplat-dropdown", children: [
|
|
7896
|
-
/* @__PURE__ */
|
|
7899
|
+
/* @__PURE__ */ jsx322(
|
|
7897
7900
|
"div",
|
|
7898
7901
|
{
|
|
7899
7902
|
ref: triggerRef,
|
|
@@ -7902,14 +7905,14 @@ var Dropdown = (props) => {
|
|
|
7902
7905
|
children
|
|
7903
7906
|
}
|
|
7904
7907
|
),
|
|
7905
|
-
mounted && /* @__PURE__ */
|
|
7908
|
+
mounted && /* @__PURE__ */ jsx322(Portal_default, { children: /* @__PURE__ */ jsx322(
|
|
7906
7909
|
"div",
|
|
7907
7910
|
{
|
|
7908
7911
|
ref: menuRef,
|
|
7909
7912
|
className: clsx_default("lib-xplat-dropdown-menu", direction, { visible }),
|
|
7910
7913
|
style: { top: position.top, left: position.left },
|
|
7911
7914
|
role: "menu",
|
|
7912
|
-
children: items.map((item) => /* @__PURE__ */
|
|
7915
|
+
children: items.map((item) => /* @__PURE__ */ jsx322(
|
|
7913
7916
|
"button",
|
|
7914
7917
|
{
|
|
7915
7918
|
className: clsx_default("dropdown-item", {
|
|
@@ -7931,8 +7934,8 @@ Dropdown.displayName = "Dropdown";
|
|
|
7931
7934
|
var Dropdown_default = Dropdown;
|
|
7932
7935
|
|
|
7933
7936
|
// src/components/Editor/Editor.tsx
|
|
7934
|
-
import
|
|
7935
|
-
import { jsx as
|
|
7937
|
+
import React21 from "react";
|
|
7938
|
+
import { jsx as jsx323, jsxs as jsxs207 } from "react/jsx-runtime";
|
|
7936
7939
|
var DEFAULT_TOOLBAR = [
|
|
7937
7940
|
"bold",
|
|
7938
7941
|
"italic",
|
|
@@ -8039,21 +8042,21 @@ var Editor = (props) => {
|
|
|
8039
8042
|
onImageUpload,
|
|
8040
8043
|
minHeight = 200
|
|
8041
8044
|
} = props;
|
|
8042
|
-
const editorRef =
|
|
8043
|
-
const lastRangeRef =
|
|
8044
|
-
const composingRef =
|
|
8045
|
-
const [isFocused, setIsFocused] =
|
|
8046
|
-
const [isEmpty, setIsEmpty] =
|
|
8047
|
-
const [activeFormats, setActiveFormats] =
|
|
8048
|
-
const [slashOpen, setSlashOpen] =
|
|
8049
|
-
const [slashFilter, setSlashFilter] =
|
|
8050
|
-
const [slashIdx, setSlashIdx] =
|
|
8051
|
-
const [slashPos, setSlashPos] =
|
|
8052
|
-
const slashStartRangeRef =
|
|
8053
|
-
const [linkOpen, setLinkOpen] =
|
|
8054
|
-
const [linkValue, setLinkValue] =
|
|
8055
|
-
const [linkPos, setLinkPos] =
|
|
8056
|
-
|
|
8045
|
+
const editorRef = React21.useRef(null);
|
|
8046
|
+
const lastRangeRef = React21.useRef(null);
|
|
8047
|
+
const composingRef = React21.useRef(false);
|
|
8048
|
+
const [isFocused, setIsFocused] = React21.useState(false);
|
|
8049
|
+
const [isEmpty, setIsEmpty] = React21.useState(!value);
|
|
8050
|
+
const [activeFormats, setActiveFormats] = React21.useState(/* @__PURE__ */ new Set());
|
|
8051
|
+
const [slashOpen, setSlashOpen] = React21.useState(false);
|
|
8052
|
+
const [slashFilter, setSlashFilter] = React21.useState("");
|
|
8053
|
+
const [slashIdx, setSlashIdx] = React21.useState(0);
|
|
8054
|
+
const [slashPos, setSlashPos] = React21.useState({ top: 0, left: 0 });
|
|
8055
|
+
const slashStartRangeRef = React21.useRef(null);
|
|
8056
|
+
const [linkOpen, setLinkOpen] = React21.useState(false);
|
|
8057
|
+
const [linkValue, setLinkValue] = React21.useState("");
|
|
8058
|
+
const [linkPos, setLinkPos] = React21.useState({ top: 0, left: 0 });
|
|
8059
|
+
React21.useEffect(() => {
|
|
8057
8060
|
if (!editorRef.current) return;
|
|
8058
8061
|
if (editorRef.current.innerHTML !== value) {
|
|
8059
8062
|
editorRef.current.innerHTML = sanitizeHtml(value || "");
|
|
@@ -8167,7 +8170,7 @@ var Editor = (props) => {
|
|
|
8167
8170
|
setSlashIdx(0);
|
|
8168
8171
|
slashStartRangeRef.current = null;
|
|
8169
8172
|
};
|
|
8170
|
-
const filteredSlashItems =
|
|
8173
|
+
const filteredSlashItems = React21.useMemo(() => {
|
|
8171
8174
|
if (!slashFilter) return SLASH_ITEMS;
|
|
8172
8175
|
const f = slashFilter.toLowerCase();
|
|
8173
8176
|
return SLASH_ITEMS.filter((it) => it.label.toLowerCase().includes(f) || it.key.includes(f));
|
|
@@ -8453,7 +8456,7 @@ var Editor = (props) => {
|
|
|
8453
8456
|
}
|
|
8454
8457
|
};
|
|
8455
8458
|
return /* @__PURE__ */ jsxs207("div", { className: clsx_default("lib-xplat-editor", isFocused && "focused", readOnly && "readonly"), children: [
|
|
8456
|
-
!readOnly && /* @__PURE__ */
|
|
8459
|
+
!readOnly && /* @__PURE__ */ jsx323(
|
|
8457
8460
|
EditorToolbar,
|
|
8458
8461
|
{
|
|
8459
8462
|
items: toolbar,
|
|
@@ -8462,8 +8465,8 @@ var Editor = (props) => {
|
|
|
8462
8465
|
}
|
|
8463
8466
|
),
|
|
8464
8467
|
/* @__PURE__ */ jsxs207("div", { className: "lib-xplat-editor__content", style: { minHeight }, children: [
|
|
8465
|
-
isEmpty && !isFocused && /* @__PURE__ */
|
|
8466
|
-
/* @__PURE__ */
|
|
8468
|
+
isEmpty && !isFocused && /* @__PURE__ */ jsx323("div", { className: "lib-xplat-editor__placeholder", children: placeholder }),
|
|
8469
|
+
/* @__PURE__ */ jsx323(
|
|
8467
8470
|
"div",
|
|
8468
8471
|
{
|
|
8469
8472
|
ref: editorRef,
|
|
@@ -8482,7 +8485,7 @@ var Editor = (props) => {
|
|
|
8482
8485
|
spellCheck: true
|
|
8483
8486
|
}
|
|
8484
8487
|
),
|
|
8485
|
-
slashOpen && filteredSlashItems.length > 0 && /* @__PURE__ */
|
|
8488
|
+
slashOpen && filteredSlashItems.length > 0 && /* @__PURE__ */ jsx323(
|
|
8486
8489
|
SlashMenu,
|
|
8487
8490
|
{
|
|
8488
8491
|
position: slashPos,
|
|
@@ -8492,7 +8495,7 @@ var Editor = (props) => {
|
|
|
8492
8495
|
onClose: closeSlashMenu
|
|
8493
8496
|
}
|
|
8494
8497
|
),
|
|
8495
|
-
linkOpen && /* @__PURE__ */
|
|
8498
|
+
linkOpen && /* @__PURE__ */ jsx323(
|
|
8496
8499
|
LinkPopover,
|
|
8497
8500
|
{
|
|
8498
8501
|
position: linkPos,
|
|
@@ -8544,7 +8547,7 @@ var isActive = (item, active) => {
|
|
|
8544
8547
|
return active.has(item);
|
|
8545
8548
|
};
|
|
8546
8549
|
var EditorToolbar = ({ items, active, onAction }) => {
|
|
8547
|
-
return /* @__PURE__ */
|
|
8550
|
+
return /* @__PURE__ */ jsx323("div", { className: "lib-xplat-editor__toolbar", children: items.map((item) => /* @__PURE__ */ jsx323(
|
|
8548
8551
|
"button",
|
|
8549
8552
|
{
|
|
8550
8553
|
type: "button",
|
|
@@ -8560,7 +8563,7 @@ var EditorToolbar = ({ items, active, onAction }) => {
|
|
|
8560
8563
|
)) });
|
|
8561
8564
|
};
|
|
8562
8565
|
var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
8563
|
-
|
|
8566
|
+
React21.useEffect(() => {
|
|
8564
8567
|
const handleClickOutside = (e) => {
|
|
8565
8568
|
const target = e.target;
|
|
8566
8569
|
const menu = document.querySelector(".lib-xplat-editor__slash-menu");
|
|
@@ -8569,7 +8572,7 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
8569
8572
|
window.addEventListener("mousedown", handleClickOutside);
|
|
8570
8573
|
return () => window.removeEventListener("mousedown", handleClickOutside);
|
|
8571
8574
|
}, [onClose]);
|
|
8572
|
-
return /* @__PURE__ */
|
|
8575
|
+
return /* @__PURE__ */ jsx323(
|
|
8573
8576
|
"div",
|
|
8574
8577
|
{
|
|
8575
8578
|
className: "lib-xplat-editor__slash-menu",
|
|
@@ -8584,8 +8587,8 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
8584
8587
|
onSelect(item);
|
|
8585
8588
|
},
|
|
8586
8589
|
children: [
|
|
8587
|
-
/* @__PURE__ */
|
|
8588
|
-
item.hint && /* @__PURE__ */
|
|
8590
|
+
/* @__PURE__ */ jsx323("span", { className: "label", children: item.label }),
|
|
8591
|
+
item.hint && /* @__PURE__ */ jsx323("span", { className: "hint", children: item.hint })
|
|
8589
8592
|
]
|
|
8590
8593
|
},
|
|
8591
8594
|
item.key
|
|
@@ -8594,8 +8597,8 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
8594
8597
|
);
|
|
8595
8598
|
};
|
|
8596
8599
|
var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
8597
|
-
const inputRef =
|
|
8598
|
-
|
|
8600
|
+
const inputRef = React21.useRef(null);
|
|
8601
|
+
React21.useEffect(() => {
|
|
8599
8602
|
inputRef.current?.focus();
|
|
8600
8603
|
}, []);
|
|
8601
8604
|
return /* @__PURE__ */ jsxs207(
|
|
@@ -8604,7 +8607,7 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
8604
8607
|
className: "lib-xplat-editor__link-popover",
|
|
8605
8608
|
style: { top: position.top, left: position.left },
|
|
8606
8609
|
children: [
|
|
8607
|
-
/* @__PURE__ */
|
|
8610
|
+
/* @__PURE__ */ jsx323(
|
|
8608
8611
|
"input",
|
|
8609
8612
|
{
|
|
8610
8613
|
ref: inputRef,
|
|
@@ -8624,11 +8627,11 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
8624
8627
|
}
|
|
8625
8628
|
}
|
|
8626
8629
|
),
|
|
8627
|
-
/* @__PURE__ */
|
|
8630
|
+
/* @__PURE__ */ jsx323("button", { type: "button", onMouseDown: (e) => {
|
|
8628
8631
|
e.preventDefault();
|
|
8629
8632
|
onConfirm();
|
|
8630
8633
|
}, children: "\uC801\uC6A9" }),
|
|
8631
|
-
/* @__PURE__ */
|
|
8634
|
+
/* @__PURE__ */ jsx323("button", { type: "button", onMouseDown: (e) => {
|
|
8632
8635
|
e.preventDefault();
|
|
8633
8636
|
onClose();
|
|
8634
8637
|
}, children: "\uCDE8\uC18C" })
|
|
@@ -8638,23 +8641,23 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
8638
8641
|
};
|
|
8639
8642
|
|
|
8640
8643
|
// src/components/EmptyState/EmptyState.tsx
|
|
8641
|
-
import { jsx as
|
|
8644
|
+
import { jsx as jsx324, jsxs as jsxs208 } from "react/jsx-runtime";
|
|
8642
8645
|
var EmptyState = (props) => {
|
|
8643
8646
|
const { icon, title = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", description, action } = props;
|
|
8644
8647
|
return /* @__PURE__ */ jsxs208("div", { className: "lib-xplat-empty-state", children: [
|
|
8645
|
-
icon && /* @__PURE__ */
|
|
8646
|
-
!icon && /* @__PURE__ */
|
|
8647
|
-
/* @__PURE__ */
|
|
8648
|
-
description && /* @__PURE__ */
|
|
8649
|
-
action && /* @__PURE__ */
|
|
8648
|
+
icon && /* @__PURE__ */ jsx324("div", { className: "empty-icon", children: icon }),
|
|
8649
|
+
!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" }) }) }),
|
|
8650
|
+
/* @__PURE__ */ jsx324("p", { className: "empty-title", children: title }),
|
|
8651
|
+
description && /* @__PURE__ */ jsx324("p", { className: "empty-description", children: description }),
|
|
8652
|
+
action && /* @__PURE__ */ jsx324("div", { className: "empty-action", children: action })
|
|
8650
8653
|
] });
|
|
8651
8654
|
};
|
|
8652
8655
|
EmptyState.displayName = "EmptyState";
|
|
8653
8656
|
var EmptyState_default = EmptyState;
|
|
8654
8657
|
|
|
8655
8658
|
// src/components/FileUpload/FileUpload.tsx
|
|
8656
|
-
import
|
|
8657
|
-
import { jsx as
|
|
8659
|
+
import React22 from "react";
|
|
8660
|
+
import { jsx as jsx325, jsxs as jsxs209 } from "react/jsx-runtime";
|
|
8658
8661
|
var FileUpload = (props) => {
|
|
8659
8662
|
const {
|
|
8660
8663
|
accept,
|
|
@@ -8664,8 +8667,8 @@ var FileUpload = (props) => {
|
|
|
8664
8667
|
label = "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8\uD558\uAC70\uB098 \uD074\uB9AD\uD558\uC5EC \uC5C5\uB85C\uB4DC",
|
|
8665
8668
|
description
|
|
8666
8669
|
} = props;
|
|
8667
|
-
const [isDragOver, setIsDragOver] =
|
|
8668
|
-
const inputRef =
|
|
8670
|
+
const [isDragOver, setIsDragOver] = React22.useState(false);
|
|
8671
|
+
const inputRef = React22.useRef(null);
|
|
8669
8672
|
const handleFiles = (fileList) => {
|
|
8670
8673
|
let files = Array.from(fileList);
|
|
8671
8674
|
if (maxSize) {
|
|
@@ -8704,7 +8707,7 @@ var FileUpload = (props) => {
|
|
|
8704
8707
|
onDragLeave: handleDragLeave,
|
|
8705
8708
|
onClick: () => inputRef.current?.click(),
|
|
8706
8709
|
children: [
|
|
8707
|
-
/* @__PURE__ */
|
|
8710
|
+
/* @__PURE__ */ jsx325(
|
|
8708
8711
|
"input",
|
|
8709
8712
|
{
|
|
8710
8713
|
ref: inputRef,
|
|
@@ -8714,9 +8717,9 @@ var FileUpload = (props) => {
|
|
|
8714
8717
|
onChange: handleChange
|
|
8715
8718
|
}
|
|
8716
8719
|
),
|
|
8717
|
-
/* @__PURE__ */
|
|
8718
|
-
/* @__PURE__ */
|
|
8719
|
-
description && /* @__PURE__ */
|
|
8720
|
+
/* @__PURE__ */ jsx325("div", { className: "upload-icon", children: /* @__PURE__ */ jsx325(UploadIcon_default, {}) }),
|
|
8721
|
+
/* @__PURE__ */ jsx325("p", { className: "upload-label", children: label }),
|
|
8722
|
+
description && /* @__PURE__ */ jsx325("p", { className: "upload-description", children: description })
|
|
8720
8723
|
]
|
|
8721
8724
|
}
|
|
8722
8725
|
);
|
|
@@ -8725,10 +8728,10 @@ FileUpload.displayName = "FileUpload";
|
|
|
8725
8728
|
var FileUpload_default = FileUpload;
|
|
8726
8729
|
|
|
8727
8730
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
8728
|
-
import
|
|
8731
|
+
import React24 from "react";
|
|
8729
8732
|
|
|
8730
8733
|
// src/components/HtmlTypeWriter/utils.ts
|
|
8731
|
-
import
|
|
8734
|
+
import React23 from "react";
|
|
8732
8735
|
var voidTags = /* @__PURE__ */ new Set([
|
|
8733
8736
|
"br",
|
|
8734
8737
|
"img",
|
|
@@ -8796,41 +8799,41 @@ var convertNodeToReactWithRange = (node, typedLen, rangeMap) => {
|
|
|
8796
8799
|
props[attr.name] = attr.value;
|
|
8797
8800
|
});
|
|
8798
8801
|
if (voidTags.has(tag)) {
|
|
8799
|
-
return
|
|
8802
|
+
return React23.createElement(tag, props);
|
|
8800
8803
|
}
|
|
8801
8804
|
const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
|
|
8802
|
-
return
|
|
8805
|
+
return React23.createElement(tag, props, ...children);
|
|
8803
8806
|
};
|
|
8804
8807
|
var htmlToReactProgressive = (root, typedLen, rangeMap) => {
|
|
8805
8808
|
const nodes = Array.from(root.childNodes).map((child, idx) => {
|
|
8806
8809
|
const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
|
|
8807
|
-
return node == null ? null :
|
|
8810
|
+
return node == null ? null : React23.createElement(React23.Fragment, { key: idx }, node);
|
|
8808
8811
|
}).filter(Boolean);
|
|
8809
8812
|
return nodes.length === 0 ? null : nodes;
|
|
8810
8813
|
};
|
|
8811
8814
|
|
|
8812
8815
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
8813
|
-
import { jsx as
|
|
8816
|
+
import { jsx as jsx326 } from "react/jsx-runtime";
|
|
8814
8817
|
var HtmlTypeWriter = ({
|
|
8815
8818
|
html,
|
|
8816
8819
|
duration = 20,
|
|
8817
8820
|
onDone,
|
|
8818
8821
|
onChange
|
|
8819
8822
|
}) => {
|
|
8820
|
-
const [typedLen, setTypedLen] =
|
|
8821
|
-
const doneCalledRef =
|
|
8822
|
-
const { doc, rangeMap, totalLength } =
|
|
8823
|
+
const [typedLen, setTypedLen] = React24.useState(0);
|
|
8824
|
+
const doneCalledRef = React24.useRef(false);
|
|
8825
|
+
const { doc, rangeMap, totalLength } = React24.useMemo(() => {
|
|
8823
8826
|
if (typeof window === "undefined") return { doc: null, rangeMap: /* @__PURE__ */ new Map(), totalLength: 0 };
|
|
8824
8827
|
const decoded = decodeHtmlEntities(html);
|
|
8825
8828
|
const doc2 = new DOMParser().parseFromString(decoded, "text/html");
|
|
8826
8829
|
const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
|
|
8827
8830
|
return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
|
|
8828
8831
|
}, [html]);
|
|
8829
|
-
|
|
8832
|
+
React24.useEffect(() => {
|
|
8830
8833
|
setTypedLen(0);
|
|
8831
8834
|
doneCalledRef.current = false;
|
|
8832
8835
|
}, [html]);
|
|
8833
|
-
|
|
8836
|
+
React24.useEffect(() => {
|
|
8834
8837
|
if (!totalLength) return;
|
|
8835
8838
|
if (typedLen >= totalLength) return;
|
|
8836
8839
|
const timer = window.setInterval(() => {
|
|
@@ -8838,33 +8841,33 @@ var HtmlTypeWriter = ({
|
|
|
8838
8841
|
}, duration);
|
|
8839
8842
|
return () => window.clearInterval(timer);
|
|
8840
8843
|
}, [typedLen, totalLength, duration]);
|
|
8841
|
-
|
|
8844
|
+
React24.useEffect(() => {
|
|
8842
8845
|
if (typedLen > 0 && typedLen < totalLength) {
|
|
8843
8846
|
onChange?.();
|
|
8844
8847
|
}
|
|
8845
8848
|
}, [typedLen, totalLength, onChange]);
|
|
8846
|
-
|
|
8849
|
+
React24.useEffect(() => {
|
|
8847
8850
|
if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
|
|
8848
8851
|
doneCalledRef.current = true;
|
|
8849
8852
|
onDone?.();
|
|
8850
8853
|
}
|
|
8851
8854
|
}, [typedLen, totalLength, onDone]);
|
|
8852
|
-
const parsed =
|
|
8855
|
+
const parsed = React24.useMemo(
|
|
8853
8856
|
() => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
|
|
8854
8857
|
[doc, typedLen, rangeMap]
|
|
8855
8858
|
);
|
|
8856
|
-
return /* @__PURE__ */
|
|
8859
|
+
return /* @__PURE__ */ jsx326("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
|
|
8857
8860
|
};
|
|
8858
8861
|
HtmlTypeWriter.displayName = "HtmlTypeWriter";
|
|
8859
8862
|
var HtmlTypeWriter_default = HtmlTypeWriter;
|
|
8860
8863
|
|
|
8861
8864
|
// src/components/ImageSelector/ImageSelector.tsx
|
|
8862
|
-
import
|
|
8863
|
-
import { jsx as
|
|
8865
|
+
import React25 from "react";
|
|
8866
|
+
import { jsx as jsx327, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
8864
8867
|
var ImageSelector = (props) => {
|
|
8865
8868
|
const { value, label, onChange } = props;
|
|
8866
|
-
const [previewUrl, setPreviewUrl] =
|
|
8867
|
-
|
|
8869
|
+
const [previewUrl, setPreviewUrl] = React25.useState();
|
|
8870
|
+
React25.useEffect(() => {
|
|
8868
8871
|
if (!value) {
|
|
8869
8872
|
setPreviewUrl(void 0);
|
|
8870
8873
|
return;
|
|
@@ -8873,7 +8876,7 @@ var ImageSelector = (props) => {
|
|
|
8873
8876
|
setPreviewUrl(url);
|
|
8874
8877
|
return () => URL.revokeObjectURL(url);
|
|
8875
8878
|
}, [value]);
|
|
8876
|
-
const inputRef =
|
|
8879
|
+
const inputRef = React25.useRef(null);
|
|
8877
8880
|
const handleFileChange = (e) => {
|
|
8878
8881
|
const selectedFile = e.target.files?.[0];
|
|
8879
8882
|
if (selectedFile) {
|
|
@@ -8887,7 +8890,7 @@ var ImageSelector = (props) => {
|
|
|
8887
8890
|
inputRef.current?.click();
|
|
8888
8891
|
};
|
|
8889
8892
|
return /* @__PURE__ */ jsxs210("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
|
|
8890
|
-
/* @__PURE__ */
|
|
8893
|
+
/* @__PURE__ */ jsx327(
|
|
8891
8894
|
"input",
|
|
8892
8895
|
{
|
|
8893
8896
|
type: "file",
|
|
@@ -8898,20 +8901,58 @@ var ImageSelector = (props) => {
|
|
|
8898
8901
|
}
|
|
8899
8902
|
),
|
|
8900
8903
|
value && /* @__PURE__ */ jsxs210("div", { className: "action-bar", children: [
|
|
8901
|
-
/* @__PURE__ */
|
|
8902
|
-
/* @__PURE__ */
|
|
8904
|
+
/* @__PURE__ */ jsx327("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ jsx327(UploadIcon_default, {}) }),
|
|
8905
|
+
/* @__PURE__ */ jsx327("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ jsx327(DeleteIcon_default, {}) })
|
|
8903
8906
|
] }),
|
|
8904
|
-
/* @__PURE__ */
|
|
8905
|
-
/* @__PURE__ */
|
|
8906
|
-
/* @__PURE__ */
|
|
8907
|
+
/* @__PURE__ */ jsx327("div", { className: "content", children: previewUrl ? /* @__PURE__ */ jsx327("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ jsxs210("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
|
|
8908
|
+
/* @__PURE__ */ jsx327("div", { className: "icon-wrapper", children: /* @__PURE__ */ jsx327(ImageIcon_default, {}) }),
|
|
8909
|
+
/* @__PURE__ */ jsx327("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
|
|
8907
8910
|
] }) })
|
|
8908
8911
|
] });
|
|
8909
8912
|
};
|
|
8910
8913
|
ImageSelector.displayName = "ImageSelector";
|
|
8911
8914
|
var ImageSelector_default = ImageSelector;
|
|
8912
8915
|
|
|
8916
|
+
// src/components/Link/Link.tsx
|
|
8917
|
+
import { jsx as jsx328 } from "react/jsx-runtime";
|
|
8918
|
+
var Link = (props) => {
|
|
8919
|
+
const { children, href, underline = "always", target, rel, ...rest } = props;
|
|
8920
|
+
return /* @__PURE__ */ jsx328(
|
|
8921
|
+
"a",
|
|
8922
|
+
{
|
|
8923
|
+
className: clsx_default("lib-xplat-link", `underline-${underline}`),
|
|
8924
|
+
href,
|
|
8925
|
+
target,
|
|
8926
|
+
rel: target === "_blank" ? rel ?? "noopener noreferrer" : rel,
|
|
8927
|
+
...rest,
|
|
8928
|
+
children
|
|
8929
|
+
}
|
|
8930
|
+
);
|
|
8931
|
+
};
|
|
8932
|
+
Link.displayName = "Link";
|
|
8933
|
+
var Link_default = Link;
|
|
8934
|
+
|
|
8935
|
+
// src/components/LinkButton/LinkButton.tsx
|
|
8936
|
+
import { jsx as jsx329 } from "react/jsx-runtime";
|
|
8937
|
+
var LinkButton = (props) => {
|
|
8938
|
+
const { children, href, type = "primary", size = "md", target, rel, ...rest } = props;
|
|
8939
|
+
return /* @__PURE__ */ jsx329(
|
|
8940
|
+
"a",
|
|
8941
|
+
{
|
|
8942
|
+
className: clsx_default("lib-xplat-button", type, size),
|
|
8943
|
+
href,
|
|
8944
|
+
target,
|
|
8945
|
+
rel: target === "_blank" ? rel ?? "noopener noreferrer" : rel,
|
|
8946
|
+
...rest,
|
|
8947
|
+
children
|
|
8948
|
+
}
|
|
8949
|
+
);
|
|
8950
|
+
};
|
|
8951
|
+
LinkButton.displayName = "LinkButton";
|
|
8952
|
+
var LinkButton_default = LinkButton;
|
|
8953
|
+
|
|
8913
8954
|
// src/components/NotificationBadge/NotificationBadge.tsx
|
|
8914
|
-
import { jsx as
|
|
8955
|
+
import { jsx as jsx330, jsxs as jsxs211 } from "react/jsx-runtime";
|
|
8915
8956
|
var NotificationBadge = (props) => {
|
|
8916
8957
|
const {
|
|
8917
8958
|
children,
|
|
@@ -8925,14 +8966,14 @@ var NotificationBadge = (props) => {
|
|
|
8925
8966
|
const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
|
|
8926
8967
|
return /* @__PURE__ */ jsxs211("div", { className: clsx_default("lib-xplat-notification-badge", size), children: [
|
|
8927
8968
|
children,
|
|
8928
|
-
showBadge && /* @__PURE__ */
|
|
8969
|
+
showBadge && /* @__PURE__ */ jsx330("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
|
|
8929
8970
|
] });
|
|
8930
8971
|
};
|
|
8931
8972
|
NotificationBadge.displayName = "NotificationBadge";
|
|
8932
8973
|
var NotificationBadge_default = NotificationBadge;
|
|
8933
8974
|
|
|
8934
8975
|
// src/components/Pagination/Pagination.tsx
|
|
8935
|
-
import { jsx as
|
|
8976
|
+
import { jsx as jsx331, jsxs as jsxs212 } from "react/jsx-runtime";
|
|
8936
8977
|
var getPageRange = (current, totalPages, siblingCount) => {
|
|
8937
8978
|
const totalNumbers = siblingCount * 2 + 5;
|
|
8938
8979
|
if (totalPages <= totalNumbers) {
|
|
@@ -8976,18 +9017,18 @@ var Pagination = (props) => {
|
|
|
8976
9017
|
}
|
|
8977
9018
|
};
|
|
8978
9019
|
return /* @__PURE__ */ jsxs212("nav", { className: clsx_default("lib-xplat-pagination", size, type), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
|
|
8979
|
-
/* @__PURE__ */
|
|
9020
|
+
/* @__PURE__ */ jsx331(
|
|
8980
9021
|
"button",
|
|
8981
9022
|
{
|
|
8982
9023
|
className: "page-btn prev",
|
|
8983
9024
|
disabled: current <= 1,
|
|
8984
9025
|
onClick: () => handleClick(current - 1),
|
|
8985
9026
|
"aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
|
|
8986
|
-
children: /* @__PURE__ */
|
|
9027
|
+
children: /* @__PURE__ */ jsx331(ChevronLeftIcon_default, {})
|
|
8987
9028
|
}
|
|
8988
9029
|
),
|
|
8989
9030
|
pages.map(
|
|
8990
|
-
(page, i) => page === "..." ? /* @__PURE__ */
|
|
9031
|
+
(page, i) => page === "..." ? /* @__PURE__ */ jsx331("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ jsx331(
|
|
8991
9032
|
"button",
|
|
8992
9033
|
{
|
|
8993
9034
|
className: clsx_default("page-btn", { active: page === current }),
|
|
@@ -8998,14 +9039,14 @@ var Pagination = (props) => {
|
|
|
8998
9039
|
page
|
|
8999
9040
|
)
|
|
9000
9041
|
),
|
|
9001
|
-
/* @__PURE__ */
|
|
9042
|
+
/* @__PURE__ */ jsx331(
|
|
9002
9043
|
"button",
|
|
9003
9044
|
{
|
|
9004
9045
|
className: "page-btn next",
|
|
9005
9046
|
disabled: current >= totalPages,
|
|
9006
9047
|
onClick: () => handleClick(current + 1),
|
|
9007
9048
|
"aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
|
|
9008
|
-
children: /* @__PURE__ */
|
|
9049
|
+
children: /* @__PURE__ */ jsx331(ChevronRightIcon_default, {})
|
|
9009
9050
|
}
|
|
9010
9051
|
)
|
|
9011
9052
|
] });
|
|
@@ -9014,17 +9055,17 @@ Pagination.displayName = "Pagination";
|
|
|
9014
9055
|
var Pagination_default = Pagination;
|
|
9015
9056
|
|
|
9016
9057
|
// src/components/PopOver/PopOver.tsx
|
|
9017
|
-
import
|
|
9018
|
-
import { jsx as
|
|
9058
|
+
import React26 from "react";
|
|
9059
|
+
import { jsx as jsx332, jsxs as jsxs213 } from "react/jsx-runtime";
|
|
9019
9060
|
var PopOver = (props) => {
|
|
9020
9061
|
const { children, isOpen, onClose, PopOverEl } = props;
|
|
9021
|
-
const popRef =
|
|
9022
|
-
const triggerRef =
|
|
9023
|
-
const [localOpen, setLocalOpen] =
|
|
9024
|
-
const [eventTrigger, setEventTrigger] =
|
|
9062
|
+
const popRef = React26.useRef(null);
|
|
9063
|
+
const triggerRef = React26.useRef(null);
|
|
9064
|
+
const [localOpen, setLocalOpen] = React26.useState(false);
|
|
9065
|
+
const [eventTrigger, setEventTrigger] = React26.useState(false);
|
|
9025
9066
|
useClickOutside_default([popRef, triggerRef], onClose, isOpen);
|
|
9026
9067
|
const position = useAutoPosition_default(triggerRef, popRef, localOpen);
|
|
9027
|
-
|
|
9068
|
+
React26.useEffect(() => {
|
|
9028
9069
|
if (isOpen) {
|
|
9029
9070
|
setLocalOpen(isOpen);
|
|
9030
9071
|
setTimeout(() => {
|
|
@@ -9047,7 +9088,7 @@ var PopOver = (props) => {
|
|
|
9047
9088
|
},
|
|
9048
9089
|
children: [
|
|
9049
9090
|
children,
|
|
9050
|
-
localOpen && /* @__PURE__ */
|
|
9091
|
+
localOpen && /* @__PURE__ */ jsx332(Portal_default, { children: /* @__PURE__ */ jsx332(
|
|
9051
9092
|
"div",
|
|
9052
9093
|
{
|
|
9053
9094
|
className: clsx_default(
|
|
@@ -9070,7 +9111,7 @@ PopOver.displayName = "PopOver";
|
|
|
9070
9111
|
var PopOver_default = PopOver;
|
|
9071
9112
|
|
|
9072
9113
|
// src/components/Progress/Progress.tsx
|
|
9073
|
-
import { jsx as
|
|
9114
|
+
import { jsx as jsx333, jsxs as jsxs214 } from "react/jsx-runtime";
|
|
9074
9115
|
var Progress = (props) => {
|
|
9075
9116
|
const {
|
|
9076
9117
|
value,
|
|
@@ -9081,7 +9122,7 @@ var Progress = (props) => {
|
|
|
9081
9122
|
} = props;
|
|
9082
9123
|
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
9083
9124
|
return /* @__PURE__ */ jsxs214("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
|
|
9084
|
-
/* @__PURE__ */
|
|
9125
|
+
/* @__PURE__ */ jsx333(
|
|
9085
9126
|
"div",
|
|
9086
9127
|
{
|
|
9087
9128
|
className: "track",
|
|
@@ -9089,7 +9130,7 @@ var Progress = (props) => {
|
|
|
9089
9130
|
"aria-valuenow": value,
|
|
9090
9131
|
"aria-valuemin": 0,
|
|
9091
9132
|
"aria-valuemax": max,
|
|
9092
|
-
children: /* @__PURE__ */
|
|
9133
|
+
children: /* @__PURE__ */ jsx333(
|
|
9093
9134
|
"div",
|
|
9094
9135
|
{
|
|
9095
9136
|
className: "bar",
|
|
@@ -9108,17 +9149,17 @@ Progress.displayName = "Progress";
|
|
|
9108
9149
|
var Progress_default = Progress;
|
|
9109
9150
|
|
|
9110
9151
|
// src/components/Radio/RadioGroupContext.tsx
|
|
9111
|
-
import
|
|
9112
|
-
var RadioGroupContext =
|
|
9152
|
+
import React27 from "react";
|
|
9153
|
+
var RadioGroupContext = React27.createContext(
|
|
9113
9154
|
null
|
|
9114
9155
|
);
|
|
9115
9156
|
var useRadioGroupContext = () => {
|
|
9116
|
-
return
|
|
9157
|
+
return React27.useContext(RadioGroupContext);
|
|
9117
9158
|
};
|
|
9118
9159
|
var RadioGroupContext_default = RadioGroupContext;
|
|
9119
9160
|
|
|
9120
9161
|
// src/components/Radio/Radio.tsx
|
|
9121
|
-
import { jsx as
|
|
9162
|
+
import { jsx as jsx334, jsxs as jsxs215 } from "react/jsx-runtime";
|
|
9122
9163
|
var Radio = (props) => {
|
|
9123
9164
|
const {
|
|
9124
9165
|
label,
|
|
@@ -9148,18 +9189,18 @@ var Radio = (props) => {
|
|
|
9148
9189
|
className
|
|
9149
9190
|
),
|
|
9150
9191
|
children: [
|
|
9151
|
-
/* @__PURE__ */
|
|
9152
|
-
/* @__PURE__ */
|
|
9192
|
+
/* @__PURE__ */ jsx334("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
|
|
9193
|
+
/* @__PURE__ */ jsx334(
|
|
9153
9194
|
"div",
|
|
9154
9195
|
{
|
|
9155
9196
|
className: clsx_default(
|
|
9156
9197
|
"circle",
|
|
9157
9198
|
localChecked ? "checked" : void 0
|
|
9158
9199
|
),
|
|
9159
|
-
children: localChecked && /* @__PURE__ */
|
|
9200
|
+
children: localChecked && /* @__PURE__ */ jsx334("div", { className: "inner-circle" })
|
|
9160
9201
|
}
|
|
9161
9202
|
),
|
|
9162
|
-
label && /* @__PURE__ */
|
|
9203
|
+
label && /* @__PURE__ */ jsx334("span", { children: label })
|
|
9163
9204
|
]
|
|
9164
9205
|
}
|
|
9165
9206
|
);
|
|
@@ -9168,28 +9209,28 @@ Radio.displayName = "Radio";
|
|
|
9168
9209
|
var Radio_default = Radio;
|
|
9169
9210
|
|
|
9170
9211
|
// src/components/Radio/RadioGroup.tsx
|
|
9171
|
-
import { Fragment as Fragment4, jsx as
|
|
9212
|
+
import { Fragment as Fragment4, jsx as jsx335 } from "react/jsx-runtime";
|
|
9172
9213
|
var RadioGroup = (props) => {
|
|
9173
9214
|
const { children, ...rest } = props;
|
|
9174
|
-
return /* @__PURE__ */
|
|
9215
|
+
return /* @__PURE__ */ jsx335(Fragment4, { children: /* @__PURE__ */ jsx335(RadioGroupContext_default.Provider, { value: rest, children }) });
|
|
9175
9216
|
};
|
|
9176
9217
|
RadioGroup.displayName = "RadioGroup";
|
|
9177
9218
|
var RadioGroup_default = RadioGroup;
|
|
9178
9219
|
|
|
9179
9220
|
// src/components/Select/Select.tsx
|
|
9180
|
-
import
|
|
9221
|
+
import React30 from "react";
|
|
9181
9222
|
|
|
9182
9223
|
// src/components/Select/context.ts
|
|
9183
|
-
import
|
|
9184
|
-
var SelectContext =
|
|
9224
|
+
import React28 from "react";
|
|
9225
|
+
var SelectContext = React28.createContext(null);
|
|
9185
9226
|
var context_default = SelectContext;
|
|
9186
9227
|
|
|
9187
9228
|
// src/components/Select/SelectItem.tsx
|
|
9188
|
-
import
|
|
9189
|
-
import { jsx as
|
|
9229
|
+
import React29 from "react";
|
|
9230
|
+
import { jsx as jsx336 } from "react/jsx-runtime";
|
|
9190
9231
|
var SelectItem = (props) => {
|
|
9191
9232
|
const { children, value, onClick, disabled = false } = props;
|
|
9192
|
-
const ctx =
|
|
9233
|
+
const ctx = React29.useContext(context_default);
|
|
9193
9234
|
const handleClick = (e) => {
|
|
9194
9235
|
e.preventDefault();
|
|
9195
9236
|
e.stopPropagation();
|
|
@@ -9199,7 +9240,7 @@ var SelectItem = (props) => {
|
|
|
9199
9240
|
onClick?.();
|
|
9200
9241
|
};
|
|
9201
9242
|
const isSelected = value !== void 0 ? ctx?.selectedValue === value : ctx?.selectedLabel === children;
|
|
9202
|
-
return /* @__PURE__ */
|
|
9243
|
+
return /* @__PURE__ */ jsx336(
|
|
9203
9244
|
"div",
|
|
9204
9245
|
{
|
|
9205
9246
|
className: clsx_default("select-item", disabled && "disabled", isSelected && "is-selected"),
|
|
@@ -9220,7 +9261,7 @@ SelectItem.displayName = "Select.Item";
|
|
|
9220
9261
|
var SelectItem_default = SelectItem;
|
|
9221
9262
|
|
|
9222
9263
|
// src/components/Select/Select.tsx
|
|
9223
|
-
import { jsx as
|
|
9264
|
+
import { jsx as jsx337, jsxs as jsxs216 } from "react/jsx-runtime";
|
|
9224
9265
|
var ANIMATION_DURATION_MS3 = 200;
|
|
9225
9266
|
var SelectRoot = (props) => {
|
|
9226
9267
|
const {
|
|
@@ -9232,28 +9273,28 @@ var SelectRoot = (props) => {
|
|
|
9232
9273
|
error = false,
|
|
9233
9274
|
size = "md"
|
|
9234
9275
|
} = props;
|
|
9235
|
-
const itemChildren =
|
|
9236
|
-
(child) =>
|
|
9276
|
+
const itemChildren = React30.Children.toArray(children).filter(
|
|
9277
|
+
(child) => React30.isValidElement(child) && child.type === SelectItem_default
|
|
9237
9278
|
);
|
|
9238
9279
|
const isControlled = valueProp !== void 0;
|
|
9239
|
-
const [isOpen, setOpen] =
|
|
9240
|
-
const [uncontrolledLabel, setUncontrolledLabel] =
|
|
9241
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
9242
|
-
const controlledLabel =
|
|
9280
|
+
const [isOpen, setOpen] = React30.useState(false);
|
|
9281
|
+
const [uncontrolledLabel, setUncontrolledLabel] = React30.useState(null);
|
|
9282
|
+
const [uncontrolledValue, setUncontrolledValue] = React30.useState(void 0);
|
|
9283
|
+
const controlledLabel = React30.useMemo(() => {
|
|
9243
9284
|
if (!isControlled) return null;
|
|
9244
9285
|
const match = itemChildren.find((child) => child.props.value === valueProp);
|
|
9245
9286
|
return match ? match.props.children : null;
|
|
9246
9287
|
}, [isControlled, valueProp, itemChildren]);
|
|
9247
9288
|
const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
|
|
9248
9289
|
const selectedValue = isControlled ? valueProp : uncontrolledValue;
|
|
9249
|
-
const triggerRef =
|
|
9250
|
-
const contentRef =
|
|
9251
|
-
const [mounted, setMounted] =
|
|
9252
|
-
const [visible, setVisible] =
|
|
9253
|
-
|
|
9290
|
+
const triggerRef = React30.useRef(null);
|
|
9291
|
+
const contentRef = React30.useRef(null);
|
|
9292
|
+
const [mounted, setMounted] = React30.useState(false);
|
|
9293
|
+
const [visible, setVisible] = React30.useState(false);
|
|
9294
|
+
React30.useEffect(() => {
|
|
9254
9295
|
if (disabled && isOpen) setOpen(false);
|
|
9255
9296
|
}, [disabled, isOpen]);
|
|
9256
|
-
|
|
9297
|
+
React30.useEffect(() => {
|
|
9257
9298
|
if (isOpen) {
|
|
9258
9299
|
setMounted(true);
|
|
9259
9300
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -9263,12 +9304,12 @@ var SelectRoot = (props) => {
|
|
|
9263
9304
|
const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
|
|
9264
9305
|
return () => clearTimeout(t);
|
|
9265
9306
|
}, [isOpen]);
|
|
9266
|
-
const open =
|
|
9267
|
-
const close =
|
|
9268
|
-
const toggle =
|
|
9307
|
+
const open = React30.useCallback(() => setOpen(true), []);
|
|
9308
|
+
const close = React30.useCallback(() => setOpen(false), []);
|
|
9309
|
+
const toggle = React30.useCallback(() => setOpen((prev) => !prev), []);
|
|
9269
9310
|
useClickOutside_default([contentRef, triggerRef], close, isOpen);
|
|
9270
9311
|
const position = useAutoPosition_default(triggerRef, contentRef, mounted);
|
|
9271
|
-
const setSelected =
|
|
9312
|
+
const setSelected = React30.useCallback(
|
|
9272
9313
|
(label, itemValue) => {
|
|
9273
9314
|
if (!isControlled) {
|
|
9274
9315
|
setUncontrolledLabel(label);
|
|
@@ -9278,7 +9319,7 @@ var SelectRoot = (props) => {
|
|
|
9278
9319
|
},
|
|
9279
9320
|
[isControlled, onChange]
|
|
9280
9321
|
);
|
|
9281
|
-
const ctxValue =
|
|
9322
|
+
const ctxValue = React30.useMemo(
|
|
9282
9323
|
() => ({
|
|
9283
9324
|
isOpen,
|
|
9284
9325
|
mounted,
|
|
@@ -9300,7 +9341,7 @@ var SelectRoot = (props) => {
|
|
|
9300
9341
|
if (disabled) return;
|
|
9301
9342
|
toggle();
|
|
9302
9343
|
};
|
|
9303
|
-
return /* @__PURE__ */
|
|
9344
|
+
return /* @__PURE__ */ jsx337(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxs216(
|
|
9304
9345
|
"div",
|
|
9305
9346
|
{
|
|
9306
9347
|
className: clsx_default(
|
|
@@ -9335,7 +9376,7 @@ var SelectRoot = (props) => {
|
|
|
9335
9376
|
}
|
|
9336
9377
|
},
|
|
9337
9378
|
children: [
|
|
9338
|
-
/* @__PURE__ */
|
|
9379
|
+
/* @__PURE__ */ jsx337(
|
|
9339
9380
|
"span",
|
|
9340
9381
|
{
|
|
9341
9382
|
className: clsx_default(
|
|
@@ -9345,25 +9386,25 @@ var SelectRoot = (props) => {
|
|
|
9345
9386
|
children: selectedLabel ?? placeholder
|
|
9346
9387
|
}
|
|
9347
9388
|
),
|
|
9348
|
-
/* @__PURE__ */
|
|
9389
|
+
/* @__PURE__ */ jsx337(
|
|
9349
9390
|
"span",
|
|
9350
9391
|
{
|
|
9351
9392
|
className: clsx_default("select-trigger-icon", isOpen && "open"),
|
|
9352
9393
|
"aria-hidden": true,
|
|
9353
|
-
children: /* @__PURE__ */
|
|
9394
|
+
children: /* @__PURE__ */ jsx337(ChevronDownIcon_default, {})
|
|
9354
9395
|
}
|
|
9355
9396
|
)
|
|
9356
9397
|
]
|
|
9357
9398
|
}
|
|
9358
9399
|
),
|
|
9359
|
-
mounted && /* @__PURE__ */
|
|
9400
|
+
mounted && /* @__PURE__ */ jsx337(Portal_default, { children: /* @__PURE__ */ jsx337(
|
|
9360
9401
|
"div",
|
|
9361
9402
|
{
|
|
9362
9403
|
className: clsx_default("lib-xplat-select-content", size, position.direction, stateClass),
|
|
9363
9404
|
ref: contentRef,
|
|
9364
9405
|
style: { ...position.position, width: triggerRef.current?.offsetWidth },
|
|
9365
9406
|
role: "listbox",
|
|
9366
|
-
children: /* @__PURE__ */
|
|
9407
|
+
children: /* @__PURE__ */ jsx337(context_default.Provider, { value: ctxValue, children: itemChildren })
|
|
9367
9408
|
}
|
|
9368
9409
|
) })
|
|
9369
9410
|
]
|
|
@@ -9377,7 +9418,7 @@ var Select = Object.assign(SelectRoot, {
|
|
|
9377
9418
|
var Select_default = Select;
|
|
9378
9419
|
|
|
9379
9420
|
// src/components/Skeleton/Skeleton.tsx
|
|
9380
|
-
import { jsx as
|
|
9421
|
+
import { jsx as jsx338 } from "react/jsx-runtime";
|
|
9381
9422
|
var SIZE_MAP = {
|
|
9382
9423
|
xs: "var(--spacing-space-1)",
|
|
9383
9424
|
sm: "var(--spacing-space-2)",
|
|
@@ -9393,7 +9434,7 @@ var Skeleton = (props) => {
|
|
|
9393
9434
|
...width != null && { width: SIZE_MAP[width] },
|
|
9394
9435
|
...height != null && { height: SIZE_MAP[height] }
|
|
9395
9436
|
};
|
|
9396
|
-
return /* @__PURE__ */
|
|
9437
|
+
return /* @__PURE__ */ jsx338(
|
|
9397
9438
|
"div",
|
|
9398
9439
|
{
|
|
9399
9440
|
className: clsx_default("lib-xplat-skeleton", variant),
|
|
@@ -9406,20 +9447,20 @@ Skeleton.displayName = "Skeleton";
|
|
|
9406
9447
|
var Skeleton_default = Skeleton;
|
|
9407
9448
|
|
|
9408
9449
|
// src/components/Spinner/Spinner.tsx
|
|
9409
|
-
import { jsx as
|
|
9450
|
+
import { jsx as jsx339, jsxs as jsxs217 } from "react/jsx-runtime";
|
|
9410
9451
|
var Spinner = (props) => {
|
|
9411
9452
|
const {
|
|
9412
9453
|
size = "md",
|
|
9413
9454
|
type = "brand"
|
|
9414
9455
|
} = props;
|
|
9415
|
-
return /* @__PURE__ */
|
|
9456
|
+
return /* @__PURE__ */ jsx339(
|
|
9416
9457
|
"div",
|
|
9417
9458
|
{
|
|
9418
9459
|
className: clsx_default("lib-xplat-spinner", size, type),
|
|
9419
9460
|
role: "status",
|
|
9420
9461
|
"aria-label": "\uB85C\uB529 \uC911",
|
|
9421
9462
|
children: /* @__PURE__ */ jsxs217("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
9422
|
-
/* @__PURE__ */
|
|
9463
|
+
/* @__PURE__ */ jsx339(
|
|
9423
9464
|
"circle",
|
|
9424
9465
|
{
|
|
9425
9466
|
className: "track",
|
|
@@ -9429,7 +9470,7 @@ var Spinner = (props) => {
|
|
|
9429
9470
|
strokeWidth: "3"
|
|
9430
9471
|
}
|
|
9431
9472
|
),
|
|
9432
|
-
/* @__PURE__ */
|
|
9473
|
+
/* @__PURE__ */ jsx339(
|
|
9433
9474
|
"circle",
|
|
9434
9475
|
{
|
|
9435
9476
|
className: "indicator",
|
|
@@ -9448,20 +9489,20 @@ Spinner.displayName = "Spinner";
|
|
|
9448
9489
|
var Spinner_default = Spinner;
|
|
9449
9490
|
|
|
9450
9491
|
// src/components/Steps/Steps.tsx
|
|
9451
|
-
import { jsx as
|
|
9492
|
+
import { jsx as jsx340, jsxs as jsxs218 } from "react/jsx-runtime";
|
|
9452
9493
|
var Steps = (props) => {
|
|
9453
9494
|
const {
|
|
9454
9495
|
items,
|
|
9455
9496
|
current,
|
|
9456
9497
|
type = "brand"
|
|
9457
9498
|
} = props;
|
|
9458
|
-
return /* @__PURE__ */
|
|
9499
|
+
return /* @__PURE__ */ jsx340("div", { className: clsx_default("lib-xplat-steps", type), children: items.map((item, index) => {
|
|
9459
9500
|
const status = index < current ? "completed" : index === current ? "active" : "pending";
|
|
9460
9501
|
return /* @__PURE__ */ jsxs218("div", { className: clsx_default("step-item", status), children: [
|
|
9461
|
-
/* @__PURE__ */
|
|
9502
|
+
/* @__PURE__ */ jsx340("div", { className: "step-circle", children: status === "completed" ? /* @__PURE__ */ jsx340(CheckIcon_default, {}) : /* @__PURE__ */ jsx340("span", { children: index + 1 }) }),
|
|
9462
9503
|
/* @__PURE__ */ jsxs218("div", { className: "step-content", children: [
|
|
9463
|
-
/* @__PURE__ */
|
|
9464
|
-
item.description && /* @__PURE__ */
|
|
9504
|
+
/* @__PURE__ */ jsx340("span", { className: "step-title", children: item.title }),
|
|
9505
|
+
item.description && /* @__PURE__ */ jsx340("span", { className: "step-description", children: item.description })
|
|
9465
9506
|
] })
|
|
9466
9507
|
] }, index);
|
|
9467
9508
|
}) });
|
|
@@ -9470,8 +9511,8 @@ Steps.displayName = "Steps";
|
|
|
9470
9511
|
var Steps_default = Steps;
|
|
9471
9512
|
|
|
9472
9513
|
// src/components/Swiper/Swiper.tsx
|
|
9473
|
-
import
|
|
9474
|
-
import { jsx as
|
|
9514
|
+
import React31 from "react";
|
|
9515
|
+
import { jsx as jsx341, jsxs as jsxs219 } from "react/jsx-runtime";
|
|
9475
9516
|
var Swiper = (props) => {
|
|
9476
9517
|
const {
|
|
9477
9518
|
auto = false,
|
|
@@ -9495,26 +9536,26 @@ var Swiper = (props) => {
|
|
|
9495
9536
|
const maxIndex = Math.max(0, totalSlides - viewItemCount);
|
|
9496
9537
|
const useLoop = loop && canSlide;
|
|
9497
9538
|
const cloneCount = useLoop ? totalSlides : 0;
|
|
9498
|
-
const extendedItems =
|
|
9539
|
+
const extendedItems = React31.useMemo(() => {
|
|
9499
9540
|
if (!useLoop) return items;
|
|
9500
9541
|
return [...items, ...items, ...items];
|
|
9501
9542
|
}, [items, useLoop]);
|
|
9502
9543
|
const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
|
|
9503
|
-
const [innerIndex, setInnerIndex] =
|
|
9544
|
+
const [innerIndex, setInnerIndex] = React31.useState(
|
|
9504
9545
|
useLoop ? cloneCount + initialIdx : initialIdx
|
|
9505
9546
|
);
|
|
9506
|
-
const [isDragging, setIsDragging] =
|
|
9507
|
-
const [dragOffset, setDragOffset] =
|
|
9508
|
-
const [animated, setAnimated] =
|
|
9509
|
-
const [containerWidth, setContainerWidth] =
|
|
9510
|
-
const containerRef =
|
|
9511
|
-
const startXRef =
|
|
9512
|
-
const startTimeRef =
|
|
9513
|
-
const autoplayTimerRef =
|
|
9514
|
-
const resumeTimeoutRef =
|
|
9515
|
-
const [paused, setPaused] =
|
|
9516
|
-
const initializedRef =
|
|
9517
|
-
|
|
9547
|
+
const [isDragging, setIsDragging] = React31.useState(false);
|
|
9548
|
+
const [dragOffset, setDragOffset] = React31.useState(0);
|
|
9549
|
+
const [animated, setAnimated] = React31.useState(false);
|
|
9550
|
+
const [containerWidth, setContainerWidth] = React31.useState(0);
|
|
9551
|
+
const containerRef = React31.useRef(null);
|
|
9552
|
+
const startXRef = React31.useRef(0);
|
|
9553
|
+
const startTimeRef = React31.useRef(0);
|
|
9554
|
+
const autoplayTimerRef = React31.useRef(null);
|
|
9555
|
+
const resumeTimeoutRef = React31.useRef(null);
|
|
9556
|
+
const [paused, setPaused] = React31.useState(false);
|
|
9557
|
+
const initializedRef = React31.useRef(false);
|
|
9558
|
+
React31.useEffect(() => {
|
|
9518
9559
|
const el = containerRef.current;
|
|
9519
9560
|
if (!el) return;
|
|
9520
9561
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -9537,7 +9578,7 @@ var Swiper = (props) => {
|
|
|
9537
9578
|
return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
|
|
9538
9579
|
};
|
|
9539
9580
|
const realIndex = getRealIndex(innerIndex);
|
|
9540
|
-
const moveToInner =
|
|
9581
|
+
const moveToInner = React31.useCallback(
|
|
9541
9582
|
(idx, withAnim = true) => {
|
|
9542
9583
|
if (!useLoop) {
|
|
9543
9584
|
setAnimated(withAnim);
|
|
@@ -9565,7 +9606,7 @@ var Swiper = (props) => {
|
|
|
9565
9606
|
},
|
|
9566
9607
|
[useLoop, cloneCount, totalSlides]
|
|
9567
9608
|
);
|
|
9568
|
-
const handleTransitionEnd =
|
|
9609
|
+
const handleTransitionEnd = React31.useCallback(() => {
|
|
9569
9610
|
if (!useLoop) return;
|
|
9570
9611
|
const real = getRealIndex(innerIndex);
|
|
9571
9612
|
const canonical = cloneCount + real;
|
|
@@ -9575,7 +9616,7 @@ var Swiper = (props) => {
|
|
|
9575
9616
|
}
|
|
9576
9617
|
onChange?.(Math.min(real, maxIndex));
|
|
9577
9618
|
}, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange]);
|
|
9578
|
-
const slideTo =
|
|
9619
|
+
const slideTo = React31.useCallback(
|
|
9579
9620
|
(logicalIndex) => {
|
|
9580
9621
|
if (!canSlide) return;
|
|
9581
9622
|
const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
|
|
@@ -9585,7 +9626,7 @@ var Swiper = (props) => {
|
|
|
9585
9626
|
},
|
|
9586
9627
|
[canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
|
|
9587
9628
|
);
|
|
9588
|
-
const slideNext =
|
|
9629
|
+
const slideNext = React31.useCallback(() => {
|
|
9589
9630
|
if (!canSlide) return;
|
|
9590
9631
|
const nextInner = innerIndex + slideBy;
|
|
9591
9632
|
if (useLoop) {
|
|
@@ -9594,7 +9635,7 @@ var Swiper = (props) => {
|
|
|
9594
9635
|
moveToInner(Math.min(nextInner, maxIndex), true);
|
|
9595
9636
|
}
|
|
9596
9637
|
}, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
|
|
9597
|
-
const slidePrev =
|
|
9638
|
+
const slidePrev = React31.useCallback(() => {
|
|
9598
9639
|
if (!canSlide) return;
|
|
9599
9640
|
const prevInner = innerIndex - slideBy;
|
|
9600
9641
|
if (useLoop) {
|
|
@@ -9603,7 +9644,7 @@ var Swiper = (props) => {
|
|
|
9603
9644
|
moveToInner(Math.max(prevInner, 0), true);
|
|
9604
9645
|
}
|
|
9605
9646
|
}, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
|
|
9606
|
-
|
|
9647
|
+
React31.useEffect(() => {
|
|
9607
9648
|
if (indexProp === void 0) return;
|
|
9608
9649
|
const clamped = Math.max(0, Math.min(indexProp, maxIndex));
|
|
9609
9650
|
const target = useLoop ? cloneCount + clamped : clamped;
|
|
@@ -9611,12 +9652,12 @@ var Swiper = (props) => {
|
|
|
9611
9652
|
moveToInner(target, true);
|
|
9612
9653
|
}
|
|
9613
9654
|
}, [indexProp]);
|
|
9614
|
-
|
|
9655
|
+
React31.useImperativeHandle(swiperRef, () => ({
|
|
9615
9656
|
slidePrev,
|
|
9616
9657
|
slideNext,
|
|
9617
9658
|
slideTo
|
|
9618
9659
|
}));
|
|
9619
|
-
|
|
9660
|
+
React31.useEffect(() => {
|
|
9620
9661
|
if (!auto || !canSlide || paused) return;
|
|
9621
9662
|
autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
|
|
9622
9663
|
return () => {
|
|
@@ -9642,7 +9683,7 @@ var Swiper = (props) => {
|
|
|
9642
9683
|
resumeTimeoutRef.current = null;
|
|
9643
9684
|
}, pauseOnInteraction);
|
|
9644
9685
|
};
|
|
9645
|
-
|
|
9686
|
+
React31.useEffect(() => {
|
|
9646
9687
|
return () => {
|
|
9647
9688
|
if (resumeTimeoutRef.current) clearTimeout(resumeTimeoutRef.current);
|
|
9648
9689
|
};
|
|
@@ -9660,7 +9701,7 @@ var Swiper = (props) => {
|
|
|
9660
9701
|
startXRef.current = getClientX(e);
|
|
9661
9702
|
startTimeRef.current = Date.now();
|
|
9662
9703
|
};
|
|
9663
|
-
|
|
9704
|
+
React31.useEffect(() => {
|
|
9664
9705
|
if (!isDragging) return;
|
|
9665
9706
|
const handleMove = (e) => {
|
|
9666
9707
|
setDragOffset(getClientX(e) - startXRef.current);
|
|
@@ -9699,8 +9740,8 @@ var Swiper = (props) => {
|
|
|
9699
9740
|
}, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
|
|
9700
9741
|
const slideWidthPercent = 100 / viewItemCount;
|
|
9701
9742
|
const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
|
|
9702
|
-
const slideElements =
|
|
9703
|
-
() => extendedItems.map((item, idx) => /* @__PURE__ */
|
|
9743
|
+
const slideElements = React31.useMemo(
|
|
9744
|
+
() => extendedItems.map((item, idx) => /* @__PURE__ */ jsx341(
|
|
9704
9745
|
"div",
|
|
9705
9746
|
{
|
|
9706
9747
|
className: "lib-xplat-swiper__slide",
|
|
@@ -9720,14 +9761,14 @@ var Swiper = (props) => {
|
|
|
9720
9761
|
totalSteps - 1
|
|
9721
9762
|
);
|
|
9722
9763
|
return /* @__PURE__ */ jsxs219("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
|
|
9723
|
-
/* @__PURE__ */
|
|
9764
|
+
/* @__PURE__ */ jsx341(
|
|
9724
9765
|
"div",
|
|
9725
9766
|
{
|
|
9726
9767
|
className: "lib-xplat-swiper__viewport",
|
|
9727
9768
|
onMouseDown: handleDragStart,
|
|
9728
9769
|
onTouchStart: handleDragStart,
|
|
9729
9770
|
onDragStart: (e) => e.preventDefault(),
|
|
9730
|
-
children: /* @__PURE__ */
|
|
9771
|
+
children: /* @__PURE__ */ jsx341(
|
|
9731
9772
|
"div",
|
|
9732
9773
|
{
|
|
9733
9774
|
className: clsx_default(
|
|
@@ -9745,7 +9786,7 @@ var Swiper = (props) => {
|
|
|
9745
9786
|
)
|
|
9746
9787
|
}
|
|
9747
9788
|
),
|
|
9748
|
-
showProgress && canSlide && /* @__PURE__ */
|
|
9789
|
+
showProgress && canSlide && /* @__PURE__ */ jsx341("div", { className: "lib-xplat-swiper__progress", children: /* @__PURE__ */ jsx341("div", { className: "lib-xplat-swiper__progress-track", children: /* @__PURE__ */ jsx341(
|
|
9749
9790
|
"span",
|
|
9750
9791
|
{
|
|
9751
9792
|
className: "lib-xplat-swiper__progress-fill",
|
|
@@ -9755,7 +9796,7 @@ var Swiper = (props) => {
|
|
|
9755
9796
|
}
|
|
9756
9797
|
}
|
|
9757
9798
|
) }) }),
|
|
9758
|
-
canSlide && /* @__PURE__ */
|
|
9799
|
+
canSlide && /* @__PURE__ */ jsx341("div", { className: "lib-xplat-swiper__dots", children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ jsx341(
|
|
9759
9800
|
"button",
|
|
9760
9801
|
{
|
|
9761
9802
|
className: clsx_default(
|
|
@@ -9773,8 +9814,8 @@ Swiper.displayName = "Swiper";
|
|
|
9773
9814
|
var Swiper_default = Swiper;
|
|
9774
9815
|
|
|
9775
9816
|
// src/components/Switch/Switch.tsx
|
|
9776
|
-
import
|
|
9777
|
-
import { jsx as
|
|
9817
|
+
import React32 from "react";
|
|
9818
|
+
import { jsx as jsx342 } from "react/jsx-runtime";
|
|
9778
9819
|
var KNOB_TRANSITION_MS = 250;
|
|
9779
9820
|
var Switch = (props) => {
|
|
9780
9821
|
const {
|
|
@@ -9784,9 +9825,9 @@ var Switch = (props) => {
|
|
|
9784
9825
|
disabled,
|
|
9785
9826
|
onChange
|
|
9786
9827
|
} = props;
|
|
9787
|
-
const [isAnimating, setIsAnimating] =
|
|
9788
|
-
const timeoutRef =
|
|
9789
|
-
|
|
9828
|
+
const [isAnimating, setIsAnimating] = React32.useState(false);
|
|
9829
|
+
const timeoutRef = React32.useRef(null);
|
|
9830
|
+
React32.useEffect(() => {
|
|
9790
9831
|
return () => {
|
|
9791
9832
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
9792
9833
|
};
|
|
@@ -9801,7 +9842,7 @@ var Switch = (props) => {
|
|
|
9801
9842
|
timeoutRef.current = null;
|
|
9802
9843
|
}, KNOB_TRANSITION_MS);
|
|
9803
9844
|
};
|
|
9804
|
-
return /* @__PURE__ */
|
|
9845
|
+
return /* @__PURE__ */ jsx342(
|
|
9805
9846
|
"div",
|
|
9806
9847
|
{
|
|
9807
9848
|
className: clsx_default(
|
|
@@ -9814,7 +9855,7 @@ var Switch = (props) => {
|
|
|
9814
9855
|
),
|
|
9815
9856
|
onClick: handleClick,
|
|
9816
9857
|
"aria-disabled": disabled || isAnimating,
|
|
9817
|
-
children: /* @__PURE__ */
|
|
9858
|
+
children: /* @__PURE__ */ jsx342("div", { className: clsx_default("knob", value ? "checked" : void 0) })
|
|
9818
9859
|
}
|
|
9819
9860
|
);
|
|
9820
9861
|
};
|
|
@@ -9822,17 +9863,17 @@ Switch.displayName = "Switch";
|
|
|
9822
9863
|
var Switch_default = Switch;
|
|
9823
9864
|
|
|
9824
9865
|
// src/components/Table/TableContext.tsx
|
|
9825
|
-
import
|
|
9826
|
-
var TableContext =
|
|
9866
|
+
import React33 from "react";
|
|
9867
|
+
var TableContext = React33.createContext(null);
|
|
9827
9868
|
var useTableContext = () => {
|
|
9828
|
-
const ctx =
|
|
9869
|
+
const ctx = React33.useContext(TableContext);
|
|
9829
9870
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
9830
9871
|
return ctx;
|
|
9831
9872
|
};
|
|
9832
9873
|
var TableContext_default = TableContext;
|
|
9833
9874
|
|
|
9834
9875
|
// src/components/Table/Table.tsx
|
|
9835
|
-
import { jsx as
|
|
9876
|
+
import { jsx as jsx343 } from "react/jsx-runtime";
|
|
9836
9877
|
var Table = (props) => {
|
|
9837
9878
|
const {
|
|
9838
9879
|
children,
|
|
@@ -9842,7 +9883,7 @@ var Table = (props) => {
|
|
|
9842
9883
|
headerSticky = false,
|
|
9843
9884
|
stickyShadow = true
|
|
9844
9885
|
} = props;
|
|
9845
|
-
return /* @__PURE__ */
|
|
9886
|
+
return /* @__PURE__ */ jsx343("div", { className: `lib-xplat-table-wrapper ${size}`, children: /* @__PURE__ */ jsx343(
|
|
9846
9887
|
TableContext_default.Provider,
|
|
9847
9888
|
{
|
|
9848
9889
|
value: {
|
|
@@ -9851,7 +9892,7 @@ var Table = (props) => {
|
|
|
9851
9892
|
headerSticky,
|
|
9852
9893
|
stickyShadow
|
|
9853
9894
|
},
|
|
9854
|
-
children: /* @__PURE__ */
|
|
9895
|
+
children: /* @__PURE__ */ jsx343("table", { className: "lib-xplat-table", children })
|
|
9855
9896
|
}
|
|
9856
9897
|
) });
|
|
9857
9898
|
};
|
|
@@ -9859,41 +9900,41 @@ Table.displayName = "Table";
|
|
|
9859
9900
|
var Table_default = Table;
|
|
9860
9901
|
|
|
9861
9902
|
// src/components/Table/TableBody.tsx
|
|
9862
|
-
import { jsx as
|
|
9903
|
+
import { jsx as jsx344 } from "react/jsx-runtime";
|
|
9863
9904
|
var TableBody = (props) => {
|
|
9864
9905
|
const { children } = props;
|
|
9865
|
-
return /* @__PURE__ */
|
|
9906
|
+
return /* @__PURE__ */ jsx344("tbody", { children });
|
|
9866
9907
|
};
|
|
9867
9908
|
TableBody.displayName = "TableBody";
|
|
9868
9909
|
var TableBody_default = TableBody;
|
|
9869
9910
|
|
|
9870
9911
|
// src/components/Table/TableCell.tsx
|
|
9871
|
-
import
|
|
9912
|
+
import React36 from "react";
|
|
9872
9913
|
|
|
9873
9914
|
// src/components/Table/TableHeadContext.tsx
|
|
9874
|
-
import
|
|
9875
|
-
var TableHeadContext =
|
|
9915
|
+
import React34 from "react";
|
|
9916
|
+
var TableHeadContext = React34.createContext(
|
|
9876
9917
|
null
|
|
9877
9918
|
);
|
|
9878
9919
|
var useTableHeadContext = () => {
|
|
9879
|
-
const ctx =
|
|
9920
|
+
const ctx = React34.useContext(TableHeadContext);
|
|
9880
9921
|
return ctx;
|
|
9881
9922
|
};
|
|
9882
9923
|
var TableHeadContext_default = TableHeadContext;
|
|
9883
9924
|
|
|
9884
9925
|
// src/components/Table/TableRowContext.tsx
|
|
9885
|
-
import
|
|
9886
|
-
var TableRowContext =
|
|
9926
|
+
import React35 from "react";
|
|
9927
|
+
var TableRowContext = React35.createContext(null);
|
|
9887
9928
|
var useTableRowContext = () => {
|
|
9888
|
-
const ctx =
|
|
9929
|
+
const ctx = React35.useContext(TableRowContext);
|
|
9889
9930
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
9890
9931
|
return ctx;
|
|
9891
9932
|
};
|
|
9892
9933
|
var TableRowContext_default = TableRowContext;
|
|
9893
9934
|
|
|
9894
9935
|
// src/components/Table/TableCell.tsx
|
|
9895
|
-
import { jsx as
|
|
9896
|
-
var TableCell =
|
|
9936
|
+
import { jsx as jsx345 } from "react/jsx-runtime";
|
|
9937
|
+
var TableCell = React36.memo((props) => {
|
|
9897
9938
|
const {
|
|
9898
9939
|
children,
|
|
9899
9940
|
align = "center",
|
|
@@ -9907,9 +9948,9 @@ var TableCell = React37.memo((props) => {
|
|
|
9907
9948
|
const { registerStickyCell, stickyCells } = useTableRowContext();
|
|
9908
9949
|
const { stickyShadow } = useTableContext();
|
|
9909
9950
|
const headContext = useTableHeadContext();
|
|
9910
|
-
const [left, setLeft] =
|
|
9911
|
-
const cellRef =
|
|
9912
|
-
const calculateLeft =
|
|
9951
|
+
const [left, setLeft] = React36.useState(0);
|
|
9952
|
+
const cellRef = React36.useRef(null);
|
|
9953
|
+
const calculateLeft = React36.useCallback(() => {
|
|
9913
9954
|
if (!cellRef.current) return 0;
|
|
9914
9955
|
let totalLeft = 0;
|
|
9915
9956
|
for (const ref of stickyCells) {
|
|
@@ -9918,7 +9959,7 @@ var TableCell = React37.memo((props) => {
|
|
|
9918
9959
|
}
|
|
9919
9960
|
return totalLeft;
|
|
9920
9961
|
}, [stickyCells]);
|
|
9921
|
-
|
|
9962
|
+
React36.useEffect(() => {
|
|
9922
9963
|
if (!isSticky || !cellRef.current) return;
|
|
9923
9964
|
registerStickyCell(cellRef);
|
|
9924
9965
|
setLeft(calculateLeft());
|
|
@@ -9937,7 +9978,7 @@ var TableCell = React37.memo((props) => {
|
|
|
9937
9978
|
const CellTag = isHeaderCell ? "th" : "td";
|
|
9938
9979
|
const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
|
|
9939
9980
|
const enableHover = headContext && headContext.cellHover;
|
|
9940
|
-
return /* @__PURE__ */
|
|
9981
|
+
return /* @__PURE__ */ jsx345(
|
|
9941
9982
|
CellTag,
|
|
9942
9983
|
{
|
|
9943
9984
|
ref: cellRef,
|
|
@@ -9964,21 +10005,21 @@ TableCell.displayName = "TableCell";
|
|
|
9964
10005
|
var TableCell_default = TableCell;
|
|
9965
10006
|
|
|
9966
10007
|
// src/components/Table/TableHead.tsx
|
|
9967
|
-
import { jsx as
|
|
10008
|
+
import { jsx as jsx346 } from "react/jsx-runtime";
|
|
9968
10009
|
var TableHead = ({
|
|
9969
10010
|
children,
|
|
9970
10011
|
cellHover = false
|
|
9971
10012
|
}) => {
|
|
9972
10013
|
const { headerSticky } = useTableContext();
|
|
9973
|
-
return /* @__PURE__ */
|
|
10014
|
+
return /* @__PURE__ */ jsx346(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ jsx346("thead", { className: clsx_default(headerSticky ? "table-sticky" : null), children }) });
|
|
9974
10015
|
};
|
|
9975
10016
|
TableHead.displayName = "TableHead";
|
|
9976
10017
|
var TableHead_default = TableHead;
|
|
9977
10018
|
|
|
9978
10019
|
// src/components/Table/TableRow.tsx
|
|
9979
|
-
import
|
|
9980
|
-
import { jsx as
|
|
9981
|
-
var TableRow =
|
|
10020
|
+
import React37 from "react";
|
|
10021
|
+
import { jsx as jsx347 } from "react/jsx-runtime";
|
|
10022
|
+
var TableRow = React37.memo((props) => {
|
|
9982
10023
|
const {
|
|
9983
10024
|
children,
|
|
9984
10025
|
type = "secondary",
|
|
@@ -9987,14 +10028,14 @@ var TableRow = React38.memo((props) => {
|
|
|
9987
10028
|
onClick
|
|
9988
10029
|
} = props;
|
|
9989
10030
|
const { rowBorderUse } = useTableContext();
|
|
9990
|
-
const [stickyCells, setStickyCells] =
|
|
10031
|
+
const [stickyCells, setStickyCells] = React37.useState([]);
|
|
9991
10032
|
const registerStickyCell = (ref) => {
|
|
9992
10033
|
setStickyCells((prev) => {
|
|
9993
10034
|
if (prev.includes(ref)) return prev;
|
|
9994
10035
|
return [...prev, ref];
|
|
9995
10036
|
});
|
|
9996
10037
|
};
|
|
9997
|
-
return /* @__PURE__ */
|
|
10038
|
+
return /* @__PURE__ */ jsx347(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ jsx347(
|
|
9998
10039
|
"tr",
|
|
9999
10040
|
{
|
|
10000
10041
|
className: clsx_default(
|
|
@@ -10018,7 +10059,7 @@ TableRow.displayName = "TableRow";
|
|
|
10018
10059
|
var TableRow_default = TableRow;
|
|
10019
10060
|
|
|
10020
10061
|
// src/components/Tag/Tag.tsx
|
|
10021
|
-
import { jsx as
|
|
10062
|
+
import { jsx as jsx348, jsxs as jsxs220 } from "react/jsx-runtime";
|
|
10022
10063
|
var Tag = (props) => {
|
|
10023
10064
|
const {
|
|
10024
10065
|
children,
|
|
@@ -10039,8 +10080,8 @@ var Tag = (props) => {
|
|
|
10039
10080
|
disabled && "disabled"
|
|
10040
10081
|
),
|
|
10041
10082
|
children: [
|
|
10042
|
-
/* @__PURE__ */
|
|
10043
|
-
onClose && /* @__PURE__ */
|
|
10083
|
+
/* @__PURE__ */ jsx348("span", { className: "tag-label", children }),
|
|
10084
|
+
onClose && /* @__PURE__ */ jsx348("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", disabled, children: /* @__PURE__ */ jsx348(XIcon_default, {}) })
|
|
10044
10085
|
]
|
|
10045
10086
|
}
|
|
10046
10087
|
);
|
|
@@ -10049,9 +10090,9 @@ Tag.displayName = "Tag";
|
|
|
10049
10090
|
var Tag_default = Tag;
|
|
10050
10091
|
|
|
10051
10092
|
// src/components/TextArea/TextArea.tsx
|
|
10052
|
-
import
|
|
10053
|
-
import { jsx as
|
|
10054
|
-
var TextArea =
|
|
10093
|
+
import React38 from "react";
|
|
10094
|
+
import { jsx as jsx349 } from "react/jsx-runtime";
|
|
10095
|
+
var TextArea = React38.forwardRef(
|
|
10055
10096
|
(props, ref) => {
|
|
10056
10097
|
const {
|
|
10057
10098
|
className,
|
|
@@ -10061,7 +10102,7 @@ var TextArea = React39.forwardRef(
|
|
|
10061
10102
|
disabled,
|
|
10062
10103
|
...textareaProps
|
|
10063
10104
|
} = props;
|
|
10064
|
-
return /* @__PURE__ */
|
|
10105
|
+
return /* @__PURE__ */ jsx349("div", { className: clsx_default("lib-xplat-textarea-wrap", className), children: /* @__PURE__ */ jsx349(
|
|
10065
10106
|
"textarea",
|
|
10066
10107
|
{
|
|
10067
10108
|
...textareaProps,
|
|
@@ -10078,25 +10119,25 @@ TextArea.displayName = "TextArea";
|
|
|
10078
10119
|
var TextArea_default = TextArea;
|
|
10079
10120
|
|
|
10080
10121
|
// src/components/Toast/Toast.tsx
|
|
10081
|
-
import
|
|
10122
|
+
import React39 from "react";
|
|
10082
10123
|
import { createPortal as createPortal3 } from "react-dom";
|
|
10083
|
-
import { jsx as
|
|
10084
|
-
var ToastContext =
|
|
10124
|
+
import { jsx as jsx350, jsxs as jsxs221 } from "react/jsx-runtime";
|
|
10125
|
+
var ToastContext = React39.createContext(null);
|
|
10085
10126
|
var useToast = () => {
|
|
10086
|
-
const ctx =
|
|
10127
|
+
const ctx = React39.useContext(ToastContext);
|
|
10087
10128
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
10088
10129
|
return ctx;
|
|
10089
10130
|
};
|
|
10090
10131
|
var EXIT_DURATION = 300;
|
|
10091
10132
|
var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
10092
|
-
const ref =
|
|
10093
|
-
const [height, setHeight] =
|
|
10094
|
-
|
|
10133
|
+
const ref = React39.useRef(null);
|
|
10134
|
+
const [height, setHeight] = React39.useState(void 0);
|
|
10135
|
+
React39.useEffect(() => {
|
|
10095
10136
|
if (ref.current && !isExiting) {
|
|
10096
10137
|
setHeight(ref.current.offsetHeight);
|
|
10097
10138
|
}
|
|
10098
10139
|
}, [isExiting]);
|
|
10099
|
-
return /* @__PURE__ */
|
|
10140
|
+
return /* @__PURE__ */ jsx350(
|
|
10100
10141
|
"div",
|
|
10101
10142
|
{
|
|
10102
10143
|
className: clsx_default("lib-xplat-toast-wrapper", { exit: isExiting }),
|
|
@@ -10111,8 +10152,8 @@ var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
|
10111
10152
|
className: clsx_default("lib-xplat-toast", item.type, { exit: isExiting }),
|
|
10112
10153
|
role: "alert",
|
|
10113
10154
|
children: [
|
|
10114
|
-
/* @__PURE__ */
|
|
10115
|
-
/* @__PURE__ */
|
|
10155
|
+
/* @__PURE__ */ jsx350("span", { className: "message", children: item.message }),
|
|
10156
|
+
/* @__PURE__ */ jsx350("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
10116
10157
|
]
|
|
10117
10158
|
}
|
|
10118
10159
|
)
|
|
@@ -10123,13 +10164,13 @@ var ToastProvider = ({
|
|
|
10123
10164
|
children,
|
|
10124
10165
|
position = "top-right"
|
|
10125
10166
|
}) => {
|
|
10126
|
-
const [toasts, setToasts] =
|
|
10127
|
-
const [removing, setRemoving] =
|
|
10128
|
-
const [mounted, setMounted] =
|
|
10129
|
-
|
|
10167
|
+
const [toasts, setToasts] = React39.useState([]);
|
|
10168
|
+
const [removing, setRemoving] = React39.useState(/* @__PURE__ */ new Set());
|
|
10169
|
+
const [mounted, setMounted] = React39.useState(false);
|
|
10170
|
+
React39.useEffect(() => {
|
|
10130
10171
|
setMounted(true);
|
|
10131
10172
|
}, []);
|
|
10132
|
-
const remove =
|
|
10173
|
+
const remove = React39.useCallback((id) => {
|
|
10133
10174
|
setRemoving((prev) => new Set(prev).add(id));
|
|
10134
10175
|
setTimeout(() => {
|
|
10135
10176
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
@@ -10140,7 +10181,7 @@ var ToastProvider = ({
|
|
|
10140
10181
|
});
|
|
10141
10182
|
}, EXIT_DURATION);
|
|
10142
10183
|
}, []);
|
|
10143
|
-
const toast =
|
|
10184
|
+
const toast = React39.useCallback(
|
|
10144
10185
|
(type, message, duration = 3e3) => {
|
|
10145
10186
|
const id = `${Date.now()}-${Math.random()}`;
|
|
10146
10187
|
setToasts((prev) => [...prev, { id, type, message }]);
|
|
@@ -10153,7 +10194,7 @@ var ToastProvider = ({
|
|
|
10153
10194
|
return /* @__PURE__ */ jsxs221(ToastContext.Provider, { value: { toast }, children: [
|
|
10154
10195
|
children,
|
|
10155
10196
|
mounted && createPortal3(
|
|
10156
|
-
/* @__PURE__ */
|
|
10197
|
+
/* @__PURE__ */ jsx350("div", { className: clsx_default("lib-xplat-toast-container", position), children: toasts.map((t) => /* @__PURE__ */ jsx350(
|
|
10157
10198
|
ToastItemComponent,
|
|
10158
10199
|
{
|
|
10159
10200
|
item: t,
|
|
@@ -10169,67 +10210,111 @@ var ToastProvider = ({
|
|
|
10169
10210
|
ToastProvider.displayName = "ToastProvider";
|
|
10170
10211
|
|
|
10171
10212
|
// src/components/Tooltip/Tooltip.tsx
|
|
10172
|
-
import
|
|
10173
|
-
import { Fragment as Fragment5, jsx as
|
|
10213
|
+
import React40 from "react";
|
|
10214
|
+
import { Fragment as Fragment5, jsx as jsx351, jsxs as jsxs222 } from "react/jsx-runtime";
|
|
10174
10215
|
var OFFSET = 12;
|
|
10216
|
+
var GAP = 8;
|
|
10175
10217
|
var SHOW_DELAY = 300;
|
|
10176
10218
|
var Tooltip = (props) => {
|
|
10177
10219
|
const {
|
|
10178
|
-
|
|
10220
|
+
children,
|
|
10179
10221
|
title,
|
|
10180
10222
|
description,
|
|
10181
|
-
|
|
10223
|
+
type = "dark",
|
|
10224
|
+
follow = false,
|
|
10182
10225
|
disabled = false
|
|
10183
10226
|
} = props;
|
|
10184
|
-
const triggerRef =
|
|
10185
|
-
const tooltipRef =
|
|
10186
|
-
const [visible, setVisible] =
|
|
10187
|
-
const [pos, setPos] =
|
|
10188
|
-
const delayTimer =
|
|
10189
|
-
const
|
|
10227
|
+
const triggerRef = React40.useRef(null);
|
|
10228
|
+
const tooltipRef = React40.useRef(null);
|
|
10229
|
+
const [visible, setVisible] = React40.useState(false);
|
|
10230
|
+
const [pos, setPos] = React40.useState({ left: 0, top: 0 });
|
|
10231
|
+
const delayTimer = React40.useRef(0);
|
|
10232
|
+
const rafRef = React40.useRef(0);
|
|
10233
|
+
const cursor = React40.useRef(null);
|
|
10234
|
+
const clamp = React40.useCallback((left, top, w, h) => {
|
|
10235
|
+
const vw = window.innerWidth;
|
|
10236
|
+
const vh = window.innerHeight;
|
|
10237
|
+
return {
|
|
10238
|
+
left: Math.min(Math.max(GAP, left), Math.max(GAP, vw - w - GAP)),
|
|
10239
|
+
top: Math.min(Math.max(GAP, top), Math.max(GAP, vh - h - GAP))
|
|
10240
|
+
};
|
|
10241
|
+
}, []);
|
|
10242
|
+
const placeAtCursor = React40.useCallback((x, y) => {
|
|
10190
10243
|
const el = tooltipRef.current;
|
|
10191
10244
|
if (!el) return;
|
|
10192
10245
|
const w = el.offsetWidth;
|
|
10193
10246
|
const h = el.offsetHeight;
|
|
10194
|
-
|
|
10195
|
-
let
|
|
10196
|
-
|
|
10197
|
-
if (
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10247
|
+
let left = x + OFFSET;
|
|
10248
|
+
let top = y - h - OFFSET;
|
|
10249
|
+
if (left + w > window.innerWidth - GAP) left = x - w - OFFSET;
|
|
10250
|
+
if (top < GAP) top = y + OFFSET;
|
|
10251
|
+
setPos(clamp(left, top, w, h));
|
|
10252
|
+
}, [clamp]);
|
|
10253
|
+
const placeAtTrigger = React40.useCallback(() => {
|
|
10254
|
+
const el = tooltipRef.current;
|
|
10255
|
+
const trigger = triggerRef.current;
|
|
10256
|
+
if (!el || !trigger) return;
|
|
10257
|
+
const w = el.offsetWidth;
|
|
10258
|
+
const h = el.offsetHeight;
|
|
10259
|
+
const rect = trigger.getBoundingClientRect();
|
|
10260
|
+
let top = rect.top - h - GAP;
|
|
10261
|
+
if (top < GAP) top = rect.bottom + GAP;
|
|
10262
|
+
const left = rect.left + rect.width / 2 - w / 2;
|
|
10263
|
+
setPos(clamp(left, top, w, h));
|
|
10264
|
+
}, [clamp]);
|
|
10265
|
+
const reposition = React40.useCallback(() => {
|
|
10266
|
+
if (follow && cursor.current) {
|
|
10267
|
+
placeAtCursor(cursor.current.x, cursor.current.y);
|
|
10268
|
+
} else {
|
|
10269
|
+
placeAtTrigger();
|
|
10270
|
+
}
|
|
10271
|
+
}, [follow, placeAtCursor, placeAtTrigger]);
|
|
10272
|
+
const handleMouseEnter = React40.useCallback((e) => {
|
|
10203
10273
|
if (disabled) return;
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
}, SHOW_DELAY);
|
|
10274
|
+
cursor.current = { x: e.clientX, y: e.clientY };
|
|
10275
|
+
delayTimer.current = window.setTimeout(() => setVisible(true), SHOW_DELAY);
|
|
10207
10276
|
}, [disabled]);
|
|
10208
|
-
const handleMouseMove =
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
|
|
10215
|
-
}, []);
|
|
10216
|
-
const
|
|
10277
|
+
const handleMouseMove = React40.useCallback((e) => {
|
|
10278
|
+
cursor.current = { x: e.clientX, y: e.clientY };
|
|
10279
|
+
if (!visible || !follow) return;
|
|
10280
|
+
cancelAnimationFrame(rafRef.current);
|
|
10281
|
+
rafRef.current = requestAnimationFrame(() => {
|
|
10282
|
+
if (cursor.current) placeAtCursor(cursor.current.x, cursor.current.y);
|
|
10283
|
+
});
|
|
10284
|
+
}, [visible, follow, placeAtCursor]);
|
|
10285
|
+
const close = React40.useCallback(() => {
|
|
10217
10286
|
window.clearTimeout(delayTimer.current);
|
|
10287
|
+
cancelAnimationFrame(rafRef.current);
|
|
10218
10288
|
setVisible(false);
|
|
10219
10289
|
}, []);
|
|
10220
|
-
const
|
|
10290
|
+
const handleMouseLeave = React40.useCallback(() => {
|
|
10291
|
+
cursor.current = null;
|
|
10292
|
+
close();
|
|
10293
|
+
}, [close]);
|
|
10294
|
+
const handleFocus = React40.useCallback(() => {
|
|
10221
10295
|
if (disabled) return;
|
|
10296
|
+
cursor.current = null;
|
|
10222
10297
|
setVisible(true);
|
|
10223
10298
|
}, [disabled]);
|
|
10224
|
-
|
|
10225
|
-
|
|
10299
|
+
React40.useLayoutEffect(() => {
|
|
10300
|
+
if (!visible) return;
|
|
10301
|
+
reposition();
|
|
10302
|
+
}, [visible, reposition]);
|
|
10303
|
+
React40.useEffect(() => {
|
|
10304
|
+
if (!visible || follow) return;
|
|
10305
|
+
const onChange = () => placeAtTrigger();
|
|
10306
|
+
window.addEventListener("scroll", onChange, true);
|
|
10307
|
+
window.addEventListener("resize", onChange);
|
|
10308
|
+
return () => {
|
|
10309
|
+
window.removeEventListener("scroll", onChange, true);
|
|
10310
|
+
window.removeEventListener("resize", onChange);
|
|
10311
|
+
};
|
|
10312
|
+
}, [visible, follow, placeAtTrigger]);
|
|
10313
|
+
React40.useEffect(() => () => {
|
|
10314
|
+
window.clearTimeout(delayTimer.current);
|
|
10315
|
+
cancelAnimationFrame(rafRef.current);
|
|
10226
10316
|
}, []);
|
|
10227
|
-
|
|
10228
|
-
if (!visible || !triggerRef.current) return;
|
|
10229
|
-
const rect = triggerRef.current.getBoundingClientRect();
|
|
10230
|
-
calculatePos(rect.right, rect.top);
|
|
10231
|
-
}, [visible, calculatePos]);
|
|
10232
|
-
if (!title && !description) return /* @__PURE__ */ jsx350(Fragment5, { children });
|
|
10317
|
+
if (!title && !description) return /* @__PURE__ */ jsx351(Fragment5, { children });
|
|
10233
10318
|
return /* @__PURE__ */ jsxs222(
|
|
10234
10319
|
"div",
|
|
10235
10320
|
{
|
|
@@ -10238,20 +10323,21 @@ var Tooltip = (props) => {
|
|
|
10238
10323
|
onMouseEnter: handleMouseEnter,
|
|
10239
10324
|
onMouseMove: handleMouseMove,
|
|
10240
10325
|
onMouseLeave: handleMouseLeave,
|
|
10241
|
-
onClick:
|
|
10326
|
+
onClick: close,
|
|
10242
10327
|
onFocus: handleFocus,
|
|
10243
|
-
onBlur:
|
|
10328
|
+
onBlur: close,
|
|
10244
10329
|
children: [
|
|
10245
10330
|
children,
|
|
10246
|
-
visible && /* @__PURE__ */
|
|
10331
|
+
visible && /* @__PURE__ */ jsx351(Portal_default, { children: /* @__PURE__ */ jsxs222(
|
|
10247
10332
|
"div",
|
|
10248
10333
|
{
|
|
10249
10334
|
ref: tooltipRef,
|
|
10335
|
+
role: "tooltip",
|
|
10250
10336
|
className: clsx_default("lib-xplat-tooltip", type),
|
|
10251
10337
|
style: { position: "fixed", left: pos.left, top: pos.top },
|
|
10252
10338
|
children: [
|
|
10253
|
-
title && /* @__PURE__ */
|
|
10254
|
-
description && /* @__PURE__ */
|
|
10339
|
+
title && /* @__PURE__ */ jsx351("div", { className: "tooltip-title", children: title }),
|
|
10340
|
+
description && /* @__PURE__ */ jsx351("div", { className: "tooltip-desc", children: description })
|
|
10255
10341
|
]
|
|
10256
10342
|
}
|
|
10257
10343
|
) })
|
|
@@ -10263,11 +10349,11 @@ Tooltip.displayName = "Tooltip";
|
|
|
10263
10349
|
var Tooltip_default = Tooltip;
|
|
10264
10350
|
|
|
10265
10351
|
// src/components/Video/Video.tsx
|
|
10266
|
-
import
|
|
10267
|
-
import { jsx as
|
|
10352
|
+
import React41 from "react";
|
|
10353
|
+
import { jsx as jsx352, jsxs as jsxs223 } from "react/jsx-runtime";
|
|
10268
10354
|
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: [
|
|
10269
|
-
/* @__PURE__ */
|
|
10270
|
-
/* @__PURE__ */
|
|
10355
|
+
/* @__PURE__ */ jsx352("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
10356
|
+
/* @__PURE__ */ jsx352("rect", { x: "12", y: "11", width: "7", height: "6", rx: "1", fill: "currentColor" })
|
|
10271
10357
|
] });
|
|
10272
10358
|
var formatTime = (sec) => {
|
|
10273
10359
|
if (!Number.isFinite(sec) || sec < 0) return "0:00";
|
|
@@ -10275,7 +10361,7 @@ var formatTime = (sec) => {
|
|
|
10275
10361
|
const s = Math.floor(sec % 60);
|
|
10276
10362
|
return `${m}:${s.toString().padStart(2, "0")}`;
|
|
10277
10363
|
};
|
|
10278
|
-
var Video =
|
|
10364
|
+
var Video = React41.forwardRef((props, ref) => {
|
|
10279
10365
|
const {
|
|
10280
10366
|
src,
|
|
10281
10367
|
poster,
|
|
@@ -10299,21 +10385,21 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
10299
10385
|
children,
|
|
10300
10386
|
...rest
|
|
10301
10387
|
} = props;
|
|
10302
|
-
const containerRef =
|
|
10303
|
-
const videoRef =
|
|
10304
|
-
const [isPlaying, setIsPlaying] =
|
|
10305
|
-
const [isLoaded, setIsLoaded] =
|
|
10306
|
-
const [currentTime, setCurrentTime] =
|
|
10307
|
-
const [duration, setDuration] =
|
|
10308
|
-
const [buffered, setBuffered] =
|
|
10309
|
-
const [volume, setVolume] =
|
|
10310
|
-
const [isMuted, setIsMuted] =
|
|
10311
|
-
const [isFullscreen, setIsFullscreen] =
|
|
10312
|
-
const [playbackRate, setPlaybackRate] =
|
|
10313
|
-
const [rateMenuOpen, setRateMenuOpen] =
|
|
10314
|
-
const [captionsOn, setCaptionsOn] =
|
|
10315
|
-
const [isPip, setIsPip] =
|
|
10316
|
-
const setRefs =
|
|
10388
|
+
const containerRef = React41.useRef(null);
|
|
10389
|
+
const videoRef = React41.useRef(null);
|
|
10390
|
+
const [isPlaying, setIsPlaying] = React41.useState(Boolean(autoPlay));
|
|
10391
|
+
const [isLoaded, setIsLoaded] = React41.useState(false);
|
|
10392
|
+
const [currentTime, setCurrentTime] = React41.useState(0);
|
|
10393
|
+
const [duration, setDuration] = React41.useState(0);
|
|
10394
|
+
const [buffered, setBuffered] = React41.useState(0);
|
|
10395
|
+
const [volume, setVolume] = React41.useState(1);
|
|
10396
|
+
const [isMuted, setIsMuted] = React41.useState(Boolean(muted));
|
|
10397
|
+
const [isFullscreen, setIsFullscreen] = React41.useState(false);
|
|
10398
|
+
const [playbackRate, setPlaybackRate] = React41.useState(1);
|
|
10399
|
+
const [rateMenuOpen, setRateMenuOpen] = React41.useState(false);
|
|
10400
|
+
const [captionsOn, setCaptionsOn] = React41.useState(false);
|
|
10401
|
+
const [isPip, setIsPip] = React41.useState(false);
|
|
10402
|
+
const setRefs = React41.useCallback(
|
|
10317
10403
|
(el) => {
|
|
10318
10404
|
videoRef.current = el;
|
|
10319
10405
|
if (typeof ref === "function") ref(el);
|
|
@@ -10321,14 +10407,14 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
10321
10407
|
},
|
|
10322
10408
|
[ref]
|
|
10323
10409
|
);
|
|
10324
|
-
|
|
10410
|
+
React41.useEffect(() => {
|
|
10325
10411
|
const onFsChange = () => {
|
|
10326
10412
|
setIsFullscreen(document.fullscreenElement === containerRef.current);
|
|
10327
10413
|
};
|
|
10328
10414
|
document.addEventListener("fullscreenchange", onFsChange);
|
|
10329
10415
|
return () => document.removeEventListener("fullscreenchange", onFsChange);
|
|
10330
10416
|
}, []);
|
|
10331
|
-
|
|
10417
|
+
React41.useEffect(() => {
|
|
10332
10418
|
const v = videoRef.current;
|
|
10333
10419
|
if (!v) return;
|
|
10334
10420
|
const onEnter = () => setIsPip(true);
|
|
@@ -10448,7 +10534,7 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
10448
10534
|
ref: containerRef,
|
|
10449
10535
|
className: clsx_default("lib-xplat-video", showControls && "has-controls"),
|
|
10450
10536
|
children: [
|
|
10451
|
-
/* @__PURE__ */
|
|
10537
|
+
/* @__PURE__ */ jsx352(
|
|
10452
10538
|
"video",
|
|
10453
10539
|
{
|
|
10454
10540
|
ref: setRefs,
|
|
@@ -10469,7 +10555,7 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
10469
10555
|
children
|
|
10470
10556
|
}
|
|
10471
10557
|
),
|
|
10472
|
-
showCenterPlay && /* @__PURE__ */
|
|
10558
|
+
showCenterPlay && /* @__PURE__ */ jsx352(
|
|
10473
10559
|
"button",
|
|
10474
10560
|
{
|
|
10475
10561
|
type: "button",
|
|
@@ -10481,11 +10567,11 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
10481
10567
|
onClick: togglePlay,
|
|
10482
10568
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
10483
10569
|
tabIndex: -1,
|
|
10484
|
-
children: /* @__PURE__ */
|
|
10570
|
+
children: /* @__PURE__ */ jsx352("span", { className: "center-play-icon", children: /* @__PURE__ */ jsx352(PlayCircleIcon_default, {}) })
|
|
10485
10571
|
}
|
|
10486
10572
|
),
|
|
10487
10573
|
showControls && /* @__PURE__ */ jsxs223("div", { className: "controls", onClick: (e) => e.stopPropagation(), children: [
|
|
10488
|
-
/* @__PURE__ */
|
|
10574
|
+
/* @__PURE__ */ jsx352(
|
|
10489
10575
|
"input",
|
|
10490
10576
|
{
|
|
10491
10577
|
type: "range",
|
|
@@ -10503,28 +10589,28 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
10503
10589
|
}
|
|
10504
10590
|
),
|
|
10505
10591
|
/* @__PURE__ */ jsxs223("div", { className: "controls-row", children: [
|
|
10506
|
-
/* @__PURE__ */
|
|
10592
|
+
/* @__PURE__ */ jsx352(
|
|
10507
10593
|
"button",
|
|
10508
10594
|
{
|
|
10509
10595
|
type: "button",
|
|
10510
10596
|
className: "control-btn",
|
|
10511
10597
|
onClick: togglePlay,
|
|
10512
10598
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
10513
|
-
children: isPlaying ? /* @__PURE__ */
|
|
10599
|
+
children: isPlaying ? /* @__PURE__ */ jsx352(PauseIcon_default, {}) : /* @__PURE__ */ jsx352(PlayIcon_default, {})
|
|
10514
10600
|
}
|
|
10515
10601
|
),
|
|
10516
10602
|
/* @__PURE__ */ jsxs223("div", { className: "volume-group", children: [
|
|
10517
|
-
/* @__PURE__ */
|
|
10603
|
+
/* @__PURE__ */ jsx352(
|
|
10518
10604
|
"button",
|
|
10519
10605
|
{
|
|
10520
10606
|
type: "button",
|
|
10521
10607
|
className: "control-btn",
|
|
10522
10608
|
onClick: toggleMute,
|
|
10523
10609
|
"aria-label": isMuted ? "\uC74C\uC18C\uAC70 \uD574\uC81C" : "\uC74C\uC18C\uAC70",
|
|
10524
|
-
children: /* @__PURE__ */
|
|
10610
|
+
children: /* @__PURE__ */ jsx352(VolumeGlyph, {})
|
|
10525
10611
|
}
|
|
10526
10612
|
),
|
|
10527
|
-
/* @__PURE__ */
|
|
10613
|
+
/* @__PURE__ */ jsx352(
|
|
10528
10614
|
"input",
|
|
10529
10615
|
{
|
|
10530
10616
|
type: "range",
|
|
@@ -10544,7 +10630,7 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
10544
10630
|
" / ",
|
|
10545
10631
|
formatTime(duration)
|
|
10546
10632
|
] }),
|
|
10547
|
-
/* @__PURE__ */
|
|
10633
|
+
/* @__PURE__ */ jsx352("div", { className: "controls-spacer" }),
|
|
10548
10634
|
playbackRates && playbackRates.length > 0 && /* @__PURE__ */ jsxs223("div", { className: clsx_default("rate-group", rateMenuOpen && "is-open"), children: [
|
|
10549
10635
|
/* @__PURE__ */ jsxs223(
|
|
10550
10636
|
"button",
|
|
@@ -10560,7 +10646,7 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
10560
10646
|
]
|
|
10561
10647
|
}
|
|
10562
10648
|
),
|
|
10563
|
-
rateMenuOpen && /* @__PURE__ */
|
|
10649
|
+
rateMenuOpen && /* @__PURE__ */ jsx352("ul", { className: "rate-menu", role: "menu", children: playbackRates.map((r2) => /* @__PURE__ */ jsx352("li", { children: /* @__PURE__ */ jsxs223(
|
|
10564
10650
|
"button",
|
|
10565
10651
|
{
|
|
10566
10652
|
type: "button",
|
|
@@ -10574,7 +10660,7 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
10574
10660
|
}
|
|
10575
10661
|
) }, r2)) })
|
|
10576
10662
|
] }),
|
|
10577
|
-
showCaptions && /* @__PURE__ */
|
|
10663
|
+
showCaptions && /* @__PURE__ */ jsx352(
|
|
10578
10664
|
"button",
|
|
10579
10665
|
{
|
|
10580
10666
|
type: "button",
|
|
@@ -10582,37 +10668,37 @@ var Video = React42.forwardRef((props, ref) => {
|
|
|
10582
10668
|
onClick: toggleCaptions,
|
|
10583
10669
|
"aria-label": captionsOn ? "\uC790\uB9C9 \uB044\uAE30" : "\uC790\uB9C9 \uCF1C\uAE30",
|
|
10584
10670
|
"aria-pressed": captionsOn,
|
|
10585
|
-
children: /* @__PURE__ */
|
|
10671
|
+
children: /* @__PURE__ */ jsx352(TypeIcon_default, {})
|
|
10586
10672
|
}
|
|
10587
10673
|
),
|
|
10588
|
-
showPip && pipSupported && /* @__PURE__ */
|
|
10674
|
+
showPip && pipSupported && /* @__PURE__ */ jsx352(
|
|
10589
10675
|
"button",
|
|
10590
10676
|
{
|
|
10591
10677
|
type: "button",
|
|
10592
10678
|
className: clsx_default("control-btn", isPip && "is-active"),
|
|
10593
10679
|
onClick: togglePip,
|
|
10594
10680
|
"aria-label": isPip ? "PIP \uC885\uB8CC" : "PIP",
|
|
10595
|
-
children: /* @__PURE__ */
|
|
10681
|
+
children: /* @__PURE__ */ jsx352(PipIcon, {})
|
|
10596
10682
|
}
|
|
10597
10683
|
),
|
|
10598
|
-
showDownload && /* @__PURE__ */
|
|
10684
|
+
showDownload && /* @__PURE__ */ jsx352(
|
|
10599
10685
|
"a",
|
|
10600
10686
|
{
|
|
10601
10687
|
className: "control-btn",
|
|
10602
10688
|
href: src,
|
|
10603
10689
|
download: downloadFileName ?? true,
|
|
10604
10690
|
"aria-label": "\uB2E4\uC6B4\uB85C\uB4DC",
|
|
10605
|
-
children: /* @__PURE__ */
|
|
10691
|
+
children: /* @__PURE__ */ jsx352(DownloadIcon_default, {})
|
|
10606
10692
|
}
|
|
10607
10693
|
),
|
|
10608
|
-
/* @__PURE__ */
|
|
10694
|
+
/* @__PURE__ */ jsx352(
|
|
10609
10695
|
"button",
|
|
10610
10696
|
{
|
|
10611
10697
|
type: "button",
|
|
10612
10698
|
className: "control-btn",
|
|
10613
10699
|
onClick: toggleFullscreen,
|
|
10614
10700
|
"aria-label": isFullscreen ? "\uC804\uCCB4\uD654\uBA74 \uC885\uB8CC" : "\uC804\uCCB4\uD654\uBA74",
|
|
10615
|
-
children: isFullscreen ? /* @__PURE__ */
|
|
10701
|
+
children: isFullscreen ? /* @__PURE__ */ jsx352(MinimizeIcon_default, {}) : /* @__PURE__ */ jsx352(MaximizeIcon_default, {})
|
|
10616
10702
|
}
|
|
10617
10703
|
)
|
|
10618
10704
|
] })
|
|
@@ -10625,7 +10711,7 @@ Video.displayName = "Video";
|
|
|
10625
10711
|
var Video_default = Video;
|
|
10626
10712
|
|
|
10627
10713
|
// src/layout/Grid/FullGrid/FullGrid.tsx
|
|
10628
|
-
import { jsx as
|
|
10714
|
+
import { jsx as jsx353 } from "react/jsx-runtime";
|
|
10629
10715
|
var GAP_MAP = {
|
|
10630
10716
|
none: "var(--spacing-space-none)",
|
|
10631
10717
|
xs: "var(--spacing-space-1)",
|
|
@@ -10638,13 +10724,13 @@ var GAP_MAP = {
|
|
|
10638
10724
|
var FullGrid = (props) => {
|
|
10639
10725
|
const { children, gap } = props;
|
|
10640
10726
|
const style = gap != null ? { gap: GAP_MAP[gap] } : void 0;
|
|
10641
|
-
return /* @__PURE__ */
|
|
10727
|
+
return /* @__PURE__ */ jsx353("div", { className: "lib-xplat-full-grid", style, children });
|
|
10642
10728
|
};
|
|
10643
10729
|
FullGrid.displayName = "FullGrid";
|
|
10644
10730
|
var FullGrid_default = FullGrid;
|
|
10645
10731
|
|
|
10646
10732
|
// src/layout/Grid/FullScreen/FullScreen.tsx
|
|
10647
|
-
import { jsx as
|
|
10733
|
+
import { jsx as jsx354 } from "react/jsx-runtime";
|
|
10648
10734
|
var GAP_MAP2 = {
|
|
10649
10735
|
none: "var(--spacing-space-none)",
|
|
10650
10736
|
xs: "var(--spacing-space-1)",
|
|
@@ -10657,13 +10743,13 @@ var GAP_MAP2 = {
|
|
|
10657
10743
|
var FullScreen = (props) => {
|
|
10658
10744
|
const { children, gap } = props;
|
|
10659
10745
|
const style = gap != null ? { gap: GAP_MAP2[gap] } : void 0;
|
|
10660
|
-
return /* @__PURE__ */
|
|
10746
|
+
return /* @__PURE__ */ jsx354("div", { className: "lib-xplat-full-screen", style, children });
|
|
10661
10747
|
};
|
|
10662
10748
|
FullScreen.displayName = "FullScreen";
|
|
10663
10749
|
var FullScreen_default = FullScreen;
|
|
10664
10750
|
|
|
10665
10751
|
// src/layout/Grid/Item/Item.tsx
|
|
10666
|
-
import { jsx as
|
|
10752
|
+
import { jsx as jsx355 } from "react/jsx-runtime";
|
|
10667
10753
|
var calculateSpans = (column) => {
|
|
10668
10754
|
const spans = {};
|
|
10669
10755
|
let inherited = column.default;
|
|
@@ -10680,35 +10766,35 @@ var GridItem = ({ column, children, className }) => {
|
|
|
10680
10766
|
Object.entries(spans).forEach(([key, value]) => {
|
|
10681
10767
|
style[`--column-${key}`] = value;
|
|
10682
10768
|
});
|
|
10683
|
-
return /* @__PURE__ */
|
|
10769
|
+
return /* @__PURE__ */ jsx355("div", { className: clsx_default("lib-xplat-grid-item", className), style, children });
|
|
10684
10770
|
};
|
|
10685
10771
|
GridItem.displayName = "GridItem";
|
|
10686
10772
|
var Item_default = GridItem;
|
|
10687
10773
|
|
|
10688
10774
|
// src/layout/Header/Header.tsx
|
|
10689
|
-
import { jsx as
|
|
10775
|
+
import { jsx as jsx356, jsxs as jsxs224 } from "react/jsx-runtime";
|
|
10690
10776
|
var Header = ({
|
|
10691
10777
|
logo,
|
|
10692
10778
|
centerContent,
|
|
10693
10779
|
rightContent
|
|
10694
10780
|
}) => {
|
|
10695
10781
|
return /* @__PURE__ */ jsxs224("div", { className: "lib-xplat-layout-header", children: [
|
|
10696
|
-
/* @__PURE__ */
|
|
10697
|
-
/* @__PURE__ */
|
|
10698
|
-
/* @__PURE__ */
|
|
10782
|
+
/* @__PURE__ */ jsx356("div", { children: logo }),
|
|
10783
|
+
/* @__PURE__ */ jsx356("div", { children: centerContent }),
|
|
10784
|
+
/* @__PURE__ */ jsx356("div", { children: rightContent })
|
|
10699
10785
|
] });
|
|
10700
10786
|
};
|
|
10701
10787
|
Header.displayName = "Header";
|
|
10702
10788
|
var Header_default = Header;
|
|
10703
10789
|
|
|
10704
10790
|
// src/layout/Layout/Layout.tsx
|
|
10705
|
-
import { Fragment as Fragment6, jsx as
|
|
10791
|
+
import { Fragment as Fragment6, jsx as jsx357, jsxs as jsxs225 } from "react/jsx-runtime";
|
|
10706
10792
|
var Layout = (props) => {
|
|
10707
10793
|
const { header, sideBar, children } = props;
|
|
10708
|
-
return /* @__PURE__ */
|
|
10709
|
-
sideBar && /* @__PURE__ */
|
|
10794
|
+
return /* @__PURE__ */ jsx357("div", { className: "lib-xplat-layout", children: /* @__PURE__ */ jsxs225("div", { className: "lib-xplat-layout-content-wrapper", children: [
|
|
10795
|
+
sideBar && /* @__PURE__ */ jsx357(Fragment6, { children: sideBar }),
|
|
10710
10796
|
/* @__PURE__ */ jsxs225("div", { className: "lib-xplat-layout-content", children: [
|
|
10711
|
-
header && /* @__PURE__ */
|
|
10797
|
+
header && /* @__PURE__ */ jsx357("div", { className: "lib-xplat-layout-conent-header", children: header }),
|
|
10712
10798
|
children
|
|
10713
10799
|
] })
|
|
10714
10800
|
] }) });
|
|
@@ -10717,31 +10803,31 @@ Layout.displayName = "Layout";
|
|
|
10717
10803
|
var Layout_default = Layout;
|
|
10718
10804
|
|
|
10719
10805
|
// src/layout/SideBar/SideBar.tsx
|
|
10720
|
-
import
|
|
10806
|
+
import React43 from "react";
|
|
10721
10807
|
|
|
10722
10808
|
// src/layout/SideBar/SideBarContext.tsx
|
|
10723
|
-
import
|
|
10724
|
-
var SideBarContext =
|
|
10809
|
+
import React42 from "react";
|
|
10810
|
+
var SideBarContext = React42.createContext(null);
|
|
10725
10811
|
var useSideBarContext = () => {
|
|
10726
|
-
const ctx =
|
|
10812
|
+
const ctx = React42.useContext(SideBarContext);
|
|
10727
10813
|
if (!ctx) throw new Error("Error");
|
|
10728
10814
|
return ctx;
|
|
10729
10815
|
};
|
|
10730
10816
|
var SideBarContext_default = SideBarContext;
|
|
10731
10817
|
|
|
10732
10818
|
// src/layout/SideBar/SideBar.tsx
|
|
10733
|
-
import { jsx as
|
|
10819
|
+
import { jsx as jsx358 } from "react/jsx-runtime";
|
|
10734
10820
|
var SideBar = (props) => {
|
|
10735
10821
|
const { children, className } = props;
|
|
10736
|
-
const [isOpen, setIsOpen] =
|
|
10822
|
+
const [isOpen, setIsOpen] = React43.useState(true);
|
|
10737
10823
|
const handleSwitchSideBar = () => {
|
|
10738
10824
|
setIsOpen((prev) => !prev);
|
|
10739
10825
|
};
|
|
10740
|
-
return /* @__PURE__ */
|
|
10826
|
+
return /* @__PURE__ */ jsx358(
|
|
10741
10827
|
SideBarContext_default.Provider,
|
|
10742
10828
|
{
|
|
10743
10829
|
value: { isSidebarOpen: isOpen, handleSwitchSideBar },
|
|
10744
|
-
children: /* @__PURE__ */
|
|
10830
|
+
children: /* @__PURE__ */ jsx358(
|
|
10745
10831
|
"div",
|
|
10746
10832
|
{
|
|
10747
10833
|
className: clsx_default(
|
|
@@ -10944,7 +11030,9 @@ export {
|
|
|
10944
11030
|
Layout_default as Layout,
|
|
10945
11031
|
LayoutIcon_default as LayoutIcon,
|
|
10946
11032
|
LifeBuoyIcon_default as LifeBuoyIcon,
|
|
11033
|
+
Link_default as Link,
|
|
10947
11034
|
Link2Icon_default as Link2Icon,
|
|
11035
|
+
LinkButton_default as LinkButton,
|
|
10948
11036
|
LinkIcon_default as LinkIcon,
|
|
10949
11037
|
LinkedinIcon_default as LinkedinIcon,
|
|
10950
11038
|
ListIcon_default as ListIcon,
|