codexly-ui 0.0.93 → 0.0.95

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';
@@ -140,6 +140,15 @@ const CLX_COLOR_HEX = {
140
140
  neutral: '#737373', stone: '#78716c', white: '#ffffff',
141
141
  slate100: '#f1f5f9', slate200: '#e2e8f0', slate300: '#cbd5e1', slate400: '#94a3b8',
142
142
  };
143
+ // ── Hex values at shade-100 (for soft backgrounds) ────────────────────────────
144
+ const CLX_COLOR_HEX_100 = {
145
+ red: '#fee2e2', orange: '#ffedd5', amber: '#fef3c7', yellow: '#fef9c3',
146
+ lime: '#dcfce7', green: '#dcfce7', emerald: '#d1fae5', teal: '#ccfbf1',
147
+ cyan: '#cffafe', sky: '#e0f2fe', blue: '#dbeafe', indigo: '#e0e7ff',
148
+ violet: '#ede9fe', purple: '#f3e8ff', fuchsia: '#fae8ff', pink: '#fce7f3',
149
+ rose: '#ffe4e6', slate: '#f1f5f9', gray: '#f3f4f6', zinc: '#f4f4f5',
150
+ neutral: '#f5f5f5', stone: '#f5f5f4', white: '#ffffff',
151
+ };
143
152
 
144
153
  const BADGE_SIZE_MAP = {
145
154
  xs: 'text-[10px] px-1.5 py-0.5',
@@ -203,16 +212,85 @@ function provideCodexlyTheme(config) {
203
212
  };
204
213
  }
205
214
 
215
+ const STORAGE_KEY = 'clx-theme-mode';
216
+ class ClxThemeService {
217
+ _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
218
+ _initial = inject(CLX_THEME_CONFIG);
219
+ _mode = signal(this._loadMode(), ...(ngDevMode ? [{ debugName: "_mode" }] : /* istanbul ignore next */ []));
220
+ _sysDark = signal(this._getSystemDark(), ...(ngDevMode ? [{ debugName: "_sysDark" }] : /* istanbul ignore next */ []));
221
+ _config = signal({ ...CLX_THEME_DEFAULTS, ...this._initial }, ...(ngDevMode ? [{ debugName: "_config" }] : /* istanbul ignore next */ []));
222
+ mode = this._mode.asReadonly();
223
+ config = this._config.asReadonly();
224
+ isDark = computed(() => {
225
+ const m = this._mode();
226
+ if (m === 'dark')
227
+ return true;
228
+ if (m === 'light')
229
+ return false;
230
+ return this._sysDark();
231
+ }, ...(ngDevMode ? [{ debugName: "isDark" }] : /* istanbul ignore next */ []));
232
+ constructor() {
233
+ effect(() => {
234
+ if (!this._isBrowser)
235
+ return;
236
+ document.documentElement.setAttribute('data-clx-theme', this.isDark() ? 'dark' : 'light');
237
+ });
238
+ effect(() => {
239
+ if (!this._isBrowser)
240
+ return;
241
+ const primaryColor = this._config().primaryColor;
242
+ if (!primaryColor)
243
+ return;
244
+ const { color } = parseColorInput(primaryColor);
245
+ const hex500 = CLX_COLOR_HEX[color] ?? CLX_COLOR_HEX.indigo;
246
+ const hex100 = CLX_COLOR_HEX_100[color] ?? CLX_COLOR_HEX_100.indigo;
247
+ document.documentElement.style.setProperty('--clx-primary', hex500);
248
+ document.documentElement.style.setProperty('--clx-primary-light', hex100);
249
+ });
250
+ if (this._isBrowser) {
251
+ const mq = window.matchMedia('(prefers-color-scheme: dark)');
252
+ mq.addEventListener('change', e => this._sysDark.set(e.matches));
253
+ }
254
+ }
255
+ setMode(mode) {
256
+ this._mode.set(mode);
257
+ if (this._isBrowser)
258
+ localStorage.setItem(STORAGE_KEY, mode);
259
+ }
260
+ setConfig(patch) {
261
+ this._config.update(c => ({ ...c, ...patch }));
262
+ }
263
+ toggle() {
264
+ this.setMode(this.isDark() ? 'light' : 'dark');
265
+ }
266
+ _loadMode() {
267
+ if (!this._isBrowser)
268
+ return 'system';
269
+ return localStorage.getItem(STORAGE_KEY) ?? 'system';
270
+ }
271
+ _getSystemDark() {
272
+ if (!this._isBrowser)
273
+ return false;
274
+ return window.matchMedia('(prefers-color-scheme: dark)').matches;
275
+ }
276
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
277
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxThemeService, providedIn: 'root' });
278
+ }
279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxThemeService, decorators: [{
280
+ type: Injectable,
281
+ args: [{ providedIn: 'root' }]
282
+ }], ctorParameters: () => [] });
283
+
206
284
  class ClxBadgeComponent {
207
- _cfg = inject(CLX_THEME_CONFIG);
285
+ _themeSvc = inject(ClxThemeService);
208
286
  variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
209
287
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
210
288
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
211
289
  shape = input(undefined, ...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
212
290
  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 */ []));
