@cagatayfdn/flora-components 0.0.138 → 0.0.140

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.
Files changed (186) hide show
  1. package/dist/Accordion.css +1 -0
  2. package/dist/ActionButton.css +1 -0
  3. package/dist/AlertCard.css +1 -0
  4. package/dist/Autocomplete.css +1 -0
  5. package/dist/Button.css +1 -0
  6. package/dist/Card.css +1 -0
  7. package/dist/Checkbox.css +1 -0
  8. package/dist/Config.css +1 -0
  9. package/dist/Confirm.css +1 -0
  10. package/dist/ContentHeader.css +1 -0
  11. package/dist/Datepicker.css +1 -0
  12. package/dist/Divider.css +1 -0
  13. package/dist/DropdownList.css +1 -0
  14. package/dist/ErrorLogModal.css +1 -0
  15. package/dist/FileUpload.css +1 -0
  16. package/dist/FileUpload.module-BxCEtOHx.js +32 -0
  17. package/dist/Heading.css +1 -0
  18. package/dist/IconBox.css +1 -0
  19. package/dist/InfoBoxList.css +1 -0
  20. package/dist/InfoBoxList.module-BHkAHgos.js +8 -0
  21. package/dist/InfoDate.css +1 -0
  22. package/dist/InfoText.css +1 -0
  23. package/dist/Input.css +1 -0
  24. package/dist/Label.css +1 -0
  25. package/dist/Legends.css +1 -0
  26. package/dist/Loading.css +1 -0
  27. package/dist/MenuItem-Df6Zsa7E.js +53 -0
  28. package/dist/MenuItem.css +1 -0
  29. package/dist/Modal.css +1 -0
  30. package/dist/NoResult.css +1 -0
  31. package/dist/PageWrap.css +1 -0
  32. package/dist/Pager.css +1 -0
  33. package/dist/Panel.css +1 -0
  34. package/dist/Radio.css +1 -0
  35. package/dist/ResultError.css +1 -0
  36. package/dist/ScrollContainer.css +1 -0
  37. package/dist/Select-BE_y91ZN.js +1831 -0
  38. package/dist/Select.css +1 -0
  39. package/dist/Select.module-ByPQ6qr4.js +21 -0
  40. package/dist/StatusTag.css +1 -0
  41. package/dist/StatusTypography.css +1 -0
  42. package/dist/Stepper.css +1 -0
  43. package/dist/Switch.css +1 -0
  44. package/dist/Tab.css +1 -0
  45. package/dist/Table.css +1 -0
  46. package/dist/Table.module-DUqpZOLt.js +29 -0
  47. package/dist/Textarea.css +1 -0
  48. package/dist/Tooltip.css +1 -0
  49. package/dist/Trans-B4ILpbwK.js +343 -0
  50. package/dist/TypographyText.css +1 -0
  51. package/dist/ValidationError.css +1 -0
  52. package/dist/_commonjsHelpers-CT_km90n.js +30 -0
  53. package/dist/_isArray-CBUZFxFA.js +6 -0
  54. package/dist/_isString-BUpNGP_8.js +6 -0
  55. package/dist/_reduce-DsUCMz4O.js +148 -0
  56. package/dist/assets/icons/icons.js +70 -0
  57. package/dist/assets/images/500_error_2x.gif +0 -0
  58. package/dist/assets/images/oms.png +0 -0
  59. package/dist/components/Accordion/Accordion.js +60 -0
  60. package/dist/components/ActionButton/ActionButton.js +54 -0
  61. package/dist/components/AlertCard/AlertCard.js +29 -0
  62. package/dist/components/AuthUserCan/Permission.js +18 -0
  63. package/dist/components/AuthUserCan/index.js +23 -0
  64. package/dist/components/Autocomplete/Autocomplete.js +87 -0
  65. package/dist/components/Button/Button.js +87 -0
  66. package/dist/components/Card/Card.js +21 -0
  67. package/dist/components/Charts/Bar.js +18 -0
  68. package/dist/components/Charts/Legends.js +21 -0
  69. package/dist/components/Charts/Line.js +18 -0
  70. package/dist/components/Charts/Pie.js +43 -0
  71. package/dist/components/Charts/index.js +31 -0
  72. package/dist/components/Charts/types.js +1 -0
  73. package/dist/components/Charts/utils.js +12 -0
  74. package/dist/components/Checkbox/Checkbox.js +68 -0
  75. package/dist/components/Config/Config.js +32 -0
  76. package/dist/components/Confirm/Confirm.js +60 -0
  77. package/dist/components/ContentHeader/ContentHeader.js +75 -0
  78. package/dist/components/ContentLoader/ContentLoader.js +16 -0
  79. package/dist/components/Countdown/Countdown.js +20 -0
  80. package/dist/components/Datepicker/Datepicker.js +1478 -0
  81. package/dist/components/Divider/Divider.js +27 -0
  82. package/dist/components/Drawer/Provider.js +24 -0
  83. package/dist/components/Drawer/index.js +55 -0
  84. package/dist/components/Dropdown/DropdownList.js +90 -0
  85. package/dist/components/ErrorLogModal/ErrorLogModal.js +69 -0
  86. package/dist/components/FileUpload/FileUpload.js +237 -0
  87. package/dist/components/FileUpload/ImagePreview.js +19 -0
  88. package/dist/components/FileUpload/LengthCard.js +6 -0
  89. package/dist/components/FileUpload/PreviewModal.js +53 -0
  90. package/dist/components/Grid/Column.js +29 -0
  91. package/dist/components/Grid/Row.js +6 -0
  92. package/dist/components/Heading/Heading.js +22 -0
  93. package/dist/components/Icon/index.js +24 -0
  94. package/dist/components/IconBox/IconBox.js +13 -0
  95. package/dist/components/InfiniteScroll/InfiniteScroll.js +41 -0
  96. package/dist/components/InfoBoxList/InfoBoxList.js +30 -0
  97. package/dist/components/InfoBoxList/helper.js +83 -0
  98. package/dist/components/InfoDate/InfoDate.js +19 -0
  99. package/dist/components/InfoText/InfoText.js +13 -0
  100. package/dist/components/Input/Input.js +140 -0
  101. package/dist/components/Label/Label.js +22 -0
  102. package/dist/components/Loading/Loading.js +62 -0
  103. package/dist/components/Modal/Modal.js +74 -0
  104. package/dist/components/NavigatorCard/index.js +59 -0
  105. package/dist/components/NoResult/NoResult.js +12 -0
  106. package/dist/components/Notification/Notification.js +26 -0
  107. package/dist/components/PageWrapper/PageWrap.js +46 -0
  108. package/dist/components/Pager/Pager.js +103 -0
  109. package/dist/components/Panel/Panel.js +71 -0
  110. package/dist/components/PermaLink/PermaLink.js +387 -0
  111. package/dist/components/Radio/Radio.js +96 -0
  112. package/dist/components/ResultError/ResultError.js +20 -0
  113. package/dist/components/ScrollContainer/ScrollContainer.js +23 -0
  114. package/dist/components/Select/NoData.js +10 -0
  115. package/dist/components/Select/OptionItem.js +19 -0
  116. package/dist/components/Select/Select.js +13 -0
  117. package/dist/components/Sidebar/MenuItem.js +9 -0
  118. package/dist/components/Sidebar/index.js +137 -0
  119. package/dist/components/StatusTag/StatusTag.js +24 -0
  120. package/dist/components/StatusTypography/StatusTypography.js +51 -0
  121. package/dist/components/Stepper/Stepper.js +75 -0
  122. package/dist/components/Switch/Switch.js +84 -0
  123. package/dist/components/Tab/Tab.js +28 -0
  124. package/dist/components/Table/Table.js +271 -0
  125. package/dist/components/Table/TableHeader.js +137 -0
  126. package/dist/components/Table/TableSort.js +25 -0
  127. package/dist/components/Textarea/Textarea.js +95 -0
  128. package/dist/components/Tooltip/Tooltip.js +1548 -0
  129. package/dist/components/TypographyText/TypographyText.js +91 -0
  130. package/dist/components/ValidationError/ValidationError.js +7 -0
  131. package/dist/components/index.js +133 -0
  132. package/dist/defineProperty-DeKy1XT0.js +37 -0
  133. package/dist/enums/appearance.js +14 -0
  134. package/dist/enums/applicationTypeSlug.js +4 -0
  135. package/dist/enums/index.js +29 -0
  136. package/dist/enums/isActiveColor.js +4 -0
  137. package/dist/enums/size.js +4 -0
  138. package/dist/enums/status.js +11 -0
  139. package/dist/equals-PL9KqVQf.js +119 -0
  140. package/dist/flatpickr-CRz1AV0e.js +59 -0
  141. package/dist/helper-lFjvXQpv.js +1465 -0
  142. package/dist/hooks/index.js +15 -0
  143. package/dist/hooks/useAauth.js +40 -0
  144. package/dist/hooks/useDisclosure.js +14 -0
  145. package/dist/hooks/useDrawer.js +9 -0
  146. package/dist/hooks/useMediaQuery.js +21 -0
  147. package/dist/hooks/useNiceModal.js +13 -0
  148. package/dist/i18nInstance-CiCZbaCK.js +55 -0
  149. package/dist/includes-8YTFrx85.js +46 -0
  150. package/dist/index-9ZLCCecr.js +364 -0
  151. package/dist/index-BHf7G3IG.js +35 -0
  152. package/dist/index-BJU1K2Aw.js +8003 -0
  153. package/dist/index-CB61CB0b.js +669 -0
  154. package/dist/index-H7XbDVmH.js +320 -0
  155. package/dist/index.css +1 -0
  156. package/dist/index.d.mts +1478 -0
  157. package/dist/index.d.ts +1478 -0
  158. package/dist/index.js +203 -0
  159. package/dist/index2.css +1 -0
  160. package/dist/jsx-runtime-BcAkpsdy.js +631 -0
  161. package/dist/keys-B0bo5Q7o.js +67 -0
  162. package/dist/locales/en/index.js +615 -0
  163. package/dist/locales/i18n.js +1417 -0
  164. package/dist/locales/index.js +5 -0
  165. package/dist/locales/tr/index.js +615 -0
  166. package/dist/main.css +1 -0
  167. package/dist/main.js +57 -0
  168. package/dist/prodivers.css +6 -0
  169. package/dist/prodivers.js +13 -0
  170. package/dist/react-content-loader.es-CswLCxkm.js +90 -0
  171. package/dist/react-toastify.esm-BUWNP7Nm.js +808 -0
  172. package/dist/types/common/date.js +1 -0
  173. package/dist/types/common/events.js +1 -0
  174. package/dist/types/common/forms.js +1 -0
  175. package/dist/types/common/option.js +1 -0
  176. package/dist/types/index.js +1 -0
  177. package/dist/useTranslation-CnCPcxVj.js +142 -0
  178. package/dist/utils/date.js +413 -0
  179. package/dist/utils/flatpickr.js +4 -0
  180. package/dist/utils/helper.js +18 -0
  181. package/dist/utils/index.js +27 -0
  182. package/dist/utils/language.js +46 -0
  183. package/dist/utils/table.js +62 -0
  184. package/dist/utils/validation.js +27 -0
  185. package/dist/utils/yup.js +2921 -0
  186. package/package.json +1 -1
