@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.
Files changed (52) hide show
  1. package/dist/index.js +113 -109
  2. package/dist/lib/Components/AmountInput/AmountInput.js +2 -2
  3. package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -1
  4. package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  5. package/dist/lib/Components/BaseInput/BaseInput.js +119 -93
  6. package/dist/lib/Components/BaseInput/types.d.ts +24 -0
  7. package/dist/lib/Components/BaseInput/types.d.ts.map +1 -1
  8. package/dist/lib/Components/Card/Card.js +1 -1
  9. package/dist/lib/Components/CardButton/CardButton.js +1 -1
  10. package/dist/lib/Components/DescriptionItem/DescriptionItem.d.ts +1 -1
  11. package/dist/lib/Components/DescriptionItem/DescriptionItem.d.ts.map +1 -1
  12. package/dist/lib/Components/DescriptionItem/DescriptionItem.js +74 -48
  13. package/dist/lib/Components/DescriptionItem/types.d.ts +6 -0
  14. package/dist/lib/Components/DescriptionItem/types.d.ts.map +1 -1
  15. package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +1 -1
  16. package/dist/lib/Components/Icon/Icon.js +8 -8
  17. package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
  18. package/dist/lib/Components/ListItem/ListItem.js +118 -68
  19. package/dist/lib/Components/ListItem/types.d.ts +11 -1
  20. package/dist/lib/Components/ListItem/types.d.ts.map +1 -1
  21. package/dist/lib/Components/Menu/Menu.d.ts +1 -1
  22. package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
  23. package/dist/lib/Components/Menu/Menu.js +79 -65
  24. package/dist/lib/Components/Menu/types.d.ts +6 -0
  25. package/dist/lib/Components/Menu/types.d.ts.map +1 -1
  26. package/dist/lib/Components/SearchInput/SearchInput.js +10 -10
  27. package/dist/lib/Components/SectionHeader/SectionHeader.d.ts +33 -0
  28. package/dist/lib/Components/SectionHeader/SectionHeader.d.ts.map +1 -0
  29. package/dist/lib/Components/SectionHeader/SectionHeader.js +56 -0
  30. package/dist/lib/Components/SectionHeader/index.d.ts +3 -0
  31. package/dist/lib/Components/SectionHeader/index.d.ts.map +1 -0
  32. package/dist/lib/Components/SectionHeader/types.d.ts +26 -0
  33. package/dist/lib/Components/SectionHeader/types.d.ts.map +1 -0
  34. package/dist/lib/Components/SideBar/SideBar.js +2 -2
  35. package/dist/lib/Components/Spot/Spot.js +5 -5
  36. package/dist/lib/Components/Table/Table.js +4 -4
  37. package/dist/lib/Components/TileButton/TileButton.d.ts +1 -1
  38. package/dist/lib/Components/TileButton/TileButton.d.ts.map +1 -1
  39. package/dist/lib/Components/TileButton/TileButton.js +52 -39
  40. package/dist/lib/Components/TileButton/types.d.ts +5 -0
  41. package/dist/lib/Components/TileButton/types.d.ts.map +1 -1
  42. package/dist/lib/Components/Trend/Trend.js +2 -2
  43. package/dist/lib/Components/index.d.ts +1 -0
  44. package/dist/lib/Components/index.d.ts.map +1 -1
  45. package/dist/lib/Symbols/Icons/Upload.d.ts +29 -0
  46. package/dist/lib/Symbols/Icons/Upload.d.ts.map +1 -0
  47. package/dist/lib/Symbols/Icons/Upload.js +28 -0
  48. package/dist/lib/Symbols/index.d.ts +1 -0
  49. package/dist/lib/Symbols/index.d.ts.map +1 -1
  50. package/dist/lib/Symbols/index.js +58 -56
  51. package/dist/package.json +3 -3
  52. 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 S } from "./lib/Components/Button/Button.js";
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 w } from "./lib/Components/Card/Card.js";
11
- import { CardButton as P } from "./lib/Components/CardButton/CardButton.js";
12
- import { Checkbox as H } from "./lib/Components/Checkbox/Checkbox.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 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 ue, spotDotIconSizeMap as Se } from "./lib/Components/DotIcon/DotIcon.js";
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 Ae } from "./lib/Components/Link/Link.js";
29
- import { ListItem as ye, ListItemContent as He, ListItemContentRow as Ne, ListItemDescription as ke, ListItemLeading as Ge, ListItemTitle as ze, ListItemTrailing as Ee } from "./lib/Components/ListItem/ListItem.js";
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 uo, NavBarBackButton as So, NavBarCoinCapsule as Co, NavBarDescription as go, NavBarLeading as Io, NavBarTitle as Bo, NavBarTrailing as bo } from "./lib/Components/NavBar/NavBar.js";
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 Ao } from "./lib/Components/Pagination/Pagination.js";
40
- import { SearchInput as yo } from "./lib/Components/SearchInput/SearchInput.js";
41
- import { SegmentedControl as No, SegmentedControlButton as ko, createSegmentedControl as Go } from "./lib/Components/SegmentedControl/SegmentedControl.js";
42
- import { Select as Eo, SelectContent as Fo, SelectEmptyState as Oo, SelectItem as Vo, SelectItemContent as _o, SelectItemDescription as jo, SelectItemText as qo, SelectList as Jo, SelectSearch as Ko, SelectSeparator as Qo, SelectTrigger as Uo, createSelect as Wo } from "./lib/Components/Select/Select.js";
43
- import { SideBar as Yo, SideBarCollapseToggle as Zo, SideBarItem as $o, SideBarLeading as et, SideBarTrailing as ot, createSideBar as tt } from "./lib/Components/SideBar/SideBar.js";
44
- import { Skeleton as at } from "./lib/Components/Skeleton/Skeleton.js";
45
- import { Spinner as it } from "./lib/Components/Spinner/Spinner.js";
46
- import { Spot as lt } from "./lib/Components/Spot/Spot.js";
47
- import { Stepper as dt } from "./lib/Components/Stepper/Stepper.js";
48
- import { Subheader as Tt, SubheaderCount as ft, SubheaderDescription as ct, SubheaderInfo as ut, SubheaderRow as St, SubheaderShowMore as Ct, SubheaderTitle as gt } from "./lib/Components/Subheader/Subheader.js";
49
- import { Switch as Bt } from "./lib/Components/Switch/Switch.js";
50
- import { Table as st, TableActionBar as Dt, TableActionBarLeading as Mt, TableActionBarTrailing as Lt, TableBody as ht, TableCell as vt, TableCellContent as Rt, TableCol as wt, TableColGroup as At, TableGroupHeaderRow as Pt, TableHeader as yt, TableHeaderCell as Ht, TableHeaderRow as Nt, TableInfoIcon as kt, TableLoadingRow as Gt, TableRoot as zt, TableRow as Et, TableSortButton as Ft } from "./lib/Components/Table/Table.js";
51
- import { Tag as Vt } from "./lib/Components/Tag/Tag.js";
52
- import { TextInput as jt } from "./lib/Components/TextInput/TextInput.js";
53
- import { Tile as Jt, TileContent as Kt, TileDescription as Qt, TileSecondaryAction as Ut, TileTitle as Wt, TileTrailingContent as Xt } from "./lib/Components/Tile/Tile.js";
54
- import { TileButton as Zt } from "./lib/Components/TileButton/TileButton.js";
55
- import { Tooltip as er, TooltipContent as or, TooltipProvider as tr, TooltipTrigger as rr } from "./lib/Components/Tooltip/Tooltip.js";
56
- import { Trend as nr } from "./lib/Components/Trend/Trend.js";
57
- import { ThemeProvider as pr, useTheme as lr } from "./lib/Components/ThemeProvider/ThemeProvider.js";
58
- import { COLOR_SCHEMES as dr } from "./lib/Components/ThemeProvider/ThemeProvider.types.js";
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
- S as Button,
68
- dr as COLOR_SCHEMES,
68
+ u as Button,
69
+ cr as COLOR_SCHEMES,
69
70
  B as Card,
