@splunk/react-ui 4.42.0 → 4.43.0

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 (62) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/Code.js +611 -426
  3. package/ComboBox.js +25 -32
  4. package/Date.js +21 -26
  5. package/Dropdown.js +1 -1
  6. package/JSONTree.js +30 -24
  7. package/MIGRATION.mdx +48 -53
  8. package/Menu.js +12 -8
  9. package/Multiselect.js +1 -1
  10. package/Number.js +418 -392
  11. package/Paginator.js +269 -251
  12. package/Popover.js +412 -345
  13. package/RadioList.js +44 -43
  14. package/ResultsMenu.d.ts +2 -0
  15. package/Search.js +56 -65
  16. package/Select.js +1 -1
  17. package/TabBar.js +4 -0
  18. package/Table.js +146 -146
  19. package/TransitionOpen.js +16 -14
  20. package/Tree.js +20 -14
  21. package/package.json +6 -6
  22. package/types/src/Button/Button.d.ts +1 -0
  23. package/types/src/Code/Code.d.ts +1 -1
  24. package/types/src/ComboBox/ComboBox.d.ts +6 -3
  25. package/types/src/Date/Date.d.ts +0 -1
  26. package/types/src/Dropdown/docs/examples/TooltipButtonToggle.d.ts +2 -0
  27. package/types/src/Multiselect/Multiselect.d.ts +2 -0
  28. package/types/src/Number/Number.d.ts +3 -10
  29. package/types/src/Number/utils.d.ts +29 -0
  30. package/types/src/Paginator/Paginator.d.ts +15 -2
  31. package/types/src/Paginator/docs/examples/CustomPages.d.ts +2 -0
  32. package/types/src/Popover/Popover.d.ts +17 -8
  33. package/types/src/Popover/PopoverMenuContext.d.ts +6 -0
  34. package/types/src/Popover/PopoverProvider.d.ts +23 -0
  35. package/types/src/Popover/index.d.ts +2 -1
  36. package/types/src/RadioList/RadioList.d.ts +1 -1
  37. package/types/src/Select/SelectBase.d.ts +1 -1
  38. package/types/src/Select/docs/examples/Appearance.d.ts +1 -11
  39. package/types/src/Select/docs/examples/Basic.d.ts +1 -9
  40. package/types/src/Select/docs/examples/Children.d.ts +1 -9
  41. package/types/src/Select/docs/examples/Descriptions.d.ts +1 -9
  42. package/types/src/Select/docs/examples/Fetching.d.ts +1 -22
  43. package/types/src/Select/docs/examples/Filter.d.ts +1 -9
  44. package/types/src/Select/docs/examples/Headings.d.ts +1 -9
  45. package/types/src/Select/docs/examples/LoadMoreOnScrollBottom.d.ts +1 -24
  46. package/types/src/Select/docs/examples/Prefix.d.ts +1 -9
  47. package/types/src/Select/docs/examples/Truncate.d.ts +1 -9
  48. package/types/src/Table/docs/examples/Click.d.ts +2 -16
  49. package/types/src/Table/docs/examples/ClickRows.d.ts +2 -16
  50. package/types/src/Table/docs/examples/Complex.d.ts +2 -50
  51. package/types/src/Table/docs/examples/FilterColumnValues.d.ts +1 -13
  52. package/types/src/Table/docs/examples/HeadDropdownCell.d.ts +1 -17
  53. package/types/src/Table/docs/examples/ReorderColumns.d.ts +2 -21
  54. package/types/src/Table/docs/examples/ReorderRows.d.ts +2 -21
  55. package/types/src/Table/docs/examples/Resizable.d.ts +2 -23
  56. package/types/src/Table/docs/examples/ResizableFill.d.ts +2 -23
  57. package/types/src/Table/docs/examples/RowActions.d.ts +2 -39
  58. package/types/src/Table/docs/examples/Selectable.d.ts +2 -18
  59. package/types/src/Table/docs/examples/SortableColumns.d.ts +1 -11
  60. package/useResizeObserver.js +122 -90
  61. package/types/src/Dropdown/docs/examples/OtherToggles.d.ts +0 -2
  62. package/types/src/Popover/PopoverContext.d.ts +0 -6
package/Number.js CHANGED
@@ -8,27 +8,27 @@
8
8
  /******/ /* webpack/runtime/compat get default export */
