@splunk/react-ui 4.38.0 → 4.39.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 (136) hide show
  1. package/Accordion.js +131 -153
  2. package/Anchor.js +50 -58
  3. package/Animation.js +64 -59
  4. package/AnimationToggle.js +59 -61
  5. package/Box.js +59 -67
  6. package/Breadcrumbs.js +113 -127
  7. package/Button.js +151 -169
  8. package/ButtonGroup.js +41 -49
  9. package/ButtonSimple.js +264 -295
  10. package/CHANGELOG.md +28 -0
  11. package/Calendar.js +353 -414
  12. package/Card.js +183 -243
  13. package/CardLayout.js +86 -83
  14. package/Chip.js +104 -122
  15. package/Clickable.js +180 -198
  16. package/CloseButton.js +52 -60
  17. package/Code.js +24 -31
  18. package/CollapsiblePanel.js +172 -202
  19. package/Color.js +371 -412
  20. package/ColumnLayout.js +72 -96
  21. package/ComboBox.js +266 -303
  22. package/Concertina.js +406 -454
  23. package/ControlGroup.js +165 -194
  24. package/Date.js +116 -131
  25. package/DefinitionList.js +125 -149
  26. package/Divider.js +81 -79
  27. package/Dropdown.js +226 -237
  28. package/DualListbox.js +150 -186
  29. package/EventListener.js +4 -1
  30. package/File.js +1032 -955
  31. package/FormRows.js +281 -334
  32. package/Heading.js +27 -35
  33. package/Image.js +101 -116
  34. package/JSONTree.js +301 -344
  35. package/Layer.js +118 -126
  36. package/Link.js +141 -159
  37. package/List.js +61 -77
  38. package/MIGRATION.mdx +92 -38
  39. package/Markdown.js +288 -347
  40. package/Menu.js +506 -532
  41. package/Message.js +173 -196
  42. package/MessageBar.js +58 -66
  43. package/Modal.js +241 -290
  44. package/ModalLayer.js +130 -148
  45. package/Monogram.js +138 -138
  46. package/Multiselect.js +1589 -1902
  47. package/Number.js +159 -178
  48. package/Paginator.js +296 -335
  49. package/Paragraph.js +24 -32
  50. package/Popover.js +448 -441
  51. package/Progress.js +65 -75
  52. package/RadioBar.js +301 -303
  53. package/RadioList.js +77 -119
  54. package/Resize.js +105 -127
  55. package/ResultsMenu.js +373 -385
  56. package/ScreenReaderContent.js +50 -58
  57. package/Scroll.js +209 -244
  58. package/Search.js +379 -391
  59. package/Select.js +1077 -1345
  60. package/SidePanel.js +122 -142
  61. package/Slider.js +132 -145
  62. package/SlidingPanels.js +238 -270
  63. package/SplitButton.js +222 -245
  64. package/StaticContent.js +68 -76
  65. package/StepBar.js +206 -205
  66. package/Switch.js +176 -205
  67. package/TabBar.js +222 -258
  68. package/TabLayout.js +114 -139
  69. package/Table.js +2017 -2180
  70. package/Text.js +379 -493
  71. package/TextArea.js +411 -441
  72. package/Tooltip.js +116 -132
  73. package/TransitionOpen.js +160 -178
  74. package/Tree.js +268 -287
  75. package/Typography.js +48 -52
  76. package/WaitSpinner.js +60 -68
  77. package/cypress/support/commands.ts +9 -0
  78. package/cypress/support/index.d.ts +6 -0
  79. package/cypress/tsconfig.cypress.json +1 -0
  80. package/docker-compose.yml +0 -1
  81. package/package.json +14 -14
  82. package/types/src/Button/Button.d.ts +5 -1
  83. package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
  84. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
  85. package/types/src/Color/Color.d.ts +2 -2
  86. package/types/src/Color/Palette.d.ts +4 -2
  87. package/types/src/ComboBox/Option.d.ts +1 -1
  88. package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
  89. package/types/src/Date/Date.d.ts +2 -2
  90. package/types/src/File/File.d.ts +2 -3
  91. package/types/src/File/Retry.d.ts +1 -2
  92. package/types/src/Menu/Item.d.ts +18 -5
  93. package/types/src/Menu/Menu.d.ts +3 -3
  94. package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
  95. package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
  96. package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
  97. package/types/src/Multiselect/Option.d.ts +2 -0
  98. package/types/src/Number/Number.d.ts +3 -3
  99. package/types/src/Popover/Popover.d.ts +3 -4
  100. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  101. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  102. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
  103. package/types/src/Search/Option.d.ts +9 -3
  104. package/types/src/Select/Option.d.ts +3 -1
  105. package/types/src/Select/OptionBase.d.ts +7 -5
  106. package/types/src/Select/Select.d.ts +1 -1
  107. package/types/src/Select/SelectAllOption.d.ts +4 -4
  108. package/types/src/SidePanel/SidePanel.d.ts +1 -1
  109. package/types/src/Slider/Slider.d.ts +2 -2
  110. package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
  111. package/types/src/StepBar/Step.d.ts +1 -2
  112. package/types/src/Switch/Switch.d.ts +0 -1
  113. package/types/src/TabBar/Tab.d.ts +1 -1
  114. package/types/src/TabBar/TabBar.d.ts +3 -1
  115. package/types/src/TabLayout/TabLayout.d.ts +2 -0
  116. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  117. package/types/src/Table/Table.d.ts +0 -1
  118. package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
  119. package/types/src/Text/IconOutlinedHide.d.ts +1 -2
  120. package/types/src/Text/IconOutlinedView.d.ts +1 -2
  121. package/types/src/Text/Text.d.ts +2 -2
  122. package/types/src/TextArea/TextArea.d.ts +2 -2
  123. package/types/src/Tooltip/Tooltip.d.ts +4 -4
  124. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
  125. package/useForceUpdate.js +30 -32
  126. package/useKeyPress.js +1 -1
  127. package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
  128. package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
  129. package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
  130. package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
  131. package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
  132. package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
  133. package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
  134. /package/types/src/Message/docs/examples/{prisma/Title.d.ts → Title.d.ts} +0 -0
  135. /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
  136. /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/Slider.js CHANGED
