@carbon/web-components 2.47.0 → 2.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (431) hide show
  1. package/custom-elements.json +963 -145
  2. package/es/components/accordion/accordion-item.d.ts +28 -12
  3. package/es/components/accordion/accordion-item.js +7 -5
  4. package/es/components/accordion/accordion-item.js.map +1 -1
  5. package/es/components/accordion/accordion-skeleton.d.ts +1 -1
  6. package/es/components/accordion/accordion-skeleton.js +7 -5
  7. package/es/components/accordion/accordion-skeleton.js.map +1 -1
  8. package/es/components/accordion/accordion.d.ts +1 -1
  9. package/es/components/accordion/accordion.js +7 -5
  10. package/es/components/accordion/accordion.js.map +1 -1
  11. package/es/components/ai-label/ai-label.d.ts +1 -1
  12. package/es/components/ai-label/ai-label.js +6 -5
  13. package/es/components/ai-label/ai-label.js.map +1 -1
  14. package/es/components/button/button.d.ts +56 -22
  15. package/es/components/checkbox/checkbox-group.d.ts +2 -0
  16. package/es/components/checkbox/checkbox.d.ts +57 -23
  17. package/es/components/checkbox/checkbox.js +7 -5
  18. package/es/components/checkbox/checkbox.js.map +1 -1
  19. package/es/components/code-snippet/code-snippet.d.ts +29 -11
  20. package/es/components/code-snippet/code-snippet.js +15 -14
  21. package/es/components/code-snippet/code-snippet.js.map +1 -1
  22. package/es/components/combo-box/combo-box.scss.js +1 -1
  23. package/es/components/combo-button/combo-button.d.ts +27 -11
  24. package/es/components/content-switcher/content-switcher-item.d.ts +29 -11
  25. package/es/components/copy-button/copy-button.d.ts +27 -11
  26. package/es/components/data-table/table-expanded-row.d.ts +28 -12
  27. package/es/components/data-table/table-expanded-row.js +7 -5
  28. package/es/components/data-table/table-expanded-row.js.map +1 -1
  29. package/es/components/data-table/table-header-cell.d.ts +29 -11
  30. package/es/components/data-table/table-row.d.ts +54 -22
  31. package/es/components/data-table/table-toolbar-search.d.ts +29 -11
  32. package/es/components/data-table/table.d.ts +28 -12
  33. package/es/components/data-table/table.js +9 -8
  34. package/es/components/data-table/table.js.map +1 -1
  35. package/es/components/date-picker/date-picker-input.d.ts +29 -11
  36. package/es/components/date-picker/date-picker.d.ts +54 -22
  37. package/es/components/dropdown/dropdown.d.ts +110 -44
  38. package/es/components/dropdown/dropdown.js +8 -6
  39. package/es/components/dropdown/dropdown.js.map +1 -1
  40. package/es/components/file-uploader/file-uploader-button.d.ts +27 -11
  41. package/es/components/file-uploader/file-uploader-drop-container.d.ts +27 -11
  42. package/es/components/floating-menu/floating-menu.d.ts +56 -22
  43. package/es/components/fluid-select/fluid-select.d.ts +5 -0
  44. package/es/components/fluid-select/fluid-select.js +50 -1
  45. package/es/components/fluid-select/fluid-select.js.map +1 -1
  46. package/es/components/fluid-textarea/fluid-textarea-skeleton.d.ts +3 -3
  47. package/es/components/fluid-textarea/fluid-textarea-skeleton.js +3 -3
  48. package/es/components/fluid-textarea/fluid-textarea-skeleton.js.map +1 -1
  49. package/es/components/fluid-time-picker/fluid-time-picker-select.d.ts +21 -0
  50. package/es/components/fluid-time-picker/fluid-time-picker-select.js +53 -0
  51. package/es/components/fluid-time-picker/fluid-time-picker-select.js.map +1 -0
  52. package/es/components/fluid-time-picker/fluid-time-picker-skeleton.d.ts +23 -0
  53. package/es/components/fluid-time-picker/fluid-time-picker-skeleton.js +63 -0
  54. package/es/components/fluid-time-picker/fluid-time-picker-skeleton.js.map +1 -0
  55. package/es/components/fluid-time-picker/fluid-time-picker.d.ts +32 -0
  56. package/es/components/fluid-time-picker/fluid-time-picker.js +239 -0
  57. package/es/components/fluid-time-picker/fluid-time-picker.js.map +1 -0
  58. package/es/components/fluid-time-picker/fluid-time-picker.scss.js +13 -0
  59. package/es/components/fluid-time-picker/fluid-time-picker.scss.js.map +1 -0
  60. package/es/components/fluid-time-picker/index.d.ts +9 -0
  61. package/es/components/fluid-time-picker/index.js +11 -0
  62. package/es/components/fluid-time-picker/index.js.map +1 -0
  63. package/es/components/grid/column.d.ts +3 -1
  64. package/es/components/grid/column.js +6 -0
  65. package/es/components/grid/column.js.map +1 -1
  66. package/es/components/icon-button/icon-button.d.ts +1 -1
  67. package/es/components/icon-button/icon-button.js +6 -5
  68. package/es/components/icon-button/icon-button.js.map +1 -1
  69. package/es/components/link/link.d.ts +29 -11
  70. package/es/components/menu/menu-item-selectable.d.ts +5 -3
  71. package/es/components/menu/menu-item-selectable.js +3 -3
  72. package/es/components/menu/menu-item-selectable.js.map +1 -1
  73. package/es/components/menu/menu-item.d.ts +68 -23
  74. package/es/components/menu/menu-item.js +37 -2
  75. package/es/components/menu/menu-item.js.map +1 -1
  76. package/es/components/menu/menu.d.ts +27 -11
  77. package/es/components/menu-button/menu-button.d.ts +27 -11
  78. package/es/components/modal/modal-close-button.d.ts +29 -11
  79. package/es/components/modal/modal.d.ts +27 -11
  80. package/es/components/modal/modal.js +6 -4
  81. package/es/components/modal/modal.js.map +1 -1
  82. package/es/components/multi-select/multi-select.js +12 -8
  83. package/es/components/multi-select/multi-select.js.map +1 -1
  84. package/es/components/notification/actionable-notification.d.ts +27 -11
  85. package/es/components/notification/actionable-notification.scss.js +1 -1
  86. package/es/components/notification/inline-notification.d.ts +27 -11
  87. package/es/components/notification/inline-notification.scss.js +1 -1
  88. package/es/components/notification/toast-notification.scss.js +1 -1
  89. package/es/components/number-input/number-input.d.ts +2 -0
  90. package/es/components/overflow-menu/overflow-menu-item.d.ts +29 -11
  91. package/es/components/overflow-menu/overflow-menu.d.ts +54 -22
  92. package/es/components/pagination/pagination.d.ts +56 -22
  93. package/es/components/pagination-nav/defs.d.ts +61 -0
  94. package/es/components/pagination-nav/defs.js +74 -0
  95. package/es/components/pagination-nav/defs.js.map +1 -0
  96. package/es/components/pagination-nav/index.d.ts +7 -0
  97. package/es/components/pagination-nav/index.js +9 -0
  98. package/es/components/pagination-nav/index.js.map +1 -0
  99. package/es/components/pagination-nav/pagination-nav.d.ts +109 -0
  100. package/es/components/pagination-nav/pagination-nav.js +427 -0
  101. package/es/components/pagination-nav/pagination-nav.js.map +1 -0
  102. package/es/components/pagination-nav/pagination-nav.scss.js +13 -0
  103. package/es/components/pagination-nav/pagination-nav.scss.js.map +1 -0
  104. package/es/components/password-input/password-input.d.ts +2 -0
  105. package/es/components/popover/popover.d.ts +27 -11
  106. package/es/components/popover/popover.js +1 -1
  107. package/es/components/popover/popover.js.map +1 -1
  108. package/es/components/progress-indicator/progress-step.d.ts +29 -11
  109. package/es/components/radio-button/radio-button-group.d.ts +54 -22
  110. package/es/components/radio-button/radio-button.d.ts +57 -23
  111. package/es/components/radio-button/radio-button.js +7 -5
  112. package/es/components/radio-button/radio-button.js.map +1 -1
  113. package/es/components/search/search.d.ts +83 -33
  114. package/es/components/select/select.d.ts +29 -11
  115. package/es/components/side-panel/side-panel.d.ts +27 -11
  116. package/es/components/skip-to-content/skip-to-content.d.ts +29 -11
  117. package/es/components/slider/slider-input.d.ts +29 -11
  118. package/es/components/slider/slider.d.ts +84 -34
  119. package/es/components/slider/slider.js +9 -7
  120. package/es/components/slider/slider.js.map +1 -1
  121. package/es/components/slug/slug.d.ts +1 -1
  122. package/es/components/slug/slug.js +6 -4
  123. package/es/components/slug/slug.js.map +1 -1
  124. package/es/components/structured-list/structured-list-row.d.ts +27 -11
  125. package/es/components/structured-list/structured-list.d.ts +30 -12
  126. package/es/components/structured-list/structured-list.js +7 -5
  127. package/es/components/structured-list/structured-list.js.map +1 -1
  128. package/es/components/tabs/tabs.d.ts +27 -11
  129. package/es/components/tag/dismissible-tag.d.ts +54 -22
  130. package/es/components/tag/operational-tag.d.ts +54 -22
  131. package/es/components/tag/selectable-tag.d.ts +54 -22
  132. package/es/components/tag/tag.d.ts +54 -22
  133. package/es/components/tearsheet/tearsheet.d.ts +27 -11
  134. package/es/components/text-input/text-input.d.ts +56 -22
  135. package/es/components/textarea/textarea.d.ts +2 -0
  136. package/es/components/tile/expandable-tile.d.ts +54 -22
  137. package/es/components/tile/selectable-tile.d.ts +56 -22
  138. package/es/components/tile/tile-group.d.ts +27 -11
  139. package/es/components/time-picker/time-picker-select.d.ts +29 -11
  140. package/es/components/time-picker/time-picker.d.ts +56 -22
  141. package/es/components/toggle/toggle.d.ts +27 -11
  142. package/es/components/toggle-tip/toggletip.d.ts +57 -23
  143. package/es/components/toggle-tip/toggletip.js +7 -5
  144. package/es/components/toggle-tip/toggletip.js.map +1 -1
  145. package/es/components/tooltip/tooltip.d.ts +28 -12
  146. package/es/components/tooltip/tooltip.js +7 -5
  147. package/es/components/tooltip/tooltip.js.map +1 -1
  148. package/es/components/tree-view/tree-view.d.ts +28 -12
  149. package/es/components/tree-view/tree-view.js +7 -5
  150. package/es/components/tree-view/tree-view.js.map +1 -1
  151. package/es/components/ui-shell/header-global-action.d.ts +2 -0
  152. package/es/components/ui-shell/header-menu-button.d.ts +29 -11
  153. package/es/components/ui-shell/header-menu.d.ts +56 -22
  154. package/es/components/ui-shell/header-name.d.ts +29 -11
  155. package/es/components/ui-shell/header-nav-item.d.ts +29 -11
  156. package/es/components/ui-shell/header-panel.d.ts +2 -0
  157. package/es/components/ui-shell/side-nav-link.d.ts +29 -11
  158. package/es/components/ui-shell/side-nav-menu-item.d.ts +29 -11
  159. package/es/components/ui-shell/side-nav-menu.d.ts +29 -11
  160. package/es/components/ui-shell/side-nav.d.ts +27 -11
  161. package/es/components/ui-shell/switcher-item.d.ts +29 -11
  162. package/es/components/ui-shell/switcher.d.ts +2 -0
  163. package/es/globals/mixins/focus.d.ts +27 -11
  164. package/es/globals/mixins/form.d.ts +27 -11
  165. package/es/globals/mixins/host-listener.d.ts +27 -11
  166. package/es/globals/mixins/validity.d.ts +27 -11
  167. package/es-custom/components/accordion/accordion-item.d.ts +28 -12
  168. package/es-custom/components/accordion/accordion-item.js +7 -5
  169. package/es-custom/components/accordion/accordion-item.js.map +1 -1
  170. package/es-custom/components/accordion/accordion-skeleton.d.ts +1 -1
  171. package/es-custom/components/accordion/accordion-skeleton.js +7 -5
  172. package/es-custom/components/accordion/accordion-skeleton.js.map +1 -1
  173. package/es-custom/components/accordion/accordion.d.ts +1 -1
  174. package/es-custom/components/accordion/accordion.js +7 -5
  175. package/es-custom/components/accordion/accordion.js.map +1 -1
  176. package/es-custom/components/ai-label/ai-label.d.ts +1 -1
  177. package/es-custom/components/ai-label/ai-label.js +6 -5
  178. package/es-custom/components/ai-label/ai-label.js.map +1 -1
  179. package/es-custom/components/button/button.d.ts +56 -22
  180. package/es-custom/components/checkbox/checkbox-group.d.ts +2 -0
  181. package/es-custom/components/checkbox/checkbox.d.ts +57 -23
  182. package/es-custom/components/checkbox/checkbox.js +7 -5
  183. package/es-custom/components/checkbox/checkbox.js.map +1 -1
  184. package/es-custom/components/code-snippet/code-snippet.d.ts +29 -11
  185. package/es-custom/components/code-snippet/code-snippet.js +15 -14
  186. package/es-custom/components/code-snippet/code-snippet.js.map +1 -1
  187. package/es-custom/components/combo-box/combo-box.scss.js +1 -1
  188. package/es-custom/components/combo-button/combo-button.d.ts +27 -11
  189. package/es-custom/components/content-switcher/content-switcher-item.d.ts +29 -11
  190. package/es-custom/components/copy-button/copy-button.d.ts +27 -11
  191. package/es-custom/components/data-table/table-expanded-row.d.ts +28 -12
  192. package/es-custom/components/data-table/table-expanded-row.js +7 -5
  193. package/es-custom/components/data-table/table-expanded-row.js.map +1 -1
  194. package/es-custom/components/data-table/table-header-cell.d.ts +29 -11
  195. package/es-custom/components/data-table/table-row.d.ts +54 -22
  196. package/es-custom/components/data-table/table-toolbar-search.d.ts +29 -11
  197. package/es-custom/components/data-table/table.d.ts +28 -12
  198. package/es-custom/components/data-table/table.js +9 -8
  199. package/es-custom/components/data-table/table.js.map +1 -1
  200. package/es-custom/components/date-picker/date-picker-input.d.ts +29 -11
  201. package/es-custom/components/date-picker/date-picker.d.ts +54 -22
  202. package/es-custom/components/dropdown/dropdown.d.ts +110 -44
  203. package/es-custom/components/dropdown/dropdown.js +8 -6
  204. package/es-custom/components/dropdown/dropdown.js.map +1 -1
  205. package/es-custom/components/file-uploader/file-uploader-button.d.ts +27 -11
  206. package/es-custom/components/file-uploader/file-uploader-drop-container.d.ts +27 -11
  207. package/es-custom/components/floating-menu/floating-menu.d.ts +56 -22
  208. package/es-custom/components/fluid-select/fluid-select.d.ts +5 -0
  209. package/es-custom/components/fluid-select/fluid-select.js +50 -1
  210. package/es-custom/components/fluid-select/fluid-select.js.map +1 -1
  211. package/es-custom/components/fluid-textarea/fluid-textarea-skeleton.d.ts +3 -3
  212. package/es-custom/components/fluid-textarea/fluid-textarea-skeleton.js +3 -3
  213. package/es-custom/components/fluid-textarea/fluid-textarea-skeleton.js.map +1 -1
  214. package/es-custom/components/fluid-time-picker/fluid-time-picker-select.d.ts +21 -0
  215. package/es-custom/components/fluid-time-picker/fluid-time-picker-select.js +53 -0
  216. package/es-custom/components/fluid-time-picker/fluid-time-picker-select.js.map +1 -0
  217. package/es-custom/components/fluid-time-picker/fluid-time-picker-skeleton.d.ts +23 -0
  218. package/es-custom/components/fluid-time-picker/fluid-time-picker-skeleton.js +63 -0
  219. package/es-custom/components/fluid-time-picker/fluid-time-picker-skeleton.js.map +1 -0
  220. package/es-custom/components/fluid-time-picker/fluid-time-picker.d.ts +32 -0
  221. package/es-custom/components/fluid-time-picker/fluid-time-picker.js +239 -0
  222. package/es-custom/components/fluid-time-picker/fluid-time-picker.js.map +1 -0
  223. package/es-custom/components/fluid-time-picker/fluid-time-picker.scss.js +13 -0
  224. package/es-custom/components/fluid-time-picker/fluid-time-picker.scss.js.map +1 -0
  225. package/es-custom/components/fluid-time-picker/index.d.ts +9 -0
  226. package/es-custom/components/fluid-time-picker/index.js +11 -0
  227. package/es-custom/components/fluid-time-picker/index.js.map +1 -0
  228. package/es-custom/components/grid/column.d.ts +3 -1
  229. package/es-custom/components/grid/column.js +6 -0
  230. package/es-custom/components/grid/column.js.map +1 -1
  231. package/es-custom/components/icon-button/icon-button.d.ts +1 -1
  232. package/es-custom/components/icon-button/icon-button.js +6 -5
  233. package/es-custom/components/icon-button/icon-button.js.map +1 -1
  234. package/es-custom/components/link/link.d.ts +29 -11
  235. package/es-custom/components/menu/menu-item-selectable.d.ts +5 -3
  236. package/es-custom/components/menu/menu-item-selectable.js +3 -3
  237. package/es-custom/components/menu/menu-item-selectable.js.map +1 -1
  238. package/es-custom/components/menu/menu-item.d.ts +68 -23
  239. package/es-custom/components/menu/menu-item.js +37 -2
  240. package/es-custom/components/menu/menu-item.js.map +1 -1
  241. package/es-custom/components/menu/menu.d.ts +27 -11
  242. package/es-custom/components/menu-button/menu-button.d.ts +27 -11
  243. package/es-custom/components/modal/modal-close-button.d.ts +29 -11
  244. package/es-custom/components/modal/modal.d.ts +27 -11
  245. package/es-custom/components/modal/modal.js +6 -4
  246. package/es-custom/components/modal/modal.js.map +1 -1
  247. package/es-custom/components/multi-select/multi-select.js +12 -8
  248. package/es-custom/components/multi-select/multi-select.js.map +1 -1
  249. package/es-custom/components/notification/actionable-notification.d.ts +27 -11
  250. package/es-custom/components/notification/actionable-notification.scss.js +1 -1
  251. package/es-custom/components/notification/inline-notification.d.ts +27 -11
  252. package/es-custom/components/notification/inline-notification.scss.js +1 -1
  253. package/es-custom/components/notification/toast-notification.scss.js +1 -1
  254. package/es-custom/components/number-input/number-input.d.ts +2 -0
  255. package/es-custom/components/overflow-menu/overflow-menu-item.d.ts +29 -11
  256. package/es-custom/components/overflow-menu/overflow-menu.d.ts +54 -22
  257. package/es-custom/components/pagination/pagination.d.ts +56 -22
  258. package/es-custom/components/pagination-nav/defs.d.ts +61 -0
  259. package/es-custom/components/pagination-nav/defs.js +74 -0
  260. package/es-custom/components/pagination-nav/defs.js.map +1 -0
  261. package/es-custom/components/pagination-nav/index.d.ts +7 -0
  262. package/es-custom/components/pagination-nav/index.js +9 -0
  263. package/es-custom/components/pagination-nav/index.js.map +1 -0
  264. package/es-custom/components/pagination-nav/pagination-nav.d.ts +109 -0
  265. package/es-custom/components/pagination-nav/pagination-nav.js +427 -0
  266. package/es-custom/components/pagination-nav/pagination-nav.js.map +1 -0
  267. package/es-custom/components/pagination-nav/pagination-nav.scss.js +13 -0
  268. package/es-custom/components/pagination-nav/pagination-nav.scss.js.map +1 -0
  269. package/es-custom/components/password-input/password-input.d.ts +2 -0
  270. package/es-custom/components/popover/popover.d.ts +27 -11
  271. package/es-custom/components/popover/popover.js +1 -1
  272. package/es-custom/components/popover/popover.js.map +1 -1
  273. package/es-custom/components/progress-indicator/progress-step.d.ts +29 -11
  274. package/es-custom/components/radio-button/radio-button-group.d.ts +54 -22
  275. package/es-custom/components/radio-button/radio-button.d.ts +57 -23
  276. package/es-custom/components/radio-button/radio-button.js +7 -5
  277. package/es-custom/components/radio-button/radio-button.js.map +1 -1
  278. package/es-custom/components/search/search.d.ts +83 -33
  279. package/es-custom/components/select/select.d.ts +29 -11
  280. package/es-custom/components/side-panel/side-panel.d.ts +27 -11
  281. package/es-custom/components/skip-to-content/skip-to-content.d.ts +29 -11
  282. package/es-custom/components/slider/slider-input.d.ts +29 -11
  283. package/es-custom/components/slider/slider.d.ts +84 -34
  284. package/es-custom/components/slider/slider.js +9 -7
  285. package/es-custom/components/slider/slider.js.map +1 -1
  286. package/es-custom/components/slug/slug.d.ts +1 -1
  287. package/es-custom/components/slug/slug.js +6 -4
  288. package/es-custom/components/slug/slug.js.map +1 -1
  289. package/es-custom/components/structured-list/structured-list-row.d.ts +27 -11
  290. package/es-custom/components/structured-list/structured-list.d.ts +30 -12
  291. package/es-custom/components/structured-list/structured-list.js +7 -5
  292. package/es-custom/components/structured-list/structured-list.js.map +1 -1
  293. package/es-custom/components/tabs/tabs.d.ts +27 -11
  294. package/es-custom/components/tag/dismissible-tag.d.ts +54 -22
  295. package/es-custom/components/tag/operational-tag.d.ts +54 -22
  296. package/es-custom/components/tag/selectable-tag.d.ts +54 -22
  297. package/es-custom/components/tag/tag.d.ts +54 -22
  298. package/es-custom/components/tearsheet/tearsheet.d.ts +27 -11
  299. package/es-custom/components/text-input/text-input.d.ts +56 -22
  300. package/es-custom/components/textarea/textarea.d.ts +2 -0
  301. package/es-custom/components/tile/expandable-tile.d.ts +54 -22
  302. package/es-custom/components/tile/selectable-tile.d.ts +56 -22
  303. package/es-custom/components/tile/tile-group.d.ts +27 -11
  304. package/es-custom/components/time-picker/time-picker-select.d.ts +29 -11
  305. package/es-custom/components/time-picker/time-picker.d.ts +56 -22
  306. package/es-custom/components/toggle/toggle.d.ts +27 -11
  307. package/es-custom/components/toggle-tip/toggletip.d.ts +57 -23
  308. package/es-custom/components/toggle-tip/toggletip.js +7 -5
  309. package/es-custom/components/toggle-tip/toggletip.js.map +1 -1
  310. package/es-custom/components/tooltip/tooltip.d.ts +28 -12
  311. package/es-custom/components/tooltip/tooltip.js +7 -5
  312. package/es-custom/components/tooltip/tooltip.js.map +1 -1
  313. package/es-custom/components/tree-view/tree-view.d.ts +28 -12
  314. package/es-custom/components/tree-view/tree-view.js +7 -5
  315. package/es-custom/components/tree-view/tree-view.js.map +1 -1
  316. package/es-custom/components/ui-shell/header-global-action.d.ts +2 -0
  317. package/es-custom/components/ui-shell/header-menu-button.d.ts +29 -11
  318. package/es-custom/components/ui-shell/header-menu.d.ts +56 -22
  319. package/es-custom/components/ui-shell/header-name.d.ts +29 -11
  320. package/es-custom/components/ui-shell/header-nav-item.d.ts +29 -11
  321. package/es-custom/components/ui-shell/header-panel.d.ts +2 -0
  322. package/es-custom/components/ui-shell/side-nav-link.d.ts +29 -11
  323. package/es-custom/components/ui-shell/side-nav-menu-item.d.ts +29 -11
  324. package/es-custom/components/ui-shell/side-nav-menu.d.ts +29 -11
  325. package/es-custom/components/ui-shell/side-nav.d.ts +27 -11
  326. package/es-custom/components/ui-shell/switcher-item.d.ts +29 -11
  327. package/es-custom/components/ui-shell/switcher.d.ts +2 -0
  328. package/es-custom/globals/mixins/focus.d.ts +27 -11
  329. package/es-custom/globals/mixins/form.d.ts +27 -11
  330. package/es-custom/globals/mixins/host-listener.d.ts +27 -11
  331. package/es-custom/globals/mixins/validity.d.ts +27 -11
  332. package/lib/components/accordion/accordion-item.d.ts +28 -12
  333. package/lib/components/accordion/accordion-skeleton.d.ts +1 -1
  334. package/lib/components/accordion/accordion.d.ts +1 -1
  335. package/lib/components/ai-label/ai-label.d.ts +1 -1
  336. package/lib/components/button/button.d.ts +56 -22
  337. package/lib/components/checkbox/checkbox-group.d.ts +2 -0
  338. package/lib/components/checkbox/checkbox.d.ts +57 -23
  339. package/lib/components/code-snippet/code-snippet.d.ts +29 -11
  340. package/lib/components/combo-button/combo-button.d.ts +27 -11
  341. package/lib/components/content-switcher/content-switcher-item.d.ts +29 -11
  342. package/lib/components/copy-button/copy-button.d.ts +27 -11
  343. package/lib/components/data-table/table-expanded-row.d.ts +28 -12
  344. package/lib/components/data-table/table-header-cell.d.ts +29 -11
  345. package/lib/components/data-table/table-row.d.ts +54 -22
  346. package/lib/components/data-table/table-toolbar-search.d.ts +29 -11
  347. package/lib/components/data-table/table.d.ts +28 -12
  348. package/lib/components/date-picker/date-picker-input.d.ts +29 -11
  349. package/lib/components/date-picker/date-picker.d.ts +54 -22
  350. package/lib/components/dropdown/dropdown.d.ts +110 -44
  351. package/lib/components/file-uploader/file-uploader-button.d.ts +27 -11
  352. package/lib/components/file-uploader/file-uploader-drop-container.d.ts +27 -11
  353. package/lib/components/floating-menu/floating-menu.d.ts +56 -22
  354. package/lib/components/fluid-select/fluid-select.d.ts +5 -0
  355. package/lib/components/fluid-textarea/fluid-textarea-skeleton.d.ts +3 -3
  356. package/lib/components/fluid-time-picker/fluid-time-picker-select.d.ts +21 -0
  357. package/lib/components/fluid-time-picker/fluid-time-picker-skeleton.d.ts +23 -0
  358. package/lib/components/fluid-time-picker/fluid-time-picker.d.ts +32 -0
  359. package/lib/components/fluid-time-picker/index.d.ts +9 -0
  360. package/lib/components/grid/column.d.ts +3 -1
  361. package/lib/components/icon-button/icon-button.d.ts +1 -1
  362. package/lib/components/link/link.d.ts +29 -11
  363. package/lib/components/menu/menu-item-selectable.d.ts +5 -3
  364. package/lib/components/menu/menu-item.d.ts +68 -23
  365. package/lib/components/menu/menu.d.ts +27 -11
  366. package/lib/components/menu-button/menu-button.d.ts +27 -11
  367. package/lib/components/modal/modal-close-button.d.ts +29 -11
  368. package/lib/components/modal/modal.d.ts +27 -11
  369. package/lib/components/notification/actionable-notification.d.ts +27 -11
  370. package/lib/components/notification/inline-notification.d.ts +27 -11
  371. package/lib/components/number-input/number-input.d.ts +2 -0
  372. package/lib/components/overflow-menu/overflow-menu-item.d.ts +29 -11
  373. package/lib/components/overflow-menu/overflow-menu.d.ts +54 -22
  374. package/lib/components/pagination/pagination.d.ts +56 -22
  375. package/lib/components/pagination-nav/defs.d.ts +61 -0
  376. package/lib/components/pagination-nav/defs.js +74 -0
  377. package/lib/components/pagination-nav/defs.js.map +1 -0
  378. package/lib/components/pagination-nav/index.d.ts +7 -0
  379. package/lib/components/pagination-nav/pagination-nav.d.ts +109 -0
  380. package/lib/components/password-input/password-input.d.ts +2 -0
  381. package/lib/components/popover/popover.d.ts +27 -11
  382. package/lib/components/progress-indicator/progress-step.d.ts +29 -11
  383. package/lib/components/radio-button/radio-button-group.d.ts +54 -22
  384. package/lib/components/radio-button/radio-button.d.ts +57 -23
  385. package/lib/components/search/search.d.ts +83 -33
  386. package/lib/components/select/select.d.ts +29 -11
  387. package/lib/components/side-panel/side-panel.d.ts +27 -11
  388. package/lib/components/skip-to-content/skip-to-content.d.ts +29 -11
  389. package/lib/components/slider/slider-input.d.ts +29 -11
  390. package/lib/components/slider/slider.d.ts +84 -34
  391. package/lib/components/slug/slug.d.ts +1 -1
  392. package/lib/components/structured-list/structured-list-row.d.ts +27 -11
  393. package/lib/components/structured-list/structured-list.d.ts +30 -12
  394. package/lib/components/tabs/tabs.d.ts +27 -11
  395. package/lib/components/tag/dismissible-tag.d.ts +54 -22
  396. package/lib/components/tag/operational-tag.d.ts +54 -22
  397. package/lib/components/tag/selectable-tag.d.ts +54 -22
  398. package/lib/components/tag/tag.d.ts +54 -22
  399. package/lib/components/tearsheet/tearsheet.d.ts +27 -11
  400. package/lib/components/text-input/text-input.d.ts +56 -22
  401. package/lib/components/textarea/textarea.d.ts +2 -0
  402. package/lib/components/tile/expandable-tile.d.ts +54 -22
  403. package/lib/components/tile/selectable-tile.d.ts +56 -22
  404. package/lib/components/tile/tile-group.d.ts +27 -11
  405. package/lib/components/time-picker/time-picker-select.d.ts +29 -11
  406. package/lib/components/time-picker/time-picker.d.ts +56 -22
  407. package/lib/components/toggle/toggle.d.ts +27 -11
  408. package/lib/components/toggle-tip/toggletip.d.ts +57 -23
  409. package/lib/components/tooltip/tooltip.d.ts +28 -12
  410. package/lib/components/tree-view/tree-view.d.ts +28 -12
  411. package/lib/components/ui-shell/header-global-action.d.ts +2 -0
  412. package/lib/components/ui-shell/header-menu-button.d.ts +29 -11
  413. package/lib/components/ui-shell/header-menu.d.ts +56 -22
  414. package/lib/components/ui-shell/header-name.d.ts +29 -11
  415. package/lib/components/ui-shell/header-nav-item.d.ts +29 -11
  416. package/lib/components/ui-shell/header-panel.d.ts +2 -0
  417. package/lib/components/ui-shell/side-nav-link.d.ts +29 -11
  418. package/lib/components/ui-shell/side-nav-menu-item.d.ts +29 -11
  419. package/lib/components/ui-shell/side-nav-menu.d.ts +29 -11
  420. package/lib/components/ui-shell/side-nav.d.ts +27 -11
  421. package/lib/components/ui-shell/switcher-item.d.ts +29 -11
  422. package/lib/components/ui-shell/switcher.d.ts +2 -0
  423. package/lib/globals/mixins/focus.d.ts +27 -11
  424. package/lib/globals/mixins/form.d.ts +27 -11
  425. package/lib/globals/mixins/host-listener.d.ts +27 -11
  426. package/lib/globals/mixins/validity.d.ts +27 -11
  427. package/package.json +7 -7
  428. package/scss/components/combo-box/combo-box.scss +1 -1
  429. package/scss/components/fluid-time-picker/fluid-time-picker.scss +198 -0
  430. package/scss/components/pagination-nav/pagination-nav.scss +29 -0
  431. package/telemetry.yml +16 -8
