@ledgerhq/lumen-ui-react 0.1.11 → 0.1.12

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 (89) hide show
  1. package/dist/index.js +53 -55
  2. package/dist/lib/Components/AmountDisplay/AmountDisplay.js +10 -10
  3. package/dist/lib/Components/AmountInput/AmountInput.d.ts +1 -1
  4. package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  5. package/dist/lib/Components/AmountInput/AmountInput.js +35 -32
  6. package/dist/lib/Components/Banner/Banner.js +5 -5
  7. package/dist/lib/Components/BaseInput/BaseInput.d.ts +1 -1
  8. package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  9. package/dist/lib/Components/BaseInput/BaseInput.js +44 -41
  10. package/dist/lib/Components/Button/BaseButton.d.ts +1 -1
  11. package/dist/lib/Components/Button/BaseButton.d.ts.map +1 -1
  12. package/dist/lib/Components/Button/BaseButton.js +28 -25
  13. package/dist/lib/Components/Button/Button.js +9 -9
  14. package/dist/lib/Components/ButtonTrigger/ButtonTrigger.d.ts +1 -1
  15. package/dist/lib/Components/ButtonTrigger/ButtonTrigger.d.ts.map +1 -1
  16. package/dist/lib/Components/ButtonTrigger/ButtonTrigger.js +37 -34
  17. package/dist/lib/Components/Card/Card.d.ts.map +1 -1
  18. package/dist/lib/Components/Card/Card.js +132 -129
  19. package/dist/lib/Components/Card/types.d.ts +1 -0
  20. package/dist/lib/Components/Card/types.d.ts.map +1 -1
  21. package/dist/lib/Components/CardButton/CardButton.d.ts +1 -1
  22. package/dist/lib/Components/CardButton/CardButton.d.ts.map +1 -1
  23. package/dist/lib/Components/CardButton/CardButton.js +28 -24
  24. package/dist/lib/Components/Checkbox/Checkbox.d.ts +1 -1
  25. package/dist/lib/Components/Checkbox/Checkbox.d.ts.map +1 -1
  26. package/dist/lib/Components/Checkbox/Checkbox.js +26 -14
  27. package/dist/lib/Components/Dialog/DialogHeader/DialogHeader.js +2 -2
  28. package/dist/lib/Components/Dialog/types.d.ts +1 -1
  29. package/dist/lib/Components/Icon/Icon.js +4 -4
  30. package/dist/lib/Components/Icon/createIcon.js +4 -4
  31. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +1 -1
  32. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
  33. package/dist/lib/Components/InteractiveIcon/InteractiveIcon.js +24 -18
  34. package/dist/lib/Components/InteractiveIcon/types.d.ts +6 -1
  35. package/dist/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
  36. package/dist/lib/Components/Link/Link.d.ts +1 -1
  37. package/dist/lib/Components/Link/Link.d.ts.map +1 -1
  38. package/dist/lib/Components/Link/Link.js +44 -33
  39. package/dist/lib/Components/Link/types.d.ts +5 -0
  40. package/dist/lib/Components/Link/types.d.ts.map +1 -1
  41. package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
  42. package/dist/lib/Components/ListItem/ListItem.js +72 -65
  43. package/dist/lib/Components/Menu/Menu.d.ts +3 -3
  44. package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
  45. package/dist/lib/Components/Menu/Menu.js +133 -104
  46. package/dist/lib/Components/NavBar/CoinCapsule.js +4 -4
  47. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
  48. package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  49. package/dist/lib/Components/SegmentedControl/SegmentedControl.js +88 -51
  50. package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts +1 -1
  51. package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
  52. package/dist/lib/Components/Select/Select.d.ts +2 -2
  53. package/dist/lib/Components/Select/Select.d.ts.map +1 -1
  54. package/dist/lib/Components/Select/Select.js +94 -76
  55. package/dist/lib/Components/SideBar/SideBar.d.ts +1 -1
  56. package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
  57. package/dist/lib/Components/SideBar/SideBar.js +77 -74
  58. package/dist/lib/Components/SideBar/types.d.ts +12 -4
  59. package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
  60. package/dist/lib/Components/Spot/Spot.js +3 -3
  61. package/dist/lib/Components/Stepper/Stepper.d.ts.map +1 -1
  62. package/dist/lib/Components/Stepper/Stepper.js +34 -24
  63. package/dist/lib/Components/Subheader/Subheader.d.ts +2 -7
  64. package/dist/lib/Components/Subheader/Subheader.d.ts.map +1 -1
  65. package/dist/lib/Components/Subheader/Subheader.js +31 -49
  66. package/dist/lib/Components/Subheader/index.d.ts +1 -1
  67. package/dist/lib/Components/Subheader/index.d.ts.map +1 -1
  68. package/dist/lib/Components/Subheader/types.d.ts +1 -11
  69. package/dist/lib/Components/Subheader/types.d.ts.map +1 -1
  70. package/dist/lib/Components/Switch/Switch.d.ts +1 -1
  71. package/dist/lib/Components/Switch/Switch.d.ts.map +1 -1
  72. package/dist/lib/Components/Switch/Switch.js +30 -22
  73. package/dist/lib/Components/Table/Table.js +49 -49
  74. package/dist/lib/Components/Tag/Tag.d.ts +1 -1
  75. package/dist/lib/Components/Tag/Tag.d.ts.map +1 -1
  76. package/dist/lib/Components/Tag/Tag.js +17 -14
  77. package/dist/lib/Components/Tile/Tile.d.ts +5 -12
  78. package/dist/lib/Components/Tile/Tile.d.ts.map +1 -1
  79. package/dist/lib/Components/Tile/Tile.js +79 -82
  80. package/dist/lib/Components/Tile/index.d.ts +1 -1
  81. package/dist/lib/Components/Tile/index.d.ts.map +1 -1
  82. package/dist/lib/Components/Tile/types.d.ts +1 -10
  83. package/dist/lib/Components/Tile/types.d.ts.map +1 -1
  84. package/dist/lib/Components/TileButton/TileButton.d.ts +1 -1
  85. package/dist/lib/Components/TileButton/TileButton.d.ts.map +1 -1
  86. package/dist/lib/Components/TileButton/TileButton.js +26 -23
  87. package/dist/libs/utils-shared/dist/index.js +95 -90
  88. package/dist/package.json +1 -1
  89. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { AddressInput as n } from "./lib/Components/AddressInput/AddressInput.js
