@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,49 +1,56 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as n } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
2
|
import { cx as p } from "@kuma-ui/core";
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { f as
|
|
3
|
+
import { createContext as te, useRef as P, useState as o, useCallback as R, useMemo as A, useEffect as F, useContext as se } from "react";
|
|
4
|
+
import { f as ne } from "../focus-trap-react-Dr3BYLw6.mjs";
|
|
5
|
+
import oe from "../utilities/listeners.mjs";
|
|
5
6
|
import K, { defaultAtomElementType as Q } from "./atom.mjs";
|
|
6
|
-
const
|
|
7
|
+
const re = oe((t) => {
|
|
8
|
+
window.addEventListener("resize", t, {
|
|
9
|
+
passive: !0
|
|
10
|
+
});
|
|
11
|
+
}, (t) => {
|
|
12
|
+
window.removeEventListener("resize", t);
|
|
13
|
+
}), X = te({
|
|
7
14
|
isVisible: !1,
|
|
8
15
|
isPreparingFocus: !1,
|
|
9
16
|
isFocused: !1
|
|
10
17
|
}), {
|
|
11
|
-
Provider:
|
|
18
|
+
Provider: ae
|
|
12
19
|
} = X;
|
|
13
|
-
function
|
|
14
|
-
return
|
|
20
|
+
function pe() {
|
|
21
|
+
return se(X);
|
|
15
22
|
}
|
|
16
|
-
function
|
|
17
|
-
as:
|
|
18
|
-
className:
|
|
23
|
+
function ve({
|
|
24
|
+
as: t,
|
|
25
|
+
className: s,
|
|
19
26
|
...l
|
|
20
27
|
}) {
|
|
21
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ n.jsx(K, { as: t ?? Q, ...l, className: p("kakadu-components-2845019685", s) });
|
|
22
29
|
}
|
|
23
|
-
function
|
|
24
|
-
as:
|
|
25
|
-
isVisible:
|
|
30
|
+
function ke({
|
|
31
|
+
as: t,
|
|
32
|
+
isVisible: s,
|
|
26
33
|
label: l,
|
|
27
34
|
shouldCloseOnOutsideClick: v = !0,
|
|
28
|
-
shouldCloseOnEscapePress:
|
|
35
|
+
shouldCloseOnEscapePress: a = !0,
|
|
29
36
|
children: k,
|
|
30
|
-
className:
|
|
37
|
+
className: c,
|
|
31
38
|
innerClassName: f,
|
|
32
|
-
onClose:
|
|
39
|
+
onClose: i,
|
|
33
40
|
...j
|
|
34
41
|
}) {
|
|
35
|
-
const w = P(null), g = P(null), [
|
|
42
|
+
const w = P(null), g = P(null), [r, h] = o(!1), [d, I] = o(!1), [O, Y] = o(!1), [u, T] = o(!1), [Z, b] = o(!1), V = R((e) => {
|
|
36
43
|
w.current = e, T(!1);
|
|
37
|
-
}, []),
|
|
38
|
-
e && (
|
|
39
|
-
}, []), _ =
|
|
40
|
-
initialFocus: () =>
|
|
44
|
+
}, []), E = P(null), y = R((e) => {
|
|
45
|
+
e && (E.current = e);
|
|
46
|
+
}, []), _ = A(() => ({
|
|
47
|
+
initialFocus: () => E.current ?? void 0,
|
|
41
48
|
onPostActivate() {
|
|
42
49
|
var e;
|
|
43
|
-
I(!0), h(!1), (e =
|
|
50
|
+
I(!0), h(!1), (e = E.current) == null || e.focus();
|
|
44
51
|
},
|
|
45
52
|
clickOutsideDeactivates: v,
|
|
46
|
-
escapeDeactivates:
|
|
53
|
+
escapeDeactivates: a,
|
|
47
54
|
onPostUnpause() {
|
|
48
55
|
I(!0);
|
|
49
56
|
},
|
|
@@ -51,40 +58,42 @@ function de({
|
|
|
51
58
|
I(!1);
|
|
52
59
|
},
|
|
53
60
|
onDeactivate() {
|
|
54
|
-
|
|
61
|
+
b(!1), T(!1), I(!1);
|
|
55
62
|
}
|
|
56
|
-
}), [v,
|
|
57
|
-
isVisible:
|
|
58
|
-
isPreparingFocus:
|
|
63
|
+
}), [v, a]), [N, B] = o(s ?? !1), $ = A(() => ({
|
|
64
|
+
isVisible: N,
|
|
65
|
+
isPreparingFocus: r,
|
|
59
66
|
isFocused: d,
|
|
60
|
-
setInitialFocus:
|
|
61
|
-
close:
|
|
62
|
-
}), [
|
|
67
|
+
setInitialFocus: y,
|
|
68
|
+
close: V
|
|
69
|
+
}), [N, r, d, y, V]), [m, C] = o("center");
|
|
63
70
|
return F(() => {
|
|
64
71
|
const e = g.current;
|
|
65
72
|
if (e) {
|
|
66
|
-
const
|
|
67
|
-
const q = e.offsetParent,
|
|
68
|
-
if (!
|
|
69
|
-
|
|
73
|
+
const W = () => {
|
|
74
|
+
const q = e.offsetParent, z = q instanceof HTMLElement ? q.getBoundingClientRect() : null, H = e.getBoundingClientRect();
|
|
75
|
+
if (!z) {
|
|
76
|
+
C("center");
|
|
70
77
|
return;
|
|
71
78
|
}
|
|
72
|
-
const
|
|
79
|
+
const D = 16, S = window.innerWidth - D, M = z.left + z.width / 2 - H.width / 2, U = M + H.width, G = M < D, J = U > S;
|
|
73
80
|
let x = "center";
|
|
74
81
|
if (G && J) {
|
|
75
|
-
const
|
|
76
|
-
x = U - S >
|
|
82
|
+
const L = D - M;
|
|
83
|
+
x = U - S > L ? "right" : "left";
|
|
77
84
|
} else J ? x = "right" : G && (x = "left");
|
|
78
|
-
|
|
85
|
+
C((L) => L === x ? L : x);
|
|
79
86
|
};
|
|
80
|
-
|
|
81
|
-
|
|
87
|
+
W();
|
|
88
|
+
const ee = re(W);
|
|
89
|
+
return () => {
|
|
90
|
+
ee();
|
|
82
91
|
};
|
|
83
92
|
}
|
|
84
93
|
}, []), F(() => {
|
|
85
|
-
|
|
86
|
-
}, [
|
|
87
|
-
if (
|
|
94
|
+
s && (Y(!0), B(!0));
|
|
95
|
+
}, [s]), F(() => {
|
|
96
|
+
if (s) {
|
|
88
97
|
const e = setTimeout(() => {
|
|
89
98
|
T(!0);
|
|
90
99
|
}, 100);
|
|
@@ -93,55 +102,55 @@ function de({
|
|
|
93
102
|
};
|
|
94
103
|
}
|
|
95
104
|
T(!1);
|
|
96
|
-
}, [
|
|
97
|
-
if (!
|
|
98
|
-
|
|
105
|
+
}, [s]), F(() => {
|
|
106
|
+
if (!u) {
|
|
107
|
+
b(!1), h(!1);
|
|
99
108
|
return;
|
|
100
109
|
}
|
|
101
110
|
h(!0);
|
|
102
111
|
const e = window.requestAnimationFrame(() => {
|
|
103
|
-
|
|
112
|
+
b(!0);
|
|
104
113
|
});
|
|
105
114
|
return () => {
|
|
106
115
|
window.cancelAnimationFrame(e);
|
|
107
116
|
};
|
|
108
|
-
}, [
|
|
109
|
-
if (
|
|
117
|
+
}, [u]), F(() => {
|
|
118
|
+
if (O && !u) {
|
|
110
119
|
const e = setTimeout(() => {
|
|
111
|
-
|
|
120
|
+
B(!1), i == null || i(w.current ?? void 0);
|
|
112
121
|
}, 370);
|
|
113
122
|
return () => {
|
|
114
123
|
clearTimeout(e);
|
|
115
124
|
};
|
|
116
125
|
}
|
|
117
|
-
}, [
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
126
|
+
}, [O, u, i]), N ? /* @__PURE__ */ n.jsx(K, { reference: g, as: t ?? Q, role: "dialog", "aria-hidden": !u && !d, "aria-label": l ?? "Popover", ...j, className: p("kakadu-components-3920007758", m === "left" && "kakadu-components-611400930", m === "right" && "kakadu-components-944244368", u && "kakadu-components-1399012551", c), children: /* @__PURE__ */ n.jsxs("div", { className: p("kakadu-components-1118152266", u && "kakadu-components-231244945"), children: [
|
|
127
|
+
/* @__PURE__ */ n.jsx("div", { className: p("kakadu-components-1951789226", m === "left" && "kakadu-components-1495725644", m === "right" && "kakadu-components-4235689197") }),
|
|
128
|
+
/* @__PURE__ */ n.jsx(ne.FocusTrap, { active: Z, focusTrapOptions: _, children: /* @__PURE__ */ n.jsxs("div", { className: p("kakadu-components-2488426662", f), children: [
|
|
129
|
+
/* @__PURE__ */ n.jsx(ae, { value: $, children: k }),
|
|
130
|
+
/* @__PURE__ */ n.jsx("div", { className: p("kakadu-components-3252390100", m === "left" && "kakadu-components-3754561431", m === "right" && "kakadu-components-2265262600") })
|
|
122
131
|
] }) })
|
|
123
132
|
] }) }) : null;
|
|
124
133
|
}
|
|
125
|
-
function
|
|
126
|
-
const [l, v] =
|
|
127
|
-
|
|
128
|
-
})), []), j = R((
|
|
129
|
-
f.current =
|
|
130
|
-
}, []), w = R((
|
|
134
|
+
function we(t, s) {
|
|
135
|
+
const [l, v] = o(!1), [a, k] = o(!1), c = P(void 0), f = P(void 0), i = R(async () => (f.current = void 0, v(!0), k(!0), new Promise((r) => {
|
|
136
|
+
c.current = r;
|
|
137
|
+
})), []), j = R((r) => {
|
|
138
|
+
f.current = r, k(!1);
|
|
139
|
+
}, []), w = R((r) => {
|
|
131
140
|
var d;
|
|
132
|
-
const h =
|
|
133
|
-
f.current = void 0, (d =
|
|
134
|
-
}, []), g =
|
|
135
|
-
return
|
|
136
|
-
isVisible:
|
|
137
|
-
show:
|
|
141
|
+
const h = r ?? f.current;
|
|
142
|
+
f.current = void 0, (d = c.current) == null || d.call(c, h), c.current = void 0, v(!1), k(!1);
|
|
143
|
+
}, []), g = A(() => l ? /* @__PURE__ */ n.jsx(t, { ...s, isVisible: a, onClose: w }) : null, [l, t, s, a, w]);
|
|
144
|
+
return A(() => ({
|
|
145
|
+
isVisible: a,
|
|
146
|
+
show: i,
|
|
138
147
|
close: j,
|
|
139
148
|
popover: g
|
|
140
|
-
}), [
|
|
149
|
+
}), [a, i, j, g]);
|
|
141
150
|
}
|
|
142
151
|
export {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
152
|
+
ve as PopoverContainer,
|
|
153
|
+
ke as default,
|
|
154
|
+
we as usePopover,
|
|
155
|
+
pe as usePopoverContext
|
|
147
156
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CSSProperties, type RefObject } from 'react';
|
|
1
|
+
import React, { type CSSProperties, type RefObject } from 'react';
|
|
2
2
|
import { type AtomElementType, type AtomProperties } from './atom';
|
|
3
3
|
type RevealerOptions = {
|
|
4
4
|
readonly delay?: number;
|
|
@@ -15,5 +15,5 @@ export declare function useRevealer(reference: RefObject<HTMLElement | null>, op
|
|
|
15
15
|
style: CSSProperties;
|
|
16
16
|
className: string;
|
|
17
17
|
};
|
|
18
|
-
export default function Revealer<Type extends AtomElementType = 'span'>({ as, delay, animationDelay, duration, threshold, distance, isMoving, isCentered, shouldReveal, children, className, ...properties }: AtomProperties<Type> & RevealerOptions):
|
|
18
|
+
export default function Revealer<Type extends AtomElementType = 'span'>({ as, delay, animationDelay, duration, threshold, distance, isMoving, isCentered, shouldReveal, children, className, ...properties }: AtomProperties<Type> & RevealerOptions): React.JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ChangeEvent, type HTMLProps, type ReactNode } from 'react';
|
|
1
|
+
import React, { type ChangeEvent, type HTMLProps, type ReactNode } from 'react';
|
|
2
2
|
import { type InputLabelControllerProperties } from './input';
|
|
3
3
|
export type SelectOption<Type extends string = string> = {
|
|
4
4
|
readonly value: Type;
|
|
@@ -9,4 +9,4 @@ export type SelectProperties<Type extends string = string> = Omit<InputLabelCont
|
|
|
9
9
|
readonly options: Array<SelectOption<Type>>;
|
|
10
10
|
readonly onChange?: (value: Type, event: ChangeEvent<HTMLSelectElement>) => void;
|
|
11
11
|
};
|
|
12
|
-
export default function Select<Type extends string = string>({ label, options, error, warning, information, footnote, className, onChange, ...properties }: SelectProperties<Type>):
|
|
12
|
+
export default function Select<Type extends string = string>({ label, options, error, warning, information, footnote, className, onChange, ...properties }: SelectProperties<Type>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type HTMLProps } from 'react';
|
|
2
|
-
export default function Separator({ className, ...properties }: HTMLProps<HTMLHRElement>):
|
|
3
|
-
export declare function SmallSeparator({ className, ...properties }: HTMLProps<HTMLHRElement>):
|
|
1
|
+
import React, { type HTMLProps } from 'react';
|
|
2
|
+
export default function Separator({ className, ...properties }: HTMLProps<HTMLHRElement>): React.JSX.Element;
|
|
3
|
+
export declare function SmallSeparator({ className, ...properties }: HTMLProps<HTMLHRElement>): React.JSX.Element;
|
|
4
4
|
export declare function SeparatorLabel({ label, className, ...properties }: {
|
|
5
5
|
readonly label: string;
|
|
6
|
-
} & HTMLProps<HTMLHRElement>):
|
|
7
|
-
export declare function VerticalSeparator({ className, ...properties }: HTMLProps<HTMLHRElement>):
|
|
6
|
+
} & HTMLProps<HTMLHRElement>): React.JSX.Element;
|
|
7
|
+
export declare function VerticalSeparator({ className, ...properties }: HTMLProps<HTMLHRElement>): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type AtomElementType, type AtomProperties } from './atom';
|
|
2
3
|
export declare function getDeterministicSkeletonWidth(a: number, b: number, { minimum, maximum }: {
|
|
3
4
|
readonly minimum: number;
|
|
@@ -10,11 +11,11 @@ type SkeletonProperties = {
|
|
|
10
11
|
readonly className?: string;
|
|
11
12
|
readonly isAnimated?: boolean;
|
|
12
13
|
};
|
|
13
|
-
export declare function SkeletonInstance<Type extends AtomElementType = 'span'>({ as, label, width, height, className, children, isAnimated, ...properties }: SkeletonProperties & AtomProperties<Type>):
|
|
14
|
+
export declare function SkeletonInstance<Type extends AtomElementType = 'span'>({ as, label, width, height, className, children, isAnimated, ...properties }: SkeletonProperties & AtomProperties<Type>): React.JSX.Element;
|
|
14
15
|
export default function Skeleton({ label, lines, isDeterministic, isAnimated, }: {
|
|
15
16
|
readonly label?: string;
|
|
16
17
|
readonly lines?: number;
|
|
17
18
|
readonly isDeterministic?: boolean;
|
|
18
19
|
readonly isAnimated?: boolean;
|
|
19
|
-
}):
|
|
20
|
+
}): React.JSX.Element | null;
|
|
20
21
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
type SpinnerProperties = {
|
|
2
3
|
readonly size?: number;
|
|
3
4
|
readonly strokeWidth?: number;
|
|
4
5
|
readonly isAnimated?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export default function Spinner({ size, strokeWidth, isAnimated, }: SpinnerProperties):
|
|
7
|
+
export default function Spinner({ size, strokeWidth, isAnimated, }: SpinnerProperties): React.JSX.Element;
|
|
7
8
|
export declare function RevealSpinner({ isVisible, ...properties }: {
|
|
8
9
|
readonly isVisible?: boolean;
|
|
9
|
-
} & Omit<SpinnerProperties, 'isAnimated'>):
|
|
10
|
+
} & Omit<SpinnerProperties, 'isAnimated'>): React.JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLProps, type ReactNode } from 'react';
|
|
1
|
+
import React, { type HTMLProps, type ReactNode } from 'react';
|
|
2
2
|
import { type ButtonTooltipPosition } from './button-tooltip';
|
|
3
3
|
export declare const textButtonVariants: readonly ["primary", "delete"];
|
|
4
4
|
export type TextButtonVariant = (typeof textButtonVariants)[number];
|
|
@@ -19,5 +19,5 @@ export type TextButtonProperties = BaseTextButtonProperties & ({
|
|
|
19
19
|
children?: never;
|
|
20
20
|
label: string;
|
|
21
21
|
});
|
|
22
|
-
export default function TextButton({ ref, iconLeft, iconRight, variant, tooltip, tooltipPosition, href, target, rel, disabled, hasUnderline, isSkeleton, isSkeletonAnimated, className, children, label, ...properties }: TextButtonProperties):
|
|
22
|
+
export default function TextButton({ ref, iconLeft, iconRight, variant, tooltip, tooltipPosition, href, target, rel, disabled, hasUnderline, isSkeleton, isSkeletonAnimated, className, children, label, ...properties }: TextButtonProperties): React.JSX.Element;
|
|
23
23
|
export {};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type AtomElementType, type AtomProperties } from './atom';
|
|
2
3
|
import { type WrapperWidth } from './wrapper';
|
|
3
4
|
export declare const textShadowStyles: string;
|
|
4
5
|
export type DefaultHeadingElementType = 'h1';
|
|
5
6
|
export declare const defaultHeadingElementType = "h1";
|
|
6
|
-
export declare function Heading<Type extends AtomElementType = DefaultHeadingElementType>({ reference, as, className, ...properties }: AtomProperties<Type>):
|
|
7
|
+
export declare function Heading<Type extends AtomElementType = DefaultHeadingElementType>({ reference, as, className, ...properties }: AtomProperties<Type>): React.JSX.Element;
|
|
7
8
|
export declare function AnchorHeading<Type extends AtomElementType = 'h1'>({ as, id, children, className, ...properties }: Omit<AtomProperties<Type>, 'id'> & {
|
|
8
9
|
readonly id: string;
|
|
9
|
-
}):
|
|
10
|
+
}): React.JSX.Element;
|
|
10
11
|
export declare const spanStyles: string;
|
|
11
|
-
export declare function Span<Type extends AtomElementType = 'span'>({ as, className, ...properties }: AtomProperties<Type>):
|
|
12
|
-
export declare function Paragraph<Type extends AtomElementType = 'p'>({ as, className, ...properties }: AtomProperties<Type>):
|
|
13
|
-
export declare function Footnote<Type extends AtomElementType = 'small'>({ as, className, ...properties }: AtomProperties<Type>):
|
|
14
|
-
export declare function Label<Type extends AtomElementType = 'span'>({ as, className, ...properties }: AtomProperties<Type>):
|
|
12
|
+
export declare function Span<Type extends AtomElementType = 'span'>({ as, className, ...properties }: AtomProperties<Type>): React.JSX.Element;
|
|
13
|
+
export declare function Paragraph<Type extends AtomElementType = 'p'>({ as, className, ...properties }: AtomProperties<Type>): React.JSX.Element;
|
|
14
|
+
export declare function Footnote<Type extends AtomElementType = 'small'>({ as, className, ...properties }: AtomProperties<Type>): React.JSX.Element;
|
|
15
|
+
export declare function Label<Type extends AtomElementType = 'span'>({ as, className, ...properties }: AtomProperties<Type>): React.JSX.Element;
|
|
15
16
|
export type TextProperties<Type extends AtomElementType = 'div'> = Omit<AtomProperties<Type>, 'width'> & {
|
|
16
17
|
readonly width?: WrapperWidth;
|
|
17
18
|
};
|
|
18
|
-
export default function Text<Type extends AtomElementType = 'div'>({ as, width, className, ...properties }: TextProperties<Type>):
|
|
19
|
-
export declare function Hero<Type extends AtomElementType = 'div'>(properties: TextProperties<Type>):
|
|
19
|
+
export default function Text<Type extends AtomElementType = 'div'>({ as, width, className, ...properties }: TextProperties<Type>): React.JSX.Element;
|
|
20
|
+
export declare function Hero<Type extends AtomElementType = 'div'>(properties: TextProperties<Type>): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RefObject } from 'react';
|
|
1
|
+
import React, { type RefObject } from 'react';
|
|
2
2
|
export declare const themePreferences: string[];
|
|
3
3
|
type ThemePreference = (typeof themePreferences)[number];
|
|
4
4
|
type ThemeElement = HTMLElement | RefObject<HTMLElement | null>;
|
|
@@ -7,5 +7,5 @@ export declare function useIsLightTheme(element?: ThemeElement): boolean;
|
|
|
7
7
|
export declare function useIsDarkTheme(element?: ThemeElement): boolean;
|
|
8
8
|
export declare function getThemePreference(): string;
|
|
9
9
|
export declare function setThemePreference(preference: ThemePreference): void;
|
|
10
|
-
export default function ThemeSetter():
|
|
10
|
+
export default function ThemeSetter(): React.JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { type AtomElementType, type DefaultAtomElementType } from './atom';
|
|
3
3
|
import { type FlexProperties } from './flex';
|
|
4
4
|
export declare const wrapperWidths: readonly ["wide", "page", "text", "content"];
|
|
@@ -9,4 +9,4 @@ export type WrapperProperties<Type extends AtomElementType = DefaultAtomElementT
|
|
|
9
9
|
readonly outerChildrenBefore?: ReactNode;
|
|
10
10
|
readonly outerChildrenAfter?: ReactNode;
|
|
11
11
|
};
|
|
12
|
-
export default function Wrapper<Type extends AtomElementType = DefaultAtomElementType>({ as, gap, direction, preset, distribution, alignment, wrap, width, className, innerClassName, children, outerChildrenBefore, outerChildrenAfter, ...properties }: WrapperProperties<Type>):
|
|
12
|
+
export default function Wrapper<Type extends AtomElementType = DefaultAtomElementType>({ as, gap, direction, preset, distribution, alignment, wrap, width, className, innerClassName, children, outerChildrenBefore, outerChildrenAfter, ...properties }: WrapperProperties<Type>): React.JSX.Element;
|