@kakadu/components 6.1.1 → 6.3.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 (128) 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/click-ripples.js +1 -1
  10. package/build/components/click-ripples.mjs +50 -45
  11. package/build/components/collapsible.d.ts +2 -2
  12. package/build/components/combobox.d.ts +2 -2
  13. package/build/components/combobox.js +1 -1
  14. package/build/components/combobox.mjs +161 -159
  15. package/build/components/copy-icon-button.d.ts +2 -1
  16. package/build/components/datum.d.ts +2 -2
  17. package/build/components/dot.d.ts +2 -2
  18. package/build/components/flex.d.ts +2 -1
  19. package/build/components/footer.d.ts +2 -2
  20. package/build/components/gauge.d.ts +2 -1
  21. package/build/components/header.d.ts +2 -1
  22. package/build/components/hover-gradient.d.ts +2 -2
  23. package/build/components/hover-gradient.js +1 -1
  24. package/build/components/hover-gradient.mjs +48 -35
  25. package/build/components/icon-button.d.ts +2 -2
  26. package/build/components/input.d.ts +3 -3
  27. package/build/components/input.js +2 -2
  28. package/build/components/input.mjs +21 -21
  29. package/build/components/logos/akt-logo.d.ts +2 -2
  30. package/build/components/logos/amedia-logo.d.ts +2 -2
  31. package/build/components/logos/bankaxept-logo.d.ts +2 -2
  32. package/build/components/logos/bankid-logo.d.ts +2 -2
  33. package/build/components/logos/dnb-logo.d.ts +2 -2
  34. package/build/components/logos/entur-logo.d.ts +2 -2
  35. package/build/components/logos/gjensidige-logo.d.ts +2 -2
  36. package/build/components/logos/kakadu-academy-logo.d.ts +2 -2
  37. package/build/components/logos/kakadu-guide-icon.d.ts +2 -1
  38. package/build/components/logos/kakadu-guide-logo.d.ts +3 -3
  39. package/build/components/logos/kakadu-index-logo.d.ts +2 -2
  40. package/build/components/logos/kakadu-logo.d.ts +2 -2
  41. package/build/components/logos/kakadu-play-logo.d.ts +2 -2
  42. package/build/components/logos/kolumbus-logo.d.ts +2 -2
  43. package/build/components/logos/nordea-logo.d.ts +2 -2
  44. package/build/components/logos/norsk-tipping-logo.d.ts +2 -2
  45. package/build/components/logos/ruter-logo.d.ts +2 -2
  46. package/build/components/logos/senteret-for-et-aldersvennlig-norge-logo.d.ts +2 -2
  47. package/build/components/logos/sparebank1-logo.d.ts +2 -2
  48. package/build/components/logos/sparebanken-norge-logo.d.ts +2 -2
  49. package/build/components/logos/sto-logo.d.ts +2 -2
  50. package/build/components/logos/storebrand-logo.d.ts +2 -2
  51. package/build/components/modal.d.ts +6 -6
  52. package/build/components/modal.js +1 -1
  53. package/build/components/modal.mjs +86 -85
  54. package/build/components/moving-gradients.js +1 -1
  55. package/build/components/moving-gradients.mjs +80 -70
  56. package/build/components/moving-stars.js +1 -1
  57. package/build/components/moving-stars.mjs +77 -74
  58. package/build/components/notice.d.ts +2 -2
  59. package/build/components/notification.d.ts +8 -6
  60. package/build/components/notification.js +1 -1
  61. package/build/components/notification.mjs +87 -71
  62. package/build/components/popover-menu.d.ts +3 -3
  63. package/build/components/popover-menu.js +1 -1
  64. package/build/components/popover-menu.mjs +131 -129
  65. package/build/components/popover.d.ts +4 -4
  66. package/build/components/popover.js +1 -1
  67. package/build/components/popover.mjs +82 -73
  68. package/build/components/revealer.d.ts +2 -2
  69. package/build/components/select.d.ts +2 -2
  70. package/build/components/separator.d.ts +5 -5
  71. package/build/components/skeleton.d.ts +3 -2
  72. package/build/components/spinner.d.ts +3 -2
  73. package/build/components/text-button.d.ts +2 -2
  74. package/build/components/text.d.ts +9 -8
  75. package/build/components/theme-setter.d.ts +2 -2
  76. package/build/components/veil.d.ts +2 -1
  77. package/build/components/wrapper.d.ts +2 -2
  78. package/build/components.css +1 -1
  79. package/build/hooks/use-is-document-focused.js +1 -1
  80. package/build/hooks/use-is-document-focused.mjs +30 -14
  81. package/build/icons/anchor-down.d.ts +2 -2
  82. package/build/icons/anchor-up.d.ts +2 -2
  83. package/build/icons/arrow-down.d.ts +2 -2
  84. package/build/icons/arrow-left.d.ts +2 -2
  85. package/build/icons/arrow-right.d.ts +2 -2
  86. package/build/icons/arrow-up.d.ts +2 -2
  87. package/build/icons/caret-down.d.ts +2 -2
  88. package/build/icons/caret-left.d.ts +2 -2
  89. package/build/icons/caret-right.d.ts +2 -2
  90. package/build/icons/caret-up.d.ts +2 -2
  91. package/build/icons/check.d.ts +2 -2
  92. package/build/icons/chevron-down.d.ts +2 -2
  93. package/build/icons/chevron-left.d.ts +2 -2
  94. package/build/icons/chevron-right.d.ts +2 -2
  95. package/build/icons/chevron-up.d.ts +2 -2
  96. package/build/icons/chrome-browser-logo.d.ts +2 -2
  97. package/build/icons/cog.d.ts +2 -2
  98. package/build/icons/copy.d.ts +2 -2
  99. package/build/icons/document.d.ts +2 -2
  100. package/build/icons/dots.d.ts +2 -2
  101. package/build/icons/drag.d.ts +2 -2
  102. package/build/icons/edge-browser-logo.d.ts +2 -2
  103. package/build/icons/edit.d.ts +2 -2
  104. package/build/icons/exclamation-triangle.d.ts +2 -2
  105. package/build/icons/external.d.ts +2 -2
  106. package/build/icons/eye.d.ts +2 -2
  107. package/build/icons/icon.d.ts +2 -2
  108. package/build/icons/information.d.ts +2 -2
  109. package/build/icons/kakadu-guide-glyph.d.ts +2 -2
  110. package/build/icons/kakadu-guide-icon.d.ts +2 -2
  111. package/build/icons/menu.d.ts +2 -2
  112. package/build/icons/package.d.ts +2 -2
  113. package/build/icons/plus.d.ts +2 -2
  114. package/build/icons/select.d.ts +2 -2
  115. package/build/icons/share.d.ts +2 -2
  116. package/build/icons/sparkle.d.ts +2 -2
  117. package/build/icons/test.d.ts +2 -2
  118. package/build/icons/times.d.ts +2 -2
  119. package/build/icons/trash.d.ts +2 -2
  120. package/build/icons/trend-up.d.ts +2 -2
  121. package/build/index.d.ts +2 -0
  122. package/build/index.js +1 -1
  123. package/build/index.mjs +19 -17
  124. package/build/theme.d.ts +2 -1
  125. package/build/utilities/listeners.d.ts +5 -0
  126. package/build/utilities/listeners.js +1 -0
  127. package/build/utilities/listeners.mjs +16 -0
  128. package/package.json +16 -22
