@ledgerhq/lumen-ui-react 0.1.57 → 0.1.59

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 (98) hide show
  1. package/dist/index.js +34 -34
  2. package/dist/lib/Components/core/AmountInput/useAmountInputValue/useAmountInputValue.js +6 -6
  3. package/dist/lib/Components/core/Avatar/Avatar.d.ts.map +1 -1
  4. package/dist/lib/Components/core/Avatar/Avatar.js +31 -35
  5. package/dist/lib/Components/core/Avatar/resolveAvatarColor.d.ts +9 -0
  6. package/dist/lib/Components/core/Avatar/resolveAvatarColor.d.ts.map +1 -1
  7. package/dist/lib/Components/core/Avatar/resolveAvatarColor.js +23 -5
  8. package/dist/lib/Components/core/Banner/Banner.js +25 -25
  9. package/dist/lib/Components/core/Button/Button.js +4 -4
  10. package/dist/lib/Components/core/Card/Card.js +16 -16
  11. package/dist/lib/Components/core/CardButton/CardButton.js +8 -8
  12. package/dist/lib/Components/core/CardButton/types.d.ts +1 -1
  13. package/dist/lib/Components/core/CardButton/types.d.ts.map +1 -1
  14. package/dist/lib/Components/core/Dialog/Dialog.js +4 -4
  15. package/dist/lib/Components/core/Divider/Divider.js +4 -4
  16. package/dist/lib/Components/core/DotIcon/DotIcon.d.ts +0 -13
  17. package/dist/lib/Components/core/DotIcon/DotIcon.d.ts.map +1 -1
  18. package/dist/lib/Components/core/DotIcon/DotIcon.js +20 -33
  19. package/dist/lib/Components/core/DotIcon/getDotIconProps.d.ts +66 -0
  20. package/dist/lib/Components/core/DotIcon/getDotIconProps.d.ts.map +1 -0
  21. package/dist/lib/Components/core/DotIcon/getDotIconProps.js +19 -0
  22. package/dist/lib/Components/core/DotIcon/index.d.ts +2 -1
  23. package/dist/lib/Components/core/DotIcon/index.d.ts.map +1 -1
  24. package/dist/lib/Components/core/DotSymbol/DotSymbol.d.ts +1 -5
  25. package/dist/lib/Components/core/DotSymbol/DotSymbol.d.ts.map +1 -1
  26. package/dist/lib/Components/core/DotSymbol/DotSymbol.js +18 -37
  27. package/dist/lib/Components/core/DotSymbol/getDotSymbolProps.d.ts +102 -0
  28. package/dist/lib/Components/core/DotSymbol/getDotSymbolProps.d.ts.map +1 -0
  29. package/dist/lib/Components/core/DotSymbol/getDotSymbolProps.js +25 -0
  30. package/dist/lib/Components/core/DotSymbol/index.d.ts +2 -1
  31. package/dist/lib/Components/core/DotSymbol/index.d.ts.map +1 -1
  32. package/dist/lib/Components/core/IconButton/IconButton.js +5 -5
  33. package/dist/lib/Components/core/Link/Link.js +6 -6
  34. package/dist/lib/Components/core/Link/types.d.ts +1 -1
  35. package/dist/lib/Components/core/Link/types.d.ts.map +1 -1
  36. package/dist/lib/Components/core/ListItem/ListItem.js +8 -8
  37. package/dist/lib/Components/core/MediaBanner/MediaBanner.js +4 -4
  38. package/dist/lib/Components/core/NavBar/CoinCapsule.js +4 -4
  39. package/dist/lib/Components/core/Popover/Popover.js +4 -4
  40. package/dist/lib/Components/core/SearchInput/SearchInput.js +2 -2
  41. package/dist/lib/Components/core/SectionHeader/SectionHeader.js +4 -4
  42. package/dist/lib/Components/core/SegmentedControl/types.d.ts +1 -1
  43. package/dist/lib/Components/core/SegmentedControl/types.d.ts.map +1 -1
  44. package/dist/lib/Components/core/SideBar/types.d.ts +1 -1
  45. package/dist/lib/Components/core/SideBar/types.d.ts.map +1 -1
  46. package/dist/lib/Components/core/Spinner/types.d.ts +1 -1
  47. package/dist/lib/Components/core/Spinner/types.d.ts.map +1 -1
  48. package/dist/lib/Components/core/Spot/Spot.d.ts.map +1 -1
  49. package/dist/lib/Components/core/Spot/Spot.js +65 -54
  50. package/dist/lib/Components/core/Spot/types.d.ts +1 -1
  51. package/dist/lib/Components/core/Spot/types.d.ts.map +1 -1
  52. package/dist/lib/Components/core/Stepper/Stepper.js +10 -10
  53. package/dist/lib/Components/core/Switch/Switch.js +4 -4
  54. package/dist/lib/Components/core/Tag/types.d.ts +1 -1
  55. package/dist/lib/Components/core/Tag/types.d.ts.map +1 -1
  56. package/dist/lib/Components/core/TileButton/types.d.ts +1 -1
  57. package/dist/lib/Components/core/TileButton/types.d.ts.map +1 -1
  58. package/dist/lib/Components/core/Tooltip/Tooltip.d.ts +0 -8
  59. package/dist/lib/Components/core/Tooltip/Tooltip.d.ts.map +1 -1
  60. package/dist/lib/Components/core/Tooltip/Tooltip.js +4 -4
  61. package/dist/lib/Components/internal/BaseButton/BaseButton.d.ts +1 -1
  62. package/dist/lib/Components/internal/BaseButton/BaseButton.js +12 -12
  63. package/dist/lib/Components/internal/BaseButton/types.d.ts +1 -1
  64. package/dist/lib/Components/internal/BaseButton/types.d.ts.map +1 -1
  65. package/dist/lib/Components/internal/BaseInput/BaseInput.js +12 -12
  66. package/dist/lib/Components/internal/BaseInput/BaseInputMultiline.js +10 -10
  67. package/dist/lib/Components/internal/BaseTag/BaseTag.js +19 -19
  68. package/dist/lib/Components/symbols/Icon/createIcon.js +3 -3
  69. package/dist/lib/Components/symbols/icons/CloudSync.d.ts +29 -0
  70. package/dist/lib/Components/symbols/icons/CloudSync.d.ts.map +1 -0
  71. package/dist/lib/Components/symbols/icons/CloudSync.js +28 -0
  72. package/dist/lib/Components/symbols/icons/Dollar.d.ts.map +1 -1
  73. package/dist/lib/Components/symbols/icons/Dollar.js +26 -14
  74. package/dist/lib/Components/symbols/icons/DollarConvert.js +3 -3
  75. package/dist/lib/Components/symbols/icons/DollarFill.d.ts +29 -0
  76. package/dist/lib/Components/symbols/icons/DollarFill.d.ts.map +1 -0
  77. package/dist/lib/Components/symbols/icons/DollarFill.js +25 -0
  78. package/dist/lib/Components/symbols/icons/FaceId.d.ts +29 -0
  79. package/dist/lib/Components/symbols/icons/FaceId.d.ts.map +1 -0
  80. package/dist/lib/Components/symbols/icons/FaceId.js +28 -0
  81. package/dist/lib/Components/symbols/icons/Fingerprint.d.ts +29 -0
  82. package/dist/lib/Components/symbols/icons/Fingerprint.d.ts.map +1 -0
  83. package/dist/lib/Components/symbols/icons/Fingerprint.js +28 -0
  84. package/dist/lib/Components/symbols/icons/Pause.d.ts.map +1 -1
  85. package/dist/lib/Components/symbols/icons/Pause.js +8 -7
  86. package/dist/lib/Components/symbols/icons/Range.d.ts.map +1 -1
  87. package/dist/lib/Components/symbols/icons/Range.js +8 -11
  88. package/dist/lib/Components/symbols/icons/Telegram.d.ts.map +1 -1
  89. package/dist/lib/Components/symbols/icons/Telegram.js +15 -12
  90. package/dist/lib/Components/symbols/icons/Usb.js +1 -1
  91. package/dist/lib/Components/symbols/index.d.ts +4 -0
  92. package/dist/lib/Components/symbols/index.d.ts.map +1 -1
  93. package/dist/lib/Components/symbols/index.js +482 -474
  94. package/dist/lib/Components/visualization/DonutChart/DonutChartCenter.js +2 -2
  95. package/dist/lib/Components/visualization/Legend/Legend.js +4 -4
  96. package/dist/lib/Components/visualization/config.d.ts +22 -22
  97. package/dist/package.json +3 -3
  98. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -8,10 +8,10 @@ import { resolveAvatarColor as C } from "./lib/Components/core/Avatar/resolveAva