3
3
  import { AmountInput as i } from "./lib/Components/AmountInput/AmountInput.js";
4
4
  import { AmountDisplay as p } from "./lib/Components/AmountDisplay/AmountDisplay.js";
5
5
  import { Avatar as T } from "./lib/Components/Avatar/Avatar.js";
6
- import { Banner as d } from "./lib/Components/Banner/Banner.js";
6
+ import { Banner as x } from "./lib/Components/Banner/Banner.js";
7
7
  import { BaseInput as f } from "./lib/Components/BaseInput/BaseInput.js";
8
8
  import { Button as S } from "./lib/Components/Button/Button.js";
9
9
  import { BaseButton as b } from "./lib/Components/Button/BaseButton.js";
@@ -20,7 +20,7 @@ import { Divider as re } from "./lib/Components/Divider/Divider.js";
20
20
  import { IconButton as ae } from "./lib/Components/IconButton/IconButton.js";
21
21
  import { InteractiveIcon as le } from "./lib/Components/InteractiveIcon/InteractiveIcon.js";
22
22
  import { Link as me } from "./lib/Components/Link/Link.js";
23
- import { ListItem as ue, ListItemContent as de, ListItemDescription as xe, ListItemIcon as fe, ListItemLeading as Ce, ListItemSpot as Se, ListItemTitle as ge, ListItemTrailing as be, ListItemTruncate as ce } from "./lib/Components/ListItem/ListItem.js";
23
+ import { ListItem as ue, ListItemContent as xe, ListItemDescription as de, ListItemIcon as fe, ListItemLeading as Ce, ListItemSpot as Se, ListItemTitle as ge, ListItemTrailing as be, ListItemTruncate as ce } from "./lib/Components/ListItem/ListItem.js";
24
24
  import { Menu as Ie, MenuCheckboxItem as se, MenuContent as Le, MenuGroup as De, MenuItem as Me, MenuLabel as he, MenuPortal as Re, MenuRadioGroup as ve, MenuRadioItem as Ae, MenuSeparator as we, MenuSub as He, MenuSubContent as ke, MenuSubTrigger as ye, MenuTrigger as Ge } from "./lib/Components/Menu/Menu.js";
25
25
  import { NavBar as Pe, NavBarBackButton as Fe, NavBarCoinCapsule as Ee, NavBarTitle as Oe, NavBarTrailing as _e } from "./lib/Components/NavBar/NavBar.js";
26
26
  import { PageIndicator as qe } from "./lib/Components/PageIndicator/PageIndicator.js";
@@ -33,27 +33,27 @@ import { Skeleton as fo } from "./lib/Components/Skeleton/Skeleton.js";
33
33
  import { Spinner as So } from "./lib/Components/Spinner/Spinner.js";
34
34
  import { Spot as bo } from "./lib/Components/Spot/Spot.js";
35
35
  import { Stepper as Bo } from "./lib/Components/Stepper/Stepper.js";
