@caseparts-org/caseblocks 0.0.183 → 0.0.184
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/dist/assets/Modal.css +1 -1
- package/dist/molecules/Modal/Modal.js +54 -46
- package/package.json +1 -1
package/dist/assets/Modal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._overlay_1n58z_1{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:2000}._container_1n58z_11{background-color:var(--surface-surface-primary);color:var(--text-text-primary);border-radius:var(--border-radius-sm);box-shadow:0 4px 6px #0000001a;width:min(800px,92vw);max-height:80vh;display:flex;flex-direction:column;overflow:hidden}@media (max-width:767px){._container_1n58z_11{border-radius:0;width:100%;box-shadow:none;height:100dvh;max-height:100dvh}}._toolbar_1n58z_30{position:sticky;top:0;display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:var(--surface-surface-secondary);border-bottom:1px solid var(--border-border-secondary-btn);padding:var(--spacing-spacing-2xs);gap:var(--spacing-spacing-2xs);z-index:1}._toolbarPlain_1n58z_44{background-color:transparent;border-bottom:none}._headerGroup_1n58z_49{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-2xs);flex:1 1 0}._headerLeft_1n58z_57{justify-content:flex-start}._headerRight_1n58z_61{justify-content:flex-end}._closeButton_1n58z_65{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;padding:var(--spacing-spacing-4xs);cursor:pointer;display:flex;align-items:center;justify-content:center;color:inherit;padding:0}._content_1n58z_78{overflow:auto;padding:var(--spacing-spacing-default)}@media (max-width:767px){._content_1n58z_78{padding:var(--spacing-spacing-2xs)}}
|
|
@@ -1,67 +1,75 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import f from "react";
|
|
3
|
+
import { c as s } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { Text as h } from "../../atoms/Text/Text.js";
|
|
5
|
+
import { Icon as p } from "../../atoms/Icon/Icon.js";
|
|
6
|
+
import '../../assets/Modal.css';const z = "_overlay_1n58z_1", g = "_container_1n58z_11", b = "_toolbar_1n58z_30", v = "_toolbarPlain_1n58z_44", y = "_headerGroup_1n58z_49", T = "_headerLeft_1n58z_57", x = "_headerRight_1n58z_61", B = "_closeButton_1n58z_65", M = "_content_1n58z_78", r = {
|
|
7
|
+
overlay: z,
|
|
8
|
+
container: g,
|
|
9
|
+
toolbar: b,
|
|
10
|
+
toolbarPlain: v,
|
|
11
|
+
headerGroup: y,
|
|
12
|
+
headerLeft: T,
|
|
13
|
+
headerRight: x,
|
|
14
|
+
closeButton: B,
|
|
15
|
+
content: M
|
|
16
|
+
}, N = {
|
|
16
17
|
sm: "sm",
|
|
17
18
|
md: "md",
|
|
18
19
|
lg: "lg"
|
|
19
|
-
},
|
|
20
|
+
}, R = {
|
|
20
21
|
sm: "sm",
|
|
21
22
|
md: "md",
|
|
22
23
|
lg: "md"
|
|
23
|
-
},
|
|
24
|
-
isOpen:
|
|
25
|
-
onClose:
|
|
26
|
-
closeOnOverlayClick:
|
|
24
|
+
}, i = ({
|
|
25
|
+
isOpen: t,
|
|
26
|
+
onClose: o,
|
|
27
|
+
closeOnOverlayClick: e = !0,
|
|
27
28
|
className: l,
|
|
28
|
-
children:
|
|
29
|
-
...
|
|
29
|
+
children: c,
|
|
30
|
+
...u
|
|
30
31
|
}) => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const a = f.useRef(!1);
|
|
33
|
+
if (!t) return null;
|
|
34
|
+
const m = (d) => {
|
|
35
|
+
e && (a.current = d.target === d.currentTarget);
|
|
36
|
+
}, _ = (d) => {
|
|
37
|
+
if (!e) {
|
|
38
|
+
a.current = !1;
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
a.current && d.target === d.currentTarget && o(), a.current = !1;
|
|
34
42
|
};
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
},
|
|
43
|
+
return /* @__PURE__ */ n("div", { className: s(r.overlay), onMouseDown: m, onMouseUp: _, children: /* @__PURE__ */ n("div", { className: s(r.container, l), role: "dialog", "aria-modal": "true", ...u, children: c }) });
|
|
44
|
+
}, C = ({ variant: t = "standard", className: o, children: e, ...l }) => /* @__PURE__ */ n(
|
|
37
45
|
"div",
|
|
38
46
|
{
|
|
39
|
-
className:
|
|
47
|
+
className: s(r.toolbar, t === "plain" && r.toolbarPlain, o),
|
|
40
48
|
...l,
|
|
41
|
-
children:
|
|
49
|
+
children: e
|
|
42
50
|
}
|
|
43
|
-
),
|
|
44
|
-
align:
|
|
45
|
-
size:
|
|
46
|
-
variant:
|
|
51
|
+
), G = ({
|
|
52
|
+
align: t = "left",
|
|
53
|
+
size: o = "md",
|
|
54
|
+
variant: e = "display",
|
|
47
55
|
className: l,
|
|
48
|
-
children:
|
|
49
|
-
...
|
|
56
|
+
children: c,
|
|
57
|
+
...u
|
|
50
58
|
}) => {
|
|
51
|
-
const
|
|
52
|
-
return /* @__PURE__ */
|
|
59
|
+
const a = typeof c == "string";
|
|
60
|
+
return /* @__PURE__ */ n(
|
|
53
61
|
"div",
|
|
54
62
|
{
|
|
55
|
-
className:
|
|
56
|
-
...
|
|
57
|
-
children:
|
|
63
|
+
className: s(r.headerGroup, t === "left" ? r.headerLeft : r.headerRight, l),
|
|
64
|
+
...u,
|
|
65
|
+
children: a ? /* @__PURE__ */ n(h, { as: "div", size: N[o], variant: e, children: c }) : c
|
|
58
66
|
}
|
|
59
67
|
);
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
}, L = ({ size: t = "md", className: o, ...e }) => /* @__PURE__ */ n("button", { type: "button", className: s(r.closeButton, o), "aria-label": "Close", ...e, children: /* @__PURE__ */ n(p, { iconKey: "fa-regular fa-xmark", size: R[t] }) }), P = ({ className: t, children: o, ...e }) => /* @__PURE__ */ n("div", { className: s(r.content, t), ...e, children: o });
|
|
69
|
+
i.Toolbar = C;
|
|
70
|
+
i.Header = G;
|
|
71
|
+
i.CloseButton = L;
|
|
72
|
+
i.Content = P;
|
|
65
73
|
export {
|
|
66
|
-
|
|
74
|
+
i as Modal
|
|
67
75
|
};
|