8
8
  import { AvatarButton as S } from "./lib/Components/core/AvatarButton/AvatarButton.js";
9
9
  import { Banner as g } from "./lib/Components/core/Banner/Banner.js";
10
10
  import { Button as I } from "./lib/Components/core/Button/Button.js";
11
- import { Card as B, CardContent as D, CardContentDescription as M, CardContentRow as L, CardContentTitle as v, CardFooter as h, CardFooterActions as R, CardHeader as A, CardLeading as H, CardTrailing as w } from "./lib/Components/core/Card/Card.js";
11
+ import { Card as B, CardContent as D, CardContentDescription as M, CardContentRow as L, CardContentTitle as v, CardFooter as h, CardFooterActions as R, CardHeader as A, CardLeading as H, CardTrailing as P } from "./lib/Components/core/Card/Card.js";
12
12
  import { CardButton as y } from "./lib/Components/core/CardButton/CardButton.js";
13
13
  import { Checkbox as k } from "./lib/Components/core/Checkbox/Checkbox.js";
14
- import { ContentBanner as z, ContentBannerContent as E, ContentBannerDescription as F, ContentBannerTitle as O } from "./lib/Components/core/ContentBanner/ContentBanner.js";
14
+ import { ContentBanner as E, ContentBannerContent as F, ContentBannerDescription as O, ContentBannerTitle as z } from "./lib/Components/core/ContentBanner/ContentBanner.js";
15
15
  import { DataTable as _, DataTableGlobalSearchInput as j, DataTableRoot as q } from "./lib/Components/core/DataTable/DataTable.js";
16
16
  import { useLumenDataTable as K } from "./lib/Components/core/DataTable/useLumenDataTable/useLumenDataTable.js";
17
17
  import { DescriptionItem as U, DescriptionItemLabel as W, DescriptionItemLeading as X, DescriptionItemTrailing as Y, DescriptionItemValue as Z } from "./lib/Components/core/DescriptionItem/DescriptionItem.js";
