@moni-labs/moni-ui 0.3.0 → 0.3.2

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 (251) hide show
  1. package/custom-elements.json +5230 -1007
  2. package/dist/components/_base/moni-element.d.ts +16 -9
  3. package/dist/components/_base/moni-element.d.ts.map +1 -1
  4. package/dist/components/_base/moni-element.js +63 -9
  5. package/dist/components/index.js +2 -2
  6. package/dist/components/loading-shapes.d.ts +19 -0
  7. package/dist/components/loading-shapes.d.ts.map +1 -1
  8. package/dist/components/loading-shapes.js +19 -0
  9. package/dist/components/moni-app-bar.d.ts +72 -62
  10. package/dist/components/moni-app-bar.d.ts.map +1 -1
  11. package/dist/components/moni-app-bar.js +72 -62
  12. package/dist/components/moni-badge.d.ts +64 -65
  13. package/dist/components/moni-badge.d.ts.map +1 -1
  14. package/dist/components/moni-badge.js +64 -66
  15. package/dist/components/moni-bottom-sheet.d.ts +129 -61
  16. package/dist/components/moni-bottom-sheet.d.ts.map +1 -1
  17. package/dist/components/moni-bottom-sheet.js +217 -131
  18. package/dist/components/moni-button-group.d.ts +107 -29
  19. package/dist/components/moni-button-group.d.ts.map +1 -1
  20. package/dist/components/moni-button-group.js +107 -29
  21. package/dist/components/moni-button-segment.d.ts +53 -12
  22. package/dist/components/moni-button-segment.d.ts.map +1 -1
  23. package/dist/components/moni-button-segment.js +53 -12
  24. package/dist/components/moni-button.d.ts +116 -38
  25. package/dist/components/moni-button.d.ts.map +1 -1
  26. package/dist/components/moni-button.js +128 -38
  27. package/dist/components/moni-card.d.ts +68 -50
  28. package/dist/components/moni-card.d.ts.map +1 -1
  29. package/dist/components/moni-card.js +68 -50
  30. package/dist/components/moni-carousel.d.ts +484 -53
  31. package/dist/components/moni-carousel.d.ts.map +1 -1
  32. package/dist/components/moni-carousel.js +1024 -245
  33. package/dist/components/moni-checkbox.d.ts +49 -46
  34. package/dist/components/moni-checkbox.d.ts.map +1 -1
  35. package/dist/components/moni-checkbox.js +55 -48
  36. package/dist/components/moni-chip.d.ts +100 -33
  37. package/dist/components/moni-chip.d.ts.map +1 -1
  38. package/dist/components/moni-chip.js +104 -34
  39. package/dist/components/moni-color-field.d.ts +99 -24
  40. package/dist/components/moni-color-field.d.ts.map +1 -1
  41. package/dist/components/moni-color-field.js +99 -24
  42. package/dist/components/moni-context-menu.d.ts +72 -26
  43. package/dist/components/moni-context-menu.d.ts.map +1 -1
  44. package/dist/components/moni-context-menu.js +76 -30
  45. package/dist/components/moni-dialog.d.ts +84 -59
  46. package/dist/components/moni-dialog.d.ts.map +1 -1
  47. package/dist/components/moni-dialog.js +105 -58
  48. package/dist/components/moni-divider.d.ts +39 -27
  49. package/dist/components/moni-divider.d.ts.map +1 -1
  50. package/dist/components/moni-divider.js +42 -30
  51. package/dist/components/moni-expansion.d.ts +32 -22
  52. package/dist/components/moni-expansion.d.ts.map +1 -1
  53. package/dist/components/moni-expansion.js +32 -22
  54. package/dist/components/moni-fab-menu.d.ts +61 -23
  55. package/dist/components/moni-fab-menu.d.ts.map +1 -1
  56. package/dist/components/moni-fab-menu.js +69 -31
  57. package/dist/components/moni-fab.d.ts +86 -28
  58. package/dist/components/moni-fab.d.ts.map +1 -1
  59. package/dist/components/moni-fab.js +92 -34
  60. package/dist/components/moni-file-field.d.ts +118 -30
  61. package/dist/components/moni-file-field.d.ts.map +1 -1
  62. package/dist/components/moni-file-field.js +118 -30
  63. package/dist/components/moni-icon.d.ts +40 -35
  64. package/dist/components/moni-icon.d.ts.map +1 -1
  65. package/dist/components/moni-icon.js +43 -38
  66. package/dist/components/moni-list-item.d.ts +46 -33
  67. package/dist/components/moni-list-item.d.ts.map +1 -1
  68. package/dist/components/moni-list-item.js +61 -41
  69. package/dist/components/moni-list.d.ts +30 -20
  70. package/dist/components/moni-list.d.ts.map +1 -1
  71. package/dist/components/moni-list.js +36 -21
  72. package/dist/components/moni-loading-indicator.d.ts +54 -22
  73. package/dist/components/moni-loading-indicator.d.ts.map +1 -1
  74. package/dist/components/moni-loading-indicator.js +54 -22
  75. package/dist/components/moni-menu-item.d.ts +23 -16
  76. package/dist/components/moni-menu-item.d.ts.map +1 -1
  77. package/dist/components/moni-menu-item.js +23 -16
  78. package/dist/components/moni-menu.d.ts +81 -28
  79. package/dist/components/moni-menu.d.ts.map +1 -1
  80. package/dist/components/moni-menu.js +81 -30
  81. package/dist/components/moni-morph-modal.d.ts +141 -0
  82. package/dist/components/moni-morph-modal.d.ts.map +1 -1
  83. package/dist/components/moni-morph-modal.js +295 -58
  84. package/dist/components/moni-nav-item.d.ts +59 -29
  85. package/dist/components/moni-nav-item.d.ts.map +1 -1
  86. package/dist/components/moni-nav-item.js +59 -29
  87. package/dist/components/moni-nav.d.ts +94 -35
  88. package/dist/components/moni-nav.d.ts.map +1 -1
  89. package/dist/components/moni-nav.js +94 -35
  90. package/dist/components/moni-progress.d.ts +99 -55
  91. package/dist/components/moni-progress.d.ts.map +1 -1
  92. package/dist/components/moni-progress.js +99 -55
  93. package/dist/components/moni-radio.d.ts +62 -50
  94. package/dist/components/moni-radio.d.ts.map +1 -1
  95. package/dist/components/moni-radio.js +65 -52
  96. package/dist/components/moni-ripple.d.ts +74 -59
  97. package/dist/components/moni-ripple.d.ts.map +1 -1
  98. package/dist/components/moni-ripple.js +74 -59
  99. package/dist/components/moni-segmented-button.d.ts +91 -16
  100. package/dist/components/moni-segmented-button.d.ts.map +1 -1
  101. package/dist/components/moni-segmented-button.js +94 -17
  102. package/dist/components/moni-select-option.d.ts +30 -23
  103. package/dist/components/moni-select-option.d.ts.map +1 -1
  104. package/dist/components/moni-select-option.js +30 -23
  105. package/dist/components/moni-select.d.ts +300 -35
  106. package/dist/components/moni-select.d.ts.map +1 -1
  107. package/dist/components/moni-select.js +323 -39
  108. package/dist/components/moni-side-sheet.d.ts +94 -32
  109. package/dist/components/moni-side-sheet.d.ts.map +1 -1
  110. package/dist/components/moni-side-sheet.js +94 -32
  111. package/dist/components/moni-slider.d.ts +152 -41
  112. package/dist/components/moni-slider.d.ts.map +1 -1
  113. package/dist/components/moni-slider.js +154 -42
  114. package/dist/components/moni-snackbar.d.ts +53 -43
  115. package/dist/components/moni-snackbar.d.ts.map +1 -1
  116. package/dist/components/moni-snackbar.js +53 -43
  117. package/dist/components/moni-split-button.d.ts +63 -18
  118. package/dist/components/moni-split-button.d.ts.map +1 -1
  119. package/dist/components/moni-split-button.js +63 -18
  120. package/dist/components/moni-step.d.ts +36 -24
  121. package/dist/components/moni-step.d.ts.map +1 -1
  122. package/dist/components/moni-step.js +41 -29
  123. package/dist/components/moni-stepper.d.ts +64 -27
  124. package/dist/components/moni-stepper.d.ts.map +1 -1
  125. package/dist/components/moni-stepper.js +72 -34
  126. package/dist/components/moni-switch.d.ts +57 -46
  127. package/dist/components/moni-switch.d.ts.map +1 -1
  128. package/dist/components/moni-switch.js +59 -47
  129. package/dist/components/moni-tab.d.ts +26 -18
  130. package/dist/components/moni-tab.d.ts.map +1 -1
  131. package/dist/components/moni-tab.js +29 -21
  132. package/dist/components/moni-tabs.d.ts +34 -28
  133. package/dist/components/moni-tabs.d.ts.map +1 -1
  134. package/dist/components/moni-tabs.js +34 -28
  135. package/dist/components/moni-text-field.d.ts +139 -29
  136. package/dist/components/moni-text-field.d.ts.map +1 -1
  137. package/dist/components/moni-text-field.js +157 -31
  138. package/dist/components/moni-textarea.d.ts +127 -29
  139. package/dist/components/moni-textarea.d.ts.map +1 -1
  140. package/dist/components/moni-textarea.js +131 -32
  141. package/dist/components/moni-time-picker.d.ts +114 -24
  142. package/dist/components/moni-time-picker.d.ts.map +1 -1
  143. package/dist/components/moni-time-picker.js +127 -33
  144. package/dist/components/moni-toolbar.d.ts +37 -23
  145. package/dist/components/moni-toolbar.d.ts.map +1 -1
  146. package/dist/components/moni-toolbar.js +37 -23
  147. package/dist/components/moni-tooltip.d.ts +100 -36
  148. package/dist/components/moni-tooltip.d.ts.map +1 -1
  149. package/dist/components/moni-tooltip.js +104 -40
  150. package/dist/components/moni-typography.d.ts +68 -30
  151. package/dist/components/moni-typography.d.ts.map +1 -1
  152. package/dist/components/moni-typography.js +70 -32
  153. package/dist/styles/tokens.css +7 -7
  154. package/dist/types/events.d.ts +17 -0
  155. package/dist/types/events.d.ts.map +1 -0
  156. package/dist/types/events.js +1 -0
  157. package/dist/utils/event-emitter.d.ts +13 -0
  158. package/dist/utils/event-emitter.d.ts.map +1 -0
  159. package/dist/utils/event-emitter.js +13 -0
  160. package/package.json +2 -1
  161. package/src/components/_base/moni-element.ts +73 -9
  162. package/src/components/index.ts +2 -2
  163. package/src/components/loading-shapes.ts +19 -0
  164. package/src/components/moni-app-bar.test.ts +10 -10
  165. package/src/components/moni-app-bar.ts +72 -62
  166. package/src/components/moni-badge.ts +64 -66
  167. package/src/components/moni-bottom-sheet.test.ts +39 -45
  168. package/src/components/moni-bottom-sheet.ts +222 -131
  169. package/src/components/moni-button-group.test.ts +14 -14
  170. package/src/components/moni-button-group.ts +107 -29
  171. package/src/components/moni-button-segment.ts +53 -12
  172. package/src/components/moni-button.test.ts +28 -26
  173. package/src/components/moni-button.ts +139 -39
  174. package/src/components/moni-card.test.ts +6 -6
  175. package/src/components/moni-card.ts +70 -50
  176. package/src/components/moni-carousel.test.ts +12 -12
  177. package/src/components/moni-carousel.ts +1129 -269
  178. package/src/components/moni-checkbox.test.ts +7 -7
  179. package/src/components/moni-checkbox.ts +62 -48
  180. package/src/components/moni-chip.test.ts +17 -17
  181. package/src/components/moni-chip.ts +112 -34
  182. package/src/components/moni-color-field.test.ts +5 -5
  183. package/src/components/moni-color-field.ts +108 -24
  184. package/src/components/moni-context-menu.test.ts +11 -11
  185. package/src/components/moni-context-menu.ts +76 -30
  186. package/src/components/moni-dialog.ts +108 -59
  187. package/src/components/moni-divider.test.ts +4 -4
  188. package/src/components/moni-divider.ts +42 -30
  189. package/src/components/moni-expansion.ts +32 -22
  190. package/src/components/moni-fab-menu.test.ts +11 -11
  191. package/src/components/moni-fab-menu.ts +69 -31
  192. package/src/components/moni-fab.test.ts +16 -16
  193. package/src/components/moni-fab.ts +100 -34
  194. package/src/components/moni-file-field.test.ts +8 -8
  195. package/src/components/moni-file-field.ts +132 -30
  196. package/src/components/moni-icon.test.ts +11 -11
  197. package/src/components/moni-icon.ts +43 -38
  198. package/src/components/moni-list-item.test.ts +10 -10
  199. package/src/components/moni-list-item.ts +61 -41
  200. package/src/components/moni-list.ts +37 -21
  201. package/src/components/moni-loading-indicator.test.ts +3 -3
  202. package/src/components/moni-loading-indicator.ts +54 -22
  203. package/src/components/moni-menu-item.ts +23 -16
  204. package/src/components/moni-menu.test.ts +7 -7
  205. package/src/components/moni-menu.ts +87 -30
  206. package/src/components/moni-morph-modal.test.ts +18 -17
  207. package/src/components/moni-morph-modal.ts +327 -60
  208. package/src/components/moni-nav-item.ts +59 -29
  209. package/src/components/moni-nav.test.ts +11 -11
  210. package/src/components/moni-nav.ts +94 -35
  211. package/src/components/moni-progress.test.ts +9 -9
  212. package/src/components/moni-progress.ts +100 -56
  213. package/src/components/moni-radio.test.ts +8 -8
  214. package/src/components/moni-radio.ts +71 -51
  215. package/src/components/moni-ripple.ts +74 -59
  216. package/src/components/moni-segmented-button.test.ts +4 -4
  217. package/src/components/moni-segmented-button.ts +94 -17
  218. package/src/components/moni-select-option.ts +30 -23
  219. package/src/components/moni-select.test.ts +11 -11
  220. package/src/components/moni-select.ts +361 -50
  221. package/src/components/moni-side-sheet.test.ts +7 -7
  222. package/src/components/moni-side-sheet.ts +94 -32
  223. package/src/components/moni-slider.test.ts +7 -7
  224. package/src/components/moni-slider.ts +165 -42
  225. package/src/components/moni-snackbar.test.ts +8 -8
  226. package/src/components/moni-snackbar.ts +53 -43
  227. package/src/components/moni-split-button.ts +63 -18
  228. package/src/components/moni-step.test.ts +7 -7
  229. package/src/components/moni-step.ts +41 -29
  230. package/src/components/moni-stepper.test.ts +7 -7
  231. package/src/components/moni-stepper.ts +72 -34
  232. package/src/components/moni-switch.test.ts +12 -12
  233. package/src/components/moni-switch.ts +66 -47
  234. package/src/components/moni-tab.test.ts +5 -5
  235. package/src/components/moni-tab.ts +29 -21
  236. package/src/components/moni-tabs.ts +34 -28
  237. package/src/components/moni-text-field.test.ts +13 -13
  238. package/src/components/moni-text-field.ts +181 -30
  239. package/src/components/moni-textarea.test.ts +17 -17
  240. package/src/components/moni-textarea.ts +155 -31
  241. package/src/components/moni-time-picker.test.ts +5 -5
  242. package/src/components/moni-time-picker.ts +128 -33
  243. package/src/components/moni-toolbar.test.ts +8 -8
  244. package/src/components/moni-toolbar.ts +37 -23
  245. package/src/components/moni-tooltip.test.ts +15 -15
  246. package/src/components/moni-tooltip.ts +107 -40
  247. package/src/components/moni-typography.test.ts +10 -10
  248. package/src/components/moni-typography.ts +73 -32
  249. package/src/styles/tokens.css +7 -7
  250. package/src/types/events.ts +17 -0
  251. package/src/utils/event-emitter.ts +26 -0
