@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.
- package/build/components/aria-text.d.ts +2 -1
- package/build/components/box.d.ts +2 -1
- package/build/components/button-tooltip.d.ts +2 -1
- package/build/components/button.d.ts +3 -3
- package/build/components/button.js +1 -1
- package/build/components/button.mjs +27 -25
- package/build/components/card.d.ts +2 -2
- package/build/components/click-ripples.d.ts +2 -2
- package/build/components/click-ripples.js +1 -1
- package/build/components/click-ripples.mjs +50 -45
- package/build/components/collapsible.d.ts +2 -2
- package/build/components/combobox.d.ts +2 -2
- package/build/components/combobox.js +1 -1
- package/build/components/combobox.mjs +161 -159
- package/build/components/copy-icon-button.d.ts +2 -1
- package/build/components/datum.d.ts +2 -2
- package/build/components/dot.d.ts +2 -2
- package/build/components/flex.d.ts +2 -1
- package/build/components/footer.d.ts +2 -2
- package/build/components/gauge.d.ts +2 -1
- package/build/components/header.d.ts +2 -1
- package/build/components/hover-gradient.d.ts +2 -2
- package/build/components/hover-gradient.js +1 -1
- package/build/components/hover-gradient.mjs +48 -35
- package/build/components/icon-button.d.ts +2 -2
- package/build/components/input.d.ts +3 -3
- package/build/components/input.js +2 -2
- package/build/components/input.mjs +21 -21
- package/build/components/logos/akt-logo.d.ts +2 -2
- package/build/components/logos/amedia-logo.d.ts +2 -2
- package/build/components/logos/bankaxept-logo.d.ts +2 -2
- package/build/components/logos/bankid-logo.d.ts +2 -2
- package/build/components/logos/dnb-logo.d.ts +2 -2
- package/build/components/logos/entur-logo.d.ts +2 -2
- package/build/components/logos/gjensidige-logo.d.ts +2 -2
- package/build/components/logos/kakadu-academy-logo.d.ts +2 -2
- package/build/components/logos/kakadu-guide-icon.d.ts +2 -1
- package/build/components/logos/kakadu-guide-logo.d.ts +3 -3
- package/build/components/logos/kakadu-index-logo.d.ts +2 -2
- package/build/components/logos/kakadu-logo.d.ts +2 -2
- package/build/components/logos/kakadu-play-logo.d.ts +2 -2
- package/build/components/logos/kolumbus-logo.d.ts +2 -2
- package/build/components/logos/nordea-logo.d.ts +2 -2
- package/build/components/logos/norsk-tipping-logo.d.ts +2 -2
- package/build/components/logos/ruter-logo.d.ts +2 -2
- package/build/components/logos/senteret-for-et-aldersvennlig-norge-logo.d.ts +2 -2
- package/build/components/logos/sparebank1-logo.d.ts +2 -2
- package/build/components/logos/sparebanken-norge-logo.d.ts +2 -2
- package/build/components/logos/sto-logo.d.ts +2 -2
- package/build/components/logos/storebrand-logo.d.ts +2 -2
- package/build/components/modal.d.ts +6 -6
- package/build/components/modal.js +1 -1
- package/build/components/modal.mjs +86 -85
- package/build/components/moving-gradients.js +1 -1
- package/build/components/moving-gradients.mjs +80 -70
- package/build/components/moving-stars.js +1 -1
- package/build/components/moving-stars.mjs +77 -74
- package/build/components/notice.d.ts +2 -2
- package/build/components/notification.d.ts +8 -6
- package/build/components/notification.js +1 -1
- package/build/components/notification.mjs +87 -71
- package/build/components/popover-menu.d.ts +3 -3
- package/build/components/popover-menu.js +1 -1
- package/build/components/popover-menu.mjs +131 -129
- package/build/components/popover.d.ts +4 -4
- package/build/components/popover.js +1 -1
- package/build/components/popover.mjs +82 -73
- package/build/components/revealer.d.ts +2 -2
- package/build/components/select.d.ts +2 -2
- package/build/components/separator.d.ts +5 -5
- package/build/components/skeleton.d.ts +3 -2
- package/build/components/spinner.d.ts +3 -2
- package/build/components/text-button.d.ts +2 -2
- package/build/components/text.d.ts +9 -8
- package/build/components/theme-setter.d.ts +2 -2
- package/build/components/veil.d.ts +2 -1
- package/build/components/wrapper.d.ts +2 -2
- package/build/components.css +1 -1
- package/build/hooks/use-is-document-focused.js +1 -1
- package/build/hooks/use-is-document-focused.mjs +30 -14
- package/build/icons/anchor-down.d.ts +2 -2
- package/build/icons/anchor-up.d.ts +2 -2
- package/build/icons/arrow-down.d.ts +2 -2
- package/build/icons/arrow-left.d.ts +2 -2
- package/build/icons/arrow-right.d.ts +2 -2
- package/build/icons/arrow-up.d.ts +2 -2
- package/build/icons/caret-down.d.ts +2 -2
- package/build/icons/caret-left.d.ts +2 -2
- package/build/icons/caret-right.d.ts +2 -2
- package/build/icons/caret-up.d.ts +2 -2
- package/build/icons/check.d.ts +2 -2
- package/build/icons/chevron-down.d.ts +2 -2
- package/build/icons/chevron-left.d.ts +2 -2
- package/build/icons/chevron-right.d.ts +2 -2
- package/build/icons/chevron-up.d.ts +2 -2
- package/build/icons/chrome-browser-logo.d.ts +2 -2
- package/build/icons/cog.d.ts +2 -2
- package/build/icons/copy.d.ts +2 -2
- package/build/icons/document.d.ts +2 -2
- package/build/icons/dots.d.ts +2 -2
- package/build/icons/drag.d.ts +2 -2
- package/build/icons/edge-browser-logo.d.ts +2 -2
- package/build/icons/edit.d.ts +2 -2
- package/build/icons/exclamation-triangle.d.ts +2 -2
- package/build/icons/external.d.ts +2 -2
- package/build/icons/eye.d.ts +2 -2
- package/build/icons/icon.d.ts +2 -2
- package/build/icons/information.d.ts +2 -2
- package/build/icons/kakadu-guide-glyph.d.ts +2 -2
- package/build/icons/kakadu-guide-icon.d.ts +2 -2
- package/build/icons/menu.d.ts +2 -2
- package/build/icons/package.d.ts +2 -2
- package/build/icons/plus.d.ts +2 -2
- package/build/icons/select.d.ts +2 -2
- package/build/icons/share.d.ts +2 -2
- package/build/icons/sparkle.d.ts +2 -2
- package/build/icons/test.d.ts +2 -2
- package/build/icons/times.d.ts +2 -2
- package/build/icons/trash.d.ts +2 -2
- package/build/icons/trend-up.d.ts +2 -2
- package/build/index.d.ts +2 -0
- package/build/index.js +1 -1
- package/build/index.mjs +19 -17
- package/build/theme.d.ts +2 -1
- package/build/utilities/listeners.d.ts +5 -0
- package/build/utilities/listeners.js +1 -0
- package/build/utilities/listeners.mjs +16 -0
- package/package.json +16 -22
|
@@ -1,219 +1,221 @@
|
|
|
1
1
|
import { j as i } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { cx as
|
|
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
|
|
10
|
-
import
|
|
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:
|
|
15
|
-
setValue:
|
|
32
|
+
value: t,
|
|
33
|
+
setValue: p
|
|
16
34
|
} = ie("isKeyboardNavigating");
|
|
17
|
-
return
|
|
18
|
-
isKeyboardNavigating:
|
|
19
|
-
setIsKeyboardNavigating:
|
|
20
|
-
}), [
|
|
35
|
+
return W(() => ({
|
|
36
|
+
isKeyboardNavigating: t,
|
|
37
|
+
setIsKeyboardNavigating: p
|
|
38
|
+
}), [t, p]);
|
|
21
39
|
}
|
|
22
|
-
function
|
|
23
|
-
return "text" in
|
|
40
|
+
function D(t) {
|
|
41
|
+
return "text" in t ? t.text : t.label;
|
|
24
42
|
}
|
|
25
|
-
const
|
|
26
|
-
function
|
|
27
|
-
isSelected:
|
|
28
|
-
id:
|
|
29
|
-
value:
|
|
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:
|
|
32
|
-
onHover:
|
|
49
|
+
onSelect: h,
|
|
50
|
+
onHover: I
|
|
33
51
|
}) {
|
|
34
52
|
const {
|
|
35
|
-
isKeyboardNavigating:
|
|
36
|
-
} = _(),
|
|
37
|
-
|
|
38
|
-
}, [
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
return
|
|
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
|
-
|
|
61
|
+
t && d && v && setTimeout(() => {
|
|
44
62
|
d.scrollIntoView({
|
|
45
63
|
behavior: "smooth",
|
|
46
64
|
block: "nearest"
|
|
47
65
|
});
|
|
48
66
|
}, 0);
|
|
49
|
-
}, [
|
|
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
|
|
52
|
-
isLoading:
|
|
53
|
-
id:
|
|
54
|
-
activeOptionId:
|
|
69
|
+
function ke({
|
|
70
|
+
isLoading: t,
|
|
71
|
+
id: p,
|
|
72
|
+
activeOptionId: b,
|
|
55
73
|
selectedValue: o,
|
|
56
|
-
options:
|
|
57
|
-
onSelect:
|
|
58
|
-
onHover:
|
|
74
|
+
options: h,
|
|
75
|
+
onSelect: I,
|
|
76
|
+
onHover: v
|
|
59
77
|
}) {
|
|
60
|
-
const
|
|
61
|
-
return
|
|
62
|
-
const l =
|
|
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:
|
|
68
|
-
|
|
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(
|
|
71
|
-
] }) :
|
|
72
|
-
|
|
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 ?
|
|
93
|
+
id: l.value === o ? b : void 0,
|
|
76
94
|
isSelected: l.value === o,
|
|
77
|
-
onSelect:
|
|
78
|
-
onHover:
|
|
95
|
+
onSelect: I,
|
|
96
|
+
onHover: v
|
|
79
97
|
},
|
|
80
|
-
|
|
98
|
+
D(l) + r
|
|
81
99
|
)),
|
|
82
|
-
|
|
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
|
|
86
|
-
isLoading:
|
|
87
|
-
shouldFilterOptions:
|
|
88
|
-
label:
|
|
103
|
+
function Me({
|
|
104
|
+
isLoading: t,
|
|
105
|
+
shouldFilterOptions: p = !0,
|
|
106
|
+
label: b,
|
|
89
107
|
options: o,
|
|
90
|
-
error:
|
|
91
|
-
warning:
|
|
92
|
-
information:
|
|
93
|
-
footnote:
|
|
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
|
-
...
|
|
115
|
+
...U
|
|
98
116
|
}) {
|
|
99
|
-
const
|
|
100
|
-
|
|
117
|
+
const K = F(null), X = J(), Y = J(), [N, T] = M(!1), $ = m(() => {
|
|
118
|
+
T(!0);
|
|
101
119
|
}, []), ee = m((e) => {
|
|
102
|
-
var
|
|
103
|
-
(
|
|
104
|
-
}, []), [O, a] =
|
|
105
|
-
|
|
106
|
-
a(
|
|
107
|
-
}, [
|
|
108
|
-
const [
|
|
109
|
-
value:
|
|
110
|
-
} =
|
|
111
|
-
te(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
|
-
|
|
114
|
-
E(
|
|
115
|
-
}, [
|
|
116
|
-
const e = o.find((
|
|
117
|
-
e ?
|
|
118
|
-
}, [o,
|
|
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 && (
|
|
121
|
-
}, [f, c]), se = m((e,
|
|
122
|
-
|
|
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
|
|
125
|
-
(
|
|
126
|
-
}, []),
|
|
127
|
-
const
|
|
128
|
-
c(
|
|
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
|
|
131
|
-
|
|
132
|
-
}, [o,
|
|
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(
|
|
135
|
-
|
|
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
|
|
142
|
-
if (
|
|
143
|
-
return
|
|
144
|
-
|
|
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
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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
|
-
|
|
218
|
-
|
|
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'>):
|
|
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):
|
|
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>):
|
|
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>):
|
|
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):
|
|
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):
|
|
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>):
|
|
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
|
-
}):
|
|
6
|
+
}): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
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
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { cx as
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 =
|
|
13
|
-
return
|
|
14
|
-
if (!
|
|
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
|
|
23
|
-
if (!
|
|
35
|
+
const i = t.current;
|
|
36
|
+
if (!i)
|
|
24
37
|
return;
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
if (!
|
|
38
|
+
const b = N((m) => {
|
|
39
|
+
const I = m.target;
|
|
40
|
+
if (!i.contains(I))
|
|
28
41
|
return;
|
|
29
|
-
const
|
|
30
|
-
clientX:
|
|
42
|
+
const V = i.getBoundingClientRect(), {
|
|
43
|
+
clientX: a,
|
|
31
44
|
clientY: u
|
|
32
|
-
} =
|
|
33
|
-
left:
|
|
34
|
-
right:
|
|
35
|
-
top:
|
|
36
|
-
bottom:
|
|
37
|
-
} =
|
|
38
|
-
|
|
39
|
-
},
|
|
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
|
-
|
|
43
|
-
|
|
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:
|
|
62
|
+
}, className: L("kakadu-components-611160091", g && "kakadu-components-3627966847") }) : null });
|
|
50
63
|
}
|
|
51
64
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
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):
|
|
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):
|
|
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):
|
|
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 {};
|