@ledgerhq/lumen-ui-react 0.1.12 → 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 +116 -113
- package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/lib/Components/AmountDisplay/AmountDisplay.js +31 -31
- package/dist/lib/Components/Card/Card.d.ts.map +1 -1
- package/dist/lib/Components/Card/Card.js +70 -70
- 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 +24 -10
- package/dist/lib/Components/InteractiveIcon/types.d.ts +8 -0
- package/dist/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
- 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/Select/Select.d.ts +3 -3
- package/dist/lib/Components/Select/Select.js +3 -3
- package/dist/lib/Components/Select/index.d.ts +1 -1
- package/dist/lib/Components/Select/types.d.ts +4 -4
- 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/{ButtonTrigger/ButtonTrigger.js → TriggerButton/TriggerButton.js} +3 -3
- 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/package.json +2 -2
- package/package.json +1 -1
- package/dist/lib/Components/ButtonTrigger/ButtonTrigger.d.ts.map +0 -1
- package/dist/lib/Components/ButtonTrigger/index.d.ts +0 -3
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { useSplitText as y, buildAriaLabel as x, cn as p } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { memo as d } from "react";
|
|
4
4
|
import { DIGITS as b } from "./types.js";
|
|
5
5
|
import { useCommonTranslation as D } from "../../../i18n/useCommonTranslation.js";
|
|
6
6
|
const N = {
|
|
7
|
-
0:
|
|
8
|
-
1: 15,
|
|
9
|
-
2: 23,
|
|
10
|
-
3: 24,
|
|
11
|
-
4: 25,
|
|
12
|
-
5: 23,
|
|
13
|
-
6:
|
|
14
|
-
7:
|
|
15
|
-
8: 24,
|
|
16
|
-
9: 24
|
|
7
|
+
0: 25,
|
|
8
|
+
1: 15.5,
|
|
9
|
+
2: 23.5,
|
|
10
|
+
3: 24.5,
|
|
11
|
+
4: 25.5,
|
|
12
|
+
5: 23.5,
|
|
13
|
+
6: 25,
|
|
14
|
+
7: 22,
|
|
15
|
+
8: 24.5,
|
|
16
|
+
9: 24.5
|
|
17
17
|
}, I = {
|
|
18
|
-
0: 17,
|
|
19
|
-
1:
|
|
20
|
-
2: 16,
|
|
21
|
-
3:
|
|
22
|
-
4:
|
|
23
|
-
5:
|
|
24
|
-
6: 17,
|
|
25
|
-
7:
|
|
26
|
-
8:
|
|
27
|
-
9:
|
|
18
|
+
0: 17.5,
|
|
19
|
+
1: 11,
|
|
20
|
+
2: 16.5,
|
|
21
|
+
3: 17,
|
|
22
|
+
4: 18,
|
|
23
|
+
5: 16,
|
|
24
|
+
6: 17.5,
|
|
25
|
+
7: 15,
|
|
26
|
+
8: 17,
|
|
27
|
+
9: 17
|
|
28
28
|
}, T = d(({ value: a, animate: l, type: i }) => {
|
|
29
29
|
const s = (i === "integer" ? N : I)[a];
|
|
30
|
-
return /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ c(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
33
|
className: "relative overflow-hidden mask-fade-y transition-[width] duration-600",
|
|
@@ -70,24 +70,24 @@ const N = {
|
|
|
70
70
|
className: r,
|
|
71
71
|
...u
|
|
72
72
|
}) => {
|
|
73
|
-
const t = l(a),
|
|
73
|
+
const t = l(a), o = y(t), { t: f } = D(), h = x(
|
|
74
74
|
t,
|
|
75
75
|
i,
|
|
76
76
|
f("components.amountDisplay.amountHiddenAriaLabel")
|
|
77
77
|
);
|
|
78
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ e(
|
|
79
79
|
"div",
|
|
80
80
|
{
|
|
81
81
|
className: p(
|
|
82
82
|
s && "animate-pulse",
|
|
83
|
-
"relative inline-flex
|
|
83
|
+
"relative inline-flex",
|
|
84
84
|
r
|
|
85
85
|
),
|
|
86
86
|
"aria-label": h,
|
|
87
87
|
"aria-busy": s,
|
|
88
88
|
...u,
|
|
89
|
-
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
89
|
+
children: /* @__PURE__ */ c("div", { className: "flex items-baseline", children: [
|
|
90
|
+
/* @__PURE__ */ c(
|
|
91
91
|
"span",
|
|
92
92
|
{
|
|
93
93
|
className: "inline-flex heading-1-semi-bold text-base",
|
|
@@ -97,7 +97,7 @@ const N = {
|
|
|
97
97
|
i ? /* @__PURE__ */ e("span", { children: "••••" }) : /* @__PURE__ */ e(
|
|
98
98
|
m,
|
|
99
99
|
{
|
|
100
|
-
items:
|
|
100
|
+
items: o.integerPart,
|
|
101
101
|
animate: n,
|
|
102
102
|
type: "integer"
|
|
103
103
|
}
|
|
@@ -105,7 +105,7 @@ const N = {
|
|
|
105
105
|
]
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ c(
|
|
109
109
|
"span",
|
|
110
110
|
{
|
|
111
111
|
className: "inline-flex heading-2-semi-bold text-muted",
|
|
@@ -115,7 +115,7 @@ const N = {
|
|
|
115
115
|
t.decimalPart && !i && /* @__PURE__ */ e(
|
|
116
116
|
m,
|
|
117
117
|
{
|
|
118
|
-
items:
|
|
118
|
+
items: o.decimalPart,
|
|
119
119
|
animate: n,
|
|
120
120
|
type: "decimal"
|
|
121
121
|
}
|
|
@@ -124,7 +124,7 @@ const N = {
|
|
|
124
124
|
]
|
|
125
125
|
}
|
|
126
126
|
)
|
|
127
|
-
]
|
|
127
|
+
] })
|
|
128
128
|
}
|
|
129
129
|
);
|
|
130
130
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Card/Card.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Card/Card.tsx"],"names":[],"mappings":"AASA,OAAO,EAEL,2BAA2B,EAC3B,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACT,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,uBAAuB,GAAI,wCAKrC;IACD,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAChC,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;CACjC,KAAG,gBA2BH,CAAC;AAiDF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,IAAI;0FAUd,SAAS;;CAkCX,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,UAAU;6CAKpB,eAAe;;CA8BjB,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,WAAW;6CAKrB,gBAAgB;;CAUlB,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,WAAW;6CAKrB,gBAAgB;;CAkBlB,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,cAAc;6CAKxB,mBAAmB;;CAmBrB,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,gBAAgB;6CAK1B,qBAAqB;;CAmBvB,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,sBAAsB;6CAKhC,2BAA2B;;CAmB7B,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,YAAY;6CAKtB,iBAAiB;;CAqBnB,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,UAAU;6CAKpB,eAAe;;CA4BjB,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,iBAAiB;6CAK3B,sBAAsB;;CAQxB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createSafeContext as m, cn as o, getButtonA11yProps as C } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
-
import { cva as
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import { ChevronUp as
|
|
6
|
-
import { ChevronDown as
|
|
7
|
-
const
|
|
1
|
+
import { jsx as s, jsxs as f, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { createSafeContext as m, DisabledProvider as b, cn as o, getButtonA11yProps as C } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as g } from "class-variance-authority";
|
|
4
|
+
import { useMemo as N } from "react";
|
|
5
|
+
import { ChevronUp as h } from "../../Symbols/Icons/ChevronUp.js";
|
|
6
|
+
import { ChevronDown as w } from "../../Symbols/Icons/ChevronDown.js";
|
|
7
|
+
const y = ({
|
|
8
8
|
type: r,
|
|
9
9
|
expanded: t,
|
|
10
10
|
onClick: a,
|
|
@@ -36,7 +36,7 @@ const w = ({
|
|
|
36
36
|
onHeaderClick: void 0
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
}, [
|
|
39
|
+
}, [k, c] = m(
|
|
40
40
|
"Card",
|
|
41
41
|
{
|
|
42
42
|
cardClickable: !1,
|
|
@@ -44,9 +44,9 @@ const w = ({
|
|
|
44
44
|
footerExpanded: !0,
|
|
45
45
|
disabled: !1
|
|
46
46
|
}
|
|
47
|
-
), [
|
|
47
|
+
), [R, v] = m("CardContentAlign", {
|
|
48
48
|
align: "left"
|
|
49
|
-
}),
|
|
49
|
+
}), q = g(
|
|
50
50
|
"flex w-full flex-col overflow-clip rounded-lg bg-surface text-base transition-colors",
|
|
51
51
|
{
|
|
52
52
|
variants: {
|
|
@@ -76,19 +76,19 @@ const w = ({
|
|
|
76
76
|
disabled: !1
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
),
|
|
79
|
+
), H = ({
|
|
80
80
|
ref: r,
|
|
81
81
|
className: t,
|
|
82
82
|
type: a = "interactive",
|
|
83
83
|
expanded: e,
|
|
84
|
-
outlined:
|
|
84
|
+
outlined: n = !1,
|
|
85
85
|
disabled: i = !1,
|
|
86
86
|
onClick: d,
|
|
87
87
|
children: l,
|
|
88
|
-
...
|
|
88
|
+
...x
|
|
89
89
|
}) => {
|
|
90
|
-
const u =
|
|
91
|
-
() =>
|
|
90
|
+
const u = N(
|
|
91
|
+
() => y({
|
|
92
92
|
type: a,
|
|
93
93
|
expanded: e,
|
|
94
94
|
onClick: d,
|
|
@@ -96,32 +96,32 @@ const w = ({
|
|
|
96
96
|
}),
|
|
97
97
|
[a, e, d, i]
|
|
98
98
|
);
|
|
99
|
-
return /* @__PURE__ */
|
|
99
|
+
return /* @__PURE__ */ s(k, { value: u, children: /* @__PURE__ */ s(b, { value: { disabled: i }, children: /* @__PURE__ */ s(
|
|
100
100
|
"div",
|
|
101
101
|
{
|
|
102
102
|
ref: r,
|
|
103
103
|
...u.cardClickable && C({ onClick: d, disabled: i }),
|
|
104
104
|
className: o(
|
|
105
|
-
|
|
105
|
+
q({
|
|
106
106
|
interactive: u.cardClickable,
|
|
107
|
-
outlined:
|
|
107
|
+
outlined: n,
|
|
108
108
|
disabled: i
|
|
109
109
|
}),
|
|
110
110
|
t
|
|
111
111
|
),
|
|
112
|
-
...
|
|
112
|
+
...x,
|
|
113
113
|
children: l
|
|
114
114
|
}
|
|
115
|
-
) });
|
|
115
|
+
) }) });
|
|
116
116
|
};
|
|
117
|
-
|
|
118
|
-
const
|
|
117
|
+
H.displayName = "Card";
|
|
118
|
+
const A = ({
|
|
119
119
|
ref: r,
|
|
120
120
|
children: t,
|
|
121
121
|
className: a,
|
|
122
122
|
...e
|
|
123
123
|
}) => {
|
|
124
|
-
const { disabled:
|
|
124
|
+
const { disabled: n, headerClickable: i, footerExpanded: d, onHeaderClick: l } = c({
|
|
125
125
|
consumerName: "CardHeader",
|
|
126
126
|
contextRequired: !1
|
|
127
127
|
});
|
|
@@ -130,7 +130,7 @@ const H = ({
|
|
|
130
130
|
{
|
|
131
131
|
ref: r,
|
|
132
132
|
"aria-expanded": l ? d : void 0,
|
|
133
|
-
...C({ onClick: l, disabled:
|
|
133
|
+
...C({ onClick: l, disabled: n }),
|
|
134
134
|
className: o(
|
|
135
135
|
"flex items-center gap-12 p-12",
|
|
136
136
|
i && "cursor-pointer -outline-offset-6 transition-colors hover:bg-surface-hover focus-visible:outline-2 focus-visible:outline-focus active:bg-surface-pressed",
|
|
@@ -139,21 +139,21 @@ const H = ({
|
|
|
139
139
|
...e,
|
|
140
140
|
children: [
|
|
141
141
|
t,
|
|
142
|
-
l && /* @__PURE__ */ f(
|
|
143
|
-
d && /* @__PURE__ */
|
|
144
|
-
!d && /* @__PURE__ */
|
|
142
|
+
l && /* @__PURE__ */ f(p, { children: [
|
|
143
|
+
d && /* @__PURE__ */ s(h, { className: "text-muted", size: 20 }),
|
|
144
|
+
!d && /* @__PURE__ */ s(w, { className: "text-muted", size: 20 })
|
|
145
145
|
] })
|
|
146
146
|
]
|
|
147
147
|
}
|
|
148
148
|
);
|
|
149
149
|
};
|
|
150
|
-
|
|
151
|
-
const
|
|
150
|
+
A.displayName = "CardHeader";
|
|
151
|
+
const E = ({
|
|
152
152
|
ref: r,
|
|
153
153
|
children: t,
|
|
154
154
|
className: a,
|
|
155
155
|
...e
|
|
156
|
-
}) => /* @__PURE__ */
|
|
156
|
+
}) => /* @__PURE__ */ s(
|
|
157
157
|
"div",
|
|
158
158
|
{
|
|
159
159
|
ref: r,
|
|
@@ -162,24 +162,24 @@ const A = ({
|
|
|
162
162
|
children: t
|
|
163
163
|
}
|
|
164
164
|
);
|
|
165
|
-
|
|
166
|
-
const
|
|
165
|
+
E.displayName = "CardLeading";
|
|
166
|
+
const F = ({
|
|
167
167
|
ref: r,
|
|
168
168
|
children: t,
|
|
169
169
|
className: a,
|
|
170
170
|
...e
|
|
171
171
|
}) => {
|
|
172
|
-
const { align:
|
|
172
|
+
const { align: n } = v({
|
|
173
173
|
consumerName: "CardContent",
|
|
174
174
|
contextRequired: !1
|
|
175
175
|
});
|
|
176
|
-
return /* @__PURE__ */
|
|
176
|
+
return /* @__PURE__ */ s(
|
|
177
177
|
"div",
|
|
178
178
|
{
|
|
179
179
|
ref: r,
|
|
180
180
|
className: o(
|
|
181
181
|
"flex min-w-0 flex-1 flex-col gap-4",
|
|
182
|
-
|
|
182
|
+
n === "right" && "items-end text-end",
|
|
183
183
|
a
|
|
184
184
|
),
|
|
185
185
|
...e,
|
|
@@ -187,24 +187,24 @@ const E = ({
|
|
|
187
187
|
}
|
|
188
188
|
);
|
|
189
189
|
};
|
|
190
|
-
|
|
191
|
-
const
|
|
190
|
+
F.displayName = "CardContent";
|
|
191
|
+
const T = ({
|
|
192
192
|
ref: r,
|
|
193
193
|
children: t,
|
|
194
194
|
className: a,
|
|
195
195
|
...e
|
|
196
196
|
}) => {
|
|
197
|
-
const { align:
|
|
197
|
+
const { align: n } = v({
|
|
198
198
|
consumerName: "CardContentRow",
|
|
199
199
|
contextRequired: !1
|
|
200
200
|
});
|
|
201
|
-
return /* @__PURE__ */
|
|
201
|
+
return /* @__PURE__ */ s(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
204
204
|
ref: r,
|
|
205
205
|
className: o(
|
|
206
206
|
"flex min-w-0 items-center gap-8",
|
|
207
|
-
|
|
207
|
+
n === "right" && "justify-end",
|
|
208
208
|
a
|
|
209
209
|
),
|
|
210
210
|
...e,
|
|
@@ -212,24 +212,24 @@ const F = ({
|
|
|
212
212
|
}
|
|
213
213
|
);
|
|
214
214
|
};
|
|
215
|
-
|
|
216
|
-
const
|
|
215
|
+
T.displayName = "CardContentRow";
|
|
216
|
+
const D = ({
|
|
217
217
|
ref: r,
|
|
218
218
|
children: t,
|
|
219
219
|
className: a,
|
|
220
220
|
...e
|
|
221
221
|
}) => {
|
|
222
|
-
const { disabled:
|
|
222
|
+
const { disabled: n } = c({
|
|
223
223
|
consumerName: "CardContentTitle",
|
|
224
224
|
contextRequired: !1
|
|
225
225
|
});
|
|
226
|
-
return /* @__PURE__ */
|
|
226
|
+
return /* @__PURE__ */ s(
|
|
227
227
|
"div",
|
|
228
228
|
{
|
|
229
229
|
ref: r,
|
|
230
230
|
className: o(
|
|
231
231
|
"truncate body-2-semi-bold",
|
|
232
|
-
|
|
232
|
+
n && "text-disabled",
|
|
233
233
|
a
|
|
234
234
|
),
|
|
235
235
|
...e,
|
|
@@ -237,24 +237,24 @@ const T = ({
|
|
|
237
237
|
}
|
|
238
238
|
);
|
|
239
239
|
};
|
|
240
|
-
|
|
240
|
+
D.displayName = "CardContentTitle";
|
|
241
241
|
const j = ({
|
|
242
242
|
ref: r,
|
|
243
243
|
children: t,
|
|
244
244
|
className: a,
|
|
245
245
|
...e
|
|
246
246
|
}) => {
|
|
247
|
-
const { disabled:
|
|
247
|
+
const { disabled: n } = c({
|
|
248
248
|
consumerName: "CardContentDescription",
|
|
249
249
|
contextRequired: !1
|
|
250
250
|
});
|
|
251
|
-
return /* @__PURE__ */
|
|
251
|
+
return /* @__PURE__ */ s(
|
|
252
252
|
"div",
|
|
253
253
|
{
|
|
254
254
|
ref: r,
|
|
255
255
|
className: o(
|
|
256
256
|
"truncate body-3",
|
|
257
|
-
|
|
257
|
+
n ? "text-disabled" : "text-muted",
|
|
258
258
|
a
|
|
259
259
|
),
|
|
260
260
|
...e,
|
|
@@ -263,23 +263,23 @@ const j = ({
|
|
|
263
263
|
);
|
|
264
264
|
};
|
|
265
265
|
j.displayName = "CardContentDescription";
|
|
266
|
-
const
|
|
266
|
+
const P = ({
|
|
267
267
|
ref: r,
|
|
268
268
|
children: t,
|
|
269
269
|
className: a,
|
|
270
270
|
...e
|
|
271
271
|
}) => {
|
|
272
|
-
const { disabled:
|
|
272
|
+
const { disabled: n } = c({
|
|
273
273
|
consumerName: "CardTrailing",
|
|
274
274
|
contextRequired: !1
|
|
275
275
|
});
|
|
276
|
-
return /* @__PURE__ */
|
|
276
|
+
return /* @__PURE__ */ s(R, { value: { align: "right" }, children: /* @__PURE__ */ s(
|
|
277
277
|
"div",
|
|
278
278
|
{
|
|
279
279
|
ref: r,
|
|
280
280
|
className: o(
|
|
281
281
|
"flex shrink-0 items-center gap-12",
|
|
282
|
-
|
|
282
|
+
n && "text-disabled",
|
|
283
283
|
a
|
|
284
284
|
),
|
|
285
285
|
...e,
|
|
@@ -287,31 +287,31 @@ const D = ({
|
|
|
287
287
|
}
|
|
288
288
|
) });
|
|
289
289
|
};
|
|
290
|
-
|
|
290
|
+
P.displayName = "CardTrailing";
|
|
291
291
|
const z = ({
|
|
292
292
|
ref: r,
|
|
293
293
|
children: t,
|
|
294
294
|
className: a,
|
|
295
295
|
...e
|
|
296
296
|
}) => {
|
|
297
|
-
const { disabled:
|
|
297
|
+
const { disabled: n, footerExpanded: i } = c({
|
|
298
298
|
consumerName: "CardFooter",
|
|
299
299
|
contextRequired: !1
|
|
300
300
|
});
|
|
301
|
-
return /* @__PURE__ */
|
|
301
|
+
return /* @__PURE__ */ s(
|
|
302
302
|
"div",
|
|
303
303
|
{
|
|
304
304
|
className: o(
|
|
305
305
|
"grid flex-1 bg-muted-transparent transition-[grid-template-rows] duration-300",
|
|
306
306
|
i ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
307
307
|
),
|
|
308
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ s("div", { className: "overflow-hidden", children: /* @__PURE__ */ s(
|
|
309
309
|
"div",
|
|
310
310
|
{
|
|
311
311
|
ref: r,
|
|
312
312
|
className: o(
|
|
313
313
|
"flex w-full flex-col gap-8 px-12 py-10",
|
|
314
|
-
|
|
314
|
+
n && "text-disabled",
|
|
315
315
|
a
|
|
316
316
|
),
|
|
317
317
|
...e,
|
|
@@ -322,12 +322,12 @@ const z = ({
|
|
|
322
322
|
);
|
|
323
323
|
};
|
|
324
324
|
z.displayName = "CardFooter";
|
|
325
|
-
const
|
|
325
|
+
const V = ({
|
|
326
326
|
ref: r,
|
|
327
327
|
children: t,
|
|
328
328
|
className: a,
|
|
329
329
|
...e
|
|
330
|
-
}) => /* @__PURE__ */
|
|
330
|
+
}) => /* @__PURE__ */ s(
|
|
331
331
|
"div",
|
|
332
332
|
{
|
|
333
333
|
ref: r,
|
|
@@ -336,17 +336,17 @@ const P = ({
|
|
|
336
336
|
children: t
|
|
337
337
|
}
|
|
338
338
|
);
|
|
339
|
-
|
|
339
|
+
V.displayName = "CardFooterActions";
|
|
340
340
|
export {
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
H as Card,
|
|
342
|
+
F as CardContent,
|
|
343
343
|
j as CardContentDescription,
|
|
344
|
-
|
|
345
|
-
|
|
344
|
+
T as CardContentRow,
|
|
345
|
+
D as CardContentTitle,
|
|
346
346
|
z as CardFooter,
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
347
|
+
V as CardFooterActions,
|
|
348
|
+
A as CardHeader,
|
|
349
|
+
E as CardLeading,
|
|
350
|
+
P as CardTrailing,
|
|
351
|
+
y as resolveCardInnerContext
|
|
352
352
|
};
|
|
@@ -29,7 +29,7 @@ import { InteractiveIconProps } from './types';
|
|
|
29
29
|
* </InteractiveIcon>
|
|
30
30
|
*/
|
|
31
31
|
export declare const InteractiveIcon: {
|
|
32
|
-
({ ref, className, iconType, disabled: disabledProp, ...props }: InteractiveIconProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
({ ref, className, iconType, appearance, disabled: disabledProp, ...props }: InteractiveIconProps): import("react/jsx-runtime").JSX.Element;
|
|
33
33
|
displayName: string;
|
|
34
34
|
};
|
|
35
35
|
//# sourceMappingURL=InteractiveIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractiveIcon.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/InteractiveIcon/InteractiveIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"InteractiveIcon.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/InteractiveIcon/InteractiveIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AA6B/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe;iFAOzB,oBAAoB;;CAiBtB,CAAC"}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useDisabledContext as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useDisabledContext as d, cn as c } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { cva as l } from "class-variance-authority";
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const b = l(
|
|
5
|
+
[
|
|
6
|
+
"inline-flex size-fit items-center justify-center rounded-full",
|
|
7
|
+
"transition-colors",
|
|
8
|
+
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",
|
|
9
|
+
"disabled:text-disabled"
|
|
10
|
+
],
|
|
6
11
|
{
|
|
7
12
|
variants: {
|
|
8
13
|
iconType: {
|
|
9
14
|
filled: "",
|
|
10
15
|
stroked: "bg-base-transparent hover:bg-base-transparent-hover active:bg-base-transparent-pressed disabled:bg-disabled"
|
|
11
16
|
},
|
|
17
|
+
appearance: {
|
|
18
|
+
muted: "text-muted hover:text-muted-hover active:text-muted-pressed",
|
|
19
|
+
white: "text-white hover:text-white-hover active:text-white-pressed",
|
|
20
|
+
base: "text-base hover:text-base-hover active:text-base-pressed"
|
|
21
|
+
},
|
|
12
22
|
disabled: {
|
|
13
23
|
true: "cursor-default",
|
|
14
24
|
false: "cursor-pointer"
|
|
@@ -18,21 +28,25 @@ const c = l(
|
|
|
18
28
|
), u = ({
|
|
19
29
|
ref: t,
|
|
20
30
|
className: s,
|
|
21
|
-
iconType:
|
|
31
|
+
iconType: a,
|
|
32
|
+
appearance: i = "muted",
|
|
22
33
|
disabled: r = !1,
|
|
23
|
-
...
|
|
34
|
+
...o
|
|
24
35
|
}) => {
|
|
25
|
-
const e =
|
|
36
|
+
const e = d({
|
|
26
37
|
consumerName: "InteractiveIcon",
|
|
27
38
|
mergeWith: { disabled: r }
|
|
28
39
|
});
|
|
29
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ n(
|
|
30
41
|
"button",
|
|
31
42
|
{
|
|
32
|
-
...
|
|
43
|
+
...o,
|
|
33
44
|
ref: t,
|
|
34
45
|
disabled: e,
|
|
35
|
-
className:
|
|
46
|
+
className: c(
|
|
47
|
+
s,
|
|
48
|
+
b({ disabled: e, iconType: a, appearance: i })
|
|
49
|
+
)
|
|
36
50
|
}
|
|
37
51
|
);
|
|
38
52
|
};
|
|
@@ -10,6 +10,14 @@ export type InteractiveIconProps = {
|
|
|
10
10
|
* Choose 'filled' for icons with solid backgrounds or 'stroked' for outlined icons.
|
|
11
11
|
*/
|
|
12
12
|
iconType: 'filled' | 'stroked';
|
|
13
|
+
/**
|
|
14
|
+
* The visual style of the icon button.
|
|
15
|
+
* - 'muted': with muted background
|
|
16
|
+
* - 'white': with white background
|
|
17
|
+
* - 'base': with base background
|
|
18
|
+
* @default 'muted'
|
|
19
|
+
*/
|
|
20
|
+
appearance?: 'muted' | 'white' | 'base';
|
|
13
21
|
/**
|
|
14
22
|
* The icon component to display inside the button.
|
|
15
23
|
* Should be a single icon element from the design system.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/InteractiveIcon/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/InteractiveIcon/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;IACxC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { MediaCardProps, MediaCardTitleProps } from './types';
|
|
2
|
+
export declare const MediaCardTitle: {
|
|
3
|
+
({ ref, className, children, ...props }: MediaCardTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* A media card component for displaying a full-bleed background image with
|
|
8
|
+
* composable content and a close button, using gradient overlays to ensure
|
|
9
|
+
* readability.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* import { MediaCard, MediaCardTitle } from '@ledgerhq/lumen-ui-react';
|
|
13
|
+
* import { Tag } from '@ledgerhq/lumen-ui-react';
|
|
14
|
+
*
|
|
15
|
+
* <MediaCard
|
|
16
|
+
* imageUrl="/image.jpg"
|
|
17
|
+
* onClick={() => {}}
|
|
18
|
+
* onClose={() => {}}
|
|
19
|
+
* >
|
|
20
|
+
* <Tag label="New" size="md" />
|
|
21
|
+
* <MediaCardTitle>Card text</MediaCardTitle>
|
|
22
|
+
* </MediaCard>
|
|
23
|
+
*
|
|
24
|
+
* // Without close button
|
|
25
|
+
* <MediaCard imageUrl="/image.jpg" onClick={() => {}}>
|
|
26
|
+
* <MediaCardTitle>Card text</MediaCardTitle>
|
|
27
|
+
* </MediaCard>
|
|
28
|
+
*/
|
|
29
|
+
export declare const MediaCard: {
|
|
30
|
+
({ ref, imageUrl, children, onClick, onClose, closeAriaLabel, className, ...props }: MediaCardProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=MediaCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaCard.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaCard/MediaCard.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AA+C9D,eAAO,MAAM,cAAc;6CAKxB,mBAAmB;;CAUrB,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,SAAS;yFASnB,cAAc;;CAwDhB,CAAC"}
|