@splunk/react-ui 4.36.0 → 4.38.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 (39) hide show
  1. package/Button.js +139 -132
  2. package/CHANGELOG.md +32 -0
  3. package/Color.js +1145 -977
  4. package/ComboBox.js +1 -2
  5. package/Date.js +21 -24
  6. package/Menu.js +161 -153
  7. package/Multiselect.js +17 -27
  8. package/Progress.js +202 -149
  9. package/RadioBar.js +18 -14
  10. package/ScreenReaderContent.js +138 -94
  11. package/Search.js +45 -42
  12. package/Select.js +89 -99
  13. package/Slider.js +128 -145
  14. package/Switch.js +123 -119
  15. package/Text.js +202 -199
  16. package/TextArea.js +21 -19
  17. package/package.json +4 -4
  18. package/types/src/Button/Button.d.ts +15 -5
  19. package/types/src/Color/Color.d.ts +3 -0
  20. package/types/src/Color/Palette.d.ts +4 -2
  21. package/types/src/ControlGroup/docs/examples/Error.d.ts +2 -2
  22. package/types/src/Date/Date.d.ts +0 -1
  23. package/types/src/Date/docs/examples/Error.d.ts +2 -0
  24. package/types/src/Link/Link.d.ts +3 -4
  25. package/types/src/Menu/Item.d.ts +6 -3
  26. package/types/src/Progress/Progress.d.ts +1 -1
  27. package/types/src/Search/Option.d.ts +7 -0
  28. package/types/src/Select/Select.d.ts +1 -1
  29. package/types/src/Select/SelectBase.d.ts +0 -1
  30. package/types/src/Slider/Slider.d.ts +0 -1
  31. package/types/src/Slider/docs/examples/Error.d.ts +2 -0
  32. package/types/src/Switch/Switch.d.ts +1 -0
  33. package/types/src/Text/Text.d.ts +6 -4
  34. package/types/src/Text/docs/examples/Dimmed.d.ts +2 -0
  35. package/types/src/TextArea/TextArea.d.ts +2 -2
  36. package/types/src/Button/docs/examples/Selected.d.ts +0 -2
  37. package/types/src/Slider/docs/examples/prisma/Error.d.ts +0 -2
  38. /package/types/src/Date/docs/examples/{prisma/WithoutCalendar.d.ts → WithoutCalendar.d.ts} +0 -0
  39. /package/types/src/Progress/docs/examples/{prisma/Type.d.ts → Type.d.ts} +0 -0
package/Multiselect.js CHANGED
@@ -311,13 +311,12 @@
311
311
  var t = this.props, n = t.value, o = t.children, a = t.label, i = t.multiple, l = v(t, [ "value", "children", "label", "multiple" ]);
312
312
 