@@ -10,34 +10,34 @@ import { customElement, property } from 'lit/decorators.js';
10
10
  import { MoniElement, sharedStyles } from './_base/index.js';
11
11
 
12
12
  /**
13
- * Material Design 3 App Bar component.
13
+ * Componente Material Design 3 App Bar.
14
14
  *
15
- * App bars provide navigation and action controls at the top (or bottom) of a
16
- * screen. They are positioned sticky by default so they remain visible as the
17
- * user scrolls through content.
15
+ * Las barras de aplicación proporcionan navegación y controles de acción en la parte superior (o inferior) de una
16
+ * pantalla. Se posicionan fijas (sticky) por defecto para que permanezcan visibles mientras el
17
+ * usuario hace scroll a través del contenido.
18
18
  *
19
- * **M3 spec reference:** `m3-docs/components/app-bars/specs.md`
19
+ * **Referencia de la especificación M3:** `m3-docs/components/app-bars/specs.md`
20
20
  *
21
- * **Placement:**
22
- * - `top` (default) — 64dp header fixed above page content. Uses `position: sticky`
23
- * with `inset-block-start: 0` so it stays at the top of the scroll container.
24
- * - `bottom` — Mobile navigation footer anchored to the bottom of the viewport.
25
- * Ideal for housing primary navigation icons and an optional FAB.
21
+ * **Posicionamiento:**
22
+ * - `top` (por defecto) — Encabezado de 64dp fijo arriba del contenido de la página. Usa `position: sticky`
23
+ * con `inset-block-start: 0` para que se mantenga en la parte superior del contenedor.
24
+ * - `bottom` — Pie de navegación móvil anclado a la parte inferior de la ventana.
25
+ * Ideal para albergar iconos de navegación primarios y un botón FAB opcional.
26
26
  *
27
- * **Variants:**
28
- * - `standard` — Flat surface (no shadow) when content is at the top. Best for most UIs.
29
- * - `floating` — Always elevated with `--elevate2` shadow. Use when the bar visually
30
- * floats above the content regardless of scroll position.
27
+ * **Variantes:**
28
+ * - `standard` — Superficie plana (sin sombra) cuando el contenido está arriba. Ideal para la mayoría de UIs.
29
+ * - `floating` — Siempre elevada con sombra `--elevate2`. Úsalo cuando la barra visualmente
30
+ * flota sobre el contenido independientemente de la posición del scroll.
31
31
  *
32
- * **Sizes:**
33
- * - `default` — 64dp (4rem) tall. Standard for most use cases.
34
- * - `prominent` — 152dp (9.5rem) tall. Use when a subtitle or expanded area is needed.
35
- * The `subtitle` attribute is only rendered in this size.
32
+ * **Tamaños:**
33
+ * - `default` — 64dp (4rem) de alto. Estándar para la mayoría de casos de uso.
34
+ * - `prominent` — 152dp (9.5rem) de alto. Úsalo cuando se necesita un subtítulo o un área expandida.
35
+ * El atributo `subtitle` solo se renderiza en este tamaño.
36
36
  *
37
37
  * @example
38
38
  * ```html
39
- * <!-- Top app bar with navigation icon and action buttons -->
40
- * <moni-app-bar title="Settings">
39
+ * <!-- Top app bar con icono de navegación y botones de acción -->
40
+ * <moni-app-bar title="Ajustes">
41
41
  * <moni-button slot="leading" shape="circle" variant="text" icon="menu"></moni-button>
42
42
  * <moni-button slot="trailing" shape="circle" variant="text" icon="search"></moni-button>
43
43
  * <moni-button slot="trailing" shape="circle" variant="text" icon="more_vert"></moni-button>
@@ -46,30 +46,30 @@ import { MoniElement, sharedStyles } from './_base/index.js';
46
46
  *
47
47
  * @example
48
48
  * ```html
49
- * <!-- Prominent app bar with subtitle -->
50
- * <moni-app-bar size="prominent" title="Inbox" subtitle="12 unread messages" elevated>
49
+ * <!-- App bar prominente con subtítulo -->
50
+ * <moni-app-bar size="prominent" title="Bandeja de entrada" subtitle="12 mensajes no leídos" elevated>
51
51
  * </moni-app-bar>
52
52
  * ```
53
53
  *
54
- * @slot leading - Navigation icon(s) placed on the leading (start) edge.
55
- * @slot trailing - Action icon(s) placed on the trailing (end) edge.
56
- * @slot fab - FAB anchored to the trailing edge (bottom placement only).
57
- * @slot default - Additional content (e.g. a tab bar below the title row).
54
+ * @slot leading - Icono(s) de navegación colocados en el borde inicial (start).
55
+ * @slot trailing - Icono(s) de acción colocados en el borde final (end).
56
+ * @slot fab - FAB anclado al borde final (solo con posición inferior).
57
+ * @slot default - Contenido adicional (ej. una barra de pestañas debajo de la fila del título).
58
58
  *
59
- * @csspart bar - The inner grid container.
60
- * @csspart leading - The leading slot wrapper.
61
- * @csspart trailing - The trailing slot wrapper.
62
- * @csspart title - The title text element.
63
- * @csspart subtitle - The subtitle text element (prominent size only).
64
- * @csspart actions - The actions slot wrapper (prominent size only).
59
+ * @csspart bar - El contenedor grid interno.
60
+ * @csspart leading - El envoltorio del slot leading.
61
+ * @csspart trailing - El envoltorio del slot trailing.
62
+ * @csspart title - El elemento de texto del título.
63
+ * @csspart subtitle - El elemento de texto del subtítulo (solo tamaño prominente).
64
+ * @csspart actions - El envoltorio de las acciones (solo tamaño prominente).
65
65
  */
