codexly-ui 0.10.3 → 0.10.5
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/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -4,11 +4,11 @@ import { isPlatformBrowser, NgTemplateOutlet, DOCUMENT, NgStyle, CurrencyPipe, D
|
|
|
4
4
|
import * as i1$1 from '@angular/forms';
|
|
5
5
|
import { NG_VALUE_ACCESSOR, FormControl, NgControl, ReactiveFormsModule, FormGroup, Validators, FormsModule } from '@angular/forms';
|
|
6
6
|
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
-
import { startWith, map, debounceTime, distinctUntilChanged, switchMap, of, catchError } from 'rxjs';
|
|
7
|
+
import { startWith, map, debounceTime, distinctUntilChanged, switchMap, of, catchError, filter } from 'rxjs';
|
|
8
8
|
import * as i1 from '@angular/cdk/overlay';
|
|
9
9
|
import { ScrollStrategyOptions, OverlayModule } from '@angular/cdk/overlay';
|
|
10
10
|
import { ScrollingModule, CdkScrollable } from '@angular/cdk/scrolling';
|
|
11
|
-
import { RouterLink, RouterLinkActive } from '@angular/router';
|
|
11
|
+
import { Router, NavigationEnd, RouterLink, RouterLinkActive } from '@angular/router';
|
|
12
12
|
|
|
13
13
|
// ── Parse 'red' | 'red-500' → { color, shade } ───────────────────────────────
|
|
14
14
|
function parseColorInput(input) {
|
|
@@ -183,7 +183,7 @@ class ClxIconComponent {
|
|
|
183
183
|
return `'FILL' ${this.fill() ? 1 : 0}, 'wght' 400, 'GRAD' 0, 'opsz' ${opsz}`;
|
|
184
184
|
}, ...(ngDevMode ? [{ debugName: "_fontVariation" }] : /* istanbul ignore next */ []));
|
|
185
185
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
186
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: ClxIconComponent, isStandalone: true, selector: "span[clx-icon]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, fill: { classPropertyName: "fill", publicName: "fill", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_colorClass()", "textContent": "name()", "style.font-size": "_fontSize()", "style.font-variation-settings": "_fontVariation()" }, classAttribute: "material-symbols-outlined" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
186
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: ClxIconComponent, isStandalone: true, selector: "span[clx-icon]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, fill: { classPropertyName: "fill", publicName: "fill", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "translate": "no" }, properties: { "class": "_colorClass()", "textContent": "name()", "style.font-size": "_fontSize()", "style.font-variation-settings": "_fontVariation()" }, classAttribute: "material-symbols-outlined notranslate" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
187
187
|
}
|
|
188
188
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxIconComponent, decorators: [{
|
|
189
189
|
type: Component,
|
|
@@ -194,7 +194,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
194
194
|
encapsulation: ViewEncapsulation.None,
|
|
195
195
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
196
196
|
host: {
|
|
197
|
-
|
|
197
|
+
// notranslate + translate="no": the icon glyph is rendered via textContent (e.g. "home",
|
|
198
|
+
// "person") through the Material Symbols ligature font — browser translate tools see that as
|
|
199
|
+
// real text and swap it for the translated word, which breaks the ligature and shows the
|
|
200
|
+
// plain word instead of the glyph. Both are needed: Chrome's translate honors the class,
|
|
201
|
+
// Firefox/Safari and other translate tooling look for the attribute.
|
|
202
|
+
class: 'material-symbols-outlined notranslate',
|
|
203
|
+
'translate': 'no',
|
|
198
204
|
'[class]': '_colorClass()',
|
|
199
205
|
'[textContent]': 'name()',
|
|
200
206
|
'[style.font-size]': '_fontSize()',
|
|
@@ -9442,6 +9448,14 @@ class ClxAppLayoutComponent {
|
|
|
9442
9448
|
const zone = inject(NgZone, { optional: true });
|
|
9443
9449
|
this._zone = zone ?? { run: (fn) => fn(), runOutsideAngular: (fn) => fn() };
|
|
9444
9450
|
this._document = inject(DOCUMENT);
|
|
9451
|
+
// On mobile the sidebar is an overlay drawer over the page content — leaving it open after
|
|
9452
|
+
// the user picks a menu item would hide the very page they just navigated to. Desktop is
|
|
9453
|
+
// unaffected: there the sidebar is a permanent rail, not an overlay, so it should stay as-is.
|
|
9454
|
+
const router = inject(Router, { optional: true });
|
|
9455
|
+
router?.events.pipe(filter((e) => e instanceof NavigationEnd), takeUntilDestroyed()).subscribe(() => {
|
|
9456
|
+
if (this._isMobile())
|
|
9457
|
+
this._sidebarOpen.set(false);
|
|
9458
|
+
});
|
|
9445
9459
|
}
|
|
9446
9460
|
_showBackdrop = computed(() => this._sidebarOpen() && this._isMobile(), ...(ngDevMode ? [{ debugName: "_showBackdrop" }] : /* istanbul ignore next */ []));
|
|
9447
9461
|
_isExpanded = computed(() => !this.collapsed() || this._hovered(), ...(ngDevMode ? [{ debugName: "_isExpanded" }] : /* istanbul ignore next */ []));
|