codexly-ui 0.10.91 → 0.10.92

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.
@@ -571,6 +571,13 @@ class ClxThemeService {
571
571
  weight: override?.weight ?? defaultWeight,
572
572
  };
573
573
  }
574
+ /** Resolved accent color for a single form control zone (see ClxFormControlsTheme) — falls
575
+ * back to primaryColor when that control has no override of its own. Every form component
576
+ * (clx-input, clx-select, clx-checkbox, ...) calls this instead of reading primaryColor
577
+ * directly, so each can be pinned to a different accent independently. */
578
+ formControlColor(key) {
579
+ return this._config().formControls?.[key] ?? this._config().primaryColor;
580
+ }
574
581
  /** Resolved style for ClxPageHeaderComponent's title — falls back to the default
575
582
  * text-clx-text-label color (no override) / 2xl / 600 */
576
583
  pageHeaderTitleStyle = computed(() => this._resolvePageHeaderZoneStyle(this._config().pageHeaderTitle, '2xl', 600), ...(ngDevMode ? [{ debugName: "pageHeaderTitleStyle" }] : /* istanbul ignore next */ []));
@@ -2879,7 +2886,7 @@ class ClxInputComponent {
2879
2886
  placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
2880
2887
  type = input('text', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
2881
2888
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
2882
- _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
2889
+ _color = computed(() => this.color() ?? this._themeSvc.formControlColor('input'), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
2883
2890
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
2884
2891
  prefixIcon = input('', ...(ngDevMode ? [{ debugName: "prefixIcon" }] : /* istanbul ignore next */ []));
2885
2892
  suffixIcon = input('', ...(ngDevMode ? [{ debugName: "suffixIcon" }] : /* istanbul ignore next */ []));
@@ -3206,7 +3213,7 @@ class ClxOtpComponent {
3206
3213
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
3207
3214
  /** Autofocus the first box on init */
3208
3215
  autoFocus = input(false, ...(ngDevMode ? [{ debugName: "autoFocus" }] : /* istanbul ignore next */ []));
3209
- _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3216
+ _color = computed(() => this.color() ?? this._themeSvc.formControlColor('otp'), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3210
3217
  _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3211
3218
  _sizeConfig = computed(() => OTP_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_sizeConfig" }] : /* istanbul ignore next */ []));
3212
3219
  _statusCfg = computed(() => INPUT_STATUS_MAP[this.status()], ...(ngDevMode ? [{ debugName: "_statusCfg" }] : /* istanbul ignore next */ []));
@@ -3485,7 +3492,7 @@ class ClxTextareaComponent {
3485
3492
  _onChange = () => { };
3486
3493
  _onTouched = () => { };
3487
3494
  // ── Computed shortcuts ───────────────────────────────────────────────────
3488
- _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3495
+ _color = computed(() => this.color() ?? this._themeSvc.formControlColor('textarea'), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3489
3496
  _sizeCfg = computed(() => TEXTAREA_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_sizeCfg" }] : /* istanbul ignore next */ []));
3490
3497
  _statusCfg = computed(() => INPUT_STATUS_MAP[this.status()], ...(ngDevMode ? [{ debugName: "_statusCfg" }] : /* istanbul ignore next */ []));
3491
3498
  // ── Classes ──────────────────────────────────────────────────────────────
@@ -3757,7 +3764,7 @@ class ClxNumberComponent {
3757
3764
  _isAtMax = computed(() => this.max() !== null && this._value() >= this.max(), ...(ngDevMode ? [{ debugName: "_isAtMax" }] : /* istanbul ignore next */ []));
3758
3765
  // ── Computed classes ─────────────────────────────────────────────────────
3759
3766
  _themeSvc = inject(ClxThemeService);
3760
- _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3767
+ _color = computed(() => this.color() ?? this._themeSvc.formControlColor('number'), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3761
3768
  _sizeConfig = computed(() => NUMBER_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_sizeConfig" }] : /* istanbul ignore next */ []));
3762
3769
  _labelClass = computed(() => `${this._sizeConfig().label} ${CLX_TEXT_LABEL} leading-none`, ...(ngDevMode ? [{ debugName: "_labelClass" }] : /* istanbul ignore next */ []));
3763
3770
  _hintClass = computed(() => `${this._sizeConfig().hint} ${CLX_TEXT_HINT}`, ...(ngDevMode ? [{ debugName: "_hintClass" }] : /* istanbul ignore next */ []));
@@ -4129,7 +4136,7 @@ class ClxSelectComponent {
4129
4136
  // ── DI ─────────────────────────────────────────────────────────────────────
4130
4137
  _themeSvc = inject(ClxThemeService);
4131
4138
  _ngControl = inject(NgControl, { optional: true, self: true });
4132
- _activeColor = computed(() => this.activeColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
4139
+ _activeColor = computed(() => this.activeColor() ?? this._themeSvc.formControlColor('select'), ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
4133
4140
  _el = inject((ElementRef));
4134
4141
  _sso = inject(ScrollStrategyOptions);
4135
4142
  _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
@@ -4652,7 +4659,7 @@ const CHECKBOX_SIZE_MAP = {
4652
4659
  class ClxCheckboxComponent {
4653
4660
  _themeSvc = inject(ClxThemeService);
4654
4661
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
4655
- _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
4662
+ _color = computed(() => this.color() ?? this._themeSvc.formControlColor('checkbox'), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
4656
4663
  variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
4657
4664
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
4658
4665
  _size = computed(() => this.size() ?? this._themeSvc.config().defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
@@ -4803,7 +4810,7 @@ const CLX_RADIO_GROUP = new InjectionToken('CLX_RADIO_GROUP');
4803
4810
  class ClxRadioGroupComponent {
4804
4811
  _themeSvc = inject(ClxThemeService);
4805
4812
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
4806
- resolvedColor = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
4813
+ resolvedColor = computed(() => this.color() ?? this._themeSvc.formControlColor('radio'), ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
4807
4814
  variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
4808
4815
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
4809
4816
  direction = input('horizontal', ...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
@@ -4887,7 +4894,7 @@ class ClxRadioComponent {
4887
4894
  _themeSvc = inject(ClxThemeService);
4888
4895
  _checked = computed(() => this._group ? this._group._value() === this.value() : false, ...(ngDevMode ? [{ debugName: "_checked" }] : /* istanbul ignore next */ []));
4889
4896
  _isDisabled = computed(() => this._group?.isDisabled() ?? false, ...(ngDevMode ? [{ debugName: "_isDisabled" }] : /* istanbul ignore next */ []));
4890
- _color = computed(() => this.color() ?? this._group?.resolvedColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
4897
+ _color = computed(() => this.color() ?? this._group?.resolvedColor() ?? this._themeSvc.formControlColor('radio'), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
4891
4898
  _variant = computed(() => this.variant() ?? this._group?.variant() ?? 'solid', ...(ngDevMode ? [{ debugName: "_variant" }] : /* istanbul ignore next */ []));
4892
4899
  _size = computed(() => this.size() ?? this._group?.size() ?? this._themeSvc.config().defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
4893
4900
  _sizeConfig = computed(() => RADIO_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_sizeConfig" }] : /* istanbul ignore next */ []));
@@ -4991,7 +4998,7 @@ const SWITCH_SIZE_MAP = {
4991
4998
  class ClxSwitchComponent {
4992
4999
  _themeSvc = inject(ClxThemeService);
4993
5000
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
4994
- _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
5001
+ _color = computed(() => this.color() ?? this._themeSvc.formControlColor('switch'), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
4995
5002
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
4996
5003
  _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
4997
5004
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
@@ -5125,7 +5132,7 @@ class ClxSliderComponent {
5125
5132
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
5126
5133
  errorMessage = input('Valor fuera de rango', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
5127
5134
  activeColor = input(undefined, ...(ngDevMode ? [{ debugName: "activeColor" }] : /* istanbul ignore next */ []));
5128
- _activeColor = computed(() => this.activeColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
5135
+ _activeColor = computed(() => this.activeColor() ?? this._themeSvc.formControlColor('slider'), ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
5129
5136
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
5130
5137
  _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
5131
5138
  min = input(0, ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
@@ -5480,7 +5487,7 @@ class ClxUploadComponent {
5480
5487
  /** Max file size in bytes. 0 = no limit. */
5481
5488
  maxFileSize = input(0, ...(ngDevMode ? [{ debugName: "maxFileSize" }] : /* istanbul ignore next */ []));
5482
5489
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
5483
- _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
5490
+ _color = computed(() => this.color() ?? this._themeSvc.formControlColor('upload'), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
5484
5491
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
5485
5492
  _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
5486
5493
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
@@ -6159,7 +6166,7 @@ class ClxColorPickerComponent {
6159
6166
  format = input('hex', ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
6160
6167
  presets = input([], ...(ngDevMode ? [{ debugName: "presets" }] : /* istanbul ignore next */ []));
6161
6168
  activeColor = input(undefined, ...(ngDevMode ? [{ debugName: "activeColor" }] : /* istanbul ignore next */ []));
6162
- _activeColor = computed(() => this.activeColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
6169
+ _activeColor = computed(() => this.activeColor() ?? this._themeSvc.formControlColor('colorpicker'), ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
6163
6170
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
6164
6171
  errorMessage = input('Este campo es requerido', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
6165
6172
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
@@ -6816,7 +6823,7 @@ class ClxDatepickerComponent {
6816
6823
  this._isOpen();
6817
6824
  return this._el.nativeElement.getBoundingClientRect().width;
6818
6825
  }, ...(ngDevMode ? [{ debugName: "_overlayWidth" }] : /* istanbul ignore next */ []));
6819
- _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6826
+ _color = computed(() => this.color() ?? this._themeSvc.formControlColor('datepicker'), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6820
6827
  _labelClass = computed(() => `${this._sizeConfig().label} ${CLX_TEXT_LABEL} leading-none`, ...(ngDevMode ? [{ debugName: "_labelClass" }] : /* istanbul ignore next */ []));
6821
6828
  _hintClass = computed(() => `${this._sizeConfig().hint} ${CLX_TEXT_HINT}`, ...(ngDevMode ? [{ debugName: "_hintClass" }] : /* istanbul ignore next */ []));
6822
6829
  _statusMsgClass = computed(() => `${this._sizeConfig().hint} ${this._statusCfg().msgCls}`, ...(ngDevMode ? [{ debugName: "_statusMsgClass" }] : /* istanbul ignore next */ []));
@@ -7235,7 +7242,7 @@ class ClxTimepickerComponent {
7235
7242
  this._isOpen();
7236
7243
  return this._el.nativeElement.getBoundingClientRect().width;
7237
7244
  }, ...(ngDevMode ? [{ debugName: "_overlayWidth" }] : /* istanbul ignore next */ []));
7238
- _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
7245
+ _color = computed(() => this.color() ?? this._themeSvc.formControlColor('timepicker'), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
7239
7246
  _labelClass = computed(() => `${this._sizeConfig().label} ${CLX_TEXT_LABEL} leading-none`, ...(ngDevMode ? [{ debugName: "_labelClass" }] : /* istanbul ignore next */ []));
7240
7247
  _hintClass = computed(() => `${this._sizeConfig().hint} ${CLX_TEXT_HINT}`, ...(ngDevMode ? [{ debugName: "_hintClass" }] : /* istanbul ignore next */ []));
7241
7248
  _statusMsgClass = computed(() => `${this._sizeConfig().hint} ${this._statusCfg().msgCls}`, ...(ngDevMode ? [{ debugName: "_statusMsgClass" }] : /* istanbul ignore next */ []));
@@ -7541,7 +7548,7 @@ class ClxDateRangePickerComponent {
7541
7548
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
7542
7549
  placeholder = input('Selecciona un rango', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
7543
7550
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
7544
- _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
7551
+ _color = computed(() => this.color() ?? this._themeSvc.formControlColor('dateRangePicker'), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
7545
7552
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
7546
7553
  _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
7547
7554
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
@@ -8606,7 +8613,7 @@ class ClxEditorComponent {
8606
8613
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
8607
8614
  placeholder = input('Escribe aquí...', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
8608
8615
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
8609
- _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
8616
+ _color = computed(() => this.color() ?? this._themeSvc.formControlColor('editor'), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
8610
8617
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
8611
8618
  _editorSize = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_editorSize" }] : /* istanbul ignore next */ []));
8612
8619
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
@@ -9437,7 +9444,7 @@ class ClxWizardComponent {
9437
9444
  _themeSvc = inject(ClxThemeService);
9438
9445
  // ── Inputs ─────────────────────────────────────────────────────────────────
9439
9446
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
9440
- _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
9447
+ _color = computed(() => this.color() ?? this._themeSvc.formControlColor('wizard'), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
9441
9448
  orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
9442
9449
  linear = input(true, ...(ngDevMode ? [{ debugName: "linear" }] : /* istanbul ignore next */ []));
9443
9450
  prevLabel = input('Anterior', ...(ngDevMode ? [{ debugName: "prevLabel" }] : /* istanbul ignore next */ []));