@@ -61,7 +61,7 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- default: () => /* reexport */ Z
64
+ default: () => /* reexport */ te
65
65
  });
66
66
  // CONCATENATED MODULE: external "react"
67
67
  const r = require("react");
@@ -71,10 +71,10 @@
71
71
  var a = e.n(i);
72
72
  // CONCATENATED MODULE: external "decimal.js-light"
73
73
  const o = require("decimal.js-light");
74
- var s = e.n(o);
74
+ var l = e.n(o);
75
75
  // CONCATENATED MODULE: external "lodash/has"
76
- const l = require("lodash/has");
77
- var u = e.n(l);
76
+ const s = require("lodash/has");
77
+ var u = e.n(s);
78
78
  // CONCATENATED MODULE: external "lodash/keys"
79
79
  const c = require("lodash/keys");
80
80
  var p = e.n(c);
@@ -86,31 +86,31 @@
86
86
  // CONCATENATED MODULE: external "@splunk/themes"
87
87
  const h = require("@splunk/themes");
88
88
  // CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
89
- const m = require("@splunk/react-ui/EventListener");
90
- var b = e.n(m);
89
+ const b = require("@splunk/react-ui/EventListener");
90
+ var m = e.n(b);
91
91
  // CONCATENATED MODULE: external "@splunk/react-ui/Popover"
92
92
  const y = require("@splunk/react-ui/Popover");
93
93
  var g = e.n(y);
94
94
  // CONCATENATED MODULE: external "styled-components"
95
95
  const k = require("styled-components");
96
- var x = e.n(k);
96
+ var w = e.n(k);
97
97
  // CONCATENATED MODULE: external "tinycolor2"
98
- const w = require("tinycolor2");
99
- var S = e.n(w);
98
+ const x = require("tinycolor2");
99
+ var S = e.n(x);
100
100
  // CONCATENATED MODULE: external "@splunk/react-ui/Box"
