@ledgerhq/lumen-ui-react 0.1.11 → 0.1.13
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/i18n/locales/de.json.d.ts +3 -0
- package/dist/i18n/locales/de.json.js +4 -2
- package/dist/i18n/locales/en.json.d.ts +3 -0
- package/dist/i18n/locales/en.json.js +6 -4
- package/dist/i18n/locales/es.json.d.ts +3 -0
- package/dist/i18n/locales/es.json.js +6 -4
- package/dist/i18n/locales/fr.json.d.ts +3 -0
- package/dist/i18n/locales/fr.json.js +6 -4
- package/dist/i18n/locales/ja.json.d.ts +3 -0
- package/dist/i18n/locales/ja.json.js +6 -4
- package/dist/i18n/locales/ko.json.d.ts +3 -0
- package/dist/i18n/locales/ko.json.js +6 -4
- package/dist/i18n/locales/pt.json.d.ts +3 -0
- package/dist/i18n/locales/pt.json.js +6 -4
- package/dist/i18n/locales/ru.json.d.ts +3 -0
- package/dist/i18n/locales/ru.json.js +6 -4
- package/dist/i18n/locales/th.json.d.ts +3 -0
- package/dist/i18n/locales/th.json.js +6 -4
- package/dist/i18n/locales/tr.json.d.ts +3 -0
- package/dist/i18n/locales/tr.json.js +6 -4
- package/dist/i18n/locales/zh.json.d.ts +3 -0
- package/dist/i18n/locales/zh.json.js +6 -4
- package/dist/index.js +114 -113
- package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/lib/Components/AmountDisplay/AmountDisplay.js +41 -41
- 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 +35 -32
- package/dist/lib/Components/Banner/Banner.js +5 -5
- package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.js +44 -41
- package/dist/lib/Components/Button/BaseButton.d.ts +1 -1
- package/dist/lib/Components/Button/BaseButton.d.ts.map +1 -1
- package/dist/lib/Components/Button/BaseButton.js +28 -25
- package/dist/lib/Components/Button/Button.js +9 -9
- package/dist/lib/Components/Card/Card.d.ts.map +1 -1
- package/dist/lib/Components/Card/Card.js +110 -107
- package/dist/lib/Components/Card/types.d.ts +1 -0
- package/dist/lib/Components/Card/types.d.ts.map +1 -1
- package/dist/lib/Components/CardButton/CardButton.d.ts +1 -1
- package/dist/lib/Components/CardButton/CardButton.d.ts.map +1 -1
- package/dist/lib/Components/CardButton/CardButton.js +28 -24
- package/dist/lib/Components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/lib/Components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/lib/Components/Checkbox/Checkbox.js +26 -14
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +2 -2
- package/dist/lib/Components/Dialog/types.d.ts +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.d.ts +1 -1
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
- package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +40 -20
- package/dist/lib/Components/InteractiveIcon/types.d.ts +14 -1
- package/dist/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.d.ts +1 -1
- package/dist/lib/Components/Link/Link.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.js +44 -33
- package/dist/lib/Components/Link/types.d.ts +5 -0
- package/dist/lib/Components/Link/types.d.ts.map +1 -1
- package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/lib/Components/ListItem/ListItem.js +72 -65
- package/dist/lib/Components/MediaCard/MediaCard.d.ts +33 -0
- package/dist/lib/Components/MediaCard/MediaCard.d.ts.map +1 -0
- package/dist/lib/Components/MediaCard/MediaCard.js +128 -0
- package/dist/lib/Components/MediaCard/index.d.ts +3 -0
- package/dist/lib/Components/MediaCard/index.d.ts.map +1 -0
- package/dist/lib/Components/MediaCard/types.d.ts +30 -0
- package/dist/lib/Components/MediaCard/types.d.ts.map +1 -0
- package/dist/lib/Components/Menu/Menu.d.ts +3 -3
- package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.js +133 -104
- package/dist/lib/Components/NavBar/CoinCapsule.js +4 -4
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.js +88 -51
- package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.d.ts +5 -5
- package/dist/lib/Components/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.js +94 -76
- package/dist/lib/Components/Select/index.d.ts +1 -1
- package/dist/lib/Components/Select/types.d.ts +4 -4
- package/dist/lib/Components/SideBar/SideBar.d.ts +1 -1
- package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/SideBar.js +77 -74
- package/dist/lib/Components/SideBar/types.d.ts +12 -4
- package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
- package/dist/lib/Components/Spot/Spot.js +3 -3
- package/dist/lib/Components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/lib/Components/Stepper/Stepper.js +34 -24
- package/dist/lib/Components/Subheader/Subheader.d.ts +2 -7
- package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
- package/dist/lib/Components/Subheader/Subheader.js +31 -49
- package/dist/lib/Components/Subheader/index.d.ts +1 -1
- package/dist/lib/Components/Subheader/index.d.ts.map +1 -1
- package/dist/lib/Components/Subheader/types.d.ts +1 -11
- package/dist/lib/Components/Subheader/types.d.ts.map +1 -1
- package/dist/lib/Components/Switch/Switch.d.ts +1 -1
- package/dist/lib/Components/Switch/Switch.d.ts.map +1 -1
- package/dist/lib/Components/Switch/Switch.js +30 -22
- package/dist/lib/Components/Table/Table.js +49 -49
- package/dist/lib/Components/Tag/Tag.d.ts +1 -1
- package/dist/lib/Components/Tag/Tag.d.ts.map +1 -1
- package/dist/lib/Components/Tag/Tag.js +17 -14
- package/dist/lib/Components/Tile/Tile.d.ts +5 -12
- package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
- package/dist/lib/Components/Tile/Tile.js +79 -82
- package/dist/lib/Components/Tile/index.d.ts +1 -1
- package/dist/lib/Components/Tile/index.d.ts.map +1 -1
- package/dist/lib/Components/Tile/types.d.ts +1 -10
- package/dist/lib/Components/Tile/types.d.ts.map +1 -1
- package/dist/lib/Components/TileButton/TileButton.d.ts +1 -1
- package/dist/lib/Components/TileButton/TileButton.d.ts.map +1 -1
- package/dist/lib/Components/TileButton/TileButton.js +26 -23
- package/dist/lib/Components/{ButtonTrigger/ButtonTrigger.d.ts → TriggerButton/TriggerButton.d.ts} +10 -10
- package/dist/lib/Components/TriggerButton/TriggerButton.d.ts.map +1 -0
- package/dist/lib/Components/TriggerButton/TriggerButton.js +76 -0
- package/dist/lib/Components/TriggerButton/index.d.ts +3 -0
- package/dist/lib/Components/{ButtonTrigger → TriggerButton}/index.d.ts.map +1 -1
- package/dist/lib/Components/{ButtonTrigger → TriggerButton}/types.d.ts +1 -1
- package/dist/lib/Components/{ButtonTrigger → TriggerButton}/types.d.ts.map +1 -1
- package/dist/lib/Components/index.d.ts +2 -1
- package/dist/lib/Components/index.d.ts.map +1 -1
- package/dist/lib/Symbols/Icons/NanoGen5.d.ts +29 -0
- package/dist/lib/Symbols/Icons/NanoGen5.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/NanoGen5.js +27 -0
- package/dist/lib/Symbols/index.d.ts +1 -0
- package/dist/lib/Symbols/index.d.ts.map +1 -1
- package/dist/lib/Symbols/index.js +194 -192
- package/dist/libs/utils-shared/dist/index.js +95 -90
- package/dist/package.json +2 -2
- package/package.json +2 -2
- package/dist/lib/Components/ButtonTrigger/ButtonTrigger.d.ts.map +0 -1
- package/dist/lib/Components/ButtonTrigger/ButtonTrigger.js +0 -73
- package/dist/lib/Components/ButtonTrigger/index.d.ts +0 -3
|
@@ -1,95 +1,99 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import { twMerge as
|
|
5
|
-
function
|
|
1
|
+
import { jsx as S } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as j, createContext as M, useRef as L, useContext as W } from "react";
|
|
3
|
+
import { clsx as q } from "clsx";
|
|
4
|
+
import { twMerge as N } from "tailwind-merge";
|
|
5
|
+
function _(e) {
|
|
6
6
|
return e ? e.split(/[-_ ]+/).map((t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase()).join("") : "";
|
|
7
7
|
}
|
|
8
|
-
const R = 48,
|
|
9
|
-
function
|
|
8
|
+
const R = 48, E = 17, I = 2;
|
|
9
|
+
function G(e) {
|
|
10
10
|
const t = e.replace(/\D/g, "").length;
|
|
11
11
|
return Math.max(
|
|
12
|
-
|
|
13
|
-
R - t *
|
|
12
|
+
E,
|
|
13
|
+
R - t * I
|
|
14
14
|
);
|
|
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("."), [i, a] = e.split("."), s = i.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
19
|
+
return l && t ? a ? `${s}.${a}` : `${s}.` : s;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function H(e, t = {}) {
|
|
22
22
|
const {
|
|
23
23
|
allowDecimals: l = !0,
|
|
24
|
-
thousandsSeparator:
|
|
24
|
+
thousandsSeparator: i = !0,
|
|
25
25
|
maxIntegerLength: a = 9,
|
|
26
|
-
maxDecimalLength:
|
|
26
|
+
maxDecimalLength: s = 9
|
|
27
27
|
} = t, n = e.replace(",", ".").replace(/[^\d.]/g, "");
|
|
28
28
|
let r = n;
|
|
29
29
|
if (r = r.replace(/^0+(?=\d)/, ""), !l)
|
|
30
|
-
return r = r.replace(/\D/g, ""), a > 0 && r.length > a && (r = r.slice(0, a)),
|
|
30
|
+
return r = r.replace(/\D/g, ""), a > 0 && r.length > a && (r = r.slice(0, a)), i ? w(r) : r;
|
|
31
31
|
r === "." && (r = "0.");
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
let
|
|
35
|
-
a > 0 &&
|
|
32
|
+
const o = r.indexOf(".");
|
|
33
|
+
if (o !== -1) {
|
|
34
|
+
let c = r.slice(0, o), d = r.slice(o + 1).replace(/\./g, "");
|
|
35
|
+
a > 0 && c.length > a && (c = c.slice(0, a)), d = d.slice(0, s), c === "" && (c = "0");
|
|
36
36
|
const g = n.endsWith(".") || r.endsWith(".");
|
|
37
|
-
r = d.length > 0 ? `${
|
|
37
|
+
r = d.length > 0 ? `${c}.${d}` : g ? `${c}.` : c;
|
|
38
38
|
} else
|
|
39
39
|
a > 0 && r.length > a && (r = r.slice(0, a));
|
|
40
|
-
return
|
|
40
|
+
return i ? w(r) : r;
|
|
41
41
|
}
|
|
42
42
|
function z(e, t) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
if (Object.is(e, t)) return !0;
|
|
44
|
+
const l = e, i = t, a = Object.keys(l), s = Object.keys(i);
|
|
45
|
+
return a.length !== s.length ? !1 : a.every(
|
|
46
|
+
(n) => Object.prototype.hasOwnProperty.call(i, n) && Object.is(l[n], i[n])
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
function B(e, t) {
|
|
50
|
+
const l = M(t), i = ({ children: s, value: n }) => {
|
|
51
|
+
const r = L(n);
|
|
52
|
+
return z(r.current, n) || (r.current = n), /* @__PURE__ */ S(l.Provider, { value: r.current, children: s });
|
|
49
53
|
};
|
|
50
|
-
|
|
54
|
+
i.displayName = e + "Provider";
|
|
51
55
|
function a({
|
|
52
|
-
consumerName:
|
|
56
|
+
consumerName: s,
|
|
53
57
|
contextRequired: n
|
|
54
58
|
}) {
|
|
55
|
-
const r =
|
|
59
|
+
const r = W(l);
|
|
56
60
|
if (r)
|
|
57
61
|
return r;
|
|
58
62
|
if (n)
|
|
59
63
|
throw new Error(
|
|
60
|
-
`${
|
|
64
|
+
`${s} must be used within ${e}`
|
|
61
65
|
);
|
|
62
66
|
return t || {};
|
|
63
67
|
}
|
|
64
|
-
return [
|
|
68
|
+
return [i, a];
|
|
65
69
|
}
|
|
66
|
-
const [V,
|
|
70
|
+
const [V, F] = B("Disabled", { disabled: !1 }), X = ({
|
|
67
71
|
consumerName: e,
|
|
68
72
|
contextRequired: t,
|
|
69
73
|
mergeWith: l
|
|
70
74
|
}) => {
|
|
71
|
-
const
|
|
75
|
+
const i = F({
|
|
72
76
|
consumerName: e,
|
|
73
77
|
contextRequired: t ?? !1
|
|
74
78
|
});
|
|
75
|
-
return l?.disabled ||
|
|
79
|
+
return !!(l?.disabled || i.disabled);
|
|
76
80
|
};
|
|
77
|
-
function
|
|
78
|
-
return
|
|
81
|
+
function Z(...e) {
|
|
82
|
+
return N(q(e));
|
|
79
83
|
}
|
|
80
|
-
const
|
|
84
|
+
const ee = ({
|
|
81
85
|
currentStep: e,
|
|
82
86
|
totalSteps: t,
|
|
83
87
|
size: l,
|
|
84
|
-
label:
|
|
88
|
+
label: i,
|
|
85
89
|
strokeWidth: a = 4,
|
|
86
|
-
arcPercentage:
|
|
90
|
+
arcPercentage: s = 0.75
|
|
87
91
|
}) => {
|
|
88
|
-
const n = Math.min(Math.max(e, 0), t), r =
|
|
92
|
+
const n = Math.min(Math.max(e, 0), t), r = i ?? `${n}/${t}`, o = t <= 0 ? 0 : n / t, c = (l - a) / 2, d = l / 2, g = l / 2, m = 2 * Math.PI * c, p = m * s, $ = p * (1 - o), h = n <= 0, D = `${p} ${m}`, y = h ? p - 2 : $;
|
|
89
93
|
return {
|
|
90
94
|
displayLabel: r,
|
|
91
|
-
progress:
|
|
92
|
-
r:
|
|
95
|
+
progress: o,
|
|
96
|
+
r: c,
|
|
93
97
|
cx: d,
|
|
94
98
|
cy: g,
|
|
95
99
|
circumference: m,
|
|
@@ -99,7 +103,7 @@ const X = ({
|
|
|
99
103
|
progressDashOffset: y,
|
|
100
104
|
showMinimalDot: h
|
|
101
105
|
};
|
|
102
|
-
},
|
|
106
|
+
}, te = (e) => j(
|
|
103
107
|
() => ({
|
|
104
108
|
integerPart: Array.from(e.integerPart, (t) => ({
|
|
105
109
|
value: t,
|
|
@@ -111,57 +115,57 @@ const X = ({
|
|
|
111
115
|
})) : []
|
|
112
116
|
}),
|
|
113
117
|
[e.integerPart, e.decimalPart]
|
|
114
|
-
),
|
|
118
|
+
), re = (e, t, l) => {
|
|
115
119
|
if (t) return l;
|
|
116
|
-
const
|
|
120
|
+
const i = e.decimalPart ? `${e.decimalSeparator}${e.decimalPart}` : "", a = `${e.integerPart}${i}`;
|
|
117
121
|
return e.currencyPosition === "end" ? `${a} ${e.currencyText}` : `${e.currencyText} ${a}`;
|
|
118
122
|
};
|
|
119
|
-
function
|
|
120
|
-
const { leading:
|
|
121
|
-
let n = null, r = null,
|
|
122
|
-
const p =
|
|
123
|
-
|
|
124
|
-
const f = d,
|
|
125
|
-
return d = null, g = null, m = e.apply(
|
|
126
|
-
}, D = (
|
|
127
|
-
const f =
|
|
123
|
+
function K(e, t, l = {}) {
|
|
124
|
+
const { leading: i = !1, trailing: a = !0, maxWait: s } = l;
|
|
125
|
+
let n = null, r = null, o = null, c = 0, d = null, g = null, m;
|
|
126
|
+
const p = s !== void 0, $ = p ? Math.max(s, t) : 0, h = (u) => {
|
|
127
|
+
c = u;
|
|
128
|
+
const f = d, b = g;
|
|
129
|
+
return d = null, g = null, m = e.apply(b, f), m;
|
|
130
|
+
}, D = (u) => {
|
|
131
|
+
const f = o ? u - o : 0;
|
|
128
132
|
return t - f;
|
|
129
|
-
}, y = (
|
|
130
|
-
const f =
|
|
131
|
-
return
|
|
132
|
-
}, T = (
|
|
133
|
-
const
|
|
134
|
-
if (y(
|
|
135
|
-
T(
|
|
133
|
+
}, y = (u) => {
|
|
134
|
+
const f = o ? u - o : t, b = u - c;
|
|
135
|
+
return o === null || f >= t || f < 0 || p && b >= $;
|
|
136
|
+
}, T = (u) => (n = null, a && d ? h(u) : (d = null, g = null, m)), x = () => {
|
|
137
|
+
const u = Date.now();
|
|
138
|
+
if (y(u)) {
|
|
139
|
+
T(u);
|
|
136
140
|
return;
|
|
137
141
|
}
|
|
138
|
-
n = setTimeout(x, D(
|
|
139
|
-
},
|
|
140
|
-
const
|
|
141
|
-
r = null, d && (h(
|
|
142
|
-
},
|
|
143
|
-
n !== null && clearTimeout(n), r !== null && clearTimeout(r),
|
|
144
|
-
},
|
|
145
|
-
const f = Date.now(),
|
|
146
|
-
if (d =
|
|
142
|
+
n = setTimeout(x, D(u));
|
|
143
|
+
}, v = () => {
|
|
144
|
+
const u = Date.now();
|
|
145
|
+
r = null, d && (h(u), n !== null && (clearTimeout(n), n = setTimeout(x, t)));
|
|
146
|
+
}, k = (u) => (c = u, n = setTimeout(x, t), p && (r = setTimeout(v, $)), i ? h(u) : m), C = () => {
|
|
147
|
+
n !== null && clearTimeout(n), r !== null && clearTimeout(r), c = 0, d = null, g = null, o = null, n = null, r = null;
|
|
148
|
+
}, A = () => n === null && r === null ? m : T(Date.now()), O = () => n !== null || r !== null, P = function(...u) {
|
|
149
|
+
const f = Date.now(), b = y(f);
|
|
150
|
+
if (d = u, g = this, o = f, b) {
|
|
147
151
|
if (n === null)
|
|
148
|
-
return
|
|
152
|
+
return k(f);
|
|
149
153
|
if (p)
|
|
150
154
|
return clearTimeout(n), n = setTimeout(x, t), h(f);
|
|
151
155
|
}
|
|
152
156
|
return n === null && (n = setTimeout(x, t)), m;
|
|
153
157
|
};
|
|
154
|
-
return P.cancel =
|
|
158
|
+
return P.cancel = C, P.flush = A, P.pending = O, P;
|
|
155
159
|
}
|
|
156
|
-
function
|
|
157
|
-
const { leading:
|
|
158
|
-
return
|
|
159
|
-
leading:
|
|
160
|
+
function ne(e, t, l = {}) {
|
|
161
|
+
const { leading: i = !0, trailing: a = !0 } = l;
|
|
162
|
+
return K(e, t, {
|
|
163
|
+
leading: i,
|
|
160
164
|
trailing: a,
|
|
161
165
|
maxWait: t
|
|
162
166
|
});
|
|
163
167
|
}
|
|
164
|
-
const
|
|
168
|
+
const le = ({
|
|
165
169
|
onClick: e,
|
|
166
170
|
disabled: t
|
|
167
171
|
}) => e ? t ? {
|
|
@@ -178,17 +182,18 @@ const re = ({
|
|
|
178
182
|
} : void 0;
|
|
179
183
|
export {
|
|
180
184
|
V as DisabledProvider,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
+
re as buildAriaLabel,
|
|
186
|
+
Z as cn,
|
|
187
|
+
B as createSafeContext,
|
|
188
|
+
K as debounce,
|
|
185
189
|
w as formatThousands,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
le as getButtonA11yProps,
|
|
191
|
+
G as getFontSize,
|
|
192
|
+
ee as getStepperCalculations,
|
|
193
|
+
z as shallowEqual,
|
|
194
|
+
H as textFormatter,
|
|
195
|
+
ne as throttle,
|
|
196
|
+
_ as toPascalCase,
|
|
197
|
+
X as useDisabledContext,
|
|
198
|
+
te as useSplitText
|
|
194
199
|
};
|
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.12",
|
|
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.2",
|
|
45
45
|
"i18next": "^23.7.0",
|
|
46
46
|
"react-i18next": "^14.0.0"
|
|
47
47
|
},
|
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.13",
|
|
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.2",
|
|
45
45
|
"i18next": "^23.7.0",
|
|
46
46
|
"react-i18next": "^14.0.0"
|
|
47
47
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTrigger.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ButtonTrigger/ButtonTrigger.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA4BlD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,aAAa;kGAWvB,kBAAkB;;CA+BpB,CAAC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { cn as y } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
-
import { Slot as f, Slottable as T } from "@radix-ui/react-slot";
|
|
4
|
-
import { cva as g } from "class-variance-authority";
|
|
5
|
-
import { baseButtonVariants as u } from "../Button/BaseButton.js";
|
|
6
|
-
import { ChevronDown as x } from "../../Symbols/Icons/ChevronDown.js";
|
|
7
|
-
const z = g("gap-8 body-2-semi-bold", {
|
|
8
|
-
variants: {
|
|
9
|
-
size: {
|
|
10
|
-
sm: "",
|
|
11
|
-
md: ""
|
|
12
|
-
},
|
|
13
|
-
iconType: {
|
|
14
|
-
flat: "",
|
|
15
|
-
rounded: "",
|
|
16
|
-
none: ""
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
compoundVariants: [
|
|
20
|
-
{ size: "md", iconType: "flat", class: "px-16 py-12" },
|
|
21
|
-
{ size: "md", iconType: "rounded", class: "py-8 pr-16 pl-8" },
|
|
22
|
-
{ size: "md", iconType: "none", class: "px-16 py-14" },
|
|
23
|
-
{ size: "sm", iconType: "flat", class: "px-12 py-10" },
|
|
24
|
-
{ size: "sm", iconType: "rounded", class: "py-8 pr-10 pl-8" },
|
|
25
|
-
{ size: "sm", iconType: "none", class: "px-12 py-10" }
|
|
26
|
-
],
|
|
27
|
-
defaultVariants: {
|
|
28
|
-
size: "md",
|
|
29
|
-
iconType: "none"
|
|
30
|
-
}
|
|
31
|
-
}), N = ({
|
|
32
|
-
ref: p,
|
|
33
|
-
className: i,
|
|
34
|
-
appearance: r = "gray",
|
|
35
|
-
size: m = "md",
|
|
36
|
-
disabled: e = !1,
|
|
37
|
-
asChild: o = !1,
|
|
38
|
-
icon: n,
|
|
39
|
-
iconType: c = "flat",
|
|
40
|
-
children: a,
|
|
41
|
-
...l
|
|
42
|
-
}) => {
|
|
43
|
-
const d = n ? c : "none";
|
|
44
|
-
return /* @__PURE__ */ t(
|
|
45
|
-
o ? f : "button",
|
|
46
|
-
{
|
|
47
|
-
ref: p,
|
|
48
|
-
className: y(
|
|
49
|
-
u({
|
|
50
|
-
appearance: r,
|
|
51
|
-
disabled: e,
|
|
52
|
-
loading: !1
|
|
53
|
-
}),
|
|
54
|
-
z({ size: m, iconType: d }),
|
|
55
|
-
i
|
|
56
|
-
),
|
|
57
|
-
"data-disabled": e || void 0,
|
|
58
|
-
disabled: e,
|
|
59
|
-
...l,
|
|
60
|
-
children: [
|
|
61
|
-
n && /* @__PURE__ */ s("span", { className: "shrink-0", children: n }),
|
|
62
|
-
/* @__PURE__ */ t("span", { className: "flex items-center gap-2", children: [
|
|
63
|
-
o ? /* @__PURE__ */ s(T, { children: a }) : /* @__PURE__ */ s("span", { className: "line-clamp-1 text-left", children: a }),
|
|
64
|
-
/* @__PURE__ */ s(x, { size: 20, className: "shrink-0" })
|
|
65
|
-
] })
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
};
|
|
70
|
-
N.displayName = "ButtonTrigger";
|
|
71
|
-
export {
|
|
72
|
-
N as ButtonTrigger
|
|
73
|
-
};
|