codexly-ui 0.0.78 → 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(() => {
@@ -9801,6 +9802,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
9801
9802
  }] } });
9802
9803
 
9803
9804
  const SWITCH_SIZE_MAP = {
9805
+ xs: { track: 'w-7 h-4', thumb: 'w-3 h-3', translate: 'translate-x-3', label: 'text-xs' },
9804
9806
  sm: { track: 'w-9 h-5', thumb: 'w-4 h-4', translate: 'translate-x-4', label: 'text-xs' },
9805
9807
  md: { track: 'w-12 h-6', thumb: 'w-5 h-5', translate: 'translate-x-6', label: 'text-sm' },
9806
9808
  lg: { track: 'w-14 h-7', thumb: 'w-6 h-6', translate: 'translate-x-7', label: 'text-base' },
@@ -9810,10 +9812,9 @@ class ClxSwitchComponent {
9810
9812
  color = input('indigo', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
9811
9813
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
9812
9814
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
9813
- /** Initial value for standalone use (without FormControl) */
9814
9815
  value = input(false, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
9815
- /** Disabled state for standalone use (without FormControl) */
9816
9816
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
9817
+ changed = output();
9817
9818
  _checked = signal(false, ...(ngDevMode ? [{ debugName: "_checked" }] : /* istanbul ignore next */ []));
9818
9819
  _cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []));
9819
9820
  _cvaConnected = false;
@@ -9850,14 +9851,20 @@ class ClxSwitchComponent {
9850
9851
  }
9851
9852
  _handleChange(event) {
9852
9853
  const checked = event.target.checked;
9853
- this._checked.set(checked);
9854
- 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
+ }
9855
9862
  }
9856
9863
  _handleBlur() {
9857
9864
  this._onTouched();
9858
9865
  }
9859
9866
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxSwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9860
- 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: [
9861
9868
  {
9862
9869
  provide: NG_VALUE_ACCESSOR,
9863
9870
  useExisting: forwardRef(() => ClxSwitchComponent),
@@ -9917,7 +9924,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
9917
9924
  '[style.pointer-events]': '_disabled() ? "none" : null',
9918
9925
  },
9919
9926
  }]
9920
- }], 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"] }] } });
9921
9928
 
9922
9929
  // ── Size map ─────────────────────────────────────────────────────────────────
9923
9930
  const TEXTAREA_SIZE_MAP = {