@kakadu/components 3.15.5 → 4.0.0

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.
Files changed (55) hide show
  1. package/build/components/button-tooltip.d.ts +2 -4
  2. package/build/components/button-tooltip.js +1 -1
  3. package/build/components/button-tooltip.mjs +11 -11
  4. package/build/components/button.d.ts +2 -6
  5. package/build/components/button.js +1 -1
  6. package/build/components/button.mjs +51 -51
  7. package/build/components/card.js +1 -1
  8. package/build/components/card.mjs +22 -22
  9. package/build/components/copy-icon-button.js +1 -1
  10. package/build/components/copy-icon-button.mjs +20 -21
  11. package/build/components/datum.js +1 -1
  12. package/build/components/datum.mjs +12 -12
  13. package/build/components/flex.d.ts +13 -9
  14. package/build/components/flex.js +1 -1
  15. package/build/components/flex.mjs +25 -15
  16. package/build/components/footer.d.ts +3 -6
  17. package/build/components/footer.js +1 -1
  18. package/build/components/footer.mjs +33 -33
  19. package/build/components/header.js +1 -1
  20. package/build/components/header.mjs +4 -5
  21. package/build/components/icon-button.d.ts +2 -6
  22. package/build/components/icon-button.js +1 -1
  23. package/build/components/icon-button.mjs +41 -41
  24. package/build/components/input.d.ts +1 -1
  25. package/build/components/input.js +2 -2
  26. package/build/components/input.mjs +64 -66
  27. package/build/components/kakadu-guide-logo.d.ts +2 -4
  28. package/build/components/kakadu-guide-logo.js +1 -1
  29. package/build/components/kakadu-guide-logo.mjs +13 -13
  30. package/build/components/modal.js +1 -1
  31. package/build/components/modal.mjs +64 -65
  32. package/build/components/notice.d.ts +2 -7
  33. package/build/components/notice.js +1 -1
  34. package/build/components/notice.mjs +16 -16
  35. package/build/components/notification.d.ts +2 -1
  36. package/build/components/notification.js +1 -1
  37. package/build/components/notification.mjs +9 -9
  38. package/build/components/separator.js +1 -1
  39. package/build/components/separator.mjs +25 -25
  40. package/build/components/text-button.d.ts +2 -4
  41. package/build/components/text-button.js +1 -1
  42. package/build/components/text-button.mjs +26 -27
  43. package/build/components/text.d.ts +1 -1
  44. package/build/components/text.js +1 -1
  45. package/build/components/text.mjs +29 -30
  46. package/build/components/wrapper.d.ts +3 -6
  47. package/build/components/wrapper.js +1 -1
  48. package/build/components/wrapper.mjs +25 -23
  49. package/build/components.css +1 -1
  50. package/build/icons/icon.d.ts +2 -41
  51. package/build/icons/icon.js +1 -1
  52. package/build/icons/icon.mjs +71 -72
  53. package/build/index.js +1 -1
  54. package/build/index.mjs +188 -187
  55. package/package.json +1 -1
@@ -1,71 +1,71 @@
1
1
  import { j as e } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { cx as c } from "@kuma-ui/core";
3
- import l from "../theme.mjs";
4
- import t, { FlexAlignment as n } from "./flex.mjs";
5
- import { Paragraph as s, Span as h } from "./text.mjs";
6
- import u from "./kakadu-logo.mjs";
7
- import p from "./moving-stars.mjs";
8
- import m from "./aria-text.mjs";
9
- import x, { WrapperWidth as j } from "./wrapper.mjs";
10
- const i = "kakadu-components-975968984";
11
- function o(a) {
12
- return !!(a && a.trim() !== "");
2
+ import { cx as i } from "@kuma-ui/core";
3
+ import d from "../theme.mjs";
4
+ import a from "./flex.mjs";
5
+ import { Paragraph as s, Span as l } from "./text.mjs";
6
+ import h from "./kakadu-logo.mjs";
7
+ import u from "./moving-stars.mjs";
8
+ import p from "./aria-text.mjs";
9
+ import m from "./wrapper.mjs";
10
+ const n = "kakadu-components-975968984";
11
+ function o(t) {
12
+ return !!(t && t.trim() !== "");
13
13
  }
14
- var k = /* @__PURE__ */ ((a) => (a.privacyPolicy = "privacyPolicy", a.ethicalGuidelines = "ethicalGuidelines", a.security = "security", a))(k || {});
15
- function K({
16
- width: a = j.page,
14
+ const S = ["privacyPolicy", "ethicalGuidelines", "security"];
15
+ function v({
16
+ width: t = "page",
17
17
  links: r,
18
- className: d
18
+ className: c
19
19
  }) {
20
- return /* @__PURE__ */ e.jsxs(x, { as: "footer", gap: 2, "data-theme": "dark", width: a, className: c(l, "kakadu-components-1574406446", d), children: [
21
- /* @__PURE__ */ e.jsxs(t, { wrap: !0, direction: "row", gap: 4, className: "kakadu-components-783629418", children: [
22
- /* @__PURE__ */ e.jsxs(t, { direction: "column", alignment: n.start, gap: 0.5, children: [
20
+ return /* @__PURE__ */ e.jsxs(m, { as: "footer", gap: 2, "data-theme": "dark", width: t, className: i(d, "kakadu-components-1574406446", c), children: [
21
+ /* @__PURE__ */ e.jsxs(a, { wrap: !0, direction: "row", gap: 4, className: "kakadu-components-783629418", children: [
22
+ /* @__PURE__ */ e.jsxs(a, { direction: "column", preset: "start", gap: 0.5, children: [
23
23
  /* @__PURE__ */ e.jsx(s, { children: /* @__PURE__ */ e.jsx("strong", { children: "Products" }) }),
24
- /* @__PURE__ */ e.jsxs(s, { as: "ul", className: i, children: [
24
+ /* @__PURE__ */ e.jsxs(s, { as: "ul", className: n, children: [
25
25
  /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: "https://guide.kakadu.no", children: "Kakadu Guide" }) }),
26
26
  /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: "https://utforsk.kakadu.no/kakadu-start", children: "Kakadu Kolibri" }) })
27
27
  ] })
28
28
  ] }),
29
- /* @__PURE__ */ e.jsxs(t, { direction: "column", alignment: n.start, gap: 0.5, children: [
29
+ /* @__PURE__ */ e.jsxs(a, { direction: "column", preset: "start", gap: 0.5, children: [
30
30
  /* @__PURE__ */ e.jsx(s, { children: /* @__PURE__ */ e.jsx("strong", { children: "Results" }) }),
31
- /* @__PURE__ */ e.jsxs(s, { as: "ul", className: i, children: [
31
+ /* @__PURE__ */ e.jsxs(s, { as: "ul", className: n, children: [
32
32
  /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: "https://utforsk.kakadu.no", children: "Case studies" }) }),
33
33
  /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: "https://utforsk.kakadu.no", children: "Impact measurement" }) })
34
34
  ] })
35
35
  ] }),
36
- /* @__PURE__ */ e.jsxs(t, { direction: "column", alignment: n.start, gap: 0.5, children: [
36
+ /* @__PURE__ */ e.jsxs(a, { direction: "column", preset: "start", gap: 0.5, children: [
37
37
  /* @__PURE__ */ e.jsx(s, { children: /* @__PURE__ */ e.jsx("strong", { children: "About us" }) }),
38
- /* @__PURE__ */ e.jsxs(s, { as: "ul", className: i, children: [
38
+ /* @__PURE__ */ e.jsxs(s, { as: "ul", className: n, children: [
39
39
  /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: "https://utforsk.kakadu.no", children: "Our story" }) }),
40
40
  /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: "https://utforsk.kakadu.no/kontakt-oss", children: "Contact" }) }),
41
41
  /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { target: "_blank", rel: "noopener noreferrer", href: "https://kakadu.instatus.com", children: "Status" }) })
42
42
  ] })
43
43
  ] }),
44
- /* @__PURE__ */ e.jsxs(t, { direction: "column", alignment: n.start, gap: 0.5, children: [
44
+ /* @__PURE__ */ e.jsxs(a, { direction: "column", preset: "start", gap: 0.5, children: [
45
45
  /* @__PURE__ */ e.jsx(s, { children: /* @__PURE__ */ e.jsx("strong", { children: "Compliance" }) }),
46
- /* @__PURE__ */ e.jsxs(s, { as: "ul", className: i, children: [
46
+ /* @__PURE__ */ e.jsxs(s, { as: "ul", className: n, children: [
47
47
  /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: o(r == null ? void 0 : r.privacyPolicy) ? r.privacyPolicy : "https://utforsk.kakadu.no/personvernerklaering", children: "Privacy policy" }) }),
48
48
  /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: o(r == null ? void 0 : r.ethicalGuidelines) ? r.ethicalGuidelines : "https://utforsk.kakadu.no/etiske-retningslinjer", children: "Ethical guidelines" }) }),
49
49
  /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx("a", { href: o(r == null ? void 0 : r.security) ? r.security : "https://utforsk.kakadu.no/personvernerklaering", children: "Security" }) })
50
50
  ] })
51
51
  ] }),
52
- /* @__PURE__ */ e.jsx(t, { fill: !0, className: "kakadu-components-3520395370", children: /* @__PURE__ */ e.jsx("a", { href: "https://businessnorway.com/made-in-norway", target: "_blank", rel: "noopener noreferrer", className: "kakadu-components-3521477705", children: /* @__PURE__ */ e.jsx("img", { alt: "Made in Norway", src: "https://cdn.prod.website-files.com/65a686387a785640fecc9b9d/68f09646a6d6e62b6839c38c_made_in_norway_logo.png", width: 76, className: "kakadu-components-2329568054" }) }) })
52
+ /* @__PURE__ */ e.jsx(a, { fill: !0, className: "kakadu-components-3520395370", children: /* @__PURE__ */ e.jsx("a", { href: "https://businessnorway.com/made-in-norway", target: "_blank", rel: "noopener noreferrer", className: "kakadu-components-3521477705", children: /* @__PURE__ */ e.jsx("img", { alt: "Made in Norway", src: "https://cdn.prod.website-files.com/65a686387a785640fecc9b9d/68f09646a6d6e62b6839c38c_made_in_norway_logo.png", width: 76, className: "kakadu-components-2329568054" }) }) })
53
53
  ] }),
