codexly-ui 0.0.93 → 0.0.94

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, effect, signal, ElementRef, PLATFORM_ID, Injectable, Renderer2, ApplicationRef, EnvironmentInjector, DestroyRef, createComponent, Directive, output, contentChildren, NgZone, model, untracked, forwardRef, viewChild, HostListener, ViewChildren, contentChild, Injector, ViewChild, ChangeDetectorRef, ContentChildren, Input, numberAttribute, booleanAttribute } from '@angular/core';
2
+ import { InjectionToken, inject, PLATFORM_ID, signal, computed, effect, Injectable, input, ChangeDetectionStrategy, ViewEncapsulation, Component, ElementRef, Renderer2, ApplicationRef, EnvironmentInjector, DestroyRef, createComponent, Directive, output, contentChildren, NgZone, model, untracked, forwardRef, viewChild, HostListener, ViewChildren, contentChild, Injector, ViewChild, ChangeDetectorRef, ContentChildren, Input, numberAttribute, booleanAttribute } from '@angular/core';
3
3
  import { isPlatformBrowser, CurrencyPipe, NgTemplateOutlet, DecimalPipe, NgStyle, DOCUMENT } from '@angular/common';
4
4
  import * as i1 from '@angular/forms';
5
5
  import { NG_VALUE_ACCESSOR, FormsModule, NgControl, FormControl, ReactiveFormsModule, FormGroup, Validators } from '@angular/forms';
@@ -203,16 +203,73 @@ function provideCodexlyTheme(config) {
203
203
  };
204
204
  }
205
205
 
