@logora/debate 0.4.69 → 0.4.70

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_wx9c7_3{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;width:100%}._voteResultsBox_wx9c7_11{display:flex!important;flex-direction:column!important;padding:0!important;width:100%}._voteResults_wx9c7_11{padding:0!important}._voteProgressHeader_wx9c7_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_wx9c7_35{margin-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important}._voteResultsNumberVoters_wx9c7_39{display:flex!important;align-items:center!important;padding:0!important;font-size:var(--font-size-normal, 16px);color:var(--text-secondary, #5F5F5F)}._voteBoxFooter_wx9c7_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_wx9c7_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_wx9c7_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_wx9c7_74{grid-template-columns:1fr}._voteAction_wx9c7_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_wx9c7_78._buttonAlignLeft_wx9c7_88{justify-content:flex-start!important}button._voteButton_wx9c7_92,a._voteButton_wx9c7_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_wx9c7_103{justify-content:flex-start!important}._voteBoxShowResultContainer_wx9c7_107{display:flex!important;flex-direction:row!important;justify-content:center;flex-wrap:wrap!important;margin-top:.3em}._voteBoxShowResult_wx9c7_107{cursor:pointer}._voteBoxShowResult_wx9c7_107 a{color:inherit;text-decoration:none;background:none!important}._voteBoxShowResult_wx9c7_107 a:hover{text-decoration:none;background:none!important}._voteBoxShowResult_wx9c7_107 a:focus:not(:focus-visible){outline:none;box-shadow:none}._voteBoxShowResult_wx9c7_107 ._boldShowResult_wx9c7_131{font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);color:var(--text-primary, #222222)}._outlined_wx9c7_137{padding:7px 15px;border-radius:var(--box-border-radius, 6px);border:1px solid var(--text-primary, #222222)!important;white-space:nowrap}._voteButtonThesis_wx9c7_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_wx9c7_156{text-align:center!important}}._voteBoxActionsBody_wx9c7_66 ._voteAction_wx9c7_78:first-child ._voteButton_wx9c7_92,._voteBoxActionsBody_wx9c7_66 ._voteAction_wx9c7_78:first-child ._voteButton_wx9c7_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_wx9c7_66 ._voteAction_wx9c7_78:nth-child(2) ._voteButton_wx9c7_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_wx9c7_66 ._voteAction_wx9c7_78:nth-child(2) ._voteButton_wx9c7_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_wx9c7_66 ._voteAction_wx9c7_78:nth-child(3) ._voteButton_wx9c7_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_wx9c7_66 ._voteAction_wx9c7_78:nth-child(3) ._voteButton_wx9c7_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_wx9c7_195 ._voteAction_wx9c7_78:first-child ._voteButton_wx9c7_92,._voteBoxActionsBodyOutlined_wx9c7_195 ._voteAction_wx9c7_78:first-child ._voteButton_wx9c7_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_wx9c7_195 ._voteAction_wx9c7_78:nth-child(2) ._voteButton_wx9c7_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_wx9c7_195 ._voteAction_wx9c7_78:nth-child(2) ._voteButton_wx9c7_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_wx9c7_195 ._voteAction_wx9c7_78:nth-child(3) ._voteButton_wx9c7_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_wx9c7_195 ._voteAction_wx9c7_78:nth-child(3) ._voteButton_wx9c7_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}._voteBoxActionsBodyFilledNeutral_wx9c7_234 ._voteAction_wx9c7_78:nth-child(3) ._voteButton_wx9c7_92{background-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}._voteBoxActionsBodyFilledNeutral_wx9c7_234 ._voteAction_wx9c7_78:nth-child(3) ._voteButton_wx9c7_92:hover{background-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_wx9c7_245{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_wx9c7_245:focus:not(:focus-visible){outline:none;box-shadow:none}._sideIcon_wx9c7_261 svg{margin-left:5px;fill:var(--text-primary, #222222)}._progress_wx9c7_266{border-radius:var(--button-border-radius, var(--box-border-radius, 6px));color:var(--text-secondary, #5F5F5F);height:2.2em}._progressBar_wx9c7_272{border-radius:var(--button-border-radius, var(--box-border-radius, 6px));height:100%}._voteResults_wx9c7_11>div:first-child ._progress_wx9c7_266 ._progressBar_wx9c7_272{background-color:var(--for-primary-color, #cc6a6d)!important}._voteResults_wx9c7_11>div:nth-child(2) ._progress_wx9c7_266 ._progressBar_wx9c7_272{background-color:var(--against-primary-color, #7980bb)!important}._voteResults_wx9c7_11 div:nth-child(3) ._progress_wx9c7_266 ._progressBar_wx9c7_272{background-color:var(--third-position-color-primary, #9b9b9b)!important}._voteCommentCounts_wx9c7_289{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_wx9c7_297{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_wx9c7_306{white-space:nowrap}._showResultButton_wx9c7_310{background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer}._showResultButton_wx9c7_310:focus:not(:focus-visible){outline:none;box-shadow:none}._voteResultInfoText_wx9c7_323{font-size:var(--font-size-small, 16px);color:var(--text-secondary, #5F5F5F);text-align:left;width:100%;align-self:flex-start}
@@ -1,22 +1,22 @@
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 c } 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";
4
+ import { useState as N, useEffect as T } from "react";
5
5
  import { useIntl as _e, FormattedMessage as f } from "react-intl";
6
- import { useLocation as be } from "react-router";
6
+ import { useLocation as Ne } from "react-router";
7
7
  import o from "./VoteBox.module.scss.js";
8
- import { useTranslatedContent as T } from "../../translation/translated_content/useTranslatedContent.js";
9
- import { useToast as Ne } from "../../dialog/toast_provider/useToast.js";
8
+ import { useTranslatedContent as j } from "../../translation/translated_content/useTranslatedContent.js";
9
+ import { useToast as be } 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 j } from "../../icons/icon/Icon.js";
14
+ import { Icon as F } 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
- import { Button as Me } from "../../action/button/Button.js";
17
+ import { Button as ye } from "../../action/button/Button.js";
18
18
  const We = ({
19
- numberVotes: N,
19
+ numberVotes: b,
20
20
  votePositions: r,
21
21
  voteableType: v,
22
22
  voteableId: h,
@@ -24,70 +24,70 @@ const We = ({
24
24
  displayColumn: O,
25
25
  textAlignLeft: ee,
26
26
  showTotal: te = !0,
27
- voteBoxClassName: F,
28
- buttonContainerClassName: E,
29
- buttonClassName: I,
30
- showResultClassName: U,
27
+ voteBoxClassName: E,
28
+ buttonContainerClassName: I,
29
+ buttonClassName: U,
30
+ showResultClassName: H,
31
31
  onVote: w,
32
32
  disabled: A = !1,
33
33
  showVotesCommentsNumber: oe = !1,
34
34
  commentsCount: se,
35
- hideShowResultButton: H = !1
35
+ hideShowResultButton: $ = !1
36
36
  }) => {
37
- const [B, g] = b(!0), [c, y] = b(void 0), [p, m] = b(!1), [u, ae] = b(
38
- Number.parseFloat(N.total) || Object.values(N).reduce(
37
+ const [B, g] = N(!0), [l, M] = N(void 0), [p, m] = N(!1), [u, ae] = N(
38
+ Number.parseFloat(b.total) || Object.values(b).reduce(
39
39
  (e, t) => e + Number.parseFloat(t),
40
40
  0
41
41
  ) || 0
42
- ), $ = T(
42
+ ), q = j(
43
43
  r[0]?.name,
44
44
  r[0]?.language,
45
45
  "name",
46
46
  r[0]?.translation_entries
47
- ), q = T(
47
+ ), Y = j(
48
48
  r[1]?.name,
49
49
  r[1]?.language,
50
50
  "name",
51
51
  r[1]?.translation_entries
52
- ), Y = T(
52
+ ), D = j(
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
+ ), [Ae, re, ie] = P("userSide", {}), { toast: W } = be() || {}, le = () => {
61
61
  const e = {};
62
62
  return r?.forEach(
63
63
  (t) => e[t.id] = {
64
- count: Number.parseFloat(N[t.id]) || 0,
64
+ count: Number.parseFloat(b[t.id]) || 0,
65
65
  percentage: u === 0 ? 0 : Math.round(
66
- 100 * ((N[t.id] || 0) / u)
66
+ 100 * ((b[t.id] || 0) / u)
67
67
  )
68
68
  }
69
69
  ), e;
70
- }, [i, W] = b(ce()), z = Se(), le = be(), R = we(), J = Be(), C = _e(), { isLoggedIn: x, isLoggingIn: K } = Ce();
71
- k(() => {
70
+ }, [i, z] = N(le()), J = Se(), ce = Ne(), R = we(), L = Be(), C = _e(), { isLoggedIn: x, isLoggingIn: K } = Ce();
71
+ T(() => {
72
72
  K === !1 && (x ? ue(h) : g(!1));
73
- }, [K, x]), k(() => {
73
+ }, [K, x]), T(() => {
74
74
  if (B === !1 && !S) {
75
75
  const [e, t] = de();
76
76
  e && (t ? X(t) : m(!0));
77
77
  }
78
- }, [B]), k(() => {
79
- w && w(c);
80
- }, [c]);
78
+ }, [B]), T(() => {
79
+ w && w(l);
80
+ }, [l]);
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
- typeof window < "u" ? window.location.search : le.search
85
+ typeof window < "u" ? window.location.search : ce.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), R.getOneWithToken("votes", `${v.toLowerCase()}/${e}`, {}).then((t) => {
90
- t.data.data.resource ? (y(t.data.data.resource), m(!0), g(!1)) : (g(!1), m(!1));
89
+ g(!0), w && w(l), R.getOneWithToken("votes", `${v.toLowerCase()}/${e}`, {}).then((t) => {
90
+ t.data.data.resource ? (M(t.data.data.resource), m(!0), g(!1)) : (g(!1), m(!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 && L(), e !== c.position_id && R.update("votes", c.id, t).then((n) => {
105
- n.data.success && (y(n.data.data.resource), G(
104
+ }), l ? (ve(e, l.position_id), p === !1 && k(), e !== l.position_id && R.update("votes", l.id, t).then((n) => {
105
+ n.data.success && (M(n.data.data.resource), W(
106
106
  C.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
- })) : (me(e), L(), R.create("votes", t).then((n) => {
113
- n.data.success && (y(n.data.data.resource), G(
112
+ })) : (me(e), k(), R.create("votes", t).then((n) => {
113
+ n.data.success && (M(n.data.data.resource), W(
114
114
  C.formatMessage({
115
115
  id: "header.vote_confirm_modal",
116
116
  defaultMessage: "Your vote has been saved !"
@@ -120,20 +120,20 @@ const We = ({
120
120
  }));
121
121
  }, me = (e) => {
122
122
  const t = i[e].count + 1, a = u + 1, n = {};
123
- r.forEach((M) => {
124
- if (e === M.id)
125
- n[M.id] = {
123
+ r.forEach((y) => {
124
+ if (e === y.id)
125
+ n[y.id] = {
126
126
  count: t,
127
127
  percentage: V(t, a)
128
128
  };
129
129
  else {
130
- const Z = i[M.id].count;
131
- n[M.id] = {
130
+ const Z = i[y.id].count;
131
+ n[y.id] = {
132
132
  count: Z,
133
133
  percentage: V(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,16 +162,16 @@ const We = ({
162
162
  });
163
163
  return S + `?${t.toString()}`;
164
164
  }, X = (e) => {
165
- B || (x ? Object.keys(i).includes(e.toString()) && (fe(e), D()) : (Object.keys(i).includes(e.toString()) && ne({
165
+ B || (x ? Object.keys(i).includes(e.toString()) && (fe(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
- }, L = () => {
169
+ }), J({ loginAction: "vote" })));
170
+ }, k = () => {
171
171
  p && ie(), m(!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",
@@ -180,14 +180,14 @@ const We = ({
180
180
  [o.buttonAlignLeft]: o.buttonAlignLeft
181
181
  }),
182
182
  children: /* @__PURE__ */ s(
183
- Me,
183
+ ye,
184
184
  {
185
185
  "data-tid": "action_vote",
186
186
  type: "button",
187
187
  title: a,
188
188
  className: d(o.voteButton, {
189
189
  [o.textAlignLeft]: ee,
190
- [I]: I
190
+ [U]: U
191
191
  }),
192
192
  onClick: n ? () => X(e.id) : null,
193
193
  disabled: A || n && B,
@@ -212,17 +212,17 @@ const We = ({
212
212
  t
213
213
  );
214
214
  }, ge = () => {
215
- x || J.actions?.unloggedVoteResults === !0 ? m(!0) : z({ loginAction: "vote" });
215
+ x || L.actions?.unloggedVoteResults === !0 ? m(!0) : J({ loginAction: "vote" });
216
216
  };
217
217
  return /* @__PURE__ */ s(
218
218
  "div",
219
219
  {
220
- className: d(o.voteBox, { [F]: F }),
221
- children: /* @__PURE__ */ s(pe, { children: p || A ? /* @__PURE__ */ l("div", { className: o.voteResultsBox, "data-testid": "voteResultsBox", children: [
220
+ className: d(o.voteBox, { [E]: E }),
221
+ children: /* @__PURE__ */ s(pe, { children: p || A ? /* @__PURE__ */ c("div", { className: o.voteResultsBox, "data-testid": "voteResultsBox", children: [
222
222
  /* @__PURE__ */ s("div", { className: o.voteResults, children: r.map((e, t) => {
223
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(
224
+ return t === 0 ? a = q.translatedContent : t === 1 ? a = Y.translatedContent : t === 2 && (a = D.translatedContent), /* @__PURE__ */ c("div", { children: [
225
+ /* @__PURE__ */ c(
226
226
  "div",
227
227
  {
228
228
  className: t > 0 ? d(
@@ -232,7 +232,7 @@ const We = ({
232
232
  children: [
233
233
  a,
234
234
  " ",
235
- c && c.position_id === e.id ? /* @__PURE__ */ s(
235
+ l && l.position_id === e.id ? /* @__PURE__ */ s(
236
236
  "span",
237
237
  {
238
238
  title: C.formatMessage({
@@ -240,13 +240,13 @@ const We = ({
240
240
  }) + a,
241
241
  className: o.sideIcon,
242
242
  "aria-hidden": "true",
243
- children: /* @__PURE__ */ s(j, { name: "checkbox", width: 16, height: 16 })
243
+ children: /* @__PURE__ */ s(F, { name: "checkbox", width: 16, height: 16 })
244
244
  }
245
245
  ) : null
246
246
  ]
247
247
  }
248
248
  ),
249
- /* @__PURE__ */ l(
249
+ /* @__PURE__ */ c(
250
250
  xe,
251
251
  {
252
252
  progress: i[e.id].percentage / 100,
@@ -261,7 +261,7 @@ const We = ({
261
261
  )
262
262
  ] }, t);
263
263
  }) }),
264
- /* @__PURE__ */ l("div", { className: o.voteBoxFooter, children: [
264
+ /* @__PURE__ */ c("div", { className: o.voteBoxFooter, children: [
265
265
  te && /* @__PURE__ */ s("div", { className: o.voteResultsNumberVoters, children: /* @__PURE__ */ s(
266
266
  f,
267
267
  {
@@ -270,13 +270,13 @@ const We = ({
270
270
  defaultMessage: "{votesCount} votes"
271
271
  }
272
272
  ) }),
273
- !A && /* @__PURE__ */ s("div", { children: c ? /* @__PURE__ */ s(
273
+ !A && /* @__PURE__ */ s("div", { children: l ? /* @__PURE__ */ s(
274
274
  "button",
275
275
  {
276
276
  "data-tid": "action_edit_vote",
277
277
  className: o.voteActionButton,
278
278
  type: "button",
279
- onClick: L,
279
+ onClick: k,
280
280
  children: /* @__PURE__ */ s(
281
281
  f,
282
282
  {
@@ -285,7 +285,7 @@ const We = ({
285
285
  }
286
286
  )
287
287
  }
288
- ) : !H && /* @__PURE__ */ s(
288
+ ) : !$ && /* @__PURE__ */ s(
289
289
  "button",
290
290
  {
291
291
  type: "button",
@@ -301,23 +301,24 @@ const We = ({
301
301
  }
302
302
  ) })
303
303
  ] })
304
- ] }) : /* @__PURE__ */ l("div", { className: o.voteBoxActions, children: [
304
+ ] }) : /* @__PURE__ */ c("div", { className: o.voteBoxActions, children: [
305
305
  /* @__PURE__ */ s(
306
306
  "div",
307
307
  {
308
308
  className: d(o.voteBoxActionsBody, {
309
309
  [o.voteBoxActionsBodyColumn]: O,
310
- [o.voteBoxActionsBodyOutlined]: J.layout?.outlinedVoteButtons,
311
- [E]: E
310
+ [o.voteBoxActionsBodyOutlined]: L.layout?.outlinedVoteButtons,
311
+ [o.voteBoxActionsBodyFilledNeutral]: L.layout?.filledNeutralVoteButton,
312
+ [I]: I
312
313
  }),
313
314
  children: r.map(
314
315
  (e, t) => he(e, t)
315
316
  )
316
317
  }
317
318
  ),
318
- oe && /* @__PURE__ */ l("div", { className: o.voteCommentCounts, children: [
319
- /* @__PURE__ */ l("div", { className: o.debateNumberItem, children: [
320
- /* @__PURE__ */ s(j, { name: "votebox", width: 20, height: 20 }),
319
+ oe && /* @__PURE__ */ c("div", { className: o.voteCommentCounts, children: [
320
+ /* @__PURE__ */ c("div", { className: o.debateNumberItem, children: [
321
+ /* @__PURE__ */ s(F, { name: "votebox", width: 20, height: 20 }),
321
322
  /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
322
323
  f,
323
324
  {
@@ -327,8 +328,8 @@ const We = ({
327
328
  }
328
329
  ) })
329
330
  ] }),
330
- /* @__PURE__ */ l("div", { className: o.debateNumberItem, children: [
331
- /* @__PURE__ */ s(j, { name: "chat", width: 20, height: 20 }),
331
+ /* @__PURE__ */ c("div", { className: o.debateNumberItem, children: [
332
+ /* @__PURE__ */ s(F, { name: "chat", width: 20, height: 20 }),
332
333
  /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
333
334
  f,
334
335
  {
@@ -345,9 +346,9 @@ const We = ({
345
346
  className: d(
346
347
  o.voteBoxActions,
347
348
  o.voteBoxShowResultContainer,
348
- { [U]: U }
349
+ { [H]: H }
349
350
  ),
350
- children: /* @__PURE__ */ s("div", { className: o.voteBoxShowResult, children: H ? !p && /* @__PURE__ */ s("div", { className: o.voteResultInfoText, children: C.formatMessage({
351
+ children: /* @__PURE__ */ s("div", { className: o.voteBoxShowResult, children: $ ? !p && /* @__PURE__ */ s("div", { className: o.voteResultInfoText, children: C.formatMessage({
351
352
  id: "vote.vote_box.result_after_vote",
352
353
  defaultMessage: "Le résultat s'affichera après le vote."
353
354
  }) }) : typeof window < "u" && !S ? /* @__PURE__ */ s(
@@ -1,64 +1,66 @@
1
- import '../../../assets/components/vote/vote_box/VoteBox.module-Bv7WY_vr.css';const o = "_voteBox_1how7_3", t = "_voteResultsBox_1how7_11", e = "_voteResults_1how7_11", s = "_voteProgressHeader_1how7_22", n = "_voteProgressHeaderAgainst_1how7_35", _ = "_voteResultsNumberVoters_1how7_39", u = "_voteBoxFooter_1how7_47", v = "_voteBoxActions_1how7_56", B = "_voteBoxActionsBody_1how7_66", c = "_voteBoxActionsBodyColumn_1how7_74", r = "_voteAction_1how7_78", h = "_buttonAlignLeft_1how7_88", i = "_voteButton_1how7_92", l = "_textAlignLeft_1how7_103", w = "_voteBoxShowResultContainer_1how7_107", d = "_voteBoxShowResult_1how7_107", x = "_boldShowResult_1how7_131", b = "_outlined_1how7_137", A = "_voteButtonThesis_1how7_144", a = "_voteButtonThesisSynthesisMobile_1how7_156", R = "_voteBoxActionsBodyOutlined_1how7_195", g = "_voteActionButton_1how7_234", m = "_sideIcon_1how7_250", y = "_progress_1how7_255", C = "_progressBar_1how7_261", S = "_voteCommentCounts_1how7_278", f = "_debateNumberItem_1how7_286", I = "_debateNumberLabel_1how7_295", L = "_showResultButton_1how7_299", N = "_voteResultInfoText_1how7_312", T = {
1
+ import '../../../assets/components/vote/vote_box/VoteBox.module-tPps5JNE.css';const o = "_voteBox_wx9c7_3", t = "_voteResultsBox_wx9c7_11", e = "_voteResults_wx9c7_11", s = "_voteProgressHeader_wx9c7_22", n = "_voteProgressHeaderAgainst_wx9c7_35", _ = "_voteResultsNumberVoters_wx9c7_39", c = "_voteBoxFooter_wx9c7_47", x = "_voteBoxActions_wx9c7_56", u = "_voteBoxActionsBody_wx9c7_66", v = "_voteBoxActionsBodyColumn_wx9c7_74", B = "_voteAction_wx9c7_78", l = "_buttonAlignLeft_wx9c7_88", i = "_voteButton_wx9c7_92", r = "_textAlignLeft_wx9c7_103", w = "_voteBoxShowResultContainer_wx9c7_107", d = "_voteBoxShowResult_wx9c7_107", A = "_boldShowResult_wx9c7_131", a = "_outlined_wx9c7_137", b = "_voteButtonThesis_wx9c7_144", R = "_voteButtonThesisSynthesisMobile_wx9c7_156", g = "_voteBoxActionsBodyOutlined_wx9c7_195", h = "_voteBoxActionsBodyFilledNeutral_wx9c7_234", m = "_voteActionButton_wx9c7_245", y = "_sideIcon_wx9c7_261", C = "_progress_wx9c7_266", N = "_progressBar_wx9c7_272", S = "_voteCommentCounts_wx9c7_289", f = "_debateNumberItem_wx9c7_297", I = "_debateNumberLabel_wx9c7_306", L = "_showResultButton_wx9c7_310", T = "_voteResultInfoText_wx9c7_323", p = {
2
2
  voteBox: o,
3
3
  voteResultsBox: t,
4
4
  voteResults: e,
5
5
  voteProgressHeader: s,
6
6
  voteProgressHeaderAgainst: n,
7
7
  voteResultsNumberVoters: _,
8
- voteBoxFooter: u,
9
- voteBoxActions: v,
10
- voteBoxActionsBody: B,
11
- voteBoxActionsBodyColumn: c,
12
- voteAction: r,
13
- buttonAlignLeft: h,
8
+ voteBoxFooter: c,
9
+ voteBoxActions: x,
10
+ voteBoxActionsBody: u,
11
+ voteBoxActionsBodyColumn: v,
12
+ voteAction: B,
13
+ buttonAlignLeft: l,
14
14
  voteButton: i,
15
- textAlignLeft: l,
15
+ textAlignLeft: r,
16
16
  voteBoxShowResultContainer: w,
17
17
  voteBoxShowResult: d,
18
- boldShowResult: x,
19
- outlined: b,
20
- voteButtonThesis: A,
21
- voteButtonThesisSynthesisMobile: a,
22
- voteBoxActionsBodyOutlined: R,
23
- voteActionButton: g,
24
- sideIcon: m,
25
- progress: y,
26
- progressBar: C,
18
+ boldShowResult: A,
19
+ outlined: a,
20
+ voteButtonThesis: b,
21
+ voteButtonThesisSynthesisMobile: R,
22
+ voteBoxActionsBodyOutlined: g,
23
+ voteBoxActionsBodyFilledNeutral: h,
24
+ voteActionButton: m,
25
+ sideIcon: y,
26
+ progress: C,
27
+ progressBar: N,
27
28
  voteCommentCounts: S,
28
29
  debateNumberItem: f,
29
30
  debateNumberLabel: I,
30
31
  showResultButton: L,
31
- voteResultInfoText: N
32
+ voteResultInfoText: T
32
33
  };
33
34
  export {
34
- x as boldShowResult,
35
- h as buttonAlignLeft,
35
+ A as boldShowResult,
36
+ l as buttonAlignLeft,
36
37
  f as debateNumberItem,
37
38
  I as debateNumberLabel,
38
- T as default,
39
- b as outlined,
40
- y as progress,
41
- C as progressBar,
39
+ p as default,
40
+ a as outlined,
41
+ C as progress,
42
+ N as progressBar,
42
43
  L as showResultButton,
43
- m as sideIcon,
44
- l as textAlignLeft,
45
- r as voteAction,
46
- g as voteActionButton,
44
+ y as sideIcon,
45
+ r as textAlignLeft,
46
+ B as voteAction,
47
+ m as voteActionButton,
47
48
  o as voteBox,
48
- v as voteBoxActions,
49
- B as voteBoxActionsBody,
50
- c as voteBoxActionsBodyColumn,
51
- R as voteBoxActionsBodyOutlined,
52
- u as voteBoxFooter,
49
+ x as voteBoxActions,
50
+ u as voteBoxActionsBody,
51
+ v as voteBoxActionsBodyColumn,
52
+ h as voteBoxActionsBodyFilledNeutral,
53
+ g as voteBoxActionsBodyOutlined,
54
+ c as voteBoxFooter,
53
55
  d as voteBoxShowResult,
54
56
  w as voteBoxShowResultContainer,
55
57
  i as voteButton,
56
- A as voteButtonThesis,
57
- a as voteButtonThesisSynthesisMobile,
58
+ b as voteButtonThesis,
59
+ R as voteButtonThesisSynthesisMobile,
58
60
  S as voteCommentCounts,
59
61
  s as voteProgressHeader,
60
62
  n as voteProgressHeaderAgainst,
61
- N as voteResultInfoText,
63
+ T as voteResultInfoText,
62
64
  e as voteResults,
63
65
  t as voteResultsBox,
64
66
  _ as voteResultsNumberVoters
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.4.69",
3
+ "version": "0.4.70",
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_1how7_3{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;width:100%}._voteResultsBox_1how7_11{display:flex!important;flex-direction:column!important;padding:0!important;width:100%}._voteResults_1how7_11{padding:0!important}._voteProgressHeader_1how7_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_1how7_35{margin-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important}._voteResultsNumberVoters_1how7_39{display:flex!important;align-items:center!important;padding:0!important;font-size:var(--font-size-normal, 16px);color:var(--text-secondary, #5F5F5F)}._voteBoxFooter_1how7_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_1how7_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_1how7_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_1how7_74{grid-template-columns:1fr}._voteAction_1how7_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_1how7_78._buttonAlignLeft_1how7_88{justify-content:flex-start!important}button._voteButton_1how7_92,a._voteButton_1how7_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_1how7_103{justify-content:flex-start!important}._voteBoxShowResultContainer_1how7_107{display:flex!important;flex-direction:row!important;justify-content:center;flex-wrap:wrap!important;margin-top:.3em}._voteBoxShowResult_1how7_107{cursor:pointer}._voteBoxShowResult_1how7_107 a{color:inherit;text-decoration:none;background:none!important}._voteBoxShowResult_1how7_107 a:hover{text-decoration:none;background:none!important}._voteBoxShowResult_1how7_107 a:focus:not(:focus-visible){outline:none;box-shadow:none}._voteBoxShowResult_1how7_107 ._boldShowResult_1how7_131{font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);color:var(--text-primary, #222222)}._outlined_1how7_137{padding:7px 15px;border-radius:var(--box-border-radius, 6px);border:1px solid var(--text-primary, #222222)!important;white-space:nowrap}._voteButtonThesis_1how7_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_1how7_156{text-align:center!important}}._voteBoxActionsBody_1how7_66 ._voteAction_1how7_78:first-child ._voteButton_1how7_92,._voteBoxActionsBody_1how7_66 ._voteAction_1how7_78:first-child ._voteButton_1how7_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_1how7_66 ._voteAction_1how7_78:nth-child(2) ._voteButton_1how7_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_1how7_66 ._voteAction_1how7_78:nth-child(2) ._voteButton_1how7_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_1how7_66 ._voteAction_1how7_78:nth-child(3) ._voteButton_1how7_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_1how7_66 ._voteAction_1how7_78:nth-child(3) ._voteButton_1how7_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_1how7_195 ._voteAction_1how7_78:first-child ._voteButton_1how7_92,._voteBoxActionsBodyOutlined_1how7_195 ._voteAction_1how7_78:first-child ._voteButton_1how7_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_1how7_195 ._voteAction_1how7_78:nth-child(2) ._voteButton_1how7_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_1how7_195 ._voteAction_1how7_78:nth-child(2) ._voteButton_1how7_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_1how7_195 ._voteAction_1how7_78:nth-child(3) ._voteButton_1how7_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_1how7_195 ._voteAction_1how7_78:nth-child(3) ._voteButton_1how7_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_1how7_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_1how7_234:focus:not(:focus-visible){outline:none;box-shadow:none}._sideIcon_1how7_250 svg{margin-left:5px;fill:var(--text-primary, #222222)}._progress_1how7_255{border-radius:var(--button-border-radius, var(--box-border-radius, 6px));color:var(--text-secondary, #5F5F5F);height:2.2em}._progressBar_1how7_261{border-radius:var(--button-border-radius, var(--box-border-radius, 6px));height:100%}._voteResults_1how7_11>div:first-child ._progress_1how7_255 ._progressBar_1how7_261{background-color:var(--for-primary-color, #cc6a6d)!important}._voteResults_1how7_11>div:nth-child(2) ._progress_1how7_255 ._progressBar_1how7_261{background-color:var(--against-primary-color, #7980bb)!important}._voteResults_1how7_11 div:nth-child(3) ._progress_1how7_255 ._progressBar_1how7_261{background-color:var(--third-position-color-primary, #9b9b9b)!important}._voteCommentCounts_1how7_278{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_1how7_286{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_1how7_295{white-space:nowrap}._showResultButton_1how7_299{background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer}._showResultButton_1how7_299:focus:not(:focus-visible){outline:none;box-shadow:none}._voteResultInfoText_1how7_312{font-size:var(--font-size-small, 16px);color:var(--text-secondary, #5F5F5F);text-align:left;width:100%;align-self:flex-start}