@kakadu/components 3.15.3 → 3.15.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.
@@ -13,6 +13,7 @@ export type PopoverMenuItemProperties = {
13
13
  readonly reference?: Ref<PopoverMenuItemElementType>;
14
14
  readonly label: ReactNode;
15
15
  readonly href?: string;
16
+ readonly target?: string;
16
17
  readonly iconLeft?: IconType;
17
18
  readonly iconRight?: IconType;
18
19
  readonly submenu?: ReturnType<typeof usePopoverMenu>;
@@ -23,6 +24,7 @@ export type PopoverMenuItemProperties = {
23
24
  readonly onMouseEnter?: (event: MouseEvent<PopoverMenuItemElementType>) => void;
24
25
  };
25
26
  export declare function usePopoverMenu(items: PopoverMenuItemProperties[]): {
27
+ isVisible: boolean;
26
28
  show: () => Promise<void | undefined>;
27
29
  close: (result?: void | undefined) => void;
28
30
  popoverMenu: import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),_=require("@kuma-ui/core"),i=require("react"),N=require("../theme.js"),w=require("../icons/icon.js"),f=require("./popover.js"),C=require("./atom.js"),P=require("./text.js"),b=require("./hover-gradient.js"),F=require("./click-ripples.js"),K=require("./separator.js"),z=require("./decorators.js"),M=require("./spinner.js"),A=require("./skeleton.js"),D=require("./aria-text.js"),k=new Set;function q(){const[t,s]=i.useState(!1),r=i.useCallback(u=>{s(u);for(const n of k)n(u)},[]);return i.useEffect(()=>{const u=n=>{s(n)};return k.add(u),()=>{k.delete(u)}},[]),i.useMemo(()=>({isKeyboardNavigating:t,setIsKeyboardNavigating:r}),[t,r])}const T="kakadu-components-949294122";function H({isLoading:t,label:s,iconLeft:r,iconRight:u,href:n,shouldCloseOnClick:v=!0,decorators:E=[],submenu:o,className:c,onClick:p,...m}){const{isVisible:x,isPreparingFocus:d,isFocused:a,close:l}=f.usePopoverContext(),{isKeyboardNavigating:j}=q(),R=i.useRef(!0),h=i.useCallback(()=>{R.current=a},[a]),y=i.useCallback(S=>{!j&&!R.current||a&&(p==null||p(S),o?o.show():v&&(l==null||l()))},[j,a,p,o,v,l]),g=i.useMemo(()=>e.jsxRuntimeExports.jsxs(C.default,{as:n&&!t?"a":"button",...m,type:n&&!t?void 0:"button",role:"menuitem",href:n,inert:!x&&!d||t,disabled:n?void 0:!x&&!d||t,className:_.cx(N.buttonResetStyles,"kakadu-components-1772835671",a&&"kakadu-components-3160069815",j?"kakadu-components-2254977234":a&&"kakadu-components-278139688",c),onClick:y,onPointerDownCapture:h,children:[e.jsxRuntimeExports.jsx(P.Span,{className:"kakadu-components-1109353535",children:t?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(D.default,{children:s}),r?e.jsxRuntimeExports.jsx(M.default,{size:12}):null,e.jsxRuntimeExports.jsx(A.SkeletonInstance,{height:"1em",width:"100%"}),u?e.jsxRuntimeExports.jsx(M.default,{size:12}):null]}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[r?e.jsxRuntimeExports.jsx(w.default,{width:12,height:12,type:r}):null,e.jsxRuntimeExports.jsx("span",{className:"kakadu-components-4055589237",children:s}),u?e.jsxRuntimeExports.jsx(w.default,{width:12,height:12,type:u}):null]})}),j||t?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(F.default,{isActive:a,size:100}),e.jsxRuntimeExports.jsx(b.default,{isActive:a,size:150,className:b.normalBlendStyles})]})]}),[n,t,m,x,d,j,c,y,h,r,s,u,a]);return e.jsxRuntimeExports.jsx(z.default,{decorators:E,children:o?e.jsxRuntimeExports.jsx(I,{menu:o.popoverMenu,className:"kakadu-components-1861176543",children:g}):g})}function V(t){if("type"in t){if(t.type==="separator")return e.jsxRuntimeExports.jsx(K.default,{});if(t.type==="group")return e.jsxRuntimeExports.jsx(P.Span,{className:"kakadu-components-1499037363",children:t.label})}return e.jsxRuntimeExports.jsx(H,{...t})}function $({items:t}){const{isFocused:s}=f.usePopoverContext(),[r,u]=i.useState([]),{setIsKeyboardNavigating:n}=q(),v=i.useCallback(o=>{o&&u(c=>c.includes(o)?c:[...c,o])},[]),E=i.useCallback(o=>{s&&(o.currentTarget.focus(),n(!1))},[s,n]);return i.useEffect(()=>{if(!s)return;const o=c=>{const p=r.filter(l=>l.isConnected),m=p.length;if(m===0)return;let x;const d=document.activeElement;let a=d?p.indexOf(d):-1;switch(a===-1&&(a=0),c.key){case"ArrowDown":{x=(a+1)%m;break}case"ArrowUp":{x=(a-1+m)%m;break}case"Home":{x=0;break}case"End":{x=m-1;break}case"Tab":{n(!0);return}}if(x!==void 0){c.preventDefault(),c.stopPropagation();const l=p[x];l&&(l.focus(),n(!0))}};return window.addEventListener("keydown",o,{capture:!0}),()=>{window.removeEventListener("keydown",o,{capture:!0})}},[s,r,n]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t.map((o,c)=>e.jsxRuntimeExports.jsx(V,{...o,reference:v,onMouseEnter:E},c))})}function B({items:t,...s}){return e.jsxRuntimeExports.jsx(f.default,{...s,as:"nav",role:"menu",innerClassName:"kakadu-components-3600436535",children:e.jsxRuntimeExports.jsx($,{items:t})})}function G(t){const s=i.useMemo(()=>({items:t}),[t]),{show:r,close:u,popover:n}=f.usePopover(B,s);return i.useMemo(()=>({show:r,close:u,popoverMenu:n}),[r,u,n])}function I({menu:t,className:s,children:r}){return e.jsxRuntimeExports.jsxs(f.PopoverContainer,{className:s,children:[r,t]})}exports.dangerPopoverMenuItemStyles=T;exports.default=I;exports.usePopoverMenu=G;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),N=require("@kuma-ui/core"),i=require("react"),C=require("../theme.js"),w=require("../icons/icon.js"),v=require("./popover.js"),F=require("./atom.js"),q=require("./text.js"),M=require("./hover-gradient.js"),K=require("./click-ripples.js"),z=require("./separator.js"),A=require("./decorators.js"),P=require("./spinner.js"),D=require("./skeleton.js"),T=require("./aria-text.js"),R=new Set;function I(){const[t,s]=i.useState(!1),r=i.useCallback(u=>{s(u);for(const n of R)n(u)},[]);return i.useEffect(()=>{const u=n=>{s(n)};return R.add(u),()=>{R.delete(u)}},[]),i.useMemo(()=>({isKeyboardNavigating:t,setIsKeyboardNavigating:r}),[t,r])}const V="kakadu-components-949294122";function H({isLoading:t,label:s,iconLeft:r,iconRight:u,href:n,target:m,shouldCloseOnClick:E=!0,decorators:c=[],submenu:o,className:d,onClick:x,...l}){const{isVisible:j,isPreparingFocus:p,isFocused:a,close:k}=v.usePopoverContext(),{isKeyboardNavigating:f}=I(),h=i.useRef(!0),y=i.useCallback(()=>{h.current=a},[a]),b=i.useCallback(_=>{!f&&!h.current||a&&(x==null||x(_),o?o.show():E&&(k==null||k()))},[f,a,x,o,E,k]),g=i.useMemo(()=>e.jsxRuntimeExports.jsxs(F.default,{as:n&&!t?"a":"button",...l,type:n&&!t?void 0:"button",role:"menuitem",href:n,target:m,inert:!j&&!p||t,disabled:n?void 0:!j&&!p||t,className:N.cx(C.buttonResetStyles,"kakadu-components-1772835671",a&&"kakadu-components-3160069815",f?"kakadu-components-2254977234":a&&"kakadu-components-278139688",d),onClick:b,onPointerDownCapture:y,children:[e.jsxRuntimeExports.jsx(q.Span,{className:"kakadu-components-1109353535",children:t?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(T.default,{children:s}),r?e.jsxRuntimeExports.jsx(P.default,{size:12}):null,e.jsxRuntimeExports.jsx(D.SkeletonInstance,{height:"1em",width:"100%"}),u?e.jsxRuntimeExports.jsx(P.default,{size:12}):null]}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[r?e.jsxRuntimeExports.jsx(w.default,{width:12,height:12,type:r}):null,e.jsxRuntimeExports.jsx("span",{className:"kakadu-components-4055589237",children:s}),u?e.jsxRuntimeExports.jsx(w.default,{width:12,height:12,type:u}):null]})}),f||t?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(K.default,{isActive:a,size:100}),e.jsxRuntimeExports.jsx(M.default,{isActive:a,size:150,className:M.normalBlendStyles})]})]}),[n,m,t,l,j,p,f,d,b,y,r,s,u,a]);return e.jsxRuntimeExports.jsx(A.default,{decorators:c,children:o?e.jsxRuntimeExports.jsx(S,{menu:o.popoverMenu,className:"kakadu-components-1861176543",children:g}):g})}function $(t){if("type"in t){if(t.type==="separator")return e.jsxRuntimeExports.jsx(z.default,{});if(t.type==="group")return e.jsxRuntimeExports.jsx(q.Span,{className:"kakadu-components-1499037363",children:t.label})}return e.jsxRuntimeExports.jsx(H,{...t})}function B({items:t}){const{isFocused:s}=v.usePopoverContext(),[r,u]=i.useState([]),{setIsKeyboardNavigating:n}=I(),m=i.useCallback(c=>{c&&u(o=>o.includes(c)?o:[...o,c])},[]),E=i.useCallback(c=>{s&&(c.currentTarget.focus(),n(!1))},[s,n]);return i.useEffect(()=>{if(!s)return;const c=o=>{const d=r.filter(a=>a.isConnected),x=d.length;if(x===0)return;let l;const j=document.activeElement;let p=j?d.indexOf(j):-1;switch(p===-1&&(p=0),o.key){case"ArrowDown":{l=(p+1)%x;break}case"ArrowUp":{l=(p-1+x)%x;break}case"Home":{l=0;break}case"End":{l=x-1;break}case"Tab":{n(!0);return}}if(l!==void 0){o.preventDefault(),o.stopPropagation();const a=d[l];a&&(a.focus(),n(!0))}};return window.addEventListener("keydown",c,{capture:!0}),()=>{window.removeEventListener("keydown",c,{capture:!0})}},[s,r,n]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:t.map((c,o)=>e.jsxRuntimeExports.jsx($,{...c,reference:m,onMouseEnter:E},o))})}function G({items:t,...s}){return e.jsxRuntimeExports.jsx(v.default,{...s,as:"nav",role:"menu",innerClassName:"kakadu-components-3600436535",children:e.jsxRuntimeExports.jsx(B,{items:t})})}function O(t){const s=i.useMemo(()=>({items:t}),[t]),{isVisible:r,show:u,close:n,popover:m}=v.usePopover(G,s);return i.useMemo(()=>({isVisible:r,show:u,close:n,popoverMenu:m}),[r,u,n,m])}function S({menu:t,className:s,children:r}){return e.jsxRuntimeExports.jsxs(v.PopoverContainer,{className:s,children:[r,t]})}exports.dangerPopoverMenuItemStyles=V;exports.default=S;exports.usePopoverMenu=O;
