@moni-labs/moni-ui 0.2.0 → 0.3.0

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 (323) hide show
  1. package/README.md +52 -194
  2. package/custom-elements.json +1636 -350
  3. package/dist/actions/index.d.ts +6 -0
  4. package/dist/actions/index.d.ts.map +1 -1
  5. package/dist/actions/index.js +6 -0
  6. package/dist/components/_base/field-styles.d.ts +51 -16
  7. package/dist/components/_base/field-styles.d.ts.map +1 -1
  8. package/dist/components/_base/field-styles.js +164 -36
  9. package/dist/components/_base/index.d.ts +25 -0
  10. package/dist/components/_base/index.d.ts.map +1 -1
  11. package/dist/components/_base/index.js +25 -0
  12. package/dist/components/_base/interaction-styles.d.ts +39 -12
  13. package/dist/components/_base/interaction-styles.d.ts.map +1 -1
  14. package/dist/components/_base/interaction-styles.js +85 -33
  15. package/dist/components/_base/moni-element.d.ts +43 -8
  16. package/dist/components/_base/moni-element.d.ts.map +1 -1
  17. package/dist/components/_base/moni-element.js +43 -8
  18. package/dist/components/_base/shared-styles.d.ts +41 -17
  19. package/dist/components/_base/shared-styles.d.ts.map +1 -1
  20. package/dist/components/_base/shared-styles.js +113 -21
  21. package/dist/components/index.d.ts +6 -0
  22. package/dist/components/index.d.ts.map +1 -1
  23. package/dist/components/index.js +6 -0
  24. package/dist/components/loading-shapes.d.ts +6 -0
  25. package/dist/components/loading-shapes.d.ts.map +1 -1
  26. package/dist/components/loading-shapes.js +6 -0
  27. package/dist/components/moni-app-bar.d.ts +128 -33
  28. package/dist/components/moni-app-bar.d.ts.map +1 -1
  29. package/dist/components/moni-app-bar.js +121 -26
  30. package/dist/components/moni-badge.d.ts +122 -14
  31. package/dist/components/moni-badge.d.ts.map +1 -1
  32. package/dist/components/moni-badge.js +122 -14
  33. package/dist/components/moni-bottom-sheet.d.ts +120 -15
  34. package/dist/components/moni-bottom-sheet.d.ts.map +1 -1
  35. package/dist/components/moni-bottom-sheet.js +116 -12
  36. package/dist/components/moni-button-group.d.ts +53 -27
  37. package/dist/components/moni-button-group.d.ts.map +1 -1
  38. package/dist/components/moni-button-group.js +49 -23
  39. package/dist/components/moni-button-segment.d.ts +28 -8
  40. package/dist/components/moni-button-segment.d.ts.map +1 -1
  41. package/dist/components/moni-button-segment.js +27 -7
  42. package/dist/components/moni-button.d.ts +51 -32
  43. package/dist/components/moni-button.d.ts.map +1 -1
  44. package/dist/components/moni-button.js +50 -31
  45. package/dist/components/moni-card.d.ts +91 -31
  46. package/dist/components/moni-card.d.ts.map +1 -1
  47. package/dist/components/moni-card.js +86 -26
  48. package/dist/components/moni-carousel.d.ts +67 -17
  49. package/dist/components/moni-carousel.d.ts.map +1 -1
  50. package/dist/components/moni-carousel.js +59 -16
  51. package/dist/components/moni-checkbox.d.ts +122 -17
  52. package/dist/components/moni-checkbox.d.ts.map +1 -1
  53. package/dist/components/moni-checkbox.js +118 -14
  54. package/dist/components/moni-chip.d.ts +56 -30
  55. package/dist/components/moni-chip.d.ts.map +1 -1
  56. package/dist/components/moni-chip.js +51 -25
  57. package/dist/components/moni-color-field.d.ts +44 -6
  58. package/dist/components/moni-color-field.d.ts.map +1 -1
  59. package/dist/components/moni-color-field.js +43 -5
  60. package/dist/components/moni-context-menu.d.ts +44 -22
  61. package/dist/components/moni-context-menu.d.ts.map +1 -1
  62. package/dist/components/moni-context-menu.js +43 -21
  63. package/dist/components/moni-dialog.d.ts +107 -15
  64. package/dist/components/moni-dialog.d.ts.map +1 -1
  65. package/dist/components/moni-dialog.js +105 -14
  66. package/dist/components/moni-divider.d.ts +50 -15
  67. package/dist/components/moni-divider.d.ts.map +1 -1
  68. package/dist/components/moni-divider.js +49 -14
  69. package/dist/components/moni-expansion.d.ts +44 -8
  70. package/dist/components/moni-expansion.d.ts.map +1 -1
  71. package/dist/components/moni-expansion.js +43 -7
  72. package/dist/components/moni-fab-menu.d.ts +39 -20
  73. package/dist/components/moni-fab-menu.d.ts.map +1 -1
  74. package/dist/components/moni-fab-menu.js +38 -19
  75. package/dist/components/moni-fab.d.ts +49 -23
  76. package/dist/components/moni-fab.d.ts.map +1 -1
  77. package/dist/components/moni-fab.js +46 -20
  78. package/dist/components/moni-file-field.d.ts +54 -14
  79. package/dist/components/moni-file-field.d.ts.map +1 -1
  80. package/dist/components/moni-file-field.js +53 -13
  81. package/dist/components/moni-icon.d.ts +78 -11
  82. package/dist/components/moni-icon.d.ts.map +1 -1
  83. package/dist/components/moni-icon.js +77 -10
  84. package/dist/components/moni-list-item.d.ts +61 -30
  85. package/dist/components/moni-list-item.d.ts.map +1 -1
  86. package/dist/components/moni-list-item.js +55 -24
  87. package/dist/components/moni-list.d.ts +37 -13
  88. package/dist/components/moni-list.d.ts.map +1 -1
  89. package/dist/components/moni-list.js +36 -12
  90. package/dist/components/moni-loading-indicator.d.ts +38 -11
  91. package/dist/components/moni-loading-indicator.d.ts.map +1 -1
  92. package/dist/components/moni-loading-indicator.js +37 -10
  93. package/dist/components/moni-menu-item.d.ts +31 -8
  94. package/dist/components/moni-menu-item.d.ts.map +1 -1
  95. package/dist/components/moni-menu-item.js +30 -7
  96. package/dist/components/moni-menu.d.ts +58 -33
  97. package/dist/components/moni-menu.d.ts.map +1 -1
  98. package/dist/components/moni-menu.js +51 -26
  99. package/dist/components/moni-morph-modal.d.ts +7 -1
  100. package/dist/components/moni-morph-modal.d.ts.map +1 -1
  101. package/dist/components/moni-morph-modal.js +46 -24
  102. package/dist/components/moni-nav-item.d.ts +50 -10
  103. package/dist/components/moni-nav-item.d.ts.map +1 -1
  104. package/dist/components/moni-nav-item.js +48 -8
  105. package/dist/components/moni-nav.d.ts +57 -22
  106. package/dist/components/moni-nav.d.ts.map +1 -1
  107. package/dist/components/moni-nav.js +53 -18
  108. package/dist/components/moni-progress.d.ts +108 -20
  109. package/dist/components/moni-progress.d.ts.map +1 -1
  110. package/dist/components/moni-progress.js +104 -16
  111. package/dist/components/moni-radio.d.ts +106 -14
  112. package/dist/components/moni-radio.d.ts.map +1 -1
  113. package/dist/components/moni-radio.js +104 -13
  114. package/dist/components/moni-ripple.d.ts +121 -10
  115. package/dist/components/moni-ripple.d.ts.map +1 -1
  116. package/dist/components/moni-ripple.js +120 -9
  117. package/dist/components/moni-segmented-button.d.ts +31 -11
  118. package/dist/components/moni-segmented-button.d.ts.map +1 -1
  119. package/dist/components/moni-segmented-button.js +30 -10
  120. package/dist/components/moni-select-option.d.ts +43 -9
  121. package/dist/components/moni-select-option.d.ts.map +1 -1
  122. package/dist/components/moni-select-option.js +41 -7
  123. package/dist/components/moni-select.d.ts +59 -2
  124. package/dist/components/moni-select.d.ts.map +1 -1
  125. package/dist/components/moni-select.js +58 -1
  126. package/dist/components/moni-shape.d.ts +1 -1
  127. package/dist/components/moni-side-sheet.d.ts +56 -19
  128. package/dist/components/moni-side-sheet.d.ts.map +1 -1
  129. package/dist/components/moni-side-sheet.js +53 -16
  130. package/dist/components/moni-slider.d.ts +56 -25
  131. package/dist/components/moni-slider.d.ts.map +1 -1
  132. package/dist/components/moni-slider.js +55 -24
  133. package/dist/components/moni-snackbar.d.ts +86 -17
  134. package/dist/components/moni-snackbar.d.ts.map +1 -1
  135. package/dist/components/moni-snackbar.js +85 -16
  136. package/dist/components/moni-split-button.d.ts +38 -9
  137. package/dist/components/moni-split-button.d.ts.map +1 -1
  138. package/dist/components/moni-split-button.js +37 -8
  139. package/dist/components/moni-step.d.ts +42 -9
  140. package/dist/components/moni-step.d.ts.map +1 -1
  141. package/dist/components/moni-step.js +41 -8
  142. package/dist/components/moni-stepper.d.ts +43 -6
  143. package/dist/components/moni-stepper.d.ts.map +1 -1
  144. package/dist/components/moni-stepper.js +42 -5
  145. package/dist/components/moni-switch.d.ts +103 -16
  146. package/dist/components/moni-switch.d.ts.map +1 -1
  147. package/dist/components/moni-switch.js +99 -13
  148. package/dist/components/moni-tab.d.ts +35 -8
  149. package/dist/components/moni-tab.d.ts.map +1 -1
  150. package/dist/components/moni-tab.js +34 -7
  151. package/dist/components/moni-tabs.d.ts +51 -13
  152. package/dist/components/moni-tabs.d.ts.map +1 -1
  153. package/dist/components/moni-tabs.js +48 -10
  154. package/dist/components/moni-text-field.d.ts +55 -10
  155. package/dist/components/moni-text-field.d.ts.map +1 -1
  156. package/dist/components/moni-text-field.js +54 -9
  157. package/dist/components/moni-textarea.d.ts +51 -21
  158. package/dist/components/moni-textarea.d.ts.map +1 -1
  159. package/dist/components/moni-textarea.js +48 -18
  160. package/dist/components/moni-time-picker.d.ts +41 -11
  161. package/dist/components/moni-time-picker.d.ts.map +1 -1
  162. package/dist/components/moni-time-picker.js +40 -10
  163. package/dist/components/moni-toolbar.d.ts +43 -15
  164. package/dist/components/moni-toolbar.d.ts.map +1 -1
  165. package/dist/components/moni-toolbar.js +42 -14
  166. package/dist/components/moni-tooltip.d.ts +55 -25
  167. package/dist/components/moni-tooltip.d.ts.map +1 -1
  168. package/dist/components/moni-tooltip.js +54 -24
  169. package/dist/components/moni-typography.d.ts +43 -18
  170. package/dist/components/moni-typography.d.ts.map +1 -1
  171. package/dist/components/moni-typography.js +42 -17
  172. package/dist/index.d.ts +47 -0
  173. package/dist/index.d.ts.map +1 -1
  174. package/dist/index.js +59 -2
  175. package/dist/styles/tailwind.css +67 -0
  176. package/dist/styles/tokens.css +111 -99
  177. package/dist/utils/color.d.ts +181 -2
  178. package/dist/utils/color.d.ts.map +1 -1
  179. package/dist/utils/color.js +182 -4
  180. package/dist/utils/theme.svelte.d.ts +305 -2
  181. package/dist/utils/theme.svelte.d.ts.map +1 -1
  182. package/dist/utils/theme.svelte.js +331 -2
  183. package/dist/web-components.d.ts +28 -0
  184. package/dist/web-components.d.ts.map +1 -1
  185. package/dist/web-components.js +29 -2
  186. package/package.json +1 -1
  187. package/src/actions/index.ts +7 -0
  188. package/src/components/_base/field-styles.ts +165 -37
  189. package/src/components/_base/index.ts +27 -0
  190. package/src/components/_base/interaction-styles.ts +86 -33
  191. package/src/components/_base/moni-element.ts +44 -8
  192. package/src/components/_base/shared-styles.ts +114 -21
  193. package/src/components/index.ts +7 -0
  194. package/src/components/loading-shapes.ts +7 -0
  195. package/src/components/moni-app-bar.ts +127 -26
  196. package/src/components/moni-badge.ts +128 -14
  197. package/src/components/moni-bottom-sheet.ts +125 -13
  198. package/src/components/moni-button-group.ts +50 -23
  199. package/src/components/moni-button-segment.ts +28 -7
  200. package/src/components/moni-button.ts +51 -31
  201. package/src/components/moni-card.ts +90 -26
  202. package/src/components/moni-carousel.ts +67 -16
  203. package/src/components/moni-checkbox.ts +125 -14
  204. package/src/components/moni-chip.ts +52 -25
  205. package/src/components/moni-color-field.ts +44 -5
  206. package/src/components/moni-context-menu.ts +44 -21
  207. package/src/components/moni-dialog.ts +111 -14
  208. package/src/components/moni-divider.ts +50 -14
  209. package/src/components/moni-expansion.ts +44 -7
  210. package/src/components/moni-fab-menu.ts +39 -19
  211. package/src/components/moni-fab.ts +47 -20
  212. package/src/components/moni-file-field.ts +54 -13
  213. package/src/components/moni-icon.ts +80 -10
  214. package/src/components/moni-list-item.ts +56 -24
  215. package/src/components/moni-list.ts +37 -12
  216. package/src/components/moni-loading-indicator.ts +38 -10
  217. package/src/components/moni-menu-item.ts +31 -7
  218. package/src/components/moni-menu.ts +52 -26
  219. package/src/components/moni-morph-modal.ts +58 -24
  220. package/src/components/moni-nav-item.ts +49 -8
  221. package/src/components/moni-nav.ts +54 -18
  222. package/src/components/moni-progress.ts +109 -16
  223. package/src/components/moni-radio.ts +111 -13
  224. package/src/components/moni-ripple.ts +126 -9
  225. package/src/components/moni-segmented-button.ts +31 -10
  226. package/src/components/moni-select-option.ts +42 -7
  227. package/src/components/moni-select.ts +79 -1
  228. package/src/components/moni-side-sheet.ts +54 -16
  229. package/src/components/moni-slider.ts +56 -24
  230. package/src/components/moni-snackbar.ts +90 -16
  231. package/src/components/moni-split-button.ts +38 -8
  232. package/src/components/moni-step.ts +42 -8
  233. package/src/components/moni-stepper.ts +43 -5
  234. package/src/components/moni-switch.ts +106 -13
  235. package/src/components/moni-tab.ts +35 -7
  236. package/src/components/moni-tabs.ts +49 -10
  237. package/src/components/moni-text-field.ts +55 -9
  238. package/src/components/moni-textarea.ts +49 -18
  239. package/src/components/moni-time-picker.ts +41 -10
  240. package/src/components/moni-toolbar.ts +43 -14
  241. package/src/components/moni-tooltip.ts +55 -24
  242. package/src/components/moni-typography.ts +43 -17
  243. package/src/index.ts +67 -3
  244. package/src/styles/tailwind.css +67 -0
  245. package/src/styles/tokens.css +111 -99
  246. package/src/types/svelte-runes.d.ts +64 -2
  247. package/src/utils/color.ts +286 -5
  248. package/src/utils/theme.svelte.ts +411 -2
  249. package/src/web-components.ts +31 -2
  250. package/dist/assets/shapes/arch.svg +0 -1
  251. package/dist/assets/shapes/arrow.svg +0 -1
  252. package/dist/assets/shapes/boom.svg +0 -1
  253. package/dist/assets/shapes/burst.svg +0 -1
  254. package/dist/assets/shapes/circle.svg +0 -1
  255. package/dist/assets/shapes/clamshell.svg +0 -1
  256. package/dist/assets/shapes/diamond.svg +0 -1
  257. package/dist/assets/shapes/fan.svg +0 -1
  258. package/dist/assets/shapes/flower.svg +0 -1
  259. package/dist/assets/shapes/gem.svg +0 -1
  260. package/dist/assets/shapes/ghost-ish.svg +0 -1
  261. package/dist/assets/shapes/heart.svg +0 -1
  262. package/dist/assets/shapes/leaf-clover4.svg +0 -1
  263. package/dist/assets/shapes/leaf-clover8.svg +0 -1
  264. package/dist/assets/shapes/loading-indicator.svg +0 -1
  265. package/dist/assets/shapes/oval.svg +0 -1
  266. package/dist/assets/shapes/pentagon.svg +0 -1
  267. package/dist/assets/shapes/pill.svg +0 -1
  268. package/dist/assets/shapes/pixel-circle.svg +0 -1
  269. package/dist/assets/shapes/pixel-triangle.svg +0 -1
  270. package/dist/assets/shapes/puffy-diamond.svg +0 -1
  271. package/dist/assets/shapes/puffy.svg +0 -1
  272. package/dist/assets/shapes/semicircle.svg +0 -1
  273. package/dist/assets/shapes/sided-cookie12.svg +0 -1
  274. package/dist/assets/shapes/sided-cookie4.svg +0 -1
  275. package/dist/assets/shapes/sided-cookie6.svg +0 -1
  276. package/dist/assets/shapes/sided-cookie7.svg +0 -1
  277. package/dist/assets/shapes/sided-cookie9.svg +0 -1
  278. package/dist/assets/shapes/slanted.svg +0 -1
  279. package/dist/assets/shapes/soft-boom.svg +0 -1
  280. package/dist/assets/shapes/soft-burst.svg +0 -1
  281. package/dist/assets/shapes/square.svg +0 -1
  282. package/dist/assets/shapes/sunny.svg +0 -1
  283. package/dist/assets/shapes/triangle.svg +0 -1
  284. package/dist/assets/shapes/very-sunny.svg +0 -1
  285. package/dist/assets/shapes/wavy-circle.svg +0 -1
  286. package/dist/assets/shapes/wavy.svg +0 -1
  287. package/src/assets/shapes/arch.svg +0 -1
  288. package/src/assets/shapes/arrow.svg +0 -1
  289. package/src/assets/shapes/boom.svg +0 -1
  290. package/src/assets/shapes/burst.svg +0 -1
  291. package/src/assets/shapes/circle.svg +0 -1
  292. package/src/assets/shapes/clamshell.svg +0 -1
  293. package/src/assets/shapes/diamond.svg +0 -1
  294. package/src/assets/shapes/fan.svg +0 -1
  295. package/src/assets/shapes/flower.svg +0 -1
  296. package/src/assets/shapes/gem.svg +0 -1
  297. package/src/assets/shapes/ghost-ish.svg +0 -1
  298. package/src/assets/shapes/heart.svg +0 -1
  299. package/src/assets/shapes/leaf-clover4.svg +0 -1
  300. package/src/assets/shapes/leaf-clover8.svg +0 -1
  301. package/src/assets/shapes/loading-indicator.svg +0 -1
  302. package/src/assets/shapes/oval.svg +0 -1
  303. package/src/assets/shapes/pentagon.svg +0 -1
  304. package/src/assets/shapes/pill.svg +0 -1
  305. package/src/assets/shapes/pixel-circle.svg +0 -1
  306. package/src/assets/shapes/pixel-triangle.svg +0 -1
  307. package/src/assets/shapes/puffy-diamond.svg +0 -1
  308. package/src/assets/shapes/puffy.svg +0 -1
  309. package/src/assets/shapes/semicircle.svg +0 -1
  310. package/src/assets/shapes/sided-cookie12.svg +0 -1
  311. package/src/assets/shapes/sided-cookie4.svg +0 -1
  312. package/src/assets/shapes/sided-cookie6.svg +0 -1
  313. package/src/assets/shapes/sided-cookie7.svg +0 -1
  314. package/src/assets/shapes/sided-cookie9.svg +0 -1
  315. package/src/assets/shapes/slanted.svg +0 -1
  316. package/src/assets/shapes/soft-boom.svg +0 -1
  317. package/src/assets/shapes/soft-burst.svg +0 -1
  318. package/src/assets/shapes/square.svg +0 -1
  319. package/src/assets/shapes/sunny.svg +0 -1
  320. package/src/assets/shapes/triangle.svg +0 -1
  321. package/src/assets/shapes/very-sunny.svg +0 -1
  322. package/src/assets/shapes/wavy-circle.svg +0 -1
  323. package/src/assets/shapes/wavy.svg +0 -1
