asma-ui-core 3.121.2 → 3.121.4
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/inputs/checkbox/base-ui/StyledCheckbox.module.js +15 -15
- package/dist/components/inputs/full-screen-picker/FullScreenPicker.js +36 -35
- package/dist/components/inputs/full-screen-picker/useReleaseFieldOnKeyboardDismiss.js +18 -0
- package/dist/src/components/inputs/full-screen-picker/useReleaseFieldOnKeyboardDismiss.d.ts +12 -0
- package/dist/table/shared-components/StyledCheckbox.module.js +10 -10
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
CheckboxWrapper:
|
|
3
|
-
"size-small": "_size-
|
|
4
|
-
"size-medium": "_size-
|
|
5
|
-
Checkbox:
|
|
6
|
-
Indeterminate:
|
|
7
|
-
Error: "
|
|
8
|
-
ReadOnly:
|
|
9
|
-
Indicator:
|
|
10
|
-
HideWrapper:
|
|
11
|
-
CheckboxHover:
|
|
12
|
-
CheckboxRippleContainer:
|
|
13
|
-
CheckboxRipple:
|
|
14
|
-
ripple:
|
|
1
|
+
var a = "_CheckboxWrapper_ajsar_1", r = "_Checkbox_ajsar_1", e = "_Indeterminate_ajsar_34", _ = "_ReadOnly_ajsar_110", o = "_Indicator_ajsar_119", p = "_HideWrapper_ajsar_123", i = "_CheckboxHover_ajsar_130", s = "_CheckboxRippleContainer_ajsar_130", l = "_CheckboxRipple_ajsar_130", d = "_ripple_ajsar_1", c = {
|
|
2
|
+
CheckboxWrapper: a,
|
|
3
|
+
"size-small": "_size-small_ajsar_17",
|
|
4
|
+
"size-medium": "_size-medium_ajsar_21",
|
|
5
|
+
Checkbox: r,
|
|
6
|
+
Indeterminate: e,
|
|
7
|
+
Error: "_Error_ajsar_61",
|
|
8
|
+
ReadOnly: _,
|
|
9
|
+
Indicator: o,
|
|
10
|
+
HideWrapper: p,
|
|
11
|
+
CheckboxHover: i,
|
|
12
|
+
CheckboxRippleContainer: s,
|
|
13
|
+
CheckboxRipple: l,
|
|
14
|
+
ripple: d
|
|
15
15
|
};
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
c as default
|
|
18
18
|
};
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { CloseIcon as
|
|
2
|
-
import { StyledButton as
|
|
1
|
+
import { CloseIcon as y } from "../../icons/close-icon/CloseIcon.js";
|
|
2
|
+
import { StyledButton as w } from "../button/StyledButton.js";
|
|
3
3
|
import { usePickerOneRowHeaderMediaQuery as g } from "../../../hooks/useMediaQuery.hook.js";
|
|
4
4
|
import { StyledDialog as k } from "../../feedback/dialog/StyledDialog.js";
|
|
5
5
|
import { PickerLiveRegion as N } from "./PickerLiveRegion.js";
|
|
6
|
-
import { isKeyboardModality as S, trackInputModality as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { isKeyboardModality as S, trackInputModality as R } from "./inputModality.js";
|
|
7
|
+
import { useReleaseFieldOnKeyboardDismiss as I } from "./useReleaseFieldOnKeyboardDismiss.js";
|
|
8
|
+
import { useVisualViewportHeight as F } from "./useVisualViewportHeight.js";
|
|
9
|
+
import { useEffect as x, useRef as p } from "react";
|
|
9
10
|
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
10
|
-
var
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
open:
|
|
14
|
-
onClose: (f, s) =>
|
|
15
|
-
dataTest:
|
|
11
|
+
var E = ({ open: i, onClose: o, dataTest: l, title: r, fallbackName: n, ...c }) => {
|
|
12
|
+
const t = r != null && r !== !1 && r !== "";
|
|
13
|
+
return x(R, []), /* @__PURE__ */ e(k, {
|
|
14
|
+
open: i,
|
|
15
|
+
onClose: (f, s) => o(s),
|
|
16
|
+
dataTest: l,
|
|
16
17
|
fullScreen: !0,
|
|
17
18
|
showCloseIcon: !1,
|
|
18
|
-
ariaLabel:
|
|
19
|
+
ariaLabel: t ? void 0 : n,
|
|
19
20
|
children: /* @__PURE__ */ e(P, {
|
|
20
|
-
...
|
|
21
|
-
dataTest:
|
|
22
|
-
title:
|
|
23
|
-
onClose:
|
|
21
|
+
...c,
|
|
22
|
+
dataTest: l,
|
|
23
|
+
title: t ? r : void 0,
|
|
24
|
+
onClose: o
|
|
24
25
|
})
|
|
25
26
|
});
|
|
26
|
-
}, P = ({ dataTest:
|
|
27
|
-
const s = g(), v =
|
|
28
|
-
return
|
|
27
|
+
}, P = ({ dataTest: i, title: o, closeLabel: l, search: r, headerRow: n, children: c, announcement: t, onClose: f }) => {
|
|
28
|
+
const s = g(), v = F(), a = p(null), u = p(null);
|
|
29
|
+
return I(a), x(() => {
|
|
29
30
|
const b = requestAnimationFrame(() => {
|
|
30
|
-
const h =
|
|
31
|
+
const h = a.current?.closest("dialog");
|
|
31
32
|
if (!h || document.activeElement !== h || !S()) return;
|
|
32
33
|
const d = u.current?.querySelector('[role="listbox"]');
|
|
33
|
-
(d && d.tabIndex >= 0 ? d :
|
|
34
|
+
(d && d.tabIndex >= 0 ? d : a.current)?.focus({ preventScroll: !0 });
|
|
34
35
|
});
|
|
35
36
|
return () => cancelAnimationFrame(b);
|
|
36
37
|
}, []), /* @__PURE__ */ m("div", {
|
|
@@ -38,26 +39,26 @@ var B = ({ open: o, onClose: i, dataTest: t, title: r, fallbackName: a, ...n })
|
|
|
38
39
|
style: { height: v },
|
|
39
40
|
children: [
|
|
40
41
|
/* @__PURE__ */ m("div", {
|
|
41
|
-
"data-testid": `${
|
|
42
|
+
"data-testid": `${i}-header`,
|
|
42
43
|
className: "flex shrink-0 flex-col border-0 border-b border-solid border-delta-200 bg-white",
|
|
43
44
|
children: [
|
|
44
45
|
/* @__PURE__ */ m("div", {
|
|
45
46
|
className: "flex items-start gap-2",
|
|
46
47
|
children: [
|
|
47
|
-
|
|
48
|
+
o !== void 0 && /* @__PURE__ */ e("h2", {
|
|
48
49
|
className: "m-0 min-w-0 flex-1 break-words pl-4 pt-2 text-[20px] font-semibold leading-7 text-delta-800",
|
|
49
|
-
children:
|
|
50
|
+
children: o
|
|
50
51
|
}),
|
|
51
52
|
s && /* @__PURE__ */ e("div", {
|
|
52
53
|
className: "min-w-0 max-w-[240px] flex-1 pt-2",
|
|
53
54
|
children: r
|
|
54
55
|
}),
|
|
55
|
-
/* @__PURE__ */ e(
|
|
56
|
-
dataTest: `${
|
|
57
|
-
refLink:
|
|
58
|
-
"aria-label":
|
|
56
|
+
/* @__PURE__ */ e(w, {
|
|
57
|
+
dataTest: `${i}-close`,
|
|
58
|
+
refLink: a,
|
|
59
|
+
"aria-label": l,
|
|
59
60
|
variant: "textGray",
|
|
60
|
-
startIcon: /* @__PURE__ */ e(
|
|
61
|
+
startIcon: /* @__PURE__ */ e(y, {
|
|
61
62
|
width: 24,
|
|
62
63
|
height: 24
|
|
63
64
|
}),
|
|
@@ -70,7 +71,7 @@ var B = ({ open: o, onClose: i, dataTest: t, title: r, fallbackName: a, ...n })
|
|
|
70
71
|
className: "px-4 pt-2",
|
|
71
72
|
children: r
|
|
72
73
|
}),
|
|
73
|
-
|
|
74
|
+
n ?? /* @__PURE__ */ e("div", {
|
|
74
75
|
"aria-hidden": "true",
|
|
75
76
|
className: "h-2"
|
|
76
77
|
})
|
|
@@ -78,17 +79,17 @@ var B = ({ open: o, onClose: i, dataTest: t, title: r, fallbackName: a, ...n })
|
|
|
78
79
|
}),
|
|
79
80
|
/* @__PURE__ */ e("div", {
|
|
80
81
|
ref: u,
|
|
81
|
-
"data-testid": `${
|
|
82
|
+
"data-testid": `${i}-body`,
|
|
82
83
|
className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4",
|
|
83
|
-
children:
|
|
84
|
+
children: c
|
|
84
85
|
}),
|
|
85
86
|
/* @__PURE__ */ e(N, {
|
|
86
|
-
announcement:
|
|
87
|
-
dataTest: `${
|
|
87
|
+
announcement: t,
|
|
88
|
+
dataTest: `${i}-live`
|
|
88
89
|
})
|
|
89
90
|
]
|
|
90
91
|
});
|
|
91
92
|
};
|
|
92
93
|
export {
|
|
93
|
-
|
|
94
|
+
E as FullScreenPicker
|
|
94
95
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useEffect as c } from "react";
|
|
2
|
+
var l = 150, a = (e) => window.innerHeight - e.height * e.scale >= l, u = (e) => e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable, f = (e) => {
|
|
3
|
+
c(() => {
|
|
4
|
+
const t = window.visualViewport;
|
|
5
|
+
if (!t) return;
|
|
6
|
+
let s = a(t);
|
|
7
|
+
const n = () => {
|
|
8
|
+
const r = a(t), d = s && !r;
|
|
9
|
+
if (s = r, !d) return;
|
|
10
|
+
const i = e.current?.closest("dialog"), o = document.activeElement;
|
|
11
|
+
i && u(o) && i.contains(o) && i.focus({ preventScroll: !0 });
|
|
12
|
+
};
|
|
13
|
+
return t.addEventListener("resize", n), () => t.removeEventListener("resize", n);
|
|
14
|
+
}, [e]);
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
f as useReleaseFieldOnKeyboardDismiss
|
|
18
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Moves focus off the sheet's text field once the on-screen keyboard is put away without a blur —
|
|
4
|
+
* Android Back, a swipe down, the iPad hide key. The rows keep focus where it is on a tap (so a
|
|
5
|
+
* search keeps its keyboard mid-list), so a field still focused under a hidden keyboard would call
|
|
6
|
+
* it back up on every tap on a row. Focus goes to the dialog shell, where a tap opening the picker
|
|
7
|
+
* leaves it.
|
|
8
|
+
*
|
|
9
|
+
* Only the keyboard going from up to down counts: a keyboard closing over several resize steps is
|
|
10
|
+
* still caught, while a rotation with the keyboard up and a hardware keyboard (none ever shows) are not.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useReleaseFieldOnKeyboardDismiss: (anchorRef: RefObject<HTMLElement | null>) => void;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var e = "
|
|
1
|
+
var e = "_CheckboxWrapper_b7zlc_1", _ = "_Checkbox_b7zlc_1", r = "_Indeterminate_b7zlc_30", a = "_ReadOnly_b7zlc_57", l = "_Indicator_b7zlc_66", c = "_HideWrapper_b7zlc_70", b = "_CheckboxHover_b7zlc_77", p = "_CheckboxRippleContainer_b7zlc_77", i = "_CheckboxRipple_b7zlc_77", o = "_ripple_b7zlc_1", z = {
|
|
2
2
|
CheckboxWrapper: e,
|
|
3
|
-
"size-small": "_size-
|
|
4
|
-
"size-medium": "_size-
|
|
3
|
+
"size-small": "_size-small_b7zlc_13",
|
|
4
|
+
"size-medium": "_size-medium_b7zlc_17",
|
|
5
5
|
Checkbox: _,
|
|
6
6
|
Indeterminate: r,
|
|
7
7
|
ReadOnly: a,
|
|
8
|
-
Indicator:
|
|
9
|
-
HideWrapper:
|
|
10
|
-
CheckboxHover:
|
|
11
|
-
CheckboxRippleContainer:
|
|
12
|
-
CheckboxRipple:
|
|
13
|
-
ripple:
|
|
8
|
+
Indicator: l,
|
|
9
|
+
HideWrapper: c,
|
|
10
|
+
CheckboxHover: b,
|
|
11
|
+
CheckboxRippleContainer: p,
|
|
12
|
+
CheckboxRipple: i,
|
|
13
|
+
ripple: o
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
z as default
|
|
17
17
|
};
|