291
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
292
+ _size = computed(() => this.size() ?? this._themeSvc.config().defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
293
+ _shape = computed(() => this.shape() ?? this._themeSvc.config().defaultShape, ...(ngDevMode ? [{ debugName: "_shape" }] : /* istanbul ignore next */ []));
216
294
  _hostClass = computed(() => {
217
295
  const t = resolveColor(this._color());
218
296
  const variant = this.variant();
@@ -220,7 +298,7 @@ class ClxBadgeComponent {
220
298
  const isCircle = sh === 'circle';
221
299
  const sizeClass = isCircle ? BADGE_CIRCLE_SIZE_MAP[this._size()] : BADGE_SIZE_MAP[this._size()];
222
300
  const shapeClass = sh === 'rounded'
223
- ? resolveRadius(this._cfg.borderRadius)
301
+ ? resolveRadius(this._themeSvc.config().borderRadius)
224
302
  : BADGE_SHAPE_FIXED[sh];
225
303
  const posClass = this.positioned()
226
304
  ? 'absolute top-0 right-0 translate-x-1/2 -translate-y-1/2'
@@ -658,11 +736,11 @@ const SPINNER_PULSE_SIZE_MAP = {
658
736
  };
659
737
 
660
738
  class ClxSpinnerComponent {
661
- _cfg = inject(CLX_THEME_CONFIG);
739
+ _themeSvc = inject(ClxThemeService);
662
740
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
663
741
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
664
742
  variant = input('spinner', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
665
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
743
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
666
744
  _spinnerClass = computed(() => {
667
745
  const size = SPINNER_SIZE_MAP[this.size()];
668
746
  if (this._color() === 'inherit')
@@ -740,14 +818,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
740
818
  }], 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
819
 
742
820
  class ClxButtonComponent {
743
- _cfg = inject(CLX_THEME_CONFIG);
821
+ _themeSvc = inject(ClxThemeService);
744
822
  variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
745
823
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
746
824
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
747
825
  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 */ []));
826
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
827
+ _size = computed(() => this.size() ?? this._themeSvc.config().defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
828
+ _shape = computed(() => this.shape() ?? this._themeSvc.config().defaultShape, ...(ngDevMode ? [{ debugName: "_shape" }] : /* istanbul ignore next */ []));
751
829
  loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
752
830
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
753
831
  block = input(false, ...(ngDevMode ? [{ debugName: "block" }] : /* istanbul ignore next */ []));
@@ -818,7 +896,7 @@ class ClxButtonComponent {
818
896
  : BUTTON_SIZE_MAP[this._size()];
819
897
  const s = this._shape();
820
898
  const shapeClass = s === 'rounded'
821
- ? resolveRadius(this._cfg.borderRadius)
899
+ ? resolveRadius(this._themeSvc.config().borderRadius)
822
900
  : BUTTON_SHAPE_FIXED[s];
823
901
  const overflowClass = (this.badge() !== undefined && this.badge() !== null) ? 'overflow-visible' : 'overflow-hidden';
824
902
  const base = BUTTON_BASE_CLASS.replace('overflow-hidden', overflowClass);
@@ -1140,12 +1218,12 @@ const TOOLTIP_SIZE_MAP = {
1140
1218
  };
1141
1219
 
1142
1220
  class ClxTooltipComponent {
1143
- _cfg = inject(CLX_THEME_CONFIG);
1221
+ _themeSvc = inject(ClxThemeService);
1144
1222
  text = input.required(...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
1145
1223
  position = input('top', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
1146
1224
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
1147
1225
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1148
- _color = computed(() => this.color() ?? this._cfg.neutralColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
1226
+ _color = computed(() => this.color() ?? this._themeSvc.config().neutralColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
1149
1227
  _hostClass = computed(() => {
1150
1228
  const t = resolveColor(this._color());
1151
1229
  return `${t.text} rounded-lg shadow-xl ${t.bg} ${TOOLTIP_SIZE_MAP[this.size()]}`;
@@ -1737,11 +1815,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
1737
1815
  }], 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
1816
 
1739
1817
  class ClxRatingComponent {
1740
- _cfg = inject(CLX_THEME_CONFIG);
1818
+ _themeSvc = inject(ClxThemeService);
1741
1819
  value = input(0, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
1742
1820
  max = input(5, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
1743
1821
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
1744
- _color = computed(() => this.color() ?? this._cfg.warningColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
1822
+ _color = computed(() => this.color() ?? this._themeSvc.config().warningColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
1745
1823
  _hexColor = computed(() => {
1746
1824
  const { color } = parseColorInput(this._color());
1747
1825
  return CLX_COLOR_HEX[color] ?? '#f59e0b';
@@ -1808,9 +1886,9 @@ const CAROUSEL_ASPECT_RATIO_MAP = {
1808
1886
  };
1809
1887
 
1810
1888
  class ClxCarouselComponent {
1811
- _cfg = inject(CLX_THEME_CONFIG);
1889
+ _themeSvc = inject(ClxThemeService);
1812
1890
  clxColor = input(undefined, ...(ngDevMode ? [{ debugName: "clxColor" }] : /* istanbul ignore next */ []));
1813
- _clxColor = computed(() => this.clxColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_clxColor" }] : /* istanbul ignore next */ []));
1891
+ _clxColor = computed(() => this.clxColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_clxColor" }] : /* istanbul ignore next */ []));
1814
1892
  autoPlay = input(false, ...(ngDevMode ? [{ debugName: "autoPlay" }] : /* istanbul ignore next */ []));
1815
1893
  interval = input(3000, ...(ngDevMode ? [{ debugName: "interval" }] : /* istanbul ignore next */ []));
1816
1894
  loop = input(true, ...(ngDevMode ? [{ debugName: "loop" }] : /* istanbul ignore next */ []));
@@ -2062,11 +2140,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
2062
2140
  }], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { clxTabPanel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clxTabPanel", required: true }] }] } });
2063
2141
 
2064
2142
  class ClxTabsComponent {
2065
- _cfg = inject(CLX_THEME_CONFIG);
2143
+ _themeSvc = inject(ClxThemeService);
2066
2144
  tabs = input.required(...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
2067
2145
  clxColor = input(undefined, ...(ngDevMode ? [{ debugName: "clxColor" }] : /* istanbul ignore next */ []));
2068
2146
  activeTab = model('', ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
2069
- _clxColor = computed(() => this.clxColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_clxColor" }] : /* istanbul ignore next */ []));
2147
+ _clxColor = computed(() => this.clxColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_clxColor" }] : /* istanbul ignore next */ []));
2070
2148
  _panels = contentChildren(ClxTabDirective, ...(ngDevMode ? [{ debugName: "_panels" }] : /* istanbul ignore next */ []));
2071
2149
  _underlineClass = computed(() => resolveColor(this._clxColor()).bg, ...(ngDevMode ? [{ debugName: "_underlineClass" }] : /* istanbul ignore next */ []));
2072
2150
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -2215,7 +2293,7 @@ class ClxNumberComponent {
2215
2293
  // ── Inputs ───────────────────────────────────────────────────────────────
2216
2294
  variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2217
2295
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
2218
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
2296
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
2219
2297
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
2220
2298
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
2221
2299
  placeholder = input('0', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
@@ -2244,8 +2322,8 @@ class ClxNumberComponent {
2244
2322
  _isAtMin = computed(() => this.min() !== null && this._value() <= this.min(), ...(ngDevMode ? [{ debugName: "_isAtMin" }] : /* istanbul ignore next */ []));
2245
2323
  _isAtMax = computed(() => this.max() !== null && this._value() >= this.max(), ...(ngDevMode ? [{ debugName: "_isAtMax" }] : /* istanbul ignore next */ []));
2246
2324
  // ── Computed classes ─────────────────────────────────────────────────────
2247
- _cfg = inject(CLX_THEME_CONFIG);
2248
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
2325
+ _themeSvc = inject(ClxThemeService);
2326
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
2249
2327
  _sizeConfig = computed(() => NUMBER_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_sizeConfig" }] : /* istanbul ignore next */ []));
2250
2328
  _labelClass = computed(() => `${this._sizeConfig().label} ${CLX_TEXT_LABEL} leading-none`, ...(ngDevMode ? [{ debugName: "_labelClass" }] : /* istanbul ignore next */ []));
2251
2329
  _hintClass = computed(() => `${this._sizeConfig().hint} ${CLX_TEXT_HINT}`, ...(ngDevMode ? [{ debugName: "_hintClass" }] : /* istanbul ignore next */ []));
@@ -2254,7 +2332,7 @@ class ClxNumberComponent {
2254
2332
  const focus = this._disabled() ? '' : resolveColor(this._color()).focusWithin;
2255
2333
  const border = this._disabled() ? `${CLX_BORDER_DISABLED} ${CLX_BG_DISABLED}` : CLX_BORDER_DEFAULT;
2256
2334
  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`;
2335
+ 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
2336
  }, ...(ngDevMode ? [{ debugName: "_containerClass" }] : /* istanbul ignore next */ []));
2259
2337
  /** Colored prefix icon cell — matches the input accent color */
2260
2338
  _prefixCellCls = computed(() => {
@@ -2574,9 +2652,9 @@ const LIST_SIZE_MAP = {
2574
2652
  };
2575
2653
 
2576
2654
  class ClxListComponent {
2577
- _cfg = inject(CLX_THEME_CONFIG);
2655
+ _themeSvc = inject(ClxThemeService);
2578
2656
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
2579
- resolvedColor = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
2657
+ resolvedColor = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
2580
2658
  variant = input('flat', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2581
2659
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
2582
2660
  numbered = input(false, ...(ngDevMode ? [{ debugName: "numbered" }] : /* istanbul ignore next */ []));
@@ -2615,14 +2693,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
2615
2693
 
2616
2694
  class ClxListItemComponent {
2617
2695
  _ctx = inject(CLX_LIST_CONTEXT);
2618
- _cfg = inject(CLX_THEME_CONFIG);
2696
+ _themeSvc = inject(ClxThemeService);
2619
2697
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
2620
2698
  sublabel = input('', ...(ngDevMode ? [{ debugName: "sublabel" }] : /* istanbul ignore next */ []));
2621
2699
  icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
2622
2700
  meta = input('', ...(ngDevMode ? [{ debugName: "meta" }] : /* istanbul ignore next */ []));
2623
2701
  metaColor = input(undefined, ...(ngDevMode ? [{ debugName: "metaColor" }] : /* istanbul ignore next */ []));
2624
2702
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
2625
- _metaColor = computed(() => this.metaColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_metaColor" }] : /* istanbul ignore next */ []));
2703
+ _metaColor = computed(() => this.metaColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_metaColor" }] : /* istanbul ignore next */ []));
2626
2704
  _index = this._ctx.registerItem();
2627
2705
  _iconClass = computed(() => resolveColor(this._ctx.resolvedColor()).textSubtle, ...(ngDevMode ? [{ debugName: "_iconClass" }] : /* istanbul ignore next */ []));
2628
2706
  _hostClass = computed(() => {
@@ -2825,10 +2903,10 @@ const SIZE_MAP = {
2825
2903
  lg: { row: 'py-2 px-2', text: 'text-sm', icon: 'md', indent: 'pl-7' },
2826
2904
  };
2827
2905
  class ClxTreeComponent {
2828
- _cfg = inject(CLX_THEME_CONFIG);
2906
+ _themeSvc = inject(ClxThemeService);
2829
2907
  nodes = input.required(...(ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []));
2830
2908
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
2831
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
2909
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
2832
2910
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
2833
2911
  variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
2834
2912
  selectable = input(true, ...(ngDevMode ? [{ debugName: "selectable" }] : /* istanbul ignore next */ []));
@@ -2838,7 +2916,7 @@ class ClxTreeComponent {
2838
2916
  expandedIds = model([], ...(ngDevMode ? [{ debugName: "expandedIds" }] : /* istanbul ignore next */ []));
2839
2917
  selectChange = output();
2840
2918
  expandChange = output();
2841
- _treeSize = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_treeSize" }] : /* istanbul ignore next */ []));
2919
+ _treeSize = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_treeSize" }] : /* istanbul ignore next */ []));
2842
2920
  _s = computed(() => SIZE_MAP[this._treeSize()], ...(ngDevMode ? [{ debugName: "_s" }] : /* istanbul ignore next */ []));
2843
2921
  _indentPx = computed(() => this._treeSize() === 'sm' ? 16 : this._treeSize() === 'lg' ? 24 : 20, ...(ngDevMode ? [{ debugName: "_indentPx" }] : /* istanbul ignore next */ []));
2844
2922
  _rootClass = computed(() => `select-none ${this.variant() === 'lines' ? 'divide-y divide-clx-border-soft' : ''}`, ...(ngDevMode ? [{ debugName: "_rootClass" }] : /* istanbul ignore next */ []));
@@ -3043,12 +3121,12 @@ const CHECKBOX_SIZE_MAP = {
3043
3121
  };
3044
3122
 
3045
3123
  class ClxCheckboxComponent {
3046
- _cfg = inject(CLX_THEME_CONFIG);
3124
+ _themeSvc = inject(ClxThemeService);
3047
3125
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
3048
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3126
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3049
3127
  variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3050
3128
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
3051
- _size = computed(() => this.size() ?? this._cfg.defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3129
+ _size = computed(() => this.size() ?? this._themeSvc.config().defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3052
3130
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
3053
3131
  /** Initial value when used without FormControl */
3054
3132
  value = input(false, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
@@ -3192,15 +3270,15 @@ const SLIDER_SIZE_MAP = {
3192
3270
  };
3193
3271
 
3194
3272
  class ClxSliderComponent {
3195
- _cfg = inject(CLX_THEME_CONFIG);
3273
+ _themeSvc = inject(ClxThemeService);
3196
3274
  // ── Inputs ──────────────────────────────────────────────────────────────────
3197
3275
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
3198
3276
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
3199
3277
  errorMessage = input('Valor fuera de rango', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
3200
3278
  activeColor = input(undefined, ...(ngDevMode ? [{ debugName: "activeColor" }] : /* istanbul ignore next */ []));
3201
- _activeColor = computed(() => this.activeColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
3279
+ _activeColor = computed(() => this.activeColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
3202
3280
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
3203
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3281
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3204
3282
  min = input(0, ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
3205
3283
  max = input(100, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
3206
3284
  step = input(1, ...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
@@ -3497,9 +3575,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
3497
3575
 
3498
3576
  const CLX_RADIO_GROUP = new InjectionToken('CLX_RADIO_GROUP');
3499
3577
  class ClxRadioGroupComponent {
3500
- _cfg = inject(CLX_THEME_CONFIG);
3578
+ _themeSvc = inject(ClxThemeService);
3501
3579
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
3502
- resolvedColor = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
3580
+ resolvedColor = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
3503
3581
  variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3504
3582
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
3505
3583
  direction = input('horizontal', ...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
@@ -3585,12 +3663,12 @@ class ClxRadioComponent {
3585
3663
  variant = input(null, ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3586
3664
  size = input(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
3587
3665
  _group = inject(CLX_RADIO_GROUP, { optional: true });
3588
- _cfg = inject(CLX_THEME_CONFIG);
3666
+ _themeSvc = inject(ClxThemeService);
3589
3667
  _checked = computed(() => this._group ? this._group._value() === this.value() : false, ...(ngDevMode ? [{ debugName: "_checked" }] : /* istanbul ignore next */ []));
3590
3668
  _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 */ []));
3669
+ _color = computed(() => this.color() ?? this._group?.resolvedColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3592
3670
  _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 */ []));
3671
+ _size = computed(() => this.size() ?? this._group?.size() ?? this._themeSvc.config().defaultSize, ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3594
3672
  _sizeConfig = computed(() => RADIO_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_sizeConfig" }] : /* istanbul ignore next */ []));
3595
3673
  _ringClass = computed(() => {
3596
3674
  const base = `${this._sizeConfig().ring} rounded-full border-2 flex items-center justify-center transition-all duration-200`;
@@ -3695,14 +3773,14 @@ const TAG_SIZE_MAP = {
3695
3773
  const TAG_SHAPE_PILL = 'rounded-full';
3696
3774
 
3697
3775
  class ClxTagComponent {
3698
- _cfg = inject(CLX_THEME_CONFIG);
3776
+ _themeSvc = inject(ClxThemeService);
3699
3777
  variant = input('soft', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
3700
3778
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
3701
3779
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
3702
- _tagSize = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_tagSize" }] : /* istanbul ignore next */ []));
3780
+ _tagSize = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_tagSize" }] : /* istanbul ignore next */ []));
3703
3781
  shape = input('rounded', ...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
3704
3782
  onRemove = output();
3705
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3783
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3706
3784
  _sizeConfig = computed(() => TAG_SIZE_MAP[this._tagSize()], ...(ngDevMode ? [{ debugName: "_sizeConfig" }] : /* istanbul ignore next */ []));
3707
3785
  _colorClass = computed(() => {
3708
3786
  const t = resolveColor(this._color());
@@ -3715,7 +3793,7 @@ class ClxTagComponent {
3715
3793
  }, ...(ngDevMode ? [{ debugName: "_colorClass" }] : /* istanbul ignore next */ []));
3716
3794
  _hostClass = computed(() => {
3717
3795
  const s = this._sizeConfig();
3718
- const shapeClass = this.shape() === 'pill' ? TAG_SHAPE_PILL : resolveRadius(this._cfg.borderRadius);
3796
+ const shapeClass = this.shape() === 'pill' ? TAG_SHAPE_PILL : resolveRadius(this._themeSvc.config().borderRadius);
3719
3797
  return `inline-flex items-center font-medium leading-none ${s.gap} ${s.text} ${s.pad} ${shapeClass} ${this._colorClass()}`;
3720
3798
  }, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
3721
3799
  _closeBtnColor = computed(() => this.variant() === 'solid' ? 'white' : this._color(), ...(ngDevMode ? [{ debugName: "_closeBtnColor" }] : /* istanbul ignore next */ []));
@@ -3825,13 +3903,13 @@ const INPUT_SIZE_MAP = {
3825
3903
 
3826
3904
  let _clxInputIdCounter = 0;
3827
3905
  class ClxInputComponent {
3828
- _cfg = inject(CLX_THEME_CONFIG);
3906
+ _themeSvc = inject(ClxThemeService);
3829
3907
  // ── Inputs ───────────────────────────────────────────────────────────────
3830
3908
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
3831
3909
  placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
3832
3910
  type = input('text', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
3833
3911
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
3834
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3912
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
3835
3913
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
3836
3914
  prefixIcon = input('', ...(ngDevMode ? [{ debugName: "prefixIcon" }] : /* istanbul ignore next */ []));
3837
3915
  suffixIcon = input('', ...(ngDevMode ? [{ debugName: "suffixIcon" }] : /* istanbul ignore next */ []));
@@ -3840,7 +3918,7 @@ class ClxInputComponent {
3840
3918
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
3841
3919
  statusMessage = input('', ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
3842
3920
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
3843
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3921
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
3844
3922
  /** Initial value for standalone use (without FormControl) */
3845
3923
  value = input('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
3846
3924
  /** Disabled state for standalone use (without FormControl) */
@@ -3882,7 +3960,7 @@ class ClxInputComponent {
3882
3960
  : this.status() !== 'default'
3883
3961
  ? this._statusCfg().ring.replace(/focus:/g, 'focus-within:')
3884
3962
  : resolveColor(this._color()).focusWithin;
3885
- return `relative flex items-stretch ${resolveRadius(this._cfg.borderRadius)} border ${border} ${focusCls} overflow-hidden transition-all duration-200`;
3963
+ return `relative flex items-stretch ${resolveRadius(this._themeSvc.config().borderRadius)} border ${border} ${focusCls} overflow-hidden transition-all duration-200`;
3886
3964
  }, ...(ngDevMode ? [{ debugName: "_wrapperClass" }] : /* istanbul ignore next */ []));
3887
3965
  _inputClass = computed(() => {
3888
3966
  const size = this._sizeConfig();
@@ -3900,7 +3978,7 @@ class ClxInputComponent {
3900
3978
  const hasSuffix = this.type() === 'password' || this.status() !== 'default' || !!this.suffixIcon();
3901
3979
  const pl = size.padDefaultL;
3902
3980
  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`;
3981
+ const base = `w-full ${resolveRadius(this._themeSvc.config().borderRadius)} border ${size.input} ${pl} ${pr} outline-none transition-all duration-200`;
3904
3982
  if (this._disabled()) {
3905
3983
  return `${base} ${CLX_BORDER_DISABLED} ${CLX_BG_DISABLED} cursor-not-allowed ${CLX_TEXT_DISABLED} ${CLX_PLACEHOLDER}`;
3906
3984
  }
@@ -4145,7 +4223,7 @@ class ClxSelectComponent {
4145
4223
  searchPlaceholder = input('Buscar...', ...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
4146
4224
  activeColor = input(undefined, ...(ngDevMode ? [{ debugName: "activeColor" }] : /* istanbul ignore next */ []));
4147
4225
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
4148
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
4226
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
4149
4227
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
4150
4228
  errorMessage = input('Este campo es requerido', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
4151
4229
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
@@ -4171,9 +4249,9 @@ class ClxSelectComponent {
4171
4249
  _selectedVals = signal([], ...(ngDevMode ? [{ debugName: "_selectedVals" }] : /* istanbul ignore next */ []));
4172
4250
  _cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []));
4173
4251
  // ── DI ─────────────────────────────────────────────────────────────────────
4174
- _cfg = inject(CLX_THEME_CONFIG);
4252
+ _themeSvc = inject(ClxThemeService);
4175
4253
  _ngControl = inject(NgControl, { optional: true, self: true });
4176
- _activeColor = computed(() => this.activeColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
4254
+ _activeColor = computed(() => this.activeColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
4177
4255
  _el = inject((ElementRef));
4178
4256
  _sso = inject(ScrollStrategyOptions);
4179
4257
  _scrollStrategy = this._sso.reposition();
@@ -4233,7 +4311,7 @@ class ClxSelectComponent {
4233
4311
  _hintClass = computed(() => `${this._sizeConfig().hint} ${CLX_TEXT_HINT}`, ...(ngDevMode ? [{ debugName: "_hintClass" }] : /* istanbul ignore next */ []));
4234
4312
  _triggerClass = computed(() => {
4235
4313
  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`;
4314
+ const base = `relative flex items-center ${resolveRadius(this._themeSvc.config().borderRadius)} border transition-all duration-200 outline-none w-full overflow-hidden`;
4237
4315
  if (this._disabled()) {
4238
4316
  return `${base} ${s.minH} ${CLX_BORDER_DISABLED} ${CLX_BG_DISABLED} cursor-not-allowed opacity-60`;
4239
4317
  }
@@ -4646,11 +4724,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
4646
4724
  }] } });
4647
4725
 
4648
4726
  class ClxFilterPanelComponent {
4649
- _cfg = inject(CLX_THEME_CONFIG);
4727
+ _themeSvc = inject(ClxThemeService);
4650
4728
  fields = input.required(...(ngDevMode ? [{ debugName: "fields" }] : /* istanbul ignore next */ []));
4651
4729
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
4652
4730
  showApply = input(false, ...(ngDevMode ? [{ debugName: "showApply" }] : /* istanbul ignore next */ []));
4653
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
4731
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
4654
4732
  values = model({}, ...(ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []));
4655
4733
  filterChange = output();
4656
4734
  applyChange = output();
@@ -5329,12 +5407,12 @@ class ClxDrawerComponent {
5329
5407
  cancelClick = output();
5330
5408
  _modalRef = inject(CLX_MODAL_REF, { optional: true });
5331
5409
  _sizeToken = inject(CLX_DRAWER_SIZE, { optional: true });
5332
- _cfg = inject(CLX_THEME_CONFIG);
5410
+ _themeSvc = inject(ClxThemeService);
5333
5411
  _resolvedSize = computed(() => this.size() ?? this._sizeToken ?? 'md', ...(ngDevMode ? [{ debugName: "_resolvedSize" }] : /* istanbul ignore next */ []));
5334
5412
  _hostClass = computed(() => `${DRAWER_CONTAINER_CLASS} ${DRAWER_SIZE_MAP[this._resolvedSize()]}`, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
5335
5413
  _hasBuiltInButtons = computed(() => !!this.confirmButton(), ...(ngDevMode ? [{ debugName: "_hasBuiltInButtons" }] : /* istanbul ignore next */ []));
5336
5414
  _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 */ []));
5415
+ _confirmColor = computed(() => this.confirmButton()?.color ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_confirmColor" }] : /* istanbul ignore next */ []));
5338
5416
  _confirmVariant = computed(() => this.confirmButton()?.variant ?? 'solid', ...(ngDevMode ? [{ debugName: "_confirmVariant" }] : /* istanbul ignore next */ []));
5339
5417
  _cancelText = computed(() => this.cancelButton()?.text ?? 'Cancelar', ...(ngDevMode ? [{ debugName: "_cancelText" }] : /* istanbul ignore next */ []));
5340
5418
  _cancelColor = computed(() => this.cancelButton()?.color ?? 'slate', ...(ngDevMode ? [{ debugName: "_cancelColor" }] : /* istanbul ignore next */ []));
@@ -5474,12 +5552,12 @@ class ClxModalComponent {
5474
5552
  cancelClick = output();
5475
5553
  _modalRef = inject(CLX_MODAL_REF, { optional: true });
5476
5554
  _sizeToken = inject(CLX_MODAL_SIZE, { optional: true });
5477
- _cfg = inject(CLX_THEME_CONFIG);
5555
+ _themeSvc = inject(ClxThemeService);
5478
5556
  _resolvedSize = computed(() => this.size() ?? this._sizeToken ?? 'md', ...(ngDevMode ? [{ debugName: "_resolvedSize" }] : /* istanbul ignore next */ []));
5479
5557
  _hostClass = computed(() => `${MODAL_CONTAINER_CLASS} ${MODAL_SIZE_MAP[this._resolvedSize()]} max-h-[90vh]`, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
5480
5558
  _hasBuiltInButtons = computed(() => !!this.confirmButton(), ...(ngDevMode ? [{ debugName: "_hasBuiltInButtons" }] : /* istanbul ignore next */ []));
5481
5559
  _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 */ []));
5560
+ _confirmColor = computed(() => this.confirmButton()?.color ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_confirmColor" }] : /* istanbul ignore next */ []));
5483
5561
  _confirmVariant = computed(() => this.confirmButton()?.variant ?? 'solid', ...(ngDevMode ? [{ debugName: "_confirmVariant" }] : /* istanbul ignore next */ []));
5484
5562
  _cancelText = computed(() => this.cancelButton()?.text ?? 'Cancelar', ...(ngDevMode ? [{ debugName: "_cancelText" }] : /* istanbul ignore next */ []));
5485
5563
  _cancelColor = computed(() => this.cancelButton()?.color ?? 'slate', ...(ngDevMode ? [{ debugName: "_cancelColor" }] : /* istanbul ignore next */ []));
@@ -5645,11 +5723,11 @@ const PAGINATION_ELLIPSIS_CLASS = {
5645
5723
  const PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS = [5, 10, 25, 50, 100];
5646
5724
 
5647
5725
  class ClxPaginationComponent {
5648
- _themeCfg = inject(CLX_THEME_CONFIG);
5726
+ _themeSvc = inject(ClxThemeService);
5649
5727
  // ── Inputs ─────────────────────────────────────────────────────────────────
5650
5728
  totalItems = input.required(...(ngDevMode ? [{ debugName: "totalItems" }] : /* istanbul ignore next */ []));
5651
5729
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
5652
- _color = computed(() => this.color() ?? this._themeCfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
5730
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
5653
5731
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
5654
5732
  showPageSize = input(true, ...(ngDevMode ? [{ debugName: "showPageSize" }] : /* istanbul ignore next */ []));
5655
5733
  /** Opciones manuales. Si está vacío (default) se calculan automáticamente desde totalItems. */
@@ -5683,7 +5761,7 @@ class ClxPaginationComponent {
5683
5761
  });
5684
5762
  }
5685
5763
  // ── Computed: config por tamaño ────────────────────────────────────────────
5686
- _size = computed(() => (this.size() ?? this._themeCfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
5764
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
5687
5765
  _cfg = computed(() => PAGINATION_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_cfg" }] : /* istanbul ignore next */ []));
5688
5766
  // ── Computed: total de páginas ─────────────────────────────────────────────
5689
5767
  totalPages = computed(() => {
@@ -6448,13 +6526,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
6448
6526
  }] });
6449
6527
 
6450
6528
  class ClxCardComponent {
6451
- _cfg = inject(CLX_THEME_CONFIG);
6529
+ _themeSvc = inject(ClxThemeService);
6452
6530
  variant = input('elevated', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
6453
6531
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
6454
6532
  padding = input('md', ...(ngDevMode ? [{ debugName: "padding" }] : /* istanbul ignore next */ []));
6455
6533
  shadow = input(undefined, ...(ngDevMode ? [{ debugName: "shadow" }] : /* istanbul ignore next */ []));
6456
6534
  hover = input(false, ...(ngDevMode ? [{ debugName: "hover" }] : /* istanbul ignore next */ []));
6457
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6535
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6458
6536
  _headerSlot = contentChild(ClxCardHeaderDirective, ...(ngDevMode ? [{ debugName: "_headerSlot" }] : /* istanbul ignore next */ []));
6459
6537
  _bodySlot = contentChild(ClxCardBodyDirective, ...(ngDevMode ? [{ debugName: "_bodySlot" }] : /* istanbul ignore next */ []));
6460
6538
  _footerSlot = contentChild(ClxCardFooterDirective, ...(ngDevMode ? [{ debugName: "_footerSlot" }] : /* istanbul ignore next */ []));
@@ -6483,7 +6561,7 @@ class ClxCardComponent {
6483
6561
  const shadowClass = shadowInput !== undefined ? CARD_SHADOW_MAP[shadowInput] : '';
6484
6562
  variantClass = `bg-clx-surface-2 border border-transparent ${shadowClass}`;
6485
6563
  }
6486
- return `flex flex-col ${resolveContainerRadius(this._cfg.borderRadius)} overflow-hidden w-full ${variantClass} ${hover}`.trim();
6564
+ return `flex flex-col ${resolveContainerRadius(this._themeSvc.config().borderRadius)} overflow-hidden w-full ${variantClass} ${hover}`.trim();
6487
6565
  }, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
6488
6566
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6489
6567
  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 +6624,10 @@ const STEPPER_SIZE_MAP = {
6546
6624
  };
6547
6625
 
6548
6626
  class ClxStepperComponent {
6549
- _cfg = inject(CLX_THEME_CONFIG);
6627
+ _themeSvc = inject(ClxThemeService);
6550
6628
  steps = input.required(...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
6551
6629
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
6552
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6630
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6553
6631
  orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
6554
6632
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
6555
6633
  _tokens = computed(() => STEPPER_SIZE_MAP[this.size()], ...(ngDevMode ? [{ debugName: "_tokens" }] : /* istanbul ignore next */ []));
@@ -6747,7 +6825,7 @@ const AVATAR_ICON_SIZE_MAP = {
6747
6825
  };
6748
6826
 
6749
6827
  class ClxAvatarComponent {
6750
- _cfg = inject(CLX_THEME_CONFIG);
6828
+ _themeSvc = inject(ClxThemeService);
6751
6829
  src = input(null, ...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
6752
6830
  initials = input(null, ...(ngDevMode ? [{ debugName: "initials" }] : /* istanbul ignore next */ []));
6753
6831
  iconName = input(null, ...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
@@ -6755,7 +6833,7 @@ class ClxAvatarComponent {
6755
6833
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
6756
6834
  shape = input('circle', ...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
6757
6835
  alt = input('Avatar', ...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
6758
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6836
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
6759
6837
  _contentType = computed(() => {
6760
6838
  if (this.src())
6761
6839
  return 'image';
@@ -6848,9 +6926,9 @@ const TIMELINE_SIZE_MAP = {
6848
6926
  };
6849
6927
 
6850
6928
  class ClxTimelineComponent {
6851
- _cfg = inject(CLX_THEME_CONFIG);
6929
+ _themeSvc = inject(ClxThemeService);
6852
6930
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
6853
- resolvedColor = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
6931
+ resolvedColor = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
6854
6932
  lineStyle = input('dotted', ...(ngDevMode ? [{ debugName: "lineStyle" }] : /* istanbul ignore next */ []));
6855
6933
  mode = input('left', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
6856
6934
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
@@ -7247,16 +7325,16 @@ class ClxColorPickerComponent {
7247
7325
  // ── Unique label id ────────────────────────────────────────────────────────
7248
7326
  static _seq = 0;
7249
7327
  _labelId = `clx-cp-label-${++ClxColorPickerComponent._seq}`;
7250
- _cfg = inject(CLX_THEME_CONFIG);
7328
+ _themeSvc = inject(ClxThemeService);
7251
7329
  // ── Inputs ─────────────────────────────────────────────────────────────────
7252
7330
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
7253
7331
  placeholder = input('Selecciona un color', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
7254
7332
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
7255
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
7333
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
7256
7334
  format = input('hex', ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
7257
7335
  presets = input([], ...(ngDevMode ? [{ debugName: "presets" }] : /* istanbul ignore next */ []));
7258
7336
  activeColor = input(undefined, ...(ngDevMode ? [{ debugName: "activeColor" }] : /* istanbul ignore next */ []));
7259
- _activeColor = computed(() => this.activeColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
7337
+ _activeColor = computed(() => this.activeColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
7260
7338
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
7261
7339
  errorMessage = input('Este campo es requerido', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
7262
7340
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
@@ -7323,7 +7401,7 @@ class ClxColorPickerComponent {
7323
7401
  }, ...(ngDevMode ? [{ debugName: "_displayClass" }] : /* istanbul ignore next */ []));
7324
7402
  _triggerClass = computed(() => {
7325
7403
  const s = this._sizeConfig();
7326
- const base = `relative flex items-center ${resolveRadius(this._cfg.borderRadius)} border transition-all duration-200 outline-none w-full`;
7404
+ const base = `relative flex items-center ${resolveRadius(this._themeSvc.config().borderRadius)} border transition-all duration-200 outline-none w-full`;
7327
7405
  if (this._disabled()) {
7328
7406
  return `${base} ${s.minH} ${CLX_BORDER_DISABLED} ${CLX_BG_DISABLED} cursor-not-allowed opacity-60`;
7329
7407
  }
@@ -7867,7 +7945,7 @@ class ClxDatepickerComponent {
7867
7945
  placeholder = input('Selecciona una fecha', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
7868
7946
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
7869
7947
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
7870
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
7948
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
7871
7949
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
7872
7950
  statusMessage = input('', ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
7873
7951
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
@@ -7884,7 +7962,7 @@ class ClxDatepickerComponent {
7884
7962
  _isOpen = signal(false, ...(ngDevMode ? [{ debugName: "_isOpen" }] : /* istanbul ignore next */ []));
7885
7963
  _showYearPicker = signal(false, ...(ngDevMode ? [{ debugName: "_showYearPicker" }] : /* istanbul ignore next */ []));
7886
7964
  _dayLabels = DAY_LABELS$1;
7887
- _cfg = inject(CLX_THEME_CONFIG);
7965
+ _themeSvc = inject(ClxThemeService);
7888
7966
  _el = inject((ElementRef));
7889
7967
  _sso = inject(ScrollStrategyOptions);
7890
7968
  _scrollStrategy = this._sso.reposition();
@@ -7911,7 +7989,7 @@ class ClxDatepickerComponent {
7911
7989
  this._isOpen();
7912
7990
  return this._el.nativeElement.getBoundingClientRect().width;
7913
7991
  }, ...(ngDevMode ? [{ debugName: "_overlayWidth" }] : /* istanbul ignore next */ []));
7914
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
7992
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
7915
7993
  _labelClass = computed(() => `${this._sizeConfig().label} ${CLX_TEXT_LABEL} leading-none`, ...(ngDevMode ? [{ debugName: "_labelClass" }] : /* istanbul ignore next */ []));
7916
7994
  _hintClass = computed(() => `${this._sizeConfig().hint} ${CLX_TEXT_HINT}`, ...(ngDevMode ? [{ debugName: "_hintClass" }] : /* istanbul ignore next */ []));
7917
7995
  _statusMsgClass = computed(() => `${this._sizeConfig().hint} ${this._statusCfg().msgCls}`, ...(ngDevMode ? [{ debugName: "_statusMsgClass" }] : /* istanbul ignore next */ []));
@@ -7925,7 +8003,7 @@ class ClxDatepickerComponent {
7925
8003
  const focus = resolveColor(this._color()).focus;
7926
8004
  const border = this._disabled() ? `${CLX_BORDER_DISABLED} ${CLX_BG_DISABLED}` : `${status.border} focus:outline-none ${focus}`;
7927
8005
  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`;
8006
+ return `relative flex items-stretch ${size.trigger} ${resolveRadius(this._themeSvc.config().borderRadius)} border ${border} ${cursor} overflow-hidden transition-all duration-200 select-none`;
7929
8007
  }, ...(ngDevMode ? [{ debugName: "_triggerClass" }] : /* istanbul ignore next */ []));
7930
8008
  _displayClass = computed(() => {
7931
8009
  const hasValue = !!this._value();
@@ -8295,7 +8373,7 @@ class ClxTimepickerComponent {
8295
8373
  placeholder = input('Selecciona una hora', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
8296
8374
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
8297
8375
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
8298
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
8376
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
8299
8377
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
8300
8378
  statusMessage = input('', ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
8301
8379
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
@@ -8313,7 +8391,7 @@ class ClxTimepickerComponent {
8313
8391
  _isOpen = signal(false, ...(ngDevMode ? [{ debugName: "_isOpen" }] : /* istanbul ignore next */ []));
8314
8392
  _hours = HOURS;
8315
8393
  _minutes = MINUTES;
8316
- _cfg = inject(CLX_THEME_CONFIG);
8394
+ _themeSvc = inject(ClxThemeService);
8317
8395
  _el = inject((ElementRef));
8318
8396
  _sso = inject(ScrollStrategyOptions);
8319
8397
  _scrollStrategy = this._sso.reposition();
@@ -8329,7 +8407,7 @@ class ClxTimepickerComponent {
8329
8407
  this._isOpen();
8330
8408
  return this._el.nativeElement.getBoundingClientRect().width;
8331
8409
  }, ...(ngDevMode ? [{ debugName: "_overlayWidth" }] : /* istanbul ignore next */ []));
8332
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
8410
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
8333
8411
  _labelClass = computed(() => `${this._sizeConfig().label} ${CLX_TEXT_LABEL} leading-none`, ...(ngDevMode ? [{ debugName: "_labelClass" }] : /* istanbul ignore next */ []));
8334
8412
  _hintClass = computed(() => `${this._sizeConfig().hint} ${CLX_TEXT_HINT}`, ...(ngDevMode ? [{ debugName: "_hintClass" }] : /* istanbul ignore next */ []));
8335
8413
  _statusMsgClass = computed(() => `${this._sizeConfig().hint} ${this._statusCfg().msgCls}`, ...(ngDevMode ? [{ debugName: "_statusMsgClass" }] : /* istanbul ignore next */ []));
@@ -8343,7 +8421,7 @@ class ClxTimepickerComponent {
8343
8421
  const focus = resolveColor(this._color()).focus;
8344
8422
  const border = this._disabled() ? `${CLX_BORDER_DISABLED} ${CLX_BG_DISABLED}` : `${status.border} focus:outline-none ${focus}`;
8345
8423
  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`;
8424
+ return `relative flex items-stretch ${size.trigger} ${resolveRadius(this._themeSvc.config().borderRadius)} border ${border} ${cursor} overflow-hidden transition-all duration-200 select-none`;
8347
8425
  }, ...(ngDevMode ? [{ debugName: "_triggerClass" }] : /* istanbul ignore next */ []));
8348
8426
  _displayClass = computed(() => {
8349
8427
  const hasValue = !!this._value();
@@ -8631,13 +8709,13 @@ const DATE_PRESETS = [
8631
8709
  { label: 'Este año', range: () => { const y = new Date().getFullYear(); return { from: new Date(y, 0, 1), to: new Date(y, 11, 31) }; } },
8632
8710
  ];
8633
8711
  class ClxDateRangePickerComponent {
8634
- _cfg = inject(CLX_THEME_CONFIG);
8712
+ _themeSvc = inject(ClxThemeService);
8635
8713
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
8636
8714
  placeholder = input('Selecciona un rango', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
8637
8715
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
8638
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
8716
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
8639
8717
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
8640
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
8718
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
8641
8719
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
8642
8720
  statusMessage = input('', ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
8643
8721
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
@@ -8724,7 +8802,7 @@ class ClxDateRangePickerComponent {
8724
8802
  const focus = resolveColor(this._color()).focus;
8725
8803
  const border = this._disabled() ? 'border-gray-200 bg-gray-50' : `${status.border} focus:outline-none ${focus}`;
8726
8804
  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`;
8805
+ return `relative flex items-stretch ${size.trigger} ${resolveRadius(this._themeSvc.config().borderRadius)} border ${border} ${cursor} overflow-hidden transition-all duration-200 select-none`;
8728
8806
  }, ...(ngDevMode ? [{ debugName: "_triggerClass" }] : /* istanbul ignore next */ []));
8729
8807
  _displayClass = computed(() => {
8730
8808
  const color = this._disabled() ? 'text-clx-text-faint' : this._hasValue() ? 'text-clx-text-label' : 'text-clx-text-faint';
@@ -9194,7 +9272,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
9194
9272
 
9195
9273
  class ClxEditorLinkModalComponent {
9196
9274
  _modalRef = inject(CLX_MODAL_REF, { optional: true });
9197
- _primaryColor = inject(CLX_THEME_CONFIG).primaryColor;
9275
+ _themeSvc = inject(ClxThemeService);
9276
+ _primaryColor = computed(() => this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_primaryColor" }] : /* istanbul ignore next */ []));
9198
9277
  _form = new FormGroup({
9199
9278
  text: new FormControl('', { nonNullable: true }),
9200
9279
  url: new FormControl('', { nonNullable: true, validators: [Validators.required, Validators.pattern(/^https?:\/\/.+/)] }),
@@ -9216,7 +9295,7 @@ class ClxEditorLinkModalComponent {
9216
9295
  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
9296
  <clx-modal
9218
9297
  size="sm"
9219
- [confirmButton]="{ text: 'Insertar', color: _primaryColor }"
9298
+ [confirmButton]="{ text: 'Insertar', color: _primaryColor() }"
9220
9299
  [cancelButton]="{ text: 'Cancelar', color: 'slate', variant: 'ghost' }"
9221
9300
  [showCancelButton]="true"
9222
9301
  (confirmClick)="_confirm()"
@@ -9255,7 +9334,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
9255
9334
  template: `
9256
9335
  <clx-modal
9257
9336
  size="sm"
9258
- [confirmButton]="{ text: 'Insertar', color: _primaryColor }"
9337
+ [confirmButton]="{ text: 'Insertar', color: _primaryColor() }"
9259
9338
  [cancelButton]="{ text: 'Cancelar', color: 'slate', variant: 'ghost' }"
9260
9339
  [showCancelButton]="true"
9261
9340
  (confirmClick)="_confirm()"
@@ -9502,14 +9581,14 @@ const HEADING_OPTIONS = [
9502
9581
  { value: 'h3', label: 'H3' },
9503
9582
  ];
9504
9583
  class ClxEditorComponent {
9505
- _cfg = inject(CLX_THEME_CONFIG);
9584
+ _themeSvc = inject(ClxThemeService);
9506
9585
  // ── Inputs ───────────────────────────────────────────────────────────────
9507
9586
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
9508
9587
  placeholder = input('Escribe aquí...', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
9509
9588
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
9510
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
9589
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
9511
9590
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
9512
- _editorSize = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_editorSize" }] : /* istanbul ignore next */ []));
9591
+ _editorSize = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_editorSize" }] : /* istanbul ignore next */ []));
9513
9592
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
9514
9593
  statusMessage = input('', ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
9515
9594
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
@@ -9576,7 +9655,7 @@ class ClxEditorComponent {
9576
9655
  _sizeCfg = computed(() => EDITOR_SIZE_MAP[this._editorSize()], ...(ngDevMode ? [{ debugName: "_sizeCfg" }] : /* istanbul ignore next */ []));
9577
9656
  _shellClass = computed(() => {
9578
9657
  const statusCfg = INPUT_STATUS_MAP[this.status()];
9579
- const r = resolveContainerRadius(this._cfg.borderRadius);
9658
+ const r = resolveContainerRadius(this._themeSvc.config().borderRadius);
9580
9659
  if (this._disabled()) {
9581
9660
  return `${r} border border-gray-200 bg-gray-50 overflow-hidden opacity-60 cursor-not-allowed`;
9582
9661
  }
@@ -10201,11 +10280,11 @@ const SWITCH_SIZE_MAP = {
10201
10280
  };
10202
10281
 
10203
10282
  class ClxSwitchComponent {
10204
- _cfg = inject(CLX_THEME_CONFIG);
10283
+ _themeSvc = inject(ClxThemeService);
10205
10284
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
10206
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
10285
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
10207
10286
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
10208
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
10287
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
10209
10288
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
10210
10289
  value = input(false, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
10211
10290
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
@@ -10369,7 +10448,7 @@ class ClxTextareaComponent {
10369
10448
  placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
10370
10449
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
10371
10450
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
10372
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
10451
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
10373
10452
  status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
10374
10453
  statusMessage = input('', ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
10375
10454
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
@@ -10383,7 +10462,7 @@ class ClxTextareaComponent {
10383
10462
  // ── Internal state ───────────────────────────────────────────────────────
10384
10463
  _taId = `clx-textarea-${++_clxTextareaIdCounter}`;
10385
10464
  _value = signal('', ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
10386
- _cfg = inject(CLX_THEME_CONFIG);
10465
+ _themeSvc = inject(ClxThemeService);
10387
10466
  _cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []));
10388
10467
  _cvaConnected = false;
10389
10468
  _disabled = computed(() => this._cvaDisabled() || this.disabled(), ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
@@ -10395,7 +10474,7 @@ class ClxTextareaComponent {
10395
10474
  _onChange = () => { };
10396
10475
  _onTouched = () => { };
10397
10476
  // ── Computed shortcuts ───────────────────────────────────────────────────
10398
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
10477
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
10399
10478
  _sizeCfg = computed(() => TEXTAREA_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_sizeCfg" }] : /* istanbul ignore next */ []));
10400
10479
  _statusCfg = computed(() => INPUT_STATUS_MAP[this.status()], ...(ngDevMode ? [{ debugName: "_statusCfg" }] : /* istanbul ignore next */ []));
10401
10480
  // ── Classes ──────────────────────────────────────────────────────────────
@@ -10409,13 +10488,13 @@ class ClxTextareaComponent {
10409
10488
  _wrapperClass = computed(() => {
10410
10489
  const statusCfg = this._statusCfg();
10411
10490
  if (this._disabled()) {
10412
- return `flex items-stretch ${resolveRadius(this._cfg.borderRadius)} border ${CLX_BORDER_DISABLED} overflow-hidden transition-all duration-200`;
10491
+ return `flex items-stretch ${resolveRadius(this._themeSvc.config().borderRadius)} border ${CLX_BORDER_DISABLED} overflow-hidden transition-all duration-200`;
10413
10492
  }
10414
10493
  const focusCls = this.status() !== 'default'
10415
10494
  ? statusCfg.ring.replace(/focus:/g, 'focus-within:')
10416
10495
  : resolveColor(this._color()).focusWithin;
10417
10496
  const border = statusCfg.border;
10418
- return `flex items-stretch ${resolveRadius(this._cfg.borderRadius)} border ${border} ${focusCls} overflow-hidden transition-all duration-200`;
10497
+ return `flex items-stretch ${resolveRadius(this._themeSvc.config().borderRadius)} border ${border} ${focusCls} overflow-hidden transition-all duration-200`;
10419
10498
  }, ...(ngDevMode ? [{ debugName: "_wrapperClass" }] : /* istanbul ignore next */ []));
10420
10499
  /** Prefix icon cell — flex column, full height of the wrapper */
10421
10500
  _prefixCellCls = computed(() => {
@@ -10607,16 +10686,16 @@ const UPLOAD_SIZE_MAP = {
10607
10686
  };
10608
10687
 
10609
10688
  class ClxUploadComponent {
10610
- _cfg = inject(CLX_THEME_CONFIG);
10689
+ _themeSvc = inject(ClxThemeService);
10611
10690
  // ── Inputs ─────────────────────────────────────────────────────────────────
10612
10691
  multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
10613
10692
  accept = input('', ...(ngDevMode ? [{ debugName: "accept" }] : /* istanbul ignore next */ []));
10614
10693
  /** Max file size in bytes. 0 = no limit. */
10615
10694
  maxFileSize = input(0, ...(ngDevMode ? [{ debugName: "maxFileSize" }] : /* istanbul ignore next */ []));
10616
10695
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
10617
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
10696
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
10618
10697
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
10619
- _size = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
10698
+ _size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
10620
10699
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
10621
10700
  // ── Outputs ────────────────────────────────────────────────────────────────
10622
10701
  onUploadError = output();
@@ -10649,7 +10728,7 @@ class ClxUploadComponent {
10649
10728
  _zoneClass = computed(() => {
10650
10729
  const base = [
10651
10730
  'flex flex-col items-center justify-center text-center',
10652
- `w-full ${resolveContainerRadius(this._cfg.borderRadius)} border-2 border-dashed transition-all duration-200`,
10731
+ `w-full ${resolveContainerRadius(this._themeSvc.config().borderRadius)} border-2 border-dashed transition-all duration-200`,
10653
10732
  this._sizeConfig().zone,
10654
10733
  ].join(' ');
10655
10734
  const t = resolveColor(this._color());
@@ -11027,10 +11106,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
11027
11106
  }], 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
11107
 
11029
11108
  class ClxWizardComponent {
11030
- _cfg = inject(CLX_THEME_CONFIG);
11109
+ _themeSvc = inject(ClxThemeService);
11031
11110
  // ── Inputs ─────────────────────────────────────────────────────────────────
11032
11111
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
11033
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
11112
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
11034
11113
  orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
11035
11114
  linear = input(true, ...(ngDevMode ? [{ debugName: "linear" }] : /* istanbul ignore next */ []));
11036
11115
  prevLabel = input('Anterior', ...(ngDevMode ? [{ debugName: "prevLabel" }] : /* istanbul ignore next */ []));
@@ -11624,7 +11703,7 @@ const NAV_CHILDREN_INNER = 'overflow-hidden';
11624
11703
  const NAV_CHILDREN_LIST = 'ml-6 py-1 space-y-0.5';
11625
11704
 
11626
11705
  class ClxMenuItemComponent {
11627
- _cfg = inject(CLX_THEME_CONFIG);
11706
+ _themeSvc = inject(ClxThemeService);
11628
11707
  label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
11629
11708
  icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
11630
11709
  active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
@@ -11635,7 +11714,7 @@ class ClxMenuItemComponent {
11635
11714
  routerLinkActiveOptions = input({ exact: false }, ...(ngDevMode ? [{ debugName: "routerLinkActiveOptions" }] : /* istanbul ignore next */ []));
11636
11715
  itemClick = output();
11637
11716
  _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 */ []));
11717
+ _resolvedColor = computed(() => this._inheritedColor() ?? this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_resolvedColor" }] : /* istanbul ignore next */ []));
11639
11718
  inheritColor(c) { this._inheritedColor.set(c); }
11640
11719
  _geom = computed(() => {
11641
11720
  if (this.collapsed())
@@ -11731,11 +11810,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
11731
11810
  }], 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
11811
 
11733
11812
  class ClxMenuComponent {
11734
- _cfg = inject(CLX_THEME_CONFIG);
11813
+ _themeSvc = inject(ClxThemeService);
11735
11814
  label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
11736
11815
  icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
11737
11816
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
11738
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
11817
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
11739
11818
  collapsed = input(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
11740
11819
  active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
11741
11820
  routerLink = input('', ...(ngDevMode ? [{ debugName: "routerLink" }] : /* istanbul ignore next */ []));
@@ -11967,8 +12046,8 @@ class ClxProfileComponent {
11967
12046
  // ── Outputs ─────────────────────────────────────────────────────────────────
11968
12047
  menuAction = output();
11969
12048
  signOut = output();
11970
- _cfg = inject(CLX_THEME_CONFIG);
11971
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
12049
+ _themeSvc = inject(ClxThemeService);
12050
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
11972
12051
  // ── CDK Overlay ─────────────────────────────────────────────────────────────
11973
12052
  _sso = inject(ScrollStrategyOptions);
11974
12053
  _scrollStrategy = this._sso.reposition();
@@ -12244,7 +12323,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
12244
12323
  }], headerCell: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ClxHeaderCellDirective), { isSignal: true }] }], cell: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ClxCellDirective), { isSignal: true }] }] } });
12245
12324
 
12246
12325
  class ClxPageEmptyComponent {
12247
- _cfg = inject(CLX_THEME_CONFIG);
12326
+ _themeSvc = inject(ClxThemeService);
12248
12327
  icon = input('inbox', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
12249
12328
  title = input('Sin resultados', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
12250
12329
  description = input('', ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
@@ -12252,7 +12331,7 @@ class ClxPageEmptyComponent {
12252
12331
  ctaIcon = input('add', ...(ngDevMode ? [{ debugName: "ctaIcon" }] : /* istanbul ignore next */ []));
12253
12332
  ctaColor = input(undefined, ...(ngDevMode ? [{ debugName: "ctaColor" }] : /* istanbul ignore next */ []));
12254
12333
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
12255
- _ctaColor = computed(() => this.ctaColor() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_ctaColor" }] : /* istanbul ignore next */ []));
12334
+ _ctaColor = computed(() => this.ctaColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_ctaColor" }] : /* istanbul ignore next */ []));
12256
12335
  cta = output();
12257
12336
  _iconWrap() {
12258
12337
  const s = this.size();
@@ -12339,7 +12418,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
12339
12418
  }], 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
12419
 
12341
12420
  class ClxTableComponent {
12342
- _cfg = inject(CLX_THEME_CONFIG);
12421
+ _themeSvc = inject(ClxThemeService);
12343
12422
  // ── Inputs ─────────────────────────────────────────────────────────────────
12344
12423
  data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
12345
12424
  columns = input([], ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
@@ -12349,7 +12428,7 @@ class ClxTableComponent {
12349
12428
  searchable = input(true, ...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
12350
12429
  pagination = input(true, ...(ngDevMode ? [{ debugName: "pagination" }] : /* istanbul ignore next */ []));
12351
12430
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
12352
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
12431
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
12353
12432
  emptyIcon = input('table_chart', ...(ngDevMode ? [{ debugName: "emptyIcon" }] : /* istanbul ignore next */ []));
12354
12433
  emptyTitle = input('', ...(ngDevMode ? [{ debugName: "emptyTitle" }] : /* istanbul ignore next */ []));
12355
12434
  emptyDescription = input('', ...(ngDevMode ? [{ debugName: "emptyDescription" }] : /* istanbul ignore next */ []));
@@ -14218,59 +14297,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
14218
14297
  args: [ClxAnimateDirective, { descendants: true }]
14219
14298
  }] } });
14220
14299
 
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
14300
  class ClxAlertService {
14275
14301
  _overlay = inject(ClxNativeOverlayService);
14276
14302
  _injector = inject(Injector);
@@ -14492,11 +14518,11 @@ const PROGRESS_BAR_SIZE_MAP = {
14492
14518
  };
14493
14519
 
14494
14520
  class ClxProgressBarComponent {
14495
- _cfg = inject(CLX_THEME_CONFIG);
14521
+ _themeSvc = inject(ClxThemeService);
14496
14522
  value = input(0, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
14497
14523
  max = input(100, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
14498
14524
  color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
14499
- _color = computed(() => this.color() ?? this._cfg.primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
14525
+ _color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
14500
14526
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
14501
14527
  variant = input('solid', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
14502
14528
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
@@ -14508,7 +14534,7 @@ class ClxProgressBarComponent {
14508
14534
  return 0;
14509
14535
  return Math.min(100, Math.max(0, (this.value() / m) * 100));
14510
14536
  }, ...(ngDevMode ? [{ debugName: "_pct" }] : /* istanbul ignore next */ []));
14511
- _pbSize = computed(() => (this.size() ?? this._cfg.defaultSize), ...(ngDevMode ? [{ debugName: "_pbSize" }] : /* istanbul ignore next */ []));
14537
+ _pbSize = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_pbSize" }] : /* istanbul ignore next */ []));
14512
14538
  _trackH = computed(() => PROGRESS_BAR_SIZE_MAP[this._pbSize()], ...(ngDevMode ? [{ debugName: "_trackH" }] : /* istanbul ignore next */ []));
14513
14539
  _labelCls = computed(() => {
14514
14540
  const size = this._pbSize();
@@ -14847,5 +14873,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
14847
14873
  * Generated bundle index. Do not edit.
14848
14874
  */
14849
14875
 
14850
- export { CLX_ADDON_BORDER, CLX_ADDON_TEXT, CLX_ALERT_OPTIONS, CLX_ALERT_RESOLVE, CLX_BG_ADDON, CLX_BG_DISABLED, CLX_BG_ICON_WRAP, CLX_BG_SECTION, CLX_BG_SURFACE, CLX_BORDER_DEFAULT, CLX_BORDER_DISABLED, CLX_BORDER_MEDIUM, CLX_COLOR_HEX, CLX_COLOR_MAP, CLX_MODAL_ANIM_CONFIG, CLX_MODAL_DATA, CLX_MODAL_REF, CLX_OPTION_DISABLED, CLX_PLACEHOLDER, CLX_RADIO_GROUP, CLX_RADIUS_MAP, CLX_TEXT_BODY, CLX_TEXT_DISABLED, CLX_TEXT_HEADING, CLX_TEXT_HINT, CLX_TEXT_IDLE, CLX_TEXT_INPUT, CLX_TEXT_LABEL, CLX_TEXT_OPTION, CLX_TEXT_SUBTITLE, CLX_TEXT_TITLE, CLX_THEME_CONFIG, CLX_THEME_DEFAULTS, CLX_TOAST_DEFAULTS, ClxAlertComponent, ClxAlertService, ClxAnimateDirective, ClxAnimateGroupDirective, ClxAnimateService, ClxAppLayoutComponent, ClxAvatarComponent, ClxBadgeComponent, ClxBrandComponent, ClxButtonComponent, ClxButtonGroupComponent, ClxCardBodyDirective, ClxCardComponent, ClxCardFooterDirective, ClxCardHeaderDirective, ClxCarouselComponent, ClxCarouselDirective, ClxCartComponent, ClxCartSummaryDrawer, ClxCellDirective, ClxChartComponent, ClxCheckboxComponent, ClxColorPickerComponent, ClxColumnDefDirective, ClxDateRangePickerComponent, ClxDatepickerComponent, ClxDrawerComponent, ClxDrawerService, ClxEditorComponent, ClxEditorLinkModalComponent, ClxFilterPanelComponent, ClxHeaderCellDirective, ClxIconComponent, ClxInputComponent, ClxListComponent, ClxListItemComponent, ClxMenuComponent, ClxMenuItemComponent, ClxModalComponent, ClxModalService, ClxNavGroupComponent, ClxNumberComponent, ClxPageEmptyComponent, ClxPageNotFoundComponent, ClxPageServerErrorComponent, ClxPageUnauthorizedComponent, ClxPaginationComponent, ClxProductComponent, ClxProductDetailComponent, ClxProfileComponent, ClxProgressBarComponent, ClxRadioComponent, ClxRadioGroupComponent, ClxRatingComponent, ClxSelectComponent, ClxSkeletonComponent, ClxSliderComponent, ClxSpinnerComponent, ClxStatCardComponent, ClxStepComponent, ClxStepperComponent, ClxSwitchComponent, ClxTabDirective, ClxTableComponent, ClxTabsComponent, ClxTagComponent, ClxTextareaComponent, ClxThemeService, ClxTimelineComponent, ClxTimelineItemComponent, ClxTimepickerComponent, ClxToastComponent, ClxToastContainerComponent, ClxToastService, ClxTooltipComponent, ClxTooltipDirective, ClxTreeComponent, ClxUploadComponent, ClxWishlistComponent, ClxWizardComponent, TIMEPICKER_SIZE_MAP, parseColorInput, provideCodexlyTheme, resolveColor, resolveContainerRadius, resolveRadius };
14876
+ export { CLX_ADDON_BORDER, CLX_ADDON_TEXT, CLX_ALERT_OPTIONS, CLX_ALERT_RESOLVE, CLX_BG_ADDON, CLX_BG_DISABLED, CLX_BG_ICON_WRAP, CLX_BG_SECTION, CLX_BG_SURFACE, CLX_BORDER_DEFAULT, CLX_BORDER_DISABLED, CLX_BORDER_MEDIUM, CLX_COLOR_HEX, CLX_COLOR_HEX_100, CLX_COLOR_MAP, CLX_MODAL_ANIM_CONFIG, CLX_MODAL_DATA, CLX_MODAL_REF, CLX_OPTION_DISABLED, CLX_PLACEHOLDER, CLX_RADIO_GROUP, CLX_RADIUS_MAP, CLX_TEXT_BODY, CLX_TEXT_DISABLED, CLX_TEXT_HEADING, CLX_TEXT_HINT, CLX_TEXT_IDLE, CLX_TEXT_INPUT, CLX_TEXT_LABEL, CLX_TEXT_OPTION, CLX_TEXT_SUBTITLE, CLX_TEXT_TITLE, CLX_THEME_CONFIG, CLX_THEME_DEFAULTS, CLX_TOAST_DEFAULTS, ClxAlertComponent, ClxAlertService, ClxAnimateDirective, ClxAnimateGroupDirective, ClxAnimateService, ClxAppLayoutComponent, ClxAvatarComponent, ClxBadgeComponent, ClxBrandComponent, ClxButtonComponent, ClxButtonGroupComponent, ClxCardBodyDirective, ClxCardComponent, ClxCardFooterDirective, ClxCardHeaderDirective, ClxCarouselComponent, ClxCarouselDirective, ClxCartComponent, ClxCartSummaryDrawer, ClxCellDirective, ClxChartComponent, ClxCheckboxComponent, ClxColorPickerComponent, ClxColumnDefDirective, ClxDateRangePickerComponent, ClxDatepickerComponent, ClxDrawerComponent, ClxDrawerService, ClxEditorComponent, ClxEditorLinkModalComponent, ClxFilterPanelComponent, ClxHeaderCellDirective, ClxIconComponent, ClxInputComponent, ClxListComponent, ClxListItemComponent, ClxMenuComponent, ClxMenuItemComponent, ClxModalComponent, ClxModalService, ClxNavGroupComponent, ClxNumberComponent, ClxPageEmptyComponent, ClxPageNotFoundComponent, ClxPageServerErrorComponent, ClxPageUnauthorizedComponent, ClxPaginationComponent, ClxProductComponent, ClxProductDetailComponent, ClxProfileComponent, ClxProgressBarComponent, ClxRadioComponent, ClxRadioGroupComponent, ClxRatingComponent, ClxSelectComponent, ClxSkeletonComponent, ClxSliderComponent, ClxSpinnerComponent, ClxStatCardComponent, ClxStepComponent, ClxStepperComponent, ClxSwitchComponent, ClxTabDirective, ClxTableComponent, ClxTabsComponent, ClxTagComponent, ClxTextareaComponent, ClxThemeService, ClxTimelineComponent, ClxTimelineItemComponent, ClxTimepickerComponent, ClxToastComponent, ClxToastContainerComponent, ClxToastService, ClxTooltipComponent, ClxTooltipDirective, ClxTreeComponent, ClxUploadComponent, ClxWishlistComponent, ClxWizardComponent, TIMEPICKER_SIZE_MAP, parseColorInput, provideCodexlyTheme, resolveColor, resolveContainerRadius, resolveRadius };
14851
14877
  //# sourceMappingURL=codexly-ui.mjs.map