@ledgerhq/lumen-ui-react 0.1.21 → 0.1.22

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 (42) hide show
  1. package/dist/index.js +121 -121
  2. package/dist/lib/Components/ListItem/ListItem.d.ts +2 -2
  3. package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
  4. package/dist/lib/Components/ListItem/ListItem.js +87 -51
  5. package/dist/lib/Components/ListItem/types.d.ts +9 -9
  6. package/dist/lib/Components/ListItem/types.d.ts.map +1 -1
  7. package/dist/lib/Components/MediaButton/MediaButton.d.ts +30 -0
  8. package/dist/lib/Components/MediaButton/MediaButton.d.ts.map +1 -0
  9. package/dist/lib/Components/{TriggerButton/TriggerButton.js → MediaButton/MediaButton.js} +24 -23
  10. package/dist/lib/Components/MediaButton/index.d.ts +3 -0
  11. package/dist/lib/Components/MediaButton/index.d.ts.map +1 -0
  12. package/dist/lib/Components/{TriggerButton → MediaButton}/types.d.ts +9 -4
  13. package/dist/lib/Components/MediaButton/types.d.ts.map +1 -0
  14. package/dist/lib/Components/Popover/Popover.d.ts +1 -1
  15. package/dist/lib/Components/Popover/Popover.d.ts.map +1 -1
  16. package/dist/lib/Components/Popover/Popover.js +36 -34
  17. package/dist/lib/Components/Popover/types.d.ts +11 -1
  18. package/dist/lib/Components/Popover/types.d.ts.map +1 -1
  19. package/dist/lib/Components/Select/Select.d.ts +2 -3
  20. package/dist/lib/Components/Select/Select.d.ts.map +1 -1
  21. package/dist/lib/Components/Select/Select.js +132 -139
  22. package/dist/lib/Components/Select/index.d.ts +1 -1
  23. package/dist/lib/Components/Select/index.d.ts.map +1 -1
  24. package/dist/lib/Components/Select/types.d.ts +2 -10
  25. package/dist/lib/Components/Select/types.d.ts.map +1 -1
  26. package/dist/lib/Components/ThemeProvider/ThemeProvider.d.ts +7 -0
  27. package/dist/lib/Components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
  28. package/dist/lib/Components/ThemeProvider/ThemeProvider.js +24 -18
  29. package/dist/lib/Components/ThemeProvider/ThemeProvider.types.d.ts +7 -1
  30. package/dist/lib/Components/ThemeProvider/ThemeProvider.types.d.ts.map +1 -1
  31. package/dist/lib/Components/ThemeProvider/useRootColorModeSideEffect.d.ts +10 -5
  32. package/dist/lib/Components/ThemeProvider/useRootColorModeSideEffect.d.ts.map +1 -1
  33. package/dist/lib/Components/ThemeProvider/useRootColorModeSideEffect.js +22 -21
  34. package/dist/lib/Components/index.d.ts +1 -1
  35. package/dist/lib/Components/index.d.ts.map +1 -1
  36. package/dist/package.json +3 -2
  37. package/package.json +2 -1
  38. package/dist/lib/Components/TriggerButton/TriggerButton.d.ts +0 -30
  39. package/dist/lib/Components/TriggerButton/TriggerButton.d.ts.map +0 -1
  40. package/dist/lib/Components/TriggerButton/index.d.ts +0 -3
  41. package/dist/lib/Components/TriggerButton/index.d.ts.map +0 -1
  42. package/dist/lib/Components/TriggerButton/types.d.ts.map +0 -1
@@ -1,32 +1,31 @@
1
- import { jsx as a, jsxs as d } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
2
  import { useDisabledContext as q, cn as l } from "../../../libs/utils-shared/dist/index.js";
3
3
  import { cva as z } from "class-variance-authority";
4
4
  import { useLayoutEffect as D } from "react";
5
5
  import { SelectProvider as G, useSelectContext as m } from "./SelectContext.js";
6
6
  import { useControllableState as k } from "../../../utils/useControllableState/useControllableState.js";
7
7
  import { useSelectItems as E } from "./useSelectItems/useSelectItems.js";
