igniteui-astro-components 0.0.2 → 0.0.4

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.
Files changed (122) hide show
  1. package/README.md +21 -0
  2. package/package.json +3 -1
  3. package/src/assets/icons/angular-logo.svg +38 -0
  4. package/src/assets/icons/arrow-down.svg +3 -0
  5. package/src/assets/icons/arrow.svg +3 -0
  6. package/src/assets/icons/blazor-logo.svg +10 -0
  7. package/src/assets/icons/bullet-poiont.svg +3 -0
  8. package/src/assets/icons/chatGPT,.svg +4 -0
  9. package/src/assets/icons/check-circle.svg +3 -0
  10. package/src/assets/icons/check.svg +3 -0
  11. package/src/assets/icons/cheked.svg +3 -0
  12. package/src/assets/icons/chevron.svg +3 -0
  13. package/src/assets/icons/classes.svg +3 -0
  14. package/src/assets/icons/claude.svg +3 -0
  15. package/src/assets/icons/clear.svg +3 -0
  16. package/src/assets/icons/close.svg +3 -0
  17. package/src/assets/icons/code.svg +3 -0
  18. package/src/assets/icons/collapse.svg +5 -0
  19. package/src/assets/icons/command.svg +3 -0
  20. package/src/assets/icons/copy-clipboard.svg +3 -0
  21. package/src/assets/icons/copy.svg +3 -0
  22. package/src/assets/icons/crown.svg +3 -0
  23. package/src/assets/icons/dot.svg +3 -0
  24. package/src/assets/icons/download.svg +3 -0
  25. package/src/assets/icons/dropdown-indicator-bold.svg +3 -0
  26. package/src/assets/icons/dropdown-indicator.svg +3 -0
  27. package/src/assets/icons/enter-fullscreen.svg +3 -0
  28. package/src/assets/icons/enumerations.svg +3 -0
  29. package/src/assets/icons/exit-fullscreen.svg +3 -0
  30. package/src/assets/icons/expand-all.svg +5 -0
  31. package/src/assets/icons/expand-icon.svg +3 -0
  32. package/src/assets/icons/eye.svg +3 -0
  33. package/src/assets/icons/filter-clear.svg +1 -0
  34. package/src/assets/icons/filter.svg +3 -0
  35. package/src/assets/icons/functions.svg +5 -0
  36. package/src/assets/icons/github-logo.svg +3 -0
  37. package/src/assets/icons/hamburger-menu.svg +3 -0
  38. package/src/assets/icons/info.svg +3 -0
  39. package/src/assets/icons/interfaces.svg +3 -0
  40. package/src/assets/icons/link-blank.svg +3 -0
  41. package/src/assets/icons/link.svg +3 -0
  42. package/src/assets/icons/moon.svg +3 -0
  43. package/src/assets/icons/note.svg +3 -0
  44. package/src/assets/icons/open-link-blank.svg +3 -0
  45. package/src/assets/icons/page.svg +3 -0
  46. package/src/assets/icons/palette,.svg +3 -0
  47. package/src/assets/icons/pen.svg +3 -0
  48. package/src/assets/icons/play-circle.svg +10 -0
  49. package/src/assets/icons/premium.svg +3 -0
  50. package/src/assets/icons/react.svg +4 -0
  51. package/src/assets/icons/refresh.svg +3 -0
  52. package/src/assets/icons/rocket.svg +10 -0
  53. package/src/assets/icons/search.svg +10 -0
  54. package/src/assets/icons/shine.svg +3 -0
  55. package/src/assets/icons/show-more.svg +3 -0
  56. package/src/assets/icons/source-code.svg +3 -0
  57. package/src/assets/icons/start.svg +3 -0
  58. package/src/assets/icons/sub-directory-indicator.svg +3 -0
  59. package/src/assets/icons/sun.svg +3 -0
  60. package/src/assets/icons/system-theme.svg +3 -0
  61. package/src/assets/icons/system.svg +3 -0
  62. package/src/assets/icons/type-alias.svg +3 -0
  63. package/src/assets/icons/variables.svg +3 -0
  64. package/src/assets/icons/warning.svg +3 -0
  65. package/src/assets/icons/web-component-logo.svg +23 -0
  66. package/src/assets/icons/wrap-text.svg +3 -0
  67. package/src/assets/ig-logo.svg +33 -0
  68. package/src/assets/illustrations/classes.svg +3 -0
  69. package/src/assets/illustrations/enumerations.svg +3 -0
  70. package/src/assets/illustrations/functions.svg +5 -0
  71. package/src/assets/illustrations/interfaces.svg +3 -0
  72. package/src/assets/illustrations/type-alias.svg +3 -0
  73. package/src/assets/illustrations/variables.svg +3 -0
  74. package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +57 -0
  75. package/src/components/DocsBreadcrumb/DocsBreadcrumb.scss +51 -0
  76. package/src/components/DocsBreadcrumb/README.md +66 -0
  77. package/src/components/DocsSidebar/DocsSidebar.astro +38 -61
  78. package/src/components/DocsSidebar/DocsSidebar.scss +18 -0
  79. package/src/components/DocsSidebar/SidebarFilterInput.astro +22 -57
  80. package/src/components/DocsSidebar/SidebarFilterInput.scss +69 -0
  81. package/src/components/DocsSidebar/SidebarLabel.astro +2 -7
  82. package/src/components/DocsSidebar/toTreeNodes.ts +17 -5
  83. package/src/components/DocsSubHeader/DocsSubHeader.astro +60 -248
  84. package/src/components/DocsSubHeader/DocsSubHeader.scss +69 -0
  85. package/src/components/DocsSubHeader/README.md +6 -37
  86. package/src/components/DocsToc/DocsToc.astro +38 -83
  87. package/src/components/DocsToc/DocsToc.scss +33 -0
  88. package/src/components/DocsTree/DocsTree.astro +16 -2
  89. package/src/components/DocsTree/DocsTreeItem.astro +16 -13
  90. package/src/components/DocsTree/docs-tree.scss +185 -0
  91. package/src/components/GlobalFooter/GlobalFooter.astro +1 -1
  92. package/src/components/GlobalFooter/GlobalFooter.module.scss +1 -0
  93. package/src/components/GlobalNavBar/GlobalNavBar.module.scss +217 -196
  94. package/src/components/MobileSidebarToggle/MobileSidebarToggle.astro +2 -47
  95. package/src/components/MobileSidebarToggle/MobileSidebarToggle.scss +0 -0
  96. package/src/components/Search/Search.astro +14 -103
  97. package/src/components/Search/Search.scss +50 -0
  98. package/src/components/ThemingWidget/ThemingWidget.astro +1 -5
  99. package/src/components/ThemingWidget/ThemingWidget.scss +3 -0
  100. package/src/components/mdx/DocsAside/DocsAside.astro +15 -47
  101. package/src/components/mdx/DocsAside/DocsAside.scss +36 -0
  102. package/src/components/mdx/DocsAside/README.md +6 -6
  103. package/src/components/mdx/Sample/Sample.astro +1 -32
  104. package/src/components/mdx/Sample/Sample.scss +32 -0
  105. package/src/integration.ts +20 -8
  106. package/src/layouts/DocsLayout/DocsLayout.astro +88 -244
  107. package/src/layouts/DocsLayout/DocsLayout.scss +125 -0
  108. package/src/scripts/icon-registry.ts +57 -0
  109. package/src/styles/custom.scss +17 -251
  110. package/src/styles/global/_breakpoints.scss +48 -0
  111. package/src/styles/global/_code-blocks.scss +77 -0
  112. package/src/styles/global/_component-themes.scss +68 -0
  113. package/src/styles/global/_index.scss +9 -0
  114. package/src/styles/global/_markdown.scss +120 -0
  115. package/src/styles/global/_members.scss +85 -0
  116. package/src/styles/global/_palette.scss +131 -0
  117. package/src/styles/global/_type-scale.scss +182 -0
  118. package/src/styles/global/_variables.scss +71 -0
  119. package/src/styles/theme.scss +58 -0
  120. package/src/virtual-modules.d.ts +2 -0
  121. package/src/components/DocsTree/docs-tree.css +0 -226
  122. package/src/styles/ig-theme.scss +0 -43