@@ -1,25 +1,92 @@
1
+ /**
2
+ * @file components/moni-icon.ts
3
+ * @package @moni-labs/moni-ui
4
+ * @license MIT
5
+ * @contributors Moni Labs & Contributors
6
+ */
1
7
  import { MoniElement } from './_base/index.js';
2
8
  /**
3
- * Visual-only icon.
9
+ * Visual-only icon component using Material Symbols variable font.
10
+ *
11
+ * Renders a Material Symbols glyph by its ligature name. The icon font
12
+ * must be loaded globally by the host document — it is not bundled with
13
+ * the component. Add the font via the `@moni-labs/moni-ui/styles` stylesheet
14
+ * or by including the Google Fonts CDN link.
15
+ *
16
+ * **Font rendering:**
17
+ * The icon uses `font-family: var(--font-icon)` which defaults to
18
+ * `'Material Symbols Rounded'`. Override `--font-icon-override` in the
19
+ * host document's `:root` to switch to a different icon set variant
20
+ * (e.g. `'Material Symbols Outlined'` or `'Material Symbols Sharp'`).
21
+ *
22
+ * **Variable font settings:**
23
+ * The default `font-variation-settings` is `'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24`.
24
+ * Setting the `filled` attribute switches to `'FILL' 1` for the solid icon variant.
25
+ *
26
+ * **Color inheritance:**
27
+ * The icon always inherits color from its parent via `color: inherit`, making it
28
+ * automatically adapt to button variants, chip selected states, list item active
29
+ * states, and other color-context containers.
30
+ *
31
+ * @example
32
+ * ```html
33
+ * <!-- Basic icon -->
34
+ * <moni-icon name="home"></moni-icon>
35
+ *
36
+ * <!-- Filled large icon -->
37
+ * <moni-icon name="favorite" size="large" filled></moni-icon>
4
38
  *
5
- * Renders a Material Symbols glyph by name. The font must be loaded
6
- * globally in the host document (see `@moni-labs/moni-ui/styles`).
39
+ * <!-- Custom SVG override via slot -->
40
+ * <moni-icon>
41
+ * <svg slot="default" viewBox="0 0 24 24">...</svg>
42
+ * </moni-icon>
43
+ * ```
7
44
  *
8
- * Attributes:
9
- * - name: icon name from https://fonts.google.com/icons
10
- * - size: tiny | small | medium (default) | large | extra
11
- * - filled: present → switches to the filled variant (font-variation-settings)
45
+ * @slot default - Fallback content when `name` is empty. Accepts `<svg>` or `<img>`
46
+ * elements which are sized to 100% of the icon box.
12
47
  *
13
- * Slots:
14
- * - default: fallback text if no name is given
15
- * - (also accepts slotted <svg> or <img> as override)
48
+ * @cssproperty --font-icon-override - Overrides the icon font family at the
49
+ * document level. Set on `:root`.
16
50
  */