70
- P as CardButton,
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
- w as CardTrailing,
80
- H as Checkbox,
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
- Ae as Link,
110
- ye as ListItem,
111
- He as ListItemContent,
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
- uo as NavBar,
139
- So as NavBarBackButton,
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
- Ao as Pagination,
147
+ wo as Pagination,
147
148
  Do as Popover,
148
149
  Mo as PopoverContent,
149
150
  Lo as PopoverTrigger,
150
- yo as SearchInput,
151
- No as SegmentedControl,
152
- ko as SegmentedControlButton,
153
- Eo as Select,
154
- Fo as SelectContent,
155
- Oo as SelectEmptyState,
156
- Vo as SelectItem,
157
- _o as SelectItemContent,
158
- jo as SelectItemDescription,
159
- qo as SelectItemText,
160
- Jo as SelectList,
161
- Ko as SelectSearch,
162
- Qo as SelectSeparator,
163
- Uo as SelectTrigger,
164
- Yo as SideBar,
165
- Zo as SideBarCollapseToggle,
166
- $o as SideBarItem,
167
- et as SideBarLeading,
168
- ot as SideBarTrailing,
169
- at as Skeleton,
170
- it as Spinner,
171
- lt as Spot,
172
- dt as Stepper,
173
- Tt as Subheader,
174
- ft as SubheaderCount,
175
- ct as SubheaderDescription,
176
- ut as SubheaderInfo,
177
- St as SubheaderRow,
178
- Ct as SubheaderShowMore,
179
- gt as SubheaderTitle,
180
- Bt as Switch,
181
- st as Table,
182
- Dt as TableActionBar,
183
- Mt as TableActionBarLeading,
184
- Lt as TableActionBarTrailing,
185
- ht as TableBody,
186
- vt as TableCell,
187
- Rt as TableCellContent,
188
- wt as TableCol,
189
- At as TableColGroup,
190
- Pt as TableGroupHeaderRow,
191
- yt as TableHeader,
192
- Ht as TableHeaderCell,
193
- Nt as TableHeaderRow,
194
- kt as TableInfoIcon,
195
- Gt as TableLoadingRow,
196
- zt as TableRoot,
197
- Et as TableRow,
198
- Ft as TableSortButton,
199
- Vt as Tag,
200
- jt as TextInput,
201
- pr as ThemeProvider,
202
- Jt as Tile,
203
- Zt as TileButton,
204
- Kt as TileContent,
205
- Qt as TileDescription,
206
- Ut as TileSecondaryAction,
207
- Wt as TileTitle,
208
- Xt as TileTrailingContent,
209
- er as Tooltip,
210
- or as TooltipContent,
211
- tr as TooltipProvider,
212
- rr as TooltipTrigger,
213
- nr as Trend,
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
- Go as createSegmentedControl,
217
- Wo as createSelect,
218
- tt as createSideBar,
220
+ Oo as createSegmentedControl,
221
+ $o as createSelect,
222
+ it as createSideBar,
219
223
  ce as dotIconSizeMap,
