@ledgerhq/lumen-ui-react 0.1.47 → 0.1.49
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 +227 -219
- package/dist/lib/Components/AmountDisplay/AmountDisplay.js +10 -10
- package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.js +3 -3
- 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 +97 -57
- package/dist/lib/Components/Avatar/index.d.ts +1 -0
- package/dist/lib/Components/Avatar/index.d.ts.map +1 -1
- package/dist/lib/Components/Avatar/resolveAvatarColor.d.ts +9 -0
- package/dist/lib/Components/Avatar/resolveAvatarColor.d.ts.map +1 -0
- package/dist/lib/Components/Avatar/resolveAvatarColor.js +18 -0
- package/dist/lib/Components/Avatar/types.d.ts +23 -8
- package/dist/lib/Components/Avatar/types.d.ts.map +1 -1
- package/dist/lib/Components/AvatarButton/AvatarButton.d.ts +6 -0
- package/dist/lib/Components/AvatarButton/AvatarButton.d.ts.map +1 -0
- package/dist/lib/Components/AvatarButton/AvatarButton.js +52 -0
- package/dist/lib/Components/AvatarButton/index.d.ts +3 -0
- package/dist/lib/Components/AvatarButton/index.d.ts.map +1 -0
- package/dist/lib/Components/AvatarButton/types.d.ts +4 -0
- package/dist/lib/Components/AvatarButton/types.d.ts.map +1 -0
- package/dist/lib/Components/BaseInput/BaseInput.js +6 -6
- package/dist/lib/Components/BaseTag/BaseTag.js +4 -4
- package/dist/lib/Components/Button/BaseButton.d.ts +2 -2
- package/dist/lib/Components/Button/Button.js +8 -8
- package/dist/lib/Components/Card/Card.js +14 -14
- package/dist/lib/Components/CardButton/CardButton.js +6 -6
- package/dist/lib/Components/DataTable/DataTable.js +10 -10
- package/dist/lib/Components/Divider/Divider.js +4 -4
- package/dist/lib/Components/DotIcon/DotIcon.js +5 -5
- package/dist/lib/Components/DotIndicator/getDotIndicatorProps.d.ts +32 -0
- package/dist/lib/Components/DotIndicator/getDotIndicatorProps.d.ts.map +1 -1
- package/dist/lib/Components/DotIndicator/getDotIndicatorProps.js +7 -4
- package/dist/lib/Components/Icon/createIcon.js +6 -6
- package/dist/lib/Components/Link/Link.js +6 -6
- package/dist/lib/Components/ListItem/ListItem.js +4 -4
- package/dist/lib/Components/MediaBanner/MediaBanner.d.ts +1 -1
- package/dist/lib/Components/MediaBanner/MediaBanner.d.ts.map +1 -1
- package/dist/lib/Components/MediaBanner/MediaBanner.js +94 -75
- package/dist/lib/Components/MediaCard/MediaCard.js +4 -4
- package/dist/lib/Components/MediaImage/MediaImage.js +6 -6
- package/dist/lib/Components/Menu/Menu.js +33 -33
- package/dist/lib/Components/NavBar/CoinCapsule.js +4 -4
- package/dist/lib/Components/NavBar/NavBar.js +9 -9
- package/dist/lib/Components/Popover/Popover.js +14 -14
- package/dist/lib/Components/SegmentedControl/SegmentedControl.js +11 -11
- package/dist/lib/Components/SideBar/SideBar.js +34 -34
- package/dist/lib/Components/Spot/Spot.js +4 -4
- package/dist/lib/Components/Stepper/Stepper.js +6 -6
- package/dist/lib/Components/Table/Table.d.ts +24 -3
- package/dist/lib/Components/Table/Table.d.ts.map +1 -1
- package/dist/lib/Components/Table/Table.js +270 -182
- package/dist/lib/Components/Table/types.d.ts +63 -28
- package/dist/lib/Components/Table/types.d.ts.map +1 -1
- package/dist/lib/Components/Tooltip/Tooltip.js +4 -4
- package/dist/lib/Components/index.d.ts +1 -0
- package/dist/lib/Components/index.d.ts.map +1 -1
- package/dist/lib/Symbols/Icons/Atm.d.ts +29 -0
- package/dist/lib/Symbols/Icons/Atm.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/Atm.js +28 -0
- package/dist/lib/Symbols/Icons/Cutlery.d.ts +29 -0
- package/dist/lib/Symbols/Icons/Cutlery.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/Cutlery.js +28 -0
- package/dist/lib/Symbols/Icons/GameControler.d.ts +29 -0
- package/dist/lib/Symbols/Icons/GameControler.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/GameControler.js +28 -0
- package/dist/lib/Symbols/index.d.ts +3 -0
- package/dist/lib/Symbols/index.d.ts.map +1 -1
- package/dist/lib/Symbols/index.js +512 -506
- package/dist/libs/design-core/dist/lib/cssVar/cssVar.js +4 -0
- package/dist/libs/utils-shared/dist/index.js +135 -112
- package/dist/package.json +3 -3
- package/package.json +3 -3
|
@@ -2,8 +2,8 @@ import { jsx as o, jsxs as m } from "react/jsx-runtime";
|
|
|
2
2
|
import { createSafeContext as f, cn as w } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { flexRender as d } from "@tanstack/react-table";
|
|
4
4
|
import { useCallback as R, Fragment as x } from "react";
|
|
5
|
-
import { TableRoot as B, Table as N, TableLoadingRow as k, TableColGroup as y, TableCol as H, TableHeader as S, TableHeaderRow as G, TableHeaderCell as q, TableSortButton as v, TableBody as b, TableGroupHeaderRow as I, TableRow as
|
|
6
|
-
import { SearchInput as
|
|
5
|
+
import { TableRoot as B, Table as N, TableLoadingRow as k, TableColGroup as y, TableCol as H, TableHeader as S, TableHeaderRow as G, TableHeaderCell as q, TableSortButton as v, TableBody as b, TableGroupHeaderRow as I, TableRow as V, TableCell as F } from "../Table/Table.js";
|
|
6
|
+
import { SearchInput as M } from "../SearchInput/SearchInput.js";
|
|
7
7
|
const [j, i] = f("DataTableContext"), X = ({
|
|
8
8
|
table: l,
|
|
9
9
|
appearance: n = "no-background",
|
|
@@ -114,19 +114,19 @@ const [j, i] = f("DataTableContext"), X = ({
|
|
|
114
114
|
/* @__PURE__ */ m(N, { children: [
|
|
115
115
|
/* @__PURE__ */ o(L, {}),
|
|
116
116
|
!s && /* @__PURE__ */ o(P, {}),
|
|
117
|
-
u ? /* @__PURE__ */ o(
|
|
117
|
+
u ? /* @__PURE__ */ o(E, {}) : /* @__PURE__ */ o(z, {})
|
|
118
118
|
] }),
|
|
119
119
|
a === "infinite-scroll" && /* @__PURE__ */ o(k, {})
|
|
120
120
|
]
|
|
121
121
|
}
|
|
122
122
|
);
|
|
123
|
-
},
|
|
123
|
+
}, z = ({ className: l, ref: n, ...t }) => {
|
|
124
124
|
const { table: e } = i({
|
|
125
125
|
consumerName: "DataTableBody",
|
|
126
126
|
contextRequired: !0
|
|
127
127
|
});
|
|
128
128
|
return /* @__PURE__ */ o(b, { ref: n, className: l, ...t, children: e.getRowModel().rows.map((a) => /* @__PURE__ */ o(g, { row: a }, a.id)) });
|
|
129
|
-
},
|
|
129
|
+
}, A = (l, n) => {
|
|
130
130
|
const t = [];
|
|
131
131
|
let e = null;
|
|
132
132
|
for (const a of l) {
|
|
@@ -134,7 +134,7 @@ const [j, i] = f("DataTableContext"), X = ({
|
|
|
134
134
|
(!e || e.key !== s) && (e = { key: s, rows: [], count: 0 }, t.push(e)), e.rows.push(a), e.count++;
|
|
135
135
|
}
|
|
136
136
|
return t;
|
|
137
|
-
},
|
|
137
|
+
}, E = ({
|
|
138
138
|
className: l,
|
|
139
139
|
ref: n,
|
|
140
140
|
...t
|
|
@@ -142,7 +142,7 @@ const [j, i] = f("DataTableContext"), X = ({
|
|
|
142
142
|
const { table: e, groupBy: a, renderGroupHeader: s } = i({
|
|
143
143
|
consumerName: "DataTableGroupedBody",
|
|
144
144
|
contextRequired: !0
|
|
145
|
-
}), r =
|
|
145
|
+
}), r = A(e.getRowModel().rows, a);
|
|
146
146
|
return /* @__PURE__ */ o(b, { ref: n, className: l, ...t, children: r.map((c) => /* @__PURE__ */ m(x, { children: [
|
|
147
147
|
/* @__PURE__ */ o(I, { colSpan: c.rows[0].getVisibleCells().length, children: s ? s({ row: c.rows[0], count: c.count }) : c.key }),
|
|
148
148
|
c.rows.map((u) => /* @__PURE__ */ o(g, { row: u }, u.id))
|
|
@@ -153,14 +153,14 @@ const [j, i] = f("DataTableContext"), X = ({
|
|
|
153
153
|
contextRequired: !0
|
|
154
154
|
}), t = !!n;
|
|
155
155
|
return /* @__PURE__ */ o(
|
|
156
|
-
|
|
156
|
+
V,
|
|
157
157
|
{
|
|
158
158
|
clickable: t,
|
|
159
159
|
onClick: t ? () => n?.(l) : void 0,
|
|
160
160
|
children: l.getVisibleCells().map((e) => {
|
|
161
161
|
const a = e.column.columnDef.meta;
|
|
162
162
|
return /* @__PURE__ */ o(
|
|
163
|
-
|
|
163
|
+
F,
|
|
164
164
|
{
|
|
165
165
|
align: a?.align,
|
|
166
166
|
hideBelow: a?.hideBelow,
|
|
@@ -186,7 +186,7 @@ const [j, i] = f("DataTableContext"), X = ({
|
|
|
186
186
|
[t, l]
|
|
187
187
|
);
|
|
188
188
|
return /* @__PURE__ */ o(
|
|
189
|
-
|
|
189
|
+
M,
|
|
190
190
|
{
|
|
191
191
|
value: t.getState().globalFilter ?? "",
|
|
192
192
|
onChange: e,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as l } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
const d = ({
|
|
4
4
|
ref: o,
|
|
5
5
|
className: t,
|
|
6
6
|
orientation: r = "horizontal",
|
|
7
7
|
...e
|
|
8
|
-
}) => /* @__PURE__ */
|
|
8
|
+
}) => /* @__PURE__ */ a(
|
|
9
9
|
"div",
|
|
10
10
|
{
|
|
11
11
|
ref: o,
|
|
12
12
|
role: "separator",
|
|
13
13
|
"aria-orientation": r,
|
|
14
|
-
className:
|
|
14
|
+
className: l(
|
|
15
15
|
"border-muted-subtle",
|
|
16
16
|
r === "horizontal" ? "w-full border-t" : "h-full border-l",
|
|
17
17
|
t
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as h } from "react/jsx-runtime";
|
|
2
|
-
import { useDisabledContext as x, DisabledProvider as v, cn as
|
|
2
|
+
import { useDisabledContext as x, DisabledProvider as v, cn as n } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { cva as c } from "class-variance-authority";
|
|
4
4
|
import { useMemo as z } from "react";
|
|
5
5
|
const g = c("relative inline-flex w-fit", {
|
|
@@ -64,9 +64,9 @@ const g = c("relative inline-flex w-fit", {
|
|
|
64
64
|
"top-end": ["top", "right"],
|
|
65
65
|
"bottom-start": ["bottom", "left"],
|
|
66
66
|
"bottom-end": ["bottom", "right"]
|
|
67
|
-
},
|
|
67
|
+
}, i = -3, q = (s) => {
|
|
68
68
|
const [t, o] = I[s];
|
|
69
|
-
return { [t]:
|
|
69
|
+
return { [t]: i, [o]: i };
|
|
70
70
|
}, M = ({
|
|
71
71
|
children: s,
|
|
72
72
|
icon: t,
|
|
@@ -87,14 +87,14 @@ const g = c("relative inline-flex w-fit", {
|
|
|
87
87
|
"div",
|
|
88
88
|
{
|
|
89
89
|
ref: p,
|
|
90
|
-
className:
|
|
90
|
+
className: n(g({ disabled: f, className: l })),
|
|
91
91
|
...b,
|
|
92
92
|
children: [
|
|
93
93
|
/* @__PURE__ */ e("div", { className: "inline-flex", children: s }),
|
|
94
94
|
/* @__PURE__ */ e(
|
|
95
95
|
"div",
|
|
96
96
|
{
|
|
97
|
-
className:
|
|
97
|
+
className: n(N({ size: r, shape: d, pin: a, appearance: o })),
|
|
98
98
|
style: u,
|
|
99
99
|
children: /* @__PURE__ */ e(t, { size: D[r], className: "text-on-interactive" })
|
|
100
100
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export declare const getDotIndicatorProps: <Context extends "avatar", Variant extends keyof {
|
|
2
2
|
avatar: {
|
|
3
|
+
xs: {
|
|
4
|
+
size: "sm";
|
|
5
|
+
appearance: "red";
|
|
6
|
+
};
|
|
3
7
|
sm: {
|
|
4
8
|
size: "lg";
|
|
5
9
|
appearance: "red";
|
|
@@ -8,9 +12,25 @@ export declare const getDotIndicatorProps: <Context extends "avatar", Variant ex
|
|
|
8
12
|
size: "xl";
|
|
9
13
|
appearance: "red";
|
|
10
14
|
};
|
|
15
|
+
lg: {
|
|
16
|
+
size: "xl";
|
|
17
|
+
appearance: "red";
|
|
18
|
+
};
|
|
19
|
+
xl: {
|
|
20
|
+
size: "xl";
|
|
21
|
+
appearance: "red";
|
|
22
|
+
};
|
|
23
|
+
'2xl': {
|
|
24
|
+
size: "xl";
|
|
25
|
+
appearance: "red";
|
|
26
|
+
};
|
|
11
27
|
};
|
|
12
28
|
}[Context]>(context: Context, variant: Variant) => {
|
|
13
29
|
avatar: {
|
|
30
|
+
xs: {
|
|
31
|
+
size: "sm";
|
|
32
|
+
appearance: "red";
|
|
33
|
+
};
|
|
14
34
|
sm: {
|
|
15
35
|
size: "lg";
|
|
16
36
|
appearance: "red";
|
|
@@ -19,6 +39,18 @@ export declare const getDotIndicatorProps: <Context extends "avatar", Variant ex
|
|
|
19
39
|
size: "xl";
|
|
20
40
|
appearance: "red";
|
|
21
41
|
};
|
|
42
|
+
lg: {
|
|
43
|
+
size: "xl";
|
|
44
|
+
appearance: "red";
|
|
45
|
+
};
|
|
46
|
+
xl: {
|
|
47
|
+
size: "xl";
|
|
48
|
+
appearance: "red";
|
|
49
|
+
};
|
|
50
|
+
'2xl': {
|
|
51
|
+
size: "xl";
|
|
52
|
+
appearance: "red";
|
|
53
|
+
};
|
|
22
54
|
};
|
|
23
55
|
}[Context][Variant];
|
|
24
56
|
//# sourceMappingURL=getDotIndicatorProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDotIndicatorProps.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DotIndicator/getDotIndicatorProps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getDotIndicatorProps.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DotIndicator/getDotIndicatorProps.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAS/B,CAAC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { createPropsResolver as e } from "../../../libs/utils-shared/dist/index.js";
|
|
2
|
-
const
|
|
3
|
-
// larger avatars (`lg`, `xl`) don't render a dot indicator
|
|
2
|
+
const r = e({
|
|
4
3
|
avatar: {
|
|
4
|
+
xs: { size: "sm", appearance: "red" },
|
|
5
5
|
sm: { size: "lg", appearance: "red" },
|
|
6
|
-
md: { size: "xl", appearance: "red" }
|
|
6
|
+
md: { size: "xl", appearance: "red" },
|
|
7
|
+
lg: { size: "xl", appearance: "red" },
|
|
8
|
+
xl: { size: "xl", appearance: "red" },
|
|
9
|
+
"2xl": { size: "xl", appearance: "red" }
|
|
7
10
|
}
|
|
8
11
|
});
|
|
9
12
|
export {
|
|
10
|
-
|
|
13
|
+
r as getDotIndicatorProps
|
|
11
14
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { toPascalCase as c, useDisabledContext as
|
|
1
|
+
import { toPascalCase as c, useDisabledContext as l, cn as i } from "../../../libs/utils-shared/dist/index.js";
|
|
2
2
|
import { createElement as p } from "react";
|
|
3
3
|
import { Icon as d } from "./Icon.js";
|
|
4
4
|
const b = (e, t) => {
|
|
5
5
|
const r = ({
|
|
6
6
|
ref: o,
|
|
7
|
-
className:
|
|
8
|
-
disabled:
|
|
7
|
+
className: a,
|
|
8
|
+
disabled: s,
|
|
9
9
|
...m
|
|
10
10
|
}) => {
|
|
11
|
-
const n =
|
|
11
|
+
const n = l({
|
|
12
12
|
consumerName: e,
|
|
13
|
-
mergeWith: { disabled:
|
|
13
|
+
mergeWith: { disabled: s }
|
|
14
14
|
});
|
|
15
15
|
return p(d, {
|
|
16
16
|
ref: o,
|
|
17
|
-
className:
|
|
17
|
+
className: i(a, n && "text-disabled"),
|
|
18
18
|
viewBox: t.props.viewBox,
|
|
19
19
|
...m,
|
|
20
20
|
children: t.props.children
|
|
@@ -36,7 +36,7 @@ const w = k(
|
|
|
36
36
|
), V = ({
|
|
37
37
|
ref: d,
|
|
38
38
|
className: m,
|
|
39
|
-
children:
|
|
39
|
+
children: a,
|
|
40
40
|
appearance: f,
|
|
41
41
|
size: i = "inherit",
|
|
42
42
|
underline: p = !0,
|
|
@@ -46,7 +46,7 @@ const w = k(
|
|
|
46
46
|
disabled: b,
|
|
47
47
|
...v
|
|
48
48
|
}) => {
|
|
49
|
-
const
|
|
49
|
+
const s = x({
|
|
50
50
|
consumerName: "Link",
|
|
51
51
|
mergeWith: { disabled: b }
|
|
52
52
|
}), r = i ? {
|
|
@@ -62,17 +62,17 @@ const w = k(
|
|
|
62
62
|
appearance: f,
|
|
63
63
|
size: i,
|
|
64
64
|
underline: p,
|
|
65
|
-
disabled:
|
|
65
|
+
disabled: s
|
|
66
66
|
}),
|
|
67
67
|
m
|
|
68
68
|
),
|
|
69
|
-
"aria-disabled":
|
|
69
|
+
"aria-disabled": s || void 0,
|
|
70
70
|
target: n && !t ? "_blank" : void 0,
|
|
71
71
|
rel: n && !t ? "noopener noreferrer" : void 0,
|
|
72
72
|
...v,
|
|
73
|
-
children: t ?
|
|
73
|
+
children: t ? a : /* @__PURE__ */ l(c, { children: [
|
|
74
74
|
o && /* @__PURE__ */ e(o, { size: r }),
|
|
75
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 truncate", children:
|
|
75
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: a }),
|
|
76
76
|
n && /* @__PURE__ */ l(c, { children: [
|
|
77
77
|
/* @__PURE__ */ e(z, { size: r, "aria-hidden": "true" }),
|
|
78
78
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "(opens in a new tab)" })
|
|
@@ -59,14 +59,14 @@ const [L, l] = b("ListItemTrailing", {
|
|
|
59
59
|
className: r,
|
|
60
60
|
disabled: n = !1,
|
|
61
61
|
density: f = "expanded",
|
|
62
|
-
priority:
|
|
62
|
+
priority: x = "end",
|
|
63
63
|
active: u = !1,
|
|
64
|
-
...
|
|
64
|
+
...v
|
|
65
65
|
} = s, c = d({
|
|
66
66
|
consumerName: "ListItem",
|
|
67
67
|
mergeWith: { disabled: n }
|
|
68
68
|
});
|
|
69
|
-
return /* @__PURE__ */ a(p, { value: { disabled: c }, children: /* @__PURE__ */ a(N, { value: { priority:
|
|
69
|
+
return /* @__PURE__ */ a(p, { value: { disabled: c }, children: /* @__PURE__ */ a(N, { value: { priority: x }, children: /* @__PURE__ */ a(
|
|
70
70
|
"div",
|
|
71
71
|
{
|
|
72
72
|
ref: t,
|
|
@@ -81,7 +81,7 @@ const [L, l] = b("ListItemTrailing", {
|
|
|
81
81
|
}),
|
|
82
82
|
r
|
|
83
83
|
),
|
|
84
|
-
...
|
|
84
|
+
...v,
|
|
85
85
|
children: i
|
|
86
86
|
}
|
|
87
87
|
) }) });
|
|
@@ -4,7 +4,7 @@ import { MediaBannerDescriptionProps, MediaBannerProps, MediaBannerTitleProps }
|
|
|
4
4
|
*
|
|
5
5
|
* @see {@link https://ldls.vercel.app/?path=/docs/react-mediabanner--docs Storybook}
|
|
6
6
|
*/
|
|
7
|
-
export declare const MediaBanner: ({ ref, imageUrl, onClose, closeAriaLabel, children, className, ...props }: MediaBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const MediaBanner: ({ ref, imageUrl, onClose, closeAriaLabel, children, className, onClick, ...props }: MediaBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
/**
|
|
9
9
|
* The title of the MediaBanner. Clamps at 1 line.
|
|
10
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaBanner.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaBanner/MediaBanner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MediaBanner.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaBanner/MediaBanner.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,2BAA2B,EAC3B,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAejB;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,oFASzB,gBAAgB,4CAuDlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,wCAK9B,qBAAqB,4CAUvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,wCAKpC,2BAA2B,4CAU7B,CAAC"}
|
|
@@ -1,94 +1,113 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cn as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as n, getButtonA11yProps as v } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as b } from "class-variance-authority";
|
|
4
|
+
import { useState as x, useEffect as g } from "react";
|
|
5
|
+
import { useCommonTranslation as h } from "../../../i18n/useCommonTranslation.js";
|
|
6
|
+
import { Close as N } from "../../Symbols/Icons/Close.js";
|
|
7
|
+
import { InteractiveIcon as w } from "../InteractiveIcon/InteractiveIcon.js";
|
|
8
|
+
const y = b(
|
|
9
|
+
"flex h-72 w-full flex-row overflow-hidden rounded-md bg-surface text-start select-none",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
interactive: {
|
|
13
|
+
true: "group relative cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",
|
|
14
|
+
false: "cursor-default"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: { interactive: !1 }
|
|
18
|
+
}
|
|
19
|
+
), k = ({
|
|
8
20
|
ref: r,
|
|
9
|
-
imageUrl:
|
|
10
|
-
onClose:
|
|
11
|
-
closeAriaLabel:
|
|
12
|
-
children:
|
|
13
|
-
className:
|
|
21
|
+
imageUrl: t,
|
|
22
|
+
onClose: a,
|
|
23
|
+
closeAriaLabel: s,
|
|
24
|
+
children: c,
|
|
25
|
+
className: d,
|
|
26
|
+
onClick: o,
|
|
14
27
|
...m
|
|
15
28
|
}) => {
|
|
16
|
-
const { t:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
const
|
|
21
|
-
return /* @__PURE__ */ n(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
const { t: u } = h(), [f, l] = x(!1);
|
|
30
|
+
g(() => {
|
|
31
|
+
l(!1);
|
|
32
|
+
}, [t]);
|
|
33
|
+
const p = t && !f;
|
|
34
|
+
return /* @__PURE__ */ i("div", { className: n("relative w-full", d), children: [
|
|
35
|
+
/* @__PURE__ */ i(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
ref: r,
|
|
39
|
+
...v({ onClick: o }),
|
|
40
|
+
className: y({ interactive: !!o }),
|
|
41
|
+
...m,
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ e("div", { className: "flex flex-1 items-center px-12 py-2", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-4 py-12", children: c }) }),
|
|
44
|
+
/* @__PURE__ */ i("div", { className: "relative w-128", children: [
|
|
45
|
+
p && /* @__PURE__ */ e(
|
|
46
|
+
"img",
|
|
47
|
+
{
|
|
48
|
+
src: t,
|
|
49
|
+
alt: "",
|
|
50
|
+
"aria-hidden": !0,
|
|
51
|
+
className: "absolute inset-0 size-full object-cover",
|
|
52
|
+
onError: () => l(!0)
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-0 bg-linear-[45deg] from-black/0 from-67% to-black/80" })
|
|
56
|
+
] }),
|
|
57
|
+
!!o && /* @__PURE__ */ e(
|
|
58
|
+
"div",
|
|
35
59
|
{
|
|
36
|
-
src: e,
|
|
37
|
-
alt: "",
|
|
38
60
|
"aria-hidden": !0,
|
|
39
|
-
className: "absolute inset-0
|
|
40
|
-
onError: () => i(!0)
|
|
61
|
+
className: "pointer-events-none absolute inset-0 group-hover:bg-base-transparent-hover group-active:bg-base-transparent-pressed"
|
|
41
62
|
}
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
);
|
|
63
|
-
}, B = ({
|
|
63
|
+
)
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
a && /* @__PURE__ */ e(
|
|
68
|
+
w,
|
|
69
|
+
{
|
|
70
|
+
"data-testid": "media-banner-close-button",
|
|
71
|
+
type: "button",
|
|
72
|
+
iconType: "stroked",
|
|
73
|
+
appearance: "white",
|
|
74
|
+
icon: N,
|
|
75
|
+
size: 16,
|
|
76
|
+
className: "absolute top-8 right-8",
|
|
77
|
+
onClick: a,
|
|
78
|
+
"aria-label": s || u("components.banner.closeAriaLabel")
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] });
|
|
82
|
+
}, z = ({
|
|
64
83
|
ref: r,
|
|
65
|
-
children:
|
|
66
|
-
className:
|
|
67
|
-
...
|
|
68
|
-
}) => /* @__PURE__ */
|
|
84
|
+
children: t,
|
|
85
|
+
className: a,
|
|
86
|
+
...s
|
|
87
|
+
}) => /* @__PURE__ */ e(
|
|
69
88
|
"div",
|
|
70
89
|
{
|
|
71
90
|
ref: r,
|
|
72
|
-
className:
|
|
73
|
-
...
|
|
74
|
-
children:
|
|
91
|
+
className: n("line-clamp-1 body-2-semi-bold text-base", a),
|
|
92
|
+
...s,
|
|
93
|
+
children: t
|
|
75
94
|
}
|
|
76
|
-
),
|
|
95
|
+
), A = ({
|
|
77
96
|
ref: r,
|
|
78
|
-
children:
|
|
79
|
-
className:
|
|
80
|
-
...
|
|
81
|
-
}) => /* @__PURE__ */
|
|
97
|
+
children: t,
|
|
98
|
+
className: a,
|
|
99
|
+
...s
|
|
100
|
+
}) => /* @__PURE__ */ e(
|
|
82
101
|
"div",
|
|
83
102
|
{
|
|
84
103
|
ref: r,
|
|
85
|
-
className:
|
|
86
|
-
...
|
|
87
|
-
children:
|
|
104
|
+
className: n("line-clamp-2 body-3 text-muted", a),
|
|
105
|
+
...s,
|
|
106
|
+
children: t
|
|
88
107
|
}
|
|
89
108
|
);
|
|
90
109
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
110
|
+
k as MediaBanner,
|
|
111
|
+
A as MediaBannerDescription,
|
|
112
|
+
z as MediaBannerTitle
|
|
94
113
|
};
|
|
@@ -67,8 +67,8 @@ const r = {
|
|
|
67
67
|
onClick: a,
|
|
68
68
|
onClose: l,
|
|
69
69
|
closeAriaLabel: u,
|
|
70
|
-
className:
|
|
71
|
-
...
|
|
70
|
+
className: f,
|
|
71
|
+
...p
|
|
72
72
|
}) => {
|
|
73
73
|
const { t: v } = z(), [g, c] = x(!1), b = t && !g;
|
|
74
74
|
return N(() => {
|
|
@@ -79,10 +79,10 @@ const r = {
|
|
|
79
79
|
...y({ onClick: a }),
|
|
80
80
|
className: m(
|
|
81
81
|
r.root({ interactive: !!a }),
|
|
82
|
-
|
|
82
|
+
f
|
|
83
83
|
),
|
|
84
84
|
ref: i,
|
|
85
|
-
...
|
|
85
|
+
...p,
|
|
86
86
|
children: [
|
|
87
87
|
b && /* @__PURE__ */ e(
|
|
88
88
|
"img",
|
|
@@ -47,7 +47,7 @@ const S = {
|
|
|
47
47
|
className: n,
|
|
48
48
|
src: r,
|
|
49
49
|
alt: l,
|
|
50
|
-
size:
|
|
50
|
+
size: a = 48,
|
|
51
51
|
shape: u = "square",
|
|
52
52
|
imgLoading: m = "eager",
|
|
53
53
|
fallback: t,
|
|
@@ -55,18 +55,18 @@ const S = {
|
|
|
55
55
|
disabled: c = !1,
|
|
56
56
|
...f
|
|
57
57
|
}) => {
|
|
58
|
-
const [p,
|
|
58
|
+
const [p, i] = v(!1), o = !r || p, z = x({
|
|
59
59
|
consumerName: "MediaImage",
|
|
60
60
|
mergeWith: { disabled: c }
|
|
61
61
|
});
|
|
62
62
|
return N(() => {
|
|
63
|
-
|
|
63
|
+
i(!1);
|
|
64
64
|
}, [r]), /* @__PURE__ */ h(
|
|
65
65
|
"div",
|
|
66
66
|
{
|
|
67
67
|
ref: d,
|
|
68
68
|
className: b(
|
|
69
|
-
y.root({ size:
|
|
69
|
+
y.root({ size: a, shape: u, disabled: z }),
|
|
70
70
|
n
|
|
71
71
|
),
|
|
72
72
|
role: "img",
|
|
@@ -78,7 +78,7 @@ const S = {
|
|
|
78
78
|
"span",
|
|
79
79
|
{
|
|
80
80
|
className: "text-base select-none",
|
|
81
|
-
style: { fontSize: S[
|
|
81
|
+
style: { fontSize: S[a] },
|
|
82
82
|
"aria-hidden": "true",
|
|
83
83
|
children: t[0]?.toUpperCase()
|
|
84
84
|
}
|
|
@@ -90,7 +90,7 @@ const S = {
|
|
|
90
90
|
src: r,
|
|
91
91
|
alt: "",
|
|
92
92
|
loading: m,
|
|
93
|
-
onError: () =>
|
|
93
|
+
onError: () => i(!0),
|
|
94
94
|
className: "size-full object-cover",
|
|
95
95
|
"aria-hidden": "true"
|
|
96
96
|
}
|