@ledgerhq/lumen-ui-react 0.1.46 → 0.1.48

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 (65) hide show
  1. package/dist/index.js +130 -122
  2. package/dist/lib/Components/AmountInput/AmountInput.js +2 -2
  3. package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -1
  4. package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  5. package/dist/lib/Components/BaseInput/BaseInput.js +119 -93
  6. package/dist/lib/Components/BaseInput/types.d.ts +24 -0
  7. package/dist/lib/Components/BaseInput/types.d.ts.map +1 -1
  8. package/dist/lib/Components/Card/Card.js +1 -1
  9. package/dist/lib/Components/CardButton/CardButton.js +1 -1
  10. package/dist/lib/Components/DescriptionItem/DescriptionItem.d.ts +1 -1
  11. package/dist/lib/Components/DescriptionItem/DescriptionItem.d.ts.map +1 -1
  12. package/dist/lib/Components/DescriptionItem/DescriptionItem.js +74 -48
  13. package/dist/lib/Components/DescriptionItem/types.d.ts +6 -0
  14. package/dist/lib/Components/DescriptionItem/types.d.ts.map +1 -1
  15. package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +1 -1
  16. package/dist/lib/Components/Icon/Icon.js +8 -8
  17. package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
  18. package/dist/lib/Components/ListItem/ListItem.js +118 -68
  19. package/dist/lib/Components/ListItem/types.d.ts +11 -1
  20. package/dist/lib/Components/ListItem/types.d.ts.map +1 -1
  21. package/dist/lib/Components/Menu/Menu.d.ts +1 -1
  22. package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
  23. package/dist/lib/Components/Menu/Menu.js +79 -65
  24. package/dist/lib/Components/Menu/types.d.ts +6 -0
  25. package/dist/lib/Components/Menu/types.d.ts.map +1 -1
  26. package/dist/lib/Components/SearchInput/SearchInput.js +10 -10
  27. package/dist/lib/Components/SectionHeader/SectionHeader.d.ts +33 -0
  28. package/dist/lib/Components/SectionHeader/SectionHeader.d.ts.map +1 -0
  29. package/dist/lib/Components/SectionHeader/SectionHeader.js +56 -0
  30. package/dist/lib/Components/SectionHeader/index.d.ts +3 -0
  31. package/dist/lib/Components/SectionHeader/index.d.ts.map +1 -0
  32. package/dist/lib/Components/SectionHeader/types.d.ts +26 -0
  33. package/dist/lib/Components/SectionHeader/types.d.ts.map +1 -0
  34. package/dist/lib/Components/SideBar/SideBar.js +2 -2
  35. package/dist/lib/Components/Spot/Spot.js +5 -5
  36. package/dist/lib/Components/Table/Table.d.ts +24 -3
  37. package/dist/lib/Components/Table/Table.d.ts.map +1 -1
  38. package/dist/lib/Components/Table/Table.js +274 -186
  39. package/dist/lib/Components/Table/types.d.ts +63 -28
  40. package/dist/lib/Components/Table/types.d.ts.map +1 -1
  41. package/dist/lib/Components/TileButton/TileButton.d.ts +1 -1
  42. package/dist/lib/Components/TileButton/TileButton.d.ts.map +1 -1
  43. package/dist/lib/Components/TileButton/TileButton.js +52 -39
  44. package/dist/lib/Components/TileButton/types.d.ts +5 -0
  45. package/dist/lib/Components/TileButton/types.d.ts.map +1 -1
  46. package/dist/lib/Components/Trend/Trend.js +2 -2
  47. package/dist/lib/Components/index.d.ts +1 -0
  48. package/dist/lib/Components/index.d.ts.map +1 -1
  49. package/dist/lib/Symbols/Icons/Atm.d.ts +29 -0
  50. package/dist/lib/Symbols/Icons/Atm.d.ts.map +1 -0
  51. package/dist/lib/Symbols/Icons/Atm.js +28 -0
  52. package/dist/lib/Symbols/Icons/Cutlery.d.ts +29 -0
  53. package/dist/lib/Symbols/Icons/Cutlery.d.ts.map +1 -0
  54. package/dist/lib/Symbols/Icons/Cutlery.js +28 -0
  55. package/dist/lib/Symbols/Icons/GameControler.d.ts +29 -0
  56. package/dist/lib/Symbols/Icons/GameControler.d.ts.map +1 -0
  57. package/dist/lib/Symbols/Icons/GameControler.js +28 -0
  58. package/dist/lib/Symbols/Icons/Upload.d.ts +29 -0
  59. package/dist/lib/Symbols/Icons/Upload.d.ts.map +1 -0
  60. package/dist/lib/Symbols/Icons/Upload.js +28 -0
  61. package/dist/lib/Symbols/index.d.ts +4 -0
  62. package/dist/lib/Symbols/index.d.ts.map +1 -1
  63. package/dist/lib/Symbols/index.js +514 -506
  64. package/dist/package.json +3 -3
  65. package/package.json +3 -3
