@hortiview/shared-components 2.26.2 → 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 +14 -0
- package/dist/assets/TopBarBanner.css +1 -0
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.d.ts +1 -0
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +24 -13
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.d.ts +9 -3
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +101 -89
- package/dist/components/Modal/Modal.d.ts +2 -2
- package/dist/components/Modal/Modal.js +33 -33
- package/dist/components/{ErrorBanner/ErrorBanner.d.ts → TopBarBanner/TopBarBanner.d.ts} +5 -4
- package/dist/components/TopBarBanner/TopBarBanner.js +78 -0
- package/dist/main.d.ts +2 -2
- package/dist/main.js +56 -56
- package/package.json +1 -1
- package/dist/assets/ErrorBanner.css +0 -1
- package/dist/components/ErrorBanner/ErrorBanner.js +0 -70
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
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
|
+
|
|
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)
|
|
8
|
+
|
|
9
|
+
### Code Refactoring
|
|
10
|
+
|
|
11
|
+
* rename data-testid attributes in TopBarBanner ([7288027](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/728802796388639b5bd2c8bf3c36b0a914c04626))
|
|
12
|
+
* rename ErrorBanner to TopBarBanner + add icon property ([a1ea6cb](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/a1ea6cb98ce6f84172835eeb79c8829bd354d2f5))
|
|
13
|
+
* simplify border properties in standaloneBorder class ([b8fab48](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/commit/b8fab48e5f02412c4769d13d68f5bab136e844d6))
|
|
14
|
+
|
|
1
15
|
## [2.26.2](https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared/compare/v2.26.1...v2.26.2) (2026-05-26)
|
|
2
16
|
|
|
3
17
|
### Code Refactoring
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._bannerPadding_1ijh0_1{width:100%;box-sizing:border-box;background-color:var(--lmnt-theme-secondary-50)}._bottomBorder_1ijh0_7{border-top:1px solid var(--lmnt-theme-secondary-100);border-bottom:1px solid var(--lmnt-theme-secondary-100)}._standaloneBorder_1ijh0_12{border:1px solid var(--lmnt-theme-secondary-100);border-radius:.5rem}
|
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { T as r } from "../../../index.es-EXzC8zuP.js";
|
|
3
|
-
import { Iconify as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
|
2
|
-
import { _ as X, a as Y, c as
|
|
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
|
|
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
|
|
11
|
-
import '../../../assets/LoadingSpinner.css';var
|
|
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
|
-
},
|
|
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
|
|
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
|
|
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(
|
|
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(
|
|
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
|
|
72
|
-
this.adapter.setDeterminateCircleAttribute(
|
|
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(
|
|
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(
|
|
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
|
|
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,
|
|
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,
|
|
149
|
-
return r.root.setAttribute(a,
|
|
148
|
+
setAttribute: function(a, n) {
|
|
149
|
+
return r.root.setAttribute(a, n);
|
|
150
150
|
},
|
|
151
|
-
setDeterminateCircleAttribute: function(a,
|
|
152
|
-
return r.determinateCircle_.setAttribute(a,
|
|
151
|
+
setDeterminateCircleAttribute: function(a, n) {
|
|
152
|
+
return r.determinateCircle_.setAttribute(a, n);
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
|
-
return new V(
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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(
|
|
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:
|
|
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:
|
|
209
|
-
},
|
|
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
|
-
},
|
|
218
|
-
var r,
|
|
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
|
|
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 =
|
|
224
|
+
return S.current = he.attachTo(L.current), function() {
|
|
225
225
|
S.current.destroy();
|
|
226
226
|
};
|
|
227
227
|
}, []), T(function() {
|
|
228
|
-
(b === "determinate" &&
|
|
229
|
-
}, [
|
|
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 (
|
|
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
|
-
},
|
|
306
|
-
var I,
|
|
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(
|
|
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:
|
|
317
|
-
strokeDasharray:
|
|
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(
|
|
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:
|
|
330
|
-
strokeDasharray:
|
|
329
|
+
r: _,
|
|
330
|
+
strokeDasharray: A,
|
|
331
331
|
strokeDashoffset: x,
|
|
332
|
-
strokeWidth:
|
|
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(
|
|
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:
|
|
343
|
-
strokeDasharray:
|
|
342
|
+
r: _,
|
|
343
|
+
strokeDasharray: A,
|
|
344
344
|
strokeDashoffset: x,
|
|
345
|
-
strokeWidth:
|
|
345
|
+
strokeWidth: D
|
|
346
346
|
}))));
|
|
347
|
-
}, [i, x,
|
|
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:
|
|
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:
|
|
353
|
-
height:
|
|
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":
|
|
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(
|
|
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:
|
|
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:
|
|
377
|
-
strokeDasharray:
|
|
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:
|
|
384
|
-
}, N()),
|
|
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
|
|
395
|
-
centered:
|
|
396
|
-
},
|
|
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
|
-
|
|
401
|
-
|
|
402
|
-
|
|
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:
|
|
405
|
-
impatienceTimeout:
|
|
405
|
+
impatienceMessage: d = "This is taking longer than expected. Please be patient.",
|
|
406
|
+
impatienceTimeout: y = 10
|
|
406
407
|
}) => {
|
|
407
|
-
const [
|
|
408
|
+
const [p, f] = ae(!1), u = R(null);
|
|
408
409
|
T(() => {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
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:
|
|
422
|
+
themeColor: n,
|
|
420
423
|
indicatorSize: s ?? "md"
|
|
421
424
|
}
|
|
422
|
-
) : /* @__PURE__ */
|
|
425
|
+
) : /* @__PURE__ */ C(
|
|
423
426
|
le,
|
|
424
427
|
{
|
|
425
428
|
"data-testid": "loading-spinner-padding",
|
|
426
429
|
variant: "standard",
|
|
427
|
-
className: e ?
|
|
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:
|
|
436
|
+
direction: a === "right" ? "horizontal" : "vertical",
|
|
434
437
|
gap: "dense",
|
|
435
438
|
primaryAlign: "center",
|
|
436
439
|
secondaryAlign: "center",
|
|
437
440
|
children: [
|
|
438
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ C(
|
|
439
442
|
W,
|
|
440
443
|
{
|
|
441
444
|
"data-testid": "loading-spinner",
|
|
442
|
-
themeColor:
|
|
445
|
+
themeColor: n,
|
|
443
446
|
indicatorSize: s ?? "lg"
|
|
444
447
|
}
|
|
445
448
|
),
|
|
446
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
466
|
+
we as LoadingSpinner
|
|
455
467
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModalProps as ElementModalProps } from '@element-public/react-modal';
|
|
2
2
|
import { AvailableCustomIcons } from '../../enums/AvailableCustomIcons';
|
|
3
|
-
import { ErrorBannerProps } from '../ErrorBanner/ErrorBanner';
|
|
4
3
|
import { OfflineViewProps } from '../OfflineView/OfflineView';
|
|
4
|
+
import { TopBarBannerProps } from '../TopBarBanner/TopBarBanner';
|
|
5
5
|
|
|
6
6
|
type ModalProps = Omit<ElementModalProps, 'primaryButton'> & React.HTMLProps<HTMLElement> & React.DOMAttributes<HTMLElement> & {
|
|
7
7
|
closeIcon?: keyof typeof AvailableCustomIcons | string;
|
|
@@ -9,7 +9,7 @@ type ModalProps = Omit<ElementModalProps, 'primaryButton'> & React.HTMLProps<HTM
|
|
|
9
9
|
isOnline?: boolean;
|
|
10
10
|
offlineViewProps?: Partial<OfflineViewProps>;
|
|
11
11
|
} & {
|
|
12
|
-
errorBannerProps?: Pick<
|
|
12
|
+
errorBannerProps?: Pick<TopBarBannerProps, 'title' | 'description' | 'primaryActionLabel' | 'onPrimaryAction' | 'secondaryActionLabel' | 'onSecondaryAction'> & {
|
|
13
13
|
hasError: boolean;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
@@ -11,9 +11,9 @@ import { M as ce, c as ue, m as de } from "../../component-DYpB_4EP.js";
|
|
|
11
11
|
import { A as me } from "../../animationframe-CqXArbwZ.js";
|
|
12
12
|
import { P as fe } from "../../index.es-C8AExypY.js";
|
|
13
13
|
import { b as pe } from "../../index.es-EXzC8zuP.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { Iconify as he } from "../Iconify/Iconify.js";
|
|
15
|
+
import { OfflineView as ge } from "../OfflineView/OfflineView.js";
|
|
16
|
+
import { TopBarBanner as _e } from "../TopBarBanner/TopBarBanner.js";
|
|
17
17
|
import '../../assets/Modal.css';function Ce(o, e, t) {
|
|
18
18
|
return e(o, { initialFocusEl: t });
|
|
19
19
|
}
|
|
@@ -493,7 +493,7 @@ var f = Kt.strings, Ae = (
|
|
|
493
493
|
return this.root.querySelector("[" + f.INITIAL_FOCUS_ATTRIBUTE + "]");
|
|
494
494
|
}, e;
|
|
495
495
|
})(se)
|
|
496
|
-
),
|
|
496
|
+
), Te = {
|
|
497
497
|
/**
|
|
498
498
|
* An action button that will not automatically trigger a dismiss or accept. It is meant to be used only in certain circumstances where more control of the modal is required such as validating forms. If primaryButton is sent with actionButton, actionButton will be ignored.
|
|
499
499
|
*
|
|
@@ -662,7 +662,7 @@ var f = Kt.strings, Ae = (
|
|
|
662
662
|
* Defaults to **null**.
|
|
663
663
|
*/
|
|
664
664
|
title: l.string
|
|
665
|
-
},
|
|
665
|
+
}, be = {
|
|
666
666
|
actionButton: null,
|
|
667
667
|
backButton: null,
|
|
668
668
|
badge: void 0,
|
|
@@ -691,17 +691,17 @@ var f = Kt.strings, Ae = (
|
|
|
691
691
|
returnFocusSelector: null,
|
|
692
692
|
scrollable: !1,
|
|
693
693
|
title: null
|
|
694
|
-
}, Ie = ["actionButton", "actionIcons", "badge", "backButton", "children", "className", "content", "defaultButton", "dismissiveButton", "footerSupplemental", "headerActions", "hideCloseIcon", "indicator", "initialFocus", "mobileStackedButtons", "modalSize", "nextButton", "noActions", "onClose", "onClosed", "onOpen", "onOpened", "open", "preventClose", "preventPrimaryAccept", "primaryButton", "returnFocusSelector", "scrollable", "title", "iconSource"], r =
|
|
695
|
-
var t = o.actionButton, n = t === void 0 ? r.actionButton : t, i = o.actionIcons, a = i === void 0 ? r.actionIcons : i, d = o.badge, h = d === void 0 ? r.badge : d, O = o.backButton, _ = O === void 0 ? r.backButton : O, S = o.children, F = S === void 0 ? r.children : S,
|
|
694
|
+
}, Ie = ["actionButton", "actionIcons", "badge", "backButton", "children", "className", "content", "defaultButton", "dismissiveButton", "footerSupplemental", "headerActions", "hideCloseIcon", "indicator", "initialFocus", "mobileStackedButtons", "modalSize", "nextButton", "noActions", "onClose", "onClosed", "onOpen", "onOpened", "open", "preventClose", "preventPrimaryAccept", "primaryButton", "returnFocusSelector", "scrollable", "title", "iconSource"], r = be, ot = /* @__PURE__ */ ee(function(o, e) {
|
|
695
|
+
var t = o.actionButton, n = t === void 0 ? r.actionButton : t, i = o.actionIcons, a = i === void 0 ? r.actionIcons : i, d = o.badge, h = d === void 0 ? r.badge : d, O = o.backButton, _ = O === void 0 ? r.backButton : O, S = o.children, F = S === void 0 ? r.children : S, T = o.className, W = T === void 0 ? r.className : T, E = o.content, L = E === void 0 ? r.content : E, it = o.defaultButton, b = it === void 0 ? r.defaultButton : it, at = o.dismissiveButton, R = at === void 0 ? r.dismissiveButton : at, rt = o.footerSupplemental, w = rt === void 0 ? r.footerSupplemental : rt, lt = o.headerActions, st = lt === void 0 ? r.headerActions : lt, ct = o.hideCloseIcon, V = ct === void 0 ? r.hideCloseIcon : ct, ut = o.indicator, Wt = ut === void 0 ? r.indicator : ut, dt = o.initialFocus, I = dt === void 0 ? r.initialFocus : dt, mt = o.mobileStackedButtons, z = mt === void 0 ? r.mobileStackedButtons : mt, ft = o.modalSize, C = ft === void 0 ? r.modalSize : ft, pt = o.nextButton, B = pt === void 0 ? r.nextButton : pt, ht = o.noActions, N = ht === void 0 ? r.noActions : ht, gt = o.onClose, j = gt === void 0 ? r.onClose : gt, _t = o.onClosed, q = _t === void 0 ? r.onClosed : _t, Ct = o.onOpen, k = Ct === void 0 ? r.onOpen : Ct, vt = o.onOpened, M = vt === void 0 ? r.onOpened : vt, Et = o.open, St = Et === void 0 ? r.open : Et, yt = o.preventClose, Y = yt === void 0 ? r.preventClose : yt, Ot = o.preventPrimaryAccept, At = Ot === void 0 ? r.preventPrimaryAccept : Ot, Tt = o.primaryButton, u = Tt === void 0 ? r.primaryButton : Tt, bt = o.returnFocusSelector, J = bt === void 0 ? r.returnFocusSelector : bt, It = o.scrollable, Bt = It === void 0 ? r.scrollable : It, Nt = o.title, Dt = Nt === void 0 ? r.title : Nt, Ft = o.iconSource, Vt = Ft === void 0 ? r.iconSource : Ft, zt = Zt(o, Ie), P = Pt(), c = Pt();
|
|
696
696
|
ne(e, function() {
|
|
697
697
|
return P.current;
|
|
698
698
|
}, []);
|
|
699
699
|
var jt = Ht(), Lt = Mt(jt, 2), Q = Lt[0], qt = Lt[1], Yt = Ht(function() {
|
|
700
|
-
return
|
|
700
|
+
return B || _;
|
|
701
701
|
}), Rt = Mt(Yt, 2), X = Rt[0], Jt = Rt[1];
|
|
702
702
|
v(function() {
|
|
703
|
-
Jt(
|
|
704
|
-
}, [
|
|
703
|
+
Jt(B || _);
|
|
704
|
+
}, [B, _]);
|
|
705
705
|
var H = Z(function() {
|
|
706
706
|
xt() && qt(window.innerWidth <= 600);
|
|
707
707
|
}, []);
|
|
@@ -717,9 +717,9 @@ var f = Kt.strings, Ae = (
|
|
|
717
717
|
}, [c, P]), v(function() {
|
|
718
718
|
c.current.foundation.setAutoStackButtons(z);
|
|
719
719
|
}, [z]), v(function() {
|
|
720
|
-
|
|
720
|
+
N && (c.current.foundation.adapter.trapFocus = function() {
|
|
721
721
|
});
|
|
722
|
-
}, [
|
|
722
|
+
}, [N]), v(function() {
|
|
723
723
|
c.current.scrimClickAction = Y ? "" : "close", c.current.escapeKeyAction = Y ? "" : "close";
|
|
724
724
|
}, [Y]);
|
|
725
725
|
var x = Z(function(p) {
|
|
@@ -753,9 +753,9 @@ var f = Kt.strings, Ae = (
|
|
|
753
753
|
elevation: n?.props.elevation !== "default" ? n?.props.elevation : "flat",
|
|
754
754
|
variant: n?.props.variant || "filled"
|
|
755
755
|
};
|
|
756
|
-
return
|
|
756
|
+
return b === "action" && (p["data-mdc-dialog-button-default"] = !0), I === "action" && (p["data-mdc-dialog-initial-focus"] = !0), p;
|
|
757
757
|
};
|
|
758
|
-
}, [n?.props.elevation, n?.props.variant,
|
|
758
|
+
}, [n?.props.elevation, n?.props.variant, b, I]), Xt = nt(function() {
|
|
759
759
|
return function() {
|
|
760
760
|
var p = {
|
|
761
761
|
className: "lmnt-modal__button mdc-dialog__button",
|
|
@@ -763,20 +763,20 @@ var f = Kt.strings, Ae = (
|
|
|
763
763
|
elevation: u?.props.elevation !== "default" ? u?.props.elevation : "flat",
|
|
764
764
|
variant: u?.props.variant || "filled"
|
|
765
765
|
};
|
|
766
|
-
return
|
|
766
|
+
return b === "primary" && (p["data-mdc-dialog-button-default"] = !0), I === "primary" && (p["data-mdc-dialog-initial-focus"] = !0), p;
|
|
767
767
|
};
|
|
768
|
-
}, [At,
|
|
768
|
+
}, [At, b, I, u?.props.elevation, u?.props.variant]);
|
|
769
769
|
return /* @__PURE__ */ m.createElement("aside", te({
|
|
770
770
|
ref: P,
|
|
771
|
-
className: G("lmnt", "lmnt-modal", "mdc-dialog",
|
|
771
|
+
className: G("lmnt", "lmnt-modal", "mdc-dialog", Bt && "lmnt-modal--scrollable mdc-dialog--scrollable", W),
|
|
772
772
|
role: "alertdialog"
|
|
773
773
|
}, zt), /* @__PURE__ */ m.createElement("div", {
|
|
774
|
-
className: G("lmnt-modal__container", "mdc-dialog__container", C === "fullscreen" && "mdc-dialog--fullscreen", C === "max" && "lmnt-modal__max", C === "xlarge" && "lmnt-modal__xl", C === "large" && "lmnt-modal__lg", C === "medium" && "lmnt-modal__md", C === "small" && "lmnt-modal__sm", (C === "mobile" || Q) && "lmnt-modal__mobile", C === "dialog" && "lmnt-modal__dialog",
|
|
774
|
+
className: G("lmnt-modal__container", "mdc-dialog__container", C === "fullscreen" && "mdc-dialog--fullscreen", C === "max" && "lmnt-modal__max", C === "xlarge" && "lmnt-modal__xl", C === "large" && "lmnt-modal__lg", C === "medium" && "lmnt-modal__md", C === "small" && "lmnt-modal__sm", (C === "mobile" || Q) && "lmnt-modal__mobile", C === "dialog" && "lmnt-modal__dialog", N && "lmnt-modal-no-actions")
|
|
775
775
|
}, /* @__PURE__ */ m.createElement("div", {
|
|
776
776
|
className: "lmnt-modal__surface mdc-dialog__surface"
|
|
777
777
|
}, /* @__PURE__ */ m.createElement("header", {
|
|
778
|
-
className: G("lmnt-modal__title", "mdc-dialog__title", (C === "dialog" || V) && "lmnt-modal_title-hide-close-icon", a && "lmnt-modal_title-actionsIcons",
|
|
779
|
-
}, !V && C !== "dialog" && !
|
|
778
|
+
className: G("lmnt-modal__title", "mdc-dialog__title", (C === "dialog" || V) && "lmnt-modal_title-hide-close-icon", a && "lmnt-modal_title-actionsIcons", Bt && "lmnt-modal__title-scrollable", (V || C === "dialog" || N) && "lmnt-modal--no-close-icon")
|
|
779
|
+
}, !V && C !== "dialog" && !N && /* @__PURE__ */ m.createElement(Ut, {
|
|
780
780
|
className: "mdc-icon-button material-icons mdc-dialog__close",
|
|
781
781
|
"data-mdc-dialog-action": "close",
|
|
782
782
|
icon: "clear",
|
|
@@ -790,13 +790,13 @@ var f = Kt.strings, Ae = (
|
|
|
790
790
|
}
|
|
791
791
|
}, h)), (L || F) && /* @__PURE__ */ m.createElement("section", {
|
|
792
792
|
className: "lmnt-modal__content mdc-dialog__content"
|
|
793
|
-
}, L || F), Wt, (n || _ || R ||
|
|
793
|
+
}, L || F), Wt, (n || _ || R || B || u || w) && /* @__PURE__ */ m.createElement("footer", {
|
|
794
794
|
className: G("lmnt-modal__actions", "mdc-dialog__actions", Q && "lmnt-dialog__actions__mobile", w && "lmnt-modal__actions--supplemental-btn", Q && z && "lmnt-modal_actions-mobile-stacked")
|
|
795
795
|
}, !X && w && /* @__PURE__ */ m.createElement("div", {
|
|
796
796
|
className: "lmnt-dialog__actions__supplemental"
|
|
797
797
|
}, D(w, function() {
|
|
798
798
|
var p = {};
|
|
799
|
-
return
|
|
799
|
+
return b === "footerSupplemental" && (p["data-mdc-dialog-button-default"] = !0), I === "footerSupplemental" && (p["data-mdc-dialog-initial-focus"] = !0), p;
|
|
800
800
|
})), !X && (n || R || u) && /* @__PURE__ */ m.createElement("div", {
|
|
801
801
|
className: "lmnt-dialog__actions__right-align lmnt-modal_actions_button"
|
|
802
802
|
}, R && D(R, {
|
|
@@ -805,7 +805,7 @@ var f = Kt.strings, Ae = (
|
|
|
805
805
|
"data-mdc-dialog-action": "close"
|
|
806
806
|
}), n && !u && D(n, Qt), u && D(u, Xt)), X && /* @__PURE__ */ m.createElement("div", {
|
|
807
807
|
className: "lmnt-modal_actions_button lmnt-dialog__actions__directional"
|
|
808
|
-
}, /* @__PURE__ */ m.createElement("div", null, ae(_, "lmnt-modal__button")), /* @__PURE__ */ m.createElement("div", null, D(
|
|
808
|
+
}, /* @__PURE__ */ m.createElement("div", null, ae(_, "lmnt-modal__button")), /* @__PURE__ */ m.createElement("div", null, D(B, {
|
|
809
809
|
className: "lmnt-modal__button",
|
|
810
810
|
"data-mdc-dialog-initial-focus": !0
|
|
811
811
|
})))))), /* @__PURE__ */ m.createElement("div", {
|
|
@@ -813,10 +813,10 @@ var f = Kt.strings, Ae = (
|
|
|
813
813
|
}));
|
|
814
814
|
});
|
|
815
815
|
ot.displayName = "Modal";
|
|
816
|
-
ot.propTypes =
|
|
817
|
-
const
|
|
818
|
-
modal:
|
|
819
|
-
gap:
|
|
816
|
+
ot.propTypes = Te;
|
|
817
|
+
const Be = "_modal_1l955_1", Ne = "_gap_1l955_18", De = "_title_1l955_23", Fe = "_titleWithoutCloseIcon_1l955_36", Le = "_closeButton_1l955_40", Re = "_errorBanner_1l955_52", y = {
|
|
818
|
+
modal: Be,
|
|
819
|
+
gap: Ne,
|
|
820
820
|
title: De,
|
|
821
821
|
titleWithoutCloseIcon: Fe,
|
|
822
822
|
closeButton: Le,
|
|
@@ -833,7 +833,7 @@ const Ne = "_modal_1l955_1", Be = "_gap_1l955_18", De = "_title_1l955_23", Fe =
|
|
|
833
833
|
offlineViewProps: O,
|
|
834
834
|
children: _,
|
|
835
835
|
errorBannerProps: { hasError: S, ...F } = { hasError: !1 },
|
|
836
|
-
...
|
|
836
|
+
...T
|
|
837
837
|
}) => {
|
|
838
838
|
const W = nt(() => {
|
|
839
839
|
const E = {
|
|
@@ -854,7 +854,7 @@ const Ne = "_modal_1l955_1", Be = "_gap_1l955_18", De = "_title_1l955_23", Fe =
|
|
|
854
854
|
className: y.closeButton
|
|
855
855
|
}
|
|
856
856
|
),
|
|
857
|
-
d ? /* @__PURE__ */ g(fe, { customPadding: "0.25rem 0 0 0.75rem", children: /* @__PURE__ */ g(
|
|
857
|
+
d ? /* @__PURE__ */ g(fe, { customPadding: "0.25rem 0 0 0.75rem", children: /* @__PURE__ */ g(he, { icon: d }) }) : /* @__PURE__ */ g(wt, {}),
|
|
858
858
|
/* @__PURE__ */ g(
|
|
859
859
|
pe,
|
|
860
860
|
{
|
|
@@ -879,17 +879,17 @@ const Ne = "_modal_1l955_1", Be = "_gap_1l955_18", De = "_title_1l955_23", Fe =
|
|
|
879
879
|
return /* @__PURE__ */ g(
|
|
880
880
|
ot,
|
|
881
881
|
{
|
|
882
|
-
...
|
|
882
|
+
...T,
|
|
883
883
|
"data-testid": "modal",
|
|
884
|
-
className: `${y.modal} ${y.title} ${
|
|
884
|
+
className: `${y.modal} ${y.title} ${T.className ?? ""}`,
|
|
885
885
|
hideCloseIcon: !0,
|
|
886
886
|
actionButton: n,
|
|
887
887
|
headerActions: /* @__PURE__ */ kt(U, { fullWidth: !0, gap: "none", direction: "vertical", children: [
|
|
888
888
|
/* @__PURE__ */ g(U, { fullWidth: !0, primaryAlign: "space-between", secondaryAlign: "center", children: W.map((E) => /* @__PURE__ */ g(oe, { children: E.action }, E.id)) }),
|
|
889
|
-
S && /* @__PURE__ */ g("div", { className: y.errorBanner, children: /* @__PURE__ */ g(
|
|
889
|
+
S && /* @__PURE__ */ g("div", { className: y.errorBanner, children: /* @__PURE__ */ g(_e, { ...F, isOpen: S }) })
|
|
890
890
|
] }, "header-group"),
|
|
891
891
|
preventClose: !0,
|
|
892
|
-
children: h ? /* @__PURE__ */ g(wt, { children: _ }) : /* @__PURE__ */ g(
|
|
892
|
+
children: h ? /* @__PURE__ */ g(wt, { children: _ }) : /* @__PURE__ */ g(ge, { ...O })
|
|
893
893
|
}
|
|
894
894
|
);
|
|
895
895
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type TopBarBannerProps = {
|
|
2
2
|
title?: string;
|
|
3
3
|
description?: string;
|
|
4
4
|
isOpen?: boolean;
|
|
@@ -7,9 +7,10 @@ export type ErrorBannerProps = {
|
|
|
7
7
|
secondaryActionLabel?: string;
|
|
8
8
|
onSecondaryAction?: () => void;
|
|
9
9
|
isStandalone?: boolean;
|
|
10
|
+
icon?: string;
|
|
10
11
|
};
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
+
* Top bar banner component to display error messages with optional actions.
|
|
13
14
|
* Designed to be used below a header or as a standalone banner in a modal.
|
|
14
15
|
*
|
|
15
16
|
* @param {string} title - Title text displayed in the banner
|
|
@@ -20,6 +21,6 @@ export type ErrorBannerProps = {
|
|
|
20
21
|
* @param {string} secondaryActionLabel - Label for the secondary action button. If not provided, button will not be rendered.
|
|
21
22
|
* @param {() => void} onSecondaryAction - Handler for the secondary action button
|
|
22
23
|
* @param {boolean} isStandalone - When true, renders the banner with a rounded border instead of a bottom border
|
|
23
|
-
* @returns {JSX.Element|null} The rendered
|
|
24
|
+
* @returns {JSX.Element|null} The rendered TopBarBanner component or null if not visible
|
|
24
25
|
*/
|
|
25
|
-
export declare const
|
|
26
|
+
export declare const TopBarBanner: ({ title, description, isOpen, isStandalone, icon, ...props }: TopBarBannerProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { B as c } from "../../index.es-B1cewJEy.js";
|
|
3
|
+
import { G as o } from "../../index.es-BE1XL1dD.js";
|
|
4
|
+
import { P as u } from "../../index.es-C8AExypY.js";
|
|
5
|
+
import { T as b, a as h } from "../../index.es-EXzC8zuP.js";
|
|
6
|
+
import { c as B } from "../../index-_-9ybP20.js";
|
|
7
|
+
import { useContainerWidth as g } from "../../hooks/useContainerWidth.js";
|
|
8
|
+
import { Iconify as y } from "../Iconify/Iconify.js";
|
|
9
|
+
import '../../assets/TopBarBanner.css';const _ = "_bannerPadding_1ijh0_1", P = "_bottomBorder_1ijh0_7", v = "_standaloneBorder_1ijh0_12", s = {
|
|
10
|
+
bannerPadding: _,
|
|
11
|
+
bottomBorder: P,
|
|
12
|
+
standaloneBorder: v
|
|
13
|
+
}, N = ({
|
|
14
|
+
title: n,
|
|
15
|
+
description: a,
|
|
16
|
+
isOpen: e,
|
|
17
|
+
isStandalone: i,
|
|
18
|
+
icon: d,
|
|
19
|
+
...m
|
|
20
|
+
}) => {
|
|
21
|
+
const { ref: p, isWide: l } = g(), f = B(
|
|
22
|
+
s.bannerPadding,
|
|
23
|
+
i ? s.standaloneBorder : s.bottomBorder
|
|
24
|
+
);
|
|
25
|
+
return e ? /* @__PURE__ */ r(u, { customPadding: "0.5rem 1rem", className: f, "data-testid": "top-bar-banner", children: /* @__PURE__ */ t(
|
|
26
|
+
o,
|
|
27
|
+
{
|
|
28
|
+
ref: p,
|
|
29
|
+
fullWidth: !0,
|
|
30
|
+
direction: l ? "horizontal" : "vertical",
|
|
31
|
+
secondaryAlign: "center",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ t(o, { fullWidth: !0, primaryAlign: "space-between", secondaryAlign: l ? "center" : "start", children: [
|
|
34
|
+
/* @__PURE__ */ r(
|
|
35
|
+
y,
|
|
36
|
+
{
|
|
37
|
+
icon: d ?? "sentiment-very-dissatisfied",
|
|
38
|
+
iconSize: "large",
|
|
39
|
+
variant: "color-primary"
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ t(o, { direction: "vertical", fullWidth: !0, gap: "none", children: [
|
|
43
|
+
/* @__PURE__ */ r(b, { bold: !0, level: 2, themeColor: "primary", children: n }),
|
|
44
|
+
/* @__PURE__ */ r(h, { children: a })
|
|
45
|
+
] })
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ r(C, { ...m, isWide: l })
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
) }) : null;
|
|
51
|
+
}, C = ({
|
|
52
|
+
primaryActionLabel: n,
|
|
53
|
+
onPrimaryAction: a,
|
|
54
|
+
secondaryActionLabel: e,
|
|
55
|
+
onSecondaryAction: i,
|
|
56
|
+
isWide: d
|
|
57
|
+
}) => /* @__PURE__ */ t(o, { fullWidth: !d, primaryAlign: "end", secondaryAlign: "center", children: [
|
|
58
|
+
n && /* @__PURE__ */ r(
|
|
59
|
+
c,
|
|
60
|
+
{
|
|
61
|
+
label: n,
|
|
62
|
+
onClick: a,
|
|
63
|
+
"data-testid": "top-bar-banner-primary-action"
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
e && /* @__PURE__ */ r(
|
|
67
|
+
c,
|
|
68
|
+
{
|
|
69
|
+
label: e,
|
|
70
|
+
variant: "outlined",
|
|
71
|
+
onClick: i,
|
|
72
|
+
"data-testid": "top-bar-banner-secondary-action"
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] });
|
|
76
|
+
export {
|
|
77
|
+
N as TopBarBanner
|
|
78
|
+
};
|
package/dist/main.d.ts
CHANGED
|
@@ -11,10 +11,9 @@ export { DeleteModal } from './components/DeleteModal/DeleteModal';
|
|
|
11
11
|
export { DetailContentWrapper } from './components/DetailContentWrapper/DetailContentWrapper';
|
|
12
12
|
export { Disclaimer } from './components/Disclaimer/Disclaimer';
|
|
13
13
|
export { EmptyView } from './components/EmptyView/EmptyView';
|
|
14
|
-
export { ErrorBanner } from './components/ErrorBanner/ErrorBanner';
|
|
15
14
|
export { Filter } from './components/Filter/Filter';
|
|
16
|
-
export { FormattedNumberDisplay } from './components/FormattedNumberDisplay/FormattedNumberDisplay';
|
|
17
15
|
export { FloatingActionButton } from './components/FloatingActionButton/FloatingActionButton';
|
|
16
|
+
export { FormattedNumberDisplay } from './components/FormattedNumberDisplay/FormattedNumberDisplay';
|
|
18
17
|
export { GenericTable } from './components/GenericTable/GenericTable';
|
|
19
18
|
export { HashTabView } from './components/HashTabView/HashTabView';
|
|
20
19
|
export { HeaderFilter } from './components/HeaderFilter/HeaderFilter';
|
|
@@ -33,6 +32,7 @@ export { SearchBar } from './components/SearchBar/SearchBar';
|
|
|
33
32
|
export { Select } from './components/Select/Select';
|
|
34
33
|
export { StepperHeader } from './components/Stepper/components/StepperHeader';
|
|
35
34
|
export { Stepper } from './components/Stepper/Stepper';
|
|
35
|
+
export { TopBarBanner } from './components/TopBarBanner/TopBarBanner';
|
|
36
36
|
export { VerticalDivider } from './components/VerticalDivider/VerticalDivider';
|
|
37
37
|
export { FormCheckBox } from './components/FormComponents/FormCheckBox/FormCheckBox';
|
|
38
38
|
export { FormDatePicker } from './components/FormComponents/FormDatePicker/FormDatePicker';
|
package/dist/main.js
CHANGED
|
@@ -5,36 +5,36 @@ import { BasicHeading as i } from "./components/BasicHeading/BasicHeading.js";
|
|
|
5
5
|
import { BlockView as n } from "./components/BlockView/BlockView.js";
|
|
6
6
|
import { ButtonCard as A } from "./components/ButtonCard/ButtonCard.js";
|
|
7
7
|
import { ChipCard as d } from "./components/ChipCard/ChipCard.js";
|
|
8
|
-
import { ConfirmationModal as
|
|
8
|
+
import { ConfirmationModal as c } from "./components/ConfirmationModal/ConfirmationModal.js";
|
|
9
9
|
import { ContextMenu as F } from "./components/ContextMenu/ContextMenu.js";
|
|
10
|
-
import { DeleteModal as
|
|
11
|
-
import { DetailContentWrapper as
|
|
10
|
+
import { DeleteModal as T } from "./components/DeleteModal/DeleteModal.js";
|
|
11
|
+
import { DetailContentWrapper as I } from "./components/DetailContentWrapper/DetailContentWrapper.js";
|
|
12
12
|
import { Disclaimer as G } from "./components/Disclaimer/Disclaimer.js";
|
|
13
13
|
import { EmptyView as C } from "./components/EmptyView/EmptyView.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { Filter as M } from "./components/Filter/Filter.js";
|
|
15
|
+
import { FloatingActionButton as g } from "./components/FloatingActionButton/FloatingActionButton.js";
|
|
16
16
|
import { FormattedNumberDisplay as w } from "./components/FormattedNumberDisplay/FormattedNumberDisplay.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
17
|
+
import { GenericTable as O } from "./components/GenericTable/GenericTable.js";
|
|
18
|
+
import { HashTabView as V } from "./components/HashTabView/HashTabView.js";
|
|
19
|
+
import { HeaderFilter as H } from "./components/HeaderFilter/HeaderFilter.js";
|
|
20
|
+
import { Iconify as k } from "./components/Iconify/Iconify.js";
|
|
21
|
+
import { InfoCard as y } from "./components/InfoCard/InfoCard.js";
|
|
22
|
+
import { InfoGroup as Y } from "./components/InfoGroup/InfoGroup.js";
|
|
23
|
+
import { ListArea as z } from "./components/ListArea/ListArea.js";
|
|
24
|
+
import { LoadingSpinner as j } from "./components/LoadingSpinner/Default/LoadingSpinner.js";
|
|
25
|
+
import { Modal as J } from "./components/Modal/Modal.js";
|
|
26
|
+
import { ModulePadding as Z } from "./components/ModulePadding/ModulePadding.js";
|
|
27
|
+
import { OfflineView as rr } from "./components/OfflineView/OfflineView.js";
|
|
28
|
+
import { OnboardingBanner as er } from "./components/OnboardingBanner/OnboardingBanner.js";
|
|
29
|
+
import { OverflowTooltip as mr } from "./components/OverflowTooltip/OverflowTooltip.js";
|
|
30
|
+
import { ScrollbarX as fr, ScrollbarY as xr } from "./components/Scrollbar/Scrollbar.js";
|
|
31
|
+
import { SearchBar as ar } from "./components/SearchBar/SearchBar.js";
|
|
32
|
+
import { Select as lr } from "./components/Select/Select.js";
|
|
33
|
+
import { StepperHeader as sr } from "./components/Stepper/components/StepperHeader.js";
|
|
34
|
+
import { Stepper as Sr } from "./components/Stepper/Stepper.js";
|
|
35
|
+
import { TopBarBanner as Er } from "./components/TopBarBanner/TopBarBanner.js";
|
|
36
36
|
import { VerticalDivider as Lr } from "./components/VerticalDivider/VerticalDivider.js";
|
|
37
|
-
import { FormCheckBox as
|
|
37
|
+
import { FormCheckBox as _r } from "./components/FormComponents/FormCheckBox/FormCheckBox.js";
|
|
38
38
|
import { FormDatePicker as Br } from "./components/FormComponents/FormDatePicker/FormDatePicker.js";
|
|
39
39
|
import { FormNumber as ur } from "./components/FormComponents/FormNumber/FormNumber.js";
|
|
40
40
|
import { FormRadio as Dr } from "./components/FormComponents/FormRadio/FormRadio.js";
|
|
@@ -52,9 +52,9 @@ import { StepperStyle as Zr } from "./components/Stepper/stepperStyles.js";
|
|
|
52
52
|
import { DATE_FORMAT as ro, DATE_TIME_FORMAT as oo, TIME_FORMAT as eo } from "./types/Time.js";
|
|
53
53
|
import { AVAILABLE_COUNTRY_KEYS as mo, AVAILABLE_LOCALES as po, ENGLISH_LANGUAGE_ID as fo, GERMAN_LANGUAGE_ID as xo, LANGUAGE_CODES_MAPPER as io, LANGUAGE_ID_MAPPER as ao, SPANISH_LANGUAGE_ID as no, TURKISH_LANGUAGE_ID as lo } from "./types/Languages.js";
|
|
54
54
|
import { Allowed as so } from "./components/Allowed/Allowed.js";
|
|
55
|
-
import { AllowedButton as
|
|
55
|
+
import { AllowedButton as co } from "./components/AllowedButton/AllowedButton.js";
|
|
56
56
|
import { AllowedIconButton as Fo } from "./components/AllowedIconButton/AllowedIconButton.js";
|
|
57
|
-
import { getPermissionsFromModulePermissionToken as
|
|
57
|
+
import { getPermissionsFromModulePermissionToken as To, useIsAllowed as _o } from "./components/PermissionChecks/PermissionService.js";
|
|
58
58
|
import { SharedComponentsPermissionProvider as Bo } from "./components/SharedComponentsPermissionProvider/SharedComponentsPermissionProvider.js";
|
|
59
59
|
import { createPermissionWrapper as uo, renderWithPermissions as Co } from "./test-utils.js";
|
|
60
60
|
import { HVMainPermissions as Mo } from "./types/Permission.js";
|
|
@@ -63,7 +63,7 @@ export {
|
|
|
63
63
|
po as AVAILABLE_LOCALES,
|
|
64
64
|
e as AlertBanner,
|
|
65
65
|
so as Allowed,
|
|
66
|
-
|
|
66
|
+
co as AllowedButton,
|
|
67
67
|
Fo as AllowedIconButton,
|
|
68
68
|
Ur as AvailableCustomIcons,
|
|
69
69
|
f as BaseView,
|
|
@@ -71,19 +71,18 @@ export {
|
|
|
71
71
|
n as BlockView,
|
|
72
72
|
A as ButtonCard,
|
|
73
73
|
d as ChipCard,
|
|
74
|
-
|
|
74
|
+
c as ConfirmationModal,
|
|
75
75
|
F as ContextMenu,
|
|
76
76
|
ro as DATE_FORMAT,
|
|
77
77
|
oo as DATE_TIME_FORMAT,
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
T as DeleteModal,
|
|
79
|
+
I as DetailContentWrapper,
|
|
80
80
|
G as Disclaimer,
|
|
81
81
|
fo as ENGLISH_LANGUAGE_ID,
|
|
82
82
|
C as EmptyView,
|
|
83
|
-
M as
|
|
84
|
-
g as
|
|
85
|
-
|
|
86
|
-
Ir as FormCheckBox,
|
|
83
|
+
M as Filter,
|
|
84
|
+
g as FloatingActionButton,
|
|
85
|
+
_r as FormCheckBox,
|
|
87
86
|
Br as FormDatePicker,
|
|
88
87
|
ur as FormNumber,
|
|
89
88
|
Dr as FormRadio,
|
|
@@ -93,45 +92,46 @@ export {
|
|
|
93
92
|
Rr as FormToggle,
|
|
94
93
|
w as FormattedNumberDisplay,
|
|
95
94
|
xo as GERMAN_LANGUAGE_ID,
|
|
96
|
-
|
|
95
|
+
O as GenericTable,
|
|
97
96
|
Mo as HVMainPermissions,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
V as HashTabView,
|
|
98
|
+
H as HeaderFilter,
|
|
99
|
+
k as Iconify,
|
|
100
|
+
y as InfoCard,
|
|
101
|
+
Y as InfoGroup,
|
|
103
102
|
io as LANGUAGE_CODES_MAPPER,
|
|
104
103
|
ao as LANGUAGE_ID_MAPPER,
|
|
105
104
|
m as LinkBanner,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
105
|
+
z as ListArea,
|
|
106
|
+
j as LoadingSpinner,
|
|
107
|
+
J as Modal,
|
|
108
|
+
Z as ModulePadding,
|
|
109
|
+
rr as OfflineView,
|
|
110
|
+
er as OnboardingBanner,
|
|
111
|
+
mr as OverflowTooltip,
|
|
113
112
|
no as SPANISH_LANGUAGE_ID,
|
|
114
113
|
hr as SafeForm,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
fr as ScrollbarX,
|
|
115
|
+
xr as ScrollbarY,
|
|
116
|
+
ar as SearchBar,
|
|
117
|
+
lr as Select,
|
|
119
118
|
Bo as SharedComponentsPermissionProvider,
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
Sr as Stepper,
|
|
120
|
+
sr as StepperHeader,
|
|
122
121
|
Zr as StepperStyle,
|
|
123
122
|
eo as TIME_FORMAT,
|
|
124
123
|
lo as TURKISH_LANGUAGE_ID,
|
|
125
124
|
vr as ThemeColor,
|
|
125
|
+
Er as TopBarBanner,
|
|
126
126
|
Lr as VerticalDivider,
|
|
127
127
|
Xr as capitalizeFirstLetters,
|
|
128
128
|
uo as createPermissionWrapper,
|
|
129
129
|
jr as getFormattedDateTime,
|
|
130
130
|
qr as getNumberAsLocaleString,
|
|
131
|
-
|
|
131
|
+
To as getPermissionsFromModulePermissionToken,
|
|
132
132
|
Co as renderWithPermissions,
|
|
133
133
|
Jr as trimLeadingAndTrailingSpaces,
|
|
134
134
|
Wr as useBreakpoints,
|
|
135
135
|
Kr as useContainerWidth,
|
|
136
|
-
|
|
136
|
+
_o as useIsAllowed
|
|
137
137
|
};
|
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.
|
|
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>",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._bannerPadding_1ka2b_1{width:100%;box-sizing:border-box;background-color:var(--lmnt-theme-secondary-50)}._bottomBorder_1ka2b_7{border-top:1px solid var(--lmnt-theme-secondary-100);border-bottom:1px solid var(--lmnt-theme-secondary-100)}._standaloneBorder_1ka2b_12{border-color:var(--lmnt-theme-secondary-100);border-width:1px;border-style:solid;border-radius:.5rem}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import { B as c } from "../../index.es-B1cewJEy.js";
|
|
3
|
-
import { G as t } from "../../index.es-BE1XL1dD.js";
|
|
4
|
-
import { P as f } from "../../index.es-C8AExypY.js";
|
|
5
|
-
import { T as u, a as b } from "../../index.es-EXzC8zuP.js";
|
|
6
|
-
import { c as h } from "../../index-_-9ybP20.js";
|
|
7
|
-
import { useContainerWidth as B } from "../../hooks/useContainerWidth.js";
|
|
8
|
-
import { Iconify as g } from "../Iconify/Iconify.js";
|
|
9
|
-
import '../../assets/ErrorBanner.css';const y = "_bannerPadding_1ka2b_1", _ = "_bottomBorder_1ka2b_7", P = "_standaloneBorder_1ka2b_12", s = {
|
|
10
|
-
bannerPadding: y,
|
|
11
|
-
bottomBorder: _,
|
|
12
|
-
standaloneBorder: P
|
|
13
|
-
}, E = ({
|
|
14
|
-
title: n,
|
|
15
|
-
description: a,
|
|
16
|
-
isOpen: e,
|
|
17
|
-
isStandalone: i,
|
|
18
|
-
...d
|
|
19
|
-
}) => {
|
|
20
|
-
const { ref: m, isWide: l } = B(), p = h(
|
|
21
|
-
s.bannerPadding,
|
|
22
|
-
i ? s.standaloneBorder : s.bottomBorder
|
|
23
|
-
);
|
|
24
|
-
return e ? /* @__PURE__ */ r(f, { customPadding: "0.5rem 1rem", className: p, "data-testid": "error-banner", children: /* @__PURE__ */ o(
|
|
25
|
-
t,
|
|
26
|
-
{
|
|
27
|
-
ref: m,
|
|
28
|
-
fullWidth: !0,
|
|
29
|
-
direction: l ? "horizontal" : "vertical",
|
|
30
|
-
secondaryAlign: "center",
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ o(t, { fullWidth: !0, primaryAlign: "space-between", secondaryAlign: l ? "center" : "start", children: [
|
|
33
|
-
/* @__PURE__ */ r(g, { icon: "sentiment-very-dissatisfied", iconSize: "large", variant: "color-primary" }),
|
|
34
|
-
/* @__PURE__ */ o(t, { direction: "vertical", fullWidth: !0, gap: "none", children: [
|
|
35
|
-
/* @__PURE__ */ r(u, { bold: !0, level: 2, themeColor: "primary", children: n }),
|
|
36
|
-
/* @__PURE__ */ r(b, { children: a })
|
|
37
|
-
] })
|
|
38
|
-
] }),
|
|
39
|
-
/* @__PURE__ */ r(v, { ...d, isWide: l })
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
) }) : null;
|
|
43
|
-
}, v = ({
|
|
44
|
-
primaryActionLabel: n,
|
|
45
|
-
onPrimaryAction: a,
|
|
46
|
-
secondaryActionLabel: e,
|
|
47
|
-
onSecondaryAction: i,
|
|
48
|
-
isWide: d
|
|
49
|
-
}) => /* @__PURE__ */ o(t, { fullWidth: !d, primaryAlign: "end", secondaryAlign: "center", children: [
|
|
50
|
-
n && /* @__PURE__ */ r(
|
|
51
|
-
c,
|
|
52
|
-
{
|
|
53
|
-
label: n,
|
|
54
|
-
onClick: a,
|
|
55
|
-
"data-testid": "error-banner-primary-action"
|
|
56
|
-
}
|
|
57
|
-
),
|
|
58
|
-
e && /* @__PURE__ */ r(
|
|
59
|
-
c,
|
|
60
|
-
{
|
|
61
|
-
label: e,
|
|
62
|
-
variant: "outlined",
|
|
63
|
-
onClick: i,
|
|
64
|
-
"data-testid": "error-banner-secondary-action"
|
|
65
|
-
}
|
|
66
|
-
)
|
|
67
|
-
] });
|
|
68
|
-
export {
|
|
69
|
-
E as ErrorBanner
|
|
70
|
-
};
|