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