@farming-labs/astro-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/astro-theme",
3
- "version": "0.2.45",
3
+ "version": "0.2.47",
4
4
  "description": "Astro UI components for @farming-labs/docs — layout, sidebar, TOC, search, and theme toggle",
5
5
  "keywords": [
6
6
  "astro",
@@ -119,8 +119,8 @@
119
119
  },
120
120
  "dependencies": {
121
121
  "sugar-high": "^0.9.5",
122
- "@farming-labs/docs": "0.2.45",
123
- "@farming-labs/astro": "0.2.45"
122
+ "@farming-labs/docs": "0.2.47",
123
+ "@farming-labs/astro": "0.2.47"
124
124
  },
125
125
  "peerDependencies": {
126
126
  "astro": ">=4.0.0"
@@ -679,11 +679,16 @@ const localizedParentUrl = withLang(parentUrl);
679
679
  trigger.addEventListener('click', () => {
680
680
  const val = trigger.getAttribute('data-tab-value');
681
681
  tabs.querySelectorAll('.fd-tab-trigger').forEach(t => {
682
- t.classList.toggle('fd-tab-active', t.getAttribute('data-tab-value') === val);
683
- t.setAttribute('aria-selected', String(t.getAttribute('data-tab-value') === val));
682
+ const active = t.getAttribute('data-tab-value') === val;
683
+ t.classList.toggle('fd-tab-active', active);
684
+ t.setAttribute('aria-selected', String(active));
685
+ t.setAttribute('data-state', active ? 'active' : 'inactive');
686
+ t.setAttribute('tabindex', active ? '0' : '-1');
684
687
  });
685
688
  tabs.querySelectorAll('.fd-tab-panel').forEach(p => {
686
- p.classList.toggle('fd-tab-panel-active', p.getAttribute('data-tab-panel') === val);
689
+ const active = p.getAttribute('data-tab-panel') === val;
690
+ p.classList.toggle('fd-tab-panel-active', active);
691
+ p.setAttribute('data-state', active ? 'active' : 'inactive');
687
692
  });
688
693
  });
689
694
  });