igniteui-astro-components 0.0.1 → 0.0.3

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 (120) 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 +28 -58
  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/DocsSubHeader/DocsSubHeader.astro +60 -248
  83. package/src/components/DocsSubHeader/DocsSubHeader.scss +69 -0
  84. package/src/components/DocsSubHeader/README.md +6 -37
  85. package/src/components/DocsToc/DocsToc.astro +38 -83
  86. package/src/components/DocsToc/DocsToc.scss +33 -0
  87. package/src/components/DocsTree/DocsTree.astro +16 -2
  88. package/src/components/DocsTree/DocsTreeItem.astro +21 -16
  89. package/src/components/DocsTree/docs-tree.scss +185 -0
  90. package/src/components/GlobalFooter/GlobalFooter.astro +1 -1
  91. package/src/components/GlobalFooter/GlobalFooter.module.scss +1 -0
  92. package/src/components/GlobalNavBar/GlobalNavBar.module.scss +217 -196
  93. package/src/components/MobileSidebarToggle/MobileSidebarToggle.astro +2 -47
  94. package/src/components/MobileSidebarToggle/MobileSidebarToggle.scss +0 -0
  95. package/src/components/Search/Search.astro +14 -103
  96. package/src/components/Search/Search.scss +50 -0
  97. package/src/components/ThemingWidget/ThemingWidget.astro +1 -5
  98. package/src/components/ThemingWidget/ThemingWidget.scss +3 -0
  99. package/src/components/mdx/DocsAside/DocsAside.astro +15 -47
  100. package/src/components/mdx/DocsAside/DocsAside.scss +36 -0
  101. package/src/components/mdx/DocsAside/README.md +6 -6
  102. package/src/components/mdx/Sample/Sample.astro +1 -32
  103. package/src/components/mdx/Sample/Sample.scss +32 -0
  104. package/src/integration.ts +9 -0
  105. package/src/layouts/DocsLayout/DocsLayout.astro +88 -204
  106. package/src/layouts/DocsLayout/DocsLayout.scss +125 -0
  107. package/src/scripts/icon-registry.ts +57 -0
  108. package/src/styles/custom.scss +17 -251
  109. package/src/styles/global/_breakpoints.scss +48 -0
  110. package/src/styles/global/_code-blocks.scss +77 -0
  111. package/src/styles/global/_component-themes.scss +68 -0
  112. package/src/styles/global/_index.scss +9 -0
  113. package/src/styles/global/_markdown.scss +120 -0
  114. package/src/styles/global/_members.scss +85 -0
  115. package/src/styles/global/_palette.scss +131 -0
  116. package/src/styles/global/_type-scale.scss +182 -0
  117. package/src/styles/global/_variables.scss +71 -0
  118. package/src/styles/theme.scss +58 -0
  119. package/src/components/DocsTree/docs-tree.css +0 -227
  120. package/src/styles/ig-theme.scss +0 -43
@@ -24,6 +24,7 @@
24
24
 
25
25
  import { themeApiUrl } from 'virtual:docs-template/nav-html';
26
26
  import type { NavLang } from '../../platform.ts';
27
+ import './ThemingWidget.scss';
27
28
 
