@jigowatts/jigowatts-ui 0.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 (199) hide show
  1. package/README.md +50 -0
  2. package/dist/AccordionSummary-B4zooGpd.js +831 -0
  3. package/dist/ButtonBase-pxtIu13Q.js +866 -0
  4. package/dist/DateTimePicker-DJSOr5wM.js +4653 -0
  5. package/dist/ListContext-DOVwHqy-.js +180 -0
  6. package/dist/MenuItem-yBaT3_db.js +470 -0
  7. package/dist/Paper-COvYqxZa.js +522 -0
  8. package/dist/Tabs-D3lJRumZ.js +1085 -0
  9. package/dist/_commonjsHelpers-CT_km90n.js +30 -0
  10. package/dist/assets/index.css +1 -0
  11. package/dist/assets/index10.css +1 -0
  12. package/dist/assets/index11.css +1 -0
  13. package/dist/assets/index12.css +1 -0
  14. package/dist/assets/index13.css +1 -0
  15. package/dist/assets/index14.css +1 -0
  16. package/dist/assets/index15.css +1 -0
  17. package/dist/assets/index16.css +1 -0
  18. package/dist/assets/index17.css +1 -0
  19. package/dist/assets/index18.css +1 -0
  20. package/dist/assets/index19.css +1 -0
  21. package/dist/assets/index2.css +1 -0
  22. package/dist/assets/index20.css +1 -0
  23. package/dist/assets/index21.css +1 -0
  24. package/dist/assets/index22.css +1 -0
  25. package/dist/assets/index23.css +1 -0
  26. package/dist/assets/index24.css +1 -0
  27. package/dist/assets/index25.css +1 -0
  28. package/dist/assets/index26.css +1 -0
  29. package/dist/assets/index27.css +1 -0
  30. package/dist/assets/index3.css +1 -0
  31. package/dist/assets/index4.css +1 -0
  32. package/dist/assets/index5.css +1 -0
  33. package/dist/assets/index6.css +1 -0
  34. package/dist/assets/index7.css +1 -0
  35. package/dist/assets/index8.css +1 -0
  36. package/dist/assets/index9.css +1 -0
  37. package/dist/browser-DxfwT6rn.js +656 -0
  38. package/dist/components/Button/index.d.ts +28 -0
  39. package/dist/components/Button/index.js +18 -0
  40. package/dist/components/Button/index.test.d.ts +1 -0
  41. package/dist/components/Button/index.test.js +23 -0
  42. package/dist/components/Card/index.d.ts +16 -0
  43. package/dist/components/Card/index.js +37 -0
  44. package/dist/components/Card/index.test.d.ts +1 -0
  45. package/dist/components/Card/index.test.js +35 -0
  46. package/dist/components/CustomLink/index.d.ts +11 -0
  47. package/dist/components/CustomLink/index.js +1670 -0
  48. package/dist/components/CustomLink/index.test.d.ts +1 -0
  49. package/dist/components/CustomLink/index.test.js +40 -0
  50. package/dist/components/DataTable/index.d.ts +28 -0
  51. package/dist/components/DataTable/index.js +137 -0
  52. package/dist/components/DataTable/index.test.d.ts +1 -0
  53. package/dist/components/DataTable/index.test.js +3010 -0
  54. package/dist/components/DatePickerController/index.d.ts +16 -0
  55. package/dist/components/DatePickerController/index.js +83 -0
  56. package/dist/components/DatePickerController/index.test.d.ts +1 -0
  57. package/dist/components/DatePickerController/index.test.js +24 -0
  58. package/dist/components/ErrorMessage/index.d.ts +5 -0
  59. package/dist/components/ErrorMessage/index.js +11 -0
  60. package/dist/components/ErrorMessage/index.test.d.ts +1 -0
  61. package/dist/components/ErrorMessage/index.test.js +17 -0
  62. package/dist/components/EvseStateLabel/index.d.ts +5 -0
  63. package/dist/components/EvseStateLabel/index.js +36 -0
  64. package/dist/components/FlexButtons/index.d.ts +9 -0
  65. package/dist/components/FlexButtons/index.js +13 -0
  66. package/dist/components/Form/index.d.ts +8 -0
  67. package/dist/components/Form/index.js +11 -0
  68. package/dist/components/Form/index.test.d.ts +1 -0
  69. package/dist/components/Form/index.test.js +25 -0
  70. package/dist/components/FormItem/index.d.ts +9 -0
  71. package/dist/components/FormItem/index.js +19 -0
  72. package/dist/components/FormItem/index.test.d.ts +1 -0
  73. package/dist/components/FormItem/index.test.js +15 -0
  74. package/dist/components/FormTitle/index.d.ts +5 -0
  75. package/dist/components/FormTitle/index.js +11 -0
  76. package/dist/components/FormTitle/index.test.d.ts +1 -0
  77. package/dist/components/FormTitle/index.test.js +15 -0
  78. package/dist/components/Input/index.d.ts +15 -0
  79. package/dist/components/Input/index.js +39 -0
  80. package/dist/components/Input/index.test.d.ts +1 -0
  81. package/dist/components/Input/index.test.js +39 -0
  82. package/dist/components/InputController/index.d.ts +20 -0
  83. package/dist/components/InputController/index.js +81 -0
  84. package/dist/components/InputController/index.test.d.ts +1 -0
  85. package/dist/components/InputController/index.test.js +56 -0
  86. package/dist/components/InputGroup/index.d.ts +7 -0
  87. package/dist/components/InputGroup/index.js +11 -0
  88. package/dist/components/InputGroup/index.test.d.ts +1 -0
  89. package/dist/components/InputGroup/index.test.js +15 -0
  90. package/dist/components/Label/index.d.ts +7 -0
  91. package/dist/components/Label/index.js +14 -0
  92. package/dist/components/Label/index.test.d.ts +1 -0
  93. package/dist/components/Label/index.test.js +25 -0
  94. package/dist/components/LabeledContent/index.d.ts +15 -0
  95. package/dist/components/LabeledContent/index.js +28 -0
  96. package/dist/components/LabeledContent/index.test.d.ts +1 -0
  97. package/dist/components/LabeledContent/index.test.js +19 -0
  98. package/dist/components/LoadingOverlay/index.d.ts +2 -0
  99. package/dist/components/LoadingOverlay/index.js +134 -0
  100. package/dist/components/LoadingOverlay/index.test.d.ts +1 -0
  101. package/dist/components/LoadingOverlay/index.test.js +12 -0
  102. package/dist/components/Map/index.d.ts +8 -0
  103. package/dist/components/Map/index.js +6575 -0
  104. package/dist/components/MaxWidthContainer/index.d.ts +13 -0
  105. package/dist/components/MaxWidthContainer/index.js +15 -0
  106. package/dist/components/MaxWidthContainer/index.test.d.ts +1 -0
  107. package/dist/components/MaxWidthContainer/index.test.js +24 -0
  108. package/dist/components/NumericFieldController/index.d.ts +53 -0
  109. package/dist/components/NumericFieldController/index.js +620 -0
  110. package/dist/components/NumericFieldController/index.test.d.ts +1 -0
  111. package/dist/components/NumericFieldController/index.test.js +24 -0
  112. package/dist/components/OfflineLabel/index.d.ts +5 -0
  113. package/dist/components/OfflineLabel/index.js +34 -0
  114. package/dist/components/PageSizeSelector/index.d.ts +15 -0
  115. package/dist/components/PageSizeSelector/index.js +43 -0
  116. package/dist/components/Pagination/index.d.ts +9 -0
  117. package/dist/components/Pagination/index.js +7 -0
  118. package/dist/components/Pagination/index.test.d.ts +1 -0
  119. package/dist/components/Pagination/index.test.js +34 -0
  120. package/dist/components/PasswordInputController/index.d.ts +17 -0
  121. package/dist/components/PasswordInputController/index.js +78 -0
  122. package/dist/components/PasswordInputController/index.test.d.ts +1 -0
  123. package/dist/components/PasswordInputController/index.test.js +37 -0
  124. package/dist/components/RadioButton/index.d.ts +13 -0
  125. package/dist/components/RadioButton/index.js +7 -0
  126. package/dist/components/RadioButton/index.test.d.ts +1 -0
  127. package/dist/components/RadioButton/index.test.js +38 -0
  128. package/dist/components/RadioGroupController/index.d.ts +15 -0
  129. package/dist/components/RadioGroupController/index.js +48 -0
  130. package/dist/components/RadioGroupController/index.test.d.ts +1 -0
  131. package/dist/components/RadioGroupController/index.test.js +48 -0
  132. package/dist/components/RangeDatePicker/index.d.ts +14 -0
  133. package/dist/components/RangeDatePicker/index.js +1594 -0
  134. package/dist/components/RangeDatePickerController/index.d.ts +21 -0
  135. package/dist/components/RangeDatePickerController/index.js +123 -0
  136. package/dist/components/RangeDatePickerController/index.test.d.ts +1 -0
  137. package/dist/components/RangeDatePickerController/index.test.js +24 -0
  138. package/dist/components/ReportCard/index.d.ts +12 -0
  139. package/dist/components/ReportCard/index.js +18 -0
  140. package/dist/components/ReportCard/index.test.d.ts +1 -0
  141. package/dist/components/ReportCard/index.test.js +27 -0
  142. package/dist/components/ReportChart/index.d.ts +22 -0
  143. package/dist/components/ReportChart/index.js +23101 -0
  144. package/dist/components/ScrollableDialog/index.d.ts +19 -0
  145. package/dist/components/ScrollableDialog/index.js +42 -0
  146. package/dist/components/ScrollableDialog/index.test.d.ts +1 -0
  147. package/dist/components/ScrollableDialog/index.test.js +59 -0
  148. package/dist/components/SearchForm/index.d.ts +13 -0
  149. package/dist/components/SearchForm/index.js +86 -0
  150. package/dist/components/SelectBox/index.d.ts +18 -0
  151. package/dist/components/SelectBox/index.js +7 -0
  152. package/dist/components/SelectBox/index.test.d.ts +1 -0
  153. package/dist/components/SelectBox/index.test.js +34 -0
  154. package/dist/components/SelectBoxController/index.d.ts +20 -0
  155. package/dist/components/SelectBoxController/index.js +87 -0
  156. package/dist/components/SelectBoxController/index.test.d.ts +1 -0
  157. package/dist/components/SelectBoxController/index.test.js +52 -0
  158. package/dist/components/SubMenu/index.d.ts +22 -0
  159. package/dist/components/SubMenu/index.js +278 -0
  160. package/dist/components/SubMenu/index.test.d.ts +1 -0
  161. package/dist/components/SubMenu/index.test.js +41 -0
  162. package/dist/components/Tabs/index.d.ts +21 -0
  163. package/dist/components/Tabs/index.js +100 -0
  164. package/dist/components/Tabs/index.test.d.ts +1 -0
  165. package/dist/components/Tabs/index.test.js +24 -0
  166. package/dist/components/Textarea/index.d.ts +18 -0
  167. package/dist/components/Textarea/index.js +34 -0
  168. package/dist/components/Textarea/index.test.d.ts +1 -0
  169. package/dist/components/Textarea/index.test.js +25 -0
  170. package/dist/components/ToggleButton/index.d.ts +16 -0
  171. package/dist/components/ToggleButton/index.js +39 -0
  172. package/dist/components/ToggleButton/index.test.d.ts +1 -0
  173. package/dist/components/ToggleButton/index.test.js +49 -0
  174. package/dist/constants/datetime.d.ts +2 -0
  175. package/dist/constants/datetime.js +5 -0
  176. package/dist/createSvgIcon-B53UOwxg.js +183 -0
  177. package/dist/createSvgIcon-Dj8zNxRS.js +72 -0
  178. package/dist/index-BLPOOjNr.js +184 -0
  179. package/dist/index-BOjtnFU5.js +34 -0
  180. package/dist/index-Bs3JCwgu.js +689 -0
  181. package/dist/index-CICI7n5Y.js +19688 -0
  182. package/dist/index-CQDJfJT1.js +50 -0
  183. package/dist/index-C_i0-R5C.js +393 -0
  184. package/dist/index-DWRHnq8_.js +42 -0
  185. package/dist/index-Di2gTfPF.js +25175 -0
  186. package/dist/index-VF82hRp0.js +2522 -0
  187. package/dist/index-kvi6aotO.js +39 -0
  188. package/dist/index.d.ts +38 -0
  189. package/dist/index.esm-ChwJSgnF.js +1052 -0
  190. package/dist/index.js +77 -0
  191. package/dist/isEqual-BBhdD79C.js +667 -0
  192. package/dist/mergeSlotProps-J197zKan.js +63 -0
  193. package/dist/react.esm-C8amP77L.js +11182 -0
  194. package/dist/styled-CWju4EfZ.js +2702 -0
  195. package/dist/unsupportedProp-DZaWZqWQ.js +30 -0
  196. package/dist/useControlled-BQCJRJNJ.js +64 -0
  197. package/dist/useIsFocusVisible-BxB-Hdhb.js +124 -0
  198. package/dist/useSlotProps-Bh7akxXV.js +33 -0
  199. package/package.json +360 -0
