@kakadu/components 3.7.3 → 3.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,8 @@
1
1
  import { type ComponentType, type ReactNode } from 'react';
2
2
  import { type DecoratorType } from './decorators';
3
+ import { type FlexProperties } from './flex';
4
+ import { type AtomProperties, type AtomElementType, type DefaultAtomElementType } from './atom';
5
+ import { type DefaultHeadingElementType } from './text';
3
6
  type InitialFocusElement = HTMLElement | null;
4
7
  type ModalProviderProperties<Data = any> = {
5
8
  isVisible: boolean;
@@ -8,6 +11,9 @@ type ModalProviderProperties<Data = any> = {
8
11
  close?: (data?: Data) => void;
9
12
  };
10
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, className, ...properties }: FlexProperties<Type>): import("react/jsx-runtime").JSX.Element;
11
17
  export type ModalProperties<Data = any> = {
12
18
  readonly root?: HTMLElement | ShadowRoot;
13
19
  readonly outerDecorators?: DecoratorType[];
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("../jsx-runtime-BB_1_6y_.js"),e=require("react"),v=require("@kuma-ui/core"),P=require("react-dom"),$=require("../focus-trap-react-CcpTuiJi.js"),B=require("../icons/icon.js"),A=require("./text-button.js"),q=require("./decorators.js"),C=e.createContext({isVisible:!1,isInteractive:!1}),{Provider:D}=C;function y(){return e.useContext(C)}function z(){const{isInteractive:u,close:o}=y(),r=e.useCallback(()=>{o==null||o()},[o]);return n.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2566044647",children:n.jsxRuntimeExports.jsx(A.default,{iconLeft:B.IconType.times,label:"Close",disabled:!u,onClick:r})})}function G({root:u,outerDecorators:o=[],innerDecorators:r=[],label:x,maxWidth:c,className:m,isVisible:s,isFullWidth:l=!1,shouldCloseOnOutsideClick:i=!0,shouldCloseOnEscapePress:d=!0,showCloseButton:L=!0,onClose:k,children:S}){const E=e.useRef(null),R=e.useRef(null),[M,g]=e.useState(!1),[a,f]=e.useState(!1),b=e.useCallback(t=>{E.current=t,f(!1)},[]),j=e.useRef(null),h=e.useCallback(t=>{t&&(j.current=t)},[]),[I,w]=e.useState(s??!1),N=e.useMemo(()=>({isVisible:I,isInteractive:a,setInitialFocus:h,close:b}),[I,a,h,b]);e.useEffect(()=>{s&&(g(!0),w(!0))},[s]),e.useEffect(()=>{if(s){const t=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(t)}}f(!1)},[s]),e.useEffect(()=>{if(M&&!a){const t=setTimeout(()=>{k==null||k(E.current??void 0),w(!1)},370);return()=>{clearTimeout(t)}}},[M,a,k]),e.useEffect(()=>{const t=R.current;if(s&&i&&t){const p=F=>{t===F.target&&f(!1)};return t.addEventListener("click",p),()=>{t.removeEventListener("click",p)}}},[s,i]),e.useEffect(()=>{if(!s||!d)return;const t=p=>{p.key==="Escape"&&f(!1)};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}},[s,d]);const _=e.useMemo(()=>({initialFocus:()=>j.current??void 0,onActivate:()=>{var t;return(t=j.current)==null?void 0:t.focus()}}),[]),T=n.jsxRuntimeExports.jsx(q.default,{decorators:o,children:n.jsxRuntimeExports.jsx("div",{"aria-hidden":!a,style:{"--max-width":c?`${c}px`:void 0},className:v.cx("kakadu-components-4119461136",a&&"kakadu-components-2522346797",m),children:n.jsxRuntimeExports.jsx(q.default,{decorators:r,children:n.jsxRuntimeExports.jsx($.focusTrapReactExports.FocusTrap,{active:a,focusTrapOptions:_,children:n.jsxRuntimeExports.jsx("div",{ref:R,className:"kakadu-components-4011815997",children:n.jsxRuntimeExports.jsx("div",{role:"dialog","aria-modal":"true","aria-label":x??"Modal",className:v.cx("kakadu-components-3324483532",l&&"kakadu-components-3799971070",a&&"kakadu-components-968755580"),children:n.jsxRuntimeExports.jsxs(D,{value:N,children:[L?n.jsxRuntimeExports.jsx(z,{}):null,n.jsxRuntimeExports.jsx("div",{className:v.cx("kakadu-components-633990035",l&&"kakadu-components-171969824"),children:S})]})})})})})})});return u?P.createPortal(T,u):T}function H(u,o){const[r,x]=e.useState(!1),c=e.useRef(void 0),m=e.useCallback(async()=>(x(!0),new Promise(i=>{c.current=i})),[]),s=e.useCallback(i=>{var d;x(!1),(d=c.current)==null||d.call(c,i),c.current=void 0},[]),l=e.useMemo(()=>n.jsxRuntimeExports.jsx(u,{...o,isVisible:r,onClose:s}),[u,o,r,s]);return e.useMemo(()=>({isVisible:r,show:m,modal:l}),[r,m,l])}exports.default=G;exports.useModal=H;exports.useModalContext=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../jsx-runtime-BB_1_6y_.js"),e=require("react"),m=require("@kuma-ui/core"),P=require("react-dom"),$=require("../focus-trap-react-CcpTuiJi.js"),B=require("../icons/icon.js"),D=require("./text-button.js"),w=require("./decorators.js"),C=require("./flex.js"),z=require("./atom.js"),I=require("./text.js"),y=e.createContext({isVisible:!1,isInteractive:!1}),{Provider:G}=y;function _(){return e.useContext(y)}function J(){const{isInteractive:n,close:o}=_(),a=e.useCallback(()=>{o==null||o()},[o]);return s.jsxRuntimeExports.jsx("div",{className:"kakadu-components-2566044647",children:s.jsxRuntimeExports.jsx(D.default,{iconLeft:B.IconType.times,label:"Close",disabled:!n,onClick:a})})}function K(n){return s.jsxRuntimeExports.jsx(C.default,{gap:2,...n})}function Q({as:n,className:o,...a}){return s.jsxRuntimeExports.jsx(I.Heading,{...a,as:n??I.defaultHeadingElementType,className:m.cx("kakadu-components-4275938488",o)})}function U({as:n,className:o,...a}){return s.jsxRuntimeExports.jsx(C.default,{direction:"row",gap:1,...a,as:n??z.defaultAtomElementType,className:m.cx("kakadu-components-1895330929",o)})}function V({root:n,outerDecorators:o=[],innerDecorators:a=[],label:f,maxWidth:c,className:p,isVisible:r,isFullWidth:l=!1,shouldCloseOnOutsideClick:i=!0,shouldCloseOnEscapePress:d=!0,showCloseButton:N=!0,onClose:k,children:L}){const v=e.useRef(null),R=e.useRef(null),[M,S]=e.useState(!1),[u,x]=e.useState(!1),q=e.useCallback(t=>{v.current=t,x(!1)},[]),E=e.useRef(null),T=e.useCallback(t=>{t&&(E.current=t)},[]),[b,g]=e.useState(r??!1),A=e.useMemo(()=>({isVisible:b,isInteractive:u,setInitialFocus:T,close:q}),[b,u,T,q]);e.useEffect(()=>{r&&(S(!0),g(!0))},[r]),e.useEffect(()=>{if(r){const t=setTimeout(()=>{x(!0)},100);return()=>{clearTimeout(t)}}x(!1)},[r]),e.useEffect(()=>{if(M&&!u){const t=setTimeout(()=>{k==null||k(v.current??void 0),g(!1)},370);return()=>{clearTimeout(t)}}},[M,u,k]),e.useEffect(()=>{const t=R.current;if(r&&i&&t){const j=H=>{t===H.target&&x(!1)};return t.addEventListener("click",j),()=>{t.removeEventListener("click",j)}}},[r,i]),e.useEffect(()=>{if(!r||!d)return;const t=j=>{j.key==="Escape"&&x(!1)};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}},[r,d]);const F=e.useMemo(()=>({initialFocus:()=>E.current??void 0,onActivate:()=>{var t;return(t=E.current)==null?void 0:t.focus()}}),[]),h=s.jsxRuntimeExports.jsx(w.default,{decorators:o,children:s.jsxRuntimeExports.jsx("div",{"aria-hidden":!u,style:{"--max-width":c?`${c}px`:void 0},className:m.cx("kakadu-components-4119461136",u&&"kakadu-components-2522346797",p),children:s.jsxRuntimeExports.jsx(w.default,{decorators:a,children:s.jsxRuntimeExports.jsx($.focusTrapReactExports.FocusTrap,{active:u,focusTrapOptions:F,children:s.jsxRuntimeExports.jsx("div",{ref:R,className:"kakadu-components-4011815997",children:s.jsxRuntimeExports.jsx("div",{role:"dialog","aria-modal":"true","aria-label":f??"Modal",className:m.cx("kakadu-components-3324483532",l&&"kakadu-components-3799971070",u&&"kakadu-components-968755580"),children:s.jsxRuntimeExports.jsxs(G,{value:A,children:[N?s.jsxRuntimeExports.jsx(J,{}):null,s.jsxRuntimeExports.jsx("div",{className:m.cx("kakadu-components-633990035",l&&"kakadu-components-171969824"),children:L})]})})})})})})});return n?P.createPortal(h,n):h}function X(n,o){const[a,f]=e.useState(!1),c=e.useRef(void 0),p=e.useCallback(async()=>(f(!0),new Promise(i=>{c.current=i})),[]),r=e.useCallback(i=>{var d;f(!1),(d=c.current)==null||d.call(c,i),c.current=void 0},[]),l=e.useMemo(()=>s.jsxRuntimeExports.jsx(n,{...o,isVisible:a,onClose:r}),[n,o,a,r]);return e.useMemo(()=>({isVisible:a,show:p,modal:l}),[a,p,l])}exports.ModalActions=U;exports.ModalContent=K;exports.ModalHeading=Q;exports.default=V;exports.useModal=X;exports.useModalContext=_;
@@ -1,58 +1,78 @@
1
- import { j as n } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { createContext as q, useRef as j, useState as h, useCallback as m, useMemo as I, useEffect as f, useContext as z } from "react";
3
- import { cx as T } from "@kuma-ui/core";
1
+ import { j as t } from "../jsx-runtime-B4hRZ52C.mjs";
2
+ import { createContext as q, useRef as h, useState as w, useCallback as p, useMemo as I, useEffect as m, useContext as z } from "react";
3
+ import { cx as f } from "@kuma-ui/core";
4
4
  import { createPortal as G } from "react-dom";
