@hortiview/shared-components 2.26.3 → 2.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [2.27.0](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.26.3...v2.27.0) (2026-05-26)
2
+
3
+ ### Features
4
+
5
+ * adjust LoadingSpinner for subtext display ([474e6c9](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/474e6c952ba63f53b1fc49edebe33d8aa3535e6e)), closes [#19809](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/issues/19809)
6
+
1
7
  ## [2.26.3](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.26.2...v2.26.3) (2026-05-26)
2
8
 
3
9
  ### Code Refactoring
@@ -1,5 +1,6 @@
1
1
  type BigLoadingSpinnerProps = {
2
2
  text?: string;
3
+ subText?: string;
3
4
  };
4
5
  export declare const BigLoadingSpinner: (props: BigLoadingSpinnerProps) => import("react/jsx-runtime").JSX.Element;
5
6
  export {};
@@ -1,15 +1,26 @@
1
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
- import { T as r } from "../../../index.es-EXzC8zuP.js";
3
- import { Iconify as d } from "../../Iconify/Iconify.js";
4
- import '../../../assets/BigLoadingSpinner.css';const e = "_loadingBigOverlay_7dxo1_1", g = "_bigLoadSpinnerCard_7dxo1_12", t = "_bigLoadSpinnerCardText_7dxo1_27", s = "_logo_7dxo1_33", o = {
5
- loadingBigOverlay: e,
6
- bigLoadSpinnerCard: g,
7
- bigLoadSpinnerCardText: t,
8
- logo: s
9
- }, l = ({ text: n }) => /* @__PURE__ */ a("div", { className: o.bigLoadSpinnerCard, role: "progressbar", "data-testid": "loading-spinner", children: [
10
- /* @__PURE__ */ i(d, { icon: "hortiview", className: o.logo, "data-testid": "logo-icon" }),
11
- /* @__PURE__ */ i(r, { tag: "p", bold: !0, level: 1, className: o.bigLoadSpinnerCardText, children: n })
12
- ] }), b = (n) => /* @__PURE__ */ i("div", { "data-testid": "big-loading-spinner", className: o.loadingBigOverlay, children: /* @__PURE__ */ i(l, { ...n }) });
1
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
+ import { T as r, c as e } from "../../../index.es-EXzC8zuP.js";
3
+ import { Iconify as t } from "../../Iconify/Iconify.js";
4
+ import { P as g } from "../../../index.es-C8AExypY.js";
5
+ import '../../../assets/BigLoadingSpinner.css';const s = "_loadingBigOverlay_7dxo1_1", l = "_bigLoadSpinnerCard_7dxo1_12", c = "_bigLoadSpinnerCardText_7dxo1_27", p = "_logo_7dxo1_33", i = {
6
+ loadingBigOverlay: s,
7
+ bigLoadSpinnerCard: l,
8
+ bigLoadSpinnerCardText: c,
9
+ logo: p
10
+ }, m = ({ text: a, subText: n }) => /* @__PURE__ */ d("div", { className: i.bigLoadSpinnerCard, role: "progressbar", "data-testid": "loading-spinner", children: [
11
+ /* @__PURE__ */ o(t, { icon: "hortiview", className: i.logo, "data-testid": "logo-icon" }),
12
+ /* @__PURE__ */ o(r, { bold: !0, tag: "p", level: 1, className: i.bigLoadSpinnerCardText, children: a }),
13
+ n && /* @__PURE__ */ o(g, { customPadding: "0 0 1rem 0", children: /* @__PURE__ */ o(
14
+ e,
15
+ {
16
+ tag: "p",
17
+ "data-testid": "loading-subText",
18
+ themeColor: "text-secondary-on-background",
19
+ className: i.bigLoadSpinnerCardText,
20
+ children: n
21
+ }
22
+ ) })
23
+ ] }), C = (a) => /* @__PURE__ */ o("div", { "data-testid": "big-loading-spinner", className: i.loadingBigOverlay, children: /* @__PURE__ */ o(m, { ...a }) });
13
24
  export {
14
- b as BigLoadingSpinner
25
+ C as BigLoadingSpinner
15
26
  };
@@ -7,6 +7,10 @@ export type LoadingSpinnerProps = {
7
7
  * text to show below the spinner
8
8
  */
9
9
  text?: string;
10
+ /**
11
+ * Additional text to show below the main text
12
+ */
13
+ subText?: string;
10
14
  /**
11
15
  * defines size of the spinner, excluding the 'big' size which will render a special spinner with the hortiview logo
12
16
  */
@@ -29,15 +33,17 @@ export type LoadingSpinnerProps = {
29
33
  impatienceMessage?: string | null;
30
34
  /**
31
35
  * time in seconds to show the impatience message
36
+ * @remarks To disable the impatience message, set this to 'disabled'
32
37
  */
33
- impatienceTimeout?: number;
38
+ impatienceTimeout?: number | 'disabled';
34
39
  };
35
40
  /**
36
41
  * A loading spinner component that can be used to show loading state in the application.
37
42
  * @param size size of the spinner itself (sm, md, lg, big)
38
- * @attention `'big'` will render a full screen loading spinner with the hortiview logo, other props will be ignored
43
+ * @attention `'big'` will render a full screen loading spinner with the hortiview logo, with an adjusted layout and input blocking
39
44
  * @param center center the spinner in the middle of the container
40
45
  * @param text text to show below the spinner
46
+ * @param subText Additional text to show below the main text
41
47
  * @param textPosition position of the text relative to the spinner (bottom, right)
42
48
  * @param color color of the spinner (primary, secondary)
43
49
  * @param spinnerOnly render only the spinner without any text
@@ -48,4 +54,4 @@ export type LoadingSpinnerProps = {
48
54
  * @example <LoadingSpinner size='md' center color='primary' spinnerOnly={true} />
49
55
  * @returns a loading spinner component
50
56
  */
51
- export declare const LoadingSpinner: ({ size, center, text, textPosition, color, spinnerOnly, impatienceMessage, impatienceTimeout, }: LoadingSpinnerProps) => import("react/jsx-runtime").JSX.Element;
57
+ export declare const LoadingSpinner: ({ size, center, text, subText, textPosition, color, spinnerOnly, impatienceMessage, impatienceTimeout, }: LoadingSpinnerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,17 +1,17 @@
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-_-9ybP20.js";
1
+ import { jsx as C, jsxs as Q } from "react/jsx-runtime";
2
+ import { _ as X, a as Y, c as H, P as m } from "../../../index-_-9ybP20.js";
3
3
  import { i as Z, _ as w, d as ee } from "../../../index.es-DRC-9PLs.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";
4
+ import t, { forwardRef as re, useRef as R, useImperativeHandle as te, useEffect as T, useCallback as se, useState as ae, useMemo as ie } from "react";
5
5
  import { b as q, c as U } from "../../../tslib.es6-BDCynO9F.js";
6
6
  import { M as oe, a as ne } from "../../../component-By6nyiBU.js";
7
7
  import { G as ce } from "../../../index.es-BE1XL1dD.js";
8
8
  import { P as le } from "../../../index.es-C8AExypY.js";
9
- import { T as de } from "../../../index.es-EXzC8zuP.js";
10
- import { BigLoadingSpinner as ue } from "../Big/BigLoadingSpinner.js";
11
- import '../../../assets/LoadingSpinner.css';var p = {
9
+ import { T as de, c as ue } from "../../../index.es-EXzC8zuP.js";
10
+ import { BigLoadingSpinner as me } from "../Big/BigLoadingSpinner.js";
11
+ import '../../../assets/LoadingSpinner.css';var g = {
12
12
  INDETERMINATE_CLASS: "mdc-circular-progress--indeterminate",
13
13
  CLOSED_CLASS: "mdc-circular-progress--closed"
14
- }, m = {
14
+ }, h = {
15
15
  ARIA_HIDDEN: "aria-hidden",
16
16
  ARIA_VALUENOW: "aria-valuenow",
17
17
  DETERMINATE_CIRCLE_SELECTOR: ".mdc-circular-progress__determinate-circle",
@@ -27,13 +27,13 @@ var V = (
27
27
  }
28
28
  return Object.defineProperty(e, "cssClasses", {
29
29
  get: function() {
30
- return p;
30
+ return g;
31
31
  },
32
32
  enumerable: !1,
33
33
  configurable: !0
34
34
  }), Object.defineProperty(e, "strings", {
35
35
  get: function() {
36
- return m;
36
+ return h;
37
37
  },
38
38
  enumerable: !1,
39
39
  configurable: !0
@@ -61,28 +61,28 @@ var V = (
61
61
  enumerable: !1,
62
62
  configurable: !0
63
63
  }), e.prototype.init = function() {
64
- 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));
64
+ this.closed = this.adapter.hasClass(g.CLOSED_CLASS), this.determinate = !this.adapter.hasClass(g.INDETERMINATE_CLASS), this.progress = 0, this.determinate && this.adapter.setAttribute(h.ARIA_VALUENOW, this.progress.toString()), this.radius = Number(this.adapter.getDeterminateCircleAttribute(h.RADIUS));
65
65
  }, e.prototype.setDeterminate = function(r) {
66
- 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));
66
+ this.determinate = r, this.determinate ? (this.adapter.removeClass(g.INDETERMINATE_CLASS), this.setProgress(this.progress)) : (this.adapter.addClass(g.INDETERMINATE_CLASS), this.adapter.removeAttribute(h.ARIA_VALUENOW));
67
67
  }, e.prototype.isDeterminate = function() {
68
68
  return this.determinate;
69
69
  }, e.prototype.setProgress = function(r) {
70
70
  if (this.progress = r, this.determinate) {
71
- var c = (1 - this.progress) * (2 * Math.PI * this.radius);
72
- this.adapter.setDeterminateCircleAttribute(m.STROKE_DASHOFFSET, "" + c), this.adapter.setAttribute(m.ARIA_VALUENOW, this.progress.toString());
71
+ var o = (1 - this.progress) * (2 * Math.PI * this.radius);
72
+ this.adapter.setDeterminateCircleAttribute(h.STROKE_DASHOFFSET, "" + o), this.adapter.setAttribute(h.ARIA_VALUENOW, this.progress.toString());
73
73
  }
74
74
  }, e.prototype.getProgress = function() {
75
75
  return this.progress;
76
76
  }, e.prototype.open = function() {
77
- this.closed = !1, this.adapter.removeClass(p.CLOSED_CLASS), this.adapter.removeAttribute(m.ARIA_HIDDEN);
77
+ this.closed = !1, this.adapter.removeClass(g.CLOSED_CLASS), this.adapter.removeAttribute(h.ARIA_HIDDEN);
78
78
  }, e.prototype.close = function() {
79
- this.closed = !0, this.adapter.addClass(p.CLOSED_CLASS), this.adapter.setAttribute(m.ARIA_HIDDEN, "true");
79
+ this.closed = !0, this.adapter.addClass(g.CLOSED_CLASS), this.adapter.setAttribute(h.ARIA_HIDDEN, "true");
80
80
  }, e.prototype.isClosed = function() {
81
81
  return this.closed;
82
82
  }, e;
83
83
  })(oe)