@@ -12,6 +12,7 @@
12
12
  import type { MarkdownHeading } from 'astro';
13
13
  import DocsTree from '../DocsTree/DocsTree.astro';
14
14
  import { headingsToTreeNodes, type TocConfig } from './toTreeNodes';
15
+ import './DocsToc.scss';
15
16
 
16
17
  interface Props {
17
18
  headings?: MarkdownHeading[];
@@ -31,9 +32,9 @@ const nodes = headingsToTreeNodes(headings, tocConfig);
31
32
  ---
32
33
 
33
34
  {nodes.length > 0 && (
34
- <docs-toc data-offset-target={offsetTarget}>
35
+ <docs-toc class="toc-sidebar" data-offset-target={offsetTarget}>
36
+ <h2 class="toc-sidebar__heading" id="toc-heading">{label}</h2>
35
37
  <nav aria-labelledby="toc-heading">
36
- <h2 id="toc-heading">{label}</h2>
37
38
  <DocsTree nodes={nodes} variant="toc" />
38
39
  </nav>
39
40
  </docs-toc>
@@ -49,7 +50,6 @@ const nodes = headingsToTreeNodes(headings, tocConfig);
49
50
  private rafId: number | undefined;
50
51
  private headings: HTMLElement[] = [];
51
52
  private links: HTMLAnchorElement[] = [];
52
- private parentItems: HTMLElement[] = [];
53
53
  private currentLink: HTMLAnchorElement | undefined;
54
54
  private offsetEl: Element | null = null;
55
55
  private resizeObserver: ResizeObserver | undefined;
@@ -92,14 +92,15 @@ const nodes = headingsToTreeNodes(headings, tocConfig);
92
92
  this.querySelectorAll('a[aria-current]').forEach(
93
93
  (a) => a.removeAttribute('aria-current'),
94
94
  );
95
+ // Clear any stale selected state on tree items.
96
+ this.querySelectorAll('igc-tree-item').forEach((item) => {
97
+ (item as HTMLElement & { selected: boolean }).selected = false;
98
+ });
95
99
 
96
100
  this.links = Array.from(this.querySelectorAll<HTMLAnchorElement>('a[href^="#"]'));
97
101
  this.headings = this.links
98
102
  .map((link) => document.getElementById(decodeURIComponent(link.hash.slice(1))))
99
103
  .filter((el): el is HTMLElement => el !== null);
100
- this.parentItems = Array.from(
101
- this.querySelectorAll<HTMLElement>('igc-tree-item[data-has-children]'),
102
- );
103
104
 
104
105
  if (this.headings.length === 0) return;
105
106
 
@@ -135,6 +136,10 @@ const nodes = headingsToTreeNodes(headings, tocConfig);
135
136
 
136
137
  this.bindOffsetTarget();
137
138
  this.update();
139
+ // Safari: getBoundingClientRect() may not reflect final layout
140
+ // during the first rAF (before first paint). Schedule one extra
141
+ // update so the initial active item is always correct.
142
+ requestAnimationFrame(() => this.update());
138
143
  }
139
144
 
140
145
  private bindOffsetTarget() {
@@ -183,14 +188,10 @@ const nodes = headingsToTreeNodes(headings, tocConfig);
183
188
  }
184
189
  }
185
190
 
186
- // Above the first heading: no link is active.
191
+ // Above the first heading: default to the first item so there
192
+ // is always an active entry when at the top of the page.
187
193
  if (activeIndex === -1) {
188
- if (this.currentLink) {
189
- this.currentLink.removeAttribute('aria-current');
190
- this.currentLink = undefined;
191
- }
192
- this.syncExpansion(undefined);
193
- return;
194
+ activeIndex = 0;
194
195
  }
195
196
 
196
197
  this.setActive(activeIndex);
@@ -207,38 +208,39 @@ const nodes = headingsToTreeNodes(headings, tocConfig);
207
208
  private setActive(index: number) {
208
209
  const next = this.links[index];
209
210
  if (!next || next === this.currentLink) return;
211
+
212
+ const prevItem = this.currentLink?.closest<HTMLElement & { selected: boolean }>('igc-tree-item');
213
+ if (prevItem) prevItem.selected = false;
210
214
  this.currentLink?.removeAttribute('aria-current');
215
+
211
216
  next.setAttribute('aria-current', 'true');
217
+ const nextItem = next.closest<HTMLElement & { selected: boolean }>('igc-tree-item');
218
+ if (nextItem) nextItem.selected = true;
219
+
212
220
  this.currentLink = next;
213
221
  this.syncExpansion(next);
214
222
  }
215
223
 
216
224
  /**
217
- * Drive `expanded` on every parent <igc-tree-item> based on the
218
- * active link's ancestry chain. The active item itself is included
219
- * (so when an h2 with h3 children is active, its h3s become
220
- * visible). Manual click-toggles by the user are intentionally
221
- * overridden on the next scroll update — scrolling is the source
222
- * of truth for the open section.
225
+ * Additive expansion: walk up from the active anchor through
226
+ * every ancestor <igc-tree-item> (including the active item
227
+ * itself when it has children) and ensure each is `expanded`.
228
+ * Items outside the active path are left untouched, so
229
+ * previously visited sections stay open as the user scrolls
230
+ * past or back. Sections the user has never reached stay
231
+ * collapsed.
223
232
  */
224
- private syncExpansion(activeLink: HTMLAnchorElement | undefined) {
225
- const activePath = new Set<Element>();
226
- if (activeLink) {
227
- let item: Element | null = activeLink.closest('igc-tree-item');
228
- while (
229
- item &&
230
- item.tagName === 'IGC-TREE-ITEM' &&
231
- this.contains(item)
232
- ) {
233
- activePath.add(item);
234
- item = item.parentElement?.closest('igc-tree-item') ?? null;
235
- }
236
- }
237
- for (const el of this.parentItems) {
238
- const wantOpen = activePath.has(el);
239
- if ((el as ExpandableEl).expanded !== wantOpen) {
240
- (el as ExpandableEl).expanded = wantOpen;
233
+ private syncExpansion(activeLink: HTMLAnchorElement) {
234
+ let item: Element | null = activeLink.closest('igc-tree-item');
235
+ while (
236
+ item &&
237
+ item.tagName === 'IGC-TREE-ITEM' &&
238
+ this.contains(item)
239
+ ) {
240
+ if (!(item as ExpandableEl).expanded) {
241
+ (item as ExpandableEl).expanded = true;
241
242
  }
243
+ item = item.parentElement?.closest('igc-tree-item') ?? null;
242
244
  }
243
245
  }
244
246
  }
@@ -258,50 +260,3 @@ const nodes = headingsToTreeNodes(headings, tocConfig);
258
260
  });
259
261
  </script>
260
262
 
261
- <style>
262
- :global(:root) {
263
- --ig-toc-width: 24rem;
264
- }
265
-
266
- /* .toc-sidebar and .main-frame live in DocsLayout — use :global() */
267
- :global(.toc-sidebar) {
268
- display: none;
269
- }
270
-
271
- /* Hide the aside entirely when DocsToc has nothing to render */
272
- :global(.toc-sidebar:not(:has(docs-toc))) {
273
- display: none !important;
274
- }
275
-
276
- @media (min-width: 84rem) {
277
- :global(.toc-sidebar) {
278
- display: block;
279
- position: fixed;
280
- top: var(--sl-nav-height);
281
- right: 0;
282
- width: var(--ig-toc-width);
283
- height: calc(100vh - var(--sl-nav-height) - var(--sl-sidebar-bottom, 0px));
284
- overflow-y: auto;
285
- padding: 1.5rem 1rem 1.5rem 1.25rem;
286
- border-inline-start: 1px solid var(--sl-color-hairline-shade, #d0d0d0);
287
- }
288
-
289
- :global(.page:has(docs-toc) .main-frame) {
290
- padding-inline-end: var(--ig-toc-width);
291
- }
292
- }
293
-
294
- /* docs-toc layout — tree internals live in docs-tree.css */
295
- docs-toc {
296
- display: block;
297
- }
298
-
299
- docs-toc h2 {
300
- margin: 0 0 0.75rem;
301
- font-size: var(--sl-text-xs, 0.75rem);
302
- font-weight: 600;
303
- text-transform: uppercase;
304
- letter-spacing: 0.06em;
305
- color: var(--sl-color-gray-3, #888);
306
- }
307
- </style>
@@ -0,0 +1,33 @@
1
+ @use 'igniteui-theming/sass/typography' as *;
2
+
3
+ :root {
4
+ --ig-toc-width: #{rem(330px)};
5
+ }
6
+
7
+ .toc-sidebar {
8
+ display: block;
9
+ position: sticky;
10
+ top: var(--igd-header-height);
11
+ max-width: var(--ig-toc-width);
12
+ width: 100%;
13
+ min-width: rem(280px);
14
+ max-height: calc(100vh - var(--igd-header-height));
15
+ overflow-y: auto;
16
+ padding: rem(46px) rem(24px);
17
+ border-inline: var(--igd-app-outline);
18
+ border-block-end: var(--igd-app-outline);
19
+ background-color: var(--igd-layout-sections-bg);
20
+ }
21
+
22
+ .ig-typography {
23
+ .toc-sidebar__heading {
24
+ @include type-style('body-2') {
25
+ margin: 0;
26
+ };
27
+
28
+ color: var(--ig-gray-500);
29
+ padding-block-end: rem(8px);
30
+ padding-inline: rem(24px) 0;
31
+ text-transform: uppercase;
32
+ }
33
+ }
@@ -17,7 +17,7 @@
17
17
  */
18
18
  import type { TreeNode, TreeVariant } from './types';
19
19
  import DocsTreeItem from './DocsTreeItem.astro';
20
- import './docs-tree.css';
20
+ import './docs-tree.scss';
21
21
 
22
22
  interface Props {
23
23
  nodes: TreeNode[];
@@ -60,7 +60,21 @@ const { nodes, variant, activeId, toggleNodeOnClick, ariaLabel, renderLabel } =
60
60
  defineComponents,
61
61
  IgcTreeComponent,
62
62
  IgcTreeItemComponent,
63
+ IgcIconComponent,
63
64
  } from 'igniteui-webcomponents';
65
+ import '../../scripts/icon-registry';
64
66
 
65
- defineComponents(IgcTreeComponent, IgcTreeItemComponent);
67
+ defineComponents(IgcTreeComponent, IgcTreeItemComponent, IgcIconComponent);
68
+
69
+ function selectActiveTreeItem() {
70
+ customElements.whenDefined('igc-tree-item').then(() => {
71
+ document.querySelectorAll<IgcTreeItemComponent>('igc-tree-item').forEach((item) => {
72
+ const isActive = !!item.querySelector('a[aria-current="page"]');
73
+ item.selected = isActive;
74
+ });
75
+ });
76
+ }
77
+
78
+ selectActiveTreeItem();
79
+ document.addEventListener('astro:page-load', selectActiveTreeItem);
66
80
  </script>
@@ -51,19 +51,21 @@ if (node.itemData) {
51
51
  {...dataAttrs}
52
52
  >
53
53
  {node.href ? (
54
- <a
55
- slot="label"
56
- href={node.href}
57
- aria-current={isActive ? 'page' : undefined}
58
- class="docs-tree-link"
59
- {...node.linkAttrs}
60
- >
61
- {RenderLabel ? (
62
- <RenderLabel node={node} depth={depth} isLeaf={isLeaf} isActive={isActive} />
63
- ) : (
64
- <span class="docs-tree-label">{node.label}</span>
65
- )}
66
- </a>
54
+ <div slot="label">
55
+ <!-- The anchor is used only for navigation purpose it behave as an overlay on the ::part(wrapper) -->
56
+ <a
57
+ href={node.href}
58
+ aria-current={isActive ? 'page' : undefined}
59
+ class="docs-tree-link"
60
+ {...node.linkAttrs}
61
+ ></a>
62
+ {RenderLabel ? (
63
+ <RenderLabel node={node} depth={depth} isLeaf={isLeaf} isActive={isActive} />
64
+ ) : (
65
+ <span class="docs-tree-label">{node.label}</span>
66
+ )}
67
+ {hasChildren && <igc-icon name="chevron" collection="docs" class="tree-expand-icon"></igc-icon>}
68
+ </div>
67
69
  ) : (
68
70
  <div slot="label" class="docs-tree-group">
69
71
  {RenderLabel ? (
@@ -71,6 +73,7 @@ if (node.itemData) {
71
73
  ) : (
72
74
  <span class="docs-tree-label">{node.label}</span>
73
75
  )}
76
+ <igc-icon name="chevron" collection="docs" class="tree-expand-icon"></igc-icon>
74
77
  </div>
75
78
  )}
76
79
 
@@ -0,0 +1,185 @@
1
+ @use 'igniteui-theming/sass/typography' as *;
2
+
3
+ /*
4
+ * if we need to modify the toc or the sidebar in any way we can use:
5
+ * [data-variant="sidebar"]
6
+ * [data-variant="toc"]
7
+ *
8
+ * Designers tune values via the `--docs-tree-*` variables. Structural rules
9
+ * live below the variables; per-variant tweaks at the bottom.
10
+ *
11
+ * Layout rules that don't belong to the tree itself (sidebar-filter-igc,
12
+ * .sidebar-scroll, .toc-sidebar, docs-toc h2) stay in their owning component
13
+ * .astro files.
14
+ */
15
+
16
+ igc-tree {
17
+ --ig-tree-background: transparent;
18
+ --ig-size: 1;
19
+
20
+ position: relative;
21
+
22
+ &::before {
23
+ content: '';
24
+ position: absolute;
25
+ position-anchor: --selected-tree-item;
26
+ top: anchor(top);
27
+ height: anchor-size(height);
28
+ inset-inline-start: 0;
29
+ width: rem(1px);
30
+ background-color: var(--igd-accent);
31
+ transition: top 0.2s ease, height 0.2s ease;
32
+ display: none;
33
+ z-index: 1;
34
+ }
35
+
36
+ &::after {
37
+ content: '';
38
+ position: absolute;
39
+ width: rem(1px);
40
+ inset-inline-start: 0;
41
+ top: 0;
42
+ z-index: 0;
43
+ height: 100%;
44
+ background: light-dark(var(--ig-gray-200), var(--ig-gray-300));
45
+ }
46
+
47
+ &:has(igc-tree-item[selected])::before {
48
+ display: block;
49
+ }
50
+ }
51
+
52
+ /* Sidebar: only leaf items get selected, so item height = single row */
53
+ igc-tree[data-variant='sidebar'] igc-tree-item[selected] {
54
+ anchor-name: --selected-tree-item;
55
+ }
56
+
57
+ /* TOC: groups can be selected (h2 with h3 children); anchor to the label div
58
+ so height tracks only the row, not the expanded children below */
59
+ igc-tree[data-variant='toc'] igc-tree-item[selected] > [slot='label'] {
60
+ anchor-name: --selected-tree-item;
61
+ }
62
+
63
+ igc-tree-item {
64
+ --igc-tree-indentation-size: #{rem(20px)};
65
+
66
+ --background: transparent;
67
+ --foreground: light-dark(var(--ig-gray-600), var(--ig-gray-500));
68
+ --background-selected: transparent;
69
+ --background-active: transparent;
70
+ --foreground-active: var(--igd-accent);
71
+ --foreground-hover: var(--igd-accent);
72
+ --background-disabled: transparent;
73
+ --hover-color: transparent;
74
+ --hover-selected-color: transparent;
75
+ --background-active-selected: transparent;
76
+ --foreground-selected: var(--igd-accent);
77
+ --foreground-active-selected: var(--igd-accent);
78
+
79
+ a {
80
+ position: absolute;
81
+ inset: 0;
82
+ align-items: center;
83
+ color: inherit;
84
+ text-decoration: none;
85
+ width: 100%;
86
+ height: 100%;
87
+
88
+ &:focus {
89
+ outline: none;
90
+ }
91
+ }
92
+
93
+ cursor: default;
94
+
95
+ &:hover,
96
+ &:focus {
97
+ > a {
98
+ color: var(--igd-accent);
99
+ }
100
+ }
101
+ }
102
+
103
+ igc-tree-item::part(wrapper) {
104
+ @include type-style('body-2') {
105
+ margin-block: 0;
106
+ };
107
+ padding-inline-start: rem(24px);
108
+ padding-inline-end: rem(8px);
109
+ }
110
+
111
+ igc-tree-item::part(focused) {
112
+ box-shadow: none;
113
+ }
114
+
115
+ igc-tree-item::part(indicator) {
116
+ display: none;
117
+ }
118
+
119
+ igc-tree-item::part(label) {
120
+ width: 100%;
121
+ }
122
+
123
+ igc-tree-item[data-has-children] > [slot='label'] {
124
+ display: flex;
125
+ align-items: center;
126
+ width: 100%;
127
+ }
128
+
129
+ .tree-expand-icon {
130
+ margin-inline-start: auto;
131
+ flex-shrink: 0;
132
+ color: inherit;
133
+ transform: rotate(-90deg);
134
+ transition: transform 0.2s ease;
135
+ }
136
+
137
+ igc-tree-item[aria-expanded='true'] .tree-expand-icon {
138
+ transform: rotate(0deg);
139
+ color: var(--igd-accent);
140
+ }
141
+
142
+ igc-tree-item[data-has-children][data-depth='0'] {
143
+ --igc-tree-indentation-size: 0;
144
+ }
145
+
146
+ igc-tree-item[data-has-children] {
147
+ --foreground: light-dark(var(--ig-gray-900), var(--ig-gray-50));
148
+ --foreground-selected: light-dark(var(--ig-gray-900), var(--ig-gray-50));
149
+ --foreground-active-selected: light-dark(var(--ig-gray-900), var(--ig-gray-50));
150
+ --foreground-active: light-dark(var(--ig-gray-900), var(--ig-gray-50));
151
+ --foreground-hover: light-dark(var(--ig-gray-900), var(--ig-gray-50));
152
+ }
153
+
154
+ /* Hover accent applies to any linked item (leaf in sidebar, all items in TOC) */
155
+ .docs-tree-link:hover ~ .docs-tree-label {
156
+ color: var(--igd-accent);
157
+ }
158
+
159
+ igc-tree[data-variant='sidebar'] {
160
+ igc-tree-item[data-has-children] {
161
+ --foreground: light-dark(var(--ig-gray-900), var(--ig-gray-50));
162
+ --foreground-selected: light-dark(var(--ig-gray-900), var(--ig-gray-50));
163
+ --foreground-active-selected: light-dark(var(--ig-gray-900), var(--ig-gray-50));
164
+ --foreground-active: light-dark(var(--ig-gray-900), var(--ig-gray-50));
165
+ --foreground-hover: light-dark(var(--ig-gray-900), var(--ig-gray-50));
166
+ }
167
+ }
168
+
169
+ igc-tree[data-variant='toc'] {
170
+ /* No expand/collapse icons in the TOC — all items are links */
171
+ .tree-expand-icon {
172
+ display: none;
173
+ }
174
+ }
175
+
176
+ /* TOC variant — active link highlighted by scroll-spy via aria-current="true". */
177
+ igc-tree[data-variant='toc'] .docs-tree-link[aria-current='true'] {
178
+ color: var(--igd-accent);
179
+ }
180
+
181
+ /* Filter visibility — driven by <sidebar-filter>. */
182
+ // Removing this will break the filter in the sidebar
183
+ sidebar-filter[data-filtering] igc-tree[data-variant='sidebar'] igc-tree-item[data-path]:not([data-filter-match]) {
184
+ display: none;
185
+ }
@@ -39,7 +39,7 @@ const isIgPlatform = !isAppBuilder;
39
39
  // For IG platforms, fetch footer HTML directly (cached per locale per build).
40
40
  const igNav = isIgPlatform ? await fetchIgNav(resolvedLang) : null;
41
41
  ---
42
- <div class={styles.footer}>
42
+ <div class={styles.footer} data-igd-footer>
43
43
 
44
44
  {/* === IgniteUI / default Infragistics footer — fetched via fetchIgNav() === */}
45
45
  {
@@ -7,6 +7,7 @@
7
7
 
8
8
  .footer {
9
9
  --footer-bg: #f8f8f8;
10
+ grid-column: 1 / -1;
10
11
 
11
12
  // Element selector — not hashed by CSS Modules.
12
13
  footer {