28
29
  interface Props {
29
30
  language?: NavLang;
@@ -145,8 +146,3 @@ const lang = language === 'jp' ? 'ja' : undefined;
145
146
  initThemingWidget();
146
147
  </script>
147
148
 
148
- <style>
149
- .theming-widget-container {
150
- display: block;
151
- }
152
- </style>
@@ -0,0 +1,3 @@
1
+ .theming-widget-container {
2
+ display: block;
3
+ }
@@ -1,14 +1,12 @@
1
1
  ---
2
- import noteIcon from './icons/note.svg?raw';
3
- import tipIcon from './icons/tip.svg?raw';
4
- import cautionIcon from './icons/caution.svg?raw';
5
- import dangerIcon from './icons/danger.svg?raw';
2
+ import './DocsAside.scss';
6
3
 
7
4
  interface Props {
8
- type?: 'note' | 'tip' | 'caution' | 'danger';
5
+ type?: 'note' | 'tip' | 'warning' | 'danger';
9
6
  title?: string;
10
7
  color?: string;
11
8
  class?: string;
9
+ /** Override icon name from the 'docs' collection. */
12
10
  icon?: string;
13
11
  }
14
12
 
@@ -17,15 +15,15 @@ const { type = 'note', title, color, icon, class: className } = Astro.props;
17
15
  const defaultLabels: Record<string, string> = {
18
16
  note: 'Note',
19
17
  tip: 'Tip',
20
- caution: 'Caution',
18
+ warning: 'Warning',
21
19
  danger: 'Danger',
22
20
  };
23
21
 
24
22
  const defaultIcons: Record<string, string> = {
25
- note: noteIcon,
26
- tip: tipIcon,
27
- caution: cautionIcon,
28
- danger: dangerIcon,
23
+ note: 'info',
24
+ tip: 'rocket',
25
+ warning: 'warning',
26
+ danger: 'warning',
29
27
  };
30
28
 
31
29
  const label = title ?? defaultLabels[type];
@@ -39,7 +37,7 @@ const inlineStyle = color ? `--aside-color: ${color};` : undefined;
39
37
  style={inlineStyle}
40
38
  >
41
39
  <p class="aside-title" aria-hidden="true">
42
- {resolvedIcon && <span class="aside-icon" aria-hidden="true" set:html={resolvedIcon} />}
40
+ {resolvedIcon && <igc-icon class="aside-icon" name={resolvedIcon} collection="docs" aria-hidden="true"></igc-icon>}
43
41
  {label}
44
42
  </p>
45
43
  <section class="aside-content">
@@ -47,40 +45,10 @@ const inlineStyle = color ? `--aside-color: ${color};` : undefined;
47
45
  </section>
48
46
  </aside>
49
47
 
50
- <style>
51
- .aside {
52
- --aside-color: hsl(234, 90%, 60%);
53
- border-inline-start: 0.25rem solid var(--aside-color);
54
- padding: 1rem 1.25rem;
55
- background-color: color-mix(in srgb, var(--aside-color) 8%, transparent);
56
- border-radius: 0 0.375rem 0.375rem 0;
57
- margin: 1.5rem 0;
58
- }
59
- .aside--note { --aside-color: hsl(234, 90%, 60%); }
60
- .aside--tip { --aside-color: hsl(134, 70%, 38%); }
61
- .aside--caution { --aside-color: hsl(40, 90%, 45%); }
62
- .aside--danger { --aside-color: hsl(0, 85%, 52%); }
48
+ <script>
49
+ import { defineComponents, IgcIconComponent } from 'igniteui-webcomponents';
50
+ import '../../../scripts/icon-registry';
51
+
52
+ defineComponents(IgcIconComponent);
53
+ </script>
63
54
 
64
- .aside-title {
65
- display: flex;
66
- align-items: center;
67
- gap: 0.4em;
68
- font-weight: 700;
69
- font-size: 1rem;
70
- text-transform: uppercase;
71
- letter-spacing: 0.06em;
72
- color: var(--aside-color);
73
- margin: 0 0 0.5rem;
74
- }
75
- .aside-icon {
76
- display: inline-flex;
77
- flex-shrink: 0;
78
- }
79
- .aside-icon :global(svg) {
80
- width: 1.4em;
81
- height: 1.4em;
82
- fill: currentColor;
83
- }
84
- .aside-content > :first-child { margin-top: 0; }
85
- .aside-content > :last-child { margin-bottom: 0; }
86
- </style>
@@ -0,0 +1,36 @@
1
+ .aside {
2
+ --aside-color: hsl(234, 90%, 60%);
3
+ border-inline-start: 0.25rem solid var(--aside-color);
4
+ padding: 1rem 1.25rem;
5
+ background-color: color-mix(in srgb, var(--aside-color) 8%, transparent);
6
+ border-radius: 0 0.375rem 0.375rem 0;
7
+ margin: 1.5rem 0;
8
+ }
9
+
10
+ .aside--note { --aside-color: hsl(234, 90%, 60%); }
11
+ .aside--tip { --aside-color: hsl(134, 70%, 38%); }
12
+ .aside--warning { --aside-color: hsl(40, 90%, 45%); }
13
+ .aside--danger { --aside-color: hsl(0, 85%, 52%); }
14
+
15
+ .aside-title {
16
+ display: flex;
17
+ align-items: center;
18
+ gap: 0.4em;
19
+ font-weight: 700;
20
+ font-size: 1rem;
21
+ text-transform: uppercase;
22
+ letter-spacing: 0.06em;
23
+ color: var(--aside-color);
24
+ margin: 0 0 0.5rem;
25
+ }
26
+
27
+ .aside-icon {
28
+ width: 1.4em;
29
+ aspect-ratio: 1;
30
+ flex-shrink: 0;
31
+ }
32
+
33
+ .aside-content {
34
+ > :first-child { margin-top: 0; }
35
+ > :last-child { margin-bottom: 0; }
36
+ }
@@ -1,6 +1,6 @@
1
1
  # DocsAside
2
2
 
3
- Renders a styled callout block (note, tip, caution, or danger) with a type-specific icon, color accent, and accessible label. Use it in MDX pages to surface important information inline.
3
+ Renders a styled callout block (note, tip, warning, or danger) with a type-specific icon, color accent, and accessible label. Use it in MDX pages to surface important information inline.
4
4
 
5
5
  ## Import
6
6
 
@@ -12,8 +12,8 @@ import DocsAside from 'igniteui-astro-components/components/mdx/DocsAside.astro'
12
12
 
13
13
  | Prop | Type | Default | Description |
14
14
  |------|------|---------|-------------|
15
- | `type` | `'note' \| 'tip' \| 'caution' \| 'danger'` | `'note'` | Semantic variant — controls the color accent and default icon. |
16
- | `title` | `string` | auto | Override the heading text. Defaults to the capitalised `type` name (`Note`, `Tip`, `Caution`, `Danger`). |
15
+ | `type` | `'note' \| 'tip' \| 'warning' \| 'danger'` | `'note'` | Semantic variant — controls the color accent and default icon. |
16
+ | `title` | `string` | auto | Override the heading text. Defaults to the capitalised `type` name (`Note`, `Tip`, `Warning`, `Danger`). |
17
17
  | `color` | `string` | — | Override the accent color via the `--aside-color` CSS custom property. Accepts any valid CSS color value. |
18
18
  | `icon` | `string` | auto | Override the icon with raw SVG markup. Pass an empty string `""` to suppress the icon entirely. |
19
19
  | `class` | `string` | — | Additional CSS class(es) to add to the `<aside>` element. |
@@ -31,8 +31,8 @@ import DocsAside from 'igniteui-astro-components/components/mdx/DocsAside.astro'
31
31
  Use keyboard shortcuts to speed up your workflow.
32
32
  </DocsAside>
33
33
 
34
- {/* Caution with custom title */}
35
- <DocsAside type="caution" title="Breaking change">
34
+ {/* Warning with custom title */}
35
+ <DocsAside type="warning" title="Breaking change">
36
36
  The `foo` prop was removed in v2. Use `bar` instead.
37
37
  </DocsAside>
38
38
 
@@ -58,7 +58,7 @@ import DocsAside from 'igniteui-astro-components/components/mdx/DocsAside.astro'
58
58
  |--------|-------------|---------------|
59
59
  | `note` | Blue | Note |
60
60
  | `tip` | Green | Tip |
61
- | `caution` | Amber | Caution |
61
+ | `warning` | Amber | Warning |
62
62
  | `danger` | Red | Danger |
63
63
 
64
64
  ## Icons
@@ -15,6 +15,7 @@
15
15
  * when a separate demosBaseUrl is present in the environment config.
16
16
  */
17
17
  import { getPlatformContext, getEnvVars } from '../../../lib/platform-context.ts';
18
+ import './Sample.scss';
18
19
 
19
20
  interface Props {
20
21
  src: string;
@@ -108,35 +109,3 @@ const exampleTabId = `${widgetId}-example`;
108
109
  </>
109
110
  )}
