@splunk/react-ui 4.35.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 +30 -3
- package/Calendar.js +2 -2
- package/CollapsiblePanel.js +1 -1
- package/ComboBox.js +2 -2
- package/ControlGroup.js +48 -49
- package/Date.js +21 -24
- package/FormRows.js +2 -2
- package/JSONTree.js +260 -227
- package/MIGRATION.mdx +17 -0
- package/Modal.js +1 -1
- package/Multiselect.js +28 -10
- package/Paginator.js +1 -1
- package/Progress.js +202 -149
- package/RadioBar.js +164 -194
- package/Resize.js +133 -113
- package/Slider.js +9 -3
- package/StaticContent.js +48 -46
- package/Switch.js +1 -1
- package/TabBar.js +125 -110
- package/TextArea.js +21 -19
- package/package.json +3 -2
- package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -0
- package/types/src/ComboBox/ComboBox.d.ts +8 -4
- package/types/src/ControlGroup/ControlGroup.d.ts +9 -5
- package/types/src/ControlGroup/docs/examples/Error.d.ts +2 -2
- package/types/src/Date/docs/examples/Error.d.ts +2 -0
- package/types/src/JSONTree/JSONTreeItem.d.ts +2 -2
- package/types/src/JSONTree/renderTreeItems.d.ts +2 -2
- package/types/src/Multiselect/Normal.d.ts +1 -0
- package/types/src/Progress/Progress.d.ts +1 -1
- package/types/src/RadioBar/RadioBarContext.d.ts +1 -1
- package/types/src/Resize/Resize.d.ts +4 -2
- package/types/src/StaticContent/StaticContent.d.ts +4 -1
- /package/types/src/Progress/docs/examples/{prisma/Type.d.ts → Type.d.ts} +0 -0
package/MIGRATION.mdx
CHANGED
|
@@ -648,3 +648,20 @@ With the new `Search` component optimized for user interaction, Text's `appearan
|
|
|
648
648
|
#### Migration steps
|
|
649
649
|
|
|
650
650
|
Replace all usage of `Text`'s `appearance="search"` value with the `Search` component. Remove all usage of `Text`'s `appearance="default"` value.
|
|
651
|
+
|
|
652
|
+
## 4.36.0
|
|
653
|
+
|
|
654
|
+
### Deprecated `ComboBox`, `ControlGroup`, and `StaticContent`'s `size` prop
|
|
655
|
+
|
|
656
|
+
#### Change
|
|
657
|
+
|
|
658
|
+
`ComboBox`, `ControlGroup`, and `StaticContent`'s `size` prop has been deprecated and will be removed in the next major version.
|
|
659
|
+
|
|
660
|
+
#### Context
|
|
661
|
+
|
|
662
|
+
The `size` prop currently does not do anything in `ComboBox`, `ControlGroup`, or `StaticContent`, so it will be removed in the next major version.
|
|
663
|
+
|
|
664
|
+
#### Migration steps
|
|
665
|
+
|
|
666
|
+
Remove all usage of `ComboBox`, `ControlGroup`, and `StaticContent`'s `size` prop. To change the size of components, use the `SplunkThemeProvider`'s `density` prop.
|
|
667
|
+
|
package/Modal.js
CHANGED
|
@@ -489,7 +489,7 @@
|
|
|
489
489
|
id: p,
|
|
490
490
|
"data-test": "subtitle"
|
|
491
491
|
}, a)) : t, i && n().createElement(ae, null, n().createElement(le, null, n().createElement(ce, {
|
|
492
|
-
appearance: "
|
|
492
|
+
appearance: "subtle",
|
|
493
493
|
"aria-label": (0, Y._)("Close"),
|
|
494
494
|
"data-test": "close",
|
|
495
495
|
onClick: i
|
package/Multiselect.js
CHANGED
|
@@ -2940,8 +2940,14 @@
|
|
|
2940
2940
|
gr(br(a), "popoverId", void 0);
|
|
2941
2941
|
gr(br(a), "previousActiveIndex", null);
|
|
2942
2942
|
gr(br(a), "handleClick", (function() {
|
|
2943
|
-
|
|
2944
|
-
|
|
2943
|
+
if (a.state.hasFocus) {
|
|
2944
|
+
a.open({
|
|
2945
|
+
resetFilterKeyword: false
|
|
2946
|
+
});
|
|
2947
|
+
} else {
|
|
2948
|
+
var e;
|
|
2949
|
+
(e = a.input) === null || e === void 0 ? void 0 : e.focus();
|
|
2950
|
+
}
|
|
2945
2951
|
}));
|
|
2946
2952
|
gr(br(a), "handleRequestRemove", (function(e, t) {
|
|
2947
2953
|
var n = t.value;
|
|
@@ -2950,6 +2956,19 @@
|
|
|
2950
2956
|
}));
|
|
2951
2957
|
// allow the event to bubble before removing.
|
|
2952
2958
|
}));
|
|
2959
|
+
gr(br(a), "open", (function(e) {
|
|
2960
|
+
var t = e.resetFilterKeyword;
|
|
2961
|
+
a.setState((function(e) {
|
|
2962
|
+
return {
|
|
2963
|
+
filterKeyword: t ? "" : e.filterKeyword,
|
|
2964
|
+
hasFocus: true,
|
|
2965
|
+
open: true
|
|
2966
|
+
};
|
|
2967
|
+
}), (function() {
|
|
2968
|
+
var e, t;
|
|
2969
|
+
(e = (t = a.props).onOpen) === null || e === void 0 ? void 0 : e.call(t);
|
|
2970
|
+
}));
|
|
2971
|
+
}));
|
|
2953
2972
|
gr(br(a), "handleInputFocus", (function(e) {
|
|
2954
2973
|
if (a.state.filterKeyword !== "") {
|
|
2955
2974
|
var t, n;
|
|
@@ -2957,14 +2976,9 @@
|
|
|
2957
2976
|
keyword: ""
|
|
2958
2977
|
});
|
|
2959
2978
|
}
|
|
2960
|
-
a.
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
open: true
|
|
2964
|
-
}, (function() {
|
|
2965
|
-
var e, t;
|
|
2966
|
-
(e = (t = a.props).onOpen) === null || e === void 0 ? void 0 : e.call(t);
|
|
2967
|
-
}));
|
|
2979
|
+
a.open({
|
|
2980
|
+
resetFilterKeyword: true
|
|
2981
|
+
});
|
|
2968
2982
|
}));
|
|
2969
2983
|
gr(br(a), "handleInputKeyDown", (function(e) {
|
|
2970
2984
|
var t, r;
|
|
@@ -3055,6 +3069,7 @@
|
|
|
3055
3069
|
gr(br(a), "handleMenuOptionClick", (function(e, t) {
|
|
3056
3070
|
var n;
|
|
3057
3071
|
var r = t.value;
|
|
3072
|
+
e.stopPropagation();
|
|
3058
3073
|
a.addValue(e, r);
|
|
3059
3074
|
(n = a.input) === null || n === void 0 ? void 0 : n.focus();
|
|
3060
3075
|
}));
|
|
@@ -3208,6 +3223,9 @@
|
|
|
3208
3223
|
key: "addValue",
|
|
3209
3224
|
value: function e(t, n) {
|
|
3210
3225
|
var r, o, a;
|
|
3226
|
+
if (!this.state.open) {
|
|
3227
|
+
return;
|
|
3228
|
+
}
|
|
3211
3229
|
var i = ((r = this.getCurrentValues()) !== null && r !== void 0 ? r : []).concat([ n ]);
|
|
3212
3230
|
var l = this.props.name;
|
|
3213
3231
|
if (!this.isControlled()) {
|
package/Paginator.js
CHANGED
package/Progress.js
CHANGED
|
@@ -2,33 +2,33 @@
|
|
|
2
2
|
// webpackBootstrap
|
|
3
3
|
/******/ "use strict";
|
|
4
4
|
/******/ // The require scope
|
|
5
|
-
/******/ var
|
|
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
|
-
/******/
|
|
12
|
-
/******/ var
|
|
13
|
-
/******/ () =>
|
|
14
|
-
/******/ : () =>
|
|
11
|
+
/******/ r.n = e => {
|
|
12
|
+
/******/ var a = e && e.__esModule ?
|
|
13
|
+
/******/ () => e["default"]
|
|
14
|
+
/******/ : () => e
|
|
15
15
|
/******/;
|
|
16
|
-
|
|
17
|
-
a
|
|
16
|
+
r.d(a, {
|
|
17
|
+
a
|
|
18
18
|
});
|
|
19
|
-
/******/ return
|
|
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
|
-
/******/
|
|
27
|
-
/******/ for (var
|
|
28
|
-
/******/ if (
|
|
29
|
-
/******/ Object.defineProperty(
|
|
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
|
|
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
|
-
/******/
|
|
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
|
-
/******/
|
|
47
|
+
/******/ r.r = r => {
|
|
48
48
|
/******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
49
|
-
/******/ Object.defineProperty(
|
|
49
|
+
/******/ Object.defineProperty(r, Symbol.toStringTag, {
|
|
50
50
|
value: "Module"
|
|
51
51
|
});
|
|
52
52
|
/******/ }
|
|
53
|
-
/******/ Object.defineProperty(
|
|
53
|
+
/******/ Object.defineProperty(r, "__esModule", {
|
|
54
54
|
value: true
|
|
55
55
|
});
|
|
56
56
|
/******/ };
|
|
57
57
|
/******/ })();
|
|
58
58
|
/******/
|
|
59
|
-
/************************************************************************/ var
|
|
59
|
+
/************************************************************************/ var e = {};
|
|
60
60
|
// ESM COMPAT FLAG
|
|
61
|
-
|
|
61
|
+
r.r(e);
|
|
62
62
|
// EXPORTS
|
|
63
|
-
|
|
64
|
-
default: () => /* reexport */
|
|
63
|
+
r.d(e, {
|
|
64
|
+
default: () => /* reexport */ L
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
|
-
const
|
|
68
|
-
var
|
|
67
|
+
const a = require("react");
|
|
68
|
+
var t = r.n(a);
|
|
69
69
|
// CONCATENATED MODULE: external "prop-types"
|
|
70
|
-
const
|
|
71
|
-
var
|
|
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 =
|
|
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 =
|
|
79
|
+
var u = r.n(l);
|
|
80
80
|
// CONCATENATED MODULE: external "tinycolor2"
|
|
81
81
|
const p = require("tinycolor2");
|
|
82
|
-
var
|
|
82
|
+
var v = r.n(p);
|
|
83
83
|
// CONCATENATED MODULE: external "@splunk/react-ui/Tooltip"
|
|
84
|
-
const
|
|
85
|
-
var
|
|
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
|
|
88
|
-
var
|
|
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()(
|
|
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
|
|
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.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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(
|
|
118
|
-
var
|
|
119
|
-
return
|
|
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
|
|
122
|
-
var
|
|
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:
|
|
134
|
-
|
|
135
|
-
|
|
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 (
|
|
143
|
-
var
|
|
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% );" ],
|
|
202
|
+
return (0, l.css)([ "background:radial-gradient( circle at center,", ",", " 30% );" ], i, t);
|
|
150
203
|
}
|
|
151
|
-
return (0, l.css)([ "background:", ";" ],
|
|
204
|
+
return (0, l.css)([ "background:", ";" ], t);
|
|
152
205
|
}
|
|
153
|
-
}), (function(
|
|
154
|
-
return
|
|
155
|
-
enterprise: (0, l.css)([ "animation-duration:1500ms;animation-name:", ";animation-iteration-count:infinite;animation-direction:alternate;" ],
|
|
156
|
-
prisma: function
|
|
157
|
-
var
|
|
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
|
-
})(
|
|
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;}" ],
|
|
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(
|
|
170
|
-
for (var
|
|
171
|
-
var
|
|
172
|
-
for (var
|
|
173
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
174
|
-
|
|
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
|
|
231
|
+
return r;
|
|
179
232
|
};
|
|
180
233
|
return S.apply(this, arguments);
|
|
181
234
|
}
|
|
182
|
-
function O(
|
|
183
|
-
return
|
|
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
|
|
189
|
-
if (!
|
|
190
|
-
if (typeof
|
|
191
|
-
var
|
|
192
|
-
if (
|
|
193
|
-
if (
|
|
194
|
-
if (
|
|
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
|
|
197
|
-
if (
|
|
198
|
-
for (var
|
|
199
|
-
a
|
|
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
|
|
254
|
+
return t;
|
|
202
255
|
}
|
|
203
|
-
function
|
|
204
|
-
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(
|
|
205
|
-
var
|
|
206
|
-
var
|
|
207
|
-
var
|
|
208
|
-
var
|
|
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 =
|
|
211
|
-
|
|
212
|
-
if (
|
|
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 (
|
|
215
|
-
|
|
216
|
-
|
|
267
|
+
} catch (r) {
|
|
268
|
+
i = true;
|
|
269
|
+
n = r;
|
|
217
270
|
} finally {
|
|
218
271
|
try {
|
|
219
|
-
if (!
|
|
272
|
+
if (!t && o["return"] != null) o["return"]();
|
|
220
273
|
} finally {
|
|
221
|
-
if (
|
|
274
|
+
if (i) throw n;
|
|
222
275
|
}
|
|
223
276
|
}
|
|
224
|
-
return
|
|
277
|
+
return a;
|
|
225
278
|
}
|
|
226
|
-
function
|
|
227
|
-
if (Array.isArray(
|
|
279
|
+
function D(r) {
|
|
280
|
+
if (Array.isArray(r)) return r;
|
|
228
281
|
}
|
|
229
|
-
function
|
|
230
|
-
if (
|
|
231
|
-
var
|
|
232
|
-
var
|
|
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
|
|
235
|
-
for (
|
|
236
|
-
|
|
237
|
-
if (
|
|
238
|
-
if (!Object.prototype.propertyIsEnumerable.call(
|
|
239
|
-
t
|
|
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
|
|
295
|
+
return a;
|
|
243
296
|
}
|
|
244
|
-
function
|
|
245
|
-
if (
|
|
246
|
-
var
|
|
247
|
-
var
|
|
248
|
-
var
|
|
249
|
-
for (
|
|
250
|
-
|
|
251
|
-
if (
|
|
252
|
-
|
|
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
|
|
307
|
+
return a;
|
|
255
308
|
}
|
|
256
|
-
var
|
|
257
|
-
elementRef:
|
|
258
|
-
percentage:
|
|
259
|
-
tooltip:
|
|
260
|
-
type:
|
|
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
|
|
263
|
-
var
|
|
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,
|
|
267
|
-
var
|
|
268
|
-
var
|
|
269
|
-
|
|
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
|
|
272
|
-
|
|
324
|
+
var d = (0, a.useCallback)((function() {
|
|
325
|
+
b(false);
|
|
273
326
|
}), []);
|
|
274
|
-
var g =
|
|
327
|
+
var g = i || "".concat(e, "%");
|
|
275
328
|
|
|
276
|
-
return
|
|
277
|
-
$animated:
|
|
329
|
+
return t().createElement(y, S({
|
|
330
|
+
$animated: f,
|
|
278
331
|
"data-test": "progress",
|
|
279
|
-
onMouseEnter:
|
|
280
|
-
onMouseLeave:
|
|
281
|
-
}, l), s()(
|
|
332
|
+
onMouseEnter: m,
|
|
333
|
+
onMouseLeave: d
|
|
334
|
+
}, l), s()(e) && t().createElement(C, {
|
|
282
335
|
inline: false,
|
|
283
|
-
open:
|
|
336
|
+
open: v,
|
|
284
337
|
content: g,
|
|
285
338
|
style: {
|
|
286
|
-
width: "".concat(
|
|
339
|
+
width: "".concat(e, "%")
|
|
287
340
|
},
|
|
288
341
|
role: "progressbar",
|
|
289
|
-
"aria-valuenow":
|
|
342
|
+
"aria-valuenow": e,
|
|
290
343
|
"aria-valuemin": 0,
|
|
291
344
|
"aria-valuemax": 100,
|
|
292
|
-
$animated:
|
|
345
|
+
$animated: f,
|
|
293
346
|
$type: o
|
|
294
|
-
},
|
|
295
|
-
$animated:
|
|
347
|
+
}, t().createElement(w, {
|
|
348
|
+
$animated: f,
|
|
296
349
|
$type: o
|
|
297
350
|
})));
|
|
298
351
|
}
|
|
299
|
-
|
|
300
|
-
/* harmony default export */ const
|
|
352
|
+
I.propTypes = A;
|
|
353
|
+
/* harmony default export */ const L = I;
|
|
301
354
|
// CONCATENATED MODULE: ./src/Progress/index.ts
|
|
302
|
-
module.exports =
|
|
355
|
+
module.exports = e;
|
|
303
356
|
/******/})();
|