@a-ui/react 7.13.0-beta.0 → 7.13.0-beta.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 (475) hide show
  1. package/constants/settings.d.ts +1 -1
  2. package/constants/stories.settings.d.ts +11 -0
  3. package/index.js +1 -62
  4. package/index.mjs +98 -9098
  5. package/index10.js +1 -0
  6. package/index10.mjs +60 -0
  7. package/index100.js +1 -0
  8. package/index100.mjs +4 -0
  9. package/index101.js +1 -0
  10. package/index101.mjs +400 -0
  11. package/index102.js +5 -0
  12. package/index102.mjs +42 -0
  13. package/index103.js +1 -0
  14. package/index103.mjs +4 -0
  15. package/index104.js +1 -0
  16. package/index104.mjs +10 -0
  17. package/index105.js +2 -0
  18. package/index105.mjs +329 -0
  19. package/index106.js +1 -0
  20. package/index106.mjs +52 -0
  21. package/index107.js +1 -0
  22. package/index107.mjs +4 -0
  23. package/index108.js +1 -0
  24. package/index108.mjs +67 -0
  25. package/index109.js +1 -0
  26. package/index109.mjs +45 -0
  27. package/index11.js +1 -0
  28. package/index11.mjs +12 -0
  29. package/index110.js +10 -0
  30. package/index110.mjs +62 -0
  31. package/index111.js +1 -0
  32. package/index111.mjs +46 -0
  33. package/index112.js +1 -0
  34. package/index112.mjs +42 -0
  35. package/index113.js +1 -0
  36. package/index113.mjs +4 -0
  37. package/index114.js +1 -0
  38. package/index114.mjs +4 -0
  39. package/index115.js +1 -0
  40. package/index115.mjs +4 -0
  41. package/index116.js +1 -0
  42. package/index116.mjs +33 -0
  43. package/index117.js +5 -0
  44. package/index117.mjs +21 -0
  45. package/index118.js +9 -0
  46. package/index118.mjs +63 -0
  47. package/index119.js +1 -0
  48. package/index119.mjs +65 -0
  49. package/index12.js +1 -0
  50. package/index12.mjs +215 -0
  51. package/index120.js +1 -0
  52. package/index120.mjs +16 -0
  53. package/index121.js +1 -0
  54. package/index121.mjs +9 -0
  55. package/index122.js +1 -0
  56. package/index122.mjs +9 -0
  57. package/index123.js +1 -0
  58. package/index123.mjs +8 -0
  59. package/index124.js +1 -0
  60. package/index124.mjs +8 -0
  61. package/index125.js +1 -0
  62. package/index125.mjs +7 -0
  63. package/index126.js +1 -0
  64. package/index126.mjs +7 -0
  65. package/index127.js +1 -0
  66. package/index127.mjs +9 -0
  67. package/index128.js +1 -0
  68. package/index128.mjs +7 -0
  69. package/index129.js +1 -0
  70. package/index129.mjs +69 -0
  71. package/index13.js +1 -0
  72. package/index13.mjs +29 -0
  73. package/index130.js +1 -0
  74. package/index130.mjs +5 -0
  75. package/index131.js +1 -0
  76. package/index131.mjs +7 -0
  77. package/index132.js +1 -0
  78. package/index132.mjs +13 -0
  79. package/index133.js +1 -0
  80. package/index133.mjs +4 -0
  81. package/index134.js +1 -0
  82. package/index134.mjs +393 -0
  83. package/index135.js +1 -0
  84. package/index135.mjs +127 -0
  85. package/index136.js +1 -0
  86. package/index136.mjs +136 -0
  87. package/index137.js +1 -0
  88. package/index137.mjs +4 -0
  89. package/index138.js +1 -0
  90. package/index138.mjs +4 -0
  91. package/index139.js +8 -0
  92. package/index139.mjs +78 -0
  93. package/index14.js +1 -0
  94. package/index14.mjs +44 -0
  95. package/index140.js +8 -0
  96. package/index140.mjs +95 -0
  97. package/index141.js +5 -0
  98. package/index141.mjs +54 -0
  99. package/index142.js +1 -0
  100. package/index142.mjs +10 -0
  101. package/index143.js +1 -0
  102. package/index143.mjs +7 -0
  103. package/index144.js +1 -0
  104. package/index144.mjs +54 -0
  105. package/index145.js +11 -0
  106. package/index145.mjs +60 -0
  107. package/index146.js +1 -0
  108. package/index146.mjs +4 -0
  109. package/index147.js +1 -0
  110. package/index147.mjs +4 -0
  111. package/index148.js +1 -0
  112. package/index148.mjs +7 -0
  113. package/index149.js +1 -0
  114. package/index149.mjs +7 -0
  115. package/index15.js +1 -0
  116. package/index15.mjs +8 -0
  117. package/index150.js +1 -0
  118. package/index150.mjs +9 -0
  119. package/index151.js +1 -0
  120. package/index151.mjs +15 -0
  121. package/index152.js +1 -0
  122. package/index152.mjs +18 -0
  123. package/index153.js +1 -0
  124. package/index153.mjs +11 -0
  125. package/index154.js +1 -0
  126. package/index154.mjs +8 -0
  127. package/index155.js +1 -0
  128. package/index155.mjs +8 -0
  129. package/index156.js +1 -0
  130. package/index156.mjs +7 -0
  131. package/index157.js +1 -0
  132. package/index157.mjs +515 -0
  133. package/index158.js +1 -0
  134. package/index158.mjs +52 -0
  135. package/index159.js +1 -0
  136. package/index159.mjs +20 -0
  137. package/index16.js +1 -0
  138. package/index16.mjs +15 -0
  139. package/index160.js +1 -0
  140. package/index160.mjs +20 -0
  141. package/index161.js +1 -0
  142. package/index161.mjs +7 -0
  143. package/index162.js +1 -0
  144. package/index162.mjs +10 -0
  145. package/index163.js +1 -0
  146. package/index163.mjs +8 -0
  147. package/index164.js +1 -0
  148. package/index164.mjs +7 -0
  149. package/index165.js +1 -0
  150. package/index165.mjs +8 -0
  151. package/index166.js +1 -0
  152. package/index166.mjs +11 -0
  153. package/index167.js +1 -0
  154. package/index167.mjs +7 -0
  155. package/index168.js +1 -0
  156. package/index168.mjs +10 -0
  157. package/index169.js +1 -0
  158. package/index169.mjs +14 -0
  159. package/index17.js +1 -0
  160. package/index17.mjs +108 -0
  161. package/index170.js +1 -0
  162. package/index170.mjs +11 -0
  163. package/index171.js +1 -0
  164. package/index171.mjs +11 -0
  165. package/index172.js +1 -0
  166. package/index172.mjs +15 -0
  167. package/index173.js +1 -0
  168. package/index173.mjs +6 -0
  169. package/index174.js +1 -0
  170. package/index174.mjs +35 -0
  171. package/index175.js +1 -0
  172. package/index175.mjs +67 -0
  173. package/index176.js +1 -0
  174. package/index176.mjs +10 -0
  175. package/index177.js +1 -0
  176. package/index177.mjs +10 -0
  177. package/index178.js +1 -0
  178. package/index178.mjs +9 -0
  179. package/index179.js +1 -0
  180. package/index179.mjs +9 -0
  181. package/index18.js +1 -0
  182. package/index18.mjs +136 -0
  183. package/index180.js +1 -0
  184. package/index180.mjs +16 -0
  185. package/index181.js +1 -0
  186. package/index181.mjs +4 -0
  187. package/index182.js +1 -0
  188. package/index182.mjs +4 -0
  189. package/index183.js +1 -0
  190. package/index183.mjs +4 -0
  191. package/index184.js +1 -0
  192. package/index184.mjs +59 -0
  193. package/index185.js +1 -0
  194. package/index185.mjs +24 -0
  195. package/index186.js +1 -0
  196. package/index186.mjs +43 -0
  197. package/index187.js +1 -0
  198. package/index187.mjs +63 -0
  199. package/index188.js +1 -0
  200. package/index188.mjs +34 -0
  201. package/index189.js +1 -0
  202. package/index189.mjs +15 -0
  203. package/index19.js +1 -0
  204. package/index19.mjs +11 -0
  205. package/index190.js +1 -0
  206. package/index190.mjs +64 -0
  207. package/index191.js +1 -0
  208. package/index191.mjs +64 -0
  209. package/index192.js +1 -0
  210. package/index192.mjs +65 -0
  211. package/index193.js +1 -0
  212. package/index193.mjs +65 -0
  213. package/index194.js +1 -0
  214. package/index194.mjs +42 -0
  215. package/index195.js +1 -0
  216. package/index195.mjs +43 -0
  217. package/index196.js +1 -0
  218. package/index196.mjs +55 -0
  219. package/index197.js +1 -0
  220. package/index197.mjs +45 -0
  221. package/index198.js +1 -0
  222. package/index198.mjs +39 -0
  223. package/index199.js +1 -0
  224. package/index199.mjs +68 -0
  225. package/index2.js +1 -0
  226. package/index2.mjs +12 -0
  227. package/index20.js +1 -0
  228. package/index20.mjs +54 -0
  229. package/index200.js +1 -0
  230. package/index200.mjs +68 -0
  231. package/index201.js +1 -0
  232. package/index201.mjs +93 -0
  233. package/index202.js +1 -0
  234. package/index202.mjs +43 -0
  235. package/index203.js +1 -0
  236. package/index203.mjs +43 -0
  237. package/index204.js +1 -0
  238. package/index204.mjs +43 -0
  239. package/index205.js +1 -0
  240. package/index205.mjs +27 -0
  241. package/index206.js +1 -0
  242. package/index206.mjs +26 -0
  243. package/index207.js +1 -0
  244. package/index207.mjs +26 -0
  245. package/index208.js +1 -0
  246. package/index208.mjs +27 -0
  247. package/index209.js +1 -0
  248. package/index209.mjs +26 -0
  249. package/index21.js +1 -0
  250. package/index21.mjs +33 -0
  251. package/index210.js +1 -0
  252. package/index210.mjs +26 -0
  253. package/index211.js +1 -0
  254. package/index211.mjs +16 -0
  255. package/index212.js +1 -0
  256. package/index212.mjs +42 -0
  257. package/index213.js +1 -0
  258. package/index213.mjs +42 -0
  259. package/index214.js +1 -0
  260. package/index214.mjs +16 -0
  261. package/index215.js +1 -0
  262. package/index215.mjs +16 -0
  263. package/index216.js +1 -0
  264. package/index216.mjs +70 -0
  265. package/index217.js +1 -0
  266. package/index217.mjs +33 -0
  267. package/index218.js +1 -0
  268. package/index218.mjs +11 -0
  269. package/index219.js +1 -0
  270. package/index219.mjs +155 -0
  271. package/index22.js +1 -0
  272. package/index22.mjs +22 -0
  273. package/index220.js +1 -0
  274. package/index220.mjs +110 -0
  275. package/index221.js +1 -0
  276. package/index221.mjs +22 -0
  277. package/index222.js +1 -0
  278. package/index222.mjs +103 -0
  279. package/index223.js +1 -0
  280. package/index223.mjs +49 -0
  281. package/index224.js +1 -0
  282. package/index224.mjs +70 -0
  283. package/index225.js +1 -0
  284. package/index225.mjs +33 -0
  285. package/index226.js +1 -0
  286. package/index226.mjs +11 -0
  287. package/index227.js +1 -0
  288. package/index227.mjs +110 -0
  289. package/index228.js +1 -0
  290. package/index228.mjs +109 -0
  291. package/index229.js +1 -0
  292. package/index229.mjs +9 -0
  293. package/index23.js +1 -0
  294. package/index23.mjs +32 -0
  295. package/index230.js +1 -0
  296. package/index230.mjs +18 -0
  297. package/index231.js +1 -0
  298. package/index231.mjs +31 -0
  299. package/index232.js +1 -0
  300. package/index232.mjs +15 -0
  301. package/index233.js +1 -0
  302. package/index233.mjs +61 -0
  303. package/index234.js +1 -0
  304. package/index234.mjs +11 -0
  305. package/index235.js +1 -0
  306. package/index235.mjs +22 -0
  307. package/index24.js +2 -0
  308. package/index24.mjs +62 -0
  309. package/index25.js +1 -0
  310. package/index25.mjs +15 -0
  311. package/index26.js +1 -0
  312. package/index26.mjs +12 -0
  313. package/index27.js +1 -0
  314. package/index27.mjs +43 -0
  315. package/index28.js +1 -0
  316. package/index28.mjs +34 -0
  317. package/index29.js +1 -0
  318. package/index29.mjs +10 -0
  319. package/index3.js +1 -0
  320. package/index3.mjs +15 -0
  321. package/index30.js +1 -0
  322. package/index30.mjs +72 -0
  323. package/index31.js +1 -0
  324. package/index31.mjs +40 -0
  325. package/index32.js +1 -0
  326. package/index32.mjs +48 -0
  327. package/index33.js +1 -0
  328. package/index33.mjs +90 -0
  329. package/index34.js +1 -0
  330. package/index34.mjs +36 -0
  331. package/index35.js +1 -0
  332. package/index35.mjs +25 -0
  333. package/index36.js +1 -0
  334. package/index36.mjs +27 -0
  335. package/index37.js +1 -0
  336. package/index37.mjs +110 -0
  337. package/index38.js +1 -0
  338. package/index38.mjs +57 -0
  339. package/index39.js +1 -0
  340. package/index39.mjs +21 -0
  341. package/index4.js +1 -0
  342. package/index4.mjs +58 -0
  343. package/index40.js +1 -0
  344. package/index40.mjs +40 -0
  345. package/index41.js +1 -0
  346. package/index41.mjs +54 -0
  347. package/index42.js +1 -0
  348. package/index42.mjs +73 -0
  349. package/index43.js +1 -0
  350. package/index43.mjs +49 -0
  351. package/index44.js +1 -0
  352. package/index44.mjs +13 -0
  353. package/index45.js +1 -0
  354. package/index45.mjs +73 -0
  355. package/index46.js +1 -0
  356. package/index46.mjs +99 -0
  357. package/index47.js +1 -0
  358. package/index47.mjs +45 -0
  359. package/index48.js +1 -0
  360. package/index48.mjs +26 -0
  361. package/index49.js +1 -0
  362. package/index49.mjs +83 -0
  363. package/index5.js +1 -0
  364. package/index5.mjs +136 -0
  365. package/index50.js +1 -0
  366. package/index50.mjs +35 -0
  367. package/index51.js +1 -0
  368. package/index51.mjs +10 -0
  369. package/index52.js +1 -0
  370. package/index52.mjs +13 -0
  371. package/index53.js +1 -0
  372. package/index53.mjs +30 -0
  373. package/index54.js +1 -0
  374. package/index54.mjs +51 -0
  375. package/index55.js +1 -0
  376. package/index55.mjs +10 -0
  377. package/index56.js +1 -0
  378. package/index56.mjs +49 -0
  379. package/index58.js +1 -0
  380. package/index58.mjs +64 -0
  381. package/index59.js +1 -0
  382. package/index59.mjs +62 -0
  383. package/index6.js +1 -0
  384. package/index6.mjs +29 -0
  385. package/index60.js +1 -0
  386. package/index60.mjs +31 -0
  387. package/index61.js +1 -0
  388. package/index61.mjs +23 -0
  389. package/index62.js +1 -0
  390. package/index62.mjs +32 -0
  391. package/index63.js +1 -0
  392. package/index63.mjs +16 -0
  393. package/index64.js +1 -0
  394. package/index64.mjs +61 -0
  395. package/index65.js +1 -0
  396. package/index65.mjs +19 -0
  397. package/index66.js +7 -0
  398. package/index66.mjs +411 -0
  399. package/index7.js +1 -0
  400. package/index7.mjs +8 -0
  401. package/index70.js +1 -0
  402. package/index70.mjs +4 -0
  403. package/index71.js +1 -0
  404. package/index71.mjs +76 -0
  405. package/index72.js +1 -0
  406. package/index72.mjs +31 -0
  407. package/index73.js +1 -0
  408. package/index73.mjs +38 -0
  409. package/index74.js +1 -0
  410. package/index74.mjs +6 -0
  411. package/index75.js +1 -0
  412. package/index75.mjs +37 -0
  413. package/index76.js +1 -0
  414. package/index76.mjs +7 -0
  415. package/index77.js +1 -0
  416. package/index77.mjs +7 -0
  417. package/index78.js +1 -0
  418. package/index78.mjs +7 -0
  419. package/index79.js +1 -0
  420. package/index79.mjs +7 -0
  421. package/index8.js +1 -0
  422. package/index8.mjs +18 -0
  423. package/index80.js +1 -0
  424. package/index80.mjs +7 -0
  425. package/index81.js +1 -0
  426. package/index81.mjs +19 -0
  427. package/index82.js +1 -0
  428. package/index82.mjs +87 -0
  429. package/index83.js +1 -0
  430. package/index83.mjs +8 -0
  431. package/index84.js +1 -0
  432. package/index84.mjs +27 -0
  433. package/index85.js +1 -0
  434. package/index85.mjs +57 -0
  435. package/index87.js +1 -0
  436. package/index87.mjs +7 -0
  437. package/index88.js +1 -0
  438. package/index88.mjs +121 -0
  439. package/index89.js +1 -0
  440. package/index89.mjs +20 -0
  441. package/index9.js +1 -0
  442. package/index9.mjs +18 -0
  443. package/index90.js +1 -0
  444. package/index90.mjs +26 -0
  445. package/index91.js +1 -0
  446. package/index91.mjs +4 -0
  447. package/index92.js +1 -0
  448. package/index92.mjs +237 -0
  449. package/index93.js +1 -0
  450. package/index93.mjs +4 -0
  451. package/index94.js +1 -0
  452. package/index94.mjs +13 -0
  453. package/index95.js +1 -0
  454. package/index95.mjs +249 -0
  455. package/index96.js +1 -0
  456. package/index96.mjs +91 -0
  457. package/index97.js +1 -0
  458. package/index97.mjs +15 -0
  459. package/index98.js +1 -0
  460. package/index98.mjs +6 -0
  461. package/index99.js +1 -0
  462. package/index99.mjs +4 -0
  463. package/lib/atoms/input/text-field/TextField.d.ts +1 -1
  464. package/lib/atoms/select/Select.types.d.ts +1 -1
  465. package/lib/base/icon/Icon.d.ts +1 -1
  466. package/lib/molecules/datepicker/Calendar.d.ts +1 -1
  467. package/lib/molecules/flyout/Flyout.d.ts +1 -1
  468. package/lib/molecules/tag/Tag.d.ts +1 -1
  469. package/package.json +4 -1
  470. package/packages/antwerp-ui/react-components/src/lib/atoms/input/text-field/TextField.css +1 -0
  471. package/packages/antwerp-ui/react-components/src/lib/atoms/tooltip/Tooltip.css +1 -0
  472. package/packages/antwerp-ui/react-components/src/lib/molecules/autocomplete/Autocomplete.css +1 -0
  473. package/packages/antwerp-ui/react-components/src/lib/molecules/datepicker/DateRangePicker.css +1 -0
  474. package/utils/math.utils.d.ts +1 -1
  475. package/index.css +0 -1
