@y14e/tabs 2.0.8 → 2.0.9
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/README.md +3 -3
- package/dist/index.bundle.cjs +5 -5
- package/dist/index.bundle.js +5 -5
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,11 +13,11 @@ npm i @y14e/tabs
|
|
|
13
13
|
import Tabs from '@y14e/tabs';
|
|
14
14
|
|
|
15
15
|
// CDNs
|
|
16
|
-
import Tabs from 'https://esm.sh/@y14e/tabs@2.0.
|
|
16
|
+
import Tabs from 'https://esm.sh/@y14e/tabs@2.0.9';
|
|
17
17
|
// or
|
|
18
|
-
import Tabs from 'https://cdn.jsdelivr.net/npm/@y14e/tabs@2.0.
|
|
18
|
+
import Tabs from 'https://cdn.jsdelivr.net/npm/@y14e/tabs@2.0.9/+esm';
|
|
19
19
|
// or
|
|
20
|
-
import Tabs from 'https://esm.unpkg.com/@y14e/tabs@2.0.
|
|
20
|
+
import Tabs from 'https://esm.unpkg.com/@y14e/tabs@2.0.9';
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Usage
|
package/dist/index.bundle.cjs
CHANGED
|
@@ -1116,13 +1116,13 @@ var TabsIndicator = class {
|
|
|
1116
1116
|
if (!tab) {
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
|
-
const
|
|
1120
|
-
const
|
|
1119
|
+
const tabRect = tab.getBoundingClientRect();
|
|
1120
|
+
const listRect = this.#listElement.getBoundingClientRect();
|
|
1121
1121
|
const { duration, easing } = this.#settings.animation.indicator;
|
|
1122
1122
|
this.#animation = this.#rootElement.animate(
|
|
1123
1123
|
{
|
|
1124
|
-
[position]: `${isHorizontal ?
|
|
1125
|
-
[size]: `${isHorizontal ? width : height}px`
|
|
1124
|
+
[position]: `${isHorizontal ? tabRect.left - listRect.left : tabRect.top - listRect.top}px`,
|
|
1125
|
+
[size]: `${isHorizontal ? tabRect.width : tabRect.height}px`
|
|
1126
1126
|
},
|
|
1127
1127
|
{ duration, easing, fill: "forwards" }
|
|
1128
1128
|
);
|
|
@@ -1150,7 +1150,7 @@ var TabsIndicator = class {
|
|
|
1150
1150
|
* Tabs
|
|
1151
1151
|
* WAI-ARIA compliant tabs pattern implementation in TypeScript.
|
|
1152
1152
|
*
|
|
1153
|
-
* @version 2.0.
|
|
1153
|
+
* @version 2.0.9
|
|
1154
1154
|
* @author Yusuke Kamiyamane
|
|
1155
1155
|
* @license MIT
|
|
1156
1156
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.bundle.js
CHANGED
|
@@ -1114,13 +1114,13 @@ var TabsIndicator = class {
|
|
|
1114
1114
|
if (!tab) {
|
|
1115
1115
|
return;
|
|
1116
1116
|
}
|
|
1117
|
-
const
|
|
1118
|
-
const
|
|
1117
|
+
const tabRect = tab.getBoundingClientRect();
|
|
1118
|
+
const listRect = this.#listElement.getBoundingClientRect();
|
|
1119
1119
|
const { duration, easing } = this.#settings.animation.indicator;
|
|
1120
1120
|
this.#animation = this.#rootElement.animate(
|
|
1121
1121
|
{
|
|
1122
|
-
[position]: `${isHorizontal ?
|
|
1123
|
-
[size]: `${isHorizontal ? width : height}px`
|
|
1122
|
+
[position]: `${isHorizontal ? tabRect.left - listRect.left : tabRect.top - listRect.top}px`,
|
|
1123
|
+
[size]: `${isHorizontal ? tabRect.width : tabRect.height}px`
|
|
1124
1124
|
},
|
|
1125
1125
|
{ duration, easing, fill: "forwards" }
|
|
1126
1126
|
);
|
|
@@ -1148,7 +1148,7 @@ var TabsIndicator = class {
|
|
|
1148
1148
|
* Tabs
|
|
1149
1149
|
* WAI-ARIA compliant tabs pattern implementation in TypeScript.
|
|
1150
1150
|
*
|
|
1151
|
-
* @version 2.0.
|
|
1151
|
+
* @version 2.0.9
|
|
1152
1152
|
* @author Yusuke Kamiyamane
|
|
1153
1153
|
* @license MIT
|
|
1154
1154
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.cjs
CHANGED
|
@@ -493,13 +493,13 @@ var TabsIndicator = class {
|
|
|
493
493
|
if (!tab) {
|
|
494
494
|
return;
|
|
495
495
|
}
|
|
496
|
-
const
|
|
497
|
-
const
|
|
496
|
+
const tabRect = tab.getBoundingClientRect();
|
|
497
|
+
const listRect = this.#listElement.getBoundingClientRect();
|
|
498
498
|
const { duration, easing } = this.#settings.animation.indicator;
|
|
499
499
|
this.#animation = this.#rootElement.animate(
|
|
500
500
|
{
|
|
501
|
-
[position]: `${isHorizontal ?
|
|
502
|
-
[size]: `${isHorizontal ? width : height}px`
|
|
501
|
+
[position]: `${isHorizontal ? tabRect.left - listRect.left : tabRect.top - listRect.top}px`,
|
|
502
|
+
[size]: `${isHorizontal ? tabRect.width : tabRect.height}px`
|
|
503
503
|
},
|
|
504
504
|
{ duration, easing, fill: "forwards" }
|
|
505
505
|
);
|
|
@@ -527,7 +527,7 @@ var TabsIndicator = class {
|
|
|
527
527
|
* Tabs
|
|
528
528
|
* WAI-ARIA compliant tabs pattern implementation in TypeScript.
|
|
529
529
|
*
|
|
530
|
-
* @version 2.0.
|
|
530
|
+
* @version 2.0.9
|
|
531
531
|
* @author Yusuke Kamiyamane
|
|
532
532
|
* @license MIT
|
|
533
533
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -487,13 +487,13 @@ var TabsIndicator = class {
|
|
|
487
487
|
if (!tab) {
|
|
488
488
|
return;
|
|
489
489
|
}
|
|
490
|
-
const
|
|
491
|
-
const
|
|
490
|
+
const tabRect = tab.getBoundingClientRect();
|
|
491
|
+
const listRect = this.#listElement.getBoundingClientRect();
|
|
492
492
|
const { duration, easing } = this.#settings.animation.indicator;
|
|
493
493
|
this.#animation = this.#rootElement.animate(
|
|
494
494
|
{
|
|
495
|
-
[position]: `${isHorizontal ?
|
|
496
|
-
[size]: `${isHorizontal ? width : height}px`
|
|
495
|
+
[position]: `${isHorizontal ? tabRect.left - listRect.left : tabRect.top - listRect.top}px`,
|
|
496
|
+
[size]: `${isHorizontal ? tabRect.width : tabRect.height}px`
|
|
497
497
|
},
|
|
498
498
|
{ duration, easing, fill: "forwards" }
|
|
499
499
|
);
|
|
@@ -521,7 +521,7 @@ var TabsIndicator = class {
|
|
|
521
521
|
* Tabs
|
|
522
522
|
* WAI-ARIA compliant tabs pattern implementation in TypeScript.
|
|
523
523
|
*
|
|
524
|
-
* @version 2.0.
|
|
524
|
+
* @version 2.0.9
|
|
525
525
|
* @author Yusuke Kamiyamane
|
|
526
526
|
* @license MIT
|
|
527
527
|
* @copyright Copyright (c) Yusuke Kamiyamane
|