@logora/debate 0.4.63 → 0.4.64

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.
@@ -0,0 +1 @@
1
+ ._sectionBox_i352a_3{padding:1em}._content_i352a_7{padding-top:0}._summaryContainer_i352a_11{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;gap:1em}._summaryContainer_i352a_11>div{flex:1 1 calc(50% - .5em);max-width:calc(50% - .5em);display:flex;flex-direction:column}@container (max-width: 767.98px){._summaryContainer_i352a_11{flex-direction:column}._summaryContainer_i352a_11>div{flex:1 1 100%;max-width:100%;width:100%}}._description_i352a_35{color:var(--text-secondary, #5F5F5F);font-size:var(--font-size-small, 16px);margin-bottom:1em}
@@ -1,65 +1,65 @@
1
- import { jsx as l, jsxs as n } from "react/jsx-runtime";
2
- import d from "classnames";
1
+ import { jsx as l, jsxs as s } from "react/jsx-runtime";
2
+ import r from "classnames";
3
3
  import { useRef as g, useEffect as b } from "react";
4
- import { useIntl as w } from "react-intl";
5
- import o from "./Modal.module.scss.js";
6
- import { useModal as C } from "./useModal.js";
7
- import { Icon as M } from "../../icons/icon/Icon.js";
4
+ import { useIntl as C } from "react-intl";
5
+ import e from "./Modal.module.scss.js";
6
+ import { useModal as M } from "./useModal.js";
7
+ import { Icon as x } from "../../icons/icon/Icon.js";
8
8
  const D = ({
9
9
  title: t,
10
- showCloseButton: s = !1,
11
- fullScreen: i,
10
+ showCloseButton: i = !1,
11
+ fullScreen: c,
12
12
  children: m,
13
- disableClickOutside: c = !1,
14
- ...f
13
+ disableClickOutside: f = !1,
14
+ ...u
15
15
  }) => {
16
- const r = g(), u = w(), { hideModal: a } = C();
16
+ const a = g(), h = C(), { hideModal: d } = M();
17
17
  b(() => {
18
- const e = r.current;
19
- if (!e) return;
20
- const p = document.documentElement.style.overflow, y = document.body.style.overflow;
21
- return document.documentElement.style.overflow = "hidden", document.body.style.overflow = "hidden", e.open || e.showModal(), e.focus(), () => {
22
- document.documentElement.style.overflow = p, document.body.style.overflow = y, e.open && e.close();
18
+ const o = a.current;
19
+ if (!o) return;
20
+ const n = window.scrollY, p = document.documentElement.style.overflow, y = document.body.style.overflow;
21
+ return document.documentElement.style.overflow = "hidden", document.body.style.overflow = "hidden", o.open || o.showModal(), o.focus(), window.scrollTo(0, n), () => {
22
+ document.documentElement.style.overflow = p, document.body.style.overflow = y, o.open && o.close(), window.scrollTo(0, n);
23
23
  };
24
24
  }, []);
25
- const h = (e) => {
26
- c || e.currentTarget === e.target && a();
25
+ const w = (o) => {
26
+ f || o.currentTarget === o.target && d();
27
27
  }, v = () => {
28
- a();
28
+ d();
29
29
  };
30
30
  return /* @__PURE__ */ l(
31
31
  "dialog",
32
32
  {
33
- ref: r,
34
- className: d(o.modalDialog, {
35
- [o.modalDialogFullScreen]: i
33
+ ref: a,
34
+ className: r(e.modalDialog, {
35
+ [e.modalDialogFullScreen]: c
36
36
  }),
37
37
  "aria-labelledby": t ? "modal-title" : void 0,
38
- onClick: h,
38
+ onClick: w,
39
39
  onClose: v,
40
- ...f,
41
- children: /* @__PURE__ */ n("div", { className: d(o.modalContainer), children: [
42
- /* @__PURE__ */ n(
40
+ ...u,
41
+ children: /* @__PURE__ */ s("div", { className: r(e.modalContainer), children: [
42
+ /* @__PURE__ */ s(
43
43
  "div",
44
44
  {
45
- className: d(o.modalHeader, {
46
- [o.modalHeaderWithTitle]: t
45
+ className: r(e.modalHeader, {
46
+ [e.modalHeaderWithTitle]: t
47
47
  }),
48
48
  children: [
49
49
  t && /* @__PURE__ */ l("div", { id: "modal-title", children: t }),
50
- s && /* @__PURE__ */ l(
50
+ i && /* @__PURE__ */ l(
51
51
  "button",
52
52
  {
53
53
  type: "button",
54
- className: o.modalExitButton,
55
- onClick: a,
56
- "aria-label": u.formatMessage({
54
+ className: e.modalExitButton,
55
+ onClick: d,
56
+ "aria-label": h.formatMessage({
57
57
  id: "dialog.modal.aria_label",
58
58
  defaultMessage: "Close dialog"
59
59
  }),
60
60
  "data-testid": "close-button",
61
61
  children: /* @__PURE__ */ l(
62
- M,
62
+ x,
63
63
  {
64
64
  name: "close",
65
65
  height: 18,
@@ -73,7 +73,7 @@ const D = ({
73
73
  ]
74
74
  }
75
75
  ),
76
- /* @__PURE__ */ l("div", { className: o.modalContent, children: m })
76
+ /* @__PURE__ */ l("div", { className: e.modalContent, children: m })
77
77
  ] })
78
78
  }
79
79
  );
@@ -1,13 +1,13 @@
1
- import '../../../assets/components/summary/summary/Summary.module-2bnx3egy.css';const t = "_sectionBox_tui97_3", n = "_content_tui97_7", o = "_summaryContainer_tui97_11", s = "_description_tui97_35", i = {
2
- sectionBox: t,
3
- content: n,
1
+ import '../../../assets/components/summary/summary/Summary.module-C1E_L02_.css';const n = "_sectionBox_i352a_3", t = "_content_i352a_7", o = "_summaryContainer_i352a_11", s = "_description_i352a_35", i = {
2
+ sectionBox: n,
3
+ content: t,
4
4
  summaryContainer: o,
5
5
  description: s
6
6
  };
7
7
  export {
8
- n as content,
8
+ t as content,
9
9
  i as default,
10
10
  s as description,
11
- t as sectionBox,
11
+ n as sectionBox,
12
12
  o as summaryContainer
13
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.4.63",
3
+ "version": "0.4.64",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",
@@ -1 +0,0 @@
1
- ._sectionBox_tui97_3{padding:1em}._content_tui97_7{padding-top:1em}._summaryContainer_tui97_11{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;gap:1em}._summaryContainer_tui97_11>div{flex:1 1 calc(50% - .5em);max-width:calc(50% - .5em);display:flex;flex-direction:column}@container (max-width: 767.98px){._summaryContainer_tui97_11{flex-direction:column}._summaryContainer_tui97_11>div{flex:1 1 100%;max-width:100%;width:100%}}._description_tui97_35{color:var(--text-secondary, #5F5F5F);font-size:var(--font-size-small, 16px);margin-bottom:1em}