@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.
- package/Button.js +139 -132
- package/CHANGELOG.md +32 -0
- package/Color.js +1145 -977
- package/ComboBox.js +1 -2
- package/Date.js +21 -24
- package/Menu.js +161 -153
- package/Multiselect.js +17 -27
- package/Progress.js +202 -149
- package/RadioBar.js +18 -14
- package/ScreenReaderContent.js +138 -94
- package/Search.js +45 -42
- package/Select.js +89 -99
- package/Slider.js +128 -145
- package/Switch.js +123 -119
- package/Text.js +202 -199
- package/TextArea.js +21 -19
- package/package.json +4 -4
- package/types/src/Button/Button.d.ts +15 -5
- package/types/src/Color/Color.d.ts +3 -0
- package/types/src/Color/Palette.d.ts +4 -2
- package/types/src/ControlGroup/docs/examples/Error.d.ts +2 -2
- package/types/src/Date/Date.d.ts +0 -1
- package/types/src/Date/docs/examples/Error.d.ts +2 -0
- package/types/src/Link/Link.d.ts +3 -4
- package/types/src/Menu/Item.d.ts +6 -3
- package/types/src/Progress/Progress.d.ts +1 -1
- package/types/src/Search/Option.d.ts +7 -0
- package/types/src/Select/Select.d.ts +1 -1
- package/types/src/Select/SelectBase.d.ts +0 -1
- package/types/src/Slider/Slider.d.ts +0 -1
- package/types/src/Slider/docs/examples/Error.d.ts +2 -0
- package/types/src/Switch/Switch.d.ts +1 -0
- package/types/src/Text/Text.d.ts +6 -4
- package/types/src/Text/docs/examples/Dimmed.d.ts +2 -0
- package/types/src/TextArea/TextArea.d.ts +2 -2
- package/types/src/Button/docs/examples/Selected.d.ts +0 -2
- package/types/src/Slider/docs/examples/prisma/Error.d.ts +0 -2
- /package/types/src/Date/docs/examples/{prisma/WithoutCalendar.d.ts → WithoutCalendar.d.ts} +0 -0
- /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" :
|
|
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
|
|
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
|
-
|
|
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:
|
|
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 ||
|
|
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
|
|
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
|
/******/})();
|