@@ -71,6 +71,7 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
71
71
  accessKey: string;
72
72
  readonly accessKeyLabel: string;
73
73
  autocapitalize: string;
74
+ autocorrect: boolean;
74
75
  dir: string;
75
76
  draggable: boolean;
76
77
  hidden: boolean;
@@ -92,13 +93,14 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
92
93
  click(): void;
93
94
  hidePopover(): void;
94
95
  showPopover(): void;
95
- togglePopover(force?: boolean): boolean;
96
+ togglePopover(options?: boolean): boolean;
96
97
  addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
97
98
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
98
99
  removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
99
100
  removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
100
101
  readonly attributes: NamedNodeMap;
101
- readonly classList: DOMTokenList;
102
+ get classList(): DOMTokenList;
103
+ set classList(value: string);
102
104
  className: string;
103
105
  readonly clientHeight: number;
104
106
  readonly clientLeft: number;
@@ -113,7 +115,8 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
113
115
  onfullscreenerror: ((this: Element, ev: Event) => any) | null;
114
116
  outerHTML: string;
115
117
  readonly ownerDocument: Document;
116
- readonly part: DOMTokenList;
118
+ get part(): DOMTokenList;
119
+ set part(value: string);
117
120
  readonly prefix: string | null;
118
121
  readonly scrollHeight: number;
