valtech-components 4.0.19 → 4.0.21

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.
@@ -83,6 +83,17 @@ export declare class ModalService {
83
83
  * @returns Promise resolving to the modal result
84
84
  */
85
85
  openFullscreen<T = any, R = any>(options: ModalMetadata<T>): Promise<ModalResult<R>>;
86
+ /**
87
+ * Opens an adaptive modal: full-screen on mobile, centered card on desktop.
88
+ *
89
+ * Solves two sheet-modal problems at once:
90
+ * 1. Content unreachable — no artificial height cap from breakpoints.
91
+ * 2. Scroll triggers dismiss — no swipe gesture, only backdrop/button close.
92
+ *
93
+ * @param options - Modal configuration (breakpoints/size/width/height are managed internally)
94
+ * @param variant - 'wide' for wider desktop card (720px vs default 560px)
95
+ */
96
+ openAdaptive<T = any, R = any>(options: Omit<ModalMetadata<T>, 'breakpoints' | 'size' | 'width' | 'height'>, variant?: 'wide'): Promise<ModalResult<R>>;
86
97
  /**
87
98
  * Dismisses the top-most modal.
88
99
  * @param data - Optional data to return
package/lib/version.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export declare const VERSION = "4.0.19";
5
+ export declare const VERSION = "4.0.21";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.19",
3
+ "version": "4.0.21",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"
@@ -273,6 +273,32 @@ ion-modal ion-content {
273
273
  --overflow: hidden auto;
274
274
  }
275
275
 
276
+ /* ─── Adaptive modal ──────────────────────────────────────────────────────────
277
+ * Mobile: full-screen (sin breakpoints → sin conflicto gesture/scroll).
278
+ * Desktop (≥768px): card centrada con border-radius.
279
+ *
280
+ * Usar via ModalService.openAdaptive() o cssClass="val-modal-adaptive".
281
+ * Variante .val-modal-adaptive--wide disponible para contenido más ancho.
282
+ * ─────────────────────────────────────────────────────────────────────────── */
283
+ ion-modal.val-modal-adaptive {
284
+ --border-radius: 0;
285
+ --width: 100%;
286
+ --height: 100%;
287
+
288
+ @media (min-width: 768px) {
289
+ --border-radius: 1.5rem;
290
+ --width: 560px;
291
+ --height: min(85vh, 800px);
292
+ }
293
+ }
294
+
295
+ ion-modal.val-modal-adaptive.val-modal-adaptive--wide {
296
+ @media (min-width: 768px) {
297
+ --width: 720px;
298
+ --height: min(88vh, 900px);
299
+ }
300
+ }
301
+
276
302
  // Estilos para enlaces procesados automáticamente
277
303
  .processed-link {
278
304
  color: var(--ion-color-primary, #3880ff);