@hortiview/shared-components 0.0.11881 → 0.0.11949
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._bulletPoint_1cbin_1{display:list-item;margin-left:1.5rem}._title_1cbin_6{header{display:flex;justify-content:start;padding-left:.5rem!important;>div{margin-left:0!important}}}._modal_1cbin_17 [class*="lmnt-modal__actions mdc-dialog__actions"]{margin-bottom:0!important}._colorDanger_1cbin_21{color:var(--lmnt-theme-danger-on-surface)}._crossedOut_1cbin_25{position:relative;display:inline-block}._crossedOut_1cbin_25: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}
|
|
@@ -1,110 +1,118 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { B as
|
|
3
|
-
import { G as
|
|
4
|
-
import { I } from "../../index.es-3043KTnb.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { jsx as o, jsxs as d, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { B as p } from "../../index.es-CiqbARoC.js";
|
|
3
|
+
import { G as l } from "../../index.es-DntoATwO.js";
|
|
4
|
+
import { I as k } from "../../index.es-3043KTnb.js";
|
|
5
|
+
import { I as A } from "../../index.es-0lQcz8m1.js";
|
|
6
|
+
import { T as B, b as i } from "../../index.es-CF_xy2ns.js";
|
|
7
|
+
import { u as N } from "../../uniqueId-NU3-C36A.js";
|
|
8
|
+
import { AvailableCustomIcons as O } from "../../enums/AvailableCustomIcons.js";
|
|
8
9
|
import { u as S } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
9
10
|
import { Iconify as x } from "../Iconify/Iconify.js";
|
|
10
|
-
import { Modal as
|
|
11
|
-
import '../../assets/DeleteModal.css';const
|
|
12
|
-
bulletPoint:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
import { Modal as M } from "../Modal/Modal.js";
|
|
12
|
+
import '../../assets/DeleteModal.css';const j = "_bulletPoint_1cbin_1", z = "_title_1cbin_6", P = "_modal_1cbin_17", G = "_colorDanger_1cbin_21", $ = "_crossedOut_1cbin_25", t = {
|
|
13
|
+
bulletPoint: j,
|
|
14
|
+
title: z,
|
|
15
|
+
modal: P,
|
|
16
|
+
colorDanger: G,
|
|
17
|
+
crossedOut: $
|
|
18
|
+
}, Z = ({
|
|
19
|
+
title: e,
|
|
20
|
+
confirmButtonLabel: r,
|
|
19
21
|
cancelButtonLabel: n,
|
|
20
22
|
deleteHeader: a,
|
|
21
|
-
deleteBody:
|
|
23
|
+
deleteBody: c,
|
|
22
24
|
deleteText: f,
|
|
23
|
-
icon:
|
|
24
|
-
isIconCrossedOut:
|
|
25
|
+
icon: b,
|
|
26
|
+
isIconCrossedOut: g,
|
|
25
27
|
impossibleDeleteHeader: h,
|
|
26
28
|
open: y,
|
|
27
|
-
setOpen:
|
|
28
|
-
onDelete:
|
|
29
|
+
setOpen: s,
|
|
30
|
+
onDelete: _,
|
|
29
31
|
onCancel: v,
|
|
30
|
-
isDeletePossible:
|
|
32
|
+
isDeletePossible: u = !0
|
|
31
33
|
}) => {
|
|
32
|
-
const { isDesktop:
|
|
33
|
-
D.detail.action === "close" &&
|
|
34
|
+
const { isDesktop: C } = S(), I = (D) => {
|
|
35
|
+
D.detail.action === "close" && s(!1);
|
|
34
36
|
};
|
|
35
37
|
return /* @__PURE__ */ o(
|
|
36
|
-
|
|
38
|
+
M,
|
|
37
39
|
{
|
|
38
|
-
className: t.modal
|
|
39
|
-
modalSize:
|
|
40
|
+
className: `${t.modal} ${t.title}`,
|
|
41
|
+
modalSize: C ? "small" : "fullscreen",
|
|
40
42
|
open: y,
|
|
41
|
-
onClose:
|
|
42
|
-
|
|
43
|
+
onClose: I,
|
|
44
|
+
hideCloseIcon: !0,
|
|
45
|
+
headerActions: [
|
|
46
|
+
/* @__PURE__ */ d(l, { primaryAlign: "center", secondaryAlign: "center", children: [
|
|
47
|
+
/* @__PURE__ */ o(A, { icon: "close", onClick: () => s(!1), type: "button" }),
|
|
48
|
+
/* @__PURE__ */ o(B, { level: 6, children: e })
|
|
49
|
+
] }, "group")
|
|
50
|
+
],
|
|
43
51
|
primaryButton: /* @__PURE__ */ o(
|
|
44
|
-
|
|
52
|
+
p,
|
|
45
53
|
{
|
|
46
54
|
"data-testid": "delete-button",
|
|
47
55
|
variant: "danger",
|
|
48
|
-
label:
|
|
49
|
-
onClick:
|
|
50
|
-
disabled: !
|
|
56
|
+
label: r,
|
|
57
|
+
onClick: _,
|
|
58
|
+
disabled: !u
|
|
51
59
|
}
|
|
52
60
|
),
|
|
53
61
|
footerSupplemental: /* @__PURE__ */ o(
|
|
54
|
-
|
|
62
|
+
p,
|
|
55
63
|
{
|
|
56
64
|
"data-testid": "cancel-button",
|
|
57
65
|
variant: "text",
|
|
58
66
|
label: n,
|
|
59
67
|
onClick: () => {
|
|
60
|
-
v?.(),
|
|
68
|
+
v?.(), s(!1);
|
|
61
69
|
}
|
|
62
70
|
}
|
|
63
71
|
),
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */ o(
|
|
66
|
-
/* @__PURE__ */ o(
|
|
67
|
-
|
|
72
|
+
children: /* @__PURE__ */ d(l, { direction: "vertical", secondaryAlign: "center", children: [
|
|
73
|
+
/* @__PURE__ */ o(q, { element: /* @__PURE__ */ o(F, { icon: b }), isCrossedOut: g }),
|
|
74
|
+
/* @__PURE__ */ o(l, { direction: "vertical", children: u ? /* @__PURE__ */ o(
|
|
75
|
+
H,
|
|
68
76
|
{
|
|
69
77
|
deleteHeader: a,
|
|
70
78
|
deleteText: f,
|
|
71
|
-
deleteBody:
|
|
79
|
+
deleteBody: c
|
|
72
80
|
}
|
|
73
|
-
) : /* @__PURE__ */ o(
|
|
81
|
+
) : /* @__PURE__ */ o(w, { impossibleDeleteHeader: h }) })
|
|
74
82
|
] })
|
|
75
83
|
}
|
|
76
84
|
);
|
|
77
|
-
},
|
|
78
|
-
element:
|
|
79
|
-
isCrossedOut:
|
|
80
|
-
}) =>
|
|
85
|
+
}, q = ({
|
|
86
|
+
element: e,
|
|
87
|
+
isCrossedOut: r = !1
|
|
88
|
+
}) => r ? /* @__PURE__ */ o("span", { className: t.crossedOut, children: e }) : e, F = ({ icon: e }) => e ? typeof e != "string" ? e : Object.values(O).includes(e) ? /* @__PURE__ */ o(
|
|
81
89
|
x,
|
|
82
90
|
{
|
|
83
|
-
icon:
|
|
91
|
+
icon: e,
|
|
84
92
|
iconSize: "xlarge",
|
|
85
93
|
className: t.colorDanger
|
|
86
94
|
}
|
|
87
|
-
) : /* @__PURE__ */ o(
|
|
88
|
-
deleteHeader:
|
|
89
|
-
deleteText:
|
|
95
|
+
) : /* @__PURE__ */ o(k, { icon: e, iconSize: "xlarge", className: t.colorDanger }) : /* @__PURE__ */ o(m, {}), H = ({
|
|
96
|
+
deleteHeader: e,
|
|
97
|
+
deleteText: r,
|
|
90
98
|
deleteBody: n
|
|
91
|
-
}) => /* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */ o(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
n &&
|
|
96
|
-
|
|
99
|
+
}) => /* @__PURE__ */ d(m, { children: [
|
|
100
|
+
/* @__PURE__ */ o(i, { level: 1, themeColor: "text-primary-on-background", children: e }),
|
|
101
|
+
r && typeof r == "string" && /* @__PURE__ */ o(i, { level: 2, themeColor: "text-secondary-on-background", children: r }),
|
|
102
|
+
r && typeof r != "string" && /* @__PURE__ */ o(m, { children: r }),
|
|
103
|
+
n && r === void 0 && /* @__PURE__ */ o(l, { direction: "vertical", gap: "none", children: n.map((a, c) => /* @__PURE__ */ o(
|
|
104
|
+
i,
|
|
97
105
|
{
|
|
98
106
|
level: 2,
|
|
99
107
|
className: t.bulletPoint,
|
|
100
108
|
themeColor: "text-secondary-on-background",
|
|
101
109
|
children: a
|
|
102
110
|
},
|
|
103
|
-
|
|
111
|
+
N(c.toString())
|
|
104
112
|
)) })
|
|
105
|
-
] }),
|
|
106
|
-
impossibleDeleteHeader:
|
|
107
|
-
}) => /* @__PURE__ */ o(
|
|
113
|
+
] }), w = ({
|
|
114
|
+
impossibleDeleteHeader: e
|
|
115
|
+
}) => /* @__PURE__ */ o(i, { level: 1, themeColor: "text-primary-on-background", children: e });
|
|
108
116
|
export {
|
|
109
|
-
|
|
117
|
+
Z as DeleteModal
|
|
110
118
|
};
|
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": "0.0.
|
|
4
|
+
"version": "0.0.11949",
|
|
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>",
|