119
122
  scrollLeft: number;
@@ -176,6 +179,8 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
176
179
  setPointerCapture(pointerId: number): void;
177
180
  toggleAttribute(qualifiedName: string, force?: boolean): boolean;
178
181
  webkitMatchesSelector(selectors: string): boolean;
182
+ get textContent(): string;
183
+ set textContent(value: string | null);
179
184
  readonly baseURI: string;
180
185
  readonly childNodes: NodeListOf<ChildNode>;
181
186
  readonly firstChild: ChildNode | null;
@@ -188,9 +193,8 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
188
193
  readonly parentElement: HTMLElement | null;
189
194
  readonly parentNode: ParentNode | null;
190
195
  readonly previousSibling: ChildNode | null;
191
- textContent: string | null;
192
196
  appendChild<T_1 extends Node>(node: T_1): T_1;
193
- cloneNode(deep?: boolean): Node;
197
+ cloneNode(subtree?: boolean): Node;
194
198
  compareDocumentPosition(other: Node): number;
195
199
  contains(other: Node | null): boolean;
196
200
  getRootNode(options?: GetRootNodeOptions): Node;
@@ -223,6 +227,7 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
223
227
  readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
224
228
  readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
225
229
  dispatchEvent(event: Event): boolean;
230
+ ariaActiveDescendantElement: Element | null;
226
231
  ariaAtomic: string | null;
