igniteui-astro-components 0.0.18 → 0.0.19
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/assets/icons/{chatGPT,.svg → chatgpt.svg} +0 -1
- package/src/assets/ig-logo.svg +1 -1
- package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +1 -3
- package/src/components/DocsBreadcrumb/DocsBreadcrumb.scss +12 -3
- package/src/components/DocsSidebar/DocsSidebar.astro +26 -7
- package/src/components/DocsSidebar/DocsSidebar.scss +35 -28
- package/src/components/DocsSidebar/SidebarFilterInput.astro +2 -2
- package/src/components/DocsSidebar/SidebarFilterInput.scss +76 -51
- package/src/components/DocsSidebar/sidebar-filter.ts +3 -18
- package/src/components/DocsSubHeader/DocsSubHeader.astro +93 -114
- package/src/components/DocsSubHeader/DocsSubHeader.scss +69 -121
- package/src/components/DocsToc/DocsToc.astro +14 -10
- package/src/components/DocsToc/DocsToc.scss +7 -5
- package/src/components/DocsTree/docs-tree.scss +125 -54
- package/src/components/GlobalFooter/GlobalFooter.module.scss +1 -1
- package/src/components/GlobalNavBar/GlobalNavBar.module.scss +1 -3
- package/src/components/Search/Search.astro +57 -23
- package/src/components/Search/Search.scss +15 -21
- package/src/components/SearchAdvanced/SearchAdvanced.astro +64 -49
- package/src/components/SearchAdvanced/SearchAdvanced.scss +22 -30
- package/src/components/mdx/DocsAside/DocsAside.scss +10 -14
- package/src/layouts/DocsLayout/DocsLayout.astro +5 -5
- package/src/layouts/DocsLayout/DocsLayout.scss +58 -97
- package/src/scripts/icon-manifest.ts +73 -0
- package/src/scripts/icon-registry.ts +4 -35
- package/src/styles/global/_breakpoints.scss +0 -1
- package/src/styles/global/_code-blocks.scss +1 -0
- package/src/styles/global/_component-themes.scss +133 -125
- package/src/styles/global/_icon-gallery.scss +108 -0
- package/src/styles/global/_index.scss +1 -0
- package/src/styles/global/_markdown.scss +127 -16
- package/src/styles/global/_palette.scss +101 -101
- package/src/styles/global/_search-shared.scss +302 -315
- package/src/styles/global/_type-scale.scss +17 -17
- package/src/styles/global/_variables.scss +15 -6
- package/src/styles/theme.scss +7 -61
- package/src/assets/icons/classes.svg +0 -3
- package/src/assets/icons/enumerations.svg +0 -3
- package/src/assets/icons/functions.svg +0 -5
- package/src/assets/icons/interfaces.svg +0 -3
- package/src/assets/icons/type-alias.svg +0 -3
- package/src/assets/icons/variables.svg +0 -3
- /package/src/assets/icons/{palette,.svg → palette.svg} +0 -0
|
@@ -2,41 +2,26 @@
|
|
|
2
2
|
@use '../../styles/global/search-shared' as *;
|
|
3
3
|
|
|
4
4
|
@layer components {
|
|
5
|
+
.igd-search-shell {
|
|
6
|
+
grid-template-rows: auto calc(100% - (var(--search-header-footer-height) * 1));
|
|
7
|
+
}
|
|
8
|
+
|
|
5
9
|
api-search-advanced {
|
|
6
10
|
display: contents;
|
|
7
11
|
|
|
8
|
-
|
|
9
|
-
.igd-search-header {
|
|
10
|
-
igc-input::part(container) {
|
|
11
|
-
&:focus-within {
|
|
12
|
-
box-shadow:
|
|
13
|
-
0 0 0 1px var(--igd-accent),
|
|
14
|
-
inset 0 1px 0 var(--igd-accent),
|
|
15
|
-
inset 0 -1px 0 var(--igd-accent),
|
|
16
|
-
inset -1px 0 0 var(--igd-accent);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
12
|
#search-scope-trigger-icon {
|
|
23
13
|
margin-inline-start: rem(16px);
|
|
24
14
|
}
|
|
25
15
|
}
|
|
26
16
|
|
|
27
|
-
.search-trigger {
|
|
28
|
-
color: light-dark(var(--ig-gray-600), var(--ig-gray-400));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
17
|
// TODO BUG IN THE TAB COMPONENT
|
|
32
18
|
igc-tabs::part(inner) {
|
|
33
19
|
flex-grow: 1;
|
|
34
|
-
|
|
35
20
|
}
|
|
36
21
|
|
|
37
22
|
igc-tabs {
|
|
38
23
|
igc-divider {
|
|
39
|
-
margin-block: rem(
|
|
24
|
+
margin-block: rem(16px) rem(24px);
|
|
40
25
|
|
|
41
26
|
&:last-of-type {
|
|
42
27
|
display: none;
|
|
@@ -53,7 +38,6 @@
|
|
|
53
38
|
|
|
54
39
|
.igd-search-tabs {
|
|
55
40
|
--item-background: var(--igd-layout-sections-bg);
|
|
56
|
-
--indicator-color: transparent;
|
|
57
41
|
--button-color: var(--igd-accent);
|
|
58
42
|
--button-hover-color: var(--igd-accent);
|
|
59
43
|
--button-background: var(--igd-layout-sections-bg);
|
|
@@ -92,21 +76,34 @@
|
|
|
92
76
|
|
|
93
77
|
igc-tab::part(content),
|
|
94
78
|
igc-tab::part(base) {
|
|
95
|
-
@include type-style('
|
|
79
|
+
@include type-style('body-2') {
|
|
96
80
|
margin: 0;
|
|
97
81
|
}
|
|
98
82
|
}
|
|
99
83
|
|
|
84
|
+
igc-tab::part(base) {
|
|
85
|
+
gap: rem(4px);
|
|
86
|
+
}
|
|
87
|
+
|
|
100
88
|
igc-tab::part(tab-body) {
|
|
101
89
|
overflow-y: auto;
|
|
102
90
|
flex: 1 1 auto;
|
|
103
91
|
min-height: 0;
|
|
104
|
-
padding-block: rem(
|
|
92
|
+
padding-block: rem(16px);
|
|
93
|
+
padding-inline: 0;
|
|
94
|
+
border-block-start: var(--igd-app-outline);
|
|
105
95
|
}
|
|
106
96
|
}
|
|
107
97
|
|
|
108
98
|
.igd-search-tab-count {
|
|
109
|
-
color: light-dark(var(--ig-gray-
|
|
99
|
+
color: light-dark(var(--ig-gray-400), var(--ig-gray-300));
|
|
100
|
+
|
|
101
|
+
&::before {
|
|
102
|
+
content: '(';
|
|
103
|
+
}
|
|
104
|
+
&::after {
|
|
105
|
+
content: ')';
|
|
106
|
+
}
|
|
110
107
|
}
|
|
111
108
|
|
|
112
109
|
.igd-search-refine-hint {
|
|
@@ -130,17 +127,12 @@
|
|
|
130
127
|
}
|
|
131
128
|
|
|
132
129
|
igc-divider {
|
|
133
|
-
--color: light-dark(var(--ig-gray-
|
|
130
|
+
--color: light-dark(var(--ig-gray-200), var(--ig-gray-300));
|
|
134
131
|
}
|
|
135
132
|
|
|
136
133
|
.igd-search-scope {
|
|
137
134
|
max-width: rem(250px);
|
|
138
135
|
|
|
139
|
-
&::part(input) {
|
|
140
|
-
min-width: 0;
|
|
141
|
-
overflow: hidden;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
136
|
&::part(native-input) {
|
|
145
137
|
min-width: 0;
|
|
146
138
|
overflow: hidden;
|
|
@@ -24,6 +24,11 @@ blockquote {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.igd-aside__title {
|
|
27
|
+
@include type-style('h5') {
|
|
28
|
+
font-weight: bold;
|
|
29
|
+
margin: 0;
|
|
30
|
+
};
|
|
31
|
+
|
|
27
32
|
grid-row: 1;
|
|
28
33
|
grid-column: 2;
|
|
29
34
|
align-self: center;
|
|
@@ -35,6 +40,11 @@ blockquote {
|
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
.igd-aside__content {
|
|
43
|
+
@include type-style('body-1') {
|
|
44
|
+
margin: 0;
|
|
45
|
+
font-weight: 400;
|
|
46
|
+
}
|
|
47
|
+
|
|
38
48
|
grid-column: 2;
|
|
39
49
|
grid-row: 2;
|
|
40
50
|
|
|
@@ -97,17 +107,3 @@ blockquote {
|
|
|
97
107
|
}
|
|
98
108
|
|
|
99
109
|
// TYPOGRAPHY STYLES
|
|
100
|
-
.igd-aside__title {
|
|
101
|
-
@include type-style('body-2') {
|
|
102
|
-
font-weight: bold;
|
|
103
|
-
margin: 0;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.igd-aside__content {
|
|
109
|
-
@include type-style('detail-1', false) {
|
|
110
|
-
margin: 0;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { ClientRouter } from 'astro:transitions';
|
|
3
|
-
import '@fontsource-variable/inter/wght.css';
|
|
4
|
-
import '@fontsource-variable/inter/wght-italic.css';
|
|
5
3
|
import '@fontsource-variable/jetbrains-mono/wght.css';
|
|
6
4
|
import '@fontsource-variable/jetbrains-mono/wght-italic.css';
|
|
7
5
|
import GlobalNavBar from '../../components/GlobalNavBar/GlobalNavBar.astro';
|
|
@@ -9,6 +7,7 @@ import GlobalFooter from '../../components/GlobalFooter/GlobalFooter.astro';
|
|
|
9
7
|
import DocsSubHeader from '../../components/DocsSubHeader/DocsSubHeader.astro';
|
|
10
8
|
import DocsBreadcrumb from '../../components/DocsBreadcrumb/DocsBreadcrumb.astro';
|
|
11
9
|
import LicenseIndicator from '../../components/LicenseIndicator/LicenseIndicator.astro';
|
|
10
|
+
import igLogoRaw from '../../assets/ig-logo.svg?raw';
|
|
12
11
|
import MobileSidebarToggle from '../../components/MobileSidebarToggle/MobileSidebarToggle.astro';
|
|
13
12
|
import CopyCode from '../../components/CopyCode/CopyCode.astro';
|
|
14
13
|
import { widgetScriptSrc, platform as virtualPlatform } from 'virtual:docs-template/nav-html';
|
|
@@ -73,6 +72,7 @@ type HeadEntry = { tag: string; attrs?: Record<string, string | boolean | undefi
|
|
|
73
72
|
{description && <meta name="description" content={description} />}
|
|
74
73
|
{keywords && <meta name="keywords" content={keywords} />}
|
|
75
74
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
75
|
+
<link rel="stylesheet" href="https://use.typekit.net/bng2zgw.css" />
|
|
76
76
|
{widgetScriptSrc && <script is:inline src={widgetScriptSrc} async></script>}
|
|
77
77
|
{(headEntries as HeadEntry[]).map(({ tag: Tag, attrs = {}, content }) =>
|
|
78
78
|
content ? <Tag {...attrs} set:html={content} /> : <Tag {...attrs} />
|
|
@@ -255,8 +255,10 @@ type HeadEntry = { tag: string; attrs?: Record<string, string | boolean | undefi
|
|
|
255
255
|
|
|
256
256
|
<div class="igd-main-content">
|
|
257
257
|
<div class="igd-main-content__inner">
|
|
258
|
+
|
|
258
259
|
<div class="igd-main-content__page">
|
|
259
260
|
<main class="igd-main-content__markdown">
|
|
261
|
+
<Fragment set:html={igLogoRaw} />
|
|
260
262
|
<LicenseIndicator license={licenseType} />
|
|
261
263
|
<DocsBreadcrumb pageTitle={ title } currentSlug={ currentSlug } siteTitle={ siteTitleProp }/>
|
|
262
264
|
<slot/>
|
|
@@ -264,9 +266,7 @@ type HeadEntry = { tag: string; attrs?: Record<string, string | boolean | undefi
|
|
|
264
266
|
</div>
|
|
265
267
|
|
|
266
268
|
{ hasToc && (
|
|
267
|
-
<
|
|
268
|
-
<slot name="toc"/>
|
|
269
|
-
</aside>
|
|
269
|
+
<slot name="toc"/>
|
|
270
270
|
) }
|
|
271
271
|
</div>
|
|
272
272
|
</div>
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
background: var(--igd-app-bg);
|
|
15
15
|
color: var(--igd-on-app-bg);
|
|
16
16
|
margin: 0;
|
|
17
|
+
position: relative;
|
|
17
18
|
z-index: 0;
|
|
18
19
|
|
|
19
20
|
&:not(:has(.igd-right-sidebar)) {
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
.igd-main-content {
|
|
29
30
|
display: grid;
|
|
30
31
|
position: relative;
|
|
32
|
+
//background: var(--ig-surface-500);
|
|
31
33
|
|
|
32
34
|
&:not(:has(.igd-right-sidebar)) {
|
|
33
35
|
.igd-main-pane {
|
|
@@ -36,48 +38,6 @@
|
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
|
-
|
|
40
|
-
// ── Static square grid background ────────────────────────────────────────────
|
|
41
|
-
// Pure CSS: two repeating-linear-gradients intersected via mask-composite
|
|
42
|
-
// create 4×4px squares at a 35px grid pitch.
|
|
43
|
-
// A radial vignette mask (3rd layer) fades them toward the edges.
|
|
44
|
-
&::before {
|
|
45
|
-
content: '';
|
|
46
|
-
position: absolute;
|
|
47
|
-
inset: 0;
|
|
48
|
-
inset-block-start: 0;
|
|
49
|
-
pointer-events: none;
|
|
50
|
-
user-select: none;
|
|
51
|
-
z-index: 0;
|
|
52
|
-
|
|
53
|
-
$pitch: 35px;
|
|
54
|
-
$sq: 3px;
|
|
55
|
-
$pad: 15.5px;
|
|
56
|
-
|
|
57
|
-
background-color: light-dark(var(--ig-gray-500), var(--igd-accent));
|
|
58
|
-
|
|
59
|
-
// Two mask layers intersected:
|
|
60
|
-
// horizontal-strips ∩ vertical-strips → squares with no edge fade
|
|
61
|
-
mask-image:
|
|
62
|
-
// 1. Horizontal 4px bands at 35px pitch (repeating-linear 0deg = top-to-bottom)
|
|
63
|
-
repeating-linear-gradient(0deg,
|
|
64
|
-
transparent 0, transparent #{$pad},
|
|
65
|
-
black #{$pad}, black #{$pad + $sq},
|
|
66
|
-
transparent #{$pad + $sq}, transparent #{$pitch}
|
|
67
|
-
),
|
|
68
|
-
// 2. Vertical 4px bands at 35px pitch (repeating-linear 90deg = left-to-right)
|
|
69
|
-
repeating-linear-gradient(90deg,
|
|
70
|
-
transparent 0, transparent #{$pad},
|
|
71
|
-
black #{$pad}, black #{$pad + $sq},
|
|
72
|
-
transparent #{$pad + $sq}, transparent #{$pitch}
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
mask-size: #{$pitch} #{$pitch}, #{$pitch} #{$pitch};
|
|
76
|
-
mask-composite: intersect;
|
|
77
|
-
-webkit-mask-composite: source-in;
|
|
78
|
-
|
|
79
|
-
opacity: .5;
|
|
80
|
-
}
|
|
81
41
|
}
|
|
82
42
|
|
|
83
43
|
.igd-main-content__page {
|
|
@@ -137,50 +97,28 @@
|
|
|
137
97
|
border-inline: var(--igd-app-outline);
|
|
138
98
|
width: clamp(rem(1200px), 100%, rem(1200px));
|
|
139
99
|
}
|
|
140
|
-
|
|
141
|
-
.igd-main-content__inner {
|
|
142
|
-
gap: rem(70px);
|
|
143
|
-
padding-inline: rem(70px) rem(32px);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.toc-sidebar {
|
|
147
|
-
border-inline: var(--igd-app-outline);
|
|
148
|
-
}
|
|
149
100
|
}
|
|
150
101
|
|
|
151
102
|
// ── Mobile + Tablet (< 1280px) — everything below desktop ──────────────────
|
|
152
103
|
@media (max-width: #{$bp-tablet-max}) {
|
|
153
104
|
:root {
|
|
154
|
-
--igd-header-height: #{rem(
|
|
155
|
-
--igd-page-padding: #{rem(
|
|
105
|
+
--igd-header-height: #{rem(60px)};
|
|
106
|
+
--igd-page-padding: #{rem(24px)};
|
|
156
107
|
}
|
|
157
|
-
|
|
108
|
+
|
|
158
109
|
// Single-column page grid; subheader follows via subgrid.
|
|
159
110
|
.igd-page-layout {
|
|
160
|
-
--igd-page-layout-grid: 1fr;
|
|
111
|
+
--igd-page-layout-grid: auto 1fr;
|
|
161
112
|
}
|
|
162
113
|
|
|
163
|
-
.igd-
|
|
164
|
-
grid-row: 2;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// Logo only shown on desktop, where it can sit in its own sidebar-aligned column.
|
|
168
|
-
.igd-logo {
|
|
114
|
+
.igd-logo__text {
|
|
169
115
|
display: none;
|
|
170
116
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
max-width: none;
|
|
175
|
-
width: auto;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.search-trigger__label,
|
|
179
|
-
.search-trigger__lable,
|
|
180
|
-
.search-trigger__hint {
|
|
181
|
-
display: none;
|
|
117
|
+
|
|
118
|
+
.igd-main-content {
|
|
119
|
+
grid-row: 2;
|
|
182
120
|
}
|
|
183
|
-
|
|
121
|
+
|
|
184
122
|
.igd-search-mobile-bar {
|
|
185
123
|
display: flex;
|
|
186
124
|
}
|
|
@@ -225,6 +163,13 @@
|
|
|
225
163
|
backdrop-filter: blur(10px);
|
|
226
164
|
}
|
|
227
165
|
}
|
|
166
|
+
|
|
167
|
+
body[data-sidebar-open],
|
|
168
|
+
body[data-search-modal-open] {
|
|
169
|
+
.globalnav {
|
|
170
|
+
z-index: 0;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
228
173
|
|
|
229
174
|
// Subheader sidebar toggle reveals when the sidebar is not persistent.
|
|
230
175
|
.subheader-sidebar-toggle {
|
|
@@ -233,9 +178,8 @@
|
|
|
233
178
|
}
|
|
234
179
|
|
|
235
180
|
// Logo inside the slide-in sidebar (visible only when sidebar is an overlay).
|
|
236
|
-
.sidebar-logo {
|
|
181
|
+
.igd-sidebar-logo {
|
|
237
182
|
display: flex;
|
|
238
|
-
margin-block-end: rem(16px);
|
|
239
183
|
}
|
|
240
184
|
|
|
241
185
|
.igd-main-content__inner {
|
|
@@ -245,21 +189,41 @@
|
|
|
245
189
|
// This is the height of the input in fluent theme + 8px padding + height of the logo above
|
|
246
190
|
.sidebar-gutter {
|
|
247
191
|
min-height: rem(80px);
|
|
192
|
+
align-items: center;
|
|
248
193
|
}
|
|
249
194
|
}
|
|
250
195
|
|
|
251
196
|
// ── Mobile only (< 768px) ──────────────────────────────────────────────────
|
|
252
197
|
@media (max-width: #{$bp-mobile-max}) {
|
|
253
|
-
.
|
|
254
|
-
|
|
198
|
+
.search-decoration {
|
|
199
|
+
width: 40px;
|
|
200
|
+
aspect-ratio: 1;
|
|
201
|
+
|
|
202
|
+
.search-trigger {
|
|
203
|
+
display: none;
|
|
204
|
+
}
|
|
255
205
|
}
|
|
256
|
-
|
|
206
|
+
|
|
207
|
+
.search-trigger-mobile {
|
|
208
|
+
--size: 100%;
|
|
209
|
+
--border-radius: #{rem(10px)};
|
|
210
|
+
|
|
211
|
+
display: flex;
|
|
212
|
+
|
|
213
|
+
width: 100%;
|
|
214
|
+
height: 100%;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.igniteui-page-logo {
|
|
218
|
+
display: block;
|
|
219
|
+
}
|
|
220
|
+
|
|
257
221
|
.igd-version-select {
|
|
258
222
|
max-width: rem(90px);
|
|
259
223
|
}
|
|
260
224
|
|
|
261
225
|
.igd-docs-subheader {
|
|
262
|
-
padding-inline
|
|
226
|
+
padding-inline: rem(16px);
|
|
263
227
|
}
|
|
264
228
|
|
|
265
229
|
.igd-docs-subheader__content:last-child {
|
|
@@ -286,31 +250,30 @@
|
|
|
286
250
|
// (those files load after this one in the Astro bundle).
|
|
287
251
|
.igd-page-layout .search-dialog,
|
|
288
252
|
.igd-page-layout .igd-search-dialog::part(base) {
|
|
253
|
+
--border-radius: #{rem(8px)};
|
|
254
|
+
|
|
289
255
|
margin: 0;
|
|
290
256
|
width: 100%;
|
|
291
257
|
max-width: 100%;
|
|
292
258
|
height: 100dvh;
|
|
293
259
|
max-height: 100dvh;
|
|
294
|
-
border-radius: 0;
|
|
295
260
|
}
|
|
296
261
|
|
|
297
|
-
.search-trigger.search-close {
|
|
298
|
-
display: flex;
|
|
299
|
-
flex-shrink: 0;
|
|
300
|
-
padding-inline: var(--igd-padding-sm);
|
|
301
|
-
}
|
|
302
262
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
inset 0 1px 0 var(--igd-accent),
|
|
309
|
-
inset 0 -1px 0 var(--igd-accent),
|
|
310
|
-
-1px 0 0 var(--igd-accent);
|
|
311
|
-
}
|
|
263
|
+
.igd-search-shell {
|
|
264
|
+
grid-template-rows: auto calc(100% - (var(--search-header-footer-height) * 2)) auto;
|
|
265
|
+
|
|
266
|
+
igc-divider {
|
|
267
|
+
margin-block-start: auto;
|
|
312
268
|
}
|
|
313
269
|
}
|
|
270
|
+
|
|
271
|
+
.igd-search-footer {
|
|
272
|
+
display: flex;
|
|
273
|
+
align-items: center;
|
|
274
|
+
justify-content: end;
|
|
275
|
+
border-block-start: var(--igd-app-outline);
|
|
276
|
+
}
|
|
314
277
|
}
|
|
315
278
|
|
|
316
279
|
@media (max-width: #{$bp-hide-toc}) {
|
|
@@ -320,7 +283,6 @@
|
|
|
320
283
|
}
|
|
321
284
|
}
|
|
322
285
|
|
|
323
|
-
|
|
324
286
|
.igd-main-content__page {
|
|
325
287
|
border: none;
|
|
326
288
|
}
|
|
@@ -329,7 +291,7 @@
|
|
|
329
291
|
// ── Tablet + Desktop (≥ 768px) ─────────────────────────────────────────────
|
|
330
292
|
@media (min-width: #{$bp-tablet-min}) {
|
|
331
293
|
.sidebar-gutter {
|
|
332
|
-
&:has(.sidebar-logo:only-child) {
|
|
294
|
+
&:has(.igd-sidebar-logo:only-child) {
|
|
333
295
|
display: none;
|
|
334
296
|
}
|
|
335
297
|
}
|
|
@@ -337,5 +299,4 @@
|
|
|
337
299
|
.igd-page-layout {
|
|
338
300
|
justify-content: center;
|
|
339
301
|
}
|
|
340
|
-
|
|
341
302
|
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon Manifest — side-effect-free module.
|
|
3
|
+
*
|
|
4
|
+
* Provides the full list of icon names and their raw SVG content.
|
|
5
|
+
* Imported by both icon-registry.ts (to register icons) and
|
|
6
|
+
* the playground IconGallery component (to render the gallery).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const DOCS_COLLECTION = 'docs';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Legacy aliases: maps the icon name used in markup → actual filename stem.
|
|
13
|
+
* Only needed when the desired name differs from the filename (minus .svg).
|
|
14
|
+
*/
|
|
15
|
+
export const ALIASES: Record<string, string> = {
|
|
16
|
+
'expand': 'expand-icon',
|
|
17
|
+
'react-logo': 'react',
|
|
18
|
+
'wc-logo': 'web-component-logo',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** Icon names that belong to the "brand" category (logos). */
|
|
22
|
+
export const BRAND_ICONS = new Set([
|
|
23
|
+
'angular-logo', 'blazor-logo', 'react-logo', 'wc-logo',
|
|
24
|
+
'github-logo', 'chatgpt', 'claude',
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
// Vite glob — imports raw SVG content at build time.
|
|
28
|
+
const svgModules = import.meta.glob('../assets/icons/*.svg', {
|
|
29
|
+
query: '?raw',
|
|
30
|
+
import: 'default',
|
|
31
|
+
eager: true,
|
|
32
|
+
}) as Record<string, string>;
|
|
33
|
+
|
|
34
|
+
export interface IconEntry {
|
|
35
|
+
/** The name used in `<igc-icon name="...">` */
|
|
36
|
+
name: string;
|
|
37
|
+
/** The actual filename stem (without .svg) */
|
|
38
|
+
stem: string;
|
|
39
|
+
/** The actual filename (with .svg) */
|
|
40
|
+
filename: string;
|
|
41
|
+
/** Raw SVG content */
|
|
42
|
+
svg: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function buildIconList(): IconEntry[] {
|
|
46
|
+
const stemToSvg = new Map<string, string>();
|
|
47
|
+
for (const [p, svg] of Object.entries(svgModules)) {
|
|
48
|
+
const stem = p.split('/').pop()!.replace(/\.svg$/, '');
|
|
49
|
+
stemToSvg.set(stem, svg);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const entries: IconEntry[] = [];
|
|
53
|
+
const registeredStems = new Set<string>();
|
|
54
|
+
|
|
55
|
+
// Alias entries first
|
|
56
|
+
for (const [alias, stem] of Object.entries(ALIASES)) {
|
|
57
|
+
if (stemToSvg.has(stem)) {
|
|
58
|
+
entries.push({ name: alias, stem, filename: stem + '.svg', svg: stemToSvg.get(stem)! });
|
|
59
|
+
registeredStems.add(stem);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Remaining icons use stem as name
|
|
64
|
+
for (const [stem, svg] of stemToSvg) {
|
|
65
|
+
if (!registeredStems.has(stem)) {
|
|
66
|
+
entries.push({ name: stem, stem, filename: stem + '.svg', svg });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return entries.sort((a, b) => a.name.localeCompare(b.name));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export const ICON_LIST: IconEntry[] = buildIconList();
|
|
@@ -12,44 +12,13 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { registerIconFromText } from 'igniteui-webcomponents';
|
|
15
|
+
import { ICON_LIST, DOCS_COLLECTION } from './icon-manifest';
|
|
15
16
|
|
|
16
|
-
export
|
|
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>;
|
|
17
|
+
export { DOCS_COLLECTION };
|
|
31
18
|
|
|
32
19
|
export function registerIcons(): void {
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
}
|
|
20
|
+
for (const { name, svg } of ICON_LIST) {
|
|
21
|
+
registerIconFromText(name, svg, DOCS_COLLECTION);
|
|
53
22
|
}
|
|
54
23
|
}
|
|
55
24
|
|