igniteui-astro-components 0.0.26 → 0.0.28

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 (93) hide show
  1. package/README.md +82 -74
  2. package/package.json +16 -9
  3. package/src/components/CopyCode/CopyCode.astro +21 -7
  4. package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +33 -21
  5. package/src/components/DocsBreadcrumb/DocsBreadcrumb.scss +44 -43
  6. package/src/components/DocsBreadcrumb/README.md +10 -14
  7. package/src/components/DocsSidebar/DocsSidebar.astro +47 -45
  8. package/src/components/DocsSidebar/DocsSidebar.scss +120 -122
  9. package/src/components/DocsSidebar/README.md +25 -21
  10. package/src/components/DocsSidebar/SidebarFilterInput.astro +24 -29
  11. package/src/components/DocsSidebar/SidebarFilterInput.scss +90 -89
  12. package/src/components/DocsSidebar/SidebarLabel.astro +35 -26
  13. package/src/components/DocsSidebar/sidebar-filter.ts +93 -56
  14. package/src/components/DocsSubHeader/DocsSubHeader.astro +256 -185
  15. package/src/components/DocsSubHeader/DocsSubHeader.scss +181 -169
  16. package/src/components/DocsSubHeader/README.md +18 -16
  17. package/src/components/DocsToc/DocsToc.astro +301 -280
  18. package/src/components/DocsToc/DocsToc.scss +20 -21
  19. package/src/components/DocsToc/README.md +11 -9
  20. package/src/components/DocsToc/toTreeNodes.ts +3 -8
  21. package/src/components/DocsTree/DocsTree.astro +32 -20
  22. package/src/components/DocsTree/DocsTreeItem.astro +35 -30
  23. package/src/components/DocsTree/README.md +16 -15
  24. package/src/components/DocsTree/docs-tree.scss +267 -268
  25. package/src/components/GlobalFooter/GlobalFooter.astro +10 -10
  26. package/src/components/GlobalFooter/README.md +3 -2
  27. package/src/components/GlobalNavBar/GlobalNavBar.astro +4 -2
  28. package/src/components/GlobalNavBar/GlobalNavBar.module.scss +222 -222
  29. package/src/components/GlobalNavBar/README.md +3 -2
  30. package/src/components/LicenseIndicator/LicenseIndicator.astro +7 -5
  31. package/src/components/LicenseIndicator/LicenseIndicator.scss +3 -3
  32. package/src/components/MobileSidebarToggle/MobileSidebarToggle.astro +16 -17
  33. package/src/components/MobileSidebarToggle/README.md +3 -2
  34. package/src/components/MobileTocToggle/MobileTocToggle.astro +75 -61
  35. package/src/components/MobileTocToggle/MobileTocToggle.scss +65 -59
  36. package/src/components/Search/README.md +1 -0
  37. package/src/components/Search/Search.astro +137 -109
  38. package/src/components/Search/Search.scss +20 -20
  39. package/src/components/SearchAdvanced/README.md +21 -15
  40. package/src/components/SearchAdvanced/SearchAdvanced.astro +220 -133
  41. package/src/components/SearchAdvanced/SearchAdvanced.scss +152 -153
  42. package/src/components/mdx/ApiLink/ApiLink.astro +133 -113
  43. package/src/components/mdx/ApiLink/ApiLink.scss +9 -9
  44. package/src/components/mdx/ApiLink/README.md +26 -22
  45. package/src/components/mdx/ApiLink/api-link-index.ts +196 -173
  46. package/src/components/mdx/ApiRef/ApiRef.astro +54 -51
  47. package/src/components/mdx/ApiRef/README.md +20 -15
  48. package/src/components/mdx/Badge/Badge.astro +14 -14
  49. package/src/components/mdx/Badge/Badge.scss +61 -56
  50. package/src/components/mdx/Badge/README.md +24 -19
  51. package/src/components/mdx/DocsAside/DocsAside.astro +30 -37
  52. package/src/components/mdx/DocsAside/DocsAside.scss +82 -82
  53. package/src/components/mdx/DocsAside/README.md +22 -22
  54. package/src/components/mdx/Faq/Faq.astro +86 -0
  55. package/src/components/mdx/Faq/Faq.scss +105 -0
  56. package/src/components/mdx/Faq/FaqItem.astro +117 -0
  57. package/src/components/mdx/Faq/README.md +223 -0
  58. package/src/components/mdx/Faq/types.ts +34 -0
  59. package/src/components/mdx/PlatformBlock/PlatformBlock.astro +3 -2
  60. package/src/components/mdx/PlatformBlock/README.md +6 -8
  61. package/src/components/mdx/Sample/README.md +21 -16
  62. package/src/components/mdx/Sample/Sample.astro +97 -74
  63. package/src/components/mdx/Sample/Sample.scss +132 -132
  64. package/src/content-helper.ts +71 -72
  65. package/src/content.config.ts +1 -6
  66. package/src/integration.ts +566 -512
  67. package/src/layouts/DocsLayout/DocsLayout.astro +228 -182
  68. package/src/layouts/DocsLayout/DocsLayout.scss +261 -261
  69. package/src/layouts/DocsLayout/README.md +24 -35
  70. package/src/lib/nav-helpers.ts +88 -82
  71. package/src/lib/types.ts +76 -76
  72. package/src/llms.ts +205 -166
  73. package/src/platform.ts +312 -162
  74. package/src/plugins/rehype-heading-anchors.ts +45 -45
  75. package/src/plugins/rehype-pagefind-ignore.ts +19 -19
  76. package/src/plugins/rehype-table-wrapper.ts +30 -30
  77. package/src/plugins/remark-docfx.ts +12 -0
  78. package/src/plugins/remark-env-vars.ts +12 -4
  79. package/src/plugins/remark-md-links.ts +10 -4
  80. package/src/scripts/icon-manifest.ts +13 -5
  81. package/src/scripts/sample-widget.ts +557 -501
  82. package/src/sidebar.ts +103 -97
  83. package/src/styles/global/_code-blocks.scss +43 -44
  84. package/src/styles/global/_component-themes.scss +151 -153
  85. package/src/styles/global/_icon-gallery.scss +81 -81
  86. package/src/styles/global/_index.scss +0 -1
  87. package/src/styles/global/_markdown.scss +816 -787
  88. package/src/styles/global/_palette.scss +456 -110
  89. package/src/styles/global/_search-shared.scss +402 -398
  90. package/src/styles/global/_type-scale.scss +127 -127
  91. package/src/styles/global/_variables.scss +138 -111
  92. package/src/styles/theme.scss +49 -40
  93. package/src/virtual-modules.d.ts +11 -2
