@rankingcoach/vanguard 1.12.0 → 1.12.2-testare.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/dist/index-BenchmarkGauge.js +1 -1
- package/dist/index-BenchmarkGaugeMarker.js +1 -1
- package/dist/index-CreditCard.js +1 -1
- package/dist/index-DateInput.js +4 -4
- package/dist/index-DateRange.js +1 -1
- package/dist/index-DropdownMenu.js +65 -55
- package/dist/index-InputRangeField.js +1 -1
- package/dist/index-ModalContext.js +28 -27
- package/dist/index-ModalService.js +178 -125
- package/dist/index-Month.js +2 -2
- package/dist/index-StyledSVG2.js +2 -2
- package/dist/index-_virtual10.js +2 -3
- package/dist/index-_virtual69.js +2 -2
- package/dist/index-_virtual70.js +4 -2
- package/dist/index-_virtual71.js +2 -4
- package/dist/index-_virtual72.js +4 -2
- package/dist/index-_virtual73.js +1 -1
- package/dist/index-_virtual74.js +1 -1
- package/dist/index-_virtual75.js +2 -4
- package/dist/index-_virtual76.js +2 -2
- package/dist/index-_virtual9.js +3 -2
- package/dist/index-accessibility.js +1 -1
- package/dist/index-dist3.js +1 -1
- package/dist/index-esm4.js +128 -293
- package/dist/index-esm5.js +293 -128
- package/dist/index-helpers2.js +393 -43
- package/dist/index-helpers3.js +43 -393
- 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/Modal/ModalService.d.ts +30 -0
- package/dist/types/core/Modal/stories/ModalStackingPopover.story.d.ts +6 -0
- package/dist/types/core/Modal/stories/TopmostModalZIndex.story.d.ts +5 -0
- package/dist/vanguard-asset-analysis.json +1 -1
- package/dist-wordpress/index.js +8498 -8446
- package/dist-wordpress/vanguard.css +1 -1
- package/package.json +4 -4
package/dist/index-utils3.js
CHANGED
|
@@ -1,70 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const r = p(l, {
|
|
20
|
-
baseURL: c,
|
|
21
|
-
hash: d,
|
|
22
|
-
uniquifyIDs: n
|
|
23
|
-
});
|
|
24
|
-
if (s) {
|
|
25
|
-
const e = r.querySelector("desc");
|
|
26
|
-
e != null && e.parentNode && e.parentNode.removeChild(e);
|
|
27
|
-
const t = document.createElementNS("http://www.w3.org/2000/svg", "desc");
|
|
28
|
-
t.innerHTML = s, r.prepend(t);
|
|
29
|
-
}
|
|
30
|
-
if (typeof u < "u") {
|
|
31
|
-
const e = r.querySelector("title");
|
|
32
|
-
if (e != null && e.parentNode && e.parentNode.removeChild(e), u) {
|
|
33
|
-
const t = document.createElementNS("http://www.w3.org/2000/svg", "title");
|
|
34
|
-
t.innerHTML = u, r.prepend(t);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return r;
|
|
38
|
-
} catch (o) {
|
|
39
|
-
return f(o);
|
|
1
|
+
const d = (e, t, n) => n <= t ? 0 : Math.max(0, Math.min(100, (e - t) / (n - t) * 100)), l = (e) => `calc(var(--benchmark-gauge-marker-inset, 20px) + ${e / 100} * (100% - 2 * var(--benchmark-gauge-marker-inset, 20px)))`, g = (e) => e >= 100 ? "0px" : `calc(${1 - e / 100} * (100% - 2 * var(--benchmark-gauge-marker-inset, 20px)))`, m = (e) => new Intl.NumberFormat("en", {
|
|
2
|
+
notation: "compact",
|
|
3
|
+
maximumSignificantDigits: 3
|
|
4
|
+
}).format(e), o = ["var(--e500)", "var(--a2900)", "var(--s400)"], h = ({
|
|
5
|
+
markerColor: e,
|
|
6
|
+
rankIndex: t,
|
|
7
|
+
rankCount: n,
|
|
8
|
+
colorByRank: c,
|
|
9
|
+
rankColors: r
|
|
10
|
+
}) => {
|
|
11
|
+
const u = "var(--n400)";
|
|
12
|
+
if (e) return e;
|
|
13
|
+
if (c) {
|
|
14
|
+
const a = r != null && r.length ? r : o;
|
|
15
|
+
if (!a.length)
|
|
16
|
+
return u;
|
|
17
|
+
const i = Math.round(t / Math.max(n - 1, 1) * (a.length - 1));
|
|
18
|
+
return a[Math.max(0, Math.min(i, a.length - 1))] ?? u;
|
|
40
19
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}), i;
|
|
65
|
-
}
|
|
20
|
+
return u;
|
|
21
|
+
}, v = ({
|
|
22
|
+
showLabels: e,
|
|
23
|
+
startLabel: t,
|
|
24
|
+
endLabel: n,
|
|
25
|
+
min: c,
|
|
26
|
+
max: r,
|
|
27
|
+
compactLabels: u = !1
|
|
28
|
+
}) => {
|
|
29
|
+
if (e === !1)
|
|
30
|
+
return {
|
|
31
|
+
startLabel: void 0,
|
|
32
|
+
endLabel: void 0
|
|
33
|
+
};
|
|
34
|
+
const a = u ? m : String, i = (s, f) => {
|
|
35
|
+
if (s !== null)
|
|
36
|
+
return s !== void 0 ? s : e ? a(f) : void 0;
|
|
37
|
+
};
|
|
38
|
+
return {
|
|
39
|
+
startLabel: i(t, c),
|
|
40
|
+
endLabel: i(n, r)
|
|
41
|
+
};
|
|
42
|
+
};
|
|
66
43
|
export {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
44
|
+
o as DEFAULT_RANK_COLORS,
|
|
45
|
+
g as fillClipInset,
|
|
46
|
+
l as markerPosition,
|
|
47
|
+
v as resolveLabels,
|
|
48
|
+
h as resolveMarkerColor,
|
|
49
|
+
d as valueToPercent
|
|
70
50
|
};
|
|
@@ -58,12 +58,15 @@ export interface OpenLoadingModalOptions {
|
|
|
58
58
|
* Modal Service Class
|
|
59
59
|
* ---------------------------------------------------------------------------------------------------------------------
|
|
60
60
|
*/
|
|
61
|
+
export declare const MODAL_BASE_Z_INDEX = 1100;
|
|
61
62
|
declare class ModalServiceClass {
|
|
62
63
|
private loadingModalId;
|
|
63
64
|
private confirmModalId;
|
|
64
65
|
private errorModalId;
|
|
65
66
|
private modalCloseListeners;
|
|
66
67
|
private modalComponents;
|
|
68
|
+
private modalOrder;
|
|
69
|
+
private popoverOrder;
|
|
67
70
|
constructor();
|
|
68
71
|
on(event: any, callback: (details: any) => any): void;
|
|
69
72
|
onModalClose<T = any, U = any>(id: string, cb?: (resp: ModalResponse<T>) => void, data?: U): void;
|
|
@@ -93,6 +96,33 @@ declare class ModalServiceClass {
|
|
|
93
96
|
}) => void;
|
|
94
97
|
closeErrorModal(): void;
|
|
95
98
|
closeAllModals(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Highest order across modals AND popovers — used internally when assigning
|
|
101
|
+
* the next slot so modals/popovers never tie or interleave wrongly.
|
|
102
|
+
*/
|
|
103
|
+
private getCurrentMaxOrder;
|
|
104
|
+
private getMaxModalOrder;
|
|
105
|
+
/**
|
|
106
|
+
* Z-index of the topmost mounted modal, or MODAL_BASE_Z_INDEX (the stacking
|
|
107
|
+
* floor) when no modal is open. Popovers are excluded — this reports modal
|
|
108
|
+
* stacking only. Mirrors ModalTransition's formula: BASE + order.
|
|
109
|
+
*/
|
|
110
|
+
getTopmostModalZIndex(): number;
|
|
111
|
+
/**
|
|
112
|
+
* Single source of truth for a modal's stack order. ModalContext delegates
|
|
113
|
+
* to this so the dropdown and ModalTransition cannot drift apart.
|
|
114
|
+
*/
|
|
115
|
+
getModalOrder(id: string): number;
|
|
116
|
+
/**
|
|
117
|
+
* Register a popover (e.g. DropdownMenu) into the shared stacking ledger.
|
|
118
|
+
* Returns its z-index so the caller can position itself. Modals opened
|
|
119
|
+
* after this call will land above the popover; closing the popover with
|
|
120
|
+
* `unregisterPopover` frees the slot.
|
|
121
|
+
*/
|
|
122
|
+
registerPopover(id: string): number;
|
|
123
|
+
unregisterPopover(id: string): void;
|
|
124
|
+
/** Test-only: wipe internal state. Not for production code paths. */
|
|
125
|
+
__resetForTests(): void;
|
|
96
126
|
open<ResponseModel>(component: ComponentWithId, opts?: ModalOpts): string;
|
|
97
127
|
closeEv<T = any>(modalId?: string | null, resp?: ModalResponse<T>): Promise<undefined | any>;
|
|
98
128
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Story } from './_Modal.default';
|
|
2
|
+
export declare const ModalStackingPopover: Story;
|
|
3
|
+
export declare const PopoverNoModalBaseline: Story;
|
|
4
|
+
export declare const MultiplePopoversInSameModal: Story;
|
|
5
|
+
export declare const PopoverAboveThreeDeepStack: Story;
|
|
6
|
+
export declare const NewModalCoversStalePopover: Story;
|