@logora/debate 0.3.102 → 0.3.103

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
+ ._proposalBoxContainer_ru1rh_3{display:flex!important;flex-direction:column!important;justify-content:space-between!important;position:relative;box-shadow:var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1));border:var(--box-border, 1px solid rgba(7, 42, 68, .1));color:var(--text-primary, #222222);border-radius:var(--box-border-radius, 6px);background-color:var(--background-color-primary, white);scroll-margin-top:150px;padding:var(--box-spacing, var(--space-unit, 1em));gap:var(--box-spacing, var(--space-unit, 1em))}._proposalBoxContainer_ru1rh_3._flash_ru1rh_17{-webkit-transition:box-shadow .8s ease-in-out;-moz-transition:box-shadow .8s ease-in-out;-o-transition:box-shadow .8s ease-in-out;transition:box-shadow .8s ease-in-out;box-shadow:0 0 15px var(--call-primary-color, #434343)}._edited_ru1rh_25{font-size:var(--font-size-extra-small, 14px);color:var(--text-secondary, #5F5F5F);line-height:var(--line-height-loose, 1.38em);margin-bottom:var(--spacer-xs, calc(var(--space-unit, 1em) * .325))!important}._proposalBoxContent_ru1rh_32{flex:1;text-align:left;white-space:pre-line;line-height:var(--line-height-loose, 1.38em);font-size:var(--font-size-small, 16px)}@container (min-width: 768px){._proposalBoxContent_ru1rh_32._withMinHeight_ru1rh_41{min-height:185px}}._proposalBoxContent_ru1rh_32 ._proposalTitle_ru1rh_45{font-size:var(--font-size-normal, 16px);font-weight:var(--font-weight-bold, 700);padding-bottom:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important}._proposalBoxContent_ru1rh_32 ._proposalTitle_ru1rh_45:first-letter{text-transform:uppercase}._proposalBoxContent_ru1rh_32 ._proposalContent_ru1rh_53 *{font-size:var(--font-size-small, 16px)}._proposalSourcesList_ru1rh_57{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;font-size:var(--font-size-extra-small, 14px);font-weight:var(--font-weight-normal, 400)}._proposalSourcesList_ru1rh_57 a{text-decoration:none}._fixedHeight_ru1rh_69{height:200px;overflow:hidden;position:relative}._fixedHeight_ru1rh_69:after{content:"";position:absolute;z-index:1;bottom:0;left:0;right:0;pointer-events:none;background-image:linear-gradient(to bottom,#fff0,#fff 90%);width:100%;height:5em}._proposalContent_ru1rh_53 ol{list-style-type:decimal!important;margin-left:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;padding-left:var(--spacer-xl, calc(var(--space-unit, 1em) * 3))!important}._proposalContent_ru1rh_53 ul{list-style-type:disc!important;margin-left:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;padding-left:var(--spacer-xl, calc(var(--space-unit, 1em) * 3))!important}._proposalContent_ru1rh_53 ol li::marker,._proposalContent_ru1rh_53 ul li::marker{content:normal!important}
@@ -1,4 +1,4 @@
1
- import { jsx as t, jsxs as g, Fragment as I } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as d, Fragment as I } from "react/jsx-runtime";
2
2
  import { useState as p, useEffect as N } from "react";
3
3
  import C from "classnames";
4
4
  import { useIntl as y } from "react-intl";
@@ -16,13 +16,13 @@ import { ContentFooter as F } from "../../user_content/content_footer/ContentFoo
16
16
  import { UpDownVoteBox as j } from "../../vote/up_down_vote_box/UpDownVoteBox.js";
