@kakadu/components 6.1.1 → 6.2.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 (104) hide show
  1. package/build/components/aria-text.d.ts +2 -1
  2. package/build/components/box.d.ts +2 -1
  3. package/build/components/button-tooltip.d.ts +2 -1
  4. package/build/components/button.d.ts +3 -3
  5. package/build/components/button.js +1 -1
  6. package/build/components/button.mjs +27 -25
  7. package/build/components/card.d.ts +2 -2
  8. package/build/components/click-ripples.d.ts +2 -2
  9. package/build/components/collapsible.d.ts +2 -2
  10. package/build/components/combobox.d.ts +2 -2
  11. package/build/components/copy-icon-button.d.ts +2 -1
  12. package/build/components/datum.d.ts +2 -2
  13. package/build/components/dot.d.ts +2 -2
  14. package/build/components/flex.d.ts +2 -1
  15. package/build/components/footer.d.ts +2 -2
  16. package/build/components/gauge.d.ts +2 -1
  17. package/build/components/header.d.ts +2 -1
  18. package/build/components/hover-gradient.d.ts +2 -2
  19. package/build/components/icon-button.d.ts +2 -2
  20. package/build/components/input.d.ts +3 -3
  21. package/build/components/input.js +2 -2
  22. package/build/components/input.mjs +21 -21
  23. package/build/components/logos/akt-logo.d.ts +2 -2
  24. package/build/components/logos/amedia-logo.d.ts +2 -2
  25. package/build/components/logos/bankaxept-logo.d.ts +2 -2
  26. package/build/components/logos/bankid-logo.d.ts +2 -2
  27. package/build/components/logos/dnb-logo.d.ts +2 -2
  28. package/build/components/logos/entur-logo.d.ts +2 -2
  29. package/build/components/logos/gjensidige-logo.d.ts +2 -2
  30. package/build/components/logos/kakadu-academy-logo.d.ts +2 -2
  31. package/build/components/logos/kakadu-guide-icon.d.ts +2 -1
  32. package/build/components/logos/kakadu-guide-logo.d.ts +3 -3
  33. package/build/components/logos/kakadu-index-logo.d.ts +2 -2
  34. package/build/components/logos/kakadu-logo.d.ts +2 -2
  35. package/build/components/logos/kakadu-play-logo.d.ts +2 -2
  36. package/build/components/logos/kolumbus-logo.d.ts +2 -2
  37. package/build/components/logos/nordea-logo.d.ts +2 -2
  38. package/build/components/logos/norsk-tipping-logo.d.ts +2 -2
  39. package/build/components/logos/ruter-logo.d.ts +2 -2
  40. package/build/components/logos/senteret-for-et-aldersvennlig-norge-logo.d.ts +2 -2
  41. package/build/components/logos/sparebank1-logo.d.ts +2 -2
  42. package/build/components/logos/sparebanken-norge-logo.d.ts +2 -2
  43. package/build/components/logos/sto-logo.d.ts +2 -2
  44. package/build/components/logos/storebrand-logo.d.ts +2 -2
  45. package/build/components/modal.d.ts +6 -6
  46. package/build/components/notice.d.ts +2 -2
  47. package/build/components/notification.d.ts +8 -6
  48. package/build/components/notification.js +1 -1
  49. package/build/components/notification.mjs +87 -71
  50. package/build/components/popover-menu.d.ts +3 -3
  51. package/build/components/popover.d.ts +4 -4
  52. package/build/components/revealer.d.ts +2 -2
  53. package/build/components/select.d.ts +2 -2
  54. package/build/components/separator.d.ts +5 -5
  55. package/build/components/skeleton.d.ts +3 -2
  56. package/build/components/spinner.d.ts +3 -2
  57. package/build/components/text-button.d.ts +2 -2
  58. package/build/components/text.d.ts +9 -8
  59. package/build/components/theme-setter.d.ts +2 -2
  60. package/build/components/veil.d.ts +2 -1
  61. package/build/components/wrapper.d.ts +2 -2
  62. package/build/components.css +1 -1
  63. package/build/icons/anchor-down.d.ts +2 -2
  64. package/build/icons/anchor-up.d.ts +2 -2
  65. package/build/icons/arrow-down.d.ts +2 -2
  66. package/build/icons/arrow-left.d.ts +2 -2
  67. package/build/icons/arrow-right.d.ts +2 -2
  68. package/build/icons/arrow-up.d.ts +2 -2
  69. package/build/icons/caret-down.d.ts +2 -2
  70. package/build/icons/caret-left.d.ts +2 -2
  71. package/build/icons/caret-right.d.ts +2 -2
  72. package/build/icons/caret-up.d.ts +2 -2
  73. package/build/icons/check.d.ts +2 -2
  74. package/build/icons/chevron-down.d.ts +2 -2
  75. package/build/icons/chevron-left.d.ts +2 -2
  76. package/build/icons/chevron-right.d.ts +2 -2
  77. package/build/icons/chevron-up.d.ts +2 -2
  78. package/build/icons/chrome-browser-logo.d.ts +2 -2
  79. package/build/icons/cog.d.ts +2 -2
  80. package/build/icons/copy.d.ts +2 -2
  81. package/build/icons/document.d.ts +2 -2
  82. package/build/icons/dots.d.ts +2 -2
  83. package/build/icons/drag.d.ts +2 -2
  84. package/build/icons/edge-browser-logo.d.ts +2 -2
  85. package/build/icons/edit.d.ts +2 -2
  86. package/build/icons/exclamation-triangle.d.ts +2 -2
  87. package/build/icons/external.d.ts +2 -2
  88. package/build/icons/eye.d.ts +2 -2
  89. package/build/icons/icon.d.ts +2 -2
  90. package/build/icons/information.d.ts +2 -2
  91. package/build/icons/kakadu-guide-glyph.d.ts +2 -2
  92. package/build/icons/kakadu-guide-icon.d.ts +2 -2
  93. package/build/icons/menu.d.ts +2 -2
  94. package/build/icons/package.d.ts +2 -2
  95. package/build/icons/plus.d.ts +2 -2
  96. package/build/icons/select.d.ts +2 -2
  97. package/build/icons/share.d.ts +2 -2
  98. package/build/icons/sparkle.d.ts +2 -2
  99. package/build/icons/test.d.ts +2 -2
  100. package/build/icons/times.d.ts +2 -2
  101. package/build/icons/trash.d.ts +2 -2
  102. package/build/icons/trend-up.d.ts +2 -2
  103. package/build/theme.d.ts +2 -1
  104. package/package.json +16 -22
