@rankingcoach/vanguard 1.12.1 → 1.12.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/index-BenchmarkGauge.js +1 -1
- package/dist/index-BenchmarkGaugeMarker.js +1 -1
- package/dist/index-DateInput.js +4 -4
- package/dist/index-DateRange.js +1 -1
- package/dist/index-Drawer.js +24 -18
- package/dist/index-DrawerRoot.js +33 -29
- package/dist/index-DropdownMenu.js +36 -36
- package/dist/index-InputRangeField.js +1 -1
- package/dist/index-LexicalToolkit2.js +1 -1
- package/dist/index-ModalContext.js +9 -9
- package/dist/index-ModalService.js +130 -178
- package/dist/index-Month.js +2 -2
- package/dist/index-OverlayStackingService.js +46 -0
- package/dist/index-Parser2.js +2 -3
- package/dist/index-StyledSVG2.js +1 -1
- package/dist/index-_virtual10.js +3 -2
- package/dist/index-_virtual6.js +1 -1
- package/dist/index-_virtual69.js +2 -2
- package/dist/index-_virtual70.js +2 -4
- package/dist/index-_virtual71.js +4 -2
- package/dist/index-_virtual72.js +2 -4
- package/dist/index-_virtual73.js +1 -1
- package/dist/index-_virtual74.js +1 -1
- package/dist/index-_virtual75.js +4 -2
- package/dist/index-_virtual76.js +2 -2
- package/dist/index-_virtual9.js +2 -3
- package/dist/index-accessibility.js +1 -1
- package/dist/index-dist2.js +20 -78
- package/dist/index-dist3.js +78 -20
- package/dist/index-use-benchmark-gauge-render-state.js +1 -1
- package/dist/index-utils2.js +67 -47
- package/dist/index-utils3.js +47 -67
- package/dist/types/core/Drawer/Drawer.d.ts +6 -0
- package/dist/types/core/Modal/ModalService.d.ts +0 -28
- package/dist/types/core/OverlayStacking/OverlayStackingService.d.ts +35 -0
- package/dist/types/core/OverlayStacking/stories/DrawerOverFullscreenModal.story.d.ts +2 -0
- package/dist/types/core/OverlayStacking/stories/FullscreenModalDrawerModal.story.d.ts +2 -0
- package/dist/types/core/OverlayStacking/stories/FullscreenModalDrawerModalPopover.story.d.ts +2 -0
- package/dist/types/core/OverlayStacking/stories/ModalOverDrawer.story.d.ts +2 -0
- package/dist/types/core/OverlayStacking/stories/_OverlayStacking.default.d.ts +15 -0
- package/dist/vanguard-asset-analysis.json +1 -1
- package/dist-wordpress/index.js +6355 -6365
- package/dist-wordpress/vanguard.css +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { useState as z } from "react";
|
|
|
4
4
|
import e from "./index-BenchmarkGauge.module.scss.js";
|
|
5
5
|
import { BenchmarkGaugeMarker as F } from "./index-BenchmarkGaugeMarker.js";
|
|
6
6
|
import { useBenchmarkGaugeRenderState as U } from "./index-use-benchmark-gauge-render-state.js";
|
|
7
|
-
import { resolveMarkerColor as W } from "./index-
|
|
7
|
+
import { resolveMarkerColor as W } from "./index-utils3.js";
|
|
8
8
|
import { Render as c } from "./index-Render.js";
|
|
9
9
|
import { Text as x, TextTypes as y } from "./index-Text.js";
|
|
10
10
|
const _ = (m) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as N, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { classNames as m } from "./index-classNames.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { valueToPercent as y, markerPosition as d } from "./index-
|
|
4
|
+
import { valueToPercent as y, markerPosition as d } from "./index-utils3.js";
|
|
5
5
|
import t from "./index-BenchmarkGaugeMarker.module.scss.js";
|
|
6
6
|
import { BenchmarkGaugePin as A } from "./index-BenchmarkGaugePin.js";
|
|
7
7
|
import { Render as M } from "./index-Render.js";
|
package/dist/index-DateInput.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { __exports as p } from "./index-
|
|
1
|
+
import { __exports as p } from "./index-_virtual72.js";
|
|
2
2
|
import k from "react";
|
|
3
3
|
import { __require as K } from "./index-prop-types.js";
|
|
4
4
|
import { __require as L } from "./index-classnames2.js";
|
|
5
|
-
import U from "./index-
|
|
6
|
-
import z from "./index-
|
|
7
|
-
import A from "./index-
|
|
5
|
+
import U from "./index-_virtual73.js";
|
|
6
|
+
import z from "./index-_virtual74.js";
|
|
7
|
+
import A from "./index-_virtual75.js";
|
|
8
8
|
import V from "./index-_virtual55.js";
|
|
9
9
|
var q;
|
|
10
10
|
function te() {
|
package/dist/index-DateRange.js
CHANGED
|
@@ -6,7 +6,7 @@ import { classNames as f } from "./index-classNames.js";
|
|
|
6
6
|
import { datesAreDifferent as r } from "./index-date-helpers.js";
|
|
7
7
|
import c from "./index-moment.js";
|
|
8
8
|
import { useState as g, useEffect as d } from "react";
|
|
9
|
-
import { d as p } from "./index-
|
|
9
|
+
import { d as p } from "./index-_virtual10.js";
|
|
10
10
|
import { ComponentContainer as u } from "./index-ComponentContainer.js";
|
|
11
11
|
const w = (a) => {
|
|
12
12
|
const {
|
package/dist/index-Drawer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import e from "./index-Drawer.module.scss.js";
|
|
4
4
|
import { Button as C, ButtonSizes as N, ButtonTypes as x } from "./index-Button.js";
|
|
@@ -7,25 +7,25 @@ import s from "./index-_virtual4.js";
|
|
|
7
7
|
import { Header as D, HeaderTypes as p } from "./index-Header.js";
|
|
8
8
|
import H from "./index-Drawer2.js";
|
|
9
9
|
var o;
|
|
10
|
-
(function(
|
|
11
|
-
|
|
10
|
+
(function(r) {
|
|
11
|
+
r.left = "left", r.top = "top", r.right = "right", r.bottom = "bottom";
|
|
12
12
|
})(o || (o = {}));
|
|
13
|
-
const
|
|
13
|
+
const O = (r) => {
|
|
14
14
|
const {
|
|
15
15
|
open: f = !1,
|
|
16
16
|
anchor: d = o.right,
|
|
17
17
|
title: l,
|
|
18
|
-
description:
|
|
18
|
+
description: u,
|
|
19
19
|
isHeaderCompact: c = !1,
|
|
20
|
-
isHeaderSticky:
|
|
20
|
+
isHeaderSticky: h = !1,
|
|
21
21
|
onClose: n,
|
|
22
22
|
children: v,
|
|
23
23
|
hideBackdrop: a,
|
|
24
24
|
variant: B = "persistent",
|
|
25
25
|
zIndex: i,
|
|
26
26
|
showCloseButton: k = !1
|
|
27
|
-
} =
|
|
28
|
-
return
|
|
27
|
+
} = r;
|
|
28
|
+
return t(H, {
|
|
29
29
|
anchor: d,
|
|
30
30
|
transitionDuration: 400,
|
|
31
31
|
hideBackdrop: a,
|
|
@@ -43,9 +43,15 @@ const q = (t) => {
|
|
|
43
43
|
},
|
|
44
44
|
style: i !== void 0 ? {
|
|
45
45
|
zIndex: i
|
|
46
|
-
} : void 0
|
|
46
|
+
} : void 0,
|
|
47
|
+
// The drawer is a side panel, not a blocking dialog — we layer modals
|
|
48
|
+
// and popovers on top of it. MUI's default FocusTrap yanks focus back
|
|
49
|
+
// into the drawer whenever an input on a higher overlay receives it,
|
|
50
|
+
// which makes those inputs untypable. Turn enforcement off so focus
|
|
51
|
+
// can rest where the user puts it.
|
|
52
|
+
disableEnforceFocus: !0
|
|
47
53
|
},
|
|
48
|
-
onClose: (
|
|
54
|
+
onClose: (b, w) => n && n({
|
|
49
55
|
isOk: !1,
|
|
50
56
|
data: {
|
|
51
57
|
reason: w
|
|
@@ -54,24 +60,24 @@ const q = (t) => {
|
|
|
54
60
|
children: m("div", {
|
|
55
61
|
className: s(e.drawer, d === o.right ? e.right : e.left),
|
|
56
62
|
children: [m("div", {
|
|
57
|
-
className: s(
|
|
58
|
-
children: [
|
|
63
|
+
className: s(h ? e.headerSticky : void 0, e.headerContainer),
|
|
64
|
+
children: [t("div", {
|
|
59
65
|
className: e.closeButton,
|
|
60
|
-
children: k ?
|
|
66
|
+
children: k ? t(C, {
|
|
61
67
|
type: x.muted,
|
|
62
68
|
size: N.medium,
|
|
63
69
|
icon: y.close,
|
|
64
70
|
onClick: n
|
|
65
71
|
}) : null
|
|
66
|
-
}), l ?
|
|
72
|
+
}), l ? t("div", {
|
|
67
73
|
className: s(e.header, c ? e.compact : void 0),
|
|
68
|
-
children:
|
|
74
|
+
children: t(D, {
|
|
69
75
|
title: l,
|
|
70
|
-
description:
|
|
76
|
+
description: u,
|
|
71
77
|
type: c ? p.compactDrawerHeader : p.drawerHeader
|
|
72
78
|
})
|
|
73
79
|
}) : null]
|
|
74
|
-
}),
|
|
80
|
+
}), t("div", {
|
|
75
81
|
className: e.drawerContent,
|
|
76
82
|
children: v
|
|
77
83
|
})]
|
|
@@ -80,5 +86,5 @@ const q = (t) => {
|
|
|
80
86
|
};
|
|
81
87
|
export {
|
|
82
88
|
o as AnchorTypes,
|
|
83
|
-
|
|
89
|
+
O as Drawer
|
|
84
90
|
};
|
package/dist/index-DrawerRoot.js
CHANGED
|
@@ -1,49 +1,53 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { pubSubService as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { pubSubService as d, PUB_SUB_EVENTS as u } from "./index-pub-sub.js";
|
|
3
|
+
import { OverlayStackingService as s } from "./index-OverlayStackingService.js";
|
|
4
|
+
import { useState as t, useRef as g, useEffect as C } from "react";
|
|
5
|
+
import { Drawer as b } from "./index-Drawer.js";
|
|
6
|
+
import { DrawerService as y } from "./index-DrawerService.js";
|
|
7
|
+
import O from "./index-DrawerRoot.module.scss.js";
|
|
8
|
+
const Z = (l) => {
|
|
8
9
|
const {
|
|
9
10
|
padding: p = "40px 48px"
|
|
10
|
-
} =
|
|
11
|
+
} = l, a = {
|
|
11
12
|
variant: "temporary"
|
|
12
|
-
}, [
|
|
13
|
-
r.current &&
|
|
13
|
+
}, [f, c] = t(!1), [m, w] = t(null), [i, D] = t(a), [v, x] = t(void 0), r = g(null), S = (e) => {
|
|
14
|
+
r.current && y.close(r.current);
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
C(() => {
|
|
17
|
+
d.$sub(u.reactDrawerOpen, ({
|
|
17
18
|
component: e,
|
|
18
|
-
options:
|
|
19
|
-
id:
|
|
19
|
+
options: h,
|
|
20
|
+
id: n
|
|
20
21
|
}) => {
|
|
21
|
-
|
|
22
|
-
...
|
|
23
|
-
...
|
|
24
|
-
}), r.current =
|
|
25
|
-
}),
|
|
22
|
+
r.current && r.current !== n && s.unregister(r.current), x(s.register(n, "drawer")), w(e), D({
|
|
23
|
+
...a,
|
|
24
|
+
...h
|
|
25
|
+
}), r.current = n, c(!0);
|
|
26
|
+
}), d.$sub(u.reactDrawerClose, ({
|
|
26
27
|
id: e
|
|
27
28
|
}) => {
|
|
28
|
-
e === r.current &&
|
|
29
|
+
e === r.current && (s.unregister(e), r.current = null, c(!1));
|
|
29
30
|
});
|
|
30
|
-
}, [])
|
|
31
|
+
}, []);
|
|
32
|
+
const I = i.zIndex ?? v;
|
|
33
|
+
return o("div", {
|
|
31
34
|
"data-testid": "drawer-root",
|
|
32
35
|
id: "drawer-root",
|
|
33
|
-
children:
|
|
34
|
-
open:
|
|
35
|
-
...
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
children: o(b, {
|
|
37
|
+
open: f,
|
|
38
|
+
...i,
|
|
39
|
+
zIndex: I,
|
|
40
|
+
onClose: S,
|
|
41
|
+
children: o("div", {
|
|
42
|
+
className: O.drawerRootContentWrapper,
|
|
39
43
|
style: {
|
|
40
44
|
padding: p
|
|
41
45
|
},
|
|
42
|
-
children:
|
|
46
|
+
children: m
|
|
43
47
|
})
|
|
44
48
|
})
|
|
45
49
|
});
|
|
46
50
|
};
|
|
47
51
|
export {
|
|
48
|
-
|
|
52
|
+
Z as DrawerRoot
|
|
49
53
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
-
import { classNames as
|
|
3
|
-
import { uuidv4 as
|
|
4
|
-
import { ComponentContainer as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import {
|
|
7
|
-
import { Text as
|
|
8
|
-
import { useState as p, useRef as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { ClickAwayListener as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
2
|
+
import { classNames as v } from "./index-classNames.js";
|
|
3
|
+
import { uuidv4 as x } from "./index-generate-uid.js";
|
|
4
|
+
import { ComponentContainer as A } from "./index-ComponentContainer.js";
|
|
5
|
+
import { Icon as D } from "./index-Icon.js";
|
|
6
|
+
import { OVERLAY_BASE_Z_INDEX as l, OverlayStackingService as a } from "./index-OverlayStackingService.js";
|
|
7
|
+
import { Text as O } from "./index-Text.js";
|
|
8
|
+
import { useState as p, useRef as R, useEffect as L } from "react";
|
|
9
|
+
import c from "./index-DropdownMenu.module.scss.js";
|
|
10
|
+
import S from "./index-Popper.js";
|
|
11
|
+
import b from "./index-Fade.js";
|
|
12
|
+
import { ClickAwayListener as M } from "./index-ClickAwayListener.js";
|
|
13
|
+
import _ from "./index-MenuList.js";
|
|
14
|
+
import j from "./index-MenuItem2.js";
|
|
15
|
+
const Q = (f) => {
|
|
16
16
|
const {
|
|
17
17
|
anchorEl: t,
|
|
18
18
|
isOpen: n,
|
|
@@ -20,25 +20,25 @@ const V = (f) => {
|
|
|
20
20
|
items: u,
|
|
21
21
|
hideOnItemClick: d = !0,
|
|
22
22
|
placement: h = "bottom"
|
|
23
|
-
} = f, [w,
|
|
24
|
-
|
|
23
|
+
} = f, [w, y] = p(null), I = R(`dropdown-${x()}`), [k, s] = p(l);
|
|
24
|
+
L(() => {
|
|
25
25
|
if (!n) {
|
|
26
|
-
|
|
26
|
+
s(l);
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
const e =
|
|
30
|
-
return
|
|
29
|
+
const e = I.current;
|
|
30
|
+
return s(a.register(e, "popover")), () => a.unregister(e);
|
|
31
31
|
}, [n]);
|
|
32
32
|
function C(e) {
|
|
33
33
|
e.key === "Tab" ? (e.preventDefault(), i()) : e.key === "Escape" && i();
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const E = (e) => {
|
|
36
36
|
e && e(), d && i();
|
|
37
37
|
}, N = (e) => {
|
|
38
38
|
t && t.current && t.current.contains(e.target) || (e.preventDefault(), i());
|
|
39
39
|
};
|
|
40
|
-
return r(
|
|
41
|
-
children: r(
|
|
40
|
+
return r(A, {
|
|
41
|
+
children: r(S, {
|
|
42
42
|
style: {
|
|
43
43
|
zIndex: k
|
|
44
44
|
},
|
|
@@ -61,31 +61,31 @@ const V = (f) => {
|
|
|
61
61
|
transition: !0,
|
|
62
62
|
children: ({
|
|
63
63
|
TransitionProps: e,
|
|
64
|
-
placement:
|
|
65
|
-
}) => r(
|
|
64
|
+
placement: F
|
|
65
|
+
}) => r(b, {
|
|
66
66
|
...e,
|
|
67
67
|
timeout: 250,
|
|
68
68
|
children: m("div", {
|
|
69
69
|
children: [r("div", {
|
|
70
|
-
className:
|
|
71
|
-
ref:
|
|
72
|
-
}), r(
|
|
70
|
+
className: v(c.arrow),
|
|
71
|
+
ref: y
|
|
72
|
+
}), r(M, {
|
|
73
73
|
onClickAway: N,
|
|
74
|
-
children: r(
|
|
74
|
+
children: r(_, {
|
|
75
75
|
autoFocusItem: n,
|
|
76
|
-
className:
|
|
76
|
+
className: c.menu,
|
|
77
77
|
onKeyDown: C,
|
|
78
|
-
children: u.map((o,
|
|
79
|
-
className:
|
|
80
|
-
onClick: () =>
|
|
78
|
+
children: u.map((o, g) => m(j, {
|
|
79
|
+
className: c.item,
|
|
80
|
+
onClick: () => E(o.onClick),
|
|
81
81
|
selected: o.selected,
|
|
82
|
-
children: [o.iconName && r(
|
|
82
|
+
children: [o.iconName && r(D, {
|
|
83
83
|
...o.iconProps,
|
|
84
84
|
children: o.iconName
|
|
85
|
-
}), r(
|
|
85
|
+
}), r(O, {
|
|
86
86
|
children: o.title
|
|
87
87
|
})]
|
|
88
|
-
},
|
|
88
|
+
}, g))
|
|
89
89
|
})
|
|
90
90
|
})]
|
|
91
91
|
})
|
|
@@ -94,5 +94,5 @@ const V = (f) => {
|
|
|
94
94
|
});
|
|
95
95
|
};
|
|
96
96
|
export {
|
|
97
|
-
|
|
97
|
+
Q as DropdownMenu
|
|
98
98
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsx as b } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
const s =
|
|
2
|
+
import { OverlayStackingService as k } from "./index-OverlayStackingService.js";
|
|
3
|
+
import { useRef as v, useState as C, useCallback as n, useContext as S, createContext as m } from "react";
|
|
4
|
+
const M = m(void 0), $ = () => {
|
|
5
|
+
const s = S(M);
|
|
6
6
|
if (!s)
|
|
7
7
|
throw new Error("useModalContext must be used within a ModalProvider");
|
|
8
8
|
return s;
|
|
9
9
|
}, j = ({
|
|
10
10
|
children: s
|
|
11
11
|
}) => {
|
|
12
|
-
const d =
|
|
12
|
+
const d = v(/* @__PURE__ */ new Map()), [u, l] = C({
|
|
13
13
|
growModals: [],
|
|
14
14
|
slideModals: [],
|
|
15
15
|
popModals: []
|
|
16
|
-
}), p = n((e) => d.current.get(e), []), w = n((e) =>
|
|
16
|
+
}), p = n((e) => d.current.get(e), []), w = n((e) => k.getOrder(e), []), f = n((e, t, o) => {
|
|
17
17
|
d.current.set(e, o), l((x) => {
|
|
18
18
|
const r = {
|
|
19
19
|
...x
|
|
20
|
-
}, a = (i,
|
|
21
|
-
i.indexOf(
|
|
20
|
+
}, a = (i, c) => {
|
|
21
|
+
i.indexOf(c) >= 0 || i.push(c);
|
|
22
22
|
};
|
|
23
23
|
switch (t) {
|
|
24
24
|
case "grow":
|
|
@@ -48,7 +48,7 @@ const c = v(void 0), $ = () => {
|
|
|
48
48
|
removeModal: g,
|
|
49
49
|
getModalOrder: w
|
|
50
50
|
};
|
|
51
|
-
return b(
|
|
51
|
+
return b(M.Provider, {
|
|
52
52
|
value: h,
|
|
53
53
|
children: s
|
|
54
54
|
});
|