@kakadu/components 1.7.13 → 1.7.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/button.js +1 -1
- package/build/components/button.mjs +6 -6
- package/build/components/card.js +1 -1
- package/build/components/card.mjs +12 -12
- package/build/components/datum.js +1 -1
- package/build/components/datum.mjs +7 -7
- package/build/components/icon-button.js +1 -1
- package/build/components/icon-button.mjs +3 -3
- package/build/components/input.js +2 -2
- package/build/components/input.mjs +39 -38
- 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 +6 -6
- package/build/components/text-button.js +1 -1
- package/build/components/text-button.mjs +1 -1
- package/build/icons/anchor-down.d.ts +2 -0
- package/build/icons/anchor-down.js +1 -0
- package/build/icons/anchor-down.mjs +34 -0
- package/build/icons/anchor-up.d.ts +2 -0
- package/build/icons/anchor-up.js +1 -0
- package/build/icons/anchor-up.mjs +24 -0
- package/build/icons/dots.js +1 -0
- package/build/icons/dots.mjs +25 -0
- package/build/icons/external.js +1 -0
- package/build/icons/external.mjs +24 -0
- package/build/icons/icon.d.ts +3 -0
- package/build/icons/icon.js +1 -1
- package/build/icons/icon.mjs +80 -29
- package/build/icons/select.js +1 -0
- package/build/icons/select.mjs +25 -0
- package/build/icons/share.js +1 -0
- package/build/icons/share.mjs +24 -0
- package/build/icons/sparkle.js +1 -0
- package/build/icons/sparkle.mjs +27 -0
- package/build/icons/trash.d.ts +2 -0
- package/build/icons/trash.js +1 -0
- package/build/icons/trash.mjs +24 -0
- package/build/icons/trend-up.js +1 -0
- package/build/icons/trend-up.mjs +48 -0
- package/build/index.d.ts +54 -36
- package/build/index.js +1 -1
- package/build/index.mjs +131 -113
- package/package.json +1 -1
- package/build/icon-B__SNDvD.js +0 -1
- package/build/icon-BscWXhKi.mjs +0 -220
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),D=require("react"),a=require("@kuma-ui/core"),T=require("../theme.js"),G=require("../icon
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),D=require("react"),a=require("@kuma-ui/core"),T=require("../theme.js"),G=require("../icons/icon.js"),z=require("./spinner.js"),I=require("./moving-gradients.js"),W=require("./moving-stars.js"),$=require("./theme-setter.js"),F=require("./click-ripples.js"),k=require("./hover-gradient.js"),O=require("./button-tooltip.js"),P=require("./aria-text.js"),A=require("./atom.js");var y=(s=>(s.primary="primary",s.secondary="secondary",s.warning="warning",s.danger="danger",s))(y||{});function j({icon:s,variant:n="primary",className:o,...r}){return e.jsxRuntimeExports.jsx("div",{...r,className:a.cx("kakadu-components-2658660333",n==="secondary"&&"kakadu-components-3469662110",o),children:typeof s=="string"?e.jsxRuntimeExports.jsx(G.default,{width:14,height:14,type:s}):s})}const R="kakadu-components-2244098950",C="kakadu-components-3923184173",S="kakadu-components-317965671",E="kakadu-components-1978976872";function H({type:s,variant:n="primary",href:o,target:r,rel:b,disabled:m,className:f,children:t,label:q,tooltip:i,tooltipPosition:g,iconLeft:u,iconRight:p,isLoading:c,hasMovingGradients:_=!1,movingGradientsCount:x=4,hasMovingStars:v=!1,movingStarsCount:l=10,...N}){const d=D.useRef(null),w=$.useIsDarkMode(d),M=s??"button",h=_&&x>0,B=v&&l>0;return e.jsxRuntimeExports.jsxs(A.default,{...N,as:o?"a":"button",type:o?void 0:M,href:o,target:r,rel:b,disabled:!!m||!!c,className:a.cx(T.effectStyles,"kakadu-components-1897763514",!!u&&"kakadu-components-3652831856",!t&&"kakadu-components-2746167644",n==="secondary"&&R,n==="warning"&&S,n==="danger"&&E,f),children:[u?e.jsxRuntimeExports.jsx(j,{variant:n,icon:u,className:t?"kakadu-components-294089230":void 0}):null,t?e.jsxRuntimeExports.jsx("div",{ref:d,className:"kakadu-components-2618257692",children:t}):e.jsxRuntimeExports.jsx(P.default,{children:q}),p?e.jsxRuntimeExports.jsx(j,{variant:n,icon:p,className:t?"kakadu-components-3127707672":void 0}):null,e.jsxRuntimeExports.jsx("div",{className:a.cx("kakadu-components-1029011626",c&&"kakadu-components-726496666"),children:e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-772420116",children:e.jsxRuntimeExports.jsx(z.RevealSpinner,{isVisible:c})})}),h&&e.jsxRuntimeExports.jsx(I.default,{opacity:w?.4:.3,maximumGradientsCount:x,className:a.cx("kakadu-components-1505766785",n==="secondary"&&"kakadu-components-3712045697")}),B&&e.jsxRuntimeExports.jsx(W.default,{maximumStarsCount:l,className:"kakadu-components-2813474662"}),m?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(F.default,{size:t?void 0:50}),e.jsxRuntimeExports.jsx(k.default,{size:t?void 0:50,className:n==="secondary"?k.normalBlendStyles:void 0})]}),i?e.jsxRuntimeExports.jsx(O.default,{label:i,position:g}):null]})}exports.ButtonVariant=y;exports.buttonDangerStyles=E;exports.buttonSecondaryStyles=R;exports.buttonSuccessStyles=C;exports.buttonWarningStyles=S;exports.default=H;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { useRef as
|
|
2
|
+
import { useRef as D } from "react";
|
|
3
3
|
import { cx as t } from "@kuma-ui/core";
|
|
4
|
-
import { effectStyles as
|
|
5
|
-
import
|
|
4
|
+
import { effectStyles as G } from "../theme.mjs";
|
|
5
|
+
import I from "../icons/icon.mjs";
|
|
6
6
|
import { RevealSpinner as R } from "./spinner.mjs";
|
|
7
7
|
import T from "./moving-gradients.mjs";
|
|
8
8
|
import h from "./moving-stars.mjs";
|
|
@@ -19,7 +19,7 @@ function x({
|
|
|
19
19
|
className: a,
|
|
20
20
|
...m
|
|
21
21
|
}) {
|
|
22
|
-
return /* @__PURE__ */ o.jsx("div", { ...m, className: t("kakadu-components-2658660333", n === "secondary" && "kakadu-components-3469662110", a), children: typeof s == "string" ? /* @__PURE__ */ o.jsx(
|
|
22
|
+
return /* @__PURE__ */ o.jsx("div", { ...m, className: t("kakadu-components-2658660333", n === "secondary" && "kakadu-components-3469662110", a), children: typeof s == "string" ? /* @__PURE__ */ o.jsx(I, { width: 14, height: 14, type: s }) : s });
|
|
23
23
|
}
|
|
24
24
|
const J = "kakadu-components-2244098950", ao = "kakadu-components-3923184173", K = "kakadu-components-317965671", O = "kakadu-components-1978976872";
|
|
25
25
|
function to({
|
|
@@ -43,8 +43,8 @@ function to({
|
|
|
43
43
|
movingStarsCount: l = 10,
|
|
44
44
|
...b
|
|
45
45
|
}) {
|
|
46
|
-
const k =
|
|
47
|
-
return /* @__PURE__ */ o.jsxs(W, { ...b, as: a ? "a" : "button", type: a ? void 0 : w, href: a, target: m, rel: y, disabled: !!p || !!c, className: t(
|
|
46
|
+
const k = D(null), v = z(k), w = s ?? "button", M = g && i > 0, B = N && l > 0;
|
|
47
|
+
return /* @__PURE__ */ o.jsxs(W, { ...b, as: a ? "a" : "button", type: a ? void 0 : w, href: a, target: m, rel: y, disabled: !!p || !!c, className: t(G, "kakadu-components-1897763514", !!r && "kakadu-components-3652831856", !e && "kakadu-components-2746167644", n === "secondary" && J, n === "warning" && K, n === "danger" && O, f), children: [
|
|
48
48
|
r ? /* @__PURE__ */ o.jsx(x, { variant: n, icon: r, className: e ? "kakadu-components-294089230" : void 0 }) : null,
|
|
49
49
|
e ? /* @__PURE__ */ o.jsx("div", { ref: k, className: "kakadu-components-2618257692", children: e }) : /* @__PURE__ */ o.jsx(H, { children: j }),
|
|
50
50
|
u ? /* @__PURE__ */ o.jsx(x, { variant: n, icon: u, className: e ? "kakadu-components-3127707672" : void 0 }) : null,
|
package/build/components/card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),a=require("@kuma-ui/core"),j=require("../theme.js"),r=require("../icon
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),a=require("@kuma-ui/core"),j=require("../theme.js"),r=require("../icons/icon.js"),t=require("./flex.js"),n=require("./text.js"),k=require("./click-ripples.js"),c=require("./hover-gradient.js"),h=require("./button.js"),R=require("./atom.js");function f({icon:o,title:i,description:u,action:l,href:s,target:m,rel:x,className:d,...p}){return e.jsxRuntimeExports.jsxs(R.default,{...p,as:s?"a":"button",type:s?void 0:"button",href:s,target:m,rel:x,className:a.cx(j.effectStyles,h.buttonSecondaryStyles,"kakadu-components-1387630570",d),children:[e.jsxRuntimeExports.jsxs(t.default,{gap:.5,direction:"column",children:[e.jsxRuntimeExports.jsx(n.Span,{className:"kakadu-components-1301774894",children:e.jsxRuntimeExports.jsxs(t.default,{gap:.5,direction:"row",alignment:t.FlexAlignment.start,children:[o?e.jsxRuntimeExports.jsx(r.default,{width:16,height:16,type:o,className:a.cx(r.iconShadowStyles,"kakadu-components-782417605")}):null,i]})}),e.jsxRuntimeExports.jsx(n.Paragraph,{className:"kakadu-components-3061837309",children:u}),e.jsxRuntimeExports.jsx(t.default,{alignment:t.FlexAlignment.end,children:e.jsxRuntimeExports.jsx(n.Span,{className:"kakadu-components-777975485",children:l})})]}),e.jsxRuntimeExports.jsx(k.default,{size:250,className:"kakadu-components-2967167444"}),e.jsxRuntimeExports.jsx(c.default,{size:300,className:c.normalBlendStyles})]})}exports.default=f;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { cx as
|
|
2
|
+
import { cx as a } from "@kuma-ui/core";
|
|
3
3
|
import { effectStyles as u } from "../theme.mjs";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import k, { iconShadowStyles as f } from "../icons/icon.mjs";
|
|
5
|
+
import s, { FlexAlignment as n } from "./flex.mjs";
|
|
6
6
|
import { Span as m, Paragraph as j } from "./text.mjs";
|
|
7
7
|
import h from "./click-ripples.mjs";
|
|
8
8
|
import g, { normalBlendStyles as y } from "./hover-gradient.mjs";
|
|
9
9
|
import { buttonSecondaryStyles as N } from "./button.mjs";
|
|
10
10
|
import S from "./atom.mjs";
|
|
11
|
-
function
|
|
12
|
-
icon:
|
|
11
|
+
function G({
|
|
12
|
+
icon: t,
|
|
13
13
|
title: r,
|
|
14
14
|
description: i,
|
|
15
15
|
action: l,
|
|
16
|
-
href:
|
|
16
|
+
href: e,
|
|
17
17
|
target: c,
|
|
18
18
|
rel: p,
|
|
19
19
|
className: d,
|
|
20
20
|
...x
|
|
21
21
|
}) {
|
|
22
|
-
return /* @__PURE__ */ o.jsxs(S, { ...x, as:
|
|
23
|
-
/* @__PURE__ */ o.jsxs(
|
|
24
|
-
/* @__PURE__ */ o.jsx(m, { className: "kakadu-components-1301774894", children: /* @__PURE__ */ o.jsxs(
|
|
25
|
-
|
|
22
|
+
return /* @__PURE__ */ o.jsxs(S, { ...x, as: e ? "a" : "button", type: e ? void 0 : "button", href: e, target: c, rel: p, className: a(u, N, "kakadu-components-1387630570", d), children: [
|
|
23
|
+
/* @__PURE__ */ o.jsxs(s, { gap: 0.5, direction: "column", children: [
|
|
24
|
+
/* @__PURE__ */ o.jsx(m, { className: "kakadu-components-1301774894", children: /* @__PURE__ */ o.jsxs(s, { gap: 0.5, direction: "row", alignment: n.start, children: [
|
|
25
|
+
t ? /* @__PURE__ */ o.jsx(k, { width: 16, height: 16, type: t, className: a(f, "kakadu-components-782417605") }) : null,
|
|
26
26
|
r
|
|
27
27
|
] }) }),
|
|
28
28
|
/* @__PURE__ */ o.jsx(j, { className: "kakadu-components-3061837309", children: i }),
|
|
29
|
-
/* @__PURE__ */ o.jsx(
|
|
29
|
+
/* @__PURE__ */ o.jsx(s, { alignment: n.end, children: /* @__PURE__ */ o.jsx(m, { className: "kakadu-components-777975485", children: l }) })
|
|
30
30
|
] }),
|
|
31
31
|
/* @__PURE__ */ o.jsx(h, { size: 250, className: "kakadu-components-2967167444" }),
|
|
32
32
|
/* @__PURE__ */ o.jsx(g, { size: 300, className: y })
|
|
33
33
|
] });
|
|
34
34
|
}
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
G as default
|
|
37
37
|
};
|
|
@@ -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("react"),u=require("../icon
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),o=require("react"),u=require("../icons/icon.js"),t=require("./flex.js"),c=require("./text.js"),r=require("./icon-button.js");function x({title:a,value:l,hasCopyButton:p}){const n=o.useRef(null),[s,i]=o.useState(!1),m=o.useCallback(()=>{i(!0),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{i(!1)},2e3)},[]);return e.jsxRuntimeExports.jsxs(t.default,{direction:"row",gap:1.5,alignment:t.FlexAlignment.start,children:[e.jsxRuntimeExports.jsxs(t.default,{fill:!0,gap:.375,alignment:t.FlexAlignment.start,children:[e.jsxRuntimeExports.jsx(c.Span,{className:"kakadu-components-3772513716",children:a}),e.jsxRuntimeExports.jsx(c.Span,{className:"kakadu-components-2497879239",children:l})]}),p?e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(r.default,{icon:s?u.IconType.check:u.IconType.copy,label:s?"Kopiert!":"Kopier",variant:s?r.IconButtonVariant.success:r.IconButtonVariant.default,onClick:m})}):null]})}exports.default=x;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as e } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
2
|
import { useRef as f, useState as d, useCallback as x } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import s, { FlexAlignment as
|
|
5
|
-
import { Span as
|
|
3
|
+
import { IconType as r } from "../icons/icon.mjs";
|
|
4
|
+
import s, { FlexAlignment as i } from "./flex.mjs";
|
|
5
|
+
import { Span as a } from "./text.mjs";
|
|
6
6
|
import j, { IconButtonVariant as c } from "./icon-button.mjs";
|
|
7
7
|
function R({
|
|
8
8
|
title: l,
|
|
@@ -14,10 +14,10 @@ function R({
|
|
|
14
14
|
o(!1);
|
|
15
15
|
}, 2e3);
|
|
16
16
|
}, []);
|
|
17
|
-
return /* @__PURE__ */ e.jsxs(s, { direction: "row", gap: 1.5, alignment:
|
|
18
|
-
/* @__PURE__ */ e.jsxs(s, { fill: !0, gap: 0.375, alignment:
|
|
19
|
-
/* @__PURE__ */ e.jsx(
|
|
20
|
-
/* @__PURE__ */ e.jsx(
|
|
17
|
+
return /* @__PURE__ */ e.jsxs(s, { direction: "row", gap: 1.5, alignment: i.start, children: [
|
|
18
|
+
/* @__PURE__ */ e.jsxs(s, { fill: !0, gap: 0.375, alignment: i.start, children: [
|
|
19
|
+
/* @__PURE__ */ e.jsx(a, { className: "kakadu-components-3772513716", children: l }),
|
|
20
|
+
/* @__PURE__ */ e.jsx(a, { className: "kakadu-components-2497879239", children: m })
|
|
21
21
|
] }),
|
|
22
22
|
u ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(j, { icon: n ? r.check : r.copy, label: n ? "Kopiert!" : "Kopier", variant: n ? c.success : c.default, onClick: p }) }) : null
|
|
23
23
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../jsx-runtime-BB_1_6y_.js"),s=require("react"),n=require("@kuma-ui/core"),a=require("../icon
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../jsx-runtime-BB_1_6y_.js"),s=require("react"),n=require("@kuma-ui/core"),a=require("../icons/icon.js"),k=require("../theme.js"),q=require("./theme-setter.js"),i=require("./button.js"),b=require("./aria-text.js"),w=require("./button-tooltip.js"),_=require("./click-ripples.js"),j=require("./hover-gradient.js");var h=(e=>(e.default="default",e.success="success",e.warning="warning",e.danger="danger",e))(h||{});function T({icon:e,variant:u="default",label:d,tooltipPosition:S,disabled:m,className:R,...g}){const y=q.useIsDarkMode(),[o,E]=s.useState(e),[x,l]=s.useState(!1),p=s.useRef(e),r=s.useRef(null);s.useEffect(()=>{p.current=e},[e]);const c=s.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]);return s.useEffect(()=>{if(o===e){l(f=>f&&!1);return}l(!0),c(),r.current=setTimeout(()=>{l(!1),E(p.current)},370)},[o,e,c]),s.useEffect(()=>()=>{c()},[c]),t.jsxRuntimeExports.jsxs("button",{...g,type:"button",disabled:m,className:n.cx(k.buttonResetStyles,k.effectStyles,"kakadu-components-3515018630",u==="default"&&n.cx(i.buttonSecondaryStyles,"kakadu-components-2089159949"),u==="success"&&n.cx(i.buttonSuccessStyles,"kakadu-components-4088931955"),u==="warning"&&n.cx(i.buttonWarningStyles,"kakadu-components-1450399719"),u==="danger"&&n.cx(i.buttonDangerStyles,"kakadu-components-3594030066"),R),children:[t.jsxRuntimeExports.jsxs("span",{"data-theme":u==="default"?y?"dark":"light":"dark",className:"kakadu-components-2197738751",children:[t.jsxRuntimeExports.jsx(a.default,{width:16,height:16,type:o,className:n.cx(a.iconShadowStyles,"kakadu-components-1309118222",x&&"kakadu-components-3602476657")}),o===e?null:t.jsxRuntimeExports.jsx(a.default,{width:16,height:16,type:e,className:n.cx(a.iconShadowStyles,"kakadu-components-2883440801",x&&"kakadu-components-1406924214")})]}),t.jsxRuntimeExports.jsx(b.default,{children:d}),t.jsxRuntimeExports.jsx(w.default,{label:d,position:S}),m?null:t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(_.default,{size:50}),t.jsxRuntimeExports.jsx(j.default,{size:50,className:u==="default"?j.normalBlendStyles:void 0})]})]})}exports.IconButtonVariant=h;exports.default=T;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as t } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
2
|
import { useState as p, useRef as k, useEffect as c, useCallback as b } from "react";
|
|
3
3
|
import { cx as s } from "@kuma-ui/core";
|
|
4
|
-
import
|
|
4
|
+
import h, { iconShadowStyles as g } from "../icons/icon.mjs";
|
|
5
5
|
import { buttonResetStyles as R, effectStyles as N } from "../theme.mjs";
|
|
6
6
|
import { useIsDarkMode as T } from "./theme-setter.mjs";
|
|
7
|
-
import { buttonSecondaryStyles as
|
|
7
|
+
import { buttonSecondaryStyles as D, buttonSuccessStyles as I, buttonWarningStyles as z, buttonDangerStyles as C } from "./button.mjs";
|
|
8
8
|
import E from "./aria-text.mjs";
|
|
9
9
|
import M from "./button-tooltip.mjs";
|
|
10
10
|
import A from "./click-ripples.mjs";
|
|
@@ -36,7 +36,7 @@ function Y({
|
|
|
36
36
|
}, 370);
|
|
37
37
|
}, [r, e, u]), c(() => () => {
|
|
38
38
|
u();
|
|
39
|
-
}, [u]), /* @__PURE__ */ t.jsxs("button", { ...y, type: "button", disabled: l, className: s(R, N, "kakadu-components-3515018630", o === "default" && s(
|
|
39
|
+
}, [u]), /* @__PURE__ */ t.jsxs("button", { ...y, type: "button", disabled: l, className: s(R, N, "kakadu-components-3515018630", o === "default" && s(D, "kakadu-components-2089159949"), o === "success" && s(I, "kakadu-components-4088931955"), o === "warning" && s(z, "kakadu-components-1450399719"), o === "danger" && s(C, "kakadu-components-3594030066"), S), children: [
|
|
40
40
|
/* @__PURE__ */ t.jsxs("span", { "data-theme": o === "default" ? j ? "dark" : "light" : "dark", className: "kakadu-components-2197738751", children: [
|
|
41
41
|
/* @__PURE__ */ t.jsx(h, { width: 16, height: 16, type: r, className: s(g, "kakadu-components-1309118222", i && "kakadu-components-3602476657") }),
|
|
42
42
|
r === e ? null : /* @__PURE__ */ t.jsx(h, { width: 16, height: 16, type: e, className: s(g, "kakadu-components-2883440801", i && "kakadu-components-1406924214") })
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),t=require("react"),u=require("@kuma-ui/core"),re=require("../icons/chevron-up.js"),
|
|
2
|
-
`):[],[i]),te=t.useMemo(()=>w.length,[w]),q=!!x,B=!q&&!!c
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),t=require("react"),u=require("@kuma-ui/core"),re=require("../icons/chevron-up.js"),W=require("../icons/icon.js"),U=require("../utilities/copy-to-clipboard.js"),M=require("../theme.js"),ie=require("../icons/sparkle.js"),ue=require("./button-tooltip.js"),P=require("./text-button.js"),g=require("./text.js"),xe=require("./collapsible.js"),z=require("./click-ripples.js"),D=require("./hover-gradient.js"),pe=require("./notification.js"),de=require("./notice.js"),me="kakadu-components-922159086",je="kakadu-components-2436386418",I="kakadu-components-1816130686",G="kakadu-components-4056037255",J=u.cx(G,"kakadu-components-3245407458"),ke=u.cx(G,"kakadu-components-1117160492");function fe({as:d,className:o,...x}){return e.jsxRuntimeExports.jsx(g.Span,{as:d??"span",...x,className:u.cx("kakadu-components-3574036749",o)})}function K({label:d,error:o,errorId:x,warning:c,warningId:R,footnote:s,attachments:l,className:m,children:j,...b}){const p=!!o,r=!!c,k=!!s;return e.jsxRuntimeExports.jsx("label",{...b,className:u.cx(me,m),children:e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-3146929190",children:[e.jsxRuntimeExports.jsx(g.Span,{className:u.cx(M.overflowProtectionStyles,je),children:e.jsxRuntimeExports.jsx("span",{children:d})}),e.jsxRuntimeExports.jsxs("span",{className:"kakadu-components-3298764637",children:[j,k?e.jsxRuntimeExports.jsx(fe,{className:"kakadu-components-613632806",children:s}):null,l]}),p||r?e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2927674627",children:p?e.jsxRuntimeExports.jsx(g.Paragraph,{id:x,className:J,children:o instanceof Error?o.message:o}):r?e.jsxRuntimeExports.jsx(g.Paragraph,{id:R,className:ke,children:c instanceof Error?c.message:c}):null}):null]})})}function he({label:d,options:o,error:x,warning:c,footnote:R,className:s,onChange:l,...m}){const j=t.useId(),b=`${j}-error`,p=`${j}-warning`,r=!!x,k=!r&&!!c,N=r?b:k?p:void 0,{value:h}=m,[y,v]=t.useState(""),S=h??y;t.useEffect(()=>{v(typeof h=="string"?h:"")},[h]);const _=t.useCallback(f=>{const{value:E}=f.target;v(E),l==null||l(E,f)},[l]);return e.jsxRuntimeExports.jsxs(K,{label:d,error:x,warning:c,footnote:R,children:[e.jsxRuntimeExports.jsx("select",{...m,value:S,"aria-invalid":r,"data-warning":k,"aria-describedby":N,className:u.cx(I,"kakadu-components-4228384787",s),onChange:_,children:o.map(f=>e.jsxRuntimeExports.jsx("option",{value:f.value,children:f.label},f.value))}),e.jsxRuntimeExports.jsx(re.default,{width:14,height:14,className:"kakadu-components-158931186"})]})}const Ee=40,T="kakadu-components-4233741488";function Re({type:d,label:o,error:x,warning:c,footnote:R,suggestion:s,actions:l=[],hasCopyButton:m,hasClearButton:j,isMultiline:b,onChange:p,className:r,...k}){const N=t.useRef(null),h=t.useRef(null),y=t.useRef(null),v=pe.useCreateNotification(),S=t.useId(),_=`${S}-error`,f=`${S}-warning`,{value:E,disabled:Q}=k,[X,L]=t.useState(""),i=E??X,[Y,Z]=t.useState(),ee=d==="textarea"||!!b;t.useLayoutEffect(()=>{typeof i=="string"&&y.current&&Z(y.current.scrollHeight)},[i]);const w=t.useMemo(()=>typeof i=="string"?`${i} `.split(`
|
|
2
|
+
`):[],[i]),te=t.useMemo(()=>w.length,[w]),q=!!x,B=!q&&!!c,$=q?_:B?f:void 0;t.useEffect(()=>{L(typeof E=="string"?E:"")},[E]);const V=t.useCallback(n=>{const{value:a}=n.target;L(a),p==null||p(a,n)},[p]),se=t.useCallback(()=>{typeof i=="string"&&(U.default(i),v({type:de.NoticeType.success,children:"Copied to clipboard."}))},[i,v]),C=t.useCallback(n=>{var F;const a=h.current??N.current??void 0;if(a){const O=(F=Object.getOwnPropertyDescriptor(a instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,"value"))==null?void 0:F.set;if(O){O.call(a,n);const le=new Event("input",{bubbles:!0});a.dispatchEvent(le),a.focus();return}}throw new Error("Unable to set value.")},[]),ne=t.useCallback(()=>{C("")},[C]),[ae,oe]=t.useState(""),H=!!s&&ae!==s,ce=t.useCallback(()=>{if(s){try{C(s)}catch{U.default(s)}oe(s)}},[s,C]),A=t.useMemo(()=>l.length,[l]);return e.jsxRuntimeExports.jsxs(K,{label:o,error:x,warning:c,footnote:R,attachments:e.jsxRuntimeExports.jsx(xe.default,{isCollapsed:!H,children:H?e.jsxRuntimeExports.jsxs("button",{type:"button",className:u.cx(M.buttonResetStyles,M.overflowProtectionStyles,"kakadu-components-2355856341"),onClick:ce,children:[e.jsxRuntimeExports.jsx(ue.default,{label:"Apply suggestion"}),e.jsxRuntimeExports.jsx(ie.default,{width:13,height:13,className:"kakadu-components-1021263934"}),e.jsxRuntimeExports.jsx(g.Span,{className:"kakadu-components-1585874956",children:s}),e.jsxRuntimeExports.jsx(z.default,{className:"kakadu-components-3448565402"}),e.jsxRuntimeExports.jsx(D.default,{})]}):null}),style:{"--button-padding":`calc(${Ee*((m?1:0)+(j?1:0)+A)}px + 6px)`},children:[e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-3146929190",children:[ee?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("span",{ref:y,"aria-hidden":!0,className:u.cx(I,r,"kakadu-components-2033521835"),children:[w.map((n,a)=>e.jsxRuntimeExports.jsxs("span",{children:[n,te>1?e.jsxRuntimeExports.jsx("br",{}):null]},a))," "]}),e.jsxRuntimeExports.jsx("textarea",{...k,ref:h,rows:1,"aria-invalid":q,"data-warning":B,"aria-describedby":$,value:i,className:u.cx(I,r,"kakadu-components-2119524139"),style:{minHeight:Y},onChange:V})]}):e.jsxRuntimeExports.jsx("input",{...k,ref:N,type:d??"text",value:i,"aria-invalid":q,"data-warning":B,"aria-describedby":$,className:u.cx(I,r),onChange:V}),Q?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(z.default,{className:"kakadu-components-616311160"}),e.jsxRuntimeExports.jsx(D.default,{className:"kakadu-components-1962999040"})]})]}),m||j||A>0?e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-131986363",children:[l.map((n,a)=>e.jsxRuntimeExports.jsx(P.default,{iconLeft:n.icon,label:n.label,tooltip:n.label,className:T,onClick:n.onClick},n.label+a)),m?e.jsxRuntimeExports.jsx(P.default,{iconLeft:W.IconType.copy,label:"Copy",tooltip:"Copy",className:T,onClick:se}):null,j?e.jsxRuntimeExports.jsx(P.default,{iconLeft:W.IconType.times,label:"Clear",tooltip:"Clear",className:T,onClick:ne}):null]}):null]})}exports.Select=he;exports.default=Re;exports.errorParagraph=J;
|
|
@@ -2,9 +2,10 @@ import { j as e } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
|
2
2
|
import { useRef as P, useId as X, useState as I, useLayoutEffect as pe, useMemo as R, useEffect as Y, useCallback as b } from "react";
|
|
3
3
|
import { cx as i } from "@kuma-ui/core";
|
|
4
4
|
import ke from "../icons/chevron-up.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { IconType as G } from "../icons/icon.mjs";
|
|
6
6
|
import q from "../utilities/copy-to-clipboard.mjs";
|
|
7
7
|
import { buttonResetStyles as fe, overflowProtectionStyles as Z } from "../theme.mjs";
|
|
8
|
+
import xe from "../icons/sparkle.mjs";
|
|
8
9
|
import he from "./button-tooltip.mjs";
|
|
9
10
|
import V from "./text-button.mjs";
|
|
10
11
|
import { Span as M, Paragraph as J } from "./text.mjs";
|
|
@@ -33,18 +34,18 @@ function ee({
|
|
|
33
34
|
children: k,
|
|
34
35
|
...y
|
|
35
36
|
}) {
|
|
36
|
-
const u = !!s, c = !!o,
|
|
37
|
+
const u = !!s, c = !!o, f = !!n;
|
|
37
38
|
return /* @__PURE__ */ e.jsx("label", { ...y, className: i(ye, p), children: /* @__PURE__ */ e.jsxs("div", { className: "kakadu-components-3146929190", children: [
|
|
38
39
|
/* @__PURE__ */ e.jsx(M, { className: i(Z, ge), children: /* @__PURE__ */ e.jsx("span", { children: m }) }),
|
|
39
40
|
/* @__PURE__ */ e.jsxs("span", { className: "kakadu-components-3298764637", children: [
|
|
40
41
|
k,
|
|
41
|
-
|
|
42
|
+
f ? /* @__PURE__ */ e.jsx(Ee, { className: "kakadu-components-613632806", children: n }) : null,
|
|
42
43
|
l
|
|
43
44
|
] }),
|
|
44
45
|
u || c ? /* @__PURE__ */ e.jsx("div", { className: "kakadu-components-2927674627", children: u ? /* @__PURE__ */ e.jsx(J, { id: d, className: Ne, children: s instanceof Error ? s.message : s }) : c ? /* @__PURE__ */ e.jsx(J, { id: v, className: Se, children: o instanceof Error ? o.message : o }) : null }) : null
|
|
45
46
|
] }) });
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
+
function ze({
|
|
48
49
|
label: m,
|
|
49
50
|
options: s,
|
|
50
51
|
error: d,
|
|
@@ -54,25 +55,25 @@ function Ue({
|
|
|
54
55
|
onChange: l,
|
|
55
56
|
...p
|
|
56
57
|
}) {
|
|
57
|
-
const k = X(), y = `${k}-error`, u = `${k}-warning`, c = !!d,
|
|
58
|
+
const k = X(), y = `${k}-error`, u = `${k}-warning`, c = !!d, f = !c && !!o, S = c ? y : f ? u : void 0, {
|
|
58
59
|
value: h
|
|
59
60
|
} = p, [g, N] = I(""), E = h ?? g;
|
|
60
61
|
Y(() => {
|
|
61
62
|
N(typeof h == "string" ? h : "");
|
|
62
63
|
}, [h]);
|
|
63
|
-
const T = b((
|
|
64
|
+
const T = b((x) => {
|
|
64
65
|
const {
|
|
65
66
|
value: j
|
|
66
|
-
} =
|
|
67
|
-
N(j), l == null || l(j,
|
|
67
|
+
} = x.target;
|
|
68
|
+
N(j), l == null || l(j, x);
|
|
68
69
|
}, [l]);
|
|
69
70
|
return /* @__PURE__ */ e.jsxs(ee, { label: m, error: d, warning: o, footnote: v, children: [
|
|
70
|
-
/* @__PURE__ */ e.jsx("select", { ...p, value: E, "aria-invalid": c, "data-warning":
|
|
71
|
+
/* @__PURE__ */ e.jsx("select", { ...p, value: E, "aria-invalid": c, "data-warning": f, "aria-describedby": S, className: i(w, "kakadu-components-4228384787", n), onChange: T, children: s.map((x) => /* @__PURE__ */ e.jsx("option", { value: x.value, children: x.label }, x.value)) }),
|
|
71
72
|
/* @__PURE__ */ e.jsx(ke, { width: 14, height: 14, className: "kakadu-components-158931186" })
|
|
72
73
|
] });
|
|
73
74
|
}
|
|
74
75
|
const Ce = 40, $ = "kakadu-components-4233741488";
|
|
75
|
-
function
|
|
76
|
+
function De({
|
|
76
77
|
type: m,
|
|
77
78
|
label: s,
|
|
78
79
|
error: d,
|
|
@@ -85,41 +86,41 @@ function ze({
|
|
|
85
86
|
isMultiline: y,
|
|
86
87
|
onChange: u,
|
|
87
88
|
className: c,
|
|
88
|
-
...
|
|
89
|
+
...f
|
|
89
90
|
}) {
|
|
90
|
-
const S = P(null), h = P(null), g = P(null), N = be(), E = X(), T = `${E}-error`,
|
|
91
|
+
const S = P(null), h = P(null), g = P(null), N = be(), E = X(), T = `${E}-error`, x = `${E}-warning`, {
|
|
91
92
|
value: j,
|
|
92
93
|
disabled: ne
|
|
93
|
-
} =
|
|
94
|
+
} = f, [te, A] = I(""), r = j ?? te, [ae, se] = I(), oe = m === "textarea" || !!y;
|
|
94
95
|
pe(() => {
|
|
95
96
|
typeof r == "string" && g.current && se(g.current.scrollHeight);
|
|
96
97
|
}, [r]);
|
|
97
98
|
const L = R(() => typeof r == "string" ? `${r} `.split(`
|
|
98
|
-
`) : [], [r]), le = R(() => L.length, [L]), C = !!d, H = !C && !!o, F = C ? T : H ?
|
|
99
|
+
`) : [], [r]), le = R(() => L.length, [L]), C = !!d, H = !C && !!o, F = C ? T : H ? x : void 0;
|
|
99
100
|
Y(() => {
|
|
100
101
|
A(typeof j == "string" ? j : "");
|
|
101
102
|
}, [j]);
|
|
102
|
-
const W = b((
|
|
103
|
+
const W = b((t) => {
|
|
103
104
|
const {
|
|
104
|
-
value:
|
|
105
|
-
} =
|
|
106
|
-
A(
|
|
105
|
+
value: a
|
|
106
|
+
} = t.target;
|
|
107
|
+
A(a), u == null || u(a, t);
|
|
107
108
|
}, [u]), ce = b(() => {
|
|
108
109
|
typeof r == "string" && (q(r), N({
|
|
109
110
|
type: ve.success,
|
|
110
111
|
children: "Copied to clipboard."
|
|
111
112
|
}));
|
|
112
|
-
}, [r, N]), B = b((
|
|
113
|
+
}, [r, N]), B = b((t) => {
|
|
113
114
|
var z;
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
116
|
-
const D = (z = Object.getOwnPropertyDescriptor(
|
|
115
|
+
const a = h.current ?? S.current ?? void 0;
|
|
116
|
+
if (a) {
|
|
117
|
+
const D = (z = Object.getOwnPropertyDescriptor(a instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype, "value")) == null ? void 0 : z.set;
|
|
117
118
|
if (D) {
|
|
118
|
-
D.call(
|
|
119
|
+
D.call(a, t);
|
|
119
120
|
const me = new Event("input", {
|
|
120
121
|
bubbles: !0
|
|
121
122
|
});
|
|
122
|
-
|
|
123
|
+
a.dispatchEvent(me), a.focus();
|
|
123
124
|
return;
|
|
124
125
|
}
|
|
125
126
|
}
|
|
@@ -148,35 +149,35 @@ function ze({
|
|
|
148
149
|
/* @__PURE__ */ e.jsxs("div", { className: "kakadu-components-3146929190", children: [
|
|
149
150
|
oe ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
150
151
|
/* @__PURE__ */ e.jsxs("span", { ref: g, "aria-hidden": !0, className: i(w, c, "kakadu-components-2033521835"), children: [
|
|
151
|
-
L.map((
|
|
152
|
+
L.map((t, a) => (
|
|
152
153
|
// eslint-disable-next-line react/no-array-index-key
|
|
153
154
|
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
154
|
-
|
|
155
|
+
t,
|
|
155
156
|
le > 1 ? /* @__PURE__ */ e.jsx("br", {}) : null
|
|
156
|
-
] },
|
|
157
|
+
] }, a)
|
|
157
158
|
)),
|
|
158
159
|
" "
|
|
159
160
|
] }),
|
|
160
|
-
/* @__PURE__ */ e.jsx("textarea", { ...
|
|
161
|
-
minHeight:
|
|
161
|
+
/* @__PURE__ */ e.jsx("textarea", { ...f, ref: h, rows: 1, "aria-invalid": C, "data-warning": H, "aria-describedby": F, value: r, className: i(w, c, "kakadu-components-2119524139"), style: {
|
|
162
|
+
minHeight: ae
|
|
162
163
|
}, onChange: W })
|
|
163
|
-
] }) : /* @__PURE__ */ e.jsx("input", { ...
|
|
164
|
+
] }) : /* @__PURE__ */ e.jsx("input", { ...f, ref: S, type: m ?? "text", value: r, "aria-invalid": C, "data-warning": H, "aria-describedby": F, className: i(w, c), onChange: W }),
|
|
164
165
|
ne ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
165
166
|
/* @__PURE__ */ e.jsx(K, { className: "kakadu-components-616311160" }),
|
|
166
167
|
/* @__PURE__ */ e.jsx(Q, { className: "kakadu-components-1962999040" })
|
|
167
168
|
] })
|
|
168
169
|
] }),
|
|
169
170
|
p || k || U > 0 ? /* @__PURE__ */ e.jsxs("div", { className: "kakadu-components-131986363", children: [
|
|
170
|
-
l.map((
|
|
171
|
+
l.map((t, a) => /* @__PURE__ */ e.jsx(
|
|
171
172
|
V,
|
|
172
173
|
{
|
|
173
|
-
iconLeft:
|
|
174
|
-
label:
|
|
175
|
-
tooltip:
|
|
174
|
+
iconLeft: t.icon,
|
|
175
|
+
label: t.label,
|
|
176
|
+
tooltip: t.label,
|
|
176
177
|
className: $,
|
|
177
|
-
onClick:
|
|
178
|
+
onClick: t.onClick
|
|
178
179
|
},
|
|
179
|
-
|
|
180
|
+
t.label + a
|
|
180
181
|
)),
|
|
181
182
|
p ? /* @__PURE__ */ e.jsx(V, { iconLeft: G.copy, label: "Copy", tooltip: "Copy", className: $, onClick: ce }) : null,
|
|
182
183
|
k ? /* @__PURE__ */ e.jsx(V, { iconLeft: G.times, label: "Clear", tooltip: "Clear", className: $, onClick: re }) : null
|
|
@@ -184,7 +185,7 @@ function ze({
|
|
|
184
185
|
] });
|
|
185
186
|
}
|
|
186
187
|
export {
|
|
187
|
-
|
|
188
|
-
|
|
188
|
+
ze as Select,
|
|
189
|
+
De as default,
|
|
189
190
|
Ne as errorParagraph
|
|
190
191
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const N=require("../jsx-runtime-BB_1_6y_.js"),O=require("react"),le=require("@kuma-ui/core"),xe=require("react-dom"),je=require("../icon
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const N=require("../jsx-runtime-BB_1_6y_.js"),O=require("react"),le=require("@kuma-ui/core"),xe=require("react-dom"),je=require("../icons/icon.js"),Pe=require("./text-button.js");function me(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var t=function a(){return this instanceof a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(a){var s=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:function(){return r[a]}})}),t}var J={exports:{}};/*!
|
|
2
2
|
* tabbable 6.4.0
|
|
3
3
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
4
|
*/var ge=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],te=ge.join(","),Te=typeof Element>"u",Y=Te?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,re=!Te&&Element.prototype.getRootNode?function(r){var e;return r==null||(e=r.getRootNode)===null||e===void 0?void 0:e.call(r)}:function(r){return r==null?void 0:r.ownerDocument},ae=function(e,t){var a;t===void 0&&(t=!0);var s=e==null||(a=e.getAttribute)===null||a===void 0?void 0:a.call(e,"inert"),c=s===""||s==="true",n=c||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):ae(e.parentNode));return n},Ce=function(e){var t,a=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return a===""||a==="true"},we=function(e,t,a){if(ae(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(te));return t&&Y.call(e,te)&&s.unshift(e),s=s.filter(a),s},ne=function(e,t,a){for(var s=[],c=Array.from(e);c.length;){var n=c.shift();if(!ae(n,!1))if(n.tagName==="SLOT"){var p=n.assignedElements(),y=p.length?p:n.children,E=ne(y,!0,a);a.flatten?s.push.apply(s,E):s.push({scopeParent:n,candidates:E})}else{var F=Y.call(n,te);F&&a.filter(n)&&(t||!e.includes(n))&&s.push(n);var D=n.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(n),x=!ae(D,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(n));if(D&&x){var A=ne(D===!0?n.children:D.children,!0,a);a.flatten?s.push.apply(s,A):s.push({scopeParent:n,candidates:A})}else c.unshift.apply(c,n.children)}}return s},Ee=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},q=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Ce(e))&&!Ee(e)?0:e.tabIndex},Ie=function(e,t){var a=q(e);return a<0&&t&&!Ee(e)?0:a},Ae=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ke=function(e){return e.tagName==="INPUT"},_e=function(e){return ke(e)&&e.type==="hidden"},Le=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(a){return a.tagName==="SUMMARY"});return t},Me=function(e,t){for(var a=0;a<e.length;a++)if(e[a].checked&&e[a].form===t)return e[a]},Be=function(e){if(!e.name)return!0;var t=e.form||re(e),a=function(p){return t.querySelectorAll('input[type="radio"][name="'+p+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=a(window.CSS.escape(e.name));else try{s=a(e.name)}catch(n){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",n.message),!1}var c=Me(s,e.form);return!c||c===e},Ke=function(e){return ke(e)&&e.type==="radio"},qe=function(e){return Ke(e)&&!Be(e)},Ve=function(e){var t,a=e&&re(e),s=(t=a)===null||t===void 0?void 0:t.host,c=!1;if(a&&a!==e){var n,p,y;for(c=!!((n=s)!==null&&n!==void 0&&(p=n.ownerDocument)!==null&&p!==void 0&&p.contains(s)||e!=null&&(y=e.ownerDocument)!==null&&y!==void 0&&y.contains(e));!c&&s;){var E,F,D;a=re(s),s=(E=a)===null||E===void 0?void 0:E.host,c=!!((F=s)!==null&&F!==void 0&&(D=F.ownerDocument)!==null&&D!==void 0&&D.contains(s))}}return c},fe=function(e){var t=e.getBoundingClientRect(),a=t.width,s=t.height;return a===0&&s===0},$e=function(e,t){var a=t.displayCheck,s=t.getShadowRoot;if(a==="full-native"&&"checkVisibility"in e){var c=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!c}if(getComputedStyle(e).visibility==="hidden")return!0;var n=Y.call(e,"details>summary:first-of-type"),p=n?e.parentElement:e;if(Y.call(p,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="full-native"||a==="legacy-full"){if(typeof s=="function"){for(var y=e;e;){var E=e.parentElement,F=re(e);if(E&&!E.shadowRoot&&s(E)===!0)return fe(e);e.assignedSlot?e=e.assignedSlot:!E&&F!==e.ownerDocument?e=F.host:e=E}e=y}if(Ve(e))return!e.getClientRects().length;if(a!=="legacy-full")return!0}else if(a==="non-zero-area")return fe(e);return!1},Ge=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var a=0;a<t.children.length;a++){var s=t.children.item(a);if(s.tagName==="LEGEND")return Y.call(t,"fieldset[disabled] *")?!0:!s.contains(e)}return!0}t=t.parentElement}return!1},ie=function(e,t){return!(t.disabled||_e(t)||$e(t,e)||Le(t)||Ge(t))},se=function(e,t){return!(qe(t)||q(t)<0||!ie(e,t))},Ue=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Se=function(e){var t=[],a=[];return e.forEach(function(s,c){var n=!!s.scopeParent,p=n?s.scopeParent:s,y=Ie(p,n),E=n?Se(s.candidates):p;y===0?n?t.push.apply(t,E):t.push(p):a.push({documentOrder:c,tabIndex:y,item:s,isScope:n,content:E})}),a.sort(Ae).reduce(function(s,c){return c.isScope?s.push.apply(s,c.content):s.push(c.content),s},[]).concat(t)},Fe=function(e,t){t=t||{};var a;return t.getShadowRoot?a=ne([e],t.includeContainer,{filter:se.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ue}):a=we(e,t.includeContainer,se.bind(null,t)),Se(a)},Oe=function(e,t){t=t||{};var a;return t.getShadowRoot?a=ne([e],t.includeContainer,{filter:ie.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):a=we(e,t.includeContainer,ie.bind(null,t)),a},z=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Y.call(e,te)===!1?!1:se(t,e)},We=ge.concat("iframe:not([inert]):not([inert] *)").join(","),ee=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Y.call(e,We)===!1?!1:ie(t,e)};const ze=Object.freeze(Object.defineProperty({__proto__:null,focusable:Oe,getTabIndex:q,isFocusable:ee,isTabbable:z,tabbable:Fe},Symbol.toStringTag,{value:"Module"}));/*!
|
|
@@ -2,7 +2,7 @@ import { j as N } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
|
2
2
|
import Ie, { createContext as Ae, useRef as te, useState as re, useCallback as J, useMemo as ne, useEffect as H, useContext as xe } from "react";
|
|
3
3
|
import { cx as pe } from "@kuma-ui/core";
|
|
4
4
|
import { createPortal as _e } from "react-dom";
|
|
5
|
-
import {
|
|
5
|
+
import { IconType as Le } from "../icons/icon.mjs";
|
|
6
6
|
import Be from "./text-button.mjs";
|
|
7
7
|
function ke(r) {
|
|
8
8
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
@@ -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"),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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as n } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
2
|
import { cx as t } from "@kuma-ui/core";
|
|
3
|
-
import
|
|
3
|
+
import i, { iconShadowStyles as l } from "../icons/icon.mjs";
|
|
4
4
|
import { Span as p } from "./text.mjs";
|
|
5
5
|
var h = /* @__PURE__ */ ((a) => (a.default = "default", a.success = "success", a.warning = "warning", a.danger = "danger", a))(h || {});
|
|
6
6
|
function w({
|
|
@@ -10,10 +10,10 @@ function w({
|
|
|
10
10
|
children: e,
|
|
11
11
|
...r
|
|
12
12
|
}) {
|
|
13
|
-
const d = a === "success", m = a === "warning", k = a === "danger",
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
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-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
|
+
/* @__PURE__ */ n.jsx(p, { className: "kakadu-components-1969958615", children: u ? e : /* @__PURE__ */ n.jsx(n.Fragment, { children: " " }) })
|
|
17
17
|
] });
|
|
18
18
|
}
|
|
19
19
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),o=require("@kuma-ui/core"),x=require("../icon
|
|
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"),x=require("../icons/icon.js"),l=require("./flex.js"),R=require("./text.js"),q=require("./click-ripples.js"),m=require("./hover-gradient.js"),_=require("./button-tooltip.js"),v=require("./aria-text.js"),B=require("./atom.js");var p=(t=>(t.primary="primary",t.delete="delete",t))(p||{});const f="kakadu-components-4017654514";function N({iconLeft:t,iconRight:n,variant:i="primary",tooltip:u,tooltipPosition:c,href:a,target:d,rel:j,disabled:r,className:k,children:s,label:E,...y}){return e.jsxRuntimeExports.jsxs(B.default,{...y,as:a?"a":"button",type:a?void 0:"button",href:a,target:d,rel:j,disabled:r,className:o.cx(R.textShadowStyles,"kakadu-components-1202323410",s&&(t||n)?o.cx(!!t&&"kakadu-components-497190725",!!n&&"kakadu-components-3729381008"):"kakadu-components-3866032606",i==="delete"&&f,k),children:[e.jsxRuntimeExports.jsxs(l.default,{direction:"row",gap:.5,alignment:l.FlexAlignment.center,children:[t?e.jsxRuntimeExports.jsx("div",{className:o.cx("kakadu-components-2031441451",s?"kakadu-components-2885581246":"kakadu-components-611756781"),children:typeof t=="string"?e.jsxRuntimeExports.jsx(x.default,{width:14,height:14,type:t}):t}):null,s?e.jsxRuntimeExports.jsx("span",{className:"kakadu-components-2362298521",children:s}):e.jsxRuntimeExports.jsx(v.default,{children:E}),n?e.jsxRuntimeExports.jsx("div",{className:o.cx("kakadu-components-2031441451",s?"kakadu-components-2285425267":"kakadu-components-611756781"),children:typeof n=="string"?e.jsxRuntimeExports.jsx(x.default,{width:14,height:14,type:n}):n}):null]}),e.jsxRuntimeExports.jsxs("span",{className:"kakadu-components-1343580459",children:[r?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(q.default,{size:s?void 0:50}),e.jsxRuntimeExports.jsx(m.default,{size:s?void 0:50,className:m.normalBlendStyles})]}),u?e.jsxRuntimeExports.jsx(_.default,{label:u,position:c}):null]})]})}exports.TextButtonVariant=p;exports.default=N;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
2
|
import { cx as t } from "@kuma-ui/core";
|
|
3
|
-
import
|
|
3
|
+
import p from "../icons/icon.mjs";
|
|
4
4
|
import j, { FlexAlignment as y } from "./flex.mjs";
|
|
5
5
|
import { textShadowStyles as B } from "./text.mjs";
|
|
6
6
|
import f from "./click-ripples.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../jsx-runtime-BB_1_6y_.js");function s({fill:e,...r}){return t.jsxRuntimeExports.jsx("svg",{fill:"none",height:"512",viewBox:"0 0 512 512",width:"512",xmlns:"http://www.w3.org/2000/svg",...r,children:t.jsxRuntimeExports.jsxs("g",{fill:e??"currentColor",children:[t.jsxRuntimeExports.jsx("path",{d:"m422.79 151.776-144.163 143.87c-12.496 12.472-32.758 12.472-45.254 0l-144.163-143.87c-12.28-12.265-12.28-32.135 0-44.39l22.24-22.1947c12.29-12.2551 32.2-12.2551 44.48 0l100.07 99.8667 100.07-99.8666c12.29-12.2551 32.2-12.2551 44.48 0l22.24 22.1946c12.28 12.265 12.28 32.135 0 44.39z"}),t.jsxRuntimeExports.jsx("rect",{height:"63",rx:"31.5",transform:"matrix(-1 -0 0 -1 864 904)",width:"352",x:"432",y:"452"})]})})}exports.default=s;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { j as r } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
+
function n({
|
|
3
|
+
fill: t,
|
|
4
|
+
...i
|
|
5
|
+
}) {
|
|
6
|
+
return /* @__PURE__ */ r.jsx(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
fill: "none",
|
|
10
|
+
height: "512",
|
|
11
|
+
viewBox: "0 0 512 512",
|
|
12
|
+
width: "512",
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
...i,
|
|
15
|
+
children: /* @__PURE__ */ r.jsxs("g", { fill: t ?? "currentColor", children: [
|
|
16
|
+
/* @__PURE__ */ r.jsx("path", { d: "m422.79 151.776-144.163 143.87c-12.496 12.472-32.758 12.472-45.254 0l-144.163-143.87c-12.28-12.265-12.28-32.135 0-44.39l22.24-22.1947c12.29-12.2551 32.2-12.2551 44.48 0l100.07 99.8667 100.07-99.8666c12.29-12.2551 32.2-12.2551 44.48 0l22.24 22.1946c12.28 12.265 12.28 32.135 0 44.39z" }),
|
|
17
|
+
/* @__PURE__ */ r.jsx(
|
|
18
|
+
"rect",
|
|
19
|
+
{
|
|
20
|
+
height: "63",
|
|
21
|
+
rx: "31.5",
|
|
22
|
+
transform: "matrix(-1 -0 0 -1 864 904)",
|
|
23
|
+
width: "352",
|
|
24
|
+
x: "432",
|
|
25
|
+
y: "452"
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
] })
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
n as default
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js");function s({fill:t,...r}){return e.jsxRuntimeExports.jsx("svg",{fill:"none",height:"512",viewBox:"0 0 512 512",width:"512",xmlns:"http://www.w3.org/2000/svg",...r,children:e.jsxRuntimeExports.jsxs("g",{fill:t??"currentColor",children:[e.jsxRuntimeExports.jsx("path",{d:"m89.21 376.224 144.163-143.87c12.496-12.472 32.758-12.472 45.254 0l144.163 143.87c12.28 12.265 12.28 32.135 0 44.39l-22.24 22.195c-12.29 12.255-32.2 12.255-44.48 0l-100.07-99.867-100.07 99.867c-12.29 12.255-32.2 12.255-44.48 0l-22.24-22.195c-12.28-12.265-12.28-32.135 0-44.39z"}),e.jsxRuntimeExports.jsx("rect",{height:"63",rx:"31.5",width:"352",x:"80",y:"77"})]})})}exports.default=s;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { j as t } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
+
function i({
|
|
3
|
+
fill: r,
|
|
4
|
+
...l
|
|
5
|
+
}) {
|
|
6
|
+
return /* @__PURE__ */ t.jsx(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
fill: "none",
|
|
10
|
+
height: "512",
|
|
11
|
+
viewBox: "0 0 512 512",
|
|
12
|
+
width: "512",
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
...l,
|
|
15
|
+
children: /* @__PURE__ */ t.jsxs("g", { fill: r ?? "currentColor", children: [
|
|
16
|
+
/* @__PURE__ */ t.jsx("path", { d: "m89.21 376.224 144.163-143.87c12.496-12.472 32.758-12.472 45.254 0l144.163 143.87c12.28 12.265 12.28 32.135 0 44.39l-22.24 22.195c-12.29 12.255-32.2 12.255-44.48 0l-100.07-99.867-100.07 99.867c-12.29 12.255-32.2 12.255-44.48 0l-22.24-22.195c-12.28-12.265-12.28-32.135 0-44.39z" }),
|
|
17
|
+
/* @__PURE__ */ t.jsx("rect", { height: "63", rx: "31.5", width: "352", x: "80", y: "77" })
|
|
18
|
+
] })
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
i as default
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js");function s({fill:t,...r}){return e.jsxRuntimeExports.jsx("svg",{fill:"none",height:"512",viewBox:"0 0 512 512",width:"512",xmlns:"http://www.w3.org/2000/svg",...r,children:e.jsxRuntimeExports.jsxs("g",{fill:t??"currentColor",children:[e.jsxRuntimeExports.jsx("circle",{cx:"256",cy:"256",r:"56"}),e.jsxRuntimeExports.jsx("circle",{cx:"78",cy:"256",r:"56"}),e.jsxRuntimeExports.jsx("circle",{cx:"434",cy:"256",r:"56"})]})})}exports.default=s;
|