@ledgerhq/lumen-ui-react 0.1.36 → 0.1.37
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/dist/lib/Components/AmountInput/AmountInput.d.ts +1 -1
- package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
- package/dist/lib/Components/AmountInput/AmountInput.js +127 -77
- package/dist/lib/Components/AmountInput/types.d.ts +12 -0
- package/dist/lib/Components/AmountInput/types.d.ts.map +1 -1
- package/dist/lib/Components/Avatar/Avatar.d.ts +1 -1
- package/dist/lib/Components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/lib/Components/Avatar/Avatar.js +47 -60
- package/dist/lib/Components/Button/BaseButton.d.ts +2 -2
- package/dist/lib/Components/Button/Button.js +10 -10
- package/dist/lib/Components/Card/Card.js +12 -12
- package/dist/lib/Components/DataTable/DataTable.js +2 -2
- package/dist/lib/Components/Divider/Divider.js +4 -4
- package/dist/lib/Components/DotCount/DotCount.js +4 -4
- package/dist/lib/Components/DotIcon/DotIcon.d.ts +2 -1
- package/dist/lib/Components/DotIcon/DotIcon.d.ts.map +1 -1
- package/dist/lib/Components/DotIcon/DotIcon.js +24 -20
- package/dist/lib/Components/DotIcon/types.d.ts +1 -1
- package/dist/lib/Components/DotIcon/types.d.ts.map +1 -1
- package/dist/lib/Components/DotIndicator/DotIndicator.js +14 -14
- package/dist/lib/Components/DotIndicator/types.d.ts +2 -2
- package/dist/lib/Components/DotSymbol/DotSymbol.d.ts.map +1 -1
- package/dist/lib/Components/DotSymbol/DotSymbol.js +11 -7
- package/dist/lib/Components/DotSymbol/types.d.ts +1 -1
- package/dist/lib/Components/DotSymbol/types.d.ts.map +1 -1
- package/dist/lib/Components/Icon/Icon.js +4 -4
- package/dist/lib/Components/Icon/createIcon.js +4 -4
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +4 -4
- package/dist/lib/Components/Link/Link.js +6 -6
- package/dist/lib/Components/ListItem/ListItem.js +3 -3
- package/dist/lib/Components/MediaButton/MediaButton.js +10 -10
- package/dist/lib/Components/MediaImage/MediaImage.d.ts.map +1 -1
- package/dist/lib/Components/MediaImage/MediaImage.js +8 -6
- package/dist/lib/Components/MediaImage/types.d.ts +1 -1
- package/dist/lib/Components/MediaImage/types.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/NavBar.js +27 -27
- package/dist/lib/Components/Popover/Popover.js +6 -6
- package/dist/lib/Components/SideBar/SideBar.js +9 -9
- package/dist/lib/Components/Skeleton/Skeleton.js +4 -4
- package/dist/lib/Components/Table/Table.js +1 -1
- package/dist/lib/Components/Table/utils/useThrottledScrollBottom.js +3 -3
- package/dist/lib/Symbols/Icons/Lightbulb.js +3 -3
- package/dist/libs/utils-shared/dist/index.js +107 -107
- package/dist/package.json +3 -3
- package/package.json +3 -3
|
@@ -60,7 +60,7 @@ const [b, y] = l("Popover"), C = v(
|
|
|
60
60
|
handle: n,
|
|
61
61
|
children: i
|
|
62
62
|
}
|
|
63
|
-
) }),
|
|
63
|
+
) }), O = ({
|
|
64
64
|
handle: o,
|
|
65
65
|
payload: a,
|
|
66
66
|
render: r,
|
|
@@ -76,7 +76,7 @@ const [b, y] = l("Popover"), C = v(
|
|
|
76
76
|
className: p("data-popup-open:z-menu", e),
|
|
77
77
|
...n
|
|
78
78
|
}
|
|
79
|
-
),
|
|
79
|
+
), V = ({
|
|
80
80
|
side: o = "bottom",
|
|
81
81
|
sideOffset: a = 8,
|
|
82
82
|
align: r = "start",
|
|
@@ -117,10 +117,10 @@ const [b, y] = l("Popover"), C = v(
|
|
|
117
117
|
}
|
|
118
118
|
)
|
|
119
119
|
] });
|
|
120
|
-
},
|
|
120
|
+
}, A = c;
|
|
121
121
|
export {
|
|
122
122
|
B as Popover,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
V as PopoverContent,
|
|
124
|
+
O as PopoverTrigger,
|
|
125
|
+
A as createPopoverHandle
|
|
126
126
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as e, jsxs as C, Fragment as
|
|
2
|
-
import { createSafeContext as
|
|
1
|
+
import { jsx as e, jsxs as C, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { createSafeContext as R, cn as m, useDisabledContext as V } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { cva as h } from "class-variance-authority";
|
|
4
4
|
import { useCallback as B } from "react";
|
|
5
5
|
import { Tooltip as S, TooltipTrigger as N, TooltipContent as T } from "../Tooltip/Tooltip.js";
|
|
6
6
|
import { useCommonTranslation as A } from "../../../i18n/useCommonTranslation.js";
|
|
7
7
|
import { useControllableState as x } from "../../../utils/useControllableState/useControllableState.js";
|
|
8
|
-
import { ExpandRight as
|
|
8
|
+
import { ExpandRight as q } from "../../Symbols/Icons/ExpandRight.js";
|
|
9
9
|
import { ExpandLeft as E } from "../../Symbols/Icons/ExpandLeft.js";
|
|
10
|
-
const [O, w] =
|
|
10
|
+
const [O, w] = R("SideBar"), f = {
|
|
11
11
|
root: h(
|
|
12
12
|
[
|
|
13
13
|
"flex h-full flex-col justify-between gap-16 overflow-y-auto rounded-xl bg-surface-transparent p-16",
|
|
@@ -125,18 +125,18 @@ const [O, w] = V("SideBar"), f = {
|
|
|
125
125
|
onClick: i,
|
|
126
126
|
...p
|
|
127
127
|
}) => {
|
|
128
|
-
const l =
|
|
128
|
+
const l = V({
|
|
129
129
|
consumerName: "SideBarItem",
|
|
130
130
|
mergeWith: { disabled: c }
|
|
131
131
|
}), { collapsed: b, active: g, onActiveChange: v } = w({
|
|
132
132
|
consumerName: "SideBarItem",
|
|
133
133
|
contextRequired: !0
|
|
134
134
|
}), u = g === t, y = u ? a : s, I = r ?? o, L = B(
|
|
135
|
-
(
|
|
136
|
-
l || (i?.(
|
|
135
|
+
(z) => {
|
|
136
|
+
l || (i?.(z), v?.(t));
|
|
137
137
|
},
|
|
138
138
|
[l, i, v, t]
|
|
139
|
-
), j = /* @__PURE__ */ C(
|
|
139
|
+
), j = /* @__PURE__ */ C(P, { children: [
|
|
140
140
|
/* @__PURE__ */ e(y, { size: 20 }),
|
|
141
141
|
o != null && /* @__PURE__ */ e("span", { className: "translate-x-8 truncate", children: o })
|
|
142
142
|
] }), k = /* @__PURE__ */ e(
|
|
@@ -169,7 +169,7 @@ const [O, w] = V("SideBar"), f = {
|
|
|
169
169
|
contextRequired: !0
|
|
170
170
|
}), c = B(() => {
|
|
171
171
|
r(!o);
|
|
172
|
-
}, [o, r]), d = o ?
|
|
172
|
+
}, [o, r]), d = o ? q : E, i = /* @__PURE__ */ e(
|
|
173
173
|
"button",
|
|
174
174
|
{
|
|
175
175
|
type: "button",
|
|
@@ -63,14 +63,14 @@ const l = ({ className: a, ref: s, ...t }) => /* @__PURE__ */ e(
|
|
|
63
63
|
] })
|
|
64
64
|
]
|
|
65
65
|
}
|
|
66
|
-
),
|
|
66
|
+
), i = {
|
|
67
67
|
"list-item": o,
|
|
68
68
|
tile: m,
|
|
69
69
|
table: u
|
|
70
70
|
}, N = ({ className: a, component: s, ref: t, ...d }) => {
|
|
71
|
-
if (s &&
|
|
72
|
-
const
|
|
73
|
-
return /* @__PURE__ */ e(
|
|
71
|
+
if (s && i[s]) {
|
|
72
|
+
const r = i[s];
|
|
73
|
+
return /* @__PURE__ */ e(r, { ...d, ref: t, className: a });
|
|
74
74
|
}
|
|
75
75
|
return /* @__PURE__ */ e(
|
|
76
76
|
l,
|
|
@@ -192,7 +192,7 @@ const [H, m] = N("Table"), I = o(
|
|
|
192
192
|
className: A({ align: e, className: a }),
|
|
193
193
|
...i,
|
|
194
194
|
children: [
|
|
195
|
-
/* @__PURE__ */ r("div", { className: "shrink-0", children: t }),
|
|
195
|
+
t && /* @__PURE__ */ r("div", { className: "shrink-0", children: t }),
|
|
196
196
|
/* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col gap-4", children: [
|
|
197
197
|
/* @__PURE__ */ r("div", { className: "shrink-0 body-2 text-base", children: n }),
|
|
198
198
|
/* @__PURE__ */ r("div", { className: "truncate body-3 text-muted", children: l })
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { throttle as h } from "../../../../libs/utils-shared/dist/index.js";
|
|
2
2
|
import { useMemo as L, useRef as s, useEffect as _ } from "react";
|
|
3
|
-
import { TABLE_SCROLL_BOTTOM_THRESHOLD_IN_ROW as
|
|
3
|
+
import { TABLE_SCROLL_BOTTOM_THRESHOLD_IN_ROW as R, TABLE_CELL_HEIGHT as a } from "../constants.js";
|
|
4
4
|
const m = 150, E = ({
|
|
5
5
|
element: t,
|
|
6
6
|
threshold: r = 10
|
|
@@ -10,10 +10,10 @@ const m = 150, E = ({
|
|
|
10
10
|
}, p = ({
|
|
11
11
|
onScrollBottom: t,
|
|
12
12
|
loading: r = !1,
|
|
13
|
-
thresholdInRow: c =
|
|
13
|
+
thresholdInRow: c = R
|
|
14
14
|
}) => {
|
|
15
15
|
const n = L(
|
|
16
|
-
() => c *
|
|
16
|
+
() => c * a,
|
|
17
17
|
[c]
|
|
18
18
|
), e = s(t), u = s(r);
|
|
19
19
|
e.current = t, u.current = r;
|
|
@@ -9,15 +9,15 @@ const i = r(
|
|
|
9
9
|
width: "1em",
|
|
10
10
|
height: "1em",
|
|
11
11
|
fill: "currentColor",
|
|
12
|
-
viewBox: "0 0
|
|
12
|
+
viewBox: "0 0 16 16",
|
|
13
13
|
children: /* @__PURE__ */ o(
|
|
14
14
|
"path",
|
|
15
15
|
{
|
|
16
16
|
stroke: "currentColor",
|
|
17
17
|
strokeLinecap: "round",
|
|
18
18
|
strokeLinejoin: "round",
|
|
19
|
-
strokeWidth: 1.
|
|
20
|
-
d: "
|
|
19
|
+
strokeWidth: 1.3,
|
|
20
|
+
d: "M10 10.127H6m7.333-6.794.794-.793M2.667 10l-.794.793m1.46-8.126-.793-.794M13.333 10l.794.793M14 6.667h1.127m-14.254 0H2M6 12h3.913m-4.22-2.07a3.99 3.99 0 0 1-1.646-3.906c.266-1.738 1.713-3.125 3.466-3.33a3.997 3.997 0 0 1 4.484 3.967c0 1.346-.674 2.54-1.7 3.265a.67.67 0 0 0-.307.553v1.84c0 .92-.747 1.667-1.667 1.667h-.666a1.663 1.663 0 0 1-1.667-1.667v-1.842a.71.71 0 0 0-.307-.566z"
|
|
21
21
|
}
|
|
22
22
|
)
|
|
23
23
|
}
|
|
@@ -2,58 +2,58 @@ import { jsx as W } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo as M, createContext as L, useRef as R, useContext as E } from "react";
|
|
3
3
|
import { clsx as q } from "clsx";
|
|
4
4
|
import { twMerge as I } from "tailwind-merge";
|
|
5
|
-
function
|
|
5
|
+
function X(e) {
|
|
6
6
|
return e ? e.split(/[-_ ]+/).map((t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase()).join("") : "";
|
|
7
7
|
}
|
|
8
|
-
const N =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
);
|
|
8
|
+
const N = {
|
|
9
|
+
md: { max: 48, min: 17, scale: 2, startAt: 0 },
|
|
10
|
+
sm: { max: 28, min: 12, scale: 2, startAt: 6 }
|
|
11
|
+
};
|
|
12
|
+
function Z(e, t = "md") {
|
|
13
|
+
const { max: l, min: s, scale: a, startAt: i } = N[t], r = e.replace(/\D/g, "").length;
|
|
14
|
+
return Math.max(s, l - Math.max(0, r - i) * a);
|
|
15
15
|
}
|
|
16
16
|
function w(e, t = !0) {
|
|
17
17
|
if (!e) return "";
|
|
18
|
-
const l = e.includes("."), [
|
|
19
|
-
return l && t ? a ? `${
|
|
18
|
+
const l = e.includes("."), [s, a] = e.split("."), i = s.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
19
|
+
return l && t ? a ? `${i}.${a}` : `${i}.` : i;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function H(e, t = {}) {
|
|
22
22
|
const {
|
|
23
23
|
allowDecimals: l = !0,
|
|
24
|
-
thousandsSeparator:
|
|
24
|
+
thousandsSeparator: s = !0,
|
|
25
25
|
maxIntegerLength: a = 9,
|
|
26
|
-
maxDecimalLength:
|
|
26
|
+
maxDecimalLength: i = 9
|
|
27
27
|
} = t, r = e.replace(",", ".").replace(/[^\d.]/g, "");
|
|
28
28
|
let n = r;
|
|
29
29
|
if (n = n.replace(/^0+(?=\d)/, ""), !l)
|
|
30
|
-
return n = n.replace(/\D/g, ""), a > 0 && n.length > a && (n = n.slice(0, a)),
|
|
30
|
+
return n = n.replace(/\D/g, ""), a > 0 && n.length > a && (n = n.slice(0, a)), s ? w(n) : n;
|
|
31
31
|
n === "." && (n = "0.");
|
|
32
32
|
const c = n.indexOf(".");
|
|
33
33
|
if (c !== -1) {
|
|
34
|
-
let
|
|
35
|
-
a > 0 &&
|
|
34
|
+
let u = n.slice(0, c), d = n.slice(c + 1).replace(/\./g, "");
|
|
35
|
+
a > 0 && u.length > a && (u = u.slice(0, a)), d = d.slice(0, i), u === "" && (u = "0");
|
|
36
36
|
const h = r.endsWith(".") || n.endsWith(".");
|
|
37
|
-
n = d.length > 0 ? `${
|
|
37
|
+
n = d.length > 0 ? `${u}.${d}` : h ? `${u}.` : u;
|
|
38
38
|
} else
|
|
39
39
|
a > 0 && n.length > a && (n = n.slice(0, a));
|
|
40
|
-
return
|
|
40
|
+
return s ? w(n) : n;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function F(e, t) {
|
|
43
43
|
if (Object.is(e, t)) return !0;
|
|
44
|
-
const l = e,
|
|
45
|
-
return a.length !==
|
|
46
|
-
(r) => Object.prototype.hasOwnProperty.call(
|
|
44
|
+
const l = e, s = t, a = Object.keys(l), i = Object.keys(s);
|
|
45
|
+
return a.length !== i.length ? !1 : a.every(
|
|
46
|
+
(r) => Object.prototype.hasOwnProperty.call(s, r) && Object.is(l[r], s[r])
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
const l = L(t),
|
|
49
|
+
function z(e, t) {
|
|
50
|
+
const l = L(t), s = ({ children: i, value: r }) => {
|
|
51
51
|
const n = R(r);
|
|
52
|
-
return
|
|
52
|
+
return F(n.current, r) || (n.current = r), /* @__PURE__ */ W(l.Provider, { value: n.current, children: i });
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
s.displayName = e + "Provider";
|
|
55
55
|
function a({
|
|
56
|
-
consumerName:
|
|
56
|
+
consumerName: i,
|
|
57
57
|
contextRequired: r
|
|
58
58
|
}) {
|
|
59
59
|
const n = E(l);
|
|
@@ -61,24 +61,24 @@ function K(e, t) {
|
|
|
61
61
|
return n;
|
|
62
62
|
if (r)
|
|
63
63
|
throw new Error(
|
|
64
|
-
`${
|
|
64
|
+
`${i} must be used within ${e}`
|
|
65
65
|
);
|
|
66
66
|
return t || {};
|
|
67
67
|
}
|
|
68
|
-
return [
|
|
68
|
+
return [s, a];
|
|
69
69
|
}
|
|
70
|
-
const [
|
|
70
|
+
const [V, B] = z("Disabled", { disabled: !1 }), Y = ({
|
|
71
71
|
consumerName: e,
|
|
72
72
|
contextRequired: t,
|
|
73
73
|
mergeWith: l
|
|
74
74
|
}) => {
|
|
75
|
-
const
|
|
75
|
+
const s = B({
|
|
76
76
|
consumerName: e,
|
|
77
77
|
contextRequired: t ?? !1
|
|
78
78
|
});
|
|
79
|
-
return !!(l?.disabled ||
|
|
79
|
+
return !!(l?.disabled || s.disabled);
|
|
80
80
|
};
|
|
81
|
-
function
|
|
81
|
+
function ee(...e) {
|
|
82
82
|
return I(q(e));
|
|
83
83
|
}
|
|
84
84
|
function T(e, t) {
|
|
@@ -86,48 +86,48 @@ function T(e, t) {
|
|
|
86
86
|
return e(t);
|
|
87
87
|
typeof e == "object" && e !== null && "current" in e && (e.current = t);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function K(...e) {
|
|
90
90
|
const t = /* @__PURE__ */ new Map();
|
|
91
91
|
return (l) => {
|
|
92
92
|
if (l === null) {
|
|
93
|
-
e.forEach((
|
|
94
|
-
const a = t.get(
|
|
95
|
-
typeof a == "function" && a(), T(
|
|
93
|
+
e.forEach((s) => {
|
|
94
|
+
const a = t.get(s);
|
|
95
|
+
typeof a == "function" && a(), T(s, null);
|
|
96
96
|
}), t.clear();
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
e.forEach((
|
|
100
|
-
const a = T(
|
|
101
|
-
typeof a == "function" && t.set(
|
|
99
|
+
e.forEach((s) => {
|
|
100
|
+
const a = T(s, l);
|
|
101
|
+
typeof a == "function" && t.set(s, a);
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
return M(() =>
|
|
105
|
+
function te(...e) {
|
|
106
|
+
return M(() => K(...e), e);
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const ne = ({
|
|
109
109
|
currentStep: e,
|
|
110
110
|
totalSteps: t,
|
|
111
111
|
size: l,
|
|
112
|
-
label:
|
|
112
|
+
label: s,
|
|
113
113
|
strokeWidth: a = 4,
|
|
114
|
-
arcPercentage:
|
|
114
|
+
arcPercentage: i = 0.75
|
|
115
115
|
}) => {
|
|
116
|
-
const r = Math.min(Math.max(e, 0), t), n =
|
|
116
|
+
const r = Math.min(Math.max(e, 0), t), n = s ?? `${r}/${t}`, c = t <= 0 ? 0 : r / t, u = (l - a) / 2, d = l / 2, h = l / 2, m = 2 * Math.PI * u, p = m * i, b = p * (1 - c), g = r <= 0, D = `${p} ${m}`, P = g ? p - 2 : b;
|
|
117
117
|
return {
|
|
118
118
|
displayLabel: n,
|
|
119
119
|
progress: c,
|
|
120
|
-
r:
|
|
120
|
+
r: u,
|
|
121
121
|
cx: d,
|
|
122
122
|
cy: h,
|
|
123
|
-
circumference:
|
|
123
|
+
circumference: m,
|
|
124
124
|
trackArcLength: p,
|
|
125
|
-
trackDashArray: `${p} ${
|
|
125
|
+
trackDashArray: `${p} ${m}`,
|
|
126
126
|
progressDashArray: D,
|
|
127
127
|
progressDashOffset: P,
|
|
128
128
|
showMinimalDot: g
|
|
129
129
|
};
|
|
130
|
-
},
|
|
130
|
+
}, re = (e) => M(
|
|
131
131
|
() => ({
|
|
132
132
|
integerPart: Array.from(e.integerPart, (t) => ({
|
|
133
133
|
value: t,
|
|
@@ -139,57 +139,57 @@ const le = ({
|
|
|
139
139
|
})) : []
|
|
140
140
|
}),
|
|
141
141
|
[e.integerPart, e.decimalPart]
|
|
142
|
-
),
|
|
142
|
+
), le = (e, t, l) => {
|
|
143
143
|
if (t) return l;
|
|
144
|
-
const
|
|
144
|
+
const s = e.decimalPart ? `${e.decimalSeparator}${e.decimalPart}` : "", a = `${e.integerPart}${s}`;
|
|
145
145
|
return e.currencyPosition === "end" ? `${a} ${e.currencyText}` : `${e.currencyText} ${a}`;
|
|
146
146
|
};
|
|
147
|
-
function
|
|
148
|
-
const { leading:
|
|
149
|
-
let r = null, n = null, c = null,
|
|
150
|
-
const p =
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
return d = null, h = null,
|
|
154
|
-
}, D = (
|
|
155
|
-
const
|
|
156
|
-
return t -
|
|
157
|
-
}, P = (
|
|
158
|
-
const
|
|
159
|
-
return c === null ||
|
|
160
|
-
}, v = (
|
|
161
|
-
const
|
|
162
|
-
if (P(
|
|
163
|
-
v(
|
|
147
|
+
function _(e, t, l = {}) {
|
|
148
|
+
const { leading: s = !1, trailing: a = !0, maxWait: i } = l;
|
|
149
|
+
let r = null, n = null, c = null, u = 0, d = null, h = null, m;
|
|
150
|
+
const p = i !== void 0, b = p ? Math.max(i, t) : 0, g = (o) => {
|
|
151
|
+
u = o;
|
|
152
|
+
const f = d, x = h;
|
|
153
|
+
return d = null, h = null, m = e.apply(x, f), m;
|
|
154
|
+
}, D = (o) => {
|
|
155
|
+
const f = c ? o - c : 0;
|
|
156
|
+
return t - f;
|
|
157
|
+
}, P = (o) => {
|
|
158
|
+
const f = c ? o - c : t, x = o - u;
|
|
159
|
+
return c === null || f >= t || f < 0 || p && x >= b;
|
|
160
|
+
}, v = (o) => (r = null, a && d ? g(o) : (d = null, h = null, m)), y = () => {
|
|
161
|
+
const o = Date.now();
|
|
162
|
+
if (P(o)) {
|
|
163
|
+
v(o);
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
|
-
r = setTimeout(y, D(
|
|
167
|
-
},
|
|
168
|
-
const
|
|
169
|
-
n = null, d && (g(
|
|
170
|
-
},
|
|
171
|
-
r !== null && clearTimeout(r), n !== null && clearTimeout(n),
|
|
172
|
-
},
|
|
173
|
-
const
|
|
174
|
-
if (d =
|
|
166
|
+
r = setTimeout(y, D(o));
|
|
167
|
+
}, C = () => {
|
|
168
|
+
const o = Date.now();
|
|
169
|
+
n = null, d && (g(o), r !== null && (clearTimeout(r), r = setTimeout(y, t)));
|
|
170
|
+
}, S = (o) => (u = o, r = setTimeout(y, t), p && (n = setTimeout(C, b)), s ? g(o) : m), j = () => {
|
|
171
|
+
r !== null && clearTimeout(r), n !== null && clearTimeout(n), u = 0, d = null, h = null, c = null, r = null, n = null;
|
|
172
|
+
}, k = () => r === null && n === null ? m : v(Date.now()), O = () => r !== null || n !== null, $ = function(...o) {
|
|
173
|
+
const f = Date.now(), x = P(f);
|
|
174
|
+
if (d = o, h = this, c = f, x) {
|
|
175
175
|
if (r === null)
|
|
176
|
-
return
|
|
176
|
+
return S(f);
|
|
177
177
|
if (p)
|
|
178
|
-
return clearTimeout(r), r = setTimeout(y, t), g(
|
|
178
|
+
return clearTimeout(r), r = setTimeout(y, t), g(f);
|
|
179
179
|
}
|
|
180
|
-
return r === null && (r = setTimeout(y, t)),
|
|
180
|
+
return r === null && (r = setTimeout(y, t)), m;
|
|
181
181
|
};
|
|
182
|
-
return $.cancel =
|
|
182
|
+
return $.cancel = j, $.flush = k, $.pending = O, $;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
const { leading:
|
|
186
|
-
return
|
|
187
|
-
leading:
|
|
184
|
+
function ae(e, t, l = {}) {
|
|
185
|
+
const { leading: s = !0, trailing: a = !0 } = l;
|
|
186
|
+
return _(e, t, {
|
|
187
|
+
leading: s,
|
|
188
188
|
trailing: a,
|
|
189
189
|
maxWait: t
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
|
-
const
|
|
192
|
+
const se = ({
|
|
193
193
|
onClick: e,
|
|
194
194
|
disabled: t
|
|
195
195
|
}) => e ? t ? {
|
|
@@ -203,37 +203,37 @@ const ue = ({
|
|
|
203
203
|
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), e?.(l));
|
|
204
204
|
},
|
|
205
205
|
onClick: e
|
|
206
|
-
} : void 0,
|
|
206
|
+
} : void 0, A = " ", oe = ({
|
|
207
207
|
label: e,
|
|
208
208
|
placeholder: t
|
|
209
209
|
}) => {
|
|
210
210
|
const l = typeof t == "string" && t.trim().length > 0 ? t : void 0;
|
|
211
211
|
return e ? {
|
|
212
|
-
inputPlaceholder: l ??
|
|
212
|
+
inputPlaceholder: l ?? A,
|
|
213
213
|
labelStaysFloatedWithPlaceholder: l !== void 0
|
|
214
214
|
} : {
|
|
215
|
-
inputPlaceholder: t ??
|
|
215
|
+
inputPlaceholder: t ?? A,
|
|
216
216
|
labelStaysFloatedWithPlaceholder: !1
|
|
217
217
|
};
|
|
218
218
|
};
|
|
219
219
|
export {
|
|
220
|
-
|
|
220
|
+
V as DisabledProvider,
|
|
221
221
|
T as assignRef,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
222
|
+
le as buildAriaLabel,
|
|
223
|
+
ee as cn,
|
|
224
|
+
z as createSafeContext,
|
|
225
|
+
_ as debounce,
|
|
226
226
|
w as formatThousands,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
227
|
+
se as getButtonA11yProps,
|
|
228
|
+
Z as getFontSize,
|
|
229
|
+
ne as getStepperCalculations,
|
|
230
|
+
K as mergeRefs,
|
|
231
|
+
oe as resolveBaseInputPlaceholder,
|
|
232
|
+
F as shallowEqual,
|
|
233
|
+
H as textFormatter,
|
|
234
|
+
ae as throttle,
|
|
235
|
+
X as toPascalCase,
|
|
236
|
+
Y as useDisabledContext,
|
|
237
|
+
te as useMergedRef,
|
|
238
|
+
re as useSplitText
|
|
239
239
|
};
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/lumen-ui-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@ledgerhq/lumen-utils-shared": "0.1.
|
|
44
|
+
"@ledgerhq/lumen-utils-shared": "0.1.4",
|
|
45
45
|
"i18next": "^23.7.0",
|
|
46
46
|
"react-i18next": "^14.0.0"
|
|
47
47
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
55
55
|
"class-variance-authority": "^0.7.1",
|
|
56
56
|
"@tanstack/react-table": "^8.21.3",
|
|
57
|
-
"@ledgerhq/lumen-design-core": "0.1.
|
|
57
|
+
"@ledgerhq/lumen-design-core": "0.1.15",
|
|
58
58
|
"clsx": "^2.1.1",
|
|
59
59
|
"react": "^18.0.0 || ^19.0.0",
|
|
60
60
|
"react-dom": "^18.0.0 || ^19.0.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/lumen-ui-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.37",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@ledgerhq/lumen-utils-shared": "0.1.
|
|
44
|
+
"@ledgerhq/lumen-utils-shared": "0.1.5",
|
|
45
45
|
"i18next": "^23.7.0",
|
|
46
46
|
"react-i18next": "^14.0.0"
|
|
47
47
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
55
55
|
"class-variance-authority": "^0.7.1",
|
|
56
56
|
"@tanstack/react-table": "^8.21.3",
|
|
57
|
-
"@ledgerhq/lumen-design-core": "0.1.
|
|
57
|
+
"@ledgerhq/lumen-design-core": "0.1.16",
|
|
58
58
|
"clsx": "^2.1.1",
|
|
59
59
|
"react": "^18.0.0 || ^19.0.0",
|
|
60
60
|
"react-dom": "^18.0.0 || ^19.0.0",
|