@x-plat/design-system 0.3.0 → 0.3.2
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/Swiper/index.cjs +257 -5939
- package/dist/components/Swiper/index.css +52 -211
- package/dist/components/Swiper/index.d.cts +35 -16
- package/dist/components/Swiper/index.d.ts +35 -16
- package/dist/components/Swiper/index.js +251 -5944
- package/dist/components/Table/index.cjs +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/index.cjs +356 -93
- package/dist/components/index.css +71 -0
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +356 -94
- package/dist/index.cjs +380 -117
- package/dist/index.css +71 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +380 -118
- package/package.json +3 -9
|
@@ -67,6 +67,7 @@ __export(components_exports, {
|
|
|
67
67
|
Skeleton: () => Skeleton_default,
|
|
68
68
|
Spinner: () => Spinner_default,
|
|
69
69
|
Steps: () => Steps_default,
|
|
70
|
+
Swiper: () => Swiper_default,
|
|
70
71
|
Switch: () => Switch_default,
|
|
71
72
|
Tab: () => Tab_default,
|
|
72
73
|
Table: () => Table_default,
|
|
@@ -28336,9 +28337,270 @@ var Steps = (props) => {
|
|
|
28336
28337
|
Steps.displayName = "Steps";
|
|
28337
28338
|
var Steps_default = Steps;
|
|
28338
28339
|
|
|
28339
|
-
// src/components/
|
|
28340
|
+
// src/components/Swiper/Swiper.tsx
|
|
28340
28341
|
var import_react29 = __toESM(require("react"), 1);
|
|
28341
28342
|
var import_jsx_runtime334 = require("react/jsx-runtime");
|
|
28343
|
+
var Swiper = (props) => {
|
|
28344
|
+
const {
|
|
28345
|
+
auto = false,
|
|
28346
|
+
swiperRef,
|
|
28347
|
+
renderItems = [],
|
|
28348
|
+
viewItemCount = 1,
|
|
28349
|
+
maxItems,
|
|
28350
|
+
loop = false,
|
|
28351
|
+
spaceBetween = 16,
|
|
28352
|
+
showProgress = false,
|
|
28353
|
+
autoplayDelay = 3e3,
|
|
28354
|
+
speed = 300,
|
|
28355
|
+
slideBy = 1,
|
|
28356
|
+
index: indexProp,
|
|
28357
|
+
onChange,
|
|
28358
|
+
className
|
|
28359
|
+
} = props;
|
|
28360
|
+
const items = maxItems ? renderItems.slice(0, maxItems) : renderItems;
|
|
28361
|
+
const totalSlides = items.length;
|
|
28362
|
+
const canSlide = totalSlides > viewItemCount;
|
|
28363
|
+
const maxIndex = Math.max(0, totalSlides - viewItemCount);
|
|
28364
|
+
const useLoop = loop && canSlide;
|
|
28365
|
+
const cloneCount = useLoop ? totalSlides : 0;
|
|
28366
|
+
const extendedItems = import_react29.default.useMemo(() => {
|
|
28367
|
+
if (!useLoop) return items;
|
|
28368
|
+
return [...items, ...items, ...items];
|
|
28369
|
+
}, [items, useLoop]);
|
|
28370
|
+
const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
|
|
28371
|
+
const [innerIndex, setInnerIndex] = import_react29.default.useState(
|
|
28372
|
+
useLoop ? cloneCount + initialIdx : initialIdx
|
|
28373
|
+
);
|
|
28374
|
+
const [isDragging, setIsDragging] = import_react29.default.useState(false);
|
|
28375
|
+
const [dragOffset, setDragOffset] = import_react29.default.useState(0);
|
|
28376
|
+
const [animated, setAnimated] = import_react29.default.useState(true);
|
|
28377
|
+
const [containerWidth, setContainerWidth] = import_react29.default.useState(0);
|
|
28378
|
+
const containerRef = import_react29.default.useRef(null);
|
|
28379
|
+
const startXRef = import_react29.default.useRef(0);
|
|
28380
|
+
const startTimeRef = import_react29.default.useRef(0);
|
|
28381
|
+
const autoplayTimerRef = import_react29.default.useRef(null);
|
|
28382
|
+
import_react29.default.useEffect(() => {
|
|
28383
|
+
const el = containerRef.current;
|
|
28384
|
+
if (!el) return;
|
|
28385
|
+
const ro = new ResizeObserver((entries) => {
|
|
28386
|
+
for (const entry of entries) {
|
|
28387
|
+
setContainerWidth(entry.contentRect.width);
|
|
28388
|
+
}
|
|
28389
|
+
});
|
|
28390
|
+
ro.observe(el);
|
|
28391
|
+
setContainerWidth(el.offsetWidth);
|
|
28392
|
+
return () => ro.disconnect();
|
|
28393
|
+
}, []);
|
|
28394
|
+
const slideStep = containerWidth > 0 ? (containerWidth - (viewItemCount - 1) * spaceBetween) / viewItemCount + spaceBetween : 0;
|
|
28395
|
+
const transformPx = -(innerIndex * slideStep) + dragOffset;
|
|
28396
|
+
const getRealIndex = (inner) => {
|
|
28397
|
+
if (!useLoop) return inner;
|
|
28398
|
+
return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
|
|
28399
|
+
};
|
|
28400
|
+
const realIndex = getRealIndex(innerIndex);
|
|
28401
|
+
const moveToInner = import_react29.default.useCallback(
|
|
28402
|
+
(idx, withAnim = true) => {
|
|
28403
|
+
if (useLoop) {
|
|
28404
|
+
setInnerIndex((prev) => {
|
|
28405
|
+
const real = ((prev - cloneCount) % totalSlides + totalSlides) % totalSlides;
|
|
28406
|
+
const canonical = cloneCount + real;
|
|
28407
|
+
if (prev !== canonical) {
|
|
28408
|
+
const delta = idx - prev;
|
|
28409
|
+
setAnimated(withAnim);
|
|
28410
|
+
return canonical + delta;
|
|
28411
|
+
}
|
|
28412
|
+
setAnimated(withAnim);
|
|
28413
|
+
return idx;
|
|
28414
|
+
});
|
|
28415
|
+
} else {
|
|
28416
|
+
setAnimated(withAnim);
|
|
28417
|
+
setInnerIndex(idx);
|
|
28418
|
+
}
|
|
28419
|
+
},
|
|
28420
|
+
[useLoop, cloneCount, totalSlides]
|
|
28421
|
+
);
|
|
28422
|
+
const handleTransitionEnd = import_react29.default.useCallback(() => {
|
|
28423
|
+
if (!useLoop) return;
|
|
28424
|
+
const real = getRealIndex(innerIndex);
|
|
28425
|
+
const canonical = cloneCount + real;
|
|
28426
|
+
if (innerIndex !== canonical) {
|
|
28427
|
+
moveToInner(canonical, false);
|
|
28428
|
+
}
|
|
28429
|
+
onChange?.(Math.min(real, maxIndex));
|
|
28430
|
+
}, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange, moveToInner]);
|
|
28431
|
+
const slideTo = import_react29.default.useCallback(
|
|
28432
|
+
(logicalIndex) => {
|
|
28433
|
+
if (!canSlide) return;
|
|
28434
|
+
const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
|
|
28435
|
+
const target = useLoop ? cloneCount + clamped : clamped;
|
|
28436
|
+
moveToInner(target, true);
|
|
28437
|
+
if (!useLoop) onChange?.(clamped);
|
|
28438
|
+
},
|
|
28439
|
+
[canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
|
|
28440
|
+
);
|
|
28441
|
+
const slideNext = import_react29.default.useCallback(() => {
|
|
28442
|
+
if (!canSlide) return;
|
|
28443
|
+
const nextInner = innerIndex + slideBy;
|
|
28444
|
+
if (useLoop) {
|
|
28445
|
+
moveToInner(nextInner, true);
|
|
28446
|
+
} else {
|
|
28447
|
+
moveToInner(Math.min(nextInner, maxIndex), true);
|
|
28448
|
+
}
|
|
28449
|
+
}, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
|
|
28450
|
+
const slidePrev = import_react29.default.useCallback(() => {
|
|
28451
|
+
if (!canSlide) return;
|
|
28452
|
+
const prevInner = innerIndex - slideBy;
|
|
28453
|
+
if (useLoop) {
|
|
28454
|
+
moveToInner(prevInner, true);
|
|
28455
|
+
} else {
|
|
28456
|
+
moveToInner(Math.max(prevInner, 0), true);
|
|
28457
|
+
}
|
|
28458
|
+
}, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
|
|
28459
|
+
import_react29.default.useEffect(() => {
|
|
28460
|
+
if (indexProp === void 0) return;
|
|
28461
|
+
const clamped = Math.max(0, Math.min(indexProp, maxIndex));
|
|
28462
|
+
const target = useLoop ? cloneCount + clamped : clamped;
|
|
28463
|
+
if (target !== innerIndex) {
|
|
28464
|
+
moveToInner(target, true);
|
|
28465
|
+
}
|
|
28466
|
+
}, [indexProp]);
|
|
28467
|
+
import_react29.default.useImperativeHandle(swiperRef, () => ({
|
|
28468
|
+
slidePrev,
|
|
28469
|
+
slideNext,
|
|
28470
|
+
slideTo
|
|
28471
|
+
}));
|
|
28472
|
+
import_react29.default.useEffect(() => {
|
|
28473
|
+
if (!auto || !canSlide) return;
|
|
28474
|
+
autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
|
|
28475
|
+
return () => {
|
|
28476
|
+
if (autoplayTimerRef.current) clearInterval(autoplayTimerRef.current);
|
|
28477
|
+
};
|
|
28478
|
+
}, [auto, autoplayDelay, slideNext, canSlide]);
|
|
28479
|
+
const pauseAutoplay = () => {
|
|
28480
|
+
if (autoplayTimerRef.current) clearInterval(autoplayTimerRef.current);
|
|
28481
|
+
};
|
|
28482
|
+
const getClientX = (e) => {
|
|
28483
|
+
if ("touches" in e) return e.touches[0]?.clientX ?? 0;
|
|
28484
|
+
return e.clientX;
|
|
28485
|
+
};
|
|
28486
|
+
const handleDragStart = (e) => {
|
|
28487
|
+
if (!canSlide) return;
|
|
28488
|
+
if ("button" in e && e.button !== 0) return;
|
|
28489
|
+
pauseAutoplay();
|
|
28490
|
+
setIsDragging(true);
|
|
28491
|
+
setAnimated(false);
|
|
28492
|
+
startXRef.current = getClientX(e);
|
|
28493
|
+
startTimeRef.current = Date.now();
|
|
28494
|
+
};
|
|
28495
|
+
import_react29.default.useEffect(() => {
|
|
28496
|
+
if (!isDragging) return;
|
|
28497
|
+
const handleMove = (e) => {
|
|
28498
|
+
setDragOffset(getClientX(e) - startXRef.current);
|
|
28499
|
+
};
|
|
28500
|
+
const handleEnd = () => {
|
|
28501
|
+
setIsDragging(false);
|
|
28502
|
+
const absDrag = Math.abs(dragOffset);
|
|
28503
|
+
const elapsed = Date.now() - startTimeRef.current;
|
|
28504
|
+
const velocity = absDrag / elapsed;
|
|
28505
|
+
if ((absDrag > 30 || velocity > 0.3) && slideStep > 0) {
|
|
28506
|
+
const rawCount = Math.max(1, Math.round(absDrag / slideStep));
|
|
28507
|
+
const count2 = Math.max(slideBy, Math.round(rawCount / slideBy) * slideBy);
|
|
28508
|
+
const direction = dragOffset < 0 ? 1 : -1;
|
|
28509
|
+
const nextInner = innerIndex + direction * count2;
|
|
28510
|
+
if (useLoop) {
|
|
28511
|
+
moveToInner(nextInner, true);
|
|
28512
|
+
} else {
|
|
28513
|
+
moveToInner(Math.max(0, Math.min(nextInner, maxIndex)), true);
|
|
28514
|
+
}
|
|
28515
|
+
} else {
|
|
28516
|
+
setAnimated(true);
|
|
28517
|
+
}
|
|
28518
|
+
setDragOffset(0);
|
|
28519
|
+
};
|
|
28520
|
+
window.addEventListener("mousemove", handleMove);
|
|
28521
|
+
window.addEventListener("mouseup", handleEnd);
|
|
28522
|
+
window.addEventListener("touchmove", handleMove, { passive: true });
|
|
28523
|
+
window.addEventListener("touchend", handleEnd);
|
|
28524
|
+
return () => {
|
|
28525
|
+
window.removeEventListener("mousemove", handleMove);
|
|
28526
|
+
window.removeEventListener("mouseup", handleEnd);
|
|
28527
|
+
window.removeEventListener("touchmove", handleMove);
|
|
28528
|
+
window.removeEventListener("touchend", handleEnd);
|
|
28529
|
+
};
|
|
28530
|
+
}, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
|
|
28531
|
+
const slideWidthPercent = 100 / viewItemCount;
|
|
28532
|
+
const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
|
|
28533
|
+
const totalSteps = Math.ceil((maxIndex + 1) / slideBy);
|
|
28534
|
+
const currentStep = Math.min(
|
|
28535
|
+
Math.floor(realIndex / slideBy),
|
|
28536
|
+
totalSteps - 1
|
|
28537
|
+
);
|
|
28538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)("div", { className: clsx_default("lib-xplat-swiper", className), ref: containerRef, children: [
|
|
28539
|
+
/* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
28540
|
+
"div",
|
|
28541
|
+
{
|
|
28542
|
+
className: "lib-xplat-swiper__viewport",
|
|
28543
|
+
onMouseDown: handleDragStart,
|
|
28544
|
+
onTouchStart: handleDragStart,
|
|
28545
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
28546
|
+
"div",
|
|
28547
|
+
{
|
|
28548
|
+
className: clsx_default(
|
|
28549
|
+
"lib-xplat-swiper__track",
|
|
28550
|
+
animated && !isDragging && "transitioning"
|
|
28551
|
+
),
|
|
28552
|
+
style: {
|
|
28553
|
+
transform: `translateX(${transformPx}px)`,
|
|
28554
|
+
transitionDuration: isDragging || !animated ? "0ms" : `${speed}ms`,
|
|
28555
|
+
gap: `${spaceBetween}px`
|
|
28556
|
+
},
|
|
28557
|
+
onTransitionEnd: handleTransitionEnd,
|
|
28558
|
+
children: extendedItems.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
28559
|
+
"div",
|
|
28560
|
+
{
|
|
28561
|
+
className: "lib-xplat-swiper__slide",
|
|
28562
|
+
style: {
|
|
28563
|
+
minWidth: `calc(${slideWidthPercent}% - ${gapAdjust}px)`,
|
|
28564
|
+
maxWidth: `calc(${slideWidthPercent}% - ${gapAdjust}px)`
|
|
28565
|
+
},
|
|
28566
|
+
children: item
|
|
28567
|
+
},
|
|
28568
|
+
idx
|
|
28569
|
+
))
|
|
28570
|
+
}
|
|
28571
|
+
)
|
|
28572
|
+
}
|
|
28573
|
+
),
|
|
28574
|
+
showProgress && canSlide && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "lib-xplat-swiper__progress", children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "lib-xplat-swiper__progress-track", children: /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
28575
|
+
"span",
|
|
28576
|
+
{
|
|
28577
|
+
className: "lib-xplat-swiper__progress-fill",
|
|
28578
|
+
style: {
|
|
28579
|
+
width: `${(currentStep + 1) / totalSteps * 100}%`,
|
|
28580
|
+
transitionDuration: `${speed}ms`
|
|
28581
|
+
}
|
|
28582
|
+
}
|
|
28583
|
+
) }) }),
|
|
28584
|
+
canSlide && /* @__PURE__ */ (0, import_jsx_runtime334.jsx)("div", { className: "lib-xplat-swiper__dots", children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
28585
|
+
"button",
|
|
28586
|
+
{
|
|
28587
|
+
className: clsx_default(
|
|
28588
|
+
"lib-xplat-swiper__dot",
|
|
28589
|
+
i === currentStep && "active"
|
|
28590
|
+
),
|
|
28591
|
+
onClick: () => slideTo(i * slideBy),
|
|
28592
|
+
"aria-label": `\uC2AC\uB77C\uC774\uB4DC ${i + 1}`
|
|
28593
|
+
},
|
|
28594
|
+
i
|
|
28595
|
+
)) })
|
|
28596
|
+
] });
|
|
28597
|
+
};
|
|
28598
|
+
Swiper.displayName = "Swiper";
|
|
28599
|
+
var Swiper_default = Swiper;
|
|
28600
|
+
|
|
28601
|
+
// src/components/Switch/Switch.tsx
|
|
28602
|
+
var import_react30 = __toESM(require("react"), 1);
|
|
28603
|
+
var import_jsx_runtime335 = require("react/jsx-runtime");
|
|
28342
28604
|
var KNOB_TRANSITION_MS = 250;
|
|
28343
28605
|
var Switch = (props) => {
|
|
28344
28606
|
const {
|
|
@@ -28349,9 +28611,9 @@ var Switch = (props) => {
|
|
|
28349
28611
|
color: color2 = "xplat-blue-500",
|
|
28350
28612
|
className
|
|
28351
28613
|
} = props;
|
|
28352
|
-
const [isAnimating, setIsAnimating] =
|
|
28353
|
-
const timeoutRef =
|
|
28354
|
-
|
|
28614
|
+
const [isAnimating, setIsAnimating] = import_react30.default.useState(false);
|
|
28615
|
+
const timeoutRef = import_react30.default.useRef(null);
|
|
28616
|
+
import_react30.default.useEffect(() => {
|
|
28355
28617
|
return () => {
|
|
28356
28618
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
28357
28619
|
};
|
|
@@ -28367,7 +28629,7 @@ var Switch = (props) => {
|
|
|
28367
28629
|
}, KNOB_TRANSITION_MS);
|
|
28368
28630
|
};
|
|
28369
28631
|
const colorClass = color2;
|
|
28370
|
-
return /* @__PURE__ */ (0,
|
|
28632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime335.jsx)(
|
|
28371
28633
|
"div",
|
|
28372
28634
|
{
|
|
28373
28635
|
className: clsx_default(
|
|
@@ -28381,7 +28643,7 @@ var Switch = (props) => {
|
|
|
28381
28643
|
),
|
|
28382
28644
|
onClick: handleClick,
|
|
28383
28645
|
"aria-disabled": disabled || isAnimating,
|
|
28384
|
-
children: /* @__PURE__ */ (0,
|
|
28646
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime335.jsx)("div", { className: clsx_default("knob", value ? "checked" : void 0) })
|
|
28385
28647
|
}
|
|
28386
28648
|
);
|
|
28387
28649
|
};
|
|
@@ -28389,14 +28651,14 @@ Switch.displayName = "Switch";
|
|
|
28389
28651
|
var Switch_default = Switch;
|
|
28390
28652
|
|
|
28391
28653
|
// src/components/Tab/Tab.tsx
|
|
28392
|
-
var
|
|
28654
|
+
var import_react32 = __toESM(require("react"), 1);
|
|
28393
28655
|
|
|
28394
28656
|
// src/components/Tab/TabItem.tsx
|
|
28395
|
-
var
|
|
28396
|
-
var
|
|
28397
|
-
var TabItem =
|
|
28657
|
+
var import_react31 = __toESM(require("react"), 1);
|
|
28658
|
+
var import_jsx_runtime336 = require("react/jsx-runtime");
|
|
28659
|
+
var TabItem = import_react31.default.forwardRef((props, ref) => {
|
|
28398
28660
|
const { isActive, title, onClick } = props;
|
|
28399
|
-
return /* @__PURE__ */ (0,
|
|
28661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
|
|
28400
28662
|
"div",
|
|
28401
28663
|
{
|
|
28402
28664
|
ref,
|
|
@@ -28410,25 +28672,25 @@ TabItem.displayName = "TabItem";
|
|
|
28410
28672
|
var TabItem_default = TabItem;
|
|
28411
28673
|
|
|
28412
28674
|
// src/components/Tab/Tab.tsx
|
|
28413
|
-
var
|
|
28675
|
+
var import_jsx_runtime337 = require("react/jsx-runtime");
|
|
28414
28676
|
var Tab = (props) => {
|
|
28415
28677
|
const { activeIndex, onChange, tabs, type, size: size4 = "md" } = props;
|
|
28416
|
-
const [underlineStyle, setUnderlineStyle] =
|
|
28678
|
+
const [underlineStyle, setUnderlineStyle] = import_react32.default.useState({
|
|
28417
28679
|
left: 0,
|
|
28418
28680
|
width: 0
|
|
28419
28681
|
});
|
|
28420
|
-
const itemRefs =
|
|
28682
|
+
const itemRefs = import_react32.default.useRef([]);
|
|
28421
28683
|
const handleChangeActiveTab = (tabItem, tabIdx) => {
|
|
28422
28684
|
onChange(tabItem, tabIdx);
|
|
28423
28685
|
};
|
|
28424
|
-
|
|
28686
|
+
import_react32.default.useEffect(() => {
|
|
28425
28687
|
const el = itemRefs.current[activeIndex];
|
|
28426
28688
|
if (el) {
|
|
28427
28689
|
setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
|
|
28428
28690
|
}
|
|
28429
28691
|
}, [activeIndex, tabs.length]);
|
|
28430
|
-
return /* @__PURE__ */ (0,
|
|
28431
|
-
tabs.map((tab, idx) => /* @__PURE__ */ (0,
|
|
28692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size4), children: [
|
|
28693
|
+
tabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
|
|
28432
28694
|
TabItem_default,
|
|
28433
28695
|
{
|
|
28434
28696
|
onClick: () => handleChangeActiveTab(tab, idx),
|
|
@@ -28440,7 +28702,7 @@ var Tab = (props) => {
|
|
|
28440
28702
|
},
|
|
28441
28703
|
`${tab.value}_${idx}`
|
|
28442
28704
|
)),
|
|
28443
|
-
type === "toggle" && /* @__PURE__ */ (0,
|
|
28705
|
+
type === "toggle" && /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(
|
|
28444
28706
|
"div",
|
|
28445
28707
|
{
|
|
28446
28708
|
className: "tab-toggle-underline",
|
|
@@ -28456,17 +28718,17 @@ Tab.displayName = "Tab";
|
|
|
28456
28718
|
var Tab_default = Tab;
|
|
28457
28719
|
|
|
28458
28720
|
// src/components/Table/TableContext.tsx
|
|
28459
|
-
var
|
|
28460
|
-
var TableContext =
|
|
28721
|
+
var import_react33 = __toESM(require("react"), 1);
|
|
28722
|
+
var TableContext = import_react33.default.createContext(null);
|
|
28461
28723
|
var useTableContext = () => {
|
|
28462
|
-
const ctx =
|
|
28724
|
+
const ctx = import_react33.default.useContext(TableContext);
|
|
28463
28725
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
28464
28726
|
return ctx;
|
|
28465
28727
|
};
|
|
28466
28728
|
var TableContext_default = TableContext;
|
|
28467
28729
|
|
|
28468
28730
|
// src/components/Table/Table.tsx
|
|
28469
|
-
var
|
|
28731
|
+
var import_jsx_runtime338 = require("react/jsx-runtime");
|
|
28470
28732
|
var Table = (props) => {
|
|
28471
28733
|
const {
|
|
28472
28734
|
className,
|
|
@@ -28476,7 +28738,7 @@ var Table = (props) => {
|
|
|
28476
28738
|
headerSticky = false,
|
|
28477
28739
|
stickyShadow = true
|
|
28478
28740
|
} = props;
|
|
28479
|
-
return /* @__PURE__ */ (0,
|
|
28741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime338.jsx)("div", { className: clsx_default("lib-xplat-table-wrapper", className), children: /* @__PURE__ */ (0, import_jsx_runtime338.jsx)(
|
|
28480
28742
|
TableContext_default.Provider,
|
|
28481
28743
|
{
|
|
28482
28744
|
value: {
|
|
@@ -28485,7 +28747,7 @@ var Table = (props) => {
|
|
|
28485
28747
|
headerSticky,
|
|
28486
28748
|
stickyShadow
|
|
28487
28749
|
},
|
|
28488
|
-
children: /* @__PURE__ */ (0,
|
|
28750
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime338.jsx)("table", { className: "lib-xplat-table", children })
|
|
28489
28751
|
}
|
|
28490
28752
|
) });
|
|
28491
28753
|
};
|
|
@@ -28493,40 +28755,40 @@ Table.displayName = "Table";
|
|
|
28493
28755
|
var Table_default = Table;
|
|
28494
28756
|
|
|
28495
28757
|
// src/components/Table/TableBody.tsx
|
|
28496
|
-
var
|
|
28758
|
+
var import_jsx_runtime339 = require("react/jsx-runtime");
|
|
28497
28759
|
var TableBody = (props) => {
|
|
28498
28760
|
const { children, className } = props;
|
|
28499
|
-
return /* @__PURE__ */ (0,
|
|
28761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime339.jsx)("tbody", { className, children });
|
|
28500
28762
|
};
|
|
28501
28763
|
TableBody.displayName = "TableBody";
|
|
28502
28764
|
var TableBody_default = TableBody;
|
|
28503
28765
|
|
|
28504
28766
|
// src/components/Table/TableCell.tsx
|
|
28505
|
-
var
|
|
28767
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
28506
28768
|
|
|
28507
28769
|
// src/components/Table/TableHeadContext.tsx
|
|
28508
|
-
var
|
|
28509
|
-
var TableHeadContext =
|
|
28770
|
+
var import_react34 = __toESM(require("react"), 1);
|
|
28771
|
+
var TableHeadContext = import_react34.default.createContext(
|
|
28510
28772
|
null
|
|
28511
28773
|
);
|
|
28512
28774
|
var useTableHeadContext = () => {
|
|
28513
|
-
const ctx =
|
|
28775
|
+
const ctx = import_react34.default.useContext(TableHeadContext);
|
|
28514
28776
|
return ctx;
|
|
28515
28777
|
};
|
|
28516
28778
|
var TableHeadContext_default = TableHeadContext;
|
|
28517
28779
|
|
|
28518
28780
|
// src/components/Table/TableRowContext.tsx
|
|
28519
|
-
var
|
|
28520
|
-
var TableRowContext =
|
|
28781
|
+
var import_react35 = __toESM(require("react"), 1);
|
|
28782
|
+
var TableRowContext = import_react35.default.createContext(null);
|
|
28521
28783
|
var useTableRowContext = () => {
|
|
28522
|
-
const ctx =
|
|
28784
|
+
const ctx = import_react35.default.useContext(TableRowContext);
|
|
28523
28785
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
28524
28786
|
return ctx;
|
|
28525
28787
|
};
|
|
28526
28788
|
var TableRowContext_default = TableRowContext;
|
|
28527
28789
|
|
|
28528
28790
|
// src/components/Table/TableCell.tsx
|
|
28529
|
-
var
|
|
28791
|
+
var import_jsx_runtime340 = require("react/jsx-runtime");
|
|
28530
28792
|
var TableCell = (props) => {
|
|
28531
28793
|
const {
|
|
28532
28794
|
children,
|
|
@@ -28538,9 +28800,9 @@ var TableCell = (props) => {
|
|
|
28538
28800
|
const { registerStickyCell, stickyCells } = useTableRowContext();
|
|
28539
28801
|
const { stickyShadow } = useTableContext();
|
|
28540
28802
|
const headContext = useTableHeadContext();
|
|
28541
|
-
const [left, setLeft] =
|
|
28542
|
-
const cellRef =
|
|
28543
|
-
const calculateLeft =
|
|
28803
|
+
const [left, setLeft] = import_react36.default.useState(0);
|
|
28804
|
+
const cellRef = import_react36.default.useRef(null);
|
|
28805
|
+
const calculateLeft = import_react36.default.useCallback(() => {
|
|
28544
28806
|
if (!cellRef.current) return 0;
|
|
28545
28807
|
let totalLeft = 0;
|
|
28546
28808
|
for (const ref of stickyCells) {
|
|
@@ -28549,7 +28811,7 @@ var TableCell = (props) => {
|
|
|
28549
28811
|
}
|
|
28550
28812
|
return totalLeft;
|
|
28551
28813
|
}, [stickyCells]);
|
|
28552
|
-
|
|
28814
|
+
import_react36.default.useEffect(() => {
|
|
28553
28815
|
if (!isSticky || !cellRef.current) return;
|
|
28554
28816
|
registerStickyCell(cellRef);
|
|
28555
28817
|
setLeft(calculateLeft());
|
|
@@ -28567,7 +28829,7 @@ var TableCell = (props) => {
|
|
|
28567
28829
|
const CellTag = cellRef.current?.tagName === "TH" ? "th" : "td";
|
|
28568
28830
|
const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
|
|
28569
28831
|
const enableHover = headContext && headContext.cellHover;
|
|
28570
|
-
return /* @__PURE__ */ (0,
|
|
28832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(
|
|
28571
28833
|
CellTag,
|
|
28572
28834
|
{
|
|
28573
28835
|
ref: cellRef,
|
|
@@ -28589,32 +28851,32 @@ TableCell.displayName = "TableCell";
|
|
|
28589
28851
|
var TableCell_default = TableCell;
|
|
28590
28852
|
|
|
28591
28853
|
// src/components/Table/TableHead.tsx
|
|
28592
|
-
var
|
|
28854
|
+
var import_jsx_runtime341 = require("react/jsx-runtime");
|
|
28593
28855
|
var TableHead = ({
|
|
28594
28856
|
children,
|
|
28595
28857
|
className = "",
|
|
28596
28858
|
cellHover = false
|
|
28597
28859
|
}) => {
|
|
28598
28860
|
const { headerSticky } = useTableContext();
|
|
28599
|
-
return /* @__PURE__ */ (0,
|
|
28861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ (0, import_jsx_runtime341.jsx)("thead", { className: clsx_default(headerSticky ? "table-sticky" : null, className), children }) });
|
|
28600
28862
|
};
|
|
28601
28863
|
TableHead.displayName = "TableHead";
|
|
28602
28864
|
var TableHead_default = TableHead;
|
|
28603
28865
|
|
|
28604
28866
|
// src/components/Table/TableRow.tsx
|
|
28605
|
-
var
|
|
28606
|
-
var
|
|
28867
|
+
var import_react37 = __toESM(require("react"), 1);
|
|
28868
|
+
var import_jsx_runtime342 = require("react/jsx-runtime");
|
|
28607
28869
|
var TableRow = (props) => {
|
|
28608
28870
|
const {
|
|
28609
28871
|
children,
|
|
28610
28872
|
className,
|
|
28611
|
-
color: color2 = "xplat-
|
|
28873
|
+
color: color2 = "xplat-neutral-900",
|
|
28612
28874
|
type = "secondary",
|
|
28613
28875
|
isHover,
|
|
28614
28876
|
onClick
|
|
28615
28877
|
} = props;
|
|
28616
28878
|
const { rowBorderUse } = useTableContext();
|
|
28617
|
-
const [stickyCells, setStickyCells] =
|
|
28879
|
+
const [stickyCells, setStickyCells] = import_react37.default.useState([]);
|
|
28618
28880
|
const registerStickyCell = (ref) => {
|
|
28619
28881
|
setStickyCells((prev) => {
|
|
28620
28882
|
if (prev.includes(ref)) return prev;
|
|
@@ -28622,7 +28884,7 @@ var TableRow = (props) => {
|
|
|
28622
28884
|
});
|
|
28623
28885
|
};
|
|
28624
28886
|
const colorClass = color2;
|
|
28625
|
-
return /* @__PURE__ */ (0,
|
|
28887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
|
|
28626
28888
|
"tr",
|
|
28627
28889
|
{
|
|
28628
28890
|
className: clsx_default(
|
|
@@ -28642,7 +28904,7 @@ TableRow.displayName = "TableRow";
|
|
|
28642
28904
|
var TableRow_default = TableRow;
|
|
28643
28905
|
|
|
28644
28906
|
// src/components/Tag/Tag.tsx
|
|
28645
|
-
var
|
|
28907
|
+
var import_jsx_runtime343 = require("react/jsx-runtime");
|
|
28646
28908
|
var Tag = (props) => {
|
|
28647
28909
|
const {
|
|
28648
28910
|
children,
|
|
@@ -28652,21 +28914,21 @@ var Tag = (props) => {
|
|
|
28652
28914
|
className
|
|
28653
28915
|
} = props;
|
|
28654
28916
|
const colorClass = color2;
|
|
28655
|
-
return /* @__PURE__ */ (0,
|
|
28656
|
-
/* @__PURE__ */ (0,
|
|
28657
|
-
onClose && /* @__PURE__ */ (0,
|
|
28917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime343.jsxs)("span", { className: clsx_default("lib-xplat-tag", size4, colorClass, className), children: [
|
|
28918
|
+
/* @__PURE__ */ (0, import_jsx_runtime343.jsx)("span", { className: "tag-label", children }),
|
|
28919
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime343.jsx)("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", children: /* @__PURE__ */ (0, import_jsx_runtime343.jsx)(XIcon_default, {}) })
|
|
28658
28920
|
] });
|
|
28659
28921
|
};
|
|
28660
28922
|
Tag.displayName = "Tag";
|
|
28661
28923
|
var Tag_default = Tag;
|
|
28662
28924
|
|
|
28663
28925
|
// src/components/TextArea/TextArea.tsx
|
|
28664
|
-
var
|
|
28665
|
-
var
|
|
28666
|
-
var TextArea =
|
|
28926
|
+
var import_react38 = __toESM(require("react"), 1);
|
|
28927
|
+
var import_jsx_runtime344 = require("react/jsx-runtime");
|
|
28928
|
+
var TextArea = import_react38.default.forwardRef(
|
|
28667
28929
|
(props, ref) => {
|
|
28668
28930
|
const { value, onChange, className, disabled, ...textareaProps } = props;
|
|
28669
|
-
const localRef =
|
|
28931
|
+
const localRef = import_react38.default.useRef(null);
|
|
28670
28932
|
const setRefs = (el) => {
|
|
28671
28933
|
localRef.current = el;
|
|
28672
28934
|
if (!ref) return;
|
|
@@ -28686,21 +28948,21 @@ var TextArea = import_react37.default.forwardRef(
|
|
|
28686
28948
|
onChange(event);
|
|
28687
28949
|
}
|
|
28688
28950
|
};
|
|
28689
|
-
|
|
28951
|
+
import_react38.default.useEffect(() => {
|
|
28690
28952
|
const el = localRef.current;
|
|
28691
28953
|
if (!el) return;
|
|
28692
28954
|
el.style.height = "0px";
|
|
28693
28955
|
const nextHeight = Math.min(el.scrollHeight, 400);
|
|
28694
28956
|
el.style.height = `${nextHeight}px`;
|
|
28695
28957
|
}, [value]);
|
|
28696
|
-
return /* @__PURE__ */ (0,
|
|
28958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime344.jsx)("div", { className: clsx_default("lib-xplat-textarea-wrapper", className), children: /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
|
|
28697
28959
|
"div",
|
|
28698
28960
|
{
|
|
28699
28961
|
className: clsx_default(
|
|
28700
28962
|
"lib-xplat-textarea",
|
|
28701
28963
|
disabled ? "disabled" : void 0
|
|
28702
28964
|
),
|
|
28703
|
-
children: /* @__PURE__ */ (0,
|
|
28965
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime344.jsx)(
|
|
28704
28966
|
"textarea",
|
|
28705
28967
|
{
|
|
28706
28968
|
...textareaProps,
|
|
@@ -28718,25 +28980,25 @@ TextArea.displayName = "TextArea";
|
|
|
28718
28980
|
var TextArea_default = TextArea;
|
|
28719
28981
|
|
|
28720
28982
|
// src/components/Toast/Toast.tsx
|
|
28721
|
-
var
|
|
28983
|
+
var import_react39 = __toESM(require("react"), 1);
|
|
28722
28984
|
var import_react_dom6 = require("react-dom");
|
|
28723
|
-
var
|
|
28724
|
-
var ToastContext =
|
|
28985
|
+
var import_jsx_runtime345 = require("react/jsx-runtime");
|
|
28986
|
+
var ToastContext = import_react39.default.createContext(null);
|
|
28725
28987
|
var useToast = () => {
|
|
28726
|
-
const ctx =
|
|
28988
|
+
const ctx = import_react39.default.useContext(ToastContext);
|
|
28727
28989
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
28728
28990
|
return ctx;
|
|
28729
28991
|
};
|
|
28730
28992
|
var EXIT_DURATION = 300;
|
|
28731
28993
|
var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
28732
|
-
const ref =
|
|
28733
|
-
const [height, setHeight] =
|
|
28734
|
-
|
|
28994
|
+
const ref = import_react39.default.useRef(null);
|
|
28995
|
+
const [height, setHeight] = import_react39.default.useState(void 0);
|
|
28996
|
+
import_react39.default.useEffect(() => {
|
|
28735
28997
|
if (ref.current && !isExiting) {
|
|
28736
28998
|
setHeight(ref.current.offsetHeight);
|
|
28737
28999
|
}
|
|
28738
29000
|
}, [isExiting]);
|
|
28739
|
-
return /* @__PURE__ */ (0,
|
|
29001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
|
|
28740
29002
|
"div",
|
|
28741
29003
|
{
|
|
28742
29004
|
className: clsx_default("lib-xplat-toast-wrapper", { exit: isExiting }),
|
|
@@ -28744,15 +29006,15 @@ var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
|
28744
29006
|
maxHeight: isExiting ? 0 : height ?? "none",
|
|
28745
29007
|
marginBottom: isExiting ? 0 : void 0
|
|
28746
29008
|
},
|
|
28747
|
-
children: /* @__PURE__ */ (0,
|
|
29009
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime345.jsxs)(
|
|
28748
29010
|
"div",
|
|
28749
29011
|
{
|
|
28750
29012
|
ref,
|
|
28751
29013
|
className: clsx_default("lib-xplat-toast", item.type, { exit: isExiting }),
|
|
28752
29014
|
role: "alert",
|
|
28753
29015
|
children: [
|
|
28754
|
-
/* @__PURE__ */ (0,
|
|
28755
|
-
/* @__PURE__ */ (0,
|
|
29016
|
+
/* @__PURE__ */ (0, import_jsx_runtime345.jsx)("span", { className: "message", children: item.message }),
|
|
29017
|
+
/* @__PURE__ */ (0, import_jsx_runtime345.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
28756
29018
|
]
|
|
28757
29019
|
}
|
|
28758
29020
|
)
|
|
@@ -28763,13 +29025,13 @@ var ToastProvider = ({
|
|
|
28763
29025
|
children,
|
|
28764
29026
|
position = "top-right"
|
|
28765
29027
|
}) => {
|
|
28766
|
-
const [toasts, setToasts] =
|
|
28767
|
-
const [removing, setRemoving] =
|
|
28768
|
-
const [mounted, setMounted] =
|
|
28769
|
-
|
|
29028
|
+
const [toasts, setToasts] = import_react39.default.useState([]);
|
|
29029
|
+
const [removing, setRemoving] = import_react39.default.useState(/* @__PURE__ */ new Set());
|
|
29030
|
+
const [mounted, setMounted] = import_react39.default.useState(false);
|
|
29031
|
+
import_react39.default.useEffect(() => {
|
|
28770
29032
|
setMounted(true);
|
|
28771
29033
|
}, []);
|
|
28772
|
-
const remove =
|
|
29034
|
+
const remove = import_react39.default.useCallback((id) => {
|
|
28773
29035
|
setRemoving((prev) => new Set(prev).add(id));
|
|
28774
29036
|
setTimeout(() => {
|
|
28775
29037
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
@@ -28780,7 +29042,7 @@ var ToastProvider = ({
|
|
|
28780
29042
|
});
|
|
28781
29043
|
}, EXIT_DURATION);
|
|
28782
29044
|
}, []);
|
|
28783
|
-
const toast =
|
|
29045
|
+
const toast = import_react39.default.useCallback(
|
|
28784
29046
|
(type, message2, duration = 3e3) => {
|
|
28785
29047
|
const id = `${Date.now()}-${Math.random()}`;
|
|
28786
29048
|
setToasts((prev) => [...prev, { id, type, message: message2 }]);
|
|
@@ -28790,10 +29052,10 @@ var ToastProvider = ({
|
|
|
28790
29052
|
},
|
|
28791
29053
|
[remove]
|
|
28792
29054
|
);
|
|
28793
|
-
return /* @__PURE__ */ (0,
|
|
29055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime345.jsxs)(ToastContext.Provider, { value: { toast }, children: [
|
|
28794
29056
|
children,
|
|
28795
29057
|
mounted && (0, import_react_dom6.createPortal)(
|
|
28796
|
-
/* @__PURE__ */ (0,
|
|
29058
|
+
/* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { className: clsx_default("lib-xplat-toast-container", position), children: toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
|
|
28797
29059
|
ToastItemComponent,
|
|
28798
29060
|
{
|
|
28799
29061
|
item: t,
|
|
@@ -28809,8 +29071,8 @@ var ToastProvider = ({
|
|
|
28809
29071
|
ToastProvider.displayName = "ToastProvider";
|
|
28810
29072
|
|
|
28811
29073
|
// src/components/Tooltip/Tooltip.tsx
|
|
28812
|
-
var
|
|
28813
|
-
var
|
|
29074
|
+
var import_react40 = __toESM(require("react"), 1);
|
|
29075
|
+
var import_jsx_runtime346 = require("react/jsx-runtime");
|
|
28814
29076
|
var Tooltip2 = (props) => {
|
|
28815
29077
|
const {
|
|
28816
29078
|
type = "primary",
|
|
@@ -28818,20 +29080,20 @@ var Tooltip2 = (props) => {
|
|
|
28818
29080
|
description,
|
|
28819
29081
|
children
|
|
28820
29082
|
} = props;
|
|
28821
|
-
const iconRef =
|
|
29083
|
+
const iconRef = import_react40.default.useRef(null);
|
|
28822
29084
|
const colorClass = color2;
|
|
28823
|
-
return /* @__PURE__ */ (0,
|
|
28824
|
-
/* @__PURE__ */ (0,
|
|
28825
|
-
/* @__PURE__ */ (0,
|
|
29085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)("div", { className: "lib-xplat-tooltip", children: [
|
|
29086
|
+
/* @__PURE__ */ (0, import_jsx_runtime346.jsx)("div", { className: "tooltip-content", ref: iconRef, children: children || "Tooltip" }),
|
|
29087
|
+
/* @__PURE__ */ (0, import_jsx_runtime346.jsx)("div", { className: clsx_default("tooltip-wrapper", colorClass, type), children: description })
|
|
28826
29088
|
] });
|
|
28827
29089
|
};
|
|
28828
29090
|
Tooltip2.displayName = "Tooltip";
|
|
28829
29091
|
var Tooltip_default = Tooltip2;
|
|
28830
29092
|
|
|
28831
29093
|
// src/components/Video/Video.tsx
|
|
28832
|
-
var
|
|
28833
|
-
var
|
|
28834
|
-
var Video =
|
|
29094
|
+
var import_react41 = __toESM(require("react"), 1);
|
|
29095
|
+
var import_jsx_runtime347 = require("react/jsx-runtime");
|
|
29096
|
+
var Video = import_react41.default.forwardRef((props, ref) => {
|
|
28835
29097
|
const {
|
|
28836
29098
|
src,
|
|
28837
29099
|
poster,
|
|
@@ -28845,10 +29107,10 @@ var Video = import_react40.default.forwardRef((props, ref) => {
|
|
|
28845
29107
|
onPause,
|
|
28846
29108
|
...rest
|
|
28847
29109
|
} = props;
|
|
28848
|
-
const videoRef =
|
|
28849
|
-
const [isPlaying, setIsPlaying] =
|
|
28850
|
-
const [isLoaded, setIsLoaded] =
|
|
28851
|
-
const setRefs =
|
|
29110
|
+
const videoRef = import_react41.default.useRef(null);
|
|
29111
|
+
const [isPlaying, setIsPlaying] = import_react41.default.useState(Boolean(autoPlay));
|
|
29112
|
+
const [isLoaded, setIsLoaded] = import_react41.default.useState(false);
|
|
29113
|
+
const setRefs = import_react41.default.useCallback(
|
|
28852
29114
|
(el) => {
|
|
28853
29115
|
videoRef.current = el;
|
|
28854
29116
|
if (typeof ref === "function") ref(el);
|
|
@@ -28876,7 +29138,7 @@ var Video = import_react40.default.forwardRef((props, ref) => {
|
|
|
28876
29138
|
}
|
|
28877
29139
|
};
|
|
28878
29140
|
const showCustomOverlay = !controls;
|
|
28879
|
-
return /* @__PURE__ */ (0,
|
|
29141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime347.jsxs)(
|
|
28880
29142
|
"div",
|
|
28881
29143
|
{
|
|
28882
29144
|
className: clsx_default(
|
|
@@ -28885,7 +29147,7 @@ var Video = import_react40.default.forwardRef((props, ref) => {
|
|
|
28885
29147
|
className
|
|
28886
29148
|
),
|
|
28887
29149
|
children: [
|
|
28888
|
-
/* @__PURE__ */ (0,
|
|
29150
|
+
/* @__PURE__ */ (0, import_jsx_runtime347.jsx)(
|
|
28889
29151
|
"video",
|
|
28890
29152
|
{
|
|
28891
29153
|
ref: setRefs,
|
|
@@ -28902,7 +29164,7 @@ var Video = import_react40.default.forwardRef((props, ref) => {
|
|
|
28902
29164
|
...rest
|
|
28903
29165
|
}
|
|
28904
29166
|
),
|
|
28905
|
-
showCustomOverlay && /* @__PURE__ */ (0,
|
|
29167
|
+
showCustomOverlay && /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(
|
|
28906
29168
|
"button",
|
|
28907
29169
|
{
|
|
28908
29170
|
type: "button",
|
|
@@ -28913,7 +29175,7 @@ var Video = import_react40.default.forwardRef((props, ref) => {
|
|
|
28913
29175
|
),
|
|
28914
29176
|
onClick: togglePlay,
|
|
28915
29177
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
28916
|
-
children: isPlaying ? /* @__PURE__ */ (0,
|
|
29178
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(PauseIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime347.jsx)("span", { className: "play-icon", children: /* @__PURE__ */ (0, import_jsx_runtime347.jsx)(PlayCircleIcon_default, {}) })
|
|
28917
29179
|
}
|
|
28918
29180
|
)
|
|
28919
29181
|
]
|
|
@@ -28959,6 +29221,7 @@ var Video_default = Video;
|
|
|
28959
29221
|
Skeleton,
|
|
28960
29222
|
Spinner,
|
|
28961
29223
|
Steps,
|
|
29224
|
+
Swiper,
|
|
28962
29225
|
Switch,
|
|
28963
29226
|
Tab,
|
|
28964
29227
|
Table,
|