@ledgerhq/lumen-ui-react 0.1.48 → 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.
Files changed (56) hide show
  1. package/dist/index.js +227 -223
  2. package/dist/lib/Components/AmountDisplay/AmountDisplay.js +10 -10
  3. package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.js +3 -3
  4. package/dist/lib/Components/Avatar/Avatar.d.ts +1 -1
  5. package/dist/lib/Components/Avatar/Avatar.d.ts.map +1 -1
  6. package/dist/lib/Components/Avatar/Avatar.js +97 -57
  7. package/dist/lib/Components/Avatar/index.d.ts +1 -0
  8. package/dist/lib/Components/Avatar/index.d.ts.map +1 -1
  9. package/dist/lib/Components/Avatar/resolveAvatarColor.d.ts +9 -0
  10. package/dist/lib/Components/Avatar/resolveAvatarColor.d.ts.map +1 -0
  11. package/dist/lib/Components/Avatar/resolveAvatarColor.js +18 -0
  12. package/dist/lib/Components/Avatar/types.d.ts +23 -8
  13. package/dist/lib/Components/Avatar/types.d.ts.map +1 -1
  14. package/dist/lib/Components/AvatarButton/AvatarButton.d.ts +6 -0
  15. package/dist/lib/Components/AvatarButton/AvatarButton.d.ts.map +1 -0
  16. package/dist/lib/Components/AvatarButton/AvatarButton.js +52 -0
  17. package/dist/lib/Components/AvatarButton/index.d.ts +3 -0
  18. package/dist/lib/Components/AvatarButton/index.d.ts.map +1 -0
  19. package/dist/lib/Components/AvatarButton/types.d.ts +4 -0
  20. package/dist/lib/Components/AvatarButton/types.d.ts.map +1 -0
  21. package/dist/lib/Components/BaseInput/BaseInput.js +6 -6
  22. package/dist/lib/Components/BaseTag/BaseTag.js +4 -4
  23. package/dist/lib/Components/Button/BaseButton.d.ts +2 -2
  24. package/dist/lib/Components/Button/Button.js +8 -8
  25. package/dist/lib/Components/Card/Card.js +14 -14
  26. package/dist/lib/Components/CardButton/CardButton.js +6 -6
  27. package/dist/lib/Components/DataTable/DataTable.js +10 -10
  28. package/dist/lib/Components/Divider/Divider.js +4 -4
  29. package/dist/lib/Components/DotIcon/DotIcon.js +5 -5
  30. package/dist/lib/Components/DotIndicator/getDotIndicatorProps.d.ts +32 -0
  31. package/dist/lib/Components/DotIndicator/getDotIndicatorProps.d.ts.map +1 -1
  32. package/dist/lib/Components/DotIndicator/getDotIndicatorProps.js +7 -4
  33. package/dist/lib/Components/Icon/createIcon.js +6 -6
  34. package/dist/lib/Components/Link/Link.js +6 -6
  35. package/dist/lib/Components/ListItem/ListItem.js +4 -4
  36. package/dist/lib/Components/MediaBanner/MediaBanner.d.ts +1 -1
  37. package/dist/lib/Components/MediaBanner/MediaBanner.d.ts.map +1 -1
  38. package/dist/lib/Components/MediaBanner/MediaBanner.js +94 -75
  39. package/dist/lib/Components/MediaCard/MediaCard.js +4 -4
  40. package/dist/lib/Components/MediaImage/MediaImage.js +6 -6
  41. package/dist/lib/Components/Menu/Menu.js +33 -33
  42. package/dist/lib/Components/NavBar/CoinCapsule.js +4 -4
  43. package/dist/lib/Components/NavBar/NavBar.js +9 -9
  44. package/dist/lib/Components/Popover/Popover.js +14 -14
  45. package/dist/lib/Components/SegmentedControl/SegmentedControl.js +11 -11
  46. package/dist/lib/Components/SideBar/SideBar.js +34 -34
  47. package/dist/lib/Components/Spot/Spot.js +4 -4
  48. package/dist/lib/Components/Stepper/Stepper.js +6 -6
  49. package/dist/lib/Components/Table/Table.js +9 -9
  50. package/dist/lib/Components/Tooltip/Tooltip.js +4 -4
  51. package/dist/lib/Components/index.d.ts +1 -0
  52. package/dist/lib/Components/index.d.ts.map +1 -1
  53. package/dist/libs/design-core/dist/lib/cssVar/cssVar.js +4 -0
  54. package/dist/libs/utils-shared/dist/index.js +135 -112
  55. package/dist/package.json +2 -2
  56. 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 F, TableCell as M } from "../Table/Table.js";