@@ -0,0 +1,271 @@
1
+ import { j as r } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import se, { useState as F, useEffect as O } from "react";
3
+ import ne from "../NoResult/NoResult.js";
4
+ import { c as m } from "../../index-BHf7G3IG.js";
5
+ import { s as x } from "../../Table.module-DUqpZOLt.js";
6
+ import { ThemeAppearance as z, AppearanceSpinner as D } from "../../enums/appearance.js";
7
+ import G from "../Checkbox/Checkbox.js";
8
+ import oe from "../Loading/Loading.js";
9
+ import le from "../ScrollContainer/ScrollContainer.js";
10
+ import V from "./TableHeader.js";
11
+ import de from "./TableSort.js";
12
+ import ie from "../Icon/index.js";
13
+ import { Icons as ce } from "../../assets/icons/icons.js";
14
+ import { i as u } from "../../includes-8YTFrx85.js";
15
+ import { _ as W, k as pe } from "../../keys-B0bo5Q7o.js";
16
+ import { _ as U, a as he, b as fe } from "../../_reduce-DsUCMz4O.js";
17
+ import { _ as xe } from "../../Select-BE_y91ZN.js";
18
+ function ue(l, t) {
19
+ for (var n = 0, i = t.length, p = []; n < i; )
20
+ l(t[n]) && (p[p.length] = t[n]), n += 1;
21
+ return p;
22
+ }
23
+ var ge = /* @__PURE__ */ function() {
24
+ function l(t, n) {
25
+ this.xf = n, this.f = t;
26
+ }
27
+ return l.prototype["@@transducer/init"] = U.init, l.prototype["@@transducer/result"] = U.result, l.prototype["@@transducer/step"] = function(t, n) {
28
+ return this.f(n) ? this.xf["@@transducer/step"](t, n) : t;
29
+ }, l;
30
+ }(), be = /* @__PURE__ */ W(function(t, n) {
31
+ return new ge(t, n);
32
+ });
33
+ const je = be;
34
+ var k = /* @__PURE__ */ W(
35
+ /* @__PURE__ */ he(["filter"], je, function(l, t) {
36
+ return xe(t) ? fe(function(n, i) {
37
+ return l(t[i]) && (n[i] = t[i]), n;
38
+ }, {}, pe(t)) : (
39
+ // else
40
+ ue(l, t)
41
+ );
42
+ })
43
+ );
44
+ const Oe = (l) => {
45
+ const {
46
+ columns: t = [],
47
+ dataSource: n = [],
48
+ totalCount: i,
49
+ currentPage: p,
50
+ className: X,
51
+ wrapperClass: B,
52
+ title: K,
53
+ rowSelection: b = !1,
54
+ actionOnChange: S,
55
+ rowSelectionChange: c,
56
+ pagerVisible: _,
57
+ pagerOnChange: E,
58
+ columnRenderer: R,
59
+ pageSizeOnChange: y,
60
+ pageSize: v,
61
+ headerVisible: P = !0,
62
+ headerLeftItem: q,
63
+ customFooterItem: J,
64
+ isLoading: M = !1,
65
+ footerAction: Q = !0,
66
+ pageSizeVisible: Y = !0,
67
+ appearance: j = z.LIGHT,
68
+ fixedHeader: Z,
69
+ showItemsText: L,
70
+ customHeader: H,
71
+ selectedItems: T = [],
72
+ scrollClass: I,
73
+ disabledItems: g = [],
74
+ expandable: o
75
+ } = l, [h, w] = F(T), [$, C] = F([]), ee = (e) => {
76
+ c && (e.target.checked ? (w(
77
+ n.filter((s) => !u(s, g))
78
+ ), c(
79
+ n.filter((s) => !u(s, g))
80
+ )) : (w([]), c([])));
81
+ }, re = (e, s) => {
82
+ c && (e.target.checked ? (w([...h, s]), c([...h, s])) : (w(
83
+ k((a) => a.pk !== s.pk, h)
84
+ ), c(
85
+ k((a) => a.pk !== s.pk, h)
86
+ )));
87
+ }, ae = (e, s) => {
88
+ var d;
89
+ const a = u(e, $);
90
+ C(a ? (f) => k((N) => N !== e, f) : (f) => [...f, e]), (d = o == null ? void 0 : o.onExpand) == null || d.call(o, !a, s);
91
+ }, te = (e, s) => e == null ? void 0 : e.map((a, d) => /* @__PURE__ */ r.jsx(
92
+ "td",
93
+ {
94
+ width: a.width,
95
+ onClick: (f) => {
96
+ a != null && a.onClick && (a == null || a.onClick(f, s, a, d));
97
+ },
98
+ className: m(a.className, a.tdClassName),
99
+ children: a.render ? a.render(s[a.dataIndex], s) : s[a.dataIndex]
100
+ },
101
+ `col-${d}`
102
+ ));
103
+ return O(() => {
104
+ c && c(T.filter((e) => !u(e, g)));
105
+ }, [h, g]), O(() => {
106
+ C([]);
107
+ }, [p]), /* @__PURE__ */ r.jsxs(
108
+ "div",
109
+ {
110
+ "data-testid": "table-container",
111
+ className: m(x.wrapper, B, {
112
+ [x[`${j}`]]: j
113
+ }),
114
+ children: [
115
+ P && /* @__PURE__ */ r.jsx(
116
+ V,
117
+ {
118
+ title: K,
119
+ showItemsText: L,
120
+ actionOnChange: S,
121
+ pageSize: v,
122
+ pageSizeOnChange: y,
123
+ pagerOnChange: E,
124
+ pagerVisible: _,
125
+ totalCount: i,
126
+ currentPage: p
127
+ }
128
+ ),
129
+ /* @__PURE__ */ r.jsxs("div", { className: x.tableWrap, children: [
130
+ M && /* @__PURE__ */ r.jsx(
131
+ oe,
132
+ {
133
+ wrapperClass: x.tableLoading,
134
+ appearance: j === z.LIGHT ? D.LIGHT : D.DARK
135
+ }
136
+ ),
137
+ H && H,
138
+ /* @__PURE__ */ r.jsx(le, { className: I || x.scrollWrap, children: /* @__PURE__ */ r.jsxs(
139
+ "table",
140
+ {
141
+ "data-testid": "table-content",
142
+ className: m(x.table, X, {
143
+ [x.fixed]: Z
144
+ }),
145
+ children: [
146
+ /* @__PURE__ */ r.jsx("thead", { "data-testid": "table-head", children: /* @__PURE__ */ r.jsxs("tr", { "data-testid": "table-row", children: [
147
+ o && /* @__PURE__ */ r.jsx("th", { className: "w-[48px]" }),
148
+ b && /* @__PURE__ */ r.jsx("th", { className: "w-[26px]", children: /* @__PURE__ */ r.jsx(
149
+ G,
150
+ {
151
+ name: "selectAll",
152
+ isDisabled: n.length === 0,
153
+ checked: n.length > 0 && n.length === h.length,
154
+ onChange: ee
155
+ }
156
+ ) }),
157
+ t == null ? void 0 : t.map((e, s) => {
158
+ var a, d;
159
+ return e.sortable ? /* @__PURE__ */ r.jsx(
160
+ "th",
161
+ {
162
+ "data-testid": "table-head-item",
163
+ style: { width: e.width },
164
+ className: e.className,
165
+ children: /* @__PURE__ */ r.jsx(
166
+ de,
167
+ {
168
+ title: (a = e.title) == null ? void 0 : a.toString().toLocaleUpperCase(),
169
+ onClick: (f, N) => {
170
+ var A;
171
+ return (A = e == null ? void 0 : e.onSort) == null ? void 0 : A.call(e, f, N);
172
+ }
173
+ }
174
+ )
175
+ },
176
+ `table-header-${s}`
177
+ ) : /* @__PURE__ */ r.jsx(
178
+ "th",
179
+ {
180
+ "data-testid": "table-head-item",
181
+ style: { width: e.width },
182
+ className: e.className,
183
+ children: typeof e.title == "string" || e.title instanceof String ? (d = e.title) == null ? void 0 : d.toString().toLocaleUpperCase() : e.title
184
+ },
185
+ `table-header-${s}`
186
+ );
187
+ })
188
+ ] }) }),
189
+ /* @__PURE__ */ r.jsx("tbody", { "data-testid": "table-body", children: n.length > 0 ? n.map((e, s) => {
190
+ const a = u(s, $);
191
+ return /* @__PURE__ */ r.jsxs(se.Fragment, { children: [
192
+ /* @__PURE__ */ r.jsxs(
193
+ "tr",
194
+ {
195
+ "data-testid": "table-row",
196
+ onClick: () => {
197
+ o && o.rowExpandable && o.rowExpandable(e) && ae(s, e);
198
+ },
199
+ className: m({
200
+ "cursor-pointer": o && o.rowExpandable ? o.rowExpandable(e) : o
201
+ }),
202
+ children: [
203
+ o && /* @__PURE__ */ r.jsx("td", { children: /* @__PURE__ */ r.jsx(
204
+ "span",
205
+ {
206
+ className: "inline-block transition-transform duration-200",
207
+ style: {
208
+ transform: a ? "rotate(90deg)" : "rotate(0deg)"
209
+ },
210
+ children: o.rowExpandable && o.rowExpandable(e) ? /* @__PURE__ */ r.jsx(ie, { name: ce.ChevronRight }) : null
211
+ }
212
+ ) }),
213
+ b && /* @__PURE__ */ r.jsx("td", { children: /* @__PURE__ */ r.jsx(
214
+ G,
215
+ {
216
+ checked: u(e, h),
217
+ name: `select-${s}`,
218
+ onChange: (d) => re(d, e),
219
+ isDisabled: u(e, g)
220
+ }
221
+ ) }),
222
+ R ? R(t, e) : te(t, e)
223
+ ]
224
+ },
225
+ `table-row-${s}`
226
+ ),
227
+ o && a && /* @__PURE__ */ r.jsx("tr", { children: /* @__PURE__ */ r.jsx(
228
+ "td",
229
+ {
230
+ colSpan: t.length + (b ? 1 : 0) + (o ? 1 : 0),
231
+ className: "p-0 border-0",
232
+ children: o.expandedRowRender(e)
233
+ }
234
+ ) })
235
+ ] }, `row-${s}`);
236
+ }) : /* @__PURE__ */ r.jsx("tr", { children: /* @__PURE__ */ r.jsx(
237
+ "td",
238
+ {
239
+ colSpan: t.length + (b ? 1 : 0) + (o ? 1 : 0),
240
+ children: /* @__PURE__ */ r.jsx(ne, {})
241
+ }
242
+ ) }) })
243
+ ]
244
+ }
245
+ ) })
246
+ ] }),
247
+ Q && /* @__PURE__ */ r.jsx(
248
+ V,
249
+ {
250
+ className: "mt-0",
251
+ showItemsText: L,
252
+ actionOnChange: S,
253
+ pageSize: v,
254
+ pageSizeOnChange: y,
255
+ pagerOnChange: E,
256
+ pagerVisible: _,
257
+ pageSizeVisible: Y,
258
+ totalCount: i,
259
+ customItem: J,
260
+ headerLeftItem: q,
261
+ currentPage: p,
262
+ appearance: j
263
+ }
264
+ )
265
+ ]
266
+ }
267
+ );
268
+ };
269
+ export {
270
+ Oe as default
271
+ };
@@ -0,0 +1,137 @@
1
+ import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import { useState as x, useEffect as R } from "react";
3
+ import { c as f } from "../../index-BHf7G3IG.js";
4
+ import { s } from "../../Table.module-DUqpZOLt.js";
5
+ import { FormFieldAppearance as j, AppearanceButton as B } from "../../enums/appearance.js";
6
+ import D from "../Button/Button.js";
7
+ import W from "../Heading/Heading.js";
8
+ import _ from "../Pager/Pager.js";
9
+ import { S as b } from "../../Select-BE_y91ZN.js";
10
+ import { u as K } from "../../useTranslation-CnCPcxVj.js";
11
+ import { T as L } from "../../Trans-B4ILpbwK.js";
12
+ const M = [
13
+ { value: "10", label: "10" },
14
+ { value: "20", label: "20" },
15
+ { value: "50", label: "50" },
16
+ { value: "100", label: "100" },
17
+ { value: "250", label: "250" }
18
+ ], I = ({
19
+ totalCount: i = 0,
20
+ currentPage: v,
21
+ title: r,
22
+ actionOnChange: t,
23
+ className: h,
24
+ pagerOnChange: N,
25
+ pageSizeOnChange: m,
26
+ pagerVisible: T = !0,
27
+ pageSizeVisible: y = !0,
28
+ pageSize: a = 10,
29
+ actionItems: o,
30
+ pageSizeItems: A = M,
31
+ headerLeftItem: n,
32
+ customItem: c,
33
+ appearance: H,
34
+ showItemsText: P
35
+ }) => {
36
+ const { t: d } = K(), [w, p] = x(!0), [E, u] = x({
37
+ label: a,
38
+ value: a
39
+ }), F = (l) => [
40
+ { value: "exportexel", label: l("text.excel_export") }
41
+ ], G = (l) => {
42
+ p(!l), t && t(l);
43
+ };
44
+ return o = o || F(d), R(() => {
45
+ u({ label: a, value: a });
46
+ }, [a]), /* @__PURE__ */ e.jsxs(
47
+ "div",
48
+ {
49
+ "data-testid": "tableheader-container",
50
+ className: f(s.header, h, {
51
+ "flex justify-between": r && !t || c,
52
+ "flex justify-end": !r && !t
53
+ }),
54
+ children: [
55
+ r && /* @__PURE__ */ e.jsxs("div", { children: [
56
+ /* @__PURE__ */ e.jsx(W, { className: s.title, children: r }),
57
+ /* @__PURE__ */ e.jsxs("p", { className: s.subTitle, children: [
58
+ i,
59
+ " ",
60
+ d("text.results_listing")
61
+ ] })
62
+ ] }),
63
+ c && c,
64
+ /* @__PURE__ */ e.jsx(
65
+ "div",
66
+ {
67
+ className: f(s.actionWrap, {
68
+ [s.justifyContentEnd]: !n,
69
+ [s.width100]: n
70
+ }),
71
+ children: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
72
+ t && /* @__PURE__ */ e.jsxs("div", { className: s.selectedAction, children: [
73
+ /* @__PURE__ */ e.jsx(
74
+ b,
75
+ {
76
+ name: "action",
77
+ items: o,
78
+ appearance: j.LIGHT,
79
+ onChange: G
80
+ }
81
+ ),
82
+ /* @__PURE__ */ e.jsx(
83
+ D,
84
+ {
85
+ appearance: B.PRIMARY,
86
+ isDisabled: w,
87
+ children: d("button.apply")
88
+ }
89
+ )
90
+ ] }),
91
+ n && n,
92
+ /* @__PURE__ */ e.jsxs("div", { className: s.rightGroup, children: [
93
+ y && i > a && /* @__PURE__ */ e.jsxs("div", { className: s.pageSizeWrap, children: [
94
+ /* @__PURE__ */ e.jsx(
95
+ b,
96
+ {
97
+ name: "action",
98
+ value: E,
99
+ items: A,
100
+ className: s.size,
101
+ showPlaceholder: !1,
102
+ onAddItem: ({ item: l }) => {
103
+ u(l), m && m(l.value);
104
+ },
105
+ appearance: j.LIGHT
106
+ }
107
+ ),
108
+ /* @__PURE__ */ e.jsx("span", { children: /* @__PURE__ */ e.jsx(
109
+ L,
110
+ {
111
+ i18nKey: "text.show",
112
+ values: { title: P || r }
113
+ }
114
+ ) })
115
+ ] }),
116
+ T && i > a && /* @__PURE__ */ e.jsx(
117
+ _,
118
+ {
119
+ currentPage: v,
120
+ pageSize: a,
121
+ totalCount: i,
122
+ onChange: N,
123
+ appearance: H,
124
+ className: s.pager
125
+ }
126
+ )
127
+ ] })
128
+ ] })
129
+ }
130
+ )
131
+ ]
132
+ }
133
+ );
134
+ };
135
+ export {
136
+ I as default
137
+ };
@@ -0,0 +1,25 @@
1
+ import { j as r } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import { useState as p } from "react";
3
+ import { Icons as s } from "../../assets/icons/icons.js";
4
+ import o from "../Icon/index.js";
5
+ import { s as a } from "../../Table.module-DUqpZOLt.js";
6
+ import { SortEnum as t } from "../../enums/status.js";
7
+ const g = (m) => {
8
+ const [c, i] = p(t.ASC), { title: d, onClick: l } = m, x = (j) => {
9
+ const e = j.currentTarget, n = e.dataset.sort === t.ASC ? t.DESC : t.ASC;
10
+ e.dataset.sort = n, i(n), l(e, n);
11
+ };
12
+ return /* @__PURE__ */ r.jsxs("div", { onClick: x, "data-sort": t.ASC, className: a.sort, children: [
13
+ /* @__PURE__ */ r.jsx("div", { children: d }),
14
+ /* @__PURE__ */ r.jsx("div", { className: a.icons, children: c === t.ASC ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
15
+ /* @__PURE__ */ r.jsx(o, { name: s.OrderUp }),
16
+ /* @__PURE__ */ r.jsx(o, { name: s.OrderDown })
17
+ ] }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
18
+ /* @__PURE__ */ r.jsx(o, { name: s.OrderDown }),
19
+ /* @__PURE__ */ r.jsx(o, { name: s.OrderUp })
20
+ ] }) })
21
+ ] });
22
+ };
23
+ export {
24
+ g as default
25
+ };
@@ -0,0 +1,95 @@
1
+ import { j as r } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import u, { useState as E, useEffect as R } from "react";
3
+ import { c as v } from "../../index-BHf7G3IG.js";
4
+ import y from "../Label/Label.js";
5
+ import L from "../ValidationError/ValidationError.js";
6
+ import '../../Textarea.css';const S = "_counter_rvifp_2", T = "_container_rvifp_2", V = "_fieldWrap_rvifp_2", $ = "_control_rvifp_2", k = "_light_rvifp_2", q = "_error_rvifp_2", D = "_disabled_rvifp_2", e = {
7
+ counter: S,
8
+ container: T,
9
+ fieldWrap: V,
10
+ control: $,
11
+ light: k,
12
+ error: q,
13
+ disabled: D,
14
+ "size-small": "_size-small_rvifp_2"
15
+ }, G = u.forwardRef(
16
+ (x, h) => {
17
+ const {
18
+ name: d,
19
+ id: g,
20
+ label: p,
21
+ isDisabled: _,
22
+ className: b,
23
+ wrapperClassName: j,
24
+ maxLength: a,
25
+ appearance: s,
26
+ value: o = "",
27
+ size: f,
28
+ onChange: m,
29
+ error: n,
30
+ readOnly: N,
31
+ required: C,
32
+ rows: z = 5,
33
+ ...W
34
+ } = x, [i, l] = E(o), c = (t) => t.slice(0, a), w = u.useCallback(
35
+ (t) => {
36
+ l(c(t)), m && m(c(t));
37
+ },
38
+ [a, l]
39
+ );
40
+ return R(() => {
41
+ l(c(o));
42
+ }, [o]), /* @__PURE__ */ r.jsxs(
43
+ "div",
44
+ {
45
+ "data-testid": "textarea-container",
46
+ className: v(
47
+ e.container,
48
+ {
49
+ [e[`${s}`]]: s,
50
+ [e.error]: n,
51
+ [e.disabled]: _
52
+ },
53
+ "form-group",
54
+ j
55
+ ),
56
+ children: [
57
+ /* @__PURE__ */ r.jsxs("div", { className: e.counter, children: [
58
+ p && /* @__PURE__ */ r.jsxs(y, { name: d, appearance: s, children: [
59
+ p,
60
+ " ",
61
+ C && "*"
62
+ ] }),
63
+ a && /* @__PURE__ */ r.jsxs("span", { children: [
64
+ i ? i.toString().length : 0,
65
+ "/",
66
+ a
67
+ ] })
68
+ ] }),
69
+ /* @__PURE__ */ r.jsx("div", { className: e.fieldWrap, children: /* @__PURE__ */ r.jsx(
70
+ "textarea",
71
+ {
72
+ name: d,
73
+ id: g,
74
+ className: v(e.control, b, {
75
+ [e[`size-${f}`]]: f
76
+ }),
77
+ disabled: _,
78
+ "data-testid": "textarea-input",
79
+ rows: z,
80
+ ref: h,
81
+ readOnly: N,
82
+ onChange: (t) => w(t.currentTarget.value),
83
+ value: i,
84
+ ...W
85
+ }
86
+ ) }),
87
+ n && /* @__PURE__ */ r.jsx(L, { ...n })
88
+ ]
89
+ }
90
+ );
91
+ }
92
+ );
93
+ export {
94
+ G as default
95
+ };