codexly-ui 0.12.37 → 0.12.38

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.
@@ -5015,8 +5015,16 @@ class ClxCheckboxComponent {
5015
5015
  _handleBlur() {
5016
5016
  this._onTouched();
5017
5017
  }
5018
+ /** The host's (click) toggles the checkbox for any click inside it — including clicks on a link
5019
+ * projected via ng-content (e.g. "Acepto los <a>Términos</a>"), which would otherwise both
5020
+ * navigate AND flip the checkbox. Stops propagation only when the click originated on (or
5021
+ * inside) an <a>, so the rest of the projected text still toggles normally. */
5022
+ _onLabelClick(event) {
5023
+ if (event.target?.closest('a'))
5024
+ event.stopPropagation();
5025
+ }
5018
5026
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5019
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxCheckboxComponent, isStandalone: true, selector: "clx-checkbox", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "checkbox" }, listeners: { "click": "_toggle()", "keydown.space": "_onSpace($event)" }, properties: { "style.cursor": "_disabled() ? \"not-allowed\" : \"pointer\"", "style.pointer-events": "_disabled() ? \"none\" : null", "attr.aria-checked": "_checked()", "attr.tabindex": "_disabled() ? -1 : 0" }, classAttribute: "inline-flex items-center gap-2 select-none" }, providers: [
5027
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxCheckboxComponent, isStandalone: true, selector: "clx-checkbox", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "checkbox" }, listeners: { "click": "_toggle()", "keydown.space": "_onSpace($event)" }, properties: { "style.cursor": "_disabled() ? \"not-allowed\" : \"pointer\"", "style.pointer-events": "_disabled() ? \"none\" : null", "attr.aria-checked": "_checked()", "attr.tabindex": "_disabled() ? -1 : 0" }, classAttribute: "inline-flex items-start gap-2 select-none" }, providers: [
5020
5028
  {
5021
5029
  provide: NG_VALUE_ACCESSOR,
5022
5030
  useExisting: forwardRef(() => ClxCheckboxComponent),
@@ -5040,6 +5048,10 @@ class ClxCheckboxComponent {
5040
5048
  </div>
5041
5049
  @if (label()) {
5042
5050
  <span [class]="_labelClass()">{{ label() }}</span>
5051
+ } @else {
5052
+ <span [class]="_labelClass()" (click)="_onLabelClick($event)">
5053
+ <ng-content></ng-content>
5054
+ </span>
5043
5055
  }
5044
5056
  `, isInline: true, dependencies: [{ kind: "component", type: ClxIconComponent, selector: "span[clx-icon]", inputs: ["name", "size", "color", "fill"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5045
5057
  }
@@ -5074,12 +5086,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
5074
5086
  </div>
5075
5087
  @if (label()) {
5076
5088
  <span [class]="_labelClass()">{{ label() }}</span>
5089
+ } @else {
5090
+ <span [class]="_labelClass()" (click)="_onLabelClick($event)">
5091
+ <ng-content></ng-content>
5092
+ </span>
5077
5093
  }
5078
5094
  `,
5079
5095
  encapsulation: ViewEncapsulation.None,
5080
5096
  changeDetection: ChangeDetectionStrategy.OnPush,
5081
5097
  host: {
5082
- class: 'inline-flex items-center gap-2 select-none',
5098
+ class: 'inline-flex items-start gap-2 select-none',
5083
5099
  '[style.cursor]': '_disabled() ? "not-allowed" : "pointer"',
5084
5100
  '[style.pointer-events]': '_disabled() ? "none" : null',
5085
5101
  role: 'checkbox',