@kakadu/components 3.1.4 → 3.2.0
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.d.ts +4 -2
- package/build/components/button.js +1 -1
- package/build/components/button.mjs +59 -53
- package/build/components/icon-button.d.ts +2 -1
- package/build/components/icon-button.js +1 -1
- package/build/components/icon-button.mjs +41 -36
- package/build/components/modal.d.ts +1 -1
- package/build/components/modal.js +1 -1
- package/build/components/modal.mjs +67 -70
- package/build/components/popover-menu.d.ts +1 -1
- package/build/components/popover-menu.js +1 -1
- package/build/components/popover-menu.mjs +63 -62
- package/build/components/popover.d.ts +1 -1
- package/build/components/popover.js +1 -1
- package/build/components/popover.mjs +68 -72
- package/build/components/skeleton.js +1 -1
- package/build/components/skeleton.mjs +1 -1
- package/build/components/text-button.d.ts +2 -1
- package/build/components/text-button.js +1 -1
- package/build/components/text-button.mjs +39 -33
- package/build/components.css +1 -1
- package/build/hooks/use-fetch.d.ts +5 -2
- package/build/hooks/use-fetch.js +1 -1
- package/build/hooks/use-fetch.mjs +93 -77
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type ReactNode, type HTMLProps } from 'react';
|
|
2
2
|
import { type IconType } from '../icons/icon';
|
|
3
3
|
import { type ButtonTooltipPosition } from './button-tooltip';
|
|
4
|
-
export declare function ButtonLoader({ isLoading, size, }: {
|
|
4
|
+
export declare function ButtonLoader({ isLoading, size, className, }: {
|
|
5
5
|
readonly isLoading?: boolean;
|
|
6
6
|
readonly size?: number;
|
|
7
|
+
readonly className?: string;
|
|
7
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export declare enum ButtonVariant {
|
|
9
10
|
primary = "primary",
|
|
@@ -22,6 +23,7 @@ type BaseButtonProperties = Omit<HTMLProps<HTMLButtonElement>, 'children'> & {
|
|
|
22
23
|
readonly iconLeft?: IconType | ReactNode;
|
|
23
24
|
readonly iconRight?: IconType | ReactNode;
|
|
24
25
|
readonly isLoading?: boolean;
|
|
26
|
+
readonly isSkeleton?: boolean;
|
|
25
27
|
readonly hasMovingGradients?: boolean;
|
|
26
28
|
readonly movingGradientsCount?: number;
|
|
27
29
|
readonly hasMovingStars?: boolean;
|
|
@@ -34,5 +36,5 @@ export type ButtonProperties = BaseButtonProperties & ({
|
|
|
34
36
|
children?: never;
|
|
35
37
|
label: string;
|
|
36
38
|
});
|
|
37
|
-
export default function Button({ type, variant, href, target, rel, disabled, className, children, label, tooltip, tooltipPosition, iconLeft, iconRight, isLoading, hasMovingGradients, movingGradientsCount, hasMovingStars, movingStarsCount, ...properties }: ButtonProperties): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export default function Button({ type, variant, href, target, rel, disabled, className, children, label, tooltip, tooltipPosition, iconLeft, iconRight, isLoading, isSkeleton, hasMovingGradients, movingGradientsCount, hasMovingStars, movingStarsCount, ...properties }: ButtonProperties): import("react/jsx-runtime").JSX.Element;
|
|
38
40
|
export {};
|
|
@@ -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"),R=require("react"),u=require("@kuma-ui/core"),$=require("../theme.js"),A=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"),E=require("./hover-gradient.js"),J=require("./button-tooltip.js"),K=require("./aria-text.js"),Q=require("./atom.js"),U=require("./skeleton.js");function f({isLoading:s,size:n,className:o}){return e.jsxRuntimeExports.jsx("div",{className:u.cx("kakadu-components-2832510379",s&&"kakadu-components-4114685569",o),children:e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-920467642",children:e.jsxRuntimeExports.jsx(C.RevealSpinner,{isVisible:s,size:n})})})}var v=(s=>(s.primary="primary",s.secondary="secondary",s.warning="warning",s.danger="danger",s))(v||{});function b({icon:s,variant:n="primary",className:o,...c}){return e.jsxRuntimeExports.jsx("div",{...c,className:u.cx("kakadu-components-2658660333",n==="secondary"&&"kakadu-components-3469662110",o),children:typeof s=="string"?e.jsxRuntimeExports.jsx(A.default,{width:14,height:14,type:s}):s})}const S="kakadu-components-2244098950",X="kakadu-components-3923184173",g="kakadu-components-317965671",q="kakadu-components-1978976872";function Y({type:s,variant:n="primary",href:o,target:c,rel:h,disabled:_,className:N,children:t,label:w,tooltip:i,tooltipPosition:B,iconLeft:m,iconRight:d,isLoading:x,isSkeleton:r,hasMovingGradients:M=!1,movingGradientsCount:l=4,hasMovingStars:D=!1,movingStarsCount:p=10,...I}){const k=R.useId(),j=R.useRef(null),T=P.useIsDarkMode(j),G=s??"button",z=M&&l>0,W=D&&p>0,a=o&&!r,y=!!_||!!x||!!r;return e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-3559664923",children:[e.jsxRuntimeExports.jsxs(Q.default,{...I,as:a?"a":"button",type:a?void 0:G,href:a?o:void 0,target:a?c:void 0,rel:a?h:void 0,"aria-describedby":i?k:void 0,disabled:a?void 0:y,className:u.cx($.effectStyles,"kakadu-components-3709284365",!!m&&"kakadu-components-2735110382",!t&&"kakadu-components-3621693630",n==="secondary"&&S,n==="warning"&&g,n==="danger"&&q,r&&"kakadu-components-2662775151",N),children:[m?e.jsxRuntimeExports.jsx(b,{variant:n,icon:m,className:t?"kakadu-components-136489413":void 0}):null,t?e.jsxRuntimeExports.jsx("div",{ref:j,className:"kakadu-components-207477259",children:t}):e.jsxRuntimeExports.jsx(K.default,{children:w}),d?e.jsxRuntimeExports.jsx(b,{variant:n,icon:d,className:t?"kakadu-components-3631501803":void 0}):null,e.jsxRuntimeExports.jsx(f,{isLoading:x}),z&&e.jsxRuntimeExports.jsx(F.default,{opacity:T?.4:.3,maximumGradientsCount:l,className:u.cx("kakadu-components-2055737617",n==="secondary"&&"kakadu-components-2972748387")}),W&&e.jsxRuntimeExports.jsx(O.default,{maximumStarsCount:p,className:"kakadu-components-1226008615"}),y?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(H.default,{size:t?void 0:50}),e.jsxRuntimeExports.jsx(E.default,{size:t?void 0:50,className:n==="secondary"?E.normalBlendStyles:void 0})]}),i?e.jsxRuntimeExports.jsx(J.default,{id:k,label:i,position:B}):null]}),r?e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-3422055155",children:e.jsxRuntimeExports.jsx(U.SkeletonInstance,{width:"100%",height:"100%"})}):null]})}exports.ButtonLoader=f;exports.ButtonVariant=v;exports.buttonDangerStyles=q;exports.buttonSecondaryStyles=S;exports.buttonSuccessStyles=X;exports.buttonWarningStyles=g;exports.default=Y;
|
|
@@ -1,75 +1,81 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
2
|
import { useId as G, useRef as R } from "react";
|
|
3
|
-
import { cx as
|
|
3
|
+
import { cx as m } from "@kuma-ui/core";
|
|
4
4
|
import { effectStyles as T } from "../theme.mjs";
|
|
5
5
|
import z from "../icons/icon.mjs";
|
|
6
|
-
import { RevealSpinner as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useIsDarkMode as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
|
|
6
|
+
import { RevealSpinner as C } from "./spinner.mjs";
|
|
7
|
+
import E from "./moving-gradients.mjs";
|
|
8
|
+
import F from "./moving-stars.mjs";
|
|
9
|
+
import { useIsDarkMode as H } from "./theme-setter.mjs";
|
|
10
|
+
import W from "./click-ripples.mjs";
|
|
11
|
+
import q, { normalBlendStyles as J } from "./hover-gradient.mjs";
|
|
12
|
+
import K from "./button-tooltip.mjs";
|
|
13
|
+
import O from "./aria-text.mjs";
|
|
14
|
+
import P from "./atom.mjs";
|
|
15
|
+
import { SkeletonInstance as Q } from "./skeleton.mjs";
|
|
16
|
+
function U({
|
|
16
17
|
isLoading: s,
|
|
17
|
-
size: n
|
|
18
|
+
size: n,
|
|
19
|
+
className: a
|
|
18
20
|
}) {
|
|
19
|
-
return /* @__PURE__ */ o.jsx("div", { className:
|
|
21
|
+
return /* @__PURE__ */ o.jsx("div", { className: m("kakadu-components-2832510379", s && "kakadu-components-4114685569", a), children: /* @__PURE__ */ o.jsx("div", { className: "kakadu-components-920467642", children: /* @__PURE__ */ o.jsx(C, { isVisible: s, size: n }) }) });
|
|
20
22
|
}
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
+
var X = /* @__PURE__ */ ((s) => (s.primary = "primary", s.secondary = "secondary", s.warning = "warning", s.danger = "danger", s))(X || {});
|
|
24
|
+
function j({
|
|
23
25
|
icon: s,
|
|
24
26
|
variant: n = "primary",
|
|
25
27
|
className: a,
|
|
26
|
-
...
|
|
28
|
+
...c
|
|
27
29
|
}) {
|
|
28
|
-
return /* @__PURE__ */ o.jsx("div", { ...
|
|
30
|
+
return /* @__PURE__ */ o.jsx("div", { ...c, className: m("kakadu-components-2658660333", n === "secondary" && "kakadu-components-3469662110", a), children: typeof s == "string" ? /* @__PURE__ */ o.jsx(z, { width: 14, height: 14, type: s }) : s });
|
|
29
31
|
}
|
|
30
|
-
const
|
|
31
|
-
function
|
|
32
|
+
const Y = "kakadu-components-2244098950", lo = "kakadu-components-3923184173", Z = "kakadu-components-317965671", _ = "kakadu-components-1978976872";
|
|
33
|
+
function ko({
|
|
32
34
|
type: s,
|
|
33
35
|
variant: n = "primary",
|
|
34
36
|
href: a,
|
|
35
|
-
target:
|
|
36
|
-
rel:
|
|
37
|
-
disabled:
|
|
38
|
-
className:
|
|
37
|
+
target: c,
|
|
38
|
+
rel: v,
|
|
39
|
+
disabled: b,
|
|
40
|
+
className: g,
|
|
39
41
|
children: e,
|
|
40
|
-
label:
|
|
41
|
-
tooltip:
|
|
42
|
-
tooltipPosition:
|
|
43
|
-
iconLeft:
|
|
44
|
-
iconRight:
|
|
45
|
-
isLoading:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
label: N,
|
|
43
|
+
tooltip: d,
|
|
44
|
+
tooltipPosition: h,
|
|
45
|
+
iconLeft: i,
|
|
46
|
+
iconRight: p,
|
|
47
|
+
isLoading: u,
|
|
48
|
+
isSkeleton: r,
|
|
49
|
+
hasMovingGradients: S = !1,
|
|
50
|
+
movingGradientsCount: l = 4,
|
|
51
|
+
hasMovingStars: w = !1,
|
|
52
|
+
movingStarsCount: k = 10,
|
|
53
|
+
...B
|
|
51
54
|
}) {
|
|
52
|
-
const
|
|
53
|
-
return /* @__PURE__ */ o.jsxs(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
/* @__PURE__ */ o.
|
|
62
|
-
|
|
55
|
+
const x = G(), f = R(null), I = H(f), M = s ?? "button", D = S && l > 0, A = w && k > 0, t = a && !r, y = !!b || !!u || !!r;
|
|
56
|
+
return /* @__PURE__ */ o.jsxs("div", { className: "kakadu-components-3559664923", children: [
|
|
57
|
+
/* @__PURE__ */ o.jsxs(P, { ...B, as: t ? "a" : "button", type: t ? void 0 : M, href: t ? a : void 0, target: t ? c : void 0, rel: t ? v : void 0, "aria-describedby": d ? x : void 0, disabled: t ? void 0 : y, className: m(T, "kakadu-components-3709284365", !!i && "kakadu-components-2735110382", !e && "kakadu-components-3621693630", n === "secondary" && Y, n === "warning" && Z, n === "danger" && _, r && "kakadu-components-2662775151", g), children: [
|
|
58
|
+
i ? /* @__PURE__ */ o.jsx(j, { variant: n, icon: i, className: e ? "kakadu-components-136489413" : void 0 }) : null,
|
|
59
|
+
e ? /* @__PURE__ */ o.jsx("div", { ref: f, className: "kakadu-components-207477259", children: e }) : /* @__PURE__ */ o.jsx(O, { children: N }),
|
|
60
|
+
p ? /* @__PURE__ */ o.jsx(j, { variant: n, icon: p, className: e ? "kakadu-components-3631501803" : void 0 }) : null,
|
|
61
|
+
/* @__PURE__ */ o.jsx(U, { isLoading: u }),
|
|
62
|
+
D && /* @__PURE__ */ o.jsx(E, { opacity: I ? 0.4 : 0.3, maximumGradientsCount: l, className: m("kakadu-components-2055737617", n === "secondary" && "kakadu-components-2972748387") }),
|
|
63
|
+
A && /* @__PURE__ */ o.jsx(F, { maximumStarsCount: k, className: "kakadu-components-1226008615" }),
|
|
64
|
+
y ? null : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
65
|
+
/* @__PURE__ */ o.jsx(W, { size: e ? void 0 : 50 }),
|
|
66
|
+
/* @__PURE__ */ o.jsx(q, { size: e ? void 0 : 50, className: n === "secondary" ? J : void 0 })
|
|
67
|
+
] }),
|
|
68
|
+
d ? /* @__PURE__ */ o.jsx(K, { id: x, label: d, position: h }) : null
|
|
63
69
|
] }),
|
|
64
|
-
|
|
70
|
+
r ? /* @__PURE__ */ o.jsx("div", { className: "kakadu-components-3422055155", children: /* @__PURE__ */ o.jsx(Q, { width: "100%", height: "100%" }) }) : null
|
|
65
71
|
] });
|
|
66
72
|
}
|
|
67
73
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
U as ButtonLoader,
|
|
75
|
+
X as ButtonVariant,
|
|
76
|
+
_ as buttonDangerStyles,
|
|
77
|
+
Y as buttonSecondaryStyles,
|
|
78
|
+
lo as buttonSuccessStyles,
|
|
79
|
+
Z as buttonWarningStyles,
|
|
80
|
+
ko as default
|
|
75
81
|
};
|
|
@@ -13,5 +13,6 @@ export type IconButtonProperties = HTMLProps<HTMLButtonElement> & {
|
|
|
13
13
|
readonly label: string;
|
|
14
14
|
readonly tooltipPosition?: ButtonTooltipPosition;
|
|
15
15
|
readonly isLoading?: boolean;
|
|
16
|
+
readonly isSkeleton?: boolean;
|
|
16
17
|
};
|
|
17
|
-
export default function IconButton({ icon, variant, label, tooltipPosition, disabled, isLoading, className, ...properties }: IconButtonProperties): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default function IconButton({ icon, variant, label, tooltipPosition, disabled, isLoading, isSkeleton, className, ...properties }: IconButtonProperties): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../jsx-runtime-BB_1_6y_.js"),s=require("react"),n=require("@kuma-ui/core"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../jsx-runtime-BB_1_6y_.js"),s=require("react"),n=require("@kuma-ui/core"),i=require("../icons/icon.js"),R=require("../theme.js"),N=require("./theme-setter.js"),u=require("./button.js"),I=require("./button-tooltip.js"),T=require("./click-ripples.js"),S=require("./hover-gradient.js"),B=require("./skeleton.js");var b=(e=>(e.default="default",e.success="success",e.warning="warning",e.danger="danger",e))(b||{});function D({icon:e,variant:o="default",label:m,tooltipPosition:g,disabled:y,isLoading:x,isSkeleton:l,className:E,...q}){const p=s.useId(),w=N.useIsDarkMode(),[r,_]=s.useState(e),[k,d]=s.useState(!1),f=s.useRef(e),c=s.useRef(null);s.useEffect(()=>{f.current=e},[e]);const a=s.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null)},[]);s.useEffect(()=>{if(r===e){d(h=>h&&!1);return}d(!0),a(),c.current=setTimeout(()=>{d(!1),_(f.current)},370)},[r,e,a]),s.useEffect(()=>()=>{a()},[a]);const j=!!y||!!x||!!l;return t.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-4096632152",children:[t.jsxRuntimeExports.jsxs("button",{...q,type:"button","aria-label":m,"aria-describedby":p,disabled:j,className:n.cx(R.buttonResetStyles,R.effectStyles,"kakadu-components-1951951921",o==="default"&&n.cx(u.buttonSecondaryStyles,"kakadu-components-1561784812"),o==="success"&&n.cx(u.buttonSuccessStyles,"kakadu-components-1398421429"),o==="warning"&&n.cx(u.buttonWarningStyles,"kakadu-components-1872098090"),o==="danger"&&n.cx(u.buttonDangerStyles,"kakadu-components-2064536093"),l&&"kakadu-components-2662775151",E),children:[t.jsxRuntimeExports.jsxs("span",{"data-theme":o==="default"?w?"dark":"light":"dark",className:"kakadu-components-3040141419",children:[t.jsxRuntimeExports.jsx(i.default,{width:16,height:16,type:r,className:n.cx(i.iconShadowStyles,"kakadu-components-1562914001",k&&"kakadu-components-2360250719")}),r===e?null:t.jsxRuntimeExports.jsx(i.default,{width:16,height:16,type:e,className:n.cx(i.iconShadowStyles,"kakadu-components-1224061930",k&&"kakadu-components-2519520784")})]}),t.jsxRuntimeExports.jsx(u.ButtonLoader,{isLoading:x,size:14}),t.jsxRuntimeExports.jsx(I.default,{id:p,label:m,position:g}),j?null:t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(T.default,{size:50}),t.jsxRuntimeExports.jsx(S.default,{size:50,className:o==="default"?S.normalBlendStyles:void 0})]})]}),l?t.jsxRuntimeExports.jsx("div",{className:"kakadu-components-3422055155",children:t.jsxRuntimeExports.jsx(B.SkeletonInstance,{width:"100%",height:"100%"})}):null]})}exports.IconButtonVariant=b;exports.default=D;
|
|
@@ -1,57 +1,62 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { cx as
|
|
4
|
-
import
|
|
1
|
+
import { j as s } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
+
import { useId as B, useState as x, useRef as g, useEffect as l, useCallback as D } from "react";
|
|
3
|
+
import { cx as t } from "@kuma-ui/core";
|
|
4
|
+
import j, { iconShadowStyles as y } from "../icons/icon.mjs";
|
|
5
5
|
import { buttonResetStyles as T, effectStyles as z } from "../theme.mjs";
|
|
6
|
-
import { useIsDarkMode as
|
|
7
|
-
import { ButtonLoader as
|
|
6
|
+
import { useIsDarkMode as C } from "./theme-setter.mjs";
|
|
7
|
+
import { ButtonLoader as E, buttonSecondaryStyles as M, buttonSuccessStyles as v, buttonWarningStyles as F, buttonDangerStyles as G } from "./button.mjs";
|
|
8
8
|
import H from "./button-tooltip.mjs";
|
|
9
9
|
import P from "./click-ripples.mjs";
|
|
10
10
|
import W, { normalBlendStyles as q } from "./hover-gradient.mjs";
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
import { SkeletonInstance as A } from "./skeleton.mjs";
|
|
12
|
+
var J = /* @__PURE__ */ ((e) => (e.default = "default", e.success = "success", e.warning = "warning", e.danger = "danger", e))(J || {});
|
|
13
|
+
function ee({
|
|
13
14
|
icon: e,
|
|
14
15
|
variant: o = "default",
|
|
15
|
-
label:
|
|
16
|
-
tooltipPosition:
|
|
16
|
+
label: d,
|
|
17
|
+
tooltipPosition: S,
|
|
17
18
|
disabled: b,
|
|
18
19
|
isLoading: m,
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
isSkeleton: u,
|
|
21
|
+
className: w,
|
|
22
|
+
...N
|
|
21
23
|
}) {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
+
const i = B(), R = C(), [n, I] = x(e), [p, c] = x(!1), f = g(e), a = g(null);
|
|
25
|
+
l(() => {
|
|
24
26
|
f.current = e;
|
|
25
27
|
}, [e]);
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
+
const r = D(() => {
|
|
29
|
+
a.current && (clearTimeout(a.current), a.current = null);
|
|
28
30
|
}, []);
|
|
29
|
-
|
|
31
|
+
l(() => {
|
|
30
32
|
if (n === e) {
|
|
31
|
-
|
|
33
|
+
c((h) => h && !1);
|
|
32
34
|
return;
|
|
33
35
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
c(!0), r(), a.current = setTimeout(() => {
|
|
37
|
+
c(!1), I(f.current);
|
|
36
38
|
}, 370);
|
|
37
|
-
}, [n, e,
|
|
38
|
-
|
|
39
|
-
}, [
|
|
40
|
-
const
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
39
|
+
}, [n, e, r]), l(() => () => {
|
|
40
|
+
r();
|
|
41
|
+
}, [r]);
|
|
42
|
+
const k = !!b || !!m || !!u;
|
|
43
|
+
return /* @__PURE__ */ s.jsxs("div", { className: "kakadu-components-4096632152", children: [
|
|
44
|
+
/* @__PURE__ */ s.jsxs("button", { ...N, type: "button", "aria-label": d, "aria-describedby": i, disabled: k, className: t(T, z, "kakadu-components-1951951921", o === "default" && t(M, "kakadu-components-1561784812"), o === "success" && t(v, "kakadu-components-1398421429"), o === "warning" && t(F, "kakadu-components-1872098090"), o === "danger" && t(G, "kakadu-components-2064536093"), u && "kakadu-components-2662775151", w), children: [
|
|
45
|
+
/* @__PURE__ */ s.jsxs("span", { "data-theme": o === "default" ? R ? "dark" : "light" : "dark", className: "kakadu-components-3040141419", children: [
|
|
46
|
+
/* @__PURE__ */ s.jsx(j, { width: 16, height: 16, type: n, className: t(y, "kakadu-components-1562914001", p && "kakadu-components-2360250719") }),
|
|
47
|
+
n === e ? null : /* @__PURE__ */ s.jsx(j, { width: 16, height: 16, type: e, className: t(y, "kakadu-components-1224061930", p && "kakadu-components-2519520784") })
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ s.jsx(E, { isLoading: m, size: 14 }),
|
|
50
|
+
/* @__PURE__ */ s.jsx(H, { id: i, label: d, position: S }),
|
|
51
|
+
k ? null : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
52
|
+
/* @__PURE__ */ s.jsx(P, { size: 50 }),
|
|
53
|
+
/* @__PURE__ */ s.jsx(W, { size: 50, className: o === "default" ? q : void 0 })
|
|
54
|
+
] })
|
|
45
55
|
] }),
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */ t.jsx(H, { id: d, label: l, position: x }),
|
|
48
|
-
p ? null : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
49
|
-
/* @__PURE__ */ t.jsx(P, { size: 50 }),
|
|
50
|
-
/* @__PURE__ */ t.jsx(W, { size: 50, className: o === "default" ? q : void 0 })
|
|
51
|
-
] })
|
|
56
|
+
u ? /* @__PURE__ */ s.jsx("div", { className: "kakadu-components-3422055155", children: /* @__PURE__ */ s.jsx(A, { width: "100%", height: "100%" }) }) : null
|
|
52
57
|
] });
|
|
53
58
|
}
|
|
54
59
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
J as IconButtonVariant,
|
|
61
|
+
ee as default
|
|
57
62
|
};
|
|
@@ -26,7 +26,7 @@ type ModalBaseProperties<ModalResult> = Omit<ModalProperties<ModalResult>, 'isVi
|
|
|
26
26
|
export default function Modal<Data = any>({ root, outerDecorators, innerDecorators, label, maxWidth, className, isVisible, isFullWidth, shouldCloseOnOutsideClick, shouldCloseOnEscapePress, showCloseButton, onClose, children, }: ModalProperties<Data>): import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
export declare function useModal<ModalResult, ModalProperties = ModalBaseProperties<ModalResult>>(ModalComponent: ComponentType<ModalProperties>, properties?: ModalProperties): {
|
|
28
28
|
isVisible: boolean;
|
|
29
|
-
show: (
|
|
29
|
+
show: () => Promise<ModalResult | undefined>;
|
|
30
30
|
modal: import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
};
|
|
32
32
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../jsx-runtime-BB_1_6y_.js"),e=require("react"),E=require("@kuma-ui/core"),P=require("react-dom"),$=require("../focus-trap-react-CcpTuiJi.js"),B=require("../icons/icon.js"),A=require("./text-button.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../jsx-runtime-BB_1_6y_.js"),e=require("react"),E=require("@kuma-ui/core"),P=require("react-dom"),$=require("../focus-trap-react-CcpTuiJi.js"),B=require("../icons/icon.js"),A=require("./text-button.js"),C=require("./decorators.js"),I=e.createContext({isVisible:!1}),{Provider:D}=I;function y(){return e.useContext(I)}function z(){const{close:o}=y(),a=e.useCallback(()=>{o==null||o()},[o]);return s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2543813221"}),s.jsxRuntimeExports.jsx("div",{className:"kakadu-components-840864829",children:s.jsxRuntimeExports.jsx(A.default,{iconLeft:B.IconType.times,label:"Close",className:"kakadu-components-3855719072",onClick:a})})]})}function G({root:o,outerDecorators:a=[],innerDecorators:c=[],label:m,maxWidth:r,className:f,isVisible:n,isFullWidth:l=!1,shouldCloseOnOutsideClick:u=!0,shouldCloseOnEscapePress:d=!0,showCloseButton:N=!0,onClose:p,children:g}){const R=e.useRef(null),v=e.useRef(null),[M,L]=e.useState(!1),[i,x]=e.useState(!1),h=e.useCallback(t=>{R.current=t,x(!1)},[]),j=e.useRef(null),b=e.useCallback(t=>{t&&(j.current=t)},[]),[w,T]=e.useState(n??!1),S=e.useMemo(()=>({isVisible:w,setInitialFocus:b,close:h}),[w,b,h]);e.useEffect(()=>{n&&(L(!0),T(!0))},[n]),e.useEffect(()=>{if(n){const t=setTimeout(()=>{x(!0)},100);return()=>{clearTimeout(t)}}x(!1)},[n]),e.useEffect(()=>{if(M&&!i){const t=setTimeout(()=>{p==null||p(R.current??void 0),T(!1)},370);return()=>{clearTimeout(t)}}},[M,i,p]),e.useEffect(()=>{const t=v.current;if(n&&u&&t){const k=_=>{t===_.target&&x(!1)};return t.addEventListener("click",k),()=>{t.removeEventListener("click",k)}}},[n,u]),e.useEffect(()=>{if(!n||!d)return;const t=k=>{k.key==="Escape"&&x(!1)};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}},[n,d]);const F=e.useMemo(()=>({initialFocus:()=>j.current??void 0,onActivate:()=>{var t;return(t=j.current)==null?void 0:t.focus()}}),[]),q=s.jsxRuntimeExports.jsx(C.default,{decorators:a,children:s.jsxRuntimeExports.jsx("div",{"aria-hidden":!i,style:{"--max-width":r?`${r}px`:void 0},className:E.cx("kakadu-components-4119461136",i&&"kakadu-components-2522346797",f),children:s.jsxRuntimeExports.jsx(C.default,{decorators:c,children:s.jsxRuntimeExports.jsx($.focusTrapReactExports.FocusTrap,{active:i,focusTrapOptions:F,children:s.jsxRuntimeExports.jsx("div",{ref:v,className:"kakadu-components-4011815997",children:s.jsxRuntimeExports.jsx("div",{role:"dialog","aria-modal":"true","aria-label":m??"Modal",className:E.cx("kakadu-components-3324483532",l&&"kakadu-components-3799971070",i&&"kakadu-components-968755580"),children:s.jsxRuntimeExports.jsxs(D,{value:S,children:[N?s.jsxRuntimeExports.jsx(z,{}):null,s.jsxRuntimeExports.jsx("div",{className:E.cx("kakadu-components-633990035",l&&"kakadu-components-171969824"),children:g})]})})})})})})});return o?P.createPortal(q,o):q}function H(o,a){const[c,m]=e.useState(!1),r=e.useRef(void 0),f=e.useCallback(async()=>(m(!0),new Promise(u=>{r.current=u})),[]),n=e.useCallback(u=>{var d;m(!1),(d=r.current)==null||d.call(r,u),r.current=void 0},[]),l=e.useMemo(()=>s.jsxRuntimeExports.jsx(o,{...a,isVisible:c,onClose:n}),[o,a,c,n]);return e.useMemo(()=>({isVisible:c,show:f,modal:l}),[c,f,l])}exports.default=G;exports.useModal=H;exports.useModalContext=y;
|
|
@@ -1,127 +1,124 @@
|
|
|
1
1
|
import { j as t } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { createContext as q, useRef as
|
|
2
|
+
import { createContext as q, useRef as j, useState as h, useCallback as f, useMemo as w, useEffect as m, useContext as z } from "react";
|
|
3
3
|
import { cx as I } from "@kuma-ui/core";
|
|
4
4
|
import { createPortal as G } from "react-dom";
|
|
5
5
|
import { f as H } from "../focus-trap-react-DYXrtbDH.mjs";
|
|
6
6
|
import { IconType as J } from "../icons/icon.mjs";
|
|
7
7
|
import K from "./text-button.mjs";
|
|
8
|
-
import
|
|
9
|
-
const
|
|
8
|
+
import g from "./decorators.mjs";
|
|
9
|
+
const C = q({
|
|
10
10
|
isVisible: !1
|
|
11
11
|
}), {
|
|
12
12
|
Provider: Q
|
|
13
|
-
} =
|
|
13
|
+
} = C;
|
|
14
14
|
function U() {
|
|
15
|
-
return z(
|
|
15
|
+
return z(C);
|
|
16
16
|
}
|
|
17
17
|
function V() {
|
|
18
18
|
const {
|
|
19
|
-
close:
|
|
20
|
-
} = U(), a =
|
|
21
|
-
|
|
22
|
-
}, [
|
|
19
|
+
close: s
|
|
20
|
+
} = U(), a = f(() => {
|
|
21
|
+
s == null || s();
|
|
22
|
+
}, [s]);
|
|
23
23
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
24
24
|
/* @__PURE__ */ t.jsx("div", { className: "kakadu-components-2543813221" }),
|
|
25
25
|
/* @__PURE__ */ t.jsx("div", { className: "kakadu-components-840864829", children: /* @__PURE__ */ t.jsx(K, { iconLeft: J.times, label: "Close", className: "kakadu-components-3855719072", onClick: a }) })
|
|
26
26
|
] });
|
|
27
27
|
}
|
|
28
28
|
function ne({
|
|
29
|
-
root:
|
|
29
|
+
root: s,
|
|
30
30
|
outerDecorators: a = [],
|
|
31
|
-
innerDecorators:
|
|
32
|
-
label:
|
|
33
|
-
maxWidth:
|
|
34
|
-
className:
|
|
31
|
+
innerDecorators: r = [],
|
|
32
|
+
label: k,
|
|
33
|
+
maxWidth: o,
|
|
34
|
+
className: x,
|
|
35
35
|
isVisible: n,
|
|
36
|
-
isFullWidth:
|
|
37
|
-
shouldCloseOnOutsideClick:
|
|
38
|
-
shouldCloseOnEscapePress:
|
|
39
|
-
showCloseButton:
|
|
40
|
-
onClose:
|
|
36
|
+
isFullWidth: u = !1,
|
|
37
|
+
shouldCloseOnOutsideClick: c = !0,
|
|
38
|
+
shouldCloseOnEscapePress: l = !0,
|
|
39
|
+
showCloseButton: B = !0,
|
|
40
|
+
onClose: p,
|
|
41
41
|
children: P
|
|
42
42
|
}) {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
}, []),
|
|
46
|
-
e && (
|
|
47
|
-
}, []), [
|
|
48
|
-
isVisible:
|
|
43
|
+
const E = j(null), N = j(null), [y, A] = h(!1), [i, d] = h(!1), L = f((e) => {
|
|
44
|
+
E.current = e, d(!1);
|
|
45
|
+
}, []), T = j(null), M = f((e) => {
|
|
46
|
+
e && (T.current = e);
|
|
47
|
+
}, []), [R, F] = h(n ?? !1), D = w(() => ({
|
|
48
|
+
isVisible: R,
|
|
49
49
|
setInitialFocus: M,
|
|
50
50
|
close: L
|
|
51
|
-
}), [
|
|
52
|
-
|
|
53
|
-
n && (A(!0),
|
|
54
|
-
}, [n]),
|
|
51
|
+
}), [R, M, L]);
|
|
52
|
+
m(() => {
|
|
53
|
+
n && (A(!0), F(!0));
|
|
54
|
+
}, [n]), m(() => {
|
|
55
55
|
if (n) {
|
|
56
56
|
const e = setTimeout(() => {
|
|
57
|
-
|
|
57
|
+
d(!0);
|
|
58
58
|
}, 100);
|
|
59
59
|
return () => {
|
|
60
60
|
clearTimeout(e);
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
}, [n]),
|
|
65
|
-
if (y && !
|
|
63
|
+
d(!1);
|
|
64
|
+
}, [n]), m(() => {
|
|
65
|
+
if (y && !i) {
|
|
66
66
|
const e = setTimeout(() => {
|
|
67
|
-
|
|
67
|
+
p == null || p(E.current ?? void 0), F(!1);
|
|
68
68
|
}, 370);
|
|
69
69
|
return () => {
|
|
70
70
|
clearTimeout(e);
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
}, [y,
|
|
74
|
-
const e =
|
|
75
|
-
if (n &&
|
|
76
|
-
const
|
|
77
|
-
e === $.target &&
|
|
73
|
+
}, [y, i, p]), m(() => {
|
|
74
|
+
const e = N.current;
|
|
75
|
+
if (n && c && e) {
|
|
76
|
+
const v = ($) => {
|
|
77
|
+
e === $.target && d(!1);
|
|
78
78
|
};
|
|
79
|
-
return e.addEventListener("click",
|
|
80
|
-
e.removeEventListener("click",
|
|
79
|
+
return e.addEventListener("click", v), () => {
|
|
80
|
+
e.removeEventListener("click", v);
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
}, [n,
|
|
84
|
-
if (!n || !
|
|
83
|
+
}, [n, c]), m(() => {
|
|
84
|
+
if (!n || !l)
|
|
85
85
|
return;
|
|
86
|
-
const e = (
|
|
87
|
-
|
|
86
|
+
const e = (v) => {
|
|
87
|
+
v.key === "Escape" && d(!1);
|
|
88
88
|
};
|
|
89
89
|
return window.addEventListener("keydown", e), () => {
|
|
90
90
|
window.removeEventListener("keydown", e);
|
|
91
91
|
};
|
|
92
|
-
}, [n,
|
|
93
|
-
const S =
|
|
94
|
-
initialFocus: () =>
|
|
92
|
+
}, [n, l]);
|
|
93
|
+
const S = w(() => ({
|
|
94
|
+
initialFocus: () => T.current ?? void 0,
|
|
95
95
|
onActivate: () => {
|
|
96
96
|
var e;
|
|
97
|
-
return (e =
|
|
97
|
+
return (e = T.current) == null ? void 0 : e.focus();
|
|
98
98
|
}
|
|
99
|
-
}), []),
|
|
100
|
-
"--max-width":
|
|
101
|
-
}, className: I("kakadu-components-4119461136",
|
|
102
|
-
|
|
103
|
-
/* @__PURE__ */ t.jsx("div", { className: I("kakadu-components-633990035",
|
|
99
|
+
}), []), b = /* @__PURE__ */ t.jsx(g, { decorators: a, children: /* @__PURE__ */ t.jsx("div", { "aria-hidden": !i, style: {
|
|
100
|
+
"--max-width": o ? `${o}px` : void 0
|
|
101
|
+
}, className: I("kakadu-components-4119461136", i && "kakadu-components-2522346797", x), children: /* @__PURE__ */ t.jsx(g, { decorators: r, children: /* @__PURE__ */ t.jsx(H.FocusTrap, { active: i, focusTrapOptions: S, children: /* @__PURE__ */ t.jsx("div", { ref: N, className: "kakadu-components-4011815997", children: /* @__PURE__ */ t.jsx("div", { role: "dialog", "aria-modal": "true", "aria-label": k ?? "Modal", className: I("kakadu-components-3324483532", u && "kakadu-components-3799971070", i && "kakadu-components-968755580"), children: /* @__PURE__ */ t.jsxs(Q, { value: D, children: [
|
|
102
|
+
B ? /* @__PURE__ */ t.jsx(V, {}) : null,
|
|
103
|
+
/* @__PURE__ */ t.jsx("div", { className: I("kakadu-components-633990035", u && "kakadu-components-171969824"), children: P })
|
|
104
104
|
] }) }) }) }) }) }) });
|
|
105
|
-
return
|
|
105
|
+
return s ? G(b, s) : b;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
const [
|
|
109
|
-
|
|
110
|
-
})), []),
|
|
107
|
+
function se(s, a) {
|
|
108
|
+
const [r, k] = h(!1), o = j(void 0), x = f(async () => (k(!0), new Promise((c) => {
|
|
109
|
+
o.current = c;
|
|
110
|
+
})), []), n = f((c) => {
|
|
111
111
|
var l;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
show: n,
|
|
120
|
-
modal: f
|
|
121
|
-
}), [c, n, f]);
|
|
112
|
+
k(!1), (l = o.current) == null || l.call(o, c), o.current = void 0;
|
|
113
|
+
}, []), u = w(() => /* @__PURE__ */ t.jsx(s, { ...a, isVisible: r, onClose: n }), [s, a, r, n]);
|
|
114
|
+
return w(() => ({
|
|
115
|
+
isVisible: r,
|
|
116
|
+
show: x,
|
|
117
|
+
modal: u
|
|
118
|
+
}), [r, x, u]);
|
|
122
119
|
}
|
|
123
120
|
export {
|
|
124
121
|
ne as default,
|
|
125
|
-
|
|
122
|
+
se as useModal,
|
|
126
123
|
U as useModalContext
|
|
127
124
|
};
|
|
@@ -21,7 +21,7 @@ export type PopoverMenuItemProperties = {
|
|
|
21
21
|
readonly onMouseEnter?: (event: MouseEvent<PopoverMenuItemElementType>) => void;
|
|
22
22
|
};
|
|
23
23
|
export declare function usePopoverMenu(items: PopoverMenuItemProperties[]): {
|
|
24
|
-
show: (
|
|
24
|
+
show: () => Promise<void | undefined>;
|
|
25
25
|
popoverMenu: import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
};
|
|
27
27
|
export type PopoverMenuProperties = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../jsx-runtime-BB_1_6y_.js"),M=require("@kuma-ui/core"),a=require("react"),b=require("../theme.js"),k=require("../icons/icon.js"),j=require("./popover.js"),q=require("./atom.js"),g=require("./text.js"),R=require("./hover-gradient.js"),P=require("./click-ripples.js"),I=require("./separator.js"),N=require("./decorators.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../jsx-runtime-BB_1_6y_.js"),M=require("@kuma-ui/core"),a=require("react"),b=require("../theme.js"),k=require("../icons/icon.js"),j=require("./popover.js"),q=require("./atom.js"),g=require("./text.js"),R=require("./hover-gradient.js"),P=require("./click-ripples.js"),I=require("./separator.js"),N=require("./decorators.js"),E=new Set;function h(){const[e,n]=a.useState(!1),r=a.useCallback(s=>{n(s);for(const i of E)i(s)},[]);return a.useEffect(()=>{const s=i=>{n(i)};return E.add(s),()=>{E.delete(s)}},[]),a.useMemo(()=>({isKeyboardNavigating:e,setIsKeyboardNavigating:r}),[e,r])}function S({label:e,iconLeft:n,iconRight:r,href:s,shouldCloseOnClick:i=!0,decorators:v=[],submenu:x,className:u,onClick:o,...m}){const{isFocused:l,close:c}=j.usePopoverContext(),{isKeyboardNavigating:f}=h(),d=a.useCallback(w=>{l&&(o==null||o(w),x?x.show():i&&(c==null||c()))},[l,o,i,c,x]),p=a.useMemo(()=>t.jsxRuntimeExports.jsxs(q.default,{as:s?"a":"button",...m,type:s?void 0:"button",role:"menuitem",href:s,className:M.cx(b.buttonResetStyles,"kakadu-components-3114599304",f?"kakadu-components-4096376656":"kakadu-components-2554182777",u),onClick:d,children:[t.jsxRuntimeExports.jsxs(g.Span,{className:"kakadu-components-1109353535",children:[n?t.jsxRuntimeExports.jsx(k.default,{width:12,height:12,type:n}):null,t.jsxRuntimeExports.jsx("span",{className:"kakadu-components-913703148",children:e}),r?t.jsxRuntimeExports.jsx(k.default,{width:12,height:12,type:r}):null]}),f?null:t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(R.default,{size:150,className:R.normalBlendStyles}),t.jsxRuntimeExports.jsx(P.default,{size:100})]})]}),[f,m,s,u,d,n,e,r]);return t.jsxRuntimeExports.jsx(N.default,{decorators:v,children:x?t.jsxRuntimeExports.jsx(y,{menu:x.popoverMenu,className:"kakadu-components-1861176543",children:p}):p})}function _(e){if("type"in e){if(e.type==="separator")return t.jsxRuntimeExports.jsx(I.default,{});if(e.type==="group")return t.jsxRuntimeExports.jsx(g.Span,{className:"kakadu-components-1499037363",children:e.label})}return t.jsxRuntimeExports.jsx(S,{...e})}function K({items:e}){const{isFocused:n}=j.usePopoverContext(),[r,s]=a.useState([]),{setIsKeyboardNavigating:i}=h(),v=a.useCallback(u=>{u&&s(o=>o.includes(u)?o:[...o,u])},[]),x=a.useCallback(u=>{n&&(u.currentTarget.focus(),i(!1))},[n,i]);return a.useEffect(()=>{if(!n)return;const u=o=>{const m=r.filter(p=>p.isConnected),l=m.length;if(l===0)return;let c;const f=document.activeElement;let d=f?m.indexOf(f):-1;switch(d===-1&&(d=0),o.key){case"ArrowDown":{c=(d+1)%l;break}case"ArrowUp":{c=(d-1+l)%l;break}case"Home":{c=0;break}case"End":{c=l-1;break}}if(c!==void 0){o.preventDefault(),o.stopPropagation();const p=m[c];p&&(p.focus(),i(!0))}};return window.addEventListener("keydown",u,{capture:!0}),()=>{window.removeEventListener("keydown",u,{capture:!0})}},[n,r,i]),t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:e.map((u,o)=>t.jsxRuntimeExports.jsx(_,{...u,reference:v,onMouseEnter:x},o))})}function C({items:e,...n}){return t.jsxRuntimeExports.jsx(j.default,{...n,as:"nav",role:"menu",innerClassName:"kakadu-components-3600436535",children:t.jsxRuntimeExports.jsx(K,{items:e})})}function F(e){const n=a.useMemo(()=>({items:e}),[e]),{show:r,popover:s}=j.usePopover(C,n);return a.useMemo(()=>({show:r,popoverMenu:s}),[r,s])}function y({menu:e,className:n,children:r}){return t.jsxRuntimeExports.jsxs(j.PopoverContainer,{className:n,children:[r,e]})}exports.default=y;exports.usePopoverMenu=F;
|