@splunk/react-ui 4.36.0 → 4.37.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/CHANGELOG.md CHANGED
@@ -1,6 +1,17 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 4.37. 0 - September 9, 2024
5
+ ----------
6
+ New Features:
7
+ * `Progress` supports `success` and `error` values for the `type` prop in Enterprise themes (SUI-6492).
8
+
9
+ Bug Fixes:
10
+ * Updated `Progress` animation and style to improve contrast in Enterprise themes (SUI-6492).
11
+ * `RadioBar`'s active item now has appropriate contrast in the Prisma light theme (SUI-6609).
12
+ * `Switch` now shows the correct cursor type when `appearance="toggle"` is `disabled` (SUI-6612).
13
+ * `TextArea` with `startAdornment` or `endAdornment` will no longer prematurely wrap text (SUI-6613).
14
+
4
15
  4.36.0 - September 3, 2024
5
16
  ----------
6
17
  New Features:
package/Date.js CHANGED
@@ -250,16 +250,16 @@
250
250
  } else {
251
251
  o = a.apply(this, arguments);
252
252
  }
253
- return E(this, o);
253
+ return R(this, o);
254
254
  };
255
255
  }
256
- function E(e, t) {
256
+ function R(e, t) {
257
257
  if (t && (w(t) === "object" || typeof t === "function")) {
258
258
  return t;
259
259
  }
260
- return R(e);
260
+ return E(e);
261
261
  }
262
- function R(e) {
262
+ function E(e) {
263
263
  if (e === void 0) {
264
264
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
265
265
  }
@@ -343,12 +343,12 @@
343
343
  var a;
344
344
  j(this, n);
345
345
  a = t.call(this, e);
346
- W(R(a), "controlledExternally", void 0);
347
- W(R(a), "focusCalledInternally", false);
348
- W(R(a), "popoverId", void 0);
349
- W(R(a), "calendar", null);
350
- W(R(a), "openWithFocus", false);
351
- W(R(a), "applyTextChange", (function(e) {
346
+ W(E(a), "controlledExternally", void 0);
347
+ W(E(a), "focusCalledInternally", false);
348
+ W(E(a), "popoverId", void 0);
349
+ W(E(a), "calendar", null);
350
+ W(E(a), "openWithFocus", false);
351
+ W(E(a), "applyTextChange", (function(e) {
352
352
  var t = p()(a.state.tempTextInputDate, "l", a.props.locale);
353
353
  if (t.isValid()) {
354
354
  a.handleDateChange(e, {
@@ -361,7 +361,7 @@
361
361
  });
362
362
  }
363
363
  }));
364
- W(R(a), "handleDateChange", (function(e, t, n) {
364
+ W(E(a), "handleDateChange", (function(e, t, n) {
365
365
  var o = t.value;
366
366
  if (n !== "textInput") {
367
367
  a.focusCalledInternally = true;
@@ -385,7 +385,7 @@
385
385
  });
386
386
  }
387
387
  }));
388
- W(R(a), "handleFocus", (function(e, t) {
388
+ W(E(a), "handleFocus", (function(e, t) {
389
389
  var n, o;
390
390
  if (a.focusCalledInternally) {
391
391
  a.focusCalledInternally = false;
@@ -396,26 +396,23 @@
396
396
  }
397
397
  (n = (o = a.props).onFocus) === null || n === void 0 ? void 0 : n.call(o, e, t);
398
398
  }));
399
- W(R(a), "handleClick", (function(e) {
400
- var t, n, o;
401
- if (document.activeElement !== a.state.input && ((t = a.state.anchor) === null || t === void 0 ? void 0 : t.contains(e.target))) {
402
- a.focus();
403
- }
399
+ W(E(a), "handleClick", (function(e) {
400
+ var t, n;
404
401
  if (!a.props.inputOnly && !a.state.calendarOpen) {
405
402
  a.setState({
406
403
  calendarOpen: true
407
404
  });
408
405
  }
409
- (n = (o = a.props).onClick) === null || n === void 0 ? void 0 : n.call(o, e);
406
+ (t = (n = a.props).onClick) === null || t === void 0 ? void 0 : t.call(n, e);
410
407
  }));
411
- W(R(a), "handleInputChange", (function(e, t) {
408
+ W(E(a), "handleInputChange", (function(e, t) {
412
409
  var n = t.value;
413
410
  a.setState({
414
411
  tempTextInputDate: n,
415
412
  calendarOpen: !a.props.inputOnly
416
413
  });
417
414
  }));
418
- W(R(a), "handleKeyDown", (function(e) {
415
+ W(E(a), "handleKeyDown", (function(e) {
419
416
  var t, n;
420
417
  var o = (0, d.keycode)(e.nativeEvent);
421
418
  if (o === "enter" || o === "tab") {
@@ -439,21 +436,21 @@
439
436
  }
440
437
  (t = (n = a.props).onKeyDown) === null || t === void 0 ? void 0 : t.call(n, e);
441
438
  }));
442
- W(R(a), "handleMount", (function(e) {
439
+ W(E(a), "handleMount", (function(e) {
443
440
  a.setState({
444
441
  anchor: e
445
442
  });
446
443
  S(a.props.elementRef, e);
447
444
  }));
448
- W(R(a), "handleInputMount", (function(e) {
445
+ W(E(a), "handleInputMount", (function(e) {
449
446
  a.setState({
450
447
  input: e
451
448
  });
452
449
  }));
453
- W(R(a), "handleCalendarMount", (function(e) {
450
+ W(E(a), "handleCalendarMount", (function(e) {
454
451
  a.calendar = e;
455
452
  }));
456
- W(R(a), "handleRequestClose", (function(e) {
453
+ W(E(a), "handleRequestClose", (function(e) {
457
454
  var t = e.event, n = e.reason;
458
455
  if ((n === "clickAway" || n === "escapeKey") && t !== undefined && t.target !== a.state.anchor) {
459
456
  a.applyTextChange(t);
package/Progress.js CHANGED
@@ -2,33 +2,33 @@
2
2
  // webpackBootstrap
3
3
  /******/ "use strict";
4
4
  /******/ // The require scope
5
- /******/ var e = {};
5
+ /******/ var r = {};
6
6
  /******/
7
7
  /************************************************************************/
8
8
  /******/ /* webpack/runtime/compat get default export */
9
9
  /******/ (() => {
10
10
  /******/ // getDefaultExport function for compatibility with non-harmony modules
11
- /******/ e.n = r => {
12
- /******/ var t = r && r.__esModule ?
13
- /******/ () => r["default"]
14
- /******/ : () => r
11
+ /******/ r.n = e => {
12
+ /******/ var a = e && e.__esModule ?
13
+ /******/ () => e["default"]
14
+ /******/ : () => e
15
15
  /******/;
16
- e.d(t, {
17
- a: t
16
+ r.d(a, {
17
+ a
18
18
  });
19
- /******/ return t;
19
+ /******/ return a;
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 = (r, t) => {
27
- /******/ for (var a in t) {
28
- /******/ if (e.o(t, a) && !e.o(r, a)) {
29
- /******/ Object.defineProperty(r, a, {
26
+ /******/ r.d = (e, a) => {
27
+ /******/ for (var t in a) {
28
+ /******/ if (r.o(a, t) && !r.o(e, t)) {
29
+ /******/ Object.defineProperty(e, t, {
30
30
  enumerable: true,
31
- get: t[a]
31
+ get: a[t]
32
32
  });
33
33
  /******/ }
34
34
  /******/ }
@@ -37,89 +37,119 @@
37
37
  /******/
38
38
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
39
  /******/ (() => {
40
- /******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
40
+ /******/ r.o = (r, e) => Object.prototype.hasOwnProperty.call(r, e)
41
41
  /******/;
42
42
  })();
43
43
  /******/
44
44
  /******/ /* webpack/runtime/make namespace object */
45
45
  /******/ (() => {
46
46
  /******/ // define __esModule on exports
47
- /******/ e.r = e => {
47
+ /******/ r.r = r => {
48
48
  /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
49
- /******/ Object.defineProperty(e, Symbol.toStringTag, {
49
+ /******/ Object.defineProperty(r, Symbol.toStringTag, {
50
50
  value: "Module"
51
51
  });
52
52
  /******/ }
53
- /******/ Object.defineProperty(e, "__esModule", {
53
+ /******/ Object.defineProperty(r, "__esModule", {
54
54
  value: true
55
55
  });
56
56
  /******/ };
57
57
  /******/ })();
58
58
  /******/
59
- /************************************************************************/ var r = {};
59
+ /************************************************************************/ var e = {};
60
60
  // ESM COMPAT FLAG
61
- e.r(r);
61
+ r.r(e);
62
62
  // EXPORTS
63
- e.d(r, {
64
- default: () => /* reexport */ M
63
+ r.d(e, {
64
+ default: () => /* reexport */ L
65
65
  });
66
66
  // CONCATENATED MODULE: external "react"
67
- const t = require("react");
68
- var a = e.n(t);
67
+ const a = require("react");
68
+ var t = r.n(a);
69
69
  // CONCATENATED MODULE: external "prop-types"
70
- const n = require("prop-types");
71
- var i = e.n(n);
70
+ const i = require("prop-types");
71
+ var n = r.n(i);
72
72
  // CONCATENATED MODULE: external "lodash/isNumber"
73
73
  const o = require("lodash/isNumber");
74
- var s = e.n(o);
74
+ var s = r.n(o);
75
75
  // CONCATENATED MODULE: external "@splunk/react-ui/AnimationToggle"
76
76
  const c = require("@splunk/react-ui/AnimationToggle");
77
77
  // CONCATENATED MODULE: external "styled-components"
78
78
  const l = require("styled-components");
79
- var u = e.n(l);
79
+ var u = r.n(l);
80
80
  // CONCATENATED MODULE: external "tinycolor2"
81
81
  const p = require("tinycolor2");
82
- var f = e.n(p);
82
+ var v = r.n(p);
83
83
  // CONCATENATED MODULE: external "@splunk/react-ui/Tooltip"
84
- const v = require("@splunk/react-ui/Tooltip");
85
- var b = e.n(v);
84
+ const b = require("@splunk/react-ui/Tooltip");
85
+ var f = r.n(b);
86
86
  // CONCATENATED MODULE: external "@splunk/react-ui/Box"
87
- const d = require("@splunk/react-ui/Box");
88
- var m = e.n(d);
87
+ const m = require("@splunk/react-ui/Box");
88
+ var d = r.n(m);
89
89
  // CONCATENATED MODULE: external "@splunk/themes"
90
90
  const g = require("@splunk/themes");
91
91
  // CONCATENATED MODULE: ./src/Progress/ProgressStyles.ts
92
- var y = u()(m()).withConfig({
92
+ var y = u()(d()).withConfig({
93
93
  displayName: "ProgressStyles__StyledBox",
94
94
  componentId: "csowex-0"
95
95
  })([ "background-color:", ";" ], (0, g.pick)({
96
96
  enterprise: g.variables.transparent,
97
97
  prisma: g.variables.neutral200
98
98
  }));
99
- var h = u()(b()).withConfig({
99
+ var C = u()(f()).withConfig({
100
100
  displayName: "ProgressStyles__StyledTooltip",
101
101
  componentId: "csowex-1"
102
- })([ "background-color:", ";height:", ";position:relative;overflow:hidden;padding-left:", ";", ";" ], (0,
103
- g.pick)({
104
- enterprise: g.variables.accentColorD10,
105
- prisma: (0, g.pickVariant)("$type", {
106
- info: g.variables.interactiveColorPrimary,
107
- success: g.variables.accentColorPositive,
108
- warning: g.variables.accentColorWarning,
109
- error: g.variables.accentColorNegative
110
- })
102
+ })([ "background-color:", ";height:", ";position:relative;overflow:hidden;padding-left:", ";", ";", "" ], (0,
103
+ g.pickVariant)("$type", {
104
+ info: {
105
+ enterprise: g.variables.accentColorD10,
106
+ prisma: g.variables.interactiveColorPrimary
107
+ },
108
+ success: {
109
+ enterprise: g.variables.successColorD10,
110
+ prisma: g.variables.accentColorPositive
111
+ },
112
+ warning: {
113
+ enterprise: g.variables.accentColorD10,
114
+ // warning not supported in enterprise, fallback to info
115
+ prisma: g.variables.accentColorWarning
116
+ },
117
+ error: {
118
+ enterprise: g.variables.errorColorD10,
119
+ prisma: g.variables.accentColorNegative
120
+ }
111
121
  }), (0, g.pick)({
112
122
  enterprise: "3px",
113
123
  prisma: "4px"
114
124
  }), (0, g.pick)({
115
125
  enterprise: g.variables.spacingSmall,
116
126
  prisma: "10px"
117
- }), (function(e) {
118
- var r = e.$animated;
119
- return r && (0, l.css)([ "transition:width 300ms;" ]);
127
+ }), (function(r) {
128
+ var e = r.$animated;
129
+ return e && (0, l.css)([ "transition:width 300ms;" ]);
130
+ }), (0, g.pick)({
131
+ enterprise: (0, l.css)([ "border-right:1px solid ", ";" ], (0, g.pickVariant)("$type", {
132
+ info: {
133
+ enterprise: g.variables.accentColorD10,
134
+ prisma: g.variables.interactiveColorPrimary
135
+ },
136
+ success: {
137
+ enterprise: g.variables.successColorD10,
138
+ prisma: g.variables.accentColorPositive
139
+ },
140
+ warning: {
141
+ enterprise: g.variables.accentColorD10,
142
+ // warning not supported in enterprise, fallback to info
143
+ prisma: g.variables.accentColorWarning
144
+ },
145
+ error: {
146
+ enterprise: g.variables.errorColorD10,
147
+ prisma: g.variables.accentColorNegative
148
+ }
149
+ }))
120
150
  }));
121
- var k = (0, l.keyframes)([ "from{opacity:0;}to{opacity:1;}" ]);
122
- var C = (0, l.keyframes)([ "from{background-position:130%;}to{background-position:-30%;}" ]);
151
+ var h = (0, l.keyframes)([ "from{opacity:0;}to{opacity:1;}" ]);
152
+ var k = (0, l.keyframes)([ "from{background-position:130%;}to{background-position:-30%;}" ]);
123
153
  var w = u().div.withConfig({
124
154
  displayName: "ProgressStyles__StyledPuck",
125
155
  componentId: "csowex-2"
@@ -130,174 +160,197 @@
130
160
  enterprise: "300px",
131
161
  prisma: "100%"
132
162
  }), (0, g.pick)({
133
- enterprise: (0, l.css)([ "background:linear-gradient( 90deg,", ",", ",40%,", ",80%,", " );" ], g.variables.accentColorD10, g.variables.accentColorL10, g.variables.accentColorL40, g.variables.accentColorL40),
134
- prisma: function e(r) {
135
- var t = r.$animated;
163
+ enterprise: function r() {
164
+ var e = (0, g.pickVariant)("$type", {
165
+ info: g.variables.accentColorD10,
166
+ success: g.variables.successColorD10,
167
+ warning: g.variables.accentColorD10,
168
+ // warning not supported in enterprise, fallback to info
169
+ error: g.variables.errorColorD10
170
+ });
136
171
  var a = (0, g.pickVariant)("$type", {
172
+ info: g.variables.accentColorL10,
173
+ success: g.variables.successColorL10,
174
+ warning: g.variables.accentColorL10,
175
+ // warning not supported in enterprise, fallback to info
176
+ error: g.variables.errorColorL10
177
+ });
178
+ var t = (0, g.pickVariant)("$type", {
179
+ info: g.variables.accentColorL30,
180
+ success: g.variables.successColorL30,
181
+ warning: g.variables.accentColorL30,
182
+ // warning not supported in enterprise, fallback to info
183
+ error: g.variables.errorColorL30
184
+ });
185
+ return (0, l.css)([ "background:linear-gradient( 90deg,", ",", ",30%,", ",60%,", ",95%,", ",98%,", " );" ], e, a, t, t, a, e);
186
+ },
187
+ prisma: function r(e) {
188
+ var a = e.$animated;
189
+ var t = (0, g.pickVariant)("$type", {
137
190
  info: g.variables.interactiveColorPrimary,
138
191
  success: g.variables.accentColorPositive,
139
192
  warning: g.variables.accentColorWarning,
140
193
  error: g.variables.accentColorNegative
141
194
  });
142
- if (t) {
143
- var n = (0, g.pickVariant)("$type", {
195
+ if (a) {
196
+ var i = (0, g.pickVariant)("$type", {
144
197
  info: g.variables.statusColorInfo,
145
198
  success: g.variables.statusColorNormal,
146
199
  warning: g.variables.statusColorMedium,
147
200
  error: g.variables.statusColorHigh
148
201
  });
149
- return (0, l.css)([ "background:radial-gradient( circle at center,", ",", " 30% );" ], n, a);
202
+ return (0, l.css)([ "background:radial-gradient( circle at center,", ",", " 30% );" ], i, t);
150
203
  }
151
- return (0, l.css)([ "background:", ";" ], a);
204
+ return (0, l.css)([ "background:", ";" ], t);
152
205
  }
153
- }), (function(e) {
154
- return e.$animated && (0, g.pick)({
155
- enterprise: (0, l.css)([ "animation-duration:1500ms;animation-name:", ";animation-iteration-count:infinite;animation-direction:alternate;" ], k),
156
- prisma: function r() {
157
- var t = (0, g.pickVariant)("$type", {
206
+ }), (function(r) {
207
+ return r.$animated && (0, g.pick)({
208
+ enterprise: (0, l.css)([ "animation-duration:1500ms;animation-name:", ";animation-iteration-count:infinite;animation-direction:alternate;" ], h),
209
+ prisma: function e() {
210
+ var a = (0, g.pickVariant)("$type", {
158
211
  info: g.variables.statusColorInfo,
159
212
  success: g.variables.statusColorNormal,
160
213
  warning: g.variables.statusColorMedium,
161
214
  error: g.variables.statusColorHigh
162
- })(e);
163
- return (0, l.css)([ "background-size:200% 100%;animation:", " 1500ms infinite cubic-bezier(0.33,0,0.67,1);&::after{content:'';display:block;width:60px;background:linear-gradient( to right,rgba(255,255,255,0),", " 70%,rgba(255,255,255,0.75) );height:100%;position:absolute;right:0;}" ], C, f()(t(e)).setAlpha(.75).toRgbString());
215
+ })(r);
216
+ return (0, l.css)([ "background-size:200% 100%;animation:", " 1500ms infinite cubic-bezier(0.33,0,0.67,1);&::after{content:'';display:block;width:60px;background:linear-gradient( to right,rgba(255,255,255,0),", " 70%,rgba(255,255,255,0.75) );height:100%;position:absolute;right:0;}" ], k, v()(a(r)).setAlpha(.75).toRgbString());
164
217
  }
165
218
  });
166
219
  }));
167
220
  // CONCATENATED MODULE: ./src/Progress/Progress.tsx
168
221
  function S() {
169
- S = Object.assign || function(e) {
170
- for (var r = 1; r < arguments.length; r++) {
171
- var t = arguments[r];
172
- for (var a in t) {
173
- if (Object.prototype.hasOwnProperty.call(t, a)) {
174
- e[a] = t[a];
222
+ S = Object.assign || function(r) {
223
+ for (var e = 1; e < arguments.length; e++) {
224
+ var a = arguments[e];
225
+ for (var t in a) {
226
+ if (Object.prototype.hasOwnProperty.call(a, t)) {
227
+ r[t] = a[t];
175
228
  }
176
229
  }
177
230
  }
178
- return e;
231
+ return r;
179
232
  };
180
233
  return S.apply(this, arguments);
181
234
  }
182
- function O(e, r) {
183
- return _(e) || $(e, r) || j(e, r) || x();
235
+ function O(r, e) {
236
+ return D(r) || j(r, e) || P(r, e) || x();
184
237
  }
185
238
  function x() {
186
239
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
187
240
  }
188
- function j(e, r) {
189
- if (!e) return;
190
- if (typeof e === "string") return P(e, r);
191
- var t = Object.prototype.toString.call(e).slice(8, -1);
192
- if (t === "Object" && e.constructor) t = e.constructor.name;
193
- if (t === "Map" || t === "Set") return Array.from(e);
194
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return P(e, r);
241
+ function P(r, e) {
242
+ if (!r) return;
243
+ if (typeof r === "string") return $(r, e);
244
+ var a = Object.prototype.toString.call(r).slice(8, -1);
245
+ if (a === "Object" && r.constructor) a = r.constructor.name;
246
+ if (a === "Map" || a === "Set") return Array.from(r);
247
+ if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return $(r, e);
195
248
  }
196
- function P(e, r) {
197
- if (r == null || r > e.length) r = e.length;
198
- for (var t = 0, a = new Array(r); t < r; t++) {
199
- a[t] = e[t];
249
+ function $(r, e) {
250
+ if (e == null || e > r.length) e = r.length;
251
+ for (var a = 0, t = new Array(e); a < e; a++) {
252
+ t[a] = r[a];
200
253
  }
201
- return a;
254
+ return t;
202
255
  }
203
- function $(e, r) {
204
- if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
205
- var t = [];
206
- var a = true;
207
- var n = false;
208
- var i = undefined;
256
+ function j(r, e) {
257
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(r))) return;
258
+ var a = [];
259
+ var t = true;
260
+ var i = false;
261
+ var n = undefined;
209
262
  try {
210
- for (var o = e[Symbol.iterator](), s; !(a = (s = o.next()).done); a = true) {
211
- t.push(s.value);
212
- if (r && t.length === r) break;
263
+ for (var o = r[Symbol.iterator](), s; !(t = (s = o.next()).done); t = true) {
264
+ a.push(s.value);
265
+ if (e && a.length === e) break;
213
266
  }
214
- } catch (e) {
215
- n = true;
216
- i = e;
267
+ } catch (r) {
268
+ i = true;
269
+ n = r;
217
270
  } finally {
218
271
  try {
219
- if (!a && o["return"] != null) o["return"]();
272
+ if (!t && o["return"] != null) o["return"]();
220
273
  } finally {
221
- if (n) throw i;
274
+ if (i) throw n;
222
275
  }
223
276
  }
224
- return t;
277
+ return a;
225
278
  }
226
- function _(e) {
227
- if (Array.isArray(e)) return e;
279
+ function D(r) {
280
+ if (Array.isArray(r)) return r;
228
281
  }
229
- function q(e, r) {
230
- if (e == null) return {};
231
- var t = A(e, r);
232
- var a, n;
282
+ function _(r, e) {
283
+ if (r == null) return {};
284
+ var a = q(r, e);
285
+ var t, i;
233
286
  if (Object.getOwnPropertySymbols) {
234
- var i = Object.getOwnPropertySymbols(e);
235
- for (n = 0; n < i.length; n++) {
236
- a = i[n];
237
- if (r.indexOf(a) >= 0) continue;
238
- if (!Object.prototype.propertyIsEnumerable.call(e, a)) continue;
239
- t[a] = e[a];
287
+ var n = Object.getOwnPropertySymbols(r);
288
+ for (i = 0; i < n.length; i++) {
289
+ t = n[i];
290
+ if (e.indexOf(t) >= 0) continue;
291
+ if (!Object.prototype.propertyIsEnumerable.call(r, t)) continue;
292
+ a[t] = r[t];
240
293
  }
241
294
  }
242
- return t;
295
+ return a;
243
296
  }
244
- function A(e, r) {
245
- if (e == null) return {};
246
- var t = {};
247
- var a = Object.keys(e);
248
- var n, i;
249
- for (i = 0; i < a.length; i++) {
250
- n = a[i];
251
- if (r.indexOf(n) >= 0) continue;
252
- t[n] = e[n];
297
+ function q(r, e) {
298
+ if (r == null) return {};
299
+ var a = {};
300
+ var t = Object.keys(r);
301
+ var i, n;
302
+ for (n = 0; n < t.length; n++) {
303
+ i = t[n];
304
+ if (e.indexOf(i) >= 0) continue;
305
+ a[i] = r[i];
253
306
  }
254
- return t;
307
+ return a;
255
308
  }
256
- var I = {
257
- elementRef: i().oneOfType([ i().func, i().object ]),
258
- percentage: i().number,
259
- tooltip: i().node,
260
- type: i().oneOf([ "info", "success", "warning", "error" ])
309
+ var A = {
310
+ elementRef: n().oneOfType([ n().func, n().object ]),
311
+ percentage: n().number,
312
+ tooltip: n().node,
313
+ type: n().oneOf([ "info", "success", "warning", "error" ])
261
314
  };
262
- function T(e) {
263
- var r = e.percentage, n = e.tooltip, i = e.type, o = i === void 0 ? "info" : i, l = q(e, [ "percentage", "tooltip", "type" ]);
315
+ function I(r) {
316
+ var e = r.percentage, i = r.tooltip, n = r.type, o = n === void 0 ? "info" : n, l = _(r, [ "percentage", "tooltip", "type" ]);
264
317
  // @docs-props-type ProgressPropsBase
265
318
  if (false) {}
266
- var u = (0, t.useState)(false), p = O(u, 2), f = p[0], v = p[1];
267
- var b = (0, c.useAnimationToggle)() === "on";
268
- var d = (0, t.useCallback)((function() {
269
- v(true);
319
+ var u = (0, a.useState)(false), p = O(u, 2), v = p[0], b = p[1];
320
+ var f = (0, c.useAnimationToggle)() === "on";
321
+ var m = (0, a.useCallback)((function() {
322
+ b(true);
270
323
  }), []);
271
- var m = (0, t.useCallback)((function() {
272
- v(false);
324
+ var d = (0, a.useCallback)((function() {
325
+ b(false);
273
326
  }), []);
274
- var g = n || "".concat(r, "%");
327
+ var g = i || "".concat(e, "%");
275
328
 
276
- return a().createElement(y, S({
277
- $animated: b,
329
+ return t().createElement(y, S({
330
+ $animated: f,
278
331
  "data-test": "progress",
279
- onMouseEnter: d,
280
- onMouseLeave: m
281
- }, l), s()(r) && a().createElement(h, {
332
+ onMouseEnter: m,
333
+ onMouseLeave: d
334
+ }, l), s()(e) && t().createElement(C, {
282
335
  inline: false,
283
- open: f,
336
+ open: v,
284
337
  content: g,
285
338
  style: {
286
- width: "".concat(r, "%")
339
+ width: "".concat(e, "%")
287
340
  },
288
341
  role: "progressbar",
289
- "aria-valuenow": r,
342
+ "aria-valuenow": e,
290
343
  "aria-valuemin": 0,
291
344
  "aria-valuemax": 100,
292
- $animated: b,
345
+ $animated: f,
293
346
  $type: o
294
- }, a().createElement(w, {
295
- $animated: b,
347
+ }, t().createElement(w, {
348
+ $animated: f,
296
349
  $type: o
297
350
  })));
298
351
  }
299
- T.propTypes = I;
300
- /* harmony default export */ const M = T;
352
+ I.propTypes = A;
353
+ /* harmony default export */ const L = I;
301
354
  // CONCATENATED MODULE: ./src/Progress/index.ts
302
- module.exports = r;
355
+ module.exports = e;
303
356
  /******/})();
package/RadioBar.js CHANGED
@@ -93,7 +93,11 @@
93
93
  })([ "", "" ], (0, f.pick)({
94
94
  prisma: (0, d.css)([ "border-radius:3px;font-weight:initial;height:calc(", " - 6px);min-height:calc(", " - 6px);padding:2px 12px;> span{gap:", ";}& + &{margin-left:2px;}", " &:not([disabled],[aria-disabled='true']){", "}" ], f.variables.inputHeight, f.variables.inputHeight, f.variables.spacingXSmall, (function(e) {
95
95
  var r = e.selected;
96
- return r && (0, d.css)([ "box-shadow:", ";&[disabled],&[aria-disabled='true']{background-color:", ";}" ], f.variables.embossShadow, f.variables.backgroundColorPage);
96
+ return r && (0, d.css)([ "box-shadow:", ";&:not([disabled],[aria-disabled='true']){background-color:", ";}&[disabled],&[aria-disabled='true']{background-color:", ";}" ], f.variables.embossShadow, (0,
97
+ f.pick)({
98
+ dark: f.variables.interactiveColorOverlaySelected,
99
+ light: f.variables.white
100
+ }), f.variables.backgroundColorPage);
97
101
  }), (function(e) {
98
102
  var r = e.selected;
99
103
  return !r && (0, d.css)([ "color:", ";" ], f.variables.contentColorDefault);
@@ -134,9 +138,9 @@
134
138
  };
135
139
  return x.apply(this, arguments);
136
140
  }
137
- function S(e, r) {
141
+ function k(e, r) {
138
142
  if (e == null) return {};
139
- var t = j(e, r);
143
+ var t = S(e, r);
140
144
  var n, a;
141
145
  if (Object.getOwnPropertySymbols) {
142
146
  var o = Object.getOwnPropertySymbols(e);
@@ -149,7 +153,7 @@
149
153
  }
150
154
  return t;
151
155
  }
152
- function j(e, r) {
156
+ function S(e, r) {
153
157
  if (e == null) return {};
154
158
  var t = {};
155
159
  var n = Object.keys(e);
@@ -161,7 +165,7 @@
161
165
  }
162
166
  return t;
163
167
  }
164
- var k = {
168
+ var j = {
165
169
  /** @private Set by `RadioBar`. */
166
170
  append: o().bool,
167
171
  disabled: o().bool,
@@ -179,9 +183,9 @@
179
183
  value: o().any.isRequired
180
184
  };
181
185
  function C(e) {
182
- var r = e.disabled, a = e.icon, o = e.label, l = e.selected, i = e.startAdornment, u = e.endAdornment, s = e.value, c = e.role, d = c === void 0 ? "radio" : c, p = S(e, [ "disabled", "icon", "label", "selected", "startAdornment", "endAdornment", "value", "role" ]);
186
+ var r = e.disabled, a = e.icon, o = e.label, l = e.selected, i = e.startAdornment, u = e.endAdornment, s = e.value, c = e.role, d = c === void 0 ? "radio" : c, p = k(e, [ "disabled", "icon", "label", "selected", "startAdornment", "endAdornment", "value", "role" ]);
183
187
  // @docs-props-type OptionPropsBase
184
- var v = (0, t.useContext)(w), b = v.onClick, O = v.appearance, j = v.error, k = v.onKeyDown, C = v.firstValue, P = v.selectedValue;
188
+ var v = (0, t.useContext)(w), b = v.onClick, O = v.appearance, S = v.error, j = v.onKeyDown, C = v.firstValue, P = v.selectedValue;
185
189
  var E = (0, f.useSplunkTheme)(), _ = E.isPrisma;
186
190
  if (false) {}
187
191
  var T = -1;
@@ -202,7 +206,7 @@
202
206
  icon: !_ ? a : null,
203
207
  selected: l || false,
204
208
  value: s,
205
- error: j
209
+ error: S
206
210
  }, p, {
207
211
  onClick: l ? undefined : function(e) {
208
212
  return b === null || b === void 0 ? void 0 : b(e, {
@@ -214,14 +218,14 @@
214
218
  "aria-checked": l,
215
219
  tabIndex: q,
216
220
  onKeyDown: function e(r) {
217
- return k === null || k === void 0 ? void 0 : k(r, {
221
+ return j === null || j === void 0 ? void 0 : j(r, {
218
222
  value: s,
219
223
  label: o
220
224
  });
221
225
  }
222
226
  }), _ && a && n().createElement(h, null, a), i && n().createElement(m, null, i), o && n().createElement(g, null, o), u && n().createElement(m, null, u));
223
227
  }
224
- C.propTypes = k;
228
+ C.propTypes = j;
225
229
  /* harmony default export */ const P = C;
226
230
  // CONCATENATED MODULE: external "@splunk/react-ui/Box"
227
231
  const E = require("@splunk/react-ui/Box");
@@ -576,9 +580,9 @@
576
580
  var O = this.filteredValues[0];
577
581
  var x = d == null || this.filteredValues.includes(y);
578
582
  if (false) {}
579
- var S = h && o === "default" ? "default" : "subtle";
580
- var j = {
581
- appearance: S,
583
+ var k = h && o === "default" ? "default" : "subtle";
584
+ var S = {
585
+ appearance: k,
582
586
  onClick: this.handleClick,
583
587
  error: h ? u : false,
584
588
  onKeyDown: this.handleOnKeyDown,
@@ -597,7 +601,7 @@
597
601
  "aria-describedby": i,
598
602
  "aria-required": p
599
603
  }, s()(b, "onChange")), n().createElement(w.Provider, {
600
- value: j
604
+ value: S
601
605
  }, m));
602
606
  }
603
607
  } ]);
package/Switch.js CHANGED
@@ -288,7 +288,7 @@
288
288
  prisma: b.variables.transparent
289
289
  }));
290
290
  }));
291
- var L = (0, f.css)([ "position:relative;", " border-radius:", ";transition:background-color ", ";flex:0 0 auto;border:1px solid ", ";", " &:not([disabled]){&:focus{outline:0;", ";", "}&:hover ", "{background-color:", ";}&:hover ", "{background-color:", ";}}&[disabled]{border:1px solid ", ";background-color:", ";", " ", "}", ";", "" ], (0,
291
+ var L = (0, f.css)([ "position:relative;", " border-radius:", ";transition:background-color ", ";flex:0 0 auto;border:1px solid ", ";", " &:not([disabled]){&:focus{outline:0;", ";", "}&:hover ", "{background-color:", ";}&:hover ", "{background-color:", ";}}&[disabled]{cursor:not-allowed;border:1px solid ", ";background-color:", ";", " ", "}", ";", "" ], (0,
292
292
  b.pick)({
293
293
  enterprise: (0, b.pick)({
294
294
  light: (0, f.css)([ "width:calc(", " * 2);background-color:", ";height:", ";" ], x, b.variables.gray98, x),
package/TextArea.js CHANGED
@@ -76,8 +76,8 @@
76
76
  const s = require("lodash/has");
77
77
  var c = e.n(s);
78
78
  // CONCATENATED MODULE: external "lodash/keys"
79
- const d = require("lodash/keys");
80
- var p = e.n(d);
79
+ const p = require("lodash/keys");
80
+ var d = e.n(p);
81
81
  // CONCATENATED MODULE: external "lodash/noop"
82
82
  const u = require("lodash/noop");
83
83
  var f = e.n(u);
@@ -269,9 +269,11 @@
269
269
  var V = M()(H).withConfig({
270
270
  displayName: "TextAreaStyles__StyledTextAreaShadow",
271
271
  componentId: "gfy8yp-5"
272
- })([ "position:absolute;overflow:hidden;left:-10000px;top:-10000px;visibility:hidden;pointer-events:none;", ";" ], (function(e) {
272
+ })([ "position:absolute;overflow:hidden;left:-10000px;top:-10000px;visibility:hidden;pointer-events:none;", "" ], (function(e) {
273
273
  var t = e.$startAdornmentWidth, r = e.$endAdornmentWidth;
274
- return (0, T.css)([ "width:calc( 100% - ", " - ", " );" ], t || B, r || z);
274
+ var n = t ? "".concat(t, "px") : B;
275
+ var a = r ? "".concat(r, "px") : z;
276
+ return (0, T.css)([ "width:calc(100% - ", " - ", ");" ], n, a);
275
277
  }));
276
278
  var K = (0, k.pick)({
277
279
  enterprise: {
@@ -423,9 +425,9 @@
423
425
  var l = parseInt(o, 10);
424
426
  var s = parseInt(i.getPropertyValue("padding-top"), 10);
425
427
  var c = parseInt(i.getPropertyValue("padding-bottom"), 10);
426
- var d = parseInt(i.getPropertyValue("border-top-width"), 10);
427
- var p = parseInt(i.getPropertyValue("border-bottom-width"), 10);
428
- var u = a.scrollHeight + d + p + 1;
428
+ var p = parseInt(i.getPropertyValue("border-top-width"), 10);
429
+ var d = parseInt(i.getPropertyValue("border-bottom-width"), 10);
430
+ var u = a.scrollHeight + p + d + 1;
429
431
  // need one extra.
430
432
  /* eslint-disable no-restricted-globals */
431
433
  // Leverage the global `isNaN` here for IE support, rather than Number.isNaN.
@@ -434,11 +436,11 @@
434
436
  return false;
435
437
  }
436
438
  /* eslint-enable no-restricted-globals */ if (r >= n) {
437
- var f = r * l + s + c + d + p + 1;
439
+ var f = r * l + s + c + p + d + 1;
438
440
  // need one extra.
439
441
  u = Math.min(f, u);
440
442
  }
441
- var h = n * l + s + c + d + p + 1;
443
+ var h = n * l + s + c + p + d + 1;
442
444
  // need one extra.
443
445
  u = Math.max(h, u);
444
446
  if (t !== u) {
@@ -495,7 +497,7 @@
495
497
  return oe.apply(this, arguments);
496
498
  }
497
499
  function le(e) {
498
- return pe(e) || de(e) || ce(e) || se();
500
+ return de(e) || pe(e) || ce(e) || se();
499
501
  }
500
502
  function se() {
501
503
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
@@ -508,10 +510,10 @@
508
510
  if (r === "Map" || r === "Set") return Array.from(e);
509
511
  if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return ue(e, t);
510
512
  }
511
- function de(e) {
513
+ function pe(e) {
512
514
  if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
513
515
  }
514
- function pe(e) {
516
+ function de(e) {
515
517
  if (Array.isArray(e)) return ue(e);
516
518
  }
517
519
  function ue(e, t) {
@@ -868,14 +870,14 @@
868
870
  Ie(Se(a), "renderEndAdornment", (function() {
869
871
  var e;
870
872
  var t = a.props, r = t.appearance, i = t.endAdornment, o = t.disabled, l = t.canClear, s = t.splunkTheme;
871
- var c = s.isPrisma, d = s.isEnterprise;
873
+ var c = s.isPrisma, p = s.isEnterprise;
872
874
  if (i) {
873
875
  return a.renderAdornment(i, "end");
874
876
  }
875
- var p = a.context;
876
- var u = (e = p.labelAttrs) === null || e === void 0 ? void 0 : e.text;
877
+ var d = a.context;
878
+ var u = (e = d.labelAttrs) === null || e === void 0 ? void 0 : e.text;
877
879
  var f = u ? (0, S._)("Clear ".concat(u, " text field")) : (0, S._)("Clear text field");
878
- if (d && r === "search") {
880
+ if (p && r === "search") {
879
881
  /* Both icons are rendered, and StyledBox toggles visibility based on :focus-within */
880
882
  return a.renderAdornment( n().createElement(n().Fragment, null, n().createElement(Q, {
881
883
  "aria-label": f,
@@ -965,7 +967,7 @@
965
967
  }, {
966
968
  key: "render",
967
969
  value: function e() {
968
- var t = this.props, r = t.append, a = t.autoCapitalize, i = t.autoComplete, o = t.autoCorrect, l = t.autoFocus, s = t.children, c = t.className, d = t.classNamePrivate, u = t.disabled, h = t.describedBy, m = t.elementRef, y = t.error, g = t.inline, x = t.inputClassName, w = t.inputId, k = t.labelledBy, S = t.maxLength, O = t.name, I = t.placeholder, j = t.prepend, E = t.required, T = t.rowsMin, M = t.spellCheck, P = t.tabIndex, $ = t.title, _ = ve(t, [ "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "maxLength", "name", "placeholder", "prepend", "required", "rowsMin", "spellCheck", "tabIndex", "title" ]);
970
+ var t = this.props, r = t.append, a = t.autoCapitalize, i = t.autoComplete, o = t.autoCorrect, l = t.autoFocus, s = t.children, c = t.className, p = t.classNamePrivate, u = t.disabled, h = t.describedBy, m = t.elementRef, y = t.error, g = t.inline, x = t.inputClassName, w = t.inputId, k = t.labelledBy, S = t.maxLength, O = t.name, I = t.placeholder, j = t.prepend, E = t.required, T = t.rowsMin, M = t.spellCheck, P = t.tabIndex, $ = t.title, _ = ve(t, [ "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "maxLength", "name", "placeholder", "prepend", "required", "rowsMin", "spellCheck", "tabIndex", "title" ]);
969
971
  var D = he(he({}, b()(_, (function(e, t) {
970
972
  return t === "role" || t.indexOf("aria-") === 0;
971
973
  }))), {}, {
@@ -973,7 +975,7 @@
973
975
  "aria-labelledby": k,
974
976
  "aria-invalid": y || undefined
975
977
  });
976
- var q = v()(_, [ "inputRef", "onBlur", "onChange", "onFocus", "onKeyDown", "onSelect", "onInputClick" ].concat(le(p()(D))));
978
+ var q = v()(_, [ "inputRef", "onBlur", "onChange", "onFocus", "onKeyDown", "onSelect", "onInputClick" ].concat(le(d()(D))));
977
979
  var W = this.getDisplayValue();
978
980
  var N = {
979
981
  className: (0, A.toClassName)(c, x),
@@ -1016,7 +1018,7 @@
1016
1018
 
1017
1019
  return n().createElement(R, oe({
1018
1020
  tabIndex: -1,
1019
- className: (0, A.toClassName)(c, d),
1021
+ className: (0, A.toClassName)(c, p),
1020
1022
  "data-test": "text-area",
1021
1023
  "data-test-value": W,
1022
1024
  elementRef: m,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splunk/react-ui",
3
- "version": "4.36.0",
3
+ "version": "4.37.0",
4
4
  "description": "Library of React components that implement the Splunk design language",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Splunk Inc.",
@@ -64,7 +64,7 @@
64
64
  "@splunk/babel-preset": "^4.0.0",
65
65
  "@splunk/docs-gen": "1.0.0-beta.13",
66
66
  "@splunk/eslint-config": "^4.0.0",
67
- "@splunk/react-docs": "1.0.0-beta.17",
67
+ "@splunk/react-docs": "1.0.0-beta.18",
68
68
  "@splunk/stylelint-config": "^5.0.0",
69
69
  "@splunk/test-runner-utils": "^0.4.1",
70
70
  "@splunk/webpack-configs": "^7.0.2",
@@ -1,2 +1,2 @@
1
- declare function ControlGroupError(): JSX.Element;
2
- export default ControlGroupError;
1
+ declare function Error(): JSX.Element;
2
+ export default Error;
@@ -0,0 +1,2 @@
1
+ declare function Error(): JSX.Element;
2
+ export default Error;
@@ -17,7 +17,7 @@ interface ProgressPropsBase {
17
17
  * Sets the appearance of the `Progress` component.
18
18
  *
19
19
  * The `warning` appearance is deprecated and will be removed in the next major version.
20
- * @excludeTheme enterprise
20
+ * @themeNotes Enterprise themes do not support `warning` and will fall back to `info`
21
21
  */
22
22
  type?: 'info' | 'success' | 'warning' | 'error';
23
23
  }