@farming-labs/nuxt-theme 0.2.45 → 0.2.47
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/nuxt-theme",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.47",
|
|
4
4
|
"description": "Nuxt/Vue UI components for @farming-labs/docs — layout, sidebar, TOC, search, and theme toggle",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"sugar-high": "^0.9.5",
|
|
91
|
-
"@farming-labs/docs": "0.2.
|
|
91
|
+
"@farming-labs/docs": "0.2.47"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"nuxt": ">=3.0.0",
|
|
@@ -167,11 +167,16 @@ function wireInteractive() {
|
|
|
167
167
|
trigger.addEventListener("click", () => {
|
|
168
168
|
const val = trigger.getAttribute("data-tab-value");
|
|
169
169
|
tabs.querySelectorAll(".fd-tab-trigger").forEach((t) => {
|
|
170
|
-
|
|
171
|
-
t.
|
|
170
|
+
const active = t.getAttribute("data-tab-value") === val;
|
|
171
|
+
t.classList.toggle("fd-tab-active", active);
|
|
172
|
+
t.setAttribute("aria-selected", String(active));
|
|
173
|
+
t.setAttribute("data-state", active ? "active" : "inactive");
|
|
174
|
+
t.setAttribute("tabindex", active ? "0" : "-1");
|
|
172
175
|
});
|
|
173
176
|
tabs.querySelectorAll(".fd-tab-panel").forEach((p) => {
|
|
174
|
-
|
|
177
|
+
const active = p.getAttribute("data-tab-panel") === val;
|
|
178
|
+
p.classList.toggle("fd-tab-panel-active", active);
|
|
179
|
+
p.setAttribute("data-state", active ? "active" : "inactive");
|
|
175
180
|
});
|
|
176
181
|
});
|
|
177
182
|
});
|