@refinitiv-ui/elements 7.0.0-next.0 → 7.0.0-next.1

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 (385) hide show
  1. package/CHANGELOG.md +115 -0
  2. package/cli.mjs +21 -0
  3. package/lib/accordion/index.js +1 -10
  4. package/lib/appstate-bar/custom-elements.json +2 -2
  5. package/lib/appstate-bar/custom-elements.md +4 -4
  6. package/lib/appstate-bar/index.d.ts +2 -2
  7. package/lib/appstate-bar/index.js +2 -8
  8. package/lib/appstate-bar/themes/halo/dark/index.js +1 -1
  9. package/lib/appstate-bar/themes/halo/light/index.js +1 -1
  10. package/lib/appstate-bar/themes/solar/charcoal/index.js +1 -1
  11. package/lib/appstate-bar/themes/solar/pearl/index.js +1 -1
  12. package/lib/autosuggest/custom-elements.json +8 -8
  13. package/lib/autosuggest/custom-elements.md +8 -8
  14. package/lib/autosuggest/helpers/types.d.ts +18 -18
  15. package/lib/autosuggest/index.d.ts +9 -32
  16. package/lib/autosuggest/index.js +112 -187
  17. package/lib/autosuggest/themes/halo/dark/index.js +1 -1
  18. package/lib/autosuggest/themes/halo/light/index.js +1 -1
  19. package/lib/autosuggest/themes/solar/charcoal/index.js +1 -1
  20. package/lib/autosuggest/themes/solar/pearl/index.js +1 -1
  21. package/lib/button/custom-elements.json +1 -1
  22. package/lib/button/custom-elements.md +1 -1
  23. package/lib/button/index.d.ts +1 -1
  24. package/lib/button/index.js +1 -1
  25. package/lib/button/themes/halo/dark/index.js +2 -1
  26. package/lib/button/themes/halo/light/index.js +2 -1
  27. package/lib/button/themes/solar/charcoal/index.js +2 -1
  28. package/lib/button/themes/solar/pearl/index.js +2 -1
  29. package/lib/button-bar/index.js +0 -5
  30. package/lib/calendar/custom-elements.json +2 -2
  31. package/lib/calendar/custom-elements.md +4 -4
  32. package/lib/calendar/index.d.ts +9 -2
  33. package/lib/calendar/index.js +27 -29
  34. package/lib/calendar/themes/halo/dark/index.js +1 -1
  35. package/lib/calendar/themes/halo/light/index.js +1 -1
  36. package/lib/calendar/themes/solar/charcoal/index.js +1 -1
  37. package/lib/calendar/themes/solar/pearl/index.js +1 -1
  38. package/lib/calendar/types.d.ts +5 -5
  39. package/lib/calendar/utils.d.ts +2 -13
  40. package/lib/calendar/utils.js +2 -20
  41. package/lib/canvas/custom-elements.json +1 -1
  42. package/lib/canvas/custom-elements.md +1 -1
  43. package/lib/canvas/index.d.ts +1 -1
  44. package/lib/canvas/index.js +10 -9
  45. package/lib/card/custom-elements.json +1 -1
  46. package/lib/card/custom-elements.md +3 -3
  47. package/lib/card/helpers/types.d.ts +1 -1
  48. package/lib/card/index.d.ts +2 -1
  49. package/lib/card/index.js +5 -4
  50. package/lib/card/themes/halo/dark/index.js +1 -1
  51. package/lib/card/themes/halo/light/index.js +1 -1
  52. package/lib/card/themes/solar/charcoal/index.js +1 -1
  53. package/lib/card/themes/solar/pearl/index.js +1 -1
  54. package/lib/chart/bare.d.ts +1 -0
  55. package/lib/chart/bare.js +1 -0
  56. package/lib/chart/custom-elements.json +10 -5
  57. package/lib/chart/custom-elements.md +9 -8
  58. package/lib/chart/elements/chart.d.ts +182 -0
  59. package/lib/chart/elements/chart.js +509 -0
  60. package/lib/chart/helpers/index.d.ts +1 -1
  61. package/lib/chart/helpers/index.js +1 -1
  62. package/lib/chart/helpers/merge.d.ts +3 -3
  63. package/lib/chart/helpers/merge.js +1 -1
  64. package/lib/chart/helpers/types.d.ts +1 -66
  65. package/lib/chart/index.d.ts +1 -192
  66. package/lib/chart/index.js +5 -485
  67. package/lib/chart/plugins/doughnut-center-label.d.ts +22 -3
  68. package/lib/chart/plugins/doughnut-center-label.js +62 -51
  69. package/lib/chart/plugins/index.d.ts +1 -0
  70. package/lib/chart/plugins/index.js +1 -0
  71. package/lib/chart/themes/halo/dark/index.js +1 -1
  72. package/lib/chart/themes/halo/light/index.js +1 -1
  73. package/lib/chart/themes/solar/charcoal/index.js +1 -1
  74. package/lib/chart/themes/solar/pearl/index.js +1 -1
  75. package/lib/checkbox/custom-elements.json +1 -1
  76. package/lib/checkbox/custom-elements.md +3 -3
  77. package/lib/checkbox/index.d.ts +1 -1
  78. package/lib/checkbox/index.js +1 -2
  79. package/lib/checkbox/themes/halo/dark/index.js +1 -1
  80. package/lib/checkbox/themes/halo/light/index.js +1 -1
  81. package/lib/checkbox/themes/solar/charcoal/index.js +1 -1
  82. package/lib/checkbox/themes/solar/pearl/index.js +1 -1
  83. package/lib/clock/custom-elements.json +2 -2
  84. package/lib/clock/custom-elements.md +2 -2
  85. package/lib/clock/index.d.ts +2 -2
  86. package/lib/clock/index.js +2 -6
  87. package/lib/clock/utils/TickManager.d.ts +1 -1
  88. package/lib/collapse/custom-elements.json +1 -1
  89. package/lib/collapse/custom-elements.md +3 -3
  90. package/lib/collapse/index.d.ts +7 -1
  91. package/lib/collapse/index.js +27 -30
  92. package/lib/collapse/themes/halo/dark/index.js +1 -1
  93. package/lib/collapse/themes/halo/light/index.js +1 -1
  94. package/lib/collapse/themes/solar/charcoal/index.js +1 -1
  95. package/lib/collapse/themes/solar/pearl/index.js +1 -1
  96. package/lib/color-dialog/custom-elements.json +2 -2
  97. package/lib/color-dialog/custom-elements.md +4 -4
  98. package/lib/color-dialog/helpers/value-model.js +4 -5
  99. package/lib/color-dialog/index.d.ts +4 -4
  100. package/lib/color-dialog/index.js +4 -4
  101. package/lib/color-picker/custom-elements.json +1 -1
  102. package/lib/color-picker/custom-elements.md +3 -3
  103. package/lib/color-picker/index.d.ts +1 -1
  104. package/lib/color-picker/index.js +3 -5
  105. package/lib/combo-box/custom-elements.json +3 -6
  106. package/lib/combo-box/custom-elements.md +5 -6
  107. package/lib/combo-box/helpers/types.d.ts +2 -2
  108. package/lib/combo-box/index.d.ts +3 -12
  109. package/lib/combo-box/index.js +15 -30
  110. package/lib/combo-box/themes/halo/dark/index.js +2 -1
  111. package/lib/combo-box/themes/halo/light/index.js +2 -1
  112. package/lib/combo-box/themes/solar/charcoal/index.js +2 -1
  113. package/lib/combo-box/themes/solar/pearl/index.js +2 -1
  114. package/lib/counter/themes/halo/dark/index.js +2 -1
  115. package/lib/counter/themes/halo/light/index.js +2 -1
  116. package/lib/counter/themes/solar/charcoal/index.js +2 -1
  117. package/lib/counter/themes/solar/pearl/index.js +2 -1
  118. package/lib/datetime-field/index.d.ts +2 -2
  119. package/lib/datetime-field/index.js +7 -12
  120. package/lib/datetime-field/types.d.ts +3 -3
  121. package/lib/datetime-field/utils.d.ts +2 -2
  122. package/lib/datetime-field/utils.js +2 -2
  123. package/lib/datetime-picker/custom-elements.json +4 -4
  124. package/lib/datetime-picker/custom-elements.md +4 -4
  125. package/lib/datetime-picker/index.d.ts +4 -4
  126. package/lib/datetime-picker/index.js +9 -13
  127. package/lib/datetime-picker/themes/halo/dark/index.js +2 -1
  128. package/lib/datetime-picker/themes/halo/light/index.js +2 -1
  129. package/lib/datetime-picker/themes/solar/charcoal/index.js +2 -1
  130. package/lib/datetime-picker/themes/solar/pearl/index.js +2 -1
  131. package/lib/datetime-picker/types.d.ts +1 -1
  132. package/lib/dialog/custom-elements.json +2 -13
  133. package/lib/dialog/custom-elements.md +4 -5
  134. package/lib/dialog/index.d.ts +11 -43
  135. package/lib/dialog/index.js +21 -80
  136. package/lib/dialog/themes/halo/dark/index.js +1 -1
  137. package/lib/dialog/themes/halo/light/index.js +1 -1
  138. package/lib/dialog/themes/solar/charcoal/index.js +1 -1
  139. package/lib/dialog/themes/solar/pearl/index.js +1 -1
  140. package/lib/email-field/custom-elements.json +3 -3
  141. package/lib/email-field/custom-elements.md +5 -5
  142. package/lib/email-field/index.d.ts +3 -3
  143. package/lib/email-field/index.js +5 -4
  144. package/lib/email-field/themes/halo/dark/index.js +2 -1
  145. package/lib/email-field/themes/halo/light/index.js +2 -1
  146. package/lib/email-field/themes/solar/charcoal/index.js +2 -1
  147. package/lib/email-field/themes/solar/pearl/index.js +2 -1
  148. package/lib/events.d.ts +13 -13
  149. package/lib/flag/custom-elements.json +2 -14
  150. package/lib/flag/custom-elements.md +3 -6
  151. package/lib/flag/index.d.ts +21 -9
  152. package/lib/flag/index.js +43 -24
  153. package/lib/header/themes/halo/dark/index.js +1 -1
  154. package/lib/header/themes/halo/light/index.js +1 -1
  155. package/lib/header/themes/solar/charcoal/index.js +1 -1
  156. package/lib/header/themes/solar/pearl/index.js +1 -1
  157. package/lib/heatmap/helpers/color.js +2 -1
  158. package/lib/heatmap/helpers/text.d.ts +1 -1
  159. package/lib/heatmap/helpers/text.js +1 -1
  160. package/lib/heatmap/helpers/types.d.ts +7 -7
  161. package/lib/heatmap/index.js +156 -140
  162. package/lib/icon/custom-elements.json +0 -13
  163. package/lib/icon/custom-elements.md +0 -1
  164. package/lib/icon/index.d.ts +20 -2
  165. package/lib/icon/index.js +41 -14
  166. package/lib/icon/themes/halo/dark/index.js +1 -1
  167. package/lib/icon/themes/halo/light/index.js +1 -1
  168. package/lib/icon/themes/solar/charcoal/index.js +1 -1
  169. package/lib/icon/themes/solar/pearl/index.js +1 -1
  170. package/lib/interactive-chart/custom-elements.json +1 -1
  171. package/lib/interactive-chart/custom-elements.md +3 -3
  172. package/lib/interactive-chart/helpers/merge.d.ts +2 -2
  173. package/lib/interactive-chart/helpers/types.d.ts +7 -7
  174. package/lib/interactive-chart/index.d.ts +1 -1
  175. package/lib/interactive-chart/index.js +5 -3
  176. package/lib/item/custom-elements.json +4 -4
  177. package/lib/item/custom-elements.md +2 -2
  178. package/lib/item/helpers/types.d.ts +2 -2
  179. package/lib/item/index.d.ts +2 -1
  180. package/lib/item/index.js +2 -1
  181. package/lib/item/themes/halo/dark/index.js +1 -1
  182. package/lib/item/themes/halo/light/index.js +1 -1
  183. package/lib/item/themes/solar/charcoal/index.js +1 -1
  184. package/lib/item/themes/solar/pearl/index.js +1 -1
  185. package/lib/label/index.js +9 -34
  186. package/lib/layout/index.js +0 -13
  187. package/lib/led-gauge/index.js +7 -7
  188. package/lib/list/custom-elements.json +1 -1
  189. package/lib/list/custom-elements.md +3 -3
  190. package/lib/list/elements/list.d.ts +1 -1
  191. package/lib/list/elements/list.js +4 -8
  192. package/lib/list/helpers/renderer.d.ts +0 -4
  193. package/lib/list/helpers/renderer.js +5 -5
  194. package/lib/list/helpers/types.d.ts +1 -1
  195. package/lib/list/themes/halo/dark/index.js +2 -2
  196. package/lib/list/themes/halo/light/index.js +2 -2
  197. package/lib/list/themes/solar/charcoal/index.js +2 -2
  198. package/lib/list/themes/solar/pearl/index.js +2 -2
  199. package/lib/multi-input/custom-elements.json +5 -5
  200. package/lib/multi-input/custom-elements.md +5 -5
  201. package/lib/multi-input/helpers/types.d.ts +3 -3
  202. package/lib/multi-input/index.d.ts +5 -17
  203. package/lib/multi-input/index.js +8 -21
  204. package/lib/multi-input/themes/halo/dark/index.js +1 -1
  205. package/lib/multi-input/themes/halo/light/index.js +1 -1
  206. package/lib/multi-input/themes/solar/charcoal/index.js +1 -1
  207. package/lib/multi-input/themes/solar/pearl/index.js +1 -1
  208. package/lib/notification/custom-elements.json +2 -2
  209. package/lib/notification/custom-elements.md +4 -4
  210. package/lib/notification/elements/notification.d.ts +2 -2
  211. package/lib/notification/elements/notification.js +2 -2
  212. package/lib/notification/helpers/types.d.ts +2 -2
  213. package/lib/number-field/custom-elements.json +2 -2
  214. package/lib/number-field/custom-elements.md +4 -4
  215. package/lib/number-field/index.d.ts +4 -4
  216. package/lib/number-field/index.js +24 -19
  217. package/lib/number-field/themes/halo/dark/index.js +2 -1
  218. package/lib/number-field/themes/halo/light/index.js +2 -1
  219. package/lib/number-field/themes/solar/charcoal/index.js +2 -1
  220. package/lib/number-field/themes/solar/pearl/index.js +2 -1
  221. package/lib/overlay/custom-elements.json +6 -9
  222. package/lib/overlay/custom-elements.md +7 -8
  223. package/lib/overlay/elements/overlay-backdrop.d.ts +1 -8
  224. package/lib/overlay/elements/overlay-backdrop.js +3 -13
  225. package/lib/overlay/elements/overlay-viewport.d.ts +1 -8
  226. package/lib/overlay/elements/overlay-viewport.js +3 -13
  227. package/lib/overlay/elements/overlay.d.ts +7 -15
  228. package/lib/overlay/elements/overlay.js +13 -55
  229. package/lib/overlay/helpers/types.d.ts +13 -13
  230. package/lib/overlay/managers/close-manager.d.ts +1 -1
  231. package/lib/overlay/managers/close-manager.js +6 -4
  232. package/lib/overlay/managers/focus-manager.js +2 -1
  233. package/lib/overlay/managers/interaction-lock-manager.js +1 -1
  234. package/lib/overlay/managers/viewport-manager.js +3 -0
  235. package/lib/overlay/managers/zindex-manager.d.ts +1 -1
  236. package/lib/overlay/managers/zindex-manager.js +1 -1
  237. package/lib/overlay/themes/halo/dark/index.js +1 -1
  238. package/lib/overlay/themes/halo/light/index.js +1 -1
  239. package/lib/overlay/themes/solar/charcoal/index.js +1 -1
  240. package/lib/overlay/themes/solar/pearl/index.js +1 -1
  241. package/lib/overlay-menu/custom-elements.json +2 -2
  242. package/lib/overlay-menu/custom-elements.md +2 -2
  243. package/lib/overlay-menu/helpers/types.d.ts +2 -2
  244. package/lib/overlay-menu/index.d.ts +2 -2
  245. package/lib/overlay-menu/index.js +36 -42
  246. package/lib/overlay-menu/managers/menu-manager.d.ts +0 -1
  247. package/lib/overlay-menu/managers/menu-manager.js +1 -5
  248. package/lib/overlay-menu/themes/halo/dark/index.js +1 -1
  249. package/lib/overlay-menu/themes/halo/light/index.js +1 -1
  250. package/lib/overlay-menu/themes/solar/charcoal/index.js +1 -1
  251. package/lib/overlay-menu/themes/solar/pearl/index.js +1 -1
  252. package/lib/pagination/custom-elements.json +1 -1
  253. package/lib/pagination/custom-elements.md +3 -3
  254. package/lib/pagination/index.d.ts +1 -2
  255. package/lib/pagination/index.js +3 -7
  256. package/lib/pagination/themes/halo/dark/index.js +1 -1
  257. package/lib/pagination/themes/halo/light/index.js +1 -1
  258. package/lib/pagination/themes/solar/charcoal/index.js +1 -1
  259. package/lib/pagination/themes/solar/pearl/index.js +1 -1
  260. package/lib/password-field/custom-elements.json +2 -6
  261. package/lib/password-field/custom-elements.md +4 -5
  262. package/lib/password-field/index.d.ts +2 -3
  263. package/lib/password-field/index.js +2 -3
  264. package/lib/password-field/themes/halo/dark/index.js +2 -1
  265. package/lib/password-field/themes/halo/light/index.js +2 -1
  266. package/lib/password-field/themes/solar/charcoal/index.js +2 -1
  267. package/lib/password-field/themes/solar/pearl/index.js +2 -1
  268. package/lib/pill/custom-elements.json +1 -1
  269. package/lib/pill/custom-elements.md +3 -3
  270. package/lib/pill/index.d.ts +1 -1
  271. package/lib/pill/index.js +2 -2
  272. package/lib/pill/themes/halo/dark/index.js +2 -1
  273. package/lib/pill/themes/halo/light/index.js +2 -1
  274. package/lib/pill/themes/solar/charcoal/index.js +2 -1
  275. package/lib/pill/themes/solar/pearl/index.js +2 -1
  276. package/lib/radio-button/custom-elements.json +1 -1
  277. package/lib/radio-button/custom-elements.md +3 -3
  278. package/lib/radio-button/index.d.ts +1 -1
  279. package/lib/radio-button/index.js +1 -6
  280. package/lib/radio-button/themes/halo/dark/index.js +1 -1
  281. package/lib/radio-button/themes/halo/light/index.js +1 -1
  282. package/lib/radio-button/themes/solar/charcoal/index.js +1 -1
  283. package/lib/radio-button/themes/solar/pearl/index.js +1 -1
  284. package/lib/rating/custom-elements.json +1 -1
  285. package/lib/rating/custom-elements.md +3 -3
  286. package/lib/rating/index.d.ts +1 -1
  287. package/lib/rating/index.js +1 -5
  288. package/lib/search-field/custom-elements.json +3 -3
  289. package/lib/search-field/custom-elements.md +5 -5
  290. package/lib/search-field/index.d.ts +3 -3
  291. package/lib/search-field/index.js +6 -7
  292. package/lib/search-field/themes/halo/dark/index.js +2 -1
  293. package/lib/search-field/themes/halo/light/index.js +2 -1
  294. package/lib/search-field/themes/solar/charcoal/index.js +2 -1
  295. package/lib/search-field/themes/solar/pearl/index.js +2 -1
  296. package/lib/select/custom-elements.json +2 -2
  297. package/lib/select/custom-elements.md +4 -4
  298. package/lib/select/helpers/types.d.ts +2 -2
  299. package/lib/select/index.d.ts +2 -2
  300. package/lib/select/index.js +15 -20
  301. package/lib/select/themes/halo/dark/index.js +2 -1
  302. package/lib/select/themes/halo/light/index.js +2 -1
  303. package/lib/select/themes/solar/charcoal/index.js +2 -1
  304. package/lib/select/themes/solar/pearl/index.js +2 -1
  305. package/lib/sidebar-layout/index.js +2 -3
  306. package/lib/sidebar-layout/themes/halo/dark/index.js +1 -1
  307. package/lib/sidebar-layout/themes/halo/light/index.js +1 -1
  308. package/lib/sidebar-layout/themes/solar/charcoal/index.js +1 -1
  309. package/lib/sidebar-layout/themes/solar/pearl/index.js +1 -1
  310. package/lib/slider/custom-elements.json +3 -3
  311. package/lib/slider/custom-elements.md +5 -5
  312. package/lib/slider/index.d.ts +3 -3
  313. package/lib/slider/index.js +117 -111
  314. package/lib/swing-gauge/types.d.ts +1 -1
  315. package/lib/tab/custom-elements.json +1 -1
  316. package/lib/tab/custom-elements.md +3 -3
  317. package/lib/tab/index.d.ts +1 -1
  318. package/lib/tab/index.js +1 -1
  319. package/lib/tab/themes/halo/dark/index.js +1 -1
  320. package/lib/tab/themes/halo/light/index.js +1 -1
  321. package/lib/tab/themes/solar/charcoal/index.js +1 -1
  322. package/lib/tab/themes/solar/pearl/index.js +1 -1
  323. package/lib/tab-bar/custom-elements.json +1 -1
  324. package/lib/tab-bar/custom-elements.md +3 -3
  325. package/lib/tab-bar/index.d.ts +1 -1
  326. package/lib/tab-bar/index.js +1 -5
  327. package/lib/tab-bar/themes/halo/dark/index.js +1 -1
  328. package/lib/tab-bar/themes/halo/light/index.js +1 -1
  329. package/lib/text-field/custom-elements.json +3 -3
  330. package/lib/text-field/custom-elements.md +5 -5
  331. package/lib/text-field/index.d.ts +4 -10
  332. package/lib/text-field/index.js +11 -26
  333. package/lib/text-field/themes/halo/dark/index.js +2 -1
  334. package/lib/text-field/themes/halo/light/index.js +2 -1
  335. package/lib/text-field/themes/solar/charcoal/index.js +2 -1
  336. package/lib/text-field/themes/solar/pearl/index.js +2 -1
  337. package/lib/time-picker/custom-elements.json +1 -1
  338. package/lib/time-picker/custom-elements.md +3 -3
  339. package/lib/time-picker/index.d.ts +1 -1
  340. package/lib/time-picker/index.js +19 -20
  341. package/lib/time-picker/themes/halo/dark/index.js +2 -1
  342. package/lib/time-picker/themes/halo/light/index.js +2 -1
  343. package/lib/time-picker/themes/solar/charcoal/index.js +2 -1
  344. package/lib/time-picker/themes/solar/pearl/index.js +2 -1
  345. package/lib/toggle/custom-elements.json +1 -1
  346. package/lib/toggle/custom-elements.md +3 -3
  347. package/lib/toggle/index.d.ts +1 -1
  348. package/lib/toggle/index.js +2 -5
  349. package/lib/toggle/themes/halo/dark/index.js +1 -1
  350. package/lib/toggle/themes/halo/light/index.js +1 -1
  351. package/lib/toggle/themes/solar/charcoal/index.js +1 -1
  352. package/lib/toggle/themes/solar/pearl/index.js +1 -1
  353. package/lib/tooltip/elements/tooltip-element.js +1 -1
  354. package/lib/tooltip/helpers/types.d.ts +10 -10
  355. package/lib/tooltip/index.js +5 -4
  356. package/lib/tooltip/managers/tooltip-manager.js +2 -5
  357. package/lib/tornado-chart/elements/tornado-item.js +8 -9
  358. package/lib/tornado-chart/themes/halo/dark/index.js +2 -2
  359. package/lib/tornado-chart/themes/halo/light/index.js +2 -2
  360. package/lib/tornado-chart/themes/solar/charcoal/index.js +1 -1
  361. package/lib/tornado-chart/themes/solar/pearl/index.js +1 -1
  362. package/lib/tree/custom-elements.json +2 -2
  363. package/lib/tree/custom-elements.md +2 -2
  364. package/lib/tree/elements/tree.d.ts +2 -2
  365. package/lib/tree/elements/tree.js +2 -4
  366. package/lib/tree/helpers/renderer.d.ts +0 -4
  367. package/lib/tree/helpers/renderer.js +5 -5
  368. package/lib/tree/helpers/types.d.ts +2 -2
  369. package/lib/tree/themes/halo/dark/index.js +2 -2
  370. package/lib/tree/themes/halo/light/index.js +2 -2
  371. package/lib/tree/themes/solar/charcoal/index.js +2 -2
  372. package/lib/tree/themes/solar/pearl/index.js +2 -2
  373. package/lib/tree-select/custom-elements.json +7 -7
  374. package/lib/tree-select/custom-elements.md +7 -7
  375. package/lib/tree-select/helpers/types.d.ts +2 -2
  376. package/lib/tree-select/index.d.ts +5 -6
  377. package/lib/tree-select/index.js +23 -23
  378. package/lib/tree-select/themes/halo/dark/index.js +2 -1
  379. package/lib/tree-select/themes/halo/light/index.js +2 -1
  380. package/lib/tree-select/themes/solar/charcoal/index.js +2 -1
  381. package/lib/tree-select/themes/solar/pearl/index.js +2 -1
  382. package/lib/version.js +1 -1
  383. package/package.json +32 -30
  384. package/lib/chart/helpers/legend.d.ts +0 -5
  385. package/lib/chart/helpers/legend.js +0 -78
