@ledgerhq/lumen-ui-react 0.1.44 → 0.1.45

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 (58) hide show
  1. package/dist/index.js +111 -107
  2. package/dist/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
  3. package/dist/lib/Components/AmountDisplay/AmountDisplay.js +1 -0
  4. package/dist/lib/Components/AmountInput/AmountInput.d.ts +1 -1
  5. package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  6. package/dist/lib/Components/AmountInput/AmountInput.js +34 -32
  7. package/dist/lib/Components/AmountInput/types.d.ts +8 -0
  8. package/dist/lib/Components/AmountInput/types.d.ts.map +1 -1
  9. package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.d.ts +1 -0
  10. package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.d.ts.map +1 -1
  11. package/dist/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.js +9 -8
  12. package/dist/lib/Components/BaseInput/BaseInput.js +13 -13
  13. package/dist/lib/Components/Button/Button.js +9 -9
  14. package/dist/lib/Components/Card/Card.js +14 -14
  15. package/dist/lib/Components/DataTable/DataTable.js +6 -6
  16. package/dist/lib/Components/Divider/Divider.js +4 -4
  17. package/dist/lib/Components/DotIcon/DotIcon.js +5 -5
  18. package/dist/lib/Components/Icon/Icon.js +4 -4
  19. package/dist/lib/Components/Link/Link.js +6 -6
  20. package/dist/lib/Components/MediaImage/MediaImage.js +6 -6
  21. package/dist/lib/Components/Menu/Menu.d.ts +8 -3
  22. package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
  23. package/dist/lib/Components/Menu/Menu.js +40 -33
  24. package/dist/lib/Components/Menu/types.d.ts +6 -5
  25. package/dist/lib/Components/Menu/types.d.ts.map +1 -1
  26. package/dist/lib/Components/NavBar/NavBar.js +9 -9
  27. package/dist/lib/Components/Pagination/Pagination.js +10 -10
  28. package/dist/lib/Components/Popover/Popover.js +10 -10
  29. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +8 -3
  30. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  31. package/dist/lib/Components/SegmentedControl/SegmentedControl.js +41 -32
  32. package/dist/lib/Components/SegmentedControl/types.d.ts +6 -5
  33. package/dist/lib/Components/SegmentedControl/types.d.ts.map +1 -1
  34. package/dist/lib/Components/Select/Select.d.ts +19 -5
  35. package/dist/lib/Components/Select/Select.d.ts.map +1 -1
  36. package/dist/lib/Components/Select/Select.js +127 -104
  37. package/dist/lib/Components/Select/index.d.ts +1 -1
  38. package/dist/lib/Components/Select/index.d.ts.map +1 -1
  39. package/dist/lib/Components/Select/types.d.ts +20 -19
  40. package/dist/lib/Components/Select/types.d.ts.map +1 -1
  41. package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts +9 -9
  42. package/dist/lib/Components/Select/useSelectItems/useSelectItems.d.ts.map +1 -1
  43. package/dist/lib/Components/Select/utils/groupItems.d.ts +2 -2
  44. package/dist/lib/Components/Select/utils/groupItems.d.ts.map +1 -1
  45. package/dist/lib/Components/SideBar/SideBar.d.ts +11 -3
  46. package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
  47. package/dist/lib/Components/SideBar/SideBar.js +61 -51
  48. package/dist/lib/Components/SideBar/index.d.ts +2 -2
  49. package/dist/lib/Components/SideBar/index.d.ts.map +1 -1
  50. package/dist/lib/Components/SideBar/types.d.ts +7 -6
  51. package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
  52. package/dist/lib/Components/Table/Table.js +49 -49
  53. package/dist/lib/Components/Table/utils/useThrottledScrollBottom.js +5 -5
  54. package/dist/lib/Components/TileButton/TileButton.js +6 -6
  55. package/dist/lib/Components/Tooltip/Tooltip.js +4 -4
  56. package/dist/libs/utils-shared/dist/index.js +138 -143
  57. package/dist/package.json +1 -1
  58. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -4,8 +4,8 @@ import { AmountInput as i } from "./lib/Components/AmountInput/AmountInput.js";
4
4
  import { AmountDisplay as m } from "./lib/Components/AmountDisplay/AmountDisplay.js";
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
- import { BaseInput as u } from "./lib/Components/BaseInput/BaseInput.js";
8
- import { Button as C } from "./lib/Components/Button/Button.js";
7
+ import { BaseInput as c } from "./lib/Components/BaseInput/BaseInput.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
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
11
  import { CardButton as y } from "./lib/Components/CardButton/CardButton.js";
