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.
- 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 +38 -61
- 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/DocsSidebar/toTreeNodes.ts +17 -5
- 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 +20 -8
- 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/virtual-modules.d.ts +2 -0
- package/src/components/DocsTree/docs-tree.css +0 -226
- package/src/styles/ig-theme.scss +0 -43
|
@@ -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>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
@use '../../styles/global/breakpoints' as *;
|
|
2
|
+
@use 'igniteui-theming/sass/typography/functions' as *;
|
|
3
|
+
|
|
4
|
+
.igd-page-layout {
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-template-columns: var(--igd-page-layout-grid);
|
|
7
|
+
background: var(--igd-app-bg);
|
|
8
|
+
color: var(--igd-on-app-bg);
|
|
9
|
+
margin: 0;
|
|
10
|
+
z-index: 0;
|
|
11
|
+
|
|
12
|
+
@media (min-width: #{$bp-tablet-min}) {
|
|
13
|
+
justify-content: center;
|
|
14
|
+
padding-inline: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@media (max-width: #{$bp-mobile-horizontal-max}) {
|
|
18
|
+
padding-inline: rem(32px);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:not(:has(.igd-right-sidebar)) {
|
|
22
|
+
.igd-main-pane {
|
|
23
|
+
> main {
|
|
24
|
+
margin: 0
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.igd-main-content {
|
|
31
|
+
display: grid;
|
|
32
|
+
padding-inline: rem(32px);
|
|
33
|
+
position: relative;
|
|
34
|
+
|
|
35
|
+
@media (min-width: #{$bp-tablet-min}) {
|
|
36
|
+
padding-inline: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (max-width: #{$bp-mobile-horizontal-max}) {
|
|
40
|
+
padding-inline: rem(32px);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:not(:has(.igd-right-sidebar)) {
|
|
44
|
+
.igd-main-pane {
|
|
45
|
+
> main {
|
|
46
|
+
margin: 0
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// ── Static square grid background ────────────────────────────────────────────
|
|
52
|
+
// Pure CSS: two repeating-linear-gradients intersected via mask-composite
|
|
53
|
+
// create 4×4px squares at a 35px grid pitch.
|
|
54
|
+
// A radial vignette mask (3rd layer) fades them toward the edges.
|
|
55
|
+
&::before {
|
|
56
|
+
content: '';
|
|
57
|
+
position: absolute;
|
|
58
|
+
inset: 0;
|
|
59
|
+
inset-block-start: 0;
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
user-select: none;
|
|
62
|
+
z-index: 0;
|
|
63
|
+
|
|
64
|
+
$pitch: 35px;
|
|
65
|
+
$sq: 3px;
|
|
66
|
+
$pad: 15.5px;
|
|
67
|
+
|
|
68
|
+
background-color: light-dark(var(--ig-gray-500), var(--igd-accent));
|
|
69
|
+
|
|
70
|
+
// Three mask layers, all intersected:
|
|
71
|
+
// vignette ∩ horizontal-strips ∩ vertical-strips → squares that fade at the edges
|
|
72
|
+
mask-image:
|
|
73
|
+
// 1. Vignette — opaque center, transparent at edges
|
|
74
|
+
radial-gradient(ellipse 80% 80% at 50% 40%, black 40%, transparent 100%),
|
|
75
|
+
// 2. Horizontal 4px bands at 35px pitch (repeating-linear 0deg = top-to-bottom)
|
|
76
|
+
repeating-linear-gradient(0deg,
|
|
77
|
+
transparent 0, transparent #{$pad},
|
|
78
|
+
black #{$pad}, black #{$pad + $sq},
|
|
79
|
+
transparent #{$pad + $sq}, transparent #{$pitch}
|
|
80
|
+
),
|
|
81
|
+
// 3. Vertical 4px bands at 35px pitch (repeating-linear 90deg = left-to-right)
|
|
82
|
+
repeating-linear-gradient(90deg,
|
|
83
|
+
transparent 0, transparent #{$pad},
|
|
84
|
+
black #{$pad}, black #{$pad + $sq},
|
|
85
|
+
transparent #{$pad + $sq}, transparent #{$pitch}
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
mask-size: 100% 100%, #{$pitch} #{$pitch}, #{$pitch} #{$pitch};
|
|
89
|
+
mask-composite: intersect, intersect;
|
|
90
|
+
-webkit-mask-composite: source-in, source-in;
|
|
91
|
+
|
|
92
|
+
opacity: .5;
|
|
93
|
+
|
|
94
|
+
@media (max-width: #{$bp-mobile-max}) {
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.igd-main-content__page {
|
|
101
|
+
display: grid;
|
|
102
|
+
gap: var(--ig-padding);
|
|
103
|
+
background-color: var(--igd-layout-sections-bg);
|
|
104
|
+
border-inline: var(--igd-app-outline);
|
|
105
|
+
width: clamp(rem(300px), 100%, rem(940px));
|
|
106
|
+
margin-inline-start: auto;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.igd-main-content__inner {
|
|
110
|
+
display: flex;
|
|
111
|
+
gap: rem(70px);
|
|
112
|
+
padding-inline: rem(70px) rem(32px);
|
|
113
|
+
position: relative;
|
|
114
|
+
|
|
115
|
+
aside {
|
|
116
|
+
margin-inline-end: auto;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.content {
|
|
121
|
+
max-width: 60rem;
|
|
122
|
+
margin: 0 auto;
|
|
123
|
+
padding-inline: var(--igd-page-padding);
|
|
124
|
+
padding-block-end: var(--igd-page-padding);
|
|
125
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon Registry
|
|
3
|
+
*
|
|
4
|
+
* All .svg files in /assets/icons are registered automatically.
|
|
5
|
+
* The icon name is derived from the filename: strip the .svg extension
|
|
6
|
+
* and apply a small set of legacy aliases for names already used in markup.
|
|
7
|
+
*
|
|
8
|
+
* Usage in markup:
|
|
9
|
+
* <igc-icon name="link" collection="docs"></igc-icon>
|
|
10
|
+
*
|
|
11
|
+
* To add a new icon: drop the .svg file into src/assets/icons/ — that's it.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { registerIconFromText } from 'igniteui-webcomponents';
|
|
15
|
+
|
|
16
|
+
export const DOCS_COLLECTION = 'docs';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Legacy aliases: maps the icon name used in markup → actual filename stem.
|
|
20
|
+
* Only needed when the desired name differs from the filename (minus .svg).
|
|
21
|
+
*/
|
|
22
|
+
const ALIASES: Record<string, string> = {
|
|
23
|
+
'expand': 'expand-icon',
|
|
24
|
+
'react-logo': 'react',
|
|
25
|
+
'wc-logo': 'web-component-logo',
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// Vite glob — imports raw SVG content at build time (preferred over URL fetching).
|
|
29
|
+
// Relative path so this works regardless of the consuming project's root.
|
|
30
|
+
const svgModules = import.meta.glob('../assets/icons/*.svg', { query: '?raw', import: 'default', eager: true }) as Record<string, string>;
|
|
31
|
+
|
|
32
|
+
export function registerIcons(): void {
|
|
33
|
+
// Build a stem → svg content map from the glob results
|
|
34
|
+
const stemToSvg = new Map<string, string>();
|
|
35
|
+
for (const [path, svg] of Object.entries(svgModules)) {
|
|
36
|
+
const stem = path.split('/').pop()!.replace(/\.svg$/, '');
|
|
37
|
+
stemToSvg.set(stem, svg);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Register each icon: prefer alias name, fall back to stem as the icon name
|
|
41
|
+
const registered = new Set<string>();
|
|
42
|
+
for (const [alias, stem] of Object.entries(ALIASES)) {
|
|
43
|
+
if (stemToSvg.has(stem)) {
|
|
44
|
+
registerIconFromText(alias, stemToSvg.get(stem)!, DOCS_COLLECTION);
|
|
45
|
+
registered.add(stem);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// Register remaining icons using their filename stem as the name
|
|
49
|
+
for (const [stem, svg] of stemToSvg) {
|
|
50
|
+
if (!registered.has(stem)) {
|
|
51
|
+
registerIconFromText(stem, svg, DOCS_COLLECTION);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Auto-register on import.
|
|
57
|
+
registerIcons();
|