9
9
  /******/ (() => {
10
10
  /******/ // getDefaultExport function for compatibility with non-harmony modules
11
- /******/ e.n = t => {
12
- /******/ var r = t && t.__esModule ?
13
- /******/ () => t["default"]
14
- /******/ : () => t
11
+ /******/ e.n = r => {
12
+ /******/ var t = r && r.__esModule ?
13
+ /******/ () => r["default"]
14
+ /******/ : () => r
15
15
  /******/;
16
- e.d(r, {
17
- a: r
16
+ e.d(t, {
17
+ a: t
18
18
  });
19
- /******/ return r;
19
+ /******/ return t;
20
20
  /******/ };
21
21
  /******/ })();
22
22
  /******/
23
23
  /******/ /* webpack/runtime/define property getters */
24
24
  /******/ (() => {
25
25
  /******/ // define getter functions for harmony exports
26
- /******/ e.d = (t, r) => {
27
- /******/ for (var n in r) {
28
- /******/ if (e.o(r, n) && !e.o(t, n)) {
29
- /******/ Object.defineProperty(t, n, {
26
+ /******/ e.d = (r, t) => {
27
+ /******/ for (var n in t) {
28
+ /******/ if (e.o(t, n) && !e.o(r, n)) {
29
+ /******/ Object.defineProperty(r, n, {
30
30
  enumerable: true,
31
- get: r[n]
31
+ get: t[n]
32
32
  });
33
33
  /******/ }
34
34
  /******/ }
@@ -37,7 +37,7 @@
37
37
  /******/
38
38
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
39
  /******/ (() => {
40
- /******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
40
+ /******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
41
41
  /******/;
42
42
  })();
43
43
  /******/
@@ -56,56 +56,53 @@
56
56
  /******/ };
57
57
  /******/ })();
58
58
  /******/
59
- /************************************************************************/ var t = {};
59
+ /************************************************************************/ var r = {};
60
60
  // ESM COMPAT FLAG
61
- e.r(t);
61
+ e.r(r);
62
62
  // EXPORTS
63
- e.d(t, {
64
- default: () => /* reexport */ oe
63
+ e.d(r, {
64
+ default: () => /* reexport */ pe
65
65
  });
66
66
  // CONCATENATED MODULE: external "react"
67
- const r = require("react");
68
- var n = e.n(r);
67
+ const t = require("react");
68
+ var n = e.n(t);
69
69
  // CONCATENATED MODULE: external "prop-types"
70
70
  const o = require("prop-types");
71
- var i = e.n(o);
71
+ var a = e.n(o);
72
72
  // CONCATENATED MODULE: external "lodash/has"
73
- const a = require("lodash/has");
74
- var l = e.n(a);
73
+ const i = require("lodash/has");
74
+ var l = e.n(i);
75
75
  // CONCATENATED MODULE: external "lodash/isFinite"
76
76
  const s = require("lodash/isFinite");
77
77
  var u = e.n(s);
78
- // CONCATENATED MODULE: external "lodash/isString"
79
- const p = require("lodash/isString");
80
- var c = e.n(p);
81
78
  // CONCATENATED MODULE: external "lodash/omit"
82
- const d = require("lodash/omit");
83
- var f = e.n(d);
79
+ const c = require("lodash/omit");
80
+ var p = e.n(c);
84
81
  // CONCATENATED MODULE: external "@splunk/themes"
85
- const v = require("@splunk/themes");
82
+ const d = require("@splunk/themes");
86
83
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
87
- const m = require("@splunk/ui-utils/i18n");
84
+ const f = require("@splunk/ui-utils/i18n");
88
85
  // CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
89
- const b = require("@splunk/ui-utils/keyboard");
86
+ const v = require("@splunk/ui-utils/keyboard");
90
87
  // CONCATENATED MODULE: external "@splunk/react-icons/SVGEnterprise"
91
- const h = require("@splunk/react-icons/SVGEnterprise");
92
- var y = e.n(h);
88
+ const m = require("@splunk/react-icons/SVGEnterprise");
89
+ var b = e.n(m);
93
90
  // CONCATENATED MODULE: ./src/Number/IncrementIcon.tsx
94
- function g() {
95
- return g = Object.assign ? Object.assign.bind() : function(e) {
96
- for (var t = 1; t < arguments.length; t++) {
97
- var r = arguments[t];
98
- for (var n in r) {
99
- ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
91
+ function h() {
92
+ return h = Object.assign ? Object.assign.bind() : function(e) {
93
+ for (var r = 1; r < arguments.length; r++) {
94
+ var t = arguments[r];
95
+ for (var n in t) {
96
+ ({}).hasOwnProperty.call(t, n) && (e[n] = t[n]);
100
97
  }
101
98
  }
102
99
  return e;
103
- }, g.apply(null, arguments)
100
+ }, h.apply(null, arguments)
104
101
  /* eslint-disable max-len */;
105
102
  }
106
- function k(e) {
103
+ function y(e) {
107
104
 
108
- return n().createElement(y(), g({
105
+ return n().createElement(b(), h({
109
106
  viewBox: "0 0 933 600"
110
107
  }, e), n().createElement("path", {
111
108
  fill: "currentColor",
@@ -113,32 +110,32 @@
113
110
  }));
114
111
  }
115
112
  // CONCATENATED MODULE: external "styled-components"
116
- const S = require("styled-components");
117
- var w = e.n(S);
113
+ const g = require("styled-components");
114
+ var x = e.n(g);
118
115
  // CONCATENATED MODULE: external "@splunk/react-ui/Button"
119
- const x = require("@splunk/react-ui/Button");
120
- var O = e.n(x);
116
+ const k = require("@splunk/react-ui/Button");
117
+ var w = e.n(k);
121
118
  // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
122
- const j = require("@splunk/react-ui/Clickable");
123
- var P = e.n(j);
119
+ const O = require("@splunk/react-ui/Clickable");
120
+ var S = e.n(O);
124
121
  // CONCATENATED MODULE: external "@splunk/react-ui/Text"
125
- const C = require("@splunk/react-ui/Text");
126
- var T = e.n(C);
122
+ const j = require("@splunk/react-ui/Text");
123
+ var C = e.n(j);
127
124
  // CONCATENATED MODULE: ./src/Number/NumberStyles.ts
128
- var V = w()(T()).withConfig({
125
+ var P = x()(C()).withConfig({
129
126
  displayName: "NumberStyles__StyledText",
130
127
  componentId: "sc-2ekj9s-0"
131
- })([ "&[data-inline]{", "}" ], (0, v.pick)({
128
+ })([ "&[data-inline]{", "}" ], (0, d.pick)({
132
129
  enterprise: {
133
- comfortable: (0, S.css)([ "width:100px;" ]),
134
- compact: (0, S.css)([ "width:80px;" ])
130
+ comfortable: (0, g.css)([ "width:100px;" ]),
131
+ compact: (0, g.css)([ "width:80px;" ])
135
132
  },
136
- prisma: (0, S.css)([ "width:100px;" ])
133
+ prisma: (0, g.css)([ "width:100px;" ])
137
134
  }));
138
- var E = w().div.withConfig({
135
+ var T = x().div.withConfig({
139
136
  displayName: "NumberStyles__StyledControls",
140
137
  componentId: "sc-2ekj9s-1"
141
- })([ "width:", ";height:100%;", " ", "" ], (0, v.pick)({
138
+ })([ "width:", ";height:100%;", " ", "" ], (0, d.pick)({
142
139
  enterprise: {
143
140
  comfortable: "20px",
144
141
  compact: "16px"
@@ -147,130 +144,199 @@
147
144
  comfortable: "24px",
148
145
  compact: "24px"
149
146
  }
150
- }), (0, v.pick)({
151
- enterprise: (0, S.css)([ "transform:translateY(-1px);" ]),
152
- prisma: (0, S.css)([ "transform:translateX(1px);" ])
147
+ }), (0, d.pick)({
148
+ enterprise: (0, g.css)([ "transform:translateY(-1px);" ]),
149
+ prisma: (0, g.css)([ "transform:translateX(1px);" ])
153
150
  }), (function(e) {
154
- var t = e.$isAppend;
155
- return t ? (0, S.css)([ "margin-right:8px;", "" ], (0, v.pick)({
156
- prisma: (0, S.css)([ "transform:translateX(-1px);" ])
157
- })) : (0, S.css)([ "margin-left:8px;" ]);
151
+ var r = e.$isAppend;
152
+ return r ? (0, g.css)([ "margin-right:8px;", "" ], (0, d.pick)({
153
+ prisma: (0, g.css)([ "transform:translateX(-1px);" ])
154
+ })) : (0, g.css)([ "margin-left:8px;" ]);
158
155
  }));
159
- var _ = (0, S.css)([ "position:relative;padding:3px;font-size:inherit;min-width:0;min-height:0;height:", ";width:100%;" ], (0,
160
- v.pick)({
156
+ var E = (0, g.css)([ "position:relative;padding:3px;font-size:inherit;min-width:0;min-height:0;height:", ";width:100%;" ], (0,
157
+ d.pick)({
161
158
  enterprise: "calc(50% + 1.5px)",
162
159
  prisma: "50%"
163
160
  }));
164
- var N = w()(O()).withConfig({
161
+ var _ = x()(w()).withConfig({
165
162
  displayName: "NumberStyles__StyledPlusButton",
166
163
  componentId: "sc-2ekj9s-2"
167
- })([ "", ";top:0;border-bottom-left-radius:0;border-bottom-right-radius:0;", " &:not([disabled]){&,&:hover{", ";}}" ], _, (function(e) {
168
- var t = e.append;
169
- return t && (0, v.pick)({
164
+ })([ "", ";top:0;border-bottom-left-radius:0;border-bottom-right-radius:0;", " &:not([disabled]){&,&:hover{", ";}}" ], E, (function(e) {
165
+ var r = e.append;
166
+ return r && (0, d.pick)({
170
167
  enterprise: {
171
- light: (0, S.css)([ "border-right:1px solid ", ";" ], v.variables.gray60),
172
- dark: (0, S.css)([ "border-right:", ";" ], v.variables.border)
168
+ light: (0, g.css)([ "border-right:1px solid ", ";" ], d.variables.gray60),
169
+ dark: (0, g.css)([ "border-right:", ";" ], d.variables.border)
173
170
  }
174
171
  });
175
- }), (0, v.pick)({
172
+ }), (0, d.pick)({
176
173
  enterprise: {
177
- dark: (0, S.css)([ "border-color:", ";" ], v.variables.gray20)
174
+ dark: (0, g.css)([ "border-color:", ";" ], d.variables.gray20)
178
175
  }
179
176
  }));
180
- var D = w()(O()).withConfig({
177
+ var V = x()(w()).withConfig({
181
178
  displayName: "NumberStyles__StyledMinusButton",
182
179
  componentId: "sc-2ekj9s-3"
183
- })([ "", ";bottom:1px;border-top-left-radius:0;border-top-right-radius:0;", " &:not([disabled]){&,&:hover{", ";}}" ], _, (function(e) {
184
- var t = e.append;
185
- return t && (0, v.pick)({
180
+ })([ "", ";bottom:1px;border-top-left-radius:0;border-top-right-radius:0;", " &:not([disabled]){&,&:hover{", ";}}" ], E, (function(e) {
181
+ var r = e.append;
182
+ return r && (0, d.pick)({
186
183
  enterprise: {
187
- light: (0, S.css)([ "border-right:1px solid ", ";" ], v.variables.gray60),
188
- dark: (0, S.css)([ "border-right:", ";" ], v.variables.border)
184
+ light: (0, g.css)([ "border-right:1px solid ", ";" ], d.variables.gray60),
185
+ dark: (0, g.css)([ "border-right:", ";" ], d.variables.border)
189
186
  }
190
187
  });
191
- }), (0, v.pick)({
188
+ }), (0, d.pick)({
192
189
  enterprise: {
193
- dark: (0, S.css)([ "border-color:", ";" ], v.variables.gray20)
190
+ dark: (0, g.css)([ "border-color:", ";" ], d.variables.gray20)
194
191
  }
195
192
  }));
196
- var B = w()(P()).withConfig({
193
+ var D = x()(S()).withConfig({
197
194
  displayName: "NumberStyles__prismaButton",
198
195
  componentId: "sc-2ekj9s-4"
199
- })([ "", ";display:flex;align-items:center;justify-content:center;", " &:hover:not([disabled]){", "}&:active:not([disabled]){", "}" ], _, (0,
200
- v.pick)({
201
- prisma: (0, S.css)([ "color:", ";" ], v.variables.contentColorDefault)
202
- }), (0, v.pick)({
203
- prisma: (0, S.css)([ "background-color:", ";color:", ";" ], v.variables.interactiveColorOverlayHover, v.variables.contentColorActive)
204
- }), (0, v.pick)({
205
- prisma: (0, S.css)([ "background-color:", ";color:", ";" ], v.variables.interactiveColorOverlayActive, v.variables.contentColorActive)
196
+ })([ "", ";display:flex;align-items:center;justify-content:center;", " &:hover:not([disabled]){", "}&:active:not([disabled]){", "}" ], E, (0,
197
+ d.pick)({
198
+ prisma: (0, g.css)([ "color:", ";" ], d.variables.contentColorDefault)
199
+ }), (0, d.pick)({
200
+ prisma: (0, g.css)([ "background-color:", ";color:", ";" ], d.variables.interactiveColorOverlayHover, d.variables.contentColorActive)
201
+ }), (0, d.pick)({
202
+ prisma: (0, g.css)([ "background-color:", ";color:", ";" ], d.variables.interactiveColorOverlayActive, d.variables.contentColorActive)
206
203
  }));
207
- var I = w()(B).withConfig({
204
+ var B = x()(D).withConfig({
208
205
  displayName: "NumberStyles__StyledPrismaPlusButton",
209
206
  componentId: "sc-2ekj9s-5"
210
207
  })([ "border-top-right-radius:4px;" ]);
211
- var A = w()(B).withConfig({
208
+ var N = x()(D).withConfig({
212
209
  displayName: "NumberStyles__StyledPrismaMinusButton",
213
210
  componentId: "sc-2ekj9s-6"
214
211
  })([ "border-bottom-right-radius:4px;padding-bottom:5px;" ]);
212
+ // CONCATENATED MODULE: external "lodash/isString"
213
+ const I = require("lodash/isString");
214
+ var q = e.n(I);
215
+ // CONCATENATED MODULE: ./src/Number/utils.ts
216
+ var K = function e(r) {
217
+ // A more robust and expandable solution would be to use formatToParts() once IE requirements are dropped.
218
+ var t = new Intl.NumberFormat(r.replace("_", "-")).format(1.2);
219
+ return t.indexOf(",") > -1 ? "," : ".";
220
+ };
221
+ var A = function e(r) {
222
+ var t = r.val, n = r.min, o = r.max, a = r.roundTo;
223
+ var i = t;
224
+ if (!u()(t)) {
225
+ return i;
226
+ }
227
+ if (n !== undefined && u()(n)) {
228
+ i = Math.max(n, i);
229
+ }
230
+ if (o !== undefined && u()(o)) {
231
+ i = Math.min(o, i);
232
+ }
233
+ var l = Math.pow(10, a);
234
+ return Math.round(i * l) / l;
235
+ };
236
+ var M = function e(r) {
237
+ var t = r.str, n = r.locale, o = r.min, a = r.max, i = r.roundTo;
238
+ var l = t;
239
+ if (!q()(l) || l === "") {
240
+ return undefined;
241
+ }
242
+ if (K(n) === ".") {
243
+ // remove leading non-numeric characters.
244
+ l = l.replace(/^[^\d.-]/, "");
245
+ } else {
246
+ // remove leading non-numeric characters and replace comma with period
247
+ l = l.replace(/^[^\d,-]/, "").replace(",", ".");
248
+ }
249
+ var s = A({
250
+ val: parseFloat(l),
251
+ min: o,
252
+ max: a,
253
+ roundTo: i
254
+ });
255
+ if (u()(s)) {
256
+ return s;
257
+ }
258
+ return undefined;
259
+ };
260
+ var R = function e(r, t) {
261
+ if (r === undefined || !u()(r)) {
262
+ return "";
263
+ }
264
+ if (K(t) === ".") {
265
+ return r.toString();
266
+ }
267
+ // comma separated case
268
+ return r.toString().replace(".", ",");
269
+ };
270
+ var U = function e(r) {
271
+ var t = r.value, n = r.max;
272
+ return t !== undefined && u()(t) && n !== undefined && u()(n) && t >= n;
273
+ };
274
+ var F = function e(r) {
275
+ var t = r.value, n = r.min;
276
+ return t !== undefined && u()(t) && n !== undefined && u()(n) && t <= n;
277
+ };
278
+ var z = function e(r, t) {
279
+ if (false) {}
280
+ };
215
281
  // CONCATENATED MODULE: ./src/Number/Number.tsx
216
- function q(e) {
282
+ function X(e) {
217
283
  "@babel/helpers - typeof";
218
- return q = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
284
+ return X = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
219
285
  return typeof e;
220
286
  } : function(e) {
221
287
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
222
- }, q(e);
288
+ }, X(e);
223
289
  }
224
- function K() {
225
- return K = Object.assign ? Object.assign.bind() : function(e) {
226
- for (var t = 1; t < arguments.length; t++) {
227
- var r = arguments[t];
228
- for (var n in r) {
229
- ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
290
+ function $() {
291
+ return $ = Object.assign ? Object.assign.bind() : function(e) {
292
+ for (var r = 1; r < arguments.length; r++) {
293
+ var t = arguments[r];
294
+ for (var n in t) {
295
+ ({}).hasOwnProperty.call(t, n) && (e[n] = t[n]);
230
296
  }
231
297
  }
232
298
  return e;
233
- }, K.apply(null, arguments);
299
+ }, $.apply(null, arguments);
234
300
  }
235
- function M(e, t) {
236
- var r = Object.keys(e);
301
+ function L(e, r) {
302
+ var t = Object.keys(e);
237
303
  if (Object.getOwnPropertySymbols) {
238
304
  var n = Object.getOwnPropertySymbols(e);
239
- t && (n = n.filter((function(t) {
240
- return Object.getOwnPropertyDescriptor(e, t).enumerable;
241
- }))), r.push.apply(r, n);
305
+ r && (n = n.filter((function(r) {
306
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
307
+ }))), t.push.apply(t, n);
242
308
  }
243
- return r;
309
+ return t;
244
310
  }
245
- function R(e) {
246
- for (var t = 1; t < arguments.length; t++) {
247
- var r = null != arguments[t] ? arguments[t] : {};
248
- t % 2 ? M(Object(r), !0).forEach((function(t) {
249
- Q(e, t, r[t]);
250
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : M(Object(r)).forEach((function(t) {
251
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
311
+ function G(e) {
312
+ for (var r = 1; r < arguments.length; r++) {
313
+ var t = null != arguments[r] ? arguments[r] : {};
314
+ r % 2 ? L(Object(t), !0).forEach((function(r) {
315
+ oe(e, r, t[r]);
316
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : L(Object(t)).forEach((function(r) {
317
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
252
318
  }));
253
319
  }
254
320
  return e;
255
321
  }
256
- function F(e, t) {
257
- if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
322
+ function H(e, r) {
323
+ if (!(e instanceof r)) throw new TypeError("Cannot call a class as a function");
258
324
  }
259
- function U(e, t) {
260
- for (var r = 0; r < t.length; r++) {
261
- var n = t[r];
325
+ function Y(e, r) {
326
+ for (var t = 0; t < r.length; t++) {
327
+ var n = r[t];
262
328
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
263
- Object.defineProperty(e, W(n.key), n);
329
+ Object.defineProperty(e, ae(n.key), n);
264
330
  }
265
331
  }
266
- function z(e, t, r) {
267
- return t && U(e.prototype, t), r && U(e, r), Object.defineProperty(e, "prototype", {
332
+ function J(e, r, t) {
333
+ return r && Y(e.prototype, r), t && Y(e, t), Object.defineProperty(e, "prototype", {
268
334
  writable: !1
269
335
  }), e;
270
336
  }
271
- function X(e, t) {
272
- if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
273
- e.prototype = Object.create(t && t.prototype, {
337
+ function Q(e, r) {
338
+ if ("function" != typeof r && null !== r) throw new TypeError("Super expression must either be null or a function");
339
+ e.prototype = Object.create(r && r.prototype, {
274
340
  constructor: {
275
341
  value: e,
276
342
  writable: !0,
@@ -278,105 +344,105 @@
278
344
  }
279
345
  }), Object.defineProperty(e, "prototype", {
280
346
  writable: !1
281
- }), t && $(e, t);
347
+ }), r && W(e, r);
282
348
  }
283
- function $(e, t) {
284
- return $ = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
285
- return e.__proto__ = t, e;
286
- }, $(e, t);
349
+ function W(e, r) {
350
+ return W = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, r) {
351
+ return e.__proto__ = r, e;
352
+ }, W(e, r);
287
353
  }
288
- function L(e) {
289
- var t = Y();
354
+ function Z(e) {
355
+ var r = te();
290
356
  return function() {
291
- var r, n = J(e);
292
- if (t) {
293
- var o = J(this).constructor;
294
- r = Reflect.construct(n, arguments, o);
295
- } else r = n.apply(this, arguments);
296
- return G(this, r);
357
+ var t, n = ne(e);
358
+ if (r) {
359
+ var o = ne(this).constructor;
360
+ t = Reflect.construct(n, arguments, o);
361
+ } else t = n.apply(this, arguments);
362
+ return ee(this, t);
297
363
  };
298
364
  }
299
- function G(e, t) {
300
- if (t && ("object" == q(t) || "function" == typeof t)) return t;
301
- if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
302
- return H(e);
365
+ function ee(e, r) {
366
+ if (r && ("object" == X(r) || "function" == typeof r)) return r;
367
+ if (void 0 !== r) throw new TypeError("Derived constructors may only return object or undefined");
368
+ return re(e);
303
369
  }
304
- function H(e) {
370
+ function re(e) {
305
371
  if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
306
372
  return e;
307
373
  }
308
- function Y() {
374
+ function te() {
309
375
  try {
310
376
  var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
311
377
  } catch (e) {}
312
- return (Y = function t() {
378
+ return (te = function r() {
313
379
  return !!e;
314
380
  })();
315
381
  }
316
- function J(e) {
317
- return J = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
382
+ function ne(e) {
383
+ return ne = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
318
384
  return e.__proto__ || Object.getPrototypeOf(e);
319
- }, J(e);
385
+ }, ne(e);
320
386
  }
321
- function Q(e, t, r) {
322
- return (t = W(t)) in e ? Object.defineProperty(e, t, {
323
- value: r,
387
+ function oe(e, r, t) {
388
+ return (r = ae(r)) in e ? Object.defineProperty(e, r, {
389
+ value: t,
324
390
  enumerable: !0,
325
391
  configurable: !0,
326
392
  writable: !0
327
- }) : e[t] = r, e;
393
+ }) : e[r] = t, e;
328
394
  }
329
- function W(e) {
330
- var t = Z(e, "string");
331
- return "symbol" == q(t) ? t : t + "";
395
+ function ae(e) {
396
+ var r = ie(e, "string");
397
+ return "symbol" == X(r) ? r : r + "";
332
398
  }
333
- function Z(e, t) {
334
- if ("object" != q(e) || !e) return e;
335
- var r = e[Symbol.toPrimitive];
336
- if (void 0 !== r) {
337
- var n = r.call(e, t || "default");
338
- if ("object" != q(n)) return n;
399
+ function ie(e, r) {
400
+ if ("object" != X(e) || !e) return e;
401
+ var t = e[Symbol.toPrimitive];
402
+ if (void 0 !== t) {
403
+ var n = t.call(e, r || "default");
404
+ if ("object" != X(n)) return n;
339
405
  throw new TypeError("@@toPrimitive must return a primitive value.");
340
406
  }
341
- return ("string" === t ? String : Number)(e);
407
+ return ("string" === r ? String : Number)(e);
342
408
  }
343
409
  /** @public */
344
410
  /** @public */
345
- /** @public */ var ee = {
346
- append: i().bool,
347
- children: i().node,
348
- defaultValue: i().number,
349
- describedBy: i().string,
350
- disabled: i().bool,
351
- elementRef: i().oneOfType([ i().func, i().object ]),
352
- inputRef: i().oneOfType([ i().func, i().object ]),
353
- error: i().bool,
354
- hideStepButtons: i().bool,
355
- inline: i().bool,
356
- inputId: i().string,
357
- labelledBy: i().string,
358
- locale: i().string,
359
- max: i().number,
360
- min: i().number,
361
- name: i().string,
362
- onBlur: i().func,
363
- onChange: i().func,
364
- onFocus: i().func,
365
- endAdornment: i().node,
366
- startAdornment: i().node,
367
- onKeyDown: i().func,
368
- onKeyUp: i().func,
369
- onSelect: i().func,
370
- placeholder: i().string,
371
- prepend: i().bool,
372
- roundTo: i().number,
373
- step: i().number,
411
+ /** @public */ var le = {
412
+ append: a().bool,
413
+ children: a().node,
414
+ defaultValue: a().number,
415
+ describedBy: a().string,
416
+ disabled: a().bool,
417
+ elementRef: a().oneOfType([ a().func, a().object ]),
418
+ inputRef: a().oneOfType([ a().func, a().object ]),
419
+ error: a().bool,
420
+ hideStepButtons: a().bool,
421
+ inline: a().bool,
422
+ inputId: a().string,
423
+ labelledBy: a().string,
424
+ locale: a().string,
425
+ max: a().number,
426
+ min: a().number,
427
+ name: a().string,
428
+ onBlur: a().func,
429
+ onChange: a().func,
430
+ onFocus: a().func,
431
+ endAdornment: a().node,
432
+ startAdornment: a().node,
433
+ onKeyDown: a().func,
434
+ onKeyUp: a().func,
435
+ onSelect: a().func,
436
+ placeholder: a().string,
437
+ prepend: a().bool,
438
+ roundTo: a().number,
439
+ step: a().number,
374
440
  /** @private */
375
- splunkTheme: i().object,
376
- useSyntheticPlaceholder: i().bool,
377
- value: i().number
441
+ splunkTheme: a().object,
442
+ useSyntheticPlaceholder: a().bool,
443
+ value: a().number
378
444
  };
379
- var te = {
445
+ var se = {
380
446
  append: false,
381
447
  disabled: false,
382
448
  error: false,
@@ -388,142 +454,108 @@
388
454
  roundTo: 5,
389
455
  step: 1
390
456
  };
391
- var re = function(e) {
392
- X(r, e);
393
- var t = L(r);
394
- z(r, null, [ {
395
- key: "getDecimalSeparator",
396
- // @docs-props-type NumberPropsBase
397
- value: function e(t) {
398
- // A more robust and expandable solution would be to use formatToParts() once IE requirements are dropped.
399
- var r = new Intl.NumberFormat(t.replace("_", "-")).format(1.2);
400
- return r.indexOf(",") > -1 ? "," : ".";
401
- }
402
- }, {
403
- key: "validatePrependAppend",
404
- value: function e(t, r) {
405
- if (false) {}
406
- }
407
- }, {
408
- key: "stringToNumber",
409
- value: function e(t, n) {
410
- var o = t;
411
- if (!c()(o) || o === "") {
412
- return undefined;
413
- }
414
- if (r.getDecimalSeparator(n.locale) === ".") {
415
- // remove leading non-numeric characters.
416
- o = o.replace(/^[^\d.-]/, "");
417
- } else {
418
- // remove leading non-numeric characters and replace comma with period
419
- o = o.replace(/^[^\d,-]/, "").replace(",", ".");
420
- }
421
- var i = r.limitValue(parseFloat(o), n);
422
- if (u()(i)) {
423
- return i;
424
- }
425
- return undefined;
426
- }
427
- }, {
428
- key: "numberToString",
429
- value: function e(t, n) {
430
- if (t === undefined || !u()(t)) {
431
- return "";
432
- }
433
- if (r.getDecimalSeparator(n.locale) === ".") {
434
- return t.toString();
435
- }
436
- // comma separated case
437
- return t.toString().replace(".", ",");
438
- }
439
- }, {
440
- key: "limitValue",
441
- value: function e(t, r) {
442
- var n = r.min, o = r.max, i = r.roundTo;
443
- var a = t;
444
- if (!u()(t)) {
445
- return a;
446
- }
447
- if (n !== undefined && u()(n)) {
448
- a = Math.max(n, a);
449
- }
450
- if (o !== undefined && u()(o)) {
451
- a = Math.min(o, a);
452
- }
453
- var l = Math.pow(10, i);
454
- return Math.round(a * l) / l;
455
- }
456
- }, {
457
+ var ue = function(e) {
458
+ Q(t, e);
459
+ var r = Z(t);
460
+ J(t, null, [ {
457
461
  key: "getDerivedStateFromProps",
458
- value: function e(t, n) {
459
- if (l()(t, "value") && t.value !== n.prevValueProp) {
460
- var o = r.stringToNumber(n.stringValue, t);
461
- return t.value !== o ? {
462
- prevValueProp: t.value,
463
- stringValue: r.numberToString(t.value, t)
462
+ // @docs-props-type NumberPropsBase
463
+ value: function e(r, t) {
464
+ if (l()(r, "value") && r.value !== t.prevValueProp) {
465
+ var n = r.locale, o = r.min, a = r.max, i = r.roundTo;
466
+ var s = t.stringValue;
467
+ var u = M({
468
+ str: s,
469
+ locale: n,
470
+ min: o,
471
+ max: a,
472
+ roundTo: i
473
+ });
474
+ return r.value !== u ? {
475
+ prevValueProp: r.value,
476
+ stringValue: R(r.value, r.locale)
464
477
  } : {
465
- prevValueProp: t.value
478
+ prevValueProp: r.value
466
479
  };
467
480
  }
468
481
  return null;
469
482
  }
470
483
  } ]);
471
- function r(e) {
484
+ function t(e) {
472
485
  var n;
473
- F(this, r);
474
- n = t.call(this, e);
475
- Q(H(n), "controlledExternally", void 0);
476
- Q(H(n), "text", null);
477
- Q(H(n), "handleInputBlur", (function(e, t) {
478
- var r, o;
486
+ H(this, t);
487
+ n = r.call(this, e);
488
+ oe(re(n), "controlledExternally", void 0);
489
+ oe(re(n), "text", null);
490
+ oe(re(n), "handleInputBlur", (function(e, r) {
491
+ var t, o;
479
492
  n.updateString();
480
- (r = (o = n.props).onBlur) === null || r === void 0 ? void 0 : r.call(o, e, t);
493
+ (t = (o = n.props).onBlur) === null || t === void 0 ? void 0 : t.call(o, e, r);
481
494
  }));
482
- Q(H(n), "handleInputChange", (function(e, t) {
483
- var r = t.value;
484
- n.setValueFromString(e, r);
495
+ oe(re(n), "handleInputChange", (function(e, r) {
496
+ var t = r.value;
497
+ var o = n.props, a = o.locale, i = o.min, l = o.max, s = o.roundTo, u = o.name, c = o.onChange;
498
+ var p = M({
499
+ str: t,
500
+ locale: a,
501
+ min: i,
502
+ max: l,
503
+ roundTo: s
504
+ });
505
+ n.setState({
506
+ value: n.isControlled() ? undefined : p,
507
+ stringValue: t
508
+ }, (function() {
509
+ if (n.getValue() !== p || !n.isControlled()) {
510
+ c === null || c === void 0 ? void 0 : c(e, {
511
+ value: p,
512
+ name: u
513
+ });
514
+ }
515
+ }));
485
516
  }));
486
- Q(H(n), "handleKeyDown", (function(e) {
487
- var t, r;
488
- if (!e.metaKey && !e.ctrlKey && !e.altKey && (0, b.addsCharacter)(e.nativeEvent) !== false) {
517
+ oe(re(n), "handleKeyDown", (function(e) {
518
+ var r, t;
519
+ if (!e.metaKey && !e.ctrlKey && !e.altKey && (0, v.addsCharacter)(e.nativeEvent) !== false) {
489
520
  // only allow numbers, negative and decimals
490
- if (!(0, b.isNumeric)(e.nativeEvent, {
521
+ if (!(0, v.isNumeric)(e.nativeEvent, {
491
522
  locale: n.props.locale
492
523
  })) {
493
524
  e.preventDefault();
494
525
  }
495
526
  // if minus is not allowed or there is already one, prevent input
496
- if ((0, b.isMinus)(e.nativeEvent) && (n.preventNegativeNumbers() || n.state.stringValue.indexOf("-") >= 0)) {
527
+ var o = n.props.min !== undefined && u()(n.props.min) && n.props.min >= 0;
528
+ if ((0, v.isMinus)(e.nativeEvent) && (o || n.state.stringValue.indexOf("-") >= 0)) {
497
529
  e.preventDefault();
498
530
  }
499
531
  // if decimal is not allowed or there is already one, prevent input
500
- if ((0, b.isDecimal)(e.nativeEvent, {
532
+ if ((0, v.isDecimal)(e.nativeEvent, {
501
533
  locale: n.props.locale
502
- }) && (n.props.roundTo <= 0 || n.state.stringValue.indexOf(n.props.locale) >= 0)) {
534
+ }) && (n.props.roundTo <= 0 || n.state.stringValue.indexOf(K(n.props.locale)) >= 0)) {
503
535
  e.preventDefault();
504
536
  }
505
537
  }
506
538
  // Arrow up and down will increment
507
- if ((0, b.keycode)(e.nativeEvent) === "up") {
539
+ if ((0, v.keycode)(e.nativeEvent) === "up") {
508
540
  n.increment(e, n.props.step);
509
541
  e.preventDefault();
510
- } else if ((0, b.keycode)(e.nativeEvent) === "down") {
542
+ } else if ((0, v.keycode)(e.nativeEvent) === "down") {
511
543
  n.increment(e, -n.props.step);
512
544
  e.preventDefault();
513
545
  }
514
- (t = (r = n.props).onKeyDown) === null || t === void 0 ? void 0 : t.call(r, e);
546
+ (r = (t = n.props).onKeyDown) === null || r === void 0 ? void 0 : r.call(t, e);
515
547
  }));
516
- Q(H(n), "handleKeyUp", (function(e) {
517
- var t, r;
518
- if ((0, b.keycode)(e.nativeEvent) === "enter") {
548
+ oe(re(n), "handleKeyUp", (function(e) {
549
+ var r, t;
550
+ if ((0, v.keycode)(e.nativeEvent) === "enter") {
519
551
  n.updateString();
520
552
  }
521
- (t = (r = n.props).onKeyUp) === null || t === void 0 ? void 0 : t.call(r, e);
553
+ (r = (t = n.props).onKeyUp) === null || r === void 0 ? void 0 : r.call(t, e);
522
554
  }));
523
- Q(H(n), "handleIncrement", (function(e) {
555
+ oe(re(n), "handleIncrement", (function(e) {
524
556
  n.increment(e, n.props.step);
525
557
  }));
526
- Q(H(n), "handleDecrement", (function(e) {
558
+ oe(re(n), "handleDecrement", (function(e) {
527
559
  n.increment(e, -n.props.step);
528
560
  }));
529
561
  n.controlledExternally = l()(e, "value");
@@ -535,7 +567,7 @@
535
567
  prevValueProp: n.isControlled() ? o : undefined,
536
568
  // eslint-disable-line react/no-unused-state
537
569
  // stringValue stores the current contents of the input text box - it might be out of range, invalid, ...
538
- stringValue: r.numberToString(o, e)
570
+ stringValue: R(o, e.locale)
539
571
  };
540
572
  if (false) {}
541
573
  if (l()(e, "useSyntheticPlaceholder")) {
@@ -543,54 +575,34 @@
543
575
  console.warn("The 'Number' prop 'useSyntheticPlaceholder' has been marked for deprecation.");
544
576
  }
545
577
  if (false) {}
546
- r.validatePrependAppend(n.props.append, n.props.prepend);
578
+ z(n.props.append, n.props.prepend);
547
579
  return n;
548
580
  }
549
- z(r, [ {
581
+ J(t, [ {
550
582
  key: "componentDidUpdate",
551
- value: function e(t) {
583
+ value: function e(r) {
552
584
  if (false) {}
553
585
  if (false) {}
554
- r.validatePrependAppend(this.props.append, this.props.prepend);
586
+ z(this.props.append, this.props.prepend);
555
587
  }
556
588
  }, {
557
589
  key: "getValue",
558
590
  value: function e() {
559
591
  return this.isControlled() ? this.props.value : this.state.value;
560
592
  }
561
- }, {
562
- key: "setValueFromString",
563
- value: function e(t, n) {
564
- var o = this;
565
- var i = r.stringToNumber(n, this.props);
566
- var a = this.props.name;
567
- this.setState({
568
- value: this.isControlled() ? undefined : i,
569
- stringValue: n
570
- }, (function() {
571
- if (o.getValue() !== i || !o.isControlled()) {
572
- var e, r;
573
- (e = (r = o.props).onChange) === null || e === void 0 ? void 0 : e.call(r, t, {
574
- value: i,
575
- name: a
576
- });
577
- }
578
- }));
579
- }
580
593
  }, {
581
594
  key: "setValue",
582
- value: function e(t, n) {
583
- var o = this;
584
- var i = this.props.name;
595
+ value: function e(r, t) {
596
+ var n = this;
597
+ var o = this.props, a = o.locale, i = o.onChange, l = o.name;
585
598
  this.setState({
586
- value: this.isControlled() ? undefined : n,
587
- stringValue: r.numberToString(n, this.props)
599
+ value: this.isControlled() ? undefined : t,
600
+ stringValue: R(t, a)
588
601
  }, (function() {
589
- if (o.getValue() !== n || !o.isControlled()) {
590
- var e, r;
591
- (e = (r = o.props).onChange) === null || e === void 0 ? void 0 : e.call(r, t, {
592
- value: n,
593
- name: i
602
+ if (n.getValue() !== t || !n.isControlled()) {
603
+ i === null || i === void 0 ? void 0 : i(r, {
604
+ value: t,
605
+ name: l
594
606
  });
595
607
  }
596
608
  }));
@@ -601,9 +613,9 @@
601
613
  * Place focus on the input.
602
614
  */
603
615
  // eslint-disable-next-line react/no-unused-class-component-methods
604
- value: function e(t) {
616
+ value: function e(r) {
605
617
  if (this.text) {
606
- this.text.focus(t);
618
+ this.text.focus(r);
607
619
  }
608
620
  }
609
621
  }, {
@@ -614,127 +626,141 @@
614
626
  }, {
615
627
  key: "updateString",
616
628
  value: function e() {
617
- var t = this.getValue();
629
+ var r = this.getValue();
618
630
  this.setState({
619
- stringValue: r.numberToString(t, this.props)
631
+ stringValue: R(r, this.props.locale)
620
632
  });
621
633
  }
622
634
  }, {
623
635
  key: "increment",
624
- value: function e(t, n) {
625
- var o = r.stringToNumber(this.state.stringValue, this.props);
626
- var i;
636
+ value: function e(r, t) {
637
+ var n = this.props, o = n.locale, a = n.min, i = n.max, l = n.roundTo, s = n.defaultValue, c = n.step;
638
+ var p = this.state.stringValue;
639
+ var d = M({
640
+ str: p,
641
+ locale: o,
642
+ min: a,
643
+ max: i,
644
+ roundTo: l
645
+ });
646
+ var f;
627
647
  // increment appropriate number
628
- if (o !== undefined && u()(o)) {
648
+ if (d !== undefined && u()(d)) {
629
649
  // increment the entered value
630
- i = o + n;
631
- } else if (this.props.defaultValue !== undefined && u()(this.props.defaultValue)) {
650
+ f = d + t;
651
+ } else if (s !== undefined && u()(s)) {
632
652
  // increment the defaultValue
633
- i = this.props.defaultValue + n;
634
- } else if (n > 0) {
653
+ f = s + t;
654
+ } else if (t > 0) {
635
655
  // increment up to max or step value
636
- i = this.props.max || this.props.step;
656
+ f = i || c;
637
657
  } else {
638
658
  // increment down to min or 0
639
- i = this.props.min || 0;
659
+ f = a || 0;
640
660
  // set to min or 0
641
661
  }
642
- this.setValue(t, r.limitValue(i, this.props));
643
- }
644
- }, {
645
- key: "preventNegativeNumbers",
646
- value: function e() {
647
- return this.props.min !== undefined && u()(this.props.min) && this.props.min >= 0;
662
+ this.setValue(r, A({
663
+ val: f,
664
+ min: a,
665
+ max: i,
666
+ roundTo: l
667
+ }));
648
668
  }
649
669
  }, {
650
670
  key: "render",
651
671
  value: function e() {
652
- var t = this;
653
- var r = this.props, o = r.append, i = r.describedBy, a = r.disabled, l = r.elementRef, s = r.error, p = r.hideStepButtons, c = r.inline, d = r.value, v = d === void 0 ? this.state.value : d, b = r.max, h = r.min, y = r.prepend, g = r.splunkTheme, S = r.endAdornment, w = r.startAdornment;
654
- var x = f()(this.props, [ "defaultValue", "hideStepButtons", "max", "min", "roundTo", "spellCheck", "step" ]);
672
+ var r = this;
673
+ var t = this.props, o = t.append, a = t.describedBy, i = t.disabled, l = t.elementRef, s = t.error, u = t.hideStepButtons, c = t.inline, d = t.value, v = d === void 0 ? this.state.value : d, m = t.max, b = t.min, h = t.prepend, g = t.splunkTheme, x = t.endAdornment, k = t.startAdornment;
674
+ var w = p()(this.props, [ "defaultValue", "hideStepButtons", "max", "min", "roundTo", "spellCheck", "step" ]);
655
675
  var O = g.isPrisma;
656
- var j = O ? {} : {
676
+ var S = O ? {} : {
657
677
  append: o,
658
678
  prepend: !o,
659
679
  error: s,
660
680
  inline: false
661
681
  };
662
- var P = v !== undefined && u()(v) && b !== undefined && u()(b) && v >= b;
663
- var C = v !== undefined && u()(v) && h !== undefined && u()(h) && v <= h;
664
- var T = n().createElement(k, {
682
+ var j = U({
683
+ value: v,
684
+ max: m
685
+ });
686
+ var C = F({
687
+ value: v,
688
+ min: b
689
+ });
690
+ var E = n().createElement(y, {
665
691
  width: "6px",
666
692
  height: "4px",
667
- screenReaderText: (0, m._)("Increment")
693
+ screenReaderText: (0, f._)("Increment")
668
694
  });
669
- var _ = R({
695
+ var D = G({
670
696
  "data-test": "increment",
671
- disabled: a || P,
697
+ disabled: i || j,
672
698
  onClick: this.handleIncrement,
673
699
  tabIndex: -1
674
- }, j);
675
- var B = O ? n().createElement(I, _, T) : n().createElement(N, _, T);
676
- var q = n().createElement(k, {
700
+ }, S);
701
+ var I = O ? n().createElement(B, D, E) : n().createElement(_, D, E);
702
+ var q = n().createElement(y, {
677
703
  width: "6px",
678
704
  height: "4px",
679
- screenReaderText: (0, m._)("Decrement"),
705
+ screenReaderText: (0, f._)("Decrement"),
680
706
  style: {
681
707
  transform: "rotateX(180deg)"
682
708
  }
683
709
  });
684
- var M = R({
710
+ var K = G({
685
711
  "data-test": "decrement",
686
- disabled: a || C,
712
+ disabled: i || C,
687
713
  onClick: this.handleDecrement,
688
714
  tabIndex: -1
689
- }, j);
690
- var F = O ? n().createElement(A, M, q) : n().createElement(D, M, q);
691
- var U = o && !y;
692
- var z = (!a || O) && U && !p && n().createElement(E, {
693
- $isAppend: U
694
- }, B, F);
695
- var X = (!a || O) && !U && !p && n().createElement(E, {
696
- $isAppend: U
697
- }, B, F);
715
+ }, S);
716
+ var A = O ? n().createElement(N, K, q) : n().createElement(V, K, q);
717
+ var M = o && !h;
718
+ var R = (!i || O) && M && !u && n().createElement(T, {
719
+ $isAppend: M
720
+ }, I, A);
721
+ var z = (!i || O) && !M && !u && n().createElement(T, {
722
+ $isAppend: M
723
+ }, I, A);
698
724
 
699
- return n().createElement(V, K({
725
+ return n().createElement(P, $({
700
726
  autoCapitalize: "off",
701
727
  autoComplete: "off",
702
728
  autoCorrect: "off",
703
729
  spellCheck: false,
704
730
  "data-test": "number",
705
731
  elementRef: l,
706
- ref: function e(r) {
707
- t.text = r;
732
+ ref: function e(t) {
733
+ r.text = t;
708
734
  }
709
- }, x, {
735
+ }, w, {
710
736
  inline: c,
711
737
  onChange: this.handleInputChange,
712
738
  onBlur: this.handleInputBlur,
713
739
  onKeyDown: this.handleKeyDown,
714
740
  onKeyUp: this.handleKeyUp,
715
741
  value: this.state.stringValue,
716
- "aria-describedby": i,
742
+ "aria-describedby": a,
717
743
  error: s,
718
744
  "data-test-value": v,
719
- startAdornment: w || z,
720
- endAdornment: S || X,
745
+ startAdornment: k || R,
746
+ endAdornment: x || z,
721
747
  role: "spinbutton",
722
748
  "aria-valuenow": this.state.value,
723
- "aria-valuemin": h,
724
- "aria-valuemax": b,
749
+ "aria-valuemin": b,
750
+ "aria-valuemax": m,
725
751
  "aria-invalid": s
726
752
  }));
727
753
  }
728
754
  } ]);
729
- return r;
730
- }(r.Component);
731
- Q(re, "propTypes", ee);
732
- Q(re, "defaultProps", te);
733
- Q(re, "displayName", "Number");
734
- var ne = (0, v.withSplunkTheme)(re);
735
- ne.propTypes = re.propTypes;
736
- /* harmony default export */ const oe = ne;
755
+ return t;
756
+ }(t.Component);
757
+ oe(ue, "propTypes", le);
758
+ oe(ue, "defaultProps", se);
759
+ oe(ue, "displayName", "Number");
760
+ var ce = (0, d.withSplunkTheme)(ue);
761
+ ce.propTypes = ue.propTypes;
762
+ /* harmony default export */ const pe = ce;
737
763
  // only for styled components using Number
738
764
  // CONCATENATED MODULE: ./src/Number/index.ts
739
- module.exports = t;
765
+ module.exports = r;
740
766
  /******/})();