igniteui-astro-components 0.0.2 → 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.
- package/README.md +21 -0
- package/package.json +3 -1
- package/src/assets/icons/angular-logo.svg +38 -0
- package/src/assets/icons/arrow-down.svg +3 -0
- package/src/assets/icons/arrow.svg +3 -0
- package/src/assets/icons/blazor-logo.svg +10 -0
- package/src/assets/icons/bullet-poiont.svg +3 -0
- package/src/assets/icons/chatGPT,.svg +4 -0
- package/src/assets/icons/check-circle.svg +3 -0
- package/src/assets/icons/check.svg +3 -0
- package/src/assets/icons/cheked.svg +3 -0
- package/src/assets/icons/chevron.svg +3 -0
- package/src/assets/icons/classes.svg +3 -0
- package/src/assets/icons/claude.svg +3 -0
- package/src/assets/icons/clear.svg +3 -0
- package/src/assets/icons/close.svg +3 -0
- package/src/assets/icons/code.svg +3 -0
- package/src/assets/icons/collapse.svg +5 -0
- package/src/assets/icons/command.svg +3 -0
- package/src/assets/icons/copy-clipboard.svg +3 -0
- package/src/assets/icons/copy.svg +3 -0
- package/src/assets/icons/crown.svg +3 -0
- package/src/assets/icons/dot.svg +3 -0
- package/src/assets/icons/download.svg +3 -0
- package/src/assets/icons/dropdown-indicator-bold.svg +3 -0
- package/src/assets/icons/dropdown-indicator.svg +3 -0
- package/src/assets/icons/enter-fullscreen.svg +3 -0
- package/src/assets/icons/enumerations.svg +3 -0
- package/src/assets/icons/exit-fullscreen.svg +3 -0
- package/src/assets/icons/expand-all.svg +5 -0
- package/src/assets/icons/expand-icon.svg +3 -0
- package/src/assets/icons/eye.svg +3 -0
- package/src/assets/icons/filter-clear.svg +1 -0
- package/src/assets/icons/filter.svg +3 -0
- package/src/assets/icons/functions.svg +5 -0
- package/src/assets/icons/github-logo.svg +3 -0
- package/src/assets/icons/hamburger-menu.svg +3 -0
- package/src/assets/icons/info.svg +3 -0
- package/src/assets/icons/interfaces.svg +3 -0
- package/src/assets/icons/link-blank.svg +3 -0
- package/src/assets/icons/link.svg +3 -0
- package/src/assets/icons/moon.svg +3 -0
- package/src/assets/icons/note.svg +3 -0
- package/src/assets/icons/open-link-blank.svg +3 -0
- package/src/assets/icons/page.svg +3 -0
- package/src/assets/icons/palette,.svg +3 -0
- package/src/assets/icons/pen.svg +3 -0
- package/src/assets/icons/play-circle.svg +10 -0
- package/src/assets/icons/premium.svg +3 -0
- package/src/assets/icons/react.svg +4 -0
- package/src/assets/icons/refresh.svg +3 -0
- package/src/assets/icons/rocket.svg +10 -0
- package/src/assets/icons/search.svg +10 -0
- package/src/assets/icons/shine.svg +3 -0
- package/src/assets/icons/show-more.svg +3 -0
- package/src/assets/icons/source-code.svg +3 -0
- package/src/assets/icons/start.svg +3 -0
- package/src/assets/icons/sub-directory-indicator.svg +3 -0
- package/src/assets/icons/sun.svg +3 -0
- package/src/assets/icons/system-theme.svg +3 -0
- package/src/assets/icons/system.svg +3 -0
- package/src/assets/icons/type-alias.svg +3 -0
- package/src/assets/icons/variables.svg +3 -0
- package/src/assets/icons/warning.svg +3 -0
- package/src/assets/icons/web-component-logo.svg +23 -0
- package/src/assets/icons/wrap-text.svg +3 -0
- package/src/assets/ig-logo.svg +33 -0
- package/src/assets/illustrations/classes.svg +3 -0
- package/src/assets/illustrations/enumerations.svg +3 -0
- package/src/assets/illustrations/functions.svg +5 -0
- package/src/assets/illustrations/interfaces.svg +3 -0
- package/src/assets/illustrations/type-alias.svg +3 -0
- package/src/assets/illustrations/variables.svg +3 -0
- package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +57 -0
- package/src/components/DocsBreadcrumb/DocsBreadcrumb.scss +51 -0
- package/src/components/DocsBreadcrumb/README.md +66 -0
- package/src/components/DocsSidebar/DocsSidebar.astro +28 -58
- package/src/components/DocsSidebar/DocsSidebar.scss +18 -0
- package/src/components/DocsSidebar/SidebarFilterInput.astro +22 -57
- package/src/components/DocsSidebar/SidebarFilterInput.scss +69 -0
- package/src/components/DocsSidebar/SidebarLabel.astro +2 -7
- package/src/components/DocsSubHeader/DocsSubHeader.astro +60 -248
- package/src/components/DocsSubHeader/DocsSubHeader.scss +69 -0
- package/src/components/DocsSubHeader/README.md +6 -37
- package/src/components/DocsToc/DocsToc.astro +38 -83
- package/src/components/DocsToc/DocsToc.scss +33 -0
- package/src/components/DocsTree/DocsTree.astro +16 -2
- package/src/components/DocsTree/DocsTreeItem.astro +16 -13
- package/src/components/DocsTree/docs-tree.scss +185 -0
- package/src/components/GlobalFooter/GlobalFooter.astro +1 -1
- package/src/components/GlobalFooter/GlobalFooter.module.scss +1 -0
- package/src/components/GlobalNavBar/GlobalNavBar.module.scss +217 -196
- package/src/components/MobileSidebarToggle/MobileSidebarToggle.astro +2 -47
- package/src/components/MobileSidebarToggle/MobileSidebarToggle.scss +0 -0
- package/src/components/Search/Search.astro +14 -103
- package/src/components/Search/Search.scss +50 -0
- package/src/components/ThemingWidget/ThemingWidget.astro +1 -5
- package/src/components/ThemingWidget/ThemingWidget.scss +3 -0
- package/src/components/mdx/DocsAside/DocsAside.astro +15 -47
- package/src/components/mdx/DocsAside/DocsAside.scss +36 -0
- package/src/components/mdx/DocsAside/README.md +6 -6
- package/src/components/mdx/Sample/Sample.astro +1 -32
- package/src/components/mdx/Sample/Sample.scss +32 -0
- package/src/integration.ts +9 -0
- package/src/layouts/DocsLayout/DocsLayout.astro +88 -244
- package/src/layouts/DocsLayout/DocsLayout.scss +125 -0
- package/src/scripts/icon-registry.ts +57 -0
- package/src/styles/custom.scss +17 -251
- package/src/styles/global/_breakpoints.scss +48 -0
- package/src/styles/global/_code-blocks.scss +77 -0
- package/src/styles/global/_component-themes.scss +68 -0
- package/src/styles/global/_index.scss +9 -0
- package/src/styles/global/_markdown.scss +120 -0
- package/src/styles/global/_members.scss +85 -0
- package/src/styles/global/_palette.scss +131 -0
- package/src/styles/global/_type-scale.scss +182 -0
- package/src/styles/global/_variables.scss +71 -0
- package/src/styles/theme.scss +58 -0
- package/src/components/DocsTree/docs-tree.css +0 -226
- 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>
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
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' | '
|
|
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
|
-
|
|
18
|
+
warning: 'Warning',
|
|
21
19
|
danger: 'Danger',
|
|
22
20
|
};
|
|
23
21
|
|
|
24
22
|
const defaultIcons: Record<string, string> = {
|
|
25
|
-
note:
|
|
26
|
-
tip:
|
|
27
|
-
|
|
28
|
-
danger:
|
|
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 && <
|
|
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
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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,
|
|
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' \| '
|
|
16
|
-
| `title` | `string` | auto | Override the heading text. Defaults to the capitalised `type` name (`Note`, `Tip`, `
|
|
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
|
-
{/*
|
|
35
|
-
<DocsAside type="
|
|
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
|
-
| `
|
|
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
|
+
}
|
package/src/integration.ts
CHANGED
|
@@ -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/
|
|
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
|
|
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,252 +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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
-
overflow-x: clip;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
a {
|
|
196
|
-
color: var(--sl-color-text-accent);
|
|
197
|
-
text-decoration: none;
|
|
198
|
-
}
|
|
199
|
-
a:hover { text-decoration: underline; }
|
|
200
|
-
|
|
201
|
-
/* ── Page shell ──────────────────────────────────────────────────────────── */
|
|
202
|
-
|
|
203
|
-
.page {
|
|
204
|
-
min-height: 100vh;
|
|
205
|
-
padding-block-start: var(--sl-nav-height);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/* ── Sidebar ─────────────────────────────────────────────────────────────── */
|
|
209
|
-
|
|
210
|
-
/*
|
|
211
|
-
* Mobile: sidebar-pane is a fixed full-width overlay controlled by the
|
|
212
|
-
* MobileSidebarToggle button (aria-expanded sibling + body attribute).
|
|
213
|
-
* Desktop: sidebar-pane is a fixed left rail, always visible.
|
|
214
|
-
*/
|
|
215
|
-
|
|
216
|
-
.sidebar-pane {
|
|
217
|
-
visibility: var(--sl-sidebar-visibility, hidden);
|
|
218
|
-
position: fixed;
|
|
219
|
-
z-index: var(--sl-z-index-menu);
|
|
220
|
-
inset-block: calc(var(--sl-nav-height) + var(--docs-mobile-toggle-height)) 0;
|
|
221
|
-
inset-inline-start: 0;
|
|
222
|
-
width: 100%;
|
|
223
|
-
background-color: var(--sl-color-bg-sidebar);
|
|
224
|
-
/* The inner .sidebar-scroll owns vertical scrolling so the filter input
|
|
225
|
-
(rendered above it) stays pinned and always visible. */
|
|
226
|
-
overflow: hidden;
|
|
227
|
-
display: flex;
|
|
228
|
-
flex-direction: column;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/* Show sidebar when the toggle button (preceding sibling) is expanded */
|
|
232
|
-
[aria-expanded='true'] ~ .sidebar-pane {
|
|
233
|
-
--sl-sidebar-visibility: visible;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.sidebar-content {
|
|
237
|
-
flex: 1;
|
|
238
|
-
min-height: 0;
|
|
239
|
-
padding: 1rem var(--sl-sidebar-pad-x) 0;
|
|
240
|
-
display: flex;
|
|
241
|
-
flex-direction: column;
|
|
242
|
-
gap: 1rem;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
@media (min-width: 50rem) {
|
|
246
|
-
.sidebar-content::after {
|
|
247
|
-
content: '';
|
|
248
|
-
padding-bottom: 1px;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.sidebar-pane {
|
|
252
|
-
--sl-sidebar-visibility: visible;
|
|
253
|
-
width: var(--sl-sidebar-width);
|
|
254
|
-
background-color: var(--sl-color-bg-sidebar);
|
|
255
|
-
border-inline-end: 1px solid var(--sl-color-hairline-shade);
|
|
256
|
-
inset-block-start: var(--sl-nav-height);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/* ── Main frame ──────────────────────────────────────────────────────────── */
|
|
261
|
-
|
|
262
|
-
.main-frame {
|
|
263
|
-
padding-block-start: var(--docs-mobile-toggle-height);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
@media (min-width: 50rem) {
|
|
267
|
-
.main-frame {
|
|
268
|
-
padding-block-start: 0;
|
|
269
|
-
padding-inline-start: var(--sl-content-inline-start, 0);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
/* ── Content prose ───────────────────────────────────────────────────────── */
|
|
274
|
-
|
|
275
|
-
.sl-markdown-content {
|
|
276
|
-
max-width: 50rem;
|
|
277
|
-
margin: 0 auto;
|
|
278
|
-
padding: 2rem 1.5rem;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.sl-markdown-content h1 { font-size: var(--sl-text-4xl); margin-block: 0 1rem; }
|
|
282
|
-
.sl-markdown-content h2 { font-size: var(--sl-text-2xl); margin-block: 2rem 0.75rem; }
|
|
283
|
-
.sl-markdown-content h3 { font-size: var(--sl-text-xl); margin-block: 1.5rem 0.5rem; }
|
|
284
|
-
.sl-markdown-content p { margin-block: 0.75rem; }
|
|
285
|
-
.sl-markdown-content pre {
|
|
286
|
-
background: var(--sl-color-bg-sidebar);
|
|
287
|
-
border: 1px solid var(--sl-color-hairline);
|
|
288
|
-
border-radius: 0.375rem;
|
|
289
|
-
padding: 1rem;
|
|
290
|
-
overflow-x: auto;
|
|
291
|
-
}
|
|
292
|
-
.sl-markdown-content code {
|
|
293
|
-
background: var(--sl-color-bg-inline-code);
|
|
294
|
-
border-radius: 0.25rem;
|
|
295
|
-
padding: 0.125rem 0.25rem;
|
|
296
|
-
font-size: 0.875em;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.sl-markdown-content :not(pre) > code {
|
|
300
|
-
white-space: pre-wrap;
|
|
301
|
-
overflow-wrap: anywhere;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
.sl-markdown-content pre code {
|
|
305
|
-
background: transparent;
|
|
306
|
-
padding: 0;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/* Responsive images */
|
|
310
|
-
.sl-markdown-content img {
|
|
311
|
-
max-width: 100%;
|
|
312
|
-
height: auto;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/* Responsive tables */
|
|
316
|
-
|
|
317
|
-
.sl-markdown-content table {
|
|
318
|
-
display: block;
|
|
319
|
-
overflow-x: auto;
|
|
320
|
-
border-collapse: collapse;
|
|
321
|
-
font-size: var(--sl-text-sm);
|
|
322
|
-
width: 100%;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
.sl-markdown-content th,
|
|
326
|
-
.sl-markdown-content td {
|
|
327
|
-
padding: 0.5rem 0.75rem;
|
|
328
|
-
border: 1px solid var(--sl-color-hairline);
|
|
329
|
-
text-align: start;
|
|
330
|
-
overflow-wrap: anywhere;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.sl-markdown-content thead th {
|
|
334
|
-
background-color: var(--sl-color-bg-sidebar);
|
|
335
|
-
font-weight: 600;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
.sl-markdown-content tbody tr:nth-child(even) {
|
|
339
|
-
background-color: var(--sl-color-bg-sidebar);
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/* ── Utility ─────────────────────────────────────────────────────────────── */
|
|
343
|
-
|
|
344
|
-
@media print {
|
|
345
|
-
.print\:hidden { display: none !important; }
|
|
346
|
-
}
|
|
347
|
-
</style>
|