@ledgerhq/lumen-ui-react 0.1.38 → 0.1.40

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/i18n/locales/de.json.d.ts +15 -0
  2. package/dist/i18n/locales/de.json.js +1 -1
  3. package/dist/i18n/locales/en.json.d.ts +11 -0
  4. package/dist/i18n/locales/en.json.js +2 -2
  5. package/dist/i18n/locales/es.json.d.ts +15 -0
  6. package/dist/i18n/locales/es.json.js +1 -1
  7. package/dist/i18n/locales/fr.json.d.ts +11 -0
  8. package/dist/i18n/locales/fr.json.js +1 -1
  9. package/dist/i18n/locales/ja.json.d.ts +15 -0
  10. package/dist/i18n/locales/ja.json.js +2 -2
  11. package/dist/i18n/locales/ko.json.d.ts +15 -0
  12. package/dist/i18n/locales/ko.json.js +2 -2
  13. package/dist/i18n/locales/pt.json.d.ts +15 -0
  14. package/dist/i18n/locales/pt.json.js +1 -1
  15. package/dist/i18n/locales/ru.json.d.ts +15 -0
  16. package/dist/i18n/locales/ru.json.js +2 -2
  17. package/dist/i18n/locales/th.json.d.ts +15 -0
  18. package/dist/i18n/locales/th.json.js +2 -2
  19. package/dist/i18n/locales/tr.json.d.ts +15 -0
  20. package/dist/i18n/locales/tr.json.js +2 -2
  21. package/dist/i18n/locales/zh.json.d.ts +15 -0
  22. package/dist/i18n/locales/zh.json.js +2 -2
  23. package/dist/index.js +90 -88
  24. package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
  25. package/dist/lib/Components/AmountDisplay/AmountDisplay.js +47 -44
  26. package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  27. package/dist/lib/Components/AmountInput/AmountInput.js +63 -92
  28. package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.d.ts +21 -0
  29. package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.d.ts.map +1 -0
  30. package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.js +28 -0
  31. package/dist/lib/Components/AmountInput/useAutoWidthInput/useAutoWidthInput.d.ts +13 -0
  32. package/dist/lib/Components/AmountInput/useAutoWidthInput/useAutoWidthInput.d.ts.map +1 -0
  33. package/dist/lib/Components/AmountInput/useAutoWidthInput/useAutoWidthInput.js +29 -0
  34. package/dist/lib/Components/Avatar/Avatar.d.ts +1 -1
  35. package/dist/lib/Components/Avatar/Avatar.d.ts.map +1 -1
  36. package/dist/lib/Components/Avatar/Avatar.js +32 -26
  37. package/dist/lib/Components/Avatar/types.d.ts +7 -1
  38. package/dist/lib/Components/Avatar/types.d.ts.map +1 -1
  39. package/dist/lib/Components/Button/BaseButton.d.ts +1 -1
  40. package/dist/lib/Components/IconButton/IconButton.d.ts.map +1 -1
  41. package/dist/lib/Components/IconButton/IconButton.js +17 -16
  42. package/dist/lib/Components/Pagination/Pagination.d.ts +13 -0
  43. package/dist/lib/Components/Pagination/Pagination.d.ts.map +1 -0
  44. package/dist/lib/Components/Pagination/Pagination.js +93 -0
  45. package/dist/lib/Components/Pagination/getPaginationRange.d.ts +6 -0
  46. package/dist/lib/Components/Pagination/getPaginationRange.d.ts.map +1 -0
  47. package/dist/lib/Components/Pagination/getPaginationRange.js +25 -0
  48. package/dist/lib/Components/Pagination/index.d.ts +3 -0
  49. package/dist/lib/Components/Pagination/index.d.ts.map +1 -0
  50. package/dist/lib/Components/Pagination/types.d.ts +26 -0
  51. package/dist/lib/Components/Pagination/types.d.ts.map +1 -0
  52. package/dist/lib/Components/Table/Table.js +37 -37
  53. package/dist/lib/Components/index.d.ts +1 -0
  54. package/dist/lib/Components/index.d.ts.map +1 -1
  55. package/dist/package.json +1 -1
  56. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