17
51
  export declare class MoniIcon extends MoniElement {
52
+ /**
53
+ * Material Symbols ligature name for the icon to render.
54
+ *
55
+ * Use the name exactly as shown on https://fonts.google.com/icons
56
+ * (e.g. `'home'`, `'settings'`, `'arrow_forward'`).
57
+ * When empty, the default slot is rendered instead.
58
+ *
59
+ * @default ''
60
+ */
18
61
  name: string;
62
+ /**
63
+ * Size of the icon bounding box.
64
+ *
65
+ * Maps to the `--_size` custom property:
66
+ * | Value | Size |
67
+ * |------------|----------|
68
+ * | `'tiny'` | 1rem |
69
+ * | `'small'` | 1.25rem |
70
+ * | `'medium'` | 1.5rem |
71
+ * | `'large'` | 1.75rem |
72
+ * | `'extra'` | 2rem |
73
+ *
74
+ * @default 'medium'
75
+ */
19
76
  size: 'tiny' | 'small' | 'medium' | 'large' | 'extra';
77
+ /**
78
+ * When `true`, switches to the filled variant of the icon by setting
79
+ * `font-variation-settings: 'FILL' 1`.
80
+ *
81
+ * This works only with variable icon fonts that include the `FILL` axis
82
+ * (all Material Symbols variants do). It has no effect if a different
83
+ * icon font is loaded that does not support `FILL`.
84
+ *
85
+ * @default false
86
+ */
20
87
  filled: boolean;
21
88
  static styles: import("lit").CSSResult[];
22
- render(): import("lit-html").TemplateResult<1>;
89
+ render(): import("lit").TemplateResult<1>;
23
90
  }
