@logora/debate 0.4.63 → 0.4.65
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/components/summary/summary/Summary.module-C1E_L02_.css +1 -0
- package/dist/components/dialog/modal/Modal.js +34 -34
- package/dist/components/report/report_box/ReportBox.js +1 -1
- package/dist/components/summary/summary/Summary.module.scss.js +5 -5
- package/dist/components/user_content/content_header/ContentHeader.js +19 -19
- package/package.json +1 -1
- package/dist/assets/components/summary/summary/Summary.module-2bnx3egy.css +0 -1
|
@@ -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
|
|
2
|
-
import
|
|
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
|
|
5
|
-
import
|
|
6
|
-
import { useModal as
|
|
7
|
-
import { Icon as
|
|
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:
|
|
11
|
-
fullScreen:
|
|
10
|
+
showCloseButton: i = !1,
|
|
11
|
+
fullScreen: c,
|
|
12
12
|
children: m,
|
|
13
|
-
disableClickOutside:
|
|
14
|
-
...
|
|
13
|
+
disableClickOutside: f = !1,
|
|
14
|
+
...u
|
|
15
15
|
}) => {
|
|
16
|
-
const
|
|
16
|
+
const a = g(), h = C(), { hideModal: d } = M();
|
|
17
17
|
b(() => {
|
|
18
|
-
const
|
|
19
|
-
if (!
|
|
20
|
-
const p = document.documentElement.style.overflow, y = document.body.style.overflow;
|
|
21
|
-
return document.documentElement.style.overflow = "hidden", document.body.style.overflow = "hidden",
|
|
22
|
-
document.documentElement.style.overflow = p, document.body.style.overflow = y,
|
|
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
|
|
26
|
-
|
|
25
|
+
const w = (o) => {
|
|
26
|
+
f || o.currentTarget === o.target && d();
|
|
27
27
|
}, v = () => {
|
|
28
|
-
|
|
28
|
+
d();
|
|
29
29
|
};
|
|
30
30
|
return /* @__PURE__ */ l(
|
|
31
31
|
"dialog",
|
|
32
32
|
{
|
|
33
|
-
ref:
|
|
34
|
-
className:
|
|
35
|
-
[
|
|
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:
|
|
38
|
+
onClick: w,
|
|
39
39
|
onClose: v,
|
|
40
|
-
...
|
|
41
|
-
children: /* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
40
|
+
...u,
|
|
41
|
+
children: /* @__PURE__ */ s("div", { className: r(e.modalContainer), children: [
|
|
42
|
+
/* @__PURE__ */ s(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
|
-
className:
|
|
46
|
-
[
|
|
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
|
-
|
|
50
|
+
i && /* @__PURE__ */ l(
|
|
51
51
|
"button",
|
|
52
52
|
{
|
|
53
53
|
type: "button",
|
|
54
|
-
className:
|
|
55
|
-
onClick:
|
|
56
|
-
"aria-label":
|
|
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
|
-
|
|
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:
|
|
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-
|
|
2
|
-
sectionBox:
|
|
3
|
-
content:
|
|
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
|
-
|
|
8
|
+
t as content,
|
|
9
9
|
i as default,
|
|
10
10
|
s as description,
|
|
11
|
-
|
|
11
|
+
n as sectionBox,
|
|
12
12
|
o as summaryContainer
|
|
13
13
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as o, jsx as
|
|
1
|
+
import { jsxs as o, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import u from "classnames";
|
|
3
3
|
import "react";
|
|
4
4
|
import { useIntl as N } from "react-intl";
|
|
5
5
|
import t from "./ContentHeader.module.scss.js";
|
|
6
|
-
import { useRelativeTime as
|
|
7
|
-
import { useConfig as
|
|
6
|
+
import { useRelativeTime as b } from "../../hooks/use_relative_time/useRelativeTime.js";
|
|
7
|
+
import { useConfig as x } from "../../data/config_provider/useConfig.js";
|
|
8
8
|
import { Icon as g } from "../../icons/icon/Icon.js";
|
|
9
9
|
import { UserBoxSmall as H } from "../../user/user_box_small/UserBoxSmall.js";
|
|
10
10
|
import { AuthorBox as w } from "../../user/author_box/AuthorBox.js";
|
|
@@ -22,11 +22,11 @@ const $ = ({
|
|
|
22
22
|
moderationPolicyUrl: m,
|
|
23
23
|
showModerationFeedback: v = !1
|
|
24
24
|
}) => {
|
|
25
|
-
const M =
|
|
25
|
+
const M = b(new Date(l).getTime()), n = N(), f = x();
|
|
26
26
|
return /* @__PURE__ */ o("div", { className: t.contentHeaderContainer, children: [
|
|
27
27
|
v && /* @__PURE__ */ o("div", { className: t.moderationInfo, children: [
|
|
28
28
|
/* @__PURE__ */ o("div", { className: t.moderationReason, children: [
|
|
29
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ a(
|
|
30
30
|
g,
|
|
31
31
|
{
|
|
32
32
|
name: "announcement",
|
|
@@ -35,17 +35,17 @@ const $ = ({
|
|
|
35
35
|
className: t.warningIcon
|
|
36
36
|
}
|
|
37
37
|
),
|
|
38
|
-
|
|
39
|
-
id: "user_content.content_header.
|
|
38
|
+
n.formatMessage({
|
|
39
|
+
id: "user_content.content_header.moderation_reason_label",
|
|
40
40
|
defaultMessage: "Content rejected by moderation."
|
|
41
41
|
}),
|
|
42
42
|
" ",
|
|
43
|
-
s &&
|
|
43
|
+
s && n.messages[`user_content.content_header.moderation_reason.${s.toLowerCase()}`] ? n.formatMessage({
|
|
44
44
|
id: `user_content.content_header.moderation_reason.${s.toLowerCase()}`,
|
|
45
45
|
defaultMessage: ""
|
|
46
46
|
}) : null
|
|
47
47
|
] }),
|
|
48
|
-
c && /* @__PURE__ */
|
|
48
|
+
c && /* @__PURE__ */ a("div", { children: n.formatMessage(
|
|
49
49
|
{
|
|
50
50
|
id: "user_content.content_header.moderation_notes",
|
|
51
51
|
defaultMessage: "Moderation Notes: {notes}"
|
|
@@ -53,19 +53,19 @@ const $ = ({
|
|
|
53
53
|
{ notes: c }
|
|
54
54
|
) }),
|
|
55
55
|
m && /* @__PURE__ */ o("div", { children: [
|
|
56
|
-
|
|
56
|
+
n.formatMessage({
|
|
57
57
|
id: "user_content.content_header.moderationPolicyUrl",
|
|
58
58
|
defaultMessage: "Please keep contributions respectful. See rules:"
|
|
59
59
|
}),
|
|
60
60
|
" ",
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ a(
|
|
62
62
|
"a",
|
|
63
63
|
{
|
|
64
64
|
href: m,
|
|
65
65
|
target: "_blank",
|
|
66
66
|
rel: "noopener noreferrer",
|
|
67
67
|
className: t.moderationLink,
|
|
68
|
-
children:
|
|
68
|
+
children: n.formatMessage({
|
|
69
69
|
id: "user_content.content_header.moderation_policy_link",
|
|
70
70
|
defaultMessage: "moderation policy"
|
|
71
71
|
})
|
|
@@ -74,21 +74,21 @@ const $ = ({
|
|
|
74
74
|
] })
|
|
75
75
|
] }),
|
|
76
76
|
p && !d && /* @__PURE__ */ o("div", { className: t.selectedContent, children: [
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
77
|
+
/* @__PURE__ */ a(g, { name: "expertBadge", width: 18, height: 18 }),
|
|
78
|
+
n.formatMessage({
|
|
79
79
|
id: "user_content.content_header.selected",
|
|
80
80
|
defaultMessage: "Selected by editor"
|
|
81
81
|
})
|
|
82
82
|
] }),
|
|
83
83
|
/* @__PURE__ */ o("div", { className: t.contentHeader, children: [
|
|
84
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ a("div", { className: t.contentHeaderAuthorBox, children: i === !0 ? /* @__PURE__ */ a(
|
|
85
85
|
H,
|
|
86
86
|
{
|
|
87
87
|
userName: e.full_name,
|
|
88
88
|
avatarUrl: e.image_url,
|
|
89
89
|
userSlug: e.hash_id
|
|
90
90
|
}
|
|
91
|
-
) : /* @__PURE__ */
|
|
91
|
+
) : /* @__PURE__ */ a(
|
|
92
92
|
w,
|
|
93
93
|
{
|
|
94
94
|
fullName: e.full_name,
|
|
@@ -106,13 +106,13 @@ const $ = ({
|
|
|
106
106
|
}
|
|
107
107
|
) }),
|
|
108
108
|
/* @__PURE__ */ o("div", { className: t.contentHeaderRight, children: [
|
|
109
|
-
r && /* @__PURE__ */
|
|
110
|
-
!l || i ? null : /* @__PURE__ */
|
|
109
|
+
r && /* @__PURE__ */ a("div", { className: u(t.contentHeaderTagBox, _), children: /* @__PURE__ */ a("div", { className: t.contentHeaderTag, title: r, children: r }) }),
|
|
110
|
+
!l || i ? null : /* @__PURE__ */ a(
|
|
111
111
|
"div",
|
|
112
112
|
{
|
|
113
113
|
"data-testid": "content-header-date",
|
|
114
114
|
className: u(t.contentHeaderDate),
|
|
115
|
-
"aria-label":
|
|
115
|
+
"aria-label": n.formatMessage({
|
|
116
116
|
id: "user_content.content_header.date",
|
|
117
117
|
defaultMessage: "Publication date"
|
|
118
118
|
}),
|
package/package.json
CHANGED
|
@@ -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}
|