codexly-ui 0.0.79 → 0.0.80

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.
@@ -4124,15 +4124,16 @@ class ClxSelectComponent {
4124
4124
  _isInvalid = computed(() => this._wasTouched() && (this._ngControl?.control?.invalid ?? false), ...(ngDevMode ? [{ debugName: "_isInvalid" }] : /* istanbul ignore next */ []));
4125
4125
  _selectedOptions = computed(() => {
4126
4126
  const vals = this._selectedVals();
4127
- return this.options().filter(o => vals.includes(o.value));
4127
+ return (this.options() ?? []).filter(o => vals.includes(o.value));
4128
4128
  }, ...(ngDevMode ? [{ debugName: "_selectedOptions" }] : /* istanbul ignore next */ []));
4129
4129
  _filteredOptions = computed(() => {
4130
4130
  if (this.async())
4131
4131
  return this._asyncOptions();
4132
+ const opts = this.options() ?? [];
4132
4133
  const q = (this._searchQuery() ?? '').toLowerCase().trim();
4133
4134
  if (!q)
4134
- return this.options();
4135
- return this.options().filter(o => o.label.toLowerCase().includes(q));
4135
+ return opts;
4136
+ return opts.filter(o => o.label.toLowerCase().includes(q));
4136
4137
  }, ...(ngDevMode ? [{ debugName: "_filteredOptions" }] : /* istanbul ignore next */ []));
4137
4138
  _showAsyncPlaceholder = computed(() => this.async() && !this._asyncLoading() && this._asyncOptions().length === 0 && (this._asyncQuery().length < this.minChars()), ...(ngDevMode ? [{ debugName: "_showAsyncPlaceholder" }] : /* istanbul ignore next */ []));
4138
4139
  _displayValue = computed(() => {
@@ -9811,10 +9812,9 @@ class ClxSwitchComponent {
9811
9812
  color = input('indigo', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
9812
9813
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
9813
9814
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
9814
- /** Initial value for standalone use (without FormControl) */
9815
9815
  value = input(false, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
9816
- /** Disabled state for standalone use (without FormControl) */
9817
9816
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
9817
+ changed = output();
9818
9818
  _checked = signal(false, ...(ngDevMode ? [{ debugName: "_checked" }] : /* istanbul ignore next */ []));
9819
9819
  _cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []));
9820
9820
  _cvaConnected = false;
@@ -9851,14 +9851,20 @@ class ClxSwitchComponent {
9851
9851
  }
9852
9852
  _handleChange(event) {
9853
9853
  const checked = event.target.checked;
9854
- this._checked.set(checked);
9855
- this._onChange(checked);
9854
+ if (this._cvaConnected) {
9855
+ this._checked.set(checked);
9856
+ this._onChange(checked);
9857
+ }
9858
+ else {
9859
+ event.target.checked = !checked;
9860
+ this.changed.emit(checked);
9861
+ }
9856
9862
  }
9857
9863
  _handleBlur() {
9858
9864
  this._onTouched();
9859
9865
  }
9860
9866
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxSwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9861
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxSwitchComponent, isStandalone: true, selector: "label[clx-switch]", inputs: { color: { classPropertyName: "color", publicName: "color", 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: { properties: { "style.opacity": "_disabled() ? \"0.5\" : null", "style.cursor": "_disabled() ? \"not-allowed\" : \"pointer\"", "style.pointer-events": "_disabled() ? \"none\" : null" }, classAttribute: "relative inline-flex items-center gap-2 select-none" }, providers: [
9867
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxSwitchComponent, isStandalone: true, selector: "label[clx-switch]", inputs: { color: { classPropertyName: "color", publicName: "color", 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 } }, outputs: { changed: "changed" }, host: { properties: { "style.opacity": "_disabled() ? \"0.5\" : null", "style.cursor": "_disabled() ? \"not-allowed\" : \"pointer\"", "style.pointer-events": "_disabled() ? \"none\" : null" }, classAttribute: "relative inline-flex items-center gap-2 select-none" }, providers: [
9862
9868
  {
9863
9869
  provide: NG_VALUE_ACCESSOR,
9864
9870
  useExisting: forwardRef(() => ClxSwitchComponent),
@@ -9918,7 +9924,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
9918
9924
  '[style.pointer-events]': '_disabled() ? "none" : null',
9919
9925
  },
9920
9926
  }]
9921
- }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
9927
+ }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }] } });
9922
9928
 
9923
9929
  // ── Size map ─────────────────────────────────────────────────────────────────
9924
9930
  const TEXTAREA_SIZE_MAP = {