@kakadu/components 1.5.2 → 1.6.1
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-tooltip.js +1 -1
- package/build/components/button-tooltip.mjs +1 -1
- package/build/components/button.js +1 -1
- package/build/components/button.mjs +1 -1
- package/build/components/card.js +1 -1
- package/build/components/card.mjs +6 -6
- package/build/components/collapsible.d.ts +5 -0
- 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 +9 -9
- package/build/components/input.d.ts +27 -0
- 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 +10 -10
- package/build/components.css +1 -1
- package/build/icon-CRXHH3In.js +1 -0
- package/build/icon-Dz2YJAPU.mjs +184 -0
- package/build/icons/icon.d.ts +1 -0
- package/build/icons/icon.js +1 -1
- package/build/icons/icon.mjs +22 -157
- package/build/icons/sparkle.d.ts +2 -0
- package/build/index.d.ts +73 -69
- package/build/index.js +2 -1
- package/build/index.mjs +354 -174
- package/build/theme.d.ts +1 -1
- package/build/theme.js +1 -1
- package/build/theme.mjs +5 -5
- package/package.json +2 -2
- package/readme.md +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),n=require("@kuma-ui/core");function o({label:t,className:s}){return e.jsxRuntimeExports.jsx("div",{className:n.cx("kakadu-components-3358774822",s),children:e.jsxRuntimeExports.jsx("span",{className:"kakadu-components-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),n=require("@kuma-ui/core");function o({label:t,className:s}){return e.jsxRuntimeExports.jsx("div",{className:n.cx("kakadu-components-3358774822",s),children:e.jsxRuntimeExports.jsx("span",{className:"kakadu-components-1128219903",children:t})})}exports.default=o;
|
|
@@ -4,7 +4,7 @@ function r({
|
|
|
4
4
|
label: s,
|
|
5
5
|
className: t
|
|
6
6
|
}) {
|
|
7
|
-
return /* @__PURE__ */ o.jsx("div", { className: a("kakadu-components-3358774822", t), children: /* @__PURE__ */ o.jsx("span", { className: "kakadu-components-
|
|
7
|
+
return /* @__PURE__ */ o.jsx("div", { className: a("kakadu-components-3358774822", t), children: /* @__PURE__ */ o.jsx("span", { className: "kakadu-components-1128219903", children: s }) });
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
10
|
r as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),h=require("react"),a=require("@kuma-ui/core"),D=require("../theme.js"),T=require("../
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),h=require("react"),a=require("@kuma-ui/core"),D=require("../theme.js"),T=require("../icon-CRXHH3In.js"),G=require("./spinner.js"),I=require("./moving-gradients.js"),z=require("./moving-stars.js"),B=require("./theme-setter.js"),W=require("./click-ripples.js"),l=require("./hover-gradient.js"),$=require("./button-tooltip.js"),O=require("./aria-text.js"),P=require("./atom.js");var j=(s=>(s.primary="primary",s.secondary="secondary",s.warning="warning",s.danger="danger",s))(j||{});function k({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(T.Icon,{width:14,height:14,type:s}):s})}const y="kakadu-components-2244098950",A="kakadu-components-3923184173",S="kakadu-components-317965671",R="kakadu-components-1978976872";function C({type:s,variant:n="primary",href:o,target:r,rel:b,className:f,children:t,label:q,tooltip:m,iconLeft:u,iconRight:i,isLoading:c,hasMovingGradients:E=!1,movingGradientsCount:d=4,hasMovingStars:g=!1,movingStarsCount:p=10,..._}){const x=h.useRef(null),v=B.useIsDarkMode(x),N=s??"button",w=E&&d>0,M=g&&p>0;return e.jsxRuntimeExports.jsxs(P.default,{..._,as:o?"a":"button",type:o?void 0:N,href:o,target:r,rel:b,disabled:c,className:a.cx(D.effectStyles,"kakadu-components-1578318887",!!u&&"kakadu-components-3652831856",!t&&"kakadu-components-2746167644",n==="secondary"&&y,n==="warning"&&S,n==="danger"&&R,f),children:[u?e.jsxRuntimeExports.jsx(k,{variant:n,icon:u,className:t?"kakadu-components-294089230":void 0}):null,t?e.jsxRuntimeExports.jsx("div",{ref:x,className:"kakadu-components-2618257692",children:t}):e.jsxRuntimeExports.jsx(O.default,{children:q}),i?e.jsxRuntimeExports.jsx(k,{variant:n,icon:i,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(G.RevealSpinner,{isVisible:c})})}),w&&e.jsxRuntimeExports.jsx(I.default,{opacity:v?.4:.3,maximumGradientsCount:d,className:a.cx("kakadu-components-1505766785",n==="secondary"&&"kakadu-components-3712045697")}),M&&e.jsxRuntimeExports.jsx(z.default,{maximumStarsCount:p,className:"kakadu-components-2813474662"}),e.jsxRuntimeExports.jsx(W.default,{size:t?void 0:50}),e.jsxRuntimeExports.jsx(l.default,{size:t?void 0:50,className:n==="secondary"?l.normalBlendStyles:void 0}),m?e.jsxRuntimeExports.jsx($.default,{label:m}):null]})}exports.ButtonVariant=j;exports.buttonDangerStyles=R;exports.buttonSecondaryStyles=y;exports.buttonSuccessStyles=A;exports.buttonWarningStyles=S;exports.default=C;
|
|
@@ -2,7 +2,7 @@ import { j as o } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
|
2
2
|
import { useRef as M } from "react";
|
|
3
3
|
import { cx as t } from "@kuma-ui/core";
|
|
4
4
|
import { effectStyles as D } from "../theme.mjs";
|
|
5
|
-
import G from "../
|
|
5
|
+
import { a as G } from "../icon-Dz2YJAPU.mjs";
|
|
6
6
|
import { RevealSpinner as I } from "./spinner.mjs";
|
|
7
7
|
import R from "./moving-gradients.mjs";
|
|
8
8
|
import T from "./moving-stars.mjs";
|
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("../
|
|
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-CRXHH3In.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-2034054779",d),children:[e.jsxRuntimeExports.jsxs(t.default,{gap:.75,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.Icon,{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-425989064",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,7 +1,7 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { cx as
|
|
2
|
+
import { cx as t } from "@kuma-ui/core";
|
|
3
3
|
import { effectStyles as u } from "../theme.mjs";
|
|
4
|
-
import k,
|
|
4
|
+
import { a as k, i as f } from "../icon-Dz2YJAPU.mjs";
|
|
5
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";
|
|
@@ -9,20 +9,20 @@ 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
11
|
function G({
|
|
12
|
-
icon:
|
|
12
|
+
icon: e,
|
|
13
13
|
title: r,
|
|
14
14
|
description: i,
|
|
15
15
|
action: l,
|
|
16
|
-
href:
|
|
16
|
+
href: a,
|
|
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:
|
|
22
|
+
return /* @__PURE__ */ o.jsxs(S, { ...x, as: a ? "a" : "button", type: a ? void 0 : "button", href: a, target: c, rel: p, className: t(u, N, "kakadu-components-2034054779", d), children: [
|
|
23
23
|
/* @__PURE__ */ o.jsxs(s, { gap: 0.75, direction: "column", children: [
|
|
24
24
|
/* @__PURE__ */ o.jsx(m, { className: "kakadu-components-1301774894", children: /* @__PURE__ */ o.jsxs(s, { gap: 0.5, direction: "row", alignment: n.start, children: [
|
|
25
|
-
|
|
25
|
+
e ? /* @__PURE__ */ o.jsx(k, { width: 16, height: 16, type: e, className: t(f, "kakadu-components-782417605") }) : null,
|
|
26
26
|
r
|
|
27
27
|
] }) }),
|
|
28
28
|
/* @__PURE__ */ o.jsx(j, { className: "kakadu-components-3061837309", children: i }),
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import { type AtomProperties } from './atom';
|
|
3
|
+
export default function Collapsible<Type extends ElementType = 'div'>({ as, isCollapsed, children, className, ...properties }: AtomProperties<Type> & {
|
|
4
|
+
readonly isCollapsed?: boolean;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),o=require("react"),u=require("../
|
|
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-CRXHH3In.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 { I as r } from "../icon-Dz2YJAPU.mjs";
|
|
4
|
+
import s, { FlexAlignment as a } from "./flex.mjs";
|
|
5
|
+
import { Span as i } 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: a.start, children: [
|
|
18
|
+
/* @__PURE__ */ e.jsxs(s, { fill: !0, gap: 0.375, alignment: a.start, children: [
|
|
19
|
+
/* @__PURE__ */ e.jsx(i, { className: "kakadu-components-3772513716", children: l }),
|
|
20
|
+
/* @__PURE__ */ e.jsx(i, { 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("../
|
|
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-CRXHH3In.js"),f=require("../theme.js"),y=require("./theme-setter.js"),i=require("./button.js"),q=require("./aria-text.js"),b=require("./button-tooltip.js"),E=require("./click-ripples.js"),k=require("./hover-gradient.js");var S=(e=>(e.default="default",e.success="success",e.warning="warning",e.danger="danger",e))(S||{});function w({icon:e,variant:u="default",label:d,className:h,...j}){const g=y.useIsDarkMode(),[o,R]=s.useState(e),[m,l]=s.useState(!1),x=s.useRef(e),c=s.useRef(null);s.useEffect(()=>{x.current=e},[e]);const r=s.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null)},[]);return s.useEffect(()=>{if(o===e){l(p=>p&&!1);return}l(!0),r(),c.current=setTimeout(()=>{l(!1),R(x.current)},370)},[o,e,r]),s.useEffect(()=>()=>{r()},[r]),t.jsxRuntimeExports.jsxs("button",{...j,type:"button",className:n.cx(f.buttonResetStyles,f.effectStyles,"kakadu-components-3057735296",u==="default"&&n.cx(i.buttonSecondaryStyles,"kakadu-components-2089159949"),u==="success"&&n.cx(i.buttonSuccessStyles,"kakadu-components-1463468148"),u==="warning"&&n.cx(i.buttonWarningStyles,"kakadu-components-2686186037"),u==="danger"&&n.cx(i.buttonDangerStyles,"kakadu-components-2463905722"),h),children:[t.jsxRuntimeExports.jsxs("span",{"data-theme":u==="default"?g?"dark":"light":"dark",className:"kakadu-components-2197738751",children:[t.jsxRuntimeExports.jsx(a.Icon,{width:16,height:16,type:o,className:n.cx(a.iconShadowStyles,"kakadu-components-1309118222",m&&"kakadu-components-3602476657")}),o===e?null:t.jsxRuntimeExports.jsx(a.Icon,{width:16,height:16,type:e,className:n.cx(a.iconShadowStyles,"kakadu-components-2883440801",m&&"kakadu-components-1406924214")})]}),t.jsxRuntimeExports.jsx(q.default,{children:d}),t.jsxRuntimeExports.jsx(b.default,{label:d}),t.jsxRuntimeExports.jsx(E.default,{size:50}),t.jsxRuntimeExports.jsx(k.default,{size:50,className:u==="default"?k.normalBlendStyles:void 0})]})}exports.IconButtonVariant=S;exports.default=w;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as t } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
2
|
import { useState as f, useRef as p, useEffect as c, useCallback as j } from "react";
|
|
3
3
|
import { cx as s } from "@kuma-ui/core";
|
|
4
|
-
import k,
|
|
4
|
+
import { a as k, i as h } from "../icon-Dz2YJAPU.mjs";
|
|
5
5
|
import { buttonResetStyles as w, effectStyles as b } from "../theme.mjs";
|
|
6
6
|
import { useIsDarkMode as R } from "./theme-setter.mjs";
|
|
7
7
|
import { buttonSecondaryStyles as N, buttonSuccessStyles as T, buttonWarningStyles as D, buttonDangerStyles as I } from "./button.mjs";
|
|
@@ -17,24 +17,24 @@ function U({
|
|
|
17
17
|
className: S,
|
|
18
18
|
...g
|
|
19
19
|
}) {
|
|
20
|
-
const x = R(), [r, y] = f(e), [l,
|
|
20
|
+
const x = R(), [r, y] = f(e), [l, u] = f(!1), d = p(e), n = p(null);
|
|
21
21
|
c(() => {
|
|
22
22
|
d.current = e;
|
|
23
23
|
}, [e]);
|
|
24
|
-
const
|
|
24
|
+
const a = j(() => {
|
|
25
25
|
n.current && (clearTimeout(n.current), n.current = null);
|
|
26
26
|
}, []);
|
|
27
27
|
return c(() => {
|
|
28
28
|
if (r === e) {
|
|
29
|
-
|
|
29
|
+
u((i) => i && !1);
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
u(!0), a(), n.current = setTimeout(() => {
|
|
33
|
+
u(!1), y(d.current);
|
|
34
34
|
}, 370);
|
|
35
|
-
}, [r, e,
|
|
36
|
-
|
|
37
|
-
}, [
|
|
35
|
+
}, [r, e, a]), c(() => () => {
|
|
36
|
+
a();
|
|
37
|
+
}, [a]), /* @__PURE__ */ t.jsxs("button", { ...g, type: "button", className: s(w, b, "kakadu-components-3057735296", o === "default" && s(N, "kakadu-components-2089159949"), o === "success" && s(T, "kakadu-components-1463468148"), o === "warning" && s(D, "kakadu-components-2686186037"), o === "danger" && s(I, "kakadu-components-2463905722"), S), children: [
|
|
38
38
|
/* @__PURE__ */ t.jsxs("span", { "data-theme": o === "default" ? x ? "dark" : "light" : "dark", className: "kakadu-components-2197738751", children: [
|
|
39
39
|
/* @__PURE__ */ t.jsx(k, { width: 16, height: 16, type: r, className: s(h, "kakadu-components-1309118222", l && "kakadu-components-3602476657") }),
|
|
40
40
|
r === e ? null : /* @__PURE__ */ t.jsx(k, { width: 16, height: 16, type: e, className: s(h, "kakadu-components-2883440801", l && "kakadu-components-1406924214") })
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ChangeEvent, type HTMLProps, type ReactNode } from 'react';
|
|
2
|
+
export declare const errorParagraph: string;
|
|
3
|
+
type LabelProperties = HTMLProps<HTMLLabelElement> & {
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly error?: Error | ReactNode | string;
|
|
6
|
+
readonly errorId?: string;
|
|
7
|
+
readonly warning?: Error | ReactNode | string;
|
|
8
|
+
readonly warningId?: string;
|
|
9
|
+
readonly footnote?: ReactNode;
|
|
10
|
+
readonly attachments?: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
type ControllerProperties = Omit<LabelProperties, 'errorId' | 'warningId' | 'attachments'>;
|
|
13
|
+
export type SelectOption = {
|
|
14
|
+
readonly value: string;
|
|
15
|
+
readonly label: ReactNode | string;
|
|
16
|
+
};
|
|
17
|
+
export declare function Select({ label, options, error, warning, footnote, className, ...properties }: ControllerProperties & HTMLProps<HTMLSelectElement> & {
|
|
18
|
+
readonly options: SelectOption[];
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default function Input({ type, label, error, warning, footnote, suggestion, hasCopyButton, hasClearButton, isMultiline, onChange, className, ...properties }: Omit<ControllerProperties & HTMLProps<HTMLInputElement | HTMLTextAreaElement>, 'onChange'> & {
|
|
21
|
+
readonly suggestion?: string;
|
|
22
|
+
readonly hasCopyButton?: boolean;
|
|
23
|
+
readonly hasClearButton?: boolean;
|
|
24
|
+
readonly isMultiline?: boolean;
|
|
25
|
+
readonly onChange?: (value: string, event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("../jsx-runtime-BB_1_6y_.js"),F=require("react"),le=require("@kuma-ui/core"),Ne=require("react-dom"),xe=require("../
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("../jsx-runtime-BB_1_6y_.js"),F=require("react"),le=require("@kuma-ui/core"),Ne=require("react-dom"),xe=require("../icon-CRXHH3In.js"),Pe=require("../theme.js"),je=require("./text-button.js");function ye(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 u=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(t,a,u.get?u:{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 me=["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=me.join(","),ge=typeof Element>"u",z=ge?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,re=!ge&&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 u=e==null||(a=e.getAttribute)===null||a===void 0?void 0:a.call(e,"inert"),l=u===""||u==="true",n=l||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"},Te=function(e,t,a){if(ae(e))return[];var u=Array.prototype.slice.apply(e.querySelectorAll(te));return t&&z.call(e,te)&&u.unshift(e),u=u.filter(a),u},ne=function(e,t,a){for(var u=[],l=Array.from(e);l.length;){var n=l.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?u.push.apply(u,E):u.push({scopeParent:n,candidates:E})}else{var O=z.call(n,te);O&&a.filter(n)&&(t||!e.includes(n))&&u.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?u.push.apply(u,A):u.push({scopeParent:n,candidates:A})}else l.unshift.apply(l,n.children)}}return u},we=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},V=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Ce(e))&&!we(e)?0:e.tabIndex},Ie=function(e,t){var a=V(e);return a<0&&t&&!we(e)?0:a},Ae=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ee=function(e){return e.tagName==="INPUT"},_e=function(e){return Ee(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+'"]')},u;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")u=a(window.CSS.escape(e.name));else try{u=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 l=Me(u,e.form);return!l||l===e},Ke=function(e){return Ee(e)&&e.type==="radio"},qe=function(e){return Ke(e)&&!Be(e)},Ve=function(e){var t,a=e&&re(e),u=(t=a)===null||t===void 0?void 0:t.host,l=!1;if(a&&a!==e){var n,p,y;for(l=!!((n=u)!==null&&n!==void 0&&(p=n.ownerDocument)!==null&&p!==void 0&&p.contains(u)||e!=null&&(y=e.ownerDocument)!==null&&y!==void 0&&y.contains(e));!l&&u;){var E,O,D;a=re(u),u=(E=a)===null||E===void 0?void 0:E.host,l=!!((O=u)!==null&&O!==void 0&&(D=O.ownerDocument)!==null&&D!==void 0&&D.contains(u))}}return l},fe=function(e){var t=e.getBoundingClientRect(),a=t.width,u=t.height;return a===0&&u===0},$e=function(e,t){var a=t.displayCheck,u=t.getShadowRoot;if(a==="full-native"&&"checkVisibility"in e){var l=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!l}if(getComputedStyle(e).visibility==="hidden")return!0;var n=z.call(e,"details>summary:first-of-type"),p=n?e.parentElement:e;if(z.call(p,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="full-native"||a==="legacy-full"){if(typeof u=="function"){for(var y=e;e;){var E=e.parentElement,O=re(e);if(E&&!E.shadowRoot&&u(E)===!0)return fe(e);e.assignedSlot?e=e.assignedSlot:!E&&O!==e.ownerDocument?e=O.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 u=t.children.item(a);if(u.tagName==="LEGEND")return z.call(t,"fieldset[disabled] *")?!0:!u.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)||V(t)<0||!ie(e,t))},Ue=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ke=function(e){var t=[],a=[];return e.forEach(function(u,l){var n=!!u.scopeParent,p=n?u.scopeParent:u,y=Ie(p,n),E=n?ke(u.candidates):p;y===0?n?t.push.apply(t,E):t.push(p):a.push({documentOrder:l,tabIndex:y,item:u,isScope:n,content:E})}),a.sort(Ae).reduce(function(u,l){return l.isScope?u.push.apply(u,l.content):u.push(l.content),u},[]).concat(t)},Se=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=Te(e,t.includeContainer,se.bind(null,t)),ke(a)},Fe=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=Te(e,t.includeContainer,ie.bind(null,t)),a},W=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return z.call(e,te)===!1?!1:se(t,e)},We=me.concat("iframe:not([inert]):not([inert] *)").join(","),ee=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return z.call(e,We)===!1?!1:ie(t,e)};const ze=Object.freeze(Object.defineProperty({__proto__:null,focusable:Fe,getTabIndex:V,isFocusable:ee,isTabbable:W,tabbable:Se},Symbol.toStringTag,{value:"Module"}));/*!
|
|
@@ -2,7 +2,7 @@ import { j as C } 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 je } from "react";
|
|
3
3
|
import { cx as pe } from "@kuma-ui/core";
|
|
4
4
|
import { createPortal as xe } from "react-dom";
|
|
5
|
-
import {
|
|
5
|
+
import { I as _e } from "../icon-Dz2YJAPU.mjs";
|
|
6
6
|
import Le from "../theme.mjs";
|
|
7
7
|
import Be from "./text-button.mjs";
|
|
8
8
|
function we(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 n=require("../jsx-runtime-BB_1_6y_.js"),t=require("@kuma-ui/core"),c=require("../icon-CRXHH3In.js"),l=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:o,...d}){const i=s==="success",m=s==="warning",k=s==="danger",e=!!a,x=!!o;return n.jsxRuntimeExports.jsxs("aside",{...d,className:t.cx("kakadu-components-925362255",e&&"kakadu-components-2945174293",i&&(e?"kakadu-components-2585123369":"kakadu-components-1387450724"),m&&(e?"kakadu-components-3502407303":"kakadu-components-1612824642"),k&&(e?"kakadu-components-314765189":"kakadu-components-4209515987"),u),children:[n.jsxRuntimeExports.jsx("div",{"data-theme":"dark",className:t.cx("kakadu-components-3327291559",e&&"kakadu-components-3906762683"),children:a&&n.jsxRuntimeExports.jsx(c.Icon,{width:14,height:14,type:a,className:c.iconShadowStyles})}),n.jsxRuntimeExports.jsx(l.Span,{className:"kakadu-components-1969958615",children:x?o:n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:" "})})]})}exports.NoticeType=r;exports.default=p;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as s } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
2
|
import { cx as t } from "@kuma-ui/core";
|
|
3
|
-
import i,
|
|
3
|
+
import { a as i, i as l } from "../icon-Dz2YJAPU.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", n = !!o, u = !!e;
|
|
14
|
+
return /* @__PURE__ */ s.jsxs("aside", { ...r, className: t("kakadu-components-925362255", n && "kakadu-components-2945174293", d && (n ? "kakadu-components-2585123369" : "kakadu-components-1387450724"), m && (n ? "kakadu-components-3502407303" : "kakadu-components-1612824642"), k && (n ? "kakadu-components-314765189" : "kakadu-components-4209515987"), c), children: [
|
|
15
|
+
/* @__PURE__ */ s.jsx("div", { "data-theme": "dark", className: t("kakadu-components-3327291559", n && "kakadu-components-3906762683"), children: o && /* @__PURE__ */ s.jsx(i, { width: 14, height: 14, type: o, className: l }) }),
|
|
16
|
+
/* @__PURE__ */ s.jsx(p, { className: "kakadu-components-1969958615", children: u ? e : /* @__PURE__ */ s.jsx(s.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"),r=require("../
|
|
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"),r=require("../icon-CRXHH3In.js"),x=require("./flex.js"),y=require("./text.js"),E=require("./click-ripples.js"),m=require("./hover-gradient.js"),q=require("./button-tooltip.js"),_=require("./aria-text.js"),v=require("./atom.js");var l=(t=>(t.primary="primary",t.delete="delete",t))(l||{});const R="kakadu-components-4017654514";function B({iconLeft:t,iconRight:n,variant:p="primary",tooltip:u,href:a,target:c,rel:i,className:d,children:s,label:k,...j}){return e.jsxRuntimeExports.jsxs(v.default,{...j,as:a?"a":"button",type:a?void 0:"button",href:a,target:c,rel:i,className:o.cx(y.textShadowStyles,"kakadu-components-3563685584",s&&(t||n)?o.cx(!!t&&"kakadu-components-497190725",!!n&&"kakadu-components-3729381008"):"kakadu-components-3866032606",p==="delete"&&R,d),children:[e.jsxRuntimeExports.jsxs(x.default,{direction:"row",gap:.5,alignment:x.FlexAlignment.center,children:[t?e.jsxRuntimeExports.jsx("div",{className:o.cx("kakadu-components-3184610208",s?"kakadu-components-602380047":"kakadu-components-233407571"),children:typeof t=="string"?e.jsxRuntimeExports.jsx(r.Icon,{width:14,height:14,type:t}):t}):null,s?e.jsxRuntimeExports.jsx("span",{className:"kakadu-components-1760622304",children:s}):e.jsxRuntimeExports.jsx(_.default,{children:k}),n?e.jsxRuntimeExports.jsx("div",{className:o.cx("kakadu-components-3184610208",s?"kakadu-components-1681694072":"kakadu-components-233407571"),children:typeof n=="string"?e.jsxRuntimeExports.jsx(r.Icon,{width:14,height:14,type:n}):n}):null]}),e.jsxRuntimeExports.jsxs("span",{className:"kakadu-components-1343580459",children:[e.jsxRuntimeExports.jsx(E.default,{size:s?void 0:50}),e.jsxRuntimeExports.jsx(m.default,{size:s?void 0:50,className:m.normalBlendStyles}),u?e.jsxRuntimeExports.jsx(q.default,{label:u}):null]})]})}exports.TextButtonVariant=l;exports.default=B;
|
|
@@ -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 r from "../
|
|
3
|
+
import { a as r } from "../icon-Dz2YJAPU.mjs";
|
|
4
4
|
import i, { FlexAlignment as c } from "./flex.mjs";
|
|
5
5
|
import { textShadowStyles as j } from "./text.mjs";
|
|
6
6
|
import y from "./click-ripples.mjs";
|
|
@@ -8,10 +8,10 @@ import B, { normalBlendStyles as f } from "./hover-gradient.mjs";
|
|
|
8
8
|
import v from "./button-tooltip.mjs";
|
|
9
9
|
import N from "./aria-text.mjs";
|
|
10
10
|
import w from "./atom.mjs";
|
|
11
|
-
var S = /* @__PURE__ */ ((
|
|
11
|
+
var S = /* @__PURE__ */ ((a) => (a.primary = "primary", a.delete = "delete", a))(S || {});
|
|
12
12
|
const b = "kakadu-components-4017654514";
|
|
13
13
|
function I({
|
|
14
|
-
iconLeft:
|
|
14
|
+
iconLeft: a,
|
|
15
15
|
iconRight: s,
|
|
16
16
|
variant: p = "primary",
|
|
17
17
|
tooltip: n,
|
|
@@ -19,19 +19,19 @@ function I({
|
|
|
19
19
|
target: l,
|
|
20
20
|
rel: d,
|
|
21
21
|
className: k,
|
|
22
|
-
children:
|
|
22
|
+
children: e,
|
|
23
23
|
label: u,
|
|
24
24
|
...x
|
|
25
25
|
}) {
|
|
26
|
-
return /* @__PURE__ */ o.jsxs(w, { ...x, as: m ? "a" : "button", type: m ? void 0 : "button", href: m, target: l, rel: d, className: t(j, "kakadu-components-3563685584",
|
|
26
|
+
return /* @__PURE__ */ o.jsxs(w, { ...x, as: m ? "a" : "button", type: m ? void 0 : "button", href: m, target: l, rel: d, className: t(j, "kakadu-components-3563685584", e && (a || s) ? t(!!a && "kakadu-components-497190725", !!s && "kakadu-components-3729381008") : "kakadu-components-3866032606", p === "delete" && b, k), children: [
|
|
27
27
|
/* @__PURE__ */ o.jsxs(i, { direction: "row", gap: 0.5, alignment: c.center, children: [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
s ? /* @__PURE__ */ o.jsx("div", { className: t("kakadu-components-3184610208",
|
|
28
|
+
a ? /* @__PURE__ */ o.jsx("div", { className: t("kakadu-components-3184610208", e ? "kakadu-components-602380047" : "kakadu-components-233407571"), children: typeof a == "string" ? /* @__PURE__ */ o.jsx(r, { width: 14, height: 14, type: a }) : a }) : null,
|
|
29
|
+
e ? /* @__PURE__ */ o.jsx("span", { className: "kakadu-components-1760622304", children: e }) : /* @__PURE__ */ o.jsx(N, { children: u }),
|
|
30
|
+
s ? /* @__PURE__ */ o.jsx("div", { className: t("kakadu-components-3184610208", e ? "kakadu-components-1681694072" : "kakadu-components-233407571"), children: typeof s == "string" ? /* @__PURE__ */ o.jsx(r, { width: 14, height: 14, type: s }) : s }) : null
|
|
31
31
|
] }),
|
|
32
32
|
/* @__PURE__ */ o.jsxs("span", { className: "kakadu-components-1343580459", children: [
|
|
33
|
-
/* @__PURE__ */ o.jsx(y, { size:
|
|
34
|
-
/* @__PURE__ */ o.jsx(B, { size:
|
|
33
|
+
/* @__PURE__ */ o.jsx(y, { size: e ? void 0 : 50 }),
|
|
34
|
+
/* @__PURE__ */ o.jsx(B, { size: e ? void 0 : 50, className: f }),
|
|
35
35
|
n ? /* @__PURE__ */ o.jsx(v, { label: n }) : null
|
|
36
36
|
] })
|
|
37
37
|
] });
|