@ledgerhq/lumen-ui-react 0.1.16 → 0.1.17

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 (97) hide show
  1. package/ai-rules/RULES.md +1 -1
  2. package/dist/index.js +148 -142
  3. package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  4. package/dist/lib/Components/BaseInput/BaseInput.js +70 -77
  5. package/dist/lib/Components/MediaImage/MediaImage.d.ts +19 -0
  6. package/dist/lib/Components/MediaImage/MediaImage.d.ts.map +1 -0
  7. package/dist/lib/Components/MediaImage/MediaImage.js +75 -0
  8. package/dist/lib/Components/MediaImage/index.d.ts +3 -0
  9. package/dist/lib/Components/MediaImage/index.d.ts.map +1 -0
  10. package/dist/lib/Components/MediaImage/types.d.ts +38 -0
  11. package/dist/lib/Components/MediaImage/types.d.ts.map +1 -0
  12. package/dist/lib/Components/SearchInput/SearchInput.d.ts +1 -1
  13. package/dist/lib/Components/SearchInput/SearchInput.d.ts.map +1 -1
  14. package/dist/lib/Components/SearchInput/SearchInput.js +24 -20
  15. package/dist/lib/Components/SearchInput/types.d.ts +1 -1
  16. package/dist/lib/Components/SearchInput/types.d.ts.map +1 -1
  17. package/dist/lib/Components/Select/Select.d.ts +27 -12
  18. package/dist/lib/Components/Select/Select.d.ts.map +1 -1
  19. package/dist/lib/Components/Select/Select.js +356 -202
  20. package/dist/lib/Components/Select/SelectContext.d.ts +3 -1
  21. package/dist/lib/Components/Select/SelectContext.d.ts.map +1 -1
  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 +171 -140
  25. package/dist/lib/Components/Select/types.d.ts.map +1 -1
  26. package/dist/lib/Components/Select/useSelectItems/index.d.ts +2 -0
  27. package/dist/lib/Components/Select/useSelectItems/index.d.ts.map +1 -0
  28. package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts +30 -0
  29. package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts.map +1 -0
  30. package/dist/lib/Components/Select/useSelectItems/useSelectItems.js +42 -0
  31. package/dist/lib/Components/Select/utils/groupItems.d.ts +13 -0
  32. package/dist/lib/Components/Select/utils/groupItems.d.ts.map +1 -0
  33. package/dist/lib/Components/Select/utils/groupItems.js +16 -0
  34. package/dist/lib/Components/Select/utils/index.d.ts +2 -0
  35. package/dist/lib/Components/Select/utils/index.d.ts.map +1 -0
  36. package/dist/lib/Components/index.d.ts +1 -0
  37. package/dist/lib/Components/index.d.ts.map +1 -1
  38. package/dist/libs/utils-shared/dist/index.js +151 -124
  39. package/dist/node_modules/@base-ui/react/esm/combobox/chips/ComboboxChipsContext.js +10 -0
  40. package/dist/node_modules/@base-ui/react/esm/combobox/collection/ComboboxCollection.js +17 -0
  41. package/dist/node_modules/@base-ui/react/esm/combobox/collection/GroupCollectionContext.js +23 -0
  42. package/dist/node_modules/@base-ui/react/esm/combobox/empty/ComboboxEmpty.js +26 -0
  43. package/dist/node_modules/@base-ui/react/esm/combobox/group/ComboboxGroup.js +34 -0
  44. package/dist/node_modules/@base-ui/react/esm/combobox/group/ComboboxGroupContext.js +14 -0
  45. package/dist/node_modules/@base-ui/react/esm/combobox/group-label/ComboboxGroupLabel.js +27 -0
  46. package/dist/node_modules/@base-ui/react/esm/combobox/input/ComboboxInput.js +221 -0
  47. package/dist/node_modules/@base-ui/react/esm/combobox/item/ComboboxItem.js +113 -0
  48. package/dist/node_modules/@base-ui/react/esm/combobox/item/ComboboxItemContext.js +14 -0
  49. package/dist/node_modules/@base-ui/react/esm/combobox/item-indicator/ComboboxItemIndicator.js +52 -0
  50. package/dist/node_modules/@base-ui/react/esm/combobox/list/ComboboxList.js +65 -0
  51. package/dist/node_modules/@base-ui/react/esm/combobox/popup/ComboboxPopup.js +76 -0
  52. package/dist/node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortal.js +24 -0
  53. package/dist/node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortalContext.js +14 -0
  54. package/dist/node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositioner.js +102 -0
  55. package/dist/node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositionerContext.js +14 -0
  56. package/dist/node_modules/@base-ui/react/esm/combobox/root/AriaCombobox.js +596 -0
  57. package/dist/node_modules/@base-ui/react/esm/combobox/root/ComboboxRoot.js +23 -0
  58. package/dist/node_modules/@base-ui/react/esm/combobox/root/ComboboxRootContext.js +41 -0
  59. package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/constants.js +8 -0
  60. package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/index.js +23 -0
  61. package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/useFilter.js +43 -0
  62. package/dist/node_modules/@base-ui/react/esm/combobox/row/ComboboxRowContext.js +10 -0
  63. package/dist/node_modules/@base-ui/react/esm/combobox/store.js +74 -0
  64. package/dist/node_modules/@base-ui/react/esm/combobox/trigger/ComboboxTrigger.js +135 -0
  65. package/dist/node_modules/@base-ui/react/esm/combobox/utils/ComboboxInternalDismissButton.js +32 -0
  66. package/dist/node_modules/@base-ui/react/esm/combobox/utils/stateAttributesMapping.js +15 -0
  67. package/dist/node_modules/@base-ui/react/esm/combobox/value/ComboboxValue.js +19 -0
  68. package/dist/node_modules/@base-ui/react/esm/composite/list/CompositeList.js +81 -0
  69. package/dist/node_modules/@base-ui/react/esm/composite/list/CompositeListContext.js +23 -0
  70. package/dist/node_modules/@base-ui/react/esm/composite/list/useCompositeListItem.js +55 -0
  71. package/dist/node_modules/@base-ui/react/esm/field/control/FieldControlDataAttributes.js +6 -0
  72. package/dist/node_modules/@base-ui/react/esm/field/root/FieldRootContext.js +53 -0
  73. package/dist/node_modules/@base-ui/react/esm/field/useField.js +51 -0
  74. package/dist/node_modules/@base-ui/react/esm/field/utils/constants.js +37 -0
  75. package/dist/node_modules/@base-ui/react/esm/field/utils/getCombinedFieldValidityData.js +12 -0
  76. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useListNavigation.js +287 -0
  77. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useTypeahead.js +71 -0
  78. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/composite.js +218 -4
  79. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/constants.js +7 -3
  80. package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js +3 -3
  81. package/dist/node_modules/@base-ui/react/esm/form/FormContext.js +23 -0
  82. package/dist/node_modules/@base-ui/react/esm/labelable-provider/LabelableContext.js +19 -0
  83. package/dist/node_modules/@base-ui/react/esm/labelable-provider/useLabelableId.js +44 -0
  84. package/dist/node_modules/@base-ui/react/esm/utils/constants.js +11 -8
  85. package/dist/node_modules/@base-ui/react/esm/utils/createBaseUIEventDetails.js +22 -13
  86. package/dist/node_modules/@base-ui/react/esm/utils/getPseudoElementBounds.js +18 -0
  87. package/dist/node_modules/@base-ui/react/esm/utils/itemEquality.js +20 -0
  88. package/dist/node_modules/@base-ui/react/esm/utils/reason-parts.js +13 -6
  89. package/dist/node_modules/@base-ui/react/esm/utils/resolveAriaLabelledBy.js +6 -0
  90. package/dist/node_modules/@base-ui/react/esm/utils/resolveValueLabel.js +73 -0
  91. package/dist/node_modules/@base-ui/react/esm/utils/serializeValue.js +14 -0
  92. package/dist/node_modules/@base-ui/utils/esm/detectBrowser.js +8 -7
  93. package/dist/node_modules/@base-ui/utils/esm/empty.js +3 -2
  94. package/dist/node_modules/@base-ui/utils/esm/useControlled.js +31 -0
  95. package/dist/node_modules/@base-ui/utils/esm/visuallyHidden.js +5 -1
  96. package/dist/package.json +1 -2
  97. package/package.json +1 -2
