@universal-material/web 3.7.2 → 3.9.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 (453) hide show
  1. package/.claude-plugin/plugin.json +12 -0
  2. package/README.md +12 -0
  3. package/app-bar/top-app-bar.d.ts +20 -4
  4. package/app-bar/top-app-bar.d.ts.map +1 -1
  5. package/app-bar/top-app-bar.js +84 -33
  6. package/app-bar/top-app-bar.js.map +1 -1
  7. package/app-bar/top-app-bar.styles.d.ts.map +1 -1
  8. package/app-bar/top-app-bar.styles.js +18 -1
  9. package/app-bar/top-app-bar.styles.js.map +1 -1
  10. package/badge/badge.d.ts +5 -2
  11. package/badge/badge.d.ts.map +1 -1
  12. package/badge/badge.js +9 -6
  13. package/badge/badge.js.map +1 -1
  14. package/badge/badge.styles.d.ts.map +1 -1
  15. package/badge/badge.styles.js +1 -0
  16. package/badge/badge.styles.js.map +1 -1
  17. package/bundle.min.js +5480 -2170
  18. package/button/button-base.d.ts +9 -2
  19. package/button/button-base.d.ts.map +1 -1
  20. package/button/button-base.js +12 -5
  21. package/button/button-base.js.map +1 -1
  22. package/button/button-set.d.ts +3 -3
  23. package/button/button-set.d.ts.map +1 -1
  24. package/button/button-set.js +7 -7
  25. package/button/button-set.js.map +1 -1
  26. package/button/button.d.ts +10 -7
  27. package/button/button.d.ts.map +1 -1
  28. package/button/button.js +17 -14
  29. package/button/button.js.map +1 -1
  30. package/button/fab-menu-color-context.d.ts +2 -2
  31. package/button/fab-menu-color-context.d.ts.map +1 -1
  32. package/button/fab-menu-color-context.js.map +1 -1
  33. package/button/fab-menu-item.d.ts +3 -3
  34. package/button/fab-menu-item.d.ts.map +1 -1
  35. package/button/fab-menu-item.js +11 -11
  36. package/button/fab-menu-item.js.map +1 -1
  37. package/button/fab-menu.d.ts +20 -5
  38. package/button/fab-menu.d.ts.map +1 -1
  39. package/button/fab-menu.js +48 -11
  40. package/button/fab-menu.js.map +1 -1
  41. package/button/fab.d.ts +22 -7
  42. package/button/fab.d.ts.map +1 -1
  43. package/button/fab.js +49 -11
  44. package/button/fab.js.map +1 -1
  45. package/button/icon-button.d.ts +13 -7
  46. package/button/icon-button.d.ts.map +1 -1
  47. package/button/icon-button.js +14 -8
  48. package/button/icon-button.js.map +1 -1
  49. package/button/toggle-button.d.ts +6 -6
  50. package/button/toggle-button.d.ts.map +1 -1
  51. package/button/toggle-button.js +10 -10
  52. package/button/toggle-button.js.map +1 -1
  53. package/button-field/button-field.d.ts +6 -3
  54. package/button-field/button-field.d.ts.map +1 -1
  55. package/button-field/button-field.js +12 -9
  56. package/button-field/button-field.js.map +1 -1
  57. package/calendar/calendar-adapter.d.ts +3 -0
  58. package/calendar/calendar-adapter.d.ts.map +1 -1
  59. package/calendar/calendar-adapter.js.map +1 -1
  60. package/calendar/calendar-base.d.ts +18 -1
  61. package/calendar/calendar-base.d.ts.map +1 -1
  62. package/calendar/calendar-base.js +188 -25
  63. package/calendar/calendar-base.js.map +1 -1
  64. package/calendar/calendar.d.ts +6 -2
  65. package/calendar/calendar.d.ts.map +1 -1
  66. package/calendar/calendar.js +12 -8
  67. package/calendar/calendar.js.map +1 -1
  68. package/calendar/default-calendar-adapter.d.ts +3 -0
  69. package/calendar/default-calendar-adapter.d.ts.map +1 -1
  70. package/calendar/default-calendar-adapter.js +17 -5
  71. package/calendar/default-calendar-adapter.js.map +1 -1
  72. package/calendar/range-calendar.d.ts +2 -2
  73. package/calendar/range-calendar.d.ts.map +1 -1
  74. package/calendar/range-calendar.js +9 -9
  75. package/calendar/range-calendar.js.map +1 -1
  76. package/card/card-content.d.ts +7 -2
  77. package/card/card-content.d.ts.map +1 -1
  78. package/card/card-content.js +10 -5
  79. package/card/card-content.js.map +1 -1
  80. package/card/card-media.d.ts +5 -2
  81. package/card/card-media.d.ts.map +1 -1
  82. package/card/card-media.js +8 -5
  83. package/card/card-media.js.map +1 -1
  84. package/card/card.d.ts +4 -4
  85. package/card/card.d.ts.map +1 -1
  86. package/card/card.js +5 -5
  87. package/card/card.js.map +1 -1
  88. package/checkbox/checkbox-list-item.d.ts +4 -4
  89. package/checkbox/checkbox-list-item.d.ts.map +1 -1
  90. package/checkbox/checkbox-list-item.js +5 -5
  91. package/checkbox/checkbox-list-item.js.map +1 -1
  92. package/checkbox/checkbox.d.ts +10 -3
  93. package/checkbox/checkbox.d.ts.map +1 -1
  94. package/checkbox/checkbox.js +14 -7
  95. package/checkbox/checkbox.js.map +1 -1
  96. package/chip/chip-set.d.ts +3 -3
  97. package/chip/chip-set.d.ts.map +1 -1
  98. package/chip/chip-set.js +6 -6
  99. package/chip/chip-set.js.map +1 -1
  100. package/chip/chip.d.ts +8 -5
  101. package/chip/chip.d.ts.map +1 -1
  102. package/chip/chip.js +23 -20
  103. package/chip/chip.js.map +1 -1
  104. package/chip-field/chip-field.d.ts +6 -3
  105. package/chip-field/chip-field.d.ts.map +1 -1
  106. package/chip-field/chip-field.js +9 -9
  107. package/chip-field/chip-field.js.map +1 -1
  108. package/collapse/collapse.d.ts +26 -0
  109. package/collapse/collapse.d.ts.map +1 -0
  110. package/collapse/collapse.js +62 -0
  111. package/collapse/collapse.js.map +1 -0
  112. package/collapse/collapse.styles.d.ts +2 -0
  113. package/collapse/collapse.styles.d.ts.map +1 -0
  114. package/collapse/collapse.styles.js +8 -0
  115. package/collapse/collapse.styles.js.map +1 -0
  116. package/config.js.map +1 -1
  117. package/css/universal-material.css +2 -1
  118. package/css/universal-material.min.css +2 -1
  119. package/custom-elements.json +17175 -9684
  120. package/datepicker/datepicker.d.ts +54 -3
  121. package/datepicker/datepicker.d.ts.map +1 -1
  122. package/datepicker/datepicker.js +202 -6
  123. package/datepicker/datepicker.js.map +1 -1
  124. package/datepicker/datepicker.styles.d.ts.map +1 -1
  125. package/datepicker/datepicker.styles.js +25 -0
  126. package/datepicker/datepicker.styles.js.map +1 -1
  127. package/datepicker/format.d.ts +19 -0
  128. package/datepicker/format.d.ts.map +1 -0
  129. package/datepicker/format.js +47 -0
  130. package/datepicker/format.js.map +1 -0
  131. package/datepicker/range-datepicker.d.ts +58 -0
  132. package/datepicker/range-datepicker.d.ts.map +1 -0
  133. package/datepicker/range-datepicker.js +212 -0
  134. package/datepicker/range-datepicker.js.map +1 -0
  135. package/dialog/confirm-dialog-builder.d.ts +3 -3
  136. package/dialog/confirm-dialog-builder.d.ts.map +1 -1
  137. package/dialog/confirm-dialog-builder.js.map +1 -1
  138. package/dialog/dialog-builder.d.ts +5 -4
  139. package/dialog/dialog-builder.d.ts.map +1 -1
  140. package/dialog/dialog-builder.js +10 -3
  141. package/dialog/dialog-builder.js.map +1 -1
  142. package/dialog/dialog-button-def.d.ts +3 -3
  143. package/dialog/dialog-button-def.d.ts.map +1 -1
  144. package/dialog/dialog-button-def.js.map +1 -1
  145. package/dialog/dialog.d.ts +10 -2
  146. package/dialog/dialog.d.ts.map +1 -1
  147. package/dialog/dialog.js +22 -14
  148. package/dialog/dialog.js.map +1 -1
  149. package/dialog/message-dialog-builder.d.ts +2 -2
  150. package/dialog/message-dialog-builder.d.ts.map +1 -1
  151. package/dialog/message-dialog-builder.js.map +1 -1
  152. package/elevation/elevation.d.ts +2 -2
  153. package/elevation/elevation.d.ts.map +1 -1
  154. package/elevation/elevation.js +4 -4
  155. package/elevation/elevation.js.map +1 -1
  156. package/expansion-panel/expansion-panel-container.d.ts +24 -0
  157. package/expansion-panel/expansion-panel-container.d.ts.map +1 -0
  158. package/expansion-panel/expansion-panel-container.js +54 -0
  159. package/expansion-panel/expansion-panel-container.js.map +1 -0
  160. package/expansion-panel/expansion-panel-container.styles.d.ts +2 -0
  161. package/expansion-panel/expansion-panel-container.styles.d.ts.map +1 -0
  162. package/expansion-panel/expansion-panel-container.styles.js +9 -0
  163. package/expansion-panel/expansion-panel-container.styles.js.map +1 -0
  164. package/expansion-panel/expansion-panel.d.ts +37 -0
  165. package/expansion-panel/expansion-panel.d.ts.map +1 -0
  166. package/expansion-panel/expansion-panel.js +89 -0
  167. package/expansion-panel/expansion-panel.js.map +1 -0
  168. package/expansion-panel/expansion-panel.styles.d.ts +2 -0
  169. package/expansion-panel/expansion-panel.styles.d.ts.map +1 -0
  170. package/expansion-panel/expansion-panel.styles.js +66 -0
  171. package/expansion-panel/expansion-panel.styles.js.map +1 -0
  172. package/field/field-base.d.ts +17 -3
  173. package/field/field-base.d.ts.map +1 -1
  174. package/field/field-base.js +30 -20
  175. package/field/field-base.js.map +1 -1
  176. package/field/field-defaults-context.d.ts +2 -2
  177. package/field/field-defaults-context.d.ts.map +1 -1
  178. package/field/field-defaults-context.js.map +1 -1
  179. package/field/field-defaults.d.ts +3 -3
  180. package/field/field-defaults.d.ts.map +1 -1
  181. package/field/field-defaults.js.map +1 -1
  182. package/field/field-variant.d.ts +1 -1
  183. package/field/field-variant.d.ts.map +1 -1
  184. package/field/field-variant.js.map +1 -1
  185. package/field/field.d.ts +7 -3
  186. package/field/field.d.ts.map +1 -1
  187. package/field/field.js +10 -6
  188. package/field/field.js.map +1 -1
  189. package/icon/icon.d.ts +2 -2
  190. package/icon/icon.d.ts.map +1 -1
  191. package/icon/icon.js +4 -4
  192. package/icon/icon.js.map +1 -1
  193. package/index.d.ts +29 -1
  194. package/index.d.ts.map +1 -1
  195. package/index.js +29 -1
  196. package/index.js.map +1 -1
  197. package/list/list-item.d.ts +19 -2
  198. package/list/list-item.d.ts.map +1 -1
  199. package/list/list-item.js +29 -6
  200. package/list/list-item.js.map +1 -1
  201. package/list/list-item.styles.d.ts.map +1 -1
  202. package/list/list-item.styles.js +13 -0
  203. package/list/list-item.styles.js.map +1 -1
  204. package/list/list.d.ts +2 -2
  205. package/list/list.d.ts.map +1 -1
  206. package/list/list.js +4 -4
  207. package/list/list.js.map +1 -1
  208. package/menu/menu-item.d.ts +9 -3
  209. package/menu/menu-item.d.ts.map +1 -1
  210. package/menu/menu-item.js +16 -10
  211. package/menu/menu-item.js.map +1 -1
  212. package/menu/menu.d.ts +18 -2
  213. package/menu/menu.d.ts.map +1 -1
  214. package/menu/menu.js +37 -18
  215. package/menu/menu.js.map +1 -1
  216. package/menu/menu.styles.d.ts.map +1 -1
  217. package/menu/menu.styles.js +5 -0
  218. package/menu/menu.styles.js.map +1 -1
  219. package/navigation/drawer-headline.d.ts +2 -2
  220. package/navigation/drawer-headline.d.ts.map +1 -1
  221. package/navigation/drawer-headline.js +6 -6
  222. package/navigation/drawer-headline.js.map +1 -1
  223. package/navigation/drawer-headline.styles.js +1 -1
  224. package/navigation/drawer-headline.styles.js.map +1 -1
  225. package/navigation/drawer-item.d.ts +3 -3
  226. package/navigation/drawer-item.d.ts.map +1 -1
  227. package/navigation/drawer-item.js +17 -12
  228. package/navigation/drawer-item.js.map +1 -1
  229. package/navigation/drawer.d.ts +2 -2
  230. package/navigation/drawer.d.ts.map +1 -1
  231. package/navigation/drawer.js +4 -4
  232. package/navigation/drawer.js.map +1 -1
  233. package/navigation/side-navigation.d.ts +9 -2
  234. package/navigation/side-navigation.d.ts.map +1 -1
  235. package/navigation/side-navigation.js +15 -8
  236. package/navigation/side-navigation.js.map +1 -1
  237. package/navigation-bar/navigation-bar-item.d.ts +40 -0
  238. package/navigation-bar/navigation-bar-item.d.ts.map +1 -0
  239. package/navigation-bar/navigation-bar-item.js +113 -0
  240. package/navigation-bar/navigation-bar-item.js.map +1 -0
  241. package/navigation-bar/navigation-bar-item.styles.d.ts +2 -0
  242. package/navigation-bar/navigation-bar-item.styles.d.ts.map +1 -0
  243. package/navigation-bar/navigation-bar-item.styles.js +101 -0
  244. package/navigation-bar/navigation-bar-item.styles.js.map +1 -0
  245. package/navigation-bar/navigation-bar.d.ts +40 -0
  246. package/navigation-bar/navigation-bar.d.ts.map +1 -0
  247. package/navigation-bar/navigation-bar.js +85 -0
  248. package/navigation-bar/navigation-bar.js.map +1 -0
  249. package/navigation-bar/navigation-bar.styles.d.ts +2 -0
  250. package/navigation-bar/navigation-bar.styles.d.ts.map +1 -0
  251. package/navigation-bar/navigation-bar.styles.js +44 -0
  252. package/navigation-bar/navigation-bar.styles.js.map +1 -0
  253. package/navigation-rail/navigation-rail-headline.d.ts +23 -0
  254. package/navigation-rail/navigation-rail-headline.d.ts.map +1 -0
  255. package/navigation-rail/navigation-rail-headline.js +28 -0
  256. package/navigation-rail/navigation-rail-headline.js.map +1 -0
  257. package/navigation-rail/navigation-rail-headline.styles.d.ts +2 -0
  258. package/navigation-rail/navigation-rail-headline.styles.d.ts.map +1 -0
  259. package/navigation-rail/navigation-rail-headline.styles.js +19 -0
  260. package/navigation-rail/navigation-rail-headline.styles.js.map +1 -0
  261. package/navigation-rail/navigation-rail-item.d.ts +58 -0
  262. package/navigation-rail/navigation-rail-item.d.ts.map +1 -0
  263. package/navigation-rail/navigation-rail-item.js +160 -0
  264. package/navigation-rail/navigation-rail-item.js.map +1 -0
  265. package/navigation-rail/navigation-rail-item.styles.d.ts +2 -0
  266. package/navigation-rail/navigation-rail-item.styles.d.ts.map +1 -0
  267. package/navigation-rail/navigation-rail-item.styles.js +182 -0
  268. package/navigation-rail/navigation-rail-item.styles.js.map +1 -0
  269. package/navigation-rail/navigation-rail.d.ts +66 -0
  270. package/navigation-rail/navigation-rail.d.ts.map +1 -0
  271. package/navigation-rail/navigation-rail.js +223 -0
  272. package/navigation-rail/navigation-rail.js.map +1 -0
  273. package/navigation-rail/navigation-rail.styles.d.ts +2 -0
  274. package/navigation-rail/navigation-rail.styles.d.ts.map +1 -0
  275. package/navigation-rail/navigation-rail.styles.js +220 -0
  276. package/navigation-rail/navigation-rail.styles.js.map +1 -0
  277. package/overflow-menu/overflow-menu-item.d.ts +8 -0
  278. package/overflow-menu/overflow-menu-item.d.ts.map +1 -1
  279. package/overflow-menu/overflow-menu-item.js +8 -0
  280. package/overflow-menu/overflow-menu-item.js.map +1 -1
  281. package/overflow-menu/overflow-menu.d.ts +8 -2
  282. package/overflow-menu/overflow-menu.d.ts.map +1 -1
  283. package/overflow-menu/overflow-menu.js +10 -1
  284. package/overflow-menu/overflow-menu.js.map +1 -1
  285. package/package.json +21 -5
  286. package/progress/circular-progress.d.ts +9 -2
  287. package/progress/circular-progress.d.ts.map +1 -1
  288. package/progress/circular-progress.js +9 -6
  289. package/progress/circular-progress.js.map +1 -1
  290. package/progress/progress-bar.d.ts +9 -2
  291. package/progress/progress-bar.d.ts.map +1 -1
  292. package/progress/progress-bar.js +9 -6
  293. package/progress/progress-bar.js.map +1 -1
  294. package/radio/radio-list-item.d.ts +4 -4
  295. package/radio/radio-list-item.d.ts.map +1 -1
  296. package/radio/radio-list-item.js +5 -5
  297. package/radio/radio-list-item.js.map +1 -1
  298. package/radio/radio.d.ts +6 -3
  299. package/radio/radio.d.ts.map +1 -1
  300. package/radio/radio.js +9 -6
  301. package/radio/radio.js.map +1 -1
  302. package/ripple/ripple.d.ts +2 -2
  303. package/ripple/ripple.d.ts.map +1 -1
  304. package/ripple/ripple.js +9 -9
  305. package/ripple/ripple.js.map +1 -1
  306. package/scaffold/pane.d.ts +127 -0
  307. package/scaffold/pane.d.ts.map +1 -0
  308. package/scaffold/pane.js +220 -0
  309. package/scaffold/pane.js.map +1 -0
  310. package/scaffold/pane.styles.d.ts +2 -0
  311. package/scaffold/pane.styles.d.ts.map +1 -0
  312. package/scaffold/pane.styles.js +1909 -0
  313. package/scaffold/pane.styles.js.map +1 -0
  314. package/scaffold/scaffold.d.ts +45 -0
  315. package/scaffold/scaffold.d.ts.map +1 -0
  316. package/scaffold/scaffold.js +170 -0
  317. package/scaffold/scaffold.js.map +1 -0
  318. package/scaffold/scaffold.styles.d.ts +2 -0
  319. package/scaffold/scaffold.styles.d.ts.map +1 -0
  320. package/scaffold/scaffold.styles.js +69 -0
  321. package/scaffold/scaffold.styles.js.map +1 -0
  322. package/scaffold/scroll-container-context.d.ts +4 -0
  323. package/scaffold/scroll-container-context.d.ts.map +1 -0
  324. package/scaffold/scroll-container-context.js +3 -0
  325. package/scaffold/scroll-container-context.js.map +1 -0
  326. package/scss/utilities/_divider.scss +4 -0
  327. package/search/search.d.ts +6 -3
  328. package/search/search.d.ts.map +1 -1
  329. package/search/search.js +10 -7
  330. package/search/search.js.map +1 -1
  331. package/search/search.styles.d.ts.map +1 -1
  332. package/search/search.styles.js +7 -2
  333. package/search/search.styles.js.map +1 -1
  334. package/select/option.d.ts +9 -3
  335. package/select/option.d.ts.map +1 -1
  336. package/select/option.js +14 -8
  337. package/select/option.js.map +1 -1
  338. package/select/select-navigation-controller.d.ts +4 -4
  339. package/select/select-navigation-controller.d.ts.map +1 -1
  340. package/select/select-navigation-controller.js.map +1 -1
  341. package/select/select.d.ts +22 -12
  342. package/select/select.d.ts.map +1 -1
  343. package/select/select.js +81 -31
  344. package/select/select.js.map +1 -1
  345. package/shared/button-wrapper.d.ts +4 -1
  346. package/shared/button-wrapper.d.ts.map +1 -1
  347. package/shared/button-wrapper.js +8 -8
  348. package/shared/button-wrapper.js.map +1 -1
  349. package/shared/char-count-text-field/native-text-field-wrapper.d.ts +15 -2
  350. package/shared/char-count-text-field/native-text-field-wrapper.d.ts.map +1 -1
  351. package/shared/char-count-text-field/native-text-field-wrapper.js +16 -6
  352. package/shared/char-count-text-field/native-text-field-wrapper.js.map +1 -1
  353. package/shared/menu-field/menu-field-navigation-controller.d.ts +3 -3
  354. package/shared/menu-field/menu-field-navigation-controller.d.ts.map +1 -1
  355. package/shared/menu-field/menu-field-navigation-controller.js.map +1 -1
  356. package/shared/menu-field/menu-field.d.ts +5 -5
  357. package/shared/menu-field/menu-field.d.ts.map +1 -1
  358. package/shared/menu-field/menu-field.js.map +1 -1
  359. package/shared/selection-control/selection-control-list-item.d.ts +2 -2
  360. package/shared/selection-control/selection-control-list-item.d.ts.map +1 -1
  361. package/shared/selection-control/selection-control-list-item.js +14 -1
  362. package/shared/selection-control/selection-control-list-item.js.map +1 -1
  363. package/shared/selection-control/selection-control.d.ts +10 -1
  364. package/shared/selection-control/selection-control.d.ts.map +1 -1
  365. package/shared/selection-control/selection-control.js +24 -7
  366. package/shared/selection-control/selection-control.js.map +1 -1
  367. package/shared/sets/set-base.d.ts +1 -1
  368. package/shared/sets/set-base.d.ts.map +1 -1
  369. package/shared/sets/set-base.js +2 -2
  370. package/shared/sets/set-base.js.map +1 -1
  371. package/shared/text-field-base/text-field-base.d.ts +37 -2
  372. package/shared/text-field-base/text-field-base.d.ts.map +1 -1
  373. package/shared/text-field-base/text-field-base.js +66 -4
  374. package/shared/text-field-base/text-field-base.js.map +1 -1
  375. package/skills/badge/SKILL.md +43 -0
  376. package/skills/buttons/SKILL.md +115 -0
  377. package/skills/card/SKILL.md +162 -0
  378. package/skills/chips/SKILL.md +95 -0
  379. package/skills/collapse/SKILL.md +37 -0
  380. package/skills/datepicker/SKILL.md +110 -0
  381. package/skills/dialog/SKILL.md +92 -0
  382. package/skills/drawer/SKILL.md +94 -0
  383. package/skills/expansion-panel/SKILL.md +65 -0
  384. package/skills/fab/SKILL.md +79 -0
  385. package/skills/list/SKILL.md +105 -0
  386. package/skills/menu/SKILL.md +120 -0
  387. package/skills/navigation-bar/SKILL.md +87 -0
  388. package/skills/navigation-rail/SKILL.md +127 -0
  389. package/skills/overview/SKILL.md +44 -0
  390. package/skills/progress/SKILL.md +63 -0
  391. package/skills/scaffold/SKILL.md +392 -0
  392. package/skills/search/SKILL.md +65 -0
  393. package/skills/select/SKILL.md +120 -0
  394. package/skills/selection-controls/SKILL.md +88 -0
  395. package/skills/setup/SKILL.md +58 -0
  396. package/skills/slider/SKILL.md +119 -0
  397. package/skills/snackbar/SKILL.md +70 -0
  398. package/skills/tab-bar/SKILL.md +55 -0
  399. package/skills/text-field/SKILL.md +114 -0
  400. package/skills/theming/SKILL.md +80 -0
  401. package/skills/top-app-bar/SKILL.md +64 -0
  402. package/skills/typeahead/SKILL.md +113 -0
  403. package/slider/slider.d.ts +73 -0
  404. package/slider/slider.d.ts.map +1 -0
  405. package/slider/slider.js +506 -0
  406. package/slider/slider.js.map +1 -0
  407. package/slider/slider.styles.d.ts +2 -0
  408. package/slider/slider.styles.d.ts.map +1 -0
  409. package/slider/slider.styles.js +292 -0
  410. package/slider/slider.styles.js.map +1 -0
  411. package/snackbar/snackbar.d.ts +13 -4
  412. package/snackbar/snackbar.d.ts.map +1 -1
  413. package/snackbar/snackbar.js +37 -28
  414. package/snackbar/snackbar.js.map +1 -1
  415. package/snackbar/snackbar.styles.js +1 -1
  416. package/snackbar/snackbar.styles.js.map +1 -1
  417. package/switch/switch-list-item.d.ts +4 -4
  418. package/switch/switch-list-item.d.ts.map +1 -1
  419. package/switch/switch-list-item.js +5 -5
  420. package/switch/switch-list-item.js.map +1 -1
  421. package/switch/switch.d.ts +3 -3
  422. package/switch/switch.d.ts.map +1 -1
  423. package/switch/switch.js +5 -5
  424. package/switch/switch.js.map +1 -1
  425. package/tab-bar/tab-bar.d.ts +9 -6
  426. package/tab-bar/tab-bar.d.ts.map +1 -1
  427. package/tab-bar/tab-bar.js +43 -23
  428. package/tab-bar/tab-bar.js.map +1 -1
  429. package/tab-bar/tab.d.ts +10 -5
  430. package/tab-bar/tab.d.ts.map +1 -1
  431. package/tab-bar/tab.js +14 -9
  432. package/tab-bar/tab.js.map +1 -1
  433. package/text-area/text-area.d.ts +6 -3
  434. package/text-area/text-area.d.ts.map +1 -1
  435. package/text-area/text-area.js +12 -9
  436. package/text-area/text-area.js.map +1 -1
  437. package/text-field/text-field.d.ts +31 -3
  438. package/text-field/text-field.d.ts.map +1 -1
  439. package/text-field/text-field.js +53 -13
  440. package/text-field/text-field.js.map +1 -1
  441. package/typeahead/highlight.d.ts +2 -2
  442. package/typeahead/highlight.d.ts.map +1 -1
  443. package/typeahead/highlight.js +7 -7
  444. package/typeahead/highlight.js.map +1 -1
  445. package/typeahead/typeahead-template-render.d.ts +4 -0
  446. package/typeahead/typeahead-template-render.d.ts.map +1 -1
  447. package/typeahead/typeahead-template-render.js +4 -0
  448. package/typeahead/typeahead-template-render.js.map +1 -1
  449. package/typeahead/typeahead.d.ts +14 -7
  450. package/typeahead/typeahead.d.ts.map +1 -1
  451. package/typeahead/typeahead.js +29 -18
  452. package/typeahead/typeahead.js.map +1 -1
  453. package/vscode.html-custom-data.json +1146 -326
