@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
@@ -1,10 +1,11 @@
1
1
  import { LitElement, html, css, PropertyValues, isServer } from 'lit';
2
2
  import { property, query, state } from 'lit/decorators.js';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
+ import IndividualComponent from '@/IndividualComponent.js';
4
5
  import {
5
6
  Attachable,
6
7
  AttachableController,
7
- } from '@/__controllers/attachable-controller.js';
8
+ } from '@/__internal/controllers/attachable-controller.js';
8
9
 
9
10
  const PRESS_GROW_MS = 450;
10
11
  const MINIMUM_PRESS_MS = 225;
@@ -118,6 +119,7 @@ const FORCED_COLORS = window.matchMedia('(forced-colors: active)');
118
119
  * ```
119
120
  * @tags display
120
121
  */
122
+ @IndividualComponent
121
123
  export class Ripple extends LitElement implements Attachable {
122
124
  static styles = css`
123
125
  :host {
@@ -190,24 +192,35 @@ export class Ripple extends LitElement implements Attachable {
190
192
  */
191
193
  @property({ type: Boolean, reflect: true }) disabled = false;
192
194
 
195
+ /** True while the pointer is hovering over the host element. */
193
196
  @state() private hovered = false;
194
197
 
198
+ /** True while a press animation is playing. */
195
199
  @state() private pressed = false;
196
200
 
197
201
  @query('.surface') private readonly mdRoot!: HTMLElement | null;
198
202
 
203
+ // ── Private fields ────────────────────────────────────────────────────────
204
+
205
+ /** CSS size string (e.g. `"48px"`) for the growing ripple circle. */
199
206
  private rippleSize = '';
200
207
 
208
+ /** CSS scale factor applied to the ripple at the end of its animation. */
201
209
  private rippleScale = '';
202
210
 
211
+ /** Pixel size of the ripple at its initial (pre-grow) state. */
203
212
  private initialSize = 0;
204
213
 
214
+ /** Reference to the currently running grow animation, if any. */
205
215
  private growAnimation?: Animation;
206
216
 
217
+ /** Current interaction state of the ripple state machine. */
207
218
  private state = State.INACTIVE;
208
219
 
220
+ /** Pointer event that initiated the current press, used to calculate start coordinates. */
209
221
  private rippleStartEvent?: PointerEvent;
210
222
 
223
+ /** Bound reference to `handleEvent` passed to `addEventListener` / `removeEventListener`. */
211
224
  private readonly _boundHandleEvent = this.handleEvent.bind(this);
212
225
 
213
226
  get htmlFor() {
@@ -1,18 +1,18 @@
1
- import { LitElement, html, nothing } from 'lit';
1
+ import { LitElement, html, nothing } from 'lit';
2
2
  import { property, query, state } from 'lit/decorators.js';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
  import { live } from 'lit/directives/live.js';
5
5
  import IndividualComponent from '@/IndividualComponent.js';
6
6
  import styles from './search.scss';
7
7
  import colorStyles from './search-colors.scss';
8
- import { observerSlotChangesWithCallback } from '@/__utils/observe-slot-change.js';
8
+ import { observerSlotChangesWithCallback } from '@/__internal/utils/observe-slot-change.js';
9
9
 
10
10
  /**
11
11
  * @label Search
12
12
  * @tag wc-search
13
13
  * @rawTag search
14
14
  *
15
- * @summary A Material 3 search bar for filtering and finding content.
15
+ * @summary A search bar for filtering and finding content.
16
16
  * @overview
17
17
  * <p>The search component provides a text input designed for search interactions.
18
18
  * It supports outlined and filled variants, an optional clear button, and leading/trailing icon slots.</p>
@@ -1,15 +1,16 @@
1
- import { html, LitElement } from 'lit';
1
+ import { html, LitElement } from 'lit';
2
2
  import { property } from 'lit/decorators.js';
3
3
  import styles from './segmented-button-group.scss';
4
4
  import { SegmentedButton } from './segmented-button.js';
5
+ import IndividualComponent from '@/IndividualComponent.js';
5
6
 
6
7
  /**
7
8
  * @label Segmented Button Group
8
9
  * @tag wc-segmented-button-group
9
10
  * @rawTag segmented-button-group
10
- * @summary A container for segmented buttons following Material Design 3.
11
+ * @summary A container for segmented buttons.
11
12
  * @overview
12
- * <p>Segmented buttons help people select options, switch views, or sort elements. They follow the Material Design 3 specification.</p>
13
+ * <p>Segmented buttons help people select options, switch views, or sort elements. They follow the specification.</p>
13
14
  * <p>Use <code>multi-select</code> to allow more than one segment to be selected at a time. By default only one segment can be active (single-select).</p>
14
15
  *
15
16
  * @cssprop --segmented-button-group-shape: Border-radius of the group container.
@@ -27,6 +28,7 @@ import { SegmentedButton } from './segmented-button.js';
27
28
  *
28
29
  * @tags controls
29
30
  */
31
+ @IndividualComponent
30
32
  export class SegmentedButtonGroup extends LitElement {
31
33
  static styles = [styles];
32
34
 
@@ -64,7 +66,9 @@ export class SegmentedButtonGroup extends LitElement {
64
66
  }
65
67
 
66
68
  private _getSegments(): SegmentedButton[] {
67
- return Array.from(this.querySelectorAll<SegmentedButton>('wc-segmented-button'));
69
+ return Array.from(
70
+ this.querySelectorAll<SegmentedButton>('wc-segmented-button'),
71
+ );
68
72
  }
69
73
 
70
74
  private _onSegmentChange = (ev: CustomEvent) => {
@@ -2,6 +2,7 @@ import { html, LitElement, nothing } from 'lit';
2
2
  import { property, state } from 'lit/decorators.js';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
  import styles from './segmented-button.scss';
5
+ import IndividualComponent from '@/IndividualComponent.js';
5
6
 
6
7
  /**
7
8
  * @label Segmented Button
@@ -31,6 +32,7 @@ import styles from './segmented-button.scss';
31
32
  *
32
33
  * @tags controls
33
34
  */
35
+ @IndividualComponent
34
36
  export class SegmentedButton extends LitElement {
35
37
  static styles = [styles];
36
38
 
@@ -58,9 +60,11 @@ export class SegmentedButton extends LitElement {
58
60
  @property({ type: String })
59
61
  icon?: string;
60
62
 
63
+ /** True while the segment has keyboard focus. */
61
64
  @state()
62
65
  private hasFocus = false;
63
66
 
67
+ /** True while the user is actively pressing the segment. */
64
68
  @state()
65
69
  private isActive = false;
66
70
 
@@ -1,6 +1,7 @@
1
1
  import { css, html, LitElement, nothing } from 'lit';
2
2
  import { property, query } from 'lit/decorators.js';
3
3
  import type { MenuItem } from '../menu/menu-item/menu-item.js';
4
+ import IndividualComponent from '@/IndividualComponent.js';
4
5
 
5
6
  /**
6
7
  * @label Select Option
@@ -17,6 +18,7 @@ import type { MenuItem } from '../menu/menu-item/menu-item.js';
17
18
  * </wc-select>
18
19
  * ```
19
20
  */
21
+ @IndividualComponent
20
22
  export class SelectOptionElement extends LitElement {
21
23
  static override styles = [
22
24
  css`
@@ -1,4 +1,4 @@
1
- import { LitElement, html, nothing } from 'lit';
1
+ import { LitElement, html, nothing } from 'lit';
2
2
  import { property } from 'lit/decorators.js';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
  import IndividualComponent from '../IndividualComponent.js';
@@ -8,7 +8,7 @@ import styles from './side-sheet.scss';
8
8
  * @label Side Sheet
9
9
  * @tag wc-side-sheet
10
10
  * @rawTag side-sheet
11
- * @summary Side sheets slide in from the edge of the screen to reveal supplemental content. Supports standard and modal variants per Material Design 3.
11
+ * @summary Side sheets slide in from the edge of the screen to reveal supplemental content. Supports standard and modal variants.
12
12
  *
13
13
  * @cssprop --side-sheet-container-color - Background color of the sheet container.
14
14
  * @cssprop --side-sheet-scrim-color - Color of the modal scrim overlay.
@@ -91,7 +91,7 @@ export class SideSheet extends LitElement {
91
91
  aria-modal=${this.variant === 'modal' ? 'true' : 'false'}
92
92
  aria-hidden=${!this.open ? 'true' : 'false'}
93
93
  >
94
- <div class="content">
94
+ <div class="content" ?inert=${!this.open}>
95
95
  <slot></slot>
96
96
  </div>
97
97
  </div>
@@ -14,7 +14,7 @@
14
14
  --sidebar-menu-item-label-color: var(--color-on-surface);
15
15
  --sidebar-menu-item-icon-color: var(--color-on-surface-variant);
16
16
  --sidebar-menu-item-selected-background: var(--color-secondary-container);
17
- --sidebar-menu-item-selected-color: var(--color-on-secondary-container);
17
+ --sidebar-menu-item-selected-label-color: var(--color-on-secondary-container);
18
18
  --sidebar-menu-item-focus-ring-color: var(--color-primary);
19
19
 
20
20
  // M3 animation timing
@@ -42,7 +42,8 @@
42
42
 
43
43
  &.selected {
44
44
  --_container-color: var(--sidebar-menu-item-selected-background);
45
- --_label-color: var(--sidebar-menu-item-selected-color);
45
+ --_label-color: var(--sidebar-menu-item-selected-label-color);
46
+ font-weight: var(--font-weight-bold) !important;
46
47
  }
47
48
 
48
49
  &.disabled {
@@ -78,9 +79,15 @@
78
79
  .focus-ring {
79
80
  z-index: 2;
80
81
  --focus-ring-color: var(--sidebar-menu-item-focus-ring-color);
81
- --focus-ring-container-shape-start-start: var(--sidebar-menu-item-border-radius);
82
- --focus-ring-container-shape-start-end: var(--sidebar-menu-item-border-radius);
83
- --focus-ring-container-shape-end-start: var(--sidebar-menu-item-border-radius);
82
+ --focus-ring-container-shape-start-start: var(
83
+ --sidebar-menu-item-border-radius
84
+ );
85
+ --focus-ring-container-shape-start-end: var(
86
+ --sidebar-menu-item-border-radius
87
+ );
88
+ --focus-ring-container-shape-end-start: var(
89
+ --sidebar-menu-item-border-radius
90
+ );
84
91
  --focus-ring-container-shape-end-end: var(--sidebar-menu-item-border-radius);
85
92
  }
86
93
 
@@ -99,4 +106,3 @@
99
106
  text-overflow: ellipsis;
100
107
  white-space: nowrap;
101
108
  }
102
-
@@ -117,7 +117,7 @@ export class SidebarMenuItem extends LitElement {
117
117
  href="${this.href}"
118
118
  target="${this.target}"
119
119
  class="${classes}"
120
- aria-disabled="${this.disabled}"
120
+ ?aria-disabled=${this.disabled}
121
121
  tabindex="${this.disabled ? -1 : 0}"
122
122
  @click="${this._onClick}"
123
123
  >
@@ -133,7 +133,8 @@ export class SidebarMenuItem extends LitElement {
133
133
  role="treeitem"
134
134
  aria-label="${this.label}"
135
135
  aria-selected="${String(this.selected)}"
136
- aria-disabled="${this.disabled}"
136
+ ?aria-disabled=${this.disabled}
137
+ ?disabled=${this.disabled}
137
138
  tabindex="${this.disabled ? -1 : 0}"
138
139
  @click="${this._onClick}"
139
140
  @keydown="${(e: KeyboardEvent) => {
@@ -1,6 +1,7 @@
1
1
  import { html, LitElement } from 'lit';
2
2
  import { property } from 'lit/decorators.js';
3
3
  import styles from './skeleton.scss';
4
+ import IndividualComponent from '@/IndividualComponent.js';
4
5
 
5
6
  /**
6
7
  * @label Skeleton
@@ -14,9 +15,11 @@ import styles from './skeleton.scss';
14
15
  * <wc-skeleton visible></wc-skeleton>
15
16
  * ```
16
17
  */
18
+ @IndividualComponent
17
19
  export class Skeleton extends LitElement {
18
20
  static styles = [styles];
19
21
 
22
+ /** When true, the skeleton animation is shown. */
20
23
  @property({ type: Boolean, reflect: true }) visible: boolean = false;
21
24
 
22
25
  render() {
@@ -2,6 +2,7 @@ import { LitElement, html } from 'lit';
2
2
  import { property, state, query } from 'lit/decorators.js';
3
3
  import { styleMap } from 'lit/directives/style-map.js';
4
4
  import sliderStyles from './slider.scss';
5
+ import IndividualComponent from '@/IndividualComponent.js';
5
6
 
6
7
  /**
7
8
  * @label Slider
@@ -18,6 +19,7 @@ import sliderStyles from './slider.scss';
18
19
  * <wc-slider min="0" max="100" value="50"></wc-slider>
19
20
  * ```
20
21
  */
22
+ @IndividualComponent
21
23
  export class Slider extends LitElement {
22
24
  static styles = [sliderStyles];
23
25
 
@@ -56,10 +58,11 @@ export class Slider extends LitElement {
56
58
  */
57
59
  @property({ type: Boolean, attribute: 'show-value' }) showValue = false;
58
60
 
61
+ /** True while the user is actively dragging the thumb. */
59
62
  @state() private isDragging = false;
60
63
 
61
64
  @query('.slider-container') private container!: HTMLElement;
62
-
65
+
63
66
  @query('.thumb') private thumbElement!: HTMLElement;
64
67
 
65
68
  private handleInput(event: MouseEvent | TouchEvent) {
@@ -2,6 +2,7 @@ import { LitElement, html, nothing } from 'lit';
2
2
  import { property, state } from 'lit/decorators.js';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
  import styles from './snackbar.scss';
5
+ import IndividualComponent from '@/IndividualComponent.js';
5
6
 
6
7
  type SnackbarCloseReason = 'timeout' | 'dismiss' | 'action' | 'programmatic';
7
8
 
@@ -26,6 +27,7 @@ type SnackbarCloseReason = 'timeout' | 'dismiss' | 'action' | 'programmatic';
26
27
  * ```
27
28
  * @tags display, feedback
28
29
  */
30
+ @IndividualComponent
29
31
  export class Snackbar extends LitElement {
30
32
  static styles = [styles];
31
33
 
@@ -33,26 +35,37 @@ export class Snackbar extends LitElement {
33
35
 
34
36
  private static readonly EXIT_ANIMATION_MS = 180;
35
37
 
38
+ /** Whether the snackbar is currently visible. */
36
39
  @property({ type: Boolean, reflect: true }) open = false;
37
40
 
41
+ /** The message text to display. Can also be provided via the default slot. */
38
42
  @property({ type: String }) message = '';
39
43
 
44
+ /** Label for the optional action button. When empty, no action button is rendered. */
40
45
  @property({ type: String, attribute: 'action-label' }) actionLabel = '';
41
46
 
47
+ /** When true, a dismiss icon button is shown on the trailing end. */
42
48
  @property({ type: Boolean, attribute: 'show-close-icon' })
43
49
  showCloseIcon = false;
44
50
 
51
+ /** Auto-hide duration in milliseconds. Set to `0` to disable auto-hide. */
45
52
  @property({ type: Number }) duration = 4000;
46
53
 
54
+ /** When true, the snackbar content is allowed to wrap to multiple lines. */
47
55
  @property({ type: Boolean, reflect: true }) multiline = false;
48
56
 
57
+ /** When true, renders the snackbar in a static preview state (always visible, no animation). */
49
58
  @property({ type: Boolean, reflect: true }) preview = false;
50
59
 
60
+ /** True while the exit animation is running before the snackbar fully closes. */
51
61
  @state() private dismissing = false;
52
-
53
62
 
63
+ // ── Private fields ────────────────────────────────────────────────────────
64
+
65
+ /** Timer handle for the auto-hide timeout. */
54
66
  private hideTimer: ReturnType<typeof setTimeout> | null = null;
55
67
 
68
+ /** Timer handle for the exit animation duration timeout. */
56
69
  private exitTimer: ReturnType<typeof setTimeout> | null = null;
57
70
 
58
71
  private readonly handleGlobalSnackbarOpen = (
@@ -72,6 +85,32 @@ export class Snackbar extends LitElement {
72
85
  );
73
86
  }
74
87
 
88
+ disconnectedCallback() {
89
+ document.removeEventListener(
90
+ Snackbar.GLOBAL_OPEN_EVENT,
91
+ this.handleGlobalSnackbarOpen,
92
+ );
93
+ this.clearExitTimer();
94
+ this.clearTimer();
95
+ super.disconnectedCallback();
96
+ }
97
+
98
+ protected updated(changedProperties: Map<string, unknown>) {
99
+ if (changedProperties.has('open')) {
100
+ if (this.open) {
101
+ document.dispatchEvent(
102
+ new CustomEvent(Snackbar.GLOBAL_OPEN_EVENT, {
103
+ detail: { source: this },
104
+ }),
105
+ );
106
+ }
107
+
108
+ this.scheduleAutoHide();
109
+ }
110
+ }
111
+
112
+ // ── Public methods ────────────────────────────────────────────────────────
113
+
75
114
  show() {
76
115
  this.dismissing = false;
77
116
  this.clearExitTimer();
@@ -163,30 +202,6 @@ export class Snackbar extends LitElement {
163
202
  }, this.duration);
164
203
  }
165
204
 
166
- protected updated(changedProperties: Map<string, unknown>) {
167
- if (changedProperties.has('open')) {
168
- if (this.open) {
169
- document.dispatchEvent(
170
- new CustomEvent(Snackbar.GLOBAL_OPEN_EVENT, {
171
- detail: { source: this },
172
- }),
173
- );
174
- }
175
-
176
- this.scheduleAutoHide();
177
- }
178
- }
179
-
180
- disconnectedCallback() {
181
- document.removeEventListener(
182
- Snackbar.GLOBAL_OPEN_EVENT,
183
- this.handleGlobalSnackbarOpen,
184
- );
185
- this.clearExitTimer();
186
- this.clearTimer();
187
- super.disconnectedCallback();
188
- }
189
-
190
205
  render() {
191
206
  const liveRole =
192
207
  this.actionLabel || this.showCloseIcon ? 'alert' : 'status';
@@ -1,6 +1,7 @@
1
1
  import { LitElement, html, css } from 'lit';
2
2
 
3
3
  import styles from './spinner.scss';
4
+ import IndividualComponent from '@/IndividualComponent.js';
4
5
 
5
6
  /**
6
7
  * @label Spinner
@@ -16,6 +17,7 @@ import styles from './spinner.scss';
16
17
  * <wc-spinner></wc-spinner>
17
18
  * ```
18
19
  */
20
+ @IndividualComponent
19
21
  export class Spinner extends LitElement {
20
22
  static styles = [styles];
21
23
 
package/src/svg/svg.ts CHANGED
@@ -2,10 +2,11 @@ import { html, LitElement } from 'lit';
2
2
  import { property, state } from 'lit/decorators.js';
3
3
  import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
4
4
 
5
- import { sanitizeSvg } from '@/__utils/sanitize-svg.js';
5
+ import { sanitizeSvg } from '@/__internal/utils/sanitize-svg.js';
6
6
  import { fetchSVG } from '../icon/datasource.js';
7
7
 
8
8
  import styles from './svg.scss';
9
+ import IndividualComponent from '@/IndividualComponent.js';
9
10
 
10
11
  /**
11
12
  * @label SVG
@@ -22,6 +23,7 @@ import styles from './svg.scss';
22
23
  * <wc-svg src="/icons/my-icon.svg" image-title="My icon"></wc-svg>
23
24
  * ```
24
25
  */
26
+ @IndividualComponent
25
27
  export class Svg extends LitElement {
26
28
  static styles = [styles];
27
29
 
@@ -34,15 +36,21 @@ export class Svg extends LitElement {
34
36
  /** Enable click-to-preview lightbox. */
35
37
  @property({ type: Boolean, reflect: true }) preview = false;
36
38
 
39
+ /** True once the element has entered the viewport and the SVG fetch has been initiated. */
37
40
  @state() private _loaded = false;
38
41
 
42
+ /** True when the lightbox preview overlay is visible. */
39
43
  @state() private _previewOpen = false;
40
44
 
45
+ /** Sanitized inline SVG markup ready for rendering. */
41
46
  @state() private _svgContent: string = '';
42
47
 
43
- // token to avoid stale fetch results
48
+ // ── Private fields ────────────────────────────────────────────────────────
49
+
50
+ /** Monotonically incrementing token used to discard stale fetch results. */
44
51
  private _fetchId = 0;
45
52
 
53
+ /** IntersectionObserver that triggers the SVG fetch when the element enters the viewport. */
46
54
  private _intersectionObserver: IntersectionObserver | null = null;
47
55
 
48
56
  disconnectedCallback() {
@@ -70,7 +78,7 @@ export class Svg extends LitElement {
70
78
  if (!wrapper) return;
71
79
 
72
80
  this._intersectionObserver = new IntersectionObserver(
73
- (entries) => {
81
+ entries => {
74
82
  if (entries[0].isIntersecting) {
75
83
  this._loaded = true;
76
84
  this._intersectionObserver?.disconnect();
@@ -106,7 +114,8 @@ export class Svg extends LitElement {
106
114
  this._previewOpen = true;
107
115
  // Move focus into the dialog after render
108
116
  this.updateComplete.then(() => {
109
- const closeBtn = this.shadowRoot?.querySelector<HTMLElement>('.preview-close');
117
+ const closeBtn =
118
+ this.shadowRoot?.querySelector<HTMLElement>('.preview-close');
110
119
  closeBtn?.focus();
111
120
  });
112
121
  }
@@ -118,7 +127,8 @@ export class Svg extends LitElement {
118
127
  this._previewOpen = false;
119
128
  if (wasOpen) {
120
129
  // Return focus to the trigger
121
- const trigger = this.shadowRoot?.querySelector<HTMLElement>('.svg-content');
130
+ const trigger =
131
+ this.shadowRoot?.querySelector<HTMLElement>('.svg-content');
122
132
  trigger?.focus();
123
133
  }
124
134
  }
@@ -142,16 +152,24 @@ export class Svg extends LitElement {
142
152
  class="preview-overlay ${this._previewOpen ? 'open' : ''}"
143
153
  role="dialog"
144
154
  aria-modal="true"
145
- aria-label=${this.imageTitle ? `Preview: ${this.imageTitle}` : 'SVG preview'}
155
+ aria-label=${this.imageTitle
156
+ ? `Preview: ${this.imageTitle}`
157
+ : 'SVG preview'}
146
158
  @click=${this._closePreview}
147
- @keydown=${(e: KeyboardEvent) => e.key === 'Escape' && this._closePreview(e)}
159
+ @keydown=${(e: KeyboardEvent) =>
160
+ e.key === 'Escape' && this._closePreview(e)}
148
161
  >
149
162
  <button
150
163
  class="preview-close"
151
164
  aria-label="Close preview"
152
165
  @click=${this._closePreview}
153
- >&#x2715;</button>
154
- <div class="preview-content" @click=${(e: Event) => e.stopPropagation()}>
166
+ >
167
+ &#x2715;
168
+ </button>
169
+ <div
170
+ class="preview-content"
171
+ @click=${(e: Event) => e.stopPropagation()}
172
+ >
155
173
  ${unsafeSVG(this._svgContent)}
156
174
  </div>
157
175
  </div>
@@ -2,7 +2,7 @@ import { html, nothing } from 'lit';
2
2
  import { property, query, state } from 'lit/decorators.js';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
 
5
- import { spread } from '@/__directive/spread.js';
5
+ import { spread } from '@/__internal/directive/spread.js';
6
6
 
7
7
  import styles from './switch.scss';
8
8
  import BaseInput from '../input/BaseInput.js';
@@ -3,9 +3,10 @@ import { property, state } from 'lit/decorators.js';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
4
  import { unsafeHTML } from 'lit/directives/unsafe-html.js';
5
5
 
6
- import { throttle } from '@/__utils/throttle.js';
6
+ import { throttle } from '@/__internal/utils/throttle.js';
7
7
 
8
8
  import styles from './table.scss';
9
+ import IndividualComponent from '@/IndividualComponent.js';
9
10
 
10
11
  const DEFAULT_CELL_WIDTH = 16; // in rem
11
12
 
@@ -36,6 +37,7 @@ export interface TableColumn {
36
37
  * ```
37
38
  * @tags display, data
38
39
  */
40
+ @IndividualComponent
39
41
  export class Table extends LitElement {
40
42
  static styles = [styles];
41
43
 
@@ -130,18 +132,25 @@ export class Table extends LitElement {
130
132
  @property({ type: String, attribute: 'empty-state-description' })
131
133
  emptyStateDescription: string = 'There are no items to display';
132
134
 
135
+ /** Tracks the currently hovered row and column for hover-highlight CSS. */
133
136
  @state()
134
137
  private hoveredCell: { row?: any; column?: any } = {};
135
138
 
139
+ /** True when all rows on the current page are selected. */
136
140
  @state()
137
141
  private isSelectAll: boolean = false;
138
142
 
143
+ /** True when some (but not all) rows on the current page are selected. */
139
144
  @state()
140
145
  private isSelectAllIntermediate: boolean = false;
141
146
 
147
+ /** True when the scroll container has been scrolled horizontally. */
142
148
  @state()
143
149
  private isHorizontallyScrolled: boolean = false;
144
150
 
151
+ // ── Private fields ────────────────────────────────────────────────────────
152
+
153
+ /** Throttled version of the cell-mouseover handler to avoid excessive state updates. */
145
154
  private onCellMouseOverThrottled = throttle((row: any, column: any) => {
146
155
  this.hoveredCell = { row, column };
147
156
  }, 30);
@@ -224,7 +233,9 @@ export class Table extends LitElement {
224
233
 
225
234
  private getSortIcon(col: TableColumn): string {
226
235
  if (this.sortBy === col.name) {
227
- return this.sortOrder === 'asc' ? 'keyboard_arrow_up' : 'keyboard_arrow_down';
236
+ return this.sortOrder === 'asc'
237
+ ? 'keyboard_arrow_up'
238
+ : 'keyboard_arrow_down';
228
239
  }
229
240
  return '';
230
241
  }
@@ -468,7 +479,9 @@ export class Table extends LitElement {
468
479
  <div class=${classMap(tableClasses)}>
469
480
  <div class="table-scroll-container" @scroll=${this.onScrollContainer}>
470
481
  ${this.renderHeader()}
471
- ${this.data && this.data.length ? this.renderBody() : this.renderEmptyState()}
482
+ ${this.data && this.data.length
483
+ ? this.renderBody()
484
+ : this.renderEmptyState()}
472
485
  </div>
473
486
  <div class="table-footer">${this.renderPagination()}</div>
474
487
  </div>