codexly-ui 0.0.46 → 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.
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -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');
|
|
@@ -5220,9 +5221,10 @@ const DRAWER_SIZE_MAP = {
|
|
|
5220
5221
|
lg: 'w-full max-w-[560px]',
|
|
5221
5222
|
};
|
|
5222
5223
|
const DRAWER_CONTAINER_CLASS = 'flex flex-col bg-white shadow-2xl overflow-hidden h-full';
|
|
5224
|
+
const CLX_DRAWER_SIZE = new InjectionToken('CLX_DRAWER_SIZE');
|
|
5223
5225
|
|
|
5224
5226
|
class ClxDrawerComponent {
|
|
5225
|
-
size = input(
|
|
5227
|
+
size = input(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
5226
5228
|
showClose = input(true, ...(ngDevMode ? [{ debugName: "showClose" }] : /* istanbul ignore next */ []));
|
|
5227
5229
|
confirmButton = input(undefined, ...(ngDevMode ? [{ debugName: "confirmButton" }] : /* istanbul ignore next */ []));
|
|
5228
5230
|
cancelButton = input(undefined, ...(ngDevMode ? [{ debugName: "cancelButton" }] : /* istanbul ignore next */ []));
|
|
@@ -5230,7 +5232,9 @@ class ClxDrawerComponent {
|
|
|
5230
5232
|
confirmClick = output();
|
|
5231
5233
|
cancelClick = output();
|
|
5232
5234
|
_modalRef = inject(CLX_MODAL_REF, { optional: true });
|
|
5233
|
-
|
|
5235
|
+
_sizeToken = inject(CLX_DRAWER_SIZE, { optional: true });
|
|
5236
|
+
_resolvedSize = computed(() => this.size() ?? this._sizeToken ?? 'md', ...(ngDevMode ? [{ debugName: "_resolvedSize" }] : /* istanbul ignore next */ []));
|
|
5237
|
+
_hostClass = computed(() => `${DRAWER_CONTAINER_CLASS} ${DRAWER_SIZE_MAP[this._resolvedSize()]}`, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
|
|
5234
5238
|
_hasBuiltInButtons = computed(() => !!this.confirmButton(), ...(ngDevMode ? [{ debugName: "_hasBuiltInButtons" }] : /* istanbul ignore next */ []));
|
|
5235
5239
|
_confirmText = computed(() => this.confirmButton()?.text ?? 'Aceptar', ...(ngDevMode ? [{ debugName: "_confirmText" }] : /* istanbul ignore next */ []));
|
|
5236
5240
|
_confirmColor = computed(() => this.confirmButton()?.color ?? 'indigo', ...(ngDevMode ? [{ debugName: "_confirmColor" }] : /* istanbul ignore next */ []));
|
|
@@ -5364,7 +5368,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
5364
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"] }] } });
|
|
5365
5369
|
|
|
5366
5370
|
class ClxModalComponent {
|
|
5367
|
-
size = input(
|
|
5371
|
+
size = input(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
5368
5372
|
showClose = input(true, ...(ngDevMode ? [{ debugName: "showClose" }] : /* istanbul ignore next */ []));
|
|
5369
5373
|
confirmButton = input(undefined, ...(ngDevMode ? [{ debugName: "confirmButton" }] : /* istanbul ignore next */ []));
|
|
5370
5374
|
cancelButton = input(undefined, ...(ngDevMode ? [{ debugName: "cancelButton" }] : /* istanbul ignore next */ []));
|
|
@@ -5372,7 +5376,9 @@ class ClxModalComponent {
|
|
|
5372
5376
|
confirmClick = output();
|
|
5373
5377
|
cancelClick = output();
|
|
5374
5378
|
_modalRef = inject(CLX_MODAL_REF, { optional: true });
|
|
5375
|
-
|
|
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 */ []));
|
|
5376
5382
|
_hasBuiltInButtons = computed(() => !!this.confirmButton(), ...(ngDevMode ? [{ debugName: "_hasBuiltInButtons" }] : /* istanbul ignore next */ []));
|
|
5377
5383
|
_confirmText = computed(() => this.confirmButton()?.text ?? 'Aceptar', ...(ngDevMode ? [{ debugName: "_confirmText" }] : /* istanbul ignore next */ []));
|
|
5378
5384
|
_confirmColor = computed(() => this.confirmButton()?.color ?? 'indigo', ...(ngDevMode ? [{ debugName: "_confirmColor" }] : /* istanbul ignore next */ []));
|
|
@@ -8969,7 +8975,7 @@ class ClxModalService {
|
|
|
8969
8975
|
open(
|
|
8970
8976
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8971
8977
|
component, config = {}) {
|
|
8972
|
-
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;
|
|
8973
8979
|
const animConfig = { animationIn, animationOut, animationDuration };
|
|
8974
8980
|
let _resolve;
|
|
8975
8981
|
const _afterClosed = new Promise(res => (_resolve = res));
|
|
@@ -9011,6 +9017,7 @@ class ClxModalService {
|
|
|
9011
9017
|
{ provide: CLX_MODAL_DATA, useValue: data ?? null },
|
|
9012
9018
|
{ provide: CLX_MODAL_REF, useValue: modalRef },
|
|
9013
9019
|
{ provide: CLX_MODAL_ANIM_CONFIG, useValue: animConfig },
|
|
9020
|
+
{ provide: CLX_MODAL_SIZE, useValue: size },
|
|
9014
9021
|
],
|
|
9015
9022
|
});
|
|
9016
9023
|
// Attach wrapper — CDK creates the backdrop on attach()
|
|
@@ -13877,7 +13884,7 @@ class ClxDrawerService {
|
|
|
13877
13884
|
open(
|
|
13878
13885
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13879
13886
|
component, config = {}) {
|
|
13880
|
-
const { hasBackdrop = false, disableClose = false, panelClass = [], data, } = config;
|
|
13887
|
+
const { hasBackdrop = false, disableClose = false, panelClass = [], size = 'md', data, } = config;
|
|
13881
13888
|
let _resolve;
|
|
13882
13889
|
const _afterClosed = new Promise(res => (_resolve = res));
|
|
13883
13890
|
let _focusTrap = null;
|
|
@@ -13904,6 +13911,7 @@ class ClxDrawerService {
|
|
|
13904
13911
|
providers: [
|
|
13905
13912
|
{ provide: CLX_MODAL_DATA, useValue: data ?? null },
|
|
13906
13913
|
{ provide: CLX_MODAL_REF, useValue: drawerRef },
|
|
13914
|
+
{ provide: CLX_DRAWER_SIZE, useValue: size },
|
|
13907
13915
|
],
|
|
13908
13916
|
});
|
|
13909
13917
|
// Attach wrapper via ComponentPortal — CDK creates backdrop on attach()
|