@carbon/web-components 2.0.0-rc.2 → 2.0.0-rc.4

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 (713) hide show
  1. package/custom-elements.json +267 -52
  2. package/es/components/accordion/accordion-item.d.ts.map +1 -1
  3. package/es/components/accordion/accordion-item.js +3 -2
  4. package/es/components/accordion/accordion-item.js.map +1 -1
  5. package/es/components/accordion/accordion-skeleton.js.map +1 -1
  6. package/es/components/accordion/accordion.css.js +1 -1
  7. package/es/components/accordion/accordion.d.ts.map +1 -1
  8. package/es/components/accordion/accordion.js +2 -1
  9. package/es/components/accordion/accordion.js.map +1 -1
  10. package/es/components/accordion/accordion.rtl.css.js +1 -1
  11. package/es/components/accordion/defs.d.ts +1 -1
  12. package/es/components/accordion/defs.d.ts.map +1 -1
  13. package/es/components/accordion/defs.js +1 -1
  14. package/es/components/accordion/defs.js.map +1 -1
  15. package/es/components/accordion/index.d.ts +1 -1
  16. package/es/components/accordion/index.d.ts.map +1 -1
  17. package/es/components/accordion/index.js +1 -1
  18. package/es/components/accordion/index.js.map +1 -1
  19. package/es/components/breadcrumb/breadcrumb-item.d.ts.map +1 -1
  20. package/es/components/breadcrumb/breadcrumb-item.js +2 -6
  21. package/es/components/breadcrumb/breadcrumb-item.js.map +1 -1
  22. package/es/components/breadcrumb/breadcrumb-link.d.ts.map +1 -1
  23. package/es/components/breadcrumb/breadcrumb-link.js +2 -6
  24. package/es/components/breadcrumb/breadcrumb-link.js.map +1 -1
  25. package/es/components/breadcrumb/breadcrumb-overflow-menu.d.ts.map +1 -1
  26. package/es/components/breadcrumb/breadcrumb-overflow-menu.js +2 -6
  27. package/es/components/breadcrumb/breadcrumb-overflow-menu.js.map +1 -1
  28. package/es/components/breadcrumb/breadcrumb-skeleton.js.map +1 -1
  29. package/es/components/breadcrumb/breadcrumb.css.js +1 -1
  30. package/es/components/breadcrumb/breadcrumb.d.ts.map +1 -1
  31. package/es/components/breadcrumb/breadcrumb.js +3 -6
  32. package/es/components/breadcrumb/breadcrumb.js.map +1 -1
  33. package/es/components/breadcrumb/breadcrumb.rtl.css.js +1 -1
  34. package/es/components/breadcrumb/index.d.ts +1 -1
  35. package/es/components/breadcrumb/index.d.ts.map +1 -1
  36. package/es/components/breadcrumb/index.js +1 -1
  37. package/es/components/breadcrumb/index.js.map +1 -1
  38. package/es/components/button/button-set.js.map +1 -1
  39. package/es/components/button/button-skeleton.d.ts.map +1 -1
  40. package/es/components/button/button-skeleton.js +2 -4
  41. package/es/components/button/button-skeleton.js.map +1 -1
  42. package/es/components/button/button.css.js +1 -1
  43. package/es/components/button/button.d.ts.map +1 -1
  44. package/es/components/button/button.js +4 -2
  45. package/es/components/button/button.js.map +1 -1
  46. package/es/components/button/button.rtl.css.js +1 -1
  47. package/es/components/button/defs.d.ts +1 -1
  48. package/es/components/button/defs.d.ts.map +1 -1
  49. package/es/components/button/defs.js +1 -1
  50. package/es/components/button/defs.js.map +1 -1
  51. package/es/components/button/index.d.ts +1 -1
  52. package/es/components/button/index.d.ts.map +1 -1
  53. package/es/components/button/index.js +1 -1
  54. package/es/components/button/index.js.map +1 -1
  55. package/es/components/checkbox/checkbox.css.js +1 -1
  56. package/es/components/checkbox/checkbox.d.ts.map +1 -1
  57. package/es/components/checkbox/checkbox.js +3 -9
  58. package/es/components/checkbox/checkbox.js.map +1 -1
  59. package/es/components/checkbox/checkbox.rtl.css.js +1 -1
  60. package/es/components/checkbox/index.d.ts +1 -1
  61. package/es/components/checkbox/index.d.ts.map +1 -1
  62. package/es/components/checkbox/index.js +1 -1
  63. package/es/components/checkbox/index.js.map +1 -1
  64. package/es/components/code-snippet/code-snippet-skeleton.d.ts.map +1 -1
  65. package/es/components/code-snippet/code-snippet-skeleton.js +3 -4
  66. package/es/components/code-snippet/code-snippet-skeleton.js.map +1 -1
  67. package/es/components/code-snippet/code-snippet.css.js +1 -1
  68. package/es/components/code-snippet/code-snippet.d.ts.map +1 -1
  69. package/es/components/code-snippet/code-snippet.js +2 -1
  70. package/es/components/code-snippet/code-snippet.js.map +1 -1
  71. package/es/components/code-snippet/code-snippet.rtl.css.js +1 -1
  72. package/es/components/code-snippet/defs.d.ts +1 -1
  73. package/es/components/code-snippet/defs.d.ts.map +1 -1
  74. package/es/components/code-snippet/defs.js +1 -1
  75. package/es/components/code-snippet/defs.js.map +1 -1
  76. package/es/components/code-snippet/index.d.ts +1 -1
  77. package/es/components/code-snippet/index.d.ts.map +1 -1
  78. package/es/components/code-snippet/index.js +1 -1
  79. package/es/components/code-snippet/index.js.map +1 -1
  80. package/es/components/combo-box/combo-box-item.d.ts.map +1 -1
  81. package/es/components/combo-box/combo-box-item.js +2 -6
  82. package/es/components/combo-box/combo-box-item.js.map +1 -1
  83. package/es/components/combo-box/combo-box.css.js +1 -1
  84. package/es/components/combo-box/combo-box.d.ts.map +1 -1
  85. package/es/components/combo-box/combo-box.js +2 -1
  86. package/es/components/combo-box/combo-box.js.map +1 -1
  87. package/es/components/combo-box/combo-box.rtl.css.js +1 -1
  88. package/es/components/combo-box/index.d.ts +1 -1
  89. package/es/components/combo-box/index.d.ts.map +1 -1
  90. package/es/components/combo-box/index.js +1 -1
  91. package/es/components/combo-box/index.js.map +1 -1
  92. package/es/components/content-switcher/content-switcher-item.d.ts.map +1 -1
  93. package/es/components/content-switcher/content-switcher-item.js +3 -6
  94. package/es/components/content-switcher/content-switcher-item.js.map +1 -1
  95. package/es/components/content-switcher/content-switcher.css.js +1 -1
  96. package/es/components/content-switcher/content-switcher.d.ts.map +1 -1
  97. package/es/components/content-switcher/content-switcher.js +2 -1
  98. package/es/components/content-switcher/content-switcher.js.map +1 -1
  99. package/es/components/content-switcher/content-switcher.rtl.css.js +1 -1
  100. package/es/components/content-switcher/defs.d.ts +1 -1
  101. package/es/components/content-switcher/defs.d.ts.map +1 -1
  102. package/es/components/content-switcher/defs.js +1 -1
  103. package/es/components/content-switcher/defs.js.map +1 -1
  104. package/es/components/content-switcher/index.d.ts +1 -1
  105. package/es/components/content-switcher/index.d.ts.map +1 -1
  106. package/es/components/content-switcher/index.js +1 -1
  107. package/es/components/content-switcher/index.js.map +1 -1
  108. package/es/components/copy/copy.js.map +1 -1
  109. package/es/components/copy-button/copy-button.css.js +1 -1
  110. package/es/components/copy-button/copy-button.js.map +1 -1
  111. package/es/components/copy-button/copy-button.rtl.css.js +1 -1
  112. package/es/components/copy-button/index.d.ts +1 -1
  113. package/es/components/copy-button/index.d.ts.map +1 -1
  114. package/es/components/copy-button/index.js +1 -1
  115. package/es/components/copy-button/index.js.map +1 -1
  116. package/es/components/data-table/data-table.css.js +1 -1
  117. package/es/components/data-table/data-table.rtl.css.js +1 -1
  118. package/es/components/data-table/index.d.ts +1 -1
  119. package/es/components/data-table/index.d.ts.map +1 -1
  120. package/es/components/data-table/index.js +1 -1
  121. package/es/components/data-table/index.js.map +1 -1
  122. package/es/components/data-table/table-batch-actions.d.ts.map +1 -1
  123. package/es/components/data-table/table-batch-actions.js +3 -7
  124. package/es/components/data-table/table-batch-actions.js.map +1 -1
  125. package/es/components/data-table/table-body.d.ts.map +1 -1
  126. package/es/components/data-table/table-body.js +3 -6
  127. package/es/components/data-table/table-body.js.map +1 -1
  128. package/es/components/data-table/table-cell.d.ts.map +1 -1
  129. package/es/components/data-table/table-cell.js +3 -7
  130. package/es/components/data-table/table-cell.js.map +1 -1
  131. package/es/components/data-table/table-expanded-row.d.ts.map +1 -1
  132. package/es/components/data-table/table-expanded-row.js +2 -1
  133. package/es/components/data-table/table-expanded-row.js.map +1 -1
  134. package/es/components/data-table/table-head.d.ts.map +1 -1
  135. package/es/components/data-table/table-head.js +2 -6
  136. package/es/components/data-table/table-head.js.map +1 -1
  137. package/es/components/data-table/table-header-cell.d.ts.map +1 -1
  138. package/es/components/data-table/table-header-cell.js +2 -1
  139. package/es/components/data-table/table-header-cell.js.map +1 -1
  140. package/es/components/data-table/table-header-row.d.ts.map +1 -1
  141. package/es/components/data-table/table-header-row.js +1 -1
  142. package/es/components/data-table/table-header-row.js.map +1 -1
  143. package/es/components/data-table/table-row.d.ts.map +1 -1
  144. package/es/components/data-table/table-row.js +3 -2
  145. package/es/components/data-table/table-row.js.map +1 -1
  146. package/es/components/data-table/table-skeleton.js.map +1 -1
  147. package/es/components/data-table/table-toolbar-content.d.ts.map +1 -1
  148. package/es/components/data-table/table-toolbar-content.js +4 -7
  149. package/es/components/data-table/table-toolbar-content.js.map +1 -1
  150. package/es/components/data-table/table-toolbar-search.d.ts.map +1 -1
  151. package/es/components/data-table/table-toolbar-search.js +3 -7
  152. package/es/components/data-table/table-toolbar-search.js.map +1 -1
  153. package/es/components/data-table/table-toolbar.d.ts +0 -8
  154. package/es/components/data-table/table-toolbar.d.ts.map +1 -1
  155. package/es/components/data-table/table-toolbar.js +3 -30
  156. package/es/components/data-table/table-toolbar.js.map +1 -1
  157. package/es/components/data-table/table.d.ts.map +1 -1
  158. package/es/components/data-table/table.js +3 -3
  159. package/es/components/data-table/table.js.map +1 -1
  160. package/es/components/date-picker/append-to-plugin.js.map +1 -1
  161. package/es/components/date-picker/css-class-plugin.js.map +1 -1
  162. package/es/components/date-picker/date-picker-input-skeleton.d.ts.map +1 -1
  163. package/es/components/date-picker/date-picker-input-skeleton.js +3 -4
  164. package/es/components/date-picker/date-picker-input-skeleton.js.map +1 -1
  165. package/es/components/date-picker/date-picker-input.d.ts.map +1 -1
  166. package/es/components/date-picker/date-picker-input.js +2 -1
  167. package/es/components/date-picker/date-picker-input.js.map +1 -1
  168. package/es/components/date-picker/date-picker.css.js +1 -1
  169. package/es/components/date-picker/date-picker.d.ts.map +1 -1
  170. package/es/components/date-picker/date-picker.js +7 -4
  171. package/es/components/date-picker/date-picker.js.map +1 -1
  172. package/es/components/date-picker/date-picker.rtl.css.js +1 -1
  173. package/es/components/date-picker/defs.d.ts +1 -1
  174. package/es/components/date-picker/defs.d.ts.map +1 -1
  175. package/es/components/date-picker/defs.js +1 -1
  176. package/es/components/date-picker/defs.js.map +1 -1
  177. package/es/components/date-picker/fix-events-plugin.js +9 -0
  178. package/es/components/date-picker/fix-events-plugin.js.map +1 -1
  179. package/es/components/date-picker/focus-plugin.d.ts.map +1 -1
  180. package/es/components/date-picker/focus-plugin.js +14 -4
  181. package/es/components/date-picker/focus-plugin.js.map +1 -1
  182. package/es/components/date-picker/icon-plugin.js.map +1 -1
  183. package/es/components/date-picker/index.d.ts +1 -1
  184. package/es/components/date-picker/index.d.ts.map +1 -1
  185. package/es/components/date-picker/index.js +1 -1
  186. package/es/components/date-picker/index.js.map +1 -1
  187. package/es/components/date-picker/iso-date.js.map +1 -1
  188. package/es/components/date-picker/month-select-plugin.js.map +1 -1
  189. package/es/components/date-picker/range-plugin.d.ts +21 -6
  190. package/es/components/date-picker/range-plugin.d.ts.map +1 -1
  191. package/es/components/date-picker/range-plugin.js +51 -17
  192. package/es/components/date-picker/range-plugin.js.map +1 -1
  193. package/es/components/date-picker/shadow-dom-events-plugin.js.map +1 -1
  194. package/es/components/date-picker/state-handshake-plugin.js.map +1 -1
  195. package/es/components/dropdown/defs.d.ts +1 -1
  196. package/es/components/dropdown/defs.d.ts.map +1 -1
  197. package/es/components/dropdown/defs.js +1 -1
  198. package/es/components/dropdown/defs.js.map +1 -1
  199. package/es/components/dropdown/dropdown-item.d.ts.map +1 -1
  200. package/es/components/dropdown/dropdown-item.js +3 -7
  201. package/es/components/dropdown/dropdown-item.js.map +1 -1
  202. package/es/components/dropdown/dropdown-skeleton.d.ts.map +1 -1
  203. package/es/components/dropdown/dropdown-skeleton.js +2 -4
  204. package/es/components/dropdown/dropdown-skeleton.js.map +1 -1
  205. package/es/components/dropdown/dropdown.css.js +1 -1
  206. package/es/components/dropdown/dropdown.d.ts +1 -3
  207. package/es/components/dropdown/dropdown.d.ts.map +1 -1
  208. package/es/components/dropdown/dropdown.js +2 -1
  209. package/es/components/dropdown/dropdown.js.map +1 -1
  210. package/es/components/dropdown/dropdown.rtl.css.js +1 -1
  211. package/es/components/dropdown/index.d.ts +1 -1
  212. package/es/components/dropdown/index.d.ts.map +1 -1
  213. package/es/components/dropdown/index.js +1 -1
  214. package/es/components/dropdown/index.js.map +1 -1
  215. package/es/components/file-uploader/defs.d.ts +1 -1
  216. package/es/components/file-uploader/defs.d.ts.map +1 -1
  217. package/es/components/file-uploader/defs.js +1 -1
  218. package/es/components/file-uploader/defs.js.map +1 -1
  219. package/es/components/file-uploader/demo-file-uploader.js.map +1 -1
  220. package/es/components/file-uploader/file-uploader-button.d.ts.map +1 -1
  221. package/es/components/file-uploader/file-uploader-button.js +1 -0
  222. package/es/components/file-uploader/file-uploader-button.js.map +1 -1
  223. package/es/components/file-uploader/file-uploader-drop-container.d.ts.map +1 -1
  224. package/es/components/file-uploader/file-uploader-drop-container.js +2 -1
  225. package/es/components/file-uploader/file-uploader-drop-container.js.map +1 -1
  226. package/es/components/file-uploader/file-uploader-item.d.ts.map +1 -1
  227. package/es/components/file-uploader/file-uploader-item.js +2 -1
  228. package/es/components/file-uploader/file-uploader-item.js.map +1 -1
  229. package/es/components/file-uploader/file-uploader.css.js +1 -1
  230. package/es/components/file-uploader/file-uploader.d.ts.map +1 -1
  231. package/es/components/file-uploader/file-uploader.js +3 -8
  232. package/es/components/file-uploader/file-uploader.js.map +1 -1
  233. package/es/components/file-uploader/file-uploader.rtl.css.js +1 -1
  234. package/es/components/file-uploader/index.d.ts +1 -1
  235. package/es/components/file-uploader/index.d.ts.map +1 -1
  236. package/es/components/file-uploader/index.js +1 -1
  237. package/es/components/file-uploader/index.js.map +1 -1
  238. package/es/components/floating-menu/defs.d.ts +1 -1
  239. package/es/components/floating-menu/defs.d.ts.map +1 -1
  240. package/es/components/floating-menu/defs.js +1 -1
  241. package/es/components/floating-menu/defs.js.map +1 -1
  242. package/es/components/floating-menu/floating-menu-trigger.d.ts +1 -1
  243. package/es/components/floating-menu/floating-menu-trigger.d.ts.map +1 -1
  244. package/es/components/floating-menu/floating-menu.js +9 -2
  245. package/es/components/floating-menu/floating-menu.js.map +1 -1
  246. package/es/components/floating-menu/index.d.ts +1 -1
  247. package/es/components/floating-menu/index.d.ts.map +1 -1
  248. package/es/components/floating-menu/index.js +1 -1
  249. package/es/components/floating-menu/index.js.map +1 -1
  250. package/es/components/form/form-item.css.js +1 -1
  251. package/es/components/form/form-item.d.ts.map +1 -1
  252. package/es/components/form/form-item.js +2 -6
  253. package/es/components/form/form-item.js.map +1 -1
  254. package/es/components/form/form-item.rtl.css.js +1 -1
  255. package/es/components/form/index.d.ts +1 -1
  256. package/es/components/form/index.d.ts.map +1 -1
  257. package/es/components/form/index.js +1 -1
  258. package/es/components/form/index.js.map +1 -1
  259. package/es/components/form-group/form-group.css.js +1 -1
  260. package/es/components/form-group/form-group.rtl.css.js +1 -1
  261. package/es/components/icon-button/icon-button.css.js +1 -1
  262. package/es/components/icon-button/icon-button.js.map +1 -1
  263. package/es/components/icon-button/icon-button.rtl.css.js +1 -1
  264. package/es/components/inline-loading/defs.d.ts +1 -1
  265. package/es/components/inline-loading/defs.d.ts.map +1 -1
  266. package/es/components/inline-loading/defs.js +1 -1
  267. package/es/components/inline-loading/defs.js.map +1 -1
  268. package/es/components/inline-loading/index.d.ts +1 -1
  269. package/es/components/inline-loading/index.d.ts.map +1 -1
  270. package/es/components/inline-loading/index.js +1 -1
  271. package/es/components/inline-loading/index.js.map +1 -1
  272. package/es/components/inline-loading/inline-loading.css.js +1 -1
  273. package/es/components/inline-loading/inline-loading.d.ts.map +1 -1
  274. package/es/components/inline-loading/inline-loading.js +2 -1
  275. package/es/components/inline-loading/inline-loading.js.map +1 -1
  276. package/es/components/inline-loading/inline-loading.rtl.css.js +1 -1
  277. package/es/components/layer/layer.js.map +1 -1
  278. package/es/components/link/index.d.ts +1 -1
  279. package/es/components/link/index.d.ts.map +1 -1
  280. package/es/components/link/index.js +1 -1
  281. package/es/components/link/index.js.map +1 -1
  282. package/es/components/link/link.d.ts.map +1 -1
  283. package/es/components/link/link.js +3 -4
  284. package/es/components/link/link.js.map +1 -1
  285. package/es/components/list/index.d.ts +1 -1
  286. package/es/components/list/index.d.ts.map +1 -1
  287. package/es/components/list/index.js +1 -1
  288. package/es/components/list/index.js.map +1 -1
  289. package/es/components/list/list-item.d.ts.map +1 -1
  290. package/es/components/list/list-item.js +3 -7
  291. package/es/components/list/list-item.js.map +1 -1
  292. package/es/components/list/ordered-list.d.ts.map +1 -1
  293. package/es/components/list/ordered-list.js +2 -1
  294. package/es/components/list/ordered-list.js.map +1 -1
  295. package/es/components/list/unordered-list.d.ts.map +1 -1
  296. package/es/components/list/unordered-list.js +3 -4
  297. package/es/components/list/unordered-list.js.map +1 -1
  298. package/es/components/loading/defs.d.ts +1 -1
  299. package/es/components/loading/defs.d.ts.map +1 -1
  300. package/es/components/loading/defs.js +1 -1
  301. package/es/components/loading/defs.js.map +1 -1
  302. package/es/components/loading/index.d.ts +1 -1
  303. package/es/components/loading/index.d.ts.map +1 -1
  304. package/es/components/loading/index.js +1 -1
  305. package/es/components/loading/index.js.map +1 -1
  306. package/es/components/loading/loading.css.js +1 -1
  307. package/es/components/loading/loading.d.ts.map +1 -1
  308. package/es/components/loading/loading.js +3 -6
  309. package/es/components/loading/loading.js.map +1 -1
  310. package/es/components/loading/loading.rtl.css.js +1 -1
  311. package/es/components/loading/types.d.ts +1 -1
  312. package/es/components/loading/types.d.ts.map +1 -1
  313. package/es/components/loading/types.js +1 -1
  314. package/es/components/loading/types.js.map +1 -1
  315. package/es/components/modal/defs.d.ts +1 -1
  316. package/es/components/modal/defs.d.ts.map +1 -1
  317. package/es/components/modal/defs.js +1 -1
  318. package/es/components/modal/defs.js.map +1 -1
  319. package/es/components/modal/index.d.ts +1 -1
  320. package/es/components/modal/index.d.ts.map +1 -1
  321. package/es/components/modal/index.js +1 -1
  322. package/es/components/modal/index.js.map +1 -1
  323. package/es/components/modal/modal-body.d.ts.map +1 -1
  324. package/es/components/modal/modal-body.js +2 -6
  325. package/es/components/modal/modal-body.js.map +1 -1
  326. package/es/components/modal/modal-close-button.d.ts.map +1 -1
  327. package/es/components/modal/modal-close-button.js +3 -8
  328. package/es/components/modal/modal-close-button.js.map +1 -1
  329. package/es/components/modal/modal-footer-button.d.ts.map +1 -1
  330. package/es/components/modal/modal-footer-button.js +2 -6
  331. package/es/components/modal/modal-footer-button.js.map +1 -1
  332. package/es/components/modal/modal-footer.d.ts.map +1 -1
  333. package/es/components/modal/modal-footer.js +3 -6
  334. package/es/components/modal/modal-footer.js.map +1 -1
  335. package/es/components/modal/modal-header.d.ts.map +1 -1
  336. package/es/components/modal/modal-header.js +2 -6
  337. package/es/components/modal/modal-header.js.map +1 -1
  338. package/es/components/modal/modal-heading.d.ts.map +1 -1
  339. package/es/components/modal/modal-heading.js +2 -6
  340. package/es/components/modal/modal-heading.js.map +1 -1
  341. package/es/components/modal/modal-label.d.ts.map +1 -1
  342. package/es/components/modal/modal-label.js +2 -6
  343. package/es/components/modal/modal-label.js.map +1 -1
  344. package/es/components/modal/modal.css.js +1 -1
  345. package/es/components/modal/modal.d.ts.map +1 -1
  346. package/es/components/modal/modal.js +2 -1
  347. package/es/components/modal/modal.js.map +1 -1
  348. package/es/components/modal/modal.rtl.css.js +1 -1
  349. package/es/components/multi-select/multi-select-item.d.ts.map +1 -1
  350. package/es/components/multi-select/multi-select-item.js +3 -6
  351. package/es/components/multi-select/multi-select-item.js.map +1 -1
  352. package/es/components/multi-select/multi-select.css.js +1 -1
  353. package/es/components/multi-select/multi-select.d.ts.map +1 -1
  354. package/es/components/multi-select/multi-select.js +2 -1
  355. package/es/components/multi-select/multi-select.js.map +1 -1
  356. package/es/components/multi-select/multi-select.rtl.css.js +1 -1
  357. package/es/components/notification/actionable-notification-button.js.map +1 -1
  358. package/es/components/notification/actionable-notification.css.js +1 -1
  359. package/es/components/notification/actionable-notification.js.map +1 -1
  360. package/es/components/notification/actionable-notification.rtl.css.js +1 -1
  361. package/es/components/notification/inline-notification.css.js +1 -1
  362. package/es/components/notification/inline-notification.d.ts.map +1 -1
  363. package/es/components/notification/inline-notification.js +2 -1
  364. package/es/components/notification/inline-notification.js.map +1 -1
  365. package/es/components/notification/inline-notification.rtl.css.js +1 -1
  366. package/es/components/notification/toast-notification.css.js +1 -1
  367. package/es/components/notification/toast-notification.d.ts.map +1 -1
  368. package/es/components/notification/toast-notification.js +2 -1
  369. package/es/components/notification/toast-notification.js.map +1 -1
  370. package/es/components/notification/toast-notification.rtl.css.js +1 -1
  371. package/es/components/number-input/number-input-skeleton.d.ts.map +1 -1
  372. package/es/components/number-input/number-input-skeleton.js +3 -4
  373. package/es/components/number-input/number-input-skeleton.js.map +1 -1
  374. package/es/components/number-input/number-input.css.js +1 -1
  375. package/es/components/number-input/number-input.d.ts.map +1 -1
  376. package/es/components/number-input/number-input.js +2 -1
  377. package/es/components/number-input/number-input.js.map +1 -1
  378. package/es/components/number-input/number-input.rtl.css.js +1 -1
  379. package/es/components/overflow-menu/overflow-menu-body.d.ts.map +1 -1
  380. package/es/components/overflow-menu/overflow-menu-body.js +2 -1
  381. package/es/components/overflow-menu/overflow-menu-body.js.map +1 -1
  382. package/es/components/overflow-menu/overflow-menu-item.d.ts.map +1 -1
  383. package/es/components/overflow-menu/overflow-menu-item.js +2 -1
  384. package/es/components/overflow-menu/overflow-menu-item.js.map +1 -1
  385. package/es/components/overflow-menu/overflow-menu.css.js +1 -1
  386. package/es/components/overflow-menu/overflow-menu.d.ts.map +1 -1
  387. package/es/components/overflow-menu/overflow-menu.js +2 -4
  388. package/es/components/overflow-menu/overflow-menu.js.map +1 -1
  389. package/es/components/overflow-menu/overflow-menu.rtl.css.js +1 -1
  390. package/es/components/pagination/pagination.css.js +1 -1
  391. package/es/components/pagination/pagination.d.ts.map +1 -1
  392. package/es/components/pagination/pagination.js +12 -6
  393. package/es/components/pagination/pagination.js.map +1 -1
  394. package/es/components/pagination/pagination.rtl.css.js +1 -1
  395. package/es/components/popover/popover.css.js +1 -1
  396. package/es/components/popover/popover.js.map +1 -1
  397. package/es/components/popover/popover.rtl.css.js +1 -1
  398. package/es/components/progress-bar/progress-bar.css.js +1 -1
  399. package/es/components/progress-bar/progress-bar.js.map +1 -1
  400. package/es/components/progress-bar/progress-bar.rtl.css.js +1 -1
  401. package/es/components/progress-indicator/progress-indicator-skeleton.d.ts.map +1 -1
  402. package/es/components/progress-indicator/progress-indicator-skeleton.js +3 -4
  403. package/es/components/progress-indicator/progress-indicator-skeleton.js.map +1 -1
  404. package/es/components/progress-indicator/progress-indicator.css.js +1 -1
  405. package/es/components/progress-indicator/progress-indicator.d.ts.map +1 -1
  406. package/es/components/progress-indicator/progress-indicator.js +3 -6
  407. package/es/components/progress-indicator/progress-indicator.js.map +1 -1
  408. package/es/components/progress-indicator/progress-indicator.rtl.css.js +1 -1
  409. package/es/components/progress-indicator/progress-step-skeleton.d.ts.map +1 -1
  410. package/es/components/progress-indicator/progress-step-skeleton.js +3 -2
  411. package/es/components/progress-indicator/progress-step-skeleton.js.map +1 -1
  412. package/es/components/progress-indicator/progress-step.d.ts.map +1 -1
  413. package/es/components/progress-indicator/progress-step.js +2 -1
  414. package/es/components/progress-indicator/progress-step.js.map +1 -1
  415. package/es/components/radio-button/radio-button-group.d.ts +23 -1
  416. package/es/components/radio-button/radio-button-group.d.ts.map +1 -1
  417. package/es/components/radio-button/radio-button-group.js +111 -11
  418. package/es/components/radio-button/radio-button-group.js.map +1 -1
  419. package/es/components/radio-button/radio-button-skeleton.d.ts.map +1 -1
  420. package/es/components/radio-button/radio-button-skeleton.js +2 -4
  421. package/es/components/radio-button/radio-button-skeleton.js.map +1 -1
  422. package/es/components/radio-button/radio-button.css.js +1 -1
  423. package/es/components/radio-button/radio-button.d.ts +4 -0
  424. package/es/components/radio-button/radio-button.d.ts.map +1 -1
  425. package/es/components/radio-button/radio-button.js +20 -1
  426. package/es/components/radio-button/radio-button.js.map +1 -1
  427. package/es/components/radio-button/radio-button.rtl.css.js +1 -1
  428. package/es/components/search/search-skeleton.d.ts.map +1 -1
  429. package/es/components/search/search-skeleton.js +3 -4
  430. package/es/components/search/search-skeleton.js.map +1 -1
  431. package/es/components/search/search.css.js +1 -1
  432. package/es/components/search/search.d.ts.map +1 -1
  433. package/es/components/search/search.js +3 -12
  434. package/es/components/search/search.js.map +1 -1
  435. package/es/components/search/search.rtl.css.js +1 -1
  436. package/es/components/select/select-item-group.d.ts.map +1 -1
  437. package/es/components/select/select-item-group.js +2 -1
  438. package/es/components/select/select-item-group.js.map +1 -1
  439. package/es/components/select/select-item.d.ts.map +1 -1
  440. package/es/components/select/select-item.js +2 -1
  441. package/es/components/select/select-item.js.map +1 -1
  442. package/es/components/select/select.css.js +1 -1
  443. package/es/components/select/select.d.ts.map +1 -1
  444. package/es/components/select/select.js +3 -9
  445. package/es/components/select/select.js.map +1 -1
  446. package/es/components/select/select.rtl.css.js +1 -1
  447. package/es/components/skeleton-placeholder/skeleton-placeholder.d.ts.map +1 -1
  448. package/es/components/skeleton-placeholder/skeleton-placeholder.js +2 -6
  449. package/es/components/skeleton-placeholder/skeleton-placeholder.js.map +1 -1
  450. package/es/components/skeleton-text/skeleton-text.d.ts.map +1 -1
  451. package/es/components/skeleton-text/skeleton-text.js +2 -1
  452. package/es/components/skeleton-text/skeleton-text.js.map +1 -1
  453. package/es/components/skip-to-content/skip-to-content.css.js +1 -1
  454. package/es/components/skip-to-content/skip-to-content.d.ts.map +1 -1
  455. package/es/components/skip-to-content/skip-to-content.js +3 -6
  456. package/es/components/skip-to-content/skip-to-content.js.map +1 -1
  457. package/es/components/skip-to-content/skip-to-content.rtl.css.js +1 -1
  458. package/es/components/slider/slider-input.d.ts +4 -0
  459. package/es/components/slider/slider-input.d.ts.map +1 -1
  460. package/es/components/slider/slider-input.js +35 -15
  461. package/es/components/slider/slider-input.js.map +1 -1
  462. package/es/components/slider/slider-skeleton.d.ts.map +1 -1
  463. package/es/components/slider/slider-skeleton.js +2 -4
  464. package/es/components/slider/slider-skeleton.js.map +1 -1
  465. package/es/components/slider/slider.css.js +1 -1
  466. package/es/components/slider/slider.d.ts +17 -0
  467. package/es/components/slider/slider.d.ts.map +1 -1
  468. package/es/components/slider/slider.js +94 -7
  469. package/es/components/slider/slider.js.map +1 -1
  470. package/es/components/slider/slider.rtl.css.js +1 -1
  471. package/es/components/stack/defs.js.map +1 -1
  472. package/es/components/structured-list/structured-list-body.d.ts.map +1 -1
  473. package/es/components/structured-list/structured-list-body.js +1 -1
  474. package/es/components/structured-list/structured-list-body.js.map +1 -1
  475. package/es/components/structured-list/structured-list-cell.d.ts.map +1 -1
  476. package/es/components/structured-list/structured-list-cell.js +2 -6
  477. package/es/components/structured-list/structured-list-cell.js.map +1 -1
  478. package/es/components/structured-list/structured-list-head.d.ts.map +1 -1
  479. package/es/components/structured-list/structured-list-head.js +1 -1
  480. package/es/components/structured-list/structured-list-head.js.map +1 -1
  481. package/es/components/structured-list/structured-list-header-cell-skeleton.d.ts.map +1 -1
  482. package/es/components/structured-list/structured-list-header-cell-skeleton.js +2 -4
  483. package/es/components/structured-list/structured-list-header-cell-skeleton.js.map +1 -1
  484. package/es/components/structured-list/structured-list-header-cell.d.ts.map +1 -1
  485. package/es/components/structured-list/structured-list-header-cell.js +2 -6
  486. package/es/components/structured-list/structured-list-header-cell.js.map +1 -1
  487. package/es/components/structured-list/structured-list-header-row.d.ts.map +1 -1
  488. package/es/components/structured-list/structured-list-header-row.js +2 -1
  489. package/es/components/structured-list/structured-list-header-row.js.map +1 -1
  490. package/es/components/structured-list/structured-list-row.d.ts +0 -3
  491. package/es/components/structured-list/structured-list-row.d.ts.map +1 -1
  492. package/es/components/structured-list/structured-list-row.js +3 -4
  493. package/es/components/structured-list/structured-list-row.js.map +1 -1
  494. package/es/components/structured-list/structured-list.css.js +1 -1
  495. package/es/components/structured-list/structured-list.d.ts.map +1 -1
  496. package/es/components/structured-list/structured-list.js +3 -6
  497. package/es/components/structured-list/structured-list.js.map +1 -1
  498. package/es/components/structured-list/structured-list.rtl.css.js +1 -1
  499. package/es/components/tabs/tab-skeleton.d.ts.map +1 -1
  500. package/es/components/tabs/tab-skeleton.js +2 -4
  501. package/es/components/tabs/tab-skeleton.js.map +1 -1
  502. package/es/components/tabs/tab.d.ts.map +1 -1
  503. package/es/components/tabs/tab.js +3 -6
  504. package/es/components/tabs/tab.js.map +1 -1
  505. package/es/components/tabs/tabs-skeleton.d.ts.map +1 -1
  506. package/es/components/tabs/tabs-skeleton.js +2 -4
  507. package/es/components/tabs/tabs-skeleton.js.map +1 -1
  508. package/es/components/tabs/tabs.css.js +1 -1
  509. package/es/components/tabs/tabs.d.ts.map +1 -1
  510. package/es/components/tabs/tabs.js +3 -8
  511. package/es/components/tabs/tabs.js.map +1 -1
  512. package/es/components/tabs/tabs.rtl.css.js +1 -1
  513. package/es/components/tag/tag.css.js +1 -1
  514. package/es/components/tag/tag.d.ts.map +1 -1
  515. package/es/components/tag/tag.js +2 -1
  516. package/es/components/tag/tag.js.map +1 -1
  517. package/es/components/tag/tag.rtl.css.js +1 -1
  518. package/es/components/text-input/text-input.css.js +1 -1
  519. package/es/components/text-input/text-input.d.ts +4 -4
  520. package/es/components/text-input/text-input.d.ts.map +1 -1
  521. package/es/components/text-input/text-input.js +13 -12
  522. package/es/components/text-input/text-input.js.map +1 -1
  523. package/es/components/text-input/text-input.rtl.css.js +1 -1
  524. package/es/components/textarea/textarea-skeleton.d.ts.map +1 -1
  525. package/es/components/textarea/textarea-skeleton.js +2 -4
  526. package/es/components/textarea/textarea-skeleton.js.map +1 -1
  527. package/es/components/textarea/textarea.css.js +1 -1
  528. package/es/components/textarea/textarea.d.ts.map +1 -1
  529. package/es/components/textarea/textarea.js +12 -14
  530. package/es/components/textarea/textarea.js.map +1 -1
  531. package/es/components/textarea/textarea.rtl.css.js +1 -1
  532. package/es/components/tile/clickable-tile.d.ts.map +1 -1
  533. package/es/components/tile/clickable-tile.js +3 -6
  534. package/es/components/tile/clickable-tile.js.map +1 -1
  535. package/es/components/tile/expandable-tile.d.ts.map +1 -1
  536. package/es/components/tile/expandable-tile.js +2 -1
  537. package/es/components/tile/expandable-tile.js.map +1 -1
  538. package/es/components/tile/radio-tile.d.ts.map +1 -1
  539. package/es/components/tile/radio-tile.js +2 -6
  540. package/es/components/tile/radio-tile.js.map +1 -1
  541. package/es/components/tile/selectable-tile.d.ts +3 -1
  542. package/es/components/tile/selectable-tile.d.ts.map +1 -1
  543. package/es/components/tile/selectable-tile.js +2 -1
  544. package/es/components/tile/selectable-tile.js.map +1 -1
  545. package/es/components/tile/tile-group.d.ts.map +1 -1
  546. package/es/components/tile/tile-group.js +3 -4
  547. package/es/components/tile/tile-group.js.map +1 -1
  548. package/es/components/tile/tile.css.js +1 -1
  549. package/es/components/tile/tile.d.ts.map +1 -1
  550. package/es/components/tile/tile.js +2 -1
  551. package/es/components/tile/tile.js.map +1 -1
  552. package/es/components/tile/tile.rtl.css.js +1 -1
  553. package/es/components/toggle/toggle.css.js +1 -1
  554. package/es/components/toggle/toggle.d.ts.map +1 -1
  555. package/es/components/toggle/toggle.js +2 -1
  556. package/es/components/toggle/toggle.js.map +1 -1
  557. package/es/components/toggle/toggle.rtl.css.js +1 -1
  558. package/es/components/toggle-tip/toggletip.css.js +1 -1
  559. package/es/components/toggle-tip/toggletip.js.map +1 -1
  560. package/es/components/toggle-tip/toggletip.rtl.css.js +1 -1
  561. package/es/components/tooltip/tooltip.css.js +1 -1
  562. package/es/components/tooltip/tooltip.d.ts +0 -1
  563. package/es/components/tooltip/tooltip.d.ts.map +1 -1
  564. package/es/components/tooltip/tooltip.js +3 -2
  565. package/es/components/tooltip/tooltip.js.map +1 -1
  566. package/es/components/tooltip/tooltip.rtl.css.js +1 -1
  567. package/es/components/ui-shell/header-global-action.d.ts +16 -1
  568. package/es/components/ui-shell/header-global-action.d.ts.map +1 -1
  569. package/es/components/ui-shell/header-global-action.js +92 -8
  570. package/es/components/ui-shell/header-global-action.js.map +1 -1
  571. package/es/components/ui-shell/header-menu-button.d.ts.map +1 -1
  572. package/es/components/ui-shell/header-menu-button.js +3 -9
  573. package/es/components/ui-shell/header-menu-button.js.map +1 -1
  574. package/es/components/ui-shell/header-menu-item.d.ts.map +1 -1
  575. package/es/components/ui-shell/header-menu-item.js +1 -1
  576. package/es/components/ui-shell/header-menu-item.js.map +1 -1
  577. package/es/components/ui-shell/header-menu.d.ts +1 -1
  578. package/es/components/ui-shell/header-menu.d.ts.map +1 -1
  579. package/es/components/ui-shell/header-menu.js +11 -17
  580. package/es/components/ui-shell/header-menu.js.map +1 -1
  581. package/es/components/ui-shell/header-name.d.ts.map +1 -1
  582. package/es/components/ui-shell/header-name.js +3 -8
  583. package/es/components/ui-shell/header-name.js.map +1 -1
  584. package/es/components/ui-shell/header-nav-item.d.ts +8 -0
  585. package/es/components/ui-shell/header-nav-item.d.ts.map +1 -1
  586. package/es/components/ui-shell/header-nav-item.js +32 -11
  587. package/es/components/ui-shell/header-nav-item.js.map +1 -1
  588. package/es/components/ui-shell/header-nav.d.ts.map +1 -1
  589. package/es/components/ui-shell/header-nav.js +2 -1
  590. package/es/components/ui-shell/header-nav.js.map +1 -1
  591. package/es/components/ui-shell/header.css.js +1 -1
  592. package/es/components/ui-shell/header.d.ts.map +1 -1
  593. package/es/components/ui-shell/header.js +1 -1
  594. package/es/components/ui-shell/header.js.map +1 -1
  595. package/es/components/ui-shell/header.rtl.css.js +1 -1
  596. package/es/components/ui-shell/index.d.ts +12 -11
  597. package/es/components/ui-shell/index.d.ts.map +1 -1
  598. package/es/components/ui-shell/index.js +12 -11
  599. package/es/components/ui-shell/index.js.map +1 -1
  600. package/es/components/ui-shell/side-nav-divider.d.ts.map +1 -1
  601. package/es/components/ui-shell/side-nav-divider.js +1 -1
  602. package/es/components/ui-shell/side-nav-divider.js.map +1 -1
  603. package/es/components/ui-shell/side-nav-items.d.ts.map +1 -1
  604. package/es/components/ui-shell/side-nav-items.js +1 -1
  605. package/es/components/ui-shell/side-nav-items.js.map +1 -1
  606. package/es/components/ui-shell/side-nav-link.d.ts +8 -0
  607. package/es/components/ui-shell/side-nav-link.d.ts.map +1 -1
  608. package/es/components/ui-shell/side-nav-link.js +33 -11
  609. package/es/components/ui-shell/side-nav-link.js.map +1 -1
  610. package/es/components/ui-shell/side-nav-menu-item.d.ts.map +1 -1
  611. package/es/components/ui-shell/side-nav-menu-item.js +3 -8
  612. package/es/components/ui-shell/side-nav-menu-item.js.map +1 -1
  613. package/es/components/ui-shell/side-nav-menu.d.ts.map +1 -1
  614. package/es/components/ui-shell/side-nav-menu.js +3 -13
  615. package/es/components/ui-shell/side-nav-menu.js.map +1 -1
  616. package/es/components/ui-shell/side-nav.css.js +1 -1
  617. package/es/components/ui-shell/side-nav.d.ts +5 -0
  618. package/es/components/ui-shell/side-nav.d.ts.map +1 -1
  619. package/es/components/ui-shell/side-nav.js +16 -2
  620. package/es/components/ui-shell/side-nav.js.map +1 -1
  621. package/es/components/ui-shell/side-nav.rtl.css.js +1 -1
  622. package/es/components/ui-shell/switcher-item.js.map +1 -1
  623. package/es/globals/decorators/carbon-element.d.ts +29 -0
  624. package/es/globals/decorators/carbon-element.d.ts.map +1 -0
  625. package/es/globals/decorators/carbon-element.js +67 -0
  626. package/es/globals/decorators/carbon-element.js.map +1 -0
  627. package/es/globals/decorators/host-listener.js.map +1 -1
  628. package/es/globals/directives/spread.d.ts +1 -1
  629. package/es/globals/directives/spread.d.ts.map +1 -1
  630. package/es/globals/directives/spread.js +1 -1
  631. package/es/globals/directives/spread.js.map +1 -1
  632. package/es/globals/internal/radio-group-manager.js +3 -4
  633. package/es/globals/internal/radio-group-manager.js.map +1 -1
  634. package/es/globals/internal/storybook-cdn.d.ts +1 -1
  635. package/es/globals/internal/storybook-cdn.d.ts.map +1 -1
  636. package/es/globals/internal/storybook-cdn.js +3 -3
  637. package/es/globals/internal/storybook-cdn.js.map +1 -1
  638. package/es/globals/mixins/focus.js.map +1 -1
  639. package/es/globals/mixins/form.js +6 -1
  640. package/es/globals/mixins/form.js.map +1 -1
  641. package/es/globals/mixins/host-listener.js.map +1 -1
  642. package/es/globals/mixins/temp-layout.css.js +12 -0
  643. package/es/globals/mixins/temp-layout.rtl.css.js +12 -0
  644. package/es/globals/mixins/validity.js +16 -0
  645. package/es/globals/mixins/validity.js.map +1 -1
  646. package/es/globals/wrappers/createReactCustomElementType.js +17 -0
  647. package/es/globals/wrappers/createReactCustomElementType.js.map +1 -1
  648. package/es/polyfills/toggle-class.js.map +1 -1
  649. package/lib/components/accordion/defs.js +1 -1
  650. package/lib/components/accordion/defs.js.map +1 -1
  651. package/lib/components/button/defs.js +1 -1
  652. package/lib/components/button/defs.js.map +1 -1
  653. package/lib/components/code-snippet/defs.js +1 -1
  654. package/lib/components/code-snippet/defs.js.map +1 -1
  655. package/lib/components/content-switcher/defs.js +1 -1
  656. package/lib/components/content-switcher/defs.js.map +1 -1
  657. package/lib/components/date-picker/defs.js +1 -1
  658. package/lib/components/date-picker/defs.js.map +1 -1
  659. package/lib/components/dropdown/defs.js +1 -1
  660. package/lib/components/dropdown/defs.js.map +1 -1
  661. package/lib/components/file-uploader/defs.js +1 -1
  662. package/lib/components/file-uploader/defs.js.map +1 -1
  663. package/lib/components/floating-menu/defs.js +1 -1
  664. package/lib/components/floating-menu/defs.js.map +1 -1
  665. package/lib/components/inline-loading/defs.js +1 -1
  666. package/lib/components/inline-loading/defs.js.map +1 -1
  667. package/lib/components/loading/defs.js +1 -1
  668. package/lib/components/loading/defs.js.map +1 -1
  669. package/lib/components/modal/defs.js +1 -1
  670. package/lib/components/modal/defs.js.map +1 -1
  671. package/lib/components/stack/defs.js.map +1 -1
  672. package/lib/globals/wrappers/createReactCustomElementType.js +16 -0
  673. package/lib/globals/wrappers/createReactCustomElementType.js.map +1 -1
  674. package/package.json +17 -16
  675. package/scss/components/accordion/accordion.scss +10 -5
  676. package/scss/components/breadcrumb/breadcrumb.scss +7 -0
  677. package/scss/components/button/button.scss +7 -2
  678. package/scss/components/code-snippet/code-snippet.scss +6 -8
  679. package/scss/components/combo-box/combo-box.scss +0 -10
  680. package/scss/components/content-switcher/content-switcher.scss +8 -21
  681. package/scss/components/copy-button/copy-button.scss +3 -3
  682. package/scss/components/data-table/_table-action.scss +4 -0
  683. package/scss/components/data-table/_table-core.scss +0 -2
  684. package/scss/components/data-table/data-table.scss +0 -1
  685. package/scss/components/date-picker/date-picker.scss +0 -3
  686. package/scss/components/dropdown/dropdown.scss +1 -2
  687. package/scss/components/file-uploader/file-uploader.scss +3 -5
  688. package/scss/components/icon-button/icon-button.scss +5 -0
  689. package/scss/components/inline-loading/inline-loading.scss +0 -3
  690. package/scss/components/modal/modal.scss +1 -4
  691. package/scss/components/multi-select/multi-select.scss +0 -3
  692. package/scss/components/notification/actionable-notification.scss +69 -24
  693. package/scss/components/notification/inline-notification.scss +76 -25
  694. package/scss/components/notification/toast-notification.scss +43 -27
  695. package/scss/components/number-input/number-input.scss +0 -3
  696. package/scss/components/overflow-menu/overflow-menu.scss +8 -3
  697. package/scss/components/pagination/pagination.scss +8 -3
  698. package/scss/components/popover/popover.scss +4 -2
  699. package/scss/components/progress-bar/progress-bar.scss +0 -5
  700. package/scss/components/progress-indicator/progress-indicator.scss +0 -3
  701. package/scss/components/radio-button/radio-button.scss +24 -1
  702. package/scss/components/search/search.scss +33 -3
  703. package/scss/components/select/select.scss +0 -3
  704. package/scss/components/slider/slider.scss +2 -3
  705. package/scss/components/structured-list/structured-list.scss +0 -5
  706. package/scss/components/tag/tag.scss +10 -5
  707. package/scss/components/text-input/text-input.scss +2 -2
  708. package/scss/components/textarea/textarea.scss +0 -3
  709. package/scss/components/tile/tile.scss +7 -8
  710. package/scss/components/tooltip/tooltip.scss +4 -4
  711. package/scss/components/ui-shell/header.scss +13 -3
  712. package/scss/components/ui-shell/side-nav.scss +0 -5
  713. package/scss/globals/mixins/temp-layout.scss +36 -0
