@logora/debate 0.4.106 → 0.4.108

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
+ ._pageBox_15s2t_3{background-color:var(--background-color-primary, white);box-shadow:var(--box-shadow-main-container, var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1)));border:var(--box-border-main-container, var(--box-border, 1px solid rgba(7, 42, 68, .1)));border-radius:var(--box-border-radius, 6px)}@container (min-width: 576px){._pageBox_15s2t_3{padding:var(--spacer-lg, calc(var(--space-unit, 1em) * 1.5))!important}}._pageBox_15s2t_3{padding:var(--space-unit, 1em)!important}._pageSkeleton_15s2t_18{display:flex;flex-direction:column;gap:var(--space-unit, 1em);width:100%}._header_15s2t_25{display:flex;flex-direction:row;gap:var(--space-unit, 1em);align-items:center}@media(max-width:640px){._header_15s2t_25{flex-direction:column;align-items:flex-start}}._headerLines_15s2t_38{display:flex;flex-direction:column;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5));flex:1;min-width:120px}._lineMain_15s2t_46{width:70%;height:var(--font-size-extra-large, 22px)}._lineSecondary_15s2t_51{width:45%;height:var(--font-size-normal, 16px)}._photoCircle_15s2t_56{width:80px;height:80px;flex-shrink:0}._photoBox_15s2t_62{width:210px;height:140px;flex-shrink:0;border-radius:var(--box-border-radius, 6px)}@media(max-width:640px){._photoBox_15s2t_62{width:100%}}._tabsRow_15s2t_74{display:flex;flex-direction:row;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}._tab_15s2t_74{width:110px;height:32px;border-radius:var(--box-border-radius, 6px)}@media(max-width:640px){._tab_15s2t_74{width:90px}}._contentList_15s2t_91{display:flex;flex-direction:column;gap:var(--space-unit, 1em)}._contentItem_15s2t_97{display:flex;flex-direction:column;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5));border-radius:var(--box-border-radius, 6px);box-shadow:var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1));border:var(--box-border, 1px solid rgba(7, 42, 68, .1));padding:var(--space-unit, 1em)}._contentLine_15s2t_107{width:100%;height:var(--font-size-normal, 16px)}._contentLineShort_15s2t_112{width:55%;height:var(--font-size-normal, 16px)}
@@ -1,105 +1,108 @@
1
- import { jsxs as I, jsx as u, Fragment as Ie } from "react/jsx-runtime";
2
- import We from "@rooks/use-previous";
3
- import ze from "classnames";
4
- import Ge, { useState as f, useEffect as y } from "react";
5
- import { useIntl as Ve } from "react-intl";
6
- import { useLocation as Xe } from "react-router";
1
+ import { jsxs as z, jsx as g, Fragment as We } from "react/jsx-runtime";
2
+ import ze from "@rooks/use-previous";
3
+ import Ge from "classnames";
4
+ import Ve, { useState as f, useEffect as E } from "react";
5
+ import { useIntl as Xe } from "react-intl";
6
+ import { useLocation as Ye } from "react-router";
7
7
  import a from "./PaginatedList.module.scss.js";
8
- import { ActionBar as Ye } from "./action_bar/ActionBar.js";
9
- import { useList as Ze } from "../list_provider/useList.js";
8
+ import { ActionBar as Ze } from "./action_bar/ActionBar.js";
9
+ import { useList as Pe } from "../list_provider/useList.js";
10
10
  import { useDataProvider as He } from "../../data/data_provider/useDataProvider.js";
