@cagatayfdn/flora-components 0.0.72 → 0.0.75

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 (179) 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-bCNvwTRa.js +32 -0
  17. package/dist/Heading.css +1 -0
  18. package/dist/InfoBoxList.css +1 -0
  19. package/dist/InfoBoxList.module-C6t2KDOB.js +8 -0
  20. package/dist/InfoDate.css +1 -0
  21. package/dist/InfoText.css +1 -0
  22. package/dist/Input.css +1 -0
  23. package/dist/Label.css +1 -0
  24. package/dist/Legends.css +1 -0
  25. package/dist/Loading.css +1 -0
  26. package/dist/MenuItem-BGZHvTKI.js +53 -0
  27. package/dist/MenuItem.css +1 -0
  28. package/dist/Modal.css +1 -0
  29. package/dist/NoResult.css +1 -0
  30. package/dist/PageWrap.css +1 -0
  31. package/dist/Pager.css +1 -0
  32. package/dist/Panel.css +1 -0
  33. package/dist/Radio.css +1 -0
  34. package/dist/ResultError.css +1 -0
  35. package/dist/ScrollContainer.css +1 -0
  36. package/dist/Select-DcLZCXNo.js +1831 -0
  37. package/dist/Select.css +1 -0
  38. package/dist/Select.module-BVWgPUEN.js +20 -0
  39. package/dist/StatusTypography.css +1 -0
  40. package/dist/Stepper.css +1 -0
  41. package/dist/Switch.css +1 -0
  42. package/dist/Tab.css +1 -0
  43. package/dist/TableHeader-B91BXue0.js +159 -0
  44. package/dist/TableHeader.css +1 -0
  45. package/dist/Textarea.css +1 -0
  46. package/dist/Tooltip.css +1 -0
  47. package/dist/Trans-B4ILpbwK.js +343 -0
  48. package/dist/TypographyText.css +1 -0
  49. package/dist/ValidationError.css +1 -0
  50. package/dist/_commonjsHelpers-CT_km90n.js +30 -0
  51. package/dist/_isArray-CBUZFxFA.js +6 -0
  52. package/dist/_isString-BUpNGP_8.js +6 -0
  53. package/dist/_reduce-DsUCMz4O.js +148 -0
  54. package/dist/assets/icons/icons.js +62 -0
  55. package/dist/assets/images/500_error_2x.gif +0 -0
  56. package/dist/assets/images/oms.png +0 -0
  57. package/dist/components/Accordion/Accordion.js +57 -0
  58. package/dist/components/ActionButton/ActionButton.js +54 -0
  59. package/dist/components/AlertCard/AlertCard.js +29 -0
  60. package/dist/components/AuthUserCan/Permission.js +18 -0
  61. package/dist/components/AuthUserCan/index.js +23 -0
  62. package/dist/components/Autocomplete/Autocomplete.js +87 -0
  63. package/dist/components/Button/Button.js +87 -0
  64. package/dist/components/Card/Card.js +21 -0
  65. package/dist/components/Charts/Bar.js +18 -0
  66. package/dist/components/Charts/Legends.js +21 -0
  67. package/dist/components/Charts/Line.js +18 -0
  68. package/dist/components/Charts/Pie.js +43 -0
  69. package/dist/components/Charts/index.js +31 -0
  70. package/dist/components/Charts/types.js +1 -0
  71. package/dist/components/Charts/utils.js +12 -0
  72. package/dist/components/Checkbox/Checkbox.js +119 -0
  73. package/dist/components/Config/Config.js +32 -0
  74. package/dist/components/Confirm/Confirm.js +52 -0
  75. package/dist/components/ContentHeader/ContentHeader.js +75 -0
  76. package/dist/components/ContentLoader/ContentLoader.js +16 -0
  77. package/dist/components/Countdown/Countdown.js +20 -0
  78. package/dist/components/Datepicker/Datepicker.js +1478 -0
  79. package/dist/components/Divider/Divider.js +26 -0
  80. package/dist/components/Dropdown/DropdownList.js +90 -0
  81. package/dist/components/ErrorLogModal/ErrorLogModal.js +63 -0
  82. package/dist/components/FileUpload/FileUpload.js +237 -0
  83. package/dist/components/FileUpload/ImagePreview.js +19 -0
  84. package/dist/components/FileUpload/LengthCard.js +6 -0
  85. package/dist/components/FileUpload/PreviewModal.js +53 -0
  86. package/dist/components/Grid/Column.js +29 -0
  87. package/dist/components/Grid/Row.js +6 -0
  88. package/dist/components/Heading/Heading.js +22 -0
  89. package/dist/components/Icon/index.js +24 -0
  90. package/dist/components/InfiniteScroll/InfiniteScroll.js +41 -0
  91. package/dist/components/InfoBoxList/InfoBoxList.js +30 -0
  92. package/dist/components/InfoBoxList/helper.js +83 -0
  93. package/dist/components/InfoDate/InfoDate.js +19 -0
  94. package/dist/components/InfoText/InfoText.js +13 -0
  95. package/dist/components/Input/Input.js +140 -0
  96. package/dist/components/Label/Label.js +22 -0
  97. package/dist/components/Loading/Loading.js +62 -0
  98. package/dist/components/Modal/Modal.js +57 -0
  99. package/dist/components/NavigatorCard/index.js +59 -0
  100. package/dist/components/NoResult/NoResult.js +12 -0
  101. package/dist/components/Notification/Notification.js +26 -0
  102. package/dist/components/PageWrapper/PageWrap.js +46 -0
  103. package/dist/components/Pager/Pager.js +103 -0
  104. package/dist/components/Panel/Panel.js +69 -0
  105. package/dist/components/PermaLink/PermaLink.js +34 -0
  106. package/dist/components/Radio/Radio.js +96 -0
  107. package/dist/components/ResultError/ResultError.js +20 -0
  108. package/dist/components/ScrollContainer/ScrollContainer.js +21 -0
  109. package/dist/components/Select/NoData.js +10 -0
  110. package/dist/components/Select/OptionItem.js +19 -0
  111. package/dist/components/Select/Select.js +13 -0
  112. package/dist/components/Sidebar/MenuItem.js +9 -0
  113. package/dist/components/Sidebar/index.js +137 -0
  114. package/dist/components/StatusTypography/StatusTypography.js +51 -0
  115. package/dist/components/Stepper/Stepper.js +72 -0
  116. package/dist/components/Switch/Switch.js +79 -0
  117. package/dist/components/Tab/Tab.js +28 -0
  118. package/dist/components/Table/Table.js +201 -0
  119. package/dist/components/Table/TableHeader.js +14 -0
  120. package/dist/components/Textarea/Textarea.js +95 -0
  121. package/dist/components/Tooltip/Tooltip.js +1548 -0
  122. package/dist/components/TypographyText/TypographyText.js +87 -0
  123. package/dist/components/ValidationError/ValidationError.js +7 -0
  124. package/dist/components/index.js +125 -0
  125. package/dist/defineProperty-DeKy1XT0.js +37 -0
  126. package/dist/enums/appearance.js +14 -0
  127. package/dist/enums/applicationTypeSlug.js +4 -0
  128. package/dist/enums/index.js +27 -0
  129. package/dist/enums/isActiveColor.js +4 -0
  130. package/dist/enums/size.js +4 -0
  131. package/dist/enums/status.js +9 -0
  132. package/dist/equals-PL9KqVQf.js +119 -0
  133. package/dist/flatpickr-CRz1AV0e.js +59 -0
  134. package/dist/hooks/index.js +9 -0
  135. package/dist/hooks/useAauth.js +40 -0
  136. package/dist/hooks/useDisclosure.js +14 -0
  137. package/dist/hooks/useNiceModal.js +13 -0
  138. package/dist/i18nInstance-CiCZbaCK.js +55 -0
  139. package/dist/includes-8YTFrx85.js +46 -0
  140. package/dist/index-BHf7G3IG.js +35 -0
  141. package/dist/index-BJU1K2Aw.js +8003 -0
  142. package/dist/index-C9yacAGx.js +359 -0
  143. package/dist/index-CB61CB0b.js +669 -0
  144. package/dist/index-H7XbDVmH.js +320 -0
  145. package/dist/index-a0GSBrWt.js +364 -0
  146. package/dist/index.css +1 -0
  147. package/dist/index.d.mts +1351 -0
  148. package/dist/index.js +181 -0
  149. package/dist/jsx-runtime-BcAkpsdy.js +631 -0
  150. package/dist/keys-B0bo5Q7o.js +67 -0
  151. package/dist/locales/en/index.js +613 -0
  152. package/dist/locales/i18n.js +1417 -0
  153. package/dist/locales/index.js +5 -0
  154. package/dist/locales/tr/index.js +613 -0
  155. package/dist/prodivers.css +6 -0
  156. package/dist/prodivers.js +12 -0
  157. package/dist/react-content-loader.es-CswLCxkm.js +90 -0
  158. package/dist/react-toastify.esm-BUWNP7Nm.js +808 -0
  159. package/dist/types/common/date.js +1 -0
  160. package/dist/types/common/events.js +1 -0
  161. package/dist/types/common/forms.js +1 -0
  162. package/dist/types/common/option.js +1 -0
  163. package/dist/types/index.js +1 -0
  164. package/dist/useTranslation-CnCPcxVj.js +142 -0
  165. package/dist/utils/date.js +413 -0
  166. package/dist/utils/flatpickr.js +4 -0
  167. package/dist/utils/helper.js +1463 -0
  168. package/dist/utils/index.js +21 -0
  169. package/dist/utils/language.js +46 -0
  170. package/dist/utils/validation.js +27 -0
  171. package/dist/utils/yup.js +2921 -0
  172. package/package.json +11 -8
  173. package/dist/index.cjs.js +0 -295
  174. package/dist/index.cjs.js.map +0 -1
  175. package/dist/index.es.js +0 -25081
  176. package/dist/index.es.js.map +0 -1
  177. package/dist/index.umd.js +0 -295
  178. package/dist/index.umd.js.map +0 -1
  179. package/dist/style.css +0 -1