101
- const C = require("@splunk/react-ui/Box");
102
- var T = e.n(C);
101
+ const T = require("@splunk/react-ui/Box");
102
+ var C = e.n(T);
103
103
  // CONCATENATED MODULE: ./src/Slider/SliderStyles.ts
104
- var V = x()(T()).withConfig({
104
+ var O = w()(C()).withConfig({
105
105
  displayName: "SliderStyles__StyledBox",
106
106
  componentId: "sc-16ooit4-0"
107
107
  })([ "", ";flex:1 1 auto;&[data-inline]{width:300px;}" ], h.mixins.reset("block"));
108
- var E = x().div.withConfig({
108
+ var E = w().div.withConfig({
109
109
  displayName: "SliderStyles__StyledInput",
110
110
  componentId: "sc-16ooit4-1"
111
111
  })([ "flex:1 0 0;vertical-align:middle;position:relative;cursor:default;height:", ";max-width:100%;" ], h.variables.inputHeight);
112
- var M = "1px";
113
- var O = x().div.withConfig({
112
+ var V = "1px";
113
+ var B = w().div.withConfig({
114
114
  displayName: "SliderStyles__StyledSliderBar",
115
115
  componentId: "sc-16ooit4-2"
116
116
  })([ "position:absolute;top:", ";left:0;height:", ";width:100%;border-radius:2.5px;", "" ], (0,
@@ -142,21 +142,21 @@
142
142
  },
143
143
  prisma: h.variables.neutral100
144
144
  });
145
- var s = (0, h.pick)({
145
+ var l = (0, h.pick)({
146
146
  enterprise: h.variables.gray60,
147
147
  prisma: h.variables.interactiveColorBorder
148
148
  });
149
- return i !== undefined ? (0, k.css)([ "background-image:linear-gradient( to right,", ",", " ", ",transparent ", ",transparent 100% ),repeating-linear-gradient( to right,", ",", " ", ",transparent ", ",transparent ", "% ),linear-gradient( to right,", ",", " ", "%,", " ", "%,", " );" ], a, a, M, M, o, o, M, M, i, a, a, n, s, n, s) : (0,
150
- k.css)([ "background-image:linear-gradient( to right,", ",", " ", "%,", " ", "%,", " );" ], a, a, n, s, n, s);
149
+ return i !== undefined ? (0, k.css)([ "background-image:linear-gradient( to right,", ",", " ", ",transparent ", ",transparent 100% ),repeating-linear-gradient( to right,", ",", " ", ",transparent ", ",transparent ", "% ),linear-gradient( to right,", ",", " ", "%,", " ", "%,", " );" ], a, a, V, V, o, o, V, V, i, a, a, n, l, n, l) : (0,
150
+ k.css)([ "background-image:linear-gradient( to right,", ",", " ", "%,", " ", "%,", " );" ], a, a, n, l, n, l);
151
151
  }));
152
- var B = (0, h.pick)({
152
+ var M = (0, h.pick)({
153
153
  enterprise: 18,
154
154
  prisma: 20
155
155
  });
156
- var _ = x().button.withConfig({
156
+ var _ = w().button.withConfig({
157
157
  displayName: "SliderStyles__StyledSliderThumb",
158
158
  componentId: "sc-16ooit4-3"
159
- })([ "", ";display:block;position:absolute;cursor:pointer;width:", "px;height:", "px;border-radius:", ";border-width:0;background-color:", ";margin-left:-8px;top:", ";left:", "%;&:hover:not([disabled]){outline:0;z-index:1;", "}&:focus:not([disabled]),&:active{outline:0;box-shadow:", ";z-index:1;", "}&[disabled]{cursor:not-allowed;background-color:", ";}", "" ], h.mixins.reset("inline"), B, B, (0,
159
+ })([ "", ";display:block;position:absolute;cursor:pointer;width:", "px;height:", "px;border-radius:", ";border-width:0;background-color:", ";margin-left:-8px;top:", ";left:", "%;&:hover:not([disabled]){outline:0;z-index:1;", "}&:focus:not([disabled]),&:active{outline:0;box-shadow:", ";z-index:1;", "}&[disabled]{cursor:not-allowed;background-color:", ";}", "" ], h.mixins.reset("inline"), M, M, (0,
160
160
  h.pick)({
161
161
  enterprise: "9px",
162
162
  prisma: "10px"
@@ -190,7 +190,7 @@
190
190
  prisma: h.mixins.overlayColors(h.variables.accentColorNegative, h.variables.interactiveColorOverlayActive)
191
191
  }));
192
192
  }));
193
- var P = x().div.withConfig({
193
+ var P = w().div.withConfig({
194
194
  displayName: "SliderStyles__StyledPopoverContent",
195
195
  componentId: "sc-16ooit4-4"
196
196
  })([ "padding:", ";font-size:", ";line-height:", ";" ], (0, h.pick)({
@@ -210,14 +210,14 @@
210
210
  prisma: h.variables.contentColorDisabled
211
211
  }));
212
212
  }));
213
- var D = x()(T()).withConfig({
213
+ var q = w()(C()).withConfig({
214
214
  displayName: "SliderStyles__StyledMinLabelBox",
215
215
  componentId: "sc-16ooit4-5"
216
216
  })([ "", ";margin-right:", ";text-align:right;" ], j, (0, h.pick)({
217
217
  enterprise: "15px",
218
218
  prisma: "16px"
219
219
  }));
220
- var q = x()(T()).withConfig({
220
+ var D = w()(C()).withConfig({
221
221
  displayName: "SliderStyles__StyledMaxLabelBox",
222
222
  componentId: "sc-16ooit4-6"
223
223
  })([ "", ";margin-left:", ";text-align:left;" ], j, (0, h.pick)({
@@ -225,128 +225,113 @@
225
225
  prisma: "16px"
226
226
  }));
227
227
  // CONCATENATED MODULE: ./src/Slider/Slider.tsx
228
- function $(e) {
228
+ function N(e) {
229
229
  "@babel/helpers - typeof";
230
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
231
- $ = function e(t) {
232
- return typeof t;
233
- };
234
- } else {
235
- $ = function e(t) {
236
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
237
- };
238
- }
239
- return $(e);
230
+ return N = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
231
+ return typeof e;
232
+ } : function(e) {
233
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
234
+ }, N(e);
240
235
  }
241
- function N() {
242
- N = Object.assign || function(e) {
236
+ function $() {
237
+ return $ = Object.assign ? Object.assign.bind() : function(e) {
243
238
  for (var t = 1; t < arguments.length; t++) {
244
239
  var r = arguments[t];
245
240
  for (var n in r) {
246
- if (Object.prototype.hasOwnProperty.call(r, n)) {
247
- e[n] = r[n];
248
- }
241
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
249
242
  }
250
243
  }
251
244
  return e;
252
- };
253
- return N.apply(this, arguments);
254
- }
255
- function R(e, t) {
256
- if (!(e instanceof t)) {
257
- throw new TypeError("Cannot call a class as a function");
258
- }
245
+ }, $.apply(null, arguments);
259
246
  }
260
247
  function F(e, t) {
248
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
249
+ }
250
+ function I(e, t) {
261
251
  for (var r = 0; r < t.length; r++) {
262
252
  var n = t[r];
263
- n.enumerable = n.enumerable || false;
264
- n.configurable = true;
265
- if ("value" in n) n.writable = true;
266
- Object.defineProperty(e, n.key, n);
253
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
254
+ Object.defineProperty(e, G(n.key), n);
267
255
  }
268
256
  }
269
- function I(e, t, r) {
270
- if (t) F(e.prototype, t);
271
- if (r) F(e, r);
272
- return e;
257
+ function L(e, t, r) {
258
+ return t && I(e.prototype, t), r && I(e, r), Object.defineProperty(e, "prototype", {
259
+ writable: !1
260
+ }), e;
273
261
  }
274
- function L(e, t) {
275
- if (typeof t !== "function" && t !== null) {
276
- throw new TypeError("Super expression must either be null or a function");
277
- }
262
+ function R(e, t) {
263
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
278
264
  e.prototype = Object.create(t && t.prototype, {
279
265
  constructor: {
280
266
  value: e,
281
- writable: true,
282
- configurable: true
267
+ writable: !0,
268
+ configurable: !0
283
269
  }
284
- });
285
- if (t) A(e, t);
270
+ }), Object.defineProperty(e, "prototype", {
271
+ writable: !1
272
+ }), t && A(e, t);
286
273
  }
287
274
  function A(e, t) {
288
- A = Object.setPrototypeOf || function e(t, r) {
289
- t.__proto__ = r;
290
- return t;
291
- };
292
- return A(e, t);
275
+ return A = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
276
+ return e.__proto__ = t, e;
277
+ }, A(e, t);
293
278
  }
294
279
  function W(e) {
295
280
  var t = U();
296
- return function r() {
297
- var n = H(e), i;
281
+ return function() {
282
+ var r, n = H(e);
298
283
  if (t) {
299
- var a = H(this).constructor;
300
- i = Reflect.construct(n, arguments, a);
301
- } else {
302
- i = n.apply(this, arguments);
303
- }
304
- return z(this, i);
284
+ var i = H(this).constructor;
285
+ r = Reflect.construct(n, arguments, i);
286
+ } else r = n.apply(this, arguments);
287
+ return z(this, r);
305
288
  };
306
289
  }
307
290
  function z(e, t) {
308
- if (t && ($(t) === "object" || typeof t === "function")) {
309
- return t;
310
- }
291
+ if (t && ("object" == N(t) || "function" == typeof t)) return t;
292
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
311
293
  return K(e);
312
294
  }
313
295
  function K(e) {
314
- if (e === void 0) {
315
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
316
- }
296
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
317
297
  return e;
318
298
  }
319
299
  function U() {
320
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
321
- if (Reflect.construct.sham) return false;
322
- if (typeof Proxy === "function") return true;
323
300
  try {
324
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
325
- return true;
326
- } catch (e) {
327
- return false;
328
- }
301
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
302
+ } catch (e) {}
303
+ return (U = function t() {
304
+ return !!e;
305
+ })();
329
306
  }
330
307
  function H(e) {
331
- H = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
332
- return t.__proto__ || Object.getPrototypeOf(t);
333
- };
334
- return H(e);
308
+ return H = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
309
+ return e.__proto__ || Object.getPrototypeOf(e);
310
+ }, H(e);
335
311
  }
336
312
  function X(e, t, r) {
337
- if (t in e) {
338
- Object.defineProperty(e, t, {
339
- value: r,
340
- enumerable: true,
341
- configurable: true,
342
- writable: true
343
- });
344
- } else {
345
- e[t] = r;
313
+ return (t = G(t)) in e ? Object.defineProperty(e, t, {
314
+ value: r,
315
+ enumerable: !0,
316
+ configurable: !0,
317
+ writable: !0
318
+ }) : e[t] = r, e;
319
+ }
320
+ function G(e) {
321
+ var t = J(e, "string");
322
+ return "symbol" == N(t) ? t : t + "";
323
+ }
324
+ function J(e, t) {
325
+ if ("object" != N(e) || !e) return e;
326
+ var r = e[Symbol.toPrimitive];
327
+ if (void 0 !== r) {
328
+ var n = r.call(e, t || "default");
329
+ if ("object" != N(n)) return n;
330
+ throw new TypeError("@@toPrimitive must return a primitive value.");
346
331
  }
347
- return e;
332
+ return ("string" === t ? String : Number)(e);
348
333
  }
349
- var G = {
334
+ /** @public */ var Q = {
350
335
  defaultValue: a().number,
351
336
  describedBy: a().string,
352
337
  disabled: a().bool,
@@ -369,7 +354,7 @@
369
354
  splunkTheme: a().object,
370
355
  value: a().number
371
356
  };
372
- var J = {
357
+ var Y = {
373
358
  disabled: false,
374
359
  error: false,
375
360
  inline: false,
@@ -378,13 +363,13 @@
378
363
  step: 1,
379
364
  stepMarks: "focus"
380
365
  };
381
- var Q = function(e) {
382
- L(r, e);
366
+ var Z = function(e) {
367
+ R(r, e);
383
368
  var t = W(r);
384
369
  // @docs-props-type SliderPropsBase
385
370
  function r(e) {
386
371
  var n;
387
- R(this, r);
372
+ F(this, r);
388
373
  n = t.call(this, e);
389
374
  X(K(n), "controlledExternally", void 0);
390
375
  X(K(n), "sliderThumb", null);
@@ -429,7 +414,7 @@
429
414
  }));
430
415
  X(K(n), "getValueOffset", (function(e, t) {
431
416
  var r = n.props, i = r.min, a = r.step;
432
- var o = new (s())(e).minus(i).modulo(a).toNumber();
417
+ var o = new (l())(e).minus(i).modulo(a).toNumber();
433
418
  if (o > 0) {
434
419
  return t === "forward" ? a - o : o;
435
420
  }
@@ -517,7 +502,7 @@
517
502
  if (e > a - (a - i) % r / 2) {
518
503
  return a;
519
504
  }
520
- return new (s())(e).minus(i).div(r).todp(0).mul(r).add(i).toNumber();
505
+ return new (l())(e).minus(i).div(r).todp(0).mul(r).add(i).toNumber();
521
506
  }));
522
507
  X(K(n), "valueToPosition", (function(e) {
523
508
  if (e === undefined) {
@@ -539,7 +524,7 @@
539
524
  if (e.min >= e.max && process.env.NODE_ENV !== "production") {}
540
525
  return n;
541
526
  }
542
- I(r, [ {
527
+ L(r, [ {
543
528
  key: "componentDidUpdate",
544
529
  value: function e(t) {
545
530
  if (false) {}
@@ -557,8 +542,8 @@
557
542
  var i = this.getValue();
558
543
  var a = this.props.name;
559
544
  if (i !== n) {
560
- var o, s;
561
- (o = (s = this.props).onChange) === null || o === void 0 ? void 0 : o.call(s, t, {
545
+ var o, l;
546
+ (o = (l = this.props).onChange) === null || o === void 0 ? void 0 : o.call(l, t, {
562
547
  value: n,
563
548
  name: a
564
549
  });
@@ -569,7 +554,9 @@
569
554
  }
570
555
  }
571
556
  }
572
- }, {
557
+ // If the current value is in between a step, i.e. defaultValue is not at a
558
+ // step mark, this function handles navigating to the next correct step
559
+ }, {
573
560
  key: "focus",
574
561
  /**
575
562
  * Places focus on the slider.
@@ -593,10 +580,10 @@
593
580
  if (o === null) {
594
581
  return undefined;
595
582
  }
596
- var s = Math.round((r - n) / i);
597
- var l = o.getBoundingClientRect();
598
- var u = B(a);
599
- return l.width / s > u / 2 ? this.stepWidthInPercentage() : undefined;
583
+ var l = Math.round((r - n) / i);
584
+ var s = o.getBoundingClientRect();
585
+ var u = M(a);
586
+ return s.width / l > u / 2 ? this.stepWidthInPercentage() : undefined;
600
587
  }
601
588
  }, {
602
589
  key: "isControlled",
@@ -607,48 +594,48 @@
607
594
  key: "render",
608
595
  value: function e() {
609
596
  var t = this;
610
- var i = this.props, a = i.describedBy, o = i.disabled, s = i.displayValue, l = i.elementRef, u = i.error, c = i.inline, d = i.labelledBy, v = i.max, h = i.maxLabel, m = i.min, y = i.minLabel, k = i.required, x = i.stepMarks;
611
- var w = this.state, S = w.isFocused, C = w.selected, T = w.sliderBar;
612
- var M = this.getValue();
613
- var B = this.valueToPosition(M);
614
- var j = x === "focus" && S || x === "always";
615
- var $ = j && T ? this.stepMarksWidth() : undefined;
616
- var R = f()(this.props, p()(r.propTypes));
597
+ var i = this.props, a = i.describedBy, o = i.disabled, l = i.displayValue, s = i.elementRef, u = i.error, c = i.inline, d = i.labelledBy, v = i.max, h = i.maxLabel, b = i.min, y = i.minLabel, k = i.required, w = i.stepMarks;
598
+ var x = this.state, S = x.isFocused, T = x.selected, C = x.sliderBar;
599
+ var V = this.getValue();
600
+ var M = this.valueToPosition(V);
601
+ var j = w === "focus" && S || w === "always";
602
+ var N = j && C ? this.stepMarksWidth() : undefined;
603
+ var F = f()(this.props, p()(r.propTypes));
617
604
  /* eslint-disable jsx-a11y/no-static-element-interactions */
618
- return n().createElement(V, N({
605
+ return n().createElement(O, $({
619
606
  "data-test": "slider",
620
- "data-test-value": M,
621
- elementRef: l,
607
+ "data-test-value": V,
608
+ elementRef: s,
622
609
  flex: true,
623
610
  inline: c
624
- }, R), C && n().createElement(n().Fragment, null, n().createElement(b(), {
611
+ }, F), T && n().createElement(n().Fragment, null, n().createElement(m(), {
625
612
  target: window,
626
613
  eventType: "mouseup",
627
614
  listener: this.handleMouseUp
628
- }), n().createElement(b(), {
615
+ }), n().createElement(m(), {
629
616
  target: window,
630
617
  eventType: "mousemove",
631
618
  listener: this.handleMouseMove
632
- })), y !== null && n().createElement(D, {
619
+ })), y !== null && n().createElement(q, {
633
620
  "data-test": "min-label",
634
621
  $disabled: o
635
- }, y || m), n().createElement(E, {
622
+ }, y || b), n().createElement(E, {
636
623
  onClick: o ? undefined : this.handleClick
637
- }, n().createElement(O, {
624
+ }, n().createElement(B, {
638
625
  "aria-required": k,
639
626
  "data-test": "bar",
640
627
  $disabled: o,
641
628
  ref: this.handleMount,
642
629
  $error: u,
643
- $position: B,
644
- $stepMarksWidth: $
630
+ $position: M,
631
+ $stepMarksWidth: N
645
632
  }), n().createElement(_, {
646
633
  "aria-describedby": a,
647
634
  "aria-labelledby": d,
648
635
  "aria-invalid": u,
649
636
  "aria-valuemax": v,
650
- "aria-valuemin": m,
651
- "aria-valuenow": M,
637
+ "aria-valuemin": b,
638
+ "aria-valuenow": V,
652
639
  "data-test": "handle",
653
640
  onBlur: this.handleBlur,
654
641
  onMouseEnter: this.handleMouseEnter,
@@ -662,13 +649,13 @@
662
649
  role: "slider",
663
650
  disabled: o,
664
651
  $error: u,
665
- $position: B
652
+ $position: M
666
653
  }), n().createElement(g(), {
667
654
  open: this.state.showTooltip,
668
655
  anchor: this.sliderThumb,
669
656
  appearance: "inverted",
670
657
  align: "center"
671
- }, n().createElement(P, null, s || M))), h !== null && n().createElement(q, {
658
+ }, n().createElement(P, null, l || V))), h !== null && n().createElement(D, {
672
659
  "data-test": "max-label",
673
660
  $disabled: o
674
661
  }, h || v));
@@ -676,11 +663,11 @@
676
663
  } ]);
677
664
  return r;
678
665
  }(r.Component);
679
- X(Q, "propTypes", G);
680
- X(Q, "defaultProps", J);
681
- var Y = (0, h.withSplunkTheme)(Q);
682
- Y.propTypes = Q.propTypes;
683
- /* harmony default export */ const Z = Y;
666
+ X(Z, "propTypes", Q);
667
+ X(Z, "defaultProps", Y);
668
+ var ee = (0, h.withSplunkTheme)(Z);
669
+ ee.propTypes = Z.propTypes;
670
+ /* harmony default export */ const te = ee;
684
671
  // CONCATENATED MODULE: ./src/Slider/index.ts
685
672
  module.exports = t;
686
673
  /******/})();