@okam/stack-ui 1.29.0 → 1.30.0

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 (413) 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 +2 -1
  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/attributes.d.ts +2 -0
  34. package/components/WysiwygBlock/index.d.ts +2 -1
  35. package/components/WysiwygBlock/interface.d.ts +2 -1
  36. package/components/fields/Checkbox/Checkbox.interface.d.ts +2 -1
  37. package/components/fields/Checkbox/index.d.ts +2 -1
  38. package/components/fields/CheckboxGroup/index.d.ts +2 -1
  39. package/components/fields/CheckboxGroup/interface.d.ts +2 -1
  40. package/components/fields/DatePicker/index.d.ts +2 -1
  41. package/components/fields/DatePicker/interface.d.ts +2 -1
  42. package/components/fields/Radio/Radio.interface.d.ts +3 -2
  43. package/components/fields/Radio/index.d.ts +3 -2
  44. package/components/fields/RadioGroup/index.d.ts +2 -1
  45. package/components/fields/RadioGroup/interface.d.ts +2 -1
  46. package/components/fields/SearchField/index.d.ts +2 -1
  47. package/components/fields/SearchField/interface.d.ts +2 -1
  48. package/components/fields/Select/Select.d.ts +2 -1
  49. package/components/fields/Select/Select.interface.d.ts +3 -2
  50. package/components/fields/TextArea/index.d.ts +2 -1
  51. package/components/fields/TextInputField/interface.d.ts +3 -2
  52. package/index.d.ts +1 -0
  53. package/index.js +1 -1
  54. package/index.mjs +41 -38
  55. package/index100.js +1 -2
  56. package/index100.mjs +22 -21
  57. package/index101.js +2 -1
  58. package/index101.mjs +22 -63
  59. package/index102.js +1 -1
  60. package/index102.mjs +58 -24
  61. package/index103.js +1 -1
  62. package/index103.mjs +29 -4
  63. package/index104.js +1 -1
  64. package/index104.mjs +52 -11
  65. package/index105.js +1 -1
  66. package/index105.mjs +4 -14
  67. package/index106.js +1 -1
  68. package/index106.mjs +11 -23
  69. package/index107.js +1 -1
  70. package/index107.mjs +13 -22
  71. package/index108.js +1 -1
  72. package/index108.mjs +23 -39
  73. package/index109.js +1 -2
  74. package/index109.mjs +22 -12
  75. package/index11.js +1 -1
  76. package/index11.mjs +2 -2
  77. package/index110.js +1 -1
  78. package/index110.mjs +38 -7
  79. package/index111.js +2 -1
  80. package/index111.mjs +12 -21
  81. package/index112.js +1 -1
  82. package/index112.mjs +7 -38
  83. package/index113.js +1 -1
  84. package/index113.mjs +20 -48
  85. package/index114.js +1 -1
  86. package/index114.mjs +38 -40
  87. package/index115.js +1 -1
  88. package/index115.mjs +47 -11
  89. package/index116.js +1 -1
  90. package/index116.mjs +41 -26
  91. package/index117.js +1 -1
  92. package/index117.mjs +14 -20
  93. package/index118.js +1 -1
  94. package/index118.mjs +30 -8
  95. package/index119.js +1 -1
  96. package/index119.mjs +20 -30
  97. package/index120.js +1 -1
  98. package/index120.mjs +8 -14
  99. package/index121.js +1 -1
  100. package/index121.mjs +29 -16
  101. package/index122.js +1 -1
  102. package/index122.mjs +15 -21
  103. package/index123.js +1 -1
  104. package/index123.mjs +17 -11
  105. package/index124.js +1 -2
  106. package/index124.mjs +20 -21
  107. package/index125.js +1 -1
  108. package/index125.mjs +11 -12
  109. package/index126.js +2 -1
  110. package/index126.mjs +22 -46
  111. package/index127.js +1 -1
  112. package/index127.mjs +12 -241
  113. package/index128.js +1 -2
  114. package/index128.mjs +46 -13
  115. package/index129.js +1 -1
  116. package/index129.mjs +239 -28
  117. package/index13.js +1 -1
  118. package/index13.mjs +8 -5
  119. package/index130.js +2 -1
  120. package/index130.mjs +13 -51
  121. package/index131.js +1 -1
  122. package/index131.mjs +30 -27
  123. package/index132.js +1 -1
  124. package/index132.mjs +49 -19
  125. package/index133.js +1 -1
  126. package/index133.mjs +26 -61
  127. package/index134.js +1 -1
  128. package/index134.mjs +17 -91
  129. package/index135.js +1 -1
  130. package/index135.mjs +59 -29
  131. package/index136.js +1 -1
  132. package/index136.mjs +90 -117
  133. package/index137.js +1 -1
  134. package/index137.mjs +32 -26
  135. package/index138.js +1 -1
  136. package/index138.mjs +118 -121
  137. package/index139.js +1 -1
  138. package/index139.mjs +27 -134
  139. package/index14.js +1 -1
  140. package/index14.mjs +3 -3
  141. package/index140.js +1 -1
  142. package/index140.mjs +122 -12
  143. package/index141.js +1 -1
  144. package/index141.mjs +131 -92
  145. package/index142.js +1 -1
  146. package/index142.mjs +12 -104
  147. package/index143.js +1 -1
  148. package/index143.mjs +95 -5
  149. package/index144.js +1 -1
  150. package/index144.mjs +106 -3
  151. package/index145.js +1 -1
  152. package/index145.mjs +5 -125
  153. package/index146.js +1 -1
  154. package/index146.mjs +3 -29
  155. package/index147.js +1 -1
  156. package/index147.mjs +113 -39
  157. package/index148.js +1 -1
  158. package/index148.mjs +19 -34
  159. package/index149.js +1 -1
  160. package/index149.mjs +40 -26
  161. package/index150.js +1 -1
  162. package/index150.mjs +29 -98
  163. package/index151.js +1 -1
  164. package/index151.mjs +28 -68
  165. package/index152.js +1 -1
  166. package/index152.mjs +90 -78
  167. package/index153.js +1 -1
  168. package/index153.mjs +78 -98
  169. package/index154.js +1 -1
  170. package/index154.mjs +101 -199
  171. package/index155.js +1 -1
  172. package/index155.mjs +98 -65
  173. package/index156.js +1 -1
  174. package/index156.mjs +185 -127
  175. package/index157.js +1 -1
  176. package/index157.mjs +54 -109
  177. package/index158.js +1 -1
  178. package/index158.mjs +126 -202
  179. package/index159.js +1 -1
  180. package/index159.mjs +104 -175
  181. package/index16.js +1 -1
  182. package/index16.mjs +2 -2
  183. package/index160.js +1 -1
  184. package/index160.mjs +208 -60
  185. package/index161.js +1 -1
  186. package/index161.mjs +178 -246
  187. package/index162.js +1 -1
  188. package/index162.mjs +63 -91
  189. package/index163.js +1 -1
  190. package/index163.mjs +250 -166
  191. package/index164.js +1 -1
  192. package/index164.mjs +91 -78
  193. package/index165.js +1 -1
  194. package/index165.mjs +170 -54
  195. package/index166.js +1 -1
  196. package/index166.mjs +72 -114
  197. package/index167.js +1 -1
  198. package/index167.mjs +51 -109
  199. package/index168.js +1 -1
  200. package/index168.mjs +112 -108
  201. package/index169.js +1 -1
  202. package/index169.mjs +109 -65
  203. package/index170.js +1 -1
  204. package/index170.mjs +117 -105
  205. package/index171.js +1 -1
  206. package/index171.mjs +68 -48
  207. package/index172.js +1 -1
  208. package/index172.mjs +108 -91
  209. package/index173.js +1 -1
  210. package/index173.mjs +37 -55
  211. package/index174.js +1 -1
  212. package/index174.mjs +80 -43
  213. package/index175.js +1 -1
  214. package/index175.mjs +52 -81
  215. package/index176.js +1 -5
  216. package/index176.mjs +42 -66
  217. package/index177.js +1 -1
  218. package/index177.mjs +87 -1999
  219. package/index178.js +5 -1
  220. package/index178.mjs +79 -58
  221. package/index179.js +1 -1
  222. package/index179.mjs +1998 -175
  223. package/index18.js +1 -1
  224. package/index18.mjs +7 -7
  225. package/index180.js +1 -1
  226. package/index180.mjs +59 -5
  227. package/index181.js +1 -1
  228. package/index181.mjs +183 -125
  229. package/index182.js +1 -1
  230. package/index182.mjs +5 -179
  231. package/index183.js +1 -1
  232. package/index183.mjs +129 -8
  233. package/index184.js +1 -1
  234. package/index184.mjs +179 -3
  235. package/index185.js +1 -1
  236. package/index185.mjs +8 -35
  237. package/index186.js +1 -1
  238. package/index186.mjs +3 -5
  239. package/index187.js +1 -1
  240. package/index187.mjs +35 -28
  241. package/index188.js +1 -1
  242. package/index188.mjs +5 -6
  243. package/index189.js +1 -1
  244. package/index189.mjs +26 -310
  245. package/index19.js +1 -1
  246. package/index19.mjs +2 -2
  247. package/index190.js +1 -1
  248. package/index190.mjs +6 -192
  249. package/index191.js +1 -1
  250. package/index191.mjs +339 -7
  251. package/index192.js +1 -1
  252. package/index192.mjs +180 -23
  253. package/index193.js +1 -1
  254. package/index193.mjs +6 -53
  255. package/index194.js +1 -1
  256. package/index194.mjs +24 -44
  257. package/index195.js +1 -1
  258. package/index195.mjs +55 -124
  259. package/index196.js +1 -1
  260. package/index196.mjs +46 -5
  261. package/index197.js +1 -1
  262. package/index197.mjs +108 -26
  263. package/index198.js +1 -1
  264. package/index198.mjs +32 -6
  265. package/index199.js +1 -1
  266. package/index199.mjs +5 -7
  267. package/index2.js +1 -1
  268. package/index2.mjs +19 -19
  269. package/index20.js +1 -1
  270. package/index20.mjs +1 -1
  271. package/index200.js +1 -1
  272. package/index200.mjs +28 -7
  273. package/index201.js +1 -1
  274. package/index201.mjs +7 -5
  275. package/index202.js +1 -1
  276. package/index202.mjs +7 -5
  277. package/index203.js +1 -1
  278. package/index203.mjs +7 -9
  279. package/index204.js +1 -0
  280. package/index204.mjs +7 -0
  281. package/index205.js +1 -0
  282. package/index205.mjs +8 -0
  283. package/index206.js +1 -0
  284. package/index206.mjs +12 -0
  285. package/index21.js +1 -1
  286. package/index21.mjs +8 -8
  287. package/index22.js +1 -1
  288. package/index22.mjs +2 -2
  289. package/index23.js +1 -1
  290. package/index23.mjs +3 -3
  291. package/index24.js +1 -1
  292. package/index24.mjs +14 -14
  293. package/index26.js +1 -1
  294. package/index26.mjs +28 -21
  295. package/index27.js +1 -1
  296. package/index27.mjs +12 -12
  297. package/index28.js +1 -1
  298. package/index28.mjs +6 -6
  299. package/index29.js +1 -1
  300. package/index29.mjs +1 -1
  301. package/index30.js +1 -1
  302. package/index30.mjs +14 -8
  303. package/index31.js +1 -1
  304. package/index31.mjs +18 -18
  305. package/index32.js +1 -1
  306. package/index32.mjs +1 -1
  307. package/index33.mjs +43 -43
  308. package/index34.js +1 -1
  309. package/index34.mjs +1 -1
  310. package/index35.js +1 -1
  311. package/index35.mjs +3 -3
  312. package/index36.mjs +10 -10
  313. package/index4.js +1 -1
  314. package/index4.mjs +3 -3
  315. package/index6.js +1 -1
  316. package/index6.mjs +34 -33
  317. package/index65.js +1 -1
  318. package/index65.mjs +1 -1
  319. package/index66.js +1 -1
  320. package/index66.mjs +2 -2
  321. package/index67.js +1 -1
  322. package/index67.mjs +1 -1
  323. package/index69.js +1 -1
  324. package/index69.mjs +1 -1
  325. package/index7.mjs +4 -4
  326. package/index70.js +1 -1
  327. package/index70.mjs +1 -1
  328. package/index71.js +1 -1
  329. package/index71.mjs +1 -1
  330. package/index72.js +2 -1
  331. package/index72.mjs +27 -2
  332. package/index73.js +1 -2
  333. package/index73.mjs +2 -9
  334. package/index74.js +1 -1
  335. package/index74.mjs +7 -6
  336. package/index75.js +1 -1
  337. package/index75.mjs +6 -6
  338. package/index76.js +1 -1
  339. package/index76.mjs +6 -6
  340. package/index77.js +2 -1
  341. package/index77.mjs +8 -25
  342. package/index78.js +1 -1
  343. package/index78.mjs +25 -2
  344. package/index79.js +1 -6
  345. package/index79.mjs +2 -94
  346. package/index8.js +1 -1
  347. package/index8.mjs +42 -23
  348. package/index80.js +6 -1
  349. package/index80.mjs +79 -54
  350. package/index81.js +1 -1
  351. package/index81.mjs +61 -33
  352. package/index82.js +1 -42
  353. package/index82.mjs +34 -67
  354. package/index83.js +42 -1
  355. package/index83.mjs +69 -154
  356. package/index84.js +1 -9
  357. package/index84.mjs +149 -47
  358. package/index85.js +9 -1
  359. package/index85.mjs +48 -36
  360. package/index86.js +1 -1
  361. package/index86.mjs +40 -8
  362. package/index87.js +1 -1
  363. package/index87.mjs +9 -31
  364. package/index88.js +1 -1
  365. package/index88.mjs +35 -6
  366. package/index89.js +1 -12
  367. package/index89.mjs +6 -40
  368. package/index9.js +1 -1
  369. package/index9.mjs +7 -7
  370. package/index90.js +12 -1
  371. package/index90.mjs +36 -25
  372. package/index91.js +1 -1
  373. package/index91.mjs +24 -8
  374. package/index92.js +1 -7
  375. package/index92.mjs +7 -13
  376. package/index93.js +6 -14
  377. package/index93.mjs +13 -65
  378. package/index94.js +15 -1
  379. package/index94.mjs +71 -7
  380. package/index95.js +1 -16
  381. package/index95.mjs +7 -25
  382. package/index96.js +16 -1
  383. package/index96.mjs +20 -37
  384. package/index97.js +1 -1
  385. package/index97.mjs +40 -43
  386. package/index98.js +1 -1
  387. package/index98.mjs +44 -47
  388. package/index99.js +1 -1
  389. package/index99.mjs +48 -17
  390. package/package.json +1 -1
  391. package/providers/Translation/index.d.ts +4 -0
  392. package/providers/Translation/interface.d.ts +16 -0
  393. package/theme/Accordion/index.d.ts +12 -12
  394. package/theme/Alerts/index.d.ts +22 -22
  395. package/theme/Box/index.d.ts +8 -8
  396. package/theme/Button/index.d.ts +2 -2
  397. package/theme/Calendar/index.d.ts +12 -12
  398. package/theme/Carousel/index.d.ts +11 -11
  399. package/theme/Checkbox/index.d.ts +8 -8
  400. package/theme/CheckboxGroup/index.d.ts +3 -3
  401. package/theme/DatePicker/index.d.ts +9 -9
  402. package/theme/Image/index.d.ts +1 -1
  403. package/theme/LightBox/index.d.ts +9 -9
  404. package/theme/Radio/index.d.ts +6 -6
  405. package/theme/RadioGroup/index.d.ts +3 -3
  406. package/theme/Search/index.d.ts +3 -3
  407. package/theme/ShareButton/index.d.ts +10 -10
  408. package/theme/SidePanel/index.d.ts +3 -3
  409. package/theme/TextArea/index.d.ts +2 -2
  410. package/theme/Typography/index.d.ts +2 -2
  411. package/transitions/ModalTransition.d.ts +3 -6
  412. package/transitions/RenderWithSlide.d.ts +3 -6
  413. package/transitions/SidePanelTransition.d.ts +3 -6