package/ai-rules/RULES.md CHANGED
@@ -33,7 +33,7 @@ Lumen typography classes set `font-family: Inter` via design tokens. The consume
33
33
  - Switch requires `@radix-ui/react-switch`
34
34
  - Dialog requires `@radix-ui/react-dialog`
35
35
  - Tooltip requires `@radix-ui/react-tooltip`
36
- - Select requires `@radix-ui/react-select`
36
+ - Select requires `@base-ui/react/combobox`
37
37
 
38
38
  ---
39
39
 
package/dist/index.js CHANGED
@@ -1,62 +1,63 @@
1
- import { Languages as r } from "./i18n/languages.js";
1
+ import { Languages as t } from "./i18n/languages.js";
2
2
  import { AddressInput as a } from "./lib/Components/AddressInput/AddressInput.js";
3
3
  import { AmountInput as i } from "./lib/Components/AmountInput/AmountInput.js";
4
4
  import { AmountDisplay as p } from "./lib/Components/AmountDisplay/AmountDisplay.js";
5
- import { Avatar as T } from "./lib/Components/Avatar/Avatar.js";
5
+ import { Avatar as d } from "./lib/Components/Avatar/Avatar.js";
6
6
  import { Banner as x } from "./lib/Components/Banner/Banner.js";
7
- import { BaseInput as f } from "./lib/Components/BaseInput/BaseInput.js";
8
- import { Button as g } from "./lib/Components/Button/Button.js";
9
- import { BaseButton as B } from "./lib/Components/Button/BaseButton.js";
10
- import { Card as c, CardContent as I, CardContentDescription as s, CardContentRow as M, CardContentTitle as D, CardFooter as L, CardFooterActions as h, CardHeader as v, CardLeading as R, CardTrailing as w } from "./lib/Components/Card/Card.js";
7
+ import { BaseInput as u } from "./lib/Components/BaseInput/BaseInput.js";
8
+ import { Button as S } from "./lib/Components/Button/Button.js";
9
+ import { BaseButton as c } from "./lib/Components/Button/BaseButton.js";
10
+ import { Card as b, CardContent as I, CardContentDescription as s, CardContentRow as M, CardContentTitle as D, CardFooter as L, CardFooterActions as h, CardHeader as v, CardLeading as R, CardTrailing as w } from "./lib/Components/Card/Card.js";
11
11
  import { CardButton as H } from "./lib/Components/CardButton/CardButton.js";