@@ -20,14 +20,16 @@ import { Dialog as te, DialogBody as re, DialogBodyStickyContent as ae, DialogCo
20
20
  import { DialogHeader as me } from "./lib/Components/core/Dialog/DialogHeader/DialogHeader.js";
21
21
  import { Divider as Te } from "./lib/Components/core/Divider/Divider.js";
22
22
  import { DotCount as fe } from "./lib/Components/core/DotCount/DotCount.js";
23
- import { DotIcon as ce, dotIconSizeMap as Se, mediaImageDotIconSizeMap as ue, spotDotIconSizeMap as ge } from "./lib/Components/core/DotIcon/DotIcon.js";
23
+ import { DotIcon as ce, dotIconSizeMap as Se } from "./lib/Components/core/DotIcon/DotIcon.js";
24
+ import { getDotIconProps as ge } from "./lib/Components/core/DotIcon/getDotIconProps.js";
24
25
  import { DotIndicator as Ie } from "./lib/Components/core/DotIndicator/DotIndicator.js";
25
26
  import { getDotIndicatorProps as Be } from "./lib/Components/core/DotIndicator/getDotIndicatorProps.js";
26
- import { DotSymbol as Me, mediaImageDotSizeMap as Le, spotDotSizeMap as ve } from "./lib/Components/core/DotSymbol/DotSymbol.js";
27
+ import { DotSymbol as Me } from "./lib/Components/core/DotSymbol/DotSymbol.js";
28
+ import { getDotSymbolProps as ve } from "./lib/Components/core/DotSymbol/getDotSymbolProps.js";
27
29
  import { IconButton as Re } from "./lib/Components/core/IconButton/IconButton.js";
28
30
  import { InteractiveIcon as He } from "./lib/Components/core/InteractiveIcon/InteractiveIcon.js";
29
- import { Link as Pe } from "./lib/Components/core/Link/Link.js";
30
- import { ListItem as Ne, ListItemContent as ke, ListItemContentRow as Ge, ListItemDescription as ze, ListItemLeading as Ee, ListItemTitle as Fe, ListItemTrailing as Oe } from "./lib/Components/core/ListItem/ListItem.js";
31
+ import { Link as we } from "./lib/Components/core/Link/Link.js";
32
+ import { ListItem as Ne, ListItemContent as ke, ListItemContentRow as Ge, ListItemDescription as Ee, ListItemLeading as Fe, ListItemTitle as Oe, ListItemTrailing as ze } from "./lib/Components/core/ListItem/ListItem.js";
31
33
  import { MediaBanner as _e, MediaBannerDescription as je, MediaBannerTitle as qe } from "./lib/Components/core/MediaBanner/MediaBanner.js";
32
34
  import { MediaButton as Ke } from "./lib/Components/core/MediaButton/MediaButton.js";
33
35
  import { MediaCard as Ue, MediaCardTitle as We } from "./lib/Components/core/MediaCard/MediaCard.js";
@@ -37,10 +39,10 @@ import { Menu as oo, MenuCheckboxItem as to, MenuContent as ro, MenuGroup as ao,
37
39
  import { NavBar as uo, NavBarBackButton as go, NavBarCoinCapsule as bo, NavBarDescription as Io, NavBarLeading as so, NavBarTitle as Bo, NavBarTrailing as Do } from "./lib/Components/core/NavBar/NavBar.js";
38
40
  import { Popover as Lo, PopoverContent as vo, PopoverTrigger as ho, createPopoverHandle as Ro } from "./lib/Components/core/Popover/Popover.js";
39
41
  import { PageIndicator as Ho } from "./lib/Components/core/PageIndicator/PageIndicator.js";
40
- import { Pagination as Po } from "./lib/Components/core/Pagination/Pagination.js";
42
+ import { Pagination as wo } from "./lib/Components/core/Pagination/Pagination.js";
41
43
  import { SearchInput as No } from "./lib/Components/core/SearchInput/SearchInput.js";
42
- import { SectionHeader as Go, SectionHeaderLeading as zo, SectionHeaderTitle as Eo } from "./lib/Components/core/SectionHeader/SectionHeader.js";
43
- import { SegmentedControl as Oo, SegmentedControlButton as Vo, createSegmentedControl as _o } from "./lib/Components/core/SegmentedControl/SegmentedControl.js";
44
+ import { SectionHeader as Go, SectionHeaderLeading as Eo, SectionHeaderTitle as Fo } from "./lib/Components/core/SectionHeader/SectionHeader.js";
45
+ import { SegmentedControl as zo, SegmentedControlButton as Vo, createSegmentedControl as _o } from "./lib/Components/core/SegmentedControl/SegmentedControl.js";
44
46
  import { Select as qo, SelectContent as Jo, SelectEmptyState as Ko, SelectItem as Qo, SelectItemContent as Uo, SelectItemDescription as Wo, SelectItemText as Xo, SelectList as Yo, SelectSearch as Zo, SelectSeparator as $o, SelectTrigger as et, createSelect as ot } from "./lib/Components/core/Select/Select.js";
45
47
  import { SideBar as rt, SideBarCollapseToggle as at, SideBarItem as nt, SideBarLeading as it, SideBarTrailing as lt, createSideBar as pt } from "./lib/Components/core/SideBar/SideBar.js";
46
48
  import { Skeleton as dt } from "./lib/Components/core/Skeleton/Skeleton.js";
@@ -49,7 +51,7 @@ import { Spot as Ct } from "./lib/Components/core/Spot/Spot.js";
49
51
  import { Stepper as St } from "./lib/Components/core/Stepper/Stepper.js";
50
52
  import { Subheader as gt, SubheaderCount as bt, SubheaderDescription as It, SubheaderInfo as st, SubheaderRow as Bt, SubheaderShowMore as Dt, SubheaderTitle as Mt } from "./lib/Components/core/Subheader/Subheader.js";
51
53
  import { Switch as vt } from "./lib/Components/core/Switch/Switch.js";
52
- import { Table as Rt, TableActionBar as At, TableActionBarLeading as Ht, TableActionBarTrailing as wt, TableBody as Pt, TableCell as yt, TableCellContent as Nt, TableCellContentDescription as kt, TableCellContentRow as Gt, TableCellContentTitle as zt, TableCellItem as Et, TableCol as Ft, TableColGroup as Ot, TableGroupHeaderRow as Vt, TableHeader as _t, TableHeaderCell as jt, TableHeaderRow as qt, TableInfoIcon as Jt, TableLoadingRow as Kt, TableRoot as Qt, TableRow as Ut, TableSortButton as Wt } from "./lib/Components/core/Table/Table.js";
54
+ import { Table as Rt, TableActionBar as At, TableActionBarLeading as Ht, TableActionBarTrailing as Pt, TableBody as wt, TableCell as yt, TableCellContent as Nt, TableCellContentDescription as kt, TableCellContentRow as Gt, TableCellContentTitle as Et, TableCellItem as Ft, TableCol as Ot, TableColGroup as zt, TableGroupHeaderRow as Vt, TableHeader as _t, TableHeaderCell as jt, TableHeaderRow as qt, TableInfoIcon as Jt, TableLoadingRow as Kt, TableRoot as Qt, TableRow as Ut, TableSortButton as Wt } from "./lib/Components/core/Table/Table.js";
53
55
  import { Tag as Yt } from "./lib/Components/core/Tag/Tag.js";
54
56
  import { TextInput as $t } from "./lib/Components/core/TextInput/TextInput.js";
55
57
  import { Tile as or, TileContent as tr, TileDescription as rr, TileSecondaryAction as ar, TileTitle as nr, TileTrailingContent as ir } from "./lib/Components/core/Tile/Tile.js";
@@ -77,12 +79,12 @@ export {
77
79
  R as CardFooterActions,
78
80
  A as CardHeader,
79
81
  H as CardLeading,
80
- w as CardTrailing,
82
+ P as CardTrailing,
81
83
  k as Checkbox,
82
- z as ContentBanner,
83
- E as ContentBannerContent,
84
- F as ContentBannerDescription,
85
- O as ContentBannerTitle,
84
+ E as ContentBanner,
85
+ F as ContentBannerContent,
86
+ O as ContentBannerDescription,
87
+ z as ContentBannerTitle,
86
88
  _ as DataTable,
87
89
  j as DataTableGlobalSearchInput,
88
90
  q as DataTableRoot,
@@ -107,14 +109,14 @@ export {
107
109
  Re as IconButton,
108
110
  He as InteractiveIcon,
109
111
  t as Languages,
110
- Pe as Link,
112
+ we as Link,
111
113
  Ne as ListItem,
112
114
  ke as ListItemContent,
113
115
  Ge as ListItemContentRow,
114
- ze as ListItemDescription,
115
- Ee as ListItemLeading,
116
- Fe as ListItemTitle,
117
- Oe as ListItemTrailing,
116
+ Ee as ListItemDescription,
117
+ Fe as ListItemLeading,
118
+ Oe as ListItemTitle,
119
+ ze as ListItemTrailing,
118
120
  _e as MediaBanner,
119
121
  je as MediaBannerDescription,
120
122
  qe as MediaBannerTitle,
@@ -144,15 +146,15 @@ export {
144
146
  Bo as NavBarTitle,
145
147
  Do as NavBarTrailing,
146
148
  Ho as PageIndicator,
147
- Po as Pagination,
149
+ wo as Pagination,
148
150
  Lo as Popover,
149
151
  vo as PopoverContent,
150
152
  ho as PopoverTrigger,
151
153
  No as SearchInput,
152
154
  Go as SectionHeader,
153
- zo as SectionHeaderLeading,
154
- Eo as SectionHeaderTitle,
155
- Oo as SegmentedControl,
155
+ Eo as SectionHeaderLeading,
156
+ Fo as SectionHeaderTitle,
157
+ zo as SegmentedControl,
156
158
  Vo as SegmentedControlButton,
157
159
  qo as Select,
158
160
  Jo as SelectContent,
@@ -185,16 +187,16 @@ export {
185
187
  Rt as Table,
186
188
  At as TableActionBar,
187
189
  Ht as TableActionBarLeading,
188
- wt as TableActionBarTrailing,
189
- Pt as TableBody,
190
+ Pt as TableActionBarTrailing,
191
+ wt as TableBody,
190
192
  yt as TableCell,
191
193
  Nt as TableCellContent,
192
194
  kt as TableCellContentDescription,
193
195
  Gt as TableCellContentRow,
194
- zt as TableCellContentTitle,
195
- Et as TableCellItem,
196
- Ft as TableCol,
197
- Ot as TableColGroup,
196
+ Et as TableCellContentTitle,
197
+ Ft as TableCellItem,
198
+ Ot as TableCol,
199
+ zt as TableColGroup,
198
200
  Vt as TableGroupHeaderRow,
199
201
  _t as TableHeader,
200
202
  jt as TableHeaderCell,
@@ -225,12 +227,10 @@ export {
225
227
  ot as createSelect,
226
228
  pt as createSideBar,
227
229
  Se as dotIconSizeMap,
230
+ ge as getDotIconProps,
228
231
  Be as getDotIndicatorProps,
229
- ue as mediaImageDotIconSizeMap,
230
- Le as mediaImageDotSizeMap,
232
+ ve as getDotSymbolProps,
231
233
  C as resolveAvatarColor,
232
- ge as spotDotIconSizeMap,
233
- ve as spotDotSizeMap,
234
234
  a as useControllableState,
235
235
  K as useLumenDataTable,
236
236
  gr as useTheme
@@ -1,11 +1,11 @@
1
1
  import { textFormatter as m } from "../../../../../libs/utils-shared/dist/index.js";
2
- import { useCallback as i, useState as g, useRef as d, useEffect as f } from "react";
2
+ import { useCallback as d, useState as g, useRef as i, useEffect as f } from "react";
3
3
  const I = ({
4
4
  value: r,
5
5
  onChange: o,
6
6
  formatOptions: t
7
7
  }) => {
8
- const a = i(
8
+ const a = d(
9
9
  (e) => m(String(e), t),
10
10
  // eslint-disable-next-line react-hooks/exhaustive-deps
11
11
  [
@@ -15,13 +15,13 @@ const I = ({
15
15
  t.maxDecimalLength,
16
16
  t.decimalSeparator
17
17
  ]
18
- ), [c, s] = g(() => a(r)), [h, l] = g(!1), u = d(c);
18
+ ), [s, c] = g(() => a(r)), [h, l] = g(!1), u = i(s);
19
19
  return f(() => {
20
20
  const e = a(r);
21
- s(e), u.current = e;
22
- }, [r, a]), { inputValue: c, isChanging: h, setIsChanging: l, handleChange: (e) => {
21
+ c(e), u.current = e;
22
+ }, [r, a]), { inputValue: s, isChanging: h, setIsChanging: l, handleChange: (e) => {
23
23
  const n = a(e.target.value);
24
- s(n), o({ ...e, target: { ...e.target, value: n } }), n !== u.current && l(!0), u.current = n;
24
+ c(n), o({ ...e, target: { ...e.target, value: n } }), n !== u.current && l(!0), u.current = n;
25
25
  } };
26
26
  };
27
27
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Avatar/Avatar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAmE3C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,GAAI,mGAWpB,WAAW,4CAyDb,CAAC"}
1
+ {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Avatar/Avatar.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiE3C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,GAAI,mGAWpB,WAAW,4CAyDb,CAAC"}
@@ -1,10 +1,11 @@
1
- import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
- import { cn as c } from "../../../../libs/utils-shared/dist/index.js";
1
+ import { jsxs as h, jsx as t } from "react/jsx-runtime";
2
+ import { cn as p } from "../../../../libs/utils-shared/dist/index.js";
3
3
  import { cva as m } from "class-variance-authority";
4
4
  import { useState as z, useEffect as y } from "react";
5
- import { useCommonTranslation as N } from "../../../../i18n/useCommonTranslation.js";
6
- import { User as j } from "../../symbols/icons/User.js";
7
- const u = {
5
+ import { getAvatarFallbackTextColor as j } from "./resolveAvatarColor.js";
6
+ import { useCommonTranslation as A } from "../../../../i18n/useCommonTranslation.js";
7
+ import { User as C } from "../../symbols/icons/User.js";
8
+ const c = {
8
9
  root: m(
9
10
  "relative inline-flex items-center justify-center rounded-full bg-base-transparent-hover align-middle transition-colors",
10
11
  {
@@ -35,65 +36,60 @@ const u = {
35
36
  }
36
37
  }
37
38
  })
38
- }, C = {
39
+ }, N = {
39
40
  xs: 12,
40
41
  sm: 16,
41
42
  md: 24,
42
43
  lg: 32,
43
44
  xl: 40,
44
45
  "2xl": 56
45
- }, A = ({
46
- size: s,
47
- fallbackText: o,
46
+ }, E = ({
47
+ size: o,
48
+ fallbackText: r,
48
49
  fallbackColor: e
49
50
  }) => {
50
- const a = e ? "text-black" : "text-base";
51
- return o ? /* @__PURE__ */ t("span", { className: c(u.text({ size: s }), a), children: o }) : /* @__PURE__ */ t(
52
- j,
53
- {
54
- className: a,
55
- size: C[s],
56
- "aria-hidden": "true"
57
- }
58
- );
59
- }, U = ({
60
- ref: s,
61
- className: o,
51
+ const s = {
52
+ color: j(e)
53
+ };
54
+ return r ? /* @__PURE__ */ t("span", { className: c.text({ size: o }), style: s, children: r }) : /* @__PURE__ */ t(C, { style: s, size: N[o], "aria-hidden": "true" });
55
+ }, q = ({
56
+ ref: o,
57
+ className: r,
62
58
  src: e,
63
- alt: a,
59
+ alt: s,
64
60
  size: n = "md",
65
- imgLoading: b,
66
- fallbackText: x,
67
- fallbackColor: r,
61
+ imgLoading: u,
62
+ fallbackText: b,
63
+ fallbackColor: a,
68
64
  appearance: i,
69
65
  ...v
70
66
  }) => {
71
- const { t: f } = N(), [h, l] = z(!1), d = !e || h, g = a || f("components.avatar.defaultAriaLabel");
67
+ const { t: f } = A(), [x, l] = z(!1), d = !e || x, g = s || f("components.avatar.defaultAriaLabel");
72
68
  return y(() => {
73
69
  l(!1);
74
- }, [e]), /* @__PURE__ */ p(
70
+ }, [e]), /* @__PURE__ */ h(
75
71
  "div",
76
72
  {
77
- ref: s,
78
- className: c(u.root({ size: n }), o),
79
- style: d && r ? { backgroundColor: r } : void 0,
73
+ ref: o,
74
+ className: p(c.root({ size: n }), r),
75
+ style: d && a ? { backgroundColor: a } : void 0,
80
76
  role: "img",
81
77
  "aria-label": g,
82
78
  ...v,
83
79
  children: [
84
80
  d ? /* @__PURE__ */ t(
85
- A,
81
+ E,
86
82
  {
87
83
  size: n,
88
- fallbackText: x,
89
- fallbackColor: r
84
+ fallbackText: b,
85
+ fallbackColor: a
90
86
  }
91
87
  ) : /* @__PURE__ */ t(
92
88
  "img",
93
89
  {
94
90
  src: e,
95
91
  alt: "",
96
- loading: b,
92
+ loading: u,
97
93
  onError: () => l(!0),
98
94
  className: "size-full overflow-hidden rounded-full object-cover",
99
95
  "aria-hidden": "true"
@@ -114,5 +110,5 @@ const u = {
114
110
  );
115
111
  };
116
112
  export {
117
- U as Avatar
113
+ q as Avatar
118
114
  };
@@ -6,4 +6,13 @@ import { CSSVarRef } from '@ledgerhq/lumen-design-core';
6
6
  * Pass the result directly to `<Avatar fallbackColor={resolveAvatarColor(id)} />`.
7
7
  */
8
8
  export declare function resolveAvatarColor(identifier: string): CSSVarRef;
9
+ /**
10
+ * Resolves the fallback text/icon color matching a `fallbackColor` produced
11
+ * by {@link resolveAvatarColor}. Falls back to `--text-black` when
12
+ * `fallbackColor` is a custom color that isn't one of the known avatar color
13
+ * tokens, and to `--text-base` when `fallbackColor` is unset.
14
+ *
15
+ * @internal
16
+ */
17
+ export declare function getAvatarFallbackTextColor(fallbackColor?: string): CSSVarRef;
9
18
  //# sourceMappingURL=resolveAvatarColor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveAvatarColor.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Avatar/resolveAvatarColor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAiBrE;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAEhE"}
1
+ {"version":3,"file":"resolveAvatarColor.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/Avatar/resolveAvatarColor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAuCrE;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAEhE;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAS5E"}
@@ -1,6 +1,6 @@
1
1
  import { resolveAvatarColorKey as o } from "../../../../libs/utils-shared/dist/index.js";
2
2
  import { cssVar as r } from "../../../../libs/design-core/dist/lib/cssVar/cssVar.js";
3
- const a = {
3
+ const t = {
4
4
  orange: r("var(--background-decorative-orange)"),
5
5
  green: r("var(--background-decorative-green)"),
6
6
  blue: r("var(--background-decorative-blue)"),
@@ -9,10 +9,28 @@ const a = {
9
9
  yellow: r("var(--background-decorative-yellow)"),
10
10
  turquoise: r("var(--background-decorative-turquoise)"),
11
11
  pink: r("var(--background-decorative-pink)")
12
- };
13
- function t(e) {
14
- return a[o(e)];
12
+ }, a = {
13
+ orange: r("var(--text-decorative-strong-orange)"),
14
+ green: r("var(--text-decorative-strong-green)"),
15
+ blue: r("var(--text-decorative-strong-blue)"),
16
+ purple: r("var(--text-decorative-strong-purple)"),
17
+ red: r("var(--text-decorative-strong-red)"),
18
+ yellow: r("var(--text-decorative-strong-yellow)"),
19
+ turquoise: r("var(--text-decorative-strong-turquoise)"),
20
+ pink: r("var(--text-decorative-strong-pink)")
21
+ }, n = Object.fromEntries(
22
+ Object.keys(t).map((e) => [
23
+ t[e],
24
+ a[e]
25
+ ])
26
+ ), v = r("var(--text-base)"), c = r("var(--text-black)");
27
+ function d(e) {
28
+ return t[o(e)];
29
+ }
30
+ function g(e) {
31
+ return e ? n[e] ?? c : v;
15
32
  }
16
33
  export {
17
- t as resolveAvatarColor
34
+ g as getAvatarFallbackTextColor,
35
+ d as resolveAvatarColor
18
36
  };
@@ -1,10 +1,10 @@
1
1
  import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
- import { cn as c } from "../../../../libs/utils-shared/dist/index.js";
2
+ import { cn as t } from "../../../../libs/utils-shared/dist/index.js";
3
3
  import { cva as b } from "class-variance-authority";
4
4
  import { useCommonTranslation as g } from "../../../../i18n/useCommonTranslation.js";
5
- import { IconButton as N } from "../IconButton/IconButton.js";
6
- import { Close as h } from "../../symbols/icons/Close.js";
7
- import { DeleteCircleFill as u } from "../../symbols/icons/DeleteCircleFill.js";
5
+ import { IconButton as u } from "../IconButton/IconButton.js";
6
+ import { Close as N } from "../../symbols/icons/Close.js";
7
+ import { DeleteCircleFill as h } from "../../symbols/icons/DeleteCircleFill.js";
8
8
  import { WarningFill as v } from "../../symbols/icons/WarningFill.js";
9
9
  import { CheckmarkCircleFill as w } from "../../symbols/icons/CheckmarkCircleFill.js";
10
10
  import { InformationFill as C } from "../../symbols/icons/InformationFill.js";
@@ -12,57 +12,57 @@ const k = {
12
12
  info: /* @__PURE__ */ r(C, { className: "text-base" }),
13
13
  success: /* @__PURE__ */ r(w, { className: "text-success" }),
14
14
  warning: /* @__PURE__ */ r(v, { className: "text-warning" }),
15
- error: /* @__PURE__ */ r(u, { className: "text-error" })
15
+ error: /* @__PURE__ */ r(h, { className: "text-error" })
16
16
  }, F = {
17
17
  root: b("flex w-full items-start gap-8 rounded-md p-12 text-base", {
18
18
  variants: {
19
19
  appearance: {
20
20
  info: "bg-surface",
21
- success: "bg-success",
22
- warning: "bg-warning",
23
- error: "bg-error"
21
+ success: "bg-success-transparent",
22
+ warning: "bg-warning-transparent",
23
+ error: "bg-error-transparent"
24
24
  }
25
25
  }
26
26
  })
27
27
  }, W = ({
28
- ref: m,
28
+ ref: c,
29
29
  appearance: s = "info",
30
30
  title: a,
31
- description: o,
32
- primaryAction: l,
33
- secondaryAction: n,
34
- className: t,
31
+ description: n,
32
+ primaryAction: o,
33
+ secondaryAction: l,
34
+ className: m,
35
35
  onClose: i,
36
- closeAriaLabel: f,
37
- ...p
36
+ closeAriaLabel: p,
37
+ ...f
38
38
  }) => {
39
39
  const { t: x } = g(), d = k[s];
40
40
  return /* @__PURE__ */ e(
41
41
  "div",
42
42
  {
43
- ref: m,
44
- className: c(F.root({ appearance: s }), t),
45
- ...p,
43
+ ref: c,
44
+ className: t(F.root({ appearance: s }), m),
45
+ ...f,
46
46
  children: [
47
47
  /* @__PURE__ */ r("div", { className: "flex shrink-0 items-start py-4", children: d }),
48
48
  /* @__PURE__ */ e("div", { className: "mr-8 flex flex-1 flex-col gap-8 py-4", children: [
49
49
  /* @__PURE__ */ e("div", { className: "flex flex-col gap-4", children: [
50
50
  a && /* @__PURE__ */ r("h3", { className: "line-clamp-2 body-1-semi-bold", children: a }),
51
- o && /* @__PURE__ */ r("div", { className: c("line-clamp-5 body-2", !a && "mt-2"), children: o })
51
+ n && /* @__PURE__ */ r("div", { className: t("line-clamp-5 body-2", !a && "mt-2"), children: n })
52
52
  ] }),
53
- (l || n) && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-4", children: [
54
- l,
55
- n
53
+ (o || l) && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-4", children: [
54
+ o,
55
+ l
56
56
  ] })
57
57
  ] }),
58
58
  i && /* @__PURE__ */ r(
59
- N,
59
+ u,
60
60
  {
61
61
  appearance: "transparent",
62
62
  size: "xs",
63
- icon: h,
63
+ icon: N,
64
64
  onClick: () => i(),
65
- "aria-label": f || x("components.banner.closeAriaLabel")
65
+ "aria-label": p || x("components.banner.closeAriaLabel")
66
66
  }
67
67
  )
68
68
  ]
@@ -17,8 +17,8 @@ const l = e("", {
17
17
  ref: t,
18
18
  className: m,
19
19
  loading: s,
20
- disabled: a,
21
- children: r,
20
+ disabled: r,
21
+ children: a,
22
22
  size: o,
23
23
  icon: i,
24
24
  ...p
@@ -27,12 +27,12 @@ const l = e("", {
27
27
  {
28
28
  ref: t,
29
29
  size: o,
30
- disabled: a,
30
+ disabled: r,
31
31
  icon: i,
32
32
  loading: s,
33
33
  className: d(l({ size: o }), "gap-8", m),
34
34
  ...p,
35
- children: r
35
+ children: a
36
36
  }
37
37
  );
38
38
  export {
@@ -71,31 +71,31 @@ const k = ({
71
71
  disabled: !1
72
72
  }
73
73
  }
74
- ), P = ({
74
+ ), D = ({
75
75
  ref: r,
76
76
  className: t,
77
77
  type: a = "interactive",
78
78
  expanded: e,
79
79
  outlined: s = !1,
80
80
  disabled: i = !1,
81
- onClick: d,
82
- children: l,
81
+ onClick: l,
82
+ children: d,
83
83
  ...p
84
84
  }) => {
85
85
  const u = h(
86
86
  () => k({
87
87
  type: a,
88
88
  expanded: e,
89
- onClick: d,
89
+ onClick: l,
90
90
  disabled: i
91
91
  }),
92
- [a, e, d, i]
92
+ [a, e, l, i]
93
93
  );
94
94
  return /* @__PURE__ */ n(R, { value: u, children: /* @__PURE__ */ n(g, { value: { disabled: i }, children: /* @__PURE__ */ f(
95
95
  "div",
96
96
  {
97
97
  ref: r,
98
- ...u.cardClickable && C({ onClick: d, disabled: i }),
98
+ ...u.cardClickable && C({ onClick: l, disabled: i }),
99
99
  className: o(
100
100
  E({
101
101
  interactive: u.cardClickable,
@@ -105,7 +105,7 @@ const k = ({
105
105
  ),
106
106
  ...p,
107
107
  children: [
108
- l,
108
+ d,
109
109
  s && /* @__PURE__ */ n(
110
110
  "span",
111
111
  {
@@ -123,7 +123,7 @@ const k = ({
123
123
  className: a,
124
124
  ...e
125
125
  }) => {
126
- const { disabled: s, headerClickable: i, footerExpanded: d, onHeaderClick: l } = c({
126
+ const { disabled: s, headerClickable: i, footerExpanded: l, onHeaderClick: d } = c({
127
127
  consumerName: "CardHeader",
128
128
  contextRequired: !1
129
129
  });
@@ -131,8 +131,8 @@ const k = ({
131
131
  "div",
132
132
  {
133
133
  ref: r,
134
- "aria-expanded": l ? d : void 0,
135
- ...C({ onClick: l, disabled: s }),
134
+ "aria-expanded": d ? l : void 0,
135
+ ...C({ onClick: d, disabled: s }),
136
136
  className: o(
137
137
  "flex items-center gap-12 p-12",
138
138
  i && "cursor-pointer -outline-offset-6 transition-colors hover:bg-surface-hover focus-visible:outline-2 focus-visible:outline-focus active:bg-surface-pressed",
@@ -141,9 +141,9 @@ const k = ({
141
141
  ...e,
142
142
  children: [
143
143
  t,
144
- l && /* @__PURE__ */ f(b, { children: [
145
- d && /* @__PURE__ */ n(N, { className: "text-muted", size: 20 }),
146
- !d && /* @__PURE__ */ n(w, { className: "text-muted", size: 20 })
144
+ d && /* @__PURE__ */ f(b, { children: [
145
+ l && /* @__PURE__ */ n(N, { className: "text-muted", size: 20 }),
146
+ !l && /* @__PURE__ */ n(w, { className: "text-muted", size: 20 })
147
147
  ] })
148
148
  ]
149
149
  }
@@ -296,7 +296,7 @@ const k = ({
296
296
  appearance: e = "plain",
297
297
  ...s
298
298
  }) => {
299
- const { disabled: i, footerExpanded: d } = c({
299
+ const { disabled: i, footerExpanded: l } = c({
300
300
  consumerName: "CardFooter",
301
301
  contextRequired: !1
302
302
  });
@@ -305,7 +305,7 @@ const k = ({
305
305
  {
306
306
  className: o(
307
307
  H({ appearance: e }),
308
- d ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
308
+ l ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
309
309
  ),
310
310
  children: /* @__PURE__ */ n("div", { className: "overflow-hidden", children: /* @__PURE__ */ n(
311
311
  "div",
@@ -337,7 +337,7 @@ const k = ({
337
337
  }
338
338
  );
339
339
  export {
340
- P as Card,
340
+ D as Card,
341
341
  B as CardContent,
342
342
  M as CardContentDescription,
343
343
  I as CardContentRow,
@@ -18,31 +18,31 @@ const h = f(
18
18
  ), w = ({
19
19
  ref: i,
20
20
  className: o,
21
- appearance: l,
22
- icon: d,
21
+ appearance: d,
22
+ icon: l,
23
23
  title: n,
24
24
  description: t,
25
25
  hideChevron: r,
26
- disabled: b,
27
- ...u
26
+ disabled: u,
27
+ ...b
28
28
  }) => {
29
29
  const c = m({
30
30
  consumerName: "CardButton",
31
- mergeWith: { disabled: b }
32
- }), s = d;
31
+ mergeWith: { disabled: u }
32
+ }), s = l;
33
33
  return /* @__PURE__ */ a(
34
34
  "button",
35
35
  {
36
36
  ref: i,
37
37
  className: p(
38
38
  h({
39
- appearance: l
39
+ appearance: d
40
40
  }),
41
41
  o
42
42
  ),
43
43
  disabled: c,
44
44
  type: "button",
45
- ...u,
45
+ ...b,
46
46
  children: [
47
47
  s && /* @__PURE__ */ e(s, { size: 24 }),
48
48
  /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-1 flex-col gap-4 text-left", children: [
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithRef, ComponentType } from 'react';
2
- import { IconSize } from '../../symbols/Icon/types';
2
+ import { IconSize } from '../../symbols/Icon';
3
3
  export type CardButtonProps = {
4
4
  /**
5
5
  * The visual style of the card button.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/CardButton/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9D;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/core/CardButton/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9D;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC"}