@@ -8,7 +8,6 @@ import DocsSubHeader from '../../components/DocsSubHeader/DocsSubHeader.astro';
8
8
  import DocsBreadcrumb from '../../components/DocsBreadcrumb/DocsBreadcrumb.astro';
9
9
  import LicenseIndicator from '../../components/LicenseIndicator/LicenseIndicator.astro';
10
10
  import igLogoRaw from '../../assets/ig-logo.svg?raw';
11
- import MobileSidebarToggle from '../../components/MobileSidebarToggle/MobileSidebarToggle.astro';
12
11
  import CopyCode from '../../components/CopyCode/CopyCode.astro';
13
12
  import { platform as virtualPlatform } from 'virtual:docs-template/nav-html';
14
13
  import { title as siteTitle, headEntries, navLang } from 'virtual:docs-template/site-meta';
@@ -53,179 +52,218 @@ export interface Props {
53
52
  themeStorageKey?: string;
54
53
  }
55
54
 
56
- const { title, description, keywords, hasToc = true, hasSidebar = true, currentSlug = '', siteTitle: siteTitleProp, license, is404 = false, packages, selectedPackage, packageLabel, versions, selectedVersion, versionLabel, showThemeToggle, themeStorageKey } = Astro.props;
55
+ const {
56
+ title,
57
+ description,
58
+ keywords,
59
+ hasToc = true,
60
+ hasSidebar = true,
61
+ currentSlug = '',
62
+ siteTitle: siteTitleProp,
63
+ license,
64
+ is404 = false,
65
+ packages,
66
+ selectedPackage,
67
+ packageLabel,
68
+ versions,
69
+ selectedVersion,
70
+ versionLabel,
71
+ showThemeToggle,
72
+ themeStorageKey,
73
+ } = Astro.props;
57
74
  const resolvedSiteTitle = siteTitleProp ?? siteTitle;
58
75
  const licenseType = license === 'commercial' ? 'premium' : license === 'MIT' ? 'opensource' : false;
59
76
  const navTheme = (virtualPlatform ?? import.meta.env.VITE_NAV_THEME ?? 'igniteui') as string;
