@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,103 @@
1
+ import { j as a } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import { useState as F, useEffect as g } from "react";
3
+ import { c as l } from "../../index-BHf7G3IG.js";
4
+ import { Icons as h } from "../../assets/icons/icons.js";
5
+ import { ThemeAppearance as I } from "../../enums/appearance.js";
6
+ import _ from "../Icon/index.js";
7
+ import '../../Pager.css';const D = "_wrap_1jmhu_2", H = "_pager_1jmhu_2", L = "_disabled_1jmhu_2", R = "_inputField_1jmhu_2", S = "_totalPage_1jmhu_2", E = "_currentPage_1jmhu_2", V = "_dark_1jmhu_2", t = {
8
+ wrap: D,
9
+ pager: H,
10
+ disabled: L,
11
+ inputField: R,
12
+ totalPage: S,
13
+ currentPage: E,
14
+ dark: V
15
+ }, B = (f) => {
16
+ const {
17
+ currentPage: n = 1,
18
+ reset: j,
19
+ totalCount: x,
20
+ onChange: m,
21
+ className: N,
22
+ showInput: u = !0,
23
+ pageSize: P = 10,
24
+ appearance: p = I.LIGHT
25
+ } = f, [s, d] = F(n), r = Math.ceil(x / P), c = r >= 10, v = s === r, b = s === 1, o = (e) => {
26
+ d(e), m && m(e);
27
+ }, C = () => {
28
+ s > 1 && o(s - 1);
29
+ }, k = () => {
30
+ r > s && o(s + 1);
31
+ }, T = (e) => {
32
+ const w = e.target.value.slice(0, 1), i = Number(c ? e.target.value : w);
33
+ setTimeout(() => {
34
+ r >= i && i > 0 ? o(i) : i <= 0 ? o(1) : o(r), c || e.target.select();
35
+ }, 300);
36
+ };
37
+ return g(() => {
38
+ d(n);
39
+ }, [n]), g(() => {
40
+ d(1);
41
+ }, [j]), /* @__PURE__ */ a.jsx(
42
+ "div",
43
+ {
44
+ "data-testid": "pager-container",
45
+ className: l(t.wrap, N, {
46
+ [t[p]]: p
47
+ }),
48
+ children: /* @__PURE__ */ a.jsxs("div", { className: t.pager, children: [
49
+ /* @__PURE__ */ a.jsx(
50
+ "a",
51
+ {
52
+ "data-testid": "pager-prev",
53
+ className: l(t.prev, {
54
+ [t.disabled]: b
55
+ }),
56
+ onClick: C,
57
+ children: /* @__PURE__ */ a.jsx(_, { name: h.ChevronLeft })
58
+ }
59
+ ),
60
+ u && /* @__PURE__ */ a.jsx(
61
+ "input",
62
+ {
63
+ name: "pageNumber",
64
+ "data-testid": "pager-input",
65
+ className: t.inputField,
66
+ maxLength: r <= 9 ? 1 : void 0,
67
+ value: s,
68
+ onFocus: (e) => {
69
+ c || e.currentTarget.select();
70
+ },
71
+ onClick: (e) => {
72
+ c || (e.currentTarget.setSelectionRange(0, 0), e.currentTarget.select());
73
+ },
74
+ onChange: (e) => {
75
+ c || (e.target.autofocus = !0), T(e);
76
+ }
77
+ }
78
+ ),
79
+ /* @__PURE__ */ a.jsxs("span", { className: l(t.totalPage, {
80
+ [t.currentPage]: !u
81
+ }), children: [
82
+ !u && /* @__PURE__ */ a.jsx("span", { className: t.currentPage, children: n > 1 ? n : s }),
83
+ "/",
84
+ r === 0 ? 1 : r
85
+ ] }),
86
+ /* @__PURE__ */ a.jsx(
87
+ "a",
88
+ {
89
+ className: l(t.next, {
90
+ [t.disabled]: v
91
+ }),
92
+ onClick: k,
93
+ "data-testid": "pager-next",
94
+ children: /* @__PURE__ */ a.jsx(_, { name: h.ChevronRight })
95
+ }
96
+ )
97
+ ] })
98
+ }
99
+ );
100
+ };
101
+ export {
102
+ B as default
103
+ };
@@ -0,0 +1,71 @@
1
+ import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import { c as r } from "../../index-BHf7G3IG.js";
3
+ import { ThemeAppearance as x } from "../../enums/appearance.js";
4
+ import '../../Panel.css';const p = "_box_1bthr_2", j = "_header_1bthr_2", f = "_hasBorder_1bthr_2", N = "_body_1bthr_2", y = "_noHeaders_1bthr_2", u = "_description_1bthr_2", v = "_dark_1bthr_2", B = "_line_1bthr_2", s = {
5
+ box: p,
6
+ header: j,
7
+ hasBorder: f,
8
+ body: N,
9
+ noHeaders: y,
10
+ description: u,
11
+ dark: v,
12
+ line: B
13
+ }, $ = ({
14
+ title: a,
15
+ children: i,
16
+ description: d,
17
+ className: _,
18
+ type: n = "box",
19
+ appearance: t = x.DARK,
20
+ headerDescription: c,
21
+ headerRightChild: o,
22
+ headerClass: l,
23
+ hasBorder: h,
24
+ bodyClass: b,
25
+ isLoading: m
26
+ }) => /* @__PURE__ */ e.jsxs(
27
+ "div",
28
+ {
29
+ "data-testid": "panel-container",
30
+ className: r(_, s.container, {
31
+ [s[`${t}`]]: t,
32
+ [s[`${n}`]]: n
33
+ }),
34
+ children: [
35
+ a && /* @__PURE__ */ e.jsxs(
36
+ "div",
37
+ {
38
+ "data-testid": "panel-header",
39
+ className: r(s.header, l, {
40
+ flex: o,
41
+ slide: m,
42
+ "justify-between": o,
43
+ [s.hasBorder]: h
44
+ }),
45
+ children: [
46
+ /* @__PURE__ */ e.jsxs("div", { children: [
47
+ /* @__PURE__ */ e.jsx("h1", { children: a }),
48
+ c && /* @__PURE__ */ e.jsx("p", { className: r("m-0", s.description), children: c })
49
+ ] }),
50
+ o
51
+ ]
52
+ }
53
+ ),
54
+ /* @__PURE__ */ e.jsxs(
55
+ "div",
56
+ {
57
+ className: r(b, s.body, {
58
+ [s.noHeaders]: !a
59
+ }),
60
+ children: [
61
+ d && /* @__PURE__ */ e.jsx("p", { "data-testid": "panel-description", className: s.description, children: d }),
62
+ i
63
+ ]
64
+ }
65
+ )
66
+ ]
67
+ }
68
+ );
69
+ export {
70
+ $ as default
71
+ };
@@ -0,0 +1,387 @@
1
+ import { j as Y } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import * as m from "react";
3
+ import "react-dom";
4
+ import { a as D, u as I, D as J, N as P, s as E, i as S, m as M, w as B, b as Q, c as Z, d as ee, e as A, f as te, R as ne, j as re, g as ae } from "../../index-9ZLCCecr.js";
5
+ /**
6
+ * React Router DOM v6.22.0
7
+ *
8
+ * Copyright (c) Remix Software Inc.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE.md file in the root directory of this source tree.
12
+ *
13
+ * @license MIT
14
+ */
15
+ function x() {
16
+ return x = Object.assign ? Object.assign.bind() : function(e) {
17
+ for (var n = 1; n < arguments.length; n++) {
18
+ var r = arguments[n];
19
+ for (var a in r)
20
+ Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
21
+ }
22
+ return e;
23
+ }, x.apply(this, arguments);
24
+ }
25
+ function K(e, n) {
26
+ if (e == null)
27
+ return {};
28
+ var r = {}, a = Object.keys(e), t, i;
29
+ for (i = 0; i < a.length; i++)
30
+ t = a[i], !(n.indexOf(t) >= 0) && (r[t] = e[t]);
31
+ return r;
32
+ }
33
+ const _ = "get", L = "application/x-www-form-urlencoded";
34
+ function F(e) {
35
+ return e != null && typeof e.tagName == "string";
36
+ }
37
+ function ie(e) {
38
+ return F(e) && e.tagName.toLowerCase() === "button";
39
+ }
40
+ function oe(e) {
41
+ return F(e) && e.tagName.toLowerCase() === "form";
42
+ }
43
+ function le(e) {
44
+ return F(e) && e.tagName.toLowerCase() === "input";
45
+ }
46
+ function se(e) {
47
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
48
+ }
49
+ function ue(e, n) {
50
+ return e.button === 0 && // Ignore everything but left clicks
51
+ (!n || n === "_self") && // Let browser handle "target=_blank" etc.
52
+ !se(e);
53
+ }
54
+ let R = null;
55
+ function ce() {
56
+ if (R === null)
57
+ try {
58
+ new FormData(
59
+ document.createElement("form"),
60
+ // @ts-expect-error if FormData supports the submitter parameter, this will throw
61
+ 0
62
+ ), R = !1;
63
+ } catch {
64
+ R = !0;
65
+ }
66
+ return R;
67
+ }
68
+ const fe = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
69
+ function U(e) {
70
+ return e != null && !fe.has(e) ? (process.env.NODE_ENV !== "production" && B(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + L + '"')), null) : e;
71
+ }
72
+ function me(e, n) {
73
+ let r, a, t, i, o;
74
+ if (oe(e)) {
75
+ let s = e.getAttribute("action");
76
+ a = s ? E(s, n) : null, r = e.getAttribute("method") || _, t = U(e.getAttribute("enctype")) || L, i = new FormData(e);
77
+ } else if (ie(e) || le(e) && (e.type === "submit" || e.type === "image")) {
78
+ let s = e.form;
79
+ if (s == null)
80
+ throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
81
+ let u = e.getAttribute("formaction") || s.getAttribute("action");
82
+ if (a = u ? E(u, n) : null, r = e.getAttribute("formmethod") || s.getAttribute("method") || _, t = U(e.getAttribute("formenctype")) || U(s.getAttribute("enctype")) || L, i = new FormData(s, e), !ce()) {
83
+ let {
84
+ name: l,
85
+ type: d,
86
+ value: h
87
+ } = e;
88
+ if (d === "image") {
89
+ let v = l ? l + "." : "";
90
+ i.append(v + "x", "0"), i.append(v + "y", "0");
91
+ } else
92
+ l && i.append(l, h);
93
+ }
94
+ } else {
95
+ if (F(e))
96
+ throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
97
+ r = _, a = null, t = L, o = e;
98
+ }
99
+ return i && t === "text/plain" && (o = i, i = void 0), {
100
+ action: a,
101
+ method: r.toLowerCase(),
102
+ encType: t,
103
+ formData: i,
104
+ body: o
105
+ };
106
+ }
107
+ const de = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "unstable_viewTransition"], pe = ["aria-current", "caseSensitive", "className", "end", "style", "to", "unstable_viewTransition", "children"], he = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "unstable_viewTransition"], ve = "6";
108
+ try {
109
+ window.__reactRouterVersion = ve;
110
+ } catch {
111
+ }
112
+ const z = /* @__PURE__ */ m.createContext({
113
+ isTransitioning: !1
114
+ });
115
+ process.env.NODE_ENV !== "production" && (z.displayName = "ViewTransition");
116
+ const be = /* @__PURE__ */ m.createContext(/* @__PURE__ */ new Map());
117
+ process.env.NODE_ENV !== "production" && (be.displayName = "Fetchers");
118
+ process.env.NODE_ENV;
119
+ const we = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", ye = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, $ = /* @__PURE__ */ m.forwardRef(function(n, r) {
120
+ let {
121
+ onClick: a,
122
+ relative: t,
123
+ reloadDocument: i,
124
+ replace: o,
125
+ state: s,
126
+ target: u,
127
+ to: l,
128
+ preventScrollReset: d,
129
+ unstable_viewTransition: h
130
+ } = n, v = K(n, de), {
131
+ basename: N
132
+ } = m.useContext(P), b, w = !1;
133
+ if (typeof l == "string" && ye.test(l) && (b = l, we))
134
+ try {
135
+ let p = new URL(window.location.href), f = l.startsWith("//") ? new URL(p.protocol + l) : new URL(l), C = E(f.pathname, N);
136
+ f.origin === p.origin && C != null ? l = C + f.search + f.hash : w = !0;
137
+ } catch {
138
+ process.env.NODE_ENV !== "production" && B(!1, '<Link to="' + l + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
139
+ }
140
+ let y = Q(l, {
141
+ relative: t
142
+ }), g = Se(l, {
143
+ replace: o,
144
+ state: s,
145
+ target: u,
146
+ preventScrollReset: d,
147
+ relative: t,
148
+ unstable_viewTransition: h
149
+ });
150
+ function c(p) {
151
+ a && a(p), p.defaultPrevented || g(p);
152
+ }
153
+ return (
154
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
155
+ /* @__PURE__ */ m.createElement("a", x({}, v, {
156
+ href: b || y,
157
+ onClick: w || i ? a : c,
158
+ ref: r,
159
+ target: u
160
+ }))
161
+ );
162
+ });
163
+ process.env.NODE_ENV !== "production" && ($.displayName = "Link");
164
+ const q = /* @__PURE__ */ m.forwardRef(function(n, r) {
165
+ let {
166
+ "aria-current": a = "page",
167
+ caseSensitive: t = !1,
168
+ className: i = "",
169
+ end: o = !1,
170
+ style: s,
171
+ to: u,
172
+ unstable_viewTransition: l,
173
+ children: d
174
+ } = n, h = K(n, pe), v = D(u, {
175
+ relative: h.relative
176
+ }), N = I(), b = m.useContext(J), {
177
+ navigator: w,
178
+ basename: y
179
+ } = m.useContext(P), g = b != null && // Conditional usage is OK here because the usage of a data router is static
180
+ // eslint-disable-next-line react-hooks/rules-of-hooks
181
+ Le(v) && l === !0, c = w.encodeLocation ? w.encodeLocation(v).pathname : v.pathname, p = N.pathname, f = b && b.navigation && b.navigation.location ? b.navigation.location.pathname : null;
182
+ t || (p = p.toLowerCase(), f = f ? f.toLowerCase() : null, c = c.toLowerCase()), f && y && (f = E(f, y) || f);
183
+ const C = c !== "/" && c.endsWith("/") ? c.length - 1 : c.length;
184
+ let O = p === c || !o && p.startsWith(c) && p.charAt(C) === "/", j = f != null && (f === c || !o && f.startsWith(c) && f.charAt(c.length) === "/"), k = {
185
+ isActive: O,
186
+ isPending: j,
187
+ isTransitioning: g
188
+ }, H = O ? a : void 0, V;
189
+ typeof i == "function" ? V = i(k) : V = [i, O ? "active" : null, j ? "pending" : null, g ? "transitioning" : null].filter(Boolean).join(" ");
190
+ let X = typeof s == "function" ? s(k) : s;
191
+ return /* @__PURE__ */ m.createElement($, x({}, h, {
192
+ "aria-current": H,
193
+ className: V,
194
+ ref: r,
195
+ style: X,
196
+ to: u,
197
+ unstable_viewTransition: l
198
+ }), typeof d == "function" ? d(k) : d);
199
+ });
200
+ process.env.NODE_ENV !== "production" && (q.displayName = "NavLink");
201
+ const ge = /* @__PURE__ */ m.forwardRef((e, n) => {
202
+ let {
203
+ fetcherKey: r,
204
+ navigate: a,
205
+ reloadDocument: t,
206
+ replace: i,
207
+ state: o,
208
+ method: s = _,
209
+ action: u,
210
+ onSubmit: l,
211
+ relative: d,
212
+ preventScrollReset: h,
213
+ unstable_viewTransition: v
214
+ } = e, N = K(e, he), b = Re(), w = _e(u, {
215
+ relative: d
216
+ }), y = s.toLowerCase() === "get" ? "get" : "post", g = (c) => {
217
+ if (l && l(c), c.defaultPrevented)
218
+ return;
219
+ c.preventDefault();
220
+ let p = c.nativeEvent.submitter, f = (p == null ? void 0 : p.getAttribute("formmethod")) || s;
221
+ b(p || c.currentTarget, {
222
+ fetcherKey: r,
223
+ method: f,
224
+ navigate: a,
225
+ replace: i,
226
+ state: o,
227
+ relative: d,
228
+ preventScrollReset: h,
229
+ unstable_viewTransition: v
230
+ });
231
+ };
232
+ return /* @__PURE__ */ m.createElement("form", x({
233
+ ref: n,
234
+ method: y,
235
+ action: w,
236
+ onSubmit: t ? l : g
237
+ }, N));
238
+ });
239
+ process.env.NODE_ENV !== "production" && (ge.displayName = "Form");
240
+ process.env.NODE_ENV;
241
+ var T;
242
+ (function(e) {
243
+ e.UseScrollRestoration = "useScrollRestoration", e.UseSubmit = "useSubmit", e.UseSubmitFetcher = "useSubmitFetcher", e.UseFetcher = "useFetcher", e.useViewTransitionState = "useViewTransitionState";
244
+ })(T || (T = {}));
245
+ var W;
246
+ (function(e) {
247
+ e.UseFetcher = "useFetcher", e.UseFetchers = "useFetchers", e.UseScrollRestoration = "useScrollRestoration";
248
+ })(W || (W = {}));
249
+ function Ee(e) {
250
+ return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
251
+ }
252
+ function G(e) {
253
+ let n = m.useContext(Z);
254
+ return n || (process.env.NODE_ENV !== "production" ? S(!1, Ee(e)) : S(!1)), n;
255
+ }
256
+ function Se(e, n) {
257
+ let {
258
+ target: r,
259
+ replace: a,
260
+ state: t,
261
+ preventScrollReset: i,
262
+ relative: o,
263
+ unstable_viewTransition: s
264
+ } = n === void 0 ? {} : n, u = ee(), l = I(), d = D(e, {
265
+ relative: o
266
+ });
267
+ return m.useCallback((h) => {
268
+ if (ue(h, r)) {
269
+ h.preventDefault();
270
+ let v = a !== void 0 ? a : A(l) === A(d);
271
+ u(e, {
272
+ replace: v,
273
+ state: t,
274
+ preventScrollReset: i,
275
+ relative: o,
276
+ unstable_viewTransition: s
277
+ });
278
+ }
279
+ }, [l, u, d, a, t, r, e, i, o, s]);
280
+ }
281
+ function xe() {
282
+ if (typeof document > "u")
283
+ throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");
284
+ }
285
+ let Ne = 0, Ce = () => "__" + String(++Ne) + "__";
286
+ function Re() {
287
+ let {
288
+ router: e
289
+ } = G(T.UseSubmit), {
290
+ basename: n
291
+ } = m.useContext(P), r = te();
292
+ return m.useCallback(function(a, t) {
293
+ t === void 0 && (t = {}), xe();
294
+ let {
295
+ action: i,
296
+ method: o,
297
+ encType: s,
298
+ formData: u,
299
+ body: l
300
+ } = me(a, n);
301
+ if (t.navigate === !1) {
302
+ let d = t.fetcherKey || Ce();
303
+ e.fetch(d, r, t.action || i, {
304
+ preventScrollReset: t.preventScrollReset,
305
+ formData: u,
306
+ body: l,
307
+ formMethod: t.method || o,
308
+ formEncType: t.encType || s,
309
+ unstable_flushSync: t.unstable_flushSync
310
+ });
311
+ } else
312
+ e.navigate(t.action || i, {
313
+ preventScrollReset: t.preventScrollReset,
314
+ formData: u,
315
+ body: l,
316
+ formMethod: t.method || o,
317
+ formEncType: t.encType || s,
318
+ replace: t.replace,
319
+ state: t.state,
320
+ fromRouteId: r,
321
+ unstable_flushSync: t.unstable_flushSync,
322
+ unstable_viewTransition: t.unstable_viewTransition
323
+ });
324
+ }, [e, n, r]);
325
+ }
326
+ function _e(e, n) {
327
+ let {
328
+ relative: r
329
+ } = n === void 0 ? {} : n, {
330
+ basename: a
331
+ } = m.useContext(P), t = m.useContext(ne);
332
+ t || (process.env.NODE_ENV !== "production" ? S(!1, "useFormAction must be used inside a RouteContext") : S(!1));
333
+ let [i] = t.matches.slice(-1), o = x({}, D(e || ".", {
334
+ relative: r
335
+ })), s = I();
336
+ if (e == null) {
337
+ o.search = s.search;
338
+ let u = new URLSearchParams(o.search);
339
+ u.has("index") && u.get("index") === "" && (u.delete("index"), o.search = u.toString() ? "?" + u.toString() : "");
340
+ }
341
+ return (!e || e === ".") && i.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), a !== "/" && (o.pathname = o.pathname === "/" ? a : re([a, o.pathname])), A(o);
342
+ }
343
+ function Le(e, n) {
344
+ n === void 0 && (n = {});
345
+ let r = m.useContext(z);
346
+ r == null && (process.env.NODE_ENV !== "production" ? S(!1, "`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : S(!1));
347
+ let {
348
+ basename: a
349
+ } = G(T.useViewTransitionState), t = D(e, {
350
+ relative: n.relative
351
+ });
352
+ if (!r.isTransitioning)
353
+ return !1;
354
+ let i = E(r.currentLocation.pathname, a) || r.currentLocation.pathname, o = E(r.nextLocation.pathname, a) || r.nextLocation.pathname;
355
+ return M(t.pathname, o) != null || M(t.pathname, i) != null;
356
+ }
357
+ const Fe = ({
358
+ to: e,
359
+ params: n,
360
+ children: r,
361
+ className: a,
362
+ activeClassName: t,
363
+ style: i,
364
+ onClick: o,
365
+ state: s,
366
+ isDisabled: u
367
+ }) => {
368
+ const l = ae(e, n), d = (h) => {
369
+ if (u)
370
+ return h.preventDefault();
371
+ o && o();
372
+ };
373
+ return /* @__PURE__ */ Y.jsx(
374
+ q,
375
+ {
376
+ to: s ? { pathname: l } : l,
377
+ style: i,
378
+ state: s,
379
+ className: ({ isActive: h }) => h ? `${a} ${t}` : a,
380
+ onClick: d,
381
+ children: r
382
+ }
383
+ );
384
+ };
385
+ export {
386
+ Fe as default
387
+ };
@@ -0,0 +1,96 @@
1
+ import { j as a } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import { c as _ } from "../../index-BHf7G3IG.js";
3
+ import h from "../Label/Label.js";
4
+ import u from "../ValidationError/ValidationError.js";
5
+ import '../../Radio.css';const f = "_container_a9a9s_2", N = "_checkmark_a9a9s_2", b = "_inline_a9a9s_2", v = "_disabled_a9a9s_2", g = "_text_a9a9s_2", s = {
6
+ container: f,
7
+ checkmark: N,
8
+ inline: b,
9
+ disabled: v,
10
+ text: g
11
+ }, R = ({
12
+ name: i,
13
+ label: n,
14
+ isDisabled: t,
15
+ checked: c,
16
+ isInline: l,
17
+ onChange: r,
18
+ setContext: e,
19
+ suffixBtn: m,
20
+ ...x
21
+ }) => {
22
+ const d = (o) => {
23
+ e && e({ label: `${n}`, value: o.currentTarget.value }), r && r(o);
24
+ };
25
+ return /* @__PURE__ */ a.jsxs("div", { className: _("flex", s.container), "data-testid": "radio-container", children: [
26
+ /* @__PURE__ */ a.jsxs(
27
+ h,
28
+ {
29
+ className: _({
30
+ [s.inline]: l,
31
+ [s.disabled]: t
32
+ }),
33
+ name: i,
34
+ children: [
35
+ /* @__PURE__ */ a.jsx("span", { className: s.text, children: n }),
36
+ /* @__PURE__ */ a.jsx(
37
+ "input",
38
+ {
39
+ type: "radio",
40
+ "data-testid": "radio-input",
41
+ name: i,
42
+ disabled: t,
43
+ defaultChecked: c,
44
+ ...x,
45
+ onChange: d
46
+ }
47
+ ),
48
+ /* @__PURE__ */ a.jsx("span", { className: s.checkmark, "data-testid": "radio-checkmark" })
49
+ ]
50
+ }
51
+ ),
52
+ m
53
+ ] });
54
+ }, C = ({
55
+ name: i,
56
+ items: n,
57
+ value: t,
58
+ label: c,
59
+ isInline: l = !0,
60
+ setContext: r,
61
+ error: e,
62
+ className: m,
63
+ ...x
64
+ }) => /* @__PURE__ */ a.jsxs("div", { className: "form-group", "data-testid": "radiolist", children: [
65
+ c && /* @__PURE__ */ a.jsx(h, { children: c }),
66
+ /* @__PURE__ */ a.jsx(
67
+ "div",
68
+ {
69
+ className: _(s.container, m, {
70
+ [s.error]: e
71
+ }),
72
+ children: n.map(
73
+ ({ value: d, label: o, isDisabled: j, suffixBtn: k }, p) => /* @__PURE__ */ a.jsx(
74
+ R,
75
+ {
76
+ label: o,
77
+ name: i,
78
+ checked: t === d,
79
+ value: d,
80
+ isDisabled: j,
81
+ isInline: l,
82
+ setContext: r,
83
+ suffixBtn: k,
84
+ ...x
85
+ },
86
+ `${t}-${p}`
87
+ )
88
+ )
89
+ }
90
+ ),
91
+ e && /* @__PURE__ */ a.jsx(u, { ...e })
92
+ ] });
93
+ export {
94
+ C as RadioList,
95
+ R as default
96
+ };
@@ -0,0 +1,20 @@
1
+ import { j as r } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import p from "../Button/Button.js";
3
+ import { AppearanceButton as i } from "../../enums/appearance.js";
4
+ import '../../ResultError.css';const n = "_wrap_1dz1s_2", c = {
5
+ wrap: n
6
+ }, j = ({
7
+ title: t,
8
+ text: e,
9
+ image: a,
10
+ buttonText: s,
11
+ onClick: o
12
+ }) => /* @__PURE__ */ r.jsx("div", { className: c.wrap, "data-testid": "resulterror", children: /* @__PURE__ */ r.jsxs("div", { children: [
13
+ /* @__PURE__ */ r.jsx("h1", { children: t }),
14
+ /* @__PURE__ */ r.jsx("p", { children: e }),
15
+ /* @__PURE__ */ r.jsx("img", { src: a, alt: "Error" }),
16
+ s && /* @__PURE__ */ r.jsx(p, { onClick: o, appearance: i.DEFAULT, children: s })
17
+ ] }) });
18
+ export {
19
+ j as default
20
+ };
@@ -0,0 +1,23 @@
1
+ import { j as r } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import { c as e } from "../../index-BHf7G3IG.js";
3
+ import '../../ScrollContainer.css';const c = "_container_12r4s_2", i = {
4
+ container: c
5
+ }, d = ({
6
+ children: s,
7
+ maxHeight: t,
8
+ height: o,
9
+ className: a,
10
+ onScroll: n
11
+ }) => /* @__PURE__ */ r.jsx(
12
+ "div",
13
+ {
14
+ onScroll: n,
15
+ "data-testid": "scroll-container",
16
+ className: e(a, i.container),
17
+ style: { maxHeight: t, height: o },
18
+ children: s
19
+ }
20
+ );
21
+ export {
22
+ d as default
23
+ };