package/index165.mjs ADDED
@@ -0,0 +1,8 @@
1
+ import { toDate as n } from "./index149.mjs";
2
+ function a(o, e) {
3
+ const t = n(o, e?.in).getDay();
4
+ return t === 0 ? 7 : t;
5
+ }
6
+ export {
7
+ a as getISODay
8
+ };
package/index166.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index150.js"),s=require("./index167.js"),a=require("./index168.js"),i=require("./index149.js");function c(t,r){const e=i.toDate(t,r?.in),n=+s.startOfISOWeek(e)-+a.startOfISOWeekYear(e);return Math.round(n/o.millisecondsInWeek)+1}exports.getISOWeek=c;
package/index166.mjs ADDED
@@ -0,0 +1,11 @@
1
+ import { millisecondsInWeek as f } from "./index150.mjs";
2
+ import { startOfISOWeek as i } from "./index167.mjs";
3
+ import { startOfISOWeekYear as m } from "./index168.mjs";
4
+ import { toDate as n } from "./index149.mjs";
5
+ function c(e, o) {
6
+ const t = n(e, o?.in), r = +i(t) - +m(t);
7
+ return Math.round(r / f) + 1;
8
+ }
9
+ export {
10
+ c as getISOWeek
11
+ };
package/index167.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index122.js");function s(e,t){return r.startOfWeek(e,{...t,weekStartsOn:1})}exports.startOfISOWeek=s;
package/index167.mjs ADDED
@@ -0,0 +1,7 @@
1
+ import { startOfWeek as r } from "./index122.mjs";
2
+ function n(t, e) {
3
+ return r(t, { ...e, weekStartsOn: 1 });
4
+ }
5
+ export {
6
+ n as startOfISOWeek
7
+ };
package/index168.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index148.js"),u=require("./index169.js"),a=require("./index167.js");function n(r,t){const o=u.getISOWeekYear(r,t),e=s.constructFrom(r,0);return e.setFullYear(o,0,4),e.setHours(0,0,0,0),a.startOfISOWeek(e)}exports.startOfISOWeekYear=n;
package/index168.mjs ADDED
@@ -0,0 +1,10 @@
1
+ import { constructFrom as f } from "./index148.mjs";
2
+ import { getISOWeekYear as s } from "./index169.mjs";
3
+ import { startOfISOWeek as a } from "./index167.mjs";
4
+ function O(t, e) {
5
+ const o = s(t, e), r = f(t, 0);
6
+ return r.setFullYear(o, 0, 4), r.setHours(0, 0, 0, 0), a(r);
7
+ }
8
+ export {
9
+ O as startOfISOWeekYear
10
+ };
package/index169.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index148.js"),a=require("./index167.js"),f=require("./index149.js");function O(n,u){const e=f.toDate(n,u?.in),t=e.getFullYear(),r=o.constructFrom(e,0);r.setFullYear(t+1,0,4),r.setHours(0,0,0,0);const c=a.startOfISOWeek(r),s=o.constructFrom(e,0);s.setFullYear(t,0,4),s.setHours(0,0,0,0);const i=a.startOfISOWeek(s);return e.getTime()>=c.getTime()?t+1:e.getTime()>=i.getTime()?t:t-1}exports.getISOWeekYear=O;
package/index169.mjs ADDED
@@ -0,0 +1,14 @@
1
+ import { constructFrom as s } from "./index148.mjs";
2
+ import { startOfISOWeek as a } from "./index167.mjs";
3
+ import { toDate as m } from "./index149.mjs";
4
+ function Y(f, n) {
5
+ const e = m(f, n?.in), t = e.getFullYear(), r = s(e, 0);
6
+ r.setFullYear(t + 1, 0, 4), r.setHours(0, 0, 0, 0);
7
+ const u = a(r), o = s(e, 0);
8
+ o.setFullYear(t, 0, 4), o.setHours(0, 0, 0, 0);
9
+ const i = a(o);
10
+ return e.getTime() >= u.getTime() ? t + 1 : e.getTime() >= i.getTime() ? t : t - 1;
11
+ }
12
+ export {
13
+ Y as getISOWeekYear
14
+ };
package/index17.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("react"),p=require("./index56.js"),N=require("./index18.js");;/* empty css */const z=require("./index52.js"),K=require("./index87.js"),$=require("./index88.js");function U({id:n="aui-date-range-picker",fromLabel:u="Van",toLabel:m="tot en met",value:o=["",""],onChange:f,format:S=z.DEFAULT_DATE_FORMAT,fromInputProps:y={},toInputProps:E={},calendarProps:D={},qa:P}){const[i,c]=s.useState({from:!1,to:!1}),[b,h]=s.useState(!1),[x,T]=s.useState(!1),[O,g]=s.useState(!1),[a,k]=s.useState({from:!1,to:!1}),[d,_]=s.useState(o||["",""]);s.useEffect(()=>{x&&(c({from:!0,to:!1}),T(!1))},[x]);const F=(e,l)=>{if(O)return g(!1),j(e,l);e&&!l&&(T(!0),g(!0));const t=[e,i.from||i.to?"":d[1]];_(t),k({...a,from:!e&&!!l}),f&&f(t)},j=(e,l)=>{let t=d[0];if(!t&&e){const A=new Date($.parseISO(e)),I=new Date;t=A>I?I.toISOString():e}_([t,e]),k({...a,to:!e&&!!l}),f&&f([t,e]),c({from:!1,to:!1})},q=d[0]?K.subDays(new Date($.parseISO(d[0]))).toISOString():"",C=a.from||a.to,R=[...a.from?[`Ongeldige "${u}" datum.`]:[],...a.to?[`Ongeldige "${m}" datum.`]:[]],w=e=>{if(b){h(!1);return}c({from:e,to:!1})},M=()=>{c({from:!1,to:!i.to}),h(!0),g(!0)};return r.jsxs("div",{className:"m-daterangepicker","data-qa":P,children:[r.jsxs("div",{className:"u-container-horizontal",children:[u&&p.renderLabel({noMargin:C,label:u,id:`${n}-from`,className:"m-daterangepicker__full u-margin-right-xs"}),m&&p.renderLabel({noMargin:C,label:m,id:`${n}-to`,className:"m-daterangepicker__full"})]}),p.renderDescription({id:`${n}`,description:R.join(" "),state:"error"}),r.jsxs("div",{className:"u-container-horizontal",children:[r.jsx("div",{className:"m-daterangepicker__full u-margin-right-xs",children:r.jsx(N.Datepicker,{format:S,value:o[0],inputProps:{...y,id:`${n}-from`},calendarProps:{...D,...O?{unavailableTo:q}:{},highlightDates:o,hoverStart:o[0]},onChange:F,invalidDateText:"",openLeft:!0,open:i.from||i.to,onCalendarToggle:w,onEscKey:()=>c({from:!1,to:!1})})}),r.jsx("div",{className:"m-daterangepicker__full",children:r.jsx(N.Datepicker,{open:!1,format:S,inputProps:{...E,id:`${n}-to`},value:o[1],calendarProps:{...D,unavailableTo:q},noCalendar:!0,onChange:j,invalidDateText:"",onIconClick:M})})]})]})}exports.DateRangePicker=U;
package/index17.mjs ADDED
@@ -0,0 +1,108 @@
1
+ import { jsxs as u, jsx as m } from "react/jsx-runtime";
2
+ import { useState as o, useEffect as K } from "react";
3
+ import { renderLabel as I, renderDescription as U } from "./index56.mjs";
4
+ import { Datepicker as F } from "./index18.mjs";
5
+ /* empty css */
6
+ import { DEFAULT_DATE_FORMAT as V } from "./index52.mjs";
7
+ import { subDays as B } from "./index87.mjs";
8
+ import { parseISO as w } from "./index88.mjs";
9
+ function v({
10
+ id: n = "aui-date-range-picker",
11
+ fromLabel: d = "Van",
12
+ toLabel: g = "tot en met",
13
+ value: a = ["", ""],
14
+ onChange: f,
15
+ format: h = V,
16
+ fromInputProps: P = {},
17
+ toInputProps: j = {},
18
+ calendarProps: T = {},
19
+ qa: y
20
+ }) {
21
+ const [s, i] = o({ from: !1, to: !1 }), [A, D] = o(!1), [x, O] = o(!1), [_, p] = o(!1), [t, k] = o({ from: !1, to: !1 }), [c, C] = o(a || ["", ""]);
22
+ K(() => {
23
+ x && (i({ from: !0, to: !1 }), O(!1));
24
+ }, [x]);
25
+ const M = (e, l) => {
26
+ if (_)
27
+ return p(!1), S(e, l);
28
+ e && !l && (O(!0), p(!0));
29
+ const r = [e, s.from || s.to ? "" : c[1]];
30
+ C(r), k({ ...t, from: !e && !!l }), f && f(r);
31
+ }, S = (e, l) => {
32
+ let r = c[0];
33
+ if (!r && e) {
34
+ const q = new Date(w(e)), E = /* @__PURE__ */ new Date();
35
+ r = q > E ? E.toISOString() : e;
36
+ }
37
+ C([r, e]), k({ ...t, to: !e && !!l }), f && f([r, e]), i({ from: !1, to: !1 });
38
+ }, N = c[0] ? B(new Date(w(c[0]))).toISOString() : "", $ = t.from || t.to, z = [
39
+ ...t.from ? [`Ongeldige "${d}" datum.`] : [],
40
+ ...t.to ? [`Ongeldige "${g}" datum.`] : []
41
+ ], R = (e) => {
42
+ if (A) {
43
+ D(!1);
44
+ return;
45
+ }
46
+ i({ from: e, to: !1 });
47
+ }, b = () => {
48
+ i({ from: !1, to: !s.to }), D(!0), p(!0);
49
+ };
50
+ return /* @__PURE__ */ u("div", { className: "m-daterangepicker", "data-qa": y, children: [
51
+ /* @__PURE__ */ u("div", { className: "u-container-horizontal", children: [
52
+ d && I({
53
+ noMargin: $,
54
+ label: d,
55
+ id: `${n}-from`,
56
+ className: "m-daterangepicker__full u-margin-right-xs"
57
+ }),
58
+ g && I({ noMargin: $, label: g, id: `${n}-to`, className: "m-daterangepicker__full" })
59
+ ] }),
60
+ U({
61
+ id: `${n}`,
62
+ description: z.join(" "),
63
+ state: "error"
64
+ }),
65
+ /* @__PURE__ */ u("div", { className: "u-container-horizontal", children: [
66
+ /* @__PURE__ */ m("div", { className: "m-daterangepicker__full u-margin-right-xs", children: /* @__PURE__ */ m(
67
+ F,
68
+ {
69
+ format: h,
70
+ value: a[0],
71
+ inputProps: { ...P, id: `${n}-from` },
72
+ calendarProps: {
73
+ ...T,
74
+ ..._ ? { unavailableTo: N } : {},
75
+ highlightDates: a,
76
+ hoverStart: a[0]
77
+ },
78
+ onChange: M,
79
+ invalidDateText: "",
80
+ openLeft: !0,
81
+ open: s.from || s.to,
82
+ onCalendarToggle: R,
83
+ onEscKey: () => i({ from: !1, to: !1 })
84
+ }
85
+ ) }),
86
+ /* @__PURE__ */ m("div", { className: "m-daterangepicker__full", children: /* @__PURE__ */ m(
87
+ F,
88
+ {
89
+ open: !1,
90
+ format: h,
91
+ inputProps: { ...j, id: `${n}-to` },
92
+ value: a[1],
93
+ calendarProps: {
94
+ ...T,
95
+ unavailableTo: N
96
+ },
97
+ noCalendar: !0,
98
+ onChange: S,
99
+ invalidDateText: "",
100
+ onIconClick: b
101
+ }
102
+ ) })
103
+ ] })
104
+ ] });
105
+ }
106
+ export {
107
+ v as DateRangePicker
108
+ };
package/index170.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index150.js"),a=require("./index122.js"),o=require("./index171.js"),c=require("./index149.js");function i(r,e){const t=c.toDate(r,e?.in),n=+a.startOfWeek(t,e)-+o.startOfWeekYear(t,e);return Math.round(n/s.millisecondsInWeek)+1}exports.getWeek=i;
package/index170.mjs ADDED
@@ -0,0 +1,11 @@
1
+ import { millisecondsInWeek as f } from "./index150.mjs";
2
+ import { startOfWeek as m } from "./index122.mjs";
3
+ import { startOfWeekYear as i } from "./index171.mjs";
4
+ import { toDate as n } from "./index149.mjs";
5
+ function s(r, t) {
6
+ const e = n(r, t?.in), o = +m(e, t) - +i(e, t);
7
+ return Math.round(o / f) + 1;
8
+ }
9
+ export {
10
+ s as getWeek
11
+ };
package/index171.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index156.js"),i=require("./index148.js"),c=require("./index172.js"),u=require("./index122.js");function f(r,e){const s=o.getDefaultOptions(),a=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,n=c.getWeekYear(r,e),t=i.constructFrom(e?.in||r,0);return t.setFullYear(n,0,a),t.setHours(0,0,0,0),u.startOfWeek(t,e)}exports.startOfWeekYear=f;
package/index171.mjs ADDED
@@ -0,0 +1,11 @@
1
+ import { getDefaultOptions as n } from "./index156.mjs";
2
+ import { constructFrom as i } from "./index148.mjs";
3
+ import { getWeekYear as f } from "./index172.mjs";
4
+ import { startOfWeek as c } from "./index122.mjs";
5
+ function D(r, t) {
6
+ const o = n(), s = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, a = f(r, t), e = i(t?.in || r, 0);
7
+ return e.setFullYear(a, 0, s), e.setHours(0, 0, 0, 0), c(e, t);
8
+ }
9
+ export {
10
+ D as startOfWeekYear
11
+ };
package/index172.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./index156.js"),c=require("./index148.js"),u=require("./index122.js"),W=require("./index149.js");function O(r,e){const s=W.toDate(r,e?.in),t=s.getFullYear(),o=k.getDefaultOptions(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=c.constructFrom(e?.in||r,0);n.setFullYear(t+1,0,i),n.setHours(0,0,0,0);const f=u.startOfWeek(n,e),a=c.constructFrom(e?.in||r,0);a.setFullYear(t,0,i),a.setHours(0,0,0,0);const l=u.startOfWeek(a,e);return+s>=+f?t+1:+s>=+l?t:t-1}exports.getWeekYear=O;
package/index172.mjs ADDED
@@ -0,0 +1,15 @@
1
+ import { getDefaultOptions as k } from "./index156.mjs";
2
+ import { constructFrom as f } from "./index148.mjs";
3
+ import { startOfWeek as l } from "./index122.mjs";
4
+ import { toDate as m } from "./index149.mjs";
5
+ function C(r, e) {
6
+ const s = m(r, e?.in), t = s.getFullYear(), o = k(), i = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, a = f(e?.in || r, 0);
7
+ a.setFullYear(t + 1, 0, i), a.setHours(0, 0, 0, 0);
8
+ const c = l(a, e), n = f(e?.in || r, 0);
9
+ n.setFullYear(t, 0, i), n.setHours(0, 0, 0, 0);
10
+ const u = l(n, e);
11
+ return +s >= +c ? t + 1 : +s >= +u ? t : t - 1;
12
+ }
13
+ export {
14
+ C as getWeekYear
15
+ };
package/index173.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}exports.isDate=e;
package/index173.mjs ADDED
@@ -0,0 +1,6 @@
1
+ function e(t) {
2
+ return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
3
+ }
4
+ export {
5
+ e as isDate
6
+ };
package/index174.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index148.js"),n=require("./index180.js"),c=10;class s{subPriority=0;validate(t,e){return!0}}class l extends s{constructor(t,e,r,a,u){super(),this.value=t,this.validateValue=e,this.setValue=r,this.priority=a,u&&(this.subPriority=u)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,r){return this.setValue(t,e,this.value,r)}}class h extends s{priority=c;subPriority=-1;constructor(t,e){super(),this.context=t||(r=>o.constructFrom(e,r))}set(t,e){return e.timestampIsSet?t:o.constructFrom(t,n.transpose(t,this.context))}}exports.DateTimezoneSetter=h;exports.Setter=s;exports.ValueSetter=l;
package/index174.mjs ADDED
@@ -0,0 +1,35 @@
1
+ import { constructFrom as o } from "./index148.mjs";
2
+ import { transpose as n } from "./index180.mjs";
3
+ const l = 10;
4
+ class u {
5
+ subPriority = 0;
6
+ validate(t, e) {
7
+ return !0;
8
+ }
9
+ }
10
+ class p extends u {
11
+ constructor(t, e, r, a, i) {
12
+ super(), this.value = t, this.validateValue = e, this.setValue = r, this.priority = a, i && (this.subPriority = i);
13
+ }
14
+ validate(t, e) {
15
+ return this.validateValue(t, this.value, e);
16
+ }
17
+ set(t, e, r) {
18
+ return this.setValue(t, e, this.value, r);
19
+ }
20
+ }
21
+ class m extends u {
22
+ priority = l;
23
+ subPriority = -1;
24
+ constructor(t, e) {
25
+ super(), this.context = t || ((r) => o(e, r));
26
+ }
27
+ set(t, e) {
28
+ return e.timestampIsSet ? t : o(t, n(t, this.context));
29
+ }
30
+ }
31
+ export {
32
+ m as DateTimezoneSetter,
33
+ u as Setter,
34
+ p as ValueSetter
35
+ };
package/index175.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index185.js"),r=require("./index186.js"),a=require("./index187.js"),s=require("./index188.js"),n=require("./index189.js"),o=require("./index190.js"),t=require("./index191.js"),P=require("./index192.js"),i=require("./index193.js"),c=require("./index194.js"),u=require("./index195.js"),q=require("./index196.js"),w=require("./index197.js"),d=require("./index198.js"),S=require("./index199.js"),l=require("./index200.js"),M=require("./index201.js"),y=require("./index202.js"),D=require("./index203.js"),O=require("./index204.js"),m=require("./index205.js"),T=require("./index206.js"),I=require("./index207.js"),Y=require("./index208.js"),A=require("./index209.js"),W=require("./index210.js"),h=require("./index211.js"),k=require("./index212.js"),H=require("./index213.js"),L=require("./index214.js"),p=require("./index215.js"),f={G:new e.EraParser,y:new r.YearParser,Y:new a.LocalWeekYearParser,R:new s.ISOWeekYearParser,u:new n.ExtendedYearParser,Q:new o.QuarterParser,q:new t.StandAloneQuarterParser,M:new P.MonthParser,L:new i.StandAloneMonthParser,w:new c.LocalWeekParser,I:new u.ISOWeekParser,d:new q.DateParser,D:new w.DayOfYearParser,E:new d.DayParser,e:new S.LocalDayParser,c:new l.StandAloneLocalDayParser,i:new M.ISODayParser,a:new y.AMPMParser,b:new D.AMPMMidnightParser,B:new O.DayPeriodParser,h:new m.Hour1to12Parser,H:new T.Hour0to23Parser,K:new I.Hour0To11Parser,k:new Y.Hour1To24Parser,m:new A.MinuteParser,s:new W.SecondParser,S:new h.FractionOfSecondParser,X:new k.ISOTimezoneWithZParser,x:new H.ISOTimezoneParser,t:new L.TimestampSecondsParser,T:new p.TimestampMillisecondsParser};exports.parsers=f;
package/index175.mjs ADDED
@@ -0,0 +1,67 @@
1
+ import { EraParser as r } from "./index185.mjs";
2
+ import { YearParser as e } from "./index186.mjs";
3
+ import { LocalWeekYearParser as o } from "./index187.mjs";
4
+ import { ISOWeekYearParser as m } from "./index188.mjs";
5
+ import { ExtendedYearParser as a } from "./index189.mjs";
6
+ import { QuarterParser as t } from "./index190.mjs";
7
+ import { StandAloneQuarterParser as n } from "./index191.mjs";
8
+ import { MonthParser as i } from "./index192.mjs";
9
+ import { StandAloneMonthParser as s } from "./index193.mjs";
10
+ import { LocalWeekParser as p } from "./index194.mjs";
11
+ import { ISOWeekParser as P } from "./index195.mjs";
12
+ import { DateParser as f } from "./index196.mjs";
13
+ import { DayOfYearParser as w } from "./index197.mjs";
14
+ import { DayParser as d } from "./index198.mjs";
15
+ import { LocalDayParser as S } from "./index199.mjs";
16
+ import { StandAloneLocalDayParser as c } from "./index200.mjs";
17
+ import { ISODayParser as M } from "./index201.mjs";
18
+ import { AMPMParser as l } from "./index202.mjs";
19
+ import { AMPMMidnightParser as u } from "./index203.mjs";
20
+ import { DayPeriodParser as D } from "./index204.mjs";
21
+ import { Hour1to12Parser as y } from "./index205.mjs";
22
+ import { Hour0to23Parser as O } from "./index206.mjs";
23
+ import { Hour0To11Parser as T } from "./index207.mjs";
24
+ import { Hour1To24Parser as I } from "./index208.mjs";
25
+ import { MinuteParser as Y } from "./index209.mjs";
26
+ import { SecondParser as h } from "./index210.mjs";
27
+ import { FractionOfSecondParser as k } from "./index211.mjs";
28
+ import { ISOTimezoneWithZParser as A } from "./index212.mjs";
29
+ import { ISOTimezoneParser as H } from "./index213.mjs";
30
+ import { TimestampSecondsParser as L } from "./index214.mjs";
31
+ import { TimestampMillisecondsParser as W } from "./index215.mjs";
32
+ const sr = {
33
+ G: new r(),
34
+ y: new e(),
35
+ Y: new o(),
36
+ R: new m(),
37
+ u: new a(),
38
+ Q: new t(),
39
+ q: new n(),
40
+ M: new i(),
41
+ L: new s(),
42
+ w: new p(),
43
+ I: new P(),
44
+ d: new f(),
45
+ D: new w(),
46
+ E: new d(),
47
+ e: new S(),
48
+ c: new c(),
49
+ i: new M(),
50
+ a: new l(),
51
+ b: new u(),
52
+ B: new D(),
53
+ h: new y(),
54
+ H: new O(),
55
+ K: new T(),
56
+ k: new I(),
57
+ m: new Y(),
58
+ s: new h(),
59
+ S: new k(),
60
+ X: new A(),
61
+ x: new H(),
62
+ t: new L(),
63
+ T: new W()
64
+ };
65
+ export {
66
+ sr as parsers
67
+ };
package/index176.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index156.js"),l=require("./index127.js"),D=require("./index149.js");function O(o,t,e){const a=u.getDefaultOptions(),c=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,s=D.toDate(o,e?.in),r=s.getDay(),i=(t%7+7)%7,n=7-c,d=t<0||t>6?t-(r+n)%7:(i+n)%7-(r+n)%7;return l.addDays(s,d,e)}exports.setDay=O;
package/index176.mjs ADDED
@@ -0,0 +1,10 @@
1
+ import { getDefaultOptions as m } from "./index156.mjs";
2
+ import { addDays as d } from "./index127.mjs";
3
+ import { toDate as l } from "./index149.mjs";
4
+ function u(s, t, e) {
5
+ const r = m(), c = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, o = l(s, e?.in), a = o.getDay(), i = (t % 7 + 7) % 7, n = 7 - c, f = t < 0 || t > 6 ? t - (a + n) % 7 : (i + n) % 7 - (a + n) % 7;
6
+ return d(o, f, e);
7
+ }
8
+ export {
9
+ u as setDay
10
+ };
package/index177.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index127.js"),o=require("./index165.js"),u=require("./index149.js");function y(a,r,e){const t=u.toDate(a,e?.in),n=o.getISODay(t,e),c=r-n;return s.addDays(t,c,e)}exports.setISODay=y;
package/index177.mjs ADDED
@@ -0,0 +1,10 @@
1
+ import { addDays as m } from "./index127.mjs";
2
+ import { getISODay as n } from "./index165.mjs";
3
+ import { toDate as c } from "./index149.mjs";
4
+ function y(o, a, t) {
5
+ const r = c(o, t?.in), e = n(r, t), f = a - e;
6
+ return m(r, f, t);
7
+ }
8
+ export {
9
+ y as setISODay
10
+ };
package/index178.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index166.js"),a=require("./index149.js");function c(r,n,t){const e=a.toDate(r,t?.in),o=s.getISOWeek(e,t)-n;return e.setDate(e.getDate()-o*7),e}exports.setISOWeek=c;
package/index178.mjs ADDED
@@ -0,0 +1,9 @@
1
+ import { getISOWeek as n } from "./index166.mjs";
2
+ import { toDate as a } from "./index149.mjs";
3
+ function c(o, r, e) {
4
+ const t = a(o, e?.in), f = n(t, e) - r;
5
+ return t.setDate(t.getDate() - f * 7), t;
6
+ }
7
+ export {
8
+ c as setISOWeek
9
+ };
package/index179.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index170.js"),r=require("./index149.js");function i(n,a,t){const e=r.toDate(n,t?.in),o=c.getWeek(e,t)-a;return e.setDate(e.getDate()-o*7),r.toDate(e,t?.in)}exports.setWeek=i;
package/index179.mjs ADDED
@@ -0,0 +1,9 @@
1
+ import { getWeek as a } from "./index170.mjs";
2
+ import { toDate as r } from "./index149.mjs";
3
+ function c(f, n, t) {
4
+ const e = r(f, t?.in), o = a(e, t) - n;
5
+ return e.setDate(e.getDate() - o * 7), r(e, t?.in);
6
+ }
7
+ export {
8
+ c as setWeek
9
+ };
package/index18.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const q=require("react/jsx-runtime"),p=require("./index52.js"),x=require("./index56.js"),$=require("./index60.js"),P=require("./index12.js"),r=require("react"),I=require("./index75.js"),F=require("./index82.js"),L=require("./index83.js"),ee=require("./index46.js"),te=require("./index24.js"),se=require("./index84.js"),C=require("./index85.js");function M({qa:N,value:a,onChange:l,format:c=p.DEFAULT_DATE_FORMAT,inputProps:s={id:"aui-datepicker-input"},invalidDateText:i,iconButtonLabel:T="Open kalender",calendarProps:g,label:_,openLeft:A=!1,required:B,open:n,noCalendar:K,onIconClick:m,onCalendarToggle:y,errorMsgFunction:h,onEscKey:v}){const U=r.useRef(null),[R,D]=r.useState(a?I.formatIfValid(a,c):""),[z,k]=r.useState(a||""),[E,u]=r.useState(""),[d,G]=r.useState(n||!1),[H,O]=r.useState(!1);r.useEffect(()=>{j(R)},[i]),r.useEffect(()=>{!n&&!d&&O(!1)},[n,d]),r.useEffect(()=>{D(a?I.formatIfValid(a,c):""),k(a||"")},[a]);const b=(e,t)=>{G(e),y&&y(e,t)},J=()=>{setTimeout(()=>{const e=o.current?.querySelector(".is-selected")||o.current?.querySelector(".is-current:not(.is-unavailable)")||o.current?.querySelector(".m-datepicker__nav-title");e&&!e.classList.contains("is-unavailable")&&e.focus()},50)},V=e=>{e.code==="Escape"&&(b(!1),v&&v())},Q=()=>{O(!1),b(!1)},{elementRef:o}=$.useOutsideClick(Q);r.useEffect(()=>((n||d)&&(o.current?.addEventListener("keydown",V),J()),()=>o.current?.removeEventListener("keydown",V)),[n,d,m]);const W=e=>{const t=e.target.value,f=new Date(F.parse(t,c,new Date));if(D(t),s.onChange&&s.onChange(e),!j(t)&&L.isValid(f)){const w=se.formatISO(f);u(""),k(w),l&&l(w,t)}else!t&&k(""),l&&l("",t)},j=e=>{if(h){const S=h(e);return u(S||""),!!S}const t=e||"",f=new Date(F.parse(t,c,new Date)),w=!t||t.length===c.length&&L.isValid(f);return t&&!w||I.isInRange(f,g?.unavailableFrom,g?.unavailableTo,g?.unavailable)?(u(i===null?"":i??"Ongeldige datum"),!0):i?(u(i),!0):!1},X=e=>{let t=C.format(new Date(e),c);try{t=C.format(new Date(a||e),c)}catch{}k(e),l&&l(e),D(t),u(""),b(!1,e)},Y=e=>{e.code==="Enter"&&(m?m(!0):b(!0))},Z=e=>{if(H){O(!1);return}O(!0),e.preventDefault(),e.stopPropagation(),m?m(!n):b(!d)};return q.jsxs("div",{className:"a-input has-icon-right","data-qa":N,children:[(_||s?.label)&&x.renderLabel({label:_||s?.label,id:s?.id,required:B}),x.renderDescription({id:s?.id,description:E||s?.description,state:E?"error":s?.state}),q.jsxs("div",{className:"a-input__wrapper",children:[q.jsx(ee.TextField,{...s,label:void 0,description:void 0,type:"text",value:s.value||R,onChange:W,state:E?"error":s?.state,ariaDescribedBy:`${s?.id}--description`}),q.jsx(te.Icon,{tabIndex:0,screenReaderText:T,name:"calendar",role:"button",onClick:Z,className:s?.disabled?"":"is-clickable",onKeyDown:Y,ref:U}),K?null:q.jsx(P.Calendar,{ref:o,className:`m-datepicker--fixed ${A?"m-datepicker--left":""}`,isOpen:n!==void 0?n:d,onChange:X,value:z,isModal:!0,...g})]})]})}exports.Datepicker=M;exports.default=M;
package/index18.mjs ADDED
@@ -0,0 +1,136 @@
1
+ import { jsxs as V, jsx as h } from "react/jsx-runtime";
2
+ import { DEFAULT_DATE_FORMAT as Z } from "./index52.mjs";
3
+ import { renderLabel as $, renderDescription as P } from "./index56.mjs";
4
+ import { useOutsideClick as ee } from "./index60.mjs";
5
+ import { Calendar as te } from "./index12.mjs";
6
+ import { useRef as re, useState as b, useEffect as O } from "react";
7
+ import { formatIfValid as q, isInRange as ae } from "./index75.mjs";
8
+ import { parse as N } from "./index82.mjs";
9
+ import { isValid as A } from "./index83.mjs";
10
+ import { TextField as se } from "./index46.mjs";
11
+ import { Icon as ne } from "./index24.mjs";
12
+ import { formatISO as ie } from "./index84.mjs";
13
+ import { format as C } from "./index85.mjs";
14
+ function Ee({
15
+ qa: j,
16
+ value: a,
17
+ onChange: c,
18
+ format: n = Z,
19
+ inputProps: r = { id: "aui-datepicker-input" },
20
+ invalidDateText: i,
21
+ iconButtonLabel: x = "Open kalender",
22
+ calendarProps: g,
23
+ label: p,
24
+ openLeft: M = !1,
25
+ required: T,
26
+ open: s,
27
+ noCalendar: B,
28
+ onIconClick: m,
29
+ onCalendarToggle: v,
30
+ errorMsgFunction: R,
31
+ onEscKey: S
32
+ }) {
33
+ const K = re(null), [_, E] = b(a ? q(a, n) : ""), [U, w] = b(a || ""), [y, l] = b(""), [o, z] = b(s || !1), [G, k] = b(!1);
34
+ O(() => {
35
+ L(_);
36
+ }, [i]), O(() => {
37
+ !s && !o && k(!1);
38
+ }, [s, o]), O(() => {
39
+ E(a ? q(a, n) : ""), w(a || "");
40
+ }, [a]);
41
+ const u = (e, t) => {
42
+ z(e), v && v(e, t);
43
+ }, H = () => {
44
+ setTimeout(() => {
45
+ const e = d.current?.querySelector(".is-selected") || d.current?.querySelector(".is-current:not(.is-unavailable)") || d.current?.querySelector(".m-datepicker__nav-title");
46
+ e && !e.classList.contains("is-unavailable") && e.focus();
47
+ }, 50);
48
+ }, F = (e) => {
49
+ e.code === "Escape" && (u(!1), S && S());
50
+ }, J = () => {
51
+ k(!1), u(!1);
52
+ }, { elementRef: d } = ee(J);
53
+ O(() => ((s || o) && (d.current?.addEventListener("keydown", F), H()), () => d.current?.removeEventListener("keydown", F)), [s, o, m]);
54
+ const Q = (e) => {
55
+ const t = e.target.value, f = new Date(N(t, n, /* @__PURE__ */ new Date()));
56
+ if (E(t), r.onChange && r.onChange(e), !L(t) && A(f)) {
57
+ const D = ie(f);
58
+ l(""), w(D), c && c(D, t);
59
+ } else
60
+ !t && w(""), c && c("", t);
61
+ }, L = (e) => {
62
+ if (R) {
63
+ const I = R(e);
64
+ return l(I || ""), !!I;
65
+ }
66
+ const t = e || "", f = new Date(N(t, n, /* @__PURE__ */ new Date())), D = !t || t.length === n.length && A(f);
67
+ return t && !D || ae(f, g?.unavailableFrom, g?.unavailableTo, g?.unavailable) ? (l(i === null ? "" : i ?? "Ongeldige datum"), !0) : i ? (l(i), !0) : !1;
68
+ }, W = (e) => {
69
+ let t = C(new Date(e), n);
70
+ try {
71
+ t = C(new Date(a || e), n);
72
+ } catch {
73
+ }
74
+ w(e), c && c(e), E(t), l(""), u(!1, e);
75
+ }, X = (e) => {
76
+ e.code === "Enter" && (m ? m(!0) : u(!0));
77
+ }, Y = (e) => {
78
+ if (G) {
79
+ k(!1);
80
+ return;
81
+ }
82
+ k(!0), e.preventDefault(), e.stopPropagation(), m ? m(!s) : u(!o);
83
+ };
84
+ return /* @__PURE__ */ V("div", { className: "a-input has-icon-right", "data-qa": j, children: [
85
+ (p || r?.label) && $({ label: p || r?.label, id: r?.id, required: T }),
86
+ P({
87
+ id: r?.id,
88
+ description: y || r?.description,
89
+ state: y ? "error" : r?.state
90
+ }),
91
+ /* @__PURE__ */ V("div", { className: "a-input__wrapper", children: [
92
+ /* @__PURE__ */ h(
93
+ se,
94
+ {
95
+ ...r,
96
+ label: void 0,
97
+ description: void 0,
98
+ type: "text",
99
+ value: r.value || _,
100
+ onChange: Q,
101
+ state: y ? "error" : r?.state,
102
+ ariaDescribedBy: `${r?.id}--description`
103
+ }
104
+ ),
105
+ /* @__PURE__ */ h(
106
+ ne,
107
+ {
108
+ tabIndex: 0,
109
+ screenReaderText: x,
110
+ name: "calendar",
111
+ role: "button",
112
+ onClick: Y,
113
+ className: r?.disabled ? "" : "is-clickable",
114
+ onKeyDown: X,
115
+ ref: K
116
+ }
117
+ ),
118
+ B ? null : /* @__PURE__ */ h(
119
+ te,
120
+ {
121
+ ref: d,
122
+ className: `m-datepicker--fixed ${M ? "m-datepicker--left" : ""}`,
123
+ isOpen: s !== void 0 ? s : o,
124
+ onChange: W,
125
+ value: U,
126
+ isModal: !0,
127
+ ...g
128
+ }
129
+ )
130
+ ] })
131
+ ] });
132
+ }
133
+ export {
134
+ Ee as Datepicker,
135
+ Ee as default
136
+ };
package/index180.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index148.js");function r(e,t){const n=s(t)?new t(0):o.constructFrom(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function s(e){return typeof e=="function"&&e.prototype?.constructor===e}exports.transpose=r;
package/index180.mjs ADDED
@@ -0,0 +1,16 @@
1
+ import { constructFrom as o } from "./index148.mjs";
2
+ function u(e, t) {
3
+ const n = r(t) ? new t(0) : o(t, 0);
4
+ return n.setFullYear(e.getFullYear(), e.getMonth(), e.getDate()), n.setHours(
5
+ e.getHours(),
6
+ e.getMinutes(),
7
+ e.getSeconds(),
8
+ e.getMilliseconds()
9
+ ), n;
10
+ }
11
+ function r(e) {
12
+ return typeof e == "function" && e.prototype?.constructor === e;
13
+ }
14
+ export {
15
+ u as transpose
16
+ };
package/index181.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
package/index181.mjs ADDED
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
package/index182.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
package/index182.mjs ADDED
@@ -0,0 +1,4 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
package/index183.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
package/index183.mjs ADDED
@@ -0,0 +1,4 @@
1
+ var a = { exports: {} };
2
+ export {
3
+ a as __module
4
+ };
package/index184.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index161.js"),d={y(t,e){const a=t.getFullYear(),n=a>0?a:1-a;return r.addLeadingZeros(e==="yy"?n%100:n,e.length)},M(t,e){const a=t.getMonth();return e==="M"?String(a+1):r.addLeadingZeros(a+1,2)},d(t,e){return r.addLeadingZeros(t.getDate(),e.length)},a(t,e){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(t,e){return r.addLeadingZeros(t.getHours()%12||12,e.length)},H(t,e){return r.addLeadingZeros(t.getHours(),e.length)},m(t,e){return r.addLeadingZeros(t.getMinutes(),e.length)},s(t,e){return r.addLeadingZeros(t.getSeconds(),e.length)},S(t,e){const a=e.length,n=t.getMilliseconds(),s=Math.trunc(n*Math.pow(10,a-3));return r.addLeadingZeros(s,e.length)}};exports.lightFormatters=d;