@mintplayer/web-components 3.4.0 → 3.5.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 (378) hide show
  1. package/README.md +5 -5
  2. package/a11y/index.mjs +248 -1
  3. package/a11y/src/index.d.ts +0 -2
  4. package/accordion/index.mjs +116 -144
  5. package/accordion/src/generated/accordion-tab.view.generated.d.ts +13 -0
  6. package/accordion/src/generated/accordion.view.generated.d.ts +10 -0
  7. package/accordion/src/generated/index.d.ts +2 -0
  8. package/accordion/src/generated/mp-accordion-tab.generated.d.ts +50 -0
  9. package/accordion/src/generated/mp-accordion.generated.d.ts +47 -0
  10. package/accordion/src/index.d.ts +2 -3
  11. package/alert/index.mjs +82 -0
  12. package/alert/src/generated/alert.view.generated.d.ts +10 -0
  13. package/alert/src/generated/index.d.ts +1 -0
  14. package/alert/src/generated/mp-alert.generated.d.ts +66 -0
  15. package/alert/src/index.d.ts +1 -0
  16. package/badge/index.mjs +71 -0
  17. package/badge/src/generated/badge.view.generated.d.ts +11 -0
  18. package/badge/src/generated/index.d.ts +1 -0
  19. package/badge/src/generated/mp-badge.generated.d.ts +48 -0
  20. package/badge/src/index.d.ts +1 -0
  21. package/breadcrumb/index.mjs +110 -0
  22. package/breadcrumb/src/generated/breadcrumb-item.view.generated.d.ts +10 -0
  23. package/breadcrumb/src/generated/breadcrumb.view.generated.d.ts +13 -0
  24. package/breadcrumb/src/generated/index.d.ts +2 -0
  25. package/breadcrumb/src/generated/mp-breadcrumb-item.generated.d.ts +31 -0
  26. package/breadcrumb/src/generated/mp-breadcrumb.generated.d.ts +30 -0
  27. package/breadcrumb/src/index.d.ts +1 -0
  28. package/button-group/index.d.ts +1 -0
  29. package/button-group/index.mjs +68 -0
  30. package/button-group/src/generated/button-group.view.generated.d.ts +10 -0
  31. package/button-group/src/generated/index.d.ts +1 -0
  32. package/button-group/src/generated/mp-button-group.generated.d.ts +48 -0
  33. package/button-group/src/index.d.ts +1 -0
  34. package/card/index.mjs +421 -19
  35. package/card/src/generated/card-img.view.generated.d.ts +13 -0
  36. package/card/src/generated/card-link.view.generated.d.ts +13 -0
  37. package/card/src/generated/card-part.view.generated.d.ts +10 -0
  38. package/card/src/generated/index.d.ts +10 -0
  39. package/card/src/generated/mp-card-body.generated.d.ts +20 -0
  40. package/card/src/generated/mp-card-footer.generated.d.ts +30 -0
  41. package/card/src/generated/mp-card-group.generated.d.ts +20 -0
  42. package/card/src/generated/mp-card-header.generated.d.ts +30 -0
  43. package/card/src/generated/mp-card-img.generated.d.ts +46 -0
  44. package/card/src/generated/mp-card-link.generated.d.ts +30 -0
  45. package/card/src/generated/mp-card-subtitle.generated.d.ts +20 -0
  46. package/card/src/generated/mp-card-text.generated.d.ts +20 -0
  47. package/card/src/generated/mp-card-title.generated.d.ts +30 -0
  48. package/card/src/generated/mp-card.generated.d.ts +38 -0
  49. package/card/src/index.d.ts +2 -2
  50. package/charts/sparkline/index.mjs +85 -109
  51. package/charts/sparkline/src/generated/index.d.ts +1 -0
  52. package/charts/sparkline/src/generated/mp-sparkline.generated.d.ts +81 -0
  53. package/charts/sparkline/src/generated/sparkline.view.generated.d.ts +11 -0
  54. package/charts/sparkline/src/index.d.ts +2 -1
  55. package/checkbox/index.mjs +256 -261
  56. package/checkbox/src/generated/checkbox-group.view.generated.d.ts +10 -0
  57. package/checkbox/src/generated/checkbox.view.generated.d.ts +13 -0
  58. package/checkbox/src/generated/index.d.ts +3 -0
  59. package/{navbar/src/generated/mp-navbar-dropdown.generated.d.ts → checkbox/src/generated/mp-checkbox-group.generated.d.ts} +17 -14
  60. package/checkbox/src/generated/mp-checkbox.generated.d.ts +120 -0
  61. package/checkbox/src/generated/mp-toggle-button.generated.d.ts +100 -0
  62. package/checkbox/src/index.d.ts +1 -2
  63. package/chunks/{datatable-wRsV3aob.mjs → datatable-wcZQMo-4.mjs} +5 -5
  64. package/chunks/{treeview-BFyPrpxn.mjs → treeview-CKndcfiq.mjs} +38 -36
  65. package/close/index.d.ts +1 -0
  66. package/close/index.mjs +55 -0
  67. package/close/src/generated/close.view.generated.d.ts +11 -0
  68. package/close/src/generated/index.d.ts +1 -0
  69. package/close/src/generated/mp-close.generated.d.ts +33 -0
  70. package/close/src/index.d.ts +1 -0
  71. package/color-picker/index.d.ts +1 -0
  72. package/color-picker/index.mjs +108 -0
  73. package/color-picker/src/generated/color-picker.view.generated.d.ts +8 -0
  74. package/color-picker/src/generated/index.d.ts +1 -0
  75. package/color-picker/src/generated/mp-color-picker.generated.d.ts +83 -0
  76. package/color-picker/src/index.d.ts +2 -0
  77. package/context-menu/index.d.ts +1 -0
  78. package/context-menu/index.mjs +75 -0
  79. package/context-menu/src/generated/context-menu-panel.view.generated.d.ts +10 -0
  80. package/context-menu/src/generated/context-menu.directive.generated.d.ts +5 -0
  81. package/context-menu/src/generated/index.d.ts +2 -0
  82. package/context-menu/src/generated/mp-context-menu-panel.generated.d.ts +40 -0
  83. package/context-menu/src/index.d.ts +1 -0
  84. package/custom-elements.json +16230 -8818
  85. package/datatable/index.mjs +1 -1
  86. package/dropdown/index.d.ts +1 -0
  87. package/dropdown/index.mjs +294 -0
  88. package/dropdown/src/generated/dropdown-divider.view.generated.d.ts +8 -0
  89. package/dropdown/src/generated/dropdown-header.view.generated.d.ts +10 -0
  90. package/dropdown/src/generated/dropdown-item.view.generated.d.ts +10 -0
  91. package/dropdown/src/generated/dropdown-menu.view.generated.d.ts +16 -0
  92. package/dropdown/src/generated/dropdown-panel.view.generated.d.ts +10 -0
  93. package/dropdown/src/generated/dropdown.directive.generated.d.ts +5 -0
  94. package/dropdown/src/generated/index.d.ts +6 -0
  95. package/dropdown/src/generated/mp-dropdown-divider.generated.d.ts +13 -0
  96. package/dropdown/src/generated/mp-dropdown-header.generated.d.ts +20 -0
  97. package/dropdown/src/generated/mp-dropdown-item.generated.d.ts +43 -0
  98. package/dropdown/src/generated/mp-dropdown-menu.generated.d.ts +61 -0
  99. package/dropdown/src/generated/mp-dropdown-panel.generated.d.ts +67 -0
  100. package/dropdown/src/index.d.ts +1 -0
  101. package/file-manager/index.mjs +19 -19
  102. package/file-upload/index.d.ts +1 -0
  103. package/file-upload/index.mjs +136 -0
  104. package/file-upload/src/generated/file-upload.view.generated.d.ts +18 -0
  105. package/file-upload/src/generated/index.d.ts +1 -0
  106. package/file-upload/src/generated/mp-file-upload.generated.d.ts +117 -0
  107. package/file-upload/src/index.d.ts +3 -0
  108. package/floating-labels/index.d.ts +1 -0
  109. package/floating-labels/index.mjs +45 -0
  110. package/floating-labels/src/generated/floating-label.view.generated.d.ts +10 -0
  111. package/floating-labels/src/generated/index.d.ts +1 -0
  112. package/floating-labels/src/generated/mp-floating-label.generated.d.ts +20 -0
  113. package/floating-labels/src/index.d.ts +1 -0
  114. package/form/index.d.ts +1 -0
  115. package/form/index.mjs +84 -0
  116. package/form/src/generated/col-form-label.directive.generated.d.ts +2 -0
  117. package/form/src/generated/form-control.directive.generated.d.ts +2 -0
  118. package/form/src/generated/form.view.generated.d.ts +13 -0
  119. package/form/src/generated/index.d.ts +3 -0
  120. package/form/src/generated/mp-form.generated.d.ts +41 -0
  121. package/form/src/index.d.ts +1 -0
  122. package/grid/index.d.ts +1 -0
  123. package/grid/index.mjs +93 -0
  124. package/grid/src/generated/col.directive.generated.d.ts +2 -0
  125. package/grid/src/generated/column.directive.generated.d.ts +2 -0
  126. package/grid/src/generated/grid.view.generated.d.ts +10 -0
  127. package/grid/src/generated/index.d.ts +4 -0
  128. package/grid/src/generated/mp-grid.generated.d.ts +31 -0
  129. package/grid/src/generated/row.directive.generated.d.ts +2 -0
  130. package/grid/src/index.d.ts +1 -0
  131. package/input-group/index.mjs +59 -34
  132. package/input-group/src/generated/index.d.ts +1 -0
  133. package/input-group/src/generated/input-group.view.generated.d.ts +10 -0
  134. package/input-group/src/generated/mp-input-group.generated.d.ts +39 -0
  135. package/input-group/src/index.d.ts +1 -1
  136. package/list-group/index.d.ts +1 -0
  137. package/list-group/index.mjs +117 -0
  138. package/list-group/src/generated/index.d.ts +2 -0
  139. package/list-group/src/generated/list-group-item.view.generated.d.ts +10 -0
  140. package/list-group/src/generated/list-group.view.generated.d.ts +10 -0
  141. package/list-group/src/generated/mp-list-group-item.generated.d.ts +48 -0
  142. package/list-group/src/generated/mp-list-group.generated.d.ts +31 -0
  143. package/list-group/src/index.d.ts +1 -0
  144. package/machine/index.mjs +163 -54
  145. package/machine/src/body-teleport-directive.d.ts +3 -0
  146. package/machine/src/content-query.d.ts +4 -0
  147. package/machine/src/core-directive.d.ts +21 -0
  148. package/machine/src/host-props.d.ts +21 -0
  149. package/machine/src/index.d.ts +3 -0
  150. package/machine/src/instance-style-directive.d.ts +17 -0
  151. package/machine/src/mark-links.d.ts +3 -3
  152. package/marquee/index.d.ts +1 -0
  153. package/marquee/index.mjs +74 -0
  154. package/marquee/src/generated/index.d.ts +1 -0
  155. package/marquee/src/generated/marquee.view.generated.d.ts +13 -0
  156. package/marquee/src/generated/mp-marquee.generated.d.ts +48 -0
  157. package/marquee/src/index.d.ts +1 -0
  158. package/modal/index.d.ts +1 -0
  159. package/modal/index.mjs +134 -0
  160. package/modal/src/generated/index.d.ts +1 -0
  161. package/modal/src/generated/modal.view.generated.d.ts +12 -0
  162. package/modal/src/generated/mp-modal.generated.d.ts +103 -0
  163. package/modal/src/index.d.ts +2 -0
  164. package/multi-range/src/generated/mp-multi-range.generated.d.ts +1 -1
  165. package/nav/index.mjs +1 -1
  166. package/navbar/index.mjs +23 -88
  167. package/navbar/src/generated/index.d.ts +0 -1
  168. package/navbar/src/generated/mp-navbar-item.generated.d.ts +1 -1
  169. package/navbar/src/generated/mp-navbar-nav.generated.d.ts +4 -1
  170. package/navbar/src/index.d.ts +1 -1
  171. package/navbar/src/navbar-item.lit.d.ts +1 -1
  172. package/navbar-toggler/index.d.ts +1 -0
  173. package/navbar-toggler/index.mjs +70 -0
  174. package/navbar-toggler/src/generated/index.d.ts +1 -0
  175. package/navbar-toggler/src/generated/mp-navbar-toggler.generated.d.ts +52 -0
  176. package/navbar-toggler/src/generated/navbar-toggler.view.generated.d.ts +11 -0
  177. package/navbar-toggler/src/index.d.ts +1 -0
  178. package/offcanvas/index.d.ts +1 -0
  179. package/offcanvas/index.mjs +133 -0
  180. package/offcanvas/src/generated/index.d.ts +1 -0
  181. package/offcanvas/src/generated/mp-offcanvas.generated.d.ts +108 -0
  182. package/offcanvas/src/generated/offcanvas.view.generated.d.ts +11 -0
  183. package/offcanvas/src/index.d.ts +2 -0
  184. package/otp-input/index.mjs +33 -29
  185. package/otp-input/src/generated/otp-input.view.generated.d.ts +4 -1
  186. package/package.json +123 -11
  187. package/pagination/index.mjs +88 -144
  188. package/pagination/src/generated/index.d.ts +1 -0
  189. package/pagination/src/generated/mp-pagination.generated.d.ts +69 -0
  190. package/pagination/src/generated/pagination.view.generated.d.ts +11 -0
  191. package/pagination/src/index.d.ts +3 -2
  192. package/parallax/index.d.ts +1 -0
  193. package/parallax/index.mjs +50 -0
  194. package/parallax/src/generated/index.d.ts +1 -0
  195. package/parallax/src/generated/mp-parallax.generated.d.ts +32 -0
  196. package/parallax/src/generated/parallax.view.generated.d.ts +8 -0
  197. package/parallax/src/index.d.ts +1 -0
  198. package/phone-input/index.mjs +52 -48
  199. package/phone-input/src/generated/phone-input.view.generated.d.ts +4 -1
  200. package/placeholder/index.d.ts +1 -0
  201. package/placeholder/index.mjs +64 -0
  202. package/placeholder/src/generated/index.d.ts +1 -0
  203. package/placeholder/src/generated/mp-placeholder.generated.d.ts +43 -0
  204. package/placeholder/src/generated/placeholder.view.generated.d.ts +10 -0
  205. package/placeholder/src/index.d.ts +1 -0
  206. package/playlist-toggler/index.d.ts +1 -0
  207. package/playlist-toggler/index.mjs +69 -0
  208. package/playlist-toggler/src/generated/index.d.ts +1 -0
  209. package/playlist-toggler/src/generated/mp-playlist-toggler.generated.d.ts +52 -0
  210. package/playlist-toggler/src/generated/playlist-toggler.view.generated.d.ts +11 -0
  211. package/playlist-toggler/src/index.d.ts +1 -0
  212. package/popover/index.d.ts +1 -0
  213. package/popover/index.mjs +104 -0
  214. package/popover/src/generated/index.d.ts +2 -0
  215. package/popover/src/generated/mp-popover-panel.generated.d.ts +66 -0
  216. package/popover/src/generated/popover-panel.view.generated.d.ts +10 -0
  217. package/popover/src/generated/popover.directive.generated.d.ts +5 -0
  218. package/popover/src/index.d.ts +1 -0
  219. package/priority-nav/index.d.ts +1 -0
  220. package/priority-nav/index.mjs +149 -0
  221. package/priority-nav/src/generated/index.d.ts +1 -0
  222. package/priority-nav/src/generated/mp-priority-nav.generated.d.ts +78 -0
  223. package/priority-nav/src/generated/priority-nav.view.generated.d.ts +21 -0
  224. package/priority-nav/src/index.d.ts +2 -0
  225. package/progress-bar/index.d.ts +1 -0
  226. package/progress-bar/index.mjs +156 -0
  227. package/progress-bar/src/generated/index.d.ts +2 -0
  228. package/progress-bar/src/generated/mp-progress-bar.generated.d.ts +87 -0
  229. package/progress-bar/src/generated/mp-progress.generated.d.ts +46 -0
  230. package/progress-bar/src/generated/progress-bar.view.generated.d.ts +12 -0
  231. package/progress-bar/src/generated/progress.view.generated.d.ts +10 -0
  232. package/progress-bar/src/index.d.ts +1 -0
  233. package/query-builder/index.mjs +19 -19
  234. package/radio/index.mjs +186 -1
  235. package/radio/src/generated/index.d.ts +2 -0
  236. package/radio/src/generated/mp-radio-group.generated.d.ts +59 -0
  237. package/radio/src/generated/mp-radio.generated.d.ts +120 -0
  238. package/radio/src/generated/radio-group.view.generated.d.ts +10 -0
  239. package/radio/src/generated/radio.view.generated.d.ts +13 -0
  240. package/radio/src/index.d.ts +1 -2
  241. package/range/index.d.ts +1 -0
  242. package/range/index.mjs +75 -0
  243. package/range/src/generated/index.d.ts +1 -0
  244. package/range/src/generated/mp-range.generated.d.ts +64 -0
  245. package/range/src/generated/range.view.generated.d.ts +11 -0
  246. package/range/src/index.d.ts +1 -0
  247. package/rating/index.d.ts +1 -0
  248. package/rating/index.mjs +74 -0
  249. package/rating/src/generated/index.d.ts +1 -0
  250. package/rating/src/generated/mp-rating.generated.d.ts +64 -0
  251. package/rating/src/generated/rating.view.generated.d.ts +8 -0
  252. package/rating/src/index.d.ts +1 -0
  253. package/resizable/index.d.ts +1 -0
  254. package/resizable/index.mjs +79 -0
  255. package/resizable/src/generated/index.d.ts +1 -0
  256. package/resizable/src/generated/mp-resizable.generated.d.ts +66 -0
  257. package/resizable/src/generated/resizable.view.generated.d.ts +10 -0
  258. package/resizable/src/index.d.ts +2 -0
  259. package/scheduler/index.mjs +7 -1
  260. package/scrollspy/index.d.ts +1 -0
  261. package/scrollspy/index.mjs +76 -0
  262. package/scrollspy/src/generated/index.d.ts +1 -0
  263. package/scrollspy/src/generated/mp-scrollspy.generated.d.ts +49 -0
  264. package/scrollspy/src/generated/scrollspy.view.generated.d.ts +13 -0
  265. package/scrollspy/src/index.d.ts +1 -0
  266. package/select/index.mjs +48 -46
  267. package/select/src/generated/select.view.generated.d.ts +4 -1
  268. package/shell/index.mjs +88 -81
  269. package/shell/src/generated/index.d.ts +1 -0
  270. package/shell/src/generated/mp-shell.generated.d.ts +90 -0
  271. package/shell/src/generated/shell.view.generated.d.ts +12 -0
  272. package/shell/src/index.d.ts +2 -3
  273. package/sticky-footer/index.d.ts +1 -0
  274. package/sticky-footer/index.mjs +57 -0
  275. package/sticky-footer/src/generated/index.d.ts +2 -0
  276. package/sticky-footer/src/generated/mp-sticky-footer.generated.d.ts +20 -0
  277. package/sticky-footer/src/generated/sticky-footer-parent.directive.generated.d.ts +2 -0
  278. package/sticky-footer/src/generated/sticky-footer.view.generated.d.ts +13 -0
  279. package/sticky-footer/src/index.d.ts +1 -0
  280. package/tab-control/index.mjs +142 -182
  281. package/tab-control/src/generated/index.d.ts +2 -0
  282. package/tab-control/src/generated/mp-tab-control.generated.d.ts +65 -0
  283. package/tab-control/src/generated/mp-tab-page.generated.d.ts +44 -0
  284. package/tab-control/src/generated/tab-control.view.generated.d.ts +12 -0
  285. package/tab-control/src/index.d.ts +2 -4
  286. package/table/index.d.ts +1 -0
  287. package/table/index.mjs +75 -0
  288. package/table/src/generated/index.d.ts +1 -0
  289. package/table/src/generated/mp-table.generated.d.ts +57 -0
  290. package/table/src/generated/table.view.generated.d.ts +13 -0
  291. package/table/src/index.d.ts +1 -0
  292. package/tile-manager/index.mjs +110 -143
  293. package/tile-manager/src/generated/index.d.ts +1 -0
  294. package/tile-manager/src/generated/mp-tile-manager.generated.d.ts +139 -0
  295. package/tile-manager/src/generated/tile-manager.view.generated.d.ts +21 -0
  296. package/tile-manager/src/index.d.ts +2 -2
  297. package/toast/index.d.ts +1 -0
  298. package/toast/index.mjs +227 -0
  299. package/toast/src/generated/index.d.ts +4 -0
  300. package/toast/src/generated/mp-toast-body.generated.d.ts +20 -0
  301. package/toast/src/generated/mp-toast-header.generated.d.ts +39 -0
  302. package/toast/src/generated/mp-toast.generated.d.ts +41 -0
  303. package/toast/src/generated/mp-toaster.generated.d.ts +39 -0
  304. package/toast/src/generated/toast-body.view.generated.d.ts +10 -0
  305. package/toast/src/generated/toast-header.view.generated.d.ts +11 -0
  306. package/toast/src/generated/toast.view.generated.d.ts +10 -0
  307. package/toast/src/generated/toaster.view.generated.d.ts +15 -0
  308. package/toast/src/index.d.ts +1 -0
  309. package/tooltip/index.d.ts +1 -0
  310. package/tooltip/index.mjs +87 -0
  311. package/tooltip/src/generated/index.d.ts +2 -0
  312. package/tooltip/src/generated/mp-tooltip-panel.generated.d.ts +48 -0
  313. package/tooltip/src/generated/tooltip-panel.view.generated.d.ts +10 -0
  314. package/tooltip/src/generated/tooltip.directive.generated.d.ts +5 -0
  315. package/tooltip/src/index.d.ts +1 -0
  316. package/treeview/index.mjs +1 -1
  317. package/treeview/src/generated/treeview.view.generated.d.ts +4 -1
  318. package/typeahead/index.mjs +131 -221
  319. package/typeahead/src/generated/index.d.ts +1 -0
  320. package/typeahead/src/generated/mp-typeahead.generated.d.ts +126 -0
  321. package/typeahead/src/generated/typeahead.view.generated.d.ts +20 -0
  322. package/typeahead/src/index.d.ts +3 -3
  323. package/a11y/src/form-associated.d.ts +0 -48
  324. package/accordion/src/components/index.d.ts +0 -3
  325. package/accordion/src/components/mp-accordion-tab.d.ts +0 -30
  326. package/accordion/src/components/mp-accordion.d.ts +0 -54
  327. package/accordion/src/styles/accordion.styles.d.ts +0 -2
  328. package/accordion/src/styles/index.d.ts +0 -1
  329. package/card/src/card-global.styles.d.ts +0 -2
  330. package/card/src/mp-card.element.d.ts +0 -43
  331. package/card/src/mp-card.element.template.d.ts +0 -2
  332. package/charts/sparkline/src/components/index.d.ts +0 -1
  333. package/charts/sparkline/src/components/mp-sparkline.d.ts +0 -50
  334. package/charts/sparkline/src/styles/index.d.ts +0 -1
  335. package/charts/sparkline/src/styles/sparkline.styles.d.ts +0 -2
  336. package/checkbox/src/components/index.d.ts +0 -2
  337. package/checkbox/src/components/mp-checkbox.d.ts +0 -128
  338. package/chunks/a11y-CXIVMaQ_.mjs +0 -287
  339. package/chunks/radio-fSMWIPFk.mjs +0 -150
  340. package/chunks/toggle-button-DWLu9iCm.mjs +0 -172
  341. package/dropdown-menu/index.mjs +0 -48
  342. package/dropdown-menu/src/components/index.d.ts +0 -1
  343. package/dropdown-menu/src/components/mp-dropdown-menu.d.ts +0 -46
  344. package/dropdown-menu/src/index.d.ts +0 -2
  345. package/input-group/src/mp-input-group.d.ts +0 -29
  346. package/navbar/src/generated/navbar-dropdown.view.generated.d.ts +0 -14
  347. package/pagination/src/components/index.d.ts +0 -2
  348. package/pagination/src/components/mp-pagination.d.ts +0 -57
  349. package/pagination/src/styles/index.d.ts +0 -1
  350. package/pagination/src/styles/pagination.styles.d.ts +0 -2
  351. package/radio/src/components/index.d.ts +0 -2
  352. package/radio/src/components/mp-radio.d.ts +0 -80
  353. package/radio-group/index.mjs +0 -64
  354. package/radio-group/src/components/mp-radio-group.d.ts +0 -39
  355. package/radio-group/src/index.d.ts +0 -1
  356. package/radio-group/src/styles/radio-group.styles.d.ts +0 -2
  357. package/shell/src/components/index.d.ts +0 -2
  358. package/shell/src/components/mp-shell.d.ts +0 -69
  359. package/shell/src/styles/shell.styles.d.ts +0 -2
  360. package/tab-control/src/components/index.d.ts +0 -3
  361. package/tab-control/src/components/mp-tab-control.d.ts +0 -50
  362. package/tab-control/src/components/mp-tab-page.d.ts +0 -35
  363. package/tab-control/src/styles/index.d.ts +0 -1
  364. package/tab-control/src/styles/tab-control.styles.d.ts +0 -2
  365. package/tab-control/src/types/index.d.ts +0 -1
  366. package/tab-control/src/types/tabs-position.d.ts +0 -1
  367. package/tile-manager/src/components/index.d.ts +0 -1
  368. package/tile-manager/src/components/mp-tile-manager.d.ts +0 -107
  369. package/toggle-button/index.mjs +0 -1
  370. package/toggle-button/src/components/index.d.ts +0 -2
  371. package/toggle-button/src/components/mp-toggle-button.d.ts +0 -76
  372. package/toggle-button/src/index.d.ts +0 -3
  373. package/toggle-button/src/styles/index.d.ts +0 -1
  374. package/toggle-button/src/styles/toggle-button.styles.d.ts +0 -2
  375. package/typeahead/src/components/mp-typeahead.d.ts +0 -68
  376. /package/{dropdown-menu → alert}/index.d.ts +0 -0
  377. /package/{radio-group → badge}/index.d.ts +0 -0
  378. /package/{toggle-button → breadcrumb}/index.d.ts +0 -0
