@moni-labs/moni-ui 0.4.7 → 0.4.9

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.
Files changed (96) hide show
  1. package/custom-elements.json +33 -3
  2. package/dist/browser/moni-ui.iife.min.js +29 -9
  3. package/dist/browser/moni-ui.iife.min.js.br +0 -0
  4. package/dist/browser/moni-ui.iife.min.js.gz +0 -0
  5. package/dist/browser/moni-ui.iife.min.js.map +1 -1
  6. package/dist/browser/moni-ui.min.js +1549 -1508
  7. package/dist/browser/moni-ui.min.js.br +0 -0
  8. package/dist/browser/moni-ui.min.js.gz +0 -0
  9. package/dist/browser/moni-ui.min.js.map +1 -1
  10. package/dist/cdn/chunks/{class-map-EVPcxmRq.js → class-map-C4FUGLfQ.js} +1 -1
  11. package/dist/cdn/chunks/{decorate-D4jKxi6H.js → decorate-C9xO7mby.js} +7 -0
  12. package/dist/cdn/chunks/if-defined-6foei_QT.js +1 -0
  13. package/dist/cdn/chunks/{live-DdUrWiUp.js → live-DcFRrlh7.js} +1 -1
  14. package/dist/cdn/components/moni-app-bar.js +1 -1
  15. package/dist/cdn/components/moni-badge.js +1 -1
  16. package/dist/cdn/components/moni-bottom-sheet.js +1 -1
  17. package/dist/cdn/components/moni-button-group.js +1 -1
  18. package/dist/cdn/components/moni-button-segment.js +1 -1
  19. package/dist/cdn/components/moni-button.js +1 -1
  20. package/dist/cdn/components/moni-card.js +1 -1
  21. package/dist/cdn/components/moni-carousel.js +1 -1
  22. package/dist/cdn/components/moni-checkbox.js +1 -1
  23. package/dist/cdn/components/moni-chip.js +1 -1
  24. package/dist/cdn/components/moni-color-field.js +1 -1
  25. package/dist/cdn/components/moni-context-menu.js +1 -1
  26. package/dist/cdn/components/moni-dialog.js +1 -1
  27. package/dist/cdn/components/moni-divider.js +1 -1
  28. package/dist/cdn/components/moni-expansion.js +1 -1
  29. package/dist/cdn/components/moni-fab-menu.js +1 -1
  30. package/dist/cdn/components/moni-fab.js +1 -1
  31. package/dist/cdn/components/moni-file-field.js +1 -1
  32. package/dist/cdn/components/moni-icon.js +1 -1
  33. package/dist/cdn/components/moni-list-item.js +1 -1
  34. package/dist/cdn/components/moni-list.js +1 -1
  35. package/dist/cdn/components/moni-loading-indicator.js +1 -1
  36. package/dist/cdn/components/moni-menu-item.js +1 -1
  37. package/dist/cdn/components/moni-menu.js +1 -1
  38. package/dist/cdn/components/moni-morph-modal.js +17 -4
  39. package/dist/cdn/components/moni-nav-item.js +1 -1
  40. package/dist/cdn/components/moni-nav.js +1 -1
  41. package/dist/cdn/components/moni-progress.js +1 -1
  42. package/dist/cdn/components/moni-radio.js +1 -1
  43. package/dist/cdn/components/moni-ripple.js +1 -1
  44. package/dist/cdn/components/moni-segmented-button.js +1 -1
  45. package/dist/cdn/components/moni-select-option.js +1 -1
  46. package/dist/cdn/components/moni-select.js +2 -2
  47. package/dist/cdn/components/moni-shape.js +1 -1
  48. package/dist/cdn/components/moni-side-sheet.js +1 -1
  49. package/dist/cdn/components/moni-slider.js +1 -1
  50. package/dist/cdn/components/moni-snackbar.js +1 -1
  51. package/dist/cdn/components/moni-split-button.js +1 -1
  52. package/dist/cdn/components/moni-step.js +1 -1
  53. package/dist/cdn/components/moni-stepper.js +1 -1
  54. package/dist/cdn/components/moni-switch.js +1 -1
  55. package/dist/cdn/components/moni-tab.js +1 -1
  56. package/dist/cdn/components/moni-tabs.js +1 -1
  57. package/dist/cdn/components/moni-text-field.js +2 -2
  58. package/dist/cdn/components/moni-textarea.js +2 -2
  59. package/dist/cdn/components/moni-time-picker.js +1 -1
  60. package/dist/cdn/components/moni-toolbar.js +1 -1
  61. package/dist/cdn/components/moni-tooltip.js +1 -1
  62. package/dist/cdn/components/moni-typography.js +1 -1
  63. package/dist/cdn/importmap.json +98 -98
  64. package/dist/components/_base/field-styles.d.ts.map +1 -1
  65. package/dist/components/_base/field-styles.js +7 -0
  66. package/dist/components/moni-morph-modal.d.ts +7 -0
  67. package/dist/components/moni-morph-modal.d.ts.map +1 -1
  68. package/dist/components/moni-morph-modal.js +37 -1
  69. package/dist/components/moni-select.d.ts +2 -2
  70. package/dist/components/moni-select.d.ts.map +1 -1
  71. package/dist/components/moni-select.js +2 -1
  72. package/dist/components/moni-text-field.d.ts +2 -2
  73. package/dist/components/moni-text-field.d.ts.map +1 -1
  74. package/dist/components/moni-text-field.js +2 -1
  75. package/dist/components/moni-textarea.d.ts +2 -2
  76. package/dist/components/moni-textarea.d.ts.map +1 -1
  77. package/dist/components/moni-textarea.js +2 -1
  78. package/docs/api.json +34 -4
  79. package/docs/assets/moni-select/shape--small-round.png +0 -0
  80. package/docs/assets/moni-text-field/shape--small-round.png +0 -0
  81. package/docs/assets/moni-textarea/shape--small-round.png +0 -0
  82. package/docs/components/morph-modal.md +3 -0
  83. package/docs/components/select.md +3 -1
  84. package/docs/components/text-field.md +3 -1
  85. package/docs/components/textarea.md +3 -1
  86. package/package.json +90 -90
  87. package/src/components/_base/field-styles.ts +7 -0
  88. package/src/components/moni-morph-modal.test.ts +26 -0
  89. package/src/components/moni-morph-modal.ts +33 -1
  90. package/src/components/moni-select.test.ts +8 -0
  91. package/src/components/moni-select.ts +3 -2
  92. package/src/components/moni-text-field.test.ts +8 -0
  93. package/src/components/moni-text-field.ts +3 -2
  94. package/src/components/moni-textarea.test.ts +8 -0
  95. package/src/components/moni-textarea.ts +3 -2
  96. package/dist/cdn/chunks/if-defined-DlAUOFi9.js +0 -1