66
66
  @customElement('moni-app-bar')
67
67
  export class MoniAppBar extends MoniElement {
68
68
  /**
69
- * Determines whether the bar is placed at the top or bottom of the viewport.
69
+ * Determina si la barra se coloca en la parte superior o inferior de la pantalla.
70
70
  *
71
- * - `'top'` (default) — Sticky header at the top of the scroll container.
72
- * - `'bottom'` — Fixed footer; primarily used for mobile bottom navigation patterns.
71
+ * - `'top'` (por defecto) — Encabezado pegajoso (sticky) en la parte superior del contenedor de scroll.
72
+ * - `'bottom'` — Pie fijo; usado principalmente para patrones de navegación inferior móvil.
73
73
  *
74
74
  * @default 'top'
75
75
  */
@@ -77,11 +77,11 @@ export class MoniAppBar extends MoniElement {
77
77
  placement: 'top' | 'bottom' = 'top';
78
78
 
79
79
  /**
80
- * Visual variant of the app bar.
80
+ * Variante visual de la app bar.
81
81
  *
82
- * - `'standard'` (default) — Flat surface. No shadow at rest; gains shadow
83
- * programmatically via the `elevated` attribute when content scrolls beneath it.
84
- * - `'floating'` — Permanently elevated with `--elevate2` box-shadow.
82
+ * - `'standard'` (por defecto) — Superficie plana. Sin sombra en reposo; gana sombra
83
+ * programáticamente a través del atributo `elevated` cuando el contenido se desplaza por debajo de ella.
84
+ * - `'floating'` — Permanentemente elevada con sombra `--elevate2`.
85
85
  *
86
86
  * @default 'standard'
87
87
  */
@@ -89,11 +89,11 @@ export class MoniAppBar extends MoniElement {
89
89
  variant: 'standard' | 'floating' = 'standard';
90
90
 
91
91
  /**
92
- * Height variant of the app bar.
92
+ * Variante de altura de la app bar.
93
93
  *
94
- * - `'default'` — 64dp (4rem). Standard M3 top app bar height.
95
- * - `'prominent'` — 152dp (9.5rem). Use when showing a subtitle or when
96
- * extra vertical space is needed for a contextual action row.
94
+ * - `'default'` — 64dp (4rem). Altura estándar de la top app bar de M3.
95
+ * - `'prominent'` — 152dp (9.5rem). Úsalo cuando se muestra un subtítulo o cuando
96
+ * se necesita espacio vertical adicional para una fila de acciones contextuales.
97
97
  *
98
98
  * @default 'default'
99
99
  */
@@ -101,32 +101,32 @@ export class MoniAppBar extends MoniElement {
101
101
  size: 'default' | 'prominent' = 'default';
102
102
 
103
103
  /**
104
- * Title text displayed in the center of the app bar.
104
+ * Texto del título mostrado en el centro de la app bar.
105
105
  *
106
- * The title is center-aligned per M3 spec. Long titles are truncated with
107
- * an ellipsis. For semantic HTML, the consumer should also provide an `<h1>`
108
- * in the page content that matches this title.
106
+ * El título está alineado al centro según la especificación de M3. Los títulos largos se truncan con
107
+ * puntos suspensivos. Para un HTML semántico, el consumidor también debería proporcionar un `<h1>`
108
+ * en el contenido de la página que coincida con este título.
109
109
  *
110
110
  * @default ''
111
111
  */
112
112
  @property({ reflect: true }) title = '';
113
113
 
114
114
  /**
115
- * Optional subtitle displayed below the title.
115
+ * Subtítulo opcional mostrado debajo del título.
116
116
  *
117
- * Only rendered when `size="prominent"`. Provides secondary context
118
- * (e.g. folder name, item count, description).
117
+ * Solo se renderiza cuando `size="prominent"`. Proporciona contexto secundario
118
+ * (ej. nombre de carpeta, recuento de elementos, descripción).
119
119
  *
120
120
  * @default ''
121
121
  */
122
122
  @property({ reflect: true }) subtitle = '';
123
123
 
124
124
  /**
125
- * When present, applies `--elevate2` box-shadow to signal that content has
126
- * scrolled beneath the bar.
125
+ * Cuando está presente, aplica una sombra `--elevate2` para señalar que el contenido se
126
+ * ha desplazado por debajo de la barra.
127
127
  *
128
- * Consumers are responsible for toggling this attribute reactively based on
129
- * the scroll position of the main content area:
128
+ * Los consumidores son responsables de alternar este atributo reactivamente basándose en
129
+ * la posición de desplazamiento (scroll) del área de contenido principal:
130
130
  * ```ts
131
131
  * container.addEventListener('scroll', () => {
132
132
  * appBar.elevated = container.scrollTop > 0;
@@ -245,16 +245,26 @@ export class MoniAppBar extends MoniElement {
245
245
  ];
246
246
 
247
247
  /**
248
- * Renders the app bar grid layout.
248
+ * Renderiza el diseño de CSS Grid de 3 columnas de la app bar.
249
249
  *
250
- * The inner `.bar` element uses a 3-column CSS grid:
251
- * - Column 1: leading slot (navigation icon).
252
- * - Column 2: title (center-aligned, fills remaining space).
253
- * - Column 3: trailing slot (action icons).
250
+ * **Anatomía del Grid (`grid-template-columns: auto 1fr auto`):**
251
+ * - Column 1 (`.leading`) auto-width; contains the navigation icon slot.
252
+ * - Column 2 (`.title`) — `1fr` flex-growing center column; the title is
253
+ * center-aligned via `text-align: center`.
254
+ * - Column 3 (`.trailing`) — auto-width; contains action icon slots.
254
255
  *
255
- * In `prominent` size, a subtitle row and an actions row are appended
256
- * conditionally. The subtitle only renders when the `subtitle` attribute
257
- * is non-empty; the actions slot always renders for prominent bars.
256
+ * **Prominent mode extensions (`size='prominent'`):**
257
+ * - A subtitle element is conditionally rendered in grid row 3 below the title.
258
+ * - An `actions` slot (grid-column: 1 / -1) spans the full width of row 3,
259
+ * allowing a contextual action row (e.g., a tab bar or search field) below
260
+ * the title/subtitle pair.
261
+ * - `hasSubtitle` gates the subtitle element to avoid an empty DOM node.
262
+ * - `hasActions` is always true in `prominent` mode (the slot itself is empty
263
+ * unless content is slotted by the consumer).
264
+ *
265
+ * **FAB slot:**
266
+ * The `fab` named slot is absolutely positioned via CSS (see `::slotted([slot='fab'])`)
267
+ * to the bottom-end of the bar, supporting the M3 bottom app bar + FAB pattern.
258
268
  */
259
269
  override render() {
260
270
  const hasSubtitle = this.size === 'prominent' && Boolean(this.subtitle);
@@ -10,26 +10,26 @@ import { customElement, property } from 'lit/decorators.js';
10
10
  import { MoniElement, sharedStyles } from './_base/index.js';
11
11
 
12
12
  /**
13
- * Material Design 3 Badge component.
13
+ * Componente Material Design 3 Badge.
14
14
  *
15
- * Badges are small status descriptors anchored to a parent element, used to
16
- * convey supplementary information such as a notification count, online
17
- * status, or selection indicator.
15
+ * Los badges son pequeños descriptores de estado anclados a un elemento padre, usados para
16
+ * transmitir información suplementaria como un conteo de notificaciones, estado
17
+ * en línea, o indicador de selección.
18
18
  *
19
- * **Positioning contract:**
20
- * The badge uses `position: absolute` and anchors to the parent element.
21
- * On `connectedCallback`, if the parent's computed `position` is `'static'`,
22
- * the badge automatically sets `parent.style.position = 'relative'`.
23
- * Consumers do not need to manually add `position: relative` to the parent.
19
+ * **Contrato de posicionamiento:**
20
+ * El badge usa `position: absolute` y se ancla al elemento padre.
21
+ * En `connectedCallback`, si el `position` computado del padre es `'static'`,
22
+ * el badge automáticamente establece `parent.style.position = 'relative'`.
23
+ * Los consumidores no necesitan añadir manualmente `position: relative` al padre.
24
24
  *
25
- * **Rendering model:**
26
- * The `:host` displays as `contents`, making it transparent to layout.
27
- * Only the inner `.badge` span is visually rendered. This allows the badge
28
- * to be dropped inside any element without affecting its layout flow.
25
+ * **Modelo de renderizado:**
26
+ * El `:host` se muestra como `contents`, haciéndolo transparente para el layout.
27
+ * Solo el span interior `.badge` se renderiza visualmente. Esto permite que el badge
28
+ * se inserte dentro de cualquier elemento sin afectar su flujo de layout.
29
29
  *
30
30
  * @example
31
31
  * ```html
32
- * <!-- Notification badge on a button -->
32
+ * <!-- Badge de notificación en un botón -->
33
33
  * <div style="position: relative; display: inline-flex;">
34
34
  * <moni-button icon="notifications" variant="text"></moni-button>
35
35
  * <moni-badge value="5"></moni-badge>
@@ -38,37 +38,37 @@ import { MoniElement, sharedStyles } from './_base/index.js';
38
38
  *
39
39
  * @example
40
40
  * ```html
41
- * <!-- Inline dot badge for status -->
41
+ * <!-- Badge de punto en línea para estado -->
42
42
  * <moni-badge shape="min" color="primary" inline></moni-badge>
43
- * Online
43
+ * Conectado
44
44
  * ```
45
45
  *
46
- * @csspart badge - The badge `<span>` element. Override `background-color`,
47
- * `color`, or `border-radius` to customize appearance.
46
+ * @csspart badge - El elemento `<span>` del badge. Sobrescribe `background-color`,
47
+ * `color`, o `border-radius` para personalizar la apariencia.
48
48
  */
49
49
  @customElement('moni-badge')
50
50
  export class MoniBadge extends MoniElement {
51
51
  /**
52
- * Text content of the badge label.
52
+ * Contenido de texto de la etiqueta del badge.
53
53
  *
54
- * Also accepts slotted contentthe default slot inside the badge span
55
- * falls back to this value when no children are slotted.
56
- * Use an empty string with `shape="min"` to render a dot-only badge.
54
+ * También acepta contenido en el slot el slot por defecto dentro del span del badge
55
+ * usa este valor cuando no hay hijos proporcionados en el slot.
56
+ * Usa un string vacío con `shape="min"` para renderizar un badge de solo punto.
57
57
  *
58
58
  * @default ''
59
59
  */
60
60
  @property({ reflect: true }) value = '';
61
61
 
62
62
  /**
63
- * Anchor position relative to the parent element's edges.
63
+ * Posición de anclaje relativa a los bordes del elemento padre.
64
64
  *
65
- * Uses `inset: 50% auto auto 50%` as the base and adjusts translation:
66
- * - `''` (default) — top-right corner (translate: 0, -100%).
67
- * - `'top'` — same as default, explicit alias.
68
- * - `'bottom'` — bottom-right corner (translate: 0, 0).
69
- * - `'left'` — top-left corner (translate: -100%, -100%).
70
- * - `'right'` — top-right corner (translate: 0, -100%).
71
- * - `'none'` — disables absolute positioning; see also the `inline` attribute.
65
+ * Usa `inset: 50% auto auto 50%` como base y ajusta la traslación:
66
+ * - `''` (por defecto) — esquina superior derecha (translate: 0, -100%).
67
+ * - `'top'` — igual que por defecto, alias explícito.
68
+ * - `'bottom'` — esquina inferior derecha (translate: 0, 0).
69
+ * - `'left'` — esquina superior izquierda (translate: -100%, -100%).
70
+ * - `'right'` — esquina superior derecha (translate: 0, -100%).
71
+ * - `'none'` — deshabilita el posicionamiento absoluto; ver también el atributo `inline`.
72
72
  *
73
73
  * @default ''
74
74
  */
@@ -76,14 +76,14 @@ export class MoniBadge extends MoniElement {
76
76
  position: 'top' | 'bottom' | 'left' | 'right' | 'none' | '' = '';
77
77
 
78
78
  /**
79
- * Shape of the badge container.
79
+ * Forma del contenedor del badge.
80
80
  *
81
- * - `''` (default) — Rounded pill shape (border-radius: 1rem).
82
- * - `'circle'` — Alias for pill; the badge is always circular when the
83
- * content is a single character or absent.
84
- * - `'square'` — No border-radius (angular badge).
85
- * - `'min'` — Dot only; content is hidden via `display: none` and the
86
- * shape is clipped to a small circle via `clip-path`.
81
+ * - `''` (por defecto) — Forma de píldora redondeada (border-radius: 1rem).
82
+ * - `'circle'` — Alias para píldora; el badge siempre es circular cuando el
83
+ * contenido es un solo carácter o está ausente.
84
+ * - `'square'` — Sin border-radius (badge angular).
85
+ * - `'min'` — Solo punto; el contenido se oculta mediante `display: none` y la
86
+ * forma se recorta a un círculo pequeño mediante `clip-path`.
87
87
  *
88
88
  * @default ''
89
89
  */
@@ -91,13 +91,13 @@ export class MoniBadge extends MoniElement {
91
91
  shape: 'circle' | 'square' | 'min' | '' = '';
92
92
 
93
93
  /**
94
- * Semantic color role of the badge.
94
+ * Rol de color semántico del badge.
95
95
  *
96
- * Maps to the M3 color palette roles:
97
- * - `'error'` (default) — Red; standard for notification counts and alerts.
98
- * - `'primary'` — Brand primary color; for selection or active states.
99
- * - `'secondary'` — Secondary accent; for supplementary indicators.
100
- * - `'tertiary'` — Tertiary accent; for decorative or informational badges.
96
+ * Se asigna a los roles de la paleta de colores M3:
97
+ * - `'error'` (por defecto) — Rojo; estándar para conteos de notificaciones y alertas.
98
+ * - `'primary'` — Color primario de la marca; para estados activos o de selección.
99
+ * - `'secondary'` — Acento secundario; para indicadores suplementarios.
100
+ * - `'tertiary'` — Acento terciario; para badges decorativos o informativos.
101
101
  *
102
102
  * @default 'error'
103
103
  */
@@ -105,38 +105,36 @@ export class MoniBadge extends MoniElement {
105
105
  color: 'primary' | 'secondary' | 'tertiary' | 'error' = 'error';
106
106
 
107
107
  /**
108
- * When `true`, the badge renders inline (resets `position: absolute` to
109
- * `position: relative`) rather than anchoring to the parent.
108
+ * Cuando es `true`, el badge se renderiza en línea (restablece `position: absolute` a
109
+ * `position: relative`) en lugar de anclarse al padre.
110
110
  *
111
- * Equivalent to BeerCSS's `.badge.none` class. Use for inline status
112
- * indicators that flow within text or flex containers.
111
+ * Equivalente a la clase `.badge.none` de BeerCSS. Úsalo para indicadores de estado en línea
112
+ * que fluyen dentro de texto o contenedores flex.
113
113
  *
114
114
  * @default false
115
115
  */
116
116
  @property({ type: Boolean, reflect: true }) inline = false;
117
117
 
118
118
  /**
119
- * When present, renders the badge with an outlined style:
120
- * - Background becomes `--surface` (same as the page background).
121
- * - Border and text color use the palette color token (e.g. `--error`).
119
+ * Cuando está presente, renderiza el badge con un estilo delineado:
120
+ * - El fondo se convierte en `--surface` (igual que el fondo de la página).
121
+ * - El borde y el color del texto usan el token de color de la paleta (ej. `--error`).
122
122
  *
123
- * Equivalent to BeerCSS's `.badge.border` class.
123
+ * Equivalente a la clase `.badge.border` de BeerCSS.
124
124
  *
125
125
  * @default false
126
126
  */
127
127
  @property({ type: Boolean, reflect: true }) border = false;
128
128
 
129
129
  /**
130
- * Ensures the parent element can contain the absolutely-positioned badge.
131
- *
132
- * Reads the parent's computed `position` via `getComputedStyle`. If it is
133
- * `'static'` (the browser default), sets `parent.style.position = 'relative'`
134
- * so the badge anchors correctly. This is a convenience that avoids requiring
135
- * consumers to remember to add `position: relative` to the parent themselves.
130
+ * Hook de ciclo de vida de Lit.
131
+ * Mutación imperativa del DOM padre para garantizar el sistema de anclaje (CSS Position).
132
+ * Un badge por defecto usa position: absolute. Si su contenedor padre es estático,
133
+ * el badge "escaparía" hasta el body. Esto detecta el computed style y fuerza
134
+ * un contexto de apilamiento relativo para encapsularlo.
136
135
  */
137
136
  override connectedCallback() {
138
137
  super.connectedCallback();
139
- // Ensure the badge's absolutely-positioned anchor point is correct.
140
138
  const parent = this.parentElement;
141
139
  if (parent) {
142
140
  const computed = getComputedStyle(parent);
@@ -218,16 +216,16 @@ export class MoniBadge extends MoniElement {
218
216
  ];
219
217
 
220
218
  /**
221
- * Renders the badge span with the computed class list.
219
+ * Renderiza el span del badge con la lista de clases computada.
222
220
  *
223
- * Class composition:
224
- * - `'badge'` — always present (base styles).
225
- * - `this.position` — position variant class (e.g. `'bottom'`, `'left'`).
226
- * - `this.shape` — shape variant class (e.g. `'min'`, `'square'`).
227
- * - `'none'` — added when `inline=true` to reset absolute positioning.
221
+ * Composición de clases:
222
+ * - `'badge'` — siempre presente (estilos base).
223
+ * - `this.position` — clase de variante de posición (ej. `'bottom'`, `'left'`).
224
+ * - `this.shape` — clase de variante de forma (ej. `'min'`, `'square'`).
225
+ * - `'none'` — se añade cuando `inline=true` para restablecer el posicionamiento absoluto.
228
226
  *
229
- * Falsy values are filtered out so no extra spaces appear in the class string.
230
- * The default slot falls back to the `value` attribute text node.
227
+ * Los valores falsos se filtran para que no aparezcan espacios extra en el string de clases.
228
+ * El slot por defecto usa el nodo de texto del atributo `value` como respaldo.
231
229
  */
232
230
  override render() {
233
231
  const classes = [