@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.
Files changed (37) hide show
  1. package/dist/index-BenchmarkGauge.js +1 -1
  2. package/dist/index-BenchmarkGaugeMarker.js +1 -1
  3. package/dist/index-CreditCard.js +1 -1
  4. package/dist/index-DateInput.js +4 -4
  5. package/dist/index-DateRange.js +1 -1
  6. package/dist/index-DropdownMenu.js +65 -55
  7. package/dist/index-InputRangeField.js +1 -1
  8. package/dist/index-ModalContext.js +28 -27
  9. package/dist/index-ModalService.js +178 -125
  10. package/dist/index-Month.js +2 -2
  11. package/dist/index-StyledSVG2.js +2 -2
  12. package/dist/index-_virtual10.js +2 -3
  13. package/dist/index-_virtual69.js +2 -2
  14. package/dist/index-_virtual70.js +4 -2
  15. package/dist/index-_virtual71.js +2 -4
  16. package/dist/index-_virtual72.js +4 -2
  17. package/dist/index-_virtual73.js +1 -1
  18. package/dist/index-_virtual74.js +1 -1
  19. package/dist/index-_virtual75.js +2 -4
  20. package/dist/index-_virtual76.js +2 -2
  21. package/dist/index-_virtual9.js +3 -2
  22. package/dist/index-accessibility.js +1 -1
  23. package/dist/index-dist3.js +1 -1
  24. package/dist/index-esm4.js +128 -293
  25. package/dist/index-esm5.js +293 -128
  26. package/dist/index-helpers2.js +393 -43
  27. package/dist/index-helpers3.js +43 -393
  28. package/dist/index-use-benchmark-gauge-render-state.js +1 -1
  29. package/dist/index-utils2.js +67 -47
  30. package/dist/index-utils3.js +47 -67
  31. package/dist/types/core/Modal/ModalService.d.ts +30 -0
  32. package/dist/types/core/Modal/stories/ModalStackingPopover.story.d.ts +6 -0
  33. package/dist/types/core/Modal/stories/TopmostModalZIndex.story.d.ts +5 -0
  34. package/dist/vanguard-asset-analysis.json +1 -1
  35. package/dist-wordpress/index.js +8498 -8446
  36. package/dist-wordpress/vanguard.css +1 -1
  37. package/package.json +4 -4
@@ -1,70 +1,50 @@
1
- import v from "./index-esm5.js";
2
- function w(i) {
3
- const {
4
- baseURL: c,
5
- content: a,
6
- description: s,
7
- handleError: f,
8
- hash: d,
9
- preProcessor: h,
10
- title: u,
11
- uniquifyIDs: n = !1
12
- } = i;
13
- try {
14
- const o = b(a, h), l = v(o, {
15
- nodeOnly: !0
16
- });
17
- if (!l || !(l instanceof SVGSVGElement))
18
- throw new Error("Could not convert the src to a DOM Node");
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
- function b(i, c) {
43
- return c ? c(i) : i;
44
- }
45
- function p(i, c) {
46
- const {
47
- baseURL: a = "",
48
- hash: s,
49
- uniquifyIDs: f
50
- } = c, d = ["id", "href", "xlink:href", "xlink:role", "xlink:arcrole"], h = ["href", "xlink:href"], u = (n, o) => h.includes(n) && (o ? !o.includes("#") : !1);
51
- return f && [...i.children].forEach((n) => {
52
- var o;
53
- if ((o = n.attributes) != null && o.length) {
54
- const l = Object.values(n.attributes).map((r) => {
55
- const e = r, t = /url\((.*?)\)/.exec(r.value);
56
- return t != null && t[1] && (e.value = r.value.replace(t[0], `url(${a}${t[1]}__${s})`)), e;
57
- });
58
- d.forEach((r) => {
59
- const e = l.find((t) => t.name === r);
60
- e && !u(r, e.value) && (e.value = `${e.value}__${s}`);
61
- });
62
- }
63
- return n.children.length ? p(n, c) : n;
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
- w as getNode,
68
- b as processSVG,
69
- p as updateSVGAttributes
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;
@@ -0,0 +1,5 @@
1
+ import { Story } from './_Modal.default';
2
+ export declare const TopmostModalZIndex: Story;
3
+ export declare const TopmostUnaffectedByBottomClose: Story;
4
+ export declare const DeepStackTearDown: Story;
5
+ export declare const TrackedModalsCountedSame: Story;
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-06-02T14:33:47.455Z",
2
+ "timestamp": "2026-06-03T19:57:19.398Z",
3
3
  "mode": "full",
4
4
  "buildOptimization": {
5
5
  "enabled": false,