@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/index40.mjs ADDED
@@ -0,0 +1,40 @@
1
+ import { jsx as a, jsxs as r, Fragment as h } from "react/jsx-runtime";
2
+ import { classNames as u } from "./index51.mjs";
3
+ import { wrapWithIf as f } from "./index54.mjs";
4
+ function _({
5
+ steps: s = [],
6
+ onStepClick: c,
7
+ screenReaderStepLabel: o = "Stap ",
8
+ screenReaderCompleteLabel: m = " (voltooid)",
9
+ qa: t
10
+ }) {
11
+ const d = (e, l, n) => {
12
+ c && (e.preventDefault(), c(n, l));
13
+ };
14
+ return /* @__PURE__ */ a("ol", { className: "m-step-indicator", "data-qa": t, children: s?.map((e, l) => {
15
+ const n = u({
16
+ "is-completed": !!e.complete,
17
+ "is-incompleted": !e.complete,
18
+ "is-active": !!e.active
19
+ }), i = e.link?.href;
20
+ return /* @__PURE__ */ a("li", { className: n, children: f(
21
+ /* @__PURE__ */ r(h, { children: [
22
+ e.label ? null : /* @__PURE__ */ r("span", { className: "u-screen-reader-only", children: [
23
+ o,
24
+ " ",
25
+ l + 1
26
+ ] }),
27
+ /* @__PURE__ */ a("span", { className: "m-step-indicator__number" }),
28
+ /* @__PURE__ */ r("span", { className: "m-step-indicator__label", children: [
29
+ e.label || null,
30
+ e.complete ? /* @__PURE__ */ a("span", { className: "u-screen-reader-only", children: m }) : null
31
+ ] })
32
+ ] }),
33
+ /* @__PURE__ */ a("a", { onClick: (p) => d(p, l, e?.id), href: i }),
34
+ !!i
35
+ ) }, e.id);
36
+ }) });
37
+ }
38
+ export {
39
+ _ as StepIndicator
40
+ };
package/index41.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),x=require("./index54.js");function v({ariaLabel:h,checked:a,disabled:d=!1,id:s,internalIOLabels:o=!1,label:i,labelId:l="aui-switch-label",onClick:t,qa:u,statusLabelOff:_="Uit",statusLabelOn:g="Aan",statusLabelSide:c=""}){const[r,w]=m.useState(!!a),b=a===!0||a===!1?!!a:r,f=j=>{w(!r),t&&typeof t=="function"&&t(j)},n=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"a-switch__label a-switch__label--on","aria-hidden":"true",children:g}),e.jsx("div",{className:"a-switch__label a-switch__label--off","aria-hidden":"true",children:_})]});return x.labelWrapper(e.jsxs("button",{id:s,"data-qa":u,className:"a-switch",role:"switch","aria-checked":b,"aria-label":i?void 0:h,"aria-labelledby":i?l:void 0,disabled:d,onClick:f,children:[c==="left"&&n,e.jsx("div",{className:"a-switch__toggle","aria-hidden":"true",children:o&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"a-switch__toggle-label a-switch__toggle-label--on","aria-hidden":"true",children:"i"}),e.jsx("div",{className:"a-switch__toggle-label a-switch__toggle-label--off","aria-hidden":"true",children:"o"})]})}),c==="right"&&n]}),i,s,l)}exports.Switch=v;
package/index41.mjs ADDED
@@ -0,0 +1,54 @@
1
+ import { jsxs as l, jsx as a, Fragment as n } from "react/jsx-runtime";
2
+ import { useState as p } from "react";
3
+ import { labelWrapper as x } from "./index54.mjs";
4
+ function C({
5
+ ariaLabel: o,
6
+ checked: e,
7
+ disabled: _ = !1,
8
+ id: s,
9
+ internalIOLabels: f = !1,
10
+ label: i,
11
+ labelId: c = "aui-switch-label",
12
+ onClick: t,
13
+ qa: m,
14
+ statusLabelOff: w = "Uit",
15
+ statusLabelOn: g = "Aan",
16
+ statusLabelSide: r = ""
17
+ }) {
18
+ const [h, u] = p(!!e), b = e === !0 || e === !1 ? !!e : h, v = (N) => {
19
+ u(!h), t && typeof t == "function" && t(N);
20
+ }, d = /* @__PURE__ */ l(n, { children: [
21
+ /* @__PURE__ */ a("div", { className: "a-switch__label a-switch__label--on", "aria-hidden": "true", children: g }),
22
+ /* @__PURE__ */ a("div", { className: "a-switch__label a-switch__label--off", "aria-hidden": "true", children: w })
23
+ ] });
24
+ return x(
25
+ /* @__PURE__ */ l(
26
+ "button",
27
+ {
28
+ id: s,
29
+ "data-qa": m,
30
+ className: "a-switch",
31
+ role: "switch",
32
+ "aria-checked": b,
33
+ "aria-label": i ? void 0 : o,
34
+ "aria-labelledby": i ? c : void 0,
35
+ disabled: _,
36
+ onClick: v,
37
+ children: [
38
+ r === "left" && d,
39
+ /* @__PURE__ */ a("div", { className: "a-switch__toggle", "aria-hidden": "true", children: f && /* @__PURE__ */ l(n, { children: [
40
+ /* @__PURE__ */ a("div", { className: "a-switch__toggle-label a-switch__toggle-label--on", "aria-hidden": "true", children: "i" }),
41
+ /* @__PURE__ */ a("div", { className: "a-switch__toggle-label a-switch__toggle-label--off", "aria-hidden": "true", children: "o" })
42
+ ] }) }),
43
+ r === "right" && d
44
+ ]
45
+ }
46
+ ),
47
+ i,
48
+ s,
49
+ c
50
+ );
51
+ }
52
+ export {
53
+ C as Switch
54
+ };
package/index42.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("./index51.js"),B=require("./index58.js"),C=require("./index59.js"),I=require("./index60.js");function R({id:l="aui-table",caption:s,sort:h,sortDirection:m,rows:r=[],columns:t=[],qa:o,striped:x,small:c,open:f,selectable:i,selected:n,onSelect:j,onSelectAll:p,onSortClick:S,actions:d,responsive:a=!0,fixedColumnRight:T,fixedColumnLeft:q}){const[N,y,g,v]=I.useHorizontalScroll(),w=u.classNames({"a-table":!0,"a-table--striped":!!x,"a-table--open":!!f}),H=u.classNames({"a-table-responsive-wrapper":!!a,"has-shadow-left":!!a&&!g,"has-shadow-right":!!a&&!v,"has-first-column-fixed":!!q,"has-last-column-fixed":!!T}),b=e.jsxs("table",{id:l,className:w,"data-qa":o,children:[!!s&&e.jsx("caption",{children:s}),e.jsx(B.TableHeader,{tableId:l,small:c,selectable:i,selected:n,columns:t,sort:h,rows:r,onSortClick:S,sortDirection:m,onSelectAll:p,actions:d}),e.jsx(C.TableBody,{tableId:l,small:c,selectable:i,selected:n,columns:t,rows:r,onSelect:j,actions:d})]});return a?e.jsx("div",{className:H,"data-qa":o,children:e.jsx("div",{ref:N,onScroll:y,className:"a-table-scrollable-wrapper",children:b})}):b}exports.Table=R;
package/index42.mjs ADDED
@@ -0,0 +1,73 @@
1
+ import { jsx as a, jsxs as q } from "react/jsx-runtime";
2
+ import { classNames as m } from "./index51.mjs";
3
+ import { TableHeader as y } from "./index58.mjs";
4
+ import { TableBody as z } from "./index59.mjs";
5
+ import { useHorizontalScroll as B } from "./index60.mjs";
6
+ function A({
7
+ id: r = "aui-table",
8
+ caption: e,
9
+ sort: p,
10
+ sortDirection: f,
11
+ rows: t = [],
12
+ columns: o = [],
13
+ qa: s,
14
+ striped: h,
15
+ small: c,
16
+ open: u,
17
+ selectable: i,
18
+ selected: d,
19
+ onSelect: S,
20
+ onSelectAll: x,
21
+ onSortClick: N,
22
+ actions: n,
23
+ responsive: l = !0,
24
+ fixedColumnRight: w,
25
+ fixedColumnLeft: T
26
+ }) {
27
+ const [j, v, C, H] = B(), I = m({
28
+ "a-table": !0,
29
+ "a-table--striped": !!h,
30
+ "a-table--open": !!u
31
+ }), g = m({
32
+ "a-table-responsive-wrapper": !!l,
33
+ "has-shadow-left": !!l && !C,
34
+ "has-shadow-right": !!l && !H,
35
+ "has-first-column-fixed": !!T,
36
+ "has-last-column-fixed": !!w
37
+ }), b = /* @__PURE__ */ q("table", { id: r, className: I, "data-qa": s, children: [
38
+ !!e && /* @__PURE__ */ a("caption", { children: e }),
39
+ /* @__PURE__ */ a(
40
+ y,
41
+ {
42
+ tableId: r,
43
+ small: c,
44
+ selectable: i,
45
+ selected: d,
46
+ columns: o,
47
+ sort: p,
48
+ rows: t,
49
+ onSortClick: N,
50
+ sortDirection: f,
51
+ onSelectAll: x,
52
+ actions: n
53
+ }
54
+ ),
55
+ /* @__PURE__ */ a(
56
+ z,
57
+ {
58
+ tableId: r,
59
+ small: c,
60
+ selectable: i,
61
+ selected: d,
62
+ columns: o,
63
+ rows: t,
64
+ onSelect: S,
65
+ actions: n
66
+ }
67
+ )
68
+ ] });
69
+ return l ? /* @__PURE__ */ a("div", { className: g, "data-qa": s, children: /* @__PURE__ */ a("div", { ref: j, onScroll: v, className: "a-table-scrollable-wrapper", children: b }) }) : b;
70
+ }
71
+ export {
72
+ A as Table
73
+ };
package/index43.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),p=require("./index51.js"),i=require("./index24.js");function P({label:u,isToggle:s,active:t,iconLeft:r,removable:m,name:n,qa:b,onClick:c,ariaLabelDelete:j="Verwijderen"}){const[l,x]=d.useState(t),a=m&&!s,_=t===!0||t===!1?t:l,o=g=>(s&&x(!l),(s||a)&&c&&c(g)),h=s?"button":"div",q=p.classNames({"m-tag":!0,"is-clickable":!!a}),N={name:n,onClick:()=>o(n),"aria-pressed":_};return d.createElement(h,{className:q,"data-qa":b,...s?N:{}},e.jsxs(e.Fragment,{children:[r&&e.jsx("div",{className:"m-tag__icon",children:e.jsx(i.Icon,{name:r})}),e.jsx("div",{className:"m-tag__label",children:u}),a?e.jsx("button",{className:"m-tag__button",name:`${n}-delete`,onClick:()=>o(`${n}-delete`),"aria-label":j,children:e.jsx(i.Icon,{name:"remove"})}):null]}))}exports.Tag=P;
package/index43.mjs ADDED
@@ -0,0 +1,49 @@
1
+ import { jsxs as P, Fragment as g, jsx as s } from "react/jsx-runtime";
2
+ import j, { createElement as k } from "react";
3
+ import { classNames as x } from "./index51.mjs";
4
+ import { Icon as m } from "./index24.mjs";
5
+ function q({
6
+ label: d,
7
+ isToggle: e,
8
+ active: t,
9
+ iconLeft: n,
10
+ removable: i,
11
+ name: r,
12
+ qa: u,
13
+ onClick: l,
14
+ ariaLabelDelete: p = "Verwijderen"
15
+ }) {
16
+ const [o, b] = j.useState(t), a = i && !e, _ = t === !0 || t === !1 ? t : o, c = (N) => (e && b(!o), (e || a) && l && l(N)), f = e ? "button" : "div", h = x({
17
+ "m-tag": !0,
18
+ "is-clickable": !!a
19
+ });
20
+ return k(
21
+ f,
22
+ {
23
+ className: h,
24
+ "data-qa": u,
25
+ ...e ? {
26
+ name: r,
27
+ onClick: () => c(r),
28
+ "aria-pressed": _
29
+ } : {}
30
+ },
31
+ /* @__PURE__ */ P(g, { children: [
32
+ n && /* @__PURE__ */ s("div", { className: "m-tag__icon", children: /* @__PURE__ */ s(m, { name: n }) }),
33
+ /* @__PURE__ */ s("div", { className: "m-tag__label", children: d }),
34
+ a ? /* @__PURE__ */ s(
35
+ "button",
36
+ {
37
+ className: "m-tag__button",
38
+ name: `${r}-delete`,
39
+ onClick: () => c(`${r}-delete`),
40
+ "aria-label": p,
41
+ children: /* @__PURE__ */ s(m, { name: "remove" })
42
+ }
43
+ ) : null
44
+ ] })
45
+ );
46
+ }
47
+ export {
48
+ q as Tag
49
+ };
package/index44.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),u=require("./index51.js"),l=require("./index54.js");function n({children:t=[],qa:s}){const r=u.classNames({"o-tag-list":!0});return e.jsx("ul",{className:r,"data-qa":s,children:a.Children.map(t,i=>l.wrapWithIf(i,e.jsx("li",{className:"o-tag-list__item"}),!0))})}exports.TagList=n;
package/index44.mjs ADDED
@@ -0,0 +1,13 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { Children as m } from "react";
3
+ import { classNames as o } from "./index51.mjs";
4
+ import { wrapWithIf as e } from "./index54.mjs";
5
+ function f({ children: r = [], qa: a }) {
6
+ const s = o({
7
+ "o-tag-list": !0
8
+ });
9
+ return /* @__PURE__ */ t("ul", { className: s, "data-qa": a, children: m.map(r, (i) => e(i, /* @__PURE__ */ t("li", { className: "o-tag-list__item" }), !0)) });
10
+ }
11
+ export {
12
+ f as TagList
13
+ };
package/index45.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),b=require("./index51.js"),s=require("./index53.js"),M=require("react"),c=require("./index56.js");function O({charCounter:o,charCountText:u,description:i,disabled:g,id:e="aui-text-area",inline:a,label:x,maxLength:t,maxLengthBlocksInput:S,name:j,onChange:l,qa:m,readOnly:q,required:p,size:d,state:C,value:r,onBlur:y,onClick:R,onFocus:T,onKeyDown:A,onKeyUp:E}){const[N,f]=M.useState(r?r.length:0),h=o!==void 0?o:!!t,w=u||(t?"%count% / %max%":"%count%"),$=b.classNames({"a-input":!0,"a-input--inline":!!a,[`a-input--${s.SIZE_MAP[d||s.DEFAULT_SIZE]}`]:!!d,"has-error":C===s.State.ERROR}),D=b.classNames({"a-input__wrapper":!0,"a-input__wrapper--inline":!!a}),I=_=>(f(_.target.value.length),l&&l(_));return n.jsxs("div",{className:$,"data-qa":m,children:[c.renderLabel({label:x,id:e,required:p,inline:a}),c.renderDescription({id:e,description:i,state:C}),n.jsx("div",{className:D,children:n.jsx("textarea",{value:r,name:j,id:e,disabled:g,readOnly:q,required:p,...h?{"aria-describedby":`${e}--counter`}:{},...i?{"aria-describedby":`${e}--description`}:{},maxLength:t&&S?t:void 0,onChange:I,onBlur:y,onClick:R,onFocus:T,onKeyDown:A,onKeyUp:E})}),c.renderCharacterCounter({id:e,charCountText:w,charCounter:h,characterCount:r?r.length:N,maxLength:t})]})}exports.TextArea=O;
package/index45.mjs ADDED
@@ -0,0 +1,73 @@
1
+ import { jsxs as I, jsx as l } from "react/jsx-runtime";
2
+ import { classNames as m } from "./index51.mjs";
3
+ import { State as Z, SIZE_MAP as F, DEFAULT_SIZE as M } from "./index53.mjs";
4
+ import { useState as O } from "react";
5
+ import { renderLabel as P, renderDescription as U, renderCharacterCounter as k } from "./index56.mjs";
6
+ function J({
7
+ charCounter: n,
8
+ charCountText: o,
9
+ description: s,
10
+ disabled: d,
11
+ id: r = "aui-text-area",
12
+ inline: a,
13
+ label: f,
14
+ maxLength: t,
15
+ maxLengthBlocksInput: _,
16
+ name: b,
17
+ onChange: c,
18
+ qa: x,
19
+ readOnly: g,
20
+ required: p,
21
+ size: u,
22
+ state: i,
23
+ value: e,
24
+ onBlur: E,
25
+ onClick: S,
26
+ onFocus: w,
27
+ onKeyDown: A,
28
+ onKeyUp: N
29
+ }) {
30
+ const [R, T] = O(e ? e.length : 0), C = n !== void 0 ? n : !!t, $ = o || (t ? "%count% / %max%" : "%count%"), j = m({
31
+ "a-input": !0,
32
+ "a-input--inline": !!a,
33
+ [`a-input--${F[u || M]}`]: !!u,
34
+ "has-error": i === Z.ERROR
35
+ }), y = m({
36
+ "a-input__wrapper": !0,
37
+ "a-input__wrapper--inline": !!a
38
+ }), D = (h) => (T(h.target.value.length), c && c(h));
39
+ return /* @__PURE__ */ I("div", { className: j, "data-qa": x, children: [
40
+ P({ label: f, id: r, required: p, inline: a }),
41
+ U({ id: r, description: s, state: i }),
42
+ /* @__PURE__ */ l("div", { className: y, children: /* @__PURE__ */ l(
43
+ "textarea",
44
+ {
45
+ value: e,
46
+ name: b,
47
+ id: r,
48
+ disabled: d,
49
+ readOnly: g,
50
+ required: p,
51
+ ...C ? { "aria-describedby": `${r}--counter` } : {},
52
+ ...s ? { "aria-describedby": `${r}--description` } : {},
53
+ maxLength: t && _ ? t : void 0,
54
+ onChange: D,
55
+ onBlur: E,
56
+ onClick: S,
57
+ onFocus: w,
58
+ onKeyDown: A,
59
+ onKeyUp: N
60
+ }
61
+ ) }),
62
+ k({
63
+ id: r,
64
+ charCountText: $,
65
+ charCounter: C,
66
+ characterCount: e ? e.length : R,
67
+ maxLength: t
68
+ })
69
+ ] });
70
+ }
71
+ export {
72
+ J as TextArea
73
+ };
package/index46.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),C=require("./index51.js"),q=require("./index53.js"),u=require("./index56.js"),S=require("react");;/* empty css */const Q=require("./index39.js"),b=require("./index24.js"),V=S.forwardRef(function({addOn:e,autoComplete:N,ariaDescribedBy:T="",charCounter:p,charCountText:h,description:m,disabled:I,id:n="aui-text-field",role:R,inline:o,label:v,maxLength:r,maxLengthBlocksInput:w,name:F,onChange:f,qa:$,readOnly:E,required:x,size:_,state:g,type:A="text",value:s,onBlur:B,onClick:D,onFocus:M,onKeyDown:P,onKeyUp:Z,...d},L){const[U,k]=S.useState(s?s.length:0),i=e?.type==="text"&&e.placement==="left"?e.content:null,l=e?.type==="text"&&e.placement==="right"?e.content:null,c=e?.type==="icon"&&e.placement==="left"?e.content:null,a=e?.type==="icon"&&e.placement==="right"?e.content:null,y=p!==void 0?p:!!r,z=h||(r?"%count% / %max%":"%count%"),G=[T,y?`${n}--counter`:null,m?`${n}--description`:null].filter(Boolean).join(" ")||void 0,H=C.classNames({"a-input":!0,"a-input--inline":!!o,[`a-input--${q.SIZE_MAP[_||q.DEFAULT_SIZE]}`]:!!_,"has-icon-left":!!c||e?.type==="spinner"&&e?.placement==="left","has-icon-right":!c&&!!a,"has-addon-left":!!i,"has-addon-right":!!l,"has-error":g==="error","has-spinner":e?.type==="spinner",[`has-spinner-${e?.placement}`]:!!e}),J=C.classNames({"a-input__wrapper":!0,"a-input__wrapper--inline":!!o}),K=j=>(k(j.target.value.length),f&&f(j));return t.jsxs("div",{className:H,"data-qa":$,children:[u.renderLabel({label:v,id:n,required:x,inline:o}),u.renderDescription({id:n,description:m,state:g}),t.jsxs("div",{className:J,children:[e?.type==="spinner"&&t.jsx(Q.Spinner,{size:"small"}),!!c&&t.jsx(b.Icon,{name:c}),!!i&&t.jsx("div",{className:"a-input__addon",children:i}),t.jsx("input",{ref:L,type:A,value:s,name:F,id:n,autoComplete:N,disabled:I,readOnly:E,required:x,maxLength:r&&w?r:void 0,onChange:K,onBlur:B,onClick:D,onFocus:M,onKeyDown:P,onKeyUp:Z,role:R,"aria-describedby":G,...d}),!!a&&!c&&t.jsx(b.Icon,{name:a}),!!l&&t.jsx("div",{className:"a-input__addon",children:l})]}),u.renderCharacterCounter({id:n,charCountText:z,charCounter:y,characterCount:s?s.length:U,maxLength:r})]})});exports.TextField=V;
package/index46.mjs ADDED
@@ -0,0 +1,99 @@
1
+ import { jsxs as x, jsx as r } from "react/jsx-runtime";
2
+ import { classNames as N } from "./index51.mjs";
3
+ import { SIZE_MAP as K, DEFAULT_SIZE as Q } from "./index53.mjs";
4
+ import { renderLabel as V, renderDescription as W, renderCharacterCounter as X } from "./index56.mjs";
5
+ import { forwardRef as Y, useState as d } from "react";
6
+ /* empty css */
7
+ import { Spinner as O } from "./index39.mjs";
8
+ import { Icon as b } from "./index24.mjs";
9
+ const lt = Y(function({
10
+ addOn: t,
11
+ autoComplete: w,
12
+ ariaDescribedBy: S = "",
13
+ charCounter: p,
14
+ charCountText: m,
15
+ description: u,
16
+ disabled: T,
17
+ id: e = "aui-text-field",
18
+ role: $,
19
+ inline: i,
20
+ label: j,
21
+ maxLength: n,
22
+ maxLengthBlocksInput: v,
23
+ name: E,
24
+ onChange: h,
25
+ qa: F,
26
+ readOnly: I,
27
+ required: f,
28
+ size: C,
29
+ state: _,
30
+ type: R = "text",
31
+ value: o,
32
+ onBlur: A,
33
+ onClick: B,
34
+ onFocus: D,
35
+ onKeyDown: Z,
36
+ onKeyUp: L,
37
+ ...M
38
+ }, P) {
39
+ const [U, k] = d(o ? o.length : 0), s = t?.type === "text" && t.placement === "left" ? t.content : null, a = t?.type === "text" && t.placement === "right" ? t.content : null, c = t?.type === "icon" && t.placement === "left" ? t.content : null, l = t?.type === "icon" && t.placement === "right" ? t.content : null, g = p !== void 0 ? p : !!n, q = m || (n ? "%count% / %max%" : "%count%"), z = [S, g ? `${e}--counter` : null, u ? `${e}--description` : null].filter(Boolean).join(" ") || void 0, G = N({
40
+ "a-input": !0,
41
+ "a-input--inline": !!i,
42
+ [`a-input--${K[C || Q]}`]: !!C,
43
+ "has-icon-left": !!c || t?.type === "spinner" && t?.placement === "left",
44
+ "has-icon-right": !c && !!l,
45
+ "has-addon-left": !!s,
46
+ "has-addon-right": !!a,
47
+ "has-error": _ === "error",
48
+ "has-spinner": t?.type === "spinner",
49
+ [`has-spinner-${t?.placement}`]: !!t
50
+ }), H = N({
51
+ "a-input__wrapper": !0,
52
+ "a-input__wrapper--inline": !!i
53
+ }), J = (y) => (k(y.target.value.length), h && h(y));
54
+ return /* @__PURE__ */ x("div", { className: G, "data-qa": F, children: [
55
+ V({ label: j, id: e, required: f, inline: i }),
56
+ W({ id: e, description: u, state: _ }),
57
+ /* @__PURE__ */ x("div", { className: H, children: [
58
+ t?.type === "spinner" && /* @__PURE__ */ r(O, { size: "small" }),
59
+ !!c && /* @__PURE__ */ r(b, { name: c }),
60
+ !!s && /* @__PURE__ */ r("div", { className: "a-input__addon", children: s }),
61
+ /* @__PURE__ */ r(
62
+ "input",
63
+ {
64
+ ref: P,
65
+ type: R,
66
+ value: o,
67
+ name: E,
68
+ id: e,
69
+ autoComplete: w,
70
+ disabled: T,
71
+ readOnly: I,
72
+ required: f,
73
+ maxLength: n && v ? n : void 0,
74
+ onChange: J,
75
+ onBlur: A,
76
+ onClick: B,
77
+ onFocus: D,
78
+ onKeyDown: Z,
79
+ onKeyUp: L,
80
+ role: $,
81
+ "aria-describedby": z,
82
+ ...M
83
+ }
84
+ ),
85
+ !!l && !c && /* @__PURE__ */ r(b, { name: l }),
86
+ !!a && /* @__PURE__ */ r("div", { className: "a-input__addon", children: a })
87
+ ] }),
88
+ X({
89
+ id: e,
90
+ charCountText: q,
91
+ charCounter: g,
92
+ characterCount: o ? o.length : U,
93
+ maxLength: n
94
+ })
95
+ ] });
96
+ });
97
+ export {
98
+ lt as TextField
99
+ };
package/index47.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),e=require("./index53.js"),m=require("./index51.js"),x=require("./index24.js");function C({checked:r=!1,checkedTheme:j="",checkedIcon:n,checkedLabel:o="",id:N,onClick:g,qa:T,showLabels:a=!1,size:t,uncheckedTheme:p="danger",uncheckedIcon:l,uncheckedLabel:u=""}){const E=()=>{g&&g(!r)},S=m.classNames({"a-toggle":!0,[`a-toggle--${e.SIZE_MAP[t||e.DEFAULT_SIZE]}`]:!!t}),c=(i,_,d)=>m.classNames({"a-button":!0,[`a-button--${e.SIZE_MAP[t||e.DEFAULT_SIZE]}`]:!!t,[`a-button--${i}`]:!!i,"has-icon-left":!!a&&!!_,"has-icon":!a&&!!_,[`a-toggle__${d}`]:!!d}),f=c(j,n,"on"),q=c(p,l,"off");return s.jsx("div",{className:S,"data-qa":T,children:s.jsxs("button",{className:"a-toggle__button",id:N,"aria-expanded":r,onClick:E,children:[s.jsxs("span",{className:f,children:[n?s.jsx(x.Icon,{name:n,screenReaderText:a?"":o}):null,a&&s.jsx("span",{className:"a-toggle__label",children:o})]}),s.jsxs("span",{className:q,children:[l?s.jsx(x.Icon,{name:l,screenReaderText:a?"":u}):null,a&&s.jsx("span",{className:"a-toggle__label",children:u})]})]})})}exports.Toggle=C;
package/index47.mjs ADDED
@@ -0,0 +1,45 @@
1
+ import { jsx as t, jsxs as e } from "react/jsx-runtime";
2
+ import { SIZE_MAP as _, DEFAULT_SIZE as d } from "./index53.mjs";
3
+ import { classNames as f } from "./index51.mjs";
4
+ import { Icon as N } from "./index24.mjs";
5
+ function v({
6
+ checked: r = !1,
7
+ checkedTheme: x = "",
8
+ checkedIcon: s,
9
+ checkedLabel: o = "",
10
+ id: C,
11
+ onClick: g,
12
+ qa: T,
13
+ showLabels: a = !1,
14
+ size: l,
15
+ uncheckedTheme: $ = "danger",
16
+ uncheckedIcon: n,
17
+ uncheckedLabel: m = ""
18
+ }) {
19
+ const E = () => {
20
+ g && g(!r);
21
+ }, j = f({
22
+ "a-toggle": !0,
23
+ [`a-toggle--${_[l || d]}`]: !!l
24
+ }), i = (u, c, p) => f({
25
+ "a-button": !0,
26
+ [`a-button--${_[l || d]}`]: !!l,
27
+ [`a-button--${u}`]: !!u,
28
+ "has-icon-left": !!a && !!c,
29
+ "has-icon": !a && !!c,
30
+ [`a-toggle__${p}`]: !!p
31
+ }), A = i(x, s, "on"), R = i($, n, "off");
32
+ return /* @__PURE__ */ t("div", { className: j, "data-qa": T, children: /* @__PURE__ */ e("button", { className: "a-toggle__button", id: C, "aria-expanded": r, onClick: E, children: [
33
+ /* @__PURE__ */ e("span", { className: A, children: [
34
+ s ? /* @__PURE__ */ t(N, { name: s, screenReaderText: a ? "" : o }) : null,
35
+ a && /* @__PURE__ */ t("span", { className: "a-toggle__label", children: o })
36
+ ] }),
37
+ /* @__PURE__ */ e("span", { className: R, children: [
38
+ n ? /* @__PURE__ */ t(N, { name: n, screenReaderText: a ? "" : m }) : null,
39
+ a && /* @__PURE__ */ t("span", { className: "a-toggle__label", children: m })
40
+ ] })
41
+ ] }) });
42
+ }
43
+ export {
44
+ v as Toggle
45
+ };
package/index48.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("react"),s=require("./index66.js");;/* empty css */;/* empty css */function n({anchor:i,anchorId:e="aui-tooltip",location:o="bottom",text:r="",qa:l}){return t.jsxs(t.Fragment,{children:[a.cloneElement(i,{id:e,"aria-describedby":`tooltip-${e}`,tabIndex:0}),t.jsx(s.Tooltip,{id:`tooltip-${e}`,anchorSelect:e?`#${e}`:void 0,className:"a-tooltip__base",noArrow:!0,positionStrategy:"fixed",place:o,style:{padding:"0"},children:t.jsx("div",{className:"a-tooltip","data-qa":l,children:r})})]})}exports.Tooltip=n;
package/index48.mjs ADDED
@@ -0,0 +1,26 @@
1
+ import { jsxs as a, Fragment as p, jsx as o } from "react/jsx-runtime";
2
+ import { cloneElement as m } from "react";
3
+ import { Tooltip as s } from "./index66.mjs";
4
+ /* empty css */
5
+ /* empty css */
6
+ function x({ anchor: i, anchorId: t = "aui-tooltip", location: e = "bottom", text: r = "", qa: l }) {
7
+ return /* @__PURE__ */ a(p, { children: [
8
+ m(i, { id: t, "aria-describedby": `tooltip-${t}`, tabIndex: 0 }),
9
+ /* @__PURE__ */ o(
10
+ s,
11
+ {
12
+ id: `tooltip-${t}`,
13
+ anchorSelect: t ? `#${t}` : void 0,
14
+ className: "a-tooltip__base",
15
+ noArrow: !0,
16
+ positionStrategy: "fixed",
17
+ place: e,
18
+ style: { padding: "0" },
19
+ children: /* @__PURE__ */ o("div", { className: "a-tooltip", "data-qa": l, children: r })
20
+ }
21
+ )
22
+ ] });
23
+ }
24
+ export {
25
+ x as Tooltip
26
+ };
package/index49.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),R=require("react"),U=require("./index51.js"),p=require("./index61.js"),w=require("./index50.js");function V({acceptedFormat:t="*",deleteAriaLabel:f="Verwijder bestand",disabled:c=!1,files:n=[],formatErrorLabel:_="Dit bestandsformaat is niet toegestaan.",id:i,label:h="Sleep een bestand hier of klik om te bladeren",maxSize:l=10,maxSizeLabel:j="Maximale bestandsgrootte:",hideMaxSizeLabel:b=!1,multiple:u=!0,required:m=!1,onChange:r,onDelete:d,sizeErrorLabel:g="Maximale bestandsgrootte overschreden.",qa:x}){const o=R.useRef(null),N=s=>{d&&d(n?.filter(a=>a?.name!==s.name)),o.current&&(o.current.value="")},v=s=>{if(u){const a=s.target?.files?[...n,...Array.from(s.target.files)].filter((q,y,F)=>F.findIndex(M=>M.name===q.name)===y):[];r&&r(a,p.areFilesValid(a,t,l))}else{const a=s.target?.files?.[0]?[s.target?.files?.[0]]:[];r&&r(a,p.areFilesValid(a,t,l))}};return e.jsxs("div",{className:U.classNames({"m-upload":!0,"is-disabled":!!c}),"data-qa":x,children:[e.jsx("div",{className:"m-upload__inner",children:e.jsxs("div",{className:"m-upload__dropzone",children:[e.jsx("input",{ref:o,id:i,type:"file",multiple:u,required:m,onChange:v,accept:t,className:"m-upload__input",disabled:c,"aria-describedby":`${i}-description`}),e.jsx("div",{className:"m-upload__content",children:e.jsxs("label",{htmlFor:i,className:"m-upload__message u-margin-bottom",children:[h," ",m&&e.jsx("span",{className:"u-text-danger",children:"*"})]})})]})}),!b&&l&&e.jsxs("small",{id:`${i}-description`,className:"m-upload__description",children:[j," ",l,"MB"]}),n?.length?e.jsx("ul",{className:"m-upload__files",children:n?.map(s=>e.jsx(w.UploadFile,{file:s,deleteAriaLabel:f,formatErrorLabel:_,sizeErrorLabel:g,onDelete:d&&N,maxSize:l,acceptedFormat:t},s?.name))}):null]})}exports.Upload=V;
package/index49.mjs ADDED
@@ -0,0 +1,83 @@
1
+ import { jsxs as o, jsx as l } from "react/jsx-runtime";
2
+ import F from "react";
3
+ import { classNames as U } from "./index51.mjs";
4
+ import { areFilesValid as u } from "./index61.mjs";
5
+ import { UploadFile as V } from "./index50.mjs";
6
+ function q({
7
+ acceptedFormat: t = "*",
8
+ deleteAriaLabel: _ = "Verwijder bestand",
9
+ disabled: c = !1,
10
+ files: n = [],
11
+ formatErrorLabel: h = "Dit bestandsformaat is niet toegestaan.",
12
+ id: r,
13
+ label: b = "Sleep een bestand hier of klik om te bladeren",
14
+ maxSize: s = 10,
15
+ maxSizeLabel: g = "Maximale bestandsgrootte:",
16
+ hideMaxSizeLabel: N = !1,
17
+ multiple: p = !0,
18
+ required: f = !1,
19
+ onChange: i,
20
+ onDelete: d,
21
+ sizeErrorLabel: v = "Maximale bestandsgrootte overschreden.",
22
+ qa: j
23
+ }) {
24
+ const m = F.useRef(null), w = (e) => {
25
+ d && d(n?.filter((a) => a?.name !== e.name)), m.current && (m.current.value = "");
26
+ }, x = (e) => {
27
+ if (p) {
28
+ const a = e.target?.files ? [...n, ...Array.from(e.target.files)].filter(
29
+ (y, M, R) => R.findIndex((k) => k.name === y.name) === M
30
+ ) : [];
31
+ i && i(a, u(a, t, s));
32
+ } else {
33
+ const a = e.target?.files?.[0] ? [e.target?.files?.[0]] : [];
34
+ i && i(a, u(a, t, s));
35
+ }
36
+ };
37
+ return /* @__PURE__ */ o("div", { className: U({ "m-upload": !0, "is-disabled": !!c }), "data-qa": j, children: [
38
+ /* @__PURE__ */ l("div", { className: "m-upload__inner", children: /* @__PURE__ */ o("div", { className: "m-upload__dropzone", children: [
39
+ /* @__PURE__ */ l(
40
+ "input",
41
+ {
42
+ ref: m,
43
+ id: r,
44
+ type: "file",
45
+ multiple: p,
46
+ required: f,
47
+ onChange: x,
48
+ accept: t,
49
+ className: "m-upload__input",
50
+ disabled: c,
51
+ "aria-describedby": `${r}-description`
52
+ }
53
+ ),
54
+ /* @__PURE__ */ l("div", { className: "m-upload__content", children: /* @__PURE__ */ o("label", { htmlFor: r, className: "m-upload__message u-margin-bottom", children: [
55
+ b,
56
+ " ",
57
+ f && /* @__PURE__ */ l("span", { className: "u-text-danger", children: "*" })
58
+ ] }) })
59
+ ] }) }),
60
+ !N && s && /* @__PURE__ */ o("small", { id: `${r}-description`, className: "m-upload__description", children: [
61
+ g,
62
+ " ",
63
+ s,
64
+ "MB"
65
+ ] }),
66
+ n?.length ? /* @__PURE__ */ l("ul", { className: "m-upload__files", children: n?.map((e) => /* @__PURE__ */ l(
67
+ V,
68
+ {
69
+ file: e,
70
+ deleteAriaLabel: _,
71
+ formatErrorLabel: h,
72
+ sizeErrorLabel: v,
73
+ onDelete: d && w,
74
+ maxSize: s,
75
+ acceptedFormat: t
76
+ },
77
+ e?.name
78
+ )) }) : null
79
+ ] });
80
+ }
81
+ export {
82
+ q as Upload
83
+ };
package/index5.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("react");;/* empty css */const J=require("./index20.js"),M=require("./index22.js"),R=require("./index27.js"),Q=require("./index46.js");function W({id:V="aui-autocomplete",label:m,items:a,name:h,multiple:l,required:A,inputValue:b,value:t,onInputChange:I,onChange:i,noResultsText:T="Geen resultaten",qa:B,description:C,state:K,addOn:x,disabled:N=!1}){const[S,p]=n.useState(!1),[d,O]=n.useState(a),[P,_]=n.useState(b||""),[G,y]=n.useState(!l&&t||""),[c,w]=n.useState(-1),[g,k]=n.useState(l&&t||[]),f=b||b===""?b:P,j=t||t===""?t:G,L=n.useRef(null);n.useEffect(()=>{t&&!l&&F(t,!0),t&&l&&k(t)},[t]),n.useEffect(()=>{O((a||[]).filter(e=>f?e.label?.toLowerCase().includes(f.toLowerCase()):!0))},[f,a]),n.useEffect(()=>{L.current&&L.current.querySelector(`.a-list__item:nth-child(${c+1})`)?.scrollIntoView({block:"nearest",inline:"nearest"})},[c]);const U=e=>{p(e)},q=()=>{p(!1),w(-1)},D=e=>{_(e),p(!0),j&&!e&&(y(""),!l&&i&&i("",h)),I&&I(e,h)},F=(e,s=!1)=>{if(!l&&t!==""&&(!t||t===e)){const r=a?.find(u=>u.value===e);D(r?.label||""),y(r?.value||""),q()}!s&&i&&i(e,h)},E=e=>{const s=a?.find(u=>u.value===e);s&&y(s.value);const r=g.includes(e)?g.filter(u=>u!==e):[...g,e].filter(u=>u!=="");k(r),i&&i(r,h)},$=()=>{const e=a?.find(s=>s.value===j);e&&f?.length&&e.label!==f&&D(e.label),q()},v=()=>{const e=d&&d[c];e&&(l?E(e.value):F(e.value))},z=e=>{if(!S)return;const s=d?.length||0;switch(e.key){case"ArrowDown":return e.preventDefault(),w(c===-1?0:(c+1)%s),p(!0);case"ArrowUp":return e.preventDefault(),w(c===-1||c-1<0?s-1:c-1),p(!0);case"Enter":return e.preventDefault(),v();case"Escape":return q()}},H=e=>l?g.includes(e):e===j;return o.jsx(J.Flyout,{scrollable:!0,hasPadding:!1,qa:B,className:"m-autocomplete",trigger:o.jsx(Q.TextField,{id:V,name:h,label:m,onBlur:$,value:f,onChange:e=>D(e.target.value),role:"combobox",autoComplete:"off","aria-autocomplete":"list","aria-haspopup":"true","aria-expanded":S,onKeyDown:z,description:C,required:A,state:K,addOn:x?{...x,content:x.content}:void 0,disabled:N}),ref:L,open:S,onStateChange:U,children:d&&d.length?o.jsx(M.FunctionalList,{lined:!0,onItemClick:e=>{l?E(e):F(e)},children:d.map((e,s)=>o.jsxs(R.ListItem,{id:e.key||e.value,tabIndex:-1,highlighted:s===c,onMouseDown:r=>r.preventDefault(),active:H(e.value),name:e.value,link:{href:""},children:[e.label,e.subLabel?o.jsx("p",{className:"small",children:e.subLabel}):null]},e.key||e.value))}):o.jsx(M.FunctionalList,{lined:!0,children:o.jsx(R.ListItem,{id:"aui-autocomplete-no-results",children:o.jsx("small",{children:T})})})})}exports.Autocomplete=W;