@@ -1 +1 @@
1
- {"version":3,"file":"text-field-base.d.ts","sourceRoot":"","sources":["../../../src/shared/text-field-base/text-field-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAK/D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,8BAAsB,eAAgB,SAAQ,WAAW;IACvD,MAAM,CAAC,QAAQ,CAAC,cAAc,QAAQ;IAEtC,OAAgB,MAAM,EAAE,cAAc,CAAgC;IAEtE,OAAgB,iBAAiB,EAAE,cAAc,CAG/C;IAEF;;OAEG;IACM,KAAK,UAAQ;IAEO,WAAW,SAAM;IAE9C,IAAI,IAAI,IAAI,eAAe,GAAG,IAAI,CAEjC;IAED,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;;CAMvD"}
1
+ {"version":3,"file":"text-field-base.d.ts","sourceRoot":"","sources":["../../../src/shared/text-field-base/text-field-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAK/D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,qFAAqF;AACrF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,8BAAsB,aAAc,SAAQ,SAAS;IACnD,MAAM,CAAC,QAAQ,CAAC,cAAc,QAAQ;IAEtC,OAAgB,MAAM,EAAE,cAAc,CAA8B;IAEpE,OAAgB,iBAAiB,EAAE,cAAc,CAG/C;IAEF;;OAEG;IACM,KAAK,UAAQ;IAEtB;;OAEG;IAC0B,WAAW,SAAM;IAE9C;;;OAGG;IACyC,QAAQ,UAAS;IAE7D,IAAI,IAAI,IAAI,eAAe,GAAG,IAAI,CAEjC;IAED,6EAA6E;IAC7E,IAAI,QAAQ,IAAI,aAAa,CAE5B;IAED,yEAAyE;IACzE,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAED,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;;IAOtD;;;;OAIG;IACH,SAAS,CAAC,YAAY,IAAI,aAAa;IASvC,2EAA2E;IAC3E,SAAS,CAAC,aAAa,IAAI,IAAI;IAa/B,4EAA4E;IAC5E,aAAa,IAAI,OAAO;IAKxB;;;OAGG;IACH,cAAc,IAAI,OAAO;cAON,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;CAK1D"}
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { LitElement } from 'lit';
3
3
  import { property } from 'lit/decorators.js';
4
- import { UmFieldBase } from '../../field/field-base.js';
4
+ import { FieldBase } from '../../field/field-base.js';
5
5
  import { styles } from './text-field-base.styles.js';
6
- export class UmTextFieldBase extends UmFieldBase {
6
+ export class TextFieldBase extends FieldBase {
7
7
  static { this.formAssociated = true; }
8
- static { this.styles = [UmFieldBase.styles, styles]; }
8
+ static { this.styles = [FieldBase.styles, styles]; }
9
9
  static { this.shadowRootOptions = {
10
10
  ...LitElement.shadowRootOptions,
11
11
  delegatesFocus: true,
@@ -13,17 +13,79 @@ export class UmTextFieldBase extends UmFieldBase {
13
13
  get form() {
14
14
  return this.elementInternals.form;
15
15
  }
16
+ /** The live `ValidityState` of the field (mirrors a native form control). */
17
+ get validity() {
18
+ return this.elementInternals.validity;
19
+ }
20
+ /** The message shown by `reportValidity()` when the field is invalid. */
21
+ get validationMessage() {
22
+ return this.elementInternals.validationMessage;
23
+ }
16
24
  constructor() {
17
25
  super();
18
26
  /**
19
27
  * Whether the field is empty or not. This changes the behavior of the floating label when the field is not focused.
20
28
  */
21
29
  this.empty = true;
30
+ /**
31
+ * The placeholder text shown when the field is empty
32
+ */
22
33
  this.placeholder = '';
34
+ /**
35
+ * Whether the field must have a value to satisfy constraint validation.
36
+ * Drives `checkValidity()`/`reportValidity()` and blocks native form submit.
37
+ */
38
+ this.required = false;
23
39
  this.elementInternals = this.attachInternals();
24
40
  }
41
+ /**
42
+ * Reports the current validity. Subclasses override to delegate to a native
43
+ * input (`u-text-field`) or compute their own (`u-select`). The default only
44
+ * enforces `required` against the empty state.
45
+ */
46
+ _getValidity() {
47
+ const valueMissing = this.required && this.empty;
48
+ return {
49
+ flags: { valueMissing },
50
+ message: valueMissing ? 'Please fill out this field.' : '',
51
+ };
52
+ }
53
+ /** Pushes the subclass's validity into the ElementInternals form state. */
54
+ _syncValidity() {
55
+ const { flags, message, anchor } = this._getValidity();
56
+ const isValid = !Object.values(flags).some(Boolean);
57
+ if (isValid) {
58
+ this.elementInternals.setValidity({});
59
+ return;
60
+ }
61
+ // A non-empty message is required when any flag is set.
62
+ this.elementInternals.setValidity(flags, message || 'Invalid value.', anchor);
63
+ }
64
+ /** Returns whether the field is valid (fires an `invalid` event if not). */
65
+ checkValidity() {
66
+ this._syncValidity();
67
+ return this.elementInternals.checkValidity();
68
+ }
69
+ /**
70
+ * Like `checkValidity()`, but also surfaces the native validation bubble and
71
+ * reflects the result onto the visual `invalid` state.
72
+ */
73
+ reportValidity() {
74
+ this._syncValidity();
75
+ const valid = this.elementInternals.reportValidity();
76
+ this.invalid = !valid;
77
+ return valid;
78
+ }
79
+ updated(changed) {
80
+ super.updated(changed);
81
+ // Keep the form-level validity current so native submit honors constraints.
82
+ this._syncValidity();
83
+ }
25
84
  }
26
85
  __decorate([
27
86
  property({ reflect: true })
28
- ], UmTextFieldBase.prototype, "placeholder", void 0);
87
+ ], TextFieldBase.prototype, "placeholder", void 0);
88
+ __decorate([
89
+ property({ type: Boolean, reflect: true })
90
+ ], TextFieldBase.prototype, "required", void 0);
29
91
  //# sourceMappingURL=text-field-base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-field-base.js","sourceRoot":"","sources":["../../../src/shared/text-field-base/text-field-base.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,MAAM,OAAgB,eAAgB,SAAQ,WAAW;aACvC,mBAAc,GAAG,IAAI,AAAP,CAAQ;aAEtB,WAAM,GAAmB,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,AAA/C,CAAgD;aAEtD,sBAAiB,GAAmB;QAClD,GAAG,UAAU,CAAC,iBAAiB;QAC/B,cAAc,EAAE,IAAI;KACrB,AAHgC,CAG/B;IASF,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;IACpC,CAAC;IAID;QACE,KAAK,EAAE,CAAC;QAdV;;WAEG;QACM,UAAK,GAAG,IAAI,CAAC;QAEO,gBAAW,GAAG,EAAE,CAAC;QAU5C,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;IACjD,CAAC;;AAX4B;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAAkB","sourcesContent":["import { CSSResultGroup } from '@lit/reactive-element/css-tag';\n\nimport { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { UmFieldBase } from '../../field/field-base.js';\nimport { styles } from './text-field-base.styles.js';\n\nexport abstract class UmTextFieldBase extends UmFieldBase {\n static readonly formAssociated = true;\n\n static override styles: CSSResultGroup = [UmFieldBase.styles, styles];\n\n static override shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /**\n * Whether the field is empty or not. This changes the behavior of the floating label when the field is not focused.\n */\n override empty = true;\n\n @property({ reflect: true }) placeholder = '';\n\n get form(): HTMLFormElement | null {\n return this.elementInternals.form;\n }\n\n protected readonly elementInternals: ElementInternals;\n\n constructor() {\n super();\n this.elementInternals = this.attachInternals();\n }\n}\n"]}
1
+ {"version":3,"file":"text-field-base.js","sourceRoot":"","sources":["../../../src/shared/text-field-base/text-field-base.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AASrD,MAAM,OAAgB,aAAc,SAAQ,SAAS;aACnC,mBAAc,GAAG,IAAI,AAAP,CAAQ;aAEtB,WAAM,GAAmB,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,AAA7C,CAA8C;aAEpD,sBAAiB,GAAmB;QAClD,GAAG,UAAU,CAAC,iBAAiB;QAC/B,cAAc,EAAE,IAAI;KACrB,AAHgC,CAG/B;IAkBF,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;IACpC,CAAC;IAED,6EAA6E;IAC7E,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC;IACxC,CAAC;IAED,yEAAyE;IACzE,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC;IACjD,CAAC;IAID;QACE,KAAK,EAAE,CAAC;QAjCV;;WAEG;QACM,UAAK,GAAG,IAAI,CAAC;QAEtB;;WAEG;QAC0B,gBAAW,GAAG,EAAE,CAAC;QAE9C;;;WAGG;QACyC,aAAQ,GAAG,KAAK,CAAC;QAoB3D,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;IACjD,CAAC;IAED;;;;OAIG;IACO,YAAY;QACpB,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC;QAEjD,OAAO;YACL,KAAK,EAAE,EAAE,YAAY,EAAE;YACvB,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,EAAE;SAC3D,CAAC;IACJ,CAAC;IAED,2EAA2E;IACjE,aAAa;QACrB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACvD,MAAM,OAAO,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEpD,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;YACtC,OAAO;QACT,CAAC;QAED,wDAAwD;QACxD,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,CAAC,CAAC;IAChF,CAAC;IAED,4EAA4E;IAC5E,aAAa;QACX,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACH,cAAc;QACZ,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC;QACtB,OAAO,KAAK,CAAC;IACf,CAAC;IAEkB,OAAO,CAAC,OAAuB;QAChD,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvB,4EAA4E;QAC5E,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;;AA9E4B;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAAkB;AAMF;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAkB","sourcesContent":["import { PropertyValues } from '@lit/reactive-element';\nimport { CSSResultGroup } from '@lit/reactive-element/css-tag';\n\nimport { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport { FieldBase } from '../../field/field-base.js';\nimport { styles } from './text-field-base.styles.js';\n\n/** The validity flags a subclass reports, plus the message/anchor for the bubble. */\nexport interface FieldValidity {\n flags: ValidityStateFlags;\n message: string;\n anchor?: HTMLElement;\n}\n\nexport abstract class TextFieldBase extends FieldBase {\n static readonly formAssociated = true;\n\n static override styles: CSSResultGroup = [FieldBase.styles, styles];\n\n static override shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /**\n * Whether the field is empty or not. This changes the behavior of the floating label when the field is not focused.\n */\n override empty = true;\n\n /**\n * The placeholder text shown when the field is empty\n */\n @property({ reflect: true }) placeholder = '';\n\n /**\n * Whether the field must have a value to satisfy constraint validation.\n * Drives `checkValidity()`/`reportValidity()` and blocks native form submit.\n */\n @property({ type: Boolean, reflect: true }) required = false;\n\n get form(): HTMLFormElement | null {\n return this.elementInternals.form;\n }\n\n /** The live `ValidityState` of the field (mirrors a native form control). */\n get validity(): ValidityState {\n return this.elementInternals.validity;\n }\n\n /** The message shown by `reportValidity()` when the field is invalid. */\n get validationMessage(): string {\n return this.elementInternals.validationMessage;\n }\n\n protected readonly elementInternals: ElementInternals;\n\n constructor() {\n super();\n this.elementInternals = this.attachInternals();\n }\n\n /**\n * Reports the current validity. Subclasses override to delegate to a native\n * input (`u-text-field`) or compute their own (`u-select`). The default only\n * enforces `required` against the empty state.\n */\n protected _getValidity(): FieldValidity {\n const valueMissing = this.required && this.empty;\n\n return {\n flags: { valueMissing },\n message: valueMissing ? 'Please fill out this field.' : '',\n };\n }\n\n /** Pushes the subclass's validity into the ElementInternals form state. */\n protected _syncValidity(): void {\n const { flags, message, anchor } = this._getValidity();\n const isValid = !Object.values(flags).some(Boolean);\n\n if (isValid) {\n this.elementInternals.setValidity({});\n return;\n }\n\n // A non-empty message is required when any flag is set.\n this.elementInternals.setValidity(flags, message || 'Invalid value.', anchor);\n }\n\n /** Returns whether the field is valid (fires an `invalid` event if not). */\n checkValidity(): boolean {\n this._syncValidity();\n return this.elementInternals.checkValidity();\n }\n\n /**\n * Like `checkValidity()`, but also surfaces the native validation bubble and\n * reflects the result onto the visual `invalid` state.\n */\n reportValidity(): boolean {\n this._syncValidity();\n const valid = this.elementInternals.reportValidity();\n this.invalid = !valid;\n return valid;\n }\n\n protected override updated(changed: PropertyValues): void {\n super.updated(changed);\n // Keep the form-level validity current so native submit honors constraints.\n this._syncValidity();\n }\n}\n"]}
@@ -0,0 +1,43 @@
1
+ ---
2
+ description: Show a u-badge — a small count or status dot. Floating over an icon by default, or `static` for an inline count next to text.
3
+ ---
4
+
5
+ # Badge
6
+
7
+ `<u-badge>` is a small count/dot with two modes.
8
+
9
+ ## Floating (default) — over an icon
10
+
11
+ By default the badge is **absolutely positioned**, dotting the top-right corner of its nearest positioned ancestor (usually an icon). Put it inside the icon, or in a component's `badge` slot:
12
+
13
+ ```html
14
+ <!-- over an icon button -->
15
+ <u-icon-button aria-label="Notifications">
16
+ <span class="material-symbols-outlined">notifications<u-badge>3</u-badge></span>
17
+ </u-icon-button>
18
+
19
+ <!-- nav-bar / nav-rail item: the `badge` slot floats over the item's icon -->
20
+ <u-navigation-bar-item>
21
+ <span class="material-symbols-outlined" slot="icon">inbox</span>
22
+ Inbox
23
+ <u-badge slot="badge">12</u-badge>
24
+ </u-navigation-bar-item>
25
+ ```
26
+
27
+ An empty `<u-badge></u-badge>` renders a small **dot** (no number).
28
+
29
+ ## `static` — inline count next to text
30
+
31
+ Add `static` to render the badge **in flow** (not floating) — for a count chip beside a heading or label:
32
+
33
+ ```html
34
+ <div class="flex items-center gap-2">
35
+ <span class="u-title-l">Alerts</span>
36
+ <u-badge static>3</u-badge>
37
+ </div>
38
+ ```
39
+
40
+ ## Caveats
41
+
42
+ - **Don't put a floating `<u-badge>` in a `<u-drawer-item>`'s `badge` slot** — there the badge must sit inline at the row's trailing edge, so use a plain `<span slot="badge">12</span>` (the drawer item styles it). A floating `<u-badge>` would position absolutely and land in the wrong place. (Nav-rail / nav-bar items are the opposite — their `badge` slot *does* take a floating `<u-badge>`, since it overlays the icon.)
43
+ - The floating badge anchors to the nearest positioned ancestor (the icon/button provides one). For an inline count next to plain text, use `static`.
@@ -0,0 +1,115 @@
1
+ ---
2
+ description: Use Material 3 common buttons — u-button (filled, tonal, elevated, outlined, text), u-icon-button, u-button-set for grouping.
3
+ ---
4
+
5
+ # Common buttons
6
+
7
+ ## `<u-button>` — text + optional icon
8
+
9
+ Five variants (`filled` default, `tonal`, `elevated`, `outlined`, `text`) and four colors (`primary` default, `secondary`, `tertiary`, `error`):
10
+
11
+ ```html
12
+ <u-button>Save</u-button>
13
+ <u-button variant="tonal">Save</u-button>
14
+ <u-button variant="elevated">Save</u-button>
15
+ <u-button variant="outlined">Save</u-button>
16
+ <u-button variant="text">Save</u-button>
17
+
18
+ <u-button color="error">Delete</u-button>
19
+ ```
20
+
21
+ With an icon (default position: before the label):
22
+
23
+ ```html
24
+ <u-button>
25
+ <span class="material-symbols-outlined" slot="icon">save</span>
26
+ Save
27
+ </u-button>
28
+ ```
29
+
30
+ Trailing icon:
31
+
32
+ ```html
33
+ <u-button trailing-icon>
34
+ Open
35
+ <span class="material-symbols-outlined" slot="icon">arrow_outward</span>
36
+ </u-button>
37
+ ```
38
+
39
+ ## Sizes and shapes
40
+
41
+ ```html
42
+ <u-button size="extra-small">XS</u-button>
43
+ <u-button size="small">S</u-button>
44
+ <u-button size="medium">M</u-button>
45
+ <u-button size="large">L</u-button>
46
+ <u-button size="extra-large">XL</u-button>
47
+
48
+ <u-button shape="square">Square</u-button>
49
+ <u-button shape="round">Round (default)</u-button>
50
+ ```
51
+
52
+ ## Toggling
53
+
54
+ ```html
55
+ <u-button toggle [selected]="favorited" (change)="favorited = $event.target.selected">
56
+ <span class="material-symbols-outlined" slot="icon">favorite_border</span>
57
+ <span class="material-symbols-outlined" slot="icon-selected">favorite</span>
58
+ Favorite
59
+ </u-button>
60
+ ```
61
+
62
+ Use `toggle-shape` to morph between `round` and `square` when toggled.
63
+
64
+ ## Forms
65
+
66
+ `<u-button>` is form-associated. It submits the parent `<form>` by default (`type="submit"`). Override with `type="button"` or `type="reset"`.
67
+
68
+ ## `<u-icon-button>` — icon only
69
+
70
+ ```html
71
+ <u-icon-button>
72
+ <span class="material-symbols-outlined">favorite</span>
73
+ </u-icon-button>
74
+
75
+ <u-icon-button variant="filled" color="primary">
76
+ <span class="material-symbols-outlined">add</span>
77
+ </u-icon-button>
78
+ ```
79
+
80
+ Variants: `standard` (default), `filled`, `tonal`, `outlined`. Widths: `default`, `narrow`, `wide`.
81
+
82
+ For toggle icon buttons, use the `selected` slot for the "active" icon:
83
+
84
+ ```html
85
+ <u-icon-button toggle>
86
+ <span class="material-symbols-outlined">favorite_border</span>
87
+ <span class="material-symbols-outlined" slot="selected">favorite</span>
88
+ </u-icon-button>
89
+ ```
90
+
91
+ ## `<u-button-set>` — grouping
92
+
93
+ Standardizes spacing and alignment for a row of action buttons. Default alignment is `end` (right-aligned), which matches dialog/form action rows.
94
+
95
+ ```html
96
+ <u-button-set>
97
+ <u-button variant="text">Cancel</u-button>
98
+ <u-button>Save</u-button>
99
+ </u-button-set>
100
+
101
+ <u-button-set alignment="start">…</u-button-set>
102
+ <u-button-set alignment="center">…</u-button-set>
103
+ <u-button-set alignment="end">…</u-button-set>
104
+
105
+ <u-button-set stack>
106
+ <u-button>Continue</u-button>
107
+ <u-button variant="outlined">Sign in instead</u-button>
108
+ <u-button variant="text">Cancel</u-button>
109
+ </u-button-set>
110
+ ```
111
+
112
+ ## Caveats
113
+
114
+ - For alignment to be visible the button-set must have available width. In a flex-row parent that's content-sized, set `width: 100%` or a fixed width on the button-set.
115
+ - A button-set accepts any button-like child (`<u-button>`, `<u-icon-button>`, `<u-fab>`) and aligns them on the same baseline.
@@ -0,0 +1,162 @@
1
+ ---
2
+ description: Use u-card for Material 3 cards — filled, outlined and elevated variants. Slot media in `before-content`; put body content directly inside the card (no manual u-card-content wrapper).
3
+ ---
4
+
5
+ # Card
6
+
7
+ A container for related content. Three visual variants — `filled` (default), `outlined`, `elevated` — chosen via the `variant` attribute.
8
+
9
+ ## Anatomy
10
+
11
+ `<u-card>` wraps the default slot in an internal padded region automatically. It exposes three slots:
12
+
13
+ | Slot | Purpose |
14
+ | --- | --- |
15
+ | `before-content` | Banner / media / hero placed flush to the card edges (no padding). Use for `<u-card-media>` or any custom hero element. |
16
+ | default | Body content. Gets the standard 16dp padding from the card itself. |
17
+ | `after-content` | Footer placed flush to the bottom edge (no padding). Use for full-bleed action bars. |
18
+
19
+ ## Basic
20
+
21
+ ```html
22
+ <u-card>
23
+ <div class="u-title-l">Article title</div>
24
+ <div class="u-body-m u-text-low-emphasis">
25
+ Supporting paragraph with a short summary of the article content.
26
+ </div>
27
+ </u-card>
28
+ ```
29
+
30
+ Body content goes **directly** inside `<u-card>`. The card pads it for you.
31
+
32
+ ## Variants
33
+
34
+ ```html
35
+ <u-card variant="filled">…</u-card> <!-- default -->
36
+ <u-card variant="outlined">…</u-card>
37
+ <u-card variant="elevated">…</u-card>
38
+ ```
39
+
40
+ ### Recommendation: keep sibling cards on the same variant
41
+
42
+ When several cards sit side-by-side and represent **information of the same importance** — KPI grids, product catalogs, list-of-articles, anything where each item is one "row" of equal weight — prefer using a single variant across all of them.
43
+
44
+ Mixing variants in a sibling group (e.g. alternating filled/outlined/elevated) creates a visual hierarchy the data doesn't have: the elevated card looks more important than the outlined one even though both are just "another KPI" or "another product." The eye reads weight, not content, and gets the wrong signal first.
45
+
46
+ ```html
47
+ <!-- ✅ Consistent: each KPI gets the same weight -->
48
+ <div class="u-grid">
49
+ <u-card variant="outlined">…KPI 1…</u-card>
50
+ <u-card variant="outlined">…KPI 2…</u-card>
51
+ <u-card variant="outlined">…KPI 3…</u-card>
52
+ </div>
53
+
54
+ <!-- ❌ Mixing variants makes some KPIs visually "heavier" than others
55
+ even when they're peers in the data model. -->
56
+ <div class="u-grid">
57
+ <u-card variant="elevated">…KPI 1…</u-card>
58
+ <u-card variant="outlined">…KPI 2…</u-card>
59
+ <u-card variant="filled">…KPI 3…</u-card>
60
+ </div>
61
+ ```
62
+
63
+ **Use different variants for different roles, not for variety.** A page can absolutely mix variants when the cards serve different purposes — e.g. the main content card `elevated`, the sidebar helper cards `outlined`, the inline tip cards `filled`. The cue should match the meaning.
64
+
65
+ This is a guideline, not a hard rule — there are layouts where mixing is intentional (a "featured" card among regulars, an A/B test, a hero among supporting cards). The point is to be deliberate about why the variants differ.
66
+
67
+ ## With media (correct pattern)
68
+
69
+ Place `<u-card-media>` in `slot="before-content"` so it sits flush against the card edges (no inner padding from the body region):
70
+
71
+ ```html
72
+ <u-card variant="outlined">
73
+ <u-card-media slot="before-content">
74
+ <img src="…" alt="" />
75
+ </u-card-media>
76
+
77
+ <div class="u-title-l">Card with media</div>
78
+ <div class="u-body-m u-text-low-emphasis">Body content below the media — directly in the card, no wrapper.</div>
79
+ </u-card>
80
+ ```
81
+
82
+ `<u-card-media>` defaults to a square aspect ratio. Add the `wide` attribute for 16:9:
83
+
84
+ ```html
85
+ <u-card-media wide slot="before-content">
86
+ <img src="…" alt="" />
87
+ </u-card-media>
88
+ ```
89
+
90
+ **Banner caveat:** `wide` sets a 16:9 *aspect ratio*, so at full container width the media becomes very tall (≈1200px on a wide page; the default square is worse). For a profile/detail **banner**, set an explicit height instead of `wide`:
91
+
92
+ ```html
93
+ <u-card-media slot="before-content" style="height: 180px">…</u-card-media>
94
+ ```
95
+
96
+ For a profile header (banner with an avatar straddling its bottom edge), pull the body up over the flush media with a negative top margin:
97
+
98
+ ```html
99
+ <u-card variant="outlined">
100
+ <u-card-media slot="before-content" style="height: 160px">…</u-card-media>
101
+ <div style="display: flex; align-items: flex-end; gap: 16px; margin-top: -48px">
102
+ <span class="avatar" style="border: 4px solid var(--u-color-surface)">AB</span>
103
+ <div class="u-title-l">Name</div>
104
+ </div>
105
+ </u-card>
106
+ ```
107
+
108
+ ## Actions
109
+
110
+ Put action buttons inside a `<u-button-set>` at the bottom of the card:
111
+
112
+ ```html
113
+ <u-card variant="outlined">
114
+ <div class="u-title-l">Confirm subscription</div>
115
+ <p class="u-body-m u-text-low-emphasis">
116
+ You'll receive weekly updates by email.
117
+ </p>
118
+ <u-button-set>
119
+ <u-button variant="text">Not now</u-button>
120
+ <u-button>Subscribe</u-button>
121
+ </u-button-set>
122
+ </u-card>
123
+ ```
124
+
125
+ For full-bleed footers (e.g. a divider + action bar that touches both card edges), use `slot="after-content"`:
126
+
127
+ ```html
128
+ <u-card variant="outlined">
129
+ <div class="u-title-l">Card with full-bleed footer</div>
130
+ <p class="u-body-m">Body content with the standard padding.</p>
131
+
132
+ <div slot="after-content" style="border-top: 1px solid var(--u-color-outline-variant); padding: 12px 16px;">
133
+ <u-button variant="text">Action</u-button>
134
+ </div>
135
+ </u-card>
136
+ ```
137
+
138
+ ## Overlays on the media
139
+
140
+ When you need a chip, badge or icon overlaid on the media, wrap your media in a `<div style="position: relative">` and absolute-position the overlay inside it:
141
+
142
+ ```html
143
+ <u-card>
144
+ <u-card-media wide slot="before-content">
145
+ <div style="position: relative; width: 100%; height: 100%;">
146
+ <img src="…" alt="" style="width: 100%; height: 100%; object-fit: cover;" />
147
+ <u-chip elevated style="position: absolute; top: 8px; left: 8px;">New</u-chip>
148
+ </div>
149
+ </u-card-media>
150
+
151
+ <div class="u-title-l">Title</div>
152
+ </u-card>
153
+ ```
154
+
155
+ Don't put `position: absolute` chips as direct children of `<u-card-media>` — slot positioning across shadow DOM boundaries is unreliable. Always wrap in a regular div.
156
+
157
+ ## Caveats
158
+
159
+ - **Don't use `<u-card-content>` manually.** The card already wraps the default slot in a padded region — adding `<u-card-content>` on top stacks two layers of padding and is being phased out of the public API. Body content goes directly inside `<u-card>`.
160
+ - `<u-card>` is just a container; it doesn't impose a layout on its children. Use `u-grid`, `u-column`, flex, etc. for the body's internal layout.
161
+ - For clickable cards, wrap the entire card in `<a>` or `<button>`, or add an absolute-positioned overlay button (M3 doesn't define a built-in clickable card variant in this lib).
162
+ - The internal padded region uses 16dp. Override via **`--u-card-padding`** (set on the card; it inherits to the internal content region) if you need a different value, or use `slot="before-content"` / `slot="after-content"` for sections that need to escape the padding entirely. (Note: it is `--u-card-padding`, not `--u-card-content-padding`.)
@@ -0,0 +1,95 @@
1
+ ---
2
+ description: Use u-chip, u-chip-set (groups), and u-chip-field (chip input) — including toggle vs clickable semantics for selectors.
3
+ ---
4
+
5
+ # Chips
6
+
7
+ Three pieces:
8
+ - `<u-chip>` — a compact element representing an attribute, filter, or action.
9
+ - `<u-chip-set>` — groups chips with consistent spacing/wrapping.
10
+ - `<u-chip-field>` — text field that renders each entered value as a chip.
11
+
12
+ ## Single chip
13
+
14
+ ```html
15
+ <u-chip>Default</u-chip>
16
+
17
+ <u-chip>
18
+ <span class="material-symbols-outlined" slot="leading-icon">label</span>
19
+ With icon
20
+ </u-chip>
21
+
22
+ <u-chip elevated>Elevated</u-chip>
23
+
24
+ <u-chip removable (remove)="onRemove($event)">Removable</u-chip>
25
+ ```
26
+
27
+ ## Selection: `clickable` vs `toggle`
28
+
29
+ This distinction matters and is easy to get wrong:
30
+
31
+ - **`clickable`** — chip fires `click` and shows ripple/hover. Use for **radio-like** patterns: combine with `[selected]="x === value"` + `(click)="x = value"` so one is always selected.
32
+ - **`toggle`** — chip flips its own `selected` state on click and emits `change`. Use for **independent boolean filters** where multiple can be on/off.
33
+
34
+ Radio-like (one of several):
35
+
36
+ ```html
37
+ <u-chip-set>
38
+ <u-chip clickable [selected]="format === 'short'" (click)="format = 'short'">
39
+ <span class="material-symbols-outlined" slot="icon-selected">done</span>
40
+ Short
41
+ </u-chip>
42
+ <u-chip clickable [selected]="format === 'long'" (click)="format = 'long'">
43
+ <span class="material-symbols-outlined" slot="icon-selected">done</span>
44
+ Long
45
+ </u-chip>
46
+ </u-chip-set>
47
+ ```
48
+
49
+ Independent filters:
50
+
51
+ ```html
52
+ <u-chip-set>
53
+ <u-chip toggle [(selected)]="showImages">Images</u-chip>
54
+ <u-chip toggle [(selected)]="showVideos">Videos</u-chip>
55
+ <u-chip toggle [(selected)]="showAudio">Audio</u-chip>
56
+ </u-chip-set>
57
+ ```
58
+
59
+ A plain `<u-chip>` (no `clickable`, no `toggle`) is a static informational chip — no ripple, no hover.
60
+
61
+ ## `<u-chip-set>`
62
+
63
+ Spaces and wraps chips for you. No props needed for the basics. The chip's **`remove` event bubbles and composes**, so you can delegate on the set instead of wiring each chip:
64
+
65
+ ```ts
66
+ chipSet.addEventListener('remove', (e) => {
67
+ const chip = e.target; // the <u-chip> being removed
68
+ // e.preventDefault() here to keep the chip in the DOM (drive removal from your own state)
69
+ });
70
+ ```
71
+
72
+ ## `<u-chip-field>` — chip input
73
+
74
+ A text field where each typed value (separated by Enter or comma) becomes a removable chip:
75
+
76
+ ```html
77
+ <u-chip-field label="Tags" #tags></u-chip-field>
78
+
79
+ <script>
80
+ document.querySelector('u-chip-field').value = ['ts', 'lit'];
81
+ document.querySelector('u-chip-field').addEventListener('change', e => {
82
+ console.log(e.target.value); // string[]
83
+ });
84
+ </script>
85
+ ```
86
+
87
+ For object-valued chips (e.g. typeahead-driven), set `.value` to `Array<{ value, label }>` and the field renders the label.
88
+
89
+ ## Caveats
90
+
91
+ - Always include `<span slot="icon-selected">done</span>` on `clickable`/`toggle` chips so users see the check when selected.
92
+ - Don't use `toggle` for radio-like selectors — the user could deselect the only choice and the UI ends up in an invalid empty state.
93
+ - `<u-chip-field>` is form-associated; pair with a `<form>` for native submit.
94
+ - **The `remove` event bubbles and composes** — listen on the chip or delegate on the parent `<u-chip-set>`. The chip also **removes itself from the DOM** on remove unless you `preventDefault()` the event (do so when the chip's presence is driven by your own state).
95
+ - **`<u-chip-field>` value:** reassign `.value = [...]` to re-render (mutating the array in place does not). Use `add(value, triggerChange?)` / `removeAt(index, triggerChange?)` to mutate, and set a `formatter` (`value => string`) for object items — otherwise objects render as `[object Object]`. The `change` event only fires on user add/remove (or when `triggerChange` is true).
@@ -0,0 +1,37 @@
1
+ ---
2
+ description: Use u-collapse to animate an element between zero height and its natural content height.
3
+ ---
4
+
5
+ # Collapse
6
+
7
+ A primitive wrapper that animates its `max-height` between `0` and the slotted content's measured `scrollHeight`. Toggle the `open` attribute to play the animation. A `ResizeObserver` watches the content so dynamic children stay in sync.
8
+
9
+ ```html
10
+ <u-button id="toggle">Expand</u-button>
11
+ <u-collapse id="demo">
12
+ <p>Hidden until expanded.</p>
13
+ </u-collapse>
14
+
15
+ <script type="module">
16
+ const btn = document.getElementById('toggle');
17
+ const collapse = document.getElementById('demo');
18
+ btn.addEventListener('click', () => { collapse.open = !collapse.open; });
19
+ </script>
20
+ ```
21
+
22
+ Compose with other surfaces:
23
+
24
+ ```html
25
+ <u-card variant="outlined" style="padding: 1rem;">
26
+ <u-button variant="text" onclick="this.nextElementSibling.open = !this.nextElementSibling.open">More</u-button>
27
+ <u-collapse>
28
+ <div style="padding-top: .5rem;">Reveal-on-demand content.</div>
29
+ </u-collapse>
30
+ </u-card>
31
+ ```
32
+
33
+ ## Caveats
34
+
35
+ - The component measures `scrollHeight` via `ResizeObserver`. The headless `mcp__Claude_Preview__*` environment does NOT fire `ResizeObserver` — verify the animation in a real browser.
36
+ - `u-collapse` does not own a button or trigger — it's a pure container. Pair it with whatever toggle UI fits.
37
+ - For a header + chevron + ripple combo, use [[expansion-panel]] instead.