@@ -1,3 +1,22 @@
1
- /// <reference types="chart.js" />
2
- declare const plugins: Chart.PluginServiceRegistrationOptions;
3
- export default plugins;
1
+ import { Chart as ChartJS } from 'chart.js';
2
+ import type { Plugin, ChartType, ActiveElement } from 'chart.js';
3
+ interface CenterLabel {
4
+ label: string;
5
+ bold?: boolean;
6
+ }
7
+ interface Selected {
8
+ datasetIndex?: number;
9
+ index: number;
10
+ }
11
+ interface CenterLabelConfig {
12
+ defaultText: CenterLabel[];
13
+ selected: Selected;
14
+ onRenderLabel(chart: ChartJS, chartItems: ActiveElement[]): CenterLabel[];
15
+ }
16
+ declare module 'chart.js' {
17
+ interface PluginOptionsByType<TType extends ChartType> {
18
+ 'centerLabel'?: CenterLabelConfig;
19
+ }
20
+ }
21
+ declare const plugins: Plugin;
22
+ export { plugins as doughnutCenterLabelPlugin };
@@ -1,4 +1,6 @@
1
- const CHART = window.Chart;
1
+ import { Chart as ChartJS } from 'chart.js';
2
+ // eslint-disable-next-line import/extensions
3
+ import { getHoverColor } from 'chart.js/helpers';
2
4
  const getPluginConfig = (chart) => {
3
5
  return chart.config.options?.plugins?.centerLabel;
4
6
  };
