@kakadu/components 5.0.4 → 5.0.6

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),R=require("react"),c=require("@kuma-ui/core"),b=require("../theme.js"),$=require("../icons/icon.js"),C=require("./spinner.js"),F=require("./moving-gradients.js"),O=require("./moving-stars.js"),P=require("./theme-setter.js"),H=require("./click-ripples.js"),f=require("./hover-gradient.js"),J=require("./button-tooltip.js"),K=require("./aria-text.js"),Q=require("./atom.js"),U=require("./skeleton.js");function v({isLoading:t,size:a,className:s}){return e.jsxRuntimeExports.jsx("div",{className:c.cx("kakadu-components-2832510379",t&&"kakadu-components-4114685569",s),children:e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-920467642",children:e.jsxRuntimeExports.jsx(C.RevealSpinner,{isVisible:t,size:a})})})}const X=["primary","secondary","warning","danger"];function E({icon:t,variant:a="primary",className:s,...r}){return e.jsxRuntimeExports.jsx("div",{...r,className:c.cx("kakadu-components-2658660333",a==="secondary"&&"kakadu-components-3469662110",s),children:typeof t=="string"?e.jsxRuntimeExports.jsx($.default,{width:14,height:14,type:t}):t})}const S="kakadu-components-2550769169",Y="kakadu-components-1998774084",q="kakadu-components-2945752235",g="kakadu-components-1546692192";function Z({ref:t,type:a,variant:s="primary",href:r,target:h,rel:_,disabled:N,className:B,children:n,label:w,tooltip:i,tooltipPosition:M,iconLeft:m,iconRight:x,isLoading:l,isSkeleton:u,isSkeletonAnimated:D=!0,hasMovingGradients:I=!1,movingGradientsCount:p=4,hasMovingStars:T=!1,movingStarsCount:k=10,...G}){const j=R.useId(),y=R.useRef(null),V=P.useIsDarkMode(y),z=a??"button",A=I&&p>0,W=T&&k>0,o=r&&!u,d=!!N||!!l||!!u;return e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-3559664923",children:[e.jsxRuntimeExports.jsxs(Q.default,{...G,reference:t,as:o?"a":"button",type:o?void 0:z,href:o?r:void 0,target:o?h:void 0,rel:o?_:void 0,"aria-describedby":i?j:void 0,disabled:o?void 0:d,inert:o?d:void 0,className:c.cx(b.effectStyles,b.overlayEffectStyles,"kakadu-components-2514848457",!!m&&"kakadu-components-2735110382",!n&&"kakadu-components-3621693630",s==="secondary"&&S,s==="warning"&&q,s==="danger"&&g,u&&"kakadu-components-2662775151",B),children:[m?e.jsxRuntimeExports.jsx(E,{variant:s,icon:m,className:n?"kakadu-components-136489413":void 0}):null,n?e.jsxRuntimeExports.jsx("div",{ref:y,className:"kakadu-components-207477259",children:n}):e.jsxRuntimeExports.jsx(K.default,{children:w}),x?e.jsxRuntimeExports.jsx(E,{variant:s,icon:x,className:n?"kakadu-components-3631501803":void 0}):null,e.jsxRuntimeExports.jsx(v,{isLoading:l}),A&&e.jsxRuntimeExports.jsx(F.default,{opacity:V?.5:.4,maximumGradientsCount:p,className:c.cx("kakadu-components-2055737617",s==="secondary"&&"kakadu-components-2972748387")}),W&&e.jsxRuntimeExports.jsx(O.default,{maximumStarsCount:k,className:"kakadu-components-1226008615"}),d?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(H.default,{size:n?void 0:50}),e.jsxRuntimeExports.jsx(f.default,{size:n?void 0:50,className:s==="secondary"?f.normalBlendStyles:void 0})]}),i?e.jsxRuntimeExports.jsx(J.default,{id:j,label:i,position:M}):null]}),u?e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-3422055155",children:e.jsxRuntimeExports.jsx(U.SkeletonInstance,{width:"100%",height:"100%",isAnimated:D})}):null]})}exports.ButtonLoader=v;exports.buttonDangerStyles=g;exports.buttonSecondaryStyles=S;exports.buttonSuccessStyles=Y;exports.buttonVariants=X;exports.buttonWarningStyles=q;exports.default=Z;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),R=require("react"),c=require("@kuma-ui/core"),b=require("../theme.js"),$=require("../icons/icon.js"),C=require("./spinner.js"),F=require("./moving-gradients.js"),O=require("./moving-stars.js"),P=require("./theme-setter.js"),H=require("./click-ripples.js"),f=require("./hover-gradient.js"),J=require("./button-tooltip.js"),K=require("./aria-text.js"),Q=require("./atom.js"),U=require("./skeleton.js");function v({isLoading:t,size:a,className:s}){return e.jsxRuntimeExports.jsx("div",{className:c.cx("kakadu-components-2832510379",t&&"kakadu-components-4114685569",s),children:e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-920467642",children:e.jsxRuntimeExports.jsx(C.RevealSpinner,{isVisible:t,size:a})})})}const X=["primary","secondary","warning","danger"];function E({icon:t,variant:a="primary",className:s,...r}){return e.jsxRuntimeExports.jsx("div",{...r,className:c.cx("kakadu-components-2658660333",a==="secondary"&&"kakadu-components-3469662110",s),children:typeof t=="string"?e.jsxRuntimeExports.jsx($.default,{width:14,height:14,type:t}):t})}const S="kakadu-components-2550769169",Y="kakadu-components-1998774084",q="kakadu-components-2945752235",g="kakadu-components-1546692192";function Z({ref:t,type:a,variant:s="primary",href:r,target:h,rel:_,disabled:N,className:B,children:n,label:w,tooltip:i,tooltipPosition:M,iconLeft:m,iconRight:x,isLoading:l,isSkeleton:u,isSkeletonAnimated:D=!0,hasMovingGradients:I=!1,movingGradientsCount:p=4,hasMovingStars:T=!1,movingStarsCount:k=10,...G}){const j=R.useId(),y=R.useRef(null),V=P.useIsDarkMode(y),z=a??"button",A=I&&p>0,W=T&&k>0,o=r!==void 0&&!u,d=!!N||!!l||!!u;return e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-3559664923",children:[e.jsxRuntimeExports.jsxs(Q.default,{...G,reference:t,as:o?"a":"button",type:o?void 0:z,href:o?r:void 0,target:o?h:void 0,rel:o?_:void 0,"aria-describedby":i?j:void 0,disabled:o?void 0:d,inert:o?d:void 0,className:c.cx(b.effectStyles,b.overlayEffectStyles,"kakadu-components-2514848457",!!m&&"kakadu-components-2735110382",!n&&"kakadu-components-3621693630",s==="secondary"&&S,s==="warning"&&q,s==="danger"&&g,u&&"kakadu-components-2662775151",B),children:[m?e.jsxRuntimeExports.jsx(E,{variant:s,icon:m,className:n?"kakadu-components-136489413":void 0}):null,n?e.jsxRuntimeExports.jsx("div",{ref:y,className:"kakadu-components-207477259",children:n}):e.jsxRuntimeExports.jsx(K.default,{children:w}),x?e.jsxRuntimeExports.jsx(E,{variant:s,icon:x,className:n?"kakadu-components-3631501803":void 0}):null,e.jsxRuntimeExports.jsx(v,{isLoading:l}),A&&e.jsxRuntimeExports.jsx(F.default,{opacity:V?.5:.4,maximumGradientsCount:p,className:c.cx("kakadu-components-2055737617",s==="secondary"&&"kakadu-components-2972748387")}),W&&e.jsxRuntimeExports.jsx(O.default,{maximumStarsCount:k,className:"kakadu-components-1226008615"}),d?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(H.default,{size:n?void 0:50}),e.jsxRuntimeExports.jsx(f.default,{size:n?void 0:50,className:s==="secondary"?f.normalBlendStyles:void 0})]}),i?e.jsxRuntimeExports.jsx(J.default,{id:j,label:i,position:M}):null]}),u?e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-3422055155",children:e.jsxRuntimeExports.jsx(U.SkeletonInstance,{width:"100%",height:"100%",isAnimated:D})}):null]})}exports.ButtonLoader=v;exports.buttonDangerStyles=g;exports.buttonSecondaryStyles=S;exports.buttonSuccessStyles=Y;exports.buttonVariants=X;exports.buttonWarningStyles=q;exports.default=Z;
@@ -54,7 +54,7 @@ function yo({
54
54
  movingStarsCount: f = 10,
55
55
  ...M
56
56
  }) {
57
- const x = T(), y = z(null), A = q(y), D = a ?? "button", G = w && k > 0, R = I && f > 0, t = r && !m, u = !!N || !!p || !!m;
57
+ const x = T(), y = z(null), A = q(y), D = a ?? "button", G = w && k > 0, R = I && f > 0, t = r !== void 0 && !m, u = !!N || !!p || !!m;
58
58
  return /* @__PURE__ */ o.jsxs("div", { className: "kakadu-components-3559664923", children: [
59
59
  /* @__PURE__ */ o.jsxs(U, { ...M, reference: n, as: t ? "a" : "button", type: t ? void 0 : D, href: t ? r : void 0, target: t ? v : void 0, rel: t ? b : void 0, "aria-describedby": d ? x : void 0, disabled: t ? void 0 : u, inert: t ? u : void 0, className: c(C, E, "kakadu-components-2514848457", !!i && "kakadu-components-2735110382", !e && "kakadu-components-3621693630", s === "secondary" && Z, s === "warning" && _, s === "danger" && $, m && "kakadu-components-2662775151", g), children: [
60
60
  i ? /* @__PURE__ */ o.jsx(j, { variant: s, icon: i, className: e ? "kakadu-components-136489413" : void 0 }) : null,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),r=require("@kuma-ui/core"),k=require("../theme.js"),a=require("../icons/icon.js"),s=require("./flex.js"),n=require("./text.js"),f=require("./click-ripples.js"),c=require("./hover-gradient.js"),h=require("./button.js"),R=require("./atom.js");function q({ref:u,icon:o,title:i,description:l,action:m,href:t,target:x,rel:d,className:p,...j}){return e.jsxRuntimeExports.jsxs(R.default,{...j,reference:u,as:t?"a":"button",type:t?void 0:"button",href:t,target:x,rel:d,className:r.cx(k.effectStyles,h.buttonSecondaryStyles,"kakadu-components-1387630570",p),children:[e.jsxRuntimeExports.jsxs(s.default,{gap:.5,direction:"column",children:[e.jsxRuntimeExports.jsx(n.Span,{className:"kakadu-components-1301774894",children:e.jsxRuntimeExports.jsxs(s.default,{gap:.5,direction:"row",preset:"start",children:[o?e.jsxRuntimeExports.jsx(a.default,{width:16,height:16,type:o,className:r.cx(a.iconShadowStyles,"kakadu-components-782417605")}):null,i]})}),e.jsxRuntimeExports.jsx(n.Paragraph,{className:"kakadu-components-3061837309",children:l}),e.jsxRuntimeExports.jsx(s.default,{preset:"end",children:e.jsxRuntimeExports.jsx(n.Span,{className:"kakadu-components-777975485",children:m})})]}),e.jsxRuntimeExports.jsx(f.default,{size:250,className:"kakadu-components-2967167444"}),e.jsxRuntimeExports.jsx(c.default,{size:300,className:c.normalBlendStyles})]})}exports.default=q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),a=require("@kuma-ui/core"),f=require("../theme.js"),c=require("../icons/icon.js"),s=require("./flex.js"),n=require("./text.js"),k=require("./click-ripples.js"),i=require("./hover-gradient.js"),R=require("./button.js"),q=require("./atom.js");function E({ref:u,icon:o,title:l,description:d,action:m,href:r,target:x,rel:p,className:j,...h}){const t=r!==void 0;return e.jsxRuntimeExports.jsxs(q.default,{...h,reference:u,as:t?"a":"button",type:t?void 0:"button",href:t?r:void 0,target:t?x:void 0,rel:t?p:void 0,className:a.cx(f.effectStyles,R.buttonSecondaryStyles,"kakadu-components-1387630570",j),children:[e.jsxRuntimeExports.jsxs(s.default,{gap:.5,direction:"column",children:[e.jsxRuntimeExports.jsx(n.Span,{className:"kakadu-components-1301774894",children:e.jsxRuntimeExports.jsxs(s.default,{gap:.5,direction:"row",preset:"start",children:[o?e.jsxRuntimeExports.jsx(c.default,{width:16,height:16,type:o,className:a.cx(c.iconShadowStyles,"kakadu-components-782417605")}):null,l]})}),e.jsxRuntimeExports.jsx(n.Paragraph,{className:"kakadu-components-3061837309",children:d}),e.jsxRuntimeExports.jsx(s.default,{preset:"end",children:e.jsxRuntimeExports.jsx(n.Span,{className:"kakadu-components-777975485",children:m})})]}),e.jsxRuntimeExports.jsx(k.default,{size:250,className:"kakadu-components-2967167444"}),e.jsxRuntimeExports.jsx(i.default,{size:300,className:i.normalBlendStyles})]})}exports.default=E;
@@ -1,38 +1,39 @@
1
- import { j as e } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { cx as r } from "@kuma-ui/core";
1
+ import { j as o } from "../jsx-runtime-B4hRZ52C.mjs";
2
+ import { cx as a } from "@kuma-ui/core";
3
3
  import { effectStyles as x } from "../theme.mjs";
4
- import f, { iconShadowStyles as k } from "../icons/icon.mjs";
4
+ import h, { iconShadowStyles as k } from "../icons/icon.mjs";
5
5
  import s from "./flex.mjs";
6
- import { Span as a, Paragraph as j } from "./text.mjs";
7
- import h from "./click-ripples.mjs";
8
- import y, { normalBlendStyles as N } from "./hover-gradient.mjs";
9
- import { buttonSecondaryStyles as S } from "./button.mjs";
6
+ import { Span as n, Paragraph as j } from "./text.mjs";
7
+ import y from "./click-ripples.mjs";
8
+ import N, { normalBlendStyles as S } from "./hover-gradient.mjs";
9
+ import { buttonSecondaryStyles as v } from "./button.mjs";
10
10
  import g from "./atom.mjs";
11
- function G({
12
- ref: n,
13
- icon: t,
14
- title: m,
15
- description: i,
16
- action: c,
17
- href: o,
18
- target: p,
19
- rel: l,
20
- className: d,
11
+ function H({
12
+ ref: m,
13
+ icon: r,
14
+ title: i,
15
+ description: c,
16
+ action: d,
17
+ href: t,
18
+ target: l,
19
+ rel: p,
20
+ className: f,
21
21
  ...u
22
22
  }) {
23
- return /* @__PURE__ */ e.jsxs(g, { ...u, reference: n, as: o ? "a" : "button", type: o ? void 0 : "button", href: o, target: p, rel: l, className: r(x, S, "kakadu-components-1387630570", d), children: [
24
- /* @__PURE__ */ e.jsxs(s, { gap: 0.5, direction: "column", children: [
25
- /* @__PURE__ */ e.jsx(a, { className: "kakadu-components-1301774894", children: /* @__PURE__ */ e.jsxs(s, { gap: 0.5, direction: "row", preset: "start", children: [
26
- t ? /* @__PURE__ */ e.jsx(f, { width: 16, height: 16, type: t, className: r(k, "kakadu-components-782417605") }) : null,
27
- m
23
+ const e = t !== void 0;
24
+ return /* @__PURE__ */ o.jsxs(g, { ...u, reference: m, as: e ? "a" : "button", type: e ? void 0 : "button", href: e ? t : void 0, target: e ? l : void 0, rel: e ? p : void 0, className: a(x, v, "kakadu-components-1387630570", f), children: [
25
+ /* @__PURE__ */ o.jsxs(s, { gap: 0.5, direction: "column", children: [
26
+ /* @__PURE__ */ o.jsx(n, { className: "kakadu-components-1301774894", children: /* @__PURE__ */ o.jsxs(s, { gap: 0.5, direction: "row", preset: "start", children: [
27
+ r ? /* @__PURE__ */ o.jsx(h, { width: 16, height: 16, type: r, className: a(k, "kakadu-components-782417605") }) : null,
28
+ i
28
29
  ] }) }),
29
- /* @__PURE__ */ e.jsx(j, { className: "kakadu-components-3061837309", children: i }),
30
- /* @__PURE__ */ e.jsx(s, { preset: "end", children: /* @__PURE__ */ e.jsx(a, { className: "kakadu-components-777975485", children: c }) })
30
+ /* @__PURE__ */ o.jsx(j, { className: "kakadu-components-3061837309", children: c }),
31
+ /* @__PURE__ */ o.jsx(s, { preset: "end", children: /* @__PURE__ */ o.jsx(n, { className: "kakadu-components-777975485", children: d }) })
31
32
  ] }),
32
- /* @__PURE__ */ e.jsx(h, { size: 250, className: "kakadu-components-2967167444" }),
33
- /* @__PURE__ */ e.jsx(y, { size: 300, className: N })
33
+ /* @__PURE__ */ o.jsx(y, { size: 250, className: "kakadu-components-2967167444" }),
34
+ /* @__PURE__ */ o.jsx(N, { size: 300, className: S })
34
35
  ] });
35
36
  }
36
37
  export {
37
- G as default
38
+ H as default
38
39
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),t=require("react"),o=require("@kuma-ui/core"),d=require("../icons/icon.js"),p=require("../theme.js"),D=require("./theme-setter.js"),c=require("./button.js"),M=require("./button-tooltip.js"),z=require("./click-ripples.js"),E=require("./hover-gradient.js"),A=require("./skeleton.js"),C=require("./atom.js"),O=["default","success","warning","danger"];function V({ref:b,icon:s,variant:u="default",label:f,tooltipPosition:g,href:k,target:q,rel:w,disabled:_,isLoading:j,isSkeleton:r,isSkeletonAnimated:v=!0,className:B,...I}){const h=t.useId(),N=D.useIsDarkMode(),n=k&&!r,[a,T]=t.useState(s),[R,m]=t.useState(!1),S=t.useRef(s),i=t.useRef(null);t.useEffect(()=>{S.current=s},[s]);const l=t.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]);t.useEffect(()=>{if(a===s){m(y=>y&&!1);return}m(!0),l(),i.current=setTimeout(()=>{m(!1),T(S.current)},370)},[a,s,l]),t.useEffect(()=>()=>{l()},[l]);const x=!!_||!!j||!!r;return e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-4096632152",children:[e.jsxRuntimeExports.jsxs(C.default,{...I,reference:b,as:n?"a":"button",type:n?void 0:"button",href:n?k:void 0,target:n?q:void 0,rel:n?w:void 0,"aria-label":f,"aria-describedby":h,disabled:n?void 0:x,inert:n?x:void 0,className:o.cx(p.buttonResetStyles,p.effectStyles,p.overlayEffectStyles,"kakadu-components-4200638658",u==="default"&&o.cx(c.buttonSecondaryStyles,"kakadu-components-1561784812"),u==="success"&&o.cx(c.buttonSuccessStyles,"kakadu-components-1398421429"),u==="warning"&&o.cx(c.buttonWarningStyles,"kakadu-components-1872098090"),u==="danger"&&o.cx(c.buttonDangerStyles,"kakadu-components-2064536093"),r&&"kakadu-components-2662775151",B),children:[e.jsxRuntimeExports.jsxs("span",{"data-theme":u==="default"?N?"dark":"light":"dark",className:"kakadu-components-3040141419",children:[e.jsxRuntimeExports.jsx(d.default,{width:16,height:16,type:a,className:o.cx(d.iconShadowStyles,"kakadu-components-1562914001",R&&"kakadu-components-2360250719")}),a===s?null:e.jsxRuntimeExports.jsx(d.default,{width:16,height:16,type:s,className:o.cx(d.iconShadowStyles,"kakadu-components-1224061930",R&&"kakadu-components-2519520784")})]}),e.jsxRuntimeExports.jsx(c.ButtonLoader,{isLoading:j,size:14}),e.jsxRuntimeExports.jsx(M.default,{id:h,label:f,position:g}),x?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(z.default,{size:50}),e.jsxRuntimeExports.jsx(E.default,{size:50,className:u==="default"?E.normalBlendStyles:void 0})]})]}),r?e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-3422055155",children:e.jsxRuntimeExports.jsx(A.SkeletonInstance,{width:"100%",height:"100%",isAnimated:v})}):null]})}exports.default=V;exports.iconButtonVariants=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),t=require("react"),o=require("@kuma-ui/core"),d=require("../icons/icon.js"),p=require("../theme.js"),D=require("./theme-setter.js"),c=require("./button.js"),M=require("./button-tooltip.js"),z=require("./click-ripples.js"),E=require("./hover-gradient.js"),A=require("./skeleton.js"),C=require("./atom.js"),O=["default","success","warning","danger"];function V({ref:b,icon:s,variant:u="default",label:f,tooltipPosition:g,href:k,target:q,rel:w,disabled:_,isLoading:j,isSkeleton:r,isSkeletonAnimated:v=!0,className:B,...I}){const h=t.useId(),N=D.useIsDarkMode(),n=k!==void 0&&!r,[a,T]=t.useState(s),[R,m]=t.useState(!1),S=t.useRef(s),i=t.useRef(null);t.useEffect(()=>{S.current=s},[s]);const l=t.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]);t.useEffect(()=>{if(a===s){m(y=>y&&!1);return}m(!0),l(),i.current=setTimeout(()=>{m(!1),T(S.current)},370)},[a,s,l]),t.useEffect(()=>()=>{l()},[l]);const x=!!_||!!j||!!r;return e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-4096632152",children:[e.jsxRuntimeExports.jsxs(C.default,{...I,reference:b,as:n?"a":"button",type:n?void 0:"button",href:n?k:void 0,target:n?q:void 0,rel:n?w:void 0,"aria-label":f,"aria-describedby":h,disabled:n?void 0:x,inert:n?x:void 0,className:o.cx(p.buttonResetStyles,p.effectStyles,p.overlayEffectStyles,"kakadu-components-4200638658",u==="default"&&o.cx(c.buttonSecondaryStyles,"kakadu-components-1561784812"),u==="success"&&o.cx(c.buttonSuccessStyles,"kakadu-components-1398421429"),u==="warning"&&o.cx(c.buttonWarningStyles,"kakadu-components-1872098090"),u==="danger"&&o.cx(c.buttonDangerStyles,"kakadu-components-2064536093"),r&&"kakadu-components-2662775151",B),children:[e.jsxRuntimeExports.jsxs("span",{"data-theme":u==="default"?N?"dark":"light":"dark",className:"kakadu-components-3040141419",children:[e.jsxRuntimeExports.jsx(d.default,{width:16,height:16,type:a,className:o.cx(d.iconShadowStyles,"kakadu-components-1562914001",R&&"kakadu-components-2360250719")}),a===s?null:e.jsxRuntimeExports.jsx(d.default,{width:16,height:16,type:s,className:o.cx(d.iconShadowStyles,"kakadu-components-1224061930",R&&"kakadu-components-2519520784")})]}),e.jsxRuntimeExports.jsx(c.ButtonLoader,{isLoading:j,size:14}),e.jsxRuntimeExports.jsx(M.default,{id:h,label:f,position:g}),x?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(z.default,{size:50}),e.jsxRuntimeExports.jsx(E.default,{size:50,className:u==="default"?E.normalBlendStyles:void 0})]})]}),r?e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-3422055155",children:e.jsxRuntimeExports.jsx(A.SkeletonInstance,{width:"100%",height:"100%",isAnimated:v})}):null]})}exports.default=V;exports.iconButtonVariants=O;
@@ -1,5 +1,5 @@
1
1
  import { j as e } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { useId as C, useState as j, useRef as g, useEffect as d, useCallback as E } from "react";
2
+ import { useId as C, useState as j, useRef as g, useEffect as l, useCallback as E } from "react";
3
3
  import { cx as s } from "@kuma-ui/core";
4
4
  import S, { iconShadowStyles as b } from "../icons/icon.mjs";
5
5
  import { buttonResetStyles as M, effectStyles as F, overlayEffectStyles as G } from "../theme.mjs";
@@ -19,22 +19,22 @@ function ie({
19
19
  tooltipPosition: B,
20
20
  href: p,
21
21
  target: I,
22
- rel: N,
23
- disabled: v,
22
+ rel: v,
23
+ disabled: N,
24
24
  isLoading: f,
25
25
  isSkeleton: a,
26
26
  isSkeletonAnimated: R = !0,
27
27
  className: D,
28
28
  ...T
29
29
  }) {
30
- const k = C(), z = H(), o = p && !a, [r, A] = j(t), [h, i] = j(!1), x = g(t), c = g(null);
31
- d(() => {
30
+ const k = C(), z = H(), o = p !== void 0 && !a, [r, A] = j(t), [h, i] = j(!1), x = g(t), c = g(null);
31
+ l(() => {
32
32
  x.current = t;
33
33
  }, [t]);
34
34
  const u = E(() => {
35
35
  c.current && (clearTimeout(c.current), c.current = null);
36
36
  }, []);
37
- d(() => {
37
+ l(() => {
38
38
  if (r === t) {
39
39
  i((y) => y && !1);
40
40
  return;
@@ -42,19 +42,19 @@ function ie({
42
42
  i(!0), u(), c.current = setTimeout(() => {
43
43
  i(!1), A(x.current);
44
44
  }, 370);
45
- }, [r, t, u]), d(() => () => {
45
+ }, [r, t, u]), l(() => () => {
46
46
  u();
47
47
  }, [u]);
48
- const l = !!v || !!f || !!a;
48
+ const d = !!N || !!f || !!a;
49
49
  return /* @__PURE__ */ e.jsxs("div", { className: "kakadu-components-4096632152", children: [
50
- /* @__PURE__ */ e.jsxs(X, { ...T, reference: w, as: o ? "a" : "button", type: o ? void 0 : "button", href: o ? p : void 0, target: o ? I : void 0, rel: o ? N : void 0, "aria-label": m, "aria-describedby": k, disabled: o ? void 0 : l, inert: o ? l : void 0, className: s(M, F, G, "kakadu-components-4200638658", n === "default" && s(V, "kakadu-components-1561784812"), n === "success" && s(W, "kakadu-components-1398421429"), n === "warning" && s(q, "kakadu-components-1872098090"), n === "danger" && s(J, "kakadu-components-2064536093"), a && "kakadu-components-2662775151", D), children: [
50
+ /* @__PURE__ */ e.jsxs(X, { ...T, reference: w, as: o ? "a" : "button", type: o ? void 0 : "button", href: o ? p : void 0, target: o ? I : void 0, rel: o ? v : void 0, "aria-label": m, "aria-describedby": k, disabled: o ? void 0 : d, inert: o ? d : void 0, className: s(M, F, G, "kakadu-components-4200638658", n === "default" && s(V, "kakadu-components-1561784812"), n === "success" && s(W, "kakadu-components-1398421429"), n === "warning" && s(q, "kakadu-components-1872098090"), n === "danger" && s(J, "kakadu-components-2064536093"), a && "kakadu-components-2662775151", D), children: [
51
51
  /* @__PURE__ */ e.jsxs("span", { "data-theme": n === "default" ? z ? "dark" : "light" : "dark", className: "kakadu-components-3040141419", children: [
52
52
  /* @__PURE__ */ e.jsx(S, { width: 16, height: 16, type: r, className: s(b, "kakadu-components-1562914001", h && "kakadu-components-2360250719") }),
53
53
  r === t ? null : /* @__PURE__ */ e.jsx(S, { width: 16, height: 16, type: t, className: s(b, "kakadu-components-1224061930", h && "kakadu-components-2519520784") })
54
54
  ] }),
55
55
  /* @__PURE__ */ e.jsx(O, { isLoading: f, size: 14 }),
56
56
  /* @__PURE__ */ e.jsx(K, { id: k, label: m, position: B }),
57
- l ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
57
+ d ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
58
58
  /* @__PURE__ */ e.jsx(L, { size: 50 }),
59
59
  /* @__PURE__ */ e.jsx(P, { size: 50, className: n === "default" ? Q : void 0 })
60
60
  ] })
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const N=require("../jsx-runtime-BB_1_6y_.js"),i=require("react"),_=require("@kuma-ui/core"),D=["rgb(46, 75, 164)","rgb(58, 125, 159)","rgb(42, 81, 142)","rgb(48, 132, 168)","rgb(45, 64, 157)"];function L(S){return S.map(C=>{var n;const[m,b,X]=((n=C.match(/\d+/g))==null?void 0:n.map(Number))??[];return[m,b,X]})}function O({className:S,colors:C=D,maximumGradientsCount:m=10,speed:b=1,opacity:X=.2}){const n=i.useRef(null),[h,z]=i.useState(),[g,H]=i.useState(0),[p,W]=i.useState(0),q=i.useMemo(()=>L(C),[C]),$=i.useMemo(()=>q.length,[q]),Y=i.useCallback(()=>{const f=Math.random(),y=q[Math.floor($*f)],r=g*1.25,M=g*.25,v=p*1.25,e=p*.25,t=r*Math.random()-M,s=v*Math.random()-e,o=Math.max(r,v);return{color:y,size:o*f+o/2,opacity:0,speed:Math.max(.1,f/2*b),startPosition:[t,s],currentPosition:[t,s],targetPosition:[r*Math.random()-M,v*Math.random()-e]}},[q,$,g,p,b]);return i.useEffect(()=>{const a=Array.from({length:m}).map(()=>Y());let f=m,y=!1,r;function M(){if(!y){if(!h){r=requestAnimationFrame(M);return}h.clearRect(0,0,g,p);for(let e=a.length;e;e-=1){const t=a[e-1],[s,o]=t.startPosition,[c,l]=t.currentPosition,[u,d]=t.targetPosition;let x=!0;if(s>u?c>u&&(x=!1):c<u&&(x=!1),o>d?l>d&&(x=!1):l<d&&(x=!1),x){a.splice(e-1,1),f-=1;continue}const k=(s+u)/2-s,w=c-s,G=(o+d)/2-o,I=l-o,j=(w/k+I/G)/2;t.opacity=j>1?2-j:j;const R=t.size/2,A=h.createRadialGradient(c,l,R,c,l,0);if(A.addColorStop(0,`rgba(${t.color.join(",")},0)`),A.addColorStop(1,`rgba(${t.color.join(",")},${t.opacity})`),h.fillStyle=A,h.fillRect(c-R,l-R,t.size,t.size),c!==u){const E=Math.abs(s-u),F=Math.abs(o-d),P=Math.min(1,E/F);c<u?t.currentPosition[0]+=t.speed*P:t.currentPosition[0]-=t.speed*P}if(l!==d){const E=Math.abs(s-u),F=Math.abs(o-d),P=Math.min(1,F/E);l<d?t.currentPosition[1]+=t.speed*P:t.currentPosition[1]-=t.speed*P}}r=requestAnimationFrame(M)}}r=requestAnimationFrame(M);const v=setInterval(()=>{let e=m-f;if(e>0)for(;e;)a.push(Y()),e-=1,f+=1},1500);return()=>{y=!0,r&&cancelAnimationFrame(r),clearInterval(v)}},[m,Y,h,g,p,b]),i.useEffect(()=>{if(n.current){const a=n.current.getContext("2d");a&&z(a),H(n.current.offsetWidth),W(n.current.offsetHeight)}},[n]),N.jsxRuntimeExports.jsx("canvas",{ref:n,"aria-hidden":!0,role:"presentation",width:g,height:p,style:{"--opacity":X},className:_.cx("kakadu-components-4131181690",S)})}exports.default=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const V=require("../jsx-runtime-BB_1_6y_.js"),s=require("react"),L=require("@kuma-ui/core"),O=require("../hooks/use-is-in-view.js"),T=require("../hooks/use-is-document-focused.js"),B=["rgb(46, 75, 164)","rgb(58, 125, 159)","rgb(42, 81, 142)","rgb(48, 132, 168)","rgb(45, 64, 157)"];function J(S){return S.map(C=>{var n;const[m,b,X]=((n=C.match(/\d+/g))==null?void 0:n.map(Number))??[];return[m,b,X]})}function K({className:S,colors:C=B,maximumGradientsCount:m=10,speed:b=1,opacity:X=.2}){const n=s.useRef(null),[h,E]=s.useState(),[g,$]=s.useState(0),[p,z]=s.useState(0),q=s.useMemo(()=>J(C),[C]),A=s.useMemo(()=>q.length,[q]),Y=s.useCallback(()=>{const f=Math.random(),y=q[Math.floor(A*f)],r=g*1.25,M=g*.25,v=p*1.25,e=p*.25,t=r*Math.random()-M,o=v*Math.random()-e,i=Math.max(r,v);return{color:y,size:i*f+i/2,opacity:0,speed:Math.max(.1,f/2*b),startPosition:[t,o],currentPosition:[t,o],targetPosition:[r*Math.random()-M,v*Math.random()-e]}},[q,A,g,p,b]),H=O.default(n),W=T.default(),F=s.useRef(!1);return F.current=!H||!W,s.useEffect(()=>{const a=Array.from({length:m}).map(()=>Y());let f=m,y=!1,r;function M(){if(!y){if(!h||F.current){r=requestAnimationFrame(M);return}h.clearRect(0,0,g,p);for(let e=a.length;e;e-=1){const t=a[e-1],[o,i]=t.startPosition,[c,u]=t.currentPosition,[l,d]=t.targetPosition;let x=!0;if(o>l?c>l&&(x=!1):c<l&&(x=!1),i>d?u>d&&(x=!1):u<d&&(x=!1),x){a.splice(e-1,1),f-=1;continue}const _=(o+l)/2-o,D=c-o,G=(i+d)/2-i,N=u-i,R=(D/_+N/G)/2;t.opacity=R>1?2-R:R;const j=t.size/2,I=h.createRadialGradient(c,u,j,c,u,0);if(I.addColorStop(0,`rgba(${t.color.join(",")},0)`),I.addColorStop(1,`rgba(${t.color.join(",")},${t.opacity})`),h.fillStyle=I,h.fillRect(c-j,u-j,t.size,t.size),c!==l){const k=Math.abs(o-l),w=Math.abs(i-d),P=Math.min(1,k/w);c<l?t.currentPosition[0]+=t.speed*P:t.currentPosition[0]-=t.speed*P}if(u!==d){const k=Math.abs(o-l),w=Math.abs(i-d),P=Math.min(1,w/k);u<d?t.currentPosition[1]+=t.speed*P:t.currentPosition[1]-=t.speed*P}}r=requestAnimationFrame(M)}}r=requestAnimationFrame(M);const v=setInterval(()=>{if(F.current)return;let e=m-f;if(e>0)for(;e;)a.push(Y()),e-=1,f+=1},1500);return()=>{y=!0,r&&cancelAnimationFrame(r),clearInterval(v)}},[m,Y,h,g,p,b]),s.useEffect(()=>{if(n.current){const a=n.current.getContext("2d");a&&E(a),$(n.current.offsetWidth),z(n.current.offsetHeight)}},[n]),V.jsxRuntimeExports.jsx("canvas",{ref:n,"aria-hidden":!0,role:"presentation",width:g,height:p,style:{"--opacity":X},className:L.cx("kakadu-components-4131181690",S)})}exports.default=K;
@@ -1,62 +1,64 @@
1
- import { j as L } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { useRef as B, useState as E, useMemo as S, useCallback as J, useEffect as W } from "react";
3
- import { cx as K } from "@kuma-ui/core";
4
- const O = ["rgb(46, 75, 164)", "rgb(58, 125, 159)", "rgb(42, 81, 142)", "rgb(48, 132, 168)", "rgb(45, 64, 157)"];
5
- function Q(X) {
6
- return X.map((C) => {
1
+ import { j as K } from "../jsx-runtime-B4hRZ52C.mjs";
2
+ import { useRef as H, useState as z, useMemo as S, useCallback as O, useEffect as W } from "react";
3
+ import { cx as Q } from "@kuma-ui/core";
4
+ import T from "../hooks/use-is-in-view.mjs";
5
+ import U from "../hooks/use-is-document-focused.mjs";
6
+ const Z = ["rgb(46, 75, 164)", "rgb(58, 125, 159)", "rgb(42, 81, 142)", "rgb(48, 132, 168)", "rgb(45, 64, 157)"];
7
+ function _(X) {
8
+ return X.map((P) => {
7
9
  var n;
8
- const [f, M, Y] = ((n = C.match(/\d+/g)) == null ? void 0 : n.map(Number)) ?? [];
10
+ const [f, M, Y] = ((n = P.match(/\d+/g)) == null ? void 0 : n.map(Number)) ?? [];
9
11
  return [f, M, Y];
10
12
  });
11
13
  }
12
- function Z({
14
+ function st({
13
15
  className: X,
14
- colors: C = O,
16
+ colors: P = Z,
15
17
  maximumGradientsCount: f = 10,
16
18
  speed: M = 1,
17
19
  opacity: Y = 0.2
18
20
  }) {
19
- const n = B(null), [m, k] = E(), [h, w] = E(0), [p, $] = E(0), P = S(() => Q(C), [C]), H = S(() => P.length, [P]), j = J(() => {
20
- const u = Math.random(), y = P[Math.floor(H * u)], o = h * 1.25, g = h * 0.25, b = p * 1.25, e = p * 0.25, t = o * Math.random() - g, r = b * Math.random() - e, s = Math.max(o, b);
21
+ const n = H(null), [m, k] = z(), [h, D] = z(0), [p, $] = z(0), C = S(() => _(P), [P]), E = S(() => C.length, [C]), F = O(() => {
22
+ const d = Math.random(), y = C[Math.floor(E * d)], o = h * 1.25, g = h * 0.25, b = p * 1.25, e = p * 0.25, t = o * Math.random() - g, r = b * Math.random() - e, s = Math.max(o, b);
21
23
  return {
22
24
  color: y,
23
- size: s * u + s / 2,
25
+ size: s * d + s / 2,
24
26
  opacity: 0,
25
- speed: Math.max(0.1, u / 2 * M),
27
+ speed: Math.max(0.1, d / 2 * M),
26
28
  startPosition: [t, r],
27
29
  currentPosition: [t, r],
28
30
  targetPosition: [o * Math.random() - g, b * Math.random() - e]
29
31
  };
30
- }, [P, H, h, p, M]);
31
- return W(() => {
32
+ }, [C, E, h, p, M]), G = T(n), N = U(), I = H(!1);
33
+ return I.current = !G || !N, W(() => {
32
34
  const i = Array.from({
33
35
  length: f
34
- }).map(() => j());
35
- let u = f, y = !1, o;
36
+ }).map(() => F());
37
+ let d = f, y = !1, o;
36
38
  function g() {
37
39
  if (!y) {
38
- if (!m) {
40
+ if (!m || I.current) {
39
41
  o = requestAnimationFrame(g);
40
42
  return;
41
43
  }
42
44
  m.clearRect(0, 0, h, p);
43
45
  for (let e = i.length; e; e -= 1) {
44
- const t = i[e - 1], [r, s] = t.startPosition, [a, c] = t.currentPosition, [l, d] = t.targetPosition;
46
+ const t = i[e - 1], [r, s] = t.startPosition, [a, c] = t.currentPosition, [l, u] = t.targetPosition;
45
47
  let v = !0;
46
- if (r > l ? a > l && (v = !1) : a < l && (v = !1), s > d ? c > d && (v = !1) : c < d && (v = !1), v) {
47
- i.splice(e - 1, 1), u -= 1;
48
+ if (r > l ? a > l && (v = !1) : a < l && (v = !1), s > u ? c > u && (v = !1) : c < u && (v = !1), v) {
49
+ i.splice(e - 1, 1), d -= 1;
48
50
  continue;
49
51
  }
50
- const G = (r + l) / 2 - r, I = a - r, N = (s + d) / 2 - s, D = c - s, q = (I / G + D / N) / 2;
51
- t.opacity = q > 1 ? 2 - q : q;
52
- const A = t.size / 2, F = m.createRadialGradient(a, c, A, a, c, 0);
53
- if (F.addColorStop(0, `rgba(${t.color.join(",")},0)`), F.addColorStop(1, `rgba(${t.color.join(",")},${t.opacity})`), m.fillStyle = F, m.fillRect(a - A, c - A, t.size, t.size), a !== l) {
54
- const R = Math.abs(r - l), z = Math.abs(s - d), x = Math.min(1, R / z);
52
+ const V = (r + l) / 2 - r, L = a - r, B = (s + u) / 2 - s, J = c - s, j = (L / V + J / B) / 2;
53
+ t.opacity = j > 1 ? 2 - j : j;
54
+ const q = t.size / 2, w = m.createRadialGradient(a, c, q, a, c, 0);
55
+ if (w.addColorStop(0, `rgba(${t.color.join(",")},0)`), w.addColorStop(1, `rgba(${t.color.join(",")},${t.opacity})`), m.fillStyle = w, m.fillRect(a - q, c - q, t.size, t.size), a !== l) {
56
+ const A = Math.abs(r - l), R = Math.abs(s - u), x = Math.min(1, A / R);
55
57
  a < l ? t.currentPosition[0] += t.speed * x : t.currentPosition[0] -= t.speed * x;
56
58
  }
57
- if (c !== d) {
58
- const R = Math.abs(r - l), z = Math.abs(s - d), x = Math.min(1, z / R);
59
- c < d ? t.currentPosition[1] += t.speed * x : t.currentPosition[1] -= t.speed * x;
59
+ if (c !== u) {
60
+ const A = Math.abs(r - l), R = Math.abs(s - u), x = Math.min(1, R / A);
61
+ c < u ? t.currentPosition[1] += t.speed * x : t.currentPosition[1] -= t.speed * x;
60
62
  }
61
63
  }
62
64
  o = requestAnimationFrame(g);
@@ -64,23 +66,25 @@ function Z({
64
66
  }
65
67
  o = requestAnimationFrame(g);
66
68
  const b = setInterval(() => {
67
- let e = f - u;
69
+ if (I.current)
70
+ return;
71
+ let e = f - d;
68
72
  if (e > 0)
69
73
  for (; e; )
70
- i.push(j()), e -= 1, u += 1;
74
+ i.push(F()), e -= 1, d += 1;
71
75
  }, 1500);
72
76
  return () => {
73
77
  y = !0, o && cancelAnimationFrame(o), clearInterval(b);
74
78
  };
75
- }, [f, j, m, h, p, M]), W(() => {
79
+ }, [f, F, m, h, p, M]), W(() => {
76
80
  if (n.current) {
77
81
  const i = n.current.getContext("2d");
78
- i && k(i), w(n.current.offsetWidth), $(n.current.offsetHeight);
82
+ i && k(i), D(n.current.offsetWidth), $(n.current.offsetHeight);
79
83
  }
80
- }, [n]), /* @__PURE__ */ L.jsx("canvas", { ref: n, "aria-hidden": !0, role: "presentation", width: h, height: p, style: {
84
+ }, [n]), /* @__PURE__ */ K.jsx("canvas", { ref: n, "aria-hidden": !0, role: "presentation", width: h, height: p, style: {
81
85
  "--opacity": Y
82
- }, className: K("kakadu-components-4131181690", X) });
86
+ }, className: Q("kakadu-components-4131181690", X) });
83
87
  }
84
88
  export {
85
- Z as default
89
+ st as default
86
90
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const N=require("../jsx-runtime-BB_1_6y_.js"),u=require("react"),T=require("@kuma-ui/core");function B({color:y,opacity:R,className:W,minimumSize:A=1,maximumSize:S=5,maximumStarsCount:x=50,speed:C=1,hasMask:j=!1}){const e=u.useRef(null),[r,z]=u.useState(),[f,F]=u.useState(0),[d,H]=u.useState(0),q=u.useCallback(()=>{const n=f*1.5,s=f*.25,a=d*1.5,o=d*.25,M=n*Math.random()-s,h=a*Math.random()-o;return{size:Math.max(A,S*Math.random()),opacity:0,speed:Math.max(.1,Math.random()/2*C),startPosition:[M,h],currentPosition:[M,h],targetPosition:[n*Math.random()-s,a*Math.random()-o]}},[f,d,A,S,C]),w=u.useCallback(()=>y??(e.current?getComputedStyle(e.current).color:"#000"),[y,e]);return u.useEffect(()=>{const n=Array.from({length:x}).map(()=>q());let s=x,a=!1,o,M=w();function h(){if(!a){if(!r){o=requestAnimationFrame(h);return}r.clearRect(0,0,f,d);for(let i=n.length;i;i-=1){const t=n[i-1],[v,p]=t.startPosition,[g,m]=t.currentPosition,[c,l]=t.targetPosition;let P=!0;if(v>c?g>c&&(P=!1):g<c&&(P=!1),p>l?m>l&&(P=!1):m<l&&(P=!1),P){n.splice(i-1,1),s-=1;continue}const L=(v+c)/2-v,O=g-v,_=(p+l)/2-p,$=m-p,X=(O/L+$/_)/2;t.opacity=X>1?2-X:X;const Y=t.size/2;if(r.beginPath(),r.arc(g-Y,m-Y,Y,0,2*Math.PI,!1),r.globalAlpha=t.opacity,r.fillStyle=M,r.fill(),g!==c){const E=Math.abs(v-c),k=Math.abs(p-l),b=Math.min(1,E/k);g<c?t.currentPosition[0]+=t.speed*b:t.currentPosition[0]-=t.speed*b}if(m!==l){const E=Math.abs(v-c),k=Math.abs(p-l),b=Math.min(1,k/E);m<l?t.currentPosition[1]+=t.speed*b:t.currentPosition[1]-=t.speed*b}}o=requestAnimationFrame(h)}}o=requestAnimationFrame(h);const I=setInterval(()=>{M=w();let i=x-s;if(i>0)for(;i;)n.push(q()),i-=1,s+=1},500);return()=>{a=!0,o&&cancelAnimationFrame(o),clearInterval(I)}},[x,q,w,r,f,d,C]),u.useEffect(()=>{if(e.current){const n=e.current.getContext("2d");n&&z(n),F(e.current.offsetWidth),H(e.current.offsetHeight);const s=()=>{e.current&&(F(e.current.offsetWidth),H(e.current.offsetHeight))},a=new ResizeObserver(s);return a.observe(e.current),window.addEventListener("resize",s,{passive:!0}),()=>{a.disconnect(),window.removeEventListener("resize",s)}}},[e]),N.jsxRuntimeExports.jsx("canvas",{ref:e,"aria-hidden":!0,role:"presentation",style:{"--color":y,"--opacity":R},className:T.cx("kakadu-components-3366903902",j&&"kakadu-components-4049648322",W),width:f,height:d})}exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("../jsx-runtime-BB_1_6y_.js"),r=require("react"),B=require("@kuma-ui/core"),G=require("../hooks/use-is-in-view.js"),J=require("../hooks/use-is-document-focused.js");function K({color:q,opacity:H,className:W,minimumSize:I=1,maximumSize:A=5,maximumStarsCount:x=50,speed:w=1,hasMask:j=!1}){const e=r.useRef(null),[o,_]=r.useState(),[f,R]=r.useState(0),[d,S]=r.useState(0),y=r.useCallback(()=>{const n=f*1.5,s=f*.25,a=d*1.5,i=d*.25,M=n*Math.random()-s,h=a*Math.random()-i;return{size:Math.max(I,A*Math.random()),opacity:0,speed:Math.max(.1,Math.random()/2*w),startPosition:[M,h],currentPosition:[M,h],targetPosition:[n*Math.random()-s,a*Math.random()-i]}},[f,d,I,A,w]),C=r.useCallback(()=>q??(e.current?getComputedStyle(e.current).color:"#000"),[q,e]),z=G.default(e),D=J.default(),k=r.useRef(!1);return k.current=!z||!D,r.useEffect(()=>{const n=Array.from({length:x}).map(()=>y());let s=x,a=!1,i,M=C();function h(){if(!a){if(!o||k.current){i=requestAnimationFrame(h);return}o.clearRect(0,0,f,d);for(let c=n.length;c;c-=1){const t=n[c-1],[v,p]=t.startPosition,[g,m]=t.currentPosition,[u,l]=t.targetPosition;let P=!0;if(v>u?g>u&&(P=!1):g<u&&(P=!1),p>l?m>l&&(P=!1):m<l&&(P=!1),P){n.splice(c-1,1),s-=1;continue}const O=(v+u)/2-v,V=g-v,$=(p+l)/2-p,N=m-p,X=(V/O+N/$)/2;t.opacity=X>1?2-X:X;const Y=t.size/2;if(o.beginPath(),o.arc(g-Y,m-Y,Y,0,2*Math.PI,!1),o.globalAlpha=t.opacity,o.fillStyle=M,o.fill(),g!==u){const E=Math.abs(v-u),F=Math.abs(p-l),b=Math.min(1,E/F);g<u?t.currentPosition[0]+=t.speed*b:t.currentPosition[0]-=t.speed*b}if(m!==l){const E=Math.abs(v-u),F=Math.abs(p-l),b=Math.min(1,F/E);m<l?t.currentPosition[1]+=t.speed*b:t.currentPosition[1]-=t.speed*b}}i=requestAnimationFrame(h)}}i=requestAnimationFrame(h);const L=setInterval(()=>{if(k.current)return;M=C();let c=x-s;if(c>0)for(;c;)n.push(y()),c-=1,s+=1},500);return()=>{a=!0,i&&cancelAnimationFrame(i),clearInterval(L)}},[x,y,C,o,f,d,w]),r.useEffect(()=>{if(e.current){const n=e.current.getContext("2d");n&&_(n),R(e.current.offsetWidth),S(e.current.offsetHeight);const s=()=>{e.current&&(R(e.current.offsetWidth),S(e.current.offsetHeight))},a=new ResizeObserver(s);return a.observe(e.current),window.addEventListener("resize",s,{passive:!0}),()=>{a.disconnect(),window.removeEventListener("resize",s)}}},[e]),T.jsxRuntimeExports.jsx("canvas",{ref:e,"aria-hidden":!0,role:"presentation",style:{"--color":q,"--opacity":H},className:B.cx("kakadu-components-3366903902",j&&"kakadu-components-4049648322",W),width:f,height:d})}exports.default=K;
@@ -1,90 +1,94 @@
1
- import { j as J } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { useRef as K, useState as k, useCallback as R, useEffect as j } from "react";
3
- import { cx as Q } from "@kuma-ui/core";
4
- function Z({
1
+ import { j as T } from "../jsx-runtime-B4hRZ52C.mjs";
2
+ import { useRef as R, useState as E, useCallback as j, useEffect as z } from "react";
3
+ import { cx as U } from "@kuma-ui/core";
4
+ import Z from "../hooks/use-is-in-view.mjs";
5
+ import _ from "../hooks/use-is-document-focused.mjs";
6
+ function st({
5
7
  color: b,
6
- opacity: z,
7
- className: I,
8
- minimumSize: q = 1,
9
- maximumSize: F = 5,
8
+ opacity: D,
9
+ className: L,
10
+ minimumSize: k = 1,
11
+ maximumSize: q = 5,
10
12
  maximumStarsCount: x = 50,
11
- speed: y = 1,
12
- hasMask: L = !1
13
+ speed: w = 1,
14
+ hasMask: S = !1
13
15
  }) {
14
- const e = K(null), [s, S] = k(), [f, H] = k(0), [u, W] = k(0), C = R(() => {
15
- const n = f * 1.5, r = f * 0.25, o = u * 1.5, a = u * 0.25, g = n * Math.random() - r, d = o * Math.random() - a;
16
+ const t = R(null), [s, V] = E(), [u, H] = E(0), [f, W] = E(0), y = j(() => {
17
+ const n = u * 1.5, r = u * 0.25, o = f * 1.5, i = f * 0.25, g = n * Math.random() - r, d = o * Math.random() - i;
16
18
  return {
17
- size: Math.max(q, F * Math.random()),
19
+ size: Math.max(k, q * Math.random()),
18
20
  opacity: 0,
19
- speed: Math.max(0.1, Math.random() / 2 * y),
21
+ speed: Math.max(0.1, Math.random() / 2 * w),
20
22
  startPosition: [g, d],
21
23
  currentPosition: [g, d],
22
- targetPosition: [n * Math.random() - r, o * Math.random() - a]
24
+ targetPosition: [n * Math.random() - r, o * Math.random() - i]
23
25
  };
24
- }, [f, u, q, F, y]), w = R(() => b ?? (e.current ? getComputedStyle(e.current).color : "#000"), [b, e]);
25
- return j(() => {
26
+ }, [u, f, k, q, w]), C = j(() => b ?? (t.current ? getComputedStyle(t.current).color : "#000"), [b, t]), N = Z(t), O = _(), X = R(!1);
27
+ return X.current = !N || !O, z(() => {
26
28
  const n = Array.from({
27
29
  length: x
28
- }).map(() => C());
29
- let r = x, o = !1, a, g = w();
30
+ }).map(() => y());
31
+ let r = x, o = !1, i, g = C();
30
32
  function d() {
31
33
  if (!o) {
32
- if (!s) {
33
- a = requestAnimationFrame(d);
34
+ if (!s || X.current) {
35
+ i = requestAnimationFrame(d);
34
36
  return;
35
37
  }
36
- s.clearRect(0, 0, f, u);
37
- for (let i = n.length; i; i -= 1) {
38
- const t = n[i - 1], [h, p] = t.startPosition, [m, v] = t.currentPosition, [c, l] = t.targetPosition;
38
+ s.clearRect(0, 0, u, f);
39
+ for (let a = n.length; a; a -= 1) {
40
+ const e = n[a - 1], [h, m] = e.startPosition, [p, v] = e.currentPosition, [c, l] = e.targetPosition;
39
41
  let M = !0;
40
- if (h > c ? m > c && (M = !1) : m < c && (M = !1), p > l ? v > l && (M = !1) : v < l && (M = !1), M) {
41
- n.splice(i - 1, 1), r -= 1;
42
+ if (h > c ? p > c && (M = !1) : p < c && (M = !1), m > l ? v > l && (M = !1) : v < l && (M = !1), M) {
43
+ n.splice(a - 1, 1), r -= 1;
42
44
  continue;
43
45
  }
44
- const O = (h + c) / 2 - h, B = m - h, D = (p + l) / 2 - p, G = v - p, X = (B / O + G / D) / 2;
45
- t.opacity = X > 1 ? 2 - X : X;
46
- const Y = t.size / 2;
47
- if (s.beginPath(), s.arc(m - Y, v - Y, Y, 0, 2 * Math.PI, !1), s.globalAlpha = t.opacity, s.fillStyle = g, s.fill(), m !== c) {
48
- const A = Math.abs(h - c), E = Math.abs(p - l), P = Math.min(1, A / E);
49
- m < c ? t.currentPosition[0] += t.speed * P : t.currentPosition[0] -= t.speed * P;
46
+ const G = (h + c) / 2 - h, J = p - h, K = (m + l) / 2 - m, Q = v - m, Y = (J / G + Q / K) / 2;
47
+ e.opacity = Y > 1 ? 2 - Y : Y;
48
+ const F = e.size / 2;
49
+ if (s.beginPath(), s.arc(p - F, v - F, F, 0, 2 * Math.PI, !1), s.globalAlpha = e.opacity, s.fillStyle = g, s.fill(), p !== c) {
50
+ const I = Math.abs(h - c), A = Math.abs(m - l), P = Math.min(1, I / A);
51
+ p < c ? e.currentPosition[0] += e.speed * P : e.currentPosition[0] -= e.speed * P;
50
52
  }
51
53
  if (v !== l) {
52
- const A = Math.abs(h - c), E = Math.abs(p - l), P = Math.min(1, E / A);
53
- v < l ? t.currentPosition[1] += t.speed * P : t.currentPosition[1] -= t.speed * P;
54
+ const I = Math.abs(h - c), A = Math.abs(m - l), P = Math.min(1, A / I);
55
+ v < l ? e.currentPosition[1] += e.speed * P : e.currentPosition[1] -= e.speed * P;
54
56
  }
55
57
  }
56
- a = requestAnimationFrame(d);
58
+ i = requestAnimationFrame(d);
57
59
  }
58
60
  }
59
- a = requestAnimationFrame(d);
60
- const N = setInterval(() => {
61
- g = w();
62
- let i = x - r;
63
- if (i > 0)
64
- for (; i; )
65
- n.push(C()), i -= 1, r += 1;
61
+ i = requestAnimationFrame(d);
62
+ const B = setInterval(() => {
63
+ if (X.current)
64
+ return;
65
+ g = C();
66
+ let a = x - r;
67
+ if (a > 0)
68
+ for (; a; )
69
+ n.push(y()), a -= 1, r += 1;
66
70
  }, 500);
67
71
  return () => {
68
- o = !0, a && cancelAnimationFrame(a), clearInterval(N);
72
+ o = !0, i && cancelAnimationFrame(i), clearInterval(B);
69
73
  };
70
- }, [x, C, w, s, f, u, y]), j(() => {
71
- if (e.current) {
72
- const n = e.current.getContext("2d");
73
- n && S(n), H(e.current.offsetWidth), W(e.current.offsetHeight);
74
+ }, [x, y, C, s, u, f, w]), z(() => {
75
+ if (t.current) {
76
+ const n = t.current.getContext("2d");
77
+ n && V(n), H(t.current.offsetWidth), W(t.current.offsetHeight);
74
78
  const r = () => {
75
- e.current && (H(e.current.offsetWidth), W(e.current.offsetHeight));
79
+ t.current && (H(t.current.offsetWidth), W(t.current.offsetHeight));
76
80
  }, o = new ResizeObserver(r);
77
- return o.observe(e.current), window.addEventListener("resize", r, {
81
+ return o.observe(t.current), window.addEventListener("resize", r, {
78
82
  passive: !0
79
83
  }), () => {
80
84
  o.disconnect(), window.removeEventListener("resize", r);
81
85
  };
82
86
  }
83
- }, [e]), /* @__PURE__ */ J.jsx("canvas", { ref: e, "aria-hidden": !0, role: "presentation", style: {
87
+ }, [t]), /* @__PURE__ */ T.jsx("canvas", { ref: t, "aria-hidden": !0, role: "presentation", style: {
84
88
  "--color": b,
85
- "--opacity": z
86
- }, className: Q("kakadu-components-3366903902", L && "kakadu-components-4049648322", I), width: f, height: u });
89
+ "--opacity": D
90
+ }, className: U("kakadu-components-3366903902", S && "kakadu-components-4049648322", L), width: u, height: f });
87
91
  }
88
92
  export {
89
- Z as default
93
+ st as default
90
94
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../jsx-runtime-BB_1_6y_.js"),y=require("@kuma-ui/core"),c=require("react"),K=require("../theme.js"),q=require("../icons/icon.js"),z=require("../hooks/use-synchronized-value.js"),R=require("./popover.js"),F=require("./atom.js"),_=require("./text.js"),g=require("./hover-gradient.js"),V=require("./click-ripples.js"),A=require("./separator.js"),B=require("./decorators.js"),I=require("./spinner.js"),N=require("./skeleton.js");function S(){const{value:e,setValue:s}=z.default("isKeyboardNavigating");return c.useMemo(()=>({isKeyboardNavigating:e,setIsKeyboardNavigating:s}),[e,s])}const T="kakadu-components-949294122";function H({isLoading:e,isDisabled:s,label:l,iconLeft:m,iconRight:u,href:a,target:h,shouldCloseOnClick:o=!0,decorators:i=[],submenu:p,className:d,onClick:r,...k}){const{isVisible:b,isPreparingFocus:E,isFocused:n,close:v}=R.usePopoverContext(),{isKeyboardNavigating:j}=S(),f=c.useRef(!0),w=c.useCallback(()=>{f.current=n},[n]),M=c.useCallback(D=>{!j&&!f.current||n&&(r==null||r(D),p?p.show():o&&(v==null||v()))},[j,n,r,p,o,v]),x=!b&&!E||!!e||!!s,P=c.useMemo(()=>t.jsxRuntimeExports.jsxs(F.default,{as:a&&!e?"a":"button",...k,"aria-disabled":a&&x?!0:void 0,type:a&&!e?void 0:"button",role:"menuitem",href:a,target:h,inert:a?x:void 0,disabled:a?void 0:x,className:y.cx(K.buttonResetStyles,"kakadu-components-1772835671",n&&"kakadu-components-3160069815",j?"kakadu-components-2254977234":n&&!x&&"kakadu-components-278139688",x&&"kakadu-components-1879666195",d),onClick:x?void 0:M,onPointerDownCapture:x?void 0:w,children:[t.jsxRuntimeExports.jsxs(_.Span,{className:y.cx("kakadu-components-1377252111",e?"kakadu-components-2409458488":x&&"kakadu-components-532828420"),children:[m?e?t.jsxRuntimeExports.jsx(I.default,{size:12}):t.jsxRuntimeExports.jsx(q.default,{width:12,height:12,type:m}):null,t.jsxRuntimeExports.jsxs("span",{className:y.cx("kakadu-components-1590676894",e&&"kakadu-components-743909038"),children:[e?t.jsxRuntimeExports.jsx(N.SkeletonInstance,{"aria-hidden":!0,width:"100%",className:"kakadu-components-3950955262"}):null,t.jsxRuntimeExports.jsx("span",{className:e?"kakadu-components-543569100":void 0,children:l})]}),u?e?m?t.jsxRuntimeExports.jsx(N.SkeletonInstance,{width:12,height:12}):t.jsxRuntimeExports.jsx(I.default,{size:12}):t.jsxRuntimeExports.jsx(q.default,{width:12,height:12,type:u}):null]}),j||x?null:t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(V.default,{isActive:n,size:100}),t.jsxRuntimeExports.jsx(g.default,{isActive:n,size:150,className:g.normalBlendStyles})]})]}),[a,e,k,x,h,n,j,d,M,w,l,m,u]);return t.jsxRuntimeExports.jsx(B.default,{decorators:i,children:p?t.jsxRuntimeExports.jsx(C,{menu:p.popoverMenu,className:"kakadu-components-1861176543",children:P}):P})}function $(e){if("type"in e){if(e.type==="separator")return t.jsxRuntimeExports.jsx(A.default,{});if(e.type==="group")return t.jsxRuntimeExports.jsx(_.Span,{className:"kakadu-components-1499037363",children:e.label})}return t.jsxRuntimeExports.jsx(H,{...e})}function G({items:e}){const{isFocused:s}=R.usePopoverContext(),[l,m]=c.useState([]),{setIsKeyboardNavigating:u}=S(),a=c.useCallback(o=>{o&&m(i=>i.includes(o)?i:[...i,o])},[]),h=c.useCallback(o=>{s&&(o.currentTarget.focus(),u(!1))},[s,u]);return c.useEffect(()=>{if(!s)return;const o=i=>{const p=l.filter(n=>n.isConnected),d=p.length;if(d===0)return;let r,k=1;const b=document.activeElement;let E=b?p.indexOf(b):-1;switch(E===-1&&(E=0),i.key){case"ArrowUp":k=-1;case"ArrowDown":{r=(E+k+d)%d;break}case"Home":{r=0;break}case"End":{r=d-1,k=-1;break}case"Tab":{u(!0);return}}if(r!==void 0){i.preventDefault(),i.stopPropagation();let n=p[r];if(n){let v=0;const j=f=>"disabled"in f&&f.disabled||"inert"in f&&f.inert;for(;j(n)&&v<d;)r=(r+k+d)%d,n=p[r],v+=1;n&&!j(n)&&(n.focus(),u(!0))}}};return window.addEventListener("keydown",o,{capture:!0}),()=>{window.removeEventListener("keydown",o,{capture:!0})}},[s,l,u]),t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:e.map((o,i)=>t.jsxRuntimeExports.jsx($,{...o,reference:a,onMouseEnter:h},i))})}function O({items:e,...s}){return t.jsxRuntimeExports.jsx(R.default,{...s,as:"nav",role:"menu",innerClassName:"kakadu-components-3600436535",children:t.jsxRuntimeExports.jsx(G,{items:e})})}function U(e){const s=c.useMemo(()=>({items:e}),[e]),{isVisible:l,show:m,close:u,popover:a}=R.usePopover(O,s);return c.useMemo(()=>({isVisible:l,show:m,close:u,popoverMenu:a}),[l,m,u,a])}function C({menu:e,className:s,children:l}){return t.jsxRuntimeExports.jsxs(R.PopoverContainer,{className:s,children:[l,e]})}exports.dangerPopoverMenuItemStyles=T;exports.default=C;exports.usePopoverMenu=U;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../jsx-runtime-BB_1_6y_.js"),w=require("@kuma-ui/core"),i=require("react"),z=require("../theme.js"),q=require("../icons/icon.js"),A=require("../hooks/use-synchronized-value.js"),R=require("./popover.js"),F=require("./atom.js"),S=require("./text.js"),I=require("./hover-gradient.js"),V=require("./click-ripples.js"),B=require("./separator.js"),T=require("./decorators.js"),N=require("./spinner.js"),_=require("./skeleton.js");function C(){const{value:e,setValue:s}=A.default("isKeyboardNavigating");return i.useMemo(()=>({isKeyboardNavigating:e,setIsKeyboardNavigating:s}),[e,s])}const H="kakadu-components-949294122";function $({isLoading:e,isDisabled:s,label:c,iconLeft:x,iconRight:u,href:m,target:b,shouldCloseOnClick:o=!0,decorators:a=[],submenu:l,className:d,onClick:r,...v}){const{isVisible:y,isPreparingFocus:h,isFocused:n,close:k}=R.usePopoverContext(),{isKeyboardNavigating:j}=C(),f=i.useRef(!0),M=i.useCallback(()=>{f.current=n},[n]),P=i.useCallback(K=>{!j&&!f.current||n&&(r==null||r(K),l?l.show():o&&(k==null||k()))},[j,n,r,l,o,k]),p=!y&&!h||!!e||!!s,E=m!==void 0&&!e,g=i.useMemo(()=>t.jsxRuntimeExports.jsxs(F.default,{as:E?"a":"button",...v,"aria-disabled":E&&p?!0:void 0,type:E?void 0:"button",role:"menuitem",href:e?void 0:m,target:E?b:void 0,inert:E?p:void 0,disabled:E?void 0:p,className:w.cx(z.buttonResetStyles,"kakadu-components-1772835671",n&&"kakadu-components-3160069815",j?"kakadu-components-2254977234":n&&!p&&"kakadu-components-278139688",p&&"kakadu-components-1879666195",d),onClick:p?void 0:P,onPointerDownCapture:p?void 0:M,children:[t.jsxRuntimeExports.jsxs(S.Span,{className:w.cx("kakadu-components-1377252111",e?"kakadu-components-2409458488":p&&"kakadu-components-532828420"),children:[x?e?t.jsxRuntimeExports.jsx(N.default,{size:12}):t.jsxRuntimeExports.jsx(q.default,{width:12,height:12,type:x}):null,t.jsxRuntimeExports.jsxs("span",{className:w.cx("kakadu-components-1590676894",e&&"kakadu-components-743909038"),children:[e?t.jsxRuntimeExports.jsx(_.SkeletonInstance,{"aria-hidden":!0,width:"100%",className:"kakadu-components-3950955262"}):null,t.jsxRuntimeExports.jsx("span",{className:e?"kakadu-components-543569100":void 0,children:c})]}),u?e?x?t.jsxRuntimeExports.jsx(_.SkeletonInstance,{width:12,height:12}):t.jsxRuntimeExports.jsx(N.default,{size:12}):t.jsxRuntimeExports.jsx(q.default,{width:12,height:12,type:u}):null]}),j||p?null:t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(V.default,{isActive:n,size:100}),t.jsxRuntimeExports.jsx(I.default,{isActive:n,size:150,className:I.normalBlendStyles})]})]}),[E,v,p,m,e,b,d,n,j,P,M,x,c,u]);return t.jsxRuntimeExports.jsx(T.default,{decorators:a,children:l?t.jsxRuntimeExports.jsx(D,{menu:l.popoverMenu,className:"kakadu-components-1861176543",children:g}):g})}function G(e){if("type"in e){if(e.type==="separator")return t.jsxRuntimeExports.jsx(B.default,{});if(e.type==="group")return t.jsxRuntimeExports.jsx(S.Span,{className:"kakadu-components-1499037363",children:e.label})}return t.jsxRuntimeExports.jsx($,{...e})}function O({items:e}){const{isFocused:s}=R.usePopoverContext(),[c,x]=i.useState([]),{setIsKeyboardNavigating:u}=C(),m=i.useCallback(o=>{o&&x(a=>a.includes(o)?a:[...a,o])},[]),b=i.useCallback(o=>{s&&(o.currentTarget.focus(),u(!1))},[s,u]);return i.useEffect(()=>{if(!s)return;const o=a=>{const l=c.filter(n=>n.isConnected),d=l.length;if(d===0)return;let r,v=1;const y=document.activeElement;let h=y?l.indexOf(y):-1;switch(h===-1&&(h=0),a.key){case"ArrowUp":v=-1;case"ArrowDown":{r=(h+v+d)%d;break}case"Home":{r=0;break}case"End":{r=d-1,v=-1;break}case"Tab":{u(!0);return}}if(r!==void 0){a.preventDefault(),a.stopPropagation();let n=l[r];if(n){let k=0;const j=f=>"disabled"in f&&f.disabled||"inert"in f&&f.inert;for(;j(n)&&k<d;)r=(r+v+d)%d,n=l[r],k+=1;n&&!j(n)&&(n.focus(),u(!0))}}};return window.addEventListener("keydown",o,{capture:!0}),()=>{window.removeEventListener("keydown",o,{capture:!0})}},[s,c,u]),t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:e.map((o,a)=>t.jsxRuntimeExports.jsx(G,{...o,reference:m,onMouseEnter:b},a))})}function U({items:e,...s}){return t.jsxRuntimeExports.jsx(R.default,{...s,as:"nav",role:"menu",innerClassName:"kakadu-components-3600436535",children:t.jsxRuntimeExports.jsx(O,{items:e})})}function J(e){const s=i.useMemo(()=>({items:e}),[e]),{isVisible:c,show:x,close:u,popover:m}=R.usePopover(U,s);return i.useMemo(()=>({isVisible:c,show:x,close:u,popoverMenu:m}),[c,x,u,m])}function D({menu:e,className:s,children:c}){return t.jsxRuntimeExports.jsxs(R.PopoverContainer,{className:s,children:[c,e]})}exports.dangerPopoverMenuItemStyles=H;exports.default=D;exports.usePopoverMenu=J;