24
91
  declare global {
25
92
  interface HTMLElementTagNameMap {
@@ -1 +1 @@
1
- {"version":3,"file":"moni-icon.d.ts","sourceRoot":"","sources":["../../src/components/moni-icon.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AAE7D;;;;;;;;;;;;;;GAcG;AACH,qBACa,QAAS,SAAQ,WAAW;IACX,IAAI,SAAM;IAEvC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAY;IACrB,MAAM,UAAS;IAE3D,OAAgB,MAAM,4BAyDpB;IAEO,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;KACtB;CACD;AAED,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"moni-icon.d.ts","sourceRoot":"","sources":["../../src/components/moni-icon.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,qBACa,QAAS,SAAQ,WAAW;IACxC;;;;;;;;OAQG;IAC0B,IAAI,SAAM;IAEvC;;;;;;;;;;;;;OAaG;IAEH,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAY;IAEjE;;;;;;;;;OASG;IACyC,MAAM,UAAS;IAE3D,OAAgB,MAAM,4BAyDpB;IAEO,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;KACtB;CACD;AAED,eAAe,QAAQ,CAAC"}
@@ -1,3 +1,9 @@
1
+ /**
2
+ * @file components/moni-icon.ts
3
+ * @package @moni-labs/moni-ui
4
+ * @license MIT
5
+ * @contributors Moni Labs & Contributors
6
+ */
1
7
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
8
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
9
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,25 +14,86 @@ import { html, css } from 'lit';
8
14
  import { customElement, property } from 'lit/decorators.js';
9
15
  import { MoniElement, sharedStyles } from './_base/index.js';
10
16
  /**
11
- * Visual-only icon.
17
+ * Visual-only icon component using Material Symbols variable font.
18
+ *
19
+ * Renders a Material Symbols glyph by its ligature name. The icon font
20
+ * must be loaded globally by the host document — it is not bundled with
21
+ * the component. Add the font via the `@moni-labs/moni-ui/styles` stylesheet
22
+ * or by including the Google Fonts CDN link.
23
+ *
24
+ * **Font rendering:**
25
+ * The icon uses `font-family: var(--font-icon)` which defaults to
26
+ * `'Material Symbols Rounded'`. Override `--font-icon-override` in the
27
+ * host document's `:root` to switch to a different icon set variant
28
+ * (e.g. `'Material Symbols Outlined'` or `'Material Symbols Sharp'`).
29
+ *
30
+ * **Variable font settings:**
31
+ * The default `font-variation-settings` is `'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24`.
32
+ * Setting the `filled` attribute switches to `'FILL' 1` for the solid icon variant.
33
+ *
34
+ * **Color inheritance:**
35
+ * The icon always inherits color from its parent via `color: inherit`, making it
36
+ * automatically adapt to button variants, chip selected states, list item active
37
+ * states, and other color-context containers.
38
+ *
39
+ * @example
40
+ * ```html
41
+ * <!-- Basic icon -->
42
+ * <moni-icon name="home"></moni-icon>
43
+ *
44
+ * <!-- Filled large icon -->
45
+ * <moni-icon name="favorite" size="large" filled></moni-icon>
12
46
  *
13
- * Renders a Material Symbols glyph by name. The font must be loaded
14
- * globally in the host document (see `@moni-labs/moni-ui/styles`).
47
+ * <!-- Custom SVG override via slot -->
48
+ * <moni-icon>
49
+ * <svg slot="default" viewBox="0 0 24 24">...</svg>
50
+ * </moni-icon>
51
+ * ```
15
52
  *
16
- * Attributes:
17
- * - name: icon name from https://fonts.google.com/icons
18
- * - size: tiny | small | medium (default) | large | extra
19
- * - filled: present → switches to the filled variant (font-variation-settings)
53
+ * @slot default - Fallback content when `name` is empty. Accepts `<svg>` or `<img>`
54
+ * elements which are sized to 100% of the icon box.
20
55
  *
21
- * Slots:
22
- * - default: fallback text if no name is given
23
- * - (also accepts slotted <svg> or <img> as override)
56
+ * @cssproperty --font-icon-override - Overrides the icon font family at the
57
+ * document level. Set on `:root`.
24
58
  */
25
59
  let MoniIcon = class MoniIcon extends MoniElement {
26
60
  constructor() {
27
61
  super(...arguments);
62
+ /**
63
+ * Material Symbols ligature name for the icon to render.
64
+ *
65
+ * Use the name exactly as shown on https://fonts.google.com/icons
66
+ * (e.g. `'home'`, `'settings'`, `'arrow_forward'`).
67
+ * When empty, the default slot is rendered instead.
68
+ *
69
+ * @default ''
70
+ */
28
71
  this.name = '';
72
+ /**
73
+ * Size of the icon bounding box.
74
+ *
75
+ * Maps to the `--_size` custom property:
76
+ * | Value | Size |
77
+ * |------------|----------|
78
+ * | `'tiny'` | 1rem |
79
+ * | `'small'` | 1.25rem |
80
+ * | `'medium'` | 1.5rem |
81
+ * | `'large'` | 1.75rem |
82
+ * | `'extra'` | 2rem |
83
+ *
84
+ * @default 'medium'
85
+ */
29
86
  this.size = 'medium';
87
+ /**
88
+ * When `true`, switches to the filled variant of the icon by setting
89
+ * `font-variation-settings: 'FILL' 1`.
90
+ *
91
+ * This works only with variable icon fonts that include the `FILL` axis
92
+ * (all Material Symbols variants do). It has no effect if a different
93
+ * icon font is loaded that does not support `FILL`.
94
+ *
95
+ * @default false
96
+ */
30
97
  this.filled = false;
31
98
  }
32
99
  static { this.styles = [
@@ -1,35 +1,66 @@
1
+ /**
2
+ * @file components/moni-list-item.ts
3
+ * @package @moni-labs/moni-ui
4
+ * @license MIT
5
+ * @contributors Moni Labs & Contributors
6
+ */
1
7
  import { MoniElement } from './_base/index.js';
2
8
  import './moni-icon.js';
3
9
  /**
4
- * Material 3 List Item (`m3-docs/components/lists/specs.md`).
5
- *
6
- * One row in a `<moni-list>`. Supports up to 3 lines of text:
7
- * - line 1: headline (required).
8
- * - line 2: supporting text (optional).
9
- * - line 3: trailing meta text (optional).
10
- *
11
- * Plus optional leading/trailing icons or avatars.
12
- *
13
- * M3 measurements:
14
- * - Min height: 56dp (1-line), 72dp (2-line), 88dp (3-line).
15
- * - Horizontal padding: 16dp.
16
- * - Vertical padding: 8dp top/bottom (so 1-line is 56dp tall).
17
- * - Leading icon/avatar size: 24dp.
18
- *
19
- * Attributes:
20
- * - lines: 1 (default) | 2 | 3
21
- * - icon: Material Symbols name (leading icon)
22
- * - avatar: URL for a leading image
23
- * - trailing-icon: Material Symbols name (trailing icon)
24
- * - active: present → background uses secondary-container
25
- * - disabled: present opacity 38%, cursor not-allowed
26
- * - href: present renders as <a>; otherwise <button>
27
- *
28
- * Slots:
29
- * - default: headline (line 1)
30
- * - supporting:line 2 text
31
- * - meta: line 3 text
32
- * - trailing-meta: trailing small text (right side)
10
+ * Material Design 3 List Item component.
11
+ *
12
+ * A single row within a `<moni-list>`. List items display a headline and
13
+ * optional supporting text, metadata, icons, or avatars.
14
+ *
15
+ * **M3 spec reference:** `m3-docs/components/lists/specs.md`
16
+ *
17
+ * **Line configurations:**
18
+ * The `lines` attribute configures the layout and minimum height of the item:
19
+ * - `lines="1"` (default) — 56dp min height. Only the headline slot is shown.
20
+ * - `lines="2"` — 72dp min height. Shows headline and supporting text.
21
+ * - `lines="3"` 88dp min height. Shows headline, supporting text, and meta text.
22
+ *
23
+ * **Interactive behavior:**
24
+ * By default, items render as `<button>` elements, gaining the M3 state layer
25
+ * (hover, focus, and press ripple effects).
26
+ * If the `href` attribute is provided, the item internally renders as an `<a>`
27
+ * element, allowing native link routing and interactions while preserving the
28
+ * list item styling.
29
+ *
30
+ * **Visual elements:**
31
+ * - `icon` (attribute) Material Symbol name for the leading icon (24dp).
32
+ * - `avatar` (attribute) URL for a leading circular image (40dp).
33
+ * - `trailing-icon` (attribute) — Material Symbol name for the trailing icon.
34
+ *
35
+ * @example
36
+ * ```html
37
+ * <!-- 1-line item with icon -->
38
+ * <moni-list-item icon="inbox">
39
+ * Inbox
40
+ * </moni-list-item>
41
+ *
42
+ * <!-- 2-line item with avatar and trailing meta -->
43
+ * <moni-list-item lines="2" avatar="/user.jpg">
44
+ * Ali Connors
45
+ * <span slot="supporting">Brunch this weekend?</span>
46
+ * <span slot="trailing-meta">10 min</span>
47
+ * </moni-list-item>
48
+ *
49
+ * <!-- Link item -->
50
+ * <moni-list-item href="/settings" icon="settings">
51
+ * Settings
52
+ * </moni-list-item>
53
+ * ```
54
+ *
55
+ * @slot default - Headline text (Line 1).
56
+ * @slot supporting - Supporting text (Line 2, requires `lines>=2`).
57
+ * @slot meta - Additional meta text (Line 3, requires `lines=3`).
58
+ * @slot trailing-meta - Small text displayed on the far right edge.
59
+ *
60
+ * @csspart item - The outer `<button>` or `<a>` container.
61
+ * @csspart leading-icon - Container for the leading icon/avatar.
62
+ * @csspart text - Container for the multi-line text block.
63
+ * @csspart trailing-icon - Container for the trailing icon.
33
64
  */
34
65
  export declare class MoniListItem extends MoniElement {
35
66
  lines: 1 | 2 | 3;
@@ -40,7 +71,7 @@ export declare class MoniListItem extends MoniElement {
40
71
  disabled: boolean;
41
72
  href: string;
42
73
  static styles: import("lit").CSSResult[];
43
- render(): import("lit-html").TemplateResult<1>;
74
+ render(): import("lit").TemplateResult<1>;
44
75
  }
45
76
  declare global {
46
77
  interface HTMLElementTagNameMap {
@@ -1 +1 @@
1
- {"version":3,"file":"moni-list-item.d.ts","sourceRoot":"","sources":["../../src/components/moni-list-item.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AAC7D,OAAO,gBAAgB,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBACa,YAAa,SAAQ,WAAW;IAE5C,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAK;IACQ,IAAI,SAAM;IACV,MAAM,SAAM;IAEzC,YAAY,SAAM;IAC0B,MAAM,UAAS;IACf,QAAQ,UAAS;IAChC,IAAI,SAAM;IAEvC,OAAgB,MAAM,4BAoHpB;IAEO,MAAM;CA+Cf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,gBAAgB,EAAE,YAAY,CAAC;KAC/B;CACD;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"moni-list-item.d.ts","sourceRoot":"","sources":["../../src/components/moni-list-item.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AAC7D,OAAO,gBAAgB,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,qBACa,YAAa,SAAQ,WAAW;IAE5C,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAK;IACQ,IAAI,SAAM;IACV,MAAM,SAAM;IAEzC,YAAY,SAAM;IAC0B,MAAM,UAAS;IACf,QAAQ,UAAS;IAChC,IAAI,SAAM;IAEvC,OAAgB,MAAM,4BAoHpB;IAEO,MAAM;CA+Cf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,gBAAgB,EAAE,YAAY,CAAC;KAC/B;CACD;AAED,eAAe,YAAY,CAAC"}
@@ -1,3 +1,9 @@
1
+ /**
2
+ * @file components/moni-list-item.ts
3
+ * @package @moni-labs/moni-ui
4
+ * @license MIT
5
+ * @contributors Moni Labs & Contributors
6
+ */
1
7
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
8
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
9
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -9,35 +15,60 @@ import { customElement, property } from 'lit/decorators.js';
9
15
  import { MoniElement, sharedStyles } from './_base/index.js';
10
16
  import './moni-icon.js';
11
17
  /**
12
- * Material 3 List Item (`m3-docs/components/lists/specs.md`).
18
+ * Material Design 3 List Item component.
19
+ *
20
+ * A single row within a `<moni-list>`. List items display a headline and
21
+ * optional supporting text, metadata, icons, or avatars.
22
+ *
23
+ * **M3 spec reference:** `m3-docs/components/lists/specs.md`
24
+ *
25
+ * **Line configurations:**
26
+ * The `lines` attribute configures the layout and minimum height of the item:
27
+ * - `lines="1"` (default) — 56dp min height. Only the headline slot is shown.
28
+ * - `lines="2"` — 72dp min height. Shows headline and supporting text.
29
+ * - `lines="3"` — 88dp min height. Shows headline, supporting text, and meta text.
30
+ *
31
+ * **Interactive behavior:**
32
+ * By default, items render as `<button>` elements, gaining the M3 state layer
33
+ * (hover, focus, and press ripple effects).
34
+ * If the `href` attribute is provided, the item internally renders as an `<a>`
35
+ * element, allowing native link routing and interactions while preserving the
36
+ * list item styling.
37
+ *
38
+ * **Visual elements:**
39
+ * - `icon` (attribute) — Material Symbol name for the leading icon (24dp).
40
+ * - `avatar` (attribute) — URL for a leading circular image (40dp).
41
+ * - `trailing-icon` (attribute) — Material Symbol name for the trailing icon.
13
42
  *
14
- * One row in a `<moni-list>`. Supports up to 3 lines of text:
15
- * - line 1: headline (required).
16
- * - line 2: supporting text (optional).
17
- * - line 3: trailing meta text (optional).
43
+ * @example
44
+ * ```html
45
+ * <!-- 1-line item with icon -->
46
+ * <moni-list-item icon="inbox">
47
+ * Inbox
48
+ * </moni-list-item>
18
49
  *
19
- * Plus optional leading/trailing icons or avatars.
50
+ * <!-- 2-line item with avatar and trailing meta -->
51
+ * <moni-list-item lines="2" avatar="/user.jpg">
52
+ * Ali Connors
53
+ * <span slot="supporting">Brunch this weekend?</span>
54
+ * <span slot="trailing-meta">10 min</span>
55
+ * </moni-list-item>
20
56
  *
21
- * M3 measurements:
22
- * - Min height: 56dp (1-line), 72dp (2-line), 88dp (3-line).
23
- * - Horizontal padding: 16dp.
24
- * - Vertical padding: 8dp top/bottom (so 1-line is 56dp tall).
25
- * - Leading icon/avatar size: 24dp.
57
+ * <!-- Link item -->
58
+ * <moni-list-item href="/settings" icon="settings">
59
+ * Settings
60
+ * </moni-list-item>
61
+ * ```
26
62
  *
27
- * Attributes:
28
- * - lines: 1 (default) | 2 | 3
29
- * - icon: Material Symbols name (leading icon)
30
- * - avatar: URL for a leading image
31
- * - trailing-icon: Material Symbols name (trailing icon)
32
- * - active: present → background uses secondary-container
33
- * - disabled: present → opacity 38%, cursor not-allowed
34
- * - href: present → renders as <a>; otherwise <button>
63
+ * @slot default - Headline text (Line 1).
64
+ * @slot supporting - Supporting text (Line 2, requires `lines>=2`).
65
+ * @slot meta - Additional meta text (Line 3, requires `lines=3`).
66
+ * @slot trailing-meta - Small text displayed on the far right edge.
35
67
  *
36
- * Slots:
37
- * - default: headline (line 1)
38
- * - supporting:line 2 text
39
- * - meta: line 3 text
40
- * - trailing-meta: trailing small text (right side)
68
+ * @csspart item - The outer `<button>` or `<a>` container.
69
+ * @csspart leading-icon - Container for the leading icon/avatar.
70
+ * @csspart text - Container for the multi-line text block.
71
+ * @csspart trailing-icon - Container for the trailing icon.
41
72
  */
42
73
  let MoniListItem = class MoniListItem extends MoniElement {
43
74
  constructor() {
@@ -1,27 +1,51 @@
1
+ /**
2
+ * @file components/moni-list.ts
3
+ * @package @moni-labs/moni-ui
4
+ * @license MIT
5
+ * @contributors Moni Labs & Contributors
6
+ */
1
7
  import { MoniElement } from './_base/index.js';
2
8
  /**
3
- * Material 3 List (`m3-docs/components/lists/specs.md`).
9
+ * Material Design 3 List component.
10
+ *
11
+ * Lists are continuous, vertical indexes of text or images. They are
12
+ * container elements that provide structural grouping and optional
13
+ * divider lines for `<moni-list-item>` children.
14
+ *
15
+ * **M3 spec reference:** `m3-docs/components/lists/specs.md`
16
+ *
17
+ * **Container role:**
18
+ * The list itself does not apply padding or margins to its children. Spacing
19
+ * and internal padding are controlled entirely by the `<moni-list-item>`
20
+ * elements themselves to ensure proper hit targets and alignment.
4
21
  *
5
- * A list is a continuous vertical index of text and images. The
6
- * container itself is purely structural (no padding); spacing and
7
- * dividers are controlled by `<moni-list-item>` children.
22
+ * **Variants:**
23
+ * - `default` (empty string) A clean, borderless list container.
24
+ * - `border` Adds a bottom border to the list and displays horizontal
25
+ * dividers (`outline-variant` color) between list items.
8
26
  *
9
- * Two visual variants:
10
- * - **default**: 8dp top/bottom padding between items (handled by items).
11
- * - **border**: dividers drawn between items.
27
+ * @example
28
+ * ```html
29
+ * <!-- Standard list -->
30
+ * <moni-list>
31
+ * <moni-list-item headline="Item 1"></moni-list-item>
32
+ * <moni-list-item headline="Item 2"></moni-list-item>
33
+ * </moni-list>
12
34
  *
13
- * Attributes:
14
- * - variant: '' (default) | border
15
- * - rounded: when set, items use a 4dp corner radius.
35
+ * <!-- List with dividers and rounded items -->
36
+ * <moni-list variant="border" rounded>
37
+ * <moni-list-item icon="inbox" headline="Inbox"></moni-list-item>
38
+ * <moni-list-item icon="send" headline="Sent"></moni-list-item>
39
+ * </moni-list>
40
+ * ```
16
41
  *
17
- * Slots:
18
- * - default: <moni-list-item> children.
42
+ * @slot default - `<moni-list-item>` elements.
19
43
  */
20
44
  export declare class MoniList extends MoniElement {
21
45
  variant: '' | 'border';
22
46
  rounded: boolean;
23
47
  static styles: import("lit").CSSResult[];
24
- render(): import("lit-html").TemplateResult<1>;
48
+ render(): import("lit").TemplateResult<1>;
25
49
  }
26
50
  declare global {
27
51
  interface HTMLElementTagNameMap {
@@ -1 +1 @@
1
- {"version":3,"file":"moni-list.d.ts","sourceRoot":"","sources":["../../src/components/moni-list.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AAE7D;;;;;;;;;;;;;;;;;GAiBG;AACH,qBACa,QAAS,SAAQ,WAAW;IACX,OAAO,EAAE,EAAE,GAAG,QAAQ,CAAM;IACb,OAAO,UAAS;IAE5D,OAAgB,MAAM,4BAkBpB;IAEO,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;KACtB;CACD;AAED,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"moni-list.d.ts","sourceRoot":"","sources":["../../src/components/moni-list.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,qBACa,QAAS,SAAQ,WAAW;IACX,OAAO,EAAE,EAAE,GAAG,QAAQ,CAAM;IACb,OAAO,UAAS;IAE5D,OAAgB,MAAM,4BAkBpB;IAEO,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;KACtB;CACD;AAED,eAAe,QAAQ,CAAC"}
@@ -1,3 +1,9 @@
1
+ /**
2
+ * @file components/moni-list.ts
3
+ * @package @moni-labs/moni-ui
4
+ * @license MIT
5
+ * @contributors Moni Labs & Contributors
6
+ */
1
7
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
8
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
9
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,22 +14,40 @@ import { html, css } from 'lit';
8
14
  import { customElement, property } from 'lit/decorators.js';
9
15
  import { MoniElement, sharedStyles } from './_base/index.js';
10
16
  /**
11
- * Material 3 List (`m3-docs/components/lists/specs.md`).
17
+ * Material Design 3 List component.
18
+ *
19
+ * Lists are continuous, vertical indexes of text or images. They are
20
+ * container elements that provide structural grouping and optional
21
+ * divider lines for `<moni-list-item>` children.
22
+ *
23
+ * **M3 spec reference:** `m3-docs/components/lists/specs.md`
24
+ *
25
+ * **Container role:**
26
+ * The list itself does not apply padding or margins to its children. Spacing
27
+ * and internal padding are controlled entirely by the `<moni-list-item>`
28
+ * elements themselves to ensure proper hit targets and alignment.
12
29
  *
13
- * A list is a continuous vertical index of text and images. The
14
- * container itself is purely structural (no padding); spacing and
15
- * dividers are controlled by `<moni-list-item>` children.
30
+ * **Variants:**
31
+ * - `default` (empty string) A clean, borderless list container.
32
+ * - `border` Adds a bottom border to the list and displays horizontal
33
+ * dividers (`outline-variant` color) between list items.
16
34
  *
17
- * Two visual variants:
18
- * - **default**: 8dp top/bottom padding between items (handled by items).
19
- * - **border**: dividers drawn between items.
35
+ * @example
36
+ * ```html
37
+ * <!-- Standard list -->
38
+ * <moni-list>
39
+ * <moni-list-item headline="Item 1"></moni-list-item>
40
+ * <moni-list-item headline="Item 2"></moni-list-item>
41
+ * </moni-list>
20
42
  *
21
- * Attributes:
22
- * - variant: '' (default) | border
23
- * - rounded: when set, items use a 4dp corner radius.
43
+ * <!-- List with dividers and rounded items -->
44
+ * <moni-list variant="border" rounded>
45
+ * <moni-list-item icon="inbox" headline="Inbox"></moni-list-item>
46
+ * <moni-list-item icon="send" headline="Sent"></moni-list-item>
47
+ * </moni-list>
48
+ * ```
24
49
  *
25
- * Slots:
26
- * - default: <moni-list-item> children.
50
+ * @slot default - `<moni-list-item>` elements.
27
51
  */
28
52
  let MoniList = class MoniList extends MoniElement {
29
53
  constructor() {
@@ -1,17 +1,44 @@
1
+ /**
2
+ * @file components/moni-loading-indicator.ts
3
+ * @package @moni-labs/moni-ui
4
+ * @license MIT
5
+ * @contributors Moni Labs & Contributors
6
+ */
1
7
  import { MoniElement } from './_base/index.js';
2
8
  /**
3
- * Shape-shifting indeterminate loading indicator based on Material 3 Expressive spec.
9
+ * Material Design 3 Loading Indicator component.
10
+ *
11
+ * An indeterminate loading indicator that visually represents an unspecified
12
+ * wait time. Unlike standard circular spinners, this component uses a morphing
13
+ * polygon animation that shifts between shapes (circle, rounded square, etc.)
14
+ * in accordance with the high-fidelity M3 Expressive motion specifications.
15
+ *
16
+ * **Variants:**
17
+ * - `uncontained` (default) — A standalone morphing shape that inherits color
18
+ * from its text context (or defaults to `primary`).
19
+ * - `contained` — The morphing shape is placed inside a circular container
20
+ * with a distinct background color, useful for high-contrast loading states
21
+ * or overlaying imagery.
22
+ *
23
+ * **Animation & Accessibility:**
24
+ * The component manages its own SVG `<animate>` tags. The animation is
25
+ * automatically started/stopped via `connectedCallback`/`disconnectedCallback`
26
+ * to save CPU cycles when the element is off-screen. It applies standard ARIA
27
+ * roles (`role="progressbar"`) and value attributes to ensure screen readers
28
+ * identify it correctly as an indeterminate loading state.
29
+ *
30
+ * @example
31
+ * ```html
32
+ * <!-- Uncontained indicator -->
33
+ * <moni-loading-indicator></moni-loading-indicator>
4
34
  *
5
- * Attributes:
6
- * - variant: 'uncontained' (default) | 'contained'
35
+ * <!-- Contained indicator (default container is secondary-container) -->
36
+ * <moni-loading-indicator variant="contained"></moni-loading-indicator>
37
+ * ```
7
38
  *
8
- * CSS custom properties for customization:
9
- * - --moni-loading-indicator-size: Size of the active indicator (default: 2.375rem)
10
- * - --moni-loading-indicator-active-color: Active indicator color in uncontained mode (default: var(--primary))
11
- * - --moni-loading-indicator-contained-active-color: Active indicator color in contained mode (default: var(--on-primary-container))
12
- * - --moni-loading-indicator-contained-container-color: Background color of container in contained mode (default: var(--secondary-container))
13
- * - --moni-loading-indicator-container-shape: Border radius of container in contained mode (default: 9999px)
14
- * - --moni-loading-indicator-container-size: Container size (default: 3rem)
39
+ * @csspart container - The outer `.container` wrapper.
40
+ * @csspart svg - The inner `<svg>` element.
41
+ * @csspart shape - The `<path>` element that morphs.
15
42
  */
16
43
  export declare class MoniLoadingIndicator extends MoniElement {
17
44
  variant: 'uncontained' | 'contained';
@@ -21,7 +48,7 @@ export declare class MoniLoadingIndicator extends MoniElement {
21
48
  protected firstUpdated(): void;
22
49
  private _toggleAnimation;
23
50
  static styles: import("lit").CSSResult[];
24
- render(): import("lit-html").TemplateResult<1>;
51
+ render(): import("lit").TemplateResult<1>;
25
52
  }
26
53
  declare global {
27
54
  interface HTMLElementTagNameMap {
@@ -1 +1 @@
1
- {"version":3,"file":"moni-loading-indicator.d.ts","sourceRoot":"","sources":["../../src/components/moni-loading-indicator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AAG7D;;;;;;;;;;;;;GAaG;AACH,qBACa,oBAAqB,SAAQ,WAAW;IAEpD,OAAO,EAAE,aAAa,GAAG,WAAW,CAAiB;IAEhC,OAAO,CAAC,UAAU,CAAC,CAAc;IAE7C,iBAAiB;IAQjB,oBAAoB;cAKV,YAAY;IAI/B,OAAO,CAAC,gBAAgB;IAMxB,OAAgB,MAAM,4BAuHpB;IAEO,MAAM;CASf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,wBAAwB,EAAE,oBAAoB,CAAC;KAC/C;CACD;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"moni-loading-indicator.d.ts","sourceRoot":"","sources":["../../src/components/moni-loading-indicator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAC;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBACa,oBAAqB,SAAQ,WAAW;IAEpD,OAAO,EAAE,aAAa,GAAG,WAAW,CAAiB;IAEhC,OAAO,CAAC,UAAU,CAAC,CAAc;IAE7C,iBAAiB;IAQjB,oBAAoB;cAKV,YAAY;IAI/B,OAAO,CAAC,gBAAgB;IAMxB,OAAgB,MAAM,4BAuHpB;IAEO,MAAM;CASf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,wBAAwB,EAAE,oBAAoB,CAAC;KAC/C;CACD;AAED,eAAe,oBAAoB,CAAC"}