@lanaco/lnc-react-ui 4.0.105 → 4.0.107

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 (236) hide show
  1. package/dist/Accordion.cjs +1 -1
  2. package/dist/Accordion.js +1 -1
  3. package/dist/AccordionSummary.cjs +1 -1
  4. package/dist/AccordionSummary.js +1 -1
  5. package/dist/ActionsToolbar.cjs +1 -1
  6. package/dist/ActionsToolbar.js +1 -1
  7. package/dist/Alert.cjs +1 -1
  8. package/dist/Alert.js +1 -1
  9. package/dist/Avatar.cjs +1 -1
  10. package/dist/Avatar.js +1 -1
  11. package/dist/Badge.cjs +1 -1
  12. package/dist/Badge.js +1 -1
  13. package/dist/BannerSectionCarousel.cjs +3 -2
  14. package/dist/BannerSectionCarousel.js +3 -2
  15. package/dist/BannerSectionWithList.cjs +1 -1
  16. package/dist/BannerSectionWithList.js +1 -1
  17. package/dist/BlogCardsSponsoredSection.cjs +1 -1
  18. package/dist/BlogCardsSponsoredSection.js +3 -3
  19. package/dist/BlogCategoryCardsSection.cjs +1 -1
  20. package/dist/BlogCategoryCardsSection.js +1 -1
  21. package/dist/BlogListSection.cjs +1 -1
  22. package/dist/BlogListSection.js +3 -3
  23. package/dist/BlogProductCardsSection.cjs +1 -1
  24. package/dist/BlogProductCardsSection.js +2 -2
  25. package/dist/BlogShopCardsSection.cjs +1 -1
  26. package/dist/BlogShopCardsSection.js +1 -1
  27. package/dist/BlogSingleSection.cjs +1 -1
  28. package/dist/BlogSingleSection.js +2 -2
  29. package/dist/BlogsSectionDetailed.cjs +1 -1
  30. package/dist/BlogsSectionDetailed.js +3 -3
  31. package/dist/BlogsSectionLarge.cjs +1 -1
  32. package/dist/BlogsSectionLarge.js +2 -2
  33. package/dist/BlogsSectionSimple.cjs +1 -1
  34. package/dist/BlogsSectionSimple.js +3 -3
  35. package/dist/BlogsSectionSimpleCentered.cjs +1 -1
  36. package/dist/BlogsSectionSimpleCentered.js +2 -2
  37. package/dist/BlogsSectionWithFilters.cjs +1 -1
  38. package/dist/BlogsSectionWithFilters.js +4 -4
  39. package/dist/BrandHitsSection.cjs +1 -1
  40. package/dist/BrandHitsSection.js +1 -1
  41. package/dist/Breadcrumbs.cjs +1 -1
  42. package/dist/Breadcrumbs.js +1 -1
  43. package/dist/Button.cjs +6 -4
  44. package/dist/Button.js +12 -3
  45. package/dist/ButtonGroup.cjs +1 -1
  46. package/dist/ButtonGroup.js +1 -1
  47. package/dist/CalorieCalculatorSection.cjs +1 -1
  48. package/dist/CalorieCalculatorSection.js +1 -1
  49. package/dist/CheckBoxInput.cjs +1 -1
  50. package/dist/CheckBoxInput.js +1 -1
  51. package/dist/Chip.cjs +1 -1
  52. package/dist/Chip.js +1 -1
  53. package/dist/ColorInput.cjs +10 -6
  54. package/dist/ColorInput.js +117 -87
  55. package/dist/ConfirmationForm.cjs +1 -1
  56. package/dist/ConfirmationForm.js +1 -1
  57. package/dist/CustomLoanMapSection.cjs +1 -1
  58. package/dist/CustomLoanMapSection.js +1 -1
  59. package/dist/{CustomStyles-DYULk9y7.js → CustomStyles-Dd8IsVV6.js} +1 -1
  60. package/dist/{CustomStyles-Uqkz9jDo.cjs → CustomStyles-DtKDPOdk.cjs} +1 -1
  61. package/dist/DateInput.cjs +1 -1
  62. package/dist/DateInput.js +1 -1
  63. package/dist/DecimalInput.cjs +28 -24
  64. package/dist/DecimalInput.js +315 -285
  65. package/dist/DecimalInputV2.cjs +23 -19
  66. package/dist/DecimalInputV2.js +124 -94
  67. package/dist/DetailedProductsSection.cjs +5 -5
  68. package/dist/DetailedProductsSection.js +39 -38
  69. package/dist/DetailsView.cjs +1 -1
  70. package/dist/DetailsView.js +1 -1
  71. package/dist/DoubleRangeSlider.cjs +1 -1
  72. package/dist/DoubleRangeSlider.js +1 -1
  73. package/dist/DragAndDropFile.cjs +1 -1
  74. package/dist/DragAndDropFile.js +1 -1
  75. package/dist/DragDropFiles.cjs +1 -1
  76. package/dist/DragDropFiles.js +1 -1
  77. package/dist/Drawer.cjs +1 -1
  78. package/dist/Drawer.js +1 -1
  79. package/dist/Dropdown.cjs +1 -1
  80. package/dist/Dropdown.js +2 -2
  81. package/dist/DropdownItem.cjs +1 -1
  82. package/dist/DropdownItem.js +1 -1
  83. package/dist/DropdownLookup.cjs +1 -1
  84. package/dist/DropdownLookup.js +1 -1
  85. package/dist/DropdownMenu.cjs +1 -1
  86. package/dist/DropdownMenu.js +1 -1
  87. package/dist/EditableTable.cjs +1 -1
  88. package/dist/EditableTable.js +1 -1
  89. package/dist/FeedbackSection.cjs +1 -1
  90. package/dist/FeedbackSection.js +1 -1
  91. package/dist/FieldOfInterestsMasonrySection.cjs +1 -1
  92. package/dist/FieldOfInterestsMasonrySection.js +1 -1
  93. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
  94. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +2 -2
  95. package/dist/FieldOfInterestsWithTagsCardsSection.cjs +1 -1
  96. package/dist/FieldOfInterestsWithTagsCardsSection.js +1 -1
  97. package/dist/FileInput.cjs +25 -20
  98. package/dist/FileInput.js +86 -55
  99. package/dist/FlexGridItem.cjs +1 -1
  100. package/dist/FlexGridItem.js +1 -1
  101. package/dist/FormField.cjs +1 -1
  102. package/dist/FormField.js +1 -1
  103. package/dist/FormView.cjs +1 -1
  104. package/dist/FormView.js +1 -1
  105. package/dist/GeneralWithTagsCardsSection.cjs +1 -1
  106. package/dist/GeneralWithTagsCardsSection.js +1 -1
  107. package/dist/GiftCardsSection.cjs +1 -1
  108. package/dist/GiftCardsSection.js +2 -2
  109. package/dist/Icon.cjs +1 -1
  110. package/dist/Icon.js +1 -1
  111. package/dist/IconButton.cjs +1 -1
  112. package/dist/IconButton.js +1 -1
  113. package/dist/Kanban.cjs +1 -1
  114. package/dist/Kanban.js +1 -1
  115. package/dist/KanbanActionsToolbar.cjs +1 -1
  116. package/dist/KanbanActionsToolbar.js +1 -1
  117. package/dist/KanbanView.cjs +1 -1
  118. package/dist/KanbanView.js +1 -1
  119. package/dist/Link.cjs +1 -1
  120. package/dist/Link.js +1 -1
  121. package/dist/LoanCalculatorSection.cjs +1 -1
  122. package/dist/LoanCalculatorSection.js +1 -1
  123. package/dist/LocationFinderSection.cjs +1 -1
  124. package/dist/LocationFinderSection.js +1 -1
  125. package/dist/LocationSearchSection.cjs +1 -1
  126. package/dist/LocationSearchSection.js +1 -1
  127. package/dist/MasonryGeneralCardsSection.cjs +1 -1
  128. package/dist/MasonryGeneralCardsSection.js +1 -1
  129. package/dist/MenuItem.cjs +1 -1
  130. package/dist/MenuItem.js +1 -1
  131. package/dist/Modal.cjs +1 -1
  132. package/dist/Modal.js +1 -1
  133. package/dist/MultiSelectDropdown.cjs +1 -1
  134. package/dist/MultiSelectDropdown.js +1 -1
  135. package/dist/MultiSelectDropdownLookup.cjs +1 -1
  136. package/dist/MultiSelectDropdownLookup.js +1 -1
  137. package/dist/NestedDropdownItem.cjs +1 -1
  138. package/dist/NestedDropdownItem.js +1 -1
  139. package/dist/NestedMenuItem.cjs +1 -1
  140. package/dist/NestedMenuItem.js +1 -1
  141. package/dist/NotificationContainer.cjs +1 -1
  142. package/dist/NotificationContainer.js +1 -1
  143. package/dist/NotificationMessage.cjs +1 -1
  144. package/dist/NotificationMessage.js +1 -1
  145. package/dist/NumberInput.cjs +23 -19
  146. package/dist/NumberInput.js +116 -86
  147. package/dist/OverlayGeneralCardsSection.cjs +1 -1
  148. package/dist/OverlayGeneralCardsSection.js +2 -2
  149. package/dist/PasswordInput.cjs +23 -19
  150. package/dist/PasswordInput.js +94 -64
  151. package/dist/PopoverContent.cjs +1 -1
  152. package/dist/PopoverContent.js +1 -1
  153. package/dist/ProductsWithBannerSection.cjs +1 -1
  154. package/dist/ProductsWithBannerSection.js +3 -3
  155. package/dist/ProgressBar.cjs +1 -1
  156. package/dist/ProgressBar.js +1 -1
  157. package/dist/QuattroCardsSection.cjs +1 -1
  158. package/dist/QuattroCardsSection.js +1 -1
  159. package/dist/QuizSection.cjs +1 -1
  160. package/dist/QuizSection.js +1 -1
  161. package/dist/RadioInput.cjs +1 -1
  162. package/dist/RadioInput.js +1 -1
  163. package/dist/RangeSlider.cjs +8 -8
  164. package/dist/RangeSlider.js +19 -17
  165. package/dist/ReviewsSection.cjs +1 -1
  166. package/dist/ReviewsSection.js +2 -2
  167. package/dist/SalesCampaignsSection.cjs +1 -1
  168. package/dist/SalesCampaignsSection.js +1 -1
  169. package/dist/Separator.cjs +1 -1
  170. package/dist/Separator.js +1 -1
  171. package/dist/ShopCardsSection.cjs +1 -1
  172. package/dist/ShopCardsSection.js +2 -2
  173. package/dist/Sidebar.cjs +1 -1
  174. package/dist/Sidebar.js +1 -1
  175. package/dist/SimpleCategoriesSection.cjs +1 -1
  176. package/dist/SimpleCategoriesSection.js +3 -3
  177. package/dist/SimpleProductsSection.cjs +1 -1
  178. package/dist/SimpleProductsSection.js +2 -2
  179. package/dist/Spinner.cjs +1 -1
  180. package/dist/Spinner.js +1 -1
  181. package/dist/Surface.cjs +1 -1
  182. package/dist/Surface.js +1 -1
  183. package/dist/SwipeableDrawer.cjs +1 -1
  184. package/dist/SwipeableDrawer.js +1 -1
  185. package/dist/TabItem.cjs +1 -1
  186. package/dist/TabItem.js +1 -1
  187. package/dist/Table.cjs +1 -1
  188. package/dist/Table.js +1 -1
  189. package/dist/TableView.cjs +1 -1
  190. package/dist/TableView.js +1 -1
  191. package/dist/TextAreaInput.cjs +15 -12
  192. package/dist/TextAreaInput.js +70 -54
  193. package/dist/TextInput.cjs +23 -19
  194. package/dist/TextInput.js +90 -60
  195. package/dist/ThemeProvider.cjs +1 -1
  196. package/dist/ThemeProvider.js +1 -1
  197. package/dist/TimeInput.cjs +7 -5
  198. package/dist/TimeInput.js +47 -32
  199. package/dist/Toggle.cjs +1 -1
  200. package/dist/Toggle.js +1 -1
  201. package/dist/TreeMenuSeparator.cjs +1 -1
  202. package/dist/TreeMenuSeparator.js +1 -1
  203. package/dist/UploadedFile.cjs +1 -1
  204. package/dist/UploadedFile.js +1 -1
  205. package/dist/UrgentSaleProductsSection.cjs +1 -1
  206. package/dist/UrgentSaleProductsSection.js +1 -1
  207. package/dist/{index-C4gGt12B.cjs → index-B30K8mkW.cjs} +1 -1
  208. package/dist/{index-Kx8irvHH.js → index-BBMleFo5.js} +1 -1
  209. package/dist/{index-BRgZcjpI.cjs → index-BvSNRLNa.cjs} +1 -1
  210. package/dist/{index-C_T-BQ5p.cjs → index-C1DkD2ug.cjs} +1 -1
  211. package/dist/{index-DMysapsB.cjs → index-C9GK00PM.cjs} +1 -1
  212. package/dist/{index-Dcw6ecHw.js → index-CEI_JOki.js} +2 -2
  213. package/dist/{index-BPgWhA1t.js → index-CQLF61YV.js} +1 -1
  214. package/dist/{index-Cru8Sd2q.js → index-CTJpJFtr.js} +2 -2
  215. package/dist/{index-DZDz9qZP.cjs → index-Cg4t3q_p.cjs} +1 -1
  216. package/dist/{index-D86vS9UF.js → index-YGcWbzeb.js} +1 -1
  217. package/dist/index.cjs +1 -1
  218. package/dist/index.js +1 -1
  219. package/dist/{skeleton-BrUEdt6Z.js → skeleton-CkTNgaA3.js} +2 -2
  220. package/dist/{skeleton-BcaMeKFQ.cjs → skeleton-CoErfoMc.cjs} +1 -1
  221. package/dist/{skeleton-TrselJrj.js → skeleton-DWZNwK33.js} +1 -1
  222. package/dist/{skeleton-DwZzdFei.cjs → skeleton-DdlE-y3C.cjs} +1 -1
  223. package/dist/{style-LEmcTrN9.js → style-08foMKSd.js} +1 -1
  224. package/dist/{style-Bjk6yHcP.cjs → style-JqDQj4jh.cjs} +1 -1
  225. package/dist/{suspense-categories-card-simple-B2swGa6t.cjs → suspense-categories-card-simple-B5zd-nnm.cjs} +1 -1
  226. package/dist/{suspense-categories-card-simple-BCn3U1cz.js → suspense-categories-card-simple-Ds6hXZKt.js} +1 -1
  227. package/dist/{suspense-large-DgzTM-qh.js → suspense-large-BM9s_kZP.js} +1 -1
  228. package/dist/{suspense-large-DMhn-lIG.cjs → suspense-large-CtcwWswP.cjs} +1 -1
  229. package/dist/{suspense-product-card-detailed-BNOhu3Z4.cjs → suspense-product-card-detailed-DXwya4fQ.cjs} +1 -1
  230. package/dist/{suspense-product-card-detailed-BDkww9pS.js → suspense-product-card-detailed-bYBpLiXc.js} +2 -2
  231. package/dist/{suspense-product-card-simple-BxDjW7gR.cjs → suspense-product-card-simple-Ba1UPqgy.cjs} +1 -1
  232. package/dist/{suspense-product-card-simple-CQ1qPZOa.js → suspense-product-card-simple-ib6FLerL.js} +1 -1
  233. package/dist/{utils-BXCGNjIy.js → utils-BbgAIA9N.js} +51 -13
  234. package/dist/utils-CZynEOC_.cjs +51 -0
  235. package/package.json +1 -1
  236. package/dist/utils-BWzf4vLl.cjs +0 -51
