@x-plat/design-system 0.15.6 → 0.16.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/Tour/index.cjs +338 -0
- package/dist/components/Tour/index.css +117 -0
- package/dist/components/Tour/index.d.cts +79 -0
- package/dist/components/Tour/index.d.ts +79 -0
- package/dist/components/Tour/index.js +301 -0
- package/dist/components/index.cjs +213 -53
- package/dist/components/index.css +116 -0
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +212 -53
- package/dist/index.cjs +237 -77
- package/dist/index.css +116 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +236 -77
- package/guidelines/Guidelines.md +1 -0
- package/guidelines/components/tour.md +93 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -352,6 +352,7 @@ __export(index_exports, {
|
|
|
352
352
|
ToggleRightIcon: () => ToggleRightIcon_default,
|
|
353
353
|
ToolIcon: () => ToolIcon_default,
|
|
354
354
|
Tooltip: () => Tooltip_default,
|
|
355
|
+
Tour: () => Tour_default,
|
|
355
356
|
Trash2Icon: () => Trash2Icon_default,
|
|
356
357
|
TrashIcon: () => TrashIcon_default,
|
|
357
358
|
TrelloIcon: () => TrelloIcon_default,
|
|
@@ -12000,7 +12001,7 @@ var Tooltip = (props) => {
|
|
|
12000
12001
|
const delayTimer = import_react43.default.useRef(0);
|
|
12001
12002
|
const rafRef = import_react43.default.useRef(0);
|
|
12002
12003
|
const cursor = import_react43.default.useRef(null);
|
|
12003
|
-
const
|
|
12004
|
+
const clamp2 = import_react43.default.useCallback((left, top, w, h) => {
|
|
12004
12005
|
const vw = window.innerWidth;
|
|
12005
12006
|
const vh = window.innerHeight;
|
|
12006
12007
|
return {
|
|
@@ -12017,8 +12018,8 @@ var Tooltip = (props) => {
|
|
|
12017
12018
|
let top = y - h - OFFSET;
|
|
12018
12019
|
if (left + w > window.innerWidth - GAP) left = x - w - OFFSET;
|
|
12019
12020
|
if (top < GAP) top = y + OFFSET;
|
|
12020
|
-
setPos(
|
|
12021
|
-
}, [
|
|
12021
|
+
setPos(clamp2(left, top, w, h));
|
|
12022
|
+
}, [clamp2]);
|
|
12022
12023
|
const placeAtTrigger = import_react43.default.useCallback(() => {
|
|
12023
12024
|
const el = tooltipRef.current;
|
|
12024
12025
|
const trigger = triggerRef.current;
|
|
@@ -12029,8 +12030,8 @@ var Tooltip = (props) => {
|
|
|
12029
12030
|
let top = rect.top - h - GAP;
|
|
12030
12031
|
if (top < GAP) top = rect.bottom + GAP;
|
|
12031
12032
|
const left = rect.left + rect.width / 2 - w / 2;
|
|
12032
|
-
setPos(
|
|
12033
|
-
}, [
|
|
12033
|
+
setPos(clamp2(left, top, w, h));
|
|
12034
|
+
}, [clamp2]);
|
|
12034
12035
|
const reposition = import_react43.default.useCallback(() => {
|
|
12035
12036
|
if (follow && cursor.current) {
|
|
12036
12037
|
placeAtCursor(cursor.current.x, cursor.current.y);
|
|
@@ -12117,12 +12118,170 @@ var Tooltip = (props) => {
|
|
|
12117
12118
|
Tooltip.displayName = "Tooltip";
|
|
12118
12119
|
var Tooltip_default = Tooltip;
|
|
12119
12120
|
|
|
12120
|
-
// src/components/
|
|
12121
|
+
// src/components/Tour/Tour.tsx
|
|
12121
12122
|
var import_react44 = __toESM(require("react"), 1);
|
|
12122
12123
|
var import_jsx_runtime355 = require("react/jsx-runtime");
|
|
12123
|
-
var
|
|
12124
|
-
|
|
12125
|
-
|
|
12124
|
+
var VIEWPORT_MARGIN = 16;
|
|
12125
|
+
var DEFAULT_PADDING = 8;
|
|
12126
|
+
var clamp = (v, min, max) => Math.max(min, Math.min(v, max));
|
|
12127
|
+
var resolve = (target) => {
|
|
12128
|
+
if (typeof target === "string") return document.querySelector(target);
|
|
12129
|
+
return target.current;
|
|
12130
|
+
};
|
|
12131
|
+
var Tour = (props) => {
|
|
12132
|
+
const {
|
|
12133
|
+
open,
|
|
12134
|
+
steps,
|
|
12135
|
+
onClose,
|
|
12136
|
+
current,
|
|
12137
|
+
onStepChange,
|
|
12138
|
+
nextLabel = "\uB2E4\uC74C",
|
|
12139
|
+
prevLabel = "\uC774\uC804",
|
|
12140
|
+
skipLabel = "\uAC74\uB108\uB6F0\uAE30",
|
|
12141
|
+
doneLabel = "\uB2E4 \uBD24\uC5B4\uC694"
|
|
12142
|
+
} = props;
|
|
12143
|
+
const [uncontrolled, setUncontrolled] = import_react44.default.useState(0);
|
|
12144
|
+
const index = current ?? uncontrolled;
|
|
12145
|
+
const step = steps[index];
|
|
12146
|
+
const isLast = index === steps.length - 1;
|
|
12147
|
+
const spotRef = import_react44.default.useRef(null);
|
|
12148
|
+
const cardRef = import_react44.default.useRef(null);
|
|
12149
|
+
const [targetFound, setTargetFound] = import_react44.default.useState(true);
|
|
12150
|
+
const goTo = import_react44.default.useCallback(
|
|
12151
|
+
(next) => {
|
|
12152
|
+
if (current === void 0) setUncontrolled(next);
|
|
12153
|
+
onStepChange?.(next);
|
|
12154
|
+
},
|
|
12155
|
+
[current, onStepChange]
|
|
12156
|
+
);
|
|
12157
|
+
useEscapeKey(open, () => onClose("skip"));
|
|
12158
|
+
useFocusTrap(cardRef, open, { trap: true });
|
|
12159
|
+
import_react44.default.useEffect(() => {
|
|
12160
|
+
if (!open || !step) return;
|
|
12161
|
+
const el = resolve(step.target);
|
|
12162
|
+
setTargetFound(!!el);
|
|
12163
|
+
el?.scrollIntoView({ block: "center", inline: "nearest", behavior: "smooth" });
|
|
12164
|
+
}, [open, step]);
|
|
12165
|
+
const place = import_react44.default.useCallback(() => {
|
|
12166
|
+
const spot = spotRef.current;
|
|
12167
|
+
const card = cardRef.current;
|
|
12168
|
+
if (!spot || !card || !step) return;
|
|
12169
|
+
const el = resolve(step.target);
|
|
12170
|
+
const pad = step.padding ?? DEFAULT_PADDING;
|
|
12171
|
+
let hole;
|
|
12172
|
+
if (el) {
|
|
12173
|
+
const r2 = el.getBoundingClientRect();
|
|
12174
|
+
hole = {
|
|
12175
|
+
top: r2.top - pad,
|
|
12176
|
+
left: r2.left - pad,
|
|
12177
|
+
width: r2.width + pad * 2,
|
|
12178
|
+
height: r2.height + pad * 2
|
|
12179
|
+
};
|
|
12180
|
+
spot.style.visibility = "visible";
|
|
12181
|
+
} else {
|
|
12182
|
+
hole = { top: window.innerHeight / 2, left: window.innerWidth / 2, width: 0, height: 0 };
|
|
12183
|
+
spot.style.visibility = "hidden";
|
|
12184
|
+
}
|
|
12185
|
+
spot.style.top = `${hole.top}px`;
|
|
12186
|
+
spot.style.left = `${hole.left}px`;
|
|
12187
|
+
spot.style.width = `${hole.width}px`;
|
|
12188
|
+
spot.style.height = `${hole.height}px`;
|
|
12189
|
+
const placed = computePlacement(
|
|
12190
|
+
{
|
|
12191
|
+
top: hole.top,
|
|
12192
|
+
bottom: hole.top + hole.height,
|
|
12193
|
+
left: hole.left,
|
|
12194
|
+
right: hole.left + hole.width
|
|
12195
|
+
},
|
|
12196
|
+
card.offsetWidth,
|
|
12197
|
+
Math.max(card.offsetHeight, card.scrollHeight),
|
|
12198
|
+
{
|
|
12199
|
+
top: VIEWPORT_MARGIN,
|
|
12200
|
+
bottom: window.innerHeight - VIEWPORT_MARGIN,
|
|
12201
|
+
left: VIEWPORT_MARGIN,
|
|
12202
|
+
right: window.innerWidth - VIEWPORT_MARGIN
|
|
12203
|
+
}
|
|
12204
|
+
);
|
|
12205
|
+
const limit = window.innerHeight - VIEWPORT_MARGIN * 2;
|
|
12206
|
+
const cardH = Math.min(placed.maxHeight ?? card.offsetHeight, limit);
|
|
12207
|
+
const cardW = card.offsetWidth;
|
|
12208
|
+
card.style.maxHeight = `${cardH}px`;
|
|
12209
|
+
card.style.top = `${clamp(placed.top, VIEWPORT_MARGIN, window.innerHeight - VIEWPORT_MARGIN - cardH)}px`;
|
|
12210
|
+
card.style.left = `${clamp(placed.left, VIEWPORT_MARGIN, window.innerWidth - VIEWPORT_MARGIN - cardW)}px`;
|
|
12211
|
+
}, [step]);
|
|
12212
|
+
import_react44.default.useLayoutEffect(() => {
|
|
12213
|
+
if (!open) return;
|
|
12214
|
+
place();
|
|
12215
|
+
const t = setTimeout(place, 400);
|
|
12216
|
+
return () => clearTimeout(t);
|
|
12217
|
+
}, [open, place]);
|
|
12218
|
+
import_react44.default.useEffect(() => {
|
|
12219
|
+
if (!open) return;
|
|
12220
|
+
const onMove = () => place();
|
|
12221
|
+
window.addEventListener("scroll", onMove, { passive: true, capture: true });
|
|
12222
|
+
window.addEventListener("resize", onMove, { passive: true });
|
|
12223
|
+
return () => {
|
|
12224
|
+
window.removeEventListener("scroll", onMove, true);
|
|
12225
|
+
window.removeEventListener("resize", onMove);
|
|
12226
|
+
};
|
|
12227
|
+
}, [open, place]);
|
|
12228
|
+
if (!open || !step) return null;
|
|
12229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(Portal_default, { children: /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "lib-xplat-tour", role: "presentation", children: [
|
|
12230
|
+
!targetFound && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("div", { className: "lib-xplat-tour-dim" }),
|
|
12231
|
+
/* @__PURE__ */ (0, import_jsx_runtime355.jsx)("div", { ref: spotRef, className: "lib-xplat-tour-spotlight", "aria-hidden": true }),
|
|
12232
|
+
/* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(
|
|
12233
|
+
"div",
|
|
12234
|
+
{
|
|
12235
|
+
ref: cardRef,
|
|
12236
|
+
className: "lib-xplat-tour-card",
|
|
12237
|
+
role: "dialog",
|
|
12238
|
+
"aria-modal": "true",
|
|
12239
|
+
"aria-label": typeof step.title === "string" ? step.title : "\uD654\uBA74 \uC548\uB0B4",
|
|
12240
|
+
children: [
|
|
12241
|
+
/* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "tour-card-progress", "aria-hidden": true, children: [
|
|
12242
|
+
index + 1,
|
|
12243
|
+
" / ",
|
|
12244
|
+
steps.length
|
|
12245
|
+
] }),
|
|
12246
|
+
step.title && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("div", { className: "tour-card-title", children: step.title }),
|
|
12247
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("div", { className: "tour-card-description", children: step.description }),
|
|
12248
|
+
/* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "tour-card-actions", children: [
|
|
12249
|
+
/* @__PURE__ */ (0, import_jsx_runtime355.jsx)("button", { type: "button", className: "tour-skip", onClick: () => onClose("skip"), children: skipLabel }),
|
|
12250
|
+
/* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "tour-card-nav", children: [
|
|
12251
|
+
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
|
|
12252
|
+
"button",
|
|
12253
|
+
{
|
|
12254
|
+
type: "button",
|
|
12255
|
+
className: clsx_default("tour-nav", "secondary"),
|
|
12256
|
+
onClick: () => goTo(index - 1),
|
|
12257
|
+
children: prevLabel
|
|
12258
|
+
}
|
|
12259
|
+
),
|
|
12260
|
+
/* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
|
|
12261
|
+
"button",
|
|
12262
|
+
{
|
|
12263
|
+
type: "button",
|
|
12264
|
+
className: clsx_default("tour-nav", "primary"),
|
|
12265
|
+
onClick: () => isLast ? onClose("done") : goTo(index + 1),
|
|
12266
|
+
children: isLast ? doneLabel : nextLabel
|
|
12267
|
+
}
|
|
12268
|
+
)
|
|
12269
|
+
] })
|
|
12270
|
+
] })
|
|
12271
|
+
]
|
|
12272
|
+
}
|
|
12273
|
+
)
|
|
12274
|
+
] }) });
|
|
12275
|
+
};
|
|
12276
|
+
Tour.displayName = "Tour";
|
|
12277
|
+
var Tour_default = Tour;
|
|
12278
|
+
|
|
12279
|
+
// src/components/Video/Video.tsx
|
|
12280
|
+
var import_react45 = __toESM(require("react"), 1);
|
|
12281
|
+
var import_jsx_runtime356 = require("react/jsx-runtime");
|
|
12282
|
+
var PipIcon = () => /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
12283
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
12284
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsx)("rect", { x: "12", y: "11", width: "7", height: "6", rx: "1", fill: "currentColor" })
|
|
12126
12285
|
] });
|
|
12127
12286
|
var formatTime = (sec) => {
|
|
12128
12287
|
if (!Number.isFinite(sec) || sec < 0) return "0:00";
|
|
@@ -12130,7 +12289,7 @@ var formatTime = (sec) => {
|
|
|
12130
12289
|
const s = Math.floor(sec % 60);
|
|
12131
12290
|
return `${m}:${s.toString().padStart(2, "0")}`;
|
|
12132
12291
|
};
|
|
12133
|
-
var Video =
|
|
12292
|
+
var Video = import_react45.default.forwardRef((props, ref) => {
|
|
12134
12293
|
const {
|
|
12135
12294
|
src,
|
|
12136
12295
|
poster,
|
|
@@ -12154,21 +12313,21 @@ var Video = import_react44.default.forwardRef((props, ref) => {
|
|
|
12154
12313
|
children,
|
|
12155
12314
|
...rest
|
|
12156
12315
|
} = props;
|
|
12157
|
-
const containerRef =
|
|
12158
|
-
const videoRef =
|
|
12159
|
-
const [isPlaying, setIsPlaying] =
|
|
12160
|
-
const [isLoaded, setIsLoaded] =
|
|
12161
|
-
const [currentTime, setCurrentTime] =
|
|
12162
|
-
const [duration, setDuration] =
|
|
12163
|
-
const [buffered, setBuffered] =
|
|
12164
|
-
const [volume, setVolume] =
|
|
12165
|
-
const [isMuted, setIsMuted] =
|
|
12166
|
-
const [isFullscreen, setIsFullscreen] =
|
|
12167
|
-
const [playbackRate, setPlaybackRate] =
|
|
12168
|
-
const [rateMenuOpen, setRateMenuOpen] =
|
|
12169
|
-
const [captionsOn, setCaptionsOn] =
|
|
12170
|
-
const [isPip, setIsPip] =
|
|
12171
|
-
const setRefs =
|
|
12316
|
+
const containerRef = import_react45.default.useRef(null);
|
|
12317
|
+
const videoRef = import_react45.default.useRef(null);
|
|
12318
|
+
const [isPlaying, setIsPlaying] = import_react45.default.useState(Boolean(autoPlay));
|
|
12319
|
+
const [isLoaded, setIsLoaded] = import_react45.default.useState(false);
|
|
12320
|
+
const [currentTime, setCurrentTime] = import_react45.default.useState(0);
|
|
12321
|
+
const [duration, setDuration] = import_react45.default.useState(0);
|
|
12322
|
+
const [buffered, setBuffered] = import_react45.default.useState(0);
|
|
12323
|
+
const [volume, setVolume] = import_react45.default.useState(1);
|
|
12324
|
+
const [isMuted, setIsMuted] = import_react45.default.useState(Boolean(muted));
|
|
12325
|
+
const [isFullscreen, setIsFullscreen] = import_react45.default.useState(false);
|
|
12326
|
+
const [playbackRate, setPlaybackRate] = import_react45.default.useState(1);
|
|
12327
|
+
const [rateMenuOpen, setRateMenuOpen] = import_react45.default.useState(false);
|
|
12328
|
+
const [captionsOn, setCaptionsOn] = import_react45.default.useState(false);
|
|
12329
|
+
const [isPip, setIsPip] = import_react45.default.useState(false);
|
|
12330
|
+
const setRefs = import_react45.default.useCallback(
|
|
12172
12331
|
(el) => {
|
|
12173
12332
|
videoRef.current = el;
|
|
12174
12333
|
if (typeof ref === "function") ref(el);
|
|
@@ -12176,14 +12335,14 @@ var Video = import_react44.default.forwardRef((props, ref) => {
|
|
|
12176
12335
|
},
|
|
12177
12336
|
[ref]
|
|
12178
12337
|
);
|
|
12179
|
-
|
|
12338
|
+
import_react45.default.useEffect(() => {
|
|
12180
12339
|
const onFsChange = () => {
|
|
12181
12340
|
setIsFullscreen(document.fullscreenElement === containerRef.current);
|
|
12182
12341
|
};
|
|
12183
12342
|
document.addEventListener("fullscreenchange", onFsChange);
|
|
12184
12343
|
return () => document.removeEventListener("fullscreenchange", onFsChange);
|
|
12185
12344
|
}, []);
|
|
12186
|
-
|
|
12345
|
+
import_react45.default.useEffect(() => {
|
|
12187
12346
|
const v = videoRef.current;
|
|
12188
12347
|
if (!v) return;
|
|
12189
12348
|
const onEnter = () => setIsPip(true);
|
|
@@ -12297,13 +12456,13 @@ var Video = import_react44.default.forwardRef((props, ref) => {
|
|
|
12297
12456
|
const volumePct = (isMuted ? 0 : volume) * 100;
|
|
12298
12457
|
const VolumeGlyph = isMuted || volume === 0 ? VolumeXIcon_default : volume < 0.5 ? VolumeIcon_default : Volume2Icon_default;
|
|
12299
12458
|
const pipSupported = typeof document !== "undefined" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled;
|
|
12300
|
-
return /* @__PURE__ */ (0,
|
|
12459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(
|
|
12301
12460
|
"div",
|
|
12302
12461
|
{
|
|
12303
12462
|
ref: containerRef,
|
|
12304
12463
|
className: clsx_default("lib-xplat-video", showControls && "has-controls"),
|
|
12305
12464
|
children: [
|
|
12306
|
-
/* @__PURE__ */ (0,
|
|
12465
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
12307
12466
|
"video",
|
|
12308
12467
|
{
|
|
12309
12468
|
ref: setRefs,
|
|
@@ -12324,7 +12483,7 @@ var Video = import_react44.default.forwardRef((props, ref) => {
|
|
|
12324
12483
|
children
|
|
12325
12484
|
}
|
|
12326
12485
|
),
|
|
12327
|
-
showCenterPlay && /* @__PURE__ */ (0,
|
|
12486
|
+
showCenterPlay && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
12328
12487
|
"button",
|
|
12329
12488
|
{
|
|
12330
12489
|
type: "button",
|
|
@@ -12336,11 +12495,11 @@ var Video = import_react44.default.forwardRef((props, ref) => {
|
|
|
12336
12495
|
onClick: togglePlay,
|
|
12337
12496
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
12338
12497
|
tabIndex: -1,
|
|
12339
|
-
children: /* @__PURE__ */ (0,
|
|
12498
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("span", { className: "center-play-icon", children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(PlayCircleIcon_default, {}) })
|
|
12340
12499
|
}
|
|
12341
12500
|
),
|
|
12342
|
-
showControls && /* @__PURE__ */ (0,
|
|
12343
|
-
/* @__PURE__ */ (0,
|
|
12501
|
+
showControls && /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)("div", { className: "controls", onClick: (e) => e.stopPropagation(), children: [
|
|
12502
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
12344
12503
|
"input",
|
|
12345
12504
|
{
|
|
12346
12505
|
type: "range",
|
|
@@ -12357,29 +12516,29 @@ var Video = import_react44.default.forwardRef((props, ref) => {
|
|
|
12357
12516
|
}
|
|
12358
12517
|
}
|
|
12359
12518
|
),
|
|
12360
|
-
/* @__PURE__ */ (0,
|
|
12361
|
-
/* @__PURE__ */ (0,
|
|
12519
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsxs)("div", { className: "controls-row", children: [
|
|
12520
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
12362
12521
|
"button",
|
|
12363
12522
|
{
|
|
12364
12523
|
type: "button",
|
|
12365
12524
|
className: "control-btn",
|
|
12366
12525
|
onClick: togglePlay,
|
|
12367
12526
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
12368
|
-
children: isPlaying ? /* @__PURE__ */ (0,
|
|
12527
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(PauseIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(PlayIcon_default, {})
|
|
12369
12528
|
}
|
|
12370
12529
|
),
|
|
12371
|
-
/* @__PURE__ */ (0,
|
|
12372
|
-
/* @__PURE__ */ (0,
|
|
12530
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsxs)("div", { className: "volume-group", children: [
|
|
12531
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
12373
12532
|
"button",
|
|
12374
12533
|
{
|
|
12375
12534
|
type: "button",
|
|
12376
12535
|
className: "control-btn",
|
|
12377
12536
|
onClick: toggleMute,
|
|
12378
12537
|
"aria-label": isMuted ? "\uC74C\uC18C\uAC70 \uD574\uC81C" : "\uC74C\uC18C\uAC70",
|
|
12379
|
-
children: /* @__PURE__ */ (0,
|
|
12538
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(VolumeGlyph, {})
|
|
12380
12539
|
}
|
|
12381
12540
|
),
|
|
12382
|
-
/* @__PURE__ */ (0,
|
|
12541
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
12383
12542
|
"input",
|
|
12384
12543
|
{
|
|
12385
12544
|
type: "range",
|
|
@@ -12394,14 +12553,14 @@ var Video = import_react44.default.forwardRef((props, ref) => {
|
|
|
12394
12553
|
}
|
|
12395
12554
|
)
|
|
12396
12555
|
] }),
|
|
12397
|
-
/* @__PURE__ */ (0,
|
|
12556
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsxs)("span", { className: "time", children: [
|
|
12398
12557
|
formatTime(currentTime),
|
|
12399
12558
|
" / ",
|
|
12400
12559
|
formatTime(duration)
|
|
12401
12560
|
] }),
|
|
12402
|
-
/* @__PURE__ */ (0,
|
|
12403
|
-
playbackRates && playbackRates.length > 0 && /* @__PURE__ */ (0,
|
|
12404
|
-
/* @__PURE__ */ (0,
|
|
12561
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsx)("div", { className: "controls-spacer" }),
|
|
12562
|
+
playbackRates && playbackRates.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)("div", { className: clsx_default("rate-group", rateMenuOpen && "is-open"), children: [
|
|
12563
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(
|
|
12405
12564
|
"button",
|
|
12406
12565
|
{
|
|
12407
12566
|
type: "button",
|
|
@@ -12415,7 +12574,7 @@ var Video = import_react44.default.forwardRef((props, ref) => {
|
|
|
12415
12574
|
]
|
|
12416
12575
|
}
|
|
12417
12576
|
),
|
|
12418
|
-
rateMenuOpen && /* @__PURE__ */ (0,
|
|
12577
|
+
rateMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("ul", { className: "rate-menu", role: "menu", children: playbackRates.map((r2) => /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(
|
|
12419
12578
|
"button",
|
|
12420
12579
|
{
|
|
12421
12580
|
type: "button",
|
|
@@ -12429,7 +12588,7 @@ var Video = import_react44.default.forwardRef((props, ref) => {
|
|
|
12429
12588
|
}
|
|
12430
12589
|
) }, r2)) })
|
|
12431
12590
|
] }),
|
|
12432
|
-
showCaptions && /* @__PURE__ */ (0,
|
|
12591
|
+
showCaptions && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
12433
12592
|
"button",
|
|
12434
12593
|
{
|
|
12435
12594
|
type: "button",
|
|
@@ -12437,37 +12596,37 @@ var Video = import_react44.default.forwardRef((props, ref) => {
|
|
|
12437
12596
|
onClick: toggleCaptions,
|
|
12438
12597
|
"aria-label": captionsOn ? "\uC790\uB9C9 \uB044\uAE30" : "\uC790\uB9C9 \uCF1C\uAE30",
|
|
12439
12598
|
"aria-pressed": captionsOn,
|
|
12440
|
-
children: /* @__PURE__ */ (0,
|
|
12599
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(TypeIcon_default, {})
|
|
12441
12600
|
}
|
|
12442
12601
|
),
|
|
12443
|
-
showPip && pipSupported && /* @__PURE__ */ (0,
|
|
12602
|
+
showPip && pipSupported && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
12444
12603
|
"button",
|
|
12445
12604
|
{
|
|
12446
12605
|
type: "button",
|
|
12447
12606
|
className: clsx_default("control-btn", isPip && "is-active"),
|
|
12448
12607
|
onClick: togglePip,
|
|
12449
12608
|
"aria-label": isPip ? "PIP \uC885\uB8CC" : "PIP",
|
|
12450
|
-
children: /* @__PURE__ */ (0,
|
|
12609
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(PipIcon, {})
|
|
12451
12610
|
}
|
|
12452
12611
|
),
|
|
12453
|
-
showDownload && /* @__PURE__ */ (0,
|
|
12612
|
+
showDownload && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
12454
12613
|
"a",
|
|
12455
12614
|
{
|
|
12456
12615
|
className: "control-btn",
|
|
12457
12616
|
href: src,
|
|
12458
12617
|
download: downloadFileName ?? true,
|
|
12459
12618
|
"aria-label": "\uB2E4\uC6B4\uB85C\uB4DC",
|
|
12460
|
-
children: /* @__PURE__ */ (0,
|
|
12619
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(DownloadIcon_default, {})
|
|
12461
12620
|
}
|
|
12462
12621
|
),
|
|
12463
|
-
/* @__PURE__ */ (0,
|
|
12622
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
|
|
12464
12623
|
"button",
|
|
12465
12624
|
{
|
|
12466
12625
|
type: "button",
|
|
12467
12626
|
className: "control-btn",
|
|
12468
12627
|
onClick: toggleFullscreen,
|
|
12469
12628
|
"aria-label": isFullscreen ? "\uC804\uCCB4\uD654\uBA74 \uC885\uB8CC" : "\uC804\uCCB4\uD654\uBA74",
|
|
12470
|
-
children: isFullscreen ? /* @__PURE__ */ (0,
|
|
12629
|
+
children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(MinimizeIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(MaximizeIcon_default, {})
|
|
12471
12630
|
}
|
|
12472
12631
|
)
|
|
12473
12632
|
] })
|
|
@@ -12480,7 +12639,7 @@ Video.displayName = "Video";
|
|
|
12480
12639
|
var Video_default = Video;
|
|
12481
12640
|
|
|
12482
12641
|
// src/layout/Grid/FullGrid/FullGrid.tsx
|
|
12483
|
-
var
|
|
12642
|
+
var import_jsx_runtime357 = require("react/jsx-runtime");
|
|
12484
12643
|
var GAP_MAP = {
|
|
12485
12644
|
none: "var(--spacing-space-none)",
|
|
12486
12645
|
xs: "var(--spacing-space-1)",
|
|
@@ -12493,13 +12652,13 @@ var GAP_MAP = {
|
|
|
12493
12652
|
var FullGrid = (props) => {
|
|
12494
12653
|
const { children, gap } = props;
|
|
12495
12654
|
const style = gap != null ? { gap: GAP_MAP[gap] } : void 0;
|
|
12496
|
-
return /* @__PURE__ */ (0,
|
|
12655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime357.jsx)("div", { className: "lib-xplat-full-grid", style, children });
|
|
12497
12656
|
};
|
|
12498
12657
|
FullGrid.displayName = "FullGrid";
|
|
12499
12658
|
var FullGrid_default = FullGrid;
|
|
12500
12659
|
|
|
12501
12660
|
// src/layout/Grid/FullScreen/FullScreen.tsx
|
|
12502
|
-
var
|
|
12661
|
+
var import_jsx_runtime358 = require("react/jsx-runtime");
|
|
12503
12662
|
var GAP_MAP2 = {
|
|
12504
12663
|
none: "var(--spacing-space-none)",
|
|
12505
12664
|
xs: "var(--spacing-space-1)",
|
|
@@ -12512,13 +12671,13 @@ var GAP_MAP2 = {
|
|
|
12512
12671
|
var FullScreen = (props) => {
|
|
12513
12672
|
const { children, gap } = props;
|
|
12514
12673
|
const style = gap != null ? { gap: GAP_MAP2[gap] } : void 0;
|
|
12515
|
-
return /* @__PURE__ */ (0,
|
|
12674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime358.jsx)("div", { className: "lib-xplat-full-screen", style, children });
|
|
12516
12675
|
};
|
|
12517
12676
|
FullScreen.displayName = "FullScreen";
|
|
12518
12677
|
var FullScreen_default = FullScreen;
|
|
12519
12678
|
|
|
12520
12679
|
// src/layout/Grid/Item/Item.tsx
|
|
12521
|
-
var
|
|
12680
|
+
var import_jsx_runtime359 = require("react/jsx-runtime");
|
|
12522
12681
|
var calculateSpans = (column) => {
|
|
12523
12682
|
const spans = {};
|
|
12524
12683
|
let inherited = column.default;
|
|
@@ -12535,36 +12694,36 @@ var GridItem = ({ column, children, className }) => {
|
|
|
12535
12694
|
Object.entries(spans).forEach(([key, value]) => {
|
|
12536
12695
|
style[`--column-${key}`] = value;
|
|
12537
12696
|
});
|
|
12538
|
-
return /* @__PURE__ */ (0,
|
|
12697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime359.jsx)("div", { className: clsx_default("lib-xplat-grid-item", className), style, children });
|
|
12539
12698
|
};
|
|
12540
12699
|
GridItem.displayName = "GridItem";
|
|
12541
12700
|
var Item_default = GridItem;
|
|
12542
12701
|
|
|
12543
12702
|
// src/layout/Header/Header.tsx
|
|
12544
|
-
var
|
|
12703
|
+
var import_jsx_runtime360 = require("react/jsx-runtime");
|
|
12545
12704
|
var Header = ({
|
|
12546
12705
|
leftContent,
|
|
12547
12706
|
logo,
|
|
12548
12707
|
centerContent,
|
|
12549
12708
|
rightContent
|
|
12550
12709
|
}) => {
|
|
12551
|
-
return /* @__PURE__ */ (0,
|
|
12552
|
-
/* @__PURE__ */ (0,
|
|
12553
|
-
/* @__PURE__ */ (0,
|
|
12554
|
-
/* @__PURE__ */ (0,
|
|
12710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime360.jsxs)("div", { className: "lib-xplat-layout-header", children: [
|
|
12711
|
+
/* @__PURE__ */ (0, import_jsx_runtime360.jsx)("div", { children: leftContent ?? logo }),
|
|
12712
|
+
/* @__PURE__ */ (0, import_jsx_runtime360.jsx)("div", { children: centerContent }),
|
|
12713
|
+
/* @__PURE__ */ (0, import_jsx_runtime360.jsx)("div", { children: rightContent })
|
|
12555
12714
|
] });
|
|
12556
12715
|
};
|
|
12557
12716
|
Header.displayName = "Header";
|
|
12558
12717
|
var Header_default = Header;
|
|
12559
12718
|
|
|
12560
12719
|
// src/layout/Layout/Layout.tsx
|
|
12561
|
-
var
|
|
12720
|
+
var import_jsx_runtime361 = require("react/jsx-runtime");
|
|
12562
12721
|
var Layout = (props) => {
|
|
12563
12722
|
const { header, sideBar, children } = props;
|
|
12564
|
-
return /* @__PURE__ */ (0,
|
|
12565
|
-
sideBar && /* @__PURE__ */ (0,
|
|
12566
|
-
/* @__PURE__ */ (0,
|
|
12567
|
-
header && /* @__PURE__ */ (0,
|
|
12723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("div", { className: "lib-xplat-layout", children: /* @__PURE__ */ (0, import_jsx_runtime361.jsxs)("div", { className: "lib-xplat-layout-content-wrapper", children: [
|
|
12724
|
+
sideBar && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)(import_jsx_runtime361.Fragment, { children: sideBar }),
|
|
12725
|
+
/* @__PURE__ */ (0, import_jsx_runtime361.jsxs)("div", { className: "lib-xplat-layout-content", children: [
|
|
12726
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime361.jsx)("div", { className: "lib-xplat-layout-content-header", children: header }),
|
|
12568
12727
|
children
|
|
12569
12728
|
] })
|
|
12570
12729
|
] }) });
|
|
@@ -12573,31 +12732,31 @@ Layout.displayName = "Layout";
|
|
|
12573
12732
|
var Layout_default = Layout;
|
|
12574
12733
|
|
|
12575
12734
|
// src/layout/SideBar/SideBar.tsx
|
|
12576
|
-
var
|
|
12735
|
+
var import_react47 = __toESM(require("react"), 1);
|
|
12577
12736
|
|
|
12578
12737
|
// src/layout/SideBar/SideBarContext.tsx
|
|
12579
|
-
var
|
|
12580
|
-
var SideBarContext =
|
|
12738
|
+
var import_react46 = __toESM(require("react"), 1);
|
|
12739
|
+
var SideBarContext = import_react46.default.createContext(null);
|
|
12581
12740
|
var useSideBarContext = () => {
|
|
12582
|
-
const ctx =
|
|
12741
|
+
const ctx = import_react46.default.useContext(SideBarContext);
|
|
12583
12742
|
if (!ctx) throw new Error("Error");
|
|
12584
12743
|
return ctx;
|
|
12585
12744
|
};
|
|
12586
12745
|
var SideBarContext_default = SideBarContext;
|
|
12587
12746
|
|
|
12588
12747
|
// src/layout/SideBar/SideBar.tsx
|
|
12589
|
-
var
|
|
12748
|
+
var import_jsx_runtime362 = require("react/jsx-runtime");
|
|
12590
12749
|
var SideBar = (props) => {
|
|
12591
12750
|
const { children, className } = props;
|
|
12592
|
-
const [isOpen, setIsOpen] =
|
|
12751
|
+
const [isOpen, setIsOpen] = import_react47.default.useState(true);
|
|
12593
12752
|
const handleSwitchSideBar = () => {
|
|
12594
12753
|
setIsOpen((prev) => !prev);
|
|
12595
12754
|
};
|
|
12596
|
-
return /* @__PURE__ */ (0,
|
|
12755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
|
|
12597
12756
|
SideBarContext_default.Provider,
|
|
12598
12757
|
{
|
|
12599
12758
|
value: { isSidebarOpen: isOpen, handleSwitchSideBar },
|
|
12600
|
-
children: /* @__PURE__ */ (0,
|
|
12759
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime362.jsx)(
|
|
12601
12760
|
"div",
|
|
12602
12761
|
{
|
|
12603
12762
|
className: clsx_default(
|
|
@@ -12937,6 +13096,7 @@ var SideBar_default = SideBar;
|
|
|
12937
13096
|
ToggleRightIcon,
|
|
12938
13097
|
ToolIcon,
|
|
12939
13098
|
Tooltip,
|
|
13099
|
+
Tour,
|
|
12940
13100
|
Trash2Icon,
|
|
12941
13101
|
TrashIcon,
|
|
12942
13102
|
TrelloIcon,
|