@ledgerhq/lumen-ui-react 0.1.46 → 0.1.47
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/dist/index.js +113 -109
- package/dist/lib/Components/AmountInput/AmountInput.js +2 -2
- package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.js +119 -93
- package/dist/lib/Components/BaseInput/types.d.ts +24 -0
- package/dist/lib/Components/BaseInput/types.d.ts.map +1 -1
- package/dist/lib/Components/Card/Card.js +1 -1
- package/dist/lib/Components/CardButton/CardButton.js +1 -1
- package/dist/lib/Components/DescriptionItem/DescriptionItem.d.ts +1 -1
- package/dist/lib/Components/DescriptionItem/DescriptionItem.d.ts.map +1 -1
- package/dist/lib/Components/DescriptionItem/DescriptionItem.js +74 -48
- package/dist/lib/Components/DescriptionItem/types.d.ts +6 -0
- package/dist/lib/Components/DescriptionItem/types.d.ts.map +1 -1
- package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +1 -1
- package/dist/lib/Components/Icon/Icon.js +8 -8
- package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/lib/Components/ListItem/ListItem.js +118 -68
- package/dist/lib/Components/ListItem/types.d.ts +11 -1
- package/dist/lib/Components/ListItem/types.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.d.ts +1 -1
- package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.js +79 -65
- package/dist/lib/Components/Menu/types.d.ts +6 -0
- package/dist/lib/Components/Menu/types.d.ts.map +1 -1
- package/dist/lib/Components/SearchInput/SearchInput.js +10 -10
- package/dist/lib/Components/SectionHeader/SectionHeader.d.ts +33 -0
- package/dist/lib/Components/SectionHeader/SectionHeader.d.ts.map +1 -0
- package/dist/lib/Components/SectionHeader/SectionHeader.js +56 -0
- package/dist/lib/Components/SectionHeader/index.d.ts +3 -0
- package/dist/lib/Components/SectionHeader/index.d.ts.map +1 -0
- package/dist/lib/Components/SectionHeader/types.d.ts +26 -0
- package/dist/lib/Components/SectionHeader/types.d.ts.map +1 -0
- package/dist/lib/Components/SideBar/SideBar.js +2 -2
- package/dist/lib/Components/Spot/Spot.js +5 -5
- package/dist/lib/Components/Table/Table.js +4 -4
- package/dist/lib/Components/TileButton/TileButton.d.ts +1 -1
- package/dist/lib/Components/TileButton/TileButton.d.ts.map +1 -1
- package/dist/lib/Components/TileButton/TileButton.js +52 -39
- package/dist/lib/Components/TileButton/types.d.ts +5 -0
- package/dist/lib/Components/TileButton/types.d.ts.map +1 -1
- package/dist/lib/Components/Trend/Trend.js +2 -2
- package/dist/lib/Components/index.d.ts +1 -0
- package/dist/lib/Components/index.d.ts.map +1 -1
- package/dist/lib/Symbols/Icons/Upload.d.ts +29 -0
- package/dist/lib/Symbols/Icons/Upload.d.ts.map +1 -0
- package/dist/lib/Symbols/Icons/Upload.js +28 -0
- package/dist/lib/Symbols/index.d.ts +1 -0
- package/dist/lib/Symbols/index.d.ts.map +1 -1
- package/dist/lib/Symbols/index.js +58 -56
- package/dist/package.json +3 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -5,11 +5,11 @@ import { AmountDisplay as l } from "./lib/Components/AmountDisplay/AmountDisplay
|
|
|
5
5
|
import { Avatar as d } from "./lib/Components/Avatar/Avatar.js";
|
|
6
6
|
import { Banner as T } from "./lib/Components/Banner/Banner.js";
|
|
7
7
|
import { BaseInput as c } from "./lib/Components/BaseInput/BaseInput.js";
|
|
8
|
-
import { Button as
|
|
8
|
+
import { Button as u } from "./lib/Components/Button/Button.js";
|
|
9
9
|
import { BaseButton as g } from "./lib/Components/Button/BaseButton.js";
|
|
10
|
-
import { Card as B, CardContent as b, CardContentDescription as s, CardContentRow as D, CardContentTitle as M, CardFooter as L, CardFooterActions as h, CardHeader as v, CardLeading as R, CardTrailing as
|
|
11
|
-
import { CardButton as
|
|
12
|
-
import { Checkbox as
|
|
10
|
+
import { Card as B, CardContent as b, CardContentDescription as s, CardContentRow as D, CardContentTitle as M, CardFooter as L, CardFooterActions as h, CardHeader as v, CardLeading as R, CardTrailing as H } from "./lib/Components/Card/Card.js";
|
|
11
|
+
import { CardButton as A } from "./lib/Components/CardButton/CardButton.js";
|
|
12
|
+
import { Checkbox as y } from "./lib/Components/Checkbox/Checkbox.js";
|
|
13
13
|
import { ContentBanner as k, ContentBannerContent as G, ContentBannerDescription as z, ContentBannerTitle as E } from "./lib/Components/ContentBanner/ContentBanner.js";
|
|
14
14
|
import { DataTable as O, DataTableGlobalSearchInput as V, DataTableRoot as _ } from "./lib/Components/DataTable/DataTable.js";
|
|
15
15
|
import { useLumenDataTable as q } from "./lib/Components/DataTable/useLumenDataTable/useLumenDataTable.js";
|
|
@@ -19,43 +19,44 @@ import { Dialog as ee, DialogBody as oe, DialogBodyStickyContent as te, DialogCo
|
|
|
19
19
|
import { DialogHeader as pe } from "./lib/Components/Dialog/DialogHeader/DialogHeader.js";
|
|
20
20
|
import { Divider as me } from "./lib/Components/Divider/Divider.js";
|
|
21
21
|
import { DotCount as xe } from "./lib/Components/DotCount/DotCount.js";
|
|
22
|
-
import { DotIcon as fe, dotIconSizeMap as ce, mediaImageDotIconSizeMap as
|
|
22
|
+
import { DotIcon as fe, dotIconSizeMap as ce, mediaImageDotIconSizeMap as Se, spotDotIconSizeMap as ue } from "./lib/Components/DotIcon/DotIcon.js";
|
|
23
23
|
import { DotIndicator as ge } from "./lib/Components/DotIndicator/DotIndicator.js";
|
|
24
24
|
import { getDotIndicatorProps as Be } from "./lib/Components/DotIndicator/getDotIndicatorProps.js";
|
|
25
25
|
import { DotSymbol as se, mediaImageDotSizeMap as De, spotDotSizeMap as Me } from "./lib/Components/DotSymbol/DotSymbol.js";
|
|
26
26
|
import { IconButton as he } from "./lib/Components/IconButton/IconButton.js";
|
|
27
27
|
import { InteractiveIcon as Re } from "./lib/Components/InteractiveIcon/InteractiveIcon.js";
|
|
28
|
-
import { Link as
|
|
29
|
-
import { ListItem as
|
|
28
|
+
import { Link as we } from "./lib/Components/Link/Link.js";
|
|
29
|
+
import { ListItem as Pe, ListItemContent as ye, ListItemContentRow as Ne, ListItemDescription as ke, ListItemLeading as Ge, ListItemTitle as ze, ListItemTrailing as Ee } from "./lib/Components/ListItem/ListItem.js";
|
|
30
30
|
import { MediaBanner as Oe, MediaBannerDescription as Ve, MediaBannerTitle as _e } from "./lib/Components/MediaBanner/MediaBanner.js";
|
|
31
31
|
import { MediaButton as qe } from "./lib/Components/MediaButton/MediaButton.js";
|
|
32
32
|
import { MediaCard as Ke, MediaCardTitle as Qe } from "./lib/Components/MediaCard/MediaCard.js";
|
|
33
33
|
import { MediaImage as We } from "./lib/Components/MediaImage/MediaImage.js";
|
|
34
34
|
import { MediaTag as Ye } from "./lib/Components/MediaTag/MediaTag.js";
|
|
35
35
|
import { Menu as $e, MenuCheckboxItem as eo, MenuContent as oo, MenuGroup as to, MenuItem as ro, MenuLabel as ao, MenuRadioGroup as no, MenuRadioItem as io, MenuSeparator as po, MenuSub as lo, MenuSubContent as mo, MenuSubTrigger as xo, MenuTrigger as To, createMenuRadioGroup as fo } from "./lib/Components/Menu/Menu.js";
|
|
36
|
-
import { NavBar as
|
|
36
|
+
import { NavBar as So, NavBarBackButton as uo, NavBarCoinCapsule as Co, NavBarDescription as go, NavBarLeading as Io, NavBarTitle as Bo, NavBarTrailing as bo } from "./lib/Components/NavBar/NavBar.js";
|
|
37
37
|
import { Popover as Do, PopoverContent as Mo, PopoverTrigger as Lo, createPopoverHandle as ho } from "./lib/Components/Popover/Popover.js";
|
|
38
38
|
import { PageIndicator as Ro } from "./lib/Components/PageIndicator/PageIndicator.js";
|
|
39
|
-
import { Pagination as
|
|
40
|
-
import { SearchInput as
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
39
|
+
import { Pagination as wo } from "./lib/Components/Pagination/Pagination.js";
|
|
40
|
+
import { SearchInput as Po } from "./lib/Components/SearchInput/SearchInput.js";
|
|
41
|
+
import { SectionHeader as No, SectionHeaderLeading as ko, SectionHeaderTitle as Go } from "./lib/Components/SectionHeader/SectionHeader.js";
|
|
42
|
+
import { SegmentedControl as Eo, SegmentedControlButton as Fo, createSegmentedControl as Oo } from "./lib/Components/SegmentedControl/SegmentedControl.js";
|
|
43
|
+
import { Select as _o, SelectContent as jo, SelectEmptyState as qo, SelectItem as Jo, SelectItemContent as Ko, SelectItemDescription as Qo, SelectItemText as Uo, SelectList as Wo, SelectSearch as Xo, SelectSeparator as Yo, SelectTrigger as Zo, createSelect as $o } from "./lib/Components/Select/Select.js";
|
|
44
|
+
import { SideBar as ot, SideBarCollapseToggle as tt, SideBarItem as rt, SideBarLeading as at, SideBarTrailing as nt, createSideBar as it } from "./lib/Components/SideBar/SideBar.js";
|
|
45
|
+
import { Skeleton as lt } from "./lib/Components/Skeleton/Skeleton.js";
|
|
46
|
+
import { Spinner as dt } from "./lib/Components/Spinner/Spinner.js";
|
|
47
|
+
import { Spot as Tt } from "./lib/Components/Spot/Spot.js";
|
|
48
|
+
import { Stepper as ct } from "./lib/Components/Stepper/Stepper.js";
|
|
49
|
+
import { Subheader as ut, SubheaderCount as Ct, SubheaderDescription as gt, SubheaderInfo as It, SubheaderRow as Bt, SubheaderShowMore as bt, SubheaderTitle as st } from "./lib/Components/Subheader/Subheader.js";
|
|
50
|
+
import { Switch as Mt } from "./lib/Components/Switch/Switch.js";
|
|
51
|
+
import { Table as ht, TableActionBar as vt, TableActionBarLeading as Rt, TableActionBarTrailing as Ht, TableBody as wt, TableCell as At, TableCellContent as Pt, TableCol as yt, TableColGroup as Nt, TableGroupHeaderRow as kt, TableHeader as Gt, TableHeaderCell as zt, TableHeaderRow as Et, TableInfoIcon as Ft, TableLoadingRow as Ot, TableRoot as Vt, TableRow as _t, TableSortButton as jt } from "./lib/Components/Table/Table.js";
|
|
52
|
+
import { Tag as Jt } from "./lib/Components/Tag/Tag.js";
|
|
53
|
+
import { TextInput as Qt } from "./lib/Components/TextInput/TextInput.js";
|
|
54
|
+
import { Tile as Wt, TileContent as Xt, TileDescription as Yt, TileSecondaryAction as Zt, TileTitle as $t, TileTrailingContent as er } from "./lib/Components/Tile/Tile.js";
|
|
55
|
+
import { TileButton as tr } from "./lib/Components/TileButton/TileButton.js";
|
|
56
|
+
import { Tooltip as ar, TooltipContent as nr, TooltipProvider as ir, TooltipTrigger as pr } from "./lib/Components/Tooltip/Tooltip.js";
|
|
57
|
+
import { Trend as mr } from "./lib/Components/Trend/Trend.js";
|
|
58
|
+
import { ThemeProvider as xr, useTheme as Tr } from "./lib/Components/ThemeProvider/ThemeProvider.js";
|
|
59
|
+
import { COLOR_SCHEMES as cr } from "./lib/Components/ThemeProvider/ThemeProvider.types.js";
|
|
59
60
|
export {
|
|
60
61
|
a as AddressInput,
|
|
61
62
|
l as AmountDisplay,
|
|
@@ -64,10 +65,10 @@ export {
|
|
|
64
65
|
T as Banner,
|
|
65
66
|
g as BaseButton,
|
|
66
67
|
c as BaseInput,
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
u as Button,
|
|
69
|
+
cr as COLOR_SCHEMES,
|
|
69
70
|
B as Card,
|
|
70
|
-
|
|
71
|
+
A as CardButton,
|
|
71
72
|
b as CardContent,
|
|
72
73
|
s as CardContentDescription,
|
|
73
74
|
D as CardContentRow,
|
|
@@ -76,8 +77,8 @@ export {
|
|
|
76
77
|
h as CardFooterActions,
|
|
77
78
|
v as CardHeader,
|
|
78
79
|
R as CardLeading,
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
H as CardTrailing,
|
|
81
|
+
y as Checkbox,
|
|
81
82
|
k as ContentBanner,
|
|
82
83
|
G as ContentBannerContent,
|
|
83
84
|
z as ContentBannerDescription,
|
|
@@ -106,9 +107,9 @@ export {
|
|
|
106
107
|
he as IconButton,
|
|
107
108
|
Re as InteractiveIcon,
|
|
108
109
|
t as Languages,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
we as Link,
|
|
111
|
+
Pe as ListItem,
|
|
112
|
+
ye as ListItemContent,
|
|
112
113
|
Ne as ListItemContentRow,
|
|
113
114
|
ke as ListItemDescription,
|
|
114
115
|
Ge as ListItemLeading,
|
|
@@ -135,93 +136,96 @@ export {
|
|
|
135
136
|
mo as MenuSubContent,
|
|
136
137
|
xo as MenuSubTrigger,
|
|
137
138
|
To as MenuTrigger,
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
So as NavBar,
|
|
140
|
+
uo as NavBarBackButton,
|
|
140
141
|
Co as NavBarCoinCapsule,
|
|
141
142
|
go as NavBarDescription,
|
|
142
143
|
Io as NavBarLeading,
|
|
143
144
|
Bo as NavBarTitle,
|
|
144
145
|
bo as NavBarTrailing,
|
|
145
146
|
Ro as PageIndicator,
|
|
146
|
-
|
|
147
|
+
wo as Pagination,
|
|
147
148
|
Do as Popover,
|
|
148
149
|
Mo as PopoverContent,
|
|
149
150
|
Lo as PopoverTrigger,
|
|
150
|
-
|
|
151
|
-
No as
|
|
152
|
-
ko as
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
ct as
|
|
176
|
-
ut as
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
Bt as
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
Mt as
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
wt as
|
|
189
|
-
At as
|
|
190
|
-
Pt as
|
|
191
|
-
yt as
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
Vt as
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
Jt as
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
nr as
|
|
151
|
+
Po as SearchInput,
|
|
152
|
+
No as SectionHeader,
|
|
153
|
+
ko as SectionHeaderLeading,
|
|
154
|
+
Go as SectionHeaderTitle,
|
|
155
|
+
Eo as SegmentedControl,
|
|
156
|
+
Fo as SegmentedControlButton,
|
|
157
|
+
_o as Select,
|
|
158
|
+
jo as SelectContent,
|
|
159
|
+
qo as SelectEmptyState,
|
|
160
|
+
Jo as SelectItem,
|
|
161
|
+
Ko as SelectItemContent,
|
|
162
|
+
Qo as SelectItemDescription,
|
|
163
|
+
Uo as SelectItemText,
|
|
164
|
+
Wo as SelectList,
|
|
165
|
+
Xo as SelectSearch,
|
|
166
|
+
Yo as SelectSeparator,
|
|
167
|
+
Zo as SelectTrigger,
|
|
168
|
+
ot as SideBar,
|
|
169
|
+
tt as SideBarCollapseToggle,
|
|
170
|
+
rt as SideBarItem,
|
|
171
|
+
at as SideBarLeading,
|
|
172
|
+
nt as SideBarTrailing,
|
|
173
|
+
lt as Skeleton,
|
|
174
|
+
dt as Spinner,
|
|
175
|
+
Tt as Spot,
|
|
176
|
+
ct as Stepper,
|
|
177
|
+
ut as Subheader,
|
|
178
|
+
Ct as SubheaderCount,
|
|
179
|
+
gt as SubheaderDescription,
|
|
180
|
+
It as SubheaderInfo,
|
|
181
|
+
Bt as SubheaderRow,
|
|
182
|
+
bt as SubheaderShowMore,
|
|
183
|
+
st as SubheaderTitle,
|
|
184
|
+
Mt as Switch,
|
|
185
|
+
ht as Table,
|
|
186
|
+
vt as TableActionBar,
|
|
187
|
+
Rt as TableActionBarLeading,
|
|
188
|
+
Ht as TableActionBarTrailing,
|
|
189
|
+
wt as TableBody,
|
|
190
|
+
At as TableCell,
|
|
191
|
+
Pt as TableCellContent,
|
|
192
|
+
yt as TableCol,
|
|
193
|
+
Nt as TableColGroup,
|
|
194
|
+
kt as TableGroupHeaderRow,
|
|
195
|
+
Gt as TableHeader,
|
|
196
|
+
zt as TableHeaderCell,
|
|
197
|
+
Et as TableHeaderRow,
|
|
198
|
+
Ft as TableInfoIcon,
|
|
199
|
+
Ot as TableLoadingRow,
|
|
200
|
+
Vt as TableRoot,
|
|
201
|
+
_t as TableRow,
|
|
202
|
+
jt as TableSortButton,
|
|
203
|
+
Jt as Tag,
|
|
204
|
+
Qt as TextInput,
|
|
205
|
+
xr as ThemeProvider,
|
|
206
|
+
Wt as Tile,
|
|
207
|
+
tr as TileButton,
|
|
208
|
+
Xt as TileContent,
|
|
209
|
+
Yt as TileDescription,
|
|
210
|
+
Zt as TileSecondaryAction,
|
|
211
|
+
$t as TileTitle,
|
|
212
|
+
er as TileTrailingContent,
|
|
213
|
+
ar as Tooltip,
|
|
214
|
+
nr as TooltipContent,
|
|
215
|
+
ir as TooltipProvider,
|
|
216
|
+
pr as TooltipTrigger,
|
|
217
|
+
mr as Trend,
|
|
214
218
|
fo as createMenuRadioGroup,
|
|
215
219
|
ho as createPopoverHandle,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
220
|
+
Oo as createSegmentedControl,
|
|
221
|
+
$o as createSelect,
|
|
222
|
+
it as createSideBar,
|
|
219
223
|
ce as dotIconSizeMap,
|
|
220
224
|
Be as getDotIndicatorProps,
|
|
221
|
-
|
|
225
|
+
Se as mediaImageDotIconSizeMap,
|
|
222
226
|
De as mediaImageDotSizeMap,
|
|
223
|
-
|
|
227
|
+
ue as spotDotIconSizeMap,
|
|
224
228
|
Me as spotDotSizeMap,
|
|
225
229
|
q as useLumenDataTable,
|
|
226
|
-
|
|
230
|
+
Tr as useTheme
|
|
227
231
|
};
|
|
@@ -18,5 +18,5 @@ import { BaseInputProps } from './types';
|
|
|
18
18
|
*
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
|
-
export declare const BaseInput: ({ ref, className, containerClassName, inputClassName, labelClassName, label, id, disabled: disabledProp, helperText, status, suffix, prefix, onClear, hideClearButton, "aria-invalid": ariaInvalidProp, onChange: onChangeProp, placeholder: placeholderProp, ...props }: BaseInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const BaseInput: ({ ref, className, containerClassName, inputClassName, labelClassName, label, id, disabled: disabledProp, helperText, maxCount, status, suffix, prefix, onClear, hideClearButton, "aria-invalid": ariaInvalidProp, onChange: onChangeProp, placeholder: placeholderProp, ...props }: BaseInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
//# sourceMappingURL=BaseInput.d.ts.map
|
|
@@ -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,KAAK,EAGV,cAAc,EACf,MAAM,SAAS,CAAC;AAuEjB;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,SAAS,GAAI,oRAoBvB,cAAc,4CA+KhB,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useDisabledContext as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { useCommonTranslation as
|
|
6
|
-
import { InteractiveIcon as
|
|
7
|
-
import { DeleteCircleFill as
|
|
8
|
-
import {
|
|
9
|
-
|
|
1
|
+
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useDisabledContext as Q, resolveBaseInputPlaceholder as X, useMergedRef as Y, cn as s } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { cva as g } from "class-variance-authority";
|
|
4
|
+
import { useRef as Z, useId as _, useState as ee, useCallback as te } from "react";
|
|
5
|
+
import { useCommonTranslation as re } from "../../../i18n/useCommonTranslation.js";
|
|
6
|
+
import { InteractiveIcon as se } from "../InteractiveIcon/InteractiveIcon.js";
|
|
7
|
+
import { DeleteCircleFill as k } from "../../Symbols/Icons/DeleteCircleFill.js";
|
|
8
|
+
import { InformationFill as ae } from "../../Symbols/Icons/InformationFill.js";
|
|
9
|
+
import { CheckmarkCircleFill as oe } from "../../Symbols/Icons/CheckmarkCircleFill.js";
|
|
10
|
+
const ne = g(
|
|
10
11
|
[
|
|
11
12
|
"group relative flex h-48 w-full cursor-text items-center gap-8 rounded-sm bg-muted px-16 transition-colors",
|
|
12
13
|
"focus-within:ring-2 focus-within:ring-active hover:bg-muted-hover",
|
|
@@ -24,20 +25,20 @@ const te = u(
|
|
|
24
25
|
status: "default"
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
|
-
),
|
|
28
|
+
), le = s(
|
|
28
29
|
"peer w-full flex-1 bg-muted body-1 text-base caret-active outline-hidden transition-colors",
|
|
29
30
|
"group-hover:bg-muted-hover group-disabled:bg-disabled",
|
|
30
31
|
"group-has-disabled:cursor-not-allowed group-has-disabled:bg-disabled group-has-disabled:text-disabled",
|
|
31
32
|
"placeholder:text-muted group-has-disabled:placeholder:text-disabled",
|
|
32
33
|
"[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
33
34
|
"truncate"
|
|
34
|
-
),
|
|
35
|
+
), ie = s(
|
|
35
36
|
"pointer-events-none absolute top-6 left-16 origin-left body-4 text-muted transition-all duration-300",
|
|
36
37
|
"peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-placeholder-shown:body-2",
|
|
37
38
|
"group-has-disabled:text-disabled",
|
|
38
39
|
"peer-focus:top-6 peer-focus:translate-y-0 peer-focus:body-4",
|
|
39
40
|
"w-[calc(100%-var(--size-56))] truncate"
|
|
40
|
-
),
|
|
41
|
+
), ce = g(ie, {
|
|
41
42
|
variants: {
|
|
42
43
|
status: {
|
|
43
44
|
default: "",
|
|
@@ -53,7 +54,7 @@ const te = u(
|
|
|
53
54
|
status: "default",
|
|
54
55
|
floated: !1
|
|
55
56
|
}
|
|
56
|
-
}),
|
|
57
|
+
}), de = g("flex items-center gap-2 body-3", {
|
|
57
58
|
variants: {
|
|
58
59
|
status: {
|
|
59
60
|
default: "text-muted",
|
|
@@ -64,129 +65,154 @@ const te = u(
|
|
|
64
65
|
defaultVariants: {
|
|
65
66
|
status: "default"
|
|
66
67
|
}
|
|
67
|
-
}),
|
|
68
|
-
ref:
|
|
69
|
-
className:
|
|
70
|
-
containerClassName:
|
|
71
|
-
inputClassName:
|
|
72
|
-
labelClassName:
|
|
73
|
-
label:
|
|
74
|
-
id:
|
|
75
|
-
disabled:
|
|
76
|
-
helperText:
|
|
77
|
-
|
|
68
|
+
}), Ie = ({
|
|
69
|
+
ref: a,
|
|
70
|
+
className: o,
|
|
71
|
+
containerClassName: t,
|
|
72
|
+
inputClassName: B,
|
|
73
|
+
labelClassName: F,
|
|
74
|
+
label: i,
|
|
75
|
+
id: j,
|
|
76
|
+
disabled: z,
|
|
77
|
+
helperText: b,
|
|
78
|
+
maxCount: c,
|
|
79
|
+
status: d,
|
|
78
80
|
suffix: P,
|
|
79
81
|
prefix: R,
|
|
80
|
-
onClear:
|
|
81
|
-
hideClearButton:
|
|
82
|
-
"aria-invalid":
|
|
83
|
-
onChange:
|
|
84
|
-
placeholder:
|
|
85
|
-
...
|
|
82
|
+
onClear: D,
|
|
83
|
+
hideClearButton: $ = !1,
|
|
84
|
+
"aria-invalid": E,
|
|
85
|
+
onChange: v,
|
|
86
|
+
placeholder: H,
|
|
87
|
+
...u
|
|
86
88
|
}) => {
|
|
87
|
-
const
|
|
89
|
+
const w = Q({
|
|
88
90
|
consumerName: "BaseInput",
|
|
89
|
-
mergeWith: { disabled:
|
|
90
|
-
}), { t:
|
|
91
|
-
|
|
92
|
-
),
|
|
93
|
-
(
|
|
94
|
-
|
|
91
|
+
mergeWith: { disabled: z }
|
|
92
|
+
}), { t: L } = re(), r = Z(null), A = _(), m = j || `input-${A}`, M = E ?? (d === "error" ? !0 : void 0), p = u.value !== void 0, [O, y] = ee(
|
|
93
|
+
u.defaultValue?.toString() ?? ""
|
|
94
|
+
), T = te(
|
|
95
|
+
(n) => {
|
|
96
|
+
p || y(n.target.value), v?.(n);
|
|
95
97
|
},
|
|
96
|
-
[
|
|
97
|
-
),
|
|
98
|
-
label:
|
|
99
|
-
placeholder:
|
|
100
|
-
}),
|
|
101
|
-
if (!
|
|
98
|
+
[p, v]
|
|
99
|
+
), x = p ? u.value?.toString() ?? "" : O, W = x.length > 0, { inputPlaceholder: q, labelStaysFloatedWithPlaceholder: U } = X({
|
|
100
|
+
label: i,
|
|
101
|
+
placeholder: H
|
|
102
|
+
}), I = W && !w && !$, G = x.length, C = !!(c && c > 0), N = `${m}-helper`, h = !!b, J = () => {
|
|
103
|
+
if (!r.current) return;
|
|
102
104
|
Object.getOwnPropertyDescriptor(
|
|
103
105
|
window.HTMLInputElement.prototype,
|
|
104
106
|
"value"
|
|
105
|
-
)?.set?.call(
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
return /* @__PURE__ */
|
|
110
|
-
/* @__PURE__ */
|
|
107
|
+
)?.set?.call(r.current, ""), p || y("");
|
|
108
|
+
const V = new Event("input", { bubbles: !0 });
|
|
109
|
+
r.current.dispatchEvent(V), r.current.focus(), D?.();
|
|
110
|
+
}, K = Y(a, r);
|
|
111
|
+
return /* @__PURE__ */ f("div", { className: o, children: [
|
|
112
|
+
/* @__PURE__ */ f(
|
|
111
113
|
"div",
|
|
112
114
|
{
|
|
113
|
-
className:
|
|
114
|
-
onPointerDown: (
|
|
115
|
-
if (
|
|
116
|
-
const
|
|
117
|
-
if (!
|
|
118
|
-
const
|
|
115
|
+
className: s(ne({ status: d }), t),
|
|
116
|
+
onPointerDown: (n) => {
|
|
117
|
+
if (n.target.closest("input, button, a")) return;
|
|
118
|
+
const l = r.current;
|
|
119
|
+
if (!l) return;
|
|
120
|
+
const S = l.value.length > 0 ? l.value.length : 0;
|
|
119
121
|
window.requestAnimationFrame(() => {
|
|
120
122
|
try {
|
|
121
|
-
|
|
123
|
+
l.setSelectionRange(S, S);
|
|
122
124
|
} catch {
|
|
123
125
|
}
|
|
124
|
-
|
|
126
|
+
l.focus();
|
|
125
127
|
});
|
|
126
128
|
},
|
|
127
129
|
children: [
|
|
128
130
|
R,
|
|
129
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ e(
|
|
130
132
|
"input",
|
|
131
133
|
{
|
|
132
|
-
ref:
|
|
133
|
-
id:
|
|
134
|
-
disabled:
|
|
135
|
-
placeholder:
|
|
136
|
-
"aria-invalid":
|
|
137
|
-
"aria-describedby":
|
|
138
|
-
className:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
134
|
+
ref: K,
|
|
135
|
+
id: m,
|
|
136
|
+
disabled: w,
|
|
137
|
+
placeholder: q,
|
|
138
|
+
"aria-invalid": M,
|
|
139
|
+
"aria-describedby": h ? N : void 0,
|
|
140
|
+
className: s(
|
|
141
|
+
le,
|
|
142
|
+
i && "pt-12 body-2",
|
|
143
|
+
B
|
|
142
144
|
),
|
|
143
|
-
onChange:
|
|
144
|
-
...
|
|
145
|
+
onChange: T,
|
|
146
|
+
...u
|
|
145
147
|
}
|
|
146
148
|
),
|
|
147
|
-
|
|
149
|
+
i && /* @__PURE__ */ e(
|
|
148
150
|
"label",
|
|
149
151
|
{
|
|
150
|
-
htmlFor:
|
|
151
|
-
className:
|
|
152
|
-
|
|
153
|
-
status:
|
|
154
|
-
floated:
|
|
152
|
+
htmlFor: m,
|
|
153
|
+
className: s(
|
|
154
|
+
ce({
|
|
155
|
+
status: d,
|
|
156
|
+
floated: U
|
|
155
157
|
}),
|
|
156
|
-
|
|
158
|
+
F
|
|
157
159
|
),
|
|
158
|
-
children:
|
|
160
|
+
children: i
|
|
159
161
|
}
|
|
160
162
|
),
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
I && /* @__PURE__ */ e(
|
|
164
|
+
se,
|
|
163
165
|
{
|
|
164
166
|
iconType: "filled",
|
|
165
|
-
icon:
|
|
167
|
+
icon: k,
|
|
166
168
|
size: 20,
|
|
167
|
-
onClick:
|
|
168
|
-
"aria-label":
|
|
169
|
+
onClick: J,
|
|
170
|
+
"aria-label": L("components.baseInput.clearInputAriaLabel")
|
|
169
171
|
}
|
|
170
172
|
),
|
|
171
|
-
!
|
|
173
|
+
!I && P
|
|
172
174
|
]
|
|
173
175
|
}
|
|
174
176
|
),
|
|
175
|
-
|
|
177
|
+
(h || C) && /* @__PURE__ */ f(
|
|
176
178
|
"div",
|
|
177
179
|
{
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
className: s(
|
|
181
|
+
"mt-8 flex items-start gap-8",
|
|
182
|
+
h ? "justify-between" : "justify-end"
|
|
183
|
+
),
|
|
181
184
|
children: [
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
+
h && b && /* @__PURE__ */ e(
|
|
186
|
+
ue,
|
|
187
|
+
{
|
|
188
|
+
id: N,
|
|
189
|
+
helperText: b,
|
|
190
|
+
status: d
|
|
191
|
+
}
|
|
192
|
+
),
|
|
193
|
+
C && c != null && /* @__PURE__ */ e(pe, { count: G, maxCount: c })
|
|
185
194
|
]
|
|
186
195
|
}
|
|
187
196
|
)
|
|
188
197
|
] });
|
|
189
|
-
}
|
|
198
|
+
}, ue = ({
|
|
199
|
+
id: a,
|
|
200
|
+
helperText: o,
|
|
201
|
+
status: t
|
|
202
|
+
}) => /* @__PURE__ */ f(
|
|
203
|
+
"div",
|
|
204
|
+
{
|
|
205
|
+
id: a,
|
|
206
|
+
className: de({ status: t }),
|
|
207
|
+
role: t === "error" ? "alert" : void 0,
|
|
208
|
+
children: [
|
|
209
|
+
!t && /* @__PURE__ */ e(ae, { size: 16, className: "text-muted" }),
|
|
210
|
+
t === "error" && /* @__PURE__ */ e(k, { size: 16, className: "text-error" }),
|
|
211
|
+
t === "success" && /* @__PURE__ */ e(oe, { size: 16, className: "text-success" }),
|
|
212
|
+
/* @__PURE__ */ e("span", { className: "body-3", children: o })
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
), pe = ({ count: a, maxCount: o }) => /* @__PURE__ */ e("span", { "aria-live": "polite", className: "shrink-0 body-3 text-muted", children: `${a}/${o}` });
|
|
190
216
|
export {
|
|
191
|
-
|
|
217
|
+
Ie as BaseInput
|
|
192
218
|
};
|