@caseparts-org/caseblocks 0.0.249 → 0.0.250
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 +28 -28
- package/package.json +1 -1
package/dist/assets/Modal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._overlay_62mbc_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_62mbc_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_62mbc_11{border-radius:0;width:100%;box-shadow:none;height:100dvh;max-height:100dvh}}._toolbar_62mbc_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) var(--spacing-spacing-default);gap:var(--spacing-spacing-2xs);z-index:1}@media (max-width:767px){._toolbar_62mbc_30{padding:var(--spacing-spacing-2xs)}}._toolbarPlain_62mbc_47{background-color:transparent;border-bottom:none}._headerGroup_62mbc_52{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-2xs);flex:1 1 0}._headerLeft_62mbc_60{justify-content:flex-start}._headerRight_62mbc_64{justify-content:flex-end}._closeButton_62mbc_68{position:absolute;right:4px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;border-radius:var(--radius-radius-md);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;transition:background-color .2s ease-in}._closeButton_62mbc_68:hover{background-color:var(--color-neutrals-neutral-2)}._content_62mbc_87{overflow:auto;padding:var(--spacing-spacing-default)}@media (max-width:767px){._content_62mbc_87{padding:var(--spacing-spacing-2xs)}}
|
|
@@ -2,15 +2,15 @@ import { jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import f from "react";
|
|
3
3
|
import { c as s } from "../../clsx-OuTLNxxd.js";
|
|
4
4
|
import { Text as h } from "../../atoms/Text/Text.js";
|
|
5
|
-
import { Icon as
|
|
6
|
-
import '../../assets/Modal.css';const
|
|
7
|
-
overlay:
|
|
5
|
+
import { Icon as b } from "../../atoms/Icon/Icon.js";
|
|
6
|
+
import '../../assets/Modal.css';const p = "_overlay_62mbc_1", g = "_container_62mbc_11", v = "_toolbar_62mbc_30", y = "_toolbarPlain_62mbc_47", T = "_headerGroup_62mbc_52", x = "_headerLeft_62mbc_60", z = "_headerRight_62mbc_64", B = "_closeButton_62mbc_68", M = "_content_62mbc_87", r = {
|
|
7
|
+
overlay: p,
|
|
8
8
|
container: g,
|
|
9
|
-
toolbar:
|
|
10
|
-
toolbarPlain:
|
|
11
|
-
headerGroup:
|
|
12
|
-
headerLeft:
|
|
13
|
-
headerRight:
|
|
9
|
+
toolbar: v,
|
|
10
|
+
toolbarPlain: y,
|
|
11
|
+
headerGroup: T,
|
|
12
|
+
headerLeft: x,
|
|
13
|
+
headerRight: z,
|
|
14
14
|
closeButton: B,
|
|
15
15
|
content: M
|
|
16
16
|
}, N = {
|
|
@@ -25,13 +25,13 @@ import '../../assets/Modal.css';const z = "_overlay_1n58z_1", g = "_container_1n
|
|
|
25
25
|
isOpen: t,
|
|
26
26
|
onClose: o,
|
|
27
27
|
closeOnOverlayClick: e = !0,
|
|
28
|
-
className:
|
|
29
|
-
children:
|
|
30
|
-
...
|
|
28
|
+
className: c,
|
|
29
|
+
children: l,
|
|
30
|
+
...m
|
|
31
31
|
}) => {
|
|
32
32
|
const a = f.useRef(!1);
|
|
33
33
|
if (!t) return null;
|
|
34
|
-
const
|
|
34
|
+
const u = (d) => {
|
|
35
35
|
e && (a.current = d.target === d.currentTarget);
|
|
36
36
|
}, _ = (d) => {
|
|
37
37
|
if (!e) {
|
|
@@ -40,36 +40,36 @@ import '../../assets/Modal.css';const z = "_overlay_1n58z_1", g = "_container_1n
|
|
|
40
40
|
}
|
|
41
41
|
a.current && d.target === d.currentTarget && o(), a.current = !1;
|
|
42
42
|
};
|
|
43
|
-
return /* @__PURE__ */ n("div", { className: s(r.overlay), onMouseDown:
|
|
44
|
-
},
|
|
43
|
+
return /* @__PURE__ */ n("div", { className: s(r.overlay), onMouseDown: u, onMouseUp: _, children: /* @__PURE__ */ n("div", { className: s(r.container, c), role: "dialog", "aria-modal": "true", ...m, children: l }) });
|
|
44
|
+
}, w = ({ variant: t = "standard", className: o, children: e, ...c }) => /* @__PURE__ */ n(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
47
|
className: s(r.toolbar, t === "plain" && r.toolbarPlain, o),
|
|
48
|
-
...
|
|
48
|
+
...c,
|
|
49
49
|
children: e
|
|
50
50
|
}
|
|
51
|
-
),
|
|
51
|
+
), C = ({
|
|
52
52
|
align: t = "left",
|
|
53
53
|
size: o = "md",
|
|
54
54
|
variant: e = "display",
|
|
55
|
-
className:
|
|
56
|
-
children:
|
|
57
|
-
...
|
|
55
|
+
className: c,
|
|
56
|
+
children: l,
|
|
57
|
+
...m
|
|
58
58
|
}) => {
|
|
59
|
-
const a = typeof
|
|
59
|
+
const a = typeof l == "string";
|
|
60
60
|
return /* @__PURE__ */ n(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
|
-
className: s(r.headerGroup, t === "left" ? r.headerLeft : r.headerRight,
|
|
64
|
-
...
|
|
65
|
-
children: a ? /* @__PURE__ */ n(h, { as: "div", size: N[o], variant: e, children:
|
|
63
|
+
className: s(r.headerGroup, t === "left" ? r.headerLeft : r.headerRight, c),
|
|
64
|
+
...m,
|
|
65
|
+
children: a ? /* @__PURE__ */ n(h, { as: "div", size: N[o], variant: e, weight: "medium", children: l }) : l
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
|
-
},
|
|
69
|
-
i.Toolbar =
|
|
70
|
-
i.Header =
|
|
71
|
-
i.CloseButton =
|
|
72
|
-
i.Content =
|
|
68
|
+
}, G = ({ size: t = "md", className: o, ...e }) => /* @__PURE__ */ n("button", { type: "button", className: s(r.closeButton, o), "aria-label": "Close", ...e, children: /* @__PURE__ */ n(b, { iconKey: "fa-regular fa-xmark", size: R[t] }) }), L = ({ className: t, children: o, ...e }) => /* @__PURE__ */ n("div", { className: s(r.content, t), ...e, children: o });
|
|
69
|
+
i.Toolbar = w;
|
|
70
|
+
i.Header = C;
|
|
71
|
+
i.CloseButton = G;
|
|
72
|
+
i.Content = L;
|
|
73
73
|
export {
|
|
74
74
|
i as Modal
|
|
75
75
|
};
|