@farming-labs/svelte-theme 0.2.45 → 0.2.46

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/svelte-theme",
3
- "version": "0.2.45",
3
+ "version": "0.2.46",
4
4
  "description": "Svelte UI components for @farming-labs/docs — layout, sidebar, TOC, search, and theme toggle",
5
5
  "keywords": [
6
6
  "docs",
@@ -122,8 +122,8 @@
122
122
  "dependencies": {
123
123
  "gray-matter": "^4.0.3",
124
124
  "sugar-high": "^0.9.5",
125
- "@farming-labs/docs": "0.2.45",
126
- "@farming-labs/svelte": "0.2.45"
125
+ "@farming-labs/docs": "0.2.46",
126
+ "@farming-labs/svelte": "0.2.46"
127
127
  },
128
128
  "peerDependencies": {
129
129
  "svelte": ">=5.0.0"
@@ -161,11 +161,16 @@
161
161
  trigger.onclick = () => {
162
162
  const val = trigger.getAttribute("data-tab-value");
163
163
  tabs.querySelectorAll(".fd-tab-trigger").forEach((t) => {
164
- t.classList.toggle("fd-tab-active", t.getAttribute("data-tab-value") === val);
165
- t.setAttribute("aria-selected", String(t.getAttribute("data-tab-value") === val));
164
+ const active = t.getAttribute("data-tab-value") === val;
165
+ t.classList.toggle("fd-tab-active", active);
166
+ t.setAttribute("aria-selected", String(active));
167
+ t.setAttribute("data-state", active ? "active" : "inactive");
168
+ t.setAttribute("tabindex", active ? "0" : "-1");
166
169
  });
167
170
  tabs.querySelectorAll(".fd-tab-panel").forEach((p) => {
168
- p.classList.toggle("fd-tab-panel-active", p.getAttribute("data-tab-panel") === val);
171
+ const active = p.getAttribute("data-tab-panel") === val;
172
+ p.classList.toggle("fd-tab-panel-active", active);
173
+ p.setAttribute("data-state", active ? "active" : "inactive");
169
174
  });
170
175
  };
171
176
  });