36
- import { Subheader as so, SubheaderAction as Lo, SubheaderCount as Do, SubheaderDescription as Mo, SubheaderInfo as ho, SubheaderRow as Ro, SubheaderShowMore as vo, SubheaderTitle as Ao } from "./lib/Components/Subheader/Subheader.js";
37
- import { Switch as Ho } from "./lib/Components/Switch/Switch.js";
38
- import { Table as yo, TableActionBar as Go, TableActionBarLeading as No, TableActionBarTrailing as Po, TableBody as Fo, TableCell as Eo, TableCellContent as Oo, TableGroupHeaderRow as _o, TableHeader as jo, TableHeaderCell as qo, TableHeaderRow as zo, TableInfoIcon as Jo, TableLoadingRow as Ko, TableRoot as Qo, TableRow as Uo, TableSortButton as Vo } from "./lib/Components/Table/Table.js";
39
- import { Tag as Xo } from "./lib/Components/Tag/Tag.js";
40
- import { TextInput as Zo } from "./lib/Components/TextInput/TextInput.js";
41
- import { Tile as et, TileContent as ot, TileDescription as tt, TileSecondaryAction as rt, TileSpot as nt, TileTitle as at, TileTrailingContent as it } from "./lib/Components/Tile/Tile.js";
42
- import { TileButton as pt } from "./lib/Components/TileButton/TileButton.js";
43
- import { Tooltip as Tt, TooltipContent as ut, TooltipProvider as dt, TooltipTrigger as xt } from "./lib/Components/Tooltip/Tooltip.js";
44
- import { ThemeProvider as Ct } from "./lib/Components/ThemeProvider/ThemeProvider.js";
45
- import { COLOR_SCHEMES as gt } from "./lib/Components/ThemeProvider/ThemeProvider.types.js";
36
+ import { Subheader as so, SubheaderCount as Lo, SubheaderDescription as Do, SubheaderInfo as Mo, SubheaderRow as ho, SubheaderShowMore as Ro, SubheaderTitle as vo } from "./lib/Components/Subheader/Subheader.js";
37
+ import { Switch as wo } from "./lib/Components/Switch/Switch.js";
38
+ import { Table as ko, TableActionBar as yo, TableActionBarLeading as Go, TableActionBarTrailing as No, TableBody as Po, TableCell as Fo, TableCellContent as Eo, TableGroupHeaderRow as Oo, TableHeader as _o, TableHeaderCell as jo, TableHeaderRow as qo, TableInfoIcon as zo, TableLoadingRow as Jo, TableRoot as Ko, TableRow as Qo, TableSortButton as Uo } from "./lib/Components/Table/Table.js";
39
+ import { Tag as Wo } from "./lib/Components/Tag/Tag.js";
40
+ import { TextInput as Yo } from "./lib/Components/TextInput/TextInput.js";
41
+ import { Tile as $o, TileContent as et, TileDescription as ot, TileSecondaryAction as tt, TileTitle as rt, TileTrailingContent as nt } from "./lib/Components/Tile/Tile.js";
42
+ import { TileButton as it } from "./lib/Components/TileButton/TileButton.js";
43
+ import { Tooltip as pt, TooltipContent as mt, TooltipProvider as Tt, TooltipTrigger as ut } from "./lib/Components/Tooltip/Tooltip.js";
44
+ import { ThemeProvider as dt } from "./lib/Components/ThemeProvider/ThemeProvider.js";
45
+ import { COLOR_SCHEMES as Ct } from "./lib/Components/ThemeProvider/ThemeProvider.types.js";
46
46
  export {
47
47
  n as AddressInput,
48
48
  p as AmountDisplay,
49
49
  i as AmountInput,
50
50
  T as Avatar,
51
- d as Banner,
51
+ x as Banner,
52
52
  b as BaseButton,
53
53
  f as BaseInput,
54
54
  S as Button,
55
55
  ao as ButtonTrigger,
56
- gt as COLOR_SCHEMES,
56
+ Ct as COLOR_SCHEMES,
57
57
  B as Card,
58
58
  H as CardButton,
59
59
  I as CardContent,
@@ -87,8 +87,8 @@ export {
87
87
  t as Languages,
88
88
  me as Link,
89
89
  ue as ListItem,
90
- de as ListItemContent,
91
- xe as ListItemDescription,
90
+ xe as ListItemContent,
91
+ de as ListItemDescription,
92
92
  fe as ListItemIcon,
93
93
  Ce as ListItemLeading,
94
94
  Se as ListItemSpot,
@@ -137,44 +137,42 @@ export {
137
137
  bo as Spot,
138
138
  Bo as Stepper,
139
139
  so as Subheader,
140
- Lo as SubheaderAction,
141
- Do as SubheaderCount,
142
- Mo as SubheaderDescription,
143
- ho as SubheaderInfo,
144
- Ro as SubheaderRow,
145
- vo as SubheaderShowMore,
146
- Ao as SubheaderTitle,
147
- Ho as Switch,
148
- yo as Table,
149
- Go as TableActionBar,
150
- No as TableActionBarLeading,
151
- Po as TableActionBarTrailing,
152
- Fo as TableBody,
153
- Eo as TableCell,
154
- Oo as TableCellContent,
155
- _o as TableGroupHeaderRow,
156
- jo as TableHeader,
157
- qo as TableHeaderCell,
158
- zo as TableHeaderRow,
159
- Jo as TableInfoIcon,
160
- Ko as TableLoadingRow,
161
- Qo as TableRoot,
162
- Uo as TableRow,
163
- Vo as TableSortButton,
164
- Xo as Tag,
165
- Zo as TextInput,
166
- Ct as ThemeProvider,
167
- et as Tile,
168
- pt as TileButton,
169
- ot as TileContent,
170
- tt as TileDescription,
171
- rt as TileSecondaryAction,
172
- nt as TileSpot,
173
- at as TileTitle,
174
- it as TileTrailingContent,
175
- Tt as Tooltip,
176
- ut as TooltipContent,
177
- dt as TooltipProvider,
178
- xt as TooltipTrigger,
140
+ Lo as SubheaderCount,
141
+ Do as SubheaderDescription,
142
+ Mo as SubheaderInfo,
143
+ ho as SubheaderRow,
144
+ Ro as SubheaderShowMore,
145
+ vo as SubheaderTitle,
146
+ wo as Switch,
147
+ ko as Table,
148
+ yo as TableActionBar,
149
+ Go as TableActionBarLeading,
150
+ No as TableActionBarTrailing,
151
+ Po as TableBody,
152
+ Fo as TableCell,
153
+ Eo as TableCellContent,
154
+ Oo as TableGroupHeaderRow,
155
+ _o as TableHeader,
156
+ jo as TableHeaderCell,
157
+ qo as TableHeaderRow,
158
+ zo as TableInfoIcon,
159
+ Jo as TableLoadingRow,
160
+ Ko as TableRoot,
161
+ Qo as TableRow,
162
+ Uo as TableSortButton,
163
+ Wo as Tag,
164
+ Yo as TextInput,
165
+ dt as ThemeProvider,
166
+ $o as Tile,
167
+ it as TileButton,
168
+ et as TileContent,
169
+ ot as TileDescription,
170
+ tt as TileSecondaryAction,
171
+ rt as TileTitle,
172
+ nt as TileTrailingContent,
173
+ pt as Tooltip,
174
+ mt as TooltipContent,
175
+ Tt as TooltipProvider,
176
+ ut as TooltipTrigger,
179
177
  J as useLumenDataTable
180
178
  };
@@ -44,30 +44,30 @@ const N = {
44
44
  style: {
45
45
  transform: `translateY(-${a * 10}%)`
46
46
  },
47
- children: b.map((r, n) => /* @__PURE__ */ e("span", { inert: r !== a, children: r }, n))
47
+ children: b.map((n, r) => /* @__PURE__ */ e("span", { inert: n !== a, children: n }, r))
48
48
  }
49
49
  )
50
50
  ]
