@kakadu/components 1.4.3 → 1.4.4
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/box.js +1 -1
- package/build/components/box.mjs +1 -1
- package/build/components/click-ripples.js +1 -1
- package/build/components/click-ripples.mjs +1 -1
- package/build/components/footer.d.ts +7 -1
- package/build/components/footer.js +1 -1
- package/build/components/footer.mjs +50 -44
- package/build/components/gauge.d.ts +2 -1
- package/build/components/gauge.js +1 -1
- package/build/components/gauge.mjs +46 -26
- package/build/components/hover-gradient.js +1 -1
- package/build/components/hover-gradient.mjs +1 -1
- package/build/components/kakadu-guide-icon.js +1 -1
- package/build/components/kakadu-guide-icon.mjs +12 -10
- package/build/components/modal.js +1 -1
- package/build/components/modal.mjs +1 -1
- package/build/components/notice.js +1 -1
- package/build/components/notice.mjs +2 -2
- package/build/components/separator.d.ts +1 -1
- package/build/components/separator.js +1 -1
- package/build/components/separator.mjs +21 -20
- package/build/components/text-button.d.ts +3 -2
- package/build/components/text-button.js +1 -1
- package/build/components/text-button.mjs +32 -30
- package/build/components/text.js +1 -1
- package/build/components/text.mjs +21 -21
- package/build/components/veil.d.ts +2 -1
- package/build/components/veil.js +1 -1
- package/build/components/veil.mjs +12 -10
- package/build/components.css +1 -1
- package/build/index.js +1 -1
- package/build/index.mjs +65 -65
- package/build/theme.d.ts +0 -1
- package/build/theme.js +1 -1
- package/build/theme.mjs +10 -11
- package/package.json +1 -1
package/build/components/box.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../jsx-runtime-BB_1_6y_.js"),n=require("@kuma-ui/core"),e=require("./atom.js");function r({as:t,className:o,...u}){return s.jsxRuntimeExports.jsx(e.default,{as:t??e.defaultAtomElementType,...u,className:n.cx("kakadu-components-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../jsx-runtime-BB_1_6y_.js"),n=require("@kuma-ui/core"),e=require("./atom.js");function r({as:t,className:o,...u}){return s.jsxRuntimeExports.jsx(e.default,{as:t??e.defaultAtomElementType,...u,className:n.cx("kakadu-components-2604957835",o)})}exports.default=r;
|
package/build/components/box.mjs
CHANGED
|
@@ -6,7 +6,7 @@ function u({
|
|
|
6
6
|
className: t,
|
|
7
7
|
...m
|
|
8
8
|
}) {
|
|
9
|
-
return /* @__PURE__ */ e.jsx(a, { as: o ?? s, ...m, className: r("kakadu-components-
|
|
9
|
+
return /* @__PURE__ */ e.jsx(a, { as: o ?? s, ...m, className: r("kakadu-components-2604957835", t) });
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
12
12
|
u as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../jsx-runtime-BB_1_6y_.js"),n=require("react"),R=require("@kuma-ui/core");function v({id:s,x:i,y:r,onEnd:t}){return n.useEffect(()=>{const c=setTimeout(()=>{t(s)},370);return()=>{clearTimeout(c)}},[t,s]),d.jsxRuntimeExports.jsx("div",{style:{top:r,left:i},className:"kakadu-components-3828473824"})}function y({size:s=150,className:i,...r}){const t=n.useRef(null),[c,f]=n.useState([]);n.useEffect(()=>{const e=o=>{if(t.current){const u=t.current.getBoundingClientRect(),{clientX:l,clientY:a}=o,{left:m,right:k,top:x,bottom:j}=u;l>m&&l<k&&a>x&&a<j&&f(E=>[...E,{id:Date.now()+Math.random()*1e3,x:l-m,y:a-x}])}};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}},[]);const p=n.useCallback(e=>{f(o=>o.filter(u=>u.id!==e))},[]);return d.jsxRuntimeExports.jsx("div",{...r,ref:t,style:{"--size":`${s}px`},className:R.cx("kakadu-components-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../jsx-runtime-BB_1_6y_.js"),n=require("react"),R=require("@kuma-ui/core");function v({id:s,x:i,y:r,onEnd:t}){return n.useEffect(()=>{const c=setTimeout(()=>{t(s)},370);return()=>{clearTimeout(c)}},[t,s]),d.jsxRuntimeExports.jsx("div",{style:{top:r,left:i},className:"kakadu-components-3828473824"})}function y({size:s=150,className:i,...r}){const t=n.useRef(null),[c,f]=n.useState([]);n.useEffect(()=>{const e=o=>{if(t.current){const u=t.current.getBoundingClientRect(),{clientX:l,clientY:a}=o,{left:m,right:k,top:x,bottom:j}=u;l>m&&l<k&&a>x&&a<j&&f(E=>[...E,{id:Date.now()+Math.random()*1e3,x:l-m,y:a-x}])}};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}},[]);const p=n.useCallback(e=>{f(o=>o.filter(u=>u.id!==e))},[]);return d.jsxRuntimeExports.jsx("div",{...r,ref:t,style:{"--size":`${s}px`},className:R.cx("kakadu-components-4189236582",i),children:c.map(e=>d.jsxRuntimeExports.jsx(v,{id:e.id,x:e.x,y:e.y,onEnd:p},e.id))})}exports.default=y;
|
|
@@ -53,7 +53,7 @@ function L({
|
|
|
53
53
|
}, []);
|
|
54
54
|
return /* @__PURE__ */ a.jsx("div", { ...i, ref: t, style: {
|
|
55
55
|
"--size": `${n}px`
|
|
56
|
-
}, className: R("kakadu-components-
|
|
56
|
+
}, className: R("kakadu-components-4189236582", s), children: o.map((e) => /* @__PURE__ */ a.jsx(h, { id: e.id, x: e.x, y: e.y, onEnd: x }, e.id)) });
|
|
57
57
|
}
|
|
58
58
|
export {
|
|
59
59
|
L as default
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { WrapperWidth } from './wrapper';
|
|
2
|
-
export
|
|
2
|
+
export declare enum FooterLinkItem {
|
|
3
|
+
privacyPolicy = "privacyPolicy",
|
|
4
|
+
ethicalGuidelines = "ethicalGuidelines",
|
|
5
|
+
security = "security"
|
|
6
|
+
}
|
|
7
|
+
export default function Footer({ width, links, className, }: {
|
|
3
8
|
readonly width?: WrapperWidth;
|
|
9
|
+
readonly links?: Record<FooterLinkItem, string>;
|
|
4
10
|
readonly className?: string;
|
|
5
11
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),o=require("@kuma-ui/core"),l=require("../theme.js"),t=require("./flex.js"),n=require("./text.js"),d=require("./kakadu-logo.js"),p=require("./moving-stars.js"),m=require("./aria-text.js"),x=require("./wrapper.js"),a="kakadu-components-975968984";function i(r){return!!(r&&r.trim()!=="")}var u=(r=>(r.privacyPolicy="privacyPolicy",r.ethicalGuidelines="ethicalGuidelines",r.security="security",r))(u||{});function j({width:r=x.WrapperWidth.page,links:s,className:c}){return e.jsxRuntimeExports.jsxs(x.default,{as:"footer",gap:2,"data-theme":"dark",width:r,className:o.cx(l.default,"kakadu-components-1574406446",c),children:[e.jsxRuntimeExports.jsxs(t.default,{wrap:!0,direction:"row",gap:4,className:"kakadu-components-783629418",children:[e.jsxRuntimeExports.jsxs(t.default,{direction:"column",alignment:t.FlexAlignment.start,gap:.5,children:[e.jsxRuntimeExports.jsx(n.Paragraph,{children:e.jsxRuntimeExports.jsx("strong",{children:"Products"})}),e.jsxRuntimeExports.jsxs(n.Paragraph,{as:"ul",className:a,children:[e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://guide.kakadu.no",children:"Kakadu Guide"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no/kakadu-start",children:"Kakadu Kolibri"})})]})]}),e.jsxRuntimeExports.jsxs(t.default,{direction:"column",alignment:t.FlexAlignment.start,gap:.5,children:[e.jsxRuntimeExports.jsx(n.Paragraph,{children:e.jsxRuntimeExports.jsx("strong",{children:"Results"})}),e.jsxRuntimeExports.jsxs(n.Paragraph,{as:"ul",className:a,children:[e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no",children:"Case studies"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no",children:"Impact measurement"})})]})]}),e.jsxRuntimeExports.jsxs(t.default,{direction:"column",alignment:t.FlexAlignment.start,gap:.5,children:[e.jsxRuntimeExports.jsx(n.Paragraph,{children:e.jsxRuntimeExports.jsx("strong",{children:"About us"})}),e.jsxRuntimeExports.jsxs(n.Paragraph,{as:"ul",className:a,children:[e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no",children:"Our story"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no/kontakt-oss",children:"Contact"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://kakadu.instatus.com",children:"Status"})})]})]}),e.jsxRuntimeExports.jsxs(t.default,{direction:"column",alignment:t.FlexAlignment.start,gap:.5,children:[e.jsxRuntimeExports.jsx(n.Paragraph,{children:e.jsxRuntimeExports.jsx("strong",{children:"Compliance"})}),e.jsxRuntimeExports.jsxs(n.Paragraph,{as:"ul",className:a,children:[e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:i(s==null?void 0:s.privacyPolicy)?s.privacyPolicy:"https://utforsk.kakadu.no/personvernerklaering",children:"Privacy policy"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:i(s==null?void 0:s.ethicalGuidelines)?s.ethicalGuidelines:"https://utforsk.kakadu.no/etiske-retningslinjer",children:"Ethical guidelines"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:i(s==null?void 0:s.security)?s.security:"https://utforsk.kakadu.no/personvernerklaering",children:"Security"})})]})]}),e.jsxRuntimeExports.jsx(t.default,{fill:!0,className:"kakadu-components-3520395370",children:e.jsxRuntimeExports.jsx("a",{href:"https://businessnorway.com/made-in-norway",target:"_blank",rel:"noopener noreferrer",className:"kakadu-components-4048415128",children:e.jsxRuntimeExports.jsx("img",{alt:"Made in Norway",src:"https://cdn.prod.website-files.com/65a686387a785640fecc9b9d/68f09646a6d6e62b6839c38c_made_in_norway_logo.png",width:76,className:"kakadu-components-2329568054"})})})]}),e.jsxRuntimeExports.jsxs(t.default,{direction:"row",gap:1,className:o.cx("kakadu-components-2089456404"),children:[e.jsxRuntimeExports.jsxs("a",{href:"https://kakadu.no",children:[e.jsxRuntimeExports.jsx(m.default,{children:"Kakadu.no"}),e.jsxRuntimeExports.jsx(d.default,{width:90,className:"kakadu-components-3695148669"})]}),e.jsxRuntimeExports.jsxs(n.Span,{className:"kakadu-components-1125118494",children:["© ",new Date().getFullYear()," Kakadu Ignite AS"]})]}),e.jsxRuntimeExports.jsx(p.default,{})]})}exports.FooterLinkItem=u;exports.default=j;
|
|
@@ -1,65 +1,71 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { cx as
|
|
1
|
+
import { j as e } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
+
import { cx as c } from "@kuma-ui/core";
|
|
3
3
|
import l from "../theme.mjs";
|
|
4
|
-
import
|
|
5
|
-
import { Paragraph as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
import t, { FlexAlignment as n } from "./flex.mjs";
|
|
5
|
+
import { Paragraph as s, Span as h } from "./text.mjs";
|
|
6
|
+
import u from "./kakadu-logo.mjs";
|
|
7
|
+
import p from "./moving-stars.mjs";
|
|
8
|
+
import m from "./aria-text.mjs";
|
|
9
|
+
import x, { WrapperWidth as j } from "./wrapper.mjs";
|
|
10
|
+
const i = "kakadu-components-975968984";
|
|
11
|
+
function o(a) {
|
|
12
|
+
return !!(a && a.trim() !== "");
|
|
13
|
+
}
|
|
14
|
+
var k = /* @__PURE__ */ ((a) => (a.privacyPolicy = "privacyPolicy", a.ethicalGuidelines = "ethicalGuidelines", a.security = "security", a))(k || {});
|
|
15
|
+
function K({
|
|
16
|
+
width: a = j.page,
|
|
17
|
+
links: r,
|
|
18
|
+
className: d
|
|
14
19
|
}) {
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ e.jsxs(x, { as: "footer", gap: 2, "data-theme": "dark", width: a, className: c(l, "kakadu-components-1574406446", d), children: [
|
|
21
|
+
/* @__PURE__ */ e.jsxs(t, { wrap: !0, direction: "row", gap: 4, className: "kakadu-components-783629418", children: [
|
|
22
|
+
/* @__PURE__ */ e.jsxs(t, { direction: "column", alignment: n.start, gap: 0.5, children: [
|
|
23
|
+
/* @__PURE__ */ e.jsx(s, { children: /* @__PURE__ */ e.jsx("strong", { children: "Products" }) }),
|
|
24
|
+
/* @__PURE__ */ e.jsxs(s, { as: "ul", className: i, children: [
|
|
25
|
+
/* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: "https://guide.kakadu.no", children: "Kakadu Guide" }) }),
|
|
26
|
+
/* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: "https://utforsk.kakadu.no/kakadu-start", children: "Kakadu Kolibri" }) })
|
|
22
27
|
] })
|
|
23
28
|
] }),
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ e.jsxs(t, { direction: "column", alignment: n.start, gap: 0.5, children: [
|
|
30
|
+
/* @__PURE__ */ e.jsx(s, { children: /* @__PURE__ */ e.jsx("strong", { children: "Results" }) }),
|
|
31
|
+
/* @__PURE__ */ e.jsxs(s, { as: "ul", className: i, children: [
|
|
32
|
+
/* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: "https://utforsk.kakadu.no", children: "Case studies" }) }),
|
|
33
|
+
/* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: "https://utforsk.kakadu.no", children: "Impact measurement" }) })
|
|
29
34
|
] })
|
|
30
35
|
] }),
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ e.jsxs(t, { direction: "column", alignment: n.start, gap: 0.5, children: [
|
|
37
|
+
/* @__PURE__ */ e.jsx(s, { children: /* @__PURE__ */ e.jsx("strong", { children: "About us" }) }),
|
|
38
|
+
/* @__PURE__ */ e.jsxs(s, { as: "ul", className: i, children: [
|
|
39
|
+
/* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: "https://utforsk.kakadu.no", children: "Our story" }) }),
|
|
40
|
+
/* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: "https://utforsk.kakadu.no/kontakt-oss", children: "Contact" }) }),
|
|
41
|
+
/* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { target: "_blank", rel: "noopener noreferrer", href: "https://kakadu.instatus.com", children: "Status" }) })
|
|
37
42
|
] })
|
|
38
43
|
] }),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ e.jsxs(t, { direction: "column", alignment: n.start, gap: 0.5, children: [
|
|
45
|
+
/* @__PURE__ */ e.jsx(s, { children: /* @__PURE__ */ e.jsx("strong", { children: "Compliance" }) }),
|
|
46
|
+
/* @__PURE__ */ e.jsxs(s, { as: "ul", className: i, children: [
|
|
47
|
+
/* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: o(r == null ? void 0 : r.privacyPolicy) ? r.privacyPolicy : "https://utforsk.kakadu.no/personvernerklaering", children: "Privacy policy" }) }),
|
|
48
|
+
/* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: o(r == null ? void 0 : r.ethicalGuidelines) ? r.ethicalGuidelines : "https://utforsk.kakadu.no/etiske-retningslinjer", children: "Ethical guidelines" }) }),
|
|
49
|
+
/* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: o(r == null ? void 0 : r.security) ? r.security : "https://utforsk.kakadu.no/personvernerklaering", children: "Security" }) })
|
|
45
50
|
] })
|
|
46
51
|
] }),
|
|
47
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ e.jsx(t, { fill: !0, className: "kakadu-components-3520395370", children: /* @__PURE__ */ e.jsx("a", { href: "https://businessnorway.com/made-in-norway", target: "_blank", rel: "noopener noreferrer", className: "kakadu-components-4048415128", children: /* @__PURE__ */ e.jsx("img", { alt: "Made in Norway", src: "https://cdn.prod.website-files.com/65a686387a785640fecc9b9d/68f09646a6d6e62b6839c38c_made_in_norway_logo.png", width: 76, className: "kakadu-components-2329568054" }) }) })
|
|
48
53
|
] }),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ e.jsxs(t, { direction: "row", gap: 1, className: c("kakadu-components-2089456404"), children: [
|
|
55
|
+
/* @__PURE__ */ e.jsxs("a", { href: "https://kakadu.no", children: [
|
|
56
|
+
/* @__PURE__ */ e.jsx(m, { children: "Kakadu.no" }),
|
|
57
|
+
/* @__PURE__ */ e.jsx(u, { width: 90, className: "kakadu-components-3695148669" })
|
|
53
58
|
] }),
|
|
54
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ e.jsxs(h, { className: "kakadu-components-1125118494", children: [
|
|
55
60
|
"© ",
|
|
56
61
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
57
62
|
" Kakadu Ignite AS"
|
|
58
63
|
] })
|
|
59
64
|
] }),
|
|
60
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ e.jsx(p, {})
|
|
61
66
|
] });
|
|
62
67
|
}
|
|
63
68
|
export {
|
|
64
|
-
|
|
69
|
+
k as FooterLinkItem,
|
|
70
|
+
K as default
|
|
65
71
|
};
|
|
@@ -2,5 +2,6 @@ export type GaugeProperties = {
|
|
|
2
2
|
readonly label: string;
|
|
3
3
|
readonly size?: 'small' | 'medium' | 'large';
|
|
4
4
|
readonly percentage?: number;
|
|
5
|
+
readonly isAnimated?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export default function Gauge({ label, size, percentage }: GaugeProperties): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default function Gauge({ label, size, percentage, isAnimated, }: GaugeProperties): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../jsx-runtime-BB_1_6y_.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../jsx-runtime-BB_1_6y_.js"),s=require("react"),N=require("@kuma-ui/core"),D={0:["#D60D43"],15:["#D60D43","#FFCD45"],30:["#D6460D","#ffda54"],50:["#D6860D","#F1DC3B","#CEE838"],65:["#D6BE0D","#FFD045","#6DE838"],80:["#D9E838","#93E838","#3EE838"],100:["#55EB62","#38E99A","#5EEA52"]},R=Object.keys(D).map(r=>Number.parseInt(r,10)).sort((r,c)=>c-r);function b({label:r,size:c,percentage:u=0,isAnimated:i}){const[d,l]=s.useState(u);s.useEffect(()=>{if(i){l(0);const a=300,m=10,g=30,k=.65,p=[];let E=a;for(let n=0;n<u;n+=1){const y=(n+1)/u,j=Math.min(Math.max((y-k)/(1-k),0),1),C=1-(1-j)*(1-j);E+=m+g*C,p.push(setTimeout(()=>{l(n+1)},E))}return()=>{for(const n of p)clearTimeout(n)}}l(u)},[i,u]);const e=s.useMemo(()=>Math.max(0,Math.min(100,d)),[d]),f=s.useMemo(()=>e/100,[e]),t=s.useMemo(()=>{for(const a of R)if(e>=a)return D[a];return[]},[e]),x=s.useMemo(()=>t.length,[t]),h=s.useMemo(()=>t.at(0),[t]),M=s.useMemo(()=>t.at(-1),[t]),v=s.useMemo(()=>t.map((a,m)=>`${a} ${Math.round(m/x*100)}%`).join(", "),[t,x]);return o.jsxRuntimeExports.jsxs("div",{style:{"--percentage":`${e}%`,"--percentage-factor":f,"--gradient":v,"--start-color":h,"--end-color":M},role:"meter","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r,className:N.cx("kakadu-components-2176404336",c==="small"&&"kakadu-components-3162945807",c==="large"&&"kakadu-components-2977513648"),children:[e>0?o.jsxRuntimeExports.jsx("div",{className:"kakadu-components-707327569"}):null,o.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2636723344",children:o.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2810161405"})}),o.jsxRuntimeExports.jsx("div",{className:"kakadu-components-1913523229",children:e}),e>0&&e<100?o.jsxRuntimeExports.jsx("div",{className:"kakadu-components-967240013",children:o.jsxRuntimeExports.jsx("div",{className:"kakadu-components-3225063030"})}):null]})}exports.default=b;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { cx as
|
|
4
|
-
const
|
|
1
|
+
import { j as t } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
+
import { useState as M, useEffect as F, useMemo as s } from "react";
|
|
3
|
+
import { cx as b } from "@kuma-ui/core";
|
|
4
|
+
const h = {
|
|
5
5
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
6
6
|
0: ["#D60D43"],
|
|
7
7
|
15: ["#D60D43", "#FFCD45"],
|
|
@@ -11,31 +11,51 @@ const m = {
|
|
|
11
11
|
80: ["#D9E838", "#93E838", "#3EE838"],
|
|
12
12
|
100: ["#55EB62", "#38E99A", "#5EEA52"]
|
|
13
13
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
14
|
-
},
|
|
15
|
-
function
|
|
16
|
-
label:
|
|
17
|
-
size:
|
|
18
|
-
percentage: c = 0
|
|
14
|
+
}, B = Object.keys(h).map((r) => Number.parseInt(r, 10)).sort((r, l) => l - r);
|
|
15
|
+
function w({
|
|
16
|
+
label: r,
|
|
17
|
+
size: l,
|
|
18
|
+
percentage: c = 0,
|
|
19
|
+
isAnimated: i
|
|
19
20
|
}) {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
const [d, m] = M(c);
|
|
22
|
+
F(() => {
|
|
23
|
+
if (i) {
|
|
24
|
+
m(0);
|
|
25
|
+
const a = 300, u = 10, g = 30, f = 0.65, D = [];
|
|
26
|
+
let p = a;
|
|
27
|
+
for (let n = 0; n < c; n += 1) {
|
|
28
|
+
const y = (n + 1) / c, x = Math.min(Math.max((y - f) / (1 - f), 0), 1), N = 1 - (1 - x) * (1 - x);
|
|
29
|
+
p += u + g * N, D.push(setTimeout(() => {
|
|
30
|
+
m(n + 1);
|
|
31
|
+
}, p));
|
|
32
|
+
}
|
|
33
|
+
return () => {
|
|
34
|
+
for (const n of D)
|
|
35
|
+
clearTimeout(n);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
m(c);
|
|
39
|
+
}, [i, c]);
|
|
40
|
+
const o = s(() => Math.max(0, Math.min(100, d)), [d]), E = s(() => o / 100, [o]), e = s(() => {
|
|
41
|
+
for (const a of B)
|
|
42
|
+
if (o >= a)
|
|
43
|
+
return h[a];
|
|
24
44
|
return [];
|
|
25
|
-
}, [
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
"--percentage": `${
|
|
28
|
-
"--percentage-factor":
|
|
29
|
-
"--gradient":
|
|
30
|
-
"--start-color":
|
|
31
|
-
"--end-color":
|
|
32
|
-
}, role: "meter", "aria-valuenow":
|
|
33
|
-
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
45
|
+
}, [o]), k = s(() => e.length, [e]), j = s(() => e.at(0), [e]), v = s(() => e.at(-1), [e]), C = s(() => e.map((a, u) => `${a} ${Math.round(u / k * 100)}%`).join(", "), [e, k]);
|
|
46
|
+
return /* @__PURE__ */ t.jsxs("div", { style: {
|
|
47
|
+
"--percentage": `${o}%`,
|
|
48
|
+
"--percentage-factor": E,
|
|
49
|
+
"--gradient": C,
|
|
50
|
+
"--start-color": j,
|
|
51
|
+
"--end-color": v
|
|
52
|
+
}, role: "meter", "aria-valuenow": o, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": r, className: b("kakadu-components-2176404336", l === "small" && "kakadu-components-3162945807", l === "large" && "kakadu-components-2977513648"), children: [
|
|
53
|
+
o > 0 ? /* @__PURE__ */ t.jsx("div", { className: "kakadu-components-707327569" }) : null,
|
|
54
|
+
/* @__PURE__ */ t.jsx("div", { className: "kakadu-components-2636723344", children: /* @__PURE__ */ t.jsx("div", { className: "kakadu-components-2810161405" }) }),
|
|
55
|
+
/* @__PURE__ */ t.jsx("div", { className: "kakadu-components-1913523229", children: o }),
|
|
56
|
+
o > 0 && o < 100 ? /* @__PURE__ */ t.jsx("div", { className: "kakadu-components-967240013", children: /* @__PURE__ */ t.jsx("div", { className: "kakadu-components-3225063030" }) }) : null
|
|
37
57
|
] });
|
|
38
58
|
}
|
|
39
59
|
export {
|
|
40
|
-
|
|
60
|
+
w as default
|
|
41
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("../jsx-runtime-BB_1_6y_.js"),t=require("react"),p=require("@kuma-ui/core"),R="kakadu-components-2608453841";function $({size:x=200,className:k,...E}){const i=t.useRef(null),n=t.useRef(null),[g,u]=t.useState(!1),[s,b]=t.useState();return t.useEffect(()=>{const c=i.current;if(!c)return;n.current||(n.current=c.parentElement);const e=n.current;if(!e)return;const l=m=>{const j=m.target;if(!e.contains(j))return;const S=e.getBoundingClientRect(),{clientX:o,clientY:r}=m,{left:d,right:y,top:f,bottom:L}=S;o>d&&o<y&&r>f&&r<L&&(u(!0),b([o-d,r-f]))},a=()=>{u(!1)};return e.addEventListener("mousemove",l),e.addEventListener("mouseleave",a),()=>{e.removeEventListener("mousemove",l),e.removeEventListener("mouseleave",a)}},[]),v.jsxRuntimeExports.jsx("div",{...E,ref:i,className:p.cx("kakadu-components-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("../jsx-runtime-BB_1_6y_.js"),t=require("react"),p=require("@kuma-ui/core"),R="kakadu-components-2608453841";function $({size:x=200,className:k,...E}){const i=t.useRef(null),n=t.useRef(null),[g,u]=t.useState(!1),[s,b]=t.useState();return t.useEffect(()=>{const c=i.current;if(!c)return;n.current||(n.current=c.parentElement);const e=n.current;if(!e)return;const l=m=>{const j=m.target;if(!e.contains(j))return;const S=e.getBoundingClientRect(),{clientX:o,clientY:r}=m,{left:d,right:y,top:f,bottom:L}=S;o>d&&o<y&&r>f&&r<L&&(u(!0),b([o-d,r-f]))},a=()=>{u(!1)};return e.addEventListener("mousemove",l),e.addEventListener("mouseleave",a),()=>{e.removeEventListener("mousemove",l),e.removeEventListener("mouseleave",a)}},[]),v.jsxRuntimeExports.jsx("div",{...E,ref:i,className:p.cx("kakadu-components-1237006455",k),children:s?v.jsxRuntimeExports.jsx("div",{style:{"--size":`${x}px`,"--offset-x":`${s[0]}px`,"--offset-y":`${s[1]}px`},className:p.cx("kakadu-components-611160091",g&&"kakadu-components-3627966847")}):null})}exports.default=$;exports.normalBlendStyles=R;
|
|
@@ -36,7 +36,7 @@ function z({
|
|
|
36
36
|
return e.addEventListener("mousemove", a), e.addEventListener("mouseleave", l), () => {
|
|
37
37
|
e.removeEventListener("mousemove", a), e.removeEventListener("mouseleave", l);
|
|
38
38
|
};
|
|
39
|
-
}, []), /* @__PURE__ */ d.jsx("div", { ...g, ref: r, className: x("kakadu-components-
|
|
39
|
+
}, []), /* @__PURE__ */ d.jsx("div", { ...g, ref: r, className: x("kakadu-components-1237006455", E), children: n ? /* @__PURE__ */ d.jsx("div", { style: {
|
|
40
40
|
"--size": `${k}px`,
|
|
41
41
|
"--offset-x": `${n[0]}px`,
|
|
42
42
|
"--offset-y": `${n[1]}px`
|
|
@@ -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"),o=require("@kuma-ui/core"),s=require("../icons/kakadu-guide-glyph.js"),u=require("../theme.js");function n({size:e=56}){return t.jsxRuntimeExports.jsx("div",{style:{"--size":`${e}px`,"--bevel-shadow-offset":`${e/11}px`,"--drop-shadow-offset-multiplier":`${e/30}`},className:o.cx(u.nonInteractiveEffectStyles,"kakadu-components-1421861246"),children:t.jsxRuntimeExports.jsx(s.default,{fill:"#fff",width:e/1.8793103448,height:e/2,className:"kakadu-components-392715920"})})}exports.default=n;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { cx as
|
|
3
|
-
import
|
|
4
|
-
import { nonInteractiveEffectStyles as
|
|
5
|
-
function
|
|
6
|
-
size:
|
|
1
|
+
import { j as t } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
+
import { cx as e } from "@kuma-ui/core";
|
|
3
|
+
import a from "../icons/kakadu-guide-glyph.mjs";
|
|
4
|
+
import { nonInteractiveEffectStyles as f } from "../theme.mjs";
|
|
5
|
+
function i({
|
|
6
|
+
size: o = 56
|
|
7
7
|
}) {
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
"--size": `${
|
|
10
|
-
|
|
8
|
+
return /* @__PURE__ */ t.jsx("div", { style: {
|
|
9
|
+
"--size": `${o}px`,
|
|
10
|
+
"--bevel-shadow-offset": `${o / 11}px`,
|
|
11
|
+
"--drop-shadow-offset-multiplier": `${o / 30}`
|
|
12
|
+
}, className: e(f, "kakadu-components-1421861246"), children: /* @__PURE__ */ t.jsx(a, { fill: "#fff", width: o / 1.8793103448, height: o / 2, className: "kakadu-components-392715920" }) });
|
|
11
13
|
}
|
|
12
14
|
export {
|
|
13
|
-
|
|
15
|
+
i as default
|
|
14
16
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
7
7
|
*/function ce(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,a=Array(e);t<e;t++)a[t]=r[t];return a}function Ye(r){if(Array.isArray(r))return ce(r)}function de(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=Oe(r))||e){t&&(r=t);var a=0,u=function(){};return{s:u,n:function(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function(y){throw y},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
8
8
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l,n=!0,p=!1;return{s:function(){t=t.call(r)},n:function(){var y=t.next();return n=y.done,y},e:function(y){p=!0,l=y},f:function(){try{n||t.return==null||t.return()}finally{if(p)throw l}}}}function He(r,e,t){return(e=et(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ze(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Xe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
9
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ve(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),t.push.apply(t,a)}return t}function pe(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ve(Object(t),!0).forEach(function(a){He(r,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ve(Object(t)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(t,a))})}return r}function Je(r){return Ye(r)||Ze(r)||Oe(r)||Xe()}function Qe(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function et(r){var e=Qe(r,"string");return typeof e=="symbol"?e:e+""}function Oe(r,e){if(r){if(typeof r=="string")return ce(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ce(r,e):void 0}}var B={getActiveTrap:function(e){return(e==null?void 0:e.length)>0?e[e.length-1]:null},activateTrap:function(e,t){var a=B.getActiveTrap(e);t!==a&&B.pauseTrap(e);var u=e.indexOf(t);u===-1||e.splice(u,1),e.push(t)},deactivateTrap:function(e,t){var a=e.indexOf(t);a!==-1&&e.splice(a,1),B.unpauseTrap(e)},pauseTrap:function(e){var t=B.getActiveTrap(e);t==null||t._setPausedState(!0)},unpauseTrap:function(e){var t=B.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},tt=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},rt=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},X=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},at=function(e){return X(e)&&!e.shiftKey},nt=function(e){return X(e)&&e.shiftKey},be=function(e){return setTimeout(e,0)},Z=function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),u=1;u<t;u++)a[u-1]=arguments[u];return typeof e=="function"?e.apply(void 0,a):e},Q=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},it=[],ot=function(e,t){var a=(t==null?void 0:t.document)||document,u=(t==null?void 0:t.trapStack)||it,l=pe({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:at,isKeyBackward:nt},t),n={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},p,y=function(o,i,f){return o&&o[i]!==void 0?o[i]:l[f||i]},E=function(o,i){var f=typeof(i==null?void 0:i.composedPath)=="function"?i.composedPath():void 0;return n.containerGroups.findIndex(function(g){var h=g.container,T=g.tabbableNodes;return h.contains(o)||(f==null?void 0:f.includes(h))||T.find(function(v){return v===o})})},O=function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=i.hasFallback,g=f===void 0?!1:f,h=i.params,T=h===void 0?[]:h,v=l[o];if(typeof v=="function"&&(v=v.apply(void 0,Je(T))),v===!0&&(v=void 0),!v){if(v===void 0||v===!1)return v;throw new Error("`".concat(o,"` was specified but was not a node, or did not return a node"))}var k=v;if(typeof v=="string"){try{k=a.querySelector(v)}catch(S){throw new Error("`".concat(o,'` appears to be an invalid selector; error="').concat(S.message,'"'))}if(!k&&!g)throw new Error("`".concat(o,"` as selector refers to no known node"))}return k},D=function(){var o=O("initialFocus",{hasFallback:!0});if(o===!1)return!1;if(o===void 0||o&&!ee(o,l.tabbableOptions))if(E(a.activeElement)>=0)o=a.activeElement;else{var i=n.tabbableGroups[0],f=i&&i.firstTabbableNode;o=f||O("fallbackFocus")}else o===null&&(o=O("fallbackFocus"));if(!o)throw new Error("Your focus-trap needs to have at least one focusable element");return o},x=function(){if(n.containerGroups=n.containers.map(function(o){var i=Se(o,l.tabbableOptions),f=Fe(o,l.tabbableOptions),g=i.length>0?i[0]:void 0,h=i.length>0?i[i.length-1]:void 0,T=f.find(function(S){return W(S)}),v=f.slice().reverse().find(function(S){return W(S)}),k=!!i.find(function(S){return V(S)>0});return{container:o,tabbableNodes:i,focusableNodes:f,posTabIndexesFound:k,firstTabbableNode:g,lastTabbableNode:h,firstDomTabbableNode:T,lastDomTabbableNode:v,nextTabbableNode:function(P){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,I=i.indexOf(P);return I<0?M?f.slice(f.indexOf(P)+1).find(function(U){return W(U)}):f.slice(0,f.indexOf(P)).reverse().find(function(U){return W(U)}):i[I+(M?1:-1)]}}}),n.tabbableGroups=n.containerGroups.filter(function(o){return o.tabbableNodes.length>0}),n.tabbableGroups.length<=0&&!O("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(n.containerGroups.find(function(o){return o.posTabIndexesFound})&&n.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},A=function(o){var i=o.activeElement;if(i)return i.shadowRoot&&i.shadowRoot.activeElement!==null?A(i.shadowRoot):i},N=function(o){if(o!==!1&&o!==A(document)){if(!o||!o.focus){N(D());return}o.focus({preventScroll:!!l.preventScroll}),n.mostRecentlyFocusedNode=o,tt(o)&&o.select()}},_=function(o){var i=O("setReturnFocus",{params:[o]});return i||(i===!1?!1:o)},C=function(o){var i=o.target,f=o.event,g=o.isBackward,h=g===void 0?!1:g;i=i||Q(f),x();var T=null;if(n.tabbableGroups.length>0){var v=E(i,f),k=v>=0?n.containerGroups[v]:void 0;if(v<0)h?T=n.tabbableGroups[n.tabbableGroups.length-1].lastTabbableNode:T=n.tabbableGroups[0].firstTabbableNode;else if(h){var S=n.tabbableGroups.findIndex(function(oe){var ue=oe.firstTabbableNode;return i===ue});if(S<0&&(k.container===i||ee(i,l.tabbableOptions)&&!W(i,l.tabbableOptions)&&!k.nextTabbableNode(i,!1))&&(S=v),S>=0){var P=S===0?n.tabbableGroups.length-1:S-1,M=n.tabbableGroups[P];T=V(i)>=0?M.lastTabbableNode:M.lastDomTabbableNode}else X(f)||(T=k.nextTabbableNode(i,!1))}else{var I=n.tabbableGroups.findIndex(function(oe){var ue=oe.lastTabbableNode;return i===ue});if(I<0&&(k.container===i||ee(i,l.tabbableOptions)&&!W(i,l.tabbableOptions)&&!k.nextTabbableNode(i))&&(I=v),I>=0){var U=I===n.tabbableGroups.length-1?0:I+1,q=n.tabbableGroups[U];T=V(i)>=0?q.firstTabbableNode:q.firstDomTabbableNode}else X(f)||(T=k.nextTabbableNode(i))}}else T=O("fallbackFocus");return T},L=function(o){var i=Q(o);if(!(E(i,o)>=0)){if(Z(l.clickOutsideDeactivates,o)){p.deactivate({returnFocus:l.returnFocusOnDeactivate});return}Z(l.allowOutsideClick,o)||o.preventDefault()}},$=function(o){var i=Q(o),f=E(i,o)>=0;if(f||i instanceof Document)f&&(n.mostRecentlyFocusedNode=i);else{o.stopImmediatePropagation();var g,h=!0;if(n.mostRecentlyFocusedNode)if(V(n.mostRecentlyFocusedNode)>0){var T=E(n.mostRecentlyFocusedNode),v=n.containerGroups[T].tabbableNodes;if(v.length>0){var k=v.findIndex(function(S){return S===n.mostRecentlyFocusedNode});k>=0&&(l.isKeyForward(n.recentNavEvent)?k+1<v.length&&(g=v[k+1],h=!1):k-1>=0&&(g=v[k-1],h=!1))}}else n.containerGroups.some(function(S){return S.tabbableNodes.some(function(P){return V(P)>0})})||(h=!1);else h=!1;h&&(g=C({target:n.mostRecentlyFocusedNode,isBackward:l.isKeyBackward(n.recentNavEvent)})),N(g||n.mostRecentlyFocusedNode||D())}n.recentNavEvent=void 0},Y=function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n.recentNavEvent=o;var f=C({event:o,isBackward:i});f&&(X(o)&&o.preventDefault(),N(f))},G=function(o){(l.isKeyForward(o)||l.isKeyBackward(o))&&Y(o,l.isKeyBackward(o))},H=function(o){rt(o)&&Z(l.escapeDeactivates,o)!==!1&&(o.preventDefault(),p.deactivate())},K=function(o){var i=Q(o);E(i,o)>=0||Z(l.clickOutsideDeactivates,o)||Z(l.allowOutsideClick,o)||(o.preventDefault(),o.stopImmediatePropagation())},d=function(){if(n.active)return B.activateTrap(u,p),n.delayInitialFocusTimer=l.delayInitialFocus?be(function(){N(D())}):N(D()),a.addEventListener("focusin",$,!0),a.addEventListener("mousedown",L,{capture:!0,passive:!1}),a.addEventListener("touchstart",L,{capture:!0,passive:!1}),a.addEventListener("click",K,{capture:!0,passive:!1}),a.addEventListener("keydown",G,{capture:!0,passive:!1}),a.addEventListener("keydown",H),p},s=function(o){n.active&&!n.paused&&p._setSubtreeIsolation(!1),n.adjacentElements.clear(),n.alreadySilent.clear();var i=new Set,f=new Set,g=de(o),h;try{for(g.s();!(h=g.n()).done;){var T=h.value;i.add(T);for(var v=typeof ShadowRoot<"u"&&T.getRootNode()instanceof ShadowRoot,k=T;k;){i.add(k);var S=k.parentElement,P=[];S?P=S.children:!S&&v&&(P=k.getRootNode().children,S=k.getRootNode().host,v=typeof ShadowRoot<"u"&&S.getRootNode()instanceof ShadowRoot);var M=de(P),I;try{for(M.s();!(I=M.n()).done;){var U=I.value;f.add(U)}}catch(q){M.e(q)}finally{M.f()}k=S}}}catch(q){g.e(q)}finally{g.f()}i.forEach(function(q){f.delete(q)}),n.adjacentElements=f},m=function(){if(n.active)return a.removeEventListener("focusin",$,!0),a.removeEventListener("mousedown",L,!0),a.removeEventListener("touchstart",L,!0),a.removeEventListener("click",K,!0),a.removeEventListener("keydown",G,!0),a.removeEventListener("keydown",H),p},c=function(o){var i=o.some(function(f){var g=Array.from(f.removedNodes);return g.some(function(h){return h===n.mostRecentlyFocusedNode})});i&&N(D())},w=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(c):void 0,R=function(){w&&(w.disconnect(),n.active&&!n.paused&&n.containers.map(function(o){w.observe(o,{subtree:!0,childList:!0})}))};return p={get active(){return n.active},get paused(){return n.paused},activate:function(o){if(n.active)return this;var i=y(o,"onActivate"),f=y(o,"onPostActivate"),g=y(o,"checkCanFocusTrap"),h=B.getActiveTrap(u),T=!1;if(h&&!h.paused){var v;(v=h._setSubtreeIsolation)===null||v===void 0||v.call(h,!1),T=!0}try{g||x(),n.active=!0,n.paused=!1,n.nodeFocusedBeforeActivation=A(a),i==null||i();var k=function(){g&&x(),d(),R(),l.isolateSubtrees&&p._setSubtreeIsolation(!0),f==null||f()};if(g)return g(n.containers.concat()).then(k,k),this;k()}catch(P){if(h===B.getActiveTrap(u)&&T){var S;(S=h._setSubtreeIsolation)===null||S===void 0||S.call(h,!0)}throw P}return this},deactivate:function(o){if(!n.active)return this;var i=pe({onDeactivate:l.onDeactivate,onPostDeactivate:l.onPostDeactivate,checkCanReturnFocus:l.checkCanReturnFocus},o);clearTimeout(n.delayInitialFocusTimer),n.delayInitialFocusTimer=void 0,n.paused||p._setSubtreeIsolation(!1),n.alreadySilent.clear(),m(),n.active=!1,n.paused=!1,R(),B.deactivateTrap(u,p);var f=y(i,"onDeactivate"),g=y(i,"onPostDeactivate"),h=y(i,"checkCanReturnFocus"),T=y(i,"returnFocus","returnFocusOnDeactivate");f==null||f();var v=function(){be(function(){T&&N(_(n.nodeFocusedBeforeActivation)),g==null||g()})};return T&&h?(h(_(n.nodeFocusedBeforeActivation)).then(v,v),this):(v(),this)},pause:function(o){return n.active?(n.manuallyPaused=!0,this._setPausedState(!0,o)):this},unpause:function(o){return n.active?(n.manuallyPaused=!1,u[u.length-1]!==this?this:this._setPausedState(!1,o)):this},updateContainerElements:function(o){var i=[].concat(o).filter(Boolean);return n.containers=i.map(function(f){return typeof f=="string"?a.querySelector(f):f}),l.isolateSubtrees&&s(n.containers),n.active&&(x(),l.isolateSubtrees&&!n.paused&&p._setSubtreeIsolation(!0)),R(),this}},Object.defineProperties(p,{_isManuallyPaused:{value:function(){return n.manuallyPaused}},_setPausedState:{value:function(o,i){if(n.paused===o)return this;if(n.paused=o,o){var f=y(i,"onPause"),g=y(i,"onPostPause");f==null||f(),m(),R(),p._setSubtreeIsolation(!1),g==null||g()}else{var h=y(i,"onUnpause"),T=y(i,"onPostUnpause");h==null||h(),p._setSubtreeIsolation(!0),x(),d(),R(),T==null||T()}return this}},_setSubtreeIsolation:{value:function(o){l.isolateSubtrees&&n.adjacentElements.forEach(function(i){var f;if(o)switch(l.isolateSubtrees){case"aria-hidden":(i.ariaHidden==="true"||((f=i.getAttribute("aria-hidden"))===null||f===void 0?void 0:f.toLowerCase())==="true")&&n.alreadySilent.add(i),i.setAttribute("aria-hidden","true");break;default:(i.inert||i.hasAttribute("inert"))&&n.alreadySilent.add(i),i.setAttribute("inert",!0);break}else if(!n.alreadySilent.has(i))switch(l.isolateSubtrees){case"aria-hidden":i.removeAttribute("aria-hidden");break;default:i.removeAttribute("inert");break}})}}}),p.updateContainerElements(e),p};const ut=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:ot},Symbol.toStringTag,{value:"Module"})),st=ye(ut),ct=ye(ze);var he;function lt(){if(he)return J.exports;he=1;function r(d){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},r(d)}var e,t;function a(d,s){if(!(d instanceof s))throw new TypeError("Cannot call a class as a function")}function u(d,s){for(var m=0;m<s.length;m++){var c=s[m];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(d,N(c.key),c)}}function l(d,s,m){return s&&u(d.prototype,s),Object.defineProperty(d,"prototype",{writable:!1}),d}function n(d,s,m){return s=O(s),p(d,E()?Reflect.construct(s,m||[],O(d).constructor):s.apply(d,m))}function p(d,s){if(s&&(r(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(d)}function y(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function E(){try{var d=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(E=function(){return!!d})()}function O(d){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},O(d)}function D(d,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(s&&s.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),Object.defineProperty(d,"prototype",{writable:!1}),s&&x(d,s)}function x(d,s){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,c){return m.__proto__=c,m},x(d,s)}function A(d,s,m){return(s=N(s))in d?Object.defineProperty(d,s,{value:m,enumerable:!0,configurable:!0,writable:!0}):d[s]=m,d}function N(d){var s=_(d,"string");return r(s)=="symbol"?s:s+""}function _(d,s){if(r(d)!="object"||!d)return d;var m=d[Symbol.toPrimitive];if(m!==void 0){var c=m.call(d,s);if(r(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(d)}var C=F,L=st,$=L.createFocusTrap,Y=ct,G=Y.isFocusable,H=parseInt((e=(t=/^(\d+)\./.exec(C.version))===null||t===void 0?void 0:t[1])!==null&&e!==void 0?e:0,10),K=(function(d){function s(m){var c;a(this,s),c=n(this,s,[m]),A(c,"getNodeForOption",function(b){var o,i=(o=this.internalOptions[b])!==null&&o!==void 0?o:this.originalOptions[b];if(typeof i=="function"){for(var f=arguments.length,g=new Array(f>1?f-1:0),h=1;h<f;h++)g[h-1]=arguments[h];i=i.apply(void 0,g)}if(i===!0&&(i=void 0),!i){if(i===void 0||i===!1)return i;throw new Error("`".concat(b,"` was specified but was not a node, or did not return a node"))}var T=i;if(typeof i=="string"){var v;if(T=(v=this.getDocument())===null||v===void 0?void 0:v.querySelector(i),!T)throw new Error("`".concat(b,"` as selector refers to no known node"))}return T}),c.handleDeactivate=c.handleDeactivate.bind(c),c.handlePostDeactivate=c.handlePostDeactivate.bind(c),c.handleClickOutsideDeactivates=c.handleClickOutsideDeactivates.bind(c),c.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:c.handleDeactivate,onPostDeactivate:c.handlePostDeactivate,clickOutsideDeactivates:c.handleClickOutsideDeactivates},c.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var w=m.focusTrapOptions;for(var R in w)if(Object.prototype.hasOwnProperty.call(w,R)){if(R==="returnFocusOnDeactivate"||R==="onDeactivate"||R==="onPostDeactivate"||R==="checkCanReturnFocus"||R==="clickOutsideDeactivates"){c.originalOptions[R]=w[R];continue}c.internalOptions[R]=w[R]}return c.outsideClick=null,c.focusTrapElements=m.containerElements||[],c.updatePreviousElement(),c}return D(s,d),l(s,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document<"u"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var c=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return c||(c===!1?!1:this.previouslyFocusedElement)}},{key:"updatePreviousElement",value:function(){var c=this.getDocument();c&&(this.previouslyFocusedElement=c.activeElement)}},{key:"deactivateTrap",value:function(){!this.focusTrap||!this.focusTrap.active||this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(c){var w=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,c):this.originalOptions.clickOutsideDeactivates;return w&&(this.outsideClick={target:c.target,allowDeactivation:w}),w}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var c=this,w=function(){var b=c.getReturnFocusNode(),o=!!(c.originalOptions.returnFocusOnDeactivate&&b!==null&&b!==void 0&&b.focus&&(!c.outsideClick||c.outsideClick.allowDeactivation&&!G(c.outsideClick.target,c.internalOptions.tabbableOptions))),i=c.internalOptions.preventScroll,f=i===void 0?!1:i;o&&b.focus({preventScroll:f}),c.originalOptions.onPostDeactivate&&c.originalOptions.onPostDeactivate.call(null),c.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(w,w):w()}},{key:"setupFocusTrap",value:function(){if(this.focusTrap)this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause());else{var c=this.focusTrapElements.some(Boolean);c&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(c){if(this.focusTrap){c.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var w=!c.active&&this.props.active,R=c.active&&!this.props.active,b=!c.paused&&this.props.paused,o=c.paused&&!this.props.paused;if(w&&(this.updatePreviousElement(),this.focusTrap.activate()),R){this.deactivateTrap();return}b&&this.focusTrap.pause(),o&&this.focusTrap.unpause()}else c.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var c=this,w=this.props.children?C.Children.only(this.props.children):void 0;if(w){if(w.type&&w.type===C.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");var R=function(i){var f=c.props.containerElements;w&&(H>=19?typeof w.props.ref=="function"?w.props.ref(i):w.props.ref&&(w.props.ref.current=i):typeof w.ref=="function"?w.ref(i):w.ref&&(w.ref.current=i)),c.focusTrapElements=f||[i]},b=C.cloneElement(w,{ref:R});return b}return null}}])})(C.Component);return K.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:$},J.exports=K,J.exports.FocusTrap=K,J.exports}var ft=lt();const Re=F.createContext({isVisible:!1}),{Provider:dt}=Re;function De(){return F.useContext(Re)}function vt(){const{close:r}=De(),e=F.useCallback(()=>{r==null||r()},[r]);return j.jsxRuntimeExports.jsxs(j.jsxRuntimeExports.Fragment,{children:[j.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2543813221"}),j.jsxRuntimeExports.jsx("div",{className:"kakadu-components-840864829",children:j.jsxRuntimeExports.jsx(je.default,{icon:xe.IconType.times,label:"Close",className:"kakadu-components-3855719072",onClick:e})})]})}function pt({root:r,maxWidth:e,className:t,isVisible:a,isFullWidth:u=!1,shouldCloseOnOutsideClick:l=!0,shouldCloseOnEscapePress:n=!0,showCloseButton:p=!0,onClose:y,children:E}){const O=F.useRef(null),D=F.useRef(null),[x,A]=F.useState(!1),[N,_]=F.useState(!1),C=F.useCallback(s=>{O.current=s,_(!1)},[]),L=F.useRef(null),$=F.useCallback(s=>{s&&(L.current=s)},[]),[Y,G]=F.useState(a??!1),H=F.useMemo(()=>({isVisible:Y,setInitialFocus:$,close:C}),[Y,$,C]);F.useEffect(()=>{a&&(A(!0),G(!0))},[a]),F.useEffect(()=>{if(a){const s=setTimeout(()=>{_(!0)},100);return()=>{clearTimeout(s)}}_(!1)},[a]),F.useEffect(()=>{if(x&&!N){const s=setTimeout(()=>{y==null||y(O.current??void 0),G(!1)},370);return()=>{clearTimeout(s)}}},[x,N,y]),F.useEffect(()=>{const s=D.current;if(a&&l&&s){const m=c=>{s===c.target&&_(!1)};return s.addEventListener("click",m),()=>{s.removeEventListener("click",m)}}},[a,l]),F.useEffect(()=>{if(!a||!n)return;const s=m=>{m.key==="Escape"&&_(!1)};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[a,n]);const K=F.useMemo(()=>({initialFocus:()=>L.current??void 0,onActivate:()=>{var s;return(s=L.current)==null?void 0:s.focus()}}),[]),d=j.jsxRuntimeExports.jsx("div",{style:{"--max-width":e?`${e}px`:void 0},className:le.cx(r?Pe.default:void 0,"kakadu-components-2807459246",N&&"kakadu-components-1399012551",t),children:j.jsxRuntimeExports.jsx(ft.FocusTrap,{active:N,focusTrapOptions:K,children:j.jsxRuntimeExports.jsx("div",{ref:D,className:"kakadu-components-3521538255",children:j.jsxRuntimeExports.jsx("div",{className:le.cx("kakadu-components-1982320206",u&&"kakadu-components-3904045733",N&&"kakadu-components-3829535111"),children:j.jsxRuntimeExports.jsxs(dt,{value:H,children:[p?j.jsxRuntimeExports.jsx(vt,{}):null,j.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2617708556",children:E})]})})})})});return r?Ne.createPortal(d,r):d}function bt(r,e){const[t,a]=F.useState(!1),u=F.useRef(void 0),l=F.useCallback(async()=>(a(!0),new Promise(y=>{u.current=y})),[]),n=F.useCallback(y=>{var E;a(!1),(E=u.current)==null||E.call(u,y),u.current=void 0},[]),p=F.useMemo(()=>j.jsxRuntimeExports.jsx(r,{...e,isVisible:t,onClose:n}),[r,e,t,n]);return F.useMemo(()=>({isVisible:t,show:l,modal:p}),[t,l,p])}exports.default=pt;exports.useModal=bt;exports.useModalContext=De;
|
|
9
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ve(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),t.push.apply(t,a)}return t}function pe(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ve(Object(t),!0).forEach(function(a){He(r,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ve(Object(t)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(t,a))})}return r}function Je(r){return Ye(r)||Ze(r)||Oe(r)||Xe()}function Qe(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function et(r){var e=Qe(r,"string");return typeof e=="symbol"?e:e+""}function Oe(r,e){if(r){if(typeof r=="string")return ce(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ce(r,e):void 0}}var B={getActiveTrap:function(e){return(e==null?void 0:e.length)>0?e[e.length-1]:null},activateTrap:function(e,t){var a=B.getActiveTrap(e);t!==a&&B.pauseTrap(e);var u=e.indexOf(t);u===-1||e.splice(u,1),e.push(t)},deactivateTrap:function(e,t){var a=e.indexOf(t);a!==-1&&e.splice(a,1),B.unpauseTrap(e)},pauseTrap:function(e){var t=B.getActiveTrap(e);t==null||t._setPausedState(!0)},unpauseTrap:function(e){var t=B.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},tt=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},rt=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},X=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},at=function(e){return X(e)&&!e.shiftKey},nt=function(e){return X(e)&&e.shiftKey},be=function(e){return setTimeout(e,0)},Z=function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),u=1;u<t;u++)a[u-1]=arguments[u];return typeof e=="function"?e.apply(void 0,a):e},Q=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},it=[],ot=function(e,t){var a=(t==null?void 0:t.document)||document,u=(t==null?void 0:t.trapStack)||it,l=pe({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:at,isKeyBackward:nt},t),n={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},p,y=function(o,i,f){return o&&o[i]!==void 0?o[i]:l[f||i]},E=function(o,i){var f=typeof(i==null?void 0:i.composedPath)=="function"?i.composedPath():void 0;return n.containerGroups.findIndex(function(g){var h=g.container,T=g.tabbableNodes;return h.contains(o)||(f==null?void 0:f.includes(h))||T.find(function(v){return v===o})})},O=function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=i.hasFallback,g=f===void 0?!1:f,h=i.params,T=h===void 0?[]:h,v=l[o];if(typeof v=="function"&&(v=v.apply(void 0,Je(T))),v===!0&&(v=void 0),!v){if(v===void 0||v===!1)return v;throw new Error("`".concat(o,"` was specified but was not a node, or did not return a node"))}var k=v;if(typeof v=="string"){try{k=a.querySelector(v)}catch(S){throw new Error("`".concat(o,'` appears to be an invalid selector; error="').concat(S.message,'"'))}if(!k&&!g)throw new Error("`".concat(o,"` as selector refers to no known node"))}return k},D=function(){var o=O("initialFocus",{hasFallback:!0});if(o===!1)return!1;if(o===void 0||o&&!ee(o,l.tabbableOptions))if(E(a.activeElement)>=0)o=a.activeElement;else{var i=n.tabbableGroups[0],f=i&&i.firstTabbableNode;o=f||O("fallbackFocus")}else o===null&&(o=O("fallbackFocus"));if(!o)throw new Error("Your focus-trap needs to have at least one focusable element");return o},x=function(){if(n.containerGroups=n.containers.map(function(o){var i=Se(o,l.tabbableOptions),f=Fe(o,l.tabbableOptions),g=i.length>0?i[0]:void 0,h=i.length>0?i[i.length-1]:void 0,T=f.find(function(S){return W(S)}),v=f.slice().reverse().find(function(S){return W(S)}),k=!!i.find(function(S){return V(S)>0});return{container:o,tabbableNodes:i,focusableNodes:f,posTabIndexesFound:k,firstTabbableNode:g,lastTabbableNode:h,firstDomTabbableNode:T,lastDomTabbableNode:v,nextTabbableNode:function(P){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,I=i.indexOf(P);return I<0?M?f.slice(f.indexOf(P)+1).find(function(U){return W(U)}):f.slice(0,f.indexOf(P)).reverse().find(function(U){return W(U)}):i[I+(M?1:-1)]}}}),n.tabbableGroups=n.containerGroups.filter(function(o){return o.tabbableNodes.length>0}),n.tabbableGroups.length<=0&&!O("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(n.containerGroups.find(function(o){return o.posTabIndexesFound})&&n.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},A=function(o){var i=o.activeElement;if(i)return i.shadowRoot&&i.shadowRoot.activeElement!==null?A(i.shadowRoot):i},N=function(o){if(o!==!1&&o!==A(document)){if(!o||!o.focus){N(D());return}o.focus({preventScroll:!!l.preventScroll}),n.mostRecentlyFocusedNode=o,tt(o)&&o.select()}},_=function(o){var i=O("setReturnFocus",{params:[o]});return i||(i===!1?!1:o)},C=function(o){var i=o.target,f=o.event,g=o.isBackward,h=g===void 0?!1:g;i=i||Q(f),x();var T=null;if(n.tabbableGroups.length>0){var v=E(i,f),k=v>=0?n.containerGroups[v]:void 0;if(v<0)h?T=n.tabbableGroups[n.tabbableGroups.length-1].lastTabbableNode:T=n.tabbableGroups[0].firstTabbableNode;else if(h){var S=n.tabbableGroups.findIndex(function(oe){var ue=oe.firstTabbableNode;return i===ue});if(S<0&&(k.container===i||ee(i,l.tabbableOptions)&&!W(i,l.tabbableOptions)&&!k.nextTabbableNode(i,!1))&&(S=v),S>=0){var P=S===0?n.tabbableGroups.length-1:S-1,M=n.tabbableGroups[P];T=V(i)>=0?M.lastTabbableNode:M.lastDomTabbableNode}else X(f)||(T=k.nextTabbableNode(i,!1))}else{var I=n.tabbableGroups.findIndex(function(oe){var ue=oe.lastTabbableNode;return i===ue});if(I<0&&(k.container===i||ee(i,l.tabbableOptions)&&!W(i,l.tabbableOptions)&&!k.nextTabbableNode(i))&&(I=v),I>=0){var U=I===n.tabbableGroups.length-1?0:I+1,q=n.tabbableGroups[U];T=V(i)>=0?q.firstTabbableNode:q.firstDomTabbableNode}else X(f)||(T=k.nextTabbableNode(i))}}else T=O("fallbackFocus");return T},L=function(o){var i=Q(o);if(!(E(i,o)>=0)){if(Z(l.clickOutsideDeactivates,o)){p.deactivate({returnFocus:l.returnFocusOnDeactivate});return}Z(l.allowOutsideClick,o)||o.preventDefault()}},$=function(o){var i=Q(o),f=E(i,o)>=0;if(f||i instanceof Document)f&&(n.mostRecentlyFocusedNode=i);else{o.stopImmediatePropagation();var g,h=!0;if(n.mostRecentlyFocusedNode)if(V(n.mostRecentlyFocusedNode)>0){var T=E(n.mostRecentlyFocusedNode),v=n.containerGroups[T].tabbableNodes;if(v.length>0){var k=v.findIndex(function(S){return S===n.mostRecentlyFocusedNode});k>=0&&(l.isKeyForward(n.recentNavEvent)?k+1<v.length&&(g=v[k+1],h=!1):k-1>=0&&(g=v[k-1],h=!1))}}else n.containerGroups.some(function(S){return S.tabbableNodes.some(function(P){return V(P)>0})})||(h=!1);else h=!1;h&&(g=C({target:n.mostRecentlyFocusedNode,isBackward:l.isKeyBackward(n.recentNavEvent)})),N(g||n.mostRecentlyFocusedNode||D())}n.recentNavEvent=void 0},Y=function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n.recentNavEvent=o;var f=C({event:o,isBackward:i});f&&(X(o)&&o.preventDefault(),N(f))},G=function(o){(l.isKeyForward(o)||l.isKeyBackward(o))&&Y(o,l.isKeyBackward(o))},H=function(o){rt(o)&&Z(l.escapeDeactivates,o)!==!1&&(o.preventDefault(),p.deactivate())},K=function(o){var i=Q(o);E(i,o)>=0||Z(l.clickOutsideDeactivates,o)||Z(l.allowOutsideClick,o)||(o.preventDefault(),o.stopImmediatePropagation())},d=function(){if(n.active)return B.activateTrap(u,p),n.delayInitialFocusTimer=l.delayInitialFocus?be(function(){N(D())}):N(D()),a.addEventListener("focusin",$,!0),a.addEventListener("mousedown",L,{capture:!0,passive:!1}),a.addEventListener("touchstart",L,{capture:!0,passive:!1}),a.addEventListener("click",K,{capture:!0,passive:!1}),a.addEventListener("keydown",G,{capture:!0,passive:!1}),a.addEventListener("keydown",H),p},s=function(o){n.active&&!n.paused&&p._setSubtreeIsolation(!1),n.adjacentElements.clear(),n.alreadySilent.clear();var i=new Set,f=new Set,g=de(o),h;try{for(g.s();!(h=g.n()).done;){var T=h.value;i.add(T);for(var v=typeof ShadowRoot<"u"&&T.getRootNode()instanceof ShadowRoot,k=T;k;){i.add(k);var S=k.parentElement,P=[];S?P=S.children:!S&&v&&(P=k.getRootNode().children,S=k.getRootNode().host,v=typeof ShadowRoot<"u"&&S.getRootNode()instanceof ShadowRoot);var M=de(P),I;try{for(M.s();!(I=M.n()).done;){var U=I.value;f.add(U)}}catch(q){M.e(q)}finally{M.f()}k=S}}}catch(q){g.e(q)}finally{g.f()}i.forEach(function(q){f.delete(q)}),n.adjacentElements=f},m=function(){if(n.active)return a.removeEventListener("focusin",$,!0),a.removeEventListener("mousedown",L,!0),a.removeEventListener("touchstart",L,!0),a.removeEventListener("click",K,!0),a.removeEventListener("keydown",G,!0),a.removeEventListener("keydown",H),p},c=function(o){var i=o.some(function(f){var g=Array.from(f.removedNodes);return g.some(function(h){return h===n.mostRecentlyFocusedNode})});i&&N(D())},w=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(c):void 0,R=function(){w&&(w.disconnect(),n.active&&!n.paused&&n.containers.map(function(o){w.observe(o,{subtree:!0,childList:!0})}))};return p={get active(){return n.active},get paused(){return n.paused},activate:function(o){if(n.active)return this;var i=y(o,"onActivate"),f=y(o,"onPostActivate"),g=y(o,"checkCanFocusTrap"),h=B.getActiveTrap(u),T=!1;if(h&&!h.paused){var v;(v=h._setSubtreeIsolation)===null||v===void 0||v.call(h,!1),T=!0}try{g||x(),n.active=!0,n.paused=!1,n.nodeFocusedBeforeActivation=A(a),i==null||i();var k=function(){g&&x(),d(),R(),l.isolateSubtrees&&p._setSubtreeIsolation(!0),f==null||f()};if(g)return g(n.containers.concat()).then(k,k),this;k()}catch(P){if(h===B.getActiveTrap(u)&&T){var S;(S=h._setSubtreeIsolation)===null||S===void 0||S.call(h,!0)}throw P}return this},deactivate:function(o){if(!n.active)return this;var i=pe({onDeactivate:l.onDeactivate,onPostDeactivate:l.onPostDeactivate,checkCanReturnFocus:l.checkCanReturnFocus},o);clearTimeout(n.delayInitialFocusTimer),n.delayInitialFocusTimer=void 0,n.paused||p._setSubtreeIsolation(!1),n.alreadySilent.clear(),m(),n.active=!1,n.paused=!1,R(),B.deactivateTrap(u,p);var f=y(i,"onDeactivate"),g=y(i,"onPostDeactivate"),h=y(i,"checkCanReturnFocus"),T=y(i,"returnFocus","returnFocusOnDeactivate");f==null||f();var v=function(){be(function(){T&&N(_(n.nodeFocusedBeforeActivation)),g==null||g()})};return T&&h?(h(_(n.nodeFocusedBeforeActivation)).then(v,v),this):(v(),this)},pause:function(o){return n.active?(n.manuallyPaused=!0,this._setPausedState(!0,o)):this},unpause:function(o){return n.active?(n.manuallyPaused=!1,u[u.length-1]!==this?this:this._setPausedState(!1,o)):this},updateContainerElements:function(o){var i=[].concat(o).filter(Boolean);return n.containers=i.map(function(f){return typeof f=="string"?a.querySelector(f):f}),l.isolateSubtrees&&s(n.containers),n.active&&(x(),l.isolateSubtrees&&!n.paused&&p._setSubtreeIsolation(!0)),R(),this}},Object.defineProperties(p,{_isManuallyPaused:{value:function(){return n.manuallyPaused}},_setPausedState:{value:function(o,i){if(n.paused===o)return this;if(n.paused=o,o){var f=y(i,"onPause"),g=y(i,"onPostPause");f==null||f(),m(),R(),p._setSubtreeIsolation(!1),g==null||g()}else{var h=y(i,"onUnpause"),T=y(i,"onPostUnpause");h==null||h(),p._setSubtreeIsolation(!0),x(),d(),R(),T==null||T()}return this}},_setSubtreeIsolation:{value:function(o){l.isolateSubtrees&&n.adjacentElements.forEach(function(i){var f;if(o)switch(l.isolateSubtrees){case"aria-hidden":(i.ariaHidden==="true"||((f=i.getAttribute("aria-hidden"))===null||f===void 0?void 0:f.toLowerCase())==="true")&&n.alreadySilent.add(i),i.setAttribute("aria-hidden","true");break;default:(i.inert||i.hasAttribute("inert"))&&n.alreadySilent.add(i),i.setAttribute("inert",!0);break}else if(!n.alreadySilent.has(i))switch(l.isolateSubtrees){case"aria-hidden":i.removeAttribute("aria-hidden");break;default:i.removeAttribute("inert");break}})}}}),p.updateContainerElements(e),p};const ut=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:ot},Symbol.toStringTag,{value:"Module"})),st=ye(ut),ct=ye(ze);var he;function lt(){if(he)return J.exports;he=1;function r(d){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},r(d)}var e,t;function a(d,s){if(!(d instanceof s))throw new TypeError("Cannot call a class as a function")}function u(d,s){for(var m=0;m<s.length;m++){var c=s[m];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(d,N(c.key),c)}}function l(d,s,m){return s&&u(d.prototype,s),Object.defineProperty(d,"prototype",{writable:!1}),d}function n(d,s,m){return s=O(s),p(d,E()?Reflect.construct(s,m||[],O(d).constructor):s.apply(d,m))}function p(d,s){if(s&&(r(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(d)}function y(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function E(){try{var d=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(E=function(){return!!d})()}function O(d){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},O(d)}function D(d,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(s&&s.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),Object.defineProperty(d,"prototype",{writable:!1}),s&&x(d,s)}function x(d,s){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,c){return m.__proto__=c,m},x(d,s)}function A(d,s,m){return(s=N(s))in d?Object.defineProperty(d,s,{value:m,enumerable:!0,configurable:!0,writable:!0}):d[s]=m,d}function N(d){var s=_(d,"string");return r(s)=="symbol"?s:s+""}function _(d,s){if(r(d)!="object"||!d)return d;var m=d[Symbol.toPrimitive];if(m!==void 0){var c=m.call(d,s);if(r(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(d)}var C=F,L=st,$=L.createFocusTrap,Y=ct,G=Y.isFocusable,H=parseInt((e=(t=/^(\d+)\./.exec(C.version))===null||t===void 0?void 0:t[1])!==null&&e!==void 0?e:0,10),K=(function(d){function s(m){var c;a(this,s),c=n(this,s,[m]),A(c,"getNodeForOption",function(b){var o,i=(o=this.internalOptions[b])!==null&&o!==void 0?o:this.originalOptions[b];if(typeof i=="function"){for(var f=arguments.length,g=new Array(f>1?f-1:0),h=1;h<f;h++)g[h-1]=arguments[h];i=i.apply(void 0,g)}if(i===!0&&(i=void 0),!i){if(i===void 0||i===!1)return i;throw new Error("`".concat(b,"` was specified but was not a node, or did not return a node"))}var T=i;if(typeof i=="string"){var v;if(T=(v=this.getDocument())===null||v===void 0?void 0:v.querySelector(i),!T)throw new Error("`".concat(b,"` as selector refers to no known node"))}return T}),c.handleDeactivate=c.handleDeactivate.bind(c),c.handlePostDeactivate=c.handlePostDeactivate.bind(c),c.handleClickOutsideDeactivates=c.handleClickOutsideDeactivates.bind(c),c.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:c.handleDeactivate,onPostDeactivate:c.handlePostDeactivate,clickOutsideDeactivates:c.handleClickOutsideDeactivates},c.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var w=m.focusTrapOptions;for(var R in w)if(Object.prototype.hasOwnProperty.call(w,R)){if(R==="returnFocusOnDeactivate"||R==="onDeactivate"||R==="onPostDeactivate"||R==="checkCanReturnFocus"||R==="clickOutsideDeactivates"){c.originalOptions[R]=w[R];continue}c.internalOptions[R]=w[R]}return c.outsideClick=null,c.focusTrapElements=m.containerElements||[],c.updatePreviousElement(),c}return D(s,d),l(s,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document<"u"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var c=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return c||(c===!1?!1:this.previouslyFocusedElement)}},{key:"updatePreviousElement",value:function(){var c=this.getDocument();c&&(this.previouslyFocusedElement=c.activeElement)}},{key:"deactivateTrap",value:function(){!this.focusTrap||!this.focusTrap.active||this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(c){var w=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,c):this.originalOptions.clickOutsideDeactivates;return w&&(this.outsideClick={target:c.target,allowDeactivation:w}),w}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var c=this,w=function(){var b=c.getReturnFocusNode(),o=!!(c.originalOptions.returnFocusOnDeactivate&&b!==null&&b!==void 0&&b.focus&&(!c.outsideClick||c.outsideClick.allowDeactivation&&!G(c.outsideClick.target,c.internalOptions.tabbableOptions))),i=c.internalOptions.preventScroll,f=i===void 0?!1:i;o&&b.focus({preventScroll:f}),c.originalOptions.onPostDeactivate&&c.originalOptions.onPostDeactivate.call(null),c.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(w,w):w()}},{key:"setupFocusTrap",value:function(){if(this.focusTrap)this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause());else{var c=this.focusTrapElements.some(Boolean);c&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(c){if(this.focusTrap){c.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var w=!c.active&&this.props.active,R=c.active&&!this.props.active,b=!c.paused&&this.props.paused,o=c.paused&&!this.props.paused;if(w&&(this.updatePreviousElement(),this.focusTrap.activate()),R){this.deactivateTrap();return}b&&this.focusTrap.pause(),o&&this.focusTrap.unpause()}else c.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var c=this,w=this.props.children?C.Children.only(this.props.children):void 0;if(w){if(w.type&&w.type===C.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");var R=function(i){var f=c.props.containerElements;w&&(H>=19?typeof w.props.ref=="function"?w.props.ref(i):w.props.ref&&(w.props.ref.current=i):typeof w.ref=="function"?w.ref(i):w.ref&&(w.ref.current=i)),c.focusTrapElements=f||[i]},b=C.cloneElement(w,{ref:R});return b}return null}}])})(C.Component);return K.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:$},J.exports=K,J.exports.FocusTrap=K,J.exports}var ft=lt();const Re=F.createContext({isVisible:!1}),{Provider:dt}=Re;function De(){return F.useContext(Re)}function vt(){const{close:r}=De(),e=F.useCallback(()=>{r==null||r()},[r]);return j.jsxRuntimeExports.jsxs(j.jsxRuntimeExports.Fragment,{children:[j.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2543813221"}),j.jsxRuntimeExports.jsx("div",{className:"kakadu-components-840864829",children:j.jsxRuntimeExports.jsx(je.default,{iconLeft:xe.IconType.times,label:"Close",className:"kakadu-components-3855719072",onClick:e})})]})}function pt({root:r,maxWidth:e,className:t,isVisible:a,isFullWidth:u=!1,shouldCloseOnOutsideClick:l=!0,shouldCloseOnEscapePress:n=!0,showCloseButton:p=!0,onClose:y,children:E}){const O=F.useRef(null),D=F.useRef(null),[x,A]=F.useState(!1),[N,_]=F.useState(!1),C=F.useCallback(s=>{O.current=s,_(!1)},[]),L=F.useRef(null),$=F.useCallback(s=>{s&&(L.current=s)},[]),[Y,G]=F.useState(a??!1),H=F.useMemo(()=>({isVisible:Y,setInitialFocus:$,close:C}),[Y,$,C]);F.useEffect(()=>{a&&(A(!0),G(!0))},[a]),F.useEffect(()=>{if(a){const s=setTimeout(()=>{_(!0)},100);return()=>{clearTimeout(s)}}_(!1)},[a]),F.useEffect(()=>{if(x&&!N){const s=setTimeout(()=>{y==null||y(O.current??void 0),G(!1)},370);return()=>{clearTimeout(s)}}},[x,N,y]),F.useEffect(()=>{const s=D.current;if(a&&l&&s){const m=c=>{s===c.target&&_(!1)};return s.addEventListener("click",m),()=>{s.removeEventListener("click",m)}}},[a,l]),F.useEffect(()=>{if(!a||!n)return;const s=m=>{m.key==="Escape"&&_(!1)};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[a,n]);const K=F.useMemo(()=>({initialFocus:()=>L.current??void 0,onActivate:()=>{var s;return(s=L.current)==null?void 0:s.focus()}}),[]),d=j.jsxRuntimeExports.jsx("div",{style:{"--max-width":e?`${e}px`:void 0},className:le.cx(r?Pe.default:void 0,"kakadu-components-2807459246",N&&"kakadu-components-1399012551",t),children:j.jsxRuntimeExports.jsx(ft.FocusTrap,{active:N,focusTrapOptions:K,children:j.jsxRuntimeExports.jsx("div",{ref:D,className:"kakadu-components-3521538255",children:j.jsxRuntimeExports.jsx("div",{className:le.cx("kakadu-components-1982320206",u&&"kakadu-components-3904045733",N&&"kakadu-components-3829535111"),children:j.jsxRuntimeExports.jsxs(dt,{value:H,children:[p?j.jsxRuntimeExports.jsx(vt,{}):null,j.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2617708556",children:E})]})})})})});return r?Ne.createPortal(d,r):d}function bt(r,e){const[t,a]=F.useState(!1),u=F.useRef(void 0),l=F.useCallback(async()=>(a(!0),new Promise(y=>{u.current=y})),[]),n=F.useCallback(y=>{var E;a(!1),(E=u.current)==null||E.call(u,y),u.current=void 0},[]),p=F.useMemo(()=>j.jsxRuntimeExports.jsx(r,{...e,isVisible:t,onClose:n}),[r,e,t,n]);return F.useMemo(()=>({isVisible:t,show:l,modal:p}),[t,l,p])}exports.default=pt;exports.useModal=bt;exports.useModalContext=De;
|
|
@@ -1147,7 +1147,7 @@ function Tt() {
|
|
|
1147
1147
|
}, [r]);
|
|
1148
1148
|
return /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
1149
1149
|
/* @__PURE__ */ C.jsx("div", { className: "kakadu-components-2543813221" }),
|
|
1150
|
-
/* @__PURE__ */ C.jsx("div", { className: "kakadu-components-840864829", children: /* @__PURE__ */ C.jsx(Be, {
|
|
1150
|
+
/* @__PURE__ */ C.jsx("div", { className: "kakadu-components-840864829", children: /* @__PURE__ */ C.jsx(Be, { iconLeft: _e.times, label: "Close", className: "kakadu-components-3855719072", onClick: e }) })
|
|
1151
1151
|
] });
|
|
1152
1152
|
}
|
|
1153
1153
|
function Nt({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),o=require("@kuma-ui/core"),c=require("../icons/icon.js"),x=require("./text.js");var r=(s=>(s.default="default",s.success="success",s.warning="warning",s.danger="danger",s))(r||{});function p({type:s="default",icon:a,className:u,children:t,...d}){const i=s==="success",m=s==="warning",k=s==="danger",n=!!a,l=!!t;return e.jsxRuntimeExports.jsxs("aside",{...d,className:o.cx("kakadu-components-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),o=require("@kuma-ui/core"),c=require("../icons/icon.js"),x=require("./text.js");var r=(s=>(s.default="default",s.success="success",s.warning="warning",s.danger="danger",s))(r||{});function p({type:s="default",icon:a,className:u,children:t,...d}){const i=s==="success",m=s==="warning",k=s==="danger",n=!!a,l=!!t;return e.jsxRuntimeExports.jsxs("aside",{...d,className:o.cx("kakadu-components-925362255",n&&"kakadu-components-2945174293",i&&(n?"kakadu-components-2585123369":"kakadu-components-1387450724"),m&&(n?"kakadu-components-3502407303":"kakadu-components-1612824642"),k&&(n?"kakadu-components-314765189":"kakadu-components-4209515987"),u),children:[e.jsxRuntimeExports.jsx("div",{"data-theme":"dark",className:o.cx("kakadu-components-3327291559",n&&"kakadu-components-3906762683"),children:a&&e.jsxRuntimeExports.jsx(c.default,{width:14,height:14,type:a,className:c.iconShadowStyles})}),e.jsxRuntimeExports.jsx(x.Span,{className:"kakadu-components-1969958615",children:l?t:e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:" "})})]})}exports.NoticeType=r;exports.default=p;
|
|
@@ -11,8 +11,8 @@ function w({
|
|
|
11
11
|
...r
|
|
12
12
|
}) {
|
|
13
13
|
const d = a === "success", m = a === "warning", k = a === "danger", s = !!o, u = !!e;
|
|
14
|
-
return /* @__PURE__ */ n.jsxs("aside", { ...r, className: t("kakadu-components-
|
|
15
|
-
/* @__PURE__ */ n.jsx("div", { "data-theme": "dark", className: t("kakadu-components-3327291559", s && "kakadu-components-
|
|
14
|
+
return /* @__PURE__ */ n.jsxs("aside", { ...r, className: t("kakadu-components-925362255", s && "kakadu-components-2945174293", d && (s ? "kakadu-components-2585123369" : "kakadu-components-1387450724"), m && (s ? "kakadu-components-3502407303" : "kakadu-components-1612824642"), k && (s ? "kakadu-components-314765189" : "kakadu-components-4209515987"), c), children: [
|
|
15
|
+
/* @__PURE__ */ n.jsx("div", { "data-theme": "dark", className: t("kakadu-components-3327291559", s && "kakadu-components-3906762683"), children: o && /* @__PURE__ */ n.jsx(i, { width: 14, height: 14, type: o, className: l }) }),
|
|
16
16
|
/* @__PURE__ */ n.jsx(p, { className: "kakadu-components-1969958615", children: u ? e : /* @__PURE__ */ n.jsx(n.Fragment, { children: " " }) })
|
|
17
17
|
] });
|
|
18
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type HTMLProps } from 'react';
|
|
2
2
|
export default function Separator({ className, ...properties }: HTMLProps<HTMLHRElement>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare function SmallSeparator({ className, ...properties }: HTMLProps<HTMLHRElement>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare function SeparatorLabel({ label, ...properties }: {
|
|
4
|
+
export declare function SeparatorLabel({ label, className, ...properties }: {
|
|
5
5
|
readonly label: string;
|
|
6
6
|
} & HTMLProps<HTMLHRElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),s=require("@kuma-ui/core"),a=require("./flex.js"),u=require("./text.js");function n({className:t,...r}){return e.jsxRuntimeExports.jsx("hr",{...r,className:s.cx("kakadu-components-3910508072",t)})}function c({className:t,...r}){return e.jsxRuntimeExports.jsx("hr",{...r,className:s.cx("kakadu-components-3380219127",t)})}function x({label:t,className:r,...o}){return e.jsxRuntimeExports.jsxs(a.default,{gap:2,direction:"row",alignment:a.FlexAlignment.center,className:s.cx("kakadu-components-1250376591",r),children:[e.jsxRuntimeExports.jsx(n,{...o}),e.jsxRuntimeExports.jsx(u.Label,{children:t}),e.jsxRuntimeExports.jsx(n,{...o})]})}exports.SeparatorLabel=x;exports.SmallSeparator=c;exports.default=n;
|