@logora/debate 0.4.45 → 0.4.46

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_1swmt_3{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;width:100%}._voteResultsBox_1swmt_11{display:flex!important;flex-direction:column!important;padding:0!important;width:100%}._voteResults_1swmt_11{padding:0!important}._voteProgressHeader_1swmt_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_1swmt_35{margin-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important}._voteResultsNumberVoters_1swmt_39{display:flex!important;align-items:center!important;padding:0!important;font-size:var(--font-size-normal, 16px);color:var(--text-secondary, #5F5F5F)}._voteBoxFooter_1swmt_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_1swmt_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_1swmt_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_1swmt_74{grid-template-columns:1fr}._voteAction_1swmt_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_1swmt_78._buttonAlignLeft_1swmt_88{justify-content:flex-start!important}button._voteButton_1swmt_92,a._voteButton_1swmt_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_1swmt_103{justify-content:flex-start!important}._voteBoxShowResultContainer_1swmt_107{display:flex!important;flex-direction:row!important;justify-content:center;flex-wrap:wrap!important;margin-top:.3em}._voteBoxShowResult_1swmt_107{cursor:pointer}._voteBoxShowResult_1swmt_107 a{color:inherit;text-decoration:none;background:none!important}._voteBoxShowResult_1swmt_107 a:hover{text-decoration:none;background:none!important}._voteBoxShowResult_1swmt_107 a:focus:not(:focus-visible){outline:none;box-shadow:none}._voteBoxShowResult_1swmt_107 ._boldShowResult_1swmt_131{font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);color:var(--text-primary, #222222)}._outlined_1swmt_137{padding:7px 15px;border-radius:var(--box-border-radius, 6px);border:1px solid var(--text-primary, #222222)!important;white-space:nowrap}._voteButtonThesis_1swmt_144{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_1swmt_156{text-align:center!important}}._voteBoxActionsBody_1swmt_66 ._voteAction_1swmt_78:first-child ._voteButton_1swmt_92,._voteBoxActionsBody_1swmt_66 ._voteAction_1swmt_78:first-child ._voteButton_1swmt_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_1swmt_66 ._voteAction_1swmt_78:nth-child(2) ._voteButton_1swmt_92{background-color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBody_1swmt_66 ._voteAction_1swmt_78:nth-child(2) ._voteButton_1swmt_92:hover{background-color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBody_1swmt_66 ._voteAction_1swmt_78:nth-child(3) ._voteButton_1swmt_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_1swmt_66 ._voteAction_1swmt_78:nth-child(3) ._voteButton_1swmt_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}._voteBoxActionsBodyOutlined_1swmt_195 ._voteAction_1swmt_78:first-child ._voteButton_1swmt_92,._voteBoxActionsBodyOutlined_1swmt_195 ._voteAction_1swmt_78:first-child ._voteButton_1swmt_92:hover{background-color:var(--text-light, white)!important;color:var(--for-primary-color, #cc6a6d)!important;border-color:var(--for-primary-color, #cc6a6d)!important;border:1px solid var(--for-primary-color, #cc6a6d)!important}._voteBoxActionsBodyOutlined_1swmt_195 ._voteAction_1swmt_78:nth-child(2) ._voteButton_1swmt_92{background-color:var(--text-light, white)!important;color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBodyOutlined_1swmt_195 ._voteAction_1swmt_78:nth-child(2) ._voteButton_1swmt_92:hover{background-color:var(--text-light, white)!important;color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBodyOutlined_1swmt_195 ._voteAction_1swmt_78:nth-child(3) ._voteButton_1swmt_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}._voteBoxActionsBodyOutlined_1swmt_195 ._voteAction_1swmt_78:nth-child(3) ._voteButton_1swmt_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_1swmt_234{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);font-variation-settings:var(--font-variation-bold, normal)}._voteActionButton_1swmt_234:focus:not(:focus-visible){outline:none;box-shadow:none}._sideIcon_1swmt_250 svg{margin-left:5px;fill:var(--text-primary, #222222)}._progress_1swmt_255{border-radius:var(--button-border-radius, var(--box-border-radius, 6px));color:var(--text-secondary, #5F5F5F);height:2.2em}._progressBar_1swmt_261{border-radius:var(--button-border-radius, var(--box-border-radius, 6px));height:100%}._voteResults_1swmt_11>div:first-child ._progress_1swmt_255 ._progressBar_1swmt_261{background-color:var(--for-primary-color, #cc6a6d)!important}._voteResults_1swmt_11>div:nth-child(2) ._progress_1swmt_255 ._progressBar_1swmt_261{background-color:var(--against-primary-color, #7980bb)!important}._voteResults_1swmt_11 div:nth-child(3) ._progress_1swmt_255 ._progressBar_1swmt_261{background-color:var(--third-position-color-primary, #9b9b9b)!important}._voteResultsOutlined_1swmt_278>div:first-child ._progress_1swmt_255{border:1px solid var(--for-primary-color, #cc6a6d)!important}._voteResultsOutlined_1swmt_278>div:nth-child(2) ._progress_1swmt_255{border:1px solid var(--against-primary-color, #7980bb)!important}._voteResultsOutlined_1swmt_278>div:nth-child(3) ._progress_1swmt_255{border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteCommentCounts_1swmt_290{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_1swmt_298{display:flex;align-items:center;gap:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25));font-size:var(--font-size-normal, 16px);color:var(--text-primary, #222222);white-space:nowrap}._debateNumberLabel_1swmt_307{white-space:nowrap}._showResultButton_1swmt_311{background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer}._showResultButton_1swmt_311:focus:not(:focus-visible){outline:none;box-shadow:none}._voteResultInfoText_1swmt_324{font-size:var(--font-size-small, 16px);color:var(--text-secondary, #5F5F5F);text-align:left;width:100%;align-self:flex-start}
@@ -1,17 +1,17 @@
1
- import { jsx as s, Fragment as pe, jsxs as l } from "react/jsx-runtime";
1
+ import { jsx as s, Fragment as pe, jsxs as d } from "react/jsx-runtime";
2
2
  import P from "@rooks/use-sessionstorage-state";
3
- import d from "classnames";
4
- import { useState as b, useEffect as L } from "react";
3
+ import l from "classnames";
4
+ import { useState as b, useEffect as k } from "react";
5
5
  import { useIntl as _e, FormattedMessage as m } from "react-intl";
6
6
  import { useLocation as be } from "react-router";
7
7
  import o from "./VoteBox.module.scss.js";
8
- import { useTranslatedContent as k } from "../../translation/translated_content/useTranslatedContent.js";
8
+ import { useTranslatedContent as T } from "../../translation/translated_content/useTranslatedContent.js";
9
9
  import { useToast as Ne } from "../../dialog/toast_provider/useToast.js";
10
10
  import { useAuthRequired as Se } from "../../hooks/use_auth_required/useAuthRequired.js";
11
11
  import { useDataProvider as we } from "../../data/data_provider/useDataProvider.js";
12
12
  import { useConfig as Be } from "../../data/config_provider/useConfig.js";
13
13
  import { useAuth as Ce } from "../../auth/use_auth/useAuth.js";
14
- import { Icon as T } from "../../icons/icon/Icon.js";
14
+ import { Icon as O } from "../../icons/icon/Icon.js";
15
15
  import { ProgressBar as xe } from "../../progress/progress_bar/ProgressBar.js";
16
16
  import { Link as Ve } from "../../action/link/Link.js";
17
17
  import { Button as Me } from "../../action/button/Button.js";
@@ -24,40 +24,40 @@ const We = ({
24
24
  displayColumn: j,
25
25
  textAlignLeft: ee,
26
26
  showTotal: te = !0,
27
- voteBoxClassName: O,
28
- buttonContainerClassName: F,
29
- buttonClassName: E,
30
- showResultClassName: I,
27
+ voteBoxClassName: F,
28
+ buttonContainerClassName: E,
29
+ buttonClassName: I,
30
+ showResultClassName: U,
31
31
  onVote: w,
32
32
  disabled: M = !1,
33
33
  showVotesCommentsNumber: oe = !1,
34
34
  commentsCount: se,
35
- hideShowResultButton: U = !1
35
+ hideShowResultButton: H = !1
36
36
  }) => {
37
- const [H, g] = b(!0), [c, A] = b(void 0), [p, f] = b(!1), [u, ae] = b(
37
+ const [$, g] = b(!0), [c, y] = b(void 0), [p, f] = b(!1), [u, ae] = b(
38
38
  Number.parseFloat(N.total) || Object.values(N).reduce(
39
39
  (e, t) => e + Number.parseFloat(t),
40
40
  0
41
41
  ) || 0
42
- ), $ = k(
42
+ ), q = T(
43
43
  r[0]?.name,
44
44
  r[0]?.language,
45
45
  "name",
46
46
  r[0]?.translation_entries
47
- ), q = k(
47
+ ), Y = T(
48
48
  r[1]?.name,
49
49
  r[1]?.language,
50
50
  "name",
51
51
  r[1]?.translation_entries
52
- ), Y = k(
52
+ ), D = T(
53
53
  r[2]?.name,
54
54
  r[2]?.language,
55
55
  "name",
56
56
  r[2]?.translation_entries
57
- ), [_, ne, D] = P(
57
+ ), [_, ne, G] = P(
58
58
  "storedUserVote",
59
59
  {}
60
- ), [Ae, re, ie] = P("userSide", {}), { toast: G } = Ne() || {}, ce = () => {
60
+ ), [ye, re, ie] = P("userSide", {}), { toast: W } = Ne() || {}, ce = () => {
61
61
  const e = {};
62
62
  return r?.forEach(
63
63
  (t) => e[t.id] = {
@@ -67,27 +67,27 @@ const We = ({
67
67
  )
68
68
  }
69
69
  ), e;
70
- }, [i, W] = b(ce()), z = Se(), le = be(), y = we(), J = Be(), B = _e(), { isLoggedIn: C, isLoggingIn: K } = Ce();
71
- L(() => {
70
+ }, [i, z] = b(ce()), J = Se(), le = be(), A = we(), R = Be(), B = _e(), { isLoggedIn: C, isLoggingIn: K } = Ce();
71
+ k(() => {
72
72
  K === !1 && (C ? ue(h) : g(!1));
73
- }, [K, C]), L(() => {
74
- if (H === !1 && !S) {
73
+ }, [K, C]), k(() => {
74
+ if ($ === !1 && !S) {
75
75
  const [e, t] = de();
76
76
  e && (t ? X(t) : f(!0));
77
77
  }
78
- }, [H]), L(() => {
78
+ }, [$]), k(() => {
79
79
  w && w(c);
80
80
  }, [c]);
81
81
  const de = () => {
82
82
  if (_ && Object.keys(_).length !== 0)
83
- return _.groupId === h && _.voteableType === v ? [!0, _.positionId] : (D(), [!1, !1]);
83
+ return _.groupId === h && _.voteableType === v ? [!0, _.positionId] : (G(), [!1, !1]);
84
84
  const e = new URLSearchParams(
85
85
  typeof window < "u" ? window.location.search : le.search
86
86
  ), t = !!e.get("initVote"), a = Number.parseInt(e.get("positionId")) || !1;
87
87
  return [t, a];
88
88
  }, ue = (e) => {
89
- g(!0), w && w(c), y.getOneWithToken("votes", `${v.toLowerCase()}/${e}`, {}).then((t) => {
90
- t.data.data.resource ? (A(t.data.data.resource), f(!0), g(!1)) : (g(!1), f(!1));
89
+ g(!0), w && w(c), A.getOneWithToken("votes", `${v.toLowerCase()}/${e}`, {}).then((t) => {
90
+ t.data.data.resource ? (y(t.data.data.resource), f(!0), g(!1)) : (g(!1), f(!1));
91
91
  }).catch((t) => {
92
92
  g(!1);
93
93
  });
@@ -101,16 +101,16 @@ const We = ({
101
101
  groupId: h,
102
102
  voteableType: v,
103
103
  positionId: e
104
- }), c ? (ve(e, c.position_id), p === !1 && R(), e !== c.position_id && y.update("votes", c.id, t).then((n) => {
105
- n.data.success && (A(n.data.data.resource), G(
104
+ }), c ? (ve(e, c.position_id), p === !1 && L(), e !== c.position_id && A.update("votes", c.id, t).then((n) => {
105
+ n.data.success && (y(n.data.data.resource), W(
106
106
  B.formatMessage({
107
107
  id: "header.vote_confirm_modal",
108
108
  defaultMessage: "Your vote has been saved !"
109
109
  }),
110
110
  { type: "success" }
111
111
  ));
112
- })) : (fe(e), R(), y.create("votes", t).then((n) => {
113
- n.data.success && (A(n.data.data.resource), G(
112
+ })) : (fe(e), L(), A.create("votes", t).then((n) => {
113
+ n.data.success && (y(n.data.data.resource), W(
114
114
  B.formatMessage({
115
115
  id: "header.vote_confirm_modal",
116
116
  defaultMessage: "Your vote has been saved !"
@@ -133,7 +133,7 @@ const We = ({
133
133
  percentage: x(Z, a)
134
134
  };
135
135
  }
136
- }), W(n), ae(a);
136
+ }), z(n), ae(a);
137
137
  }, ve = (e, t) => {
138
138
  if (t !== e) {
139
139
  const a = {
@@ -153,7 +153,7 @@ const We = ({
153
153
  )
154
154
  }
155
155
  };
156
- W(a);
156
+ z(a);
157
157
  }
158
158
  }, Q = (e) => {
159
159
  const t = new URLSearchParams({
@@ -162,21 +162,21 @@ const We = ({
162
162
  });
163
163
  return S + `?${t.toString()}`;
164
164
  }, X = (e) => {
165
- C ? Object.keys(i).includes(e.toString()) && (me(e), D()) : (Object.keys(i).includes(e.toString()) && ne({
165
+ C ? Object.keys(i).includes(e.toString()) && (me(e), G()) : (Object.keys(i).includes(e.toString()) && ne({
166
166
  groupId: h,
167
167
  voteableType: v,
168
168
  positionId: e
169
- }), z({ loginAction: "vote" }));
170
- }, R = () => {
169
+ }), J({ loginAction: "vote" }));
170
+ }, L = () => {
171
171
  p && ie(), f(!p);
172
172
  }, he = (e, t) => {
173
173
  let a;
174
- t === 0 ? a = $.translatedContent : t === 1 ? a = q.translatedContent : t === 2 && (a = Y.translatedContent);
174
+ t === 0 ? a = q.translatedContent : t === 1 ? a = Y.translatedContent : t === 2 && (a = D.translatedContent);
175
175
  const n = typeof window < "u" && !S;
176
176
  return /* @__PURE__ */ s(
177
177
  "div",
178
178
  {
179
- className: d(o.voteAction, {
179
+ className: l(o.voteAction, {
180
180
  [o.buttonAlignLeft]: o.buttonAlignLeft
181
181
  }),
182
182
  children: /* @__PURE__ */ s(
@@ -185,9 +185,9 @@ const We = ({
185
185
  "data-tid": "action_vote",
186
186
  type: "button",
187
187
  title: a,
188
- className: d(o.voteButton, {
188
+ className: l(o.voteButton, {
189
189
  [o.textAlignLeft]: ee,
190
- [E]: E
190
+ [I]: I
191
191
  }),
192
192
  onClick: n ? () => X(e.id) : null,
193
193
  disabled: M,
@@ -200,7 +200,7 @@ const We = ({
200
200
  "div",
201
201
  {
202
202
  "data-tid": "action_vote",
203
- className: d(o.voteButtonThesis, {
203
+ className: l(o.voteButtonThesis, {
204
204
  [o.voteButtonThesisSynthesisMobile]: !j
205
205
  }),
206
206
  children: a
@@ -212,56 +212,64 @@ const We = ({
212
212
  t
213
213
  );
214
214
  }, ge = () => {
215
- C || J.actions?.unloggedVoteResults === !0 ? f(!0) : z({ loginAction: "vote" });
215
+ C || R.actions?.unloggedVoteResults === !0 ? f(!0) : J({ loginAction: "vote" });
216
216
  };
217
217
  return /* @__PURE__ */ s(
218
218
  "div",
219
219
  {
220
- className: d(o.voteBox, { [O]: O }),
221
- children: /* @__PURE__ */ s(pe, { children: p || M ? /* @__PURE__ */ l("div", { className: o.voteResultsBox, "data-testid": "voteResultsBox", children: [
222
- /* @__PURE__ */ s("div", { className: o.voteResults, children: r.map((e, t) => {
223
- let a;
224
- return t === 0 ? a = $.translatedContent : t === 1 ? a = q.translatedContent : t === 2 && (a = Y.translatedContent), /* @__PURE__ */ l("div", { children: [
225
- /* @__PURE__ */ l(
226
- "div",
227
- {
228
- className: t > 0 ? d(
229
- o.voteProgressHeader,
230
- o.voteProgressHeaderAgainst
231
- ) : o.voteProgressHeader,
232
- children: [
233
- a,
234
- " ",
235
- c && c.position_id === e.id ? /* @__PURE__ */ s(
236
- "span",
237
- {
238
- title: B.formatMessage({
239
- id: "vote.vote_box.vote_side"
240
- }) + a,
241
- className: o.sideIcon,
242
- "aria-hidden": "true",
243
- children: /* @__PURE__ */ s(T, { name: "checkbox", width: 16, height: 16 })
244
- }
245
- ) : null
246
- ]
247
- }
248
- ),
249
- /* @__PURE__ */ l(
250
- xe,
251
- {
252
- progress: i[e.id].percentage / 100,
253
- goal: 1,
254
- className: o.progress,
255
- innerClassName: o.progressBar,
256
- children: [
257
- i[e.id].percentage,
258
- "%"
259
- ]
260
- }
261
- )
262
- ] }, t);
263
- }) }),
264
- /* @__PURE__ */ l("div", { className: o.voteBoxFooter, children: [
220
+ className: l(o.voteBox, { [F]: F }),
221
+ children: /* @__PURE__ */ s(pe, { children: p || M ? /* @__PURE__ */ d("div", { className: o.voteResultsBox, "data-testid": "voteResultsBox", children: [
222
+ /* @__PURE__ */ s(
223
+ "div",
224
+ {
225
+ className: l(o.voteResults, {
226
+ [o.voteResultsOutlined]: R.layout?.outlinedVoteButtons
227
+ }),
228
+ children: r.map((e, t) => {
229
+ let a;
230
+ return t === 0 ? a = q.translatedContent : t === 1 ? a = Y.translatedContent : t === 2 && (a = D.translatedContent), /* @__PURE__ */ d("div", { children: [
231
+ /* @__PURE__ */ d(
232
+ "div",
233
+ {
234
+ className: t > 0 ? l(
235
+ o.voteProgressHeader,
236
+ o.voteProgressHeaderAgainst
237
+ ) : o.voteProgressHeader,
238
+ children: [
239
+ a,
240
+ " ",
241
+ c && c.position_id === e.id ? /* @__PURE__ */ s(
242
+ "span",
243
+ {
244
+ title: B.formatMessage({
245
+ id: "vote.vote_box.vote_side"
246
+ }) + a,
247
+ className: o.sideIcon,
248
+ "aria-hidden": "true",
249
+ children: /* @__PURE__ */ s(O, { name: "checkbox", width: 16, height: 16 })
250
+ }
251
+ ) : null
252
+ ]
253
+ }
254
+ ),
255
+ /* @__PURE__ */ d(
256
+ xe,
257
+ {
258
+ progress: i[e.id].percentage / 100,
259
+ goal: 1,
260
+ className: o.progress,
261
+ innerClassName: o.progressBar,
262
+ children: [
263
+ i[e.id].percentage,
264
+ "%"
265
+ ]
266
+ }
267
+ )
268
+ ] }, t);
269
+ })
270
+ }
271
+ ),
272
+ /* @__PURE__ */ d("div", { className: o.voteBoxFooter, children: [
265
273
  te && /* @__PURE__ */ s("div", { className: o.voteResultsNumberVoters, children: /* @__PURE__ */ s(
266
274
  m,
267
275
  {
@@ -276,7 +284,7 @@ const We = ({
276
284
  "data-tid": "action_edit_vote",
277
285
  className: o.voteActionButton,
278
286
  type: "button",
279
- onClick: R,
287
+ onClick: L,
280
288
  children: /* @__PURE__ */ s(
281
289
  m,
282
290
  {
@@ -285,7 +293,7 @@ const We = ({
285
293
  }
286
294
  )
287
295
  }
288
- ) : !U && /* @__PURE__ */ s(
296
+ ) : !H && /* @__PURE__ */ s(
289
297
  "button",
290
298
  {
291
299
  type: "button",
@@ -301,23 +309,23 @@ const We = ({
301
309
  }
302
310
  ) })
303
311
  ] })
304
- ] }) : /* @__PURE__ */ l("div", { className: o.voteBoxActions, children: [
312
+ ] }) : /* @__PURE__ */ d("div", { className: o.voteBoxActions, children: [
305
313
  /* @__PURE__ */ s(
306
314
  "div",
307
315
  {
308
- className: d(o.voteBoxActionsBody, {
316
+ className: l(o.voteBoxActionsBody, {
309
317
  [o.voteBoxActionsBodyColumn]: j,
310
- [o.voteBoxActionsBodyOutlined]: J.layout?.outlinedVoteButtons,
311
- [F]: F
318
+ [o.voteBoxActionsBodyOutlined]: R.layout?.outlinedVoteButtons,
319
+ [E]: E
312
320
  }),
313
321
  children: r.map(
314
322
  (e, t) => he(e, t)
315
323
  )
316
324
  }
317
325
  ),
318
- oe && /* @__PURE__ */ l("div", { className: o.voteCommentCounts, children: [
319
- /* @__PURE__ */ l("div", { className: o.debateNumberItem, children: [
320
- /* @__PURE__ */ s(T, { name: "votebox", width: 20, height: 20 }),
326
+ oe && /* @__PURE__ */ d("div", { className: o.voteCommentCounts, children: [
327
+ /* @__PURE__ */ d("div", { className: o.debateNumberItem, children: [
328
+ /* @__PURE__ */ s(O, { name: "votebox", width: 20, height: 20 }),
321
329
  /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
322
330
  m,
323
331
  {
@@ -327,8 +335,8 @@ const We = ({
327
335
  }
328
336
  ) })
329
337
  ] }),
330
- /* @__PURE__ */ l("div", { className: o.debateNumberItem, children: [
331
- /* @__PURE__ */ s(T, { name: "chat", width: 20, height: 20 }),
338
+ /* @__PURE__ */ d("div", { className: o.debateNumberItem, children: [
339
+ /* @__PURE__ */ s(O, { name: "chat", width: 20, height: 20 }),
332
340
  /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
333
341
  m,
334
342
  {
@@ -342,12 +350,12 @@ const We = ({
342
350
  /* @__PURE__ */ s(
343
351
  "div",
344
352
  {
345
- className: d(
353
+ className: l(
346
354
  o.voteBoxActions,
347
355
  o.voteBoxShowResultContainer,
348
- { [I]: I }
356
+ { [U]: U }
349
357
  ),
350
- children: /* @__PURE__ */ s("div", { className: o.voteBoxShowResult, children: U ? !p && /* @__PURE__ */ s("div", { className: o.voteResultInfoText, children: B.formatMessage({
358
+ children: /* @__PURE__ */ s("div", { className: o.voteBoxShowResult, children: H ? !p && /* @__PURE__ */ s("div", { className: o.voteResultInfoText, children: B.formatMessage({
351
359
  id: "vote.vote_box.result_after_vote",
352
360
  defaultMessage: "Le résultat s'affichera après le vote."
353
361
  }) }) : typeof window < "u" && !S ? /* @__PURE__ */ s(
@@ -358,7 +366,7 @@ const We = ({
358
366
  "data-tid": "show_vote_result",
359
367
  "data-testid": "show-result",
360
368
  className: o.showResultButton,
361
- children: /* @__PURE__ */ s("span", { className: d(o.boldShowResult, o.outlined), children: /* @__PURE__ */ s(
369
+ children: /* @__PURE__ */ s("span", { className: l(o.boldShowResult, o.outlined), children: /* @__PURE__ */ s(
362
370
  m,
363
371
  {
364
372
  id: "vote.vote_box.show_result",
@@ -375,7 +383,7 @@ const We = ({
375
383
  target: "_top",
376
384
  external: !0,
377
385
  "data-testid": "show-result",
378
- children: /* @__PURE__ */ s("span", { className: d(o.boldShowResult, o.outlined), children: /* @__PURE__ */ s(
386
+ children: /* @__PURE__ */ s("span", { className: l(o.boldShowResult, o.outlined), children: /* @__PURE__ */ s(
379
387
  m,
380
388
  {
381
389
  id: "vote.vote_box.show_result",
@@ -1,65 +1,67 @@
1
- import '../../../assets/components/vote/vote_box/VoteBox.module-B8Gtalg7.css';const o = "_voteBox_1kfo8_3", t = "_voteResultsBox_1kfo8_11", e = "_voteResults_1kfo8_11", s = "_voteProgressHeader_1kfo8_22", n = "_voteProgressHeaderAgainst_1kfo8_35", _ = "_voteResultsNumberVoters_1kfo8_39", u = "_voteBoxFooter_1kfo8_47", v = "_voteBoxActions_1kfo8_56", B = "_voteBoxActionsBody_1kfo8_66", c = "_voteBoxActionsBodyColumn_1kfo8_74", r = "_voteAction_1kfo8_78", i = "_buttonAlignLeft_1kfo8_88", l = "_voteButton_1kfo8_92", f = "_textAlignLeft_1kfo8_103", d = "_voteBoxShowResultContainer_1kfo8_107", x = "_voteBoxShowResult_1kfo8_107", k = "_boldShowResult_1kfo8_131", b = "_outlined_1kfo8_137", A = "_voteButtonThesis_1kfo8_144", a = "_voteButtonThesisSynthesisMobile_1kfo8_156", R = "_voteBoxActionsBodyOutlined_1kfo8_195", g = "_voteActionButton_1kfo8_234", h = "_sideIcon_1kfo8_250", m = "_progress_1kfo8_255", y = "_progressBar_1kfo8_261", w = "_voteCommentCounts_1kfo8_290", C = "_debateNumberItem_1kfo8_298", S = "_debateNumberLabel_1kfo8_307", I = "_showResultButton_1kfo8_311", L = "_voteResultInfoText_1kfo8_324", N = {
2
- voteBox: o,
3
- voteResultsBox: t,
1
+ import '../../../assets/components/vote/vote_box/VoteBox.module-DzckmyN1.css';const t = "_voteBox_1swmt_3", o = "_voteResultsBox_1swmt_11", e = "_voteResults_1swmt_11", s = "_voteProgressHeader_1swmt_22", n = "_voteProgressHeaderAgainst_1swmt_35", _ = "_voteResultsNumberVoters_1swmt_39", u = "_voteBoxFooter_1swmt_47", v = "_voteBoxActions_1swmt_56", l = "_voteBoxActionsBody_1swmt_66", i = "_voteBoxActionsBodyColumn_1swmt_74", B = "_voteAction_1swmt_78", c = "_buttonAlignLeft_1swmt_88", m = "_voteButton_1swmt_92", r = "_textAlignLeft_1swmt_103", w = "_voteBoxShowResultContainer_1swmt_107", d = "_voteBoxShowResult_1swmt_107", x = "_boldShowResult_1swmt_131", b = "_outlined_1swmt_137", A = "_voteButtonThesis_1swmt_144", R = "_voteButtonThesisSynthesisMobile_1swmt_156", a = "_voteBoxActionsBodyOutlined_1swmt_195", g = "_voteActionButton_1swmt_234", h = "_sideIcon_1swmt_250", y = "_progress_1swmt_255", C = "_progressBar_1swmt_261", S = "_voteResultsOutlined_1swmt_278", f = "_voteCommentCounts_1swmt_290", I = "_debateNumberItem_1swmt_298", L = "_debateNumberLabel_1swmt_307", N = "_showResultButton_1swmt_311", T = "_voteResultInfoText_1swmt_324", p = {
2
+ voteBox: t,
3
+ voteResultsBox: o,
4
4
  voteResults: e,
5
5
  voteProgressHeader: s,
6
6
  voteProgressHeaderAgainst: n,
7
7
  voteResultsNumberVoters: _,
8
8
  voteBoxFooter: u,
9
9
  voteBoxActions: v,
10
- voteBoxActionsBody: B,
11
- voteBoxActionsBodyColumn: c,
12
- voteAction: r,
13
- buttonAlignLeft: i,
14
- voteButton: l,
15
- textAlignLeft: f,
16
- voteBoxShowResultContainer: d,
17
- voteBoxShowResult: x,
18
- boldShowResult: k,
10
+ voteBoxActionsBody: l,
11
+ voteBoxActionsBodyColumn: i,
12
+ voteAction: B,
13
+ buttonAlignLeft: c,
14
+ voteButton: m,
15
+ textAlignLeft: r,
16
+ voteBoxShowResultContainer: w,
17
+ voteBoxShowResult: d,
18
+ boldShowResult: x,
19
19
  outlined: b,
20
20
  voteButtonThesis: A,
21
- voteButtonThesisSynthesisMobile: a,
22
- voteBoxActionsBodyOutlined: R,
21
+ voteButtonThesisSynthesisMobile: R,
22
+ voteBoxActionsBodyOutlined: a,
23
23
  voteActionButton: g,
24
24
  sideIcon: h,
25
- progress: m,
26
- progressBar: y,
27
- voteCommentCounts: w,
28
- debateNumberItem: C,
29
- debateNumberLabel: S,
30
- showResultButton: I,
31
- voteResultInfoText: L
25
+ progress: y,
26
+ progressBar: C,
27
+ voteResultsOutlined: S,
28
+ voteCommentCounts: f,
29
+ debateNumberItem: I,
30
+ debateNumberLabel: L,
31
+ showResultButton: N,
32
+ voteResultInfoText: T
32
33
  };
33
34
  export {
34
- k as boldShowResult,
35
- i as buttonAlignLeft,
36
- C as debateNumberItem,
37
- S as debateNumberLabel,
38
- N as default,
35
+ x as boldShowResult,
36
+ c as buttonAlignLeft,
37
+ I as debateNumberItem,
38
+ L as debateNumberLabel,
39
+ p as default,
39
40
  b as outlined,
40
- m as progress,
41
- y as progressBar,
42
- I as showResultButton,
41
+ y as progress,
42
+ C as progressBar,
43
+ N as showResultButton,
43
44
  h as sideIcon,
44
- f as textAlignLeft,
45
- r as voteAction,
45
+ r as textAlignLeft,
46
+ B as voteAction,
46
47
  g as voteActionButton,
47
- o as voteBox,
48
+ t as voteBox,
48
49
  v as voteBoxActions,
49
- B as voteBoxActionsBody,
50
- c as voteBoxActionsBodyColumn,
51
- R as voteBoxActionsBodyOutlined,
50
+ l as voteBoxActionsBody,
51
+ i as voteBoxActionsBodyColumn,
52
+ a as voteBoxActionsBodyOutlined,
52
53
  u as voteBoxFooter,
53
- x as voteBoxShowResult,
54
- d as voteBoxShowResultContainer,
55
- l as voteButton,
54
+ d as voteBoxShowResult,
55
+ w as voteBoxShowResultContainer,
56
+ m as voteButton,
56
57
  A as voteButtonThesis,
57
- a as voteButtonThesisSynthesisMobile,
58
- w as voteCommentCounts,
58
+ R as voteButtonThesisSynthesisMobile,
59
+ f as voteCommentCounts,
59
60
  s as voteProgressHeader,
60
61
  n as voteProgressHeaderAgainst,
61
- L as voteResultInfoText,
62
+ T as voteResultInfoText,
62
63
  e as voteResults,
63
- t as voteResultsBox,
64
- _ as voteResultsNumberVoters
64
+ o as voteResultsBox,
65
+ _ as voteResultsNumberVoters,
66
+ S as voteResultsOutlined
65
67
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.4.45",
3
+ "version": "0.4.46",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",
@@ -1 +0,0 @@
1
- ._voteBox_1kfo8_3{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;width:100%}._voteResultsBox_1kfo8_11{display:flex!important;flex-direction:column!important;padding:0!important;width:100%}._voteResults_1kfo8_11{padding:0!important}._voteProgressHeader_1kfo8_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_1kfo8_35{margin-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important}._voteResultsNumberVoters_1kfo8_39{display:flex!important;align-items:center!important;padding:0!important;font-size:var(--font-size-normal, 16px);color:var(--text-secondary, #5F5F5F)}._voteBoxFooter_1kfo8_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_1kfo8_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_1kfo8_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_1kfo8_74{grid-template-columns:1fr}._voteAction_1kfo8_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_1kfo8_78._buttonAlignLeft_1kfo8_88{justify-content:flex-start!important}button._voteButton_1kfo8_92,a._voteButton_1kfo8_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_1kfo8_103{justify-content:flex-start!important}._voteBoxShowResultContainer_1kfo8_107{display:flex!important;flex-direction:row!important;justify-content:center;flex-wrap:wrap!important;margin-top:.3em}._voteBoxShowResult_1kfo8_107{cursor:pointer}._voteBoxShowResult_1kfo8_107 a{color:inherit;text-decoration:none;background:none!important}._voteBoxShowResult_1kfo8_107 a:hover{text-decoration:none;background:none!important}._voteBoxShowResult_1kfo8_107 a:focus:not(:focus-visible){outline:none;box-shadow:none}._voteBoxShowResult_1kfo8_107 ._boldShowResult_1kfo8_131{font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);color:var(--text-primary, #222222)}._outlined_1kfo8_137{padding:7px 15px;border-radius:var(--box-border-radius, 6px);border:1px solid var(--text-primary, #222222)!important;white-space:nowrap}._voteButtonThesis_1kfo8_144{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_1kfo8_156{text-align:center!important}}._voteBoxActionsBody_1kfo8_66 ._voteAction_1kfo8_78:first-child ._voteButton_1kfo8_92,._voteBoxActionsBody_1kfo8_66 ._voteAction_1kfo8_78:first-child ._voteButton_1kfo8_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_1kfo8_66 ._voteAction_1kfo8_78:nth-child(2) ._voteButton_1kfo8_92{background-color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBody_1kfo8_66 ._voteAction_1kfo8_78:nth-child(2) ._voteButton_1kfo8_92:hover{background-color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBody_1kfo8_66 ._voteAction_1kfo8_78:nth-child(3) ._voteButton_1kfo8_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_1kfo8_66 ._voteAction_1kfo8_78:nth-child(3) ._voteButton_1kfo8_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}._voteBoxActionsBodyOutlined_1kfo8_195 ._voteAction_1kfo8_78:first-child ._voteButton_1kfo8_92,._voteBoxActionsBodyOutlined_1kfo8_195 ._voteAction_1kfo8_78:first-child ._voteButton_1kfo8_92:hover{background-color:var(--text-light, white)!important;color:var(--for-primary-color, #cc6a6d)!important;border-color:var(--for-primary-color, #cc6a6d)!important;border:1px solid var(--for-primary-color, #cc6a6d)!important}._voteBoxActionsBodyOutlined_1kfo8_195 ._voteAction_1kfo8_78:nth-child(2) ._voteButton_1kfo8_92{background-color:var(--text-light, white)!important;color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBodyOutlined_1kfo8_195 ._voteAction_1kfo8_78:nth-child(2) ._voteButton_1kfo8_92:hover{background-color:var(--text-light, white)!important;color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBodyOutlined_1kfo8_195 ._voteAction_1kfo8_78:nth-child(3) ._voteButton_1kfo8_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}._voteBoxActionsBodyOutlined_1kfo8_195 ._voteAction_1kfo8_78:nth-child(3) ._voteButton_1kfo8_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_1kfo8_234{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);font-variation-settings:var(--font-variation-bold, normal)}._voteActionButton_1kfo8_234:focus:not(:focus-visible){outline:none;box-shadow:none}._sideIcon_1kfo8_250 svg{margin-left:5px;fill:var(--text-primary, #222222)}._progress_1kfo8_255{border-radius:var(--button-border-radius, var(--box-border-radius, 6px));color:var(--text-secondary, #5F5F5F);height:2.2em}._progressBar_1kfo8_261{border-radius:var(--button-border-radius, var(--box-border-radius, 6px));height:100%}._voteResults_1kfo8_11>div:first-child ._progress_1kfo8_255 ._progressBar_1kfo8_261{background-color:var(--for-primary-color, #cc6a6d)!important}._voteResults_1kfo8_11>div:nth-child(2) ._progress_1kfo8_255 ._progressBar_1kfo8_261{background-color:var(--against-primary-color, #7980bb)!important}._voteResults_1kfo8_11 div:nth-child(3) ._progress_1kfo8_255 ._progressBar_1kfo8_261{background-color:var(--third-position-color-primary, #9b9b9b)!important}._voteResults_1kfo8_11>div:first-child ._progress_1kfo8_255{border:1px solid var(--for-primary-color, #cc6a6d)!important}._voteResults_1kfo8_11>div:nth-child(2) ._progress_1kfo8_255{border:1px solid var(--against-primary-color, #7980bb)!important}._voteResults_1kfo8_11>div:nth-child(3) ._progress_1kfo8_255{border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteCommentCounts_1kfo8_290{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_1kfo8_298{display:flex;align-items:center;gap:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25));font-size:var(--font-size-normal, 16px);color:var(--text-primary, #222222);white-space:nowrap}._debateNumberLabel_1kfo8_307{white-space:nowrap}._showResultButton_1kfo8_311{background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer}._showResultButton_1kfo8_311:focus:not(:focus-visible){outline:none;box-shadow:none}._voteResultInfoText_1kfo8_324{font-size:var(--font-size-small, 16px);color:var(--text-secondary, #5F5F5F);text-align:left;width:100%;align-self:flex-start}