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