@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.
@@ -1 +1 @@
1
- ._overlay_1mnoo_1{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000}._container_1mnoo_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_1mnoo_11{border-radius:0;width:100%;box-shadow:none;height:100dvh;max-height:100dvh}}._toolbar_1mnoo_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_1mnoo_44{background-color:transparent;border-bottom:none}._headerGroup_1mnoo_49{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-2xs);flex:1 1 0}._headerLeft_1mnoo_57{justify-content:flex-start}._headerRight_1mnoo_61{justify-content:flex-end}._closeButton_1mnoo_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_1mnoo_78{overflow:auto;padding:var(--spacing-spacing-default)}@media (max-width:767px){._content_1mnoo_78{padding:var(--spacing-spacing-2xs)}}
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 r } from "react/jsx-runtime";
2
- import { c as a } from "../../clsx-OuTLNxxd.js";
3
- import { Text as _ } from "../../atoms/Text/Text.js";
4
- import { Icon as u } from "../../atoms/Icon/Icon.js";
5
- import '../../assets/Modal.css';const h = "_overlay_1mnoo_1", f = "_container_1mnoo_11", p = "_toolbar_1mnoo_30", b = "_toolbarPlain_1mnoo_44", g = "_headerGroup_1mnoo_49", v = "_headerLeft_1mnoo_57", y = "_headerRight_1mnoo_61", T = "_closeButton_1mnoo_65", x = "_content_1mnoo_78", n = {
6
- overlay: h,
7
- container: f,
8
- toolbar: p,
9
- toolbarPlain: b,
10
- headerGroup: g,
11
- headerLeft: v,
12
- headerRight: y,
13
- closeButton: T,
14
- content: x
15
- }, C = {
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
- }, z = {
20
+ }, R = {
20
21
  sm: "sm",
21
22
  md: "md",
22
23
  lg: "md"
23
- }, c = ({
24
- isOpen: o,
25
- onClose: e,
26
- closeOnOverlayClick: t = !0,
24
+ }, i = ({
25
+ isOpen: t,
26
+ onClose: o,
27
+ closeOnOverlayClick: e = !0,
27
28
  className: l,
28
- children: s,
29
- ...i
29
+ children: c,
30
+ ...u
30
31
  }) => {
31
- if (!o) return null;
32
- const d = (m) => {
33
- t && m.target === m.currentTarget && e();
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__ */ r("div", { className: a(n.overlay), onClick: d, children: /* @__PURE__ */ r("div", { className: a(n.container, l), role: "dialog", "aria-modal": "true", ...i, children: s }) });
36
- }, B = ({ variant: o = "standard", className: e, children: t, ...l }) => /* @__PURE__ */ r(
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: a(n.toolbar, o === "plain" && n.toolbarPlain, e),
47
+ className: s(r.toolbar, t === "plain" && r.toolbarPlain, o),
40
48
  ...l,
41
- children: t
49
+ children: e
42
50
  }
43
- ), N = ({
44
- align: o = "left",
45
- size: e = "md",
46
- variant: t = "display",
51
+ ), G = ({
52
+ align: t = "left",
53
+ size: o = "md",
54
+ variant: e = "display",
47
55
  className: l,
48
- children: s,
49
- ...i
56
+ children: c,
57
+ ...u
50
58
  }) => {
51
- const d = typeof s == "string";
52
- return /* @__PURE__ */ r(
59
+ const a = typeof c == "string";
60
+ return /* @__PURE__ */ n(
53
61
  "div",
54
62
  {
55
- className: a(n.headerGroup, o === "left" ? n.headerLeft : n.headerRight, l),
56
- ...i,
57
- children: d ? /* @__PURE__ */ r(_, { as: "div", size: C[e], variant: t, children: s }) : s
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
- }, G = ({ size: o = "md", className: e, ...t }) => /* @__PURE__ */ r("button", { type: "button", className: a(n.closeButton, e), "aria-label": "Close", ...t, children: /* @__PURE__ */ r(u, { iconKey: "fa-regular fa-xmark", size: z[o] }) }), L = ({ className: o, children: e, ...t }) => /* @__PURE__ */ r("div", { className: a(n.content, o), ...t, children: e });
61
- c.Toolbar = B;
62
- c.Header = N;
63
- c.CloseButton = G;
64
- c.Content = L;
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
- c as Modal
74
+ i as Modal
67
75
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.183",
4
+ "version": "0.0.184",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",