110
111
 
111
- <style>
112
- .full-screen-btn {
113
- display: inline-flex;
114
- align-items: center;
115
- font-size: 0.8rem;
116
- font-weight: 400;
117
- color: #fff;
118
- border: 0;
119
- text-transform: uppercase;
120
- padding: 0.5rem 1rem;
121
- margin: 1.5rem 0;
122
- outline-style: none;
123
- transition: all 0.25s ease-out;
124
- background: #0099ff;
125
- cursor: pointer;
126
- }
127
- .full-screen-btn:hover,
128
- .full-screen-btn:focus {
129
- color: white;
130
- box-shadow: 0 5px 5px -3px rgba(0,0,0,.26), 0 8px 10px 1px rgba(0,0,0,.12), 0 3px 14px 2px rgba(0,0,0,.08);
131
- }
132
- .full-screen-btn::before {
133
- content: "";
134
- display: inline-block;
135
- width: 1.75rem;
136
- height: 1.75rem;
137
- margin-right: 0.5rem;
138
- background-image: url("/images/general/fullscreen-white-18dp.svg");
139
- background-size: 100%;
140
- background-repeat: no-repeat;
141
- }
142
- </style>
@@ -0,0 +1,32 @@
1
+ .full-screen-btn {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ font-size: 0.8rem;
5
+ font-weight: 400;
6
+ color: #fff;
7
+ border: 0;
8
+ text-transform: uppercase;
9
+ padding: 0.5rem 1rem;
10
+ margin: 1.5rem 0;
11
+ outline-style: none;
12
+ transition: all 0.25s ease-out;
13
+ background: #0099ff;
14
+ cursor: pointer;
15
+
16
+ &:hover,
17
+ &:focus {
18
+ color: white;
19
+ box-shadow: 0 5px 5px -3px rgba(0,0,0,.26), 0 8px 10px 1px rgba(0,0,0,.12), 0 3px 14px 2px rgba(0,0,0,.08);
20
+ }
21
+
22
+ &::before {
23
+ content: "";
24
+ display: inline-block;
25
+ width: 1.75rem;
26
+ height: 1.75rem;
27
+ margin-right: 0.5rem;
28
+ background-image: url("/images/general/fullscreen-white-18dp.svg");
29
+ background-size: 100%;
30
+ background-repeat: no-repeat;
31
+ }
32
+ }
@@ -712,6 +712,15 @@ export interface CreateDocsSiteOptions {
712
712
  * All individual helpers (`buildSidebarFromToc`, `staticImagesIntegration`,
713
713
  * `siteMetaIntegration`) remain independently importable for cases that
714
714
  * need finer control.
715
+ *
716
+ * ### Fonts
717
+ *
718
+ * `DocsLayout` imports **Instrument Sans Variable** (UI text) and
719
+ * **JetBrains Mono Variable** (code) directly from the `@fontsource-variable`
720
+ * npm packages — no CDN request is made at runtime. The CSS custom properties
721
+ * `--font-sans` and `--font-mono` are defined in `theme.scss` so components
722
+ * and consumers can reference or override them.
723
+ *
715
724
  * @param options - Configuration options.
716
725
  */
717
726
  export function createDocsSite(options: CreateDocsSiteOptions = {} as CreateDocsSiteOptions): ReturnType<typeof defineConfig> {
@@ -1,20 +1,26 @@
1
1
  ---
2
2
  import { ClientRouter } from 'astro:transitions';
3
+ import '@fontsource-variable/instrument-sans/wght.css';
4
+ import '@fontsource-variable/instrument-sans/wght-italic.css';
5
+ import '@fontsource-variable/jetbrains-mono/wght.css';
6
+ import '@fontsource-variable/jetbrains-mono/wght-italic.css';
3
7
  import GlobalNavBar from '../../components/GlobalNavBar/GlobalNavBar.astro';
4
8
  import GlobalFooter from '../../components/GlobalFooter/GlobalFooter.astro';
5
9
  import DocsSubHeader from '../../components/DocsSubHeader/DocsSubHeader.astro';
10
+ import DocsBreadcrumb from '../../components/DocsBreadcrumb/DocsBreadcrumb.astro';
6
11
  import MobileSidebarToggle from '../../components/MobileSidebarToggle/MobileSidebarToggle.astro';
7
12
  import { widgetScriptSrc, platform as virtualPlatform } from 'virtual:docs-template/nav-html';
8
13
  import { title as siteTitle, headEntries } from 'virtual:docs-template/site-meta';
9
- import '../../styles/ig-theme.scss';
14
+ import '../../styles/theme.scss';
10
15
  import '../../styles/custom.scss';
16
+ import './DocsLayout.scss';
11
17
 
12
18
  export interface Props {
13
19
  title?: string;
14
20
  description?: string | null;
15
21
  keywords?: string | null;
16
22
  hasSidebar?: boolean;
17
- /** Slug of the current page; used to compute breadcrumbs in the subheader. */
23
+ /** Slug of the current page; used to compute breadcrumbs in DocsBreadcrumb. */
18
24
  currentSlug?: string;
19
25
  /**
20
26
  * Override the site name shown in the <title> and sub-header.
@@ -24,7 +30,7 @@ export interface Props {
24
30
  siteTitle?: string;
25
31
  }
26
32
 
27
- const { title, description, keywords, hasSidebar = true, currentSlug = '', siteTitle: siteTitleProp } = Astro.props;
33
+ const { title, description, keywords, hasToc = true, hasSidebar = true, currentSlug = '', siteTitle: siteTitleProp } = Astro.props;
28
34
  const resolvedSiteTitle = siteTitleProp ?? siteTitle;
29
35
  const navTheme = (virtualPlatform ?? import.meta.env.VITE_NAV_THEME ?? 'igniteui') as string;
30
36
  const showGlobalNav = navTheme !== 'none';
@@ -96,212 +102,90 @@ type HeadEntry = { tag: string; attrs?: Record<string, string | boolean | undefi
96
102
  updateNavHeight();
97
103
  var _navChild = document.querySelector('[data-astro-transition-persist="global-nav-bar"] > *:first-child');
98
104
  if (_navChild) new ResizeObserver(updateNavHeight).observe(_navChild);
105
+
106
+ // Clamp sidebar height so it never overlaps the footer.
107
+ // Uses the direct-child footer of .igd-page-layout to avoid matching
108
+ // any example/demo footers rendered inside page content (e.g. /nav-bar).
109
+ var _cleanupSidebarHeights;
110
+ function initSidebarHeights() {
111
+ if (_cleanupSidebarHeights) _cleanupSidebarHeights();
112
+ var footer = document.querySelector('.igd-page-layout > [data-igd-footer]');
113
+ if (!footer) return;
114
+ var sidebar = document.querySelector('.docs-sidebar');
115
+ if (!sidebar) return;
116
+ var rafId = 0;
117
+ function update() {
118
+ var footerTop = footer.getBoundingClientRect().top;
119
+ var sidebarTop = sidebar.getBoundingClientRect().top;
120
+ var maxH = Math.min(window.innerHeight - sidebarTop, footerTop - sidebarTop);
121
+ sidebar.style.maxHeight = Math.max(0, maxH) + 'px';
122
+ }
123
+ function schedule() {
124
+ if (rafId) return;
125
+ rafId = requestAnimationFrame(function() { update(); rafId = 0; });
126
+ }
127
+ window.addEventListener('scroll', schedule, { passive: true });
128
+ // ResizeObserver covers content-driven layout changes; the resize event
129
+ // covers viewport-only changes such as DevTools docking/undocking.
130
+ window.addEventListener('resize', schedule, { passive: true });
131
+ var ro = new ResizeObserver(schedule);
132
+ ro.observe(document.documentElement);
133
+ schedule();
134
+ _cleanupSidebarHeights = function() {
135
+ window.removeEventListener('scroll', schedule);
136
+ window.removeEventListener('resize', schedule);
137
+ ro.disconnect();
138
+ cancelAnimationFrame(rafId);
139
+ };
140
+ }
141
+ document.addEventListener('astro:page-load', initSidebarHeights);
142
+ initSidebarHeights();
99
143
  </script>
100
144
  </head>
101
145
  <body>
102
- {showGlobalNav && <GlobalNavBar />}
103
- <div style={`--docs-global-nav-height: ${showGlobalNav ? '4.7rem' : '0'}`} data-nav-height-wrapper>
104
- <DocsSubHeader pageTitle={title} currentSlug={currentSlug} siteTitle={siteTitleProp} />
105
- </div>
106
- <div class="page">
107
- {hasSidebar && (
108
- <nav class="sidebar print:hidden" aria-label="Documentation navigation">
109
- <MobileSidebarToggle />
110
- <div class="sidebar-pane">
111
- <div class="sidebar-content">
112
- <slot name="sidebar" />
113
- </div>
146
+ <!-- INFRAGISTICS HEADER/NAVIGATION -->
147
+ { showGlobalNav && <GlobalNavBar/> }
148
+
149
+ <!-- MAIN PAGE GRID LAYOUT -->
150
+ <!-- We don't set the CSS grid directly to the body -->
151
+ <!-- since it may lead to unexpected layout shift if element is dynamically added to the body-->
152
+
153
+ <!--
154
+ NOTE: In order not to override IG header and footer styles we are forced to put .ig-typography on
155
+ the .igd-page-layout not on the body.
156
+ Any igc component rendered dynamically on body level should have .ig-typography in order to have proper type styles.
157
+ -->
158
+ <div class="igd-page-layout ig-typography">
159
+ <!-- TODO: WE DONT NEED TO CALCULAtE THE IG HEADER HEIGHT ANYMORE - REMOVE IT -->
160
+ <DocsSubHeader style={ `--docs-global-nav-height: ${ showGlobalNav ? '4.7rem': '0' }` } data-nav-height-wrapper/>
161
+
162
+
163
+ { hasSidebar && (
164
+ <!--<MobileSidebarToggle/>-->
165
+ <slot name="sidebar"/>
166
+ ) }
167
+
168
+ <div class="igd-main-content">
169
+ <div class="igd-main-content__inner">
170
+ <div class="igd-main-content__page">
171
+ <main class="igd-main-content__markdown">
172
+ <DocsBreadcrumb pageTitle={ title } currentSlug={ currentSlug } siteTitle={ siteTitleProp }/>
173
+ <slot/>
174
+ </main>
175
+ </div>
176
+
177
+ { hasToc && (
178
+ <aside>
179
+ <slot name="toc"/>
180
+ </aside>
181
+ ) }
182
+ </div>
114
183
  </div>
115
- </nav>
116
- )}
117
- <div class="main-frame">
118
- <slot />
184
+
185
+ <!-- Footer is inside the grid so the sidebar's sticky containing block extends through it.
186
+ The JS initSidebarHeights() clamps sidebar max-height to prevent visual overlap. -->
187
+ <GlobalFooter/>
119
188
  </div>
120
- <aside class="toc-sidebar">
121
- <slot name="toc" />
122
- </aside>
123
- </div>
124
- <GlobalFooter />
125
189
  </body>
126
190
  </html>
127
191
 
128
- <style is:global>
129
- /* ── Design tokens — replaces Starlight's built-in CSS custom properties ── */
130
- :root {
131
- /* Sidebar */
132
- --sl-sidebar-width: 18.75rem;
133
- --sl-sidebar-pad-x: 1rem;
134
- --sl-content-inline-start: var(--sl-sidebar-width);
135
- /* Z-index */
136
- --sl-z-index-navbar: 10;
137
- --sl-z-index-menu: 9;
138
- /* Nav */
139
- --sl-nav-gap: 1rem;
140
- --sl-menu-button-size: 2rem;
141
- /* Typography */
142
- --sl-text-xs: 0.75rem;
143
- --sl-text-sm: 0.875rem;
144
- --sl-text-base: 1rem;
145
- --sl-text-lg: 1.125rem;
146
- --sl-text-xl: 1.25rem;
147
- --sl-text-2xl: 1.5rem;
148
- --sl-text-3xl: 1.875rem;
149
- --sl-text-4xl: 2.25rem;
150
- /* Light-mode colors */
151
- --sl-color-white: hsl(0, 0%, 100%);
152
- --sl-color-gray-1: hsl(240, 6%, 90%);
153
- --sl-color-gray-2: hsl(240, 5%, 74%);
154
- --sl-color-gray-3: hsl(240, 5%, 58%);
155
- --sl-color-gray-4: hsl(240, 4%, 46%);
156
- --sl-color-gray-5: hsl(240, 5%, 35%);
157
- --sl-color-gray-6: hsl(240, 10%, 26%);
158
- --sl-color-black: hsl(240, 16%, 11%);
159
- --sl-color-bg: hsl(0, 0%, 100%);
160
- --sl-color-bg-nav: hsl(0, 0%, 100%);
161
- --sl-color-bg-sidebar: hsl(224, 10%, 97%);
162
- --sl-color-bg-inline-code: hsl(219, 13%, 93%);
163
- --sl-color-hairline-light: hsl(240, 6%, 90%);
164
- --sl-color-hairline: hsl(240, 9%, 85%);
165
- --sl-color-hairline-shade: hsl(240, 6%, 78%);
166
- --sl-color-text: hsl(240, 16%, 11%);
167
- --sl-color-text-accent: hsl(234, 90%, 60%);
168
- --sl-color-accent: hsl(234, 90%, 60%);
169
- --sl-color-accent-low: hsl(234, 88%, 90%);
170
- --sl-color-accent-high: hsl(234, 90%, 45%);
171
- /* Shadows */
172
- --sl-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
173
- --sl-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
174
- --sl-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
175
- }
176
-
177
- *, *::before, *::after {
178
- box-sizing: border-box;
179
- }
180
-
181
- html {
182
- scroll-behavior: smooth;
183
- }
184
-
185
- body {
186
- margin: 0;
187
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
188
- font-size: var(--sl-text-base);
189
- color: var(--sl-color-text);
190
- background-color: var(--sl-color-bg);
191
- line-height: 1.625;
192
- }
193
-
194
- a {
195
- color: var(--sl-color-text-accent);
196
- text-decoration: none;
197
- }
198
- a:hover { text-decoration: underline; }
199
-
200
- /* ── Page shell ──────────────────────────────────────────────────────────── */
201
-
202
- .page {
203
- min-height: 100vh;
204
- padding-block-start: var(--sl-nav-height);
205
- }
206
-
207
- /* ── Sidebar ─────────────────────────────────────────────────────────────── */
208
-
209
- /*
210
- * Mobile: sidebar-pane is a fixed full-width overlay controlled by the
211
- * MobileSidebarToggle button (aria-expanded sibling + body attribute).
212
- * Desktop: sidebar-pane is a fixed left rail, always visible.
213
- */
214
-
215
- .sidebar-pane {
216
- visibility: var(--sl-sidebar-visibility, hidden);
217
- position: fixed;
218
- z-index: var(--sl-z-index-menu);
219
- inset-block: calc(var(--sl-nav-height) + var(--docs-mobile-toggle-height)) 0;
220
- inset-inline-start: 0;
221
- width: 100%;
222
- background-color: var(--sl-color-bg-sidebar);
223
- /* The inner .sidebar-scroll owns vertical scrolling so the filter input
224
- (rendered above it) stays pinned and always visible. */
225
- overflow: hidden;
226
- display: flex;
227
- flex-direction: column;
228
- }
229
-
230
- /* Show sidebar when the toggle button (preceding sibling) is expanded */
231
- [aria-expanded='true'] ~ .sidebar-pane {
232
- --sl-sidebar-visibility: visible;
233
- }
234
-
235
- .sidebar-content {
236
- flex: 1;
237
- min-height: 0;
238
- padding: 1rem var(--sl-sidebar-pad-x) 0;
239
- display: flex;
240
- flex-direction: column;
241
- gap: 1rem;
242
- }
243
-
244
- @media (min-width: 50rem) {
245
- .sidebar-content::after {
246
- content: '';
247
- padding-bottom: 1px;
248
- }
249
-
250
- .sidebar-pane {
251
- --sl-sidebar-visibility: visible;
252
- width: var(--sl-sidebar-width);
253
- background-color: var(--sl-color-bg-sidebar);
254
- border-inline-end: 1px solid var(--sl-color-hairline-shade);
255
- inset-block-start: var(--sl-nav-height);
256
- }
257
- }
258
-
259
- /* ── Main frame ──────────────────────────────────────────────────────────── */
260
-
261
- .main-frame {
262
- padding-block-start: var(--docs-mobile-toggle-height);
263
- }
264
-
265
- @media (min-width: 50rem) {
266
- .main-frame {
267
- padding-block-start: 0;
268
- padding-inline-start: var(--sl-content-inline-start, 0);
269
- }
270
- }
271
-
272
- /* ── Content prose ───────────────────────────────────────────────────────── */
273
-
274
- .sl-markdown-content {
275
- max-width: 50rem;
276
- margin: 0 auto;
277
- padding: 2rem 1.5rem;
278
- }
279
-
280
- .sl-markdown-content h1 { font-size: var(--sl-text-4xl); margin-block: 0 1rem; }
281
- .sl-markdown-content h2 { font-size: var(--sl-text-2xl); margin-block: 2rem 0.75rem; }
282
- .sl-markdown-content h3 { font-size: var(--sl-text-xl); margin-block: 1.5rem 0.5rem; }
283
- .sl-markdown-content p { margin-block: 0.75rem; }
284
- .sl-markdown-content pre {
285
- background: var(--sl-color-bg-sidebar);
286
- border: 1px solid var(--sl-color-hairline);
287
- border-radius: 0.375rem;
288
- padding: 1rem;
289
- overflow-x: auto;
290
- }
291
- .sl-markdown-content code {
292
- background: var(--sl-color-bg-inline-code);
293
- border-radius: 0.25rem;
294
- padding: 0.125rem 0.25rem;
295
- font-size: 0.875em;
296
- }
297
- .sl-markdown-content pre code {
298
- background: transparent;
299
- padding: 0;
300
- }
301
-
302
- /* ── Utility ─────────────────────────────────────────────────────────────── */
303
-
304
- @media print {
305
- .print\:hidden { display: none !important; }
306
- }
307
- </style>