@ashtuka/react-lib 1.0.39 → 1.0.42

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 (166) hide show
  1. package/README.md +13 -2
  2. package/dist/chunks/LoadAbleImg-jaQDlIaY.mjs +75 -0
  3. package/dist/chunks/Service-uGKXRZVE.mjs +47 -0
  4. package/dist/chunks/breakpoints-BOwHOeQN.mjs +8 -0
  5. package/dist/chunks/file-C_N83pgK.mjs +5 -0
  6. package/dist/chunks/index-BDjvzGbZ.mjs +44 -0
  7. package/dist/chunks/spinner-By2573Fq.mjs +10 -0
  8. package/dist/components/LoadAbleImg/LoadAbleImg.d.ts +1 -1
  9. package/dist/constants/breakpoints.d.ts +1 -0
  10. package/dist/hooks/index.d.ts +2 -0
  11. package/dist/hooks/index.es.js +7 -3
  12. package/dist/hooks/useBreakPoint-C-91njOc.mjs +13 -0
  13. package/dist/hooks/useBreakPoint.d.ts +24 -0
  14. package/dist/hooks/useOutsideClick-DPN2gHf5.mjs +15 -0
  15. package/dist/hooks/useOutsideClick.d.ts +22 -0
  16. package/dist/index.d.ts +14 -0
  17. package/dist/index.es.js +18 -4
  18. package/dist/modules/AuthModule/AuthModule-wq1Xt6Op.mjs +1001 -0
  19. package/dist/modules/AuthModule/AuthModule.css +1 -0
  20. package/dist/modules/AuthModule/AuthModule.d.ts +3 -0
  21. package/dist/modules/AuthModule/AuthModule.types.d.ts +82 -0
  22. package/dist/modules/AuthModule/ButtonSpinner/ButtonSpinner.d.ts +2 -0
  23. package/dist/modules/AuthModule/EmailSent/EmailSent.d.ts +9 -0
  24. package/dist/modules/AuthModule/ErrorMessage/ErrorMessage.d.ts +11 -0
  25. package/dist/modules/AuthModule/InputItem/InputItem.d.ts +16 -0
  26. package/dist/modules/AuthModule/InputItem/PhoneInput.d.ts +13 -0
  27. package/dist/modules/AuthModule/LoginForm/LoginForm.d.ts +12 -0
  28. package/dist/modules/AuthModule/OtpInputItem/OtpInputItem.d.ts +17 -0
  29. package/dist/modules/AuthModule/PasswordRestoreForm/PasswordRestoreForm.d.ts +12 -0
  30. package/dist/modules/AuthModule/PrivacyPolicy/PrivacyPolicy.d.ts +6 -0
  31. package/dist/modules/AuthModule/RegistrationForm/RegistrationForm.d.ts +7 -0
  32. package/dist/modules/AuthModule/SocialBlock/SocialBlock.d.ts +10 -0
  33. package/dist/modules/AuthModule/Tabs/Tabs.d.ts +10 -0
  34. package/dist/modules/AuthModule/index.d.ts +2 -0
  35. package/dist/modules/AuthModule/index.es.js +4 -0
  36. package/dist/modules/AuthModule/localization.d.ts +96 -0
  37. package/dist/modules/AuthModule/translation.d.ts +98 -0
  38. package/dist/modules/AuthModule/utils/formValueCheck.d.ts +3 -0
  39. package/dist/modules/AuthModule/utils/getErrorDescriptionKey.d.ts +3 -0
  40. package/dist/modules/AuthModule/utils/getFormData.d.ts +4 -0
  41. package/dist/modules/AuthModule/utils/getProductDataExtraVarValue.d.ts +3 -0
  42. package/dist/modules/AuthModule/utils/getRegexPattern.d.ts +3 -0
  43. package/dist/modules/AuthModule/utils/handleKeyDown.d.ts +3 -0
  44. package/dist/modules/AuthModule/utils/inputClearError.d.ts +4 -0
  45. package/dist/modules/AuthModule/utils/inputValueCheck.d.ts +4 -0
  46. package/dist/modules/AuthModule/utils/isAppleDevice.d.ts +2 -0
  47. package/dist/modules/AuthModule/utils/isFormHasError.d.ts +3 -0
  48. package/dist/modules/AuthModule/utils/parseRequestError.d.ts +7 -0
  49. package/dist/modules/AuthModule/utils/phoneMaskHandler.d.ts +2 -0
  50. package/dist/modules/CrumbsModule/Crumb/Crumb.d.ts +8 -0
  51. package/dist/modules/CrumbsModule/Crumb/index.d.ts +1 -0
  52. package/dist/modules/CrumbsModule/CrumbsModule-BQIxJcqN.mjs +79 -0
  53. package/dist/modules/CrumbsModule/CrumbsModule.css +1 -0
  54. package/dist/modules/CrumbsModule/CrumbsModule.d.ts +2 -0
  55. package/dist/modules/CrumbsModule/CrumbsModule.types.d.ts +8 -0
  56. package/dist/modules/CrumbsModule/HiddenCrumbs/HiddenCrumbs.d.ts +6 -0
  57. package/dist/modules/CrumbsModule/HiddenCrumbs/index.d.ts +1 -0
  58. package/dist/modules/CrumbsModule/index.d.ts +2 -0
  59. package/dist/modules/CrumbsModule/index.es.js +4 -0
  60. package/dist/modules/DiyaModule/DesktopContent.d.ts +6 -0
  61. package/dist/modules/DiyaModule/DesktopTitle.d.ts +6 -0
  62. package/dist/modules/DiyaModule/DiyaLink.d.ts +7 -0
  63. package/dist/modules/DiyaModule/DiyaModule-CR7O-AA3.mjs +2159 -0
  64. package/dist/modules/DiyaModule/DiyaModule.css +1 -0
  65. package/dist/modules/DiyaModule/DiyaModule.d.ts +3 -0
  66. package/dist/modules/DiyaModule/DiyaModule.types.d.ts +16 -0
  67. package/dist/modules/DiyaModule/DownloadDiya.d.ts +6 -0
  68. package/dist/modules/DiyaModule/Loader.d.ts +6 -0
  69. package/dist/modules/DiyaModule/Qr.d.ts +8 -0
  70. package/dist/modules/DiyaModule/TimeOver.d.ts +6 -0
  71. package/dist/modules/DiyaModule/Timer.d.ts +8 -0
  72. package/dist/modules/DiyaModule/UpdateBtn.d.ts +7 -0
  73. package/dist/modules/DiyaModule/index.d.ts +2 -0
  74. package/dist/modules/DiyaModule/index.es.js +4 -0
  75. package/dist/modules/DiyaModule/utils/isMobDevice.d.ts +1 -0
  76. package/dist/modules/ErrorPaymentModule/ErrorPaymentModule-CyboRcvA.mjs +58 -0
  77. package/dist/modules/ErrorPaymentModule/ErrorPaymentModule.css +1 -0
  78. package/dist/modules/ErrorPaymentModule/ErrorPaymentModule.d.ts +3 -0
  79. package/dist/modules/ErrorPaymentModule/ErrorPaymentModule.types.d.ts +26 -0
  80. package/dist/modules/ErrorPaymentModule/Header/Header.d.ts +6 -0
  81. package/dist/modules/ErrorPaymentModule/Header/index.d.ts +2 -0
  82. package/dist/modules/ErrorPaymentModule/Nav/Nav.d.ts +6 -0
  83. package/dist/modules/ErrorPaymentModule/Nav/index.d.ts +2 -0
  84. package/dist/modules/ErrorPaymentModule/Picture/Picture.d.ts +5 -0
  85. package/dist/modules/ErrorPaymentModule/Picture/index.d.ts +2 -0
  86. package/dist/modules/ErrorPaymentModule/index.d.ts +2 -0
  87. package/dist/modules/ErrorPaymentModule/index.es.js +4 -0
  88. package/dist/modules/FooterV2Module/FooterV2Module-Bk6XRHqm.mjs +279 -0
  89. package/dist/modules/FooterV2Module/FooterV2Module.css +1 -1
  90. package/dist/modules/FooterV2Module/index.es.js +1 -1
  91. package/dist/modules/FooterV2Module/utils/index.d.ts +0 -1
  92. package/dist/modules/HeaderV5Module/Auth/Auth.d.ts +19 -0
  93. package/dist/modules/HeaderV5Module/Banner/Banner.d.ts +8 -0
  94. package/dist/modules/HeaderV5Module/HeaderV5Module-B9tK4bOZ.mjs +576 -0
  95. package/dist/modules/HeaderV5Module/HeaderV5Module.css +1 -0
  96. package/dist/modules/HeaderV5Module/HeaderV5Module.d.ts +2 -0
  97. package/dist/modules/HeaderV5Module/HeaderV5Module.types.d.ts +74 -0
  98. package/dist/modules/HeaderV5Module/Lang/Lang.d.ts +7 -0
  99. package/dist/modules/HeaderV5Module/Logo/Logo.d.ts +7 -0
  100. package/dist/modules/HeaderV5Module/Menu/Menu.d.ts +13 -0
  101. package/dist/modules/HeaderV5Module/Menu/MenuItemList/MenuItemList.d.ts +7 -0
  102. package/dist/modules/HeaderV5Module/Menu/MenuItemList/index.d.ts +2 -0
  103. package/dist/modules/HeaderV5Module/Menu/Tabs/Tabs.d.ts +20 -0
  104. package/dist/modules/HeaderV5Module/MenuBtn/MenuBtn.d.ts +10 -0
  105. package/dist/modules/HeaderV5Module/Phone/Phone.d.ts +1 -0
  106. package/dist/modules/HeaderV5Module/index.d.ts +2 -0
  107. package/dist/modules/HeaderV5Module/index.es.js +4 -0
  108. package/dist/modules/HeaderV5Module/useHeader.d.ts +10 -0
  109. package/dist/modules/HeaderV5Module/utils/bodyScrollHandler.d.ts +2 -0
  110. package/dist/modules/HeaderV5Module/utils/getParamFromCookie.d.ts +2 -0
  111. package/dist/modules/HeaderV5Module/utils/setCookieLocale.d.ts +3 -0
  112. package/dist/modules/HeaderV5Module/utils/setCookieParam.d.ts +2 -0
  113. package/dist/modules/LoadAbleImg/LoadAbleImg.css +1 -0
  114. package/dist/modules/OtpModule/ConditionsBlock/ConditionsBlock.d.ts +11 -0
  115. package/dist/modules/OtpModule/ConditionsBlock/index.d.ts +1 -0
  116. package/dist/modules/OtpModule/Item/Item.d.ts +11 -0
  117. package/dist/modules/OtpModule/Item/index.d.ts +1 -0
  118. package/dist/modules/OtpModule/Navigation/Navigation.d.ts +9 -0
  119. package/dist/modules/OtpModule/Navigation/index.d.ts +1 -0
  120. package/dist/modules/OtpModule/NotConfirmPopup/NotConfirmPopup.d.ts +9 -0
  121. package/dist/modules/OtpModule/NotConfirmPopup/index.d.ts +1 -0
  122. package/dist/modules/OtpModule/OtpModule-C_J1fNer.mjs +394 -0
  123. package/dist/modules/OtpModule/OtpModule.css +1 -0
  124. package/dist/modules/OtpModule/OtpModule.d.ts +2 -0
  125. package/dist/modules/OtpModule/OtpModule.types.d.ts +56 -0
  126. package/dist/modules/OtpModule/OtpPopup/OtpPopup.d.ts +9 -0
  127. package/dist/modules/OtpModule/OtpPopup/index.d.ts +1 -0
  128. package/dist/modules/OtpModule/index.d.ts +2 -0
  129. package/dist/modules/OtpModule/index.es.js +4 -0
  130. package/dist/modules/OtpModule/localization.d.ts +33 -0
  131. package/dist/modules/OtpModule/utils/setOtpStyleConfig.d.ts +3 -0
  132. package/dist/modules/PageLoaderModule/PageLoaderModule-qw6Twqhc.mjs +61 -0
  133. package/dist/modules/PageLoaderModule/index.es.js +1 -1
  134. package/dist/modules/SuccessPaymentModule/Header/Header.d.ts +6 -0
  135. package/dist/modules/SuccessPaymentModule/Header/index.d.ts +2 -0
  136. package/dist/modules/SuccessPaymentModule/InfoList/InfoList.d.ts +8 -0
  137. package/dist/modules/SuccessPaymentModule/InfoList/index.d.ts +2 -0
  138. package/dist/modules/SuccessPaymentModule/Nav/Nav.d.ts +6 -0
  139. package/dist/modules/SuccessPaymentModule/Nav/index.d.ts +2 -0
  140. package/dist/modules/SuccessPaymentModule/Picture/Picture.d.ts +5 -0
  141. package/dist/modules/SuccessPaymentModule/Picture/index.d.ts +2 -0
  142. package/dist/modules/SuccessPaymentModule/Referral/Referral.d.ts +6 -0
  143. package/dist/modules/SuccessPaymentModule/Referral/index.d.ts +2 -0
  144. package/dist/modules/SuccessPaymentModule/Referral/localization.d.ts +7 -0
  145. package/dist/modules/SuccessPaymentModule/SuccessPaymentModule-BizFQek6.mjs +126 -0
  146. package/dist/modules/SuccessPaymentModule/SuccessPaymentModule.css +1 -0
  147. package/dist/modules/SuccessPaymentModule/SuccessPaymentModule.d.ts +2 -0
  148. package/dist/modules/SuccessPaymentModule/SuccessPaymentModule.types.d.ts +36 -0
  149. package/dist/modules/SuccessPaymentModule/index.d.ts +2 -0
  150. package/dist/modules/SuccessPaymentModule/index.es.js +4 -0
  151. package/dist/services/AuthService.d.ts +16 -0
  152. package/dist/services/DesignerService.d.ts +7 -0
  153. package/dist/services/LayoutService.d.ts +1 -1
  154. package/dist/services/StrapiService.d.ts +7 -0
  155. package/dist/services/utils/getStrapiHost.d.ts +2 -0
  156. package/dist/types/Designer.d.ts +28 -0
  157. package/dist/types/index.d.ts +0 -1
  158. package/dist/utils/getAbsUrl-C3tTvhge.mjs +9 -0
  159. package/dist/utils/getAbsUrl.d.ts +2 -0
  160. package/dist/utils/index.d.ts +1 -0
  161. package/dist/utils/index.es.js +4 -2
  162. package/package.json +16 -4
  163. package/dist/modules/FooterV2Module/FooterV2Module-Cd4z2v8y.mjs +0 -387
  164. package/dist/modules/FooterV2Module/utils/getAbsUrl.d.ts +0 -3
  165. package/dist/modules/PageLoaderModule/PageLoaderModule-D6yGXr6Z.mjs +0 -100
  166. package/dist/types/Header.d.ts +0 -34