5
- import { f as H } from "../focus-trap-react-DYXrtbDH.mjs";
6
- import { IconType as J } from "../icons/icon.mjs";
7
- import K from "./text-button.mjs";
8
- import g from "./decorators.mjs";
9
- const C = q({
5
+ import { f as J } from "../focus-trap-react-DYXrtbDH.mjs";
6
+ import { IconType as K } from "../icons/icon.mjs";
7
+ import Q from "./text-button.mjs";
8
+ import F from "./decorators.mjs";
9
+ import C from "./flex.mjs";
10
+ import { defaultAtomElementType as U } from "./atom.mjs";
11
+ import { Heading as V, defaultHeadingElementType as X } from "./text.mjs";
12
+ const A = q({
10
13
  isVisible: !1,
11
14
  isInteractive: !1
12
15
  }), {
13
- Provider: Q
14
- } = C;
15
- function U() {
16
- return z(C);
16
+ Provider: Y
17
+ } = A;
18
+ function Z() {
19
+ return z(A);
17
20
  }
18
- function V() {
21
+ function _() {
19
22
  const {
20
- isInteractive: c,
21
- close: s
22
- } = U(), o = m(() => {
23
- s == null || s();
24
- }, [s]);
25
- return /* @__PURE__ */ n.jsx("div", { className: "kakadu-components-2566044647", children: /* @__PURE__ */ n.jsx(K, { iconLeft: J.times, label: "Close", disabled: !c, onClick: o }) });
23
+ isInteractive: n,
24
+ close: o
25
+ } = Z(), s = p(() => {
26
+ o == null || o();
27
+ }, [o]);
28
+ return /* @__PURE__ */ t.jsx("div", { className: "kakadu-components-2566044647", children: /* @__PURE__ */ t.jsx(Q, { iconLeft: K.times, label: "Close", disabled: !n, onClick: s }) });
29
+ }
30
+ function ue(n) {
31
+ return /* @__PURE__ */ t.jsx(C, { gap: 2, ...n });
32
+ }
33
+ function le({
34
+ as: n,
35
+ className: o,
36
+ ...s
37
+ }) {
38
+ return /* @__PURE__ */ t.jsx(V, { ...s, as: n ?? X, className: f("kakadu-components-4275938488", o) });
26
39
  }
27
- function ne({
28
- root: c,
29
- outerDecorators: s = [],
30
- innerDecorators: o = [],
40
+ function de({
41
+ as: n,
42
+ className: o,
43
+ ...s
44
+ }) {
45
+ return /* @__PURE__ */ t.jsx(C, { direction: "row", gap: 1, ...s, as: n ?? U, className: f("kakadu-components-1895330929", o) });
46
+ }
47
+ function me({
48
+ root: n,
49
+ outerDecorators: o = [],
50
+ innerDecorators: s = [],
31
51
  label: k,
32
52
  maxWidth: r,
33
53
  className: x,
34
- isVisible: t,
54
+ isVisible: a,
35
55
  isFullWidth: u = !1,
36
56
  shouldCloseOnOutsideClick: i = !0,
37
57
  shouldCloseOnEscapePress: l = !0,
38
- showCloseButton: B = !0,
39
- onClose: p,
40
- children: P
58
+ showCloseButton: H = !0,
59
+ onClose: v,
60
+ children: B
41
61
  }) {
42
- const E = j(null), y = j(null), [L, A] = h(!1), [a, d] = h(!1), M = m((e) => {
62
+ const E = h(null), M = h(null), [g, P] = w(!1), [c, d] = w(!1), y = p((e) => {
43
63
  E.current = e, d(!1);
44
- }, []), w = j(null), R = m((e) => {
45
- e && (w.current = e);
46
- }, []), [b, N] = h(t ?? !1), D = I(() => ({
47
- isVisible: b,
48
- isInteractive: a,
49
- setInitialFocus: R,
50
- close: M
51
- }), [b, a, R, M]);
52
- f(() => {
53
- t && (A(!0), N(!0));
54
- }, [t]), f(() => {
55
- if (t) {
64
+ }, []), T = h(null), N = p((e) => {
65
+ e && (T.current = e);
66
+ }, []), [L, R] = w(a ?? !1), D = I(() => ({
67
+ isVisible: L,
68
+ isInteractive: c,
69
+ setInitialFocus: N,
70
+ close: y
71
+ }), [L, c, N, y]);
72
+ m(() => {
73
+ a && (P(!0), R(!0));
74
+ }, [a]), m(() => {
75
+ if (a) {
56
76
  const e = setTimeout(() => {
57
77
  d(!0);
58
78
  }, 100);
@@ -61,64 +81,67 @@ function ne({
61
81
  };
62
82
  }
63
83
  d(!1);
64
- }, [t]), f(() => {
65
- if (L && !a) {
84
+ }, [a]), m(() => {
85
+ if (g && !c) {
66
86
  const e = setTimeout(() => {
67
- p == null || p(E.current ?? void 0), N(!1);
87
+ v == null || v(E.current ?? void 0), R(!1);
68
88
  }, 370);
69
89
  return () => {
70
90
  clearTimeout(e);
71
91
  };
72
92
  }
73
- }, [L, a, p]), f(() => {
74
- const e = y.current;
75
- if (t && i && e) {
76
- const v = ($) => {
93
+ }, [g, c, v]), m(() => {
94
+ const e = M.current;
95
+ if (a && i && e) {
96
+ const j = ($) => {
77
97
  e === $.target && d(!1);
78
98
  };
79
- return e.addEventListener("click", v), () => {
80
- e.removeEventListener("click", v);
99
+ return e.addEventListener("click", j), () => {
100
+ e.removeEventListener("click", j);
81
101
  };
82
102
  }
83
- }, [t, i]), f(() => {
84
- if (!t || !l)
103
+ }, [a, i]), m(() => {
104
+ if (!a || !l)
85
105
  return;
86
- const e = (v) => {
87
- v.key === "Escape" && d(!1);
106
+ const e = (j) => {
107
+ j.key === "Escape" && d(!1);
88
108
  };
89
109
  return window.addEventListener("keydown", e), () => {
90
110
  window.removeEventListener("keydown", e);
91
111
  };
92
- }, [t, l]);
112
+ }, [a, l]);
93
113
  const S = I(() => ({
94
- initialFocus: () => w.current ?? void 0,
114
+ initialFocus: () => T.current ?? void 0,
95
115
  onActivate: () => {
96
116
  var e;
97
- return (e = w.current) == null ? void 0 : e.focus();
117
+ return (e = T.current) == null ? void 0 : e.focus();
98
118
  }
99
- }), []), F = /* @__PURE__ */ n.jsx(g, { decorators: s, children: /* @__PURE__ */ n.jsx("div", { "aria-hidden": !a, style: {
119
+ }), []), b = /* @__PURE__ */ t.jsx(F, { decorators: o, children: /* @__PURE__ */ t.jsx("div", { "aria-hidden": !c, style: {
100
120
  "--max-width": r ? `${r}px` : void 0
101
- }, className: T("kakadu-components-4119461136", a && "kakadu-components-2522346797", x), children: /* @__PURE__ */ n.jsx(g, { decorators: o, children: /* @__PURE__ */ n.jsx(H.FocusTrap, { active: a, focusTrapOptions: S, children: /* @__PURE__ */ n.jsx("div", { ref: y, className: "kakadu-components-4011815997", children: /* @__PURE__ */ n.jsx("div", { role: "dialog", "aria-modal": "true", "aria-label": k ?? "Modal", className: T("kakadu-components-3324483532", u && "kakadu-components-3799971070", a && "kakadu-components-968755580"), children: /* @__PURE__ */ n.jsxs(Q, { value: D, children: [
102
- B ? /* @__PURE__ */ n.jsx(V, {}) : null,
103
- /* @__PURE__ */ n.jsx("div", { className: T("kakadu-components-633990035", u && "kakadu-components-171969824"), children: P })
121
+ }, className: f("kakadu-components-4119461136", c && "kakadu-components-2522346797", x), children: /* @__PURE__ */ t.jsx(F, { decorators: s, children: /* @__PURE__ */ t.jsx(J.FocusTrap, { active: c, focusTrapOptions: S, children: /* @__PURE__ */ t.jsx("div", { ref: M, className: "kakadu-components-4011815997", children: /* @__PURE__ */ t.jsx("div", { role: "dialog", "aria-modal": "true", "aria-label": k ?? "Modal", className: f("kakadu-components-3324483532", u && "kakadu-components-3799971070", c && "kakadu-components-968755580"), children: /* @__PURE__ */ t.jsxs(Y, { value: D, children: [
122
+ H ? /* @__PURE__ */ t.jsx(_, {}) : null,
123
+ /* @__PURE__ */ t.jsx("div", { className: f("kakadu-components-633990035", u && "kakadu-components-171969824"), children: B })
104
124
  ] }) }) }) }) }) }) });
105
- return c ? G(F, c) : F;
125
+ return n ? G(b, n) : b;
106
126
  }
107
- function se(c, s) {
108
- const [o, k] = h(!1), r = j(void 0), x = m(async () => (k(!0), new Promise((i) => {
127
+ function fe(n, o) {
128
+ const [s, k] = w(!1), r = h(void 0), x = p(async () => (k(!0), new Promise((i) => {
109
129
  r.current = i;
110
- })), []), t = m((i) => {
130
+ })), []), a = p((i) => {
111
131
  var l;
112
132
  k(!1), (l = r.current) == null || l.call(r, i), r.current = void 0;
113
- }, []), u = I(() => /* @__PURE__ */ n.jsx(c, { ...s, isVisible: o, onClose: t }), [c, s, o, t]);
133
+ }, []), u = I(() => /* @__PURE__ */ t.jsx(n, { ...o, isVisible: s, onClose: a }), [n, o, s, a]);
114
134
  return I(() => ({
115
- isVisible: o,
135
+ isVisible: s,
116
136
  show: x,
117
137
  modal: u
118
- }), [o, x, u]);
138
+ }), [s, x, u]);
119
139
  }
120
140
  export {
121
- ne as default,
122
- se as useModal,
123
- U as useModalContext
141
+ de as ModalActions,
142
+ ue as ModalContent,
143
+ le as ModalHeading,
144
+ me as default,
145
+ fe as useModal,
146
+ Z as useModalContext
124
147
  };
@@ -1,7 +1,9 @@
1
1
  import { type AtomElementType, type AtomProperties } from './atom';
2
2
  import { WrapperWidth } from './wrapper';
3
3
  export declare const textShadowStyles: string;
4
- export declare function Heading<Type extends AtomElementType = 'h1'>({ reference, as, className, ...properties }: AtomProperties<Type>): import("react/jsx-runtime").JSX.Element;
4
+ export type DefaultHeadingElementType = 'h1';
5
+ 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;
5
7
  export declare function AnchorHeading<Type extends AtomElementType = 'h1'>({ as, id, children, className, ...properties }: Omit<AtomProperties<Type>, 'id'> & {
6
8
  readonly id: string;
7
9
  }): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../jsx-runtime-BB_1_6y_.js"),a=require("@kuma-ui/core"),k=require("../theme.js"),c=require("./atom.js"),r=require("./wrapper.js"),u="kakadu-components-1538322784",x="kakadu-components-739732526";function m({reference:t,as:e,className:n,...o}){return s.jsxRuntimeExports.jsx(c.default,{reference:t,as:e??"h1",...o,className:a.cx(k.overflowProtectionStyles,u,"kakadu-components-1669332734",x,n)})}function j({as:t,id:e,children:n,className:o,...l}){return s.jsxRuntimeExports.jsx(m,{as:t??"h1",id:e,...l,className:a.cx(o),children:s.jsxRuntimeExports.jsx("a",{href:`#${e}`,className:"kakadu-components-1038708690",children:n})})}const p=a.cx("kakadu-components-1923397960",u,x);function i({as:t,className:e,...n}){return s.jsxRuntimeExports.jsx(c.default,{as:t??"span",...n,className:a.cx(p,e)})}function f({as:t,className:e,...n}){return s.jsxRuntimeExports.jsx(c.default,{as:t??"p",...n,className:a.cx(p,"kakadu-components-621160204",e)})}function h({as:t,className:e,...n}){return s.jsxRuntimeExports.jsx(i,{as:t??"span",...n,className:a.cx("kakadu-components-1329768068",e)})}function d({as:t,width:e=r.WrapperWidth.text,className:n,...o}){return s.jsxRuntimeExports.jsx(c.default,{as:t??"div",...o,className:a.cx("kakadu-components-1437359321",e===r.WrapperWidth.page&&"kakadu-components-2433581593",e===r.WrapperWidth.text&&"kakadu-components-958855245",e===r.WrapperWidth.content&&"kakadu-components-797764377",n)})}function S(t){const{className:e}=t;return s.jsxRuntimeExports.jsx(d,{...t,className:a.cx("kakadu-components-323682454",e)})}exports.AnchorHeading=j;exports.Heading=m;exports.Hero=S;exports.Label=h;exports.Paragraph=f;exports.Span=i;exports.default=d;exports.spanStyles=p;exports.textShadowStyles=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../jsx-runtime-BB_1_6y_.js"),s=require("@kuma-ui/core"),j=require("../theme.js"),c=require("./atom.js"),r=require("./wrapper.js"),u="kakadu-components-1538322784",x="kakadu-components-739732526",m="h1";function i({reference:t,as:e,className:n,...o}){return a.jsxRuntimeExports.jsx(c.default,{reference:t,as:e??m,...o,className:s.cx(j.overflowProtectionStyles,u,"kakadu-components-1669332734",x,n)})}function f({as:t,id:e,children:n,className:o,...k}){return a.jsxRuntimeExports.jsx(i,{as:t??"h1",id:e,...k,className:s.cx(o),children:a.jsxRuntimeExports.jsx("a",{href:`#${e}`,className:"kakadu-components-1038708690",children:n})})}const p=s.cx("kakadu-components-1923397960",u,x);function d({as:t,className:e,...n}){return a.jsxRuntimeExports.jsx(c.default,{as:t??"span",...n,className:s.cx(p,e)})}function h({as:t,className:e,...n}){return a.jsxRuntimeExports.jsx(c.default,{as:t??"p",...n,className:s.cx(p,"kakadu-components-621160204",e)})}function S({as:t,className:e,...n}){return a.jsxRuntimeExports.jsx(d,{as:t??"span",...n,className:s.cx("kakadu-components-1329768068",e)})}function l({as:t,width:e=r.WrapperWidth.text,className:n,...o}){return a.jsxRuntimeExports.jsx(c.default,{as:t??"div",...o,className:s.cx("kakadu-components-1437359321",e===r.WrapperWidth.page&&"kakadu-components-2433581593",e===r.WrapperWidth.text&&"kakadu-components-958855245",e===r.WrapperWidth.content&&"kakadu-components-797764377",n)})}function g(t){const{className:e}=t;return a.jsxRuntimeExports.jsx(l,{...t,className:s.cx("kakadu-components-323682454",e)})}exports.AnchorHeading=f;exports.Heading=i;exports.Hero=g;exports.Label=S;exports.Paragraph=h;exports.Span=d;exports.default=l;exports.defaultHeadingElementType=m;exports.spanStyles=p;exports.textShadowStyles=u;
@@ -1,70 +1,71 @@
1
1
  import { j as t } from "../jsx-runtime-B4hRZ52C.mjs";
2
2
  import { cx as o } from "@kuma-ui/core";
3
- import { overflowProtectionStyles as i } from "../theme.mjs";
4
- import r from "./atom.mjs";
3
+ import { overflowProtectionStyles as l } from "../theme.mjs";
4
+ import m from "./atom.mjs";
5
5
  import { WrapperWidth as c } from "./wrapper.mjs";
6
- const m = "kakadu-components-1538322784", u = "kakadu-components-739732526";
7
- function l({
6
+ const r = "kakadu-components-1538322784", u = "kakadu-components-739732526", d = "h1";
7
+ function i({
8
8
  reference: n,
9
9
  as: a,
10
10
  className: s,
11
11
  ...e
12
12
  }) {
13
- return /* @__PURE__ */ t.jsx(r, { reference: n, as: a ?? "h1", ...e, className: o(i, m, "kakadu-components-1669332734", u, s) });
13
+ return /* @__PURE__ */ t.jsx(m, { reference: n, as: a ?? d, ...e, className: o(l, r, "kakadu-components-1669332734", u, s) });
14
14
  }
15
- function g({
15
+ function y({
16
16
  as: n,
17
17
  id: a,
18
18
  children: s,
19
19
  className: e,
20
20
  ...k
21
21
  }) {
22
- return /* @__PURE__ */ t.jsx(l, { as: n ?? "h1", id: a, ...k, className: o(e), children: /* @__PURE__ */ t.jsx("a", { href: `#${a}`, className: "kakadu-components-1038708690", children: s }) });
22
+ return /* @__PURE__ */ t.jsx(i, { as: n ?? "h1", id: a, ...k, className: o(e), children: /* @__PURE__ */ t.jsx("a", { href: `#${a}`, className: "kakadu-components-1038708690", children: s }) });
23
23
  }
24
- const p = o("kakadu-components-1923397960", m, u);
24
+ const p = o("kakadu-components-1923397960", r, u);
25
25
  function x({
26
26
  as: n,
27
27
  className: a,
28
28
  ...s
29
29
  }) {
30
- return /* @__PURE__ */ t.jsx(r, { as: n ?? "span", ...s, className: o(p, a) });
30
+ return /* @__PURE__ */ t.jsx(m, { as: n ?? "span", ...s, className: o(p, a) });
31
31
  }
32
- function y({
32
+ function H({
33
33
  as: n,
34
34
  className: a,
35
35
  ...s
36
36
  }) {
37
- return /* @__PURE__ */ t.jsx(r, { as: n ?? "p", ...s, className: o(p, "kakadu-components-621160204", a) });
37
+ return /* @__PURE__ */ t.jsx(m, { as: n ?? "p", ...s, className: o(p, "kakadu-components-621160204", a) });
38
38
  }
39
- function H({
39
+ function W({
40
40
  as: n,
41
41
  className: a,
42
42
  ...s
43
43
  }) {
44
44
  return /* @__PURE__ */ t.jsx(x, { as: n ?? "span", ...s, className: o("kakadu-components-1329768068", a) });
45
45
  }
46
- function d({
46
+ function f({
47
47
  as: n,
48
48
  width: a = c.text,
49
49
  className: s,
50
50
  ...e
51
51
  }) {
52
- return /* @__PURE__ */ t.jsx(r, { as: n ?? "div", ...e, className: o("kakadu-components-1437359321", a === c.page && "kakadu-components-2433581593", a === c.text && "kakadu-components-958855245", a === c.content && "kakadu-components-797764377", s) });
52
+ return /* @__PURE__ */ t.jsx(m, { as: n ?? "div", ...e, className: o("kakadu-components-1437359321", a === c.page && "kakadu-components-2433581593", a === c.text && "kakadu-components-958855245", a === c.content && "kakadu-components-797764377", s) });
53
53
  }
54
- function W(n) {
54
+ function v(n) {
55
55
  const {
56
56
  className: a
57
57
  } = n;
58
- return /* @__PURE__ */ t.jsx(d, { ...n, className: o("kakadu-components-323682454", a) });
58
+ return /* @__PURE__ */ t.jsx(f, { ...n, className: o("kakadu-components-323682454", a) });
59
59
  }
60
60
  export {
61
- g as AnchorHeading,
62
- l as Heading,
63
- W as Hero,
64
- H as Label,
65
- y as Paragraph,
61
+ y as AnchorHeading,
62
+ i as Heading,
63
+ v as Hero,
64
+ W as Label,
65
+ H as Paragraph,
66
66
  x as Span,
67
- d as default,
67
+ f as default,
68
+ d as defaultHeadingElementType,
68
69
  p as spanStyles,
69
- m as textShadowStyles
70
+ r as textShadowStyles
70
71
  };