54
- /* @__PURE__ */ e.jsxs(t, { direction: "row", gap: 1, className: c("kakadu-components-2089456404"), children: [
54
+ /* @__PURE__ */ e.jsxs(a, { direction: "row", gap: 1, className: i("kakadu-components-2089456404"), children: [
55
55
  /* @__PURE__ */ e.jsxs("a", { href: "https://kakadu.no", children: [
56
- /* @__PURE__ */ e.jsx(m, { children: "Kakadu.no" }),
57
- /* @__PURE__ */ e.jsx(u, { width: 90, className: "kakadu-components-3695148669" })
56
+ /* @__PURE__ */ e.jsx(p, { children: "Kakadu.no" }),
57
+ /* @__PURE__ */ e.jsx(h, { width: 90, className: "kakadu-components-3695148669" })
58
58
  ] }),
59
- /* @__PURE__ */ e.jsxs(h, { className: "kakadu-components-1125118494", children: [
59
+ /* @__PURE__ */ e.jsxs(l, { className: "kakadu-components-1125118494", children: [
60
60
  "© ",
61
61
  (/* @__PURE__ */ new Date()).getFullYear(),
62
62
  " Kakadu Ignite AS"
63
63
  ] })
64
64
  ] }),
65
- /* @__PURE__ */ e.jsx(p, {})
65
+ /* @__PURE__ */ e.jsx(u, {})
66
66
  ] });
67
67
  }
68
68
  export {
69
- k as FooterLinkItem,
70
- K as default
69
+ v as default,
70
+ S as footerLinkItems
71
71
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../jsx-runtime-BB_1_6y_.js"),o=require("@kuma-ui/core"),s=require("./wrapper.js"),a=require("./flex.js");function u({as:e,className:n,...t}){return r.jsxRuntimeExports.jsx(s.default,{...t,wrap:!0,as:e??"header",direction:"row",alignment:a.FlexAlignment.space_between,className:o.cx("kakadu-components-866714386",n),innerClassName:"kakadu-components-479363365"})}exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../jsx-runtime-BB_1_6y_.js"),n=require("@kuma-ui/core"),a=require("./wrapper.js");function o({as:e,className:r,...t}){return s.jsxRuntimeExports.jsx(a.default,{...t,wrap:!0,as:e??"header",direction:"row",preset:"space-between",className:n.cx("kakadu-components-866714386",r),innerClassName:"kakadu-components-479363365"})}exports.default=o;
@@ -1,14 +1,13 @@
1
1
  import { j as o } from "../jsx-runtime-B4hRZ52C.mjs";
2
2
  import { cx as t } from "@kuma-ui/core";
3
- import n from "./wrapper.mjs";
4
- import { FlexAlignment as m } from "./flex.mjs";
5
- function u({
3
+ import s from "./wrapper.mjs";
4
+ function i({
6
5
  as: e,
7
6
  className: r,
8
7
  ...a
9
8
  }) {
10
- return /* @__PURE__ */ o.jsx(n, { ...a, wrap: !0, as: e ?? "header", direction: "row", alignment: m.space_between, className: t("kakadu-components-866714386", r), innerClassName: "kakadu-components-479363365" });
9
+ return /* @__PURE__ */ o.jsx(s, { ...a, wrap: !0, as: e ?? "header", direction: "row", preset: "space-between", className: t("kakadu-components-866714386", r), innerClassName: "kakadu-components-479363365" });
11
10
  }
12
11
  export {
13
- u as default
12
+ i as default
14
13
  };
@@ -1,12 +1,8 @@
1
1
  import { type HTMLProps } from 'react';
2
2
  import { type IconType } from '../icons/icon';
3
3
  import { type ButtonTooltipPosition } from './button-tooltip';
4
- export declare enum IconButtonVariant {
5
- default = "default",
6
- success = "success",
7
- warning = "warning",
8
- danger = "danger"
9
- }
4
+ export declare const iconButtonVariants: readonly ["default", "success", "warning", "danger"];
5
+ export type IconButtonVariant = (typeof iconButtonVariants)[number];
10
6
  export type IconButtonProperties = HTMLProps<HTMLButtonElement> & {
11
7
  readonly icon: IconType;
12
8
  readonly variant?: IconButtonVariant;
@@ -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"),o=require("@kuma-ui/core"),d=require("../icons/icon.js"),g=require("../theme.js"),D=require("./theme-setter.js"),r=require("./button.js"),M=require("./button-tooltip.js"),z=require("./click-ripples.js"),b=require("./hover-gradient.js"),A=require("./skeleton.js"),C=require("./atom.js");var y=(e=>(e.default="default",e.success="success",e.warning="warning",e.danger="danger",e))(y||{});function O({icon:e,variant:u="default",label:p,tooltipPosition:E,href:f,target:q,rel:w,disabled:_,isLoading:k,isSkeleton:c,isSkeletonAnimated:v=!0,className:N,...I}){const j=s.useId(),T=D.useIsDarkMode(),n=f&&!c,[a,B]=s.useState(e),[h,m]=s.useState(!1),R=s.useRef(e),i=s.useRef(null);s.useEffect(()=>{R.current=e},[e]);const l=s.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]);s.useEffect(()=>{if(a===e){m(S=>S&&!1);return}m(!0),l(),i.current=setTimeout(()=>{m(!1),B(R.current)},370)},[a,e,l]),s.useEffect(()=>()=>{l()},[l]);const x=!!_||!!k||!!c;return t.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-4096632152",children:[t.jsxRuntimeExports.jsxs(C.default,{...I,as:n?"a":"button",type:n?void 0:"button",href:n?f:void 0,target:n?q:void 0,rel:n?w:void 0,"aria-label":p,"aria-describedby":j,disabled:n?void 0:x,inert:n?x:void 0,className:o.cx(g.buttonResetStyles,g.effectStyles,"kakadu-components-2957737620",u==="default"&&o.cx(r.buttonSecondaryStyles,"kakadu-components-1561784812"),u==="success"&&o.cx(r.buttonSuccessStyles,"kakadu-components-1398421429"),u==="warning"&&o.cx(r.buttonWarningStyles,"kakadu-components-1872098090"),u==="danger"&&o.cx(r.buttonDangerStyles,"kakadu-components-2064536093"),c&&"kakadu-components-2662775151",N),children:[t.jsxRuntimeExports.jsxs("span",{"data-theme":u==="default"?T?"dark":"light":"dark",className:"kakadu-components-3040141419",children:[t.jsxRuntimeExports.jsx(d.default,{width:16,height:16,type:a,className:o.cx(d.iconShadowStyles,"kakadu-components-1562914001",h&&"kakadu-components-2360250719")}),a===e?null:t.jsxRuntimeExports.jsx(d.default,{width:16,height:16,type:e,className:o.cx(d.iconShadowStyles,"kakadu-components-1224061930",h&&"kakadu-components-2519520784")})]}),t.jsxRuntimeExports.jsx(r.ButtonLoader,{isLoading:k,size:14}),t.jsxRuntimeExports.jsx(M.default,{id:j,label:p,position:E}),x?null:t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(z.default,{size:50}),t.jsxRuntimeExports.jsx(b.default,{size:50,className:u==="default"?b.normalBlendStyles:void 0})]})]}),c?t.jsxRuntimeExports.jsx("div",{className:"kakadu-components-3422055155",children:t.jsxRuntimeExports.jsx(A.SkeletonInstance,{width:"100%",height:"100%",isAnimated:v})}):null]})}exports.IconButtonVariant=y;exports.default=O;
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"),o=require("@kuma-ui/core"),d=require("../icons/icon.js"),b=require("../theme.js"),T=require("./theme-setter.js"),c=require("./button.js"),D=require("./button-tooltip.js"),M=require("./click-ripples.js"),y=require("./hover-gradient.js"),z=require("./skeleton.js"),A=require("./atom.js"),C=["default","success","warning","danger"];function O({icon:s,variant:u="default",label:p,tooltipPosition:E,href:f,target:g,rel:q,disabled:w,isLoading:k,isSkeleton:r,isSkeletonAnimated:_=!0,className:B,...v}){const j=t.useId(),I=T.useIsDarkMode(),n=f&&!r,[a,N]=t.useState(s),[h,m]=t.useState(!1),R=t.useRef(s),i=t.useRef(null);t.useEffect(()=>{R.current=s},[s]);const l=t.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]);t.useEffect(()=>{if(a===s){m(S=>S&&!1);return}m(!0),l(),i.current=setTimeout(()=>{m(!1),N(R.current)},370)},[a,s,l]),t.useEffect(()=>()=>{l()},[l]);const x=!!w||!!k||!!r;return e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-4096632152",children:[e.jsxRuntimeExports.jsxs(A.default,{...v,as:n?"a":"button",type:n?void 0:"button",href:n?f:void 0,target:n?g:void 0,rel:n?q:void 0,"aria-label":p,"aria-describedby":j,disabled:n?void 0:x,inert:n?x:void 0,className:o.cx(b.buttonResetStyles,b.effectStyles,"kakadu-components-2957737620",u==="default"&&o.cx(c.buttonSecondaryStyles,"kakadu-components-1561784812"),u==="success"&&o.cx(c.buttonSuccessStyles,"kakadu-components-1398421429"),u==="warning"&&o.cx(c.buttonWarningStyles,"kakadu-components-1872098090"),u==="danger"&&o.cx(c.buttonDangerStyles,"kakadu-components-2064536093"),r&&"kakadu-components-2662775151",B),children:[e.jsxRuntimeExports.jsxs("span",{"data-theme":u==="default"?I?"dark":"light":"dark",className:"kakadu-components-3040141419",children:[e.jsxRuntimeExports.jsx(d.default,{width:16,height:16,type:a,className:o.cx(d.iconShadowStyles,"kakadu-components-1562914001",h&&"kakadu-components-2360250719")}),a===s?null:e.jsxRuntimeExports.jsx(d.default,{width:16,height:16,type:s,className:o.cx(d.iconShadowStyles,"kakadu-components-1224061930",h&&"kakadu-components-2519520784")})]}),e.jsxRuntimeExports.jsx(c.ButtonLoader,{isLoading:k,size:14}),e.jsxRuntimeExports.jsx(D.default,{id:j,label:p,position:E}),x?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(M.default,{size:50}),e.jsxRuntimeExports.jsx(y.default,{size:50,className:u==="default"?y.normalBlendStyles:void 0})]})]}),r?e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-3422055155",children:e.jsxRuntimeExports.jsx(z.SkeletonInstance,{width:"100%",height:"100%",isAnimated:_})}):null]})}exports.default=O;exports.iconButtonVariants=C;
@@ -1,67 +1,67 @@
1
- import { j as t } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { useId as A, useState as j, useRef as y, useEffect as i, useCallback as C } from "react";
3
- import { cx as o } from "@kuma-ui/core";
1
+ import { j as e } from "../jsx-runtime-B4hRZ52C.mjs";
2
+ import { useId as A, useState as y, useRef as g, useEffect as l, useCallback as C } from "react";
3
+ import { cx as s } from "@kuma-ui/core";
4
4
  import b, { iconShadowStyles as S } from "../icons/icon.mjs";
