codexly-ui 0.10.4 → 0.10.6
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 +47 -20
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +18 -7
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -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()',
|
|
@@ -9765,6 +9771,13 @@ class ClxMenuComponent {
|
|
|
9765
9771
|
active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
9766
9772
|
routerLink = input('', ...(ngDevMode ? [{ debugName: "routerLink" }] : /* istanbul ignore next */ []));
|
|
9767
9773
|
routerLinkActiveOptions = input({ exact: false }, ...(ngDevMode ? [{ debugName: "routerLinkActiveOptions" }] : /* istanbul ignore next */ []));
|
|
9774
|
+
/** Whether this module has any nested clx-menu-item children. When false and routerLink is set,
|
|
9775
|
+
* clicking navigates straight through instead of only toggling an (empty) expand arrow — the
|
|
9776
|
+
* module keeps its normal "Módulos" color either way, only the click behavior and the arrow's
|
|
9777
|
+
* presence change. See ShellComponent's usage for the real case this covers: a module with no
|
|
9778
|
+
* options assigned still needs somewhere to go rather than dead-ending on a submenu with nothing
|
|
9779
|
+
* in it. */
|
|
9780
|
+
hasChildren = input(true, ...(ngDevMode ? [{ debugName: "hasChildren" }] : /* istanbul ignore next */ []));
|
|
9768
9781
|
_isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "_isExpanded" }] : /* istanbul ignore next */ []));
|
|
9769
9782
|
_rla;
|
|
9770
9783
|
_destroyRef = inject(DestroyRef);
|
|
@@ -9802,8 +9815,18 @@ class ClxMenuComponent {
|
|
|
9802
9815
|
_toggle() {
|
|
9803
9816
|
this._isExpanded.update(v => !v);
|
|
9804
9817
|
}
|
|
9818
|
+
/** With children: the anchor's real navigation is suppressed, click only toggles the submenu
|
|
9819
|
+
* (the routerLink here exists solely to drive routerLinkActive styling on the row). Without
|
|
9820
|
+
* children: there's nothing to expand, so the click is left to navigate normally instead. */
|
|
9821
|
+
_onRouterLinkClick(event) {
|
|
9822
|
+
if (!this.hasChildren())
|
|
9823
|
+
return;
|
|
9824
|
+
event.preventDefault();
|
|
9825
|
+
if (!this.collapsed())
|
|
9826
|
+
this._toggle();
|
|
9827
|
+
}
|
|
9805
9828
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9806
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxMenuComponent, isStandalone: true, selector: "clx-menu", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, viewQueries: [{ propertyName: "_rla", first: true, predicate: RouterLinkActive, descendants: true }], ngImport: i0, template: `
|
|
9829
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxMenuComponent, isStandalone: true, selector: "clx-menu", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null }, hasChildren: { classPropertyName: "hasChildren", publicName: "hasChildren", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, viewQueries: [{ propertyName: "_rla", first: true, predicate: RouterLinkActive, descendants: true }], ngImport: i0, template: `
|
|
9807
9830
|
@if (routerLink()) {
|
|
9808
9831
|
<a
|
|
9809
9832
|
[routerLink]="routerLink()"
|
|
@@ -9812,19 +9835,21 @@ class ClxMenuComponent {
|
|
|
9812
9835
|
[routerLinkActiveOptions]="routerLinkActiveOptions()"
|
|
9813
9836
|
[class]="_buttonCls(rla.isActive)"
|
|
9814
9837
|
[title]="collapsed() ? label() : ''"
|
|
9815
|
-
(click)="$event
|
|
9838
|
+
(click)="_onRouterLinkClick($event)">
|
|
9816
9839
|
@if (icon()) {
|
|
9817
9840
|
<span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
|
|
9818
9841
|
}
|
|
9819
9842
|
@if (!collapsed()) {
|
|
9820
9843
|
<span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9844
|
+
@if (hasChildren()) {
|
|
9845
|
+
<span
|
|
9846
|
+
clx-icon
|
|
9847
|
+
name="expand_more"
|
|
9848
|
+
size="sm"
|
|
9849
|
+
[class]="'shrink-0 transition-transform duration-300 ' + (rla.isActive ? '' : 'text-clx-text-subtle')"
|
|
9850
|
+
[style.transform]="_isExpanded() ? 'rotate(180deg)' : 'rotate(0deg)'">
|
|
9851
|
+
</span>
|
|
9852
|
+
}
|
|
9828
9853
|
}
|
|
9829
9854
|
</a>
|
|
9830
9855
|
} @else {
|
|
@@ -9875,19 +9900,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
9875
9900
|
[routerLinkActiveOptions]="routerLinkActiveOptions()"
|
|
9876
9901
|
[class]="_buttonCls(rla.isActive)"
|
|
9877
9902
|
[title]="collapsed() ? label() : ''"
|
|
9878
|
-
(click)="$event
|
|
9903
|
+
(click)="_onRouterLinkClick($event)">
|
|
9879
9904
|
@if (icon()) {
|
|
9880
9905
|
<span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
|
|
9881
9906
|
}
|
|
9882
9907
|
@if (!collapsed()) {
|
|
9883
9908
|
<span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
|
|
9884
|
-
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
|
|
9909
|
+
@if (hasChildren()) {
|
|
9910
|
+
<span
|
|
9911
|
+
clx-icon
|
|
9912
|
+
name="expand_more"
|
|
9913
|
+
size="sm"
|
|
9914
|
+
[class]="'shrink-0 transition-transform duration-300 ' + (rla.isActive ? '' : 'text-clx-text-subtle')"
|
|
9915
|
+
[style.transform]="_isExpanded() ? 'rotate(180deg)' : 'rotate(0deg)'">
|
|
9916
|
+
</span>
|
|
9917
|
+
}
|
|
9891
9918
|
}
|
|
9892
9919
|
</a>
|
|
9893
9920
|
} @else {
|
|
@@ -9926,7 +9953,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
9926
9953
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9927
9954
|
host: { class: 'block' },
|
|
9928
9955
|
}]
|
|
9929
|
-
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], routerLinkActiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLinkActiveOptions", required: false }] }], _rla: [{
|
|
9956
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], routerLinkActiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLinkActiveOptions", required: false }] }], hasChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasChildren", required: false }] }], _rla: [{
|
|
9930
9957
|
type: ViewChild,
|
|
9931
9958
|
args: [RouterLinkActive]
|
|
9932
9959
|
}] } });
|