12
- import { ContentBanner as k, ContentBannerContent as y, ContentBannerDescription as G, ContentBannerTitle as N } from "./lib/Components/ContentBanner/ContentBanner.js";
13
- import { Checkbox as E } from "./lib/Components/Checkbox/Checkbox.js";
14
- import { DataTable as _, DataTableGlobalSearchInput as j, DataTableRoot as q } from "./lib/Components/DataTable/DataTable.js";
12
+ import { ContentBanner as y, ContentBannerContent as k, ContentBannerDescription as N, ContentBannerTitle as G } from "./lib/Components/ContentBanner/ContentBanner.js";
13
+ import { Checkbox as F } from "./lib/Components/Checkbox/Checkbox.js";
14
+ import { DataTable as z, DataTableGlobalSearchInput as _, DataTableRoot as j } from "./lib/Components/DataTable/DataTable.js";
15
15
  import { useLumenDataTable as J } from "./lib/Components/DataTable/useLumenDataTable/useLumenDataTable.js";
16
16
  import { DialogClose as Q } from "./lib/Components/Dialog/DialogClose/DialogClose.js";
17
17
  import { Dialog as V, DialogBody as W, DialogBodyStickyContent as X, DialogContent as Y, DialogFooter as Z, DialogTrigger as $ } from "./lib/Components/Dialog/Dialog.js";
18
18
  import { DialogHeader as oe } from "./lib/Components/Dialog/DialogHeader/DialogHeader.js";
19
- import { Divider as te } from "./lib/Components/Divider/Divider.js";
19
+ import { Divider as re } from "./lib/Components/Divider/Divider.js";
20
20
  import { IconButton as ne } from "./lib/Components/IconButton/IconButton.js";
21
21
  import { InteractiveIcon as le } from "./lib/Components/InteractiveIcon/InteractiveIcon.js";
22
22
  import { Link as me } from "./lib/Components/Link/Link.js";
23
- import { ListItem as de, ListItemContent as xe, ListItemContentRow as ue, ListItemDescription as fe, ListItemLeading as Ce, ListItemTitle as ge, ListItemTrailing as Se } from "./lib/Components/ListItem/ListItem.js";
24
- import { MediaBanner as be, MediaBannerDescription as ce, MediaBannerTitle as Ie } from "./lib/Components/MediaBanner/MediaBanner.js";
23
+ import { ListItem as Te, ListItemContent as xe, ListItemContentRow as fe, ListItemDescription as ue, ListItemLeading as Ce, ListItemTitle as Se, ListItemTrailing as ge } from "./lib/Components/ListItem/ListItem.js";
24
+ import { MediaBanner as Be, MediaBannerDescription as be, MediaBannerTitle as Ie } from "./lib/Components/MediaBanner/MediaBanner.js";
25
25
  import { MediaCard as Me, MediaCardTitle as De } from "./lib/Components/MediaCard/MediaCard.js";