5
5
  import { buttonResetStyles as E, effectStyles as M } from "../theme.mjs";
6
6
  import { useIsDarkMode as F } from "./theme-setter.mjs";
7
- import { ButtonLoader as G, buttonSecondaryStyles as H, buttonSuccessStyles as O, buttonWarningStyles as W, buttonDangerStyles as q } from "./button.mjs";
8
- import J from "./button-tooltip.mjs";
9
- import K from "./click-ripples.mjs";
10
- import L, { normalBlendStyles as P } from "./hover-gradient.mjs";
11
- import { SkeletonInstance as Q } from "./skeleton.mjs";
12
- import U from "./atom.mjs";
13
- var X = /* @__PURE__ */ ((e) => (e.default = "default", e.success = "success", e.warning = "warning", e.danger = "danger", e))(X || {});
7
+ import { ButtonLoader as G, buttonSecondaryStyles as H, buttonSuccessStyles as O, buttonWarningStyles as V, buttonDangerStyles as W } from "./button.mjs";
8
+ import q from "./button-tooltip.mjs";
9
+ import J from "./click-ripples.mjs";
10
+ import K, { normalBlendStyles as L } from "./hover-gradient.mjs";
11
+ import { SkeletonInstance as P } from "./skeleton.mjs";
12
+ import Q from "./atom.mjs";
13
+ const re = ["default", "success", "warning", "danger"];
14
14
  function ce({
15
- icon: e,
15
+ icon: t,
16
16
  variant: n = "default",
17
17
  label: m,
18
18
  tooltipPosition: w,
19
19
  href: p,
20
- target: N,
21
- rel: v,
22
- disabled: R,
20
+ target: B,
21
+ rel: I,
22
+ disabled: N,
23
23
  isLoading: f,
24
- isSkeleton: r,
25
- isSkeletonAnimated: I = !0,
26
- className: B,
24
+ isSkeleton: a,
25
+ isSkeletonAnimated: R = !0,
26
+ className: v,
27
27
  ...D
28
28
  }) {
29
- const k = A(), T = F(), s = p && !r, [a, z] = j(e), [h, d] = j(!1), x = y(e), c = y(null);
30
- i(() => {
31
- x.current = e;
32
- }, [e]);
29
+ const k = A(), T = F(), o = p && !a, [r, z] = y(t), [h, i] = y(!1), x = g(t), c = g(null);
30
+ l(() => {
31
+ x.current = t;
32
+ }, [t]);
33
33
  const u = C(() => {
34
34
  c.current && (clearTimeout(c.current), c.current = null);
35
35
  }, []);
36
- i(() => {
37
- if (a === e) {
38
- d((g) => g && !1);
36
+ l(() => {
37
+ if (r === t) {
38
+ i((j) => j && !1);
39
39
  return;
40
40
  }
41
- d(!0), u(), c.current = setTimeout(() => {
42
- d(!1), z(x.current);
41
+ i(!0), u(), c.current = setTimeout(() => {
42
+ i(!1), z(x.current);
43
43
  }, 370);
44
- }, [a, e, u]), i(() => () => {
44
+ }, [r, t, u]), l(() => () => {
45
45
  u();
46
46
  }, [u]);
47
- const l = !!R || !!f || !!r;
48
- return /* @__PURE__ */ t.jsxs("div", { className: "kakadu-components-4096632152", children: [
49
- /* @__PURE__ */ t.jsxs(U, { ...D, as: s ? "a" : "button", type: s ? void 0 : "button", href: s ? p : void 0, target: s ? N : void 0, rel: s ? v : void 0, "aria-label": m, "aria-describedby": k, disabled: s ? void 0 : l, inert: s ? l : void 0, className: o(E, M, "kakadu-components-2957737620", n === "default" && o(H, "kakadu-components-1561784812"), n === "success" && o(O, "kakadu-components-1398421429"), n === "warning" && o(W, "kakadu-components-1872098090"), n === "danger" && o(q, "kakadu-components-2064536093"), r && "kakadu-components-2662775151", B), children: [
50
- /* @__PURE__ */ t.jsxs("span", { "data-theme": n === "default" ? T ? "dark" : "light" : "dark", className: "kakadu-components-3040141419", children: [
51
- /* @__PURE__ */ t.jsx(b, { width: 16, height: 16, type: a, className: o(S, "kakadu-components-1562914001", h && "kakadu-components-2360250719") }),
52
- a === e ? null : /* @__PURE__ */ t.jsx(b, { width: 16, height: 16, type: e, className: o(S, "kakadu-components-1224061930", h && "kakadu-components-2519520784") })
47
+ const d = !!N || !!f || !!a;
48
+ return /* @__PURE__ */ e.jsxs("div", { className: "kakadu-components-4096632152", children: [
49
+ /* @__PURE__ */ e.jsxs(Q, { ...D, as: o ? "a" : "button", type: o ? void 0 : "button", href: o ? p : void 0, target: o ? B : void 0, rel: o ? I : void 0, "aria-label": m, "aria-describedby": k, disabled: o ? void 0 : d, inert: o ? d : void 0, className: s(E, M, "kakadu-components-2957737620", n === "default" && s(H, "kakadu-components-1561784812"), n === "success" && s(O, "kakadu-components-1398421429"), n === "warning" && s(V, "kakadu-components-1872098090"), n === "danger" && s(W, "kakadu-components-2064536093"), a && "kakadu-components-2662775151", v), children: [
50
+ /* @__PURE__ */ e.jsxs("span", { "data-theme": n === "default" ? T ? "dark" : "light" : "dark", className: "kakadu-components-3040141419", children: [
51
+ /* @__PURE__ */ e.jsx(b, { width: 16, height: 16, type: r, className: s(S, "kakadu-components-1562914001", h && "kakadu-components-2360250719") }),
52
+ r === t ? null : /* @__PURE__ */ e.jsx(b, { width: 16, height: 16, type: t, className: s(S, "kakadu-components-1224061930", h && "kakadu-components-2519520784") })
53
53
  ] }),
54
- /* @__PURE__ */ t.jsx(G, { isLoading: f, size: 14 }),
55
- /* @__PURE__ */ t.jsx(J, { id: k, label: m, position: w }),
56
- l ? null : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
57
- /* @__PURE__ */ t.jsx(K, { size: 50 }),
58
- /* @__PURE__ */ t.jsx(L, { size: 50, className: n === "default" ? P : void 0 })
54
+ /* @__PURE__ */ e.jsx(G, { isLoading: f, size: 14 }),
55
+ /* @__PURE__ */ e.jsx(q, { id: k, label: m, position: w }),
56
+ d ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
57
+ /* @__PURE__ */ e.jsx(J, { size: 50 }),
58
+ /* @__PURE__ */ e.jsx(K, { size: 50, className: n === "default" ? L : void 0 })
59
59
  ] })
60
60
  ] }),
61
- r ? /* @__PURE__ */ t.jsx("div", { className: "kakadu-components-3422055155", children: /* @__PURE__ */ t.jsx(Q, { width: "100%", height: "100%", isAnimated: I }) }) : null
61
+ a ? /* @__PURE__ */ e.jsx("div", { className: "kakadu-components-3422055155", children: /* @__PURE__ */ e.jsx(P, { width: "100%", height: "100%", isAnimated: R }) }) : null
62
62
  ] });
63
63
  }
64
64
  export {
65
- X as IconButtonVariant,
66
- ce as default
65
+ ce as default,
66
+ re as iconButtonVariants
67
67
  };
@@ -1,5 +1,5 @@
1
1
  import { type ChangeEvent, type HTMLProps, type ReactNode } from 'react';
2
- import { IconType } from '../icons/icon';
2
+ import { type IconType } from '../icons/icon';
3
3
  export declare const errorParagraph: string;
4
4
  type LabelMessageType = Error | ReactNode | string;
5
5
  type LabelMessageProperties<Key extends string> = ({
@@ -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"),l=require("@kuma-ui/core"),xe=require("../icons/chevron-up.js"),J=require("../icons/icon.js"),K=require("../utilities/copy-to-clipboard.js"),H=require("../theme.js"),de=require("../icons/sparkle.js"),pe=require("./button-tooltip.js"),L=require("./text-button.js"),g=require("./text.js"),me=require("./collapsible.js"),Q=require("./click-ripples.js"),X=require("./hover-gradient.js"),je=require("./notification.js"),ke=require("./notice.js"),fe="kakadu-components-922159086",he="kakadu-components-25448712",w="kakadu-components-1923392328",A="kakadu-components-4056037255",Y=l.cx(A,"kakadu-components-3245407458"),Ee=l.cx(A,"kakadu-components-1117160492"),Re=l.cx(A,"kakadu-components-2261792866");function be({as:f,className:i,...d}){return e.jsxRuntimeExports.jsx(g.Span,{as:f??"span",...d,className:l.cx("kakadu-components-520991867",i)})}function Z({label:f,error:i,errorId:d,warning:u,warningId:R,information:h,informationId:s,footnote:c,attachments:E,className:p,children:v,...m}){const j=!!i,r=!!u,k=!!h,b=!!c;return e.jsxRuntimeExports.jsx("label",{...m,className:l.cx(fe,p),children:e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-3146929190",children:[e.jsxRuntimeExports.jsx(g.Span,{className:l.cx(H.overflowProtectionStyles,he),children:e.jsxRuntimeExports.jsx("span",{children:f})}),e.jsxRuntimeExports.jsxs("span",{className:"kakadu-components-3298764637",children:[v,b?e.jsxRuntimeExports.jsx(be,{className:"kakadu-components-613632806",children:c}):null,E]}),j||r||k?e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2927674627",children:j?e.jsxRuntimeExports.jsx(g.Paragraph,{id:d,className:Y,children:i instanceof Error?i.message:i}):r?e.jsxRuntimeExports.jsx(g.Paragraph,{id:R,className:Ee,children:u instanceof Error?u.message:u}):k?e.jsxRuntimeExports.jsx(g.Paragraph,{id:s,className:Re,children:h instanceof Error?h.message:h}):null}):null]})})}function ye({label:f,options:i,error:d,warning:u,information:R,footnote:h,className:s,onChange:c,...E}){const p=t.useId(),v=`${p}-error`,m=`${p}-warning`,j=`${p}-information`,r=!!d,k=!r&&!!u,b=!r&&!k&&!!R,N=r?v:k?m:b?j:void 0,{value:y}=E,[S,I]=t.useState(""),q=y??S;t.useEffect(()=>{I(typeof y=="string"?y:"")},[y]);const C=t.useCallback(n=>{const{value:B}=n.target;I(B),c==null||c(B,n)},[c]);return e.jsxRuntimeExports.jsxs(Z,{label:f,error:d,errorId:v,warning:u,warningId:m,information:R,informationId:j,footnote:h,children:[e.jsxRuntimeExports.jsx("select",{...E,value:q,"aria-invalid":r,"data-warning":k,"data-information":b,"aria-describedby":N,className:l.cx(w,"kakadu-components-4228384787",s),onChange:C,children:i.map(n=>e.jsxRuntimeExports.jsx("option",{value:n.value,disabled:n.disabled,children:n.label},n.value))}),e.jsxRuntimeExports.jsx(xe.default,{width:14,height:14,className:"kakadu-components-158931186"})]})}const ve=40,V="kakadu-components-4233741488";function ge({type:f,label:i,error:d,warning:u,information:R,footnote:h,suggestion:s,actions:c=[],hasCopyButton:E,hasClearButton:p,isMultiline:v,onChange:m,className:j,...r}){const k=t.useRef(null),b=t.useRef(null),N=t.useRef(null),y=je.useCreateNotification(),S=t.useId(),I=`${S}-error`,q=`${S}-warning`,C=`${S}-information`,{value:n,disabled:B}=r,[ee,F]=t.useState(""),x=n??ee,[te,se]=t.useState(),ne=f==="textarea"||!!v;t.useLayoutEffect(()=>{typeof x=="string"&&N.current&&se(N.current.scrollHeight)},[x]);const T=t.useMemo(()=>typeof x=="string"?`${x} `.split(`
2
- `):[],[x]),ae=t.useMemo(()=>T.length,[T]),_=!!d,$=!_&&!!u,M=!!R,O=_?I:$?q:M?C:void 0;t.useEffect(()=>{F(typeof n=="string"?n:"")},[n]);const W=t.useCallback(a=>{const{value:o}=a.target;F(o),m==null||m(o,a)},[m]),oe=t.useCallback(()=>{typeof x=="string"&&(K.default(x),y({type:ke.NoticeType.success,children:"Copied to clipboard."}))},[x,y]),P=t.useCallback(a=>{var D;const o=b.current??k.current??void 0;if(o){const G=(D=Object.getOwnPropertyDescriptor(o instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,"value"))==null?void 0:D.set;if(G){G.call(o,a);const ue=new Event("input",{bubbles:!0});o.dispatchEvent(ue),o.focus();return}}throw new Error("Unable to set value.")},[]),ce=t.useCallback(()=>{P("")},[P]),[re,le]=t.useState(""),U=!!s&&re!==s,ie=t.useCallback(()=>{if(s){try{P(s)}catch{K.default(s)}le(s)}},[s,P]),z=t.useMemo(()=>c.length,[c]);return e.jsxRuntimeExports.jsxs(Z,{label:i,error:d,errorId:I,warning:u,warningId:q,information:R,informationId:C,footnote:h,attachments:e.jsxRuntimeExports.jsx(me.default,{isCollapsed:!U,children:U?e.jsxRuntimeExports.jsxs("button",{type:"button",className:l.cx(H.buttonResetStyles,H.overflowProtectionStyles,"kakadu-components-2355856341"),onClick:ie,children:[e.jsxRuntimeExports.jsx(pe.default,{label:"Apply suggestion"}),e.jsxRuntimeExports.jsx(de.default,{width:13,height:13,className:"kakadu-components-1021263934"}),e.jsxRuntimeExports.jsx(g.Span,{className:"kakadu-components-1585874956",children:s}),e.jsxRuntimeExports.jsx(Q.default,{className:"kakadu-components-3448565402"}),e.jsxRuntimeExports.jsx(X.default,{})]}):null}),style:{"--button-padding":`calc(${ve*((E?1:0)+(p?1:0)+z)}px + 6px)`},children:[e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-3146929190",children:[ne?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("span",{ref:N,"aria-hidden":!0,className:l.cx(w,j,"kakadu-components-2033521835"),children:[T.map((a,o)=>e.jsxRuntimeExports.jsxs("span",{children:[a,ae>1?e.jsxRuntimeExports.jsx("br",{}):null]},o))," "]}),e.jsxRuntimeExports.jsx("textarea",{...r,ref:b,rows:1,"aria-invalid":_,"data-warning":$,"data-information":M,"aria-describedby":O,value:x,className:l.cx(w,j,"kakadu-components-2119524139"),style:{minHeight:te},onChange:W})]}):e.jsxRuntimeExports.jsx("input",{...r,ref:k,type:f??"text",value:x,"aria-invalid":_,"data-warning":$,"data-information":M,"aria-describedby":O,className:l.cx(w,j),onChange:W}),B?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(Q.default,{className:"kakadu-components-616311160"}),e.jsxRuntimeExports.jsx(X.default,{className:"kakadu-components-1962999040"})]})]}),E||p||z>0?e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-131986363",children:[c.map((a,o)=>e.jsxRuntimeExports.jsx(L.default,{iconLeft:a.icon,label:a.label,tooltip:a.label,className:V,onClick:a.onClick},a.label+o)),E?e.jsxRuntimeExports.jsx(L.default,{iconLeft:J.IconType.copy,label:"Copy",tooltip:"Copy",className:V,onClick:oe}):null,p?e.jsxRuntimeExports.jsx(L.default,{iconLeft:J.IconType.times,label:"Clear",tooltip:"Clear",className:V,onClick:ce}):null]}):null]})}exports.Select=ye;exports.default=ge;exports.errorParagraph=Y;
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"),r=require("@kuma-ui/core"),ue=require("../icons/chevron-up.js"),J=require("../utilities/copy-to-clipboard.js"),H=require("../theme.js"),xe=require("../icons/sparkle.js"),de=require("./button-tooltip.js"),T=require("./text-button.js"),y=require("./text.js"),pe=require("./collapsible.js"),K=require("./click-ripples.js"),Q=require("./hover-gradient.js"),me=require("./notification.js"),je="kakadu-components-922159086",ke="kakadu-components-25448712",_="kakadu-components-1923392328",A="kakadu-components-4056037255",X=r.cx(A,"kakadu-components-3245407458"),fe=r.cx(A,"kakadu-components-1117160492"),he=r.cx(A,"kakadu-components-2261792866");function Ee({as:f,className:i,...d}){return e.jsxRuntimeExports.jsx(y.Span,{as:f??"span",...d,className:r.cx("kakadu-components-520991867",i)})}function Y({label:f,error:i,errorId:d,warning:u,warningId:R,information:h,informationId:s,footnote:c,attachments:E,className:p,children:g,...m}){const j=!!i,l=!!u,k=!!h,b=!!c;return e.jsxRuntimeExports.jsx("label",{...m,className:r.cx(je,p),children:e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-3146929190",children:[e.jsxRuntimeExports.jsx(y.Span,{className:r.cx(H.overflowProtectionStyles,ke),children:e.jsxRuntimeExports.jsx("span",{children:f})}),e.jsxRuntimeExports.jsxs("span",{className:"kakadu-components-3298764637",children:[g,b?e.jsxRuntimeExports.jsx(Ee,{className:"kakadu-components-613632806",children:c}):null,E]}),j||l||k?e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2927674627",children:j?e.jsxRuntimeExports.jsx(y.Paragraph,{id:d,className:X,children:i instanceof Error?i.message:i}):l?e.jsxRuntimeExports.jsx(y.Paragraph,{id:R,className:fe,children:u instanceof Error?u.message:u}):k?e.jsxRuntimeExports.jsx(y.Paragraph,{id:s,className:he,children:h instanceof Error?h.message:h}):null}):null]})})}function Re({label:f,options:i,error:d,warning:u,information:R,footnote:h,className:s,onChange:c,...E}){const p=t.useId(),g=`${p}-error`,m=`${p}-warning`,j=`${p}-information`,l=!!d,k=!l&&!!u,b=!l&&!k&&!!R,N=l?g:k?m:b?j:void 0,{value:v}=E,[S,I]=t.useState(""),q=v??S;t.useEffect(()=>{I(typeof v=="string"?v:"")},[v]);const C=t.useCallback(n=>{const{value:B}=n.target;I(B),c==null||c(B,n)},[c]);return e.jsxRuntimeExports.jsxs(Y,{label:f,error:d,errorId:g,warning:u,warningId:m,information:R,informationId:j,footnote:h,children:[e.jsxRuntimeExports.jsx("select",{...E,value:q,"aria-invalid":l,"data-warning":k,"data-information":b,"aria-describedby":N,className:r.cx(_,"kakadu-components-4228384787",s),onChange:C,children:i.map(n=>e.jsxRuntimeExports.jsx("option",{value:n.value,disabled:n.disabled,children:n.label},n.value))}),e.jsxRuntimeExports.jsx(ue.default,{width:14,height:14,className:"kakadu-components-158931186"})]})}const be=40,V="kakadu-components-4233741488";function ve({type:f,label:i,error:d,warning:u,information:R,footnote:h,suggestion:s,actions:c=[],hasCopyButton:E,hasClearButton:p,isMultiline:g,onChange:m,className:j,...l}){const k=t.useRef(null),b=t.useRef(null),N=t.useRef(null),v=me.useCreateNotification(),S=t.useId(),I=`${S}-error`,q=`${S}-warning`,C=`${S}-information`,{value:n,disabled:B}=l,[Z,F]=t.useState(""),x=n??Z,[ee,te]=t.useState(),se=f==="textarea"||!!g;t.useLayoutEffect(()=>{typeof x=="string"&&N.current&&te(N.current.scrollHeight)},[x]);const $=t.useMemo(()=>typeof x=="string"?`${x} `.split(`
2
+ `):[],[x]),ne=t.useMemo(()=>$.length,[$]),P=!!d,M=!P&&!!u,L=!!R,O=P?I:M?q:L?C:void 0;t.useEffect(()=>{F(typeof n=="string"?n:"")},[n]);const W=t.useCallback(a=>{const{value:o}=a.target;F(o),m==null||m(o,a)},[m]),ae=t.useCallback(()=>{typeof x=="string"&&(J.default(x),v({type:"success",children:"Copied to clipboard."}))},[x,v]),w=t.useCallback(a=>{var D;const o=b.current??k.current??void 0;if(o){const G=(D=Object.getOwnPropertyDescriptor(o instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,"value"))==null?void 0:D.set;if(G){G.call(o,a);const ie=new Event("input",{bubbles:!0});o.dispatchEvent(ie),o.focus();return}}throw new Error("Unable to set value.")},[]),oe=t.useCallback(()=>{w("")},[w]),[ce,le]=t.useState(""),U=!!s&&ce!==s,re=t.useCallback(()=>{if(s){try{w(s)}catch{J.default(s)}le(s)}},[s,w]),z=t.useMemo(()=>c.length,[c]);return e.jsxRuntimeExports.jsxs(Y,{label:i,error:d,errorId:I,warning:u,warningId:q,information:R,informationId:C,footnote:h,attachments:e.jsxRuntimeExports.jsx(pe.default,{isCollapsed:!U,children:U?e.jsxRuntimeExports.jsxs("button",{type:"button",className:r.cx(H.buttonResetStyles,H.overflowProtectionStyles,"kakadu-components-2355856341"),onClick:re,children:[e.jsxRuntimeExports.jsx(de.default,{label:"Apply suggestion"}),e.jsxRuntimeExports.jsx(xe.default,{width:13,height:13,className:"kakadu-components-1021263934"}),e.jsxRuntimeExports.jsx(y.Span,{className:"kakadu-components-1585874956",children:s}),e.jsxRuntimeExports.jsx(K.default,{className:"kakadu-components-3448565402"}),e.jsxRuntimeExports.jsx(Q.default,{})]}):null}),style:{"--button-padding":`calc(${be*((E?1:0)+(p?1:0)+z)}px + 6px)`},children:[e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-3146929190",children:[se?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("span",{ref:N,"aria-hidden":!0,className:r.cx(_,j,"kakadu-components-2033521835"),children:[$.map((a,o)=>e.jsxRuntimeExports.jsxs("span",{children:[a,ne>1?e.jsxRuntimeExports.jsx("br",{}):null]},o))," "]}),e.jsxRuntimeExports.jsx("textarea",{...l,ref:b,rows:1,"aria-invalid":P,"data-warning":M,"data-information":L,"aria-describedby":O,value:x,className:r.cx(_,j,"kakadu-components-2119524139"),style:{minHeight:ee},onChange:W})]}):e.jsxRuntimeExports.jsx("input",{...l,ref:k,type:f??"text",value:x,"aria-invalid":P,"data-warning":M,"data-information":L,"aria-describedby":O,className:r.cx(_,j),onChange:W}),B?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(K.default,{className:"kakadu-components-616311160"}),e.jsxRuntimeExports.jsx(Q.default,{className:"kakadu-components-1962999040"})]})]}),E||p||z>0?e.jsxRuntimeExports.jsxs("div",{className:"kakadu-components-131986363",children:[c.map((a,o)=>e.jsxRuntimeExports.jsx(T.default,{iconLeft:a.icon,label:a.label,tooltip:a.label,className:V,onClick:a.onClick},a.label+o)),E?e.jsxRuntimeExports.jsx(T.default,{iconLeft:"copy",label:"Copy",tooltip:"Copy",className:V,onClick:ae}):null,p?e.jsxRuntimeExports.jsx(T.default,{iconLeft:"times",label:"Clear",tooltip:"Clear",className:V,onClick:oe}):null]}):null]})}exports.Select=Re;exports.default=ve;exports.errorParagraph=X;
@@ -1,28 +1,26 @@
1
1
  import { j as e } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { useRef as M, useId as ne, useState as P, useLayoutEffect as he, useMemo as A, useEffect as ae, useCallback as N } from "react";
2
+ import { useRef as M, useId as ee, useState as T, useLayoutEffect as fe, useMemo as A, useEffect as ne, useCallback as N } from "react";
3
3
  import { cx as c } from "@kuma-ui/core";
4
- import xe from "../icons/chevron-up.mjs";
5
- import { IconType as Y } from "../icons/icon.mjs";
6
- import Z from "../utilities/copy-to-clipboard.mjs";
7
- import { buttonResetStyles as je, overflowProtectionStyles as te } from "../theme.mjs";
8
- import be from "../icons/sparkle.mjs";
9
- import ve from "./button-tooltip.mjs";
4
+ import he from "../icons/chevron-up.mjs";
5
+ import Y from "../utilities/copy-to-clipboard.mjs";
6
+ import { buttonResetStyles as xe, overflowProtectionStyles as ae } from "../theme.mjs";
7
+ import je from "../icons/sparkle.mjs";
8
+ import be from "./button-tooltip.mjs";
10
9
  import F from "./text-button.mjs";
11
10
  import { Span as U, Paragraph as W } from "./text.mjs";
12
- import ye from "./collapsible.mjs";
13
- import _ from "./click-ripples.mjs";
14
- import ee from "./hover-gradient.mjs";
15
- import { useCreateNotification as ge } from "./notification.mjs";
16
- import { NoticeType as Ne } from "./notice.mjs";
17
- const Ie = "kakadu-components-922159086", Se = "kakadu-components-25448712", $ = "kakadu-components-1923392328", z = "kakadu-components-4056037255", Be = c(z, "kakadu-components-3245407458"), Ee = c(z, "kakadu-components-1117160492"), Ce = c(z, "kakadu-components-2261792866");
18
- function we({
11
+ import ve from "./collapsible.mjs";
12
+ import Z from "./click-ripples.mjs";
13
+ import _ from "./hover-gradient.mjs";
14
+ import { useCreateNotification as ye } from "./notification.mjs";
15
+ const ge = "kakadu-components-922159086", Ne = "kakadu-components-25448712", $ = "kakadu-components-1923392328", z = "kakadu-components-4056037255", Se = c(z, "kakadu-components-3245407458"), Ie = c(z, "kakadu-components-1117160492"), Be = c(z, "kakadu-components-2261792866");
16
+ function Ee({
19
17
  as: h,
20
18
  className: r,
21
19
  ...m
22
20
  }) {
23
21
  return /* @__PURE__ */ e.jsx(U, { as: h ?? "span", ...m, className: c("kakadu-components-520991867", r) });
24
22
  }
25
- function se({
23
+ function te({
26
24
  label: h,
27
25
  error: r,
28
26
  errorId: m,
@@ -37,17 +35,17 @@ function se({
37
35
  ...p
38
36
  }) {
39
37
  const k = !!r, l = !!i, f = !!x, v = !!o;
40
- return /* @__PURE__ */ e.jsx("label", { ...p, className: c(Ie, u), children: /* @__PURE__ */ e.jsxs("div", { className: "kakadu-components-3146929190", children: [
41
- /* @__PURE__ */ e.jsx(U, { className: c(te, Se), children: /* @__PURE__ */ e.jsx("span", { children: h }) }),
38
+ return /* @__PURE__ */ e.jsx("label", { ...p, className: c(ge, u), children: /* @__PURE__ */ e.jsxs("div", { className: "kakadu-components-3146929190", children: [
39
+ /* @__PURE__ */ e.jsx(U, { className: c(ae, Ne), children: /* @__PURE__ */ e.jsx("span", { children: h }) }),
42
40
  /* @__PURE__ */ e.jsxs("span", { className: "kakadu-components-3298764637", children: [
43
41
  g,
44
- v ? /* @__PURE__ */ e.jsx(we, { className: "kakadu-components-613632806", children: o }) : null,
42
+ v ? /* @__PURE__ */ e.jsx(Ee, { className: "kakadu-components-613632806", children: o }) : null,
45
43
  j
46
44
  ] }),
47
- k || l || f ? /* @__PURE__ */ e.jsx("div", { className: "kakadu-components-2927674627", children: k ? /* @__PURE__ */ e.jsx(W, { id: m, className: Be, children: r instanceof Error ? r.message : r }) : l ? /* @__PURE__ */ e.jsx(W, { id: b, className: Ee, children: i instanceof Error ? i.message : i }) : f ? /* @__PURE__ */ e.jsx(W, { id: n, className: Ce, children: x instanceof Error ? x.message : x }) : null }) : null
45
+ k || l || f ? /* @__PURE__ */ e.jsx("div", { className: "kakadu-components-2927674627", children: k ? /* @__PURE__ */ e.jsx(W, { id: m, className: Se, children: r instanceof Error ? r.message : r }) : l ? /* @__PURE__ */ e.jsx(W, { id: b, className: Ie, children: i instanceof Error ? i.message : i }) : f ? /* @__PURE__ */ e.jsx(W, { id: n, className: Be, children: x instanceof Error ? x.message : x }) : null }) : null
48
46
  ] }) });
49
47
  }
50
- function Je({
48
+ function ze({
51
49
  label: h,
52
50
  options: r,
53
51
  error: m,
@@ -58,10 +56,10 @@ function Je({
58
56
  onChange: o,
59
57
  ...j
60
58
  }) {
61
- const u = ne(), g = `${u}-error`, p = `${u}-warning`, k = `${u}-information`, l = !!m, f = !l && !!i, v = !l && !f && !!b, I = l ? g : f ? p : v ? k : void 0, {
59
+ const u = ee(), g = `${u}-error`, p = `${u}-warning`, k = `${u}-information`, l = !!m, f = !l && !!i, v = !l && !f && !!b, S = l ? g : f ? p : v ? k : void 0, {
62
60
  value: y
63
- } = j, [S, B] = P(""), E = y ?? S;
64
- ae(() => {
61
+ } = j, [I, B] = T(""), E = y ?? I;
62
+ ne(() => {
65
63
  B(typeof y == "string" ? y : "");
66
64
  }, [y]);
67
65
  const C = N((a) => {
@@ -70,13 +68,13 @@ function Je({
70
68
  } = a.target;
71
69
  B(w), o == null || o(w, a);
72
70
  }, [o]);
73
- return /* @__PURE__ */ e.jsxs(se, { label: h, error: m, errorId: g, warning: i, warningId: p, information: b, informationId: k, footnote: x, children: [
74
- /* @__PURE__ */ e.jsx("select", { ...j, value: E, "aria-invalid": l, "data-warning": f, "data-information": v, "aria-describedby": I, className: c($, "kakadu-components-4228384787", n), onChange: C, children: r.map((a) => /* @__PURE__ */ e.jsx("option", { value: a.value, disabled: a.disabled, children: a.label }, a.value)) }),
75
- /* @__PURE__ */ e.jsx(xe, { width: 14, height: 14, className: "kakadu-components-158931186" })
71
+ return /* @__PURE__ */ e.jsxs(te, { label: h, error: m, errorId: g, warning: i, warningId: p, information: b, informationId: k, footnote: x, children: [
72
+ /* @__PURE__ */ e.jsx("select", { ...j, value: E, "aria-invalid": l, "data-warning": f, "data-information": v, "aria-describedby": S, className: c($, "kakadu-components-4228384787", n), onChange: C, children: r.map((a) => /* @__PURE__ */ e.jsx("option", { value: a.value, disabled: a.disabled, children: a.label }, a.value)) }),
73
+ /* @__PURE__ */ e.jsx(he, { width: 14, height: 14, className: "kakadu-components-158931186" })
76
74
  ] });
77
75
  }
78
- const Te = 40, O = "kakadu-components-4233741488";
79
- function Ke({
76
+ const Ce = 40, O = "kakadu-components-4233741488";
77
+ function De({
80
78
  type: h,
81
79
  label: r,
82
80
  error: m,
@@ -92,16 +90,16 @@ function Ke({
92
90
  className: k,
93
91
  ...l
94
92
  }) {
95
- const f = M(null), v = M(null), I = M(null), y = ge(), S = ne(), B = `${S}-error`, E = `${S}-warning`, C = `${S}-information`, {
93
+ const f = M(null), v = M(null), S = M(null), y = ye(), I = ee(), B = `${I}-error`, E = `${I}-warning`, C = `${I}-information`, {
96
94
  value: a,
97
95
  disabled: w
98
- } = l, [oe, D] = P(""), d = a ?? oe, [le, ce] = P(), re = h === "textarea" || !!g;
99
- he(() => {
100
- typeof d == "string" && I.current && ce(I.current.scrollHeight);
96
+ } = l, [se, D] = T(""), d = a ?? se, [oe, le] = T(), ce = h === "textarea" || !!g;
97
+ fe(() => {
98
+ typeof d == "string" && S.current && le(S.current.scrollHeight);
101
99
  }, [d]);
102
100
  const H = A(() => typeof d == "string" ? `${d} `.split(`
103
- `) : [], [d]), ie = A(() => H.length, [H]), T = !!m, R = !T && !!i, V = !!b, G = T ? B : R ? E : V ? C : void 0;
104
- ae(() => {
101
+ `) : [], [d]), re = A(() => H.length, [H]), L = !!m, R = !L && !!i, V = !!b, G = L ? B : R ? E : V ? C : void 0;
102
+ ne(() => {
105
103
  D(typeof a == "string" ? a : "");
106
104
  }, [a]);
107
105
  const q = N((t) => {
@@ -109,66 +107,66 @@ function Ke({
109
107
  value: s
110
108
  } = t.target;
111
109
  D(s), p == null || p(s, t);
112
- }, [p]), de = N(() => {
113
- typeof d == "string" && (Z(d), y({
114
- type: Ne.success,
110
+ }, [p]), ie = N(() => {
111
+ typeof d == "string" && (Y(d), y({
112
+ type: "success",
115
113
  children: "Copied to clipboard."
116
114
  }));
117
- }, [d, y]), L = N((t) => {
115
+ }, [d, y]), P = N((t) => {
118
116
  var Q;
119
117
  const s = v.current ?? f.current ?? void 0;
120
118
  if (s) {
121
119
  const X = (Q = Object.getOwnPropertyDescriptor(s instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype, "value")) == null ? void 0 : Q.set;
122
120
  if (X) {
123
121
  X.call(s, t);
124
- const fe = new Event("input", {
122
+ const ke = new Event("input", {
125
123
  bubbles: !0
126
124
  });
127
- s.dispatchEvent(fe), s.focus();
125
+ s.dispatchEvent(ke), s.focus();
128
126
  return;
129
127
  }
130
128
  }
131
129
  throw new Error("Unable to set value.");
132
- }, []), me = N(() => {
133
- L("");
134
- }, [L]), [ue, pe] = P(""), J = !!n && ue !== n, ke = N(() => {
130
+ }, []), de = N(() => {
131
+ P("");
132
+ }, [P]), [me, ue] = T(""), J = !!n && me !== n, pe = N(() => {
135
133
  if (n) {
136
134
  try {
137
- L(n);
135
+ P(n);
138
136
  } catch {
139
- Z(n);
137
+ Y(n);
140
138
  }
141
- pe(n);
139
+ ue(n);
142
140
  }
143
- }, [n, L]), K = A(() => o.length, [o]);
144
- return /* @__PURE__ */ e.jsxs(se, { label: r, error: m, errorId: B, warning: i, warningId: E, information: b, informationId: C, footnote: x, attachments: /* @__PURE__ */ e.jsx(ye, { isCollapsed: !J, children: J ? /* @__PURE__ */ e.jsxs("button", { type: "button", className: c(je, te, "kakadu-components-2355856341"), onClick: ke, children: [
145
- /* @__PURE__ */ e.jsx(ve, { label: "Apply suggestion" }),
146
- /* @__PURE__ */ e.jsx(be, { width: 13, height: 13, className: "kakadu-components-1021263934" }),
141
+ }, [n, P]), K = A(() => o.length, [o]);
142
+ return /* @__PURE__ */ e.jsxs(te, { label: r, error: m, errorId: B, warning: i, warningId: E, information: b, informationId: C, footnote: x, attachments: /* @__PURE__ */ e.jsx(ve, { isCollapsed: !J, children: J ? /* @__PURE__ */ e.jsxs("button", { type: "button", className: c(xe, ae, "kakadu-components-2355856341"), onClick: pe, children: [
143
+ /* @__PURE__ */ e.jsx(be, { label: "Apply suggestion" }),
144
+ /* @__PURE__ */ e.jsx(je, { width: 13, height: 13, className: "kakadu-components-1021263934" }),
147
145
  /* @__PURE__ */ e.jsx(U, { className: "kakadu-components-1585874956", children: n }),
148
- /* @__PURE__ */ e.jsx(_, { className: "kakadu-components-3448565402" }),
149
- /* @__PURE__ */ e.jsx(ee, {})
146
+ /* @__PURE__ */ e.jsx(Z, { className: "kakadu-components-3448565402" }),
147
+ /* @__PURE__ */ e.jsx(_, {})
150
148
  ] }) : null }), style: {
151
- "--button-padding": `calc(${Te * ((j ? 1 : 0) + (u ? 1 : 0) + K)}px + 6px)`
149
+ "--button-padding": `calc(${Ce * ((j ? 1 : 0) + (u ? 1 : 0) + K)}px + 6px)`
152
150
  }, children: [
153
151
  /* @__PURE__ */ e.jsxs("div", { className: "kakadu-components-3146929190", children: [
154
- re ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
155
- /* @__PURE__ */ e.jsxs("span", { ref: I, "aria-hidden": !0, className: c($, k, "kakadu-components-2033521835"), children: [
152
+ ce ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
153
+ /* @__PURE__ */ e.jsxs("span", { ref: S, "aria-hidden": !0, className: c($, k, "kakadu-components-2033521835"), children: [
156
154
  H.map((t, s) => (
157
155
  // eslint-disable-next-line react/no-array-index-key
158
156
  /* @__PURE__ */ e.jsxs("span", { children: [
159
157
  t,
160
- ie > 1 ? /* @__PURE__ */ e.jsx("br", {}) : null
158
+ re > 1 ? /* @__PURE__ */ e.jsx("br", {}) : null
161
159
  ] }, s)
162
160
  )),
163
161
  " "
164
162
  ] }),
165
- /* @__PURE__ */ e.jsx("textarea", { ...l, ref: v, rows: 1, "aria-invalid": T, "data-warning": R, "data-information": V, "aria-describedby": G, value: d, className: c($, k, "kakadu-components-2119524139"), style: {
166
- minHeight: le
163
+ /* @__PURE__ */ e.jsx("textarea", { ...l, ref: v, rows: 1, "aria-invalid": L, "data-warning": R, "data-information": V, "aria-describedby": G, value: d, className: c($, k, "kakadu-components-2119524139"), style: {
164
+ minHeight: oe
167
165
  }, onChange: q })
168
- ] }) : /* @__PURE__ */ e.jsx("input", { ...l, ref: f, type: h ?? "text", value: d, "aria-invalid": T, "data-warning": R, "data-information": V, "aria-describedby": G, className: c($, k), onChange: q }),
166
+ ] }) : /* @__PURE__ */ e.jsx("input", { ...l, ref: f, type: h ?? "text", value: d, "aria-invalid": L, "data-warning": R, "data-information": V, "aria-describedby": G, className: c($, k), onChange: q }),
169
167
  w ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
170
- /* @__PURE__ */ e.jsx(_, { className: "kakadu-components-616311160" }),
171
- /* @__PURE__ */ e.jsx(ee, { className: "kakadu-components-1962999040" })
168
+ /* @__PURE__ */ e.jsx(Z, { className: "kakadu-components-616311160" }),
169
+ /* @__PURE__ */ e.jsx(_, { className: "kakadu-components-1962999040" })
172
170
  ] })
173
171
  ] }),
174
172
  j || u || K > 0 ? /* @__PURE__ */ e.jsxs("div", { className: "kakadu-components-131986363", children: [
@@ -183,13 +181,13 @@ function Ke({
183
181
  },
184
182
  t.label + s
185
183
  )),
186
- j ? /* @__PURE__ */ e.jsx(F, { iconLeft: Y.copy, label: "Copy", tooltip: "Copy", className: O, onClick: de }) : null,
187
- u ? /* @__PURE__ */ e.jsx(F, { iconLeft: Y.times, label: "Clear", tooltip: "Clear", className: O, onClick: me }) : null
184
+ j ? /* @__PURE__ */ e.jsx(F, { iconLeft: "copy", label: "Copy", tooltip: "Copy", className: O, onClick: ie }) : null,
185
+ u ? /* @__PURE__ */ e.jsx(F, { iconLeft: "times", label: "Clear", tooltip: "Clear", className: O, onClick: de }) : null
188
186
  ] }) : null
189
187
  ] });
190
188
  }
191
189
  export {
192
- Je as Select,
193
- Ke as default,
194
- Be as errorParagraph
190
+ ze as Select,
191
+ De as default,
192
+ Se as errorParagraph
195
193
  };
@@ -1,9 +1,7 @@
1
1
  import { type ComponentPropsWithoutRef } from 'react';
2
2
  export declare function KakaduGuideLogoSvg({ fill, ...properties }: ComponentPropsWithoutRef<'svg'>): import("react/jsx-runtime").JSX.Element;
3
- export declare enum KakaduGuideLogoVariant {
4
- 'default' = "default",
5
- 'flat' = "flat"
6
- }
3
+ export declare const kakaduGuideLogoVariants: readonly ["default", "flat"];
4
+ export type KakaduGuideLogoVariant = (typeof kakaduGuideLogoVariants)[number];
7
5
  export default function KakaduGuideLogo({ variant, height, }: {
8
6
  readonly variant?: KakaduGuideLogoVariant;
9
7
  readonly height?: number;