84
84
  );
85
- var me = (
85
+ var he = (
86
86
  /** @class */
87
87
  (function(s) {
88
88
  q(e, s);
@@ -129,7 +129,7 @@ var me = (
129
129
  }, e.prototype.close = function() {
130
130
  this.foundation.close();
131
131
  }, e.prototype.getDefaultFoundation = function() {
132
- var r = this, c = {
132
+ var r = this, o = {
133
133
  addClass: function(a) {
134
134
  return r.root.classList.add(a);
135
135
  },
@@ -145,14 +145,14 @@ var me = (
145
145
  removeAttribute: function(a) {
146
146
  return r.root.removeAttribute(a);
147
147
  },
148
- setAttribute: function(a, l) {
149
- return r.root.setAttribute(a, l);
148
+ setAttribute: function(a, n) {
149
+ return r.root.setAttribute(a, n);
150
150
  },
151
- setDeterminateCircleAttribute: function(a, l) {
152
- return r.determinateCircle_.setAttribute(a, l);
151
+ setDeterminateCircleAttribute: function(a, n) {
152
+ return r.determinateCircle_.setAttribute(a, n);
153
153
  }
154
154
  };
155
- return new V(c);
155
+ return new V(o);
156
156
  }, e;
157
157
  })(ne)
158
158
  ), pe = {
@@ -161,31 +161,31 @@ var me = (
161
161
  *
162
162
  * Defaults to **'Progress Indicator'**.
163
163
  */
164
- ariaLabel: u.string,
164
+ ariaLabel: m.string,
165
165
  /**
166
166
  * The css class name to be passed through to the component markup.
167
167
  *
168
168
  * Defaults to **undefined**.
169
169
  */
170
- className: u.string,
170
+ className: m.string,
171
171
  /**
172
172
  * The size of the progress indicator.
173
173
  *
174
174
  * Defaults to **'lg'**.
175
175
  */
176
- indicatorSize: u.oneOf(["sm", "md", "lg"]),
176
+ indicatorSize: m.oneOf(["sm", "md", "lg"]),
177
177
  /**
178
178
  * Sets the visibility of the progress indicator.
179
179
  *
180
180
  * Defaults to **true**.
181
181
  */
182
- open: u.bool,
182
+ open: m.bool,
183
183
  /**
184
184
  * The current progress of a determinate progress indicator. Must be between 0 and 1.
185
185
  *
186
186
  * Defaults to **0**.
187
187
  */
188
- progress: u.number,
188
+ progress: m.number,
189
189
  /**
190
190
  * @deprecated _Renamed, see indicatorSize instead._
191
191
  *
@@ -193,20 +193,20 @@ var me = (
193
193
  *
194
194
  * Defaults to **undefined**.
195
195
  */
196
- size: ee(u.oneOf(["sm", "md", "lg"]), "CircularProgress", "Renamed, see indicatorSize instead."),
196
+ size: ee(m.oneOf(["sm", "md", "lg"]), "CircularProgress", "Renamed, see indicatorSize instead."),
197
197
  /**
198
198
  * Color of the indicator stroke with 'primary' or 'secondary' theme color.
199
199
  *
200
200
  * Defaults to **'primary'**.
201
201
  */
202
- 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"]),
202
+ 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"]),
203
203
  /**
204
204
  * An indeterminate CircularProgress indicator will continue spinning until closed. A determinate CircularProgress indicator will display the current progress.
205
205
  *
206
206
  * Defaults to **'indeterminate'**.
207
207
  */
208
- variant: u.oneOf(["determinate", "indeterminate"])
209
- }, he = {
208
+ variant: m.oneOf(["determinate", "indeterminate"])
209
+ }, fe = {
210
210
  ariaLabel: "Progress Indicator",
211
211
  className: void 0,
212
212
  indicatorSize: "lg",
@@ -214,21 +214,21 @@ var me = (
214
214
  progress: 0,
215
215
  themeColor: "primary",
216
216
  variant: "indeterminate"
217
- }, fe = ["ariaLabel", "className", "open", "progress", "size", "indicatorSize", "themeColor", "variant"], h = he, W = /* @__PURE__ */ re(function(s, e) {
218
- 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;
217
+ }, ge = ["ariaLabel", "className", "open", "progress", "size", "indicatorSize", "themeColor", "variant"], v = fe, W = /* @__PURE__ */ re(function(s, e) {
218
+ var r, o = s.ariaLabel, a = o === void 0 ? v.ariaLabel : o, n = s.className, P = n === void 0 ? v.className : n, d = s.open, y = d === void 0 ? v.open : d, p = s.progress, f = p === void 0 ? v.progress : p;
219
219
  s.size;
220
- var k = s.indicatorSize, P = k === void 0 ? h.indicatorSize : k, R = s.themeColor, E = R === void 0 ? h.themeColor : R, O = s.variant, b = O === void 0 ? h.variant : O, G = X(s, fe), L = H(), S = H();
220
+ var u = s.indicatorSize, k = u === void 0 ? v.indicatorSize : u, O = s.themeColor, E = O === void 0 ? v.themeColor : O, z = s.variant, b = z === void 0 ? v.variant : z, G = X(s, ge), L = R(), S = R();
221
221
  te(e, function() {
222
222
  return L.current;
223
223
  }, []), T(function() {
224
- return S.current = me.attachTo(L.current), function() {
224
+ return S.current = he.attachTo(L.current), function() {
225
225
  S.current.destroy();
226
226
  };
227
227
  }, []), T(function() {
228
- (b === "determinate" && d < 0 || d > 1) && Z("CircularProgress: `progress` must be between 0 and 1."), S.current.determinate = b === "determinate", S.current.progress = d;
229
- }, [d, b]);
228
+ (b === "determinate" && f < 0 || f > 1) && Z("CircularProgress: `progress` must be between 0 and 1."), S.current.determinate = b === "determinate", S.current.progress = f;
229
+ }, [f, b]);
230
230
  var K = function() {
231
- switch (P) {
231
+ switch (k) {
232
232
  case "xs":
233
233
  return {
234
234
  heightWidth: "16px",
@@ -302,86 +302,86 @@ var me = (
302
302
  halfStrokeDashoffset: "56.549"
303
303
  };
304
304
  }
305
- }, o = K(), z = o.heightWidth, n = o.viewBox, i = o.cxCy, f = o.r, _ = o.strokeWidth, B = o.strokeWidth80, C = o.strokeDashArray, J = o.strokeDashoffset, x = o.halfStrokeDashoffset, N = se(function() {
306
- var I, F, j;
305
+ }, c = K(), B = c.heightWidth, l = c.viewBox, i = c.cxCy, _ = c.r, D = c.strokeWidth, M = c.strokeWidth80, A = c.strokeDashArray, J = c.strokeDashoffset, x = c.halfStrokeDashoffset, N = se(function() {
306
+ var I, j, $;
307
307
  return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
308
308
  className: "mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left"
309
309
  }, /* @__PURE__ */ t.createElement("svg", {
310
310
  className: "mdc-circular-progress__indeterminate-circle-graphic",
311
- viewBox: w(I = "0 0 ".concat(n, " ")).call(I, n),
311
+ viewBox: w(I = "0 0 ".concat(l, " ")).call(I, l),
312
312
  xmlns: "http://www.w3.org/2000/svg"
313
313
  }, /* @__PURE__ */ t.createElement("circle", {
314
314
  cx: i,
315
315
  cy: i,
316
- r: f,
317
- strokeDasharray: C,
316
+ r: _,
317
+ strokeDasharray: A,
318
318
  strokeDashoffset: x,
319
- strokeWidth: _
319
+ strokeWidth: D
320
320
  }))), /* @__PURE__ */ t.createElement("div", {
321
321
  className: "mdc-circular-progress__gap-patch"
322
322
  }, /* @__PURE__ */ t.createElement("svg", {
323
323
  className: "mdc-circular-progress__indeterminate-circle-graphic",
324
- viewBox: w(F = "0 0 ".concat(n, " ")).call(F, n),
324
+ viewBox: w(j = "0 0 ".concat(l, " ")).call(j, l),
325
325
  xmlns: "http://www.w3.org/2000/svg"
326
326
  }, /* @__PURE__ */ t.createElement("circle", {
327
327
  cx: i,
328
328
  cy: i,
329
- r: f,
330
- strokeDasharray: C,
329
+ r: _,
330
+ strokeDasharray: A,
331
331
  strokeDashoffset: x,
332
- strokeWidth: B
332
+ strokeWidth: M
333
333
  }))), /* @__PURE__ */ t.createElement("div", {
334
334
  className: "mdc-circular-progress__circle-clipper mdc-circular-progress__circle-right"
335
335
  }, /* @__PURE__ */ t.createElement("svg", {
336
336
  className: "mdc-circular-progress__indeterminate-circle-graphic",
337
- viewBox: w(j = "0 0 ".concat(n, " ")).call(j, n),
337
+ viewBox: w($ = "0 0 ".concat(l, " ")).call($, l),
338
338
  xmlns: "http://www.w3.org/2000/svg"
339
339
  }, /* @__PURE__ */ t.createElement("circle", {
340
340
  cx: i,
341
341
  cy: i,
342
- r: f,
343
- strokeDasharray: C,
342
+ r: _,
343
+ strokeDasharray: A,
344
344
  strokeDashoffset: x,
345
- strokeWidth: _
345
+ strokeWidth: D
346
346
  }))));
347
- }, [i, x, f, C, _, B, n]), M = E === "two-color" || E === "two-color-variant";
347
+ }, [i, x, _, A, D, M, l]), F = E === "two-color" || E === "two-color-variant";
348
348
  return /* @__PURE__ */ t.createElement("div", Y({
349
349
  ref: L,
350
- className: $("lmnt", "mdc-circular-progress", b === "indeterminate" && "mdc-circular-progress--indeterminate", !D && "mdc-circular-progress--closed", E && "lmnt-circular-progress--".concat(E), g),
350
+ className: H("lmnt", "mdc-circular-progress", b === "indeterminate" && "mdc-circular-progress--indeterminate", !y && "mdc-circular-progress--closed", E && "lmnt-circular-progress--".concat(E), P),
351
351
  style: {
352
- width: z,
353
- height: z
352
+ width: B,
353
+ height: B
354
354
  },
355
355
  role: "progressbar",
356
356
  "aria-label": a,
357
357
  "aria-valuemin": "0",
358
358
  "aria-valuemax": "1",
359
- "aria-valuenow": d
359
+ "aria-valuenow": f
360
360
  }, G), /* @__PURE__ */ t.createElement("div", {
361
361
  className: "mdc-circular-progress__determinate-container"
362
362
  }, /* @__PURE__ */ t.createElement("svg", {
363
363
  className: "mdc-circular-progress__determinate-circle-graphic",
364
- viewBox: w(r = "0 0 ".concat(n, " ")).call(r, n),
364
+ viewBox: w(r = "0 0 ".concat(l, " ")).call(r, l),
365
365
  xmlns: "http://www.w3.org/2000/svg"
366
366
  }, /* @__PURE__ */ t.createElement("circle", {
367
367
  className: "mdc-circular-progress__determinate-track",
368
368
  cx: i,
369
369
  cy: i,
370
- r: f,
371
- strokeWidth: _
370
+ r: _,
371
+ strokeWidth: D
372
372
  }), /* @__PURE__ */ t.createElement("circle", {
373
373
  className: "mdc-circular-progress__determinate-circle",
374
374
  cx: i,
375
375
  cy: i,
376
- r: f,
377
- strokeDasharray: C,
376
+ r: _,
377
+ strokeDasharray: A,
378
378
  strokeDashoffset: J,
379
- strokeWidth: _
379
+ strokeWidth: D
380
380
  }))), /* @__PURE__ */ t.createElement("div", {
381
381
  className: "mdc-circular-progress__indeterminate-container"
382
382
  }, /* @__PURE__ */ t.createElement("div", {
383
- className: $("mdc-circular-progress__spinner-layer", M && "mdc-circular-progress__color-1")
384
- }, N()), M && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
383
+ className: H("mdc-circular-progress__spinner-layer", F && "mdc-circular-progress__color-1")
384
+ }, N()), F && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
385
385
  className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-2"
386
386
  }, N()), /* @__PURE__ */ t.createElement("div", {
387
387
  className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-3"
@@ -391,59 +391,71 @@ var me = (
391
391
  });
392
392
  W.displayName = "CircularProgress";
393
393
  W.propTypes = pe;
394
- const ge = "_centered_1aq9c_1", ve = {
395
- centered: ge
396
- }, Ne = ({
394
+ const ve = "_centered_1aq9c_1", _e = {
395
+ centered: ve
396
+ }, we = ({
397
397
  size: s,
398
398
  center: e = !1,
399
399
  text: r,
400
- textPosition: c = "bottom",
401
- color: a = "primary",
402
- spinnerOnly: l = !1,
400
+ subText: o,
401
+ textPosition: a = "bottom",
402
+ color: n = "primary",
403
+ spinnerOnly: P = !1,
403
404
  //Due to we don't have (and want) to use a translation logic in this component, we are using a hardcoded message
404
- impatienceMessage: g = "This is taking longer than expected. Please be patient.",
405
- impatienceTimeout: v = 10
405
+ impatienceMessage: d = "This is taking longer than expected. Please be patient.",
406
+ impatienceTimeout: y = 10
406
407
  }) => {
407
- const [D, A] = ae(0);
408
+ const [p, f] = ae(!1), u = R(null);
408
409
  T(() => {
409
- const k = setInterval(() => {
410
- A((P) => P + 1);
411
- }, 1e3);
412
- return () => clearInterval(k);
413
- }, []);
414
- const d = ie(() => g && D > v ? g : r, [g, v, r, D]);
415
- return s === "big" ? /* @__PURE__ */ y(ue, { text: d }) : l ? /* @__PURE__ */ y(
410
+ if (!(u.current || p))
411
+ return y !== "disabled" && d && (u.current = setTimeout(() => {
412
+ f(!0);
413
+ }, y * 1e3)), () => {
414
+ u.current && (clearTimeout(u.current), u.current = null);
415
+ };
416
+ }, [d, y, p]);
417
+ const k = ie(() => p && d ? d : r, [d, p, r]);
418
+ return s === "big" ? /* @__PURE__ */ C(me, { text: k, subText: o }) : P ? /* @__PURE__ */ C(
416
419
  W,
417
420
  {
418
421
  "data-testid": "loading-spinner",
419
- themeColor: a,
422
+ themeColor: n,
420
423
  indicatorSize: s ?? "md"
421
424
  }
422
- ) : /* @__PURE__ */ y(
425
+ ) : /* @__PURE__ */ C(
423
426
  le,
424
427
  {
425
428
  "data-testid": "loading-spinner-padding",
426
429
  variant: "standard",
427
- className: e ? ve.centered : "",
430
+ className: e ? _e.centered : "",
428
431
  children: /* @__PURE__ */ Q(
429
432
  ce,
430
433
  {
431
434
  "data-testid": "loading-spinner-group",
432
435
  fullWidth: !0,
433
- direction: c === "right" ? "horizontal" : "vertical",
436
+ direction: a === "right" ? "horizontal" : "vertical",
434
437
  gap: "dense",
435
438
  primaryAlign: "center",
436
439
  secondaryAlign: "center",
437
440
  children: [
438
- /* @__PURE__ */ y(
441
+ /* @__PURE__ */ C(
439
442
  W,
440
443
  {
441
444
  "data-testid": "loading-spinner",
442
- themeColor: a,
445
+ themeColor: n,
443
446
  indicatorSize: s ?? "lg"
444
447
  }
445
448
  ),
446
- /* @__PURE__ */ y(de, { themeColor: `text-${a}-on-background`, tag: "div", "data-testid": "loading-text", children: d })
449
+ /* @__PURE__ */ C(de, { themeColor: `text-${n}-on-background`, tag: "div", "data-testid": "loading-text", children: k }),
450
+ o && /* @__PURE__ */ C(
451
+ ue,
452
+ {
453
+ themeColor: "text-secondary-on-background",
454
+ tag: "p",
455
+ "data-testid": "loading-subText",
456
+ children: o
457
+ }
458
+ )
447
459
  ]
448
460
  }
449
461
  )
@@ -451,5 +463,5 @@ const ge = "_centered_1aq9c_1", ve = {
451
463
  );
452
464
  };
453
465
  export {
454
- Ne as LoadingSpinner
466
+ we as LoadingSpinner
455
467
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hortiview/shared-components",
3
3
  "description": "This is a shared component library. It should used in the HortiView platform and its modules.",
4
- "version": "2.26.3",
4
+ "version": "2.27.0",
5
5
  "type": "module",
6
6
  "repository": "https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared",
7
7
  "author": "Falk Menge <falk.menge.ext@bayer.com>",