8
- import { SearchInput as B } from "../SearchInput/SearchInput.js";
9
- import { Check as F } from "../../Symbols/Icons/Check.js";
10
- import { Divider as W } from "../Divider/Divider.js";
11
- import { TriggerButton as A } from "../TriggerButton/TriggerButton.js";
12
- import { ChevronDown as H } from "../../Symbols/Icons/ChevronDown.js";
13
- import { ComboboxRoot as J } from "../../../node_modules/@base-ui/react/esm/combobox/root/ComboboxRoot.js";
8
+ import { SearchInput as F } from "../SearchInput/SearchInput.js";
9
+ import { Check as W } from "../../Symbols/Icons/Check.js";
10
+ import { Divider as A } from "../Divider/Divider.js";
11
+ import { ChevronDown as B } from "../../Symbols/Icons/ChevronDown.js";
12
+ import { ComboboxRoot as H } from "../../../node_modules/@base-ui/react/esm/combobox/root/ComboboxRoot.js";
14
13
  import { ComboboxTrigger as b } from "../../../node_modules/@base-ui/react/esm/combobox/trigger/ComboboxTrigger.js";
15
- import { ComboboxPortal as K } from "../../../node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortal.js";
16
- import { ComboboxPositioner as M } from "../../../node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositioner.js";
17
- import { ComboboxPopup as O } from "../../../node_modules/@base-ui/react/esm/combobox/popup/ComboboxPopup.js";
18
- import { ComboboxInput as Q } from "../../../node_modules/@base-ui/react/esm/combobox/input/ComboboxInput.js";
19
- import { ComboboxList as U } from "../../../node_modules/@base-ui/react/esm/combobox/list/ComboboxList.js";
20
- import { ComboboxGroup as X } from "../../../node_modules/@base-ui/react/esm/combobox/group/ComboboxGroup.js";
21
- import { ComboboxCollection as Y } from "../../../node_modules/@base-ui/react/esm/combobox/collection/ComboboxCollection.js";
22
- import { ComboboxItem as Z } from "../../../node_modules/@base-ui/react/esm/combobox/item/ComboboxItem.js";
23
- import { ComboboxItemIndicator as _ } from "../../../node_modules/@base-ui/react/esm/combobox/item-indicator/ComboboxItemIndicator.js";
24
- import { ComboboxEmpty as $ } from "../../../node_modules/@base-ui/react/esm/combobox/empty/ComboboxEmpty.js";
14
+ import { ComboboxPortal as J } from "../../../node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortal.js";
15
+ import { ComboboxPositioner as K } from "../../../node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositioner.js";
16
+ import { ComboboxPopup as M } from "../../../node_modules/@base-ui/react/esm/combobox/popup/ComboboxPopup.js";
17
+ import { ComboboxInput as O } from "../../../node_modules/@base-ui/react/esm/combobox/input/ComboboxInput.js";
18
+ import { ComboboxList as Q } from "../../../node_modules/@base-ui/react/esm/combobox/list/ComboboxList.js";
19
+ import { ComboboxGroup as U } from "../../../node_modules/@base-ui/react/esm/combobox/group/ComboboxGroup.js";
20
+ import { ComboboxCollection as X } from "../../../node_modules/@base-ui/react/esm/combobox/collection/ComboboxCollection.js";
21
+ import { ComboboxItem as Y } from "../../../node_modules/@base-ui/react/esm/combobox/item/ComboboxItem.js";
22
+ import { ComboboxItemIndicator as Z } from "../../../node_modules/@base-ui/react/esm/combobox/item-indicator/ComboboxItemIndicator.js";
23
+ import { ComboboxEmpty as _ } from "../../../node_modules/@base-ui/react/esm/combobox/empty/ComboboxEmpty.js";
25
24
  import { ComboboxValue as f } from "../../../node_modules/@base-ui/react/esm/combobox/value/ComboboxValue.js";