@@ -0,0 +1,201 @@
1
+ import { j as s } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import { useState as Q, useEffect as Y } from "react";
3
+ import Z from "../NoResult/NoResult.js";
4
+ import { c as g } from "../../index-BHf7G3IG.js";
5
+ import { s as c, T as H } from "../../TableHeader-B91BXue0.js";
6
+ import { ThemeAppearance as L, AppearanceSpinner as T } from "../../enums/appearance.js";
7
+ import A from "../Checkbox/Checkbox.js";
8
+ import I from "../Loading/Loading.js";
9
+ import ee from "../ScrollContainer/ScrollContainer.js";
10
+ import { i as f } from "../../includes-8YTFrx85.js";
11
+ import { _ as R, k as te } from "../../keys-B0bo5Q7o.js";
12
+ import { _ as $, a as re, b as ae } from "../../_reduce-DsUCMz4O.js";
13
+ import { _ as se } from "../../Select-DcLZCXNo.js";
14
+ function ne(i, e) {
15
+ for (var r = 0, d = e.length, h = []; r < d; )
16
+ i(e[r]) && (h[h.length] = e[r]), r += 1;
17
+ return h;
18
+ }
19
+ var ie = /* @__PURE__ */ function() {
20
+ function i(e, r) {
21
+ this.xf = r, this.f = e;
22
+ }
23
+ return i.prototype["@@transducer/init"] = $.init, i.prototype["@@transducer/result"] = $.result, i.prototype["@@transducer/step"] = function(e, r) {
24
+ return this.f(r) ? this.xf["@@transducer/step"](e, r) : e;
25
+ }, i;
26
+ }(), de = /* @__PURE__ */ R(function(e, r) {
27
+ return new ie(e, r);
28
+ });
29
+ const le = de;
30
+ var O = /* @__PURE__ */ R(
31
+ /* @__PURE__ */ re(["filter"], le, function(i, e) {
32
+ return se(e) ? ae(function(r, d) {
33
+ return i(e[d]) && (r[d] = e[d]), r;
34
+ }, {}, te(e)) : (
35
+ // else
36
+ ne(i, e)
37
+ );
38
+ })
39
+ );
40
+ const ke = (i) => {
41
+ const {
42
+ columns: e = [],
43
+ dataSource: r = [],
44
+ totalCount: d,
45
+ currentPage: h,
46
+ className: z,
47
+ wrapperClass: D,
48
+ title: F,
49
+ rowSelection: j = !1,
50
+ actionOnChange: m,
51
+ rowSelectionChange: l,
52
+ pagerVisible: b,
53
+ pagerOnChange: C,
54
+ columnRenderer: w,
55
+ pageSizeOnChange: k,
56
+ pageSize: N,
57
+ headerVisible: G = !0,
58
+ headerLeftItem: V,
59
+ customFooterItem: E,
60
+ isLoading: W = !1,
61
+ footerAction: X = !0,
62
+ pageSizeVisible: B = !0,
63
+ appearance: u = L.LIGHT,
64
+ fixedHeader: K,
65
+ showItemsText: S,
66
+ customHeader: _,
67
+ selectedItems: y = [],
68
+ scrollClass: P,
69
+ disabledItems: p = []
70
+ } = i, [o, x] = Q(y), U = (a) => {
71
+ l && (a.target.checked ? (x(
72
+ r.filter((n) => !f(n, p))
73
+ ), l(
74
+ r.filter((n) => !f(n, p))
75
+ )) : (x([]), l([])));
76
+ }, q = (a, n) => {
77
+ l && (a.target.checked ? (x([...o, n]), l([...o, n])) : (x(
78
+ O((t) => t.pk !== n.pk, o)
79
+ ), l(
80
+ O((t) => t.pk !== n.pk, o)
81
+ )));
82
+ }, J = (a, n) => a == null ? void 0 : a.map((t, v) => /* @__PURE__ */ s.jsx(
83
+ "td",
84
+ {
85
+ width: t.width,
86
+ onClick: (M) => {
87
+ t != null && t.onClick && (t == null || t.onClick(M, n, t, v));
88
+ },
89
+ className: g(t.className, t.tdClassName),
90
+ children: t.render ? t.render(n[t.dataIndex], n) : n[t.dataIndex]
91
+ },
92
+ `col-${v}`
93
+ ));
94
+ return Y(() => {
95
+ l && l(
96
+ y.filter((a) => !f(a, p))
97
+ );
98
+ }, [o, p]), /* @__PURE__ */ s.jsxs(
99
+ "div",
100
+ {
101
+ "data-testid": "table-container",
102
+ className: g(c.wrapper, D, {
103
+ [c[`${u}`]]: u
104
+ }),
105
+ children: [
106
+ G && /* @__PURE__ */ s.jsx(
107
+ H,
108
+ {
109
+ title: F,
110
+ showItemsText: S,
111
+ actionOnChange: m,
112
+ pageSize: N,
113
+ pageSizeOnChange: k,
114
+ pagerOnChange: C,
115
+ pagerVisible: b,
116
+ totalCount: d,
117
+ currentPage: h
118
+ }
119
+ ),
120
+ /* @__PURE__ */ s.jsxs("div", { className: c.tableWrap, children: [
121
+ W && /* @__PURE__ */ s.jsx(
122
+ I,
123
+ {
124
+ wrapperClass: c.tableLoading,
125
+ appearance: u === L.LIGHT ? T.LIGHT : T.DARK
126
+ }
127
+ ),
128
+ _ && _,
129
+ /* @__PURE__ */ s.jsx(ee, { className: P || c.scrollWrap, children: /* @__PURE__ */ s.jsxs(
130
+ "table",
131
+ {
132
+ "data-testid": "table-content",
133
+ className: g(c.table, z, {
134
+ [c.fixed]: K
135
+ }),
136
+ children: [
137
+ /* @__PURE__ */ s.jsx("thead", { "data-testid": "table-head", children: /* @__PURE__ */ s.jsxs("tr", { "data-testid": "table-row", children: [
138
+ j && /* @__PURE__ */ s.jsx("th", { style: { width: 26 }, children: /* @__PURE__ */ s.jsx(
139
+ A,
140
+ {
141
+ name: "selectAll",
142
+ isDisabled: r.length === 0,
143
+ checked: r.length > 0 && r.length === o.length,
144
+ onChange: U
145
+ }
146
+ ) }),
147
+ e == null ? void 0 : e.map((a, n) => {
148
+ var t;
149
+ return /* @__PURE__ */ s.jsx(
150
+ "th",
151
+ {
152
+ "data-testid": "table-head-item",
153
+ style: { width: a.width },
154
+ className: a.className,
155
+ children: typeof a.title == "string" || a.title instanceof String ? (t = a.title) == null ? void 0 : t.toString().toLocaleUpperCase() : a.title
156
+ },
157
+ `table-header-${n}`
158
+ );
159
+ })
160
+ ] }) }),
161
+ /* @__PURE__ */ s.jsx("tbody", { "data-testid": "table-body", children: r.length > 0 ? r.map((a, n) => /* @__PURE__ */ s.jsxs("tr", { children: [
162
+ j && /* @__PURE__ */ s.jsx("td", { children: /* @__PURE__ */ s.jsx(
163
+ A,
164
+ {
165
+ checked: f(a, o),
166
+ name: `select-${n}`,
167
+ onChange: (t) => q(t, a),
168
+ isDisabled: f(a, p)
169
+ }
170
+ ) }),
171
+ w ? w(e, a) : J(e, a)
172
+ ] }, `row-${n}`)) : /* @__PURE__ */ s.jsx("tr", { children: /* @__PURE__ */ s.jsx("td", { colSpan: e.length + 1, children: /* @__PURE__ */ s.jsx(Z, {}) }) }) })
173
+ ]
174
+ }
175
+ ) })
176
+ ] }),
177
+ X && /* @__PURE__ */ s.jsx(
178
+ H,
179
+ {
180
+ className: "mt-0",
181
+ showItemsText: S,
182
+ actionOnChange: m,
183
+ pageSize: N,
184
+ pageSizeOnChange: k,
185
+ pagerOnChange: C,
186
+ pagerVisible: b,
187
+ pageSizeVisible: B,
188
+ totalCount: d,
189
+ customItem: E,
190
+ headerLeftItem: V,
191
+ currentPage: h,
192
+ appearance: u
193
+ }
194
+ )
195
+ ]
196
+ }
197
+ );
198
+ };
199
+ export {
200
+ ke as default
201
+ };
@@ -0,0 +1,14 @@
1
+ import "../../jsx-runtime-BcAkpsdy.js";
2
+ import "react";
3
+ import "../../index-BHf7G3IG.js";
4
+ import { T as u } from "../../TableHeader-B91BXue0.js";
5
+ import "../../enums/appearance.js";
6
+ import "../Button/Button.js";
7
+ import "../Heading/Heading.js";
8
+ import "../Pager/Pager.js";
9
+ import "../../Select-DcLZCXNo.js";
10
+ import "../../useTranslation-CnCPcxVj.js";
11
+ import "../../Trans-B4ILpbwK.js";
12
+ export {
13
+ u as default
14
+ };
@@ -0,0 +1,95 @@
1
+ import { j as t } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import f, { useState as W, useEffect as E } from "react";
3
+ import { c as v } from "../../index-BHf7G3IG.js";
4
+ import R from "../Label/Label.js";
5
+ import y from "../ValidationError/ValidationError.js";
6
+ import '../../Textarea.css';const L = "_counter_1tkwv_1", S = "_container_1tkwv_10", T = "_fieldWrap_1tkwv_10", V = "_control_1tkwv_16", $ = "_light_1tkwv_31", q = "_error_1tkwv_38", D = "_disabled_1tkwv_45", e = {
7
+ counter: L,
8
+ container: S,
9
+ fieldWrap: T,
10
+ control: V,
11
+ light: $,
12
+ error: q,
13
+ disabled: D,
14
+ "size-small": "_size-small_1tkwv_49"
15
+ }, G = f.forwardRef(
16
+ (x, h) => {
17
+ const {
18
+ name: d,
19
+ id: w,
20
+ label: _,
21
+ isDisabled: m,
22
+ className: g,
23
+ wrapperClassName: b,
24
+ maxLength: a,
25
+ appearance: s,
26
+ value: o = "",
27
+ size: p,
28
+ onChange: u,
29
+ error: n,
30
+ readOnly: j,
31
+ required: k,
32
+ rows: N = 5,
33
+ ...C
34
+ } = x, [l, i] = W(o), c = (r) => r.slice(0, a), z = f.useCallback(
35
+ (r) => {
36
+ i(c(r)), u && u(c(r));
37
+ },
38
+ [a, i]
39
+ );
40
+ return E(() => {
41
+ i(c(o));
42
+ }, [o]), /* @__PURE__ */ t.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]: m
52
+ },
53
+ "form-group",
54
+ b
55
+ ),
56
+ children: [
57
+ /* @__PURE__ */ t.jsxs("div", { className: e.counter, children: [
58
+ _ && /* @__PURE__ */ t.jsxs(R, { name: d, appearance: s, children: [
59
+ _,
60
+ " ",
61
+ k && "*"
62
+ ] }),
63
+ a && /* @__PURE__ */ t.jsxs("span", { children: [
64
+ l ? l.toString().length : 0,
65
+ "/",
66
+ a
67
+ ] })
68
+ ] }),
69
+ /* @__PURE__ */ t.jsx("div", { className: e.fieldWrap, children: /* @__PURE__ */ t.jsx(
70
+ "textarea",
71
+ {
72
+ name: d,
73
+ id: w,
74
+ className: v(e.control, g, {
75
+ [e[`size-${p}`]]: p
76
+ }),
77
+ disabled: m,
78
+ "data-testid": "textarea-input",
79
+ rows: N,
80
+ ref: h,
81
+ readOnly: j,
82
+ onChange: (r) => z(r.currentTarget.value),
83
+ value: l,
84
+ ...C
85
+ }
86
+ ) }),
87
+ n && /* @__PURE__ */ t.jsx(y, { ...n })
88
+ ]
89
+ }
90
+ );
91
+ }
92
+ );
93
+ export {
94
+ G as default
95
+ };