227
232
  ariaAutoComplete: string | null;
228
233
  ariaBrailleLabel: string | null;
@@ -233,25 +238,33 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
233
238
  ariaColIndex: string | null;
234
239
  ariaColIndexText: string | null;
235
240
  ariaColSpan: string | null;
241
+ ariaControlsElements: ReadonlyArray<Element> | null;
236
242
  ariaCurrent: string | null;
243
+ ariaDescribedByElements: ReadonlyArray<Element> | null;
237
244
  ariaDescription: string | null;
245
+ ariaDetailsElements: ReadonlyArray<Element> | null;
238
246
  ariaDisabled: string | null;
247
+ ariaErrorMessageElements: ReadonlyArray<Element> | null;
239
248
  ariaExpanded: string | null;
249
+ ariaFlowToElements: ReadonlyArray<Element> | null;
240
250
  ariaHasPopup: string | null;
241
251
  ariaHidden: string | null;
242
252
  ariaInvalid: string | null;
243
253
  ariaKeyShortcuts: string | null;
244
254
  ariaLabel: string | null;
255
+ ariaLabelledByElements: ReadonlyArray<Element> | null;
245
256
  ariaLevel: string | null;
246
257
  ariaLive: string | null;
247
258
  ariaModal: string | null;
248
259
  ariaMultiLine: string | null;
249
260
  ariaMultiSelectable: string | null;
250
261
  ariaOrientation: string | null;
262
+ ariaOwnsElements: ReadonlyArray<Element> | null;
251
263
  ariaPlaceholder: string | null;
252
264
  ariaPosInSet: string | null;
253
265
  ariaPressed: string | null;
254
266
  ariaReadOnly: string | null;
267
+ ariaRelevant: string | null;
255
268
  ariaRequired: string | null;
256
269
  ariaRoleDescription: string | null;
257
270
  ariaRowCount: string | null;
@@ -293,7 +306,8 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
293
306
  replaceChildren(...nodes: (Node | string)[]): void;
294
307
  readonly assignedSlot: HTMLSlotElement | null;
295
308
  readonly attributeStyleMap: StylePropertyMap;
296
- readonly style: CSSStyleDeclaration;
309
+ get style(): CSSStyleDeclaration;
310
+ set style(cssText: string);
297
311
  contentEditable: string;
298
312
  enterKeyHint: string;
299
313
  inputMode: string;
@@ -303,18 +317,19 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
303
317
  onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
304
318
  onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
305
319
  onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
306
- onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
320
+ onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
307
321
  onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
308
- onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
322
+ onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
323
+ onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
309
324
  onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
310
325
  oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
311
326
  oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
312
327
  oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
313
328
  onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
314
- onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
329
+ onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
315
330
  onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
316
331
  oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
317
- oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
332
+ oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
318
333
  oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
319
334
  oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
320
335
  oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
@@ -362,6 +377,7 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
362
377
  onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
363
378
  onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
364
379
  onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
380
+ onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
365
381
  onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
366
382
  onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
367
383
  onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