@@ -1,12 +1,13 @@
1
- import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
- import { useDisabledContext as U, resolveBaseInputPlaceholder as G, useMergedRef as J, cn as n } from "../../../libs/utils-shared/dist/index.js";
3
- import { cva as u } from "class-variance-authority";
4
- import { useRef as K, useId as Q, useState as X, useCallback as Y } from "react";
5
- import { useCommonTranslation as Z } from "../../../i18n/useCommonTranslation.js";
6
- import { InteractiveIcon as _ } from "../InteractiveIcon/InteractiveIcon.js";
7
- import { DeleteCircleFill as y } from "../../Symbols/Icons/DeleteCircleFill.js";
8
- import { CheckmarkCircleFill as ee } from "../../Symbols/Icons/CheckmarkCircleFill.js";
9
- const te = u(
1
+ import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
+ import { useDisabledContext as Q, resolveBaseInputPlaceholder as X, useMergedRef as Y, cn as s } from "../../../libs/utils-shared/dist/index.js";
3
+ import { cva as g } from "class-variance-authority";
4
+ import { useRef as Z, useId as _, useState as ee, useCallback as te } from "react";
5
+ import { useCommonTranslation as re } from "../../../i18n/useCommonTranslation.js";
6
+ import { InteractiveIcon as se } from "../InteractiveIcon/InteractiveIcon.js";
7
+ import { DeleteCircleFill as k } from "../../Symbols/Icons/DeleteCircleFill.js";
8
+ import { InformationFill as ae } from "../../Symbols/Icons/InformationFill.js";
9
+ import { CheckmarkCircleFill as oe } from "../../Symbols/Icons/CheckmarkCircleFill.js";
10
+ const ne = g(
10
11
  [
11
12
  "group relative flex h-48 w-full cursor-text items-center gap-8 rounded-sm bg-muted px-16 transition-colors",
12
13
  "focus-within:ring-2 focus-within:ring-active hover:bg-muted-hover",
@@ -24,20 +25,20 @@ const te = u(
24
25
  status: "default"
25
26
  }
26
27
  }
27
- ), re = n(
28
+ ), le = s(
28
29
  "peer w-full flex-1 bg-muted body-1 text-base caret-active outline-hidden transition-colors",
29
30
  "group-hover:bg-muted-hover group-disabled:bg-disabled",
30
31
  "group-has-disabled:cursor-not-allowed group-has-disabled:bg-disabled group-has-disabled:text-disabled",
31
32
  "placeholder:text-muted group-has-disabled:placeholder:text-disabled",
32
33
  "[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
33
34
  "truncate"
34
- ), ae = n(
35
+ ), ie = s(
35
36
  "pointer-events-none absolute top-6 left-16 origin-left body-4 text-muted transition-all duration-300",
36
37
  "peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-placeholder-shown:body-2",
37
38
  "group-has-disabled:text-disabled",
38
39
  "peer-focus:top-6 peer-focus:translate-y-0 peer-focus:body-4",
39
40
  "w-[calc(100%-var(--size-56))] truncate"
40
- ), se = u(ae, {
41
+ ), ce = g(ie, {
41
42
  variants: {
42
43
  status: {
43
44
  default: "",
@@ -53,7 +54,7 @@ const te = u(
53
54
  status: "default",
54
55
  floated: !1
55
56
  }
56
- }), oe = u("mt-8 flex items-center gap-2 body-3", {
57
+ }), de = g("flex items-center gap-2 body-3", {
57
58
  variants: {
58
59
  status: {
59
60
  default: "text-muted",
@@ -64,129 +65,154 @@ const te = u(
64
65
  defaultVariants: {
65
66
  status: "default"
66
67
  }
67
- }), be = ({
68
- ref: I,
69
- className: C,
70
- containerClassName: S,
71
- inputClassName: V,
72
- labelClassName: N,
73
- label: l,
74
- id: k,
75
- disabled: F,
76
- helperText: p,
77
- status: e,
68
+ }), Ie = ({
69
+ ref: a,
70
+ className: o,
71
+ containerClassName: t,
72
+ inputClassName: B,
73
+ labelClassName: F,
74
+ label: i,
75
+ id: j,
76
+ disabled: z,
77
+ helperText: b,
78
+ maxCount: c,
79
+ status: d,
78
80
  suffix: P,
79
81
  prefix: R,
80
- onClear: z,
81
- hideClearButton: B = !1,
82
- "aria-invalid": D,
83
- onChange: h,
84
- placeholder: j,
85
- ...a
82
+ onClear: D,
83
+ hideClearButton: $ = !1,
84
+ "aria-invalid": E,
85
+ onChange: v,
86
+ placeholder: H,
87
+ ...u
86
88
  }) => {
87
- const b = U({
89
+ const w = Q({
88
90
  consumerName: "BaseInput",
89
- mergeWith: { disabled: F }
90
- }), { t: E } = Z(), t = K(null), L = Q(), c = k || `input-${L}`, A = D ?? (e === "error" ? !0 : void 0), i = a.value !== void 0, [H, f] = X(
91
- a.defaultValue?.toString() || ""
92
- ), M = Y(
93
- (s) => {
94
- i || f(s.target.value), h?.(s);
91
+ mergeWith: { disabled: z }
92
+ }), { t: L } = re(), r = Z(null), A = _(), m = j || `input-${A}`, M = E ?? (d === "error" ? !0 : void 0), p = u.value !== void 0, [O, y] = ee(
93
+ u.defaultValue?.toString() ?? ""
94
+ ), T = te(
95
+ (n) => {
96
+ p || y(n.target.value), v?.(n);
95
97
  },
96
- [i, h]
97
- ), O = i ? !!a.value && a.value.toString().length > 0 : H.length > 0, { inputPlaceholder: T, labelStaysFloatedWithPlaceholder: W } = G({
98
- label: l,
99
- placeholder: j
100
- }), m = O && !b && !B, g = `${c}-helper`, v = !!p, $ = () => {
101
- if (!t.current) return;
98
+ [p, v]
99
+ ), x = p ? u.value?.toString() ?? "" : O, W = x.length > 0, { inputPlaceholder: q, labelStaysFloatedWithPlaceholder: U } = X({
100
+ label: i,
101
+ placeholder: H
102
+ }), I = W && !w && !$, G = x.length, C = !!(c && c > 0), N = `${m}-helper`, h = !!b, J = () => {
103
+ if (!r.current) return;
102
104
  Object.getOwnPropertyDescriptor(
103
105
  window.HTMLInputElement.prototype,
104
106
  "value"
105
- )?.set?.call(t.current, ""), i || f("");
106
- const w = new Event("input", { bubbles: !0 });
107
- t.current.dispatchEvent(w), t.current.focus(), z?.();
108
- }, q = J(I, t);
109
- return /* @__PURE__ */ d("div", { className: C, children: [
110
- /* @__PURE__ */ d(
107
+ )?.set?.call(r.current, ""), p || y("");
108
+ const V = new Event("input", { bubbles: !0 });
109
+ r.current.dispatchEvent(V), r.current.focus(), D?.();
110
+ }, K = Y(a, r);
111
+ return /* @__PURE__ */ f("div", { className: o, children: [
112
+ /* @__PURE__ */ f(
111
113
  "div",
112
114
  {
113
- className: n(te({ status: e }), S),
114
- onPointerDown: (s) => {
115
- if (s.target.closest("input, button, a")) return;
116
- const o = t.current;
117
- if (!o) return;
118
- const x = o.value.length > 0 ? o.value.length : 0;
115
+ className: s(ne({ status: d }), t),
116
+ onPointerDown: (n) => {
117
+ if (n.target.closest("input, button, a")) return;
118
+ const l = r.current;
119
+ if (!l) return;
120
+ const S = l.value.length > 0 ? l.value.length : 0;
119
121
  window.requestAnimationFrame(() => {
120
122
  try {
121
- o.setSelectionRange(x, x);
123
+ l.setSelectionRange(S, S);
122
124
  } catch {
123
125
  }
124
- o.focus();
126
+ l.focus();
125
127
  });
126
128
  },
127
129
  children: [
128
130
  R,
129
- /* @__PURE__ */ r(
131
+ /* @__PURE__ */ e(
130
132
  "input",
131
133
  {
132
- ref: q,
133
- id: c,
134
- disabled: b,
135
- placeholder: T,
136
- "aria-invalid": A,
137
- "aria-describedby": v ? g : void 0,
138
- className: n(
139
- re,
140
- l && "pt-12 body-2",
141
- V
134
+ ref: K,
135
+ id: m,
136
+ disabled: w,
137
+ placeholder: q,
138
+ "aria-invalid": M,
139
+ "aria-describedby": h ? N : void 0,
140
+ className: s(
141
+ le,
142
+ i && "pt-12 body-2",
143
+ B
142
144
  ),
143
- onChange: M,
144
- ...a
145
+ onChange: T,
146
+ ...u
145
147
  }
146
148
  ),
147
- l && /* @__PURE__ */ r(
149
+ i && /* @__PURE__ */ e(
148
150
  "label",
149
151
  {
150
- htmlFor: c,
151
- className: n(
152
- se({
153
- status: e,
154
- floated: W
152
+ htmlFor: m,
153
+ className: s(
154
+ ce({
155
+ status: d,
156
+ floated: U
155
157
  }),
156
- N
158
+ F
157
159
  ),
158
- children: l
160
+ children: i
159
161
  }
160
162
  ),
161
- m && /* @__PURE__ */ r(
162
- _,
163
+ I && /* @__PURE__ */ e(
164
+ se,
163
165
  {
164
166
  iconType: "filled",
165
- icon: y,
167
+ icon: k,
166
168
  size: 20,
167
- onClick: $,
168
- "aria-label": E("components.baseInput.clearInputAriaLabel")
169
+ onClick: J,
170
+ "aria-label": L("components.baseInput.clearInputAriaLabel")
169
171
  }
170
172
  ),
171
- !m && P
173
+ !I && P
172
174
  ]
173
175
  }
174
176
  ),
175
- v && /* @__PURE__ */ d(
177
+ (h || C) && /* @__PURE__ */ f(
176
178
  "div",
177
179
  {
178
- id: g,
179
- className: oe({ status: e }),
180
- role: e === "error" ? "alert" : void 0,
180
+ className: s(
181
+ "mt-8 flex items-start gap-8",
182
+ h ? "justify-between" : "justify-end"
183
+ ),
181
184
  children: [
182
- e === "error" && /* @__PURE__ */ r(y, { size: 16, className: "text-error" }),
183
- e === "success" && /* @__PURE__ */ r(ee, { size: 16, className: "text-success" }),
184
- /* @__PURE__ */ r("span", { children: p })
185
+ h && b && /* @__PURE__ */ e(
186
+ ue,
187
+ {
188
+ id: N,
189
+ helperText: b,
190
+ status: d
191
+ }
192
+ ),
193
+ C && c != null && /* @__PURE__ */ e(pe, { count: G, maxCount: c })
185
194
  ]
186
195
  }
187
196
  )
188
197
  ] });
189
- };
198
+ }, ue = ({
199
+ id: a,
200
+ helperText: o,
201
+ status: t
202
+ }) => /* @__PURE__ */ f(
203
+ "div",
204
+ {
205
+ id: a,
206
+ className: de({ status: t }),
207
+ role: t === "error" ? "alert" : void 0,
208
+ children: [
209
+ !t && /* @__PURE__ */ e(ae, { size: 16, className: "text-muted" }),
210
+ t === "error" && /* @__PURE__ */ e(k, { size: 16, className: "text-error" }),
211
+ t === "success" && /* @__PURE__ */ e(oe, { size: 16, className: "text-success" }),
212
+ /* @__PURE__ */ e("span", { className: "body-3", children: o })
213
+ ]
214
+ }
215
+ ), pe = ({ count: a, maxCount: o }) => /* @__PURE__ */ e("span", { "aria-live": "polite", className: "shrink-0 body-3 text-muted", children: `${a}/${o}` });
190
216
  export {
191
- be as BaseInput
217
+ Ie as BaseInput
192
218
  };
@@ -10,6 +10,10 @@ export type BaseInputProps = {
10
10
  * Pair with `status` for error/success styling and icons; omit `status` for a neutral hint.
11
11
  */
12
12
  helperText?: string;
13
+ /**
14
+ * Soft character limit. When set, renders a `count/maxCount` counter below the input.
15
+ */
16
+ maxCount?: number;
13
17
  /**
14
18
  * Visual state for border, label, helper text, and helper icon.
15
19
  * Omit when `helperText` is a neutral hint.
@@ -57,4 +61,24 @@ export type BaseInputProps = {
57
61
  */
58
62
  labelClassName?: string;
59
63
  } & Omit<ComponentPropsWithRef<'input'>, 'size' | 'prefix'>;
64
+ export type BaseInputHelperTextProps = {
65
+ /**
66
+ * The id linking the helper text to the input via `aria-describedby`.
67
+ */
68
+ id: string;
69
+ /**
70
+ * The helper copy shown below the input.
71
+ */
72
+ helperText: string;
73
+ } & Pick<BaseInputProps, 'status'>;
74
+ export type BaseInputCounterProps = {
75
+ /**
76
+ * Current character count.
77
+ */
78
+ count: number;
79
+ /**
80
+ * Soft character limit rendered as the counter denominator.
81
+ */
82
+ maxCount: number;
83
+ };
60
84
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/BaseInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/BaseInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC;AAE5D,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;AAEnC,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -51,7 +51,7 @@ const k = ({
51
51
  {
52
52
  variants: {
53
53
  interactive: {
54
- true: "cursor-pointer hover:bg-surface-hover active:bg-surface-pressed focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",
54
+ true: "cursor-pointer hover:bg-surface-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus active:bg-surface-pressed",
55
55
  false: ""
56
56
  },
57
57
  outlined: {
@@ -8,7 +8,7 @@ const h = f(
8
8
  variants: {
9
9
  appearance: {
10
10
  base: "bg-surface text-base hover:bg-surface-hover active:bg-surface-pressed disabled:bg-disabled",
11
- outline: "bg-base-transparent text-base outline-dashed outline-1 outline-muted-subtle hover:bg-base-transparent-hover hover:outline-muted-subtle-hover focus-visible:outline-hidden focus-visible:outline-offset-0 active:bg-base-transparent-pressed active:outline-muted-subtle-pressed disabled:bg-base-transparent disabled:outline-disabled"
11
+ outline: "bg-base-transparent text-base outline-1 outline-muted-subtle outline-dashed hover:bg-base-transparent-hover hover:outline-muted-subtle-hover focus-visible:outline-hidden focus-visible:outline-offset-0 active:bg-base-transparent-pressed active:outline-muted-subtle-pressed disabled:bg-base-transparent disabled:outline-disabled"
12
12
  }
13
13
  },
14
14
  defaultVariants: {
@@ -17,7 +17,7 @@ import { DescriptionItemLabelProps, DescriptionItemLeadingProps, DescriptionItem
17
17
  * </DescriptionItemTrailing>
18
18
  * </DescriptionItem>
19
19
  */
20
- export declare const DescriptionItem: ({ ref, children, className, size, ...props }: DescriptionItemProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const DescriptionItem: ({ ref, children, className, size, priority, ...props }: DescriptionItemProps) => import("react/jsx-runtime").JSX.Element;
21
21
  /**
22
22
  * Layout container for the leading (left) side of the description item.
23
23
  * Contains DescriptionItemLabel and an optional info icon sibling.
@@ -1 +1 @@
1
- {"version":3,"file":"DescriptionItem.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DescriptionItem/DescriptionItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,oBAAoB,EAEpB,4BAA4B,EAC5B,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAWjB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,GAAI,8CAM7B,oBAAoB,4CAYtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,wCAKpC,2BAA2B,4CAU7B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,wCAKlC,yBAAyB,4CAmB3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAAI,wCAKrC,4BAA4B,4CAU9B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,wCAKlC,yBAAyB,4CAmB3B,CAAC"}
1
+ {"version":3,"file":"DescriptionItem.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DescriptionItem/DescriptionItem.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,oBAAoB,EAEpB,4BAA4B,EAC5B,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAgBjB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,GAAI,wDAO7B,oBAAoB,4CAiBtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,wCAKpC,2BAA2B,4CAmB7B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,wCAKlC,yBAAyB,4CAmB3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAAI,wCAKrC,4BAA4B,4CAmB9B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,wCAKlC,yBAAyB,4CAmB3B,CAAC"}
@@ -1,98 +1,124 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { createSafeContext as a, cn as m } from "../../../libs/utils-shared/dist/index.js";
3
- const [c, o] = a("DescriptionItemSize", {
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { createSafeContext as m, cn as o } from "../../../libs/utils-shared/dist/index.js";
3
+ const [l, c] = m("DescriptionItemSize", {
4
4
  size: "md"
5
- }), p = ({
5
+ }), [p, a] = m("DescriptionItemPriority", {
6
+ priority: void 0
7
+ }), D = ({
6
8
  ref: e,
7
9
  children: t,
8
10
  className: i,
9
- size: s = "md",
10
- ...n
11
- }) => /* @__PURE__ */ r(c, { value: { size: s }, children: /* @__PURE__ */ r(
11
+ size: r = "md",
12
+ priority: s = "end",
13
+ ...d
14
+ }) => /* @__PURE__ */ n(l, { value: { size: r }, children: /* @__PURE__ */ n(p, { value: { priority: s }, children: /* @__PURE__ */ n(
12
15
  "div",
13
16
  {
14
17
  ref: e,
15
- className: m("flex w-full items-start gap-12", i),
16
- ...n,
18
+ className: o(
19
+ "flex w-full items-start gap-12 overflow-hidden",
20
+ i
21
+ ),
22
+ ...d,
17
23
  children: t
18
24
  }
19
- ) }), u = ({
25
+ ) }) }), I = ({
20
26
  ref: e,
21
27
  children: t,
22
28
  className: i,
23
- ...s
24
- }) => /* @__PURE__ */ r(
25
- "div",
26
- {
27
- ref: e,
28
- className: m("flex min-w-0 flex-1 items-center gap-4", i),
29
- ...s,
30
- children: t
31
- }
32
- ), x = ({
29
+ ...r
30
+ }) => {
31
+ const { priority: s } = a({
32
+ consumerName: "DescriptionItemLeading",
33
+ contextRequired: !1
34
+ });
35
+ return /* @__PURE__ */ n(
36
+ "div",
37
+ {
38
+ ref: e,
39
+ className: o(
40
+ "flex min-w-0 grow items-center gap-4",
41
+ s === "end" ? "shrink" : "shrink-0",
42
+ i
43
+ ),
44
+ ...r,
45
+ children: t
46
+ }
47
+ );
48
+ }, f = ({
33
49
  ref: e,
34
50
  children: t,
35
51
  className: i,
36
- ...s
52
+ ...r
37
53
  }) => {
38
- const { size: n } = o({
54
+ const { size: s } = c({
39
55
  consumerName: "DescriptionItemLabel",
40
56
  contextRequired: !1
41
57
  });
42
- return /* @__PURE__ */ r(
58
+ return /* @__PURE__ */ n(
43
59
  "div",
44
60
  {
45
61
  ref: e,
46
- className: m(
62
+ className: o(
47
63
  "line-clamp-2 min-w-0 wrap-break-word text-ellipsis text-muted",
48
- n === "md" ? "body-2" : "body-3",
64
+ s === "md" ? "body-2" : "body-3",
49
65
  i
50
66
  ),
51
- ...s,
67
+ ...r,
52
68
  children: t
53
69
  }
54
70
  );
55
- }, b = ({
71
+ }, v = ({
56
72
  ref: e,
57
73
  children: t,
58
74
  className: i,
59
- ...s
60
- }) => /* @__PURE__ */ r(
61
- "div",
62
- {
63
- ref: e,
64
- className: m("flex max-w-4/5 shrink-0 items-center gap-4", i),
65
- ...s,
66
- children: t
67
- }
68
- ), f = ({
75
+ ...r
76
+ }) => {
77
+ const { priority: s } = a({
78
+ consumerName: "DescriptionItemTrailing",
79
+ contextRequired: !1
80
+ });
81
+ return /* @__PURE__ */ n(
82
+ "div",
83
+ {
84
+ ref: e,
85
+ className: o(
86
+ "flex max-w-4/5 items-center gap-4",
87
+ s === "start" ? "min-w-0 shrink" : "shrink-0",
88
+ i
89
+ ),
90
+ ...r,
91
+ children: t
92
+ }
93
+ );
94
+ }, b = ({
69
95
  ref: e,
70
96
  children: t,
71
97
  className: i,
72
- ...s
98
+ ...r
73
99
  }) => {
74
- const { size: n } = o({
100
+ const { size: s } = c({
75
101
  consumerName: "DescriptionItemValue",
76
102
  contextRequired: !1
77
103
  });
78
- return /* @__PURE__ */ r(
104
+ return /* @__PURE__ */ n(
79
105
  "div",
80
106
  {
81
107
  ref: e,
82
- className: m(
108
+ className: o(
83
109
  "min-w-0 truncate text-base",
84
- n === "md" ? "body-2-semi-bold" : "body-3-semi-bold",
110
+ s === "md" ? "body-2-semi-bold" : "body-3-semi-bold",
85
111
  i
86
112
  ),
87
- ...s,
113
+ ...r,
88
114
  children: t
89
115
  }
90
116
  );
91
117
  };
92
118
  export {
93
- p as DescriptionItem,
94
- x as DescriptionItemLabel,
95
- u as DescriptionItemLeading,
96
- b as DescriptionItemTrailing,
97
- f as DescriptionItemValue
119
+ D as DescriptionItem,
120
+ f as DescriptionItemLabel,
121
+ I as DescriptionItemLeading,
122
+ v as DescriptionItemTrailing,
123
+ b as DescriptionItemValue
98
124
  };
@@ -1,3 +1,4 @@
1
+ import { Priority } from '@ledgerhq/lumen-utils-shared';
1
2
  import { ComponentPropsWithRef, ReactNode } from 'react';
2
3
  export type DescriptionItemSize = 'sm' | 'md';
3
4
  export type DescriptionItemProps = {
@@ -10,6 +11,11 @@ export type DescriptionItemProps = {
10
11
  * @default 'md'
11
12
  */
12
13
  size?: DescriptionItemSize;
14
+ /**
15
+ * The parts which are protected from shrinking and truncation when horizontal space is limited.
16
+ * @default 'end'
17
+ */
18
+ priority?: Priority;
13
19
  /**
14
20
  * Additional CSS classes for layout adjustments.
15
21
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/DescriptionItem/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,S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AAG,IAAI,GAAG,IAAI,CAAC;AAE9C,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC,MAAM,MAAM,4BAA4B,GAAG;IACzC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAEjC,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC"}
@@ -11,7 +11,7 @@ const D = u("flex px-24 text-base", {
11
11
  variants: {
12
12
  density: {
13
13
  compact: "mb-12 h-64 min-h-64 flex-row items-center gap-12",
14
- expanded: "flex-col gap-16 pb-12 pt-10"
14
+ expanded: "flex-col gap-16 pt-10 pb-12"
15
15
  }
16
16
  }
17
17
  }), d = ({ onBack: r }) => {
@@ -4,14 +4,14 @@ import { createElement as k } from "react";
4
4
  const h = a("inline-block shrink-0", {
5
5
  variants: {
6
6
  size: {
7
- 12: "icon-w-12 icon-h-12 icon-stroke-12",
8
- 16: "icon-w-16 icon-h-16 icon-stroke-16",
9
- 20: "icon-w-20 icon-h-20 icon-stroke-20",
10
- 32: "icon-w-32 icon-h-32 icon-stroke-32",
11
- 24: "icon-w-24 icon-h-24 icon-stroke-24",
12
- 40: "icon-w-40 icon-h-40 icon-stroke-40",
13
- 48: "icon-w-48 icon-h-48 icon-stroke-48",
14
- 56: "icon-w-56 icon-h-56 icon-stroke-56"
7
+ 12: "icon-h-12 icon-w-12 icon-stroke-12",
8
+ 16: "icon-h-16 icon-w-16 icon-stroke-16",
9
+ 20: "icon-h-20 icon-w-20 icon-stroke-20",
10
+ 32: "icon-h-32 icon-w-32 icon-stroke-32",
11
+ 24: "icon-h-24 icon-w-24 icon-stroke-24",
12
+ 40: "icon-h-40 icon-w-40 icon-stroke-40",
13
+ 48: "icon-h-48 icon-w-48 icon-stroke-48",
14
+ 56: "icon-h-56 icon-w-56 icon-stroke-56"
15
15
  }
16
16
  },
17
17
  defaultVariants: {
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ListItem/ListItem.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,aAAa,EACb,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAsCjB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,QAAQ,GAAI,4BAA4B,aAAa,4CAgCjE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,wCAK7B,oBAAoB,4CAUtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,wCAK7B,oBAAoB,4CAUtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,wC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