@@ -1,43 +0,0 @@
1
- import { ReactiveElement } from 'lit';
2
- /**
3
- * `<mp-card>`, the Lit front of the card (PRD #437 §8, wave A). The card has
4
- * no core: the element IS the Bootstrap `.card`, rendered in the light DOM
5
- * with no template of its own, so its children (`.card-header`, `.card-body`,
6
- * …) are ordinary children. Nothing is moved and nothing re-renders, so
7
- * consumer nodes keep their identity.
8
- *
9
- * Styles (#452): those children are the consumer's own raw Bootstrap markup,
10
- * which a component never stamps, so the element installs the VERBATIM card
11
- * part (`bootstrapCardPage`) — the route the PRD gives raw page markup. It
12
- * replaces a scoped copy under the same registry key, never adds a second.
13
- *
14
- * No-JS: visible and complete without JS once the consumer writes the
15
- * classes by hand (`<mp-card class="card text-bg-primary">`); the element only
16
- * adds them.
17
- *
18
- * Attributes:
19
- * - `color` a card colour name (`primary` … `dark`, `body`, `white`, `transparent`).
20
- * - `outline` boolean; colour the border only.
21
- */
22
- export declare class MpCardElement extends ReactiveElement {
23
- #private;
24
- static get properties(): {
25
- color: {
26
- type: StringConstructor;
27
- reflect: boolean;
28
- };
29
- outline: {
30
- type: BooleanConstructor;
31
- reflect: boolean;
32
- };
33
- };
34
- color: string | null;
35
- outline: boolean;
36
- protected createRenderRoot(): HTMLElement;
37
- protected updated(): void;
38
- }
39
- declare global {
40
- interface HTMLElementTagNameMap {
41
- 'mp-card': MpCardElement;
42
- }
43
- }
@@ -1,2 +0,0 @@
1
- export declare const template: import('lit-html').TemplateResult<1>;
2
- export declare const styles: import('lit').CSSResult;
@@ -1 +0,0 @@
1
- export * from './mp-sparkline';
@@ -1,50 +0,0 @@
1
- import { LitElement, TemplateResult } from 'lit';
2
- /**
3
- * `<mp-sparkline>` — axis-less inline trend for table cells (the codecov
4
- * flags/components-table shape). Deliberately NOT keyboard-interactive: it is
5
- * a non-interactive graphic (`role="img"`) whose accessible name summarizes
6
- * the series ("first, last, lowest, highest", locale-formatted). The real
7
- * numbers belong in the table cell next to it — which is where sparklines live
8
- * anyway.
9
- *
10
- * Naming follows the library contract: host `aria-label` > `input-label` >
11
- * `summaryFormatter` > the generated summary (a data-derived default).
12
- *
13
- * `points: (number | null)[]` is property-only; `null` renders a gap.
14
- * No-JS tier: none; registers in axe.spec.ts only.
15
- */
16
- export declare class MpSparkline extends LitElement {
17
- static styles: import('lit').CSSResult[];
18
- static get observedAttributes(): string[];
19
- private _points;
20
- private _area;
21
- private _showLastDot;
22
- private _yMin;
23
- private _yMax;
24
- private _locale;
25
- private _inputLabel;
26
- private _summaryFormatter;
27
- get points(): (number | null)[];
28
- set points(value: (number | null)[]);
29
- get area(): boolean;
30
- set area(value: boolean);
31
- get showLastDot(): boolean;
32
- set showLastDot(value: boolean);
33
- get yMin(): number | undefined;
34
- set yMin(value: number | undefined);
35
- get yMax(): number | undefined;
36
- set yMax(value: number | undefined);
37
- get locale(): string | undefined;
38
- set locale(value: string | undefined);
39
- get inputLabel(): string | null;
40
- set inputLabel(value: string | null);
41
- get summaryFormatter(): ((points: (number | null)[]) => string | undefined) | undefined;
42
- set summaryFormatter(value: ((points: (number | null)[]) => string | undefined) | undefined);
43
- attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
44
- render(): TemplateResult;
45
- }
46
- declare global {
47
- interface HTMLElementTagNameMap {
48
- 'mp-sparkline': MpSparkline;
49
- }
50
- }
@@ -1 +0,0 @@
1
- export { sparklineStyles } from './sparkline.styles';
@@ -1,2 +0,0 @@
1
- export declare const sparklineStyles: import('lit').CSSResult;
2
- export default sparklineStyles;
@@ -1,2 +0,0 @@
1
- export { MpCheckbox } from './mp-checkbox';
2
- export type { MpCheckboxType, CheckboxChangeEventDetail } from './mp-checkbox';
@@ -1,128 +0,0 @@
1
- import { LitElement, TemplateResult } from 'lit';
2
- import { ToggleButtonColor } from '@mintplayer/web-components/toggle-button';
3
- export type MpCheckboxType = 'checkbox' | 'switch' | 'toggle_button';
4
- export interface CheckboxChangeEventDetail {
5
- checked: boolean;
6
- indeterminate: boolean;
7
- value: string | null;
8
- }
9
- declare const MpCheckbox_base: typeof LitElement & (new (...args: any[]) => import('@mintplayer/web-components/a11y').FormAssociatedElement);
10
- /**
11
- * `<mp-checkbox>` — a Bootstrap-styled checkbox with three visual variants
12
- * via the `type` attribute:
13
- *
14
- * - `checkbox` (default) — `.form-check` with a square indicator.
15
- * - `switch` — `.form-check.form-switch` for the iOS-style sliding switch.
16
- * - `toggle_button` — `.btn-check` rendered as a `.btn .btn-<color>`.
17
- *
18
- * Supports first-class **tri-state** via the `indeterminate` attribute /
19
- * property. The visual indeterminate styling is the browser's native
20
- * `<input>.indeterminate` DOM property; we additionally reflect
21
- * `aria-checked="mixed"` for AT and mirror the value to a reflected
22
- * boolean attribute so consumers can target the state from CSS.
23
- * The native `change` event clears `indeterminate` on the next user click
24
- * (per HTML spec); consumers that want the master/select-all pattern can
25
- * re-derive and re-set `indeterminate` from the resulting state.
26
- *
27
- * Emits `change` with `detail: { checked, indeterminate, value }`.
28
- */
29
- /**
30
- * Form association (Phase F, decision D5): the mixin owns the internals
31
- * plumbing; this class supplies the checkbox value shape. This is what makes
32
- * the previously-dead `name` attribute actually submit, and what lets a
33
- * `<fieldset disabled>` disable the control without a defeatable attribute
34
- * (spike 0.3a).
35
- */
36
- export declare class MpCheckbox extends MpCheckbox_base {
37
- static styles: import('lit').CSSResult[];
38
- static shadowRootOptions: {
39
- delegatesFocus: boolean;
40
- clonable?: boolean;
41
- customElementRegistry?: CustomElementRegistry | null;
42
- mode: ShadowRootMode;
43
- serializable?: boolean;
44
- slotAssignment?: SlotAssignmentMode;
45
- };
46
- static get observedAttributes(): string[];
47
- private _type;
48
- private _checked;
49
- private _indeterminate;
50
- private _disabled;
51
- private _name;
52
- private _value;
53
- private _color;
54
- private _inputLabel;
55
- private _errorText;
56
- /**
57
- * Tier-2 naming. No `role` is passed: the inner <input> is the real control and
58
- * already carries one, so a role on the host would announce the checkbox twice.
59
- * References therefore target that <input> rather than the host's internals.
60
- */
61
- private readonly hostAria;
62
- private readonly _inputId;
63
- private readonly _errorId;
64
- private readonly _inputRef;
65
- /**
66
- * Optional override for the inner `<input>`'s accessible name, as
67
- * `inputLabel` / `input-label`. Standardised on this name across the library
68
- * rather than `label`, because the value lands on the control *inside* the shadow
69
- * root.
70
- *
71
- * **Usually unnecessary — do not reach for it by default.** The shadow `<label>`
72
- * wraps the `<input>` and contains the `<slot>`, and accessible-name computation
73
- * walks the *flat* tree, so slotted light-DOM text already names the control:
74
- * `<mp-checkbox>Accept terms</mp-checkbox>` computes the name "Accept terms" with
75
- * nothing else passed. Verified against Chromium's real accessibility tree in
76
- * the slotted-label spike (verdict in docs/prd/screen-reader-accessibility-plan.md) — an earlier version of this comment claimed the
77
- * opposite, on the assumption that the slot boundary broke the association. It
78
- * does not.
79
- *
80
- * So this exists for the two cases that genuinely need it: a checkbox with **no**
81
- * visible text, and a name that must differ from the visible text. When both are
82
- * present this wins, which is the right precedence for an override.
83
- */
84
- get inputLabel(): string | null;
85
- set inputLabel(value: string | null);
86
- /**
87
- * Validation message, as `errorText` / `error-text`. Rendered as a
88
- * `.invalid-feedback` node inside the shadow root and referenced from the inner
89
- * `<input>` by `aria-errormessage` **and** `aria-describedby` — but only while
90
- * `invalid` is set, because `aria-errormessage` means nothing on a control that
91
- * is not `aria-invalid`.
92
- *
93
- * Text rather than a node because the alternative does not work: a consumer's
94
- * own `<small id="…">` lives outside this shadow root, and an IDREF from the
95
- * inner input cannot reach it. On the Angular side `BsControlValidityDirective`
96
- * fills this in from `NgControl.errors`.
97
- */
98
- get errorText(): string | null;
99
- set errorText(value: string | null);
100
- get type(): MpCheckboxType;
101
- set type(value: MpCheckboxType);
102
- get checked(): boolean;
103
- set checked(value: boolean);
104
- get indeterminate(): boolean;
105
- set indeterminate(value: boolean);
106
- get disabled(): boolean;
107
- set disabled(value: boolean);
108
- get name(): string | null;
109
- set name(value: string | null);
110
- get value(): string | null;
111
- set value(value: string | null);
112
- get color(): ToggleButtonColor;
113
- set color(value: ToggleButtonColor);
114
- connectedCallback(): void;
115
- attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
116
- render(): TemplateResult;
117
- protected updated(): void;
118
- private renderCheckOrSwitch;
119
- private errorFeedback;
120
- private renderToggleButton;
121
- private reflectBoolean;
122
- formValue(): string | null;
123
- formReset(): void;
124
- formRestore(state: string | FormData | File | null): void;
125
- formValidityAnchor(): HTMLElement | null;
126
- private onInputChange;
127
- }
128
- export {};
@@ -1,287 +0,0 @@
1
- import { html as e, nothing as t } from "lit";
2
- import { createRef as n, ref as r } from "lit/directives/ref.js";
3
- import { FocusRestore as i, FocusTrap as a, collectTabbables as o, containsComposed as s, deepActiveElement as c, inertRegions as l } from "@mintplayer/ui-core/focus";
4
- import { dismissStack as u } from "@mintplayer/ui-core/overlay";
5
- import { firstEnabledIndex as d, firstEnabledIndex as f, lastEnabledIndex as p, lastEnabledIndex as m, nextEnabledIndex as h, nextEnabledIndex as g } from "@mintplayer/ui-core/roving";
6
- //#region libs/mintplayer-web-components/a11y/src/live-announcer.ts
7
- var _ = "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;", v = class {
8
- constructor(e, t = {}) {
9
- this.clearTimer = null, this.pendingMessage = null, this.regionRef = n(), this.host = e, this.politeness = t.politeness ?? "polite", this.clearAfterMs = t.clearAfterMs ?? 1500, this.omitRole = t.omitRole ?? !1, e.addController(this);
10
- }
11
- hostUpdated() {
12
- if (this.pendingMessage !== null && this.regionRef.value) {
13
- let e = this.pendingMessage;
14
- this.pendingMessage = null, this.writeMessage(e);
15
- }
16
- }
17
- hostDisconnected() {
18
- this.clearTimer !== null && (clearTimeout(this.clearTimer), this.clearTimer = null);
19
- }
20
- announce(e) {
21
- e && (this.regionRef.value ? this.writeMessage(e) : (this.pendingMessage = e, this.host.requestUpdate()));
22
- }
23
- template() {
24
- let n = this.omitRole ? t : this.politeness === "assertive" ? "alert" : "status";
25
- return e`<div
26
- ${r(this.regionRef)}
27
- role=${n}
28
- aria-live=${this.politeness}
29
- aria-atomic="true"
30
- style=${_}
31
- ></div>`;
32
- }
33
- writeMessage(e) {
34
- let t = this.regionRef.value;
35
- t && (t.textContent === e ? (t.textContent = "", queueMicrotask(() => {
36
- let t = this.regionRef.value;
37
- t && (t.textContent = e), this.scheduleClear();
38
- })) : (t.textContent = e, this.scheduleClear()));
39
- }
40
- scheduleClear() {
41
- this.clearTimer !== null && clearTimeout(this.clearTimer), this.clearTimer = setTimeout(() => {
42
- let e = this.regionRef.value;
43
- e && (e.textContent = ""), this.clearTimer = null;
44
- }, this.clearAfterMs);
45
- }
46
- }, y = class {
47
- constructor(e, t) {
48
- this.inner = t, e.addController(this);
49
- }
50
- hostUpdate() {
51
- this.inner.capture();
52
- }
53
- hostUpdated() {
54
- this.inner.restore();
55
- }
56
- }, b = class {
57
- constructor(e) {
58
- this.options = e, this.activeIndex = 0;
59
- }
60
- sync() {
61
- let e = this.options.items();
62
- e.length !== 0 && ((this.activeIndex >= e.length || this.isDisabled(e[this.activeIndex])) && (this.activeIndex = this.firstEnabledIndex(e)), e.forEach((e, t) => {
63
- e.tabIndex = t === this.activeIndex ? 0 : -1;
64
- }));
65
- }
66
- get index() {
67
- return this.activeIndex;
68
- }
69
- get activeItem() {
70
- return this.options.items()[this.activeIndex] ?? null;
71
- }
72
- onKeydown(e) {
73
- if (e.altKey || e.ctrlKey || e.metaKey) return !1;
74
- let t = this.options.items();
75
- if (t.length === 0) return !1;
76
- let n = e.composedPath(), r = n.length > 0 ? n[0] : e.target;
77
- if (!(r instanceof HTMLElement) || !t.includes(r)) return !1;
78
- let i = this.options.orientation !== "vertical", a = this.options.orientation !== "horizontal", o = this.rtl(r) ? "ArrowLeft" : "ArrowRight", s = this.rtl(r) ? "ArrowRight" : "ArrowLeft";
79
- switch (e.key) {
80
- case "ArrowDown": return a ? this.step(1) : !1;
81
- case "ArrowUp": return a ? this.step(-1) : !1;
82
- case o: return i ? this.step(1) : !1;
83
- case s: return i ? this.step(-1) : !1;
84
- case "Home": return this.moveTo(this.firstEnabledIndex(t));
85
- case "End": return this.moveTo(this.lastEnabledIndex(t));
86
- default: return !1;
87
- }
88
- }
89
- moveTo(e) {
90
- let t = this.options.items(), n = t[e];
91
- return !n || this.isDisabled(n) ? !1 : (this.activeIndex = e, t.forEach((t, n) => {
92
- t.tabIndex = n === e ? 0 : -1;
93
- }), n.focus({ preventScroll: !1 }), this.options.onActiveChange?.(n, e), !0);
94
- }
95
- setActiveItem(e) {
96
- let t = this.options.items().indexOf(e);
97
- t < 0 || (this.activeIndex = t, this.sync());
98
- }
99
- step(e) {
100
- let t = this.options.items(), n = h(t.length, this.activeIndex, e, this.options.wrap ?? !1, (e) => this.isDisabled(t[e]));
101
- return n < 0 ? !1 : this.moveTo(n);
102
- }
103
- firstEnabledIndex(e) {
104
- let t = d(e.length, (t) => this.isDisabled(e[t]));
105
- return t < 0 ? 0 : t;
106
- }
107
- lastEnabledIndex(e) {
108
- let t = p(e.length, (t) => this.isDisabled(e[t]));
109
- return t < 0 ? 0 : t;
110
- }
111
- isDisabled(e) {
112
- return this.options.isDisabled ? this.options.isDisabled(e) : e.getAttribute("aria-disabled") === "true" || e.matches(":disabled");
113
- }
114
- rtl(e) {
115
- return this.options.rtlAware === !1 || typeof getComputedStyle != "function" ? !1 : getComputedStyle(e).direction === "rtl";
116
- }
117
- }, x = /* @__PURE__ */ new WeakMap();
118
- function S(e) {
119
- if (x.has(e)) return x.get(e) ?? null;
120
- let t = null, n = e.attachInternals;
121
- if (typeof n == "function") try {
122
- t = n.call(e);
123
- } catch {
124
- t = null;
125
- }
126
- return x.set(e, t), t;
127
- }
128
- function C() {
129
- return typeof ElementInternals < "u" && "ariaLabelledByElements" in ElementInternals.prototype && typeof Element < "u" && "ariaLabelledByElements" in Element.prototype;
130
- }
131
- var w = ["aria-labelledby", "aria-describedby"], T = !1, E = class {
132
- constructor(e, t = {}) {
133
- this.host = e, this.options = t, this.internals = S(e), this.referenceAttributes = t.referenceAttributes ?? w, t.role && this.internals ? this.internals.role = t.role : t.role && !e.hasAttribute("role") && e.setAttribute("role", t.role);
134
- }
135
- get usesInternals() {
136
- return this.internals !== null;
137
- }
138
- setState(e) {
139
- for (let [t, n] of Object.entries(e)) {
140
- let e = D[t];
141
- e && (n == null ? this.clear(t, e) : this.write(t, e, String(n)));
142
- }
143
- }
144
- syncReferences() {
145
- let e = this.options.referenceTarget?.() ?? null ?? this.internals;
146
- if (!e || !C()) {
147
- let e = this.referenceAttributes.filter((e) => this.host.hasAttribute(e));
148
- return e.length > 0 && !T && (T = !0, console.warn(`[a11y] This browser cannot assign ARIA element references, so ${e.join(", ")} on <${this.host.localName}> cannot cross its shadow boundary. Use the component's label property instead.`)), e;
149
- }
150
- let t = [], n = this.host.getRootNode();
151
- for (let r of this.referenceAttributes) {
152
- let i = k[r];
153
- if (!i) continue;
154
- let a = r === "aria-describedby" ? this.options.describedByExtras?.() ?? [] : [], o = this.host.getAttribute(r);
155
- if (o === null) {
156
- this.assignReferences(e, i, a.length > 0 ? a : null);
157
- continue;
158
- }
159
- let s = o.split(/\s+/).filter(Boolean), c = s.map((e) => n.getElementById?.(e) ?? null).filter((e) => e instanceof HTMLElement);
160
- c.length !== s.length && t.push(r);
161
- let l = [...c, ...a];
162
- this.assignReferences(e, i, l.length > 0 ? l : null);
163
- }
164
- return t;
165
- }
166
- assignReferences(e, t, n) {
167
- try {
168
- e[t] = n;
169
- } catch {}
170
- }
171
- write(e, t, n) {
172
- if (this.internals) {
173
- let t = O[e];
174
- if (t && t in this.internals) {
175
- this.internals[t] = n;
176
- return;
177
- }
178
- }
179
- this.host.setAttribute(t, n);
180
- }
181
- clear(e, t) {
182
- if (this.internals) {
183
- let t = O[e];
184
- if (t && t in this.internals) {
185
- this.internals[t] = null;
186
- return;
187
- }
188
- }
189
- this.host.removeAttribute(t);
190
- }
191
- }, D = {
192
- expanded: "aria-expanded",
193
- selected: "aria-selected",
194
- checked: "aria-checked",
195
- pressed: "aria-pressed",
196
- disabled: "aria-disabled",
197
- invalid: "aria-invalid",
198
- required: "aria-required",
199
- readOnly: "aria-readonly",
200
- current: "aria-current",
201
- hasPopup: "aria-haspopup",
202
- level: "aria-level",
203
- orientation: "aria-orientation",
204
- multiSelectable: "aria-multiselectable",
205
- valueNow: "aria-valuenow",
206
- valueMin: "aria-valuemin",
207
- valueMax: "aria-valuemax",
208
- valueText: "aria-valuetext",
209
- label: "aria-label"
210
- }, O = {
211
- expanded: "ariaExpanded",
212
- selected: "ariaSelected",
213
- checked: "ariaChecked",
214
- pressed: "ariaPressed",
215
- disabled: "ariaDisabled",
216
- invalid: "ariaInvalid",
217
- required: "ariaRequired",
218
- readOnly: "ariaReadOnly",
219
- current: "ariaCurrent",
220
- hasPopup: "ariaHasPopup",
221
- level: "ariaLevel",
222
- orientation: "ariaOrientation",
223
- multiSelectable: "ariaMultiSelectable",
224
- valueNow: "ariaValueNow",
225
- valueMin: "ariaValueMin",
226
- valueMax: "ariaValueMax",
227
- valueText: "ariaValueText",
228
- label: "ariaLabel"
229
- }, k = {
230
- "aria-labelledby": "ariaLabelledByElements",
231
- "aria-describedby": "ariaDescribedByElements"
232
- }, A = "invalid-feedback", j = {
233
- id: t,
234
- node: t
235
- };
236
- function M(t, n, r) {
237
- let i = n?.trim();
238
- return !i || !r ? j : {
239
- id: t,
240
- node: e`<small class=${A} id=${t}>${i}</small>`
241
- };
242
- }
243
- function N(e) {
244
- let t = e?.querySelector(`.${A}`);
245
- return t ? [t] : [];
246
- }
247
- //#endregion
248
- //#region libs/mintplayer-web-components/a11y/src/form-associated.ts
249
- function P(e) {
250
- class t extends e {
251
- static {
252
- this.formAssociated = !0;
253
- }
254
- #e = !1;
255
- get internals() {
256
- return S(this);
257
- }
258
- get effectiveDisabled() {
259
- return this.#e || this.hasAttribute("disabled");
260
- }
261
- #t() {
262
- return this;
263
- }
264
- syncFormValue() {
265
- let e = this.internals;
266
- e && typeof e.setFormValue == "function" && e.setFormValue(this.#t().formValue());
267
- }
268
- setFormValidity(e, t) {
269
- let n = this.internals;
270
- if (!n || typeof n.setValidity != "function") return;
271
- let r = this.#t().formValidityAnchor?.() ?? void 0, i = Object.values(e).some(Boolean);
272
- n.setValidity(e, i ? t : void 0, r);
273
- }
274
- formDisabledCallback(e) {
275
- this.#e = e, this.requestUpdate?.();
276
- }
277
- formResetCallback() {
278
- this.#t().formReset(), this.syncFormValue();
279
- }
280
- formStateRestoreCallback(e) {
281
- this.#t().formRestore?.(e), this.syncFormValue();
282
- }
283
- }
284
- return t;
285
- }
286
- //#endregion
287
- export { b as _, c as a, l as c, P as d, M as f, C as g, S as h, s as i, m as l, E as m, a as n, u as o, N as p, o as r, f as s, i as t, g as u, y as v, v as y };
@@ -1,150 +0,0 @@
1
- import { props as e } from "../machine/index.mjs";
2
- import { LitElement as t, html as n, nothing as r } from "lit";
3
- import { createRef as i, ref as a } from "lit/directives/ref.js";
4
- import { isToggleButtonColor as o } from "@mintplayer/ui-core/checkbox";
5
- import { connectRadio as s, radioClasses as c } from "@mintplayer/ui-core/radio";
6
- //#region libs/mintplayer-web-components/radio/src/components/mp-radio.ts
7
- var l = 0, u = class extends t {
8
- constructor(...e) {
9
- super(...e), this._type = "radio", this._checked = !1, this._disabled = !1, this._name = null, this._value = null, this._color = "secondary", this._inputLabel = null, this._errorText = null, this._content = [], this._rootId = `mp-radio-${++l}`, this._inputRef = i(), this.onInputChange = (e) => {
10
- e.stopPropagation(), this._checked = e.target.checked, this.dispatchEvent(new CustomEvent("change", {
11
- detail: {
12
- checked: this._checked,
13
- value: this._value
14
- },
15
- bubbles: !0,
16
- composed: !0
17
- }));
18
- };
19
- }
20
- static get observedAttributes() {
21
- return [
22
- ...super.observedAttributes ?? [],
23
- "invalid",
24
- "required",
25
- "error-text",
26
- "type",
27
- "checked",
28
- "disabled",
29
- "name",
30
- "value",
31
- "color",
32
- "aria-label",
33
- "input-label",
34
- "aria-labelledby",
35
- "aria-describedby"
36
- ];
37
- }
38
- createRenderRoot() {
39
- return this;
40
- }
41
- connectedCallback() {
42
- this.hasUpdated || (this._content = Array.from(this.childNodes)), super.connectedCallback();
43
- }
44
- get inputLabel() {
45
- return this._inputLabel;
46
- }
47
- set inputLabel(e) {
48
- this._inputLabel = e ?? null, this.requestUpdate();
49
- }
50
- get errorText() {
51
- return this._errorText;
52
- }
53
- set errorText(e) {
54
- this._errorText = e ?? null, this.requestUpdate();
55
- }
56
- get type() {
57
- return this._type;
58
- }
59
- set type(e) {
60
- (e === "radio" || e === "toggle_button") && (this._type = e, this.requestUpdate());
61
- }
62
- get checked() {
63
- return this._inputRef.value?.checked ?? this._checked;
64
- }
65
- set checked(e) {
66
- this._checked = !!e, this._inputRef.value && (this._inputRef.value.checked = this._checked);
67
- }
68
- get disabled() {
69
- return this._disabled;
70
- }
71
- set disabled(e) {
72
- let t = !!e;
73
- this._disabled !== t && (this._disabled = t, t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled"), this.requestUpdate());
74
- }
75
- get name() {
76
- return this._name;
77
- }
78
- set name(e) {
79
- this._name = e ?? null, this.requestUpdate();
80
- }
81
- get value() {
82
- return this._value;
83
- }
84
- set value(e) {
85
- this._value = e ?? null, this.requestUpdate();
86
- }
87
- get color() {
88
- return this._color;
89
- }
90
- set color(e) {
91
- o(e) && (this._color = e, this.requestUpdate());
92
- }
93
- attributeChangedCallback(e, t, n) {
94
- switch (super.attributeChangedCallback(e, t, n), e) {
95
- case "error-text":
96
- this._errorText = n;
97
- break;
98
- case "type":
99
- this._type = n === "toggle_button" ? "toggle_button" : "radio";
100
- break;
101
- case "checked":
102
- this.checked = n !== null;
103
- break;
104
- case "disabled":
105
- this._disabled = n !== null;
106
- break;
107
- case "name":
108
- this._name = n;
109
- break;
110
- case "value":
111
- this._value = n;
112
- break;
113
- case "color": {
114
- let e = n ?? "secondary";
115
- if (!o(e)) return;
116
- this._color = e;
117
- break;
118
- }
119
- case "input-label": this._inputLabel = n;
120
- }
121
- this.requestUpdate();
122
- }
123
- group() {
124
- return this.closest("mp-radio-group");
125
- }
126
- render() {
127
- let t = this.group(), i = this.hasAttribute("invalid"), o = s({
128
- type: this._type,
129
- checked: this._checked,
130
- disabled: this._disabled || !!t?.hasAttribute("disabled"),
131
- required: this.hasAttribute("required") || !!t?.hasAttribute("required"),
132
- invalid: i,
133
- name: t?.groupName ?? this._name,
134
- value: this._value,
135
- errorText: this._errorText
136
- }, this._rootId, this.getAttribute("aria-describedby")), l = c(this._type, this._color, i), u = {
137
- ...o.input,
138
- class: l.input,
139
- "aria-label": this.getAttribute("aria-label") ?? this._inputLabel,
140
- "aria-labelledby": this.getAttribute("aria-labelledby")
141
- }, d = n`<input ${a(this._inputRef)} ${e(u)} ?checked=${this._checked} @change=${this.onInputChange} />`, f = o.feedback ? n`<div ${e(o.feedback.attrs)}>${o.feedback.text}</div>` : r;
142
- return l.root === null ? n`${d}<label class=${l.label} for=${o.labelFor ?? r}>${this._content}</label>${f}` : n`<label class=${l.root}>${d}<span class=${l.label}>${this._content}</span></label>${f}`;
143
- }
144
- firstUpdated() {
145
- this._inputRef.value && (this._inputRef.value.checked = this._checked);
146
- }
147
- };
148
- typeof customElements < "u" && !customElements.get("mp-radio") && customElements.define("mp-radio", u);
149
- //#endregion
150
- export { u as t };