@@ -380,7 +396,7 @@ declare const ValidityMixin: <T extends Constructor<HTMLElement>>(Base: T) => (a
380
396
  onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
381
397
  onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
382
398
  ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
383
- ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
399
+ ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
384
400
  ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
385
401
  ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
386
402
  ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2019, 2023
2
+ * Copyright IBM Corp. 2019, 2026
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -13,6 +13,7 @@ declare const CDSAccordionItem_base: {
13
13
  accessKey: string;
14
14
  readonly accessKeyLabel: string;
15
15
  autocapitalize: string;
16
+ autocorrect: boolean;
16
17
  dir: string;
17
18
  draggable: boolean;
18
19
  hidden: boolean;
@@ -34,13 +35,14 @@ declare const CDSAccordionItem_base: {
34
35
  click(): void;
35
36
  hidePopover(): void;
36
37
  showPopover(): void;
37
- togglePopover(force?: boolean): boolean;
38
+ togglePopover(options?: boolean): boolean;
38
39
  addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
39
40
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
40
41
  removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
41
42
  removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
42
43
  readonly attributes: NamedNodeMap;
43
- readonly classList: DOMTokenList;
44
+ get classList(): DOMTokenList;
45
+ set classList(value: string);
44
46
  className: string;
45
47
  readonly clientHeight: number;
46
48
  readonly clientLeft: number;
@@ -55,7 +57,8 @@ declare const CDSAccordionItem_base: {
55
57
  onfullscreenerror: ((this: Element, ev: Event) => any) | null;
56
58
  outerHTML: string;
57
59
  readonly ownerDocument: Document;
58
- readonly part: DOMTokenList;
60
+ get part(): DOMTokenList;
61
+ set part(value: string);
59
62
  readonly prefix: string | null;
60
63
  readonly scrollHeight: number;
61
64
  scrollLeft: number;
@@ -118,6 +121,8 @@ declare const CDSAccordionItem_base: {
118
121
  setPointerCapture(pointerId: number): void;
119
122
  toggleAttribute(qualifiedName: string, force?: boolean): boolean;
120
123
  webkitMatchesSelector(selectors: string): boolean;
124
+ get textContent(): string;
125
+ set textContent(value: string | null);
121
126
  readonly baseURI: string;
122
127
  readonly childNodes: NodeListOf<ChildNode>;
123
128
  readonly firstChild: ChildNode | null;
@@ -130,9 +135,8 @@ declare const CDSAccordionItem_base: {
130
135
  readonly parentElement: HTMLElement | null;
131
136
  readonly parentNode: ParentNode | null;
132
137
  readonly previousSibling: ChildNode | null;
133
- textContent: string | null;
134
138
  appendChild<T extends Node>(node: T): T;
135
- cloneNode(deep?: boolean): Node;
139
+ cloneNode(subtree?: boolean): Node;
136
140
  compareDocumentPosition(other: Node): number;
137
141
  contains(other: Node | null): boolean;
138
142
  getRootNode(options?: GetRootNodeOptions): Node;
@@ -165,6 +169,7 @@ declare const CDSAccordionItem_base: {
165
169
  readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
166
170
  readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
167
171
  dispatchEvent(event: Event): boolean;
172
+ ariaActiveDescendantElement: Element | null;
168
173
  ariaAtomic: string | null;
169
174
  ariaAutoComplete: string | null;
170
175
  ariaBrailleLabel: string | null;
@@ -175,25 +180,33 @@ declare const CDSAccordionItem_base: {
175
180
  ariaColIndex: string | null;
176
181
  ariaColIndexText: string | null;
177
182
  ariaColSpan: string | null;
183
+ ariaControlsElements: ReadonlyArray<Element> | null;
178
184
  ariaCurrent: string | null;
185
+ ariaDescribedByElements: ReadonlyArray<Element> | null;
179
186
  ariaDescription: string | null;
187
+ ariaDetailsElements: ReadonlyArray<Element> | null;
180
188
  ariaDisabled: string | null;
189
+ ariaErrorMessageElements: ReadonlyArray<Element> | null;
181
190
  ariaExpanded: string | null;
191
+ ariaFlowToElements: ReadonlyArray<Element> | null;
182
192
  ariaHasPopup: string | null;
183
193
  ariaHidden: string | null;
184
194
  ariaInvalid: string | null;
185
195
  ariaKeyShortcuts: string | null;
186
196
  ariaLabel: string | null;
197
+ ariaLabelledByElements: ReadonlyArray<Element> | null;
187
198
  ariaLevel: string | null;
188
199
  ariaLive: string | null;
189
200
  ariaModal: string | null;
190
201
  ariaMultiLine: string | null;
191
202
  ariaMultiSelectable: string | null;
192
203
  ariaOrientation: string | null;
204
+ ariaOwnsElements: ReadonlyArray<Element> | null;
193
205
  ariaPlaceholder: string | null;
194
206
  ariaPosInSet: string | null;
195
207
  ariaPressed: string | null;
196
208
  ariaReadOnly: string | null;
209
+ ariaRelevant: string | null;
197
210
  ariaRequired: string | null;
198
211
  ariaRoleDescription: string | null;
199
212
  ariaRowCount: string | null;
@@ -235,7 +248,8 @@ declare const CDSAccordionItem_base: {
235
248
  replaceChildren(...nodes: (Node | string)[]): void;
236
249
  readonly assignedSlot: HTMLSlotElement | null;
237
250
  readonly attributeStyleMap: StylePropertyMap;
238
- readonly style: CSSStyleDeclaration;
251
+ get style(): CSSStyleDeclaration;
252
+ set style(cssText: string);
239
253
  contentEditable: string;
240
254
  enterKeyHint: string;
241
255
  inputMode: string;
@@ -245,18 +259,19 @@ declare const CDSAccordionItem_base: {
245
259
  onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
246
260
  onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
247
261
  onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
248
- onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
262
+ onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
249
263
  onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
250
- onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
264
+ onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
265
+ onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
251
266
  onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
252
267
  oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
253
268
  oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
254
269
  oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
255
270
  onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
256
- onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
271
+ onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
257
272
  onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
258
273
  oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
259
- oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
274
+ oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
260
275
  oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
261
276
  oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
262
277
  oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
@@ -304,6 +319,7 @@ declare const CDSAccordionItem_base: {
304
319
  onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
305
320
  onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
306
321
  onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
322
+ onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
307
323
  onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
308
324
  onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
309
325
  onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
@@ -322,7 +338,7 @@ declare const CDSAccordionItem_base: {
322
338
  onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
323
339
  onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
324
340
  ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
325
- ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
341
+ ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
326
342
  ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
327
343
  ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
328
344
  ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
@@ -18,7 +18,7 @@ import styles from './accordion.scss.js';
18
18
  import { carbonElement } from '../../globals/decorators/carbon-element.js';
19
19
 
20
20
  /**
21
- * Copyright IBM Corp. 2019, 2023
21
+ * Copyright IBM Corp. 2019, 2026
22
22
  *
23
23
  * This source code is licensed under the Apache-2.0 license found in the
24
24
  * LICENSE file in the root directory of this source tree.
@@ -112,10 +112,12 @@ let CDSAccordionItem = class CDSAccordionItem extends FocusMixin(LitElement) {
112
112
  if (this.dispatchEvent(new CustomEvent(this.constructor.eventBeforeToggle, init))) {
113
113
  const { selectorAccordionContent } = this
114
114
  .constructor;
115
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20452
116
- !this.open
117
- ? this.setAttribute('expanding', '')
118
- : this.setAttribute('collapsing', '');
115
+ if (!this.open) {
116
+ this.setAttribute('expanding', '');
117
+ }
118
+ else {
119
+ this.setAttribute('collapsing', '');
120
+ }
119
121
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452
120
122
  this.shadowRoot.querySelector(selectorAccordionContent).addEventListener('animationend', () => {
121
123
  this.removeAttribute('expanding');
@@ -1 +1 @@
1
- {"version":3,"file":"accordion-item.js","sources":["../../../src/components/accordion/accordion-item.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { classMap } from 'lit/directives/class-map.js';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport ChevronRight16 from '@carbon/icons/es/chevron--right/16.js';\nimport { iconLoader } from '../../globals/internal/icon-loader';\nimport FocusMixin from '../../globals/mixins/focus';\nimport Handle from '../../globals/internal/handle';\nimport { ACCORDION_ITEM_BREAKPOINT } from './defs';\nimport styles from './accordion.scss?lit';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nexport { ACCORDION_ITEM_BREAKPOINT };\n\n/**\n * Observes resize of the given element with the given resize observer.\n *\n * @param observer The resize observer.\n * @param elem The element to observe the resize.\n */\nconst observeResize = (observer: ResizeObserver, elem: Element) => {\n if (!elem) {\n return null;\n }\n observer.observe(elem);\n return {\n release() {\n observer.unobserve(elem);\n return null;\n },\n } as Handle;\n};\n\n/**\n * Accordion item.\n *\n * @element cds-custom-accordion-item\n * @fires cds-custom-accordion-item-beingtoggled\n * The custom event fired before this accordion item is being toggled upon a user gesture.\n * Cancellation of this event stops the user-initiated action of toggling this accordion item.\n * @fires cds-custom-accordion-item-toggled - The custom event fired after this accordion item is toggled upon a user gesture.\n * @csspart title The title.\n * @csspart content The content.\n */\n@customElement(`${prefix}-accordion-item`)\nclass CDSAccordionItem extends FocusMixin(LitElement) {\n /**\n * The current breakpoint.\n */\n private _currentBreakpoint?: ACCORDION_ITEM_BREAKPOINT;\n\n /**\n * The handle for observing resize of the parent element of this element.\n */\n private _hObserveResize: Handle | null = null;\n\n /**\n * Handles user-initiated toggle request of this accordion item.\n *\n * @param open The new open state.\n */\n private _handleUserInitiatedToggle(open = !this.open) {\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n open,\n },\n };\n if (\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSAccordionItem).eventBeforeToggle,\n init\n )\n )\n ) {\n const { selectorAccordionContent } = this\n .constructor as typeof CDSAccordionItem;\n\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20452\n !this.open\n ? this.setAttribute('expanding', '')\n : this.setAttribute('collapsing', '');\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n this.shadowRoot!.querySelector(\n selectorAccordionContent\n )!.addEventListener('animationend', () => {\n this.removeAttribute('expanding');\n this.removeAttribute('collapsing');\n });\n\n this.open = open;\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSAccordionItem).eventToggle,\n init\n )\n );\n }\n }\n\n /**\n * Handler for the `click` event on the expando button.\n */\n private _handleClickExpando() {\n this._handleUserInitiatedToggle();\n }\n\n /**\n * Handler for the `keydown` event on the expando button.\n */\n private _handleKeydownExpando = ({ key }: KeyboardEvent) => {\n if (this.open && (key === 'Esc' || key === 'Escape')) {\n this._handleUserInitiatedToggle(false);\n }\n };\n\n /**\n * The `ResizeObserver` instance for observing element resizes for re-positioning floating menu position.\n */\n // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452\n // @ts-ignore\n private _resizeObserver = new ResizeObserver(\n (records: ResizeObserverEntry[]) => {\n const { width } = records[records.length - 1].contentRect;\n const { _sizesBreakpoints: sizesBreakpoints } = this\n .constructor as typeof CDSAccordionItem;\n this._currentBreakpoint = Object.keys(sizesBreakpoints)\n .sort((lhs, rhs) => sizesBreakpoints[rhs] - sizesBreakpoints[lhs])\n .find(\n (size) => width >= sizesBreakpoints[size]\n ) as ACCORDION_ITEM_BREAKPOINT;\n this.requestUpdate();\n }\n );\n\n /**\n * `true` if the accordion item should be disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * `true` if the accordion item should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * The title text.\n */\n @property({ attribute: 'title' })\n title = '';\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n super.connectedCallback();\n if (this._hObserveResize) {\n this._hObserveResize = this._hObserveResize.release();\n }\n this._hObserveResize = observeResize(this._resizeObserver, this);\n }\n\n disconnectedCallback() {\n if (this._hObserveResize) {\n this._hObserveResize = this._hObserveResize.release();\n }\n }\n\n render() {\n const {\n disabled,\n title,\n open,\n _currentBreakpoint: currentBreakpoint,\n _handleClickExpando: handleClickExpando,\n _handleKeydownExpando: handleKeydownExpando,\n } = this;\n const { _classesBreakpoints: classesBreakpoints } = this\n .constructor as typeof CDSAccordionItem;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n const { [currentBreakpoint!]: classBreakpoint } = classesBreakpoints;\n const contentClasses = classMap({\n [classBreakpoint]: classBreakpoint,\n [`${prefix}--accordion__content`]: true,\n });\n return html`\n <button\n ?disabled=\"${disabled}\"\n type=\"button\"\n part=\"expando\"\n class=\"${prefix}--accordion__heading\"\n aria-controls=\"content\"\n aria-expanded=\"${open}\"\n @click=\"${handleClickExpando}\"\n @keydown=\"${handleKeydownExpando}\">\n ${iconLoader(ChevronRight16, {\n part: 'expando-icon',\n class: `${prefix}--accordion__arrow`,\n })}\n <div part=\"title\" class=\"${prefix}--accordion__title\">\n <slot name=\"title\">${title}</slot>\n </div>\n </button>\n <div class=\"${prefix}--accordion__wrapper\" part=\"wrapper\">\n <div id=\"content\" part=\"content\" class=\"${contentClasses}\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n /**\n * The CSS classes for breakpoints.\n *\n * @private\n */\n static get _classesBreakpoints() {\n return {\n [ACCORDION_ITEM_BREAKPOINT.SMALL]: `${prefix}-ce--accordion__content--${ACCORDION_ITEM_BREAKPOINT.SMALL}`,\n [ACCORDION_ITEM_BREAKPOINT.MEDIUM]: `${prefix}-ce--accordion__content--${ACCORDION_ITEM_BREAKPOINT.MEDIUM}`,\n };\n }\n\n /**\n * The breakpoints.\n *\n * @private\n */\n static get _sizesBreakpoints() {\n return {\n [ACCORDION_ITEM_BREAKPOINT.SMALL]: 480,\n [ACCORDION_ITEM_BREAKPOINT.MEDIUM]: 640,\n };\n }\n\n /**\n * The name of the custom event fired before this accordion item is being toggled upon a user gesture.\n * Cancellation of this event stops the user-initiated action of toggling this accordion item.\n */\n static get eventBeforeToggle() {\n return `${prefix}-accordion-item-beingtoggled`;\n }\n\n /**\n * The name of the custom event fired after this accordion item is toggled upon a user gesture.\n */\n static get eventToggle() {\n return `${prefix}-accordion-item-toggled`;\n }\n\n static get selectorAccordionContent() {\n return `.${prefix}--accordion__content`;\n }\n\n static styles = styles;\n}\n\nexport default CDSAccordionItem;\n"],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;AAKG;AAgBH;;;;;AAKG;AACH,MAAM,aAAa,GAAG,CAAC,QAAwB,EAAE,IAAa,KAAI;IAChE,IAAI,CAAC,IAAI,EAAE;AACT,QAAA,OAAO,IAAI;IACb;AACA,IAAA,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;IACtB,OAAO;QACL,OAAO,GAAA;AACL,YAAA,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;AACxB,YAAA,OAAO,IAAI;QACb,CAAC;KACQ;AACb,CAAC;AAED;;;;;;;;;;AAUG;AAEH,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU,CAAC,UAAU,CAAC,CAAA;AAArD,IAAA,WAAA,GAAA;;AAME;;AAEG;QACK,IAAA,CAAA,eAAe,GAAkB,IAAI;AAwD7C;;AAEG;AACK,QAAA,IAAA,CAAA,qBAAqB,GAAG,CAAC,EAAE,GAAG,EAAiB,KAAI;AACzD,YAAA,IAAI,IAAI,CAAC,IAAI,KAAK,G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AAG;SACxC;IACH;AAEA;;;AAGG;AACH,IAAA,WAAW,iBAAiB,GAAA;QAC1B,OAAO,CAAA,EAAG,MAAM,CAAA,4BAAA,CAA8B;IAChD;AAEA;;AAEG;AACH,IAAA,WAAW,WAAW,GAAA;QACpB,OAAO,CAAA,EAAG,MAAM,CAAA,uBAAA,CAAyB;IAC3C;AAEA,IAAA,WAAW,wBAAwB,GAAA;QACjC,OAAO,CAAA,CAAA,EAAI,MAAM,CAAA,oBAAA,CAAsB;IACzC;;AAEO,gBAAA,CAAA,MAAM,GAAG,MAAH;AArHb,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACzB,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAMjB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC7B,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAMb,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE;AACrB,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AA9GP,gBAAgB,GAAA,UAAA,CAAA;AADrB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,eAAA,CAAiB;AACnC,CAAA,EAAA,gBAAgB,CAwNrB;AAED,yBAAe,gBAAgB;;;;"}
1
+ {"version":3,"file":"accordion-item.js","sources":["../../../src/components/accordion/accordion-item.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2019, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { classMap } from 'lit/directives/class-map.js';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport ChevronRight16 from '@carbon/icons/es/chevron--right/16.js';\nimport { iconLoader } from '../../globals/internal/icon-loader';\nimport FocusMixin from '../../globals/mixins/focus';\nimport Handle from '../../globals/internal/handle';\nimport { ACCORDION_ITEM_BREAKPOINT } from './defs';\nimport styles from './accordion.scss?lit';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nexport { ACCORDION_ITEM_BREAKPOINT };\n\n/**\n * Observes resize of the given element with the given resize observer.\n *\n * @param observer The resize observer.\n * @param elem The element to observe the resize.\n */\nconst observeResize = (observer: ResizeObserver, elem: Element) => {\n if (!elem) {\n return null;\n }\n observer.observe(elem);\n return {\n release() {\n observer.unobserve(elem);\n return null;\n },\n } as Handle;\n};\n\n/**\n * Accordion item.\n *\n * @element cds-custom-accordion-item\n * @fires cds-custom-accordion-item-beingtoggled\n * The custom event fired before this accordion item is being toggled upon a user gesture.\n * Cancellation of this event stops the user-initiated action of toggling this accordion item.\n * @fires cds-custom-accordion-item-toggled - The custom event fired after this accordion item is toggled upon a user gesture.\n * @csspart title The title.\n * @csspart content The content.\n */\n@customElement(`${prefix}-accordion-item`)\nclass CDSAccordionItem extends FocusMixin(LitElement) {\n /**\n * The current breakpoint.\n */\n private _currentBreakpoint?: ACCORDION_ITEM_BREAKPOINT;\n\n /**\n * The handle for observing resize of the parent element of this element.\n */\n private _hObserveResize: Handle | null = null;\n\n /**\n * Handles user-initiated toggle request of this accordion item.\n *\n * @param open The new open state.\n */\n private _handleUserInitiatedToggle(open = !this.open) {\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n open,\n },\n };\n if (\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSAccordionItem).eventBeforeToggle,\n init\n )\n )\n ) {\n const { selectorAccordionContent } = this\n .constructor as typeof CDSAccordionItem;\n\n if (!this.open) {\n this.setAttribute('expanding', '');\n } else {\n this.setAttribute('collapsing', '');\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n this.shadowRoot!.querySelector(\n selectorAccordionContent\n )!.addEventListener('animationend', () => {\n this.removeAttribute('expanding');\n this.removeAttribute('collapsing');\n });\n\n this.open = open;\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSAccordionItem).eventToggle,\n init\n )\n );\n }\n }\n\n /**\n * Handler for the `click` event on the expando button.\n */\n private _handleClickExpando() {\n this._handleUserInitiatedToggle();\n }\n\n /**\n * Handler for the `keydown` event on the expando button.\n */\n private _handleKeydownExpando = ({ key }: KeyboardEvent) => {\n if (this.open && (key === 'Esc' || key === 'Escape')) {\n this._handleUserInitiatedToggle(false);\n }\n };\n\n /**\n * The `ResizeObserver` instance for observing element resizes for re-positioning floating menu position.\n */\n // TODO: Wait for `.d.ts` update to support `ResizeObserver`\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452\n // @ts-ignore\n private _resizeObserver = new ResizeObserver(\n (records: ResizeObserverEntry[]) => {\n const { width } = records[records.length - 1].contentRect;\n const { _sizesBreakpoints: sizesBreakpoints } = this\n .constructor as typeof CDSAccordionItem;\n this._currentBreakpoint = Object.keys(sizesBreakpoints)\n .sort((lhs, rhs) => sizesBreakpoints[rhs] - sizesBreakpoints[lhs])\n .find(\n (size) => width >= sizesBreakpoints[size]\n ) as ACCORDION_ITEM_BREAKPOINT;\n this.requestUpdate();\n }\n );\n\n /**\n * `true` if the accordion item should be disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * `true` if the accordion item should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * The title text.\n */\n @property({ attribute: 'title' })\n title = '';\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n super.connectedCallback();\n if (this._hObserveResize) {\n this._hObserveResize = this._hObserveResize.release();\n }\n this._hObserveResize = observeResize(this._resizeObserver, this);\n }\n\n disconnectedCallback() {\n if (this._hObserveResize) {\n this._hObserveResize = this._hObserveResize.release();\n }\n }\n\n render() {\n const {\n disabled,\n title,\n open,\n _currentBreakpoint: currentBreakpoint,\n _handleClickExpando: handleClickExpando,\n _handleKeydownExpando: handleKeydownExpando,\n } = this;\n const { _classesBreakpoints: classesBreakpoints } = this\n .constructor as typeof CDSAccordionItem;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n const { [currentBreakpoint!]: classBreakpoint } = classesBreakpoints;\n const contentClasses = classMap({\n [classBreakpoint]: classBreakpoint,\n [`${prefix}--accordion__content`]: true,\n });\n return html`\n <button\n ?disabled=\"${disabled}\"\n type=\"button\"\n part=\"expando\"\n class=\"${prefix}--accordion__heading\"\n aria-controls=\"content\"\n aria-expanded=\"${open}\"\n @click=\"${handleClickExpando}\"\n @keydown=\"${handleKeydownExpando}\">\n ${iconLoader(ChevronRight16, {\n part: 'expando-icon',\n class: `${prefix}--accordion__arrow`,\n })}\n <div part=\"title\" class=\"${prefix}--accordion__title\">\n <slot name=\"title\">${title}</slot>\n </div>\n </button>\n <div class=\"${prefix}--accordion__wrapper\" part=\"wrapper\">\n <div id=\"content\" part=\"content\" class=\"${contentClasses}\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n\n /**\n * The CSS classes for breakpoints.\n *\n * @private\n */\n static get _classesBreakpoints() {\n return {\n [ACCORDION_ITEM_BREAKPOINT.SMALL]: `${prefix}-ce--accordion__content--${ACCORDION_ITEM_BREAKPOINT.SMALL}`,\n [ACCORDION_ITEM_BREAKPOINT.MEDIUM]: `${prefix}-ce--accordion__content--${ACCORDION_ITEM_BREAKPOINT.MEDIUM}`,\n };\n }\n\n /**\n * The breakpoints.\n *\n * @private\n */\n static get _sizesBreakpoints() {\n return {\n [ACCORDION_ITEM_BREAKPOINT.SMALL]: 480,\n [ACCORDION_ITEM_BREAKPOINT.MEDIUM]: 640,\n };\n }\n\n /**\n * The name of the custom event fired before this accordion item is being toggled upon a user gesture.\n * Cancellation of this event stops the user-initiated action of toggling this accordion item.\n */\n static get eventBeforeToggle() {\n return `${prefix}-accordion-item-beingtoggled`;\n }\n\n /**\n * The name of the custom event fired after this accordion item is toggled upon a user gesture.\n */\n static get eventToggle() {\n return `${prefix}-accordion-item-toggled`;\n }\n\n static get selectorAccordionContent() {\n return `.${prefix}--accordion__content`;\n }\n\n static styles = styles;\n}\n\nexport default CDSAccordionItem;\n"],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;AAKG;AAgBH;;;;;AAKG;AACH,MAAM,aAAa,GAAG,CAAC,QAAwB,EAAE,IAAa,KAAI;IAChE,IAAI,CAAC,IAAI,EAAE;AACT,QAAA,OAAO,IAAI;IACb;AACA,IAAA,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;IACtB,OAAO;QACL,OAAO,GAAA;AACL,YAAA,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;AACxB,YAAA,OAAO,IAAI;QACb,CAAC;KACQ;AACb,CAAC;AAED;;;;;;;;;;AAUG;AAEH,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU,CAAC,UAAU,CAAC,CAAA;AAArD,IAAA,WAAA,GAAA;;AAME;;AAEG;QACK,IAAA,CAAA,eAAe,GAAkB,IAAI;AAyD7C;;AAEG;AACK,QAAA,IAAA,CAAA,qBAAqB,GAAG,CAAC,EAAE,GAAG,EAAiB,KAAI;AACzD,YAAA,IAAI,IAAI,CAAC,IAAI,KAAK,GAAG,KAAK,KAAK,IAAI,GAAG,KAAK,QAAQ,CAAC,EAAE;AACpD,gBAAA,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC;YACxC;AACF,QAAA,CAAC;AAED;;AAEG;;;;AAIK,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,cAAc,CAC1C,CAAC,OAA8B,KAAI;AACjC,YAAA,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CA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wB,GAAA;QACjC,OAAO,CAAA,CAAA,EAAI,MAAM,CAAA,oBAAA,CAAsB;IACzC;;AAEO,gBAAA,CAAA,MAAM,GAAG,MAAH;AArHb,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACzB,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAMjB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC7B,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAMb,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE;AACrB,CAAA,EAAA,gBAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AA/GP,gBAAgB,GAAA,UAAA,CAAA;AADrB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,eAAA,CAAiB;AACnC,CAAA,EAAA,gBAAgB,CAyNrB;AAED,yBAAe,gBAAgB;;;;"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2019, 2025
2
+ * Copyright IBM Corp. 2019, 2026
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -21,7 +21,7 @@ import { carbonElement } from '../../globals/decorators/carbon-element.js';
21
21
  import { ACCORDION_ALIGNMENT } from './defs.js';
22
22
 
23
23
  /**
24
- * Copyright IBM Corp. 2019, 2025
24
+ * Copyright IBM Corp. 2019, 2026
25
25
  *
26
26
  * This source code is licensed under the Apache-2.0 license found in the
27
27
  * LICENSE file in the root directory of this source tree.
@@ -66,10 +66,12 @@ let CDSAccordionSkeleton = class CDSAccordionSkeleton extends LitElement {
66
66
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452
67
67
  this.shadowRoot.querySelectorAll(this.constructor
68
68
  .selectorAccordionItemSkeletons), (elem) => {
69
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20452
70
- this.isFlush && this.alignment !== 'start'
71
- ? elem.setAttribute('isFlush', '')
72
- : elem.removeAttribute('isFlush');
69
+ if (this.isFlush && this.alignment !== 'start') {
70
+ elem.setAttribute('isFlush', '');
71
+ }
72
+ else {
73
+ elem.removeAttribute('isFlush');
74
+ }
73
75
  });
74
76
  }
75
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"accordion-skeleton.js","sources":["../../../src/components/accordion/accordion-skeleton.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2019, 2025\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { classMap } from 'lit/directives/class-map.js';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport { ACCORDION_ALIGNMENT } from './accordion';\nimport { forEach } from '../../globals/internal/collection-helpers';\nimport ChevronRight16 from '@carbon/icons/es/chevron--right/16.js';\nimport { iconLoader } from '../../globals/internal/icon-loader';\nimport './accordion-item-skeleton';\nimport '../skeleton-text/index';\nimport styles from './accordion.scss?lit';\n\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\n/**\n * Skeleton of code snippet.\n */\n@customElement(`${prefix}-accordion-skeleton`)\nclass CDSAccordionSkeleton extends LitElement {\n /**\n * Specify the alignment of the accordion heading title and chevron\n */\n @property({ reflect: true })\n alignment = ACCORDION_ALIGNMENT.END;\n\n /**\n * Set number of items to render\n */\n @property({ type: Number, attribute: 'count' })\n count = 4;\n\n /**\n * Specify whether Accordion text should be flush, default is false, does not work with align=\"start\"\n */\n @property({ type: Boolean, reflect: true })\n isFlush = false;\n\n /**\n * `true` if the first accordion item should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = true;\n\n updated(changedProperties) {\n if (changedProperties.has('alignment')) {\n // Propagate `alignment` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n this.shadowRoot!.querySelectorAll(\n (this.constructor as typeof CDSAccordionSkeleton)\n .selectorAccordionItemSkeletons\n ),\n (elem) => {\n elem.setAttribute('alignment', this.alignment);\n }\n );\n }\n if (\n changedProperties.has('isFlush') ||\n changedProperties.has('alignment')\n ) {\n // Propagate `isFlush` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n this.shadowRoot!.querySelectorAll(\n (this.constructor as typeof CDSAccordionSkeleton)\n .selectorAccordionItemSkeletons\n ),\n (elem) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20452\n this.isFlush && this.alignment !== 'start'\n ? elem.setAttribute('isFlush', '')\n : elem.removeAttribute('isFlush');\n }\n );\n }\n }\n\n render() {\n const classes = classMap({\n [`${prefix}--accordion__item`]: true,\n [`${prefix}--accordion__item--active`]: true,\n [`${prefix}--accordion--${this.alignment}`]: this.alignment,\n [`${prefix}--accordion--flush`]:\n this.isFlush && this.alignment !== 'start',\n });\n const numSkeletonItems = this.open ? this.count - 1 : this.count;\n return html`\n ${this.open\n ? html`\n <li class=\"${classes}\">\n <span class=\"${prefix}--accordion__heading\">\n ${iconLoader(ChevronRight16, {\n class: `${prefix}--accordion__arrow`,\n part: 'expando-icon',\n })}\n <cds-custom-skeleton-text\n class=\"${prefix}--accordion__title\"></cds-custom-skeleton-text>\n </span>\n <div class=\"${prefix}--accordion__content\">\n <cds-custom-skeleton-text width=\"90%\"></cds-custom-skeleton-text>\n <cds-custom-skeleton-text width=\"80%\"></cds-custom-skeleton-text>\n <cds-custom-skeleton-text width=\"95%\"></cds-custom-skeleton-text>\n </div>\n </li>\n `\n : ``}\n ${Array.from({ length: numSkeletonItems }).map(\n (_, i, arr) =>\n html`<cds-custom-accordion-item-skeleton\n key=${i}\n ?data-last-item=${i ===\n arr.length - 1}></cds-custom-accordion-item-skeleton>`\n )}\n `;\n }\n\n static get selectorAccordionItemSkeletons() {\n return `${prefix}-accordion-item-skeleton`;\n }\n\n static styles = styles;\n}\n\nexport default CDSAccordionSkeleton;\n"],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAKG;AAgBH;;AAEG;AAEH,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU,CAAA;AAA7C,IAAA,WAAA,GAAA;;AACE;;AAEG;AAEH,QAAA,IAAA,CAAA,SAAS,GAAG,mBAAmB,CAAC,GAAG;AAEnC;;AAEG;QAEH,IAAA,CAAA,KAAK,GAAG,CAAC;AAET;;AAEG;QAEH,IAAA,CAAA,OAAO,GAAG,KAAK;AAEf;;AAEG;QAEH,IAAA,CAAA,IAAI,GAAG,IAAI;IAiFb;AA/EE,IAAA,OAAO,CAAC,iBAAiB,EAAA;AACvB,QAAA,IAAI,iBAAiB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;;YAEtC,OAAO;;AAEL,YAAA,IAAI,CAAC,UAAW,CAAC,gBAAgB,CAC9B,IAAI,CAAC;AACH,iBAAA,8BAA8B,CAClC,EACD,CAAC,IAAI,KAAI;gBACP,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC;AAChD,YAAA,CAAC,CACF;QACH;AACA,QAAA,IACE,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC;AAChC,YAAA,iBAAiB,CAAC,GAAG,CAAC,WAAW,CAAC,EAClC;;YAEA,OAAO;;AAEL,YAAA,IAAI,CAAC,UAAW,CAAC,gBAAgB,CAC9B,IAAI,CAAC;AACH,iBAAA,8BAA8B,CAClC,EACD,CAAC,IAAI,KAAI;;AAEP,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ACnB,YAAA,GAAG,CAAC,MAAM,GAAG,CAAC,iCAAiC,CACpD;KACF;IACH;AAEA,IAAA,WAAW,8BAA8B,GAAA;QACvC,OAAO,CAAA,EAAG,MAAM,CAAA,wBAAA,CAA0B;IAC5C;;AAEO,oBAAA,CAAA,MAAM,GAAG,MAAH;AAlGb,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;AACS,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAMpC,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE;AACpC,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAMV,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC1B,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAMhB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC9B,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAvBR,oBAAoB,GAAA,UAAA,CAAA;AADzB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,mBAAA,CAAqB;AACvC,CAAA,EAAA,oBAAoB,CAwGzB;AAED,6BAAe,oBAAoB;;;;"}
1
+ {"version":3,"file":"accordion-skeleton.js","sources":["../../../src/components/accordion/accordion-skeleton.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2019, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { classMap } from 'lit/directives/class-map.js';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport { ACCORDION_ALIGNMENT } from './accordion';\nimport { forEach } from '../../globals/internal/collection-helpers';\nimport ChevronRight16 from '@carbon/icons/es/chevron--right/16.js';\nimport { iconLoader } from '../../globals/internal/icon-loader';\nimport './accordion-item-skeleton';\nimport '../skeleton-text/index';\nimport styles from './accordion.scss?lit';\n\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\n/**\n * Skeleton of code snippet.\n */\n@customElement(`${prefix}-accordion-skeleton`)\nclass CDSAccordionSkeleton extends LitElement {\n /**\n * Specify the alignment of the accordion heading title and chevron\n */\n @property({ reflect: true })\n alignment = ACCORDION_ALIGNMENT.END;\n\n /**\n * Set number of items to render\n */\n @property({ type: Number, attribute: 'count' })\n count = 4;\n\n /**\n * Specify whether Accordion text should be flush, default is false, does not work with align=\"start\"\n */\n @property({ type: Boolean, reflect: true })\n isFlush = false;\n\n /**\n * `true` if the first accordion item should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = true;\n\n updated(changedProperties) {\n if (changedProperties.has('alignment')) {\n // Propagate `alignment` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n this.shadowRoot!.querySelectorAll(\n (this.constructor as typeof CDSAccordionSkeleton)\n .selectorAccordionItemSkeletons\n ),\n (elem) => {\n elem.setAttribute('alignment', this.alignment);\n }\n );\n }\n if (\n changedProperties.has('isFlush') ||\n changedProperties.has('alignment')\n ) {\n // Propagate `isFlush` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452\n this.shadowRoot!.querySelectorAll(\n (this.constructor as typeof CDSAccordionSkeleton)\n .selectorAccordionItemSkeletons\n ),\n (elem) => {\n if (this.isFlush && this.alignment !== 'start') {\n elem.setAttribute('isFlush', '');\n } else {\n elem.removeAttribute('isFlush');\n }\n }\n );\n }\n }\n\n render() {\n const classes = classMap({\n [`${prefix}--accordion__item`]: true,\n [`${prefix}--accordion__item--active`]: true,\n [`${prefix}--accordion--${this.alignment}`]: this.alignment,\n [`${prefix}--accordion--flush`]:\n this.isFlush && this.alignment !== 'start',\n });\n const numSkeletonItems = this.open ? this.count - 1 : this.count;\n return html`\n ${this.open\n ? html`\n <li class=\"${classes}\">\n <span class=\"${prefix}--accordion__heading\">\n ${iconLoader(ChevronRight16, {\n class: `${prefix}--accordion__arrow`,\n part: 'expando-icon',\n })}\n <cds-custom-skeleton-text\n class=\"${prefix}--accordion__title\"></cds-custom-skeleton-text>\n </span>\n <div class=\"${prefix}--accordion__content\">\n <cds-custom-skeleton-text width=\"90%\"></cds-custom-skeleton-text>\n <cds-custom-skeleton-text width=\"80%\"></cds-custom-skeleton-text>\n <cds-custom-skeleton-text width=\"95%\"></cds-custom-skeleton-text>\n </div>\n </li>\n `\n : ``}\n ${Array.from({ length: numSkeletonItems }).map(\n (_, i, arr) =>\n html`<cds-custom-accordion-item-skeleton\n key=${i}\n ?data-last-item=${i ===\n arr.length - 1}></cds-custom-accordion-item-skeleton>`\n )}\n `;\n }\n\n static get selectorAccordionItemSkeletons() {\n return `${prefix}-accordion-item-skeleton`;\n }\n\n static styles = styles;\n}\n\nexport default CDSAccordionSkeleton;\n"],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAKG;AAgBH;;AAEG;AAEH,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU,CAAA;AAA7C,IAAA,WAAA,GAAA;;AACE;;AAEG;AAEH,QAAA,IAAA,CAAA,SAAS,GAAG,mBAAmB,CAAC,GAAG;AAEnC;;AAEG;QAEH,IAAA,CAAA,KAAK,GAAG,CAAC;AAET;;AAEG;QAEH,IAAA,CAAA,OAAO,GAAG,KAAK;AAEf;;AAEG;QAEH,IAAA,CAAA,IAAI,GAAG,IAAI;IAkFb;AAhFE,IAAA,OAAO,CAAC,iBAA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AAMhB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC9B,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAvBR,oBAAoB,GAAA,UAAA,CAAA;AADzB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,mBAAA,CAAqB;AACvC,CAAA,EAAA,oBAAoB,CAyGzB;AAED,6BAAe,oBAAoB;;;;"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2019, 2025
2
+ * Copyright IBM Corp. 2019, 2026
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -15,7 +15,7 @@ import styles from './accordion.scss.js';
15
15
  import { carbonElement } from '../../globals/decorators/carbon-element.js';
16
16
 
17
17
  /**
18
- * Copyright IBM Corp. 2019, 2025
18
+ * Copyright IBM Corp. 2019, 2026
19
19
  *
20
20
  * This source code is licensed under the Apache-2.0 license found in the
21
21
  * LICENSE file in the root directory of this source tree.
@@ -68,10 +68,12 @@ let CDSAccordion = class CDSAccordion extends LitElement {
68
68
  changedProperties.has('alignment')) {
69
69
  // Propagate `isFlush` attribute to descendants until `:host-context()` gets supported in all major browsers
70
70
  forEach(this.querySelectorAll(this.constructor.selectorAccordionItems), (elem) => {
71
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20452
72
- this.isFlush && this.alignment !== 'start'
73
- ? elem.setAttribute('isFlush', '')
74
- : elem.removeAttribute('isFlush');
71
+ if (this.isFlush && this.alignment !== 'start') {
72
+ elem.setAttribute('isFlush', '');
73
+ }
74
+ else {
75
+ elem.removeAttribute('isFlush');
76
+ }
75
77
  });
76
78
  }
77
79
  if (changedProperties.has('disabled')) {
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.js","sources":["../../../src/components/accordion/accordion.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2019, 2025\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport { forEach } from '../../globals/internal/collection-helpers';\nimport { ACCORDION_SIZE, ACCORDION_ALIGNMENT } from './defs';\nimport styles from './accordion.scss?lit';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nexport { ACCORDION_SIZE, ACCORDION_ALIGNMENT };\n\n/**\n * Accordion container.\n *\n * @element cds-custom-accordion\n */\n@customElement(`${prefix}-accordion`)\nclass CDSAccordion extends LitElement {\n /**\n * Accordion size should be sm, md, lg.\n */\n @property({ reflect: true })\n size = ACCORDION_SIZE.MEDIUM;\n\n /**\n * Specify the alignment of the accordion heading title and chevron\n */\n @property({ reflect: true })\n alignment = ACCORDION_ALIGNMENT.END;\n\n /**\n * Specify whether Accordion text should be flush, default is false, does not work with align=\"start\"\n */\n @property({ type: Boolean, reflect: true })\n isFlush = false;\n\n /**\n * Disable all accordion items inside this accordion.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'list');\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n if (changedProperties.has('size')) {\n // Propagate `size` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n ),\n (elem) => {\n elem.setAttribute('size', this.size);\n }\n );\n }\n if (changedProperties.has('alignment')) {\n // Propagate `alignment` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n ),\n (elem) => {\n elem.setAttribute('alignment', this.alignment);\n }\n );\n }\n if (\n changedProperties.has('isFlush') ||\n changedProperties.has('alignment')\n ) {\n // Propagate `isFlush` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n ),\n (elem) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20452\n this.isFlush && this.alignment !== 'start'\n ? elem.setAttribute('isFlush', '')\n : elem.removeAttribute('isFlush');\n }\n );\n }\n\n if (changedProperties.has('disabled')) {\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n ),\n (elem) => {\n if (this.disabled) {\n elem.setAttribute('disabled', '');\n } else {\n elem.removeAttribute('disabled');\n }\n }\n );\n }\n\n // Marks the last accordion item for styling (simulates :last-child in Shadow DOM)\n const items = Array.from(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n )\n );\n items.forEach((item) => item.removeAttribute('data-last-item'));\n\n const lastVisible = items\n .reverse()\n .find((item) => !(item as HTMLElement).hidden);\n lastVisible?.setAttribute('data-last-item', '');\n }\n\n render() {\n return html` <slot></slot> `;\n }\n\n static get selectorAccordionItems() {\n return `${prefix}-accordion-item`;\n }\n\n static styles = styles;\n}\n\nexport default CDSAccordion;\n"],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;AAKG;AAYH;;;;AAIG;AAEH,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU,CAAA;AAArC,IAAA,WAAA,GAAA;;AACE;;AAEG;AAEH,QAAA,IAAA,CAAA,IAAI,GAAG,cAAc,CAAC,MAAM;AAE5B;;AAEG;AAEH,QAAA,IAAA,CAAA,SAAS,GAAG,mBAAmB,CAAC,GAAG;AAEnC;;AAEG;QAEH,IAAA,CAAA,OAAO,GAAG,KAAK;AAEf;;AAEG;QAEH,IAAA,CAAA,QAAQ,GAAG,KAAK;IAwFlB;IAtFE,iBAAiB,GAAA;QACf,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;AAC9B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AAO,EAAE,IAAI,EAAE;AAC1B,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAMhB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACzB,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAvBb,YAAY,GAAA,UAAA,CAAA;AADjB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,UAAA,CAAY;AAC9B,CAAA,EAAA,YAAY,CA+GjB;AAED,qBAAe,YAAY;;;;"}
1
+ {"version":3,"file":"accordion.js","sources":["../../../src/components/accordion/accordion.ts"],"sourcesContent":["/**\n * Copyright IBM Corp. 2019, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport { forEach } from '../../globals/internal/collection-helpers';\nimport { ACCORDION_SIZE, ACCORDION_ALIGNMENT } from './defs';\nimport styles from './accordion.scss?lit';\nimport { carbonElement as customElement } from '../../globals/decorators/carbon-element';\n\nexport { ACCORDION_SIZE, ACCORDION_ALIGNMENT };\n\n/**\n * Accordion container.\n *\n * @element cds-custom-accordion\n */\n@customElement(`${prefix}-accordion`)\nclass CDSAccordion extends LitElement {\n /**\n * Accordion size should be sm, md, lg.\n */\n @property({ reflect: true })\n size = ACCORDION_SIZE.MEDIUM;\n\n /**\n * Specify the alignment of the accordion heading title and chevron\n */\n @property({ reflect: true })\n alignment = ACCORDION_ALIGNMENT.END;\n\n /**\n * Specify whether Accordion text should be flush, default is false, does not work with align=\"start\"\n */\n @property({ type: Boolean, reflect: true })\n isFlush = false;\n\n /**\n * Disable all accordion items inside this accordion.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'list');\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n if (changedProperties.has('size')) {\n // Propagate `size` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n ),\n (elem) => {\n elem.setAttribute('size', this.size);\n }\n );\n }\n if (changedProperties.has('alignment')) {\n // Propagate `alignment` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n ),\n (elem) => {\n elem.setAttribute('alignment', this.alignment);\n }\n );\n }\n if (\n changedProperties.has('isFlush') ||\n changedProperties.has('alignment')\n ) {\n // Propagate `isFlush` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n ),\n (elem) => {\n if (this.isFlush && this.alignment !== 'start') {\n elem.setAttribute('isFlush', '');\n } else {\n elem.removeAttribute('isFlush');\n }\n }\n );\n }\n\n if (changedProperties.has('disabled')) {\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n ),\n (elem) => {\n if (this.disabled) {\n elem.setAttribute('disabled', '');\n } else {\n elem.removeAttribute('disabled');\n }\n }\n );\n }\n\n // Marks the last accordion item for styling (simulates :last-child in Shadow DOM)\n const items = Array.from(\n this.querySelectorAll(\n (this.constructor as typeof CDSAccordion).selectorAccordionItems\n )\n );\n items.forEach((item) => item.removeAttribute('data-last-item'));\n\n const lastVisible = items\n .reverse()\n .find((item) => !(item as HTMLElement).hidden);\n lastVisible?.setAttribute('data-last-item', '');\n }\n\n render() {\n return html` <slot></slot> `;\n }\n\n static get selectorAccordionItems() {\n return `${prefix}-accordion-item`;\n }\n\n static styles = styles;\n}\n\nexport default CDSAccordion;\n"],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;AAKG;AAYH;;;;AAIG;AAEH,IAAM,YAAY,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AC/B,OAAO,CAAA,EAAG,MAAM,CAAA,eAAA,CAAiB;IACnC;;AAEO,YAAA,CAAA,MAAM,GAAG,MAAH;AA1Gb,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;AACE,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAM7B,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;AACS,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAMpC,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC1B,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAMhB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACzB,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAvBb,YAAY,GAAA,UAAA,CAAA;AADjB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,UAAA,CAAY;AAC9B,CAAA,EAAA,YAAY,CAgHjB;AAED,qBAAe,YAAY;;;;"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2019, 2024
2
+ * Copyright IBM Corp. 2019, 2026
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -20,7 +20,7 @@ import { carbonElement } from '../../globals/decorators/carbon-element.js';
20
20
  import { iconLoader } from '../../globals/internal/icon-loader.js';
21
21
 
22
22
  /**
23
- * Copyright IBM Corp. 2019, 2024
23
+ * Copyright IBM Corp. 2019, 2026
24
24
  *
25
25
  * This source code is licensed under the Apache-2.0 license found in the
26
26
  * LICENSE file in the root directory of this source tree.
@@ -135,10 +135,11 @@ let CDSAILabel = class CDSAILabel extends CDSToggleTip {
135
135
  attributeChangedCallback(name, old, newValue) {
136
136
  var _a;
137
137
  super.attributeChangedCallback(name, old, newValue);
138
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
139
- //@ts-ignore typescript does not think requestUpdate() exists on parentElement
140
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20452
141
- name === 'revert-active' ? (_a = this.parentElement) === null || _a === void 0 ? void 0 : _a.requestUpdate() : ``;
138
+ if (name === 'revert-active') {
139
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
140
+ // @ts-ignore typescript does not think requestUpdate() exists on parentElement
141
+ (_a = this.parentElement) === null || _a === void 0 ? void 0 : _a.requestUpdate();
142
+ }
142
143
  }
143
144
  };
144
145
  __decorate([