@okam/stack-ui 1.29.1 → 1.30.1

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 (395) hide show
  1. package/components/Accordion/components/AccordionItem.d.ts +1 -0
  2. package/components/Accordion/index.d.ts +2 -1
  3. package/components/Accordion/interface.d.ts +3 -2
  4. package/components/Alerts/components/AlertsCloseButton.d.ts +1 -1
  5. package/components/Alerts/index.d.ts +2 -1
  6. package/components/Alerts/interface.d.ts +4 -3
  7. package/components/Box/index.d.ts +3 -2
  8. package/components/Button/index.d.ts +8 -4
  9. package/components/Button/interface.d.ts +3 -2
  10. package/components/Calendar/index.d.ts +5 -1
  11. package/components/Calendar/interface.d.ts +2 -1
  12. package/components/Carousel/components/CarouselNavigationButton.d.ts +3 -3
  13. package/components/Date/index.d.ts +2 -1
  14. package/components/Date/interface.d.ts +2 -1
  15. package/components/Icon/index.d.ts +2 -1
  16. package/components/Icon/interface.d.ts +2 -1
  17. package/components/Lightbox/hooks/overlay/index.d.ts +75 -0
  18. package/components/Lightbox/index.d.ts +2 -1
  19. package/components/Lightbox/interface.d.ts +3 -2
  20. package/components/Menu/Menu.d.ts +2 -1
  21. package/components/Menu/interface.d.ts +5 -4
  22. package/components/Modal/index.d.ts +2 -1
  23. package/components/Modal/interface.d.ts +2 -1
  24. package/components/Popover/index.d.ts +5 -2
  25. package/components/Popover/interface.d.ts +3 -2
  26. package/components/ShareButton/index.d.ts +2 -1
  27. package/components/ShareButton/interface.d.ts +2 -2
  28. package/components/SidePanel/index.d.ts +3 -3
  29. package/components/SidePanel/interface.d.ts +5 -4
  30. package/components/Typography/index.d.ts +3 -2
  31. package/components/Video/index.d.ts +2 -1
  32. package/components/Video/interface.d.ts +2 -1
  33. package/components/WysiwygBlock/index.d.ts +2 -1
  34. package/components/WysiwygBlock/interface.d.ts +2 -1
  35. package/components/fields/Checkbox/Checkbox.interface.d.ts +2 -1
  36. package/components/fields/Checkbox/index.d.ts +2 -1
  37. package/components/fields/CheckboxGroup/index.d.ts +2 -1
  38. package/components/fields/CheckboxGroup/interface.d.ts +2 -1
  39. package/components/fields/DatePicker/index.d.ts +2 -1
  40. package/components/fields/DatePicker/interface.d.ts +2 -1
  41. package/components/fields/Radio/Radio.interface.d.ts +3 -2
  42. package/components/fields/Radio/index.d.ts +3 -2
  43. package/components/fields/RadioGroup/index.d.ts +2 -1
  44. package/components/fields/RadioGroup/interface.d.ts +2 -1
  45. package/components/fields/SearchField/index.d.ts +2 -1
  46. package/components/fields/SearchField/interface.d.ts +2 -1
  47. package/components/fields/Select/Select.d.ts +2 -1
  48. package/components/fields/Select/Select.interface.d.ts +3 -2
  49. package/components/fields/TextArea/index.d.ts +2 -1
  50. package/components/fields/TextInputField/interface.d.ts +3 -2
  51. package/index.d.ts +1 -0
  52. package/index.js +1 -1
  53. package/index.mjs +41 -38
  54. package/index10.js +1 -1
  55. package/index10.mjs +1 -0
  56. package/index100.js +1 -2
  57. package/index100.mjs +22 -21
  58. package/index101.js +2 -1
  59. package/index101.mjs +22 -63
  60. package/index102.js +1 -1
  61. package/index102.mjs +58 -24
  62. package/index103.js +1 -1
  63. package/index103.mjs +29 -52
  64. package/index104.js +1 -1
  65. package/index104.mjs +52 -4
  66. package/index105.js +1 -1
  67. package/index105.mjs +4 -11
  68. package/index106.js +1 -1
  69. package/index106.mjs +11 -14
  70. package/index107.js +1 -1
  71. package/index107.mjs +13 -22
  72. package/index108.js +1 -1
  73. package/index108.mjs +19 -19
  74. package/index109.js +1 -1
  75. package/index109.mjs +22 -38
  76. package/index11.js +1 -1
  77. package/index11.mjs +2 -2
  78. package/index110.js +1 -2
  79. package/index110.mjs +38 -12
  80. package/index111.js +2 -1
  81. package/index111.mjs +12 -7
  82. package/index112.js +1 -1
  83. package/index112.mjs +7 -21
  84. package/index113.js +1 -1
  85. package/index113.mjs +21 -38
  86. package/index114.js +1 -1
  87. package/index114.mjs +38 -49
  88. package/index115.js +1 -1
  89. package/index115.mjs +49 -40
  90. package/index116.js +1 -1
  91. package/index116.mjs +40 -13
  92. package/index117.js +1 -1
  93. package/index117.mjs +14 -26
  94. package/index118.js +1 -1
  95. package/index118.mjs +29 -18
  96. package/index119.js +1 -1
  97. package/index119.mjs +19 -8
  98. package/index120.js +1 -1
  99. package/index120.mjs +9 -30
  100. package/index121.js +1 -1
  101. package/index121.mjs +30 -15
  102. package/index122.js +1 -1
  103. package/index122.mjs +13 -15
  104. package/index123.js +1 -1
  105. package/index123.mjs +17 -21
  106. package/index124.js +1 -1
  107. package/index124.mjs +21 -11
  108. package/index125.js +1 -2
  109. package/index125.mjs +11 -22
  110. package/index126.js +2 -1
  111. package/index126.mjs +22 -12
  112. package/index127.js +1 -1
  113. package/index127.mjs +23 -23
  114. package/index128.js +1 -1
  115. package/index128.mjs +3 -3
  116. package/index13.js +1 -1
  117. package/index13.mjs +10 -9
  118. package/index130.mjs +6 -6
  119. package/index131.js +1 -1
  120. package/index131.mjs +12 -51
  121. package/index132.js +1 -1
  122. package/index132.mjs +49 -25
  123. package/index133.js +1 -1
  124. package/index133.mjs +25 -19
  125. package/index134.js +1 -1
  126. package/index134.mjs +17 -58
  127. package/index135.js +1 -1
  128. package/index135.mjs +194 -89
  129. package/index136.js +1 -1
  130. package/index136.mjs +63 -30
  131. package/index137.js +1 -1
  132. package/index137.mjs +136 -116
  133. package/index138.js +1 -1
  134. package/index138.mjs +118 -26
  135. package/index139.js +1 -1
  136. package/index139.mjs +212 -119
  137. package/index14.js +1 -1
  138. package/index14.mjs +3 -3
  139. package/index140.js +1 -1
  140. package/index140.mjs +187 -131
  141. package/index141.js +1 -1
  142. package/index141.mjs +69 -14
  143. package/index142.js +1 -1
  144. package/index142.mjs +248 -85
  145. package/index143.js +1 -1
  146. package/index143.mjs +93 -102
  147. package/index144.js +1 -1
  148. package/index144.mjs +174 -5
  149. package/index145.js +1 -1
  150. package/index145.mjs +84 -3
  151. package/index146.js +1 -1
  152. package/index146.mjs +56 -123
  153. package/index147.js +1 -1
  154. package/index147.mjs +125 -28
  155. package/index148.js +1 -1
  156. package/index148.mjs +113 -48
  157. package/index149.js +1 -1
  158. package/index149.mjs +119 -41
  159. package/index150.js +1 -1
  160. package/index150.mjs +71 -36
  161. package/index151.js +1 -1
  162. package/index151.mjs +105 -108
  163. package/index152.js +1 -1
  164. package/index152.mjs +52 -77
  165. package/index153.js +1 -1
  166. package/index153.mjs +93 -101
  167. package/index154.js +1 -1
  168. package/index154.mjs +71 -98
  169. package/index155.js +1 -1
  170. package/index155.mjs +50 -193
  171. package/index156.js +1 -1
  172. package/index156.mjs +91 -56
  173. package/index157.js +5 -1
  174. package/index157.mjs +75 -136
  175. package/index158.js +1 -1
  176. package/index158.mjs +1999 -107
  177. package/index159.js +1 -1
  178. package/index159.mjs +56 -214
  179. package/index16.js +1 -1
  180. package/index16.mjs +2 -2
  181. package/index160.js +1 -1
  182. package/index160.mjs +186 -188
  183. package/index161.js +1 -1
  184. package/index161.mjs +59 -67
  185. package/index162.js +1 -1
  186. package/index162.mjs +88 -252
  187. package/index163.js +1 -1
  188. package/index163.mjs +32 -96
  189. package/index164.js +1 -1
  190. package/index164.mjs +117 -170
  191. package/index165.js +1 -1
  192. package/index165.mjs +26 -83
  193. package/index166.js +1 -1
  194. package/index166.mjs +123 -57
  195. package/index167.js +1 -1
  196. package/index167.mjs +130 -122
  197. package/index168.js +1 -1
  198. package/index168.mjs +14 -116
  199. package/index169.js +1 -1
  200. package/index169.mjs +92 -119
  201. package/index170.js +1 -1
  202. package/index170.mjs +105 -71
  203. package/index171.js +1 -1
  204. package/index171.mjs +5 -110
  205. package/index172.js +1 -1
  206. package/index172.mjs +3 -52
  207. package/index173.js +1 -1
  208. package/index173.mjs +124 -92
  209. package/index174.js +1 -1
  210. package/index174.mjs +29 -70
  211. package/index175.js +1 -1
  212. package/index175.mjs +51 -56
  213. package/index176.js +1 -1
  214. package/index176.mjs +44 -99
  215. package/index177.js +1 -5
  216. package/index177.mjs +36 -79
  217. package/index178.js +1 -1
  218. package/index178.mjs +94 -1992
  219. package/index179.js +1 -1
  220. package/index179.mjs +78 -60
  221. package/index18.js +1 -1
  222. package/index18.mjs +7 -7
  223. package/index180.js +1 -1
  224. package/index180.mjs +95 -182
  225. package/index181.js +1 -1
  226. package/index181.mjs +98 -6
  227. package/index19.js +1 -1
  228. package/index19.mjs +2 -2
  229. package/index190.js +1 -1
  230. package/index190.mjs +5 -313
  231. package/index191.js +1 -1
  232. package/index191.mjs +327 -179
  233. package/index192.js +1 -1
  234. package/index192.mjs +183 -8
  235. package/index193.js +1 -1
  236. package/index193.mjs +7 -25
  237. package/index194.js +1 -1
  238. package/index194.mjs +26 -55
  239. package/index195.js +1 -1
  240. package/index195.mjs +55 -46
  241. package/index196.js +1 -1
  242. package/index196.mjs +45 -123
  243. package/index197.js +1 -1
  244. package/index197.mjs +110 -5
  245. package/index198.js +1 -1
  246. package/index198.mjs +31 -27
  247. package/index199.js +1 -1
  248. package/index199.mjs +6 -7
  249. package/index2.js +1 -1
  250. package/index2.mjs +51 -50
  251. package/index20.js +1 -1
  252. package/index20.mjs +1 -1
  253. package/index200.js +1 -1
  254. package/index200.mjs +28 -7
  255. package/index201.js +1 -1
  256. package/index201.mjs +7 -8
  257. package/index202.js +1 -1
  258. package/index202.mjs +6 -3
  259. package/index203.js +1 -1
  260. package/index203.mjs +7 -5
  261. package/index204.js +1 -1
  262. package/index204.mjs +4 -9
  263. package/index205.js +1 -0
  264. package/index205.mjs +8 -0
  265. package/index206.js +1 -0
  266. package/index206.mjs +12 -0
  267. package/index21.js +1 -1
  268. package/index21.mjs +8 -8
  269. package/index22.js +1 -1
  270. package/index22.mjs +2 -2
  271. package/index23.js +1 -1
  272. package/index23.mjs +40 -39
  273. package/index24.js +1 -1
  274. package/index24.mjs +45 -44
  275. package/index26.js +1 -1
  276. package/index26.mjs +28 -21
  277. package/index27.js +1 -1
  278. package/index27.mjs +12 -12
  279. package/index28.js +1 -1
  280. package/index28.mjs +6 -6
  281. package/index29.js +1 -1
  282. package/index29.mjs +1 -1
  283. package/index30.js +1 -1
  284. package/index30.mjs +14 -8
  285. package/index31.js +1 -1
  286. package/index31.mjs +18 -18
  287. package/index32.js +1 -1
  288. package/index32.mjs +1 -1
  289. package/index33.mjs +43 -43
  290. package/index34.js +1 -1
  291. package/index34.mjs +1 -1
  292. package/index35.js +1 -1
  293. package/index35.mjs +3 -3
  294. package/index36.mjs +10 -10
  295. package/index4.js +1 -1
  296. package/index4.mjs +3 -3
  297. package/index6.js +1 -1
  298. package/index6.mjs +47 -46
  299. package/index65.js +1 -1
  300. package/index65.mjs +1 -1
  301. package/index66.js +1 -1
  302. package/index66.mjs +2 -2
  303. package/index67.js +1 -1
  304. package/index67.mjs +1 -1
  305. package/index69.js +1 -1
  306. package/index69.mjs +1 -1
  307. package/index7.mjs +4 -4
  308. package/index70.js +1 -1
  309. package/index70.mjs +1 -1
  310. package/index71.js +1 -1
  311. package/index71.mjs +1 -1
  312. package/index72.js +2 -1
  313. package/index72.mjs +27 -2
  314. package/index73.js +1 -2
  315. package/index73.mjs +2 -9
  316. package/index74.js +1 -1
  317. package/index74.mjs +7 -6
  318. package/index75.js +1 -1
  319. package/index75.mjs +6 -6
  320. package/index76.js +1 -1
  321. package/index76.mjs +6 -6
  322. package/index77.js +2 -1
  323. package/index77.mjs +8 -25
  324. package/index78.js +1 -1
  325. package/index78.mjs +25 -2
  326. package/index79.js +1 -6
  327. package/index79.mjs +2 -94
  328. package/index8.js +1 -1
  329. package/index8.mjs +42 -23
  330. package/index80.js +6 -1
  331. package/index80.mjs +79 -54
  332. package/index81.js +1 -1
  333. package/index81.mjs +61 -33
  334. package/index82.js +1 -42
  335. package/index82.mjs +34 -67
  336. package/index83.js +42 -1
  337. package/index83.mjs +69 -154
  338. package/index84.js +1 -9
  339. package/index84.mjs +149 -47
  340. package/index85.js +9 -1
  341. package/index85.mjs +48 -36
  342. package/index86.js +1 -1
  343. package/index86.mjs +40 -8
  344. package/index87.js +1 -1
  345. package/index87.mjs +9 -31
  346. package/index88.js +1 -1
  347. package/index88.mjs +38 -6
  348. package/index89.js +1 -12
  349. package/index89.mjs +6 -40
  350. package/index9.js +1 -1
  351. package/index9.mjs +7 -7
  352. package/index90.js +12 -1
  353. package/index90.mjs +36 -25
  354. package/index91.js +1 -1
  355. package/index91.mjs +24 -8
  356. package/index92.js +1 -7
  357. package/index92.mjs +7 -13
  358. package/index93.js +6 -14
  359. package/index93.mjs +13 -65
  360. package/index94.js +15 -1
  361. package/index94.mjs +71 -7
  362. package/index95.js +1 -16
  363. package/index95.mjs +7 -25
  364. package/index96.js +16 -1
  365. package/index96.mjs +20 -37
  366. package/index97.js +1 -1
  367. package/index97.mjs +40 -43
  368. package/index98.js +1 -1
  369. package/index98.mjs +44 -47
  370. package/index99.js +1 -1
  371. package/index99.mjs +48 -17
  372. package/package.json +1 -1
  373. package/providers/Translation/index.d.ts +4 -0
  374. package/providers/Translation/interface.d.ts +16 -0
  375. package/theme/Accordion/index.d.ts +12 -12
  376. package/theme/Alerts/index.d.ts +22 -22
  377. package/theme/Box/index.d.ts +8 -8
  378. package/theme/Button/index.d.ts +2 -2
  379. package/theme/Calendar/index.d.ts +12 -12
  380. package/theme/Carousel/index.d.ts +11 -11
  381. package/theme/Checkbox/index.d.ts +8 -8
  382. package/theme/CheckboxGroup/index.d.ts +3 -3
  383. package/theme/DatePicker/index.d.ts +10 -9
  384. package/theme/Image/index.d.ts +1 -1
  385. package/theme/LightBox/index.d.ts +9 -9
  386. package/theme/Radio/index.d.ts +6 -6
  387. package/theme/RadioGroup/index.d.ts +3 -3
  388. package/theme/Search/index.d.ts +3 -3
  389. package/theme/ShareButton/index.d.ts +10 -10
  390. package/theme/SidePanel/index.d.ts +3 -3
  391. package/theme/TextArea/index.d.ts +2 -2
  392. package/theme/Typography/index.d.ts +2 -2
  393. package/transitions/ModalTransition.d.ts +3 -6
  394. package/transitions/RenderWithSlide.d.ts +3 -6
  395. package/transitions/SidePanelTransition.d.ts +3 -6