@@ -1,219 +1,221 @@
1
1
  import { j as i } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { useRef as H, useId as Q, useState as K, useCallback as m, useEffect as h, useDeferredValue as ce, useMemo as Z } from "react";
3
- import { cx as T } from "@kuma-ui/core";
2
+ import { useRef as F, useId as J, useState as M, useCallback as m, useEffect as x, useDeferredValue as ce, useMemo as W } from "react";
3
+ import { cx as H } from "@kuma-ui/core";
4
4
  import ie from "../hooks/use-synchronized-value.mjs";
5
5
  import le from "../icons/icon.mjs";
6
6
  import ue from "../icons/chevron-up.mjs";
7
7
  import me from "../utilities/search.mjs";
8
+ import Z from "../utilities/listeners.mjs";
8
9
  import de from "./input.mjs";
9
- import { Span as R } from "./text.mjs";
10
- import W from "./flex.mjs";
10
+ import { Span as P } from "./text.mjs";
11
+ import Q from "./flex.mjs";
11
12
  import { SkeletonInstance as fe } from "./skeleton.mjs";
13
+ const pe = Z((t) => {
14
+ window.addEventListener("mousemove", t, {
15
+ capture: !0
16
+ });
17
+ }, (t) => {
18
+ window.removeEventListener("mousemove", t, {
19
+ capture: !0
20
+ });
21
+ }), ve = Z((t) => {
22
+ window.addEventListener("keydown", t, {
23
+ capture: !0
24
+ });
25
+ }, (t) => {
26
+ window.removeEventListener("keydown", t, {
27
+ capture: !0
28
+ });
29
+ });
12
30
  function _() {
13
31
  const {
14
- value: n,
15
- setValue: v
32
+ value: t,
33
+ setValue: p
16
34
  } = ie("isKeyboardNavigating");
17
- return Z(() => ({
18
- isKeyboardNavigating: n,
19
- setIsKeyboardNavigating: v
20
- }), [n, v]);
35
+ return W(() => ({
36
+ isKeyboardNavigating: t,
37
+ setIsKeyboardNavigating: p
38
+ }), [t, p]);
21
39
  }