@@ -8,63 +10,72 @@ const getPluginConfig = (chart) => {
8
10
  * @param {MetaData[]} active active data
9
11
  * @returns {void}
10
12
  */
13
+ // Note: use logic from chart.js - chart.js/src/elements/element.arc.js :draw()
11
14
  const drawItemBorder = function (chart, active) {
12
15
  if (!chart.data.datasets) {
13
16
  return;
14
17
  }
15
- if (active?.length) {
16
- const ctx = chart.ctx;
17
- const chartItem = active[0];
18
- const vm = chartItem._view;
19
- const datasets = chart.data.datasets[chartItem._datasetIndex];
20
- vm.backgroundColor = datasets.backgroundColor[chartItem._index];
21
- vm.backgroundColor = CHART.helpers.getHoverColor(vm.backgroundColor); // we need to make color bolder
22
- vm.borderWidth = (datasets.borderWidth || chart.config.options?.elements?.arc?.borderWidth);
23
- vm.borderColor = (getComputedStyle(chart.canvas).getPropertyValue('--doughnut-border-color') || CHART.defaults.global.defaultFontColor);
24
- const sA = vm.startAngle;
25
- const eA = vm.endAngle;
26
- if (ctx) {
27
- ctx.beginPath();
28
- ctx.arc(vm.x, vm.y, vm.outerRadius, sA, eA);
29
- ctx.arc(vm.x, vm.y, vm.innerRadius, eA, sA, true);
30
- ctx.closePath();
31
- ctx.strokeStyle = vm.borderColor;
32
- ctx.lineWidth = vm.borderWidth;
33
- ctx.fillStyle = vm.backgroundColor;
34
- ctx.fill();
35
- ctx.lineJoin = 'bevel';
36
- if (vm.borderWidth) {
37
- ctx.stroke();
38
- }
18
+ if (!active?.length) {
19
+ return;
20
+ }
21
+ const ctx = chart.ctx;
22
+ const chartItem = active[0];
23
+ const element = chartItem.element;
24
+ const arcOptions = chartItem.element.options;
25
+ const datasets = chart.data.datasets[chartItem.datasetIndex];
26
+ // Need to make color bolder
27
+ if (Array.isArray(datasets.backgroundColor)) {
28
+ arcOptions.backgroundColor = datasets.backgroundColor[chartItem.index];
29
+ arcOptions.backgroundColor = getHoverColor(arcOptions.backgroundColor);
30
+ }
31
+ arcOptions.borderWidth = arcOptions.borderWidth || (datasets.borderWidth || chart.config.options?.elements?.arc?.borderWidth);
32
+ arcOptions.borderColor = (getComputedStyle(chart.canvas).getPropertyValue('--doughnut-border-color') || ChartJS.defaults.color);
33
+ const sA = element.startAngle;
34
+ const eA = element.endAngle;
35
+ if (ctx) {
36
+ ctx.beginPath();
37
+ ctx.arc(element.x, element.y, element.outerRadius, sA, eA);
38
+ ctx.arc(element.x, element.y, element.innerRadius, eA, sA, true);
39
+ ctx.closePath();
40
+ ctx.strokeStyle = arcOptions.borderColor;
41
+ ctx.lineWidth = arcOptions.borderWidth;
42
+ ctx.fillStyle = arcOptions.backgroundColor;
43
+ ctx.fill();
44
+ ctx.lineJoin = 'bevel';
45
+ if (arcOptions.borderWidth) {
46
+ ctx.stroke();
39
47
  }
40
48
  }
41
49
  };
42
50
  const plugins = {
43
- beforeEvent: function (chart, event) {
51
+ id: 'centerLabel',
52
+ beforeEvent: function (chart, args) {
44
53
  if (!getPluginConfig(chart)) {
45
54
  return;
46
55
  }
47
- switch (event.type) {
56
+ switch (args.event?.type) {
48
57
  case 'click':
49
58
  // chart._select stores a segment that is clicked
50
59
  if (!chart._select) {
51
60
  chart._select = [];
52
61
  }
53
- if (chart.active.length) {
54
- if (chart._select.length && chart._select[0]._datasetIndex === chart.active[0]._datasetIndex
55
- && chart._select[0]._index === chart.active[0]._index) {
62
+ if (chart.getActiveElements().length) {
63
+ if (chart._select.length && chart._select[0].datasetIndex === chart.getActiveElements()[0].datasetIndex
64
+ && chart._select[0].index === chart.getActiveElements()[0].index) {
56
65
  // reset value if user clicked on selected segment
57
66
  chart._select = [];
58
67
  }
59
68
  else {
60
69
  // set segment that user clicked
61
- chart._select = chart.active.slice(0);
70
+ chart._select = chart.getActiveElements().slice(0);
62
71
  }
63
72
  }
64
73
  else {
65
74
  chart._select = [];
66
75
  }
67
- chart.draw();
76
+ // Trigger update to re render the chart
77
+ // Cannot use draw() because the chart doesn't redraw border of unselected datasets
78
+ chart.update();
68
79
  break;
69
80
  default:
70
81
  break;
@@ -80,13 +91,13 @@ const plugins = {
80
91
  if (chart._select) {
81
92
  active = chart._select;
82
93
  }
83
- if (chart.active?.length) {
84
- active = chart.active;
94
+ const activeElements = chart.getActiveElements();
95
+ if (activeElements.length > 0) {
96
+ active = activeElements;
85
97
  }
86
98
  const renderText = config.onRenderLabel(chart, active);
87
99
  // Get Texts
88
- const centerConfig = config;
89
- const texts = renderText || centerConfig.defaultText;
100
+ const texts = renderText || config.defaultText;
90
101
  if (!texts) {
91
102
  return;
92
103
  }
@@ -94,28 +105,29 @@ const plugins = {
94
105
  const ctx = chart.ctx;
95
106
  // Get options from config
96
107
  const canvas = chart.canvas;
97
- const style = window.getComputedStyle(canvas);
98
- const globalConfig = CHART.defaults.global;
99
- const defaultFontStyle = globalConfig.defaultFontFamily;
100
- const defaultColor = style.getPropertyValue('--doughnut-center-text-color') || globalConfig.defaultFontColor;
108
+ const style = getComputedStyle(canvas);
109
+ const globalConfig = ChartJS.defaults;
110
+ const defaultFontStyle = globalConfig.font.family;
111
+ const defaultColor = style.getPropertyValue('--doughnut-center-text-color') || globalConfig.color;
101
112
  const backgroundColor = style.getPropertyValue('--doughnut-center-background-color');
102
113
  const customFontSizePercent = parseInt(style.getPropertyValue('--doughnut-center-font-size'), 10) / 100; // font size in percentage
103
114
  const centerX = (chart.chartArea.left + chart.chartArea.right) / 2;
104
115
  const centerY = (chart.chartArea.top + chart.chartArea.bottom) / 2;
116
+ // Radius of circular hole in the middle of the chart
117
+ const innerRadius = chart.getDatasetMeta(chart.data.datasets.length - 1).data[0].innerRadius;
105
118
  // Render center background color
106
119
  if (backgroundColor) {
107
- ctx.arc(centerX, centerY, chart.innerRadius, 0, 2 * Math.PI);
120
+ ctx.arc(centerX, centerY, innerRadius, 0, 2 * Math.PI);
108
121
  ctx.fillStyle = backgroundColor;
109
122
  ctx.fill();
110
123
  }
111
- const textAreaWidth = chart.innerRadius;
112
124
  // Base font size is 30% and minus 4% per text lines ( if text has multiple lines ) of text area
113
- const baseFontSize = textAreaWidth * (0.3 - (0.04 * (texts.length - 1)));
125
+ const baseFontSize = innerRadius * (0.3 - (0.04 * (texts.length - 1)));
114
126
  // Keep minimum font size equal 5% of text area
115
- const computedFontSize = Math.max(textAreaWidth * 0.05, baseFontSize);
127
+ const computedFontSize = Math.max(innerRadius * 0.05, baseFontSize);
116
128
  // Use font size ratio from user if --doughnut-center-font-size CSS variable is provided
117
- const fontRatio = customFontSizePercent || computedFontSize / textAreaWidth;
118
- const fontSizeToUse = textAreaWidth * fontRatio;
129
+ const fontRatio = customFontSizePercent || computedFontSize / innerRadius;
130
+ const fontSizeToUse = innerRadius * fontRatio;
119
131
  // Set font settings to draw it correctly.
120
132
  ctx.textAlign = 'center';
121
133
  ctx.textBaseline = 'middle';
@@ -125,7 +137,7 @@ const plugins = {
125
137
  const fontSizeHeaderRatio = 1.15;
126
138
  // Move Y position of text up according to text length
127
139
  const offsetY = centerY - (texts.length - 1) * 0.5 * fontLineHeight;
128
- const containerWidth = chart.innerRadius * 2;
140
+ const containerWidth = innerRadius * 2;
129
141
  const circlePadding = containerWidth * (texts.length <= 1 ? 0.4 : 0.5);
130
142
  for (let i = 0; i < texts.length; i++) {
131
143
  let targetFont;
@@ -170,14 +182,13 @@ const plugins = {
170
182
  }
171
183
  // Set selected item to the chart
172
184
  const items = chart.getDatasetMeta(datasetIndex).data[selectedIndex];
173
- chart.selected = items ? [items] : [];
185
+ chart.selected = items ? [{ element: items, datasetIndex, index: selectedIndex }] : [];
174
186
  },
175
187
  afterDatasetsDraw: function (chart) {
176
188
  if (getPluginConfig(chart)) {
177
189
  // Draw active element
178
- // Note: use logic from chart.js - chart.js/src/elements/element.arc.js :draw()
179
190
  // hover
180
- drawItemBorder(chart, chart.active);
191
+ drawItemBorder(chart, chart.getActiveElements());
181
192
  // selected
182
193
  if (chart.selected?.length) {
183
194
  chart._select = chart.selected;
@@ -188,4 +199,4 @@ const plugins = {
188
199
  }
189
200
  }
190
201
  };
191
- export default plugins;
202
+ export { plugins as doughnutCenterLabelPlugin };
@@ -0,0 +1 @@
1
+ export * from './doughnut-center-label.js';
@@ -0,0 +1 @@
1
+ export * from './doughnut-center-label.js';
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/header/themes/halo/dark';
2
2
  import '@refinitiv-ui/elements/layout/themes/halo/dark';
3
3
 
4
- dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-chart', styles: ':host{--grid-line-color:rgba(38, 38, 38, 0.5);--zero-line-color:rgba(38, 38, 38, 0.5);--animation-duration:1000;--line-width:2px;--line-tension:0;--multi-dataset-border-color:#1A1A1A;--tooltip-background-color:rgba(204, 204, 204, 0.9);--tooltip-title-color:#0D0D0D;--tooltip-body-color:#0D0D0D;--tooltip-border-radius:0px;--tooltip-caret-size:7px;--tooltip-padding-x:7px;--tooltip-padding-y:5px;--tooltip-title-spacing:0;--legend-key-box-width:4px;--chart-color-1:#6678FF;--chart-color-2:#FFFFFF;--chart-color-3:#FFC800;--chart-color-4:#9064CD;--chart-color-5:#00D0D4;--chart-color-6:#FF5000;--chart-color-7:#00C389;--chart-color-8:#EA2E6C;font-size:12rem;--tooltip-background-color:#FFFFFF;--tooltip-title-color:#0D0D0D;--tooltip-body-color:#0D0D0D;--tooltip-padding-x:8px;--tooltip-padding-y:4px;--chart-color-1:#6678FF;--chart-color-2:#FFFFFF;--chart-color-3:#FFC800;--chart-color-4:#9064CD;--chart-color-5:#00D0D4;--chart-color-6:#FF5000;--chart-color-7:#00C389;--chart-color-8:#EA2E6C;--chart-color-9:#999999;--chart-color-10:#3BBAFF;--chart-color-11:#198C8C;--chart-color-12:#C36241;--chart-color-13:#CCD2FF;--chart-color-14:#808080;--chart-color-15:#FFDE66;--chart-color-16:#BCA2E1;--chart-color-17:#59DFE1;--chart-color-18:#FF9666;--chart-color-19:#6CEFC8;--chart-color-20:#F281A7;--chart-color-21:#CCCCCC;--chart-color-22:#89D5FF;--chart-color-23:#75BABA;--chart-color-24:#DBA08D;--chart-color-25:#F6ABC4}' }}));
4
+ dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-chart', styles: ':host{font-size:12px;--grid-line-color:rgba(38, 38, 38, 0.5);--zero-line-color:rgba(38, 38, 38, 0.5);--animation-duration:1000;--line-width:2px;--line-tension:0;--multi-dataset-border-color:#1A1A1A;--tooltip-background-color:rgba(204, 204, 204, 0.9);--tooltip-title-color:#0D0D0D;--tooltip-body-color:#0D0D0D;--tooltip-border-radius:0px;--tooltip-caret-size:7px;--tooltip-padding-x:7px;--tooltip-padding-y:5px;--tooltip-title-spacing:0;--legend-key-box-width:4px;--chart-color-1:#6678FF;--chart-color-2:#FFFFFF;--chart-color-3:#FFC800;--chart-color-4:#9064CD;--chart-color-5:#00D0D4;--chart-color-6:#FF5000;--chart-color-7:#00C389;--chart-color-8:#EA2E6C;--tooltip-background-color:#FFFFFF;--tooltip-title-color:#0D0D0D;--tooltip-body-color:#0D0D0D;--tooltip-padding-x:8px;--tooltip-padding-y:4px;--chart-color-1:#6678FF;--chart-color-2:#FFFFFF;--chart-color-3:#FFC800;--chart-color-4:#9064CD;--chart-color-5:#00D0D4;--chart-color-6:#FF5000;--chart-color-7:#00C389;--chart-color-8:#EA2E6C;--chart-color-9:#999999;--chart-color-10:#3BBAFF;--chart-color-11:#198C8C;--chart-color-12:#C36241;--chart-color-13:#CCD2FF;--chart-color-14:#808080;--chart-color-15:#FFDE66;--chart-color-16:#BCA2E1;--chart-color-17:#59DFE1;--chart-color-18:#FF9666;--chart-color-19:#6CEFC8;--chart-color-20:#F281A7;--chart-color-21:#CCCCCC;--chart-color-22:#89D5FF;--chart-color-23:#75BABA;--chart-color-24:#DBA08D;--chart-color-25:#F6ABC4}' }}));
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/header/themes/halo/light';
2
2
  import '@refinitiv-ui/elements/layout/themes/halo/light';
3
3
 
4
- dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-chart', styles: ':host{--grid-line-color:rgba(242, 242, 242, 0.5);--zero-line-color:rgba(242, 242, 242, 0.5);--animation-duration:1000;--line-width:2px;--line-tension:0;--multi-dataset-border-color:#FAFAFA;--tooltip-background-color:rgba(13, 13, 13, 0.9);--tooltip-title-color:#FFFFFF;--tooltip-body-color:#FFFFFF;--tooltip-border-radius:0px;--tooltip-caret-size:7px;--tooltip-padding-x:7px;--tooltip-padding-y:5px;--tooltip-title-spacing:0;--legend-key-box-width:4px;--chart-color-1:#334BFF;--chart-color-2:#000000;--chart-color-3:#7F6400;--chart-color-4:#71549F;--chart-color-5:#007678;--chart-color-6:#CC4000;--chart-color-7:#007653;--chart-color-8:#D22962;font-size:12rem;--tooltip-background-color:#FFF4CC;--tooltip-title-color:#0D0D0D;--tooltip-body-color:#0D0D0D;--tooltip-padding-x:8px;--tooltip-padding-y:4px;--chart-color-1:#334BFF;--chart-color-2:#000000;--chart-color-3:#7F6400;--chart-color-4:#71549F;--chart-color-5:#007678;--chart-color-6:#CC4000;--chart-color-7:#007653;--chart-color-8:#D22962;--chart-color-9:#595959;--chart-color-10:#236F99;--chart-color-11:#147070;--chart-color-12:#AF583A;--chart-color-13:#0F1E8A;--chart-color-14:#737373;--chart-color-15:#4C3C00;--chart-color-16:#563F77;--chart-color-17:#004E4F;--chart-color-18:#993000;--chart-color-19:#00432F;--chart-color-20:#A3204C;--chart-color-21:#404040;--chart-color-22:#174A66;--chart-color-23:#116262;--chart-color-24:#88442D;--chart-color-25:#5D122B}' }}));
4
+ dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-chart', styles: ':host{font-size:12px;--grid-line-color:rgba(242, 242, 242, 0.5);--zero-line-color:rgba(242, 242, 242, 0.5);--animation-duration:1000;--line-width:2px;--line-tension:0;--multi-dataset-border-color:#FAFAFA;--tooltip-background-color:rgba(13, 13, 13, 0.9);--tooltip-title-color:#FFFFFF;--tooltip-body-color:#FFFFFF;--tooltip-border-radius:0px;--tooltip-caret-size:7px;--tooltip-padding-x:7px;--tooltip-padding-y:5px;--tooltip-title-spacing:0;--legend-key-box-width:4px;--chart-color-1:#334BFF;--chart-color-2:#000000;--chart-color-3:#7F6400;--chart-color-4:#71549F;--chart-color-5:#007678;--chart-color-6:#CC4000;--chart-color-7:#007653;--chart-color-8:#D22962;--tooltip-background-color:#FFF4CC;--tooltip-title-color:#0D0D0D;--tooltip-body-color:#0D0D0D;--tooltip-padding-x:8px;--tooltip-padding-y:4px;--chart-color-1:#334BFF;--chart-color-2:#000000;--chart-color-3:#7F6400;--chart-color-4:#71549F;--chart-color-5:#007678;--chart-color-6:#CC4000;--chart-color-7:#007653;--chart-color-8:#D22962;--chart-color-9:#595959;--chart-color-10:#236F99;--chart-color-11:#147070;--chart-color-12:#AF583A;--chart-color-13:#0F1E8A;--chart-color-14:#737373;--chart-color-15:#4C3C00;--chart-color-16:#563F77;--chart-color-17:#004E4F;--chart-color-18:#993000;--chart-color-19:#00432F;--chart-color-20:#A3204C;--chart-color-21:#404040;--chart-color-22:#174A66;--chart-color-23:#116262;--chart-color-24:#88442D;--chart-color-25:#5D122B}' }}));
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/header/themes/solar/charcoal';
2
2
  import '@refinitiv-ui/elements/layout/themes/solar/charcoal';
3
3
 
4
- dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-chart', styles: ':host{--grid-line-color:rgba(10, 10, 10, 0.5);--zero-line-color:rgba(10, 10, 10, 0.5);--animation-duration:1000;--line-width:2px;--line-tension:0;--multi-dataset-border-color:#1A1A1C;--tooltip-background-color:rgba(194, 194, 194, 0.9);--tooltip-title-color:#151516;--tooltip-body-color:#151516;--tooltip-border-radius:0px;--tooltip-caret-size:7px;--tooltip-padding-x:7px;--tooltip-padding-y:5px;--tooltip-title-spacing:0;--legend-key-box-width:4px;--chart-color-1:#FF9933;--chart-color-2:#B10CF2;--chart-color-3:#7DE442;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#FFE433;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;font-size:12rem;color:rgba(194,194,194,.8);--legend-key-box-width:12;--grid-line-color:rgba(194, 194, 194, 0.1);--zero-line-color:rgba(194, 194, 194, 0.1);--animation-duration:500;--tooltip-background-color:rgba(74, 74, 82, 0.9);--tooltip-title-color:#C2C2C2;--tooltip-body-color:#C2C2C2;--tooltip-caret-size:8px;--tooltip-padding-x:8px;--tooltip-padding-y:8px;--doughnut-center-text-color:#C2C2C2;--doughnut-border-color:#ffffff;--chart-color-1:#FF9933;--chart-color-2:#B10CF2;--chart-color-3:#7DE442;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#FFE433;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--chart-color-11:#48CBF7;--chart-color-12:#F3478E;--chart-color-13:#508BF7;--chart-color-14:#EFF748;--chart-color-15:#FF4043;--chart-color-16:#A7DB0B;--chart-color-17:#C2C2C2;--chart-color-18:#1578AD;--chart-color-19:#F2B530;--chart-color-20:#297835;--chart-color-21:#7045FF;--chart-color-22:#DD48F7;--chart-color-23:#09A8C0;--chart-color-24:#60E65C;--chart-color-25:#2960A3}' }}));
4
+ dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-chart', styles: ':host{font-size:14px;--grid-line-color:rgba(10, 10, 10, 0.5);--zero-line-color:rgba(10, 10, 10, 0.5);--animation-duration:1000;--line-width:2px;--line-tension:0;--multi-dataset-border-color:#1A1A1C;--tooltip-background-color:rgba(194, 194, 194, 0.9);--tooltip-title-color:#151516;--tooltip-body-color:#151516;--tooltip-border-radius:0px;--tooltip-caret-size:7px;--tooltip-padding-x:7px;--tooltip-padding-y:5px;--tooltip-title-spacing:0;--legend-key-box-width:4px;--chart-color-1:#FF9933;--chart-color-2:#B10CF2;--chart-color-3:#7DE442;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#FFE433;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;color:rgba(194,194,194,.8);--legend-key-box-width:12;--grid-line-color:rgba(194, 194, 194, 0.1);--zero-line-color:rgba(194, 194, 194, 0.1);--animation-duration:500;--tooltip-background-color:rgba(74, 74, 82, 0.9);--tooltip-title-color:#C2C2C2;--tooltip-body-color:#C2C2C2;--tooltip-caret-size:8px;--tooltip-padding-x:8px;--tooltip-padding-y:8px;--doughnut-center-text-color:#C2C2C2;--doughnut-border-color:#ffffff;--chart-color-1:#FF9933;--chart-color-2:#B10CF2;--chart-color-3:#7DE442;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#FFE433;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--chart-color-11:#48CBF7;--chart-color-12:#F3478E;--chart-color-13:#508BF7;--chart-color-14:#EFF748;--chart-color-15:#FF4043;--chart-color-16:#A7DB0B;--chart-color-17:#C2C2C2;--chart-color-18:#1578AD;--chart-color-19:#F2B530;--chart-color-20:#297835;--chart-color-21:#7045FF;--chart-color-22:#DD48F7;--chart-color-23:#09A8C0;--chart-color-24:#60E65C;--chart-color-25:#2960A3}' }}));
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/header/themes/solar/pearl';
2
2
  import '@refinitiv-ui/elements/layout/themes/solar/pearl';
3
3
 
4
- dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-chart', styles: ':host{--grid-line-color:rgba(213, 216, 219, 0.5);--zero-line-color:rgba(213, 216, 219, 0.5);--animation-duration:1000;--line-width:2px;--line-tension:0;--multi-dataset-border-color:#FFFFFF;--tooltip-background-color:rgba(72, 72, 72, 0.9);--tooltip-title-color:#C2C2C2;--tooltip-body-color:#C2C2C2;--tooltip-border-radius:0px;--tooltip-caret-size:7px;--tooltip-padding-x:7px;--tooltip-padding-y:5px;--tooltip-title-spacing:0;--legend-key-box-width:4px;--chart-color-1:#EE7600;--chart-color-2:#B10CF2;--chart-color-3:#309054;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#D9B500;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;font-size:12rem;color:rgba(72,72,72,.8);--legend-key-box-width:12;--grid-line-color:rgba(72, 72, 72, 0.1);--zero-line-color:rgba(72, 72, 72, 0.1);--animation-duration:500;--tooltip-background-color:rgba(190, 195, 204, 0.9);--tooltip-title-color:#484848;--tooltip-body-color:#484848;--tooltip-caret-size:8px;--tooltip-padding-x:8px;--tooltip-padding-y:8px;--doughnut-center-text-color:#484848;--doughnut-border-color:#000000;--chart-color-1:#EE7600;--chart-color-2:#B10CF2;--chart-color-3:#309054;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#D9B500;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--chart-color-11:#40B6DE;--chart-color-12:#F3478E;--chart-color-13:#508BF7;--chart-color-14:#AAB218;--chart-color-15:#FF4043;--chart-color-16:#80A808;--chart-color-17:#707070;--chart-color-18:#1578AC;--chart-color-19:#D9A22B;--chart-color-20:#297835;--chart-color-21:#7045FF;--chart-color-22:#DD48F7;--chart-color-23:#09A8C0;--chart-color-24:#4BB347;--chart-color-25:#2960A3}' }}));
4
+ dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-chart', styles: ':host{font-size:14px;--grid-line-color:rgba(213, 216, 219, 0.5);--zero-line-color:rgba(213, 216, 219, 0.5);--animation-duration:1000;--line-width:2px;--line-tension:0;--multi-dataset-border-color:#FFFFFF;--tooltip-background-color:rgba(72, 72, 72, 0.9);--tooltip-title-color:#C2C2C2;--tooltip-body-color:#C2C2C2;--tooltip-border-radius:0px;--tooltip-caret-size:7px;--tooltip-padding-x:7px;--tooltip-padding-y:5px;--tooltip-title-spacing:0;--legend-key-box-width:4px;--chart-color-1:#EE7600;--chart-color-2:#B10CF2;--chart-color-3:#309054;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#D9B500;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;color:rgba(72,72,72,.8);--legend-key-box-width:12;--grid-line-color:rgba(72, 72, 72, 0.1);--zero-line-color:rgba(72, 72, 72, 0.1);--animation-duration:500;--tooltip-background-color:rgba(190, 195, 204, 0.9);--tooltip-title-color:#484848;--tooltip-body-color:#484848;--tooltip-caret-size:8px;--tooltip-padding-x:8px;--tooltip-padding-y:8px;--doughnut-center-text-color:#484848;--doughnut-border-color:#000000;--chart-color-1:#EE7600;--chart-color-2:#B10CF2;--chart-color-3:#309054;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#D9B500;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--chart-color-11:#40B6DE;--chart-color-12:#F3478E;--chart-color-13:#508BF7;--chart-color-14:#AAB218;--chart-color-15:#FF4043;--chart-color-16:#80A808;--chart-color-17:#707070;--chart-color-18:#1578AC;--chart-color-19:#D9A22B;--chart-color-20:#297835;--chart-color-21:#7045FF;--chart-color-22:#DD48F7;--chart-color-23:#09A8C0;--chart-color-24:#4BB347;--chart-color-25:#2960A3}' }}));
@@ -63,7 +63,7 @@
63
63
  "events": [
64
64
  {
65
65
  "name": "checked-changed",
66
- "description": "Fired when the `checked` property changes."
66
+ "description": "Fired when the user checks or unchecks the checkbox. The event is not fired if the `checked` property is changed programmatically."
67
67
  }
68
68
  ]
69
69
  }
@@ -13,6 +13,6 @@ Form control for selecting one or several options
13
13
 
14
14
  ## Events
15
15
 
16
- | Event | Description |
17
- |-------------------|--------------------------------------------|
18
- | `checked-changed` | Fired when the `checked` property changes. |
16
+ | Event | Description |
17
+ |-------------------|--------------------------------------------------|
18
+ | `checked-changed` | Fired when the user checks or unchecks the checkbox. The event is not fired if the `checked` property is changed programmatically. |
@@ -3,7 +3,7 @@ import { ControlElement, TemplateResult, CSSResultGroup, PropertyValues } from '
3
3
  import '../icon/index.js';
4
4
  /**
5
5
  * Form control for selecting one or several options
6
- * @fires checked-changed - Fired when the `checked` property changes.
6
+ * @fires checked-changed - Fired when the user checks or unchecks the checkbox. The event is not fired if the `checked` property is changed programmatically.
7
7
  *
8
8
  * @attr {boolean} readonly - Set readonly state
9
9
  * @prop {boolean} [readonly=false] - Set readonly state
@@ -8,7 +8,7 @@ import { registerOverflowTooltip } from '../tooltip/index.js';
8
8
  import '../icon/index.js';
9
9
  /**
10
10
  * Form control for selecting one or several options
11
- * @fires checked-changed - Fired when the `checked` property changes.
11
+ * @fires checked-changed - Fired when the user checks or unchecks the checkbox. The event is not fired if the `checked` property is changed programmatically.
12
12
  *
13
13
  * @attr {boolean} readonly - Set readonly state
14
14
  * @prop {boolean} [readonly=false] - Set readonly state
@@ -122,7 +122,6 @@ let Checkbox = class Checkbox extends ControlElement {
122
122
  }
123
123
  switch (event.key) {
124
124
  case ' ':
125
- case 'Spacebar':
126
125
  this.handleChangeChecked();
127
126
  break;
128
127
  default:
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/icon/themes/halo/dark';
2
2
  import '@refinitiv-ui/elements/tooltip/themes/halo/dark';
3
3
 
4
- dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-checkbox', styles: ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation;--check-color:#6678FF;color:#ccc}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#0d0d0d;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border:1px solid #404040;width:14px;height:14px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#6678ff);width:95%;height:95%}:host [part=label]{margin:0 7px;cursor:default}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:70%;height:1px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#ccc)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{border-color:#334bff;box-shadow:0 0 0 #334bff}}:host(:not([readonly])) [part=container]{cursor:pointer}:host(:hover:not([checked]):not([indeterminate]):not([readonly])) [part=container]{border-color:grey}:host(:hover:not([readonly])){color:#fff}:host([disabled]),:host([disabled]) [part=label]{opacity:.5}:host([checked]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]:not([checked])) [part=container]{border-color:#404040}:host([focused=visible]){outline:#334bff solid 1px;outline-offset:2px}:host([indeterminate]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]) [part=container],:host(:focus[readonly][indeterminate]) [part=container]{border-color:#334bff}' }}));
4
+ dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-checkbox', styles: ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation;--check-color:#6678FF;color:#ccc}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#0d0d0d;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border:1px solid #404040;width:14px;height:14px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#6678ff);width:95%;height:95%}:host [part=label]{margin:0 7px;cursor:default}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:70%;height:1px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#ccc)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65}@media (pointer:fine){:host(:focus) [part=container]{border-color:#334bff;box-shadow:0 0 0 #334bff}}:host(:not([readonly])) [part=container]{cursor:pointer}:host(:hover:not([checked]):not([indeterminate]):not([readonly])) [part=container]{border-color:grey}:host(:hover:not([readonly])){color:#fff}:host([disabled]),:host([disabled]) [part=label]{opacity:.5}:host([checked]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]:not([checked])) [part=container]{border-color:#404040}:host([focused=visible]){outline:#334bff solid 1px;outline-offset:2px}:host([indeterminate]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]) [part=container],:host(:focus[readonly][indeterminate]) [part=container]{border-color:#334bff}' }}));
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/icon/themes/halo/light';
2
2
  import '@refinitiv-ui/elements/tooltip/themes/halo/light';
3
3
 
4
- dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-checkbox', styles: ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation;--check-color:#334BFF;color:#404040}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#fff;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.25);-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border:1px solid #595959;width:14px;height:14px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#334bff);width:95%;height:95%}:host [part=label]{margin:0 7px;cursor:default}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:70%;height:1px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#404040)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{border-color:#334bff;box-shadow:0 0 0 #334bff}}:host(:not([readonly])) [part=container]{cursor:pointer}:host(:hover:not([checked]):not([indeterminate]):not([readonly])) [part=container]{border-color:#0d0d0d}:host(:hover:not([readonly])){color:#0d0d0d}:host([disabled]),:host([disabled]) [part=label]{opacity:.5}:host([checked]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]:not([checked])) [part=container]{border-color:#595959}:host([focused=visible]){outline:#334bff solid 1px;outline-offset:2px}:host([indeterminate]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]) [part=container],:host(:focus[readonly][indeterminate]) [part=container]{border-color:#334bff}' }}));
4
+ dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-checkbox', styles: ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation;--check-color:#334BFF;color:#404040}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#fff;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.25);-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border:1px solid #595959;width:14px;height:14px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#334bff);width:95%;height:95%}:host [part=label]{margin:0 7px;cursor:default}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:70%;height:1px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#404040)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65}@media (pointer:fine){:host(:focus) [part=container]{border-color:#334bff;box-shadow:0 0 0 #334bff}}:host(:not([readonly])) [part=container]{cursor:pointer}:host(:hover:not([checked]):not([indeterminate]):not([readonly])) [part=container]{border-color:#0d0d0d}:host(:hover:not([readonly])){color:#0d0d0d}:host([disabled]),:host([disabled]) [part=label]{opacity:.5}:host([checked]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]:not([checked])) [part=container]{border-color:#595959}:host([focused=visible]){outline:#334bff solid 1px;outline-offset:2px}:host([indeterminate]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]) [part=container],:host(:focus[readonly][indeterminate]) [part=container]{border-color:#334bff}' }}));
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/icon/themes/solar/charcoal';
2
2
  import '@refinitiv-ui/elements/tooltip/themes/solar/charcoal';
3
3
 
4
- dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-checkbox', styles: ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#000;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.6);-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border:1px solid #4a4a52;height:11px;width:11px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#f93);border-width:0 2px 2px 0;width:95%;height:95%}:host [part=label]{cursor:default;margin:0 4px}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:5px;height:5px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#e2e2e2)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65;color:rgba(194,194,194,.6)}:host([disabled][checked]) [part=check],:host([disabled][indeterminate]) [part=check]{color:#c2c2c2}:host([readonly][checked]) [part=check],:host([readonly][indeterminate]) [part=check]{color:rgba(194,194,194,.5)}:host([disabled]) [part=container],:host([readonly]) [part=container]{color:rgba(194,194,194,.6);border-color:rgba(74,74,82,.6);background-color:rgba(0,0,0,.6)}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{box-shadow:0 0 0 #f93;border:1px dotted #f93}}' }}));
4
+ dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-checkbox', styles: ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#000;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.6);-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border:1px solid #4a4a52;height:11px;width:11px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#f93);border-width:0 2px 2px 0;width:95%;height:95%}:host [part=label]{cursor:default;margin:0 4px}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:5px;height:5px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#e2e2e2)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65;color:rgba(194,194,194,.6)}:host([disabled][checked]) [part=check],:host([disabled][indeterminate]) [part=check]{color:#c2c2c2}:host([readonly][checked]) [part=check],:host([readonly][indeterminate]) [part=check]{color:rgba(194,194,194,.5)}:host([disabled]) [part=container],:host([readonly]) [part=container]{color:rgba(194,194,194,.6);border-color:rgba(74,74,82,.6);background-color:rgba(0,0,0,.6)}@media (pointer:fine){:host(:focus) [part=container]{box-shadow:0 0 0 #f93;border:1px dotted #f93}}' }}));
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/icon/themes/solar/pearl';
2
2
  import '@refinitiv-ui/elements/tooltip/themes/solar/pearl';
3
3
 
4
- dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-checkbox', styles: ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#fff;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.3);-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border:1px solid #a9afba;height:11px;width:11px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#ee7600);border-width:0 2px 2px 0;width:95%;height:95%}:host [part=label]{cursor:default;margin:0 4px}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:5px;height:5px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#acafb5)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65;color:rgba(72,72,72,.6)}:host([disabled][checked]) [part=check],:host([disabled][indeterminate]) [part=check]{color:#a9afba}:host([readonly][checked]) [part=check],:host([readonly][indeterminate]) [part=check]{color:rgba(169,175,186,.5)}:host([disabled]) [part=container],:host([readonly]) [part=container]{color:rgba(72,72,72,.6);border-color:rgba(169,175,186,.6);background-color:rgba(255,255,255,.6)}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{box-shadow:0 0 0 #ffb266;border:1px dotted #ffb266}}' }}));
4
+ dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-checkbox', styles: ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#fff;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.3);-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border:1px solid #a9afba;height:11px;width:11px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#ee7600);border-width:0 2px 2px 0;width:95%;height:95%}:host [part=label]{cursor:default;margin:0 4px}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:5px;height:5px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#acafb5)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65;color:rgba(72,72,72,.6)}:host([disabled][checked]) [part=check],:host([disabled][indeterminate]) [part=check]{color:#a9afba}:host([readonly][checked]) [part=check],:host([readonly][indeterminate]) [part=check]{color:rgba(169,175,186,.5)}:host([disabled]) [part=container],:host([readonly]) [part=container]{color:rgba(72,72,72,.6);border-color:rgba(169,175,186,.6);background-color:rgba(255,255,255,.6)}@media (pointer:fine){:host(:focus) [part=container]{box-shadow:0 0 0 #ffb266;border:1px dotted #ffb266}}' }}));
@@ -100,11 +100,11 @@
100
100
  "events": [
101
101
  {
102
102
  "name": "value-changed",
103
- "description": "Fired when the value property changes while ticking."
103
+ "description": "Fired when `value` property changes while ticking."
104
104
  },
105
105
  {
106
106
  "name": "offset-changed",
107
- "description": "Fired when the the user offsets the clock in `interactive` mode."
107
+ "description": "Fired when the user offsets the clock in `interactive` mode. The event is not triggered if `offset` property is changed programmatically."
108
108
  }
109
109
  ],
110
110
  "methods": [
@@ -24,5 +24,5 @@ Display hours, minutes and seconds as clock interface
24
24
 
25
25
  | Event | Description |
26
26
  |------------------|--------------------------------------------------|
27
- | `offset-changed` | Fired when the the user offsets the clock in `interactive` mode. |
28
- | `value-changed` | Fired when the value property changes while ticking. |
27
+ | `offset-changed` | Fired when the user offsets the clock in `interactive` mode. The event is not triggered if `offset` property is changed programmatically. |
28
+ | `value-changed` | Fired when `value` property changes while ticking. |
@@ -4,8 +4,8 @@ import '@refinitiv-ui/phrasebook/locale/en/clock.js';
4
4
  import { TranslatePromise } from '@refinitiv-ui/translate';
5
5
  /**
6
6
  * Display hours, minutes and seconds as clock interface
7
- * @fires value-changed - Fired when the value property changes while ticking.
8
- * @fires offset-changed - Fired when the the user offsets the clock in `interactive` mode.
7
+ * @fires value-changed - Fired when `value` property changes while ticking.
8
+ * @fires offset-changed - Fired when the user offsets the clock in `interactive` mode. The event is not triggered if `offset` property is changed programmatically.
9
9
  */
10
10
  export declare class Clock extends ResponsiveElement {
11
11
  /**
@@ -23,8 +23,8 @@ var Segment;
23
23
  })(Segment || (Segment = {}));
24
24
  /**
25
25
  * Display hours, minutes and seconds as clock interface
26
- * @fires value-changed - Fired when the value property changes while ticking.
27
- * @fires offset-changed - Fired when the the user offsets the clock in `interactive` mode.
26
+ * @fires value-changed - Fired when `value` property changes while ticking.
27
+ * @fires offset-changed - Fired when the user offsets the clock in `interactive` mode. The event is not triggered if `offset` property is changed programmatically.
28
28
  */
29
29
  let Clock = class Clock extends ResponsiveElement {
30
30
  constructor() {
@@ -406,19 +406,15 @@ let Clock = class Clock extends ResponsiveElement {
406
406
  return;
407
407
  }
408
408
  switch (event.key) {
409
- case 'Up': // IE
410
409
  case 'ArrowUp':
411
410
  this.handleUpKey();
412
411
  break;
413
- case 'Down': // IE
414
412
  case 'ArrowDown':
415
413
  this.handleDownKey();
416
414
  break;
417
- case 'Left': // IE
418
415
  case 'ArrowLeft':
419
416
  this.activeSegment = Segment.HOURS;
420
417
  break;
421
- case 'Right': // IE
422
418
  case 'ArrowRight':
423
419
  this.activeSegment = Segment.MINUTES;
424
420
  break;
@@ -1,4 +1,4 @@
1
- declare type TickCallback = () => void;
1
+ type TickCallback = () => void;
2
2
  /**
3
3
  * Register new tick callback
4
4
  * @param tickCallback tick callback
@@ -63,7 +63,7 @@
63
63
  "events": [
64
64
  {
65
65
  "name": "expanded-changed",
66
- "description": "Fired when the `expanded` property changes."
66
+ "description": "Fired when the user expands or collapses the control. The event is not triggered if `expanded` property is changed programmatically."
67
67
  }
68
68
  ],
69
69
  "slots": [
@@ -15,9 +15,9 @@ for their primary displays.
15
15
 
16
16
  ## Events
17
17
 
18
- | Event | Description |
19
- |--------------------|---------------------------------------------|
20
- | `expanded-changed` | Fired when the `expanded` property changes. |
18
+ | Event | Description |
19
+ |--------------------|--------------------------------------------------|
20
+ | `expanded-changed` | Fired when the user expands or collapses the control. The event is not triggered if `expanded` property is changed programmatically. |
21
21
 
22
22
  ## Slots
23
23
 
@@ -8,7 +8,7 @@ import '../icon/index.js';
8
8
  * or areas of the screen, maximizing the amount of real estate
9
9
  * for their primary displays.
10
10
  *
11
- * @fires expanded-changed - Fired when the `expanded` property changes.
11
+ * @fires expanded-changed - Fired when the user expands or collapses the control. The event is not triggered if `expanded` property is changed programmatically.
12
12
  *
13
13
  * @slot header-left - Slot to add custom contents to the left side of header e.g. ef-icon, ef-checkbox
14
14
  * @slot header-right - Slot to add custom contents to the right side of header e.g. ef-icon, ef-checkbox
@@ -100,6 +100,12 @@ export declare class Collapse extends BasicElement {
100
100
  * @returns clientHeight of the panel so that the panel holder max-height can be set
101
101
  */
102
102
  private getContentHeight;
103
+ /**
104
+ * Prevents expanding collapse when interactive element in slot is tapped
105
+ * @param event Tap event
106
+ * @returns {void}
107
+ */
108
+ private handleSlotTap;
103
109
  /**
104
110
  * A `TemplateResult` that will be used
105
111
  * to render the updated internal template.
@@ -1,8 +1,7 @@
1
1
  import { __decorate } from "tslib";
2
- import { BasicElement, css, html } from '@refinitiv-ui/core';
2
+ import { BasicElement, css, nothing, html } from '@refinitiv-ui/core';
3
3
  import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
4
  import { property } from '@refinitiv-ui/core/decorators/property.js';
5
- import { ifDefined } from '@refinitiv-ui/core/directives/if-defined.js';
6
5
  import { state } from '@refinitiv-ui/core/decorators/state.js';
7
6
  import { ref, createRef } from '@refinitiv-ui/core/directives/ref.js';
8
7
  import { VERSION } from '../version.js';
@@ -16,7 +15,7 @@ preload('right'); /* preload calendar icons for faster loading */
16
15
  * or areas of the screen, maximizing the amount of real estate
17
16
  * for their primary displays.
18
17
  *
19
- * @fires expanded-changed - Fired when the `expanded` property changes.
18
+ * @fires expanded-changed - Fired when the user expands or collapses the control. The event is not triggered if `expanded` property is changed programmatically.
20
19
  *
21
20
  * @slot header-left - Slot to add custom contents to the left side of header e.g. ef-icon, ef-checkbox
22
21
  * @slot header-right - Slot to add custom contents to the right side of header e.g. ef-icon, ef-checkbox
@@ -74,20 +73,6 @@ let Collapse = class Collapse extends BasicElement {
74
73
  :host(:not([expanded])) [part~=content] {
75
74
  visibility: hidden;
76
75
  }
77
- [part~=header] {
78
- position: relative;
79
- z-index: 0;
80
- }
81
- [part~=header-toggle]::before {
82
- content: '';
83
- display: block;
84
- position: absolute;
85
- top: 0;
86
- right: 0;
87
- bottom: 0;
88
- left: 0;
89
- z-index: -1;
90
- }
91
76
  [part~=content] {
92
77
  overflow: hidden;
93
78
  box-sizing: border-box;
@@ -173,6 +158,14 @@ let Collapse = class Collapse extends BasicElement {
173
158
  const panelEl = this.panelRef.value;
174
159
  return panelEl ? panelEl.clientHeight : 0;
175
160
  }
161
+ /**
162
+ * Prevents expanding collapse when interactive element in slot is tapped
163
+ * @param event Tap event
164
+ * @returns {void}
165
+ */
166
+ handleSlotTap(event) {
167
+ event.stopPropagation();
168
+ }
176
169
  /**
177
170
  * A `TemplateResult` that will be used
178
171
  * to render the updated internal template.
@@ -180,21 +173,25 @@ let Collapse = class Collapse extends BasicElement {
180
173
  */
181
174
  render() {
182
175
  return html `
183
- <ef-header part="header" level="${this.level}">
184
- <div part="heading" role="heading" aria-level="${ifDefined(this.headingLevel || undefined)}">
185
- <div id="header-toggle"
186
- part="header-toggle"
187
- role="button"
188
- tabindex="0"
189
- aria-expanded="${this.expanded}"
190
- aria-controls="content"
191
- @tap=${this.toggle}>${this.header}</div>
192
- </div>
176
+ <ef-header
177
+ part="header"
178
+ role="heading"
179
+ level=${this.level}
180
+ aria-level=${this.headingLevel ?? nothing}
181
+ @tap=${this.toggle}>
182
+ <div
183
+ id="header-label"
184
+ role="button"
185
+ tabindex="0"
186
+ aria-expanded="${this.expanded}"
187
+ aria-controls="content">
188
+ ${this.header}
189
+ </div>
193
190
  <ef-icon icon="right" part="toggle" slot="left" aria-hidden="true"></ef-icon>
194
- <slot name="header-left" slot="left"></slot>
195
- <slot name="header-right" slot="right"></slot>
191
+ <slot name="header-left" slot="left" @tap=${this.handleSlotTap}></slot>
192
+ <slot name="header-right" slot="right" @tap=${this.handleSlotTap}></slot>
196
193
  </ef-header>
197
- <div ${ref(this.panelHolderRef)} id="content" part="content" role="region" aria-labelledby="header-toggle">
194
+ <div ${ref(this.panelHolderRef)} id="content" part="content" role="region" aria-labelledby="header-label">
198
195
  <ef-panel ${ref(this.panelRef)} part="content-data" ?spacing="${this.spacing}" transparent>
199
196
  <slot></slot>
200
197
  </ef-panel>