@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.
Files changed (136) hide show
  1. package/dist/i18n/locales/de.json.d.ts +3 -0
  2. package/dist/i18n/locales/de.json.js +4 -2
  3. package/dist/i18n/locales/en.json.d.ts +3 -0
  4. package/dist/i18n/locales/en.json.js +6 -4
  5. package/dist/i18n/locales/es.json.d.ts +3 -0
  6. package/dist/i18n/locales/es.json.js +6 -4
  7. package/dist/i18n/locales/fr.json.d.ts +3 -0
  8. package/dist/i18n/locales/fr.json.js +6 -4
  9. package/dist/i18n/locales/ja.json.d.ts +3 -0
  10. package/dist/i18n/locales/ja.json.js +6 -4
  11. package/dist/i18n/locales/ko.json.d.ts +3 -0
  12. package/dist/i18n/locales/ko.json.js +6 -4
  13. package/dist/i18n/locales/pt.json.d.ts +3 -0
  14. package/dist/i18n/locales/pt.json.js +6 -4
  15. package/dist/i18n/locales/ru.json.d.ts +3 -0
  16. package/dist/i18n/locales/ru.json.js +6 -4
  17. package/dist/i18n/locales/th.json.d.ts +3 -0
  18. package/dist/i18n/locales/th.json.js +6 -4
  19. package/dist/i18n/locales/tr.json.d.ts +3 -0
  20. package/dist/i18n/locales/tr.json.js +6 -4
  21. package/dist/i18n/locales/zh.json.d.ts +3 -0
  22. package/dist/i18n/locales/zh.json.js +6 -4
  23. package/dist/index.js +114 -113
  24. package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
  25. package/dist/lib/Components/AmountDisplay/AmountDisplay.js +41 -41
  26. package/dist/lib/Components/AmountInput/AmountInput.d.ts +1 -1
  27. package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  28. package/dist/lib/Components/AmountInput/AmountInput.js +35 -32
  29. package/dist/lib/Components/Banner/Banner.js +5 -5
  30. package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -1
  31. package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  32. package/dist/lib/Components/BaseInput/BaseInput.js +44 -41
  33. package/dist/lib/Components/Button/BaseButton.d.ts +1 -1
  34. package/dist/lib/Components/Button/BaseButton.d.ts.map +1 -1
  35. package/dist/lib/Components/Button/BaseButton.js +28 -25
  36. package/dist/lib/Components/Button/Button.js +9 -9
  37. package/dist/lib/Components/Card/Card.d.ts.map +1 -1
  38. package/dist/lib/Components/Card/Card.js +110 -107
  39. package/dist/lib/Components/Card/types.d.ts +1 -0
  40. package/dist/lib/Components/Card/types.d.ts.map +1 -1
  41. package/dist/lib/Components/CardButton/CardButton.d.ts +1 -1
  42. package/dist/lib/Components/CardButton/CardButton.d.ts.map +1 -1
  43. package/dist/lib/Components/CardButton/CardButton.js +28 -24
  44. package/dist/lib/Components/Checkbox/Checkbox.d.ts +1 -1
  45. package/dist/lib/Components/Checkbox/Checkbox.d.ts.map +1 -1
  46. package/dist/lib/Components/Checkbox/Checkbox.js +26 -14
  47. package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +2 -2
  48. package/dist/lib/Components/Dialog/types.d.ts +1 -1
  49. package/dist/lib/Components/Icon/Icon.js +4 -4
  50. package/dist/lib/Components/Icon/createIcon.js +4 -4
  51. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +1 -1
  52. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
  53. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +40 -20
  54. package/dist/lib/Components/InteractiveIcon/types.d.ts +14 -1
  55. package/dist/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
  56. package/dist/lib/Components/Link/Link.d.ts +1 -1
  57. package/dist/lib/Components/Link/Link.d.ts.map +1 -1
  58. package/dist/lib/Components/Link/Link.js +44 -33
  59. package/dist/lib/Components/Link/types.d.ts +5 -0
  60. package/dist/lib/Components/Link/types.d.ts.map +1 -1
  61. package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
  62. package/dist/lib/Components/ListItem/ListItem.js +72 -65
  63. package/dist/lib/Components/MediaCard/MediaCard.d.ts +33 -0
  64. package/dist/lib/Components/MediaCard/MediaCard.d.ts.map +1 -0
  65. package/dist/lib/Components/MediaCard/MediaCard.js +128 -0
  66. package/dist/lib/Components/MediaCard/index.d.ts +3 -0
  67. package/dist/lib/Components/MediaCard/index.d.ts.map +1 -0
  68. package/dist/lib/Components/MediaCard/types.d.ts +30 -0
  69. package/dist/lib/Components/MediaCard/types.d.ts.map +1 -0
  70. package/dist/lib/Components/Menu/Menu.d.ts +3 -3
  71. package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
  72. package/dist/lib/Components/Menu/Menu.js +133 -104
  73. package/dist/lib/Components/NavBar/CoinCapsule.js +4 -4
  74. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
  75. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  76. package/dist/lib/Components/SegmentedControl/SegmentedControl.js +88 -51
  77. package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts +1 -1
  78. package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
  79. package/dist/lib/Components/Select/Select.d.ts +5 -5
  80. package/dist/lib/Components/Select/Select.d.ts.map +1 -1
  81. package/dist/lib/Components/Select/Select.js +94 -76
  82. package/dist/lib/Components/Select/index.d.ts +1 -1
  83. package/dist/lib/Components/Select/types.d.ts +4 -4
  84. package/dist/lib/Components/SideBar/SideBar.d.ts +1 -1
  85. package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
  86. package/dist/lib/Components/SideBar/SideBar.js +77 -74
  87. package/dist/lib/Components/SideBar/types.d.ts +12 -4
  88. package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
  89. package/dist/lib/Components/Spot/Spot.js +3 -3
  90. package/dist/lib/Components/Stepper/Stepper.d.ts.map +1 -1
  91. package/dist/lib/Components/Stepper/Stepper.js +34 -24
  92. package/dist/lib/Components/Subheader/Subheader.d.ts +2 -7
  93. package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
  94. package/dist/lib/Components/Subheader/Subheader.js +31 -49
  95. package/dist/lib/Components/Subheader/index.d.ts +1 -1
  96. package/dist/lib/Components/Subheader/index.d.ts.map +1 -1
  97. package/dist/lib/Components/Subheader/types.d.ts +1 -11
  98. package/dist/lib/Components/Subheader/types.d.ts.map +1 -1
  99. package/dist/lib/Components/Switch/Switch.d.ts +1 -1
  100. package/dist/lib/Components/Switch/Switch.d.ts.map +1 -1
  101. package/dist/lib/Components/Switch/Switch.js +30 -22
  102. package/dist/lib/Components/Table/Table.js +49 -49
  103. package/dist/lib/Components/Tag/Tag.d.ts +1 -1
  104. package/dist/lib/Components/Tag/Tag.d.ts.map +1 -1
  105. package/dist/lib/Components/Tag/Tag.js +17 -14
  106. package/dist/lib/Components/Tile/Tile.d.ts +5 -12
  107. package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
  108. package/dist/lib/Components/Tile/Tile.js +79 -82
  109. package/dist/lib/Components/Tile/index.d.ts +1 -1
  110. package/dist/lib/Components/Tile/index.d.ts.map +1 -1
  111. package/dist/lib/Components/Tile/types.d.ts +1 -10
  112. package/dist/lib/Components/Tile/types.d.ts.map +1 -1
  113. package/dist/lib/Components/TileButton/TileButton.d.ts +1 -1
  114. package/dist/lib/Components/TileButton/TileButton.d.ts.map +1 -1
  115. package/dist/lib/Components/TileButton/TileButton.js +26 -23
  116. package/dist/lib/Components/{ButtonTrigger/ButtonTrigger.d.ts → TriggerButton/TriggerButton.d.ts} +10 -10
  117. package/dist/lib/Components/TriggerButton/TriggerButton.d.ts.map +1 -0
  118. package/dist/lib/Components/TriggerButton/TriggerButton.js +76 -0
  119. package/dist/lib/Components/TriggerButton/index.d.ts +3 -0
  120. package/dist/lib/Components/{ButtonTrigger → TriggerButton}/index.d.ts.map +1 -1
  121. package/dist/lib/Components/{ButtonTrigger → TriggerButton}/types.d.ts +1 -1
  122. package/dist/lib/Components/{ButtonTrigger → TriggerButton}/types.d.ts.map +1 -1
  123. package/dist/lib/Components/index.d.ts +2 -1
  124. package/dist/lib/Components/index.d.ts.map +1 -1
  125. package/dist/lib/Symbols/Icons/NanoGen5.d.ts +29 -0
  126. package/dist/lib/Symbols/Icons/NanoGen5.d.ts.map +1 -0
  127. package/dist/lib/Symbols/Icons/NanoGen5.js +27 -0
  128. package/dist/lib/Symbols/index.d.ts +1 -0
  129. package/dist/lib/Symbols/index.d.ts.map +1 -1
  130. package/dist/lib/Symbols/index.js +194 -192
  131. package/dist/libs/utils-shared/dist/index.js +95 -90
  132. package/dist/package.json +2 -2
  133. package/package.json +2 -2
  134. package/dist/lib/Components/ButtonTrigger/ButtonTrigger.d.ts.map +0 -1
  135. package/dist/lib/Components/ButtonTrigger/ButtonTrigger.js +0 -73
  136. package/dist/lib/Components/ButtonTrigger/index.d.ts +0 -3
