@kakadu/components 3.15.4 → 4.0.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/button-tooltip.d.ts +2 -4
- package/build/components/button-tooltip.js +1 -1
- package/build/components/button-tooltip.mjs +11 -11
- package/build/components/button.d.ts +2 -6
- package/build/components/button.js +1 -1
- package/build/components/button.mjs +51 -51
- package/build/components/card.js +1 -1
- package/build/components/card.mjs +22 -22
- package/build/components/copy-icon-button.js +1 -1
- package/build/components/copy-icon-button.mjs +20 -21
- package/build/components/datum.js +1 -1
- package/build/components/datum.mjs +12 -12
- package/build/components/flex.d.ts +13 -9
- package/build/components/flex.js +1 -1
- package/build/components/flex.mjs +25 -15
- package/build/components/footer.d.ts +3 -6
- package/build/components/footer.js +1 -1
- package/build/components/footer.mjs +33 -33
- package/build/components/header.js +1 -1
- package/build/components/header.mjs +4 -5
- package/build/components/icon-button.d.ts +2 -6
- package/build/components/icon-button.js +1 -1
- package/build/components/icon-button.mjs +41 -41
- package/build/components/input.d.ts +1 -1
- package/build/components/input.js +2 -2
- package/build/components/input.mjs +64 -66
- package/build/components/kakadu-guide-logo.d.ts +2 -4
- package/build/components/kakadu-guide-logo.js +1 -1
- package/build/components/kakadu-guide-logo.mjs +13 -13
- package/build/components/modal.js +1 -1
- package/build/components/modal.mjs +64 -65
- package/build/components/notice.d.ts +2 -7
- package/build/components/notice.js +1 -1
- package/build/components/notice.mjs +16 -16
- package/build/components/notification.d.ts +2 -1
- package/build/components/notification.js +1 -1
- package/build/components/notification.mjs +9 -9
- package/build/components/popover-menu.d.ts +1 -0
- package/build/components/popover-menu.js +1 -1
- package/build/components/popover-menu.mjs +97 -96
- package/build/components/separator.js +1 -1
- package/build/components/separator.mjs +25 -25
- package/build/components/text-button.d.ts +2 -4
- package/build/components/text-button.js +1 -1
- package/build/components/text-button.mjs +26 -27
- package/build/components/text.d.ts +1 -1
- package/build/components/text.js +1 -1
- package/build/components/text.mjs +29 -30
- package/build/components/wrapper.d.ts +3 -6
- package/build/components/wrapper.js +1 -1
- package/build/components/wrapper.mjs +25 -23
- package/build/components.css +1 -1
- package/build/icons/icon.d.ts +2 -41
- package/build/icons/icon.js +1 -1
- package/build/icons/icon.mjs +71 -72
- package/build/index.js +1 -1
- package/build/index.mjs +188 -187
- package/package.json +1 -1
|
@@ -1,126 +1,127 @@
|
|
|
1
1
|
import { j as e } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { cx as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { buttonResetStyles as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Span as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { SkeletonInstance as
|
|
15
|
-
import
|
|
16
|
-
const
|
|
17
|
-
function
|
|
18
|
-
const [n, r] =
|
|
2
|
+
import { cx as C } from "@kuma-ui/core";
|
|
3
|
+
import { useMemo as h, useState as M, useCallback as v, useEffect as S, useRef as D } from "react";
|
|
4
|
+
import { buttonResetStyles as z } from "../theme.mjs";
|
|
5
|
+
import b from "../icons/icon.mjs";
|
|
6
|
+
import H, { PopoverContainer as T, usePopover as V, usePopoverContext as E } from "./popover.mjs";
|
|
7
|
+
import R from "./atom.mjs";
|
|
8
|
+
import { Span as F } from "./text.mjs";
|
|
9
|
+
import B, { normalBlendStyles as G } from "./hover-gradient.mjs";
|
|
10
|
+
import U from "./click-ripples.mjs";
|
|
11
|
+
import q from "./separator.mjs";
|
|
12
|
+
import J from "./decorators.mjs";
|
|
13
|
+
import N from "./spinner.mjs";
|
|
14
|
+
import { SkeletonInstance as O } from "./skeleton.mjs";
|
|
15
|
+
import Q from "./aria-text.mjs";
|
|
16
|
+
const w = /* @__PURE__ */ new Set();
|
|
17
|
+
function A() {
|
|
18
|
+
const [n, r] = M(!1), s = v((a) => {
|
|
19
19
|
r(a);
|
|
20
|
-
for (const t of
|
|
20
|
+
for (const t of w)
|
|
21
21
|
t(a);
|
|
22
22
|
}, []);
|
|
23
|
-
return
|
|
23
|
+
return S(() => {
|
|
24
24
|
const a = (t) => {
|
|
25
25
|
r(t);
|
|
26
26
|
};
|
|
27
|
-
return
|
|
28
|
-
|
|
27
|
+
return w.add(a), () => {
|
|
28
|
+
w.delete(a);
|
|
29
29
|
};
|
|
30
|
-
}, []),
|
|
30
|
+
}, []), h(() => ({
|
|
31
31
|
isKeyboardNavigating: n,
|
|
32
32
|
setIsKeyboardNavigating: s
|
|
33
33
|
}), [n, s]);
|
|
34
34
|
}
|
|
35
|
-
const
|
|
36
|
-
function
|
|
35
|
+
const de = "kakadu-components-949294122";
|
|
36
|
+
function W({
|
|
37
37
|
isLoading: n,
|
|
38
38
|
label: r,
|
|
39
39
|
iconLeft: s,
|
|
40
40
|
iconRight: a,
|
|
41
41
|
href: t,
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
target: p,
|
|
43
|
+
shouldCloseOnClick: k = !0,
|
|
44
|
+
decorators: c = [],
|
|
44
45
|
submenu: o,
|
|
45
|
-
className:
|
|
46
|
-
onClick:
|
|
47
|
-
...
|
|
46
|
+
className: d,
|
|
47
|
+
onClick: u,
|
|
48
|
+
...m
|
|
48
49
|
}) {
|
|
49
50
|
const {
|
|
50
|
-
isVisible:
|
|
51
|
-
isPreparingFocus:
|
|
51
|
+
isVisible: f,
|
|
52
|
+
isPreparingFocus: l,
|
|
52
53
|
isFocused: i,
|
|
53
|
-
close:
|
|
54
|
-
} =
|
|
54
|
+
close: j
|
|
55
|
+
} = E(), {
|
|
55
56
|
isKeyboardNavigating: x
|
|
56
|
-
} =
|
|
57
|
-
|
|
58
|
-
}, [i]),
|
|
59
|
-
!x && !
|
|
60
|
-
}, [x, i,
|
|
61
|
-
/* @__PURE__ */ e.jsx(
|
|
62
|
-
/* @__PURE__ */ e.jsx(
|
|
63
|
-
s ? /* @__PURE__ */ e.jsx(
|
|
64
|
-
/* @__PURE__ */ e.jsx(
|
|
65
|
-
a ? /* @__PURE__ */ e.jsx(
|
|
57
|
+
} = A(), y = D(!0), g = v(() => {
|
|
58
|
+
y.current = i;
|
|
59
|
+
}, [i]), I = v((K) => {
|
|
60
|
+
!x && !y.current || i && (u == null || u(K), o ? o.show() : k && (j == null || j()));
|
|
61
|
+
}, [x, i, u, o, k, j]), P = h(() => /* @__PURE__ */ e.jsxs(R, { as: t && !n ? "a" : "button", ...m, type: t && !n ? void 0 : "button", role: "menuitem", href: t, target: p, inert: !f && !l || n, disabled: t ? void 0 : !f && !l || n, className: C(z, "kakadu-components-1772835671", i && "kakadu-components-3160069815", x ? "kakadu-components-2254977234" : i && "kakadu-components-278139688", d), onClick: I, onPointerDownCapture: g, children: [
|
|
62
|
+
/* @__PURE__ */ e.jsx(F, { className: "kakadu-components-1109353535", children: n ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
63
|
+
/* @__PURE__ */ e.jsx(Q, { children: r }),
|
|
64
|
+
s ? /* @__PURE__ */ e.jsx(N, { size: 12 }) : null,
|
|
65
|
+
/* @__PURE__ */ e.jsx(O, { height: "1em", width: "100%" }),
|
|
66
|
+
a ? /* @__PURE__ */ e.jsx(N, { size: 12 }) : null
|
|
66
67
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
67
|
-
s ? /* @__PURE__ */ e.jsx(
|
|
68
|
+
s ? /* @__PURE__ */ e.jsx(b, { width: 12, height: 12, type: s }) : null,
|
|
68
69
|
/* @__PURE__ */ e.jsx("span", { className: "kakadu-components-4055589237", children: r }),
|
|
69
|
-
a ? /* @__PURE__ */ e.jsx(
|
|
70
|
+
a ? /* @__PURE__ */ e.jsx(b, { width: 12, height: 12, type: a }) : null
|
|
70
71
|
] }) }),
|
|
71
72
|
x || n ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
72
|
-
/* @__PURE__ */ e.jsx(
|
|
73
|
-
/* @__PURE__ */ e.jsx(
|
|
73
|
+
/* @__PURE__ */ e.jsx(U, { isActive: i, size: 100 }),
|
|
74
|
+
/* @__PURE__ */ e.jsx(B, { isActive: i, size: 150, className: G })
|
|
74
75
|
] })
|
|
75
|
-
] }), [t,
|
|
76
|
-
return /* @__PURE__ */ e.jsx(
|
|
76
|
+
] }), [t, p, n, m, f, l, x, d, I, g, s, r, a, i]);
|
|
77
|
+
return /* @__PURE__ */ e.jsx(J, { decorators: c, children: o ? /* @__PURE__ */ e.jsx(_, { menu: o.popoverMenu, className: "kakadu-components-1861176543", children: P }) : P });
|
|
77
78
|
}
|
|
78
|
-
function
|
|
79
|
+
function X(n) {
|
|
79
80
|
if ("type" in n) {
|
|
80
81
|
if (n.type === "separator")
|
|
81
|
-
return /* @__PURE__ */ e.jsx(
|
|
82
|
+
return /* @__PURE__ */ e.jsx(q, {});
|
|
82
83
|
if (n.type === "group")
|
|
83
|
-
return /* @__PURE__ */ e.jsx(
|
|
84
|
+
return /* @__PURE__ */ e.jsx(F, { className: "kakadu-components-1499037363", children: n.label });
|
|
84
85
|
}
|
|
85
|
-
return /* @__PURE__ */ e.jsx(
|
|
86
|
+
return /* @__PURE__ */ e.jsx(W, { ...n });
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
+
function Y({
|
|
88
89
|
items: n
|
|
89
90
|
}) {
|
|
90
91
|
const {
|
|
91
92
|
isFocused: r
|
|
92
|
-
} =
|
|
93
|
+
} = E(), [s, a] = M([]), {
|
|
93
94
|
setIsKeyboardNavigating: t
|
|
94
|
-
} =
|
|
95
|
-
|
|
96
|
-
}, []),
|
|
97
|
-
r && (
|
|
95
|
+
} = A(), p = v((c) => {
|
|
96
|
+
c && a((o) => o.includes(c) ? o : [...o, c]);
|
|
97
|
+
}, []), k = v((c) => {
|
|
98
|
+
r && (c.currentTarget.focus(), t(!1));
|
|
98
99
|
}, [r, t]);
|
|
99
|
-
return
|
|
100
|
+
return S(() => {
|
|
100
101
|
if (!r)
|
|
101
102
|
return;
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
if (
|
|
103
|
+
const c = (o) => {
|
|
104
|
+
const d = s.filter((i) => i.isConnected), u = d.length;
|
|
105
|
+
if (u === 0)
|
|
105
106
|
return;
|
|
106
|
-
let
|
|
107
|
+
let m;
|
|
107
108
|
const f = document.activeElement;
|
|
108
|
-
let
|
|
109
|
-
switch (
|
|
109
|
+
let l = f ? d.indexOf(f) : -1;
|
|
110
|
+
switch (l === -1 && (l = 0), o.key) {
|
|
110
111
|
case "ArrowDown": {
|
|
111
|
-
|
|
112
|
+
m = (l + 1) % u;
|
|
112
113
|
break;
|
|
113
114
|
}
|
|
114
115
|
case "ArrowUp": {
|
|
115
|
-
|
|
116
|
+
m = (l - 1 + u) % u;
|
|
116
117
|
break;
|
|
117
118
|
}
|
|
118
119
|
case "Home": {
|
|
119
|
-
|
|
120
|
+
m = 0;
|
|
120
121
|
break;
|
|
121
122
|
}
|
|
122
123
|
case "End": {
|
|
123
|
-
|
|
124
|
+
m = u - 1;
|
|
124
125
|
break;
|
|
125
126
|
}
|
|
126
127
|
case "Tab": {
|
|
@@ -128,63 +129,63 @@ function X({
|
|
|
128
129
|
return;
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
|
-
if (
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
|
|
132
|
+
if (m !== void 0) {
|
|
133
|
+
o.preventDefault(), o.stopPropagation();
|
|
134
|
+
const i = d[m];
|
|
135
|
+
i && (i.focus(), t(!0));
|
|
135
136
|
}
|
|
136
137
|
};
|
|
137
|
-
return window.addEventListener("keydown",
|
|
138
|
+
return window.addEventListener("keydown", c, {
|
|
138
139
|
capture: !0
|
|
139
140
|
}), () => {
|
|
140
|
-
window.removeEventListener("keydown",
|
|
141
|
+
window.removeEventListener("keydown", c, {
|
|
141
142
|
capture: !0
|
|
142
143
|
});
|
|
143
144
|
};
|
|
144
|
-
}, [r, s, t]), /* @__PURE__ */ e.jsx(e.Fragment, { children: n.map((
|
|
145
|
-
|
|
145
|
+
}, [r, s, t]), /* @__PURE__ */ e.jsx(e.Fragment, { children: n.map((c, o) => /* @__PURE__ */ e.jsx(
|
|
146
|
+
X,
|
|
146
147
|
{
|
|
147
|
-
...
|
|
148
|
-
reference:
|
|
149
|
-
onMouseEnter:
|
|
148
|
+
...c,
|
|
149
|
+
reference: p,
|
|
150
|
+
onMouseEnter: k
|
|
150
151
|
},
|
|
151
|
-
|
|
152
|
+
o
|
|
152
153
|
)) });
|
|
153
154
|
}
|
|
154
|
-
function
|
|
155
|
+
function Z({
|
|
155
156
|
items: n,
|
|
156
157
|
...r
|
|
157
158
|
}) {
|
|
158
|
-
return /* @__PURE__ */ e.jsx(
|
|
159
|
+
return /* @__PURE__ */ e.jsx(H, { ...r, as: "nav", role: "menu", innerClassName: "kakadu-components-3600436535", children: /* @__PURE__ */ e.jsx(Y, { items: n }) });
|
|
159
160
|
}
|
|
160
|
-
function
|
|
161
|
-
const r =
|
|
161
|
+
function fe(n) {
|
|
162
|
+
const r = h(() => ({
|
|
162
163
|
items: n
|
|
163
164
|
}), [n]), {
|
|
164
165
|
isVisible: s,
|
|
165
166
|
show: a,
|
|
166
167
|
close: t,
|
|
167
|
-
popover:
|
|
168
|
-
} =
|
|
169
|
-
return
|
|
168
|
+
popover: p
|
|
169
|
+
} = V(Z, r);
|
|
170
|
+
return h(() => ({
|
|
170
171
|
isVisible: s,
|
|
171
172
|
show: a,
|
|
172
173
|
close: t,
|
|
173
|
-
popoverMenu:
|
|
174
|
-
}), [s, a, t,
|
|
174
|
+
popoverMenu: p
|
|
175
|
+
}), [s, a, t, p]);
|
|
175
176
|
}
|
|
176
|
-
function
|
|
177
|
+
function _({
|
|
177
178
|
menu: n,
|
|
178
179
|
className: r,
|
|
179
180
|
children: s
|
|
180
181
|
}) {
|
|
181
|
-
return /* @__PURE__ */ e.jsxs(
|
|
182
|
+
return /* @__PURE__ */ e.jsxs(T, { className: r, children: [
|
|
182
183
|
s,
|
|
183
184
|
n
|
|
184
185
|
] });
|
|
185
186
|
}
|
|
186
187
|
export {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
de as dangerPopoverMenuItemStyles,
|
|
189
|
+
_ as default,
|
|
190
|
+
fe as usePopoverMenu
|
|
190
191
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../jsx-runtime-BB_1_6y_.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../jsx-runtime-BB_1_6y_.js"),s=require("@kuma-ui/core"),o=require("./flex.js"),u=require("./text.js");function a({className:e,...t}){return r.jsxRuntimeExports.jsx("hr",{...t,className:s.cx("kakadu-components-175326694",e)})}function c({className:e,...t}){return r.jsxRuntimeExports.jsx("hr",{...t,className:s.cx("kakadu-components-3380219127",e)})}function x({label:e,className:t,...n}){return r.jsxRuntimeExports.jsxs(o.default,{gap:2,direction:"row",preset:"center",className:s.cx("kakadu-components-1250376591",t),children:[r.jsxRuntimeExports.jsx(a,{...n}),r.jsxRuntimeExports.jsx(u.Label,{children:e}),r.jsxRuntimeExports.jsx(a,{...n})]})}function i({className:e,...t}){return r.jsxRuntimeExports.jsx("hr",{...t,className:s.cx("kakadu-components-2653569622",e)})}exports.SeparatorLabel=x;exports.SmallSeparator=c;exports.VerticalSeparator=i;exports.default=a;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { j as e } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
|
-
import { cx as
|
|
3
|
-
import s
|
|
2
|
+
import { cx as o } from "@kuma-ui/core";
|
|
3
|
+
import s from "./flex.mjs";
|
|
4
4
|
import { Label as c } from "./text.mjs";
|
|
5
|
-
function
|
|
6
|
-
className:
|
|
7
|
-
...
|
|
5
|
+
function n({
|
|
6
|
+
className: r,
|
|
7
|
+
...a
|
|
8
8
|
}) {
|
|
9
|
-
return /* @__PURE__ */ e.jsx("hr", { ...
|
|
9
|
+
return /* @__PURE__ */ e.jsx("hr", { ...a, className: o("kakadu-components-175326694", r) });
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
className:
|
|
13
|
-
...
|
|
11
|
+
function l({
|
|
12
|
+
className: r,
|
|
13
|
+
...a
|
|
14
14
|
}) {
|
|
15
|
-
return /* @__PURE__ */ e.jsx("hr", { ...
|
|
15
|
+
return /* @__PURE__ */ e.jsx("hr", { ...a, className: o("kakadu-components-3380219127", r) });
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
label:
|
|
19
|
-
className:
|
|
17
|
+
function x({
|
|
18
|
+
label: r,
|
|
19
|
+
className: a,
|
|
20
20
|
...t
|
|
21
21
|
}) {
|
|
22
|
-
return /* @__PURE__ */ e.jsxs(s, { gap: 2, direction: "row",
|
|
23
|
-
/* @__PURE__ */ e.jsx(
|
|
24
|
-
/* @__PURE__ */ e.jsx(c, { children:
|
|
25
|
-
/* @__PURE__ */ e.jsx(
|
|
22
|
+
return /* @__PURE__ */ e.jsxs(s, { gap: 2, direction: "row", preset: "center", className: o("kakadu-components-1250376591", a), children: [
|
|
23
|
+
/* @__PURE__ */ e.jsx(n, { ...t }),
|
|
24
|
+
/* @__PURE__ */ e.jsx(c, { children: r }),
|
|
25
|
+
/* @__PURE__ */ e.jsx(n, { ...t })
|
|
26
26
|
] });
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
className:
|
|
30
|
-
...
|
|
28
|
+
function f({
|
|
29
|
+
className: r,
|
|
30
|
+
...a
|
|
31
31
|
}) {
|
|
32
|
-
return /* @__PURE__ */ e.jsx("hr", { ...
|
|
32
|
+
return /* @__PURE__ */ e.jsx("hr", { ...a, className: o("kakadu-components-2653569622", r) });
|
|
33
33
|
}
|
|
34
34
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
x as SeparatorLabel,
|
|
36
|
+
l as SmallSeparator,
|
|
37
|
+
f as VerticalSeparator,
|
|
38
|
+
n as default
|
|
39
39
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { type HTMLProps, type ReactNode } from 'react';
|
|
2
2
|
import { type ButtonTooltipPosition } from './button-tooltip';
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
delete = "delete"
|
|
6
|
-
}
|
|
3
|
+
export declare const textButtonVariants: readonly ["primary", "delete"];
|
|
4
|
+
export type TextButtonVariant = (typeof textButtonVariants)[number];
|
|
7
5
|
type BaseTextButtonProperties = Omit<HTMLProps<HTMLButtonElement>, 'children'> & {
|
|
8
6
|
readonly iconLeft?: ReactNode;
|
|
9
7
|
readonly iconRight?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),a=require("@kuma-ui/core"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../jsx-runtime-BB_1_6y_.js"),a=require("@kuma-ui/core"),c=require("../icons/icon.js"),q=require("./flex.js"),_=require("./text.js"),h=require("./click-ripples.js"),l=require("./hover-gradient.js"),f=require("./button-tooltip.js"),b=require("./aria-text.js"),N=require("./atom.js"),g=require("./skeleton.js"),w=["primary","delete"],S="kakadu-components-4017654514";function T({iconLeft:n,iconRight:o,variant:m="primary",tooltip:x,tooltipPosition:d,href:i,target:p,rel:j,disabled:k,hasUnderline:E=!0,isSkeleton:u,isSkeletonAnimated:v=!0,className:R,children:t,label:y,...B}){const r=!!k||!!u,s=i&&!u;return e.jsxRuntimeExports.jsxs("div",{className:a.cx("kakadu-components-989891841",t&&(n||o)?a.cx(!!n&&"kakadu-components-497190725",!!o&&"kakadu-components-3729381008"):"kakadu-components-3866032606"),children:[e.jsxRuntimeExports.jsxs(N.default,{...B,as:s?"a":"button",type:s?void 0:"button",href:s?i:void 0,target:s?p:void 0,rel:s?j:void 0,disabled:s?void 0:r,inert:s?r:void 0,className:a.cx(_.textShadowStyles,"kakadu-components-2081390622",m==="delete"&&S,u&&"kakadu-components-2662775151",R),children:[e.jsxRuntimeExports.jsxs(q.default,{direction:"row",gap:.5,preset:"center",children:[n?e.jsxRuntimeExports.jsx("div",{className:a.cx("kakadu-components-743909038",t?"kakadu-components-1285017646":"kakadu-components-1475172827"),children:typeof n=="string"?e.jsxRuntimeExports.jsx(c.default,{width:14,height:14,type:n}):n}):null,t?e.jsxRuntimeExports.jsx("span",{className:a.cx("kakadu-components-743909038",E&&"kakadu-components-2703794515"),children:t}):e.jsxRuntimeExports.jsx(b.default,{children:y}),o?e.jsxRuntimeExports.jsx("div",{className:a.cx("kakadu-components-743909038",t?"kakadu-components-2421728947":"kakadu-components-1475172827"),children:typeof o=="string"?e.jsxRuntimeExports.jsx(c.default,{width:14,height:14,type:o}):o}):null]}),e.jsxRuntimeExports.jsxs("span",{className:"kakadu-components-1970948853",children:[r?null:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(h.default,{size:t?void 0:50}),e.jsxRuntimeExports.jsx(l.default,{size:t?void 0:50,className:l.normalBlendStyles})]}),x?e.jsxRuntimeExports.jsx(f.default,{label:x,position:d}):null]})]}),u?e.jsxRuntimeExports.jsx("div",{className:"kakadu-components-1970948853",children:e.jsxRuntimeExports.jsx(g.SkeletonInstance,{width:"100%",height:"100%",isAnimated:v})}):null]})}exports.default=T;exports.textButtonVariants=w;
|
|
@@ -1,54 +1,53 @@
|
|
|
1
1
|
import { j as o } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
2
|
import { cx as n } from "@kuma-ui/core";
|
|
3
3
|
import p from "../icons/icon.mjs";
|
|
4
|
-
import h
|
|
5
|
-
import { textShadowStyles as
|
|
6
|
-
import
|
|
4
|
+
import h from "./flex.mjs";
|
|
5
|
+
import { textShadowStyles as N } from "./text.mjs";
|
|
6
|
+
import b from "./click-ripples.mjs";
|
|
7
7
|
import w, { normalBlendStyles as A } from "./hover-gradient.mjs";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { SkeletonInstance as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function U({
|
|
8
|
+
import g from "./button-tooltip.mjs";
|
|
9
|
+
import T from "./aria-text.mjs";
|
|
10
|
+
import z from "./atom.mjs";
|
|
11
|
+
import { SkeletonInstance as C } from "./skeleton.mjs";
|
|
12
|
+
const O = ["primary", "delete"], D = "kakadu-components-4017654514";
|
|
13
|
+
function P({
|
|
15
14
|
iconLeft: e,
|
|
16
|
-
iconRight:
|
|
15
|
+
iconRight: s,
|
|
17
16
|
variant: i = "primary",
|
|
18
|
-
tooltip:
|
|
17
|
+
tooltip: d,
|
|
19
18
|
tooltipPosition: u,
|
|
20
|
-
href:
|
|
19
|
+
href: l,
|
|
21
20
|
target: k,
|
|
22
21
|
rel: c,
|
|
23
22
|
disabled: x,
|
|
24
23
|
hasUnderline: j = !0,
|
|
25
24
|
isSkeleton: m,
|
|
26
25
|
isSkeletonAnimated: v = !0,
|
|
27
|
-
className:
|
|
26
|
+
className: B,
|
|
28
27
|
children: a,
|
|
29
|
-
label:
|
|
30
|
-
...
|
|
28
|
+
label: y,
|
|
29
|
+
...f
|
|
31
30
|
}) {
|
|
32
|
-
const r = !!x || !!m,
|
|
33
|
-
return /* @__PURE__ */ o.jsxs("div", { className: n("kakadu-components-989891841", a && (e ||
|
|
34
|
-
/* @__PURE__ */ o.jsxs(
|
|
35
|
-
/* @__PURE__ */ o.jsxs(h, { direction: "row", gap: 0.5,
|
|
31
|
+
const r = !!x || !!m, t = l && !m;
|
|
32
|
+
return /* @__PURE__ */ o.jsxs("div", { className: n("kakadu-components-989891841", a && (e || s) ? n(!!e && "kakadu-components-497190725", !!s && "kakadu-components-3729381008") : "kakadu-components-3866032606"), children: [
|
|
33
|
+
/* @__PURE__ */ o.jsxs(z, { ...f, as: t ? "a" : "button", type: t ? void 0 : "button", href: t ? l : void 0, target: t ? k : void 0, rel: t ? c : void 0, disabled: t ? void 0 : r, inert: t ? r : void 0, className: n(N, "kakadu-components-2081390622", i === "delete" && D, m && "kakadu-components-2662775151", B), children: [
|
|
34
|
+
/* @__PURE__ */ o.jsxs(h, { direction: "row", gap: 0.5, preset: "center", children: [
|
|
36
35
|
e ? /* @__PURE__ */ o.jsx("div", { className: n("kakadu-components-743909038", a ? "kakadu-components-1285017646" : "kakadu-components-1475172827"), children: typeof e == "string" ? /* @__PURE__ */ o.jsx(p, { width: 14, height: 14, type: e }) : e }) : null,
|
|
37
|
-
a ? /* @__PURE__ */ o.jsx("span", { className: n("kakadu-components-743909038", j && "kakadu-components-2703794515"), children: a }) : /* @__PURE__ */ o.jsx(
|
|
38
|
-
|
|
36
|
+
a ? /* @__PURE__ */ o.jsx("span", { className: n("kakadu-components-743909038", j && "kakadu-components-2703794515"), children: a }) : /* @__PURE__ */ o.jsx(T, { children: y }),
|
|
37
|
+
s ? /* @__PURE__ */ o.jsx("div", { className: n("kakadu-components-743909038", a ? "kakadu-components-2421728947" : "kakadu-components-1475172827"), children: typeof s == "string" ? /* @__PURE__ */ o.jsx(p, { width: 14, height: 14, type: s }) : s }) : null
|
|
39
38
|
] }),
|
|
40
39
|
/* @__PURE__ */ o.jsxs("span", { className: "kakadu-components-1970948853", children: [
|
|
41
40
|
r ? null : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
42
|
-
/* @__PURE__ */ o.jsx(
|
|
41
|
+
/* @__PURE__ */ o.jsx(b, { size: a ? void 0 : 50 }),
|
|
43
42
|
/* @__PURE__ */ o.jsx(w, { size: a ? void 0 : 50, className: A })
|
|
44
43
|
] }),
|
|
45
|
-
|
|
44
|
+
d ? /* @__PURE__ */ o.jsx(g, { label: d, position: u }) : null
|
|
46
45
|
] })
|
|
47
46
|
] }),
|
|
48
|
-
m ? /* @__PURE__ */ o.jsx("div", { className: "kakadu-components-1970948853", children: /* @__PURE__ */ o.jsx(
|
|
47
|
+
m ? /* @__PURE__ */ o.jsx("div", { className: "kakadu-components-1970948853", children: /* @__PURE__ */ o.jsx(C, { width: "100%", height: "100%", isAnimated: v }) }) : null
|
|
49
48
|
] });
|
|
50
49
|
}
|
|
51
50
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
P as default,
|
|
52
|
+
O as textButtonVariants
|
|
54
53
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AtomElementType, type AtomProperties } from './atom';
|
|
2
|
-
import { WrapperWidth } from './wrapper';
|
|
2
|
+
import { type WrapperWidth } from './wrapper';
|
|
3
3
|
export declare const textShadowStyles: string;
|
|
4
4
|
export type DefaultHeadingElementType = 'h1';
|
|
5
5
|
export declare const defaultHeadingElementType = "h1";
|
package/build/components/text.js
CHANGED
|
@@ -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 s=require("../jsx-runtime-BB_1_6y_.js"),a=require("@kuma-ui/core"),j=require("../theme.js"),c=require("./atom.js"),u="kakadu-components-1538322784",x="kakadu-components-739732526",m="h1";function l({reference:t,as:e,className:n,...o}){return s.jsxRuntimeExports.jsx(c.default,{reference:t,as:e??m,...o,className:a.cx(j.overflowProtectionStyles,u,"kakadu-components-1669332734",x,n)})}function f({as:t,id:e,children:n,className:o,...k}){return s.jsxRuntimeExports.jsx(l,{as:t??"h1",id:e,...k,className:a.cx(o),children:s.jsxRuntimeExports.jsx("a",{href:`#${e}`,className:"kakadu-components-1038708690",children:n})})}const r=a.cx("kakadu-components-1923397960",u,x);function p({as:t,className:e,...n}){return s.jsxRuntimeExports.jsx(c.default,{as:t??"span",...n,className:a.cx(r,e)})}function i({as:t,className:e,...n}){return s.jsxRuntimeExports.jsx(c.default,{as:t??"p",...n,className:a.cx(r,"kakadu-components-621160204",e)})}function S({as:t,className:e,...n}){return s.jsxRuntimeExports.jsx(i,{as:t??"small",...n,className:a.cx("kakadu-components-1696055534",e)})}function g({as:t,className:e,...n}){return s.jsxRuntimeExports.jsx(p,{as:t??"span",...n,className:a.cx("kakadu-components-1329768068",e)})}function d({as:t,width:e="text",className:n,...o}){return s.jsxRuntimeExports.jsx(c.default,{as:t??"div",...o,className:a.cx("kakadu-components-3565378821",e==="page"&&"kakadu-components-2433581593",e==="text"&&"kakadu-components-958855245",e==="content"&&"kakadu-components-797764377",n)})}function E(t){const{className:e}=t;return s.jsxRuntimeExports.jsx(d,{...t,className:a.cx("kakadu-components-323682454",e)})}exports.AnchorHeading=f;exports.Footnote=S;exports.Heading=l;exports.Hero=E;exports.Label=g;exports.Paragraph=i;exports.Span=p;exports.default=d;exports.defaultHeadingElementType=m;exports.spanStyles=r;exports.textShadowStyles=u;
|
|
@@ -1,79 +1,78 @@
|
|
|
1
1
|
import { j as t } from "../jsx-runtime-B4hRZ52C.mjs";
|
|
2
2
|
import { cx as o } from "@kuma-ui/core";
|
|
3
|
-
import { overflowProtectionStyles as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function i({
|
|
3
|
+
import { overflowProtectionStyles as p } from "../theme.mjs";
|
|
4
|
+
import c from "./atom.mjs";
|
|
5
|
+
const m = "kakadu-components-1538322784", r = "kakadu-components-739732526", l = "h1";
|
|
6
|
+
function d({
|
|
8
7
|
reference: n,
|
|
9
8
|
as: a,
|
|
10
9
|
className: s,
|
|
11
10
|
...e
|
|
12
11
|
}) {
|
|
13
|
-
return /* @__PURE__ */ t.jsx(
|
|
12
|
+
return /* @__PURE__ */ t.jsx(c, { reference: n, as: a ?? l, ...e, className: o(p, m, "kakadu-components-1669332734", r, s) });
|
|
14
13
|
}
|
|
15
|
-
function
|
|
14
|
+
function g({
|
|
16
15
|
as: n,
|
|
17
16
|
id: a,
|
|
18
17
|
children: s,
|
|
19
18
|
className: e,
|
|
20
19
|
...k
|
|
21
20
|
}) {
|
|
22
|
-
return /* @__PURE__ */ t.jsx(
|
|
21
|
+
return /* @__PURE__ */ t.jsx(d, { as: n ?? "h1", id: a, ...k, className: o(e), children: /* @__PURE__ */ t.jsx("a", { href: `#${a}`, className: "kakadu-components-1038708690", children: s }) });
|
|
23
22
|
}
|
|
24
|
-
const
|
|
23
|
+
const u = o("kakadu-components-1923397960", m, r);
|
|
25
24
|
function x({
|
|
26
25
|
as: n,
|
|
27
26
|
className: a,
|
|
28
27
|
...s
|
|
29
28
|
}) {
|
|
30
|
-
return /* @__PURE__ */ t.jsx(
|
|
29
|
+
return /* @__PURE__ */ t.jsx(c, { as: n ?? "span", ...s, className: o(u, a) });
|
|
31
30
|
}
|
|
32
|
-
function
|
|
31
|
+
function i({
|
|
33
32
|
as: n,
|
|
34
33
|
className: a,
|
|
35
34
|
...s
|
|
36
35
|
}) {
|
|
37
|
-
return /* @__PURE__ */ t.jsx(
|
|
36
|
+
return /* @__PURE__ */ t.jsx(c, { as: n ?? "p", ...s, className: o(u, "kakadu-components-621160204", a) });
|
|
38
37
|
}
|
|
39
|
-
function
|
|
38
|
+
function y({
|
|
40
39
|
as: n,
|
|
41
40
|
className: a,
|
|
42
41
|
...s
|
|
43
42
|
}) {
|
|
44
|
-
return /* @__PURE__ */ t.jsx(
|
|
43
|
+
return /* @__PURE__ */ t.jsx(i, { as: n ?? "small", ...s, className: o("kakadu-components-1696055534", a) });
|
|
45
44
|
}
|
|
46
|
-
function
|
|
45
|
+
function H({
|
|
47
46
|
as: n,
|
|
48
47
|
className: a,
|
|
49
48
|
...s
|
|
50
49
|
}) {
|
|
51
50
|
return /* @__PURE__ */ t.jsx(x, { as: n ?? "span", ...s, className: o("kakadu-components-1329768068", a) });
|
|
52
51
|
}
|
|
53
|
-
function
|
|
52
|
+
function f({
|
|
54
53
|
as: n,
|
|
55
|
-
width: a =
|
|
54
|
+
width: a = "text",
|
|
56
55
|
className: s,
|
|
57
56
|
...e
|
|
58
57
|
}) {
|
|
59
|
-
return /* @__PURE__ */ t.jsx(
|
|
58
|
+
return /* @__PURE__ */ t.jsx(c, { as: n ?? "div", ...e, className: o("kakadu-components-3565378821", a === "page" && "kakadu-components-2433581593", a === "text" && "kakadu-components-958855245", a === "content" && "kakadu-components-797764377", s) });
|
|
60
59
|
}
|
|
61
|
-
function
|
|
60
|
+
function v(n) {
|
|
62
61
|
const {
|
|
63
62
|
className: a
|
|
64
63
|
} = n;
|
|
65
|
-
return /* @__PURE__ */ t.jsx(
|
|
64
|
+
return /* @__PURE__ */ t.jsx(f, { ...n, className: o("kakadu-components-323682454", a) });
|
|
66
65
|
}
|
|
67
66
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
g as AnchorHeading,
|
|
68
|
+
y as Footnote,
|
|
69
|
+
d as Heading,
|
|
70
|
+
v as Hero,
|
|
71
|
+
H as Label,
|
|
72
|
+
i as Paragraph,
|
|
74
73
|
x as Span,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
f as default,
|
|
75
|
+
l as defaultHeadingElementType,
|
|
76
|
+
u as spanStyles,
|
|
77
|
+
m as textShadowStyles
|
|
79
78
|
};
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type AtomElementType, type DefaultAtomElementType } from './atom';
|
|
3
3
|
import { type FlexProperties } from './flex';
|
|
4
|
-
export declare
|
|
5
|
-
|
|
6
|
-
'text' = "text",
|
|
7
|
-
'content' = "content"
|
|
8
|
-
}
|
|
4
|
+
export declare const wrapperWidths: readonly ["page", "text", "content"];
|
|
5
|
+
export type WrapperWidth = (typeof wrapperWidths)[number];
|
|
9
6
|
export type WrapperProperties<Type extends AtomElementType = DefaultAtomElementType> = FlexProperties<Type> & {
|
|
10
7
|
readonly width?: WrapperWidth;
|
|
11
8
|
readonly innerClassName?: string;
|
|
12
9
|
readonly outerChildrenBefore?: ReactNode;
|
|
13
10
|
readonly outerChildrenAfter?: ReactNode;
|
|
14
11
|
};
|
|
15
|
-
export default function Wrapper<Type extends AtomElementType = DefaultAtomElementType>({ as, gap, direction, alignment, wrap, width, className, innerClassName, children, outerChildrenBefore, outerChildrenAfter, ...properties }: WrapperProperties<Type>): import("react/jsx-runtime").JSX.Element;
|
|
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>): import("react/jsx-runtime").JSX.Element;
|