@hortiview/shared-components 2.8.6 → 2.8.7
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 +6 -0
- package/dist/{AlertBanner-DlgFtlZm.js → AlertBanner-D-NTP_6i.js} +3 -3
- package/dist/{BigLoadingSpinner-B_HFhx2F.js → BigLoadingSpinner-CCxsMWnc.js} +1 -1
- package/dist/{GenericCard-Cv8qaFLu.js → GenericCard-DOKyENNm.js} +3 -3
- package/dist/{ListAreaService-D9HRsvH0.js → ListAreaService-CI-s1Xx5.js} +5 -5
- package/dist/{OfflineView-Bw-sbsym.js → OfflineView-DHtzNLwt.js} +3 -3
- package/dist/_Map-BmafU0dj.js +113 -0
- package/dist/components/AlertBanner/AlertBanner.js +4 -4
- package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
- package/dist/components/AlertBanner/LinkBanner.js +3 -3
- package/dist/components/BaseView/BaseView.js +2 -2
- package/dist/components/BasicHeading/BasicHeading.js +2 -2
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.js +1 -1
- package/dist/components/ChipCard/ChipCard.js +499 -390
- package/dist/components/ContextMenu/ContextMenu.js +4 -4
- package/dist/components/DeleteModal/DeleteModal.js +5 -5
- package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +3 -3
- package/dist/components/EmptyView/EmptyView.js +161 -125
- package/dist/components/Filter/Filter.js +11 -11
- package/dist/components/Filter/Filter.test.js +51 -35
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +10 -10
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +3 -3
- package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +2 -2
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.js +540 -535
- package/dist/components/FormComponents/FormText/FormText.js +2 -2
- package/dist/components/FormComponents/FormToggle/FormToggle.js +4 -4
- package/dist/components/GenericTable/GenericTable.js +8246 -7153
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
- package/dist/components/HashTabView/HashTabView.js +552 -541
- package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
- package/dist/components/Iconify/Iconify.js +2 -2
- package/dist/components/InfoCard/InfoCard.js +4 -4
- package/dist/components/InfoGroup/InfoGroup.js +3 -3
- package/dist/components/ListArea/ListArea.js +16 -16
- package/dist/components/ListArea/ListArea.test.js +20 -20
- package/dist/components/ListArea/ListAreaService.js +6 -6
- 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 +164 -178
- package/dist/components/Modal/Modal.js +305 -312
- package/dist/components/ModulePadding/ModulePadding.js +8 -8
- package/dist/components/OfflineView/OfflineView.js +4 -4
- package/dist/components/OfflineView/OfflineView.test.js +1 -1
- package/dist/components/OnboardingBanner/OnboardingBanner.js +13 -13
- package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/components/StepperButton.js +1 -1
- package/dist/components/Stepper/components/StepperHeader.js +2 -2
- package/dist/components/Stepper/components/StepperIndicator.js +1 -1
- package/dist/defineProperty-CmuOyxyf.js +318 -0
- package/dist/es.string.iterator-DrqCBub-.js +581 -0
- package/dist/find-B-dm7n_F.js +88 -0
- package/dist/{get-CqneoueQ.js → get-DuK51wnj.js} +1 -1
- package/dist/get-u1nFMLdT.js +377 -0
- package/dist/hooks/useHelperText.js +1 -1
- package/dist/identity-BIZAN_pL.js +213 -0
- package/dist/includes-Bt-Stz_B.js +110 -0
- package/dist/index-Cpb-8cAN.js +2465 -0
- package/dist/index.es-0QJC9VS2.js +325 -0
- package/dist/{index.es-CyjMwj5g.js → index.es-45NOgWlB.js} +93 -101
- package/dist/index.es-B6ZgiW2s.js +3790 -0
- package/dist/{index.es-1zrFd4Te.js → index.es-BGordhUK.js} +352 -323
- package/dist/index.es-BRtk0Q33.js +42 -0
- package/dist/index.es-BXj90wb_.js +402 -0
- package/dist/index.es-Bg8hxXM8.js +912 -0
- package/dist/index.es-Bgjh6euR.js +292 -0
- package/dist/index.es-Bo1Rhtyb.js +80 -0
- package/dist/{index.es-BaX-8joZ.js → index.es-CK4oZMKs.js} +3329 -3232
- package/dist/{index.es-nQ0lMwpE.js → index.es-CKdJX75f.js} +74 -78
- package/dist/index.es-CmF6xAUJ.js +48 -0
- package/dist/{index.es-p4O33fMu.js → index.es-Cq04gn3U.js} +321 -305
- package/dist/{index.es-Cdu6tjUC.js → index.es-D1IpdMde.js} +87 -95
- package/dist/index.es-DDYCugj-.js +166 -0
- package/dist/{index.es-jFaPNuBO.js → index.es-DENZVv7_.js} +427 -444
- package/dist/{index.es-Dnrk7XL6.js → index.es-DObVvepK.js} +158 -166
- package/dist/index.es-DeF-y7fd.js +122 -0
- package/dist/{index.es-ks_RnHLh.js → index.es-Dfju71Pi.js} +27 -37
- package/dist/index.es-DqSY-ePE.js +4923 -0
- package/dist/index.es-DwzB1d7_.js +1061 -0
- package/dist/index.es-IXyb5F6n.js +457 -0
- package/dist/index.es-t7hFwQSs.js +67 -0
- package/dist/isArray-DN9s620O.js +83 -0
- package/dist/{isArray-CSaAxHlq.js → isArray-Dub1wGJM.js} +1 -1
- package/dist/{isEmpty-SkzPhavO.js → isEmpty-CxD71Jv8.js} +4 -5
- package/dist/{isString-CZsZiWgW.js → isString-BNaBRq3S.js} +2 -2
- package/dist/isTypedArray-Dw_IY7Zq.js +212 -0
- package/dist/keyboard-B-WUULl-.js +173 -0
- package/dist/main.js +2 -2
- package/dist/map-Dbvlv_6y.js +707 -0
- package/dist/omit-uTAyrUTm.js +645 -0
- package/dist/orderBy-BXxEvUw6.js +571 -0
- package/dist/parse-int-qVAoFbOL.js +75 -0
- package/dist/services/UtilService.js +7 -7
- package/dist/slicedToArray-BWk2gTCn.js +436 -0
- package/dist/{toString-BFJes2_D.js → toString-CrgB_7Pe.js} +1 -1
- package/dist/{uniqueId-DrPMzA-E.js → uniqueId-NU3-C36A.js} +1 -1
- package/package.json +3 -3
- package/dist/_baseIsEqual-Df2URKWm.js +0 -240
- package/dist/_getAllKeys-BQWmkEw5.js +0 -86
- package/dist/_getTag-BkGSRa18.js +0 -79
- package/dist/_setToString-B6E13pDg.js +0 -580
- package/dist/get-DQr2KQKm.js +0 -113
- package/dist/index-D5m--65X.js +0 -1491
- package/dist/index.es-8MVlRCi4.js +0 -1066
- package/dist/index.es-BbaCXS9-.js +0 -45
- package/dist/index.es-BikIx4uw.js +0 -3242
- package/dist/index.es-CDMu_yu0.js +0 -954
- package/dist/index.es-ChSlnpSq.js +0 -309
- package/dist/index.es-D66OkZJH.js +0 -4853
- package/dist/index.es-DFFyENnI.js +0 -63
- package/dist/index.es-DTMwaJ6B.js +0 -56
- package/dist/index.es-DgTJmbgD.js +0 -268
- package/dist/index.es-DmsyeHLO.js +0 -306
- package/dist/index.es-Dw1eih7R.js +0 -159
- package/dist/index.es-eKuwB1ll.js +0 -54
- package/dist/index.es-qxTN-Bb2.js +0 -107
- package/dist/index.es-xnSvM9b9.js +0 -444
- package/dist/isArray-DDZrq40X.js +0 -456
- package/dist/keyboard-Bpt0aBqQ.js +0 -107
- package/dist/omit-BN3qeeaj.js +0 -364
- package/dist/orderBy-D4LvP9Az.js +0 -316
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as y, jsxs as
|
|
2
|
-
import { _ as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { b as
|
|
6
|
-
import { M as
|
|
7
|
-
import { G as
|
|
8
|
-
import { P as
|
|
9
|
-
import { T as
|
|
10
|
-
import { B as
|
|
1
|
+
import { jsx as y, jsxs as Q } from "react/jsx-runtime";
|
|
2
|
+
import { _ as X, a as Y, c as $, P as u } from "../../../index-Cpb-8cAN.js";
|
|
3
|
+
import { i as Z, _ as w, d as ee } from "../../../index.es-BXj90wb_.js";
|
|
4
|
+
import t, { forwardRef as re, useRef as H, useImperativeHandle as te, useEffect as T, useCallback as se, useState as ae, useMemo as ie } from "react";
|
|
5
|
+
import { b as G, c as U } from "../../../tslib.es6-BDCynO9F.js";
|
|
6
|
+
import { M as oe, a as ne } from "../../../component-neHBNHRu.js";
|
|
7
|
+
import { G as ce } from "../../../index.es-DDYCugj-.js";
|
|
8
|
+
import { P as le } from "../../../index.es-Bo1Rhtyb.js";
|
|
9
|
+
import { T as de } from "../../../index.es-BGordhUK.js";
|
|
10
|
+
import { B as ue } from "../../../BigLoadingSpinner-CCxsMWnc.js";
|
|
11
11
|
import '../../../assets/LoadingSpinner.css';/**
|
|
12
12
|
* @license
|
|
13
13
|
* Copyright 2020 Google Inc.
|
|
@@ -30,10 +30,10 @@ import '../../../assets/LoadingSpinner.css';/**
|
|
|
30
30
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
31
31
|
* THE SOFTWARE.
|
|
32
32
|
*/
|
|
33
|
-
var
|
|
33
|
+
var p = {
|
|
34
34
|
INDETERMINATE_CLASS: "mdc-circular-progress--indeterminate",
|
|
35
35
|
CLOSED_CLASS: "mdc-circular-progress--closed"
|
|
36
|
-
},
|
|
36
|
+
}, m = {
|
|
37
37
|
ARIA_HIDDEN: "aria-hidden",
|
|
38
38
|
ARIA_VALUENOW: "aria-valuenow",
|
|
39
39
|
DETERMINATE_CIRCLE_SELECTOR: ".mdc-circular-progress__determinate-circle",
|
|
@@ -62,22 +62,22 @@ var m = {
|
|
|
62
62
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
63
63
|
* THE SOFTWARE.
|
|
64
64
|
*/
|
|
65
|
-
var
|
|
65
|
+
var V = (
|
|
66
66
|
/** @class */
|
|
67
|
-
function(
|
|
68
|
-
|
|
67
|
+
function(s) {
|
|
68
|
+
G(e, s);
|
|
69
69
|
function e(r) {
|
|
70
|
-
return
|
|
70
|
+
return s.call(this, U(U({}, e.defaultAdapter), r)) || this;
|
|
71
71
|
}
|
|
72
72
|
return Object.defineProperty(e, "cssClasses", {
|
|
73
73
|
get: function() {
|
|
74
|
-
return
|
|
74
|
+
return p;
|
|
75
75
|
},
|
|
76
76
|
enumerable: !1,
|
|
77
77
|
configurable: !0
|
|
78
78
|
}), Object.defineProperty(e, "strings", {
|
|
79
79
|
get: function() {
|
|
80
|
-
return
|
|
80
|
+
return m;
|
|
81
81
|
},
|
|
82
82
|
enumerable: !1,
|
|
83
83
|
configurable: !0
|
|
@@ -105,26 +105,26 @@ var L = (
|
|
|
105
105
|
enumerable: !1,
|
|
106
106
|
configurable: !0
|
|
107
107
|
}), e.prototype.init = function() {
|
|
108
|
-
this.closed = this.adapter.hasClass(
|
|
108
|
+
this.closed = this.adapter.hasClass(p.CLOSED_CLASS), this.determinate = !this.adapter.hasClass(p.INDETERMINATE_CLASS), this.progress = 0, this.determinate && this.adapter.setAttribute(m.ARIA_VALUENOW, this.progress.toString()), this.radius = Number(this.adapter.getDeterminateCircleAttribute(m.RADIUS));
|
|
109
109
|
}, e.prototype.setDeterminate = function(r) {
|
|
110
|
-
this.determinate = r, this.determinate ? (this.adapter.removeClass(
|
|
110
|
+
this.determinate = r, this.determinate ? (this.adapter.removeClass(p.INDETERMINATE_CLASS), this.setProgress(this.progress)) : (this.adapter.addClass(p.INDETERMINATE_CLASS), this.adapter.removeAttribute(m.ARIA_VALUENOW));
|
|
111
111
|
}, e.prototype.isDeterminate = function() {
|
|
112
112
|
return this.determinate;
|
|
113
113
|
}, e.prototype.setProgress = function(r) {
|
|
114
114
|
if (this.progress = r, this.determinate) {
|
|
115
|
-
var
|
|
116
|
-
this.adapter.setDeterminateCircleAttribute(
|
|
115
|
+
var c = (1 - this.progress) * (2 * Math.PI * this.radius);
|
|
116
|
+
this.adapter.setDeterminateCircleAttribute(m.STROKE_DASHOFFSET, "" + c), this.adapter.setAttribute(m.ARIA_VALUENOW, this.progress.toString());
|
|
117
117
|
}
|
|
118
118
|
}, e.prototype.getProgress = function() {
|
|
119
119
|
return this.progress;
|
|
120
120
|
}, e.prototype.open = function() {
|
|
121
|
-
this.closed = !1, this.adapter.removeClass(
|
|
121
|
+
this.closed = !1, this.adapter.removeClass(p.CLOSED_CLASS), this.adapter.removeAttribute(m.ARIA_HIDDEN);
|
|
122
122
|
}, e.prototype.close = function() {
|
|
123
|
-
this.closed = !0, this.adapter.addClass(
|
|
123
|
+
this.closed = !0, this.adapter.addClass(p.CLOSED_CLASS), this.adapter.setAttribute(m.ARIA_HIDDEN, "true");
|
|
124
124
|
}, e.prototype.isClosed = function() {
|
|
125
125
|
return this.closed;
|
|
126
126
|
}, e;
|
|
127
|
-
}(
|
|
127
|
+
}(oe)
|
|
128
128
|
);
|
|
129
129
|
/**
|
|
130
130
|
* @license
|
|
@@ -148,15 +148,15 @@ var L = (
|
|
|
148
148
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
149
149
|
* THE SOFTWARE.
|
|
150
150
|
*/
|
|
151
|
-
var
|
|
151
|
+
var me = (
|
|
152
152
|
/** @class */
|
|
153
|
-
function(
|
|
154
|
-
|
|
153
|
+
function(s) {
|
|
154
|
+
G(e, s);
|
|
155
155
|
function e() {
|
|
156
|
-
return
|
|
156
|
+
return s !== null && s.apply(this, arguments) || this;
|
|
157
157
|
}
|
|
158
158
|
return e.prototype.initialize = function() {
|
|
159
|
-
this.determinateCircle_ = this.root.querySelector(
|
|
159
|
+
this.determinateCircle_ = this.root.querySelector(V.strings.DETERMINATE_CIRCLE_SELECTOR);
|
|
160
160
|
}, e.attachTo = function(r) {
|
|
161
161
|
return new e(r);
|
|
162
162
|
}, Object.defineProperty(e.prototype, "determinate", {
|
|
@@ -195,64 +195,63 @@ var Y = (
|
|
|
195
195
|
}, e.prototype.close = function() {
|
|
196
196
|
this.foundation.close();
|
|
197
197
|
}, e.prototype.getDefaultFoundation = function() {
|
|
198
|
-
var r = this,
|
|
199
|
-
addClass: function(
|
|
200
|
-
return r.root.classList.add(
|
|
198
|
+
var r = this, c = {
|
|
199
|
+
addClass: function(a) {
|
|
200
|
+
return r.root.classList.add(a);
|
|
201
201
|
},
|
|
202
|
-
getDeterminateCircleAttribute: function(
|
|
203
|
-
return r.determinateCircle_.getAttribute(
|
|
202
|
+
getDeterminateCircleAttribute: function(a) {
|
|
203
|
+
return r.determinateCircle_.getAttribute(a);
|
|
204
204
|
},
|
|
205
|
-
hasClass: function(
|
|
206
|
-
return r.root.classList.contains(
|
|
205
|
+
hasClass: function(a) {
|
|
206
|
+
return r.root.classList.contains(a);
|
|
207
207
|
},
|
|
208
|
-
removeClass: function(
|
|
209
|
-
return r.root.classList.remove(
|
|
208
|
+
removeClass: function(a) {
|
|
209
|
+
return r.root.classList.remove(a);
|
|
210
210
|
},
|
|
211
|
-
removeAttribute: function(
|
|
212
|
-
return r.root.removeAttribute(
|
|
211
|
+
removeAttribute: function(a) {
|
|
212
|
+
return r.root.removeAttribute(a);
|
|
213
213
|
},
|
|
214
|
-
setAttribute: function(
|
|
215
|
-
return r.root.setAttribute(
|
|
214
|
+
setAttribute: function(a, l) {
|
|
215
|
+
return r.root.setAttribute(a, l);
|
|
216
216
|
},
|
|
217
|
-
setDeterminateCircleAttribute: function(
|
|
218
|
-
return r.determinateCircle_.setAttribute(
|
|
217
|
+
setDeterminateCircleAttribute: function(a, l) {
|
|
218
|
+
return r.determinateCircle_.setAttribute(a, l);
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
|
-
return new
|
|
221
|
+
return new V(c);
|
|
222
222
|
}, e;
|
|
223
|
-
}(
|
|
224
|
-
)
|
|
225
|
-
const Z = {
|
|
223
|
+
}(ne)
|
|
224
|
+
), pe = {
|
|
226
225
|
/**
|
|
227
226
|
* Accessibility label.
|
|
228
227
|
*
|
|
229
228
|
* Defaults to **'Progress Indicator'**.
|
|
230
229
|
*/
|
|
231
|
-
ariaLabel:
|
|
230
|
+
ariaLabel: u.string,
|
|
232
231
|
/**
|
|
233
232
|
* The css class name to be passed through to the component markup.
|
|
234
233
|
*
|
|
235
234
|
* Defaults to **undefined**.
|
|
236
235
|
*/
|
|
237
|
-
className:
|
|
236
|
+
className: u.string,
|
|
238
237
|
/**
|
|
239
238
|
* The size of the progress indicator.
|
|
240
239
|
*
|
|
241
240
|
* Defaults to **'lg'**.
|
|
242
241
|
*/
|
|
243
|
-
indicatorSize:
|
|
242
|
+
indicatorSize: u.oneOf(["sm", "md", "lg"]),
|
|
244
243
|
/**
|
|
245
244
|
* Sets the visibility of the progress indicator.
|
|
246
245
|
*
|
|
247
246
|
* Defaults to **true**.
|
|
248
247
|
*/
|
|
249
|
-
open:
|
|
248
|
+
open: u.bool,
|
|
250
249
|
/**
|
|
251
250
|
* The current progress of a determinate progress indicator. Must be between 0 and 1.
|
|
252
251
|
*
|
|
253
252
|
* Defaults to **0**.
|
|
254
253
|
*/
|
|
255
|
-
progress:
|
|
254
|
+
progress: u.number,
|
|
256
255
|
/**
|
|
257
256
|
* @deprecated _Renamed, see indicatorSize instead._
|
|
258
257
|
*
|
|
@@ -260,47 +259,42 @@ const Z = {
|
|
|
260
259
|
*
|
|
261
260
|
* Defaults to **undefined**.
|
|
262
261
|
*/
|
|
263
|
-
size:
|
|
262
|
+
size: ee(u.oneOf(["sm", "md", "lg"]), "CircularProgress", "Renamed, see indicatorSize instead."),
|
|
264
263
|
/**
|
|
265
264
|
* Color of the indicator stroke with 'primary' or 'secondary' theme color.
|
|
266
265
|
*
|
|
267
266
|
* Defaults to **'primary'**.
|
|
268
267
|
*/
|
|
269
|
-
themeColor:
|
|
268
|
+
themeColor: u.oneOf(["primary", "secondary", "primary-variant", "secondary-variant", "two-color", "two-color-variant", "on-primary", "on-secondary", "on-success", "on-danger", "on-unknown-dark", "on-unknown-light"]),
|
|
270
269
|
/**
|
|
271
270
|
* An indeterminate CircularProgress indicator will continue spinning until closed. A determinate CircularProgress indicator will display the current progress.
|
|
272
271
|
*
|
|
273
272
|
* Defaults to **'indeterminate'**.
|
|
274
273
|
*/
|
|
275
|
-
variant:
|
|
276
|
-
},
|
|
274
|
+
variant: u.oneOf(["determinate", "indeterminate"])
|
|
275
|
+
}, he = {
|
|
277
276
|
ariaLabel: "Progress Indicator",
|
|
278
277
|
className: void 0,
|
|
279
278
|
indicatorSize: "lg",
|
|
280
279
|
open: !0,
|
|
281
280
|
progress: 0,
|
|
282
|
-
size: void 0,
|
|
283
281
|
themeColor: "primary",
|
|
284
282
|
variant: "indeterminate"
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
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 R = () => {
|
|
303
|
-
switch (v) {
|
|
283
|
+
}, fe = ["ariaLabel", "className", "open", "progress", "size", "indicatorSize", "themeColor", "variant"], h = he, P = /* @__PURE__ */ re(function(s, e) {
|
|
284
|
+
var r, c = s.ariaLabel, a = c === void 0 ? h.ariaLabel : c, l = s.className, g = l === void 0 ? h.className : l, v = s.open, D = v === void 0 ? h.open : v, A = s.progress, d = A === void 0 ? h.progress : A;
|
|
285
|
+
s.size;
|
|
286
|
+
var S = s.indicatorSize, W = S === void 0 ? h.indicatorSize : S, R = s.themeColor, k = R === void 0 ? h.themeColor : R, O = s.variant, E = O === void 0 ? h.variant : O, K = X(s, fe), L = H(), b = H();
|
|
287
|
+
te(e, function() {
|
|
288
|
+
return L.current;
|
|
289
|
+
}, []), T(function() {
|
|
290
|
+
return b.current = me.attachTo(L.current), function() {
|
|
291
|
+
b.current.destroy();
|
|
292
|
+
};
|
|
293
|
+
}, []), T(function() {
|
|
294
|
+
(E === "determinate" && d < 0 || d > 1) && Z("CircularProgress: `progress` must be between 0 and 1."), b.current.determinate = E === "determinate", b.current.progress = d;
|
|
295
|
+
}, [d, E]);
|
|
296
|
+
var q = function() {
|
|
297
|
+
switch (W) {
|
|
304
298
|
case "xs":
|
|
305
299
|
return {
|
|
306
300
|
heightWidth: "16px",
|
|
@@ -374,154 +368,146 @@ const Z = {
|
|
|
374
368
|
halfStrokeDashoffset: "56.549"
|
|
375
369
|
};
|
|
376
370
|
}
|
|
377
|
-
}, {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
},
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
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),
|
|
371
|
+
}, o = q(), z = o.heightWidth, n = o.viewBox, i = o.cxCy, f = o.r, C = o.strokeWidth, B = o.strokeWidth80, _ = o.strokeDashArray, J = o.strokeDashoffset, x = o.halfStrokeDashoffset, N = se(function() {
|
|
372
|
+
var I, F, j;
|
|
373
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
374
|
+
className: "mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left"
|
|
375
|
+
}, /* @__PURE__ */ t.createElement("svg", {
|
|
376
|
+
className: "mdc-circular-progress__indeterminate-circle-graphic",
|
|
377
|
+
viewBox: w(I = "0 0 ".concat(n, " ")).call(I, n),
|
|
378
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
379
|
+
}, /* @__PURE__ */ t.createElement("circle", {
|
|
380
|
+
cx: i,
|
|
381
|
+
cy: i,
|
|
382
|
+
r: f,
|
|
383
|
+
strokeDasharray: _,
|
|
384
|
+
strokeDashoffset: x,
|
|
385
|
+
strokeWidth: C
|
|
386
|
+
}))), /* @__PURE__ */ t.createElement("div", {
|
|
387
|
+
className: "mdc-circular-progress__gap-patch"
|
|
388
|
+
}, /* @__PURE__ */ t.createElement("svg", {
|
|
389
|
+
className: "mdc-circular-progress__indeterminate-circle-graphic",
|
|
390
|
+
viewBox: w(F = "0 0 ".concat(n, " ")).call(F, n),
|
|
391
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
392
|
+
}, /* @__PURE__ */ t.createElement("circle", {
|
|
393
|
+
cx: i,
|
|
394
|
+
cy: i,
|
|
395
|
+
r: f,
|
|
396
|
+
strokeDasharray: _,
|
|
397
|
+
strokeDashoffset: x,
|
|
398
|
+
strokeWidth: B
|
|
399
|
+
}))), /* @__PURE__ */ t.createElement("div", {
|
|
400
|
+
className: "mdc-circular-progress__circle-clipper mdc-circular-progress__circle-right"
|
|
401
|
+
}, /* @__PURE__ */ t.createElement("svg", {
|
|
402
|
+
className: "mdc-circular-progress__indeterminate-circle-graphic",
|
|
403
|
+
viewBox: w(j = "0 0 ".concat(n, " ")).call(j, n),
|
|
404
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
405
|
+
}, /* @__PURE__ */ t.createElement("circle", {
|
|
406
|
+
cx: i,
|
|
407
|
+
cy: i,
|
|
408
|
+
r: f,
|
|
409
|
+
strokeDasharray: _,
|
|
410
|
+
strokeDashoffset: x,
|
|
411
|
+
strokeWidth: C
|
|
412
|
+
}))));
|
|
413
|
+
}, [i, x, f, _, C, B, n]), M = k === "two-color" || k === "two-color-variant";
|
|
414
|
+
return /* @__PURE__ */ t.createElement("div", Y({
|
|
415
|
+
ref: L,
|
|
416
|
+
className: $("lmnt", "mdc-circular-progress", E === "indeterminate" && "mdc-circular-progress--indeterminate", !D && "mdc-circular-progress--closed", k && "lmnt-circular-progress--".concat(k), g),
|
|
430
417
|
style: {
|
|
431
|
-
width:
|
|
432
|
-
height:
|
|
418
|
+
width: z,
|
|
419
|
+
height: z
|
|
433
420
|
},
|
|
434
421
|
role: "progressbar",
|
|
435
|
-
"aria-label":
|
|
422
|
+
"aria-label": a,
|
|
436
423
|
"aria-valuemin": "0",
|
|
437
424
|
"aria-valuemax": "1",
|
|
438
|
-
"aria-valuenow":
|
|
439
|
-
},
|
|
425
|
+
"aria-valuenow": d
|
|
426
|
+
}, K), /* @__PURE__ */ t.createElement("div", {
|
|
440
427
|
className: "mdc-circular-progress__determinate-container"
|
|
441
428
|
}, /* @__PURE__ */ t.createElement("svg", {
|
|
442
429
|
className: "mdc-circular-progress__determinate-circle-graphic",
|
|
443
|
-
viewBox:
|
|
430
|
+
viewBox: w(r = "0 0 ".concat(n, " ")).call(r, n),
|
|
444
431
|
xmlns: "http://www.w3.org/2000/svg"
|
|
445
432
|
}, /* @__PURE__ */ t.createElement("circle", {
|
|
446
433
|
className: "mdc-circular-progress__determinate-track",
|
|
447
|
-
cx:
|
|
448
|
-
cy:
|
|
434
|
+
cx: i,
|
|
435
|
+
cy: i,
|
|
449
436
|
r: f,
|
|
450
437
|
strokeWidth: C
|
|
451
438
|
}), /* @__PURE__ */ t.createElement("circle", {
|
|
452
439
|
className: "mdc-circular-progress__determinate-circle",
|
|
453
|
-
cx:
|
|
454
|
-
cy:
|
|
440
|
+
cx: i,
|
|
441
|
+
cy: i,
|
|
455
442
|
r: f,
|
|
456
443
|
strokeDasharray: _,
|
|
457
|
-
strokeDashoffset:
|
|
444
|
+
strokeDashoffset: J,
|
|
458
445
|
strokeWidth: C
|
|
459
446
|
}))), /* @__PURE__ */ t.createElement("div", {
|
|
460
447
|
className: "mdc-circular-progress__indeterminate-container"
|
|
461
448
|
}, /* @__PURE__ */ t.createElement("div", {
|
|
462
|
-
className:
|
|
463
|
-
},
|
|
449
|
+
className: $("mdc-circular-progress__spinner-layer", M && "mdc-circular-progress__color-1")
|
|
450
|
+
}, N()), M && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
464
451
|
className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-2"
|
|
465
|
-
},
|
|
452
|
+
}, N()), /* @__PURE__ */ t.createElement("div", {
|
|
466
453
|
className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-3"
|
|
467
|
-
},
|
|
454
|
+
}, N()), /* @__PURE__ */ t.createElement("div", {
|
|
468
455
|
className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-4"
|
|
469
|
-
},
|
|
456
|
+
}, N()))));
|
|
470
457
|
});
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
size: a,
|
|
458
|
+
P.displayName = "CircularProgress";
|
|
459
|
+
P.propTypes = pe;
|
|
460
|
+
const ge = "_loadingSpinnerContainer_1f3ss_1", ve = {
|
|
461
|
+
loadingSpinnerContainer: ge
|
|
462
|
+
}, Ne = ({
|
|
463
|
+
size: s,
|
|
478
464
|
center: e = !1,
|
|
479
465
|
text: r,
|
|
480
|
-
textPosition:
|
|
481
|
-
color:
|
|
482
|
-
spinnerOnly:
|
|
466
|
+
textPosition: c = "bottom",
|
|
467
|
+
color: a = "primary",
|
|
468
|
+
spinnerOnly: l = !1,
|
|
483
469
|
//Due to we don't have (and want) to use a translation logic in this component, we are using a hardcoded message
|
|
484
|
-
impatienceMessage:
|
|
470
|
+
impatienceMessage: g = "This is taking longer than expected. Please be patient.",
|
|
485
471
|
impatienceTimeout: v = 10
|
|
486
472
|
}) => {
|
|
487
|
-
const [
|
|
488
|
-
|
|
489
|
-
const
|
|
490
|
-
|
|
473
|
+
const [D, A] = ae(0);
|
|
474
|
+
T(() => {
|
|
475
|
+
const S = setInterval(() => {
|
|
476
|
+
A((W) => W + 1);
|
|
491
477
|
}, 1e3);
|
|
492
|
-
return () => clearInterval(
|
|
478
|
+
return () => clearInterval(S);
|
|
493
479
|
}, []);
|
|
494
|
-
const
|
|
495
|
-
return
|
|
496
|
-
|
|
480
|
+
const d = ie(() => g && D > v ? g : r, [g, v, r, D]);
|
|
481
|
+
return s === "big" ? /* @__PURE__ */ y(ue, { text: d }) : l ? /* @__PURE__ */ y(
|
|
482
|
+
P,
|
|
497
483
|
{
|
|
498
484
|
"data-testid": "loading-spinner",
|
|
499
|
-
themeColor:
|
|
500
|
-
indicatorSize:
|
|
485
|
+
themeColor: a,
|
|
486
|
+
indicatorSize: s ?? "md"
|
|
501
487
|
}
|
|
502
488
|
) : /* @__PURE__ */ y(
|
|
503
|
-
|
|
489
|
+
le,
|
|
504
490
|
{
|
|
505
491
|
variant: "standard",
|
|
506
492
|
style: { textAlign: "center" },
|
|
507
|
-
className: e ?
|
|
508
|
-
children: /* @__PURE__ */
|
|
509
|
-
|
|
493
|
+
className: e ? ve.loadingSpinnerContainer : "",
|
|
494
|
+
children: /* @__PURE__ */ Q(
|
|
495
|
+
ce,
|
|
510
496
|
{
|
|
511
|
-
direction:
|
|
497
|
+
direction: c === "right" ? "horizontal" : "vertical",
|
|
512
498
|
gap: "dense",
|
|
513
499
|
primaryAlign: "center",
|
|
514
500
|
secondaryAlign: "center",
|
|
515
501
|
children: [
|
|
516
502
|
/* @__PURE__ */ y(
|
|
517
|
-
|
|
503
|
+
P,
|
|
518
504
|
{
|
|
519
505
|
"data-testid": "loading-spinner",
|
|
520
|
-
themeColor:
|
|
521
|
-
indicatorSize:
|
|
506
|
+
themeColor: a,
|
|
507
|
+
indicatorSize: s ?? "lg"
|
|
522
508
|
}
|
|
523
509
|
),
|
|
524
|
-
/* @__PURE__ */ y(
|
|
510
|
+
/* @__PURE__ */ y(de, { themeColor: `text-${a}-on-background`, tag: "div", "data-testid": "loading-text", children: d })
|
|
525
511
|
]
|
|
526
512
|
}
|
|
527
513
|
)
|
|
@@ -529,5 +515,5 @@ const re = "_loadingSpinnerContainer_1f3ss_1", te = {
|
|
|
529
515
|
);
|
|
530
516
|
};
|
|
531
517
|
export {
|
|
532
|
-
|
|
518
|
+
Ne as LoadingSpinner
|
|
533
519
|
};
|