@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.
@@ -91,6 +91,7 @@ __export(components_exports, {
91
91
  ToastProvider: () => ToastProvider,
92
92
  ToggleChip: () => ToggleChip_default,
93
93
  Tooltip: () => Tooltip_default,
94
+ Tour: () => Tour_default,
94
95
  Video: () => Video_default,
95
96
  hasError: () => hasError,
96
97
  isInRange: () => isInRange,
@@ -7588,7 +7589,7 @@ var Tooltip = (props) => {
7588
7589
  const delayTimer = import_react43.default.useRef(0);
7589
7590
  const rafRef = import_react43.default.useRef(0);
7590
7591
  const cursor = import_react43.default.useRef(null);
7591
- const clamp = import_react43.default.useCallback((left, top, w, h) => {
7592
+ const clamp2 = import_react43.default.useCallback((left, top, w, h) => {
7592
7593
  const vw = window.innerWidth;
7593
7594
  const vh = window.innerHeight;
7594
7595
  return {
@@ -7605,8 +7606,8 @@ var Tooltip = (props) => {
7605
7606
  let top = y - h - OFFSET;
7606
7607
  if (left + w > window.innerWidth - GAP) left = x - w - OFFSET;
7607
7608
  if (top < GAP) top = y + OFFSET;
7608
- setPos(clamp(left, top, w, h));
7609
- }, [clamp]);
7609
+ setPos(clamp2(left, top, w, h));
7610
+ }, [clamp2]);
7610
7611
  const placeAtTrigger = import_react43.default.useCallback(() => {
7611
7612
  const el = tooltipRef.current;
7612
7613
  const trigger = triggerRef.current;
@@ -7617,8 +7618,8 @@ var Tooltip = (props) => {
7617
7618
  let top = rect.top - h - GAP;
7618
7619
  if (top < GAP) top = rect.bottom + GAP;
7619
7620
  const left = rect.left + rect.width / 2 - w / 2;
7620
- setPos(clamp(left, top, w, h));
7621
- }, [clamp]);
7621
+ setPos(clamp2(left, top, w, h));
7622
+ }, [clamp2]);
7622
7623
  const reposition = import_react43.default.useCallback(() => {
7623
7624
  if (follow && cursor.current) {
7624
7625
  placeAtCursor(cursor.current.x, cursor.current.y);
@@ -7705,12 +7706,170 @@ var Tooltip = (props) => {
7705
7706
  Tooltip.displayName = "Tooltip";
7706
7707
  var Tooltip_default = Tooltip;
7707
7708
 
7708
- // src/components/Video/Video.tsx
7709
+ // src/components/Tour/Tour.tsx
7709
7710
  var import_react44 = __toESM(require("react"), 1);
7710
7711
  var import_jsx_runtime355 = require("react/jsx-runtime");
7711
- var PipIcon = () => /* @__PURE__ */ (0, import_jsx_runtime355.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: [
7712
- /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
7713
- /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("rect", { x: "12", y: "11", width: "7", height: "6", rx: "1", fill: "currentColor" })
7712
+ var VIEWPORT_MARGIN = 16;
7713
+ var DEFAULT_PADDING = 8;
7714
+ var clamp = (v, min, max) => Math.max(min, Math.min(v, max));
7715
+ var resolve = (target) => {
7716
+ if (typeof target === "string") return document.querySelector(target);
7717
+ return target.current;
7718
+ };
7719
+ var Tour = (props) => {
7720
+ const {
7721
+ open,
7722
+ steps,
7723
+ onClose,
7724
+ current,
7725
+ onStepChange,
7726
+ nextLabel = "\uB2E4\uC74C",
7727
+ prevLabel = "\uC774\uC804",
7728
+ skipLabel = "\uAC74\uB108\uB6F0\uAE30",
7729
+ doneLabel = "\uB2E4 \uBD24\uC5B4\uC694"
7730
+ } = props;
7731
+ const [uncontrolled, setUncontrolled] = import_react44.default.useState(0);
7732
+ const index = current ?? uncontrolled;
7733
+ const step = steps[index];
7734
+ const isLast = index === steps.length - 1;
7735
+ const spotRef = import_react44.default.useRef(null);
7736
+ const cardRef = import_react44.default.useRef(null);
7737
+ const [targetFound, setTargetFound] = import_react44.default.useState(true);
7738
+ const goTo = import_react44.default.useCallback(
7739
+ (next) => {
7740
+ if (current === void 0) setUncontrolled(next);
7741
+ onStepChange?.(next);
7742
+ },
7743
+ [current, onStepChange]
7744
+ );
7745
+ useEscapeKey(open, () => onClose("skip"));
7746
+ useFocusTrap(cardRef, open, { trap: true });
7747
+ import_react44.default.useEffect(() => {
7748
+ if (!open || !step) return;
7749
+ const el = resolve(step.target);
7750
+ setTargetFound(!!el);
7751
+ el?.scrollIntoView({ block: "center", inline: "nearest", behavior: "smooth" });
7752
+ }, [open, step]);
7753
+ const place = import_react44.default.useCallback(() => {
7754
+ const spot = spotRef.current;
7755
+ const card = cardRef.current;
7756
+ if (!spot || !card || !step) return;
7757
+ const el = resolve(step.target);
7758
+ const pad = step.padding ?? DEFAULT_PADDING;
7759
+ let hole;
7760
+ if (el) {
7761
+ const r2 = el.getBoundingClientRect();
7762
+ hole = {
7763
+ top: r2.top - pad,
7764
+ left: r2.left - pad,
7765
+ width: r2.width + pad * 2,
7766
+ height: r2.height + pad * 2
7767
+ };
7768
+ spot.style.visibility = "visible";
7769
+ } else {
7770
+ hole = { top: window.innerHeight / 2, left: window.innerWidth / 2, width: 0, height: 0 };
7771
+ spot.style.visibility = "hidden";
7772
+ }
7773
+ spot.style.top = `${hole.top}px`;
7774
+ spot.style.left = `${hole.left}px`;
7775
+ spot.style.width = `${hole.width}px`;
7776
+ spot.style.height = `${hole.height}px`;
7777
+ const placed = computePlacement(
7778
+ {
7779
+ top: hole.top,
7780
+ bottom: hole.top + hole.height,
7781
+ left: hole.left,
7782
+ right: hole.left + hole.width
7783
+ },
7784
+ card.offsetWidth,
7785
+ Math.max(card.offsetHeight, card.scrollHeight),
7786
+ {
7787
+ top: VIEWPORT_MARGIN,
7788
+ bottom: window.innerHeight - VIEWPORT_MARGIN,
7789
+ left: VIEWPORT_MARGIN,
7790
+ right: window.innerWidth - VIEWPORT_MARGIN
7791
+ }
7792
+ );
7793
+ const limit = window.innerHeight - VIEWPORT_MARGIN * 2;
7794
+ const cardH = Math.min(placed.maxHeight ?? card.offsetHeight, limit);
7795
+ const cardW = card.offsetWidth;
7796
+ card.style.maxHeight = `${cardH}px`;
7797
+ card.style.top = `${clamp(placed.top, VIEWPORT_MARGIN, window.innerHeight - VIEWPORT_MARGIN - cardH)}px`;
7798
+ card.style.left = `${clamp(placed.left, VIEWPORT_MARGIN, window.innerWidth - VIEWPORT_MARGIN - cardW)}px`;
7799
+ }, [step]);
7800
+ import_react44.default.useLayoutEffect(() => {
7801
+ if (!open) return;
7802
+ place();
7803
+ const t = setTimeout(place, 400);
7804
+ return () => clearTimeout(t);
7805
+ }, [open, place]);
7806
+ import_react44.default.useEffect(() => {
7807
+ if (!open) return;
7808
+ const onMove = () => place();
7809
+ window.addEventListener("scroll", onMove, { passive: true, capture: true });
7810
+ window.addEventListener("resize", onMove, { passive: true });
7811
+ return () => {
7812
+ window.removeEventListener("scroll", onMove, true);
7813
+ window.removeEventListener("resize", onMove);
7814
+ };
7815
+ }, [open, place]);
7816
+ if (!open || !step) return null;
7817
+ return /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(Portal_default, { children: /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "lib-xplat-tour", role: "presentation", children: [
7818
+ !targetFound && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("div", { className: "lib-xplat-tour-dim" }),
7819
+ /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("div", { ref: spotRef, className: "lib-xplat-tour-spotlight", "aria-hidden": true }),
7820
+ /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(
7821
+ "div",
7822
+ {
7823
+ ref: cardRef,
7824
+ className: "lib-xplat-tour-card",
7825
+ role: "dialog",
7826
+ "aria-modal": "true",
7827
+ "aria-label": typeof step.title === "string" ? step.title : "\uD654\uBA74 \uC548\uB0B4",
7828
+ children: [
7829
+ /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "tour-card-progress", "aria-hidden": true, children: [
7830
+ index + 1,
7831
+ " / ",
7832
+ steps.length
7833
+ ] }),
7834
+ step.title && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("div", { className: "tour-card-title", children: step.title }),
7835
+ step.description && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("div", { className: "tour-card-description", children: step.description }),
7836
+ /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "tour-card-actions", children: [
7837
+ /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("button", { type: "button", className: "tour-skip", onClick: () => onClose("skip"), children: skipLabel }),
7838
+ /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "tour-card-nav", children: [
7839
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
7840
+ "button",
7841
+ {
7842
+ type: "button",
7843
+ className: clsx_default("tour-nav", "secondary"),
7844
+ onClick: () => goTo(index - 1),
7845
+ children: prevLabel
7846
+ }
7847
+ ),
7848
+ /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
7849
+ "button",
7850
+ {
7851
+ type: "button",
7852
+ className: clsx_default("tour-nav", "primary"),
7853
+ onClick: () => isLast ? onClose("done") : goTo(index + 1),
7854
+ children: isLast ? doneLabel : nextLabel
7855
+ }
7856
+ )
7857
+ ] })
7858
+ ] })
7859
+ ]
7860
+ }
7861
+ )
7862
+ ] }) });
7863
+ };
7864
+ Tour.displayName = "Tour";
7865
+ var Tour_default = Tour;
7866
+
7867
+ // src/components/Video/Video.tsx
7868
+ var import_react45 = __toESM(require("react"), 1);
7869
+ var import_jsx_runtime356 = require("react/jsx-runtime");
7870
+ 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: [
7871
+ /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
7872
+ /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("rect", { x: "12", y: "11", width: "7", height: "6", rx: "1", fill: "currentColor" })
7714
7873
  ] });
