asma-ui-core 3.98.0 → 3.98.2
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/dist/asma-ui-core.css +1 -1
- package/dist/components/custom/widget/widget-title/StyledWidgetTitle.js +7 -7
- package/dist/components/custom/widget/widget-title/StyledWidgetTitle.module.js +1 -1
- package/dist/components/inputs/phone-field/StyledPhoneField.js +27 -26
- package/dist/components/utils/popover/PopoverSheet.js +73 -73
- package/dist/src/components/custom/widget/widget-title/StyledWidgetTitle.d.ts +2 -1
- package/dist/table/components/table-footer/TablePagination.js +21 -19
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { cn as i } from "../../../../helpers/cn.js";
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { jsx as
|
|
5
|
-
var
|
|
6
|
-
return /* @__PURE__ */
|
|
2
|
+
import l from "./StyledWidgetTitle.module.js";
|
|
3
|
+
import { forwardRef as r } from "react";
|
|
4
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
5
|
+
var c = r(function(e, t) {
|
|
6
|
+
return /* @__PURE__ */ d(e.component ?? "h2", {
|
|
7
7
|
ref: t,
|
|
8
|
-
className: i(
|
|
8
|
+
className: i(l["styled-widget-title"], e.className),
|
|
9
9
|
children: e.children
|
|
10
10
|
});
|
|
11
11
|
});
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
c as StyledWidgetTitle
|
|
14
14
|
};
|
|
@@ -3,66 +3,67 @@ import { StyledInputField as M } from "../input-field/StyledInputField.js";
|
|
|
3
3
|
import { StyledLink as V } from "../../navigation/link/StyledLink.js";
|
|
4
4
|
import { CountryCodeSelect as W } from "./CountryCodeSelect.js";
|
|
5
5
|
import { useId as z } from "react";
|
|
6
|
-
import { jsx as t, jsxs as
|
|
7
|
-
var E = (e) => e.replace(/\D/g, ""), U = ({ dataTest: e, label: l, countries: h, country: n, onCountryChange: x, value: s, onChange: f, onBlur:
|
|
8
|
-
const B = z(), a = j ?? `${B}-phone`,
|
|
9
|
-
return /* @__PURE__ */
|
|
6
|
+
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
7
|
+
var E = (e) => e.replace(/\D/g, ""), U = ({ dataTest: e, label: l, countries: h, country: n, onCountryChange: x, value: s, onChange: f, onBlur: v, error: y, helperText: N, reserveHelperText: b = !0, disabled: i, readOnly: g, readOnlyText: m, readOnlyHref: c, required: p, placeholder: $, formatNationalNumber: I, renderFlag: C, selectCountryLabel: S, searchPlaceholder: F, id: j, name: P, size: k = "medium", fieldClassName: u, helperTextClassName: w, className: A }) => {
|
|
8
|
+
const B = z(), a = j ?? `${B}-phone`, o = `${a}-label`, r = I?.(s, n) ?? s;
|
|
9
|
+
return /* @__PURE__ */ d("div", {
|
|
10
10
|
className: L("flex flex-col", A),
|
|
11
11
|
"data-testid": `${e}-root`,
|
|
12
|
-
children: [l != null && /* @__PURE__ */
|
|
13
|
-
id:
|
|
12
|
+
children: [l != null && /* @__PURE__ */ d("label", {
|
|
13
|
+
id: o,
|
|
14
14
|
htmlFor: a,
|
|
15
15
|
className: "pb-1 text-base font-semibold text-delta-800",
|
|
16
|
-
children: [l,
|
|
16
|
+
children: [l, p === !0 && /* @__PURE__ */ t("span", {
|
|
17
17
|
"aria-hidden": "true",
|
|
18
18
|
children: " *"
|
|
19
19
|
})]
|
|
20
|
-
}),
|
|
20
|
+
}), g === !0 ? /* @__PURE__ */ t("span", {
|
|
21
21
|
className: "py-2 text-base text-delta-800",
|
|
22
|
-
children:
|
|
22
|
+
children: c === void 0 ? /* @__PURE__ */ t("span", {
|
|
23
23
|
"data-testid": `${e}-readonly`,
|
|
24
|
-
children:
|
|
24
|
+
children: m ?? r
|
|
25
25
|
}) : /* @__PURE__ */ t(V, {
|
|
26
26
|
dataTest: `${e}-readonly`,
|
|
27
|
-
href:
|
|
27
|
+
href: c,
|
|
28
28
|
className: "-ml-1",
|
|
29
|
-
contentNode:
|
|
29
|
+
contentNode: m ?? r
|
|
30
30
|
})
|
|
31
|
-
}) : /* @__PURE__ */
|
|
31
|
+
}) : /* @__PURE__ */ d("div", {
|
|
32
32
|
className: "flex items-start gap-2.5",
|
|
33
33
|
children: [/* @__PURE__ */ t(W, {
|
|
34
34
|
dataTest: `${e}-country`,
|
|
35
35
|
countries: h,
|
|
36
36
|
value: n,
|
|
37
37
|
onChange: x,
|
|
38
|
-
disabled:
|
|
38
|
+
disabled: i,
|
|
39
39
|
selectCountryLabel: S,
|
|
40
40
|
searchPlaceholder: F,
|
|
41
41
|
renderFlag: C,
|
|
42
|
-
labelledBy: l == null ? void 0 :
|
|
43
|
-
className:
|
|
42
|
+
labelledBy: l == null ? void 0 : o,
|
|
43
|
+
className: u
|
|
44
44
|
}), /* @__PURE__ */ t(M, {
|
|
45
45
|
dataTest: `${e}-number`,
|
|
46
46
|
className: "max-w-[200px]",
|
|
47
47
|
id: a,
|
|
48
48
|
name: P,
|
|
49
|
-
value:
|
|
49
|
+
value: r,
|
|
50
50
|
onChange: (D) => f(E(D.target.value)),
|
|
51
|
-
onBlur:
|
|
52
|
-
placeholder:
|
|
53
|
-
error:
|
|
54
|
-
disabled:
|
|
55
|
-
required:
|
|
51
|
+
onBlur: v,
|
|
52
|
+
placeholder: $,
|
|
53
|
+
error: y,
|
|
54
|
+
disabled: i,
|
|
55
|
+
required: p,
|
|
56
56
|
fullWidth: !0,
|
|
57
|
-
helperText:
|
|
58
|
-
reserveHelperText:
|
|
57
|
+
helperText: N,
|
|
58
|
+
reserveHelperText: b,
|
|
59
59
|
size: k,
|
|
60
60
|
slotProps: {
|
|
61
61
|
htmlInput: {
|
|
62
62
|
inputMode: "tel",
|
|
63
|
-
autoComplete: "tel"
|
|
63
|
+
autoComplete: "tel",
|
|
64
|
+
"aria-labelledby": l == null ? void 0 : o
|
|
64
65
|
},
|
|
65
|
-
input: { className:
|
|
66
|
+
input: { className: u },
|
|
66
67
|
formHelperText: { className: w }
|
|
67
68
|
}
|
|
68
69
|
})]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn as re } from "../../../helpers/cn.js";
|
|
2
2
|
import { firstTabbable as ne } from "../../../helpers/focusable.js";
|
|
3
|
-
import { TOP_LAYER_PROPS as ie, TOP_LAYER_RESET_STYLE as se, getOpenModalDialogAncestor as ae, shouldUsePopoverTopLayer as
|
|
3
|
+
import { TOP_LAYER_PROPS as ie, TOP_LAYER_RESET_STYLE as se, getOpenModalDialogAncestor as ae, shouldUsePopoverTopLayer as le, useTopLayerRef as ce } from "../../../hooks/useTopLayer.hook.js";
|
|
4
4
|
import { StyledButton as ue } from "../../inputs/button/StyledButton.js";
|
|
5
5
|
import { useMobileMediaQuery as de } from "../../../hooks/useMediaQuery.hook.js";
|
|
6
6
|
import { useDebouncedValue as fe } from "../../../hooks/useDebouncedValue.hook.js";
|
|
@@ -8,47 +8,47 @@ import { useFocusTrap as pe } from "../../../hooks/useFocusTrap.hook.js";
|
|
|
8
8
|
import { formatResultsLabel as me } from "../bottom-sheet/formatResultsLabel.js";
|
|
9
9
|
import { StyledBottomSheet as ge } from "../bottom-sheet/StyledBottomSheet.js";
|
|
10
10
|
import { PopoverAnatomy as ve } from "./PopoverAnatomy.js";
|
|
11
|
-
import { useCallback as
|
|
12
|
-
import { Fragment as N, jsx as
|
|
13
|
-
import { FloatingPortal as xe, autoUpdate as _e, flip as Pe, offset as be, shift as
|
|
14
|
-
var
|
|
11
|
+
import { useCallback as v, useEffect as y, useId as he, useRef as T, useState as h } from "react";
|
|
12
|
+
import { Fragment as N, jsx as l, jsxs as W } from "react/jsx-runtime";
|
|
13
|
+
import { FloatingPortal as xe, autoUpdate as _e, flip as Pe, offset as be, shift as Re, size as ye, useDismiss as Te, useFloating as Ee, useInteractions as Me, useMergeRefs as Se } from "@floating-ui/react";
|
|
14
|
+
var we = 240, Ae = {
|
|
15
15
|
info: 472,
|
|
16
16
|
action: 472
|
|
17
|
-
}, Fe = 0.6, B = "calc(100vw - 32px)", qe = ({ dataTest:
|
|
18
|
-
const a = he(), L = `${a}-title`, [o, X] =
|
|
17
|
+
}, Fe = 0.6, B = "calc(100vw - 32px)", Ie = (n, c, u) => _e(n, c, u, { elementResize: !1 }), qe = ({ dataTest: n, renderTrigger: c, variant: u = "info", title: d, children: E, viewResultsAction: M, resetAction: S, footerActions: w, resultCount: x, closeLabel: A = "Lukk", ariaLabel: F, onOpenChange: I, className: O }) => {
|
|
18
|
+
const a = he(), L = `${a}-title`, [o, X] = h(!1), [H, z] = h(), [U, Y] = h(), f = de(), t = u === "action", $ = f && !t, k = f && t, p = v((e) => {
|
|
19
19
|
X(e), I?.(e);
|
|
20
|
-
}, [I]), { refs:
|
|
20
|
+
}, [I]), { refs: _, floatingStyles: j, context: q } = Ee({
|
|
21
21
|
open: o,
|
|
22
|
-
onOpenChange:
|
|
22
|
+
onOpenChange: p,
|
|
23
23
|
placement: "bottom-start",
|
|
24
24
|
strategy: "fixed",
|
|
25
|
-
whileElementsMounted:
|
|
25
|
+
whileElementsMounted: Ie,
|
|
26
26
|
middleware: [
|
|
27
27
|
be(8),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
...$ ? [] : [Pe({ padding: 8 })],
|
|
29
|
+
Re({ padding: 8 }),
|
|
30
|
+
ye({
|
|
31
31
|
padding: 8,
|
|
32
32
|
apply({ availableHeight: e }) {
|
|
33
|
-
|
|
33
|
+
Y(Math.min(e, Math.round(window.innerHeight * Fe)));
|
|
34
34
|
}
|
|
35
35
|
})
|
|
36
36
|
]
|
|
37
|
-
}), { getFloatingProps: V } =
|
|
37
|
+
}), { getFloatingProps: V } = Me([Te(q, {
|
|
38
38
|
enabled: !k,
|
|
39
39
|
escapeKey: !0,
|
|
40
40
|
outsidePress: (e) => {
|
|
41
|
-
const
|
|
42
|
-
return !(
|
|
41
|
+
const s = m.current;
|
|
42
|
+
return !(s && e.target instanceof Node && s.contains(e.target));
|
|
43
43
|
}
|
|
44
|
-
})]),
|
|
44
|
+
})]), P = le(H), C = T(null), [r, G] = h(null), K = v((e) => {
|
|
45
45
|
C.current = e, G(e);
|
|
46
|
-
}, []), Q =
|
|
47
|
-
|
|
48
|
-
}, [
|
|
49
|
-
|
|
50
|
-
}, [
|
|
51
|
-
pe(o && t && r !== null, C),
|
|
46
|
+
}, []), Q = Se([ce(_.setFloating, P), K]), m = T(null), J = v((e) => {
|
|
47
|
+
m.current = e, _.setReference(e);
|
|
48
|
+
}, [_]), i = v(() => {
|
|
49
|
+
p(!1);
|
|
50
|
+
}, [p]);
|
|
51
|
+
pe(o && t && r !== null, C), y(() => {
|
|
52
52
|
if (!r) return;
|
|
53
53
|
const e = requestAnimationFrame(() => {
|
|
54
54
|
(t ? ne(r) : r)?.focus({ preventScroll: !0 });
|
|
@@ -56,11 +56,11 @@ var Me = 240, we = {
|
|
|
56
56
|
return () => {
|
|
57
57
|
cancelAnimationFrame(e);
|
|
58
58
|
};
|
|
59
|
-
}, [r, t]),
|
|
59
|
+
}, [r, t]), y(() => {
|
|
60
60
|
if (!r || t) return;
|
|
61
|
-
const e = (
|
|
62
|
-
const
|
|
63
|
-
|
|
61
|
+
const e = (s) => {
|
|
62
|
+
const R = s.relatedTarget;
|
|
63
|
+
R instanceof Node && (r.contains(R) || m.current?.contains(R)) || i();
|
|
64
64
|
};
|
|
65
65
|
return r.addEventListener("focusout", e), () => {
|
|
66
66
|
r.removeEventListener("focusout", e);
|
|
@@ -68,23 +68,23 @@ var Me = 240, we = {
|
|
|
68
68
|
}, [
|
|
69
69
|
r,
|
|
70
70
|
t,
|
|
71
|
-
|
|
71
|
+
i
|
|
72
72
|
]);
|
|
73
|
-
const
|
|
74
|
-
|
|
73
|
+
const b = T(!1);
|
|
74
|
+
y(() => {
|
|
75
75
|
if (o) {
|
|
76
|
-
|
|
76
|
+
b.current = !0;
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
if (!
|
|
80
|
-
|
|
81
|
-
const e =
|
|
79
|
+
if (!b.current) return;
|
|
80
|
+
b.current = !1;
|
|
81
|
+
const e = m.current;
|
|
82
82
|
if (!e) return;
|
|
83
|
-
const
|
|
83
|
+
const s = requestAnimationFrame(() => {
|
|
84
84
|
document.activeElement === document.body && e.focus();
|
|
85
85
|
});
|
|
86
86
|
return () => {
|
|
87
|
-
cancelAnimationFrame(
|
|
87
|
+
cancelAnimationFrame(s);
|
|
88
88
|
};
|
|
89
89
|
}, [o]);
|
|
90
90
|
const D = {
|
|
@@ -93,69 +93,69 @@ var Me = 240, we = {
|
|
|
93
93
|
triggerProps: {
|
|
94
94
|
onClick: (e) => {
|
|
95
95
|
if (o) {
|
|
96
|
-
|
|
96
|
+
i();
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
z(ae(e.currentTarget)), p(!0);
|
|
100
100
|
},
|
|
101
101
|
"aria-expanded": o,
|
|
102
102
|
"aria-controls": o ? a : void 0,
|
|
103
103
|
"aria-haspopup": t ? "dialog" : void 0,
|
|
104
104
|
"aria-describedby": !t && o ? a : void 0
|
|
105
105
|
}
|
|
106
|
-
},
|
|
107
|
-
dataTest: `${
|
|
106
|
+
}, g = (e) => typeof e == "function" ? e({ close: i }) : e, Z = fe(x, 500), ee = M ?? (x === void 0 ? void 0 : /* @__PURE__ */ l(ue, {
|
|
107
|
+
dataTest: `${n}-view-results`,
|
|
108
108
|
type: "button",
|
|
109
109
|
variant: "text",
|
|
110
|
-
onClick:
|
|
110
|
+
onClick: i,
|
|
111
111
|
children: me(Z)
|
|
112
|
-
})), te =
|
|
113
|
-
return k ? /* @__PURE__ */ W(N, { children: [
|
|
112
|
+
})), te = f ? B : Ae[u], oe = f ? B : void 0;
|
|
113
|
+
return k ? /* @__PURE__ */ W(N, { children: [c(D), /* @__PURE__ */ l(ge, {
|
|
114
114
|
id: a,
|
|
115
|
-
dataTest:
|
|
115
|
+
dataTest: n,
|
|
116
116
|
open: o,
|
|
117
|
-
onClose:
|
|
118
|
-
title:
|
|
117
|
+
onClose: i,
|
|
118
|
+
title: d,
|
|
119
119
|
ariaLabel: F,
|
|
120
|
-
viewResultsAction:
|
|
121
|
-
resetAction:
|
|
122
|
-
footerActions:
|
|
123
|
-
resultCount:
|
|
124
|
-
closeLabel:
|
|
120
|
+
viewResultsAction: M,
|
|
121
|
+
resetAction: S,
|
|
122
|
+
footerActions: w,
|
|
123
|
+
resultCount: x,
|
|
124
|
+
closeLabel: A,
|
|
125
125
|
className: O,
|
|
126
|
-
children:
|
|
127
|
-
})] }) : /* @__PURE__ */ W(N, { children: [
|
|
126
|
+
children: E
|
|
127
|
+
})] }) : /* @__PURE__ */ W(N, { children: [c(D), o && /* @__PURE__ */ l(xe, {
|
|
128
128
|
root: H,
|
|
129
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ l("div", {
|
|
130
130
|
...V(),
|
|
131
131
|
ref: Q,
|
|
132
132
|
id: a,
|
|
133
|
-
"data-test":
|
|
134
|
-
"data-testid":
|
|
133
|
+
"data-test": n,
|
|
134
|
+
"data-testid": n,
|
|
135
135
|
role: t ? "dialog" : void 0,
|
|
136
|
-
"aria-labelledby": t &&
|
|
137
|
-
"aria-label": t && !
|
|
136
|
+
"aria-labelledby": t && d ? L : void 0,
|
|
137
|
+
"aria-label": t && !d ? F : void 0,
|
|
138
138
|
tabIndex: t ? void 0 : -1,
|
|
139
|
-
...
|
|
139
|
+
...P ? ie : {},
|
|
140
140
|
style: {
|
|
141
|
-
...
|
|
142
|
-
...
|
|
143
|
-
minWidth:
|
|
141
|
+
...P ? se : {},
|
|
142
|
+
...j,
|
|
143
|
+
minWidth: we,
|
|
144
144
|
width: oe,
|
|
145
145
|
maxWidth: te,
|
|
146
|
-
maxHeight:
|
|
146
|
+
maxHeight: U
|
|
147
147
|
},
|
|
148
148
|
className: re("z-[1300]", "box-border flex flex-col overflow-hidden rounded-lg bg-white text-delta-700 outline-none shadow-[inset_0_0_0_1px_var(--colors-delta-300),0px_4px_40px_0px_#22213366]", O),
|
|
149
|
-
children: /* @__PURE__ */
|
|
150
|
-
dataTest:
|
|
151
|
-
title:
|
|
149
|
+
children: /* @__PURE__ */ l(ve, {
|
|
150
|
+
dataTest: n,
|
|
151
|
+
title: d,
|
|
152
152
|
titleId: L,
|
|
153
|
-
viewResultsAction:
|
|
154
|
-
resetAction:
|
|
155
|
-
footerActions:
|
|
156
|
-
closeLabel:
|
|
157
|
-
onClose:
|
|
158
|
-
children:
|
|
153
|
+
viewResultsAction: g(ee),
|
|
154
|
+
resetAction: g(S),
|
|
155
|
+
footerActions: g(w),
|
|
156
|
+
closeLabel: A,
|
|
157
|
+
onClose: i,
|
|
158
|
+
children: g(E)
|
|
159
159
|
})
|
|
160
160
|
})
|
|
161
161
|
})] });
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const StyledWidgetTitle: import('react').ForwardRefExoticComponent<{
|
|
6
6
|
className?: string;
|
|
7
|
+
component?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
7
8
|
} & {
|
|
8
9
|
children?: import('react').ReactNode | undefined;
|
|
9
|
-
} & import('react').RefAttributes<
|
|
10
|
+
} & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ChevronRightIcon as
|
|
1
|
+
import { ChevronRightIcon as $ } from "../../../components/icons/chevron-right-icon/ChevronRightIcon.js";
|
|
2
2
|
import { ChevronLeftIcon as O } from "../../../components/icons/chevron-left-icon/ChevronLeftIcon.js";
|
|
3
3
|
import { StyledPopover as k } from "../../../components/utils/popover/StyledPopover.js";
|
|
4
4
|
import { StyledMenuList as z } from "../../../components/navigation/menu/StyledMenuList.js";
|
|
5
5
|
import { StyledSelectItem as D } from "../../../components/inputs/select/StyledSelectItem.js";
|
|
6
|
-
import
|
|
7
|
-
import { StyledTooltip as
|
|
8
|
-
import { ChevronDownIcon as
|
|
9
|
-
import { useKeyboardSelectMenu as
|
|
6
|
+
import h from "../StyledTable.module.js";
|
|
7
|
+
import { StyledTooltip as m } from "../../shared-components/tooltip/index.js";
|
|
8
|
+
import { ChevronDownIcon as F } from "../../shared-components/ChevronDownIcon.js";
|
|
9
|
+
import { useKeyboardSelectMenu as L } from "../../hooks/useToggleMenuVisibility.hook.js";
|
|
10
10
|
import { StyledButton as u } from "../../shared-components/button/StyledButton.js";
|
|
11
|
-
import { useCallback as I, useId as
|
|
11
|
+
import { useCallback as I, useId as R, useMemo as S, useRef as K } from "react";
|
|
12
12
|
import { Fragment as M, jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
13
13
|
function U({ table: o, locale: y }) {
|
|
14
|
-
const v = K(null), r = y === "no", a =
|
|
14
|
+
const v = K(null), r = y === "no", a = R(), b = S(() => ({
|
|
15
15
|
anchorOrigin: {
|
|
16
16
|
vertical: -5,
|
|
17
17
|
horizontal: "center"
|
|
@@ -21,20 +21,20 @@ function U({ table: o, locale: y }) {
|
|
|
21
21
|
horizontal: "center"
|
|
22
22
|
}
|
|
23
23
|
}), []), l = I(() => {
|
|
24
|
-
const t =
|
|
24
|
+
const t = h["asma-ui-table-styled-table"], n = v.current?.closest(`.${t}`)?.querySelector(`.${h["table-scroll"]}, .${h["table-wrapper"]}`);
|
|
25
25
|
n && n.scrollTo({
|
|
26
26
|
top: 0,
|
|
27
27
|
behavior: "smooth"
|
|
28
28
|
});
|
|
29
29
|
}, []), s = o.getPageCount() || 1, i = o.getState().pagination.pageIndex + 1, c = S(() => Array.from({ length: s }, (t, n) => n + 1), [s]), P = I((t) => {
|
|
30
30
|
o.setPageIndex(t - 1), l();
|
|
31
|
-
}, [o, l]), { anchorEl: g, open: d, handleClose: x, handleOpen:
|
|
31
|
+
}, [o, l]), { anchorEl: g, open: d, handleClose: x, handleOpen: N, triggerRef: T, activeIndex: p, handleKeyDown: w } = L({
|
|
32
32
|
optionCount: c.length,
|
|
33
33
|
selectedIndex: i - 1,
|
|
34
34
|
onSelect: (t) => P(c[t])
|
|
35
35
|
});
|
|
36
36
|
return /* @__PURE__ */ f(M, { children: [
|
|
37
|
-
/* @__PURE__ */ e(
|
|
37
|
+
/* @__PURE__ */ e(m, {
|
|
38
38
|
title: r ? "Nåværende side" : "Current Page",
|
|
39
39
|
children: /* @__PURE__ */ e("div", {
|
|
40
40
|
ref: v,
|
|
@@ -42,15 +42,15 @@ function U({ table: o, locale: y }) {
|
|
|
42
42
|
dataTest: "current-page-button",
|
|
43
43
|
variant: "outlined",
|
|
44
44
|
size: "large",
|
|
45
|
-
refLink:
|
|
46
|
-
onClick:
|
|
47
|
-
onKeyDown:
|
|
45
|
+
refLink: T,
|
|
46
|
+
onClick: N,
|
|
47
|
+
onKeyDown: w,
|
|
48
48
|
role: "combobox",
|
|
49
49
|
"aria-haspopup": "listbox",
|
|
50
50
|
"aria-controls": d ? a : void 0,
|
|
51
51
|
"aria-expanded": d,
|
|
52
|
-
"aria-activedescendant":
|
|
53
|
-
endIcon: /* @__PURE__ */ e(
|
|
52
|
+
"aria-activedescendant": p === null ? void 0 : `${a}-option-${p}`,
|
|
53
|
+
endIcon: /* @__PURE__ */ e(F, {
|
|
54
54
|
className: `${d ? "flip-180" : "rotate-0"} transition-transform duration-300`,
|
|
55
55
|
height: 24,
|
|
56
56
|
width: 24
|
|
@@ -87,7 +87,7 @@ function U({ table: o, locale: y }) {
|
|
|
87
87
|
role: "listbox",
|
|
88
88
|
children: c.map((t, n) => /* @__PURE__ */ e(D, {
|
|
89
89
|
id: `${a}-option-${n}`,
|
|
90
|
-
active: n ===
|
|
90
|
+
active: n === p,
|
|
91
91
|
onClick: (C) => {
|
|
92
92
|
C.stopPropagation(), C.preventDefault(), P(t), x();
|
|
93
93
|
},
|
|
@@ -103,7 +103,7 @@ function U({ table: o, locale: y }) {
|
|
|
103
103
|
}, t))
|
|
104
104
|
})
|
|
105
105
|
}),
|
|
106
|
-
/* @__PURE__ */ e(
|
|
106
|
+
/* @__PURE__ */ e(m, {
|
|
107
107
|
title: i === 1 ? "" : r ? "Forrige side" : "Previous Page",
|
|
108
108
|
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(u, {
|
|
109
109
|
dataTest: "prev-page-button",
|
|
@@ -113,13 +113,14 @@ function U({ table: o, locale: y }) {
|
|
|
113
113
|
},
|
|
114
114
|
size: "large",
|
|
115
115
|
disabled: !o.getCanPreviousPage(),
|
|
116
|
+
"aria-label": r ? "Forrige side" : "Previous page",
|
|
116
117
|
startIcon: /* @__PURE__ */ e(O, {
|
|
117
118
|
height: 24,
|
|
118
119
|
width: 24
|
|
119
120
|
})
|
|
120
121
|
}) })
|
|
121
122
|
}),
|
|
122
|
-
/* @__PURE__ */ e(
|
|
123
|
+
/* @__PURE__ */ e(m, {
|
|
123
124
|
title: i === s ? "" : r ? "Neste side" : "Next Page",
|
|
124
125
|
children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(u, {
|
|
125
126
|
dataTest: "next-page-button",
|
|
@@ -129,7 +130,8 @@ function U({ table: o, locale: y }) {
|
|
|
129
130
|
},
|
|
130
131
|
size: "large",
|
|
131
132
|
disabled: !o.getCanNextPage(),
|
|
132
|
-
|
|
133
|
+
"aria-label": r ? "Neste side" : "Next page",
|
|
134
|
+
startIcon: /* @__PURE__ */ e($, {
|
|
133
135
|
height: 24,
|
|
134
136
|
width: 24
|
|
135
137
|
})
|