@sps-woodland/modal 8.10.4 → 8.11.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/lib/index.es.js +123 -66
- package/package.json +7 -7
package/lib/index.es.js
CHANGED
|
@@ -19,7 +19,8 @@ function H(e) {
|
|
|
19
19
|
}
|
|
20
20
|
function gt(e) {
|
|
21
21
|
let [t, o] = V(e), r = y(null), n = H(() => {
|
|
22
|
-
if (!r.current)
|
|
22
|
+
if (!r.current)
|
|
23
|
+
return;
|
|
23
24
|
let a = r.current.next();
|
|
24
25
|
if (a.done) {
|
|
25
26
|
r.current = null;
|
|
@@ -101,7 +102,8 @@ function Ae(e) {
|
|
|
101
102
|
}), n;
|
|
102
103
|
}
|
|
103
104
|
function xt(e, t) {
|
|
104
|
-
if (e === t)
|
|
105
|
+
if (e === t)
|
|
106
|
+
return e;
|
|
105
107
|
let o = X.get(e);
|
|
106
108
|
if (o)
|
|
107
109
|
return o(t), t;
|
|
@@ -125,7 +127,8 @@ function Tt(e = []) {
|
|
|
125
127
|
}
|
|
126
128
|
function J(...e) {
|
|
127
129
|
return (...t) => {
|
|
128
|
-
for (let o of e)
|
|
130
|
+
for (let o of e)
|
|
131
|
+
typeof o == "function" && o(...t);
|
|
129
132
|
};
|
|
130
133
|
}
|
|
131
134
|
const E = (e) => {
|
|
@@ -134,15 +137,21 @@ const E = (e) => {
|
|
|
134
137
|
}, Y = (e) => e && "window" in e && e.window === e ? e : E(e).defaultView || window;
|
|
135
138
|
function Ie(e) {
|
|
136
139
|
var t, o, r = "";
|
|
137
|
-
if (typeof e == "string" || typeof e == "number")
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
if (typeof e == "string" || typeof e == "number")
|
|
141
|
+
r += e;
|
|
142
|
+
else if (typeof e == "object")
|
|
143
|
+
if (Array.isArray(e)) {
|
|
144
|
+
var n = e.length;
|
|
145
|
+
for (t = 0; t < n; t++)
|
|
146
|
+
e[t] && (o = Ie(e[t])) && (r && (r += " "), r += o);
|
|
147
|
+
} else
|
|
148
|
+
for (o in e)
|
|
149
|
+
e[o] && (r && (r += " "), r += o);
|
|
142
150
|
return r;
|
|
143
151
|
}
|
|
144
152
|
function St() {
|
|
145
|
-
for (var e, t, o = 0, r = "", n = arguments.length; o < n; o++)
|
|
153
|
+
for (var e, t, o = 0, r = "", n = arguments.length; o < n; o++)
|
|
154
|
+
(e = arguments[o]) && (t = Ie(e)) && (r && (r += " "), r += t);
|
|
146
155
|
return r;
|
|
147
156
|
}
|
|
148
157
|
function Lt(...e) {
|
|
@@ -179,13 +188,15 @@ const Ft = /* @__PURE__ */ new Set([
|
|
|
179
188
|
]), Nt = /^(data-.*)$/;
|
|
180
189
|
function Ot(e, t = {}) {
|
|
181
190
|
let { labelable: o, isLink: r, propNames: n } = t, l = {};
|
|
182
|
-
for (const a in e)
|
|
191
|
+
for (const a in e)
|
|
192
|
+
Object.prototype.hasOwnProperty.call(e, a) && (Ft.has(a) || o && Ct.has(a) || r && Bt.has(a) || n != null && n.has(a) || Nt.test(a)) && (l[a] = e[a]);
|
|
183
193
|
return l;
|
|
184
194
|
}
|
|
185
195
|
function Pe(e) {
|
|
186
|
-
if (Dt())
|
|
187
|
-
|
|
188
|
-
|
|
196
|
+
if (Dt())
|
|
197
|
+
e.focus({
|
|
198
|
+
preventScroll: !0
|
|
199
|
+
});
|
|
189
200
|
else {
|
|
190
201
|
let t = Wt(e);
|
|
191
202
|
e.focus(), At(t);
|
|
@@ -250,21 +261,25 @@ function Ht() {
|
|
|
250
261
|
}
|
|
251
262
|
let O = /* @__PURE__ */ new Map(), ce = /* @__PURE__ */ new Set();
|
|
252
263
|
function ke() {
|
|
253
|
-
if (typeof window > "u")
|
|
264
|
+
if (typeof window > "u")
|
|
265
|
+
return;
|
|
254
266
|
function e(r) {
|
|
255
267
|
return "propertyName" in r;
|
|
256
268
|
}
|
|
257
269
|
let t = (r) => {
|
|
258
|
-
if (!e(r) || !r.target)
|
|
270
|
+
if (!e(r) || !r.target)
|
|
271
|
+
return;
|
|
259
272
|
let n = O.get(r.target);
|
|
260
273
|
n || (n = /* @__PURE__ */ new Set(), O.set(r.target, n), r.target.addEventListener("transitioncancel", o, {
|
|
261
274
|
once: !0
|
|
262
275
|
})), n.add(r.propertyName);
|
|
263
276
|
}, o = (r) => {
|
|
264
|
-
if (!e(r) || !r.target)
|
|
277
|
+
if (!e(r) || !r.target)
|
|
278
|
+
return;
|
|
265
279
|
let n = O.get(r.target);
|
|
266
280
|
if (n && (n.delete(r.propertyName), n.size === 0 && (r.target.removeEventListener("transitioncancel", o), O.delete(r.target)), O.size === 0)) {
|
|
267
|
-
for (let l of ce)
|
|
281
|
+
for (let l of ce)
|
|
282
|
+
l();
|
|
268
283
|
ce.clear();
|
|
269
284
|
}
|
|
270
285
|
};
|
|
@@ -282,7 +297,8 @@ function xe(e, t) {
|
|
|
282
297
|
}
|
|
283
298
|
function qe(e, t) {
|
|
284
299
|
let o = e;
|
|
285
|
-
for (xe(o, t) && (o = o.parentElement); o && !xe(o, t); )
|
|
300
|
+
for (xe(o, t) && (o = o.parentElement); o && !xe(o, t); )
|
|
301
|
+
o = o.parentElement;
|
|
286
302
|
return o || document.scrollingElement || document.documentElement;
|
|
287
303
|
}
|
|
288
304
|
function Kt(e) {
|
|
@@ -394,7 +410,8 @@ function Gt(e) {
|
|
|
394
410
|
}
|
|
395
411
|
let K = null, Xt = /* @__PURE__ */ new Set(), R = /* @__PURE__ */ new Map(), N = !1, me = !1;
|
|
396
412
|
function be(e, t) {
|
|
397
|
-
for (let o of Xt)
|
|
413
|
+
for (let o of Xt)
|
|
414
|
+
o(e, t);
|
|
398
415
|
}
|
|
399
416
|
function Jt(e) {
|
|
400
417
|
return !(e.metaKey || !ze() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
@@ -415,7 +432,8 @@ function Ke() {
|
|
|
415
432
|
N = !1, me = !0;
|
|
416
433
|
}
|
|
417
434
|
function Te(e) {
|
|
418
|
-
if (typeof window > "u" || R.get(Y(e)))
|
|
435
|
+
if (typeof window > "u" || R.get(Y(e)))
|
|
436
|
+
return;
|
|
419
437
|
const t = Y(e), o = E(e);
|
|
420
438
|
let r = t.HTMLElement.prototype.focus;
|
|
421
439
|
t.HTMLElement.prototype.focus = function() {
|
|
@@ -483,7 +501,8 @@ function eo(e) {
|
|
|
483
501
|
});
|
|
484
502
|
F(() => {
|
|
485
503
|
let c = l.current;
|
|
486
|
-
if (r)
|
|
504
|
+
if (r)
|
|
505
|
+
return;
|
|
487
506
|
const i = t.current, s = E(i);
|
|
488
507
|
if (typeof PointerEvent < "u") {
|
|
489
508
|
let f = (m) => {
|
|
@@ -510,10 +529,12 @@ function eo(e) {
|
|
|
510
529
|
]);
|
|
511
530
|
}
|
|
512
531
|
function _(e, t) {
|
|
513
|
-
if (e.button > 0)
|
|
532
|
+
if (e.button > 0)
|
|
533
|
+
return !1;
|
|
514
534
|
if (e.target) {
|
|
515
535
|
const o = e.target.ownerDocument;
|
|
516
|
-
if (!o || !o.documentElement.contains(e.target) || e.target.closest("[data-react-aria-top-layer]"))
|
|
536
|
+
if (!o || !o.documentElement.contains(e.target) || e.target.closest("[data-react-aria-top-layer]"))
|
|
537
|
+
return !1;
|
|
517
538
|
}
|
|
518
539
|
return t.current && !t.current.contains(e.target);
|
|
519
540
|
}
|
|
@@ -524,11 +545,13 @@ function fe(e) {
|
|
|
524
545
|
Vt(() => {
|
|
525
546
|
t.activeElement === o && e.isConnected && Pe(e);
|
|
526
547
|
});
|
|
527
|
-
} else
|
|
548
|
+
} else
|
|
549
|
+
Pe(e);
|
|
528
550
|
}
|
|
529
551
|
function to(e) {
|
|
530
552
|
const t = Y(e);
|
|
531
|
-
if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement))
|
|
553
|
+
if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement))
|
|
554
|
+
return !1;
|
|
532
555
|
let { display: o, visibility: r } = e.style, n = o !== "none" && r !== "hidden" && r !== "collapse";
|
|
533
556
|
if (n) {
|
|
534
557
|
const { getComputedStyle: l } = e.ownerDocument.defaultView;
|
|
@@ -579,7 +602,8 @@ function ro(e) {
|
|
|
579
602
|
const m = E(d.current ? d.current[0] : void 0).activeElement;
|
|
580
603
|
let g = null;
|
|
581
604
|
if (M(m, d.current)) {
|
|
582
|
-
for (let p of $.traverse())
|
|
605
|
+
for (let p of $.traverse())
|
|
606
|
+
p.scopeRef && M(m, p.scopeRef.current) && (g = p);
|
|
583
607
|
g === $.getTreeNode(d) && (v = g.scopeRef);
|
|
584
608
|
}
|
|
585
609
|
}, [
|
|
@@ -673,7 +697,8 @@ function B(e) {
|
|
|
673
697
|
function z(e) {
|
|
674
698
|
let t = $.getTreeNode(v);
|
|
675
699
|
for (; t && t.scopeRef !== e; ) {
|
|
676
|
-
if (t.contain)
|
|
700
|
+
if (t.contain)
|
|
701
|
+
return !1;
|
|
677
702
|
t = t.parent;
|
|
678
703
|
}
|
|
679
704
|
return !0;
|
|
@@ -688,13 +713,16 @@ function io(e, t) {
|
|
|
688
713
|
}
|
|
689
714
|
const l = E(n ? n[0] : void 0);
|
|
690
715
|
let a = (i) => {
|
|
691
|
-
if (i.key !== "Tab" || i.altKey || i.ctrlKey || i.metaKey || !z(e) || i.isComposing)
|
|
716
|
+
if (i.key !== "Tab" || i.altKey || i.ctrlKey || i.metaKey || !z(e) || i.isComposing)
|
|
717
|
+
return;
|
|
692
718
|
let s = l.activeElement, f = e.current;
|
|
693
|
-
if (!f || !M(s, f))
|
|
719
|
+
if (!f || !M(s, f))
|
|
720
|
+
return;
|
|
694
721
|
let m = B(f), g = C(m, {
|
|
695
722
|
tabbable: !0
|
|
696
723
|
}, f);
|
|
697
|
-
if (!s)
|
|
724
|
+
if (!s)
|
|
725
|
+
return;
|
|
698
726
|
g.currentNode = s;
|
|
699
727
|
let p = i.shiftKey ? g.previousNode() : g.nextNode();
|
|
700
728
|
p || (g.currentNode = i.shiftKey ? f[f.length - 1].nextElementSibling : f[0].previousElementSibling, p = i.shiftKey ? g.previousNode() : g.nextNode()), i.preventDefault(), p && L(p, !0);
|
|
@@ -706,7 +734,8 @@ function io(e, t) {
|
|
|
706
734
|
if (v = e, l.body.contains(i.target)) {
|
|
707
735
|
var s;
|
|
708
736
|
o.current = i.target, (s = o.current) === null || s === void 0 || s.focus();
|
|
709
|
-
} else
|
|
737
|
+
} else
|
|
738
|
+
v.current && te(v.current);
|
|
710
739
|
});
|
|
711
740
|
};
|
|
712
741
|
return l.addEventListener("keydown", a, !1), l.addEventListener("focusin", d, !1), n == null || n.forEach((i) => i.addEventListener("focusin", d, !1)), n == null || n.forEach((i) => i.addEventListener("focusout", c, !1)), () => {
|
|
@@ -728,9 +757,11 @@ function M(e, t) {
|
|
|
728
757
|
return !e || !t ? !1 : t.some((o) => o.contains(e));
|
|
729
758
|
}
|
|
730
759
|
function Z(e, t = null) {
|
|
731
|
-
if (e instanceof Element && e.closest("[data-react-aria-top-layer]"))
|
|
760
|
+
if (e instanceof Element && e.closest("[data-react-aria-top-layer]"))
|
|
761
|
+
return !0;
|
|
732
762
|
for (let { scopeRef: o } of $.traverse($.getTreeNode(t)))
|
|
733
|
-
if (o && M(e, o.current))
|
|
763
|
+
if (o && M(e, o.current))
|
|
764
|
+
return !0;
|
|
734
765
|
return !1;
|
|
735
766
|
}
|
|
736
767
|
function so(e) {
|
|
@@ -740,20 +771,23 @@ function ee(e, t) {
|
|
|
740
771
|
var o;
|
|
741
772
|
let r = (o = $.getTreeNode(t)) === null || o === void 0 ? void 0 : o.parent;
|
|
742
773
|
for (; r; ) {
|
|
743
|
-
if (r.scopeRef === e)
|
|
774
|
+
if (r.scopeRef === e)
|
|
775
|
+
return !0;
|
|
744
776
|
r = r.parent;
|
|
745
777
|
}
|
|
746
778
|
return !1;
|
|
747
779
|
}
|
|
748
780
|
function L(e, t = !1) {
|
|
749
|
-
if (e != null && !t)
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
781
|
+
if (e != null && !t)
|
|
782
|
+
try {
|
|
783
|
+
fe(e);
|
|
784
|
+
} catch {
|
|
785
|
+
}
|
|
786
|
+
else if (e != null)
|
|
787
|
+
try {
|
|
788
|
+
e.focus();
|
|
789
|
+
} catch {
|
|
790
|
+
}
|
|
757
791
|
}
|
|
758
792
|
function te(e, t = !0) {
|
|
759
793
|
let o = e[0].previousElementSibling, r = B(e), n = C(r, {
|
|
@@ -780,7 +814,8 @@ function uo(e, t) {
|
|
|
780
814
|
}
|
|
781
815
|
function co(e, t, o) {
|
|
782
816
|
w(() => {
|
|
783
|
-
if (t || o)
|
|
817
|
+
if (t || o)
|
|
818
|
+
return;
|
|
784
819
|
let r = e.current;
|
|
785
820
|
const n = E(r ? r[0] : void 0);
|
|
786
821
|
let l = (a) => {
|
|
@@ -799,7 +834,8 @@ function co(e, t, o) {
|
|
|
799
834
|
function mo(e) {
|
|
800
835
|
let t = $.getTreeNode(v);
|
|
801
836
|
for (; t && t.scopeRef !== e; ) {
|
|
802
|
-
if (t.nodeToRestore)
|
|
837
|
+
if (t.nodeToRestore)
|
|
838
|
+
return !1;
|
|
803
839
|
t = t.parent;
|
|
804
840
|
}
|
|
805
841
|
return (t == null ? void 0 : t.scopeRef) === e;
|
|
@@ -809,7 +845,8 @@ function fo(e, t, o) {
|
|
|
809
845
|
w(() => {
|
|
810
846
|
let n = e.current;
|
|
811
847
|
const l = E(n ? n[0] : void 0);
|
|
812
|
-
if (!t || o)
|
|
848
|
+
if (!t || o)
|
|
849
|
+
return;
|
|
813
850
|
let a = () => {
|
|
814
851
|
(!v || ee(v, e)) && M(l.activeElement, e.current) && (v = e);
|
|
815
852
|
};
|
|
@@ -821,13 +858,17 @@ function fo(e, t, o) {
|
|
|
821
858
|
o
|
|
822
859
|
]), w(() => {
|
|
823
860
|
const n = E(e.current ? e.current[0] : void 0);
|
|
824
|
-
if (!t)
|
|
861
|
+
if (!t)
|
|
862
|
+
return;
|
|
825
863
|
let l = (a) => {
|
|
826
|
-
if (a.key !== "Tab" || a.altKey || a.ctrlKey || a.metaKey || !z(e) || a.isComposing)
|
|
864
|
+
if (a.key !== "Tab" || a.altKey || a.ctrlKey || a.metaKey || !z(e) || a.isComposing)
|
|
865
|
+
return;
|
|
827
866
|
let d = n.activeElement;
|
|
828
|
-
if (!M(d, e.current))
|
|
867
|
+
if (!M(d, e.current))
|
|
868
|
+
return;
|
|
829
869
|
let c = $.getTreeNode(e);
|
|
830
|
-
if (!c)
|
|
870
|
+
if (!c)
|
|
871
|
+
return;
|
|
831
872
|
let i = c.nodeToRestore, s = C(n.body, {
|
|
832
873
|
tabbable: !0
|
|
833
874
|
});
|
|
@@ -850,13 +891,15 @@ function fo(e, t, o) {
|
|
|
850
891
|
o
|
|
851
892
|
]), w(() => {
|
|
852
893
|
const n = E(e.current ? e.current[0] : void 0);
|
|
853
|
-
if (!t)
|
|
894
|
+
if (!t)
|
|
895
|
+
return;
|
|
854
896
|
let l = $.getTreeNode(e);
|
|
855
897
|
if (l) {
|
|
856
898
|
var a;
|
|
857
899
|
return l.nodeToRestore = (a = r.current) !== null && a !== void 0 ? a : void 0, () => {
|
|
858
900
|
let d = $.getTreeNode(e);
|
|
859
|
-
if (!d)
|
|
901
|
+
if (!d)
|
|
902
|
+
return;
|
|
860
903
|
let c = d.nodeToRestore;
|
|
861
904
|
if (t && c && // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
862
905
|
(M(n.activeElement, e.current) || n.activeElement === n.body && mo(e))) {
|
|
@@ -906,7 +949,8 @@ class $e {
|
|
|
906
949
|
}
|
|
907
950
|
addTreeNode(t, o, r) {
|
|
908
951
|
let n = this.fastMap.get(o ?? null);
|
|
909
|
-
if (!n)
|
|
952
|
+
if (!n)
|
|
953
|
+
return;
|
|
910
954
|
let l = new pe({
|
|
911
955
|
scopeRef: t
|
|
912
956
|
});
|
|
@@ -916,23 +960,29 @@ class $e {
|
|
|
916
960
|
this.fastMap.set(t.scopeRef, t);
|
|
917
961
|
}
|
|
918
962
|
removeTreeNode(t) {
|
|
919
|
-
if (t === null)
|
|
963
|
+
if (t === null)
|
|
964
|
+
return;
|
|
920
965
|
let o = this.fastMap.get(t);
|
|
921
|
-
if (!o)
|
|
966
|
+
if (!o)
|
|
967
|
+
return;
|
|
922
968
|
let r = o.parent;
|
|
923
|
-
for (let l of this.traverse())
|
|
969
|
+
for (let l of this.traverse())
|
|
970
|
+
l !== o && o.nodeToRestore && l.nodeToRestore && o.scopeRef && o.scopeRef.current && M(l.nodeToRestore, o.scopeRef.current) && (l.nodeToRestore = o.nodeToRestore);
|
|
924
971
|
let n = o.children;
|
|
925
972
|
r && (r.removeChild(o), n.size > 0 && n.forEach((l) => r && r.addChild(l))), this.fastMap.delete(o.scopeRef);
|
|
926
973
|
}
|
|
927
974
|
// Pre Order Depth First
|
|
928
975
|
*traverse(t = this.root) {
|
|
929
|
-
if (t.scopeRef != null && (yield t), t.children.size > 0)
|
|
976
|
+
if (t.scopeRef != null && (yield t), t.children.size > 0)
|
|
977
|
+
for (let o of t.children)
|
|
978
|
+
yield* this.traverse(o);
|
|
930
979
|
}
|
|
931
980
|
clone() {
|
|
932
981
|
var t;
|
|
933
982
|
let o = new $e();
|
|
934
983
|
var r;
|
|
935
|
-
for (let n of this.traverse())
|
|
984
|
+
for (let n of this.traverse())
|
|
985
|
+
o.addTreeNode(n.scopeRef, (r = (t = n.parent) === null || t === void 0 ? void 0 : t.scopeRef) !== null && r !== void 0 ? r : null, n.nodeToRestore);
|
|
936
986
|
return o;
|
|
937
987
|
}
|
|
938
988
|
constructor() {
|
|
@@ -1065,7 +1115,8 @@ function wo() {
|
|
|
1065
1115
|
}));
|
|
1066
1116
|
}));
|
|
1067
1117
|
}, a = null, d = () => {
|
|
1068
|
-
if (a)
|
|
1118
|
+
if (a)
|
|
1119
|
+
return;
|
|
1069
1120
|
let i = () => {
|
|
1070
1121
|
window.scrollTo(0, 0);
|
|
1071
1122
|
}, s = window.pageXOffset, f = window.pageYOffset;
|
|
@@ -1114,11 +1165,14 @@ function Fe(e) {
|
|
|
1114
1165
|
let I = /* @__PURE__ */ new WeakMap(), P = [];
|
|
1115
1166
|
function Eo(e, t = document.body) {
|
|
1116
1167
|
let o = new Set(e), r = /* @__PURE__ */ new Set(), n = (c) => {
|
|
1117
|
-
for (let m of c.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))
|
|
1168
|
+
for (let m of c.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))
|
|
1169
|
+
o.add(m);
|
|
1118
1170
|
let i = (m) => {
|
|
1119
|
-
if (o.has(m) || r.has(m.parentElement) && m.parentElement.getAttribute("role") !== "row")
|
|
1171
|
+
if (o.has(m) || r.has(m.parentElement) && m.parentElement.getAttribute("role") !== "row")
|
|
1172
|
+
return NodeFilter.FILTER_REJECT;
|
|
1120
1173
|
for (let g of o)
|
|
1121
|
-
if (m.contains(g))
|
|
1174
|
+
if (m.contains(g))
|
|
1175
|
+
return NodeFilter.FILTER_SKIP;
|
|
1122
1176
|
return NodeFilter.FILTER_ACCEPT;
|
|
1123
1177
|
}, s = document.createTreeWalker(c, NodeFilter.SHOW_ELEMENT, {
|
|
1124
1178
|
acceptNode: i
|
|
@@ -1140,7 +1194,8 @@ function Eo(e, t = document.body) {
|
|
|
1140
1194
|
...o,
|
|
1141
1195
|
...r
|
|
1142
1196
|
].some((s) => s.contains(i.target))) {
|
|
1143
|
-
for (let s of i.removedNodes)
|
|
1197
|
+
for (let s of i.removedNodes)
|
|
1198
|
+
s instanceof Element && (o.delete(s), r.delete(s));
|
|
1144
1199
|
for (let s of i.addedNodes)
|
|
1145
1200
|
(s instanceof HTMLElement || s instanceof SVGElement) && (s.dataset.liveAnnouncer === "true" || s.dataset.reactAriaTopLayer === "true") ? o.add(s) : s instanceof Element && n(s);
|
|
1146
1201
|
}
|
|
@@ -1183,7 +1238,8 @@ function Po(e) {
|
|
|
1183
1238
|
n,
|
|
1184
1239
|
l
|
|
1185
1240
|
]), { getContainer: d } = yo();
|
|
1186
|
-
if (!e.portalContainer && d && (o = d()), !o)
|
|
1241
|
+
if (!e.portalContainer && d && (o = d()), !o)
|
|
1242
|
+
return null;
|
|
1187
1243
|
let c = e.children;
|
|
1188
1244
|
return e.disableFocusManagement || (c = /* @__PURE__ */ h.createElement(ro, {
|
|
1189
1245
|
restoreFocus: !0,
|
|
@@ -1209,9 +1265,10 @@ function ko(e, t, o) {
|
|
|
1209
1265
|
return $o({
|
|
1210
1266
|
isDisabled: !t.isOpen
|
|
1211
1267
|
}), Xe(), F(() => {
|
|
1212
|
-
if (t.isOpen)
|
|
1213
|
-
|
|
1214
|
-
|
|
1268
|
+
if (t.isOpen)
|
|
1269
|
+
return Eo([
|
|
1270
|
+
o.current
|
|
1271
|
+
]);
|
|
1215
1272
|
}, [
|
|
1216
1273
|
t.isOpen,
|
|
1217
1274
|
o
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sps-woodland/modal",
|
|
3
3
|
"description": "SPS Woodland Design System modal component",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.11.0",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/modal",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"@spscommerce/utils": "^7.0.0",
|
|
30
30
|
"react": "^16.9.0",
|
|
31
31
|
"react-dom": "^16.9.0",
|
|
32
|
-
"@sps-woodland/buttons": "8.
|
|
33
|
-
"@sps-woodland/core": "8.
|
|
34
|
-
"@sps-woodland/tokens": "8.
|
|
32
|
+
"@sps-woodland/buttons": "8.11.0",
|
|
33
|
+
"@sps-woodland/core": "8.11.0",
|
|
34
|
+
"@sps-woodland/tokens": "8.11.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@spscommerce/utils": "^7.0.0",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"@vanilla-extract/vite-plugin": "^3.6.0",
|
|
43
43
|
"react": "^16.9.0",
|
|
44
44
|
"react-dom": "^16.9.0",
|
|
45
|
-
"@sps-woodland/buttons": "8.
|
|
46
|
-
"@sps-woodland/core": "8.
|
|
47
|
-
"@sps-woodland/tokens": "8.
|
|
45
|
+
"@sps-woodland/buttons": "8.11.0",
|
|
46
|
+
"@sps-woodland/core": "8.11.0",
|
|
47
|
+
"@sps-woodland/tokens": "8.11.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"react-aria": "^3.21.0",
|