igniteui-astro-components 0.0.7 → 0.0.8
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 +4 -2
- package/src/assets/icons/open-link-blank.svg +1 -1
- package/src/assets/logos/code-sandbox.svg +14 -0
- package/src/assets/logos/stackblitz.svg +13 -0
- package/src/components/DocsBreadcrumb/DocsBreadcrumb.scss +1 -1
- package/src/components/DocsSidebar/DocsSidebar.astro +15 -8
- package/src/components/DocsSidebar/DocsSidebar.scss +152 -2
- package/src/components/DocsSidebar/SidebarFilterInput.scss +7 -3
- package/src/components/DocsSidebar/SidebarLabel.astro +25 -4
- package/src/components/DocsSidebar/toTreeNodes.ts +1 -1
- package/src/components/DocsSubHeader/DocsSubHeader.astro +119 -302
- package/src/components/DocsSubHeader/DocsSubHeader.scss +111 -11
- package/src/components/DocsToc/DocsToc.astro +5 -2
- package/src/components/DocsTree/DocsTree.astro +9 -0
- package/src/components/DocsTree/docs-tree.scss +139 -118
- package/src/components/GlobalNavBar/GlobalNavBar.module.scss +16 -1
- package/src/components/LicenseIndicator/LicenseIndicator.astro +19 -0
- package/src/components/LicenseIndicator/LicenseIndicator.scss +5 -0
- package/src/components/Search/Search.astro +34 -15
- package/src/components/Search/Search.scss +10 -42
- package/src/components/SearchAdvanced/SearchAdvanced.astro +182 -355
- package/src/components/SearchAdvanced/SearchAdvanced.scss +177 -0
- package/src/components/mdx/ApiRef/README.md +1 -1
- package/src/components/mdx/DocsAside/DocsAside.astro +37 -32
- package/src/components/mdx/DocsAside/DocsAside.scss +123 -35
- package/src/components/mdx/Sample/Sample.astro +55 -45
- package/src/components/mdx/Sample/Sample.scss +173 -30
- package/src/integration.ts +7 -0
- package/src/layouts/DocsLayout/DocsLayout.astro +58 -16
- package/src/layouts/DocsLayout/DocsLayout.scss +51 -6
- package/src/lib/sidebar/helpers.ts +14 -1
- package/src/lib/sidebar/types.ts +5 -7
- package/src/plugins/rehype-heading-anchors.ts +74 -0
- package/src/plugins/rehype-table-wrapper.ts +49 -0
- package/src/plugins/remark-docfx.ts +0 -0
- package/src/scripts/sample-widget.ts +107 -114
- package/src/styles/global/_breakpoints.scss +4 -4
- package/src/styles/global/_code-blocks.scss +1 -1
- package/src/styles/global/_component-themes.scss +118 -18
- package/src/styles/global/_index.scss +2 -2
- package/src/styles/global/_markdown.scss +444 -32
- package/src/styles/global/_palette.scss +7 -0
- package/src/styles/global/_search-shared.scss +273 -0
- package/src/styles/global/_variables.scss +58 -3
- package/src/styles/theme.scss +80 -11
- package/src/assets/icons/copy-clipboard.svg +0 -3
- package/src/assets/icons/filter-clear.svg +0 -1
- package/src/styles/custom.scss +0 -20
|
@@ -7,12 +7,19 @@
|
|
|
7
7
|
* This module handles the dynamic parts:
|
|
8
8
|
* – Serial iframe loading (one at a time, IntersectionObserver-based)
|
|
9
9
|
* – Code-tab fetching and rendering (Angular JSON or xplat JSON)
|
|
10
|
-
* – Tab switching
|
|
10
|
+
* – Tab switching via <igc-tabs> / <igc-tab> web components
|
|
11
11
|
* – Live-editing footer (StackBlitz / CodeSandbox)
|
|
12
12
|
*
|
|
13
|
-
* Selector: `.code-view[data-platform]`
|
|
13
|
+
* Selector: `.igd-code-view[data-platform]`
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
import { defineComponents, IgcTabsComponent, IgcTabComponent, IgcButtonComponent, IgcIconButtonComponent, IgcIconComponent, IgcCircularProgressComponent } from 'igniteui-webcomponents';
|
|
17
|
+
defineComponents(IgcTabsComponent, IgcTabComponent, IgcButtonComponent, IgcIconButtonComponent, IgcIconComponent, IgcCircularProgressComponent);
|
|
18
|
+
|
|
19
|
+
import './icon-registry';
|
|
20
|
+
import stackblitzSvg from '../assets/logos/stackblitz.svg?raw';
|
|
21
|
+
import codeSandboxSvg from '../assets/logos/code-sandbox.svg?raw';
|
|
22
|
+
|
|
16
23
|
// ─── Constants ────────────────────────────────────────────────────────────────
|
|
17
24
|
|
|
18
25
|
const SAMPLES_ORDER = ['modules', 'ts', 'html', 'scss', 'css'];
|
|
@@ -47,9 +54,7 @@ interface WidgetContext {
|
|
|
47
54
|
iframeSrc: string;
|
|
48
55
|
demosBaseUrl: string;
|
|
49
56
|
widgetIndex: number;
|
|
50
|
-
|
|
51
|
-
container: HTMLElement;
|
|
52
|
-
activateTab: (tab: HTMLElement) => void;
|
|
57
|
+
igcTabs: HTMLElement;
|
|
53
58
|
githubSrc: string;
|
|
54
59
|
}
|
|
55
60
|
|
|
@@ -106,87 +111,51 @@ function replaceRelativeAssetUrls(files: SampleFile[], demosBaseUrl: string): vo
|
|
|
106
111
|
});
|
|
107
112
|
}
|
|
108
113
|
|
|
109
|
-
// ─── Tab Switching ────────────────────────────────────────────────────────────
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Returns an `activateTab` callback that mirrors the original buildShell closure.
|
|
113
|
-
* Operates purely on the pre-rendered HTML — no DOM construction needed.
|
|
114
|
-
*/
|
|
115
|
-
function buildActivateTab(
|
|
116
|
-
navbar: HTMLElement,
|
|
117
|
-
container: HTMLElement,
|
|
118
|
-
fsBtn: HTMLElement | null,
|
|
119
|
-
exampleTabId: string,
|
|
120
|
-
): (tab: HTMLElement) => void {
|
|
121
|
-
return function activateTab(tab: HTMLElement) {
|
|
122
|
-
navbar.querySelectorAll<HTMLElement>('.code-view-tab, .code-view-tab--active').forEach(t => {
|
|
123
|
-
t.classList.remove('code-view-tab--active');
|
|
124
|
-
t.classList.add('code-view-tab');
|
|
125
|
-
});
|
|
126
|
-
container.querySelectorAll<HTMLElement>('.code-view-tab-content').forEach(c => {
|
|
127
|
-
c.style.display = 'none';
|
|
128
|
-
});
|
|
129
|
-
tab.classList.remove('code-view-tab');
|
|
130
|
-
tab.classList.add('code-view-tab--active');
|
|
131
|
-
const pane = container.querySelector<HTMLElement>('#' + tab.dataset.tabId);
|
|
132
|
-
if (pane) pane.style.display = '';
|
|
133
|
-
if (fsBtn) {
|
|
134
|
-
fsBtn.style.visibility = tab.dataset.tabId === exampleTabId ? 'visible' : 'hidden';
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
|
|
139
114
|
// ─── Code Tab Rendering ───────────────────────────────────────────────────────
|
|
140
115
|
|
|
141
116
|
function addCodeTab(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
activateTab: (tab: HTMLElement) => void,
|
|
145
|
-
widgetIndex: number,
|
|
146
|
-
file: SampleFile,
|
|
147
|
-
tabIndex: number,
|
|
117
|
+
igcTabs: HTMLElement,
|
|
118
|
+
file: SampleFile,
|
|
148
119
|
): void {
|
|
149
|
-
const lang
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
copyBtn.className = 'cv-hljs-code-copy hidden';
|
|
174
|
-
copyBtn.textContent = 'COPY CODE';
|
|
120
|
+
const lang = file.fileExtension === 'js' ? 'javascript' : (file.fileExtension || 'text');
|
|
121
|
+
|
|
122
|
+
const tab = document.createElement('igc-tab');
|
|
123
|
+
tab.setAttribute('label', file.fileHeader.toUpperCase());
|
|
124
|
+
|
|
125
|
+
const wrapper = document.createElement('div');
|
|
126
|
+
wrapper.className = 'code-wrapper';
|
|
127
|
+
|
|
128
|
+
const pre = document.createElement('pre');
|
|
129
|
+
const code = document.createElement('code');
|
|
130
|
+
code.className = `language-${lang}`;
|
|
131
|
+
code.textContent = file.content;
|
|
132
|
+
pre.appendChild(code);
|
|
133
|
+
|
|
134
|
+
const copyBtn = document.createElement('igc-icon-button') as HTMLElement;
|
|
135
|
+
copyBtn.setAttribute('variant', 'outlined');
|
|
136
|
+
copyBtn.setAttribute('aria-label', 'Copy code');
|
|
137
|
+
copyBtn.className = 'cv-hljs-code-copy';
|
|
138
|
+
|
|
139
|
+
const copyIcon = document.createElement('igc-icon');
|
|
140
|
+
copyIcon.setAttribute('name', 'copy');
|
|
141
|
+
copyIcon.setAttribute('collection', 'docs');
|
|
142
|
+
copyBtn.appendChild(copyIcon);
|
|
143
|
+
|
|
175
144
|
copyBtn.addEventListener('click', () => {
|
|
176
145
|
navigator.clipboard.writeText(file.content).then(() => {
|
|
177
|
-
|
|
178
|
-
copyBtn.
|
|
179
|
-
setTimeout(() => {
|
|
146
|
+
copyIcon.setAttribute('name', 'check');
|
|
147
|
+
copyBtn.setAttribute('aria-label', 'Code copied');
|
|
148
|
+
setTimeout(() => {
|
|
149
|
+
copyIcon.setAttribute('name', 'copy');
|
|
150
|
+
copyBtn.setAttribute('aria-label', 'Copy code');
|
|
151
|
+
}, 1500);
|
|
180
152
|
});
|
|
181
153
|
});
|
|
182
154
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
pre.appendChild(copyBtn);
|
|
188
|
-
pane.appendChild(pre);
|
|
189
|
-
container.appendChild(pane);
|
|
155
|
+
wrapper.appendChild(pre);
|
|
156
|
+
wrapper.appendChild(copyBtn);
|
|
157
|
+
tab.appendChild(wrapper);
|
|
158
|
+
igcTabs.appendChild(tab);
|
|
190
159
|
|
|
191
160
|
if (typeof (window as any).hljs !== 'undefined') {
|
|
192
161
|
(window as any).hljs.highlightElement(code);
|
|
@@ -197,32 +166,46 @@ function addCodeTab(
|
|
|
197
166
|
|
|
198
167
|
function addFooter(
|
|
199
168
|
widget: HTMLElement,
|
|
169
|
+
iframeSrc: string,
|
|
200
170
|
explicitEditor: string | null,
|
|
201
171
|
onStackblitz: (() => void) | null,
|
|
202
172
|
onCodeSandbox: (() => void) | null,
|
|
203
173
|
): void {
|
|
204
174
|
const footer = document.createElement('div');
|
|
205
|
-
footer.className = '
|
|
175
|
+
footer.className = 'igd-code-view__footer-actions';
|
|
206
176
|
|
|
207
177
|
const label = document.createElement('span');
|
|
208
178
|
label.className = 'editing-label';
|
|
209
|
-
label.textContent = 'Edit in: ';
|
|
210
179
|
footer.appendChild(label);
|
|
211
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
|
+
|
|
212
193
|
if ((!explicitEditor || explicitEditor === 'stackblitz') && onStackblitz) {
|
|
213
|
-
const btn
|
|
214
|
-
btn.
|
|
215
|
-
btn.
|
|
216
|
-
btn.
|
|
194
|
+
const btn = document.createElement('igc-button') as HTMLElement;
|
|
195
|
+
btn.setAttribute('variant', 'outlined');
|
|
196
|
+
btn.setAttribute('aria-label', 'Edit in StackBlitz');
|
|
197
|
+
btn.className = 'stackblitz-btn igd-edit-in-btn';
|
|
198
|
+
btn.innerHTML = stackblitzSvg;
|
|
217
199
|
btn.addEventListener('click', onStackblitz);
|
|
218
200
|
footer.appendChild(btn);
|
|
219
201
|
}
|
|
220
202
|
|
|
221
203
|
if ((!explicitEditor || explicitEditor === 'csb') && onCodeSandbox) {
|
|
222
|
-
const btn
|
|
223
|
-
btn.
|
|
224
|
-
btn.
|
|
225
|
-
btn.
|
|
204
|
+
const btn = document.createElement('igc-button') as HTMLElement;
|
|
205
|
+
btn.setAttribute('variant', 'outlined');
|
|
206
|
+
btn.setAttribute('aria-label', 'Edit in CodeSandbox');
|
|
207
|
+
btn.className = 'codesandbox-btn igd-edit-in-btn';
|
|
208
|
+
btn.innerHTML = codeSandboxSvg;
|
|
226
209
|
btn.addEventListener('click', onCodeSandbox);
|
|
227
210
|
footer.appendChild(btn);
|
|
228
211
|
}
|
|
@@ -234,7 +217,7 @@ function addFooter(
|
|
|
234
217
|
|
|
235
218
|
class AngularCodeService {
|
|
236
219
|
async init(ctx: WidgetContext): Promise<void> {
|
|
237
|
-
const { widget, iframeSrc, demosBaseUrl, widgetIndex,
|
|
220
|
+
const { widget, iframeSrc, demosBaseUrl, widgetIndex, igcTabs } = ctx;
|
|
238
221
|
const samplePath = getSamplePath(iframeSrc, demosBaseUrl);
|
|
239
222
|
const isDv = isDvSample(samplePath);
|
|
240
223
|
const assetDir = isDv ? 'code-viewer' : 'samples';
|
|
@@ -273,15 +256,15 @@ class AngularCodeService {
|
|
|
273
256
|
.filter((f: SampleFile) => f.isMain)
|
|
274
257
|
.sort((a: SampleFile, b: SampleFile) =>
|
|
275
258
|
SAMPLES_ORDER.indexOf(a.fileHeader) - SAMPLES_ORDER.indexOf(b.fileHeader))
|
|
276
|
-
.forEach((file: SampleFile
|
|
277
|
-
addCodeTab(
|
|
259
|
+
.forEach((file: SampleFile) =>
|
|
260
|
+
addCodeTab(igcTabs, file));
|
|
278
261
|
|
|
279
262
|
const onStackblitz = isDv ? null : () => this._openInStackBlitz(sampleData, sharedData);
|
|
280
|
-
addFooter(widget, explicitEditor, onStackblitz, fallbackCodeSandbox);
|
|
263
|
+
addFooter(widget, iframeSrc, explicitEditor, onStackblitz, fallbackCodeSandbox);
|
|
281
264
|
|
|
282
265
|
} catch (err: any) {
|
|
283
266
|
console.warn('[sample-widget] Could not fetch Angular sample files:', err.message);
|
|
284
|
-
addFooter(widget, explicitEditor, fallbackStackblitz, fallbackCodeSandbox);
|
|
267
|
+
addFooter(widget, iframeSrc, explicitEditor, fallbackStackblitz, fallbackCodeSandbox);
|
|
285
268
|
}
|
|
286
269
|
}
|
|
287
270
|
|
|
@@ -364,11 +347,11 @@ class XplatCodeService {
|
|
|
364
347
|
}
|
|
365
348
|
|
|
366
349
|
async init(ctx: WidgetContext): Promise<void> {
|
|
367
|
-
const { widget, iframeSrc, demosBaseUrl,
|
|
350
|
+
const { widget, iframeSrc, demosBaseUrl, igcTabs, githubSrc } = ctx;
|
|
368
351
|
const samplePath = getSamplePath(iframeSrc, demosBaseUrl);
|
|
369
352
|
const addXplatFooter = () => {
|
|
370
353
|
if (!this.enableLiveEditing || !githubSrc) return;
|
|
371
|
-
addFooter(widget, 'csb', null, () => this._openCodeSandbox(githubSrc, demosBaseUrl));
|
|
354
|
+
addFooter(widget, iframeSrc, 'csb', null, () => this._openCodeSandbox(githubSrc, demosBaseUrl));
|
|
372
355
|
};
|
|
373
356
|
|
|
374
357
|
try {
|
|
@@ -386,8 +369,8 @@ class XplatCodeService {
|
|
|
386
369
|
.filter((f: SampleFile) => f.isMain)
|
|
387
370
|
.sort((a: SampleFile, b: SampleFile) =>
|
|
388
371
|
this.samplesOrder.indexOf(a.fileHeader) - this.samplesOrder.indexOf(b.fileHeader))
|
|
389
|
-
.forEach((file: SampleFile
|
|
390
|
-
addCodeTab(
|
|
372
|
+
.forEach((file: SampleFile) =>
|
|
373
|
+
addCodeTab(igcTabs, file));
|
|
391
374
|
|
|
392
375
|
addXplatFooter();
|
|
393
376
|
} catch (err: any) {
|
|
@@ -430,6 +413,8 @@ export function initSampleWidgets(): void {
|
|
|
430
413
|
|
|
431
414
|
iframe.addEventListener('load', () => {
|
|
432
415
|
samplePane.classList.remove('loading');
|
|
416
|
+
samplePane.removeAttribute('aria-busy');
|
|
417
|
+
iframe.removeAttribute('aria-hidden');
|
|
433
418
|
iframeLoading = false;
|
|
434
419
|
processIframeQueue();
|
|
435
420
|
}, { once: true });
|
|
@@ -437,7 +422,7 @@ export function initSampleWidgets(): void {
|
|
|
437
422
|
iframe.src = iframe.dataset.src!;
|
|
438
423
|
}
|
|
439
424
|
|
|
440
|
-
document.querySelectorAll<HTMLElement>('.code-view[data-platform]').forEach((widget, index) => {
|
|
425
|
+
document.querySelectorAll<HTMLElement>('.igd-code-view[data-platform]').forEach((widget, index) => {
|
|
441
426
|
// Skip widgets already initialized (e.g. Astro client router restoring a cached page).
|
|
442
427
|
if (widget.dataset.widgetInitialized) return;
|
|
443
428
|
widget.dataset.widgetInitialized = 'true';
|
|
@@ -449,28 +434,36 @@ export function initSampleWidgets(): void {
|
|
|
449
434
|
|
|
450
435
|
if (!iframeSrc) return;
|
|
451
436
|
|
|
452
|
-
const
|
|
453
|
-
const
|
|
454
|
-
const samplePane = widget.querySelector<HTMLElement>('.sample-container');
|
|
437
|
+
const igcTabs = widget.querySelector<HTMLElement>('igc-tabs');
|
|
438
|
+
const samplePane = widget.querySelector<HTMLElement>('.igd-sample-container');
|
|
455
439
|
const iframe = widget.querySelector<HTMLIFrameElement>('iframe');
|
|
456
|
-
const fsBtn = widget.querySelector<HTMLElement>('.fs-button-container');
|
|
457
|
-
const exampleTab = widget.querySelector<HTMLElement>('.code-view-tab--active');
|
|
458
440
|
|
|
459
|
-
if (!
|
|
441
|
+
if (!igcTabs) return;
|
|
460
442
|
|
|
461
|
-
const exampleTabId =
|
|
462
|
-
const activateTab = buildActivateTab(navbar, container, fsBtn, exampleTabId);
|
|
443
|
+
const exampleTabId = `${widget.id}-example`;
|
|
463
444
|
|
|
464
|
-
//
|
|
465
|
-
|
|
445
|
+
// Toggle fullscreen button visibility based on active tab.
|
|
446
|
+
igcTabs.addEventListener('igcChange', (e: Event) => {
|
|
447
|
+
const detail = (e as CustomEvent<HTMLElement>).detail;
|
|
448
|
+
const btn = widget.querySelector<HTMLElement>('.igd-full-screen-btn');
|
|
449
|
+
if (btn) {
|
|
450
|
+
btn.style.display = detail?.id === exampleTabId ? '' : 'none';
|
|
451
|
+
}
|
|
452
|
+
});
|
|
466
453
|
|
|
467
|
-
//
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
454
|
+
// Wire copy buttons for pre-rendered code tabs (e.g. MockSample in playground).
|
|
455
|
+
widget.querySelectorAll<HTMLElement>('.code-wrapper').forEach(pre => {
|
|
456
|
+
const btn = pre.querySelector<HTMLElement>('.cv-hljs-code-copy');
|
|
457
|
+
const icon = btn?.querySelector<HTMLElement>('igc-icon');
|
|
458
|
+
const code = pre.querySelector<HTMLElement>('code');
|
|
459
|
+
if (!btn || !code) return;
|
|
460
|
+
btn.addEventListener('click', () => {
|
|
461
|
+
navigator.clipboard.writeText(code.textContent ?? '').then(() => {
|
|
462
|
+
icon?.setAttribute('name', 'check');
|
|
463
|
+
setTimeout(() => { icon?.setAttribute('name', 'copy'); }, 1500);
|
|
464
|
+
});
|
|
472
465
|
});
|
|
473
|
-
}
|
|
466
|
+
});
|
|
474
467
|
|
|
475
468
|
// Enqueue iframe loading.
|
|
476
469
|
if (iframe && samplePane) {
|
|
@@ -495,7 +488,7 @@ export function initSampleWidgets(): void {
|
|
|
495
488
|
: new AngularCodeService();
|
|
496
489
|
|
|
497
490
|
const ctx: WidgetContext = {
|
|
498
|
-
widget, iframeSrc, demosBaseUrl, widgetIndex: index,
|
|
491
|
+
widget, iframeSrc, demosBaseUrl, widgetIndex: index, igcTabs, githubSrc,
|
|
499
492
|
};
|
|
500
493
|
|
|
501
494
|
// Fetch code-tab data only when the widget becomes visible.
|
|
@@ -37,12 +37,12 @@ $bp-tablet-min: #{rem(768px)};
|
|
|
37
37
|
/// Start of desktop (≥ 1024px)
|
|
38
38
|
$bp-desktop-min: #{rem(1024px)};
|
|
39
39
|
|
|
40
|
-
/// Start of large-desktop (≥
|
|
41
|
-
$bp-large-desktop-min: #{rem(
|
|
40
|
+
/// Start of large-desktop (≥ 1280px)
|
|
41
|
+
$bp-large-desktop-min: #{rem(1280px)};
|
|
42
42
|
|
|
43
43
|
/// Layout-specific
|
|
44
44
|
/// Below this the sidebar becomes a slide-in overlay (< 1300px)
|
|
45
|
-
$bp-sidebar-max: #{rem(
|
|
45
|
+
$bp-sidebar-max: #{rem(1600px)};
|
|
46
46
|
|
|
47
47
|
/// At this and above the sidebar is always visible (≥ 1300px)
|
|
48
|
-
$bp-sidebar-min: #{rem(
|
|
48
|
+
$bp-sidebar-min: #{rem(1400px)};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
@use '../../styles/global/breakpoints' as *;
|
|
1
2
|
@use 'igniteui-theming' as *;
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
|
|
4
5
|
/* Custom drop-down theme for igc-select (Web Components) */
|
|
5
6
|
igc-select {
|
|
6
7
|
// TODO as а user i want to be able to add border on the entier dropdown
|
|
@@ -35,7 +36,65 @@ igc-select {
|
|
|
35
36
|
--ig-drop-down-selected-focus-item-background: transparent;
|
|
36
37
|
|
|
37
38
|
// TODO this controls the item size which is very confusing
|
|
38
|
-
--ig-drop-down-size: #{rem(40px)}
|
|
39
|
+
--ig-drop-down-size: #{rem(40px)};
|
|
40
|
+
|
|
41
|
+
--ig-input-group-input-prefix-background: transparent;
|
|
42
|
+
--ig-input-group-input-prefix-background--filled: transparent;
|
|
43
|
+
--ig-input-group-input-prefix-color--filled: var(--ig-gray-900);
|
|
44
|
+
--ig-input-group-input-prefix-background--focused: transparent;
|
|
45
|
+
--ig-input-group-input-prefix-color--focused: var(--ig-gray-900);
|
|
46
|
+
--ig-input-group-input-suffix-background: transparent;
|
|
47
|
+
--ig-input-group-input-suffix-background--filled: transparent;
|
|
48
|
+
--ig-input-group-input-suffix-color--filled: var(--ig-gray-900);
|
|
49
|
+
--ig-input-group-input-suffix-background--focused: transparent;
|
|
50
|
+
--ig-input-group-input-suffix-color--focused: var(--ig-gray-900);
|
|
51
|
+
--ig-input-group-idle-text-color: var(--ig-gray-900);
|
|
52
|
+
--ig-input-group-disabled-border-color: transparent;
|
|
53
|
+
--ig-input-group-border-color: transparent;
|
|
54
|
+
--ig-input-group-focused-border-color: transparent;
|
|
55
|
+
--ig-input-group-hover-border-color: transparent;
|
|
56
|
+
--ig-input-group-border-disabled-background: transparent;
|
|
57
|
+
--ig-select-toggle-button-background: transparent;
|
|
58
|
+
--ig-select-toggle-button-background-focus: transparent;
|
|
59
|
+
--ig-select-toggle-button-foreground: var(--ig-gray-900);
|
|
60
|
+
--ig-select-toggle-button-foreground-focus: var(--igd-accent);
|
|
61
|
+
--ig-select-toggle-button-foreground-filled: var(--ig-gray-900);
|
|
62
|
+
--ig-select-toggle-button-background-disabled: transparent;
|
|
63
|
+
--ig-select-toggle-button-foreground-disabled: var(--ig-gray-400);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
igc-select::part(toggle-icon) {
|
|
67
|
+
padding-inline-start: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@media (max-width: #{$bp-mobile-max}) {
|
|
72
|
+
.igd-version-select {
|
|
73
|
+
max-width: rem(90px);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (min-width: #{$bp-mobile-max}) {
|
|
78
|
+
.igd-package-select::part(native-input),
|
|
79
|
+
.igd-version-select::part(native-input) {
|
|
80
|
+
field-sizing: content;
|
|
81
|
+
|
|
82
|
+
&::part(base) {
|
|
83
|
+
min-width: 100%;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
igc-select-item {
|
|
91
|
+
margin-block: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
igc-select::part(container) {
|
|
95
|
+
@include type-style('body-2') {
|
|
96
|
+
margin: 0;
|
|
97
|
+
};
|
|
39
98
|
}
|
|
40
99
|
|
|
41
100
|
igc-select::part(base) {
|
|
@@ -45,24 +104,65 @@ igc-select::part(base) {
|
|
|
45
104
|
min-width: fit-content;
|
|
46
105
|
}
|
|
47
106
|
|
|
48
|
-
igc-
|
|
49
|
-
|
|
50
|
-
|
|
107
|
+
igc-icon-button[variant='outlined'] {
|
|
108
|
+
--foreground: light-dark(var(--ig-gray-900), var(--ig-gray-200));
|
|
109
|
+
--hover-foreground: var(--igd-accent);
|
|
110
|
+
--focus-foreground: var(--igd-accent);
|
|
111
|
+
--active-foreground: var(--igd-accent);
|
|
112
|
+
--focus-hover-foreground: var(--igd-accent);
|
|
113
|
+
|
|
114
|
+
--hover-background: transparent;
|
|
115
|
+
--focus-background: transparent;
|
|
116
|
+
--active-background: transparent;
|
|
117
|
+
--focus-hover-background: transparent;
|
|
118
|
+
--focus-visible-background: transparent;
|
|
119
|
+
|
|
120
|
+
--border-color: light-dark(var(--ig-gray-400), var(--ig-gray-700));
|
|
121
|
+
--focus-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-700));
|
|
122
|
+
--border-radius: #{rem(4px)};
|
|
123
|
+
|
|
124
|
+
&::part(base) {
|
|
125
|
+
&::after {
|
|
126
|
+
display: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// TODO the icon color is not changing on hover, focus, active states, log an issue in the library
|
|
130
|
+
&:hover,
|
|
131
|
+
&:focus {
|
|
132
|
+
--foreground: var(--igd-accent);
|
|
133
|
+
}
|
|
51
134
|
}
|
|
52
135
|
}
|
|
53
136
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
--
|
|
137
|
+
igc-button[variant='outlined'] {
|
|
138
|
+
&::part(base) {
|
|
139
|
+
--border-color: light-dark(var(--ig-gray-400), var(--ig-gray-700));
|
|
140
|
+
--hover-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-700));
|
|
141
|
+
--focus-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-700));
|
|
142
|
+
--focus-visible-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-700));
|
|
143
|
+
--active-border-color: light-dark(var(--ig-gray-400), var(--ig-gray-700));
|
|
144
|
+
|
|
145
|
+
--foreground: light-dark(var(--ig-gray-900), var(--ig-gray-200));
|
|
146
|
+
--hover-foreground: var(--igd-accent);
|
|
147
|
+
--focus-foreground: var(--igd-accent);
|
|
148
|
+
--active-foreground: var(--igd-accent);
|
|
149
|
+
--focus-hover-foreground: var(--igd-accent);
|
|
150
|
+
--focus-visible-foreground: var(--igd-accent);
|
|
151
|
+
|
|
152
|
+
--icon-color: light-dark(var(--ig-gray-900), var(--ig-gray-200));
|
|
153
|
+
--icon-color-hover: var(--igd-accent);
|
|
154
|
+
|
|
155
|
+
--hover-background: transparent;
|
|
156
|
+
--focus-background: transparent;
|
|
157
|
+
--active-background: transparent;
|
|
158
|
+
--focus-hover-background: transparent;
|
|
159
|
+
--focus-visible-background: transparent;
|
|
160
|
+
|
|
161
|
+
--border-radius: #{rem(4px)};
|
|
162
|
+
|
|
163
|
+
&::after {
|
|
164
|
+
display: none;
|
|
165
|
+
}
|
|
58
166
|
}
|
|
59
|
-
|
|
60
|
-
--ig-flat-icon-button-foreground: var(--ig-gray-900);
|
|
61
|
-
--ig-flat-icon-button-hover-foreground: var(--ig-gray-900);
|
|
62
|
-
--ig-flat-icon-button-focus-foreground: var(--ig-gray-900);
|
|
63
|
-
--ig-flat-icon-button-active-foreground: var(--ig-gray-900);
|
|
64
|
-
|
|
65
|
-
--ig-flat-icon-button-hover-background: transparent;
|
|
66
|
-
--ig-flat-icon-button-focus-background: transparent;
|
|
67
|
-
--ig-flat-icon-button-active-background: transparent;
|
|
68
167
|
}
|
|
168
|
+
|