220
224
  Be as getDotIndicatorProps,
221
- ue as mediaImageDotIconSizeMap,
225
+ Se as mediaImageDotIconSizeMap,
222
226
  De as mediaImageDotSizeMap,
223
- Se as spotDotIconSizeMap,
227
+ ue as spotDotIconSizeMap,
224
228
  Me as spotDotSizeMap,
225
229
  q as useLumenDataTable,
226
- lr as useTheme
230
+ Tr as useTheme
227
231
  };
@@ -15,8 +15,8 @@ const q = i(
15
15
  {
16
16
  variants: {
17
17
  size: {
18
- md: "heading-0-semi-bold h-56",
19
- sm: "heading-2-semi-bold h-36"
18
+ md: "h-56 heading-0-semi-bold",
19
+ sm: "h-36 heading-2-semi-bold"
20
20
  },
21
21
  isChanging: {
22
22
  true: "animate-translate-from-right",
@@ -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":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAuE9C;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,SAAS,GAAI,0QAmBvB,cAAc,4CAuKhB,CAAC"}
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 d, jsx as r } from "react/jsx-runtime";
2
- import { useDisabledContext as U, resolveBaseInputPlaceholder as G, useMergedRef as J, cn as n } from "../../../libs/utils-shared/dist/index.js";
3
- import { cva as u } from "class-variance-authority";
4
- import { useRef as K, useId as Q, useState as X, useCallback as Y } from "react";
5
- import { useCommonTranslation as Z } from "../../../i18n/useCommonTranslation.js";
6
- import { InteractiveIcon as _ } from "../InteractiveIcon/InteractiveIcon.js";
7
- import { DeleteCircleFill as y } from "../../Symbols/Icons/DeleteCircleFill.js";
8
- import { CheckmarkCircleFill as ee } from "../../Symbols/Icons/CheckmarkCircleFill.js";
9
- const te = u(
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
- ), re = n(
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
- ), ae = n(
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
- ), se = u(ae, {
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
- }), oe = u("mt-8 flex items-center gap-2 body-3", {
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
- }), be = ({
68
- ref: I,
69
- className: C,
70
- containerClassName: S,
71
- inputClassName: V,
72
- labelClassName: N,
73
- label: l,
74
- id: k,
75
- disabled: F,
76
- helperText: p,
77
- status: e,
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: z,
81
- hideClearButton: B = !1,
82
- "aria-invalid": D,
83
- onChange: h,
84
- placeholder: j,
85
- ...a
82
+ onClear: D,
83
+ hideClearButton: $ = !1,
84
+ "aria-invalid": E,
85
+ onChange: v,
86
+ placeholder: H,
87
+ ...u
86
88
  }) => {
87
- const b = U({
89
+ const w = Q({
88
90
  consumerName: "BaseInput",
89
- mergeWith: { disabled: F }
90
- }), { t: E } = Z(), t = K(null), L = Q(), c = k || `input-${L}`, A = D ?? (e === "error" ? !0 : void 0), i = a.value !== void 0, [H, f] = X(
91
- a.defaultValue?.toString() || ""
92
- ), M = Y(
93
- (s) => {
94
- i || f(s.target.value), h?.(s);
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
- [i, h]
97
- ), O = i ? !!a.value && a.value.toString().length > 0 : H.length > 0, { inputPlaceholder: T, labelStaysFloatedWithPlaceholder: W } = G({
98
- label: l,
99
- placeholder: j
100
- }), m = O && !b && !B, g = `${c}-helper`, v = !!p, $ = () => {
101
- if (!t.current) return;
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(t.current, ""), i || f("");
106
- const w = new Event("input", { bubbles: !0 });
107
- t.current.dispatchEvent(w), t.current.focus(), z?.();
108
- }, q = J(I, t);
109
- return /* @__PURE__ */ d("div", { className: C, children: [
110
- /* @__PURE__ */ d(
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: n(te({ status: e }), S),
114
- onPointerDown: (s) => {
115
- if (s.target.closest("input, button, a")) return;
116
- const o = t.current;
117
- if (!o) return;
118
- const x = o.value.length > 0 ? o.value.length : 0;
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
- o.setSelectionRange(x, x);
123
+ l.setSelectionRange(S, S);
122
124
  } catch {
123
125
  }
124
- o.focus();
126
+ l.focus();
125
127
  });
126
128
  },
127
129
  children: [
128
130
  R,
129
- /* @__PURE__ */ r(
131
+ /* @__PURE__ */ e(
130
132
  "input",
131
133
  {
132
- ref: q,
133
- id: c,
134
- disabled: b,
135
- placeholder: T,
136
- "aria-invalid": A,
137
- "aria-describedby": v ? g : void 0,
138
- className: n(
139
- re,
140
- l && "pt-12 body-2",
141
- V
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: M,
144
- ...a
145
+ onChange: T,
146
+ ...u
145
147
  }
146
148
  ),
147
- l && /* @__PURE__ */ r(
149
+ i && /* @__PURE__ */ e(
148
150
  "label",
149
151
  {
150
- htmlFor: c,
151
- className: n(
152
- se({
153
- status: e,
154
- floated: W
152
+ htmlFor: m,
153
+ className: s(
154
+ ce({
155
+ status: d,
156
+ floated: U
155
157
  }),
156
- N
158
+ F
157
159
  ),
158
- children: l
160
+ children: i
159
161
  }
160
162
  ),
161
- m && /* @__PURE__ */ r(
162
- _,
163
+ I && /* @__PURE__ */ e(
164
+ se,
163
165
  {
164
166
  iconType: "filled",
165
- icon: y,
167
+ icon: k,
166
168
  size: 20,
167
- onClick: $,
168
- "aria-label": E("components.baseInput.clearInputAriaLabel")
169
+ onClick: J,
170
+ "aria-label": L("components.baseInput.clearInputAriaLabel")
169
171
  }
170
172
  ),
171
- !m && P
173
+ !I && P
172
174
  ]
173
175
  }
174
176
  ),
175
- v && /* @__PURE__ */ d(
177
+ (h || C) && /* @__PURE__ */ f(
176
178
  "div",
177
179
  {
178
- id: g,
179
- className: oe({ status: e }),
180
- role: e === "error" ? "alert" : void 0,
180
+ className: s(
181
+ "mt-8 flex items-start gap-8",
182
+ h ? "justify-between" : "justify-end"
183
+ ),
181
184
  children: [
182
- e === "error" && /* @__PURE__ */ r(y, { size: 16, className: "text-error" }),
183
- e === "success" && /* @__PURE__ */ r(ee, { size: 16, className: "text-success" }),
184
- /* @__PURE__ */ r("span", { children: p })
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
- be as BaseInput
217
+ Ie as BaseInput
192
218
  };