26
- import { Menu as he, MenuCheckboxItem as ve, MenuContent as Re, MenuGroup as we, MenuItem as Ae, MenuLabel as He, MenuPortal as Pe, MenuRadioGroup as ke, MenuRadioItem as ye, MenuSeparator as Ge, MenuSub as Ne, MenuSubContent as Fe, MenuSubTrigger as Ee, MenuTrigger as Oe } from "./lib/Components/Menu/Menu.js";
27
- import { NavBar as je, NavBarBackButton as qe, NavBarCoinCapsule as ze, NavBarTitle as Je, NavBarTrailing as Ke } from "./lib/Components/NavBar/NavBar.js";
28
- import { Popover as Ue, PopoverContent as Ve, PopoverTrigger as We, createPopoverHandle as Xe } from "./lib/Components/Popover/Popover.js";
29
- import { PageIndicator as Ze } from "./lib/Components/PageIndicator/PageIndicator.js";
30
- import { SearchInput as eo } from "./lib/Components/SearchInput/SearchInput.js";
31
- import { SegmentedControl as ro, SegmentedControlButton as to } from "./lib/Components/SegmentedControl/SegmentedControl.js";
32
- import { Select as no, SelectContent as io, SelectGroup as lo, SelectItem as po, SelectItemText as mo, SelectLabel as To, SelectSeparator as xo, SelectTrigger as uo, SelectTriggerButton as fo } from "./lib/Components/Select/Select.js";
33
- import { TriggerButton as go } from "./lib/Components/TriggerButton/TriggerButton.js";
34
- import { SideBar as Bo, SideBarCollapseToggle as bo, SideBarItem as co, SideBarLeading as Io, SideBarTrailing as so } from "./lib/Components/SideBar/SideBar.js";
35
- import { Skeleton as Do } from "./lib/Components/Skeleton/Skeleton.js";
36
- import { Spinner as ho } from "./lib/Components/Spinner/Spinner.js";
37
- import { Spot as Ro } from "./lib/Components/Spot/Spot.js";
38
- import { Stepper as Ao } from "./lib/Components/Stepper/Stepper.js";
39
- import { Subheader as Po, SubheaderCount as ko, SubheaderDescription as yo, SubheaderInfo as Go, SubheaderRow as No, SubheaderShowMore as Fo, SubheaderTitle as Eo } from "./lib/Components/Subheader/Subheader.js";
40
- import { Switch as _o } from "./lib/Components/Switch/Switch.js";
41
- import { Table as qo, TableActionBar as zo, TableActionBarLeading as Jo, TableActionBarTrailing as Ko, TableBody as Qo, TableCell as Uo, TableCellContent as Vo, TableGroupHeaderRow as Wo, TableHeader as Xo, TableHeaderCell as Yo, TableHeaderRow as Zo, TableInfoIcon as $o, TableLoadingRow as er, TableRoot as or, TableRow as rr, TableSortButton as tr } from "./lib/Components/Table/Table.js";
42
- import { Tag as nr } from "./lib/Components/Tag/Tag.js";
43
- import { TextInput as lr } from "./lib/Components/TextInput/TextInput.js";
44
- import { Tile as mr, TileContent as Tr, TileDescription as dr, TileSecondaryAction as xr, TileTitle as ur, TileTrailingContent as fr } from "./lib/Components/Tile/Tile.js";
45
- import { TileButton as gr } from "./lib/Components/TileButton/TileButton.js";
46
- import { Tooltip as Br, TooltipContent as br, TooltipProvider as cr, TooltipTrigger as Ir } from "./lib/Components/Tooltip/Tooltip.js";
47
- import { ThemeProvider as Mr } from "./lib/Components/ThemeProvider/ThemeProvider.js";
48
- import { COLOR_SCHEMES as Lr } from "./lib/Components/ThemeProvider/ThemeProvider.types.js";
26
+ import { MediaImage as he, mediaImageDotSizeMap as ve } from "./lib/Components/MediaImage/MediaImage.js";
27
+ import { Menu as we, MenuCheckboxItem as Ae, MenuContent as He, MenuGroup as Pe, MenuItem as ye, MenuLabel as ke, MenuPortal as Ne, MenuRadioGroup as Ge, MenuRadioItem as Ee, MenuSeparator as Fe, MenuSub as Oe, MenuSubContent as ze, MenuSubTrigger as _e, MenuTrigger as je } from "./lib/Components/Menu/Menu.js";
28
+ import { NavBar as Je, NavBarBackButton as Ke, NavBarCoinCapsule as Qe, NavBarTitle as Ue, NavBarTrailing as Ve } from "./lib/Components/NavBar/NavBar.js";
29
+ import { Popover as Xe, PopoverContent as Ye, PopoverTrigger as Ze, createPopoverHandle as $e } from "./lib/Components/Popover/Popover.js";
30
+ import { PageIndicator as oo } from "./lib/Components/PageIndicator/PageIndicator.js";
31
+ import { SearchInput as ro } from "./lib/Components/SearchInput/SearchInput.js";
32
+ import { SegmentedControl as no, SegmentedControlButton as io } from "./lib/Components/SegmentedControl/SegmentedControl.js";
33
+ import { Select as po, SelectContent as mo, SelectEmptyState as To, SelectItem as xo, SelectItemContent as fo, SelectItemDescription as uo, SelectItemText as Co, SelectList as So, SelectSearch as go, SelectSeparator as co, SelectTrigger as Bo, SelectTriggerButton as bo } from "./lib/Components/Select/Select.js";
34
+ import { TriggerButton as so } from "./lib/Components/TriggerButton/TriggerButton.js";
35
+ import { SideBar as Do, SideBarCollapseToggle as Lo, SideBarItem as ho, SideBarLeading as vo, SideBarTrailing as Ro } from "./lib/Components/SideBar/SideBar.js";
36
+ import { Skeleton as Ao } from "./lib/Components/Skeleton/Skeleton.js";
37
+ import { Spinner as Po } from "./lib/Components/Spinner/Spinner.js";
38
+ import { Spot as ko } from "./lib/Components/Spot/Spot.js";
39
+ import { Stepper as Go } from "./lib/Components/Stepper/Stepper.js";
40
+ import { Subheader as Fo, SubheaderCount as Oo, SubheaderDescription as zo, SubheaderInfo as _o, SubheaderRow as jo, SubheaderShowMore as qo, SubheaderTitle as Jo } from "./lib/Components/Subheader/Subheader.js";
41
+ import { Switch as Qo } from "./lib/Components/Switch/Switch.js";
42
+ import { Table as Vo, TableActionBar as Wo, TableActionBarLeading as Xo, TableActionBarTrailing as Yo, TableBody as Zo, TableCell as $o, TableCellContent as et, TableGroupHeaderRow as ot, TableHeader as tt, TableHeaderCell as rt, TableHeaderRow as at, TableInfoIcon as nt, TableLoadingRow as it, TableRoot as lt, TableRow as pt, TableSortButton as mt } from "./lib/Components/Table/Table.js";
43
+ import { Tag as Tt } from "./lib/Components/Tag/Tag.js";
44
+ import { TextInput as ft } from "./lib/Components/TextInput/TextInput.js";
45
+ import { Tile as Ct, TileContent as St, TileDescription as gt, TileSecondaryAction as ct, TileTitle as Bt, TileTrailingContent as bt } from "./lib/Components/Tile/Tile.js";
46
+ import { TileButton as st } from "./lib/Components/TileButton/TileButton.js";
47
+ import { Tooltip as Dt, TooltipContent as Lt, TooltipProvider as ht, TooltipTrigger as vt } from "./lib/Components/Tooltip/Tooltip.js";
48
+ import { ThemeProvider as wt } from "./lib/Components/ThemeProvider/ThemeProvider.js";
49
+ import { COLOR_SCHEMES as Ht } from "./lib/Components/ThemeProvider/ThemeProvider.types.js";
49
50
  export {
50
51
  a as AddressInput,
51
52
  p as AmountDisplay,
52
53
  i as AmountInput,
53
- T as Avatar,
54
+ d as Avatar,
54
55
  x as Banner,
55
- B as BaseButton,
56
- f as BaseInput,
57
- g as Button,
58
- Lr as COLOR_SCHEMES,
59
- c as Card,
56
+ c as BaseButton,
57
+ u as BaseInput,
58
+ S as Button,
59
+ Ht as COLOR_SCHEMES,
60
+ b as Card,
60
61
  H as CardButton,
61
62
  I as CardContent,
62
63
  s as CardContentDescription,
@@ -67,14 +68,14 @@ export {
67
68
  v as CardHeader,
68
69
  R as CardLeading,
69
70
  w as CardTrailing,
70
- E as Checkbox,
71
- k as ContentBanner,
72
- y as ContentBannerContent,
73
- G as ContentBannerDescription,
74
- N as ContentBannerTitle,
75
- _ as DataTable,
76
- j as DataTableGlobalSearchInput,
77
- q as DataTableRoot,
71
+ F as Checkbox,
72
+ y as ContentBanner,
73
+ k as ContentBannerContent,
74
+ N as ContentBannerDescription,
75
+ G as ContentBannerTitle,
76
+ z as DataTable,
77
+ _ as DataTableGlobalSearchInput,
78
+ j as DataTableRoot,
78
79
  V as Dialog,
79
80
  W as DialogBody,
80
81
  X as DialogBodyStickyContent,
@@ -83,106 +84,111 @@ export {
83
84
  Z as DialogFooter,
84
85
  oe as DialogHeader,
85
86
  $ as DialogTrigger,
86
- te as Divider,
87
+ re as Divider,
87
88
  ne as IconButton,
88
89
  le as InteractiveIcon,
89
- r as Languages,
90
+ t as Languages,
90
91
  me as Link,
91
- de as ListItem,
92
+ Te as ListItem,
92
93
  xe as ListItemContent,
93
- ue as ListItemContentRow,
94
- fe as ListItemDescription,
94
+ fe as ListItemContentRow,
95
+ ue as ListItemDescription,
95
96
  Ce as ListItemLeading,
96
- ge as ListItemTitle,
97
- Se as ListItemTrailing,
98
- be as MediaBanner,
99
- ce as MediaBannerDescription,
97
+ Se as ListItemTitle,
98
+ ge as ListItemTrailing,
99
+ Be as MediaBanner,
100
+ be as MediaBannerDescription,
100
101
  Ie as MediaBannerTitle,
101
102
  Me as MediaCard,
102
103
  De as MediaCardTitle,
103
- he as Menu,
104
- ve as MenuCheckboxItem,
105
- Re as MenuContent,
106
- we as MenuGroup,
107
- Ae as MenuItem,
108
- He as MenuLabel,
109
- Pe as MenuPortal,
110
- ke as MenuRadioGroup,
111
- ye as MenuRadioItem,
112
- Ge as MenuSeparator,
113
- Ne as MenuSub,
114
- Fe as MenuSubContent,
115
- Ee as MenuSubTrigger,
116
- Oe as MenuTrigger,
117
- je as NavBar,
118
- qe as NavBarBackButton,
119
- ze as NavBarCoinCapsule,
120
- Je as NavBarTitle,
121
- Ke as NavBarTrailing,
122
- Ze as PageIndicator,
123
- Ue as Popover,
124
- Ve as PopoverContent,
125
- We as PopoverTrigger,
126
- eo as SearchInput,
127
- ro as SegmentedControl,
128
- to as SegmentedControlButton,
129
- no as Select,
130
- io as SelectContent,
131
- lo as SelectGroup,
132
- po as SelectItem,
133
- mo as SelectItemText,
134
- To as SelectLabel,
135
- xo as SelectSeparator,
136
- uo as SelectTrigger,
137
- fo as SelectTriggerButton,
138
- Bo as SideBar,
139
- bo as SideBarCollapseToggle,
140
- co as SideBarItem,
141
- Io as SideBarLeading,
142
- so as SideBarTrailing,
143
- Do as Skeleton,
144
- ho as Spinner,
145
- Ro as Spot,
146
- Ao as Stepper,
147
- Po as Subheader,
148
- ko as SubheaderCount,
149
- yo as SubheaderDescription,
150
- Go as SubheaderInfo,
151
- No as SubheaderRow,
152
- Fo as SubheaderShowMore,
153
- Eo as SubheaderTitle,
154
- _o as Switch,
155
- qo as Table,
156
- zo as TableActionBar,
157
- Jo as TableActionBarLeading,
158
- Ko as TableActionBarTrailing,
159
- Qo as TableBody,
160
- Uo as TableCell,
161
- Vo as TableCellContent,
162
- Wo as TableGroupHeaderRow,
163
- Xo as TableHeader,
164
- Yo as TableHeaderCell,
165
- Zo as TableHeaderRow,
166
- $o as TableInfoIcon,
167
- er as TableLoadingRow,
168
- or as TableRoot,
169
- rr as TableRow,
170
- tr as TableSortButton,
171
- nr as Tag,
172
- lr as TextInput,
173
- Mr as ThemeProvider,
174
- mr as Tile,
175
- gr as TileButton,
176
- Tr as TileContent,
177
- dr as TileDescription,
178
- xr as TileSecondaryAction,
179
- ur as TileTitle,
180
- fr as TileTrailingContent,
181
- Br as Tooltip,
182
- br as TooltipContent,
183
- cr as TooltipProvider,
184
- Ir as TooltipTrigger,
185
- go as TriggerButton,
186
- Xe as createPopoverHandle,
104
+ he as MediaImage,
105
+ we as Menu,
106
+ Ae as MenuCheckboxItem,
107
+ He as MenuContent,
108
+ Pe as MenuGroup,
109
+ ye as MenuItem,
110
+ ke as MenuLabel,
111
+ Ne as MenuPortal,
112
+ Ge as MenuRadioGroup,
113
+ Ee as MenuRadioItem,
114
+ Fe as MenuSeparator,
115
+ Oe as MenuSub,
116
+ ze as MenuSubContent,
117
+ _e as MenuSubTrigger,
118
+ je as MenuTrigger,
119
+ Je as NavBar,
120
+ Ke as NavBarBackButton,
121
+ Qe as NavBarCoinCapsule,
122
+ Ue as NavBarTitle,
123
+ Ve as NavBarTrailing,
124
+ oo as PageIndicator,
125
+ Xe as Popover,
126
+ Ye as PopoverContent,
127
+ Ze as PopoverTrigger,
128
+ ro as SearchInput,
129
+ no as SegmentedControl,
130
+ io as SegmentedControlButton,
131
+ po as Select,
132
+ mo as SelectContent,
133
+ To as SelectEmptyState,
134
+ xo as SelectItem,
135
+ fo as SelectItemContent,
136
+ uo as SelectItemDescription,
137
+ Co as SelectItemText,
138
+ So as SelectList,
139
+ go as SelectSearch,
140
+ co as SelectSeparator,
141
+ Bo as SelectTrigger,
142
+ bo as SelectTriggerButton,
143
+ Do as SideBar,
144
+ Lo as SideBarCollapseToggle,
145
+ ho as SideBarItem,
146
+ vo as SideBarLeading,
147
+ Ro as SideBarTrailing,
148
+ Ao as Skeleton,
149
+ Po as Spinner,
150
+ ko as Spot,
151
+ Go as Stepper,
152
+ Fo as Subheader,
153
+ Oo as SubheaderCount,
154
+ zo as SubheaderDescription,
155
+ _o as SubheaderInfo,
156
+ jo as SubheaderRow,
157
+ qo as SubheaderShowMore,
158
+ Jo as SubheaderTitle,
159
+ Qo as Switch,
160
+ Vo as Table,
161
+ Wo as TableActionBar,
162
+ Xo as TableActionBarLeading,
163
+ Yo as TableActionBarTrailing,
164
+ Zo as TableBody,
165
+ $o as TableCell,
166
+ et as TableCellContent,
167
+ ot as TableGroupHeaderRow,
168
+ tt as TableHeader,
169
+ rt as TableHeaderCell,
170
+ at as TableHeaderRow,
171
+ nt as TableInfoIcon,
172
+ it as TableLoadingRow,
173
+ lt as TableRoot,
174
+ pt as TableRow,
175
+ mt as TableSortButton,
176
+ Tt as Tag,
177
+ ft as TextInput,
178
+ wt as ThemeProvider,
179
+ Ct as Tile,
180
+ st as TileButton,
181
+ St as TileContent,
182
+ gt as TileDescription,
183
+ ct as TileSecondaryAction,
184
+ Bt as TileTitle,
185
+ bt as TileTrailingContent,
186
+ Dt as Tooltip,
187
+ Lt as TooltipContent,
188
+ ht as TooltipProvider,
189
+ vt as TooltipTrigger,
190
+ so as TriggerButton,
191
+ $e as createPopoverHandle,
192
+ ve as mediaImageDotSizeMap,
187
193
  J as useLumenDataTable
188
194
  };
@@ -1 +1 @@
1
- {"version":3,"file":"BaseInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/BaseInput/BaseInput.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA2BzC;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,SAAS;2OAiBnB,cAAc;;CAyKhB,CAAC"}
1
+ {"version":3,"file":"BaseInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/BaseInput/BaseInput.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA2BzC;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,SAAS;2OAiBnB,cAAc;;CA6JhB,CAAC"}
@@ -1,150 +1,143 @@
1
- import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
- import { useDisabledContext as O, cn as a } from "../../../libs/utils-shared/dist/index.js";
3
- import { useRef as $, useId as q, useState as H, useCallback as P } from "react";
4
- import { useCommonTranslation as U } from "../../../i18n/useCommonTranslation.js";
5
- import { InteractiveIcon as W } from "../InteractiveIcon/InteractiveIcon.js";
1
+ import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
+ import { useDisabledContext as O, useMergedRef as $, cn as n } from "../../../libs/utils-shared/dist/index.js";
3
+ import { useRef as q, useId as H, useState as P, useCallback as U } from "react";
4
+ import { useCommonTranslation as W } from "../../../i18n/useCommonTranslation.js";
5
+ import { InteractiveIcon as G } from "../InteractiveIcon/InteractiveIcon.js";
6
6
  import { DeleteCircleFill as w } from "../../Symbols/Icons/DeleteCircleFill.js";
7
- const G = a(
7
+ const J = n(
8
8
  "group relative flex h-48 w-full cursor-text items-center gap-8 rounded-sm bg-muted px-16 transition-colors",
9
9
  "focus-within:ring-2 focus-within:ring-active hover:bg-muted-hover",
10
10
  "has-disabled:cursor-not-allowed has-disabled:bg-disabled has-disabled:text-disabled",
11
11
  "has-invalid:border-error has-invalid:ring-1 has-invalid:ring-error",
12
12
  'has-[input[aria-invalid="true"]]:border-error has-[input[aria-invalid="true"]]:ring-1 has-[input[aria-invalid="true"]]:ring-error'
13
- ), J = a(
13
+ ), K = n(
14
14
  "peer w-full flex-1 bg-muted body-1 text-base caret-active outline-hidden transition-colors",
15
15
  "group-hover:bg-muted-hover group-disabled:bg-disabled",
16
16
  "group-has-disabled:cursor-not-allowed group-has-disabled:bg-disabled group-has-disabled:text-disabled",
17
17
  "placeholder:text-muted group-has-disabled:placeholder:text-disabled",
18
18
  "[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
19
19
  "truncate"
20
- ), K = a(
20
+ ), Q = n(
21
21
  "pointer-events-none absolute top-6 left-16 origin-left body-4 text-muted transition-all duration-300",
22
22
  "peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-placeholder-shown:body-2",
23
23
  "group-has-disabled:text-disabled",
24
24
  "peer-focus:top-6 peer-focus:translate-y-0 peer-focus:body-4",
25
25
  "w-[calc(100%-var(--size-56))] truncate"
26
- ), Q = ({
26
+ ), X = ({
27
27
  ref: x,
28
28
  className: y,
29
29
  containerClassName: I,
30
30
  inputClassName: C,
31
31
  labelClassName: S,
32
- label: d,
32
+ label: l,
33
33
  id: N,
34
- disabled: k,
35
- errorMessage: o,
36
- suffix: B,
37
- prefix: D,
38
- onClear: E,
39
- hideClearButton: R = !1,
40
- "aria-invalid": p,
41
- onChange: b,
42
- ...i
34
+ disabled: R,
35
+ errorMessage: r,
36
+ suffix: k,
37
+ prefix: B,
38
+ onClear: D,
39
+ hideClearButton: j = !1,
40
+ "aria-invalid": c,
41
+ onChange: p,
42
+ ...a
43
43
  }) => {
44
- const h = O({
44
+ const b = O({
45
45
  consumerName: "BaseInput",
46
- mergeWith: { disabled: k }
47
- }), { t: j } = U(), n = $(null), z = q(), u = N || `input-${z}`, F = p || (o ? !0 : void 0), s = i.value !== void 0, [L, m] = H(
48
- i.defaultValue?.toString() || ""
49
- ), T = P(
50
- (t) => {
51
- s || m(t.target.value), b?.(t);
46
+ mergeWith: { disabled: R }
47
+ }), { t: z } = W(), e = q(null), E = H(), d = N || `input-${E}`, F = c || (r ? !0 : void 0), s = a.value !== void 0, [L, h] = P(
48
+ a.defaultValue?.toString() || ""
49
+ ), T = U(
50
+ (o) => {
51
+ s || h(o.target.value), p?.(o);
52
52
  },
53
- [s, b]
54
- ), v = (s ? !!i.value && i.value.toString().length > 0 : L.length > 0) && !h && !R, f = `${u}-error`, V = () => {
55
- if (!n.current) return;
53
+ [s, p]
54
+ ), m = (s ? !!a.value && a.value.toString().length > 0 : L.length > 0) && !b && !j, v = `${d}-error`, V = () => {
55
+ if (!e.current) return;
56
56
  Object.getOwnPropertyDescriptor(
57
57
  window.HTMLInputElement.prototype,
58
58
  "value"
59
- )?.set?.call(n.current, ""), s || m("");
60
- const l = new Event("input", { bubbles: !0 });
61
- n.current.dispatchEvent(l), n.current.focus(), E?.();
62
- };
63
- function A(...t) {
64
- return (l) => {
65
- t.forEach((e) => {
66
- e && (typeof e == "function" ? e(l) : e.current = l);
67
- });
68
- };
69
- }
70
- return /* @__PURE__ */ c("div", { className: y, children: [
71
- /* @__PURE__ */ c(
59
+ )?.set?.call(e.current, ""), s || h("");
60
+ const g = new Event("input", { bubbles: !0 });
61
+ e.current.dispatchEvent(g), e.current.focus(), D?.();
62
+ }, A = $(x, e);
63
+ return /* @__PURE__ */ u("div", { className: y, children: [
64
+ /* @__PURE__ */ u(
72
65
  "div",
73
66
  {
74
- className: a(G, I),
75
- onPointerDown: (t) => {
76
- if (t.target.closest("input, button, a")) return;
77
- const e = n.current;
78
- if (!e) return;
79
- const g = e.value.length > 0 ? e.value.length : 0;
67
+ className: n(J, I),
68
+ onPointerDown: (o) => {
69
+ if (o.target.closest("input, button, a")) return;
70
+ const i = e.current;
71
+ if (!i) return;
72
+ const f = i.value.length > 0 ? i.value.length : 0;
80
73
  window.requestAnimationFrame(() => {
81
74
  try {
82
- e.setSelectionRange(g, g);
75
+ i.setSelectionRange(f, f);
83
76
  } catch {
84
77
  }
85
- e.focus();
78
+ i.focus();
86
79
  });
87
80
  },
88
81
  children: [
89
- D,
90
- /* @__PURE__ */ r(
82
+ B,
83
+ /* @__PURE__ */ t(
91
84
  "input",
92
85
  {
93
- ref: A(x, n),
94
- id: u,
95
- disabled: h,
86
+ ref: A,
87
+ id: d,
88
+ disabled: b,
96
89
  placeholder: " ",
97
90
  "aria-invalid": F,
98
- "aria-describedby": o ? f : void 0,
99
- className: a(
100
- J,
101
- d && "pt-12 body-2",
91
+ "aria-describedby": r ? v : void 0,
92
+ className: n(
93
+ K,
94
+ l && "pt-12 body-2",
102
95
  C
103
96
  ),
104
97
  onChange: T,
105
- ...i
98
+ ...a
106
99
  }
107
100
  ),
108
- d && /* @__PURE__ */ r(
101
+ l && /* @__PURE__ */ t(
109
102
  "label",
110
103
  {
111
- htmlFor: u,
112
- className: a(
113
- K,
114
- o && "text-error",
104
+ htmlFor: d,
105
+ className: n(
106
+ Q,
107
+ r && "text-error",
115
108
  S
116
109
  ),
117
- children: d
110
+ children: l
118
111
  }
119
112
  ),
120
- v && /* @__PURE__ */ r(
121
- W,
113
+ m && /* @__PURE__ */ t(
114
+ G,
122
115
  {
123
116
  iconType: "filled",
124
117
  onClick: V,
125
- "aria-label": j("components.baseInput.clearInputAriaLabel"),
126
- children: /* @__PURE__ */ r(w, { size: 20 })
118
+ "aria-label": z("components.baseInput.clearInputAriaLabel"),
119
+ children: /* @__PURE__ */ t(w, { size: 20 })
127
120
  }
128
121
  ),
129
- !v && B
122
+ !m && k
130
123
  ]
131
124
  }
132
125
  ),
133
- o && /* @__PURE__ */ c(
126
+ r && /* @__PURE__ */ u(
134
127
  "div",
135
128
  {
136
- id: f,
129
+ id: v,
137
130
  className: "mt-8 flex items-center gap-2 body-3 text-error",
138
131
  role: "alert",
139
132
  children: [
140
- /* @__PURE__ */ r(w, { size: 16, className: "text-error" }),
141
- /* @__PURE__ */ r("span", { children: o })
133
+ /* @__PURE__ */ t(w, { size: 16, className: "text-error" }),
134
+ /* @__PURE__ */ t("span", { children: r })
142
135
  ]
143
136
  }
144
137
  )
145
138
  ] });
146
139
  };
147
- Q.displayName = "BaseInput";
140
+ X.displayName = "BaseInput";
148
141
  export {
149
- Q as BaseInput
142
+ X as BaseInput
150
143
  };
@@ -0,0 +1,19 @@
1
+ import { MediaImageProps, MediaImageSize } from './types';
2
+ export declare const mediaImageDotSizeMap: Record<MediaImageSize, number>;
3
+ /**
4
+ * A generic media image component that displays an image with optional shape variants.
5
+ * Supports square and circular appearances with consistent sizing.
6
+ *
7
+ * When the image fails to load or no src is provided, displays a background placeholder
8
+ * or an optional text fallback.
9
+ *
10
+ * @example
11
+ * import { MediaImage } from '@ledgerhq/lumen-ui-react';
12
+ *
13
+ * <MediaImage src="https://example.com/icon.png" alt="Bitcoin" size={32} />
14
+ */
15
+ export declare const MediaImage: {
16
+ ({ ref, className, src, alt, size, shape, imgLoading, ...props }: MediaImageProps): import("react/jsx-runtime").JSX.Element;
17
+ displayName: string;
18
+ };
19
+ //# sourceMappingURL=MediaImage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaImage.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/MediaImage/MediaImage.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA0B1D,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAStD,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU;sEASpB,eAAe;;CA8BjB,CAAC"}