asma-ui-core 3.61.1 → 3.61.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.
|
@@ -1,35 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { TOP_LAYER_PROPS as _, TOP_LAYER_RESET_STYLE as v, getOpenModalDialogAncestor as x, useTopLayerRef as y } from "../../hooks/useTopLayer.hook.js";
|
|
2
|
+
import { useState as L } from "react";
|
|
3
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
4
|
+
import { FloatingPortal as S, autoUpdate as b, flip as A, shift as O, useFloating as F, useMergeRefs as Y } from "@floating-ui/react";
|
|
5
|
+
var w = {
|
|
6
|
+
...v,
|
|
7
|
+
background: "transparent",
|
|
8
|
+
border: 0,
|
|
9
|
+
overflow: "visible",
|
|
10
|
+
padding: 0
|
|
11
|
+
}, k = ({ open: t = !1, anchorEl: r, id: f, placement: d = "bottom", transition: p, disablePortal: m, className: g, style: c, children: o }) => {
|
|
12
|
+
const [n, a] = L(!0);
|
|
13
|
+
t && n && a(!1);
|
|
14
|
+
const e = x(r), { refs: i, floatingStyles: u, placement: R } = F({
|
|
15
|
+
open: t,
|
|
16
|
+
placement: d,
|
|
17
|
+
strategy: e ? "fixed" : "absolute",
|
|
18
|
+
whileElementsMounted: b,
|
|
19
|
+
elements: { reference: r ?? void 0 },
|
|
20
|
+
middleware: [A({ padding: 8 }), O({ padding: 8 })]
|
|
21
|
+
}), E = y(i.setFloating), P = Y([e ? E : i.setFloating]);
|
|
22
|
+
if (!(t || p && !n)) return null;
|
|
23
|
+
const T = typeof o == "function" ? o({
|
|
16
24
|
TransitionProps: {
|
|
17
|
-
in:
|
|
18
|
-
onExited: () =>
|
|
25
|
+
in: t,
|
|
26
|
+
onExited: () => a(!0)
|
|
19
27
|
},
|
|
20
|
-
placement:
|
|
21
|
-
}) :
|
|
22
|
-
ref:
|
|
23
|
-
id:
|
|
28
|
+
placement: R
|
|
29
|
+
}) : o, s = /* @__PURE__ */ l("div", {
|
|
30
|
+
ref: P,
|
|
31
|
+
id: f,
|
|
32
|
+
...e ? _ : {},
|
|
24
33
|
style: {
|
|
34
|
+
...e ? w : {},
|
|
25
35
|
...u,
|
|
26
36
|
...c
|
|
27
37
|
},
|
|
28
|
-
className:
|
|
29
|
-
children:
|
|
38
|
+
className: g,
|
|
39
|
+
children: T
|
|
40
|
+
});
|
|
41
|
+
return m ? s : /* @__PURE__ */ l(S, {
|
|
42
|
+
root: e,
|
|
43
|
+
children: s
|
|
30
44
|
});
|
|
31
|
-
return d ? i : /* @__PURE__ */ r(y, { children: i });
|
|
32
45
|
};
|
|
33
46
|
export {
|
|
34
|
-
|
|
47
|
+
k as Popper
|
|
35
48
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyledButton as r } from "../../shared-components/button/StyledButton.js";
|
|
2
|
-
import { bindPopper as
|
|
3
|
-
import { Paper as
|
|
2
|
+
import { bindPopper as l } from "../../../hooks/usePopupState.js";
|
|
3
|
+
import { Paper as s } from "../../../components/mui-compat/Paper.js";
|
|
4
4
|
import { Fade as c } from "../../../components/mui-compat/Fade.js";
|
|
5
5
|
import { Popper as f } from "../../../components/mui-compat/Popper.js";
|
|
6
6
|
import h from "./StyledTimePicker.module.js";
|
|
@@ -12,16 +12,13 @@ import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
|
12
12
|
var I = (m) => {
|
|
13
13
|
const { popupState: e, dataTest: a, value: i, onSelect: n, handleClear: p } = m;
|
|
14
14
|
return /* @__PURE__ */ t(f, {
|
|
15
|
-
...
|
|
15
|
+
...l(e),
|
|
16
16
|
transition: !0,
|
|
17
|
-
style: {
|
|
18
|
-
zIndex: "1300",
|
|
19
|
-
position: "absolute"
|
|
20
|
-
},
|
|
17
|
+
style: { zIndex: "1300" },
|
|
21
18
|
children: ({ TransitionProps: d }) => /* @__PURE__ */ t(c, {
|
|
22
19
|
...d,
|
|
23
20
|
timeout: 350,
|
|
24
|
-
children: /* @__PURE__ */ o(
|
|
21
|
+
children: /* @__PURE__ */ o(s, {
|
|
25
22
|
elevation: 0,
|
|
26
23
|
className: y(h["time-picker-surface"]),
|
|
27
24
|
style: { paddingBottom: "1px" },
|
|
@@ -24,6 +24,10 @@ export interface PopperProps {
|
|
|
24
24
|
* content against `anchorEl`; with `transition`, renders children as a function receiving
|
|
25
25
|
* `TransitionProps` (`in`/`onExited`) so a child `Fade` can animate and unmount. Public props
|
|
26
26
|
* preserved (DEC-003). TASK-403.
|
|
27
|
+
*
|
|
28
|
+
* When `anchorEl` sits inside an open modal `<dialog>` the popper portals into that dialog and joins
|
|
29
|
+
* the top layer instead of the default `document.body` portal — a body portal is both occluded by
|
|
30
|
+
* the dialog and `inert`, so the popper looks dead on click. See `useTopLayer.hook`.
|
|
27
31
|
*/
|
|
28
32
|
export declare const Popper: ({ open, anchorEl, id, placement, transition, disablePortal, className, style, children, }: PopperProps) => JSX.Element | null;
|
|
29
33
|
export {};
|