@rankingcoach/vanguard 1.12.0 → 1.12.2-testare.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/dist/index-BenchmarkGauge.js +1 -1
- package/dist/index-BenchmarkGaugeMarker.js +1 -1
- package/dist/index-CreditCard.js +1 -1
- package/dist/index-DateInput.js +4 -4
- package/dist/index-DateRange.js +1 -1
- package/dist/index-DropdownMenu.js +65 -55
- package/dist/index-InputRangeField.js +1 -1
- package/dist/index-ModalContext.js +28 -27
- package/dist/index-ModalService.js +178 -125
- package/dist/index-Month.js +2 -2
- package/dist/index-StyledSVG2.js +2 -2
- package/dist/index-_virtual10.js +2 -3
- package/dist/index-_virtual69.js +2 -2
- package/dist/index-_virtual70.js +4 -2
- package/dist/index-_virtual71.js +2 -4
- package/dist/index-_virtual72.js +4 -2
- package/dist/index-_virtual73.js +1 -1
- package/dist/index-_virtual74.js +1 -1
- package/dist/index-_virtual75.js +2 -4
- package/dist/index-_virtual76.js +2 -2
- package/dist/index-_virtual9.js +3 -2
- package/dist/index-accessibility.js +1 -1
- package/dist/index-dist3.js +1 -1
- package/dist/index-esm4.js +128 -293
- package/dist/index-esm5.js +293 -128
- package/dist/index-helpers2.js +393 -43
- package/dist/index-helpers3.js +43 -393
- package/dist/index-use-benchmark-gauge-render-state.js +1 -1
- package/dist/index-utils2.js +67 -47
- package/dist/index-utils3.js +47 -67
- package/dist/types/core/Modal/ModalService.d.ts +30 -0
- package/dist/types/core/Modal/stories/ModalStackingPopover.story.d.ts +6 -0
- package/dist/types/core/Modal/stories/TopmostModalZIndex.story.d.ts +5 -0
- package/dist/vanguard-asset-analysis.json +1 -1
- package/dist-wordpress/index.js +8498 -8446
- package/dist-wordpress/vanguard.css +1 -1
- package/package.json +4 -4
package/dist/index-esm4.js
CHANGED
|
@@ -1,303 +1,138 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
e.
|
|
8
|
-
} || function(e, r) {
|
|
9
|
-
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
10
|
-
}, l(a, t);
|
|
11
|
-
};
|
|
12
|
-
return function(a, t) {
|
|
13
|
-
if (typeof t != "function" && t !== null)
|
|
14
|
-
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
15
|
-
l(a, t);
|
|
16
|
-
function e() {
|
|
17
|
-
this.constructor = a;
|
|
18
|
-
}
|
|
19
|
-
a.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
|
|
20
|
-
};
|
|
21
|
-
})(), _ = function() {
|
|
22
|
-
return _ = Object.assign || function(l) {
|
|
23
|
-
for (var a, t = 1, e = arguments.length; t < e; t++) {
|
|
24
|
-
a = arguments[t];
|
|
25
|
-
for (var r in a) Object.prototype.hasOwnProperty.call(a, r) && (l[r] = a[r]);
|
|
1
|
+
import * as b from "react";
|
|
2
|
+
import { noTextChildNodes as w, possibleStandardNames as h, styleToObject as A, randomString as E } from "./index-helpers2.js";
|
|
3
|
+
var v = function() {
|
|
4
|
+
return v = Object.assign || function(r) {
|
|
5
|
+
for (var e, t = 1, n = arguments.length; t < n; t++) {
|
|
6
|
+
e = arguments[t];
|
|
7
|
+
for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && (r[a] = e[a]);
|
|
26
8
|
}
|
|
27
|
-
return
|
|
28
|
-
},
|
|
29
|
-
}, g = function(
|
|
30
|
-
var t = typeof Symbol == "function" &&
|
|
31
|
-
if (!t) return
|
|
32
|
-
var
|
|
9
|
+
return r;
|
|
10
|
+
}, v.apply(this, arguments);
|
|
11
|
+
}, g = function(r, e) {
|
|
12
|
+
var t = typeof Symbol == "function" && r[Symbol.iterator];
|
|
13
|
+
if (!t) return r;
|
|
14
|
+
var n = t.call(r), a, c = [], l;
|
|
33
15
|
try {
|
|
34
|
-
for (; (
|
|
35
|
-
} catch (
|
|
36
|
-
|
|
16
|
+
for (; (e === void 0 || e-- > 0) && !(a = n.next()).done; ) c.push(a.value);
|
|
17
|
+
} catch (u) {
|
|
18
|
+
l = { error: u };
|
|
37
19
|
} finally {
|
|
38
20
|
try {
|
|
39
|
-
|
|
21
|
+
a && !a.done && (t = n.return) && t.call(n);
|
|
40
22
|
} finally {
|
|
41
|
-
if (
|
|
23
|
+
if (l) throw l.error;
|
|
42
24
|
}
|
|
43
25
|
}
|
|
44
|
-
return
|
|
45
|
-
},
|
|
46
|
-
if (t || arguments.length === 2) for (var
|
|
47
|
-
(
|
|
48
|
-
return
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
configurable: !0,
|
|
94
|
-
writable: !0,
|
|
95
|
-
value: function() {
|
|
96
|
-
var r = e.props, n = r.cacheRequests, u = r.fetchOptions, i = r.src;
|
|
97
|
-
try {
|
|
98
|
-
return n && (h[i] = { content: "", status: p.LOADING }), fetch(i, u).then(function(o) {
|
|
99
|
-
var s = o.headers.get("content-type"), f = g((s || "").split(/ ?; ?/), 1), c = f[0];
|
|
100
|
-
if (o.status > 299)
|
|
101
|
-
throw new Error("Not found");
|
|
102
|
-
if (!["image/svg+xml", "text/plain"].some(function(d) {
|
|
103
|
-
return c.includes(d);
|
|
104
|
-
}))
|
|
105
|
-
throw new Error("Content type isn't valid: ".concat(c));
|
|
106
|
-
return o.text();
|
|
107
|
-
}).then(function(o) {
|
|
108
|
-
var s = e.props.src;
|
|
109
|
-
if (i !== s) {
|
|
110
|
-
h[i].status === p.LOADING && delete h[i];
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
if (e.handleLoad(o), n) {
|
|
114
|
-
var f = h[i];
|
|
115
|
-
f && (f.content = o, f.status = p.LOADED);
|
|
116
|
-
}
|
|
117
|
-
}).catch(function(o) {
|
|
118
|
-
if (e.handleError(o), n) {
|
|
119
|
-
var s = h[i];
|
|
120
|
-
s && delete h[i];
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
} catch (o) {
|
|
124
|
-
return e.handleError(new Error(o.message));
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}), e.state = {
|
|
128
|
-
content: "",
|
|
129
|
-
element: null,
|
|
130
|
-
hasCache: !!t.cacheRequests && !!h[t.src],
|
|
131
|
-
status: p.PENDING
|
|
132
|
-
}, e.hash = t.uniqueHash || E(8), e;
|
|
133
|
-
}
|
|
134
|
-
return Object.defineProperty(a.prototype, "componentDidMount", {
|
|
135
|
-
enumerable: !1,
|
|
136
|
-
configurable: !0,
|
|
137
|
-
writable: !0,
|
|
138
|
-
value: function() {
|
|
139
|
-
if (this.isActive = !0, !(!w() || this.isInitialized)) {
|
|
140
|
-
var t = this.state.status, e = this.props.src;
|
|
141
|
-
try {
|
|
142
|
-
if (t === p.PENDING) {
|
|
143
|
-
if (!S())
|
|
144
|
-
throw new Error("Browser does not support SVG");
|
|
145
|
-
if (!e)
|
|
146
|
-
throw new Error("Missing src");
|
|
147
|
-
this.load();
|
|
148
|
-
}
|
|
149
|
-
} catch (r) {
|
|
150
|
-
this.handleError(r);
|
|
151
|
-
}
|
|
152
|
-
this.isInitialized = !0;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}), Object.defineProperty(a.prototype, "componentDidUpdate", {
|
|
156
|
-
enumerable: !1,
|
|
157
|
-
configurable: !0,
|
|
158
|
-
writable: !0,
|
|
159
|
-
value: function(t, e) {
|
|
160
|
-
if (w()) {
|
|
161
|
-
var r = this.state, n = r.hasCache, u = r.status, i = this.props, o = i.onLoad, s = i.src;
|
|
162
|
-
if (e.status !== p.READY && u === p.READY && o && o(s, n), t.src !== s) {
|
|
163
|
-
if (!s) {
|
|
164
|
-
this.handleError(new Error("Missing src"));
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
this.load();
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}), Object.defineProperty(a.prototype, "componentWillUnmount", {
|
|
172
|
-
enumerable: !1,
|
|
173
|
-
configurable: !0,
|
|
174
|
-
writable: !0,
|
|
175
|
-
value: function() {
|
|
176
|
-
this.isActive = !1;
|
|
177
|
-
}
|
|
178
|
-
}), Object.defineProperty(a.prototype, "getNode", {
|
|
179
|
-
enumerable: !1,
|
|
180
|
-
configurable: !0,
|
|
181
|
-
writable: !0,
|
|
182
|
-
value: function() {
|
|
183
|
-
var t = this.props, e = t.description, r = t.title;
|
|
184
|
-
try {
|
|
185
|
-
var n = this.processSVG(), u = O(n, { nodeOnly: !0 });
|
|
186
|
-
if (!u || !(u instanceof SVGSVGElement))
|
|
187
|
-
throw new Error("Could not convert the src to a DOM Node");
|
|
188
|
-
var i = this.updateSVGAttributes(u);
|
|
189
|
-
if (e) {
|
|
190
|
-
var o = i.querySelector("desc");
|
|
191
|
-
o && o.parentNode && o.parentNode.removeChild(o);
|
|
192
|
-
var s = document.createElementNS("http://www.w3.org/2000/svg", "desc");
|
|
193
|
-
s.innerHTML = e, i.prepend(s);
|
|
194
|
-
}
|
|
195
|
-
if (typeof r < "u") {
|
|
196
|
-
var f = i.querySelector("title");
|
|
197
|
-
if (f && f.parentNode && f.parentNode.removeChild(f), r) {
|
|
198
|
-
var c = document.createElementNS("http://www.w3.org/2000/svg", "title");
|
|
199
|
-
c.innerHTML = r, i.prepend(c);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
return i;
|
|
203
|
-
} catch (d) {
|
|
204
|
-
return this.handleError(d);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}), Object.defineProperty(a.prototype, "getElement", {
|
|
208
|
-
enumerable: !1,
|
|
209
|
-
configurable: !0,
|
|
210
|
-
writable: !0,
|
|
211
|
-
value: function() {
|
|
212
|
-
try {
|
|
213
|
-
var t = this.getNode(), e = O(t);
|
|
214
|
-
if (!e || !m.isValidElement(e))
|
|
215
|
-
throw new Error("Could not convert the src to a React element");
|
|
216
|
-
this.setState({
|
|
217
|
-
element: e,
|
|
218
|
-
status: p.READY
|
|
219
|
-
});
|
|
220
|
-
} catch (r) {
|
|
221
|
-
this.handleError(new Error(r.message));
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}), Object.defineProperty(a.prototype, "load", {
|
|
225
|
-
enumerable: !1,
|
|
226
|
-
configurable: !0,
|
|
227
|
-
writable: !0,
|
|
228
|
-
value: function() {
|
|
229
|
-
var t = this;
|
|
230
|
-
this.isActive && this.setState({
|
|
231
|
-
content: "",
|
|
232
|
-
element: null,
|
|
233
|
-
hasCache: !1,
|
|
234
|
-
status: p.LOADING
|
|
235
|
-
}, function() {
|
|
236
|
-
var e = t.props, r = e.cacheRequests, n = e.src, u = r && h[n];
|
|
237
|
-
if (u && u.status === p.LOADED) {
|
|
238
|
-
t.handleLoad(u.content, !0);
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
var i = n.match(/data:image\/svg[^,]*?(;base64)?,(.*)/), o;
|
|
242
|
-
if (i ? o = i[1] ? window.atob(i[2]) : decodeURIComponent(i[2]) : n.includes("<svg") && (o = n), o) {
|
|
243
|
-
t.handleLoad(o);
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
t.request();
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
}), Object.defineProperty(a.prototype, "updateSVGAttributes", {
|
|
250
|
-
enumerable: !1,
|
|
251
|
-
configurable: !0,
|
|
252
|
-
writable: !0,
|
|
253
|
-
value: function(t) {
|
|
254
|
-
var e = this, r = this.props, n = r.baseURL, u = n === void 0 ? "" : n, i = r.uniquifyIDs, o = ["id", "href", "xlink:href", "xlink:role", "xlink:arcrole"], s = ["href", "xlink:href"], f = function(c, d) {
|
|
255
|
-
return s.includes(c) && (d ? !d.includes("#") : !1);
|
|
256
|
-
};
|
|
257
|
-
return i && D([], g(t.children), !1).map(function(c) {
|
|
258
|
-
if (c.attributes && c.attributes.length) {
|
|
259
|
-
var d = Object.values(c.attributes).map(function(b) {
|
|
260
|
-
var v = b, y = b.value.match(/url\((.*?)\)/);
|
|
261
|
-
return y && y[1] && (v.value = b.value.replace(y[0], "url(".concat(u).concat(y[1], "__").concat(e.hash, ")"))), v;
|
|
262
|
-
});
|
|
263
|
-
o.forEach(function(b) {
|
|
264
|
-
var v = d.find(function(y) {
|
|
265
|
-
return y.name === b;
|
|
266
|
-
});
|
|
267
|
-
v && !f(b, v.value) && (v.value = "".concat(v.value, "__").concat(e.hash));
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
return c.children.length ? e.updateSVGAttributes(c) : c;
|
|
271
|
-
}), t;
|
|
272
|
-
}
|
|
273
|
-
}), Object.defineProperty(a.prototype, "processSVG", {
|
|
274
|
-
enumerable: !1,
|
|
275
|
-
configurable: !0,
|
|
276
|
-
writable: !0,
|
|
277
|
-
value: function() {
|
|
278
|
-
var t = this.state.content, e = this.props.preProcessor;
|
|
279
|
-
return e ? e(t) : t;
|
|
280
|
-
}
|
|
281
|
-
}), Object.defineProperty(a.prototype, "render", {
|
|
282
|
-
enumerable: !1,
|
|
283
|
-
configurable: !0,
|
|
284
|
-
writable: !0,
|
|
285
|
-
value: function() {
|
|
286
|
-
var t = this.state, e = t.element, r = t.status, n = this.props, u = n.children, i = u === void 0 ? null : u, o = n.innerRef, s = n.loader, f = s === void 0 ? null : s, c = P(this.props, "baseURL", "cacheRequests", "children", "description", "fetchOptions", "innerRef", "loader", "onError", "onLoad", "preProcessor", "src", "title", "uniqueHash", "uniquifyIDs");
|
|
287
|
-
return w() ? e ? m.cloneElement(e, _({ ref: o }, c)) : [p.UNSUPPORTED, p.FAILED].includes(r) ? i : f : f;
|
|
288
|
-
}
|
|
289
|
-
}), Object.defineProperty(a, "defaultProps", {
|
|
290
|
-
enumerable: !0,
|
|
291
|
-
configurable: !0,
|
|
292
|
-
writable: !0,
|
|
293
|
-
value: {
|
|
294
|
-
cacheRequests: !0,
|
|
295
|
-
uniquifyIDs: !1
|
|
26
|
+
return c;
|
|
27
|
+
}, _ = function(r, e, t) {
|
|
28
|
+
if (t || arguments.length === 2) for (var n = 0, a = e.length, c; n < a; n++)
|
|
29
|
+
(c || !(n in e)) && (c || (c = Array.prototype.slice.call(e, 0, n)), c[n] = e[n]);
|
|
30
|
+
return r.concat(c || Array.prototype.slice.call(e));
|
|
31
|
+
};
|
|
32
|
+
function O(r, e) {
|
|
33
|
+
var t = {
|
|
34
|
+
key: e
|
|
35
|
+
};
|
|
36
|
+
if (r instanceof Element) {
|
|
37
|
+
var n = r.getAttribute("class");
|
|
38
|
+
n && (t.className = n), _([], g(r.attributes), !1).forEach(function(a) {
|
|
39
|
+
switch (a.name) {
|
|
40
|
+
// this is manually handled above, so break;
|
|
41
|
+
case "class":
|
|
42
|
+
break;
|
|
43
|
+
case "style":
|
|
44
|
+
t[a.name] = A(a.value);
|
|
45
|
+
break;
|
|
46
|
+
case "allowfullscreen":
|
|
47
|
+
case "allowpaymentrequest":
|
|
48
|
+
case "async":
|
|
49
|
+
case "autofocus":
|
|
50
|
+
case "autoplay":
|
|
51
|
+
case "checked":
|
|
52
|
+
case "controls":
|
|
53
|
+
case "default":
|
|
54
|
+
case "defer":
|
|
55
|
+
case "disabled":
|
|
56
|
+
case "formnovalidate":
|
|
57
|
+
case "hidden":
|
|
58
|
+
case "ismap":
|
|
59
|
+
case "itemscope":
|
|
60
|
+
case "loop":
|
|
61
|
+
case "multiple":
|
|
62
|
+
case "muted":
|
|
63
|
+
case "nomodule":
|
|
64
|
+
case "novalidate":
|
|
65
|
+
case "open":
|
|
66
|
+
case "readonly":
|
|
67
|
+
case "required":
|
|
68
|
+
case "reversed":
|
|
69
|
+
case "selected":
|
|
70
|
+
case "typemustmatch":
|
|
71
|
+
t[h[a.name] || a.name] = !0;
|
|
72
|
+
break;
|
|
73
|
+
default:
|
|
74
|
+
t[h[a.name] || a.name] = a.value;
|
|
296
75
|
}
|
|
297
|
-
})
|
|
298
|
-
}
|
|
299
|
-
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return t;
|
|
79
|
+
}
|
|
80
|
+
function S(r, e, t) {
|
|
81
|
+
var n = _([], g(r), !1).map(function(a, c) {
|
|
82
|
+
return p(a, v(v({}, t), { index: c, level: e + 1 }));
|
|
83
|
+
}).filter(Boolean);
|
|
84
|
+
return n.length ? n : null;
|
|
85
|
+
}
|
|
86
|
+
function k(r) {
|
|
87
|
+
return /[a-z]+[A-Z]+[a-z]+/.test(r) ? r : r.toLowerCase();
|
|
88
|
+
}
|
|
89
|
+
function p(r, e) {
|
|
90
|
+
var t;
|
|
91
|
+
if (e === void 0 && (e = {}), !r || !(r instanceof Node))
|
|
92
|
+
return null;
|
|
93
|
+
var n = e.actions, a = n === void 0 ? [] : n, c = e.index, l = c === void 0 ? 0 : c, u = e.level, i = u === void 0 ? 0 : u, y = e.randomKey, o = r, s = "".concat(i, "-").concat(l), m = [];
|
|
94
|
+
if (y && i === 0 && (s = "".concat(E(), "-").concat(s)), Array.isArray(a) && a.forEach(function(d) {
|
|
95
|
+
d.condition(o, s, i) && (typeof d.pre == "function" && (o = d.pre(o, s, i), o instanceof Node || (o = r, process.env.NODE_ENV)), typeof d.post == "function" && m.push(d.post(o, s, i)));
|
|
96
|
+
}), m.length)
|
|
97
|
+
return m;
|
|
98
|
+
switch (o.nodeType) {
|
|
99
|
+
case 1:
|
|
100
|
+
return b.createElement(k(o.nodeName), O(o, s), S(o.childNodes, i, e));
|
|
101
|
+
case 3: {
|
|
102
|
+
var f = ((t = o.nodeValue) === null || t === void 0 ? void 0 : t.toString()) || "";
|
|
103
|
+
if (/^\s+$/.test(f) && !/[\u00A0\u202F]/.test(f))
|
|
104
|
+
return null;
|
|
105
|
+
if (!o.parentNode)
|
|
106
|
+
return f;
|
|
107
|
+
var N = o.parentNode.nodeName.toLowerCase();
|
|
108
|
+
return w.includes(N) ? (/\S/.test(f), null) : f;
|
|
109
|
+
}
|
|
110
|
+
case 8:
|
|
111
|
+
return null;
|
|
112
|
+
/* istanbul ignore next */
|
|
113
|
+
default:
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function x(r, e) {
|
|
118
|
+
if (e === void 0 && (e = {}), !r || typeof r != "string")
|
|
119
|
+
return null;
|
|
120
|
+
var t = e.nodeOnly, n = t === void 0 ? !1 : t, a = e.selector, c = a === void 0 ? "body > *" : a, l = e.type, u = l === void 0 ? "text/html" : l;
|
|
121
|
+
try {
|
|
122
|
+
var i = new DOMParser(), y = i.parseFromString(r, u), o = y.querySelector(c);
|
|
123
|
+
if (!(o instanceof Node))
|
|
124
|
+
throw new TypeError("Error parsing input");
|
|
125
|
+
return n ? o : p(o, e);
|
|
126
|
+
} catch {
|
|
127
|
+
process.env.NODE_ENV;
|
|
128
|
+
}
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
function F(r, e) {
|
|
132
|
+
return e === void 0 && (e = {}), typeof r == "string" ? x(r, e) : r instanceof Node ? p(r, e) : null;
|
|
133
|
+
}
|
|
300
134
|
export {
|
|
301
|
-
|
|
302
|
-
|
|
135
|
+
p as convertFromNode,
|
|
136
|
+
x as convertFromString,
|
|
137
|
+
F as default
|
|
303
138
|
};
|