@@ -23,18 +23,18 @@ const l = a("inline-block", {
23
23
  className: i = "",
24
24
  children: c,
25
25
  viewBox: e,
26
- xmlns: t,
27
- ...r
26
+ xmlns: r,
27
+ ...t
28
28
  }) => k(
29
29
  "svg",
30
30
  {
31
31
  ref: o,
32
32
  fill: "none",
33
33
  "aria-hidden": "true",
34
- xmlns: t,
34
+ xmlns: r,
35
35
  viewBox: e,
36
36
  className: s(i, l({ size: n }), "inline-block"),
37
- ...r
37
+ ...t
38
38
  },
39
39
  c
40
40
  );
@@ -6,17 +6,17 @@ const b = (e, t) => {
6
6
  ref: o,
7
7
  className: s,
8
8
  disabled: a,
9
- ...m
9
+ ...n
10
10
  }) => {
11
- const n = i({
11
+ const m = i({
12
12
  consumerName: e,
13
13
  mergeWith: { disabled: a }
14
14
  });
15
15
  return p(d, {
16
16
  ref: o,
17
- className: l(n && "text-disabled", s),
17
+ className: l(s, m && "text-disabled"),
18
18
  viewBox: t.props.viewBox,
19
- ...m,
19
+ ...n,
20
20
  children: t.props.children
21
21
  });
22
22
  };
@@ -29,7 +29,7 @@ import { InteractiveIconProps } from './types';
29
29
  * </InteractiveIcon>
30
30
  */
31
31
  export declare const InteractiveIcon: {
32
- ({ ref, className, iconType, disabled, ...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;AAmB/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe;uDAMzB,oBAAoB;;CAStB,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,36 +1,56 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { cn as a } from "../../../libs/utils-shared/dist/index.js";
3
- import { cva as n } from "class-variance-authority";
4
- const l = n(
5
- "inline-flex size-fit items-center justify-center rounded-full text-muted transition-colors hover:text-muted-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus active:text-muted-pressed disabled:text-disabled",
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
+ import { cva as l } from "class-variance-authority";
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"
15
25
  }
16
26
  }
17
27
  }
18
- ), c = ({
28
+ ), u = ({
19
29
  ref: t,
20
30
  className: s,
21
- iconType: r,
22
- disabled: e = !1,
23
- ...i
24
- }) => /* @__PURE__ */ o(
25
- "button",
26
- {
27
- ...i,
28
- ref: t,
29
- disabled: e,
30
- className: a(s, l({ disabled: e, iconType: r }))
31
- }
32
- );
33
- c.displayName = "InteractiveIcon";
31
+ iconType: a,
32
+ appearance: i = "muted",
33
+ disabled: r = !1,
34
+ ...o
35
+ }) => {
36
+ const e = d({
37
+ consumerName: "InteractiveIcon",
38
+ mergeWith: { disabled: r }
39
+ });
40
+ return /* @__PURE__ */ n(
41
+ "button",
42
+ {
43
+ ...o,
44
+ ref: t,
45
+ disabled: e,
46
+ className: c(
47
+ s,
48
+ b({ disabled: e, iconType: a, appearance: i })
49
+ )
50
+ }
51
+ );
52
+ };
53
+ u.displayName = "InteractiveIcon";
34
54
  export {
35
- c as InteractiveIcon
55
+ u as InteractiveIcon
36
56
  };
@@ -1,14 +1,27 @@
1
1
  import { ComponentPropsWithRef, ReactNode } from 'react';
2
2
  export type InteractiveIconProps = {
3
+ /**
4
+ * Whether the icon is disabled.
5
+ * @default false
6
+ */
7
+ disabled?: boolean;
3
8
  /**
4
9
  * The visual style of the icon button.
5
10
  * Choose 'filled' for icons with solid backgrounds or 'stroked' for outlined icons.
6
11
  */
7
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';
8
21
  /**
9
22
  * The icon component to display inside the button.
10
23
  * Should be a single icon element from the design system.
11
24
  */
12
25
  children: ReactNode;
13
- } & ComponentPropsWithRef<'button'>;
26
+ } & Omit<ComponentPropsWithRef<'button'>, 'disabled'>;
14
27
  //# sourceMappingURL=types.d.ts.map
