@carbon/web-components 2.0.0-beta.1 → 2.0.0-beta.2

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 (1478) hide show
  1. package/custom-elements.json +275 -48
  2. package/es/components/button/defs.d.ts +4 -0
  3. package/es/components/button/defs.d.ts.map +1 -1
  4. package/es/components/button/defs.js +1 -0
  5. package/es/components/button/defs.js.map +1 -1
  6. package/es/components/date-picker/fix-events-plugin.d.ts.map +1 -1
  7. package/es/components/date-picker/fix-events-plugin.js +1 -1
  8. package/es/components/date-picker/fix-events-plugin.js.map +1 -1
  9. package/es/components/date-picker/focus-plugin.d.ts.map +1 -1
  10. package/es/components/date-picker/focus-plugin.js +1 -1
  11. package/es/components/date-picker/focus-plugin.js.map +1 -1
  12. package/es/components/date-picker/shadow-dom-events-plugin.d.ts.map +1 -1
  13. package/es/components/date-picker/shadow-dom-events-plugin.js +1 -1
  14. package/es/components/date-picker/shadow-dom-events-plugin.js.map +1 -1
  15. package/es/components/dropdown/dropdown.d.ts +3 -1
  16. package/es/components/dropdown/dropdown.d.ts.map +1 -1
  17. package/es/components/file-uploader/defs.d.ts +6 -10
  18. package/es/components/file-uploader/defs.d.ts.map +1 -1
  19. package/es/components/file-uploader/defs.js +3 -4
  20. package/es/components/file-uploader/defs.js.map +1 -1
  21. package/es/components/file-uploader/demo-file-uploader.d.ts +33 -10
  22. package/es/components/file-uploader/demo-file-uploader.d.ts.map +1 -1
  23. package/es/components/file-uploader/demo-file-uploader.js +108 -27
  24. package/es/components/file-uploader/demo-file-uploader.js.map +1 -1
  25. package/es/components/file-uploader/file-uploader-button.d.ts +396 -0
  26. package/es/components/file-uploader/file-uploader-button.d.ts.map +1 -0
  27. package/es/components/file-uploader/file-uploader-button.js +295 -0
  28. package/es/components/file-uploader/file-uploader-button.js.map +1 -0
  29. package/es/components/file-uploader/file-uploader-drop-container.d.ts +389 -0
  30. package/es/components/file-uploader/file-uploader-drop-container.d.ts.map +1 -0
  31. package/es/components/file-uploader/file-uploader-drop-container.js +274 -0
  32. package/es/components/file-uploader/file-uploader-drop-container.js.map +1 -0
  33. package/es/components/file-uploader/file-uploader-item.d.ts +7 -11
  34. package/es/components/file-uploader/file-uploader-item.d.ts.map +1 -1
  35. package/es/components/file-uploader/file-uploader-item.js +35 -45
  36. package/es/components/file-uploader/file-uploader-item.js.map +1 -1
  37. package/es/components/file-uploader/file-uploader-skeleton.d.ts +22 -0
  38. package/es/components/file-uploader/file-uploader-skeleton.d.ts.map +1 -0
  39. package/es/components/file-uploader/file-uploader-skeleton.js +50 -0
  40. package/es/components/file-uploader/file-uploader-skeleton.js.map +1 -0
  41. package/es/components/file-uploader/file-uploader.css.js +1 -1
  42. package/es/components/file-uploader/file-uploader.d.ts +17 -8
  43. package/es/components/file-uploader/file-uploader.d.ts.map +1 -1
  44. package/es/components/file-uploader/file-uploader.js +71 -24
  45. package/es/components/file-uploader/file-uploader.js.map +1 -1
  46. package/es/components/file-uploader/file-uploader.rtl.css.js +1 -1
  47. package/es/components/file-uploader/index.d.ts +4 -2
  48. package/es/components/file-uploader/index.d.ts.map +1 -1
  49. package/es/components/file-uploader/index.js +4 -2
  50. package/es/components/file-uploader/index.js.map +1 -1
  51. package/es/components/progress-bar/defs.d.ts +57 -0
  52. package/es/components/progress-bar/defs.d.ts.map +1 -0
  53. package/es/components/progress-bar/defs.js +38 -0
  54. package/es/components/progress-bar/defs.js.map +1 -0
  55. package/es/components/progress-bar/index.d.ts +11 -0
  56. package/es/components/progress-bar/index.d.ts.map +1 -0
  57. package/es/components/progress-bar/index.js +11 -0
  58. package/es/components/progress-bar/index.js.map +1 -0
  59. package/es/components/progress-bar/progress-bar.css.js +12 -0
  60. package/es/components/progress-bar/progress-bar.d.ts +57 -0
  61. package/es/components/progress-bar/progress-bar.d.ts.map +1 -0
  62. package/es/components/progress-bar/progress-bar.js +260 -0
  63. package/es/components/progress-bar/progress-bar.js.map +1 -0
  64. package/es/components/progress-bar/progress-bar.rtl.css.js +12 -0
  65. package/es/components/slider/slider.d.ts +1 -3
  66. package/es/components/slider/slider.d.ts.map +1 -1
  67. package/es/components/structured-list/structured-list-row.d.ts +3 -0
  68. package/es/components/structured-list/structured-list-row.d.ts.map +1 -1
  69. package/es/components/tile/expandable-tile.d.ts +3 -1
  70. package/es/components/tile/expandable-tile.d.ts.map +1 -1
  71. package/es/components/ui-shell/side-nav.d.ts.map +1 -1
  72. package/es/components/ui-shell/side-nav.js +1 -1
  73. package/es/components/ui-shell/side-nav.js.map +1 -1
  74. package/es/components-react/file-uploader/demo-file-uploader.d.ts +31 -7
  75. package/es/components-react/file-uploader/demo-file-uploader.js +30 -6
  76. package/es/components-react/file-uploader/file-uploader-button.d.ts +19 -0
  77. package/es/components-react/file-uploader/file-uploader-button.js +28 -0
  78. package/es/components-react/file-uploader/file-uploader-drop-container.d.ts +19 -0
  79. package/es/components-react/file-uploader/file-uploader-drop-container.js +28 -0
  80. package/es/components-react/file-uploader/file-uploader-item.d.ts +2 -2
  81. package/es/components-react/file-uploader/file-uploader-skeleton.d.ts +15 -0
  82. package/es/components-react/file-uploader/file-uploader-skeleton.js +21 -0
  83. package/es/components-react/file-uploader/file-uploader.d.ts +2 -2
  84. package/es/components-react/progress-bar/defs.js +9 -0
  85. package/es/components-react/progress-bar/progress-bar.d.ts +15 -0
  86. package/es/components-react/progress-bar/progress-bar.js +26 -0
  87. package/es/globals/mixins/form.d.ts +1 -1
  88. package/es/globals/mixins/form.d.ts.map +1 -1
  89. package/es/globals/mixins/form.js +2 -2
  90. package/es/globals/mixins/form.js.map +1 -1
  91. package/es/globals/mixins/host-listener.d.ts +1 -1
  92. package/es/globals/mixins/host-listener.d.ts.map +1 -1
  93. package/es/globals/mixins/host-listener.js +2 -2
  94. package/es/globals/mixins/host-listener.js.map +1 -1
  95. package/es/globals/mixins/on.d.ts +11 -0
  96. package/es/globals/mixins/on.d.ts.map +1 -0
  97. package/es/globals/mixins/on.js +17 -0
  98. package/es/globals/mixins/on.js.map +1 -0
  99. package/es/globals/wrappers/createReactCustomElementType.d.ts.map +1 -1
  100. package/es/globals/wrappers/createReactCustomElementType.js +1 -1
  101. package/es/globals/wrappers/createReactCustomElementType.js.map +1 -1
  102. package/es/icons/SLM/16.js +15 -0
  103. package/es/icons/SLM/20.js +15 -0
  104. package/es/icons/SLM/24.js +15 -0
  105. package/es/icons/SLM/32.js +15 -0
  106. package/es/icons/apple--dash/16.js +15 -0
  107. package/es/icons/apple--dash/20.js +15 -0
  108. package/es/icons/apple--dash/24.js +15 -0
  109. package/es/icons/apple--dash/32.js +15 -0
  110. package/es/icons/batch-job/16.js +15 -0
  111. package/es/icons/batch-job/20.js +15 -0
  112. package/es/icons/batch-job/24.js +15 -0
  113. package/es/icons/batch-job/32.js +15 -0
  114. package/es/icons/batch-job--step/16.js +15 -0
  115. package/es/icons/batch-job--step/20.js +15 -0
  116. package/es/icons/batch-job--step/24.js +15 -0
  117. package/es/icons/batch-job--step/32.js +15 -0
  118. package/es/icons/boot-volume/16.js +15 -0
  119. package/es/icons/boot-volume/20.js +15 -0
  120. package/es/icons/boot-volume/24.js +15 -0
  121. package/es/icons/boot-volume/32.js +15 -0
  122. package/es/icons/boot-volume--alt/16.js +15 -0
  123. package/es/icons/boot-volume--alt/20.js +15 -0
  124. package/es/icons/boot-volume--alt/24.js +15 -0
  125. package/es/icons/boot-volume--alt/32.js +15 -0
  126. package/es/icons/bottles--01/16.js +15 -0
  127. package/es/icons/bottles--01/20.js +15 -0
  128. package/es/icons/bottles--01/24.js +15 -0
  129. package/es/icons/bottles--01/32.js +15 -0
  130. package/es/icons/bottles--01--dash/16.js +15 -0
  131. package/es/icons/bottles--01--dash/20.js +15 -0
  132. package/es/icons/bottles--01--dash/24.js +15 -0
  133. package/es/icons/bottles--01--dash/32.js +15 -0
  134. package/es/icons/bottles--02/16.js +15 -0
  135. package/es/icons/bottles--02/20.js +15 -0
  136. package/es/icons/bottles--02/24.js +15 -0
  137. package/es/icons/bottles--02/32.js +15 -0
  138. package/es/icons/bottles--02--dash/16.js +15 -0
  139. package/es/icons/bottles--02--dash/20.js +15 -0
  140. package/es/icons/bottles--02--dash/24.js +15 -0
  141. package/es/icons/bottles--02--dash/32.js +15 -0
  142. package/es/icons/bottles--container/16.js +15 -0
  143. package/es/icons/bottles--container/20.js +15 -0
  144. package/es/icons/bottles--container/24.js +15 -0
  145. package/es/icons/bottles--container/32.js +15 -0
  146. package/es/icons/build-tool/16.js +15 -0
  147. package/es/icons/build-tool/20.js +15 -0
  148. package/es/icons/build-tool/24.js +15 -0
  149. package/es/icons/build-tool/32.js +15 -0
  150. package/es/icons/calendar--add/16.js +15 -0
  151. package/es/icons/calendar--add/20.js +15 -0
  152. package/es/icons/calendar--add/24.js +15 -0
  153. package/es/icons/calendar--add/32.js +15 -0
  154. package/es/icons/calendar--add--alt/16.js +15 -0
  155. package/es/icons/calendar--add--alt/20.js +15 -0
  156. package/es/icons/calendar--add--alt/24.js +15 -0
  157. package/es/icons/calendar--add--alt/32.js +15 -0
  158. package/es/icons/carbon--ui-builder/16.js +15 -0
  159. package/es/icons/carbon--ui-builder/20.js +15 -0
  160. package/es/icons/carbon--ui-builder/24.js +15 -0
  161. package/es/icons/carbon--ui-builder/32.js +15 -0
  162. package/es/icons/catalog--publish/16.js +15 -0
  163. package/es/icons/catalog--publish/20.js +15 -0
  164. package/es/icons/catalog--publish/24.js +15 -0
  165. package/es/icons/catalog--publish/32.js +15 -0
  166. package/es/icons/cics--db2-connection/16.js +15 -0
  167. package/es/icons/cics--db2-connection/20.js +15 -0
  168. package/es/icons/cics--db2-connection/24.js +15 -0
  169. package/es/icons/cics--db2-connection/32.js +15 -0
  170. package/es/icons/cics--program/16.js +15 -0
  171. package/es/icons/cics--program/20.js +15 -0
  172. package/es/icons/cics--program/24.js +15 -0
  173. package/es/icons/cics--program/32.js +15 -0
  174. package/es/icons/cics--sit/16.js +15 -0
  175. package/es/icons/cics--sit/20.js +15 -0
  176. package/es/icons/cics--sit/24.js +15 -0
  177. package/es/icons/cics--sit/32.js +15 -0
  178. package/es/icons/cics--sit-overrides/16.js +15 -0
  179. package/es/icons/cics--sit-overrides/20.js +15 -0
  180. package/es/icons/cics--sit-overrides/24.js +15 -0
  181. package/es/icons/cics--sit-overrides/32.js +15 -0
  182. package/es/icons/cics--transaction-server-zos/16.js +15 -0
  183. package/es/icons/cics--transaction-server-zos/20.js +15 -0
  184. package/es/icons/cics--transaction-server-zos/24.js +15 -0
  185. package/es/icons/cics--transaction-server-zos/32.js +15 -0
  186. package/es/icons/cics-region--alt/16.js +15 -0
  187. package/es/icons/cics-region--alt/20.js +15 -0
  188. package/es/icons/cics-region--alt/24.js +15 -0
  189. package/es/icons/cics-region--alt/32.js +15 -0
  190. package/es/icons/connect--reference/16.js +15 -0
  191. package/es/icons/connect--reference/20.d.ts +17 -0
  192. package/es/icons/connect--reference/20.js +15 -0
  193. package/es/icons/connect--reference/24.d.ts +17 -0
  194. package/es/icons/connect--reference/24.js +15 -0
  195. package/es/icons/connect--reference/32.d.ts +17 -0
  196. package/es/icons/connect--reference/32.js +15 -0
  197. package/es/icons/continuous-deployment/16.d.ts +17 -0
  198. package/es/icons/continuous-deployment/16.js +15 -0
  199. package/es/icons/continuous-deployment/20.d.ts +17 -0
  200. package/es/icons/continuous-deployment/20.js +15 -0
  201. package/es/icons/continuous-deployment/24.d.ts +17 -0
  202. package/es/icons/continuous-deployment/24.js +15 -0
  203. package/es/icons/continuous-deployment/32.d.ts +17 -0
  204. package/es/icons/continuous-deployment/32.js +15 -0
  205. package/es/icons/continuous-integration/16.d.ts +17 -0
  206. package/es/icons/continuous-integration/16.js +15 -0
  207. package/es/icons/continuous-integration/20.d.ts +17 -0
  208. package/es/icons/continuous-integration/20.js +15 -0
  209. package/es/icons/continuous-integration/24.d.ts +17 -0
  210. package/es/icons/continuous-integration/24.js +15 -0
  211. package/es/icons/continuous-integration/32.d.ts +17 -0
  212. package/es/icons/continuous-integration/32.js +15 -0
  213. package/es/icons/data-enrichment/16.js +1 -1
  214. package/es/icons/data-enrichment/20.js +1 -1
  215. package/es/icons/data-enrichment/24.js +1 -1
  216. package/es/icons/data-enrichment/32.js +1 -1
  217. package/es/icons/data-enrichment--add/16.d.ts +17 -0
  218. package/es/icons/data-enrichment--add/16.js +15 -0
  219. package/es/icons/data-enrichment--add/20.d.ts +17 -0
  220. package/es/icons/data-enrichment--add/20.js +15 -0
  221. package/es/icons/data-enrichment--add/24.d.ts +17 -0
  222. package/es/icons/data-enrichment--add/24.js +15 -0
  223. package/es/icons/data-enrichment--add/32.d.ts +17 -0
  224. package/es/icons/data-enrichment--add/32.js +15 -0
  225. package/es/icons/data-quality-definition/16.d.ts +17 -0
  226. package/es/icons/data-quality-definition/16.js +15 -0
  227. package/es/icons/data-quality-definition/20.d.ts +17 -0
  228. package/es/icons/data-quality-definition/20.js +15 -0
  229. package/es/icons/data-quality-definition/24.d.ts +17 -0
  230. package/es/icons/data-quality-definition/24.js +15 -0
  231. package/es/icons/data-quality-definition/32.d.ts +17 -0
  232. package/es/icons/data-quality-definition/32.js +15 -0
  233. package/es/icons/data-volume/16.d.ts +17 -0
  234. package/es/icons/data-volume/16.js +15 -0
  235. package/es/icons/data-volume/20.d.ts +17 -0
  236. package/es/icons/data-volume/20.js +15 -0
  237. package/es/icons/data-volume/24.d.ts +17 -0
  238. package/es/icons/data-volume/24.js +15 -0
  239. package/es/icons/data-volume/32.d.ts +17 -0
  240. package/es/icons/data-volume/32.js +15 -0
  241. package/es/icons/data-volume--alt/16.d.ts +17 -0
  242. package/es/icons/data-volume--alt/16.js +15 -0
  243. package/es/icons/data-volume--alt/20.d.ts +17 -0
  244. package/es/icons/data-volume--alt/20.js +15 -0
  245. package/es/icons/data-volume--alt/24.d.ts +17 -0
  246. package/es/icons/data-volume--alt/24.js +15 -0
  247. package/es/icons/data-volume--alt/32.d.ts +17 -0
  248. package/es/icons/data-volume--alt/32.js +15 -0
  249. package/es/icons/db2--buffer-pool/16.d.ts +17 -0
  250. package/es/icons/db2--buffer-pool/16.js +15 -0
  251. package/es/icons/db2--buffer-pool/20.d.ts +17 -0
  252. package/es/icons/db2--buffer-pool/20.js +15 -0
  253. package/es/icons/db2--buffer-pool/24.d.ts +17 -0
  254. package/es/icons/db2--buffer-pool/24.js +15 -0
  255. package/es/icons/db2--buffer-pool/32.d.ts +17 -0
  256. package/es/icons/db2--buffer-pool/32.js +15 -0
  257. package/es/icons/db2--data-sharing-group/16.d.ts +17 -0
  258. package/es/icons/db2--data-sharing-group/16.js +15 -0
  259. package/es/icons/db2--data-sharing-group/20.d.ts +17 -0
  260. package/es/icons/db2--data-sharing-group/20.js +15 -0
  261. package/es/icons/db2--data-sharing-group/24.d.ts +17 -0
  262. package/es/icons/db2--data-sharing-group/24.js +15 -0
  263. package/es/icons/db2--data-sharing-group/32.d.ts +17 -0
  264. package/es/icons/db2--data-sharing-group/32.js +15 -0
  265. package/es/icons/db2--database/16.d.ts +17 -0
  266. package/es/icons/db2--database/16.js +15 -0
  267. package/es/icons/db2--database/20.d.ts +17 -0
  268. package/es/icons/db2--database/20.js +15 -0
  269. package/es/icons/db2--database/24.d.ts +17 -0
  270. package/es/icons/db2--database/24.js +15 -0
  271. package/es/icons/db2--database/32.d.ts +17 -0
  272. package/es/icons/db2--database/32.js +15 -0
  273. package/es/icons/diamond-fill/index.d.ts +17 -0
  274. package/es/icons/document--multiple-01/16.d.ts +17 -0
  275. package/es/icons/document--multiple-01/16.js +15 -0
  276. package/es/icons/document--multiple-01/20.d.ts +17 -0
  277. package/es/icons/document--multiple-01/20.js +15 -0
  278. package/es/icons/document--multiple-01/24.d.ts +17 -0
  279. package/es/icons/document--multiple-01/24.js +15 -0
  280. package/es/icons/document--multiple-01/32.d.ts +17 -0
  281. package/es/icons/document--multiple-01/32.js +15 -0
  282. package/es/icons/document--multiple-02/16.d.ts +17 -0
  283. package/es/icons/document--multiple-02/16.js +15 -0
  284. package/es/icons/document--multiple-02/20.d.ts +17 -0
  285. package/es/icons/document--multiple-02/20.js +15 -0
  286. package/es/icons/document--multiple-02/24.d.ts +17 -0
  287. package/es/icons/document--multiple-02/24.js +15 -0
  288. package/es/icons/document--multiple-02/32.d.ts +17 -0
  289. package/es/icons/document--multiple-02/32.js +15 -0
  290. package/es/icons/drink--01/16.d.ts +17 -0
  291. package/es/icons/drink--01/16.js +15 -0
  292. package/es/icons/drink--01/20.d.ts +17 -0
  293. package/es/icons/drink--01/20.js +15 -0
  294. package/es/icons/drink--01/24.d.ts +17 -0
  295. package/es/icons/drink--01/24.js +15 -0
  296. package/es/icons/drink--01/32.d.ts +17 -0
  297. package/es/icons/drink--01/32.js +15 -0
  298. package/es/icons/drink--02/16.d.ts +17 -0
  299. package/es/icons/drink--02/16.js +15 -0
  300. package/es/icons/drink--02/20.d.ts +17 -0
  301. package/es/icons/drink--02/20.js +15 -0
  302. package/es/icons/drink--02/24.d.ts +17 -0
  303. package/es/icons/drink--02/24.js +15 -0
  304. package/es/icons/drink--02/32.d.ts +17 -0
  305. package/es/icons/drink--02/32.js +15 -0
  306. package/es/icons/executable-program/16.d.ts +17 -0
  307. package/es/icons/executable-program/16.js +15 -0
  308. package/es/icons/executable-program/20.d.ts +17 -0
  309. package/es/icons/executable-program/20.js +15 -0
  310. package/es/icons/executable-program/24.d.ts +17 -0
  311. package/es/icons/executable-program/24.js +15 -0
  312. package/es/icons/executable-program/32.d.ts +17 -0
  313. package/es/icons/executable-program/32.js +15 -0
  314. package/es/icons/ibm--bluepay/16.d.ts +17 -0
  315. package/es/icons/ibm--bluepay/16.js +15 -0
  316. package/es/icons/ibm--bluepay/20.d.ts +17 -0
  317. package/es/icons/ibm--bluepay/20.js +15 -0
  318. package/es/icons/ibm--bluepay/24.d.ts +17 -0
  319. package/es/icons/ibm--bluepay/24.js +15 -0
  320. package/es/icons/ibm--bluepay/32.d.ts +17 -0
  321. package/es/icons/ibm--bluepay/32.js +15 -0
  322. package/es/icons/ibm--content-services/16.d.ts +17 -0
  323. package/es/icons/ibm--content-services/16.js +15 -0
  324. package/es/icons/ibm--content-services/20.d.ts +17 -0
  325. package/es/icons/ibm--content-services/20.js +15 -0
  326. package/es/icons/ibm--content-services/24.d.ts +17 -0
  327. package/es/icons/ibm--content-services/24.js +15 -0
  328. package/es/icons/ibm--content-services/32.d.ts +17 -0
  329. package/es/icons/ibm--content-services/32.js +15 -0
  330. package/es/icons/ibm--datastage/16.d.ts +17 -0
  331. package/es/icons/ibm--datastage/16.js +15 -0
  332. package/es/icons/ibm--datastage/20.d.ts +17 -0
  333. package/es/icons/ibm--datastage/20.js +15 -0
  334. package/es/icons/ibm--datastage/24.d.ts +17 -0
  335. package/es/icons/ibm--datastage/24.js +15 -0
  336. package/es/icons/ibm--datastage/32.d.ts +17 -0
  337. package/es/icons/ibm--datastage/32.js +15 -0
  338. package/es/icons/ibm--db2/16.d.ts +17 -0
  339. package/es/icons/ibm--db2/16.js +15 -0
  340. package/es/icons/ibm--db2/20.d.ts +17 -0
  341. package/es/icons/ibm--db2/20.js +15 -0
  342. package/es/icons/ibm--db2/24.d.ts +17 -0
  343. package/es/icons/ibm--db2/24.js +15 -0
  344. package/es/icons/ibm--db2/32.d.ts +17 -0
  345. package/es/icons/ibm--db2/32.js +15 -0
  346. package/es/icons/ibm--db2--alt/16.d.ts +17 -0
  347. package/es/icons/ibm--db2--alt/16.js +15 -0
  348. package/es/icons/ibm--db2--alt/20.d.ts +17 -0
  349. package/es/icons/ibm--db2--alt/20.js +15 -0
  350. package/es/icons/ibm--db2--alt/24.d.ts +17 -0
  351. package/es/icons/ibm--db2--alt/24.js +15 -0
  352. package/es/icons/ibm--db2--alt/32.d.ts +17 -0
  353. package/es/icons/ibm--db2--alt/32.js +15 -0
  354. package/es/icons/ibm--mq/16.d.ts +17 -0
  355. package/es/icons/ibm--mq/16.js +15 -0
  356. package/es/icons/ibm--mq/20.d.ts +17 -0
  357. package/es/icons/ibm--mq/20.js +15 -0
  358. package/es/icons/ibm--mq/24.d.ts +17 -0
  359. package/es/icons/ibm--mq/24.js +15 -0
  360. package/es/icons/ibm--mq/32.d.ts +17 -0
  361. package/es/icons/ibm--mq/32.js +15 -0
  362. package/es/icons/ibm--open-enterprise-languages/16.d.ts +17 -0
  363. package/es/icons/ibm--open-enterprise-languages/16.js +15 -0
  364. package/es/icons/ibm--open-enterprise-languages/20.d.ts +17 -0
  365. package/es/icons/ibm--open-enterprise-languages/20.js +15 -0
  366. package/es/icons/ibm--open-enterprise-languages/24.d.ts +17 -0
  367. package/es/icons/ibm--open-enterprise-languages/24.js +15 -0
  368. package/es/icons/ibm--open-enterprise-languages/32.d.ts +17 -0
  369. package/es/icons/ibm--open-enterprise-languages/32.js +15 -0
  370. package/es/icons/ibm--power-vs/16.d.ts +17 -0
  371. package/es/icons/ibm--power-vs/16.js +15 -0
  372. package/es/icons/ibm--power-vs/20.d.ts +17 -0
  373. package/es/icons/ibm--power-vs/20.js +15 -0
  374. package/es/icons/ibm--power-vs/24.d.ts +17 -0
  375. package/es/icons/ibm--power-vs/24.js +15 -0
  376. package/es/icons/ibm--power-vs/32.d.ts +17 -0
  377. package/es/icons/ibm--power-vs/32.js +15 -0
  378. package/es/icons/ibm--process-mining/16.d.ts +17 -0
  379. package/es/icons/ibm--process-mining/16.js +15 -0
  380. package/es/icons/ibm--process-mining/20.d.ts +17 -0
  381. package/es/icons/ibm--process-mining/20.js +15 -0
  382. package/es/icons/ibm--process-mining/24.d.ts +17 -0
  383. package/es/icons/ibm--process-mining/24.js +15 -0
  384. package/es/icons/ibm--process-mining/32.d.ts +17 -0
  385. package/es/icons/ibm--process-mining/32.js +15 -0
  386. package/es/icons/ibm--telehealth/16.d.ts +17 -0
  387. package/es/icons/ibm--telehealth/16.js +15 -0
  388. package/es/icons/ibm--telehealth/20.d.ts +17 -0
  389. package/es/icons/ibm--telehealth/20.js +15 -0
  390. package/es/icons/ibm--telehealth/24.d.ts +17 -0
  391. package/es/icons/ibm--telehealth/24.js +15 -0
  392. package/es/icons/ibm--telehealth/32.d.ts +17 -0
  393. package/es/icons/ibm--telehealth/32.js +15 -0
  394. package/es/icons/ibm--tenet/16.d.ts +17 -0
  395. package/es/icons/ibm--tenet/16.js +15 -0
  396. package/es/icons/ibm--tenet/20.d.ts +17 -0
  397. package/es/icons/ibm--tenet/20.js +15 -0
  398. package/es/icons/ibm--tenet/24.d.ts +17 -0
  399. package/es/icons/ibm--tenet/24.js +15 -0
  400. package/es/icons/ibm--tenet/32.d.ts +17 -0
  401. package/es/icons/ibm--tenet/32.js +15 -0
  402. package/es/icons/ibm--toolchain/16.d.ts +17 -0
  403. package/es/icons/ibm--toolchain/16.js +15 -0
  404. package/es/icons/ibm--toolchain/20.d.ts +17 -0
  405. package/es/icons/ibm--toolchain/20.js +15 -0
  406. package/es/icons/ibm--toolchain/24.d.ts +17 -0
  407. package/es/icons/ibm--toolchain/24.js +15 -0
  408. package/es/icons/ibm--toolchain/32.d.ts +17 -0
  409. package/es/icons/ibm--toolchain/32.js +15 -0
  410. package/es/icons/ibm-cloud--HSM/16.d.ts +17 -0
  411. package/es/icons/ibm-cloud--HSM/16.js +15 -0
  412. package/es/icons/ibm-cloud--HSM/20.d.ts +17 -0
  413. package/es/icons/ibm-cloud--HSM/20.js +15 -0
  414. package/es/icons/ibm-cloud--HSM/24.d.ts +17 -0
  415. package/es/icons/ibm-cloud--HSM/24.js +15 -0
  416. package/es/icons/ibm-cloud--HSM/32.d.ts +17 -0
  417. package/es/icons/ibm-cloud--HSM/32.js +15 -0
  418. package/es/icons/ibm-cloud--app-id/16.d.ts +17 -0
  419. package/es/icons/ibm-cloud--app-id/16.js +15 -0
  420. package/es/icons/ibm-cloud--app-id/20.d.ts +17 -0
  421. package/es/icons/ibm-cloud--app-id/20.js +15 -0
  422. package/es/icons/ibm-cloud--app-id/24.d.ts +17 -0
  423. package/es/icons/ibm-cloud--app-id/24.js +15 -0
  424. package/es/icons/ibm-cloud--app-id/32.d.ts +17 -0
  425. package/es/icons/ibm-cloud--app-id/32.js +15 -0
  426. package/es/icons/ibm-cloud--citrix-daas/16.d.ts +17 -0
  427. package/es/icons/ibm-cloud--citrix-daas/16.js +15 -0
  428. package/es/icons/ibm-cloud--citrix-daas/20.d.ts +17 -0
  429. package/es/icons/ibm-cloud--citrix-daas/20.js +15 -0
  430. package/es/icons/ibm-cloud--citrix-daas/24.d.ts +17 -0
  431. package/es/icons/ibm-cloud--citrix-daas/24.js +15 -0
  432. package/es/icons/ibm-cloud--citrix-daas/32.d.ts +17 -0
  433. package/es/icons/ibm-cloud--citrix-daas/32.js +15 -0
  434. package/es/icons/ibm-cloud--continuous-delivery/16.d.ts +17 -0
  435. package/es/icons/ibm-cloud--continuous-delivery/16.js +15 -0
  436. package/es/icons/ibm-cloud--continuous-delivery/20.d.ts +17 -0
  437. package/es/icons/ibm-cloud--continuous-delivery/20.js +15 -0
  438. package/es/icons/ibm-cloud--continuous-delivery/24.d.ts +17 -0
  439. package/es/icons/ibm-cloud--continuous-delivery/24.js +15 -0
  440. package/es/icons/ibm-cloud--continuous-delivery/32.d.ts +17 -0
  441. package/es/icons/ibm-cloud--continuous-delivery/32.js +15 -0
  442. package/es/icons/ibm-cloud--direct-link-1--connect/16.d.ts +17 -0
  443. package/es/icons/ibm-cloud--direct-link-1--connect/16.js +15 -0
  444. package/es/icons/ibm-cloud--direct-link-1--connect/20.d.ts +17 -0
  445. package/es/icons/ibm-cloud--direct-link-1--connect/20.js +15 -0
  446. package/es/icons/ibm-cloud--direct-link-1--connect/24.d.ts +17 -0
  447. package/es/icons/ibm-cloud--direct-link-1--connect/24.js +15 -0
  448. package/es/icons/ibm-cloud--direct-link-1--connect/32.d.ts +17 -0
  449. package/es/icons/ibm-cloud--direct-link-1--connect/32.js +15 -0
  450. package/es/icons/ibm-cloud--direct-link-1--dedicated/16.d.ts +17 -0
  451. package/es/icons/ibm-cloud--direct-link-1--dedicated/16.js +15 -0
  452. package/es/icons/ibm-cloud--direct-link-1--dedicated/20.d.ts +17 -0
  453. package/es/icons/ibm-cloud--direct-link-1--dedicated/20.js +15 -0
  454. package/es/icons/ibm-cloud--direct-link-1--dedicated/24.d.ts +17 -0
  455. package/es/icons/ibm-cloud--direct-link-1--dedicated/24.js +15 -0
  456. package/es/icons/ibm-cloud--direct-link-1--dedicated/32.d.ts +17 -0
  457. package/es/icons/ibm-cloud--direct-link-1--dedicated/32.js +15 -0
  458. package/es/icons/ibm-cloud--direct-link-1--dedicated-hosting/16.d.ts +17 -0
  459. package/es/icons/ibm-cloud--direct-link-1--dedicated-hosting/16.js +15 -0
  460. package/es/icons/ibm-cloud--direct-link-1--dedicated-hosting/20.d.ts +17 -0
  461. package/es/icons/ibm-cloud--direct-link-1--dedicated-hosting/20.js +15 -0
  462. package/es/icons/ibm-cloud--direct-link-1--dedicated-hosting/24.d.ts +17 -0
  463. package/es/icons/ibm-cloud--direct-link-1--dedicated-hosting/24.js +15 -0
  464. package/es/icons/ibm-cloud--direct-link-1--dedicated-hosting/32.d.ts +17 -0
  465. package/es/icons/ibm-cloud--direct-link-1--dedicated-hosting/32.js +15 -0
  466. package/es/icons/ibm-cloud--direct-link-1--exchange/16.d.ts +17 -0
  467. package/es/icons/ibm-cloud--direct-link-1--exchange/16.js +15 -0
  468. package/es/icons/ibm-cloud--direct-link-1--exchange/20.d.ts +17 -0
  469. package/es/icons/ibm-cloud--direct-link-1--exchange/20.js +15 -0
  470. package/es/icons/ibm-cloud--direct-link-1--exchange/24.d.ts +17 -0
  471. package/es/icons/ibm-cloud--direct-link-1--exchange/24.js +15 -0
  472. package/es/icons/ibm-cloud--direct-link-1--exchange/32.d.ts +17 -0
  473. package/es/icons/ibm-cloud--direct-link-1--exchange/32.js +15 -0
  474. package/es/icons/ibm-cloud--direct-link-2--connect/16.d.ts +17 -0
  475. package/es/icons/ibm-cloud--direct-link-2--connect/16.js +15 -0
  476. package/es/icons/ibm-cloud--direct-link-2--connect/20.d.ts +17 -0
  477. package/es/icons/ibm-cloud--direct-link-2--connect/20.js +15 -0
  478. package/es/icons/ibm-cloud--direct-link-2--connect/24.d.ts +17 -0
  479. package/es/icons/ibm-cloud--direct-link-2--connect/24.js +15 -0
  480. package/es/icons/ibm-cloud--direct-link-2--connect/32.d.ts +17 -0
  481. package/es/icons/ibm-cloud--direct-link-2--connect/32.js +15 -0
  482. package/es/icons/ibm-cloud--direct-link-2--dedicated/16.d.ts +17 -0
  483. package/es/icons/ibm-cloud--direct-link-2--dedicated/16.js +15 -0
  484. package/es/icons/ibm-cloud--direct-link-2--dedicated/20.d.ts +17 -0
  485. package/es/icons/ibm-cloud--direct-link-2--dedicated/20.js +15 -0
  486. package/es/icons/ibm-cloud--direct-link-2--dedicated/24.d.ts +17 -0
  487. package/es/icons/ibm-cloud--direct-link-2--dedicated/24.js +15 -0
  488. package/es/icons/ibm-cloud--direct-link-2--dedicated/32.d.ts +17 -0
  489. package/es/icons/ibm-cloud--direct-link-2--dedicated/32.js +15 -0
  490. package/es/icons/ibm-cloud--direct-link-2--dedicated-hosting/16.d.ts +17 -0
  491. package/es/icons/ibm-cloud--direct-link-2--dedicated-hosting/16.js +15 -0
  492. package/es/icons/ibm-cloud--direct-link-2--dedicated-hosting/20.d.ts +17 -0
  493. package/es/icons/ibm-cloud--direct-link-2--dedicated-hosting/20.js +15 -0
  494. package/es/icons/ibm-cloud--direct-link-2--dedicated-hosting/24.d.ts +17 -0
  495. package/es/icons/ibm-cloud--direct-link-2--dedicated-hosting/24.js +15 -0
  496. package/es/icons/ibm-cloud--direct-link-2--dedicated-hosting/32.d.ts +17 -0
  497. package/es/icons/ibm-cloud--direct-link-2--dedicated-hosting/32.js +15 -0
  498. package/es/icons/ibm-cloud--event-notification/16.d.ts +17 -0
  499. package/es/icons/ibm-cloud--event-notification/16.js +15 -0
  500. package/es/icons/ibm-cloud--event-notification/20.d.ts +17 -0
  501. package/es/icons/ibm-cloud--event-notification/20.js +15 -0
  502. package/es/icons/ibm-cloud--event-notification/24.d.ts +17 -0
  503. package/es/icons/ibm-cloud--event-notification/24.js +15 -0
  504. package/es/icons/ibm-cloud--event-notification/32.d.ts +17 -0
  505. package/es/icons/ibm-cloud--event-notification/32.js +15 -0
  506. package/es/icons/ibm-cloud--event-streams/16.d.ts +17 -0
  507. package/es/icons/ibm-cloud--event-streams/16.js +15 -0
  508. package/es/icons/ibm-cloud--event-streams/20.d.ts +17 -0
  509. package/es/icons/ibm-cloud--event-streams/20.js +15 -0
  510. package/es/icons/ibm-cloud--event-streams/24.d.ts +17 -0
  511. package/es/icons/ibm-cloud--event-streams/24.js +15 -0
  512. package/es/icons/ibm-cloud--event-streams/32.d.ts +17 -0
  513. package/es/icons/ibm-cloud--event-streams/32.js +15 -0
  514. package/es/icons/ibm-cloud--for-education/16.d.ts +17 -0
  515. package/es/icons/ibm-cloud--for-education/16.js +15 -0
  516. package/es/icons/ibm-cloud--for-education/20.d.ts +17 -0
  517. package/es/icons/ibm-cloud--for-education/20.js +15 -0
  518. package/es/icons/ibm-cloud--for-education/24.d.ts +17 -0
  519. package/es/icons/ibm-cloud--for-education/24.js +15 -0
  520. package/es/icons/ibm-cloud--for-education/32.d.ts +17 -0
  521. package/es/icons/ibm-cloud--for-education/32.js +15 -0
  522. package/es/icons/ibm-cloud--hyper-protect-crypto-services/16.d.ts +17 -0
  523. package/es/icons/ibm-cloud--hyper-protect-crypto-services/16.js +15 -0
  524. package/es/icons/ibm-cloud--hyper-protect-crypto-services/20.d.ts +17 -0
  525. package/es/icons/ibm-cloud--hyper-protect-crypto-services/20.js +15 -0
  526. package/es/icons/ibm-cloud--hyper-protect-crypto-services/24.d.ts +17 -0
  527. package/es/icons/ibm-cloud--hyper-protect-crypto-services/24.js +15 -0
  528. package/es/icons/ibm-cloud--hyper-protect-crypto-services/32.d.ts +17 -0
  529. package/es/icons/ibm-cloud--hyper-protect-crypto-services/32.js +15 -0
  530. package/es/icons/ibm-cloud--hyper-protect-dbaas/16.d.ts +17 -0
  531. package/es/icons/ibm-cloud--hyper-protect-dbaas/16.js +15 -0
  532. package/es/icons/ibm-cloud--hyper-protect-dbaas/20.d.ts +17 -0
  533. package/es/icons/ibm-cloud--hyper-protect-dbaas/20.js +15 -0
  534. package/es/icons/ibm-cloud--hyper-protect-dbaas/24.d.ts +17 -0
  535. package/es/icons/ibm-cloud--hyper-protect-dbaas/24.js +15 -0
  536. package/es/icons/ibm-cloud--hyper-protect-dbaas/32.d.ts +17 -0
  537. package/es/icons/ibm-cloud--hyper-protect-dbaas/32.js +15 -0
  538. package/es/icons/ibm-cloud--hyper-protect-vs/16.d.ts +17 -0
  539. package/es/icons/ibm-cloud--hyper-protect-vs/16.js +15 -0
  540. package/es/icons/ibm-cloud--hyper-protect-vs/20.d.ts +17 -0
  541. package/es/icons/ibm-cloud--hyper-protect-vs/20.js +15 -0
  542. package/es/icons/ibm-cloud--hyper-protect-vs/24.d.ts +17 -0
  543. package/es/icons/ibm-cloud--hyper-protect-vs/24.js +15 -0
  544. package/es/icons/ibm-cloud--hyper-protect-vs/32.d.ts +17 -0
  545. package/es/icons/ibm-cloud--hyper-protect-vs/32.js +15 -0
  546. package/es/icons/ibm-cloud--internet-services/16.js +1 -1
  547. package/es/icons/ibm-cloud--internet-services/20.js +1 -1
  548. package/es/icons/ibm-cloud--internet-services/24.js +1 -1
  549. package/es/icons/ibm-cloud--internet-services/32.js +1 -1
  550. package/es/icons/ibm-cloud--ipsec-vpn/16.d.ts +17 -0
  551. package/es/icons/ibm-cloud--ipsec-vpn/16.js +15 -0
  552. package/es/icons/ibm-cloud--ipsec-vpn/20.d.ts +17 -0
  553. package/es/icons/ibm-cloud--ipsec-vpn/20.js +15 -0
  554. package/es/icons/ibm-cloud--ipsec-vpn/24.d.ts +17 -0
  555. package/es/icons/ibm-cloud--ipsec-vpn/24.js +15 -0
  556. package/es/icons/ibm-cloud--ipsec-vpn/32.d.ts +17 -0
  557. package/es/icons/ibm-cloud--ipsec-vpn/32.js +15 -0
  558. package/es/icons/ibm-cloud--key-protect/16.d.ts +17 -0
  559. package/es/icons/ibm-cloud--key-protect/16.js +15 -0
  560. package/es/icons/ibm-cloud--key-protect/20.d.ts +17 -0
  561. package/es/icons/ibm-cloud--key-protect/20.js +15 -0
  562. package/es/icons/ibm-cloud--key-protect/24.d.ts +17 -0
  563. package/es/icons/ibm-cloud--key-protect/24.js +15 -0
  564. package/es/icons/ibm-cloud--key-protect/32.d.ts +17 -0
  565. package/es/icons/ibm-cloud--key-protect/32.js +15 -0
  566. package/es/icons/ibm-cloud--kubernetes-service/16.d.ts +17 -0
  567. package/es/icons/ibm-cloud--kubernetes-service/16.js +15 -0
  568. package/es/icons/ibm-cloud--kubernetes-service/20.d.ts +17 -0
  569. package/es/icons/ibm-cloud--kubernetes-service/20.js +15 -0
  570. package/es/icons/ibm-cloud--kubernetes-service/24.d.ts +17 -0
  571. package/es/icons/ibm-cloud--kubernetes-service/24.js +15 -0
  572. package/es/icons/ibm-cloud--kubernetes-service/32.d.ts +17 -0
  573. package/es/icons/ibm-cloud--kubernetes-service/32.js +15 -0
  574. package/es/icons/ibm-cloud--logging/16.d.ts +17 -0
  575. package/es/icons/ibm-cloud--logging/16.js +15 -0
  576. package/es/icons/ibm-cloud--logging/20.d.ts +17 -0
  577. package/es/icons/ibm-cloud--logging/20.js +15 -0
  578. package/es/icons/ibm-cloud--logging/24.d.ts +17 -0
  579. package/es/icons/ibm-cloud--logging/24.js +15 -0
  580. package/es/icons/ibm-cloud--logging/32.d.ts +17 -0
  581. package/es/icons/ibm-cloud--logging/32.js +15 -0
  582. package/es/icons/ibm-cloud--mass-data-migration/16.d.ts +17 -0
  583. package/es/icons/ibm-cloud--mass-data-migration/16.js +15 -0
  584. package/es/icons/ibm-cloud--mass-data-migration/20.d.ts +17 -0
  585. package/es/icons/ibm-cloud--mass-data-migration/20.js +15 -0
  586. package/es/icons/ibm-cloud--mass-data-migration/24.d.ts +17 -0
  587. package/es/icons/ibm-cloud--mass-data-migration/24.js +15 -0
  588. package/es/icons/ibm-cloud--mass-data-migration/32.d.ts +17 -0
  589. package/es/icons/ibm-cloud--mass-data-migration/32.js +15 -0
  590. package/es/icons/ibm-cloud--pal/16.d.ts +17 -0
  591. package/es/icons/ibm-cloud--pal/16.js +15 -0
  592. package/es/icons/ibm-cloud--pal/20.d.ts +17 -0
  593. package/es/icons/ibm-cloud--pal/20.js +15 -0
  594. package/es/icons/ibm-cloud--pal/24.d.ts +17 -0
  595. package/es/icons/ibm-cloud--pal/24.js +15 -0
  596. package/es/icons/ibm-cloud--pal/32.d.ts +17 -0
  597. package/es/icons/ibm-cloud--pal/32.js +15 -0
  598. package/es/icons/ibm-cloud--privileged-access-gateway/16.d.ts +17 -0
  599. package/es/icons/ibm-cloud--privileged-access-gateway/16.js +15 -0
  600. package/es/icons/ibm-cloud--privileged-access-gateway/20.d.ts +17 -0
  601. package/es/icons/ibm-cloud--privileged-access-gateway/20.js +15 -0
  602. package/es/icons/ibm-cloud--privileged-access-gateway/24.d.ts +17 -0
  603. package/es/icons/ibm-cloud--privileged-access-gateway/24.js +15 -0
  604. package/es/icons/ibm-cloud--privileged-access-gateway/32.d.ts +17 -0
  605. package/es/icons/ibm-cloud--privileged-access-gateway/32.js +15 -0
  606. package/es/icons/ibm-cloud--secrets-manager/16.d.ts +17 -0
  607. package/es/icons/ibm-cloud--secrets-manager/16.js +15 -0
  608. package/es/icons/ibm-cloud--secrets-manager/20.d.ts +17 -0
  609. package/es/icons/ibm-cloud--secrets-manager/20.js +15 -0
  610. package/es/icons/ibm-cloud--secrets-manager/24.d.ts +17 -0
  611. package/es/icons/ibm-cloud--secrets-manager/24.js +15 -0
  612. package/es/icons/ibm-cloud--secrets-manager/32.d.ts +17 -0
  613. package/es/icons/ibm-cloud--secrets-manager/32.js +15 -0
  614. package/es/icons/ibm-cloud--sysdig-secure/16.d.ts +17 -0
  615. package/es/icons/ibm-cloud--sysdig-secure/16.js +15 -0
  616. package/es/icons/ibm-cloud--sysdig-secure/20.d.ts +17 -0
  617. package/es/icons/ibm-cloud--sysdig-secure/20.js +15 -0
  618. package/es/icons/ibm-cloud--sysdig-secure/24.d.ts +17 -0
  619. package/es/icons/ibm-cloud--sysdig-secure/24.js +15 -0
  620. package/es/icons/ibm-cloud--sysdig-secure/32.d.ts +17 -0
  621. package/es/icons/ibm-cloud--sysdig-secure/32.js +15 -0
  622. package/es/icons/ibm-cloud-pak--MANTA-automated-data-lineage/16.d.ts +17 -0
  623. package/es/icons/ibm-cloud-pak--MANTA-automated-data-lineage/16.js +15 -0
  624. package/es/icons/ibm-cloud-pak--MANTA-automated-data-lineage/20.d.ts +17 -0
  625. package/es/icons/ibm-cloud-pak--MANTA-automated-data-lineage/20.js +15 -0
  626. package/es/icons/ibm-cloud-pak--MANTA-automated-data-lineage/24.d.ts +17 -0
  627. package/es/icons/ibm-cloud-pak--MANTA-automated-data-lineage/24.js +15 -0
  628. package/es/icons/ibm-cloud-pak--MANTA-automated-data-lineage/32.d.ts +17 -0
  629. package/es/icons/ibm-cloud-pak--MANTA-automated-data-lineage/32.js +15 -0
  630. package/es/icons/ibm-cloud-pak--business-automation/16.d.ts +17 -0
  631. package/es/icons/ibm-cloud-pak--business-automation/16.js +15 -0
  632. package/es/icons/ibm-cloud-pak--business-automation/20.d.ts +17 -0
  633. package/es/icons/ibm-cloud-pak--business-automation/20.js +15 -0
  634. package/es/icons/ibm-cloud-pak--business-automation/24.d.ts +17 -0
  635. package/es/icons/ibm-cloud-pak--business-automation/24.js +15 -0
  636. package/es/icons/ibm-cloud-pak--business-automation/32.d.ts +17 -0
  637. package/es/icons/ibm-cloud-pak--business-automation/32.js +15 -0
  638. package/es/icons/ibm-cloud-pak--netezza/16.d.ts +17 -0
  639. package/es/icons/ibm-cloud-pak--netezza/16.js +15 -0
  640. package/es/icons/ibm-cloud-pak--netezza/20.d.ts +17 -0
  641. package/es/icons/ibm-cloud-pak--netezza/20.js +15 -0
  642. package/es/icons/ibm-cloud-pak--netezza/24.d.ts +17 -0
  643. package/es/icons/ibm-cloud-pak--netezza/24.js +15 -0
  644. package/es/icons/ibm-cloud-pak--netezza/32.d.ts +17 -0
  645. package/es/icons/ibm-cloud-pak--netezza/32.js +15 -0
  646. package/es/icons/ibm-watson--assistant/16.d.ts +17 -0
  647. package/es/icons/ibm-watson--assistant/16.js +15 -0
  648. package/es/icons/ibm-watson--assistant/20.d.ts +17 -0
  649. package/es/icons/ibm-watson--assistant/20.js +15 -0
  650. package/es/icons/ibm-watson--assistant/24.d.ts +17 -0
  651. package/es/icons/ibm-watson--assistant/24.js +15 -0
  652. package/es/icons/ibm-watson--assistant/32.d.ts +17 -0
  653. package/es/icons/ibm-watson--assistant/32.js +15 -0
  654. package/es/icons/ibm-watson--discovery/16.d.ts +17 -0
  655. package/es/icons/ibm-watson--discovery/16.js +15 -0
  656. package/es/icons/ibm-watson--discovery/20.d.ts +17 -0
  657. package/es/icons/ibm-watson--discovery/20.js +15 -0
  658. package/es/icons/ibm-watson--discovery/24.d.ts +17 -0
  659. package/es/icons/ibm-watson--discovery/24.js +15 -0
  660. package/es/icons/ibm-watson--discovery/32.d.ts +17 -0
  661. package/es/icons/ibm-watson--discovery/32.js +15 -0
  662. package/es/icons/ibm-watson--knowledge-catalog/16.d.ts +17 -0
  663. package/es/icons/ibm-watson--knowledge-catalog/16.js +15 -0
  664. package/es/icons/ibm-watson--knowledge-catalog/20.d.ts +17 -0
  665. package/es/icons/ibm-watson--knowledge-catalog/20.js +15 -0
  666. package/es/icons/ibm-watson--knowledge-catalog/24.d.ts +17 -0
  667. package/es/icons/ibm-watson--knowledge-catalog/24.js +15 -0
  668. package/es/icons/ibm-watson--knowledge-catalog/32.d.ts +17 -0
  669. package/es/icons/ibm-watson--knowledge-catalog/32.js +15 -0
  670. package/es/icons/ibm-watson--knowledge-studio/16.d.ts +17 -0
  671. package/es/icons/ibm-watson--knowledge-studio/16.js +15 -0
  672. package/es/icons/ibm-watson--knowledge-studio/20.d.ts +17 -0
  673. package/es/icons/ibm-watson--knowledge-studio/20.js +15 -0
  674. package/es/icons/ibm-watson--knowledge-studio/24.d.ts +17 -0
  675. package/es/icons/ibm-watson--knowledge-studio/24.js +15 -0
  676. package/es/icons/ibm-watson--knowledge-studio/32.d.ts +17 -0
  677. package/es/icons/ibm-watson--knowledge-studio/32.js +15 -0
  678. package/es/icons/ibm-watson--language-translator/16.d.ts +17 -0
  679. package/es/icons/ibm-watson--language-translator/16.js +15 -0
  680. package/es/icons/ibm-watson--language-translator/20.d.ts +17 -0
  681. package/es/icons/ibm-watson--language-translator/20.js +15 -0
  682. package/es/icons/ibm-watson--language-translator/24.d.ts +17 -0
  683. package/es/icons/ibm-watson--language-translator/24.js +15 -0
  684. package/es/icons/ibm-watson--language-translator/32.d.ts +17 -0
  685. package/es/icons/ibm-watson--language-translator/32.js +15 -0
  686. package/es/icons/ibm-watson--machine-learning/16.d.ts +17 -0
  687. package/es/icons/ibm-watson--machine-learning/16.js +15 -0
  688. package/es/icons/ibm-watson--machine-learning/20.d.ts +17 -0
  689. package/es/icons/ibm-watson--machine-learning/20.js +15 -0
  690. package/es/icons/ibm-watson--machine-learning/24.d.ts +17 -0
  691. package/es/icons/ibm-watson--machine-learning/24.js +15 -0
  692. package/es/icons/ibm-watson--machine-learning/32.d.ts +17 -0
  693. package/es/icons/ibm-watson--machine-learning/32.js +15 -0
  694. package/es/icons/ibm-watson--natural-language-classifier/16.d.ts +17 -0
  695. package/es/icons/ibm-watson--natural-language-classifier/16.js +15 -0
  696. package/es/icons/ibm-watson--natural-language-classifier/20.d.ts +17 -0
  697. package/es/icons/ibm-watson--natural-language-classifier/20.js +15 -0
  698. package/es/icons/ibm-watson--natural-language-classifier/24.d.ts +17 -0
  699. package/es/icons/ibm-watson--natural-language-classifier/24.js +15 -0
  700. package/es/icons/ibm-watson--natural-language-classifier/32.d.ts +17 -0
  701. package/es/icons/ibm-watson--natural-language-classifier/32.js +15 -0
  702. package/es/icons/ibm-watson--natural-language-understanding/16.d.ts +17 -0
  703. package/es/icons/ibm-watson--natural-language-understanding/16.js +15 -0
  704. package/es/icons/ibm-watson--natural-language-understanding/20.d.ts +17 -0
  705. package/es/icons/ibm-watson--natural-language-understanding/20.js +15 -0
  706. package/es/icons/ibm-watson--natural-language-understanding/24.d.ts +17 -0
  707. package/es/icons/ibm-watson--natural-language-understanding/24.js +15 -0
  708. package/es/icons/ibm-watson--natural-language-understanding/32.d.ts +17 -0
  709. package/es/icons/ibm-watson--natural-language-understanding/32.js +15 -0
  710. package/es/icons/ibm-watson--openscale/16.d.ts +17 -0
  711. package/es/icons/ibm-watson--openscale/16.js +15 -0
  712. package/es/icons/ibm-watson--openscale/20.d.ts +17 -0
  713. package/es/icons/ibm-watson--openscale/20.js +15 -0
  714. package/es/icons/ibm-watson--openscale/24.d.ts +17 -0
  715. package/es/icons/ibm-watson--openscale/24.js +15 -0
  716. package/es/icons/ibm-watson--openscale/32.d.ts +17 -0
  717. package/es/icons/ibm-watson--openscale/32.js +15 -0
  718. package/es/icons/ibm-watson--query/16.d.ts +17 -0
  719. package/es/icons/ibm-watson--query/16.js +15 -0
  720. package/es/icons/ibm-watson--query/20.d.ts +17 -0
  721. package/es/icons/ibm-watson--query/20.js +15 -0
  722. package/es/icons/ibm-watson--query/24.d.ts +17 -0
  723. package/es/icons/ibm-watson--query/24.js +15 -0
  724. package/es/icons/ibm-watson--query/32.d.ts +17 -0
  725. package/es/icons/ibm-watson--query/32.js +15 -0
  726. package/es/icons/ibm-watson--speech-to-text/16.d.ts +17 -0
  727. package/es/icons/ibm-watson--speech-to-text/16.js +15 -0
  728. package/es/icons/ibm-watson--speech-to-text/20.d.ts +17 -0
  729. package/es/icons/ibm-watson--speech-to-text/20.js +15 -0
  730. package/es/icons/ibm-watson--speech-to-text/24.d.ts +17 -0
  731. package/es/icons/ibm-watson--speech-to-text/24.js +15 -0
  732. package/es/icons/ibm-watson--speech-to-text/32.d.ts +17 -0
  733. package/es/icons/ibm-watson--speech-to-text/32.js +15 -0
  734. package/es/icons/ibm-watson--studio/16.d.ts +17 -0
  735. package/es/icons/ibm-watson--studio/16.js +15 -0
  736. package/es/icons/ibm-watson--studio/20.d.ts +17 -0
  737. package/es/icons/ibm-watson--studio/20.js +15 -0
  738. package/es/icons/ibm-watson--studio/24.d.ts +17 -0
  739. package/es/icons/ibm-watson--studio/24.js +15 -0
  740. package/es/icons/ibm-watson--studio/32.d.ts +17 -0
  741. package/es/icons/ibm-watson--studio/32.js +15 -0
  742. package/es/icons/ibm-watson--text-to-speech/16.d.ts +17 -0
  743. package/es/icons/ibm-watson--text-to-speech/16.js +15 -0
  744. package/es/icons/ibm-watson--text-to-speech/20.d.ts +17 -0
  745. package/es/icons/ibm-watson--text-to-speech/20.js +15 -0
  746. package/es/icons/ibm-watson--text-to-speech/24.d.ts +17 -0
  747. package/es/icons/ibm-watson--text-to-speech/24.js +15 -0
  748. package/es/icons/ibm-watson--text-to-speech/32.d.ts +17 -0
  749. package/es/icons/ibm-watson--text-to-speech/32.js +15 -0
  750. package/es/icons/ibm-watson--tone-analyzer/16.d.ts +17 -0
  751. package/es/icons/ibm-watson--tone-analyzer/16.js +15 -0
  752. package/es/icons/ibm-watson--tone-analyzer/20.d.ts +17 -0
  753. package/es/icons/ibm-watson--tone-analyzer/20.js +15 -0
  754. package/es/icons/ibm-watson--tone-analyzer/24.d.ts +17 -0
  755. package/es/icons/ibm-watson--tone-analyzer/24.js +15 -0
  756. package/es/icons/ibm-watson--tone-analyzer/32.d.ts +17 -0
  757. package/es/icons/ibm-watson--tone-analyzer/32.js +15 -0
  758. package/es/icons/ibm-z--cloud-mod-stack/16.d.ts +17 -0
  759. package/es/icons/ibm-z--cloud-mod-stack/16.js +15 -0
  760. package/es/icons/ibm-z--cloud-mod-stack/20.d.ts +17 -0
  761. package/es/icons/ibm-z--cloud-mod-stack/20.js +15 -0
  762. package/es/icons/ibm-z--cloud-mod-stack/24.d.ts +17 -0
  763. package/es/icons/ibm-z--cloud-mod-stack/24.js +15 -0
  764. package/es/icons/ibm-z--cloud-mod-stack/32.d.ts +17 -0
  765. package/es/icons/ibm-z--cloud-mod-stack/32.js +15 -0
  766. package/es/icons/ibm-z-cloud--provisioning/16.d.ts +17 -0
  767. package/es/icons/ibm-z-cloud--provisioning/16.js +15 -0
  768. package/es/icons/ibm-z-cloud--provisioning/20.d.ts +17 -0
  769. package/es/icons/ibm-z-cloud--provisioning/20.js +15 -0
  770. package/es/icons/ibm-z-cloud--provisioning/24.d.ts +17 -0
  771. package/es/icons/ibm-z-cloud--provisioning/24.js +15 -0
  772. package/es/icons/ibm-z-cloud--provisioning/32.d.ts +17 -0
  773. package/es/icons/ibm-z-cloud--provisioning/32.js +15 -0
  774. package/es/icons/ibm-z-os--package-manager/16.d.ts +17 -0
  775. package/es/icons/ibm-z-os--package-manager/16.js +15 -0
  776. package/es/icons/ibm-z-os--package-manager/20.d.ts +17 -0
  777. package/es/icons/ibm-z-os--package-manager/20.js +15 -0
  778. package/es/icons/ibm-z-os--package-manager/24.d.ts +17 -0
  779. package/es/icons/ibm-z-os--package-manager/24.js +15 -0
  780. package/es/icons/ibm-z-os--package-manager/32.d.ts +17 -0
  781. package/es/icons/ibm-z-os--package-manager/32.js +15 -0
  782. package/es/icons/keyboard--off/16.d.ts +17 -0
  783. package/es/icons/keyboard--off/16.js +15 -0
  784. package/es/icons/keyboard--off/20.d.ts +17 -0
  785. package/es/icons/keyboard--off/20.js +15 -0
  786. package/es/icons/keyboard--off/24.d.ts +17 -0
  787. package/es/icons/keyboard--off/24.js +15 -0
  788. package/es/icons/keyboard--off/32.d.ts +17 -0
  789. package/es/icons/keyboard--off/32.js +15 -0
  790. package/es/icons/list--checked/16.js +1 -1
  791. package/es/icons/list--checked/20.js +1 -1
  792. package/es/icons/list--checked/24.js +1 -1
  793. package/es/icons/list--checked/32.js +1 -1
  794. package/es/icons/list--checked--mirror/16.d.ts +17 -0
  795. package/es/icons/list--checked--mirror/16.js +15 -0
  796. package/es/icons/list--checked--mirror/20.d.ts +17 -0
  797. package/es/icons/list--checked--mirror/20.js +15 -0
  798. package/es/icons/list--checked--mirror/24.d.ts +17 -0
  799. package/es/icons/list--checked--mirror/24.js +15 -0
  800. package/es/icons/list--checked--mirror/32.d.ts +17 -0
  801. package/es/icons/list--checked--mirror/32.js +15 -0
  802. package/es/icons/list--numbered--mirror/16.d.ts +17 -0
  803. package/es/icons/list--numbered--mirror/16.js +15 -0
  804. package/es/icons/list--numbered--mirror/20.d.ts +17 -0
  805. package/es/icons/list--numbered--mirror/20.js +15 -0
  806. package/es/icons/list--numbered--mirror/24.d.ts +17 -0
  807. package/es/icons/list--numbered--mirror/24.js +15 -0
  808. package/es/icons/list--numbered--mirror/32.d.ts +17 -0
  809. package/es/icons/list--numbered--mirror/32.js +15 -0
  810. package/es/icons/logical-partition/16.js +1 -1
  811. package/es/icons/logical-partition/20.js +1 -1
  812. package/es/icons/logical-partition/24.js +1 -1
  813. package/es/icons/logical-partition/32.js +1 -1
  814. package/es/icons/logo--angular/16.d.ts +17 -0
  815. package/es/icons/logo--angular/16.js +15 -0
  816. package/es/icons/logo--angular/20.d.ts +17 -0
  817. package/es/icons/logo--angular/20.js +15 -0
  818. package/es/icons/logo--angular/24.d.ts +17 -0
  819. package/es/icons/logo--angular/24.js +15 -0
  820. package/es/icons/logo--angular/32.d.ts +17 -0
  821. package/es/icons/logo--angular/32.js +15 -0
  822. package/es/icons/logo--ansible-community/16.d.ts +17 -0
  823. package/es/icons/logo--ansible-community/16.js +15 -0
  824. package/es/icons/logo--ansible-community/20.d.ts +17 -0
  825. package/es/icons/logo--ansible-community/20.js +15 -0
  826. package/es/icons/logo--ansible-community/24.d.ts +17 -0
  827. package/es/icons/logo--ansible-community/24.js +15 -0
  828. package/es/icons/logo--ansible-community/32.d.ts +17 -0
  829. package/es/icons/logo--ansible-community/32.js +15 -0
  830. package/es/icons/logo--discord/16.js +1 -1
  831. package/es/icons/logo--discord/20.js +1 -1
  832. package/es/icons/logo--discord/24.js +1 -1
  833. package/es/icons/logo--discord/32.js +1 -1
  834. package/es/icons/logo--figma/16.d.ts +17 -0
  835. package/es/icons/logo--figma/16.js +15 -0
  836. package/es/icons/logo--figma/20.d.ts +17 -0
  837. package/es/icons/logo--figma/20.js +15 -0
  838. package/es/icons/logo--figma/24.d.ts +17 -0
  839. package/es/icons/logo--figma/24.js +15 -0
  840. package/es/icons/logo--figma/32.d.ts +17 -0
  841. package/es/icons/logo--figma/32.js +15 -0
  842. package/es/icons/logo--invision/16.d.ts +17 -0
  843. package/es/icons/logo--invision/16.js +15 -0
  844. package/es/icons/logo--invision/20.d.ts +17 -0
  845. package/es/icons/logo--invision/20.js +15 -0
  846. package/es/icons/logo--invision/24.d.ts +17 -0
  847. package/es/icons/logo--invision/24.js +15 -0
  848. package/es/icons/logo--invision/32.d.ts +17 -0
  849. package/es/icons/logo--invision/32.js +15 -0
  850. package/es/icons/logo--kubernetes/16.d.ts +17 -0
  851. package/es/icons/logo--kubernetes/16.js +15 -0
  852. package/es/icons/logo--kubernetes/20.d.ts +17 -0
  853. package/es/icons/logo--kubernetes/20.js +15 -0
  854. package/es/icons/logo--kubernetes/24.d.ts +17 -0
  855. package/es/icons/logo--kubernetes/24.js +15 -0
  856. package/es/icons/logo--kubernetes/32.d.ts +17 -0
  857. package/es/icons/logo--kubernetes/32.js +15 -0
  858. package/es/icons/logo--medium/16.js +1 -1
  859. package/es/icons/logo--medium/20.js +1 -1
  860. package/es/icons/logo--medium/24.js +1 -1
  861. package/es/icons/logo--medium/32.js +1 -1
  862. package/es/icons/logo--npm/16.d.ts +17 -0
  863. package/es/icons/logo--npm/16.js +15 -0
  864. package/es/icons/logo--npm/20.d.ts +17 -0
  865. package/es/icons/logo--npm/20.js +15 -0
  866. package/es/icons/logo--npm/24.d.ts +17 -0
  867. package/es/icons/logo--npm/24.js +15 -0
  868. package/es/icons/logo--npm/32.d.ts +17 -0
  869. package/es/icons/logo--npm/32.js +15 -0
  870. package/es/icons/logo--react/16.d.ts +17 -0
  871. package/es/icons/logo--react/16.js +15 -0
  872. package/es/icons/logo--react/20.d.ts +17 -0
  873. package/es/icons/logo--react/20.js +15 -0
  874. package/es/icons/logo--react/24.d.ts +17 -0
  875. package/es/icons/logo--react/24.js +15 -0
  876. package/es/icons/logo--react/32.d.ts +17 -0
  877. package/es/icons/logo--react/32.js +15 -0
  878. package/es/icons/logo--red-hat-ansible/16.d.ts +17 -0
  879. package/es/icons/logo--red-hat-ansible/16.js +15 -0
  880. package/es/icons/logo--red-hat-ansible/20.d.ts +17 -0
  881. package/es/icons/logo--red-hat-ansible/20.js +15 -0
  882. package/es/icons/logo--red-hat-ansible/24.d.ts +17 -0
  883. package/es/icons/logo--red-hat-ansible/24.js +15 -0
  884. package/es/icons/logo--red-hat-ansible/32.d.ts +17 -0
  885. package/es/icons/logo--red-hat-ansible/32.js +15 -0
  886. package/es/icons/logo--sketch/16.d.ts +17 -0
  887. package/es/icons/logo--sketch/16.js +15 -0
  888. package/es/icons/logo--sketch/20.d.ts +17 -0
  889. package/es/icons/logo--sketch/20.js +15 -0
  890. package/es/icons/logo--sketch/24.d.ts +17 -0
  891. package/es/icons/logo--sketch/24.js +15 -0
  892. package/es/icons/logo--sketch/32.d.ts +17 -0
  893. package/es/icons/logo--sketch/32.js +15 -0
  894. package/es/icons/logo--svelte/16.d.ts +17 -0
  895. package/es/icons/logo--svelte/16.js +15 -0
  896. package/es/icons/logo--svelte/20.d.ts +17 -0
  897. package/es/icons/logo--svelte/20.js +15 -0
  898. package/es/icons/logo--svelte/24.d.ts +17 -0
  899. package/es/icons/logo--svelte/24.js +15 -0
  900. package/es/icons/logo--svelte/32.d.ts +17 -0
  901. package/es/icons/logo--svelte/32.js +15 -0
  902. package/es/icons/logo--twitter/16.js +1 -1
  903. package/es/icons/logo--twitter/20.js +1 -1
  904. package/es/icons/logo--twitter/24.js +1 -1
  905. package/es/icons/logo--twitter/32.js +1 -1
  906. package/es/icons/logo--vmware/16.js +1 -1
  907. package/es/icons/logo--vmware/20.js +1 -1
  908. package/es/icons/logo--vmware/24.js +1 -1
  909. package/es/icons/logo--vmware/32.js +1 -1
  910. package/es/icons/logo--vmware--alt/16.d.ts +17 -0
  911. package/es/icons/logo--vmware--alt/16.js +15 -0
  912. package/es/icons/logo--vmware--alt/20.d.ts +17 -0
  913. package/es/icons/logo--vmware--alt/20.js +15 -0
  914. package/es/icons/logo--vmware--alt/24.d.ts +17 -0
  915. package/es/icons/logo--vmware--alt/24.js +15 -0
  916. package/es/icons/logo--vmware--alt/32.d.ts +17 -0
  917. package/es/icons/logo--vmware--alt/32.js +15 -0
  918. package/es/icons/logo--vue/16.d.ts +17 -0
  919. package/es/icons/logo--vue/16.js +15 -0
  920. package/es/icons/logo--vue/20.d.ts +17 -0
  921. package/es/icons/logo--vue/20.js +15 -0
  922. package/es/icons/logo--vue/24.d.ts +17 -0
  923. package/es/icons/logo--vue/24.js +15 -0
  924. package/es/icons/logo--vue/32.d.ts +17 -0
  925. package/es/icons/logo--vue/32.js +15 -0
  926. package/es/icons/logo--yelp/16.js +1 -1
  927. package/es/icons/logo--yelp/20.js +1 -1
  928. package/es/icons/logo--yelp/24.js +1 -1
  929. package/es/icons/logo--yelp/32.js +1 -1
  930. package/es/icons/microservices--1/16.d.ts +17 -0
  931. package/es/icons/microservices--1/16.js +15 -0
  932. package/es/icons/microservices--1/20.d.ts +17 -0
  933. package/es/icons/microservices--1/20.js +15 -0
  934. package/es/icons/microservices--1/24.d.ts +17 -0
  935. package/es/icons/microservices--1/24.js +15 -0
  936. package/es/icons/microservices--1/32.d.ts +17 -0
  937. package/es/icons/microservices--1/32.js +15 -0
  938. package/es/icons/microservices--2/16.d.ts +17 -0
  939. package/es/icons/microservices--2/16.js +15 -0
  940. package/es/icons/microservices--2/20.d.ts +17 -0
  941. package/es/icons/microservices--2/20.js +15 -0
  942. package/es/icons/microservices--2/24.d.ts +17 -0
  943. package/es/icons/microservices--2/24.js +15 -0
  944. package/es/icons/microservices--2/32.d.ts +17 -0
  945. package/es/icons/microservices--2/32.js +15 -0
  946. package/es/icons/plan/16.d.ts +17 -0
  947. package/es/icons/plan/16.js +15 -0
  948. package/es/icons/plan/20.d.ts +17 -0
  949. package/es/icons/plan/20.js +15 -0
  950. package/es/icons/plan/24.d.ts +17 -0
  951. package/es/icons/plan/24.js +15 -0
  952. package/es/icons/plan/32.d.ts +17 -0
  953. package/es/icons/plan/32.js +15 -0
  954. package/es/icons/port--input/16.d.ts +17 -0
  955. package/es/icons/port--input/16.js +15 -0
  956. package/es/icons/port--input/20.d.ts +17 -0
  957. package/es/icons/port--input/20.js +15 -0
  958. package/es/icons/port--input/24.d.ts +17 -0
  959. package/es/icons/port--input/24.js +15 -0
  960. package/es/icons/port--input/32.d.ts +17 -0
  961. package/es/icons/port--input/32.js +15 -0
  962. package/es/icons/port--output/16.d.ts +17 -0
  963. package/es/icons/port--output/16.js +15 -0
  964. package/es/icons/port--output/20.d.ts +17 -0
  965. package/es/icons/port--output/20.js +15 -0
  966. package/es/icons/port--output/24.d.ts +17 -0
  967. package/es/icons/port--output/24.js +15 -0
  968. package/es/icons/port--output/32.d.ts +17 -0
  969. package/es/icons/port--output/32.js +15 -0
  970. package/es/icons/promote/16.d.ts +17 -0
  971. package/es/icons/promote/16.js +15 -0
  972. package/es/icons/promote/20.d.ts +17 -0
  973. package/es/icons/promote/20.js +15 -0
  974. package/es/icons/promote/24.d.ts +17 -0
  975. package/es/icons/promote/24.js +15 -0
  976. package/es/icons/promote/32.d.ts +17 -0
  977. package/es/icons/promote/32.js +15 -0
  978. package/es/icons/recycle/16.d.ts +17 -0
  979. package/es/icons/recycle/16.js +15 -0
  980. package/es/icons/recycle/20.d.ts +17 -0
  981. package/es/icons/recycle/20.js +15 -0
  982. package/es/icons/recycle/24.d.ts +17 -0
  983. package/es/icons/recycle/24.js +15 -0
  984. package/es/icons/recycle/32.d.ts +17 -0
  985. package/es/icons/recycle/32.js +15 -0
  986. package/es/icons/reference-architecture/16.d.ts +17 -0
  987. package/es/icons/reference-architecture/16.js +15 -0
  988. package/es/icons/reference-architecture/20.d.ts +17 -0
  989. package/es/icons/reference-architecture/20.js +15 -0
  990. package/es/icons/reference-architecture/24.d.ts +17 -0
  991. package/es/icons/reference-architecture/24.js +15 -0
  992. package/es/icons/reference-architecture/32.d.ts +17 -0
  993. package/es/icons/reference-architecture/32.js +15 -0
  994. package/es/icons/repo--artifact/16.d.ts +17 -0
  995. package/es/icons/repo--artifact/16.js +15 -0
  996. package/es/icons/repo--artifact/20.d.ts +17 -0
  997. package/es/icons/repo--artifact/20.js +15 -0
  998. package/es/icons/repo--artifact/24.d.ts +17 -0
  999. package/es/icons/repo--artifact/24.js +15 -0
  1000. package/es/icons/repo--artifact/32.d.ts +17 -0
  1001. package/es/icons/repo--artifact/32.js +15 -0
  1002. package/es/icons/repo--source-code/16.d.ts +17 -0
  1003. package/es/icons/repo--source-code/16.js +15 -0
  1004. package/es/icons/repo--source-code/20.d.ts +17 -0
  1005. package/es/icons/repo--source-code/20.js +15 -0
  1006. package/es/icons/repo--source-code/24.d.ts +17 -0
  1007. package/es/icons/repo--source-code/24.js +15 -0
  1008. package/es/icons/repo--source-code/32.d.ts +17 -0
  1009. package/es/icons/repo--source-code/32.js +15 -0
  1010. package/es/icons/rule--data-quality/16.d.ts +17 -0
  1011. package/es/icons/rule--data-quality/16.js +15 -0
  1012. package/es/icons/rule--data-quality/20.d.ts +17 -0
  1013. package/es/icons/rule--data-quality/20.js +15 -0
  1014. package/es/icons/rule--data-quality/24.d.ts +17 -0
  1015. package/es/icons/rule--data-quality/24.js +15 -0
  1016. package/es/icons/rule--data-quality/32.d.ts +17 -0
  1017. package/es/icons/rule--data-quality/32.js +15 -0
  1018. package/es/icons/run--mirror/16.d.ts +17 -0
  1019. package/es/icons/run--mirror/16.js +15 -0
  1020. package/es/icons/run--mirror/20.d.ts +17 -0
  1021. package/es/icons/run--mirror/20.js +15 -0
  1022. package/es/icons/run--mirror/24.d.ts +17 -0
  1023. package/es/icons/run--mirror/24.js +15 -0
  1024. package/es/icons/run--mirror/32.d.ts +17 -0
  1025. package/es/icons/run--mirror/32.js +15 -0
  1026. package/es/icons/screen-map/16.d.ts +17 -0
  1027. package/es/icons/screen-map/16.js +15 -0
  1028. package/es/icons/screen-map/20.d.ts +17 -0
  1029. package/es/icons/screen-map/20.js +15 -0
  1030. package/es/icons/screen-map/24.d.ts +17 -0
  1031. package/es/icons/screen-map/24.js +15 -0
  1032. package/es/icons/screen-map/32.d.ts +17 -0
  1033. package/es/icons/screen-map/32.js +15 -0
  1034. package/es/icons/screen-map--set/16.d.ts +17 -0
  1035. package/es/icons/screen-map--set/16.js +15 -0
  1036. package/es/icons/screen-map--set/20.d.ts +17 -0
  1037. package/es/icons/screen-map--set/20.js +15 -0
  1038. package/es/icons/screen-map--set/24.d.ts +17 -0
  1039. package/es/icons/screen-map--set/24.js +15 -0
  1040. package/es/icons/screen-map--set/32.d.ts +17 -0
  1041. package/es/icons/screen-map--set/32.js +15 -0
  1042. package/es/icons/search--locate--mirror/16.d.ts +17 -0
  1043. package/es/icons/search--locate--mirror/16.js +15 -0
  1044. package/es/icons/search--locate--mirror/20.d.ts +17 -0
  1045. package/es/icons/search--locate--mirror/20.js +15 -0
  1046. package/es/icons/search--locate--mirror/24.d.ts +17 -0
  1047. package/es/icons/search--locate--mirror/24.js +15 -0
  1048. package/es/icons/search--locate--mirror/32.d.ts +17 -0
  1049. package/es/icons/search--locate--mirror/32.js +15 -0
  1050. package/es/icons/service-id/16.d.ts +17 -0
  1051. package/es/icons/service-id/16.js +15 -0
  1052. package/es/icons/service-id/20.d.ts +17 -0
  1053. package/es/icons/service-id/20.js +15 -0
  1054. package/es/icons/service-id/24.d.ts +17 -0
  1055. package/es/icons/service-id/24.js +15 -0
  1056. package/es/icons/service-id/32.d.ts +17 -0
  1057. package/es/icons/service-id/32.js +15 -0
  1058. package/es/icons/side-panel--close/16.d.ts +17 -0
  1059. package/es/icons/side-panel--close/16.js +15 -0
  1060. package/es/icons/side-panel--close/20.d.ts +17 -0
  1061. package/es/icons/side-panel--close/20.js +15 -0
  1062. package/es/icons/side-panel--close/24.d.ts +17 -0
  1063. package/es/icons/side-panel--close/24.js +15 -0
  1064. package/es/icons/side-panel--close/32.d.ts +17 -0
  1065. package/es/icons/side-panel--close/32.js +15 -0
  1066. package/es/icons/side-panel--close--filled/16.d.ts +17 -0
  1067. package/es/icons/side-panel--close--filled/16.js +15 -0
  1068. package/es/icons/side-panel--close--filled/20.d.ts +17 -0
  1069. package/es/icons/side-panel--close--filled/20.js +15 -0
  1070. package/es/icons/side-panel--close--filled/24.d.ts +17 -0
  1071. package/es/icons/side-panel--close--filled/24.js +15 -0
  1072. package/es/icons/side-panel--close--filled/32.d.ts +17 -0
  1073. package/es/icons/side-panel--close--filled/32.js +15 -0
  1074. package/es/icons/side-panel--open/16.d.ts +17 -0
  1075. package/es/icons/side-panel--open/16.js +15 -0
  1076. package/es/icons/side-panel--open/20.d.ts +17 -0
  1077. package/es/icons/side-panel--open/20.js +15 -0
  1078. package/es/icons/side-panel--open/24.d.ts +17 -0
  1079. package/es/icons/side-panel--open/24.js +15 -0
  1080. package/es/icons/side-panel--open/32.d.ts +17 -0
  1081. package/es/icons/side-panel--open/32.js +15 -0
  1082. package/es/icons/side-panel--open--filled/16.d.ts +17 -0
  1083. package/es/icons/side-panel--open--filled/16.js +15 -0
  1084. package/es/icons/side-panel--open--filled/20.d.ts +17 -0
  1085. package/es/icons/side-panel--open--filled/20.js +15 -0
  1086. package/es/icons/side-panel--open--filled/24.d.ts +17 -0
  1087. package/es/icons/side-panel--open--filled/24.js +15 -0
  1088. package/es/icons/side-panel--open--filled/32.d.ts +17 -0
  1089. package/es/icons/side-panel--open--filled/32.js +15 -0
  1090. package/es/icons/summary--KPI--mirror/16.d.ts +17 -0
  1091. package/es/icons/summary--KPI--mirror/16.js +15 -0
  1092. package/es/icons/summary--KPI--mirror/20.d.ts +17 -0
  1093. package/es/icons/summary--KPI--mirror/20.js +15 -0
  1094. package/es/icons/summary--KPI--mirror/24.d.ts +17 -0
  1095. package/es/icons/summary--KPI--mirror/24.js +15 -0
  1096. package/es/icons/summary--KPI--mirror/32.d.ts +17 -0
  1097. package/es/icons/summary--KPI--mirror/32.js +15 -0
  1098. package/es/icons/tcp-ip-service/16.d.ts +17 -0
  1099. package/es/icons/tcp-ip-service/16.js +15 -0
  1100. package/es/icons/tcp-ip-service/20.d.ts +17 -0
  1101. package/es/icons/tcp-ip-service/20.js +15 -0
  1102. package/es/icons/tcp-ip-service/24.d.ts +17 -0
  1103. package/es/icons/tcp-ip-service/24.js +15 -0
  1104. package/es/icons/tcp-ip-service/32.d.ts +17 -0
  1105. package/es/icons/tcp-ip-service/32.js +15 -0
  1106. package/es/icons/test-tool/16.d.ts +17 -0
  1107. package/es/icons/test-tool/16.js +15 -0
  1108. package/es/icons/test-tool/20.d.ts +17 -0
  1109. package/es/icons/test-tool/20.js +15 -0
  1110. package/es/icons/test-tool/24.d.ts +17 -0
  1111. package/es/icons/test-tool/24.js +15 -0
  1112. package/es/icons/test-tool/32.d.ts +17 -0
  1113. package/es/icons/test-tool/32.js +15 -0
  1114. package/es/icons/tools--alt/16.js +1 -1
  1115. package/es/icons/tools--alt/20.js +1 -1
  1116. package/es/icons/tools--alt/24.js +1 -1
  1117. package/es/icons/tools--alt/32.js +1 -1
  1118. package/es/icons/transform--binary/16.d.ts +17 -0
  1119. package/es/icons/transform--binary/16.js +15 -0
  1120. package/es/icons/transform--binary/20.d.ts +17 -0
  1121. package/es/icons/transform--binary/20.js +15 -0
  1122. package/es/icons/transform--binary/24.d.ts +17 -0
  1123. package/es/icons/transform--binary/24.js +15 -0
  1124. package/es/icons/transform--binary/32.d.ts +17 -0
  1125. package/es/icons/transform--binary/32.js +15 -0
  1126. package/es/icons/transform--instructions/16.d.ts +17 -0
  1127. package/es/icons/transform--instructions/16.js +15 -0
  1128. package/es/icons/transform--instructions/20.d.ts +17 -0
  1129. package/es/icons/transform--instructions/20.js +15 -0
  1130. package/es/icons/transform--instructions/24.d.ts +17 -0
  1131. package/es/icons/transform--instructions/24.js +15 -0
  1132. package/es/icons/transform--instructions/32.d.ts +17 -0
  1133. package/es/icons/transform--instructions/32.js +15 -0
  1134. package/es/icons/transform--language/16.d.ts +17 -0
  1135. package/es/icons/transform--language/16.js +15 -0
  1136. package/es/icons/transform--language/20.d.ts +17 -0
  1137. package/es/icons/transform--language/20.js +15 -0
  1138. package/es/icons/transform--language/24.d.ts +17 -0
  1139. package/es/icons/transform--language/24.js +15 -0
  1140. package/es/icons/transform--language/32.d.ts +17 -0
  1141. package/es/icons/transform--language/32.js +15 -0
  1142. package/es/icons/tsq/16.d.ts +17 -0
  1143. package/es/icons/tsq/16.js +15 -0
  1144. package/es/icons/tsq/20.d.ts +17 -0
  1145. package/es/icons/tsq/20.js +15 -0
  1146. package/es/icons/tsq/24.d.ts +17 -0
  1147. package/es/icons/tsq/24.js +15 -0
  1148. package/es/icons/tsq/32.d.ts +17 -0
  1149. package/es/icons/tsq/32.js +15 -0
  1150. package/es/icons/unsaved/16.d.ts +17 -0
  1151. package/es/icons/unsaved/16.js +15 -0
  1152. package/es/icons/unsaved/20.d.ts +17 -0
  1153. package/es/icons/unsaved/20.js +15 -0
  1154. package/es/icons/unsaved/24.d.ts +17 -0
  1155. package/es/icons/unsaved/24.js +15 -0
  1156. package/es/icons/unsaved/32.d.ts +17 -0
  1157. package/es/icons/unsaved/32.js +15 -0
  1158. package/es/icons/user--sponsor/16.d.ts +17 -0
  1159. package/es/icons/user--sponsor/16.js +15 -0
  1160. package/es/icons/user--sponsor/20.d.ts +17 -0
  1161. package/es/icons/user--sponsor/20.js +15 -0
  1162. package/es/icons/user--sponsor/24.d.ts +17 -0
  1163. package/es/icons/user--sponsor/24.js +15 -0
  1164. package/es/icons/user--sponsor/32.d.ts +17 -0
  1165. package/es/icons/user--sponsor/32.js +15 -0
  1166. package/es/icons/watson-health/image-availability--local/16.d.ts +17 -0
  1167. package/es/icons/watson-health/image-availability--local/16.js +15 -0
  1168. package/es/icons/watson-health/image-availability--local/20.d.ts +17 -0
  1169. package/es/icons/watson-health/image-availability--local/20.js +15 -0
  1170. package/es/icons/watson-health/image-availability--local/24.d.ts +17 -0
  1171. package/es/icons/watson-health/image-availability--local/24.js +15 -0
  1172. package/es/icons/watson-health/image-availability--local/32.d.ts +17 -0
  1173. package/es/icons/watson-health/image-availability--local/32.js +15 -0
  1174. package/es/icons/watson-health/image-availability--retrieving/16.d.ts +17 -0
  1175. package/es/icons/watson-health/image-availability--retrieving/16.js +15 -0
  1176. package/es/icons/watson-health/image-availability--retrieving/20.d.ts +17 -0
  1177. package/es/icons/watson-health/image-availability--retrieving/20.js +15 -0
  1178. package/es/icons/watson-health/image-availability--retrieving/24.d.ts +17 -0
  1179. package/es/icons/watson-health/image-availability--retrieving/24.js +15 -0
  1180. package/es/icons/watson-health/image-availability--retrieving/32.d.ts +17 -0
  1181. package/es/icons/watson-health/image-availability--retrieving/32.js +15 -0
  1182. package/es/icons/watson-health/image-availability--unavailable/16.d.ts +17 -0
  1183. package/es/icons/watson-health/image-availability--unavailable/16.js +15 -0
  1184. package/es/icons/watson-health/image-availability--unavailable/20.d.ts +17 -0
  1185. package/es/icons/watson-health/image-availability--unavailable/20.js +15 -0
  1186. package/es/icons/watson-health/image-availability--unavailable/24.d.ts +17 -0
  1187. package/es/icons/watson-health/image-availability--unavailable/24.js +15 -0
  1188. package/es/icons/watson-health/image-availability--unavailable/32.d.ts +17 -0
  1189. package/es/icons/watson-health/image-availability--unavailable/32.js +15 -0
  1190. package/es/icons/white-paper/16.d.ts +17 -0
  1191. package/es/icons/white-paper/16.js +15 -0
  1192. package/es/icons/white-paper/20.d.ts +17 -0
  1193. package/es/icons/white-paper/20.js +15 -0
  1194. package/es/icons/white-paper/24.d.ts +17 -0
  1195. package/es/icons/white-paper/24.js +15 -0
  1196. package/es/icons/white-paper/32.d.ts +17 -0
  1197. package/es/icons/white-paper/32.js +15 -0
  1198. package/es/icons/workflow-automation/16.d.ts +17 -0
  1199. package/es/icons/workflow-automation/16.js +15 -0
  1200. package/es/icons/workflow-automation/20.d.ts +17 -0
  1201. package/es/icons/workflow-automation/20.js +15 -0
  1202. package/es/icons/workflow-automation/24.d.ts +17 -0
  1203. package/es/icons/workflow-automation/24.js +15 -0
  1204. package/es/icons/workflow-automation/32.d.ts +17 -0
  1205. package/es/icons/workflow-automation/32.js +15 -0
  1206. package/es/icons/z--lpar/16.d.ts +17 -0
  1207. package/es/icons/z--lpar/16.js +15 -0
  1208. package/es/icons/z--lpar/20.d.ts +17 -0
  1209. package/es/icons/z--lpar/20.js +15 -0
  1210. package/es/icons/z--lpar/24.d.ts +17 -0
  1211. package/es/icons/z--lpar/24.js +15 -0
  1212. package/es/icons/z--lpar/32.d.ts +17 -0
  1213. package/es/icons/z--lpar/32.js +15 -0
  1214. package/es/icons/z--systems/16.d.ts +17 -0
  1215. package/es/icons/z--systems/16.js +15 -0
  1216. package/es/icons/z--systems/20.d.ts +17 -0
  1217. package/es/icons/z--systems/20.js +15 -0
  1218. package/es/icons/z--systems/24.d.ts +17 -0
  1219. package/es/icons/z--systems/24.js +15 -0
  1220. package/es/icons/z--systems/32.d.ts +17 -0
  1221. package/es/icons/z--systems/32.js +15 -0
  1222. package/es/icons/zos/16.d.ts +17 -0
  1223. package/es/icons/zos/16.js +15 -0
  1224. package/es/icons/zos/20.d.ts +17 -0
  1225. package/es/icons/zos/20.js +15 -0
  1226. package/es/icons/zos/24.d.ts +17 -0
  1227. package/es/icons/zos/24.js +15 -0
  1228. package/es/icons/zos/32.d.ts +17 -0
  1229. package/es/icons/zos/32.js +15 -0
  1230. package/es/icons/zos--sysplex/16.d.ts +17 -0
  1231. package/es/icons/zos--sysplex/16.js +15 -0
  1232. package/es/icons/zos--sysplex/20.d.ts +17 -0
  1233. package/es/icons/zos--sysplex/20.js +15 -0
  1234. package/es/icons/zos--sysplex/24.d.ts +17 -0
  1235. package/es/icons/zos--sysplex/24.js +15 -0
  1236. package/es/icons/zos--sysplex/32.d.ts +17 -0
  1237. package/es/icons/zos--sysplex/32.js +15 -0
  1238. package/es/index.d.ts +6 -0
  1239. package/es/index.d.ts.map +1 -1
  1240. package/es/index.js +6 -0
  1241. package/es/index.js.map +1 -1
  1242. package/lib/components/button/defs.js +1 -0
  1243. package/lib/components/button/defs.js.map +1 -1
  1244. package/lib/components/file-uploader/defs.js +3 -4
  1245. package/lib/components/file-uploader/defs.js.map +1 -1
  1246. package/lib/components/progress-bar/defs.js +44 -0
  1247. package/lib/components/progress-bar/defs.js.map +1 -0
  1248. package/lib/components-react-node/file-uploader/demo-file-uploader.js +30 -6
  1249. package/lib/components-react-node/file-uploader/file-uploader-button.js +49 -0
  1250. package/lib/components-react-node/file-uploader/file-uploader-drop-container.js +49 -0
  1251. package/lib/components-react-node/file-uploader/file-uploader-skeleton.js +36 -0
  1252. package/lib/components-react-node/progress-bar/defs.js +24 -0
  1253. package/lib/components-react-node/progress-bar/progress-bar.js +55 -0
  1254. package/lib/globals/wrappers/createReactCustomElementType.js +1 -1
  1255. package/lib/globals/wrappers/createReactCustomElementType.js.map +1 -1
  1256. package/package.json +1 -1
  1257. package/scss/components/file-uploader/file-uploader.scss +22 -23
  1258. package/scss/components/progress-bar/progress-bar.scss +10 -0
  1259. package/es/components/file-uploader/drop-container.d.ts +0 -385
  1260. package/es/components/file-uploader/drop-container.d.ts.map +0 -1
  1261. package/es/components/file-uploader/drop-container.js +0 -264
  1262. package/es/components/file-uploader/drop-container.js.map +0 -1
  1263. package/es/components/input/defs.d.ts +0 -44
  1264. package/es/components/input/defs.d.ts.map +0 -1
  1265. package/es/components/input/defs.js +0 -36
  1266. package/es/components/input/defs.js.map +0 -1
  1267. package/es/components/input/index.d.ts +0 -11
  1268. package/es/components/input/index.d.ts.map +0 -1
  1269. package/es/components/input/index.js +0 -11
  1270. package/es/components/input/index.js.map +0 -1
  1271. package/es/components/input/input.css.js +0 -12
  1272. package/es/components/input/input.d.ts +0 -786
  1273. package/es/components/input/input.d.ts.map +0 -1
  1274. package/es/components/input/input.js +0 -574
  1275. package/es/components/input/input.js.map +0 -1
  1276. package/es/components/input/input.rtl.css.js +0 -12
  1277. package/es/components/search/defs.d.ts +0 -11
  1278. package/es/components/search/defs.d.ts.map +0 -1
  1279. package/es/components/search/defs.js +0 -11
  1280. package/es/components/search/defs.js.map +0 -1
  1281. package/es/components-react/file-uploader/drop-container.d.ts +0 -19
  1282. package/es/components-react/file-uploader/drop-container.js +0 -28
  1283. package/es/components-react/input/defs.js +0 -9
  1284. package/es/components-react/input/input.d.ts +0 -15
  1285. package/es/components-react/input/input.js +0 -22
  1286. package/es/components-react/search/defs.d.ts +0 -14
  1287. package/es/components-react/search/defs.js +0 -9
  1288. package/es/icons/app-switcher/16.js +0 -15
  1289. package/es/icons/app-switcher/20.js +0 -15
  1290. package/es/icons/app-switcher/24.js +0 -15
  1291. package/es/icons/app-switcher/32.js +0 -15
  1292. package/es/icons/arrows/16.js +0 -15
  1293. package/es/icons/arrows/20.js +0 -15
  1294. package/es/icons/arrows/24.js +0 -15
  1295. package/es/icons/arrows/32.js +0 -15
  1296. package/es/icons/back-to-top/16.js +0 -15
  1297. package/es/icons/back-to-top/20.js +0 -15
  1298. package/es/icons/back-to-top/24.js +0 -15
  1299. package/es/icons/back-to-top/32.js +0 -15
  1300. package/es/icons/checkbox--undeterminate/16.js +0 -15
  1301. package/es/icons/checkbox--undeterminate/20.js +0 -15
  1302. package/es/icons/checkbox--undeterminate/24.js +0 -15
  1303. package/es/icons/checkbox--undeterminate/32.js +0 -15
  1304. package/es/icons/checkbox--undeterminate--filled/16.js +0 -15
  1305. package/es/icons/checkbox--undeterminate--filled/20.js +0 -15
  1306. package/es/icons/checkbox--undeterminate--filled/24.js +0 -15
  1307. package/es/icons/checkbox--undeterminate--filled/32.js +0 -15
  1308. package/es/icons/cloud--lightning/16.js +0 -15
  1309. package/es/icons/cloud--lightning/20.js +0 -15
  1310. package/es/icons/cloud--lightning/24.js +0 -15
  1311. package/es/icons/cloud--lightning/32.js +0 -15
  1312. package/es/icons/cloud--rain/16.js +0 -15
  1313. package/es/icons/cloud--rain/20.js +0 -15
  1314. package/es/icons/cloud--rain/24.js +0 -15
  1315. package/es/icons/cloud--rain/32.js +0 -15
  1316. package/es/icons/cloud--snow/16.js +0 -15
  1317. package/es/icons/cloud--snow/20.js +0 -15
  1318. package/es/icons/cloud--snow/24.js +0 -15
  1319. package/es/icons/cloud--snow/32.js +0 -15
  1320. package/es/icons/delete/16.js +0 -15
  1321. package/es/icons/delete/20.js +0 -15
  1322. package/es/icons/delete/24.js +0 -15
  1323. package/es/icons/delete/32.js +0 -15
  1324. package/es/icons/glyph--caution/index.js +0 -15
  1325. package/es/icons/glyph--caution-inverted/index.js +0 -15
  1326. package/es/icons/glyph--circle-fill/index.js +0 -15
  1327. package/es/icons/glyph--circle-stroke/index.js +0 -15
  1328. package/es/icons/glyph--critical/index.js +0 -15
  1329. package/es/icons/glyph--incomplete/index.js +0 -15
  1330. package/es/icons/glyph--square-fill/index.js +0 -15
  1331. package/es/icons/letter--Aa--large/16.js +0 -15
  1332. package/es/icons/letter--Aa--large/20.js +0 -15
  1333. package/es/icons/letter--Aa--large/24.js +0 -15
  1334. package/es/icons/letter--Aa--large/32.js +0 -15
  1335. package/es/icons/logo--delicious/16.js +0 -15
  1336. package/es/icons/logo--delicious/20.js +0 -15
  1337. package/es/icons/logo--delicious/24.js +0 -15
  1338. package/es/icons/logo--delicious/32.js +0 -15
  1339. package/es/icons/logo--google/16.js +0 -15
  1340. package/es/icons/logo--google/20.js +0 -15
  1341. package/es/icons/logo--google/24.js +0 -15
  1342. package/es/icons/logo--google/32.js +0 -15
  1343. package/es/icons/logo--stumbleupon/16.js +0 -15
  1344. package/es/icons/logo--stumbleupon/20.js +0 -15
  1345. package/es/icons/logo--stumbleupon/24.js +0 -15
  1346. package/es/icons/logo--stumbleupon/32.js +0 -15
  1347. package/es/icons/mammogram--stacked/16.js +0 -15
  1348. package/es/icons/mammogram--stacked/20.js +0 -15
  1349. package/es/icons/mammogram--stacked/24.js +0 -15
  1350. package/es/icons/mammogram--stacked/32.js +0 -15
  1351. package/es/icons/misuse--alt/16.js +0 -15
  1352. package/es/icons/misuse--alt/20.js +0 -15
  1353. package/es/icons/misuse--alt/24.js +0 -15
  1354. package/es/icons/misuse--alt/32.js +0 -15
  1355. package/es/icons/research--bloch-sphere/16.js +0 -15
  1356. package/es/icons/research--bloch-sphere/20.js +0 -15
  1357. package/es/icons/research--bloch-sphere/24.js +0 -15
  1358. package/es/icons/research--bloch-sphere/32.js +0 -15
  1359. package/es/icons/research--hinton-plot/16.js +0 -15
  1360. package/es/icons/research--hinton-plot/20.js +0 -15
  1361. package/es/icons/research--hinton-plot/24.js +0 -15
  1362. package/es/icons/research--hinton-plot/32.js +0 -15
  1363. package/es/icons/research--matrix/16.js +0 -15
  1364. package/es/icons/research--matrix/20.js +0 -15
  1365. package/es/icons/research--matrix/24.js +0 -15
  1366. package/es/icons/research--matrix/32.js +0 -15
  1367. package/es/icons/sunny/16.js +0 -15
  1368. package/es/icons/sunny/20.js +0 -15
  1369. package/es/icons/sunny/24.js +0 -15
  1370. package/es/icons/sunny/32.js +0 -15
  1371. package/es/icons/undefined/index.js +0 -15
  1372. package/es/icons/watson-health/edit-filter/16.js +0 -15
  1373. package/es/icons/watson-health/edit-filter/20.js +0 -15
  1374. package/es/icons/watson-health/edit-filter/24.js +0 -15
  1375. package/es/icons/watson-health/edit-filter/32.js +0 -15
  1376. package/lib/components/input/defs.js +0 -47
  1377. package/lib/components/input/defs.js.map +0 -1
  1378. package/lib/components/search/defs.js +0 -21
  1379. package/lib/components/search/defs.js.map +0 -1
  1380. package/lib/components-react-node/file-uploader/drop-container.js +0 -49
  1381. package/lib/components-react-node/input/defs.js +0 -24
  1382. package/lib/components-react-node/input/input.js +0 -55
  1383. package/lib/components-react-node/search/defs.js +0 -24
  1384. package/scss/components/input/input.scss +0 -37
  1385. /package/es/components-react/{input → progress-bar}/defs.d.ts +0 -0
  1386. /package/es/components-react/{input → progress-bar}/index.d.ts +0 -0
  1387. /package/es/components-react/{input → progress-bar}/index.js +0 -0
  1388. /package/es/icons/{app-switcher → SLM}/16.d.ts +0 -0
  1389. /package/es/icons/{app-switcher → SLM}/20.d.ts +0 -0
  1390. /package/es/icons/{app-switcher → SLM}/24.d.ts +0 -0
  1391. /package/es/icons/{app-switcher → SLM}/32.d.ts +0 -0
  1392. /package/es/icons/{arrows → apple--dash}/16.d.ts +0 -0
  1393. /package/es/icons/{arrows → apple--dash}/20.d.ts +0 -0
  1394. /package/es/icons/{arrows → apple--dash}/24.d.ts +0 -0
  1395. /package/es/icons/{arrows → apple--dash}/32.d.ts +0 -0
  1396. /package/es/icons/{checkbox--undeterminate--filled → batch-job}/16.d.ts +0 -0
  1397. /package/es/icons/{checkbox--undeterminate--filled → batch-job}/20.d.ts +0 -0
  1398. /package/es/icons/{checkbox--undeterminate--filled → batch-job}/24.d.ts +0 -0
  1399. /package/es/icons/{checkbox--undeterminate--filled → batch-job}/32.d.ts +0 -0
  1400. /package/es/icons/{back-to-top → batch-job--step}/16.d.ts +0 -0
  1401. /package/es/icons/{back-to-top → batch-job--step}/20.d.ts +0 -0
  1402. /package/es/icons/{back-to-top → batch-job--step}/24.d.ts +0 -0
  1403. /package/es/icons/{back-to-top → batch-job--step}/32.d.ts +0 -0
  1404. /package/es/icons/{cloud--lightning → boot-volume}/16.d.ts +0 -0
  1405. /package/es/icons/{cloud--lightning → boot-volume}/20.d.ts +0 -0
  1406. /package/es/icons/{cloud--lightning → boot-volume}/24.d.ts +0 -0
  1407. /package/es/icons/{cloud--lightning → boot-volume}/32.d.ts +0 -0
  1408. /package/es/icons/{checkbox--undeterminate → boot-volume--alt}/16.d.ts +0 -0
  1409. /package/es/icons/{checkbox--undeterminate → boot-volume--alt}/20.d.ts +0 -0
  1410. /package/es/icons/{checkbox--undeterminate → boot-volume--alt}/24.d.ts +0 -0
  1411. /package/es/icons/{checkbox--undeterminate → boot-volume--alt}/32.d.ts +0 -0
  1412. /package/es/icons/{cloud--snow → bottles--01}/16.d.ts +0 -0
  1413. /package/es/icons/{cloud--snow → bottles--01}/20.d.ts +0 -0
  1414. /package/es/icons/{cloud--snow → bottles--01}/24.d.ts +0 -0
  1415. /package/es/icons/{cloud--snow → bottles--01}/32.d.ts +0 -0
  1416. /package/es/icons/{cloud--rain → bottles--01--dash}/16.d.ts +0 -0
  1417. /package/es/icons/{cloud--rain → bottles--01--dash}/20.d.ts +0 -0
  1418. /package/es/icons/{cloud--rain → bottles--01--dash}/24.d.ts +0 -0
  1419. /package/es/icons/{cloud--rain → bottles--01--dash}/32.d.ts +0 -0
  1420. /package/es/icons/{letter--Aa--large → bottles--02}/16.d.ts +0 -0
  1421. /package/es/icons/{letter--Aa--large → bottles--02}/20.d.ts +0 -0
  1422. /package/es/icons/{letter--Aa--large → bottles--02}/24.d.ts +0 -0
  1423. /package/es/icons/{letter--Aa--large → bottles--02}/32.d.ts +0 -0
  1424. /package/es/icons/{delete → bottles--02--dash}/16.d.ts +0 -0
  1425. /package/es/icons/{delete → bottles--02--dash}/20.d.ts +0 -0
  1426. /package/es/icons/{delete → bottles--02--dash}/24.d.ts +0 -0
  1427. /package/es/icons/{delete → bottles--02--dash}/32.d.ts +0 -0
  1428. /package/es/icons/{logo--delicious → bottles--container}/16.d.ts +0 -0
  1429. /package/es/icons/{logo--delicious → bottles--container}/20.d.ts +0 -0
  1430. /package/es/icons/{logo--delicious → bottles--container}/24.d.ts +0 -0
  1431. /package/es/icons/{logo--delicious → bottles--container}/32.d.ts +0 -0
  1432. /package/es/icons/{logo--google → build-tool}/16.d.ts +0 -0
  1433. /package/es/icons/{logo--google → build-tool}/20.d.ts +0 -0
  1434. /package/es/icons/{logo--google → build-tool}/24.d.ts +0 -0
  1435. /package/es/icons/{logo--google → build-tool}/32.d.ts +0 -0
  1436. /package/es/icons/{mammogram--stacked → calendar--add}/16.d.ts +0 -0
  1437. /package/es/icons/{mammogram--stacked → calendar--add}/20.d.ts +0 -0
  1438. /package/es/icons/{mammogram--stacked → calendar--add}/24.d.ts +0 -0
  1439. /package/es/icons/{mammogram--stacked → calendar--add}/32.d.ts +0 -0
  1440. /package/es/icons/{logo--stumbleupon → calendar--add--alt}/16.d.ts +0 -0
  1441. /package/es/icons/{logo--stumbleupon → calendar--add--alt}/20.d.ts +0 -0
  1442. /package/es/icons/{logo--stumbleupon → calendar--add--alt}/24.d.ts +0 -0
  1443. /package/es/icons/{logo--stumbleupon → calendar--add--alt}/32.d.ts +0 -0
  1444. /package/es/icons/{misuse--alt → carbon--ui-builder}/16.d.ts +0 -0
  1445. /package/es/icons/{misuse--alt → carbon--ui-builder}/20.d.ts +0 -0
  1446. /package/es/icons/{misuse--alt → carbon--ui-builder}/24.d.ts +0 -0
  1447. /package/es/icons/{misuse--alt → carbon--ui-builder}/32.d.ts +0 -0
  1448. /package/es/icons/{research--bloch-sphere → catalog--publish}/16.d.ts +0 -0
  1449. /package/es/icons/{research--bloch-sphere → catalog--publish}/20.d.ts +0 -0
  1450. /package/es/icons/{research--bloch-sphere → catalog--publish}/24.d.ts +0 -0
  1451. /package/es/icons/{research--bloch-sphere → catalog--publish}/32.d.ts +0 -0
  1452. /package/es/icons/{research--hinton-plot → cics--db2-connection}/16.d.ts +0 -0
  1453. /package/es/icons/{research--hinton-plot → cics--db2-connection}/20.d.ts +0 -0
  1454. /package/es/icons/{research--hinton-plot → cics--db2-connection}/24.d.ts +0 -0
  1455. /package/es/icons/{research--hinton-plot → cics--db2-connection}/32.d.ts +0 -0
  1456. /package/es/icons/{research--matrix → cics--program}/16.d.ts +0 -0
  1457. /package/es/icons/{research--matrix → cics--program}/20.d.ts +0 -0
  1458. /package/es/icons/{research--matrix → cics--program}/24.d.ts +0 -0
  1459. /package/es/icons/{research--matrix → cics--program}/32.d.ts +0 -0
  1460. /package/es/icons/{watson-health/edit-filter → cics--sit}/16.d.ts +0 -0
  1461. /package/es/icons/{watson-health/edit-filter → cics--sit}/20.d.ts +0 -0
  1462. /package/es/icons/{watson-health/edit-filter → cics--sit}/24.d.ts +0 -0
  1463. /package/es/icons/{watson-health/edit-filter → cics--sit}/32.d.ts +0 -0
  1464. /package/es/icons/{sunny → cics--sit-overrides}/16.d.ts +0 -0
  1465. /package/es/icons/{sunny → cics--sit-overrides}/20.d.ts +0 -0
  1466. /package/es/icons/{sunny → cics--sit-overrides}/24.d.ts +0 -0
  1467. /package/es/icons/{sunny → cics--sit-overrides}/32.d.ts +0 -0
  1468. /package/es/icons/{glyph--caution-inverted/index.d.ts → cics--transaction-server-zos/16.d.ts} +0 -0
  1469. /package/es/icons/{glyph--caution/index.d.ts → cics--transaction-server-zos/20.d.ts} +0 -0
  1470. /package/es/icons/{glyph--circle-fill/index.d.ts → cics--transaction-server-zos/24.d.ts} +0 -0
  1471. /package/es/icons/{glyph--circle-stroke/index.d.ts → cics--transaction-server-zos/32.d.ts} +0 -0
  1472. /package/es/icons/{glyph--critical/index.d.ts → cics-region--alt/16.d.ts} +0 -0
  1473. /package/es/icons/{glyph--incomplete/index.d.ts → cics-region--alt/20.d.ts} +0 -0
  1474. /package/es/icons/{glyph--square-fill/index.d.ts → cics-region--alt/24.d.ts} +0 -0
  1475. /package/es/icons/{glyph--undefined/index.d.ts → cics-region--alt/32.d.ts} +0 -0
  1476. /package/es/icons/{undefined/index.d.ts → connect--reference/16.d.ts} +0 -0
  1477. /package/es/icons/{glyph--undefined → diamond-fill}/index.js +0 -0
  1478. /package/lib/components-react-node/{input → progress-bar}/index.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"focus-plugin.js","names":["on","config","fp","focusCalendar","calendarContainer","selectedDateElem","todayDateElem","focus","handleBlur","target","relatedTarget","isOpen","contains","Promise","resolve","then","rootNode","getRootNode","nodeType","Node","DOCUMENT_NODE","DOCUMENT_FRAGMENT_NODE","_lastFocusInput","inputTo","inputFrom","close","handleInputKeydown","event","key","preventDefault","open","setTimeout","handleInputFocus","release","_hCDSCEDatePickerFocusPluginBlur","_hCDSCEDatePickerFocusPluginFocusTo","_hCDSCEDatePickerFocusPluginFocusFrom","_hCDSCEDatePickerFocusPluginKeydownTo","_hCDSCEDatePickerFocusPluginKeydownFrom","init","register","loadedPlugins","push","onReady","onDestroy"],"sources":["components/date-picker/focus-plugin.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 { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport on from 'carbon-components/es/globals/js/misc/on';\nimport Handle from '../../globals/internal/handle';\nimport CDSDatePickerInput from './date-picker-input';\n\n/**\n * The configuration for the Flatpickr plugin to set CSS classes specific to this design system.\n */\nexport interface DatePickerFocusPluginConfig {\n /**\n * The input box to enter starting date.\n */\n inputFrom: CDSDatePickerInput;\n\n /**\n * The input box to enter end date.\n */\n inputTo?: CDSDatePickerInput;\n}\n\n/**\n * `FlatpickrInstance` with additional properties used for `carbonFlatpickrFocusPlugin`.\n */\nexport interface ExtendedFlatpickrInstanceFocusPlugin\n extends FlatpickrInstance {\n /**\n * The handle for `blur` event handler in calendar dropdown.\n */\n _hCDSCEDatePickerFocusPluginBlur?: Handle | null;\n\n /**\n * The handle for `keydown` event handler in the `<input>` for the starting date.\n */\n _hCDSCEDatePickerFocusPluginKeydownFrom?: Handle | null;\n\n /**\n * The handle for `keydown` event handler in the `<input>` for the end date.\n */\n _hCDSCEDatePickerFocusPluginKeydownTo?: Handle | null;\n\n /**\n * The handle for `focus` event handler in the `<input>` for the starting date.\n */\n _hCDSCEDatePickerFocusPluginFocusFrom?: Handle | null;\n\n /**\n * The handle for `focus` event handler in the `<input>` for the end date.\n */\n _hCDSCEDatePickerFocusPluginFocusTo?: Handle | null;\n\n /**\n * Lastly focused `<input>` for starting/end date.\n */\n _lastFocusInput?: HTMLInputElement;\n}\n\n/**\n * @param config Plugin configuration.\n * @returns A Flatpickr plugin to manage focus to align with the UX pattern in our design system.\n */\nexport default (config: DatePickerFocusPluginConfig): Plugin =>\n (fp: ExtendedFlatpickrInstanceFocusPlugin) => {\n /**\n * Focuses on calendar dropdown.\n */\n const focusCalendar = () => {\n const { calendarContainer, selectedDateElem, todayDateElem } = fp;\n (selectedDateElem || todayDateElem || calendarContainer).focus();\n };\n\n /**\n * Handles `blur` event to move the focus back to the `<input>`.\n */\n const handleBlur = ({ target, relatedTarget }: FocusEvent) => {\n // Obtains `beingUpdated` up-front because it'll be flushed out shortly\n const { calendarContainer, isOpen } = fp;\n if (\n isOpen &&\n calendarContainer.contains(target as Node) &&\n !calendarContainer.contains(relatedTarget as Node)\n ) {\n Promise.resolve().then(() => {\n const rootNode = (target as Node).getRootNode();\n // This `blur` event handler can be called from Flatpickr's code cleaning up calenar dropdown's DOM,\n // and changing focus in such condition causes removing an orphaned DOM node,\n // because Flatpickr redraws the calendar dropdown when the `<input>` gets focus.\n if (\n rootNode.nodeType === Node.DOCUMENT_NODE ||\n rootNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE\n ) {\n if (fp._lastFocusInput === config.inputTo) {\n config.inputTo!.focus();\n } else {\n config.inputFrom.focus();\n }\n // Closing after moving focus. Reversing the order will cause re-opening calendar dropdown upon focusing\n fp.close();\n }\n });\n }\n };\n\n /**\n * Handles `keydown` event to move focus on calendar dropdown.\n */\n const handleInputKeydown = (event: KeyboardEvent) => {\n const { key } = event;\n if (key === 'ArrowDown' || key === 'Down' || key === 'Enter') {\n event.preventDefault();\n fp.open();\n if (key !== 'Enter') {\n focusCalendar();\n } else {\n // Hitting Enter key blurs the `<input>`, causing any element to lose focus\n setTimeout(focusCalendar, 0);\n }\n }\n };\n\n /**\n * Handles `focus` event on `<input>` for starting/end date to track the lastly focused one.\n */\n const handleInputFocus = ({ target }: FocusEvent) => {\n fp._lastFocusInput = target as HTMLInputElement;\n };\n\n /**\n * Releases event listeners used in this Flatpickr plugin.\n */\n const release = () => {\n if (fp._hCDSCEDatePickerFocusPluginBlur) {\n fp._hCDSCEDatePickerFocusPluginBlur =\n fp._hCDSCEDatePickerFocusPluginBlur.release();\n }\n if (fp._hCDSCEDatePickerFocusPluginFocusTo) {\n fp._hCDSCEDatePickerFocusPluginFocusTo =\n fp._hCDSCEDatePickerFocusPluginFocusTo.release();\n }\n if (fp._hCDSCEDatePickerFocusPluginFocusFrom) {\n fp._hCDSCEDatePickerFocusPluginFocusFrom =\n fp._hCDSCEDatePickerFocusPluginFocusFrom.release();\n }\n if (fp._hCDSCEDatePickerFocusPluginKeydownTo) {\n fp._hCDSCEDatePickerFocusPluginKeydownTo =\n fp._hCDSCEDatePickerFocusPluginKeydownTo.release();\n }\n if (fp._hCDSCEDatePickerFocusPluginKeydownFrom) {\n fp._hCDSCEDatePickerFocusPluginKeydownFrom =\n fp._hCDSCEDatePickerFocusPluginKeydownFrom.release();\n }\n };\n\n /**\n * Sets up event listeners used for this Flatpickr plugin.\n */\n const init = () => {\n release();\n const { inputFrom, inputTo } = config;\n fp._hCDSCEDatePickerFocusPluginBlur = on(\n fp.calendarContainer,\n 'blur',\n handleBlur,\n true\n );\n fp._hCDSCEDatePickerFocusPluginKeydownFrom = on(\n inputFrom,\n 'keydown',\n handleInputKeydown\n );\n if (inputTo) {\n fp._hCDSCEDatePickerFocusPluginKeydownTo = on(\n inputTo,\n 'keydown',\n handleInputKeydown\n );\n }\n fp._hCDSCEDatePickerFocusPluginFocusFrom = on(\n inputFrom,\n 'focus',\n handleInputFocus\n );\n if (inputTo) {\n fp._hCDSCEDatePickerFocusPluginFocusTo = on(\n inputTo,\n 'focus',\n handleInputFocus\n );\n }\n };\n\n /**\n * Registers this Flatpickr plugin.\n *\n * @param calendar The Flatpickr instance.\n */\n const register = () => {\n fp.loadedPlugins.push('carbonFlatpickrFocusPlugin');\n };\n\n return {\n onReady: [register, init],\n onDestroy: release,\n };\n };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAOA,EAAE,MAAM,yCAAyC;AAuDxD;AACA;AACA;AACA;AACA,gBAAgBC,MAAmC,IAChDC,EAAwC,IAAK;EAC5C;AACJ;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AE,CAACoC,uCAAuC,GAAGtC,EAAE,CAC7CwB,SAAS,EACT,SAAS,EACTE,kBAAkB,CACnB;IACD,IAAIH,OAAO,EAAE;MACXrB,EAAE,CAACmC,qCAAqC,GAAGrC,EAAE,CAC3CuB,OAAO,EACP,SAAS,EACTG,kBAAkB,CACnB;IACH;IACAxB,EAAE,CAACkC,qCAAqC,GAAGpC,EAAE,CAC3CwB,SAAS,EACT,OAAO,EACPQ,gBAAgB,CACjB;IACD,IAAIT,OAAO,EAAE;MACXrB,EAAE,CAACiC,mCAAmC,GAAGnC,EAAE,CACzCuB,OAAO,EACP,OAAO,EACPS,gBAAgB,CACjB;IACH;EACF,CAAC;;EAED;AACJ;AACA;AACA;AACA;EACI,MAAMQ,QAAQ,GAAGA,CAAA,KAAM;IACrBtC,EAAE,CAACuC,aAAa,CAACC,IAAI,CAAC,4BAA4B,CAAC;EACrD,CAAC;EAED,OAAO;IACLC,OAAO,EAAE,CAACH,QAAQ,EAAED,IAAI,CAAC;IACzBK,SAAS,EAAEX;EACb,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"focus-plugin.js","names":["on","config","fp","focusCalendar","calendarContainer","selectedDateElem","todayDateElem","focus","handleBlur","target","relatedTarget","isOpen","contains","Promise","resolve","then","rootNode","getRootNode","nodeType","Node","DOCUMENT_NODE","DOCUMENT_FRAGMENT_NODE","_lastFocusInput","inputTo","inputFrom","close","handleInputKeydown","event","key","preventDefault","open","setTimeout","handleInputFocus","release","_hCDSCEDatePickerFocusPluginBlur","_hCDSCEDatePickerFocusPluginFocusTo","_hCDSCEDatePickerFocusPluginFocusFrom","_hCDSCEDatePickerFocusPluginKeydownTo","_hCDSCEDatePickerFocusPluginKeydownFrom","init","register","loadedPlugins","push","onReady","onDestroy"],"sources":["components/date-picker/focus-plugin.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 { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport on from '../../globals/mixins/on';\nimport Handle from '../../globals/internal/handle';\nimport CDSDatePickerInput from './date-picker-input';\n\n/**\n * The configuration for the Flatpickr plugin to set CSS classes specific to this design system.\n */\nexport interface DatePickerFocusPluginConfig {\n /**\n * The input box to enter starting date.\n */\n inputFrom: CDSDatePickerInput;\n\n /**\n * The input box to enter end date.\n */\n inputTo?: CDSDatePickerInput;\n}\n\n/**\n * `FlatpickrInstance` with additional properties used for `carbonFlatpickrFocusPlugin`.\n */\nexport interface ExtendedFlatpickrInstanceFocusPlugin\n extends FlatpickrInstance {\n /**\n * The handle for `blur` event handler in calendar dropdown.\n */\n _hCDSCEDatePickerFocusPluginBlur?: Handle | null;\n\n /**\n * The handle for `keydown` event handler in the `<input>` for the starting date.\n */\n _hCDSCEDatePickerFocusPluginKeydownFrom?: Handle | null;\n\n /**\n * The handle for `keydown` event handler in the `<input>` for the end date.\n */\n _hCDSCEDatePickerFocusPluginKeydownTo?: Handle | null;\n\n /**\n * The handle for `focus` event handler in the `<input>` for the starting date.\n */\n _hCDSCEDatePickerFocusPluginFocusFrom?: Handle | null;\n\n /**\n * The handle for `focus` event handler in the `<input>` for the end date.\n */\n _hCDSCEDatePickerFocusPluginFocusTo?: Handle | null;\n\n /**\n * Lastly focused `<input>` for starting/end date.\n */\n _lastFocusInput?: HTMLInputElement;\n}\n\n/**\n * @param config Plugin configuration.\n * @returns A Flatpickr plugin to manage focus to align with the UX pattern in our design system.\n */\nexport default (config: DatePickerFocusPluginConfig): Plugin =>\n (fp: ExtendedFlatpickrInstanceFocusPlugin) => {\n /**\n * Focuses on calendar dropdown.\n */\n const focusCalendar = () => {\n const { calendarContainer, selectedDateElem, todayDateElem } = fp;\n (selectedDateElem || todayDateElem || calendarContainer).focus();\n };\n\n /**\n * Handles `blur` event to move the focus back to the `<input>`.\n */\n const handleBlur = ({ target, relatedTarget }: FocusEvent) => {\n // Obtains `beingUpdated` up-front because it'll be flushed out shortly\n const { calendarContainer, isOpen } = fp;\n if (\n isOpen &&\n calendarContainer.contains(target as Node) &&\n !calendarContainer.contains(relatedTarget as Node)\n ) {\n Promise.resolve().then(() => {\n const rootNode = (target as Node).getRootNode();\n // This `blur` event handler can be called from Flatpickr's code cleaning up calenar dropdown's DOM,\n // and changing focus in such condition causes removing an orphaned DOM node,\n // because Flatpickr redraws the calendar dropdown when the `<input>` gets focus.\n if (\n rootNode.nodeType === Node.DOCUMENT_NODE ||\n rootNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE\n ) {\n if (fp._lastFocusInput === config.inputTo) {\n config.inputTo!.focus();\n } else {\n config.inputFrom.focus();\n }\n // Closing after moving focus. Reversing the order will cause re-opening calendar dropdown upon focusing\n fp.close();\n }\n });\n }\n };\n\n /**\n * Handles `keydown` event to move focus on calendar dropdown.\n */\n const handleInputKeydown = (event: KeyboardEvent) => {\n const { key } = event;\n if (key === 'ArrowDown' || key === 'Down' || key === 'Enter') {\n event.preventDefault();\n fp.open();\n if (key !== 'Enter') {\n focusCalendar();\n } else {\n // Hitting Enter key blurs the `<input>`, causing any element to lose focus\n setTimeout(focusCalendar, 0);\n }\n }\n };\n\n /**\n * Handles `focus` event on `<input>` for starting/end date to track the lastly focused one.\n */\n const handleInputFocus = ({ target }: FocusEvent) => {\n fp._lastFocusInput = target as HTMLInputElement;\n };\n\n /**\n * Releases event listeners used in this Flatpickr plugin.\n */\n const release = () => {\n if (fp._hCDSCEDatePickerFocusPluginBlur) {\n fp._hCDSCEDatePickerFocusPluginBlur =\n fp._hCDSCEDatePickerFocusPluginBlur.release();\n }\n if (fp._hCDSCEDatePickerFocusPluginFocusTo) {\n fp._hCDSCEDatePickerFocusPluginFocusTo =\n fp._hCDSCEDatePickerFocusPluginFocusTo.release();\n }\n if (fp._hCDSCEDatePickerFocusPluginFocusFrom) {\n fp._hCDSCEDatePickerFocusPluginFocusFrom =\n fp._hCDSCEDatePickerFocusPluginFocusFrom.release();\n }\n if (fp._hCDSCEDatePickerFocusPluginKeydownTo) {\n fp._hCDSCEDatePickerFocusPluginKeydownTo =\n fp._hCDSCEDatePickerFocusPluginKeydownTo.release();\n }\n if (fp._hCDSCEDatePickerFocusPluginKeydownFrom) {\n fp._hCDSCEDatePickerFocusPluginKeydownFrom =\n fp._hCDSCEDatePickerFocusPluginKeydownFrom.release();\n }\n };\n\n /**\n * Sets up event listeners used for this Flatpickr plugin.\n */\n const init = () => {\n release();\n const { inputFrom, inputTo } = config;\n fp._hCDSCEDatePickerFocusPluginBlur = on(\n fp.calendarContainer,\n 'blur',\n handleBlur,\n true\n );\n fp._hCDSCEDatePickerFocusPluginKeydownFrom = on(\n inputFrom,\n 'keydown',\n handleInputKeydown\n );\n if (inputTo) {\n fp._hCDSCEDatePickerFocusPluginKeydownTo = on(\n inputTo,\n 'keydown',\n handleInputKeydown\n );\n }\n fp._hCDSCEDatePickerFocusPluginFocusFrom = on(\n inputFrom,\n 'focus',\n handleInputFocus\n );\n if (inputTo) {\n fp._hCDSCEDatePickerFocusPluginFocusTo = on(\n inputTo,\n 'focus',\n handleInputFocus\n );\n }\n };\n\n /**\n * Registers this Flatpickr plugin.\n *\n * @param calendar The Flatpickr instance.\n */\n const register = () => {\n fp.loadedPlugins.push('carbonFlatpickrFocusPlugin');\n };\n\n return {\n onReady: [register, init],\n onDestroy: release,\n };\n };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAOA,EAAE,MAAM,yBAAyB;AAuDxC;AACA;AACA;AACA;AACA,gBAAgBC,MAAmC,IAChDC,EAAwC,IAAK;EAC5C;AACJ;AACA;EACI,MAAMC,aAAa,GAAGA,CAAA,KAAM;IAC1B,MAAM;MAAEC,iBAAiB;MAAEC,gBAAgB;MAAEC;IAAc,CAAC,GAAGJ,EAAE;IACjE,CAACG,gBAAgB,IAAIC,aAAa,IAAIF,iBAAiB,EAAEG,KAAK,EAAE;EACl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B;IACH;IACAxB,EAAE,CAACkC,qCAAqC,GAAGpC,EAAE,CAC3CwB,SAAS,EACT,OAAO,EACPQ,gBAAgB,CACjB;IACD,IAAIT,OAAO,EAAE;MACXrB,EAAE,CAACiC,mCAAmC,GAAGnC,EAAE,CACzCuB,OAAO,EACP,OAAO,EACPS,gBAAgB,CACjB;IACH;EACF,CAAC;;EAED;AACJ;AACA;AACA;AACA;EACI,MAAMQ,QAAQ,GAAGA,CAAA,KAAM;IACrBtC,EAAE,CAACuC,aAAa,CAACC,IAAI,CAAC,4BAA4B,CAAC;EACrD,CAAC;EAED,OAAO;IACLC,OAAO,EAAE,CAACH,QAAQ,EAAED,IAAI,CAAC;IACzBK,SAAS,EAAEX;EACb,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/date-picker/shadow-dom-events-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,MAAM,MAAM,+BAA+B,CAAC;AAGnD;;GAEG;AACH,MAAM,WAAW,8CACf,SAAQ,iBAAiB;IACzB;;OAEG;IACH,6CAA6C,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/D;AA6DD;;;;;GAKG;8BACgB,MAAM;AAAzB,wBA4FI","file":"shadow-dom-events-plugin.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 { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport on from 'carbon-components/es/globals/js/misc/on';\nimport Handle from '../../globals/internal/handle';\nimport { find } from '../../globals/internal/collection-helpers';\n\n/**\n * `FlatpickrInstance` with additional properties used for `carbonFlatpickrShadowDOMEventsPlugin`.\n */\nexport interface ExtendedFlatpickrInstanceShadowDOMEventsPlugin\n extends FlatpickrInstance {\n /**\n * The handle for `keydown` event handler in calendar dropdown.\n */\n _hCDSCEDatePickerShadowDOMEventsPluginKeydown?: Handle | null;\n}\n\n/**\n * The amount of days to adjust, keyed by the key code.\n */\nconst moveDateForKeys = {\n ArrowLeft: -1,\n Left: -1,\n ArrowUp: -7,\n Up: -7,\n ArrowRight: 1,\n Right: 1,\n ArrowDown: 7,\n Down: 7,\n};\n\n/**\n * The amount of months to adjust, keyed by the key code. Used with Ctrl modifier key.\n */\nconst moveMonthForKeys = {\n ArrowLeft: -1,\n Left: -1,\n ArrowUp: -12,\n Up: -12,\n ArrowRight: 1,\n Right: 1,\n ArrowDown: 12,\n Down: 12,\n};\n\n/**\n * The number of milliseconds per day.\n */\nconst MILLISECONDS_IN_DAY = 86400000;\n\n/**\n * Adjusts the date with the given amount of days.\n *\n * @param localDate The original date.\n * @param options The options.\n * @param [options.date=0] The amount of days to adjust.\n */\nconst adjustDate = (\n localDate: Date,\n { date: moveDate = 0 }: { date?: number }\n) => {\n const utcDate = new Date(\n Date.UTC(\n localDate.getFullYear(),\n localDate.getMonth(),\n localDate.getDate()\n ) +\n moveDate * MILLISECONDS_IN_DAY\n );\n return new Date(\n utcDate.getUTCFullYear(),\n utcDate.getUTCMonth(),\n utcDate.getUTCDate()\n );\n};\n\n/**\n * @param config Plugin configuration.\n * @returns\n * A Flatpickr plugin to handle events.\n * Some event handlers in Flatpickr won't work is the calendar dropdown is put in shadow DOM, due to event retargetting.\n */\nexport default (): Plugin =>\n (fp: ExtendedFlatpickrInstanceShadowDOMEventsPlugin) => {\n const getDateElem = (localDate) =>\n find(\n fp.daysContainer!.firstElementChild!.children,\n ({ dateObj }: any) => localDate.getTime() === dateObj.getTime()\n );\n\n /**\n * Handles `keydown` event.\n */\n const handleKeydown = (event: KeyboardEvent) => {\n const { ctrlKey, key, target } = event;\n if (key === 'Enter') {\n target!.dispatchEvent(\n Object.assign(new CustomEvent('mousedown', { bubbles: true }), {\n which: 1,\n })\n );\n } else if (!ctrlKey && key in moveDateForKeys) {\n const { dateObj } = target as any;\n const movedDate = adjustDate(dateObj, { date: moveDateForKeys[key] });\n const movedDateElem = getDateElem(movedDate);\n if (movedDateElem) {\n movedDateElem.focus();\n } else {\n const innerDaysContainer = fp.daysContainer!.firstElementChild!;\n if (\n movedDate.getTime() <\n (innerDaysContainer.firstElementChild as any).dateObj.getTime()\n ) {\n fp.changeMonth(-1);\n // `fp.daysContainer` is updated by `fp.changeMonth()`\n (\n fp.daysContainer!.firstElementChild!\n .lastElementChild as HTMLElement\n ).focus();\n } else if (\n movedDate.getTime() >\n (innerDaysContainer.lastElementChild as any).dateObj.getTime()\n ) {\n fp.changeMonth(1);\n // `fp.daysContainer` is updated by `fp.changeMonth()`\n (\n fp.daysContainer!.firstElementChild!\n .firstElementChild as HTMLElement\n ).focus();\n }\n }\n event.preventDefault();\n } else if (ctrlKey && key in moveMonthForKeys) {\n fp.changeMonth(moveMonthForKeys[key]);\n (\n fp.daysContainer!.firstElementChild!.firstElementChild as HTMLElement\n ).focus();\n event.preventDefault();\n }\n };\n\n /**\n * Releases event listeners used in this Flatpickr plugin.\n */\n const release = () => {\n if (fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown) {\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown =\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown.release();\n }\n };\n\n /**\n * Sets up event listeners used for this Flatpickr plugin.\n */\n const init = () => {\n release();\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown = on(\n fp.calendarContainer,\n 'keydown',\n handleKeydown\n );\n };\n\n /**\n * Registers this Flatpickr plugin.\n */\n const register = () => {\n fp.loadedPlugins.push('carbonFlatpickrShadowDOMEventsPlugin');\n };\n\n return {\n onReady: [register, init],\n onDestroy: [release],\n };\n };\n"]}
1
+ {"version":3,"sources":["components/date-picker/shadow-dom-events-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,MAAM,MAAM,+BAA+B,CAAC;AAGnD;;GAEG;AACH,MAAM,WAAW,8CACf,SAAQ,iBAAiB;IACzB;;OAEG;IACH,6CAA6C,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/D;AA6DD;;;;;GAKG;8BACgB,MAAM;AAAzB,wBA4FI","file":"shadow-dom-events-plugin.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 { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport on from '../../globals/mixins/on';\nimport Handle from '../../globals/internal/handle';\nimport { find } from '../../globals/internal/collection-helpers';\n\n/**\n * `FlatpickrInstance` with additional properties used for `carbonFlatpickrShadowDOMEventsPlugin`.\n */\nexport interface ExtendedFlatpickrInstanceShadowDOMEventsPlugin\n extends FlatpickrInstance {\n /**\n * The handle for `keydown` event handler in calendar dropdown.\n */\n _hCDSCEDatePickerShadowDOMEventsPluginKeydown?: Handle | null;\n}\n\n/**\n * The amount of days to adjust, keyed by the key code.\n */\nconst moveDateForKeys = {\n ArrowLeft: -1,\n Left: -1,\n ArrowUp: -7,\n Up: -7,\n ArrowRight: 1,\n Right: 1,\n ArrowDown: 7,\n Down: 7,\n};\n\n/**\n * The amount of months to adjust, keyed by the key code. Used with Ctrl modifier key.\n */\nconst moveMonthForKeys = {\n ArrowLeft: -1,\n Left: -1,\n ArrowUp: -12,\n Up: -12,\n ArrowRight: 1,\n Right: 1,\n ArrowDown: 12,\n Down: 12,\n};\n\n/**\n * The number of milliseconds per day.\n */\nconst MILLISECONDS_IN_DAY = 86400000;\n\n/**\n * Adjusts the date with the given amount of days.\n *\n * @param localDate The original date.\n * @param options The options.\n * @param [options.date=0] The amount of days to adjust.\n */\nconst adjustDate = (\n localDate: Date,\n { date: moveDate = 0 }: { date?: number }\n) => {\n const utcDate = new Date(\n Date.UTC(\n localDate.getFullYear(),\n localDate.getMonth(),\n localDate.getDate()\n ) +\n moveDate * MILLISECONDS_IN_DAY\n );\n return new Date(\n utcDate.getUTCFullYear(),\n utcDate.getUTCMonth(),\n utcDate.getUTCDate()\n );\n};\n\n/**\n * @param config Plugin configuration.\n * @returns\n * A Flatpickr plugin to handle events.\n * Some event handlers in Flatpickr won't work is the calendar dropdown is put in shadow DOM, due to event retargetting.\n */\nexport default (): Plugin =>\n (fp: ExtendedFlatpickrInstanceShadowDOMEventsPlugin) => {\n const getDateElem = (localDate) =>\n find(\n fp.daysContainer!.firstElementChild!.children,\n ({ dateObj }: any) => localDate.getTime() === dateObj.getTime()\n );\n\n /**\n * Handles `keydown` event.\n */\n const handleKeydown = (event: KeyboardEvent) => {\n const { ctrlKey, key, target } = event;\n if (key === 'Enter') {\n target!.dispatchEvent(\n Object.assign(new CustomEvent('mousedown', { bubbles: true }), {\n which: 1,\n })\n );\n } else if (!ctrlKey && key in moveDateForKeys) {\n const { dateObj } = target as any;\n const movedDate = adjustDate(dateObj, { date: moveDateForKeys[key] });\n const movedDateElem = getDateElem(movedDate);\n if (movedDateElem) {\n movedDateElem.focus();\n } else {\n const innerDaysContainer = fp.daysContainer!.firstElementChild!;\n if (\n movedDate.getTime() <\n (innerDaysContainer.firstElementChild as any).dateObj.getTime()\n ) {\n fp.changeMonth(-1);\n // `fp.daysContainer` is updated by `fp.changeMonth()`\n (\n fp.daysContainer!.firstElementChild!\n .lastElementChild as HTMLElement\n ).focus();\n } else if (\n movedDate.getTime() >\n (innerDaysContainer.lastElementChild as any).dateObj.getTime()\n ) {\n fp.changeMonth(1);\n // `fp.daysContainer` is updated by `fp.changeMonth()`\n (\n fp.daysContainer!.firstElementChild!\n .firstElementChild as HTMLElement\n ).focus();\n }\n }\n event.preventDefault();\n } else if (ctrlKey && key in moveMonthForKeys) {\n fp.changeMonth(moveMonthForKeys[key]);\n (\n fp.daysContainer!.firstElementChild!.firstElementChild as HTMLElement\n ).focus();\n event.preventDefault();\n }\n };\n\n /**\n * Releases event listeners used in this Flatpickr plugin.\n */\n const release = () => {\n if (fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown) {\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown =\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown.release();\n }\n };\n\n /**\n * Sets up event listeners used for this Flatpickr plugin.\n */\n const init = () => {\n release();\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown = on(\n fp.calendarContainer,\n 'keydown',\n handleKeydown\n );\n };\n\n /**\n * Registers this Flatpickr plugin.\n */\n const register = () => {\n fp.loadedPlugins.push('carbonFlatpickrShadowDOMEventsPlugin');\n };\n\n return {\n onReady: [register, init],\n onDestroy: [release],\n };\n };\n"]}
@@ -7,7 +7,7 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
 
10
- import on from 'carbon-components/es/globals/js/misc/on';
10
+ import on from '../../globals/mixins/on';
11
11
  import { find } from '../../globals/internal/collection-helpers';
12
12
 
13
13
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"shadow-dom-events-plugin.js","names":["on","find","moveDateForKeys","ArrowLeft","Left","ArrowUp","Up","ArrowRight","Right","ArrowDown","Down","moveMonthForKeys","MILLISECONDS_IN_DAY","adjustDate","localDate","date","moveDate","utcDate","Date","UTC","getFullYear","getMonth","getDate","getUTCFullYear","getUTCMonth","getUTCDate","fp","getDateElem","daysContainer","firstElementChild","children","dateObj","getTime","handleKeydown","event","ctrlKey","key","target","dispatchEvent","Object","assign","CustomEvent","bubbles","which","movedDate","movedDateElem","focus","innerDaysContainer","changeMonth","lastElementChild","preventDefault","release","_hCDSCEDatePickerShadowDOMEventsPluginKeydown","init","calendarContainer","register","loadedPlugins","push","onReady","onDestroy"],"sources":["components/date-picker/shadow-dom-events-plugin.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 { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport on from 'carbon-components/es/globals/js/misc/on';\nimport Handle from '../../globals/internal/handle';\nimport { find } from '../../globals/internal/collection-helpers';\n\n/**\n * `FlatpickrInstance` with additional properties used for `carbonFlatpickrShadowDOMEventsPlugin`.\n */\nexport interface ExtendedFlatpickrInstanceShadowDOMEventsPlugin\n extends FlatpickrInstance {\n /**\n * The handle for `keydown` event handler in calendar dropdown.\n */\n _hCDSCEDatePickerShadowDOMEventsPluginKeydown?: Handle | null;\n}\n\n/**\n * The amount of days to adjust, keyed by the key code.\n */\nconst moveDateForKeys = {\n ArrowLeft: -1,\n Left: -1,\n ArrowUp: -7,\n Up: -7,\n ArrowRight: 1,\n Right: 1,\n ArrowDown: 7,\n Down: 7,\n};\n\n/**\n * The amount of months to adjust, keyed by the key code. Used with Ctrl modifier key.\n */\nconst moveMonthForKeys = {\n ArrowLeft: -1,\n Left: -1,\n ArrowUp: -12,\n Up: -12,\n ArrowRight: 1,\n Right: 1,\n ArrowDown: 12,\n Down: 12,\n};\n\n/**\n * The number of milliseconds per day.\n */\nconst MILLISECONDS_IN_DAY = 86400000;\n\n/**\n * Adjusts the date with the given amount of days.\n *\n * @param localDate The original date.\n * @param options The options.\n * @param [options.date=0] The amount of days to adjust.\n */\nconst adjustDate = (\n localDate: Date,\n { date: moveDate = 0 }: { date?: number }\n) => {\n const utcDate = new Date(\n Date.UTC(\n localDate.getFullYear(),\n localDate.getMonth(),\n localDate.getDate()\n ) +\n moveDate * MILLISECONDS_IN_DAY\n );\n return new Date(\n utcDate.getUTCFullYear(),\n utcDate.getUTCMonth(),\n utcDate.getUTCDate()\n );\n};\n\n/**\n * @param config Plugin configuration.\n * @returns\n * A Flatpickr plugin to handle events.\n * Some event handlers in Flatpickr won't work is the calendar dropdown is put in shadow DOM, due to event retargetting.\n */\nexport default (): Plugin =>\n (fp: ExtendedFlatpickrInstanceShadowDOMEventsPlugin) => {\n const getDateElem = (localDate) =>\n find(\n fp.daysContainer!.firstElementChild!.children,\n ({ dateObj }: any) => localDate.getTime() === dateObj.getTime()\n );\n\n /**\n * Handles `keydown` event.\n */\n const handleKeydown = (event: KeyboardEvent) => {\n const { ctrlKey, key, target } = event;\n if (key === 'Enter') {\n target!.dispatchEvent(\n Object.assign(new CustomEvent('mousedown', { bubbles: true }), {\n which: 1,\n })\n );\n } else if (!ctrlKey && key in moveDateForKeys) {\n const { dateObj } = target as any;\n const movedDate = adjustDate(dateObj, { date: moveDateForKeys[key] });\n const movedDateElem = getDateElem(movedDate);\n if (movedDateElem) {\n movedDateElem.focus();\n } else {\n const innerDaysContainer = fp.daysContainer!.firstElementChild!;\n if (\n movedDate.getTime() <\n (innerDaysContainer.firstElementChild as any).dateObj.getTime()\n ) {\n fp.changeMonth(-1);\n // `fp.daysContainer` is updated by `fp.changeMonth()`\n (\n fp.daysContainer!.firstElementChild!\n .lastElementChild as HTMLElement\n ).focus();\n } else if (\n movedDate.getTime() >\n (innerDaysContainer.lastElementChild as any).dateObj.getTime()\n ) {\n fp.changeMonth(1);\n // `fp.daysContainer` is updated by `fp.changeMonth()`\n (\n fp.daysContainer!.firstElementChild!\n .firstElementChild as HTMLElement\n ).focus();\n }\n }\n event.preventDefault();\n } else if (ctrlKey && key in moveMonthForKeys) {\n fp.changeMonth(moveMonthForKeys[key]);\n (\n fp.daysContainer!.firstElementChild!.firstElementChild as HTMLElement\n ).focus();\n event.preventDefault();\n }\n };\n\n /**\n * Releases event listeners used in this Flatpickr plugin.\n */\n const release = () => {\n if (fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown) {\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown =\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown.release();\n }\n };\n\n /**\n * Sets up event listeners used for this Flatpickr plugin.\n */\n const init = () => {\n release();\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown = on(\n fp.calendarContainer,\n 'keydown',\n handleKeydown\n );\n };\n\n /**\n * Registers this Flatpickr plugin.\n */\n const register = () => {\n fp.loadedPlugins.push('carbonFlatpickrShadowDOMEventsPlugin');\n };\n\n return {\n onReady: [register, init],\n onDestroy: [release],\n };\n };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAOA,EAAE,MAAM,yCAAyC;AAExD,SAASC,IAAI,QAAQ,2CAA2C;;AAEhE;AACA;AACA;;AASA;AACA;AACA;AACA,MAAMC,eAAe,GAAG;EACtBC,SAAS,EAAE,CAAC,CAAC;EACbC,IAAI,EAAE,CAAC,CAAC;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,EAAE,EAAE,CAAC,CAAC;EACNC,UAAU,EAAE,CAAC;EACbC,KAAK,EAAE,CAAC;EACRC,SAAS,EAAE,CAAC;EACZC,IAAI,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG;EACvBR,SAAS,EAAE,CAAC,CAAC;EACbC,IAAI,EAAE,CAAC,CAAC;EACRC,OAAO,EAAE,CAAC,EAAE;EACZC,EAAE,EAAE,CAAC,EAAE;EACPC,UAAU,EAAE,CAAC;EACbC,KAAK,EAAE,CAAC;EACRC,SAAS,EAAE,EAAE;EACbC,IAAI,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA,MAAME,mBAAmB,GAAG,QAAQ;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,UAAU,GAAGA,CACjBC,SAAe,EACf;EAAEC,IAAI,EAAEC,QAAQ,GAAG;AAAqB,CAAC,KACtC;EACH,MAAMC,OAAO,GAAG,IAAIC,IAAI,CACtBA,IAAI,CAACC,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AAa,CACd;EACH,CAAC;;EAED;AACJ;AACA;EACI,MAAMsB,QAAQ,GAAGA,CAAA,KAAM;IACrB7B,EAAE,CAAC8B,aAAa,CAACC,IAAI,CAAC,sCAAsC,CAAC;EAC/D,CAAC;EAED,OAAO;IACLC,OAAO,EAAE,CAACH,QAAQ,EAAEF,IAAI,CAAC;IACzBM,SAAS,EAAE,CAACR,OAAO;EACrB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"shadow-dom-events-plugin.js","names":["on","find","moveDateForKeys","ArrowLeft","Left","ArrowUp","Up","ArrowRight","Right","ArrowDown","Down","moveMonthForKeys","MILLISECONDS_IN_DAY","adjustDate","localDate","date","moveDate","utcDate","Date","UTC","getFullYear","getMonth","getDate","getUTCFullYear","getUTCMonth","getUTCDate","fp","getDateElem","daysContainer","firstElementChild","children","dateObj","getTime","handleKeydown","event","ctrlKey","key","target","dispatchEvent","Object","assign","CustomEvent","bubbles","which","movedDate","movedDateElem","focus","innerDaysContainer","changeMonth","lastElementChild","preventDefault","release","_hCDSCEDatePickerShadowDOMEventsPluginKeydown","init","calendarContainer","register","loadedPlugins","push","onReady","onDestroy"],"sources":["components/date-picker/shadow-dom-events-plugin.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 { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport { Plugin } from 'flatpickr/dist/types/options';\nimport on from '../../globals/mixins/on';\nimport Handle from '../../globals/internal/handle';\nimport { find } from '../../globals/internal/collection-helpers';\n\n/**\n * `FlatpickrInstance` with additional properties used for `carbonFlatpickrShadowDOMEventsPlugin`.\n */\nexport interface ExtendedFlatpickrInstanceShadowDOMEventsPlugin\n extends FlatpickrInstance {\n /**\n * The handle for `keydown` event handler in calendar dropdown.\n */\n _hCDSCEDatePickerShadowDOMEventsPluginKeydown?: Handle | null;\n}\n\n/**\n * The amount of days to adjust, keyed by the key code.\n */\nconst moveDateForKeys = {\n ArrowLeft: -1,\n Left: -1,\n ArrowUp: -7,\n Up: -7,\n ArrowRight: 1,\n Right: 1,\n ArrowDown: 7,\n Down: 7,\n};\n\n/**\n * The amount of months to adjust, keyed by the key code. Used with Ctrl modifier key.\n */\nconst moveMonthForKeys = {\n ArrowLeft: -1,\n Left: -1,\n ArrowUp: -12,\n Up: -12,\n ArrowRight: 1,\n Right: 1,\n ArrowDown: 12,\n Down: 12,\n};\n\n/**\n * The number of milliseconds per day.\n */\nconst MILLISECONDS_IN_DAY = 86400000;\n\n/**\n * Adjusts the date with the given amount of days.\n *\n * @param localDate The original date.\n * @param options The options.\n * @param [options.date=0] The amount of days to adjust.\n */\nconst adjustDate = (\n localDate: Date,\n { date: moveDate = 0 }: { date?: number }\n) => {\n const utcDate = new Date(\n Date.UTC(\n localDate.getFullYear(),\n localDate.getMonth(),\n localDate.getDate()\n ) +\n moveDate * MILLISECONDS_IN_DAY\n );\n return new Date(\n utcDate.getUTCFullYear(),\n utcDate.getUTCMonth(),\n utcDate.getUTCDate()\n );\n};\n\n/**\n * @param config Plugin configuration.\n * @returns\n * A Flatpickr plugin to handle events.\n * Some event handlers in Flatpickr won't work is the calendar dropdown is put in shadow DOM, due to event retargetting.\n */\nexport default (): Plugin =>\n (fp: ExtendedFlatpickrInstanceShadowDOMEventsPlugin) => {\n const getDateElem = (localDate) =>\n find(\n fp.daysContainer!.firstElementChild!.children,\n ({ dateObj }: any) => localDate.getTime() === dateObj.getTime()\n );\n\n /**\n * Handles `keydown` event.\n */\n const handleKeydown = (event: KeyboardEvent) => {\n const { ctrlKey, key, target } = event;\n if (key === 'Enter') {\n target!.dispatchEvent(\n Object.assign(new CustomEvent('mousedown', { bubbles: true }), {\n which: 1,\n })\n );\n } else if (!ctrlKey && key in moveDateForKeys) {\n const { dateObj } = target as any;\n const movedDate = adjustDate(dateObj, { date: moveDateForKeys[key] });\n const movedDateElem = getDateElem(movedDate);\n if (movedDateElem) {\n movedDateElem.focus();\n } else {\n const innerDaysContainer = fp.daysContainer!.firstElementChild!;\n if (\n movedDate.getTime() <\n (innerDaysContainer.firstElementChild as any).dateObj.getTime()\n ) {\n fp.changeMonth(-1);\n // `fp.daysContainer` is updated by `fp.changeMonth()`\n (\n fp.daysContainer!.firstElementChild!\n .lastElementChild as HTMLElement\n ).focus();\n } else if (\n movedDate.getTime() >\n (innerDaysContainer.lastElementChild as any).dateObj.getTime()\n ) {\n fp.changeMonth(1);\n // `fp.daysContainer` is updated by `fp.changeMonth()`\n (\n fp.daysContainer!.firstElementChild!\n .firstElementChild as HTMLElement\n ).focus();\n }\n }\n event.preventDefault();\n } else if (ctrlKey && key in moveMonthForKeys) {\n fp.changeMonth(moveMonthForKeys[key]);\n (\n fp.daysContainer!.firstElementChild!.firstElementChild as HTMLElement\n ).focus();\n event.preventDefault();\n }\n };\n\n /**\n * Releases event listeners used in this Flatpickr plugin.\n */\n const release = () => {\n if (fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown) {\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown =\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown.release();\n }\n };\n\n /**\n * Sets up event listeners used for this Flatpickr plugin.\n */\n const init = () => {\n release();\n fp._hCDSCEDatePickerShadowDOMEventsPluginKeydown = on(\n fp.calendarContainer,\n 'keydown',\n handleKeydown\n );\n };\n\n /**\n * Registers this Flatpickr plugin.\n */\n const register = () => {\n fp.loadedPlugins.push('carbonFlatpickrShadowDOMEventsPlugin');\n };\n\n return {\n onReady: [register, init],\n onDestroy: [release],\n };\n };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAOA,EAAE,MAAM,yBAAyB;AAExC,SAASC,IAAI,QAAQ,2CAA2C;;AAEhE;AACA;AACA;;AASA;AACA;AACA;AACA,MAAMC,eAAe,GAAG;EACtBC,SAAS,EAAE,CAAC,CAAC;EACbC,IAAI,EAAE,CAAC,C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;MACF;MACAZ,KAAK,CAACgB,cAAc,EAAE;IACxB,CAAC,MAAM,IAAIf,OAAO,IAAIC,GAAG,IAAIzB,gBAAgB,EAAE;MAC7Ce,EAAE,CAACsB,WAAW,CAACrC,gBAAgB,CAACyB,GAAG,CAAC,CAAC;MAEnCV,EAAE,CAACE,aAAa,CAAEC,iBAAiB,CAAEA,iBAAiB,CACtDiB,KAAK,EAAE;MACTZ,KAAK,CAACgB,cAAc,EAAE;IACxB;EACF,CAAC;;EAED;AACJ;AACA;EACI,MAAMC,OAAO,GAAGA,CAAA,KAAM;IACpB,IAAIzB,EAAE,CAAC0B,6CAA6C,EAAE;MACpD1B,EAAE,CAAC0B,6CAA6C,GAC9C1B,EAAE,CAAC0B,6CAA6C,CAACD,OAAO,EAAE;IAC9D;EACF,CAAC;;EAED;AACJ;AACA;EACI,MAAME,IAAI,GAAGA,CAAA,KAAM;IACjBF,OAAO,EAAE;IACTzB,EAAE,CAAC0B,6CAA6C,GAAGpD,EAAE,CACnD0B,EAAE,CAAC4B,iBAAiB,EACpB,SAAS,EACTrB,aAAa,CACd;EACH,CAAC;;EAED;AACJ;AACA;EACI,MAAMsB,QAAQ,GAAGA,CAAA,KAAM;IACrB7B,EAAE,CAAC8B,aAAa,CAACC,IAAI,CAAC,sCAAsC,CAAC;EAC/D,CAAC;EAED,OAAO;IACLC,OAAO,EAAE,CAACH,QAAQ,EAAEF,IAAI,CAAC;IACzBM,SAAS,EAAE,CAACR,OAAO;EACrB,CAAC;AACH,CAAC"}
@@ -326,7 +326,9 @@ declare const CDSDropdown_base: (abstract new (...args: any[]) => {
326
326
  new (...args: any[]): {
327
327
  _handles: Set<import("../../globals/internal/handle").default>;
328
328
  connectedCallback(): void;
329
- disconnectedCallback(): void;
329
+ disconnectedCallback(): void; /**
330
+ * The content of the selected item.
331
+ */
330
332
  accessKey: string;
331
333
  readonly accessKeyLabel: string;
332
334
  autocapitalize: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/dropdown/drop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uB;IAEhD;;OAEG;IAEH,IAAI,gBAAyB;IAE7B;;OAEG;IAEH,iBAAiB,SAAM;IAEvB;;OAEG;IAEH,eAAe,SAAM;IAErB;;OAEG;IAEH,KAAK,SAAM;IAEX;;OAEG;IAEH,IAAI,gBAAyB;IAE7B;;OAEG;IAEH,eAAe,SAAM;IAErB;;OAEG;IAEH,KAAK,SAAM;IAEX;;OAEG;IAEH,IAAI,UAAS;IAEb;;OAEG;IAEH,QAAQ,SAAM;IAEd,YAAY,CAAC,iBAAiB,KAAA;IA6B9B,OAAO,CAAC,iBAAiB,KAAA;IAwBzB,MAAM;IA6IN;;OAEG;IACH,MAAM,CAAC,YAAY,cAA2B;IAE9C;;OAEG;IACH,MAAM,KAAK,uBAAuB,WAEjC;IAED;;OAEG;IACH,MAAM,KAAK,YAAY,WAEtB;IAED;;OAEG;IACH,MAAM,KAAK,oBAAoB,WAE9B;IAED;;;OAGG;IACH,MAAM,KAAK,iBAAiB,WAE3B;IAED;;OAEG;IACH,MAAM,KAAK,WAAW,WAErB;IAED;;;OAGG;IACH,MAAM,KAAK,iBAAiB,WAE3B;IAED;;OAEG;IACH,MAAM,KAAK,WAAW,WAErB;IAED,MAAM,CAAC,iBAAiB;;;;MAGtB;IACF,MAAM,CAAC,MAAM,MAAU;IAEvB;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM;CAY7B;AAED,eAAe,WAAW,CAAC","file":"dropdown.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 { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { LitElement, html, TemplateResult } from 'lit';\nimport { property, customElement, query } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport ChevronDown16 from '@carbon/icons/lib/chevron--down/16';\nimport WarningFilled16 from '@carbon/icons/lib/warning--filled/16';\nimport WarningAltFilled16 from '@carbon/icons/lib/warning--alt--filled/16';\nimport FocusMixin from '../../globals/mixins/focus';\nimport FormMixin from '../../globals/mixins/form';\nimport HostListenerMixin from '../../globals/mixins/host-listener';\nimport ValidityMixin from '../../globals/mixins/validity';\nimport HostListener from '../../globals/decorators/host-listener';\nimport {\n find,\n forEach,\n indexOf,\n} from '../../globals/internal/collection-helpers';\nimport {\n DROPDOWN_DIRECTION,\n DROPDOWN_KEYBOARD_ACTION,\n DROPDOWN_SIZE,\n DROPDOWN_TYPE,\n NAVIGATION_DIRECTION,\n} from './defs';\nimport CDSDropdownItem from './dropdown-item';\nimport styles from './dropdown.scss';\n\nexport {\n DROPDOWN_KEYBOARD_ACTION,\n DROPDOWN_DIRECTION,\n DROPDOWN_SIZE,\n DROPDOWN_TYPE,\n NAVIGATION_DIRECTION,\n};\n\n/**\n * Dropdown.\n *\n * @element cds-dropdown\n * @csspart label-text The label text.\n * @csspart helper-text The helper text.\n * @csspart trigger-button The trigger button.\n * @csspart menu-body The menu body.\n * @csspart validity-message The validity message.\n * @fires cds-dropdown-beingselected\n * The custom event fired before a dropdown item is selected upon a user gesture.\n * Cancellation of this event stops changing the user-initiated selection.\n * @fires cds-dropdown-beingtoggled\n * The custom event fired before the open state of this dropdown is toggled upon a user gesture.\n * Cancellation of this event stops the user-initiated toggling.\n * @fires cds-dropdown-selected - The custom event fired after a dropdown item is selected upon a user gesture.\n * @fires cds-dropdown-toggled - The custom event fired after the open state of this dropdown is toggled upon a user gesture.\n */\n@customElement(`${prefix}-dropdown`)\nclass CDSDropdown extends ValidityMixin(\n HostListenerMixin(FormMixin(FocusMixin(LitElement)))\n) {\n /**\n * The latest status of this dropdown, for screen reader to accounce.\n */\n protected _assistiveStatusText?: string;\n\n /**\n * The content of the selected item.\n */\n protected _selectedItemContent: DocumentFragment | null = null;\n\n /**\n * `true` if the trigger button should be focusable.\n * Derived class can set `false` to this if the trigger button contains another primary focusable element (e.g. `<input>`).\n */\n protected _shouldTriggerBeFocusable = true;\n\n /**\n * The list box `<div>` node.\n */\n @query(`.${prefix}--list-box`)\n protected _listBoxNode!: HTMLDivElement;\n\n /**\n * The `<slot>` element for the helper text in the shadow DOM.\n */\n @query('slot[name=\"helper-text\"]')\n protected _slotHelperTextNode!: HTMLSlotElement;\n\n /**\n * The `<slot>` element for the title text in the shadow DOM.\n */\n @query('slot[name=\"title-text\"]')\n protected _slotTitleTextNode!: HTMLSlotElement;\n\n /**\n * @param itemToSelect A dropdown item. Absense of this argument means clearing selection.\n * @returns `true` if the selection of this dropdown should change if the given item is selected upon user interaction.\n */\n protected _selectionShouldChange(itemToSelect?: CDSDropdownItem) {\n return !itemToSelect || itemToSelect.value !== this.value;\n }\n\n /**\n * A callback that runs after change in dropdown selection upon user interaction is confirmed.\n *\n * @param itemToSelect\n * A dropdown item.\n * Absense of this argument means clearing selection, which may be handled by a derived class.\n */\n protected _selectionDidChange(itemToSelect?: CDSDropdownItem) {\n if (itemToSelect) {\n this.value = itemToSelect.value;\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSDropdown).selectorItemSelected\n ),\n (item) => {\n (item as CDSDropdownItem).selected = false;\n }\n );\n itemToSelect.selected = true;\n this._assistiveStatusText = this.selectedItemAssistiveText;\n this._handleUserInitiatedToggle(false);\n }\n }\n\n /**\n * Handles `click` event on the top-level element in the shadow DOM.\n *\n * @param event The event.\n */\n protected _handleClickInner(event: MouseEvent) {\n if (this.readOnly) {\n return;\n }\n\n if (this.shadowRoot!.contains(event.target as Node)) {\n this._handleUserInitiatedToggle();\n } else {\n const item = (event.target as Element).closest(\n (this.constructor as typeof CDSDropdown).selectorItem\n ) as CDSDropdownItem;\n if (this.contains(item)) {\n this._handleUserInitiatedSelectItem(item);\n }\n }\n }\n\n /**\n * Handler for the `keydown` event on the top-level element in the shadow DOM.\n */\n protected _handleKeydownInner(event: KeyboardEvent) {\n const { key } = event;\n const action = (this.constructor as typeof CDSDropdown).getAction(key);\n if (!this.open) {\n switch (action) {\n case DROPDOWN_KEYBOARD_ACTION.NAVIGATING:\n this._handleUserInitiatedToggle(true);\n // If this menu gets open with an arrow key, reset the highlight\n this._clearHighlight();\n break;\n default:\n break;\n }\n } else {\n switch (action) {\n case DROPDOWN_KEYBOARD_ACTION.CLOSING:\n this._handleUserInitiatedToggle(false);\n break;\n case DROPDOWN_KEYBOARD_ACTION.NAVIGATING:\n this._navigate(NAVIGATION_DIRECTION[key]);\n break;\n default:\n break;\n }\n }\n }\n\n /**\n * Handler for the `keypress` event on the top-level element in the shadow DOM.\n */\n protected _handleKeypressInner(event: KeyboardEvent) {\n const { key } = event;\n const action = (this.constructor as typeof CDSDropdown).getAction(key);\n if (!this.open) {\n switch (action) {\n case DROPDOWN_KEYBOARD_ACTION.TRIGGERING:\n this._handleUserInitiatedToggle(true);\n break;\n default:\n break;\n }\n } else {\n switch (action) {\n case DROPDOWN_KEYBOARD_ACTION.TRIGGERING:\n {\n const constructor = this.constructor as typeof CDSDropdown;\n const highlightedItem = this.querySelector(\n constructor.selectorItemHighlighted\n ) as CDSDropdownItem;\n if (highlightedItem) {\n this._handleUserInitiatedSelectItem(highlightedItem);\n } else {\n this._handleUserInitiatedToggle(false);\n }\n }\n break;\n default:\n break;\n }\n }\n }\n\n /**\n * Handles `blur` event handler on the document this element is in.\n *\n * @param event The event.\n */\n @HostListener('focusout')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n protected _handleFocusOut(event: FocusEvent) {\n if (!this.contains(event.relatedTarget as Node)) {\n this._handleUserInitiatedToggle(false);\n }\n }\n\n /**\n * Handles `slotchange` event for the `<slot>` for helper text.\n */\n protected _handleSlotchangeHelperText() {\n this.requestUpdate();\n }\n\n /**\n * Handles `slotchange` event for the `<slot>` for label text.\n */\n protected _handleSlotchangeLabelText() {\n this.requestUpdate();\n }\n\n /**\n * Handles user-initiated selection of a dropdown item.\n *\n * @param [item] The dropdown item user wants to select. Absense of this argument means clearing selection.\n */\n protected _handleUserInitiatedSelectItem(item?: CDSDropdownItem) {\n if (item?.hasAttribute('disabled')) {\n return;\n }\n\n if (this._selectionShouldChange(item)) {\n const init = {\n bubbles: true,\n composed: true,\n detail: {\n item,\n },\n };\n const constructor = this.constructor as typeof CDSDropdown;\n const beforeSelectEvent = new CustomEvent(constructor.eventBeforeSelect, {\n ...init,\n cancelable: true,\n });\n if (this.dispatchEvent(beforeSelectEvent)) {\n this._selectionDidChange(item);\n const afterSelectEvent = new CustomEvent(constructor.eventSelect, init);\n this.dispatchEvent(afterSelectEvent);\n }\n }\n }\n\n /**\n * Handles user-initiated toggling the open state.\n *\n * @param [force] If specified, forces the open state to the given one.\n */\n protected _handleUserInitiatedToggle(force: boolean = !this.open) {\n const { eventBeforeToggle, eventToggle } = this\n .constructor as typeof CDSDropdown;\n\n const { disabled } = this;\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n open: force,\n },\n };\n if (!disabled) {\n if (this.dispatchEvent(new CustomEvent(eventBeforeToggle, init))) {\n this.open = force;\n if (this.open) {\n this._assistiveStatusText = this.selectingItemsAssistiveText;\n } else {\n const {\n selectedItemAssistiveText,\n label,\n _assistiveStatusText: assistiveStatusText,\n _selectedItemContent: selectedItemContent,\n } = this;\n const selectedItemText =\n (selectedItemContent && selectedItemContent.textContent) || label;\n if (\n selectedItemText &&\n assistiveStatusText !== selectedItemAssistiveText\n ) {\n this._assistiveStatusText = selectedItemText;\n }\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSDropdown).selectorItemHighlighted\n ),\n (item) => {\n (item as CDSDropdownItem).highlighted = false;\n }\n );\n }\n this.requestUpdate();\n this.dispatchEvent(new CustomEvent(eventToggle, init));\n }\n }\n }\n\n /**\n * Clears the selection of dropdown items.\n */\n protected _clearHighlight() {\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSDropdown).selectorItem\n ),\n (item) => {\n (item as CDSDropdownItem).highlighted = false;\n }\n );\n }\n\n /**\n * Navigate through dropdown items.\n *\n * @param direction `-1` to navigate backward, `1` to navigate forward.\n */\n protected _navigate(direction: number) {\n const constructor = this.constructor as typeof CDSDropdown;\n const items = this.querySelectorAll(constructor.selectorItem);\n const highlightedItem = this.querySelector(\n constructor.selectorItemHighlighted\n );\n const highlightedIndex = indexOf(items, highlightedItem!);\n let nextIndex = highlightedIndex + direction;\n\n if (items[nextIndex]?.hasAttribute('disabled')) {\n nextIndex += direction;\n }\n if (nextIndex < 0) {\n nextIndex = items.length - 1;\n }\n if (nextIndex >= items.length) {\n nextIndex = 0;\n }\n forEach(items, (item, i) => {\n (item as CDSDropdownItem).highlighted = i === nextIndex;\n });\n\n const nextItem = items[nextIndex];\n // Using `{ block: 'nearest' }` to prevent scrolling unless scrolling is absolutely necessary.\n // `scrollIntoViewOptions` seems to work in latest Safari despite of MDN/caniuse table.\n // IE falls back to the old behavior.\n nextItem.scrollIntoView({ block: 'nearest' });\n\n const nextItemText = nextItem.textContent;\n if (nextItemText) {\n this._assistiveStatusText = nextItemText;\n }\n this.requestUpdate();\n }\n\n /* eslint-disable class-methods-use-this */\n /**\n * @returns The content preceding the trigger button.\n */\n protected _renderPrecedingLabel(): TemplateResult | void {\n return undefined;\n }\n /* eslint-enable class-methods-use-this */\n\n /**\n * @returns The main content of the trigger button.\n */\n protected _renderLabel(): TemplateResult {\n const { label, _selectedItemContent: selectedItemContent } = this;\n return html`\n <span id=\"trigger-label\" class=\"${prefix}--list-box__label\"\n >${selectedItemContent || label}</span\n >\n `;\n }\n\n /* eslint-disable class-methods-use-this */\n /**\n * @returns The content following the trigger button.\n */\n protected _renderFollowingLabel(): TemplateResult | void {\n return undefined;\n }\n /* eslint-enable class-methods-use-this */\n\n /**\n * Handles event to include selected value on the parent form.\n *\n * @param event The event.\n */\n _handleFormdata(event: Event) {\n const { formData } = event as any; // TODO: Wait for `FormDataEvent` being available in `lib.dom.d.ts`\n const { disabled, name, value } = this;\n if (!disabled) {\n formData.append(name, value);\n }\n }\n\n /**\n * 'aria-label' of the ListBox component.\n * Specify a label to be read by screen readers on the container node\n */\n @property({ type: String, reflect: true, attribute: 'aria-label' })\n ariaLabel = '';\n\n /**\n * Specify the direction of the dropdown. Can be either top or bottom.\n */\n @property({ type: Boolean, reflect: true })\n direction = false;\n\n /**\n * `true` if this dropdown should be disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * The helper text.\n */\n @property({ attribute: 'helper-text' })\n helperText = '';\n\n /**\n * Specify whether the title text should be hidden or not\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-label' })\n hideLabel = false;\n\n /**\n * `true` to show the UI of the invalid state.\n */\n @property({ type: Boolean, reflect: true })\n invalid = false;\n\n /**\n * Message which is displayed if the value is invalid.\n */\n @property({ attribute: 'invalid-text' })\n invalidText = '';\n\n /**\n * Provide the title text that will be read by a screen reader when visiting this control\n */\n @property({ attribute: 'title-text' })\n titleText = '';\n\n /**\n * Name for the dropdown in the `FormData`\n */\n @property()\n name = '';\n\n /**\n * `true` if this dropdown should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Whether or not the Dropdown is readonly\n */\n @property({ type: Boolean, reflect: true, attribute: 'read-only' })\n readOnly = false;\n\n /**\n * `true` if the value is required.\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /**\n * The special validity message for `required`.\n */\n @property({ attribute: 'required-validity-message' })\n requiredValidityMessage = 'Please fill out this field.';\n\n /**\n * An assistive text for screen reader to announce, telling the open state.\n */\n @property({ attribute: 'selecting-items-assistive-text' })\n selectingItemsAssistiveText =\n 'Selecting items. Use up and down arrow keys to navigate.';\n\n /**\n * An assistive text for screen reader to announce, telling that an item is selected.\n */\n @property({ attribute: 'selected-item-assistive-text' })\n selectedItemAssistiveText = 'Selected an item.';\n\n /**\n * Dropdown size.\n */\n @property({ reflect: true })\n size = DROPDOWN_SIZE.REGULAR;\n\n /**\n * The `aria-label` attribute for the UI indicating the closed state.\n */\n @property({ attribute: 'toggle-label-closed' })\n toggleLabelClosed = '';\n\n /**\n * The `aria-label` attribute for the UI indicating the open state.\n */\n @property({ attribute: 'toggle-label-open' })\n toggleLabelOpen = '';\n\n /**\n * Generic label that will be used as the textual representation of what this field is for\n */\n @property({ attribute: 'label' })\n label = '';\n\n /**\n * `true` if this dropdown should use the inline UI variant.\n */\n @property({ reflect: true })\n type = DROPDOWN_TYPE.REGULAR;\n\n /**\n * The validity message.\n */\n @property({ attribute: 'validity-message' })\n validityMessage = '';\n\n /**\n * The value of the selected item.\n */\n @property({ reflect: true })\n value = '';\n\n /**\n * Specify whether the control is currently in warning state\n */\n @property({ type: Boolean, reflect: true })\n warn = false;\n\n /**\n * Provide the text that is displayed when the control is in warning state\n */\n @property({ attribute: 'warn-text' })\n warnText = '';\n\n shouldUpdate(changedProperties) {\n const { selectorItem } = this.constructor as typeof CDSDropdown;\n if (changedProperties.has('size')) {\n forEach(this.querySelectorAll(selectorItem), (elem) => {\n (elem as CDSDropdownItem).size = this.size;\n });\n }\n if (changedProperties.has('value')) {\n // `<cds-multi-select>` updates selection beforehand\n // because our rendering logic for `<cds-multi-select>` looks for selected items via `qSA()`\n forEach(this.querySelectorAll(selectorItem), (elem) => {\n (elem as CDSDropdownItem).selected =\n (elem as CDSDropdownItem).value === this.value;\n });\n const item = find(\n this.querySelectorAll(selectorItem),\n (elem) => (elem as CDSDropdownItem).value === this.value\n );\n if (item) {\n const range = this.ownerDocument!.createRange();\n range.selectNodeContents(item);\n this._selectedItemContent = range.cloneContents();\n } else {\n this._selectedItemContent = null;\n }\n }\n return true;\n }\n\n updated(changedProperties) {\n const { helperText, type } = this;\n const inline = type === DROPDOWN_TYPE.INLINE;\n const { selectorItem } = this.constructor as typeof CDSDropdown;\n if (changedProperties.has('disabled') && this.disabled) {\n const { disabled } = this;\n // Propagate `disabled` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(this.querySelectorAll(selectorItem), (elem) => {\n (elem as CDSDropdownItem).disabled = disabled;\n });\n }\n if (\n (changedProperties.has('helperText') || changedProperties.has('type')) &&\n helperText &&\n inline\n ) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Found `helperText` property/attribute usage in inline mode, that is not supported, at:',\n this\n );\n }\n }\n\n render() {\n const {\n ariaLabel,\n disabled,\n helperText,\n hideLabel,\n invalid,\n invalidText,\n open,\n toggleLabelClosed,\n toggleLabelOpen,\n size,\n titleText,\n type,\n warn,\n warnText,\n _assistiveStatusText: assistiveStatusText,\n _shouldTriggerBeFocusable: shouldTriggerBeFocusable,\n _handleClickInner: handleClickInner,\n _handleKeydownInner: handleKeydownInner,\n _handleKeypressInner: handleKeypressInner,\n _handleSlotchangeHelperText: handleSlotchangeHelperText,\n _handleSlotchangeLabelText: handleSlotchangeLabelText,\n _slotHelperTextNode: slotHelperTextNode,\n _slotTitleTextNode: slotTitleTextNode,\n } = this;\n const inline = type === DROPDOWN_TYPE.INLINE;\n const selectedItemsCount = this.querySelectorAll(\n (this.constructor as typeof CDSDropdown).selectorItemSelected\n ).length;\n const classes = classMap({\n [`${prefix}--dropdown`]: true,\n [`${prefix}--list-box`]: true,\n [`${prefix}--list-box--disabled`]: disabled,\n [`${prefix}--list-box--inline`]: inline,\n [`${prefix}--list-box--expanded`]: open,\n [`${prefix}--list-box--${size}`]: size,\n [`${prefix}--dropdown--invalid`]: invalid,\n [`${prefix}--dropdown--warn`]: warn,\n [`${prefix}--dropdown--inline`]: inline,\n [`${prefix}--dropdown--selected`]: selectedItemsCount > 0,\n });\n const labelClasses = classMap({\n [`${prefix}--label`]: true,\n [`${prefix}--label--disabled`]: disabled,\n [`${prefix}--visually-hidden`]: hideLabel,\n });\n const helperClasses = classMap({\n [`${prefix}--form__helper-text`]: true,\n [`${prefix}--form__helper-text--disabled`]: disabled,\n });\n const iconContainerClasses = classMap({\n [`${prefix}--list-box__menu-icon`]: true,\n [`${prefix}--list-box__menu-icon--open`]: open,\n });\n const toggleLabel =\n (open ? toggleLabelOpen : toggleLabelClosed) || undefined;\n const hasHelperText =\n helperText ||\n (slotHelperTextNode && slotHelperTextNode.assignedNodes().length > 0);\n const hasTitleText =\n titleText ||\n (slotTitleTextNode && slotTitleTextNode.assignedNodes().length > 0);\n const validityIcon = !invalid\n ? undefined\n : WarningFilled16({\n class: `${prefix}--list-box__invalid-icon`,\n 'aria-label': toggleLabel,\n });\n const warningIcon =\n !warn || (invalid && warn)\n ? undefined\n : WarningAltFilled16({\n class: `${prefix}--list-box__invalid-icon ${prefix}--list-box__invalid-icon--warning`,\n 'aria-label': toggleLabel,\n });\n const helperMessage = invalid ? invalidText : warn ? warnText : helperText;\n const menuBody = !open\n ? undefined\n : html`\n <div\n aria-label=\"${ariaLabel}\"\n id=\"menu-body\"\n part=\"menu-body\"\n class=\"${prefix}--list-box__menu\"\n role=\"listbox\"\n tabindex=\"-1\">\n <slot></slot>\n </div>\n `;\n return html`\n <label\n part=\"title-text\"\n class=\"${labelClasses}\"\n ?hidden=\"${!hasTitleText}\">\n <slot name=\"title-text\" @slotchange=\"${handleSlotchangeLabelText}\"\n >${titleText}</slot\n >\n </label>\n <div\n role=\"listbox\"\n class=\"${classes}\"\n ?data-invalid=${invalid}\n @click=${handleClickInner}\n @keydown=${handleKeydownInner}\n @keypress=${handleKeypressInner}>\n <div\n part=\"trigger-button\"\n role=\"${ifDefined(!shouldTriggerBeFocusable ? undefined : 'button')}\"\n class=\"${prefix}--list-box__field\"\n tabindex=\"${ifDefined(!shouldTriggerBeFocusable ? undefined : '0')}\"\n aria-labelledby=\"trigger-label\"\n aria-expanded=\"${String(open)}\"\n aria-haspopup=\"listbox\"\n aria-owns=\"menu-body\"\n aria-controls=\"menu-body\">\n ${this._renderPrecedingLabel()}${this._renderLabel()}${validityIcon}${warningIcon}${this._renderFollowingLabel()}\n <div id=\"trigger-caret\" class=\"${iconContainerClasses}\">\n ${ChevronDown16({ 'aria-label': toggleLabel })}\n </div>\n </div>\n ${menuBody}\n </div>\n <div\n part=\"helper-text\"\n class=\"${helperClasses}\"\n ?hidden=\"${(inline && !warn && !invalid) || !hasHelperText}\">\n <slot name=\"helper-text\" @slotchange=\"${handleSlotchangeHelperText}\"\n >${helperMessage}</slot\n >\n </div>\n <div\n class=\"${prefix}--assistive-text\"\n role=\"status\"\n aria-live=\"assertive\"\n aria-relevant=\"additions text\">\n ${assistiveStatusText}\n </div>\n `;\n }\n\n /**\n * Symbols of keys that triggers opening/closing menu and selecting/deselecting menu item.\n */\n static TRIGGER_KEYS = new Set([' ', 'Enter']);\n\n /**\n * A selector that will return highlighted items.\n */\n static get selectorItemHighlighted() {\n return `${prefix}-dropdown-item[highlighted]`;\n }\n\n /**\n * A selector that will return dropdown items.\n */\n static get selectorItem() {\n return `${prefix}-dropdown-item`;\n }\n\n /**\n * A selector that will return selected items.\n */\n static get selectorItemSelected() {\n return `${prefix}-dropdown-item[selected]`;\n }\n\n /**\n * The name of the custom event fired before a dropdown item is selected upon a user gesture.\n * Cancellation of this event stops changing the user-initiated selection.\n */\n static get eventBeforeSelect() {\n return `${prefix}-dropdown-beingselected`;\n }\n\n /**\n * The name of the custom event fired after a a dropdown item is selected upon a user gesture.\n */\n static get eventSelect() {\n return `${prefix}-dropdown-selected`;\n }\n\n /**\n * The name of the custom event fired before this dropdown item is being toggled upon a user gesture.\n * Cancellation of this event stops the user-initiated action of toggling this dropdown item.\n */\n static get eventBeforeToggle() {\n return `${prefix}-dropdown-beingtoggled`;\n }\n\n /**\n * The name of the custom event fired after this dropdown item is toggled upon a user gesture.\n */\n static get eventToggle() {\n return `${prefix}-dropdown-toggled`;\n }\n\n static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n static styles = styles;\n\n /**\n * @returns A action for dropdown for the given key symbol.\n */\n static getAction(key: string) {\n if (key === 'Escape') {\n return DROPDOWN_KEYBOARD_ACTION.CLOSING;\n }\n if (key in NAVIGATION_DIRECTION) {\n return DROPDOWN_KEYBOARD_ACTION.NAVIGATING;\n }\n if (this.TRIGGER_KEYS.has(key)) {\n return DROPDOWN_KEYBOARD_ACTION.TRIG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EH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,uBAAuB,SAAiC;IAExD;;OAEG;IAEH,2BAA2B,SACkC;IAE7D;;OAEG;IAEH,yBAAyB,SAAuB;IAEhD;;OAEG;IAEH,IAAI,gBAAyB;IAE7B;;OAEG;IAEH,iBAAiB,SAAM;IAEvB;;OAEG;IAEH,eAAe,SAAM;IAErB;;OAEG;IAEH,KAAK,SAAM;IAEX;;OAEG;IAEH,IAAI,gBAAyB;IAE7B;;OAEG;IAEH,eAAe,SAAM;IAErB;;OAEG;IAEH,KAAK,SAAM;IAEX;;OAEG;IAEH,IAAI,UAAS;IAEb;;OAEG;IAEH,QAAQ,SAAM;IAEd,YAAY,CAAC,iBAAiB,KAAA;IA6B9B,OAAO,CAAC,iBAAiB,KAAA;IAwBzB,MAAM;IA6IN;;OAEG;IACH,MAAM,CAAC,YAAY,cAA2B;IAE9C;;OAEG;IACH,MAAM,KAAK,uBAAuB,WAEjC;IAED;;OAEG;IACH,MAAM,KAAK,YAAY,WAEtB;IAED;;OAEG;IACH,MAAM,KAAK,oBAAoB,WAE9B;IAED;;;OAGG;IACH,MAAM,KAAK,iBAAiB,WAE3B;IAED;;OAEG;IACH,MAAM,KAAK,WAAW,WAErB;IAED;;;OAGG;IACH,MAAM,KAAK,iBAAiB,WAE3B;IAED;;OAEG;IACH,MAAM,KAAK,WAAW,WAErB;IAED,MAAM,CAAC,iBAAiB;;;;MAGtB;IACF,MAAM,CAAC,MAAM,MAAU;IAEvB;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM;CAY7B;AAED,eAAe,WAAW,CAAC","file":"dropdown.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 { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { LitElement, html, TemplateResult } from 'lit';\nimport { property, customElement, query } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport ChevronDown16 from '@carbon/icons/lib/chevron--down/16';\nimport WarningFilled16 from '@carbon/icons/lib/warning--filled/16';\nimport WarningAltFilled16 from '@carbon/icons/lib/warning--alt--filled/16';\nimport FocusMixin from '../../globals/mixins/focus';\nimport FormMixin from '../../globals/mixins/form';\nimport HostListenerMixin from '../../globals/mixins/host-listener';\nimport ValidityMixin from '../../globals/mixins/validity';\nimport HostListener from '../../globals/decorators/host-listener';\nimport {\n find,\n forEach,\n indexOf,\n} from '../../globals/internal/collection-helpers';\nimport {\n DROPDOWN_DIRECTION,\n DROPDOWN_KEYBOARD_ACTION,\n DROPDOWN_SIZE,\n DROPDOWN_TYPE,\n NAVIGATION_DIRECTION,\n} from './defs';\nimport CDSDropdownItem from './dropdown-item';\nimport styles from './dropdown.scss';\n\nexport {\n DROPDOWN_KEYBOARD_ACTION,\n DROPDOWN_DIRECTION,\n DROPDOWN_SIZE,\n DROPDOWN_TYPE,\n NAVIGATION_DIRECTION,\n};\n\n/**\n * Dropdown.\n *\n * @element cds-dropdown\n * @csspart label-text The label text.\n * @csspart helper-text The helper text.\n * @csspart trigger-button The trigger button.\n * @csspart menu-body The menu body.\n * @csspart validity-message The validity message.\n * @fires cds-dropdown-beingselected\n * The custom event fired before a dropdown item is selected upon a user gesture.\n * Cancellation of this event stops changing the user-initiated selection.\n * @fires cds-dropdown-beingtoggled\n * The custom event fired before the open state of this dropdown is toggled upon a user gesture.\n * Cancellation of this event stops the user-initiated toggling.\n * @fires cds-dropdown-selected - The custom event fired after a dropdown item is selected upon a user gesture.\n * @fires cds-dropdown-toggled - The custom event fired after the open state of this dropdown is toggled upon a user gesture.\n */\n@customElement(`${prefix}-dropdown`)\nclass CDSDropdown extends ValidityMixin(\n HostListenerMixin(FormMixin(FocusMixin(LitElement)))\n) {\n /**\n * The latest status of this dropdown, for screen reader to accounce.\n */\n protected _assistiveStatusText?: string;\n\n /**\n * The content of the selected item.\n */\n protected _selectedItemContent: DocumentFragment | null = null;\n\n /**\n * `true` if the trigger button should be focusable.\n * Derived class can set `false` to this if the trigger button contains another primary focusable element (e.g. `<input>`).\n */\n protected _shouldTriggerBeFocusable = true;\n\n /**\n * The list box `<div>` node.\n */\n @query(`.${prefix}--list-box`)\n protected _listBoxNode!: HTMLDivElement;\n\n /**\n * The `<slot>` element for the helper text in the shadow DOM.\n */\n @query('slot[name=\"helper-text\"]')\n protected _slotHelperTextNode!: HTMLSlotElement;\n\n /**\n * The `<slot>` element for the title text in the shadow DOM.\n */\n @query('slot[name=\"title-text\"]')\n protected _slotTitleTextNode!: HTMLSlotElement;\n\n /**\n * @param itemToSelect A dropdown item. Absense of this argument means clearing selection.\n * @returns `true` if the selection of this dropdown should change if the given item is selected upon user interaction.\n */\n protected _selectionShouldChange(itemToSelect?: CDSDropdownItem) {\n return !itemToSelect || itemToSelect.value !== this.value;\n }\n\n /**\n * A callback that runs after change in dropdown selection upon user interaction is confirmed.\n *\n * @param itemToSelect\n * A dropdown item.\n * Absense of this argument means clearing selection, which may be handled by a derived class.\n */\n protected _selectionDidChange(itemToSelect?: CDSDropdownItem) {\n if (itemToSelect) {\n this.value = itemToSelect.value;\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSDropdown).selectorItemSelected\n ),\n (item) => {\n (item as CDSDropdownItem).selected = false;\n }\n );\n itemToSelect.selected = true;\n this._assistiveStatusText = this.selectedItemAssistiveText;\n this._handleUserInitiatedToggle(false);\n }\n }\n\n /**\n * Handles `click` event on the top-level element in the shadow DOM.\n *\n * @param event The event.\n */\n protected _handleClickInner(event: MouseEvent) {\n if (this.readOnly) {\n return;\n }\n\n if (this.shadowRoot!.contains(event.target as Node)) {\n this._handleUserInitiatedToggle();\n } else {\n const item = (event.target as Element).closest(\n (this.constructor as typeof CDSDropdown).selectorItem\n ) as CDSDropdownItem;\n if (this.contains(item)) {\n this._handleUserInitiatedSelectItem(item);\n }\n }\n }\n\n /**\n * Handler for the `keydown` event on the top-level element in the shadow DOM.\n */\n protected _handleKeydownInner(event: KeyboardEvent) {\n const { key } = event;\n const action = (this.constructor as typeof CDSDropdown).getAction(key);\n if (!this.open) {\n switch (action) {\n case DROPDOWN_KEYBOARD_ACTION.NAVIGATING:\n this._handleUserInitiatedToggle(true);\n // If this menu gets open with an arrow key, reset the highlight\n this._clearHighlight();\n break;\n default:\n break;\n }\n } else {\n switch (action) {\n case DROPDOWN_KEYBOARD_ACTION.CLOSING:\n this._handleUserInitiatedToggle(false);\n break;\n case DROPDOWN_KEYBOARD_ACTION.NAVIGATING:\n this._navigate(NAVIGATION_DIRECTION[key]);\n break;\n default:\n break;\n }\n }\n }\n\n /**\n * Handler for the `keypress` event on the top-level element in the shadow DOM.\n */\n protected _handleKeypressInner(event: KeyboardEvent) {\n const { key } = event;\n const action = (this.constructor as typeof CDSDropdown).getAction(key);\n if (!this.open) {\n switch (action) {\n case DROPDOWN_KEYBOARD_ACTION.TRIGGERING:\n this._handleUserInitiatedToggle(true);\n break;\n default:\n break;\n }\n } else {\n switch (action) {\n case DROPDOWN_KEYBOARD_ACTION.TRIGGERING:\n {\n const constructor = this.constructor as typeof CDSDropdown;\n const highlightedItem = this.querySelector(\n constructor.selectorItemHighlighted\n ) as CDSDropdownItem;\n if (highlightedItem) {\n this._handleUserInitiatedSelectItem(highlightedItem);\n } else {\n this._handleUserInitiatedToggle(false);\n }\n }\n break;\n default:\n break;\n }\n }\n }\n\n /**\n * Handles `blur` event handler on the document this element is in.\n *\n * @param event The event.\n */\n @HostListener('focusout')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n protected _handleFocusOut(event: FocusEvent) {\n if (!this.contains(event.relatedTarget as Node)) {\n this._handleUserInitiatedToggle(false);\n }\n }\n\n /**\n * Handles `slotchange` event for the `<slot>` for helper text.\n */\n protected _handleSlotchangeHelperText() {\n this.requestUpdate();\n }\n\n /**\n * Handles `slotchange` event for the `<slot>` for label text.\n */\n protected _handleSlotchangeLabelText() {\n this.requestUpdate();\n }\n\n /**\n * Handles user-initiated selection of a dropdown item.\n *\n * @param [item] The dropdown item user wants to select. Absense of this argument means clearing selection.\n */\n protected _handleUserInitiatedSelectItem(item?: CDSDropdownItem) {\n if (item?.hasAttribute('disabled')) {\n return;\n }\n\n if (this._selectionShouldChange(item)) {\n const init = {\n bubbles: true,\n composed: true,\n detail: {\n item,\n },\n };\n const constructor = this.constructor as typeof CDSDropdown;\n const beforeSelectEvent = new CustomEvent(constructor.eventBeforeSelect, {\n ...init,\n cancelable: true,\n });\n if (this.dispatchEvent(beforeSelectEvent)) {\n this._selectionDidChange(item);\n const afterSelectEvent = new CustomEvent(constructor.eventSelect, init);\n this.dispatchEvent(afterSelectEvent);\n }\n }\n }\n\n /**\n * Handles user-initiated toggling the open state.\n *\n * @param [force] If specified, forces the open state to the given one.\n */\n protected _handleUserInitiatedToggle(force: boolean = !this.open) {\n const { eventBeforeToggle, eventToggle } = this\n .constructor as typeof CDSDropdown;\n\n const { disabled } = this;\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n open: force,\n },\n };\n if (!disabled) {\n if (this.dispatchEvent(new CustomEvent(eventBeforeToggle, init))) {\n this.open = force;\n if (this.open) {\n this._assistiveStatusText = this.selectingItemsAssistiveText;\n } else {\n const {\n selectedItemAssistiveText,\n label,\n _assistiveStatusText: assistiveStatusText,\n _selectedItemContent: selectedItemContent,\n } = this;\n const selectedItemText =\n (selectedItemContent && selectedItemContent.textContent) || label;\n if (\n selectedItemText &&\n assistiveStatusText !== selectedItemAssistiveText\n ) {\n this._assistiveStatusText = selectedItemText;\n }\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSDropdown).selectorItemHighlighted\n ),\n (item) => {\n (item as CDSDropdownItem).highlighted = false;\n }\n );\n }\n this.requestUpdate();\n this.dispatchEvent(new CustomEvent(eventToggle, init));\n }\n }\n }\n\n /**\n * Clears the selection of dropdown items.\n */\n protected _clearHighlight() {\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSDropdown).selectorItem\n ),\n (item) => {\n (item as CDSDropdownItem).highlighted = false;\n }\n );\n }\n\n /**\n * Navigate through dropdown items.\n *\n * @param direction `-1` to navigate backward, `1` to navigate forward.\n */\n protected _navigate(direction: number) {\n const constructor = this.constructor as typeof CDSDropdown;\n const items = this.querySelectorAll(constructor.selectorItem);\n const highlightedItem = this.querySelector(\n constructor.selectorItemHighlighted\n );\n const highlightedIndex = indexOf(items, highlightedItem!);\n let nextIndex = highlightedIndex + direction;\n\n if (items[nextIndex]?.hasAttribute('disabled')) {\n nextIndex += direction;\n }\n if (nextIndex < 0) {\n nextIndex = items.length - 1;\n }\n if (nextIndex >= items.length) {\n nextIndex = 0;\n }\n forEach(items, (item, i) => {\n (item as CDSDropdownItem).highlighted = i === nextIndex;\n });\n\n const nextItem = items[nextIndex];\n // Using `{ block: 'nearest' }` to prevent scrolling unless scrolling is absolutely necessary.\n // `scrollIntoViewOptions` seems to work in latest Safari despite of MDN/caniuse table.\n // IE falls back to the old behavior.\n nextItem.scrollIntoView({ block: 'nearest' });\n\n const nextItemText = nextItem.textContent;\n if (nextItemText) {\n this._assistiveStatusText = nextItemText;\n }\n this.requestUpdate();\n }\n\n /* eslint-disable class-methods-use-this */\n /**\n * @returns The content preceding the trigger button.\n */\n protected _renderPrecedingLabel(): TemplateResult | void {\n return undefined;\n }\n /* eslint-enable class-methods-use-this */\n\n /**\n * @returns The main content of the trigger button.\n */\n protected _renderLabel(): TemplateResult {\n const { label, _selectedItemContent: selectedItemContent } = this;\n return html`\n <span id=\"trigger-label\" class=\"${prefix}--list-box__label\"\n >${selectedItemContent || label}</span\n >\n `;\n }\n\n /* eslint-disable class-methods-use-this */\n /**\n * @returns The content following the trigger button.\n */\n protected _renderFollowingLabel(): TemplateResult | void {\n return undefined;\n }\n /* eslint-enable class-methods-use-this */\n\n /**\n * Handles event to include selected value on the parent form.\n *\n * @param event The event.\n */\n _handleFormdata(event: Event) {\n const { formData } = event as any; // TODO: Wait for `FormDataEvent` being available in `lib.dom.d.ts`\n const { disabled, name, value } = this;\n if (!disabled) {\n formData.append(name, value);\n }\n }\n\n /**\n * 'aria-label' of the ListBox component.\n * Specify a label to be read by screen readers on the container node\n */\n @property({ type: String, reflect: true, attribute: 'aria-label' })\n ariaLabel = '';\n\n /**\n * Specify the direction of the dropdown. Can be either top or bottom.\n */\n @property({ type: Boolean, reflect: true })\n direction = false;\n\n /**\n * `true` if this dropdown should be disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * The helper text.\n */\n @property({ attribute: 'helper-text' })\n helperText = '';\n\n /**\n * Specify whether the title text should be hidden or not\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-label' })\n hideLabel = false;\n\n /**\n * `true` to show the UI of the invalid state.\n */\n @property({ type: Boolean, reflect: true })\n invalid = false;\n\n /**\n * Message which is displayed if the value is invalid.\n */\n @property({ attribute: 'invalid-text' })\n invalidText = '';\n\n /**\n * Provide the title text that will be read by a screen reader when visiting this control\n */\n @property({ attribute: 'title-text' })\n titleText = '';\n\n /**\n * Name for the dropdown in the `FormData`\n */\n @property()\n name = '';\n\n /**\n * `true` if this dropdown should be open.\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Whether or not the Dropdown is readonly\n */\n @property({ type: Boolean, reflect: true, attribute: 'read-only' })\n readOnly = false;\n\n /**\n * `true` if the value is required.\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /**\n * The special validity message for `required`.\n */\n @property({ attribute: 'required-validity-message' })\n requiredValidityMessage = 'Please fill out this field.';\n\n /**\n * An assistive text for screen reader to announce, telling the open state.\n */\n @property({ attribute: 'selecting-items-assistive-text' })\n selectingItemsAssistiveText =\n 'Selecting items. Use up and down arrow keys to navigate.';\n\n /**\n * An assistive text for screen reader to announce, telling that an item is selected.\n */\n @property({ attribute: 'selected-item-assistive-text' })\n selectedItemAssistiveText = 'Selected an item.';\n\n /**\n * Dropdown size.\n */\n @property({ reflect: true })\n size = DROPDOWN_SIZE.REGULAR;\n\n /**\n * The `aria-label` attribute for the UI indicating the closed state.\n */\n @property({ attribute: 'toggle-label-closed' })\n toggleLabelClosed = '';\n\n /**\n * The `aria-label` attribute for the UI indicating the open state.\n */\n @property({ attribute: 'toggle-label-open' })\n toggleLabelOpen = '';\n\n /**\n * Generic label that will be used as the textual representation of what this field is for\n */\n @property({ attribute: 'label' })\n label = '';\n\n /**\n * `true` if this dropdown should use the inline UI variant.\n */\n @property({ reflect: true })\n type = DROPDOWN_TYPE.REGULAR;\n\n /**\n * The validity message.\n */\n @property({ attribute: 'validity-message' })\n validityMessage = '';\n\n /**\n * The value of the selected item.\n */\n @property({ reflect: true })\n value = '';\n\n /**\n * Specify whether the control is currently in warning state\n */\n @property({ type: Boolean, reflect: true })\n warn = false;\n\n /**\n * Provide the text that is displayed when the control is in warning state\n */\n @property({ attribute: 'warn-text' })\n warnText = '';\n\n shouldUpdate(changedProperties) {\n const { selectorItem } = this.constructor as typeof CDSDropdown;\n if (changedProperties.has('size')) {\n forEach(this.querySelectorAll(selectorItem), (elem) => {\n (elem as CDSDropdownItem).size = this.size;\n });\n }\n if (changedProperties.has('value')) {\n // `<cds-multi-select>` updates selection beforehand\n // because our rendering logic for `<cds-multi-select>` looks for selected items via `qSA()`\n forEach(this.querySelectorAll(selectorItem), (elem) => {\n (elem as CDSDropdownItem).selected =\n (elem as CDSDropdownItem).value === this.value;\n });\n const item = find(\n this.querySelectorAll(selectorItem),\n (elem) => (elem as CDSDropdownItem).value === this.value\n );\n if (item) {\n const range = this.ownerDocument!.createRange();\n range.selectNodeContents(item);\n this._selectedItemContent = range.cloneContents();\n } else {\n this._selectedItemContent = null;\n }\n }\n return true;\n }\n\n updated(changedProperties) {\n const { helperText, type } = this;\n const inline = type === DROPDOWN_TYPE.INLINE;\n const { selectorItem } = this.constructor as typeof CDSDropdown;\n if (changedProperties.has('disabled') && this.disabled) {\n const { disabled } = this;\n // Propagate `disabled` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(this.querySelectorAll(selectorItem), (elem) => {\n (elem as CDSDropdownItem).disabled = disabled;\n });\n }\n if (\n (changedProperties.has('helperText') || changedProperties.has('type')) &&\n helperText &&\n inline\n ) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Found `helperText` property/attribute usage in inline mode, that is not supported, at:',\n this\n );\n }\n }\n\n render() {\n const {\n ariaLabel,\n disabled,\n helperText,\n hideLabel,\n invalid,\n invalidText,\n open,\n toggleLabelClosed,\n toggleLabelOpen,\n size,\n titleText,\n type,\n warn,\n warnText,\n _assistiveStatusText: assistiveStatusText,\n _shouldTriggerBeFocusable: shouldTriggerBeFocusable,\n _handleClickInner: handleClickInner,\n _handleKeydownInner: handleKeydownInner,\n _handleKeypressInner: handleKeypressInner,\n _handleSlotchangeHelperText: handleSlotchangeHelperText,\n _handleSlotchangeLabelText: handleSlotchangeLabelText,\n _slotHelperTextNode: slotHelperTextNode,\n _slotTitleTextNode: slotTitleTextNode,\n } = this;\n const inline = type === DROPDOWN_TYPE.INLINE;\n const selectedItemsCount = this.querySelectorAll(\n (this.constructor as typeof CDSDropdown).selectorItemSelected\n ).length;\n const classes = classMap({\n [`${prefix}--dropdown`]: true,\n [`${prefix}--list-box`]: true,\n [`${prefix}--list-box--disabled`]: disabled,\n [`${prefix}--list-box--inline`]: inline,\n [`${prefix}--list-box--expanded`]: open,\n [`${prefix}--list-box--${size}`]: size,\n [`${prefix}--dropdown--invalid`]: invalid,\n [`${prefix}--dropdown--warn`]: warn,\n [`${prefix}--dropdown--inline`]: inline,\n [`${prefix}--dropdown--selected`]: selectedItemsCount > 0,\n });\n const labelClasses = classMap({\n [`${prefix}--label`]: true,\n [`${prefix}--label--disabled`]: disabled,\n [`${prefix}--visually-hidden`]: hideLabel,\n });\n const helperClasses = classMap({\n [`${prefix}--form__helper-text`]: true,\n [`${prefix}--form__helper-text--disabled`]: disabled,\n });\n const iconContainerClasses = classMap({\n [`${prefix}--list-box__menu-icon`]: true,\n [`${prefix}--list-box__menu-icon--open`]: open,\n });\n const toggleLabel =\n (open ? toggleLabelOpen : toggleLabelClosed) || undefined;\n const hasHelperText =\n helperText ||\n (slotHelperTextNode && slotHelperTextNode.assignedNodes().length > 0);\n const hasTitleText =\n titleText ||\n (slotTitleTextNode && slotTitleTextNode.assignedNodes().length > 0);\n const validityIcon = !invalid\n ? undefined\n : WarningFilled16({\n class: `${prefix}--list-box__invalid-icon`,\n 'aria-label': toggleLabel,\n });\n const warningIcon =\n !warn || (invalid && warn)\n ? undefined\n : WarningAltFilled16({\n class: `${prefix}--list-box__invalid-icon ${prefix}--list-box__invalid-icon--warning`,\n 'aria-label': toggleLabel,\n });\n const helperMessage = invalid ? invalidText : warn ? warnText : helperText;\n const menuBody = !open\n ? undefined\n : html`\n <div\n aria-label=\"${ariaLabel}\"\n id=\"menu-body\"\n part=\"menu-body\"\n class=\"${prefix}--list-box__menu\"\n role=\"listbox\"\n tabindex=\"-1\">\n <slot></slot>\n </div>\n `;\n return html`\n <label\n part=\"title-text\"\n class=\"${labelClasses}\"\n ?hidden=\"${!hasTitleText}\">\n <slot name=\"title-text\" @slotchange=\"${handleSlotchangeLabelText}\"\n >${titleText}</slot\n >\n </label>\n <div\n role=\"listbox\"\n class=\"${classes}\"\n ?data-invalid=${invalid}\n @click=${handleClickInner}\n @keydown=${handleKeydownInner}\n @keypress=${handleKeypressInner}>\n <div\n part=\"trigger-button\"\n role=\"${ifDefined(!shouldTriggerBeFocusable ? undefined : 'button')}\"\n class=\"${prefix}--list-box__field\"\n tabindex=\"${ifDefined(!shouldTriggerBeFocusable ? undefined : '0')}\"\n aria-labelledby=\"trigger-label\"\n aria-expanded=\"${String(open)}\"\n aria-haspopup=\"listbox\"\n aria-owns=\"menu-body\"\n aria-controls=\"menu-body\">\n ${this._renderPrecedingLabel()}${this._renderLabel()}${validityIcon}${warningIcon}${this._renderFollowingLabel()}\n <div id=\"trigger-caret\" class=\"${iconContainerClasses}\">\n ${ChevronDown16({ 'aria-label': toggleLabel })}\n </div>\n </div>\n ${menuBody}\n </div>\n <div\n part=\"helper-text\"\n class=\"${helperClasses}\"\n ?hidden=\"${(inline && !warn && !invalid) || !hasHelperText}\">\n <slot name=\"helper-text\" @slotchange=\"${handleSlotchangeHelperText}\"\n >${helperMessage}</slot\n >\n </div>\n <div\n class=\"${prefix}--assistive-text\"\n role=\"status\"\n aria-live=\"assertive\"\n aria-relevant=\"additions text\">\n ${assistiveStatusText}\n </div>\n `;\n }\n\n /**\n * Symbols of keys that triggers opening/closing menu and selecting/deselecting menu item.\n */\n static TRIGGER_KEYS = new Set([' ', 'Enter']);\n\n /**\n * A selector that will return highlighted items.\n */\n static get selectorItemHighlighted() {\n return `${prefix}-dropdown-item[highlighted]`;\n }\n\n /**\n * A selector that will return dropdown items.\n */\n static get selectorItem() {\n return `${prefix}-dropdown-item`;\n }\n\n /**\n * A selector that will return selected items.\n */\n static get selectorItemSelected() {\n return `${prefix}-dropdown-item[selected]`;\n }\n\n /**\n * The name of the custom event fired before a dropdown item is selected upon a user gesture.\n * Cancellation of this event stops changing the user-initiated selection.\n */\n static get eventBeforeSelect() {\n return `${prefix}-dropdown-beingselected`;\n }\n\n /**\n * The name of the custom event fired after a a dropdown item is selected upon a user gesture.\n */\n static get eventSelect() {\n return `${prefix}-dropdown-selected`;\n }\n\n /**\n * The name of the custom event fired before this dropdown item is being toggled upon a user gesture.\n * Cancellation of this event stops the user-initiated action of toggling this dropdown item.\n */\n static get eventBeforeToggle() {\n return `${prefix}-dropdown-beingtoggled`;\n }\n\n /**\n * The name of the custom event fired after this dropdown item is toggled upon a user gesture.\n */\n static get eventToggle() {\n return `${prefix}-dropdown-toggled`;\n }\n\n static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n static styles = styles;\n\n /**\n * @returns A action for dropdown for the given key symbol.\n */\n static getAction(key: string) {\n if (key === 'Escape') {\n return DROPDOWN_KEYBOARD_ACTION.CLOSING;\n }\n if (key in NAVIGATION_DIRECTION) {\n return DROPDOWN_KEYBOARD_ACTION.NAVIGATING;\n }\n if (this.TRIGGER_KEYS.has(key)) {\n return DROPDOWN_KEYBOARD_ACTION.TRIGGERING;\n }\n return DROPDOWN_KEYBOARD_ACTION.NONE;\n }\n}\n\nexport default CDSDropdown;\n"]}
@@ -17,32 +17,28 @@ export declare enum FILE_UPLOADER_ITEM_STATE {
17
17
  /**
18
18
  * Upload complete.
19
19
  */
20
- UPLOADED = "uploaded",
20
+ COMPLETE = "complete",
21
21
  /**
22
22
  * Editing.
23
23
  */
24
- EDITING = "editing"
24
+ EDIT = "edit"
25
25
  }
26
26
  /**
27
27
  * File uploader item size.
28
28
  */
29
29
  export declare enum FILE_UPLOADER_ITEM_SIZE {
30
- /**
31
- * Regular size.
32
- */
33
- REGULAR = "",
34
30
  /**
35
31
  * Small size.
36
32
  */
37
33
  SMALL = "sm",
38
34
  /**
39
- * Large size.
35
+ * Medium size.
40
36
  */
41
- LARGE = "lg",
37
+ MEDIUM = "md",
42
38
  /**
43
- * Size for form field.
39
+ * Large size.
44
40
  */
45
- FIELD = "field"
41
+ LARGE = "lg"
46
42
  }
47
43
 
48
44
  //# sourceMappingURL=defs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/file-uploader/defs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,oBAAY,wBAAwB;IAClC;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,oBAAY,uBAAuB;IACjC;;OAEG;IACH,OAAO,KAAK;IAEZ;;OAEG;IACH,KAAK,OAAO;IAEZ;;OAEG;IACH,KAAK,OAAO;IAGZ;;OAEG;IACH,KAAK,UAAU;CAChB","file":"defs.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 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 state of `<cds-file-uploader-item>`.\n */\nexport enum FILE_UPLOADER_ITEM_STATE {\n /**\n * Upload in progress.\n */\n UPLOADING = 'uploading',\n\n /**\n * Upload complete.\n */\n UPLOADED = 'uploaded',\n\n /**\n * Editing.\n */\n EDITING = 'editing',\n}\n\n/**\n * File uploader item size.\n */\nexport enum FILE_UPLOADER_ITEM_SIZE {\n /**\n * Regular size.\n */\n REGULAR = '',\n\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n\n // TODO: deprecate\n /**\n * Size for form field.\n */\n FIELD = 'field',\n}\n"]}
1
+ {"version":3,"sources":["components/file-uploader/defs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,oBAAY,wBAAwB;IAClC;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,IAAI,SAAS;CACd;AAED;;GAEG;AACH,oBAAY,uBAAuB;IACjC;;OAEG;IACH,KAAK,OAAO;IAEZ;;OAEG;IACH,MAAM,OAAO;IAEb;;OAEG;IACH,KAAK,OAAO;CACb","file":"defs.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 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 state of `<cds-file-uploader-item>`.\n */\nexport enum FILE_UPLOADER_ITEM_STATE {\n /**\n * Upload in progress.\n */\n UPLOADING = 'uploading',\n\n /**\n * Upload complete.\n */\n COMPLETE = 'complete',\n\n /**\n * Editing.\n */\n EDIT = 'edit',\n}\n\n/**\n * File uploader item size.\n */\nexport enum FILE_UPLOADER_ITEM_SIZE {\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Medium size.\n */\n MEDIUM = 'md',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n}\n"]}
@@ -17,14 +17,13 @@ export let FILE_UPLOADER_ITEM_STATE;
17
17
  */
18
18
  (function (FILE_UPLOADER_ITEM_STATE) {
19
19
  FILE_UPLOADER_ITEM_STATE["UPLOADING"] = "uploading";
20
- FILE_UPLOADER_ITEM_STATE["UPLOADED"] = "uploaded";
21
- FILE_UPLOADER_ITEM_STATE["EDITING"] = "editing";
20
+ FILE_UPLOADER_ITEM_STATE["COMPLETE"] = "complete";
21
+ FILE_UPLOADER_ITEM_STATE["EDIT"] = "edit";
22
22
  })(FILE_UPLOADER_ITEM_STATE || (FILE_UPLOADER_ITEM_STATE = {}));
23
23
  export let FILE_UPLOADER_ITEM_SIZE;
24
24
  (function (FILE_UPLOADER_ITEM_SIZE) {
25
- FILE_UPLOADER_ITEM_SIZE["REGULAR"] = "";
26
25
  FILE_UPLOADER_ITEM_SIZE["SMALL"] = "sm";
26
+ FILE_UPLOADER_ITEM_SIZE["MEDIUM"] = "md";
27
27
  FILE_UPLOADER_ITEM_SIZE["LARGE"] = "lg";
28
- FILE_UPLOADER_ITEM_SIZE["FIELD"] = "field";
29
28
  })(FILE_UPLOADER_ITEM_SIZE || (FILE_UPLOADER_ITEM_SIZE = {}));
30
29
  //# sourceMappingURL=defs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defs.js","names":["FILE_UPLOADER_ITEM_STATE","FILE_UPLOADER_ITEM_SIZE"],"sources":["components/file-uploader/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 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 state of `<cds-file-uploader-item>`.\n */\nexport enum FILE_UPLOADER_ITEM_STATE {\n /**\n * Upload in progress.\n */\n UPLOADING = 'uploading',\n\n /**\n * Upload complete.\n */\n UPLOADED = 'uploaded',\n\n /**\n * Editing.\n */\n EDITING = 'editing',\n}\n\n/**\n * File uploader item size.\n */\nexport enum FILE_UPLOADER_ITEM_SIZE {\n /**\n * Regular size.\n */\n REGULAR = '',\n\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n\n // TODO: deprecate\n /**\n * Size for form field.\n */\n FIELD = 'field',\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,wBAAwB;;AAiBpC;AACA;AACA;AAFA,WAjBYA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,KAAxBA,wBAAwB;AAoBpC,WAAYC,uBAAuB;AAqBlC,WArBWA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,KAAvBA,uBAAuB"}
1
+ {"version":3,"file":"defs.js","names":["FILE_UPLOADER_ITEM_STATE","FILE_UPLOADER_ITEM_SIZE"],"sources":["components/file-uploader/defs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 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 state of `<cds-file-uploader-item>`.\n */\nexport enum FILE_UPLOADER_ITEM_STATE {\n /**\n * Upload in progress.\n */\n UPLOADING = 'uploading',\n\n /**\n * Upload complete.\n */\n COMPLETE = 'complete',\n\n /**\n * Editing.\n */\n EDIT = 'edit',\n}\n\n/**\n * File uploader item size.\n */\nexport enum FILE_UPLOADER_ITEM_SIZE {\n /**\n * Small size.\n */\n SMALL = 'sm',\n\n /**\n * Medium size.\n */\n MEDIUM = 'md',\n\n /**\n * Large size.\n */\n LARGE = 'lg',\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAYA,wBAAwB;;AAiBpC;AACA;AACA;AAFA,WAjBYA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;AAAA,GAAxBA,wBAAwB,KAAxBA,wBAAwB;AAoBpC,WAAYC,uBAAuB;AAelC,WAfWA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;AAAA,GAAvBA,uBAAuB,KAAvBA,uBAAuB"}
@@ -7,9 +7,8 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
  import { LitElement } from 'lit-element';
10
- import './file-uploader';
11
- import './drop-container';
12
- import { FILE_UPLOADER_ITEM_SIZE } from './file-uploader-item';
10
+ import './index';
11
+ import { BUTTON_SIZE } from '../button/button';
13
12
  /**
14
13
  * A class to manage file uploading states, like sending file contents to server.
15
14
  * DEMONSTRATION-PURPOSE ONLY.
@@ -17,7 +16,7 @@ import { FILE_UPLOADER_ITEM_SIZE } from './file-uploader-item';
17
16
  * and thus abstracting everything in a library won't be a good return on investment
18
17
  * vs. letting users copy code here and implement features that fit their needs.
19
18
  */
20
- export default class BXCEDemoFileUploader extends LitElement {
19
+ export default class CDSCEDemoFileUploader extends LitElement {
21
20
  /**
22
21
  * The files being uploaded.
23
22
  */
@@ -44,27 +43,51 @@ export default class BXCEDemoFileUploader extends LitElement {
44
43
  * The file types the file input should accept, separated by space.
45
44
  */
46
45
  accept: string;
46
+ /**
47
+ * `true` if the drop container should be disabled.
48
+ */
49
+ button: boolean;
50
+ /**
51
+ * Button kind.
52
+ */
53
+ buttonKind: string;
54
+ /**
55
+ * Button label.
56
+ */
57
+ buttonLabel: string;
47
58
  /**
48
59
  * `true` if the drop container should be disabled.
49
60
  */
50
61
  disabled: boolean;
51
62
  /**
52
- * The helper text.
63
+ * Icon description.
53
64
  */
54
- helperText: string;
65
+ iconDescription: string;
55
66
  /**
56
- * The label text.
67
+ * The input name.
57
68
  */
58
- labelText: string;
69
+ inputName: string;
70
+ /**
71
+ * The label description text.
72
+ */
73
+ labelDescription: string;
74
+ /**
75
+ * The label title.
76
+ */
77
+ labelTitle: string;
59
78
  /**
60
79
  * `true` if the drop container should accept more than one files at once.
61
80
  * Note that even with `false` set here, user _can_ select multiple files one by one.
62
81
  */
63
82
  multiple: boolean;
64
83
  /**
65
- * The size of the file uploader items.
84
+ * The size of the button item.
85
+ */
86
+ size: BUTTON_SIZE;
87
+ /**
88
+ * The state of this file uploader item.
66
89
  */
67
- size: FILE_UPLOADER_ITEM_SIZE;
90
+ inputState: string;
68
91
  render(): import("lit-html").TemplateResult<1>;
69
92
  }
70
93
 
@@ -1 +1 @@
1
- {"version":3,"sources":["components/file-uploader/demo-file-uploader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAkB,UAAU,EAAiB,MAAM,aAAa,CAAC;AAKxE,OAAO,iBAAiB,CAAC;AACzB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EACL,uBAAuB,EAExB,MAAM,sBAAsB,CAAC;AAG9B;;;;;;GAMG;AAEH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,UAAU;IAC1D;;OAEG;IACH,OAAO,CAAC,MAAM,CAAkB;IAEhC;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAsBrB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAMrB;;;;OAIG;YACW,eAAe;IA2C7B;;OAEG;IAEH,MAAM,SAAM;IAEZ;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,UAAU,SAAM;IAEhB;;OAEG;IAEH,SAAS,SAAM;IAEf;;;OAGG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,IAAI,0BAAmC;IAEvC,MAAM;CAiDP","file":"demo-file-uploader.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 { html, property, LitElement, customElement } from 'lit-element';\n\nimport { delay } from 'bluebird';\nimport { prefix } from '../../globals/settings';\nimport { ifDefined } from 'lit/directives/if-defined';\nimport './file-uploader';\nimport './drop-container';\nimport {\n FILE_UPLOADER_ITEM_SIZE,\n FILE_UPLOADER_ITEM_STATE,\n} from './file-uploader-item';\nimport { FileData } from './stories/types';\n\n/**\n * A class to manage file uploading states, like sending file contents to server.\n * DEMONSTRATION-PURPOSE ONLY.\n * Data/state handling in file uploading tends to involve lots of application-specific logics\n * and thus abstracting everything in a library won't be a good return on investment\n * vs. letting users copy code here and implement features that fit their needs.\n */\n@customElement(`${prefix}-ce-demo-file-uploader`)\nexport default class BXCEDemoFileUploader extends LitElement {\n /**\n * The files being uploaded.\n */\n private _files: FileData[] = [];\n\n /**\n * Handles `cds-drop-container-changed` on `<cds-file-drop-container>`.\n *\n * @param event The event.\n */\n private _handleChange(event: CustomEvent) {\n const { addedFiles } = event.detail;\n const newFiles: FileData[] = addedFiles.map(\n (item) =>\n ({\n id: Math.random().toString(36).slice(2),\n file: item,\n state: FILE_UPLOADER_ITEM_STATE.UPLOADING,\n } as FileData)\n );\n const { multiple, _files: files, _simulateUpload: simulateUpload } = this;\n if (multiple) {\n this._files = files.concat(newFiles);\n this.requestUpdate();\n newFiles.forEach(simulateUpload, this);\n } else if (addedFiles.length > 0) {\n this._files = files.concat(newFiles[0]);\n this.requestUpdate();\n this._simulateUpload(newFiles[0]);\n }\n }\n\n /**\n * Handles `cds-file-uploader-item-deleted` on `<cds-file-uploader-item>`.\n *\n * @param event The event.\n */\n private _handleDelete(event: CustomEvent) {\n const { fileId: idToDelete } = (event.target as HTMLElement).dataset;\n this._files = this._files.filter(({ id }) => idToDelete !== id);\n this.requestUpdate();\n }\n\n /**\n * Simulates updating file.\n *\n * @param data The data of the file being uploaded.\n */\n private async _simulateUpload(data: FileData) {\n const { id, file } = data;\n if (file.size > 524288) {\n this._files = this._files.map((item) =>\n id !== item.id\n ? item\n : {\n ...item,\n state: FILE_UPLOADER_ITEM_STATE.EDITING,\n invalid: true,\n validityMessage: 'File size exceeds limit',\n supplementalValidityMessage:\n '500kb max file size. Select a new file and try again.',\n }\n );\n this.requestUpdate();\n } else {\n // Simulates network request time\n const rand = Math.random() * 1000;\n await delay(rand);\n this._files = this._files.map((item) =>\n id !== item.id\n ? item\n : {\n ...item,\n state: FILE_UPLOADER_ITEM_STATE.UPLOADED,\n }\n );\n this.requestUpdate();\n // Shows x icon after 1 second\n await delay(1000);\n this._files = this._files.map((item) =>\n id !== item.id\n ? item\n : {\n ...item,\n state: FILE_UPLOADER_ITEM_STATE.EDITING,\n }\n );\n this.requestUpdate();\n }\n }\n\n /**\n * The file types the file input should accept, separated by space.\n */\n @property()\n accept = '';\n\n /**\n * `true` if the drop container should be disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * The helper text.\n */\n @property({ attribute: 'helper-text' })\n helperText = '';\n\n /**\n * The label text.\n */\n @property({ attribute: 'label-text' })\n labelText = '';\n\n /**\n * `true` if the drop container should accept more than one files at once.\n * Note that even with `false` set here, user _can_ select multiple files one by one.\n */\n @property({ type: Boolean, reflect: true })\n multiple = false;\n\n /**\n * The size of the file uploader items.\n */\n @property({ reflect: true })\n size = FILE_UPLOADER_ITEM_SIZE.REGULAR;\n\n render() {\n const {\n accept,\n disabled,\n helperText,\n labelText,\n multiple,\n size,\n _files: files,\n _handleChange: handleChange,\n _handleDelete: handleDelete,\n } = this;\n return html`\n <cds-file-uploader\n helper-text=\"${ifDefined(helperText)}\"\n label-text=\"${ifDefined(labelText)}\">\n <cds-file-drop-container\n accept=\"${ifDefined(accept)}\"\n ?disabled=\"${disabled}\"\n ?multiple=\"${multiple}\"\n @cds-file-drop-container-changed=\"${handleChange}\">\n Drag and drop files here or click to upload\n </cds-file-drop-container>\n ${files.map(\n ({\n id,\n invalid,\n file,\n state,\n supplementalValidityMessage,\n validityMessage,\n }) => html`\n <cds-file-uploader-item\n data-file-id=\"${id}\"\n ?invalid=\"${invalid}\"\n size=\"${ifDefined(size)}\"\n state=\"${ifDefined(state)}\"\n validity-message=\"${ifDefined(validityMessage)}\"\n @cds-file-uploader-item-deleted=\"${handleDelete}\">\n ${file.name}\n <span slot=\"validity-message-supplement\"\n >${supplementalValidityMessage}</span\n >\n </cds-file-uploader-item>\n `\n )}\n </cds-file-uploader>\n `;\n }\n}\n"]}
1
+ {"version":3,"sources":["components/file-uploader/demo-file-uploader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAkB,UAAU,EAAiB,MAAM,aAAa,CAAC;AAKxE,OAAO,SAAS,CAAC;AAEjB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C;;;;;;GAMG;AAEH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,UAAU;IAC3D;;OAEG;IACH,OAAO,CAAC,MAAM,CAAkB;IAEhC;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAsBrB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAMrB;;;;OAIG;YACW,eAAe;IA2C7B;;OAEG;IAEH,MAAM,SAAM;IAEZ;;OAEG;IAEH,MAAM,UAAS;IAEf;;OAEG;IAEH,UAAU,SAAa;IAEvB;;OAEG;IAEH,WAAW,SAAc;IAEzB;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,eAAe,SAAM;IAErB;;OAEG;IAEH,SAAS,SAAM;IAEf;;OAEG;IAEH,gBAAgB,SAAM;IAEtB;;OAEG;IAEH,UAAU,SAAM;IAEhB;;;OAGG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,IAAI,cAAsB;IAE1B;;OAEG;IAEH,UAAU,SAAM;IAEhB,MAAM;CAwDP","file":"demo-file-uploader.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 { html, property, LitElement, customElement } from 'lit-element';\n\nimport { delay } from 'bluebird';\nimport { prefix } from '../../globals/settings';\nimport { ifDefined } from 'lit/directives/if-defined';\nimport './index';\nimport { FILE_UPLOADER_ITEM_STATE } from './file-uploader-item';\nimport { BUTTON_SIZE } from '../button/button';\nimport { FileData } from './stories/types';\n\n/**\n * A class to manage file uploading states, like sending file contents to server.\n * DEMONSTRATION-PURPOSE ONLY.\n * Data/state handling in file uploading tends to involve lots of application-specific logics\n * and thus abstracting everything in a library won't be a good return on investment\n * vs. letting users copy code here and implement features that fit their needs.\n */\n@customElement(`${prefix}-ce-demo-file-uploader`)\nexport default class CDSCEDemoFileUploader extends LitElement {\n /**\n * The files being uploaded.\n */\n private _files: FileData[] = [];\n\n /**\n * Handles `cds-drop-container-changed` on `<cds-file-drop-container>`.\n *\n * @param event The event.\n */\n private _handleChange(event: CustomEvent) {\n const { addedFiles } = event.detail;\n const newFiles: FileData[] = addedFiles.map(\n (item) =>\n ({\n id: Math.random().toString(36).slice(2),\n file: item,\n state: FILE_UPLOADER_ITEM_STATE.UPLOADING,\n } as FileData)\n );\n const { multiple, _files: files, _simulateUpload: simulateUpload } = this;\n if (multiple) {\n this._files = files.concat(newFiles);\n this.requestUpdate();\n newFiles.forEach(simulateUpload, this);\n } else if (addedFiles.length > 0) {\n this._files = files.concat(newFiles[0]);\n this.requestUpdate();\n this._simulateUpload(newFiles[0]);\n }\n }\n\n /**\n * Handles `cds-file-uploader-item-deleted` on `<cds-file-uploader-item>`.\n *\n * @param event The event.\n */\n private _handleDelete(event: CustomEvent) {\n const { fileId: idToDelete } = (event.target as HTMLElement).dataset;\n this._files = this._files.filter(({ id }) => idToDelete !== id);\n this.requestUpdate();\n }\n\n /**\n * Simulates updating file.\n *\n * @param data The data of the file being uploaded.\n */\n private async _simulateUpload(data: FileData) {\n const { id, file } = data;\n if (file.size > 524288) {\n this._files = this._files.map((item) =>\n id !== item.id\n ? item\n : {\n ...item,\n state: FILE_UPLOADER_ITEM_STATE.EDIT,\n invalid: true,\n errorSubject: 'File size exceeds limit',\n errorBody:\n '500kb max file size. Select a new file and try again.',\n }\n );\n this.requestUpdate();\n } else {\n // Simulates network request time\n const rand = Math.random() * 1000;\n await delay(rand);\n this._files = this._files.map((item) =>\n id !== item.id\n ? item\n : {\n ...item,\n state: FILE_UPLOADER_ITEM_STATE.COMPLETE,\n }\n );\n this.requestUpdate();\n // Shows x icon after 1 second\n await delay(1000);\n this._files = this._files.map((item) =>\n id !== item.id\n ? item\n : {\n ...item,\n state: FILE_UPLOADER_ITEM_STATE.EDIT,\n }\n );\n this.requestUpdate();\n }\n }\n\n /**\n * The file types the file input should accept, separated by space.\n */\n @property()\n accept = '';\n\n /**\n * `true` if the drop container should be disabled.\n */\n @property({ type: Boolean, reflect: true })\n button = false;\n\n /**\n * Button kind.\n */\n @property({ attribute: 'button-kind' })\n buttonKind = 'primary';\n\n /**\n * Button label.\n */\n @property({ attribute: 'button-label' })\n buttonLabel = 'Add file';\n\n /**\n * `true` if the drop container should be disabled.\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Icon description.\n */\n @property({ attribute: 'icon-description' })\n iconDescription = '';\n\n /**\n * The input name.\n */\n @property({ attribute: 'input-name' })\n inputName = '';\n\n /**\n * The label description text.\n */\n @property({ attribute: 'label-description' })\n labelDescription = '';\n\n /**\n * The label title.\n */\n @property({ attribute: 'label-title' })\n labelTitle = '';\n\n /**\n * `true` if the drop container should accept more than one files at once.\n * Note that even with `false` set here, user _can_ select multiple files one by one.\n */\n @property({ type: Boolean, reflect: true })\n multiple = false;\n\n /**\n * The size of the button item.\n */\n @property({ reflect: true })\n size = BUTTON_SIZE.MEDIUM;\n\n /**\n * The state of this file uploader item.\n */\n @property({ reflect: true, attribute: 'input-state' })\n inputState = '';\n\n render() {\n const {\n accept,\n button,\n buttonKind,\n buttonLabel,\n disabled,\n labelDescription,\n labelTitle,\n multiple,\n size,\n inputState,\n iconDescription,\n _files: files,\n _handleChange: handleChange,\n _handleDelete: handleDelete,\n } = this;\n return html`\n <cds-file-uploader\n label-description=\"${ifDefined(labelDescription)}\"\n label-title=\"${ifDefined(labelTitle)}\"\n ?disabled=\"${disabled}\">\n ${!button\n ? html` <cds-file-uploader-drop-container\n accept=\"${ifDefined(accept)}\"\n ?multiple=\"${multiple}\"\n name=\"${ifDefined(this.inputName)}\"\n @cds-file-uploader-drop-container-changed=\"${handleChange}\">\n Drag and drop files here or click to upload\n </cds-file-uploader-drop-container>`\n : html` <cds-file-uploader-button\n size=\"${ifDefined(size)}\"\n button-kind=\"${buttonKind}\"\n accept=\"${ifDefined(accept)}\"\n name=\"${ifDefined(this.inputName)}\"\n ?multiple=\"${multiple}\"\n @cds-file-uploader-button-changed=\"${handleChange}\">\n ${buttonLabel}\n </cds-file-uploader-button>`}\n ${files.map(\n ({ id, invalid, file, state, errorSubject, errorBody }) => html`\n <cds-file-uploader-item\n data-file-id=\"${id}\"\n ?invalid=\"${invalid}\"\n state=\"${inputState || ifDefined(state)}\"\n icon-description=\"${ifDefined(iconDescription)}\"\n error-subject=\"${ifDefined(errorSubject)}\"\n error-body=\"${ifDefined(errorBody)}\"\n @cds-file-uploader-item-deleted=\"${handleDelete}\">\n ${file.name}\n </cds-file-uploader-item>\n `\n )}\n </cds-file-uploader>\n `;\n }\n}\n"]}