7715
7874
  var formatTime = (sec) => {
7716
7875
  if (!Number.isFinite(sec) || sec < 0) return "0:00";
@@ -7718,7 +7877,7 @@ var formatTime = (sec) => {
7718
7877
  const s = Math.floor(sec % 60);
7719
7878
  return `${m}:${s.toString().padStart(2, "0")}`;
7720
7879
  };
7721
- var Video = import_react44.default.forwardRef((props, ref) => {
7880
+ var Video = import_react45.default.forwardRef((props, ref) => {
7722
7881
  const {
7723
7882
  src,
7724
7883
  poster,
@@ -7742,21 +7901,21 @@ var Video = import_react44.default.forwardRef((props, ref) => {
7742
7901
  children,
7743
7902
  ...rest
7744
7903
  } = props;
7745
- const containerRef = import_react44.default.useRef(null);
7746
- const videoRef = import_react44.default.useRef(null);
7747
- const [isPlaying, setIsPlaying] = import_react44.default.useState(Boolean(autoPlay));
7748
- const [isLoaded, setIsLoaded] = import_react44.default.useState(false);
7749
- const [currentTime, setCurrentTime] = import_react44.default.useState(0);
7750
- const [duration, setDuration] = import_react44.default.useState(0);
7751
- const [buffered, setBuffered] = import_react44.default.useState(0);
7752
- const [volume, setVolume] = import_react44.default.useState(1);
7753
- const [isMuted, setIsMuted] = import_react44.default.useState(Boolean(muted));
7754
- const [isFullscreen, setIsFullscreen] = import_react44.default.useState(false);
7755
- const [playbackRate, setPlaybackRate] = import_react44.default.useState(1);
7756
- const [rateMenuOpen, setRateMenuOpen] = import_react44.default.useState(false);
7757
- const [captionsOn, setCaptionsOn] = import_react44.default.useState(false);
7758
- const [isPip, setIsPip] = import_react44.default.useState(false);
7759
- const setRefs = import_react44.default.useCallback(
7904
+ const containerRef = import_react45.default.useRef(null);
7905
+ const videoRef = import_react45.default.useRef(null);
7906
+ const [isPlaying, setIsPlaying] = import_react45.default.useState(Boolean(autoPlay));
7907
+ const [isLoaded, setIsLoaded] = import_react45.default.useState(false);
7908
+ const [currentTime, setCurrentTime] = import_react45.default.useState(0);
7909
+ const [duration, setDuration] = import_react45.default.useState(0);
7910
+ const [buffered, setBuffered] = import_react45.default.useState(0);
7911
+ const [volume, setVolume] = import_react45.default.useState(1);
7912
+ const [isMuted, setIsMuted] = import_react45.default.useState(Boolean(muted));
7913
+ const [isFullscreen, setIsFullscreen] = import_react45.default.useState(false);
7914
+ const [playbackRate, setPlaybackRate] = import_react45.default.useState(1);
7915
+ const [rateMenuOpen, setRateMenuOpen] = import_react45.default.useState(false);
7916
+ const [captionsOn, setCaptionsOn] = import_react45.default.useState(false);
7917
+ const [isPip, setIsPip] = import_react45.default.useState(false);
7918
+ const setRefs = import_react45.default.useCallback(
7760
7919
  (el) => {
7761
7920
  videoRef.current = el;
7762
7921
  if (typeof ref === "function") ref(el);
@@ -7764,14 +7923,14 @@ var Video = import_react44.default.forwardRef((props, ref) => {
7764
7923
  },
7765
7924
  [ref]
7766
7925
  );
7767
- import_react44.default.useEffect(() => {
7926
+ import_react45.default.useEffect(() => {
7768
7927
  const onFsChange = () => {
7769
7928
  setIsFullscreen(document.fullscreenElement === containerRef.current);
7770
7929
  };
7771
7930
  document.addEventListener("fullscreenchange", onFsChange);
7772
7931
  return () => document.removeEventListener("fullscreenchange", onFsChange);
7773
7932
  }, []);
7774
- import_react44.default.useEffect(() => {
7933
+ import_react45.default.useEffect(() => {
7775
7934
  const v = videoRef.current;
7776
7935
  if (!v) return;
7777
7936
  const onEnter = () => setIsPip(true);
@@ -7885,13 +8044,13 @@ var Video = import_react44.default.forwardRef((props, ref) => {
7885
8044
  const volumePct = (isMuted ? 0 : volume) * 100;
7886
8045
  const VolumeGlyph = isMuted || volume === 0 ? VolumeXIcon_default : volume < 0.5 ? VolumeIcon_default : Volume2Icon_default;
7887
8046
  const pipSupported = typeof document !== "undefined" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled;
7888
- return /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(
8047
+ return /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(
7889
8048
  "div",
7890
8049
  {
7891
8050
  ref: containerRef,
7892
8051
  className: clsx_default("lib-xplat-video", showControls && "has-controls"),
7893
8052
  children: [
7894
- /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
8053
+ /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
7895
8054
  "video",
7896
8055
  {
7897
8056
  ref: setRefs,
@@ -7912,7 +8071,7 @@ var Video = import_react44.default.forwardRef((props, ref) => {
7912
8071
  children
7913
8072
  }
7914
8073
  ),
7915
- showCenterPlay && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
8074
+ showCenterPlay && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
7916
8075
  "button",
7917
8076
  {
7918
8077
  type: "button",
@@ -7924,11 +8083,11 @@ var Video = import_react44.default.forwardRef((props, ref) => {
7924
8083
  onClick: togglePlay,
7925
8084
  "aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
7926
8085
  tabIndex: -1,
7927
- children: /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("span", { className: "center-play-icon", children: /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(PlayCircleIcon_default, {}) })
8086
+ children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("span", { className: "center-play-icon", children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(PlayCircleIcon_default, {}) })
7928
8087
  }
7929
8088
  ),
7930
- showControls && /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "controls", onClick: (e) => e.stopPropagation(), children: [
7931
- /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
8089
+ showControls && /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)("div", { className: "controls", onClick: (e) => e.stopPropagation(), children: [
8090
+ /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
7932
8091
  "input",
7933
8092
  {
7934
8093
  type: "range",
@@ -7945,29 +8104,29 @@ var Video = import_react44.default.forwardRef((props, ref) => {
7945
8104
  }
7946
8105
  }
7947
8106
  ),
7948
- /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "controls-row", children: [
7949
- /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
8107
+ /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)("div", { className: "controls-row", children: [
8108
+ /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
7950
8109
  "button",
7951
8110
  {
7952
8111
  type: "button",
7953
8112
  className: "control-btn",
7954
8113
  onClick: togglePlay,
7955
8114
  "aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
7956
- children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(PauseIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(PlayIcon_default, {})
8115
+ children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(PauseIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(PlayIcon_default, {})
7957
8116
  }
7958
8117
  ),
7959
- /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: "volume-group", children: [
7960
- /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
8118
+ /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)("div", { className: "volume-group", children: [
8119
+ /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
7961
8120
  "button",
7962
8121
  {
7963
8122
  type: "button",
7964
8123
  className: "control-btn",
7965
8124
  onClick: toggleMute,
7966
8125
  "aria-label": isMuted ? "\uC74C\uC18C\uAC70 \uD574\uC81C" : "\uC74C\uC18C\uAC70",
7967
- children: /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(VolumeGlyph, {})
8126
+ children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(VolumeGlyph, {})
7968
8127
  }
7969
8128
  ),
7970
- /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
8129
+ /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
7971
8130
  "input",
7972
8131
  {
7973
8132
  type: "range",
@@ -7982,14 +8141,14 @@ var Video = import_react44.default.forwardRef((props, ref) => {
7982
8141
  }
7983
8142
  )
7984
8143
  ] }),
7985
- /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("span", { className: "time", children: [
8144
+ /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)("span", { className: "time", children: [
7986
8145
  formatTime(currentTime),
7987
8146
  " / ",
7988
8147
  formatTime(duration)
7989
8148
  ] }),
7990
- /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("div", { className: "controls-spacer" }),
7991
- playbackRates && playbackRates.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)("div", { className: clsx_default("rate-group", rateMenuOpen && "is-open"), children: [
7992
- /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(
8149
+ /* @__PURE__ */ (0, import_jsx_runtime356.jsx)("div", { className: "controls-spacer" }),
8150
+ playbackRates && playbackRates.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)("div", { className: clsx_default("rate-group", rateMenuOpen && "is-open"), children: [
8151
+ /* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(
7993
8152
  "button",
7994
8153
  {
7995
8154
  type: "button",
@@ -8003,7 +8162,7 @@ var Video = import_react44.default.forwardRef((props, ref) => {
8003
8162
  ]
8004
8163
  }
8005
8164
  ),
8006
- rateMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("ul", { className: "rate-menu", role: "menu", children: playbackRates.map((r2) => /* @__PURE__ */ (0, import_jsx_runtime355.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime355.jsxs)(
8165
+ 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)(
8007
8166
  "button",
8008
8167
  {
8009
8168
  type: "button",
@@ -8017,7 +8176,7 @@ var Video = import_react44.default.forwardRef((props, ref) => {
8017
8176
  }
8018
8177
  ) }, r2)) })
8019
8178
  ] }),
8020
- showCaptions && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
8179
+ showCaptions && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
8021
8180
  "button",
8022
8181
  {
8023
8182
  type: "button",
@@ -8025,37 +8184,37 @@ var Video = import_react44.default.forwardRef((props, ref) => {
8025
8184
  onClick: toggleCaptions,
8026
8185
  "aria-label": captionsOn ? "\uC790\uB9C9 \uB044\uAE30" : "\uC790\uB9C9 \uCF1C\uAE30",
8027
8186
  "aria-pressed": captionsOn,
8028
- children: /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(TypeIcon_default, {})
8187
+ children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(TypeIcon_default, {})
8029
8188
  }
8030
8189
  ),
8031
- showPip && pipSupported && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
8190
+ showPip && pipSupported && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
8032
8191
  "button",
8033
8192
  {
8034
8193
  type: "button",
8035
8194
  className: clsx_default("control-btn", isPip && "is-active"),
8036
8195
  onClick: togglePip,
8037
8196
  "aria-label": isPip ? "PIP \uC885\uB8CC" : "PIP",
8038
- children: /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(PipIcon, {})
8197
+ children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(PipIcon, {})
8039
8198
  }
8040
8199
  ),
8041
- showDownload && /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
8200
+ showDownload && /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
8042
8201
  "a",
8043
8202
  {
8044
8203
  className: "control-btn",
8045
8204
  href: src,
8046
8205
  download: downloadFileName ?? true,
8047
8206
  "aria-label": "\uB2E4\uC6B4\uB85C\uB4DC",
8048
- children: /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(DownloadIcon_default, {})
8207
+ children: /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(DownloadIcon_default, {})
8049
8208
  }
8050
8209
  ),
8051
- /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(
8210
+ /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(
8052
8211
  "button",
8053
8212
  {
8054
8213
  type: "button",
8055
8214
  className: "control-btn",
8056
8215
  onClick: toggleFullscreen,
8057
8216
  "aria-label": isFullscreen ? "\uC804\uCCB4\uD654\uBA74 \uC885\uB8CC" : "\uC804\uCCB4\uD654\uBA74",
8058
- children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(MinimizeIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime355.jsx)(MaximizeIcon_default, {})
8217
+ children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(MinimizeIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime356.jsx)(MaximizeIcon_default, {})
8059
8218
  }
8060
8219
  )
8061
8220
  ] })
@@ -8129,6 +8288,7 @@ var Video_default = Video;
8129
8288
  ToastProvider,
8130
8289
  ToggleChip,
8131
8290
  Tooltip,
8291
+ Tour,
8132
8292
  Video,
8133
8293
  hasError,
8134
8294
  isInRange,
@@ -5871,6 +5871,122 @@
5871
5871
  opacity: 0.4;
5872
5872
  }
5873
5873
 
5874
+ /* src/components/Tour/tour.scss */
5875
+ .lib-xplat-tour {
5876
+ position: fixed;
5877
+ inset: 0;
5878
+ z-index: 1100;
5879
+ pointer-events: none;
5880
+ }
5881
+ .lib-xplat-tour-dim {
5882
+ position: fixed;
5883
+ inset: 0;
5884
+ background-color: var(--semantic-interaction-overlay-50);
5885
+ pointer-events: auto;
5886
+ }
5887
+ .lib-xplat-tour-spotlight {
5888
+ position: fixed;
5889
+ border-radius: var(--spacing-radius-md);
5890
+ box-shadow: 0 0 0 9999px var(--semantic-interaction-overlay-50);
5891
+ pointer-events: auto;
5892
+ transition:
5893
+ top 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
5894
+ left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
5895
+ width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
5896
+ height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
5897
+ }
5898
+ .lib-xplat-tour-card {
5899
+ position: fixed;
5900
+ pointer-events: auto;
5901
+ box-sizing: border-box;
5902
+ width: 320px;
5903
+ max-width: calc(100vw - var(--spacing-space-8));
5904
+ overflow-y: auto;
5905
+ padding: var(--spacing-space-4);
5906
+ border-radius: var(--spacing-radius-md);
5907
+ background-color: var(--semantic-surface-neutral-primary);
5908
+ box-shadow: var(--semantic-shadow-lg);
5909
+ }
5910
+ .lib-xplat-tour-card .tour-card-progress {
5911
+ font-family: var(--semantic-typo-caption-2-r-font);
5912
+ font-size: var(--semantic-typo-caption-2-r-size);
5913
+ line-height: var(--semantic-typo-caption-2-r-lh);
5914
+ font-weight: var(--semantic-typo-caption-2-r-weight);
5915
+ letter-spacing: var(--semantic-typo-caption-2-r-ls);
5916
+ color: var(--semantic-text-tertiary);
5917
+ margin-bottom: var(--spacing-space-1);
5918
+ }
5919
+ .lib-xplat-tour-card .tour-card-title {
5920
+ font-family: var(--semantic-typo-label-1-sb-font);
5921
+ font-size: var(--semantic-typo-label-1-sb-size);
5922
+ line-height: var(--semantic-typo-label-1-sb-lh);
5923
+ font-weight: var(--semantic-typo-label-1-sb-weight);
5924
+ letter-spacing: var(--semantic-typo-label-1-sb-ls);
5925
+ color: var(--semantic-text-primary);
5926
+ margin-bottom: var(--spacing-space-2);
5927
+ }
5928
+ .lib-xplat-tour-card .tour-card-description {
5929
+ font-family: var(--semantic-typo-caption-1-r-font);
5930
+ font-size: var(--semantic-typo-caption-1-r-size);
5931
+ line-height: var(--semantic-typo-caption-1-r-lh);
5932
+ font-weight: var(--semantic-typo-caption-1-r-weight);
5933
+ letter-spacing: var(--semantic-typo-caption-1-r-ls);
5934
+ color: var(--semantic-text-secondary);
5935
+ overflow-wrap: anywhere;
5936
+ }
5937
+ .lib-xplat-tour-card .tour-card-actions {
5938
+ display: flex;
5939
+ align-items: center;
5940
+ justify-content: space-between;
5941
+ gap: var(--spacing-space-2);
5942
+ margin-top: var(--spacing-space-4);
5943
+ }
5944
+ .lib-xplat-tour-card .tour-card-nav {
5945
+ display: flex;
5946
+ gap: var(--spacing-space-2);
5947
+ }
5948
+ .lib-xplat-tour-card .tour-skip,
5949
+ .lib-xplat-tour-card .tour-nav {
5950
+ font-family: inherit;
5951
+ cursor: pointer;
5952
+ border-radius: var(--spacing-radius-sm);
5953
+ padding: var(--spacing-space-1) var(--spacing-space-3);
5954
+ font-family: var(--semantic-typo-caption-1-r-font);
5955
+ font-size: var(--semantic-typo-caption-1-r-size);
5956
+ line-height: var(--semantic-typo-caption-1-r-lh);
5957
+ font-weight: var(--semantic-typo-caption-1-r-weight);
5958
+ letter-spacing: var(--semantic-typo-caption-1-r-ls);
5959
+ border: 1px solid transparent;
5960
+ background: none;
5961
+ transition: background-color 0.15s ease;
5962
+ }
5963
+ .lib-xplat-tour-card .tour-skip:focus-visible,
5964
+ .lib-xplat-tour-card .tour-nav:focus-visible {
5965
+ outline: 2px solid var(--semantic-interaction-focus-ring);
5966
+ outline-offset: 2px;
5967
+ }
5968
+ .lib-xplat-tour-card .tour-skip {
5969
+ color: var(--semantic-text-tertiary);
5970
+ }
5971
+ .lib-xplat-tour-card .tour-skip:hover {
5972
+ color: var(--semantic-text-secondary);
5973
+ background-color: var(--semantic-surface-neutral-secondary);
5974
+ }
5975
+ .lib-xplat-tour-card .tour-nav.secondary {
5976
+ color: var(--semantic-text-secondary);
5977
+ border-color: var(--semantic-border-primary);
5978
+ }
5979
+ .lib-xplat-tour-card .tour-nav.secondary:hover {
5980
+ background-color: var(--semantic-surface-neutral-secondary);
5981
+ }
5982
+ .lib-xplat-tour-card .tour-nav.primary {
5983
+ color: var(--semantic-text-inverse);
5984
+ background-color: var(--semantic-surface-brand-default);
5985
+ }
5986
+ .lib-xplat-tour-card .tour-nav.primary:hover {
5987
+ background-color: var(--semantic-surface-brand-strong);
5988
+ }
5989
+
5874
5990
  /* src/components/Video/video.scss */
5875
5991
  .lib-xplat-video {
5876
5992
  position: relative;
@@ -46,6 +46,7 @@ export { TimePicker } from './TimePicker/index.cjs';
46
46
  export { ToastProvider, useToast } from './Toast/index.cjs';
47
47
  export { ToggleChip } from './ToggleChip/index.cjs';
48
48
  export { Tooltip } from './Tooltip/index.cjs';
49
+ export { Tour, TourStep } from './Tour/index.cjs';
49
50
  export { Video, VideoProps } from './Video/index.cjs';
50
51
  import 'react';
51
52
  import '../attributes-DJIWir_0.cjs';
@@ -46,6 +46,7 @@ export { TimePicker } from './TimePicker/index.js';
46
46
  export { ToastProvider, useToast } from './Toast/index.js';
47
47
  export { ToggleChip } from './ToggleChip/index.js';
48
48
  export { Tooltip } from './Tooltip/index.js';
49
+ export { Tour, TourStep } from './Tour/index.js';
49
50
  export { Video, VideoProps } from './Video/index.js';
50
51
  import 'react';
51
52
  import '../attributes-DJIWir_0.js';