17
17
  const te = ({
18
18
  proposal: e,
19
- disabled: d = !1,
20
- fixedContentHeight: c,
19
+ disabled: c = !1,
20
+ fixedContentHeight: m,
21
21
  fitContent: T = !1,
22
22
  enableEdition: v = !0,
23
23
  hideFooter: x = !1
24
24
  }) => {
25
- const [m, M] = p(null), [w, b] = p(!1), r = y(), n = L(), { currentUser: h } = B(), f = h?.moderation_status === "banned", u = `proposal_${e.id}`, i = _(
25
+ const [h, M] = p(null), [w, b] = p(!1), r = y(), n = L(), { currentUser: f } = B(), u = f?.moderation_status === "banned", g = `proposal_${e.id}`, i = _(
26
26
  e.title,
27
27
  e.language,
28
28
  "title",
@@ -45,11 +45,11 @@ const te = ({
45
45
  const S = () => {
46
46
  i.toggleContent(), a.toggleContent();
47
47
  };
48
- return /* @__PURE__ */ t(U, { elementId: u, onScroll: () => b(!0), children: /* @__PURE__ */ g(
48
+ return /* @__PURE__ */ t(U, { elementId: g, onScroll: () => b(!0), children: /* @__PURE__ */ d(
49
49
  "div",
50
50
  {
51
51
  className: C(o.proposalBoxContainer, { [o.flash]: w }),
52
- id: u,
52
+ id: g,
53
53
  children: [
54
54
  /* @__PURE__ */ t(
55
55
  D,
@@ -60,65 +60,67 @@ const te = ({
60
60
  oneLine: !1
61
61
  }
62
62
  ),
63
- /* @__PURE__ */ t(
63
+ /* @__PURE__ */ d(
64
64
  "div",
65
65
  {
66
66
  className: C(o.proposalBoxContent, {
67
- [o.fixedHeight]: c,
68
- [o.withMinHeight]: !T && !c
67
+ [o.fixedHeight]: m,
68
+ [o.withMinHeight]: !T && !m
69
69
  }),
70
- children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
71
- P,
72
- {
73
- content: /* @__PURE__ */ g(I, { children: [
74
- e.is_edited && /* @__PURE__ */ t("div", { className: o.edited, children: r.formatMessage({
75
- id: "proposal.updated",
76
- defaultMessage: "Updated proposal"
77
- }) }),
78
- /* @__PURE__ */ t("div", { className: o.proposalTitle, children: i.translatedContent }),
79
- m && !a.isTranslated ? /* @__PURE__ */ t(
80
- "div",
81
- {
82
- className: o.proposalContent,
83
- dangerouslySetInnerHTML: { __html: m }
84
- }
85
- ) : /* @__PURE__ */ t("div", { className: o.proposalContent, children: a.translatedContent }),
86
- (a.isTranslated || i.isTranslated) && /* @__PURE__ */ t(
87
- R,
88
- {
89
- language: e.language,
90
- callback: () => S()
91
- }
92
- )
93
- ] }),
94
- lineCount: 7,
95
- readMoreText: r.formatMessage({
96
- id: "action.read_more",
97
- defaultMessage: "Read more"
98
- }),
99
- readLessText: r.formatMessage({
100
- id: "action.read_less",
101
- defaultMessage: "Read less"
102
- })
103
- }
104
- ) })
70
+ children: [
71
+ /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
72
+ P,
73
+ {
74
+ content: /* @__PURE__ */ d(I, { children: [
75
+ e.is_edited && /* @__PURE__ */ t("div", { className: o.edited, children: r.formatMessage({
76
+ id: "proposal.updated",
77
+ defaultMessage: "Updated proposal"
78
+ }) }),
79
+ /* @__PURE__ */ t("div", { className: o.proposalTitle, children: i.translatedContent }),
80
+ h && !a.isTranslated ? /* @__PURE__ */ t(
81
+ "div",
82
+ {
83
+ className: o.proposalContent,
84
+ dangerouslySetInnerHTML: { __html: h }
85
+ }
86
+ ) : /* @__PURE__ */ t("div", { className: o.proposalContent, children: a.translatedContent }),
87
+ (a.isTranslated || i.isTranslated) && /* @__PURE__ */ t(
88
+ R,
89
+ {
90
+ language: e.language,
91
+ callback: () => S()
92
+ }
93
+ )
94
+ ] }),
95
+ lineCount: 7,
96
+ readMoreText: r.formatMessage({
97
+ id: "action.read_more",
98
+ defaultMessage: "Read more"
99
+ }),
100
+ readLessText: r.formatMessage({
101
+ id: "action.read_less",
102
+ defaultMessage: "Read less"
103
+ })
104
+ }
105
+ ) }),
106
+ e.sources?.length > 0 && /* @__PURE__ */ t("div", { className: o.proposalSourcesList, children: e.sources.map((s, l) => /* @__PURE__ */ t(
107
+ $,
108
+ {
109
+ publisher: s.publisher,
110
+ url: s.source_url,
111
+ title: s.title,
112
+ index: l
113
+ },
114
+ s.id
115
+ )) })
116
+ ]
105
117
  }
106
118
  ),
107
- e.sources?.length > 0 && /* @__PURE__ */ t("div", { className: o.proposalSourcesList, children: e.sources.map((s, l) => /* @__PURE__ */ t(
108
- $,
109
- {
110
- publisher: s.publisher,
111
- url: s.source_url,
112
- title: s.title,
113
- index: l
114
- },
115
- s.id
116
- )) }),
117
119
  !x && /* @__PURE__ */ t(
118
120
  F,
119
121
  {
120
122
  resource: e,
121
- disabled: d || f,
123
+ disabled: c || u,
122
124
  reportType: "Proposal",
123
125
  deleteType: "proposals",
124
126
  deleteListId: "proposalsList",
@@ -137,7 +139,7 @@ const te = ({
137
139
  voteableId: e.id,
138
140
  totalUpvote: e.total_upvotes,
139
141
  totalDownvote: e.total_downvotes,
140
- disabled: d || h?.id === e?.author?.id || f,
142
+ disabled: c || f?.id === e?.author?.id || u,
141
143
  hideDownvotes: n?.actions?.hideDownvotes
142
144
  }
143
145
  )
@@ -1,23 +1,23 @@
1
- import '../../../assets/components/proposal/proposal_box/ProposalBox.module-Dm8XDnr1.css';const o = "_proposalBoxContainer_5x1d0_3", t = "_flash_5x1d0_17", s = "_edited_5x1d0_25", e = "_proposalBoxContent_5x1d0_32", n = "_withMinHeight_5x1d0_40", p = "_proposalTitle_5x1d0_44", i = "_proposalContent_5x1d0_52", _ = "_proposalSourcesList_5x1d0_56", a = "_fixedHeight_5x1d0_68", l = {
1
+ import '../../../assets/components/proposal/proposal_box/ProposalBox.module-VwIuUE7q.css';const o = "_proposalBoxContainer_ru1rh_3", t = "_flash_ru1rh_17", r = "_edited_ru1rh_25", s = "_proposalBoxContent_ru1rh_32", e = "_withMinHeight_ru1rh_41", n = "_proposalTitle_ru1rh_45", p = "_proposalContent_ru1rh_53", i = "_proposalSourcesList_ru1rh_57", _ = "_fixedHeight_ru1rh_69", a = {
2
2
  proposalBoxContainer: o,
3
3
  flash: t,
4
- edited: s,
5
- proposalBoxContent: e,
6
- withMinHeight: n,
7
- proposalTitle: p,
8
- proposalContent: i,
9
- proposalSourcesList: _,
10
- fixedHeight: a
4
+ edited: r,
5
+ proposalBoxContent: s,
6
+ withMinHeight: e,
7
+ proposalTitle: n,
8
+ proposalContent: p,
9
+ proposalSourcesList: i,
10
+ fixedHeight: _
11
11
  };
12
12
  export {
13
- l as default,
14
- s as edited,
15
- a as fixedHeight,
13
+ a as default,
14
+ r as edited,
15
+ _ as fixedHeight,
16
16
  t as flash,
17
17
  o as proposalBoxContainer,
18
- e as proposalBoxContent,
19
- i as proposalContent,
20
- _ as proposalSourcesList,
21
- p as proposalTitle,
22
- n as withMinHeight
18
+ s as proposalBoxContent,
19
+ p as proposalContent,
20
+ i as proposalSourcesList,
21
+ n as proposalTitle,
22
+ e as withMinHeight
23
23
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.3.102",
3
+ "version": "0.3.103",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",
@@ -1 +0,0 @@
1
- ._proposalBoxContainer_5x1d0_3{display:flex!important;flex-direction:column!important;justify-content:space-between!important;position:relative;box-shadow:var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1));border:var(--box-border, 1px solid rgba(7, 42, 68, .1));color:var(--text-primary, #222222);border-radius:var(--box-border-radius, 6px);background-color:var(--background-color-primary, white);scroll-margin-top:150px;padding:var(--box-spacing, var(--space-unit, 1em));gap:var(--box-spacing, var(--space-unit, 1em))}._proposalBoxContainer_5x1d0_3._flash_5x1d0_17{-webkit-transition:box-shadow .8s ease-in-out;-moz-transition:box-shadow .8s ease-in-out;-o-transition:box-shadow .8s ease-in-out;transition:box-shadow .8s ease-in-out;box-shadow:0 0 15px var(--call-primary-color, #434343)}._edited_5x1d0_25{font-size:var(--font-size-extra-small, 14px);color:var(--text-secondary, #5F5F5F);line-height:var(--line-height-loose, 1.38em);margin-bottom:var(--spacer-xs, calc(var(--space-unit, 1em) * .325))!important}._proposalBoxContent_5x1d0_32{text-align:left;white-space:pre-line;line-height:var(--line-height-loose, 1.38em);font-size:var(--font-size-small, 16px)}@container (min-width: 768px){._proposalBoxContent_5x1d0_32._withMinHeight_5x1d0_40{min-height:185px}}._proposalBoxContent_5x1d0_32 ._proposalTitle_5x1d0_44{font-size:var(--font-size-normal, 16px);font-weight:var(--font-weight-bold, 700);padding-bottom:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important}._proposalBoxContent_5x1d0_32 ._proposalTitle_5x1d0_44:first-letter{text-transform:uppercase}._proposalBoxContent_5x1d0_32 ._proposalContent_5x1d0_52 *{font-size:var(--font-size-small, 16px)}._proposalSourcesList_5x1d0_56{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;font-size:var(--font-size-extra-small, 14px);font-weight:var(--font-weight-normal, 400)}._proposalSourcesList_5x1d0_56 a{text-decoration:none}._fixedHeight_5x1d0_68{height:200px;overflow:hidden;position:relative}._fixedHeight_5x1d0_68:after{content:"";position:absolute;z-index:1;bottom:0;left:0;right:0;pointer-events:none;background-image:linear-gradient(to bottom,#fff0,#fff 90%);width:100%;height:5em}