@@ -0,0 +1,620 @@
1
+ import { jsx as X } from "react/jsx-runtime";
2
+ import q, { useRef as Y, useState as me, useEffect as oe, useMemo as Be, useLayoutEffect as Oe, forwardRef as Ee } from "react";
3
+ import { TextField as Fe, IconButton as _e } from "@mui/material";
4
+ import { C as je } from "../../index.esm-ChwJSgnF.js";
5
+ import { C as ke } from "../../index-kvi6aotO.js";
6
+ function ge(e, r) {
7
+ var a = {};
8
+ for (var n in e)
9
+ Object.prototype.hasOwnProperty.call(e, n) && r.indexOf(n) < 0 && (a[n] = e[n]);
10
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
11
+ for (var t = 0, n = Object.getOwnPropertySymbols(e); t < n.length; t++)
12
+ r.indexOf(n[t]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[t]) && (a[n[t]] = e[n[t]]);
13
+ return a;
14
+ }
15
+ var ee;
16
+ (function(e) {
17
+ e.event = "event", e.props = "prop";
18
+ })(ee || (ee = {}));
19
+ function $() {
20
+ }
21
+ function Me(e) {
22
+ var r, a = void 0;
23
+ return function() {
24
+ for (var n = [], t = arguments.length; t--; )
25
+ n[t] = arguments[t];
26
+ return r && n.length === r.length && n.every(function(i, f) {
27
+ return i === r[f];
28
+ }) || (r = n, a = e.apply(void 0, n)), a;
29
+ };
30
+ }
31
+ function re(e) {
32
+ return !!(e || "").match(/\d/);
33
+ }
34
+ function z(e) {
35
+ return e == null;
36
+ }
37
+ function Le(e) {
38
+ return typeof e == "number" && isNaN(e);
39
+ }
40
+ function he(e) {
41
+ return z(e) || Le(e) || typeof e == "number" && !isFinite(e);
42
+ }
43
+ function Se(e) {
44
+ return e.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
45
+ }
46
+ function Pe(e) {
47
+ switch (e) {
48
+ case "lakh":
49
+ return /(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;
50
+ case "wan":
51
+ return /(\d)(?=(\d{4})+(?!\d))/g;
52
+ case "thousand":
53
+ default:
54
+ return /(\d)(?=(\d{3})+(?!\d))/g;
55
+ }
56
+ }
57
+ function Ke(e, r, a) {
58
+ var n = Pe(a), t = e.search(/[1-9]/);
59
+ return t = t === -1 ? e.length : t, e.substring(0, t) + e.substring(t, e.length).replace(n, "$1" + r);
60
+ }
61
+ function Ue(e) {
62
+ var r = Y(e);
63
+ r.current = e;
64
+ var a = Y(function() {
65
+ for (var n = [], t = arguments.length; t--; )
66
+ n[t] = arguments[t];
67
+ return r.current.apply(r, n);
68
+ });
69
+ return a.current;
70
+ }
71
+ function fe(e, r) {
72
+ r === void 0 && (r = !0);
73
+ var a = e[0] === "-", n = a && r;
74
+ e = e.replace("-", "");
75
+ var t = e.split("."), i = t[0], f = t[1] || "";
76
+ return {
77
+ beforeDecimal: i,
78
+ afterDecimal: f,
79
+ hasNegation: a,
80
+ addNegation: n
81
+ };
82
+ }
83
+ function $e(e) {
84
+ if (!e)
85
+ return e;
86
+ var r = e[0] === "-";
87
+ r && (e = e.substring(1, e.length));
88
+ var a = e.split("."), n = a[0].replace(/^0+/, "") || "0", t = a[1] || "";
89
+ return (r ? "-" : "") + n + (t ? "." + t : "");
90
+ }
91
+ function pe(e, r, a) {
92
+ for (var n = "", t = a ? "0" : "", i = 0; i <= r - 1; i++)
93
+ n += e[i] || t;
94
+ return n;
95
+ }
96
+ function ve(e, r) {
97
+ return Array(r + 1).join(e);
98
+ }
99
+ function xe(e) {
100
+ var r = e + "", a = r[0] === "-" ? "-" : "";
101
+ a && (r = r.substring(1));
102
+ var n = r.split(/[eE]/g), t = n[0], i = n[1];
103
+ if (i = Number(i), !i)
104
+ return a + t;
105
+ t = t.replace(".", "");
106
+ var f = 1 + i, l = t.length;
107
+ return f < 0 ? t = "0." + ve("0", Math.abs(f)) + t : f >= l ? t = t + ve("0", f - l) : t = (t.substring(0, f) || "0") + "." + t.substring(f), a + t;
108
+ }
109
+ function ce(e, r, a) {
110
+ if (["", "-"].indexOf(e) !== -1)
111
+ return e;
112
+ var n = (e.indexOf(".") !== -1 || a) && r, t = fe(e), i = t.beforeDecimal, f = t.afterDecimal, l = t.hasNegation, g = parseFloat("0." + (f || "0")), h = f.length <= r ? "0." + f : g.toFixed(r), S = h.split("."), p = i;
113
+ i && Number(S[0]) && (p = i.split("").reverse().reduce(function(w, C, m) {
114
+ return w.length > m ? (Number(w[0]) + Number(C)).toString() + w.substring(1, w.length) : C + w;
115
+ }, S[0]));
116
+ var x = pe(S[1] || "", r, a), y = l ? "-" : "", s = n ? "." : "";
117
+ return "" + y + p + s + x;
118
+ }
119
+ function W(e, r) {
120
+ if (e.value = e.value, e !== null) {
121
+ if (e.createTextRange) {
122
+ var a = e.createTextRange();
123
+ return a.move("character", r), a.select(), !0;
124
+ }
125
+ return e.selectionStart || e.selectionStart === 0 ? (e.focus(), e.setSelectionRange(r, r), !0) : (e.focus(), !1);
126
+ }
127
+ }
128
+ var Ve = Me(function(e, r) {
129
+ for (var a = 0, n = 0, t = e.length, i = r.length; e[a] === r[a] && a < t; )
130
+ a++;
131
+ for (; e[t - 1 - n] === r[i - 1 - n] && i - n > a && t - n > a; )
132
+ n++;
133
+ return {
134
+ from: { start: a, end: t - n },
135
+ to: { start: a, end: i - n }
136
+ };
137
+ });
138
+ function Ge(e, r, a) {
139
+ return Math.min(Math.max(e, r), a);
140
+ }
141
+ function ue(e) {
142
+ return Math.max(e.selectionStart, e.selectionEnd);
143
+ }
144
+ function We() {
145
+ return typeof navigator < "u" && !(navigator.platform && /iPhone|iPod/.test(navigator.platform));
146
+ }
147
+ function Ze(e) {
148
+ return {
149
+ from: {
150
+ start: 0,
151
+ end: 0
152
+ },
153
+ to: {
154
+ start: 0,
155
+ end: e.length
156
+ },
157
+ lastValue: ""
158
+ };
159
+ }
160
+ function qe(e) {
161
+ var r = e.currentValue, a = e.formattedValue, n = e.currentValueIndex, t = e.formattedValueIndex;
162
+ return r[n] === a[t];
163
+ }
164
+ function ze(e, r, a, n, t, i, f) {
165
+ f === void 0 && (f = qe);
166
+ var l = t.findIndex(function(L) {
167
+ return L;
168
+ }), g = e.slice(0, l);
169
+ !r && !a.startsWith(g) && (r = g, a = g + a, n = n + g.length);
170
+ for (var h = a.length, S = e.length, p = {}, x = new Array(h), y = 0; y < h; y++) {
171
+ x[y] = -1;
172
+ for (var s = 0, w = S; s < w; s++) {
173
+ var C = f({
174
+ currentValue: a,
175
+ lastValue: r,
176
+ formattedValue: e,
177
+ currentValueIndex: y,
178
+ formattedValueIndex: s
179
+ });
180
+ if (C && p[s] !== !0) {
181
+ x[y] = s, p[s] = !0;
182
+ break;
183
+ }
184
+ }
185
+ }
186
+ for (var m = n; m < h && (x[m] === -1 || !i(a[m])); )
187
+ m++;
188
+ var B = m === h || x[m] === -1 ? S : x[m];
189
+ for (m = n - 1; m > 0 && x[m] === -1; )
190
+ m--;
191
+ var E = m === -1 || x[m] === -1 ? 0 : x[m] + 1;
192
+ return E > B ? B : n - E < B - n ? E : B;
193
+ }
194
+ function se(e, r, a, n) {
195
+ var t = e.length;
196
+ if (r = Ge(r, 0, t), n === "left") {
197
+ for (; r >= 0 && !a[r]; )
198
+ r--;
199
+ r === -1 && (r = a.indexOf(!0));
200
+ } else {
201
+ for (; r <= t && !a[r]; )
202
+ r++;
203
+ r > t && (r = a.lastIndexOf(!0));
204
+ }
205
+ return r === -1 && (r = t), r;
206
+ }
207
+ function He(e) {
208
+ for (var r = Array.from({ length: e.length + 1 }).map(function() {
209
+ return !0;
210
+ }), a = 0, n = r.length; a < n; a++)
211
+ r[a] = !!(re(e[a]) || re(e[a - 1]));
212
+ return r;
213
+ }
214
+ function ye(e, r, a, n, t, i) {
215
+ i === void 0 && (i = $);
216
+ var f = Ue(function(s, w) {
217
+ var C, m;
218
+ return he(s) ? (m = "", C = "") : typeof s == "number" || w ? (m = typeof s == "number" ? xe(s) : s, C = n(m)) : (m = t(s, void 0), C = n(m)), { formattedValue: C, numAsString: m };
219
+ }), l = me(function() {
220
+ return f(z(e) ? r : e, a);
221
+ }), g = l[0], h = l[1], S = function(s, w) {
222
+ s.formattedValue !== g.formattedValue && h({
223
+ formattedValue: s.formattedValue,
224
+ numAsString: s.value
225
+ }), i(s, w);
226
+ }, p = e, x = a;
227
+ z(e) && (p = g.numAsString, x = !0);
228
+ var y = f(p, x);
229
+ return Be(function() {
230
+ h(y);
231
+ }, [y.formattedValue]), [g, S];
232
+ }
233
+ function Je(e) {
234
+ return e.replace(/[^0-9]/g, "");
235
+ }
236
+ function Qe(e) {
237
+ return e;
238
+ }
239
+ function Xe(e) {
240
+ var r = e.type;
241
+ r === void 0 && (r = "text");
242
+ var a = e.displayType;
243
+ a === void 0 && (a = "input");
244
+ var n = e.customInput, t = e.renderText, i = e.getInputRef, f = e.format;
245
+ f === void 0 && (f = Qe);
246
+ var l = e.removeFormatting;
247
+ l === void 0 && (l = Je);
248
+ var g = e.defaultValue, h = e.valueIsNumericString, S = e.onValueChange, p = e.isAllowed, x = e.onChange;
249
+ x === void 0 && (x = $);
250
+ var y = e.onKeyDown;
251
+ y === void 0 && (y = $);
252
+ var s = e.onMouseUp;
253
+ s === void 0 && (s = $);
254
+ var w = e.onFocus;
255
+ w === void 0 && (w = $);
256
+ var C = e.onBlur;
257
+ C === void 0 && (C = $);
258
+ var m = e.value, B = e.getCaretBoundary;
259
+ B === void 0 && (B = He);
260
+ var E = e.isValidInputCharacter;
261
+ E === void 0 && (E = re);
262
+ var L = e.isCharacterSame, j = ge(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), G = ye(m, g, !!h, f, l, S), P = G[0], b = P.formattedValue, k = P.numAsString, K = G[1], M = Y({ formattedValue: b, numAsString: k }), Z = function(o, u) {
263
+ M.current = { formattedValue: o.formattedValue, numAsString: o.value }, K(o, u);
264
+ }, U = me(!1), H = U[0], J = U[1], v = Y(null), c = Y({
265
+ setCaretTimeout: null,
266
+ focusTimeout: null
267
+ });
268
+ oe(function() {
269
+ return J(!0), function() {
270
+ clearTimeout(c.current.setCaretTimeout), clearTimeout(c.current.focusTimeout);
271
+ };
272
+ }, []);
273
+ var R = f, I = function(o, u) {
274
+ var d = parseFloat(u);
275
+ return {
276
+ formattedValue: o,
277
+ value: u,
278
+ floatValue: isNaN(d) ? void 0 : d
279
+ };
280
+ }, T = function(o, u, d) {
281
+ o.selectionStart === 0 && o.selectionEnd === o.value.length || (W(o, u), c.current.setCaretTimeout = setTimeout(function() {
282
+ o.value === d && o.selectionStart !== u && W(o, u);
283
+ }, 0));
284
+ }, A = function(o, u, d) {
285
+ return se(o, u, B(o), d);
286
+ }, O = function(o, u, d) {
287
+ var D = B(u), F = ze(u, b, o, d, D, E, L);
288
+ return F = se(u, F, D), F;
289
+ }, ae = function(o) {
290
+ var u = o.formattedValue;
291
+ u === void 0 && (u = "");
292
+ var d = o.input, D = o.source, F = o.event, V = o.numAsString, N;
293
+ if (d) {
294
+ var _ = o.inputValue || d.value, Q = ue(d);
295
+ d.value = u, N = O(_, u, Q), N !== void 0 && T(d, N, u);
296
+ }
297
+ u !== b && Z(I(u, V), { event: F, source: D });
298
+ };
299
+ oe(function() {
300
+ var o = M.current, u = o.formattedValue, d = o.numAsString;
301
+ b !== u && (b !== k || u !== d) && Z(I(b, k), {
302
+ event: void 0,
303
+ source: ee.props
304
+ });
305
+ }, [b, k]);
306
+ var ie = v.current ? ue(v.current) : void 0, te = typeof window < "u" ? Oe : oe;
307
+ te(function() {
308
+ var o = v.current;
309
+ if (b !== M.current.formattedValue && o) {
310
+ var u = O(M.current.formattedValue, b, ie);
311
+ o.value = b, T(o, u, b);
312
+ }
313
+ }, [b]);
314
+ var be = function(o, u, d) {
315
+ var D = Ve(b, o), F = Object.assign(Object.assign({}, D), { lastValue: b }), V = l(o, F), N = R(V);
316
+ if (V = l(N, void 0), p && !p(I(N, V))) {
317
+ var _ = u.target, Q = ue(_), Re = O(o, b, Q);
318
+ return _.value = b, T(_, Re, b), !1;
319
+ }
320
+ return ae({
321
+ formattedValue: N,
322
+ numAsString: V,
323
+ inputValue: o,
324
+ event: u,
325
+ source: d,
326
+ input: u.target
327
+ }), !0;
328
+ }, Ne = function(o) {
329
+ var u = o.target, d = u.value, D = be(d, o, ee.event);
330
+ D && x(o);
331
+ }, we = function(o) {
332
+ var u = o.target, d = o.key, D = u.selectionStart, F = u.selectionEnd, V = u.value;
333
+ V === void 0 && (V = "");
334
+ var N;
335
+ if (d === "ArrowLeft" || d === "Backspace" ? N = Math.max(D - 1, 0) : d === "ArrowRight" ? N = Math.min(D + 1, V.length) : d === "Delete" && (N = D), N === void 0 || D !== F) {
336
+ y(o);
337
+ return;
338
+ }
339
+ var _ = N;
340
+ if (d === "ArrowLeft" || d === "ArrowRight") {
341
+ var Q = d === "ArrowLeft" ? "left" : "right";
342
+ _ = A(V, N, Q), _ !== N && o.preventDefault();
343
+ } else
344
+ d === "Delete" && !E(V[N]) ? _ = A(V, N, "right") : d === "Backspace" && !E(V[N]) && (_ = A(V, N, "left"));
345
+ _ !== N && T(u, _, V), o.isUnitTestRun && T(u, _, V), y(o);
346
+ }, Ce = function(o) {
347
+ var u = o.target, d = function() {
348
+ var D = u.selectionStart, F = u.selectionEnd, V = u.value;
349
+ if (V === void 0 && (V = ""), D === F) {
350
+ var N = A(V, D);
351
+ N !== D && T(u, N, V);
352
+ }
353
+ };
354
+ d(), requestAnimationFrame(function() {
355
+ d();
356
+ }), s(o);
357
+ }, De = function(o) {
358
+ o.persist && o.persist();
359
+ var u = o.target, d = o.currentTarget;
360
+ v.current = u, c.current.focusTimeout = setTimeout(function() {
361
+ var D = u.selectionStart, F = u.selectionEnd, V = u.value;
362
+ V === void 0 && (V = "");
363
+ var N = A(V, D);
364
+ N !== D && !(D === 0 && F === V.length) && T(u, N, V), w(Object.assign(Object.assign({}, o), { currentTarget: d }));
365
+ }, 0);
366
+ }, Ie = function(o) {
367
+ v.current = null, clearTimeout(c.current.focusTimeout), clearTimeout(c.current.setCaretTimeout), C(o);
368
+ }, Te = H && We() ? "numeric" : void 0, le = Object.assign({ inputMode: Te }, j, {
369
+ type: r,
370
+ value: b,
371
+ onChange: Ne,
372
+ onKeyDown: we,
373
+ onMouseUp: Ce,
374
+ onFocus: De,
375
+ onBlur: Ie
376
+ });
377
+ if (a === "text")
378
+ return t ? q.createElement(q.Fragment, null, t(b, j) || null) : q.createElement("span", Object.assign({}, j, { ref: i }), b);
379
+ if (n) {
380
+ var Ae = n;
381
+ return q.createElement(Ae, Object.assign({}, le, { ref: i }));
382
+ }
383
+ return q.createElement("input", Object.assign({}, le, { ref: i }));
384
+ }
385
+ function de(e, r) {
386
+ var a = r.decimalScale, n = r.fixedDecimalScale, t = r.prefix;
387
+ t === void 0 && (t = "");
388
+ var i = r.suffix;
389
+ i === void 0 && (i = "");
390
+ var f = r.allowNegative, l = r.thousandsGroupStyle;
391
+ if (l === void 0 && (l = "thousand"), e === "" || e === "-")
392
+ return e;
393
+ var g = ne(r), h = g.thousandSeparator, S = g.decimalSeparator, p = a !== 0 && e.indexOf(".") !== -1 || a && n, x = fe(e, f), y = x.beforeDecimal, s = x.afterDecimal, w = x.addNegation;
394
+ return a !== void 0 && (s = pe(s, a, !!n)), h && (y = Ke(y, h, l)), t && (y = t + y), i && (s = s + i), w && (y = "-" + y), e = y + (p && S || "") + s, e;
395
+ }
396
+ function ne(e) {
397
+ var r = e.decimalSeparator;
398
+ r === void 0 && (r = ".");
399
+ var a = e.thousandSeparator, n = e.allowedDecimalSeparators;
400
+ return a === !0 && (a = ","), n || (n = [r, "."]), {
401
+ decimalSeparator: r,
402
+ thousandSeparator: a,
403
+ allowedDecimalSeparators: n
404
+ };
405
+ }
406
+ function Ye(e, r) {
407
+ e === void 0 && (e = "");
408
+ var a = new RegExp("(-)"), n = new RegExp("(-)(.)*(-)"), t = a.test(e), i = n.test(e);
409
+ return e = e.replace(/-/g, ""), t && !i && r && (e = "-" + e), e;
410
+ }
411
+ function er(e, r) {
412
+ return new RegExp("(^-)|[0-9]|" + Se(e), r ? "g" : void 0);
413
+ }
414
+ function rr(e, r, a) {
415
+ return e === "" ? !0 : !(r != null && r.match(/\d/)) && !(a != null && a.match(/\d/)) && typeof e == "string" && !isNaN(Number(e));
416
+ }
417
+ function ar(e, r, a) {
418
+ var n;
419
+ r === void 0 && (r = Ze(e));
420
+ var t = a.allowNegative, i = a.prefix;
421
+ i === void 0 && (i = "");
422
+ var f = a.suffix;
423
+ f === void 0 && (f = "");
424
+ var l = a.decimalScale, g = r.from, h = r.to, S = h.start, p = h.end, x = ne(a), y = x.allowedDecimalSeparators, s = x.decimalSeparator, w = e[p] === s;
425
+ if (re(e) && (e === i || e === f) && r.lastValue === "")
426
+ return e;
427
+ if (p - S === 1 && y.indexOf(e[S]) !== -1) {
428
+ var C = l === 0 ? "" : s;
429
+ e = e.substring(0, S) + C + e.substring(S + 1, e.length);
430
+ }
431
+ var m = function(c, R, I) {
432
+ var T = !1, A = !1;
433
+ i.startsWith("-") ? T = !1 : c.startsWith("--") ? (T = !1, A = !0) : f.startsWith("-") && c.length === f.length ? T = !1 : c[0] === "-" && (T = !0);
434
+ var O = T ? 1 : 0;
435
+ return A && (O = 2), O && (c = c.substring(O), R -= O, I -= O), { value: c, start: R, end: I, hasNegation: T };
436
+ }, B = m(e, S, p), E = B.hasNegation;
437
+ n = B, e = n.value, S = n.start, p = n.end;
438
+ var L = m(r.lastValue, g.start, g.end), j = L.start, G = L.end, P = L.value, b = e.substring(S, p);
439
+ e.length && P.length && (j > P.length - f.length || G < i.length) && !(b && f.startsWith(b)) && (e = P);
440
+ var k = 0;
441
+ e.startsWith(i) ? k += i.length : S < i.length && (k = S), e = e.substring(k), p -= k;
442
+ var K = e.length, M = e.length - f.length;
443
+ e.endsWith(f) ? K = M : (p > M || p > e.length - f.length) && (K = p), e = e.substring(0, K), e = Ye(E ? "-" + e : e, t), e = (e.match(er(s, !0)) || []).join("");
444
+ var Z = e.indexOf(s);
445
+ e = e.replace(new RegExp(Se(s), "g"), function(c, R) {
446
+ return R === Z ? "." : "";
447
+ });
448
+ var U = fe(e, t), H = U.beforeDecimal, J = U.afterDecimal, v = U.addNegation;
449
+ return h.end - h.start < g.end - g.start && H === "" && w && !parseFloat(J) && (e = v ? "-" : ""), e;
450
+ }
451
+ function tr(e, r) {
452
+ var a = r.prefix;
453
+ a === void 0 && (a = "");
454
+ var n = r.suffix;
455
+ n === void 0 && (n = "");
456
+ var t = Array.from({ length: e.length + 1 }).map(function() {
457
+ return !0;
458
+ }), i = e[0] === "-";
459
+ t.fill(!1, 0, a.length + (i ? 1 : 0));
460
+ var f = e.length;
461
+ return t.fill(!1, f - n.length + 1, f + 1), t;
462
+ }
463
+ function nr(e) {
464
+ var r = ne(e), a = r.thousandSeparator, n = r.decimalSeparator, t = e.prefix;
465
+ t === void 0 && (t = "");
466
+ var i = e.allowNegative;
467
+ if (i === void 0 && (i = !0), a === n)
468
+ throw new Error(`
469
+ Decimal separator can't be same as thousand separator.
470
+ thousandSeparator: ` + a + ` (thousandSeparator = {true} is same as thousandSeparator = ",")
471
+ decimalSeparator: ` + n + ` (default value for decimalSeparator is .)
472
+ `);
473
+ return t.startsWith("-") && i && (console.error(`
474
+ Prefix can't start with '-' when allowNegative is true.
475
+ prefix: ` + t + `
476
+ allowNegative: ` + i + `
477
+ `), i = !1), Object.assign(Object.assign({}, e), { allowNegative: i });
478
+ }
479
+ function ir(e) {
480
+ e = nr(e), e.decimalSeparator, e.allowedDecimalSeparators, e.thousandsGroupStyle;
481
+ var r = e.suffix, a = e.allowNegative, n = e.allowLeadingZeros, t = e.onKeyDown;
482
+ t === void 0 && (t = $);
483
+ var i = e.onBlur;
484
+ i === void 0 && (i = $);
485
+ var f = e.thousandSeparator, l = e.decimalScale, g = e.fixedDecimalScale, h = e.prefix;
486
+ h === void 0 && (h = "");
487
+ var S = e.defaultValue, p = e.value, x = e.valueIsNumericString, y = e.onValueChange, s = ge(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), w = ne(e), C = w.decimalSeparator, m = w.allowedDecimalSeparators, B = function(v) {
488
+ return de(v, e);
489
+ }, E = function(v, c) {
490
+ return ar(v, c, e);
491
+ }, L = z(p) ? S : p, j = x ?? rr(L, h, r);
492
+ z(p) ? z(S) || (j = j || typeof S == "number") : j = j || typeof p == "number";
493
+ var G = function(v) {
494
+ return he(v) ? v : (typeof v == "number" && (v = xe(v)), j && typeof l == "number" ? ce(v, l, !!g) : v);
495
+ }, P = ye(G(p), G(S), !!j, B, E, y), b = P[0], k = b.numAsString, K = b.formattedValue, M = P[1], Z = function(v) {
496
+ var c = v.target, R = v.key, I = c.selectionStart, T = c.selectionEnd, A = c.value;
497
+ if (A === void 0 && (A = ""), I !== T) {
498
+ t(v);
499
+ return;
500
+ }
501
+ R === "Backspace" && A[0] === "-" && I === h.length + 1 && a && W(c, 1), l && g && (R === "Backspace" && A[I - 1] === C ? (W(c, I - 1), v.preventDefault()) : R === "Delete" && A[I] === C && v.preventDefault()), m != null && m.includes(R) && A[I] === C && W(c, I + 1);
502
+ var O = f === !0 ? "," : f;
503
+ R === "Backspace" && A[I - 1] === O && W(c, I - 1), R === "Delete" && A[I] === O && W(c, I + 1), t(v);
504
+ }, U = function(v) {
505
+ var c = k;
506
+ if (c.match(/\d/g) || (c = ""), n || (c = $e(c)), g && l && (c = ce(c, l, g)), c !== k) {
507
+ var R = de(c, e);
508
+ M({
509
+ formattedValue: R,
510
+ value: c,
511
+ floatValue: parseFloat(c)
512
+ }, {
513
+ event: v,
514
+ source: ee.event
515
+ });
516
+ }
517
+ i(v);
518
+ }, H = function(v) {
519
+ return v === C ? !0 : re(v);
520
+ }, J = function(v) {
521
+ var c = v.currentValue, R = v.lastValue, I = v.formattedValue, T = v.currentValueIndex, A = v.formattedValueIndex, O = c[T], ae = I[A], ie = Ve(R, c), te = ie.to;
522
+ return T >= te.start && T < te.end && m && m.includes(O) && ae === C ? !0 : O === ae;
523
+ };
524
+ return Object.assign(Object.assign({}, s), {
525
+ value: K,
526
+ valueIsNumericString: !1,
527
+ isValidInputCharacter: H,
528
+ isCharacterSame: J,
529
+ onValueChange: M,
530
+ format: B,
531
+ removeFormatting: E,
532
+ getCaretBoundary: function(v) {
533
+ return tr(v, e);
534
+ },
535
+ onKeyDown: Z,
536
+ onBlur: U
537
+ });
538
+ }
539
+ function or(e) {
540
+ var r = ir(e);
541
+ return q.createElement(Xe, Object.assign({}, r));
542
+ }
543
+ const ur = Ee(function(r, a) {
544
+ const { valueType: n, defaultValue: t, onChange: i, ...f } = r;
545
+ return /* @__PURE__ */ X(
546
+ or,
547
+ {
548
+ ...f,
549
+ getInputRef: a,
550
+ onValueChange: (l, g) => {
551
+ if (!i || !g.event)
552
+ return;
553
+ let h;
554
+ switch (n) {
555
+ case "STRING":
556
+ h = l.value;
557
+ break;
558
+ case "FORMATTED_STRING":
559
+ h = l.formattedValue;
560
+ break;
561
+ default:
562
+ h = l.floatValue ?? void 0;
563
+ }
564
+ const S = {
565
+ ...g.event,
566
+ target: {
567
+ ...g.event.target,
568
+ name: r.name,
569
+ value: h
570
+ }
571
+ };
572
+ i(S);
573
+ }
574
+ }
575
+ );
576
+ }), dr = (e) => {
577
+ const { inputProps: r, defaultValue: a, emptyValue: n, ...t } = e, { textFieldProps: i } = r ?? {}, f = (l) => l == null || l == null || l == "";
578
+ return /* @__PURE__ */ X(
579
+ je,
580
+ {
581
+ control: t.control,
582
+ defaultValue: a,
583
+ name: t.name,
584
+ render: ({ field: l, fieldState: g }) => {
585
+ var h;
586
+ return /* @__PURE__ */ X(
587
+ Fe,
588
+ {
589
+ ...i,
590
+ name: l.name,
591
+ value: l.value ?? "",
592
+ onChange: (S) => {
593
+ l.onChange(S);
594
+ },
595
+ error: !!g.error,
596
+ helperText: (h = g.error) == null ? void 0 : h.message,
597
+ onBlur: l.onBlur,
598
+ InputProps: {
599
+ inputComponent: ur,
600
+ endAdornment: f(l.value) ? void 0 : /* @__PURE__ */ X(
601
+ _e,
602
+ {
603
+ size: "small",
604
+ onClick: () => {
605
+ l.onChange(n);
606
+ },
607
+ children: /* @__PURE__ */ X(ke, {})
608
+ }
609
+ )
610
+ }
611
+ }
612
+ );
613
+ }
614
+ }
615
+ );
616
+ };
617
+ export {
618
+ dr as NumericFieldController,
619
+ dr as default
620
+ };
@@ -0,0 +1,24 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { r as l, a as n, s } from "../../react.esm-C8amP77L.js";
3
+ import { u as i } from "../../index.esm-ChwJSgnF.js";
4
+ import { NumericFieldController as u } from "./index.js";
5
+ describe("NumericFieldController component", () => {
6
+ it("renders a numeric field with the correct placeholder text", () => {
7
+ const o = l(() => i().control).result.current, r = "TestNumericField", t = "Numeric Placeholder";
8
+ n(
9
+ /* @__PURE__ */ c(
10
+ u,
11
+ {
12
+ control: o,
13
+ name: r,
14
+ defaultValue: "",
15
+ inputProps: {
16
+ textFieldProps: { placeholder: t }
17
+ }
18
+ }
19
+ )
20
+ );
21
+ const e = s.getByPlaceholderText(t);
22
+ expect(e).toBeInTheDocument(), expect(e).toHaveAttribute("type", "text"), expect(e).toHaveAttribute("name", r), expect(e).toHaveAttribute("placeholder", t);
23
+ });
24
+ });
@@ -0,0 +1,5 @@
1
+ type Props = {
2
+ fontSize?: "xx-small" | "large";
3
+ };
4
+ export declare const OfflineLabel: (props: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export default OfflineLabel;
@@ -0,0 +1,34 @@
1
+ import l, { jsxs as i, jsx as n } from "react/jsx-runtime";
2
+ import { i as s } from "../../styled-CWju4EfZ.js";
3
+ import { r as f } from "../../createSvgIcon-Dj8zNxRS.js";
4
+ import { c as u } from "../../index-DWRHnq8_.js";
5
+ import '../../assets/index22.css';var e = {}, c = s;
6
+ Object.defineProperty(e, "__esModule", {
7
+ value: !0
8
+ });
9
+ var a = e.default = void 0, d = c(f()), t = l;
10
+ a = e.default = (0, d.default)([/* @__PURE__ */ (0, t.jsx)("path", {
11
+ d: "M12 4C7.31 4 3.07 5.9 0 8.98L12 21l5-5.01V8h5.92C19.97 5.51 16.16 4 12 4m7 14h2v2h-2z"
12
+ }, "0"), /* @__PURE__ */ (0, t.jsx)("path", {
13
+ d: "M19 10h2v6h-2z"
14
+ }, "1")], "SignalWifiStatusbarConnectedNoInternet4");
15
+ const m = "_offlineLabel_2osy9_1", v = {
16
+ offlineLabel: m
17
+ }, h = (r) => {
18
+ const { fontSize: o = "xx-small" } = r;
19
+ return /* @__PURE__ */ i(
20
+ "div",
21
+ {
22
+ className: u(v.offlineLabel),
23
+ style: { fontSize: o },
24
+ children: [
25
+ /* @__PURE__ */ n(a, { fontSize: "small" }),
26
+ "オフライン"
27
+ ]
28
+ }
29
+ );
30
+ };
31
+ export {
32
+ h as OfflineLabel,
33
+ h as default
34
+ };