@viasat/beam-react 2.41.0 → 2.43.0
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/assets/FloatingUI.css +1 -1
- package/assets/panel.css +1 -1
- package/chunks/FloatingUI.arrow.DDrTOpE-.js +1 -0
- package/chunks/{FloatingUI.arrow.90ecVA1X.js → FloatingUI.arrow.DGlk005P.js} +8 -7
- package/chunks/panel.module.BzLGa7GY.js +1 -0
- package/chunks/{panel.module.CnHWv4EZ.js → panel.module.CgFBtvbR.js} +6 -6
- package/lib/Autocomplete/AutocompleteDropdown.cjs.js +1 -1
- package/lib/Autocomplete/AutocompleteDropdown.es.js +1 -1
- package/lib/FloatingUI/FloatingUI.arrow.cjs.js +1 -1
- package/lib/FloatingUI/FloatingUI.arrow.es.js +1 -1
- package/lib/FloatingUI/FloatingUI.content.cjs.js +1 -1
- package/lib/FloatingUI/FloatingUI.content.es.js +1 -1
- package/lib/Search/SearchDropdown.cjs.js +1 -1
- package/lib/Search/SearchDropdown.es.js +1 -1
- package/lib/Select/SelectDropdown.cjs.js +1 -1
- package/lib/Select/SelectDropdown.es.js +1 -1
- package/lib/wip/DateField/DateField.cjs.js +1 -1
- package/lib/wip/DateField/DateField.es.js +75 -71
- package/lib/wip/DateField/useDateFieldKeyboard.cjs.js +1 -1
- package/lib/wip/DateField/useDateFieldKeyboard.d.ts +15 -1
- package/lib/wip/DateField/useDateFieldKeyboard.es.js +33 -29
- package/lib/wip/DateField/useDateFieldValue.cjs.js +1 -1
- package/lib/wip/DateField/useDateFieldValue.d.ts +19 -0
- package/lib/wip/DateField/useDateFieldValue.es.js +84 -66
- package/lib/wip/Panel/Footer/Panel.Footer.Actions.cjs.js +1 -1
- package/lib/wip/Panel/Footer/Panel.Footer.Actions.d.ts +1 -1
- package/lib/wip/Panel/Footer/Panel.Footer.Actions.es.js +1 -1
- package/lib/wip/Panel/Footer/Panel.Footer.cjs.js +1 -1
- package/lib/wip/Panel/Footer/Panel.Footer.d.ts +1 -1
- package/lib/wip/Panel/Footer/Panel.Footer.es.js +21 -20
- package/lib/wip/Panel/Header/Panel.Header.ContentAfter.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.ContentAfter.d.ts +1 -1
- package/lib/wip/Panel/Header/Panel.Header.ContentAfter.es.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.ContentBefore.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.ContentBefore.d.ts +1 -1
- package/lib/wip/Panel/Header/Panel.Header.ContentBefore.es.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Description.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Description.d.ts +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Description.es.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Heading.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Heading.d.ts +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Heading.es.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Row.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Row.es.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Subheader.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Subheader.es.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.d.ts +1 -1
- package/lib/wip/Panel/Header/Panel.Header.es.js +35 -34
- package/lib/wip/Panel/Panel.Body.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Body.d.ts +1 -1
- package/lib/wip/Panel/Panel.Body.es.js +16 -14
- package/lib/wip/Panel/Panel.Inline.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Inline.d.ts +3 -3
- package/lib/wip/Panel/Panel.Inline.es.js +4 -4
- package/lib/wip/Panel/Panel.Overlay.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Overlay.d.ts +3 -3
- package/lib/wip/Panel/Panel.Overlay.es.js +83 -80
- package/lib/wip/Panel/Panel.ResizeHandle.cjs.js +1 -1
- package/lib/wip/Panel/Panel.ResizeHandle.es.js +1 -1
- package/lib/wip/Panel/Panel.cjs.js +1 -1
- package/lib/wip/Panel/Panel.context.d.ts +12 -1
- package/lib/wip/Panel/Panel.d.ts +2 -2
- package/lib/wip/Panel/Panel.es.js +135 -120
- package/lib/wip/Panel/Panel.helpers.cjs.js +1 -1
- package/lib/wip/Panel/Panel.helpers.d.ts +3 -3
- package/lib/wip/Panel/Panel.helpers.es.js +19 -19
- package/lib/wip/Panel/Panel.types.d.ts +94 -92
- package/lib/wip/Panel/index.d.ts +1 -1
- package/package.json +6 -6
- package/chunks/FloatingUI.arrow.DR8hzVDP.js +0 -1
- package/chunks/panel.module.BVmRxZHo.js +0 -1
|
@@ -1,71 +1,81 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { g as
|
|
1
|
+
import { jsx as R } from "react/jsx-runtime";
|
|
2
|
+
import F from "clsx";
|
|
3
|
+
import { useMemo as V } from "react";
|
|
4
|
+
import { g as re } from "../../../chunks/classNames.ZWNk1hey.js";
|
|
5
5
|
import "../../../chunks/constants.Cruz2A1w.js";
|
|
6
|
-
import { usePrevious as
|
|
7
|
-
import { Header as
|
|
8
|
-
import { Body as
|
|
9
|
-
import { Footer as
|
|
10
|
-
import { resolveOffset as
|
|
11
|
-
import { InlinePanel as
|
|
12
|
-
import { OverlayPanel as
|
|
13
|
-
import { s as
|
|
14
|
-
const
|
|
6
|
+
import { usePrevious as j } from "../../../utils/hooks/usePrevious.es.js";
|
|
7
|
+
import { Header as ae } from "./Header/Panel.Header.es.js";
|
|
8
|
+
import { Body as le } from "./Panel.Body.es.js";
|
|
9
|
+
import { Footer as ce } from "./Footer/Panel.Footer.es.js";
|
|
10
|
+
import { resolveOffset as fe, usePanelClose as me, getPanelDividerState as ve, PANEL_TRANSITION_DURATION_MS as de, getResolvedPanelPosition as pe, isPresetWidth as ue } from "./Panel.helpers.es.js";
|
|
11
|
+
import { InlinePanel as ye } from "./Panel.Inline.es.js";
|
|
12
|
+
import { OverlayPanel as he } from "./Panel.Overlay.es.js";
|
|
13
|
+
import { s as t } from "../../../chunks/panel.module.CgFBtvbR.js";
|
|
14
|
+
const ge = 165, Pe = 100, we = (e, i) => {
|
|
15
15
|
if (!e) return;
|
|
16
|
-
const
|
|
17
|
-
return { minSize:
|
|
18
|
-
}, { baseClassNamePrefix:
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
const r = i === "bottom", c = typeof e == "object" ? e : {}, l = c.minSize ?? (r ? Pe : ge), p = c.maxSize ?? 1 / 0, u = c.storageKey ?? "";
|
|
17
|
+
return { minSize: l, maxSize: p, storageKey: u };
|
|
18
|
+
}, { baseClassNamePrefix: n, variable: L } = re("panel");
|
|
19
|
+
function Ce(e, i) {
|
|
20
|
+
const r = {
|
|
21
|
+
overlayWidthClass: void 0,
|
|
22
|
+
inlineWidthClass: void 0,
|
|
23
|
+
widthStyle: void 0
|
|
24
|
+
};
|
|
25
|
+
return i === "bottom" ? r : ue(e) ? {
|
|
26
|
+
overlayWidthClass: t[`${n}--width-${e}`],
|
|
27
|
+
inlineWidthClass: t[`${n}__inline-wrapper--width-${e}`],
|
|
28
|
+
widthStyle: void 0
|
|
24
29
|
} : e !== void 0 ? {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} : { overlaySizeClass: void 0, inlineSizeClass: void 0, sizeStyle: void 0 };
|
|
30
|
+
...r,
|
|
31
|
+
widthStyle: { [L("width")]: e }
|
|
32
|
+
} : r;
|
|
29
33
|
}
|
|
30
|
-
|
|
34
|
+
function Ne(e, i) {
|
|
35
|
+
if (!(i !== "bottom" || e === void 0))
|
|
36
|
+
return { [L("height")]: e };
|
|
37
|
+
}
|
|
38
|
+
const d = ({
|
|
31
39
|
children: e,
|
|
32
|
-
className:
|
|
33
|
-
padding:
|
|
34
|
-
onOpenChange:
|
|
35
|
-
open:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
className: i,
|
|
41
|
+
padding: r = "md",
|
|
42
|
+
onOpenChange: c,
|
|
43
|
+
open: l,
|
|
44
|
+
width: p,
|
|
45
|
+
height: u,
|
|
46
|
+
dismissible: P = !0,
|
|
47
|
+
closeButtonAriaLabel: w = "Close panel",
|
|
48
|
+
kind: o = "overlay",
|
|
49
|
+
position: y,
|
|
50
|
+
divider: q = !0,
|
|
51
|
+
dividerColor: v,
|
|
52
|
+
backgroundColor: C,
|
|
53
|
+
isAnimated: N = !0,
|
|
54
|
+
onBeforeClose: G,
|
|
55
|
+
modalType: f,
|
|
56
|
+
offset: O,
|
|
57
|
+
resizable: U,
|
|
58
|
+
id: S,
|
|
59
|
+
..._
|
|
50
60
|
}) => {
|
|
51
|
-
const
|
|
61
|
+
const s = pe(y), m = we(U, s), X = !!m, { container: $, triggerRef: Y, ...b } = _, a = o === "overlay" ? $ : void 0;
|
|
52
62
|
if (process.env.NODE_ENV !== "production") {
|
|
53
|
-
|
|
63
|
+
m && !m.storageKey && console.warn(
|
|
54
64
|
"Panel: provide a `storageKey` in the `resizable` config to persist panel size across sessions."
|
|
55
|
-
),
|
|
65
|
+
), f === "alert" && P && console.warn(
|
|
56
66
|
'Panel: `dismissible` is ignored when `modalType="alert"`. The close button is always hidden.'
|
|
57
67
|
);
|
|
58
|
-
const { closeOnOutsidePress:
|
|
59
|
-
if (
|
|
68
|
+
const { closeOnOutsidePress: ie } = _;
|
|
69
|
+
if (ie && f !== "nonModal" && f !== void 0 && console.warn(
|
|
60
70
|
'Panel: `closeOnOutsidePress` has no effect when `modalType` is not `"nonModal"`.'
|
|
61
|
-
),
|
|
71
|
+
), $ && o === "inline" && console.warn('Panel: `container` has no effect when `kind="inline"`.'), a)
|
|
62
72
|
try {
|
|
63
73
|
if (typeof getComputedStyle == "function") {
|
|
64
|
-
const
|
|
65
|
-
|
|
74
|
+
const h = getComputedStyle(a);
|
|
75
|
+
h.position === "static" && console.warn(
|
|
66
76
|
"Panel: container element should have `position: relative` (or another non-static value) for proper scoping."
|
|
67
77
|
);
|
|
68
|
-
const g =
|
|
78
|
+
const g = s === "bottom" ? h.overflowY : h.overflowX;
|
|
69
79
|
(g === "visible" || g === "auto" || g === "scroll") && console.warn(
|
|
70
80
|
"Panel: container element should use `overflow: hidden` (or `clip`) so the slide-in/out transform does not trigger a transient scrollbar."
|
|
71
81
|
);
|
|
@@ -73,83 +83,88 @@ const m = ({
|
|
|
73
83
|
} catch {
|
|
74
84
|
}
|
|
75
85
|
}
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
n
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
),
|
|
86
|
+
const I = f === "alert" ? !1 : P, { overlayWidthClass: J, inlineWidthClass: Q, widthStyle: W } = Ce(
|
|
87
|
+
p,
|
|
88
|
+
s
|
|
89
|
+
), E = Ne(u, s), M = W || E ? { ...W, ...E } : void 0, x = o === "overlay" && O ? fe(O) : void 0, z = !!x, D = F(
|
|
90
|
+
t[n],
|
|
91
|
+
t[`${n}--${o}`],
|
|
92
|
+
o === "overlay" && J,
|
|
93
|
+
t[`${n}--padding-${r}`],
|
|
94
|
+
t[`${n}--position-${s}`],
|
|
95
|
+
z && t[`${n}--floating`],
|
|
96
|
+
X && t[`${n}--resizable`],
|
|
97
|
+
o === "overlay" && a && t[`${n}--contained`],
|
|
98
|
+
i
|
|
99
|
+
), Z = F(
|
|
100
|
+
t[`${n}__inline-wrapper`],
|
|
101
|
+
Q
|
|
102
|
+
), { requestClose: B, handleOverlayOpenChange: k } = me(
|
|
103
|
+
G,
|
|
104
|
+
c
|
|
105
|
+
), H = V(
|
|
93
106
|
() => ({
|
|
94
107
|
kind: o,
|
|
95
|
-
dismissible:
|
|
96
|
-
closeButtonAriaLabel:
|
|
97
|
-
position:
|
|
98
|
-
requestClose:
|
|
108
|
+
dismissible: I,
|
|
109
|
+
closeButtonAriaLabel: w,
|
|
110
|
+
position: y,
|
|
111
|
+
requestClose: B,
|
|
112
|
+
backgroundColor: C,
|
|
113
|
+
dividerColor: v
|
|
99
114
|
}),
|
|
100
|
-
[o,
|
|
101
|
-
), { showDivider:
|
|
102
|
-
() => ({ duration:
|
|
103
|
-
[
|
|
104
|
-
),
|
|
105
|
-
return
|
|
106
|
-
|
|
115
|
+
[o, I, w, y, B, C, v]
|
|
116
|
+
), { showDivider: ee, dividerBefore: oe, dividerInner: te, dividerAfter: ne } = ve(q && !z, s), T = V(
|
|
117
|
+
() => ({ duration: N ? de : 0 }),
|
|
118
|
+
[N]
|
|
119
|
+
), A = j(o), se = j(a), K = A !== void 0 && A !== o && l === !0 || se === null && a != null && l === !0;
|
|
120
|
+
return a === null ? null : o === "inline" ? /* @__PURE__ */ R(
|
|
121
|
+
ye,
|
|
107
122
|
{
|
|
108
|
-
contextValue:
|
|
109
|
-
panelClassName:
|
|
110
|
-
inlineWrapperClassName:
|
|
111
|
-
resolvedPosition:
|
|
112
|
-
dividerBefore:
|
|
113
|
-
dividerInner:
|
|
114
|
-
dividerAfter:
|
|
115
|
-
dividerColor:
|
|
116
|
-
open:
|
|
117
|
-
transitionConfig:
|
|
118
|
-
resizeConfig:
|
|
119
|
-
skipMountAnimation:
|
|
120
|
-
|
|
121
|
-
id:
|
|
122
|
-
...
|
|
123
|
+
contextValue: H,
|
|
124
|
+
panelClassName: D,
|
|
125
|
+
inlineWrapperClassName: Z,
|
|
126
|
+
resolvedPosition: s,
|
|
127
|
+
dividerBefore: oe,
|
|
128
|
+
dividerInner: te,
|
|
129
|
+
dividerAfter: ne,
|
|
130
|
+
dividerColor: v,
|
|
131
|
+
open: l,
|
|
132
|
+
transitionConfig: T,
|
|
133
|
+
resizeConfig: m,
|
|
134
|
+
skipMountAnimation: K,
|
|
135
|
+
cssVarStyle: M,
|
|
136
|
+
id: S,
|
|
137
|
+
...b,
|
|
123
138
|
children: e
|
|
124
139
|
}
|
|
125
|
-
) : /* @__PURE__ */
|
|
126
|
-
|
|
140
|
+
) : /* @__PURE__ */ R(
|
|
141
|
+
he,
|
|
127
142
|
{
|
|
128
|
-
contextValue:
|
|
129
|
-
panelClassName:
|
|
130
|
-
resolvedPosition:
|
|
131
|
-
showDivider:
|
|
132
|
-
dividerColor:
|
|
133
|
-
modalType:
|
|
134
|
-
floatingOffset:
|
|
135
|
-
open:
|
|
136
|
-
onOpenChange:
|
|
137
|
-
transitionConfig:
|
|
138
|
-
resizeConfig:
|
|
139
|
-
skipMountAnimation:
|
|
140
|
-
|
|
141
|
-
id:
|
|
142
|
-
...
|
|
143
|
-
container:
|
|
144
|
-
triggerRef:
|
|
143
|
+
contextValue: H,
|
|
144
|
+
panelClassName: D,
|
|
145
|
+
resolvedPosition: s,
|
|
146
|
+
showDivider: ee,
|
|
147
|
+
dividerColor: v,
|
|
148
|
+
modalType: f,
|
|
149
|
+
floatingOffset: x,
|
|
150
|
+
open: l,
|
|
151
|
+
onOpenChange: k,
|
|
152
|
+
transitionConfig: T,
|
|
153
|
+
resizeConfig: m,
|
|
154
|
+
skipMountAnimation: K,
|
|
155
|
+
cssVarStyle: M,
|
|
156
|
+
id: S,
|
|
157
|
+
...b,
|
|
158
|
+
container: a,
|
|
159
|
+
triggerRef: Y,
|
|
145
160
|
children: e
|
|
146
161
|
}
|
|
147
162
|
);
|
|
148
163
|
};
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
164
|
+
d.displayName = "Panel";
|
|
165
|
+
d.Header = ae;
|
|
166
|
+
d.Body = le;
|
|
167
|
+
d.Footer = ce;
|
|
153
168
|
export {
|
|
154
|
-
|
|
169
|
+
d as Panel
|
|
155
170
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),o=e=>e==="sm"||e==="md"||e==="lg",a=400;function P(e){return e===!0?{x:"1rem",y:"1rem"}:typeof e=="string"?{x:e,y:e}:{x:e.x,y:e.y}}const d="01",f=e=>e||"
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),o=e=>e==="sm"||e==="md"||e==="lg",a=400;function P(e){return e===!0?{x:"1rem",y:"1rem"}:typeof e=="string"?{x:e,y:e}:{x:e.x,y:e.y}}const d="01",f=e=>e||"start",D=(e,t)=>({showDivider:e,dividerBefore:e&&t!=="start"&&t!=="bottom",dividerInner:e&&t==="bottom",dividerAfter:e&&t==="start"}),_=(e,t)=>{if(e!=="isModal")return e==="alert"?{escapeKey:!1,outsidePress:!1}:{escapeKey:!0,outsidePress:t??!0}},v=e=>e==="escape-key"?"escapeKey":e==="outside-press"?"outsidePress":"programmatic",y=(e,t)=>{const i=c.useCallback(l=>{if(!e){t==null||t(!1);return}const r=e(l);r instanceof Promise?r.then(s=>{s&&(t==null||t(!1))}).catch(s=>{process.env.NODE_ENV!=="production"&&console.warn("Panel: `onBeforeClose` rejected; close cancelled (panel stays open). If this was not intentional, handle the error inside `onBeforeClose`.",s)}):r&&(t==null||t(!1))},[e,t]),u=c.useCallback((l,r,s)=>{l?t==null||t(!0):i(v(s))},[t,i]);return{requestClose:i,handleOverlayOpenChange:u}};exports.DEFAULT_PANEL_DIVIDER_COLOR=d;exports.PANEL_TRANSITION_DURATION_MS=a;exports.getPanelDismissConfig=_;exports.getPanelDividerState=D;exports.getResolvedPanelPosition=f;exports.isPresetWidth=o;exports.resolveOffset=P;exports.usePanelClose=y;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OpenChangeReason } from '@floating-ui/react';
|
|
2
|
-
import { OverlayPanelProps, PanelCloseReason, PanelDividerColor, PanelModalType, PanelPosition, PanelProps,
|
|
3
|
-
export declare const
|
|
2
|
+
import { OverlayPanelProps, PanelCloseReason, PanelDividerColor, PanelModalType, PanelPosition, PanelProps, PanelWidth, ResolvedPanelOffset } from './Panel.types';
|
|
3
|
+
export declare const isPresetWidth: (w: PanelWidth | undefined) => w is "sm" | "md" | "lg";
|
|
4
4
|
export declare const PANEL_TRANSITION_DURATION_MS = 400;
|
|
5
5
|
export declare function resolveOffset(offset: Exclude<OverlayPanelProps['offset'], false | undefined>): ResolvedPanelOffset;
|
|
6
6
|
export declare const DEFAULT_PANEL_DIVIDER_COLOR: PanelDividerColor;
|
|
@@ -15,7 +15,7 @@ export declare const getPanelDividerState: (divider: boolean, position?: PanelPo
|
|
|
15
15
|
* Returns the floating-ui `dismiss` config for an overlay panel.
|
|
16
16
|
*
|
|
17
17
|
* - `isModal` — `undefined` (floating-ui defaults: ESC + backdrop click both close)
|
|
18
|
-
* - `nonModal` / omitted — ESC closes; outside-press
|
|
18
|
+
* - `nonModal` / omitted — ESC closes; outside-press closes unless `closeOnOutsidePress={false}`
|
|
19
19
|
* - `alert` — ESC and outside-press both suppressed
|
|
20
20
|
*/
|
|
21
21
|
export declare const getPanelDismissConfig: (modalType: PanelModalType | undefined, closeOnOutsidePress?: boolean) => {
|
|
@@ -3,39 +3,39 @@ const o = (t) => t === "sm" || t === "md" || t === "lg", a = 400;
|
|
|
3
3
|
function P(t) {
|
|
4
4
|
return t === !0 ? { x: "1rem", y: "1rem" } : typeof t == "string" ? { x: t, y: t } : { x: t.x, y: t.y };
|
|
5
5
|
}
|
|
6
|
-
const m = "01", y = (t) => t || "
|
|
6
|
+
const m = "01", y = (t) => t || "start", v = (t, r) => ({
|
|
7
7
|
showDivider: t,
|
|
8
|
-
dividerBefore: t &&
|
|
8
|
+
dividerBefore: t && r !== "start" && r !== "bottom",
|
|
9
9
|
// For 'bottom' panels the divider must sit inside the scrollable wrapper (above the content),
|
|
10
10
|
// not outside it — so it is rendered via dividerInner rather than dividerBefore.
|
|
11
|
-
dividerInner: t &&
|
|
12
|
-
dividerAfter: t &&
|
|
13
|
-
}), D = (t,
|
|
11
|
+
dividerInner: t && r === "bottom",
|
|
12
|
+
dividerAfter: t && r === "start"
|
|
13
|
+
}), D = (t, r) => {
|
|
14
14
|
if (t !== "isModal")
|
|
15
|
-
return t === "alert" ? { escapeKey: !1, outsidePress: !1 } : { escapeKey: !0, outsidePress:
|
|
16
|
-
},
|
|
15
|
+
return t === "alert" ? { escapeKey: !1, outsidePress: !1 } : { escapeKey: !0, outsidePress: r ?? !0 };
|
|
16
|
+
}, d = (t) => t === "escape-key" ? "escapeKey" : t === "outside-press" ? "outsidePress" : "programmatic", _ = (t, r) => {
|
|
17
17
|
const i = c(
|
|
18
18
|
(l) => {
|
|
19
19
|
if (!t) {
|
|
20
|
-
|
|
20
|
+
r == null || r(!1);
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}).catch((
|
|
23
|
+
const e = t(l);
|
|
24
|
+
e instanceof Promise ? e.then((s) => {
|
|
25
|
+
s && (r == null || r(!1));
|
|
26
|
+
}).catch((s) => {
|
|
27
27
|
process.env.NODE_ENV !== "production" && console.warn(
|
|
28
28
|
"Panel: `onBeforeClose` rejected; close cancelled (panel stays open). If this was not intentional, handle the error inside `onBeforeClose`.",
|
|
29
|
-
|
|
29
|
+
s
|
|
30
30
|
);
|
|
31
|
-
}) :
|
|
31
|
+
}) : e && (r == null || r(!1));
|
|
32
32
|
},
|
|
33
|
-
[t,
|
|
33
|
+
[t, r]
|
|
34
34
|
), u = c(
|
|
35
|
-
(l,
|
|
36
|
-
l ?
|
|
35
|
+
(l, e, s) => {
|
|
36
|
+
l ? r == null || r(!0) : i(d(s));
|
|
37
37
|
},
|
|
38
|
-
[
|
|
38
|
+
[r, i]
|
|
39
39
|
);
|
|
40
40
|
return { requestClose: i, handleOverlayOpenChange: u };
|
|
41
41
|
};
|
|
@@ -45,7 +45,7 @@ export {
|
|
|
45
45
|
D as getPanelDismissConfig,
|
|
46
46
|
v as getPanelDividerState,
|
|
47
47
|
y as getResolvedPanelPosition,
|
|
48
|
-
o as
|
|
48
|
+
o as isPresetWidth,
|
|
49
49
|
P as resolveOffset,
|
|
50
50
|
_ as usePanelClose
|
|
51
51
|
};
|