@ledgerhq/lumen-ui-react 0.1.44 → 0.1.45
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/index.js +111 -107
- package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/lib/Components/AmountDisplay/AmountDisplay.js +1 -0
- 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 +34 -32
- package/dist/lib/Components/AmountInput/types.d.ts +8 -0
- package/dist/lib/Components/AmountInput/types.d.ts.map +1 -1
- package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.d.ts +1 -0
- package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.d.ts.map +1 -1
- package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.js +9 -8
- package/dist/lib/Components/BaseInput/BaseInput.js +13 -13
- package/dist/lib/Components/Button/Button.js +9 -9
- package/dist/lib/Components/Card/Card.js +14 -14
- package/dist/lib/Components/DataTable/DataTable.js +6 -6
- package/dist/lib/Components/Divider/Divider.js +4 -4
- package/dist/lib/Components/DotIcon/DotIcon.js +5 -5
- package/dist/lib/Components/Icon/Icon.js +4 -4
- package/dist/lib/Components/Link/Link.js +6 -6
- package/dist/lib/Components/MediaImage/MediaImage.js +6 -6
- package/dist/lib/Components/Menu/Menu.d.ts +8 -3
- package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.js +40 -33
- package/dist/lib/Components/Menu/types.d.ts +6 -5
- package/dist/lib/Components/Menu/types.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/NavBar.js +9 -9
- package/dist/lib/Components/Pagination/Pagination.js +10 -10
- package/dist/lib/Components/Popover/Popover.js +10 -10
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +8 -3
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.js +41 -32
- package/dist/lib/Components/SegmentedControl/types.d.ts +6 -5
- package/dist/lib/Components/SegmentedControl/types.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.d.ts +19 -5
- package/dist/lib/Components/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.js +127 -104
- package/dist/lib/Components/Select/index.d.ts +1 -1
- package/dist/lib/Components/Select/index.d.ts.map +1 -1
- package/dist/lib/Components/Select/types.d.ts +20 -19
- package/dist/lib/Components/Select/types.d.ts.map +1 -1
- package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts +9 -9
- package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts.map +1 -1
- package/dist/lib/Components/Select/utils/groupItems.d.ts +2 -2
- package/dist/lib/Components/Select/utils/groupItems.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/SideBar.d.ts +11 -3
- package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/SideBar.js +61 -51
- package/dist/lib/Components/SideBar/index.d.ts +2 -2
- package/dist/lib/Components/SideBar/index.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/types.d.ts +7 -6
- package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
- package/dist/lib/Components/Table/Table.js +49 -49
- package/dist/lib/Components/Table/utils/useThrottledScrollBottom.js +5 -5
- package/dist/lib/Components/TileButton/TileButton.js +6 -6
- package/dist/lib/Components/Tooltip/Tooltip.js +4 -4
- package/dist/libs/utils-shared/dist/index.js +138 -143
- package/dist/package.json +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
4
|
-
const
|
|
3
|
+
import { TABLE_SCROLL_BOTTOM_THRESHOLD_IN_ROW as m, TABLE_CELL_HEIGHT as R } from "../constants.js";
|
|
4
|
+
const a = 150, E = ({
|
|
5
5
|
element: t,
|
|
6
6
|
threshold: r = 10
|
|
7
7
|
}) => {
|
|
@@ -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 = m
|
|
14
14
|
}) => {
|
|
15
15
|
const n = L(
|
|
16
|
-
() => c *
|
|
16
|
+
() => c * R,
|
|
17
17
|
[c]
|
|
18
18
|
), e = s(t), u = s(r);
|
|
19
19
|
e.current = t, u.current = r;
|
|
@@ -22,7 +22,7 @@ const m = 150, E = ({
|
|
|
22
22
|
return;
|
|
23
23
|
const T = h((o) => {
|
|
24
24
|
u.current || !e.current || E({ element: o, threshold: n }) && e.current();
|
|
25
|
-
},
|
|
25
|
+
}, a);
|
|
26
26
|
return l.current = T, (o) => {
|
|
27
27
|
const i = o.currentTarget;
|
|
28
28
|
i && T(i);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useDisabledContext as v, cn as x } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { Slot as g, Slottable as N } from "@radix-ui/react-slot";
|
|
4
|
-
import { cva as
|
|
4
|
+
import { cva as o } from "class-variance-authority";
|
|
5
5
|
import { useCallback as V } from "react";
|
|
6
|
-
const h =
|
|
6
|
+
const h = o(
|
|
7
7
|
[
|
|
8
8
|
"flex flex-col items-center gap-8 rounded-md p-12",
|
|
9
9
|
"bg-surface body-2-semi-bold text-base transition-colors",
|
|
@@ -24,7 +24,7 @@ const h = i(
|
|
|
24
24
|
isFull: !1
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
), k =
|
|
27
|
+
), k = o("shrink-0", {
|
|
28
28
|
variants: {
|
|
29
29
|
disabled: {
|
|
30
30
|
true: "text-disabled",
|
|
@@ -50,12 +50,12 @@ const h = i(
|
|
|
50
50
|
consumerName: "TileButton",
|
|
51
51
|
mergeWith: { disabled: d }
|
|
52
52
|
}), m = V(
|
|
53
|
-
(
|
|
53
|
+
(i) => {
|
|
54
54
|
if (e) {
|
|
55
|
-
|
|
55
|
+
i.preventDefault();
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
l?.(
|
|
58
|
+
l?.(i);
|
|
59
59
|
},
|
|
60
60
|
[e, l]
|
|
61
61
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { cn as
|
|
1
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { cn as l } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import * as e from "@radix-ui/react-tooltip";
|
|
4
4
|
import { cva as d } from "class-variance-authority";
|
|
5
5
|
const m = d(
|
|
@@ -37,13 +37,13 @@ const m = d(
|
|
|
37
37
|
side: a,
|
|
38
38
|
children: r,
|
|
39
39
|
...n
|
|
40
|
-
}) => /* @__PURE__ */ o(e.Portal, { children: /* @__PURE__ */
|
|
40
|
+
}) => /* @__PURE__ */ o(e.Portal, { children: /* @__PURE__ */ s(
|
|
41
41
|
e.Content,
|
|
42
42
|
{
|
|
43
43
|
"data-slot": "tooltip-content",
|
|
44
44
|
side: a,
|
|
45
45
|
sideOffset: i,
|
|
46
|
-
className:
|
|
46
|
+
className: l(m({ side: a }), t),
|
|
47
47
|
...n,
|
|
48
48
|
children: [
|
|
49
49
|
/* @__PURE__ */ o(e.Arrow, { className: "size-10 translate-y-[calc(-50%-1px)] rotate-45 rounded-[1px] bg-interactive fill-interactive" }),
|
|
@@ -1,134 +1,129 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as M, createContext as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import { twMerge as
|
|
5
|
-
function
|
|
1
|
+
import { jsx as L } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as M, createContext as R, useRef as W, useContext as E } from "react";
|
|
3
|
+
import { clsx as I } from "clsx";
|
|
4
|
+
import { twMerge as q } from "tailwind-merge";
|
|
5
|
+
function ee(e) {
|
|
6
6
|
return e ? e.split(/[-_ ]+/).map((t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase()).join("") : "";
|
|
7
7
|
}
|
|
8
8
|
const N = {
|
|
9
9
|
md: { max: 48, min: 17, scale: 2, startAt: 0 },
|
|
10
10
|
sm: { max: 28, min: 12, scale: 2, startAt: 6 }
|
|
11
11
|
};
|
|
12
|
-
function
|
|
13
|
-
const { max:
|
|
14
|
-
return Math.max(
|
|
12
|
+
function te(e, t = "md") {
|
|
13
|
+
const { max: r, min: a, scale: l, startAt: i } = N[t], n = e.replace(/\D/g, "").length;
|
|
14
|
+
return Math.max(a, r - Math.max(0, n - i) * l);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function F(e, t = !0) {
|
|
17
17
|
if (!e) return "";
|
|
18
|
-
const
|
|
19
|
-
return
|
|
18
|
+
const r = e.includes("."), [a, l] = e.split("."), i = a.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
19
|
+
return r && t ? l ? `${i}.${l}` : `${i}.` : i;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
const z = (e) => e.replaceAll(",", ".").replaceAll(/[^\d.]/g, ""), B = (e) => e.replace(/^0+(?=\d)/, ""), A = (e, t) => t > 0 ? e.slice(0, t) : e, K = (e, t) => A(e.replaceAll(/\D/g, ""), t), U = (e, t, r) => {
|
|
22
|
+
if (e === ".") return "0.";
|
|
23
|
+
const a = e.indexOf(".");
|
|
24
|
+
if (a === -1) return A(e, t);
|
|
25
|
+
const l = A(e.slice(0, a), t) || "0", i = e.slice(a + 1).replaceAll(".", "").slice(0, r);
|
|
26
|
+
return i.length > 0 ? `${l}.${i}` : e.endsWith(".") ? `${l}.` : l;
|
|
27
|
+
};
|
|
28
|
+
function re(e, t = {}) {
|
|
22
29
|
const {
|
|
23
|
-
allowDecimals:
|
|
24
|
-
thousandsSeparator:
|
|
25
|
-
maxIntegerLength:
|
|
26
|
-
maxDecimalLength: i = 9
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return n = n.replace(/\D/g, ""), a > 0 && n.length > a && (n = n.slice(0, a)), s ? w(n) : n;
|
|
31
|
-
n === "." && (n = "0.");
|
|
32
|
-
const c = n.indexOf(".");
|
|
33
|
-
if (c === -1)
|
|
34
|
-
a > 0 && n.length > a && (n = n.slice(0, a));
|
|
35
|
-
else {
|
|
36
|
-
let u = n.slice(0, c), d = n.slice(c + 1).replace(/\./g, "");
|
|
37
|
-
a > 0 && u.length > a && (u = u.slice(0, a)), d = d.slice(0, i), u === "" && (u = "0");
|
|
38
|
-
const h = r.endsWith(".") || n.endsWith(".");
|
|
39
|
-
n = d.length > 0 ? `${u}.${d}` : h ? `${u}.` : u;
|
|
40
|
-
}
|
|
41
|
-
return s ? w(n) : n;
|
|
30
|
+
allowDecimals: r = !0,
|
|
31
|
+
thousandsSeparator: a = !0,
|
|
32
|
+
maxIntegerLength: l = 9,
|
|
33
|
+
maxDecimalLength: i = 9,
|
|
34
|
+
decimalSeparator: n = "."
|
|
35
|
+
} = t, o = B(z(e)), u = r ? U(o, l, i) : K(o, l), m = a ? F(u) : u;
|
|
36
|
+
return n === "." ? m : m.replaceAll(".", n);
|
|
42
37
|
}
|
|
43
|
-
function
|
|
38
|
+
function _(e, t) {
|
|
44
39
|
if (Object.is(e, t)) return !0;
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
(
|
|
40
|
+
const r = e, a = t, l = Object.keys(r), i = Object.keys(a);
|
|
41
|
+
return l.length !== i.length ? !1 : l.every(
|
|
42
|
+
(n) => Object.prototype.hasOwnProperty.call(a, n) && Object.is(r[n], a[n])
|
|
48
43
|
);
|
|
49
44
|
}
|
|
50
|
-
function
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
return
|
|
45
|
+
function G(e, t) {
|
|
46
|
+
const r = R(t), a = ({ children: i, value: n }) => {
|
|
47
|
+
const o = W(n);
|
|
48
|
+
return _(o.current, n) || (o.current = n), /* @__PURE__ */ L(r.Provider, { value: o.current, children: i });
|
|
54
49
|
};
|
|
55
|
-
|
|
56
|
-
function
|
|
50
|
+
a.displayName = e + "Provider";
|
|
51
|
+
function l({
|
|
57
52
|
consumerName: i,
|
|
58
|
-
contextRequired:
|
|
53
|
+
contextRequired: n
|
|
59
54
|
}) {
|
|
60
|
-
const
|
|
55
|
+
const o = E(r);
|
|
56
|
+
if (o)
|
|
57
|
+
return o;
|
|
61
58
|
if (n)
|
|
62
|
-
return n;
|
|
63
|
-
if (r)
|
|
64
59
|
throw new Error(
|
|
65
60
|
`${i} must be used within ${e}`
|
|
66
61
|
);
|
|
67
62
|
return t || {};
|
|
68
63
|
}
|
|
69
|
-
return [
|
|
64
|
+
return [a, l];
|
|
70
65
|
}
|
|
71
|
-
const [
|
|
66
|
+
const [ne, H] = G("Disabled", { disabled: !1 }), ae = ({
|
|
72
67
|
consumerName: e,
|
|
73
68
|
contextRequired: t,
|
|
74
|
-
mergeWith:
|
|
69
|
+
mergeWith: r
|
|
75
70
|
}) => {
|
|
76
|
-
const
|
|
71
|
+
const a = H({
|
|
77
72
|
consumerName: e,
|
|
78
73
|
contextRequired: t ?? !1
|
|
79
74
|
});
|
|
80
|
-
return !!(
|
|
75
|
+
return !!(r?.disabled || a.disabled);
|
|
81
76
|
};
|
|
82
|
-
function
|
|
83
|
-
return I(
|
|
77
|
+
function le(...e) {
|
|
78
|
+
return q(I(e));
|
|
84
79
|
}
|
|
85
80
|
function T(e, t) {
|
|
86
81
|
if (typeof e == "function")
|
|
87
82
|
return e(t);
|
|
88
83
|
typeof e == "object" && e !== null && "current" in e && (e.current = t);
|
|
89
84
|
}
|
|
90
|
-
function
|
|
85
|
+
function J(...e) {
|
|
91
86
|
const t = /* @__PURE__ */ new Map();
|
|
92
|
-
return (
|
|
93
|
-
if (
|
|
94
|
-
e.forEach((
|
|
95
|
-
const
|
|
96
|
-
typeof
|
|
87
|
+
return (r) => {
|
|
88
|
+
if (r === null) {
|
|
89
|
+
e.forEach((a) => {
|
|
90
|
+
const l = t.get(a);
|
|
91
|
+
typeof l == "function" && l(), T(a, null);
|
|
97
92
|
}), t.clear();
|
|
98
93
|
return;
|
|
99
94
|
}
|
|
100
|
-
e.forEach((
|
|
101
|
-
const
|
|
102
|
-
typeof
|
|
95
|
+
e.forEach((a) => {
|
|
96
|
+
const l = T(a, r);
|
|
97
|
+
typeof l == "function" && t.set(a, l);
|
|
103
98
|
});
|
|
104
99
|
};
|
|
105
100
|
}
|
|
106
|
-
function
|
|
107
|
-
return M(() =>
|
|
101
|
+
function ie(...e) {
|
|
102
|
+
return M(() => J(...e), e);
|
|
108
103
|
}
|
|
109
|
-
const
|
|
104
|
+
const oe = ({
|
|
110
105
|
currentStep: e,
|
|
111
106
|
totalSteps: t,
|
|
112
|
-
size:
|
|
113
|
-
label:
|
|
114
|
-
strokeWidth:
|
|
107
|
+
size: r,
|
|
108
|
+
label: a,
|
|
109
|
+
strokeWidth: l = 4,
|
|
115
110
|
arcPercentage: i = 0.75
|
|
116
111
|
}) => {
|
|
117
|
-
const
|
|
112
|
+
const n = Math.min(Math.max(e, 0), t), o = a ?? `${n}/${t}`, u = t <= 0 ? 0 : n / t, m = (r - l) / 2, p = r / 2, h = r / 2, c = 2 * Math.PI * m, f = c * i, b = f * (1 - u), g = n <= 0, D = `${f} ${c}`, P = g ? f - 2 : b;
|
|
118
113
|
return {
|
|
119
|
-
displayLabel:
|
|
120
|
-
progress:
|
|
121
|
-
r:
|
|
122
|
-
cx:
|
|
114
|
+
displayLabel: o,
|
|
115
|
+
progress: u,
|
|
116
|
+
r: m,
|
|
117
|
+
cx: p,
|
|
123
118
|
cy: h,
|
|
124
|
-
circumference:
|
|
125
|
-
trackArcLength:
|
|
126
|
-
trackDashArray: `${
|
|
119
|
+
circumference: c,
|
|
120
|
+
trackArcLength: f,
|
|
121
|
+
trackDashArray: `${f} ${c}`,
|
|
127
122
|
progressDashArray: D,
|
|
128
123
|
progressDashOffset: P,
|
|
129
124
|
showMinimalDot: g
|
|
130
125
|
};
|
|
131
|
-
},
|
|
126
|
+
}, se = (e) => M(
|
|
132
127
|
() => ({
|
|
133
128
|
integerPart: Array.from(e.integerPart, (t) => ({
|
|
134
129
|
value: t,
|
|
@@ -140,57 +135,57 @@ const ne = ({
|
|
|
140
135
|
})) : []
|
|
141
136
|
}),
|
|
142
137
|
[e.integerPart, e.decimalPart]
|
|
143
|
-
),
|
|
144
|
-
if (t) return
|
|
145
|
-
const
|
|
146
|
-
return e.currencyPosition === "end" ? `${
|
|
138
|
+
), ue = (e, t, r) => {
|
|
139
|
+
if (t) return r;
|
|
140
|
+
const a = e.decimalPart ? `${e.decimalSeparator}${e.decimalPart}` : "", l = `${e.integerPart}${a}`;
|
|
141
|
+
return e.currencyPosition === "end" ? `${l} ${e.currencyText}` : `${e.currencyText} ${l}`;
|
|
147
142
|
};
|
|
148
|
-
function
|
|
149
|
-
const { leading:
|
|
150
|
-
let
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
const
|
|
154
|
-
return
|
|
155
|
-
}, D = (
|
|
156
|
-
const
|
|
157
|
-
return t -
|
|
158
|
-
}, P = (
|
|
159
|
-
const
|
|
160
|
-
return
|
|
161
|
-
},
|
|
162
|
-
const
|
|
163
|
-
if (P(
|
|
164
|
-
|
|
143
|
+
function Y(e, t, r = {}) {
|
|
144
|
+
const { leading: a = !1, trailing: l = !0, maxWait: i } = r;
|
|
145
|
+
let n = null, o = null, u = null, m = 0, p = null, h = null, c;
|
|
146
|
+
const f = i !== void 0, b = f ? Math.max(i, t) : 0, g = (s) => {
|
|
147
|
+
m = s;
|
|
148
|
+
const d = p, y = h;
|
|
149
|
+
return p = null, h = null, c = e.apply(y, d), c;
|
|
150
|
+
}, D = (s) => {
|
|
151
|
+
const d = u ? s - u : 0;
|
|
152
|
+
return t - d;
|
|
153
|
+
}, P = (s) => {
|
|
154
|
+
const d = u ? s - u : t, y = s - m;
|
|
155
|
+
return u === null || d >= t || d < 0 || f && y >= b;
|
|
156
|
+
}, w = (s) => (n = null, l && p ? g(s) : (p = null, h = null, c)), x = () => {
|
|
157
|
+
const s = Date.now();
|
|
158
|
+
if (P(s)) {
|
|
159
|
+
w(s);
|
|
165
160
|
return;
|
|
166
161
|
}
|
|
167
|
-
|
|
168
|
-
},
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
},
|
|
174
|
-
const
|
|
175
|
-
if (
|
|
176
|
-
if (
|
|
177
|
-
return
|
|
178
|
-
if (
|
|
179
|
-
return clearTimeout(
|
|
162
|
+
n = setTimeout(x, D(s));
|
|
163
|
+
}, S = () => {
|
|
164
|
+
const s = Date.now();
|
|
165
|
+
o = null, p && (g(s), n !== null && (clearTimeout(n), n = setTimeout(x, t)));
|
|
166
|
+
}, k = (s) => (m = s, n = setTimeout(x, t), f && (o = setTimeout(S, b)), a ? g(s) : c), C = () => {
|
|
167
|
+
n !== null && clearTimeout(n), o !== null && clearTimeout(o), m = 0, p = null, h = null, u = null, n = null, o = null;
|
|
168
|
+
}, j = () => n === null && o === null ? c : w(Date.now()), O = () => n !== null || o !== null, $ = function(...s) {
|
|
169
|
+
const d = Date.now(), y = P(d);
|
|
170
|
+
if (p = s, h = this, u = d, y) {
|
|
171
|
+
if (n === null)
|
|
172
|
+
return k(d);
|
|
173
|
+
if (f)
|
|
174
|
+
return clearTimeout(n), n = setTimeout(x, t), g(d);
|
|
180
175
|
}
|
|
181
|
-
return
|
|
176
|
+
return n === null && (n = setTimeout(x, t)), c;
|
|
182
177
|
};
|
|
183
|
-
return $.cancel =
|
|
178
|
+
return $.cancel = C, $.flush = j, $.pending = O, $;
|
|
184
179
|
}
|
|
185
|
-
function
|
|
186
|
-
const { leading:
|
|
187
|
-
return
|
|
188
|
-
leading:
|
|
189
|
-
trailing:
|
|
180
|
+
function ce(e, t, r = {}) {
|
|
181
|
+
const { leading: a = !0, trailing: l = !0 } = r;
|
|
182
|
+
return Y(e, t, {
|
|
183
|
+
leading: a,
|
|
184
|
+
trailing: l,
|
|
190
185
|
maxWait: t
|
|
191
186
|
});
|
|
192
187
|
}
|
|
193
|
-
const
|
|
188
|
+
const de = ({
|
|
194
189
|
onClick: e,
|
|
195
190
|
disabled: t
|
|
196
191
|
}) => e ? t ? {
|
|
@@ -200,41 +195,41 @@ const se = ({
|
|
|
200
195
|
} : {
|
|
201
196
|
role: "button",
|
|
202
197
|
tabIndex: 0,
|
|
203
|
-
onKeyDown: (
|
|
204
|
-
(
|
|
198
|
+
onKeyDown: (r) => {
|
|
199
|
+
(r.key === "Enter" || r.key === " ") && (r.preventDefault(), e?.(r));
|
|
205
200
|
},
|
|
206
201
|
onClick: e
|
|
207
|
-
} : void 0,
|
|
202
|
+
} : void 0, v = " ", me = ({
|
|
208
203
|
label: e,
|
|
209
204
|
placeholder: t
|
|
210
205
|
}) => {
|
|
211
|
-
const
|
|
206
|
+
const r = typeof t == "string" && t.trim().length > 0 ? t : void 0;
|
|
212
207
|
return e ? {
|
|
213
|
-
inputPlaceholder:
|
|
214
|
-
labelStaysFloatedWithPlaceholder:
|
|
208
|
+
inputPlaceholder: r ?? v,
|
|
209
|
+
labelStaysFloatedWithPlaceholder: r !== void 0
|
|
215
210
|
} : {
|
|
216
|
-
inputPlaceholder: t ??
|
|
211
|
+
inputPlaceholder: t ?? v,
|
|
217
212
|
labelStaysFloatedWithPlaceholder: !1
|
|
218
213
|
};
|
|
219
214
|
};
|
|
220
215
|
export {
|
|
221
|
-
|
|
216
|
+
ne as DisabledProvider,
|
|
222
217
|
T as assignRef,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
218
|
+
ue as buildAriaLabel,
|
|
219
|
+
le as cn,
|
|
220
|
+
G as createSafeContext,
|
|
221
|
+
Y as debounce,
|
|
222
|
+
F as formatThousands,
|
|
223
|
+
de as getButtonA11yProps,
|
|
224
|
+
te as getFontSize,
|
|
225
|
+
oe as getStepperCalculations,
|
|
226
|
+
J as mergeRefs,
|
|
227
|
+
me as resolveBaseInputPlaceholder,
|
|
228
|
+
_ as shallowEqual,
|
|
229
|
+
re as textFormatter,
|
|
230
|
+
ce as throttle,
|
|
231
|
+
ee as toPascalCase,
|
|
232
|
+
ae as useDisabledContext,
|
|
233
|
+
ie as useMergedRef,
|
|
234
|
+
se as useSplitText
|
|
240
235
|
};
|
package/dist/package.json
CHANGED
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.45",
|
|
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.7",
|
|
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.19",
|
|
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",
|