@kakadu/components 3.15.5 → 4.0.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.
Files changed (72) hide show
  1. package/build/components/button-tooltip.d.ts +2 -4
  2. package/build/components/button-tooltip.js +1 -1
  3. package/build/components/button-tooltip.mjs +11 -11
  4. package/build/components/button.d.ts +2 -6
  5. package/build/components/button.js +1 -1
  6. package/build/components/button.mjs +51 -51
  7. package/build/components/card.js +1 -1
  8. package/build/components/card.mjs +22 -22
  9. package/build/components/combobox.d.ts +25 -0
  10. package/build/components/combobox.js +1 -0
  11. package/build/components/combobox.mjs +322 -0
  12. package/build/components/copy-icon-button.js +1 -1
  13. package/build/components/copy-icon-button.mjs +20 -21
  14. package/build/components/datum.js +1 -1
  15. package/build/components/datum.mjs +12 -12
  16. package/build/components/flex.d.ts +13 -9
  17. package/build/components/flex.js +1 -1
  18. package/build/components/flex.mjs +25 -15
  19. package/build/components/footer.d.ts +3 -6
  20. package/build/components/footer.js +1 -1
  21. package/build/components/footer.mjs +33 -33
  22. package/build/components/header.js +1 -1
  23. package/build/components/header.mjs +4 -5
  24. package/build/components/icon-button.d.ts +2 -6
  25. package/build/components/icon-button.js +1 -1
  26. package/build/components/icon-button.mjs +41 -41
  27. package/build/components/input.d.ts +12 -19
  28. package/build/components/input.js +2 -2
  29. package/build/components/input.mjs +122 -147
  30. package/build/components/kakadu-guide-logo.d.ts +2 -4
  31. package/build/components/kakadu-guide-logo.js +1 -1
  32. package/build/components/kakadu-guide-logo.mjs +13 -13
  33. package/build/components/modal.js +1 -1
  34. package/build/components/modal.mjs +65 -66
  35. package/build/components/notice.d.ts +2 -7
  36. package/build/components/notice.js +1 -1
  37. package/build/components/notice.mjs +16 -16
  38. package/build/components/notification.d.ts +2 -1
  39. package/build/components/notification.js +1 -1
  40. package/build/components/notification.mjs +9 -9
  41. package/build/components/popover-menu.js +1 -1
  42. package/build/components/popover-menu.mjs +98 -106
  43. package/build/components/popover.js +1 -1
  44. package/build/components/popover.mjs +1 -1
  45. package/build/components/select.d.ts +12 -0
  46. package/build/components/select.js +1 -0
  47. package/build/components/select.mjs +36 -0
  48. package/build/components/separator.js +1 -1
  49. package/build/components/separator.mjs +25 -25
  50. package/build/components/text-button.d.ts +2 -4
  51. package/build/components/text-button.js +1 -1
  52. package/build/components/text-button.mjs +26 -27
  53. package/build/components/text.d.ts +1 -1
  54. package/build/components/text.js +1 -1
  55. package/build/components/text.mjs +29 -30
  56. package/build/components/theme-setter.d.ts +1 -1
  57. package/build/components/wrapper.d.ts +3 -6
  58. package/build/components/wrapper.js +1 -1
  59. package/build/components/wrapper.mjs +25 -23
  60. package/build/components.css +1 -1
  61. package/build/{focus-trap-react-CcpTuiJi.js → focus-trap-react-CkKg4ubd.js} +5 -5
  62. package/build/{focus-trap-react-DYXrtbDH.mjs → focus-trap-react-DATIi_Ob.mjs} +34 -29
  63. package/build/hooks/use-synchronized-value.d.ts +4 -0
  64. package/build/icons/icon.d.ts +4 -42
  65. package/build/icons/icon.js +1 -1
  66. package/build/icons/icon.mjs +76 -76
  67. package/build/index.d.ts +4 -0
  68. package/build/index.js +1 -1
  69. package/build/index.mjs +248 -241
  70. package/build/use-synchronized-value-D0_rS5Wp.js +1 -0
  71. package/build/use-synchronized-value-XnIpeq1s.mjs +28 -0
  72. package/package.json +3 -1
