@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.
Files changed (48) hide show
  1. package/README.md +1 -1
  2. package/dist/{Iconify-Cjdr-ccS.js → Iconify-CUZc8WnW.js} +17 -16
  3. package/dist/InfoCard-CFmkh7DJ.js +58 -0
  4. package/dist/{LoadingSpinner-FRQEZvxs.js → LoadingSpinner-DVBQ1tGJ.js} +178 -192
  5. package/dist/OfflineView-DHtzNLwt-BmxTfGZq.js +46 -0
  6. package/dist/assets/InfoCard.css +1 -0
  7. package/dist/assets/OfflineView-DHtzNLwt.css +1 -0
  8. package/dist/{component-DsB0poTj-BDGiEcbP.js → component-DsB0poTj-CeLHB9Ok.js} +3 -3
  9. package/dist/components/DefaultFormNumber/DefaultFormNumber.js +1337 -505
  10. package/dist/components/DefaultFormSelect/DefaultFormSelect.js +25 -25
  11. package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +2 -2
  12. package/dist/components/GenericTable/GenericTable.js +11524 -9875
  13. package/dist/components/HealthChecks/DataBaseHealthCheck.d.ts +2 -2
  14. package/dist/components/HealthChecks/DataBaseHealthCheck.js +2 -2
  15. package/dist/components/HealthChecks/DefaultHealthCheck.d.ts +2 -2
  16. package/dist/components/HealthChecks/DefaultHealthCheck.js +2 -2
  17. package/dist/components/HealthChecks/IotServiceHealthCheck.d.ts +2 -2
  18. package/dist/components/HealthChecks/IotServiceHealthCheck.js +2 -2
  19. package/dist/components/HealthChecks/PlatformHealthCheck.d.ts +2 -2
  20. package/dist/components/HealthChecks/PlatformHealthCheck.js +2 -2
  21. package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +2 -2
  22. package/dist/components/OfflineView/OfflineView.js +2 -2
  23. package/dist/index.es-0QJC9VS2-CNPew9LK.js +360 -0
  24. package/dist/{index.es--yyG47az-DBKBm3yD.js → index.es-BGordhUK-C36NK84Q.js} +400 -365
  25. package/dist/index.es-Bg8hxXM8-BlFd894m.js +1083 -0
  26. package/dist/index.es-Bo1Rhtyb-B650l9Yk.js +79 -0
  27. package/dist/index.es-CK4oZMKs-Da8pin7D.js +14077 -0
  28. package/dist/{index.es-U5-b20Gv-ChQ_O81C.js → index.es-Cq04gn3U-Bvzrqtm6.js} +369 -535
  29. package/dist/{omit-1Eom1PmQ-BLY9iMqj.js → index.es-DENZVv7_-PUEN9sIa.js} +495 -869
  30. package/dist/index.es-IXyb5F6n-B5afcHX8.js +452 -0
  31. package/dist/isTypedArray-Dw_IY7Zq-BZ-4N8-Z.js +210 -0
  32. package/dist/main.d.ts +3 -2
  33. package/dist/main.js +8 -8
  34. package/dist/slicedToArray-BWk2gTCn-Cfzj7tjm.js +432 -0
  35. package/dist/useHelperText-3ahu6tTS.js +391 -0
  36. package/dist/useTranslation-CVaIJbcK.js +5277 -0
  37. package/package.json +4 -4
  38. package/dist/HealthCheckFailed-CqLYAwpc.js +0 -47
  39. package/dist/OfflineView-HbuDPpQL-kqlzfoUS.js +0 -46
  40. package/dist/assets/HealthCheckFailed.css +0 -1
  41. package/dist/assets/OfflineView-HbuDPpQL.css +0 -1
  42. package/dist/index.es-Bx1E5MPK-CaV59rEP.js +0 -344
  43. package/dist/index.es-CzUKBF7E-C0X-mcdY.js +0 -13567
  44. package/dist/index.es-D-ph6ImM-CWxTa_iD.js +0 -63
  45. package/dist/index.es-DDo_AHL0-VqD9ikmU.js +0 -1033
  46. package/dist/index.es-Kg9soDed-BkTwDySy.js +0 -440
  47. package/dist/useHelperText-DD9_Dtkk.js +0 -21
  48. package/dist/useTranslation-B_ODv8uN.js +0 -4306
