wimui 0.62.2 → 0.63.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.
Files changed (73) hide show
  1. package/dist/components/_internal/OverlayBase.cjs +1 -1
  2. package/dist/components/_internal/OverlayBase.js +31 -30
  3. package/dist/components/_internal/composeEventHandlers.cjs +2 -0
  4. package/dist/components/_internal/composeEventHandlers.d.ts +25 -0
  5. package/dist/components/_internal/composeEventHandlers.js +8 -0
  6. package/dist/components/_internal/observeMove.cjs +2 -0
  7. package/dist/components/_internal/observeMove.d.ts +16 -0
  8. package/dist/components/_internal/observeMove.js +44 -0
  9. package/dist/components/ai/ChatUI/ChatUI.cjs +1 -1
  10. package/dist/components/ai/ChatUI/ChatUI.js +83 -82
  11. package/dist/components/data-display/Accordion/Accordion.cjs +1 -1
  12. package/dist/components/data-display/Accordion/Accordion.js +79 -78
  13. package/dist/components/data-display/PullToRefresh/PullToRefresh.cjs +1 -1
  14. package/dist/components/data-display/PullToRefresh/PullToRefresh.js +73 -72
  15. package/dist/components/data-display/SortableList/SortableList.cjs +1 -1
  16. package/dist/components/data-display/SortableList/SortableList.js +54 -53
  17. package/dist/components/data-display/SwipeAction/SwipeAction.cjs +1 -1
  18. package/dist/components/data-display/SwipeAction/SwipeAction.js +77 -76
  19. package/dist/components/feedback/Tour/Tour.cjs +1 -1
  20. package/dist/components/feedback/Tour/Tour.js +91 -88
  21. package/dist/components/form/Button/Button.cjs +1 -1
  22. package/dist/components/form/Button/Button.d.ts +2 -2
  23. package/dist/components/form/Button/Button.js +14 -12
  24. package/dist/components/form/Cascader/Cascader.cjs +1 -1
  25. package/dist/components/form/Cascader/Cascader.js +99 -98
  26. package/dist/components/form/DatePicker/DatePicker.cjs +1 -1
  27. package/dist/components/form/DatePicker/DatePicker.js +53 -52
  28. package/dist/components/form/RangeSlider/RangeSlider.cjs +1 -1
  29. package/dist/components/form/RangeSlider/RangeSlider.js +109 -108
  30. package/dist/components/form/Rating/Rating.cjs +1 -1
  31. package/dist/components/form/Rating/Rating.js +75 -74
  32. package/dist/components/form/Slider/Slider.cjs +1 -1
  33. package/dist/components/form/Slider/Slider.js +58 -57
  34. package/dist/components/form/SmartSearchInput/SmartSearchInput.cjs +1 -1
  35. package/dist/components/form/SmartSearchInput/SmartSearchInput.js +65 -64
  36. package/dist/components/form/Textarea/Textarea.cjs +1 -1
  37. package/dist/components/form/Textarea/Textarea.js +4 -4
  38. package/dist/components/form/TimePicker/TimePicker.cjs +1 -1
  39. package/dist/components/form/TimePicker/TimePicker.js +31 -30
  40. package/dist/components/layout/Dashboard/Dashboard.cjs +1 -1
  41. package/dist/components/layout/Dashboard/Dashboard.js +3 -2
  42. package/dist/components/layout/InteractiveArea/InteractiveArea.cjs +1 -1
  43. package/dist/components/layout/InteractiveArea/InteractiveArea.js +1 -1
  44. package/dist/components/layout/Navbar/Navbar.cjs +1 -1
  45. package/dist/components/layout/Navbar/Navbar.js +68 -66
  46. package/dist/components/layout/Splitter/Splitter.cjs +1 -1
  47. package/dist/components/layout/Splitter/Splitter.js +47 -46
  48. package/dist/components/layout/Transition/Transition.cjs +1 -1
  49. package/dist/components/layout/Transition/Transition.js +25 -24
  50. package/dist/components/media/Audio/Audio.cjs +1 -1
  51. package/dist/components/media/Audio/Audio.js +39 -38
  52. package/dist/components/media/Image/Image.cjs +2 -2
  53. package/dist/components/media/Image/Image.js +96 -95
  54. package/dist/components/media/ImageCompare/ImageCompare.cjs +1 -1
  55. package/dist/components/media/ImageCompare/ImageCompare.js +75 -73
  56. package/dist/components/media/Video/Video.cjs +1 -1
  57. package/dist/components/media/Video/Video.js +114 -113
  58. package/dist/components/navigation/Affix/Affix.cjs +1 -1
  59. package/dist/components/navigation/Affix/Affix.js +39 -36
  60. package/dist/components/navigation/Menubar/Menubar.cjs +1 -1
  61. package/dist/components/navigation/Menubar/Menubar.js +67 -61
  62. package/dist/components/navigation/SpeedDial/SpeedDial.cjs +1 -1
  63. package/dist/components/navigation/SpeedDial/SpeedDial.js +47 -46
  64. package/dist/components/navigation/Tabs/Tabs.cjs +1 -1
  65. package/dist/components/navigation/Tabs/Tabs.js +87 -86
  66. package/dist/components/overlay/Dropdown/Dropdown.cjs +1 -1
  67. package/dist/components/overlay/Dropdown/Dropdown.js +42 -36
  68. package/dist/components/overlay/Popover/Popover.cjs +1 -1
  69. package/dist/components/overlay/Popover/Popover.js +1 -1
  70. package/dist/llms-full.txt +3 -3
  71. package/dist/llms.txt +1 -1
  72. package/dist/wimui.umd.js +5 -5
  73. package/package.json +1 -1
@@ -1,103 +1,105 @@
1
1
  "use client";
2
2
  import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
3
3
  import { commonNs as t } from "../../../i18n/generated/common.js";
4
- import n from "../../../icon/chevron-left.js";
5
- import r from "../../../icon/chevron-right.js";
6
- import { Icon as i } from "../Icon/Icon.js";
7
- import a from "./image-compare.module.js";
8
- import o, { useCallback as s, useRef as c, useState as l } from "react";
9
- import u from "classnames";
10
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
4
+ import { composeEventHandlers as n } from "../../_internal/composeEventHandlers.js";
5
+ import r from "../../../icon/chevron-left.js";
6
+ import i from "../../../icon/chevron-right.js";
7
+ import { Icon as a } from "../Icon/Icon.js";
8
+ import o from "./image-compare.module.js";
9
+ import s, { useCallback as c, useRef as l, useState as u } from "react";
10
+ import d from "classnames";
11
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
11
12
  //#region src/components/media/ImageCompare/ImageCompare.tsx
