@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.
- package/constants/settings.d.ts +1 -1
- package/constants/stories.settings.d.ts +11 -0
- package/index.js +1 -62
- package/index.mjs +98 -9098
- package/index10.js +1 -0
- package/index10.mjs +60 -0
- package/index100.js +1 -0
- package/index100.mjs +4 -0
- package/index101.js +1 -0
- package/index101.mjs +400 -0
- package/index102.js +5 -0
- package/index102.mjs +42 -0
- package/index103.js +1 -0
- package/index103.mjs +4 -0
- package/index104.js +1 -0
- package/index104.mjs +10 -0
- package/index105.js +2 -0
- package/index105.mjs +329 -0
- package/index106.js +1 -0
- package/index106.mjs +52 -0
- package/index107.js +1 -0
- package/index107.mjs +4 -0
- package/index108.js +1 -0
- package/index108.mjs +67 -0
- package/index109.js +1 -0
- package/index109.mjs +45 -0
- package/index11.js +1 -0
- package/index11.mjs +12 -0
- package/index110.js +10 -0
- package/index110.mjs +62 -0
- package/index111.js +1 -0
- package/index111.mjs +46 -0
- package/index112.js +1 -0
- package/index112.mjs +42 -0
- package/index113.js +1 -0
- package/index113.mjs +4 -0
- package/index114.js +1 -0
- package/index114.mjs +4 -0
- package/index115.js +1 -0
- package/index115.mjs +4 -0
- package/index116.js +1 -0
- package/index116.mjs +33 -0
- package/index117.js +5 -0
- package/index117.mjs +21 -0
- package/index118.js +9 -0
- package/index118.mjs +63 -0
- package/index119.js +1 -0
- package/index119.mjs +65 -0
- package/index12.js +1 -0
- package/index12.mjs +215 -0
- package/index120.js +1 -0
- package/index120.mjs +16 -0
- package/index121.js +1 -0
- package/index121.mjs +9 -0
- package/index122.js +1 -0
- package/index122.mjs +9 -0
- package/index123.js +1 -0
- package/index123.mjs +8 -0
- package/index124.js +1 -0
- package/index124.mjs +8 -0
- package/index125.js +1 -0
- package/index125.mjs +7 -0
- package/index126.js +1 -0
- package/index126.mjs +7 -0
- package/index127.js +1 -0
- package/index127.mjs +9 -0
- package/index128.js +1 -0
- package/index128.mjs +7 -0
- package/index129.js +1 -0
- package/index129.mjs +69 -0
- package/index13.js +1 -0
- package/index13.mjs +29 -0
- package/index130.js +1 -0
- package/index130.mjs +5 -0
- package/index131.js +1 -0
- package/index131.mjs +7 -0
- package/index132.js +1 -0
- package/index132.mjs +13 -0
- package/index133.js +1 -0
- package/index133.mjs +4 -0
- package/index134.js +1 -0
- package/index134.mjs +393 -0
- package/index135.js +1 -0
- package/index135.mjs +127 -0
- package/index136.js +1 -0
- package/index136.mjs +136 -0
- package/index137.js +1 -0
- package/index137.mjs +4 -0
- package/index138.js +1 -0
- package/index138.mjs +4 -0
- package/index139.js +8 -0
- package/index139.mjs +78 -0
- package/index14.js +1 -0
- package/index14.mjs +44 -0
- package/index140.js +8 -0
- package/index140.mjs +95 -0
- package/index141.js +5 -0
- package/index141.mjs +54 -0
- package/index142.js +1 -0
- package/index142.mjs +10 -0
- package/index143.js +1 -0
- package/index143.mjs +7 -0
- package/index144.js +1 -0
- package/index144.mjs +54 -0
- package/index145.js +11 -0
- package/index145.mjs +60 -0
- package/index146.js +1 -0
- package/index146.mjs +4 -0
- package/index147.js +1 -0
- package/index147.mjs +4 -0
- package/index148.js +1 -0
- package/index148.mjs +7 -0
- package/index149.js +1 -0
- package/index149.mjs +7 -0
- package/index15.js +1 -0
- package/index15.mjs +8 -0
- package/index150.js +1 -0
- package/index150.mjs +9 -0
- package/index151.js +1 -0
- package/index151.mjs +15 -0
- package/index152.js +1 -0
- package/index152.mjs +18 -0
- package/index153.js +1 -0
- package/index153.mjs +11 -0
- package/index154.js +1 -0
- package/index154.mjs +8 -0
- package/index155.js +1 -0
- package/index155.mjs +8 -0
- package/index156.js +1 -0
- package/index156.mjs +7 -0
- package/index157.js +1 -0
- package/index157.mjs +515 -0
- package/index158.js +1 -0
- package/index158.mjs +52 -0
- package/index159.js +1 -0
- package/index159.mjs +20 -0
- package/index16.js +1 -0
- package/index16.mjs +15 -0
- package/index160.js +1 -0
- package/index160.mjs +20 -0
- package/index161.js +1 -0
- package/index161.mjs +7 -0
- package/index162.js +1 -0
- package/index162.mjs +10 -0
- package/index163.js +1 -0
- package/index163.mjs +8 -0
- package/index164.js +1 -0
- package/index164.mjs +7 -0
- package/index165.js +1 -0
- package/index165.mjs +8 -0
- package/index166.js +1 -0
- package/index166.mjs +11 -0
- package/index167.js +1 -0
- package/index167.mjs +7 -0
- package/index168.js +1 -0
- package/index168.mjs +10 -0
- package/index169.js +1 -0
- package/index169.mjs +14 -0
- package/index17.js +1 -0
- package/index17.mjs +108 -0
- package/index170.js +1 -0
- package/index170.mjs +11 -0
- package/index171.js +1 -0
- package/index171.mjs +11 -0
- package/index172.js +1 -0
- package/index172.mjs +15 -0
- package/index173.js +1 -0
- package/index173.mjs +6 -0
- package/index174.js +1 -0
- package/index174.mjs +35 -0
- package/index175.js +1 -0
- package/index175.mjs +67 -0
- package/index176.js +1 -0
- package/index176.mjs +10 -0
- package/index177.js +1 -0
- package/index177.mjs +10 -0
- package/index178.js +1 -0
- package/index178.mjs +9 -0
- package/index179.js +1 -0
- package/index179.mjs +9 -0
- package/index18.js +1 -0
- package/index18.mjs +136 -0
- package/index180.js +1 -0
- package/index180.mjs +16 -0
- package/index181.js +1 -0
- package/index181.mjs +4 -0
- package/index182.js +1 -0
- package/index182.mjs +4 -0
- package/index183.js +1 -0
- package/index183.mjs +4 -0
- package/index184.js +1 -0
- package/index184.mjs +59 -0
- package/index185.js +1 -0
- package/index185.mjs +24 -0
- package/index186.js +1 -0
- package/index186.mjs +43 -0
- package/index187.js +1 -0
- package/index187.mjs +63 -0
- package/index188.js +1 -0
- package/index188.mjs +34 -0
- package/index189.js +1 -0
- package/index189.mjs +15 -0
- package/index19.js +1 -0
- package/index19.mjs +11 -0
- package/index190.js +1 -0
- package/index190.mjs +64 -0
- package/index191.js +1 -0
- package/index191.mjs +64 -0
- package/index192.js +1 -0
- package/index192.mjs +65 -0
- package/index193.js +1 -0
- package/index193.mjs +65 -0
- package/index194.js +1 -0
- package/index194.mjs +42 -0
- package/index195.js +1 -0
- package/index195.mjs +43 -0
- package/index196.js +1 -0
- package/index196.mjs +55 -0
- package/index197.js +1 -0
- package/index197.mjs +45 -0
- package/index198.js +1 -0
- package/index198.mjs +39 -0
- package/index199.js +1 -0
- package/index199.mjs +68 -0
- package/index2.js +1 -0
- package/index2.mjs +12 -0
- package/index20.js +1 -0
- package/index20.mjs +54 -0
- package/index200.js +1 -0
- package/index200.mjs +68 -0
- package/index201.js +1 -0
- package/index201.mjs +93 -0
- package/index202.js +1 -0
- package/index202.mjs +43 -0
- package/index203.js +1 -0
- package/index203.mjs +43 -0
- package/index204.js +1 -0
- package/index204.mjs +43 -0
- package/index205.js +1 -0
- package/index205.mjs +27 -0
- package/index206.js +1 -0
- package/index206.mjs +26 -0
- package/index207.js +1 -0
- package/index207.mjs +26 -0
- package/index208.js +1 -0
- package/index208.mjs +27 -0
- package/index209.js +1 -0
- package/index209.mjs +26 -0
- package/index21.js +1 -0
- package/index21.mjs +33 -0
- package/index210.js +1 -0
- package/index210.mjs +26 -0
- package/index211.js +1 -0
- package/index211.mjs +16 -0
- package/index212.js +1 -0
- package/index212.mjs +42 -0
- package/index213.js +1 -0
- package/index213.mjs +42 -0
- package/index214.js +1 -0
- package/index214.mjs +16 -0
- package/index215.js +1 -0
- package/index215.mjs +16 -0
- package/index216.js +1 -0
- package/index216.mjs +70 -0
- package/index217.js +1 -0
- package/index217.mjs +33 -0
- package/index218.js +1 -0
- package/index218.mjs +11 -0
- package/index219.js +1 -0
- package/index219.mjs +155 -0
- package/index22.js +1 -0
- package/index22.mjs +22 -0
- package/index220.js +1 -0
- package/index220.mjs +110 -0
- package/index221.js +1 -0
- package/index221.mjs +22 -0
- package/index222.js +1 -0
- package/index222.mjs +103 -0
- package/index223.js +1 -0
- package/index223.mjs +49 -0
- package/index224.js +1 -0
- package/index224.mjs +70 -0
- package/index225.js +1 -0
- package/index225.mjs +33 -0
- package/index226.js +1 -0
- package/index226.mjs +11 -0
- package/index227.js +1 -0
- package/index227.mjs +110 -0
- package/index228.js +1 -0
- package/index228.mjs +109 -0
- package/index229.js +1 -0
- package/index229.mjs +9 -0
- package/index23.js +1 -0
- package/index23.mjs +32 -0
- package/index230.js +1 -0
- package/index230.mjs +18 -0
- package/index231.js +1 -0
- package/index231.mjs +31 -0
- package/index232.js +1 -0
- package/index232.mjs +15 -0
- package/index233.js +1 -0
- package/index233.mjs +61 -0
- package/index234.js +1 -0
- package/index234.mjs +11 -0
- package/index235.js +1 -0
- package/index235.mjs +22 -0
- package/index24.js +2 -0
- package/index24.mjs +62 -0
- package/index25.js +1 -0
- package/index25.mjs +15 -0
- package/index26.js +1 -0
- package/index26.mjs +12 -0
- package/index27.js +1 -0
- package/index27.mjs +43 -0
- package/index28.js +1 -0
- package/index28.mjs +34 -0
- package/index29.js +1 -0
- package/index29.mjs +10 -0
- package/index3.js +1 -0
- package/index3.mjs +15 -0
- package/index30.js +1 -0
- package/index30.mjs +72 -0
- package/index31.js +1 -0
- package/index31.mjs +40 -0
- package/index32.js +1 -0
- package/index32.mjs +48 -0
- package/index33.js +1 -0
- package/index33.mjs +90 -0
- package/index34.js +1 -0
- package/index34.mjs +36 -0
- package/index35.js +1 -0
- package/index35.mjs +25 -0
- package/index36.js +1 -0
- package/index36.mjs +27 -0
- package/index37.js +1 -0
- package/index37.mjs +110 -0
- package/index38.js +1 -0
- package/index38.mjs +57 -0
- package/index39.js +1 -0
- package/index39.mjs +21 -0
- package/index4.js +1 -0
- package/index4.mjs +58 -0
- package/index40.js +1 -0
- package/index40.mjs +40 -0
- package/index41.js +1 -0
- package/index41.mjs +54 -0
- package/index42.js +1 -0
- package/index42.mjs +73 -0
- package/index43.js +1 -0
- package/index43.mjs +49 -0
- package/index44.js +1 -0
- package/index44.mjs +13 -0
- package/index45.js +1 -0
- package/index45.mjs +73 -0
- package/index46.js +1 -0
- package/index46.mjs +99 -0
- package/index47.js +1 -0
- package/index47.mjs +45 -0
- package/index48.js +1 -0
- package/index48.mjs +26 -0
- package/index49.js +1 -0
- package/index49.mjs +83 -0
- package/index5.js +1 -0
- package/index5.mjs +136 -0
- package/index50.js +1 -0
- package/index50.mjs +35 -0
- package/index51.js +1 -0
- package/index51.mjs +10 -0
- package/index52.js +1 -0
- package/index52.mjs +13 -0
- package/index53.js +1 -0
- package/index53.mjs +30 -0
- package/index54.js +1 -0
- package/index54.mjs +51 -0
- package/index55.js +1 -0
- package/index55.mjs +10 -0
- package/index56.js +1 -0
- package/index56.mjs +49 -0
- package/index58.js +1 -0
- package/index58.mjs +64 -0
- package/index59.js +1 -0
- package/index59.mjs +62 -0
- package/index6.js +1 -0
- package/index6.mjs +29 -0
- package/index60.js +1 -0
- package/index60.mjs +31 -0
- package/index61.js +1 -0
- package/index61.mjs +23 -0
- package/index62.js +1 -0
- package/index62.mjs +32 -0
- package/index63.js +1 -0
- package/index63.mjs +16 -0
- package/index64.js +1 -0
- package/index64.mjs +61 -0
- package/index65.js +1 -0
- package/index65.mjs +19 -0
- package/index66.js +7 -0
- package/index66.mjs +411 -0
- package/index7.js +1 -0
- package/index7.mjs +8 -0
- package/index70.js +1 -0
- package/index70.mjs +4 -0
- package/index71.js +1 -0
- package/index71.mjs +76 -0
- package/index72.js +1 -0
- package/index72.mjs +31 -0
- package/index73.js +1 -0
- package/index73.mjs +38 -0
- package/index74.js +1 -0
- package/index74.mjs +6 -0
- package/index75.js +1 -0
- package/index75.mjs +37 -0
- package/index76.js +1 -0
- package/index76.mjs +7 -0
- package/index77.js +1 -0
- package/index77.mjs +7 -0
- package/index78.js +1 -0
- package/index78.mjs +7 -0
- package/index79.js +1 -0
- package/index79.mjs +7 -0
- package/index8.js +1 -0
- package/index8.mjs +18 -0
- package/index80.js +1 -0
- package/index80.mjs +7 -0
- package/index81.js +1 -0
- package/index81.mjs +19 -0
- package/index82.js +1 -0
- package/index82.mjs +87 -0
- package/index83.js +1 -0
- package/index83.mjs +8 -0
- package/index84.js +1 -0
- package/index84.mjs +27 -0
- package/index85.js +1 -0
- package/index85.mjs +57 -0
- package/index87.js +1 -0
- package/index87.mjs +7 -0
- package/index88.js +1 -0
- package/index88.mjs +121 -0
- package/index89.js +1 -0
- package/index89.mjs +20 -0
- package/index9.js +1 -0
- package/index9.mjs +18 -0
- package/index90.js +1 -0
- package/index90.mjs +26 -0
- package/index91.js +1 -0
- package/index91.mjs +4 -0
- package/index92.js +1 -0
- package/index92.mjs +237 -0
- package/index93.js +1 -0
- package/index93.mjs +4 -0
- package/index94.js +1 -0
- package/index94.mjs +13 -0
- package/index95.js +1 -0
- package/index95.mjs +249 -0
- package/index96.js +1 -0
- package/index96.mjs +91 -0
- package/index97.js +1 -0
- package/index97.mjs +15 -0
- package/index98.js +1 -0
- package/index98.mjs +6 -0
- package/index99.js +1 -0
- package/index99.mjs +4 -0
- package/lib/atoms/input/text-field/TextField.d.ts +1 -1
- package/lib/atoms/select/Select.types.d.ts +1 -1
- package/lib/base/icon/Icon.d.ts +1 -1
- package/lib/molecules/datepicker/Calendar.d.ts +1 -1
- package/lib/molecules/flyout/Flyout.d.ts +1 -1
- package/lib/molecules/tag/Tag.d.ts +1 -1
- package/package.json +4 -1
- package/packages/antwerp-ui/react-components/src/lib/atoms/input/text-field/TextField.css +1 -0
- package/packages/antwerp-ui/react-components/src/lib/atoms/tooltip/Tooltip.css +1 -0
- package/packages/antwerp-ui/react-components/src/lib/molecules/autocomplete/Autocomplete.css +1 -0
- package/packages/antwerp-ui/react-components/src/lib/molecules/datepicker/DateRangePicker.css +1 -0
- package/utils/math.utils.d.ts +1 -1
- package/index.css +0 -1
package/index30.mjs
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsxs as r, Fragment as x, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import A, { cloneElement as S } from "react";
|
|
3
|
+
import F from "./index65.mjs";
|
|
4
|
+
import { SIZE_MAP as I, DEFAULT_SIZE as P } from "./index53.mjs";
|
|
5
|
+
import { classNames as f } from "./index51.mjs";
|
|
6
|
+
import { Button as t } from "./index10.mjs";
|
|
7
|
+
function Z({
|
|
8
|
+
appRootId: v,
|
|
9
|
+
ariaCloseLabel: _ = "Sluiten",
|
|
10
|
+
cancelButton: o,
|
|
11
|
+
children: u,
|
|
12
|
+
closeButton: d = !0,
|
|
13
|
+
confirmButton: s,
|
|
14
|
+
onAfterOpen: b,
|
|
15
|
+
onClose: y,
|
|
16
|
+
open: m,
|
|
17
|
+
qa: O,
|
|
18
|
+
shouldCloseOnOverlayClick: k = !0,
|
|
19
|
+
size: p = "",
|
|
20
|
+
title: e = { label: "" },
|
|
21
|
+
trigger: h
|
|
22
|
+
}) {
|
|
23
|
+
const [E, n] = A.useState(!!m), g = m === !1 || m === !0 ? m : E, M = e?.tag || "h6", i = (a, c) => c && typeof c == "function" ? Promise.resolve(c(a)).then(() => n(!1)) : n(!1), C = (a) => i(a, y), N = typeof document < "u" ? document.getElementById(v) ?? void 0 : void 0;
|
|
24
|
+
return /* @__PURE__ */ r(x, { children: [
|
|
25
|
+
h ? S(h, { onClick: () => n(!0) }) : null,
|
|
26
|
+
/* @__PURE__ */ l(
|
|
27
|
+
F,
|
|
28
|
+
{
|
|
29
|
+
appElement: N,
|
|
30
|
+
bodyOpenClassName: null,
|
|
31
|
+
htmlOpenClassName: null,
|
|
32
|
+
className: f({ "m-modal": !0, [`m-modal--${I[p || P]}`]: !!p }),
|
|
33
|
+
isOpen: g,
|
|
34
|
+
onRequestClose: C,
|
|
35
|
+
role: "dialog",
|
|
36
|
+
"aria-modal": "true",
|
|
37
|
+
overlayClassName: f({
|
|
38
|
+
"m-overlay": !0,
|
|
39
|
+
"is-active": !0
|
|
40
|
+
}),
|
|
41
|
+
"data-qa": O,
|
|
42
|
+
ariaHideApp: !!N,
|
|
43
|
+
onAfterOpen: b,
|
|
44
|
+
shouldCloseOnOverlayClick: o || s || d ? k : !0,
|
|
45
|
+
children: /* @__PURE__ */ r("div", { className: "m-modal__content", children: [
|
|
46
|
+
(e && e?.label || d) && /* @__PURE__ */ r("div", { className: "m-modal__header u-margin-bottom-xs", children: [
|
|
47
|
+
e && e?.label && /* @__PURE__ */ l(M, { className: e.className, id: e.id, children: e.label }),
|
|
48
|
+
d && /* @__PURE__ */ l(
|
|
49
|
+
t,
|
|
50
|
+
{
|
|
51
|
+
className: "m-modal__close",
|
|
52
|
+
theme: "neutral",
|
|
53
|
+
addOn: { type: "icon", iconProps: { name: "ai-close" } },
|
|
54
|
+
ariaLabel: _,
|
|
55
|
+
emphasis: "low",
|
|
56
|
+
onClick: C
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] }),
|
|
60
|
+
u && /* @__PURE__ */ l("div", { className: "u-margin-bottom", children: u }),
|
|
61
|
+
s || o ? /* @__PURE__ */ r("div", { className: "m-modal__footer", children: [
|
|
62
|
+
s ? /* @__PURE__ */ l(t, { ...s, onClick: (a) => i(a, s.onClick) }) : null,
|
|
63
|
+
o ? /* @__PURE__ */ l(t, { ...o, onClick: (a) => i(a, o.onClick) }) : null
|
|
64
|
+
] }) : null
|
|
65
|
+
] })
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
] });
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
Z as Modal
|
|
72
|
+
};
|
package/index31.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index51.js"),j=require("./index60.js");function x({items:o=[],border:n,ariaLabel:c="Navigatie",onItemClick:i,direction:l="horizontal",qa:d}){const[u,v,h,b]=j.useHorizontalScroll(),f=t.classNames({"m-nav-list":l==="vertical","m-nav-tabs":l!=="vertical","has-border":!!n,"has-shadow-left":l!=="vertical"&&!h,"has-shadow-right":l!=="vertical"&&!b}),g=(a,s,r)=>{i&&(a.preventDefault(),a.stopPropagation(),i(s.id,r),s.disabled||i(s.id,r))},N=(a,s)=>{const r=t.classNames({"is-active":!!a.active,"is-disabled":!!a.disabled});return e.jsx("li",{className:r,children:e.jsx("a",{href:a.href||"",onClick:S=>g(S,a,s),...a.disabled?{"aria-disabled":"true"}:{},...a.active?{"aria-current":"true"}:{},children:a.label})},a.id)};return e.jsx("nav",{role:"navigation",className:f,"aria-label":c,"data-qa":d,children:e.jsx("ul",{ref:u,onScroll:v,children:o.map(N)})})}exports.NavigationList=x;
|
package/index31.mjs
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { classNames as e } from "./index51.mjs";
|
|
3
|
+
import { useHorizontalScroll as S } from "./index60.mjs";
|
|
4
|
+
function z({
|
|
5
|
+
items: t = [],
|
|
6
|
+
border: n,
|
|
7
|
+
ariaLabel: c = "Navigatie",
|
|
8
|
+
onItemClick: o,
|
|
9
|
+
direction: r = "horizontal",
|
|
10
|
+
qa: d
|
|
11
|
+
}) {
|
|
12
|
+
const [v, h, f, b] = S(), u = e({
|
|
13
|
+
"m-nav-list": r === "vertical",
|
|
14
|
+
"m-nav-tabs": r !== "vertical",
|
|
15
|
+
"has-border": !!n,
|
|
16
|
+
"has-shadow-left": r !== "vertical" && !f,
|
|
17
|
+
"has-shadow-right": r !== "vertical" && !b
|
|
18
|
+
}), p = (a, l, s) => {
|
|
19
|
+
o && (a.preventDefault(), a.stopPropagation(), o(l.id, s), l.disabled || o(l.id, s));
|
|
20
|
+
}, g = (a, l) => {
|
|
21
|
+
const s = e({
|
|
22
|
+
"is-active": !!a.active,
|
|
23
|
+
"is-disabled": !!a.disabled
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ i("li", { className: s, children: /* @__PURE__ */ i(
|
|
26
|
+
"a",
|
|
27
|
+
{
|
|
28
|
+
href: a.href || "",
|
|
29
|
+
onClick: (N) => p(N, a, l),
|
|
30
|
+
...a.disabled ? { "aria-disabled": "true" } : {},
|
|
31
|
+
...a.active ? { "aria-current": "true" } : {},
|
|
32
|
+
children: a.label
|
|
33
|
+
}
|
|
34
|
+
) }, a.id);
|
|
35
|
+
};
|
|
36
|
+
return /* @__PURE__ */ i("nav", { role: "navigation", className: u, "aria-label": c, "data-qa": d, children: /* @__PURE__ */ i("ul", { ref: v, onScroll: h, children: t.map(g) }) });
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
z as NavigationList
|
|
40
|
+
};
|
package/index32.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),F=require("react"),f=require("./index51.js"),I=require("./index53.js");function _({qa:x,size:l,pages:n,activePage:c,onPageChange:u}){const[s,r]=F.useState(0),y=t=>r(t),A=t=>()=>u&&u(t),E=t=>{const o=t.key==="ArrowLeft",i=t.key==="ArrowRight";if(o||i){document.getElementById(c)?.setAttribute("tabindex","-1");let e=s;i&&(e=s+1>=n.length?0:s+1,r(e)),o&&(e=s-1<0?n.length-1:s-1,r(e));const a=n[e].id;if(a){const m=document.getElementById(a);m?.setAttribute("tabindex","0"),n.filter(d=>d.id!==a).forEach(d=>{document.getElementById(d.id)?.setAttribute("tabindex","-1")}),m?.focus()}}},h=f.classNames({"a-page-indicator":!0,[`a-page-indicator--${I.SIZE_MAP[l||I.DEFAULT_SIZE]}`]:!!l});return b.jsx("div",{className:h,"data-qa":x,onKeyDown:E,role:"tablist",children:n?.map((t,o)=>{const i=!!c&&c===t.id,e=f.classNames({"a-page-indicator__item":!0,"is-active":i});return b.jsx("button",{id:t.id,role:"tab",className:e,"aria-label":t.ariaLabel,"aria-selected":i?"true":"false","aria-controls":t.ariaControls,tabIndex:i?0:-1,onClick:A(t.id),onFocus:()=>y(o)},t.id)})})}exports.PageIndicator=_;
|
package/index32.mjs
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import F from "react";
|
|
3
|
+
import { classNames as b } from "./index51.mjs";
|
|
4
|
+
import { SIZE_MAP as y, DEFAULT_SIZE as w } from "./index53.mjs";
|
|
5
|
+
function B({ qa: I, size: l, pages: i, activePage: s, onPageChange: u }) {
|
|
6
|
+
const [n, c] = F.useState(0), x = (t) => c(t), A = (t) => () => u && u(t), E = (t) => {
|
|
7
|
+
const r = t.key === "ArrowLeft", o = t.key === "ArrowRight";
|
|
8
|
+
if (r || o) {
|
|
9
|
+
document.getElementById(s)?.setAttribute("tabindex", "-1");
|
|
10
|
+
let e = n;
|
|
11
|
+
o && (e = n + 1 >= i.length ? 0 : n + 1, c(e)), r && (e = n - 1 < 0 ? i.length - 1 : n - 1, c(e));
|
|
12
|
+
const a = i[e].id;
|
|
13
|
+
if (a) {
|
|
14
|
+
const m = document.getElementById(a);
|
|
15
|
+
m?.setAttribute("tabindex", "0"), i.filter((d) => d.id !== a).forEach((d) => {
|
|
16
|
+
document.getElementById(d.id)?.setAttribute("tabindex", "-1");
|
|
17
|
+
}), m?.focus();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}, h = b({
|
|
21
|
+
"a-page-indicator": !0,
|
|
22
|
+
[`a-page-indicator--${y[l || w]}`]: !!l
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ f("div", { className: h, "data-qa": I, onKeyDown: E, role: "tablist", children: i?.map((t, r) => {
|
|
25
|
+
const o = !!s && s === t.id, e = b({
|
|
26
|
+
"a-page-indicator__item": !0,
|
|
27
|
+
"is-active": o
|
|
28
|
+
});
|
|
29
|
+
return /* @__PURE__ */ f(
|
|
30
|
+
"button",
|
|
31
|
+
{
|
|
32
|
+
id: t.id,
|
|
33
|
+
role: "tab",
|
|
34
|
+
className: e,
|
|
35
|
+
"aria-label": t.ariaLabel,
|
|
36
|
+
"aria-selected": o ? "true" : "false",
|
|
37
|
+
"aria-controls": t.ariaControls,
|
|
38
|
+
tabIndex: o ? 0 : -1,
|
|
39
|
+
onClick: A(t.id),
|
|
40
|
+
onFocus: () => x(r)
|
|
41
|
+
},
|
|
42
|
+
t.id
|
|
43
|
+
);
|
|
44
|
+
}) });
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
B as PageIndicator
|
|
48
|
+
};
|
package/index33.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),c=require("./index51.js"),g=require("react"),h=require("./index53.js"),S=require("./index62.js"),_=require("./index24.js"),$=(a,i,n,t)=>s.jsxs("li",{className:"m-pagination__label",children:[s.jsxs("span",{className:"u-screen-reader-only",children:[t," "]}),n.replace("%currentPage%",`${a}`).replace("%totalPages%",`${i}`)]},"pagination__label"),y=(a,i,n,t)=>S.pagesArray(a,i).map((e,r)=>{if(e){const m=c.classNames({"is-active":e===a});return s.jsx("li",{children:s.jsx("a",{className:m,href:"#",onClick:p=>t&&t(e,p),"aria-label":`${n} ${e}`,"aria-current":e===a?"page":void 0,children:e})},r)}else return s.jsx("li",{children:"..."},r)});function D({currentPage:a=1,itemsPerPage:i,totalItems:n,onChange:t,display:d="numbers",size:e,ariaLabel:r="Paginering",ariaLabelNextPage:m="Volgende pagina",ariaLabelPreviousPage:p="Vorige pagina",ariaLabelPage:x="Pagina",text:f="%currentPage% van de %totalPages%",qa:j}){const[o,N]=g.useState(0),v=l=>{l.preventDefault(),a>1&&u(a-1)},q=l=>{l.preventDefault(),a<o&&u(a+1)},u=(l,b)=>(b&&b.preventDefault(),t&&t(l)),C=c.classNames({"m-pagination":!0,[`m-pagination--${h.SIZE_MAP[e||h.DEFAULT_SIZE]}`]:!!e}),I=c.classNames({"is-disabled":a<=1}),M=c.classNames({"is-disabled":a>=o});return g.useEffect(()=>{if(n&&i){const l=Math.ceil(Math.abs(n)/Math.abs(i));N(l)}},[a,i,n]),s.jsx("nav",{role:"navigation","aria-label":r,"data-qa":j,children:s.jsxs("ul",{className:C,children:[s.jsx("li",{className:"m-pagination__prev",children:s.jsx("a",{href:"#",className:I,"aria-label":p,"aria-disabled":a<=1?"true":void 0,tabIndex:a<=1?-1:0,onClick:v,children:s.jsx(_.Icon,{name:"arrow-left-1"})})},"pagination__prev"),d==="text"&&$(a,o,f,x),d==="numbers"&&y(a,o,x,u),s.jsx("li",{className:"m-pagination__next",children:s.jsx("a",{href:"#",className:M,"aria-label":m,"aria-disabled":a>=o?"true":void 0,tabIndex:a>=o?-1:0,onClick:q,children:s.jsx(_.Icon,{name:"arrow-right-1"})})},"pagination__next")]})})}exports.Pagination=D;
|
package/index33.mjs
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as i, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { classNames as c } from "./index51.mjs";
|
|
3
|
+
import { useState as M, useEffect as k } from "react";
|
|
4
|
+
import { SIZE_MAP as A, DEFAULT_SIZE as I } from "./index53.mjs";
|
|
5
|
+
import { pagesArray as S } from "./index62.mjs";
|
|
6
|
+
import { Icon as _ } from "./index24.mjs";
|
|
7
|
+
const T = (a, e, s, l) => /* @__PURE__ */ h("li", { className: "m-pagination__label", children: [
|
|
8
|
+
/* @__PURE__ */ h("span", { className: "u-screen-reader-only", children: [
|
|
9
|
+
l,
|
|
10
|
+
" "
|
|
11
|
+
] }),
|
|
12
|
+
s.replace("%currentPage%", `${a}`).replace("%totalPages%", `${e}`)
|
|
13
|
+
] }, "pagination__label"), j = (a, e, s, l) => S(a, e).map((n, r) => {
|
|
14
|
+
if (n) {
|
|
15
|
+
const p = c({
|
|
16
|
+
"is-active": n === a
|
|
17
|
+
});
|
|
18
|
+
return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
19
|
+
"a",
|
|
20
|
+
{
|
|
21
|
+
className: p,
|
|
22
|
+
href: "#",
|
|
23
|
+
onClick: (m) => l && l(n, m),
|
|
24
|
+
"aria-label": `${s} ${n}`,
|
|
25
|
+
"aria-current": n === a ? "page" : void 0,
|
|
26
|
+
children: n
|
|
27
|
+
}
|
|
28
|
+
) }, r);
|
|
29
|
+
} else
|
|
30
|
+
return /* @__PURE__ */ i("li", { children: "..." }, r);
|
|
31
|
+
});
|
|
32
|
+
function U({
|
|
33
|
+
currentPage: a = 1,
|
|
34
|
+
itemsPerPage: e,
|
|
35
|
+
totalItems: s,
|
|
36
|
+
onChange: l,
|
|
37
|
+
display: d = "numbers",
|
|
38
|
+
size: n,
|
|
39
|
+
ariaLabel: r = "Paginering",
|
|
40
|
+
ariaLabelNextPage: p = "Volgende pagina",
|
|
41
|
+
ariaLabelPreviousPage: m = "Vorige pagina",
|
|
42
|
+
ariaLabelPage: b = "Pagina",
|
|
43
|
+
text: v = "%currentPage% van de %totalPages%",
|
|
44
|
+
qa: N
|
|
45
|
+
}) {
|
|
46
|
+
const [t, x] = M(0), u = (o) => {
|
|
47
|
+
o.preventDefault(), a > 1 && f(a - 1);
|
|
48
|
+
}, C = (o) => {
|
|
49
|
+
o.preventDefault(), a < t && f(a + 1);
|
|
50
|
+
}, f = (o, g) => (g && g.preventDefault(), l && l(o)), $ = c({
|
|
51
|
+
"m-pagination": !0,
|
|
52
|
+
[`m-pagination--${A[n || I]}`]: !!n
|
|
53
|
+
}), D = c({ "is-disabled": a <= 1 }), E = c({ "is-disabled": a >= t });
|
|
54
|
+
return k(() => {
|
|
55
|
+
if (s && e) {
|
|
56
|
+
const o = Math.ceil(Math.abs(s) / Math.abs(e));
|
|
57
|
+
x(o);
|
|
58
|
+
}
|
|
59
|
+
}, [a, e, s]), /* @__PURE__ */ i("nav", { role: "navigation", "aria-label": r, "data-qa": N, children: /* @__PURE__ */ h("ul", { className: $, children: [
|
|
60
|
+
/* @__PURE__ */ i("li", { className: "m-pagination__prev", children: /* @__PURE__ */ i(
|
|
61
|
+
"a",
|
|
62
|
+
{
|
|
63
|
+
href: "#",
|
|
64
|
+
className: D,
|
|
65
|
+
"aria-label": m,
|
|
66
|
+
"aria-disabled": a <= 1 ? "true" : void 0,
|
|
67
|
+
tabIndex: a <= 1 ? -1 : 0,
|
|
68
|
+
onClick: u,
|
|
69
|
+
children: /* @__PURE__ */ i(_, { name: "arrow-left-1" })
|
|
70
|
+
}
|
|
71
|
+
) }, "pagination__prev"),
|
|
72
|
+
d === "text" && T(a, t, v, b),
|
|
73
|
+
d === "numbers" && j(a, t, b, f),
|
|
74
|
+
/* @__PURE__ */ i("li", { className: "m-pagination__next", children: /* @__PURE__ */ i(
|
|
75
|
+
"a",
|
|
76
|
+
{
|
|
77
|
+
href: "#",
|
|
78
|
+
className: E,
|
|
79
|
+
"aria-label": p,
|
|
80
|
+
"aria-disabled": a >= t ? "true" : void 0,
|
|
81
|
+
tabIndex: a >= t ? -1 : 0,
|
|
82
|
+
onClick: C,
|
|
83
|
+
children: /* @__PURE__ */ i(_, { name: "arrow-right-1" })
|
|
84
|
+
}
|
|
85
|
+
) }, "pagination__next")
|
|
86
|
+
] }) });
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
U as Pagination
|
|
90
|
+
};
|
package/index34.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),g=require("./index51.js");function m({label:r,labelId:a="aui-progress-label",showLabel:e=!0,percentage:l=0,ariaValueNow:i,minValue:o=0,maxValue:t=100,large:n,qa:u}){const c=i||l,d=g.classNames({"a-progress":!0,"a-progress--l":!!n});return s.jsxs("div",{className:d,"data-qa":u,children:[e?s.jsx("div",{id:a,className:"a-progress__label",children:r}):null,s.jsx("div",{className:"a-progress__inner",children:s.jsx("div",{className:"a-progress__bar",role:"progressbar","aria-valuenow":c,"aria-valuemin":o,"aria-valuemax":t,style:{width:`${l}%`},...e?{"aria-labelledby":a}:{"aria-label":r}})})]})}exports.ProgressBar=m;
|
package/index34.mjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsxs as u, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { classNames as p } from "./index51.mjs";
|
|
3
|
+
function _({
|
|
4
|
+
label: r,
|
|
5
|
+
labelId: s = "aui-progress-label",
|
|
6
|
+
showLabel: e = !0,
|
|
7
|
+
percentage: l = 0,
|
|
8
|
+
ariaValueNow: i,
|
|
9
|
+
minValue: o = 0,
|
|
10
|
+
maxValue: n = 100,
|
|
11
|
+
large: c,
|
|
12
|
+
qa: m
|
|
13
|
+
}) {
|
|
14
|
+
const t = i || l, d = p({
|
|
15
|
+
"a-progress": !0,
|
|
16
|
+
"a-progress--l": !!c
|
|
17
|
+
});
|
|
18
|
+
return /* @__PURE__ */ u("div", { className: d, "data-qa": m, children: [
|
|
19
|
+
e ? /* @__PURE__ */ a("div", { id: s, className: "a-progress__label", children: r }) : null,
|
|
20
|
+
/* @__PURE__ */ a("div", { className: "a-progress__inner", children: /* @__PURE__ */ a(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
className: "a-progress__bar",
|
|
24
|
+
role: "progressbar",
|
|
25
|
+
"aria-valuenow": t,
|
|
26
|
+
"aria-valuemin": o,
|
|
27
|
+
"aria-valuemax": n,
|
|
28
|
+
style: { width: `${l}%` },
|
|
29
|
+
...e ? { "aria-labelledby": s } : { "aria-label": r }
|
|
30
|
+
}
|
|
31
|
+
) })
|
|
32
|
+
] });
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
_ as ProgressBar
|
|
36
|
+
};
|
package/index35.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");function j({autoFocus:i,value:n,label:r,id:a,qa:o,name:s,onChange:t,checked:l,disabled:d,required:u=!1}){const c=h=>{t&&t(h)};return e.jsxs("div",{className:"a-input__radio","data-qa":o,children:[e.jsx("input",{type:"radio",id:a,checked:l,name:s,value:n,onChange:c,disabled:d,autoFocus:i,required:u}),e.jsx("label",{htmlFor:a,children:r})]})}exports.Radio=j;
|
package/index35.mjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsxs as p, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
function f({ autoFocus: r, value: t, label: i, id: a, qa: l, name: o, onChange: e, checked: d, disabled: h, required: s = !1 }) {
|
|
3
|
+
return /* @__PURE__ */ p("div", { className: "a-input__radio", "data-qa": l, children: [
|
|
4
|
+
/* @__PURE__ */ n(
|
|
5
|
+
"input",
|
|
6
|
+
{
|
|
7
|
+
type: "radio",
|
|
8
|
+
id: a,
|
|
9
|
+
checked: d,
|
|
10
|
+
name: o,
|
|
11
|
+
value: t,
|
|
12
|
+
onChange: (c) => {
|
|
13
|
+
e && e(c);
|
|
14
|
+
},
|
|
15
|
+
disabled: h,
|
|
16
|
+
autoFocus: r,
|
|
17
|
+
required: s
|
|
18
|
+
}
|
|
19
|
+
),
|
|
20
|
+
/* @__PURE__ */ n("label", { htmlFor: a, children: i })
|
|
21
|
+
] });
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
f as Radio
|
|
25
|
+
};
|
package/index36.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),a=require("react"),q=require("./index51.js"),g=require("./index56.js"),R=require("./index54.js");function _({label:i,name:u,children:o=[],value:r,qa:c,onChange:s,description:l,state:d,required:t=!1}){const p=e=>s&&s(e.target?.value),m=q.classNames({"a-input":!0});return n.jsxs("fieldset",{className:m,"data-qa":c,children:[n.jsxs("legend",{className:"a-input__label",children:[i,t&&R.renderRequiredAsterisk()]}),g.renderDescription({description:l,state:d}),a.Children.map(o,e=>a.cloneElement(e,{name:u,onChange:p,required:t,...r?{checked:e.props.value===r}:{},...e.props}))]})}exports.RadioGroup=_;
|
package/index36.mjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { Children as u, cloneElement as f } from "react";
|
|
3
|
+
import { classNames as h } from "./index51.mjs";
|
|
4
|
+
import { renderDescription as g } from "./index56.mjs";
|
|
5
|
+
import { renderRequiredAsterisk as N } from "./index54.mjs";
|
|
6
|
+
function b({ label: n, name: o, children: m = [], value: r, qa: p, onChange: t, description: i, state: l, required: s = !1 }) {
|
|
7
|
+
const c = (e) => t && t(e.target?.value), d = h({
|
|
8
|
+
"a-input": !0
|
|
9
|
+
});
|
|
10
|
+
return /* @__PURE__ */ a("fieldset", { className: d, "data-qa": p, children: [
|
|
11
|
+
/* @__PURE__ */ a("legend", { className: "a-input__label", children: [
|
|
12
|
+
n,
|
|
13
|
+
s && N()
|
|
14
|
+
] }),
|
|
15
|
+
g({ description: i, state: l }),
|
|
16
|
+
u.map(m, (e) => f(e, {
|
|
17
|
+
name: o,
|
|
18
|
+
onChange: c,
|
|
19
|
+
required: s,
|
|
20
|
+
...r ? { checked: e.props.value === r } : {},
|
|
21
|
+
...e.props
|
|
22
|
+
}))
|
|
23
|
+
] });
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
b as RadioGroup
|
|
27
|
+
};
|
package/index37.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),c=require("react"),S=require("./index62.js"),I=require("./index63.js"),N=require("./index64.js"),g=require("./index24.js");function T({label:P,start:t=0,end:i,min:r=0,max:l=10,step:o=1,unit:q="",minRange:a=1,range:d=!1,labelStart:L,labelEnd:R,iconStart:h,iconEnd:x,ariaLabelMin:k="Minimum",ariaLabelMax:w="Maximimum",tickMarks:H,qa:y,onChange:u}){const[b,E]=c.useState(0),[m,U]=c.useState(0),[_,V]=c.useState(0),f=c.useRef(null);c.useEffect(()=>(window.addEventListener("resize",j),j(),()=>window.removeEventListener("resize",j)),[]);const j=()=>{if(f.current){const e=f.current.offsetWidth,n=f.current;if(n&&n instanceof HTMLElement){const B=n.getBoundingClientRect().left;V(B)}E(e),U(e)}},p=e=>{if(!(d&&i&&a&&i-e<a))return u&&u(e,d?i:void 0)},M=e=>{if(!(t&&a&&e-t<a))return u&&u(t,e)},v=e=>S.lineValuesToPosition(e,r,l,b),$=e=>S.getPositionValue(e,b,o,r,l,r,l,_),z=e=>{const n=$(e);if(d&&i&&Math.abs(n-i)<Math.abs(n-t)){M(n);return}p(n)};return s.jsxs("div",{className:"a-range-slider","data-qa":y,ref:f,children:[s.jsxs("div",{className:"a-range-slider__labels",children:[s.jsx("div",{className:"a-range-slider__label",children:P}),s.jsxs("div",{className:"a-range-slider__label",children:[d?`${t} - ${i}`:`${t}`,` ${q}`]})]}),s.jsxs("div",{className:"a-range-slider__inner",onClick:z,children:[H&&s.jsx("div",{className:"a-range-slider__tickmarks",children:S.getSteps(r,l,o).map(e=>s.jsx("div",{className:"a-range-slider__tickmark"},e))}),s.jsx(I.RangeSliderBar,{start:t,end:i,getPositionFromValue:v,range:!!d,min:r}),s.jsx(N.RangeSliderHandle,{value:t,onUpdate:p,min:r,max:d&&a?l-a:l,sliderMin:r,sliderMax:l,step:o,sliderPos:m,direction:_,getPositionFromValue:v,ariaLabel:k}),d&&typeof a=="number"&&typeof i=="number"&&s.jsx(N.RangeSliderHandle,{value:i,onUpdate:M,min:r+a,max:l,sliderMin:r,sliderMax:l,step:o,sliderPos:m,direction:_,getPositionFromValue:v,ariaLabel:w})]}),s.jsxs("div",{className:"a-range-slider__descriptions",children:[s.jsxs("div",{className:"a-range-slider__description small",children:[L,h?s.jsx(g.Icon,{name:h}):null]}),s.jsxs("div",{className:"a-range-slider__description small",children:[R,x?s.jsx(g.Icon,{name:x}):null]})]})]})}exports.RangeSlider=T;
|
package/index37.mjs
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import c from "react";
|
|
3
|
+
import { getSteps as F, lineValuesToPosition as I, getPositionValue as R } from "./index62.mjs";
|
|
4
|
+
import { RangeSliderBar as W } from "./index63.mjs";
|
|
5
|
+
import { RangeSliderHandle as L } from "./index64.mjs";
|
|
6
|
+
import { Icon as k } from "./index24.mjs";
|
|
7
|
+
function X({
|
|
8
|
+
label: w,
|
|
9
|
+
start: l = 0,
|
|
10
|
+
end: i,
|
|
11
|
+
min: r = 0,
|
|
12
|
+
max: s = 10,
|
|
13
|
+
step: u = 1,
|
|
14
|
+
unit: E = "",
|
|
15
|
+
minRange: t = 1,
|
|
16
|
+
range: d = !1,
|
|
17
|
+
labelStart: U,
|
|
18
|
+
labelEnd: V,
|
|
19
|
+
iconStart: h,
|
|
20
|
+
iconEnd: N,
|
|
21
|
+
ariaLabelMin: $ = "Minimum",
|
|
22
|
+
ariaLabelMax: g = "Maximimum",
|
|
23
|
+
tickMarks: z,
|
|
24
|
+
qa: H,
|
|
25
|
+
onChange: f
|
|
26
|
+
}) {
|
|
27
|
+
const [b, j] = c.useState(0), [M, y] = c.useState(0), [_, B] = c.useState(0), m = c.useRef(null);
|
|
28
|
+
c.useEffect(() => (window.addEventListener("resize", p), p(), () => window.removeEventListener("resize", p)), []);
|
|
29
|
+
const p = () => {
|
|
30
|
+
if (m.current) {
|
|
31
|
+
const e = m.current.offsetWidth, a = m.current;
|
|
32
|
+
if (a && a instanceof HTMLElement) {
|
|
33
|
+
const D = a.getBoundingClientRect().left;
|
|
34
|
+
B(D);
|
|
35
|
+
}
|
|
36
|
+
j(e), y(e);
|
|
37
|
+
}
|
|
38
|
+
}, S = (e) => {
|
|
39
|
+
if (!(d && i && t && i - e < t))
|
|
40
|
+
return f && f(e, d ? i : void 0);
|
|
41
|
+
}, P = (e) => {
|
|
42
|
+
if (!(l && t && e - l < t))
|
|
43
|
+
return f && f(l, e);
|
|
44
|
+
}, v = (e) => I(e, r, s, b), T = (e) => R(e, b, u, r, s, r, s, _), q = (e) => {
|
|
45
|
+
const a = T(e);
|
|
46
|
+
if (d && i && Math.abs(a - i) < Math.abs(a - l)) {
|
|
47
|
+
P(a);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
S(a);
|
|
51
|
+
};
|
|
52
|
+
return /* @__PURE__ */ n("div", { className: "a-range-slider", "data-qa": H, ref: m, children: [
|
|
53
|
+
/* @__PURE__ */ n("div", { className: "a-range-slider__labels", children: [
|
|
54
|
+
/* @__PURE__ */ o("div", { className: "a-range-slider__label", children: w }),
|
|
55
|
+
/* @__PURE__ */ n("div", { className: "a-range-slider__label", children: [
|
|
56
|
+
d ? `${l} - ${i}` : `${l}`,
|
|
57
|
+
` ${E}`
|
|
58
|
+
] })
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ n("div", { className: "a-range-slider__inner", onClick: q, children: [
|
|
61
|
+
z && /* @__PURE__ */ o("div", { className: "a-range-slider__tickmarks", children: F(r, s, u).map((e) => /* @__PURE__ */ o("div", { className: "a-range-slider__tickmark" }, e)) }),
|
|
62
|
+
/* @__PURE__ */ o(W, { start: l, end: i, getPositionFromValue: v, range: !!d, min: r }),
|
|
63
|
+
/* @__PURE__ */ o(
|
|
64
|
+
L,
|
|
65
|
+
{
|
|
66
|
+
value: l,
|
|
67
|
+
onUpdate: S,
|
|
68
|
+
min: r,
|
|
69
|
+
max: d && t ? s - t : s,
|
|
70
|
+
sliderMin: r,
|
|
71
|
+
sliderMax: s,
|
|
72
|
+
step: u,
|
|
73
|
+
sliderPos: M,
|
|
74
|
+
direction: _,
|
|
75
|
+
getPositionFromValue: v,
|
|
76
|
+
ariaLabel: $
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
d && typeof t == "number" && typeof i == "number" && /* @__PURE__ */ o(
|
|
80
|
+
L,
|
|
81
|
+
{
|
|
82
|
+
value: i,
|
|
83
|
+
onUpdate: P,
|
|
84
|
+
min: r + t,
|
|
85
|
+
max: s,
|
|
86
|
+
sliderMin: r,
|
|
87
|
+
sliderMax: s,
|
|
88
|
+
step: u,
|
|
89
|
+
sliderPos: M,
|
|
90
|
+
direction: _,
|
|
91
|
+
getPositionFromValue: v,
|
|
92
|
+
ariaLabel: g
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] }),
|
|
96
|
+
/* @__PURE__ */ n("div", { className: "a-range-slider__descriptions", children: [
|
|
97
|
+
/* @__PURE__ */ n("div", { className: "a-range-slider__description small", children: [
|
|
98
|
+
U,
|
|
99
|
+
h ? /* @__PURE__ */ o(k, { name: h }) : null
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ n("div", { className: "a-range-slider__description small", children: [
|
|
102
|
+
V,
|
|
103
|
+
N ? /* @__PURE__ */ o(k, { name: N }) : null
|
|
104
|
+
] })
|
|
105
|
+
] })
|
|
106
|
+
] });
|
|
107
|
+
}
|
|
108
|
+
export {
|
|
109
|
+
X as RangeSlider
|
|
110
|
+
};
|
package/index38.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("./index51.js"),c=require("./index53.js"),o=require("./index56.js"),w=require("./index24.js");function I({description:d,disabled:p,id:s,inline:n,label:h,name:m,options:_,placeholder:j="Maak een keuze",required:b,size:a,state:t,value:i,onChange:u,qa:x}){const q=e=>u&&u(e),v=l.classNames({"a-input":!0,"has-icon-right":!0,"a-input--inline":!!n,[`a-input--${c.SIZE_MAP[a||c.DEFAULT_SIZE]}`]:!!a,"has-error":t==="error"}),S=l.classNames({"a-input__wrapper":!0,"a-input__wrapper--inline":!!n});return r.jsxs("div",{className:v,"data-qa":x,children:[o.renderLabel({label:h,id:s,required:b,inline:n}),o.renderDescription({id:s,description:d,state:t}),r.jsxs("div",{className:S,children:[r.jsxs("select",{disabled:p,name:m,id:s,value:i,defaultValue:i||"",onChange:q,children:[r.jsx("option",{value:"",disabled:!0,children:j}),(_||[]).map((e,g)=>r.jsx("option",{value:e.value,disabled:e.disabled,children:e.label},`${e.value}-${g}`))]}),r.jsx(w.Icon,{name:"arrow-down-1"})]})]})}exports.Select=I;
|
package/index38.mjs
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { classNames as p } from "./index51.mjs";
|
|
3
|
+
import { SIZE_MAP as I, DEFAULT_SIZE as N } from "./index53.mjs";
|
|
4
|
+
import { renderLabel as S, renderDescription as $ } from "./index56.mjs";
|
|
5
|
+
import { Icon as g } from "./index24.mjs";
|
|
6
|
+
function L({
|
|
7
|
+
description: u,
|
|
8
|
+
disabled: c,
|
|
9
|
+
id: r,
|
|
10
|
+
inline: a,
|
|
11
|
+
label: d,
|
|
12
|
+
name: m,
|
|
13
|
+
options: h,
|
|
14
|
+
placeholder: f = "Maak een keuze",
|
|
15
|
+
required: _,
|
|
16
|
+
size: i,
|
|
17
|
+
state: l,
|
|
18
|
+
value: s,
|
|
19
|
+
onChange: o,
|
|
20
|
+
qa: b
|
|
21
|
+
}) {
|
|
22
|
+
const v = (e) => o && o(e), w = p({
|
|
23
|
+
"a-input": !0,
|
|
24
|
+
"has-icon-right": !0,
|
|
25
|
+
"a-input--inline": !!a,
|
|
26
|
+
[`a-input--${I[i || N]}`]: !!i,
|
|
27
|
+
"has-error": l === "error"
|
|
28
|
+
}), x = p({
|
|
29
|
+
"a-input__wrapper": !0,
|
|
30
|
+
"a-input__wrapper--inline": !!a
|
|
31
|
+
});
|
|
32
|
+
return /* @__PURE__ */ n("div", { className: w, "data-qa": b, children: [
|
|
33
|
+
S({ label: d, id: r, required: _, inline: a }),
|
|
34
|
+
$({ id: r, description: u, state: l }),
|
|
35
|
+
/* @__PURE__ */ n("div", { className: x, children: [
|
|
36
|
+
/* @__PURE__ */ n(
|
|
37
|
+
"select",
|
|
38
|
+
{
|
|
39
|
+
disabled: c,
|
|
40
|
+
name: m,
|
|
41
|
+
id: r,
|
|
42
|
+
value: s,
|
|
43
|
+
defaultValue: s || "",
|
|
44
|
+
onChange: v,
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ t("option", { value: "", disabled: !0, children: f }),
|
|
47
|
+
(h || []).map((e, E) => /* @__PURE__ */ t("option", { value: e.value, disabled: e.disabled, children: e.label }, `${e.value}-${E}`))
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ t(g, { name: "arrow-down-1" })
|
|
52
|
+
] })
|
|
53
|
+
] });
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
L as Select
|
|
57
|
+
};
|
package/index39.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("./index51.js"),d=require("./index52.js"),r=require("./index53.js");function p({label:t="Wordt geladen...",showText:s,size:n,vertical:i,ariaHidden:l,qa:c}){const o=a.classNames({"a-spinner":!0,[`a-spinner--${r.SIZE_MAP[n||r.DEFAULT_SIZE]}`]:!!n,"a-spinner--vertical":!!i}),u=a.classNames({"a-spinner__text":!!s,[d.SCREEN_READER_CLASS]:!s});return e.jsxs("div",{className:o,"aria-hidden":l,"data-qa":c,children:[e.jsx("span",{role:"alert",className:"a-spinner__circle"}),e.jsx("span",{className:u,children:t})]})}exports.Spinner=p;
|
package/index39.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs as p, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { classNames as e } from "./index51.mjs";
|
|
3
|
+
import { SCREEN_READER_CLASS as m } from "./index52.mjs";
|
|
4
|
+
import { SIZE_MAP as d, DEFAULT_SIZE as _ } from "./index53.mjs";
|
|
5
|
+
function A({ label: n = "Wordt geladen...", showText: a, size: r, vertical: i, ariaHidden: l, qa: t }) {
|
|
6
|
+
const c = e({
|
|
7
|
+
"a-spinner": !0,
|
|
8
|
+
[`a-spinner--${d[r || _]}`]: !!r,
|
|
9
|
+
"a-spinner--vertical": !!i
|
|
10
|
+
}), o = e({
|
|
11
|
+
"a-spinner__text": !!a,
|
|
12
|
+
[m]: !a
|
|
13
|
+
});
|
|
14
|
+
return /* @__PURE__ */ p("div", { className: c, "aria-hidden": l, "data-qa": t, children: [
|
|
15
|
+
/* @__PURE__ */ s("span", { role: "alert", className: "a-spinner__circle" }),
|
|
16
|
+
/* @__PURE__ */ s("span", { className: o, children: n })
|
|
17
|
+
] });
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
A as Spinner
|
|
21
|
+
};
|
package/index4.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),m=require("./index51.js"),d=require("./index53.js"),u=require("./index24.js"),r=require("./index10.js"),g=(a,e)=>{const{ariaLabelClose:l="Sluiten",cancelButton:n,children:h,confirmButton:i,onClose:x,qa:b,theme:s,title:c={label:""},titleId:o}=e,j=e.title?.tag||"h5",_=m.classNames({"u-margin-bottom":!!(i||n)});return t.jsxs("div",{role:"alertdialog",className:a,"aria-labelledby":o,"aria-modal":"true","data-qa":b,children:[t.jsx(r.Button,{addOn:{type:"icon",iconProps:{name:"remove"}},emphasis:"low",className:"m-alert__close",theme:s,ariaLabel:l,onClick:x}),!!s&&t.jsx("span",{className:"m-alert__icon",children:t.jsx(u.Icon,{name:d.THEME_ICON_MAP[s]})}),c?.label&&t.jsx(j,{id:o,className:"m-alert__title u-margin-bottom-xs",children:c.label}),t.jsx("p",{className:_,children:h}),t.jsxs("div",{className:"m-alert__actions",children:[i?t.jsx(r.Button,{...i}):null,n?t.jsx(r.Button,{...n}):null]})]})},N=(a,e)=>{const l=e.title?.tag||"h5";return t.jsxs("div",{role:"alert",className:a,"aria-labelledby":e.titleId,"data-qa":e.qa,children:[!!e.theme&&t.jsx("span",{className:"m-alert__icon",children:t.jsx(u.Icon,{name:d.THEME_ICON_MAP[e.theme]})}),!!e.title&&t.jsx(l,{id:e.titleId,className:"paragraph has-base-font u-margin-bottom-xs",children:e.title?.label}),t.jsx("p",{children:e.children})]})};function q(a){const e=m.classNames({"m-alert":!0,[`m-alert--${a.theme}`]:!!a.theme,"m-alert--inline":!!a.inline});return a.inline?N(e,a):g(e,a)}exports.Alert=q;
|
package/index4.mjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { classNames as s } from "./index51.mjs";
|
|
3
|
+
import { THEME_ICON_MAP as h } from "./index53.mjs";
|
|
4
|
+
import { Icon as u } from "./index24.mjs";
|
|
5
|
+
import { Button as m } from "./index10.mjs";
|
|
6
|
+
const x = (l, e) => {
|
|
7
|
+
const {
|
|
8
|
+
ariaLabelClose: t = "Sluiten",
|
|
9
|
+
cancelButton: n,
|
|
10
|
+
children: b,
|
|
11
|
+
confirmButton: i,
|
|
12
|
+
onClose: _,
|
|
13
|
+
qa: g,
|
|
14
|
+
theme: r,
|
|
15
|
+
title: o = { label: "" },
|
|
16
|
+
titleId: d
|
|
17
|
+
} = e, N = e.title?.tag || "h5", f = s({
|
|
18
|
+
"u-margin-bottom": !!(i || n)
|
|
19
|
+
});
|
|
20
|
+
return /* @__PURE__ */ c("div", { role: "alertdialog", className: l, "aria-labelledby": d, "aria-modal": "true", "data-qa": g, children: [
|
|
21
|
+
/* @__PURE__ */ a(
|
|
22
|
+
m,
|
|
23
|
+
{
|
|
24
|
+
addOn: { type: "icon", iconProps: { name: "remove" } },
|
|
25
|
+
emphasis: "low",
|
|
26
|
+
className: "m-alert__close",
|
|
27
|
+
theme: r,
|
|
28
|
+
ariaLabel: t,
|
|
29
|
+
onClick: _
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
!!r && /* @__PURE__ */ a("span", { className: "m-alert__icon", children: /* @__PURE__ */ a(u, { name: h[r] }) }),
|
|
33
|
+
o?.label && /* @__PURE__ */ a(N, { id: d, className: "m-alert__title u-margin-bottom-xs", children: o.label }),
|
|
34
|
+
/* @__PURE__ */ a("p", { className: f, children: b }),
|
|
35
|
+
/* @__PURE__ */ c("div", { className: "m-alert__actions", children: [
|
|
36
|
+
i ? /* @__PURE__ */ a(m, { ...i }) : null,
|
|
37
|
+
n ? /* @__PURE__ */ a(m, { ...n }) : null
|
|
38
|
+
] })
|
|
39
|
+
] });
|
|
40
|
+
}, C = (l, e) => {
|
|
41
|
+
const t = e.title?.tag || "h5";
|
|
42
|
+
return /* @__PURE__ */ c("div", { role: "alert", className: l, "aria-labelledby": e.titleId, "data-qa": e.qa, children: [
|
|
43
|
+
!!e.theme && /* @__PURE__ */ a("span", { className: "m-alert__icon", children: /* @__PURE__ */ a(u, { name: h[e.theme] }) }),
|
|
44
|
+
!!e.title && /* @__PURE__ */ a(t, { id: e.titleId, className: "paragraph has-base-font u-margin-bottom-xs", children: e.title?.label }),
|
|
45
|
+
/* @__PURE__ */ a("p", { children: e.children })
|
|
46
|
+
] });
|
|
47
|
+
};
|
|
48
|
+
function B(l) {
|
|
49
|
+
const e = s({
|
|
50
|
+
"m-alert": !0,
|
|
51
|
+
[`m-alert--${l.theme}`]: !!l.theme,
|
|
52
|
+
"m-alert--inline": !!l.inline
|
|
53
|
+
});
|
|
54
|
+
return l.inline ? C(e, l) : x(e, l);
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
B as Alert
|
|
58
|
+
};
|
package/index40.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),u=require("./index51.js"),p=require("./index54.js");function h({steps:c=[],onStepClick:n,screenReaderStepLabel:i="Stap ",screenReaderCompleteLabel:t=" (voltooid)",qa:o}){const d=(e,s,a)=>{n&&(e.preventDefault(),n(a,s))};return l.jsx("ol",{className:"m-step-indicator","data-qa":o,children:c?.map((e,s)=>{const a=u.classNames({"is-completed":!!e.complete,"is-incompleted":!e.complete,"is-active":!!e.active}),r=e.link?.href;return l.jsx("li",{className:a,children:p.wrapWithIf(l.jsxs(l.Fragment,{children:[e.label?null:l.jsxs("span",{className:"u-screen-reader-only",children:[i," ",s+1]}),l.jsx("span",{className:"m-step-indicator__number"}),l.jsxs("span",{className:"m-step-indicator__label",children:[e.label||null,e.complete?l.jsx("span",{className:"u-screen-reader-only",children:t}):null]})]}),l.jsx("a",{onClick:m=>d(m,s,e?.id),href:r}),!!r)},e.id)})})}exports.StepIndicator=h;
|