codexly-ui 0.0.47 → 0.0.48

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.
@@ -5205,6 +5205,7 @@ const MODAL_SIZE_MAP = {
5205
5205
  const MODAL_CONTAINER_CLASS = 'flex flex-col bg-white rounded-2xl shadow-2xl overflow-hidden';
5206
5206
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5207
5207
  const CLX_MODAL_DATA = new InjectionToken('CLX_MODAL_DATA');
5208
+ const CLX_MODAL_SIZE = new InjectionToken('CLX_MODAL_SIZE');
5208
5209
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5209
5210
  const CLX_MODAL_REF = new InjectionToken('CLX_MODAL_REF');
5210
5211
  const CLX_MODAL_ANIM_CONFIG = new InjectionToken('CLX_MODAL_ANIM_CONFIG');
@@ -5367,7 +5368,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
5367
5368
  }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], showClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClose", required: false }] }], confirmButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmButton", required: false }] }], cancelButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelButton", required: false }] }], showCancelButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCancelButton", required: false }] }], confirmClick: [{ type: i0.Output, args: ["confirmClick"] }], cancelClick: [{ type: i0.Output, args: ["cancelClick"] }] } });
5368
5369
 
5369
5370
  class ClxModalComponent {
5370
- size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
5371
+ size = input(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
5371
5372
  showClose = input(true, ...(ngDevMode ? [{ debugName: "showClose" }] : /* istanbul ignore next */ []));
5372
5373
  confirmButton = input(undefined, ...(ngDevMode ? [{ debugName: "confirmButton" }] : /* istanbul ignore next */ []));
5373
5374
  cancelButton = input(undefined, ...(ngDevMode ? [{ debugName: "cancelButton" }] : /* istanbul ignore next */ []));
@@ -5375,7 +5376,9 @@ class ClxModalComponent {
5375
5376
  confirmClick = output();
5376
5377
  cancelClick = output();
5377
5378
  _modalRef = inject(CLX_MODAL_REF, { optional: true });
5378
- _hostClass = computed(() => `${MODAL_CONTAINER_CLASS} ${MODAL_SIZE_MAP[this.size()]} max-h-[90vh]`, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
5379
+ _sizeToken = inject(CLX_MODAL_SIZE, { optional: true });
5380
+ _resolvedSize = computed(() => this.size() ?? this._sizeToken ?? 'md', ...(ngDevMode ? [{ debugName: "_resolvedSize" }] : /* istanbul ignore next */ []));
5381
+ _hostClass = computed(() => `${MODAL_CONTAINER_CLASS} ${MODAL_SIZE_MAP[this._resolvedSize()]} max-h-[90vh]`, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
5379
5382
  _hasBuiltInButtons = computed(() => !!this.confirmButton(), ...(ngDevMode ? [{ debugName: "_hasBuiltInButtons" }] : /* istanbul ignore next */ []));
5380
5383
  _confirmText = computed(() => this.confirmButton()?.text ?? 'Aceptar', ...(ngDevMode ? [{ debugName: "_confirmText" }] : /* istanbul ignore next */ []));
5381
5384
  _confirmColor = computed(() => this.confirmButton()?.color ?? 'indigo', ...(ngDevMode ? [{ debugName: "_confirmColor" }] : /* istanbul ignore next */ []));
@@ -8972,7 +8975,7 @@ class ClxModalService {
8972
8975
  open(
8973
8976
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8974
8977
  component, config = {}) {
8975
- const { hasBackdrop = true, disableClose = false, panelClass = [], data, animationIn = MODAL_ANIM_DEFAULTS.animationIn, animationOut = MODAL_ANIM_DEFAULTS.animationOut, animationDuration = MODAL_ANIM_DEFAULTS.animationDuration, } = config;
8978
+ const { hasBackdrop = true, disableClose = false, panelClass = [], size = 'md', data, animationIn = MODAL_ANIM_DEFAULTS.animationIn, animationOut = MODAL_ANIM_DEFAULTS.animationOut, animationDuration = MODAL_ANIM_DEFAULTS.animationDuration, } = config;
8976
8979
  const animConfig = { animationIn, animationOut, animationDuration };
8977
8980
  let _resolve;
8978
8981
  const _afterClosed = new Promise(res => (_resolve = res));
@@ -9014,6 +9017,7 @@ class ClxModalService {
9014
9017
  { provide: CLX_MODAL_DATA, useValue: data ?? null },
9015
9018
  { provide: CLX_MODAL_REF, useValue: modalRef },
9016
9019
  { provide: CLX_MODAL_ANIM_CONFIG, useValue: animConfig },
9020
+ { provide: CLX_MODAL_SIZE, useValue: size },
9017
9021
  ],
9018
9022
  });
9019
9023
  // Attach wrapper — CDK creates the backdrop on attach()