@@ -19,7 +19,7 @@ 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 le } 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 ue, mediaImageDotIconSizeMap as Se, spotDotIconSizeMap as Ce } 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 { DotSymbol as Be, mediaImageDotSizeMap as be, spotDotSizeMap as se } from "./lib/Components/DotSymbol/DotSymbol.js";
25
25
  import { IconButton as Me } from "./lib/Components/IconButton/IconButton.js";
@@ -31,30 +31,30 @@ import { MediaButton as _e } from "./lib/Components/MediaButton/MediaButton.js";
31
31
  import { MediaCard as qe, MediaCardTitle as Je } from "./lib/Components/MediaCard/MediaCard.js";
32
32
  import { MediaImage as Qe } from "./lib/Components/MediaImage/MediaImage.js";
33
33
  import { MediaTag as We } from "./lib/Components/MediaTag/MediaTag.js";
34
- import { Menu as Ye, MenuCheckboxItem as Ze, MenuContent as $e, MenuGroup as eo, MenuItem as oo, MenuLabel as to, MenuRadioGroup as ro, MenuRadioItem as ao, MenuSeparator as no, MenuSub as io, MenuSubContent as po, MenuSubTrigger as mo, MenuTrigger as lo } from "./lib/Components/Menu/Menu.js";
35
- import { NavBar as To, NavBarBackButton as fo, NavBarCoinCapsule as uo, NavBarDescription as So, NavBarLeading as Co, NavBarTitle as co, NavBarTrailing as go } from "./lib/Components/NavBar/NavBar.js";
36
- import { Popover as Bo, PopoverContent as bo, PopoverTrigger as so, createPopoverHandle as Do } from "./lib/Components/Popover/Popover.js";
37
- import { PageIndicator as Lo } from "./lib/Components/PageIndicator/PageIndicator.js";
38
- import { Pagination as vo } from "./lib/Components/Pagination/Pagination.js";
39
- import { SearchInput as wo } from "./lib/Components/SearchInput/SearchInput.js";
40
- import { SegmentedControl as yo, SegmentedControlButton as Ho } from "./lib/Components/SegmentedControl/SegmentedControl.js";
41
- import { Select as No, SelectContent as ko, SelectEmptyState as zo, SelectItem as Go, SelectItemContent as Eo, SelectItemDescription as Fo, SelectItemText as Oo, SelectList as Vo, SelectSearch as _o, SelectSeparator as jo, SelectTrigger as qo } from "./lib/Components/Select/Select.js";
42
- import { SideBar as Ko, SideBarCollapseToggle as Qo, SideBarItem as Uo, SideBarLeading as Wo, SideBarTrailing as Xo } from "./lib/Components/SideBar/SideBar.js";
43
- import { Skeleton as Zo } from "./lib/Components/Skeleton/Skeleton.js";
44
- import { Spinner as et } from "./lib/Components/Spinner/Spinner.js";
45
- import { Spot as tt } from "./lib/Components/Spot/Spot.js";
46
- import { Stepper as at } from "./lib/Components/Stepper/Stepper.js";
47
- import { Subheader as it, SubheaderCount as pt, SubheaderDescription as mt, SubheaderInfo as lt, SubheaderRow as dt, SubheaderShowMore as xt, SubheaderTitle as Tt } from "./lib/Components/Subheader/Subheader.js";
48
- import { Switch as ut } from "./lib/Components/Switch/Switch.js";
49
- import { Table as Ct, TableActionBar as ct, TableActionBarLeading as gt, TableActionBarTrailing as It, TableBody as Bt, TableCell as bt, TableCellContent as st, TableGroupHeaderRow as Dt, TableHeader as Mt, TableHeaderCell as Lt, TableHeaderRow as ht, TableInfoIcon as vt, TableLoadingRow as Rt, TableRoot as wt, TableRow as At, TableSortButton as yt } from "./lib/Components/Table/Table.js";
50
- import { Tag as Pt } from "./lib/Components/Tag/Tag.js";
51
- import { TextInput as kt } from "./lib/Components/TextInput/TextInput.js";
52
- import { Tile as Gt, TileContent as Et, TileDescription as Ft, TileSecondaryAction as Ot, TileTitle as Vt, TileTrailingContent as _t } from "./lib/Components/Tile/Tile.js";
53
- import { TileButton as qt } from "./lib/Components/TileButton/TileButton.js";
54
- import { Tooltip as Kt, TooltipContent as Qt, TooltipProvider as Ut, TooltipTrigger as Wt } from "./lib/Components/Tooltip/Tooltip.js";
55
- import { Trend as Yt } from "./lib/Components/Trend/Trend.js";
56
- import { ThemeProvider as $t, useTheme as er } from "./lib/Components/ThemeProvider/ThemeProvider.js";
57
- import { COLOR_SCHEMES as tr } from "./lib/Components/ThemeProvider/ThemeProvider.types.js";
34
+ import { Menu as Ye, MenuCheckboxItem as Ze, MenuContent as $e, MenuGroup as eo, MenuItem as oo, MenuLabel as to, MenuRadioGroup as ro, MenuRadioItem as ao, MenuSeparator as no, MenuSub as io, MenuSubContent as po, MenuSubTrigger as mo, MenuTrigger as lo, createMenuRadioGroup as xo } from "./lib/Components/Menu/Menu.js";
35
+ import { NavBar as fo, NavBarBackButton as co, NavBarCoinCapsule as So, NavBarDescription as uo, NavBarLeading as Co, NavBarTitle as go, NavBarTrailing as Io } from "./lib/Components/NavBar/NavBar.js";
36
+ import { Popover as bo, PopoverContent as so, PopoverTrigger as Do, createPopoverHandle as Mo } from "./lib/Components/Popover/Popover.js";
37
+ import { PageIndicator as ho } from "./lib/Components/PageIndicator/PageIndicator.js";
38
+ import { Pagination as Ro } from "./lib/Components/Pagination/Pagination.js";
39
+ import { SearchInput as Ao } from "./lib/Components/SearchInput/SearchInput.js";
40
+ import { SegmentedControl as Ho, SegmentedControlButton as Po, createSegmentedControl as No } from "./lib/Components/SegmentedControl/SegmentedControl.js";
41
+ import { Select as zo, SelectContent as Go, SelectEmptyState as Eo, SelectItem as Fo, SelectItemContent as Oo, SelectItemDescription as Vo, SelectItemText as _o, SelectList as jo, SelectSearch as qo, SelectSeparator as Jo, SelectTrigger as Ko, createSelect as Qo } from "./lib/Components/Select/Select.js";
42
+ import { SideBar as Wo, SideBarCollapseToggle as Xo, SideBarItem as Yo, SideBarLeading as Zo, SideBarTrailing as $o, createSideBar as et } from "./lib/Components/SideBar/SideBar.js";
43
+ import { Skeleton as tt } from "./lib/Components/Skeleton/Skeleton.js";
44
+ import { Spinner as at } from "./lib/Components/Spinner/Spinner.js";
45
+ import { Spot as it } from "./lib/Components/Spot/Spot.js";
46
+ import { Stepper as mt } from "./lib/Components/Stepper/Stepper.js";
47
+ import { Subheader as dt, SubheaderCount as xt, SubheaderDescription as Tt, SubheaderInfo as ft, SubheaderRow as ct, SubheaderShowMore as St, SubheaderTitle as ut } from "./lib/Components/Subheader/Subheader.js";
48
+ import { Switch as gt } from "./lib/Components/Switch/Switch.js";
49
+ import { Table as Bt, TableActionBar as bt, TableActionBarLeading as st, TableActionBarTrailing as Dt, TableBody as Mt, TableCell as Lt, TableCellContent as ht, TableGroupHeaderRow as vt, TableHeader as Rt, TableHeaderCell as wt, TableHeaderRow as At, TableInfoIcon as yt, TableLoadingRow as Ht, TableRoot as Pt, TableRow as Nt, TableSortButton as kt } from "./lib/Components/Table/Table.js";
50
+ import { Tag as Gt } from "./lib/Components/Tag/Tag.js";
51
+ import { TextInput as Ft } from "./lib/Components/TextInput/TextInput.js";
52
+ import { Tile as Vt, TileContent as _t, TileDescription as jt, TileSecondaryAction as qt, TileTitle as Jt, TileTrailingContent as Kt } from "./lib/Components/Tile/Tile.js";
53
+ import { TileButton as Ut } from "./lib/Components/TileButton/TileButton.js";
54
+ import { Tooltip as Xt, TooltipContent as Yt, TooltipProvider as Zt, TooltipTrigger as $t } from "./lib/Components/Tooltip/Tooltip.js";
55
+ import { Trend as or } from "./lib/Components/Trend/Trend.js";
56
+ import { ThemeProvider as rr, useTheme as ar } from "./lib/Components/ThemeProvider/ThemeProvider.js";
57
+ import { COLOR_SCHEMES as ir } from "./lib/Components/ThemeProvider/ThemeProvider.types.js";
58
58
  export {
59
59
  a as AddressInput,
60
60
  m as AmountDisplay,
@@ -62,9 +62,9 @@ export {
62
62
  d as Avatar,
63
63
  T as Banner,
64
64
  g as BaseButton,
65
- u as BaseInput,
66
- C as Button,
67
- tr as COLOR_SCHEMES,
65
+ c as BaseInput,
66
+ u as Button,
67
+ ir as COLOR_SCHEMES,
68
68
  B as Card,
69
69
  y as CardButton,
70
70
  b as CardContent,
@@ -134,86 +134,90 @@ export {
134
134
  po as MenuSubContent,
135
135
  mo as MenuSubTrigger,
136
136
  lo as MenuTrigger,
137
- To as NavBar,
138
- fo as NavBarBackButton,
139
- uo as NavBarCoinCapsule,
140
- So as NavBarDescription,
137
+ fo as NavBar,
138
+ co as NavBarBackButton,
139
+ So as NavBarCoinCapsule,
140
+ uo as NavBarDescription,
141
141
  Co as NavBarLeading,
142
- co as NavBarTitle,
143
- go as NavBarTrailing,
144
- Lo as PageIndicator,
145
- vo as Pagination,
146
- Bo as Popover,
147
- bo as PopoverContent,
148
- so as PopoverTrigger,
149
- wo as SearchInput,
150
- yo as SegmentedControl,
151
- Ho as SegmentedControlButton,
152
- No as Select,
153
- ko as SelectContent,
154
- zo as SelectEmptyState,
155
- Go as SelectItem,
156
- Eo as SelectItemContent,
157
- Fo as SelectItemDescription,
158
- Oo as SelectItemText,
159
- Vo as SelectList,
160
- _o as SelectSearch,
161
- jo as SelectSeparator,
162
- qo as SelectTrigger,
163
- Ko as SideBar,
164
- Qo as SideBarCollapseToggle,
165
- Uo as SideBarItem,
166
- Wo as SideBarLeading,
167
- Xo as SideBarTrailing,
168
- Zo as Skeleton,
169
- et as Spinner,
170
- tt as Spot,
171
- at as Stepper,
172
- it as Subheader,
173
- pt as SubheaderCount,
174
- mt as SubheaderDescription,
175
- lt as SubheaderInfo,
176
- dt as SubheaderRow,
177
- xt as SubheaderShowMore,
178
- Tt as SubheaderTitle,
179
- ut as Switch,
180
- Ct as Table,
181
- ct as TableActionBar,
182
- gt as TableActionBarLeading,
183
- It as TableActionBarTrailing,
184
- Bt as TableBody,
185
- bt as TableCell,
186
- st as TableCellContent,
187
- Dt as TableGroupHeaderRow,
188
- Mt as TableHeader,
189
- Lt as TableHeaderCell,
190
- ht as TableHeaderRow,
191
- vt as TableInfoIcon,
192
- Rt as TableLoadingRow,
193
- wt as TableRoot,
194
- At as TableRow,
195
- yt as TableSortButton,
196
- Pt as Tag,
197
- kt as TextInput,
198
- $t as ThemeProvider,
199
- Gt as Tile,
200
- qt as TileButton,
201
- Et as TileContent,
202
- Ft as TileDescription,
203
- Ot as TileSecondaryAction,
204
- Vt as TileTitle,
205
- _t as TileTrailingContent,
206
- Kt as Tooltip,
207
- Qt as TooltipContent,
208
- Ut as TooltipProvider,
209
- Wt as TooltipTrigger,
210
- Yt as Trend,
211
- Do as createPopoverHandle,
212
- ue as dotIconSizeMap,
142
+ go as NavBarTitle,
143
+ Io as NavBarTrailing,
144
+ ho as PageIndicator,
145
+ Ro as Pagination,
146
+ bo as Popover,
147
+ so as PopoverContent,
148
+ Do as PopoverTrigger,
149
+ Ao as SearchInput,
150
+ Ho as SegmentedControl,
151
+ Po as SegmentedControlButton,
152
+ zo as Select,
153
+ Go as SelectContent,
154
+ Eo as SelectEmptyState,
155
+ Fo as SelectItem,
156
+ Oo as SelectItemContent,
157
+ Vo as SelectItemDescription,
158
+ _o as SelectItemText,
159
+ jo as SelectList,
160
+ qo as SelectSearch,
161
+ Jo as SelectSeparator,
162
+ Ko as SelectTrigger,
163
+ Wo as SideBar,
164
+ Xo as SideBarCollapseToggle,
165
+ Yo as SideBarItem,
166
+ Zo as SideBarLeading,
167
+ $o as SideBarTrailing,
168
+ tt as Skeleton,
169
+ at as Spinner,
170
+ it as Spot,
171
+ mt as Stepper,
172
+ dt as Subheader,
173
+ xt as SubheaderCount,
174
+ Tt as SubheaderDescription,
175
+ ft as SubheaderInfo,
176
+ ct as SubheaderRow,
177
+ St as SubheaderShowMore,
178
+ ut as SubheaderTitle,
179
+ gt as Switch,
180
+ Bt as Table,
181
+ bt as TableActionBar,
182
+ st as TableActionBarLeading,
183
+ Dt as TableActionBarTrailing,
184
+ Mt as TableBody,
185
+ Lt as TableCell,
186
+ ht as TableCellContent,
187
+ vt as TableGroupHeaderRow,
188
+ Rt as TableHeader,
189
+ wt as TableHeaderCell,
190
+ At as TableHeaderRow,
191
+ yt as TableInfoIcon,
192
+ Ht as TableLoadingRow,
193
+ Pt as TableRoot,
194
+ Nt as TableRow,
195
+ kt as TableSortButton,
196
+ Gt as Tag,
197
+ Ft as TextInput,
198
+ rr as ThemeProvider,
199
+ Vt as Tile,
200
+ Ut as TileButton,
201
+ _t as TileContent,
202
+ jt as TileDescription,
203
+ qt as TileSecondaryAction,
204
+ Jt as TileTitle,
205
+ Kt as TileTrailingContent,
206
+ Xt as Tooltip,
207
+ Yt as TooltipContent,
208
+ Zt as TooltipProvider,
209
+ $t as TooltipTrigger,
210
+ or as Trend,
211
+ xo as createMenuRadioGroup,
212
+ Mo as createPopoverHandle,
213
+ No as createSegmentedControl,
214
+ Qo as createSelect,
215
+ et as createSideBar,
216
+ ce as dotIconSizeMap,
213
217
  Se as mediaImageDotIconSizeMap,
214
218
  be as mediaImageDotSizeMap,
215
- Ce as spotDotIconSizeMap,
219
+ ue as spotDotIconSizeMap,
216
220
  se as spotDotSizeMap,
217
221
  q as useLumenDataTable,
218
- er as useTheme
222
+ ar as useTheme
219
223
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AmountDisplay.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountDisplay/AmountDisplay.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAMnB,MAAM,SAAS,CAAC;AAqHjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,SAAS,EACT,MAAc,EACd,OAAe,EACf,OAAc,EACd,IAAW,EACX,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,2CA6DpB"}
1
+ {"version":3,"file":"AmountDisplay.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountDisplay/AmountDisplay.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAMnB,MAAM,SAAS,CAAC;AAqHjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,SAAS,EACT,MAAc,EACd,OAAe,EACf,OAAc,EACd,IAAW,EACX,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,2CA8DpB"}
@@ -129,6 +129,7 @@ function A({
129
129
  "relative inline-flex",
130
130
  f
131
131
  ),
132
+ role: "img",
132
133
  "aria-label": x,
133
134
  "aria-busy": t,
134
135
  ...g,
@@ -4,5 +4,5 @@ import { AmountInputProps } from './types';
4
4
  * This is a controlled component - both `value` and `onChange` props are required.
5
5
  * The currency text can be positioned either on the left or right side of the input.
6
6
  */
7
- export declare const AmountInput: ({ ref, className, size, align, currencyText, currencyPosition, disabled: disabledProp, maxIntegerLength, maxDecimalLength, allowDecimals, thousandsSeparator, value, onChange, ...props }: AmountInputProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const AmountInput: ({ ref, className, size, align, currencyText, currencyPosition, disabled: disabledProp, maxIntegerLength, maxDecimalLength, allowDecimals, thousandsSeparator, decimalSeparator, value, onChange, ...props }: AmountInputProps) => import("react/jsx-runtime").JSX.Element;
8
8
  //# sourceMappingURL=AmountInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountInput/AmountInput.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,SAAS,CAAC;AA0FjE;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,2LAezB,gBAAgB,4CA+ElB,CAAC"}
1
+ {"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountInput/AmountInput.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,SAAS,CAAC;AA0FjE;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,6MAgBzB,gBAAgB,4CAgFlB,CAAC"}
@@ -1,10 +1,10 @@
1
- import { jsxs as N, jsx as a } from "react/jsx-runtime";
2
- import { useDisabledContext as R, useMergedRef as k, getFontSize as z, cn as p } from "../../../libs/utils-shared/dist/index.js";
1
+ import { jsxs as R, jsx as a } from "react/jsx-runtime";
2
+ import { useDisabledContext as k, useMergedRef as z, getFontSize as M, cn as p } from "../../../libs/utils-shared/dist/index.js";
3
3
  import { cva as i } from "class-variance-authority";
4
- import { useMemo as M } from "react";
5
- import { useAmountInputValue as D } from "./useAmountInputValue/useAmountInputValue.js";
6
- import { useAutoWidthInput as F } from "./useAutoWidthInput/useAutoWidthInput.js";
7
- const W = i(
4
+ import { useMemo as D } from "react";
5
+ import { useAmountInputValue as F } from "./useAmountInputValue/useAmountInputValue.js";
6
+ import { useAutoWidthInput as W } from "./useAutoWidthInput/useAutoWidthInput.js";
7
+ const q = i(
8
8
  [
9
9
  "bg-transparent caret-active outline-hidden transition-colors",
10
10
  "text-base placeholder:text-muted-subtle",
@@ -28,7 +28,7 @@ const W = i(
28
28
  isChanging: !1
29
29
  }
30
30
  }
31
- ), q = i(
31
+ ), E = i(
32
32
  [
33
33
  "cursor-text text-base",
34
34
  "group-has-[input:placeholder-shown]:text-muted-subtle",
@@ -46,7 +46,7 @@ const W = i(
46
46
  size: "md"
47
47
  }
48
48
  }
49
- ), E = i("invisible absolute whitespace-pre", {
49
+ ), O = i("invisible absolute whitespace-pre", {
50
50
  variants: {
51
51
  size: {
52
52
  md: "heading-0-semi-bold",
@@ -56,7 +56,7 @@ const W = i(
56
56
  defaultVariants: {
57
57
  size: "md"
58
58
  }
59
- }), J = i(
59
+ }), B = i(
60
60
  "group relative flex w-full items-center overflow-visible transition-transform",
61
61
  {
62
62
  variants: {
@@ -70,7 +70,7 @@ const W = i(
70
70
  align: "center"
71
71
  }
72
72
  }
73
- ), m = ({ size: r, style: o, children: e }) => /* @__PURE__ */ a("span", { className: p(q({ size: r }), "shrink-0"), style: o, children: e }), Q = ({
73
+ ), m = ({ size: r, style: o, children: e }) => /* @__PURE__ */ a("span", { className: p(E({ size: r }), "shrink-0"), style: o, children: e }), U = ({
74
74
  ref: r,
75
75
  className: o,
76
76
  size: e = "md",
@@ -82,34 +82,36 @@ const W = i(
82
82
  maxDecimalLength: g = 9,
83
83
  allowDecimals: b = !0,
84
84
  thousandsSeparator: v = !0,
85
- value: x,
86
- onChange: w,
87
- ...y
85
+ decimalSeparator: x = ".",
86
+ value: w,
87
+ onChange: y,
88
+ ...S
88
89
  }) => {
89
- const S = R({
90
+ const C = k({
90
91
  consumerName: "AmountInput",
91
92
  mergeWith: { disabled: f }
92
- }), { inputValue: n, isChanging: C, setIsChanging: A, handleChange: V } = D({
93
- value: x,
94
- onChange: w,
93
+ }), { inputValue: n, isChanging: A, setIsChanging: V, handleChange: j } = F({
94
+ value: w,
95
+ onChange: y,
95
96
  formatOptions: {
96
97
  allowDecimals: b,
97
98
  thousandsSeparator: v,
98
99
  maxIntegerLength: h,
99
- maxDecimalLength: g
100
+ maxDecimalLength: g,
101
+ decimalSeparator: x
100
102
  }
101
- }), { spanRef: j, inputRef: d } = F({
103
+ }), { spanRef: I, inputRef: d } = W({
102
104
  inputValue: n,
103
105
  currencyText: t,
104
106
  size: e
105
- }), I = k(r, d), s = { fontSize: M(
106
- () => z(n, e) + "px",
107
+ }), N = z(r, d), s = { fontSize: D(
108
+ () => M(n, e) + "px",
107
109
  [n, e]
108
110
  ), letterSpacing: "normal" };
109
- return /* @__PURE__ */ N(
111
+ return /* @__PURE__ */ R(
110
112
  "div",
111
113
  {
112
- className: J({ align: c }),
114
+ className: B({ align: c }),
113
115
  onPointerDown: () => {
114
116
  const u = d.current;
115
117
  u && window.requestAnimationFrame(() => {
@@ -121,8 +123,8 @@ const W = i(
121
123
  /* @__PURE__ */ a(
122
124
  "span",
123
125
  {
124
- ref: j,
125
- className: E({ size: e }),
126
+ ref: I,
127
+ className: O({ size: e }),
126
128
  "aria-hidden": "true",
127
129
  style: s,
128
130
  children: n
@@ -131,15 +133,15 @@ const W = i(
131
133
  /* @__PURE__ */ a(
132
134
  "input",
133
135
  {
134
- ref: I,
136
+ ref: N,
135
137
  type: "text",
136
138
  inputMode: "decimal",
137
- disabled: S,
139
+ disabled: C,
138
140
  value: n,
139
- onChange: V,
140
- onAnimationEnd: () => A(!1),
141
- className: p(W({ size: e, isChanging: C }), o),
142
- ...y,
141
+ onChange: j,
142
+ onAnimationEnd: () => V(!1),
143
+ className: p(q({ size: e, isChanging: A }), o),
144
+ ...S,
143
145
  style: s
144
146
  }
145
147
  ),
@@ -149,5 +151,5 @@ const W = i(
149
151
  );
150
152
  };
151
153
  export {
152
- Q as AmountInput
154
+ U as AmountInput
153
155
  };
@@ -55,5 +55,13 @@ export type AmountInputProps = {
55
55
  * @default true
56
56
  */
57
57
  thousandsSeparator?: boolean;
58
+ /**
59
+ * Character used to display the decimal separator (e.g. `1 234,5` vs `1 234.5`).
60
+ * Typing always accepts both `,` and `.` regardless of this value, so it stays
61
+ * compatible with any locale keyboard. The value returned by `onChange` uses
62
+ * this separator.
63
+ * @default '.'
64
+ */
65
+ decimalSeparator?: '.' | ',';
58
66
  } & Omit<ComponentPropsWithRef<'input'>, 'size' | 'prefix' | 'value' | 'onChange'>;
59
67
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEhE,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1C,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACzD;;;OAGG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,GAAG,IAAI,CACN,qBAAqB,CAAC,OAAO,CAAC,EAC9B,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CACzC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEhE,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1C,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACzD;;;OAGG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CAC9B,GAAG,IAAI,CACN,qBAAqB,CAAC,OAAO,CAAC,EAC9B,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CACzC,CAAC"}
@@ -4,6 +4,7 @@ type FormatOptions = {
4
4
  thousandsSeparator: boolean;
5
5
  maxIntegerLength: number;
6
6
  maxDecimalLength: number;
7
+ decimalSeparator: '.' | ',';
7
8
  };
8
9
  type UseAmountInputValueArgs = {
9
10
  value: string | number;
@@ -1 +1 @@
1
- {"version":3,"file":"useAmountInputValue.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGzC,KAAK,aAAa,GAAG;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7D,YAAY,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,qCAIjC,uBAAuB,KAAG,yBAiC5B,CAAC"}
1
+ {"version":3,"file":"useAmountInputValue.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/AmountInput/useAmountInputValue/useAmountInputValue.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGzC,KAAK,aAAa,GAAG;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,GAAG,GAAG,GAAG,CAAC;CAC7B,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7D,YAAY,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,qCAIjC,uBAAuB,KAAG,yBAkC5B,CAAC"}
@@ -1,26 +1,27 @@
1
1
  import { textFormatter as m } from "../../../../libs/utils-shared/dist/index.js";
2
- import { useCallback as f, useState as g, useRef as i, useEffect as d } from "react";
2
+ import { useCallback as d, useState as g, useRef as i, useEffect as f } from "react";
3
3
  const I = ({
4
4
  value: r,
5
5
  onChange: o,
6
6
  formatOptions: t
7
7
  }) => {
8
- const a = f(
8
+ const a = d(
9
9
  (e) => m(String(e), t),
10
10
  // eslint-disable-next-line react-hooks/exhaustive-deps
11
11
  [
12
12
  t.allowDecimals,
13
13
  t.thousandsSeparator,
14
14
  t.maxIntegerLength,
15
- t.maxDecimalLength
15
+ t.maxDecimalLength,
16
+ t.decimalSeparator
16
17
  ]
17
- ), [s, c] = g(() => a(r)), [h, l] = g(!1), u = i(s);
18
- return d(() => {
18
+ ), [c, s] = g(() => a(r)), [h, l] = g(!1), u = i(c);
19
+ return f(() => {
19
20
  const e = a(r);
20
- c(e), u.current = e;
21
- }, [r, a]), { inputValue: s, isChanging: h, setIsChanging: l, handleChange: (e) => {
21
+ s(e), u.current = e;
22
+ }, [r, a]), { inputValue: c, isChanging: h, setIsChanging: l, handleChange: (e) => {
22
23
  const n = a(e.target.value);
23
- c(n), o({ ...e, target: { ...e.target, value: n } }), n !== u.current && l(!0), u.current = n;
24
+ s(n), o({ ...e, target: { ...e.target, value: n } }), n !== u.current && l(!0), u.current = n;
24
25
  } };
25
26
  };
26
27
  export {
@@ -37,7 +37,7 @@ const te = u(
37
37
  "group-has-disabled:text-disabled",
38
38
  "peer-focus:top-6 peer-focus:translate-y-0 peer-focus:body-4",
39
39
  "w-[calc(100%-var(--size-56))] truncate"
40
- ), oe = u(ae, {
40
+ ), se = u(ae, {
41
41
  variants: {
42
42
  status: {
43
43
  default: "",
@@ -53,7 +53,7 @@ const te = u(
53
53
  status: "default",
54
54
  floated: !1
55
55
  }
56
- }), se = u("mt-8 flex items-center gap-2 body-3", {
56
+ }), oe = u("mt-8 flex items-center gap-2 body-3", {
57
57
  variants: {
58
58
  status: {
59
59
  default: "text-muted",
@@ -90,8 +90,8 @@ const te = u(
90
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
91
  a.defaultValue?.toString() || ""
92
92
  ), M = Y(
93
- (o) => {
94
- i || f(o.target.value), h?.(o);
93
+ (s) => {
94
+ i || f(s.target.value), h?.(s);
95
95
  },
96
96
  [i, h]
97
97
  ), O = i ? !!a.value && a.value.toString().length > 0 : H.length > 0, { inputPlaceholder: T, labelStaysFloatedWithPlaceholder: W } = G({
@@ -111,17 +111,17 @@ const te = u(
111
111
  "div",
112
112
  {
113
113
  className: n(te({ status: e }), S),
114
- onPointerDown: (o) => {
115
- if (o.target.closest("input, button, a")) return;
116
- const s = t.current;
117
- if (!s) return;
118
- const x = s.value.length > 0 ? s.value.length : 0;
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;
119
119
  window.requestAnimationFrame(() => {
120
120
  try {
121
- s.setSelectionRange(x, x);
121
+ o.setSelectionRange(x, x);
122
122
  } catch {
123
123
  }
124
- s.focus();
124
+ o.focus();
125
125
  });
126
126
  },
127
127
  children: [
@@ -149,7 +149,7 @@ const te = u(
149
149
  {
150
150
  htmlFor: c,
151
151
  className: n(
152
- oe({
152
+ se({
153
153
  status: e,
154
154
  floated: W
155
155
  }),
@@ -176,7 +176,7 @@ const te = u(
176
176
  "div",
177
177
  {
178
178
  id: g,
179
- className: se({ status: e }),
179
+ className: oe({ status: e }),
180
180
  role: e === "error" ? "alert" : void 0,
181
181
  children: [
182
182
  e === "error" && /* @__PURE__ */ r(y, { size: 16, className: "text-error" }),
@@ -1,8 +1,8 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { cn as n } from "../../../libs/utils-shared/dist/index.js";
3
- import { cva as d } from "class-variance-authority";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { cn as d } from "../../../libs/utils-shared/dist/index.js";
3
+ import { cva as e } from "class-variance-authority";
4
4
  import { BaseButton as b } from "./BaseButton.js";
5
- const l = d("", {
5
+ const l = e("", {
6
6
  variants: {
7
7
  size: {
8
8
  sm: "px-16 py-10 body-2-semi-bold",
@@ -15,22 +15,22 @@ const l = d("", {
15
15
  }
16
16
  }), x = ({
17
17
  ref: t,
18
- className: m,
19
- loading: s,
18
+ className: s,
19
+ loading: m,
20
20
  disabled: r,
21
21
  children: a,
22
22
  size: o,
23
23
  icon: i,
24
24
  ...p
25
- }) => /* @__PURE__ */ e(
25
+ }) => /* @__PURE__ */ n(
26
26
  b,
27
27
  {
28
28
  ref: t,
29
29
  size: o,
30
30
  disabled: r,
31
31
  icon: i,
32
- loading: s,
33
- className: n(l({ size: o }), "gap-8", m),
32
+ loading: m,
33
+ className: d(l({ size: o }), "gap-8", s),
34
34
  ...p,
35
35
  children: a
36
36
  }