@@ -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,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,qBAAqB,CAAC,QAAQ,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"}
@@ -39,7 +39,7 @@ import { LinkProps } from './types';
39
39
  * // Icons and other Link props like 'icon' are ignored when asChild is true - handle these in the child if needed.
40
40
  */
41
41
  export declare const Link: {
42
- ({ ref, className, children, appearance, size, underline, icon, isExternal, asChild, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
42
+ ({ ref, className, children, appearance, size, underline, icon, isExternal, asChild, disabled: disabledProp, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
43
43
  displayName: string;
44
44
  };
45
45
  //# sourceMappingURL=Link.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Link/Link.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AA8BpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,IAAI;qGAWd,SAAS;;CAgDX,CAAC"}
1
+ {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Link/Link.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAmCpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,IAAI;6HAYd,SAAS;;CAsDX,CAAC"}
@@ -1,9 +1,9 @@
1
- import { jsx as e, jsxs as o, Fragment as c } from "react/jsx-runtime";
2
- import { cn as v } from "../../../libs/utils-shared/dist/index.js";
3
- import { Slot as b } from "@radix-ui/react-slot";
4
- import { cva as h } from "class-variance-authority";
5
- import { ExternalLink as x } from "../../Symbols/Icons/ExternalLink.js";
6
- const k = h(
1
+ import { jsx as e, jsxs as l, Fragment as c } from "react/jsx-runtime";
2
+ import { useDisabledContext as h, cn as x } from "../../../libs/utils-shared/dist/index.js";
3
+ import { Slot as k } from "@radix-ui/react-slot";
4
+ import { cva as N } from "class-variance-authority";
5
+ import { ExternalLink as g } from "../../Symbols/Icons/ExternalLink.js";
6
+ const y = N(
7
7
  "inline-flex w-fit max-w-full items-center justify-center transition-colors focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-focus",
8
8
  {
9
9
  variants: {
@@ -20,53 +20,64 @@ const k = h(
20
20
  underline: {
21
21
  true: "underline underline-offset-2",
22
22
  false: ""
23
+ },
24
+ disabled: {
25
+ true: "pointer-events-none text-disabled",
26
+ false: ""
23
27
  }
24
28
  },
25
29
  defaultVariants: {
26
30
  appearance: "inherit",
27
31
  size: "inherit",
28
- underline: !0
32
+ underline: !0,
33
+ disabled: !1
29
34
  }
30
35
  }
31
- ), N = ({
32
- ref: l,
36
+ ), z = ({
37
+ ref: d,
33
38
  className: m,
34
- children: r,
39
+ children: s,
35
40
  appearance: p,
36
- size: n = "inherit",
41
+ size: t = "inherit",
37
42
  underline: f = !0,
38
43
  icon: u,
39
- isExternal: i = !1,
40
- asChild: t = !1,
41
- ...d
44
+ isExternal: n = !1,
45
+ asChild: i = !1,
46
+ disabled: b,
47
+ ...v
42
48
  }) => {
43
- const a = n ? {
49
+ const a = h({
50
+ consumerName: "Link",
51
+ mergeWith: { disabled: b }
52
+ }), r = t ? {
44
53
  sm: 16,
45
54
  md: 20
46
- }[n] : 20, s = u;
55
+ }[t] : 20, o = u;
47
56
  return /* @__PURE__ */ e(
48
- t ? b : "a",
57
+ i ? k : "a",
49
58
  {
50
- ref: l,
51
- className: v(
59
+ ref: d,
60
+ className: x(
52
61
  m,
53
- k({
62
+ y({
54
63
  appearance: p,
55
- size: n,
56
- underline: f
64
+ size: t,
65
+ underline: f,
66
+ disabled: a
57
67
  })
58
68
  ),
59
- target: i && !t ? "_blank" : void 0,
60
- rel: i && !t ? "noopener noreferrer" : void 0,
61
- ...d,
62
- children: t ? r : /* @__PURE__ */ o(c, { children: [
63
- s && /* @__PURE__ */ e(s, { size: a, className: "shrink-0" }),
64
- /* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: r }),
65
- i && /* @__PURE__ */ o(c, { children: [
69
+ "aria-disabled": a || void 0,
70
+ target: n && !i ? "_blank" : void 0,
71
+ rel: n && !i ? "noopener noreferrer" : void 0,
72
+ ...v,
73
+ children: i ? s : /* @__PURE__ */ l(c, { children: [
74
+ o && /* @__PURE__ */ e(o, { size: r, className: "shrink-0" }),
75
+ /* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: s }),
76
+ n && /* @__PURE__ */ l(c, { children: [
66
77
  /* @__PURE__ */ e(
67
- x,
78
+ g,
68
79
  {
69
- size: a,
80
+ size: r,
70
81
  className: "shrink-0",
71
82
  "aria-hidden": "true"
72
83
  }
@@ -77,7 +88,7 @@ const k = h(
77
88
  }
78
89
  );
79
90
  };
80
- N.displayName = "Link";
91
+ z.displayName = "Link";
81
92
  export {
82
- N as Link
93
+ z as Link
83
94
  };
@@ -35,6 +35,11 @@ export type LinkProps = {
35
35
  * @default false
36
36
  */
37
37
  asChild?: boolean;
38
+ /**
39
+ * Whether the link is disabled.
40
+ * @default false
41
+ */
42
+ disabled?: boolean;
38
43
  /**
39
44
  * The link's content, typically text.
40
45
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Link/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC3C;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9D;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Link/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC3C;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9D;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ListItem/ListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAUjB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,QAAQ;wBAAuB,aAAa;;CAqBxD,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,eAAe;oCAIzB,oBAAoB;;CAStB,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,eAAe;oCAIzB,oBAAoB;;CAStB,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,aAAa;oCAIvB,kBAAkB;;CAkBpB,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,mBAAmB;oCAI7B,wBAAwB;;CAuB1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;oCAI1B,qBAAqB;;CAoBvB,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,YAAY;YAAW,iBAAiB;;CAOpD,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,YAAY;+CAKtB,iBAAiB;;CAenB,CAAC;AAIF,eAAO,MAAM,gBAAgB;+BAG1B,qBAAqB;;CAEvB,CAAC"}
1
+ {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ListItem/ListItem.tsx"],"names":[],"mappings":"AAOA,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAOjB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,QAAQ;wBAAuB,aAAa;;CAyBxD,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,eAAe;oCAIzB,oBAAoB;;CAStB,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,eAAe;oCAIzB,oBAAoB;;CAStB,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,aAAa;oCAIvB,kBAAkB;;CAuBpB,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,mBAAmB;oCAI7B,wBAAwB;;CAuB1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;oCAI1B,qBAAqB;;CAoBvB,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,YAAY;YAAW,iBAAiB;;CAOpD,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,YAAY;+CAKtB,iBAAiB;;CAenB,CAAC;AAIF,eAAO,MAAM,gBAAgB;+BAG1B,qBAAqB;;CAEvB,CAAC"}
@@ -1,169 +1,176 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { createSafeContext as m, cn as a } from "../../../libs/utils-shared/dist/index.js";
3
- import { Spot as d } from "../Spot/Spot.js";
4
- const [u, o] = m("ListItem", {}), [I, l] = m("ListItemTrailing", {
2
+ import { useDisabledContext as o, DisabledProvider as c, cn as a, createSafeContext as u } from "../../../libs/utils-shared/dist/index.js";
3
+ import { Spot as b } from "../Spot/Spot.js";
4
+ const [I, d] = u("ListItemTrailing", {
5
5
  isInTrailing: !1
6
- }), p = ({ ref: t, ...e }) => {
7
- const { children: s, className: n, disabled: r, ...c } = e;
8
- return /* @__PURE__ */ i(u, { value: { disabled: r }, children: /* @__PURE__ */ i(
6
+ }), p = ({ ref: e, ...t }) => {
7
+ const { children: s, className: n, disabled: r, ...m } = t, l = o({
8
+ consumerName: "ListItem",
9
+ mergeWith: { disabled: r }
10
+ });
11
+ return /* @__PURE__ */ i(c, { value: { disabled: l }, children: /* @__PURE__ */ i(
9
12
  "button",
10
13
  {
11
- ref: t,
14
+ ref: e,
12
15
  type: "button",
13
- disabled: r,
16
+ disabled: l,
14
17
  className: a(
15
18
  "flex h-64 w-full cursor-pointer items-center gap-16 rounded-md bg-base-transparent px-8 py-12 text-base transition-colors",
16
19
  "hover:bg-base-transparent-hover focus-visible:outline-2 focus-visible:outline-focus active:bg-base-transparent-pressed",
17
20
  "disabled:cursor-default disabled:bg-base-transparent disabled:text-disabled",
18
21
  n
19
22
  ),
20
- ...c,
23
+ ...m,
21
24
  children: s
22
25
  }
23
26
  ) });
24
27
  };
25
28
  p.displayName = "ListItem";
26
- const L = ({
27
- ref: t,
28
- children: e,
29
+ const x = ({
30
+ ref: e,
31
+ children: t,
29
32
  className: s
30
33
  }) => /* @__PURE__ */ i(
31
34
  "div",
32
35
  {
33
- ref: t,
36
+ ref: e,
34
37
  className: a("flex min-w-0 flex-1 items-center gap-12", s),
35
- children: e
38
+ children: t
36
39
  }
37
40
  );
38
- L.displayName = "ListItemLeading";
39
- const b = ({
40
- ref: t,
41
- children: e,
41
+ x.displayName = "ListItemLeading";
42
+ const L = ({
43
+ ref: e,
44
+ children: t,
42
45
  className: s
43
46
  }) => /* @__PURE__ */ i(
44
47
  "div",
45
48
  {
46
- ref: t,
49
+ ref: e,
47
50
  className: a("flex min-w-0 flex-1 flex-col gap-4", s),
48
- children: e
51
+ children: t
49
52
  }
50
53
  );
51
- b.displayName = "ListItemContent";
52
- const x = ({
53
- ref: t,
54
- children: e,
54
+ L.displayName = "ListItemContent";
55
+ const N = ({
56
+ ref: e,
57
+ children: t,
55
58
  className: s
56
59
  }) => {
57
- const { isInTrailing: n } = l({
60
+ const n = o({
61
+ consumerName: "ListItemTitle",
62
+ contextRequired: !0
63
+ }), { isInTrailing: r } = d({
58
64
  consumerName: "ListItemTitle",
59
65
  contextRequired: !1
60
66
  });
61
67
  return /* @__PURE__ */ i(
62
68
  "div",
63
69
  {
64
- ref: t,
70
+ ref: e,
65
71
  className: a(
66
72
  "w-full truncate body-2-semi-bold",
67
- n ? "justify-end text-end" : "justify-start text-start",
73
+ r ? "justify-end text-end" : "justify-start text-start",
74
+ n && "text-disabled",
68
75
  s
69
76
  ),
70
- children: e
77
+ children: t
71
78
  }
72
79
  );
73
80
  };
74
- x.displayName = "ListItemTitle";
81
+ N.displayName = "ListItemTitle";
75
82
  const f = ({
76
- ref: t,
77
- children: e,
83
+ ref: e,
84
+ children: t,
78
85
  className: s
79
86
  }) => {
80
- const { disabled: n } = o({
87
+ const n = o({
81
88
  consumerName: "ListItemDescription",
82
89
  contextRequired: !0
83
- }), { isInTrailing: r } = l({
90
+ }), { isInTrailing: r } = d({
84
91
  consumerName: "ListItemDescription",
85
92
  contextRequired: !1
86
93
  });
87
94
  return /* @__PURE__ */ i(
88
95
  "div",
89
96
  {
90
- ref: t,
97
+ ref: e,
91
98
  className: a(
92
99
  "w-full items-center truncate body-3 text-muted",
93
100
  r ? "justify-end text-end" : "justify-start text-start",
94
101
  n && "text-disabled",
95
102
  s
96
103
  ),
97
- children: e
104
+ children: t
98
105
  }
99
106
  );
100
107
  };
101
108
  f.displayName = "ListItemDescription";
102
- const N = ({
103
- ref: t,
104
- children: e,
109
+ const g = ({
110
+ ref: e,
111
+ children: t,
105
112
  className: s
106
113
  }) => {
107
- const { disabled: n } = o({
114
+ const n = o({
108
115
  consumerName: "ListItemTrailing",
109
116
  contextRequired: !0
110
117
  });
111
118
  return /* @__PURE__ */ i(I, { value: { isInTrailing: !0 }, children: /* @__PURE__ */ i(
112
119
  "div",
113
120
  {
114
- ref: t,
121
+ ref: e,
115
122
  className: a(
116
123
  "flex shrink-0 items-center",
117
124
  n && "text-disabled",
118
125
  s
119
126
  ),
120
- children: e
127
+ children: t
121
128
  }
122
129
  ) });
123
130
  };
124
- N.displayName = "ListItemTrailing";
125
- const g = (t) => {
126
- const { disabled: e } = o({
131
+ g.displayName = "ListItemTrailing";
132
+ const y = (e) => {
133
+ const t = o({
127
134
  consumerName: "ListItemSpot",
128
135
  contextRequired: !0
129
136
  });
130
- return /* @__PURE__ */ i(d, { ...t, size: 48, disabled: e });
137
+ return /* @__PURE__ */ i(b, { ...e, size: 48, disabled: t });
131
138
  };
132
- g.displayName = "ListItemSpot";
133
- const y = ({
134
- ref: t,
135
- icon: e,
139
+ y.displayName = "ListItemSpot";
140
+ const v = ({
141
+ ref: e,
142
+ icon: t,
136
143
  className: s,
137
144
  ...n
138
145
  }) => {
139
- const { disabled: r } = o({
146
+ const r = o({
140
147
  consumerName: "ListItemIcon",
141
148
  contextRequired: !0
142
149
  });
143
150
  return /* @__PURE__ */ i(
144
151
  "div",
145
152
  {
146
- ref: t,
153
+ ref: e,
147
154
  className: a("shrink-0", r && "text-disabled", s),
148
155
  ...n,
149
- children: /* @__PURE__ */ i(e, { size: 24 })
156
+ children: /* @__PURE__ */ i(t, { size: 24 })
150
157
  }
151
158
  );
152
159
  };
153
- y.displayName = "ListItemIcon";
154
- const v = ({
155
- children: t,
156
- className: e
157
- }) => /* @__PURE__ */ i("div", { className: a("min-w-0 truncate", e), children: t });
158
- v.displayName = "ListItemTruncate";
160
+ v.displayName = "ListItemIcon";
161
+ const T = ({
162
+ children: e,
163
+ className: t
164
+ }) => /* @__PURE__ */ i("div", { className: a("min-w-0 truncate", t), children: e });
165
+ T.displayName = "ListItemTruncate";
159
166
  export {
160
167
  p as ListItem,
161
- b as ListItemContent,
168
+ L as ListItemContent,
162
169
  f as ListItemDescription,
163
- y as ListItemIcon,
164
- L as ListItemLeading,
165
- g as ListItemSpot,
166
- x as ListItemTitle,
167
- N as ListItemTrailing,
168
- v as ListItemTruncate
170
+ v as ListItemIcon,
171
+ x as ListItemLeading,
172
+ y as ListItemSpot,
173
+ N as ListItemTitle,
174
+ g as ListItemTrailing,
175
+ T as ListItemTruncate
169
176
  };
@@ -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"}