@redvars/peacock 3.8.1 → 3.8.3

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 (501) hide show
  1. package/dist/{BaseInput-14YmcfK7.js → BaseInput-CU1zZYKc.js} +3 -3
  2. package/dist/{BaseInput-14YmcfK7.js.map → BaseInput-CU1zZYKc.js.map} +1 -1
  3. package/dist/ButtonConstants-CahP2_NA.js +4 -0
  4. package/dist/ButtonConstants-CahP2_NA.js.map +1 -0
  5. package/dist/{IndividualComponent-DUINtMGK.js → IndividualComponent-Bdwyrvd6.js} +2 -2
  6. package/dist/{IndividualComponent-DUINtMGK.js.map → IndividualComponent-Bdwyrvd6.js.map} +1 -1
  7. package/dist/{NativeHyperlinkMixin-DrYXyfMQ.js → NativeHyperlinkMixin-D9J4aBTy.js} +4 -30
  8. package/dist/NativeHyperlinkMixin-D9J4aBTy.js.map +1 -0
  9. package/dist/accordion-item.js +338 -0
  10. package/dist/accordion-item.js.map +1 -0
  11. package/dist/accordion.js +159 -0
  12. package/dist/accordion.js.map +1 -0
  13. package/dist/alert.js +190 -0
  14. package/dist/alert.js.map +1 -0
  15. package/dist/app-bar.js +324 -0
  16. package/dist/app-bar.js.map +1 -0
  17. package/dist/assets/components.css +1 -1
  18. package/dist/assets/components.css.map +1 -1
  19. package/dist/assets/styles.css +1 -1
  20. package/dist/assets/styles.css.map +1 -1
  21. package/dist/attachable-controller-CAKVrfcG.js +119 -0
  22. package/dist/attachable-controller-CAKVrfcG.js.map +1 -0
  23. package/dist/avatar.js +114 -0
  24. package/dist/avatar.js.map +1 -0
  25. package/dist/babel-DBsfpl3B.js +18 -0
  26. package/dist/babel-DBsfpl3B.js.map +1 -0
  27. package/dist/badge.js +91 -0
  28. package/dist/badge.js.map +1 -0
  29. package/dist/base-Cl6v8-BZ.js +9 -0
  30. package/dist/base-Cl6v8-BZ.js.map +1 -0
  31. package/dist/bottom-sheet.js +14 -5
  32. package/dist/bottom-sheet.js.map +1 -1
  33. package/dist/breadcrumb-item.js +163 -0
  34. package/dist/breadcrumb-item.js.map +1 -0
  35. package/dist/breadcrumb.js +95 -0
  36. package/dist/breadcrumb.js.map +1 -0
  37. package/dist/button-group.js +87 -137
  38. package/dist/button-group.js.map +1 -1
  39. package/dist/button.js +863 -133
  40. package/dist/button.js.map +1 -1
  41. package/dist/calendar-column-view.js +8 -4
  42. package/dist/calendar-column-view.js.map +1 -1
  43. package/dist/calendar-month-view.js +8 -4
  44. package/dist/calendar-month-view.js.map +1 -1
  45. package/dist/calendar.js +8 -4
  46. package/dist/calendar.js.map +1 -1
  47. package/dist/canvas.js +8 -4
  48. package/dist/canvas.js.map +1 -1
  49. package/dist/card-content.js +1 -1
  50. package/dist/card.js +45 -52
  51. package/dist/card.js.map +1 -1
  52. package/dist/cb-compound-expression.js +6 -2
  53. package/dist/cb-compound-expression.js.map +1 -1
  54. package/dist/cb-divider.js +7 -3
  55. package/dist/cb-divider.js.map +1 -1
  56. package/dist/cb-expression.js +6 -2
  57. package/dist/cb-expression.js.map +1 -1
  58. package/dist/cb-predicate.js +7 -3
  59. package/dist/cb-predicate.js.map +1 -1
  60. package/dist/{chart-bar-cn6rrna-.js → chart-bar-CYoGNXnK.js} +6 -2
  61. package/dist/{chart-bar-cn6rrna-.js.map → chart-bar-CYoGNXnK.js.map} +1 -1
  62. package/dist/chart-bar.js +7 -6
  63. package/dist/chart-bar.js.map +1 -1
  64. package/dist/chart-doughnut.js +8 -3
  65. package/dist/chart-doughnut.js.map +1 -1
  66. package/dist/chart-pie.js +8 -3
  67. package/dist/chart-pie.js.map +1 -1
  68. package/dist/chart-stacked-bar.js +7 -6
  69. package/dist/chart-stacked-bar.js.map +1 -1
  70. package/dist/checkbox.js +526 -0
  71. package/dist/checkbox.js.map +1 -0
  72. package/dist/chip.js +459 -0
  73. package/dist/chip.js.map +1 -0
  74. package/dist/{class-map-YU7g0o3B.js → class-map-DG7CA1et.js} +2 -2
  75. package/dist/{class-map-YU7g0o3B.js.map → class-map-DG7CA1et.js.map} +1 -1
  76. package/dist/clock.js +6 -2
  77. package/dist/clock.js.map +1 -1
  78. package/dist/code-editor.js +45 -30
  79. package/dist/code-editor.js.map +1 -1
  80. package/dist/code-highlighter.js +82 -11216
  81. package/dist/code-highlighter.js.map +1 -1
  82. package/dist/color-picker.js +701 -0
  83. package/dist/color-picker.js.map +1 -0
  84. package/dist/condition-builder.js +5 -1
  85. package/dist/condition-builder.js.map +1 -1
  86. package/dist/container.js +141 -0
  87. package/dist/container.js.map +1 -0
  88. package/dist/custom-elements-jsdocs.json +823 -778
  89. package/dist/custom-elements.json +4067 -2207
  90. package/dist/datasource-B2eRh6Or.js +108 -0
  91. package/dist/datasource-B2eRh6Or.js.map +1 -0
  92. package/dist/dispatch-event-utils-CuEqjlPT.js.map +1 -1
  93. package/dist/divider.js +135 -0
  94. package/dist/divider.js.map +1 -0
  95. package/dist/dropdown-button.js +11 -6
  96. package/dist/dropdown-button.js.map +1 -1
  97. package/dist/element-internals-2CMts_0M.js +290 -0
  98. package/dist/element-internals-2CMts_0M.js.map +1 -0
  99. package/dist/elevation.js +94 -0
  100. package/dist/elevation.js.map +1 -0
  101. package/dist/empty-state.js +194 -0
  102. package/dist/empty-state.js.map +1 -0
  103. package/dist/estree-C2LDzX4U.js +47 -0
  104. package/dist/estree-C2LDzX4U.js.map +1 -0
  105. package/dist/{event-manager-D-QCmUgR.js → event-manager-DTyX2uYD.js} +2 -2
  106. package/dist/{event-manager-D-QCmUgR.js.map → event-manager-DTyX2uYD.js.map} +1 -1
  107. package/dist/fab.js +139 -148
  108. package/dist/fab.js.map +1 -1
  109. package/dist/field.js +461 -0
  110. package/dist/field.js.map +1 -0
  111. package/dist/{popover-DUPmMVWS.js → floating-controller-CnUZnOhK.js} +2 -171
  112. package/dist/floating-controller-CnUZnOhK.js.map +1 -0
  113. package/dist/{flow-designer-node-BWrPuxAR.js → flow-designer-node-DsVwQTac.js} +7 -3
  114. package/dist/{flow-designer-node-BWrPuxAR.js.map → flow-designer-node-DsVwQTac.js.map} +1 -1
  115. package/dist/flow-designer-node.js +3 -3
  116. package/dist/flow-designer.js +19 -12
  117. package/dist/flow-designer.js.map +1 -1
  118. package/dist/focus-ring.js +126 -0
  119. package/dist/focus-ring.js.map +1 -0
  120. package/dist/form-associated-BXADnjOB.js +388 -0
  121. package/dist/form-associated-BXADnjOB.js.map +1 -0
  122. package/dist/html-D22sQuVy.js +27 -0
  123. package/dist/html-D22sQuVy.js.map +1 -0
  124. package/dist/html-editor.js +21 -9
  125. package/dist/html-editor.js.map +1 -1
  126. package/dist/hyperlink-DLvb6MXE.js +98 -0
  127. package/dist/hyperlink-DLvb6MXE.js.map +1 -0
  128. package/dist/icon-button.js +1064 -0
  129. package/dist/icon-button.js.map +1 -0
  130. package/dist/icon.js +170 -0
  131. package/dist/icon.js.map +1 -0
  132. package/dist/if-defined-BXZpRQ4P.js +10 -0
  133. package/dist/if-defined-BXZpRQ4P.js.map +1 -0
  134. package/dist/image.js +201 -0
  135. package/dist/image.js.map +1 -0
  136. package/dist/index-_g_oLekF.js +14095 -0
  137. package/dist/index-_g_oLekF.js.map +1 -0
  138. package/dist/index.js +74 -20
  139. package/dist/index.js.map +1 -1
  140. package/dist/is-dark-mode-DOcaw4Yq.js.map +1 -1
  141. package/dist/is-link-Dk2OV3PM.js +6 -0
  142. package/dist/is-link-Dk2OV3PM.js.map +1 -0
  143. package/dist/item.js +213 -0
  144. package/dist/item.js.map +1 -0
  145. package/dist/link.js +75 -0
  146. package/dist/link.js.map +1 -0
  147. package/dist/list-H0itjRte.js +526 -0
  148. package/dist/list-H0itjRte.js.map +1 -0
  149. package/dist/list.js +14 -0
  150. package/dist/list.js.map +1 -0
  151. package/dist/{peacock-loader.js → loader.js} +87 -22
  152. package/dist/loader.js.map +1 -0
  153. package/dist/menu-item.js +388 -0
  154. package/dist/menu-item.js.map +1 -0
  155. package/dist/menu.js +520 -0
  156. package/dist/menu.js.map +1 -0
  157. package/dist/modal.js +9 -5
  158. package/dist/modal.js.map +1 -1
  159. package/dist/navigation-rail-item.js +400 -0
  160. package/dist/navigation-rail-item.js.map +1 -0
  161. package/dist/navigation-rail.js +219 -0
  162. package/dist/navigation-rail.js.map +1 -0
  163. package/dist/notification-manager.js +8 -4
  164. package/dist/notification-manager.js.map +1 -1
  165. package/dist/notification.js +8 -4
  166. package/dist/notification.js.map +1 -1
  167. package/dist/number-counter.js +7 -3
  168. package/dist/number-counter.js.map +1 -1
  169. package/dist/{observe-slot-change-D8Xg-kSS.js → observe-slot-change-DPxaZrZF.js} +3 -4
  170. package/dist/observe-slot-change-DPxaZrZF.js.map +1 -0
  171. package/dist/option.js +121 -0
  172. package/dist/option.js.map +1 -0
  173. package/dist/pagination.js +255 -0
  174. package/dist/pagination.js.map +1 -0
  175. package/dist/pierre-dark-DFWl0m-C.js +4 -0
  176. package/dist/pierre-dark-DFWl0m-C.js.map +1 -0
  177. package/dist/pierre-light-BEkAPImt.js +4 -0
  178. package/dist/pierre-light-BEkAPImt.js.map +1 -0
  179. package/dist/popover-content.js +7 -3
  180. package/dist/popover-content.js.map +1 -1
  181. package/dist/popover.js +175 -3
  182. package/dist/popover.js.map +1 -1
  183. package/dist/postcss-BhbitHaI.js +64 -0
  184. package/dist/postcss-BhbitHaI.js.map +1 -0
  185. package/dist/{property-1psGvXOq.js → property-B49QQ8pS.js} +2 -2
  186. package/dist/{property-1psGvXOq.js.map → property-B49QQ8pS.js.map} +1 -1
  187. package/dist/query-CHb9Ft_d.js +10 -0
  188. package/dist/query-CHb9Ft_d.js.map +1 -0
  189. package/dist/query-assigned-elements-BJaGSqM0.js +10 -0
  190. package/dist/query-assigned-elements-BJaGSqM0.js.map +1 -0
  191. package/dist/radio.js +476 -0
  192. package/dist/radio.js.map +1 -0
  193. package/dist/ripple.js +506 -0
  194. package/dist/ripple.js.map +1 -0
  195. package/dist/search.js +12 -7
  196. package/dist/search.js.map +1 -1
  197. package/dist/segmented-button-group.js +137 -0
  198. package/dist/segmented-button-group.js.map +1 -0
  199. package/dist/segmented-button.js +289 -0
  200. package/dist/segmented-button.js.map +1 -0
  201. package/dist/select-CspawZ18.js +3944 -0
  202. package/dist/select-CspawZ18.js.map +1 -0
  203. package/dist/side-sheet.js +9 -5
  204. package/dist/side-sheet.js.map +1 -1
  205. package/dist/skeleton.js +122 -0
  206. package/dist/skeleton.js.map +1 -0
  207. package/dist/slider.js +346 -0
  208. package/dist/slider.js.map +1 -0
  209. package/dist/snackbar.js +335 -0
  210. package/dist/snackbar.js.map +1 -0
  211. package/dist/spinner.js +100 -0
  212. package/dist/spinner.js.map +1 -0
  213. package/dist/split-button.js +10 -5
  214. package/dist/split-button.js.map +1 -1
  215. package/dist/spread-B5cgadZl.js +32 -0
  216. package/dist/spread-B5cgadZl.js.map +1 -0
  217. package/dist/src/__internal/aria/aria.d.ts +98 -0
  218. package/dist/src/__internal/aria/delegate.d.ts +54 -0
  219. package/dist/src/__internal/events/dispatch-hooks.d.ts +80 -0
  220. package/dist/src/__internal/mixins/element-internals.d.ts +40 -0
  221. package/dist/src/__internal/mixins/form-associated.d.ts +174 -0
  222. package/dist/src/__internal/mixins/form-submitter.d.ts +59 -0
  223. package/dist/src/__internal/mixins/hyperlink.d.ts +42 -0
  224. package/dist/src/__internal/mixins/mixin.d.ts +49 -0
  225. package/dist/src/{__utils → __internal/utils}/observe-slot-change.d.ts +1 -0
  226. package/dist/src/accordion/accordion-item.d.ts +3 -1
  227. package/dist/src/accordion/accordion.d.ts +1 -1
  228. package/dist/src/alert/alert.d.ts +43 -0
  229. package/dist/src/alert/index.d.ts +1 -0
  230. package/dist/src/app-bar/app-bar.d.ts +92 -0
  231. package/dist/src/app-bar/index.d.ts +1 -0
  232. package/dist/src/avatar/avatar.d.ts +2 -0
  233. package/dist/src/bottom-sheet/bottom-sheet.d.ts +1 -1
  234. package/dist/src/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +1 -0
  235. package/dist/src/button/ButtonTypes.d.ts +5 -0
  236. package/dist/src/button/base-button/base-button.d.ts +18 -0
  237. package/dist/src/button/button/button.d.ts +29 -37
  238. package/dist/src/button/button-group/button-group.d.ts +17 -18
  239. package/dist/src/{fab → button/fab}/fab.d.ts +8 -26
  240. package/dist/src/button/icon-button/icon-button.d.ts +20 -27
  241. package/dist/src/button/index.d.ts +1 -0
  242. package/dist/src/calendar/calendar.d.ts +1 -1
  243. package/dist/src/canvas/canvas.d.ts +1 -1
  244. package/dist/src/card/card.d.ts +5 -6
  245. package/dist/src/chart-bar/chart-bar.d.ts +1 -1
  246. package/dist/src/chart-bar/chart-stacked-bar.d.ts +1 -1
  247. package/dist/src/checkbox/checkbox.d.ts +5 -1
  248. package/dist/src/chip/chip/chip.d.ts +9 -8
  249. package/dist/src/code-highlighter/code-highlighter.d.ts +2 -2
  250. package/dist/src/color-picker/color-picker.d.ts +85 -0
  251. package/dist/src/color-picker/index.d.ts +1 -0
  252. package/dist/src/container/container.d.ts +5 -1
  253. package/dist/src/divider/divider.d.ts +2 -0
  254. package/dist/src/empty-state/empty-state.d.ts +1 -0
  255. package/dist/src/field/field.d.ts +19 -1
  256. package/dist/src/focus-ring/focus-ring.d.ts +3 -7
  257. package/dist/src/html-editor/html-editor.d.ts +1 -1
  258. package/dist/src/icon/icon.d.ts +9 -4
  259. package/dist/src/image/image.d.ts +4 -0
  260. package/dist/src/index.d.ts +8 -6
  261. package/dist/src/item/item.d.ts +19 -29
  262. package/dist/src/link/link.d.ts +1 -1
  263. package/dist/src/list/list-item.d.ts +10 -6
  264. package/dist/src/list/list.d.ts +27 -2
  265. package/dist/src/menu/menu/menu.d.ts +14 -0
  266. package/dist/src/menu/menu-item/menu-item.d.ts +11 -4
  267. package/dist/src/modal/modal.d.ts +1 -1
  268. package/dist/src/navigation-rail/navigation-rail-item.d.ts +5 -4
  269. package/dist/src/navigation-rail/navigation-rail.d.ts +1 -1
  270. package/dist/src/radio/radio.d.ts +5 -0
  271. package/dist/src/ripple/ripple.d.ts +10 -1
  272. package/dist/src/search/search.d.ts +1 -1
  273. package/dist/src/segmented-button/segmented-button-group.d.ts +2 -2
  274. package/dist/src/segmented-button/segmented-button.d.ts +2 -0
  275. package/dist/src/side-sheet/side-sheet.d.ts +1 -1
  276. package/dist/src/skeleton/skeleton.d.ts +1 -0
  277. package/dist/src/slider/slider.d.ts +1 -0
  278. package/dist/src/snackbar/snackbar.d.ts +12 -2
  279. package/dist/src/svg/svg.d.ts +5 -0
  280. package/dist/src/table/table.d.ts +5 -0
  281. package/dist/src/tabs/tab.d.ts +2 -7
  282. package/dist/src/toolbar/toolbar.d.ts +2 -2
  283. package/dist/standalone-Ccq0tWwA.js +32 -0
  284. package/dist/standalone-Ccq0tWwA.js.map +1 -0
  285. package/dist/{state-DwbEjqVk.js → state-DkTK9EGF.js} +2 -2
  286. package/dist/{state-DwbEjqVk.js.map → state-DkTK9EGF.js.map} +1 -1
  287. package/dist/{style-map-DVmWOuYy.js → style-map-BQD5Et1D.js} +2 -2
  288. package/dist/{style-map-DVmWOuYy.js.map → style-map-BQD5Et1D.js.map} +1 -1
  289. package/dist/sub-menu.js +246 -0
  290. package/dist/sub-menu.js.map +1 -0
  291. package/dist/svg.js +273 -0
  292. package/dist/svg.js.map +1 -0
  293. package/dist/tab-group.js +188 -0
  294. package/dist/tab-group.js.map +1 -0
  295. package/dist/tab-panel.js +61 -0
  296. package/dist/tab-panel.js.map +1 -0
  297. package/dist/tab.js +658 -0
  298. package/dist/tab.js.map +1 -0
  299. package/dist/table.js +620 -0
  300. package/dist/table.js.map +1 -0
  301. package/dist/tabs.js +240 -0
  302. package/dist/tabs.js.map +1 -0
  303. package/dist/throttle-C7ZAPqtu.js +24 -0
  304. package/dist/throttle-C7ZAPqtu.js.map +1 -0
  305. package/dist/toolbar.js +9 -5
  306. package/dist/toolbar.js.map +1 -1
  307. package/dist/tooltip.js +270 -0
  308. package/dist/tooltip.js.map +1 -0
  309. package/dist/tsconfig.tsbuildinfo +1 -1
  310. package/dist/{unsafe-html-BsGUjx94.js → unsafe-html-Ct0N2_UU.js} +2 -2
  311. package/dist/{unsafe-html-BsGUjx94.js.map → unsafe-html-Ct0N2_UU.js.map} +1 -1
  312. package/dist/when-DEJm_QN9.js +9 -0
  313. package/dist/when-DEJm_QN9.js.map +1 -0
  314. package/package.json +4 -2
  315. package/readme.md +4 -4
  316. package/scss/mixin.scss +9 -6
  317. package/src/__internal/aria/aria.ts +293 -0
  318. package/src/__internal/aria/delegate.ts +206 -0
  319. package/src/__internal/events/dispatch-hooks.ts +182 -0
  320. package/src/__internal/mixins/element-internals.ts +73 -0
  321. package/src/__internal/mixins/form-associated.ts +295 -0
  322. package/src/__internal/mixins/form-submitter.ts +133 -0
  323. package/src/__internal/mixins/hyperlink.ts +71 -0
  324. package/src/__internal/mixins/mixin.ts +58 -0
  325. package/src/{__utils → __internal/utils}/observe-slot-change.ts +2 -5
  326. package/src/accordion/accordion-item.ts +6 -2
  327. package/src/accordion/accordion.ts +4 -2
  328. package/src/accordion/demo/index.html +95 -90
  329. package/src/alert/alert.scss +82 -0
  330. package/src/{banner/banner.ts → alert/alert.ts} +22 -22
  331. package/src/alert/index.ts +1 -0
  332. package/src/app-bar/app-bar-colors.scss +17 -0
  333. package/src/app-bar/app-bar.scss +165 -0
  334. package/src/app-bar/app-bar.ts +155 -0
  335. package/src/app-bar/index.ts +1 -0
  336. package/src/avatar/avatar.ts +4 -0
  337. package/src/badge/badge.ts +2 -0
  338. package/src/bottom-sheet/bottom-sheet.ts +8 -2
  339. package/src/breadcrumb/breadcrumb/breadcrumb.ts +2 -0
  340. package/src/breadcrumb/breadcrumb-item/breadcrumb-item.ts +3 -0
  341. package/src/button/ButtonTypes.ts +17 -0
  342. package/src/button/base-button/base-button.ts +85 -0
  343. package/src/button/button/button-base.scss +307 -0
  344. package/src/button/button/button-colors.scss +27 -32
  345. package/src/button/button/button-layers.scss +126 -43
  346. package/src/button/button/button-shapes.scss +73 -0
  347. package/src/button/button/button.scss +12 -286
  348. package/src/button/button/button.ts +174 -194
  349. package/src/button/button-group/button-group.scss +43 -36
  350. package/src/button/button-group/button-group.ts +26 -137
  351. package/src/{fab → button/fab}/fab-colors.scss +0 -10
  352. package/src/button/fab/fab-sizes.scss +37 -0
  353. package/src/button/fab/fab.scss +172 -0
  354. package/src/{fab → button/fab}/fab.ts +69 -109
  355. package/src/button/icon-button/icon-button-sizes.scss +18 -3
  356. package/src/button/icon-button/icon-button.scss +5 -0
  357. package/src/button/icon-button/icon-button.ts +111 -141
  358. package/src/button/index.ts +7 -0
  359. package/src/calendar/calendar.ts +2 -2
  360. package/src/canvas/canvas.ts +2 -2
  361. package/src/card/card.scss +21 -8
  362. package/src/card/card.ts +20 -40
  363. package/src/chart-bar/chart-bar.ts +2 -2
  364. package/src/chart-bar/chart-stacked-bar.ts +2 -2
  365. package/src/checkbox/checkbox.ts +12 -4
  366. package/src/chip/chip/chip.scss +1 -1
  367. package/src/chip/chip/chip.ts +35 -55
  368. package/src/chip/demo/index.html +30 -26
  369. package/src/code-editor/code-editor.ts +68 -58
  370. package/src/code-editor/demo/index.html +32 -27
  371. package/src/code-highlighter/code-highlighter.ts +95 -40
  372. package/src/code-highlighter/demo/index.html +24 -21
  373. package/src/color-picker/color-picker.scss +217 -0
  374. package/src/color-picker/color-picker.ts +478 -0
  375. package/src/color-picker/index.ts +1 -0
  376. package/src/container/container.ts +8 -2
  377. package/src/date-picker/date-picker.ts +2 -3
  378. package/src/divider/divider.ts +5 -1
  379. package/src/dropdown-button/demo/index.html +106 -101
  380. package/src/dropdown-button/dropdown-button.ts +1 -1
  381. package/src/elevation/elevation.ts +2 -0
  382. package/src/empty-state/empty-state.ts +3 -0
  383. package/src/field/field.ts +52 -33
  384. package/src/focus-ring/focus-ring.ts +5 -7
  385. package/src/html-editor/html-editor.ts +28 -16
  386. package/src/icon/datasource.ts +1 -1
  387. package/src/icon/icon.ts +27 -15
  388. package/src/image/image.ts +18 -6
  389. package/src/index.ts +25 -6
  390. package/src/input/input.ts +2 -2
  391. package/src/item/item.scss +127 -161
  392. package/src/item/item.ts +69 -323
  393. package/src/link/link.ts +3 -1
  394. package/src/list/list-item.scss +48 -32
  395. package/src/list/list-item.ts +109 -79
  396. package/src/list/list.scss +1 -13
  397. package/src/list/list.ts +170 -5
  398. package/src/{peacock-loader.ts → loader.ts} +95 -79
  399. package/src/menu/menu/menu.scss +15 -26
  400. package/src/menu/menu/menu.ts +20 -9
  401. package/src/menu/menu-item/menu-item.scss +82 -20
  402. package/src/menu/menu-item/menu-item.ts +85 -46
  403. package/src/menu/sub-menu/sub-menu.scss +5 -1
  404. package/src/menu/sub-menu/sub-menu.ts +3 -0
  405. package/src/modal/modal.ts +2 -2
  406. package/src/navigation-rail/navigation-rail-item.scss +25 -8
  407. package/src/navigation-rail/navigation-rail-item.ts +21 -36
  408. package/src/navigation-rail/navigation-rail.scss +25 -21
  409. package/src/navigation-rail/navigation-rail.ts +4 -2
  410. package/src/number-field/number-field.ts +2 -2
  411. package/src/pagination/pagination.ts +2 -0
  412. package/src/popover/popover.ts +3 -3
  413. package/src/radio/radio.ts +13 -5
  414. package/src/ripple/ripple.ts +14 -1
  415. package/src/search/search.ts +3 -3
  416. package/src/segmented-button/segmented-button-group.ts +8 -4
  417. package/src/segmented-button/segmented-button.ts +4 -0
  418. package/src/select/option.ts +2 -0
  419. package/src/side-sheet/side-sheet.ts +3 -3
  420. package/src/sidebar-menu/sidebar-menu-item.scss +12 -6
  421. package/src/sidebar-menu/sidebar-menu-item.ts +3 -2
  422. package/src/skeleton/skeleton.ts +3 -0
  423. package/src/slider/slider.ts +4 -1
  424. package/src/snackbar/snackbar.ts +40 -25
  425. package/src/spinner/spinner.ts +2 -0
  426. package/src/svg/svg.ts +27 -9
  427. package/src/switch/switch.ts +1 -1
  428. package/src/table/table.ts +16 -3
  429. package/src/tabs/demo/index.html +79 -79
  430. package/src/tabs/tab-group.ts +2 -0
  431. package/src/tabs/tab-panel.ts +2 -0
  432. package/src/tabs/tab.scss +4 -4
  433. package/src/tabs/tab.ts +16 -39
  434. package/src/tabs/tabs.ts +2 -0
  435. package/src/textarea/textarea.ts +2 -2
  436. package/src/time-picker/time-picker.ts +2 -2
  437. package/src/toolbar/toolbar.ts +3 -3
  438. package/src/tooltip/tooltip.ts +14 -8
  439. package/src/url-field/url-field.ts +2 -3
  440. package/dist/ButtonConstants-D06bY4uy.js +0 -114
  441. package/dist/ButtonConstants-D06bY4uy.js.map +0 -1
  442. package/dist/NativeHyperlinkMixin-DrYXyfMQ.js.map +0 -1
  443. package/dist/banner.js +0 -186
  444. package/dist/banner.js.map +0 -1
  445. package/dist/button-colors-D7sJyPy8.js +0 -586
  446. package/dist/button-colors-D7sJyPy8.js.map +0 -1
  447. package/dist/icon-CueRR7wx.js +0 -260
  448. package/dist/icon-CueRR7wx.js.map +0 -1
  449. package/dist/icon-button-CAzYr_qr.js +0 -318
  450. package/dist/icon-button-CAzYr_qr.js.map +0 -1
  451. package/dist/navigation-rail-CM_svs5_.js +0 -14184
  452. package/dist/navigation-rail-CM_svs5_.js.map +0 -1
  453. package/dist/observe-slot-change-D8Xg-kSS.js.map +0 -1
  454. package/dist/peacock-loader.js.map +0 -1
  455. package/dist/popover-DUPmMVWS.js.map +0 -1
  456. package/dist/query-QBcUV-L_.js +0 -15
  457. package/dist/query-QBcUV-L_.js.map +0 -1
  458. package/dist/src/banner/banner.d.ts +0 -43
  459. package/dist/src/banner/index.d.ts +0 -1
  460. package/dist/src/button/GroupButtonInterface.d.ts +0 -4
  461. package/src/banner/banner.scss +0 -82
  462. package/src/banner/index.ts +0 -1
  463. package/src/button/GroupButtonInterface.ts +0 -4
  464. package/src/button/button/only-button.scss +0 -13
  465. package/src/fab/fab-sizes.scss +0 -37
  466. package/src/fab/fab.scss +0 -143
  467. /package/dist/src/{__controllers → __internal/controllers}/attachable-controller.d.ts +0 -0
  468. /package/dist/src/{__controllers → __internal/controllers}/floating-controller.d.ts +0 -0
  469. /package/dist/src/{__directive → __internal/directive}/spread.d.ts +0 -0
  470. /package/dist/src/{__mixins → __internal/mixins}/MixinConstructor.d.ts +0 -0
  471. /package/dist/src/{__mixins → __internal/mixins}/NativeButtonMixin.d.ts +0 -0
  472. /package/dist/src/{__mixins → __internal/mixins}/NativeHyperlinkMixin.d.ts +0 -0
  473. /package/dist/src/{__utils → __internal/utils}/cache-fetch.d.ts +0 -0
  474. /package/dist/src/{__utils → __internal/utils}/copy-to-clipboard.d.ts +0 -0
  475. /package/dist/src/{__utils → __internal/utils}/dispatch-event-utils.d.ts +0 -0
  476. /package/dist/src/{__utils → __internal/utils}/is-dark-mode.d.ts +0 -0
  477. /package/dist/src/{__utils → __internal/utils}/is-in-viewport.d.ts +0 -0
  478. /package/dist/src/{__utils → __internal/utils}/is-link.d.ts +0 -0
  479. /package/dist/src/{__utils → __internal/utils}/observe-theme-change.d.ts +0 -0
  480. /package/dist/src/{__utils → __internal/utils}/sanitize-svg.d.ts +0 -0
  481. /package/dist/src/{__utils → __internal/utils}/throttle.d.ts +0 -0
  482. /package/dist/src/{fab → button/fab}/index.d.ts +0 -0
  483. /package/dist/src/{peacock-loader.d.ts → loader.d.ts} +0 -0
  484. /package/dist/test/{banner.test.d.ts → alert.test.d.ts} +0 -0
  485. /package/src/{__controllers → __internal/controllers}/attachable-controller.ts +0 -0
  486. /package/src/{__controllers → __internal/controllers}/floating-controller.ts +0 -0
  487. /package/src/{__directive → __internal/directive}/spread.ts +0 -0
  488. /package/src/{__mixins → __internal/mixins}/MixinConstructor.ts +0 -0
  489. /package/src/{__mixins → __internal/mixins}/NativeButtonMixin.ts +0 -0
  490. /package/src/{__mixins → __internal/mixins}/NativeHyperlinkMixin.ts +0 -0
  491. /package/src/{__mixins → __internal/mixins}/README.md +0 -0
  492. /package/src/{__utils → __internal/utils}/cache-fetch.ts +0 -0
  493. /package/src/{__utils → __internal/utils}/copy-to-clipboard.ts +0 -0
  494. /package/src/{__utils → __internal/utils}/dispatch-event-utils.ts +0 -0
  495. /package/src/{__utils → __internal/utils}/is-dark-mode.ts +0 -0
  496. /package/src/{__utils → __internal/utils}/is-in-viewport.ts +0 -0
  497. /package/src/{__utils → __internal/utils}/is-link.ts +0 -0
  498. /package/src/{__utils → __internal/utils}/observe-theme-change.ts +0 -0
  499. /package/src/{__utils → __internal/utils}/sanitize-svg.ts +0 -0
  500. /package/src/{__utils → __internal/utils}/throttle.ts +0 -0
  501. /package/src/{fab → button/fab}/index.ts +0 -0
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Accessibility Object Model reflective aria property name types.
3
+ */
4
+ export type ARIAProperty = keyof ARIAMixin;
5
+ /**
6
+ * Accessibility Object Model reflective aria properties.
7
+ */
8
+ export declare const ARIA_PROPERTIES: ARIAProperty[];
9
+ /**
10
+ * Accessibility Object Model aria attribute name types.
11
+ */
12
+ export type ARIAAttribute = ARIAPropertyToAttribute<ARIAProperty>;
13
+ /**
14
+ * Accessibility Object Model aria attributes.
15
+ */
16
+ export declare const ARIA_ATTRIBUTES: ("role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext")[];
17
+ /**
18
+ * Checks if an attribute is one of the AOM aria attributes.
19
+ *
20
+ * @example
21
+ * isAriaAttribute('aria-label'); // true
22
+ *
23
+ * @param attribute The attribute to check.
24
+ * @return True if the attribute is an aria attribute, or false if not.
25
+ */
26
+ export declare function isAriaAttribute(attribute: string): attribute is ARIAAttribute;
27
+ /**
28
+ * Converts an AOM aria property into its corresponding attribute.
29
+ *
30
+ * @example
31
+ * ariaPropertyToAttribute('ariaLabel'); // 'aria-label'
32
+ *
33
+ * @param property The aria property.
34
+ * @return The aria attribute.
35
+ */
36
+ export declare function ariaPropertyToAttribute<K extends ARIAProperty>(property: K): ARIAPropertyToAttribute<K>;
37
+ type ARIAPropertyToAttribute<K extends string> = K extends `aria${infer Suffix}Element${infer OptS}` ? `aria-${Lowercase<Suffix>}` : K extends `aria${infer Suffix}` ? `aria-${Lowercase<Suffix>}` : K;
38
+ /**
39
+ * An extension of `ARIAMixin` that enforces strict value types for aria
40
+ * properties.
41
+ *
42
+ * This is needed for correct typing in render functions with lit analyzer.
43
+ *
44
+ * @example
45
+ * render() {
46
+ * const {ariaLabel} = this as ARIAMixinStrict;
47
+ * return html`
48
+ * <button aria-label=${ariaLabel || nothing}>
49
+ * <slot></slot>
50
+ * </button>
51
+ * `;
52
+ * }
53
+ */
54
+ export interface ARIAMixinStrict extends ARIAMixin {
55
+ ariaAtomic: 'true' | 'false' | null;
56
+ ariaAutoComplete: 'none' | 'inline' | 'list' | 'both' | null;
57
+ ariaBusy: 'true' | 'false' | null;
58
+ ariaChecked: 'true' | 'false' | null;
59
+ ariaColCount: `${number}` | null;
60
+ ariaColIndex: `${number}` | null;
61
+ ariaColSpan: `${number}` | null;
62
+ ariaCurrent: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false' | null;
63
+ ariaDisabled: 'true' | 'false' | null;
64
+ ariaExpanded: 'true' | 'false' | null;
65
+ ariaHasPopup: 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | null;
66
+ ariaHidden: 'true' | 'false' | null;
67
+ ariaInvalid: 'true' | 'false' | null;
68
+ ariaKeyShortcuts: string | null;
69
+ ariaLabel: string | null;
70
+ ariaLevel: `${number}` | null;
71
+ ariaLive: 'assertive' | 'off' | 'polite' | null;
72
+ ariaModal: 'true' | 'false' | null;
73
+ ariaMultiLine: 'true' | 'false' | null;
74
+ ariaMultiSelectable: 'true' | 'false' | null;
75
+ ariaOrientation: 'horizontal' | 'vertical' | 'undefined' | null;
76
+ ariaPlaceholder: string | null;
77
+ ariaPosInSet: `${number}` | null;
78
+ ariaPressed: 'true' | 'false' | null;
79
+ ariaReadOnly: 'true' | 'false' | null;
80
+ ariaRequired: 'true' | 'false' | null;
81
+ ariaRoleDescription: string | null;
82
+ ariaRowCount: `${number}` | null;
83
+ ariaRowIndex: `${number}` | null;
84
+ ariaRowSpan: `${number}` | null;
85
+ ariaSelected: 'true' | 'false' | null;
86
+ ariaSetSize: `${number}` | null;
87
+ ariaSort: 'ascending' | 'descending' | 'none' | 'other' | null;
88
+ ariaValueMax: `${number}` | null;
89
+ ariaValueMin: `${number}` | null;
90
+ ariaValueNow: `${number}` | null;
91
+ ariaValueText: string | null;
92
+ role: ARIARole | null;
93
+ }
94
+ /**
95
+ * Valid values for `role`.
96
+ */
97
+ export type ARIARole = 'alert' | 'alertdialog' | 'button' | 'checkbox' | 'dialog' | 'gridcell' | 'link' | 'log' | 'marquee' | 'menuitem' | 'menuitemcheckbox' | 'menuitemradio' | 'option' | 'progressbar' | 'radio' | 'scrollbar' | 'searchbox' | 'slider' | 'spinbutton' | 'status' | 'switch' | 'tab' | 'tabpanel' | 'textbox' | 'timer' | 'tooltip' | 'treeitem' | 'combobox' | 'grid' | 'listbox' | 'menu' | 'menubar' | 'radiogroup' | 'tablist' | 'tree' | 'treegrid' | 'application' | 'article' | 'cell' | 'columnheader' | 'definition' | 'directory' | 'document' | 'feed' | 'figure' | 'group' | 'heading' | 'img' | 'list' | 'listitem' | 'math' | 'none' | 'note' | 'presentation' | 'region' | 'row' | 'rowgroup' | 'rowheader' | 'separator' | 'table' | 'term' | 'text' | 'toolbar' | 'banner' | 'complementary' | 'contentinfo' | 'form' | 'main' | 'navigation' | 'region' | 'search' | 'doc-abstract' | 'doc-acknowledgments' | 'doc-afterword' | 'doc-appendix' | 'doc-backlink' | 'doc-biblioentry' | 'doc-bibliography' | 'doc-biblioref' | 'doc-chapter' | 'doc-colophon' | 'doc-conclusion' | 'doc-cover' | 'doc-credit' | 'doc-credits' | 'doc-dedication' | 'doc-endnote' | 'doc-endnotes' | 'doc-epigraph' | 'doc-epilogue' | 'doc-errata' | 'doc-example' | 'doc-footnote' | 'doc-foreword' | 'doc-glossary' | 'doc-glossref' | 'doc-index' | 'doc-introduction' | 'doc-noteref' | 'doc-notice' | 'doc-pagebreak' | 'doc-pagelist' | 'doc-part' | 'doc-preface' | 'doc-prologue' | 'doc-pullquote' | 'doc-qna' | 'doc-subtitle' | 'doc-tip' | 'doc-toc';
98
+ export {};
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { LitElement } from 'lit';
7
+ import { MixinBase, MixinReturn } from '../mixins/mixin.js';
8
+ /**
9
+ * Mixes in aria delegation for elements that delegate focus and aria to inner
10
+ * shadow root elements.
11
+ *
12
+ * This mixin fixes invalid aria announcements with shadow roots, caused by
13
+ * duplicate aria attributes on both the host and the inner shadow root element.
14
+ *
15
+ * Note: this mixin **does not yet support** ID reference attributes, such as
16
+ * `aria-labelledby` or `aria-controls`.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * class MyButton extends mixinDelegatesAria(LitElement) {
21
+ * static shadowRootOptions = {mode: 'open', delegatesFocus: true};
22
+ *
23
+ * render() {
24
+ * return html`
25
+ * <button aria-label=${this.ariaLabel || nothing}>
26
+ * <slot></slot>
27
+ * </button>
28
+ * `;
29
+ * }
30
+ * }
31
+ * ```
32
+ * ```html
33
+ * <my-button aria-label="Plus one">+1</my-button>
34
+ * ```
35
+ *
36
+ * Use `ARIAMixinStrict` for lit analyzer strict types, such as the "role"
37
+ * attribute.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * return html`
42
+ * <button role=${(this as ARIAMixinStrict).role || nothing}>
43
+ * <slot></slot>
44
+ * </button>
45
+ * `;
46
+ * ```
47
+ *
48
+ * In the future, updates to the Accessibility Object Model (AOM) will provide
49
+ * built-in aria delegation features that will replace this mixin.
50
+ *
51
+ * @param base The class to mix functionality into.
52
+ * @return The provided class with aria delegation mixed in.
53
+ */
54
+ export declare function mixinDelegatesAria<T extends MixinBase<LitElement>>(base: T): MixinReturn<T>;
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Add a hook for an event that is called after the event is dispatched and
3
+ * propagates to other event listeners.
4
+ *
5
+ * This is useful for behaviors that need to check if an event is canceled.
6
+ *
7
+ * The callback is invoked synchronously, which allows for better integration
8
+ * with synchronous platform APIs (like `<form>` or `<label>` clicking).
9
+ *
10
+ * Note: `setupDispatchHooks()` must be called on the element before adding any
11
+ * other event listeners. Call it in the constructor of an element or
12
+ * controller.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * class MyControl extends LitElement {
17
+ * constructor() {
18
+ * super();
19
+ * setupDispatchHooks(this, 'click');
20
+ * this.addEventListener('click', event => {
21
+ * afterDispatch(event, () => {
22
+ * if (event.defaultPrevented) {
23
+ * return
24
+ * }
25
+ *
26
+ * // ... perform logic
27
+ * });
28
+ * });
29
+ * }
30
+ * }
31
+ * ```
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * class MyController implements ReactiveController {
36
+ * constructor(host: ReactiveElement) {
37
+ * // setupDispatchHooks() may be called multiple times for the same
38
+ * // element and events, making it safe for multiple controllers to use it.
39
+ * setupDispatchHooks(host, 'click');
40
+ * host.addEventListener('click', event => {
41
+ * afterDispatch(event, () => {
42
+ * if (event.defaultPrevented) {
43
+ * return;
44
+ * }
45
+ *
46
+ * // ... perform logic
47
+ * });
48
+ * });
49
+ * }
50
+ * }
51
+ * ```
52
+ *
53
+ * @param event The event to add a hook to.
54
+ * @param callback A hook that is called after the event finishes dispatching.
55
+ */
56
+ export declare function afterDispatch(event: Event, callback: () => void): void;
57
+ /**
58
+ * Sets up an element to add dispatch hooks to given event types. This must be
59
+ * called before adding any event listeners that need to use dispatch hooks
60
+ * like `afterDispatch()`.
61
+ *
62
+ * This function is safe to call multiple times with the same element or event
63
+ * types. Call it in the constructor of elements, mixins, and controllers to
64
+ * ensure it is set up before external listeners.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * class MyControl extends LitElement {
69
+ * constructor() {
70
+ * super();
71
+ * setupDispatchHooks(this, 'click');
72
+ * this.addEventListener('click', this.listenerUsingAfterDispatch);
73
+ * }
74
+ * }
75
+ * ```
76
+ *
77
+ * @param element The element to set up event dispatch hooks for.
78
+ * @param eventTypes The event types to add dispatch hooks to.
79
+ */
80
+ export declare function setupDispatchHooks(element: Element, ...eventTypes: [string, ...string[]]): void;
@@ -0,0 +1,40 @@
1
+ import { LitElement } from 'lit';
2
+ import { MixinBase, MixinReturn } from './mixin.js';
3
+ /**
4
+ * A unique symbol used for protected access to an instance's
5
+ * `ElementInternals`.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * class MyElement extends mixinElementInternals(LitElement) {
10
+ * constructor() {
11
+ * super();
12
+ * this[internals].role = 'button';
13
+ * }
14
+ * }
15
+ * ```
16
+ */
17
+ export declare const internals: unique symbol;
18
+ /**
19
+ * An instance with an `internals` symbol property for the component's
20
+ * `ElementInternals`.
21
+ *
22
+ * Use this when protected access is needed for an instance's `ElementInternals`
23
+ * from other files. A unique symbol is used to access the internals.
24
+ */
25
+ export interface WithElementInternals {
26
+ /**
27
+ * An instance's `ElementInternals`.
28
+ */
29
+ [internals]: ElementInternals;
30
+ }
31
+ /**
32
+ * Mixes in an attached `ElementInternals` instance.
33
+ *
34
+ * This mixin is only needed when other shared code needs access to a
35
+ * component's `ElementInternals`, such as form-associated mixins.
36
+ *
37
+ * @param base The class to mix functionality into.
38
+ * @return The provided class with `WithElementInternals` mixed in.
39
+ */
40
+ export declare function mixinElementInternals<T extends MixinBase<LitElement>>(base: T): MixinReturn<T, WithElementInternals>;
@@ -0,0 +1,174 @@
1
+ import { LitElement } from 'lit';
2
+ import { WithElementInternals } from './element-internals.js';
3
+ import { MixinBase, MixinReturn } from './mixin.js';
4
+ /**
5
+ * A form-associated element.
6
+ */
7
+ export interface FormAssociated {
8
+ /**
9
+ * The associated form element with which this element's value will submit.
10
+ */
11
+ readonly form: HTMLFormElement | null;
12
+ /**
13
+ * The labels this element is associated with.
14
+ */
15
+ readonly labels: NodeList;
16
+ /**
17
+ * The HTML name to use in form submission.
18
+ */
19
+ name: string;
20
+ /**
21
+ * Whether or not the element is disabled.
22
+ */
23
+ disabled: boolean;
24
+ /**
25
+ * Gets the current form value of a component. Defaults to the component's
26
+ * `value` attribute.
27
+ *
28
+ * @return The current form value.
29
+ */
30
+ [getFormValue](): FormValue | null;
31
+ /**
32
+ * Gets the current form state of a component. Defaults to the component's
33
+ * `[getFormValue]()` result.
34
+ *
35
+ * Use this when the state of an element is different from its value, such as
36
+ * checkboxes (internal boolean state and a user string value).
37
+ *
38
+ * @return The current form state, defaults to the form value.
39
+ */
40
+ [getFormState](): FormValue | null;
41
+ /**
42
+ * A callback for when a form component should be disabled or enabled. This
43
+ * can be called in a variety of situations, such as disabled `<fieldset>`s.
44
+ *
45
+ * @param disabled Whether or not the form control should be disabled.
46
+ */
47
+ formDisabledCallback(disabled: boolean): void;
48
+ /**
49
+ * An optional callback for when the form requests to reset its value.
50
+ * Typically, the default value that is reset is represented in the attribute
51
+ * of an element.
52
+ *
53
+ * This means the attribute used for the value should not update as the value
54
+ * changes. For example, a checkbox should not change its default `checked`
55
+ * attribute when selected. Ensure form values do not reflect.
56
+ */
57
+ formResetCallback?(): void;
58
+ /**
59
+ * An optional callback for when the form restores the state of a component.
60
+ * For example, when a page is reloaded or forms are autofilled.
61
+ *
62
+ * @param state The state to restore, or null to reset the form control's
63
+ * value.
64
+ * @param reason The reason state was restored, either `'restore'` or
65
+ * `'autocomplete'`.
66
+ */
67
+ formStateRestoreCallback?(state: FormRestoreState | null, reason: FormRestoreReason): void;
68
+ /**
69
+ * An optional callback for when the associated form changes.
70
+ *
71
+ * @param form The new associated form, or `null` if there is none.
72
+ */
73
+ formAssociatedCallback?(form: HTMLFormElement | null): void;
74
+ }
75
+ /**
76
+ * The constructor of a `FormAssociated` element.
77
+ */
78
+ export interface FormAssociatedConstructor {
79
+ /**
80
+ * Indicates that an element is participating in form association.
81
+ */
82
+ readonly formAssociated: true;
83
+ }
84
+ /**
85
+ * A symbol property to retrieve the form value for an element.
86
+ */
87
+ export declare const getFormValue: unique symbol;
88
+ /**
89
+ * A symbol property to retrieve the form state for an element.
90
+ */
91
+ export declare const getFormState: unique symbol;
92
+ /**
93
+ * Mixes in form-associated behavior for a class. This allows an element to add
94
+ * values to `<form>` elements.
95
+ *
96
+ * Implementing classes should provide a `[formValue]` to return the current
97
+ * value of the element, as well as reset and restore callbacks.
98
+ *
99
+ * @example
100
+ * ```ts
101
+ * const base = mixinFormAssociated(mixinElementInternals(LitElement));
102
+ *
103
+ * class MyControl extends base {
104
+ * \@property()
105
+ * value = '';
106
+ *
107
+ * override [getFormValue]() {
108
+ * return this.value;
109
+ * }
110
+ *
111
+ * override formResetCallback() {
112
+ * const defaultValue = this.getAttribute('value');
113
+ * this.value = defaultValue;
114
+ * }
115
+ *
116
+ * override formStateRestoreCallback(state: string) {
117
+ * this.value = state;
118
+ * }
119
+ * }
120
+ * ```
121
+ *
122
+ * Elements may optionally provide a `[formState]` if their values do not
123
+ * represent the state of the component.
124
+ *
125
+ * @example
126
+ * ```ts
127
+ * const base = mixinFormAssociated(mixinElementInternals(LitElement));
128
+ *
129
+ * class MyCheckbox extends base {
130
+ * \@property()
131
+ * value = 'on';
132
+ *
133
+ * \@property({type: Boolean})
134
+ * checked = false;
135
+ *
136
+ * override [getFormValue]() {
137
+ * return this.checked ? this.value : null;
138
+ * }
139
+ *
140
+ * override [getFormState]() {
141
+ * return String(this.checked);
142
+ * }
143
+ *
144
+ * override formResetCallback() {
145
+ * const defaultValue = this.hasAttribute('checked');
146
+ * this.checked = defaultValue;
147
+ * }
148
+ *
149
+ * override formStateRestoreCallback(state: string) {
150
+ * this.checked = Boolean(state);
151
+ * }
152
+ * }
153
+ * ```
154
+ *
155
+ * @param base The class to mix functionality into. The base class must use
156
+ * `mixinElementInternals()`.
157
+ * @return The provided class with `FormAssociated` mixed in.
158
+ */
159
+ export declare function mixinFormAssociated<T extends MixinBase<LitElement & WithElementInternals>>(base: T): MixinReturn<T & FormAssociatedConstructor, FormAssociated>;
160
+ /**
161
+ * A value that can be provided for form submission and state.
162
+ */
163
+ export type FormValue = File | string | FormData;
164
+ /**
165
+ * A value to be restored for a component's form value. If a component's form
166
+ * state is a `FormData` object, its entry list of name and values will be
167
+ * provided.
168
+ */
169
+ export type FormRestoreState = File | string | Array<[string, FormDataEntryValue]>;
170
+ /**
171
+ * The reason a form component is being restored for, either `'restore'` for
172
+ * browser restoration or `'autocomplete'` for restoring user values.
173
+ */
174
+ export type FormRestoreReason = 'restore' | 'autocomplete';
@@ -0,0 +1,59 @@
1
+ import { LitElement } from 'lit';
2
+ import { WithElementInternals } from './element-internals.js';
3
+ import { MixinBase, MixinReturn } from './mixin.js';
4
+ /**
5
+ * A string indicating the form submission behavior of the element.
6
+ *
7
+ * - submit: The element submits the form. This is the default value if the
8
+ * attribute is not specified, or if it is dynamically changed to an empty or
9
+ * invalid value.
10
+ * - reset: The element resets the form.
11
+ * - button: The element does nothing.
12
+ */
13
+ export type FormSubmitterType = 'button' | 'submit' | 'reset';
14
+ /**
15
+ * An element that can submit or reset a `<form>`, similar to
16
+ * `<button type="submit">`.
17
+ */
18
+ export interface FormSubmitter {
19
+ /**
20
+ * A string indicating the form submission behavior of the element.
21
+ *
22
+ * - submit: The element submits the form. This is the default value if the
23
+ * attribute is not specified, or if it is dynamically changed to an empty or
24
+ * invalid value.
25
+ * - reset: The element resets the form.
26
+ * - button: The element does nothing.
27
+ */
28
+ type: string;
29
+ /**
30
+ * The HTML name to use in form submission. When combined with a `value`, the
31
+ * submitting button's name/value will be added to the form.
32
+ *
33
+ * Names must reflect to a `name` attribute for form integration.
34
+ */
35
+ name: string;
36
+ /**
37
+ * The value of the button. When combined with a `name`, the submitting
38
+ * button's name/value will be added to the form.
39
+ */
40
+ value: string;
41
+ }
42
+ /**
43
+ * Mixes in form submitter behavior for a class.
44
+ *
45
+ * A click listener is added to each element instance. If the click is not
46
+ * default prevented, it will submit the element's form, if any.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * const base = mixinFormSubmitter(mixinElementInternals(LitElement));
51
+ * class MyButton extends base {
52
+ * static formAssociated = true;
53
+ * }
54
+ * ```
55
+ *
56
+ * @param base The class to mix functionality into.
57
+ * @return The provided class with `FormSubmitter` mixed in.
58
+ */
59
+ export declare function mixinFormSubmitter<T extends MixinBase<LitElement & WithElementInternals>>(base: T): MixinReturn<T, FormSubmitter>;
@@ -0,0 +1,42 @@
1
+ import { LitElement } from 'lit';
2
+ import { MixinBase, MixinReturn } from './mixin.js';
3
+ /**
4
+ * An element that navigates to a URL when activated, similar to `<a href>`.
5
+ */
6
+ export interface Hyperlink {
7
+ /**
8
+ * The URL the hyperlink points to. When set, the component renders as an
9
+ * `<a>` element. Maps to the native `href` attribute.
10
+ */
11
+ href?: string;
12
+ /**
13
+ * Where to display the linked URL. Maps to the native `target` attribute.
14
+ * Possible values: `"_self"`, `"_blank"`, `"_parent"`, `"_top"`, or a
15
+ * frame name. When using `"_blank"`, set `rel="noopener noreferrer"`.
16
+ */
17
+ target: '_self' | '_parent' | '_blank' | '_top' | string;
18
+ /**
19
+ * The relationship between the current document and the linked URL.
20
+ * Maps to the native `rel` attribute. Use `"noopener noreferrer"` when
21
+ * `target="_blank"` to prevent tab-napping attacks.
22
+ */
23
+ rel: string;
24
+ /**
25
+ * Causes the browser to download the linked URL instead of navigating.
26
+ * A string value is used as the suggested filename. Only applies when
27
+ * `href` is set. Maps to the native `download` attribute.
28
+ */
29
+ download: string;
30
+ }
31
+ /**
32
+ * Mixes in hyperlink behavior for a class.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * class MyLink extends mixinHyperlink(LitElement) {}
37
+ * ```
38
+ *
39
+ * @param base The class to mix functionality into.
40
+ * @return The provided class with `Hyperlink` mixed in.
41
+ */
42
+ export declare function mixinHyperlink<T extends MixinBase<LitElement>>(base: T): MixinReturn<T, Hyperlink>;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * The base class for a mixin with an optional expected base class type.
3
+ *
4
+ * @template ExpectedBase Optional expected base class type, such as
5
+ * `LitElement`.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * interface Foo {
10
+ * isFoo: boolean;
11
+ * }
12
+ *
13
+ * function mixinFoo<T extends MixinBase>(base: T): MixinReturn<T, Foo> {
14
+ * // Mixins must be `abstract`
15
+ * abstract class FooImpl extends base implements Foo {
16
+ * isFoo = true;
17
+ * }
18
+ *
19
+ * return FooImpl;
20
+ * }
21
+ * ```
22
+ */
23
+ export type MixinBase<ExpectedBase = object> = abstract new (...args: any[]) => ExpectedBase;
24
+ /**
25
+ * The return value of a mixin.
26
+ *
27
+ * @template MixinBase The generic that extends `MixinBase` used for the mixin's
28
+ * base class argument.
29
+ * @template MixinClass Optional interface of fuctionality that was mixed in.
30
+ * Omit if no additional APIs were added (such as purely overriding base
31
+ * class functionality).
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * interface Foo {
36
+ * isFoo: boolean;
37
+ * }
38
+ *
39
+ * // Mixins must be `abstract`
40
+ * function mixinFoo<T extends MixinBase>(base: T): MixinReturn<T, Foo> {
41
+ * abstract class FooImpl extends base implements Foo {
42
+ * isFoo = true;
43
+ * }
44
+ *
45
+ * return FooImpl;
46
+ * }
47
+ * ```
48
+ */
49
+ export type MixinReturn<MixinBase, MixinClass = object> = (abstract new (...args: any[]) => MixinClass) & MixinBase;
@@ -1 +1,2 @@
1
+ export declare function hasMeaningfulContent(slotElement: HTMLSlotElement | null): boolean;
1
2
  export declare function observerSlotChangesWithCallback(slot: HTMLSlotElement | null, callback: (hasContent: boolean) => void): () => void;
