igniteui-astro-components 0.0.11 → 0.0.13
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/package.json +1 -1
- package/src/components/DocsSidebar/DocsSidebar.scss +156 -149
- package/src/components/DocsSidebar/SidebarLabel.astro +1 -1
- package/src/components/DocsSubHeader/DocsSubHeader.astro +58 -11
- package/src/components/DocsSubHeader/DocsSubHeader.scss +18 -0
- package/src/components/DocsToc/DocsToc.scss +1 -1
- package/src/components/DocsTree/DocsTree.astro +30 -0
- package/src/components/mdx/ApiLink/ApiLink.astro +75 -33
- package/src/components/mdx/Sample/Sample.scss +0 -6
- package/src/layouts/DocsLayout/DocsLayout.astro +18 -2
- package/src/layouts/DocsLayout/DocsLayout.scss +24 -11
- package/src/lib/types.ts +7 -0
- package/src/scripts/sample-widget.ts +13 -16
- package/src/styles/global/_breakpoints.scss +7 -5
- package/src/styles/global/_index.scss +0 -1
- package/src/styles/global/_markdown.scss +1 -1
- package/src/styles/global/_type-scale.scss +1 -1
- package/src/styles/global/_variables.scss +1 -1
- package/src/styles/global/_members.scss +0 -85
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-astro-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "Reusable Astro components, layouts, and integrations for Infragistics / Ignite UI documentation sites. Replaces the Starlight defaults with project-specific implementations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -1,171 +1,178 @@
|
|
|
1
1
|
@use 'igniteui-theming/sass/typography' as *;
|
|
2
2
|
|
|
3
3
|
@layer components {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
// Desktop base. On tablet/mobile DocsLayout.scss turns this into a slide-in overlay.
|
|
5
|
+
.docs-sidebar {
|
|
6
|
+
--igd-sidebar-z-index: 0;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
z-index: var(--igd-sidebar-z-index);
|
|
10
|
+
border-inline-end: var(--igd-app-outline);
|
|
11
|
+
padding-inline: var(--igd-padding-md);
|
|
12
|
+
padding-block: calc(var(--igd-padding-lg) + rem(14px));
|
|
13
|
+
background-color: var(--igd-layout-sections-bg);
|
|
14
|
+
position: sticky;
|
|
15
|
+
top: var(--igd-header-height);
|
|
16
|
+
height: calc(100dvh - var(--igd-header-height));
|
|
17
|
+
max-height: 100dvh;
|
|
18
|
+
align-self: start;
|
|
19
|
+
gap: rem(24px);
|
|
20
|
+
|
|
21
|
+
.sidebar-gutter {
|
|
22
|
+
overflow-y: hidden;
|
|
23
|
+
scrollbar-gutter: stable;
|
|
24
|
+
|
|
25
|
+
// This Makes sure the input border is visible
|
|
26
|
+
// This is the height of the input in fluent theme + 8px padding
|
|
27
|
+
// TODO this can be made smart using a css variable to override the original height of the input and used here
|
|
28
|
+
min-height: rem(40px);
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
igc-icon {
|
|
32
|
+
color: light-dark(var(--ig-gray-800), var(--ig-gray-300));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:empty {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Hidden by default. DocsLayout.scss reveals it on tablet/mobile when the sidebar is open.
|
|
42
|
+
.docs-sidebar-backdrop {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.sidebar-logo {
|
|
47
|
+
display: none;
|
|
48
|
+
margin-block-end: rem(8px);
|
|
49
|
+
padding-inline-start: rem(20px);
|
|
50
|
+
|
|
51
|
+
> svg {
|
|
52
|
+
width: rem(79px);
|
|
53
|
+
|
|
54
|
+
.logo-type {
|
|
55
|
+
fill: var(--igd-logo-type);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.sidebar-scroll {
|
|
61
|
+
overflow-y: auto;
|
|
24
62
|
scrollbar-gutter: stable;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.sidebar-badge {
|
|
66
|
+
--border-radius: #{rem(4px)};
|
|
67
|
+
--elevation: none;
|
|
68
|
+
|
|
69
|
+
&::part(base) {
|
|
70
|
+
@include type-style('overline') {
|
|
71
|
+
margin: 0;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
border-radius: var(--border-radius);
|
|
75
|
+
border-width: rem(1px);
|
|
76
|
+
border-style: solid;
|
|
77
|
+
border-color: var(--border-color);
|
|
78
|
+
}
|
|
79
|
+
|
|
32
80
|
igc-icon {
|
|
33
|
-
|
|
81
|
+
--size: #{rem(18px)}
|
|
34
82
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
83
|
+
|
|
84
|
+
// TODO, This has to be fixed inside the component
|
|
85
|
+
span {
|
|
86
|
+
position: relative;
|
|
87
|
+
padding-inline: rem(3px);
|
|
38
88
|
}
|
|
39
89
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
.sidebar-logo {
|
|
48
|
-
display: none;
|
|
49
|
-
margin-block-end: rem(8px);
|
|
50
|
-
padding-inline-start: rem(20px);
|
|
51
|
-
|
|
52
|
-
> svg {
|
|
53
|
-
width: rem(79px);
|
|
54
|
-
|
|
55
|
-
.logo-type {
|
|
56
|
-
fill: var(--igd-logo-type);
|
|
57
|
-
}
|
|
90
|
+
|
|
91
|
+
.updated {
|
|
92
|
+
--background-color: var(--igd-updated-bg);
|
|
93
|
+
--text-color: var(--igd-updated-color);
|
|
94
|
+
--icon-color: var(--igd-updated-color);
|
|
95
|
+
--border-color: var(--igd-updated-border);
|
|
58
96
|
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.sidebar-scroll {
|
|
62
|
-
overflow-y: auto;
|
|
63
|
-
scrollbar-gutter: stable;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.sidebar-badge {
|
|
67
|
-
--border-radius: #{rem(4px)};
|
|
68
|
-
--elevation: none;
|
|
69
97
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
border-radius: var(--border-radius);
|
|
76
|
-
border-width: rem(1px);
|
|
77
|
-
border-style: solid;
|
|
78
|
-
border-color: var(--border-color);
|
|
98
|
+
.new {
|
|
99
|
+
--background-color: var(--igd-new-bg);
|
|
100
|
+
--text-color: var(--igd-new-color);
|
|
101
|
+
--icon-color: var(--igd-new-color);
|
|
102
|
+
--border-color: var(--igd-new-border);
|
|
79
103
|
}
|
|
80
104
|
|
|
81
|
-
|
|
82
|
-
--
|
|
105
|
+
.preview {
|
|
106
|
+
--background-color: var(--igd-preview-bg);
|
|
107
|
+
--text-color: var(--igd-preview-color);
|
|
108
|
+
--icon-color: var(--igd-preview-color);
|
|
109
|
+
--border-color: var(--igd-preview-border);
|
|
83
110
|
}
|
|
84
111
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
112
|
+
.premium {
|
|
113
|
+
--background-color: var(--igd-premium-bg);
|
|
114
|
+
--text-color: var(--igd-premium-color);
|
|
115
|
+
--icon-color: var(--igd-premium-color);
|
|
116
|
+
--border-color: var(--igd-premium-border);
|
|
89
117
|
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.updated {
|
|
93
|
-
--background-color: var(--igd-updated-bg);
|
|
94
|
-
--text-color: var(--igd-updated-color);
|
|
95
|
-
--icon-color: var(--igd-updated-color);
|
|
96
|
-
--border-color: var(--igd-updated-border);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.new {
|
|
100
|
-
--background-color: var(--igd-new-bg);
|
|
101
|
-
--text-color: var(--igd-new-color);
|
|
102
|
-
--icon-color: var(--igd-new-color);
|
|
103
|
-
--border-color: var(--igd-new-border);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.preview {
|
|
107
|
-
--background-color: var(--igd-preview-bg);
|
|
108
|
-
--text-color: var(--igd-preview-color);
|
|
109
|
-
--icon-color: var(--igd-preview-color);
|
|
110
|
-
--border-color: var(--igd-preview-border);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
.premium {
|
|
115
|
-
--background-color: var(--igd-premium-bg);
|
|
116
|
-
--text-color: var(--igd-premium-color);
|
|
117
|
-
--icon-color: var(--igd-premium-color);
|
|
118
|
-
--border-color: var(--igd-premium-border);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.opensource {
|
|
122
|
-
--background-color: var(--igd-opensource-bg);
|
|
123
|
-
--text-color: var(--igd-opensource-color);
|
|
124
|
-
--icon-color: var(--igd-opensource-color);
|
|
125
|
-
--border-color: var(--igd-opensource-border);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.sidebar-premium-icon {
|
|
129
|
-
--size: #{rem(24px)};
|
|
130
118
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
display: flex;
|
|
138
|
-
align-items: center;
|
|
139
|
-
gap: rem(8px);
|
|
119
|
+
.opensource {
|
|
120
|
+
--background-color: var(--igd-opensource-bg);
|
|
121
|
+
--text-color: var(--igd-opensource-color);
|
|
122
|
+
--icon-color: var(--igd-opensource-color);
|
|
123
|
+
--border-color: var(--igd-opensource-border);
|
|
124
|
+
}
|
|
140
125
|
|
|
141
|
-
|
|
126
|
+
.sidebar-premium-icon {
|
|
127
|
+
--size: #{rem(24px)};
|
|
128
|
+
|
|
142
129
|
justify-self: end;
|
|
130
|
+
color: var(--igd-premium-color);
|
|
131
|
+
flex-shrink: 0;
|
|
143
132
|
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.docs-tree-group {
|
|
147
|
-
gap: rem(8px);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.group-label-text {
|
|
151
|
-
@include type-style('body-2') {
|
|
152
|
-
margin-block: 0;
|
|
153
|
-
};
|
|
154
133
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
134
|
+
.igd-label-and-badge {
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
gap: rem(8px);
|
|
138
|
+
|
|
139
|
+
igc-badge {
|
|
140
|
+
justify-self: end;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.docs-tree-group {
|
|
145
|
+
gap: rem(8px);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.group-label-text {
|
|
149
|
+
@include type-style('body-2') {
|
|
150
|
+
margin-block: 0;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
color: light-dark(var(--ig-gray-800), var(--ig-gray-600));
|
|
154
|
+
|
|
155
|
+
&:hover {
|
|
156
|
+
color: var(--igd-accent);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
igc-tree-item[active] {
|
|
161
|
+
.group-label-text {
|
|
162
|
+
color: var(--igd-accent);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.group-label-count {
|
|
167
|
+
color: light-dark(var(--ig-gray-500), var(--ig-gray-600));
|
|
168
|
+
margin-inline-start: rem(8px)
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.igd-badge-container {
|
|
172
|
+
display: flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
gap: rem(4px);
|
|
175
|
+
margin-left: auto;
|
|
176
|
+
}
|
|
170
177
|
}
|
|
171
178
|
|
|
@@ -28,7 +28,7 @@ const badges = (node.meta?.badges ?? []) as SidebarBadge[];
|
|
|
28
28
|
|
|
29
29
|
{isLeaf ? (
|
|
30
30
|
<>
|
|
31
|
-
<div class="igd-
|
|
31
|
+
<div class="igd-label-and-badge">
|
|
32
32
|
<span class="docs-tree-label">{node.label}</span>
|
|
33
33
|
{badges.length > 0 && (
|
|
34
34
|
<div class="igd-badge-container">
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* moved to the `DocsBreadcrumb` component, rendered inside the main frame.
|
|
14
14
|
*/
|
|
15
15
|
import { platform as virtualPlatform } from 'virtual:docs-template/nav-html';
|
|
16
|
-
import { productLinks, sidebar as sidebarData, title as siteTitle } from 'virtual:docs-template/site-meta';
|
|
16
|
+
import { productLinks, sidebar as sidebarData, title as siteTitle, packages as virtualPackages, selectedPackage as virtualSelectedPackage } from 'virtual:docs-template/site-meta';
|
|
17
17
|
import Search from '../Search/Search.astro';
|
|
18
18
|
import type { SidebarEntry } from '../../lib/sidebar/types';
|
|
19
19
|
import { getBreadcrumb } from '../../lib/sidebar/helpers';
|
|
@@ -55,9 +55,13 @@ interface Props {
|
|
|
55
55
|
* Defaults to the virtual module value.
|
|
56
56
|
*/
|
|
57
57
|
sidebarItems?: SidebarEntry[];
|
|
58
|
-
/**
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Items for the package/platform selector dropdown. When omitted the selector is hidden.
|
|
60
|
+
* Each entry is either a plain string label, or an object with a `label`, optional `value`
|
|
61
|
+
* (defaults to `label`), and optional `href` to navigate to when selected.
|
|
62
|
+
*/
|
|
63
|
+
packages?: Array<string | { label: string; value?: string; href?: string }>;
|
|
64
|
+
/** Currently selected package value (must match one of `packages`). */
|
|
61
65
|
selectedPackage?: string;
|
|
62
66
|
/** Label rendered before the package selector. Defaults to `'Package'`. */
|
|
63
67
|
packageLabel?: string;
|
|
@@ -85,8 +89,8 @@ const {
|
|
|
85
89
|
siteTitle: siteTitleProp,
|
|
86
90
|
productLinks: productLinksProp,
|
|
87
91
|
sidebarItems,
|
|
88
|
-
packages,
|
|
89
|
-
selectedPackage,
|
|
92
|
+
packages: packagesProp,
|
|
93
|
+
selectedPackage: selectedPackageProp,
|
|
90
94
|
packageLabel = 'Package',
|
|
91
95
|
versions,
|
|
92
96
|
selectedVersion,
|
|
@@ -97,9 +101,15 @@ const {
|
|
|
97
101
|
} = Astro.props;
|
|
98
102
|
const resolvedSiteTitle = siteTitleProp ?? siteTitle;
|
|
99
103
|
const currentPlatform = virtualPlatform ?? null;
|
|
100
|
-
const platformIcon = currentPlatform ? (PLATFORM_ICONS[currentPlatform] ?? null) : null;
|
|
101
104
|
const resolvedLinks = (productLinksProp ?? productLinks) as ProductLink[];
|
|
102
105
|
const filteredLinks = resolvedLinks.filter((l: ProductLink) => l.platform !== currentPlatform);
|
|
106
|
+
type PackageEntry = string | { label: string; value?: string; href?: string };
|
|
107
|
+
const rawPackages = packagesProp ?? (virtualPackages.length > 0 ? virtualPackages : undefined);
|
|
108
|
+
const packages = (rawPackages as PackageEntry[] | undefined)?.map((p: PackageEntry) =>
|
|
109
|
+
typeof p === 'string' ? { label: p, value: p, href: undefined } : { label: p.label, value: p.value ?? p.label, href: p.href }
|
|
110
|
+
);
|
|
111
|
+
const selectedPackage = selectedPackageProp ?? (virtualSelectedPackage || undefined);
|
|
112
|
+
const platformIcon = PLATFORM_ICONS[selectedPackage ?? currentPlatform ?? ''] ?? null;
|
|
103
113
|
|
|
104
114
|
const resolvedSidebar = (sidebarItems ?? sidebarData) as SidebarEntry[];
|
|
105
115
|
const sidebarCrumbs = currentSlug ? getBreadcrumb(resolvedSidebar, currentSlug) : [];
|
|
@@ -119,10 +129,10 @@ const crumbs = sidebarCrumbs.length > 0 ? sidebarCrumbs : (pageTitle ? [pageTitl
|
|
|
119
129
|
|
|
120
130
|
<!-- Package selector (optional) -->
|
|
121
131
|
{packages && packages.length > 0 && (
|
|
122
|
-
<igc-select distance="17"
|
|
132
|
+
<igc-select distance="17" id="package-select" class="igd-package-select" outlined value={selectedPackage} aria-label={packageLabel}>
|
|
123
133
|
{platformIcon && <igc-icon name={platformIcon} collection="docs" slot="prefix" aria-hidden="true"></igc-icon>}
|
|
124
134
|
{packages.map((p) => (
|
|
125
|
-
|
|
135
|
+
<igc-select-item value={p.value} data-href={p.href}>{p.label}</igc-select-item>
|
|
126
136
|
))}
|
|
127
137
|
</igc-select>
|
|
128
138
|
)}
|
|
@@ -180,6 +190,17 @@ const crumbs = sidebarCrumbs.length > 0 ? sidebarCrumbs : (pageTitle ? [pageTitl
|
|
|
180
190
|
if (!customElements.get('docs-subheader-menu')) {
|
|
181
191
|
class DocsSubHeaderMenu extends HTMLElement {
|
|
182
192
|
connectedCallback() {
|
|
193
|
+
// Package selector navigation
|
|
194
|
+
const packageSelect = this.querySelector('#package-select');
|
|
195
|
+
if (packageSelect) {
|
|
196
|
+
packageSelect.addEventListener('igcChange', (e: Event) => {
|
|
197
|
+
const val = (e as CustomEvent).detail?.value ?? (packageSelect as any).value;
|
|
198
|
+
const item = packageSelect.querySelector<HTMLElement>(`igc-select-item[value="${val}"]`);
|
|
199
|
+
const href = item?.dataset?.href;
|
|
200
|
+
if (href) window.location.href = href;
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
|
|
183
204
|
// Sidebar toggle
|
|
184
205
|
const sidebarBtn = this.querySelector<HTMLButtonElement>('[data-sidebar-toggle]');
|
|
185
206
|
if (sidebarBtn) {
|
|
@@ -243,6 +264,32 @@ const crumbs = sidebarCrumbs.length > 0 ? sidebarCrumbs : (pageTitle ? [pageTitl
|
|
|
243
264
|
this.classList.remove('igd-docs-subheader--pinned');
|
|
244
265
|
});
|
|
245
266
|
}
|
|
267
|
+
|
|
268
|
+
// Close open selects on scroll, and prevent the browser's
|
|
269
|
+
// focus-triggered scrollIntoView from jumping the page when a
|
|
270
|
+
// select is clicked while the user is scrolled down.
|
|
271
|
+
const selectsForScroll = Array.from(
|
|
272
|
+
this.querySelectorAll<HTMLElement>('#package-select, #version-select')
|
|
273
|
+
);
|
|
274
|
+
selectsForScroll.forEach(select => {
|
|
275
|
+
let savedY: number | null = null;
|
|
276
|
+
let guardTimer: ReturnType<typeof setTimeout> | null = null;
|
|
277
|
+
|
|
278
|
+
// pointerdown fires before focus is assigned to save scroll position
|
|
279
|
+
select.addEventListener('pointerdown', () => {
|
|
280
|
+
savedY = window.scrollY;
|
|
281
|
+
if (guardTimer) clearTimeout(guardTimer);
|
|
282
|
+
guardTimer = setTimeout(() => { savedY = null; guardTimer = null; }, 300);
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
window.addEventListener('scroll', () => {
|
|
286
|
+
if (savedY !== null) {
|
|
287
|
+
window.scrollTo({ top: savedY, left: 0, behavior: 'instant' });
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
if ((select as any).open) (select as any).hide();
|
|
291
|
+
}, { passive: true });
|
|
292
|
+
});
|
|
246
293
|
}
|
|
247
294
|
}
|
|
248
295
|
|
|
@@ -251,8 +298,8 @@ const crumbs = sidebarCrumbs.length > 0 ? sidebarCrumbs : (pageTitle ? [pageTitl
|
|
|
251
298
|
</script>
|
|
252
299
|
|
|
253
300
|
<script>
|
|
254
|
-
import { defineComponents, IgcIconComponent, IgcIconButtonComponent } from 'igniteui-webcomponents';
|
|
301
|
+
import { defineComponents, IgcIconComponent, IgcIconButtonComponent, IgcSelectComponent, IgcSelectItemComponent } from 'igniteui-webcomponents';
|
|
255
302
|
import '../../scripts/icon-registry';
|
|
256
|
-
defineComponents(IgcIconComponent, IgcIconButtonComponent);
|
|
303
|
+
defineComponents(IgcIconComponent, IgcIconButtonComponent, IgcSelectComponent, IgcSelectItemComponent);
|
|
257
304
|
</script>
|
|
258
305
|
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
align-items: center;
|
|
76
76
|
height: 100%;
|
|
77
77
|
gap: rem(16px);
|
|
78
|
+
min-width: 0;
|
|
78
79
|
|
|
79
80
|
> igc-select:first-of-type {
|
|
80
81
|
margin-inline-start: auto;
|
|
@@ -85,6 +86,23 @@
|
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
|
|
89
|
+
.igd-package-select,
|
|
90
|
+
.igd-version-select {
|
|
91
|
+
flex-shrink: 0;
|
|
92
|
+
position: relative;
|
|
93
|
+
width: fit-content;
|
|
94
|
+
max-width: rem(180px);
|
|
95
|
+
|
|
96
|
+
&::part(base) {
|
|
97
|
+
position: absolute;
|
|
98
|
+
inset-block-start: 100%;
|
|
99
|
+
inset-inline-end: 0;
|
|
100
|
+
width: max-content;
|
|
101
|
+
min-width: 100%;
|
|
102
|
+
z-index: 100;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
88
106
|
// Hidden by default. DocsLayout.scss reveals it on tablet/mobile (when the sidebar is hidden).
|
|
89
107
|
.subheader-sidebar-toggle {
|
|
90
108
|
display: none;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
max-height: calc(100vh - var(--igd-header-height));
|
|
15
15
|
overflow-y: auto;
|
|
16
16
|
padding: rem(46px) rem(24px);
|
|
17
|
-
border-inline: var(--igd-app-outline);
|
|
17
|
+
border-inline-end: var(--igd-app-outline);
|
|
18
18
|
border-block-end: var(--igd-app-outline);
|
|
19
19
|
background-color: var(--igd-layout-sections-bg);
|
|
20
20
|
}
|
|
@@ -78,6 +78,36 @@ const { nodes, variant, activeId, toggleNodeOnClick, ariaLabel, renderLabel } =
|
|
|
78
78
|
selectActiveTreeItem();
|
|
79
79
|
document.addEventListener('astro:page-load', selectActiveTreeItem);
|
|
80
80
|
|
|
81
|
+
// Restore sidebar focus when navigation was triggered from within the tree.
|
|
82
|
+
// Astro's ClientRouter moves focus to main content on every page-load;
|
|
83
|
+
// this counteracts that for keyboard users browsing the sidebar.
|
|
84
|
+
let focusWasInTree = false;
|
|
85
|
+
|
|
86
|
+
document.addEventListener('astro:before-preparation', () => {
|
|
87
|
+
focusWasInTree = !!document.activeElement?.closest('igc-tree[data-variant="sidebar"]');
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
document.addEventListener('astro:page-load', () => {
|
|
91
|
+
if (!focusWasInTree) return;
|
|
92
|
+
focusWasInTree = false;
|
|
93
|
+
customElements.whenDefined('igc-tree-item').then(() => {
|
|
94
|
+
const activeItem = document.querySelector<HTMLElement>(
|
|
95
|
+
'igc-tree[data-variant="sidebar"] igc-tree-item:has(a[aria-current="page"])'
|
|
96
|
+
);
|
|
97
|
+
activeItem?.focus();
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// When clicking a tree link, focus the parent igc-tree-item so that
|
|
102
|
+
// up/down arrow key navigation works immediately after the click.
|
|
103
|
+
// The <a> overlay is position:absolute and captures clicks, but igc-tree's
|
|
104
|
+
// keyboard handler only fires when igc-tree-item itself has focus.
|
|
105
|
+
document.addEventListener('click', (e) => {
|
|
106
|
+
const link = (e.target as Element).closest('igc-tree[data-variant="sidebar"] a.docs-tree-link');
|
|
107
|
+
if (!link) return;
|
|
108
|
+
link.closest<HTMLElement>('igc-tree-item')?.focus();
|
|
109
|
+
}, { capture: true });
|
|
110
|
+
|
|
81
111
|
// Suppress the active-indicator transition during window resize so the
|
|
82
112
|
// anchor-positioned ::before bar doesn't slowly slide to its new position.
|
|
83
113
|
let resizeTimer: ReturnType<typeof setTimeout>;
|
|
@@ -40,16 +40,37 @@
|
|
|
40
40
|
*/
|
|
41
41
|
import type { PlatformContext } from '../../../lib/types.ts';
|
|
42
42
|
|
|
43
|
-
type ApiKind = 'class' | 'interface' | 'enum' | 'type' | 'variable' | 'function';
|
|
43
|
+
type ApiKind = 'class' | 'interface' | 'enum' | 'type' | 'variable' | 'function' | 'sass';
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
/** Props for SASS API documentation links (`kind="sass"`). */
|
|
46
|
+
type SassProps = {
|
|
47
|
+
kind: 'sass';
|
|
48
|
+
/** The anchor fragment without "#", e.g. "mixin-slide-in-left". Optional when linking to the module page. */
|
|
49
|
+
type?: string;
|
|
50
|
+
/** SASS module name, e.g. "animations", "themes". Required for correct URL generation. */
|
|
51
|
+
module?: string;
|
|
52
|
+
/**
|
|
53
|
+
* When true, wraps the label in <code>.
|
|
54
|
+
* @default true — matches TypeDoc ApiLink code-formatting behaviour.
|
|
55
|
+
* Set to false for descriptive/prose labels.
|
|
56
|
+
*/
|
|
57
|
+
code?: boolean;
|
|
58
|
+
/** Override the display text. Defaults to `type ?? module ?? ''`. */
|
|
59
|
+
label?: string;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** Props for TypeDoc API documentation links (all non-sass kinds). */
|
|
63
|
+
type TypeDocProps = {
|
|
48
64
|
/**
|
|
49
65
|
* TypeDoc symbol kind. Determines the URL segment used.
|
|
50
66
|
* @default "class"
|
|
51
67
|
*/
|
|
52
|
-
kind?: ApiKind
|
|
68
|
+
kind?: Exclude<ApiKind, 'sass'>;
|
|
69
|
+
/**
|
|
70
|
+
* Short type/symbol name without platform prefix, e.g. "Toast".
|
|
71
|
+
* Required for all TypeDoc kinds.
|
|
72
|
+
*/
|
|
73
|
+
type: string;
|
|
53
74
|
/** Optional member name (property / method), e.g. "show". Appended as #anchor. */
|
|
54
75
|
member?: string;
|
|
55
76
|
/**
|
|
@@ -77,9 +98,11 @@ interface Props {
|
|
|
77
98
|
* @default true
|
|
78
99
|
*/
|
|
79
100
|
suffix?: boolean;
|
|
80
|
-
}
|
|
101
|
+
};
|
|
81
102
|
|
|
82
|
-
|
|
103
|
+
type Props = SassProps | TypeDocProps;
|
|
104
|
+
|
|
105
|
+
const KIND_SEGMENT: Record<Exclude<ApiKind, 'sass'>, string> = {
|
|
83
106
|
class: 'classes',
|
|
84
107
|
interface: 'interfaces',
|
|
85
108
|
enum: 'enums',
|
|
@@ -88,34 +111,53 @@ const KIND_SEGMENT: Record<ApiKind, string> = {
|
|
|
88
111
|
function: 'functions',
|
|
89
112
|
};
|
|
90
113
|
|
|
91
|
-
const
|
|
92
|
-
const { prefix, apiPackages } =
|
|
114
|
+
const ctx = Astro.locals.platformContext as PlatformContext;
|
|
115
|
+
const { prefix, apiPackages } = ctx;
|
|
116
|
+
const label = Astro.props.label;
|
|
93
117
|
|
|
94
|
-
const pkgConfig = apiPackages[pkg] ?? apiPackages['core'];
|
|
95
|
-
const baseType = prefixed ? `${prefix}${type}` : type;
|
|
96
|
-
const segment = KIND_SEGMENT[kind];
|
|
97
118
|
let url: string;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
119
|
+
let displayLabel: string;
|
|
120
|
+
let renderCode: boolean;
|
|
121
|
+
|
|
122
|
+
if (Astro.props.kind === 'sass') {
|
|
123
|
+
const { type, module, code = true } = Astro.props;
|
|
124
|
+
if (!module) console.warn('[ApiLink] kind="sass" requires a `module` prop — link may be malformed.');
|
|
125
|
+
const base = ctx.sassApiUrl?.trim().replace(/\/+$/, '');
|
|
126
|
+
const anchor = type ? `#${type}` : '';
|
|
127
|
+
if (!base) {
|
|
128
|
+
console.warn('[ApiLink] kind="sass" requires `platformContext.sassApiUrl` to be configured — falling back to "#".');
|
|
129
|
+
url = '#';
|
|
130
|
+
} else {
|
|
131
|
+
url = `${base}/${module ?? ''}${anchor}`;
|
|
132
|
+
}
|
|
133
|
+
displayLabel = label ?? type ?? module ?? '';
|
|
134
|
+
renderCode = code;
|
|
108
135
|
} else {
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
:
|
|
116
|
-
|
|
136
|
+
const { type, kind = 'class', member, pkg = 'core', prefixed = true, suffix = true } = Astro.props;
|
|
137
|
+
const pkgConfig = apiPackages[pkg] ?? apiPackages['core'];
|
|
138
|
+
const baseType = prefixed ? `${prefix}${type}` : type;
|
|
139
|
+
const segment = KIND_SEGMENT[kind];
|
|
140
|
+
if (kind === 'class') {
|
|
141
|
+
const fullType = (suffix && pkgConfig.classSuffix) ? `${baseType}${pkgConfig.classSuffix}` : baseType;
|
|
142
|
+
const cased = pkgConfig.preserveCase ? fullType : fullType.toLowerCase();
|
|
143
|
+
const classSlug = pkgConfig.noPackagePrefix
|
|
144
|
+
? cased
|
|
145
|
+
: `${pkgConfig.packageId}.${cased}`;
|
|
146
|
+
const memberAnchor = member
|
|
147
|
+
? `#${pkgConfig.pascalCaseMembers ? member.charAt(0).toUpperCase() + member.slice(1) : member}`
|
|
148
|
+
: '';
|
|
149
|
+
url = `${pkgConfig.docRoot}/classes/${classSlug}${memberAnchor}`;
|
|
150
|
+
} else {
|
|
151
|
+
const slug = pkgConfig.noPackagePrefix
|
|
152
|
+
? baseType
|
|
153
|
+
: `${pkgConfig.packageId}.${baseType}`;
|
|
154
|
+
const memberAnchorNonClass = member
|
|
155
|
+
? `#${pkgConfig.pascalCaseMembers ? member.charAt(0).toUpperCase() + member.slice(1) : member.toLowerCase()}`
|
|
156
|
+
: '';
|
|
157
|
+
url = `${pkgConfig.docRoot}/${segment}/${slug}${memberAnchorNonClass}`;
|
|
158
|
+
}
|
|
159
|
+
displayLabel = label ?? (member ? `${baseType}.${member}` : baseType);
|
|
160
|
+
renderCode = true;
|
|
117
161
|
}
|
|
118
|
-
|
|
119
|
-
const displayLabel = label ?? (member ? `${baseType}.${member}` : baseType);
|
|
120
162
|
---
|
|
121
|
-
<a href={url}
|
|
163
|
+
<a href={url}>{renderCode ? <code>{displayLabel}</code> : displayLabel}</a>
|
|
@@ -35,9 +35,25 @@ export interface Props {
|
|
|
35
35
|
license?: string;
|
|
36
36
|
/** Set to true on 404 pages to add the `igd-page-layout--404` modifier class. */
|
|
37
37
|
is404?: boolean;
|
|
38
|
+
/** Package names for the subheader package selector. When omitted the selector is hidden. */
|
|
39
|
+
packages?: string[];
|
|
40
|
+
/** Currently selected package (must match one of `packages`). */
|
|
41
|
+
selectedPackage?: string;
|
|
42
|
+
/** Label rendered before the package selector. Defaults to `'Package'`. */
|
|
43
|
+
packageLabel?: string;
|
|
44
|
+
/** Version labels for the subheader version selector. When omitted the selector is hidden. */
|
|
45
|
+
versions?: string[];
|
|
46
|
+
/** Currently selected version (must match one of `versions`). */
|
|
47
|
+
selectedVersion?: string;
|
|
48
|
+
/** Label rendered before the version selector. Defaults to `'Version'`. */
|
|
49
|
+
versionLabel?: string;
|
|
50
|
+
/** Show a light/dark theme toggle button in the subheader. */
|
|
51
|
+
showThemeToggle?: boolean;
|
|
52
|
+
/** `localStorage` key for persisting the theme. Defaults to `'docs-theme'`. */
|
|
53
|
+
themeStorageKey?: string;
|
|
38
54
|
}
|
|
39
55
|
|
|
40
|
-
const { title, description, keywords, hasToc = true, hasSidebar = true, currentSlug = '', siteTitle: siteTitleProp, license, is404 = false } = Astro.props;
|
|
56
|
+
const { title, description, keywords, hasToc = true, hasSidebar = true, currentSlug = '', siteTitle: siteTitleProp, license, is404 = false, packages, selectedPackage, packageLabel, versions, selectedVersion, versionLabel, showThemeToggle, themeStorageKey } = Astro.props;
|
|
41
57
|
const resolvedSiteTitle = siteTitleProp ?? siteTitle;
|
|
42
58
|
const licenseType = license === 'commercial' ? 'premium' : license === 'MIT' ? 'opensource' : false;
|
|
43
59
|
const navTheme = (virtualPlatform ?? import.meta.env.VITE_NAV_THEME ?? 'igniteui') as string;
|
|
@@ -224,7 +240,7 @@ type HeadEntry = { tag: string; attrs?: Record<string, string | boolean | undefi
|
|
|
224
240
|
<!-- TODO: WE DONT NEED TO CALCULAtE THE IG HEADER HEIGHT ANYMORE - REMOVE IT -->
|
|
225
241
|
<!-- <DocsSubHeader style={ `--docs-global-nav-height: ${ showGlobalNav ? '4.7rem': '0' }` } data-nav-height-wrapper/> -->
|
|
226
242
|
<slot name="subheader">
|
|
227
|
-
<DocsSubHeader pageTitle={title} currentSlug={currentSlug} siteTitle={siteTitleProp} />
|
|
243
|
+
<DocsSubHeader pageTitle={title} currentSlug={currentSlug} siteTitle={siteTitleProp} packages={packages} selectedPackage={selectedPackage} packageLabel={packageLabel} versions={versions} selectedVersion={selectedVersion} versionLabel={versionLabel} showThemeToggle={showThemeToggle} themeStorageKey={themeStorageKey} />
|
|
228
244
|
</slot>
|
|
229
245
|
|
|
230
246
|
|
|
@@ -82,11 +82,15 @@
|
|
|
82
82
|
|
|
83
83
|
.igd-main-content__page {
|
|
84
84
|
display: grid;
|
|
85
|
-
gap: var(--ig-padding);
|
|
86
85
|
background-color: var(--igd-layout-sections-bg);
|
|
87
|
-
border-inline: var(--igd-app-outline);
|
|
88
|
-
width:
|
|
89
|
-
|
|
86
|
+
border-inline-end: var(--igd-app-outline);
|
|
87
|
+
width: 100%;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.igd-main-content__inner:not(:has(aside)) {
|
|
91
|
+
.igd-main-content__page {
|
|
92
|
+
border-inline: var(--igd-app-outline);
|
|
93
|
+
}
|
|
90
94
|
}
|
|
91
95
|
|
|
92
96
|
.igd-main-content__page + aside {
|
|
@@ -95,8 +99,6 @@
|
|
|
95
99
|
|
|
96
100
|
.igd-main-content__inner {
|
|
97
101
|
display: flex;
|
|
98
|
-
gap: rem(70px);
|
|
99
|
-
padding-inline: rem(70px) rem(32px);
|
|
100
102
|
position: relative;
|
|
101
103
|
|
|
102
104
|
&:has(aside) {
|
|
@@ -117,21 +119,32 @@
|
|
|
117
119
|
//
|
|
118
120
|
// mobile: < 768px (max-width: $bp-mobile-max)
|
|
119
121
|
// tablet: 768–1279px (max-width: $bp-tablet-max / min-width: $bp-tablet-min)
|
|
120
|
-
// desktop: ≥
|
|
122
|
+
// desktop: ≥ 1700px (default — no media query)
|
|
121
123
|
//
|
|
122
124
|
// This is the single source of truth for every responsive rule that affects
|
|
123
125
|
// the docs layout and the components rendered inside `.igd-page-layout`.
|
|
124
126
|
// ════════════════════════════════════════════════════════════════════════════
|
|
125
127
|
|
|
126
128
|
|
|
127
|
-
@media (
|
|
129
|
+
@media (min-width: #{$bp-desktop-wide}) {
|
|
128
130
|
.igd-page-layout {
|
|
129
|
-
--igd-page-layout-grid: #{
|
|
131
|
+
--igd-page-layout-grid: #{rem(400px)} 1fr;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.igd-main-content__page {
|
|
135
|
+
gap: var(--ig-padding);
|
|
136
|
+
margin-inline: auto;
|
|
137
|
+
border-inline: var(--igd-app-outline);
|
|
138
|
+
width: clamp(rem(1200px), 100%, rem(1200px));
|
|
130
139
|
}
|
|
131
140
|
|
|
132
141
|
.igd-main-content__inner {
|
|
133
|
-
|
|
134
|
-
|
|
142
|
+
gap: rem(70px);
|
|
143
|
+
padding-inline: rem(70px) rem(32px);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.toc-sidebar {
|
|
147
|
+
border-inline: var(--igd-app-outline);
|
|
135
148
|
}
|
|
136
149
|
}
|
|
137
150
|
|
package/src/lib/types.ts
CHANGED
|
@@ -63,4 +63,11 @@ export interface PlatformContext {
|
|
|
63
63
|
forums: string;
|
|
64
64
|
repoSamples: string;
|
|
65
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* Sass API documentation base URL.
|
|
68
|
+
* Used as a base for link path concatenation - must have **no trailing slash**
|
|
69
|
+
* to avoid accidental `//` in generated URLs.
|
|
70
|
+
* @example `https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/sass`
|
|
71
|
+
*/
|
|
72
|
+
sassApiUrl?: string;
|
|
66
73
|
}
|
|
@@ -174,22 +174,6 @@ function addFooter(
|
|
|
174
174
|
const footer = document.createElement('div');
|
|
175
175
|
footer.className = 'igd-code-view__footer-actions';
|
|
176
176
|
|
|
177
|
-
const label = document.createElement('span');
|
|
178
|
-
label.className = 'editing-label';
|
|
179
|
-
footer.appendChild(label);
|
|
180
|
-
|
|
181
|
-
const fsBtn = document.createElement('igc-button') as HTMLElement;
|
|
182
|
-
fsBtn.setAttribute('variant', 'outlined');
|
|
183
|
-
fsBtn.setAttribute('aria-label', 'Open in full screen');
|
|
184
|
-
fsBtn.className = 'igd-full-screen-btn igd-edit-in-btn';
|
|
185
|
-
fsBtn.innerHTML = `<igc-icon name="open-link-blank" collection="docs" slot="prefix"></igc-icon>Full screen`;
|
|
186
|
-
if (iframeSrc) {
|
|
187
|
-
const fullscreenSrc = iframeSrc + (iframeSrc.includes('?') ? '&' : '?') + 'nav=0';
|
|
188
|
-
fsBtn.setAttribute('href', fullscreenSrc);
|
|
189
|
-
fsBtn.setAttribute('target', '_blank');
|
|
190
|
-
}
|
|
191
|
-
footer.appendChild(fsBtn);
|
|
192
|
-
|
|
193
177
|
if ((!explicitEditor || explicitEditor === 'stackblitz') && onStackblitz) {
|
|
194
178
|
const btn = document.createElement('igc-button') as HTMLElement;
|
|
195
179
|
btn.setAttribute('variant', 'outlined');
|
|
@@ -210,6 +194,19 @@ function addFooter(
|
|
|
210
194
|
footer.appendChild(btn);
|
|
211
195
|
}
|
|
212
196
|
|
|
197
|
+
const fsBtn = document.createElement('igc-icon-button') as HTMLElement;
|
|
198
|
+
fsBtn.setAttribute('name', 'open-link-blank');
|
|
199
|
+
fsBtn.setAttribute('collection', 'docs');
|
|
200
|
+
fsBtn.setAttribute('variant', 'outlined');
|
|
201
|
+
fsBtn.setAttribute('aria-label', 'Open in full screen');
|
|
202
|
+
fsBtn.className = 'igd-full-screen-btn igd-edit-in-btn';
|
|
203
|
+
if (iframeSrc) {
|
|
204
|
+
const fullscreenSrc = iframeSrc + (iframeSrc.includes('?') ? '&' : '?') + 'nav=0';
|
|
205
|
+
fsBtn.setAttribute('href', fullscreenSrc);
|
|
206
|
+
fsBtn.setAttribute('target', '_blank');
|
|
207
|
+
}
|
|
208
|
+
footer.appendChild(fsBtn);
|
|
209
|
+
|
|
213
210
|
widget.appendChild(footer);
|
|
214
211
|
}
|
|
215
212
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
//
|
|
5
5
|
// mobile: < 768px (max-width: $bp-mobile-max)
|
|
6
6
|
// tablet: 768px – 1279px (max-width: $bp-tablet-max / min-width: $bp-tablet-min)
|
|
7
|
-
// desktop: ≥
|
|
7
|
+
// desktop: ≥ 1999px (min-width: $bp-desktop-wide)
|
|
8
8
|
//
|
|
9
9
|
// Usage: @media (max-width: #{$bp-mobile-max}) { … }
|
|
10
10
|
// Never use var() inside @media — CSS custom properties don't work there.
|
|
@@ -18,9 +18,11 @@ $bp-tablet-min: #{rem(768px)};
|
|
|
18
18
|
/// Top of tablet range (< 1280px)
|
|
19
19
|
$bp-tablet-max: #{rem(1279px)};
|
|
20
20
|
|
|
21
|
-
$bp-reduce-sidebar: #{rem(1500px)};
|
|
22
|
-
|
|
23
21
|
$bp-hide-toc: #{rem(1100px)};
|
|
24
22
|
|
|
25
|
-
/// Start of desktop range (≥
|
|
26
|
-
$bp-desktop-
|
|
23
|
+
/// Start of desktop range (≥ 1900px)
|
|
24
|
+
$bp-desktop-wide: #{rem(1999px)};
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/// $bp-desktop-wide
|
|
28
|
+
$bp-desktop-wide: #{rem(1999px)};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
@use 'igniteui-theming' as *;
|
|
2
|
-
|
|
3
|
-
/* ============================================================
|
|
4
|
-
API Members
|
|
5
|
-
Styles for member articles (properties, methods, accessors,
|
|
6
|
-
events), headings, badges, inheritance tree, and metadata.
|
|
7
|
-
|
|
8
|
-
WHY GLOBAL: These styles target `section > article`,
|
|
9
|
-
`.member-badge`, `.inheritance-tree`, and `.inherited-from`
|
|
10
|
-
which are rendered across all 5 detail page templates
|
|
11
|
-
(classes, interfaces, functions, types, variables). While
|
|
12
|
-
AnchoredName.astro renders `.member-badge`, the surrounding
|
|
13
|
-
article/section structure lives directly in each page
|
|
14
|
-
template, so no single component fully owns these styles.
|
|
15
|
-
Once a shared detail page layout component exists, this file
|
|
16
|
-
should be moved there.
|
|
17
|
-
============================================================ */
|
|
18
|
-
|
|
19
|
-
/* Inheritance tree */
|
|
20
|
-
.inheritance-tree {
|
|
21
|
-
margin-top: 0.5em;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.inheritance-tree-item {
|
|
25
|
-
display: flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
font-family: var(--sl-font-mono, monospace), sans-serif;
|
|
28
|
-
font-size: 1em;
|
|
29
|
-
line-height: 1.7;
|
|
30
|
-
white-space: pre;
|
|
31
|
-
margin-top: 0.1em;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.inheritance-tree-item .inheritance-arrow {
|
|
35
|
-
margin-right: 0.5em;
|
|
36
|
-
margin-top: 0.1em;
|
|
37
|
-
color: #888;
|
|
38
|
-
font-size: 1.1em;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.inheritance-tree-item.last strong {
|
|
42
|
-
font-weight: bold;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* "Inherited from" metadata line shown under member headings */
|
|
46
|
-
.inherited-from {
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: center;
|
|
49
|
-
gap: rem(8px);
|
|
50
|
-
padding: rem(8px) rem(16px);
|
|
51
|
-
color: var(--igd-accent);
|
|
52
|
-
border: rem(1px) solid light-dark(var(--ig-primary-500), var(--ig-primary-800));
|
|
53
|
-
border-radius: rem(4px);
|
|
54
|
-
|
|
55
|
-
strong {
|
|
56
|
-
font-weight: 400;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
a {
|
|
60
|
-
|
|
61
|
-
text-decoration: underline;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/* Visual separation between member articles */
|
|
66
|
-
section > article {
|
|
67
|
-
margin-block: var(--igd-page-padding);
|
|
68
|
-
|
|
69
|
-
> * {
|
|
70
|
-
margin-block-end: rem(26px);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.member-badge {
|
|
75
|
-
@include type-style('body-1') {
|
|
76
|
-
margin: 0;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
display: inline-block;
|
|
80
|
-
color: light-dark(var(--ig-secondary-800), var(--ig-secondary-200));
|
|
81
|
-
background: light-dark(var(--ig-secondary-100), var(--ig-secondary-900));
|
|
82
|
-
border: rem(1px) solid light-dark(var(--ig-secondary-300),var(--ig-secondary-700));
|
|
83
|
-
padding: var(--igd-members-spacing);
|
|
84
|
-
border-radius: rem(4px);
|
|
85
|
-
}
|