@@ -1,2 +1,2 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- export default function RuterLogoSvg({ fill, ...properties }: ComponentPropsWithoutRef<'svg'>): import("react/jsx-runtime").JSX.Element;
1
+ import React, { type ComponentPropsWithoutRef } from 'react';
2
+ export default function RuterLogoSvg({ fill, ...properties }: ComponentPropsWithoutRef<'svg'>): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- export default function SenteretForEtAldersvennligNorgeLogoSvg({ fill, ...properties }: ComponentPropsWithoutRef<'svg'>): import("react/jsx-runtime").JSX.Element;
1
+ import React, { type ComponentPropsWithoutRef } from 'react';
2
+ export default function SenteretForEtAldersvennligNorgeLogoSvg({ fill, ...properties }: ComponentPropsWithoutRef<'svg'>): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- export default function Sparebank1LogoSvg({ fill, ...properties }: ComponentPropsWithoutRef<'svg'>): import("react/jsx-runtime").JSX.Element;
1
+ import React, { type ComponentPropsWithoutRef } from 'react';
2
+ export default function Sparebank1LogoSvg({ fill, ...properties }: ComponentPropsWithoutRef<'svg'>): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- export default function SparebankenNorgeLogoSvg({ fill, ...properties }: ComponentPropsWithoutRef<'svg'>): import("react/jsx-runtime").JSX.Element;
1
+ import React, { type ComponentPropsWithoutRef } from 'react';
2
+ export default function SparebankenNorgeLogoSvg({ fill, ...properties }: ComponentPropsWithoutRef<'svg'>): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- export default function StoLogoSvg({ fill, ...properties }: ComponentPropsWithoutRef<'svg'>): import("react/jsx-runtime").JSX.Element;
1
+ import React, { type ComponentPropsWithoutRef } from 'react';
2
+ export default function StoLogoSvg({ fill, ...properties }: ComponentPropsWithoutRef<'svg'>): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
2
- export default function StorebrandLogoSvg({ fill, ...properties }: ComponentPropsWithoutRef<'svg'>): import("react/jsx-runtime").JSX.Element;
1
+ import React, { type ComponentPropsWithoutRef } from 'react';
2
+ export default function StorebrandLogoSvg({ fill, ...properties }: ComponentPropsWithoutRef<'svg'>): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { type ComponentType, type ReactNode } from 'react';
1
+ import React, { type ComponentType, type ReactNode } from 'react';
2
2
  import { type DecoratorType } from './decorators';
3
3
  import { type FlexProperties } from './flex';
4
4
  import { type AtomProperties, type AtomElementType, type DefaultAtomElementType } from './atom';
@@ -11,9 +11,9 @@ type ModalProviderProperties<Data = any> = {
11
11
  close?: (data?: Data) => void;
12
12
  };
13
13
  export declare function useModalContext<Data = any>(): ModalProviderProperties<Data>;