@@ -1,26 +1,26 @@
1
1
  import { jsxs as ie, jsx as L } from "react/jsx-runtime";
2
2
  import { P as v } from "./index-S5Cd7WrG.js";
3
- import B, { forwardRef as oe, useState as ne, useCallback as se } from "react";
3
+ import k, { forwardRef as oe, useState as ne, useCallback as se } from "react";
4
4
  import { d as fe } from "./index-CkWvbrVT.js";
5
5
  import { s as G } from "./emotion-styled.browser.esm-BNN1dTl3.js";
6
- import { d as M, b as R, a as le, e as ue, h as W, c as ce } from "./utils-BXCGNjIy.js";
6
+ import { d as B, b as w, a as le, e as ue, h as W, c as ce } from "./utils-BbgAIA9N.js";
7
7
  import { u as pe } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
8
- function E() {
8
+ function A() {
9
9
  }
10
10
  function de() {
11
11
  return !0;
12
12
  }
13
- function I(a) {
14
- return !!(a || "").match(/\d/);
13
+ function O(r) {
14
+ return !!(r || "").match(/\d/);
15
15
  }
16
- function Z(a) {
17
- return a == null;
16
+ function Z(r) {
17
+ return r == null;
18
18
  }
19
- function _(a) {
20
- return a.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
19
+ function _(r) {
20
+ return r.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
21
21
  }
22
- function me(a) {
23
- switch (a) {
22
+ function me(r) {
23
+ switch (r) {
24
24
  case "lakh":
25
25
  return /(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;
26
26
  case "wan":
@@ -30,89 +30,89 @@ function me(a) {
30
30
  return /(\d)(?=(\d{3})+(?!\d))/g;
31
31
  }
32
32
  }
33
- function he(a, f, u) {
34
- var e = me(u), t = a.search(/[1-9]/);
35
- return t = t === -1 ? a.length : t, a.substring(0, t) + a.substring(t, a.length).replace(e, "$1" + f);
33
+ function he(r, s, u) {
34
+ var e = me(u), t = r.search(/[1-9]/);
35
+ return t = t === -1 ? r.length : t, r.substring(0, t) + r.substring(t, r.length).replace(e, "$1" + s);
36
36
  }
37
- function z(a, f) {
38
- f === void 0 && (f = !0);
39
- var u = a[0] === "-", e = u && f;
40
- a = a.replace("-", "");
41
- var t = a.split("."), r = t[0], o = t[1] || "";
37
+ function z(r, s) {
38
+ s === void 0 && (s = !0);
39
+ var u = r[0] === "-", e = u && s;
40
+ r = r.replace("-", "");
41
+ var t = r.split("."), a = t[0], o = t[1] || "";
42
42
  return {
43
- beforeDecimal: r,
43
+ beforeDecimal: a,
44
44
  afterDecimal: o,
45
45
  hasNagation: u,
46
46
  addNegation: e
47
47
  };
48
48
  }
49
- function ge(a) {
50
- if (!a)
51
- return a;
52
- var f = a[0] === "-";
53
- f && (a = a.substring(1, a.length));
54
- var u = a.split("."), e = u[0].replace(/^0+/, "") || "0", t = u[1] || "";
55
- return (f ? "-" : "") + e + (t ? "." + t : "");
49
+ function ge(r) {
50
+ if (!r)
51
+ return r;
52
+ var s = r[0] === "-";
53
+ s && (r = r.substring(1, r.length));
54
+ var u = r.split("."), e = u[0].replace(/^0+/, "") || "0", t = u[1] || "";
55
+ return (s ? "-" : "") + e + (t ? "." + t : "");
56
56
  }
57
- function Q(a, f, u) {
58
- for (var e = "", t = u ? "0" : "", r = 0; r <= f - 1; r++)
59
- e += a[r] || t;
57
+ function Q(r, s, u) {
58
+ for (var e = "", t = u ? "0" : "", a = 0; a <= s - 1; a++)
59
+ e += r[a] || t;
60
60
  return e;
61
61
  }
62
- function q(a, f) {
63
- return Array(f + 1).join(a);
62
+ function q(r, s) {
63
+ return Array(s + 1).join(r);
64
64
  }
65
- function ve(a) {
66
- a += "";
67
- var f = a[0] === "-" ? "-" : "";
68
- f && (a = a.substring(1));
69
- var u = a.split(/[eE]/g), e = u[0], t = u[1];
65
+ function ve(r) {
66
+ r += "";
67
+ var s = r[0] === "-" ? "-" : "";
68
+ s && (r = r.substring(1));
69
+ var u = r.split(/[eE]/g), e = u[0], t = u[1];
70
70
  if (t = Number(t), !t)
71
- return f + e;
71
+ return s + e;
72
72
  e = e.replace(".", "");
73
- var r = 1 + t, o = e.length;
74
- return r < 0 ? e = "0." + q("0", Math.abs(r)) + e : r >= o ? e = e + q("0", r - o) : e = (e.substring(0, r) || "0") + "." + e.substring(r), f + e;
73
+ var a = 1 + t, o = e.length;
74
+ return a < 0 ? e = "0." + q("0", Math.abs(a)) + e : a >= o ? e = e + q("0", a - o) : e = (e.substring(0, a) || "0") + "." + e.substring(a), s + e;
75
75
  }
76
- function Se(a, f, u) {
77
- if (["", "-"].indexOf(a) !== -1)
78
- return a;
79
- var e = a.indexOf(".") !== -1 && f, t = z(a), r = t.beforeDecimal, o = t.afterDecimal, s = t.hasNagation, i = parseFloat("0." + (o || "0")), n = o.length <= f ? "0." + o : i.toFixed(f), l = n.split("."), p = r.split("").reverse().reduce(function(m, S, x) {
76
+ function Se(r, s, u) {
77
+ if (["", "-"].indexOf(r) !== -1)
78
+ return r;
79
+ var e = r.indexOf(".") !== -1 && s, t = z(r), a = t.beforeDecimal, o = t.afterDecimal, f = t.hasNagation, i = parseFloat("0." + (o || "0")), n = o.length <= s ? "0." + o : i.toFixed(s), l = n.split("."), p = a.split("").reverse().reduce(function(m, S, x) {
80
80
  return m.length > x ? (Number(m[0]) + Number(S)).toString() + m.substring(1, m.length) : S + m;
81
81
  }, l[0]), c = Q(
82
82
  l[1] || "",
83
- Math.min(f, o.length),
83
+ Math.min(s, o.length),
84
84
  u
85
- ), d = s ? "-" : "", h = e ? "." : "";
85
+ ), d = f ? "-" : "", h = e ? "." : "";
86
86
  return "" + d + p + h + c;
87
87
  }
88
- function H(a, f) {
89
- if (a.value = a.value, a !== null) {
90
- if (a.createTextRange) {
91
- var u = a.createTextRange();
92
- return u.move("character", f), u.select(), !0;
88
+ function H(r, s) {
89
+ if (r.value = r.value, r !== null) {
90
+ if (r.createTextRange) {
91
+ var u = r.createTextRange();
92
+ return u.move("character", s), u.select(), !0;
93
93
  }
94
- return a.selectionStart || a.selectionStart === 0 ? (a.focus(), a.setSelectionRange(f, f), !0) : (a.focus(), !1);
94
+ return r.selectionStart || r.selectionStart === 0 ? (r.focus(), r.setSelectionRange(s, s), !0) : (r.focus(), !1);
95
95
  }
96
96
  }
97
- function ye(a, f) {
98
- for (var u = 0, e = 0, t = a.length, r = f.length; a[u] === f[u] && u < t; )
97
+ function ye(r, s) {
98
+ for (var u = 0, e = 0, t = r.length, a = s.length; r[u] === s[u] && u < t; )
99
99
  u++;
100
- for (; a[t - 1 - e] === f[r - 1 - e] && r - e > u && t - e > u; )
100
+ for (; r[t - 1 - e] === s[a - 1 - e] && a - e > u && t - e > u; )
101
101
  e++;
102
102
  return { start: u, end: t - e };
103
103
  }
104
- function K(a, f, u) {
105
- return Math.min(Math.max(a, f), u);
104
+ function K(r, s, u) {
105
+ return Math.min(Math.max(r, s), u);
106
106
  }
107
- function J(a) {
108
- return Math.max(a.selectionStart, a.selectionEnd);
107
+ function J(r) {
108
+ return Math.max(r.selectionStart, r.selectionEnd);
109
109
  }
110
- function xe(a) {
111
- return a || typeof navigator < "u" && !(navigator.platform && /iPhone|iPod/.test(navigator.platform));
110
+ function xe(r) {
111
+ return r || typeof navigator < "u" && !(navigator.platform && /iPhone|iPod/.test(navigator.platform));
112
112
  }
113
- function be(a, f) {
113
+ function be(r, s) {
114
114
  var u = {};
115
- for (var e in a) Object.prototype.hasOwnProperty.call(a, e) && f.indexOf(e) === -1 && (u[e] = a[e]);
115
+ for (var e in r) Object.prototype.hasOwnProperty.call(r, e) && s.indexOf(e) === -1 && (u[e] = r[e]);
116
116
  return u;
117
117
  }
118
118
  var Ne = {
@@ -127,16 +127,16 @@ var Ne = {
127
127
  allowLeadingZeros: !1,
128
128
  isNumericString: !1,
129
129
  type: "text",
130
- onValueChange: E,
131
- onChange: E,
132
- onKeyDown: E,
133
- onMouseUp: E,
134
- onFocus: E,
135
- onBlur: E,
130
+ onValueChange: A,
131
+ onChange: A,
132
+ onKeyDown: A,
133
+ onMouseUp: A,
134
+ onFocus: A,
135
+ onBlur: A,
136
136
  isAllowed: de
137
- }, X = /* @__PURE__ */ function(a) {
138
- function f(u) {
139
- a.call(this, u);
137
+ }, X = /* @__PURE__ */ function(r) {
138
+ function s(u) {
139
+ r.call(this, u);
140
140
  var e = u.defaultValue;
141
141
  this.validateProps();
142
142
  var t = this.formatValueProp(e);
@@ -149,65 +149,65 @@ var Ne = {
149
149
  selectionEnd: 0
150
150
  }, this.onChange = this.onChange.bind(this), this.onKeyDown = this.onKeyDown.bind(this), this.onMouseUp = this.onMouseUp.bind(this), this.onFocus = this.onFocus.bind(this), this.onBlur = this.onBlur.bind(this);
151
151
  }
152
- return a && (f.__proto__ = a), f.prototype = Object.create(a && a.prototype), f.prototype.constructor = f, f.prototype.componentDidMount = function() {
152
+ return r && (s.__proto__ = r), s.prototype = Object.create(r && r.prototype), s.prototype.constructor = s, s.prototype.componentDidMount = function() {
153
153
  this.setState({
154
154
  mounted: !0
155
155
  });
156
- }, f.prototype.componentDidUpdate = function(e) {
156
+ }, s.prototype.componentDidUpdate = function(e) {
157
157
  this.updateValueIfRequired(e);
158
- }, f.prototype.componentWillUnmount = function() {
158
+ }, s.prototype.componentWillUnmount = function() {
159
159
  clearTimeout(this.focusTimeout), clearTimeout(this.caretPositionTimeout);
160
- }, f.prototype.updateValueIfRequired = function(e) {
161
- var t = this, r = t.props, o = t.state, s = t.focusedElm, i = o.value, n = o.numAsString;
162
- if (n === void 0 && (n = ""), e !== r) {
160
+ }, s.prototype.updateValueIfRequired = function(e) {
161
+ var t = this, a = t.props, o = t.state, f = t.focusedElm, i = o.value, n = o.numAsString;
162
+ if (n === void 0 && (n = ""), e !== a) {
163
163
  this.validateProps();
164
- var l = this.formatNumString(n), p = Z(r.value) ? l : this.formatValueProp(), c = this.removeFormatting(p), d = parseFloat(c), h = parseFloat(n);
164
+ var l = this.formatNumString(n), p = Z(a.value) ? l : this.formatValueProp(), c = this.removeFormatting(p), d = parseFloat(c), h = parseFloat(n);
165
165
  //while typing set state only when float value changes
166
166
  ((!isNaN(d) || !isNaN(h)) && d !== h || //can also set state when float value is same and the format props changes
167
167
  l !== i || //set state always when not in focus and formatted value is changed
168
- s === null && p !== i) && this.updateValue({
168
+ f === null && p !== i) && this.updateValue({
169
169
  formattedValue: p,
170
170
  numAsString: c,
171
- input: s,
171
+ input: f,
172
172
  source: "prop",
173
173
  event: null
174
174
  });
175
175
  }
176
- }, f.prototype.getFloatString = function(e) {
176
+ }, s.prototype.getFloatString = function(e) {
177
177
  e === void 0 && (e = "");
178
- var t = this.props, r = t.decimalScale, o = this.getSeparators(), s = o.decimalSeparator, i = this.getNumberRegex(!0), n = e[0] === "-";
179
- n && (e = e.replace("-", "")), s && r === 0 && (e = e.split(s)[0]), e = (e.match(i) || []).join("").replace(s, ".");
178
+ var t = this.props, a = t.decimalScale, o = this.getSeparators(), f = o.decimalSeparator, i = this.getNumberRegex(!0), n = e[0] === "-";
179
+ n && (e = e.replace("-", "")), f && a === 0 && (e = e.split(f)[0]), e = (e.match(i) || []).join("").replace(f, ".");
180
180
  var l = e.indexOf(".");
181
- return l !== -1 && (e = e.substring(0, l) + "." + e.substring(l + 1, e.length).replace(new RegExp(_(s), "g"), "")), n && (e = "-" + e), e;
182
- }, f.prototype.getNumberRegex = function(e, t) {
183
- var r = this.props, o = r.format, s = r.decimalScale, i = r.customNumerals, n = this.getSeparators(), l = n.decimalSeparator;
181
+ return l !== -1 && (e = e.substring(0, l) + "." + e.substring(l + 1, e.length).replace(new RegExp(_(f), "g"), "")), n && (e = "-" + e), e;
182
+ }, s.prototype.getNumberRegex = function(e, t) {
183
+ var a = this.props, o = a.format, f = a.decimalScale, i = a.customNumerals, n = this.getSeparators(), l = n.decimalSeparator;
184
184
  return new RegExp(
185
- "[0-9" + (i ? i.join("") : "") + "]" + (l && s !== 0 && !t && !o ? "|" + _(l) : ""),
185
+ "[0-9" + (i ? i.join("") : "") + "]" + (l && f !== 0 && !t && !o ? "|" + _(l) : ""),
186
186
  e ? "g" : void 0
187
187
  );
188
- }, f.prototype.getSeparators = function() {
189
- var e = this.props, t = e.decimalSeparator, r = this.props, o = r.thousandSeparator, s = r.allowedDecimalSeparators;
190
- return o === !0 && (o = ","), s || (s = [t, "."]), {
188
+ }, s.prototype.getSeparators = function() {
189
+ var e = this.props, t = e.decimalSeparator, a = this.props, o = a.thousandSeparator, f = a.allowedDecimalSeparators;
190
+ return o === !0 && (o = ","), f || (f = [t, "."]), {
191
191
  decimalSeparator: t,
192
192
  thousandSeparator: o,
193
- allowedDecimalSeparators: s
193
+ allowedDecimalSeparators: f
194
194
  };
195
- }, f.prototype.getMaskAtIndex = function(e) {
196
- var t = this.props, r = t.mask;
197
- return r === void 0 && (r = " "), typeof r == "string" ? r : r[e] || " ";
198
- }, f.prototype.getValueObject = function(e, t) {
199
- var r = parseFloat(t);
195
+ }, s.prototype.getMaskAtIndex = function(e) {
196
+ var t = this.props, a = t.mask;
197
+ return a === void 0 && (a = " "), typeof a == "string" ? a : a[e] || " ";
198
+ }, s.prototype.getValueObject = function(e, t) {
199
+ var a = parseFloat(t);
200
200
  return {
201
201
  formattedValue: e,
202
202
  value: t,
203
- floatValue: isNaN(r) ? void 0 : r
203
+ floatValue: isNaN(a) ? void 0 : a
204
204
  };
205
- }, f.prototype.validateProps = function() {
206
- var e = this.props, t = e.mask, r = this.getSeparators(), o = r.decimalSeparator, s = r.thousandSeparator;
207
- if (o === s)
205
+ }, s.prototype.validateProps = function() {
206
+ var e = this.props, t = e.mask, a = this.getSeparators(), o = a.decimalSeparator, f = a.thousandSeparator;
207
+ if (o === f)
208
208
  throw new Error(`
209
209
  Decimal separator can't be same as thousand separator.
210
- thousandSeparator: ` + s + ` (thousandSeparator = {true} is same as thousandSeparator = ",")
210
+ thousandSeparator: ` + f + ` (thousandSeparator = {true} is same as thousandSeparator = ",")
211
211
  decimalSeparator: ` + o + ` (default value for decimalSeparator is .)
212
212
  `);
213
213
  if (t) {
@@ -217,29 +217,29 @@ var Ne = {
217
217
  Mask ` + t + ` should not contain numeric character;
218
218
  `);
219
219
  }
220
- }, f.prototype.setPatchedCaretPosition = function(e, t, r) {
220
+ }, s.prototype.setPatchedCaretPosition = function(e, t, a) {
221
221
  H(e, t), this.caretPositionTimeout = setTimeout(function() {
222
- e.value === r && H(e, t);
222
+ e.value === a && H(e, t);
223
223
  }, 0);
224
- }, f.prototype.correctCaretPosition = function(e, t, r) {
225
- var o = this.props, s = o.prefix, i = o.suffix, n = o.format;
224
+ }, s.prototype.correctCaretPosition = function(e, t, a) {
225
+ var o = this.props, f = o.prefix, i = o.suffix, n = o.format;
226
226
  if (e === "")
227
227
  return 0;
228
228
  if (t = K(t, 0, e.length), !n) {
229
229
  var l = e[0] === "-";
230
- return K(t, s.length + (l ? 1 : 0), e.length - i.length);
230
+ return K(t, f.length + (l ? 1 : 0), e.length - i.length);
231
231
  }
232
- if (typeof n == "function" || n[t] === "#" && I(e[t]) || n[t - 1] === "#" && I(e[t - 1]))
232
+ if (typeof n == "function" || n[t] === "#" && O(e[t]) || n[t - 1] === "#" && O(e[t - 1]))
233
233
  return t;
234
234
  var p = n.indexOf("#"), c = n.lastIndexOf("#");
235
235
  t = K(t, p, c + 1);
236
- for (var d = n.substring(t, n.length).indexOf("#"), h = t, m = t + (d === -1 ? 0 : d); h > p && (n[h] !== "#" || !I(e[h])); )
236
+ for (var d = n.substring(t, n.length).indexOf("#"), h = t, m = t + (d === -1 ? 0 : d); h > p && (n[h] !== "#" || !O(e[h])); )
237
237
  h -= 1;
238
- var S = !I(e[m]) || r === "left" && t !== p || t - h < m - t;
239
- return S ? I(e[h]) ? h + 1 : h : m;
240
- }, f.prototype.getCaretPosition = function(e, t, r) {
241
- var o = this.props, s = o.format, i = this.state.value, n = this.getNumberRegex(!0), l = (e.match(n) || []).join(""), p = (t.match(n) || []).join(""), c, d;
242
- for (c = 0, d = 0; d < r; d++) {
238
+ var S = !O(e[m]) || a === "left" && t !== p || t - h < m - t;
239
+ return S ? O(e[h]) ? h + 1 : h : m;
240
+ }, s.prototype.getCaretPosition = function(e, t, a) {
241
+ var o = this.props, f = o.format, i = this.state.value, n = this.getNumberRegex(!0), l = (e.match(n) || []).join(""), p = (t.match(n) || []).join(""), c, d;
242
+ for (c = 0, d = 0; d < a; d++) {
243
243
  var h = e[d] || "", m = t[c] || "";
244
244
  if (!(!h.match(n) && h !== m) && !(h === "0" && m.match(n) && m !== "0" && l.length !== p.length)) {
245
245
  for (; h !== t[c] && c < t.length; )
@@ -247,138 +247,138 @@ var Ne = {
247
247
  c++;
248
248
  }
249
249
  }
250
- return typeof s == "string" && !i && (c = t.length), c = this.correctCaretPosition(t, c), c;
251
- }, f.prototype.removePrefixAndSuffix = function(e) {
252
- var t = this.props, r = t.format, o = t.prefix, s = t.suffix;
253
- if (!r && e) {
250
+ return typeof f == "string" && !i && (c = t.length), c = this.correctCaretPosition(t, c), c;
251
+ }, s.prototype.removePrefixAndSuffix = function(e) {
252
+ var t = this.props, a = t.format, o = t.prefix, f = t.suffix;
253
+ if (!a && e) {
254
254
  var i = e[0] === "-";
255
255
  i && (e = e.substring(1, e.length)), e = o && e.indexOf(o) === 0 ? e.substring(o.length, e.length) : e;
256
- var n = e.lastIndexOf(s);
257
- e = s && n !== -1 && n === e.length - s.length ? e.substring(0, n) : e, i && (e = "-" + e);
256
+ var n = e.lastIndexOf(f);
257
+ e = f && n !== -1 && n === e.length - f.length ? e.substring(0, n) : e, i && (e = "-" + e);
258
258
  }
259
259
  return e;
260
- }, f.prototype.removePatternFormatting = function(e) {
261
- for (var t = this.props, r = t.format, o = r.split("#").filter(function(d) {
260
+ }, s.prototype.removePatternFormatting = function(e) {
261
+ for (var t = this.props, a = t.format, o = a.split("#").filter(function(d) {
262
262
  return d !== "";
263
- }), s = 0, i = "", n = 0, l = o.length; n <= l; n++) {
264
- var p = o[n] || "", c = n === l ? e.length : e.indexOf(p, s);
263
+ }), f = 0, i = "", n = 0, l = o.length; n <= l; n++) {
264
+ var p = o[n] || "", c = n === l ? e.length : e.indexOf(p, f);
265
265
  if (c === -1) {
266
266
  i = e;
267
267
  break;
268
268
  } else
269
- i += e.substring(s, c), s = c + p.length;
269
+ i += e.substring(f, c), f = c + p.length;
270
270
  }
271
271
  return (i.match(this.getNumberRegex(!0)) || []).join("");
272
- }, f.prototype.removeFormatting = function(e) {
273
- var t = this.props, r = t.format, o = t.removeFormatting;
274
- return e && (r ? typeof r == "string" ? e = this.removePatternFormatting(e) : typeof o == "function" ? e = o(e) : e = (e.match(this.getNumberRegex(!0)) || []).join("") : (e = this.removePrefixAndSuffix(e), e = this.getFloatString(e)), e);
275
- }, f.prototype.formatWithPattern = function(e) {
276
- for (var t = this.props, r = t.format, o = 0, s = r.split(""), i = 0, n = r.length; i < n; i++)
277
- r[i] === "#" && (s[i] = e[o] || this.getMaskAtIndex(o), o += 1);
278
- return s.join("");
279
- }, f.prototype.formatAsNumber = function(e) {
280
- var t = this.props, r = t.decimalScale, o = t.fixedDecimalScale, s = t.prefix, i = t.suffix, n = t.allowNegative, l = t.thousandsGroupStyle, p = this.getSeparators(), c = p.thousandSeparator, d = p.decimalSeparator, h = e.indexOf(".") !== -1 || r && o, m = z(e, n), S = m.beforeDecimal, x = m.afterDecimal, b = m.addNegation;
281
- return r !== void 0 && (x = Q(x, r, o)), c && (S = he(S, c, l)), s && (S = s + S), i && (x = x + i), b && (S = "-" + S), e = S + (h && d || "") + x, e;
282
- }, f.prototype.formatNumString = function(e) {
272
+ }, s.prototype.removeFormatting = function(e) {
273
+ var t = this.props, a = t.format, o = t.removeFormatting;
274
+ return e && (a ? typeof a == "string" ? e = this.removePatternFormatting(e) : typeof o == "function" ? e = o(e) : e = (e.match(this.getNumberRegex(!0)) || []).join("") : (e = this.removePrefixAndSuffix(e), e = this.getFloatString(e)), e);
275
+ }, s.prototype.formatWithPattern = function(e) {
276
+ for (var t = this.props, a = t.format, o = 0, f = a.split(""), i = 0, n = a.length; i < n; i++)
277
+ a[i] === "#" && (f[i] = e[o] || this.getMaskAtIndex(o), o += 1);
278
+ return f.join("");
279
+ }, s.prototype.formatAsNumber = function(e) {
280
+ var t = this.props, a = t.decimalScale, o = t.fixedDecimalScale, f = t.prefix, i = t.suffix, n = t.allowNegative, l = t.thousandsGroupStyle, p = this.getSeparators(), c = p.thousandSeparator, d = p.decimalSeparator, h = e.indexOf(".") !== -1 || a && o, m = z(e, n), S = m.beforeDecimal, x = m.afterDecimal, b = m.addNegation;
281
+ return a !== void 0 && (x = Q(x, a, o)), c && (S = he(S, c, l)), f && (S = f + S), i && (x = x + i), b && (S = "-" + S), e = S + (h && d || "") + x, e;
282
+ }, s.prototype.formatNumString = function(e) {
283
283
  e === void 0 && (e = "");
284
- var t = this.props, r = t.format, o = t.allowEmptyFormatting, s = t.customNumerals, i = e;
285
- if (s && s.length === 10) {
286
- var n = new RegExp("[" + s.join("") + "]", "g");
284
+ var t = this.props, a = t.format, o = t.allowEmptyFormatting, f = t.customNumerals, i = e;
285
+ if (f && f.length === 10) {
286
+ var n = new RegExp("[" + f.join("") + "]", "g");
287
287
  i = e.replace(
288
288
  n,
289
289
  function(l) {
290
- return s.indexOf(l).toString();
290
+ return f.indexOf(l).toString();
291
291
  }
292
292
  );
293
293
  }
294
- return e === "" && !o ? i = "" : e === "-" && !r ? i = "-" : typeof r == "string" ? i = this.formatWithPattern(i) : typeof r == "function" ? i = r(i) : i = this.formatAsNumber(i), i;
295
- }, f.prototype.formatValueProp = function(e) {
296
- var t = this.props, r = t.format, o = t.decimalScale, s = t.fixedDecimalScale, i = t.allowEmptyFormatting, n = this.props, l = n.value, p = n.isNumericString;
294
+ return e === "" && !o ? i = "" : e === "-" && !a ? i = "-" : typeof a == "string" ? i = this.formatWithPattern(i) : typeof a == "function" ? i = a(i) : i = this.formatAsNumber(i), i;
295
+ }, s.prototype.formatValueProp = function(e) {
296
+ var t = this.props, a = t.format, o = t.decimalScale, f = t.fixedDecimalScale, i = t.allowEmptyFormatting, n = this.props, l = n.value, p = n.isNumericString;
297
297
  l = Z(l) ? e : l;
298
298
  var c = !l && l !== 0;
299
299
  if (c && i && (l = ""), c && !i)
300
300
  return "";
301
- typeof l == "number" && (l = ve(l), p = !0), l === "Infinity" && p && (l = ""), p && !r && typeof o == "number" && (l = Se(l, o, s));
301
+ typeof l == "number" && (l = ve(l), p = !0), l === "Infinity" && p && (l = ""), p && !a && typeof o == "number" && (l = Se(l, o, f));
302
302
  var d = p ? this.formatNumString(l) : this.formatInput(l);
303
303
  return d;
304
- }, f.prototype.formatNegation = function(e) {
304
+ }, s.prototype.formatNegation = function(e) {
305
305
  e === void 0 && (e = "");
306
- var t = this.props, r = t.allowNegative, o = new RegExp("(-)"), s = new RegExp("(-)(.)*(-)"), i = o.test(e), n = s.test(e);
307
- return e = e.replace(/-/g, ""), i && !n && r && (e = "-" + e), e;
308
- }, f.prototype.formatInput = function(e) {
306
+ var t = this.props, a = t.allowNegative, o = new RegExp("(-)"), f = new RegExp("(-)(.)*(-)"), i = o.test(e), n = f.test(e);
307
+ return e = e.replace(/-/g, ""), i && !n && a && (e = "-" + e), e;
308
+ }, s.prototype.formatInput = function(e) {
309
309
  e === void 0 && (e = "");
310
- var t = this.props, r = t.format;
311
- return r || (e = this.removePrefixAndSuffix(e), e = this.formatNegation(e)), e = this.removeFormatting(e), this.formatNumString(e);
312
- }, f.prototype.isCharacterAFormat = function(e, t) {
313
- var r = this.props, o = r.format, s = r.prefix, i = r.suffix, n = r.decimalScale, l = r.fixedDecimalScale, p = this.getSeparators(), c = p.decimalSeparator;
314
- return !!(typeof o == "string" && o[e] !== "#" || !o && (e < s.length || e >= t.length - i.length || n && l && t[e] === c));
315
- }, f.prototype.correctInputValue = function(e, t, r) {
316
- var o = this, s = this.props, i = s.format, n = s.allowNegative, l = s.prefix, p = s.suffix, c = s.decimalScale, d = this.getSeparators(), h = d.allowedDecimalSeparators, m = d.decimalSeparator, S = this.state.numAsString || "", x = this.selectionBeforeInput, b = x.selectionStart, w = x.selectionEnd, P = ye(t, r), g = P.start, N = P.end;
317
- if (!i && g === N && h.indexOf(r[b]) !== -1) {
318
- var F = c === 0 ? "" : m;
319
- return r.substr(0, b) + F + r.substr(b + 1, r.length);
310
+ var t = this.props, a = t.format;
311
+ return a || (e = this.removePrefixAndSuffix(e), e = this.formatNegation(e)), e = this.removeFormatting(e), this.formatNumString(e);
312
+ }, s.prototype.isCharacterAFormat = function(e, t) {
313
+ var a = this.props, o = a.format, f = a.prefix, i = a.suffix, n = a.decimalScale, l = a.fixedDecimalScale, p = this.getSeparators(), c = p.decimalSeparator;
314
+ return !!(typeof o == "string" && o[e] !== "#" || !o && (e < f.length || e >= t.length - i.length || n && l && t[e] === c));
315
+ }, s.prototype.correctInputValue = function(e, t, a) {
316
+ var o = this, f = this.props, i = f.format, n = f.allowNegative, l = f.prefix, p = f.suffix, c = f.decimalScale, d = this.getSeparators(), h = d.allowedDecimalSeparators, m = d.decimalSeparator, S = this.state.numAsString || "", x = this.selectionBeforeInput, b = x.selectionStart, D = x.selectionEnd, F = ye(t, a), g = F.start, N = F.end;
317
+ if (!i && g === N && h.indexOf(a[b]) !== -1) {
318
+ var $ = c === 0 ? "" : m;
319
+ return a.substr(0, b) + $ + a.substr(b + 1, a.length);
320
320
  }
321
- var T = i ? 0 : l.length, $ = t.length - (i ? 0 : p.length);
321
+ var E = i ? 0 : l.length, I = t.length - (i ? 0 : p.length);
322
322
  if (
323
323
  // don't do anything if something got added
324
- r.length > t.length || // or if the new value is an empty string
325
- !r.length || // or if nothing has changed, in which case start will be same as end
324
+ a.length > t.length || // or if the new value is an empty string
325
+ !a.length || // or if nothing has changed, in which case start will be same as end
326
326
  g === N || // or in case if whole input is selected and new value is typed
327
- b === 0 && w === t.length || // or in case if the whole content is replaced by browser, example (autocomplete)
327
+ b === 0 && D === t.length || // or in case if the whole content is replaced by browser, example (autocomplete)
328
328
  g === 0 && N === t.length || // or if charcters between prefix and suffix is selected.
329
329
  // For numeric inputs we apply the format so, prefix and suffix can be ignored
330
- b === T && w === $
330
+ b === E && D === I
331
331
  )
332
- return r;
333
- var O = t.substr(g, N - g), j = !![].concat(O).find(
334
- function(C, V) {
335
- return o.isCharacterAFormat(V + g, t);
332
+ return a;
333
+ var V = t.substr(g, N - g), M = !![].concat(V).find(
334
+ function(P, T) {
335
+ return o.isCharacterAFormat(T + g, t);
336
336
  }
337
337
  );
338
- if (j) {
339
- var k = t.substr(g), A = {}, y = [];
340
- [].concat(k).forEach(function(C, V) {
341
- o.isCharacterAFormat(V + g, t) ? A[V] = C : V > O.length - 1 && y.push(C);
342
- }), Object.keys(A).forEach(function(C) {
343
- y.length > C ? y.splice(C, 0, A[C]) : y.push(A[C]);
344
- }), r = t.substr(0, g) + y.join("");
338
+ if (M) {
339
+ var j = t.substr(g), R = {}, y = [];
340
+ [].concat(j).forEach(function(P, T) {
341
+ o.isCharacterAFormat(T + g, t) ? R[T] = P : T > V.length - 1 && y.push(P);
342
+ }), Object.keys(R).forEach(function(P) {
343
+ y.length > P ? y.splice(P, 0, R[P]) : y.push(R[P]);
344
+ }), a = t.substr(0, g) + y.join("");
345
345
  }
346
346
  if (!i) {
347
- var D = this.removeFormatting(r), U = z(
348
- D,
347
+ var C = this.removeFormatting(a), U = z(
348
+ C,
349
349
  n
350
- ), ee = U.beforeDecimal, te = U.afterDecimal, re = U.addNegation, ae = e < r.indexOf(m) + 1;
351
- if (D.length < S.length && ae && ee === "" && !parseFloat(te))
350
+ ), ee = U.beforeDecimal, te = U.afterDecimal, re = U.addNegation, ae = e < a.indexOf(m) + 1;
351
+ if (C.length < S.length && ae && ee === "" && !parseFloat(te))
352
352
  return re ? "-" : "";
353
353
  }
354
- return r;
355
- }, f.prototype.updateValue = function(e) {
356
- var t = e.formattedValue, r = e.input, o = e.setCaretPosition;
354
+ return a;
355
+ }, s.prototype.updateValue = function(e) {
356
+ var t = e.formattedValue, a = e.input, o = e.setCaretPosition;
357
357
  o === void 0 && (o = !0);
358
- var s = e.source, i = e.event, n = e.numAsString, l = e.caretPos, p = this.props, c = p.onValueChange, d = this.state, h = d.value;
359
- if (r) {
358
+ var f = e.source, i = e.event, n = e.numAsString, l = e.caretPos, p = this.props, c = p.onValueChange, d = this.state, h = d.value;
359
+ if (a) {
360
360
  if (l === void 0 && o) {
361
- var m = e.inputValue || r.value, S = J(r);
362
- r.value = t, l = this.getCaretPosition(m, t, S);
361
+ var m = e.inputValue || a.value, S = J(a);
362
+ a.value = t, l = this.getCaretPosition(m, t, S);
363
363
  }
364
- r.value = t, o && this.setPatchedCaretPosition(r, l, t);
364
+ a.value = t, o && this.setPatchedCaretPosition(a, l, t);
365
365
  }
366
- n === void 0 && (n = this.removeFormatting(t)), t !== h && (this.setState({ value: t, numAsString: n }), c(this.getValueObject(t, n), { event: i, source: s }));
367
- }, f.prototype.onChange = function(e) {
368
- var t = e.target, r = t.value, o = this, s = o.state, i = o.props, n = i.isAllowed, l = s.value || "", p = J(t);
369
- r = this.correctInputValue(p, l, r);
370
- var c = this.formatInput(r) || "", d = this.removeFormatting(c), h = this.getValueObject(c, d), m = n(h);
366
+ n === void 0 && (n = this.removeFormatting(t)), t !== h && (this.setState({ value: t, numAsString: n }), c(this.getValueObject(t, n), { event: i, source: f }));
367
+ }, s.prototype.onChange = function(e) {
368
+ var t = e.target, a = t.value, o = this, f = o.state, i = o.props, n = i.isAllowed, l = f.value || "", p = J(t);
369
+ a = this.correctInputValue(p, l, a);
370
+ var c = this.formatInput(a) || "", d = this.removeFormatting(c), h = this.getValueObject(c, d), m = n(h);
371
371
  m || (c = l), this.updateValue({
372
372
  formattedValue: c,
373
373
  numAsString: d,
374
- inputValue: r,
374
+ inputValue: a,
375
375
  input: t,
376
376
  event: e,
377
377
  source: "event"
378
378
  }), m && i.onChange(e);
379
- }, f.prototype.onBlur = function(e) {
380
- var t = this, r = t.props, o = t.state, s = r.format, i = r.onBlur, n = r.allowLeadingZeros, l = o.numAsString, p = o.value;
381
- if (this.focusedElm = null, clearTimeout(this.focusTimeout), clearTimeout(this.caretPositionTimeout), !s) {
379
+ }, s.prototype.onBlur = function(e) {
380
+ var t = this, a = t.props, o = t.state, f = a.format, i = a.onBlur, n = a.allowLeadingZeros, l = o.numAsString, p = o.value;
381
+ if (this.focusedElm = null, clearTimeout(this.focusTimeout), clearTimeout(this.caretPositionTimeout), !f) {
382
382
  isNaN(parseFloat(l)) && (l = ""), n || (l = ge(l));
383
383
  var c = this.formatNumString(l);
384
384
  if (c !== p) {
@@ -394,58 +394,58 @@ var Ne = {
394
394
  }
395
395
  }
396
396
  i(e);
397
- }, f.prototype.onKeyDown = function(e) {
398
- var t = e.target, r = e.key, o = t.selectionStart, s = t.selectionEnd, i = t.value;
397
+ }, s.prototype.onKeyDown = function(e) {
398
+ var t = e.target, a = e.key, o = t.selectionStart, f = t.selectionEnd, i = t.value;
399
399
  i === void 0 && (i = "");
400
- var n, l = this.props, p = l.decimalScale, c = l.fixedDecimalScale, d = l.prefix, h = l.suffix, m = l.format, S = l.onKeyDown, x = p !== void 0 && c, b = this.getNumberRegex(!1, x), w = new RegExp("-"), P = typeof m == "string";
400
+ var n, l = this.props, p = l.decimalScale, c = l.fixedDecimalScale, d = l.prefix, h = l.suffix, m = l.format, S = l.onKeyDown, x = p !== void 0 && c, b = this.getNumberRegex(!1, x), D = new RegExp("-"), F = typeof m == "string";
401
401
  if (this.selectionBeforeInput = {
402
402
  selectionStart: o,
403
- selectionEnd: s
404
- }, r === "ArrowLeft" || r === "Backspace" ? n = o - 1 : r === "ArrowRight" ? n = o + 1 : r === "Delete" && (n = o), n === void 0 || o !== s) {
403
+ selectionEnd: f
404
+ }, a === "ArrowLeft" || a === "Backspace" ? n = o - 1 : a === "ArrowRight" ? n = o + 1 : a === "Delete" && (n = o), n === void 0 || o !== f) {
405
405
  S(e);
406
406
  return;
407
407
  }
408
- var g = n, N = P ? m.indexOf("#") : d.length, F = P ? m.lastIndexOf("#") + 1 : i.length - h.length;
409
- if (r === "ArrowLeft" || r === "ArrowRight") {
410
- var T = r === "ArrowLeft" ? "left" : "right";
411
- g = this.correctCaretPosition(i, n, T);
412
- } else if (r === "Delete" && !b.test(i[n]) && !w.test(i[n]))
413
- for (; !b.test(i[g]) && g < F; )
408
+ var g = n, N = F ? m.indexOf("#") : d.length, $ = F ? m.lastIndexOf("#") + 1 : i.length - h.length;
409
+ if (a === "ArrowLeft" || a === "ArrowRight") {
410
+ var E = a === "ArrowLeft" ? "left" : "right";
411
+ g = this.correctCaretPosition(i, n, E);
412
+ } else if (a === "Delete" && !b.test(i[n]) && !D.test(i[n]))
413
+ for (; !b.test(i[g]) && g < $; )
414
414
  g++;
415
- else if (r === "Backspace" && !b.test(i[n])) {
415
+ else if (a === "Backspace" && !b.test(i[n])) {
416
416
  if (o <= N + 1 && i[0] === "-" && typeof m > "u") {
417
- var $ = i.substring(1);
417
+ var I = i.substring(1);
418
418
  this.updateValue({
419
- formattedValue: $,
419
+ formattedValue: I,
420
420
  caretPos: g,
421
421
  input: t,
422
422
  event: e,
423
423
  source: "event"
424
424
  });
425
- } else if (!w.test(i[n])) {
425
+ } else if (!D.test(i[n])) {
426
426
  for (; !b.test(i[g - 1]) && g > N; )
427
427
  g--;
428
428
  g = this.correctCaretPosition(i, g, "left");
429
429
  }
430
430
  }
431
- (g !== n || n < N || n > F) && (e.preventDefault(), this.setPatchedCaretPosition(t, g, i)), e.isUnitTestRun && this.setPatchedCaretPosition(t, g, i), S(e);
432
- }, f.prototype.onMouseUp = function(e) {
433
- var t = e.target, r = t.selectionStart, o = t.selectionEnd, s = t.value;
434
- if (s === void 0 && (s = ""), r === o) {
435
- var i = this.correctCaretPosition(s, r);
436
- i !== r && this.setPatchedCaretPosition(t, i, s);
431
+ (g !== n || n < N || n > $) && (e.preventDefault(), this.setPatchedCaretPosition(t, g, i)), e.isUnitTestRun && this.setPatchedCaretPosition(t, g, i), S(e);
432
+ }, s.prototype.onMouseUp = function(e) {
433
+ var t = e.target, a = t.selectionStart, o = t.selectionEnd, f = t.value;
434
+ if (f === void 0 && (f = ""), a === o) {
435
+ var i = this.correctCaretPosition(f, a);
436
+ i !== a && this.setPatchedCaretPosition(t, i, f);
437
437
  }
438
438
  this.props.onMouseUp(e);
439
- }, f.prototype.onFocus = function(e) {
439
+ }, s.prototype.onFocus = function(e) {
440
440
  var t = this;
441
441
  e.persist(), this.focusedElm = e.target, this.focusTimeout = setTimeout(function() {
442
- var r = e.target, o = r.selectionStart, s = r.selectionEnd, i = r.value;
442
+ var a = e.target, o = a.selectionStart, f = a.selectionEnd, i = a.value;
443
443
  i === void 0 && (i = "");
444
444
  var n = t.correctCaretPosition(i, o);
445
- n !== o && !(o === 0 && s === i.length) && t.setPatchedCaretPosition(r, n, i), t.props.onFocus(e);
445
+ n !== o && !(o === 0 && f === i.length) && t.setPatchedCaretPosition(a, n, i), t.props.onFocus(e);
446
446
  }, 0);
447
- }, f.prototype.render = function() {
448
- var e = this.props, t = e.type, r = e.displayType, o = e.customInput, s = e.renderText, i = e.getInputRef, n = e.format;
447
+ }, s.prototype.render = function() {
448
+ var e = this.props, t = e.type, a = e.displayType, o = e.customInput, f = e.renderText, i = e.getInputRef, n = e.format;
449
449
  e.thousandSeparator, e.decimalSeparator, e.allowedDecimalSeparators, e.thousandsGroupStyle, e.decimalScale, e.fixedDecimalScale, e.prefix, e.suffix, e.removeFormatting, e.mask, e.defaultValue, e.isNumericString, e.allowNegative, e.allowEmptyFormatting, e.allowLeadingZeros, e.onValueChange, e.isAllowed, e.customNumerals, e.onChange, e.onKeyDown, e.onMouseUp, e.onFocus, e.onBlur, e.value;
450
450
  var l = be(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "thousandSeparator", "decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "decimalScale", "fixedDecimalScale", "prefix", "suffix", "removeFormatting", "mask", "defaultValue", "isNumericString", "allowNegative", "allowEmptyFormatting", "allowLeadingZeros", "onValueChange", "isAllowed", "customNumerals", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value"]), p = l, c = this.state, d = c.value, h = c.mounted, m = h && xe(n) ? "numeric" : void 0, S = Object.assign({ inputMode: m }, p, {
451
451
  type: t,
@@ -456,49 +456,64 @@ var Ne = {
456
456
  onFocus: this.onFocus,
457
457
  onBlur: this.onBlur
458
458
  });
459
- if (r === "text")
460
- return s ? s(d, p) || null : B.createElement(
459
+ if (a === "text")
460
+ return f ? f(d, p) || null : k.createElement(
461
461
  "span",
462
462
  Object.assign({}, p, { ref: i }),
463
463
  d
464
464
  );
465
465
  if (o) {
466
466
  var x = o;
467
- return B.createElement(x, Object.assign({}, S, { ref: i }));
467
+ return k.createElement(x, Object.assign({}, S, { ref: i }));
468
468
  }
469
- return B.createElement("input", Object.assign({}, S, { ref: i }));
470
- }, f;
471
- }(B.Component);
469
+ return k.createElement("input", Object.assign({}, S, { ref: i }));
470
+ }, s;
471
+ }(k.Component);
472
472
  X.defaultProps = Ne;
473
473
  const we = G.div`
474
474
  display: flex;
475
475
  align-items: center;
476
476
 
477
- min-height: ${(a) => M(a.theme, a.size)};
478
- max-height: ${(a) => M(a.theme, a.size)};
479
- background-color: ${(a) => R(
480
- a.theme,
477
+ min-height: ${(r) => B(r.theme, r.size)};
478
+ max-height: ${(r) => B(r.theme, r.size)};
479
+ background-color: ${(r) => w(
480
+ r.theme,
481
481
  "Input",
482
- a.color,
482
+ r.color,
483
483
  "enabled",
484
484
  "background"
485
485
  )};
486
486
  border: 1px solid
487
- ${(a) => R(
488
- a.theme,
487
+ ${(r) => w(
488
+ r.theme,
489
489
  "Input",
490
- a.focused === !0 ? "primary" : a.color,
490
+ r.focused === !0 ? "primary" : r.color,
491
491
  "enabled",
492
492
  "border"
493
493
  )};
494
- border-radius: ${(a) => le(a.theme, "regular")};
494
+ border-radius: ${(r) => le(r.theme, "regular")};
495
495
 
496
- ${(a) => a.focused === !0 && a.readOnly !== !0 ? ue(a.theme) : ""}
497
- ${(a) => a.isDisabled === !0 ? W(a.theme) : ""}
498
- ${(a) => a.isDisabled === !0 ? "border: 1px solid " + R(
499
- a.theme,
496
+ ${(r) => r.focused === !0 && r.readOnly !== !0 ? ue(r.theme) : ""}
497
+ /* ${(r) => r.isDisabled === !0 ? W(r.theme) : ""} */
498
+ ${(r) => r.isDisabled === !0 && `background-color: ${w(
499
+ r.theme,
500
+ "Input",
501
+ r.color,
502
+ "disabled",
503
+ "background",
504
+ "backgroundOpacity"
505
+ )};
506
+ color: ${(s) => w(
507
+ s.theme,
500
508
  "Input",
501
- a.color,
509
+ s.color,
510
+ "disabled",
511
+ "text"
512
+ )};`}
513
+ ${(r) => r.isDisabled === !0 ? "border: 1px solid " + w(
514
+ r.theme,
515
+ "Input",
516
+ r.color,
502
517
  "disabled",
503
518
  "border"
504
519
  ) : ""}
@@ -511,23 +526,38 @@ const we = G.div`
511
526
  padding-bottom: 0.625rem;
512
527
  width: 100%;
513
528
 
514
- ${(a) => ce(a.theme, "Input", a.size, "enabled")}
515
- min-height: ${(a) => M(a.theme, a.size)};
516
- max-height: ${(a) => M(a.theme, a.size)};
517
- color: ${(a) => R(
518
- a.theme,
529
+ ${(r) => ce(r.theme, "Input", r.size, "enabled")}
530
+ min-height: ${(r) => B(r.theme, r.size)};
531
+ max-height: ${(r) => B(r.theme, r.size)};
532
+ color: ${(r) => w(
533
+ r.theme,
519
534
  "Input",
520
- a.focused === !0 ? "primary" : a.color,
535
+ r.focused === !0 ? "primary" : r.color,
521
536
  "enabled",
522
537
  "text"
523
538
  )};
524
- caret-color: ${(a) => R(a.theme, "Input", a.color, "enabled", "caret")};
525
- padding-right: ${(a) => a.suffix ? "0" : "0.75rem"};
526
- padding-left: ${(a) => a.prefix ? "0" : "0.75rem"};
539
+ caret-color: ${(r) => w(r.theme, "Input", r.color, "enabled", "caret")};
540
+ padding-right: ${(r) => r.suffix ? "0" : "0.75rem"};
541
+ padding-left: ${(r) => r.prefix ? "0" : "0.75rem"};
527
542
  }
528
543
 
529
544
  & input:disabled {
530
- ${(a) => W(a.theme)}
545
+ /* ${(r) => W(r.theme)} */
546
+ ${(r) => `background-color: ${w(
547
+ r.theme,
548
+ "Input",
549
+ r.color,
550
+ "disabled",
551
+ "background",
552
+ "backgroundOpacity"
553
+ )};
554
+ color: ${(s) => w(
555
+ s.theme,
556
+ "Input",
557
+ s.color,
558
+ "disabled",
559
+ "text"
560
+ )};`}
531
561
  background: none;
532
562
  }
533
563
 
@@ -536,31 +566,31 @@ const we = G.div`
536
566
  }
537
567
 
538
568
  & input::placeholder {
539
- color: ${(a) => R(
540
- a.theme,
569
+ color: ${(r) => w(
570
+ r.theme,
541
571
  "Input",
542
- a.color,
572
+ r.color,
543
573
  "enabled",
544
574
  "placeholder"
545
575
  )};
546
576
  }
547
577
  `, Y = G.span`
548
578
  padding: 0 12px;
549
- color: ${(a) => R(
550
- a.theme,
579
+ color: ${(r) => w(
580
+ r.theme,
551
581
  "Input",
552
- a.focused === !0 ? "primary" : a.color,
582
+ r.focused === !0 ? "primary" : r.color,
553
583
  "enabled",
554
584
  "prefix"
555
585
  )};
556
- `, De = G(Y)``, Ce = oe((a, f) => {
586
+ `, De = G(Y)``, Ce = oe((r, s) => {
557
587
  const {
558
588
  disabled: u,
559
589
  readOnly: e,
560
590
  debounceTime: t = 0,
561
- prefix: r,
591
+ prefix: a,
562
592
  suffix: o,
563
- thousandSeparator: s = ".",
593
+ thousandSeparator: f = ".",
564
594
  decimalSeparator: i = ",",
565
595
  decimalScale: n = 2,
566
596
  fixedDecimalScale: l = !0,
@@ -574,19 +604,19 @@ const we = G.div`
574
604
  className: S = "",
575
605
  style: x = {},
576
606
  size: b = "small",
577
- color: w = "primary",
578
- ...P
579
- } = a, g = pe(), [N, F] = ne(!1), T = se(
580
- fe((y, D) => $(y, D), t),
607
+ color: D = "primary",
608
+ ...F
609
+ } = r, g = pe(), [N, $] = ne(!1), E = se(
610
+ fe((y, C) => I(y, C), t),
581
611
  [c]
582
- ), $ = (y, D) => {
583
- c && (c == null || c(y, D)), m == null || m(y, D);
584
- }, O = (y, D) => {
585
- T(D.event, y == null ? void 0 : y.floatValue);
586
- }, j = () => n < 0 ? 0 : n > 17 ? 17 : n, k = (y) => {
587
- F(!0), h == null || h(y);
588
- }, A = (y) => {
589
- F(!1), d == null || d(y);
612
+ ), I = (y, C) => {
613
+ c && (c == null || c(y, C)), m == null || m(y, C);
614
+ }, V = (y, C) => {
615
+ E(C.event, y == null ? void 0 : y.floatValue);
616
+ }, M = () => n < 0 ? 0 : n > 17 ? 17 : n, j = (y) => {
617
+ $(!0), h == null || h(y);
618
+ }, R = (y) => {
619
+ $(!1), d == null || d(y);
590
620
  };
591
621
  return /* @__PURE__ */ ie(
592
622
  we,
@@ -594,47 +624,47 @@ const we = G.div`
594
624
  style: x,
595
625
  className: S,
596
626
  theme: g,
597
- color: w,
627
+ color: D,
598
628
  size: b,
599
- prefix: r,
629
+ prefix: a,
600
630
  suffix: o,
601
631
  focused: N,
602
632
  disabled: u,
603
633
  readOnly: e,
604
634
  children: [
605
- r && /* @__PURE__ */ L(
635
+ a && /* @__PURE__ */ L(
606
636
  Y,
607
637
  {
608
638
  theme: g,
609
- color: w,
639
+ color: D,
610
640
  focused: N,
611
641
  className: "lnc-input-prefix",
612
- children: r
642
+ children: a
613
643
  }
614
644
  ),
615
645
  /* @__PURE__ */ L(
616
646
  X,
617
647
  {
618
- getInputRef: f,
648
+ getInputRef: s,
619
649
  className: "lnc-decimal-input",
620
650
  disabled: u,
621
651
  readOnly: e,
622
- thousandSeparator: s,
652
+ thousandSeparator: f,
623
653
  decimalSeparator: i,
624
- decimalScale: j(),
654
+ decimalScale: M(),
625
655
  fixedDecimalScale: l,
626
656
  allowNegative: p,
627
- onFocus: k,
628
- onBlur: A,
629
- onValueChange: O,
630
- ...P
657
+ onFocus: j,
658
+ onBlur: R,
659
+ onValueChange: V,
660
+ ...F
631
661
  }
632
662
  ),
633
663
  o && /* @__PURE__ */ L(
634
664
  De,
635
665
  {
636
666
  theme: g,
637
- color: w,
667
+ color: D,
638
668
  focused: N,
639
669
  className: "lnc-input-suffix",
640
670
  children: o