11
- import { useResponsive as Pe } from "../../hooks/use_responsive/useResponsive.js";
12
- import { useData as Ke } from "../../data/data_provider/useData.js";
13
- import { uniqueBy as L } from "../../util/unique_by/uniqueBy.js";
14
- import { Pagination as Oe } from "../pagination/Pagination.js";
15
- import { StandardErrorBoundary as qe } from "../../error/standard_error_boundary/StandardErrorBoundary.js";
16
- const Et = ({
17
- query: w,
11
+ import { useResponsive as Ke } from "../../hooks/use_responsive/useResponsive.js";
12
+ import { useData as Oe } from "../../data/data_provider/useData.js";
13
+ import { uniqueBy as D } from "../../util/unique_by/uniqueBy.js";
14
+ import { Pagination as qe } from "../pagination/Pagination.js";
15
+ import { StandardErrorBoundary as et } from "../../error/standard_error_boundary/StandardErrorBoundary.js";
16
+ const ht = ({
17
+ query: R,
18
18
  sortOptions: o,
19
- sort: R,
19
+ sort: b,
20
20
  filters: m,
21
- tagList: ie,
22
- pinnedTagList: oe,
23
- currentPage: b,
24
- resource: D,
21
+ tagList: me,
22
+ pinnedTagList: re,
23
+ currentPage: k,
24
+ resource: J,
25
25
  currentListId: n,
26
- withToken: me,
27
- perPage: E,
28
- perPageParam: re = "per_page",
29
- pageParam: de = "page",
30
- sortParam: fe = "sort",
31
- queryParam: ce = "query",
32
- tagParam: ge = "tag_id",
33
- totalHeaderParam: J = "total",
34
- onUpdateTotal: W,
35
- onElementsLoad: k,
36
- transformData: z,
26
+ withToken: de,
27
+ perPage: h,
28
+ perPageParam: fe = "per_page",
29
+ pageParam: ce = "page",
30
+ sortParam: ue = "sort",
31
+ queryParam: ge = "query",
32
+ tagParam: Ee = "tag_id",
33
+ totalHeaderParam: j = "total",
34
+ onUpdateTotal: G,
35
+ onElementsLoad: T,
36
+ transformData: V,
37
37
  uniqueIdKey: S = "id",
38
- children: ue,
39
- resourcePropName: Ee,
40
- loadingComponent: G,
41
- searchBar: he = !1,
42
- title: pe,
43
- subtitle: ve,
44
- showDebateConsultationSubtitle: ye = !1,
45
- emptyListComponent: V,
46
- emptyText: X,
47
- display: Y,
48
- elementsPerLine: Z,
49
- indexLayout: Se = !1,
50
- gap: Me = "1em",
51
- withPagination: Ne = !0,
52
- numberElements: H,
53
- countless: C,
54
- onElementClick: we,
55
- withUrlParams: Re = !1,
56
- onLoadNewPage: P
38
+ children: he,
39
+ resourcePropName: pe,
40
+ loadingComponent: X,
41
+ searchBar: ve = !1,
42
+ title: ye,
43
+ subtitle: Se,
44
+ showDebateConsultationSubtitle: Me = !1,
45
+ emptyListComponent: Y,
46
+ emptyText: Z,
47
+ display: P,
48
+ elementsPerLine: H,
49
+ indexLayout: Ne = !1,
50
+ gap: we = "1em",
51
+ withPagination: Re = !0,
52
+ numberElements: K,
53
+ countless: A,
54
+ onElementClick: be,
55
+ withUrlParams: ke = !1,
56
+ onLoadNewPage: O,
57
+ onHasMoreChange: q
57
58
  }) => {
58
- const j = Ve(), t = Ze(), K = He(), O = Xe(), { isMobile: q, isTablet: be, isDesktop: B } = Pe(), r = new URLSearchParams(O.search), [T, h] = f(!1), [ke, Ce] = f(!1), [c, M] = Ke(n, []), [ee, Te] = f(
59
+ const B = Xe(), t = Pe(), ee = He(), te = Ye(), { isMobile: se, isTablet: Te, isDesktop: Q } = Ke(), r = new URLSearchParams(te.search), [C, p] = f(!1), [Ae, Ce] = f(!1), [c, M] = Oe(n, []), [ne, Fe] = f(
59
60
  c?.length || 0
60
- ), [te, Ae] = f(!0), [p, Q] = f(b || 1), [N, U] = f(w || null), [A, se] = f(
61
+ ), [N, U] = f(!0), [v, $] = f(k || 1), [w, I] = f(R || null), [F, ae] = f(
61
62
  r.get("tagId") ? Number.parseInt(r.get("tagId"), 10) : null
62
- ), [Fe, ne] = f(null), _e = () => o && o[0].type === "sort" && o[0].value || R || "", xe = () => {
63
+ ), [_e, le] = f(null), xe = () => o && o[0].type === "sort" && o[0].value || b || "", Le = () => {
63
64
  let e = {};
64
65
  return o && o[0].type === "filter" && (e[o[0].name] = o[0].value), m && (e = Object.assign({}, e, m)), e;
65
- }, [F, _] = f(_e()), [$, x] = f(xe()), ae = We(m);
66
- b && b !== p && Q(b), w !== void 0 && w !== N && U(w), R !== void 0 && R !== F && _(R), ae && JSON.stringify(m) !== JSON.stringify(ae) && JSON.stringify(m) !== JSON.stringify($) && x(m), y(() => {
67
- if (r.get("tagId") && se(Number.parseInt(r.get("tagId"))), r.get("search") && U(r.get("search")), r.get("sort")) {
68
- _(r.get("sort"));
66
+ }, [_, x] = f(xe()), [W, L] = f(Le()), ie = ze(m);
67
+ k && k !== v && $(k), R !== void 0 && R !== w && I(R), b !== void 0 && b !== _ && x(b), ie && JSON.stringify(m) !== JSON.stringify(ie) && JSON.stringify(m) !== JSON.stringify(W) && L(m), E(() => {
68
+ if (r.get("tagId") && ae(Number.parseInt(r.get("tagId"))), r.get("search") && I(r.get("search")), r.get("sort")) {
69
+ x(r.get("sort"));
69
70
  for (const e of r.values()) {
70
71
  o?.map((s) => {
71
- s.value === e && ne(s.name);
72
+ s.value === e && le(s.name);
72
73
  });
73
74
  break;
74
75
  }
75
76
  }
76
77
  for (const e of r.keys()) {
77
78
  o?.map((s) => {
78
- s.name === e && (x({
79
+ s.name === e && (L({
79
80
  ...m,
80
81
  [s.name]: s.value
81
- }), ne(s.name));
82
+ }), le(s.name));
82
83
  });
83
84
  break;
84
85
  }
85
- }, [O.search]), y(() => {
86
- D ? (Q(1), M([]), h(!0), le(1)) : h(!1);
86
+ }, [te.search]), E(() => {
87
+ J ? ($(1), M([]), U(!0), p(!0), oe(1)) : p(!1);
87
88
  }, [
89
+ _,
90
+ W,
91
+ w,
92
+ J,
88
93
  F,
89
- $,
90
- N,
91
- D,
92
- A,
93
- E
94
- ]), y(() => {
95
- p > 1 && (h(!0), le(p));
96
- }, [p]), y(() => {
94
+ h
95
+ ]), E(() => {
96
+ typeof q == "function" && q(N);
97
+ }, [N]), E(() => {
98
+ v > 1 && (p(!0), oe(v));
99
+ }, [v]), E(() => {
97
100
  if (t.addElements && n in t.addElements && t.addElements[n].length > 0) {
98
- Je(t.addElements[n]);
101
+ je(t.addElements[n]);
99
102
  const e = t.addElements;
100
103
  delete e[n], t.setAddElements(e);
101
104
  }
102
- }, [t.addElements]), y(() => {
105
+ }, [t.addElements]), E(() => {
103
106
  if (t.updateElements && n in t.updateElements) {
104
107
  const e = t.updateElements[n];
105
108
  if (e.length > 0) {
@@ -107,151 +110,151 @@ const Et = ({
107
110
  (i) => c.some((l) => l.id === i.id)
108
111
  );
109
112
  if (s.length > 0) {
110
- je(s);
113
+ Be(s);
111
114
  const i = e.filter(
112
- (d) => !c.some((v) => v.id === d.id)
115
+ (d) => !c.some((y) => y.id === d.id)
113
116
  ), l = { ...t.updateElements };
114
117
  i.length > 0 ? l[n] = i : delete l[n], t.setUpdateElements(l);
115
118
  }
116
119
  }
117
120
  }
118
- }, [t.updateElements, c]), y(() => {
121
+ }, [t.updateElements, c]), E(() => {
119
122
  if (t.removeElements && n in t.removeElements && t.removeElements[n].length > 0 && c.length > 0) {
120
- Be(t.removeElements[n]);
123
+ Qe(t.removeElements[n]);
121
124
  const e = { ...t.removeElements };
122
125
  delete e[n], t.setRemoveElements(e);
123
126
  }
124
127
  }, [t.removeElements, c]);
125
- const Le = (e) => {
126
- e.type === "filter" ? (_(""), x({
128
+ const De = (e) => {
129
+ e.type === "filter" ? (x(""), L({
127
130
  ...m,
128
131
  [e.name]: e.value
129
- })) : (_(e.value), x(m ? { ...m } : {}));
130
- }, De = () => {
131
- typeof P == "function" && P() !== null || Q(p + 1);
132
- }, le = (e) => {
133
- const s = me ? K.getListWithToken : K.getList;
134
- if (C === !0 ? te || e === 1 : (e - 1) * E <= (H || ee) || e === 1) {
132
+ })) : (x(e.value), L(m ? { ...m } : {}));
133
+ }, Je = () => {
134
+ typeof O == "function" && O() !== null || $(v + 1);
135
+ }, oe = (e) => {
136
+ const s = de ? ee.getListWithToken : ee.getList;
137
+ if (A === !0 ? N || e === 1 : (e - 1) * h <= (K || ne) || e === 1) {
135
138
  const l = {
136
- [de]: e,
137
- [re]: E,
138
- ...F && !N && { [fe]: F },
139
- ...N && { [ce]: N },
140
- ...C === !0 && { countless: !0 },
141
- ...$,
142
- ...A && { [ge]: A }
139
+ [ce]: e,
140
+ [fe]: h,
141
+ ..._ && !w && { [ue]: _ },
142
+ ...w && { [ge]: w },
143
+ ...A === !0 && { countless: !0 },
144
+ ...W,
145
+ ...F && { [Ee]: F }
143
146
  };
144
- s(D, l).then((d) => {
145
- const v = d.headers;
146
- v && J in v && (Te(
147
- Number.parseInt(v[J || "total"], 10)
148
- ), W && W(v[J || "total"]));
149
- let g = d?.data?.data;
150
- C === !0 && Array.isArray(g) && Ae(g.length >= E), k && k(g), z && (g = g.filter(z)), t.addElements && n in t.addElements && t.addElements[n].length > 0 && (g = [...t.addElements[n], g]), Qe(g), h(!1);
147
+ s(J, l).then((d) => {
148
+ const y = d.headers;
149
+ y && j in y && (Fe(
150
+ Number.parseInt(y[j || "total"], 10)
151
+ ), G && G(y[j || "total"]));
152
+ let u = d?.data?.data;
153
+ A === !0 && Array.isArray(u) && U(u.length >= h), T && T(u), V && (u = u.filter(V)), t.addElements && n in t.addElements && t.addElements[n].length > 0 && (u = [...t.addElements[n], u]), Ue(u), p(!1);
151
154
  }).catch((d) => {
152
- console.error(d), d?.response?.status !== 404 && Ce(!0), h(!1);
155
+ console.error(d), d?.response?.status === 404 ? U(!1) : Ce(!0), p(!1);
153
156
  });
154
157
  } else
155
- h(!1);
156
- }, Je = (e) => {
157
- M(
158
- (s) => L([...e, ...s], S || "id")
159
- ), k && k(e);
158
+ p(!1);
160
159
  }, je = (e) => {
160
+ M(
161
+ (s) => D([...e, ...s], S || "id")
162
+ ), T && T(e);
163
+ }, Be = (e) => {
161
164
  M((s) => {
162
165
  let i = s;
163
166
  return e.forEach(
164
167
  (l) => i = i.map(
165
168
  (d) => d.id === l.id ? l : d
166
169
  )
167
- ), L(i, S || "id");
170
+ ), D(i, S || "id");
168
171
  });
169
- }, Be = (e) => {
172
+ }, Qe = (e) => {
170
173
  const s = e.map((l) => l.id), i = c.filter(
171
174
  (l) => s.indexOf(l.id) === -1
172
175
  );
173
- M(L(i, S || "id"));
174
- }, Qe = (e) => {
176
+ M(D(i, S || "id"));
177
+ }, Ue = (e) => {
175
178
  M(
176
- (s) => L([...s, ...e], S || "id")
179
+ (s) => D([...s, ...e], S || "id")
177
180
  );
178
- }, Ue = (e, s) => e !== void 0 ? /* @__PURE__ */ u(
181
+ }, $e = (e, s) => e !== void 0 ? /* @__PURE__ */ g(
179
182
  "li",
180
183
  {
181
184
  className: a.paginatedListItem,
182
185
  "data-testid": "list-item",
183
- onClick: we,
184
- children: /* @__PURE__ */ u(qe, { hideMessage: !0, children: Ge.cloneElement(ue, {
186
+ onClick: be,
187
+ children: /* @__PURE__ */ g(et, { hideMessage: !0, children: Ve.cloneElement(he, {
185
188
  index: s,
186
- [Ee]: e
189
+ [pe]: e
187
190
  }) })
188
191
  },
189
192
  `${e[S || "id"]}_${e.updated_at || e.content}`
190
- ) : null, $e = (e) => G ? /* @__PURE__ */ u("li", { className: a.paginatedListItem, children: G }, e) : null;
191
- if (ke)
193
+ ) : null, Ie = (e) => X ? /* @__PURE__ */ g("li", { className: a.paginatedListItem, children: X }, e) : null;
194
+ if (Ae)
192
195
  throw new Error(
193
- j.formatMessage({
196
+ B.formatMessage({
194
197
  id: "error.list",
195
198
  defaultMessage: "Error when loading content."
196
199
  })
197
200
  );
198
- return /* @__PURE__ */ I("div", { className: a.listContainer, children: [
199
- /* @__PURE__ */ u(
200
- Ye,
201
+ return /* @__PURE__ */ z("div", { className: a.listContainer, children: [
202
+ /* @__PURE__ */ g(
203
+ Ze,
201
204
  {
202
- title: pe,
203
- subtitle: ve,
204
- showDebateConsultationSubtitle: ye,
205
+ title: ye,
206
+ subtitle: Se,
207
+ showDebateConsultationSubtitle: Me,
205
208
  sortOptions: o,
206
- defaultSelectOption: Fe,
207
- searchBar: he,
208
- tagList: ie,
209
- pinnedTagList: oe,
210
- activeTagId: A,
211
- onSearch: (e) => U(e),
212
- onSortChange: Le,
213
- onTagChange: (e) => se(e),
214
- withUrlParams: Re
209
+ defaultSelectOption: _e,
210
+ searchBar: ve,
211
+ tagList: me,
212
+ pinnedTagList: re,
213
+ activeTagId: F,
214
+ onSearch: (e) => I(e),
215
+ onSortChange: De,
216
+ onTagChange: (e) => ae(e),
217
+ withUrlParams: ke
215
218
  }
216
219
  ),
217
- !T && c.length === 0 ? V ? /* @__PURE__ */ u("div", { className: a.emptyListElement, children: V }) : /* @__PURE__ */ u("div", { className: a.emptyList, children: X || j.formatMessage({
220
+ !C && c.length === 0 ? Y ? /* @__PURE__ */ g("div", { className: a.emptyListElement, children: Y }) : /* @__PURE__ */ g("div", { className: a.emptyList, children: Z || B.formatMessage({
218
221
  id: "info.emptyList",
219
222
  defaultMessage: "No items for now."
220
- }) }) : /* @__PURE__ */ I(Ie, { children: [
221
- /* @__PURE__ */ I(
223
+ }) }) : /* @__PURE__ */ z(We, { children: [
224
+ /* @__PURE__ */ z(
222
225
  "ul",
223
226
  {
224
- className: ze(a.paginatedList, {
225
- [a.paginatedListIsTablet]: !q && !B,
226
- [a.centeredList]: Y === "column",
227
- [a.column]: Y === "column",
228
- [a.twoElementsPerLine]: Z === 2,
229
- [a.oneElementPerLine]: Z === 1,
230
- [a.indexLayoutList]: Se,
231
- [a.listIsDesktop]: B,
232
- [a.listIsTablet]: be && !B,
233
- [a.listIsMobile]: q
227
+ className: Ge(a.paginatedList, {
228
+ [a.paginatedListIsTablet]: !se && !Q,
229
+ [a.centeredList]: P === "column",
230
+ [a.column]: P === "column",
231
+ [a.twoElementsPerLine]: H === 2,
232
+ [a.oneElementPerLine]: H === 1,
233
+ [a.indexLayoutList]: Ne,
234
+ [a.listIsDesktop]: Q,
235
+ [a.listIsTablet]: Te && !Q,
236
+ [a.listIsMobile]: se
234
237
  }),
235
- style: { gap: Me },
238
+ style: { gap: we },
236
239
  children: [
237
- c.map(Ue),
238
- T ? Array(E).fill().map((e, s) => s).map($e) : null
240
+ c.map($e),
241
+ C ? Array(h).fill().map((e, s) => s).map(Ie) : null
239
242
  ]
240
243
  }
241
244
  ),
242
- !T && Ne !== !1 && /* @__PURE__ */ u(
243
- Oe,
245
+ !C && Re !== !1 && /* @__PURE__ */ g(
246
+ qe,
244
247
  {
245
- buttonText: j.formatMessage({
248
+ buttonText: B.formatMessage({
246
249
  id: "action.see_more",
247
250
  defaultMessage: "See more"
248
251
  }),
249
- currentPage: p,
250
- perPage: E,
251
- totalElements: H || ee,
252
- hasMore: C === !0 ? te : void 0,
253
- onLoad: De,
254
- isLoading: T,
252
+ currentPage: v,
253
+ perPage: h,
254
+ totalElements: K || ne,
255
+ hasMore: A === !0 || !N ? N : void 0,
256
+ onLoad: Je,
257
+ isLoading: C,
255
258
  hideLoader: !0,
256
259
  "data-tid": "list_read_more"
257
260
  }
@@ -260,5 +263,5 @@ const Et = ({
260
263
  ] });
261
264
  };
262
265
  export {
263
- Et as PaginatedList
266
+ ht as PaginatedList
264
267
  };
@@ -1,79 +1,87 @@
1
1
  import { jsx as s, jsxs as r } from "react/jsx-runtime";
2
+ import h from "classnames";
2
3
  import "react";
3
- import t from "react-loading-skeleton";
4
+ import a from "react-loading-skeleton";
4
5
  import "react-loading-skeleton/dist/skeleton.css";
5
6
  import e from "./PageSkeleton.module.scss.js";
6
- const k = ({
7
- photo: a = "right",
8
- items: d = 3,
9
- tabs: o = !1,
7
+ const L = ({
8
+ photo: t = "right",
9
+ items: o = 3,
10
+ tabs: m = !1,
10
11
  enableAnimation: c = !0,
11
- className: m
12
+ className: d
12
13
  }) => {
13
14
  const i = /* @__PURE__ */ r("div", { className: e.headerLines, children: [
14
- /* @__PURE__ */ s(t, { enableAnimation: c, className: e.lineMain }),
15
+ /* @__PURE__ */ s(a, { enableAnimation: c, className: e.lineMain }),
15
16
  /* @__PURE__ */ s(
16
- t,
17
+ a,
17
18
  {
18
19
  enableAnimation: c,
19
20
  className: e.lineSecondary
20
21
  }
21
22
  )
22
- ] }), l = a === "left" ? /* @__PURE__ */ s(
23
- t,
23
+ ] }), l = t === "left" ? /* @__PURE__ */ s(
24
+ a,
24
25
  {
25
26
  enableAnimation: c,
26
27
  circle: !0,
27
28
  className: e.photoCircle
28
29
  }
29
- ) : /* @__PURE__ */ s(t, { enableAnimation: c, className: e.photoBox });
30
- return /* @__PURE__ */ s("div", { "data-testid": "page-skeleton", className: m, children: /* @__PURE__ */ r("div", { className: e.pageSkeleton, children: [
31
- /* @__PURE__ */ r("div", { className: e.header, children: [
32
- a === "left" && l,
33
- i,
34
- a === "right" && l
35
- ] }),
36
- o && /* @__PURE__ */ r("div", { className: e.tabsRow, children: [
37
- /* @__PURE__ */ s(
38
- t,
39
- {
40
- enableAnimation: c,
41
- className: e.tab
42
- }
43
- ),
44
- /* @__PURE__ */ s(
45
- t,
46
- {
47
- enableAnimation: c,
48
- className: e.tab
49
- }
50
- ),
51
- /* @__PURE__ */ s(
52
- t,
53
- {
54
- enableAnimation: c,
55
- className: e.tab
56
- }
57
- )
58
- ] }),
59
- /* @__PURE__ */ s("div", { className: e.contentList, children: Array.from({ length: d }).map((N, h) => /* @__PURE__ */ r("div", { className: e.contentItem, children: [
60
- /* @__PURE__ */ s(
61
- t,
62
- {
63
- enableAnimation: c,
64
- className: e.contentLine
65
- }
66
- ),
67
- /* @__PURE__ */ s(
68
- t,
69
- {
70
- enableAnimation: c,
71
- className: e.contentLineShort
72
- }
73
- )
74
- ] }, h)) })
75
- ] }) });
30
+ ) : /* @__PURE__ */ s(a, { enableAnimation: c, className: e.photoBox });
31
+ return /* @__PURE__ */ s(
32
+ "div",
33
+ {
34
+ "data-testid": "page-skeleton",
35
+ className: h(e.pageBox, d),
36
+ children: /* @__PURE__ */ r("div", { className: e.pageSkeleton, children: [
37
+ /* @__PURE__ */ r("div", { className: e.header, children: [
38
+ t === "left" && l,
39
+ i,
40
+ t === "right" && l
41
+ ] }),
42
+ m && /* @__PURE__ */ r("div", { className: e.tabsRow, children: [
43
+ /* @__PURE__ */ s(
44
+ a,
45
+ {
46
+ enableAnimation: c,
47
+ className: e.tab
48
+ }
49
+ ),
50
+ /* @__PURE__ */ s(
51
+ a,
52
+ {
53
+ enableAnimation: c,
54
+ className: e.tab
55
+ }
56
+ ),
57
+ /* @__PURE__ */ s(
58
+ a,
59
+ {
60
+ enableAnimation: c,
61
+ className: e.tab
62
+ }
63
+ )
64
+ ] }),
65
+ /* @__PURE__ */ s("div", { className: e.contentList, children: Array.from({ length: o }).map((p, N) => /* @__PURE__ */ r("div", { className: e.contentItem, children: [
66
+ /* @__PURE__ */ s(
67
+ a,
68
+ {
69
+ enableAnimation: c,
70
+ className: e.contentLine
71
+ }
72
+ ),
73
+ /* @__PURE__ */ s(
74
+ a,
75
+ {
76
+ enableAnimation: c,
77
+ className: e.contentLineShort
78
+ }
79
+ )
80
+ ] }, N)) })
81
+ ] })
82
+ }
83
+ );
76
84
  };
77
85
  export {
78
- k as PageSkeleton
86
+ L as PageSkeleton
79
87
  };
@@ -1,31 +1,33 @@
1
- import '../../../assets/components/skeleton/page_skeleton/PageSkeleton.module-BqtcAizZ.css';const t = "_pageSkeleton_vzch9_3", n = "_header_vzch9_10", e = "_headerLines_vzch9_23", o = "_lineMain_vzch9_31", c = "_lineSecondary_vzch9_36", _ = "_photoCircle_vzch9_41", h = "_photoBox_vzch9_47", s = "_tabsRow_vzch9_59", i = "_tab_vzch9_59", a = "_contentList_vzch9_76", r = "_contentItem_vzch9_82", l = "_contentLine_vzch9_92", v = "_contentLineShort_vzch9_97", z = {
2
- pageSkeleton: t,
1
+ import '../../../assets/components/skeleton/page_skeleton/PageSkeleton.module-DryubeJg.css';const t = "_pageBox_15s2t_3", e = "_pageSkeleton_15s2t_18", n = "_header_15s2t_25", o = "_headerLines_15s2t_38", _ = "_lineMain_15s2t_46", s = "_lineSecondary_15s2t_51", c = "_photoCircle_15s2t_56", a = "_photoBox_15s2t_62", i = "_tabsRow_15s2t_74", r = "_tab_15s2t_74", h = "_contentList_15s2t_91", l = "_contentItem_15s2t_97", p = "_contentLine_15s2t_107", L = "_contentLineShort_15s2t_112", d = {
2
+ pageBox: t,
3
+ pageSkeleton: e,
3
4
  header: n,
4
- headerLines: e,
5
- lineMain: o,
6
- lineSecondary: c,
7
- photoCircle: _,
8
- photoBox: h,
9
- tabsRow: s,
10
- tab: i,
11
- contentList: a,
12
- contentItem: r,
13
- contentLine: l,
14
- contentLineShort: v
5
+ headerLines: o,
6
+ lineMain: _,
7
+ lineSecondary: s,
8
+ photoCircle: c,
9
+ photoBox: a,
10
+ tabsRow: i,
11
+ tab: r,
12
+ contentList: h,
13
+ contentItem: l,
14
+ contentLine: p,
15
+ contentLineShort: L
15
16
  };
16
17
  export {
17
- r as contentItem,
18
- l as contentLine,
19
- v as contentLineShort,
20
- a as contentList,
21
- z as default,
18
+ l as contentItem,
19
+ p as contentLine,
20
+ L as contentLineShort,
21
+ h as contentList,
22
+ d as default,
22
23
  n as header,
23
- e as headerLines,
24
- o as lineMain,
25
- c as lineSecondary,
26
- t as pageSkeleton,
27
- h as photoBox,
28
- _ as photoCircle,
29
- i as tab,
30
- s as tabsRow
24
+ o as headerLines,
25
+ _ as lineMain,
26
+ s as lineSecondary,
27
+ t as pageBox,
28
+ e as pageSkeleton,
29
+ a as photoBox,
30
+ c as photoCircle,
31
+ r as tab,
32
+ i as tabsRow
31
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.4.106",
3
+ "version": "0.4.108",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",
@@ -1 +0,0 @@
1
- ._pageSkeleton_vzch9_3{display:flex;flex-direction:column;gap:var(--space-unit, 1em);width:100%}._header_vzch9_10{display:flex;flex-direction:row;gap:var(--space-unit, 1em);align-items:center}@media(max-width:640px){._header_vzch9_10{flex-direction:column;align-items:flex-start}}._headerLines_vzch9_23{display:flex;flex-direction:column;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5));flex:1;min-width:120px}._lineMain_vzch9_31{width:70%;height:var(--font-size-extra-large, 22px)}._lineSecondary_vzch9_36{width:45%;height:var(--font-size-normal, 16px)}._photoCircle_vzch9_41{width:80px;height:80px;flex-shrink:0}._photoBox_vzch9_47{width:210px;height:140px;flex-shrink:0;border-radius:var(--box-border-radius, 6px)}@media(max-width:640px){._photoBox_vzch9_47{width:100%}}._tabsRow_vzch9_59{display:flex;flex-direction:row;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}._tab_vzch9_59{width:110px;height:32px;border-radius:var(--box-border-radius, 6px)}@media(max-width:640px){._tab_vzch9_59{width:90px}}._contentList_vzch9_76{display:flex;flex-direction:column;gap:var(--space-unit, 1em)}._contentItem_vzch9_82{display:flex;flex-direction:column;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5));border-radius:var(--box-border-radius, 6px);box-shadow:var(--box-shadow, 0px 2px 5px rgba(7, 42, 68, .1));border:var(--box-border, 1px solid rgba(7, 42, 68, .1));padding:var(--space-unit, 1em)}._contentLine_vzch9_92{width:100%;height:var(--font-size-normal, 16px)}._contentLineShort_vzch9_97{width:55%;height:var(--font-size-normal, 16px)}