@hortiview/shared-components 0.0.11528 → 0.0.11587
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/README.md +17 -0
- package/dist/{BigLoadingSpinner-D7H28pr5.js → BigLoadingSpinner-iegTbDcD.js} +6 -6
- package/dist/GenericCard-6J558OgP.js +350 -0
- package/dist/{ListAreaService-YS_UUPh5.js → ListAreaService-DOwtdRa4.js} +18 -16
- package/dist/_MapCache-B75yWNNd.js +376 -0
- package/dist/_baseIsEqual-D0Dsajdb.js +317 -0
- package/dist/_getTag-BCf9b56Z.js +81 -0
- package/dist/animationframe-EMBh6XeO.js +54 -0
- package/dist/component-DsB0poTj.js +571 -0
- package/dist/component-neHBNHRu.js +114 -0
- package/dist/components/AlertBanner/AlertBanner.js +16 -15
- package/dist/components/BaseView/BaseView.js +5 -5
- package/dist/components/BasicHeading/BasicHeading.js +25 -24
- package/dist/components/BasicHeading/BasicHeading.test.js +9 -9
- package/dist/components/BlockView/BlockView.js +5 -5
- package/dist/components/ChipCard/ChipCard.js +1765 -14
- package/dist/components/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +28 -27
- package/dist/components/DeleteModal/DeleteModal.js +37 -34
- package/dist/components/Disclaimer/Disclaimer.js +11 -9
- package/dist/components/EmptyView/EmptyView.js +258 -19
- package/dist/components/Filter/Filter.js +58 -54
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +13 -11
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +5974 -6387
- package/dist/components/FormComponents/FormNumber/CustomTextField.d.ts +1 -1
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +5 -5
- package/dist/components/FormComponents/FormNumber/FormNumber.d.ts +1 -1
- package/dist/components/FormComponents/FormNumber/FormNumber.js +1 -1
- package/dist/components/FormComponents/FormRadio/FormRadio.js +4 -4
- package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +3 -3
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +6 -5
- package/dist/components/FormComponents/FormSlider/FormSlider.js +1155 -27
- package/dist/components/FormComponents/FormText/FormText.d.ts +1 -1
- package/dist/components/FormComponents/FormText/FormText.js +33 -32
- package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +1 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.js +17 -15
- package/dist/components/GenericTable/GenericTable.js +10486 -74
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -3
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +10 -8
- package/dist/components/HashTabView/HashTabView.js +1805 -72
- package/dist/components/HeaderFilter/HeaderFilter.d.ts +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.js +4 -4
- package/dist/components/HealthCheckFailed/HealthCheckFailed.js +20 -17
- package/dist/components/Iconify/Iconify.d.ts +1 -2
- package/dist/components/Iconify/Iconify.js +42 -42
- package/dist/components/InfoGroup/InfoGroup.js +30 -28
- package/dist/components/ListArea/ListArea.js +29 -27
- package/dist/components/ListArea/ListArea.test.js +2 -2
- package/dist/components/ListArea/ListAreaService.js +7 -5
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +506 -37
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.js +926 -9
- package/dist/components/ModulePadding/ModulePadding.d.ts +7 -0
- package/dist/components/ModulePadding/ModulePadding.js +28 -0
- package/dist/components/ModulePadding/ModulePadding.test.d.ts +1 -0
- package/dist/components/ModulePadding/ModulePadding.test.js +22 -0
- package/dist/components/OverflowTooltip/OverflowTooltip.js +6 -6
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.js +7 -6
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +13 -13
- package/dist/floating-ui.dom-CeD8zknG.js +978 -0
- package/dist/get-7ACccM2X.js +114 -0
- package/dist/{get-BiqanC9_.js → get-DFv1gXfq.js} +1 -1
- package/dist/hooks/useHelperText.js +1 -1
- package/dist/identity-DLWZln-X.js +1763 -0
- package/dist/index.es-0lQcz8m1.js +444 -0
- package/dist/index.es-25EARqhH.js +2027 -0
- package/dist/index.es-3043KTnb.js +1066 -0
- package/dist/index.es-41ztjcFT.js +724 -0
- package/dist/index.es-6TJ1S8Jr.js +954 -0
- package/dist/index.es-8GOVkuo-.js +374 -0
- package/dist/index.es-B-_jXDuz.js +216 -0
- package/dist/index.es-BWgXLqXn.js +102 -0
- package/dist/index.es-BtjV0oNv.js +360 -0
- package/dist/index.es-BvrQnJ3j.js +509 -0
- package/dist/index.es-CF_xy2ns.js +674 -0
- package/dist/index.es-CL_Heu1n.js +54 -0
- package/dist/index.es-CiqbARoC.js +306 -0
- package/dist/index.es-D-CKRzIB.js +63 -0
- package/dist/index.es-D6N-XWHe.js +56 -0
- package/dist/index.es-DKDgy7Kt.js +45 -0
- package/dist/index.es-DntoATwO.js +159 -0
- package/dist/index.es-UHKFl8Da.js +7075 -0
- package/dist/index.es-d5xhUpJZ.js +3242 -0
- package/dist/index.es-da0cf7oE.js +569 -0
- package/dist/index.es-h2lMdt7G.js +107 -0
- package/dist/index.es-zr101OF5.js +4853 -0
- package/dist/{isArray-2zMxXFEr.js → isArray-DN9s620O.js} +3 -3
- package/dist/{isArray-C_5XvIlE.js → isArray-Dub1wGJM.js} +1 -1
- package/dist/isEmpty-B4GG2s-V.js +31 -0
- package/dist/isPlainObject-C273y67K.js +40 -0
- package/dist/isString-BW9UHONv.js +21 -0
- package/dist/keyboard-Bpt0aBqQ.js +107 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +57 -55
- package/dist/orderBy-Bd48bw88.js +316 -0
- package/dist/react-tooltip.min-DSY6KDqS.js +431 -0
- package/dist/services/UtilService.js +2 -2
- package/dist/toString-CrgB_7Pe.js +54 -0
- package/dist/tslib.es6-BDCynO9F.js +162 -0
- package/dist/types/GenericTable.d.ts +1 -1
- package/dist/uniqueId-NU3-C36A.js +18 -0
- package/dist/util-DA21pZXj.js +78 -0
- package/package.json +1 -1
- package/dist/GenericCard-jlt8ZsHi.js +0 -80
- package/dist/_Map-Dtlps7IZ.js +0 -113
- package/dist/_overArg-_0pUmCsX.js +0 -14
- package/dist/get-P-5PYZOE.js +0 -426
- package/dist/isEmpty-BimaZd5G.js +0 -225
- package/dist/isString-BOHPtrlm.js +0 -44
- package/dist/orderBy-BVQIswlJ.js +0 -765
- package/dist/react-tooltip.min-Czs4RGD1.js +0 -1400
|
@@ -1,58 +1,527 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as y, jsxs as B } from "react/jsx-runtime";
|
|
2
|
+
import { _ as M, c as P, P as c } from "../../../identity-DLWZln-X.js";
|
|
3
|
+
import t, { forwardRef as z, useRef as W, useImperativeHandle as F, useEffect as k, useCallback as $, useState as j, useMemo as H } from "react";
|
|
4
|
+
import { h as U, d as V } from "../../../index.es-da0cf7oE.js";
|
|
5
|
+
import { b as R, c as I } from "../../../tslib.es6-BDCynO9F.js";
|
|
6
|
+
import { M as G, a as K } from "../../../component-neHBNHRu.js";
|
|
7
|
+
import { G as q } from "../../../index.es-DntoATwO.js";
|
|
8
|
+
import { P as J } from "../../../index.es-D-CKRzIB.js";
|
|
9
|
+
import { b as Q } from "../../../index.es-CF_xy2ns.js";
|
|
10
|
+
import { B as X } from "../../../BigLoadingSpinner-iegTbDcD.js";
|
|
11
|
+
import '../../../assets/LoadingSpinner.css';/**
|
|
12
|
+
* @license
|
|
13
|
+
* Copyright 2020 Google Inc.
|
|
14
|
+
*
|
|
15
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
16
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
17
|
+
* in the Software without restriction, including without limitation the rights
|
|
18
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
19
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
20
|
+
* furnished to do so, subject to the following conditions:
|
|
21
|
+
*
|
|
22
|
+
* The above copyright notice and this permission notice shall be included in
|
|
23
|
+
* all copies or substantial portions of the Software.
|
|
24
|
+
*
|
|
25
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
26
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
28
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
29
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
30
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
31
|
+
* THE SOFTWARE.
|
|
32
|
+
*/
|
|
33
|
+
var m = {
|
|
34
|
+
INDETERMINATE_CLASS: "mdc-circular-progress--indeterminate",
|
|
35
|
+
CLOSED_CLASS: "mdc-circular-progress--closed"
|
|
36
|
+
}, l = {
|
|
37
|
+
ARIA_HIDDEN: "aria-hidden",
|
|
38
|
+
ARIA_VALUENOW: "aria-valuenow",
|
|
39
|
+
DETERMINATE_CIRCLE_SELECTOR: ".mdc-circular-progress__determinate-circle",
|
|
40
|
+
RADIUS: "r",
|
|
41
|
+
STROKE_DASHOFFSET: "stroke-dashoffset"
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* @license
|
|
45
|
+
* Copyright 2020 Google Inc.
|
|
46
|
+
*
|
|
47
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
48
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
49
|
+
* in the Software without restriction, including without limitation the rights
|
|
50
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
51
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
52
|
+
* furnished to do so, subject to the following conditions:
|
|
53
|
+
*
|
|
54
|
+
* The above copyright notice and this permission notice shall be included in
|
|
55
|
+
* all copies or substantial portions of the Software.
|
|
56
|
+
*
|
|
57
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
58
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
59
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
60
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
61
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
62
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
63
|
+
* THE SOFTWARE.
|
|
64
|
+
*/
|
|
65
|
+
var L = (
|
|
66
|
+
/** @class */
|
|
67
|
+
function(a) {
|
|
68
|
+
R(e, a);
|
|
69
|
+
function e(r) {
|
|
70
|
+
return a.call(this, I(I({}, e.defaultAdapter), r)) || this;
|
|
71
|
+
}
|
|
72
|
+
return Object.defineProperty(e, "cssClasses", {
|
|
73
|
+
get: function() {
|
|
74
|
+
return m;
|
|
75
|
+
},
|
|
76
|
+
enumerable: !1,
|
|
77
|
+
configurable: !0
|
|
78
|
+
}), Object.defineProperty(e, "strings", {
|
|
79
|
+
get: function() {
|
|
80
|
+
return l;
|
|
81
|
+
},
|
|
82
|
+
enumerable: !1,
|
|
83
|
+
configurable: !0
|
|
84
|
+
}), Object.defineProperty(e, "defaultAdapter", {
|
|
85
|
+
get: function() {
|
|
86
|
+
return {
|
|
87
|
+
addClass: function() {
|
|
88
|
+
},
|
|
89
|
+
getDeterminateCircleAttribute: function() {
|
|
90
|
+
return null;
|
|
91
|
+
},
|
|
92
|
+
hasClass: function() {
|
|
93
|
+
return !1;
|
|
94
|
+
},
|
|
95
|
+
removeClass: function() {
|
|
96
|
+
},
|
|
97
|
+
removeAttribute: function() {
|
|
98
|
+
},
|
|
99
|
+
setAttribute: function() {
|
|
100
|
+
},
|
|
101
|
+
setDeterminateCircleAttribute: function() {
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
enumerable: !1,
|
|
106
|
+
configurable: !0
|
|
107
|
+
}), e.prototype.init = function() {
|
|
108
|
+
this.closed = this.adapter.hasClass(m.CLOSED_CLASS), this.determinate = !this.adapter.hasClass(m.INDETERMINATE_CLASS), this.progress = 0, this.determinate && this.adapter.setAttribute(l.ARIA_VALUENOW, this.progress.toString()), this.radius = Number(this.adapter.getDeterminateCircleAttribute(l.RADIUS));
|
|
109
|
+
}, e.prototype.setDeterminate = function(r) {
|
|
110
|
+
this.determinate = r, this.determinate ? (this.adapter.removeClass(m.INDETERMINATE_CLASS), this.setProgress(this.progress)) : (this.adapter.addClass(m.INDETERMINATE_CLASS), this.adapter.removeAttribute(l.ARIA_VALUENOW));
|
|
111
|
+
}, e.prototype.isDeterminate = function() {
|
|
112
|
+
return this.determinate;
|
|
113
|
+
}, e.prototype.setProgress = function(r) {
|
|
114
|
+
if (this.progress = r, this.determinate) {
|
|
115
|
+
var d = (1 - this.progress) * (2 * Math.PI * this.radius);
|
|
116
|
+
this.adapter.setDeterminateCircleAttribute(l.STROKE_DASHOFFSET, "" + d), this.adapter.setAttribute(l.ARIA_VALUENOW, this.progress.toString());
|
|
117
|
+
}
|
|
118
|
+
}, e.prototype.getProgress = function() {
|
|
119
|
+
return this.progress;
|
|
120
|
+
}, e.prototype.open = function() {
|
|
121
|
+
this.closed = !1, this.adapter.removeClass(m.CLOSED_CLASS), this.adapter.removeAttribute(l.ARIA_HIDDEN);
|
|
122
|
+
}, e.prototype.close = function() {
|
|
123
|
+
this.closed = !0, this.adapter.addClass(m.CLOSED_CLASS), this.adapter.setAttribute(l.ARIA_HIDDEN, "true");
|
|
124
|
+
}, e.prototype.isClosed = function() {
|
|
125
|
+
return this.closed;
|
|
126
|
+
}, e;
|
|
127
|
+
}(G)
|
|
128
|
+
);
|
|
129
|
+
/**
|
|
130
|
+
* @license
|
|
131
|
+
* Copyright 2020 Google Inc.
|
|
132
|
+
*
|
|
133
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
134
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
135
|
+
* in the Software without restriction, including without limitation the rights
|
|
136
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
137
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
138
|
+
* furnished to do so, subject to the following conditions:
|
|
139
|
+
*
|
|
140
|
+
* The above copyright notice and this permission notice shall be included in
|
|
141
|
+
* all copies or substantial portions of the Software.
|
|
142
|
+
*
|
|
143
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
144
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
145
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
146
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
147
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
148
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
149
|
+
* THE SOFTWARE.
|
|
150
|
+
*/
|
|
151
|
+
var Y = (
|
|
152
|
+
/** @class */
|
|
153
|
+
function(a) {
|
|
154
|
+
R(e, a);
|
|
155
|
+
function e() {
|
|
156
|
+
return a !== null && a.apply(this, arguments) || this;
|
|
157
|
+
}
|
|
158
|
+
return e.prototype.initialize = function() {
|
|
159
|
+
this.determinateCircle_ = this.root.querySelector(L.strings.DETERMINATE_CIRCLE_SELECTOR);
|
|
160
|
+
}, e.attachTo = function(r) {
|
|
161
|
+
return new e(r);
|
|
162
|
+
}, Object.defineProperty(e.prototype, "determinate", {
|
|
163
|
+
/**
|
|
164
|
+
* Sets whether the progress indicator is in determinate mode.
|
|
165
|
+
* @param isDeterminate Whether the indicator should be determinate.
|
|
166
|
+
*/
|
|
167
|
+
set: function(r) {
|
|
168
|
+
this.foundation.setDeterminate(r);
|
|
169
|
+
},
|
|
170
|
+
enumerable: !1,
|
|
171
|
+
configurable: !0
|
|
172
|
+
}), Object.defineProperty(e.prototype, "progress", {
|
|
173
|
+
/**
|
|
174
|
+
* Sets the current progress value. In indeterminate mode, this has no
|
|
175
|
+
* visual effect but will be reflected if the indicator is switched to
|
|
176
|
+
* determinate mode.
|
|
177
|
+
* @param value The current progress value, which must be between 0 and 1.
|
|
178
|
+
*/
|
|
179
|
+
set: function(r) {
|
|
180
|
+
this.foundation.setProgress(r);
|
|
181
|
+
},
|
|
182
|
+
enumerable: !1,
|
|
183
|
+
configurable: !0
|
|
184
|
+
}), Object.defineProperty(e.prototype, "isClosed", {
|
|
185
|
+
/**
|
|
186
|
+
* Whether the progress indicator is hidden.
|
|
187
|
+
*/
|
|
188
|
+
get: function() {
|
|
189
|
+
return this.foundation.isClosed();
|
|
190
|
+
},
|
|
191
|
+
enumerable: !1,
|
|
192
|
+
configurable: !0
|
|
193
|
+
}), e.prototype.open = function() {
|
|
194
|
+
this.foundation.open();
|
|
195
|
+
}, e.prototype.close = function() {
|
|
196
|
+
this.foundation.close();
|
|
197
|
+
}, e.prototype.getDefaultFoundation = function() {
|
|
198
|
+
var r = this, d = {
|
|
199
|
+
addClass: function(s) {
|
|
200
|
+
return r.root.classList.add(s);
|
|
201
|
+
},
|
|
202
|
+
getDeterminateCircleAttribute: function(s) {
|
|
203
|
+
return r.determinateCircle_.getAttribute(s);
|
|
204
|
+
},
|
|
205
|
+
hasClass: function(s) {
|
|
206
|
+
return r.root.classList.contains(s);
|
|
207
|
+
},
|
|
208
|
+
removeClass: function(s) {
|
|
209
|
+
return r.root.classList.remove(s);
|
|
210
|
+
},
|
|
211
|
+
removeAttribute: function(s) {
|
|
212
|
+
return r.root.removeAttribute(s);
|
|
213
|
+
},
|
|
214
|
+
setAttribute: function(s, i) {
|
|
215
|
+
return r.root.setAttribute(s, i);
|
|
216
|
+
},
|
|
217
|
+
setDeterminateCircleAttribute: function(s, i) {
|
|
218
|
+
return r.determinateCircle_.setAttribute(s, i);
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
return new L(d);
|
|
222
|
+
}, e;
|
|
223
|
+
}(K)
|
|
224
|
+
);
|
|
225
|
+
const Z = {
|
|
226
|
+
/**
|
|
227
|
+
* Accessibility label.
|
|
228
|
+
*
|
|
229
|
+
* Defaults to **'Progress Indicator'**.
|
|
230
|
+
*/
|
|
231
|
+
ariaLabel: c.string,
|
|
232
|
+
/**
|
|
233
|
+
* The css class name to be passed through to the component markup.
|
|
234
|
+
*
|
|
235
|
+
* Defaults to **undefined**.
|
|
236
|
+
*/
|
|
237
|
+
className: c.string,
|
|
238
|
+
/**
|
|
239
|
+
* The size of the progress indicator.
|
|
240
|
+
*
|
|
241
|
+
* Defaults to **'lg'**.
|
|
242
|
+
*/
|
|
243
|
+
indicatorSize: c.oneOf(["sm", "md", "lg"]),
|
|
244
|
+
/**
|
|
245
|
+
* Sets the visibility of the progress indicator.
|
|
246
|
+
*
|
|
247
|
+
* Defaults to **true**.
|
|
248
|
+
*/
|
|
249
|
+
open: c.bool,
|
|
250
|
+
/**
|
|
251
|
+
* The current progress of a determinate progress indicator. Must be between 0 and 1.
|
|
252
|
+
*
|
|
253
|
+
* Defaults to **0**.
|
|
254
|
+
*/
|
|
255
|
+
progress: c.number,
|
|
256
|
+
/**
|
|
257
|
+
* @deprecated _Renamed, see indicatorSize instead._
|
|
258
|
+
*
|
|
259
|
+
* The size of the progress indicator.
|
|
260
|
+
*
|
|
261
|
+
* Defaults to **undefined**.
|
|
262
|
+
*/
|
|
263
|
+
size: V(c.oneOf(["sm", "md", "lg"]), "CircularProgress", "Renamed, see indicatorSize instead."),
|
|
264
|
+
/**
|
|
265
|
+
* Color of the indicator stroke with 'primary' or 'secondary' theme color.
|
|
266
|
+
*
|
|
267
|
+
* Defaults to **'primary'**.
|
|
268
|
+
*/
|
|
269
|
+
themeColor: c.oneOf(["primary", "secondary", "primary-variant", "secondary-variant", "two-color", "two-color-variant"]),
|
|
270
|
+
/**
|
|
271
|
+
* An indeterminate CircularProgress indicator will continue spinning until closed. A determinate CircularProgress indicator will display the current progress.
|
|
272
|
+
*
|
|
273
|
+
* Defaults to **'indeterminate'**.
|
|
274
|
+
*/
|
|
275
|
+
variant: c.oneOf(["determinate", "indeterminate"])
|
|
276
|
+
}, ee = {
|
|
277
|
+
ariaLabel: "Progress Indicator",
|
|
278
|
+
className: void 0,
|
|
279
|
+
indicatorSize: "lg",
|
|
280
|
+
open: !0,
|
|
281
|
+
progress: 0,
|
|
282
|
+
size: void 0,
|
|
283
|
+
themeColor: "primary",
|
|
284
|
+
variant: "indeterminate"
|
|
285
|
+
}, A = /* @__PURE__ */ z((a, e) => {
|
|
286
|
+
const {
|
|
287
|
+
ariaLabel: r,
|
|
288
|
+
className: d,
|
|
289
|
+
open: s,
|
|
290
|
+
progress: i,
|
|
291
|
+
size: D,
|
|
292
|
+
indicatorSize: v,
|
|
293
|
+
themeColor: u,
|
|
294
|
+
variant: p,
|
|
295
|
+
...E
|
|
296
|
+
} = a, g = W(), h = W();
|
|
297
|
+
F(e, () => g.current, []), k(() => (h.current = Y.attachTo(g.current), () => {
|
|
298
|
+
h.current.destroy();
|
|
299
|
+
}), []), k(() => {
|
|
300
|
+
(p === "determinate" && i < 0 || i > 1) && U("CircularProgress: `progress` must be between 0 and 1."), h.current.determinate = p === "determinate", h.current.progress = i;
|
|
301
|
+
}, [i, p]);
|
|
302
|
+
const T = () => {
|
|
303
|
+
switch (v) {
|
|
304
|
+
case "xs":
|
|
305
|
+
return {
|
|
306
|
+
heightWidth: "16px",
|
|
307
|
+
viewBox: "24",
|
|
308
|
+
cxCy: "12",
|
|
309
|
+
r: "8.75",
|
|
310
|
+
strokeWidth: "2.5",
|
|
311
|
+
strokeWidth80: "2",
|
|
312
|
+
strokeDashArray: "54.978",
|
|
313
|
+
strokeDashoffset: "54",
|
|
314
|
+
halfStrokeDashoffset: "27.489"
|
|
315
|
+
};
|
|
316
|
+
case "sm":
|
|
317
|
+
return {
|
|
318
|
+
heightWidth: "24px",
|
|
319
|
+
viewBox: "24",
|
|
320
|
+
cxCy: "12",
|
|
321
|
+
r: "8.75",
|
|
322
|
+
strokeWidth: "2.5",
|
|
323
|
+
strokeWidth80: "2",
|
|
324
|
+
strokeDashArray: "54.978",
|
|
325
|
+
strokeDashoffset: "54.978",
|
|
326
|
+
halfStrokeDashoffset: "27.489"
|
|
327
|
+
};
|
|
328
|
+
case "md":
|
|
329
|
+
return {
|
|
330
|
+
heightWidth: "36px",
|
|
331
|
+
viewBox: "32",
|
|
332
|
+
cxCy: "16",
|
|
333
|
+
r: "12.5",
|
|
334
|
+
strokeWidth: "3",
|
|
335
|
+
strokeWidth80: "2.4",
|
|
336
|
+
strokeDashArray: "78.54",
|
|
337
|
+
strokeDashoffset: "78.54",
|
|
338
|
+
halfStrokeDashoffset: "39.27"
|
|
339
|
+
};
|
|
340
|
+
case "lg":
|
|
341
|
+
return {
|
|
342
|
+
heightWidth: "48px",
|
|
343
|
+
viewBox: "48",
|
|
344
|
+
cxCy: "24",
|
|
345
|
+
r: "18",
|
|
346
|
+
strokeWidth: "4",
|
|
347
|
+
strokeWidth80: "3.2",
|
|
348
|
+
strokeDashArray: "113.097",
|
|
349
|
+
strokeDashoffset: "113.097",
|
|
350
|
+
halfStrokeDashoffset: "56.549"
|
|
351
|
+
};
|
|
352
|
+
case "xl":
|
|
353
|
+
return {
|
|
354
|
+
heightWidth: "60px",
|
|
355
|
+
viewBox: "48",
|
|
356
|
+
cxCy: "24",
|
|
357
|
+
r: "18",
|
|
358
|
+
strokeWidth: "3",
|
|
359
|
+
strokeWidth80: "2.8",
|
|
360
|
+
strokeDashArray: "113.097",
|
|
361
|
+
strokeDashoffset: "113.097",
|
|
362
|
+
halfStrokeDashoffset: "56.549"
|
|
363
|
+
};
|
|
364
|
+
default:
|
|
365
|
+
return {
|
|
366
|
+
heightWidth: "48px",
|
|
367
|
+
viewBox: "48",
|
|
368
|
+
cxCy: "24",
|
|
369
|
+
r: "18",
|
|
370
|
+
strokeWidth: "4",
|
|
371
|
+
strokeWidth80: "3.2",
|
|
372
|
+
strokeDashArray: "113.097",
|
|
373
|
+
strokeDashoffset: "113.097",
|
|
374
|
+
halfStrokeDashoffset: "56.549"
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
}, {
|
|
378
|
+
heightWidth: x,
|
|
379
|
+
viewBox: n,
|
|
380
|
+
cxCy: o,
|
|
381
|
+
r: f,
|
|
382
|
+
strokeWidth: C,
|
|
383
|
+
strokeWidth80: w,
|
|
384
|
+
strokeDashArray: _,
|
|
385
|
+
strokeDashoffset: O,
|
|
386
|
+
halfStrokeDashoffset: S
|
|
387
|
+
} = T(), b = $(() => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
388
|
+
className: "mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left"
|
|
389
|
+
}, /* @__PURE__ */ t.createElement("svg", {
|
|
390
|
+
className: "mdc-circular-progress__indeterminate-circle-graphic",
|
|
391
|
+
viewBox: `0 0 ${n} ${n}`,
|
|
392
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
393
|
+
}, /* @__PURE__ */ t.createElement("circle", {
|
|
394
|
+
cx: o,
|
|
395
|
+
cy: o,
|
|
396
|
+
r: f,
|
|
397
|
+
strokeDasharray: _,
|
|
398
|
+
strokeDashoffset: S,
|
|
399
|
+
strokeWidth: C
|
|
400
|
+
}))), /* @__PURE__ */ t.createElement("div", {
|
|
401
|
+
className: "mdc-circular-progress__gap-patch"
|
|
402
|
+
}, /* @__PURE__ */ t.createElement("svg", {
|
|
403
|
+
className: "mdc-circular-progress__indeterminate-circle-graphic",
|
|
404
|
+
viewBox: `0 0 ${n} ${n}`,
|
|
405
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
406
|
+
}, /* @__PURE__ */ t.createElement("circle", {
|
|
407
|
+
cx: o,
|
|
408
|
+
cy: o,
|
|
409
|
+
r: f,
|
|
410
|
+
strokeDasharray: _,
|
|
411
|
+
strokeDashoffset: S,
|
|
412
|
+
strokeWidth: w
|
|
413
|
+
}))), /* @__PURE__ */ t.createElement("div", {
|
|
414
|
+
className: "mdc-circular-progress__circle-clipper mdc-circular-progress__circle-right"
|
|
415
|
+
}, /* @__PURE__ */ t.createElement("svg", {
|
|
416
|
+
className: "mdc-circular-progress__indeterminate-circle-graphic",
|
|
417
|
+
viewBox: `0 0 ${n} ${n}`,
|
|
418
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
419
|
+
}, /* @__PURE__ */ t.createElement("circle", {
|
|
420
|
+
cx: o,
|
|
421
|
+
cy: o,
|
|
422
|
+
r: f,
|
|
423
|
+
strokeDasharray: _,
|
|
424
|
+
strokeDashoffset: S,
|
|
425
|
+
strokeWidth: C
|
|
426
|
+
})))), [o, S, f, _, C, w, n]), N = u === "two-color" || u === "two-color-variant";
|
|
427
|
+
return /* @__PURE__ */ t.createElement("div", M({
|
|
428
|
+
ref: g,
|
|
429
|
+
className: P("lmnt", "mdc-circular-progress", p === "indeterminate" && "mdc-circular-progress--indeterminate", !s && "mdc-circular-progress--closed", u && `lmnt-circular-progress--${u}`, d),
|
|
430
|
+
style: {
|
|
431
|
+
width: x,
|
|
432
|
+
height: x
|
|
433
|
+
},
|
|
434
|
+
role: "progressbar",
|
|
435
|
+
"aria-label": r,
|
|
436
|
+
"aria-valuemin": "0",
|
|
437
|
+
"aria-valuemax": "1",
|
|
438
|
+
"aria-valuenow": i
|
|
439
|
+
}, E), /* @__PURE__ */ t.createElement("div", {
|
|
440
|
+
className: "mdc-circular-progress__determinate-container"
|
|
441
|
+
}, /* @__PURE__ */ t.createElement("svg", {
|
|
442
|
+
className: "mdc-circular-progress__determinate-circle-graphic",
|
|
443
|
+
viewBox: `0 0 ${n} ${n}`,
|
|
444
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
445
|
+
}, /* @__PURE__ */ t.createElement("circle", {
|
|
446
|
+
className: "mdc-circular-progress__determinate-track",
|
|
447
|
+
cx: o,
|
|
448
|
+
cy: o,
|
|
449
|
+
r: f,
|
|
450
|
+
strokeWidth: C
|
|
451
|
+
}), /* @__PURE__ */ t.createElement("circle", {
|
|
452
|
+
className: "mdc-circular-progress__determinate-circle",
|
|
453
|
+
cx: o,
|
|
454
|
+
cy: o,
|
|
455
|
+
r: f,
|
|
456
|
+
strokeDasharray: _,
|
|
457
|
+
strokeDashoffset: O,
|
|
458
|
+
strokeWidth: C
|
|
459
|
+
}))), /* @__PURE__ */ t.createElement("div", {
|
|
460
|
+
className: "mdc-circular-progress__indeterminate-container"
|
|
461
|
+
}, /* @__PURE__ */ t.createElement("div", {
|
|
462
|
+
className: P("mdc-circular-progress__spinner-layer", N && "mdc-circular-progress__color-1")
|
|
463
|
+
}, b()), N && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
464
|
+
className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-2"
|
|
465
|
+
}, b()), /* @__PURE__ */ t.createElement("div", {
|
|
466
|
+
className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-3"
|
|
467
|
+
}, b()), /* @__PURE__ */ t.createElement("div", {
|
|
468
|
+
className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-4"
|
|
469
|
+
}, b()))));
|
|
470
|
+
});
|
|
471
|
+
A.displayName = "CircularProgress";
|
|
472
|
+
A.propTypes = Z;
|
|
473
|
+
A.defaultProps = ee;
|
|
474
|
+
const re = "_loadingSpinnerContainer_1f3ss_1", te = {
|
|
475
|
+
loadingSpinnerContainer: re
|
|
476
|
+
}, pe = ({
|
|
477
|
+
size: a,
|
|
478
|
+
center: e = !1,
|
|
479
|
+
text: r,
|
|
480
|
+
textPosition: d = "bottom",
|
|
481
|
+
color: s = "primary",
|
|
482
|
+
spinnerOnly: i = !1,
|
|
14
483
|
//Due to we don't have (and want) to use a translation logic in this component, we are using a hardcoded message
|
|
15
|
-
impatienceMessage:
|
|
16
|
-
impatienceTimeout:
|
|
484
|
+
impatienceMessage: D = "This is taking longer than expected. Please be patient.",
|
|
485
|
+
impatienceTimeout: v = 10
|
|
17
486
|
}) => {
|
|
18
|
-
const [
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
p((
|
|
487
|
+
const [u, p] = j(0);
|
|
488
|
+
k(() => {
|
|
489
|
+
const g = setInterval(() => {
|
|
490
|
+
p((h) => h + 1);
|
|
22
491
|
}, 1e3);
|
|
23
|
-
return () => clearInterval(
|
|
492
|
+
return () => clearInterval(g);
|
|
24
493
|
}, []);
|
|
25
|
-
const
|
|
26
|
-
return
|
|
27
|
-
|
|
494
|
+
const E = H(() => D && u > v ? D : r, [D, v, r, u]);
|
|
495
|
+
return a === "big" ? /* @__PURE__ */ y(X, { text: E }) : i ? /* @__PURE__ */ y(
|
|
496
|
+
A,
|
|
28
497
|
{
|
|
29
498
|
"data-testid": "loading-spinner",
|
|
30
|
-
themeColor:
|
|
31
|
-
indicatorSize:
|
|
499
|
+
themeColor: s,
|
|
500
|
+
indicatorSize: a ?? "md"
|
|
32
501
|
}
|
|
33
|
-
) : /* @__PURE__ */
|
|
34
|
-
|
|
502
|
+
) : /* @__PURE__ */ y(
|
|
503
|
+
J,
|
|
35
504
|
{
|
|
36
505
|
variant: "standard",
|
|
37
506
|
style: { textAlign: "center" },
|
|
38
|
-
className:
|
|
39
|
-
children: /* @__PURE__ */
|
|
40
|
-
|
|
507
|
+
className: e ? te.loadingSpinnerContainer : "",
|
|
508
|
+
children: /* @__PURE__ */ B(
|
|
509
|
+
q,
|
|
41
510
|
{
|
|
42
|
-
direction:
|
|
511
|
+
direction: d === "right" ? "horizontal" : "vertical",
|
|
43
512
|
gap: "dense",
|
|
44
513
|
primaryAlign: "center",
|
|
45
514
|
secondaryAlign: "center",
|
|
46
515
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
516
|
+
/* @__PURE__ */ y(
|
|
517
|
+
A,
|
|
49
518
|
{
|
|
50
519
|
"data-testid": "loading-spinner",
|
|
51
|
-
themeColor:
|
|
52
|
-
indicatorSize:
|
|
520
|
+
themeColor: s,
|
|
521
|
+
indicatorSize: a ?? "lg"
|
|
53
522
|
}
|
|
54
523
|
),
|
|
55
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ y(Q, { themeColor: `text-${s}-on-background`, tag: "div", "data-testid": "loading-text", children: E })
|
|
56
525
|
]
|
|
57
526
|
}
|
|
58
527
|
)
|
|
@@ -60,5 +529,5 @@ import '../../../assets/LoadingSpinner.css';const A = "_loadingSpinnerContainer_
|
|
|
60
529
|
);
|
|
61
530
|
};
|
|
62
531
|
export {
|
|
63
|
-
|
|
532
|
+
pe as LoadingSpinner
|
|
64
533
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ModalProps } from '@element-public/react-
|
|
1
|
+
import { ModalProps } from '@element-public/react-modal';
|
|
2
2
|
|
|
3
3
|
export declare const Modal: (props: ModalProps & React.HTMLProps<HTMLElement> & React.DOMAttributes<HTMLElement>) => import("react/jsx-runtime").JSX.Element;
|