@@ -1,22 +1,22 @@
1
- import { jsx as c, jsxs as R } from "react/jsx-runtime";
2
- import { G as j, c as M, I, h as P, p as W, a as F, f as H, j as l, m as U } from "./useTranslation-B_ODv8uN.js";
3
- import t, { useState as V, useEffect as k, useMemo as K, forwardRef as q, useRef as O, useImperativeHandle as G, useCallback as Y } from "react";
4
- import { f as B, n as Z } from "./index.es--yyG47az-DBKBm3yD.js";
5
- import { n as J } from "./index.es-D-ph6ImM-CWxTa_iD.js";
6
- import { n as Q } from "./Iconify-Cjdr-ccS.js";
7
- import './assets/LoadingSpinner.css';const X = "_loadingBigOverlay_7dxo1_1", ee = "_bigLoadSpinnerCard_7dxo1_12", re = "_bigLoadSpinnerCardText_7dxo1_27", te = "_logo_7dxo1_33", x = {
8
- loadingBigOverlay: X,
9
- bigLoadSpinnerCard: ee,
10
- bigLoadSpinnerCardText: re,
11
- logo: te
12
- }, se = ({ text: a }) => /* @__PURE__ */ R("div", { className: x.bigLoadSpinnerCard, role: "progressbar", "data-testid": "loading-spinner", children: [
13
- /* @__PURE__ */ c(Q, { icon: "hortiview", className: x.logo, "data-testid": "logo-icon" }),
14
- /* @__PURE__ */ c(B, { tag: "p", bold: !0, level: 1, className: x.bigLoadSpinnerCardText, children: a })
15
- ] }), ae = (a) => /* @__PURE__ */ c("div", { "data-testid": "big-loading-spinner", className: x.loadingBigOverlay, children: /* @__PURE__ */ c(se, { ...a }) });
16
- var p = {
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
- }, d = {
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 T = (
48
+ var q = (
49
49
  /** @class */
50
- function(a) {
51
- P(e, a);
50
+ function(t) {
51
+ J(e, t);
52
52
  function e(r) {
53
- return a.call(this, W(W({}, e.defaultAdapter), r)) || this;
53
+ return t.call(this, $($({}, e.defaultAdapter), r)) || this;
54
54
  }
55
55
  return Object.defineProperty(e, "cssClasses", {
56
56
  get: function() {
57
- return p;
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 d;
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(p.CLOSED_CLASS), this.determinate = !this.adapter.hasClass(p.INDETERMINATE_CLASS), this.progress = 0, this.determinate && this.adapter.setAttribute(d.ARIA_VALUENOW, this.progress.toString()), this.radius = Number(this.adapter.getDeterminateCircleAttribute(d.RADIUS));
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(p.INDETERMINATE_CLASS), this.setProgress(this.progress)) : (this.adapter.addClass(p.INDETERMINATE_CLASS), this.adapter.removeAttribute(d.ARIA_VALUENOW));
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 u = (1 - this.progress) * (2 * Math.PI * this.radius);
99
- this.adapter.setDeterminateCircleAttribute(d.STROKE_DASHOFFSET, "" + u), this.adapter.setAttribute(d.ARIA_VALUENOW, this.progress.toString());
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(p.CLOSED_CLASS), this.adapter.removeAttribute(d.ARIA_HIDDEN);
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(p.CLOSED_CLASS), this.adapter.setAttribute(d.ARIA_HIDDEN, "true");
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
- }(F)
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 ie = (
134
+ var Ce = (
135
135
  /** @class */
136
- function(a) {
137
- P(e, a);
136
+ function(t) {
137
+ J(e, t);
138
138
  function e() {
139
- return a !== null && a.apply(this, arguments) || this;
139
+ return t !== null && t.apply(this, arguments) || this;
140
140
  }
141
141
  return e.prototype.initialize = function() {
142
- this.determinateCircle_ = this.root.querySelector(T.strings.DETERMINATE_CIRCLE_SELECTOR);
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, u = {
182
- addClass: function(s) {
183
- return r.root.classList.add(s);
181
+ var r = this, l = {
182
+ addClass: function(i) {
183
+ return r.root.classList.add(i);
184
184
  },
185
- getDeterminateCircleAttribute: function(s) {
186
- return r.determinateCircle_.getAttribute(s);
185
+ getDeterminateCircleAttribute: function(i) {
186
+ return r.determinateCircle_.getAttribute(i);
187
187
  },
188
- hasClass: function(s) {
189
- return r.root.classList.contains(s);
188
+ hasClass: function(i) {
189
+ return r.root.classList.contains(i);
190
190
  },
191
- removeClass: function(s) {
192
- return r.root.classList.remove(s);
191
+ removeClass: function(i) {
192
+ return r.root.classList.remove(i);
193
193
  },
194
- removeAttribute: function(s) {
195
- return r.root.removeAttribute(s);
194
+ removeAttribute: function(i) {
195
+ return r.root.removeAttribute(i);
196
196
  },
197
- setAttribute: function(s, i) {
198
- return r.root.setAttribute(s, i);
197
+ setAttribute: function(i, d) {
198
+ return r.root.setAttribute(i, d);
199
199
  },
200
- setDeterminateCircleAttribute: function(s, i) {
201
- return r.determinateCircle_.setAttribute(s, i);
200
+ setDeterminateCircleAttribute: function(i, d) {
201
+ return r.determinateCircle_.setAttribute(i, d);
202
202
  }
203
203
  };
204
- return new T(u);
204
+ return new q(l);
205
205
  }, e;
206
- }(H)
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: l.string,
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: l.string,
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: l.oneOf(["sm", "md", "lg"]),
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: l.bool,
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: l.number,
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: U(l.oneOf(["sm", "md", "lg"]), "CircularProgress", "Renamed, see indicatorSize instead."),
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: l.oneOf(["primary", "secondary", "primary-variant", "secondary-variant", "two-color", "two-color-variant"]),
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: l.oneOf(["determinate", "indeterminate"])
259
- }, ne = {
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
- }, A = /* @__PURE__ */ q((a, e) => {
269
- const {
270
- ariaLabel: r,
271
- className: u,
272
- open: s,
273
- progress: i,
274
- size: y,
275
- indicatorSize: b,
276
- themeColor: m,
277
- variant: h,
278
- ...E
279
- } = a, _ = O(), g = O();
280
- G(e, () => _.current, []), k(() => (g.current = ie.attachTo(_.current), () => {
281
- g.current.destroy();
282
- }), []), k(() => {
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
- heightWidth: N,
362
- viewBox: n,
363
- cxCy: o,
364
- r: f,
365
- strokeWidth: v,
366
- strokeWidth80: w,
367
- strokeDashArray: C,
368
- strokeDashoffset: z,
369
- halfStrokeDashoffset: D
370
- } = $(), S = Y(() => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
371
- className: "mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left"
372
- }, /* @__PURE__ */ t.createElement("svg", {
373
- className: "mdc-circular-progress__indeterminate-circle-graphic",
374
- viewBox: `0 0 ${n} ${n}`,
375
- xmlns: "http://www.w3.org/2000/svg"
376
- }, /* @__PURE__ */ t.createElement("circle", {
377
- cx: o,
378
- cy: o,
379
- r: f,
380
- strokeDasharray: C,
381
- strokeDashoffset: D,
382
- strokeWidth: v
383
- }))), /* @__PURE__ */ t.createElement("div", {
384
- className: "mdc-circular-progress__gap-patch"
385
- }, /* @__PURE__ */ t.createElement("svg", {
386
- className: "mdc-circular-progress__indeterminate-circle-graphic",
387
- viewBox: `0 0 ${n} ${n}`,
388
- xmlns: "http://www.w3.org/2000/svg"
389
- }, /* @__PURE__ */ t.createElement("circle", {
390
- cx: o,
391
- cy: o,
392
- r: f,
393
- strokeDasharray: C,
394
- strokeDashoffset: D,
395
- strokeWidth: w
396
- }))), /* @__PURE__ */ t.createElement("div", {
397
- className: "mdc-circular-progress__circle-clipper mdc-circular-progress__circle-right"
398
- }, /* @__PURE__ */ t.createElement("svg", {
399
- className: "mdc-circular-progress__indeterminate-circle-graphic",
400
- viewBox: `0 0 ${n} ${n}`,
401
- xmlns: "http://www.w3.org/2000/svg"
402
- }, /* @__PURE__ */ t.createElement("circle", {
403
- cx: o,
404
- cy: o,
405
- r: f,
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: N,
415
- height: N
401
+ width: z,
402
+ height: z
416
403
  },
417
404
  role: "progressbar",
418
- "aria-label": r,
405
+ "aria-label": i,
419
406
  "aria-valuemin": "0",
420
407
  "aria-valuemax": "1",
421
- "aria-valuenow": i
422
- }, E), /* @__PURE__ */ t.createElement("div", {
408
+ "aria-valuenow": u
409
+ }, G), /* @__PURE__ */ a.createElement("div", {
423
410
  className: "mdc-circular-progress__determinate-container"
424
- }, /* @__PURE__ */ t.createElement("svg", {
411
+ }, /* @__PURE__ */ a.createElement("svg", {
425
412
  className: "mdc-circular-progress__determinate-circle-graphic",
426
- viewBox: `0 0 ${n} ${n}`,
413
+ viewBox: w(r = "0 0 ".concat(n, " ")).call(r, n),
427
414
  xmlns: "http://www.w3.org/2000/svg"
428
- }, /* @__PURE__ */ t.createElement("circle", {
415
+ }, /* @__PURE__ */ a.createElement("circle", {
429
416
  className: "mdc-circular-progress__determinate-track",
430
- cx: o,
431
- cy: o,
417
+ cx: s,
418
+ cy: s,
432
419
  r: f,
433
- strokeWidth: v
434
- }), /* @__PURE__ */ t.createElement("circle", {
420
+ strokeWidth: C
421
+ }), /* @__PURE__ */ a.createElement("circle", {
435
422
  className: "mdc-circular-progress__determinate-circle",
436
- cx: o,
437
- cy: o,
423
+ cx: s,
424
+ cy: s,
438
425
  r: f,
439
- strokeDasharray: C,
440
- strokeDashoffset: z,
441
- strokeWidth: v
442
- }))), /* @__PURE__ */ t.createElement("div", {
426
+ strokeDasharray: y,
427
+ strokeDashoffset: Y,
428
+ strokeWidth: C
429
+ }))), /* @__PURE__ */ a.createElement("div", {
443
430
  className: "mdc-circular-progress__indeterminate-container"
444
- }, /* @__PURE__ */ t.createElement("div", {
445
- className: I("mdc-circular-progress__spinner-layer", L && "mdc-circular-progress__color-1")
446
- }, S()), L && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
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
- }, S()), /* @__PURE__ */ t.createElement("div", {
435
+ }, N()), /* @__PURE__ */ a.createElement("div", {
449
436
  className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-3"
450
- }, S()), /* @__PURE__ */ t.createElement("div", {
437
+ }, N()), /* @__PURE__ */ a.createElement("div", {
451
438
  className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-4"
452
- }, S()))));
439
+ }, N()))));
453
440
  });
454
- A.displayName = "CircularProgress";
455
- A.propTypes = oe;
456
- A.defaultProps = ne;
457
- const ce = "_loadingSpinnerContainer_1f3ss_1", le = {
458
- loadingSpinnerContainer: ce
459
- }, fe = ({
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: u = "bottom",
464
- color: s = "primary",
465
- spinnerOnly: i = !1,
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: y = "This is taking longer than expected. Please be patient.",
468
- impatienceTimeout: b = 10
453
+ impatienceMessage: _ = "This is taking longer than expected. Please be patient.",
454
+ impatienceTimeout: v = 10
469
455
  }) => {
470
- const [m, h] = V(0);
471
- k(() => {
472
- const _ = setInterval(() => {
473
- h((g) => g + 1);
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 E = K(() => y && m > b ? y : r, [y, b, r, m]);
478
- return a === "big" ? /* @__PURE__ */ c(ae, { text: E }) : i ? /* @__PURE__ */ c(
479
- A,
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: s,
483
- indicatorSize: a ?? "md"
468
+ themeColor: i,
469
+ indicatorSize: t ?? "md"
484
470
  }
485
471
  ) : /* @__PURE__ */ c(
486
- J,
472
+ ue,
487
473
  {
488
474
  variant: "standard",
489
475
  style: { textAlign: "center" },
490
- className: e ? le.loadingSpinnerContainer : "",
491
- children: /* @__PURE__ */ R(
492
- Z,
476
+ className: e ? Ee.loadingSpinnerContainer : "",
477
+ children: /* @__PURE__ */ K(
478
+ de,
493
479
  {
494
- direction: u === "right" ? "horizontal" : "vertical",
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
- A,
486
+ W,
501
487
  {
502
488
  "data-testid": "loading-spinner",
503
- themeColor: s,
504
- indicatorSize: a ?? "lg"
489
+ themeColor: i,
490
+ indicatorSize: t ?? "lg"
505
491
  }
506
492
  ),
507
- /* @__PURE__ */ c(B, { themeColor: `text-${s}-on-background`, tag: "div", "data-testid": "loading-text", children: E })
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
- fe as p
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 { h as T, f as E, p as v, a as S } from "./useTranslation-B_ODv8uN.js";
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
- }(S)
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
- }(E)
560
+ }(S)
561
561
  );
562
562
  export {
563
563
  R as D,