@hortiview/default-components 1.4.0 → 1.4.2
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 +1 -1
- package/dist/{Iconify-Cjdr-ccS.js → Iconify-CUZc8WnW.js} +17 -16
- package/dist/InfoCard-CFmkh7DJ.js +58 -0
- package/dist/{LoadingSpinner-FRQEZvxs.js → LoadingSpinner-DVBQ1tGJ.js} +178 -192
- package/dist/OfflineView-DHtzNLwt-BmxTfGZq.js +46 -0
- package/dist/assets/InfoCard.css +1 -0
- package/dist/assets/OfflineView-DHtzNLwt.css +1 -0
- package/dist/{component-DsB0poTj-BDGiEcbP.js → component-DsB0poTj-CeLHB9Ok.js} +3 -3
- package/dist/components/DefaultFormNumber/DefaultFormNumber.js +1337 -505
- package/dist/components/DefaultFormSelect/DefaultFormSelect.js +25 -25
- package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +2 -2
- package/dist/components/GenericTable/GenericTable.js +11524 -9875
- package/dist/components/HealthChecks/DataBaseHealthCheck.d.ts +2 -2
- package/dist/components/HealthChecks/DataBaseHealthCheck.js +2 -2
- package/dist/components/HealthChecks/DefaultHealthCheck.d.ts +2 -2
- package/dist/components/HealthChecks/DefaultHealthCheck.js +2 -2
- package/dist/components/HealthChecks/IotServiceHealthCheck.d.ts +2 -2
- package/dist/components/HealthChecks/IotServiceHealthCheck.js +2 -2
- package/dist/components/HealthChecks/PlatformHealthCheck.d.ts +2 -2
- package/dist/components/HealthChecks/PlatformHealthCheck.js +2 -2
- package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +2 -2
- package/dist/components/OfflineView/OfflineView.js +2 -2
- package/dist/index.es-0QJC9VS2-CNPew9LK.js +360 -0
- package/dist/{index.es--yyG47az-DBKBm3yD.js → index.es-BGordhUK-C36NK84Q.js} +400 -365
- package/dist/index.es-Bg8hxXM8-BlFd894m.js +1083 -0
- package/dist/index.es-Bo1Rhtyb-B650l9Yk.js +79 -0
- package/dist/index.es-CK4oZMKs-Da8pin7D.js +14077 -0
- package/dist/{index.es-U5-b20Gv-ChQ_O81C.js → index.es-Cq04gn3U-Bvzrqtm6.js} +369 -535
- package/dist/{omit-1Eom1PmQ-BLY9iMqj.js → index.es-DENZVv7_-PUEN9sIa.js} +495 -869
- package/dist/index.es-IXyb5F6n-B5afcHX8.js +452 -0
- package/dist/isTypedArray-Dw_IY7Zq-BZ-4N8-Z.js +210 -0
- package/dist/main.d.ts +3 -2
- package/dist/main.js +8 -8
- package/dist/slicedToArray-BWk2gTCn-Cfzj7tjm.js +432 -0
- package/dist/useHelperText-3ahu6tTS.js +391 -0
- package/dist/useTranslation-CVaIJbcK.js +5277 -0
- package/package.json +4 -4
- package/dist/HealthCheckFailed-CqLYAwpc.js +0 -47
- package/dist/OfflineView-HbuDPpQL-kqlzfoUS.js +0 -46
- package/dist/assets/HealthCheckFailed.css +0 -1
- package/dist/assets/OfflineView-HbuDPpQL.css +0 -1
- package/dist/index.es-Bx1E5MPK-CaV59rEP.js +0 -344
- package/dist/index.es-CzUKBF7E-C0X-mcdY.js +0 -13567
- package/dist/index.es-D-ph6ImM-CWxTa_iD.js +0 -63
- package/dist/index.es-DDo_AHL0-VqD9ikmU.js +0 -1033
- package/dist/index.es-Kg9soDed-BkTwDySy.js +0 -440
- package/dist/useHelperText-DD9_Dtkk.js +0 -21
- package/dist/useTranslation-B_ODv8uN.js +0 -4306
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as c, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import './assets/LoadingSpinner.css';const
|
|
8
|
-
loadingBigOverlay:
|
|
9
|
-
bigLoadSpinnerCard:
|
|
10
|
-
bigLoadSpinnerCardText:
|
|
11
|
-
logo:
|
|
12
|
-
},
|
|
13
|
-
/* @__PURE__ */ c(
|
|
14
|
-
/* @__PURE__ */ c(
|
|
15
|
-
] }),
|
|
16
|
-
var
|
|
1
|
+
import { jsx as c, jsxs as K } from "react/jsx-runtime";
|
|
2
|
+
import { r as Z, at as ee, q as w, h as re, e as U, g as J, j as $, k as te, i as ae, t as m, m as ie } from "./useTranslation-CVaIJbcK.js";
|
|
3
|
+
import a, { useState as se, useEffect as T, useMemo as oe, forwardRef as ne, useRef as V, useImperativeHandle as ce, useCallback as le } from "react";
|
|
4
|
+
import { D as X, O as de } from "./index.es-BGordhUK-C36NK84Q.js";
|
|
5
|
+
import { b as ue } from "./index.es-Bo1Rhtyb-B650l9Yk.js";
|
|
6
|
+
import { n as me } from "./Iconify-CUZc8WnW.js";
|
|
7
|
+
import './assets/LoadingSpinner.css';const pe = "_loadingBigOverlay_7dxo1_1", he = "_bigLoadSpinnerCard_7dxo1_12", ge = "_bigLoadSpinnerCardText_7dxo1_27", fe = "_logo_7dxo1_33", L = {
|
|
8
|
+
loadingBigOverlay: pe,
|
|
9
|
+
bigLoadSpinnerCard: he,
|
|
10
|
+
bigLoadSpinnerCardText: ge,
|
|
11
|
+
logo: fe
|
|
12
|
+
}, _e = ({ text: t }) => /* @__PURE__ */ K("div", { className: L.bigLoadSpinnerCard, role: "progressbar", "data-testid": "loading-spinner", children: [
|
|
13
|
+
/* @__PURE__ */ c(me, { icon: "hortiview", className: L.logo, "data-testid": "logo-icon" }),
|
|
14
|
+
/* @__PURE__ */ c(X, { tag: "p", bold: !0, level: 1, className: L.bigLoadSpinnerCardText, children: t })
|
|
15
|
+
] }), ve = (t) => /* @__PURE__ */ c("div", { "data-testid": "big-loading-spinner", className: L.loadingBigOverlay, children: /* @__PURE__ */ c(_e, { ...t }) });
|
|
16
|
+
var h = {
|
|
17
17
|
INDETERMINATE_CLASS: "mdc-circular-progress--indeterminate",
|
|
18
18
|
CLOSED_CLASS: "mdc-circular-progress--closed"
|
|
19
|
-
},
|
|
19
|
+
}, p = {
|
|
20
20
|
ARIA_HIDDEN: "aria-hidden",
|
|
21
21
|
ARIA_VALUENOW: "aria-valuenow",
|
|
22
22
|
DETERMINATE_CIRCLE_SELECTOR: ".mdc-circular-progress__determinate-circle",
|
|
@@ -45,22 +45,22 @@ var p = {
|
|
|
45
45
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
46
46
|
* THE SOFTWARE.
|
|
47
47
|
*/
|
|
48
|
-
var
|
|
48
|
+
var q = (
|
|
49
49
|
/** @class */
|
|
50
|
-
function(
|
|
51
|
-
|
|
50
|
+
function(t) {
|
|
51
|
+
J(e, t);
|
|
52
52
|
function e(r) {
|
|
53
|
-
return
|
|
53
|
+
return t.call(this, $($({}, e.defaultAdapter), r)) || this;
|
|
54
54
|
}
|
|
55
55
|
return Object.defineProperty(e, "cssClasses", {
|
|
56
56
|
get: function() {
|
|
57
|
-
return
|
|
57
|
+
return h;
|
|
58
58
|
},
|
|
59
59
|
enumerable: !1,
|
|
60
60
|
configurable: !0
|
|
61
61
|
}), Object.defineProperty(e, "strings", {
|
|
62
62
|
get: function() {
|
|
63
|
-
return
|
|
63
|
+
return p;
|
|
64
64
|
},
|
|
65
65
|
enumerable: !1,
|
|
66
66
|
configurable: !0
|
|
@@ -88,26 +88,26 @@ var T = (
|
|
|
88
88
|
enumerable: !1,
|
|
89
89
|
configurable: !0
|
|
90
90
|
}), e.prototype.init = function() {
|
|
91
|
-
this.closed = this.adapter.hasClass(
|
|
91
|
+
this.closed = this.adapter.hasClass(h.CLOSED_CLASS), this.determinate = !this.adapter.hasClass(h.INDETERMINATE_CLASS), this.progress = 0, this.determinate && this.adapter.setAttribute(p.ARIA_VALUENOW, this.progress.toString()), this.radius = Number(this.adapter.getDeterminateCircleAttribute(p.RADIUS));
|
|
92
92
|
}, e.prototype.setDeterminate = function(r) {
|
|
93
|
-
this.determinate = r, this.determinate ? (this.adapter.removeClass(
|
|
93
|
+
this.determinate = r, this.determinate ? (this.adapter.removeClass(h.INDETERMINATE_CLASS), this.setProgress(this.progress)) : (this.adapter.addClass(h.INDETERMINATE_CLASS), this.adapter.removeAttribute(p.ARIA_VALUENOW));
|
|
94
94
|
}, e.prototype.isDeterminate = function() {
|
|
95
95
|
return this.determinate;
|
|
96
96
|
}, e.prototype.setProgress = function(r) {
|
|
97
97
|
if (this.progress = r, this.determinate) {
|
|
98
|
-
var
|
|
99
|
-
this.adapter.setDeterminateCircleAttribute(
|
|
98
|
+
var l = (1 - this.progress) * (2 * Math.PI * this.radius);
|
|
99
|
+
this.adapter.setDeterminateCircleAttribute(p.STROKE_DASHOFFSET, "" + l), this.adapter.setAttribute(p.ARIA_VALUENOW, this.progress.toString());
|
|
100
100
|
}
|
|
101
101
|
}, e.prototype.getProgress = function() {
|
|
102
102
|
return this.progress;
|
|
103
103
|
}, e.prototype.open = function() {
|
|
104
|
-
this.closed = !1, this.adapter.removeClass(
|
|
104
|
+
this.closed = !1, this.adapter.removeClass(h.CLOSED_CLASS), this.adapter.removeAttribute(p.ARIA_HIDDEN);
|
|
105
105
|
}, e.prototype.close = function() {
|
|
106
|
-
this.closed = !0, this.adapter.addClass(
|
|
106
|
+
this.closed = !0, this.adapter.addClass(h.CLOSED_CLASS), this.adapter.setAttribute(p.ARIA_HIDDEN, "true");
|
|
107
107
|
}, e.prototype.isClosed = function() {
|
|
108
108
|
return this.closed;
|
|
109
109
|
}, e;
|
|
110
|
-
}(
|
|
110
|
+
}(te)
|
|
111
111
|
);
|
|
112
112
|
/**
|
|
113
113
|
* @license
|
|
@@ -131,15 +131,15 @@ var T = (
|
|
|
131
131
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
132
132
|
* THE SOFTWARE.
|
|
133
133
|
*/
|
|
134
|
-
var
|
|
134
|
+
var Ce = (
|
|
135
135
|
/** @class */
|
|
136
|
-
function(
|
|
137
|
-
|
|
136
|
+
function(t) {
|
|
137
|
+
J(e, t);
|
|
138
138
|
function e() {
|
|
139
|
-
return
|
|
139
|
+
return t !== null && t.apply(this, arguments) || this;
|
|
140
140
|
}
|
|
141
141
|
return e.prototype.initialize = function() {
|
|
142
|
-
this.determinateCircle_ = this.root.querySelector(
|
|
142
|
+
this.determinateCircle_ = this.root.querySelector(q.strings.DETERMINATE_CIRCLE_SELECTOR);
|
|
143
143
|
}, e.attachTo = function(r) {
|
|
144
144
|
return new e(r);
|
|
145
145
|
}, Object.defineProperty(e.prototype, "determinate", {
|
|
@@ -178,64 +178,63 @@ var ie = (
|
|
|
178
178
|
}, e.prototype.close = function() {
|
|
179
179
|
this.foundation.close();
|
|
180
180
|
}, e.prototype.getDefaultFoundation = function() {
|
|
181
|
-
var r = this,
|
|
182
|
-
addClass: function(
|
|
183
|
-
return r.root.classList.add(
|
|
181
|
+
var r = this, l = {
|
|
182
|
+
addClass: function(i) {
|
|
183
|
+
return r.root.classList.add(i);
|
|
184
184
|
},
|
|
185
|
-
getDeterminateCircleAttribute: function(
|
|
186
|
-
return r.determinateCircle_.getAttribute(
|
|
185
|
+
getDeterminateCircleAttribute: function(i) {
|
|
186
|
+
return r.determinateCircle_.getAttribute(i);
|
|
187
187
|
},
|
|
188
|
-
hasClass: function(
|
|
189
|
-
return r.root.classList.contains(
|
|
188
|
+
hasClass: function(i) {
|
|
189
|
+
return r.root.classList.contains(i);
|
|
190
190
|
},
|
|
191
|
-
removeClass: function(
|
|
192
|
-
return r.root.classList.remove(
|
|
191
|
+
removeClass: function(i) {
|
|
192
|
+
return r.root.classList.remove(i);
|
|
193
193
|
},
|
|
194
|
-
removeAttribute: function(
|
|
195
|
-
return r.root.removeAttribute(
|
|
194
|
+
removeAttribute: function(i) {
|
|
195
|
+
return r.root.removeAttribute(i);
|
|
196
196
|
},
|
|
197
|
-
setAttribute: function(
|
|
198
|
-
return r.root.setAttribute(
|
|
197
|
+
setAttribute: function(i, d) {
|
|
198
|
+
return r.root.setAttribute(i, d);
|
|
199
199
|
},
|
|
200
|
-
setDeterminateCircleAttribute: function(
|
|
201
|
-
return r.determinateCircle_.setAttribute(
|
|
200
|
+
setDeterminateCircleAttribute: function(i, d) {
|
|
201
|
+
return r.determinateCircle_.setAttribute(i, d);
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
|
-
return new
|
|
204
|
+
return new q(l);
|
|
205
205
|
}, e;
|
|
206
|
-
}(
|
|
207
|
-
)
|
|
208
|
-
const oe = {
|
|
206
|
+
}(ae)
|
|
207
|
+
), ye = {
|
|
209
208
|
/**
|
|
210
209
|
* Accessibility label.
|
|
211
210
|
*
|
|
212
211
|
* Defaults to **'Progress Indicator'**.
|
|
213
212
|
*/
|
|
214
|
-
ariaLabel:
|
|
213
|
+
ariaLabel: m.string,
|
|
215
214
|
/**
|
|
216
215
|
* The css class name to be passed through to the component markup.
|
|
217
216
|
*
|
|
218
217
|
* Defaults to **undefined**.
|
|
219
218
|
*/
|
|
220
|
-
className:
|
|
219
|
+
className: m.string,
|
|
221
220
|
/**
|
|
222
221
|
* The size of the progress indicator.
|
|
223
222
|
*
|
|
224
223
|
* Defaults to **'lg'**.
|
|
225
224
|
*/
|
|
226
|
-
indicatorSize:
|
|
225
|
+
indicatorSize: m.oneOf(["sm", "md", "lg"]),
|
|
227
226
|
/**
|
|
228
227
|
* Sets the visibility of the progress indicator.
|
|
229
228
|
*
|
|
230
229
|
* Defaults to **true**.
|
|
231
230
|
*/
|
|
232
|
-
open:
|
|
231
|
+
open: m.bool,
|
|
233
232
|
/**
|
|
234
233
|
* The current progress of a determinate progress indicator. Must be between 0 and 1.
|
|
235
234
|
*
|
|
236
235
|
* Defaults to **0**.
|
|
237
236
|
*/
|
|
238
|
-
progress:
|
|
237
|
+
progress: m.number,
|
|
239
238
|
/**
|
|
240
239
|
* @deprecated _Renamed, see indicatorSize instead._
|
|
241
240
|
*
|
|
@@ -243,47 +242,42 @@ const oe = {
|
|
|
243
242
|
*
|
|
244
243
|
* Defaults to **undefined**.
|
|
245
244
|
*/
|
|
246
|
-
size:
|
|
245
|
+
size: ie(m.oneOf(["sm", "md", "lg"]), "CircularProgress", "Renamed, see indicatorSize instead."),
|
|
247
246
|
/**
|
|
248
247
|
* Color of the indicator stroke with 'primary' or 'secondary' theme color.
|
|
249
248
|
*
|
|
250
249
|
* Defaults to **'primary'**.
|
|
251
250
|
*/
|
|
252
|
-
themeColor:
|
|
251
|
+
themeColor: m.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"]),
|
|
253
252
|
/**
|
|
254
253
|
* An indeterminate CircularProgress indicator will continue spinning until closed. A determinate CircularProgress indicator will display the current progress.
|
|
255
254
|
*
|
|
256
255
|
* Defaults to **'indeterminate'**.
|
|
257
256
|
*/
|
|
258
|
-
variant:
|
|
259
|
-
},
|
|
257
|
+
variant: m.oneOf(["determinate", "indeterminate"])
|
|
258
|
+
}, Ae = {
|
|
260
259
|
ariaLabel: "Progress Indicator",
|
|
261
260
|
className: void 0,
|
|
262
261
|
indicatorSize: "lg",
|
|
263
262
|
open: !0,
|
|
264
263
|
progress: 0,
|
|
265
|
-
size: void 0,
|
|
266
264
|
themeColor: "primary",
|
|
267
265
|
variant: "indeterminate"
|
|
268
|
-
},
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
(h === "determinate" && i < 0 || i > 1) && j("CircularProgress: `progress` must be between 0 and 1."), g.current.determinate = h === "determinate", g.current.progress = i;
|
|
284
|
-
}, [i, h]);
|
|
285
|
-
const $ = () => {
|
|
286
|
-
switch (b) {
|
|
266
|
+
}, be = ["ariaLabel", "className", "open", "progress", "size", "indicatorSize", "themeColor", "variant"], g = Ae, W = /* @__PURE__ */ ne(function(t, e) {
|
|
267
|
+
var r, l = t.ariaLabel, i = l === void 0 ? g.ariaLabel : l, d = t.className, _ = d === void 0 ? g.className : d, v = t.open, A = v === void 0 ? g.open : v, b = t.progress, u = b === void 0 ? g.progress : b;
|
|
268
|
+
t.size;
|
|
269
|
+
var D = t.indicatorSize, I = D === void 0 ? g.indicatorSize : D, R = t.themeColor, E = R === void 0 ? g.themeColor : R, P = t.variant, S = P === void 0 ? g.variant : P, G = Z(t, be), O = V(), k = V();
|
|
270
|
+
ce(e, function() {
|
|
271
|
+
return O.current;
|
|
272
|
+
}, []), T(function() {
|
|
273
|
+
return k.current = Ce.attachTo(O.current), function() {
|
|
274
|
+
k.current.destroy();
|
|
275
|
+
};
|
|
276
|
+
}, []), T(function() {
|
|
277
|
+
(S === "determinate" && u < 0 || u > 1) && ee("CircularProgress: `progress` must be between 0 and 1."), k.current.determinate = S === "determinate", k.current.progress = u;
|
|
278
|
+
}, [u, S]);
|
|
279
|
+
var Q = function() {
|
|
280
|
+
switch (I) {
|
|
287
281
|
case "xs":
|
|
288
282
|
return {
|
|
289
283
|
heightWidth: "16px",
|
|
@@ -357,154 +351,146 @@ const oe = {
|
|
|
357
351
|
halfStrokeDashoffset: "56.549"
|
|
358
352
|
};
|
|
359
353
|
}
|
|
360
|
-
}, {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
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
|
-
strokeDasharray: C,
|
|
407
|
-
strokeDashoffset: D,
|
|
408
|
-
strokeWidth: v
|
|
409
|
-
})))), [o, D, f, C, v, w, n]), L = m === "two-color" || m === "two-color-variant";
|
|
410
|
-
return /* @__PURE__ */ t.createElement("div", M({
|
|
411
|
-
ref: _,
|
|
412
|
-
className: I("lmnt", "mdc-circular-progress", h === "indeterminate" && "mdc-circular-progress--indeterminate", !s && "mdc-circular-progress--closed", m && `lmnt-circular-progress--${m}`, u),
|
|
354
|
+
}, o = Q(), z = o.heightWidth, n = o.viewBox, s = o.cxCy, f = o.r, C = o.strokeWidth, B = o.strokeWidth80, y = o.strokeDashArray, Y = o.strokeDashoffset, x = o.halfStrokeDashoffset, N = le(function() {
|
|
355
|
+
var M, F, H;
|
|
356
|
+
return /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("div", {
|
|
357
|
+
className: "mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left"
|
|
358
|
+
}, /* @__PURE__ */ a.createElement("svg", {
|
|
359
|
+
className: "mdc-circular-progress__indeterminate-circle-graphic",
|
|
360
|
+
viewBox: w(M = "0 0 ".concat(n, " ")).call(M, n),
|
|
361
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
362
|
+
}, /* @__PURE__ */ a.createElement("circle", {
|
|
363
|
+
cx: s,
|
|
364
|
+
cy: s,
|
|
365
|
+
r: f,
|
|
366
|
+
strokeDasharray: y,
|
|
367
|
+
strokeDashoffset: x,
|
|
368
|
+
strokeWidth: C
|
|
369
|
+
}))), /* @__PURE__ */ a.createElement("div", {
|
|
370
|
+
className: "mdc-circular-progress__gap-patch"
|
|
371
|
+
}, /* @__PURE__ */ a.createElement("svg", {
|
|
372
|
+
className: "mdc-circular-progress__indeterminate-circle-graphic",
|
|
373
|
+
viewBox: w(F = "0 0 ".concat(n, " ")).call(F, n),
|
|
374
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
375
|
+
}, /* @__PURE__ */ a.createElement("circle", {
|
|
376
|
+
cx: s,
|
|
377
|
+
cy: s,
|
|
378
|
+
r: f,
|
|
379
|
+
strokeDasharray: y,
|
|
380
|
+
strokeDashoffset: x,
|
|
381
|
+
strokeWidth: B
|
|
382
|
+
}))), /* @__PURE__ */ a.createElement("div", {
|
|
383
|
+
className: "mdc-circular-progress__circle-clipper mdc-circular-progress__circle-right"
|
|
384
|
+
}, /* @__PURE__ */ a.createElement("svg", {
|
|
385
|
+
className: "mdc-circular-progress__indeterminate-circle-graphic",
|
|
386
|
+
viewBox: w(H = "0 0 ".concat(n, " ")).call(H, n),
|
|
387
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
388
|
+
}, /* @__PURE__ */ a.createElement("circle", {
|
|
389
|
+
cx: s,
|
|
390
|
+
cy: s,
|
|
391
|
+
r: f,
|
|
392
|
+
strokeDasharray: y,
|
|
393
|
+
strokeDashoffset: x,
|
|
394
|
+
strokeWidth: C
|
|
395
|
+
}))));
|
|
396
|
+
}, [s, x, f, y, C, B, n]), j = E === "two-color" || E === "two-color-variant";
|
|
397
|
+
return /* @__PURE__ */ a.createElement("div", re({
|
|
398
|
+
ref: O,
|
|
399
|
+
className: U("lmnt", "mdc-circular-progress", S === "indeterminate" && "mdc-circular-progress--indeterminate", !A && "mdc-circular-progress--closed", E && "lmnt-circular-progress--".concat(E), _),
|
|
413
400
|
style: {
|
|
414
|
-
width:
|
|
415
|
-
height:
|
|
401
|
+
width: z,
|
|
402
|
+
height: z
|
|
416
403
|
},
|
|
417
404
|
role: "progressbar",
|
|
418
|
-
"aria-label":
|
|
405
|
+
"aria-label": i,
|
|
419
406
|
"aria-valuemin": "0",
|
|
420
407
|
"aria-valuemax": "1",
|
|
421
|
-
"aria-valuenow":
|
|
422
|
-
},
|
|
408
|
+
"aria-valuenow": u
|
|
409
|
+
}, G), /* @__PURE__ */ a.createElement("div", {
|
|
423
410
|
className: "mdc-circular-progress__determinate-container"
|
|
424
|
-
}, /* @__PURE__ */
|
|
411
|
+
}, /* @__PURE__ */ a.createElement("svg", {
|
|
425
412
|
className: "mdc-circular-progress__determinate-circle-graphic",
|
|
426
|
-
viewBox:
|
|
413
|
+
viewBox: w(r = "0 0 ".concat(n, " ")).call(r, n),
|
|
427
414
|
xmlns: "http://www.w3.org/2000/svg"
|
|
428
|
-
}, /* @__PURE__ */
|
|
415
|
+
}, /* @__PURE__ */ a.createElement("circle", {
|
|
429
416
|
className: "mdc-circular-progress__determinate-track",
|
|
430
|
-
cx:
|
|
431
|
-
cy:
|
|
417
|
+
cx: s,
|
|
418
|
+
cy: s,
|
|
432
419
|
r: f,
|
|
433
|
-
strokeWidth:
|
|
434
|
-
}), /* @__PURE__ */
|
|
420
|
+
strokeWidth: C
|
|
421
|
+
}), /* @__PURE__ */ a.createElement("circle", {
|
|
435
422
|
className: "mdc-circular-progress__determinate-circle",
|
|
436
|
-
cx:
|
|
437
|
-
cy:
|
|
423
|
+
cx: s,
|
|
424
|
+
cy: s,
|
|
438
425
|
r: f,
|
|
439
|
-
strokeDasharray:
|
|
440
|
-
strokeDashoffset:
|
|
441
|
-
strokeWidth:
|
|
442
|
-
}))), /* @__PURE__ */
|
|
426
|
+
strokeDasharray: y,
|
|
427
|
+
strokeDashoffset: Y,
|
|
428
|
+
strokeWidth: C
|
|
429
|
+
}))), /* @__PURE__ */ a.createElement("div", {
|
|
443
430
|
className: "mdc-circular-progress__indeterminate-container"
|
|
444
|
-
}, /* @__PURE__ */
|
|
445
|
-
className:
|
|
446
|
-
},
|
|
431
|
+
}, /* @__PURE__ */ a.createElement("div", {
|
|
432
|
+
className: U("mdc-circular-progress__spinner-layer", j && "mdc-circular-progress__color-1")
|
|
433
|
+
}, N()), j && /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("div", {
|
|
447
434
|
className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-2"
|
|
448
|
-
},
|
|
435
|
+
}, N()), /* @__PURE__ */ a.createElement("div", {
|
|
449
436
|
className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-3"
|
|
450
|
-
},
|
|
437
|
+
}, N()), /* @__PURE__ */ a.createElement("div", {
|
|
451
438
|
className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-4"
|
|
452
|
-
},
|
|
439
|
+
}, N()))));
|
|
453
440
|
});
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
size: a,
|
|
441
|
+
W.displayName = "CircularProgress";
|
|
442
|
+
W.propTypes = ye;
|
|
443
|
+
const De = "_loadingSpinnerContainer_1f3ss_1", Ee = {
|
|
444
|
+
loadingSpinnerContainer: De
|
|
445
|
+
}, We = ({
|
|
446
|
+
size: t,
|
|
461
447
|
center: e = !1,
|
|
462
448
|
text: r,
|
|
463
|
-
textPosition:
|
|
464
|
-
color:
|
|
465
|
-
spinnerOnly:
|
|
449
|
+
textPosition: l = "bottom",
|
|
450
|
+
color: i = "primary",
|
|
451
|
+
spinnerOnly: d = !1,
|
|
466
452
|
//Due to we don't have (and want) to use a translation logic in this component, we are using a hardcoded message
|
|
467
|
-
impatienceMessage:
|
|
468
|
-
impatienceTimeout:
|
|
453
|
+
impatienceMessage: _ = "This is taking longer than expected. Please be patient.",
|
|
454
|
+
impatienceTimeout: v = 10
|
|
469
455
|
}) => {
|
|
470
|
-
const [
|
|
471
|
-
|
|
472
|
-
const
|
|
473
|
-
|
|
456
|
+
const [A, b] = se(0);
|
|
457
|
+
T(() => {
|
|
458
|
+
const D = setInterval(() => {
|
|
459
|
+
b((I) => I + 1);
|
|
474
460
|
}, 1e3);
|
|
475
|
-
return () => clearInterval(
|
|
461
|
+
return () => clearInterval(D);
|
|
476
462
|
}, []);
|
|
477
|
-
const
|
|
478
|
-
return
|
|
479
|
-
|
|
463
|
+
const u = oe(() => _ && A > v ? _ : r, [_, v, r, A]);
|
|
464
|
+
return t === "big" ? /* @__PURE__ */ c(ve, { text: u }) : d ? /* @__PURE__ */ c(
|
|
465
|
+
W,
|
|
480
466
|
{
|
|
481
467
|
"data-testid": "loading-spinner",
|
|
482
|
-
themeColor:
|
|
483
|
-
indicatorSize:
|
|
468
|
+
themeColor: i,
|
|
469
|
+
indicatorSize: t ?? "md"
|
|
484
470
|
}
|
|
485
471
|
) : /* @__PURE__ */ c(
|
|
486
|
-
|
|
472
|
+
ue,
|
|
487
473
|
{
|
|
488
474
|
variant: "standard",
|
|
489
475
|
style: { textAlign: "center" },
|
|
490
|
-
className: e ?
|
|
491
|
-
children: /* @__PURE__ */
|
|
492
|
-
|
|
476
|
+
className: e ? Ee.loadingSpinnerContainer : "",
|
|
477
|
+
children: /* @__PURE__ */ K(
|
|
478
|
+
de,
|
|
493
479
|
{
|
|
494
|
-
direction:
|
|
480
|
+
direction: l === "right" ? "horizontal" : "vertical",
|
|
495
481
|
gap: "dense",
|
|
496
482
|
primaryAlign: "center",
|
|
497
483
|
secondaryAlign: "center",
|
|
498
484
|
children: [
|
|
499
485
|
/* @__PURE__ */ c(
|
|
500
|
-
|
|
486
|
+
W,
|
|
501
487
|
{
|
|
502
488
|
"data-testid": "loading-spinner",
|
|
503
|
-
themeColor:
|
|
504
|
-
indicatorSize:
|
|
489
|
+
themeColor: i,
|
|
490
|
+
indicatorSize: t ?? "lg"
|
|
505
491
|
}
|
|
506
492
|
),
|
|
507
|
-
/* @__PURE__ */ c(
|
|
493
|
+
/* @__PURE__ */ c(X, { themeColor: `text-${i}-on-background`, tag: "div", "data-testid": "loading-text", children: u })
|
|
508
494
|
]
|
|
509
495
|
}
|
|
510
496
|
)
|
|
@@ -512,5 +498,5 @@ const ce = "_loadingSpinnerContainer_1f3ss_1", le = {
|
|
|
512
498
|
);
|
|
513
499
|
};
|
|
514
500
|
export {
|
|
515
|
-
|
|
501
|
+
We as N
|
|
516
502
|
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { O as o, N as m, I as h, D as v } from "./index.es-BGordhUK-C36NK84Q.js";
|
|
3
|
+
import { n as p } from "./Iconify-CUZc8WnW.js";
|
|
4
|
+
import { d as x } from "./index.es-0QJC9VS2-CNPew9LK.js";
|
|
5
|
+
import './assets/OfflineView-DHtzNLwt.css';const A = "_gapAndTextAlign_10nts_1", y = "_container_10nts_6", W = "_bgWhite_10nts_12", N = "_bgGrey_10nts_17", T = "_subtitle_10nts_22", t = {
|
|
6
|
+
gapAndTextAlign: A,
|
|
7
|
+
container: y,
|
|
8
|
+
bgWhite: W,
|
|
9
|
+
bgGrey: N,
|
|
10
|
+
subtitle: T
|
|
11
|
+
}, w = ({
|
|
12
|
+
title: i = "You’re currently offline",
|
|
13
|
+
subtitle: n = "This feature is unavailable until you reconnect",
|
|
14
|
+
icon: s = "cloud_off",
|
|
15
|
+
size: c = "large",
|
|
16
|
+
variant: d = "basic",
|
|
17
|
+
"data-testid": u = "offline-view-container",
|
|
18
|
+
buttonLabel: l,
|
|
19
|
+
fullWidth: g = !1,
|
|
20
|
+
className: b,
|
|
21
|
+
onClick: f
|
|
22
|
+
}) => {
|
|
23
|
+
const a = c === "large", _ = d === "filled";
|
|
24
|
+
return /* @__PURE__ */ r(
|
|
25
|
+
o,
|
|
26
|
+
{
|
|
27
|
+
className: `${b} ${t.container} ${_ ? t.bgGrey : t.bgWhite}`,
|
|
28
|
+
gap: "standard",
|
|
29
|
+
direction: "vertical",
|
|
30
|
+
"data-testid": u,
|
|
31
|
+
secondaryAlign: "center",
|
|
32
|
+
fullWidth: g,
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ r(o, { direction: "vertical", secondaryAlign: "center", className: t.gapAndTextAlign, children: [
|
|
35
|
+
/* @__PURE__ */ e(p, { icon: s, iconSize: a ? "xlarge" : "medium" }),
|
|
36
|
+
a ? /* @__PURE__ */ e(m, { level: 6, children: i }) : /* @__PURE__ */ e(h, { level: 1, bold: !0, children: i })
|
|
37
|
+
] }),
|
|
38
|
+
n && /* @__PURE__ */ e(v, { className: t.subtitle, level: 2, children: n }),
|
|
39
|
+
l && /* @__PURE__ */ e(x, { "data-testid": "offline-view-action-button", label: l, onClick: f })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
w as j
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._database_x7426_1{color:var(--lmnt-theme-secondary);animation:_spin_x7426_1 4s linear infinite}@keyframes _spin_x7426_1{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}._done_x7426_16{color:var(--lmnt-theme-success)}._iot_x7426_20,._platform_x7426_21,._other_x7426_22{color:var(--lmnt-theme-danger)}._crossedOut_x7426_26{position:relative;display:inline-block}._crossedOut_x7426_26:after{content:"";position:absolute;width:3rem;height:.25rem;left:50%;top:50%;background:var(--lmnt-theme-danger-on-surface);box-shadow:0 0 0 .125rem var(--lmnt-theme-background);transform:translate(-50%,calc(-50% - .25rem)) rotate(45deg);transform-origin:center;z-index:2}._fullHeight_x7426_45{height:100%}._centerText_x7426_49{text-align:center}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._gapAndTextAlign_10nts_1{gap:.125rem!important;text-align:center}._container_10nts_6{border-radius:.5rem;padding:2.5rem 2rem;width:auto}._bgWhite_10nts_12{background:var(--lmnt-theme-surface);color:var(--lmnt-theme-on-surface-active)}._bgGrey_10nts_17{background:var(--lmnt-theme-surface-variant);color:var(--lmnt-theme-on-surface-active)}._subtitle_10nts_22{color:var(--on-colors-on-surface-inactive-medium, #000000BA);font-weight:500;text-align:center}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as T, j as v, k as E, i as S } from "./useTranslation-CVaIJbcK.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2018 Google Inc.
|
|
@@ -447,7 +447,7 @@ var b = [
|
|
|
447
447
|
top: Math.round(this.frame_.height / 2 - this.initialSize_ / 2)
|
|
448
448
|
}, this.adapter.updateCssVariable(a, this.unboundedCoords_.left + "px"), this.adapter.updateCssVariable(r, this.unboundedCoords_.top + "px"));
|
|
449
449
|
}, i;
|
|
450
|
-
}(
|
|
450
|
+
}(E)
|
|
451
451
|
);
|
|
452
452
|
/**
|
|
453
453
|
* @license
|
|
@@ -557,7 +557,7 @@ var N = (
|
|
|
557
557
|
}, i.prototype.setUnbounded_ = function() {
|
|
558
558
|
this.foundation.setUnbounded(!!this.unbounded_);
|
|
559
559
|
}, i;
|
|
560
|
-
}(
|
|
560
|
+
}(S)
|
|
561
561
|
);
|
|
562
562
|
export {
|
|
563
563
|
R as D,
|