package/index129.mjs CHANGED
@@ -1,32 +1,243 @@
1
- import { jsx as h } from "react/jsx-runtime";
2
- import { useFocusManager as y, useKeyboard as P, usePress as k } from "react-aria";
3
- import { useSwiperController as w } from "./index71.mjs";
4
- import g from "./index6.mjs";
5
- const $ = (d) => {
6
- const { themeName: l, tokens: u, slides: o, activeIndex: p, index: t } = d, { controller: e } = w(), s = y(), m = t === 0 ? o.length - 1 : t - 1, c = t === o.length - 1 ? 0 : t + 1, { keyboardProps: b } = P({
7
- onKeyUp: (i) => {
8
- i.key === "ArrowLeft" && (i.preventDefault(), s == null || s.focusPrevious({ wrap: !0 }), e == null || e.slideTo(m)), i.key === "ArrowRight" && (i.preventDefault(), s == null || s.focusNext({ wrap: !0 }), e == null || e.slideTo(c));
1
+ import a, { forwardRef as W, useState as P, useRef as u, useEffect as k, useLayoutEffect as Q, createContext as q, useContext as X } from "react";
2
+ import { S as Y } from "./index179.mjs";
3
+ import { g as Z, m as ee, a as re, u as te } from "./index180.mjs";
4
+ import { d as D, w as ne, n as se, b as ae, a as ie, e as F, u as oe } from "./index181.mjs";
5
+ function L() {
6
+ return L = Object.assign ? Object.assign.bind() : function(n) {
7
+ for (var r = 1; r < arguments.length; r++) {
8
+ var s = arguments[r];
9
+ for (var t in s)
10
+ Object.prototype.hasOwnProperty.call(s, t) && (n[t] = s[t]);
9
11
  }
10
- }), { pressProps: f } = k({
11
- onPress: () => e == null ? void 0 : e.slideTo(t)
12
- }), v = o[t], r = t === p, { title: n, id: x } = v, a = n && n.length > 0;
13
- return /* @__PURE__ */ h(
14
- g,
15
- {
16
- as: "button",
17
- tabIndex: 0,
18
- role: "button",
19
- "aria-current": r ? "true" : "false",
20
- "aria-disabled": r,
21
- "aria-label": a ? void 0 : `${t + 1} / ${o.length}`,
22
- "aria-labelledby": a ? x : void 0,
23
- ...b,
24
- ...f,
25
- themeName: `${l}.bullet`,
26
- tokens: { ...u, active: r }
12
+ return n;
13
+ }, L.apply(this, arguments);
14
+ }
15
+ function H(n) {
16
+ return n.type && n.type.displayName && n.type.displayName.includes("SwiperSlide");
17
+ }
18
+ function U(n) {
19
+ const r = [];
20
+ return a.Children.toArray(n).forEach((s) => {
21
+ H(s) ? r.push(s) : s.props && s.props.children && U(s.props.children).forEach((t) => r.push(t));
22
+ }), r;
23
+ }
24
+ function le(n) {
25
+ const r = [], s = {
26
+ "container-start": [],
27
+ "container-end": [],
28
+ "wrapper-start": [],
29
+ "wrapper-end": []
30
+ };
31
+ return a.Children.toArray(n).forEach((t) => {
32
+ if (H(t))
33
+ r.push(t);
34
+ else if (t.props && t.props.slot && s[t.props.slot])
35
+ s[t.props.slot].push(t);
36
+ else if (t.props && t.props.children) {
37
+ const p = U(t.props.children);
38
+ p.length > 0 ? p.forEach((o) => r.push(o)) : s["container-end"].push(t);
39
+ } else
40
+ s["container-end"].push(t);
41
+ }), {
42
+ slides: r,
43
+ slots: s
44
+ };
45
+ }
46
+ function ce(n, r, s) {
47
+ if (!s) return null;
48
+ const t = (l) => {
49
+ let i = l;
50
+ return l < 0 ? i = r.length + l : i >= r.length && (i = i - r.length), i;
51
+ }, p = n.isHorizontal() ? {
52
+ [n.rtlTranslate ? "right" : "left"]: `${s.offset}px`
53
+ } : {
54
+ top: `${s.offset}px`
55
+ }, {
56
+ from: o,
57
+ to: d
58
+ } = s, S = n.params.loop ? -r.length : 0, h = n.params.loop ? r.length * 2 : r.length, g = [];
59
+ for (let l = S; l < h; l += 1)
60
+ l >= o && l <= d && g.push(r[t(l)]);
61
+ return g.map((l, i) => /* @__PURE__ */ a.cloneElement(l, {
62
+ swiper: n,
63
+ style: p,
64
+ key: `slide-${i}`
65
+ }));
66
+ }
67
+ function O(n, r) {
68
+ return typeof window > "u" ? k(n, r) : Q(n, r);
69
+ }
70
+ const B = /* @__PURE__ */ q(null), ge = () => X(B), ue = /* @__PURE__ */ q(null), pe = /* @__PURE__ */ W(function(n, r) {
71
+ let {
72
+ className: s,
73
+ tag: t = "div",
74
+ wrapperTag: p = "div",
75
+ children: o,
76
+ onSwiper: d,
77
+ ...S
78
+ } = n === void 0 ? {} : n, h = !1;
79
+ const [g, l] = P("swiper"), [i, m] = P(null), [C, R] = P(!1), z = u(!1), w = u(null), e = u(null), x = u(null), $ = u(null), j = u(null), b = u(null), N = u(null), T = u(null), {
80
+ params: f,
81
+ passedParams: _,
82
+ rest: G,
83
+ events: v
84
+ } = Z(S), {
85
+ slides: y,
86
+ slots: I
87
+ } = le(o), A = () => {
88
+ R(!C);
89
+ };
90
+ Object.assign(f.on, {
91
+ _containerClasses(c, E) {
92
+ l(E);
27
93
  }
28
- );
29
- };
94
+ });
95
+ const V = () => {
96
+ Object.assign(f.on, v), h = !0;
97
+ const c = {
98
+ ...f
99
+ };
100
+ if (delete c.wrapperClass, e.current = new Y(c), e.current.virtual && e.current.params.virtual.enabled) {
101
+ e.current.virtual.slides = y;
102
+ const E = {
103
+ cache: !1,
104
+ slides: y,
105
+ renderExternal: m,
106
+ renderExternalUpdate: !1
107
+ };
108
+ F(e.current.params.virtual, E), F(e.current.originalParams.virtual, E);
109
+ }
110
+ };
111
+ w.current || V(), e.current && e.current.on("_beforeBreakpoint", A);
112
+ const J = () => {
113
+ h || !v || !e.current || Object.keys(v).forEach((c) => {
114
+ e.current.on(c, v[c]);
115
+ });
116
+ }, K = () => {
117
+ !v || !e.current || Object.keys(v).forEach((c) => {
118
+ e.current.off(c, v[c]);
119
+ });
120
+ };
121
+ k(() => () => {
122
+ e.current && e.current.off("_beforeBreakpoint", A);
123
+ }), k(() => {
124
+ !z.current && e.current && (e.current.emitSlidesClasses(), z.current = !0);
125
+ }), O(() => {
126
+ if (r && (r.current = w.current), !!w.current)
127
+ return e.current.destroyed && V(), ee({
128
+ el: w.current,
129
+ nextEl: j.current,
130
+ prevEl: b.current,
131
+ paginationEl: N.current,
132
+ scrollbarEl: T.current,
133
+ swiper: e.current
134
+ }, f), d && !e.current.destroyed && d(e.current), () => {
135
+ e.current && !e.current.destroyed && e.current.destroy(!0, !1);
136
+ };
137
+ }, []), O(() => {
138
+ J();
139
+ const c = re(_, x.current, y, $.current, (E) => E.key);
140
+ return x.current = _, $.current = y, c.length && e.current && !e.current.destroyed && oe({
141
+ swiper: e.current,
142
+ slides: y,
143
+ passedParams: _,
144
+ changedParams: c,
145
+ nextEl: j.current,
146
+ prevEl: b.current,
147
+ scrollbarEl: T.current,
148
+ paginationEl: N.current
149
+ }), () => {
150
+ K();
151
+ };
152
+ }), O(() => {
153
+ te(e.current);
154
+ }, [i]);
155
+ function M() {
156
+ return f.virtual ? ce(e.current, y, i) : y.map((c, E) => /* @__PURE__ */ a.cloneElement(c, {
157
+ swiper: e.current,
158
+ swiperSlideIndex: E
159
+ }));
160
+ }
161
+ return /* @__PURE__ */ a.createElement(t, L({
162
+ ref: w,
163
+ className: D(`${g}${s ? ` ${s}` : ""}`)
164
+ }, G), /* @__PURE__ */ a.createElement(ue.Provider, {
165
+ value: e.current
166
+ }, I["container-start"], /* @__PURE__ */ a.createElement(p, {
167
+ className: ne(f.wrapperClass)
168
+ }, I["wrapper-start"], M(), I["wrapper-end"]), se(f) && /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("div", {
169
+ ref: b,
170
+ className: "swiper-button-prev"
171
+ }), /* @__PURE__ */ a.createElement("div", {
172
+ ref: j,
173
+ className: "swiper-button-next"
174
+ })), ae(f) && /* @__PURE__ */ a.createElement("div", {
175
+ ref: T,
176
+ className: "swiper-scrollbar"
177
+ }), ie(f) && /* @__PURE__ */ a.createElement("div", {
178
+ ref: N,
179
+ className: "swiper-pagination"
180
+ }), I["container-end"]));
181
+ });
182
+ pe.displayName = "Swiper";
183
+ const de = /* @__PURE__ */ W(function(n, r) {
184
+ let {
185
+ tag: s = "div",
186
+ children: t,
187
+ className: p = "",
188
+ swiper: o,
189
+ zoom: d,
190
+ lazy: S,
191
+ virtualIndex: h,
192
+ swiperSlideIndex: g,
193
+ ...l
194
+ } = n === void 0 ? {} : n;
195
+ const i = u(null), [m, C] = P("swiper-slide"), [R, z] = P(!1);
196
+ function w(j, b, N) {
197
+ b === i.current && C(N);
198
+ }
199
+ O(() => {
200
+ if (typeof g < "u" && (i.current.swiperSlideIndex = g), r && (r.current = i.current), !(!i.current || !o)) {
201
+ if (o.destroyed) {
202
+ m !== "swiper-slide" && C("swiper-slide");
203
+ return;
204
+ }
205
+ return o.on("_slideClass", w), () => {
206
+ o && o.off("_slideClass", w);
207
+ };
208
+ }
209
+ }), O(() => {
210
+ o && i.current && !o.destroyed && C(o.getSlideClasses(i.current));
211
+ }, [o]);
212
+ const e = {
213
+ isActive: m.indexOf("swiper-slide-active") >= 0,
214
+ isVisible: m.indexOf("swiper-slide-visible") >= 0,
215
+ isPrev: m.indexOf("swiper-slide-prev") >= 0,
216
+ isNext: m.indexOf("swiper-slide-next") >= 0
217
+ }, x = () => typeof t == "function" ? t(e) : t, $ = () => {
218
+ z(!0);
219
+ };
220
+ return /* @__PURE__ */ a.createElement(s, L({
221
+ ref: i,
222
+ className: D(`${m}${p ? ` ${p}` : ""}`),
223
+ "data-swiper-slide-index": h,
224
+ onLoad: $
225
+ }, l), d && /* @__PURE__ */ a.createElement(B.Provider, {
226
+ value: e
227
+ }, /* @__PURE__ */ a.createElement("div", {
228
+ className: "swiper-zoom-container",
229
+ "data-swiper-zoom": typeof d == "number" ? d : void 0
230
+ }, x(), S && !R && /* @__PURE__ */ a.createElement("div", {
231
+ className: "swiper-lazy-preloader"
232
+ }))), !d && /* @__PURE__ */ a.createElement(B.Provider, {
233
+ value: e
234
+ }, x(), S && !R && /* @__PURE__ */ a.createElement("div", {
235
+ className: "swiper-lazy-preloader"
236
+ })));
237
+ });
238
+ de.displayName = "SwiperSlide";
30
239
  export {
31
- $ as default
240
+ pe as Swiper,
241
+ de as SwiperSlide,
242
+ ge as useSwiperSlide
32
243
  };
package/index13.js CHANGED
@@ -1 +1 @@
1
- "use strict";const i=require("react/jsx-runtime"),e=require("sanitize-html"),a=require("./index3.js"),o=({content:t,themeName:r="wysiwyg",...l})=>{const s=e(t,{allowedTags:e.defaults.allowedTags.concat(["iframe"]),allowedAttributes:{...e.defaults.allowedAttributes,iframe:["src","allow","allowfullscreen","frameborder","scrolling","target","title","height","width","referrerpolicy"]}});return i.jsx(a.default,{...l,themeName:r,dangerouslySetInnerHTML:{__html:s}})};module.exports=o;
1
+ "use strict";const o=require("react/jsx-runtime"),t=require("sanitize-html"),a=require("./index3.js"),e=require("./index104.js"),n=({content:r,themeName:s="wysiwyg",...l})=>{const i=t(r,{allowedTags:t.defaults.allowedTags.concat(["iframe"]),nonBooleanAttributes:[],allowedAttributes:{...t.defaults.allowedAttributes,"*":[...t.defaults.nonBooleanAttributes,...e.ariaAttributes,...e.booleanAttributes],iframe:["src","allow","allowfullscreen","frameborder","scrolling","target","title","height","width","referrerpolicy"]}});return o.jsx(a.default,{...l,themeName:s,dangerouslySetInnerHTML:{__html:i}})};module.exports=n;
package/index13.mjs CHANGED
@@ -1,11 +1,14 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import t from "sanitize-html";
3
3
  import i from "./index3.mjs";
4
- const f = ({ content: e, themeName: r = "wysiwyg", ...l }) => {
5
- const o = t(e, {
4
+ import { ariaAttributes as s, booleanAttributes as n } from "./index104.mjs";
5
+ const w = ({ content: e, themeName: r = "wysiwyg", ...o }) => {
6
+ const l = t(e, {
6
7
  allowedTags: t.defaults.allowedTags.concat(["iframe"]),
8
+ nonBooleanAttributes: [],
7
9
  allowedAttributes: {
8
10
  ...t.defaults.allowedAttributes,
11
+ "*": [...t.defaults.nonBooleanAttributes, ...s, ...n],
9
12
  iframe: [
10
13
  "src",
11
14
  "allow",
@@ -23,14 +26,14 @@ const f = ({ content: e, themeName: r = "wysiwyg", ...l }) => {
23
26
  return /* @__PURE__ */ a(
24
27
  i,
25
28
  {
26
- ...l,
29
+ ...o,
27
30
  themeName: r,
28
31
  dangerouslySetInnerHTML: {
29
- __html: o
32
+ __html: l
30
33
  }
31
34
  }
32
35
  );
33
36
  };
34
37
  export {
35
- f as default
38
+ w as default
36
39
  };
package/index130.js CHANGED
@@ -1 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index142.js"),$=require("./index153.js");function l(e,t){return t=u.toCalendar(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function f(e,t){let n=e.calendar.toJulianDay(e),a=Math.ceil(n+1-g(t))%7;return a<0&&(a+=7),a}function d(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function s(e,t){return c(e)-c(t)}function c(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let r=null;function m(){return r==null&&(r=new Intl.DateTimeFormat().resolvedOptions().timeZone),r}function i(e){return e.subtract({days:e.day-1})}const o=new Map;function y(e){if(Intl.Locale){let n=o.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&o.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function g(e){let t=y(e);return t&&$.weekStartData[t]||0}function p(e,t){let n=e.calendar.getDaysInMonth(e);return Math.ceil((f(i(e),t)+n)/7)}exports.compareDate=d;exports.compareTime=s;exports.getDayOfWeek=f;exports.getLocalTimeZone=m;exports.getWeeksInMonth=p;exports.isSameDay=l;exports.startOfMonth=i;
1
+ "use client";
2
+ "use strict";const n=require("react/jsx-runtime"),d=require("./index129.js"),a=require("./index25.js"),m=require("./index3.js"),h=r=>{const{themeName:e,title:t,tokens:c,id:o,children:l}=r,{isActive:u,isVisible:i}=d.useSwiperSlide(),s={...c,isActive:u,isVisible:i};return n.jsxs(a.default,{themeName:`${e}.container`,tokens:s,...i?{}:{inert:"true"},children:[t&&n.jsx(m.default,{themeName:`${e}.title`,tokens:s,id:o,children:t}),l]})};module.exports=h;
package/index130.mjs CHANGED
@@ -1,53 +1,15 @@
1
- import { toCalendar as o } from "./index142.mjs";
2
- import { weekStartData as i } from "./index153.mjs";
3
- function p(e, a) {
4
- return a = o(a, e.calendar), e.era === a.era && e.year === a.year && e.month === a.month && e.day === a.day;
5
- }
6
- function $(e, a) {
7
- let t = e.calendar.toJulianDay(e), n = Math.ceil(t + 1 - d(a)) % 7;
8
- return n < 0 && (n += 7), n;
9
- }
10
- function y(e, a) {
11
- return e.calendar.toJulianDay(e) - a.calendar.toJulianDay(a);
12
- }
13
- function g(e, a) {
14
- return c(e) - c(a);
15
- }
16
- function c(e) {
17
- return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
18
- }
19
- let r = null;
20
- function x() {
21
- return r == null && (r = new Intl.DateTimeFormat().resolvedOptions().timeZone), r;
22
- }
23
- function u(e) {
24
- return e.subtract({
25
- days: e.day - 1
26
- });
27
- }
28
- const f = /* @__PURE__ */ new Map();
29
- function l(e) {
30
- if (Intl.Locale) {
31
- let t = f.get(e);
32
- return t || (t = new Intl.Locale(e).maximize().region, t && f.set(e, t)), t;
33
- }
34
- let a = e.split("-")[1];
35
- return a === "u" ? void 0 : a;
36
- }
37
- function d(e) {
38
- let a = l(e);
39
- return a && i[a] || 0;
40
- }
41
- function h(e, a) {
42
- let t = e.calendar.getDaysInMonth(e);
43
- return Math.ceil(($(u(e), a) + t) / 7);
44
- }
1
+ "use client";
2
+ import { jsxs as c, jsx as a } from "react/jsx-runtime";
3
+ import { useSwiperSlide as d } from "./index129.mjs";
4
+ import p from "./index25.mjs";
5
+ import h from "./index3.mjs";
6
+ const S = (r) => {
7
+ const { themeName: e, title: t, tokens: s, id: n, children: m } = r, { isActive: l, isVisible: o } = d(), i = { ...s, isActive: l, isVisible: o };
8
+ return /* @__PURE__ */ c(p, { themeName: `${e}.container`, tokens: i, ...o ? {} : { inert: "true" }, children: [
9
+ t && /* @__PURE__ */ a(h, { themeName: `${e}.title`, tokens: i, id: n, children: t }),
10
+ m
11
+ ] });
12
+ };
45
13
  export {
46
- y as compareDate,
47
- g as compareTime,
48
- $ as getDayOfWeek,
49
- x as getLocalTimeZone,
50
- h as getWeeksInMonth,
51
- p as isSameDay,
52
- u as startOfMonth
14
+ S as default
53
15
  };
package/index131.js CHANGED
@@ -1 +1 @@
1
- "use strict";const s=require("react/jsx-runtime"),r=require("./index130.js"),P=require("@react-aria/calendar"),v=require("@react-aria/focus"),O=require("@react-aria/utils"),$=require("react"),F=require("react-aria"),o=require("./index64.js");function I({themeName:c="calendar",tokens:l,state:e,date:i}){const u=$.useRef(null),{cellProps:f,buttonProps:q,isSelected:n,isOutsideVisibleRange:D,isDisabled:d,formattedDate:y,isInvalid:a}=P.useCalendarCell({date:i},e,u),h=e!=null&&e.highlightedRange?r.isSameDay(i,e==null?void 0:e.highlightedRange.start):n,g=e!=null&&e.highlightedRange?r.isSameDay(i,e==null?void 0:e.highlightedRange.end):n,{locale:m}=F.useLocale(),R=r.getDayOfWeek(i,m),C=n&&(h||R===0||i.day===1),S=n&&(g||R===6||i.day===i.calendar.getDaysInMonth(i)),{focusProps:b,isFocusVisible:p}=v.useFocusRing(),t=o(`${c}.cellContainer`,{...l,isFocusVisible:p}),x=o(`${c}.cell`,{...l,isSelected:n,isInvalid:a,isDisabled:d,isRoundedLeft:C,isRoundedRight:S}),j=o(`${c}.cellDate`,{...l,isSelected:n,isInvalid:a,isDisabled:d,isSelectionStart:h,isSelectionEnd:g});return s.jsx("td",{...f,"aria-disabled":!1,className:t,children:s.jsx("div",{...O.mergeProps(q,b),ref:u,hidden:D,className:x,children:s.jsx("div",{className:j,children:y})})})}module.exports=I;
1
+ "use strict";const P=require("react/jsx-runtime"),o=require("react-aria"),k=require("./index71.js"),m=require("./index6.js"),w=d=>{const{themeName:l,tokens:c,slides:i,activeIndex:x,index:t}=d,{controller:e}=k.useSwiperController(),s=o.useFocusManager(),p=t===0?i.length-1:t-1,b=t===i.length-1?0:t+1,{keyboardProps:v}=o.useKeyboard({onKeyUp:n=>{n.key==="ArrowLeft"&&(n.preventDefault(),s==null||s.focusPrevious({wrap:!0}),e==null||e.slideTo(p)),n.key==="ArrowRight"&&(n.preventDefault(),s==null||s.focusNext({wrap:!0}),e==null||e.slideTo(b))}}),{pressProps:h}=o.usePress({onPress:()=>e==null?void 0:e.slideTo(t)}),f=i[t],r=t===x,{title:a,id:y}=f,u=a&&a.length>0;return P.jsx(m.default,{as:"button",tabIndex:0,role:"button","aria-current":r?"true":"false","aria-disabled":r,"aria-label":u?void 0:`${t+1} / ${i.length}`,"aria-labelledby":u?y:void 0,...v,...h,themeName:`${l}.bullet`,tokens:{...c,active:r}})};module.exports=w;
package/index131.mjs CHANGED
@@ -1,29 +1,32 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { isSameDay as g, getDayOfWeek as v } from "./index130.mjs";
3
- import { useCalendarCell as O } from "@react-aria/calendar";
4
- import { useFocusRing as T } from "@react-aria/focus";
5
- import { mergeProps as F } from "@react-aria/utils";
6
- import { useRef as I } from "react";
7
- import { useLocale as L } from "react-aria";
8
- import r from "./index64.mjs";
9
- function w({ themeName: l = "calendar", tokens: n, state: e, date: o }) {
10
- const s = I(null), { cellProps: u, buttonProps: p, isSelected: i, isOutsideVisibleRange: R, isDisabled: d, formattedDate: $, isInvalid: f } = O({ date: o }, e, s), a = e != null && e.highlightedRange ? g(o, e == null ? void 0 : e.highlightedRange.start) : i, m = e != null && e.highlightedRange ? g(o, e == null ? void 0 : e.highlightedRange.end) : i, { locale: C } = L(), h = v(o, C), D = i && (a || h === 0 || o.day === 1), y = i && (m || h === 6 || o.day === o.calendar.getDaysInMonth(o)), { focusProps: b, isFocusVisible: x } = T(), S = r(`${l}.cellContainer`, { ...n, isFocusVisible: x }), t = r(`${l}.cell`, {
11
- ...n,
12
- isSelected: i,
13
- isInvalid: f,
14
- isDisabled: d,
15
- isRoundedLeft: D,
16
- isRoundedRight: y
17
- }), P = r(`${l}.cellDate`, {
18
- ...n,
19
- isSelected: i,
20
- isInvalid: f,
21
- isDisabled: d,
22
- isSelectionStart: a,
23
- isSelectionEnd: m
24
- });
25
- return /* @__PURE__ */ c("td", { ...u, "aria-disabled": !1, className: S, children: /* @__PURE__ */ c("div", { ...F(p, b), ref: s, hidden: R, className: t, children: /* @__PURE__ */ c("div", { className: P, children: $ }) }) });
26
- }
1
+ import { jsx as h } from "react/jsx-runtime";
2
+ import { useFocusManager as y, useKeyboard as P, usePress as k } from "react-aria";
3
+ import { useSwiperController as w } from "./index71.mjs";
4
+ import g from "./index6.mjs";
5
+ const N = (d) => {
6
+ const { themeName: l, tokens: u, slides: o, activeIndex: p, index: t } = d, { controller: e } = w(), s = y(), m = t === 0 ? o.length - 1 : t - 1, c = t === o.length - 1 ? 0 : t + 1, { keyboardProps: b } = P({
7
+ onKeyUp: (i) => {
8
+ i.key === "ArrowLeft" && (i.preventDefault(), s == null || s.focusPrevious({ wrap: !0 }), e == null || e.slideTo(m)), i.key === "ArrowRight" && (i.preventDefault(), s == null || s.focusNext({ wrap: !0 }), e == null || e.slideTo(c));
9
+ }
10
+ }), { pressProps: f } = k({
11
+ onPress: () => e == null ? void 0 : e.slideTo(t)
12
+ }), v = o[t], n = t === p, { title: r, id: x } = v, a = r && r.length > 0;
13
+ return /* @__PURE__ */ h(
14
+ g,
15
+ {
16
+ as: "button",
17
+ tabIndex: 0,
18
+ role: "button",
19
+ "aria-current": n ? "true" : "false",
20
+ "aria-disabled": n,
21
+ "aria-label": a ? void 0 : `${t + 1} / ${o.length}`,
22
+ "aria-labelledby": a ? x : void 0,
23
+ ...b,
24
+ ...f,
25
+ themeName: `${l}.bullet`,
26
+ tokens: { ...u, active: n }
27
+ }
28
+ );
29
+ };
27
30
  export {
28
- w as default
31
+ N as default
29
32
  };
package/index132.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index196.js"),l=require("@react-aria/utils"),u=require("@react-aria/focus");function t(a,e,r){let n=u.useHasTabbableChild(r)?void 0:0;var i;const b=d.generateId(e,(i=a.id)!==null&&i!==void 0?i:e==null?void 0:e.selectedKey,"tabpanel"),o=l.useLabels({...a,id:b,"aria-labelledby":d.generateId(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:l.mergeProps(o,{tabIndex:n,role:"tabpanel","aria-describedby":a["aria-describedby"],"aria-details":a["aria-details"]})}}exports.useTabPanel=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index144.js"),$=require("./index155.js");function l(e,t){return t=u.toCalendar(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function f(e,t){let n=e.calendar.toJulianDay(e),a=Math.ceil(n+1-g(t))%7;return a<0&&(a+=7),a}function d(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function s(e,t){return c(e)-c(t)}function c(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let r=null;function m(){return r==null&&(r=new Intl.DateTimeFormat().resolvedOptions().timeZone),r}function i(e){return e.subtract({days:e.day-1})}const o=new Map;function y(e){if(Intl.Locale){let n=o.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&o.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function g(e){let t=y(e);return t&&$.weekStartData[t]||0}function p(e,t){let n=e.calendar.getDaysInMonth(e);return Math.ceil((f(i(e),t)+n)/7)}exports.compareDate=d;exports.compareTime=s;exports.getDayOfWeek=f;exports.getLocalTimeZone=m;exports.getWeeksInMonth=p;exports.isSameDay=l;exports.startOfMonth=i;
package/index132.mjs CHANGED
@@ -1,23 +1,53 @@
1
- import { generateId as i } from "./index196.mjs";
2
- import { useLabels as n, mergeProps as c } from "@react-aria/utils";
3
- import { useHasTabbableChild as f } from "@react-aria/focus";
4
- function m(a, e, l) {
5
- let r = f(l) ? void 0 : 0;
6
- var d;
7
- const b = i(e, (d = a.id) !== null && d !== void 0 ? d : e == null ? void 0 : e.selectedKey, "tabpanel"), o = n({
8
- ...a,
9
- id: b,
10
- "aria-labelledby": i(e, e == null ? void 0 : e.selectedKey, "tab")
1
+ import { toCalendar as o } from "./index144.mjs";
2
+ import { weekStartData as i } from "./index155.mjs";
3
+ function p(e, a) {
4
+ return a = o(a, e.calendar), e.era === a.era && e.year === a.year && e.month === a.month && e.day === a.day;
5
+ }
6
+ function $(e, a) {
7
+ let t = e.calendar.toJulianDay(e), n = Math.ceil(t + 1 - d(a)) % 7;
8
+ return n < 0 && (n += 7), n;
9
+ }
10
+ function y(e, a) {
11
+ return e.calendar.toJulianDay(e) - a.calendar.toJulianDay(a);
12
+ }
13
+ function g(e, a) {
14
+ return c(e) - c(a);
15
+ }
16
+ function c(e) {
17
+ return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
18
+ }
19
+ let r = null;
20
+ function x() {
21
+ return r == null && (r = new Intl.DateTimeFormat().resolvedOptions().timeZone), r;
22
+ }
23
+ function u(e) {
24
+ return e.subtract({
25
+ days: e.day - 1
11
26
  });
12
- return {
13
- tabPanelProps: c(o, {
14
- tabIndex: r,
15
- role: "tabpanel",
16
- "aria-describedby": a["aria-describedby"],
17
- "aria-details": a["aria-details"]
18
- })
19
- };
27
+ }
28
+ const f = /* @__PURE__ */ new Map();
29
+ function l(e) {
30
+ if (Intl.Locale) {
31
+ let t = f.get(e);
32
+ return t || (t = new Intl.Locale(e).maximize().region, t && f.set(e, t)), t;
33
+ }
34
+ let a = e.split("-")[1];
35
+ return a === "u" ? void 0 : a;
36
+ }
37
+ function d(e) {
38
+ let a = l(e);
39
+ return a && i[a] || 0;
40
+ }
41
+ function h(e, a) {
42
+ let t = e.calendar.getDaysInMonth(e);
43
+ return Math.ceil(($(u(e), a) + t) / 7);
20
44
  }
21
45
  export {
22
- m as useTabPanel
46
+ y as compareDate,
47
+ g as compareTime,
48
+ $ as getDayOfWeek,
49
+ x as getLocalTimeZone,
50
+ h as getWeeksInMonth,
51
+ p as isSameDay,
52
+ u as startOfMonth
23
53
  };
package/index133.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@react-aria/utils"),O=require("@react-aria/focus"),m=require("./index189.js");function S(s,o){let{elementType:r="button",isDisabled:e,onPress:l,onPressStart:u,onPressEnd:P,onPressUp:p,onPressChange:c,preventFocusOnPress:b,allowFocusWhenDisabled:f,onClick:i,href:g,target:h,rel:y,type:d="button"}=s,n;r==="button"?n={type:d,disabled:e}:n={role:"button",tabIndex:e?void 0:0,href:r==="a"&&e?void 0:g,target:r==="a"?h:void 0,type:r==="input"?d:void 0,disabled:r==="input"?e:void 0,"aria-disabled":!e||r==="input"?void 0:e,rel:r==="a"?y:void 0};let{pressProps:C,isPressed:x}=m.usePress({onPressStart:u,onPressEnd:P,onPressChange:c,onPress:l,onPressUp:p,isDisabled:e,preventFocusOnPress:b,ref:o}),{focusableProps:t}=O.useFocusable(s,o);f&&(t.tabIndex=e?-1:t.tabIndex);let D=a.mergeProps(t,C,a.filterDOMProps(s,{labelable:!0}));return{isPressed:x,buttonProps:a.mergeProps(n,D,{"aria-haspopup":s["aria-haspopup"],"aria-expanded":s["aria-expanded"],"aria-controls":s["aria-controls"],"aria-pressed":s["aria-pressed"],onClick:F=>{i&&(i(F),console.warn("onClick is deprecated, please use onPress"))}})}}exports.useButton=S;
1
+ "use strict";const o=require("react/jsx-runtime"),r=require("./index132.js"),$=require("@react-aria/calendar"),F=require("@react-aria/focus"),I=require("@react-aria/utils"),L=require("react"),T=require("react-aria"),t=require("./index64.js");function V({themeName:i="calendar",tokens:l,state:n,date:e}){const a=L.useRef(null),{cellProps:y,buttonProps:g,isSelected:c,isOutsideVisibleRange:m,isDisabled:u,formattedDate:C,isInvalid:d}=$.useCalendarCell({date:e},n,a),s=n==null?void 0:n.highlightedRange,f=s==null?void 0:s.start,h=s==null?void 0:s.end,D=s&&f?r.isSameDay(e,f):c,q=s&&h?r.isSameDay(e,h):c,{locale:S}=T.useLocale(),R=r.getDayOfWeek(e,S),b=c&&(D||R===0||e.day===1),p=c&&(q||R===6||e.day===e.calendar.getDaysInMonth(e)),{focusProps:x,isFocusVisible:j}=F.useFocusRing(),P=t(`${i}.cellContainer`,{...l,isFocusVisible:j}),v=t(`${i}.cell`,{...l,isSelected:c,isInvalid:d,isDisabled:u,isRoundedLeft:b,isRoundedRight:p}),O=t(`${i}.cellDate`,{...l,isSelected:c,isInvalid:d,isDisabled:u,isSelectionStart:D,isSelectionEnd:q});return o.jsx("td",{...y,"aria-disabled":!1,className:P,children:o.jsx("div",{...I.mergeProps(g,x),ref:a,hidden:m,className:v,children:o.jsx("div",{className:O,children:C})})})}module.exports=V;
package/index133.mjs CHANGED
@@ -1,64 +1,29 @@
1
- import { mergeProps as i, filterDOMProps as F } from "@react-aria/utils";
2
- import { useFocusable as $ } from "@react-aria/focus";
3
- import { usePress as O } from "./index189.mjs";
4
- function E(s, t) {
5
- let {
6
- elementType: r = "button",
7
- isDisabled: e,
8
- onPress: l,
9
- onPressStart: u,
10
- onPressEnd: p,
11
- onPressUp: P,
12
- onPressChange: c,
13
- preventFocusOnPress: f,
14
- allowFocusWhenDisabled: b,
15
- // @ts-ignore
16
- onClick: o,
17
- href: h,
18
- target: m,
19
- rel: x,
20
- type: d = "button"
21
- } = s, n;
22
- r === "button" ? n = {
23
- type: d,
24
- disabled: e
25
- } : n = {
26
- role: "button",
27
- tabIndex: e ? void 0 : 0,
28
- href: r === "a" && e ? void 0 : h,
29
- target: r === "a" ? m : void 0,
30
- type: r === "input" ? d : void 0,
31
- disabled: r === "input" ? e : void 0,
32
- "aria-disabled": !e || r === "input" ? void 0 : e,
33
- rel: r === "a" ? x : void 0
34
- };
35
- let { pressProps: g, isPressed: C } = O({
36
- onPressStart: u,
37
- onPressEnd: p,
38
- onPressChange: c,
39
- onPress: l,
40
- onPressUp: P,
41
- isDisabled: e,
42
- preventFocusOnPress: f,
43
- ref: t
44
- }), { focusableProps: a } = $(s, t);
45
- b && (a.tabIndex = e ? -1 : a.tabIndex);
46
- let y = i(a, g, F(s, {
47
- labelable: !0
48
- }));
49
- return {
50
- isPressed: C,
51
- buttonProps: i(n, y, {
52
- "aria-haspopup": s["aria-haspopup"],
53
- "aria-expanded": s["aria-expanded"],
54
- "aria-controls": s["aria-controls"],
55
- "aria-pressed": s["aria-pressed"],
56
- onClick: (D) => {
57
- o && (o(D), console.warn("onClick is deprecated, please use onPress"));
58
- }
59
- })
60
- };
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { isSameDay as D, getDayOfWeek as F } from "./index132.mjs";
3
+ import { useCalendarCell as I } from "@react-aria/calendar";
4
+ import { useFocusRing as L } from "@react-aria/focus";
5
+ import { mergeProps as V } from "@react-aria/utils";
6
+ import { useRef as W } from "react";
7
+ import { useLocale as j } from "react-aria";
8
+ import r from "./index64.mjs";
9
+ function B({ themeName: l = "calendar", tokens: i, state: c, date: e }) {
10
+ const t = W(null), { cellProps: $, buttonProps: C, isSelected: s, isOutsideVisibleRange: R, isDisabled: a, formattedDate: g, isInvalid: d } = I({ date: e }, c, t), o = c == null ? void 0 : c.highlightedRange, f = o == null ? void 0 : o.start, m = o == null ? void 0 : o.end, u = o && f ? D(e, f) : s, p = o && m ? D(e, m) : s, { locale: y } = j(), h = F(e, y), b = s && (u || h === 0 || e.day === 1), x = s && (p || h === 6 || e.day === e.calendar.getDaysInMonth(e)), { focusProps: S, isFocusVisible: P } = L(), v = r(`${l}.cellContainer`, { ...i, isFocusVisible: P }), O = r(`${l}.cell`, {
11
+ ...i,
12
+ isSelected: s,
13
+ isInvalid: d,
14
+ isDisabled: a,
15
+ isRoundedLeft: b,
16
+ isRoundedRight: x
17
+ }), T = r(`${l}.cellDate`, {
18
+ ...i,
19
+ isSelected: s,
20
+ isInvalid: d,
21
+ isDisabled: a,
22
+ isSelectionStart: u,
23
+ isSelectionEnd: p
24
+ });
25
+ return /* @__PURE__ */ n("td", { ...$, "aria-disabled": !1, className: v, children: /* @__PURE__ */ n("div", { ...V(C, S), ref: t, hidden: R, className: O, children: /* @__PURE__ */ n("div", { className: T, children: g }) }) });
61
26
  }
62
27
  export {
63
- E as useButton
28
+ B as default
64
29
  };