51
51
  }
52
52
  );
53
- }), m = d(({ items: a, type: l, animate: i }) => a.map((s, r) => {
54
- const n = a.length - r;
55
- return s.type === "separator" ? /* @__PURE__ */ e("span", { children: s.value }, n) : /* @__PURE__ */ e(
53
+ }), m = d(({ items: a, type: l, animate: i }) => a.map((s, n) => {
54
+ const r = a.length - n;
55
+ return s.type === "separator" ? /* @__PURE__ */ e("span", { children: s.value }, r) : /* @__PURE__ */ e(
56
56
  T,
57
57
  {
58
58
  value: Number(s.value),
59
59
  animate: i,
60
60
  type: l
61
61
  },
62
- n
62
+ r
63
63
  );
64
64
  })), g = ({
65
65
  value: a,
66
66
  formatter: l,
67
67
  hidden: i = !1,
68
68
  loading: s = !1,
69
- animate: r = !0,
70
- className: n,
69
+ animate: n = !0,
70
+ className: r,
71
71
  ...u
72
72
  }) => {
73
73
  const t = l(a), c = y(t), { t: f } = D(), h = x(
@@ -81,7 +81,7 @@ const N = {
81
81
  className: p(
82
82
  s && "animate-pulse",
83
83
  "relative inline-flex items-baseline",
84
- n
84
+ r
85
85
  ),
86
86
  "aria-label": h,
87
87
  "aria-busy": s,
@@ -98,7 +98,7 @@ const N = {
98
98
  m,
99
99
  {
100
100
  items: c.integerPart,
101
- animate: r,
101
+ animate: n,
102
102
  type: "integer"
103
103
  }
104
104
  )
@@ -116,7 +116,7 @@ const N = {
116
116
  m,
117
117
  {
118
118
  items: c.decimalPart,
119
- animate: r,
119
+ animate: n,
120
120
  type: "decimal"
121
121
  }
122
122
  ),
@@ -5,7 +5,7 @@ import { AmountInputProps } from './types';
5
5
  * The currency text can be positioned either on the left or right side of the input.
6
6
  */
7
7
  export declare const AmountInput: {
8
- ({ ref, className, currencyText, currencyPosition, disabled, maxIntegerLength, maxDecimalLength, allowDecimals, thousandsSeparator, value, onChange, ...props }: AmountInputProps): import("react/jsx-runtime").JSX.Element;
8
+ ({ ref, className, currencyText, currencyPosition, disabled: disabledProp, maxIntegerLength, maxDecimalLength, allowDecimals, thousandsSeparator, value, onChange, ...props }: AmountInputProps): import("react/jsx-runtime").JSX.Element;
9
9
  displayName: string;
10
10
  };
11
11
  //# sourceMappingURL=AmountInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountInput/AmountInput.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAgC3C;;;;GAIG;AACH,eAAO,MAAM,WAAW;qKAarB,gBAAgB;;CA8GlB,CAAC"}
1
+ {"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountInput/AmountInput.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAgC3C;;;;GAIG;AACH,eAAO,MAAM,WAAW;mLAarB,gBAAgB;;CAkHlB,CAAC"}
@@ -1,8 +1,8 @@
1
- import { jsxs as V, jsx as l } from "react/jsx-runtime";
2
- import { getFontSize as j, cn as a, textFormatter as F } from "../../../libs/utils-shared/dist/index.js";
3
- import { cva as z } from "class-variance-authority";
4
- import { useRef as p, useState as h, useMemo as M, useLayoutEffect as q, useEffect as D } from "react";
5
- const H = z(
1
+ import { jsxs as j, jsx as l } from "react/jsx-runtime";
2
+ import { useDisabledContext as F, getFontSize as z, cn as a, textFormatter as D } from "../../../libs/utils-shared/dist/index.js";
3
+ import { cva as M } from "class-variance-authority";
4
+ import { useRef as d, useState as h, useMemo as W, useLayoutEffect as q, useEffect as L } from "react";
5
+ const Q = M(
6
6
  [
7
7
  "bg-transparent heading-0 caret-active outline-hidden transition-colors",
8
8
  "text-base placeholder:text-muted-subtle",
@@ -28,11 +28,11 @@ const H = z(
28
28
  "group-has-[input:placeholder-shown]:text-muted-subtle",
29
29
  "group-has-[input:disabled]:cursor-not-allowed group-has-[input:disabled]:text-disabled",
30
30
  'group-has-[input[aria-invalid="true"]]:text-error'
31
- ), J = ({
31
+ ), Y = ({
32
32
  ref: x,
33
33
  className: S,
34
- currencyText: r,
35
- currencyPosition: d = "left",
34
+ currencyText: s,
35
+ currencyPosition: p = "left",
36
36
  disabled: v,
37
37
  maxIntegerLength: w = 9,
38
38
  maxDecimalLength: y = 9,
@@ -40,9 +40,12 @@ const H = z(
40
40
  thousandsSeparator: N = !0,
41
41
  value: u,
42
42
  onChange: A,
43
- ...R
43
+ ...I
44
44
  }) => {
45
- const c = p(null), s = p(null), [n, f] = h(u.toString()), [k, m] = h(!1), g = p(n);
45
+ const R = F({
46
+ consumerName: "AmountInput",
47
+ mergeWith: { disabled: v }
48
+ }), c = d(null), r = d(null), [n, m] = h(u.toString()), [k, f] = h(!1), g = d(n);
46
49
  function E(...t) {
47
50
  return (e) => {
48
51
  t.forEach((o) => {
@@ -50,41 +53,41 @@ const H = z(
50
53
  });
51
54
  };
52
55
  }
53
- const i = M(() => j(n) + "px", [n]);
56
+ const i = W(() => z(n) + "px", [n]);
54
57
  q(() => {
55
- if (c.current && s.current) {
58
+ if (c.current && r.current) {
56
59
  const t = c.current.offsetWidth, e = n === "" ? 33 : 8;
57
- s.current.style.width = `${t + e}px`;
60
+ r.current.style.width = `${t + e}px`;
58
61
  }
59
- }, [n]), D(() => {
60
- f(u.toString());
62
+ }, [n]), L(() => {
63
+ m(u.toString());
61
64
  }, [u]);
62
- const I = (t) => {
63
- const e = F(t.target.value, {
65
+ const V = (t) => {
66
+ const e = D(t.target.value, {
64
67
  allowDecimals: C,
65
68
  thousandsSeparator: N,
66
69
  maxIntegerLength: w,
67
70
  maxDecimalLength: y
68
71
  });
69
- f(e), A({ ...t, target: { ...t.target, value: e } }), e !== g.current && m(!0), g.current = e;
72
+ m(e), A({ ...t, target: { ...t.target, value: e } }), e !== g.current && f(!0), g.current = e;
70
73
  };
71
- return /* @__PURE__ */ V(
74
+ return /* @__PURE__ */ j(
72
75
  "div",
73
76
  {
74
77
  className: "group relative flex items-center justify-center transition-transform",
75
78
  onPointerDown: () => {
76
- const t = s.current;
79
+ const t = r.current;
77
80
  t && window.requestAnimationFrame(() => {
78
81
  t.focus();
79
82
  });
80
83
  },
81
84
  children: [
82
- r && d === "left" && /* @__PURE__ */ l(
85
+ s && p === "left" && /* @__PURE__ */ l(
83
86
  "span",
84
87
  {
85
88
  className: a(b, "shrink-0"),
86
89
  style: { fontSize: i, letterSpacing: "normal" },
87
- children: r
90
+ children: s
88
91
  }
89
92
  ),
90
93
  /* @__PURE__ */ l(
@@ -100,31 +103,31 @@ const H = z(
100
103
  /* @__PURE__ */ l(
101
104
  "input",
102
105
  {
103
- ref: E(x, s),
106
+ ref: E(x, r),
104
107
  type: "text",
105
108
  inputMode: "decimal",
106
- disabled: v,
109
+ disabled: R,
107
110
  value: n,
108
- onChange: I,
109
- onAnimationEnd: () => m(!1),
110
- className: a(H({ isChanging: k }), S),
111
- ...R,
111
+ onChange: V,
112
+ onAnimationEnd: () => f(!1),
113
+ className: a(Q({ isChanging: k }), S),
114
+ ...I,
112
115
  style: { fontSize: i, letterSpacing: "normal" }
113
116
  }
114
117
  ),
115
- r && d === "right" && /* @__PURE__ */ l(
118
+ s && p === "right" && /* @__PURE__ */ l(
116
119
  "span",
117
120
  {
118
121
  className: a(b, "shrink-0"),
119
122
  style: { fontSize: i, letterSpacing: "normal" },
120
- children: r
123
+ children: s
121
124
  }
122
125
  )
123
126
  ]
124
127
  }
125
128
  );
126
129
  };
127
- J.displayName = "AmountInput";
130
+ Y.displayName = "AmountInput";
128
131
  export {
129
- J as AmountInput
132
+ Y as AmountInput
130
133
  };
@@ -29,8 +29,8 @@ const k = {
29
29
  appearance: s = "info",
30
30
  title: a,
31
31
  description: o,
32
- primaryAction: l,
33
- secondaryAction: n,
32
+ primaryAction: n,
33
+ secondaryAction: l,
34
34
  className: t,
35
35
  onClose: i,
36
36
  closeAriaLabel: f,
@@ -50,9 +50,9 @@ const k = {
50
50
  a && /* @__PURE__ */ r("h3", { className: "line-clamp-2 body-1-semi-bold", children: a }),
51
51
  o && /* @__PURE__ */ r("div", { className: c("line-clamp-5 body-2", !a && "mt-2"), children: o })
52
52
  ] }),
53
- (l || n) && /* @__PURE__ */ e("div", { className: "flex gap-4", children: [
54
- l,
55
- n
53
+ (n || l) && /* @__PURE__ */ e("div", { className: "flex gap-4", children: [
54
+ n,
55
+ l
56
56
  ] })
57
57
  ] }),
58
58
  i && /* @__PURE__ */ r(
@@ -19,7 +19,7 @@ import { BaseInputProps } from './types';
19
19
  * @internal
20
20
  */
21
21
  export declare const BaseInput: {
22
- ({ ref, className, containerClassName, inputClassName, labelClassName, label, id, disabled, errorMessage, suffix, prefix, onClear, hideClearButton, "aria-invalid": ariaInvalidProp, onChange: onChangeProp, ...props }: BaseInputProps): import("react/jsx-runtime").JSX.Element;
22
+ ({ ref, className, containerClassName, inputClassName, labelClassName, label, id, disabled: disabledProp, errorMessage, suffix, prefix, onClear, hideClearButton, "aria-invalid": ariaInvalidProp, onChange: onChangeProp, ...props }: BaseInputProps): import("react/jsx-runtime").JSX.Element;
23
23
  displayName: string;
24
24
  };
25
25
  //# sourceMappingURL=BaseInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/BaseInput/BaseInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA2BzC;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,SAAS;6NAiBnB,cAAc;;CAqKhB,CAAC"}
1
+ {"version":3,"file":"BaseInput.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/BaseInput/BaseInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA2BzC;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,SAAS;2OAiBnB,cAAc;;CAyKhB,CAAC"}
@@ -1,63 +1,66 @@
1
1
  import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
- import { cn as a } from "../../../libs/utils-shared/dist/index.js";
3
- import c from "react";
4
- import { useCommonTranslation as O } from "../../../i18n/useCommonTranslation.js";
5
- import { InteractiveIcon as $ } from "../InteractiveIcon/InteractiveIcon.js";
2
+ import { useDisabledContext as $, cn as a } from "../../../libs/utils-shared/dist/index.js";
3
+ import d from "react";
4
+ import { useCommonTranslation as q } from "../../../i18n/useCommonTranslation.js";
5
+ import { InteractiveIcon as H } from "../InteractiveIcon/InteractiveIcon.js";
6
6
  import { DeleteCircleFill as x } from "../../Symbols/Icons/DeleteCircleFill.js";
7
- const q = a(
7
+ const P = a(
8
8
  "group relative flex h-48 w-full cursor-text items-center gap-8 rounded-sm bg-muted px-16 transition-colors",
9
9
  "focus-within:ring-2 focus-within:ring-active hover:bg-muted-hover",
10
10
  "has-disabled:cursor-not-allowed has-disabled:bg-disabled has-disabled:text-disabled",
11
11
  "has-invalid:border-error has-invalid:ring-1 has-invalid:ring-error",
12
12
  'has-[input[aria-invalid="true"]]:border-error has-[input[aria-invalid="true"]]:ring-1 has-[input[aria-invalid="true"]]:ring-error'
13
- ), H = a(
13
+ ), U = a(
14
14
  "peer w-full flex-1 bg-muted body-1 text-base caret-active outline-hidden transition-colors",
15
15
  "group-hover:bg-muted-hover group-disabled:bg-disabled",
16
16
  "group-has-disabled:cursor-not-allowed group-has-disabled:bg-disabled group-has-disabled:text-disabled",
17
17
  "placeholder:text-muted group-has-disabled:placeholder:text-disabled",
18
18
  "[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
19
19
  "truncate"
20
- ), P = a(
20
+ ), W = a(
21
21
  "pointer-events-none absolute top-6 left-16 origin-left body-4 text-muted transition-all duration-300",
22
22
  "peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-placeholder-shown:body-2",
23
23
  "group-has-disabled:text-disabled",
24
24
  "peer-focus:top-6 peer-focus:translate-y-0 peer-focus:body-4",
25
25
  "w-[calc(100%-var(--size-56))] truncate"
26
- ), U = ({
26
+ ), G = ({
27
27
  ref: y,
28
28
  className: I,
29
29
  containerClassName: C,
30
30
  inputClassName: S,
31
31
  labelClassName: N,
32
- label: d,
32
+ label: u,
33
33
  id: k,
34
- disabled: h,
34
+ disabled: R,
35
35
  errorMessage: o,
36
- suffix: R,
37
- prefix: E,
38
- onClear: j,
39
- hideClearButton: z = !1,
36
+ suffix: B,
37
+ prefix: D,
38
+ onClear: E,
39
+ hideClearButton: j = !1,
40
40
  "aria-invalid": b,
41
- onChange: m,
41
+ onChange: h,
42
42
  ...i
43
43
  }) => {
44
- const { t: B } = O(), n = c.useRef(null), D = c.useId(), u = k || `input-${D}`, F = b || (o ? !0 : void 0), s = i.value !== void 0, [L, v] = c.useState(
44
+ const m = $({
45
+ consumerName: "BaseInput",
46
+ mergeWith: { disabled: R }
47
+ }), { t: z } = q(), n = d.useRef(null), F = d.useId(), c = k || `input-${F}`, L = b || (o ? !0 : void 0), s = i.value !== void 0, [T, v] = d.useState(
45
48
  i.defaultValue?.toString() || ""
46
- ), T = c.useCallback(
49
+ ), V = d.useCallback(
47
50
  (t) => {
48
- s || v(t.target.value), m?.(t);
51
+ s || v(t.target.value), h?.(t);
49
52
  },
50
- [s, m]
51
- ), f = (s ? !!i.value && i.value.toString().length > 0 : L.length > 0) && !h && !z, g = `${u}-error`, V = () => {
53
+ [s, h]
54
+ ), f = (s ? !!i.value && i.value.toString().length > 0 : T.length > 0) && !m && !j, g = `${c}-error`, A = () => {
52
55
  if (!n.current) return;
53
56
  Object.getOwnPropertyDescriptor(
54
57
  window.HTMLInputElement.prototype,
55
58
  "value"
56
59
  )?.set?.call(n.current, ""), s || v("");
57
60
  const l = new Event("input", { bubbles: !0 });
58
- n.current.dispatchEvent(l), n.current.focus(), j?.();
61
+ n.current.dispatchEvent(l), n.current.focus(), E?.();
59
62
  };
60
- function A(...t) {
63
+ function O(...t) {
61
64
  return (l) => {
62
65
  t.forEach((e) => {
63
66
  e && (typeof e == "function" ? e(l) : e.current = l);
@@ -68,7 +71,7 @@ const q = a(
68
71
  /* @__PURE__ */ p(
69
72
  "div",
70
73
  {
71
- className: a(q, C),
74
+ className: a(P, C),
72
75
  onPointerDown: (t) => {
73
76
  if (t.target.closest("input, button, a")) return;
74
77
  const e = n.current;
@@ -83,47 +86,47 @@ const q = a(
83
86
  });
84
87
  },
85
88
  children: [
86
- E,
89
+ D,
87
90
  /* @__PURE__ */ r(
88
91
  "input",
89
92
  {
90
- ref: A(y, n),
91
- id: u,
92
- disabled: h,
93
+ ref: O(y, n),
94
+ id: c,
95
+ disabled: m,
93
96
  placeholder: " ",
94
- "aria-invalid": F,
97
+ "aria-invalid": L,
95
98
  "aria-describedby": o ? g : void 0,
96
99
  className: a(
97
- H,
98
- d && "pt-12 body-2",
100
+ U,
101
+ u && "pt-12 body-2",
99
102
  S
100
103
  ),
101
- onChange: T,
104
+ onChange: V,
102
105
  ...i
103
106
  }
104
107
  ),
105
- d && /* @__PURE__ */ r(
108
+ u && /* @__PURE__ */ r(
106
109
  "label",
107
110
  {
108
- htmlFor: u,
111
+ htmlFor: c,
109
112
  className: a(
110
- P,
113
+ W,
111
114
  o && "text-error",
112
115
  N
113
116
  ),
114
- children: d
117
+ children: u
115
118
  }
116
119
  ),
117
120
  f && /* @__PURE__ */ r(
118
- $,
121
+ H,
119
122
  {
120
123
  iconType: "filled",
121
- onClick: V,
122
- "aria-label": B("components.baseInput.clearInputAriaLabel"),
124
+ onClick: A,
125
+ "aria-label": z("components.baseInput.clearInputAriaLabel"),
123
126
  children: /* @__PURE__ */ r(x, { size: 20 })
124
127
  }
125
128
  ),
126
- !f && R
129
+ !f && B
127
130
  ]
128
131
  }
129
132
  ),
@@ -141,7 +144,7 @@ const q = a(
141
144
  )
142
145
  ] });
143
146
  };
144
- U.displayName = "BaseInput";
147
+ G.displayName = "BaseInput";
145
148
  export {
146
- U as BaseInput
149
+ G as BaseInput
147
150
  };
@@ -7,7 +7,7 @@ export declare const baseButtonVariants: (props?: ({
7
7
  isFull?: boolean | null | undefined;
8
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
9
  export declare const BaseButton: {
10
- ({ ref, className, appearance, size, isFull, disabled, asChild, icon: Icon, loading, children, onClick, ...props }: BaseButtonProps): import("react/jsx-runtime").JSX.Element;
10
+ ({ ref, className, appearance, size, isFull, disabled: disabledProp, asChild, icon: Icon, loading, children, onClick, ...props }: BaseButtonProps): import("react/jsx-runtime").JSX.Element;
11
11
  displayName: string;
12
12
  };
13
13
  //# sourceMappingURL=BaseButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Button/BaseButton.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,kBAAkB;;;;;;8EAqD9B,CAAC;AAkBF,eAAO,MAAM,UAAU;wHAapB,eAAe;;CA4CjB,CAAC"}
1
+ {"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Button/BaseButton.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,kBAAkB;;;;;;8EAqD9B,CAAC;AAkBF,eAAO,MAAM,UAAU;sIAapB,eAAe;;CAgDjB,CAAC"}