@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.
- package/ai-rules/RULES.md +1 -1
- package/dist/index.js +148 -142
- package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.js +70 -77
- package/dist/lib/Components/MediaImage/MediaImage.d.ts +19 -0
- package/dist/lib/Components/MediaImage/MediaImage.d.ts.map +1 -0
- package/dist/lib/Components/MediaImage/MediaImage.js +75 -0
- package/dist/lib/Components/MediaImage/index.d.ts +3 -0
- package/dist/lib/Components/MediaImage/index.d.ts.map +1 -0
- package/dist/lib/Components/MediaImage/types.d.ts +38 -0
- package/dist/lib/Components/MediaImage/types.d.ts.map +1 -0
- package/dist/lib/Components/SearchInput/SearchInput.d.ts +1 -1
- package/dist/lib/Components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/lib/Components/SearchInput/SearchInput.js +24 -20
- package/dist/lib/Components/SearchInput/types.d.ts +1 -1
- package/dist/lib/Components/SearchInput/types.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.d.ts +27 -12
- package/dist/lib/Components/Select/Select.d.ts.map +1 -1
- package/dist/lib/Components/Select/Select.js +356 -202
- package/dist/lib/Components/Select/SelectContext.d.ts +3 -1
- package/dist/lib/Components/Select/SelectContext.d.ts.map +1 -1
- package/dist/lib/Components/Select/index.d.ts +1 -1
- package/dist/lib/Components/Select/index.d.ts.map +1 -1
- package/dist/lib/Components/Select/types.d.ts +171 -140
- package/dist/lib/Components/Select/types.d.ts.map +1 -1
- package/dist/lib/Components/Select/useSelectItems/index.d.ts +2 -0
- package/dist/lib/Components/Select/useSelectItems/index.d.ts.map +1 -0
- package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts +30 -0
- package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts.map +1 -0
- package/dist/lib/Components/Select/useSelectItems/useSelectItems.js +42 -0
- package/dist/lib/Components/Select/utils/groupItems.d.ts +13 -0
- package/dist/lib/Components/Select/utils/groupItems.d.ts.map +1 -0
- package/dist/lib/Components/Select/utils/groupItems.js +16 -0
- package/dist/lib/Components/Select/utils/index.d.ts +2 -0
- package/dist/lib/Components/Select/utils/index.d.ts.map +1 -0
- package/dist/lib/Components/index.d.ts +1 -0
- package/dist/lib/Components/index.d.ts.map +1 -1
- package/dist/libs/utils-shared/dist/index.js +151 -124
- package/dist/node_modules/@base-ui/react/esm/combobox/chips/ComboboxChipsContext.js +10 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/collection/ComboboxCollection.js +17 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/collection/GroupCollectionContext.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/empty/ComboboxEmpty.js +26 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/group/ComboboxGroup.js +34 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/group/ComboboxGroupContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/group-label/ComboboxGroupLabel.js +27 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/input/ComboboxInput.js +221 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/item/ComboboxItem.js +113 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/item/ComboboxItemContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/item-indicator/ComboboxItemIndicator.js +52 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/list/ComboboxList.js +65 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/popup/ComboboxPopup.js +76 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortal.js +24 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/portal/ComboboxPortalContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositioner.js +102 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/positioner/ComboboxPositionerContext.js +14 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/AriaCombobox.js +596 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/ComboboxRoot.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/ComboboxRootContext.js +41 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/constants.js +8 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/index.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/root/utils/useFilter.js +43 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/row/ComboboxRowContext.js +10 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/store.js +74 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/trigger/ComboboxTrigger.js +135 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/utils/ComboboxInternalDismissButton.js +32 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/utils/stateAttributesMapping.js +15 -0
- package/dist/node_modules/@base-ui/react/esm/combobox/value/ComboboxValue.js +19 -0
- package/dist/node_modules/@base-ui/react/esm/composite/list/CompositeList.js +81 -0
- package/dist/node_modules/@base-ui/react/esm/composite/list/CompositeListContext.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/composite/list/useCompositeListItem.js +55 -0
- package/dist/node_modules/@base-ui/react/esm/field/control/FieldControlDataAttributes.js +6 -0
- package/dist/node_modules/@base-ui/react/esm/field/root/FieldRootContext.js +53 -0
- package/dist/node_modules/@base-ui/react/esm/field/useField.js +51 -0
- package/dist/node_modules/@base-ui/react/esm/field/utils/constants.js +37 -0
- package/dist/node_modules/@base-ui/react/esm/field/utils/getCombinedFieldValidityData.js +12 -0
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useListNavigation.js +287 -0
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useTypeahead.js +71 -0
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/composite.js +218 -4
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/constants.js +7 -3
- package/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js +3 -3
- package/dist/node_modules/@base-ui/react/esm/form/FormContext.js +23 -0
- package/dist/node_modules/@base-ui/react/esm/labelable-provider/LabelableContext.js +19 -0
- package/dist/node_modules/@base-ui/react/esm/labelable-provider/useLabelableId.js +44 -0
- package/dist/node_modules/@base-ui/react/esm/utils/constants.js +11 -8
- package/dist/node_modules/@base-ui/react/esm/utils/createBaseUIEventDetails.js +22 -13
- package/dist/node_modules/@base-ui/react/esm/utils/getPseudoElementBounds.js +18 -0
- package/dist/node_modules/@base-ui/react/esm/utils/itemEquality.js +20 -0
- package/dist/node_modules/@base-ui/react/esm/utils/reason-parts.js +13 -6
- package/dist/node_modules/@base-ui/react/esm/utils/resolveAriaLabelledBy.js +6 -0
- package/dist/node_modules/@base-ui/react/esm/utils/resolveValueLabel.js +73 -0
- package/dist/node_modules/@base-ui/react/esm/utils/serializeValue.js +14 -0
- package/dist/node_modules/@base-ui/utils/esm/detectBrowser.js +8 -7
- package/dist/node_modules/@base-ui/utils/esm/empty.js +3 -2
- package/dist/node_modules/@base-ui/utils/esm/useControlled.js +31 -0
- package/dist/node_modules/@base-ui/utils/esm/visuallyHidden.js +5 -1
- package/dist/package.json +1 -2
- 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 `@
|
|
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
|
|
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
|
|
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
|
|
8
|
-
import { Button as
|
|
9
|
-
import { BaseButton as
|
|
10
|
-
import { Card as
|
|
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
|
|
13
|
-
import { Checkbox as
|
|
14
|
-
import { DataTable as
|
|
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
|
|
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
|
|
24
|
-
import { MediaBanner as
|
|
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 {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
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
|
-
|
|
54
|
+
d as Avatar,
|
|
54
55
|
x as Banner,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
|
|
87
|
+
re as Divider,
|
|
87
88
|
ne as IconButton,
|
|
88
89
|
le as InteractiveIcon,
|
|
89
|
-
|
|
90
|
+
t as Languages,
|
|
90
91
|
me as Link,
|
|
91
|
-
|
|
92
|
+
Te as ListItem,
|
|
92
93
|
xe as ListItemContent,
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
fe as ListItemContentRow,
|
|
95
|
+
ue as ListItemDescription,
|
|
95
96
|
Ce as ListItemLeading,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
je as
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
ro as
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
ho as
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
Go as
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
_o as
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
Jo as
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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":"
|
|
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
|
|
2
|
-
import { useDisabledContext as O, cn as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { useCommonTranslation as
|
|
5
|
-
import { InteractiveIcon as
|
|
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
|
|
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
|
-
),
|
|
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
|
-
),
|
|
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
|
-
),
|
|
26
|
+
), X = ({
|
|
27
27
|
ref: x,
|
|
28
28
|
className: y,
|
|
29
29
|
containerClassName: I,
|
|
30
30
|
inputClassName: C,
|
|
31
31
|
labelClassName: S,
|
|
32
|
-
label:
|
|
32
|
+
label: l,
|
|
33
33
|
id: N,
|
|
34
|
-
disabled:
|
|
35
|
-
errorMessage:
|
|
36
|
-
suffix:
|
|
37
|
-
prefix:
|
|
38
|
-
onClear:
|
|
39
|
-
hideClearButton:
|
|
40
|
-
"aria-invalid":
|
|
41
|
-
onChange:
|
|
42
|
-
...
|
|
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
|
|
44
|
+
const b = O({
|
|
45
45
|
consumerName: "BaseInput",
|
|
46
|
-
mergeWith: { disabled:
|
|
47
|
-
}), { t:
|
|
48
|
-
|
|
49
|
-
), T =
|
|
50
|
-
(
|
|
51
|
-
s ||
|
|
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,
|
|
54
|
-
),
|
|
55
|
-
if (!
|
|
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(
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
|
|
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:
|
|
75
|
-
onPointerDown: (
|
|
76
|
-
if (
|
|
77
|
-
const
|
|
78
|
-
if (!
|
|
79
|
-
const
|
|
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
|
-
|
|
75
|
+
i.setSelectionRange(f, f);
|
|
83
76
|
} catch {
|
|
84
77
|
}
|
|
85
|
-
|
|
78
|
+
i.focus();
|
|
86
79
|
});
|
|
87
80
|
},
|
|
88
81
|
children: [
|
|
89
|
-
|
|
90
|
-
/* @__PURE__ */
|
|
82
|
+
B,
|
|
83
|
+
/* @__PURE__ */ t(
|
|
91
84
|
"input",
|
|
92
85
|
{
|
|
93
|
-
ref: A
|
|
94
|
-
id:
|
|
95
|
-
disabled:
|
|
86
|
+
ref: A,
|
|
87
|
+
id: d,
|
|
88
|
+
disabled: b,
|
|
96
89
|
placeholder: " ",
|
|
97
90
|
"aria-invalid": F,
|
|
98
|
-
"aria-describedby":
|
|
99
|
-
className:
|
|
100
|
-
|
|
101
|
-
|
|
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
|
-
...
|
|
98
|
+
...a
|
|
106
99
|
}
|
|
107
100
|
),
|
|
108
|
-
|
|
101
|
+
l && /* @__PURE__ */ t(
|
|
109
102
|
"label",
|
|
110
103
|
{
|
|
111
|
-
htmlFor:
|
|
112
|
-
className:
|
|
113
|
-
|
|
114
|
-
|
|
104
|
+
htmlFor: d,
|
|
105
|
+
className: n(
|
|
106
|
+
Q,
|
|
107
|
+
r && "text-error",
|
|
115
108
|
S
|
|
116
109
|
),
|
|
117
|
-
children:
|
|
110
|
+
children: l
|
|
118
111
|
}
|
|
119
112
|
),
|
|
120
|
-
|
|
121
|
-
|
|
113
|
+
m && /* @__PURE__ */ t(
|
|
114
|
+
G,
|
|
122
115
|
{
|
|
123
116
|
iconType: "filled",
|
|
124
117
|
onClick: V,
|
|
125
|
-
"aria-label":
|
|
126
|
-
children: /* @__PURE__ */
|
|
118
|
+
"aria-label": z("components.baseInput.clearInputAriaLabel"),
|
|
119
|
+
children: /* @__PURE__ */ t(w, { size: 20 })
|
|
127
120
|
}
|
|
128
121
|
),
|
|
129
|
-
!
|
|
122
|
+
!m && k
|
|
130
123
|
]
|
|
131
124
|
}
|
|
132
125
|
),
|
|
133
|
-
|
|
126
|
+
r && /* @__PURE__ */ u(
|
|
134
127
|
"div",
|
|
135
128
|
{
|
|
136
|
-
id:
|
|
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__ */
|
|
141
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
140
|
+
X.displayName = "BaseInput";
|
|
148
141
|
export {
|
|
149
|
-
|
|
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"}
|