60
77
  const showGlobalNav = navTheme !== 'none';
61
78
  const pageTitle = title ? `${title} | ${resolvedSiteTitle}` : resolvedSiteTitle;
62
79
 
63
- type HeadEntry = { tag: string; attrs?: Record<string, string | boolean | undefined>; content?: string };
80
+ type HeadEntry = {
81
+ tag: string;
82
+ attrs?: Record<string, string | boolean | undefined>;
83
+ content?: string;
84
+ };
64
85
  ---
65
86
 
66
- <!DOCTYPE html>
67
- <html lang="en" data-theme="light" style={!showGlobalNav ? '--docs-global-nav-height: 0' : undefined}>
68
- <head>
69
- <meta charset="UTF-8" />
70
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
71
- <title>{pageTitle}</title>
72
- {description && <meta name="description" content={description} />}
73
- {keywords && <meta name="keywords" content={keywords} />}
74
- <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
75
- <link rel="stylesheet" href="https://use.typekit.net/bng2zgw.css" />
76
- {(headEntries as HeadEntry[]).map(({ tag: Tag, attrs = {}, content }) =>
77
- content ? <Tag {...attrs} set:html={content} /> : <Tag {...attrs} />
78
- )}
79
- <slot name="head" />
80
- <ClientRouter />
81
- <script is:inline>
82
- // Restore persisted theme (or default to light) on load and after every View Transitions swap
83
- function applyStoredTheme() {
84
- var stored;
85
- try { stored = localStorage.getItem('docs-theme'); } catch (_) {}
86
- document.documentElement.setAttribute('data-theme', stored || 'light');
87
+ <!doctype html>
88
+ <html
89
+ lang="en"
90
+ data-theme="light"
91
+ style={!showGlobalNav ? '--docs-global-nav-height: 0' : undefined}
92
+ >
93
+ <head>
94
+ <meta charset="UTF-8" />
95
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
96
+ <title>{pageTitle}</title>
97
+ {description && <meta name="description" content={description} />}
98
+ {keywords && <meta name="keywords" content={keywords} />}
99
+ <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
100
+ <link rel="stylesheet" href="https://use.typekit.net/bng2zgw.css" />
101
+ {
102
+ (headEntries as HeadEntry[]).map(({ tag: Tag, attrs = {}, content }) =>
103
+ content ? <Tag {...attrs} set:html={content} /> : <Tag {...attrs} />,
104
+ )
87
105
  }
88
- applyStoredTheme();
89
- document.addEventListener('astro:after-swap', applyStoredTheme);
90
-
91
- // Enable smooth scrolling only after the page is fully loaded so the
92
- // browser's scroll-position restoration on refresh is instant (no visible
93
- // animated scroll). Remove it before a View Transition swap so navigation
94
- // between pages is also instant, then re-enable after the new page loads.
95
- document.addEventListener('astro:page-load', function () {
96
- document.documentElement.style.scrollBehavior = 'smooth';
97
- });
98
- document.addEventListener('astro:before-swap', function () {
99
- document.documentElement.style.removeProperty('scroll-behavior');
100
- });
101
-
102
- // Root cause: Sample.astro SSR-renders an <igc-tab selected>. During Astro's
103
- // client-side swap, <igc-tabs> connects and Lit runs firstUpdated() after
104
- // Astro's moveToLocation() has already called scrollTo(0,0), but before
105
- // astro:page-load. IgcTabsComponent then applies the selected tab and calls
106
- // scrollIntoView() for its tab header, which can move the page down to the
107
- // sample widget.
108
- //
109
- // Re-apply scroll-to-top on astro:page-load inside rAF, after Lit microtasks
110
- // and selected-tab scrollIntoView() have settled. Do not override hash
111
- // navigation, because hash fragments should keep their anchor behavior.
112
- document.addEventListener('astro:page-load', function () {
113
- if (!location.hash) {
114
- requestAnimationFrame(function () {
115
- if (!location.hash && window.scrollY > 0) {
116
- window.scrollTo({ top: 0, left: 0, behavior: 'instant' });
117
- }
118
- });
106
+ <slot name="head" />
107
+ <ClientRouter />
108
+ <script is:inline>
109
+ // Restore persisted theme (or default to light) on load and after every View Transitions swap
110
+ function applyStoredTheme() {
111
+ var stored;
112
+ try {
113
+ stored = localStorage.getItem('docs-theme');
114
+ } catch (_) {}
115
+ document.documentElement.setAttribute('data-theme', stored || 'light');
119
116
  }
120
- });
117
+ applyStoredTheme();
118
+ document.addEventListener('astro:after-swap', applyStoredTheme);
121
119
 
122
- // Preserve dynamically-injected <style> tags across View Transitions.
123
- // Only styles added by JS at runtime (e.g. the IG nav widget) need
124
- // preserving — Astro re-injects its own component styles on every page
125
- // automatically. Tagging the initial styles caused duplicates: the
126
- // preserved copy + the freshly-injected copy from the new page.
127
- var _styleIndex = 0;
128
- function tagStyle(style) {
129
- var isAstroStyle = Array.from(style.attributes).some(function (a) { return a.name.startsWith('data-astro'); });
130
- if (!isAstroStyle && !style.hasAttribute('data-vt-preserved')) {
131
- style.setAttribute('data-vt-preserved', String(++_styleIndex));
132
- }
133
- }
134
- new MutationObserver(function (mutations) {
135
- mutations.forEach(function (m) {
136
- m.addedNodes.forEach(function (node) {
137
- if (node instanceof HTMLStyleElement) tagStyle(node);
138
- });
120
+ // Enable smooth scrolling only after the page is fully loaded so the
121
+ // browser's scroll-position restoration on refresh is instant (no visible
122
+ // animated scroll). Remove it before a View Transition swap so navigation
123
+ // between pages is also instant, then re-enable after the new page loads.
124
+ document.addEventListener('astro:page-load', function () {
125
+ document.documentElement.style.scrollBehavior = 'smooth';
126
+ });
127
+ document.addEventListener('astro:before-swap', function () {
128
+ document.documentElement.style.removeProperty('scroll-behavior');
139
129
  });
140
- }).observe(document.head, { childList: true });
141
- document.addEventListener('astro:before-swap', function (e) {
142
- document.head.querySelectorAll('style[data-vt-preserved]').forEach(function (style) {
143
- var id = style.getAttribute('data-vt-preserved');
144
- if (!e.newDocument.head.querySelector('style[data-vt-preserved="' + id + '"]')) {
145
- e.newDocument.head.appendChild(style.cloneNode(true));
130
+
131
+ // Root cause: Sample.astro SSR-renders an <igc-tab selected>. During Astro's
132
+ // client-side swap, <igc-tabs> connects and Lit runs firstUpdated() after
133
+ // Astro's moveToLocation() has already called scrollTo(0,0), but before
134
+ // astro:page-load. IgcTabsComponent then applies the selected tab and calls
135
+ // scrollIntoView() for its tab header, which can move the page down to the
136
+ // sample widget.
137
+ //
138
+ // Re-apply scroll-to-top on astro:page-load inside rAF, after Lit microtasks
139
+ // and selected-tab scrollIntoView() have settled. Do not override hash
140
+ // navigation, because hash fragments should keep their anchor behavior.
141
+ document.addEventListener('astro:page-load', function () {
142
+ if (!location.hash) {
143
+ requestAnimationFrame(function () {
144
+ if (!location.hash && window.scrollY > 0) {
145
+ window.scrollTo({ top: 0, left: 0, behavior: 'instant' });
146
+ }
147
+ });
146
148
  }
147
149
  });
148
- });
149
150
 
150
- function updateNavHeight() {
151
- var navChild = document.querySelector('[data-astro-transition-persist="global-nav-bar"] > *:first-child');
152
- if (!navChild) return;
153
- var h = navChild.getBoundingClientRect().height;
154
- if (h > 0) {
155
- document.documentElement.style.setProperty('--docs-global-nav-height', h + 'px');
156
- var wrapper = document.querySelector('[data-nav-height-wrapper]');
157
- if (wrapper) wrapper.style.setProperty('--docs-global-nav-height', h + 'px');
151
+ // Preserve dynamically-injected <style> tags across View Transitions.
152
+ // Only styles added by JS at runtime (e.g. the IG nav widget) need
153
+ // preserving — Astro re-injects its own component styles on every page
154
+ // automatically. Tagging the initial styles caused duplicates: the
155
+ // preserved copy + the freshly-injected copy from the new page.
156
+ var _styleIndex = 0;
157
+ function tagStyle(style) {
158
+ var isAstroStyle = Array.from(style.attributes).some(function (a) {
159
+ return a.name.startsWith('data-astro');
160
+ });
161
+ if (!isAstroStyle && !style.hasAttribute('data-vt-preserved')) {
162
+ style.setAttribute('data-vt-preserved', String(++_styleIndex));
163
+ }
158
164
  }
159
- }
160
- document.addEventListener('astro:page-load', updateNavHeight);
161
- window.addEventListener('resize', updateNavHeight);
162
- updateNavHeight();
163
- var _navChild = document.querySelector('[data-astro-transition-persist="global-nav-bar"] > *:first-child');
164
- if (_navChild) new ResizeObserver(updateNavHeight).observe(_navChild);
165
+ new MutationObserver(function (mutations) {
166
+ mutations.forEach(function (m) {
167
+ m.addedNodes.forEach(function (node) {
168
+ if (node instanceof HTMLStyleElement) tagStyle(node);
169
+ });
170
+ });
171
+ }).observe(document.head, { childList: true });
172
+ document.addEventListener('astro:before-swap', function (e) {
173
+ document.head.querySelectorAll('style[data-vt-preserved]').forEach(function (style) {
174
+ var id = style.getAttribute('data-vt-preserved');
175
+ if (!e.newDocument.head.querySelector('style[data-vt-preserved="' + id + '"]')) {
176
+ e.newDocument.head.appendChild(style.cloneNode(true));
177
+ }
178
+ });
179
+ });
165
180
 
166
- // Clamp sidebar height so it never overlaps the footer.
167
- // Uses the direct-child footer of .igd-page-layout to avoid matching
168
- // any example/demo footers rendered inside page content (e.g. /nav-bar).
169
- var _cleanupSidebarHeights;
170
- function initSidebarHeights() {
171
- if (_cleanupSidebarHeights) _cleanupSidebarHeights();
172
- var footer = document.querySelector('.igd-page-layout > [data-igd-footer]');
173
- if (!footer) return;
174
- var sidebar = document.querySelector('.docs-sidebar');
175
- if (!sidebar) return;
176
- var rafId = 0;
177
- function update() {
178
- var sidebarTop = sidebar.getBoundingClientRect().top;
179
- var footerTop = footer.getBoundingClientRect().top;
180
- // Always clamp to viewport bottom; additionally clamp to footer
181
- // top when the footer is on screen.
182
- var maxH = Math.max(0, window.innerHeight - sidebarTop);
183
- if (footerTop < window.innerHeight) {
184
- maxH = Math.max(0, Math.min(maxH, footerTop - sidebarTop));
181
+ function updateNavHeight() {
182
+ var navChild = document.querySelector(
183
+ '[data-astro-transition-persist="global-nav-bar"] > *:first-child',
184
+ );
185
+ if (!navChild) return;
186
+ var h = navChild.getBoundingClientRect().height;
187
+ if (h > 0) {
188
+ document.documentElement.style.setProperty('--docs-global-nav-height', h + 'px');
189
+ var wrapper = document.querySelector('[data-nav-height-wrapper]');
190
+ if (wrapper) wrapper.style.setProperty('--docs-global-nav-height', h + 'px');
185
191
  }
186
- var next = maxH + 'px';
187
- if (sidebar.style.maxHeight !== next) sidebar.style.maxHeight = next;
188
- }
189
- function schedule() {
190
- if (rafId) return;
191
- rafId = requestAnimationFrame(function() { update(); rafId = 0; });
192
192
  }
193
- window.addEventListener('scroll', schedule, { passive: true });
194
- // ResizeObserver covers content-driven layout changes; the resize event
195
- // covers viewport-only changes such as DevTools docking/undocking.
196
- window.addEventListener('resize', schedule, { passive: true });
197
- var ro = new ResizeObserver(schedule);
198
- ro.observe(footer);
199
- update();
200
- _cleanupSidebarHeights = function() {
201
- window.removeEventListener('scroll', schedule);
202
- window.removeEventListener('resize', schedule);
203
- ro.disconnect();
204
- cancelAnimationFrame(rafId);
205
- };
206
- }
207
- document.addEventListener('astro:page-load', initSidebarHeights);
208
- initSidebarHeights();
193
+ document.addEventListener('astro:page-load', updateNavHeight);
194
+ window.addEventListener('resize', updateNavHeight);
195
+ updateNavHeight();
196
+ var _navChild = document.querySelector(
197
+ '[data-astro-transition-persist="global-nav-bar"] > *:first-child',
198
+ );
199
+ if (_navChild) new ResizeObserver(updateNavHeight).observe(_navChild);
209
200
 
210
- // Toggle data-scrolled-y / data-scrolled-x on each .igd-table-wrapper
211
- // so the sticky header/column can show a double border while scrolled.
212
- function initTableScrollStates() {
213
- document.querySelectorAll('.igd-table-wrapper').forEach(function(wrapper) {
201
+ // Clamp sidebar height so it never overlaps the footer.
202
+ // Uses the direct-child footer of .igd-page-layout to avoid matching
203
+ // any example/demo footers rendered inside page content (e.g. /nav-bar).
204
+ var _cleanupSidebarHeights;
205
+ function initSidebarHeights() {
206
+ if (_cleanupSidebarHeights) _cleanupSidebarHeights();
207
+ var footer = document.querySelector('.igd-page-layout > [data-igd-footer]');
208
+ if (!footer) return;
209
+ var sidebar = document.querySelector('.docs-sidebar');
210
+ if (!sidebar) return;
211
+ var rafId = 0;
214
212
  function update() {
215
- wrapper.toggleAttribute('data-scrolled-y', wrapper.scrollTop > 0);
216
- wrapper.toggleAttribute('data-scrolled-x', wrapper.scrollLeft > 0);
213
+ var sidebarTop = sidebar.getBoundingClientRect().top;
214
+ var footerTop = footer.getBoundingClientRect().top;
215
+ // Always clamp to viewport bottom; additionally clamp to footer
216
+ // top when the footer is on screen.
217
+ var maxH = Math.max(0, window.innerHeight - sidebarTop);
218
+ if (footerTop < window.innerHeight) {
219
+ maxH = Math.max(0, Math.min(maxH, footerTop - sidebarTop));
220
+ }
221
+ var next = maxH + 'px';
222
+ if (sidebar.style.maxHeight !== next) sidebar.style.maxHeight = next;
217
223
  }
218
- wrapper.addEventListener('scroll', update, { passive: true });
224
+ function schedule() {
225
+ if (rafId) return;
226
+ rafId = requestAnimationFrame(function () {
227
+ update();
228
+ rafId = 0;
229
+ });
230
+ }
231
+ window.addEventListener('scroll', schedule, { passive: true });
232
+ // ResizeObserver covers content-driven layout changes; the resize event
233
+ // covers viewport-only changes such as DevTools docking/undocking.
234
+ window.addEventListener('resize', schedule, { passive: true });
235
+ var ro = new ResizeObserver(schedule);
236
+ ro.observe(footer);
219
237
  update();
220
- });
221
- }
222
- document.addEventListener('astro:page-load', initTableScrollStates);
223
- initTableScrollStates();
224
- </script>
225
- </head>
226
- <body>
238
+ _cleanupSidebarHeights = function () {
239
+ window.removeEventListener('scroll', schedule);
240
+ window.removeEventListener('resize', schedule);
241
+ ro.disconnect();
242
+ cancelAnimationFrame(rafId);
243
+ };
244
+ }
245
+ document.addEventListener('astro:page-load', initSidebarHeights);
246
+ initSidebarHeights();
247
+
248
+ // Toggle data-scrolled-y / data-scrolled-x on each .igd-table-wrapper
249
+ // so the sticky header/column can show a double border while scrolled.
250
+ function initTableScrollStates() {
251
+ document.querySelectorAll('.igd-table-wrapper').forEach(function (wrapper) {
252
+ function update() {
253
+ wrapper.toggleAttribute('data-scrolled-y', wrapper.scrollTop > 0);
254
+ wrapper.toggleAttribute('data-scrolled-x', wrapper.scrollLeft > 0);
255
+ }
256
+ wrapper.addEventListener('scroll', update, { passive: true });
257
+ update();
258
+ });
259
+ }
260
+ document.addEventListener('astro:page-load', initTableScrollStates);
261
+ initTableScrollStates();
262
+ </script>
263
+ </head>
264
+ <body>
227
265
  <!-- INFRAGISTICS HEADER/NAVIGATION -->
228
- { showGlobalNav && <GlobalNavBar lang={navLang}/> }
266
+ {showGlobalNav && <GlobalNavBar lang={navLang} />}
229
267
 
230
268
  <!-- MAIN PAGE GRID LAYOUT -->
231
269
  <!-- We don't set the CSS grid directly to the body -->
@@ -237,45 +275,53 @@ type HeadEntry = { tag: string; attrs?: Record<string, string | boolean | undefi
237
275
  Any igc component rendered dynamically on body level should have .ig-typography in order to have proper type styles.
238
276
  -->
239
277
  <div class={`igd-page-layout${is404 ? ' igd-page-layout--404' : ''}`}>
240
- <!-- TODO: WE DONT NEED TO CALCULAtE THE IG HEADER HEIGHT ANYMORE - REMOVE IT -->
241
- <!-- <DocsSubHeader style={ `--docs-global-nav-height: ${ showGlobalNav ? '4.7rem': '0' }` } data-nav-height-wrapper/> -->
242
- <slot name="subheader">
243
- <DocsSubHeader pageTitle={title} currentSlug={currentSlug} siteTitle={siteTitleProp} packages={packages} selectedPackage={selectedPackage} packageLabel={packageLabel} versions={versions} selectedVersion={selectedVersion} versionLabel={versionLabel} showThemeToggle={showThemeToggle} themeStorageKey={themeStorageKey} />
244
- </slot>
278
+ <!-- TODO: WE DONT NEED TO CALCULAtE THE IG HEADER HEIGHT ANYMORE - REMOVE IT -->
279
+ <!-- <DocsSubHeader style={ `--docs-global-nav-height: ${ showGlobalNav ? '4.7rem': '0' }` } data-nav-height-wrapper/> -->
280
+ <slot name="subheader">
281
+ <DocsSubHeader
282
+ pageTitle={title}
283
+ currentSlug={currentSlug}
284
+ siteTitle={siteTitleProp}
285
+ packages={packages}
286
+ selectedPackage={selectedPackage}
287
+ packageLabel={packageLabel}
288
+ versions={versions}
289
+ selectedVersion={selectedVersion}
290
+ versionLabel={versionLabel}
291
+ showThemeToggle={showThemeToggle}
292
+ themeStorageKey={themeStorageKey}
293
+ />
294
+ </slot>
245
295
 
296
+ {hasSidebar && <slot name="sidebar" />}
246
297
 
247
- { hasSidebar && (
248
- <!--<MobileSidebarToggle/>-->
249
- <slot name="sidebar"/>
250
- ) }
298
+ <!-- Mobile TOC trigger row — only visible on mobile, provided by the page -->
299
+ <slot name="mobile-toc" />
251
300
 
252
- <!-- Mobile TOC trigger row — only visible on mobile, provided by the page -->
253
- <slot name="mobile-toc" />
301
+ <div class="igd-main-content">
302
+ <div class="igd-main-content__inner">
303
+ <div class="igd-main-content__page">
304
+ <main class="igd-main-content__markdown" data-pagefind-body>
305
+ <Fragment set:html={igLogoRaw} />
306
+ <LicenseIndicator license={licenseType} />
307
+ <DocsBreadcrumb
308
+ pageTitle={title}
309
+ currentSlug={currentSlug}
310
+ siteTitle={siteTitleProp}
311
+ />
312
+ <slot />
313
+ </main>
314
+ </div>
254
315
 
255
- <div class="igd-main-content">
256
- <div class="igd-main-content__inner">
257
-
258
- <div class="igd-main-content__page">
259
- <main class="igd-main-content__markdown" data-pagefind-body>
260
- <Fragment set:html={igLogoRaw} />
261
- <LicenseIndicator license={licenseType} />
262
- <DocsBreadcrumb pageTitle={ title } currentSlug={ currentSlug } siteTitle={ siteTitleProp }/>
263
- <slot/>
264
- </main>
265
- </div>
266
-
267
- { hasToc && (
268
- <slot name="toc"/>
269
- ) }
270
- </div>
316
+ {hasToc && <slot name="toc" />}
271
317
  </div>
318
+ </div>
272
319
 
273
- <CopyCode />
320
+ <CopyCode />
274
321
 
275
- <!-- Footer is inside the grid so the sidebar's sticky containing block extends through it.
322
+ <!-- Footer is inside the grid so the sidebar's sticky containing block extends through it.
276
323
  The JS initSidebarHeights() clamps sidebar max-height to prevent visual overlap. -->
277
- <GlobalFooter lang={navLang}/>
324
+ <GlobalFooter lang={navLang} />
278
325
  </div>
279
- </body>
326
+ </body>
280
327
  </html>
281
-