14
- export declare function ModalContent<Type extends AtomElementType = DefaultAtomElementType>(properties: FlexProperties<Type>): import("react/jsx-runtime").JSX.Element;
15
- export declare function ModalHeading<Type extends AtomElementType = DefaultHeadingElementType>({ as, className, ...properties }: AtomProperties<Type>): import("react/jsx-runtime").JSX.Element;
16
- export declare function ModalActions<Type extends AtomElementType = DefaultAtomElementType>({ as, ...properties }: FlexProperties<Type>): import("react/jsx-runtime").JSX.Element;
14
+ export declare function ModalContent<Type extends AtomElementType = DefaultAtomElementType>(properties: FlexProperties<Type>): React.JSX.Element;
15
+ export declare function ModalHeading<Type extends AtomElementType = DefaultHeadingElementType>({ as, className, ...properties }: AtomProperties<Type>): React.JSX.Element;
16
+ export declare function ModalActions<Type extends AtomElementType = DefaultAtomElementType>({ as, ...properties }: FlexProperties<Type>): React.JSX.Element;
17
17
  export type ModalProperties<Data = any> = {
18
18
  readonly root?: HTMLElement | ShadowRoot;
19
19
  readonly outerDecorators?: DecoratorType[];
@@ -30,11 +30,11 @@ export type ModalProperties<Data = any> = {
30
30
  readonly children?: ReactNode;
31
31
  };
32
32
  type ModalBaseProperties<ModalResult> = Omit<ModalProperties<ModalResult>, 'isVisible' | 'onClose'>;
33
- export default function Modal<Data = any>({ root, outerDecorators, innerDecorators, label, maxWidth, className, isVisible, isFullWidth, shouldCloseOnOutsideClick, shouldCloseOnEscapePress, showCloseButton, onClose, children, }: ModalProperties<Data>): import("react/jsx-runtime").JSX.Element | null;
33
+ export default function Modal<Data = any>({ root, outerDecorators, innerDecorators, label, maxWidth, className, isVisible, isFullWidth, shouldCloseOnOutsideClick, shouldCloseOnEscapePress, showCloseButton, onClose, children, }: ModalProperties<Data>): React.JSX.Element | null;
34
34
  export declare function useModal<ModalResult, ModalProperties = ModalBaseProperties<ModalResult>>(ModalComponent: ComponentType<ModalProperties>, properties?: ModalProperties): {
35
35
  isVisible: boolean;
36
36
  show: () => Promise<ModalResult | undefined>;
37
37
  close: (result?: ModalResult) => void;
38
- modal: import("react/jsx-runtime").JSX.Element | null;
38
+ modal: React.JSX.Element | null;
39
39
  };
40
40
  export {};
@@ -1,4 +1,4 @@
1
- import { type HTMLProps } from 'react';
1
+ import React, { type HTMLProps } from 'react';
2
2
  import { type IconType } from '../icons/icon';
3
3
  export declare const noticeTypes: readonly ["default", "success", "information", "warning", "danger"];
4
4
  export type NoticeType = (typeof noticeTypes)[number];
@@ -6,4 +6,4 @@ export type NoticeProperties = HTMLProps<HTMLDivElement> & {
6
6
  readonly type?: NoticeType;
7
7
  readonly icon?: IconType;
8
8
  };
9
- export default function Notice({ type, icon, className, children, ...properties }: NoticeProperties): import("react/jsx-runtime").JSX.Element;
9
+ export default function Notice({ type, icon, className, children, ...properties }: NoticeProperties): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { type HTMLProps, type ReactNode } from 'react';
1
+ import React, { type HTMLProps, type ReactNode } from 'react';
2
2
  import { type IconType } from '../icons/icon';
3
3
  import { type NoticeType } from './notice';
4
4
  export { noticeTypes as notificationTypes } from './notice';
@@ -8,12 +8,14 @@ export type NotificationProperties = {
8
8
  readonly type?: NoticeType;
9
9
  readonly icon?: IconType;
10
10
  readonly children: ReactNode;
11
- readonly onDismiss?: (index: number) => void;
11
+ readonly onDismiss?: (id: string) => void;
12
12
  };
13
- export default function Notification({ type, icon, index, className, children, onDismiss, ...properties }: NotificationProperties & {
13
+ export default function Notification({ type, icon, id, index: inputIndex, shouldDismiss, className, children, onDismiss, ...properties }: NotificationProperties & {
14
14
  readonly index?: number;
15
- } & HTMLProps<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
15
+ readonly shouldDismiss?: boolean;
16
+ } & HTMLProps<HTMLDivElement>): React.JSX.Element;
16
17
  export declare function useCreateNotification(): (notification: NotificationProperties) => void;
17
- export declare function NotificationProvider({ children, }: {
18
+ export declare function NotificationProvider({ limit, children, }: {
19
+ readonly limit?: number;
18
20
  readonly children: ReactNode;
19
- }): import("react/jsx-runtime").JSX.Element;
21
+ }): React.JSX.Element;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../jsx-runtime-BB_1_6y_.js"),e=require("react"),p=require("@kuma-ui/core"),M=require("../utilities/generate-random-id.js"),j=require("./notice.js");function E({type:n,icon:d,index:u,className:c,children:m,onDismiss:s,...o}){const[t,a]=e.useState(!1),[l,C]=e.useState(!1),[f,k]=e.useState(!1);e.useEffect(()=>{const r=setTimeout(()=>{a(!0)},250);return()=>{clearTimeout(r)}},[]);const N=e.useRef(0),v=e.useRef(0),R=e.useCallback(()=>{k(!0)},[]),b=e.useCallback(()=>{k(!1)},[]);e.useEffect(()=>{if(f){v.current+=Date.now()-N.current;return}if(t){N.current=Date.now();const r=6e3-v.current,h=setTimeout(()=>{a(!1),C(!0)},r);return()=>{clearTimeout(h)}}},[f,t]);const x=u??0;return e.useEffect(()=>{if(l&&!t){const r=setTimeout(()=>{s==null||s(x)},300);return()=>{clearTimeout(r)}}},[l,t,s,x]),i.jsxRuntimeExports.jsx("div",{...o,style:{"--index":x},className:p.cx("kakadu-components-1727618227",t&&"kakadu-components-3003995416",c),children:i.jsxRuntimeExports.jsxs(j.default,{role:"status","aria-live":"polite","aria-atomic":"true",type:n,icon:d,className:p.cx("kakadu-components-3951461646",t&&"kakadu-components-2837603142"),onMouseEnter:R,onMouseLeave:b,children:[m,i.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2751825161",children:i.jsxRuntimeExports.jsx("div",{className:p.cx("kakadu-components-47664046",f?"kakadu-components-758522476":"kakadu-components-3914681513")})})]})})}const T=e.createContext({createNotification(){throw new Error("useCreateNotification must be used within a NotificationProvider")}});function S(){const{createNotification:n}=e.useContext(T);return n}function q({children:n}){const[d,u]=e.useState([]),c=e.useCallback(o=>{const t=M.default();u(a=>[...a,{...o,id:t}])},[]),m=e.useCallback(o=>{u(t=>t.filter((a,l)=>l!==o))},[]),s=e.useMemo(()=>({createNotification:c}),[c]);return i.jsxRuntimeExports.jsxs(T.Provider,{value:s,children:[n,d.map((o,t)=>i.jsxRuntimeExports.jsx(E,{...o,index:t,onDismiss:m},o.id))]})}exports.notificationTypes=j.noticeTypes;exports.NotificationProvider=q;exports.default=E;exports.useCreateNotification=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../jsx-runtime-BB_1_6y_.js"),e=require("react"),E=require("@kuma-ui/core"),I=require("../utilities/generate-random-id.js"),T=require("./notice.js");function R({type:i,icon:p,id:u,index:d,shouldDismiss:r,className:k,children:N,onDismiss:c,...s}){const[t,a]=e.useState(!1),[o,m]=e.useState(!1),[n,x]=e.useState(!1),v=d??0,[h,M]=e.useState(v);e.useEffect(()=>{if(r||o)return;const l=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(l)}},[r,o]);const j=e.useRef(0),C=e.useRef(0),S=e.useCallback(()=>{x(!0)},[]),q=e.useCallback(()=>{x(!1)},[]);return e.useEffect(()=>{if(n){C.current+=Date.now()-j.current;return}if(t){j.current=Date.now();const l=6e3-C.current,w=setTimeout(()=>{a(!1),m(!0)},l);return()=>{clearTimeout(w)}}},[n,t]),e.useEffect(()=>{r&&!o&&(a(!1),m(!0))},[r,o]),e.useEffect(()=>{if(o&&!t){const l=setTimeout(()=>{u&&(c==null||c(u))},300);return()=>{clearTimeout(l)}}},[u,o,t,c]),e.useEffect(()=>{n||M(v)},[v,n]),f.jsxRuntimeExports.jsx("div",{...s,style:{"--index":h},className:E.cx("kakadu-components-1727618227",t&&"kakadu-components-3003995416",k),children:f.jsxRuntimeExports.jsxs(T.default,{role:"status","aria-live":"polite","aria-atomic":"true",type:i,icon:p,className:E.cx("kakadu-components-3951461646",t&&"kakadu-components-2837603142"),onMouseEnter:S,onMouseLeave:q,children:[N,f.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2751825161",children:f.jsxRuntimeExports.jsx("div",{className:E.cx("kakadu-components-4050948330",n?"kakadu-components-758522476":"kakadu-components-3914681513")})})]})})}const b=e.createContext({createNotification(){throw new Error("useCreateNotification must be used within a NotificationProvider")}});function g(){const{createNotification:i}=e.useContext(b);return i}function P({limit:i=5,children:p}){const[u,d]=e.useState([]),r=e.useCallback(s=>{const t=I.default();d(a=>{const o=[...a,{...s,id:t}];if(o.length<=i)return o;const m=o.length-i;return o.map((n,x)=>x<m?{...n,shouldDismiss:!0}:n)})},[i]),k=e.useCallback(s=>{d(t=>t.filter(a=>a.id!==s))},[]),N=e.useMemo(()=>({createNotification:r}),[r]),c=e.useMemo(()=>[...u].reverse(),[u]);return f.jsxRuntimeExports.jsxs(b.Provider,{value:N,children:[p,c.map((s,t)=>f.jsxRuntimeExports.jsx(R,{...s,index:t,onDismiss:k},s.id))]})}exports.notificationTypes=T.noticeTypes;exports.NotificationProvider=P;exports.default=R;exports.useCreateNotification=g;
@@ -1,97 +1,113 @@
1
- import { j as i } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { createContext as b, useState as m, useEffect as x, useRef as j, useCallback as d, useContext as y, useMemo as P } from "react";
3
- import { cx as N } from "@kuma-ui/core";
4
- import R from "../utilities/generate-random-id.mjs";
5
- import D from "./notice.mjs";
6
- import { noticeTypes as G } from "./notice.mjs";
7
- function H({
8
- type: n,
9
- icon: f,
10
- index: r,
11
- className: c,
12
- children: l,
13
- onDismiss: o,
14
- ...e
1
+ import { j as u } from "../jsx-runtime-B4hRZ52C.mjs";
2
+ import { createContext as H, useState as d, useEffect as m, useRef as E, useCallback as k, useContext as L, useMemo as I } from "react";
3
+ import { cx as j } from "@kuma-ui/core";
4
+ import S from "../utilities/generate-random-id.mjs";
5
+ import V from "./notice.mjs";
6
+ import { noticeTypes as Q } from "./notice.mjs";
7
+ function B({
8
+ type: i,
9
+ icon: N,
10
+ id: a,
11
+ index: l,
12
+ shouldDismiss: s,
13
+ className: v,
14
+ children: T,
15
+ onDismiss: c,
16
+ ...o
15
17
  }) {
16
- const [t, s] = m(!1), [u, E] = m(!1), [p, v] = m(!1);
17
- x(() => {
18
- const a = setTimeout(() => {
19
- s(!0);
20
- }, 250);
18
+ const [e, r] = d(!1), [t, p] = d(!1), [n, x] = d(!1), h = l ?? 0, [b, g] = d(h);
19
+ m(() => {
20
+ if (s || t)
21
+ return;
22
+ const f = setTimeout(() => {
23
+ r(!0);
24
+ }, 100);
21
25
  return () => {
22
- clearTimeout(a);
26
+ clearTimeout(f);
23
27
  };
28
+ }, [s, t]);
29
+ const C = E(0), w = E(0), y = k(() => {
30
+ x(!0);
31
+ }, []), P = k(() => {
32
+ x(!1);
24
33
  }, []);
25
- const T = j(0), h = j(0), w = d(() => {
26
- v(!0);
27
- }, []), I = d(() => {
28
- v(!1);
29
- }, []);
30
- x(() => {
31
- if (p) {
32
- h.current += Date.now() - T.current;
34
+ return m(() => {
35
+ if (n) {
36
+ w.current += Date.now() - C.current;
33
37
  return;
34
38
  }
35
- if (t) {
36
- T.current = Date.now();
37
- const a = 6e3 - h.current, M = setTimeout(() => {
38
- s(!1), E(!0);
39
- }, a);
39
+ if (e) {
40
+ C.current = Date.now();
41
+ const f = 6e3 - w.current, R = setTimeout(() => {
42
+ r(!1), p(!0);
43
+ }, f);
40
44
  return () => {
41
- clearTimeout(M);
45
+ clearTimeout(R);
42
46
  };
43
47
  }
44
- }, [p, t]);
45
- const k = r ?? 0;
46
- return x(() => {
47
- if (u && !t) {
48
- const a = setTimeout(() => {
49
- o == null || o(k);
48
+ }, [n, e]), m(() => {
49
+ s && !t && (r(!1), p(!0));
50
+ }, [s, t]), m(() => {
51
+ if (t && !e) {
52
+ const f = setTimeout(() => {
53
+ a && (c == null || c(a));
50
54
  }, 300);
51
55
  return () => {
52
- clearTimeout(a);
56
+ clearTimeout(f);
53
57
  };
54
58
  }
55
- }, [u, t, o, k]), /* @__PURE__ */ i.jsx("div", { ...e, style: {
56
- "--index": k
57
- }, className: N("kakadu-components-1727618227", t && "kakadu-components-3003995416", c), children: /* @__PURE__ */ i.jsxs(D, { role: "status", "aria-live": "polite", "aria-atomic": "true", type: n, icon: f, className: N("kakadu-components-3951461646", t && "kakadu-components-2837603142"), onMouseEnter: w, onMouseLeave: I, children: [
58
- l,
59
- /* @__PURE__ */ i.jsx("div", { className: "kakadu-components-2751825161", children: /* @__PURE__ */ i.jsx("div", { className: N("kakadu-components-47664046", p ? "kakadu-components-758522476" : "kakadu-components-3914681513") }) })
59
+ }, [a, t, e, c]), m(() => {
60
+ n || g(h);
61
+ }, [h, n]), /* @__PURE__ */ u.jsx("div", { ...o, style: {
62
+ "--index": b
63
+ }, className: j("kakadu-components-1727618227", e && "kakadu-components-3003995416", v), children: /* @__PURE__ */ u.jsxs(V, { role: "status", "aria-live": "polite", "aria-atomic": "true", type: i, icon: N, className: j("kakadu-components-3951461646", e && "kakadu-components-2837603142"), onMouseEnter: y, onMouseLeave: P, children: [
64
+ T,
65
+ /* @__PURE__ */ u.jsx("div", { className: "kakadu-components-2751825161", children: /* @__PURE__ */ u.jsx("div", { className: j("kakadu-components-4050948330", n ? "kakadu-components-758522476" : "kakadu-components-3914681513") }) })
60
66
  ] }) });
61
67
  }
62
- const C = b({
68
+ const M = H({
63
69
  createNotification() {
64
70
  throw new Error("useCreateNotification must be used within a NotificationProvider");
65
71
  }
66
72
  });
67
- function z() {
73
+ function G() {
68
74
  const {
69
- createNotification: n
70
- } = y(C);
71
- return n;
75
+ createNotification: i
76
+ } = L(M);
77
+ return i;
72
78
  }
73
- function A({
74
- children: n
79
+ function J({
80
+ limit: i = 5,
81
+ children: N
75
82
  }) {
76
- const [f, r] = m([]), c = d((e) => {
77
- const t = R();
78
- r((s) => [...s, {
79
- ...e,
80
- id: t
81
- }]);
82
- }, []), l = d((e) => {
83
- r((t) => t.filter((s, u) => u !== e));
84
- }, []), o = P(() => ({
85
- createNotification: c
86
- }), [c]);
87
- return /* @__PURE__ */ i.jsxs(C.Provider, { value: o, children: [
88
- n,
89
- f.map((e, t) => /* @__PURE__ */ i.jsx(H, { ...e, index: t, onDismiss: l }, e.id))
83
+ const [a, l] = d([]), s = k((o) => {
84
+ const e = S();
85
+ l((r) => {
86
+ const t = [...r, {
87
+ ...o,
88
+ id: e
89
+ }];
90
+ if (t.length <= i)
91
+ return t;
92
+ const p = t.length - i;
93
+ return t.map((n, x) => x < p ? {
94
+ ...n,
95
+ shouldDismiss: !0
96
+ } : n);
97
+ });
98
+ }, [i]), v = k((o) => {
99
+ l((e) => e.filter((r) => r.id !== o));
100
+ }, []), T = I(() => ({
101
+ createNotification: s
102
+ }), [s]), c = I(() => [...a].reverse(), [a]);
103
+ return /* @__PURE__ */ u.jsxs(M.Provider, { value: T, children: [
104
+ N,
105
+ c.map((o, e) => /* @__PURE__ */ u.jsx(B, { ...o, index: e, onDismiss: v }, o.id))
90
106
  ] });
91
107
  }
92
108
  export {
93
- A as NotificationProvider,
94
- H as default,
95
- G as notificationTypes,
96
- z as useCreateNotification
109
+ J as NotificationProvider,
110
+ B as default,
111
+ Q as notificationTypes,
112
+ G as useCreateNotification
97
113
  };
@@ -1,4 +1,4 @@
1
- import { type HTMLAttributeAnchorTarget, type MouseEvent, type ReactNode, type Ref } from 'react';
1
+ import React, { type HTMLAttributeAnchorTarget, type MouseEvent, type ReactNode, type Ref } from 'react';
2
2
  import { type IconType } from '../icons/icon';
3
3
  import { type DecoratorType } from './decorators';
4
4
  export declare const dangerPopoverMenuItemStyles: string;
@@ -28,12 +28,12 @@ export declare function usePopoverMenu(items: PopoverMenuItemProperties[]): {
28
28
  isVisible: boolean;
29
29
  show: () => Promise<void | undefined>;
30
30
  close: (result?: void | undefined) => void;
31
- popoverMenu: import("react/jsx-runtime").JSX.Element | null;
31
+ popoverMenu: React.JSX.Element | null;
32
32
  };
33
33
  export type PopoverMenuProperties = {
34
34
  readonly menu: ReactNode;
35
35
  readonly className?: string;
36
36
  readonly children?: ReactNode;
37
37
  };
38
- export default function PopoverMenu({ menu, className, children, }: PopoverMenuProperties): import("react/jsx-runtime").JSX.Element;
38
+ export default function PopoverMenu({ menu, className, children, }: PopoverMenuProperties): React.JSX.Element;
39
39
  export {};
@@ -1,4 +1,4 @@
1
- import { type ComponentType } from 'react';
1
+ import React, { type ComponentType } from 'react';
2
2
  import { type AtomElementType, type AtomProperties, type DefaultAtomElementType } from './atom';
3
3
  type InitialFocusElement = HTMLElement | null;
4
4
  type PopoverProviderProperties<Data = any> = {
@@ -9,7 +9,7 @@ type PopoverProviderProperties<Data = any> = {
9
9
  close?: (data?: Data) => void;
10
10
  };
11
11
  export declare function usePopoverContext<Data = any>(): PopoverProviderProperties<Data>;
12
- export declare function PopoverContainer<Type extends AtomElementType = DefaultAtomElementType>({ as, className, ...properties }: AtomProperties<Type>): import("react/jsx-runtime").JSX.Element;
12
+ export declare function PopoverContainer<Type extends AtomElementType = DefaultAtomElementType>({ as, className, ...properties }: AtomProperties<Type>): React.JSX.Element;
13
13
  export type PopoverProperties<Data = any, Type extends AtomElementType = DefaultAtomElementType> = AtomProperties<Type> & {
14
14
  readonly innerClassName?: string;
15
15
  readonly label?: string;
@@ -20,11 +20,11 @@ export type PopoverProperties<Data = any, Type extends AtomElementType = Default
20
20
  readonly onClose?: (data?: Data) => void;
21
21
  };
22
22
  type PopoverBaseProperties<PopoverResult> = Omit<PopoverProperties<PopoverResult>, 'isVisible' | 'onClose'>;
23
- export default function Popover<Data = any, Type extends AtomElementType = DefaultAtomElementType>({ as, isVisible, label, shouldCloseOnOutsideClick, shouldCloseOnEscapePress, children, className, innerClassName, onClose, ...properties }: PopoverProperties<Data, Type>): import("react/jsx-runtime").JSX.Element | null;
23
+ export default function Popover<Data = any, Type extends AtomElementType = DefaultAtomElementType>({ as, isVisible, label, shouldCloseOnOutsideClick, shouldCloseOnEscapePress, children, className, innerClassName, onClose, ...properties }: PopoverProperties<Data, Type>): React.JSX.Element | null;
24
24
  export declare function usePopover<PopoverResult, PopoverProperties = PopoverBaseProperties<PopoverResult>>(PopoverComponent: ComponentType<PopoverProperties>, properties?: PopoverProperties): {
25
25
  isVisible: boolean;
26
26
  show: () => Promise<PopoverResult | undefined>;
27
27
  close: (result?: PopoverResult) => void;
28
- popover: import("react/jsx-runtime").JSX.Element | null;
28
+ popover: React.JSX.Element | null;
29
29
  };
30
30
  export {};
@@ -1,4 +1,4 @@
1
- import { type CSSProperties, type RefObject } from 'react';
1
+ import React, { type CSSProperties, type RefObject } from 'react';
2
2
  import { type AtomElementType, type AtomProperties } from './atom';
3
3
  type RevealerOptions = {
4
4
  readonly delay?: number;
@@ -15,5 +15,5 @@ export declare function useRevealer(reference: RefObject<HTMLElement | null>, op
15
15
  style: CSSProperties;
16
16
  className: string;
17
17
  };
18
- export default function Revealer<Type extends AtomElementType = 'span'>({ as, delay, animationDelay, duration, threshold, distance, isMoving, isCentered, shouldReveal, children, className, ...properties }: AtomProperties<Type> & RevealerOptions): import("react/jsx-runtime").JSX.Element;
18
+ export default function Revealer<Type extends AtomElementType = 'span'>({ as, delay, animationDelay, duration, threshold, distance, isMoving, isCentered, shouldReveal, children, className, ...properties }: AtomProperties<Type> & RevealerOptions): React.JSX.Element;
19
19
  export {};
@@ -1,4 +1,4 @@
1
- import { type ChangeEvent, type HTMLProps, type ReactNode } from 'react';
1
+ import React, { type ChangeEvent, type HTMLProps, type ReactNode } from 'react';
2
2
  import { type InputLabelControllerProperties } from './input';
3
3
  export type SelectOption<Type extends string = string> = {
4
4
  readonly value: Type;
@@ -9,4 +9,4 @@ export type SelectProperties<Type extends string = string> = Omit<InputLabelCont
9
9
  readonly options: Array<SelectOption<Type>>;
10
10
  readonly onChange?: (value: Type, event: ChangeEvent<HTMLSelectElement>) => void;
11
11
  };
12
- export default function Select<Type extends string = string>({ label, options, error, warning, information, footnote, className, onChange, ...properties }: SelectProperties<Type>): import("react/jsx-runtime").JSX.Element;
12
+ export default function Select<Type extends string = string>({ label, options, error, warning, information, footnote, className, onChange, ...properties }: SelectProperties<Type>): React.JSX.Element;
@@ -1,7 +1,7 @@
1
- import { type HTMLProps } from 'react';
2
- export default function Separator({ className, ...properties }: HTMLProps<HTMLHRElement>): import("react/jsx-runtime").JSX.Element;
3
- export declare function SmallSeparator({ className, ...properties }: HTMLProps<HTMLHRElement>): import("react/jsx-runtime").JSX.Element;
1
+ import React, { type HTMLProps } from 'react';
2
+ export default function Separator({ className, ...properties }: HTMLProps<HTMLHRElement>): React.JSX.Element;
3
+ export declare function SmallSeparator({ className, ...properties }: HTMLProps<HTMLHRElement>): React.JSX.Element;
4
4
  export declare function SeparatorLabel({ label, className, ...properties }: {
5
5
  readonly label: string;
6
- } & HTMLProps<HTMLHRElement>): import("react/jsx-runtime").JSX.Element;
7
- export declare function VerticalSeparator({ className, ...properties }: HTMLProps<HTMLHRElement>): import("react/jsx-runtime").JSX.Element;
6
+ } & HTMLProps<HTMLHRElement>): React.JSX.Element;
7
+ export declare function VerticalSeparator({ className, ...properties }: HTMLProps<HTMLHRElement>): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { type AtomElementType, type AtomProperties } from './atom';
2
3
  export declare function getDeterministicSkeletonWidth(a: number, b: number, { minimum, maximum }: {
3
4
  readonly minimum: number;
@@ -10,11 +11,11 @@ type SkeletonProperties = {
10
11
  readonly className?: string;
11
12
  readonly isAnimated?: boolean;
12
13
  };
13
- export declare function SkeletonInstance<Type extends AtomElementType = 'span'>({ as, label, width, height, className, children, isAnimated, ...properties }: SkeletonProperties & AtomProperties<Type>): import("react/jsx-runtime").JSX.Element;
14
+ export declare function SkeletonInstance<Type extends AtomElementType = 'span'>({ as, label, width, height, className, children, isAnimated, ...properties }: SkeletonProperties & AtomProperties<Type>): React.JSX.Element;
14
15
  export default function Skeleton({ label, lines, isDeterministic, isAnimated, }: {
15
16
  readonly label?: string;
16
17
  readonly lines?: number;
17
18
  readonly isDeterministic?: boolean;
18
19
  readonly isAnimated?: boolean;
19
- }): import("react/jsx-runtime").JSX.Element | null;
20
+ }): React.JSX.Element | null;
20
21
  export {};
@@ -1,10 +1,11 @@
1
+ import React from 'react';
1
2
  type SpinnerProperties = {
2
3
  readonly size?: number;
3
4
  readonly strokeWidth?: number;
4
5
  readonly isAnimated?: boolean;
5
6
  };
6
- export default function Spinner({ size, strokeWidth, isAnimated, }: SpinnerProperties): import("react/jsx-runtime").JSX.Element;
7
+ export default function Spinner({ size, strokeWidth, isAnimated, }: SpinnerProperties): React.JSX.Element;
7
8
  export declare function RevealSpinner({ isVisible, ...properties }: {
8
9
  readonly isVisible?: boolean;
9
- } & Omit<SpinnerProperties, 'isAnimated'>): import("react/jsx-runtime").JSX.Element;
10
+ } & Omit<SpinnerProperties, 'isAnimated'>): React.JSX.Element;
10
11
  export {};
@@ -1,4 +1,4 @@
1
- import { type HTMLProps, type ReactNode } from 'react';
1
+ import React, { type HTMLProps, type ReactNode } from 'react';
2
2
  import { type ButtonTooltipPosition } from './button-tooltip';
3
3
  export declare const textButtonVariants: readonly ["primary", "delete"];
4
4
  export type TextButtonVariant = (typeof textButtonVariants)[number];
@@ -19,5 +19,5 @@ export type TextButtonProperties = BaseTextButtonProperties & ({
19
19
  children?: never;
20
20
  label: string;
21
21
  });
22
- export default function TextButton({ ref, iconLeft, iconRight, variant, tooltip, tooltipPosition, href, target, rel, disabled, hasUnderline, isSkeleton, isSkeletonAnimated, className, children, label, ...properties }: TextButtonProperties): import("react/jsx-runtime").JSX.Element;
22
+ export default function TextButton({ ref, iconLeft, iconRight, variant, tooltip, tooltipPosition, href, target, rel, disabled, hasUnderline, isSkeleton, isSkeletonAnimated, className, children, label, ...properties }: TextButtonProperties): React.JSX.Element;
23
23
  export {};
@@ -1,19 +1,20 @@
1
+ import React from 'react';
1
2
  import { type AtomElementType, type AtomProperties } from './atom';
2
3
  import { type WrapperWidth } from './wrapper';
3
4
  export declare const textShadowStyles: string;
4
5
  export type DefaultHeadingElementType = 'h1';
5
6
  export declare const defaultHeadingElementType = "h1";
6
- export declare function Heading<Type extends AtomElementType = DefaultHeadingElementType>({ reference, as, className, ...properties }: AtomProperties<Type>): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Heading<Type extends AtomElementType = DefaultHeadingElementType>({ reference, as, className, ...properties }: AtomProperties<Type>): React.JSX.Element;
7
8
  export declare function AnchorHeading<Type extends AtomElementType = 'h1'>({ as, id, children, className, ...properties }: Omit<AtomProperties<Type>, 'id'> & {
8
9
  readonly id: string;
9
- }): import("react/jsx-runtime").JSX.Element;
10
+ }): React.JSX.Element;
10
11
  export declare const spanStyles: string;
11
- export declare function Span<Type extends AtomElementType = 'span'>({ as, className, ...properties }: AtomProperties<Type>): import("react/jsx-runtime").JSX.Element;
12
- export declare function Paragraph<Type extends AtomElementType = 'p'>({ as, className, ...properties }: AtomProperties<Type>): import("react/jsx-runtime").JSX.Element;
13
- export declare function Footnote<Type extends AtomElementType = 'small'>({ as, className, ...properties }: AtomProperties<Type>): import("react/jsx-runtime").JSX.Element;
14
- export declare function Label<Type extends AtomElementType = 'span'>({ as, className, ...properties }: AtomProperties<Type>): import("react/jsx-runtime").JSX.Element;
12
+ export declare function Span<Type extends AtomElementType = 'span'>({ as, className, ...properties }: AtomProperties<Type>): React.JSX.Element;
13
+ export declare function Paragraph<Type extends AtomElementType = 'p'>({ as, className, ...properties }: AtomProperties<Type>): React.JSX.Element;
14
+ export declare function Footnote<Type extends AtomElementType = 'small'>({ as, className, ...properties }: AtomProperties<Type>): React.JSX.Element;
15
+ export declare function Label<Type extends AtomElementType = 'span'>({ as, className, ...properties }: AtomProperties<Type>): React.JSX.Element;
15
16
  export type TextProperties<Type extends AtomElementType = 'div'> = Omit<AtomProperties<Type>, 'width'> & {
16
17
  readonly width?: WrapperWidth;
17
18
  };
18
- export default function Text<Type extends AtomElementType = 'div'>({ as, width, className, ...properties }: TextProperties<Type>): import("react/jsx-runtime").JSX.Element;
19
- export declare function Hero<Type extends AtomElementType = 'div'>(properties: TextProperties<Type>): import("react/jsx-runtime").JSX.Element;
19
+ export default function Text<Type extends AtomElementType = 'div'>({ as, width, className, ...properties }: TextProperties<Type>): React.JSX.Element;
20
+ export declare function Hero<Type extends AtomElementType = 'div'>(properties: TextProperties<Type>): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { type RefObject } from 'react';
1
+ import React, { type RefObject } from 'react';
2
2
  export declare const themePreferences: string[];
3
3
  type ThemePreference = (typeof themePreferences)[number];
4
4
  type ThemeElement = HTMLElement | RefObject<HTMLElement | null>;
@@ -7,5 +7,5 @@ export declare function useIsLightTheme(element?: ThemeElement): boolean;
7
7
  export declare function useIsDarkTheme(element?: ThemeElement): boolean;
8
8
  export declare function getThemePreference(): string;
9
9
  export declare function setThemePreference(preference: ThemePreference): void;
10
- export default function ThemeSetter(): import("react/jsx-runtime").JSX.Element;
10
+ export default function ThemeSetter(): React.JSX.Element;
11
11
  export {};
@@ -1,4 +1,5 @@
1
+ import React from 'react';
1
2
  export default function Veil({ className, hasMovingStars, }: {
2
3
  readonly className?: string;
3
4
  readonly hasMovingStars?: boolean;
4
- }): import("react/jsx-runtime").JSX.Element;
5
+ }): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import React, { type ReactNode } from 'react';
2
2
  import { type AtomElementType, type DefaultAtomElementType } from './atom';
3
3
  import { type FlexProperties } from './flex';
4
4
  export declare const wrapperWidths: readonly ["wide", "page", "text", "content"];
@@ -9,4 +9,4 @@ export type WrapperProperties<Type extends AtomElementType = DefaultAtomElementT
9
9
  readonly outerChildrenBefore?: ReactNode;
10
10
  readonly outerChildrenAfter?: ReactNode;
11
11
  };
12
- export default function Wrapper<Type extends AtomElementType = DefaultAtomElementType>({ as, gap, direction, preset, distribution, alignment, wrap, width, className, innerClassName, children, outerChildrenBefore, outerChildrenAfter, ...properties }: WrapperProperties<Type>): import("react/jsx-runtime").JSX.Element;
12
+ export default function Wrapper<Type extends AtomElementType = DefaultAtomElementType>({ as, gap, direction, preset, distribution, alignment, wrap, width, className, innerClassName, children, outerChildrenBefore, outerChildrenAfter, ...properties }: WrapperProperties<Type>): React.JSX.Element;