12
- var p = (e) => Math.max(0, Math.min(100, e)), m = o.forwardRef(({ before: o, after: m, beforeAlt: h = "", afterAlt: g = "", beforeLabel: _, afterLabel: v, defaultPosition: y = 50, position: b, onPositionChange: x, orientation: S = "horizontal", width: C, height: w, radius: T = "md", labels: E, className: D, "aria-label": O, "aria-labelledby": k, "aria-describedby": A, ...j }, M) => {
13
- let { t: N } = e(t), { handleAriaLabel: P = N("imageCompare.handle") } = E ?? {}, F = b !== void 0, [I, L] = l(p(y)), R = p(F ? b : I), z = S === "vertical", B = c(null), V = c(!1), H = s((e) => {
14
- B.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
15
- }, [M]), U = s((e) => {
16
- let t = p(e);
17
- F || L(t), x?.(t);
18
- }, [F, x]), W = s((e, t) => {
19
- let n = B.current?.getBoundingClientRect();
13
+ var m = (e) => Math.max(0, Math.min(100, e)), h = s.forwardRef(({ before: s, after: h, beforeAlt: g = "", afterAlt: _ = "", beforeLabel: v, afterLabel: y, defaultPosition: b = 50, position: x, onPositionChange: S, orientation: C = "horizontal", width: w, height: T, radius: E = "md", labels: D, className: O, "aria-label": k, "aria-labelledby": A, "aria-describedby": j, ...M }, N) => {
14
+ let { t: P } = e(t), { handleAriaLabel: F = P("imageCompare.handle") } = D ?? {}, I = x !== void 0, [L, R] = u(m(b)), z = m(I ? x : L), B = C === "vertical", V = l(null), H = l(!1), U = c((e) => {
15
+ V.current = e, typeof N == "function" ? N(e) : N && (N.current = e);
16
+ }, [N]), W = c((e) => {
17
+ let t = m(e);
18
+ I || R(t), S?.(t);
19
+ }, [I, S]), G = c((e, t) => {
20
+ let n = V.current?.getBoundingClientRect();
20
21
  if (!n) return;
21
- let r = z ? (t - n.top) / n.height * 100 : (e - n.left) / n.width * 100;
22
- U(r);
23
- }, [z, U]), G = (e) => {
24
- V.current = !0, e.currentTarget.setPointerCapture(e.pointerId), W(e.clientX, e.clientY);
25
- }, K = (e) => {
26
- V.current && W(e.clientX, e.clientY);
22
+ let r = B ? (t - n.top) / n.height * 100 : (e - n.left) / n.width * 100;
23
+ W(r);
24
+ }, [B, W]), K = (e) => {
25
+ H.current = !0, e.currentTarget.setPointerCapture(e.pointerId), G(e.clientX, e.clientY);
27
26
  }, q = (e) => {
28
- V.current = !1, e.currentTarget.releasePointerCapture?.(e.pointerId);
27
+ H.current && G(e.clientX, e.clientY);
29
28
  }, J = (e) => {
30
- let t = e.shiftKey ? 10 : 2, n = z ? "ArrowUp" : "ArrowLeft", r = z ? "ArrowDown" : "ArrowRight";
31
- e.key === n ? (e.preventDefault(), U(R - t)) : e.key === r ? (e.preventDefault(), U(R + t)) : e.key === "Home" ? (e.preventDefault(), U(0)) : e.key === "End" && (e.preventDefault(), U(100));
32
- }, Y = z ? { clipPath: `inset(0 0 ${100 - R}% 0)` } : { clipPath: `inset(0 ${100 - R}% 0 0)` }, X = z ? { top: `${R}%` } : { left: `${R}%` };
33
- return /* @__PURE__ */ f("div", {
34
- ref: H,
35
- className: u("wim-image-compare", a.root, z && a.vertical, a[`radius-${T}`], D),
29
+ H.current = !1, e.currentTarget.releasePointerCapture?.(e.pointerId);
30
+ }, Y = (e) => {
31
+ let t = e.shiftKey ? 10 : 2, n = B ? "ArrowUp" : "ArrowLeft", r = B ? "ArrowDown" : "ArrowRight";
32
+ e.key === n ? (e.preventDefault(), W(z - t)) : e.key === r ? (e.preventDefault(), W(z + t)) : e.key === "Home" ? (e.preventDefault(), W(0)) : e.key === "End" && (e.preventDefault(), W(100));
33
+ }, X = B ? { clipPath: `inset(0 0 ${100 - z}% 0)` } : { clipPath: `inset(0 ${100 - z}% 0 0)` }, Z = B ? { top: `${z}%` } : { left: `${z}%` };
34
+ return /* @__PURE__ */ p("div", {
35
+ ref: U,
36
+ className: d("wim-image-compare", o.root, B && o.vertical, o[`radius-${E}`], O),
37
+ ...M,
38
+ onPointerDown: n(M.onPointerDown, K),
39
+ onPointerMove: n(M.onPointerMove, q),
40
+ onPointerUp: n(M.onPointerUp, J),
36
41
  style: {
37
- width: C,
38
- height: w
42
+ width: w,
43
+ height: T,
44
+ ...M.style
39
45
  },
40
- onPointerDown: G,
41
- onPointerMove: K,
42
- onPointerUp: q,
43
- ...j,
44
46
  children: [
45
- /* @__PURE__ */ d("img", {
46
- className: a.image,
47
- src: m,
48
- alt: g,
47
+ /* @__PURE__ */ f("img", {
48
+ className: o.image,
49
+ src: h,
50
+ alt: _,
49
51
  draggable: !1
50
52
  }),
51
- v && /* @__PURE__ */ d("span", {
52
- className: u(a.label, a.afterLabel),
53
- children: v
53
+ y && /* @__PURE__ */ f("span", {
54
+ className: d(o.label, o.afterLabel),
55
+ children: y
54
56
  }),
55
- /* @__PURE__ */ f("div", {
56
- className: a.beforeLayer,
57
- style: Y,
58
- children: [/* @__PURE__ */ d("img", {
59
- className: a.image,
60
- src: o,
61
- alt: h,
57
+ /* @__PURE__ */ p("div", {
58
+ className: o.beforeLayer,
59
+ style: X,
60
+ children: [/* @__PURE__ */ f("img", {
61
+ className: o.image,
62
+ src: s,
63
+ alt: g,
62
64
  draggable: !1
63
- }), _ && /* @__PURE__ */ d("span", {
64
- className: u(a.label, a.beforeLabel),
65
- children: _
65
+ }), v && /* @__PURE__ */ f("span", {
66
+ className: d(o.label, o.beforeLabel),
67
+ children: v
66
68
  })]
67
69
  }),
68
- /* @__PURE__ */ f("div", {
69
- className: a.divider,
70
- style: X,
71
- children: [/* @__PURE__ */ d("span", {
72
- className: a.line,
70
+ /* @__PURE__ */ p("div", {
71
+ className: o.divider,
72
+ style: Z,
73
+ children: [/* @__PURE__ */ f("span", {
74
+ className: o.line,
73
75
  "aria-hidden": "true"
74
- }), /* @__PURE__ */ f("button", {
76
+ }), /* @__PURE__ */ p("button", {
75
77
  type: "button",
76
- className: a.handle,
78
+ className: o.handle,
77
79
  role: "slider",
78
- "aria-label": k ? void 0 : O ?? P,
79
- "aria-labelledby": k,
80
- "aria-describedby": A,
81
- "aria-orientation": S,
82
- "aria-valuenow": Math.round(R),
80
+ "aria-label": A ? void 0 : k ?? F,
81
+ "aria-labelledby": A,
82
+ "aria-describedby": j,
83
+ "aria-orientation": C,
84
+ "aria-valuenow": Math.round(z),
83
85
  "aria-valuemin": 0,
84
86
  "aria-valuemax": 100,
85
- onKeyDown: J,
86
- onPointerDown: G,
87
- children: [/* @__PURE__ */ d(i, {
88
- component: n,
89
- size: "sm",
90
- className: a.arrow
91
- }), /* @__PURE__ */ d(i, {
87
+ onKeyDown: Y,
88
+ onPointerDown: K,
89
+ children: [/* @__PURE__ */ f(a, {
92
90
  component: r,
93
91
  size: "sm",
94
- className: a.arrow
92
+ className: o.arrow
93
+ }), /* @__PURE__ */ f(a, {
94
+ component: i,
95
+ size: "sm",
96
+ className: o.arrow
95
97
  })]
96
98
  })]
97
99
  })
98
100
  ]
99
101
  });
100
102
  });
101
- m.displayName = "ImageCompare";
103
+ h.displayName = "ImageCompare";
102
104
  //#endregion
103
- export { m as ImageCompare };
105
+ export { h as ImageCompare };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("../Icon/Icon.cjs"),ee=require("../../../hooks/useMediaLoader.cjs"),i=require("./hooks/useVideoPlayer.cjs"),a=require("./components/VideoAdvancedMenu.cjs"),o=require("./components/VideoControls.cjs"),s=require("./video.module.cjs");let c=require("react");c=e.__toESM(c,1);let l=require("classnames");l=e.__toESM(l,1);let u=require("react/jsx-runtime");var d=({src:e,width:d,height:te,autoPlay:f=!1,loop:p=!1,muted:m=!1,controls:h=!0,poster:g,radius:_=`none`,shadow:v=!1,border:y=!1,fit:b=`cover`,preload:x,caption:S,className:C,style:ne,customControls:w=!1,advancedControls:T=!1,videoId:E,resumePlayback:D=!1,playlist:O,autoPlayNext:k=!1,qualities:A,loading:j=`lazy`,fadeIn:M=!1,demoDelay:N,labels:P={},tracks:F,...I})=>{let{t:L}=t.useWimTranslation(n.commonNs),{videoAriaLabel:R=L(`video.label`),seconds:z=`s`}=P,{containerRef:B,isLoaded:V,isIntersecting:H,notifyLoaded:U,shouldShowSkeleton:W}=ee.useMediaLoader({loading:j,src:A?.[0]?.src||O?.[0]?.src||e,demoDelay:N}),G=i.useVideoPlayer({src:e,autoPlay:f,loop:p,muted:m,fit:b,videoId:E,resumePlayback:D,playlist:O,autoPlayNext:k,qualities:A,customControls:w,advancedControls:T,poster:g,containerRef:B}),{videoRef:K,isPlaying:q,activeSrc:J,activePoster:Y,showNativeControls:X,skipIndicator:Z,activeMenu:Q,setActiveMenu:$}=G;c.default.useEffect(()=>{let e=K.current;e&&(m?e.setAttribute(`muted`,``):e.removeAttribute(`muted`))},[m,K,J,H]);let re={width:`100%`,height:te||`auto`,objectFit:G.activeFit,...ne},ie=_===`none`?null:s.default[`radius${_.charAt(0).toUpperCase()+_.slice(1)}`];return(0,u.jsxs)(`figure`,{className:(0,l.default)(`wim-video`,s.default.root,C),style:{width:`100%`},"aria-label":R,"data-testid":`video-root`,children:[(0,u.jsxs)(`div`,{className:(0,l.default)(s.default.inner,ie,v&&s.default.shadow,y&&s.default.border,(w||T)&&s.default.custom,M&&s.default.fadeIn,M&&V&&s.default.isLoaded,W&&s.default.loading),ref:B,"data-testid":`video-inner`,children:[H&&(0,u.jsx)(`video`,{ref:K,src:J,className:s.default.video,style:re,autoPlay:f&&V,loop:p&&(!O||O.length<=1),muted:m,controls:X&&h,poster:Y,preload:x,playsInline:!0,onTimeUpdate:G.handleTimeUpdate,onLoadedMetadata:G.handleLoadedMetadata,onLoadedData:U,onEnded:G.handleEnded,onPlay:()=>{},onPause:()=>{},onClick:G.handleVideoClick,"data-testid":`video-element`,...I,children:F?.map((e,t)=>(0,u.jsx)(`track`,{...e},t))}),Z.show&&(0,u.jsxs)(`div`,{className:s.default.skipIndicator,children:[(0,u.jsx)(r.Icon,{name:Z.direction===`forward`?`ChevronRightIcon`:`ChevronLeftIcon`,size:`lg`}),(0,u.jsx)(r.Icon,{name:Z.direction===`forward`?`ChevronRightIcon`:`ChevronLeftIcon`,size:`lg`}),(0,u.jsx)(r.Icon,{name:Z.direction===`forward`?`ChevronRightIcon`:`ChevronLeftIcon`,size:`lg`}),(0,u.jsxs)(`span`,{children:[`10`,z]})]}),(w||T)&&(0,u.jsxs)(`div`,{role:`none`,className:s.default.customControls,onClick:()=>Q&&$(null),children:[T&&(0,u.jsx)(a.VideoAdvancedMenu,{styles:s.default,activeMenu:Q,setActiveMenu:$,qualities:A,currentQualityIndex:G.currentQualityIndex,handleQualityChange:G.handleQualityChange,playbackRate:G.playbackRate,setPlaybackRate:G.setPlaybackRate,activeFit:G.activeFit,setActiveFit:G.setActiveFit,playlist:O,currentPlayIndex:G.currentPlayIndex,playPlaylistItem:G.playPlaylistItem,labels:P}),(0,u.jsx)(o.VideoControls,{styles:s.default,playlist:O,advancedControls:T,currentPlayIndex:G.currentPlayIndex,setCurrentPlayIndex:G.setCurrentPlayIndex,skip:G.skip,isPlaying:q,togglePlay:G.togglePlay,currentTime:G.currentTime,duration:G.duration,handleSeek:G.handleSeek,volume:G.volume,isMuted:G.isMuted,toggleMute:G.toggleMute,handleVolumeChange:G.handleVolumeChange,activeMenu:Q,setActiveMenu:$,togglePiP:G.togglePiP,isFullscreen:G.isFullscreen,toggleFullscreen:G.toggleFullscreen,formatTime:G.formatTime,labels:P})]})]}),S&&(0,u.jsx)(`figcaption`,{className:s.default.caption,"data-testid":`video-caption`,children:S})]})};exports.Video=d;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("../../_internal/composeEventHandlers.cjs"),i=require("../Icon/Icon.cjs"),a=require("../../../hooks/useMediaLoader.cjs"),ee=require("./hooks/useVideoPlayer.cjs"),o=require("./components/VideoAdvancedMenu.cjs"),s=require("./components/VideoControls.cjs"),c=require("./video.module.cjs");let l=require("react");l=e.__toESM(l,1);let u=require("classnames");u=e.__toESM(u,1);let d=require("react/jsx-runtime");var f=({src:e,width:f,height:p,autoPlay:m=!1,loop:h=!1,muted:g=!1,controls:_=!0,poster:te,radius:v=`none`,shadow:ne=!1,border:y=!1,fit:b=`cover`,preload:x,caption:S,className:C,style:w,customControls:T=!1,advancedControls:E=!1,videoId:D,resumePlayback:O=!1,playlist:k,autoPlayNext:A=!1,qualities:j,loading:M=`lazy`,fadeIn:N=!1,demoDelay:P,labels:F={},tracks:I,...L})=>{let{t:R}=t.useWimTranslation(n.commonNs),{videoAriaLabel:z=R(`video.label`),seconds:B=`s`}=F,{containerRef:V,isLoaded:H,isIntersecting:U,notifyLoaded:W,shouldShowSkeleton:G}=a.useMediaLoader({loading:M,src:j?.[0]?.src||k?.[0]?.src||e,demoDelay:P}),K=ee.useVideoPlayer({src:e,autoPlay:m,loop:h,muted:g,fit:b,videoId:D,resumePlayback:O,playlist:k,autoPlayNext:A,qualities:j,customControls:T,advancedControls:E,poster:te,containerRef:V}),{videoRef:q,isPlaying:J,activeSrc:Y,activePoster:X,showNativeControls:re,skipIndicator:Z,activeMenu:Q,setActiveMenu:$}=K;l.default.useEffect(()=>{let e=q.current;e&&(g?e.setAttribute(`muted`,``):e.removeAttribute(`muted`))},[g,q,Y,U]);let ie={width:`100%`,height:p||`auto`,objectFit:K.activeFit,...w},ae=v===`none`?null:c.default[`radius${v.charAt(0).toUpperCase()+v.slice(1)}`];return(0,d.jsxs)(`figure`,{className:(0,u.default)(`wim-video`,c.default.root,C),style:{width:`100%`},"aria-label":z,"data-testid":`video-root`,children:[(0,d.jsxs)(`div`,{className:(0,u.default)(c.default.inner,ae,ne&&c.default.shadow,y&&c.default.border,(T||E)&&c.default.custom,N&&c.default.fadeIn,N&&H&&c.default.isLoaded,G&&c.default.loading),ref:V,"data-testid":`video-inner`,children:[U&&(0,d.jsx)(`video`,{ref:q,src:Y,className:c.default.video,style:ie,autoPlay:m&&H,loop:h&&(!k||k.length<=1),muted:g,controls:re&&_,poster:X,preload:x,playsInline:!0,"data-testid":`video-element`,...L,onTimeUpdate:r.composeEventHandlers(L.onTimeUpdate,K.handleTimeUpdate),onLoadedMetadata:r.composeEventHandlers(L.onLoadedMetadata,K.handleLoadedMetadata),onLoadedData:r.composeEventHandlers(L.onLoadedData,W),onEnded:r.composeEventHandlers(L.onEnded,K.handleEnded),onPlay:r.composeEventHandlers(L.onPlay,()=>{}),onPause:r.composeEventHandlers(L.onPause,()=>{}),onClick:r.composeEventHandlers(L.onClick,K.handleVideoClick),children:I?.map((e,t)=>(0,d.jsx)(`track`,{...e},t))}),Z.show&&(0,d.jsxs)(`div`,{className:c.default.skipIndicator,children:[(0,d.jsx)(i.Icon,{name:Z.direction===`forward`?`ChevronRightIcon`:`ChevronLeftIcon`,size:`lg`}),(0,d.jsx)(i.Icon,{name:Z.direction===`forward`?`ChevronRightIcon`:`ChevronLeftIcon`,size:`lg`}),(0,d.jsx)(i.Icon,{name:Z.direction===`forward`?`ChevronRightIcon`:`ChevronLeftIcon`,size:`lg`}),(0,d.jsxs)(`span`,{children:[`10`,B]})]}),(T||E)&&(0,d.jsxs)(`div`,{role:`none`,className:c.default.customControls,onClick:()=>Q&&$(null),children:[E&&(0,d.jsx)(o.VideoAdvancedMenu,{styles:c.default,activeMenu:Q,setActiveMenu:$,qualities:j,currentQualityIndex:K.currentQualityIndex,handleQualityChange:K.handleQualityChange,playbackRate:K.playbackRate,setPlaybackRate:K.setPlaybackRate,activeFit:K.activeFit,setActiveFit:K.setActiveFit,playlist:k,currentPlayIndex:K.currentPlayIndex,playPlaylistItem:K.playPlaylistItem,labels:F}),(0,d.jsx)(s.VideoControls,{styles:c.default,playlist:k,advancedControls:E,currentPlayIndex:K.currentPlayIndex,setCurrentPlayIndex:K.setCurrentPlayIndex,skip:K.skip,isPlaying:J,togglePlay:K.togglePlay,currentTime:K.currentTime,duration:K.duration,handleSeek:K.handleSeek,volume:K.volume,isMuted:K.isMuted,toggleMute:K.toggleMute,handleVolumeChange:K.handleVolumeChange,activeMenu:Q,setActiveMenu:$,togglePiP:K.togglePiP,isFullscreen:K.isFullscreen,toggleFullscreen:K.toggleFullscreen,formatTime:K.formatTime,labels:F})]})]}),S&&(0,d.jsx)(`figcaption`,{className:c.default.caption,"data-testid":`video-caption`,children:S})]})};exports.Video=f;
@@ -1,154 +1,155 @@
1
1
  "use client";
2
2
  import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
3
3
  import { commonNs as t } from "../../../i18n/generated/common.js";
4
- import { Icon as n } from "../Icon/Icon.js";
5
- import { useMediaLoader as ee } from "../../../hooks/useMediaLoader.js";
6
- import { useVideoPlayer as r } from "./hooks/useVideoPlayer.js";
7
- import { VideoAdvancedMenu as i } from "./components/VideoAdvancedMenu.js";
8
- import { VideoControls as a } from "./components/VideoControls.js";
9
- import o from "./video.module.js";
10
- import s from "react";
11
- import c from "classnames";
12
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
4
+ import { composeEventHandlers as n } from "../../_internal/composeEventHandlers.js";
5
+ import { Icon as r } from "../Icon/Icon.js";
6
+ import { useMediaLoader as i } from "../../../hooks/useMediaLoader.js";
7
+ import { useVideoPlayer as a } from "./hooks/useVideoPlayer.js";
8
+ import { VideoAdvancedMenu as o } from "./components/VideoAdvancedMenu.js";
9
+ import { VideoControls as s } from "./components/VideoControls.js";
10
+ import c from "./video.module.js";
11
+ import l from "react";
12
+ import u from "classnames";
13
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
13
14
  //#region src/components/media/Video/Video.tsx
14
- var d = ({ src: d, width: te, height: f, autoPlay: p = !1, loop: m = !1, muted: h = !1, controls: ne = !0, poster: re, radius: g = "none", shadow: _ = !1, border: v = !1, fit: y = "cover", preload: b, caption: x, className: S, style: C, customControls: w = !1, advancedControls: T = !1, videoId: E, resumePlayback: D = !1, playlist: O, autoPlayNext: k = !1, qualities: A, loading: j = "lazy", fadeIn: M = !1, demoDelay: N, labels: P = {}, tracks: F, ...I }) => {
15
- let { t: L } = e(t), { videoAriaLabel: R = L("video.label"), seconds: z = "s" } = P, { containerRef: B, isLoaded: V, isIntersecting: H, notifyLoaded: U, shouldShowSkeleton: W } = ee({
16
- loading: j,
17
- src: A?.[0]?.src || O?.[0]?.src || d,
18
- demoDelay: N
19
- }), G = r({
20
- src: d,
21
- autoPlay: p,
22
- loop: m,
23
- muted: h,
24
- fit: y,
25
- videoId: E,
26
- resumePlayback: D,
27
- playlist: O,
28
- autoPlayNext: k,
29
- qualities: A,
30
- customControls: w,
31
- advancedControls: T,
32
- poster: re,
33
- containerRef: B
34
- }), { videoRef: K, isPlaying: q, activeSrc: J, activePoster: Y, showNativeControls: X, skipIndicator: Z, activeMenu: Q, setActiveMenu: $ } = G;
35
- s.useEffect(() => {
36
- let e = K.current;
37
- e && (h ? e.setAttribute("muted", "") : e.removeAttribute("muted"));
15
+ var p = ({ src: p, width: ee, height: te, autoPlay: m = !1, loop: h = !1, muted: g = !1, controls: _ = !0, poster: v, radius: y = "none", shadow: b = !1, border: x = !1, fit: S = "cover", preload: C, caption: w, className: T, style: ne, customControls: E = !1, advancedControls: D = !1, videoId: O, resumePlayback: k = !1, playlist: A, autoPlayNext: j = !1, qualities: M, loading: N = "lazy", fadeIn: P = !1, demoDelay: F, labels: I = {}, tracks: L, ...R }) => {
16
+ let { t: z } = e(t), { videoAriaLabel: B = z("video.label"), seconds: V = "s" } = I, { containerRef: H, isLoaded: U, isIntersecting: W, notifyLoaded: G, shouldShowSkeleton: K } = i({
17
+ loading: N,
18
+ src: M?.[0]?.src || A?.[0]?.src || p,
19
+ demoDelay: F
20
+ }), q = a({
21
+ src: p,
22
+ autoPlay: m,
23
+ loop: h,
24
+ muted: g,
25
+ fit: S,
26
+ videoId: O,
27
+ resumePlayback: k,
28
+ playlist: A,
29
+ autoPlayNext: j,
30
+ qualities: M,
31
+ customControls: E,
32
+ advancedControls: D,
33
+ poster: v,
34
+ containerRef: H
35
+ }), { videoRef: J, isPlaying: Y, activeSrc: X, activePoster: re, showNativeControls: ie, skipIndicator: Z, activeMenu: Q, setActiveMenu: $ } = q;
36
+ l.useEffect(() => {
37
+ let e = J.current;
38
+ e && (g ? e.setAttribute("muted", "") : e.removeAttribute("muted"));
38
39
  }, [
39
- h,
40
- K,
40
+ g,
41
41
  J,
42
- H
42
+ X,
43
+ W
43
44
  ]);
44
- let ie = {
45
+ let ae = {
45
46
  width: "100%",
46
- height: f || "auto",
47
- objectFit: G.activeFit,
48
- ...C
49
- }, ae = g === "none" ? null : o[`radius${g.charAt(0).toUpperCase() + g.slice(1)}`];
50
- return /* @__PURE__ */ u("figure", {
51
- className: c("wim-video", o.root, S),
47
+ height: te || "auto",
48
+ objectFit: q.activeFit,
49
+ ...ne
50
+ }, oe = y === "none" ? null : c[`radius${y.charAt(0).toUpperCase() + y.slice(1)}`];
51
+ return /* @__PURE__ */ f("figure", {
52
+ className: u("wim-video", c.root, T),
52
53
  style: { width: "100%" },
53
- "aria-label": R,
54
+ "aria-label": B,
54
55
  "data-testid": "video-root",
55
- children: [/* @__PURE__ */ u("div", {
56
- className: c(o.inner, ae, _ && o.shadow, v && o.border, (w || T) && o.custom, M && o.fadeIn, M && V && o.isLoaded, W && o.loading),
57
- ref: B,
56
+ children: [/* @__PURE__ */ f("div", {
57
+ className: u(c.inner, oe, b && c.shadow, x && c.border, (E || D) && c.custom, P && c.fadeIn, P && U && c.isLoaded, K && c.loading),
58
+ ref: H,
58
59
  "data-testid": "video-inner",
59
60
  children: [
60
- H && /* @__PURE__ */ l("video", {
61
- ref: K,
62
- src: J,
63
- className: o.video,
64
- style: ie,
65
- autoPlay: p && V,
66
- loop: m && (!O || O.length <= 1),
67
- muted: h,
68
- controls: X && ne,
69
- poster: Y,
70
- preload: b,
61
+ W && /* @__PURE__ */ d("video", {
62
+ ref: J,
63
+ src: X,
64
+ className: c.video,
65
+ style: ae,
66
+ autoPlay: m && U,
67
+ loop: h && (!A || A.length <= 1),
68
+ muted: g,
69
+ controls: ie && _,
70
+ poster: re,
71
+ preload: C,
71
72
  playsInline: !0,
72
- onTimeUpdate: G.handleTimeUpdate,
73
- onLoadedMetadata: G.handleLoadedMetadata,
74
- onLoadedData: U,
75
- onEnded: G.handleEnded,
76
- onPlay: () => {},
77
- onPause: () => {},
78
- onClick: G.handleVideoClick,
79
73
  "data-testid": "video-element",
80
- ...I,
81
- children: F?.map((e, t) => /* @__PURE__ */ l("track", { ...e }, t))
74
+ ...R,
75
+ onTimeUpdate: n(R.onTimeUpdate, q.handleTimeUpdate),
76
+ onLoadedMetadata: n(R.onLoadedMetadata, q.handleLoadedMetadata),
77
+ onLoadedData: n(R.onLoadedData, G),
78
+ onEnded: n(R.onEnded, q.handleEnded),
79
+ onPlay: n(R.onPlay, () => {}),
80
+ onPause: n(R.onPause, () => {}),
81
+ onClick: n(R.onClick, q.handleVideoClick),
82
+ children: L?.map((e, t) => /* @__PURE__ */ d("track", { ...e }, t))
82
83
  }),
83
- Z.show && /* @__PURE__ */ u("div", {
84
- className: o.skipIndicator,
84
+ Z.show && /* @__PURE__ */ f("div", {
85
+ className: c.skipIndicator,
85
86
  children: [
86
- /* @__PURE__ */ l(n, {
87
+ /* @__PURE__ */ d(r, {
87
88
  name: Z.direction === "forward" ? "ChevronRightIcon" : "ChevronLeftIcon",
88
89
  size: "lg"
89
90
  }),
90
- /* @__PURE__ */ l(n, {
91
+ /* @__PURE__ */ d(r, {
91
92
  name: Z.direction === "forward" ? "ChevronRightIcon" : "ChevronLeftIcon",
92
93
  size: "lg"
93
94
  }),
94
- /* @__PURE__ */ l(n, {
95
+ /* @__PURE__ */ d(r, {
95
96
  name: Z.direction === "forward" ? "ChevronRightIcon" : "ChevronLeftIcon",
96
97
  size: "lg"
97
98
  }),
98
- /* @__PURE__ */ u("span", { children: ["10", z] })
99
+ /* @__PURE__ */ f("span", { children: ["10", V] })
99
100
  ]
100
101
  }),
101
- (w || T) && /* @__PURE__ */ u("div", {
102
+ (E || D) && /* @__PURE__ */ f("div", {
102
103
  role: "none",
103
- className: o.customControls,
104
+ className: c.customControls,
104
105
  onClick: () => Q && $(null),
105
- children: [T && /* @__PURE__ */ l(i, {
106
- styles: o,
106
+ children: [D && /* @__PURE__ */ d(o, {
107
+ styles: c,
107
108
  activeMenu: Q,
108
109
  setActiveMenu: $,
109
- qualities: A,
110
- currentQualityIndex: G.currentQualityIndex,
111
- handleQualityChange: G.handleQualityChange,
112
- playbackRate: G.playbackRate,
113
- setPlaybackRate: G.setPlaybackRate,
114
- activeFit: G.activeFit,
115
- setActiveFit: G.setActiveFit,
116
- playlist: O,
117
- currentPlayIndex: G.currentPlayIndex,
118
- playPlaylistItem: G.playPlaylistItem,
119
- labels: P
120
- }), /* @__PURE__ */ l(a, {
121
- styles: o,
122
- playlist: O,
123
- advancedControls: T,
124
- currentPlayIndex: G.currentPlayIndex,
125
- setCurrentPlayIndex: G.setCurrentPlayIndex,
126
- skip: G.skip,
127
- isPlaying: q,
128
- togglePlay: G.togglePlay,
129
- currentTime: G.currentTime,
130
- duration: G.duration,
131
- handleSeek: G.handleSeek,
132
- volume: G.volume,
133
- isMuted: G.isMuted,
134
- toggleMute: G.toggleMute,
135
- handleVolumeChange: G.handleVolumeChange,
110
+ qualities: M,
111
+ currentQualityIndex: q.currentQualityIndex,
112
+ handleQualityChange: q.handleQualityChange,
113
+ playbackRate: q.playbackRate,
114
+ setPlaybackRate: q.setPlaybackRate,
115
+ activeFit: q.activeFit,
116
+ setActiveFit: q.setActiveFit,
117
+ playlist: A,
118
+ currentPlayIndex: q.currentPlayIndex,
119
+ playPlaylistItem: q.playPlaylistItem,
120
+ labels: I
121
+ }), /* @__PURE__ */ d(s, {
122
+ styles: c,
123
+ playlist: A,
124
+ advancedControls: D,
125
+ currentPlayIndex: q.currentPlayIndex,
126
+ setCurrentPlayIndex: q.setCurrentPlayIndex,
127
+ skip: q.skip,
128
+ isPlaying: Y,
129
+ togglePlay: q.togglePlay,
130
+ currentTime: q.currentTime,
131
+ duration: q.duration,
132
+ handleSeek: q.handleSeek,
133
+ volume: q.volume,
134
+ isMuted: q.isMuted,
135
+ toggleMute: q.toggleMute,
136
+ handleVolumeChange: q.handleVolumeChange,
136
137
  activeMenu: Q,
137
138
  setActiveMenu: $,
138
- togglePiP: G.togglePiP,
139
- isFullscreen: G.isFullscreen,
140
- toggleFullscreen: G.toggleFullscreen,
141
- formatTime: G.formatTime,
142
- labels: P
139
+ togglePiP: q.togglePiP,
140
+ isFullscreen: q.isFullscreen,
141
+ toggleFullscreen: q.toggleFullscreen,
142
+ formatTime: q.formatTime,
143
+ labels: I
143
144
  })]
144
145
  })
145
146
  ]
146
- }), x && /* @__PURE__ */ l("figcaption", {
147
- className: o.caption,
147
+ }), w && /* @__PURE__ */ d("figcaption", {
148
+ className: c.caption,
148
149
  "data-testid": "video-caption",
149
- children: x
150
+ children: w
150
151
  })]
151
152
  });
152
153
  };
153
154
  //#endregion
154
- export { d as Video };
155
+ export { p as Video };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../_internal/mergeRefs.cjs"),n=require("./affix.module.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("classnames");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=r.default.forwardRef(function({offsetTop:e,offsetBottom:o,onChange:s,target:c=()=>window,children:l,className:u,style:d},f){let[p,m]=(0,r.useState)({isAffixed:!1}),h=(0,r.useRef)(null),g=(0,r.useRef)(null),_=(0,r.useRef)(null),v=(0,r.useRef)(!1),y=(0,r.useCallback)(()=>{if(!h.current)return;let t=c();if(!t)return;let n=h.current.getBoundingClientRect(),r=t===window||t instanceof Window?{top:0,bottom:window.innerHeight}:t.getBoundingClientRect(),i=!1,a,l;e!==void 0&&n.top<r.top+e?(i=!0,a={position:`fixed`,top:r.top+e,width:n.width,height:n.height,zIndex:1e3},l={width:n.width,height:n.height}):o!==void 0&&n.bottom>r.bottom-o&&(i=!0,a={position:`fixed`,bottom:window.innerHeight-r.bottom+o,width:n.width,height:n.height,zIndex:1e3},l={width:n.width,height:n.height}),i!==v.current&&(v.current=i,s?.(i)),m(e=>e.isAffixed===i&&JSON.stringify(e.affixStyle)===JSON.stringify(a)&&JSON.stringify(e.placeholderStyle)===JSON.stringify(l)?e:{isAffixed:i,affixStyle:a,placeholderStyle:l})},[e,o,c,s]);return(0,r.useEffect)(()=>{let e=c();if(!e)return;let t=()=>{_.current&&window.cancelAnimationFrame(_.current),_.current=window.requestAnimationFrame(y)};return e.addEventListener(`scroll`,t),window.addEventListener(`resize`,t),y(),()=>{e.removeEventListener(`scroll`,t),window.removeEventListener(`resize`,t),_.current&&window.cancelAnimationFrame(_.current)}},[c,y]),(0,a.jsx)(`div`,{ref:t.mergeRefs(h,f),style:{...p.placeholderStyle,...d},className:(0,i.default)(u),children:(0,a.jsx)(`div`,{ref:g,className:(0,i.default)(`wim-affix`,n.default.root,p.isAffixed&&n.default.affixed),style:p.affixStyle,children:l})})});o.displayName=`Affix`,exports.Affix=o,exports.default=o;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../_internal/mergeRefs.cjs"),n=require("../../_internal/observeMove.cjs"),r=require("./affix.module.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=i.default.forwardRef(function({offsetTop:e,offsetBottom:s,onChange:c,target:l=()=>window,children:u,className:d,style:f},p){let[m,h]=(0,i.useState)({isAffixed:!1}),g=(0,i.useRef)(null),_=(0,i.useRef)(null),v=(0,i.useRef)(null),y=(0,i.useRef)(!1),b=(0,i.useCallback)(()=>{if(!g.current)return;let t=l();if(!t)return;let n=g.current.getBoundingClientRect(),r=t===window||t instanceof Window?{top:0,bottom:window.innerHeight}:t.getBoundingClientRect(),i=!1,a,o;e!==void 0&&n.top<r.top+e?(i=!0,a={position:`fixed`,top:r.top+e,width:n.width,height:n.height,zIndex:1e3},o={width:n.width,height:n.height}):s!==void 0&&n.bottom>r.bottom-s&&(i=!0,a={position:`fixed`,bottom:window.innerHeight-r.bottom+s,width:n.width,height:n.height,zIndex:1e3},o={width:n.width,height:n.height}),i!==y.current&&(y.current=i,c?.(i)),h(e=>e.isAffixed===i&&JSON.stringify(e.affixStyle)===JSON.stringify(a)&&JSON.stringify(e.placeholderStyle)===JSON.stringify(o)?e:{isAffixed:i,affixStyle:a,placeholderStyle:o})},[e,s,l,c]);return(0,i.useEffect)(()=>{let e=l();if(!e)return;let t=()=>{v.current&&window.cancelAnimationFrame(v.current),v.current=window.requestAnimationFrame(b)};e.addEventListener(`scroll`,t),window.addEventListener(`resize`,t);let r=g.current?n.observeMove(g.current,t):void 0;return b(),()=>{e.removeEventListener(`scroll`,t),window.removeEventListener(`resize`,t),r?.(),v.current&&window.cancelAnimationFrame(v.current)}},[l,b]),(0,o.jsx)(`div`,{ref:t.mergeRefs(g,p),style:{...m.placeholderStyle,...f},className:(0,a.default)(d),children:(0,o.jsx)(`div`,{ref:_,className:(0,a.default)(`wim-affix`,r.default.root,m.isAffixed&&r.default.affixed),style:m.affixStyle,children:u})})});s.displayName=`Affix`,exports.Affix=s,exports.default=s;
@@ -1,72 +1,75 @@
1
1
  "use client";
2
2
  import { mergeRefs as e } from "../../_internal/mergeRefs.js";
3
- import t from "./affix.module.js";
4
- import n, { useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
5
- import s from "classnames";
6
- import { jsx as c } from "react/jsx-runtime";
3
+ import { observeMove as t } from "../../_internal/observeMove.js";
4
+ import n from "./affix.module.js";
5
+ import r, { useCallback as i, useEffect as a, useRef as o, useState as s } from "react";
6
+ import c from "classnames";
7
+ import { jsx as l } from "react/jsx-runtime";
7
8
  //#region src/components/navigation/Affix/Affix.tsx
8
- var l = n.forwardRef(function({ offsetTop: n, offsetBottom: l, onChange: u, target: d = () => window, children: f, className: p, style: m }, h) {
9
- let [g, _] = o({ isAffixed: !1 }), v = a(null), y = a(null), b = a(null), x = a(!1), S = r(() => {
10
- if (!v.current) return;
11
- let e = d();
9
+ var u = r.forwardRef(function({ offsetTop: r, offsetBottom: u, onChange: d, target: f = () => window, children: p, className: m, style: h }, g) {
10
+ let [_, v] = s({ isAffixed: !1 }), y = o(null), b = o(null), x = o(null), S = o(!1), C = i(() => {
11
+ if (!y.current) return;
12
+ let e = f();
12
13
  if (!e) return;
13
- let t = v.current.getBoundingClientRect(), r = e === window || e instanceof Window ? {
14
+ let t = y.current.getBoundingClientRect(), n = e === window || e instanceof Window ? {
14
15
  top: 0,
15
16
  bottom: window.innerHeight
16
17
  } : e.getBoundingClientRect(), i = !1, a, o;
17
- n !== void 0 && t.top < r.top + n ? (i = !0, a = {
18
+ r !== void 0 && t.top < n.top + r ? (i = !0, a = {
18
19
  position: "fixed",
19
- top: r.top + n,
20
+ top: n.top + r,
20
21
  width: t.width,
21
22
  height: t.height,
22
23
  zIndex: 1e3
23
24
  }, o = {
24
25
  width: t.width,
25
26
  height: t.height
26
- }) : l !== void 0 && t.bottom > r.bottom - l && (i = !0, a = {
27
+ }) : u !== void 0 && t.bottom > n.bottom - u && (i = !0, a = {
27
28
  position: "fixed",
28
- bottom: window.innerHeight - r.bottom + l,
29
+ bottom: window.innerHeight - n.bottom + u,
29
30
  width: t.width,
30
31
  height: t.height,
31
32
  zIndex: 1e3
32
33
  }, o = {
33
34
  width: t.width,
34
35
  height: t.height
35
- }), i !== x.current && (x.current = i, u?.(i)), _((e) => e.isAffixed === i && JSON.stringify(e.affixStyle) === JSON.stringify(a) && JSON.stringify(e.placeholderStyle) === JSON.stringify(o) ? e : {
36
+ }), i !== S.current && (S.current = i, d?.(i)), v((e) => e.isAffixed === i && JSON.stringify(e.affixStyle) === JSON.stringify(a) && JSON.stringify(e.placeholderStyle) === JSON.stringify(o) ? e : {
36
37
  isAffixed: i,
37
38
  affixStyle: a,
38
39
  placeholderStyle: o
39
40
  });
40
41
  }, [
41
- n,
42
- l,
43
- d,
44
- u
42
+ r,
43
+ u,
44
+ f,
45
+ d
45
46
  ]);
46
- return i(() => {
47
- let e = d();
47
+ return a(() => {
48
+ let e = f();
48
49
  if (!e) return;
49
- let t = () => {
50
- b.current && window.cancelAnimationFrame(b.current), b.current = window.requestAnimationFrame(S);
50
+ let n = () => {
51
+ x.current && window.cancelAnimationFrame(x.current), x.current = window.requestAnimationFrame(C);
51
52
  };
52
- return e.addEventListener("scroll", t), window.addEventListener("resize", t), S(), () => {
53
- e.removeEventListener("scroll", t), window.removeEventListener("resize", t), b.current && window.cancelAnimationFrame(b.current);
53
+ e.addEventListener("scroll", n), window.addEventListener("resize", n);
54
+ let r = y.current ? t(y.current, n) : void 0;
55
+ return C(), () => {
56
+ e.removeEventListener("scroll", n), window.removeEventListener("resize", n), r?.(), x.current && window.cancelAnimationFrame(x.current);
54
57
  };
55
- }, [d, S]), /* @__PURE__ */ c("div", {
56
- ref: e(v, h),
58
+ }, [f, C]), /* @__PURE__ */ l("div", {
59
+ ref: e(y, g),
57
60
  style: {
58
- ...g.placeholderStyle,
59
- ...m
61
+ ..._.placeholderStyle,
62
+ ...h
60
63
  },
61
- className: s(p),
62
- children: /* @__PURE__ */ c("div", {
63
- ref: y,
64
- className: s("wim-affix", t.root, g.isAffixed && t.affixed),
65
- style: g.affixStyle,
66
- children: f
64
+ className: c(m),
65
+ children: /* @__PURE__ */ l("div", {
66
+ ref: b,
67
+ className: c("wim-affix", n.root, _.isAffixed && n.affixed),
68
+ style: _.affixStyle,
69
+ children: p
67
70
  })
68
71
  });
69
72
  });
70
- l.displayName = "Affix";
73
+ u.displayName = "Affix";
71
74
  //#endregion
72
- export { l as Affix, l as default };
75
+ export { u as Affix, u as default };