@logora/debate 0.3.9 → 0.3.10

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
+ ._voteBox_mqtqa_3{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;width:100%}._voteResultsBox_mqtqa_11{display:flex!important;flex-direction:column!important;padding:0!important;width:100%}._voteResults_mqtqa_11{padding:0!important}._voteProgressHeader_mqtqa_22{margin-bottom:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;display:flex!important;align-items:center!important;font-size:var(--font-size-normal, 16px);display:-webkit-box;word-wrap:break-word;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}._voteProgressHeaderAgainst_mqtqa_35{margin-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important}._voteResultsNumberVoters_mqtqa_39{display:flex!important;align-items:center!important;padding:0!important;font-size:var(--font-size-normal, 16px);color:var(--text-secondary, #5F5F5F)}._voteBoxFooter_mqtqa_47{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;margin-top:var(--space-unit, 1em)!important;padding:0!important}._voteBoxActions_mqtqa_56{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center;gap:var(--space-unit, 1em);color:var(--text-secondary, #5F5F5F);width:100%}._voteBoxActionsBody_mqtqa_66{display:grid!important;grid-template-columns:repeat(2,1fr);gap:var(--spacer-md, calc(var(--space-unit, 1em) * .75));padding:0!important;width:100%}._voteBoxActionsBodyColumn_mqtqa_74{grid-template-columns:1fr}._voteAction_mqtqa_78{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;padding:0!important;max-width:100%!important;width:100%!important;text-align:center}._voteAction_mqtqa_78._buttonAlignLeft_mqtqa_88{justify-content:flex-start!important}button._voteButton_mqtqa_92,a._voteButton_mqtqa_92{-webkit-appearance:initial!important;width:100%;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto;padding:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important}._textAlignLeft_mqtqa_103{justify-content:flex-start!important}._voteBoxShowResultContainer_mqtqa_107{display:flex!important;flex-direction:row!important;justify-content:center;flex-wrap:wrap!important;margin-top:.5em}._voteBoxShowResult_mqtqa_107{cursor:pointer}._voteBoxShowResult_mqtqa_107 a{color:inherit;text-decoration:none;background:none!important}._voteBoxShowResult_mqtqa_107 a:hover{text-decoration:none;background:none!important}._voteBoxShowResult_mqtqa_107 ._boldShowResult_mqtqa_127{font-weight:var(--font-weight-bold, 700);color:var(--text-primary, #222222)}._outlined_mqtqa_132{padding:7px 15px;border-radius:var(--box-border-radius, 6px);border:1px solid var(--text-primary, #222222)!important;white-space:nowrap}._voteButtonThesis_mqtqa_139{display:block;text-align:left;display:-webkit-box;word-wrap:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@container (max-width: 767.98px){._voteButtonThesisSynthesisMobile_mqtqa_151{text-align:center!important}}._voteBoxActionsBody_mqtqa_66 ._voteAction_mqtqa_78:first-child ._voteButton_mqtqa_92,._voteBoxActionsBody_mqtqa_66 ._voteAction_mqtqa_78:first-child ._voteButton_mqtqa_92:hover{background-color:var(--for-primary-color, #cc6a6d)!important;border-color:var(--for-primary-color, #cc6a6d)!important;border:1px solid var(--for-primary-color, #cc6a6d)!important}._voteBoxActionsBody_mqtqa_66 ._voteAction_mqtqa_78:nth-child(2) ._voteButton_mqtqa_92{background-color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px var(--against-primary-color, #7980bb)!important}._voteBoxActionsBody_mqtqa_66 ._voteAction_mqtqa_78:nth-child(2) ._voteButton_mqtqa_92:hover{background-color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px var(--against-primary-color, #7980bb)!important}._voteBoxActionsBody_mqtqa_66 ._voteAction_mqtqa_78:nth-child(3) ._voteButton_mqtqa_92{background-color:var(--text-light, white)!important;color:var(--third-position-color-primary, #9b9b9b)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteBoxActionsBody_mqtqa_66 ._voteAction_mqtqa_78:nth-child(3) ._voteButton_mqtqa_92:hover{background-color:var(--text-light, white)!important;color:var(--third-position-color-primary, #9b9b9b)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteActionButton_mqtqa_190{cursor:pointer;-webkit-appearance:initial!important;background:none;border:none;color:var(--text-secondary, #5F5F5F)!important;font-size:inherit;padding:0;font-weight:var(--font-weight-bold, 700)}._sideIcon_mqtqa_201 svg{margin-left:5px;fill:var(--text-primary, #222222)}._progress_mqtqa_206{border-radius:10px;height:25px;color:var(--text-secondary, #5F5F5F)}._progressBar_mqtqa_212{border-radius:10px;height:25px}._voteResults_mqtqa_11>div:first-child ._progress_mqtqa_206 ._progressBar_mqtqa_212{background-color:var(--for-primary-color, #cc6a6d)!important}._voteResults_mqtqa_11>div:nth-child(2) ._progress_mqtqa_206 ._progressBar_mqtqa_212{background-color:var(--against-primary-color, #7980bb)!important}._voteResults_mqtqa_11 div:nth-child(3) ._progress_mqtqa_206 ._progressBar_mqtqa_212{background-color:var(--third-position-color-primary, #9b9b9b)!important}._voteCommentCounts_mqtqa_229{display:flex;align-items:center;gap:var(--space-unit, 1em);width:100%;margin-top:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important}._debateNumberItem_mqtqa_237{display:flex;align-items:center;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5));font-size:var(--font-size-normal, 16px);color:var(--text-primary, #222222);white-space:nowrap}._debateNumberLabel_mqtqa_246{white-space:nowrap}._showResultButton_mqtqa_250{background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer}._voteResultInfoText_mqtqa_259{font-size:var(--font-size-small, 16px);color:var(--text-secondary, #5F5F5F);text-align:left;width:100%;align-self:flex-start}
@@ -1,118 +1,119 @@
1
- import { jsx as s, Fragment as Se, jsxs as l } from "react/jsx-runtime";
1
+ import { jsx as s, Fragment as be, jsxs as l } from "react/jsx-runtime";
2
2
  import P from "@rooks/use-sessionstorage-state";
3
3
  import d from "classnames";
4
- import { useState as b, useEffect as k } from "react";
5
- import { useIntl as be, FormattedMessage as m } from "react-intl";
6
- import { useLocation as _e } from "react-router";
4
+ import { useState as N, useEffect as L } from "react";
5
+ import { useIntl as Ne, FormattedMessage as m } from "react-intl";
6
+ import { useLocation as Se } from "react-router";
7
7
  import o from "./VoteBox.module.scss.js";
8
- import { useTranslatedContent as T } from "../../translation/translated_content/useTranslatedContent.js";
8
+ import { useTranslatedContent as k } from "../../translation/translated_content/useTranslatedContent.js";
9
9
  import { useToast as we } from "../../dialog/toast_provider/useToast.js";
10
- import { useResponsive as Ne } from "../../hooks/use_responsive/useResponsive.js";
11
- import { useAuthRequired as Be } from "../../hooks/use_auth_required/useAuthRequired.js";
12
- import { useDataProvider as Ce } from "../../data/data_provider/useDataProvider.js";
13
- import { useConfig as xe } from "../../data/config_provider/useConfig.js";
14
- import { useAuth as Me } from "../../auth/use_auth/useAuth.js";
15
- import { Icon as j } from "../../icons/icon/Icon.js";
16
- import { ProgressBar as Ve } from "../../progress/progress_bar/ProgressBar.js";
10
+ import { useResponsive as Ce } from "../../hooks/use_responsive/useResponsive.js";
11
+ import { useAuthRequired as xe } from "../../hooks/use_auth_required/useAuthRequired.js";
12
+ import { useDataProvider as Be } from "../../data/data_provider/useDataProvider.js";
13
+ import { useConfig as Me } from "../../data/config_provider/useConfig.js";
14
+ import { useAuth as Ve } from "../../auth/use_auth/useAuth.js";
15
+ import { Icon as T } from "../../icons/icon/Icon.js";
16
+ import { ProgressBar as Re } from "../../progress/progress_bar/ProgressBar.js";
17
17
  import { Tooltip as ee } from "../../dialog/tooltip/Tooltip.js";
18
- import { Link as Re } from "../../action/link/Link.js";
19
- import { Button as Ae } from "../../action/button/Button.js";
20
- const Qe = ({
21
- numberVotes: _,
18
+ import { Link as Ae } from "../../action/link/Link.js";
19
+ import { Button as ye } from "../../action/button/Button.js";
20
+ const Xe = ({
21
+ numberVotes: S,
22
22
  votePositions: r,
23
23
  voteableType: h,
24
- voteableId: v,
24
+ voteableId: g,
25
25
  redirectUrl: w,
26
- displayColumn: F,
26
+ displayColumn: j,
27
27
  textAlignLeft: te,
28
28
  showTotal: oe = !0,
29
- voteBoxClassName: O,
30
- buttonContainerClassName: H,
29
+ voteBoxClassName: F,
30
+ buttonContainerClassName: O,
31
31
  buttonClassName: E,
32
- showResultClassName: U,
33
- onVote: N,
32
+ showResultClassName: I,
33
+ onVote: C,
34
34
  disabled: V = !1,
35
35
  showVotesCommentsNumber: se = !1,
36
- commentsCount: ae
36
+ commentsCount: ae,
37
+ hideShowResultButton: U = !1
37
38
  }) => {
38
- const [I, g] = b(!0), [c, R] = b(void 0), [B, f] = b(!1), [u, ne] = b(
39
- Number.parseFloat(_.total) || Object.values(_).reduce(
39
+ const [H, p] = N(!0), [i, R] = N(void 0), [_, f] = N(!1), [u, ne] = N(
40
+ Number.parseFloat(S.total) || Object.values(S).reduce(
40
41
  (e, t) => e + Number.parseFloat(t),
41
42
  0
42
43
  ) || 0
43
- ), $ = T(
44
+ ), $ = k(
44
45
  r[0]?.name,
45
46
  r[0]?.language,
46
47
  "name",
47
48
  r[0]?.translation_entries
48
- ), q = T(
49
+ ), q = k(
49
50
  r[1]?.name,
50
51
  r[1]?.language,
51
52
  "name",
52
53
  r[1]?.translation_entries
53
- ), Y = T(
54
+ ), Y = k(
54
55
  r[2]?.name,
55
56
  r[2]?.language,
56
57
  "name",
57
58
  r[2]?.translation_entries
58
- ), [p, re, D] = P(
59
+ ), [b, re, D] = P(
59
60
  "storedUserVote",
60
61
  {}
61
- ), [ye, ie, ce] = P("userSide", {}), { toast: G } = we() || {}, { isMobile: W } = Ne(), le = () => {
62
+ ), [Le, ie, ce] = P("userSide", {}), { toast: G } = we() || {}, { isMobile: W } = Ce(), le = () => {
62
63
  const e = {};
63
64
  return r?.forEach(
64
65
  (t) => e[t.id] = {
65
- count: Number.parseFloat(_[t.id]) || 0,
66
+ count: Number.parseFloat(S[t.id]) || 0,
66
67
  percentage: u === 0 ? 0 : Math.round(
67
- 100 * ((_[t.id] || 0) / u)
68
+ 100 * ((S[t.id] || 0) / u)
68
69
  )
69
70
  }
70
71
  ), e;
71
- }, [i, z] = b(le()), J = Be(), de = _e(), A = Ce(), y = xe(), S = be(), { isLoggedIn: C, isLoggingIn: K } = Me();
72
- k(() => {
73
- K === !1 && (C ? me(v) : g(!1));
74
- }, [K, C]), k(() => {
75
- if (I === !1 && !w) {
76
- const [e, t] = ue();
72
+ }, [c, z] = N(le()), J = xe(), de = Se(), A = Be(), ue = Me(), v = Ne(), { isLoggedIn: x, isLoggingIn: K } = Ve();
73
+ L(() => {
74
+ K === !1 && (x ? fe(g) : p(!1));
75
+ }, [K, x]), L(() => {
76
+ if (H === !1 && !w) {
77
+ const [e, t] = me();
77
78
  e && (t ? X(t) : f(!0));
78
79
  }
79
- }, [I]), k(() => {
80
- N && N(c);
81
- }, [c]);
82
- const ue = () => {
83
- if (p && Object.keys(p).length !== 0)
84
- return p.groupId === v && p.voteableType === h ? [!0, p.positionId] : (D(), [!1, !1]);
80
+ }, [H]), L(() => {
81
+ C && C(i);
82
+ }, [i]);
83
+ const me = () => {
84
+ if (b && Object.keys(b).length !== 0)
85
+ return b.groupId === g && b.voteableType === h ? [!0, b.positionId] : (D(), [!1, !1]);
85
86
  const e = new URLSearchParams(
86
87
  typeof window < "u" ? window.location.search : de.search
87
88
  ), t = !!e.get("initVote"), a = Number.parseInt(e.get("positionId")) || !1;
88
89
  return [t, a];
89
- }, me = (e) => {
90
- g(!0), N && N(c), A.getOneWithToken("votes", `${h.toLowerCase()}/${e}`, {}).then((t) => {
91
- t.data.data.resource ? (R(t.data.data.resource), f(!0), g(!1)) : (g(!1), f(!1));
90
+ }, fe = (e) => {
91
+ p(!0), C && C(i), A.getOneWithToken("votes", `${h.toLowerCase()}/${e}`, {}).then((t) => {
92
+ t.data.data.resource ? (R(t.data.data.resource), f(!0), p(!1)) : (p(!1), f(!1));
92
93
  }).catch((t) => {
93
- g(!1);
94
+ p(!1);
94
95
  });
95
- }, x = (e, t) => t === 0 ? 0 : Math.round(100 * (e / t)), fe = (e) => {
96
+ }, B = (e, t) => t === 0 ? 0 : Math.round(100 * (e / t)), ve = (e) => {
96
97
  const t = {
97
- voteable_id: v,
98
+ voteable_id: g,
98
99
  voteable_type: h || "Group",
99
100
  position_id: e
100
101
  };
101
102
  ie({
102
- groupId: v,
103
+ groupId: g,
103
104
  voteableType: h,
104
105
  positionId: e
105
- }), c ? (ve(e, c.position_id), B === !1 && L(), e !== c.position_id && A.update("votes", c.id, t).then((n) => {
106
+ }), i ? (ge(e, i.position_id), _ === !1 && y(), e !== i.position_id && A.update("votes", i.id, t).then((n) => {
106
107
  n.data.success && (R(n.data.data.resource), G(
107
- S.formatMessage({
108
+ v.formatMessage({
108
109
  id: "header.vote_confirm_modal",
109
110
  defaultMessage: "Your vote has been saved !"
110
111
  }),
111
112
  { type: "success" }
112
113
  ));
113
- })) : (he(e), L(), A.create("votes", t).then((n) => {
114
+ })) : (he(e), y(), A.create("votes", t).then((n) => {
114
115
  n.data.success && (R(n.data.data.resource), G(
115
- S.formatMessage({
116
+ v.formatMessage({
116
117
  id: "header.vote_confirm_modal",
117
118
  defaultMessage: "Your vote has been saved !"
118
119
  }),
@@ -120,36 +121,36 @@ const Qe = ({
120
121
  ));
121
122
  }));
122
123
  }, he = (e) => {
123
- const t = i[e].count + 1, a = u + 1, n = {};
124
+ const t = c[e].count + 1, a = u + 1, n = {};
124
125
  r.forEach((M) => {
125
126
  if (e === M.id)
126
127
  n[M.id] = {
127
128
  count: t,
128
- percentage: x(t, a)
129
+ percentage: B(t, a)
129
130
  };
130
131
  else {
131
- const Z = i[M.id].count;
132
+ const Z = c[M.id].count;
132
133
  n[M.id] = {
133
134
  count: Z,
134
- percentage: x(Z, a)
135
+ percentage: B(Z, a)
135
136
  };
136
137
  }
137
138
  }), z(n), ne(a);
138
- }, ve = (e, t) => {
139
+ }, ge = (e, t) => {
139
140
  if (t !== e) {
140
141
  const a = {
141
- ...i,
142
+ ...c,
142
143
  [t]: {
143
- count: i[t].count - 1,
144
- percentage: x(
145
- i[t].count - 1,
144
+ count: c[t].count - 1,
145
+ percentage: B(
146
+ c[t].count - 1,
146
147
  u
147
148
  )
148
149
  },
149
150
  [e]: {
150
- count: i[e].count + 1,
151
- percentage: x(
152
- i[e].count + 1,
151
+ count: c[e].count + 1,
152
+ percentage: B(
153
+ c[e].count + 1,
153
154
  u
154
155
  )
155
156
  }
@@ -163,14 +164,14 @@ const Qe = ({
163
164
  });
164
165
  return w + `?${t.toString()}`;
165
166
  }, X = (e) => {
166
- C ? Object.keys(i).includes(e.toString()) && (fe(e), D()) : (Object.keys(i).includes(e.toString()) && re({
167
- groupId: v,
167
+ x ? Object.keys(c).includes(e.toString()) && (ve(e), D()) : (Object.keys(c).includes(e.toString()) && re({
168
+ groupId: g,
168
169
  voteableType: h,
169
170
  positionId: e
170
171
  }), J({ loginAction: "vote" }));
171
- }, L = () => {
172
- B && ce(), f(!B);
173
- }, ge = (e, t) => {
172
+ }, y = () => {
173
+ _ && ce(), f(!_);
174
+ }, pe = (e, t) => {
174
175
  let a;
175
176
  t === 0 ? a = $.translatedContent : t === 1 ? a = q.translatedContent : t === 2 && (a = Y.translatedContent);
176
177
  const n = typeof window < "u" && !w;
@@ -181,7 +182,7 @@ const Qe = ({
181
182
  [o.buttonAlignLeft]: o.buttonAlignLeft
182
183
  }),
183
184
  children: /* @__PURE__ */ s(
184
- Ae,
185
+ ye,
185
186
  {
186
187
  "data-tid": "action_vote",
187
188
  type: "button",
@@ -202,7 +203,7 @@ const Qe = ({
202
203
  {
203
204
  "data-tid": "action_vote",
204
205
  className: d(o.voteButtonThesis, {
205
- [o.voteButtonThesisSynthesisMobile]: !F
206
+ [o.voteButtonThesisSynthesisMobile]: !j
206
207
  }),
207
208
  children: a
208
209
  }
@@ -212,14 +213,14 @@ const Qe = ({
212
213
  },
213
214
  t
214
215
  );
215
- }, pe = () => {
216
- C || y.actions?.unloggedVoteResults === !0 ? f(!0) : J({ loginAction: "vote" });
216
+ }, _e = () => {
217
+ x || ue.actions?.unloggedVoteResults === !0 ? f(!0) : J({ loginAction: "vote" });
217
218
  };
218
219
  return /* @__PURE__ */ s(
219
220
  "div",
220
221
  {
221
- className: d(o.voteBox, { [O]: O }),
222
- children: /* @__PURE__ */ s(Se, { children: B || V ? /* @__PURE__ */ l("div", { className: o.voteResultsBox, "data-testid": "voteResultsBox", children: [
222
+ className: d(o.voteBox, { [F]: F }),
223
+ children: /* @__PURE__ */ s(be, { children: _ || V ? /* @__PURE__ */ l("div", { className: o.voteResultsBox, "data-testid": "voteResultsBox", children: [
223
224
  /* @__PURE__ */ s("div", { className: o.voteResults, children: r.map((e, t) => {
224
225
  let a;
225
226
  return t === 0 ? a = $.translatedContent : t === 1 ? a = q.translatedContent : t === 2 && (a = Y.translatedContent), /* @__PURE__ */ l("div", { children: [
@@ -233,29 +234,29 @@ const Qe = ({
233
234
  children: [
234
235
  a,
235
236
  " ",
236
- c && c.position_id === e.id ? /* @__PURE__ */ s(
237
+ i && i.position_id === e.id ? /* @__PURE__ */ s(
237
238
  "span",
238
239
  {
239
- title: S.formatMessage({
240
+ title: v.formatMessage({
240
241
  id: "vote.vote_box.vote_side"
241
242
  }) + a,
242
243
  className: o.sideIcon,
243
244
  "aria-hidden": "true",
244
- children: /* @__PURE__ */ s(j, { name: "checkbox", width: 16, height: 16 })
245
+ children: /* @__PURE__ */ s(T, { name: "checkbox", width: 16, height: 16 })
245
246
  }
246
247
  ) : null
247
248
  ]
248
249
  }
249
250
  ),
250
251
  /* @__PURE__ */ l(
251
- Ve,
252
+ Re,
252
253
  {
253
- progress: i[e.id].percentage / 100,
254
+ progress: c[e.id].percentage / 100,
254
255
  goal: 1,
255
256
  className: o.progress,
256
257
  innerClassName: o.progressBar,
257
258
  children: [
258
- i[e.id].percentage,
259
+ c[e.id].percentage,
259
260
  "%"
260
261
  ]
261
262
  }
@@ -271,13 +272,13 @@ const Qe = ({
271
272
  defaultMessage: "{votesCount} votes"
272
273
  }
273
274
  ) }),
274
- !V && /* @__PURE__ */ s("div", { children: c ? /* @__PURE__ */ s(
275
+ !V && /* @__PURE__ */ s("div", { children: i ? /* @__PURE__ */ s(
275
276
  "button",
276
277
  {
277
278
  "data-tid": "action_edit_vote",
278
279
  className: o.voteActionButton,
279
280
  type: "button",
280
- onClick: L,
281
+ onClick: y,
281
282
  children: /* @__PURE__ */ s(
282
283
  m,
283
284
  {
@@ -286,7 +287,7 @@ const Qe = ({
286
287
  }
287
288
  )
288
289
  }
289
- ) : !y?.actions?.hideSHowResultButton && /* @__PURE__ */ s(
290
+ ) : !U && /* @__PURE__ */ s(
290
291
  "button",
291
292
  {
292
293
  type: "button",
@@ -307,11 +308,11 @@ const Qe = ({
307
308
  "div",
308
309
  {
309
310
  className: d(o.voteBoxActionsBody, {
310
- [o.voteBoxActionsBodyColumn]: F,
311
- [H]: H
311
+ [o.voteBoxActionsBodyColumn]: j,
312
+ [O]: O
312
313
  }),
313
314
  children: r.map(
314
- (e, t) => ge(e, t)
315
+ (e, t) => pe(e, t)
315
316
  )
316
317
  }
317
318
  ),
@@ -320,12 +321,12 @@ const Qe = ({
320
321
  ee,
321
322
  {
322
323
  position: W ? "right" : "bottom",
323
- text: S.formatMessage({
324
+ text: v.formatMessage({
324
325
  id: "info.votes_count",
325
326
  defaultMessage: "Votes"
326
327
  }),
327
328
  children: /* @__PURE__ */ l("div", { className: o.debateNumberItem, children: [
328
- /* @__PURE__ */ s(j, { name: "votebox", width: 20, height: 20 }),
329
+ /* @__PURE__ */ s(T, { name: "votebox", width: 20, height: 20 }),
329
330
  /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
330
331
  m,
331
332
  {
@@ -341,12 +342,12 @@ const Qe = ({
341
342
  ee,
342
343
  {
343
344
  position: W ? "right" : "bottom",
344
- text: S.formatMessage({
345
+ text: v.formatMessage({
345
346
  id: "info.arguments_count",
346
347
  defaultMessage: "Comments"
347
348
  }),
348
349
  children: /* @__PURE__ */ l("div", { className: o.debateNumberItem, children: [
349
- /* @__PURE__ */ s(j, { name: "chat", width: 20, height: 20 }),
350
+ /* @__PURE__ */ s(T, { name: "chat", width: 20, height: 20 }),
350
351
  /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
351
352
  m,
352
353
  {
@@ -365,32 +366,29 @@ const Qe = ({
365
366
  className: d(
366
367
  o.voteBoxActions,
367
368
  o.voteBoxShowResultContainer,
368
- { [U]: U }
369
+ { [I]: I }
369
370
  ),
370
- children: /* @__PURE__ */ s("div", { className: o.voteBoxShowResult, children: typeof window < "u" && !w ? !y?.actions?.hideSHowResultButton && /* @__PURE__ */ s(
371
+ children: /* @__PURE__ */ s("div", { className: o.voteBoxShowResult, children: U ? !i && !_ && /* @__PURE__ */ s("div", { className: o.voteResultInfoText, children: v.formatMessage({
372
+ id: "vote.vote_box.result_after_vote",
373
+ defaultMessage: "Le résultat s'affichera après le vote."
374
+ }) }) : typeof window < "u" && !w ? /* @__PURE__ */ s(
371
375
  "button",
372
376
  {
373
377
  type: "button",
374
- onClick: pe,
378
+ onClick: _e,
375
379
  "data-tid": "show_vote_result",
376
380
  "data-testid": "show-result",
377
381
  className: o.showResultButton,
378
- children: /* @__PURE__ */ s(
379
- "span",
382
+ children: /* @__PURE__ */ s("span", { className: d(o.boldShowResult, o.outlined), children: /* @__PURE__ */ s(
383
+ m,
380
384
  {
381
- className: d(o.boldShowResult, o.outlined),
382
- children: /* @__PURE__ */ s(
383
- m,
384
- {
385
- id: "vote.vote_box.show_result",
386
- defaultMessage: "Show result"
387
- }
388
- )
385
+ id: "vote.vote_box.show_result",
386
+ defaultMessage: "Show result"
389
387
  }
390
- )
388
+ ) })
391
389
  }
392
390
  ) : /* @__PURE__ */ s(
393
- Re,
391
+ Ae,
394
392
  {
395
393
  to: Q(null),
396
394
  rel: "nofollow",
@@ -398,19 +396,13 @@ const Qe = ({
398
396
  target: "_top",
399
397
  external: !0,
400
398
  "data-testid": "show-result",
401
- children: /* @__PURE__ */ s(
402
- "span",
399
+ children: /* @__PURE__ */ s("span", { className: d(o.boldShowResult, o.outlined), children: /* @__PURE__ */ s(
400
+ m,
403
401
  {
404
- className: d(o.boldShowResult, o.outlined),
405
- children: /* @__PURE__ */ s(
406
- m,
407
- {
408
- id: "vote.vote_box.show_result",
409
- defaultMessage: "Show result"
410
- }
411
- )
402
+ id: "vote.vote_box.show_result",
403
+ defaultMessage: "Show result"
412
404
  }
413
- )
405
+ ) })
414
406
  }
415
407
  ) })
416
408
  }
@@ -420,5 +412,5 @@ const Qe = ({
420
412
  );
421
413
  };
422
414
  export {
423
- Qe as VoteBox
415
+ Xe as VoteBox
424
416
  };
@@ -1,59 +1,63 @@
1
- import '../../../assets/components/vote/vote_box/VoteBox.module-BhTSjU8w.css';const o = "_voteBox_56m5v_3", t = "_voteResultsBox_56m5v_11", e = "_voteResults_56m5v_11", s = "_voteProgressHeader_56m5v_22", n = "_voteProgressHeaderAgainst_56m5v_35", v = "_voteResultsNumberVoters_56m5v_39", _ = "_voteBoxFooter_56m5v_47", u = "_voteBoxActions_56m5v_56", r = "_voteBoxActionsBody_56m5v_66", B = "_voteBoxActionsBodyColumn_56m5v_74", c = "_voteAction_56m5v_78", i = "_buttonAlignLeft_56m5v_88", m = "_voteButton_56m5v_92", l = "_textAlignLeft_56m5v_103", x = "_voteBoxShowResultContainer_56m5v_107", d = "_voteBoxShowResult_56m5v_107", A = "_boldShowResult_56m5v_127", g = "_outlined_56m5v_132", h = "_voteButtonThesis_56m5v_139", R = "_voteButtonThesisSynthesisMobile_56m5v_151", a = "_voteActionButton_56m5v_190", b = "_sideIcon_56m5v_201", w = "_progress_56m5v_206", C = "_progressBar_56m5v_212", S = "_voteCommentCounts_56m5v_229", y = "_debateNumberItem_56m5v_237", f = "_showResultButton_56m5v_245", p = {
2
- voteBox: o,
3
- voteResultsBox: t,
1
+ import '../../../assets/components/vote/vote_box/VoteBox.module-Dss3uPgM.css';const t = "_voteBox_mqtqa_3", o = "_voteResultsBox_mqtqa_11", e = "_voteResults_mqtqa_11", s = "_voteProgressHeader_mqtqa_22", n = "_voteProgressHeaderAgainst_mqtqa_35", _ = "_voteResultsNumberVoters_mqtqa_39", u = "_voteBoxFooter_mqtqa_47", q = "_voteBoxActions_mqtqa_56", v = "_voteBoxActionsBody_mqtqa_66", a = "_voteBoxActionsBodyColumn_mqtqa_74", r = "_voteAction_mqtqa_78", m = "_buttonAlignLeft_mqtqa_88", c = "_voteButton_mqtqa_92", B = "_textAlignLeft_mqtqa_103", l = "_voteBoxShowResultContainer_mqtqa_107", i = "_voteBoxShowResult_mqtqa_107", x = "_boldShowResult_mqtqa_127", d = "_outlined_mqtqa_132", b = "_voteButtonThesis_mqtqa_139", A = "_voteButtonThesisSynthesisMobile_mqtqa_151", R = "_voteActionButton_mqtqa_190", g = "_sideIcon_mqtqa_201", h = "_progress_mqtqa_206", w = "_progressBar_mqtqa_212", C = "_voteCommentCounts_mqtqa_229", S = "_debateNumberItem_mqtqa_237", f = "_debateNumberLabel_mqtqa_246", y = "_showResultButton_mqtqa_250", I = "_voteResultInfoText_mqtqa_259", L = {
2
+ voteBox: t,
3
+ voteResultsBox: o,
4
4
  voteResults: e,
5
5
  voteProgressHeader: s,
6
6
  voteProgressHeaderAgainst: n,
7
- voteResultsNumberVoters: v,
8
- voteBoxFooter: _,
9
- voteBoxActions: u,
10
- voteBoxActionsBody: r,
11
- voteBoxActionsBodyColumn: B,
12
- voteAction: c,
13
- buttonAlignLeft: i,
14
- voteButton: m,
15
- textAlignLeft: l,
16
- voteBoxShowResultContainer: x,
17
- voteBoxShowResult: d,
18
- boldShowResult: A,
19
- outlined: g,
20
- voteButtonThesis: h,
21
- voteButtonThesisSynthesisMobile: R,
22
- voteActionButton: a,
23
- sideIcon: b,
24
- progress: w,
25
- progressBar: C,
26
- voteCommentCounts: S,
27
- debateNumberItem: y,
28
- showResultButton: f
7
+ voteResultsNumberVoters: _,
8
+ voteBoxFooter: u,
9
+ voteBoxActions: q,
10
+ voteBoxActionsBody: v,
11
+ voteBoxActionsBodyColumn: a,
12
+ voteAction: r,
13
+ buttonAlignLeft: m,
14
+ voteButton: c,
15
+ textAlignLeft: B,
16
+ voteBoxShowResultContainer: l,
17
+ voteBoxShowResult: i,
18
+ boldShowResult: x,
19
+ outlined: d,
20
+ voteButtonThesis: b,
21
+ voteButtonThesisSynthesisMobile: A,
22
+ voteActionButton: R,
23
+ sideIcon: g,
24
+ progress: h,
25
+ progressBar: w,
26
+ voteCommentCounts: C,
27
+ debateNumberItem: S,
28
+ debateNumberLabel: f,
29
+ showResultButton: y,
30
+ voteResultInfoText: I
29
31
  };
30
32
  export {
31
- A as boldShowResult,
32
- i as buttonAlignLeft,
33
- y as debateNumberItem,
34
- p as default,
35
- g as outlined,
36
- w as progress,
37
- C as progressBar,
38
- f as showResultButton,
39
- b as sideIcon,
40
- l as textAlignLeft,
41
- c as voteAction,
42
- a as voteActionButton,
43
- o as voteBox,
44
- u as voteBoxActions,
45
- r as voteBoxActionsBody,
46
- B as voteBoxActionsBodyColumn,
47
- _ as voteBoxFooter,
48
- d as voteBoxShowResult,
49
- x as voteBoxShowResultContainer,
50
- m as voteButton,
51
- h as voteButtonThesis,
52
- R as voteButtonThesisSynthesisMobile,
53
- S as voteCommentCounts,
33
+ x as boldShowResult,
34
+ m as buttonAlignLeft,
35
+ S as debateNumberItem,
36
+ f as debateNumberLabel,
37
+ L as default,
38
+ d as outlined,
39
+ h as progress,
40
+ w as progressBar,
41
+ y as showResultButton,
42
+ g as sideIcon,
43
+ B as textAlignLeft,
44
+ r as voteAction,
45
+ R as voteActionButton,
46
+ t as voteBox,
47
+ q as voteBoxActions,
48
+ v as voteBoxActionsBody,
49
+ a as voteBoxActionsBodyColumn,
50
+ u as voteBoxFooter,
51
+ i as voteBoxShowResult,
52
+ l as voteBoxShowResultContainer,
53
+ c as voteButton,
54
+ b as voteButtonThesis,
55
+ A as voteButtonThesisSynthesisMobile,
56
+ C as voteCommentCounts,
54
57
  s as voteProgressHeader,
55
58
  n as voteProgressHeaderAgainst,
59
+ I as voteResultInfoText,
56
60
  e as voteResults,
57
- t as voteResultsBox,
58
- v as voteResultsNumberVoters
61
+ o as voteResultsBox,
62
+ _ as voteResultsNumberVoters
59
63
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",
@@ -112,5 +112,6 @@
112
112
  "react-dom": "^17.0.0 || ^18.0.0",
113
113
  "react-router": "^6.29.0",
114
114
  "react-router-dom": "^6.29.0"
115
- }
115
+ },
116
+ "packageManager": "pnpm@10.26.0+sha512.3b3f6c725ebe712506c0ab1ad4133cf86b1f4b687effce62a9b38b4d72e3954242e643190fc51fa1642949c735f403debd44f5cb0edd657abe63a8b6a7e1e402"
116
117
  }
@@ -1 +0,0 @@
1
- ._voteBox_56m5v_3{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;width:100%}._voteResultsBox_56m5v_11{display:flex!important;flex-direction:column!important;padding:0!important;width:100%}._voteResults_56m5v_11{padding:0!important}._voteProgressHeader_56m5v_22{margin-bottom:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;display:flex!important;align-items:center!important;font-size:var(--font-size-normal, 16px);display:-webkit-box;word-wrap:break-word;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}._voteProgressHeaderAgainst_56m5v_35{margin-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important}._voteResultsNumberVoters_56m5v_39{display:flex!important;align-items:center!important;padding:0!important;font-size:var(--font-size-normal, 16px);color:var(--text-secondary, #5F5F5F)}._voteBoxFooter_56m5v_47{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;margin-top:var(--space-unit, 1em)!important;padding:0!important}._voteBoxActions_56m5v_56{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center;gap:var(--space-unit, 1em);color:var(--text-secondary, #5F5F5F);width:100%}._voteBoxActionsBody_56m5v_66{display:grid!important;grid-template-columns:repeat(2,1fr);gap:var(--spacer-md, calc(var(--space-unit, 1em) * .75));padding:0!important;width:100%}._voteBoxActionsBodyColumn_56m5v_74{grid-template-columns:1fr}._voteAction_56m5v_78{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;padding:0!important;max-width:100%!important;width:100%!important;text-align:center}._voteAction_56m5v_78._buttonAlignLeft_56m5v_88{justify-content:flex-start!important}button._voteButton_56m5v_92,a._voteButton_56m5v_92{-webkit-appearance:initial!important;width:100%;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto;padding:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important}._textAlignLeft_56m5v_103{justify-content:flex-start!important}._voteBoxShowResultContainer_56m5v_107{display:flex!important;flex-direction:row!important;justify-content:center;flex-wrap:wrap!important;margin-top:.5em}._voteBoxShowResult_56m5v_107{cursor:pointer}._voteBoxShowResult_56m5v_107 a{color:inherit;text-decoration:none;background:none!important}._voteBoxShowResult_56m5v_107 a:hover{text-decoration:none;background:none!important}._voteBoxShowResult_56m5v_107 ._boldShowResult_56m5v_127{font-weight:var(--font-weight-bold, 700);color:var(--text-primary, #222222)}._outlined_56m5v_132{padding:7px 15px;border-radius:var(--box-border-radius, 6px);border:1px solid var(--text-primary, #222222)!important;white-space:nowrap}._voteButtonThesis_56m5v_139{display:block;text-align:left;display:-webkit-box;word-wrap:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@container (max-width: 767.98px){._voteButtonThesisSynthesisMobile_56m5v_151{text-align:center!important}}._voteBoxActionsBody_56m5v_66 ._voteAction_56m5v_78:first-child ._voteButton_56m5v_92,._voteBoxActionsBody_56m5v_66 ._voteAction_56m5v_78:first-child ._voteButton_56m5v_92:hover{background-color:var(--for-primary-color, #cc6a6d)!important;border-color:var(--for-primary-color, #cc6a6d)!important;border:1px solid var(--for-primary-color, #cc6a6d)!important}._voteBoxActionsBody_56m5v_66 ._voteAction_56m5v_78:nth-child(2) ._voteButton_56m5v_92{background-color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px var(--against-primary-color, #7980bb)!important}._voteBoxActionsBody_56m5v_66 ._voteAction_56m5v_78:nth-child(2) ._voteButton_56m5v_92:hover{background-color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px var(--against-primary-color, #7980bb)!important}._voteBoxActionsBody_56m5v_66 ._voteAction_56m5v_78:nth-child(3) ._voteButton_56m5v_92{background-color:var(--text-light, white)!important;color:var(--third-position-color-primary, #9b9b9b)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteBoxActionsBody_56m5v_66 ._voteAction_56m5v_78:nth-child(3) ._voteButton_56m5v_92:hover{background-color:var(--text-light, white)!important;color:var(--third-position-color-primary, #9b9b9b)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteActionButton_56m5v_190{cursor:pointer;-webkit-appearance:initial!important;background:none;border:none;color:var(--text-secondary, #5F5F5F)!important;font-size:inherit;padding:0;font-weight:var(--font-weight-bold, 700)}._sideIcon_56m5v_201 svg{margin-left:5px;fill:var(--text-primary, #222222)}._progress_56m5v_206{border-radius:10px;height:25px;color:var(--text-secondary, #5F5F5F)}._progressBar_56m5v_212{border-radius:10px;height:25px}._voteResults_56m5v_11>div:first-child ._progress_56m5v_206 ._progressBar_56m5v_212{background-color:var(--for-primary-color, #cc6a6d)!important}._voteResults_56m5v_11>div:nth-child(2) ._progress_56m5v_206 ._progressBar_56m5v_212{background-color:var(--against-primary-color, #7980bb)!important}._voteResults_56m5v_11 div:nth-child(3) ._progress_56m5v_206 ._progressBar_56m5v_212{background-color:var(--third-position-color-primary, #9b9b9b)!important}._voteCommentCounts_56m5v_229{display:flex;align-items:center;gap:var(--spacer-xl, calc(var(--space-unit, 1em) * 3));width:100%;margin-top:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important}._debateNumberItem_56m5v_237{display:flex;align-items:center;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5));font-size:var(--font-size-normal, 16px);color:var(--text-primary, #222222)}._showResultButton_56m5v_245{background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer}