@kakadu/components 1.6.6 → 1.7.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.js +1 -1
- package/build/components/button.mjs +1 -1
- package/build/components/card.js +1 -1
- package/build/components/card.mjs +1 -1
- package/build/components/datum.js +1 -1
- package/build/components/datum.mjs +1 -1
- package/build/components/icon-button.js +1 -1
- package/build/components/icon-button.mjs +1 -1
- package/build/components/input.d.ts +9 -5
- package/build/components/input.js +2 -2
- package/build/components/input.mjs +136 -126
- 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 +1 -1
- package/build/components/text-button.js +1 -1
- package/build/components/text-button.mjs +2 -2
- package/build/components.css +1 -1
- package/build/{icon-Ci3BSxQa.mjs → icon-C6X3pQX0.mjs} +97 -83
- package/build/icon-Dw7yhWuE.js +1 -0
- package/build/icons/arrow-left.d.ts +2 -0
- package/build/icons/arrow-left.js +1 -0
- package/build/icons/arrow-left.mjs +27 -0
- package/build/icons/arrow-right.d.ts +2 -0
- package/build/icons/arrow-right.js +1 -0
- package/build/icons/arrow-right.mjs +27 -0
- package/build/icons/arrow-up.d.ts +2 -0
- package/build/icons/arrow-up.js +1 -0
- package/build/icons/arrow-up.mjs +27 -0
- package/build/icons/caret-left.d.ts +2 -0
- package/build/icons/caret-left.js +1 -0
- package/build/icons/caret-left.mjs +27 -0
- package/build/icons/caret-up.d.ts +2 -0
- package/build/icons/caret-up.js +1 -0
- package/build/icons/caret-up.mjs +27 -0
- package/build/icons/chevron-left.d.ts +2 -0
- package/build/icons/chevron-left.js +1 -0
- package/build/icons/chevron-left.mjs +27 -0
- package/build/icons/chevron-right.d.ts +2 -0
- package/build/icons/chevron-right.js +1 -0
- package/build/icons/chevron-right.mjs +27 -0
- package/build/icons/icon.d.ts +9 -2
- package/build/icons/icon.js +1 -1
- package/build/icons/icon.mjs +13 -6
- package/build/icons/kakadu-guide-glyph.js +1 -1
- package/build/icons/kakadu-guide-glyph.mjs +10 -10
- package/build/icons/kakadu-guide.js +1 -1
- package/build/icons/kakadu-guide.mjs +4 -4
- package/build/index.d.ts +33 -19
- package/build/index.js +1 -1
- package/build/index.mjs +110 -96
- package/package.json +1 -1
- package/build/icon-CRXHH3In.js +0 -1
|
@@ -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("../icon-
|
|
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-Dw7yhWuE.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 I } from "../theme.mjs";
|
|
5
|
-
import { I as D } from "../icon-
|
|
5
|
+
import { I as D } from "../icon-C6X3pQX0.mjs";
|
|
6
6
|
import { RevealSpinner as G } 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("../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("../icon-Dw7yhWuE.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.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-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,7 +1,7 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
2
|
import { cx as t } from "@kuma-ui/core";
|
|
3
3
|
import { effectStyles as u } from "../theme.mjs";
|
|
4
|
-
import { I as k, i as f } from "../icon-
|
|
4
|
+
import { I as k, i as f } from "../icon-C6X3pQX0.mjs";
|
|
5
5
|
import a, { 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";
|
|
@@ -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("../icon-Dw7yhWuE.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,6 +1,6 @@
|
|
|
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 { a as r } from "../icon-
|
|
3
|
+
import { a as r } from "../icon-C6X3pQX0.mjs";
|
|
4
4
|
import s, { FlexAlignment as a } from "./flex.mjs";
|
|
5
5
|
import { Span as i } from "./text.mjs";
|
|
6
6
|
import j, { IconButtonVariant as c } from "./icon-button.mjs";
|
|
@@ -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("../icon-Dw7yhWuE.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 { I as k, i as h } from "../icon-
|
|
4
|
+
import { I as k, i as h } from "../icon-C6X3pQX0.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 I, buttonDangerStyles as D } from "./button.mjs";
|
|
@@ -14,14 +14,18 @@ export type SelectOption = {
|
|
|
14
14
|
readonly value: string;
|
|
15
15
|
readonly label: ReactNode | string;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type SelectProperties = Omit<ControllerProperties & HTMLProps<HTMLSelectElement>, 'onChange'> & {
|
|
18
18
|
readonly options: SelectOption[];
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
readonly onChange?: (value: string, event: ChangeEvent<HTMLSelectElement>) => void;
|
|
20
|
+
};
|
|
21
|
+
export declare function Select({ label, options, error, warning, footnote, className, onChange, ...properties }: SelectProperties): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
type InputType = HTMLInputElement | HTMLTextAreaElement;
|
|
23
|
+
export type InputProperties = Omit<ControllerProperties & HTMLProps<InputType>, 'onChange'> & {
|
|
21
24
|
readonly suggestion?: string;
|
|
22
25
|
readonly hasCopyButton?: boolean;
|
|
23
26
|
readonly hasClearButton?: boolean;
|
|
24
27
|
readonly isMultiline?: boolean;
|
|
25
|
-
readonly onChange?: (value: string, event: ChangeEvent<
|
|
26
|
-
}
|
|
28
|
+
readonly onChange?: (value: string, event: ChangeEvent<InputType>) => void;
|
|
29
|
+
};
|
|
30
|
+
export default function Input({ type, label, error, warning, footnote, suggestion, hasCopyButton, hasClearButton, isMultiline, onChange, className, ...properties }: InputProperties): import("react/jsx-runtime").JSX.Element;
|
|
27
31
|
export {};
|
|
@@ -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"),
|
|
2
|
-
`):[],[r]),
|
|
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"),i=require("@kuma-ui/core"),oe=require("../icons/chevron-up.js"),P=require("../icon-Dw7yhWuE.js"),O=require("../utilities/copy-to-clipboard.js"),T=require("../theme.js"),ce=require("./button-tooltip.js"),W=require("./text-button.js"),y=require("./text.js"),re=require("./collapsible.js"),F=require("./click-ripples.js"),U=require("./hover-gradient.js"),le=require("./notification.js"),ie=require("./notice.js"),ue="kakadu-components-2065792067",xe="kakadu-components-2436386418",I="kakadu-components-3096914092",D="kakadu-components-628401705",G=i.cx(D,"kakadu-components-3245407458"),pe=i.cx(D,"kakadu-components-1117160492");function de({as:p,className:a,...u}){return e.jsxRuntimeExports.jsx(y.Span,{as:p??"span",...u,className:i.cx("kakadu-components-3574036749",a)})}function J({label:p,error:a,errorId:u,warning:o,warningId:R,footnote:s,attachments:c,className:d,children:h,...m}){const k=!!a,x=!!o,f=!!s;return e.jsxRuntimeExports.jsxs("label",{...m,className:i.cx(ue,d),children:[e.jsxRuntimeExports.jsx(y.Span,{className:i.cx(T.overflowProtectionStyles,xe),children:e.jsxRuntimeExports.jsx("span",{children:p})}),e.jsxRuntimeExports.jsxs("span",{className:"kakadu-components-448077930",children:[h,f?e.jsxRuntimeExports.jsx(de,{className:"kakadu-components-3258753754",children:s}):null,c]}),k?e.jsxRuntimeExports.jsx(y.Paragraph,{id:u,className:G,children:a instanceof Error?a.message:a}):x?e.jsxRuntimeExports.jsx(y.Paragraph,{id:R,className:pe,children:o instanceof Error?o.message:o}):null]})}function me({label:p,options:a,error:u,warning:o,footnote:R,className:s,onChange:c,...d}){const h=t.useId(),m=`${h}-error`,k=`${h}-warning`,x=!!u,f=!x&&!!o,v=x?m:f?k:void 0,{value:j}=d,[g,b]=t.useState(""),_=j??g;t.useEffect(()=>{b(typeof j=="string"?j:"")},[j]);const w=t.useCallback(n=>{const{value:S}=n.target;b(S),c==null||c(S,n)},[c]);return e.jsxRuntimeExports.jsxs(J,{label:p,error:u,warning:o,footnote:R,children:[e.jsxRuntimeExports.jsx("select",{...d,value:_,"aria-invalid":x,"data-warning":f,"aria-describedby":v,className:i.cx(I,"kakadu-components-4228384787",s),onChange:w,children:a.map(n=>e.jsxRuntimeExports.jsx("option",{value:n.value,children:n.label},n.value))}),e.jsxRuntimeExports.jsx(oe.default,{width:14,height:14,className:"kakadu-components-158931186"})]})}const je=36,z="kakadu-components-4233741488";function ke({type:p,label:a,error:u,warning:o,footnote:R,suggestion:s,hasCopyButton:c,hasClearButton:d,isMultiline:h,onChange:m,className:k,...x}){const f=t.useRef(null),v=t.useRef(null),j=t.useRef(null),g=le.useCreateNotification(),b=t.useId(),_=`${b}-error`,w=`${b}-warning`,{value:n}=x,[S,M]=t.useState(""),r=n??S,[K,Q]=t.useState(),X=p==="textarea"||!!h;t.useLayoutEffect(()=>{typeof r=="string"&&j.current&&Q(j.current.scrollHeight)},[r]);const C=t.useMemo(()=>typeof r=="string"?`${r} `.split(`
|
|
2
|
+
`):[],[r]),Y=t.useMemo(()=>C.length,[C]),N=!!u,B=!N&&!!o,$=N?_:B?w:void 0;t.useEffect(()=>{M(typeof n=="string"?n:"")},[n]);const L=t.useCallback(E=>{const{value:l}=E.target;M(l),m==null||m(l,E)},[m]),Z=t.useCallback(()=>{typeof r=="string"&&(O.default(r),g({type:ie.NoticeType.success,children:"Copied to clipboard."}))},[r,g]),q=t.useCallback(E=>{var H;const l=v.current??f.current??void 0;if(l){const A=(H=Object.getOwnPropertyDescriptor(l instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,"value"))==null?void 0:H.set;if(A){A.call(l,E);const ae=new Event("input",{bubbles:!0});l.dispatchEvent(ae),l.focus();return}}throw new Error("Unable to set value.")},[]),ee=t.useCallback(()=>{q("")},[q]),[te,se]=t.useState(""),V=!!s&&te!==s,ne=t.useCallback(()=>{if(s){try{q(s)}catch{O.default(s)}se(s)}},[s,q]);return e.jsxRuntimeExports.jsxs(J,{label:a,error:u,warning:o,footnote:R,attachments:e.jsxRuntimeExports.jsx(re.default,{isCollapsed:!V,children:V?e.jsxRuntimeExports.jsxs("button",{type:"button",className:i.cx(T.buttonResetStyles,T.overflowProtectionStyles,"kakadu-components-2355856341"),onClick:ne,children:[e.jsxRuntimeExports.jsx(ce.default,{label:"Apply suggestion"}),e.jsxRuntimeExports.jsx(P.SparkleSvg,{width:13,height:13,className:"kakadu-components-1021263934"}),e.jsxRuntimeExports.jsx(y.Span,{className:"kakadu-components-1585874956",children:s}),e.jsxRuntimeExports.jsx(F.default,{className:"kakadu-components-3448565402"}),e.jsxRuntimeExports.jsx(U.default,{})]}):null}),style:{"--button-padding":`${je*((c?1:0)+(d?1:0))}px`},children:[e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-3146929190",children:[X?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("span",{ref:j,"aria-hidden":!0,className:i.cx(I,k,"kakadu-components-2033521835"),children:[C.map((E,l)=>e.jsxRuntimeExports.jsxs("span",{children:[E,Y>1?e.jsxRuntimeExports.jsx("br",{}):null]},l))," "]}),e.jsxRuntimeExports.jsx("textarea",{...x,ref:v,rows:1,"aria-invalid":N,"data-warning":B,"aria-describedby":$,value:r,className:i.cx(I,k,"kakadu-components-2119524139"),style:{minHeight:K},onChange:L})]}):e.jsxRuntimeExports.jsx("input",{...x,ref:f,type:p??"text",value:r,"aria-invalid":N,"data-warning":B,"aria-describedby":$,className:i.cx(I,k),onChange:L}),e.jsxRuntimeExports.jsx(F.default,{className:"kakadu-components-1614211948"}),e.jsxRuntimeExports.jsx(U.default,{className:"kakadu-components-1041647916"})]}),c||d?e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-131986363",children:[c?e.jsxRuntimeExports.jsx(W.default,{iconLeft:P.IconType.copy,label:"Copy",tooltip:"Copy",className:z,onClick:Z}):null,d?e.jsxRuntimeExports.jsx(W.default,{iconLeft:P.IconType.times,label:"Clear",tooltip:"Clear",className:z,onClick:ee}):null]}):null]})}exports.Select=me;exports.default=ke;exports.errorParagraph=G;
|
|
@@ -1,165 +1,175 @@
|
|
|
1
1
|
import { j as e } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { cx as
|
|
4
|
-
import
|
|
5
|
-
import { a as
|
|
6
|
-
import
|
|
7
|
-
import { buttonResetStyles as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { Span as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { useCreateNotification as
|
|
15
|
-
import { NoticeType as
|
|
16
|
-
const
|
|
17
|
-
function
|
|
18
|
-
as:
|
|
19
|
-
className:
|
|
2
|
+
import { useRef as P, useId as Q, useState as I, useLayoutEffect as de, useMemo as O, useEffect as X, useCallback as y } from "react";
|
|
3
|
+
import { cx as r } from "@kuma-ui/core";
|
|
4
|
+
import ue from "../icons/chevron-up.mjs";
|
|
5
|
+
import { a as U, S as pe } from "../icon-C6X3pQX0.mjs";
|
|
6
|
+
import z from "../utilities/copy-to-clipboard.mjs";
|
|
7
|
+
import { buttonResetStyles as me, overflowProtectionStyles as Y } from "../theme.mjs";
|
|
8
|
+
import ke from "./button-tooltip.mjs";
|
|
9
|
+
import D from "./text-button.mjs";
|
|
10
|
+
import { Span as R, Paragraph as G } from "./text.mjs";
|
|
11
|
+
import fe from "./collapsible.mjs";
|
|
12
|
+
import q from "./click-ripples.mjs";
|
|
13
|
+
import J from "./hover-gradient.mjs";
|
|
14
|
+
import { useCreateNotification as he } from "./notification.mjs";
|
|
15
|
+
import { NoticeType as xe } from "./notice.mjs";
|
|
16
|
+
const je = "kakadu-components-2065792067", ye = "kakadu-components-2436386418", w = "kakadu-components-3096914092", Z = "kakadu-components-628401705", be = r(Z, "kakadu-components-3245407458"), ve = r(Z, "kakadu-components-1117160492");
|
|
17
|
+
function ge({
|
|
18
|
+
as: u,
|
|
19
|
+
className: a,
|
|
20
20
|
...i
|
|
21
21
|
}) {
|
|
22
|
-
return /* @__PURE__ */ e.jsx(
|
|
22
|
+
return /* @__PURE__ */ e.jsx(R, { as: u ?? "span", ...i, className: r("kakadu-components-3574036749", a) });
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
label:
|
|
26
|
-
error:
|
|
24
|
+
function _({
|
|
25
|
+
label: u,
|
|
26
|
+
error: a,
|
|
27
27
|
errorId: i,
|
|
28
|
-
warning:
|
|
29
|
-
warningId:
|
|
30
|
-
footnote:
|
|
31
|
-
attachments:
|
|
32
|
-
className:
|
|
33
|
-
children:
|
|
34
|
-
...
|
|
28
|
+
warning: s,
|
|
29
|
+
warningId: b,
|
|
30
|
+
footnote: t,
|
|
31
|
+
attachments: o,
|
|
32
|
+
className: p,
|
|
33
|
+
children: x,
|
|
34
|
+
...m
|
|
35
35
|
}) {
|
|
36
|
-
const
|
|
37
|
-
return /* @__PURE__ */ e.jsxs("label", { ...
|
|
38
|
-
/* @__PURE__ */ e.jsx(
|
|
36
|
+
const f = !!a, d = !!s, h = !!t;
|
|
37
|
+
return /* @__PURE__ */ e.jsxs("label", { ...m, className: r(je, p), children: [
|
|
38
|
+
/* @__PURE__ */ e.jsx(R, { className: r(Y, ye), children: /* @__PURE__ */ e.jsx("span", { children: u }) }),
|
|
39
39
|
/* @__PURE__ */ e.jsxs("span", { className: "kakadu-components-448077930", children: [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
x,
|
|
41
|
+
h ? /* @__PURE__ */ e.jsx(ge, { className: "kakadu-components-3258753754", children: t }) : null,
|
|
42
|
+
o
|
|
43
43
|
] }),
|
|
44
|
-
|
|
44
|
+
f ? /* @__PURE__ */ e.jsx(G, { id: i, className: be, children: a instanceof Error ? a.message : a }) : d ? /* @__PURE__ */ e.jsx(G, { id: b, className: ve, children: s instanceof Error ? s.message : s }) : null
|
|
45
45
|
] });
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
label:
|
|
49
|
-
options:
|
|
47
|
+
function We({
|
|
48
|
+
label: u,
|
|
49
|
+
options: a,
|
|
50
50
|
error: i,
|
|
51
|
-
warning:
|
|
52
|
-
footnote:
|
|
53
|
-
className:
|
|
54
|
-
|
|
51
|
+
warning: s,
|
|
52
|
+
footnote: b,
|
|
53
|
+
className: t,
|
|
54
|
+
onChange: o,
|
|
55
|
+
...p
|
|
55
56
|
}) {
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
const x = Q(), m = `${x}-error`, f = `${x}-warning`, d = !!i, h = !d && !!s, g = d ? m : h ? f : void 0, {
|
|
58
|
+
value: k
|
|
59
|
+
} = p, [N, v] = I(""), C = k ?? N;
|
|
60
|
+
X(() => {
|
|
61
|
+
v(typeof k == "string" ? k : "");
|
|
62
|
+
}, [k]);
|
|
63
|
+
const T = y((n) => {
|
|
64
|
+
const {
|
|
65
|
+
value: S
|
|
66
|
+
} = n.target;
|
|
67
|
+
v(S), o == null || o(S, n);
|
|
68
|
+
}, [o]);
|
|
69
|
+
return /* @__PURE__ */ e.jsxs(_, { label: u, error: i, warning: s, footnote: b, children: [
|
|
70
|
+
/* @__PURE__ */ e.jsx("select", { ...p, value: C, "aria-invalid": d, "data-warning": h, "aria-describedby": g, className: r(w, "kakadu-components-4228384787", t), onChange: T, children: a.map((n) => /* @__PURE__ */ e.jsx("option", { value: n.value, children: n.label }, n.value)) }),
|
|
71
|
+
/* @__PURE__ */ e.jsx(ue, { width: 14, height: 14, className: "kakadu-components-158931186" })
|
|
60
72
|
] });
|
|
61
73
|
}
|
|
62
|
-
const
|
|
63
|
-
function
|
|
64
|
-
type:
|
|
65
|
-
label:
|
|
74
|
+
const Ne = 36, K = "kakadu-components-4233741488";
|
|
75
|
+
function Fe({
|
|
76
|
+
type: u,
|
|
77
|
+
label: a,
|
|
66
78
|
error: i,
|
|
67
|
-
warning:
|
|
68
|
-
footnote:
|
|
69
|
-
suggestion:
|
|
70
|
-
hasCopyButton:
|
|
71
|
-
hasClearButton:
|
|
72
|
-
isMultiline:
|
|
73
|
-
onChange:
|
|
74
|
-
className:
|
|
75
|
-
...
|
|
79
|
+
warning: s,
|
|
80
|
+
footnote: b,
|
|
81
|
+
suggestion: t,
|
|
82
|
+
hasCopyButton: o,
|
|
83
|
+
hasClearButton: p,
|
|
84
|
+
isMultiline: x,
|
|
85
|
+
onChange: m,
|
|
86
|
+
className: f,
|
|
87
|
+
...d
|
|
76
88
|
}) {
|
|
77
|
-
const
|
|
78
|
-
value:
|
|
79
|
-
} =
|
|
80
|
-
|
|
81
|
-
typeof
|
|
82
|
-
}, [
|
|
83
|
-
const
|
|
84
|
-
`) : [], [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}, [
|
|
88
|
-
const
|
|
89
|
+
const h = P(null), g = P(null), k = P(null), N = he(), v = Q(), C = `${v}-error`, T = `${v}-warning`, {
|
|
90
|
+
value: n
|
|
91
|
+
} = d, [S, V] = I(""), l = n ?? S, [ee, te] = I(), ne = u === "textarea" || !!x;
|
|
92
|
+
de(() => {
|
|
93
|
+
typeof l == "string" && k.current && te(k.current.scrollHeight);
|
|
94
|
+
}, [l]);
|
|
95
|
+
const H = O(() => typeof l == "string" ? `${l} `.split(`
|
|
96
|
+
`) : [], [l]), ae = O(() => H.length, [H]), E = !!i, L = !E && !!s, $ = E ? C : L ? T : void 0;
|
|
97
|
+
X(() => {
|
|
98
|
+
V(typeof n == "string" ? n : "");
|
|
99
|
+
}, [n]);
|
|
100
|
+
const M = y((j) => {
|
|
89
101
|
const {
|
|
90
|
-
value:
|
|
91
|
-
} =
|
|
92
|
-
|
|
93
|
-
}, [
|
|
94
|
-
typeof
|
|
95
|
-
type:
|
|
102
|
+
value: c
|
|
103
|
+
} = j.target;
|
|
104
|
+
V(c), m == null || m(c, j);
|
|
105
|
+
}, [m]), se = y(() => {
|
|
106
|
+
typeof l == "string" && (z(l), N({
|
|
107
|
+
type: xe.success,
|
|
96
108
|
children: "Copied to clipboard."
|
|
97
109
|
}));
|
|
98
|
-
}, [
|
|
99
|
-
var
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
const
|
|
110
|
+
}, [l, N]), B = y((j) => {
|
|
111
|
+
var W;
|
|
112
|
+
const c = g.current ?? h.current ?? void 0;
|
|
113
|
+
if (c) {
|
|
114
|
+
const F = (W = Object.getOwnPropertyDescriptor(c instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype, "value")) == null ? void 0 : W.set;
|
|
115
|
+
if (F) {
|
|
116
|
+
F.call(c, j);
|
|
117
|
+
const ie = new Event("input", {
|
|
106
118
|
bubbles: !0
|
|
107
119
|
});
|
|
108
|
-
|
|
120
|
+
c.dispatchEvent(ie), c.focus();
|
|
121
|
+
return;
|
|
109
122
|
}
|
|
110
123
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
} else
|
|
123
|
-
V(n);
|
|
124
|
-
oe(n);
|
|
124
|
+
throw new Error("Unable to set value.");
|
|
125
|
+
}, []), oe = y(() => {
|
|
126
|
+
B("");
|
|
127
|
+
}, [B]), [le, ce] = I(""), A = !!t && le !== t, re = y(() => {
|
|
128
|
+
if (t) {
|
|
129
|
+
try {
|
|
130
|
+
B(t);
|
|
131
|
+
} catch {
|
|
132
|
+
z(t);
|
|
133
|
+
}
|
|
134
|
+
ce(t);
|
|
125
135
|
}
|
|
126
|
-
}, [
|
|
127
|
-
return /* @__PURE__ */ e.jsxs(
|
|
128
|
-
/* @__PURE__ */ e.jsx(
|
|
136
|
+
}, [t, B]);
|
|
137
|
+
return /* @__PURE__ */ e.jsxs(_, { label: a, error: i, warning: s, footnote: b, attachments: /* @__PURE__ */ e.jsx(fe, { isCollapsed: !A, children: A ? /* @__PURE__ */ e.jsxs("button", { type: "button", className: r(me, Y, "kakadu-components-2355856341"), onClick: re, children: [
|
|
138
|
+
/* @__PURE__ */ e.jsx(ke, { label: "Apply suggestion" }),
|
|
129
139
|
/* @__PURE__ */ e.jsx(pe, { width: 13, height: 13, className: "kakadu-components-1021263934" }),
|
|
130
|
-
/* @__PURE__ */ e.jsx(
|
|
131
|
-
/* @__PURE__ */ e.jsx(
|
|
132
|
-
/* @__PURE__ */ e.jsx(
|
|
140
|
+
/* @__PURE__ */ e.jsx(R, { className: "kakadu-components-1585874956", children: t }),
|
|
141
|
+
/* @__PURE__ */ e.jsx(q, { className: "kakadu-components-3448565402" }),
|
|
142
|
+
/* @__PURE__ */ e.jsx(J, {})
|
|
133
143
|
] }) : null }), style: {
|
|
134
|
-
"--button-padding": `${
|
|
144
|
+
"--button-padding": `${Ne * ((o ? 1 : 0) + (p ? 1 : 0))}px`
|
|
135
145
|
}, children: [
|
|
136
146
|
/* @__PURE__ */ e.jsxs("div", { className: "kakadu-components-3146929190", children: [
|
|
137
|
-
|
|
138
|
-
/* @__PURE__ */ e.jsxs("span", { ref:
|
|
139
|
-
|
|
147
|
+
ne ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
148
|
+
/* @__PURE__ */ e.jsxs("span", { ref: k, "aria-hidden": !0, className: r(w, f, "kakadu-components-2033521835"), children: [
|
|
149
|
+
H.map((j, c) => (
|
|
140
150
|
// eslint-disable-next-line react/no-array-index-key
|
|
141
151
|
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
] },
|
|
152
|
+
j,
|
|
153
|
+
ae > 1 ? /* @__PURE__ */ e.jsx("br", {}) : null
|
|
154
|
+
] }, c)
|
|
145
155
|
)),
|
|
146
156
|
" "
|
|
147
157
|
] }),
|
|
148
|
-
/* @__PURE__ */ e.jsx("textarea", { ...
|
|
149
|
-
minHeight:
|
|
150
|
-
}, onChange:
|
|
151
|
-
] }) : /* @__PURE__ */ e.jsx("input", { ...
|
|
152
|
-
/* @__PURE__ */ e.jsx(
|
|
153
|
-
/* @__PURE__ */ e.jsx(
|
|
158
|
+
/* @__PURE__ */ e.jsx("textarea", { ...d, ref: g, rows: 1, "aria-invalid": E, "data-warning": L, "aria-describedby": $, value: l, className: r(w, f, "kakadu-components-2119524139"), style: {
|
|
159
|
+
minHeight: ee
|
|
160
|
+
}, onChange: M })
|
|
161
|
+
] }) : /* @__PURE__ */ e.jsx("input", { ...d, ref: h, type: u ?? "text", value: l, "aria-invalid": E, "data-warning": L, "aria-describedby": $, className: r(w, f), onChange: M }),
|
|
162
|
+
/* @__PURE__ */ e.jsx(q, { className: "kakadu-components-1614211948" }),
|
|
163
|
+
/* @__PURE__ */ e.jsx(J, { className: "kakadu-components-1041647916" })
|
|
154
164
|
] }),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
165
|
+
o || p ? /* @__PURE__ */ e.jsxs("div", { className: "kakadu-components-131986363", children: [
|
|
166
|
+
o ? /* @__PURE__ */ e.jsx(D, { iconLeft: U.copy, label: "Copy", tooltip: "Copy", className: K, onClick: se }) : null,
|
|
167
|
+
p ? /* @__PURE__ */ e.jsx(D, { iconLeft: U.times, label: "Clear", tooltip: "Clear", className: K, onClick: oe }) : null
|
|
158
168
|
] }) : null
|
|
159
169
|
] });
|
|
160
170
|
}
|
|
161
171
|
export {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
172
|
+
We as Select,
|
|
173
|
+
Fe as default,
|
|
174
|
+
be as errorParagraph
|
|
165
175
|
};
|
|
@@ -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("../icon-
|
|
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-Dw7yhWuE.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 { a as _e } from "../icon-
|
|
5
|
+
import { a as _e } from "../icon-C6X3pQX0.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 n=require("../jsx-runtime-BB_1_6y_.js"),t=require("@kuma-ui/core"),c=require("../icon-
|
|
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-Dw7yhWuE.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
1
|
import { j as s } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
2
|
import { cx as t } from "@kuma-ui/core";
|
|
3
|
-
import { I as i, i as l } from "../icon-
|
|
3
|
+
import { I as i, i as l } from "../icon-C6X3pQX0.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({
|
|
@@ -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("../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"),r=require("../icon-Dw7yhWuE.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-2031441451",s?"kakadu-components-2885581246":"kakadu-components-572005744"),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 { I as r } from "../icon-
|
|
3
|
+
import { I as r } from "../icon-C6X3pQX0.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";
|
|
@@ -25,7 +25,7 @@ function H({
|
|
|
25
25
|
}) {
|
|
26
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", a && (e || s) ? t(!!e && "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
|
-
e ? /* @__PURE__ */ o.jsx("div", { className: t("kakadu-components-
|
|
28
|
+
e ? /* @__PURE__ */ o.jsx("div", { className: t("kakadu-components-2031441451", a ? "kakadu-components-2885581246" : "kakadu-components-572005744"), children: typeof e == "string" ? /* @__PURE__ */ o.jsx(r, { width: 14, height: 14, type: e }) : e }) : null,
|
|
29
29
|
a ? /* @__PURE__ */ o.jsx("span", { className: "kakadu-components-1760622304", children: a }) : /* @__PURE__ */ o.jsx(N, { children: u }),
|
|
30
30
|
s ? /* @__PURE__ */ o.jsx("div", { className: t("kakadu-components-3184610208", a ? "kakadu-components-1681694072" : "kakadu-components-233407571"), children: typeof s == "string" ? /* @__PURE__ */ o.jsx(r, { width: 14, height: 14, type: s }) : s }) : null
|
|
31
31
|
] }),
|