package/docs/api.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@moni-labs/moni-ui",
3
- "generatedAt": "2026-08-21T21:03:00.175Z",
3
+ "generatedAt": "2026-08-22T18:22:22.206Z",
4
4
  "componentCount": 49,
5
5
  "components": [
6
6
  {
@@ -2998,6 +2998,33 @@
2998
2998
  "options": [],
2999
2999
  "reflect": true
3000
3000
  },
3001
+ {
3002
+ "name": "fullscreen",
3003
+ "attribute": "fullscreen",
3004
+ "type": "boolean",
3005
+ "default": "false",
3006
+ "description": "Fuerza al modal expandido a ocupar todo el viewport.",
3007
+ "options": [],
3008
+ "reflect": true
3009
+ },
3010
+ {
3011
+ "name": "responsiveFullscreen",
3012
+ "attribute": "responsive-fullscreen",
3013
+ "type": "boolean",
3014
+ "default": "false",
3015
+ "description": "Activa fullscreen únicamente cuando el viewport no supera el breakpoint configurado.",
3016
+ "options": [],
3017
+ "reflect": true
3018
+ },
3019
+ {
3020
+ "name": "fullscreenBreakpoint",
3021
+ "attribute": "fullscreen-breakpoint",
3022
+ "type": "number",
3023
+ "default": "600",
3024
+ "description": "Ancho máximo del viewport, en píxeles, para aplicar responsive-fullscreen.",
3025
+ "options": [],
3026
+ "reflect": true
3027
+ },
3001
3028
  {
3002
3029
  "name": "blurContent",
3003
3030
  "attribute": "blur-content",
@@ -3807,11 +3834,12 @@
3807
3834
  {
3808
3835
  "name": "shape",
3809
3836
  "attribute": "shape",
3810
- "type": "'round' | 'square' | 'no-round'",
3837
+ "type": "'round' | 'small-round' | 'square' | 'no-round'",
3811
3838
  "default": "'no-round'",
3812
3839
  "description": "Forma (radio de borde) del campo.",
3813
3840
  "options": [
3814
3841
  "round",
3842
+ "small-round",
3815
3843
  "square",
3816
3844
  "no-round"
3817
3845
  ],
@@ -5272,11 +5300,12 @@
5272
5300
  {
5273
5301
  "name": "shape",
5274
5302
  "attribute": "shape",
5275
- "type": "'round' | 'no-round'",
5303
+ "type": "'round' | 'small-round' | 'no-round'",
5276
5304
  "default": "'no-round'",
5277
5305
  "description": "Forma del radio del borde (border-radius) del campo.",
5278
5306
  "options": [
5279
5307
  "round",
5308
+ "small-round",
5280
5309
  "no-round"
5281
5310
  ],
5282
5311
  "reflect": true
@@ -5720,11 +5749,12 @@
5720
5749
  {
5721
5750
  "name": "shape",
5722
5751
  "attribute": "shape",
5723
- "type": "'round' | 'square' | 'no-round'",
5752
+ "type": "'round' | 'small-round' | 'square' | 'no-round'",
5724
5753
  "default": "'no-round'",
5725
5754
  "description": "Forma del radio del borde (border-radius) del campo.",
5726
5755
  "options": [
5727
5756
  "round",
5757
+ "small-round",
5728
5758
  "square",
5729
5759
  "no-round"
5730
5760
  ],
@@ -65,6 +65,9 @@ Las utilities aplicadas directamente al tag afectan su caja anfitriona. No uses
65
65
  | `hide-target` | `hideTarget` | `boolean` | `false` | Si es true, oculta el elemento disparador (target) mientras el modal está abierto. |
66
66
  | `cover-target` | `coverTarget` | `boolean` | `false` | Si es true, fuerza al modal a cubrir visualmente la ubicación original del target antes de expandirse. |
67
67
  | `auto-size` | `autoSize` | `boolean` | `false` | Si es true, el modal calcula automáticamente su tamaño final basándose en el contenido interno (ignora expandedWidth y expandedHeight). |
68
+ | `fullscreen` | `fullscreen` | `boolean` | `false` | Fuerza al modal expandido a ocupar todo el viewport. |
69
+ | `responsive-fullscreen` | `responsiveFullscreen` | `boolean` | `false` | Activa fullscreen únicamente cuando el viewport no supera el breakpoint configurado. |
70
+ | `fullscreen-breakpoint` | `fullscreenBreakpoint` | `number` | `600` | Ancho máximo del viewport, en píxeles, para aplicar responsive-fullscreen. |
68
71
  | `blur-content` | `blurContent` | `boolean` | `false` | Si es true, aplica un efecto de desenfoque (blur) al contenido durante la animación de entrada y salida. |
69
72
  | `debug` | `debug` | `boolean` | `false` | Muestra en consola el origen, geometría y estrategia usada por cada morph. |
70
73
 
@@ -94,7 +94,7 @@ Las utilities aplicadas directamente al tag afectan su caja anfitriona. No uses
94
94
  | `label` | `label` | `string` | `''` | Texto de la etiqueta flotante. |
95
95
  | `variant` | `variant` | `'filled' \| 'outlined'` | `'filled'` | Variante visual del campo select. |
96
96
  | `size` | `size` | `'small' \| 'medium' \| 'large' \| 'extra'` | `'medium'` | Define las dimensiones del campo select. |
97
- | `shape` | `shape` | `'round' \| 'square' \| 'no-round'` | `'no-round'` | Forma (radio de borde) del campo. |
97
+ | `shape` | `shape` | `'round' \| 'small-round' \| 'square' \| 'no-round'` | `'no-round'` | Forma (radio de borde) del campo. |
98
98
  | `disabled` | `disabled` | `boolean` | `false` | Deshabilita el campo select. |
99
99
  | `required` | `required` | `boolean` | `false` | Obliga a elegir una opción antes de enviar el formulario. El `<input>` visible es de sólo lectura, así que la validación nativa no se aplica sobre él: la restricción se declara en el host con `ElementInternals.setValidity`, que es lo que mira el formulario. |
100
100
  | `loading` | `loading` | `boolean` | `false` | Si es verdadero, muestra un indicador de carga (progreso lineal). |
@@ -195,6 +195,8 @@ Forma (radio de borde) del campo.
195
195
 
196
196
  ![moni-select — shape=round](../assets/moni-select/shape--round.png)
197
197
 
198
+ ![moni-select — shape=small-round](../assets/moni-select/shape--small-round.png)
199
+
198
200
  ![moni-select — shape=square](../assets/moni-select/shape--square.png)
199
201
 
200
202
  ![moni-select — shape=no-round](../assets/moni-select/shape--no-round.png)
@@ -91,7 +91,7 @@ Las utilities aplicadas directamente al tag afectan su caja anfitriona. No uses
91
91
  | `label` | `label` | `string` | `''` | El texto de la etiqueta flotante. |
92
92
  | `variant` | `variant` | `'filled' \| 'outlined' \| 'underlined'` | `'filled'` | Variante visual del campo de texto. |
93
93
  | `size` | `size` | `'small' \| 'medium' \| 'large' \| 'extra'` | `'medium'` | Define las dimensiones del campo de texto. |
94
- | `shape` | `shape` | `'round' \| 'no-round'` | `'no-round'` | Forma del radio del borde (border-radius) del campo. |
94
+ | `shape` | `shape` | `'round' \| 'small-round' \| 'no-round'` | `'no-round'` | Forma del radio del borde (border-radius) del campo. |
95
95
  | `type` | `type` | `'text' \| 'password' \| 'email' \| 'number' \| 'tel' \| 'url' \| 'search' \| 'date' \| 'time' \| 'datetime-local' \| 'month' \| 'week' \| 'color'` | `'text'` | El tipo de input HTML nativo. |
96
96
  | `icon` | `icon` | `string` | `''` | Nombre del icono inicial (leading) (Material Symbols). |
97
97
  | `trailing-icon` | `trailingIcon` | `string` | `''` | Nombre del icono final (trailing) (Material Symbols). |
@@ -208,6 +208,8 @@ Forma del radio del borde (border-radius) del campo.
208
208
 
209
209
  ![moni-text-field — shape=round](../assets/moni-text-field/shape--round.png)
210
210
 
211
+ ![moni-text-field — shape=small-round](../assets/moni-text-field/shape--small-round.png)
212
+
211
213
  ![moni-text-field — shape=no-round](../assets/moni-text-field/shape--no-round.png)
212
214
 
213
215
  ### `type`
@@ -88,7 +88,7 @@ Las utilities aplicadas directamente al tag afectan su caja anfitriona. No uses
88
88
  | `label` | `label` | `string` | `''` | El texto de la etiqueta flotante. |
89
89
  | `variant` | `variant` | `'filled' \| 'outlined'` | `'filled'` | Variante visual del área de texto. |
90
90
  | `size` | `size` | `'small' \| 'medium' \| 'large' \| 'extra'` | `'medium'` | Define las dimensiones del área de texto. |
91
- | `shape` | `shape` | `'round' \| 'square' \| 'no-round'` | `'no-round'` | Forma del radio del borde (border-radius) del campo. |
91
+ | `shape` | `shape` | `'round' \| 'small-round' \| 'square' \| 'no-round'` | `'no-round'` | Forma del radio del borde (border-radius) del campo. |
92
92
  | `icon` | `icon` | `string` | `''` | Nombre del icono inicial (leading) (Material Symbols). |
93
93
  | `trailing-icon` | `trailingIcon` | `string` | `''` | Nombre del icono final (trailing) (Material Symbols). |
94
94
  | `prefix` | `prefix` | `string` | `''` | Prefijo de texto corto mostrado antes del valor del input. |
@@ -182,6 +182,8 @@ Forma del radio del borde (border-radius) del campo.
182
182
 
183
183
  ![moni-textarea — shape=round](../assets/moni-textarea/shape--round.png)
184
184
 
185
+ ![moni-textarea — shape=small-round](../assets/moni-textarea/shape--small-round.png)
186
+
185
187
  ![moni-textarea — shape=square](../assets/moni-textarea/shape--square.png)
186
188
 
187
189
  ![moni-textarea — shape=no-round](../assets/moni-textarea/shape--no-round.png)
package/package.json CHANGED
@@ -1,90 +1,90 @@
1
- {
2
- "name": "@moni-labs/moni-ui",
3
- "version": "0.4.7",
4
- "private": false,
5
- "type": "module",
6
- "description": "Design system unificado para Moni — Material Design 3 Expressive, mobile-first.",
7
- "main": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "customElements": "custom-elements.json",
10
- "exports": {
11
- ".": {
12
- "types": "./dist/index.d.ts",
13
- "import": "./dist/index.js"
14
- },
15
- "./web-components": {
16
- "types": "./dist/web-components.d.ts",
17
- "import": "./dist/web-components.js"
18
- },
19
- "./browser": "./dist/browser/moni-ui.min.js",
20
- "./browser.css": "./dist/browser/moni-ui.min.css",
21
- "./cdn/importmap": "./dist/cdn/importmap.json",
22
- "./cdn/*": "./dist/cdn/components/moni-*.js",
23
- "./styles": "./dist/styles/index.css",
24
- "./styles/*": "./dist/styles/*",
25
- "./components/*.ts": "./src/components/*.ts",
26
- "./components/*": {
27
- "types": "./dist/components/*.d.ts",
28
- "import": "./dist/components/*.js"
29
- },
30
- "./actions/*": {
31
- "types": "./dist/actions/*.d.ts",
32
- "import": "./dist/actions/*.js"
33
- },
34
- "./utils/*": {
35
- "types": "./dist/utils/*.d.ts",
36
- "import": "./dist/utils/*.js"
37
- }
38
- },
39
- "publishConfig": {
40
- "access": "public"
41
- },
42
- "unpkg": "./dist/browser/moni-ui.iife.min.js",
43
- "jsdelivr": "./dist/browser/moni-ui.iife.min.js",
44
- "files": [
45
- "dist",
46
- "src",
47
- "docs",
48
- "custom-elements.json",
49
- "README.md",
50
- "package.json"
51
- ],
52
- "repository": {
53
- "type": "git",
54
- "url": "git+https://github.com/moni-spa/moni-ui.git"
55
- },
56
- "bugs": {
57
- "url": "https://github.com/moni-spa/moni-ui/issues"
58
- },
59
- "homepage": "https://github.com/moni-spa/moni-ui#readme",
60
- "peerDependencies": {
61
- "svelte": "^5.55.2",
62
- "tailwindcss": "^4.2.2"
63
- },
64
- "dependencies": {
65
- "@material/material-color-utilities": "^0.4.0",
66
- "gsap": "^3.12.7",
67
- "inputmask": "^5.0.9",
68
- "lit": "^3.3.3"
69
- },
70
- "devDependencies": {
71
- "@custom-elements-manifest/analyzer": "^0.11.0",
72
- "@tailwindcss/vite": "^4.3.1",
73
- "jsdom": "^29.1.1",
74
- "lightningcss": "^1.33.0",
75
- "typescript": "^6.0.3",
76
- "vite": "^8.0.16",
77
- "vitest": "^4.1.8"
78
- },
79
- "scripts": {
80
- "build": "node scripts/build.js",
81
- "docs": "node scripts/generate-docs.mjs",
82
- "docs:capture": "node scripts/capture-docs.mjs",
83
- "docs:all": "npm run build && npm run docs && npm run docs:capture",
84
- "docs:check": "node scripts/generate-docs.mjs --check",
85
- "analyze": "custom-elements-manifest analyze",
86
- "test": "vitest run",
87
- "test:verbose": "vitest run --reporter=verbose",
88
- "test:watch": "vitest"
89
- }
90
- }
1
+ {
2
+ "name": "@moni-labs/moni-ui",
3
+ "version": "0.4.9",
4
+ "private": false,
5
+ "type": "module",
6
+ "description": "Design system unificado para Moni — Material Design 3 Expressive, mobile-first.",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "customElements": "custom-elements.json",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ },
15
+ "./web-components": {
16
+ "types": "./dist/web-components.d.ts",
17
+ "import": "./dist/web-components.js"
18
+ },
19
+ "./browser": "./dist/browser/moni-ui.min.js",
20
+ "./browser.css": "./dist/browser/moni-ui.min.css",
21
+ "./cdn/importmap": "./dist/cdn/importmap.json",
22
+ "./cdn/*": "./dist/cdn/components/moni-*.js",
23
+ "./styles": "./dist/styles/index.css",
24
+ "./styles/*": "./dist/styles/*",
25
+ "./components/*.ts": "./src/components/*.ts",
26
+ "./components/*": {
27
+ "types": "./dist/components/*.d.ts",
28
+ "import": "./dist/components/*.js"
29
+ },
30
+ "./actions/*": {
31
+ "types": "./dist/actions/*.d.ts",
32
+ "import": "./dist/actions/*.js"
33
+ },
34
+ "./utils/*": {
35
+ "types": "./dist/utils/*.d.ts",
36
+ "import": "./dist/utils/*.js"
37
+ }
38
+ },
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "unpkg": "./dist/browser/moni-ui.iife.min.js",
43
+ "jsdelivr": "./dist/browser/moni-ui.iife.min.js",
44
+ "files": [
45
+ "dist",
46
+ "src",
47
+ "docs",
48
+ "custom-elements.json",
49
+ "README.md",
50
+ "package.json"
51
+ ],
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "git+https://github.com/moni-spa/moni-ui.git"
55
+ },
56
+ "bugs": {
57
+ "url": "https://github.com/moni-spa/moni-ui/issues"
58
+ },
59
+ "homepage": "https://github.com/moni-spa/moni-ui#readme",
60
+ "peerDependencies": {
61
+ "svelte": "^5.55.2",
62
+ "tailwindcss": "^4.2.2"
63
+ },
64
+ "dependencies": {
65
+ "@material/material-color-utilities": "^0.4.0",
66
+ "gsap": "^3.12.7",
67
+ "inputmask": "^5.0.9",
68
+ "lit": "^3.3.3"
69
+ },
70
+ "devDependencies": {
71
+ "@custom-elements-manifest/analyzer": "^0.11.0",
72
+ "@tailwindcss/vite": "^4.3.1",
73
+ "jsdom": "^29.1.1",
74
+ "lightningcss": "^1.33.0",
75
+ "typescript": "^6.0.3",
76
+ "vite": "^8.0.16",
77
+ "vitest": "^4.1.8"
78
+ },
79
+ "scripts": {
80
+ "build": "node scripts/build.js",
81
+ "docs": "node scripts/generate-docs.mjs",
82
+ "docs:capture": "node scripts/capture-docs.mjs",
83
+ "docs:all": "npm run build && npm run docs && npm run docs:capture",
84
+ "docs:check": "node scripts/generate-docs.mjs --check",
85
+ "analyze": "custom-elements-manifest analyze",
86
+ "test": "vitest run",
87
+ "test:verbose": "vitest run --reporter=verbose",
88
+ "test:watch": "vitest"
89
+ }
90
+ }
@@ -143,6 +143,13 @@ export const fieldStyles = css`
143
143
  .field[class*='round'].extra {
144
144
  border-radius: 2rem;
145
145
  }
146
+ /* Compact rounding for dense forms without falling back to square corners. */
147
+ .field.small-round,
148
+ .field.small-round.small,
149
+ .field.small-round.large,
150
+ .field.small-round.extra {
151
+ border-radius: 0.5rem;
152
+ }
146
153
 
147
154
  /* ─── Icon positioning ───────────────────────────────────────────────────── */
148
155
  /* Generic rule: absolutely positions any icon/image/svg inside the field. */
@@ -117,6 +117,32 @@ describe('moni-morph-modal', () => {
117
117
  expect(el.hasAttribute('open')).toBe(true);
118
118
  });
119
119
 
120
+ it('ocupa todo el viewport cuando fullscreen está activo', async () => {
121
+ el.fullscreen = true;
122
+ await el.updateComplete;
123
+ const rect = (el as unknown as { _computeFinalRect: (target: DOMRect) => DOMRect })
124
+ ._computeFinalRect(new DOMRect(24, 700, 56, 56));
125
+
126
+ expect(el.hasAttribute('fullscreen')).toBe(true);
127
+ expect(rect.x).toBe(0);
128
+ expect(rect.y).toBe(0);
129
+ expect(rect.width).toBe(window.innerWidth);
130
+ expect(rect.height).toBe(window.innerHeight);
131
+ expect(el.shadowRoot?.querySelector('.panel')?.classList.contains('fullscreen')).toBe(true);
132
+ });
133
+
134
+ it('aplica fullscreen responsive sólo bajo el breakpoint', () => {
135
+ el.responsiveFullscreen = true;
136
+ el.fullscreenBreakpoint = 600;
137
+ const usesFullscreen = () => (el as unknown as { _usesFullscreen: () => boolean })._usesFullscreen();
138
+
139
+ vi.stubGlobal('innerWidth', 480);
140
+ expect(usesFullscreen()).toBe(true);
141
+ vi.stubGlobal('innerWidth', 900);
142
+ expect(usesFullscreen()).toBe(false);
143
+ vi.unstubAllGlobals();
144
+ });
145
+
120
146
  it('proyecta el contenido del slot por defecto', async () => {
121
147
  const content = document.createElement('p');
122
148
  content.textContent = 'Hello';
@@ -229,6 +229,18 @@ export class MoniMorphModal extends MoniElement {
229
229
  @property({ type: Boolean, reflect: true, attribute: 'auto-size', converter: litBool })
230
230
  autoSize = false;
231
231
 
232
+ /** Fuerza al modal expandido a ocupar todo el viewport. */
233
+ @property({ type: Boolean, reflect: true, converter: litBool })
234
+ fullscreen = false;
235
+
236
+ /** Activa fullscreen únicamente cuando el viewport no supera el breakpoint configurado. */
237
+ @property({ type: Boolean, reflect: true, attribute: 'responsive-fullscreen', converter: litBool })
238
+ responsiveFullscreen = false;
239
+
240
+ /** Ancho máximo del viewport, en píxeles, para aplicar responsive-fullscreen. */
241
+ @property({ type: Number, reflect: true, attribute: 'fullscreen-breakpoint' })
242
+ fullscreenBreakpoint = 600;
243
+
232
244
  /**
233
245
  * Si es true, aplica un efecto de desenfoque (blur) al contenido durante la animación de entrada y salida.
234
246
  * @type {boolean}
@@ -1896,9 +1908,15 @@ export class MoniMorphModal extends MoniElement {
1896
1908
  el.style.height = `${rect.height}px`;
1897
1909
  }
1898
1910
 
1911
+ private _usesFullscreen(): boolean {
1912
+ if (this.fullscreen) return true;
1913
+ return this.responsiveFullscreen && typeof window !== 'undefined' && window.innerWidth <= this.fullscreenBreakpoint;
1914
+ }
1915
+
1899
1916
  private _computeFinalRect(targetRect: DOMRect, naturalSize?: { width: number; height: number }): DOMRect {
1900
1917
  const vw = window.innerWidth;
1901
1918
  const vh = window.innerHeight;
1919
+ if (this._usesFullscreen()) return new DOMRect(0, 0, vw, vh);
1902
1920
  const padding = 16;
1903
1921
 
1904
1922
  let width = this.autoSize && naturalSize ? naturalSize.width : this._parseSize(this.expandedWidth, vw);
@@ -2082,6 +2100,19 @@ export class MoniMorphModal extends MoniElement {
2082
2100
  z-index: var(--_z-index, 100);
2083
2101
  }
2084
2102
 
2103
+ .panel.fullscreen {
2104
+ border-radius: 0;
2105
+ box-shadow: none;
2106
+ }
2107
+
2108
+ .panel.fullscreen header {
2109
+ padding-block-start: max(1.25rem, env(safe-area-inset-top));
2110
+ }
2111
+
2112
+ .panel.fullscreen footer {
2113
+ padding-block-end: max(1.5rem, env(safe-area-inset-bottom));
2114
+ }
2115
+
2085
2116
  .panel-inner {
2086
2117
  display: flex;
2087
2118
  flex-direction: column;
@@ -2191,6 +2222,7 @@ export class MoniMorphModal extends MoniElement {
2191
2222
  override render() {
2192
2223
  const visible = this._visible || this.open;
2193
2224
  const headerEmpty = !this._hasHeader && !this.showCloseButton;
2225
+ const fullscreen = this._usesFullscreen();
2194
2226
  return html`
2195
2227
  ${this.hasBackdrop ? html`
2196
2228
  <div
@@ -2199,7 +2231,7 @@ export class MoniMorphModal extends MoniElement {
2199
2231
  style="${!this.modal ? 'background-color: transparent;' : ''}"
2200
2232
  ></div>
2201
2233
  ` : ''}
2202
- <div class="panel" part="panel">
2234
+ <div class="panel ${fullscreen ? 'fullscreen' : ''}" part="panel">
2203
2235
  <div class="panel-inner" part="panel-inner">
2204
2236
  <header
2205
2237
  class="${headerEmpty ? 'is-empty' : ''}"
@@ -23,6 +23,14 @@ describe('moni-select', () => {
23
23
  expect(input?.getAttribute('readonly')).toBe('');
24
24
  });
25
25
 
26
+ it('aplica la clase small-round para un redondeado compacto', async () => {
27
+ el.shape = 'small-round';
28
+ await el.updateComplete;
29
+ const field = el.shadowRoot?.querySelector('.field');
30
+ expect(field?.classList.contains('small-round')).toBe(true);
31
+ expect(field?.classList.contains('square')).toBe(false);
32
+ });
33
+
26
34
  it('analiza las opciones insertadas en slots (slotted)', async () => {
27
35
  const opt1 = document.createElement('moni-select-option');
28
36
  opt1.setAttribute('value', 'v1');
@@ -146,11 +146,11 @@ export class MoniSelect extends MoniElement {
146
146
 
147
147
  /**
148
148
  * Forma (radio de borde) del campo.
149
- * @type {'round' | 'square' | 'no-round'}
149
+ * @type {'round' | 'small-round' | 'square' | 'no-round'}
150
150
  * @default 'no-round'
151
151
  */
152
152
  @property({ reflect: true })
153
- shape: 'round' | 'square' | 'no-round' = 'no-round';
153
+ shape: 'round' | 'small-round' | 'square' | 'no-round' = 'no-round';
154
154
 
155
155
  /**
156
156
  * Deshabilita el campo select.
@@ -1694,6 +1694,7 @@ export class MoniSelect extends MoniElement {
1694
1694
  suffix: true,
1695
1695
  invalid: this.error,
1696
1696
  round: this.shape === 'round',
1697
+ 'small-round': this.shape === 'small-round',
1697
1698
  square: this.shape === 'no-round'
1698
1699
  };
1699
1700
 
@@ -86,6 +86,14 @@ describe('moni-text-field', () => {
86
86
  expect(field?.classList.contains('round')).toBe(true);
87
87
  });
88
88
 
89
+ it('aplica la clase small-round para un redondeado compacto', async () => {
90
+ el.shape = 'small-round';
91
+ await el.updateComplete;
92
+ const field = el.shadowRoot?.querySelector('.field');
93
+ expect(field?.classList.contains('small-round')).toBe(true);
94
+ expect(field?.classList.contains('square')).toBe(false);
95
+ });
96
+
89
97
  it('renderiza underlined sin fondo, contorno completo ni forma redondeada', async () => {
90
98
  el.variant = 'underlined';
91
99
  el.shape = 'round';
@@ -106,11 +106,11 @@ export class MoniTextField extends MoniElement {
106
106
 
107
107
  /**
108
108
  * Forma del radio del borde (border-radius) del campo.
109
- * @type {'round' | 'no-round'}
109
+ * @type {'round' | 'small-round' | 'no-round'}
110
110
  * @default 'no-round'
111
111
  */
112
112
  @property({ reflect: true })
113
- shape: 'round' | 'no-round' = 'no-round';
113
+ shape: 'round' | 'small-round' | 'no-round' = 'no-round';
114
114
 
115
115
  /**
116
116
  * El tipo de input HTML nativo.
@@ -544,6 +544,7 @@ export class MoniTextField extends MoniElement {
544
544
  'suffix-action-field': Boolean(this.suffixButtonIcon) || this._hasSuffixSlot,
545
545
  invalid: this.error,
546
546
  round: this.shape === 'round' && this.variant !== 'underlined',
547
+ 'small-round': this.shape === 'small-round' && this.variant !== 'underlined',
547
548
  square: this.shape === 'no-round'
548
549
  };
549
550
  const placeholder = this.placeholder || (this.label ? ' ' : '');
@@ -97,6 +97,14 @@ describe('moni-textarea', () => {
97
97
  expect(field?.classList.contains('round')).toBe(true);
98
98
  });
99
99
 
100
+ it('aplica la clase small-round para un redondeado compacto', async () => {
101
+ el.shape = 'small-round';
102
+ await el.updateComplete;
103
+ const field = el.shadowRoot?.querySelector('.field');
104
+ expect(field?.classList.contains('small-round')).toBe(true);
105
+ expect(field?.classList.contains('square')).toBe(false);
106
+ });
107
+
100
108
  it('no aplica la clase de forma (shape) en el contenedor de campo para shape=square', async () => {
101
109
  el.shape = 'square';
102
110
  await el.updateComplete;
@@ -98,11 +98,11 @@ export class MoniTextarea extends MoniElement {
98
98
 
99
99
  /**
100
100
  * Forma del radio del borde (border-radius) del campo.
101
- * @type {'round' | 'square' | 'no-round'}
101
+ * @type {'round' | 'small-round' | 'square' | 'no-round'}
102
102
  * @default 'no-round'
103
103
  */
104
104
  @property({ reflect: true })
105
- shape: 'round' | 'square' | 'no-round' = 'no-round';
105
+ shape: 'round' | 'small-round' | 'square' | 'no-round' = 'no-round';
106
106
 
107
107
  /**
108
108
  * Nombre del icono inicial (leading) (Material Symbols).
@@ -364,6 +364,7 @@ export class MoniTextarea extends MoniElement {
364
364
  suffix: hasTrailing,
365
365
  invalid: this.error,
366
366
  round: this.shape === 'round',
367
+ 'small-round': this.shape === 'small-round',
367
368
  square: this.shape === 'no-round'
368
369
  };
369
370
  const placeholder = this.placeholder || (this.label ? ' ' : '');
@@ -1 +0,0 @@
1
- import{c as e}from"./decorate-D4jKxi6H.js";var t=t=>t??e;export{t};