6
- import { SearchInput as V } from "../SearchInput/SearchInput.js";
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(A, {}) : /* @__PURE__ */ o(U, {})
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
- }, U = ({ className: l, ref: n, ...t }) => {
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
- }, z = (l, n) => {
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
- }, A = ({
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 = z(e.getRowModel().rows, a);
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
- F,
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
- M,
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
- V,
189
+ M,
190
190
  {
191
191
  value: t.getState().globalFilter ?? "",
192
192
  onChange: e,
@@ -1,17 +1,17 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { cn as a } from "../../../libs/utils-shared/dist/index.js";
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__ */ l(
8
+ }) => /* @__PURE__ */ a(
9
9
  "div",
10
10
  {
11
11
  ref: o,
12
12
  role: "separator",
13
13
  "aria-orientation": r,
14
- className: a(
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 i } from "../../../libs/utils-shared/dist/index.js";
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
- }, n = -3, q = (s) => {
67
+ }, i = -3, q = (s) => {
68
68
  const [t, o] = I[s];
69
- return { [t]: n, [o]: n };
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: i(g({ disabled: f, className: l })),
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: i(N({ size: r, shape: d, pin: a, appearance: o })),
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":"AAGA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;mBAM/B,CAAC"}
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 a = e({
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
- a as getDotIndicatorProps
13
+ r as getDotIndicatorProps
11
14
  };
@@ -1,20 +1,20 @@
1
- import { toPascalCase as c, useDisabledContext as i, cn as l } from "../../../libs/utils-shared/dist/index.js";
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: s,
8
- disabled: a,
7
+ className: a,
8
+ disabled: s,
9
9
  ...m
10
10
  }) => {
11
- const n = i({
11
+ const n = l({
12
12
  consumerName: e,
13
- mergeWith: { disabled: a }
13
+ mergeWith: { disabled: s }
14
14
  });
15
15
  return p(d, {
16
16
  ref: o,
17
- className: l(s, n && "text-disabled"),
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: s,
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 a = x({
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: a
65
+ disabled: s
66
66
  }),
67
67
  m
68
68
  ),
69
- "aria-disabled": a || void 0,
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 ? s : /* @__PURE__ */ l(c, { children: [
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: s }),
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: v = "end",
62
+ priority: x = "end",
63
63
  active: u = !1,
64
- ...x
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: v }, children: /* @__PURE__ */ a(
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
- ...x,
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":"AAKA,OAAO,KAAK,EACV,2BAA2B,EAC3B,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,2EAQzB,gBAAgB,4CAmDlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,wCAK9B,qBAAqB,4CAUvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,wCAKpC,2BAA2B,4CAU7B,CAAC"}
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 n, jsx as a } from "react/jsx-runtime";
2
- import { cn as s } from "../../../libs/utils-shared/dist/index.js";
3
- import { useState as u, useEffect as v } from "react";
4
- import { useCommonTranslation as x } from "../../../i18n/useCommonTranslation.js";
5
- import { Close as h } from "../../Symbols/Icons/Close.js";
6
- import { InteractiveIcon as N } from "../InteractiveIcon/InteractiveIcon.js";
7
- const j = ({
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: e,
10
- onClose: o,
11
- closeAriaLabel: t,
12
- children: l,
13
- className: c,
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: d } = x(), [p, i] = u(!1);
17
- v(() => {
18
- i(!1);
19
- }, [e]);
20
- const f = e && !p;
21
- return /* @__PURE__ */ n(
22
- "div",
23
- {
24
- ref: r,
25
- className: s(
26
- "relative flex h-72 flex-row overflow-hidden rounded-md bg-surface",
27
- c
28
- ),
29
- ...m,
30
- children: [
31
- /* @__PURE__ */ a("div", { className: "flex flex-1 items-center px-12 py-2", children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-4 py-12", children: l }) }),
32
- /* @__PURE__ */ n("div", { className: "relative w-128", children: [
33
- f && /* @__PURE__ */ a(
34
- "img",
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 size-full object-cover",
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
- /* @__PURE__ */ a("div", { className: "absolute inset-0 bg-linear-[45deg] from-black/0 from-67% to-black/80" })
44
- ] }),
45
- o && /* @__PURE__ */ a(
46
- N,
47
- {
48
- type: "button",
49
- iconType: "stroked",
50
- appearance: "white",
51
- icon: h,
52
- size: 16,
53
- className: "absolute top-8 right-8",
54
- onClick: (b) => {
55
- b.stopPropagation(), o();
56
- },
57
- "aria-label": t || d("components.banner.closeAriaLabel")
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: e,
66
- className: o,
67
- ...t
68
- }) => /* @__PURE__ */ a(
84
+ children: t,
85
+ className: a,
86
+ ...s
87
+ }) => /* @__PURE__ */ e(
69
88
  "div",
70
89
  {
71
90
  ref: r,
72
- className: s("line-clamp-1 body-2-semi-bold text-base", o),
73
- ...t,
74
- children: e
91
+ className: n("line-clamp-1 body-2-semi-bold text-base", a),
92
+ ...s,
93
+ children: t
75
94
  }
76
- ), L = ({
95
+ ), A = ({
77
96
  ref: r,
78
- children: e,
79
- className: o,
80
- ...t
81
- }) => /* @__PURE__ */ a(
97
+ children: t,
98
+ className: a,
99
+ ...s
100
+ }) => /* @__PURE__ */ e(
82
101
  "div",
83
102
  {
84
103
  ref: r,
85
- className: s("line-clamp-2 body-3 text-muted", o),
86
- ...t,
87
- children: e
104
+ className: n("line-clamp-2 body-3 text-muted", a),
105
+ ...s,
106
+ children: t
88
107
  }
89
108
  );
90
109
  export {
91
- j as MediaBanner,
92
- L as MediaBannerDescription,
93
- B as MediaBannerTitle
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: p,
71
- ...f
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
- p
82
+ f
83
83
  ),
84
84
  ref: i,
85
- ...f,
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: i = 48,
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, a] = v(!1), o = !r || p, z = x({
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
- a(!1);
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: i, shape: u, disabled: z }),
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[i] },
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: () => a(!0),
93
+ onError: () => i(!0),
94
94
  className: "size-full object-cover",
95
95
  "aria-hidden": "true"
96
96
  }