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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="-3 -3 28 24" fill="none">
|
|
2
|
+
<g clip-path="url(#clip0_2580_596)">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M21.9454 8.98642L19.5677 12.9819L16.2336 8.93188L19.5677 4.99097L21.9454 8.98642Z" fill="#166DA5"/>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.3081 13.6637L15.687 9.34094L13.5143 12.9682L16.8895 17.8909L19.3081 13.6637Z" fill="#8FDB69"/>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.2671 4.28177L15.687 8.61813L13.5143 4.99086L16.8895 0.122681L19.2671 4.28177Z" fill="#166DA5"/>
|
|
6
|
+
<path opacity="0.95" fill-rule="evenodd" clip-rule="evenodd" d="M8.34912 4.28182H19.2671L16.8622 0.095459H10.7541L8.34912 4.28182ZM15.687 8.63182H21.7268L19.5541 4.97728H13.5007" fill="url(#paint0_linear_2580_596)"/>
|
|
7
|
+
<path opacity="0.95" fill-rule="evenodd" clip-rule="evenodd" d="M19.3081 13.6773H8.33545L10.7404 17.8364H16.8895L19.3081 13.6773ZM15.687 9.32727H21.7268L19.5541 12.9818H13.5007" fill="url(#paint1_linear_2580_596)"/>
|
|
8
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7404 17.8364L5.60251 8.97277L10.8087 0.109131H5.17891L0.0546875 8.97277L5.17891 17.8364H10.7404Z" fill="#363636"/>
|
|
9
|
+
</g>
|
|
10
|
+
<defs>
|
|
11
|
+
<linearGradient id="paint0_linear_2580_596" x1="8.34912" y1="4.36364" x2="21.7268" y2="4.36364" gradientUnits="userSpaceOnUse">
|
|
12
|
+
<stop stop-color="#2A3B8F"/>
|
|
13
|
+
<stop offset="1" stop-color="#29ABE2"/>
|
|
14
|
+
</linearGradient>
|
|
15
|
+
<linearGradient id="paint1_linear_2580_596" x1="21.7268" y1="13.5818" x2="8.33545" y2="13.5818" gradientUnits="userSpaceOnUse">
|
|
16
|
+
<stop stop-color="#B4D44E"/>
|
|
17
|
+
<stop offset="1" stop-color="#E7F716"/>
|
|
18
|
+
</linearGradient>
|
|
19
|
+
<clipPath id="clip0_2580_596">
|
|
20
|
+
<rect width="22" height="18" fill="white"/>
|
|
21
|
+
</clipPath>
|
|
22
|
+
</defs>
|
|
23
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="18" height="18" viewBox="-3 -3 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M10.9241 14.9481L8.76919 12.75L10.9241 10.5664L11.4548 11.1058L10.2144 12.375H12.6923C13.1318 12.375 13.5013 12.218 13.8007 11.904C14.1003 11.5901 14.25 11.2135 14.25 10.7741C14.25 10.3346 14.1003 9.96031 13.8007 9.65119C13.5013 9.34206 13.1318 9.1875 12.6923 9.1875H3.75V8.4375H12.6923C13.3355 8.4375 13.8809 8.66612 14.3286 9.12337C14.7762 9.5805 15 10.1308 15 10.7741C15 11.4174 14.7762 11.97 14.3286 12.432C13.8809 12.894 13.3355 13.125 12.6923 13.125H10.2144L11.4548 14.4086L10.9241 14.9481ZM3.75 13.125V12.375H6.60581V13.125H3.75ZM3.75 5.25V4.5H14.2933V5.25H3.75Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" x="0" y="0" version="1.1" viewBox="0 0 349.6 103.4">
|
|
2
|
+
<style>
|
|
3
|
+
.st0{fill:#fff}.st1{fill:#27265f}.st2{fill:#09f}.st3{fill:#f49021}
|
|
4
|
+
</style>
|
|
5
|
+
<path d="M44.3 98.7h-.1c-3.3-1.4-5.4-4.6-5.4-8.2v-.7c.1-.8.2-1.6.6-2.5C19.6 84.7 4.9 68.1 4.9 48.2 4.9 26.6 22.5 9 44.1 9s39.2 17.6 39.2 39.2c0 18.4-12.5 34.1-30.3 38.2-.6.7-1.3 1.3-1.9 1.9l-.4.4c-1 1-2.1 1.9-3.2 2.8l-.9.7c-1.4 1.2-2.1 2.6-2.1 4.1 0 .6.1 1.2.3 1.7.1.1.1.3 0 .4-.2.2-.3.3-.5.3" class="st0"/>
|
|
6
|
+
<path d="M44.1 9.3c21.5 0 39 17.4 39 39 0 18.5-12.9 34-30.2 38-.7.8-1.6 1.6-2.4 2.3-1.3 1.3-2.7 2.4-4.1 3.6-1.3 1.1-2.2 2.5-2.2 4.3q0 .9.3 1.8c.1.1 0 .2-.1.2h-.1c-3.1-1.3-5.3-4.4-5.3-8v-.7c.1-.9.3-1.8.7-2.7C20.2 84.7 5.1 68.2 5.1 48.2c0-21.5 17.5-38.9 39-38.9m0-.5C22.3 8.8 4.6 26.5 4.6 48.2c0 19.9 14.7 36.6 34.3 39.1-.3.8-.4 1.5-.5 2.3v.8c0 3.7 2.2 7 5.6 8.5.1 0 .2.1.3.1q.3 0 .6-.3.15-.3 0-.6c-.2-.5-.3-1-.3-1.6 0-1.5.7-2.8 2-3.9.3-.3.6-.5.9-.8 1.1-.9 2.2-1.8 3.2-2.8l.4-.4c.6-.6 1.3-1.2 1.9-1.8 8.5-2 16.2-6.8 21.7-13.7 5.6-7 8.7-15.8 8.7-24.7.1-21.9-17.6-39.6-39.3-39.6" class="st0"/>
|
|
7
|
+
<path d="M44.1 9.3c21.5 0 39 17.4 39 39 0 18.5-12.9 34-30.2 38-.7.8-1.6 1.6-2.4 2.3-1.3 1.3-2.7 2.4-4.1 3.6-1.3 1.1-2.2 2.5-2.2 4.3q0 .9.3 1.8c.1.1 0 .2-.1.2h-.1c-3.1-1.3-5.3-4.4-5.3-8v-.7c.1-.9.3-1.8.7-2.7C20.2 84.7 5.1 68.2 5.1 48.2c0-21.5 17.5-38.9 39-38.9m0-3c-23.1 0-42 18.8-42 42 0 20.2 14.3 37.4 33.9 41.2v.9c0 4.7 2.8 8.9 7 10.7.4.2.9.3 1.3.3 1.1 0 2.1-.6 2.7-1.5.5-.9.6-1.9.2-2.8-.1-.2-.1-.4-.1-.7 0-.5.1-1.1 1.1-2 .3-.3.6-.5.9-.8 1.1-.9 2.3-1.9 3.3-3l.4-.4c.5-.5 1-.9 1.5-1.4C63 86.6 71 81.5 76.7 74.4c6-7.4 9.3-16.8 9.3-26.3 0-23-18.8-41.8-41.9-41.8m61.3 8.3h6.9v52.5h-6.9zm17.8 59.6c3.4 2.2 7.3 3.7 11.3 3.7 6.8 0 11.4-4.1 11.4-10.8v-2.6l-.1-.1c-2.4 1.7-5.9 2.7-9.7 2.7-9.7 0-17.5-7.3-17.5-17.9 0-10.1 6.9-18.7 18.5-18.7 3.7 0 6.7.9 9 2l6.3-1.1V67c0 10.4-7 16.9-17.9 16.9-4.4 0-8.4-1.2-11.3-2.7zm13.7-12.7c3.3 0 6.7-1.2 8.9-2.9V38.9c-2.2-1.4-5.7-2.4-9-2.4-7.2 0-11.8 5.5-11.8 12.4.2 7.2 4.9 12.6 11.9 12.6m22-30h6.5V36l.1.1c3.1-3.1 7.5-5.3 12.4-5.3 3.9 0 7.3 1.4 9.5 3.9 1.9 2.2 3 5 3 10.5v21.9h-6.5V46.3c0-3.7-.5-5.9-1.7-7.3-1.5-1.7-3.8-2.3-5.7-2.3-4.1 0-8.6 2.5-11.2 5.9V67h-6.5zm41.3-16.9c2.5 0 4.6 2 4.6 4.6s-2 4.6-4.6 4.6c-2.5 0-4.6-2-4.6-4.6s2.1-4.6 4.6-4.6m-3.3 16.9h6.5v35.6h-6.5zm19.4 23.3V37.3h-6.6v-5.9h6.6v-9.8l6.5-1.1v10.8h10.7v5.9h-10.7v16.1c0 4.4.7 8.5 5.3 8.5 1.9 0 4-.7 5.3-1.6v6.1c-1.5.7-4 1.3-6.4 1.3-2.6 0-5.8-.7-8.1-3.3-1.8-1.7-2.6-4.6-2.6-9.5m29.5-3.6c1 7 6.1 10.9 13.2 10.9 5 0 9-1.9 12.3-4.4v7c-3.2 2-8.1 3.3-12.7 3.3-11 0-19.3-7.4-19.3-18.7s8.2-18.7 17.8-18.7c8.7 0 16.2 6.1 16.2 17.3 0 1.1-.1 2.4-.2 3.3zm.2-5.2h21c-.6-7.1-5.8-9.5-10.1-9.5-4.7 0-9.8 2.9-10.9 9.5m42.9-3.6V14.6h6.9v27c0 6.4.4 10.5 2 13.6 1.8 3.4 5.6 6.3 12.4 6.3 6.4 0 10.3-2.4 12.3-6.3 1.7-3.1 1.9-7.3 1.9-13.3V14.6h6.7v27c0 7.6-.4 13.5-3.5 18.1-3.3 5.1-9.6 8.2-17.8 8.2s-14.4-3.2-17.6-8.2c-2.8-4.6-3.3-10.8-3.3-17.3m48.7-27.8h6.9v52.5h-6.9z" class="logo-type"/>
|
|
8
|
+
<circle cx="44.1" cy="48.2" r="39" class="st1"/>
|
|
9
|
+
<use xlink:href="#reuse-0" class="logo-type"/>
|
|
10
|
+
<use xlink:href="#reuse-1" class="st2"/>
|
|
11
|
+
<use xlink:href="#reuse-3" class="st3"/>
|
|
12
|
+
<defs>
|
|
13
|
+
<path id="reuse-0" d="M45.5 5.4c-.6-.3-1.3-.4-1.9-.3-1.6.4-3.4 3.1-4.4 4.3-1.4 1.6-2.6 3.4-3.6 5.3-5.3 9.3-5 20.4-2.8 30.6 1.4 6.6 3.6 13 6.1 19.1l10.4.1c.4 0 2.1-5.3 2.3-5.9.7-1.9 1.3-3.9 1.9-5.8 1-3.4 1.9-6.9 2.6-10.4 1-5.5 1.4-11.2.5-16.7-.7-4.3-2.1-8.4-4.4-12.2-1.2-1.9-4-6.9-6.7-8.1m-1.3 28.3c-3.3 0-5.9-2.7-5.9-5.9 0-3.3 2.7-5.9 5.9-5.9s5.9 2.7 5.9 5.9c0 3.3-2.7 5.9-5.9 5.9m7.7 31.5c1.9-4.5 3.4-8.8 4.5-12.8 1.6 1 3.9 5.6 5 8.4.4 1.2.6 3.2.4 4.4-.4 2.6-1.3 7.2-3.6 10.4-.2.3-.7.1-.7-.2.1-1 .1-2.1 0-3-.1-1.7-.9-3.3-2.1-4.5s-2.6-2.3-3.5-2.7"/>
|
|
14
|
+
<path id="reuse-1" d="M30.5 72.2q-.15 1.5 0 3c0 .4-.5.6-.7.2-2.4-3.3-3.3-7.9-3.6-10.4-.1-1.3 0-3.3.4-4.4 1.1-2.7 3.4-7.3 5.1-8.3 1 4 2.5 8.3 4.4 12.8-1 .4-2.4 1.5-3.5 2.5-1.1 1.2-1.9 2.9-2.1 4.6M42.7 5.5s-15.9 17 .7 58.9h-4.5S18.2 24.9 42.7 5.5"/>
|
|
15
|
+
<path id="reuse-3" d="M34.7 85.5c-.4-.7-.5-1.4-.4-2.2.3-1.4 1.4-2.4 2.8-2.6 2-.2 3.6 1.3 3.6 3.3 0 1-.5 1.6-.9 2.4-.5 1.1-.8 2.1-.9 3.3v.7c0 3.6 2.1 6.7 5.3 8 .1.1.3-.1.2-.2q-.3-.9-.3-1.8c0-1.8.9-3.2 2.2-4.3 1.4-1.2 2.8-2.3 4.1-3.6s2.7-2.4 3.6-4c1-1.8 1.6-3.8 1.6-6 0-4.6-2.7-8.9-7-10.8-2.1-1-4.4-1.3-6.7-.9-4.7.7-8.7 4.5-9.7 9.2-.4 1.7-.3 3.5.1 5.2.2.8.4 1.6.8 2.3.7.7 1.2 1.3 1.6 2"/>
|
|
16
|
+
<path id="reuse-4" d="M40.5 85.3s11.5-8.4 4.4-18.7l14 .8-.1 33.2-19.6-.1c-.1.1-4.7-12.1 1.3-15.2"/>
|
|
17
|
+
</defs>
|
|
18
|
+
<clipPath id="SVGID_00000124161730200959699830000011505035801868656258_">
|
|
19
|
+
<use xlink:href="#reuse-3" style="overflow:visible"/>
|
|
20
|
+
</clipPath>
|
|
21
|
+
<use xlink:href="#reuse-4" style="clip-path:url(#SVGID_00000124161730200959699830000011505035801868656258_);fill:#f05a2b"/>
|
|
22
|
+
<circle cx="44.1" cy="48.2" r="39" class="st1"/>
|
|
23
|
+
<use xlink:href="#reuse-0" class="st0"/>
|
|
24
|
+
<use xlink:href="#reuse-1" class="st2"/>
|
|
25
|
+
<use xlink:href="#reuse-3" class="st3"/>
|
|
26
|
+
<defs>
|
|
27
|
+
<use xlink:href="#reuse-3" id="SVGID_00000114789979608707334650000003536205579453510290_"/>
|
|
28
|
+
</defs>
|
|
29
|
+
<clipPath id="SVGID_00000029036584987655005720000007086229884323525515_">
|
|
30
|
+
<use xlink:href="#SVGID_00000114789979608707334650000003536205579453510290_" style="overflow:visible"/>
|
|
31
|
+
</clipPath>
|
|
32
|
+
<use xlink:href="#reuse-4" style="clip-path:url(#SVGID_00000029036584987655005720000007086229884323525515_);fill:#f05a2b"/>
|
|
33
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="71" height="41" viewBox="0 0 71 41" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M70 2.5C70 1.67157 69.3284 1 68.5 1H2.5C1.67157 1 1 1.67157 1 2.5V38.2891C1 39.1175 1.67157 39.7891 2.5 39.7891H68.5C69.3284 39.7891 70 39.1175 70 38.2891V2.5ZM20.6318 26.0791C20.6318 25.2507 19.9602 24.5792 19.1318 24.5791H9.86816C9.03992 24.5793 8.36816 25.2508 8.36816 26.0791V30.9209C8.36816 31.7492 9.03992 32.4207 9.86816 32.4209H19.1318C19.9602 32.4208 20.6318 31.7493 20.6318 30.9209V26.0791ZM41.6318 26.0791C41.6318 25.2508 40.9602 24.5792 40.1318 24.5791H30.8682C30.0399 24.5793 29.3682 25.2508 29.3682 26.0791V30.9209C29.3682 31.7492 30.0399 32.4207 30.8682 32.4209H40.1318C40.9602 32.4208 41.6318 31.7493 41.6318 30.9209V26.0791ZM62.6318 26.0791C62.6318 25.2508 61.9601 24.5793 61.1318 24.5791H51.8682C51.0398 24.5792 50.3682 25.2507 50.3682 26.0791V30.9209C50.3682 31.7493 51.0398 32.4208 51.8682 32.4209H61.1318C61.9601 32.4207 62.6318 31.7492 62.6318 30.9209V26.0791ZM62.6318 9.86816C62.6317 9.0399 61.9601 8.36822 61.1318 8.36816H9.86816C9.04001 8.36838 8.36831 9.04 8.36816 9.86816V14.7109C8.36838 15.5391 9.04005 16.2107 9.86816 16.2109H61.1318C61.9601 16.2109 62.6316 15.5391 62.6318 14.7109V9.86816ZM21.6318 30.9209C21.6318 32.3016 20.5125 33.4208 19.1318 33.4209H9.86816C8.48764 33.4207 7.36816 32.3015 7.36816 30.9209V26.0791C7.36816 24.6985 8.48764 23.5793 9.86816 23.5791H19.1318C20.5125 23.5792 21.6318 24.6984 21.6318 26.0791V30.9209ZM42.6318 30.9209C42.6318 32.3015 41.5124 33.4208 40.1318 33.4209H30.8682C29.4876 33.4207 28.3682 32.3015 28.3682 30.9209V26.0791C28.3682 24.6985 29.4876 23.5793 30.8682 23.5791H40.1318C41.5124 23.5792 42.6318 24.6985 42.6318 26.0791V30.9209ZM63.6318 30.9209C63.6318 32.3015 62.5124 33.4207 61.1318 33.4209H51.8682C50.4875 33.4208 49.3682 32.3015 49.3682 30.9209V26.0791C49.3682 24.6984 50.4875 23.5792 51.8682 23.5791H61.1318C62.5124 23.5793 63.6318 24.6985 63.6318 26.0791V30.9209ZM63.6318 14.7109C63.6316 16.0914 62.5124 17.2109 61.1318 17.2109H9.86816C8.48777 17.2107 7.36838 16.0913 7.36816 14.7109V9.86816C7.36831 8.48771 8.48773 7.36838 9.86816 7.36816H61.1318C62.5124 7.36822 63.6317 8.48762 63.6318 9.86816V14.7109ZM71 38.2891C71 39.6698 69.8807 40.7891 68.5 40.7891H2.5C1.11929 40.7891 0 39.6698 0 38.2891V2.5C1.03082e-06 1.11929 1.11929 0 2.5 0H68.5C69.8807 0 71 1.11929 71 2.5V38.2891Z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="88" height="27" viewBox="0 0 88 27" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M26 2.5C26 1.67157 25.3284 1 24.5 1H2.5C1.67157 1 1 1.67157 1 2.5V24.5C1 25.3284 1.67157 26 2.5 26H24.5C25.3284 26 26 25.3284 26 24.5V2.5ZM56.6572 2.5C56.6572 1.67157 55.9857 1 55.1572 1H33.1572C32.3289 1.00013 31.6572 1.67165 31.6572 2.5V24.5C31.6572 25.3283 32.3289 25.9999 33.1572 26H55.1572C55.9857 26 56.6572 25.3284 56.6572 24.5V2.5ZM87 2.5C87 1.67157 86.3284 1 85.5 1H63.5C62.6716 1 62 1.67157 62 2.5V24.5C62 25.3284 62.6716 26 63.5 26H85.5C86.3284 26 87 25.3284 87 24.5V2.5ZM20 8.5C20 7.67157 19.3284 7 18.5 7H8.5C7.67157 7 7 7.67157 7 8.5V18.5C7 19.3284 7.67157 20 8.5 20H18.5C19.3284 20 20 19.3284 20 18.5V8.5ZM50.6572 8.5C50.6572 7.67157 49.9857 7 49.1572 7H39.1572C38.3289 7.00013 37.6572 7.67165 37.6572 8.5V18.5C37.6572 19.3283 38.3289 19.9999 39.1572 20H49.1572C49.9857 20 50.6572 19.3284 50.6572 18.5V8.5ZM81 8.5C81 7.67157 80.3284 7 79.5 7H69.5C68.6716 7 68 7.67157 68 8.5V18.5C68 19.3284 68.6716 20 69.5 20H79.5C80.3284 20 81 19.3284 81 18.5V8.5ZM21 18.5C21 19.8807 19.8807 21 18.5 21H8.5C7.11929 21 6 19.8807 6 18.5V8.5C6 7.11929 7.11929 6 8.5 6H18.5C19.8807 6 21 7.11929 21 8.5V18.5ZM51.6572 18.5C51.6572 19.8807 50.5379 21 49.1572 21H39.1572C37.7766 20.9999 36.6572 19.8806 36.6572 18.5V8.5C36.6572 7.11937 37.7766 6.00013 39.1572 6H49.1572C50.5379 6 51.6572 7.11929 51.6572 8.5V18.5ZM82 18.5C82 19.8807 80.8807 21 79.5 21H69.5C68.1193 21 67 19.8807 67 18.5V8.5C67 7.11929 68.1193 6 69.5 6H79.5C80.8807 6 82 7.11929 82 8.5V18.5ZM27 24.5C27 25.8807 25.8807 27 24.5 27H2.5C1.11929 27 0 25.8807 0 24.5V2.5C0 1.11929 1.11929 0 2.5 0H24.5C25.8807 0 27 1.11929 27 2.5V24.5ZM57.6572 24.5C57.6572 25.8807 56.5379 27 55.1572 27H33.1572C31.7766 26.9999 30.6572 25.8806 30.6572 24.5V2.5C30.6572 1.11937 31.7766 0.000131934 33.1572 0H55.1572C56.5379 0 57.6572 1.11929 57.6572 2.5V24.5ZM88 24.5C88 25.8807 86.8807 27 85.5 27H63.5C62.1193 27 61 25.8807 61 24.5V2.5C61 1.11929 62.1193 0 63.5 0H85.5C86.8807 0 88 1.11929 88 2.5V24.5Z" />
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="72" height="26" viewBox="0 0 72 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M10.8516 9.05383C11.0485 8.86044 11.3651 8.86301 11.5586 9.05969L15.8359 13.4142L11.5586 17.7687C11.3651 17.9654 11.0485 17.968 10.8516 17.7745C10.6549 17.581 10.6523 17.2644 10.8457 17.0675L13.9434 13.9142H0.5C0.223858 13.9142 0 13.6903 0 13.4142C2.60261e-05 13.1381 0.223874 12.9142 0.5 12.9142H13.9434L10.8457 9.76086C10.6523 9.56397 10.6549 9.24736 10.8516 9.05383ZM66.2168 9.05383C66.4138 8.86038 66.7303 8.86283 66.9238 9.05969L71.2012 13.4142L66.9238 17.7687C66.7303 17.9656 66.4138 17.968 66.2168 17.7745C66.02 17.581 66.0175 17.2644 66.2109 17.0675L69.3086 13.9142H55.8652C55.5891 13.9142 55.3652 13.6903 55.3652 13.4142C55.3653 13.1381 55.5891 12.9142 55.8652 12.9142H69.3086L66.2109 9.76086C66.0175 9.5639 66.0199 9.24735 66.2168 9.05383Z"/>
|
|
3
|
+
<path d="M42 8.00024C42 7.17182 41.3284 6.50024 40.5 6.50024H30.5C29.6716 6.50024 29 7.17182 29 8.00024V18.0002C29 18.8287 29.6716 19.5002 30.5 19.5002H40.5C41.3284 19.5002 42 18.8287 42 18.0002V8.00024ZM43 18.0002C43 19.381 41.8807 20.5002 40.5 20.5002H30.5C29.1193 20.5002 28 19.381 28 18.0002V8.00024C28 6.61953 29.1193 5.50024 30.5 5.50024H40.5C41.8807 5.50024 43 6.61953 43 8.00024V18.0002Z" />
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M46.5 0C47.6045 0 48.4999 0.895543 48.5 2V24C48.5 25.0356 47.7128 25.887 46.7041 25.9893L46.5 26H24.5L24.2959 25.9893C23.3544 25.8938 22.6062 25.1456 22.5107 24.2041L22.5 24V2C22.5001 0.895543 23.3955 4.0263e-08 24.5 0H46.5ZM24.5 1C23.9478 1 23.5001 1.44783 23.5 2V24C23.5 24.5523 23.9477 25 24.5 25H46.5C47.0523 25 47.5 24.5523 47.5 24V2C47.4999 1.44783 47.0522 1 46.5 1H24.5Z" />
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="71" height="41" viewBox="0 0 71 41" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M70 2.5C70 1.67157 69.3284 1 68.5 1H2.5C1.67157 1 1 1.67157 1 2.5V38.2891C1 39.1175 1.67157 39.7891 2.5 39.7891H68.5C69.3284 39.7891 70 39.1175 70 38.2891V2.5ZM62.6318 25.8682C62.6317 25.0399 61.9601 24.3682 61.1318 24.3682H9.86816C9.03999 24.3684 8.3683 25.04 8.36816 25.8682V30.7109C8.36839 31.539 9.04005 32.2107 9.86816 32.2109H61.1318C61.9601 32.2109 62.6316 31.5391 62.6318 30.7109V25.8682ZM62.6318 9.86816C62.6317 9.0399 61.9601 8.36822 61.1318 8.36816H9.86816C9.04001 8.36838 8.36831 9.04 8.36816 9.86816V14.7109C8.36838 15.5391 9.04005 16.2107 9.86816 16.2109H61.1318C61.9601 16.2109 62.6316 15.5391 62.6318 14.7109V9.86816ZM63.6318 30.7109C63.6316 32.0914 62.5123 33.2109 61.1318 33.2109H9.86816C8.48776 33.2107 7.36839 32.0913 7.36816 30.7109V25.8682C7.3683 24.4877 8.4877 23.3684 9.86816 23.3682H61.1318C62.5124 23.3682 63.6317 24.4876 63.6318 25.8682V30.7109ZM63.6318 14.7109C63.6316 16.0914 62.5124 17.2109 61.1318 17.2109H9.86816C8.48777 17.2107 7.36838 16.0913 7.36816 14.7109V9.86816C7.36831 8.48771 8.48773 7.36838 9.86816 7.36816H61.1318C62.5124 7.36822 63.6317 8.48762 63.6318 9.86816V14.7109ZM71 38.2891C71 39.6698 69.8807 40.7891 68.5 40.7891H2.5C1.11929 40.7891 0 39.6698 0 38.2891V2.5C1.03082e-06 1.11929 1.11929 0 2.5 0H68.5C69.8807 0 71 1.11929 71 2.5V38.2891Z" />
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="69" height="27" viewBox="0 0 69 27" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M26 2.5C26 1.67157 25.3284 1 24.5 1H2.5C1.67157 1 1 1.67157 1 2.5V24.5C1 25.3284 1.67157 26 2.5 26H24.5C25.3284 26 26 25.3284 26 24.5V2.5ZM67.3428 7.5C67.3428 6.67166 66.6711 6.00014 65.8428 6H54.5C53.6716 6 53 6.67157 53 7.5V18.8428C53.0002 19.6711 53.6717 20.3428 54.5 20.3428H65.8428C66.671 20.3426 67.3426 19.671 67.3428 18.8428V7.5ZM20 8.5C20 7.67157 19.3284 7 18.5 7H8.5C7.67157 7 7 7.67157 7 8.5V18.5C7 19.3284 7.67157 20 8.5 20H18.5C19.3284 20 20 19.3284 20 18.5V8.5ZM42.8516 9.99219C43.0486 9.7987 43.3651 9.80206 43.5586 9.99902L47.8359 14.3535L43.5586 18.707C43.3651 18.904 43.0486 18.9074 42.8516 18.7139C42.6547 18.5204 42.6522 18.2038 42.8457 18.0068L45.9434 14.8535H32.5C32.224 14.8535 32.0002 14.6295 32 14.3535C32 14.0774 32.2239 13.8535 32.5 13.8535H45.9434L42.8457 10.6992C42.6523 10.5022 42.6546 10.1857 42.8516 9.99219ZM21 18.5C21 19.8807 19.8807 21 18.5 21H8.5C7.11929 21 6 19.8807 6 18.5V8.5C6 7.11929 7.11929 6 8.5 6H18.5C19.8807 6 21 7.11929 21 8.5V18.5ZM68.3428 18.8428C68.3426 20.2233 67.2233 21.3426 65.8428 21.3428H54.5C53.1194 21.3428 52.0002 20.2233 52 18.8428V7.5C52 6.11929 53.1193 5 54.5 5H65.8428C67.2234 5.00014 68.3428 6.11938 68.3428 7.5V18.8428ZM27 24.5C27 25.8807 25.8807 27 24.5 27H2.5C1.11929 27 0 25.8807 0 24.5V2.5C0 1.11929 1.11929 0 2.5 0H24.5C25.8807 0 27 1.11929 27 2.5V24.5Z" />
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="69" height="27" viewBox="0 0 69 27" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M26 2.5C26 1.67157 25.3284 1 24.5 1H2.5C1.67157 1 1 1.67157 1 2.5V24.5C1 25.3284 1.67157 26 2.5 26H24.5C25.3284 26 26 25.3284 26 24.5V2.5ZM67.3428 7.5C67.3428 6.67166 66.6711 6.00014 65.8428 6H54.5C53.6716 6 53 6.67157 53 7.5V18.8428C53.0002 19.6711 53.6717 20.3428 54.5 20.3428H65.8428C66.671 20.3426 67.3426 19.671 67.3428 18.8428V7.5ZM20 8.5C20 7.67157 19.3284 7 18.5 7H8.5C7.67157 7 7 7.67157 7 8.5V18.5C7 19.3284 7.67157 20 8.5 20H18.5C19.3284 20 20 19.3284 20 18.5V8.5ZM47.0205 16.8486C47.2965 16.8486 47.5202 17.0727 47.5205 17.3486C47.5205 17.6248 47.2966 17.8486 47.0205 17.8486H32.5C32.2239 17.8486 32 17.6248 32 17.3486C32.0003 17.0727 32.224 16.8486 32.5 16.8486H47.0205ZM47.0205 10C47.2966 10 47.5205 10.2239 47.5205 10.5C47.5205 10.7761 47.2966 11 47.0205 11H32.5C32.2239 11 32 10.7761 32 10.5C32 10.2239 32.2239 10 32.5 10H47.0205ZM21 18.5C21 19.8807 19.8807 21 18.5 21H8.5C7.11929 21 6 19.8807 6 18.5V8.5C6 7.11929 7.11929 6 8.5 6H18.5C19.8807 6 21 7.11929 21 8.5V18.5ZM68.3428 18.8428C68.3426 20.2233 67.2233 21.3426 65.8428 21.3428H54.5C53.1194 21.3428 52.0002 20.2233 52 18.8428V7.5C52 6.11929 53.1193 5 54.5 5H65.8428C67.2234 5.00014 68.3428 6.11938 68.3428 7.5V18.8428ZM27 24.5C27 25.8807 25.8807 27 24.5 27H2.5C1.11929 27 0 25.8807 0 24.5V2.5C0 1.11929 1.11929 0 2.5 0H24.5C25.8807 0 27 1.11929 27 2.5V24.5Z" />
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* DocsBreadcrumb
|
|
4
|
+
*
|
|
5
|
+
* Renders the page breadcrumb trail inside the main content frame, above
|
|
6
|
+
* the page body. Shows the site title followed by the sidebar-derived crumbs
|
|
7
|
+
* for the current page.
|
|
8
|
+
*
|
|
9
|
+
* The crumb list is built from the sidebar tree via `getBreadcrumb`.
|
|
10
|
+
* Falls back to `pageTitle` when the current slug is not found in the tree.
|
|
11
|
+
*
|
|
12
|
+
* Props:
|
|
13
|
+
* currentSlug – slug of the current page (used for breadcrumb lookup)
|
|
14
|
+
* pageTitle – fallback label when slug is not in the sidebar tree
|
|
15
|
+
* siteTitle – override the site title; defaults to the virtual module value
|
|
16
|
+
* sidebarItems – override the sidebar tree; defaults to the virtual module value
|
|
17
|
+
*/
|
|
18
|
+
import { sidebar as sidebarData, title as siteTitleVirtual } from 'virtual:docs-template/site-meta';
|
|
19
|
+
import { getBreadcrumb } from '../../lib/sidebar/helpers';
|
|
20
|
+
import type { SidebarEntry } from '../../lib/sidebar/types';
|
|
21
|
+
import './DocsBreadcrumb.scss';
|
|
22
|
+
|
|
23
|
+
interface Props {
|
|
24
|
+
currentSlug?: string;
|
|
25
|
+
pageTitle?: string | null;
|
|
26
|
+
siteTitle?: string;
|
|
27
|
+
sidebarItems?: SidebarEntry[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const { currentSlug = '', pageTitle = '', siteTitle: siteTitleProp, sidebarItems } = Astro.props;
|
|
31
|
+
|
|
32
|
+
const resolvedSiteTitle = siteTitleProp ?? siteTitleVirtual;
|
|
33
|
+
const resolvedSidebar = (sidebarItems ?? sidebarData) as SidebarEntry[];
|
|
34
|
+
const sidebarCrumbs = currentSlug ? getBreadcrumb(resolvedSidebar, currentSlug) : [];
|
|
35
|
+
const crumbs = sidebarCrumbs.length > 0 ? sidebarCrumbs : (pageTitle ? [pageTitle] : []);
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
{(resolvedSiteTitle || crumbs.length > 0) && (
|
|
39
|
+
<nav class="docs-breadcrumb" aria-label="Breadcrumb">
|
|
40
|
+
<ol class="docs-breadcrumb-list">
|
|
41
|
+
{ resolvedSiteTitle && (
|
|
42
|
+
<li class="docs-breadcrumb-item docs-breadcrumb-home">
|
|
43
|
+
<span>{ resolvedSiteTitle }</span>
|
|
44
|
+
<span class="docs-breadcrumb-sep" aria-hidden="true">
|
|
45
|
+
/
|
|
46
|
+
</span>
|
|
47
|
+
</li>
|
|
48
|
+
) }
|
|
49
|
+
{ crumbs.map((label, i) => (
|
|
50
|
+
<li class="docs-breadcrumb-item">
|
|
51
|
+
<span class="docs-breadcrumb-crumb" title={ label }>{ label }</span>
|
|
52
|
+
</li>
|
|
53
|
+
)) }
|
|
54
|
+
</ol>
|
|
55
|
+
</nav>
|
|
56
|
+
)}
|
|
57
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@use 'igniteui-theming/sass/typography' as *;
|
|
2
|
+
|
|
3
|
+
.docs-breadcrumb {
|
|
4
|
+
width: 100%;
|
|
5
|
+
padding: 0;
|
|
6
|
+
margin-block-end: rem(26px);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.docs-breadcrumb-list {
|
|
10
|
+
@include type-style('subtitle-2') {
|
|
11
|
+
margin: 0;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-wrap: wrap;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: rem(4px);
|
|
18
|
+
list-style: none;
|
|
19
|
+
padding: 0;
|
|
20
|
+
color: var(--ig-gray-500);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.docs-breadcrumb-item {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
gap: rem(4px);
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.docs-breadcrumb-home {
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
color: var(--ig-gray-700);
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.docs-breadcrumb-sep {
|
|
38
|
+
flex-shrink: 0;
|
|
39
|
+
user-select: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.docs-breadcrumb-crumb {
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
text-overflow: ellipsis;
|
|
45
|
+
max-width: 18rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Last crumb = current page — emphasise slightly */
|
|
49
|
+
.docs-breadcrumb-item:last-child .docs-breadcrumb-crumb {
|
|
50
|
+
font-weight: 500;
|
|
51
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# DocsBreadcrumb
|
|
2
|
+
|
|
3
|
+
Breadcrumb trail rendered inside the main content frame, above the page body. Shows the site title followed by the sidebar-derived crumb path for the current page.
|
|
4
|
+
|
|
5
|
+
The crumb list is built by walking the sidebar tree with `getBreadcrumb()`. Falls back to `pageTitle` when the current slug is not found in the tree.
|
|
6
|
+
|
|
7
|
+
> **Layout note:** This component is placed inside `.igd-main-content` in `DocsLayout`, not in the fixed subheader bar. See `DocsSubHeader` for the top bar.
|
|
8
|
+
|
|
9
|
+
## Import
|
|
10
|
+
|
|
11
|
+
```astro
|
|
12
|
+
import DocsBreadcrumb from 'igniteui-astro-components/components/DocsBreadcrumb.astro';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Default | Description |
|
|
18
|
+
|------|------|---------|-------------|
|
|
19
|
+
| `currentSlug` | `string` | `''` | Slug of the current page — used to derive the crumb path from the sidebar tree. |
|
|
20
|
+
| `pageTitle` | `string \| null` | — | Fallback label shown as the last crumb when `currentSlug` is not found in the tree. |
|
|
21
|
+
| `siteTitle` | `string` | virtual module | Override the site name shown as the first crumb. |
|
|
22
|
+
| `sidebarItems` | `SidebarEntry[]` | virtual module | Override the sidebar tree used for crumb generation. |
|
|
23
|
+
|
|
24
|
+
## Behaviour
|
|
25
|
+
|
|
26
|
+
- Renders a semantic `<nav aria-label="Breadcrumb"><ol>` structure.
|
|
27
|
+
- The first item is the site title (from `virtual:docs-template/site-meta` or the `siteTitle` prop).
|
|
28
|
+
- Subsequent items are the ancestor labels from the sidebar tree leading to the current page.
|
|
29
|
+
- The last crumb (current page) is visually emphasised.
|
|
30
|
+
- Renders nothing when both `siteTitle` and the crumb list are empty.
|
|
31
|
+
|
|
32
|
+
## Example
|
|
33
|
+
|
|
34
|
+
### Prop-driven (no `siteMetaIntegration` required)
|
|
35
|
+
|
|
36
|
+
```astro
|
|
37
|
+
---
|
|
38
|
+
import DocsBreadcrumb from 'igniteui-astro-components/components/DocsBreadcrumb.astro';
|
|
39
|
+
import type { SidebarEntry } from 'igniteui-astro-components/lib/sidebar/types';
|
|
40
|
+
|
|
41
|
+
const sidebar: SidebarEntry[] = [
|
|
42
|
+
{ label: 'Components', collapsed: false, items: [
|
|
43
|
+
{ label: 'Toast', slug: 'components/toast' },
|
|
44
|
+
]},
|
|
45
|
+
];
|
|
46
|
+
---
|
|
47
|
+
<DocsBreadcrumb
|
|
48
|
+
siteTitle="My Library"
|
|
49
|
+
currentSlug="components/toast"
|
|
50
|
+
sidebarItems={sidebar}
|
|
51
|
+
/>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### With `siteMetaIntegration` (integration-driven)
|
|
55
|
+
|
|
56
|
+
All props are optional when the virtual module provides the data:
|
|
57
|
+
|
|
58
|
+
```astro
|
|
59
|
+
---
|
|
60
|
+
import DocsBreadcrumb from 'igniteui-astro-components/components/DocsBreadcrumb.astro';
|
|
61
|
+
---
|
|
62
|
+
<DocsBreadcrumb currentSlug="components/toast" pageTitle="Toast" />
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
This component is used automatically inside `DocsLayout` — you only need to
|
|
66
|
+
mount it directly when building a custom page shell.
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
* Package: igniteui-webcomponents (public, MIT) — change the import path
|
|
9
9
|
* in the <script> block below to use @infragistics/igniteui-webcomponents.
|
|
10
10
|
*/
|
|
11
|
-
import { sidebar as sidebarData } from 'virtual:docs-template/site-meta';
|
|
11
|
+
import { sidebar as sidebarData, trailingSlash as configuredTrailingSlash } from 'virtual:docs-template/site-meta';
|
|
12
12
|
import SidebarFilterInput from './SidebarFilterInput.astro';
|
|
13
|
+
import './DocsSidebar.scss';
|
|
13
14
|
import SidebarLabel from './SidebarLabel.astro';
|
|
14
15
|
import DocsTree from '../DocsTree/DocsTree.astro';
|
|
15
16
|
import { toTreeNodes } from './toTreeNodes';
|
|
@@ -23,77 +24,53 @@ interface Props {
|
|
|
23
24
|
* Useful when consuming the component without `siteMetaIntegration`.
|
|
24
25
|
*/
|
|
25
26
|
items?: SidebarEntry[];
|
|
27
|
+
/**
|
|
28
|
+
* Append trailing slash to sidebar links.
|
|
29
|
+
* Defaults to the value derived from the site's `trailingSlash` Astro config
|
|
30
|
+
* (exposed via the virtual module). Falls back to `true` if not configured.
|
|
31
|
+
*/
|
|
32
|
+
trailingSlash?: boolean;
|
|
26
33
|
}
|
|
27
34
|
|
|
28
|
-
const
|
|
35
|
+
const useTrailingSlash = configuredTrailingSlash !== 'never';
|
|
36
|
+
const { currentSlug = '', items: itemsProp, trailingSlash = useTrailingSlash } = Astro.props;
|
|
29
37
|
const items = (itemsProp ?? sidebarData) as SidebarEntry[];
|
|
30
|
-
const nodes = toTreeNodes(items, currentSlug);
|
|
38
|
+
const nodes = toTreeNodes(items, currentSlug, { trailingSlash });
|
|
31
39
|
const activeId = normalizeSlug(currentSlug);
|
|
32
40
|
---
|
|
33
41
|
|
|
34
|
-
<sidebar-filter id="docs-sidebar" data-no-results="No topics match">
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
<sidebar-filter class="docs-sidebar" id="docs-sidebar" data-no-results="No topics match">
|
|
43
|
+
<SidebarFilterInput/>
|
|
44
|
+
<div class="sidebar-scroll" data-sidebar-scroll>
|
|
45
|
+
<DocsTree
|
|
46
|
+
nodes={ nodes }
|
|
47
|
+
variant="sidebar"
|
|
48
|
+
activeId={ activeId }
|
|
49
|
+
toggleNodeOnClick
|
|
50
|
+
ariaLabel="Sidebar navigation"
|
|
51
|
+
renderLabel={ SidebarLabel }
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
46
54
|
</sidebar-filter>
|
|
47
55
|
|
|
48
56
|
<script>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
} from 'igniteui-webcomponents';
|
|
57
|
+
// Register Ignite UI Web Components used by the sidebar filter input.
|
|
58
|
+
// (DocsTree registers IgcTreeComponent / IgcTreeItemComponent itself.)
|
|
59
|
+
// To use the licensed package, change the import to:
|
|
60
|
+
// import { ... } from '@infragistics/igniteui-webcomponents';
|
|
61
|
+
import {
|
|
62
|
+
defineComponents,
|
|
63
|
+
IgcInputComponent,
|
|
64
|
+
IgcButtonComponent,
|
|
65
|
+
IgcIconComponent,
|
|
66
|
+
} from 'igniteui-webcomponents';
|
|
60
67
|
|
|
61
|
-
|
|
68
|
+
defineComponents(IgcInputComponent, IgcButtonComponent, IgcIconComponent);
|
|
62
69
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
);
|
|
67
|
-
registerIconFromText(
|
|
68
|
-
'sidebar-filter-clear',
|
|
69
|
-
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" fill="none"><path d="M2 2l10 10M12 2 2 12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>`,
|
|
70
|
-
);
|
|
70
|
+
// Icons (sidebar-filter-search, sidebar-filter-clear) are registered via
|
|
71
|
+
// the icon registry which picks up all SVGs from src/assets/icons/.
|
|
72
|
+
import '../../scripts/icon-registry';
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
import './sidebar-filter';
|
|
73
75
|
</script>
|
|
74
76
|
|
|
75
|
-
<style>
|
|
76
|
-
/* Layout-only — the tree's structural styles live in docs-tree.css. */
|
|
77
|
-
sidebar-filter {
|
|
78
|
-
display: flex;
|
|
79
|
-
flex-direction: column;
|
|
80
|
-
flex: 1;
|
|
81
|
-
min-height: 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.sidebar-scroll {
|
|
85
|
-
flex: 1;
|
|
86
|
-
min-height: 0;
|
|
87
|
-
overflow-y: auto;
|
|
88
|
-
margin-inline-end: calc(-1 * var(--sl-sidebar-pad-x, 1rem));
|
|
89
|
-
padding-inline-end: var(--sl-sidebar-pad-x, 1rem);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/* [data-sidebar-filter-status] is from SidebarFilterInput → :global() required */
|
|
93
|
-
sidebar-filter :global([data-sidebar-filter-status]):not(:empty) {
|
|
94
|
-
display: block;
|
|
95
|
-
padding: 0.5rem;
|
|
96
|
-
font-size: var(--sl-text-sm, 0.875rem);
|
|
97
|
-
color: var(--sl-color-gray-3, #888);
|
|
98
|
-
}
|
|
99
|
-
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@use 'igniteui-theming/sass/typography' as *;
|
|
2
|
+
|
|
3
|
+
.docs-sidebar {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
z-index: 0;
|
|
7
|
+
border-inline-end: var(--igd-app-outline);
|
|
8
|
+
padding-inline: var(--igd-padding-lg);
|
|
9
|
+
padding-block: calc(var(--igd-padding-lg) + rem(14px));
|
|
10
|
+
background-color: var(--igd-layout-sections-bg);
|
|
11
|
+
overflow-y: auto;
|
|
12
|
+
position: sticky;
|
|
13
|
+
top: var(--igd-header-height);
|
|
14
|
+
height: calc(100dvh - var(--igd-header-height));
|
|
15
|
+
max-height: 100dvh;
|
|
16
|
+
align-self: start;
|
|
17
|
+
gap: rem(24px);
|
|
18
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
* Filter input UI for the docs sidebar.
|
|
4
|
+
* Markup-only — behavior lives in `./sidebar-filter.ts`.
|
|
5
|
+
* Uses igc-input / igc-button / igc-icon from igniteui-webcomponents.
|
|
6
|
+
* Icons are registered via the icon registry (src/scripts/icon-registry.ts).
|
|
7
|
+
*/
|
|
8
|
+
import './SidebarFilterInput.scss';
|
|
8
9
|
---
|
|
9
10
|
|
|
10
|
-
<
|
|
11
|
-
<igc-input
|
|
11
|
+
<igc-input
|
|
12
12
|
id="sidebar-filter-input"
|
|
13
13
|
type="search"
|
|
14
14
|
autocomplete="off"
|
|
@@ -17,58 +17,23 @@
|
|
|
17
17
|
aria-label="Filter navigation topics"
|
|
18
18
|
aria-controls="docs-sidebar"
|
|
19
19
|
data-sidebar-filter-input
|
|
20
|
-
|
|
21
|
-
<igc-icon slot="prefix" name="sidebar-filter-search" aria-hidden="true"></igc-icon>
|
|
20
|
+
>
|
|
22
21
|
<igc-button
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
><igc-icon name="sidebar-filter-clear" aria-hidden="true"></igc-icon></igc-button>
|
|
29
|
-
</igc-input>
|
|
30
|
-
<p
|
|
31
|
-
role="status"
|
|
32
|
-
aria-atomic="true"
|
|
33
|
-
class="sidebar-filter-status"
|
|
34
|
-
data-sidebar-filter-status
|
|
35
|
-
></p>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
<style>
|
|
39
|
-
/* Sits above the scroll container — always visible, never scrolls. */
|
|
40
|
-
.sidebar-filter-wrapper {
|
|
41
|
-
flex-shrink: 0;
|
|
42
|
-
margin-block-end: 0.5rem;
|
|
43
|
-
padding-block-end: 0.25rem;
|
|
44
|
-
background: var(--sl-color-bg-sidebar, var(--sl-color-bg));
|
|
45
|
-
}
|
|
22
|
+
slot="suffix"
|
|
23
|
+
variant="flat"
|
|
24
|
+
aria-label="Clear filter"
|
|
25
|
+
data-sidebar-filter-clear
|
|
26
|
+
hidden>
|
|
46
27
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
28
|
+
<igc-icon name="close" collection="docs" aria-hidden="true"></igc-icon>
|
|
29
|
+
</igc-button>
|
|
30
|
+
<igc-icon slot="suffix" name="filter" collection="docs" aria-hidden="true"></igc-icon>
|
|
31
|
+
</igc-input>
|
|
52
32
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
igc-input::part(input) {
|
|
59
|
-
font-size: var(--sl-text-xs, 0.75rem);
|
|
60
|
-
font-family: inherit;
|
|
61
|
-
}
|
|
33
|
+
<p role="status"
|
|
34
|
+
aria-atomic="true"
|
|
35
|
+
class="sidebar-filter-status"
|
|
36
|
+
data-sidebar-filter-status>
|
|
37
|
+
</p>
|
|
62
38
|
|
|
63
|
-
igc-button[data-sidebar-filter-clear] {
|
|
64
|
-
--ig-size: 1;
|
|
65
|
-
}
|
|
66
39
|
|
|
67
|
-
.sidebar-filter-status {
|
|
68
|
-
margin: 0.25rem 0 0;
|
|
69
|
-
font-size: 0.7rem;
|
|
70
|
-
color: var(--sl-color-gray-3);
|
|
71
|
-
min-height: 1em;
|
|
72
|
-
padding-inline-start: 0.1rem;
|
|
73
|
-
}
|
|
74
|
-
</style>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@use 'igniteui-theming/sass/typography' as *;
|
|
2
|
+
|
|
3
|
+
igc-input {
|
|
4
|
+
--ig-input-group-input-suffix-color: light-dark(var(--ig-gray-900), var(--ig-gray-800));
|
|
5
|
+
--ig-input-group-input-suffix-color--filled: light-dark(var(--ig-gray-900), var(--ig-gray-800));
|
|
6
|
+
--ig-input-group-input-suffix-color--focused: light-dark(var(--ig-gray-900), var(--ig-gray-800));
|
|
7
|
+
--ig-input-group-idle-text-color: light-dark(var(--ig-gray-900), var(--ig-gray-800));
|
|
8
|
+
--ig-input-group-filled-text-color: light-dark(var(--ig-gray-900), var(--ig-gray-50));
|
|
9
|
+
--ig-input-group-placeholder-color: var(--ig-gray-500);
|
|
10
|
+
--ig-input-group-hover-placeholder-color: var(--ig-gray-500);
|
|
11
|
+
--ig-flat-button-hover-background: transparent;
|
|
12
|
+
--ig-flat-button-focus-background: transparent;
|
|
13
|
+
--ig-flat-button-icon-color-hover: var(--igd-accent);
|
|
14
|
+
--ig-flat-button-icon-color-focus: var(--igd-accent);
|
|
15
|
+
|
|
16
|
+
igc-icon {
|
|
17
|
+
width: rem(24px);
|
|
18
|
+
aspect-ratio: 1;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
igc-input::part(input) {
|
|
23
|
+
@include type-style('caption') {
|
|
24
|
+
margin: 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
igc-input::part(container) {
|
|
29
|
+
border-inline: 0;
|
|
30
|
+
border-block-start: 0;
|
|
31
|
+
border-block-end: rem(1px) solid light-dark(var(--ig-gray-200), var(--ig-gray-300));
|
|
32
|
+
|
|
33
|
+
border-radius: 0;
|
|
34
|
+
padding-inline-start: rem(16px);
|
|
35
|
+
padding-inline-end: rem(8px);
|
|
36
|
+
padding-block-end: rem(8px);
|
|
37
|
+
|
|
38
|
+
&::before {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
igc-button {
|
|
44
|
+
padding: 0;
|
|
45
|
+
|
|
46
|
+
&::part(base) {
|
|
47
|
+
padding-inline: rem(6px);
|
|
48
|
+
min-width: fit-content;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// TODO I am unable to styles the input, can't reach the part, log an issue in to the library.
|
|
52
|
+
//&::part(input) {
|
|
53
|
+
// padding-inline-start: 0;
|
|
54
|
+
// padding-inline-end: rem(32px);
|
|
55
|
+
//}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.sidebar-filter-status {
|
|
59
|
+
@include type-style('body-2') {
|
|
60
|
+
margin: 0 !important;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
color: light-dark(var(--ig-gray-600), var(--ig-gray-700));
|
|
64
|
+
padding: rem(16px) rem(24px);
|
|
65
|
+
|
|
66
|
+
&:empty {
|
|
67
|
+
display: none;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Receives `{ node, depth, isLeaf, isActive }` from DocsTreeItem.
|
|
6
6
|
* Branches on isLeaf:
|
|
7
7
|
* • leaf → label text + optional badge (from node.meta.badge)
|
|
8
|
-
* • group → label text
|
|
8
|
+
* • group → label text only (the caret lives in the native indicator slot of igc-tree-item)
|
|
9
9
|
*
|
|
10
10
|
* The outer container is the `<a class="docs-tree-link">` (leaves) or
|
|
11
11
|
* `<div class="docs-tree-group">` (groups) provided by DocsTreeItem.
|
|
@@ -31,10 +31,5 @@ const badge = (node.meta?.badge ?? null) as SidebarBadge | null;
|
|
|
31
31
|
{badge && <span class={`sl-badge ${badge.variant}`}>{badge.text}</span>}
|
|
32
32
|
</>
|
|
33
33
|
) : (
|
|
34
|
-
|
|
35
|
-
<span class="group-label-text">{node.label}</span>
|
|
36
|
-
<svg class="group-caret" viewBox="0 0 16 16" width="10" height="10" aria-hidden="true" focusable="false">
|
|
37
|
-
<path d="M4 2l8 6-8 6V2z" fill="currentColor" />
|
|
38
|
-
</svg>
|
|
39
|
-
</>
|
|
34
|
+
<span class="group-label-text">{node.label}</span>
|
|
40
35
|
)}
|