@@ -0,0 +1,322 @@
1
+ import { j as O } from "../jsx-runtime-B4hRZ52C.mjs";
2
+ import { useRef as R, useId as G, useState as z, useCallback as E, useEffect as q, useMemo as H } from "react";
3
+ import { g as ie, a as le, f as ue } from "../focus-trap-react-DATIi_Ob.mjs";
4
+ import { cx as J } from "@kuma-ui/core";
5
+ import { u as fe } from "../use-synchronized-value-XnIpeq1s.mjs";
6
+ import de from "../icons/icon.mjs";
7
+ import me from "./input.mjs";
8
+ import { Span as P } from "./text.mjs";
9
+ import Q from "./flex.mjs";
10
+ import { SkeletonInstance as he } from "./skeleton.mjs";
11
+ var K = { exports: {} };
12
+ const D = new Uint32Array(65536), pe = (t, a) => {
13
+ const r = t.length, m = a.length, c = 1 << r - 1;
14
+ let i = -1, f = 0, v = r, n = r;
15
+ for (; n--; )
16
+ D[t.charCodeAt(n)] |= 1 << n;
17
+ for (n = 0; n < m; n++) {
18
+ let d = D[a.charCodeAt(n)];
19
+ const h = d | f;
20
+ d |= (d & i) + i ^ i, f |= ~(d | i), i &= d, f & c && v++, i & c && v--, f = f << 1 | 1, i = i << 1 | ~(h | f), f &= h;
21
+ }
22
+ for (n = r; n--; )
23
+ D[t.charCodeAt(n)] = 0;
24
+ return v;
25
+ }, ve = (t, a) => {
26
+ const r = a.length, m = t.length, c = [], i = [], f = Math.ceil(r / 32), v = Math.ceil(m / 32);
27
+ for (let e = 0; e < f; e++)
28
+ i[e] = -1, c[e] = 0;
29
+ let n = 0;
30
+ for (; n < v - 1; n++) {
31
+ let e = 0, l = -1;
32
+ const g = n * 32, x = Math.min(32, m) + g;
33
+ for (let o = g; o < x; o++)
34
+ D[t.charCodeAt(o)] |= 1 << o;
35
+ for (let o = 0; o < r; o++) {
36
+ const p = D[a.charCodeAt(o)], b = i[o / 32 | 0] >>> o & 1, w = c[o / 32 | 0] >>> o & 1, F = p | e, y = ((p | w) & l) + l ^ l | p | w;
37
+ let N = e | ~(y | l), S = l & y;
38
+ N >>> 31 ^ b && (i[o / 32 | 0] ^= 1 << o), S >>> 31 ^ w && (c[o / 32 | 0] ^= 1 << o), N = N << 1 | b, S = S << 1 | w, l = S | ~(F | N), e = N & F;
39
+ }
40
+ for (let o = g; o < x; o++)
41
+ D[t.charCodeAt(o)] = 0;
42
+ }
43
+ let d = 0, h = -1;
44
+ const A = n * 32, V = Math.min(32, m - A) + A;
45
+ for (let e = A; e < V; e++)
46
+ D[t.charCodeAt(e)] |= 1 << e;
47
+ let M = m;
48
+ for (let e = 0; e < r; e++) {
49
+ const l = D[a.charCodeAt(e)], g = i[e / 32 | 0] >>> e & 1, x = c[e / 32 | 0] >>> e & 1, o = l | d, p = ((l | x) & h) + h ^ h | l | x;
50
+ let b = d | ~(p | h), w = h & p;
51
+ M += b >>> m - 1 & 1, M -= w >>> m - 1 & 1, b >>> 31 ^ g && (i[e / 32 | 0] ^= 1 << e), w >>> 31 ^ x && (c[e / 32 | 0] ^= 1 << e), b = b << 1 | g, w = w << 1 | x, h = w | ~(o | b), d = b & o;
52
+ }
53
+ for (let e = A; e < V; e++)
54
+ D[t.charCodeAt(e)] = 0;
55
+ return M;
56
+ }, Z = (t, a) => {
57
+ if (t.length < a.length) {
58
+ const r = a;
59
+ a = t, t = r;
60
+ }
61
+ return a.length === 0 ? t.length : t.length <= 32 ? pe(t, a) : ve(t, a);
62
+ }, ge = (t, a) => {
63
+ let r = 1 / 0, m = 0;
64
+ for (let c = 0; c < a.length; c++) {
65
+ const i = Z(t, a[c]);
66
+ i < r && (r = i, m = c);
67
+ }
68
+ return a[m];
69
+ }, xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
70
+ __proto__: null,
71
+ closest: ge,
72
+ distance: Z
73
+ }, Symbol.toStringTag, { value: "Module" })), be = /* @__PURE__ */ ie(xe);
74
+ var W;
75
+ function we() {
76
+ return W || (W = 1, (function(t, a) {
77
+ (function() {
78
+ var r;
79
+ try {
80
+ r = typeof Intl < "u" && typeof Intl.Collator < "u" ? Intl.Collator("generic", { sensitivity: "base" }) : null;
81
+ } catch {
82
+ console.log("Collator could not be initialized and wouldn't be used");
83
+ }
84
+ var m = be, c = [], i = [], f = {
85
+ /**
86
+ * Calculate levenshtein distance of the two strings.
87
+ *
88
+ * @param str1 String the first string.
89
+ * @param str2 String the second string.
90
+ * @param [options] Additional options.
91
+ * @param [options.useCollator] Use `Intl.Collator` for locale-sensitive string comparison.
92
+ * @return Integer the levenshtein distance (0 and above).
93
+ */
94
+ get: function(v, n, d) {
95
+ var h = d && r && d.useCollator;
96
+ if (h) {
97
+ var A = v.length, V = n.length;
98
+ if (A === 0) return V;
99
+ if (V === 0) return A;
100
+ var M, e, l, g, x;
101
+ for (l = 0; l < V; ++l)
102
+ c[l] = l, i[l] = n.charCodeAt(l);
103
+ c[V] = V;
104
+ var o;
105
+ for (l = 0; l < A; ++l) {
106
+ for (e = l + 1, g = 0; g < V; ++g)
107
+ M = e, o = r.compare(v.charAt(l), String.fromCharCode(i[g])) === 0, e = c[g] + (o ? 0 : 1), x = M + 1, e > x && (e = x), x = c[g + 1] + 1, e > x && (e = x), c[g] = M;
108
+ c[g] = e;
109
+ }
110
+ return e;
111
+ }
112
+ return m.distance(v, n);
113
+ }
114
+ };
115
+ t !== null && t.exports === a ? t.exports = f : typeof self < "u" && typeof self.postMessage == "function" && typeof self.importScripts == "function" ? self.Levenshtein = f : typeof window < "u" && window !== null && (window.Levenshtein = f);
116
+ })();
117
+ })(K, K.exports)), K.exports;
118
+ }
119
+ var ke = we();
120
+ const ye = /* @__PURE__ */ le(ke);
121
+ function ee() {
122
+ const {
123
+ value: t,
124
+ setValue: a
125
+ } = fe("isKeyboardNavigating");
126
+ return H(() => ({
127
+ isKeyboardNavigating: t,
128
+ setIsKeyboardNavigating: a
129
+ }), [t, a]);
130
+ }
131
+ function $(t) {
132
+ return "text" in t ? t.text : t.label;
133
+ }
134
+ const U = "kakadu-components-1144794361", X = "kakadu-components-2911184744";
135
+ function Ie({
136
+ isSelected: t,
137
+ id: a,
138
+ value: r,
139
+ label: m,
140
+ onSelect: c,
141
+ onHover: i
142
+ }) {
143
+ const {
144
+ isKeyboardNavigating: f
145
+ } = ee(), v = E(() => {
146
+ c(r);
147
+ }, [c, r]), n = E((h) => {
148
+ f || h.movementX === 0 && h.movementY === 0 || i(r);
149
+ }, [f, i, r]), d = R(null);
150
+ return q(() => {
151
+ const h = d.current;
152
+ t && h && f && setTimeout(() => {
153
+ h.scrollIntoView({
154
+ behavior: "smooth",
155
+ block: "nearest"
156
+ });
157
+ }, 0);
158
+ }, [t, f]), /* @__PURE__ */ O.jsx("li", { ref: d, id: a, role: "option", "aria-selected": t, tabIndex: -1, className: J(U, "kakadu-components-4130497639", f ? "kakadu-components-962373561" : "kakadu-components-1109598791"), onClick: v, onMouseMove: n, children: /* @__PURE__ */ O.jsx(P, { className: J(X, typeof m == "string" && "kakadu-components-154286052"), children: m }) });
159
+ }
160
+ function Oe({
161
+ isLoading: t,
162
+ id: a,
163
+ activeOptionId: r,
164
+ selectedValue: m,
165
+ options: c,
166
+ onSelect: i,
167
+ onHover: f
168
+ }) {
169
+ const v = R(null);
170
+ return q(() => {
171
+ const n = v.current;
172
+ n && n.scrollIntoView({
173
+ behavior: "smooth",
174
+ block: "nearest"
175
+ });
176
+ }, []), /* @__PURE__ */ O.jsxs("ul", { ref: v, id: a, role: "listbox", "aria-label": "Options", className: "kakadu-components-970856892", children: [
177
+ c.length === 0 ? t ? null : /* @__PURE__ */ O.jsxs(Q, { "aria-atomic": !0, as: "li", role: "status", "aria-live": "polite", direction: "row", preset: "start", gap: 0.5, className: U, children: [
178
+ /* @__PURE__ */ O.jsx(de, { size: 15, type: "exclamationTriangle" }),
179
+ /* @__PURE__ */ O.jsx(P, { className: X, children: "No results." })
180
+ ] }) : c.map((n, d) => /* @__PURE__ */ O.jsx(
181
+ Ie,
182
+ {
183
+ ...n,
184
+ id: n.value === m ? r : void 0,
185
+ isSelected: n.value === m,
186
+ onSelect: i,
187
+ onHover: f
188
+ },
189
+ $(n) + d
190
+ )),
191
+ t ? /* @__PURE__ */ O.jsx(Q, { as: "li", alignment: "center", className: U, children: /* @__PURE__ */ O.jsx(P, { className: X, children: /* @__PURE__ */ O.jsx(he, { width: "100%", height: "1.3em" }) }) }) : null
192
+ ] });
193
+ }
194
+ function Te({
195
+ isLoading: t,
196
+ label: a,
197
+ options: r,
198
+ error: m,
199
+ warning: c,
200
+ information: i,
201
+ footnote: f,
202
+ className: v,
203
+ onChange: n,
204
+ onSelect: d,
205
+ ...h
206
+ }) {
207
+ const A = R(null), V = G(), M = G(), [e, l] = z(!1), g = E(() => {
208
+ l(!0);
209
+ }, []), x = E((s) => {
210
+ var u;
211
+ (u = A.current) != null && u.contains(s.relatedTarget) || l(!1);
212
+ }, []), [o, p] = z(!1);
213
+ q(() => {
214
+ p(e);
215
+ }, [e]);
216
+ const [b, w] = z(""), {
217
+ value: F
218
+ } = h, [y, N] = z(F), [S, te] = z(F), Y = R(S), I = E((s) => {
219
+ te(s), Y.current = s;
220
+ }, []);
221
+ q(() => {
222
+ N(F), I(F);
223
+ }, [F, I]);
224
+ const ne = E(() => {
225
+ y && (w(""), I(void 0));
226
+ }, [y, I]), oe = E((s, u) => {
227
+ w(s), n == null || n(s, u), p(!0), N(void 0);
228
+ }, [n]), re = E((s) => {
229
+ var u;
230
+ (u = A.current) != null && u.contains(s.target) && p(!0);
231
+ }, []), _ = E((s) => {
232
+ const u = s == null ? void 0 : s.value;
233
+ I(u), s ? w($(s)) : (w(""), n == null || n("")), d == null || d(u);
234
+ }, [I, n, d]), se = E((s) => {
235
+ const u = r.find((k) => k.value === s);
236
+ _(u), N(s), p(!1);
237
+ }, [r, _]), ae = E((s) => {
238
+ I(s);
239
+ }, [I]), j = H(() => y || b.length === 0 ? r : r.filter((s) => {
240
+ const k = $(s).toLowerCase(), T = b.toLowerCase();
241
+ return !!(k.includes(T) || T.includes(k) || ye.get(k, T, {
242
+ useCollator: !0
243
+ }) <= 2);
244
+ }), [y, r, b]);
245
+ q(() => {
246
+ !y && b.length > 0 && j.length > 0 && !j.some((s) => S === s.value) && I(j[0].value);
247
+ }, [y, b, j, S, I]);
248
+ const {
249
+ setIsKeyboardNavigating: L
250
+ } = ee();
251
+ q(() => {
252
+ if (!e)
253
+ return;
254
+ const s = (u) => {
255
+ u.movementX === 0 && u.movementY === 0 || L(!1);
256
+ };
257
+ return window.addEventListener("mousemove", s, {
258
+ capture: !0
259
+ }), () => {
260
+ window.removeEventListener("mousemove", s, {
261
+ capture: !0
262
+ });
263
+ };
264
+ }, [e, L]), q(() => {
265
+ if (!e)
266
+ return;
267
+ const s = (u) => {
268
+ let k;
269
+ const T = j.length, B = j.findIndex((C) => C.value === Y.current);
270
+ switch (u.key) {
271
+ case "Enter": {
272
+ const C = j[B];
273
+ C && (u.preventDefault(), u.stopPropagation(), L(!0), p(!1), _(C), N(C.value));
274
+ break;
275
+ }
276
+ case "Escape": {
277
+ o ? (y ? I(void 0) : _(void 0), p(!1)) : y ? (p(!0), _(void 0)) : (l(!1), u.target instanceof HTMLInputElement && u.target.blur());
278
+ return;
279
+ }
280
+ case "ArrowDown": {
281
+ k = B + 1, p(!0);
282
+ break;
283
+ }
284
+ case "ArrowUp": {
285
+ k = B - 1, p(!0), k < 0 && (k = T - 1);
286
+ break;
287
+ }
288
+ case "Home": {
289
+ p(!0), k = 0;
290
+ break;
291
+ }
292
+ case "End": {
293
+ p(!0), k = T - 1;
294
+ break;
295
+ }
296
+ case "Backspace": {
297
+ j.some((C) => C.value === y) && (u.preventDefault(), u.stopPropagation(), _(void 0), p(!0));
298
+ break;
299
+ }
300
+ }
301
+ if (k !== void 0 && (u.preventDefault(), u.stopPropagation(), L(!0), T > 0)) {
302
+ const C = j[k % T];
303
+ C && I(C.value);
304
+ }
305
+ };
306
+ return window.addEventListener("keydown", s, {
307
+ capture: !0
308
+ }), () => {
309
+ window.removeEventListener("keydown", s, {
310
+ capture: !0
311
+ });
312
+ };
313
+ }, [e, j, L, p, _, N, o, y, I]);
314
+ const ce = H(() => ({
315
+ clickOutsideDeactivates: !0
316
+ }), []);
317
+ return /* @__PURE__ */ O.jsx(ue.FocusTrap, { active: o, focusTrapOptions: ce, children: /* @__PURE__ */ O.jsx(me, { ...h, ref: A, role: "combobox", autoComplete: "off", "aria-controls": V, "aria-expanded": o, "aria-activedescendant": o ? M : void 0, label: a, value: b, error: m, warning: c, information: i, footnote: f, attachments: o ? /* @__PURE__ */ O.jsx(Oe, { isLoading: t, id: V, activeOptionId: M, selectedValue: S, options: j, onSelect: se, onHover: ae }) : null, className: v, onMouseDown: re, onChange: oe, onBeforeInput: ne, onFocus: g, onBlur: x }) });
318
+ }
319
+ export {
320
+ Te as default,
321
+ $ as getComboboxOptionString
322
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../jsx-runtime-BB_1_6y_.js"),u=require("react"),i=require("../icons/icon.js"),m=require("../utilities/copy-to-clipboard.js"),n=require("./icon-button.js");function y({label:c="Kopier",copiedLabel:a="Kopiert!",value:r,onClick:e,...l}){const t=u.useRef(null),[o,s]=u.useState(!1),p=u.useCallback(d=>{m.default(r),s(!0),t.current&&clearTimeout(t.current),e==null||e(d),t.current=setTimeout(()=>{s(!1)},2e3)},[r,e]);return f.jsxRuntimeExports.jsx(n.default,{...l,icon:o?i.IconType.check:i.IconType.copy,label:o?a:c,variant:o?n.IconButtonVariant.success:n.IconButtonVariant.default,onClick:p})}exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../jsx-runtime-BB_1_6y_.js"),o=require("react"),p=require("../utilities/copy-to-clipboard.js"),f=require("./icon-button.js");function m({label:i="Kopier",copiedLabel:n="Kopiert!",value:r,onClick:e,...c}){const t=o.useRef(null),[u,s]=o.useState(!1),a=o.useCallback(l=>{p.default(r),s(!0),t.current&&clearTimeout(t.current),e==null||e(l),t.current=setTimeout(()=>{s(!1)},2e3)},[r,e]);return d.jsxRuntimeExports.jsx(f.default,{...c,icon:u?"check":"copy",label:u?n:i,variant:u?"success":"default",onClick:a})}exports.default=m;
@@ -1,34 +1,33 @@
1
- import { j as f } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { useRef as l, useState as d, useCallback as y } from "react";
3
- import { IconType as n } from "../icons/icon.mjs";
4
- import I from "../utilities/copy-to-clipboard.mjs";
5
- import x, { IconButtonVariant as u } from "./icon-button.mjs";
6
- function h({
7
- label: c = "Kopier",
8
- copiedLabel: i = "Kopiert!",
1
+ import { j as a } from "../jsx-runtime-B4hRZ52C.mjs";
2
+ import { useRef as f, useState as m, useCallback as l } from "react";
3
+ import d from "../utilities/copy-to-clipboard.mjs";
4
+ import x from "./icon-button.mjs";
5
+ function R({
6
+ label: u = "Kopier",
7
+ copiedLabel: c = "Kopiert!",
9
8
  value: r,
10
- onClick: t,
11
- ...p
9
+ onClick: e,
10
+ ...i
12
11
  }) {
13
- const e = l(null), [o, s] = d(!1), a = y(
14
- (m) => {
15
- I(r), s(!0), e.current && clearTimeout(e.current), t == null || t(m), e.current = setTimeout(() => {
12
+ const t = f(null), [o, s] = m(!1), n = l(
13
+ (p) => {
14
+ d(r), s(!0), t.current && clearTimeout(t.current), e == null || e(p), t.current = setTimeout(() => {
16
15
  s(!1);
17
16
  }, 2e3);
18
17
  },
19
- [r, t]
18
+ [r, e]
20
19
  );
21
- return /* @__PURE__ */ f.jsx(
20
+ return /* @__PURE__ */ a.jsx(
22
21
  x,
23
22
  {
24
- ...p,
25
- icon: o ? n.check : n.copy,
26
- label: o ? i : c,
27
- variant: o ? u.success : u.default,
28
- onClick: a
23
+ ...i,
24
+ icon: o ? "check" : "copy",
25
+ label: o ? c : u,
26
+ variant: o ? "success" : "default",
27
+ onClick: n
29
28
  }
30
29
  );
31
30
  }
32
31
  export {
33
- h as default
32
+ R as default
34
33
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),t=require("./flex.js"),s=require("./text.js"),i=require("./copy-icon-button.js");function u({title:o,value:n,hasCopyButton:r}){return e.jsxRuntimeExports.jsxs(t.default,{direction:"row",gap:1.5,alignment:t.FlexAlignment.start,children:[e.jsxRuntimeExports.jsxs(t.default,{fill:!0,gap:.375,alignment:t.FlexAlignment.start,children:[e.jsxRuntimeExports.jsx(s.Span,{className:"kakadu-components-3772513716",children:o}),e.jsxRuntimeExports.jsx(s.Span,{className:"kakadu-components-2497879239",children:n})]}),r?e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(i.default,{value:n})}):null]})}exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),s=require("./flex.js"),n=require("./text.js"),u=require("./copy-icon-button.js");function i({title:r,value:t,hasCopyButton:o}){return e.jsxRuntimeExports.jsxs(s.default,{direction:"row",gap:1.5,preset:"start",children:[e.jsxRuntimeExports.jsxs(s.default,{fill:!0,gap:.375,preset:"start",children:[e.jsxRuntimeExports.jsx(n.Span,{className:"kakadu-components-3772513716",children:r}),e.jsxRuntimeExports.jsx(n.Span,{className:"kakadu-components-2497879239",children:t})]}),o?e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(u.default,{value:t})}):null]})}exports.default=i;
@@ -1,20 +1,20 @@
1
- import { j as n } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import r, { FlexAlignment as o } from "./flex.mjs";
3
- import { Span as s } from "./text.mjs";
4
- import i from "./copy-icon-button.mjs";
5
- function x({
1
+ import { j as r } from "../jsx-runtime-B4hRZ52C.mjs";
2
+ import s from "./flex.mjs";
3
+ import { Span as o } from "./text.mjs";
4
+ import a from "./copy-icon-button.mjs";
5
+ function l({
6
6
  title: e,
7
7
  value: t,
8
- hasCopyButton: a
8
+ hasCopyButton: n
9
9
  }) {
10
- return /* @__PURE__ */ n.jsxs(r, { direction: "row", gap: 1.5, alignment: o.start, children: [
11
- /* @__PURE__ */ n.jsxs(r, { fill: !0, gap: 0.375, alignment: o.start, children: [
12
- /* @__PURE__ */ n.jsx(s, { className: "kakadu-components-3772513716", children: e }),
13
- /* @__PURE__ */ n.jsx(s, { className: "kakadu-components-2497879239", children: t })
10
+ return /* @__PURE__ */ r.jsxs(s, { direction: "row", gap: 1.5, preset: "start", children: [
11
+ /* @__PURE__ */ r.jsxs(s, { fill: !0, gap: 0.375, preset: "start", children: [
12
+ /* @__PURE__ */ r.jsx(o, { className: "kakadu-components-3772513716", children: e }),
13
+ /* @__PURE__ */ r.jsx(o, { className: "kakadu-components-2497879239", children: t })
14
14
  ] }),
15
- a ? /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(i, { value: t }) }) : null
15
+ n ? /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(a, { value: t }) }) : null
16
16
  ] });
17
17
  }
18
18
  export {
19
- x as default
19
+ l as default
20
20
  };
@@ -1,15 +1,19 @@
1
1
  import { type AtomElementType, type AtomProperties, type DefaultAtomElementType } from './atom';
2
- export declare enum FlexAlignment {
3
- start = "start",
4
- center = "center",
5
- space_between = "space-between",
6
- end = "end"
7
- }
2
+ export declare const flexDirections: readonly ["row", "column"];
3
+ export type FlexDirection = (typeof flexDirections)[number];
4
+ export declare const flexPresets: readonly ["start", "center", "space-between", "end"];
5
+ export type FlexPreset = (typeof flexPresets)[number];
8
6
  export type FlexProperties<Type extends AtomElementType = DefaultAtomElementType> = AtomProperties<Type> & {
9
- readonly direction?: 'row' | 'column';
10
- readonly alignment?: FlexAlignment;
7
+ readonly direction?: FlexDirection;
8
+ readonly preset?: FlexPreset;
9
+ /** How items are laid out across the main axis.
10
+ * @see direction */
11
+ readonly distribution?: string;
12
+ /** How items are laid out across the cross axis.
13
+ * @see direction */
14
+ readonly alignment?: string;
11
15
  readonly gap?: 0 | 0.25 | 0.375 | 0.5 | 0.75 | 1 | 1.5 | 2 | 2.25 | 3 | 4;
12
16
  readonly wrap?: boolean;
13
17
  readonly fill?: boolean;
14
18
  };
15
- export default function Flex<Type extends AtomElementType = DefaultAtomElementType>({ as, direction, alignment, gap, wrap, fill, className, ...properties }: FlexProperties<Type>): import("react/jsx-runtime").JSX.Element;
19
+ 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;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../jsx-runtime-BB_1_6y_.js"),m=require("@kuma-ui/core"),t=require("./atom.js");var a=(o=>(o.start="start",o.center="center",o.space_between="space-between",o.end="end",o))(a||{});function p({as:o,direction:s="column",alignment:n,gap:e=1,wrap:u=!1,fill:c,className:k,...d}){return r.jsxRuntimeExports.jsx(t.default,{as:o??t.defaultAtomElementType,...d,className:m.cx("kakadu-components-563258661",s==="column"&&"kakadu-components-1546485850",n==="start"&&"kakadu-components-223643817",n==="center"&&"kakadu-components-4038850420",n==="space-between"&&"kakadu-components-317611484",n==="end"&&"kakadu-components-2767496155",e===.25&&"kakadu-components-2276234075",e===.375&&"kakadu-components-739568937",e===.5&&"kakadu-components-3438335458",e===.75&&"kakadu-components-3350948469",e===1&&"kakadu-components-3993051137",e===1.5&&"kakadu-components-4186556816",e===2&&"kakadu-components-1435205015",e===2.25&&"kakadu-components-4251546321",e===3&&"kakadu-components-1168734547",e===4&&"kakadu-components-1543861259",u&&"kakadu-components-3545808562",c&&"kakadu-components-3911899222",k)})}exports.FlexAlignment=a;exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../jsx-runtime-BB_1_6y_.js"),f=require("react"),p=require("@kuma-ui/core"),a=require("./atom.js"),x=["row","column"],q=["start","center","space-between","end"];function b({as:c,direction:u="column",preset:n,distribution:o,alignment:t,gap:e=1,wrap:k=!1,fill:m=!1,style:s,className:d,...r}){const l=f.useMemo(()=>({...s,"--distribution":o,"--alignment":t}),[s,o,t]);return i.jsxRuntimeExports.jsx(a.default,{as:c??a.defaultAtomElementType,...r,style:l,className:p.cx("kakadu-components-702604737",u==="column"&&"kakadu-components-1920578034",n==="start"&&"kakadu-components-2628985316",n==="center"&&"kakadu-components-9661990",n==="space-between"&&"kakadu-components-1323551558",n==="end"&&"kakadu-components-1950514053",e===.25&&"kakadu-components-2276234075",e===.375&&"kakadu-components-739568937",e===.5&&"kakadu-components-3438335458",e===.75&&"kakadu-components-3350948469",e===1&&"kakadu-components-3993051137",e===1.5&&"kakadu-components-4186556816",e===2&&"kakadu-components-1435205015",e===2.25&&"kakadu-components-4251546321",e===3&&"kakadu-components-1168734547",e===4&&"kakadu-components-1543861259",k&&"kakadu-components-3545808562",m&&"kakadu-components-3911899222",d)})}exports.default=b;exports.flexDirections=x;exports.flexPresets=q;
@@ -1,20 +1,30 @@
1
- import { j as u } from "../jsx-runtime-B4hRZ52C.mjs";
2
- import { cx as m } from "@kuma-ui/core";
3
- import d, { defaultAtomElementType as r } from "./atom.mjs";
4
- var p = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.space_between = "space-between", e.end = "end", e))(p || {});
5
- function w({
6
- as: e,
7
- direction: a = "column",
8
- alignment: n,
1
+ import { j as p } from "../jsx-runtime-B4hRZ52C.mjs";
2
+ import { useMemo as l } from "react";
3
+ import { cx as f } from "@kuma-ui/core";
4
+ import x, { defaultAtomElementType as i } from "./atom.mjs";
5
+ const A = ["row", "column"], E = ["start", "center", "space-between", "end"];
6
+ function D({
7
+ as: s,
8
+ direction: k = "column",
9
+ preset: n,
10
+ distribution: e,
11
+ alignment: t,
9
12
  gap: o = 1,
10
- wrap: t = !1,
11
- fill: k,
12
- className: s,
13
- ...c
13
+ wrap: m = !1,
14
+ fill: c = !1,
15
+ style: a,
16
+ className: u,
17
+ ...d
14
18
  }) {
15
- return /* @__PURE__ */ u.jsx(d, { as: e ?? r, ...c, className: m("kakadu-components-563258661", a === "column" && "kakadu-components-1546485850", n === "start" && "kakadu-components-223643817", n === "center" && "kakadu-components-4038850420", n === "space-between" && "kakadu-components-317611484", n === "end" && "kakadu-components-2767496155", o === 0.25 && "kakadu-components-2276234075", o === 0.375 && "kakadu-components-739568937", o === 0.5 && "kakadu-components-3438335458", o === 0.75 && "kakadu-components-3350948469", o === 1 && "kakadu-components-3993051137", o === 1.5 && "kakadu-components-4186556816", o === 2 && "kakadu-components-1435205015", o === 2.25 && "kakadu-components-4251546321", o === 3 && "kakadu-components-1168734547", o === 4 && "kakadu-components-1543861259", t && "kakadu-components-3545808562", k && "kakadu-components-3911899222", s) });
19
+ const r = l(() => ({
20
+ ...a,
21
+ "--distribution": e,
22
+ "--alignment": t
23
+ }), [a, e, t]);
24
+ return /* @__PURE__ */ p.jsx(x, { as: s ?? i, ...d, style: r, className: f("kakadu-components-702604737", k === "column" && "kakadu-components-1920578034", n === "start" && "kakadu-components-2628985316", n === "center" && "kakadu-components-9661990", n === "space-between" && "kakadu-components-1323551558", n === "end" && "kakadu-components-1950514053", o === 0.25 && "kakadu-components-2276234075", o === 0.375 && "kakadu-components-739568937", o === 0.5 && "kakadu-components-3438335458", o === 0.75 && "kakadu-components-3350948469", o === 1 && "kakadu-components-3993051137", o === 1.5 && "kakadu-components-4186556816", o === 2 && "kakadu-components-1435205015", o === 2.25 && "kakadu-components-4251546321", o === 3 && "kakadu-components-1168734547", o === 4 && "kakadu-components-1543861259", m && "kakadu-components-3545808562", c && "kakadu-components-3911899222", u) });
16
25
  }
17
26
  export {
18
- p as FlexAlignment,
19
- w as default
27
+ D as default,
28
+ A as flexDirections,
29
+ E as flexPresets
20
30
  };
@@ -1,9 +1,6 @@
1
- import { WrapperWidth } from './wrapper';
2
- export declare enum FooterLinkItem {
3
- privacyPolicy = "privacyPolicy",
4
- ethicalGuidelines = "ethicalGuidelines",
5
- security = "security"
6
- }
1
+ import { type WrapperWidth } from './wrapper';
2
+ export declare const footerLinkItems: readonly ["privacyPolicy", "ethicalGuidelines", "security"];
3
+ export type FooterLinkItem = (typeof footerLinkItems)[number];
7
4
  export type FooterProperties = {
8
5
  readonly width?: WrapperWidth;
9
6
  readonly links?: Partial<Record<FooterLinkItem, string>>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),o=require("@kuma-ui/core"),l=require("../theme.js"),t=require("./flex.js"),n=require("./text.js"),d=require("./kakadu-logo.js"),p=require("./moving-stars.js"),m=require("./aria-text.js"),x=require("./wrapper.js"),a="kakadu-components-975968984";function i(r){return!!(r&&r.trim()!=="")}var u=(r=>(r.privacyPolicy="privacyPolicy",r.ethicalGuidelines="ethicalGuidelines",r.security="security",r))(u||{});function j({width:r=x.WrapperWidth.page,links:s,className:c}){return e.jsxRuntimeExports.jsxs(x.default,{as:"footer",gap:2,"data-theme":"dark",width:r,className:o.cx(l.default,"kakadu-components-1574406446",c),children:[e.jsxRuntimeExports.jsxs(t.default,{wrap:!0,direction:"row",gap:4,className:"kakadu-components-783629418",children:[e.jsxRuntimeExports.jsxs(t.default,{direction:"column",alignment:t.FlexAlignment.start,gap:.5,children:[e.jsxRuntimeExports.jsx(n.Paragraph,{children:e.jsxRuntimeExports.jsx("strong",{children:"Products"})}),e.jsxRuntimeExports.jsxs(n.Paragraph,{as:"ul",className:a,children:[e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://guide.kakadu.no",children:"Kakadu Guide"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no/kakadu-start",children:"Kakadu Kolibri"})})]})]}),e.jsxRuntimeExports.jsxs(t.default,{direction:"column",alignment:t.FlexAlignment.start,gap:.5,children:[e.jsxRuntimeExports.jsx(n.Paragraph,{children:e.jsxRuntimeExports.jsx("strong",{children:"Results"})}),e.jsxRuntimeExports.jsxs(n.Paragraph,{as:"ul",className:a,children:[e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no",children:"Case studies"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no",children:"Impact measurement"})})]})]}),e.jsxRuntimeExports.jsxs(t.default,{direction:"column",alignment:t.FlexAlignment.start,gap:.5,children:[e.jsxRuntimeExports.jsx(n.Paragraph,{children:e.jsxRuntimeExports.jsx("strong",{children:"About us"})}),e.jsxRuntimeExports.jsxs(n.Paragraph,{as:"ul",className:a,children:[e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no",children:"Our story"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no/kontakt-oss",children:"Contact"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://kakadu.instatus.com",children:"Status"})})]})]}),e.jsxRuntimeExports.jsxs(t.default,{direction:"column",alignment:t.FlexAlignment.start,gap:.5,children:[e.jsxRuntimeExports.jsx(n.Paragraph,{children:e.jsxRuntimeExports.jsx("strong",{children:"Compliance"})}),e.jsxRuntimeExports.jsxs(n.Paragraph,{as:"ul",className:a,children:[e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:i(s==null?void 0:s.privacyPolicy)?s.privacyPolicy:"https://utforsk.kakadu.no/personvernerklaering",children:"Privacy policy"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:i(s==null?void 0:s.ethicalGuidelines)?s.ethicalGuidelines:"https://utforsk.kakadu.no/etiske-retningslinjer",children:"Ethical guidelines"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:i(s==null?void 0:s.security)?s.security:"https://utforsk.kakadu.no/personvernerklaering",children:"Security"})})]})]}),e.jsxRuntimeExports.jsx(t.default,{fill:!0,className:"kakadu-components-3520395370",children:e.jsxRuntimeExports.jsx("a",{href:"https://businessnorway.com/made-in-norway",target:"_blank",rel:"noopener noreferrer",className:"kakadu-components-3521477705",children:e.jsxRuntimeExports.jsx("img",{alt:"Made in Norway",src:"https://cdn.prod.website-files.com/65a686387a785640fecc9b9d/68f09646a6d6e62b6839c38c_made_in_norway_logo.png",width:76,className:"kakadu-components-2329568054"})})})]}),e.jsxRuntimeExports.jsxs(t.default,{direction:"row",gap:1,className:o.cx("kakadu-components-2089456404"),children:[e.jsxRuntimeExports.jsxs("a",{href:"https://kakadu.no",children:[e.jsxRuntimeExports.jsx(m.default,{children:"Kakadu.no"}),e.jsxRuntimeExports.jsx(d.default,{width:90,className:"kakadu-components-3695148669"})]}),e.jsxRuntimeExports.jsxs(n.Span,{className:"kakadu-components-1125118494",children:["© ",new Date().getFullYear()," Kakadu Ignite AS"]})]}),e.jsxRuntimeExports.jsx(p.default,{})]})}exports.FooterLinkItem=u;exports.default=j;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),i=require("@kuma-ui/core"),u=require("../theme.js"),r=require("./flex.js"),t=require("./text.js"),c=require("./kakadu-logo.js"),p=require("./moving-stars.js"),d=require("./aria-text.js"),l=require("./wrapper.js"),a="kakadu-components-975968984";function o(n){return!!(n&&n.trim()!=="")}const j=["privacyPolicy","ethicalGuidelines","security"];function m({width:n="page",links:s,className:x}){return e.jsxRuntimeExports.jsxs(l.default,{as:"footer",gap:2,"data-theme":"dark",width:n,className:i.cx(u.default,"kakadu-components-1574406446",x),children:[e.jsxRuntimeExports.jsxs(r.default,{wrap:!0,direction:"row",gap:4,className:"kakadu-components-783629418",children:[e.jsxRuntimeExports.jsxs(r.default,{direction:"column",preset:"start",gap:.5,children:[e.jsxRuntimeExports.jsx(t.Paragraph,{children:e.jsxRuntimeExports.jsx("strong",{children:"Products"})}),e.jsxRuntimeExports.jsxs(t.Paragraph,{as:"ul",className:a,children:[e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://guide.kakadu.no",children:"Kakadu Guide"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no/kakadu-start",children:"Kakadu Kolibri"})})]})]}),e.jsxRuntimeExports.jsxs(r.default,{direction:"column",preset:"start",gap:.5,children:[e.jsxRuntimeExports.jsx(t.Paragraph,{children:e.jsxRuntimeExports.jsx("strong",{children:"Results"})}),e.jsxRuntimeExports.jsxs(t.Paragraph,{as:"ul",className:a,children:[e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no",children:"Case studies"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no",children:"Impact measurement"})})]})]}),e.jsxRuntimeExports.jsxs(r.default,{direction:"column",preset:"start",gap:.5,children:[e.jsxRuntimeExports.jsx(t.Paragraph,{children:e.jsxRuntimeExports.jsx("strong",{children:"About us"})}),e.jsxRuntimeExports.jsxs(t.Paragraph,{as:"ul",className:a,children:[e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no",children:"Our story"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:"https://utforsk.kakadu.no/kontakt-oss",children:"Contact"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://kakadu.instatus.com",children:"Status"})})]})]}),e.jsxRuntimeExports.jsxs(r.default,{direction:"column",preset:"start",gap:.5,children:[e.jsxRuntimeExports.jsx(t.Paragraph,{children:e.jsxRuntimeExports.jsx("strong",{children:"Compliance"})}),e.jsxRuntimeExports.jsxs(t.Paragraph,{as:"ul",className:a,children:[e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:o(s==null?void 0:s.privacyPolicy)?s.privacyPolicy:"https://utforsk.kakadu.no/personvernerklaering",children:"Privacy policy"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:o(s==null?void 0:s.ethicalGuidelines)?s.ethicalGuidelines:"https://utforsk.kakadu.no/etiske-retningslinjer",children:"Ethical guidelines"})}),e.jsxRuntimeExports.jsx("li",{children:e.jsxRuntimeExports.jsx("a",{href:o(s==null?void 0:s.security)?s.security:"https://utforsk.kakadu.no/personvernerklaering",children:"Security"})})]})]}),e.jsxRuntimeExports.jsx(r.default,{fill:!0,className:"kakadu-components-3520395370",children:e.jsxRuntimeExports.jsx("a",{href:"https://businessnorway.com/made-in-norway",target:"_blank",rel:"noopener noreferrer",className:"kakadu-components-3521477705",children:e.jsxRuntimeExports.jsx("img",{alt:"Made in Norway",src:"https://cdn.prod.website-files.com/65a686387a785640fecc9b9d/68f09646a6d6e62b6839c38c_made_in_norway_logo.png",width:76,className:"kakadu-components-2329568054"})})})]}),e.jsxRuntimeExports.jsxs(r.default,{direction:"row",gap:1,className:i.cx("kakadu-components-2089456404"),children:[e.jsxRuntimeExports.jsxs("a",{href:"https://kakadu.no",children:[e.jsxRuntimeExports.jsx(d.default,{children:"Kakadu.no"}),e.jsxRuntimeExports.jsx(c.default,{width:90,className:"kakadu-components-3695148669"})]}),e.jsxRuntimeExports.jsxs(t.Span,{className:"kakadu-components-1125118494",children:["© ",new Date().getFullYear()," Kakadu Ignite AS"]})]}),e.jsxRuntimeExports.jsx(p.default,{})]})}exports.default=m;exports.footerLinkItems=j;