@@ -3,7 +3,7 @@ import { LitElement } from 'lit';
3
3
  * @label Accordion Item
4
4
  * @tag wc-accordion-item
5
5
  * @rawTag accordion-item
6
- * @summary An expansion panel with a header that reveals or hides associated content. Follows Material Design 3 expansion panel guidelines.
6
+ * @summary An expansion panel with a header that reveals or hides associated content.
7
7
  *
8
8
  * @slot - The body content revealed when the panel is expanded.
9
9
  * @slot heading - The panel title. Renders as `body-large` text.
@@ -48,7 +48,9 @@ export declare class AccordionItem extends LitElement {
48
48
  * `'before'` places it at the leading start.
49
49
  */
50
50
  togglePosition: 'before' | 'after';
51
+ /** True when the `description` slot contains at least one non-empty node. */
51
52
  private _hasDescriptionSlot;
53
+ /** True when the `heading` slot contains at least one non-empty node. */
52
54
  private _hasHeadingSlot;
53
55
  private readonly buttonElement;
54
56
  focus(): void;
@@ -4,7 +4,7 @@ import { AccordionItem } from './accordion-item.js';
4
4
  * @label Accordion
5
5
  * @tag wc-accordion
6
6
  * @rawTag accordion
7
- * @summary A vertically stacked set of expansion panels. Follows Material Design 3 expansion panel guidelines.
7
+ * @summary A vertically stacked set of expansion panels.
8
8
  *
9
9
  * @example
10
10
  * ```html
@@ -0,0 +1,43 @@
1
+ import { LitElement } from 'lit';
2
+ type AlertVariant = 'note' | 'info' | 'success' | 'warning' | 'error';
3
+ /**
4
+ * @label Alert
5
+ * @tag wc-alert
6
+ * @rawTag alert
7
+ * @summary Alerts show short, prominent contextual messages with optional icon and description.
8
+ *
9
+ * @cssprop --alert-container-color - Background color of the alert container.
10
+ * @cssprop --alert-label-text-color - Label text color.
11
+ * @cssprop --alert-description-text-color - Description text color.
12
+ * @cssprop --alert-icon-color - Icon color.
13
+ * @cssprop --alert-border-radius - Border radius of the alert surface.
14
+ *
15
+ * @example
16
+ * ```html
17
+ * <wc-alert variant="note" description="Use semantic roles that preserve a 3:1 contrast ratio."></wc-alert>
18
+ * ```
19
+ * @tags display, feedback
20
+ */
21
+ export declare class Alert extends LitElement {
22
+ static styles: import("lit").CSSResultGroup[];
23
+ /**
24
+ * Visual intent of the alert.
25
+ */
26
+ variant: AlertVariant;
27
+ /**
28
+ * Optional explicit label text. Falls back to a variant-based label.
29
+ */
30
+ label?: string;
31
+ /**
32
+ * Optional explicit icon name. Falls back to a variant-based icon.
33
+ */
34
+ icon?: string;
35
+ /**
36
+ * Optional description text when a default slot is not provided.
37
+ */
38
+ description: string;
39
+ private get resolvedLabel();
40
+ private get resolvedIcon();
41
+ render(): import("lit-html").TemplateResult<1>;
42
+ }
43
+ export {};
@@ -0,0 +1 @@
1
+ export { Alert } from './alert.js';