codexly-ui 0.10.5 → 0.10.7

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.
@@ -9771,6 +9771,13 @@ class ClxMenuComponent {
9771
9771
  active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
9772
9772
  routerLink = input('', ...(ngDevMode ? [{ debugName: "routerLink" }] : /* istanbul ignore next */ []));
9773
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 */ []));
9774
9781
  _isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "_isExpanded" }] : /* istanbul ignore next */ []));
9775
9782
  _rla;
9776
9783
  _destroyRef = inject(DestroyRef);
@@ -9808,8 +9815,18 @@ class ClxMenuComponent {
9808
9815
  _toggle() {
9809
9816
  this._isExpanded.update(v => !v);
9810
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
+ }
9811
9828
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9812
- 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: `
9813
9830
  @if (routerLink()) {
9814
9831
  <a
9815
9832
  [routerLink]="routerLink()"
@@ -9818,19 +9835,21 @@ class ClxMenuComponent {
9818
9835
  [routerLinkActiveOptions]="routerLinkActiveOptions()"
9819
9836
  [class]="_buttonCls(rla.isActive)"
9820
9837
  [title]="collapsed() ? label() : ''"
9821
- (click)="$event.preventDefault(); !collapsed() && _toggle()">
9838
+ (click)="_onRouterLinkClick($event)">
9822
9839
  @if (icon()) {
9823
9840
  <span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
9824
9841
  }
9825
9842
  @if (!collapsed()) {
9826
9843
  <span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
9827
- <span
9828
- clx-icon
9829
- name="expand_more"
9830
- size="sm"
9831
- [class]="'shrink-0 transition-transform duration-300 ' + (rla.isActive ? '' : 'text-clx-text-subtle')"
9832
- [style.transform]="_isExpanded() ? 'rotate(180deg)' : 'rotate(0deg)'">
9833
- </span>
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
+ }
9834
9853
  }
9835
9854
  </a>
9836
9855
  } @else {
@@ -9881,19 +9900,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
9881
9900
  [routerLinkActiveOptions]="routerLinkActiveOptions()"
9882
9901
  [class]="_buttonCls(rla.isActive)"
9883
9902
  [title]="collapsed() ? label() : ''"
9884
- (click)="$event.preventDefault(); !collapsed() && _toggle()">
9903
+ (click)="_onRouterLinkClick($event)">
9885
9904
  @if (icon()) {
9886
9905
  <span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
9887
9906
  }
9888
9907
  @if (!collapsed()) {
9889
9908
  <span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
9890
- <span
9891
- clx-icon
9892
- name="expand_more"
9893
- size="sm"
9894
- [class]="'shrink-0 transition-transform duration-300 ' + (rla.isActive ? '' : 'text-clx-text-subtle')"
9895
- [style.transform]="_isExpanded() ? 'rotate(180deg)' : 'rotate(0deg)'">
9896
- </span>
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
+ }
9897
9918
  }
9898
9919
  </a>
9899
9920
  } @else {
@@ -9932,7 +9953,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
9932
9953
  changeDetection: ChangeDetectionStrategy.OnPush,
9933
9954
  host: { class: 'block' },
9934
9955
  }]
9935
- }], 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: [{
9936
9957
  type: ViewChild,
9937
9958
  args: [RouterLinkActive]
9938
9959
  }] } });
@@ -14060,6 +14081,11 @@ class ClxProductComponent {
14060
14081
  layout = input('vertical', ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
14061
14082
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
14062
14083
  clxColor = input('indigo', ...(ngDevMode ? [{ debugName: "clxColor" }] : /* istanbul ignore next */ []));
14084
+ /** 'cover' (default) fills the frame edge-to-edge, cropping overflow — right for photos shot to
14085
+ * fill the frame (apparel on a model). 'contain' keeps the whole image visible with padding
14086
+ * around it — right for products photographed against negative space (helmets, boxed goods),
14087
+ * where 'cover' would crop into the product itself. */
14088
+ imageFit = input('cover', ...(ngDevMode ? [{ debugName: "imageFit" }] : /* istanbul ignore next */ []));
14063
14089
  addToCart = output();
14064
14090
  addToWishlist = output();
14065
14091
  PRODUCT_TAG_LABEL = PRODUCT_TAG_LABEL;
@@ -14077,6 +14103,9 @@ class ClxProductComponent {
14077
14103
  _imageContainerClass = computed(() => this._h()
14078
14104
  ? `relative shrink-0 w-full aspect-square sm:aspect-auto ${this._sm() ? 'sm:w-32' : 'sm:w-44'} overflow-hidden rounded-t-2xl sm:rounded-t-none sm:rounded-l-2xl`
14079
14105
  : 'relative w-full aspect-square overflow-hidden rounded-t-2xl', ...(ngDevMode ? [{ debugName: "_imageContainerClass" }] : /* istanbul ignore next */ []));
14106
+ _imageClass = computed(() => this.imageFit() === 'contain'
14107
+ ? 'w-full h-full object-contain p-6 transition-transform duration-500 group-hover:scale-105'
14108
+ : 'w-full h-full object-cover transition-transform duration-500 group-hover:scale-105', ...(ngDevMode ? [{ debugName: "_imageClass" }] : /* istanbul ignore next */ []));
14080
14109
  _contentClass = computed(() => 'flex flex-col gap-2 flex-1 p-3', ...(ngDevMode ? [{ debugName: "_contentClass" }] : /* istanbul ignore next */ []));
14081
14110
  _actionsClass = computed(() => this._h()
14082
14111
  ? 'flex flex-col sm:flex-row items-stretch sm:items-center gap-2 mt-3'
@@ -14098,7 +14127,7 @@ class ClxProductComponent {
14098
14127
  return `${sz} font-bold ${color}`;
14099
14128
  }, ...(ngDevMode ? [{ debugName: "_priceClass" }] : /* istanbul ignore next */ []));
14100
14129
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxProductComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
14101
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxProductComponent, isStandalone: true, selector: "clx-product", inputs: { product: { classPropertyName: "product", publicName: "product", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, priority: { classPropertyName: "priority", publicName: "priority", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, clxColor: { classPropertyName: "clxColor", publicName: "clxColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addToCart: "addToCart", addToWishlist: "addToWishlist" }, ngImport: i0, template: `
14130
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxProductComponent, isStandalone: true, selector: "clx-product", inputs: { product: { classPropertyName: "product", publicName: "product", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, priority: { classPropertyName: "priority", publicName: "priority", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, clxColor: { classPropertyName: "clxColor", publicName: "clxColor", isSignal: true, isRequired: false, transformFunction: null }, imageFit: { classPropertyName: "imageFit", publicName: "imageFit", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addToCart: "addToCart", addToWishlist: "addToWishlist" }, ngImport: i0, template: `
14102
14131
  @if (loading()) {
14103
14132
  @if (_h()) {
14104
14133
  <!-- Skeleton Horizontal -->
@@ -14137,7 +14166,7 @@ class ClxProductComponent {
14137
14166
  <img
14138
14167
  [src]="product()!.main_image"
14139
14168
  [alt]="product()!.name"
14140
- class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
14169
+ [class]="_imageClass()"
14141
14170
  [loading]="priority() ? 'eager' : 'lazy'"
14142
14171
  />
14143
14172
  } @else {
@@ -14272,7 +14301,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
14272
14301
  <img
14273
14302
  [src]="product()!.main_image"
14274
14303
  [alt]="product()!.name"
14275
- class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
14304
+ [class]="_imageClass()"
14276
14305
  [loading]="priority() ? 'eager' : 'lazy'"
14277
14306
  />
14278
14307
  } @else {
@@ -14364,7 +14393,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
14364
14393
  encapsulation: ViewEncapsulation.None,
14365
14394
  changeDetection: ChangeDetectionStrategy.OnPush,
14366
14395
  }]
14367
- }], propDecorators: { product: [{ type: i0.Input, args: [{ isSignal: true, alias: "product", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], priority: [{ type: i0.Input, args: [{ isSignal: true, alias: "priority", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], clxColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "clxColor", required: false }] }], addToCart: [{ type: i0.Output, args: ["addToCart"] }], addToWishlist: [{ type: i0.Output, args: ["addToWishlist"] }] } });
14396
+ }], propDecorators: { product: [{ type: i0.Input, args: [{ isSignal: true, alias: "product", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], priority: [{ type: i0.Input, args: [{ isSignal: true, alias: "priority", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], clxColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "clxColor", required: false }] }], imageFit: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageFit", required: false }] }], addToCart: [{ type: i0.Output, args: ["addToCart"] }], addToWishlist: [{ type: i0.Output, args: ["addToWishlist"] }] } });
14368
14397
 
14369
14398
  class ClxProductDetailComponent {
14370
14399
  product = input(null, ...(ngDevMode ? [{ debugName: "product" }] : /* istanbul ignore next */ []));