package/index137.mjs CHANGED
@@ -1,124 +1,144 @@
1
- import { createContext as O, useMemo as I, useContext as U, useState as f, useRef as T, useEffect as R } from "react";
2
- const D = {
3
- badInput: !1,
4
- customError: !1,
5
- patternMismatch: !1,
6
- rangeOverflow: !1,
7
- rangeUnderflow: !1,
8
- stepMismatch: !1,
9
- tooLong: !1,
10
- tooShort: !1,
11
- typeMismatch: !1,
12
- valueMissing: !1,
13
- valid: !0
14
- }, L = {
15
- ...D,
16
- customError: !0,
17
- valid: !1
18
- }, c = {
19
- isInvalid: !1,
20
- validationDetails: D,
21
- validationErrors: []
22
- }, B = O({}), h = "__formValidationState" + Date.now();
23
- function P(a) {
24
- if (a[h]) {
25
- let { realtimeValidation: e, displayValidation: t, updateValidation: i, resetValidation: o, commitValidation: l } = a[h];
26
- return {
27
- realtimeValidation: e,
28
- displayValidation: t,
29
- updateValidation: i,
30
- resetValidation: o,
31
- commitValidation: l
1
+ import { a as N } from "./index182.mjs";
2
+ import { n as S, d as T } from "./index183.mjs";
3
+ function q(Y) {
4
+ let {
5
+ swiper: e,
6
+ extendParams: y,
7
+ on: X,
8
+ emit: g
9
+ } = Y;
10
+ const L = N();
11
+ y({
12
+ mousewheel: {
13
+ enabled: !1,
14
+ releaseOnEdges: !1,
15
+ invert: !1,
16
+ forceToAxis: !1,
17
+ sensitivity: 1,
18
+ eventsTarget: "container",
19
+ thresholdDelta: null,
20
+ thresholdTime: null,
21
+ noMousewheelClass: "swiper-no-mousewheel"
22
+ }
23
+ }), e.mousewheel = {
24
+ enabled: !1
25
+ };
26
+ let c, w = T(), u;
27
+ const i = [];
28
+ function _(t) {
29
+ let o = 0, r = 0, a = 0, l = 0;
30
+ return "detail" in t && (r = t.detail), "wheelDelta" in t && (r = -t.wheelDelta / 120), "wheelDeltaY" in t && (r = -t.wheelDeltaY / 120), "wheelDeltaX" in t && (o = -t.wheelDeltaX / 120), "axis" in t && t.axis === t.HORIZONTAL_AXIS && (o = r, r = 0), a = o * 10, l = r * 10, "deltaY" in t && (l = t.deltaY), "deltaX" in t && (a = t.deltaX), t.shiftKey && !a && (a = l, l = 0), (a || l) && t.deltaMode && (t.deltaMode === 1 ? (a *= 40, l *= 40) : (a *= 800, l *= 800)), a && !o && (o = a < 1 ? -1 : 1), l && !r && (r = l < 1 ? -1 : 1), {
31
+ spinX: o,
32
+ spinY: r,
33
+ pixelX: a,
34
+ pixelY: l
32
35
  };
33
36
  }
34
- return Q(a);
35
- }
36
- function Q(a) {
37
- let { isInvalid: e, validationState: t, name: i, value: o, builtinValidation: l, validate: d, validationBehavior: n = "aria" } = a;
38
- t && (e || (e = t === "invalid"));
39
- let v = e !== void 0 ? {
40
- isInvalid: e,
41
- validationErrors: [],
42
- validationDetails: L
43
- } : null, V = I(() => C(Y(d, o)), [
44
- d,
45
- o
46
- ]);
47
- l != null && l.validationDetails.valid && (l = null);
48
- let s = U(B), A = I(() => i ? Array.isArray(i) ? i.flatMap((r) => S(s[r])) : S(s[i]) : [], [
49
- s,
50
- i
51
- ]), [M, _] = f(s), [x, m] = f(!1);
52
- s !== M && (_(s), m(!1));
53
- let $ = I(() => C(x ? [] : A), [
54
- x,
55
- A
56
- ]), g = T(c), [b, E] = f(c), u = T(c), w = () => {
57
- if (!F) return;
58
- p(!1);
59
- let r = V || l || g.current;
60
- y(r, u.current) || (u.current = r, E(r));
61
- }, [F, p] = f(!1);
62
- return R(w), {
63
- realtimeValidation: v || $ || V || l || c,
64
- displayValidation: n === "native" ? v || $ || b : v || $ || V || l || b,
65
- updateValidation(r) {
66
- n === "aria" && !y(b, r) ? E(r) : g.current = r;
67
- },
68
- resetValidation() {
69
- let r = c;
70
- y(r, u.current) || (u.current = r, E(r)), n === "native" && p(!1), m(!0);
71
- },
72
- commitValidation() {
73
- n === "native" && p(!0), m(!0);
37
+ function G() {
38
+ e.enabled && (e.mouseEntered = !0);
39
+ }
40
+ function O() {
41
+ e.enabled && (e.mouseEntered = !1);
42
+ }
43
+ function I(t) {
44
+ return e.params.mousewheel.thresholdDelta && t.delta < e.params.mousewheel.thresholdDelta || e.params.mousewheel.thresholdTime && T() - w < e.params.mousewheel.thresholdTime ? !1 : t.delta >= 6 && T() - w < 60 ? !0 : (t.direction < 0 ? (!e.isEnd || e.params.loop) && !e.animating && (e.slideNext(), g("scroll", t.raw)) : (!e.isBeginning || e.params.loop) && !e.animating && (e.slidePrev(), g("scroll", t.raw)), w = new L.Date().getTime(), !1);
45
+ }
46
+ function A(t) {
47
+ const s = e.params.mousewheel;
48
+ if (t.direction < 0) {
49
+ if (e.isEnd && !e.params.loop && s.releaseOnEdges)
50
+ return !0;
51
+ } else if (e.isBeginning && !e.params.loop && s.releaseOnEdges)
52
+ return !0;
53
+ return !1;
54
+ }
55
+ function E(t) {
56
+ let s = t, b = !0;
57
+ if (!e.enabled || t.target.closest(`.${e.params.mousewheel.noMousewheelClass}`)) return;
58
+ const f = e.params.mousewheel;
59
+ e.params.cssMode && s.preventDefault();
60
+ let o = e.el;
61
+ e.params.mousewheel.eventsTarget !== "container" && (o = document.querySelector(e.params.mousewheel.eventsTarget));
62
+ const r = o && o.contains(s.target);
63
+ if (!e.mouseEntered && !r && !f.releaseOnEdges) return !0;
64
+ s.originalEvent && (s = s.originalEvent);
65
+ let a = 0;
66
+ const l = e.rtlTranslate ? -1 : 1, d = _(s);
67
+ if (f.forceToAxis)
68
+ if (e.isHorizontal())
69
+ if (Math.abs(d.pixelX) > Math.abs(d.pixelY)) a = -d.pixelX * l;
70
+ else return !0;
71
+ else if (Math.abs(d.pixelY) > Math.abs(d.pixelX)) a = -d.pixelY;
72
+ else return !0;
73
+ else
74
+ a = Math.abs(d.pixelX) > Math.abs(d.pixelY) ? -d.pixelX * l : -d.pixelY;
75
+ if (a === 0) return !0;
76
+ f.invert && (a = -a);
77
+ let h = e.getTranslate() + a * f.sensitivity;
78
+ if (h >= e.minTranslate() && (h = e.minTranslate()), h <= e.maxTranslate() && (h = e.maxTranslate()), b = e.params.loop ? !0 : !(h === e.minTranslate() || h === e.maxTranslate()), b && e.params.nested && s.stopPropagation(), !e.params.freeMode || !e.params.freeMode.enabled) {
79
+ const n = {
80
+ time: T(),
81
+ delta: Math.abs(a),
82
+ direction: Math.sign(a),
83
+ raw: t
84
+ };
85
+ i.length >= 2 && i.shift();
86
+ const m = i.length ? i[i.length - 1] : void 0;
87
+ if (i.push(n), m ? (n.direction !== m.direction || n.delta > m.delta || n.time > m.time + 150) && I(n) : I(n), A(n))
88
+ return !0;
89
+ } else {
90
+ const n = {
91
+ time: T(),
92
+ delta: Math.abs(a),
93
+ direction: Math.sign(a)
94
+ }, m = u && n.time < u.time + 500 && n.delta <= u.delta && n.direction === u.direction;
95
+ if (!m) {
96
+ u = void 0;
97
+ let p = e.getTranslate() + a * f.sensitivity;
98
+ const C = e.isBeginning, B = e.isEnd;
99
+ if (p >= e.minTranslate() && (p = e.minTranslate()), p <= e.maxTranslate() && (p = e.maxTranslate()), e.setTransition(0), e.setTranslate(p), e.updateProgress(), e.updateActiveIndex(), e.updateSlidesClasses(), (!C && e.isBeginning || !B && e.isEnd) && e.updateSlidesClasses(), e.params.loop && e.loopFix({
100
+ direction: n.direction < 0 ? "next" : "prev",
101
+ byMousewheel: !0
102
+ }), e.params.freeMode.sticky) {
103
+ clearTimeout(c), c = void 0, i.length >= 15 && i.shift();
104
+ const M = i.length ? i[i.length - 1] : void 0, H = i[0];
105
+ if (i.push(n), M && (n.delta > M.delta || n.direction !== M.direction))
106
+ i.splice(0);
107
+ else if (i.length >= 15 && n.time - H.time < 500 && H.delta - n.delta >= 1 && n.delta <= 6) {
108
+ const P = a > 0 ? 0.8 : 0.2;
109
+ u = n, i.splice(0), c = S(() => {
110
+ e.slideToClosest(e.params.speed, !0, void 0, P);
111
+ }, 0);
112
+ }
113
+ c || (c = S(() => {
114
+ u = n, i.splice(0), e.slideToClosest(e.params.speed, !0, void 0, 0.5);
115
+ }, 500));
116
+ }
117
+ if (m || g("scroll", s), e.params.autoplay && e.params.autoplayDisableOnInteraction && e.autoplay.stop(), f.releaseOnEdges && (p === e.minTranslate() || p === e.maxTranslate()))
118
+ return !0;
119
+ }
74
120
  }
75
- };
76
- }
77
- function S(a) {
78
- return a ? Array.isArray(a) ? a : [
79
- a
80
- ] : [];
81
- }
82
- function Y(a, e) {
83
- if (typeof a == "function") {
84
- let t = a(e);
85
- if (t && typeof t != "boolean") return S(t);
121
+ return s.preventDefault ? s.preventDefault() : s.returnValue = !1, !1;
86
122
  }
87
- return [];
88
- }
89
- function C(a) {
90
- return a.length ? {
91
- isInvalid: !0,
92
- validationErrors: a,
93
- validationDetails: L
94
- } : null;
95
- }
96
- function y(a, e) {
97
- return a === e ? !0 : a && e && a.isInvalid === e.isInvalid && a.validationErrors.length === e.validationErrors.length && a.validationErrors.every((t, i) => t === e.validationErrors[i]) && Object.entries(a.validationDetails).every(([t, i]) => e.validationDetails[t] === i);
98
- }
99
- function k(...a) {
100
- let e = /* @__PURE__ */ new Set(), t = !1, i = {
101
- ...D
102
- };
103
- for (let d of a) {
104
- var o, l;
105
- for (let n of d.validationErrors) e.add(n);
106
- t || (t = d.isInvalid);
107
- for (let n in i) (o = i)[l = n] || (o[l] = d.validationDetails[n]);
123
+ function D(t) {
124
+ let s = e.el;
125
+ e.params.mousewheel.eventsTarget !== "container" && (s = document.querySelector(e.params.mousewheel.eventsTarget)), s[t]("mouseenter", G), s[t]("mouseleave", O), s[t]("wheel", E);
108
126
  }
109
- return i.valid = !t, {
110
- isInvalid: t,
111
- validationErrors: [
112
- ...e
113
- ],
114
- validationDetails: i
115
- };
127
+ function v() {
128
+ return e.params.cssMode ? (e.wrapperEl.removeEventListener("wheel", E), !0) : e.mousewheel.enabled ? !1 : (D("addEventListener"), e.mousewheel.enabled = !0, !0);
129
+ }
130
+ function x() {
131
+ return e.params.cssMode ? (e.wrapperEl.addEventListener(event, E), !0) : e.mousewheel.enabled ? (D("removeEventListener"), e.mousewheel.enabled = !1, !0) : !1;
132
+ }
133
+ X("init", () => {
134
+ !e.params.mousewheel.enabled && e.params.cssMode && x(), e.params.mousewheel.enabled && v();
135
+ }), X("destroy", () => {
136
+ e.params.cssMode && v(), e.mousewheel.enabled && x();
137
+ }), Object.assign(e.mousewheel, {
138
+ enable: v,
139
+ disable: x
140
+ });
116
141
  }
117
142
  export {
118
- c as DEFAULT_VALIDATION_RESULT,
119
- B as FormValidationContext,
120
- D as VALID_VALIDITY_STATE,
121
- k as mergeValidation,
122
- h as privateValidationStateProp,
123
- P as useFormValidationState
143
+ q as default
124
144
  };
package/index138.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react");function C(o,b,u){let[p,s]=l.useState(o||b),i=l.useRef(o!==void 0),e=o!==void 0;l.useEffect(()=>{let t=i.current;t!==e&&console.warn(`WARN: A component changed from ${t?"controlled":"uncontrolled"} to ${e?"controlled":"uncontrolled"}.`),i.current=e},[e]);let n=e?o:p,S=l.useCallback((t,...f)=>{let a=(r,...c)=>{u&&(Object.is(n,r)||u(r,...c)),e||(n=r)};typeof t=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),s((c,...m)=>{let d=t(e?n:c,...m);return a(d,...f),e?c:d})):(e||s(t),a(t,...f))},[e,n,u]);return[n,S]}exports.useControlledState=C;
1
+ "use strict";const k=require("./index184.js"),l=require("./index183.js");function w(h){let{swiper:a,extendParams:x,on:r,emit:d}=h;x({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),a.navigation={nextEl:null,prevEl:null};function m(i){let n;return i&&typeof i=="string"&&a.isElement&&(n=a.el.querySelector(i),n)?n:(i&&(typeof i=="string"&&(n=[...document.querySelectorAll(i)]),a.params.uniqueNavElements&&typeof i=="string"&&n.length>1&&a.el.querySelectorAll(i).length===1&&(n=a.el.querySelector(i))),i&&!n?i:n)}function p(i,n){const t=a.params.navigation;i=l.m(i),i.forEach(e=>{e&&(e.classList[n?"add":"remove"](...t.disabledClass.split(" ")),e.tagName==="BUTTON"&&(e.disabled=n),a.params.watchOverflow&&a.enabled&&e.classList[a.isLocked?"add":"remove"](t.lockClass))})}function o(){const{nextEl:i,prevEl:n}=a.navigation;if(a.params.loop){p(n,!1),p(i,!1);return}p(n,a.isBeginning&&!a.params.rewind),p(i,a.isEnd&&!a.params.rewind)}function u(i){i.preventDefault(),!(a.isBeginning&&!a.params.loop&&!a.params.rewind)&&(a.slidePrev(),d("navigationPrev"))}function E(i){i.preventDefault(),!(a.isEnd&&!a.params.loop&&!a.params.rewind)&&(a.slideNext(),d("navigationNext"))}function g(){const i=a.params.navigation;if(a.params.navigation=k.c(a,a.originalParams.navigation,a.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(i.nextEl||i.prevEl))return;let n=m(i.nextEl),t=m(i.prevEl);Object.assign(a.navigation,{nextEl:n,prevEl:t}),n=l.m(n),t=l.m(t);const e=(s,c)=>{s&&s.addEventListener("click",c==="next"?E:u),!a.enabled&&s&&s.classList.add(...i.lockClass.split(" "))};n.forEach(s=>e(s,"next")),t.forEach(s=>e(s,"prev"))}function v(){let{nextEl:i,prevEl:n}=a.navigation;i=l.m(i),n=l.m(n);const t=(e,s)=>{e.removeEventListener("click",s==="next"?E:u),e.classList.remove(...a.params.navigation.disabledClass.split(" "))};i.forEach(e=>t(e,"next")),n.forEach(e=>t(e,"prev"))}r("init",()=>{a.params.navigation.enabled===!1?b():(g(),o())}),r("toEdge fromEdge lock unlock",()=>{o()}),r("destroy",()=>{v()}),r("enable disable",()=>{let{nextEl:i,prevEl:n}=a.navigation;if(i=l.m(i),n=l.m(n),a.enabled){o();return}[...i,...n].filter(t=>!!t).forEach(t=>t.classList.add(a.params.navigation.lockClass))}),r("click",(i,n)=>{let{nextEl:t,prevEl:e}=a.navigation;t=l.m(t),e=l.m(e);const s=n.target;if(a.params.navigation.hideOnClick&&!e.includes(s)&&!t.includes(s)){if(a.pagination&&a.params.pagination&&a.params.pagination.clickable&&(a.pagination.el===s||a.pagination.el.contains(s)))return;let c;t.length?c=t[0].classList.contains(a.params.navigation.hiddenClass):e.length&&(c=e[0].classList.contains(a.params.navigation.hiddenClass)),d(c===!0?"navigationShow":"navigationHide"),[...t,...e].filter(f=>!!f).forEach(f=>f.classList.toggle(a.params.navigation.hiddenClass))}});const C=()=>{a.el.classList.remove(...a.params.navigation.navigationDisabledClass.split(" ")),g(),o()},b=()=>{a.el.classList.add(...a.params.navigation.navigationDisabledClass.split(" ")),v()};Object.assign(a.navigation,{enable:C,disable:b,update:o,init:g,destroy:v})}module.exports=w;
package/index138.mjs CHANGED
@@ -1,30 +1,122 @@
1
- import { useState as C, useRef as $, useEffect as S, useCallback as V } from "react";
2
- function w(o, d, c) {
3
- let [p, s] = C(o || d), u = $(o !== void 0), e = o !== void 0;
4
- S(() => {
5
- let t = u.current;
6
- t !== e && console.warn(`WARN: A component changed from ${t ? "controlled" : "uncontrolled"} to ${e ? "controlled" : "uncontrolled"}.`), u.current = e;
7
- }, [
8
- e
9
- ]);
10
- let n = e ? o : p, b = V((t, ...i) => {
11
- let f = (r, ...l) => {
12
- c && (Object.is(n, r) || c(r, ...l)), e || (n = r);
1
+ import { c as k } from "./index184.mjs";
2
+ import { m as l } from "./index183.mjs";
3
+ function y(h) {
4
+ let {
5
+ swiper: a,
6
+ extendParams: x,
7
+ on: r,
8
+ emit: p
9
+ } = h;
10
+ x({
11
+ navigation: {
12
+ nextEl: null,
13
+ prevEl: null,
14
+ hideOnClick: !1,
15
+ disabledClass: "swiper-button-disabled",
16
+ hiddenClass: "swiper-button-hidden",
17
+ lockClass: "swiper-button-lock",
18
+ navigationDisabledClass: "swiper-navigation-disabled"
19
+ }
20
+ }), a.navigation = {
21
+ nextEl: null,
22
+ prevEl: null
23
+ };
24
+ function m(i) {
25
+ let n;
26
+ return i && typeof i == "string" && a.isElement && (n = a.el.querySelector(i), n) ? n : (i && (typeof i == "string" && (n = [...document.querySelectorAll(i)]), a.params.uniqueNavElements && typeof i == "string" && n.length > 1 && a.el.querySelectorAll(i).length === 1 && (n = a.el.querySelector(i))), i && !n ? i : n);
27
+ }
28
+ function d(i, n) {
29
+ const t = a.params.navigation;
30
+ i = l(i), i.forEach((e) => {
31
+ e && (e.classList[n ? "add" : "remove"](...t.disabledClass.split(" ")), e.tagName === "BUTTON" && (e.disabled = n), a.params.watchOverflow && a.enabled && e.classList[a.isLocked ? "add" : "remove"](t.lockClass));
32
+ });
33
+ }
34
+ function o() {
35
+ const {
36
+ nextEl: i,
37
+ prevEl: n
38
+ } = a.navigation;
39
+ if (a.params.loop) {
40
+ d(n, !1), d(i, !1);
41
+ return;
42
+ }
43
+ d(n, a.isBeginning && !a.params.rewind), d(i, a.isEnd && !a.params.rewind);
44
+ }
45
+ function u(i) {
46
+ i.preventDefault(), !(a.isBeginning && !a.params.loop && !a.params.rewind) && (a.slidePrev(), p("navigationPrev"));
47
+ }
48
+ function E(i) {
49
+ i.preventDefault(), !(a.isEnd && !a.params.loop && !a.params.rewind) && (a.slideNext(), p("navigationNext"));
50
+ }
51
+ function g() {
52
+ const i = a.params.navigation;
53
+ if (a.params.navigation = k(a, a.originalParams.navigation, a.params.navigation, {
54
+ nextEl: "swiper-button-next",
55
+ prevEl: "swiper-button-prev"
56
+ }), !(i.nextEl || i.prevEl)) return;
57
+ let n = m(i.nextEl), t = m(i.prevEl);
58
+ Object.assign(a.navigation, {
59
+ nextEl: n,
60
+ prevEl: t
61
+ }), n = l(n), t = l(t);
62
+ const e = (s, c) => {
63
+ s && s.addEventListener("click", c === "next" ? E : u), !a.enabled && s && s.classList.add(...i.lockClass.split(" "));
13
64
  };
14
- typeof t == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), s((l, ...m) => {
15
- let a = t(e ? n : l, ...m);
16
- return f(a, ...i), e ? l : a;
17
- })) : (e || s(t), f(t, ...i));
18
- }, [
19
- e,
20
- n,
21
- c
22
- ]);
23
- return [
24
- n,
25
- b
26
- ];
65
+ n.forEach((s) => e(s, "next")), t.forEach((s) => e(s, "prev"));
66
+ }
67
+ function v() {
68
+ let {
69
+ nextEl: i,
70
+ prevEl: n
71
+ } = a.navigation;
72
+ i = l(i), n = l(n);
73
+ const t = (e, s) => {
74
+ e.removeEventListener("click", s === "next" ? E : u), e.classList.remove(...a.params.navigation.disabledClass.split(" "));
75
+ };
76
+ i.forEach((e) => t(e, "next")), n.forEach((e) => t(e, "prev"));
77
+ }
78
+ r("init", () => {
79
+ a.params.navigation.enabled === !1 ? b() : (g(), o());
80
+ }), r("toEdge fromEdge lock unlock", () => {
81
+ o();
82
+ }), r("destroy", () => {
83
+ v();
84
+ }), r("enable disable", () => {
85
+ let {
86
+ nextEl: i,
87
+ prevEl: n
88
+ } = a.navigation;
89
+ if (i = l(i), n = l(n), a.enabled) {
90
+ o();
91
+ return;
92
+ }
93
+ [...i, ...n].filter((t) => !!t).forEach((t) => t.classList.add(a.params.navigation.lockClass));
94
+ }), r("click", (i, n) => {
95
+ let {
96
+ nextEl: t,
97
+ prevEl: e
98
+ } = a.navigation;
99
+ t = l(t), e = l(e);
100
+ const s = n.target;
101
+ if (a.params.navigation.hideOnClick && !e.includes(s) && !t.includes(s)) {
102
+ if (a.pagination && a.params.pagination && a.params.pagination.clickable && (a.pagination.el === s || a.pagination.el.contains(s))) return;
103
+ let c;
104
+ t.length ? c = t[0].classList.contains(a.params.navigation.hiddenClass) : e.length && (c = e[0].classList.contains(a.params.navigation.hiddenClass)), p(c === !0 ? "navigationShow" : "navigationHide"), [...t, ...e].filter((f) => !!f).forEach((f) => f.classList.toggle(a.params.navigation.hiddenClass));
105
+ }
106
+ });
107
+ const C = () => {
108
+ a.el.classList.remove(...a.params.navigation.navigationDisabledClass.split(" ")), g(), o();
109
+ }, b = () => {
110
+ a.el.classList.add(...a.params.navigation.navigationDisabledClass.split(" ")), v();
111
+ };
112
+ Object.assign(a.navigation, {
113
+ enable: C,
114
+ disable: b,
115
+ update: o,
116
+ init: g,
117
+ destroy: v
118
+ });
27
119
  }
28
120
  export {
29
- w as useControlledState
121
+ y as default
30
122
  };
package/index139.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index140.js"),l=require("./index131.js"),d=require("./index141.js"),f=require("./index142.js"),u=require("./index143.js"),y=require("./index144.js");function m(s){let t=typeof s[0]=="object"?s.shift():new f.GregorianCalendar,e;if(typeof s[0]=="string")e=s.shift();else{let a=t.getEras();e=a[a.length-1]}let r=s.shift(),n=s.shift(),h=s.shift();return[t,e,r,n,h]}var p=new WeakMap;class c{copy(){return this.era?new c(this.calendar,this.era,this.year,this.month,this.day):new c(this.calendar,this.year,this.month,this.day)}add(t){return i.add(this,t)}subtract(t){return i.subtract(this,t)}set(t){return i.set(this,t)}cycle(t,e,r){return i.cycleDate(this,t,e,r)}toDate(t){return u.toDate(this,t)}toString(){return d.dateToString(this)}compare(t){return l.compareDate(this,t)}constructor(...t){y._class_private_field_init(this,p,{writable:!0,value:void 0});let[e,r,n,h,a]=m(t);this.calendar=e,this.era=r,this.year=n,this.month=h,this.day=a,i.constrain(this)}}var v=new WeakMap;class o{copy(){return this.era?new o(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new o(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return i.add(this,t)}subtract(t){return i.subtract(this,t)}set(t){return i.set(i.setTime(this,t),t)}cycle(t,e,r){switch(t){case"era":case"year":case"month":case"day":return i.cycleDate(this,t,e,r);default:return i.cycleTime(this,t,e,r)}}toDate(t,e){return u.toDate(this,t,e)}toString(){return d.dateTimeToString(this)}compare(t){let e=l.compareDate(this,t);return e===0?l.compareTime(this,u.toCalendarDateTime(t)):e}constructor(...t){y._class_private_field_init(this,v,{writable:!0,value:void 0});let[e,r,n,h,a]=m(t);this.calendar=e,this.era=r,this.year=n,this.month=h,this.day=a,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,i.constrain(this)}}exports.CalendarDate=c;exports.CalendarDateTime=o;
1
+ "use strict";const $=require("./index185.js"),O=require("./index184.js"),f=require("./index183.js");function q(D){let{swiper:e,extendParams:H,on:m,emit:v}=D;const d="swiper-pagination";H({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:a=>a,formatFractionTotal:a=>a,bulletClass:`${d}-bullet`,bulletActiveClass:`${d}-bullet-active`,modifierClass:`${d}-`,currentClass:`${d}-current`,totalClass:`${d}-total`,hiddenClass:`${d}-hidden`,progressbarFillClass:`${d}-progressbar-fill`,progressbarOppositeClass:`${d}-progressbar-opposite`,clickableClass:`${d}-clickable`,lockClass:`${d}-lock`,horizontalClass:`${d}-horizontal`,verticalClass:`${d}-vertical`,paginationDisabledClass:`${d}-disabled`}}),e.pagination={el:null,bullets:[]};let b,u=0;function k(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function x(a,s){const{bulletActiveClass:i}=e.params.pagination;a&&(a=a[`${s==="prev"?"previous":"next"}ElementSibling`],a&&(a.classList.add(`${i}-${s}`),a=a[`${s==="prev"?"previous":"next"}ElementSibling`],a&&a.classList.add(`${i}-${s}-${s}`)))}function I(a){const s=a.target.closest($.c(e.params.pagination.bulletClass));if(!s)return;a.preventDefault();const i=f.g(s)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===i)return;e.slideToLoop(i)}else e.slideTo(i)}function h(){const a=e.rtl,s=e.params.pagination;if(k())return;let i=e.pagination.el;i=f.m(i);let t,c;const C=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,z=e.params.loop?Math.ceil(C/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(c=e.previousRealIndex||0,t=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(t=e.snapIndex,c=e.previousSnapIndex):(c=e.previousIndex||0,t=e.activeIndex||0),s.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const l=e.pagination.bullets;let g,p,L;if(s.dynamicBullets&&(b=f.f(l[0],e.isHorizontal()?"width":"height"),i.forEach(n=>{n.style[e.isHorizontal()?"width":"height"]=`${b*(s.dynamicMainBullets+4)}px`}),s.dynamicMainBullets>1&&c!==void 0&&(u+=t-(c||0),u>s.dynamicMainBullets-1?u=s.dynamicMainBullets-1:u<0&&(u=0)),g=Math.max(t-u,0),p=g+(Math.min(l.length,s.dynamicMainBullets)-1),L=(p+g)/2),l.forEach(n=>{const r=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(o=>`${s.bulletActiveClass}${o}`)].map(o=>typeof o=="string"&&o.includes(" ")?o.split(" "):o).flat();n.classList.remove(...r)}),i.length>1)l.forEach(n=>{const r=f.g(n);r===t?n.classList.add(...s.bulletActiveClass.split(" ")):e.isElement&&n.setAttribute("part","bullet"),s.dynamicBullets&&(r>=g&&r<=p&&n.classList.add(...`${s.bulletActiveClass}-main`.split(" ")),r===g&&x(n,"prev"),r===p&&x(n,"next"))});else{const n=l[t];if(n&&n.classList.add(...s.bulletActiveClass.split(" ")),e.isElement&&l.forEach((r,o)=>{r.setAttribute("part",o===t?"bullet-active":"bullet")}),s.dynamicBullets){const r=l[g],o=l[p];for(let y=g;y<=p;y+=1)l[y]&&l[y].classList.add(...`${s.bulletActiveClass}-main`.split(" "));x(r,"prev"),x(o,"next")}}if(s.dynamicBullets){const n=Math.min(l.length,s.dynamicMainBullets+4),r=(b*n-b)/2-L*b,o=a?"right":"left";l.forEach(y=>{y.style[e.isHorizontal()?o:"top"]=`${r}px`})}}i.forEach((l,g)=>{if(s.type==="fraction"&&(l.querySelectorAll($.c(s.currentClass)).forEach(p=>{p.textContent=s.formatFractionCurrent(t+1)}),l.querySelectorAll($.c(s.totalClass)).forEach(p=>{p.textContent=s.formatFractionTotal(z)})),s.type==="progressbar"){let p;s.progressbarOpposite?p=e.isHorizontal()?"vertical":"horizontal":p=e.isHorizontal()?"horizontal":"vertical";const L=(t+1)/z;let n=1,r=1;p==="horizontal"?n=L:r=L,l.querySelectorAll($.c(s.progressbarFillClass)).forEach(o=>{o.style.transform=`translate3d(0,0,0) scaleX(${n}) scaleY(${r})`,o.style.transitionDuration=`${e.params.speed}ms`})}s.type==="custom"&&s.renderCustom?(l.innerHTML=s.renderCustom(e,t+1,z),g===0&&v("paginationRender",l)):(g===0&&v("paginationRender",l),v("paginationUpdate",l)),e.params.watchOverflow&&e.enabled&&l.classList[e.isLocked?"add":"remove"](s.lockClass)})}function B(){const a=e.params.pagination;if(k())return;const s=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length;let i=e.pagination.el;i=f.m(i);let t="";if(a.type==="bullets"){let c=e.params.loop?Math.ceil(s/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&c>s&&(c=s);for(let C=0;C<c;C+=1)a.renderBullet?t+=a.renderBullet.call(e,C,a.bulletClass):t+=`<${a.bulletElement} ${e.isElement?'part="bullet"':""} class="${a.bulletClass}"></${a.bulletElement}>`}a.type==="fraction"&&(a.renderFraction?t=a.renderFraction.call(e,a.currentClass,a.totalClass):t=`<span class="${a.currentClass}"></span> / <span class="${a.totalClass}"></span>`),a.type==="progressbar"&&(a.renderProgressbar?t=a.renderProgressbar.call(e,a.progressbarFillClass):t=`<span class="${a.progressbarFillClass}"></span>`),e.pagination.bullets=[],i.forEach(c=>{a.type!=="custom"&&(c.innerHTML=t||""),a.type==="bullets"&&e.pagination.bullets.push(...c.querySelectorAll($.c(a.bulletClass)))}),a.type!=="custom"&&v("paginationRender",i[0])}function A(){e.params.pagination=O.c(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const a=e.params.pagination;if(!a.el)return;let s;typeof a.el=="string"&&e.isElement&&(s=e.el.querySelector(a.el)),!s&&typeof a.el=="string"&&(s=[...document.querySelectorAll(a.el)]),s||(s=a.el),!(!s||s.length===0)&&(e.params.uniqueNavElements&&typeof a.el=="string"&&Array.isArray(s)&&s.length>1&&(s=[...e.el.querySelectorAll(a.el)],s.length>1&&(s=s.filter(i=>f.a(i,".swiper")[0]===e.el)[0])),Array.isArray(s)&&s.length===1&&(s=s[0]),Object.assign(e.pagination,{el:s}),s=f.m(s),s.forEach(i=>{a.type==="bullets"&&a.clickable&&i.classList.add(...(a.clickableClass||"").split(" ")),i.classList.add(a.modifierClass+a.type),i.classList.add(e.isHorizontal()?a.horizontalClass:a.verticalClass),a.type==="bullets"&&a.dynamicBullets&&(i.classList.add(`${a.modifierClass}${a.type}-dynamic`),u=0,a.dynamicMainBullets<1&&(a.dynamicMainBullets=1)),a.type==="progressbar"&&a.progressbarOpposite&&i.classList.add(a.progressbarOppositeClass),a.clickable&&i.addEventListener("click",I),e.enabled||i.classList.add(a.lockClass)}))}function M(){const a=e.params.pagination;if(k())return;let s=e.pagination.el;s&&(s=f.m(s),s.forEach(i=>{i.classList.remove(a.hiddenClass),i.classList.remove(a.modifierClass+a.type),i.classList.remove(e.isHorizontal()?a.horizontalClass:a.verticalClass),a.clickable&&(i.classList.remove(...(a.clickableClass||"").split(" ")),i.removeEventListener("click",I))})),e.pagination.bullets&&e.pagination.bullets.forEach(i=>i.classList.remove(...a.bulletActiveClass.split(" ")))}m("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const a=e.params.pagination;let{el:s}=e.pagination;s=f.m(s),s.forEach(i=>{i.classList.remove(a.horizontalClass,a.verticalClass),i.classList.add(e.isHorizontal()?a.horizontalClass:a.verticalClass)})}),m("init",()=>{e.params.pagination.enabled===!1?S():(A(),B(),h())}),m("activeIndexChange",()=>{typeof e.snapIndex>"u"&&h()}),m("snapIndexChange",()=>{h()}),m("snapGridLengthChange",()=>{B(),h()}),m("destroy",()=>{M()}),m("enable disable",()=>{let{el:a}=e.pagination;a&&(a=f.m(a),a.forEach(s=>s.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),m("lock unlock",()=>{h()}),m("click",(a,s)=>{const i=s.target,t=f.m(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&t&&t.length>0&&!i.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&i===e.navigation.nextEl||e.navigation.prevEl&&i===e.navigation.prevEl))return;const c=t[0].classList.contains(e.params.pagination.hiddenClass);v(c===!0?"paginationShow":"paginationHide"),t.forEach(C=>C.classList.toggle(e.params.pagination.hiddenClass))}});const P=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:a}=e.pagination;a&&(a=f.m(a),a.forEach(s=>s.classList.remove(e.params.pagination.paginationDisabledClass))),A(),B(),h()},S=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:a}=e.pagination;a&&(a=f.m(a),a.forEach(s=>s.classList.add(e.params.pagination.paginationDisabledClass))),M()};Object.assign(e.pagination,{enable:P,disable:S,render:B,update:h,init:A,destroy:M})}module.exports=q;