206
+ const STORAGE_KEY = 'clx-theme-mode';
207
+ class ClxThemeService {
208
+ _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
209
+ _initial = inject(CLX_THEME_CONFIG);
210
+ _mode = signal(this._loadMode(), ...(ngDevMode ? [{ debugName: "_mode" }] : /* istanbul ignore next */ []));
211
+ _sysDark = signal(this._getSystemDark(), ...(ngDevMode ? [{ debugName: "_sysDark" }] : /* istanbul ignore next */ []));
212
+ _config = signal({ ...CLX_THEME_DEFAULTS, ...this._initial }, ...(ngDevMode ? [{ debugName: "_config" }] : /* istanbul ignore next */ []));
213
+ mode = this._mode.asReadonly();
214
+ config = this._config.asReadonly();
215
+ isDark = computed(() => {
216
+ const m = this._mode();
217
+ if (m === 'dark')
218
+ return true;
219
+ if (m === 'light')
220
+ return false;
221
+ return this._sysDark();
222
+ }, ...(ngDevMode ? [{ debugName: "isDark" }] : /* istanbul ignore next */ []));
223
+ constructor() {
224
+ effect(() => {
225
+ if (!this._isBrowser)
226
+ return;
227
+ document.documentElement.setAttribute('data-clx-theme', this.isDark() ? 'dark' : 'light');
228
+ });
229
+ if (this._isBrowser) {
230
+ const mq = window.matchMedia('(prefers-color-scheme: dark)');
231
+ mq.addEventListener('change', e => this._sysDark.set(e.matches));
232
+ }
233
+ }
234
+ setMode(mode) {
235
+ this._mode.set(mode);
236
+ if (this._isBrowser)
237
+ localStorage.setItem(STORAGE_KEY, mode);
238
+ }
239
+ setConfig(patch) {
240
+ this._config.update(c => ({ ...c, ...patch }));
241
+ }
242
+ toggle() {
243
+ this.setMode(this.isDark() ? 'light' : 'dark');
244
+ }
245
+ _loadMode() {
246
+ if (!this._isBrowser)
247
+ return 'system';
248
+ return localStorage.getItem(STORAGE_KEY) ?? 'system';
249
+ }
250
+ _getSystemDark() {
251
+ if (!this._isBrowser)
252
+ return false;
253
+ return window.matchMedia('(prefers-color-scheme: dark)').matches;
254
+ }
255
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
256
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxThemeService, providedIn: 'root' });
257
+ }
258
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxThemeService, decorators: [{
259
+ type: Injectable,
260
+ args: [{ providedIn: 'root' }]
261
+ }], ctorParameters: () => [] });
262
+
206
263
  class ClxBadgeComponent {
207
- _cfg = inject(CLX_THEME_CONFIG);
264
+ _themeSvc = inject(ClxThemeService);
208
265
  variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
209
266
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
210
267
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
211
268
  shape = input(undefined, ...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
212
269
  positioned = input(false, ...(ngDevMode ? [{ debugName: "positioned" }] : /* istanbul ignore next */ []));
213
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
214
- _size = computed(() => this.size() ?? this._cfg.defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
215
- _shape = computed(() => this.shape() ?? this._cfg.defaultShape, ...(ngDevMode ? [{ debugName: "_shape" }] : /* istanbul ignore next */ []));
270
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
271
+ _size = computed(() => this.size() ?? this._themeSvc.config().defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
272
+ _shape = computed(() => this.shape() ?? this._themeSvc.config().defaultShape, ...(ngDevMode ? [{ debugName: "_shape" }] : /* istanbul ignore next */ []));
216
273
  _hostClass = computed(() => {
217
274
  const t = resolveColor(this._color());
218
275
  const variant = this.variant();
@@ -220,7 +277,7 @@ class ClxBadgeComponent {
220
277
  const isCircle = sh === 'circle';
221
278
  const sizeClass = isCircle ? BADGE_CIRCLE_SIZE_MAP[this._size()] : BADGE_SIZE_MAP[this._size()];
222
279
  const shapeClass = sh === 'rounded'
223
- ? resolveRadius(this._cfg.borderRadius)
280
+ ? resolveRadius(this._themeSvc.config().borderRadius)
224
281
  : BADGE_SHAPE_FIXED[sh];
225
282
  const posClass = this.positioned()
226
283
  ? 'absolute top-0 right-0 translate-x-1/2 -translate-y-1/2'
@@ -658,11 +715,11 @@ const SPINNER_PULSE_SIZE_MAP = {
658
715
  };
659
716
 
660
717
  class ClxSpinnerComponent {
661
- _cfg = inject(CLX_THEME_CONFIG);
718
+ _themeSvc = inject(ClxThemeService);
662
719
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
663
720
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
664
721
  variant = input('spinner', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
665
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
722
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
666
723
  _spinnerClass = computed(() => {
667
724
  const size = SPINNER_SIZE_MAP[this.size()];
668
725
  if (this._color() === 'inherit')
@@ -740,14 +797,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
740
797
  }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
741
798
 
742
799
  class ClxButtonComponent {
743
- _cfg = inject(CLX_THEME_CONFIG);
800
+ _themeSvc = inject(ClxThemeService);
744
801
  variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
745
802
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
746
803
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
747
804
  shape = input(undefined, ...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
748
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
749
- _size = computed(() => this.size() ?? this._cfg.defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
750
- _shape = computed(() => this.shape() ?? this._cfg.defaultShape, ...(ngDevMode ? [{ debugName: "_shape" }] : /* istanbul ignore next */ []));
805
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
806
+ _size = computed(() => this.size() ?? this._themeSvc.config().defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
807
+ _shape = computed(() => this.shape() ?? this._themeSvc.config().defaultShape, ...(ngDevMode ? [{ debugName: "_shape" }] : /* istanbul ignore next */ []));
751
808
  loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
752
809
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
753
810
  block = input(false, ...(ngDevMode ? [{ debugName: "block" }] : /* istanbul ignore next */ []));
@@ -818,7 +875,7 @@ class ClxButtonComponent {
818
875
  : BUTTON_SIZE_MAP[this._size()];
819
876
  const s = this._shape();
820
877
  const shapeClass = s === 'rounded'
821
- ? resolveRadius(this._cfg.borderRadius)
878
+ ? resolveRadius(this._themeSvc.config().borderRadius)
822
879
  : BUTTON_SHAPE_FIXED[s];
823
880
  const overflowClass = (this.badge() !== undefined && this.badge() !== null) ? 'overflow-visible' : 'overflow-hidden';
824
881
  const base = BUTTON_BASE_CLASS.replace('overflow-hidden', overflowClass);
@@ -1140,12 +1197,12 @@ const TOOLTIP_SIZE_MAP = {
1140
1197
  };
1141
1198
 
1142
1199
  class ClxTooltipComponent {
1143
- _cfg = inject(CLX_THEME_CONFIG);
1200
+ _themeSvc = inject(ClxThemeService);
1144
1201
  text = input.required(...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
1145
1202
  position = input('top', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
1146
1203
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
1147
1204
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1148
- _color = computed(() => this.color() ?? this._cfg.neutralColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
1205
+ _color = computed(() => this.color() ?? this._themeSvc.config().neutralColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
1149
1206
  _hostClass = computed(() => {
1150
1207
  const t = resolveColor(this._color());
1151
1208
  return `${t.text} rounded-lg shadow-xl ${t.bg} ${TOOLTIP_SIZE_MAP[this.size()]}`;
@@ -1737,11 +1794,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
1737
1794
  }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], attached: [{ type: i0.Input, args: [{ isSignal: true, alias: "attached", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }] } });
1738
1795
 
1739
1796
  class ClxRatingComponent {
1740
- _cfg = inject(CLX_THEME_CONFIG);
1797
+ _themeSvc = inject(ClxThemeService);
1741
1798
  value = input(0, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
1742
1799
  max = input(5, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
1743
1800
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
1744
- _color = computed(() => this.color() ?? this._cfg.warningColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
1801
+ _color = computed(() => this.color() ?? this._themeSvc.config().warningColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
1745
1802
  _hexColor = computed(() => {
1746
1803
  const { color } = parseColorInput(this._color());
1747
1804
  return CLX_COLOR_HEX[color] ?? '#f59e0b';
@@ -1808,9 +1865,9 @@ const CAROUSEL_ASPECT_RATIO_MAP = {
1808
1865
  };
1809
1866
 
1810
1867
  class ClxCarouselComponent {
1811
- _cfg = inject(CLX_THEME_CONFIG);
1868
+ _themeSvc = inject(ClxThemeService);
1812
1869
  clxColor = input(undefined, ...(ngDevMode ? [{ debugName: "clxColor" }] : /* istanbul ignore next */ []));
1813
- _clxColor = computed(() => this.clxColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_clxColor" }] : /* istanbul ignore next */ []));
1870
+ _clxColor = computed(() => this.clxColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_clxColor" }] : /* istanbul ignore next */ []));
1814
1871
  autoPlay = input(false, ...(ngDevMode ? [{ debugName: "autoPlay" }] : /* istanbul ignore next */ []));
1815
1872
  interval = input(3000, ...(ngDevMode ? [{ debugName: "interval" }] : /* istanbul ignore next */ []));
1816
1873
  loop = input(true, ...(ngDevMode ? [{ debugName: "loop" }] : /* istanbul ignore next */ []));
@@ -2062,11 +2119,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
2062
2119
  }], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { clxTabPanel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clxTabPanel", required: true }] }] } });
2063
2120
 
2064
2121
  class ClxTabsComponent {
2065
- _cfg = inject(CLX_THEME_CONFIG);
2122
+ _themeSvc = inject(ClxThemeService);
2066
2123
  tabs = input.required(...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
2067
2124
  clxColor = input(undefined, ...(ngDevMode ? [{ debugName: "clxColor" }] : /* istanbul ignore next */ []));
2068
2125
  activeTab = model('', ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
2069
- _clxColor = computed(() => this.clxColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_clxColor" }] : /* istanbul ignore next */ []));
2126
+ _clxColor = computed(() => this.clxColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_clxColor" }] : /* istanbul ignore next */ []));
2070
2127
  _panels = contentChildren(ClxTabDirective, ...(ngDevMode ? [{ debugName: "_panels" }] : /* istanbul ignore next */ []));
2071
2128
  _underlineClass = computed(() => resolveColor(this._clxColor()).bg, ...(ngDevMode ? [{ debugName: "_underlineClass" }] : /* istanbul ignore next */ []));
2072
2129
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -2215,7 +2272,7 @@ class ClxNumberComponent {
2215
2272
  // ── Inputs ───────────────────────────────────────────────────────────────
2216
2273
  variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2217
2274
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
2218
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
2275
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
2219
2276
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
2220
2277
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
2221
2278
  placeholder = input('0', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
@@ -2244,8 +2301,8 @@ class ClxNumberComponent {
2244
2301
  _isAtMin = computed(() => this.min() !== null && this._value() <= this.min(), ...(ngDevMode ? [{ debugName: "_isAtMin" }] : /* istanbul ignore next */ []));
2245
2302
  _isAtMax = computed(() => this.max() !== null && this._value() >= this.max(), ...(ngDevMode ? [{ debugName: "_isAtMax" }] : /* istanbul ignore next */ []));
2246
2303
  // ── Computed classes ─────────────────────────────────────────────────────
2247
- _cfg = inject(CLX_THEME_CONFIG);
2248
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
2304
+ _themeSvc = inject(ClxThemeService);
2305
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
2249
2306
  _sizeConfig = computed(() => NUMBER_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_sizeConfig" }] : /* istanbul ignore next */ []));
2250
2307
  _labelClass = computed(() => `${this._sizeConfig().label} ${CLX_TEXT_LABEL} leading-none`, ...(ngDevMode ? [{ debugName: "_labelClass" }] : /* istanbul ignore next */ []));
2251
2308
  _hintClass = computed(() => `${this._sizeConfig().hint} ${CLX_TEXT_HINT}`, ...(ngDevMode ? [{ debugName: "_hintClass" }] : /* istanbul ignore next */ []));
@@ -2254,7 +2311,7 @@ class ClxNumberComponent {
2254
2311
  const focus = this._disabled() ? '' : resolveColor(this._color()).focusWithin;
2255
2312
  const border = this._disabled() ? `${CLX_BORDER_DISABLED} ${CLX_BG_DISABLED}` : CLX_BORDER_DEFAULT;
2256
2313
  const cursor = this._disabled() ? 'cursor-not-allowed' : '';
2257
- return `flex items-stretch ${size.container} bg-clx-surface ${resolveRadius(this._cfg.borderRadius)} border ${border} ${focus} ${cursor} overflow-hidden transition-all duration-200`;
2314
+ return `flex items-stretch ${size.container} bg-clx-surface ${resolveRadius(this._themeSvc.config().borderRadius)} border ${border} ${focus} ${cursor} overflow-hidden transition-all duration-200`;
2258
2315
  }, ...(ngDevMode ? [{ debugName: "_containerClass" }] : /* istanbul ignore next */ []));
2259
2316
  /** Colored prefix icon cell — matches the input accent color */
2260
2317
  _prefixCellCls = computed(() => {
@@ -2574,9 +2631,9 @@ const LIST_SIZE_MAP = {
2574
2631
  };
2575
2632
 
2576
2633
  class ClxListComponent {
2577
- _cfg = inject(CLX_THEME_CONFIG);
2634
+ _themeSvc = inject(ClxThemeService);
2578
2635
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
2579
- resolvedColor = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
2636
+ resolvedColor = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
2580
2637
  variant = input('flat', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2581
2638
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
2582
2639
  numbered = input(false, ...(ngDevMode ? [{ debugName: "numbered" }] : /* istanbul ignore next */ []));
@@ -2615,14 +2672,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
2615
2672
 
2616
2673
  class ClxListItemComponent {
2617
2674
  _ctx = inject(CLX_LIST_CONTEXT);
2618
- _cfg = inject(CLX_THEME_CONFIG);
2675
+ _themeSvc = inject(ClxThemeService);
2619
2676
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
2620
2677
  sublabel = input('', ...(ngDevMode ? [{ debugName: "sublabel" }] : /* istanbul ignore next */ []));
2621
2678
  icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
2622
2679
  meta = input('', ...(ngDevMode ? [{ debugName: "meta" }] : /* istanbul ignore next */ []));
2623
2680
  metaColor = input(undefined, ...(ngDevMode ? [{ debugName: "metaColor" }] : /* istanbul ignore next */ []));
2624
2681
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
2625
- _metaColor = computed(() => this.metaColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_metaColor" }] : /* istanbul ignore next */ []));
2682
+ _metaColor = computed(() => this.metaColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_metaColor" }] : /* istanbul ignore next */ []));
2626
2683
  _index = this._ctx.registerItem();
2627
2684
  _iconClass = computed(() => resolveColor(this._ctx.resolvedColor()).textSubtle, ...(ngDevMode ? [{ debugName: "_iconClass" }] : /* istanbul ignore next */ []));
2628
2685
  _hostClass = computed(() => {
@@ -2825,10 +2882,10 @@ const SIZE_MAP = {
2825
2882
  lg: { row: 'py-2 px-2', text: 'text-sm', icon: 'md', indent: 'pl-7' },
2826
2883
  };
2827
2884
  class ClxTreeComponent {
2828
- _cfg = inject(CLX_THEME_CONFIG);
2885
+ _themeSvc = inject(ClxThemeService);
2829
2886
  nodes = input.required(...(ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []));
2830
2887
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
2831
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
2888
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
2832
2889
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
2833
2890
  variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2834
2891
  selectable = input(true, ...(ngDevMode ? [{ debugName: "selectable" }] : /* istanbul ignore next */ []));
@@ -2838,7 +2895,7 @@ class ClxTreeComponent {
2838
2895
  expandedIds = model([], ...(ngDevMode ? [{ debugName: "expandedIds" }] : /* istanbul ignore next */ []));
2839
2896
  selectChange = output();
2840
2897
  expandChange = output();
2841
- _treeSize = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_treeSize" }] : /* istanbul ignore next */ []));
2898
+ _treeSize = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_treeSize" }] : /* istanbul ignore next */ []));
2842
2899
  _s = computed(() => SIZE_MAP[this._treeSize()], ...(ngDevMode ? [{ debugName: "_s" }] : /* istanbul ignore next */ []));
2843
2900
  _indentPx = computed(() => this._treeSize() === 'sm' ? 16 : this._treeSize() === 'lg' ? 24 : 20, ...(ngDevMode ? [{ debugName: "_indentPx" }] : /* istanbul ignore next */ []));
2844
2901
  _rootClass = computed(() => `select-none ${this.variant() === 'lines' ? 'divide-y divide-clx-border-soft' : ''}`, ...(ngDevMode ? [{ debugName: "_rootClass" }] : /* istanbul ignore next */ []));
@@ -3043,12 +3100,12 @@ const CHECKBOX_SIZE_MAP = {
3043
3100
  };
3044
3101
 
3045
3102
  class ClxCheckboxComponent {
3046
- _cfg = inject(CLX_THEME_CONFIG);
3103
+ _themeSvc = inject(ClxThemeService);
3047
3104
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
3048
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3105
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3049
3106
  variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3050
3107
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
3051
- _size = computed(() => this.size() ?? this._cfg.defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3108
+ _size = computed(() => this.size() ?? this._themeSvc.config().defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3052
3109
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
3053
3110
  /** Initial value when used without FormControl */
3054
3111
  value = input(false, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
@@ -3192,15 +3249,15 @@ const SLIDER_SIZE_MAP = {
3192
3249
  };
3193
3250
 
3194
3251
  class ClxSliderComponent {
3195
- _cfg = inject(CLX_THEME_CONFIG);
3252
+ _themeSvc = inject(ClxThemeService);
3196
3253
  // ── Inputs ──────────────────────────────────────────────────────────────────
3197
3254
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
3198
3255
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
3199
3256
  errorMessage = input('Valor fuera de rango', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
3200
3257
  activeColor = input(undefined, ...(ngDevMode ? [{ debugName: "activeColor" }] : /* istanbul ignore next */ []));
3201
- _activeColor = computed(() => this.activeColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
3258
+ _activeColor = computed(() => this.activeColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
3202
3259
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
3203
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3260
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3204
3261
  min = input(0, ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
3205
3262
  max = input(100, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
3206
3263
  step = input(1, ...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
@@ -3497,9 +3554,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
3497
3554
 
3498
3555
  const CLX_RADIO_GROUP = new InjectionToken('CLX_RADIO_GROUP');
3499
3556
  class ClxRadioGroupComponent {
3500
- _cfg = inject(CLX_THEME_CONFIG);
3557
+ _themeSvc = inject(ClxThemeService);
3501
3558
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
3502
- resolvedColor = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
3559
+ resolvedColor = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
3503
3560
  variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3504
3561
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
3505
3562
  direction = input('horizontal', ...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
@@ -3585,12 +3642,12 @@ class ClxRadioComponent {
3585
3642
  variant = input(null, ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3586
3643
  size = input(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
3587
3644
  _group = inject(CLX_RADIO_GROUP, { optional: true });
3588
- _cfg = inject(CLX_THEME_CONFIG);
3645
+ _themeSvc = inject(ClxThemeService);
3589
3646
  _checked = computed(() => this._group ? this._group._value() === this.value() : false, ...(ngDevMode ? [{ debugName: "_checked" }] : /* istanbul ignore next */ []));
3590
3647
  _isDisabled = computed(() => this._group?.isDisabled() ?? false, ...(ngDevMode ? [{ debugName: "_isDisabled" }] : /* istanbul ignore next */ []));
3591
- _color = computed(() => this.color() ?? this._group?.resolvedColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3648
+ _color = computed(() => this.color() ?? this._group?.resolvedColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3592
3649
  _variant = computed(() => this.variant() ?? this._group?.variant() ?? 'solid', ...(ngDevMode ? [{ debugName: "_variant" }] : /* istanbul ignore next */ []));
3593
- _size = computed(() => this.size() ?? this._group?.size() ?? this._cfg.defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3650
+ _size = computed(() => this.size() ?? this._group?.size() ?? this._themeSvc.config().defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3594
3651
  _sizeConfig = computed(() => RADIO_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_sizeConfig" }] : /* istanbul ignore next */ []));
3595
3652
  _ringClass = computed(() => {
3596
3653
  const base = `${this._sizeConfig().ring} rounded-full border-2 flex items-center justify-center transition-all duration-200`;
@@ -3695,14 +3752,14 @@ const TAG_SIZE_MAP = {
3695
3752
  const TAG_SHAPE_PILL = 'rounded-full';
3696
3753
 
3697
3754
  class ClxTagComponent {
3698
- _cfg = inject(CLX_THEME_CONFIG);
3755
+ _themeSvc = inject(ClxThemeService);
3699
3756
  variant = input('soft', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3700
3757
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
3701
3758
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
3702
- _tagSize = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_tagSize" }] : /* istanbul ignore next */ []));
3759
+ _tagSize = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_tagSize" }] : /* istanbul ignore next */ []));
3703
3760
  shape = input('rounded', ...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
3704
3761
  onRemove = output();
3705
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3762
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3706
3763
  _sizeConfig = computed(() => TAG_SIZE_MAP[this._tagSize()], ...(ngDevMode ? [{ debugName: "_sizeConfig" }] : /* istanbul ignore next */ []));
3707
3764
  _colorClass = computed(() => {
3708
3765
  const t = resolveColor(this._color());
@@ -3715,7 +3772,7 @@ class ClxTagComponent {
3715
3772
  }, ...(ngDevMode ? [{ debugName: "_colorClass" }] : /* istanbul ignore next */ []));
3716
3773
  _hostClass = computed(() => {
3717
3774
  const s = this._sizeConfig();
3718
- const shapeClass = this.shape() === 'pill' ? TAG_SHAPE_PILL : resolveRadius(this._cfg.borderRadius);
3775
+ const shapeClass = this.shape() === 'pill' ? TAG_SHAPE_PILL : resolveRadius(this._themeSvc.config().borderRadius);
3719
3776
  return `inline-flex items-center font-medium leading-none ${s.gap} ${s.text} ${s.pad} ${shapeClass} ${this._colorClass()}`;
3720
3777
  }, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
3721
3778
  _closeBtnColor = computed(() => this.variant() === 'solid' ? 'white' : this._color(), ...(ngDevMode ? [{ debugName: "_closeBtnColor" }] : /* istanbul ignore next */ []));
@@ -3825,13 +3882,13 @@ const INPUT_SIZE_MAP = {
3825
3882
 
3826
3883
  let _clxInputIdCounter = 0;
3827
3884
  class ClxInputComponent {
3828
- _cfg = inject(CLX_THEME_CONFIG);
3885
+ _themeSvc = inject(ClxThemeService);
3829
3886
  // ── Inputs ───────────────────────────────────────────────────────────────
3830
3887
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
3831
3888
  placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
3832
3889
  type = input('text', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
3833
3890
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
3834
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3891
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3835
3892
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
3836
3893
  prefixIcon = input('', ...(ngDevMode ? [{ debugName: "prefixIcon" }] : /* istanbul ignore next */ []));
3837
3894
  suffixIcon = input('', ...(ngDevMode ? [{ debugName: "suffixIcon" }] : /* istanbul ignore next */ []));
@@ -3840,7 +3897,7 @@ class ClxInputComponent {
3840
3897
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
3841
3898
  statusMessage = input('', ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
3842
3899
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
3843
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3900
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3844
3901
  /** Initial value for standalone use (without FormControl) */
3845
3902
  value = input('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
3846
3903
  /** Disabled state for standalone use (without FormControl) */
@@ -3882,7 +3939,7 @@ class ClxInputComponent {
3882
3939
  : this.status() !== 'default'
3883
3940
  ? this._statusCfg().ring.replace(/focus:/g, 'focus-within:')
3884
3941
  : resolveColor(this._color()).focusWithin;
3885
- return `relative flex items-stretch ${resolveRadius(this._cfg.borderRadius)} border ${border} ${focusCls} overflow-hidden transition-all duration-200`;
3942
+ return `relative flex items-stretch ${resolveRadius(this._themeSvc.config().borderRadius)} border ${border} ${focusCls} overflow-hidden transition-all duration-200`;
3886
3943
  }, ...(ngDevMode ? [{ debugName: "_wrapperClass" }] : /* istanbul ignore next */ []));
3887
3944
  _inputClass = computed(() => {
3888
3945
  const size = this._sizeConfig();
@@ -3900,7 +3957,7 @@ class ClxInputComponent {
3900
3957
  const hasSuffix = this.type() === 'password' || this.status() !== 'default' || !!this.suffixIcon();
3901
3958
  const pl = size.padDefaultL;
3902
3959
  const pr = hasSuffix ? size.padRight : size.padDefaultR;
3903
- const base = `w-full ${resolveRadius(this._cfg.borderRadius)} border ${size.input} ${pl} ${pr} outline-none transition-all duration-200`;
3960
+ const base = `w-full ${resolveRadius(this._themeSvc.config().borderRadius)} border ${size.input} ${pl} ${pr} outline-none transition-all duration-200`;
3904
3961
  if (this._disabled()) {
3905
3962
  return `${base} ${CLX_BORDER_DISABLED} ${CLX_BG_DISABLED} cursor-not-allowed ${CLX_TEXT_DISABLED} ${CLX_PLACEHOLDER}`;
3906
3963
  }
@@ -4145,7 +4202,7 @@ class ClxSelectComponent {
4145
4202
  searchPlaceholder = input('Buscar...', ...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
4146
4203
  activeColor = input(undefined, ...(ngDevMode ? [{ debugName: "activeColor" }] : /* istanbul ignore next */ []));
4147
4204
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
4148
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
4205
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
4149
4206
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
4150
4207
  errorMessage = input('Este campo es requerido', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
4151
4208
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
@@ -4171,9 +4228,9 @@ class ClxSelectComponent {
4171
4228
  _selectedVals = signal([], ...(ngDevMode ? [{ debugName: "_selectedVals" }] : /* istanbul ignore next */ []));
4172
4229
  _cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []));
4173
4230
  // ── DI ─────────────────────────────────────────────────────────────────────
4174
- _cfg = inject(CLX_THEME_CONFIG);
4231
+ _themeSvc = inject(ClxThemeService);
4175
4232
  _ngControl = inject(NgControl, { optional: true, self: true });
4176
- _activeColor = computed(() => this.activeColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
4233
+ _activeColor = computed(() => this.activeColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
4177
4234
  _el = inject((ElementRef));
4178
4235
  _sso = inject(ScrollStrategyOptions);
4179
4236
  _scrollStrategy = this._sso.reposition();
@@ -4233,7 +4290,7 @@ class ClxSelectComponent {
4233
4290
  _hintClass = computed(() => `${this._sizeConfig().hint} ${CLX_TEXT_HINT}`, ...(ngDevMode ? [{ debugName: "_hintClass" }] : /* istanbul ignore next */ []));
4234
4291
  _triggerClass = computed(() => {
4235
4292
  const s = this._sizeConfig();
4236
- const base = `relative flex items-center ${resolveRadius(this._cfg.borderRadius)} border transition-all duration-200 outline-none w-full overflow-hidden`;
4293
+ const base = `relative flex items-center ${resolveRadius(this._themeSvc.config().borderRadius)} border transition-all duration-200 outline-none w-full overflow-hidden`;
4237
4294
  if (this._disabled()) {
4238
4295
  return `${base} ${s.minH} ${CLX_BORDER_DISABLED} ${CLX_BG_DISABLED} cursor-not-allowed opacity-60`;
4239
4296
  }
@@ -4646,11 +4703,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
4646
4703
  }] } });
4647
4704
 
4648
4705
  class ClxFilterPanelComponent {
4649
- _cfg = inject(CLX_THEME_CONFIG);
4706
+ _themeSvc = inject(ClxThemeService);
4650
4707
  fields = input.required(...(ngDevMode ? [{ debugName: "fields" }] : /* istanbul ignore next */ []));
4651
4708
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
4652
4709
  showApply = input(false, ...(ngDevMode ? [{ debugName: "showApply" }] : /* istanbul ignore next */ []));
4653
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
4710
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
4654
4711
  values = model({}, ...(ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []));
4655
4712
  filterChange = output();
4656
4713
  applyChange = output();
@@ -5329,12 +5386,12 @@ class ClxDrawerComponent {
5329
5386
  cancelClick = output();
5330
5387
  _modalRef = inject(CLX_MODAL_REF, { optional: true });
5331
5388
  _sizeToken = inject(CLX_DRAWER_SIZE, { optional: true });
5332
- _cfg = inject(CLX_THEME_CONFIG);
5389
+ _themeSvc = inject(ClxThemeService);
5333
5390
  _resolvedSize = computed(() => this.size() ?? this._sizeToken ?? 'md', ...(ngDevMode ? [{ debugName: "_resolvedSize" }] : /* istanbul ignore next */ []));
5334
5391
  _hostClass = computed(() => `${DRAWER_CONTAINER_CLASS} ${DRAWER_SIZE_MAP[this._resolvedSize()]}`, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
5335
5392
  _hasBuiltInButtons = computed(() => !!this.confirmButton(), ...(ngDevMode ? [{ debugName: "_hasBuiltInButtons" }] : /* istanbul ignore next */ []));
5336
5393
  _confirmText = computed(() => this.confirmButton()?.text ?? 'Aceptar', ...(ngDevMode ? [{ debugName: "_confirmText" }] : /* istanbul ignore next */ []));
5337
- _confirmColor = computed(() => this.confirmButton()?.color ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_confirmColor" }] : /* istanbul ignore next */ []));
5394
+ _confirmColor = computed(() => this.confirmButton()?.color ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_confirmColor" }] : /* istanbul ignore next */ []));
5338
5395
  _confirmVariant = computed(() => this.confirmButton()?.variant ?? 'solid', ...(ngDevMode ? [{ debugName: "_confirmVariant" }] : /* istanbul ignore next */ []));
5339
5396
  _cancelText = computed(() => this.cancelButton()?.text ?? 'Cancelar', ...(ngDevMode ? [{ debugName: "_cancelText" }] : /* istanbul ignore next */ []));
5340
5397
  _cancelColor = computed(() => this.cancelButton()?.color ?? 'slate', ...(ngDevMode ? [{ debugName: "_cancelColor" }] : /* istanbul ignore next */ []));
@@ -5474,12 +5531,12 @@ class ClxModalComponent {
5474
5531
  cancelClick = output();
5475
5532
  _modalRef = inject(CLX_MODAL_REF, { optional: true });
5476
5533
  _sizeToken = inject(CLX_MODAL_SIZE, { optional: true });
5477
- _cfg = inject(CLX_THEME_CONFIG);
5534
+ _themeSvc = inject(ClxThemeService);
5478
5535
  _resolvedSize = computed(() => this.size() ?? this._sizeToken ?? 'md', ...(ngDevMode ? [{ debugName: "_resolvedSize" }] : /* istanbul ignore next */ []));
5479
5536
  _hostClass = computed(() => `${MODAL_CONTAINER_CLASS} ${MODAL_SIZE_MAP[this._resolvedSize()]} max-h-[90vh]`, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
5480
5537
  _hasBuiltInButtons = computed(() => !!this.confirmButton(), ...(ngDevMode ? [{ debugName: "_hasBuiltInButtons" }] : /* istanbul ignore next */ []));
5481
5538
  _confirmText = computed(() => this.confirmButton()?.text ?? 'Aceptar', ...(ngDevMode ? [{ debugName: "_confirmText" }] : /* istanbul ignore next */ []));
5482
- _confirmColor = computed(() => this.confirmButton()?.color ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_confirmColor" }] : /* istanbul ignore next */ []));
5539
+ _confirmColor = computed(() => this.confirmButton()?.color ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_confirmColor" }] : /* istanbul ignore next */ []));
5483
5540
  _confirmVariant = computed(() => this.confirmButton()?.variant ?? 'solid', ...(ngDevMode ? [{ debugName: "_confirmVariant" }] : /* istanbul ignore next */ []));
5484
5541
  _cancelText = computed(() => this.cancelButton()?.text ?? 'Cancelar', ...(ngDevMode ? [{ debugName: "_cancelText" }] : /* istanbul ignore next */ []));
5485
5542
  _cancelColor = computed(() => this.cancelButton()?.color ?? 'slate', ...(ngDevMode ? [{ debugName: "_cancelColor" }] : /* istanbul ignore next */ []));
@@ -5645,11 +5702,11 @@ const PAGINATION_ELLIPSIS_CLASS = {
5645
5702
  const PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS = [5, 10, 25, 50, 100];
5646
5703
 
5647
5704
  class ClxPaginationComponent {
5648
- _themeCfg = inject(CLX_THEME_CONFIG);
5705
+ _themeSvc = inject(ClxThemeService);
5649
5706
  // ── Inputs ─────────────────────────────────────────────────────────────────
5650
5707
  totalItems = input.required(...(ngDevMode ? [{ debugName: "totalItems" }] : /* istanbul ignore next */ []));
5651
5708
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
5652
- _color = computed(() => this.color() ?? this._themeCfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
5709
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
5653
5710
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
5654
5711
  showPageSize = input(true, ...(ngDevMode ? [{ debugName: "showPageSize" }] : /* istanbul ignore next */ []));
5655
5712
  /** Opciones manuales. Si está vacío (default) se calculan automáticamente desde totalItems. */
@@ -5683,7 +5740,7 @@ class ClxPaginationComponent {
5683
5740
  });
5684
5741
  }
5685
5742
  // ── Computed: config por tamaño ────────────────────────────────────────────
5686
- _size = computed(() => (this.size() ?? this._themeCfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
5743
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
5687
5744
  _cfg = computed(() => PAGINATION_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_cfg" }] : /* istanbul ignore next */ []));
5688
5745
  // ── Computed: total de páginas ─────────────────────────────────────────────
5689
5746
  totalPages = computed(() => {
@@ -6448,13 +6505,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
6448
6505
  }] });
6449
6506
 
6450
6507
  class ClxCardComponent {
6451
- _cfg = inject(CLX_THEME_CONFIG);
6508
+ _themeSvc = inject(ClxThemeService);
6452
6509
  variant = input('elevated', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
6453
6510
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
6454
6511
  padding = input('md', ...(ngDevMode ? [{ debugName: "padding" }] : /* istanbul ignore next */ []));
6455
6512
  shadow = input(undefined, ...(ngDevMode ? [{ debugName: "shadow" }] : /* istanbul ignore next */ []));
6456
6513
  hover = input(false, ...(ngDevMode ? [{ debugName: "hover" }] : /* istanbul ignore next */ []));
6457
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6514
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6458
6515
  _headerSlot = contentChild(ClxCardHeaderDirective, ...(ngDevMode ? [{ debugName: "_headerSlot" }] : /* istanbul ignore next */ []));
6459
6516
  _bodySlot = contentChild(ClxCardBodyDirective, ...(ngDevMode ? [{ debugName: "_bodySlot" }] : /* istanbul ignore next */ []));
6460
6517
  _footerSlot = contentChild(ClxCardFooterDirective, ...(ngDevMode ? [{ debugName: "_footerSlot" }] : /* istanbul ignore next */ []));
@@ -6483,7 +6540,7 @@ class ClxCardComponent {
6483
6540
  const shadowClass = shadowInput !== undefined ? CARD_SHADOW_MAP[shadowInput] : '';
6484
6541
  variantClass = `bg-clx-surface-2 border border-transparent ${shadowClass}`;
6485
6542
  }
6486
- return `flex flex-col ${resolveContainerRadius(this._cfg.borderRadius)} overflow-hidden w-full ${variantClass} ${hover}`.trim();
6543
+ return `flex flex-col ${resolveContainerRadius(this._themeSvc.config().borderRadius)} overflow-hidden w-full ${variantClass} ${hover}`.trim();
6487
6544
  }, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
6488
6545
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6489
6546
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxCardComponent, isStandalone: true, selector: "clx-card", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, hover: { classPropertyName: "hover", publicName: "hover", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_hostClass()" } }, queries: [{ propertyName: "_headerSlot", first: true, predicate: ClxCardHeaderDirective, descendants: true, isSignal: true }, { propertyName: "_bodySlot", first: true, predicate: ClxCardBodyDirective, descendants: true, isSignal: true }, { propertyName: "_footerSlot", first: true, predicate: ClxCardFooterDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
@@ -6546,10 +6603,10 @@ const STEPPER_SIZE_MAP = {
6546
6603
  };
6547
6604
 
6548
6605
  class ClxStepperComponent {
6549
- _cfg = inject(CLX_THEME_CONFIG);
6606
+ _themeSvc = inject(ClxThemeService);
6550
6607
  steps = input.required(...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
6551
6608
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
6552
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6609
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6553
6610
  orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
6554
6611
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
6555
6612
  _tokens = computed(() => STEPPER_SIZE_MAP[this.size()], ...(ngDevMode ? [{ debugName: "_tokens" }] : /* istanbul ignore next */ []));
@@ -6747,7 +6804,7 @@ const AVATAR_ICON_SIZE_MAP = {
6747
6804
  };
6748
6805
 
6749
6806
  class ClxAvatarComponent {
6750
- _cfg = inject(CLX_THEME_CONFIG);
6807
+ _themeSvc = inject(ClxThemeService);
6751
6808
  src = input(null, ...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
6752
6809
  initials = input(null, ...(ngDevMode ? [{ debugName: "initials" }] : /* istanbul ignore next */ []));
6753
6810
  iconName = input(null, ...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
@@ -6755,7 +6812,7 @@ class ClxAvatarComponent {
6755
6812
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
6756
6813
  shape = input('circle', ...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
6757
6814
  alt = input('Avatar', ...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
6758
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6815
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6759
6816
  _contentType = computed(() => {
6760
6817
  if (this.src())
6761
6818
  return 'image';
@@ -6848,9 +6905,9 @@ const TIMELINE_SIZE_MAP = {
6848
6905
  };
6849
6906
 
6850
6907
  class ClxTimelineComponent {
6851
- _cfg = inject(CLX_THEME_CONFIG);
6908
+ _themeSvc = inject(ClxThemeService);
6852
6909
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
6853
- resolvedColor = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
6910
+ resolvedColor = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
6854
6911
  lineStyle = input('dotted', ...(ngDevMode ? [{ debugName: "lineStyle" }] : /* istanbul ignore next */ []));
6855
6912
  mode = input('left', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
6856
6913
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
@@ -7247,16 +7304,16 @@ class ClxColorPickerComponent {
7247
7304
  // ── Unique label id ────────────────────────────────────────────────────────
7248
7305
  static _seq = 0;
7249
7306
  _labelId = `clx-cp-label-${++ClxColorPickerComponent._seq}`;
7250
- _cfg = inject(CLX_THEME_CONFIG);
7307
+ _themeSvc = inject(ClxThemeService);
7251
7308
  // ── Inputs ─────────────────────────────────────────────────────────────────
7252
7309
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
7253
7310
  placeholder = input('Selecciona un color', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
7254
7311
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
7255
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
7312
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
7256
7313
  format = input('hex', ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
7257
7314
  presets = input([], ...(ngDevMode ? [{ debugName: "presets" }] : /* istanbul ignore next */ []));
7258
7315
  activeColor = input(undefined, ...(ngDevMode ? [{ debugName: "activeColor" }] : /* istanbul ignore next */ []));
7259
- _activeColor = computed(() => this.activeColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
7316
+ _activeColor = computed(() => this.activeColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
7260
7317
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
7261
7318
  errorMessage = input('Este campo es requerido', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
7262
7319
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
@@ -7323,7 +7380,7 @@ class ClxColorPickerComponent {
7323
7380
  }, ...(ngDevMode ? [{ debugName: "_displayClass" }] : /* istanbul ignore next */ []));
7324
7381
  _triggerClass = computed(() => {
7325
7382
  const s = this._sizeConfig();
7326
- const base = `relative flex items-center ${resolveRadius(this._cfg.borderRadius)} border transition-all duration-200 outline-none w-full`;
7383
+ const base = `relative flex items-center ${resolveRadius(this._themeSvc.config().borderRadius)} border transition-all duration-200 outline-none w-full`;
7327
7384
  if (this._disabled()) {
7328
7385
  return `${base} ${s.minH} ${CLX_BORDER_DISABLED} ${CLX_BG_DISABLED} cursor-not-allowed opacity-60`;
7329
7386
  }
@@ -7867,7 +7924,7 @@ class ClxDatepickerComponent {
7867
7924
  placeholder = input('Selecciona una fecha', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
7868
7925
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
7869
7926
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
7870
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
7927
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
7871
7928
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
7872
7929
  statusMessage = input('', ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
7873
7930
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
@@ -7884,7 +7941,7 @@ class ClxDatepickerComponent {
7884
7941
  _isOpen = signal(false, ...(ngDevMode ? [{ debugName: "_isOpen" }] : /* istanbul ignore next */ []));
7885
7942
  _showYearPicker = signal(false, ...(ngDevMode ? [{ debugName: "_showYearPicker" }] : /* istanbul ignore next */ []));
7886
7943
  _dayLabels = DAY_LABELS$1;
7887
- _cfg = inject(CLX_THEME_CONFIG);
7944
+ _themeSvc = inject(ClxThemeService);
7888
7945
  _el = inject((ElementRef));
7889
7946
  _sso = inject(ScrollStrategyOptions);
7890
7947
  _scrollStrategy = this._sso.reposition();
@@ -7911,7 +7968,7 @@ class ClxDatepickerComponent {
7911
7968
  this._isOpen();
7912
7969
  return this._el.nativeElement.getBoundingClientRect().width;
7913
7970
  }, ...(ngDevMode ? [{ debugName: "_overlayWidth" }] : /* istanbul ignore next */ []));
7914
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
7971
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
7915
7972
  _labelClass = computed(() => `${this._sizeConfig().label} ${CLX_TEXT_LABEL} leading-none`, ...(ngDevMode ? [{ debugName: "_labelClass" }] : /* istanbul ignore next */ []));
7916
7973
  _hintClass = computed(() => `${this._sizeConfig().hint} ${CLX_TEXT_HINT}`, ...(ngDevMode ? [{ debugName: "_hintClass" }] : /* istanbul ignore next */ []));
7917
7974
  _statusMsgClass = computed(() => `${this._sizeConfig().hint} ${this._statusCfg().msgCls}`, ...(ngDevMode ? [{ debugName: "_statusMsgClass" }] : /* istanbul ignore next */ []));
@@ -7925,7 +7982,7 @@ class ClxDatepickerComponent {
7925
7982
  const focus = resolveColor(this._color()).focus;
7926
7983
  const border = this._disabled() ? `${CLX_BORDER_DISABLED} ${CLX_BG_DISABLED}` : `${status.border} focus:outline-none ${focus}`;
7927
7984
  const cursor = this._disabled() ? 'cursor-not-allowed opacity-60' : 'cursor-pointer';
7928
- return `relative flex items-stretch ${size.trigger} ${resolveRadius(this._cfg.borderRadius)} border ${border} ${cursor} overflow-hidden transition-all duration-200 select-none`;
7985
+ return `relative flex items-stretch ${size.trigger} ${resolveRadius(this._themeSvc.config().borderRadius)} border ${border} ${cursor} overflow-hidden transition-all duration-200 select-none`;
7929
7986
  }, ...(ngDevMode ? [{ debugName: "_triggerClass" }] : /* istanbul ignore next */ []));
7930
7987
  _displayClass = computed(() => {
7931
7988
  const hasValue = !!this._value();
@@ -8295,7 +8352,7 @@ class ClxTimepickerComponent {
8295
8352
  placeholder = input('Selecciona una hora', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
8296
8353
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
8297
8354
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
8298
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
8355
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
8299
8356
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
8300
8357
  statusMessage = input('', ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
8301
8358
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
@@ -8313,7 +8370,7 @@ class ClxTimepickerComponent {
8313
8370
  _isOpen = signal(false, ...(ngDevMode ? [{ debugName: "_isOpen" }] : /* istanbul ignore next */ []));
8314
8371
  _hours = HOURS;
8315
8372
  _minutes = MINUTES;
8316
- _cfg = inject(CLX_THEME_CONFIG);
8373
+ _themeSvc = inject(ClxThemeService);
8317
8374
  _el = inject((ElementRef));
8318
8375
  _sso = inject(ScrollStrategyOptions);
8319
8376
  _scrollStrategy = this._sso.reposition();
@@ -8329,7 +8386,7 @@ class ClxTimepickerComponent {
8329
8386
  this._isOpen();
8330
8387
  return this._el.nativeElement.getBoundingClientRect().width;
8331
8388
  }, ...(ngDevMode ? [{ debugName: "_overlayWidth" }] : /* istanbul ignore next */ []));
8332
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
8389
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
8333
8390
  _labelClass = computed(() => `${this._sizeConfig().label} ${CLX_TEXT_LABEL} leading-none`, ...(ngDevMode ? [{ debugName: "_labelClass" }] : /* istanbul ignore next */ []));
8334
8391
  _hintClass = computed(() => `${this._sizeConfig().hint} ${CLX_TEXT_HINT}`, ...(ngDevMode ? [{ debugName: "_hintClass" }] : /* istanbul ignore next */ []));
8335
8392
  _statusMsgClass = computed(() => `${this._sizeConfig().hint} ${this._statusCfg().msgCls}`, ...(ngDevMode ? [{ debugName: "_statusMsgClass" }] : /* istanbul ignore next */ []));
@@ -8343,7 +8400,7 @@ class ClxTimepickerComponent {
8343
8400
  const focus = resolveColor(this._color()).focus;
8344
8401
  const border = this._disabled() ? `${CLX_BORDER_DISABLED} ${CLX_BG_DISABLED}` : `${status.border} focus:outline-none ${focus}`;
8345
8402
  const cursor = this._disabled() ? 'cursor-not-allowed opacity-60' : 'cursor-pointer';
8346
- return `relative flex items-stretch ${size.trigger} ${resolveRadius(this._cfg.borderRadius)} border ${border} ${cursor} overflow-hidden transition-all duration-200 select-none`;
8403
+ return `relative flex items-stretch ${size.trigger} ${resolveRadius(this._themeSvc.config().borderRadius)} border ${border} ${cursor} overflow-hidden transition-all duration-200 select-none`;
8347
8404
  }, ...(ngDevMode ? [{ debugName: "_triggerClass" }] : /* istanbul ignore next */ []));
8348
8405
  _displayClass = computed(() => {
8349
8406
  const hasValue = !!this._value();
@@ -8631,13 +8688,13 @@ const DATE_PRESETS = [
8631
8688
  { label: 'Este año', range: () => { const y = new Date().getFullYear(); return { from: new Date(y, 0, 1), to: new Date(y, 11, 31) }; } },
8632
8689
  ];
8633
8690
  class ClxDateRangePickerComponent {
8634
- _cfg = inject(CLX_THEME_CONFIG);
8691
+ _themeSvc = inject(ClxThemeService);
8635
8692
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
8636
8693
  placeholder = input('Selecciona un rango', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
8637
8694
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
8638
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
8695
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
8639
8696
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
8640
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
8697
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
8641
8698
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
8642
8699
  statusMessage = input('', ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
8643
8700
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
@@ -8724,7 +8781,7 @@ class ClxDateRangePickerComponent {
8724
8781
  const focus = resolveColor(this._color()).focus;
8725
8782
  const border = this._disabled() ? 'border-gray-200 bg-gray-50' : `${status.border} focus:outline-none ${focus}`;
8726
8783
  const cursor = this._disabled() ? 'cursor-not-allowed opacity-60' : 'cursor-pointer';
8727
- return `relative flex items-stretch ${size.trigger} ${resolveRadius(this._cfg.borderRadius)} border ${border} ${cursor} overflow-hidden transition-all duration-200 select-none`;
8784
+ return `relative flex items-stretch ${size.trigger} ${resolveRadius(this._themeSvc.config().borderRadius)} border ${border} ${cursor} overflow-hidden transition-all duration-200 select-none`;
8728
8785
  }, ...(ngDevMode ? [{ debugName: "_triggerClass" }] : /* istanbul ignore next */ []));
8729
8786
  _displayClass = computed(() => {
8730
8787
  const color = this._disabled() ? 'text-clx-text-faint' : this._hasValue() ? 'text-clx-text-label' : 'text-clx-text-faint';
@@ -9194,7 +9251,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
9194
9251
 
9195
9252
  class ClxEditorLinkModalComponent {
9196
9253
  _modalRef = inject(CLX_MODAL_REF, { optional: true });
9197
- _primaryColor = inject(CLX_THEME_CONFIG).primaryColor;
9254
+ _themeSvc = inject(ClxThemeService);
9255
+ _primaryColor = computed(() => this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_primaryColor" }] : /* istanbul ignore next */ []));
9198
9256
  _form = new FormGroup({
9199
9257
  text: new FormControl('', { nonNullable: true }),
9200
9258
  url: new FormControl('', { nonNullable: true, validators: [Validators.required, Validators.pattern(/^https?:\/\/.+/)] }),
@@ -9216,7 +9274,7 @@ class ClxEditorLinkModalComponent {
9216
9274
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.15", type: ClxEditorLinkModalComponent, isStandalone: true, selector: "clx-editor-link-modal", ngImport: i0, template: `
9217
9275
  <clx-modal
9218
9276
  size="sm"
9219
- [confirmButton]="{ text: 'Insertar', color: _primaryColor }"
9277
+ [confirmButton]="{ text: 'Insertar', color: _primaryColor() }"
9220
9278
  [cancelButton]="{ text: 'Cancelar', color: 'slate', variant: 'ghost' }"
9221
9279
  [showCancelButton]="true"
9222
9280
  (confirmClick)="_confirm()"
@@ -9255,7 +9313,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
9255
9313
  template: `
9256
9314
  <clx-modal
9257
9315
  size="sm"
9258
- [confirmButton]="{ text: 'Insertar', color: _primaryColor }"
9316
+ [confirmButton]="{ text: 'Insertar', color: _primaryColor() }"
9259
9317
  [cancelButton]="{ text: 'Cancelar', color: 'slate', variant: 'ghost' }"
9260
9318
  [showCancelButton]="true"
9261
9319
  (confirmClick)="_confirm()"
@@ -9502,14 +9560,14 @@ const HEADING_OPTIONS = [
9502
9560
  { value: 'h3', label: 'H3' },
9503
9561
  ];
9504
9562
  class ClxEditorComponent {
9505
- _cfg = inject(CLX_THEME_CONFIG);
9563
+ _themeSvc = inject(ClxThemeService);
9506
9564
  // ── Inputs ───────────────────────────────────────────────────────────────
9507
9565
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
9508
9566
  placeholder = input('Escribe aquí...', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
9509
9567
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
9510
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
9568
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
9511
9569
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
9512
- _editorSize = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_editorSize" }] : /* istanbul ignore next */ []));
9570
+ _editorSize = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_editorSize" }] : /* istanbul ignore next */ []));
9513
9571
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
9514
9572
  statusMessage = input('', ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
9515
9573
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
@@ -9576,7 +9634,7 @@ class ClxEditorComponent {
9576
9634
  _sizeCfg = computed(() => EDITOR_SIZE_MAP[this._editorSize()], ...(ngDevMode ? [{ debugName: "_sizeCfg" }] : /* istanbul ignore next */ []));
9577
9635
  _shellClass = computed(() => {
9578
9636
  const statusCfg = INPUT_STATUS_MAP[this.status()];
9579
- const r = resolveContainerRadius(this._cfg.borderRadius);
9637
+ const r = resolveContainerRadius(this._themeSvc.config().borderRadius);
9580
9638
  if (this._disabled()) {
9581
9639
  return `${r} border border-gray-200 bg-gray-50 overflow-hidden opacity-60 cursor-not-allowed`;
9582
9640
  }
@@ -10201,11 +10259,11 @@ const SWITCH_SIZE_MAP = {
10201
10259
  };
10202
10260
 
10203
10261
  class ClxSwitchComponent {
10204
- _cfg = inject(CLX_THEME_CONFIG);
10262
+ _themeSvc = inject(ClxThemeService);
10205
10263
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
10206
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
10264
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
10207
10265
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
10208
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
10266
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
10209
10267
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
10210
10268
  value = input(false, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
10211
10269
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
@@ -10369,7 +10427,7 @@ class ClxTextareaComponent {
10369
10427
  placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
10370
10428
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
10371
10429
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
10372
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
10430
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
10373
10431
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
10374
10432
  statusMessage = input('', ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
10375
10433
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
@@ -10383,7 +10441,7 @@ class ClxTextareaComponent {
10383
10441
  // ── Internal state ───────────────────────────────────────────────────────
10384
10442
  _taId = `clx-textarea-${++_clxTextareaIdCounter}`;
10385
10443
  _value = signal('', ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
10386
- _cfg = inject(CLX_THEME_CONFIG);
10444
+ _themeSvc = inject(ClxThemeService);
10387
10445
  _cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []));
10388
10446
  _cvaConnected = false;
10389
10447
  _disabled = computed(() => this._cvaDisabled() || this.disabled(), ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
@@ -10395,7 +10453,7 @@ class ClxTextareaComponent {
10395
10453
  _onChange = () => { };
10396
10454
  _onTouched = () => { };
10397
10455
  // ── Computed shortcuts ───────────────────────────────────────────────────
10398
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
10456
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
10399
10457
  _sizeCfg = computed(() => TEXTAREA_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_sizeCfg" }] : /* istanbul ignore next */ []));
10400
10458
  _statusCfg = computed(() => INPUT_STATUS_MAP[this.status()], ...(ngDevMode ? [{ debugName: "_statusCfg" }] : /* istanbul ignore next */ []));
10401
10459
  // ── Classes ──────────────────────────────────────────────────────────────
@@ -10409,13 +10467,13 @@ class ClxTextareaComponent {
10409
10467
  _wrapperClass = computed(() => {
10410
10468
  const statusCfg = this._statusCfg();
10411
10469
  if (this._disabled()) {
10412
- return `flex items-stretch ${resolveRadius(this._cfg.borderRadius)} border ${CLX_BORDER_DISABLED} overflow-hidden transition-all duration-200`;
10470
+ return `flex items-stretch ${resolveRadius(this._themeSvc.config().borderRadius)} border ${CLX_BORDER_DISABLED} overflow-hidden transition-all duration-200`;
10413
10471
  }
10414
10472
  const focusCls = this.status() !== 'default'
10415
10473
  ? statusCfg.ring.replace(/focus:/g, 'focus-within:')
10416
10474
  : resolveColor(this._color()).focusWithin;
10417
10475
  const border = statusCfg.border;
10418
- return `flex items-stretch ${resolveRadius(this._cfg.borderRadius)} border ${border} ${focusCls} overflow-hidden transition-all duration-200`;
10476
+ return `flex items-stretch ${resolveRadius(this._themeSvc.config().borderRadius)} border ${border} ${focusCls} overflow-hidden transition-all duration-200`;
10419
10477
  }, ...(ngDevMode ? [{ debugName: "_wrapperClass" }] : /* istanbul ignore next */ []));
10420
10478
  /** Prefix icon cell — flex column, full height of the wrapper */
10421
10479
  _prefixCellCls = computed(() => {
@@ -10607,16 +10665,16 @@ const UPLOAD_SIZE_MAP = {
10607
10665
  };
10608
10666
 
10609
10667
  class ClxUploadComponent {
10610
- _cfg = inject(CLX_THEME_CONFIG);
10668
+ _themeSvc = inject(ClxThemeService);
10611
10669
  // ── Inputs ─────────────────────────────────────────────────────────────────
10612
10670
  multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
10613
10671
  accept = input('', ...(ngDevMode ? [{ debugName: "accept" }] : /* istanbul ignore next */ []));
10614
10672
  /** Max file size in bytes. 0 = no limit. */
10615
10673
  maxFileSize = input(0, ...(ngDevMode ? [{ debugName: "maxFileSize" }] : /* istanbul ignore next */ []));
10616
10674
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
10617
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
10675
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
10618
10676
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
10619
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
10677
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
10620
10678
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
10621
10679
  // ── Outputs ────────────────────────────────────────────────────────────────
10622
10680
  onUploadError = output();
@@ -10649,7 +10707,7 @@ class ClxUploadComponent {
10649
10707
  _zoneClass = computed(() => {
10650
10708
  const base = [
10651
10709
  'flex flex-col items-center justify-center text-center',
10652
- `w-full ${resolveContainerRadius(this._cfg.borderRadius)} border-2 border-dashed transition-all duration-200`,
10710
+ `w-full ${resolveContainerRadius(this._themeSvc.config().borderRadius)} border-2 border-dashed transition-all duration-200`,
10653
10711
  this._sizeConfig().zone,
10654
10712
  ].join(' ');
10655
10713
  const t = resolveColor(this._color());
@@ -11027,10 +11085,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
11027
11085
  }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], isValid: [{ type: i0.Input, args: [{ isSignal: true, alias: "isValid", required: false }] }] } });
11028
11086
 
11029
11087
  class ClxWizardComponent {
11030
- _cfg = inject(CLX_THEME_CONFIG);
11088
+ _themeSvc = inject(ClxThemeService);
11031
11089
  // ── Inputs ─────────────────────────────────────────────────────────────────
11032
11090
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
11033
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
11091
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
11034
11092
  orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
11035
11093
  linear = input(true, ...(ngDevMode ? [{ debugName: "linear" }] : /* istanbul ignore next */ []));
11036
11094
  prevLabel = input('Anterior', ...(ngDevMode ? [{ debugName: "prevLabel" }] : /* istanbul ignore next */ []));
@@ -11624,7 +11682,7 @@ const NAV_CHILDREN_INNER = 'overflow-hidden';
11624
11682
  const NAV_CHILDREN_LIST = 'ml-6 py-1 space-y-0.5';
11625
11683
 
11626
11684
  class ClxMenuItemComponent {
11627
- _cfg = inject(CLX_THEME_CONFIG);
11685
+ _themeSvc = inject(ClxThemeService);
11628
11686
  label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
11629
11687
  icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
11630
11688
  active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
@@ -11635,7 +11693,7 @@ class ClxMenuItemComponent {
11635
11693
  routerLinkActiveOptions = input({ exact: false }, ...(ngDevMode ? [{ debugName: "routerLinkActiveOptions" }] : /* istanbul ignore next */ []));
11636
11694
  itemClick = output();
11637
11695
  _inheritedColor = signal(null, ...(ngDevMode ? [{ debugName: "_inheritedColor" }] : /* istanbul ignore next */ []));
11638
- _resolvedColor = computed(() => this._inheritedColor() ?? this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_resolvedColor" }] : /* istanbul ignore next */ []));
11696
+ _resolvedColor = computed(() => this._inheritedColor() ?? this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_resolvedColor" }] : /* istanbul ignore next */ []));
11639
11697
  inheritColor(c) { this._inheritedColor.set(c); }
11640
11698
  _geom = computed(() => {
11641
11699
  if (this.collapsed())
@@ -11731,11 +11789,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
11731
11789
  }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], nested: [{ type: i0.Input, args: [{ isSignal: true, alias: "nested", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], routerLinkActiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLinkActiveOptions", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }] } });
11732
11790
 
11733
11791
  class ClxMenuComponent {
11734
- _cfg = inject(CLX_THEME_CONFIG);
11792
+ _themeSvc = inject(ClxThemeService);
11735
11793
  label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
11736
11794
  icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
11737
11795
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
11738
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
11796
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
11739
11797
  collapsed = input(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
11740
11798
  active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
11741
11799
  routerLink = input('', ...(ngDevMode ? [{ debugName: "routerLink" }] : /* istanbul ignore next */ []));
@@ -11967,8 +12025,8 @@ class ClxProfileComponent {
11967
12025
  // ── Outputs ─────────────────────────────────────────────────────────────────
11968
12026
  menuAction = output();
11969
12027
  signOut = output();
11970
- _cfg = inject(CLX_THEME_CONFIG);
11971
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
12028
+ _themeSvc = inject(ClxThemeService);
12029
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
11972
12030
  // ── CDK Overlay ─────────────────────────────────────────────────────────────
11973
12031
  _sso = inject(ScrollStrategyOptions);
11974
12032
  _scrollStrategy = this._sso.reposition();
@@ -12244,7 +12302,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
12244
12302
  }], headerCell: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ClxHeaderCellDirective), { isSignal: true }] }], cell: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ClxCellDirective), { isSignal: true }] }] } });
12245
12303
 
12246
12304
  class ClxPageEmptyComponent {
12247
- _cfg = inject(CLX_THEME_CONFIG);
12305
+ _themeSvc = inject(ClxThemeService);
12248
12306
  icon = input('inbox', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
12249
12307
  title = input('Sin resultados', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
12250
12308
  description = input('', ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
@@ -12252,7 +12310,7 @@ class ClxPageEmptyComponent {
12252
12310
  ctaIcon = input('add', ...(ngDevMode ? [{ debugName: "ctaIcon" }] : /* istanbul ignore next */ []));
12253
12311
  ctaColor = input(undefined, ...(ngDevMode ? [{ debugName: "ctaColor" }] : /* istanbul ignore next */ []));
12254
12312
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
12255
- _ctaColor = computed(() => this.ctaColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_ctaColor" }] : /* istanbul ignore next */ []));
12313
+ _ctaColor = computed(() => this.ctaColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_ctaColor" }] : /* istanbul ignore next */ []));
12256
12314
  cta = output();
12257
12315
  _iconWrap() {
12258
12316
  const s = this.size();
@@ -12339,7 +12397,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
12339
12397
  }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], ctaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaLabel", required: false }] }], ctaIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaIcon", required: false }] }], ctaColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaColor", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], cta: [{ type: i0.Output, args: ["cta"] }] } });
12340
12398
 
12341
12399
  class ClxTableComponent {
12342
- _cfg = inject(CLX_THEME_CONFIG);
12400
+ _themeSvc = inject(ClxThemeService);
12343
12401
  // ── Inputs ─────────────────────────────────────────────────────────────────
12344
12402
  data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
12345
12403
  columns = input([], ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
@@ -12349,7 +12407,7 @@ class ClxTableComponent {
12349
12407
  searchable = input(true, ...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
12350
12408
  pagination = input(true, ...(ngDevMode ? [{ debugName: "pagination" }] : /* istanbul ignore next */ []));
12351
12409
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
12352
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
12410
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
12353
12411
  emptyIcon = input('table_chart', ...(ngDevMode ? [{ debugName: "emptyIcon" }] : /* istanbul ignore next */ []));
12354
12412
  emptyTitle = input('', ...(ngDevMode ? [{ debugName: "emptyTitle" }] : /* istanbul ignore next */ []));
12355
12413
  emptyDescription = input('', ...(ngDevMode ? [{ debugName: "emptyDescription" }] : /* istanbul ignore next */ []));
@@ -14218,59 +14276,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
14218
14276
  args: [ClxAnimateDirective, { descendants: true }]
14219
14277
  }] } });
14220
14278
 
14221
- const STORAGE_KEY = 'clx-theme-mode';
14222
- class ClxThemeService {
14223
- _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
14224
- _mode = signal(this._loadMode(), ...(ngDevMode ? [{ debugName: "_mode" }] : /* istanbul ignore next */ []));
14225
- _sysDark = signal(this._getSystemDark(), ...(ngDevMode ? [{ debugName: "_sysDark" }] : /* istanbul ignore next */ []));
14226
- mode = this._mode.asReadonly();
14227
- isDark = computed(() => {
14228
- const m = this._mode();
14229
- if (m === 'dark')
14230
- return true;
14231
- if (m === 'light')
14232
- return false;
14233
- return this._sysDark();
14234
- }, ...(ngDevMode ? [{ debugName: "isDark" }] : /* istanbul ignore next */ []));
14235
- constructor() {
14236
- effect(() => {
14237
- if (!this._isBrowser)
14238
- return;
14239
- document.documentElement.setAttribute('data-clx-theme', this.isDark() ? 'dark' : 'light');
14240
- });
14241
- if (this._isBrowser) {
14242
- const mq = window.matchMedia('(prefers-color-scheme: dark)');
14243
- mq.addEventListener('change', e => this._sysDark.set(e.matches));
14244
- }
14245
- }
14246
- setMode(mode) {
14247
- this._mode.set(mode);
14248
- if (this._isBrowser) {
14249
- localStorage.setItem(STORAGE_KEY, mode);
14250
- }
14251
- }
14252
- toggle() {
14253
- this.setMode(this.isDark() ? 'light' : 'dark');
14254
- }
14255
- _loadMode() {
14256
- if (!this._isBrowser)
14257
- return 'system';
14258
- const stored = localStorage.getItem(STORAGE_KEY);
14259
- return stored ?? 'system';
14260
- }
14261
- _getSystemDark() {
14262
- if (!this._isBrowser)
14263
- return false;
14264
- return window.matchMedia('(prefers-color-scheme: dark)').matches;
14265
- }
14266
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
14267
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxThemeService, providedIn: 'root' });
14268
- }
14269
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxThemeService, decorators: [{
14270
- type: Injectable,
14271
- args: [{ providedIn: 'root' }]
14272
- }], ctorParameters: () => [] });
14273
-
14274
14279
  class ClxAlertService {
14275
14280
  _overlay = inject(ClxNativeOverlayService);
14276
14281
  _injector = inject(Injector);
@@ -14492,11 +14497,11 @@ const PROGRESS_BAR_SIZE_MAP = {
14492
14497
  };
14493
14498
 
14494
14499
  class ClxProgressBarComponent {
14495
- _cfg = inject(CLX_THEME_CONFIG);
14500
+ _themeSvc = inject(ClxThemeService);
14496
14501
  value = input(0, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
14497
14502
  max = input(100, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
14498
14503
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
14499
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
14504
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
14500
14505
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
14501
14506
  variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
14502
14507
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
@@ -14508,7 +14513,7 @@ class ClxProgressBarComponent {
14508
14513
  return 0;
14509
14514
  return Math.min(100, Math.max(0, (this.value() / m) * 100));
14510
14515
  }, ...(ngDevMode ? [{ debugName: "_pct" }] : /* istanbul ignore next */ []));
14511
- _pbSize = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_pbSize" }] : /* istanbul ignore next */ []));
14516
+ _pbSize = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_pbSize" }] : /* istanbul ignore next */ []));
14512
14517
  _trackH = computed(() => PROGRESS_BAR_SIZE_MAP[this._pbSize()], ...(ngDevMode ? [{ debugName: "_trackH" }] : /* istanbul ignore next */ []));
14513
14518
  _labelCls = computed(() => {
14514
14519
  const size = this._pbSize();