@@ -1 +1 @@
1
- {"version":3,"file":"switcher-item.js","names":["classMap","LitElement","html","property","customElement","prefix","FocusMixin","styles","CDSSwitcherItem","_decorate","_initialize","_FocusMixin","constructor","args","F","d","kind","decorators","type","String","attribute","key","value","Boolean","reflect","Number","connectedCallback","hasAttribute","setAttribute","_get","_getPrototypeOf","prototype","call","render","href","selected","ariaLabel","ariaLabelledBy","tabIndex","classes","_t","_","static","_objectSpread","shadowRootOptions","delegatesFocus"],"sources":["components/ui-shell/switcher-item.ts"],"sourcesContent":["/**\n * @license\n *\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, customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport FocusMixin from '../../globals/mixins/focus';\nimport styles from './header.scss';\n\n/**\n * Switcher menu item.\n *\n * @element cds-switcher-item\n */\n@customElement(`${prefix}-switcher-item`)\nclass CDSSwitcherItem extends FocusMixin(LitElement) {\n /**\n * Required props for accessibility label\n */\n @property({ type: String, attribute: 'aria-label' })\n ariaLabel;\n\n /**\n * Props for accessibility labelled by\n */\n @property({ type: String, attribute: 'aria-labelledby' })\n ariaLabelledBy;\n\n /**\n * Link `href`.\n */\n @property()\n href = '';\n\n /**\n * Specify if this is a large variation of the side nav link\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n /**\n * Specify if this is a large variation of the side nav link\n */\n @property({ type: Number, reflect: true, attribute: 'tab-index' })\n tabIndex = 0;\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n super.connectedCallback();\n }\n\n render() {\n const { href, selected, ariaLabel, ariaLabelledBy, tabIndex } = this;\n\n const classes = classMap({\n [`${prefix}--switcher__item-link`]: true,\n [`${prefix}--switcher__item-link--selected`]: selected,\n });\n\n return html`\n <a\n part=\"link\"\n aria-label=\"${ariaLabel}\"\n aria-labelledby=\"${ariaLabelledBy}\"\n tabindex=\"${tabIndex}\"\n class=\"${classes}\"\n href=\"${href}\">\n <slot></slot>\n </a>\n `;\n }\n\n static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n static styles = styles; // `styles`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,iBAAiB;UAC/BC,cAAc,EAAE;QAAI;MAAA;IAAA;MAAA7B,IAAA;MAAA0B,MAAA;MAAArB,GAAA;MAAAC,MAAA;QAAA,OAENf,MAAM;MAAA;IAAA;EAAA;AAAA,GA/DMD,UAAU,CAACL,UAAU,CAAC;AAkEpD,eAAeO,eAAe"}
1
+ {"version":3,"file":"switcher-item.js","names":["classMap","LitElement","html","property","customElement","prefix","FocusMixin","styles","CDSSwitcherItem","_decorate","_initialize","_FocusMixin","constructor","args","F","d","kind","decorators","type","String","attribute","key","value","Boolean","reflect","Number","connectedCallback","hasAttribute","setAttribute","_get","_getPrototypeOf","prototype","call","render","href","selected","ariaLabel","ariaLabelledBy","tabIndex","classes","_t","_","static","_objectSpread","shadowRootOptions","delegatesFocus"],"sources":["components/ui-shell/switcher-item.ts"],"sourcesContent":["/**\n * @license\n *\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, customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport FocusMixin from '../../globals/mixins/focus';\nimport styles from './header.scss';\n\n/**\n * Switcher menu item.\n *\n * @element cds-switcher-item\n */\n@customElement(`${prefix}-switcher-item`)\nclass CDSSwitcherItem extends FocusMixin(LitElement) {\n /**\n * Required props for accessibility label\n */\n @property({ type: String, attribute: 'aria-label' })\n ariaLabel;\n\n /**\n * Props for accessibility labelled by\n */\n @property({ type: String, attribute: 'aria-labelledby' })\n ariaLabelledBy;\n\n /**\n * Link `href`.\n */\n @property()\n href = '';\n\n /**\n * Specify if this is a large variation of the side nav link\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n /**\n * Specify if this is a large variation of the side nav link\n */\n @property({ type: Number, reflect: true, attribute: 'tab-index' })\n tabIndex = 0;\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n super.connectedCallback();\n }\n\n render() {\n const { href, selected, ariaLabel, ariaLabelledBy, tabIndex } = this;\n\n const classes = classMap({\n [`${prefix}--switcher__item-link`]: true,\n [`${prefix}--switcher__item-link--selected`]: selected,\n });\n\n return html`\n <a\n part=\"link\"\n aria-label=\"${ariaLabel}\"\n aria-labelledby=\"${ariaLabelledBy}\"\n tabindex=\"${tabIndex}\"\n class=\"${classes}\"\n href=\"${href}\">\n <slot></slot>\n </a>\n `;\n }\n\n static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default CDSSwitcherItem;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,6BAA6B;AACtD,SAASC,UAAU,EAAEC,IAAI,QAAQ,KAAK;AACtC,SAASC,QAAQ,EAAEC,aAAa,QAAQ,mBAAmB;AAC3D,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,UAAU,MAAM,4BAA4B;AACnD,OAAOC,MAAM,MAAM,mBAAe;;AAElC;AACA;AACA;AACA;AACA,GAJA;AACA;AACA;AACA;AACA;AAJA,IAMMC,eAAe,GAAAC,SAAA,EADpBL,aAAa,CAAE,GAAEC,MAAO,gBAAe,CAAC,aAAAK,WAAA,EAAAC,WAAA;EAAzC,MACMH,eAAe,SAAAG,WAAA,CAAgC;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EAgErD;EAAC;IAAAI,CAAA,EAhEKN,eAAe;IAAAO,CAAA;MAAAC,IAAA;MAAAC,UAAA,GAIlBd,QAAQ,CAAC;QAAEe,IAAI,EAAEC,MAAM;QAAEC,SAAS,EAAE;MAAa,CAAC,CAAC;MAAAC,GAAA;MAAAC,KAAA;IAAA;MAAAN,IAAA;MAAAC,UAAA,GAMnDd,QAAQ,CAAC;QAAEe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QAEF,OAAOjC,IAAI,CAAAsC,EAAA,KAAAA,EAAA,GAAAC,CAAC;AAChB;AACA;AACA,sBAAoB,CAAY;AAChC,2BAAyB,CAAiB;AAC1C,oBAAkB,CAAW;AAC7B,iBAAe,CAAU;AACzB,gBAAc,CAAO;AACrB;AACA;AACA,KAAI,GAPkBL,SAAS,EACJC,cAAc,EACrBC,QAAQ,EACXC,OAAO,EACRL,IAAI;MAIlB;IAAC;MAAAlB,IAAA;MAAA0B,MAAA;MAAArB,GAAA;MAAAC,MAAA;QAAA,OAAAqB,aAAA,CAAAA,aAAA,KAGI1C,UAAU,CAAC2C,iBAAiB;UAC/BC,cAAc,EAAE;QAAI;MAAA;IAAA;MAAA7B,IAAA;MAAA0B,MAAA;MAAArB,GAAA;MAAAC,MAAA;QAAA,OAENf,MAAM;MAAA;IAAA;EAAA;AAAA,GA/DMD,UAAU,CAACL,UAAU,CAAC;AAkEpD,eAAeO,eAAe"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ import { ClassDescriptor } from '@lit/reactive-element/decorators/base.js';
7
+ /**
8
+ * Allow for custom element classes with private constructors
9
+ */
10
+ declare type CustomElementClass = Omit<typeof HTMLElement, 'new'>;
11
+ /**
12
+ * Class decorator factory that defines the decorated class as a custom element.
13
+ *
14
+ * ```js
15
+ * @customElement('my-element')
16
+ * class MyElement extends LitElement {
17
+ * render() {
18
+ * return html``;
19
+ * }
20
+ * }
21
+ * ```
22
+ *
23
+ * @category Decorator
24
+ * @param tagName The tag name of the custom element to define.
25
+ */
26
+ export declare const carbonElement: (tagName: string) => (classOrDescriptor: CustomElementClass | ClassDescriptor) => any;
27
+ export {};
28
+
29
+ //# sourceMappingURL=carbon-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["globals/decorators/carbon-element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAEL,eAAe,EAChB,MAAM,0CAA0C,CAAC;AAElD;;GAEG;AACH,aAAK,kBAAkB,GAAG,IAAI,CAAC,OAAO,WAAW,EAAE,KAAK,CAAC,CAAC;AAoC1D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,YACd,MAAM,yBACI,kBAAkB,GAAG,eAAe,QAGkB,CAAC","file":"carbon-element.d.ts","sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\nimport {\n Constructor,\n ClassDescriptor,\n} from '@lit/reactive-element/decorators/base.js';\n\n/**\n * Allow for custom element classes with private constructors\n */\ntype CustomElementClass = Omit<typeof HTMLElement, 'new'>;\n\nconst legacyCustomElement = (tagName: string, clazz: CustomElementClass) => {\n try {\n customElements.define(tagName, clazz as CustomElementConstructor);\n } catch (error) {\n console.warn(`Attempting to re-define ${tagName}`);\n }\n // Cast as any because TS doesn't recognize the return type as being a\n // subtype of the decorated class when clazz is typed as\n // `Constructor<HTMLElement>` for some reason.\n // `Constructor<HTMLElement>` is helpful to make sure the decorator is\n // applied to elements however.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return clazz as any;\n};\n\nconst standardCustomElement = (\n tagName: string,\n descriptor: ClassDescriptor\n) => {\n const { kind, elements } = descriptor;\n return {\n kind,\n elements,\n // This callback is called once the class is otherwise fully defined\n finisher(clazz: Constructor<HTMLElement>) {\n try {\n customElements.define(tagName, clazz);\n } catch (error) {\n console.warn(`Attempting to re-define ${tagName}`);\n }\n },\n };\n};\n\n/**\n * Class decorator factory that defines the decorated class as a custom element.\n *\n * ```js\n * @customElement('my-element')\n * class MyElement extends LitElement {\n * render() {\n * return html``;\n * }\n * }\n * ```\n *\n * @category Decorator\n * @param tagName The tag name of the custom element to define.\n */\nexport const carbonElement =\n (tagName: string) =>\n (classOrDescriptor: CustomElementClass | ClassDescriptor) =>\n typeof classOrDescriptor === 'function'\n ? legacyCustomElement(tagName, classOrDescriptor)\n : standardCustomElement(tagName, classOrDescriptor as ClassDescriptor);\n"]}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+
7
+ /*
8
+ * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all
9
+ * property decorators (but not class decorators) in this file that have
10
+ * an @ExportDecoratedItems annotation must be defined as a regular function,
11
+ * not an arrow function.
12
+ */
13
+
14
+ /**
15
+ * Allow for custom element classes with private constructors
16
+ */
17
+
18
+ const legacyCustomElement = (tagName, clazz) => {
19
+ try {
20
+ customElements.define(tagName, clazz);
21
+ } catch (error) {
22
+ console.warn(`Attempting to re-define ${tagName}`);
23
+ }
24
+ // Cast as any because TS doesn't recognize the return type as being a
25
+ // subtype of the decorated class when clazz is typed as
26
+ // `Constructor<HTMLElement>` for some reason.
27
+ // `Constructor<HTMLElement>` is helpful to make sure the decorator is
28
+ // applied to elements however.
29
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
+ return clazz;
31
+ };
32
+ const standardCustomElement = (tagName, descriptor) => {
33
+ const {
34
+ kind,
35
+ elements
36
+ } = descriptor;
37
+ return {
38
+ kind,
39
+ elements,
40
+ // This callback is called once the class is otherwise fully defined
41
+ finisher(clazz) {
42
+ try {
43
+ customElements.define(tagName, clazz);
44
+ } catch (error) {
45
+ console.warn(`Attempting to re-define ${tagName}`);
46
+ }
47
+ }
48
+ };
49
+ };
50
+
51
+ /**
52
+ * Class decorator factory that defines the decorated class as a custom element.
53
+ *
54
+ * ```js
55
+ * @customElement('my-element')
56
+ * class MyElement extends LitElement {
57
+ * render() {
58
+ * return html``;
59
+ * }
60
+ * }
61
+ * ```
62
+ *
63
+ * @category Decorator
64
+ * @param tagName The tag name of the custom element to define.
65
+ */
66
+ export const carbonElement = tagName => classOrDescriptor => typeof classOrDescriptor === 'function' ? legacyCustomElement(tagName, classOrDescriptor) : standardCustomElement(tagName, classOrDescriptor);
67
+ //# sourceMappingURL=carbon-element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carbon-element.js","names":["legacyCustomElement","tagName","clazz","customElements","define","error","console","warn","standardCustomElement","descriptor","kind","elements","finisher","carbonElement","classOrDescriptor"],"sources":["globals/decorators/carbon-element.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\nimport {\n Constructor,\n ClassDescriptor,\n} from '@lit/reactive-element/decorators/base.js';\n\n/**\n * Allow for custom element classes with private constructors\n */\ntype CustomElementClass = Omit<typeof HTMLElement, 'new'>;\n\nconst legacyCustomElement = (tagName: string, clazz: CustomElementClass) => {\n try {\n customElements.define(tagName, clazz as CustomElementConstructor);\n } catch (error) {\n console.warn(`Attempting to re-define ${tagName}`);\n }\n // Cast as any because TS doesn't recognize the return type as being a\n // subtype of the decorated class when clazz is typed as\n // `Constructor<HTMLElement>` for some reason.\n // `Constructor<HTMLElement>` is helpful to make sure the decorator is\n // applied to elements however.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return clazz as any;\n};\n\nconst standardCustomElement = (\n tagName: string,\n descriptor: ClassDescriptor\n) => {\n const { kind, elements } = descriptor;\n return {\n kind,\n elements,\n // This callback is called once the class is otherwise fully defined\n finisher(clazz: Constructor<HTMLElement>) {\n try {\n customElements.define(tagName, clazz);\n } catch (error) {\n console.warn(`Attempting to re-define ${tagName}`);\n }\n },\n };\n};\n\n/**\n * Class decorator factory that defines the decorated class as a custom element.\n *\n * ```js\n * @customElement('my-element')\n * class MyElement extends LitElement {\n * render() {\n * return html``;\n * }\n * }\n * ```\n *\n * @category Decorator\n * @param tagName The tag name of the custom element to define.\n */\nexport const carbonElement =\n (tagName: string) =>\n (classOrDescriptor: CustomElementClass | ClassDescriptor) =>\n typeof classOrDescriptor === 'function'\n ? legacyCustomElement(tagName, classOrDescriptor)\n : standardCustomElement(tagName, classOrDescriptor as ClassDescriptor);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;;AAGA,MAAMA,mBAAmB,GAAGA,CAACC,OAAe,EAAEC,KAAyB,KAAK;EAC1E,IAAI;IACFC,cAAc,CAACC,MAAM,CAACH,OAAO,EAAEC,KAAiC,CAAC;EACnE,CAAC,CAAC,OAAOG,KAAK,EAAE;IACdC,OAAO,CAACC,IAAI,CAAE,2BAA0BN,OAAQ,EAAC,CAAC;EACpD;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAOC,KAAK;AACd,CAAC;AAED,MAAMM,qBAAqB,GAAGA,CAC5BP,OAAe,EACfQ,UAA2B,KACxB;EACH,MAAM;IAAEC,IAAI;IAAEC;EAAS,CAAC,GAAGF,UAAU;EACrC,OAAO;IACLC,IAAI;IACJC,QAAQ;IACR;IACAC,QAAQA,CAACV,KAA+B,EAAE;MACxC,IAAI;QACFC,cAAc,CAACC,MAAM,CAACH,OAAO,EAAEC,KAAK,CAAC;MACvC,CAAC,CAAC,OAAOG,KAAK,EAAE;QACdC,OAAO,CAACC,IAAI,CAAE,2BAA0BN,OAAQ,EAAC,CAAC;MACpD;IACF;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMY,aAAa,GACvBZ,OAAe,IACfa,iBAAuD,IACtD,OAAOA,iBAAiB,KAAK,UAAU,GACnCd,mBAAmB,CAACC,OAAO,EAAEa,iBAAiB,CAAC,GAC/CN,qBAAqB,CAACP,OAAO,EAAEa,iBAAoC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"host-listener.js","names":["setHostListener","type","options","Clazz","name","hostListeners","_hostListeners","Error","HostListenerStandard","descriptor","kind","key","placement","_objectSpread","finisher","HostListener","targetOrDescriptor","constructor"],"sources":["globals/decorators/host-listener.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2022\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\n/**\n * Puts an event listener to an internal table for `@HostListener()`.\n *\n * @param type\n * The event type. Can be prefixed with `document:` or `window:`.\n * The event listener is attached to host element's owner document or its default view in such case.\n * @param options The event listener options.\n * @param Clazz The target class.\n * @param name The method name in the given target class that works as the event listener.\n */\nconst setHostListener = (\n type: string,\n options: boolean | AddEventListenerOptions,\n Clazz,\n name: string\n) => {\n const hostListeners = Clazz._hostListeners;\n if (!hostListeners) {\n throw new Error(\n 'The method `@HostListener()` is defined on has to be of a class that has `HostListerMixin`.'\n );\n }\n if (!hostListeners[name]) {\n hostListeners[name] = {};\n }\n hostListeners[name][type] = { options };\n};\n\n/**\n * @param type\n * The event type. Can be prefixed with `document:` or `window:`.\n * The event listener is attached to host element's owner document or its default view in such case.\n * @param options The event listener options.\n * @param descriptor The original class element descriptor of the event listener method.\n * @returns The updated class element descriptor with `@HostListener()` decorator.\n */\nconst HostListenerStandard = (\n type: string,\n options: boolean | AddEventListenerOptions,\n descriptor\n) => {\n const { kind, key, placement } = descriptor;\n if (\n !(\n (kind === 'method' && placement === 'prototype') ||\n (kind === 'field' && placement === 'own')\n )\n ) {\n throw new Error(\n '`@HostListener()` must be defined on instance methods, but you may have defined it on static, field, etc.'\n );\n }\n return {\n ...descriptor,\n finisher(Clazz) {\n setHostListener(type, options, Clazz, key);\n },\n };\n};\n\n/**\n * A decorator to add event listener to the host element, or its `document`/`window`, of a custom element.\n * The `target` must extend `HostListenerMixin`.\n *\n * @param type\n * The event type. Can be prefixed with `document:` or `window:`.\n * The event listener is attached to host element's owner document or its default view in such case.\n * @param options The event listener options.\n */\nconst HostListener =\n (type: string, options?: boolean | AddEventListenerOptions) =>\n (targetOrDescriptor, name: string) =>\n typeof name !== 'undefined'\n ? setHostListener(type, options!, targetOrDescriptor.constructor, name)\n : HostListenerStandard(type, options!, targetOrDescriptor);\n\nexport default HostListener;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,eAAe,GAAGA,CACtBC,IAAY,EACZC,OAA0C,EAC1CC,KAAK,EACLC,IAAY,KACT;EACH,MAAMC,aAAa,GAAGF,KAAK,CAACG,cAAc;EAC1C,IAAI,CAACD,aAAa,EAAE;IAClB,MAAM,IAAIE,KAAK,CACb,6FAA6F,CAC9F;EACH;EACA,IAAI,CAACF,aAAa,CAACD,IAAI,CAAC,EAAE;IACxBC,aAAa,CAACD,IAAI,CAAC,GAAG,CAAC,CAAC;EAC1B;EACAC,aAAa,CAACD,IAAI,CAAC,CAACH,IAAI,CAAC,GAAG;IAAEC;EAAQ,CAAC;AACzC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,oBAAoB,GAAGA,CAC3BP,IAAY,EACZC,OAA0C,EAC1CO,UAAU,KACP;EACH,MAAM;IAAEC,IAAI;IAAEC,GAAG;IAAEC;EAAU,CAAC,GAAGH,UAAU;EAC3C,IACE,EACGC,IAAI,KAAK,QAAQ,IAAIE,SAAS,KAAK,WAAW,IAC9CF,IAAI,KAAK,OAAO,IAAIE,SAAS,KAAK,KAAM,CAC1C,EACD;IACA,MAAM,IAAIL,KAAK,CACb,2GAA2G,CAC5G;EACH;EACA,OAAAM,aAAA,CAAAA,aAAA,KACKJ,UAAU;IACbK,QAAQA,CAACX,KAAK,EAAE;MACdH,eAAe,CAACC,IAAI,EAAEC,OAAO,EAAEC,KAAK,EAAEQ,GAAG,CAAC;IAC5C;EAAC;AAEL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,YAAY,GAChBA,CAACd,IAAY,EAAEC,OAA2C,KAC1D,CAACc,kBAAkB,EAAEZ,IAAY,KAC/B,OAAOA,IAAI,KAAK,WAAW,GACvBJ,eAAe,CAACC,IAAI,EAAEC,OAAO,EAAGc,kBAAkB,CAACC,WAAW,EAAEb,IAAI,CAAC,GACrEI,oBAAoB,CAACP,IAAI,EAAEC,OAAO,EAAGc,kBAAkB,CAAC;AAEhE,eAAeD,YAAY"}
1
+ {"version":3,"file":"host-listener.js","names":["setHostListener","type","options","Clazz","name","hostListeners","_hostListeners","Error","HostListenerStandard","descriptor","kind","key","placement","_objectSpread","finisher","HostListener","targetOrDescriptor","constructor"],"sources":["globals/decorators/host-listener.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2022\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\n/**\n * Puts an event listener to an internal table for `@HostListener()`.\n *\n * @param type\n * The event type. Can be prefixed with `document:` or `window:`.\n * The event listener is attached to host element's owner document or its default view in such case.\n * @param options The event listener options.\n * @param Clazz The target class.\n * @param name The method name in the given target class that works as the event listener.\n */\nconst setHostListener = (\n type: string,\n options: boolean | AddEventListenerOptions,\n Clazz,\n name: string\n) => {\n const hostListeners = Clazz._hostListeners;\n if (!hostListeners) {\n throw new Error(\n 'The method `@HostListener()` is defined on has to be of a class that has `HostListerMixin`.'\n );\n }\n if (!hostListeners[name]) {\n hostListeners[name] = {};\n }\n hostListeners[name][type] = { options };\n};\n\n/**\n * @param type\n * The event type. Can be prefixed with `document:` or `window:`.\n * The event listener is attached to host element's owner document or its default view in such case.\n * @param options The event listener options.\n * @param descriptor The original class element descriptor of the event listener method.\n * @returns The updated class element descriptor with `@HostListener()` decorator.\n */\nconst HostListenerStandard = (\n type: string,\n options: boolean | AddEventListenerOptions,\n descriptor\n) => {\n const { kind, key, placement } = descriptor;\n if (\n !(\n (kind === 'method' && placement === 'prototype') ||\n (kind === 'field' && placement === 'own')\n )\n ) {\n throw new Error(\n '`@HostListener()` must be defined on instance methods, but you may have defined it on static, field, etc.'\n );\n }\n return {\n ...descriptor,\n finisher(Clazz) {\n setHostListener(type, options, Clazz, key);\n },\n };\n};\n\n/**\n * A decorator to add event listener to the host element, or its `document`/`window`, of a custom element.\n * The `target` must extend `HostListenerMixin`.\n *\n * @param type\n * The event type. Can be prefixed with `document:` or `window:`.\n * The event listener is attached to host element's owner document or its default view in such case.\n * @param options The event listener options.\n */\nconst HostListener =\n (type: string, options?: boolean | AddEventListenerOptions) =>\n (targetOrDescriptor, name: string) =>\n typeof name !== 'undefined'\n ? setHostListener(type, options!, targetOrDescriptor.constructor, name)\n : HostListenerStandard(type, options!, targetOrDescriptor);\n\nexport default HostListener;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,eAAe,GAAGA,CACtBC,IAAY,EACZC,OAA0C,EAC1CC,KAAK,EACLC,IAAY,KACT;EACH,MAAMC,aAAa,GAAGF,KAAK,CAACG,cAAc;EAC1C,IAAI,CAACD,aAAa,EAAE;IAClB,MAAM,IAAIE,KAAK,CACb,6FACF,CAAC;EACH;EACA,IAAI,CAACF,aAAa,CAACD,IAAI,CAAC,EAAE;IACxBC,aAAa,CAACD,IAAI,CAAC,GAAG,CAAC,CAAC;EAC1B;EACAC,aAAa,CAACD,IAAI,CAAC,CAACH,IAAI,CAAC,GAAG;IAAEC;EAAQ,CAAC;AACzC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,oBAAoB,GAAGA,CAC3BP,IAAY,EACZC,OAA0C,EAC1CO,UAAU,KACP;EACH,MAAM;IAAEC,IAAI;IAAEC,GAAG;IAAEC;EAAU,CAAC,GAAGH,UAAU;EAC3C,IACE,EACGC,IAAI,KAAK,QAAQ,IAAIE,SAAS,KAAK,WAAW,IAC9CF,IAAI,KAAK,OAAO,IAAIE,SAAS,KAAK,KAAM,CAC1C,EACD;IACA,MAAM,IAAIL,KAAK,CACb,2GACF,CAAC;EACH;EACA,OAAAM,aAAA,CAAAA,aAAA,KACKJ,UAAU;IACbK,QAAQA,CAACX,KAAK,EAAE;MACdH,eAAe,CAACC,IAAI,EAAEC,OAAO,EAAEC,KAAK,EAAEQ,GAAG,CAAC;IAC5C;EAAC;AAEL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,YAAY,GAChBA,CAACd,IAAY,EAAEC,OAA2C,KAC1D,CAACc,kBAAkB,EAAEZ,IAAY,KAC/B,OAAOA,IAAI,KAAK,WAAW,GACvBJ,eAAe,CAACC,IAAI,EAAEC,OAAO,EAAGc,kBAAkB,CAACC,WAAW,EAAEb,IAAI,CAAC,GACrEI,oBAAoB,CAACP,IAAI,EAAEC,OAAO,EAAGc,kBAAkB,CAAC;AAEhE,eAAeD,YAAY"}
@@ -31,7 +31,7 @@ declare class SpreadDirective extends Directive {
31
31
  * in the update() function.
32
32
  *
33
33
  * @param attributesInfo The key-value pair to be set as the attribute name/value pairs.
34
- * @returns
34
+ * @returns the attributes info
35
35
  */
36
36
  render(attributesInfo: AttributesInfo): AttributesInfo;
37
37
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["globals/directives/spread.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,aAAa,EACb,SAAS,EACT,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAG1B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAQD;;;;;;GAMG;AACH,cAAM,eAAgB,SAAQ,SAAS;IACrC;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,CAAC,cAAc,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC;IA8BvE;;;;;;OAMG;IACH,MAAM,CAAC,cAAc,EAAE,cAAc;CAGtC;AAED,QAAA,MAAM,MAAM,0GAA6B,CAAC;AAE1C,eAAe,MAAM,CAAC","file":"spread.d.ts","sourcesContent":["/**\n * @license\n *\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 {\n AttributePart,\n Directive,\n DirectiveParameters,\n} from 'lit/directive.js';\nimport { directive } from 'lit/async-directive.js';\n\nexport interface AttributesInfo {\n readonly [name: string]: string;\n}\n\n/**\n * Stores the ClassInfo object applied to a given AttributePart.\n * Used to unset existing values when a new ClassInfo object is applied.\n */\nconst attributesMapCache = new WeakMap();\n\n/**\n * A directive that applies attributes from a key-value pairs.\n * This must be used in the `...` name and must be the only part used in the attribute.\n * It applies the key-value pairs in the `attributesInfo` argument\n * and sets them as attribute name/value pairs.\n *\n */\nclass SpreadDirective extends Directive {\n /**\n * The update function that handles the attribute setting.\n *\n * @param part an object with an API to manage the element's DOM\n * @param attributesInfo The key-value pair to be set as the attribute name/value pairs.\n * @returns the render function\n */\n update(part: AttributePart, [attributesInfo]: DirectiveParameters<this>) {\n const { element } = part;\n\n // Removes old attributes that are no longer there\n const oldAttributesInfo = attributesMapCache.get(part);\n if (oldAttributesInfo) {\n Object.keys(oldAttributesInfo).forEach((name) => {\n if (!(name in attributesInfo)) {\n element.removeAttribute(name);\n }\n });\n }\n\n // Adds new attributes\n Object.keys(attributesInfo).forEach((name) => {\n const value = attributesInfo[name];\n if (\n (!oldAttributesInfo || !Object.is(value, oldAttributesInfo[name])) &&\n typeof value !== 'undefined'\n ) {\n element.setAttribute(name, value);\n }\n });\n\n // Updates the cache\n attributesMapCache.set(part, attributesInfo);\n\n return this.render(attributesInfo);\n }\n\n /**\n * The rendering function that simply takes in the arguments to be used\n * in the update() function.\n *\n * @param attributesInfo The key-value pair to be set as the attribute name/value pairs.\n * @returns\n */\n render(attributesInfo: AttributesInfo) {\n return attributesInfo;\n }\n}\n\nconst spread = directive(SpreadDirective);\n\nexport default spread;\n"]}
1
+ {"version":3,"sources":["globals/directives/spread.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,aAAa,EACb,SAAS,EACT,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAG1B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAQD;;;;;;GAMG;AACH,cAAM,eAAgB,SAAQ,SAAS;IACrC;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,CAAC,cAAc,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC;IA8BvE;;;;;;OAMG;IACH,MAAM,CAAC,cAAc,EAAE,cAAc;CAGtC;AAED,QAAA,MAAM,MAAM,0GAA6B,CAAC;AAE1C,eAAe,MAAM,CAAC","file":"spread.d.ts","sourcesContent":["/**\n * @license\n *\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 {\n AttributePart,\n Directive,\n DirectiveParameters,\n} from 'lit/directive.js';\nimport { directive } from 'lit/async-directive.js';\n\nexport interface AttributesInfo {\n readonly [name: string]: string;\n}\n\n/**\n * Stores the ClassInfo object applied to a given AttributePart.\n * Used to unset existing values when a new ClassInfo object is applied.\n */\nconst attributesMapCache = new WeakMap();\n\n/**\n * A directive that applies attributes from a key-value pairs.\n * This must be used in the `...` name and must be the only part used in the attribute.\n * It applies the key-value pairs in the `attributesInfo` argument\n * and sets them as attribute name/value pairs.\n *\n */\nclass SpreadDirective extends Directive {\n /**\n * The update function that handles the attribute setting.\n *\n * @param part an object with an API to manage the element's DOM\n * @param attributesInfo The key-value pair to be set as the attribute name/value pairs.\n * @returns the render function\n */\n update(part: AttributePart, [attributesInfo]: DirectiveParameters<this>) {\n const { element } = part;\n\n // Removes old attributes that are no longer there\n const oldAttributesInfo = attributesMapCache.get(part);\n if (oldAttributesInfo) {\n Object.keys(oldAttributesInfo).forEach((name) => {\n if (!(name in attributesInfo)) {\n element.removeAttribute(name);\n }\n });\n }\n\n // Adds new attributes\n Object.keys(attributesInfo).forEach((name) => {\n const value = attributesInfo[name];\n if (\n (!oldAttributesInfo || !Object.is(value, oldAttributesInfo[name])) &&\n typeof value !== 'undefined'\n ) {\n element.setAttribute(name, value);\n }\n });\n\n // Updates the cache\n attributesMapCache.set(part, attributesInfo);\n\n return this.render(attributesInfo);\n }\n\n /**\n * The rendering function that simply takes in the arguments to be used\n * in the update() function.\n *\n * @param attributesInfo The key-value pair to be set as the attribute name/value pairs.\n * @returns the attributes info\n */\n render(attributesInfo: AttributesInfo) {\n return attributesInfo;\n }\n}\n\nconst spread = directive(SpreadDirective);\n\nexport default spread;\n"]}
@@ -63,7 +63,7 @@ class SpreadDirective extends Directive {
63
63
  * in the update() function.
64
64
  *
65
65
  * @param attributesInfo The key-value pair to be set as the attribute name/value pairs.
66
- * @returns
66
+ * @returns the attributes info
67
67
  */
68
68
  render(attributesInfo) {
69
69
  return attributesInfo;
@@ -1 +1 @@
1
- {"version":3,"file":"spread.js","names":["Directive","directive","attributesMapCache","WeakMap","SpreadDirective","update","part","attributesInfo","element","oldAttributesInfo","get","Object","keys","forEach","name","removeAttribute","value","is","setAttribute","set","render","spread"],"sources":["globals/directives/spread.ts"],"sourcesContent":["/**\n * @license\n *\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 {\n AttributePart,\n Directive,\n DirectiveParameters,\n} from 'lit/directive.js';\nimport { directive } from 'lit/async-directive.js';\n\nexport interface AttributesInfo {\n readonly [name: string]: string;\n}\n\n/**\n * Stores the ClassInfo object applied to a given AttributePart.\n * Used to unset existing values when a new ClassInfo object is applied.\n */\nconst attributesMapCache = new WeakMap();\n\n/**\n * A directive that applies attributes from a key-value pairs.\n * This must be used in the `...` name and must be the only part used in the attribute.\n * It applies the key-value pairs in the `attributesInfo` argument\n * and sets them as attribute name/value pairs.\n *\n */\nclass SpreadDirective extends Directive {\n /**\n * The update function that handles the attribute setting.\n *\n * @param part an object with an API to manage the element's DOM\n * @param attributesInfo The key-value pair to be set as the attribute name/value pairs.\n * @returns the render function\n */\n update(part: AttributePart, [attributesInfo]: DirectiveParameters<this>) {\n const { element } = part;\n\n // Removes old attributes that are no longer there\n const oldAttributesInfo = attributesMapCache.get(part);\n if (oldAttributesInfo) {\n Object.keys(oldAttributesInfo).forEach((name) => {\n if (!(name in attributesInfo)) {\n element.removeAttribute(name);\n }\n });\n }\n\n // Adds new attributes\n Object.keys(attributesInfo).forEach((name) => {\n const value = attributesInfo[name];\n if (\n (!oldAttributesInfo || !Object.is(value, oldAttributesInfo[name])) &&\n typeof value !== 'undefined'\n ) {\n element.setAttribute(name, value);\n }\n });\n\n // Updates the cache\n attributesMapCache.set(part, attributesInfo);\n\n return this.render(attributesInfo);\n }\n\n /**\n * The rendering function that simply takes in the arguments to be used\n * in the update() function.\n *\n * @param attributesInfo The key-value pair to be set as the attribute name/value pairs.\n * @returns\n */\n render(attributesInfo: AttributesInfo) {\n return attributesInfo;\n }\n}\n\nconst spread = directive(SpreadDirective);\n\nexport default spread;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAEEA,SAAS,QAEJ,kBAAkB;AACzB,SAASC,SAAS,QAAQ,wBAAwB;AAMlD;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAG,IAAIC,OAAO,EAAE;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,SAASJ,SAAS,CAAC;EACtC;AACF;AACA;AACA;AACA;AACA;AACA;EACEK,MAAMA,CAACC,IAAmB,EAAE,CAACC,cAAc,CAA4B,EAAE;IACvE,MAAM;MAAEC;IAAQ,CAAC,GAAGF,IAAI;;IAExB;IACA,MAAMG,iBAAiB,GAAGP,kBAAkB,CAACQ,GAAG,CAACJ,IAAI,CAAC;IACtD,IAAIG,iBAAiB,EAAE;MACrBE,MAAM,CAACC,IAAI,CAACH,iBAAiB,CAAC,CAACI,OAAO,CAAEC,IAAI,IAAK;QAC/C,IAAI,EAAEA,IAAI,IAAIP,cAAc,CAAC,EAAE;UAC7BC,OAAO,CAACO,eAAe,CAACD,IAAI,CAAC;QAC/B;MACF,CAAC,CAAC;IACJ;;IAEA;IACAH,MAAM,CAACC,IAAI,CAACL,cAAc,CAAC,CAACM,OAAO,CAAEC,IAAI,IAAK;MAC5C,MAAME,KAAK,GAAGT,cAAc,CAACO,IAAI,CAAC;MAClC,IACE,CAAC,CAACL,iBAAiB,IAAI,CAACE,MAAM,CAACM,EAAE,CAACD,KAAK,EAAEP,iBAAiB,CAACK,IAAI,CAAC,CAAC,KACjE,OAAOE,KAAK,KAAK,WAAW,EAC5B;QACAR,OAAO,CAACU,YAAY,CAACJ,IAAI,EAAEE,KAAK,CAAC;MACnC;IACF,CAAC,CAAC;;IAEF;IACAd,kBAAkB,CAACiB,GAAG,CAACb,IAAI,EAAEC,cAAc,CAAC;IAE5C,OAAO,IAAI,CAACa,MAAM,CAACb,cAAc,CAAC;EACpC;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEa,MAAMA,CAACb,cAA8B,EAAE;IACrC,OAAOA,cAAc;EACvB;AACF;AAEA,MAAMc,MAAM,GAAGpB,SAAS,CAACG,eAAe,CAAC;AAEzC,eAAeiB,MAAM"}
1
+ {"version":3,"file":"spread.js","names":["Directive","directive","attributesMapCache","WeakMap","SpreadDirective","update","part","attributesInfo","element","oldAttributesInfo","get","Object","keys","forEach","name","removeAttribute","value","is","setAttribute","set","render","spread"],"sources":["globals/directives/spread.ts"],"sourcesContent":["/**\n * @license\n *\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 {\n AttributePart,\n Directive,\n DirectiveParameters,\n} from 'lit/directive.js';\nimport { directive } from 'lit/async-directive.js';\n\nexport interface AttributesInfo {\n readonly [name: string]: string;\n}\n\n/**\n * Stores the ClassInfo object applied to a given AttributePart.\n * Used to unset existing values when a new ClassInfo object is applied.\n */\nconst attributesMapCache = new WeakMap();\n\n/**\n * A directive that applies attributes from a key-value pairs.\n * This must be used in the `...` name and must be the only part used in the attribute.\n * It applies the key-value pairs in the `attributesInfo` argument\n * and sets them as attribute name/value pairs.\n *\n */\nclass SpreadDirective extends Directive {\n /**\n * The update function that handles the attribute setting.\n *\n * @param part an object with an API to manage the element's DOM\n * @param attributesInfo The key-value pair to be set as the attribute name/value pairs.\n * @returns the render function\n */\n update(part: AttributePart, [attributesInfo]: DirectiveParameters<this>) {\n const { element } = part;\n\n // Removes old attributes that are no longer there\n const oldAttributesInfo = attributesMapCache.get(part);\n if (oldAttributesInfo) {\n Object.keys(oldAttributesInfo).forEach((name) => {\n if (!(name in attributesInfo)) {\n element.removeAttribute(name);\n }\n });\n }\n\n // Adds new attributes\n Object.keys(attributesInfo).forEach((name) => {\n const value = attributesInfo[name];\n if (\n (!oldAttributesInfo || !Object.is(value, oldAttributesInfo[name])) &&\n typeof value !== 'undefined'\n ) {\n element.setAttribute(name, value);\n }\n });\n\n // Updates the cache\n attributesMapCache.set(part, attributesInfo);\n\n return this.render(attributesInfo);\n }\n\n /**\n * The rendering function that simply takes in the arguments to be used\n * in the update() function.\n *\n * @param attributesInfo The key-value pair to be set as the attribute name/value pairs.\n * @returns the attributes info\n */\n render(attributesInfo: AttributesInfo) {\n return attributesInfo;\n }\n}\n\nconst spread = directive(SpreadDirective);\n\nexport default spread;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAEEA,SAAS,QAEJ,kBAAkB;AACzB,SAASC,SAAS,QAAQ,wBAAwB;AAMlD;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAG,IAAIC,OAAO,CA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  * There must be only one instance for one document.
22
22
  */
23
23
  class RadioGroupManager {
24
- /**
25
- * Radio groups, keyed by their names.
26
- */
27
-
28
24
  constructor(document) {
25
+ /**
26
+ * Radio groups, keyed by their names.
27
+ */
29
28
  _defineProperty(this, "_groups", {});
30
29
  this.constructor._instances.set(document, this);
31
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group-manager.js","names":["NAVIGATION_DIRECTION","RadioGroupManager","constructor","document","_defineProperty","_instances","set","shouldBeFocusable","radio","checked","name","group","_groups","hasSelectedItemInGroup","Array","from","some","item","isFirstInGroup","size","getSortedGroup","sort","lhs","rhs","comparisonResult","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","add","groups","Set","delete","select","readOnly","tabIndex","focus","forEach","navigate","direction","sortedGroup","newIndex","indexOf","length","get","found","WeakMap"],"sources":["globals/internal/radio-group-manager.ts"],"sourcesContent":["/**\n * @license\n *\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\n/**\n * The navigation direction.\n */\nexport enum NAVIGATION_DIRECTION {\n /**\n * Navigating backward.\n */\n BACKWARD = -1,\n\n /**\n * Navigating forward.\n */\n FORWARD = 1,\n}\n\nexport interface ManagedRadioButtonDelegate {\n /**\n * `true` if this radio button is selected.\n */\n checked: boolean;\n\n /**\n * The tab index.\n */\n tabIndex: number;\n\n /**\n * The name of the radio group.\n */\n name: string;\n\n /**\n * @param other A node to compare this radio button's DOM position in document with.\n * @returns\n * An integer value, the same format as `Node.compareDocumentPosition` does,\n * whose bits represent the calling this radio button's relationship to the given node within the document.\n */\n compareDocumentPosition(other: ManagedRadioButtonDelegate): number;\n\n /**\n * Focuses on the radio button.\n */\n focus(): void;\n}\n\ntype ManagedRadioButton = HTMLInputElement | ManagedRadioButtonDelegate;\n\n/**\n * An object that manages radio groups in a document.\n * There must be only one instance for one document.\n */\nclass RadioGroupManager {\n /**\n * Radio groups, keyed by their names.\n */\n private _groups: { [name: string]: Set<ManagedRadioButton> } = {};\n\n private constructor(document: Document) {\n (this.constructor as typeof RadioGroupManager)._instances.set(\n document,\n this\n );\n }\n\n /**\n * @param radio A radio button.\n * @returns\n * `true` if the given radio button should be focusable, which is either:\n * - The radio button is selected\n * - No radio button is selected and the radio button is first one in the radio group\n */\n shouldBeFocusable(radio: ManagedRadioButton) {\n if (radio.checked) {\n return true;\n }\n const { name } = radio;\n const group = this._groups[name];\n const hasSelectedItemInGroup =\n group && Array.from(group).some((item) => item.checked);\n if (hasSelectedItemInGroup) {\n return false;\n }\n const isFirstInGroup =\n !group || group.size === 1 || this.getSortedGroup(radio)[0] === radio;\n return isFirstInGroup;\n }\n\n /**\n * @param radio A radio button.\n * @returns The sorted radio group the given radio button is in.\n */\n getSortedGroup(radio: ManagedRadioButton) {\n const group = this._groups[radio.name];\n return (\n group &&\n Array.from(group).sort((lhs, rhs) => {\n const comparisonResult = (\n lhs as ManagedRadioButtonDelegate\n ).compareDocumentPosition(rhs as ManagedRadioButtonDelegate);\n // eslint-disable-next-line no-bitwise\n if (\n comparisonResult & Node.DOCUMENT_POSITION_FOLLOWING ||\n comparisonResult & Node.DOCUMENT_POSITION_CONTAINED_BY\n ) {\n return -1;\n }\n // eslint-disable-next-line no-bitwise\n if (\n comparisonResult & Node.DOCUMENT_POSITION_PRECEDING ||\n comparisonResult & Node.DOCUMENT_POSITION_CONTAINS\n ) {\n return 1;\n }\n return 0;\n })\n );\n }\n\n /**\n * Manages a radio button.\n *\n * @param radio The radio button to manage.\n * @returns This object.\n */\n add(radio: ManagedRadioButton) {\n const { name } = radio;\n if (name) {\n const groups = this._groups;\n if (!groups[name]) {\n groups[name] = new Set<ManagedRadioButton>();\n }\n groups[name].add(radio);\n }\n return this;\n }\n\n /**\n * Unmanages a radio button.\n *\n * @param radio The radio button to unmanage.\n * @param name The old name of the radio button to unmanage.\n * @returns `true` if `element` was actually managed.\n */\n delete(radio: ManagedRadioButton, name: string = radio.name) {\n const group = this._groups[name];\n return !group ? false : group.delete(radio);\n }\n\n /**\n * Selects or focuses on a radio button.\n *\n * @param radio The radio button to select.\n * @param readOnly optional if radio button has readOnly.\n */\n select(radio: ManagedRadioButton, readOnly?: boolean) {\n const group = this._groups[radio.name];\n if (group) {\n // Updates the state of the one being selected up-front to avoid the state of no radio button is selected\n radio.checked = !readOnly || true;\n radio.tabIndex = 0;\n radio.focus();\n group.forEach((item) => {\n if (radio !== item) {\n item.checked = readOnly || false;\n item.tabIndex = -1;\n }\n });\n }\n }\n\n /**\n * @param radio The currently selected radio button.\n * @param direction The direction to navigate to.\n * @returns The radio button that should be selected next.\n */\n navigate(radio: ManagedRadioButton, direction: NAVIGATION_DIRECTION) {\n const sortedGroup = this.getSortedGroup(radio);\n let newIndex = sortedGroup.indexOf(radio) + direction;\n if (newIndex < 0) {\n newIndex = sortedGroup.length - 1;\n } else if (newIndex >= sortedGroup.length) {\n newIndex = 0;\n }\n return sortedGroup[newIndex];\n }\n\n /**\n * `RadioGroupManager` instances associated with documents.\n */\n private static _instances = new WeakMap();\n\n /**\n * @param document A document element.\n * @returns The `RadioGroupManager` instance associated with the given document.\n */\n static get(document: Document) {\n const found = this._instances.get(document);\n return found || new RadioGroupManager(document);\n }\n}\n\nexport default RadioGroupManager;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,oBAAoB;AAU/B,WAVWA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;AAAA,GAApBA,oBAAoB,KAApBA,oBAAoB;AA4ChC;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,CAAC;EACtB;AACF;AACA;;EAGUC,WAAWA,CAACC,QAAkB,EAAE;IAAAC,eAAA,kBAFuB,CAAC,CAAC;IAG9D,IAAI,CAAC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ACJ;EACF;;EAEA;AACF;AACA;AACA;AACA;EACEG,QAAQA,CAAChC,KAAyB,EAAEiC,SAA+B,EAAE;IACnE,MAAMC,WAAW,GAAG,IAAI,CAACtB,cAAc,CAACZ,KAAK,CAAC;IAC9C,IAAImC,QAAQ,GAAGD,WAAW,CAACE,OAAO,CAACpC,KAAK,CAAC,GAAGiC,SAAS;IACrD,IAAIE,QAAQ,GAAG,CAAC,EAAE;MAChBA,QAAQ,GAAGD,WAAW,CAACG,MAAM,GAAG,CAAC;IACnC,CAAC,MAAM,IAAIF,QAAQ,IAAID,WAAW,CAACG,MAAM,EAAE;MACzCF,QAAQ,GAAG,CAAC;IACd;IACA,OAAOD,WAAW,CAACC,QAAQ,CAAC;EAC9B;;EAEA;AACF;AACA;;EAGE;AACF;AACA;AACA;EACE,OAAOG,GAAGA,CAAC3C,QAAkB,EAAE;IAC7B,MAAM4C,KAAK,GAAG,IAAI,CAAC1C,UAAU,CAACyC,GAAG,CAAC3C,QAAQ,CAAC;IAC3C,OAAO4C,KAAK,IAAI,IAAI9C,iBAAiB,CAACE,QAAQ,CAAC;EACjD;AACF;AAACC,eAAA,CApJKH,iBAAiB,gBA0IO,IAAI+C,OAAO,EAAE;AAY3C,eAAe/C,iBAAiB"}
1
+ {"version":3,"file":"radio-group-manager.js","names":["NAVIGATION_DIRECTION","RadioGroupManager","constructor","document","_defineProperty","_instances","set","shouldBeFocusable","radio","checked","name","group","_groups","hasSelectedItemInGroup","Array","from","some","item","isFirstInGroup","size","getSortedGroup","sort","lhs","rhs","comparisonResult","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","add","groups","Set","delete","select","readOnly","tabIndex","focus","forEach","navigate","direction","sortedGroup","newIndex","indexOf","length","get","found","WeakMap"],"sources":["globals/internal/radio-group-manager.ts"],"sourcesContent":["/**\n * @license\n *\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\n/**\n * The navigation direction.\n */\nexport enum NAVIGATION_DIRECTION {\n /**\n * Navigating backward.\n */\n BACKWARD = -1,\n\n /**\n * Navigating forward.\n */\n FORWARD = 1,\n}\n\nexport interface ManagedRadioButtonDelegate {\n /**\n * `true` if this radio button is selected.\n */\n checked: boolean;\n\n /**\n * The tab index.\n */\n tabIndex: number;\n\n /**\n * The name of the radio group.\n */\n name: string;\n\n /**\n * @param other A node to compare this radio button's DOM position in document with.\n * @returns\n * An integer value, the same format as `Node.compareDocumentPosition` does,\n * whose bits represent the calling this radio button's relationship to the given node within the document.\n */\n compareDocumentPosition(other: ManagedRadioButtonDelegate): number;\n\n /**\n * Focuses on the radio button.\n */\n focus(): void;\n}\n\ntype ManagedRadioButton = HTMLInputElement | ManagedRadioButtonDelegate;\n\n/**\n * An object that manages radio groups in a document.\n * There must be only one instance for one document.\n */\nclass RadioGroupManager {\n /**\n * Radio groups, keyed by their names.\n */\n private _groups: { [name: string]: Set<ManagedRadioButton> } = {};\n\n private constructor(document: Document) {\n (this.constructor as typeof RadioGroupManager)._instances.set(\n document,\n this\n );\n }\n\n /**\n * @param radio A radio button.\n * @returns\n * `true` if the given radio button should be focusable, which is either:\n * - The radio button is selected\n * - No radio button is selected and the radio button is first one in the radio group\n */\n shouldBeFocusable(radio: ManagedRadioButton) {\n if (radio.checked) {\n return true;\n }\n const { name } = radio;\n const group = this._groups[name];\n const hasSelectedItemInGroup =\n group && Array.from(group).some((item) => item.checked);\n if (hasSelectedItemInGroup) {\n return false;\n }\n const isFirstInGroup =\n !group || group.size === 1 || this.getSortedGroup(radio)[0] === radio;\n return isFirstInGroup;\n }\n\n /**\n * @param radio A radio button.\n * @returns The sorted radio group the given radio button is in.\n */\n getSortedGroup(radio: ManagedRadioButton) {\n const group = this._groups[radio.name];\n return (\n group &&\n Array.from(group).sort((lhs, rhs) => {\n const comparisonResult = (\n lhs as ManagedRadioButtonDelegate\n ).compareDocumentPosition(rhs as ManagedRadioButtonDelegate);\n // eslint-disable-next-line no-bitwise\n if (\n comparisonResult & Node.DOCUMENT_POSITION_FOLLOWING ||\n comparisonResult & Node.DOCUMENT_POSITION_CONTAINED_BY\n ) {\n return -1;\n }\n // eslint-disable-next-line no-bitwise\n if (\n comparisonResult & Node.DOCUMENT_POSITION_PRECEDING ||\n comparisonResult & Node.DOCUMENT_POSITION_CONTAINS\n ) {\n return 1;\n }\n return 0;\n })\n );\n }\n\n /**\n * Manages a radio button.\n *\n * @param radio The radio button to manage.\n * @returns This object.\n */\n add(radio: ManagedRadioButton) {\n const { name } = radio;\n if (name) {\n const groups = this._groups;\n if (!groups[name]) {\n groups[name] = new Set<ManagedRadioButton>();\n }\n groups[name].add(radio);\n }\n return this;\n }\n\n /**\n * Unmanages a radio button.\n *\n * @param radio The radio button to unmanage.\n * @param name The old name of the radio button to unmanage.\n * @returns `true` if `element` was actually managed.\n */\n delete(radio: ManagedRadioButton, name: string = radio.name) {\n const group = this._groups[name];\n return !group ? false : group.delete(radio);\n }\n\n /**\n * Selects or focuses on a radio button.\n *\n * @param radio The radio button to select.\n * @param readOnly optional if radio button has readOnly.\n */\n select(radio: ManagedRadioButton, readOnly?: boolean) {\n const group = this._groups[radio.name];\n if (group) {\n // Updates the state of the one being selected up-front to avoid the state of no radio button is selected\n radio.checked = !readOnly || true;\n radio.tabIndex = 0;\n radio.focus();\n group.forEach((item) => {\n if (radio !== item) {\n item.checked = readOnly || false;\n item.tabIndex = -1;\n }\n });\n }\n }\n\n /**\n * @param radio The currently selected radio button.\n * @param direction The direction to navigate to.\n * @returns The radio button that should be selected next.\n */\n navigate(radio: ManagedRadioButton, direction: NAVIGATION_DIRECTION) {\n const sortedGroup = this.getSortedGroup(radio);\n let newIndex = sortedGroup.indexOf(radio) + direction;\n if (newIndex < 0) {\n newIndex = sortedGroup.length - 1;\n } else if (newIndex >= sortedGroup.length) {\n newIndex = 0;\n }\n return sortedGroup[newIndex];\n }\n\n /**\n * `RadioGroupManager` instances associated with documents.\n */\n private static _instances = new WeakMap();\n\n /**\n * @param document A document element.\n * @returns The `RadioGroupManager` instance associated with the given document.\n */\n static get(document: Document) {\n const found = this._instances.get(document);\n return found || new RadioGroupManager(document);\n }\n}\n\nexport default RadioGroupManager;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,oBAAoB;AAU/B,WAVWA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;AAAA,GAApBA,oBAAoB,KAApBA,oBAAoB;AA4ChC;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,CAAC;EAMdC,WAAWA,CAACC,QAAkB,EAAE;IALxC;AACF;AACA;IAFEC,eAAA,kBAG+D,CAAC,CAAC;IAG9D,IAAI,CAACF,WAAW,CAA8BG,UAAU,CAACC,GAAG,CAC3DH,QAAQ,EACR,IACF,CAAC;EACH;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEI,iBAAiBA,CAACC,KAAyB,EAAE;IAC3C,IAAIA,KAAK,CAACC,OAAO,EAAE;MACjB,OAAO,IAAI;IACb;IACA,MAAM;MAAEC;IAAK,CAAC,GAAGF,KAAK;IACtB,MAAMG,KAAK,GAAG,IAAI,CAACC,OAAO,CAACF,IAAI,CAAC;IAChC,MAAMG,sBAAsB,GAC1BF,KAAK,IAAIG,KAAK,CAACC,IAAI,CAACJ,KAAK,CAAC,CAACK,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACR,OAAO,CAAC;IACzD,IAAII,sBAAsB,EAAE;MAC1B,OAAO,KAAK;IACd;IACA,MAAMK,cAAc,GAClB,CAACP,KAAK,IAAIA,KAAK,CAACQ,IAAI,KAAK,CAAC,IAAI,IAAI,CAACC,cAAc,CAACZ,KAAK,CAAC,CAAC,CAAC,CAAC,KAAKA,KAAK;IACvE,OAAOU,cAAc;EAC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C,iBAAiB,CAACE,QAAQ,CAAC;EACjD;AACF;AAACC,eAAA,CApJKH,iBAAiB,gBA0IO,IAAI+C,OAAO,CAAC,CAAC;AAY3C,eAAe/C,iBAAiB"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  *
4
- * Copyright IBM Corp. 2021, 2022
4
+ * Copyright IBM Corp. 2021, 2023
5
5
  *
6
6
  * This source code is licensed under the Apache-2.0 license found in the
7
7
  * LICENSE file in the root directory of this source tree.
@@ -1 +1 @@
1
- {"version":3,"sources":["globals/internal/storybook-cdn.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAyBH;;;;GAIG;AACH,eAAO,MAAM,KAAK;;YA2BjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,MAAM,cASlB,CAAC","file":"storybook-cdn.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2021, 2022\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 packageJson from '../../../package.json';\n\n/* eslint-disable max-len */\n\n/**\n *\n */\n/**\n * Renders the component(s) script tag content and returns back the string\n *\n * @param {Array} components array of component names\n * @param {string} tag tag folder\n * @param {boolean} isRTL flag to show rtl version\n */\nfunction _renderScript(components, tag, isRTL = false) {\n let scripts = '';\n const rtl = isRTL ? '.rtl' : '';\n components.forEach((component) => {\n scripts += `<script type=\"module\" src=\"https://1.www.s81c.com/common/carbon/web-components/${tag}/${component}${rtl}.min.js\"></script>\\n`;\n });\n return scripts;\n}\n\n/**\n * This is the markdown block for JS via CDN\n *\n * @param {Array} components array of components to render\n */\nexport const cdnJs = ({ components }) => {\n return `\n ### JS (via CDN)\n\n \\`\\`\\`html\n // SPECIFIC VERSION (available starting v1.6.0)\n ${_renderScript(components, `version/v${packageJson.version}`)}\n\n // LATEST tag\n ${_renderScript(components, 'tag/v1/latest')}\n \\`\\`\\`\n\n > NOTE: The latest tag is a moving version. While beneficial to\n > always stay on the most recent version, it is recommended to choose a specific\n > version and properly test your application when upgrading to a newer version.\n\n\n #### Right-to-left (RTL) versions\n\n \\`\\`\\`html\n // SPECIFIC VERSION (available starting v1.6.0)\n ${_renderScript(components, `version/v${packageJson.version}`, true)}\n\n // LATEST tag\n ${_renderScript(components, 'tag/v1/latest', true)}\n \\`\\`\\`\n `;\n};\n\n/**\n * This is the markdown block for CSS via CDN\n */\nexport const cdnCss = () => {\n return `\n### Carbon CDN style helpers (optional)\n\nThere are optional CDN artifacts available that can assist with global Carbon\nstyles in lieu of including into your specific application bundle.\n\n[Click here to learn more](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/main/packages/web-components/docs/carbon-cdn-style-helpers.md)\\n\\n\n `;\n};\n"]}
1
+ {"version":3,"sources":["globals/internal/storybook-cdn.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAyBH;;;;GAIG;AACH,eAAO,MAAM,KAAK;;YA2BjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,MAAM,cASlB,CAAC","file":"storybook-cdn.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2021, 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 packageJson from '../../../package.json';\n\n/* eslint-disable max-len */\n\n/**\n *\n */\n/**\n * Renders the component(s) script tag content and returns back the string\n *\n * @param {Array} components array of component names\n * @param {string} tag tag folder\n * @param {boolean} isRTL flag to show rtl version\n */\nfunction _renderScript(components, tag, isRTL = false) {\n let scripts = '';\n const rtl = isRTL ? '.rtl' : '';\n components.forEach((component) => {\n scripts += `<script type=\"module\" src=\"https://1.www.s81c.com/common/carbon/web-components/${tag}/${component}${rtl}.min.js\"></script>\\n`;\n });\n return scripts;\n}\n\n/**\n * This is the markdown block for JS via CDN\n *\n * @param {Array} components array of components to render\n */\nexport const cdnJs = ({ components }) => {\n return `\n ### JS (via CDN)\n\n \\`\\`\\`html\n // SPECIFIC VERSION (available starting v1.6.0)\n ${_renderScript(components, `version/v${packageJson.version}`)}\n\n // LATEST tag\n ${_renderScript(components, 'tag/latest')}\n \\`\\`\\`\n\n > NOTE: The latest tag is a moving version. While beneficial to\n > always stay on the most recent version, it is recommended to choose a specific\n > version and properly test your application when upgrading to a newer version.\n\n\n #### Right-to-left (RTL) versions\n\n \\`\\`\\`html\n // SPECIFIC VERSION (available starting v1.6.0)\n ${_renderScript(components, `version/v${packageJson.version}`, true)}\n\n // LATEST tag\n ${_renderScript(components, 'tag/latest', true)}\n \\`\\`\\`\n `;\n};\n\n/**\n * This is the markdown block for CSS via CDN\n */\nexport const cdnCss = () => {\n return `\n### Carbon CDN style helpers (optional)\n\nThere are optional CDN artifacts available that can assist with global Carbon\nstyles in lieu of including into your specific application bundle.\n\n[Click here to learn more](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/main/packages/web-components/docs/carbon-cdn-style-helpers.md)\\n\\n\n `;\n};\n"]}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  *
4
- * Copyright IBM Corp. 2021, 2022
4
+ * Copyright IBM Corp. 2021, 2023
5
5
  *
6
6
  * This source code is licensed under the Apache-2.0 license found in the
7
7
  * LICENSE file in the root directory of this source tree.
@@ -46,7 +46,7 @@ export const cdnJs = ({
46
46
  ${_renderScript(components, `version/v${packageJson.version}`)}
47
47
 
48
48
  // LATEST tag
49
- ${_renderScript(components, 'tag/v1/latest')}
49
+ ${_renderScript(components, 'tag/latest')}
50
50
  \`\`\`
51
51
 
52
52
  > NOTE: The latest tag is a moving version. While beneficial to
@@ -61,7 +61,7 @@ export const cdnJs = ({
61
61
  ${_renderScript(components, `version/v${packageJson.version}`, true)}
62
62
 
63
63
  // LATEST tag
64
- ${_renderScript(components, 'tag/v1/latest', true)}
64
+ ${_renderScript(components, 'tag/latest', true)}
65
65
  \`\`\`
66
66
  `;
67
67
  };
@@ -1 +1 @@
1
- {"version":3,"file":"storybook-cdn.js","names":["packageJson","_renderScript","components","tag","isRTL","scripts","rtl","forEach","component","cdnJs","version","cdnCss"],"sources":["globals/internal/storybook-cdn.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2021, 2022\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 packageJson from '../../../package.json';\n\n/* eslint-disable max-len */\n\n/**\n *\n */\n/**\n * Renders the component(s) script tag content and returns back the string\n *\n * @param {Array} components array of component names\n * @param {string} tag tag folder\n * @param {boolean} isRTL flag to show rtl version\n */\nfunction _renderScript(components, tag, isRTL = false) {\n let scripts = '';\n const rtl = isRTL ? '.rtl' : '';\n components.forEach((component) => {\n scripts += `<script type=\"module\" src=\"https://1.www.s81c.com/common/carbon/web-components/${tag}/${component}${rtl}.min.js\"></script>\\n`;\n });\n return scripts;\n}\n\n/**\n * This is the markdown block for JS via CDN\n *\n * @param {Array} components array of components to render\n */\nexport const cdnJs = ({ components }) => {\n return `\n ### JS (via CDN)\n\n \\`\\`\\`html\n // SPECIFIC VERSION (available starting v1.6.0)\n ${_renderScript(components, `version/v${packageJson.version}`)}\n\n // LATEST tag\n ${_renderScript(components, 'tag/v1/latest')}\n \\`\\`\\`\n\n > NOTE: The latest tag is a moving version. While beneficial to\n > always stay on the most recent version, it is recommended to choose a specific\n > version and properly test your application when upgrading to a newer version.\n\n\n #### Right-to-left (RTL) versions\n\n \\`\\`\\`html\n // SPECIFIC VERSION (available starting v1.6.0)\n ${_renderScript(components, `version/v${packageJson.version}`, true)}\n\n // LATEST tag\n ${_renderScript(components, 'tag/v1/latest', true)}\n \\`\\`\\`\n `;\n};\n\n/**\n * This is the markdown block for CSS via CDN\n */\nexport const cdnCss = () => {\n return `\n### Carbon CDN style helpers (optional)\n\nThere are optional CDN artifacts available that can assist with global Carbon\nstyles in lieu of including into your specific application bundle.\n\n[Click here to learn more](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/main/packages/web-components/docs/carbon-cdn-style-helpers.md)\\n\\n\n `;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,WAAW,MAAM,uBAAuB;;AAE/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,aAAaA,CAACC,UAAU,EAAEC,GAAG,EAAEC,KAAK,GAAG,KAAK,EAAE;EACrD,IAAIC,OAAO,GAAG,EAAE;EAChB,MAAMC,GAAG,GAAGF,KAAK,GAAG,MAAM,GAAG,EAAE;EAC/BF,UAAU,CAACK,OAAO,CAAEC,SAAS,IAAK;IAChCH,OAAO,IAAK,kFAAiFF,GAAI,IAAGK,SAAU,GAAEF,GAAI,sBAAqB;EAC3I,CAAC,CAAC;EACF,OAAOD,OAAO;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,KAAK,GAAGA,CAAC;EAAEP;AAAW,CAAC,KAAK;EACvC,OAAQ;AACV;AACA;AACA;AACA;AACA,GAAGD,aAAa,CAACC,UAAU,EAAG,YAAWF,WAAW,CAACU,OAAQ,EAAC,CAAE;AAChE;AACA;AACA,GAAGT,aAAa,CAACC,UAAU,EAAE,eAAe,CAAE;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAGD,aAAa,CAACC,UAAU,EAAG,YAAWF,WAAW,CAACU,OAAQ,EAAC,EAAE,IAAI,CAAE;AACtE;AACA;AACA,GAAGT,aAAa,CAACC,UAAU,EAAE,eAAe,EAAE,IAAI,CAAE;AACpD;AACA,IAAI;AACJ,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMS,MAAM,GAAGA,CAAA,KAAM;EAC1B,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC"}
1
+ {"version":3,"file":"storybook-cdn.js","names":["packageJson","_renderScript","components","tag","isRTL","scripts","rtl","forEach","component","cdnJs","version","cdnCss"],"sources":["globals/internal/storybook-cdn.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2021, 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 packageJson from '../../../package.json';\n\n/* eslint-disable max-len */\n\n/**\n *\n */\n/**\n * Renders the component(s) script tag content and returns back the string\n *\n * @param {Array} components array of component names\n * @param {string} tag tag folder\n * @param {boolean} isRTL flag to show rtl version\n */\nfunction _renderScript(components, tag, isRTL = false) {\n let scripts = '';\n const rtl = isRTL ? '.rtl' : '';\n components.forEach((component) => {\n scripts += `<script type=\"module\" src=\"https://1.www.s81c.com/common/carbon/web-components/${tag}/${component}${rtl}.min.js\"></script>\\n`;\n });\n return scripts;\n}\n\n/**\n * This is the markdown block for JS via CDN\n *\n * @param {Array} components array of components to render\n */\nexport const cdnJs = ({ components }) => {\n return `\n ### JS (via CDN)\n\n \\`\\`\\`html\n // SPECIFIC VERSION (available starting v1.6.0)\n ${_renderScript(components, `version/v${packageJson.version}`)}\n\n // LATEST tag\n ${_renderScript(components, 'tag/latest')}\n \\`\\`\\`\n\n > NOTE: The latest tag is a moving version. While beneficial to\n > always stay on the most recent version, it is recommended to choose a specific\n > version and properly test your application when upgrading to a newer version.\n\n\n #### Right-to-left (RTL) versions\n\n \\`\\`\\`html\n // SPECIFIC VERSION (available starting v1.6.0)\n ${_renderScript(components, `version/v${packageJson.version}`, true)}\n\n // LATEST tag\n ${_renderScript(components, 'tag/latest', true)}\n \\`\\`\\`\n `;\n};\n\n/**\n * This is the markdown block for CSS via CDN\n */\nexport const cdnCss = () => {\n return `\n### Carbon CDN style helpers (optional)\n\nThere are optional CDN artifacts available that can assist with global Carbon\nstyles in lieu of including into your specific application bundle.\n\n[Click here to learn more](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/main/packages/web-components/docs/carbon-cdn-style-helpers.md)\\n\\n\n `;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,WAAW,MAAM,uBAAuB;;AAE/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,aAAaA,CAACC,UAAU,EAAEC,GAAG,EAAEC,KAAK,GAAG,KAAK,EAAE;EACrD,IAAIC,OAAO,GAAG,EAAE;EAChB,MAAMC,GAAG,GAAGF,KAAK,GAAG,MAAM,GAAG,EAAE;EAC/BF,UAAU,CAACK,OAAO,CAAEC,SAAS,IAAK;IAChCH,OAAO,IAAK,kFAAiFF,GAAI,IAAGK,SAAU,GAAEF,GAAI,sBAAqB;EAC3I,CAAC,CAAC;EACF,OAAOD,OAAO;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,KAAK,GAAGA,CAAC;EAAEP;AAAW,CAAC,KAAK;EACvC,OAAQ;AACV;AACA;AACA;AACA;AACA,GAAGD,aAAa,CAACC,UAAU,EAAG,YAAWF,WAAW,CAACU,OAAQ,EAAC,CAAE;AAChE;AACA;AACA,GAAGT,aAAa,CAACC,UAAU,EAAE,YAAY,CAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAGD,aAAa,CAACC,UAAU,EAAG,YAAWF,WAAW,CAACU,OAAQ,EAAC,EAAE,IAAI,CAAE;AACtE;AACA;AACA,GAAGT,aAAa,CAACC,UAAU,EAAE,YAAY,EAAE,IAAI,CAAE;AACjD;AACA,IAAI;AACJ,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMS,MAAM,GAAGA,CAAA,KAAM;EAC1B,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"focus.js","names":["selectorTabbable","FocusMixin","Base","focus","shadowRoot","delegatesFocus","delegateTarget","querySelector"],"sources":["globals/mixins/focus.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2022\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 { selectorTabbable } from '../settings';\n\n/**\n * @param Base The base class.\n * @returns A mix-in implementing `.focus()` method that focuses on the first focusable element in the shadow DOM.\n */\nconst FocusMixin = <T extends Constructor<HTMLElement>>(Base: T) =>\n class extends Base {\n /**\n * Focuses on the first focusable element in the shadow DOM.\n */\n focus() {\n // @ts-ignore: Until `delegatesFocus` is added to `ShadowRoot` definition\n if (this.shadowRoot!.delegatesFocus) {\n super.focus();\n } else {\n const delegateTarget =\n this.shadowRoot!.querySelector(selectorTabbable) ||\n this.querySelector(selectorTabbable);\n if (delegateTarget) {\n (delegateTarget as HTMLElement).focus();\n } else {\n super.focus();\n }\n }\n }\n };\n\nexport default FocusMixin;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,gBAAgB,QAAQ,aAAa;;AAE9C;AACA;AACA;AACA;AACA,MAAMC,UAAU,GAAwCC,IAAO,IAC7D,cAAcA,IAAI,CAAC;EACjB;AACJ;AACA;EACIC,KAAKA,CAAA,EAAG;IACN;IACA,IAAI,IAAI,CAACC,UAAU,CAAEC,cAAc,EAAE;MACnC,KAAK,CAACF,KAAK,EAAE;IACf,CAAC,MAAM;MACL,MAAMG,cAAc,GAClB,IAAI,CAACF,UAAU,CAAEG,aAAa,CAACP,gBAAgB,CAAC,IAChD,IAAI,CAACO,aAAa,CAACP,gBAAgB,CAAC;MACtC,IAAIM,cAAc,EAAE;QACjBA,cAAc,CAAiBH,KAAK,EAAE;MACzC,CAAC,MAAM;QACL,KAAK,CAACA,KAAK,EAAE;MACf;IACF;EACF;AACF,CAAC;AAEH,eAAeF,UAAU"}
1
+ {"version":3,"file":"focus.js","names":["selectorTabbable","FocusMixin","Base","focus","shadowRoot","delegatesFocus","delegateTarget","querySelector"],"sources":["globals/mixins/focus.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2022\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 { selectorTabbable } from '../settings';\n\n/**\n * @param Base The base class.\n * @returns A mix-in implementing `.focus()` method that focuses on the first focusable element in the shadow DOM.\n */\nconst FocusMixin = <T extends Constructor<HTMLElement>>(Base: T) =>\n class extends Base {\n /**\n * Focuses on the first focusable element in the shadow DOM.\n */\n focus() {\n // @ts-ignore: Until `delegatesFocus` is added to `ShadowRoot` definition\n if (this.shadowRoot!.delegatesFocus) {\n super.focus();\n } else {\n const delegateTarget =\n this.shadowRoot!.querySelector(selectorTabbable) ||\n this.querySelector(selectorTabbable);\n if (delegateTarget) {\n (delegateTarget as HTMLElement).focus();\n } else {\n super.focus();\n }\n }\n }\n };\n\nexport default FocusMixin;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,gBAAgB,QAAQ,aAAa;;AAE9C;AACA;AACA;AACA;AACA,MAAMC,UAAU,GAAwCC,IAAO,IAC7D,cAAcA,IAAI,CAAC;EACjB;AACJ;AACA;EACIC,KAAKA,CAAA,EAAG;IACN;IACA,IAAI,IAAI,CAACC,UAAU,CAAEC,cAAc,EAAE;MACnC,KAAK,CAACF,KAAK,CAAC,CAAC;IACf,CAAC,MAAM;MACL,MAAMG,cAAc,GAClB,IAAI,CAACF,UAAU,CAAEG,aAAa,CAACP,gBAAgB,CAAC,IAChD,IAAI,CAACO,aAAa,CAACP,gBAAgB,CAAC;MACtC,IAAIM,cAAc,EAAE;QACjBA,cAAc,CAAiBH,KAAK,CAAC,CAAC;MACzC,CAAC,MAAM;QACL,KAAK,CAACA,KAAK,CAAC,CAAC;MACf;IACF;EACF;AACF,CAAC;AAEH,eAAeF,UAAU"}
@@ -26,7 +26,12 @@ const FormMixin = Base => {
26
26
  * @private
27
27
  */
28
28
  _defineProperty(this, "_hFormdata", null);
29
- }
29
+ } // Not using TypeScript `private` due to: microsoft/TypeScript#17744
30
+ /**
31
+ * Handles `formdata` event.
32
+ *
33
+ * @param event The event.
34
+ */
30
35
  connectedCallback() {
31
36
  // @ts-ignore
32
37
  super.connectedCallback();
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","names":["on","FormMixin","Base","FormMixinImpl","constructor","args","_defineProperty","connectedCallback","form","closest","_hFormdata","_handleFormdata","bind","disconnectedCallback","release"],"sources":["globals/mixins/form.ts"],"sourcesContent":["/**\n * @license\n *\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 on from './on';\nimport Handle from '../internal/handle';\n\n/**\n * @param Base The base class.\n * @returns A mix-in to handle `formdata` event on the containing form.\n */\nconst FormMixin = <T extends Constructor<HTMLElement>>(Base: T) => {\n /**\n * A mix-in class to handle `formdata` event on the containing form.\n */\n abstract class FormMixinImpl extends Base {\n /**\n * The handle for `formdata` event listener on the containing form.\n *\n * @private\n */\n _hFormdata: Handle | null = null; // Not using TypeScript `private` due to: microsoft/TypeScript#17744\n\n /**\n * Handles `formdata` event.\n *\n * @param event The event.\n */\n abstract _handleFormdata(event: Event): void;\n\n connectedCallback() {\n // @ts-ignore\n super.connectedCallback();\n const form = this.closest('form');\n if (form) {\n this._hFormdata = on(form, 'formdata', this._handleFormdata.bind(this));\n }\n }\n\n disconnectedCallback() {\n if (this._hFormdata) {\n this._hFormdata = this._hFormdata.release();\n }\n // @ts-ignore\n super.disconnectedCallback();\n }\n }\n return FormMixinImpl;\n};\n\nexport default FormMixin;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,EAAE,MAAM,MAAM;AAGrB;AACA;AACA;AACA;AACA,MAAMC,SAAS,GAAwCC,IAAO,IAAK;EACjE;AACF;AACA;EACE,MAAeC,aAAa,SAASD,IAAI,CAAC;IAAAE,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MACxC;AACJ;AACA;AACA;AACA;MAJIC,eAAA,qBAK4B,IAAI;IAAA;IAShCC,iBAAiBA,CAAA,EAAG;MAClB;MACA,KAAK,CAACA,iBAAiB,EAAE;MACzB,MAAMC,IAAI,GAAG,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC;MACjC,IAAID,IAAI,EAAE;QACR,IAAI,CAACE,UAAU,GAAGV,EAAE,CAACQ,IAAI,EAAE,UAAU,EAAE,IAAI,CAACG,eAAe,CAACC,IAAI,CAAC,IAAI,CAAC,CAAC;MACzE;IACF;IAEAC,oBAAoBA,CAAA,EAAG;MACrB,IAAI,IAAI,CAACH,UAAU,EAAE;QACnB,IAAI,CAACA,UAAU,GAAG,IAAI,CAACA,UAAU,CAACI,OAAO,EAAE;MAC7C;MACA;MACA,KAAK,CAACD,oBAAoB,EAAE;IAC9B;EACF;EACA,OAAOV,aAAa;AACtB,CAAC;AAED,eAAeF,SAAS"}
1
+ {"version":3,"file":"form.js","names":["on","FormMixin","Base","FormMixinImpl","constructor","args","_defineProperty","connectedCallback","form","closest","_hFormdata","_handleFormdata","bind","disconnectedCallback","release"],"sources":["globals/mixins/form.ts"],"sourcesContent":["/**\n * @license\n *\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 on from './on';\nimport Handle from '../internal/handle';\n\n/**\n * @param Base The base class.\n * @returns A mix-in to handle `formdata` event on the containing form.\n */\nconst FormMixin = <T extends Constructor<HTMLElement>>(Base: T) => {\n /**\n * A mix-in class to handle `formdata` event on the containing form.\n */\n abstract class FormMixinImpl extends Base {\n /**\n * The handle for `formdata` event listener on the containing form.\n *\n * @private\n */\n _hFormdata: Handle | null = null; // Not using TypeScript `private` due to: microsoft/TypeScript#17744\n\n /**\n * Handles `formdata` event.\n *\n * @param event The event.\n */\n abstract _handleFormdata(event: Event): void;\n\n connectedCallback() {\n // @ts-ignore\n super.connectedCallback();\n const form = this.closest('form');\n if (form) {\n this._hFormdata = on(form, 'formdata', this._handleFormdata.bind(this));\n }\n }\n\n disconnectedCallback() {\n if (this._hFormdata) {\n this._hFormdata = this._hFormdata.release();\n }\n // @ts-ignore\n super.disconnectedCallback();\n }\n }\n return FormMixinImpl;\n};\n\nexport default FormMixin;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,EAAE,MAAM,MAAM;AAGrB;AACA;AACA;AACA;AACA,MAAMC,SAAS,GAAwCC,IAAO,IAAK;EACjE;AACF;AACA;EACE,MAAeC,aAAa,SAASD,IAAI,CAAC;IAAAE,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MACxC;AACJ;AACA;AACA;AACA;MAJIC,eAAA,qBAK4B,IAAI;IAAA,EAAE;IAElC;AACJ;AACA;AACA;AACA;IAGIC,iBAAiBA,CAAA,EAAG;MAClB;MACA,KAAK,CAACA,iBAAiB,CAAC,CAAC;MACzB,MAAMC,IAAI,GAAG,IAAI,CAACC,OAAO,CAAC,MAAM,CAAC;MACjC,IAAID,IAAI,EAAE;QACR,IAAI,CAACE,UAAU,GAAGV,EAAE,CAACQ,IAAI,EAAE,UAAU,EAAE,IAAI,CAACG,eAAe,CAACC,IAAI,CAAC,IAAI,CAAC,CAAC;MACzE;IACF;IAEAC,oBAAoBA,CAAA,EAAG;MACrB,IAAI,IAAI,CAACH,UAAU,EAAE;QACnB,IAAI,CAACA,UAAU,GAAG,IAAI,CAACA,UAAU,CAACI,OAAO,CAAC,CAAC;MAC7C;MACA;MACA,KAAK,CAACD,oBAAoB,CAAC,CAAC;IAC9B;EACF;EACA,OAAOV,aAAa;AACtB,CAAC;AAED,eAAeF,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"host-listener.js","names":["on","EVENT_NAME_FORMAT","HostListenerMixin","Base","HostListenerMixinImpl","constructor","args","_defineProperty","Set","connectedCallback","hostListeners","_hostListeners","Object","keys","forEach","listenerName","type","_unprefixedType","tokens","exec","Error","targetName","unprefixedType","target","document","ownerDocument","window","defaultView","parentRoot","getRootNode","shadowRoot","options","_handles","add","disconnectedCallback","handle","release","delete"],"sources":["globals/mixins/host-listener.ts"],"sourcesContent":["/**\n * @license\n *\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 on from './on';\nimport Handle from '../internal/handle';\n\n/**\n * The format for the event name used by `@HostListener` decorator.\n */\nconst EVENT_NAME_FORMAT =\n /^((document|window|parentRoot|shadowRoot):)?([\\w-]+)$/;\n\n/**\n * @param Base The base class.\n * @returns A mix-in that sets up and cleans up event listeners defined by `@HostListener` decorator.\n */\nconst HostListenerMixin = <T extends Constructor<HTMLElement>>(Base: T) => {\n /**\n * A mix-in class that sets up and cleans up event listeners defined by `@HostListener` decorator.\n */\n class HostListenerMixinImpl extends Base {\n /**\n * The list of handles managed by this mix-in.\n *\n * @private\n */\n _handles: Set<Handle> = new Set(); // Not using TypeScript `private` due to: microsoft/TypeScript#17744\n\n connectedCallback() {\n // @ts-ignore: Until `connectedCallback` is added to `HTMLElement` definition\n super.connectedCallback();\n const hostListeners = (this.constructor as typeof HostListenerMixinImpl)\n ._hostListeners;\n Object.keys(hostListeners).forEach((listenerName) => {\n Object.keys(hostListeners[listenerName]).forEach((type) => {\n // Parses `document:click`/`window:click` format\n const tokens = EVENT_NAME_FORMAT.exec(type);\n if (!tokens) {\n throw new Error(`Could not parse the event name: ${listenerName}`);\n }\n const [, , targetName, unprefixedType] = tokens;\n const target: EventTarget =\n {\n document: this.ownerDocument,\n window: this.ownerDocument!.defaultView,\n parentRoot: this.getRootNode(),\n shadowRoot: this.shadowRoot,\n }[targetName] || this;\n\n const { options } = hostListeners[listenerName][type];\n\n this._handles.add(\n on(\n target,\n ((this.constructor as typeof Base)[unprefixedType] ??\n unprefixedType) as keyof HTMLElementEventMap,\n this[listenerName],\n options\n )\n );\n });\n });\n }\n\n disconnectedCallback() {\n this._handles.forEach((handle) => {\n handle.release();\n this._handles.delete(handle);\n });\n // @ts-ignore: Until `disconnectedCallback` is added to `HTMLElement` definition\n super.disconnectedCallback();\n }\n\n /**\n * The map, keyed by method name, of event listeners that should be attached to host element or host document.\n *\n * @private\n */\n static _hostListeners: {\n [listenerName: string]: {\n [type: string]: {\n options?: boolean | AddEventListenerOptions;\n };\n };\n } = {}; // Not using TypeScript `private` due to: microsoft/TypeScript#17744\n }\n\n return HostListenerMixinImpl;\n};\n\nexport default HostListenerMixin;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,EAAE,MAAM,MAAM;AAGrB;AACA;AACA;AACA,MAAMC,iBAAiB,GACrB,uDAAuD;;AAEzD;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,GAAwCC,IAAO,IAAK;EACzE;AACF;AACA;EACE,MAAMC,qBAAqB,SAASD,IAAI,CAAC;IAAAE,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MACvC;AACJ;AACA;AACA;AACA;MAJIC,eAAA,mBAKwB,IAAIC,GAAG,EAAE;IAAA;IAAE;;IAEnCC,iBAAiBA,CAAA,EAAG;MAClB;MACA,KAAK,CAACA,iBAAiB,EAAE;MACzB,MAAMC,aAAa,GAAI,IAAI,CAACL,WAAW,CACpCM,cAAc;MACjBC,MAAM,CAACC,IAAI,CAACH,aAAa,CAAC,CAACI,OAAO,CAAEC,YAAY,IAAK;QACnDH,MAAM,CAACC,IAAI,CAACH,aAAa,CAACK,YAAY,CAAC,CAAC,CAACD,OAAO,CAAEE,IAAI,IAAK;UAAA,IAAAC,eAAA;UACzD;UACA,MAAMC,MAAM,GAAGjB,iBAAiB,CAACkB,IAAI,CAACH,IAAI,CAAC;UAC3C,IAAI,CAACE,MAAM,EAAE;YACX,MAAM,IAAIE,KAAK,CAAE,mCAAkCL,YAAa,EAAC,CAAC;UACpE;UACA,MAAM,IAAKM,UAAU,EAAEC,cAAc,CAAC,GAAGJ,MAAM;UAC/C,MAAMK,MAAmB,GACvB;YACEC,QAAQ,EAAE,IAAI,CAACC,aAAa;YAC5BC,MAAM,EAAE,IAAI,CAACD,aAAa,CAAEE,WAAW;YACvCC,UAAU,EAAE,IAAI,CAACC,WAAW,EAAE;YAC9BC,UAAU,EAAE,IAAI,CAACA;UACnB,CAAC,CAACT,UAAU,CAAC,IAAI,IAAI;UAEvB,MAAM;YAAEU;UAAQ,CAAC,GAAGrB,aAAa,CAACK,YAAY,CAAC,CAACC,IAAI,CAAC;UAErD,IAAI,CAACgB,QAAQ,CAACC,GAAG,CACfjC,EAAE,CACAuB,MAAM,GAAAN,eAAA,GACJ,IAAI,CAACZ,WAAW,CAAiBiB,cAAc,CAAC,cAAAL,eAAA,cAAAA,eAAA,GAChDK,cAAc,EAChB,IAAI,CAACP,YAAY,CAAC,EAClBgB,OAAO,CACR,CACF;QACH,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ;IAEAG,oBAAoBA,CAAA,EAAG;MACrB,IAAI,CAACF,QAAQ,CAAClB,OAAO,CAAEqB,MAAM,IAAK;QAChCA,MAAM,CAACC,OAAO,EAAE;QAChB,IAAI,CAACJ,QAAQ,CAACK,MAAM,CAACF,MAAM,CAAC;MAC9B,CAAC,CAAC;MACF;MACA,KAAK,CAACD,oBAAoB,EAAE;IAC9B;;IAEA;AACJ;AACA;AACA;AACA;;IAOY;EACV;EAAC3B,eAAA,CAjEKH,qBAAqB,oBAgErB,CAAC,CAAC;EAGR,OAAOA,qBAAqB;AAC9B,CAAC;AAED,eAAeF,iBAAiB"}
1
+ {"version":3,"file":"host-listener.js","names":["on","EVENT_NAME_FORMAT","HostListenerMixin","Base","HostListenerMixinImpl","constructor","args","_defineProperty","Set","connectedCallback","hostListeners","_hostListeners","Object","keys","forEach","listenerName","type","_unprefixedType","tokens","exec","Error","targetName","unprefixedType","target","document","ownerDocument","window","defaultView","parentRoot","getRootNode","shadowRoot","options","_handles","add","disconnectedCallback","handle","release","delete"],"sources":["globals/mixins/host-listener.ts"],"sourcesContent":["/**\n * @license\n *\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 on from './on';\nimport Handle from '../internal/handle';\n\n/**\n * The format for the event name used by `@HostListener` decorator.\n */\nconst EVENT_NAME_FORMAT =\n /^((document|window|parentRoot|shadowRoot):)?([\\w-]+)$/;\n\n/**\n * @param Base The base class.\n * @returns A mix-in that sets up and cleans up event listeners defined by `@HostListener` decorator.\n */\nconst HostListenerMixin = <T extends Constructor<HTMLElement>>(Base: T) => {\n /**\n * A mix-in class that sets up and cleans up event listeners defined by `@HostListener` decorator.\n */\n class HostListenerMixinImpl extends Base {\n /**\n * The list of handles managed by this mix-in.\n *\n * @private\n */\n _handles: Set<Handle> = new Set(); // Not using TypeScript `private` due to: microsoft/TypeScript#17744\n\n connectedCallback() {\n // @ts-ignore: Until `connectedCallback` is added to `HTMLElement` definition\n super.connectedCallback();\n const hostListeners = (this.constructor as typeof HostListenerMixinImpl)\n ._hostListeners;\n Object.keys(hostListeners).forEach((listenerName) => {\n Object.keys(hostListeners[listenerName]).forEach((type) => {\n // Parses `document:click`/`window:click` format\n const tokens = EVENT_NAME_FORMAT.exec(type);\n if (!tokens) {\n throw new Error(`Could not parse the event name: ${listenerName}`);\n }\n const [, , targetName, unprefixedType] = tokens;\n const target: EventTarget =\n {\n document: this.ownerDocument,\n window: this.ownerDocument!.defaultView,\n parentRoot: this.getRootNode(),\n shadowRoot: this.shadowRoot,\n }[targetName] || this;\n\n const { options } = hostListeners[listenerName][type];\n\n this._handles.add(\n on(\n target,\n ((this.constructor as typeof Base)[unprefixedType] ??\n unprefixedType) as keyof HTMLElementEventMap,\n this[listenerName],\n options\n )\n );\n });\n });\n }\n\n disconnectedCallback() {\n this._handles.forEach((handle) => {\n handle.release();\n this._handles.delete(handle);\n });\n // @ts-ignore: Until `disconnectedCallback` is added to `HTMLElement` definition\n super.disconnectedCallback();\n }\n\n /**\n * The map, keyed by method name, of event listeners that should be attached to host element or host document.\n *\n * @private\n */\n static _hostListeners: {\n [listenerName: string]: {\n [type: string]: {\n options?: boolean | AddEventListenerOptions;\n };\n };\n } = {}; // Not using TypeScript `private` due to: microsoft/TypeScript#17744\n }\n\n return HostListenerMixinImpl;\n};\n\nexport default HostListenerMixin;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,EAAE,MAAM,MAAM;AAGrB;AACA;AACA;AACA,MAAMC,iBAAiB,GACrB,uDAAuD;;AAEzD;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,GAAwCC,IAAO,IAAK;EACzE;AACF;AACA;EACE,MAAMC,qBAAqB,SAASD,IAAI,CAAC;IAAAE,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MACvC;AACJ;AACA;AACA;AACA;MAJIC,eAAA,mBAKwB,IAAIC,GAAG,CAAC,CAAC;IAAA;IAAE;;IAEnCC,iBAAiBA,CAAA,EAAG;MAClB;MACA,KAAK,CAACA,iBAAiB,CAAC,CAAC;MACzB,MAAMC,aAAa,GAAI,IAAI,CAACL,WAAW,CACpCM,cAAc;MACjBC,MAAM,CAACC,IAAI,CAACH,aAAa,CAAC,CAACI,OAAO,CAAEC,YAAY,IAAK;QACnDH,MAAM,CAACC,IAAI,CAACH,aAAa,CAACK,YAAY,CAAC,CAAC,CAACD,OAAO,CAAEE,IAAI,IAAK;UAAA,IAAAC,eAAA;UACzD;UACA,MAAMC,MAAM,GAAGjB,iBAAiB,CAACkB,IAAI,CAACH,IAAI,CAAC;UAC3C,IAAI,CAACE,MAAM,EAAE;YACX,MAAM,IAAIE,KAAK,CAAE,mCAAkCL,YAAa,EAAC,CAAC;UACpE;UACA,MAAM,IAAKM,UAAU,EAAEC,cAAc,CAAC,GAAGJ,MAAM;UAC/C,MAAMK,MAAmB,GACvB;YACEC,QAAQ,EAAE,IAAI,CAACC,aAAa;YAC5BC,MAAM,EAAE,IAAI,CAACD,aAAa,CAAEE,WAAW;YACvCC,UAAU,EAAE,IAAI,CAACC,WAAW,CAAC,CAAC;YAC9BC,UAAU,EAAE,IAAI,CAACA;UACnB,CAAC,CAACT,UAAU,CAAC,IAAI,IAAI;UAEvB,MAAM;YAAEU;UAAQ,CAAC,GAAGrB,aAAa,CAACK,YAAY,CAAC,CAACC,IAAI,CAAC;UAErD,IAAI,CAACgB,QAAQ,CAACC,GAAG,CACfjC,EAAE,CACAuB,MAAM,GAAAN,eAAA,GACJ,IAAI,CAACZ,WAAW,CAAiBiB,cAAc,CAAC,cAAAL,eAAA,cAAAA,eAAA,GAChDK,cAAc,EAChB,IAAI,CAACP,YAAY,CAAC,EAClBgB,OACF,CACF,CAAC;QACH,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ;IAEAG,oBAAoBA,CAAA,EAAG;MACrB,IAAI,CAACF,QAAQ,CAAClB,OAAO,CAAEqB,MAAM,IAAK;QAChCA,MAAM,CAACC,OAAO,CAAC,CAAC;QAChB,IAAI,CAACJ,QAAQ,CAACK,MAAM,CAACF,MAAM,CAAC;MAC9B,CAAC,CAAC;MACF;MACA,KAAK,CAACD,oBAAoB,CAAC,CAAC;IAC9B;;IAEA;AACJ;AACA;AACA;AACA;;IAOY;EACV;EAAC3B,eAAA,CAjEKH,qBAAqB,oBAgErB,CAAC,CAAC;EAGR,OAAOA,qBAAqB;AAC9B,CAAC;AAED,eAAeF,iBAAiB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2019, 2020
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import { css } from 'lit';
10
+ export default css([
11
+ ':root{--cds-layout-size-height-xs:1.5rem;--cds-layout-size-height-sm:2rem;--cds-layout-size-height-md:2.5rem;--cds-layout-size-height-lg:3rem;--cds-layout-size-height-xl:4rem;--cds-layout-size-height-2xl:5rem;--cds-layout-size-height-min:0px;--cds-layout-size-height-max:999999999px;--cds-layout-density-padding-inline-condensed:0.5rem;--cds-layout-density-padding-inline-normal:1rem;--cds-layout-density-padding-inline-min:0px;--cds-layout-density-padding-inline-max:999999999px}.cds--layout--size-xs{--cds-layout-size-height-context:var(--cds-layout-size-height-xs, 1.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xs{--cds-layout-size-height:var(--cds-layout-size-height-context, var(--cds-layout-size-height-xs, 1.5rem))}.cds--layout-constraint--size__min-xs{--cds-layout-size-height-min:var(--cds-layout-size-height-xs, 1.5rem)}.cds--layout-constraint--size__max-xs{--cds-layout-size-height-max:var(--cds-layout-size-height-xs, 1.5rem)}.cds--layout--size-sm{--cds-layout-size-height-context:var(--cds-layout-size-height-sm, 2rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-sm{--cds-layout-size-height:var(--cds-layout-size-height-context, var(--cds-layout-size-height-sm, 2rem))}.cds--layout-constraint--size__min-sm{--cds-layout-size-height-min:var(--cds-layout-size-height-sm, 2rem)}.cds--layout-constraint--size__max-sm{--cds-layout-size-height-max:var(--cds-layout-size-height-sm, 2rem)}.cds--layout--size-md{--cds-layout-size-height-context:var(--cds-layout-size-height-md, 2.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-md{--cds-layout-size-height:var(--cds-layout-size-height-context, var(--cds-layout-size-height-md, 2.5rem))}.cds--layout-constraint--size__min-md{--cds-layout-size-height-min:var(--cds-layout-size-height-md, 2.5rem)}.cds--layout-constraint--size__max-md{--cds-layout-size-height-max:var(--cds-layout-size-height-md, 2.5rem)}.cds--layout--size-lg{--cds-layout-size-height-context:var(--cds-layout-size-height-lg, 3rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-lg{--cds-layout-size-height:var(--cds-layout-size-height-context, var(--cds-layout-size-height-lg, 3rem))}.cds--layout-constraint--size__min-lg{--cds-layout-size-height-min:var(--cds-layout-size-height-lg, 3rem)}.cds--layout-constraint--size__max-lg{--cds-layout-size-height-max:var(--cds-layout-size-height-lg, 3rem)}.cds--layout--size-xl{--cds-layout-size-height-context:var(--cds-layout-size-height-xl, 4rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xl{--cds-layout-size-height:var(--cds-layout-size-height-context, var(--cds-layout-size-height-xl, 4rem))}.cds--layout-constraint--size__min-xl{--cds-layout-size-height-min:var(--cds-layout-size-height-xl, 4rem)}.cds--layout-constraint--size__max-xl{--cds-layout-size-height-max:var(--cds-layout-size-height-xl, 4rem)}.cds--layout--size-2xl{--cds-layout-size-height-context:var(--cds-layout-size-height-2xl, 5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-2xl{--cds-layout-size-height:var(--cds-layout-size-height-context, var(--cds-layout-size-height-2xl, 5rem))}.cds--layout-constraint--size__min-2xl{--cds-layout-size-height-min:var(--cds-layout-size-height-2xl, 5rem)}.cds--layout-constraint--size__max-2xl{--cds-layout-size-height-max:var(--cds-layout-size-height-2xl, 5rem)}.cds--layout--density-condensed{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-condensed, 0.5rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-condensed{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context, var(--cds-layout-density-padding-inline-condensed, 0.5rem))}.cds--layout-constraint--density__min-condensed{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-condensed, 0.5rem)}.cds--layout-constraint--density__max-condensed{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-condensed, 0.5rem)}.cds--layout--density-normal{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-normal, 1rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-normal{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context, var(--cds-layout-density-padding-inline-normal, 1rem))}.cds--layout-constraint--density__min-normal{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-normal, 1rem)}.cds--layout-constraint--density__max-normal{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-normal, 1rem)}',
12
+ ]);
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2019, 2020
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import { css } from 'lit';
10
+ export default css([
11
+ ':root{--cds-layout-size-height-xs:1.5rem;--cds-layout-size-height-sm:2rem;--cds-layout-size-height-md:2.5rem;--cds-layout-size-height-lg:3rem;--cds-layout-size-height-xl:4rem;--cds-layout-size-height-2xl:5rem;--cds-layout-size-height-min:0px;--cds-layout-size-height-max:999999999px;--cds-layout-density-padding-inline-condensed:0.5rem;--cds-layout-density-padding-inline-normal:1rem;--cds-layout-density-padding-inline-min:0px;--cds-layout-density-padding-inline-max:999999999px}.cds--layout--size-xs{--cds-layout-size-height-context:var(--cds-layout-size-height-xs, 1.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xs{--cds-layout-size-height:var(--cds-layout-size-height-context, var(--cds-layout-size-height-xs, 1.5rem))}.cds--layout-constraint--size__min-xs{--cds-layout-size-height-min:var(--cds-layout-size-height-xs, 1.5rem)}.cds--layout-constraint--size__max-xs{--cds-layout-size-height-max:var(--cds-layout-size-height-xs, 1.5rem)}.cds--layout--size-sm{--cds-layout-size-height-context:var(--cds-layout-size-height-sm, 2rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-sm{--cds-layout-size-height:var(--cds-layout-size-height-context, var(--cds-layout-size-height-sm, 2rem))}.cds--layout-constraint--size__min-sm{--cds-layout-size-height-min:var(--cds-layout-size-height-sm, 2rem)}.cds--layout-constraint--size__max-sm{--cds-layout-size-height-max:var(--cds-layout-size-height-sm, 2rem)}.cds--layout--size-md{--cds-layout-size-height-context:var(--cds-layout-size-height-md, 2.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-md{--cds-layout-size-height:var(--cds-layout-size-height-context, var(--cds-layout-size-height-md, 2.5rem))}.cds--layout-constraint--size__min-md{--cds-layout-size-height-min:var(--cds-layout-size-height-md, 2.5rem)}.cds--layout-constraint--size__max-md{--cds-layout-size-height-max:var(--cds-layout-size-height-md, 2.5rem)}.cds--layout--size-lg{--cds-layout-size-height-context:var(--cds-layout-size-height-lg, 3rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-lg{--cds-layout-size-height:var(--cds-layout-size-height-context, var(--cds-layout-size-height-lg, 3rem))}.cds--layout-constraint--size__min-lg{--cds-layout-size-height-min:var(--cds-layout-size-height-lg, 3rem)}.cds--layout-constraint--size__max-lg{--cds-layout-size-height-max:var(--cds-layout-size-height-lg, 3rem)}.cds--layout--size-xl{--cds-layout-size-height-context:var(--cds-layout-size-height-xl, 4rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xl{--cds-layout-size-height:var(--cds-layout-size-height-context, var(--cds-layout-size-height-xl, 4rem))}.cds--layout-constraint--size__min-xl{--cds-layout-size-height-min:var(--cds-layout-size-height-xl, 4rem)}.cds--layout-constraint--size__max-xl{--cds-layout-size-height-max:var(--cds-layout-size-height-xl, 4rem)}.cds--layout--size-2xl{--cds-layout-size-height-context:var(--cds-layout-size-height-2xl, 5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-2xl{--cds-layout-size-height:var(--cds-layout-size-height-context, var(--cds-layout-size-height-2xl, 5rem))}.cds--layout-constraint--size__min-2xl{--cds-layout-size-height-min:var(--cds-layout-size-height-2xl, 5rem)}.cds--layout-constraint--size__max-2xl{--cds-layout-size-height-max:var(--cds-layout-size-height-2xl, 5rem)}.cds--layout--density-condensed{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-condensed, 0.5rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-condensed{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context, var(--cds-layout-density-padding-inline-condensed, 0.5rem))}.cds--layout-constraint--density__min-condensed{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-condensed, 0.5rem)}.cds--layout-constraint--density__max-condensed{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-condensed, 0.5rem)}.cds--layout--density-normal{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-normal, 1rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-normal{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context, var(--cds-layout-density-padding-inline-normal, 1rem))}.cds--layout-constraint--density__min-normal{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-normal, 1rem)}.cds--layout-constraint--density__max-normal{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-normal, 1rem)}',
12
+ ]);
@@ -56,6 +56,22 @@ const ValidityMixin = Base => {
56
56
  * `true` to show the UI of the invalid state.
57
57
  */
58
58
 
59
+ /**
60
+ * `true` if the value is required.
61
+ */
62
+
63
+ /**
64
+ * The special validity message for `required`.
65
+ */
66
+
67
+ /**
68
+ * The validity message.
69
+ */
70
+
71
+ /**
72
+ * The value.
73
+ */
74
+
59
75
  /**
60
76
  * Checks if the value meets the constraints.
61
77
  * Fires cancelable `invalid` event if it doesn't.
@@ -1 +1 @@
1
- {"version":3,"file":"validity.js","names":["VALIDATION_STATUS","ValidityMixin","Base","ValidityMixinImpl","_getValidityMessage","state","NO_ERROR","ERROR_REQUIRED","requiredValidityMessage","_testValidity","required","value","checkValidity","status","dispatchEvent","CustomEvent","bubbles","cancelable","composed","invalid","validityMessage","setCustomValidity","Boolean"],"sources":["globals/mixins/validity.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\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\n/**\n * Form validation status.\n */\nexport enum VALIDATION_STATUS {\n /**\n * One indicating no validation error.\n */\n NO_ERROR = '',\n\n /**\n * One indicating missing required value.\n */\n ERROR_REQUIRED = 'required',\n}\n\n/**\n * @param Base The base class.\n * @returns A mix-in implementing `.setCustomValidity()` method.\n */\nconst ValidityMixin = <T extends Constructor<HTMLElement>>(Base: T) => {\n abstract class ValidityMixinImpl extends Base {\n // Not using TypeScript `protected` due to: microsoft/TypeScript#17744\n // Using `string` instead of `VALIDATION_STATUS` until we can require TypeScript 3.8\n /**\n * @param state The form validation status.\n * @returns The form validation error messages associated with the given status.\n * @protected\n */\n _getValidityMessage(state: string) {\n return {\n [VALIDATION_STATUS.NO_ERROR]: '',\n [VALIDATION_STATUS.ERROR_REQUIRED]: this.requiredValidityMessage,\n }[state];\n }\n\n // Not using TypeScript `protected` due to: microsoft/TypeScript#17744\n // Using `string` instead of `VALIDATION_STATUS` until we can require TypeScript 3.8\n /**\n * Checks if the value meets the constraints.\n *\n * @returns `VALIDATION_STATUS.NO_ERROR` if the value meets the constraints. Some other values otherwise.\n * @protected\n */\n _testValidity(): string {\n const { required, value } = this;\n return required && !value\n ? VALIDATION_STATUS.ERROR_REQUIRED\n : VALIDATION_STATUS.NO_ERROR;\n }\n\n /**\n * `true` to show the UI of the invalid state.\n */\n abstract invalid: boolean;\n\n /**\n * `true` if the value is required.\n */\n abstract required: boolean;\n\n /**\n * The special validity message for `required`.\n */\n abstract requiredValidityMessage: string;\n\n /**\n * The validity message.\n */\n abstract validityMessage: string;\n\n /**\n * The value.\n */\n abstract value: string;\n\n /**\n * Checks if the value meets the constraints.\n * Fires cancelable `invalid` event if it doesn't.\n *\n * @returns `true` if the value meets the constraints. `false` otherwise.\n */\n checkValidity() {\n const status = this._testValidity();\n if (status !== VALIDATION_STATUS.NO_ERROR) {\n if (\n this.dispatchEvent(\n new CustomEvent('invalid', {\n bubbles: false,\n cancelable: true,\n composed: false,\n })\n )\n ) {\n this.invalid = true;\n this.validityMessage = this._getValidityMessage(status) as string;\n }\n return false;\n }\n this.invalid = false;\n this.validityMessage = '';\n return true;\n }\n\n /**\n * Sets the given custom validity message.\n *\n * @param validityMessage The custom validity message\n */\n setCustomValidity(validityMessage: string) {\n this.invalid = Boolean(validityMessage);\n this.validityMessage = validityMessage;\n }\n }\n return ValidityMixinImpl;\n};\n\nexport default ValidityMixin;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,iBAAiB;;AAY7B;AACA;AACA;AACA;AAHA,WAZYA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;AAAA,GAAjBA,iBAAiB,KAAjBA,iBAAiB;AAgB7B,MAAMC,aAAa,GAAwCC,IAAO,IAAK;EACrE,MAAeC,iBAAiB,SAASD,IAAI,CAAC;IAC5C;IACA;IACA;AACJ;AACA;AACA;AACA;IACIE,mBAAmBA,CAACC,KAAa,EAAE;MACjC,OAAO;QACL,CAACL,iBAAiB,CAACM,QAAQ,GAAG,EAAE;QAChC,CAACN,iBAAiB,CAACO,cAAc,GAAG,IAAI,CAACC;MAC3C,CAAC,CAACH,KAAK,CAAC;IACV;;IAEA;IACA;IACA;AACJ;AACA;AACA;AACA;AACA;IACII,aAAaA,CAAA,EAAW;MACtB,MAAM;QAAEC,QAAQ;QAAEC;MAAM,CAAC,GAAG,IAAI;MAChC,OAAOD,QAAQ,IAAI,CAACC,KAAK,GACrBX,iBAAiB,CAACO,cAAc,GAChCP,iBAAiB,CAACM,QAAQ;IAChC;;IAEA;AACJ;AACA;;IAuBI;AACJ;AACA;AACA;AACA;AACA;IACIM,aAAaA,CAAA,EAAG;MACd,MAAMC,MAAM,GAAG,IAAI,CAACJ,aAAa,EAAE;MACnC,IAAII,MAAM,KAAKb,iBAAiB,CAACM,QAAQ,EAAE;QACzC,IACE,IAAI,CAACQ,aAAa,CAChB,IAAIC,WAAW,CAAC,SAAS,EAAE;UACzBC,OAAO,EAAE,KAAK;UACdC,UAAU,EAAE,IAAI;UAChBC,QAAQ,EAAE;QACZ,CAAC,CAAC,CACH,EACD;UACA,IAAI,CAACC,OAAO,GAAG,IAAI;UACnB,IAAI,CAACC,eAAe,GAAG,IAAI,CAAChB,mBAAmB,CAACS,MAAM,CAAW;QACnE;QACA,OAAO,KAAK;MACd;MACA,IAAI,CAACM,OAAO,GAAG,KAAK;MACpB,IAAI,CAACC,eAAe,GAAG,EAAE;MACzB,OAAO,IAAI;IACb;;IAEA;AACJ;AACA;AACA;AACA;IACIC,iBAAiBA,CAACD,eAAuB,EAAE;MACzC,IAAI,CAACD,OAAO,GAAGG,OAAO,CAACF,eAAe,CAAC;MACvC,IAAI,CAACA,eAAe,GAAGA,eAAe;IACxC;EACF;EACA,OAAOjB,iBAAiB;AAC1B,CAAC;AAED,eAAeF,aAAa"}
1
+ {"version":3,"file":"validity.js","names":["VALIDATION_STATUS","ValidityMixin","Base","ValidityMixinImpl","_getValidityMessage","state","NO_ERROR","ERROR_REQUIRED","requiredValidityMessage","_testValidity","required","value","checkValidity","status","dispatchEvent","CustomEvent","bubbles","cancelable","composed","invalid","validityMessage","setCustomValidity","Boolean"],"sources":["globals/mixins/validity.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2022\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\n/**\n * Form validation status.\n */\nexport enum VALIDATION_STATUS {\n /**\n * One indicating no validation error.\n */\n NO_ERROR = '',\n\n /**\n * One indicating missing required value.\n */\n ERROR_REQUIRED = 'required',\n}\n\n/**\n * @param Base The base class.\n * @returns A mix-in implementing `.setCustomValidity()` method.\n */\nconst ValidityMixin = <T extends Constructor<HTMLElement>>(Base: T) => {\n abstract class ValidityMixinImpl extends Base {\n // Not using TypeScript `protected` due to: microsoft/TypeScript#17744\n // Using `string` instead of `VALIDATION_STATUS` until we can require TypeScript 3.8\n /**\n * @param state The form validation status.\n * @returns The form validation error messages associated with the given status.\n * @protected\n */\n _getValidityMessage(state: string) {\n return {\n [VALIDATION_STATUS.NO_ERROR]: '',\n [VALIDATION_STATUS.ERROR_REQUIRED]: this.requiredValidityMessage,\n }[state];\n }\n\n // Not using TypeScript `protected` due to: microsoft/TypeScript#17744\n // Using `string` instead of `VALIDATION_STATUS` until we can require TypeScript 3.8\n /**\n * Checks if the value meets the constraints.\n *\n * @returns `VALIDATION_STATUS.NO_ERROR` if the value meets the constraints. Some other values otherwise.\n * @protected\n */\n _testValidity(): string {\n const { required, value } = this;\n return required && !value\n ? VALIDATION_STATUS.ERROR_REQUIRED\n : VALIDATION_STATUS.NO_ERROR;\n }\n\n /**\n * `true` to show the UI of the invalid state.\n */\n abstract invalid: boolean;\n\n /**\n * `true` if the value is required.\n */\n abstract required: boolean;\n\n /**\n * The special validity message for `required`.\n */\n abstract requiredValidityMessage: string;\n\n /**\n * The validity message.\n */\n abstract validityMessage: string;\n\n /**\n * The value.\n */\n abstract value: string;\n\n /**\n * Checks if the value meets the constraints.\n * Fires cancelable `invalid` event if it doesn't.\n *\n * @returns `true` if the value meets the constraints. `false` otherwise.\n */\n checkValidity() {\n const status = this._testValidity();\n if (status !== VALIDATION_STATUS.NO_ERROR) {\n if (\n this.dispatchEvent(\n new CustomEvent('invalid', {\n bubbles: false,\n cancelable: true,\n composed: false,\n })\n )\n ) {\n this.invalid = true;\n this.validityMessage = this._getValidityMessage(status) as string;\n }\n return false;\n }\n this.invalid = false;\n this.validityMessage = '';\n return true;\n }\n\n /**\n * Sets the given custom validity message.\n *\n * @param validityMessage The custom validity message\n */\n setCustomValidity(validityMessage: string) {\n this.invalid = Boolean(validityMessage);\n this.validityMessage = validityMessage;\n }\n }\n return ValidityMixinImpl;\n};\n\nexport default ValidityMixin;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,iBAAiB;;AAY7B;AACA;AACA;AACA;AAHA,WAZYA,iBAAiB;EAAjBA,iBAA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EA;AACJ;AACA;AACA;AACA;IACIC,iBAAiBA,CAACD,eAAuB,EAAE;MACzC,IAAI,CAACD,OAAO,GAAGG,OAAO,CAACF,eAAe,CAAC;MACvC,IAAI,CAACA,eAAe,GAAGA,eAAe;IACxC;EACF;EACA,OAAOjB,iBAAiB;AAC1B,CAAC;AAED,eAAeF,aAAa"}
@@ -12,6 +12,23 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
12
12
 
13
13
  import { Component, createElement, forwardRef } from 'react';
14
14
  import on from '../mixins/on';
15
+
16
+ /**
17
+ * A descriptor for a React event prop of a custom element.
18
+ */
19
+
20
+ /**
21
+ * A descriptor for a React prop for an attribute of a custom element.
22
+ */
23
+
24
+ /**
25
+ * A descriptor for a set of React props for attributes of a custom element.
26
+ */
27
+
28
+ /**
29
+ * React props for the component `createCustomElementType()` generates.
30
+ */
31
+
15
32
  /**
16
33
  * @param refs List of React refs to merge.
17
34
  * @returns Merged React ref.