22
- function F(n) {
23
- return "text" in n ? n.text : n.label;
40
+ function D(t) {
41
+ return "text" in t ? t.text : t.label;
24
42
  }
25
- const z = "kakadu-components-1144794361", U = "kakadu-components-2911184744";
26
- function pe({
27
- isSelected: n,
28
- id: v,
29
- value: k,
43
+ const R = "kakadu-components-1144794361", z = "kakadu-components-2911184744";
44
+ function be({
45
+ isSelected: t,
46
+ id: p,
47
+ value: b,
30
48
  label: o,
31
- onSelect: w,
32
- onHover: g
49
+ onSelect: h,
50
+ onHover: I
33
51
  }) {
34
52
  const {
35
- isKeyboardNavigating: b
36
- } = _(), N = m(() => {
37
- w(k);
38
- }, [w, k]), l = m((d) => {
39
- b || d.movementX === 0 && d.movementY === 0 || g(k);
40
- }, [b, g, k]), r = H(null);
41
- return h(() => {
53
+ isKeyboardNavigating: v
54
+ } = _(), g = m(() => {
55
+ h(b);
56
+ }, [h, b]), l = m((d) => {
57
+ v || d.movementX === 0 && d.movementY === 0 || I(b);
58
+ }, [v, I, b]), r = F(null);
59
+ return x(() => {
42
60
  const d = r.current;
43
- n && d && b && setTimeout(() => {
61
+ t && d && v && setTimeout(() => {
44
62
  d.scrollIntoView({
45
63
  behavior: "smooth",
46
64
  block: "nearest"
47
65
  });
48
66
  }, 0);
49
- }, [n, b]), /* @__PURE__ */ i.jsx("li", { ref: r, id: v, role: "option", "aria-selected": n, tabIndex: -1, className: T(z, "kakadu-components-4130497639", b ? "kakadu-components-962373561" : "kakadu-components-1109598791"), onClick: N, onMouseMove: l, children: /* @__PURE__ */ i.jsx(R, { className: T(U, typeof o == "string" && "kakadu-components-154286052"), children: o }) });
67
+ }, [t, v]), /* @__PURE__ */ i.jsx("li", { ref: r, id: p, role: "option", "aria-selected": t, tabIndex: -1, className: H(R, "kakadu-components-4130497639", v ? "kakadu-components-962373561" : "kakadu-components-1109598791"), onClick: g, onMouseMove: l, children: /* @__PURE__ */ i.jsx(P, { className: H(z, typeof o == "string" && "kakadu-components-154286052"), children: o }) });
50
68
  }
51
- function ve({
52
- isLoading: n,
53
- id: v,
54
- activeOptionId: k,
69
+ function ke({
70
+ isLoading: t,
71
+ id: p,
72
+ activeOptionId: b,
55
73
  selectedValue: o,
56
- options: w,
57
- onSelect: g,
58
- onHover: b
74
+ options: h,
75
+ onSelect: I,
76
+ onHover: v
59
77
  }) {
60
- const N = H(null);
61
- return h(() => {
62
- const l = N.current;
78
+ const g = F(null);
79
+ return x(() => {
80
+ const l = g.current;
63
81
  l && l.scrollIntoView({
64
82
  behavior: "smooth",
65
83
  block: "nearest"
66
84
  });
67
- }, []), /* @__PURE__ */ i.jsxs("ul", { ref: N, id: v, role: "listbox", "aria-label": "Options", tabIndex: -1, className: "kakadu-components-3718330689", children: [
68
- w.length === 0 ? n ? null : /* @__PURE__ */ i.jsxs(W, { "aria-atomic": !0, as: "li", role: "status", "aria-live": "polite", direction: "row", preset: "start", gap: 0.5, className: z, children: [
85
+ }, []), /* @__PURE__ */ i.jsxs("ul", { ref: g, id: p, role: "listbox", "aria-label": "Options", tabIndex: -1, className: "kakadu-components-3718330689", children: [
86
+ h.length === 0 ? t ? null : /* @__PURE__ */ i.jsxs(Q, { "aria-atomic": !0, as: "li", role: "status", "aria-live": "polite", direction: "row", preset: "start", gap: 0.5, className: R, children: [
69
87
  /* @__PURE__ */ i.jsx(le, { size: 15, type: "exclamationTriangle" }),
70
- /* @__PURE__ */ i.jsx(R, { className: U, children: "No results." })
71
- ] }) : w.map((l, r) => /* @__PURE__ */ i.jsx(
72
- pe,
88
+ /* @__PURE__ */ i.jsx(P, { className: z, children: "No results." })
89
+ ] }) : h.map((l, r) => /* @__PURE__ */ i.jsx(
90
+ be,
73
91
  {
74
92
  ...l,
75
- id: l.value === o ? k : void 0,
93
+ id: l.value === o ? b : void 0,
76
94
  isSelected: l.value === o,
77
- onSelect: g,
78
- onHover: b
95
+ onSelect: I,
96
+ onHover: v
79
97
  },
80
- F(l) + r
98
+ D(l) + r
81
99
  )),
82
- n ? /* @__PURE__ */ i.jsx(W, { as: "li", alignment: "center", className: z, children: /* @__PURE__ */ i.jsx(R, { className: T(U, "kakadu-components-2015848015"), children: /* @__PURE__ */ i.jsx(fe, { width: "100%", height: "1.3em" }) }) }) : null
100
+ t ? /* @__PURE__ */ i.jsx(Q, { as: "li", alignment: "center", className: R, children: /* @__PURE__ */ i.jsx(P, { className: H(z, "kakadu-components-2015848015"), children: /* @__PURE__ */ i.jsx(fe, { width: "100%", height: "1.3em" }) }) }) : null
83
101
  ] });
84
102
  }
85
- function Oe({
86
- isLoading: n,
87
- shouldFilterOptions: v = !0,
88
- label: k,
103
+ function Me({
104
+ isLoading: t,
105
+ shouldFilterOptions: p = !0,
106
+ label: b,
89
107
  options: o,
90
- error: w,
91
- warning: g,
92
- information: b,
93
- footnote: N,
108
+ error: h,
109
+ warning: I,
110
+ information: v,
111
+ footnote: g,
94
112
  className: l,
95
113
  onChange: r,
96
114
  onSelect: d,
97
- ...X
115
+ ...U
98
116
  }) {
99
- const M = H(null), Y = Q(), q = Q(), [V, A] = K(!1), $ = m(() => {
100
- A(!0);
117
+ const K = F(null), X = J(), Y = J(), [N, T] = M(!1), $ = m(() => {
118
+ T(!0);
101
119
  }, []), ee = m((e) => {
102
- var t;
103
- (t = M.current) != null && t.contains(e.relatedTarget) || A(!1);
104
- }, []), [O, a] = K(!1);
105
- h(() => {
106
- a(V);
107
- }, [V]);
108
- const [C, j] = K(""), {
109
- value: x
110
- } = X, [f, E] = K(x), [S, te] = K(x), G = H(S), c = m((e) => {
111
- te(e), G.current = e;
120
+ var n;
121
+ (n = K.current) != null && n.contains(e.relatedTarget) || T(!1);
122
+ }, []), [O, a] = M(!1);
123
+ x(() => {
124
+ a(N);
125
+ }, [N]);
126
+ const [q, V] = M(""), {
127
+ value: k
128
+ } = U, [f, E] = M(k), [S, te] = M(k), C = F(S), c = m((e) => {
129
+ te(e), C.current = e;
112
130
  }, []);
113
- h(() => {
114
- E(x), c(x);
115
- }, [x, c]), h(() => {
116
- const e = o.find((t) => t.value === x);
117
- e ? j(F(e)) : x === void 0 && j("");
118
- }, [o, x]);
131
+ x(() => {
132
+ E(k), c(k);
133
+ }, [k, c]), x(() => {
134
+ const e = o.find((n) => n.value === k);
135
+ e ? V(D(e)) : k === void 0 && V("");
136
+ }, [o, k]);
119
137
  const ne = m(() => {
120
- f && (j(""), c(void 0));
121
- }, [f, c]), se = m((e, t) => {
122
- j(e), r == null || r(e, t), a(!0), E(void 0);
138
+ f && (V(""), c(void 0));
139
+ }, [f, c]), se = m((e, n) => {
140
+ V(e), r == null || r(e, n), a(!0), E(void 0);
123
141
  }, [r]), oe = m((e) => {
124
- var t;
125
- (t = M.current) != null && t.contains(e.target) && a(!0);
126
- }, []), I = m((e) => {
127
- const t = e == null ? void 0 : e.value;
128
- c(t), e ? j(F(e)) : (j(""), r == null || r("")), d == null || d(t);
142
+ var n;
143
+ (n = K.current) != null && n.contains(e.target) && a(!0);
144
+ }, []), w = m((e) => {
145
+ const n = e == null ? void 0 : e.value;
146
+ c(n), e ? V(D(e)) : (V(""), r == null || r("")), d == null || d(n);
129
147
  }, [c, r, d]), re = m((e) => {
130
- const t = o.find((p) => p.value === e);
131
- I(t), E(e), a(!1);
132
- }, [o, I]), ae = m((e) => {
148
+ const n = o.find((j) => j.value === e);
149
+ w(n), E(e), a(!1);
150
+ }, [o, w]), ae = m((e) => {
133
151
  c(e);
134
- }, [c]), B = ce(C), u = Z(() => !v || f ? o : me(B, o, F), [v, f, o, B]);
135
- h(() => {
152
+ }, [c]), B = ce(q), u = W(() => !p || f ? o : me(B, o, D), [p, f, o, B]);
153
+ x(() => {
136
154
  !f && B.length > 0 && u.length > 0 && !u.some((e) => S === e.value) && c(u[0].value);
137
155
  }, [f, B, u, S, c]);
138
156
  const {
139
157
  setIsKeyboardNavigating: L
140
158
  } = _();
141
- return h(() => {
142
- if (!V)
143
- return;
144
- const e = (t) => {
145
- t.movementX === 0 && t.movementY === 0 || L(!1);
146
- };
147
- return window.addEventListener("mousemove", e, {
148
- capture: !0
149
- }), () => {
150
- window.removeEventListener("mousemove", e, {
151
- capture: !0
159
+ return x(() => {
160
+ if (N)
161
+ return pe((e) => {
162
+ e.movementX === 0 && e.movementY === 0 || L(!1);
152
163
  });
153
- };
154
- }, [V, L]), h(() => {
155
- if (!V)
156
- return;
157
- const e = (t) => {
158
- var J;
159
- let p;
160
- const D = u.length, P = u.findIndex((s) => s.value === G.current), y = () => {
161
- t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation();
162
- };
163
- switch (t.key) {
164
- case "Enter": {
165
- const s = u[P];
166
- s && (y(), L(!0), a(!1), I(s), E(s.value));
167
- break;
168
- }
169
- case "Escape": {
170
- if (O)
171
- y(), f ? c(void 0) : I(void 0), a(!1);
172
- else if (f)
173
- y(), a(!0), I(void 0);
174
- else {
175
- y(), A(!1);
176
- const s = document.activeElement;
177
- s instanceof HTMLElement && ((J = M.current) != null && J.contains(s)) && s.blur();
164
+ }, [N, L]), x(() => {
165
+ if (N)
166
+ return ve((e) => {
167
+ var G;
168
+ let n;
169
+ const j = u.length, A = u.findIndex((s) => s.value === C.current), y = () => {
170
+ e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation();
171
+ };
172
+ switch (e.key) {
173
+ case "Enter": {
174
+ const s = u[A];
175
+ s && (y(), L(!0), a(!1), w(s), E(s.value));
176
+ break;
177
+ }
178
+ case "Escape": {
179
+ if (O)
180
+ y(), f ? c(void 0) : w(void 0), a(!1);
181
+ else if (f)
182
+ y(), a(!0), w(void 0);
183
+ else {
184
+ y(), T(!1);
185
+ const s = document.activeElement;
186
+ s instanceof HTMLElement && ((G = K.current) != null && G.contains(s)) && s.blur();
187
+ }
188
+ return;
189
+ }
190
+ case "ArrowDown": {
191
+ n = A + 1, a(!0);
192
+ break;
193
+ }
194
+ case "ArrowUp": {
195
+ n = A - 1, a(!0), n < 0 && (n = j - 1);
196
+ break;
197
+ }
198
+ case "Home": {
199
+ a(!0), n = 0;
200
+ break;
201
+ }
202
+ case "End": {
203
+ a(!0), n = j - 1;
204
+ break;
205
+ }
206
+ case "Backspace": {
207
+ u.some((s) => s.value === f) && (y(), w(void 0), a(!0));
208
+ break;
178
209
  }
179
- return;
180
- }
181
- case "ArrowDown": {
182
- p = P + 1, a(!0);
183
- break;
184
- }
185
- case "ArrowUp": {
186
- p = P - 1, a(!0), p < 0 && (p = D - 1);
187
- break;
188
- }
189
- case "Home": {
190
- a(!0), p = 0;
191
- break;
192
- }
193
- case "End": {
194
- a(!0), p = D - 1;
195
- break;
196
210
  }
197
- case "Backspace": {
198
- u.some((s) => s.value === f) && (y(), I(void 0), a(!0));
199
- break;
211
+ if (n !== void 0 && (y(), L(!0), j > 0)) {
212
+ const s = u[n % j];
213
+ s && c(s.value);
200
214
  }
201
- }
202
- if (p !== void 0 && (y(), L(!0), D > 0)) {
203
- const s = u[p % D];
204
- s && c(s.value);
205
- }
206
- };
207
- return window.addEventListener("keydown", e, {
208
- capture: !0
209
- }), () => {
210
- window.removeEventListener("keydown", e, {
211
- capture: !0
212
215
  });
213
- };
214
- }, [V, u, L, a, I, E, O, f, c]), /* @__PURE__ */ i.jsx(de, { ...X, ref: M, role: "combobox", autoComplete: "off", "aria-controls": Y, "aria-expanded": O, "aria-activedescendant": O ? q : void 0, label: k, value: C, error: w, warning: g, information: b, footnote: N, attachments: O ? /* @__PURE__ */ i.jsx(ve, { isLoading: n, id: Y, activeOptionId: q, selectedValue: S, options: u, onSelect: re, onHover: ae }) : null, className: T(l, "kakadu-components-879486679"), onMouseDown: oe, onChange: se, onBeforeInput: ne, onFocus: $, onBlur: ee, children: /* @__PURE__ */ i.jsx(ue, { width: 14, height: 14, className: "kakadu-components-158931186" }) });
216
+ }, [N, u, L, a, w, E, O, f, c]), /* @__PURE__ */ i.jsx(de, { ...U, ref: K, role: "combobox", autoComplete: "off", "aria-controls": X, "aria-expanded": O, "aria-activedescendant": O ? Y : void 0, label: b, value: q, error: h, warning: I, information: v, footnote: g, attachments: O ? /* @__PURE__ */ i.jsx(ke, { isLoading: t, id: X, activeOptionId: Y, selectedValue: S, options: u, onSelect: re, onHover: ae }) : null, className: H(l, "kakadu-components-879486679"), onMouseDown: oe, onChange: se, onBeforeInput: ne, onFocus: $, onBlur: ee, children: /* @__PURE__ */ i.jsx(ue, { width: 14, height: 14, className: "kakadu-components-158931186" }) });
215
217
  }
216
218
  export {
217
- Oe as default,
218
- F as getComboboxOptionString
219
+ Me as default,
220
+ D as getComboboxOptionString
219
221
  };
@@ -1,6 +1,7 @@
1
+ import React from 'react';
1
2
  import { type IconButtonProperties } from './icon-button';
2
3
  export default function CopyIconButton({ label, copiedLabel, value, onClick, ...properties }: {
3
4
  readonly label?: string;
4
5
  readonly copiedLabel?: string;
5
6
  readonly value: string;
6
- } & Omit<IconButtonProperties, 'icon' | 'label' | 'variant'>): import("react/jsx-runtime").JSX.Element;
7
+ } & Omit<IconButtonProperties, 'icon' | 'label' | 'variant'>): React.JSX.Element;
@@ -1,7 +1,7 @@
1
- import { type ReactNode } from 'react';
1
+ import React, { type ReactNode } from 'react';
2
2
  export type DatumProperties = {
3
3
  readonly title: ReactNode;
4
4
  readonly value: string;
5
5
  readonly hasCopyButton?: boolean;
6
6
  };
7
- export default function Datum({ title, value, hasCopyButton }: DatumProperties): import("react/jsx-runtime").JSX.Element;
7
+ export default function Datum({ title, value, hasCopyButton }: DatumProperties): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- import { type HTMLProps } from 'react';
2
- export default function Dot({ className }: HTMLProps<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
1
+ import React, { type HTMLProps } from 'react';
2
+ export default function Dot({ className }: HTMLProps<HTMLSpanElement>): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { type AtomElementType, type AtomProperties, type DefaultAtomElementType } from './atom';
2
3
  export declare const flexDirections: readonly ["row", "row-reverse", "column", "column-reverse"];
3
4
  export type FlexDirection = (typeof flexDirections)[number];
@@ -18,5 +19,5 @@ export type FlexProperties<Type extends AtomElementType = DefaultAtomElementType
18
19
  readonly wrap?: boolean;
19
20
  readonly fill?: boolean;
20
21
  };
21
- export default function Flex<Type extends AtomElementType = DefaultAtomElementType>({ as, direction, preset, distribution, alignment, gap, wrap, fill, style: inputStyle, className, ...properties }: FlexProperties<Type>): import("react/jsx-runtime").JSX.Element;
22
+ export default function Flex<Type extends AtomElementType = DefaultAtomElementType>({ as, direction, preset, distribution, alignment, gap, wrap, fill, style: inputStyle, className, ...properties }: FlexProperties<Type>): React.JSX.Element;
22
23
  export {};
@@ -1,4 +1,4 @@
1
- import { type HTMLAttributeAnchorTarget, type ReactNode } from 'react';
1
+ import React, { type HTMLAttributeAnchorTarget, type ReactNode } from 'react';
2
2
  import { type WrapperWidth } from './wrapper';
3
3
  export declare const footerSections: readonly ["services", "results", "about", "compliance"];
4
4
  export declare const footerSectionLinks: {
@@ -33,5 +33,5 @@ export type FooterProperties = {
33
33
  readonly sections?: FooterSections;
34
34
  readonly className?: string;
35
35
  };
36
- export default function Footer({ width, sections: inputSections, attribution, className, }: FooterProperties): import("react/jsx-runtime").JSX.Element;
36
+ export default function Footer({ width, sections: inputSections, attribution, className, }: FooterProperties): React.JSX.Element;
37
37
  export {};
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  export type GaugeProperties = {
2
3
  readonly label: string;
3
4
  readonly size?: 'small' | 'medium' | 'large';
4
5
  readonly percentage?: number;
5
6
  readonly isAnimated?: boolean;
6
7
  };
7
- export default function Gauge({ label, size, percentage, isAnimated, }: GaugeProperties): import("react/jsx-runtime").JSX.Element;
8
+ export default function Gauge({ label, size, percentage, isAnimated, }: GaugeProperties): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { type WrapperProperties } from './wrapper';
2
3
  import { type AtomElementType, type DefaultAtomElementType } from './atom';
3
- export default function Header<Type extends AtomElementType = DefaultAtomElementType>({ as, className, ...properties }: WrapperProperties<Type>): import("react/jsx-runtime").JSX.Element;
4
+ export default function Header<Type extends AtomElementType = DefaultAtomElementType>({ as, className, ...properties }: WrapperProperties<Type>): React.JSX.Element;
@@ -1,6 +1,6 @@
1
- import { type HTMLProps } from 'react';
1
+ import React, { type HTMLProps } from 'react';
2
2
  export declare const normalBlendStyles: string;
3
3
  export default function HoverGradient({ isActive, size, className, ...properties }: HTMLProps<HTMLDivElement> & {
4
4
  readonly isActive?: boolean;
5
5
  readonly size?: number;
6
- }): import("react/jsx-runtime").JSX.Element;
6
+ }): React.JSX.Element;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("../jsx-runtime-BB_1_6y_.js"),t=require("react"),k=require("@kuma-ui/core"),$=require("../hooks/use-is-in-view.js"),I="kakadu-components-2608453841";function V({isActive:l=!0,size:E=200,className:g,...b}){const s=t.useRef(null),o=$.default(s),n=t.useRef(null),[j,r]=t.useState(!1),[u,S]=t.useState();return t.useEffect(()=>{if(!l||!o){r(!1);return}const a=s.current;if(!a)return;n.current||(n.current=a.parentElement);const e=n.current;if(!e)return;const m=d=>{const q=d.target;if(!e.contains(q))return;const y=e.getBoundingClientRect(),{clientX:i,clientY:c}=d,{left:v,right:L,top:p,bottom:R}=y;i>v&&i<L&&c>p&&c<R&&(r(!0),S([i-v,c-p]))},f=()=>{r(!1)};return e.addEventListener("mousemove",m),e.addEventListener("mouseleave",f),()=>{e.removeEventListener("mousemove",m),e.removeEventListener("mouseleave",f)}},[l,o]),x.jsxRuntimeExports.jsx("div",{...b,ref:s,className:k.cx("kakadu-components-1237006455",g),children:u&&o?x.jsxRuntimeExports.jsx("div",{style:{"--size":`${E}px`,"--offset-x":`${u[0]}px`,"--offset-y":`${u[1]}px`},className:k.cx("kakadu-components-611160091",j&&"kakadu-components-3627966847")}):null})}exports.default=V;exports.normalBlendStyles=I;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("../jsx-runtime-BB_1_6y_.js"),t=require("react"),p=require("@kuma-ui/core"),R=require("../hooks/use-is-in-view.js"),x=require("../utilities/listeners.js"),$="kakadu-components-2608453841",I=x.default(e=>{window.addEventListener("mousemove",e,{passive:!0})},e=>{window.removeEventListener("mousemove",e)}),V=x.default(e=>{window.addEventListener("mouseleave",e,{passive:!0})},e=>{window.removeEventListener("mouseleave",e)});function _({isActive:e=!0,size:w=200,className:L,...k}){const n=t.useRef(null),o=R.default(n),s=t.useRef(null),[E,r]=t.useState(!1),[i,g]=t.useState();return t.useEffect(()=>{if(!e||!o){r(!1);return}const l=n.current;if(!l)return;s.current||(s.current=l.parentElement);const u=s.current;if(!u)return;const M=I(d=>{const j=d.target;if(!u.contains(j))return;const q=u.getBoundingClientRect(),{clientX:c,clientY:a}=d,{left:m,right:S,top:f,bottom:y}=q;c>m&&c<S&&a>f&&a<y&&(r(!0),g([c-m,a-f]))}),b=V(()=>{r(!1)});return()=>{M(),b()}},[e,o]),v.jsxRuntimeExports.jsx("div",{...k,ref:n,className:p.cx("kakadu-components-1237006455",L),children:i&&o?v.jsxRuntimeExports.jsx("div",{style:{"--size":`${w}px`,"--offset-x":`${i[0]}px`,"--offset-y":`${i[1]}px`},className:p.cx("kakadu-components-611160091",E&&"kakadu-components-3627966847")}):null})}exports.default=_;exports.normalBlendStyles=$;
@@ -1,17 +1,30 @@
1
- import { j as v } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { useRef as x, useState as k, useEffect as w } from "react";
3
- import { cx as E } from "@kuma-ui/core";
1
+ import { j as d } from "../jsx-runtime-B4hRZ52C.mjs";
2
+ import { useRef as p, useState as v, useEffect as h } from "react";
3
+ import { cx as L } from "@kuma-ui/core";
4
4
  import B from "../hooks/use-is-in-view.mjs";
5
- const C = "kakadu-components-2608453841";
6
- function G({
7
- isActive: a = !0,
8
- size: g = 200,
9
- className: L,
10
- ...b
5
+ import w from "../utilities/listeners.mjs";
6
+ const P = "kakadu-components-2608453841", N = w((e) => {
7
+ window.addEventListener("mousemove", e, {
8
+ passive: !0
9
+ });
10
+ }, (e) => {
11
+ window.removeEventListener("mousemove", e);
12
+ }), R = w((e) => {
13
+ window.addEventListener("mouseleave", e, {
14
+ passive: !0
15
+ });
16
+ }, (e) => {
17
+ window.removeEventListener("mouseleave", e);
18
+ });
19
+ function X({
20
+ isActive: e = !0,
21
+ size: x = 200,
22
+ className: k,
23
+ ...E
11
24
  }) {
12
- const n = x(null), s = B(n), t = x(null), [j, o] = k(!1), [r, I] = k();
13
- return w(() => {
14
- if (!a || !s) {
25
+ const n = p(null), s = B(n), t = p(null), [g, o] = v(!1), [r, M] = v();
26
+ return h(() => {
27
+ if (!e || !s) {
15
28
  o(!1);
16
29
  return;
17
30
  }
@@ -19,36 +32,36 @@ function G({
19
32
  if (!c)
20
33
  return;
21
34
  t.current || (t.current = c.parentElement);
22
- const e = t.current;
23
- if (!e)
35
+ const i = t.current;
36
+ if (!i)
24
37
  return;
25
- const l = (f) => {
26
- const V = f.target;
27
- if (!e.contains(V))
38
+ const b = N((m) => {
39
+ const I = m.target;
40
+ if (!i.contains(I))
28
41
  return;
29
- const y = e.getBoundingClientRect(), {
30
- clientX: i,
42
+ const V = i.getBoundingClientRect(), {
43
+ clientX: a,
31
44
  clientY: u
32
- } = f, {
33
- left: d,
34
- right: $,
35
- top: p,
36
- bottom: h
37
- } = y;
38
- i > d && i < $ && u > p && u < h && (o(!0), I([i - d, u - p]));
39
- }, m = () => {
45
+ } = m, {
46
+ left: l,
47
+ right: y,
48
+ top: f,
49
+ bottom: $
50
+ } = V;
51
+ a > l && a < y && u > f && u < $ && (o(!0), M([a - l, u - f]));
52
+ }), j = R(() => {
40
53
  o(!1);
54
+ });
55
+ return () => {
56
+ b(), j();
41
57
  };
42
- return e.addEventListener("mousemove", l), e.addEventListener("mouseleave", m), () => {
43
- e.removeEventListener("mousemove", l), e.removeEventListener("mouseleave", m);
44
- };
45
- }, [a, s]), /* @__PURE__ */ v.jsx("div", { ...b, ref: n, className: E("kakadu-components-1237006455", L), children: r && s ? /* @__PURE__ */ v.jsx("div", { style: {
46
- "--size": `${g}px`,
58
+ }, [e, s]), /* @__PURE__ */ d.jsx("div", { ...E, ref: n, className: L("kakadu-components-1237006455", k), children: r && s ? /* @__PURE__ */ d.jsx("div", { style: {
59
+ "--size": `${x}px`,
47
60
  "--offset-x": `${r[0]}px`,
48
61
  "--offset-y": `${r[1]}px`
49
- }, className: E("kakadu-components-611160091", j && "kakadu-components-3627966847") }) : null });
62
+ }, className: L("kakadu-components-611160091", g && "kakadu-components-3627966847") }) : null });
50
63
  }
51
64
  export {
52
- G as default,
53
- C as normalBlendStyles
65
+ X as default,
66
+ P as normalBlendStyles
54
67
  };
@@ -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
  import { type ButtonTooltipPosition } from './button-tooltip';
4
4
  export declare const iconButtonVariants: readonly ["default", "success", "warning", "danger"];
@@ -12,4 +12,4 @@ export type IconButtonProperties = HTMLProps<HTMLButtonElement> & {
12
12
  readonly isSkeleton?: boolean;
13
13
  readonly isSkeletonAnimated?: boolean;
14
14
  };
15
- export default function IconButton({ ref, icon, variant, label, tooltipPosition, href, target, rel, disabled, isLoading, isSkeleton, isSkeletonAnimated, className, ...properties }: IconButtonProperties): import("react/jsx-runtime").JSX.Element;
15
+ export default function IconButton({ ref, icon, variant, label, tooltipPosition, href, target, rel, disabled, isLoading, isSkeleton, isSkeletonAnimated, className, ...properties }: IconButtonProperties): React.JSX.Element;
@@ -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 IconType } from '../icons/icon';
3
3
  export declare const inputStyles: string;
4
4
  export declare const errorParagraph: string;
@@ -17,7 +17,7 @@ type InputLabelProperties = HTMLProps<HTMLLabelElement> & InputLabelMessagePrope
17
17
  readonly footnote?: ReactNode;
18
18
  readonly attachments?: ReactNode;
19
19
  };
20
- export declare function InputLabel({ label, error, errorId, warning, warningId, information, informationId, footnote, attachments, className, children, ...properties }: InputLabelProperties): import("react/jsx-runtime").JSX.Element;
20
+ export declare function InputLabel({ label, error, errorId, warning, warningId, information, informationId, footnote, attachments, className, children, ...properties }: InputLabelProperties): React.JSX.Element;
21
21
  export type InputLabelControllerProperties = Omit<InputLabelProperties, 'errorId' | 'warningId' | 'attachments' | 'onClick' | 'onMouseDown' | 'onMouseUp' | 'onChange' | 'onFocus' | 'onBlur' | 'onInput' | 'onBeforeInput'>;
22
22
  export type InputType = HTMLInputElement | HTMLTextAreaElement;
23
23
  export type InputAction = {
@@ -34,5 +34,5 @@ export type InputProperties = Omit<InputLabelControllerProperties & Omit<HTMLPro
34
34
  readonly isMultiline?: boolean;
35
35
  readonly onChange?: (value: string, event: ChangeEvent<InputType>) => void;
36
36
  };
37
- export default function Input({ ref, type, label, error, warning, information, footnote, suggestion, attachments, actions, hasCopyButton, hasClearButton, isMultiline, onChange, children, className, ...properties }: InputProperties): import("react/jsx-runtime").JSX.Element;
37
+ export default function Input({ ref, type, label, error, warning, information, footnote, suggestion, attachments, actions, hasCopyButton, hasClearButton, isMultiline, onChange, children, className, ...properties }: InputProperties): React.JSX.Element;
38
38
  export {};