codexly-ui 0.0.47 → 0.0.49

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');
@@ -5219,6 +5220,11 @@ const DRAWER_SIZE_MAP = {
5219
5220
  md: 'w-full max-w-[420px]',
5220
5221
  lg: 'w-full max-w-[560px]',
5221
5222
  };
5223
+ const DRAWER_WIDTH_MAP = {
5224
+ sm: '320px',
5225
+ md: '420px',
5226
+ lg: '560px',
5227
+ };
5222
5228
  const DRAWER_CONTAINER_CLASS = 'flex flex-col bg-white shadow-2xl overflow-hidden h-full';
5223
5229
  const CLX_DRAWER_SIZE = new InjectionToken('CLX_DRAWER_SIZE');
5224
5230
 
@@ -5367,7 +5373,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
5367
5373
  }], 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
5374
 
5369
5375
  class ClxModalComponent {
5370
- size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
5376
+ size = input(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
5371
5377
  showClose = input(true, ...(ngDevMode ? [{ debugName: "showClose" }] : /* istanbul ignore next */ []));
5372
5378
  confirmButton = input(undefined, ...(ngDevMode ? [{ debugName: "confirmButton" }] : /* istanbul ignore next */ []));
5373
5379
  cancelButton = input(undefined, ...(ngDevMode ? [{ debugName: "cancelButton" }] : /* istanbul ignore next */ []));
@@ -5375,7 +5381,9 @@ class ClxModalComponent {
5375
5381
  confirmClick = output();
5376
5382
  cancelClick = output();
5377
5383
  _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 */ []));
5384
+ _sizeToken = inject(CLX_MODAL_SIZE, { optional: true });
5385
+ _resolvedSize = computed(() => this.size() ?? this._sizeToken ?? 'md', ...(ngDevMode ? [{ debugName: "_resolvedSize" }] : /* istanbul ignore next */ []));
5386
+ _hostClass = computed(() => `${MODAL_CONTAINER_CLASS} ${MODAL_SIZE_MAP[this._resolvedSize()]} max-h-[90vh]`, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
5379
5387
  _hasBuiltInButtons = computed(() => !!this.confirmButton(), ...(ngDevMode ? [{ debugName: "_hasBuiltInButtons" }] : /* istanbul ignore next */ []));
5380
5388
  _confirmText = computed(() => this.confirmButton()?.text ?? 'Aceptar', ...(ngDevMode ? [{ debugName: "_confirmText" }] : /* istanbul ignore next */ []));
5381
5389
  _confirmColor = computed(() => this.confirmButton()?.color ?? 'indigo', ...(ngDevMode ? [{ debugName: "_confirmColor" }] : /* istanbul ignore next */ []));
@@ -8972,7 +8980,7 @@ class ClxModalService {
8972
8980
  open(
8973
8981
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8974
8982
  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;
8983
+ 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
8984
  const animConfig = { animationIn, animationOut, animationDuration };
8977
8985
  let _resolve;
8978
8986
  const _afterClosed = new Promise(res => (_resolve = res));
@@ -9014,6 +9022,7 @@ class ClxModalService {
9014
9022
  { provide: CLX_MODAL_DATA, useValue: data ?? null },
9015
9023
  { provide: CLX_MODAL_REF, useValue: modalRef },
9016
9024
  { provide: CLX_MODAL_ANIM_CONFIG, useValue: animConfig },
9025
+ { provide: CLX_MODAL_SIZE, useValue: size },
9017
9026
  ],
9018
9027
  });
9019
9028
  // Attach wrapper — CDK creates the backdrop on attach()
@@ -13915,6 +13924,7 @@ class ClxDrawerService {
13915
13924
  const wrapperRef = overlayRef.attach(wrapperPortal);
13916
13925
  // Apply drawer-specific styles AFTER attach() so CDK doesn't overwrite them
13917
13926
  Object.assign(overlayRef.overlayElement.style, {
13927
+ width: DRAWER_WIDTH_MAP[size],
13918
13928
  height: '100vh',
13919
13929
  pointerEvents: 'none',
13920
13930
  });