drab 7.0.2 → 7.0.3
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/dialog/index.js +2 -2
- package/dist/tabs/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/dialog/index.ts +2 -2
- package/src/tabs/index.ts +5 -0
package/dist/dialog/index.js
CHANGED
@@ -73,8 +73,8 @@ export class Dialog extends Lifecycle(Trigger(Content())) {
|
|
73
73
|
let rect = this.#dialog.getBoundingClientRect();
|
74
74
|
// If dialog covers full viewport, use first child element for hit testing
|
75
75
|
// Example: https://picocss.com/docs/modal
|
76
|
-
if (
|
77
|
-
|
76
|
+
if (window.innerWidth - rect.width <= this.#scrollbarWidth + 3 &&
|
77
|
+
window.innerHeight - rect.height <= 3 &&
|
78
78
|
this.#dialog.firstElementChild) {
|
79
79
|
rect = this.#dialog.firstElementChild.getBoundingClientRect();
|
80
80
|
}
|
package/dist/tabs/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tabs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE9E,MAAM,WAAW,cAAe,SAAQ,iBAAiB;IACxD,4DAA4D;IAC5D,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,IAAK,SAAQ,SAAoB;;;IAkDpC,KAAK;CA4Fd"}
|
package/package.json
CHANGED
package/src/dialog/index.ts
CHANGED
@@ -99,8 +99,8 @@ export class Dialog extends Lifecycle(Trigger(Content())) {
|
|
99
99
|
// If dialog covers full viewport, use first child element for hit testing
|
100
100
|
// Example: https://picocss.com/docs/modal
|
101
101
|
if (
|
102
|
-
|
103
|
-
|
102
|
+
window.innerWidth - rect.width <= this.#scrollbarWidth + 3 &&
|
103
|
+
window.innerHeight - rect.height <= 3 &&
|
104
104
|
this.#dialog.firstElementChild
|
105
105
|
) {
|
106
106
|
rect = this.#dialog.firstElementChild.getBoundingClientRect();
|
package/src/tabs/index.ts
CHANGED
@@ -86,13 +86,18 @@ export class Tabs extends Lifecycle(Trigger()) {
|
|
86
86
|
override mount() {
|
87
87
|
// create tablist
|
88
88
|
const [first, ...rest] = this.#tabs;
|
89
|
+
|
89
90
|
let common = this.#ancestors(first);
|
91
|
+
|
90
92
|
for (let i = 0; i < rest.length; i++) {
|
91
93
|
common = common.intersection(this.#ancestors(rest[i]));
|
92
94
|
}
|
95
|
+
|
93
96
|
const [tablist] = common;
|
97
|
+
|
94
98
|
if (!tablist)
|
95
99
|
throw new Error("Tabs: No common parent element found for triggers.");
|
100
|
+
|
96
101
|
tablist.role = "tablist";
|
97
102
|
tablist.ariaOrientation = this.#orientation;
|
98
103
|
|