@@ -1,126 +1,127 @@
1
1
  import { j as e } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { cx as K } from "@kuma-ui/core";
3
- import { useMemo as k, useState as N, useCallback as x, useEffect as M, useRef as C } from "react";
4
- import { buttonResetStyles as D } from "../theme.mjs";
5
- import P from "../icons/icon.mjs";
6
- import z, { PopoverContainer as H, usePopover as T, usePopoverContext as S } from "./popover.mjs";
2
+ import { cx as C } from "@kuma-ui/core";
3
+ import { useMemo as h, useState as M, useCallback as v, useEffect as S, useRef as D } from "react";
4
+ import { buttonResetStyles as z } from "../theme.mjs";
5
+ import b from "../icons/icon.mjs";
6
+ import H, { PopoverContainer as T, usePopover as V, usePopoverContext as E } from "./popover.mjs";
7
7
  import R from "./atom.mjs";
8
- import { Span as E } from "./text.mjs";
9
- import V, { normalBlendStyles as B } from "./hover-gradient.mjs";
10
- import G from "./click-ripples.mjs";
11
- import U from "./separator.mjs";
12
- import q from "./decorators.mjs";
13
- import b from "./spinner.mjs";
14
- import { SkeletonInstance as J } from "./skeleton.mjs";
15
- import O from "./aria-text.mjs";
16
- const h = /* @__PURE__ */ new Set();
17
- function F() {
18
- const [n, r] = N(!1), s = x((a) => {
8
+ import { Span as F } from "./text.mjs";
9
+ import B, { normalBlendStyles as G } from "./hover-gradient.mjs";
10
+ import U from "./click-ripples.mjs";
11
+ import q from "./separator.mjs";
12
+ import J from "./decorators.mjs";
13
+ import N from "./spinner.mjs";
14
+ import { SkeletonInstance as O } from "./skeleton.mjs";
15
+ import Q from "./aria-text.mjs";
16
+ const w = /* @__PURE__ */ new Set();
17
+ function A() {
18
+ const [n, r] = M(!1), s = v((a) => {
19
19
  r(a);
20
- for (const t of h)
20
+ for (const t of w)
21
21
  t(a);
22
22
  }, []);
23
- return M(() => {
23
+ return S(() => {
24
24
  const a = (t) => {
25
25
  r(t);
26
26
  };
27
- return h.add(a), () => {
28
- h.delete(a);
27
+ return w.add(a), () => {
28
+ w.delete(a);
29
29
  };
30
- }, []), k(() => ({
30
+ }, []), h(() => ({
31
31
  isKeyboardNavigating: n,
32
32
  setIsKeyboardNavigating: s
33
33
  }), [n, s]);
34
34
  }
35
- const pe = "kakadu-components-949294122";
36
- function Q({
35
+ const de = "kakadu-components-949294122";
36
+ function W({
37
37
  isLoading: n,
38
38
  label: r,
39
39
  iconLeft: s,
40
40
  iconRight: a,
41
41
  href: t,
42
- shouldCloseOnClick: v = !0,
43
- decorators: j = [],
42
+ target: p,
43
+ shouldCloseOnClick: k = !0,
44
+ decorators: c = [],
44
45
  submenu: o,
45
- className: c,
46
- onClick: l,
47
- ...p
46
+ className: d,
47
+ onClick: u,
48
+ ...m
48
49
  }) {
49
50
  const {
50
- isVisible: u,
51
- isPreparingFocus: d,
51
+ isVisible: f,
52
+ isPreparingFocus: l,
52
53
  isFocused: i,
53
- close: m
54
- } = S(), {
55
- isKeyboardNavigating: f
56
- } = F(), w = C(!0), y = x(() => {
57
- w.current = i;
58
- }, [i]), g = x((A) => {
59
- !f && !w.current || i && (l == null || l(A), o ? o.show() : v && (m == null || m()));
60
- }, [f, i, l, o, v, m]), I = k(() => /* @__PURE__ */ e.jsxs(R, { as: t && !n ? "a" : "button", ...p, type: t && !n ? void 0 : "button", role: "menuitem", href: t, inert: !u && !d || n, disabled: t ? void 0 : !u && !d || n, className: K(D, "kakadu-components-1772835671", i && "kakadu-components-3160069815", f ? "kakadu-components-2254977234" : i && "kakadu-components-278139688", c), onClick: g, onPointerDownCapture: y, children: [
61
- /* @__PURE__ */ e.jsx(E, { className: "kakadu-components-1109353535", children: n ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
62
- /* @__PURE__ */ e.jsx(O, { children: r }),
63
- s ? /* @__PURE__ */ e.jsx(b, { size: 12 }) : null,
64
- /* @__PURE__ */ e.jsx(J, { height: "1em", width: "100%" }),
65
- a ? /* @__PURE__ */ e.jsx(b, { size: 12 }) : null
54
+ close: j
55
+ } = E(), {
56
+ isKeyboardNavigating: x
57
+ } = A(), y = D(!0), g = v(() => {
58
+ y.current = i;
59
+ }, [i]), I = v((K) => {
60
+ !x && !y.current || i && (u == null || u(K), o ? o.show() : k && (j == null || j()));
61
+ }, [x, i, u, o, k, j]), P = h(() => /* @__PURE__ */ e.jsxs(R, { as: t && !n ? "a" : "button", ...m, type: t && !n ? void 0 : "button", role: "menuitem", href: t, target: p, inert: !f && !l || n, disabled: t ? void 0 : !f && !l || n, className: C(z, "kakadu-components-1772835671", i && "kakadu-components-3160069815", x ? "kakadu-components-2254977234" : i && "kakadu-components-278139688", d), onClick: I, onPointerDownCapture: g, children: [
62
+ /* @__PURE__ */ e.jsx(F, { className: "kakadu-components-1109353535", children: n ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
63
+ /* @__PURE__ */ e.jsx(Q, { children: r }),
64
+ s ? /* @__PURE__ */ e.jsx(N, { size: 12 }) : null,
65
+ /* @__PURE__ */ e.jsx(O, { height: "1em", width: "100%" }),
66
+ a ? /* @__PURE__ */ e.jsx(N, { size: 12 }) : null
66
67
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
67
- s ? /* @__PURE__ */ e.jsx(P, { width: 12, height: 12, type: s }) : null,
68
+ s ? /* @__PURE__ */ e.jsx(b, { width: 12, height: 12, type: s }) : null,
68
69
  /* @__PURE__ */ e.jsx("span", { className: "kakadu-components-4055589237", children: r }),
69
- a ? /* @__PURE__ */ e.jsx(P, { width: 12, height: 12, type: a }) : null
70
+ a ? /* @__PURE__ */ e.jsx(b, { width: 12, height: 12, type: a }) : null
70
71
  ] }) }),
71
- f || n ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
72
- /* @__PURE__ */ e.jsx(G, { isActive: i, size: 100 }),
73
- /* @__PURE__ */ e.jsx(V, { isActive: i, size: 150, className: B })
72
+ x || n ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
73
+ /* @__PURE__ */ e.jsx(U, { isActive: i, size: 100 }),
74
+ /* @__PURE__ */ e.jsx(B, { isActive: i, size: 150, className: G })
74
75
  ] })
75
- ] }), [t, n, p, u, d, f, c, g, y, s, r, a, i]);
76
- return /* @__PURE__ */ e.jsx(q, { decorators: j, children: o ? /* @__PURE__ */ e.jsx(Z, { menu: o.popoverMenu, className: "kakadu-components-1861176543", children: I }) : I });
76
+ ] }), [t, p, n, m, f, l, x, d, I, g, s, r, a, i]);
77
+ return /* @__PURE__ */ e.jsx(J, { decorators: c, children: o ? /* @__PURE__ */ e.jsx(_, { menu: o.popoverMenu, className: "kakadu-components-1861176543", children: P }) : P });
77
78
  }
78
- function W(n) {
79
+ function X(n) {
79
80
  if ("type" in n) {
80
81
  if (n.type === "separator")
81
- return /* @__PURE__ */ e.jsx(U, {});
82
+ return /* @__PURE__ */ e.jsx(q, {});
82
83
  if (n.type === "group")
83
- return /* @__PURE__ */ e.jsx(E, { className: "kakadu-components-1499037363", children: n.label });
84
+ return /* @__PURE__ */ e.jsx(F, { className: "kakadu-components-1499037363", children: n.label });
84
85
  }
85
- return /* @__PURE__ */ e.jsx(Q, { ...n });
86
+ return /* @__PURE__ */ e.jsx(W, { ...n });
86
87
  }
87
- function X({
88
+ function Y({
88
89
  items: n
89
90
  }) {
90
91
  const {
91
92
  isFocused: r
92
- } = S(), [s, a] = N([]), {
93
+ } = E(), [s, a] = M([]), {
93
94
  setIsKeyboardNavigating: t
94
- } = F(), v = x((o) => {
95
- o && a((c) => c.includes(o) ? c : [...c, o]);
96
- }, []), j = x((o) => {
97
- r && (o.currentTarget.focus(), t(!1));
95
+ } = A(), p = v((c) => {
96
+ c && a((o) => o.includes(c) ? o : [...o, c]);
97
+ }, []), k = v((c) => {
98
+ r && (c.currentTarget.focus(), t(!1));
98
99
  }, [r, t]);
99
- return M(() => {
100
+ return S(() => {
100
101
  if (!r)
101
102
  return;
102
- const o = (c) => {
103
- const l = s.filter((m) => m.isConnected), p = l.length;
104
- if (p === 0)
103
+ const c = (o) => {
104
+ const d = s.filter((i) => i.isConnected), u = d.length;
105
+ if (u === 0)
105
106
  return;
106
- let u;
107
- const d = document.activeElement;
108
- let i = d ? l.indexOf(d) : -1;
109
- switch (i === -1 && (i = 0), c.key) {
107
+ let m;
108
+ const f = document.activeElement;
109
+ let l = f ? d.indexOf(f) : -1;
110
+ switch (l === -1 && (l = 0), o.key) {
110
111
  case "ArrowDown": {
111
- u = (i + 1) % p;
112
+ m = (l + 1) % u;
112
113
  break;
113
114
  }
114
115
  case "ArrowUp": {
115
- u = (i - 1 + p) % p;
116
+ m = (l - 1 + u) % u;
116
117
  break;
117
118
  }
118
119
  case "Home": {
119
- u = 0;
120
+ m = 0;
120
121
  break;
121
122
  }
122
123
  case "End": {
123
- u = p - 1;
124
+ m = u - 1;
124
125
  break;
125
126
  }
126
127
  case "Tab": {
@@ -128,61 +129,63 @@ function X({
128
129
  return;
129
130
  }
130
131
  }
131
- if (u !== void 0) {
132
- c.preventDefault(), c.stopPropagation();
133
- const m = l[u];
134
- m && (m.focus(), t(!0));
132
+ if (m !== void 0) {
133
+ o.preventDefault(), o.stopPropagation();
134
+ const i = d[m];
135
+ i && (i.focus(), t(!0));
135
136
  }
136
137
  };
137
- return window.addEventListener("keydown", o, {
138
+ return window.addEventListener("keydown", c, {
138
139
  capture: !0
139
140
  }), () => {
140
- window.removeEventListener("keydown", o, {
141
+ window.removeEventListener("keydown", c, {
141
142
  capture: !0
142
143
  });
143
144
  };
144
- }, [r, s, t]), /* @__PURE__ */ e.jsx(e.Fragment, { children: n.map((o, c) => /* @__PURE__ */ e.jsx(
145
- W,
145
+ }, [r, s, t]), /* @__PURE__ */ e.jsx(e.Fragment, { children: n.map((c, o) => /* @__PURE__ */ e.jsx(
146
+ X,
146
147
  {
147
- ...o,
148
- reference: v,
149
- onMouseEnter: j
148
+ ...c,
149
+ reference: p,
150
+ onMouseEnter: k
150
151
  },
151
- c
152
+ o
152
153
  )) });
153
154
  }
154
- function Y({
155
+ function Z({
155
156
  items: n,
156
157
  ...r
157
158
  }) {
158
- return /* @__PURE__ */ e.jsx(z, { ...r, as: "nav", role: "menu", innerClassName: "kakadu-components-3600436535", children: /* @__PURE__ */ e.jsx(X, { items: n }) });
159
+ return /* @__PURE__ */ e.jsx(H, { ...r, as: "nav", role: "menu", innerClassName: "kakadu-components-3600436535", children: /* @__PURE__ */ e.jsx(Y, { items: n }) });
159
160
  }
160
- function de(n) {
161
- const r = k(() => ({
161
+ function fe(n) {
162
+ const r = h(() => ({
162
163
  items: n
163
164
  }), [n]), {
164
- show: s,
165
- close: a,
166
- popover: t
167
- } = T(Y, r);
168
- return k(() => ({
169
- show: s,
170
- close: a,
171
- popoverMenu: t
172
- }), [s, a, t]);
165
+ isVisible: s,
166
+ show: a,
167
+ close: t,
168
+ popover: p
169
+ } = V(Z, r);
170
+ return h(() => ({
171
+ isVisible: s,
172
+ show: a,
173
+ close: t,
174
+ popoverMenu: p
175
+ }), [s, a, t, p]);
173
176
  }
174
- function Z({
177
+ function _({
175
178
  menu: n,
176
179
  className: r,
177
180
  children: s
178
181
  }) {
179
- return /* @__PURE__ */ e.jsxs(H, { className: r, children: [
182
+ return /* @__PURE__ */ e.jsxs(T, { className: r, children: [
180
183
  s,
181
184
  n
182
185
  ] });
183
186
  }
184
187
  export {
185
- pe as dangerPopoverMenuItemStyles,
186
- Z as default,
187
- de as usePopoverMenu
188
+ de as dangerPopoverMenuItemStyles,
189
+ _ as default,
190
+ fe as usePopoverMenu
188
191
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kakadu/components",
3
- "version": "3.15.3",
3
+ "version": "3.15.5",
4
4
  "description": "Kakadu components library",
5
5
  "license": "MIT",
6
6
  "main": "./build/index.js",