26
- import { ComboboxGroupLabel as ee } from "../../../node_modules/@base-ui/react/esm/combobox/group-label/ComboboxGroupLabel.js";
27
- function De({
28
- value: t,
29
- defaultValue: o,
25
+ import { ComboboxGroupLabel as $ } from "../../../node_modules/@base-ui/react/esm/combobox/group-label/ComboboxGroupLabel.js";
26
+ function qe({
27
+ value: o,
28
+ defaultValue: a,
30
29
  onValueChange: e,
31
30
  disabled: r,
32
31
  items: s,
@@ -35,8 +34,8 @@ function De({
35
34
  searchValue: c,
36
35
  defaultSearchValue: u,
37
36
  onSearchValueChange: h,
38
- open: g,
39
- defaultOpen: x,
37
+ open: x,
38
+ defaultOpen: g,
40
39
  onOpenChange: S,
41
40
  name: y,
42
41
  required: v,
@@ -47,8 +46,8 @@ function De({
47
46
  mergeWith: { disabled: r }
48
47
  }), [p, w] = k(
49
48
  {
50
- prop: t,
51
- defaultProp: o ?? null,
49
+ prop: o,
50
+ defaultProp: a ?? null,
52
51
  onChange: (j) => {
53
52
  e?.(j);
54
53
  }
@@ -56,9 +55,9 @@ function De({
56
55
  ), {
57
56
  isGrouped: I,
58
57
  groupedItems: V,
59
- filteredItemsForRoot: T,
60
- resolvedSearchValue: L,
61
- registerSearch: R,
58
+ filteredItemsForRoot: L,
59
+ resolvedSearchValue: R,
60
+ registerSearch: T,
62
61
  handleSearchValueChange: P
63
62
  } = E({
64
63
  items: s,
@@ -68,43 +67,43 @@ function De({
68
67
  defaultSearchValue: u,
69
68
  onSearchValueChange: h
70
69
  });
71
- return /* @__PURE__ */ a(
72
- J,
70
+ return /* @__PURE__ */ t(
71
+ H,
73
72
  {
74
73
  "data-slot": "select",
75
74
  filter: null,
76
75
  items: V ?? s,
77
- filteredItems: T,
78
- inputValue: L,
76
+ filteredItems: L,
77
+ inputValue: R,
79
78
  onInputValueChange: P,
80
79
  value: p,
81
80
  onValueChange: w,
82
- open: g,
83
- defaultOpen: x,
81
+ open: x,
82
+ defaultOpen: g,
84
83
  onOpenChange: S,
85
84
  name: y,
86
85
  required: v,
87
86
  disabled: N,
88
- children: /* @__PURE__ */ a(G, { value: { selectedValue: p, registerSearch: R, isGrouped: I }, children: C })
87
+ children: /* @__PURE__ */ t(G, { value: { selectedValue: p, registerSearch: T, isGrouped: I }, children: C })
89
88
  }
90
89
  );
91
90
  }
92
- const te = l(
91
+ const ee = l(
93
92
  "group relative flex h-48 w-full cursor-pointer items-center justify-between gap-8",
94
93
  "rounded-sm bg-muted px-16",
95
94
  "body-2 text-base",
96
95
  "hover:bg-muted-hover",
97
96
  "transition-colors duration-200 focus:ring-2 focus:ring-active focus:outline-hidden",
98
97
  "disabled:cursor-not-allowed disabled:text-disabled"
99
- ), oe = l(
98
+ ), te = l(
100
99
  "pointer-events-none absolute left-16 origin-left text-muted transition-all duration-300",
101
100
  "top-10 -translate-y-4 body-4",
102
101
  "group-data-placeholder:top-14 group-data-placeholder:translate-y-0 group-data-placeholder:body-2",
103
102
  "group-data-disabled:text-disabled",
104
103
  "max-w-[calc(100%-var(--size-56))] truncate"
105
- ), ae = ({
106
- ref: t,
107
- className: o,
104
+ ), oe = ({
105
+ ref: o,
106
+ className: a,
108
107
  labelClassName: e,
109
108
  label: r,
110
109
  ...s
@@ -116,14 +115,14 @@ const te = l(
116
115
  return /* @__PURE__ */ d(
117
116
  b,
118
117
  {
119
- ref: t,
118
+ ref: o,
120
119
  "data-slot": "select-trigger",
121
120
  "data-placeholder": i ? void 0 : "",
122
- className: l(te, o),
121
+ className: l(ee, a),
123
122
  ...s,
124
123
  children: [
125
- r && /* @__PURE__ */ a("label", { className: l(oe, e), children: r }),
126
- /* @__PURE__ */ a(
124
+ r && /* @__PURE__ */ t("label", { className: l(te, e), children: r }),
125
+ /* @__PURE__ */ t(
127
126
  "span",
128
127
  {
129
128
  className: l(
@@ -131,11 +130,11 @@ const te = l(
131
130
  r && "mt-16 opacity-100 transition-opacity delay-100 duration-300",
132
131
  r && !i && "mt-0 opacity-0"
133
132
  ),
134
- children: /* @__PURE__ */ a(f, {})
133
+ children: /* @__PURE__ */ t(f, {})
135
134
  }
136
135
  ),
137
- /* @__PURE__ */ a(
138
- H,
136
+ /* @__PURE__ */ t(
137
+ B,
139
138
  {
140
139
  size: 20,
141
140
  className: "text-muted group-data-disabled:text-disabled"
@@ -144,21 +143,21 @@ const te = l(
144
143
  ]
145
144
  }
146
145
  );
147
- }, Ge = ({ render: t, disabled: o, ...e }) => {
146
+ }, ze = ({ render: o, disabled: a, ...e }) => {
148
147
  const { selectedValue: r } = m({
149
148
  consumerName: "SelectTrigger",
150
149
  contextRequired: !0
151
- }), s = /* @__PURE__ */ a(f, {});
152
- return t ? /* @__PURE__ */ a(
150
+ }), s = /* @__PURE__ */ t(f, {});
151
+ return o ? /* @__PURE__ */ t(
153
152
  b,
154
153
  {
155
- disabled: o,
154
+ disabled: a,
156
155
  ref: e.ref,
157
156
  "data-slot": "select-trigger",
158
- render: t({ selectedValue: r, selectedContent: s })
157
+ render: o({ selectedValue: r, selectedContent: s })
159
158
  }
160
- ) : /* @__PURE__ */ a(ae, { ...e, disabled: o });
161
- }, re = z(
159
+ ) : /* @__PURE__ */ t(oe, { ...e, disabled: a });
160
+ }, ae = z(
162
161
  [
163
162
  "group/select-content relative flex max-h-(--available-height) w-(--anchor-width) flex-col overflow-hidden",
164
163
  "rounded-sm bg-surface",
@@ -186,38 +185,38 @@ const te = l(
186
185
  }
187
186
  }
188
187
  }
189
- ), ke = ({
190
- ref: t,
191
- className: o,
188
+ ), De = ({
189
+ ref: o,
190
+ className: a,
192
191
  children: e,
193
192
  side: r = "bottom",
194
193
  sideOffset: s = 8,
195
194
  align: n = "start",
196
195
  autoFocusSearch: i = !1,
197
196
  ...c
198
- }) => /* @__PURE__ */ a(K, { "data-slot": "select-portal", children: /* @__PURE__ */ a(
199
- M,
197
+ }) => /* @__PURE__ */ t(J, { "data-slot": "select-portal", children: /* @__PURE__ */ t(
198
+ K,
200
199
  {
201
200
  "data-slot": "select-positioner",
202
201
  className: "pointer-events-auto z-select",
203
202
  side: r,
204
203
  sideOffset: s,
205
204
  align: n,
206
- children: /* @__PURE__ */ a(
207
- O,
205
+ children: /* @__PURE__ */ t(
206
+ M,
208
207
  {
209
- ref: t,
208
+ ref: o,
210
209
  "data-slot": "select-content",
211
210
  initialFocus: i ? void 0 : !1,
212
- className: l(re({ side: r }), o),
211
+ className: l(ae({ side: r }), a),
213
212
  ...c,
214
213
  children: e
215
214
  }
216
215
  )
217
216
  }
218
- ) }), Ee = ({
219
- ref: t,
220
- className: o,
217
+ ) }), Ge = ({
218
+ ref: o,
219
+ className: a,
221
220
  renderItem: e,
222
221
  ...r
223
222
  }) => {
@@ -225,40 +224,40 @@ const te = l(
225
224
  consumerName: "SelectList",
226
225
  contextRequired: !0
227
226
  });
228
- return /* @__PURE__ */ a(
229
- U,
227
+ return /* @__PURE__ */ t(
228
+ Q,
230
229
  {
231
- ref: t,
230
+ ref: o,
232
231
  "data-slot": "select-list",
233
232
  className: l(
234
233
  "min-h-0 min-w-(--anchor-width) flex-1 overflow-y-auto p-8 group-data-empty/select-content:p-0",
235
- o
234
+ a
236
235
  ),
237
236
  ...r,
238
237
  children: s ? (n, i) => /* @__PURE__ */ d(
239
- X,
238
+ U,
240
239
  {
241
240
  items: n.items,
242
241
  "data-slot": "select-group",
243
242
  children: [
244
- i > 0 && /* @__PURE__ */ a(ne, {}),
245
- n.label && /* @__PURE__ */ a(le, { children: n.label }),
246
- /* @__PURE__ */ a(Y, { children: e })
243
+ i > 0 && /* @__PURE__ */ t(se, {}),
244
+ n.label && /* @__PURE__ */ t(re, { children: n.label }),
245
+ /* @__PURE__ */ t(X, { children: e })
247
246
  ]
248
247
  },
249
248
  n.label
250
249
  ) : e
251
250
  }
252
251
  );
253
- }, le = ({ ref: t, className: o, ...e }) => /* @__PURE__ */ a(
254
- ee,
252
+ }, re = ({ ref: o, className: a, ...e }) => /* @__PURE__ */ t(
253
+ $,
255
254
  {
256
- ref: t,
255
+ ref: o,
257
256
  "data-slot": "select-label",
258
- className: l("mb-4 px-8 pt-8 pb-0 body-3-semi-bold text-muted", o),
257
+ className: l("mb-4 px-8 pt-8 pb-0 body-3-semi-bold text-muted", a),
259
258
  ...e
260
259
  }
261
- ), se = l(
260
+ ), le = l(
262
261
  "group/item flex w-full min-w-0 cursor-pointer items-center gap-12 bg-base-transparent select-none",
263
262
  "rounded-sm p-8",
264
263
  "body-2 text-base",
@@ -266,70 +265,70 @@ const te = l(
266
265
  "data-highlighted:bg-base-transparent-hover",
267
266
  "active:bg-base-transparent-pressed",
268
267
  "data-disabled:cursor-not-allowed data-disabled:text-disabled"
269
- ), Be = ({
270
- ref: t,
271
- className: o,
268
+ ), ke = ({
269
+ ref: o,
270
+ className: a,
272
271
  children: e,
273
272
  ...r
274
273
  }) => /* @__PURE__ */ d(
275
- Z,
274
+ Y,
276
275
  {
277
- ref: t,
276
+ ref: o,
278
277
  "data-slot": "select-item",
279
- className: l(se, o),
278
+ className: l(le, a),
280
279
  ...r,
281
280
  children: [
282
281
  e,
283
- /* @__PURE__ */ a(_, { className: "ml-auto flex shrink-0 items-center justify-center", children: /* @__PURE__ */ a(F, { size: 24, className: "shrink-0 text-active" }) })
282
+ /* @__PURE__ */ t(Z, { className: "ml-auto flex shrink-0 items-center justify-center", children: /* @__PURE__ */ t(W, { size: 24, className: "shrink-0 text-active" }) })
284
283
  ]
285
284
  }
286
- ), ne = ({
287
- ref: t,
288
- className: o,
285
+ ), se = ({
286
+ ref: o,
287
+ className: a,
289
288
  ...e
290
- }) => /* @__PURE__ */ a(W, { ref: t, className: l("mx-8 my-4 w-auto", o), ...e }), Fe = ({ ref: t, className: o, ...e }) => /* @__PURE__ */ a(
289
+ }) => /* @__PURE__ */ t(A, { ref: o, className: l("mx-8 my-4 w-auto", a), ...e }), Ee = ({ ref: o, className: a, ...e }) => /* @__PURE__ */ t(
291
290
  "span",
292
291
  {
293
- ref: t,
292
+ ref: o,
294
293
  "data-slot": "select-item-text",
295
- className: l("truncate body-2", o),
294
+ className: l("truncate body-2", a),
296
295
  ...e
297
296
  }
298
- ), We = ({
299
- ref: t,
300
- className: o,
297
+ ), Fe = ({
298
+ ref: o,
299
+ className: a,
301
300
  children: e,
302
301
  ...r
303
- }) => /* @__PURE__ */ a(
302
+ }) => /* @__PURE__ */ t(
304
303
  "div",
305
304
  {
306
- ref: t,
305
+ ref: o,
307
306
  "data-slot": "select-item-content",
308
- className: l("flex min-w-0 flex-1 flex-col gap-4", o),
307
+ className: l("flex min-w-0 flex-1 flex-col gap-4", a),
309
308
  ...r,
310
309
  children: e
311
310
  }
312
- ), Ae = ({
313
- ref: t,
314
- className: o,
311
+ ), We = ({
312
+ ref: o,
313
+ className: a,
315
314
  children: e,
316
315
  ...r
317
- }) => /* @__PURE__ */ a(
316
+ }) => /* @__PURE__ */ t(
318
317
  "div",
319
318
  {
320
- ref: t,
319
+ ref: o,
321
320
  "data-slot": "select-item-description",
322
321
  className: l(
323
322
  "truncate body-3 text-muted",
324
323
  "group-data-disabled/item:text-disabled",
325
- o
324
+ a
326
325
  ),
327
326
  ...r,
328
327
  children: e
329
328
  }
330
- ), He = ({
331
- className: t,
332
- placeholder: o = "Search",
329
+ ), Ae = ({
330
+ className: o,
331
+ placeholder: a = "Search",
333
332
  errorMessage: e,
334
333
  "aria-invalid": r,
335
334
  suffix: s,
@@ -340,11 +339,11 @@ const te = l(
340
339
  consumerName: "SelectSearch",
341
340
  contextRequired: !0
342
341
  });
343
- return D(() => c(), [c]), /* @__PURE__ */ a(
344
- Q,
342
+ return D(() => c(), [c]), /* @__PURE__ */ t(
343
+ O,
345
344
  {
346
- render: (u) => /* @__PURE__ */ a(
347
- B,
345
+ render: (u) => /* @__PURE__ */ t(
346
+ F,
348
347
  {
349
348
  ...u,
350
349
  "aria-invalid": r,
@@ -352,52 +351,46 @@ const te = l(
352
351
  suffix: s,
353
352
  onClear: n,
354
353
  hideClearButton: i,
355
- placeholder: o,
354
+ placeholder: a,
356
355
  containerClassName: "rounded-b-none ring-inset",
357
- className: l(t, "rounded-b-none ring-inset")
356
+ className: l(o, "rounded-b-none ring-inset")
358
357
  }
359
358
  )
360
359
  }
361
360
  );
362
- }, Je = ({
363
- ref: t,
364
- className: o,
361
+ }, Be = ({
362
+ ref: o,
363
+ className: a,
365
364
  title: e,
366
365
  description: r,
367
366
  ...s
368
367
  }) => /* @__PURE__ */ d(
369
- $,
368
+ _,
370
369
  {
371
- ref: t,
370
+ ref: o,
372
371
  "data-slot": "select-empty-state",
373
372
  className: l(
374
373
  "hidden w-full flex-col items-center gap-8 py-24",
375
374
  "group-data-empty/select-content:flex",
376
- o
375
+ a
377
376
  ),
378
377
  ...s,
379
378
  children: [
380
- /* @__PURE__ */ a("span", { className: "heading-4-semi-bold text-base", children: e }),
381
- r && /* @__PURE__ */ a("span", { className: "body-2 text-muted", children: r })
379
+ /* @__PURE__ */ t("span", { className: "heading-4-semi-bold text-base", children: e }),
380
+ r && /* @__PURE__ */ t("span", { className: "body-2 text-muted", children: r })
382
381
  ]
383
382
  }
384
- ), Ke = ({
385
- selectedValue: t,
386
- selectedContent: o,
387
- label: e,
388
- ...r
389
- }) => /* @__PURE__ */ a(A, { ...r, children: t ? o : e });
383
+ );
390
384
  export {
391
- De as Select,
392
- ke as SelectContent,
393
- Je as SelectEmptyState,
394
- Be as SelectItem,
395
- We as SelectItemContent,
396
- Ae as SelectItemDescription,
397
- Fe as SelectItemText,
398
- Ee as SelectList,
399
- He as SelectSearch,
400
- ne as SelectSeparator,
401
- Ge as SelectTrigger,
402
- Ke as SelectTriggerButton
385
+ qe as Select,
386
+ De as SelectContent,
387
+ Be as SelectEmptyState,
388
+ ke as SelectItem,
389
+ Fe as SelectItemContent,
390
+ We as SelectItemDescription,
391
+ Ee as SelectItemText,
392
+ Ge as SelectList,
393
+ Ae as SelectSearch,
394
+ se as SelectSeparator,
395
+ ze as SelectTrigger
403
396
  };
@@ -1,3 +1,3 @@
1
1
  export * from './Select';
2
- export type { SelectItemData, SelectProps, SelectTriggerProps, SelectTriggerRenderProps, SelectContentProps, SelectSearchProps, SelectListProps, SelectItemTextProps, SelectItemContentProps, SelectItemDescriptionProps, SelectItemProps, SelectSeparatorProps, SelectEmptyStateProps, SelectTriggerButtonProps, } from './types';
2
+ export type { SelectItemData, SelectProps, SelectTriggerProps, SelectTriggerRenderProps, SelectContentProps, SelectSearchProps, SelectListProps, SelectItemTextProps, SelectItemContentProps, SelectItemDescriptionProps, SelectItemProps, SelectSeparatorProps, SelectEmptyStateProps, } from './types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,YAAY,EACV,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,YAAY,EACV,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { ComponentPropsWithRef, ReactElement, ReactNode } from 'react';
2
2
  import { SearchInputProps } from '../SearchInput/types';
3
- import { TriggerButtonProps } from '../TriggerButton';
4
3
  export type SelectItemData<Meta = Record<string, unknown>> = {
5
4
  /** Unique string identifier for this item, used for selection tracking. */
6
5
  value: string;
@@ -139,9 +138,9 @@ export type SelectTriggerProps = {
139
138
  /**
140
139
  * Render function that replaces the default input-style trigger.
141
140
  * When provided, the trigger delegates rendering to this function.
142
- * Can be a preset component (e.g. `SelectTriggerButton`) or a custom render function.
141
+ * Use any component (e.g. `MediaButton`) or a custom render function.
143
142
  *
144
- * @example render={(props) => <SelectTriggerButton {...props} label="Label" />}
143
+ * @example render={({ selectedValue, selectedContent }) => <MediaButton>{selectedValue ? selectedContent : 'Label'}</MediaButton>}
145
144
  * @example render={({ selectedValue, selectedContent }) => <MyTrigger />}
146
145
  */
147
146
  render?: (props: SelectTriggerRenderProps) => ReactElement;
@@ -285,11 +284,4 @@ export type SelectItemDescriptionProps = {
285
284
  */
286
285
  className?: string;
287
286
  } & ComponentPropsWithRef<'div'>;
288
- export type SelectTriggerButtonProps = SelectTriggerRenderProps & Omit<TriggerButtonProps, 'children'> & {
289
- /**
290
- * The label displayed when no value is selected.
291
- * Once a value is selected, it is replaced by the selected item's content.
292
- */
293
- label: string;
294
- };
295
287
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Select/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,SAAS,EAA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MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC"}
@@ -1,4 +1,11 @@
1
+ import { LedgerLiveDarkTheme, LedgerLiveLightTheme } from '@ledgerhq/lumen-design-core';
1
2
  import { FC } from 'react';
2
3
  import { ThemeProviderProps } from './ThemeProvider.types';
4
+ type ThemeProviderState = {
5
+ theme?: LedgerLiveDarkTheme | LedgerLiveLightTheme;
6
+ colorScheme: 'light' | 'dark';
7
+ };
3
8
  export declare const ThemeProvider: FC<ThemeProviderProps>;
9
+ export declare const useTheme: () => ThemeProviderState;
10
+ export {};
4
11
  //# sourceMappingURL=ThemeProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ThemeProvider/ThemeProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAiB,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAU1E,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAoBhD,CAAC"}
1
+ {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/ThemeProvider/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAiB,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAM1E,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,mBAAmB,GAAG,oBAAoB,CAAC;IACnD,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;CAC/B,CAAC;AAKF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAwBhD,CAAC;AAEF,eAAO,MAAM,QAAQ,0BAOpB,CAAC"}
@@ -1,24 +1,30 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { createSafeContext as i } from "../../../libs/utils-shared/dist/index.js";
3
- import { useMemo as f } from "react";
4
- import { COLOR_SCHEMES as s } from "./ThemeProvider.types.js";
5
- import { useRootColorModeSideEffect as n } from "./useRootColorModeSideEffect.js";
6
- import { I18nProvider as d } from "../../../i18n/I18nProvider.js";
7
- const [p] = i("ThemeProvider"), M = ({
8
- children: t,
9
- colorScheme: r = s.system,
10
- locale: o
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { createSafeContext as h } from "../../../libs/utils-shared/dist/index.js";
3
+ import { useMemo as i } from "react";
4
+ import { COLOR_SCHEMES as u } from "./ThemeProvider.types.js";
5
+ import { useResolvedColorScheme as d, useRootColorModeSideEffect as f } from "./useRootColorModeSideEffect.js";
6
+ import { I18nProvider as l } from "../../../i18n/I18nProvider.js";
7
+ const [v, C] = h("ThemeProvider"), R = ({
8
+ themes: o,
9
+ children: m,
10
+ colorScheme: s = u.system,
11
+ locale: c
11
12
  }) => {
12
- n({ colorScheme: r });
13
- const m = f(
13
+ const e = d(s);
14
+ f(e);
15
+ const r = o?.[e], n = i(
14
16
  () => ({
15
- colorScheme: r,
16
- locale: o
17
+ theme: r,
18
+ colorScheme: e
17
19
  }),
18
- [r, o]
20
+ [r, e]
19
21
  );
20
- return /* @__PURE__ */ e(p, { value: m, children: /* @__PURE__ */ e(d, { locale: o, children: t }) });
21
- };
22
+ return /* @__PURE__ */ t(v, { value: n, children: /* @__PURE__ */ t(l, { locale: c, children: m }) });
23
+ }, E = () => C({
24
+ consumerName: "useTheme",
25
+ contextRequired: !0
26
+ });
22
27
  export {
23
- M as ThemeProvider
28
+ R as ThemeProvider,
29
+ E as useTheme
24
30
  };
@@ -1,3 +1,4 @@
1
+ import { LedgerLiveThemes } from '@ledgerhq/lumen-design-core';
1
2
  import { PropsWithChildren } from 'react';
2
3
  import { SupportedLocale } from '../../../i18n';
3
4
  export declare const COLOR_SCHEMES: {
@@ -5,8 +6,13 @@ export declare const COLOR_SCHEMES: {
5
6
  readonly dark: "dark";
6
7
  readonly system: "system";
7
8
  };
8
- export type ColorSchemeName = (typeof COLOR_SCHEMES)[keyof typeof COLOR_SCHEMES];
9
+ export type ColorSchemeName = keyof typeof COLOR_SCHEMES;
10
+ export type LumenThemes = LedgerLiveThemes;
9
11
  export type ThemeProviderProps = PropsWithChildren & {
12
+ /**
13
+ * Themes containing design-tokens for the app.
14
+ */
15
+ themes?: LumenThemes;
10
16
  /**
11
17
  * The color scheme of the theme.
12
18
  * system will follow the user's OS preference via `prefers-color-scheme`.