- import { jsx as r, jsxs as u } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
2
  import { createSafeContext as N, cn as c } from "../../../libs/utils-shared/dist/index.js";
3
- import { cva as o } from "class-variance-authority";
3
+ import { cva as s } from "class-variance-authority";
4
4
  import { useThrottledScrollBottom as y } from "./utils/useThrottledScrollBottom.js";
5
5
  import { Spot as T } from "../Spot/Spot.js";
6
6
  import { Information as w } from "../../Symbols/Icons/Information.js";
@@ -9,7 +9,7 @@ import { ChevronUpDown as R } from "../../Symbols/Icons/ChevronUpDown.js";
9
9
  import { ChevronDescending as j } from "../../Symbols/Icons/ChevronDescending.js";
10
10
  import { ChevronAscending as B } from "../../Symbols/Icons/ChevronAscending.js";
11
11
  import { InteractiveIcon as k } from "../InteractiveIcon/InteractiveIcon.js";
12
- const [H, m] = N("Table"), I = o(
12
+ const [H, u] = N("Table"), I = s(
13
13
  "relative scrollbar-none w-full max-w-full border-collapse overflow-x-auto rounded-lg",
14
14
  {
15
15
  variants: {
@@ -25,7 +25,7 @@ const [H, m] = N("Table"), I = o(
25
25
  className: t,
26
26
  onScrollBottom: n,
27
27
  loading: l,
28
- ref: s,
28
+ ref: o,
29
29
  ...i
30
30
  }) => {
31
31
  const d = y({
@@ -36,7 +36,7 @@ const [H, m] = N("Table"), I = o(
36
36
  "div",
37
37
  {
38
38
  ...i,
39
- ref: s,
39
+ ref: o,
40
40
  className: I({ appearance: e, className: t }),
41
41
  onScroll: d,
42
42
  children: a
@@ -66,7 +66,7 @@ const [H, m] = N("Table"), I = o(
66
66
  clickable: t = !1,
67
67
  onClick: n,
68
68
  ref: l,
69
- ...s
69
+ ...o
70
70
  }) => /* @__PURE__ */ r(
71
71
  "tr",
72
72
  {
@@ -77,10 +77,10 @@ const [H, m] = N("Table"), I = o(
77
77
  t && "cursor-pointer outline-none select-none hover:bg-base-transparent-hover active:bg-base-transparent-pressed",
78
78
  e
79
79
  ),
80
- ...s,
80
+ ...o,
81
81
  children: a
82
82
  }
83
- ), S = o("", {
83
+ ), S = s("", {
84
84
  variants: {
85
85
  appearance: {
86
86
  "no-background": "bg-canvas",
@@ -98,7 +98,7 @@ const [H, m] = N("Table"), I = o(
98
98
  ref: n,
99
99
  ...l
100
100
  }) => {
101
- const { appearance: s } = m({
101
+ const { appearance: o } = u({
102
102
  consumerName: "TableHeaderRow",
103
103
  contextRequired: !0
104
104
  });
@@ -106,7 +106,7 @@ const [H, m] = N("Table"), I = o(
106
106
  "tr",
107
107
  {
108
108
  ref: n,
109
- className: S({ appearance: s, stickyHeader: t, className: e }),
109
+ className: S({ appearance: o, stickyHeader: t, className: e }),
110
110
  ...l,
111
111
  children: a
112
112
  }
@@ -118,7 +118,7 @@ const [H, m] = N("Table"), I = o(
118
118
  ref: n,
119
119
  ...l
120
120
  }) => {
121
- const { appearance: s } = m({
121
+ const { appearance: o } = u({
122
122
  consumerName: "TableGroupHeaderRow",
123
123
  contextRequired: !0
124
124
  });
@@ -127,13 +127,13 @@ const [H, m] = N("Table"), I = o(
127
127
  {
128
128
  className: c(
129
129
  "flex h-32 w-full items-center bg-muted px-12 body-3 text-base",
130
- s === "no-background" && "rounded-sm"
130
+ o === "no-background" && "rounded-sm"
131
131
  ),
132
132
  children: a
133
133
  }
134
134
  ) }) });
135
135
  }, p = {
136
- root: o(
136
+ root: s(
137
137
  "h-64 truncate p-12 body-3 text-base first:rounded-l-md last:rounded-r-md",
138
138
  {
139
139
  variants: {
@@ -147,7 +147,7 @@ const [H, m] = N("Table"), I = o(
147
147
  }
148
148
  }
149
149
  ),
150
- inner: o("flex flex-1 justify-end", {
150
+ inner: s("flex flex-1 justify-end", {
151
151
  variants: {
152
152
  align: {
153
153
  start: "text-start justify-start",
@@ -161,16 +161,16 @@ const [H, m] = N("Table"), I = o(
161
161
  hideBelow: t,
162
162
  align: n = "start",
163
163
  ref: l,
164
- ...s
164
+ ...o
165
165
  }) => /* @__PURE__ */ r(
166
166
  "td",
167
167
  {
168
168
  ref: l,
169
169
  className: p.root({ hideBelow: t, className: e }),
170
- ...s,
170
+ ...o,
171
171
  children: /* @__PURE__ */ r("div", { className: p.inner({ align: n }), children: a })
172
172
  }
173
- ), A = o("flex min-w-0 items-center gap-12", {
173
+ ), A = s("flex min-w-0 items-center gap-12", {
174
174
  variants: {
175
175
  align: {
176
176
  start: "text-start",
@@ -183,24 +183,24 @@ const [H, m] = N("Table"), I = o(
183
183
  leadingContent: t,
184
184
  title: n,
185
185
  description: l,
186
- ref: s,
186
+ ref: o,
187
187
  ...i
188
- }) => /* @__PURE__ */ u(
188
+ }) => /* @__PURE__ */ m(
189
189
  "div",
190
190
  {
191
- ref: s,
191
+ ref: o,
192
192
  className: A({ align: e, className: a }),
193
193
  ...i,
194
194
  children: [
195
195
  t && /* @__PURE__ */ r("div", { className: "shrink-0", children: t }),
196
- /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col gap-4", children: [
196
+ /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-col gap-4", children: [
197
197
  /* @__PURE__ */ r("div", { className: "shrink-0 body-2 text-base", children: n }),
198
198
  /* @__PURE__ */ r("div", { className: "truncate body-3 text-muted", children: l })
199
199
  ] })
200
200
  ]
201
201
  }
202
202
  ), f = {
203
- root: o("group h-40 truncate p-12 body-3 text-base", {
203
+ root: s("group h-40 truncate p-12 body-3 text-base", {
204
204
  variants: {
205
205
  hideBelow: {
206
206
  xs: "hidden xs:table-cell",
@@ -211,7 +211,7 @@ const [H, m] = N("Table"), I = o(
211
211
  }
212
212
  }
213
213
  }),
214
- content: o("flex min-w-0 items-center gap-4 truncate", {
214
+ content: s("flex min-w-0 items-center gap-4 truncate", {
215
215
  variants: {
216
216
  align: {
217
217
  start: "text-start justify-start",
@@ -219,7 +219,7 @@ const [H, m] = N("Table"), I = o(
219
219
  }
220
220
  }
221
221
  }),
222
- trailingContent: o(
222
+ trailingContent: s(
223
223
  "flex items-center justify-center opacity-0 group-hover:opacity-100"
224
224
  )
225
225
  }, ee = ({
@@ -228,7 +228,7 @@ const [H, m] = N("Table"), I = o(
228
228
  scope: t = "col",
229
229
  hideBelow: n,
230
230
  align: l = "start",
231
- trailingContent: s,
231
+ trailingContent: o,
232
232
  ref: i,
233
233
  ...d
234
234
  }) => /* @__PURE__ */ r(
@@ -238,9 +238,9 @@ const [H, m] = N("Table"), I = o(
238
238
  scope: t,
239
239
  className: f.root({ hideBelow: n, className: e }),
240
240
  ...d,
241
- children: /* @__PURE__ */ r("div", { className: "min-w-0", children: /* @__PURE__ */ u("div", { className: f.content({ align: l }), children: [
241
+ children: /* @__PURE__ */ r("div", { className: "min-w-0", children: /* @__PURE__ */ m("div", { className: f.content({ align: l }), children: [
242
242
  /* @__PURE__ */ r("span", { className: c("truncate", l === "end" && "order-1"), children: a }),
243
- /* @__PURE__ */ r("div", { className: "flex items-center justify-center opacity-0 group-hover:opacity-100", children: s })
243
+ /* @__PURE__ */ r("div", { className: "flex items-center justify-center opacity-0 group-hover:opacity-100", children: o })
244
244
  ] }) })
245
245
  }
246
246
  ), te = ({
@@ -287,7 +287,7 @@ const [H, m] = N("Table"), I = o(
287
287
  ref: e,
288
288
  ...t
289
289
  }) => {
290
- const { loading: n } = m({
290
+ const { loading: n } = u({
291
291
  consumerName: "TableLoadingRow",
292
292
  contextRequired: !0
293
293
  });
@@ -322,7 +322,7 @@ const [H, m] = N("Table"), I = o(
322
322
  desc: j,
323
323
  idle: R
324
324
  }, h = {
325
- root: o(
325
+ root: s(
326
326
  [
327
327
  "flex min-w-0 cursor-pointer items-center gap-4",
328
328
  "rounded-xs focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus"
@@ -336,7 +336,7 @@ const [H, m] = N("Table"), I = o(
336
336
  }
337
337
  }
338
338
  ),
339
- icon: o("", {
339
+ icon: s("", {
340
340
  variants: {
341
341
  active: {
342
342
  true: "opacity-100",
@@ -344,21 +344,21 @@ const [H, m] = N("Table"), I = o(
344
344
  }
345
345
  }
346
346
  })
347
- }, se = ({
347
+ }, oe = ({
348
348
  children: a,
349
349
  sortDirection: e,
350
350
  align: t = "start",
351
351
  onToggleSort: n,
352
352
  className: l,
353
- onClick: s,
353
+ onClick: o,
354
354
  ref: i,
355
355
  ...d
356
356
  }) => {
357
357
  const { t: b } = C(), v = L[e || "idle"], x = {
358
- asc: b("table.ascAriaLabel"),
359
- desc: b("table.descAriaLabel")
358
+ asc: b("components.table.ascAriaLabel"),
359
+ desc: b("components.table.descAriaLabel")
360
360
  };
361
- return /* @__PURE__ */ u(
361
+ return /* @__PURE__ */ m(
362
362
  "button",
363
363
  {
364
364
  ...d,
@@ -367,7 +367,7 @@ const [H, m] = N("Table"), I = o(
367
367
  className: h.root({ align: t, className: l }),
368
368
  "aria-label": e ? x[e] : void 0,
369
369
  onClick: (g) => {
370
- s?.(g), n?.(e === "asc" ? "desc" : "asc");
370
+ o?.(g), n?.(e === "asc" ? "desc" : "asc");
371
371
  },
372
372
  children: [
373
373
  /* @__PURE__ */ r("span", { className: "min-w-0 truncate", children: a }),
@@ -400,5 +400,5 @@ export {
400
400
  re as TableLoadingRow,
401
401
  O as TableRoot,
402
402
  Y as TableRow,
403
- se as TableSortButton
403
+ oe as TableSortButton
404
404
  };
@@ -30,6 +30,7 @@ export * from './Menu';
30
30
  export * from './NavBar';
31
31
  export * from './Popover';
32
32
  export * from './PageIndicator';
33
+ export * from './Pagination';
33
34
  export * from './SearchInput';
34
35
  export * from './SegmentedControl';
35
36
  export * from './Select';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/Components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,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c,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-react",
3
- "version": "0.1.37",
3
+ "version": "0.1.39",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "keywords": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-react",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "keywords": [
@@ -54,7 +54,7 @@
54
54
  "@radix-ui/react-tooltip": "^1.2.8",
55
55
  "class-variance-authority": "^0.7.1",
56
56
  "@tanstack/react-table": "^8.21.3",
57
- "@ledgerhq/lumen-design-core": "0.1.16",
57
+ "@ledgerhq/lumen-design-core": "0.1.17",
58
58
  "clsx": "^2.1.1",
59
59
  "react": "^18.0.0 || ^19.0.0",
60
60
  "react-dom": "^18.0.0 || ^19.0.0",