313
313
  return r().createElement(p.Item, d({
314
- "aria-selected": this.props.selected,
315
314
  "data-test-value": n,
316
315
  "data-test": "option",
317
316
  ref: this.handleMount
318
317
  }, l, {
319
318
  selectable: true,
320
- selectableAppearance: i ? "checkbox" : undefined,
319
+ selectableAppearance: i ? "checkbox" : "checkmark",
321
320
  onClick: this.handleClick,
322
321
  role: "option",
323
322
  value: n.toString()
@@ -1450,7 +1449,6 @@
1450
1449
  Jt($t(a), "dropdown", null);
1451
1450
  Jt($t(a), "firstSelectedEnabledOption", null);
1452
1451
  Jt($t(a), "firstSelectedOptionIndex", void 0);
1453
- Jt($t(a), "menuId", void 0);
1454
1452
  Jt($t(a), "menuListboxId", void 0);
1455
1453
  Jt($t(a), "previousActiveIndex", null);
1456
1454
  Jt($t(a), "selectedOptionCount", void 0);
@@ -1744,35 +1742,26 @@
1744
1742
  k = E;
1745
1743
  // only apply prefix / suffix if the label is not empty
1746
1744
  if (k.length > 0) {
1745
+ // If there's more than one item selected, read out the selected total
1746
+ // rather than reading out each selected item
1747
+ I = a.wrapLabel({
1748
+ prefixLabel: O,
1749
+ label: k.length > 1 ? [ "".concat(_.length, " items selected") ] : I,
1750
+ suffixLabel: S
1751
+ });
1747
1752
  k = a.wrapLabel({
1748
1753
  prefixLabel: O,
1749
1754
  label: k,
1750
1755
  suffixLabel: S
1751
1756
  });
1752
1757
  }
1753
- // single <Select> behaviour is to show the placeholder if all parts of the the label
1758
+ // single <Select> behaviour is to show the placeholder if all parts of the label
1754
1759
  // are empty strings so we replicate this behaviour here
1755
1760
  if (k.length === 0 || !m && k.every((function(e) {
1756
1761
  return e === "";
1757
1762
  }))) {
1758
1763
  k = Qt(g);
1759
- // placeholder has a default value so will not be undefined
1760
- I = Qt(g);
1761
- }
1762
- // If there's more than one item selected, read out the selected total
1763
- // rather than reading out each selected item
1764
- if (k.length > 1) {
1765
- I = a.wrapLabel({
1766
- prefixLabel: O,
1767
- label: [ "".concat(_.length, " items selected") ],
1768
- suffixLabel: S
1769
- });
1770
- } else {
1771
- I = a.wrapLabel({
1772
- prefixLabel: O,
1773
- label: I,
1774
- suffixLabel: S
1775
- });
1764
+ I = k;
1776
1765
  }
1777
1766
  var M = Gt({
1778
1767
  "aria-describedby": p,
@@ -1781,6 +1770,7 @@
1781
1770
  "aria-required": w,
1782
1771
  "data-select-appearance": l,
1783
1772
  "data-test": m ? "multiselect" : "select",
1773
+ role: "combobox",
1784
1774
  disabled: f,
1785
1775
  elementRef: d,
1786
1776
  error: v
@@ -1810,8 +1800,6 @@
1810
1800
  icon: x,
1811
1801
  inline: h,
1812
1802
  isMenu: true,
1813
- "aria-haspopup": "listbox",
1814
- "aria-owns": a.menuId,
1815
1803
  onClick: a.props.onClick
1816
1804
  }, pe()(a.props, o.invalidLinkAppearanceProps)), !!_.length && m && r().createElement(bt, {
1817
1805
  "data-role": "count"
@@ -2066,7 +2054,6 @@
2066
2054
  if (false) {}
2067
2055
  if (false) {}
2068
2056
  o.validateAppearance(e);
2069
- a.menuId = (0, be.createDOMID)("menu");
2070
2057
  a.menuListboxId = (0, be.createDOMID)("menu-listbox");
2071
2058
  a.activeItemId = (0, be.createDOMID)("active-item");
2072
2059
  return a;
@@ -2197,7 +2184,9 @@
2197
2184
  role: "combobox",
2198
2185
  "aria-expanded": "true",
2199
2186
  "aria-controls": this.menuListboxId,
2187
+ "aria-owns": n ? this.activeItemId : undefined,
2200
2188
  "aria-label": (0, u._)("Filter"),
2189
+ "aria-autocomplete": "list",
2201
2190
  "aria-activedescendant": this.state.textHasFocus && n ? this.activeItemId : undefined,
2202
2191
  inputRef: s,
2203
2192
  inputId: l,
@@ -2234,10 +2223,11 @@
2234
2223
  "aria-multiselectable": c || undefined,
2235
2224
  childrenStart: o.renderControls({
2236
2225
  placement: i,
2237
- hasChildren: !!b.length
2226
+ hasChildren: b.some((function(e) {
2227
+ return tn(e);
2228
+ }))
2238
2229
  }),
2239
2230
  focusMode: o.hasFilter() ? "never" : undefined,
2240
- id: o.menuId,
2241
2231
  isLoading: o.props.isLoadingOptions,
2242
2232
  menuId: o.menuListboxId,
2243
2233
  onScrollBottom: o.props.onScrollBottom ? o.handleScrollBottom : undefined,
@@ -2269,7 +2259,7 @@
2269
2259
  canCoverAnchor: xt().innerHeight < 500,
2270
2260
  ref: this.handleDropdownMount,
2271
2261
  retainFocus: false,
2272
- takeFocus: d.length === 0 || d.length > 0 && !h || !!f
2262
+ takeFocus: d.length === 0 || d.length > 0 && !h || f
2273
2263
  }, m);
2274
2264
  }
2275
2265
  } ]);
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
  /******/})();