@kakadu/components 5.0.4 → 5.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/button.js +1 -1
- package/build/components/button.mjs +1 -1
- package/build/components/card.js +1 -1
- package/build/components/card.mjs +28 -27
- package/build/components/icon-button.js +1 -1
- package/build/components/icon-button.mjs +10 -10
- package/build/components/popover-menu.js +1 -1
- package/build/components/popover-menu.mjs +87 -87
- package/build/components/text-button.js +1 -1
- package/build/components/text-button.mjs +1 -1
- package/package.json +1 -1
|
@@ -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,
|
package/build/components/card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),
|
|
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
|
|
2
|
-
import { cx as
|
|
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
|
|
4
|
+
import h, { iconShadowStyles as k } from "../icons/icon.mjs";
|
|
5
5
|
import s from "./flex.mjs";
|
|
6
|
-
import { Span as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { buttonSecondaryStyles as
|
|
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
|
|
12
|
-
ref:
|
|
13
|
-
icon:
|
|
14
|
-
title:
|
|
15
|
-
description:
|
|
16
|
-
action:
|
|
17
|
-
href:
|
|
18
|
-
target:
|
|
19
|
-
rel:
|
|
20
|
-
className:
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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__ */
|
|
30
|
-
/* @__PURE__ */
|
|
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__ */
|
|
33
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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
|
|
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:
|
|
23
|
-
disabled:
|
|
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
|
-
|
|
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
|
-
|
|
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]),
|
|
45
|
+
}, [r, t, u]), l(() => () => {
|
|
46
46
|
u();
|
|
47
47
|
}, [u]);
|
|
48
|
-
const
|
|
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 ?
|
|
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
|
-
|
|
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 t=require("../jsx-runtime-BB_1_6y_.js"),
|
|
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;
|
|
@@ -1,108 +1,108 @@
|
|
|
1
1
|
import { j as n } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { cx as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { buttonResetStyles as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
2
|
+
import { cx as I } from "@kuma-ui/core";
|
|
3
|
+
import { useMemo as b, useState as F, useCallback as P, useEffect as V, useRef as B } from "react";
|
|
4
|
+
import { buttonResetStyles as H } from "../theme.mjs";
|
|
5
|
+
import E from "../icons/icon.mjs";
|
|
6
|
+
import R from "../hooks/use-synchronized-value.mjs";
|
|
7
|
+
import T, { PopoverContainer as G, usePopover as U, usePopoverContext as A } from "./popover.mjs";
|
|
8
|
+
import q from "./atom.mjs";
|
|
9
9
|
import { Span as K } from "./text.mjs";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { SkeletonInstance as
|
|
10
|
+
import J, { normalBlendStyles as O } from "./hover-gradient.mjs";
|
|
11
|
+
import Q from "./click-ripples.mjs";
|
|
12
|
+
import W from "./separator.mjs";
|
|
13
|
+
import X from "./decorators.mjs";
|
|
14
|
+
import S from "./spinner.mjs";
|
|
15
|
+
import { SkeletonInstance as D } from "./skeleton.mjs";
|
|
16
16
|
function z() {
|
|
17
17
|
const {
|
|
18
18
|
value: e,
|
|
19
19
|
setValue: o
|
|
20
|
-
} =
|
|
21
|
-
return
|
|
20
|
+
} = R("isKeyboardNavigating");
|
|
21
|
+
return b(() => ({
|
|
22
22
|
isKeyboardNavigating: e,
|
|
23
23
|
setIsKeyboardNavigating: o
|
|
24
24
|
}), [e, o]);
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
function
|
|
26
|
+
const ve = "kakadu-components-949294122";
|
|
27
|
+
function Y({
|
|
28
28
|
isLoading: e,
|
|
29
29
|
isDisabled: o,
|
|
30
|
-
label:
|
|
31
|
-
iconLeft:
|
|
30
|
+
label: c,
|
|
31
|
+
iconLeft: m,
|
|
32
32
|
iconRight: a,
|
|
33
|
-
href:
|
|
34
|
-
target:
|
|
33
|
+
href: p,
|
|
34
|
+
target: w,
|
|
35
35
|
shouldCloseOnClick: r = !0,
|
|
36
|
-
decorators:
|
|
37
|
-
submenu:
|
|
38
|
-
className:
|
|
36
|
+
decorators: i = [],
|
|
37
|
+
submenu: u,
|
|
38
|
+
className: d,
|
|
39
39
|
onClick: s,
|
|
40
40
|
...v
|
|
41
41
|
}) {
|
|
42
42
|
const {
|
|
43
|
-
isVisible:
|
|
43
|
+
isVisible: y,
|
|
44
44
|
isPreparingFocus: j,
|
|
45
45
|
isFocused: t,
|
|
46
46
|
close: k
|
|
47
|
-
} =
|
|
47
|
+
} = A(), {
|
|
48
48
|
isKeyboardNavigating: f
|
|
49
|
-
} = z(), x =
|
|
49
|
+
} = z(), x = B(!0), N = P(() => {
|
|
50
50
|
x.current = t;
|
|
51
|
-
}, [t]),
|
|
52
|
-
!f && !x.current || t && (s == null || s(
|
|
53
|
-
}, [f, t, s,
|
|
54
|
-
/* @__PURE__ */ n.jsxs(K, { className:
|
|
55
|
-
|
|
56
|
-
/* @__PURE__ */ n.jsxs("span", { className:
|
|
57
|
-
e ? /* @__PURE__ */ n.jsx(
|
|
58
|
-
/* @__PURE__ */ n.jsx("span", { className: e ? "kakadu-components-543569100" : void 0, children:
|
|
51
|
+
}, [t]), g = P((C) => {
|
|
52
|
+
!f && !x.current || t && (s == null || s(C), u ? u.show() : r && (k == null || k()));
|
|
53
|
+
}, [f, t, s, u, r, k]), l = !y && !j || !!e || !!o, h = p !== void 0 && !e, M = b(() => /* @__PURE__ */ n.jsxs(q, { as: h ? "a" : "button", ...v, "aria-disabled": h && l ? !0 : void 0, type: h ? void 0 : "button", role: "menuitem", href: e ? void 0 : p, target: h ? w : void 0, inert: h ? l : void 0, disabled: h ? void 0 : l, className: I(H, "kakadu-components-1772835671", t && "kakadu-components-3160069815", f ? "kakadu-components-2254977234" : t && !l && "kakadu-components-278139688", l && "kakadu-components-1879666195", d), onClick: l ? void 0 : g, onPointerDownCapture: l ? void 0 : N, children: [
|
|
54
|
+
/* @__PURE__ */ n.jsxs(K, { className: I("kakadu-components-1377252111", e ? "kakadu-components-2409458488" : l && "kakadu-components-532828420"), children: [
|
|
55
|
+
m ? e ? /* @__PURE__ */ n.jsx(S, { size: 12 }) : /* @__PURE__ */ n.jsx(E, { width: 12, height: 12, type: m }) : null,
|
|
56
|
+
/* @__PURE__ */ n.jsxs("span", { className: I("kakadu-components-1590676894", e && "kakadu-components-743909038"), children: [
|
|
57
|
+
e ? /* @__PURE__ */ n.jsx(D, { "aria-hidden": !0, width: "100%", className: "kakadu-components-3950955262" }) : null,
|
|
58
|
+
/* @__PURE__ */ n.jsx("span", { className: e ? "kakadu-components-543569100" : void 0, children: c })
|
|
59
59
|
] }),
|
|
60
|
-
a ? e ?
|
|
60
|
+
a ? e ? m ? /* @__PURE__ */ n.jsx(D, { width: 12, height: 12 }) : /* @__PURE__ */ n.jsx(S, { size: 12 }) : /* @__PURE__ */ n.jsx(E, { width: 12, height: 12, type: a }) : null
|
|
61
61
|
] }),
|
|
62
|
-
f ||
|
|
63
|
-
/* @__PURE__ */ n.jsx(
|
|
64
|
-
/* @__PURE__ */ n.jsx(
|
|
62
|
+
f || l ? null : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
63
|
+
/* @__PURE__ */ n.jsx(Q, { isActive: t, size: 100 }),
|
|
64
|
+
/* @__PURE__ */ n.jsx(J, { isActive: t, size: 150, className: O })
|
|
65
65
|
] })
|
|
66
|
-
] }), [
|
|
67
|
-
return /* @__PURE__ */ n.jsx(
|
|
66
|
+
] }), [h, v, l, p, e, w, d, t, f, g, N, m, c, a]);
|
|
67
|
+
return /* @__PURE__ */ n.jsx(X, { decorators: i, children: u ? /* @__PURE__ */ n.jsx(L, { menu: u.popoverMenu, className: "kakadu-components-1861176543", children: M }) : M });
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Z(e) {
|
|
70
70
|
if ("type" in e) {
|
|
71
71
|
if (e.type === "separator")
|
|
72
|
-
return /* @__PURE__ */ n.jsx(
|
|
72
|
+
return /* @__PURE__ */ n.jsx(W, {});
|
|
73
73
|
if (e.type === "group")
|
|
74
74
|
return /* @__PURE__ */ n.jsx(K, { className: "kakadu-components-1499037363", children: e.label });
|
|
75
75
|
}
|
|
76
|
-
return /* @__PURE__ */ n.jsx(
|
|
76
|
+
return /* @__PURE__ */ n.jsx(Y, { ...e });
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function _({
|
|
79
79
|
items: e
|
|
80
80
|
}) {
|
|
81
81
|
const {
|
|
82
82
|
isFocused: o
|
|
83
|
-
} =
|
|
83
|
+
} = A(), [c, m] = F([]), {
|
|
84
84
|
setIsKeyboardNavigating: a
|
|
85
|
-
} = z(),
|
|
86
|
-
r &&
|
|
87
|
-
}, []),
|
|
85
|
+
} = z(), p = P((r) => {
|
|
86
|
+
r && m((i) => i.includes(r) ? i : [...i, r]);
|
|
87
|
+
}, []), w = P((r) => {
|
|
88
88
|
o && (r.currentTarget.focus(), a(!1));
|
|
89
89
|
}, [o, a]);
|
|
90
|
-
return
|
|
90
|
+
return V(() => {
|
|
91
91
|
if (!o)
|
|
92
92
|
return;
|
|
93
|
-
const r = (
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
93
|
+
const r = (i) => {
|
|
94
|
+
const u = c.filter((t) => t.isConnected), d = u.length;
|
|
95
|
+
if (d === 0)
|
|
96
96
|
return;
|
|
97
97
|
let s, v = 1;
|
|
98
|
-
const
|
|
99
|
-
let j =
|
|
100
|
-
switch (j === -1 && (j = 0),
|
|
98
|
+
const y = document.activeElement;
|
|
99
|
+
let j = y ? u.indexOf(y) : -1;
|
|
100
|
+
switch (j === -1 && (j = 0), i.key) {
|
|
101
101
|
case "ArrowUp":
|
|
102
102
|
v = -1;
|
|
103
103
|
// eslint-disable-next-line no-fallthrough
|
|
104
104
|
case "ArrowDown": {
|
|
105
|
-
s = (j + v +
|
|
105
|
+
s = (j + v + d) % d;
|
|
106
106
|
break;
|
|
107
107
|
}
|
|
108
108
|
case "Home": {
|
|
@@ -110,7 +110,7 @@ function Z({
|
|
|
110
110
|
break;
|
|
111
111
|
}
|
|
112
112
|
case "End": {
|
|
113
|
-
s =
|
|
113
|
+
s = d - 1, v = -1;
|
|
114
114
|
break;
|
|
115
115
|
}
|
|
116
116
|
case "Tab": {
|
|
@@ -119,13 +119,13 @@ function Z({
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
if (s !== void 0) {
|
|
122
|
-
|
|
123
|
-
let t =
|
|
122
|
+
i.preventDefault(), i.stopPropagation();
|
|
123
|
+
let t = u[s];
|
|
124
124
|
if (t) {
|
|
125
125
|
let k = 0;
|
|
126
126
|
const f = (x) => "disabled" in x && x.disabled || "inert" in x && x.inert;
|
|
127
|
-
for (; f(t) && k <
|
|
128
|
-
s = (s + v +
|
|
127
|
+
for (; f(t) && k < d; )
|
|
128
|
+
s = (s + v + d) % d, t = u[s], k += 1;
|
|
129
129
|
t && !f(t) && (t.focus(), a(!0));
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -137,50 +137,50 @@ function Z({
|
|
|
137
137
|
capture: !0
|
|
138
138
|
});
|
|
139
139
|
};
|
|
140
|
-
}, [o,
|
|
141
|
-
|
|
140
|
+
}, [o, c, a]), /* @__PURE__ */ n.jsx(n.Fragment, { children: e.map((r, i) => /* @__PURE__ */ n.jsx(
|
|
141
|
+
Z,
|
|
142
142
|
{
|
|
143
143
|
...r,
|
|
144
|
-
reference:
|
|
145
|
-
onMouseEnter:
|
|
144
|
+
reference: p,
|
|
145
|
+
onMouseEnter: w
|
|
146
146
|
},
|
|
147
|
-
|
|
147
|
+
i
|
|
148
148
|
)) });
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function $({
|
|
151
151
|
items: e,
|
|
152
152
|
...o
|
|
153
153
|
}) {
|
|
154
|
-
return /* @__PURE__ */ n.jsx(
|
|
154
|
+
return /* @__PURE__ */ n.jsx(T, { ...o, as: "nav", role: "menu", innerClassName: "kakadu-components-3600436535", children: /* @__PURE__ */ n.jsx(_, { items: e }) });
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
const o =
|
|
156
|
+
function ke(e) {
|
|
157
|
+
const o = b(() => ({
|
|
158
158
|
items: e
|
|
159
159
|
}), [e]), {
|
|
160
|
-
isVisible:
|
|
161
|
-
show:
|
|
160
|
+
isVisible: c,
|
|
161
|
+
show: m,
|
|
162
162
|
close: a,
|
|
163
|
-
popover:
|
|
164
|
-
} =
|
|
165
|
-
return
|
|
166
|
-
isVisible:
|
|
167
|
-
show:
|
|
163
|
+
popover: p
|
|
164
|
+
} = U($, o);
|
|
165
|
+
return b(() => ({
|
|
166
|
+
isVisible: c,
|
|
167
|
+
show: m,
|
|
168
168
|
close: a,
|
|
169
|
-
popoverMenu:
|
|
170
|
-
}), [
|
|
169
|
+
popoverMenu: p
|
|
170
|
+
}), [c, m, a, p]);
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function L({
|
|
173
173
|
menu: e,
|
|
174
174
|
className: o,
|
|
175
|
-
children:
|
|
175
|
+
children: c
|
|
176
176
|
}) {
|
|
177
|
-
return /* @__PURE__ */ n.jsxs(
|
|
178
|
-
|
|
177
|
+
return /* @__PURE__ */ n.jsxs(G, { className: o, children: [
|
|
178
|
+
c,
|
|
179
179
|
e
|
|
180
180
|
] });
|
|
181
181
|
}
|
|
182
182
|
export {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
ve as dangerPopoverMenuItemStyles,
|
|
184
|
+
L as default,
|
|
185
|
+
ke as usePopoverMenu
|
|
186
186
|
};
|
|
@@ -1 +1 @@
|
|
|
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"),c=require("../icons/icon.js"),_=require("./flex.js"),f=require("./text.js"),h=require("./click-ripples.js"),
|
|
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"),c=require("../icons/icon.js"),_=require("./flex.js"),f=require("./text.js"),h=require("./click-ripples.js"),d=require("./hover-gradient.js"),b=require("./button-tooltip.js"),N=require("./aria-text.js"),g=require("./atom.js"),w=require("./skeleton.js"),S=["primary","delete"],T="kakadu-components-356806024";function z({ref:l,iconLeft:n,iconRight:o,variant:m="primary",tooltip:x,tooltipPosition:p,href:i,target:j,rel:k,disabled:E,hasUnderline:v=!0,isSkeleton:u,isSkeletonAnimated:R=!0,className:y,children:t,label:B,...q}){const r=!!E||!!u,s=i!==void 0&&!u;return e.jsxRuntimeExports.jsxs("div",{className:a.cx("kakadu-components-989891841",t&&(n||o)?a.cx(!!n&&"kakadu-components-497190725",!!o&&"kakadu-components-3729381008"):"kakadu-components-3866032606"),children:[e.jsxRuntimeExports.jsxs(g.default,{...q,reference:l,as:s?"a":"button",type:s?void 0:"button",href:s?i:void 0,target:s?j:void 0,rel:s?k:void 0,disabled:s?void 0:r,inert:s?r:void 0,className:a.cx(f.textShadowStyles,"kakadu-components-4279134239",m==="delete"&&T,u&&"kakadu-components-2662775151",y),children:[e.jsxRuntimeExports.jsxs(_.default,{direction:"row",gap:.5,preset:"center",children:[n?e.jsxRuntimeExports.jsx("div",{className:a.cx("kakadu-components-743909038",t?"kakadu-components-1285017646":"kakadu-components-1475172827"),children:typeof n=="string"?e.jsxRuntimeExports.jsx(c.default,{width:14,height:14,type:n}):n}):null,t?e.jsxRuntimeExports.jsx("span",{className:a.cx("kakadu-components-743909038",v&&"kakadu-components-2703794515"),children:t}):e.jsxRuntimeExports.jsx(N.default,{children:B}),o?e.jsxRuntimeExports.jsx("div",{className:a.cx("kakadu-components-743909038",t?"kakadu-components-2421728947":"kakadu-components-1475172827"),children:typeof o=="string"?e.jsxRuntimeExports.jsx(c.default,{width:14,height:14,type:o}):o}):null]}),e.jsxRuntimeExports.jsxs("span",{className:"kakadu-components-1970948853",children:[r?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(h.default,{size:t?void 0:50}),e.jsxRuntimeExports.jsx(d.default,{size:t?void 0:50,className:d.normalBlendStyles})]}),x?e.jsxRuntimeExports.jsx(b.default,{label:x,position:p}):null]})]}),u?e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-1970948853",children:e.jsxRuntimeExports.jsx(w.SkeletonInstance,{width:"100%",height:"100%",isAnimated:R})}):null]})}exports.default=z;exports.textButtonVariants=S;
|
|
@@ -29,7 +29,7 @@ function Q({
|
|
|
29
29
|
label: y,
|
|
30
30
|
...h
|
|
31
31
|
}) {
|
|
32
|
-
const m = !!j || !!r, a = l && !r;
|
|
32
|
+
const m = !!j || !!r, a = l !== void 0 && !r;
|
|
33
33
|
return /* @__PURE__ */ o.jsxs("div", { className: n("kakadu-components-989891841", e && (t || s) ? n(!!t && "kakadu-components-497190725", !!s && "kakadu-components-3729381008") : "kakadu-components-3866032606"), children: [
|
|
34
34
|
/* @__PURE__ */ o.jsxs(C, { ...h, reference: i, as: a ? "a" : "button", type: a ? void 0 : "button", href: a ? l : void 0, target: a ? c : void 0, rel: a ? x : void 0, disabled: a ? void 0 : m, inert: a ? m : void 0, className: n(b, "kakadu-components-4279134239", u === "delete" && F, r && "kakadu-components-2662775151", f), children: [
|
|
35
35
|
/* @__PURE__ */ o.jsxs(N, { direction: "row", gap: 0.5, preset: "center", children: [
|