package/README.md CHANGED
@@ -2,5 +2,16 @@
2
2
 
3
3
  React-бібліотека компонентів (для навчання)
4
4
  Поточні обмеження:
5
- - модуль, призначений для експорту, повинен лежати в теці modules у своїй власній паці з назвою, що закінчується на Modules
6
- - наразі не реалізована можливість використовувати один модуль у середині іншого (при build не буде теки shared, де буде вказано правильний порядок імпортів. Наразі в нас плоска структура entry point)
5
+ - модуль, призначений для експорту, повинен лежати в теці modules у своїй власній паці з назвою, що закінчується на Module
6
+ - наразі не реалізована можливість використовувати один модуль у середині іншого (при build не буде теки shared, де буде вказано правильний порядок імпортів. В нас плоска структура entry point)
7
+ - якщо модуль використовує якийсь компонент з папки components то необхідно явно імпортувати scss файл цього компонента у scss файлі модуля який використовує цей компонент. Кейс коли компонент має більше ніж один scss файл не тестувався. По можливості модуль має бути повністю автономним і все йому необхідне має інкапсулювати у собі.
8
+
9
+
10
+ Якщо додали новий модуль, то перед build необхідно викликати npm run updBuildConfig
11
+ Потрібно подивитися, що попадає у фінальну збірку, яка використовує цю бібліотеку
12
+
13
+ короткостроково
14
+ розібратися з варнінгами в консолі (поки gpt нічого путнього не рекомендує )
15
+ The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
16
+ Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
17
+ Передивитися модулі на предмет використання svg icon як посилання в тезі img (переробити на ReactComponent)
@@ -0,0 +1,75 @@
1
+ import { S as I, g as f } from "./Service-uGKXRZVE.mjs";
2
+ import { jsx as a, jsxs as L } from "react/jsx-runtime";
3
+ import { useState as p, useRef as u, useEffect as y } from "react";
4
+ import { a as S } from "../hooks/useOnScreen-CpqVO1-u.mjs";
5
+ const v = f(), x = "/api";
6
+ class T extends I {
7
+ constructor() {
8
+ super(v, x);
9
+ }
10
+ async fetchHeaderData() {
11
+ return this.request("/menu-v3/new/root", {});
12
+ }
13
+ async fetchFooterData() {
14
+ return this.request("/menu/footer/root", {});
15
+ }
16
+ }
17
+ const H = "_loadAbleImg_container_1ie9c_1", N = "_loadAbleImg_containerLoaded_1ie9c_30", R = "_loadAbleImg_image_1ie9c_34", j = "_loadAbleImg_imageLoaded_1ie9c_42", e = {
18
+ loadAbleImg_container: H,
19
+ loadAbleImg_containerLoaded: N,
20
+ loadAbleImg_image: R,
21
+ loadAbleImg_imageLoaded: j
22
+ }, h = ({
23
+ src: o,
24
+ srcWebp: d = "",
25
+ alt: m = "",
26
+ onLoad: b = () => {
27
+ },
28
+ width: t = "100%",
29
+ height: s = "100%"
30
+ }) => {
31
+ const [l, c] = p(!1), n = u(null), i = u(null), r = S(i);
32
+ y(() => {
33
+ var _;
34
+ r && (_ = n.current) != null && _.complete && c(!0);
35
+ }, [r]);
36
+ const g = () => {
37
+ c(!0), b();
38
+ }, A = d ? /* @__PURE__ */ L("picture", { children: [
39
+ /* @__PURE__ */ a("source", { srcSet: d, type: "image/webp" }),
40
+ /* @__PURE__ */ a(
41
+ "img",
42
+ {
43
+ ref: n,
44
+ src: o,
45
+ alt: m,
46
+ style: { width: t, height: s },
47
+ className: l ? e.loadAbleImg_imageLoaded : e.loadAbleImg_image,
48
+ onLoad: g
49
+ }
50
+ )
51
+ ] }) : /* @__PURE__ */ a(
52
+ "img",
53
+ {
54
+ ref: n,
55
+ src: o,
56
+ alt: m,
57
+ style: { width: t, height: s },
58
+ className: l ? e.loadAbleImg_imageLoaded : e.loadAbleImg_image,
59
+ onLoad: g
60
+ }
61
+ );
62
+ return /* @__PURE__ */ a(
63
+ "div",
64
+ {
65
+ ref: i,
66
+ style: { width: t, height: s },
67
+ className: l ? e.loadAbleImg_containerLoaded : e.loadAbleImg_container,
68
+ children: r && A
69
+ }
70
+ );
71
+ };
72
+ export {
73
+ h as L,
74
+ T as a
75
+ };
@@ -0,0 +1,47 @@
1
+ var S = Object.defineProperty;
2
+ var g = (o, s, r) => s in o ? S(o, s, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[s] = r;
3
+ var n = (o, s, r) => g(o, typeof s != "symbol" ? s + "" : s, r);
4
+ import m from "axios";
5
+ const d = () => ["localhost", "test.polis.ua", "polisua-dev.svc.cluster.local"].some((s) => window.location.hostname.includes(s)) ? "https://test.polis.ua" : "https://polis.ua";
6
+ class E {
7
+ constructor(s, r) {
8
+ n(this, "BASE_PATH");
9
+ n(this, "HOST");
10
+ this.BASE_PATH = r, this.HOST = s;
11
+ }
12
+ async request(s, r) {
13
+ let e = `${this.HOST}${this.BASE_PATH}${s}`;
14
+ const {
15
+ method: a = "GET",
16
+ data: c,
17
+ params: i,
18
+ headers: l
19
+ } = r;
20
+ if (i) {
21
+ const t = new URL(e), u = new URLSearchParams({ ...i });
22
+ t.search = u.toString(), e = t.toString();
23
+ }
24
+ const h = {
25
+ url: e.toString(),
26
+ method: a,
27
+ data: c,
28
+ headers: l
29
+ };
30
+ try {
31
+ return (await m.request(h)).data;
32
+ } catch (t) {
33
+ throw console.error(`API Error on ${a} ${s}:`, t), new Error(
34
+ JSON.stringify({
35
+ message: "Request failed",
36
+ endpoint: s,
37
+ method: a,
38
+ originalError: t instanceof Error ? t.message : String(t)
39
+ })
40
+ );
41
+ }
42
+ }
43
+ }
44
+ export {
45
+ E as S,
46
+ d as g
47
+ };
@@ -0,0 +1,8 @@
1
+ const s = 320, o = 768, t = 992, a = 1200, c = 1400;
2
+ export {
3
+ t as L,
4
+ o as M,
5
+ s as S,
6
+ c as X,
7
+ a
8
+ };
@@ -0,0 +1,5 @@
1
+ import * as C from "react";
2
+ const t = (e) => /* @__PURE__ */ C.createElement("svg", { width: 16, height: 20, viewBox: "0 0 16 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ C.createElement("path", { d: "M10 0L16 6V18C16 18.5304 15.7893 19.0391 15.4142 19.4142C15.0391 19.7893 14.5304 20 14 20H2C1.46957 20 0.960859 19.7893 0.585786 19.4142C0.210714 19.0391 0 18.5304 0 18V2C0 1.46957 0.210714 0.960859 0.585786 0.585786C0.960859 0.210714 1.46957 0 2 0H10ZM14 18V7H9V2H2V18H14ZM6.92 10.31C6.68 9.54 6.15 7.08 7.55 7.04C8.95 7 8.03 10.16 8.03 10.16C8.42 11.65 10.05 12.72 10.05 12.72C10.55 12.57 13.4 12.24 13 13.72C12.57 15.2 9.5 13.81 9.5 13.81C7.55 13.95 6.09 14.47 6.09 14.47C4.96 16.58 3.64 17.5 3.1 16.61C2.43 15.5 5.23 14.07 5.23 14.07C6.68 11.72 6.9 10.35 6.92 10.31ZM7.57 11.15C7.17 12.45 6.37 13.84 6.37 13.84C7.22 13.5 9.08 13.11 9.08 13.11C7.94 12.11 7.59 11.16 7.57 11.15ZM10.71 13.32C10.71 13.32 12.46 13.97 12.5 13.71C12.57 13.44 11.17 13.2 10.71 13.32ZM5.05 14.81C4.28 15.11 3.54 16.39 3.72 16.39C3.9 16.4 4.63 15.79 5.05 14.81ZM7.57 9.26C7.57 9.21 8 7.58 7.57 7.53C7.27 7.5 7.56 9.22 7.57 9.26Z", fill: "#2D2B2B" }));
3
+ export {
4
+ t as S
5
+ };
@@ -0,0 +1,44 @@
1
+ function c(n) {
2
+ return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
3
+ }
4
+ var f = { exports: {} };
5
+ /*!
6
+ Copyright (c) 2018 Jed Watson.
7
+ Licensed under the MIT License (MIT), see
8
+ http://jedwatson.github.io/classnames
9
+ */
10
+ (function(n) {
11
+ (function() {
12
+ var i = {}.hasOwnProperty;
13
+ function s() {
14
+ for (var t = "", r = 0; r < arguments.length; r++) {
15
+ var e = arguments[r];
16
+ e && (t = o(t, u(e)));
17
+ }
18
+ return t;
19
+ }
20
+ function u(t) {
21
+ if (typeof t == "string" || typeof t == "number")
22
+ return t;
23
+ if (typeof t != "object")
24
+ return "";
25
+ if (Array.isArray(t))
26
+ return s.apply(null, t);
27
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
28
+ return t.toString();
29
+ var r = "";
30
+ for (var e in t)
31
+ i.call(t, e) && t[e] && (r = o(r, e));
32
+ return r;
33
+ }
34
+ function o(t, r) {
35
+ return r ? t ? t + " " + r : t + r : t;
36
+ }
37
+ n.exports ? (s.default = s, n.exports = s) : window.classNames = s;
38
+ })();
39
+ })(f);
40
+ var a = f.exports;
41
+ const p = /* @__PURE__ */ c(a);
42
+ export {
43
+ p as c
44
+ };
@@ -0,0 +1,10 @@
1
+ import * as e from "react";
2
+ const r = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", style: {
3
+ margin: "auto",
4
+ background: "none",
5
+ display: "block",
6
+ shapeRendering: "auto"
7
+ }, width: "170px", height: "170px", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid", ...t }, /* @__PURE__ */ e.createElement("circle", { cx: 50, cy: 50, r: 30, strokeWidth: 2, stroke: "#0a994a", strokeDasharray: "47.12388980384689 47.12388980384689", fill: "none", strokeLinecap: "round" }, /* @__PURE__ */ e.createElement("animateTransform", { attributeName: "transform", type: "rotate", dur: "1.4285714285714284s", repeatCount: "indefinite", keyTimes: "0;1", values: "0 50 50;360 50 50" })), /* @__PURE__ */ e.createElement("circle", { cx: 50, cy: 50, r: 27, strokeWidth: 2, stroke: "#EB5757", strokeDasharray: "42.411500823462205 42.411500823462205", strokeDashoffset: 42.411500823462205, fill: "none", strokeLinecap: "round" }, /* @__PURE__ */ e.createElement("animateTransform", { attributeName: "transform", type: "rotate", dur: "1.4285714285714284s", repeatCount: "indefinite", keyTimes: "0;1", values: "0 50 50;-360 50 50" })));
8
+ export {
9
+ r as S
10
+ };
@@ -6,4 +6,4 @@ export interface ILoadableImage {
6
6
  height?: string;
7
7
  onLoad?(): void;
8
8
  }
9
- export declare function LoadableImg(props: ILoadableImage): import("react/jsx-runtime").JSX.Element;
9
+ export declare const LoadableImg: ({ src, srcWebp, alt, onLoad, width, height, }: ILoadableImage) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ export declare const S = 320;
1
2
  export declare const SM = 576;
2
3
  export declare const MD = 768;
3
4
  export declare const LG = 992;
@@ -1,2 +1,4 @@
1
1
  export { default as useDevice } from './useDevice';
2
2
  export { default as useOnScreen } from './useOnScreen';
3
+ export { default as useOutsideClick } from './useOutsideClick';
4
+ export { default as useBreakPoint } from './useBreakPoint';
@@ -1,5 +1,9 @@
1
- import { u as a, a as r } from "./useOnScreen-CpqVO1-u.mjs";
1
+ import { u as r, a as u } from "./useOnScreen-CpqVO1-u.mjs";
2
+ import { u as a } from "./useOutsideClick-DPN2gHf5.mjs";
3
+ import { u as i } from "./useBreakPoint-C-91njOc.mjs";
2
4
  export {
3
- a as useDevice,
4
- r as useOnScreen
5
+ i as useBreakPoint,
6
+ r as useDevice,
7
+ u as useOnScreen,
8
+ a as useOutsideClick
5
9
  };
@@ -0,0 +1,13 @@
1
+ import { useState as r, useEffect as h } from "react";
2
+ const o = (t) => {
3
+ const [n, s] = r(!1);
4
+ return h(() => {
5
+ const e = window.matchMedia(`(max-width: ${t}px)`);
6
+ s(e.matches);
7
+ const a = (c) => s(c.matches);
8
+ return e.addEventListener("change", a), () => e.removeEventListener("change", a);
9
+ }, [t]), n;
10
+ };
11
+ export {
12
+ o as u
13
+ };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Хук визначає, чи відповідає поточна ширина вікна браузера
3
+ * умові `max-width` для заданого брейкпоінта.
4
+ *
5
+ * Використовує `window.matchMedia`, тому працює так само,
6
+ * як CSS media-query `(max-width: Npx)`.
7
+ *
8
+ * @param breakpoint - Максимальна ширина вікна браузера в пікселях (включно),
9
+ * при якій хук повертає `true`.
10
+ *
11
+ * @returns true, якщо ширина вікна менша або дорівнює `breakpoint`,
12
+ * інакше false.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const isMobile = useBreakPoint(768);
17
+ *
18
+ * if (isMobile) {
19
+ * console.log('Користувач на мобільному пристрої');
20
+ * }
21
+ * ```
22
+ */
23
+ declare const useBreakPoint: (breakpoint: number) => boolean;
24
+ export default useBreakPoint;
@@ -0,0 +1,15 @@
1
+ import { useEffect as s } from "react";
2
+ function r(t, i) {
3
+ s(() => {
4
+ const n = (c) => {
5
+ const o = t == null ? void 0 : t.current;
6
+ !o || o.contains(c == null ? void 0 : c.target) || i(c);
7
+ };
8
+ return document.addEventListener("click", n), () => {
9
+ document.removeEventListener("click", n);
10
+ };
11
+ }, [t, i]);
12
+ }
13
+ export {
14
+ r as u
15
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Хук відслідковує кліки поза зазначеним елементом і викликає заданий обробник.
3
+ *
4
+ * @param ref - Ref-об’єкт елемента, за межами якого потрібно відслідковувати кліки.
5
+ * @param handler - Функція, яка буде викликана при кліку поза елементом.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const ref = useRef<HTMLDivElement>(null);
10
+ * const [isOpen, setOpen] = useState(false);
11
+ *
12
+ * useOutsideClick(ref, () => setOpen(false));
13
+ *
14
+ * return (
15
+ * <div ref={ref}>
16
+ * {isOpen && <div>Вміст модального вікна</div>}
17
+ * </div>
18
+ * );
19
+ * ```
20
+ */
21
+ import { RefObject } from 'react';
22
+ export default function useOutsideClick<T extends HTMLElement = HTMLElement>(ref: RefObject<T | null>, handler: (event: Event) => void): void;
package/dist/index.d.ts CHANGED
@@ -2,3 +2,17 @@ export { PageLoaderModule } from './modules/PageLoaderModule';
2
2
  export type { PageLoaderModuleProps } from './modules/PageLoaderModule';
3
3
  export { FooterV2Module } from './modules/FooterV2Module';
4
4
  export type { FooterV2ModuleProps } from './modules/FooterV2Module';
5
+ export { HeaderV5Module } from './modules/HeaderV5Module';
6
+ export type { HeaderV5ModuleProps } from './modules/HeaderV5Module';
7
+ export { CrumbsModule } from './modules/CrumbsModule';
8
+ export type { CrumbsModuleProps } from './modules/CrumbsModule';
9
+ export { SuccessPaymentModule } from './modules/SuccessPaymentModule';
10
+ export type { SuccessPaymentModuleProps } from './modules/SuccessPaymentModule';
11
+ export { ErrorPaymentModule } from './modules/ErrorPaymentModule';
12
+ export type { ErrorPaymentModuleProps } from './modules/ErrorPaymentModule';
13
+ export { DiyaModule } from './modules/DiyaModule';
14
+ export type { DiyaModuleProps } from './modules/DiyaModule';
15
+ export { OtpModule } from './modules/OtpModule';
16
+ export type { OtpModuleProps } from './modules/OtpModule';
17
+ export { AuthModule } from './modules/AuthModule';
18
+ export type { AuthModuleProps } from './modules/AuthModule';
package/dist/index.es.js CHANGED
@@ -1,6 +1,20 @@
1
- import { P as r } from "./modules/PageLoaderModule/PageLoaderModule-D6yGXr6Z.mjs";
2
- import { F as d } from "./modules/FooterV2Module/FooterV2Module-Cd4z2v8y.mjs";
1
+ import { P as r } from "./modules/PageLoaderModule/PageLoaderModule-qw6Twqhc.mjs";
2
+ import { F as t } from "./modules/FooterV2Module/FooterV2Module-Bk6XRHqm.mjs";
3
+ import { H as s } from "./modules/HeaderV5Module/HeaderV5Module-B9tK4bOZ.mjs";
4
+ import { C as d } from "./modules/CrumbsModule/CrumbsModule-BQIxJcqN.mjs";
5
+ import { S as f } from "./modules/SuccessPaymentModule/SuccessPaymentModule-BizFQek6.mjs";
6
+ import { E as x } from "./modules/ErrorPaymentModule/ErrorPaymentModule-CyboRcvA.mjs";
7
+ import { D as P } from "./modules/DiyaModule/DiyaModule-CR7O-AA3.mjs";
8
+ import { O as c } from "./modules/OtpModule/OtpModule-C_J1fNer.mjs";
9
+ import { A } from "./modules/AuthModule/AuthModule-wq1Xt6Op.mjs";
3
10
  export {
4
- d as FooterV2Module,
5
- r as PageLoaderModule
11
+ A as AuthModule,
12
+ d as CrumbsModule,
13
+ P as DiyaModule,
14
+ x as ErrorPaymentModule,
15
+ t as FooterV2Module,
16
+ s as HeaderV5Module,
17
+ c as OtpModule,
18
+ r as PageLoaderModule,
19
+ f as SuccessPaymentModule
6
20
  };