@refinitiv-ui/elements 5.12.2 → 6.0.0-next.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 (365) hide show
  1. package/README.md +4 -4
  2. package/lib/accordion/index.d.ts +5 -0
  3. package/lib/accordion/index.js +2 -2
  4. package/lib/accordion/themes/halo/dark/index.js +1 -1
  5. package/lib/accordion/themes/halo/light/index.js +1 -1
  6. package/lib/accordion/themes/solar/charcoal/index.js +1 -1
  7. package/lib/accordion/themes/solar/pearl/index.js +1 -1
  8. package/lib/appstate-bar/index.d.ts +11 -0
  9. package/lib/appstate-bar/index.js +8 -3
  10. package/lib/appstate-bar/themes/halo/dark/index.js +1 -1
  11. package/lib/appstate-bar/themes/halo/light/index.js +1 -1
  12. package/lib/appstate-bar/themes/solar/charcoal/index.js +1 -1
  13. package/lib/appstate-bar/themes/solar/pearl/index.js +1 -1
  14. package/lib/autosuggest/index.d.ts +5 -0
  15. package/lib/autosuggest/index.js +22 -12
  16. package/lib/autosuggest/themes/halo/dark/index.js +3 -3
  17. package/lib/autosuggest/themes/halo/light/index.js +3 -3
  18. package/lib/autosuggest/themes/solar/charcoal/index.js +3 -3
  19. package/lib/autosuggest/themes/solar/pearl/index.js +3 -3
  20. package/lib/button/index.d.ts +7 -13
  21. package/lib/button/index.js +8 -43
  22. package/lib/button/themes/halo/dark/index.js +1 -1
  23. package/lib/button/themes/halo/light/index.js +1 -1
  24. package/lib/button/themes/solar/charcoal/index.js +1 -1
  25. package/lib/button/themes/solar/pearl/index.js +1 -1
  26. package/lib/button-bar/index.d.ts +5 -0
  27. package/lib/button-bar/index.js +4 -5
  28. package/lib/button-bar/themes/halo/dark/index.js +1 -1
  29. package/lib/button-bar/themes/halo/light/index.js +1 -1
  30. package/lib/button-bar/themes/solar/charcoal/index.js +1 -1
  31. package/lib/button-bar/themes/solar/pearl/index.js +1 -1
  32. package/lib/calendar/constants.js +1 -1
  33. package/lib/calendar/index.d.ts +6 -1
  34. package/lib/calendar/index.js +39 -15
  35. package/lib/calendar/locales.js +5 -5
  36. package/lib/calendar/themes/halo/dark/index.js +1 -1
  37. package/lib/calendar/themes/halo/light/index.js +1 -1
  38. package/lib/calendar/themes/solar/charcoal/index.js +1 -1
  39. package/lib/calendar/themes/solar/pearl/index.js +1 -1
  40. package/lib/calendar/types.d.ts +1 -1
  41. package/lib/calendar/utils.js +5 -5
  42. package/lib/canvas/index.d.ts +5 -0
  43. package/lib/canvas/index.js +3 -4
  44. package/lib/card/index.d.ts +21 -0
  45. package/lib/card/index.js +37 -15
  46. package/lib/card/themes/halo/dark/index.js +3 -3
  47. package/lib/card/themes/halo/light/index.js +3 -3
  48. package/lib/card/themes/solar/charcoal/index.js +3 -3
  49. package/lib/card/themes/solar/pearl/index.js +3 -3
  50. package/lib/chart/index.d.ts +5 -0
  51. package/lib/chart/index.js +18 -22
  52. package/lib/chart/plugins/doughnut-center-label.js +6 -11
  53. package/lib/chart/themes/halo/dark/index.js +2 -2
  54. package/lib/chart/themes/halo/light/index.js +2 -2
  55. package/lib/chart/themes/solar/charcoal/index.js +2 -2
  56. package/lib/chart/themes/solar/pearl/index.js +2 -2
  57. package/lib/checkbox/index.d.ts +5 -0
  58. package/lib/checkbox/index.js +3 -3
  59. package/lib/checkbox/themes/halo/dark/index.js +2 -2
  60. package/lib/checkbox/themes/halo/light/index.js +2 -2
  61. package/lib/checkbox/themes/solar/charcoal/index.js +2 -2
  62. package/lib/checkbox/themes/solar/pearl/index.js +2 -2
  63. package/lib/clock/index.d.ts +5 -0
  64. package/lib/clock/index.js +6 -6
  65. package/lib/clock/utils/TickManager.js +2 -2
  66. package/lib/collapse/index.d.ts +5 -0
  67. package/lib/collapse/index.js +7 -9
  68. package/lib/collapse/themes/halo/dark/index.js +3 -3
  69. package/lib/collapse/themes/halo/light/index.js +3 -3
  70. package/lib/collapse/themes/solar/charcoal/index.js +3 -3
  71. package/lib/collapse/themes/solar/pearl/index.js +3 -3
  72. package/lib/color-dialog/elements/color-palettes.d.ts +5 -0
  73. package/lib/color-dialog/elements/color-palettes.js +1 -1
  74. package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -0
  75. package/lib/color-dialog/elements/grayscale-palettes.js +2 -2
  76. package/lib/color-dialog/elements/palettes.js +4 -5
  77. package/lib/color-dialog/helpers/value-model.js +1 -1
  78. package/lib/color-dialog/index.d.ts +6 -1
  79. package/lib/color-dialog/index.js +17 -12
  80. package/lib/color-dialog/themes/halo/dark/index.js +5 -5
  81. package/lib/color-dialog/themes/halo/light/index.js +5 -5
  82. package/lib/color-dialog/themes/solar/charcoal/index.js +5 -5
  83. package/lib/color-dialog/themes/solar/pearl/index.js +5 -5
  84. package/lib/combo-box/helpers/filter.d.ts +1 -1
  85. package/lib/combo-box/helpers/types.d.ts +1 -1
  86. package/lib/combo-box/index.d.ts +9 -4
  87. package/lib/combo-box/index.js +31 -14
  88. package/lib/combo-box/themes/halo/dark/index.js +5 -5
  89. package/lib/combo-box/themes/halo/light/index.js +5 -5
  90. package/lib/combo-box/themes/solar/charcoal/index.js +5 -5
  91. package/lib/combo-box/themes/solar/pearl/index.js +5 -5
  92. package/lib/counter/index.d.ts +11 -6
  93. package/lib/counter/index.js +8 -8
  94. package/lib/counter/themes/halo/dark/index.js +1 -1
  95. package/lib/counter/themes/halo/light/index.js +1 -1
  96. package/lib/counter/themes/solar/charcoal/index.js +1 -1
  97. package/lib/counter/themes/solar/pearl/index.js +1 -1
  98. package/lib/datetime-field/constants.d.ts +4 -0
  99. package/lib/datetime-field/constants.js +5 -0
  100. package/lib/datetime-field/custom-elements.json +345 -0
  101. package/lib/datetime-field/custom-elements.md +61 -0
  102. package/lib/datetime-field/index.d.ts +322 -0
  103. package/lib/datetime-field/index.js +660 -0
  104. package/lib/datetime-field/themes/halo/dark/index.js +3 -0
  105. package/lib/datetime-field/themes/halo/light/index.js +3 -0
  106. package/lib/datetime-field/themes/solar/charcoal/index.js +3 -0
  107. package/lib/datetime-field/themes/solar/pearl/index.js +3 -0
  108. package/lib/datetime-field/types.d.ts +10 -0
  109. package/lib/datetime-field/types.js +1 -0
  110. package/lib/datetime-field/utils.d.ts +25 -0
  111. package/lib/datetime-field/utils.js +79 -0
  112. package/lib/datetime-picker/index.d.ts +5 -0
  113. package/lib/datetime-picker/index.js +6 -7
  114. package/lib/datetime-picker/themes/halo/dark/index.js +5 -5
  115. package/lib/datetime-picker/themes/halo/light/index.js +5 -5
  116. package/lib/datetime-picker/themes/solar/charcoal/index.js +5 -5
  117. package/lib/datetime-picker/themes/solar/pearl/index.js +5 -5
  118. package/lib/datetime-picker/utils.js +1 -1
  119. package/lib/dialog/draggable-element.js +1 -2
  120. package/lib/dialog/index.d.ts +6 -1
  121. package/lib/dialog/index.js +5 -5
  122. package/lib/dialog/themes/halo/dark/index.js +5 -5
  123. package/lib/dialog/themes/halo/light/index.js +5 -5
  124. package/lib/dialog/themes/solar/charcoal/index.js +5 -5
  125. package/lib/dialog/themes/solar/pearl/index.js +5 -5
  126. package/lib/email-field/index.d.ts +6 -1
  127. package/lib/email-field/index.js +8 -3
  128. package/lib/email-field/themes/halo/dark/index.js +1 -1
  129. package/lib/email-field/themes/halo/light/index.js +1 -1
  130. package/lib/email-field/themes/solar/charcoal/index.js +1 -1
  131. package/lib/email-field/themes/solar/pearl/index.js +1 -1
  132. package/lib/flag/index.d.ts +5 -0
  133. package/lib/flag/index.js +3 -3
  134. package/lib/flag/utils/FlagLoader.d.ts +1 -1
  135. package/lib/flag/utils/FlagLoader.js +1 -1
  136. package/lib/header/index.d.ts +5 -0
  137. package/lib/header/index.js +2 -2
  138. package/lib/heatmap/helpers/color.d.ts +1 -1
  139. package/lib/heatmap/helpers/color.js +3 -5
  140. package/lib/heatmap/helpers/text.d.ts +1 -7
  141. package/lib/heatmap/helpers/text.js +1 -18
  142. package/lib/heatmap/index.d.ts +5 -0
  143. package/lib/heatmap/index.js +22 -30
  144. package/lib/heatmap/themes/halo/dark/index.js +2 -2
  145. package/lib/heatmap/themes/halo/light/index.js +2 -2
  146. package/lib/heatmap/themes/solar/charcoal/index.js +2 -2
  147. package/lib/heatmap/themes/solar/pearl/index.js +2 -2
  148. package/lib/icon/index.d.ts +5 -0
  149. package/lib/icon/index.js +3 -3
  150. package/lib/icon/utils/IconLoader.d.ts +1 -1
  151. package/lib/icon/utils/IconLoader.js +1 -1
  152. package/lib/interactive-chart/helpers/types.d.ts +1 -1
  153. package/lib/interactive-chart/index.d.ts +5 -12
  154. package/lib/interactive-chart/index.js +20 -36
  155. package/lib/interactive-chart/themes/halo/dark/index.js +1 -1
  156. package/lib/interactive-chart/themes/halo/light/index.js +1 -1
  157. package/lib/interactive-chart/themes/solar/charcoal/index.js +1 -1
  158. package/lib/interactive-chart/themes/solar/pearl/index.js +1 -1
  159. package/lib/item/helpers/types.d.ts +1 -1
  160. package/lib/item/index.d.ts +24 -17
  161. package/lib/item/index.js +45 -48
  162. package/lib/item/themes/halo/dark/index.js +2 -2
  163. package/lib/item/themes/halo/light/index.js +2 -2
  164. package/lib/item/themes/solar/charcoal/index.js +2 -2
  165. package/lib/item/themes/solar/pearl/index.js +2 -2
  166. package/lib/label/index.d.ts +6 -1
  167. package/lib/label/index.js +6 -6
  168. package/lib/label/themes/halo/dark/index.js +1 -1
  169. package/lib/label/themes/halo/light/index.js +1 -1
  170. package/lib/label/themes/solar/charcoal/index.js +1 -1
  171. package/lib/label/themes/solar/pearl/index.js +1 -1
  172. package/lib/layout/index.d.ts +5 -0
  173. package/lib/layout/index.js +2 -2
  174. package/lib/led-gauge/index.d.ts +5 -0
  175. package/lib/led-gauge/index.js +2 -2
  176. package/lib/led-gauge/themes/halo/dark/index.js +1 -1
  177. package/lib/led-gauge/themes/halo/light/index.js +1 -1
  178. package/lib/led-gauge/themes/solar/charcoal/index.js +1 -1
  179. package/lib/led-gauge/themes/solar/pearl/index.js +1 -1
  180. package/lib/list/custom-elements.json +0 -13
  181. package/lib/list/custom-elements.md +9 -10
  182. package/lib/list/helpers/item-id.d.ts +8 -0
  183. package/lib/list/helpers/item-id.js +13 -0
  184. package/lib/list/helpers/{list-renderer.d.ts → renderer.d.ts} +4 -0
  185. package/lib/list/helpers/{list-renderer.js → renderer.js} +8 -0
  186. package/lib/list/helpers/types.d.ts +1 -1
  187. package/lib/list/index.d.ts +18 -12
  188. package/lib/list/index.js +30 -29
  189. package/lib/list/renderer.d.ts +1 -1
  190. package/lib/list/themes/halo/dark/index.js +2 -2
  191. package/lib/list/themes/halo/light/index.js +2 -2
  192. package/lib/list/themes/solar/charcoal/index.js +2 -2
  193. package/lib/list/themes/solar/pearl/index.js +2 -2
  194. package/lib/loader/index.d.ts +6 -0
  195. package/lib/loader/index.js +5 -1
  196. package/lib/multi-input/helpers/types.d.ts +1 -1
  197. package/lib/multi-input/index.d.ts +5 -0
  198. package/lib/multi-input/index.js +6 -7
  199. package/lib/multi-input/themes/halo/dark/index.js +2 -2
  200. package/lib/multi-input/themes/halo/light/index.js +2 -2
  201. package/lib/multi-input/themes/solar/charcoal/index.js +2 -2
  202. package/lib/multi-input/themes/solar/pearl/index.js +2 -2
  203. package/lib/notification/elements/notification-tray.d.ts +5 -0
  204. package/lib/notification/elements/notification-tray.js +4 -4
  205. package/lib/notification/elements/notification.d.ts +15 -0
  206. package/lib/notification/elements/notification.js +12 -3
  207. package/lib/notification/themes/halo/dark/index.js +1 -1
  208. package/lib/notification/themes/halo/light/index.js +1 -1
  209. package/lib/notification/themes/solar/charcoal/index.js +1 -1
  210. package/lib/notification/themes/solar/pearl/index.js +1 -1
  211. package/lib/number-field/index.d.ts +8 -3
  212. package/lib/number-field/index.js +14 -4
  213. package/lib/number-field/themes/halo/dark/index.js +1 -1
  214. package/lib/number-field/themes/halo/light/index.js +1 -1
  215. package/lib/number-field/themes/solar/charcoal/index.js +1 -1
  216. package/lib/number-field/themes/solar/pearl/index.js +1 -1
  217. package/lib/overlay/elements/overlay-backdrop.d.ts +5 -0
  218. package/lib/overlay/elements/overlay-backdrop.js +2 -2
  219. package/lib/overlay/elements/overlay-viewport.d.ts +5 -0
  220. package/lib/overlay/elements/overlay-viewport.js +1 -1
  221. package/lib/overlay/elements/overlay.d.ts +5 -0
  222. package/lib/overlay/elements/overlay.js +7 -5
  223. package/lib/overlay/managers/focus-manager.js +11 -6
  224. package/lib/overlay/managers/interaction-lock-manager.js +1 -1
  225. package/lib/overlay/managers/viewport-manager.js +4 -5
  226. package/lib/overlay/managers/zindex-manager.js +1 -1
  227. package/lib/overlay-menu/helpers/types.d.ts +7 -1
  228. package/lib/overlay-menu/helpers/types.js +7 -1
  229. package/lib/overlay-menu/index.d.ts +14 -4
  230. package/lib/overlay-menu/index.js +57 -29
  231. package/lib/overlay-menu/managers/menu-manager.js +2 -1
  232. package/lib/overlay-menu/themes/halo/dark/index.js +3 -3
  233. package/lib/overlay-menu/themes/halo/light/index.js +3 -3
  234. package/lib/overlay-menu/themes/solar/charcoal/index.js +3 -3
  235. package/lib/overlay-menu/themes/solar/pearl/index.js +3 -3
  236. package/lib/pagination/index.d.ts +79 -91
  237. package/lib/pagination/index.js +205 -239
  238. package/lib/pagination/themes/halo/dark/index.js +4 -5
  239. package/lib/pagination/themes/halo/light/index.js +4 -5
  240. package/lib/pagination/themes/solar/charcoal/index.js +4 -5
  241. package/lib/pagination/themes/solar/pearl/index.js +4 -5
  242. package/lib/panel/index.d.ts +5 -0
  243. package/lib/panel/index.js +2 -2
  244. package/lib/password-field/index.d.ts +7 -2
  245. package/lib/password-field/index.js +7 -4
  246. package/lib/password-field/themes/halo/dark/index.js +1 -1
  247. package/lib/password-field/themes/halo/light/index.js +1 -1
  248. package/lib/password-field/themes/solar/charcoal/index.js +1 -1
  249. package/lib/password-field/themes/solar/pearl/index.js +1 -1
  250. package/lib/pill/index.d.ts +21 -0
  251. package/lib/pill/index.js +36 -5
  252. package/lib/pill/themes/halo/dark/index.js +2 -2
  253. package/lib/pill/themes/halo/light/index.js +2 -2
  254. package/lib/pill/themes/solar/charcoal/index.js +2 -2
  255. package/lib/pill/themes/solar/pearl/index.js +2 -2
  256. package/lib/progress-bar/index.d.ts +5 -0
  257. package/lib/progress-bar/index.js +3 -3
  258. package/lib/radio-button/index.d.ts +5 -0
  259. package/lib/radio-button/index.js +3 -3
  260. package/lib/radio-button/radio-button-registry.d.ts +1 -1
  261. package/lib/radio-button/radio-button-registry.js +4 -2
  262. package/lib/radio-button/themes/halo/dark/index.js +1 -1
  263. package/lib/radio-button/themes/halo/light/index.js +1 -1
  264. package/lib/radio-button/themes/solar/charcoal/index.js +1 -1
  265. package/lib/radio-button/themes/solar/pearl/index.js +1 -1
  266. package/lib/rating/index.d.ts +5 -0
  267. package/lib/rating/index.js +4 -4
  268. package/lib/search-field/index.d.ts +7 -2
  269. package/lib/search-field/index.js +8 -4
  270. package/lib/search-field/themes/halo/dark/index.js +1 -1
  271. package/lib/search-field/themes/halo/light/index.js +1 -1
  272. package/lib/search-field/themes/solar/charcoal/index.js +1 -1
  273. package/lib/search-field/themes/solar/pearl/index.js +1 -1
  274. package/lib/select/index.d.ts +5 -0
  275. package/lib/select/index.js +11 -14
  276. package/lib/select/themes/halo/dark/index.js +3 -3
  277. package/lib/select/themes/halo/light/index.js +3 -3
  278. package/lib/select/themes/solar/charcoal/index.js +3 -3
  279. package/lib/select/themes/solar/pearl/index.js +3 -3
  280. package/lib/sidebar-layout/index.d.ts +5 -0
  281. package/lib/sidebar-layout/index.js +4 -4
  282. package/lib/sidebar-layout/themes/halo/dark/index.js +1 -1
  283. package/lib/sidebar-layout/themes/halo/light/index.js +1 -1
  284. package/lib/sidebar-layout/themes/solar/charcoal/index.js +1 -1
  285. package/lib/sidebar-layout/themes/solar/pearl/index.js +1 -1
  286. package/lib/slider/constants.d.ts +15 -0
  287. package/lib/slider/constants.js +18 -0
  288. package/lib/slider/index.d.ts +55 -80
  289. package/lib/slider/index.js +365 -460
  290. package/lib/slider/themes/halo/dark/index.js +1 -1
  291. package/lib/slider/themes/halo/light/index.js +1 -1
  292. package/lib/slider/themes/solar/charcoal/index.js +1 -1
  293. package/lib/slider/themes/solar/pearl/index.js +1 -1
  294. package/lib/slider/utils.d.ts +35 -0
  295. package/lib/slider/utils.js +54 -0
  296. package/lib/sparkline/index.d.ts +5 -0
  297. package/lib/sparkline/index.js +9 -10
  298. package/lib/swing-gauge/index.d.ts +5 -0
  299. package/lib/swing-gauge/index.js +14 -8
  300. package/lib/swing-gauge/themes/halo/dark/index.js +1 -1
  301. package/lib/swing-gauge/themes/halo/light/index.js +1 -1
  302. package/lib/swing-gauge/themes/solar/charcoal/index.js +1 -1
  303. package/lib/swing-gauge/themes/solar/pearl/index.js +1 -1
  304. package/lib/tab/index.d.ts +5 -0
  305. package/lib/tab/index.js +4 -4
  306. package/lib/tab/themes/halo/dark/index.js +2 -2
  307. package/lib/tab/themes/halo/light/index.js +2 -2
  308. package/lib/tab/themes/solar/charcoal/index.js +2 -2
  309. package/lib/tab/themes/solar/pearl/index.js +2 -2
  310. package/lib/tab-bar/index.d.ts +5 -0
  311. package/lib/tab-bar/index.js +6 -6
  312. package/lib/tab-bar/themes/halo/dark/index.js +2 -2
  313. package/lib/tab-bar/themes/halo/light/index.js +2 -2
  314. package/lib/tab-bar/themes/solar/charcoal/index.js +2 -2
  315. package/lib/tab-bar/themes/solar/pearl/index.js +2 -2
  316. package/lib/text-field/index.d.ts +19 -1
  317. package/lib/text-field/index.js +35 -11
  318. package/lib/text-field/themes/halo/dark/index.js +1 -1
  319. package/lib/text-field/themes/halo/light/index.js +1 -1
  320. package/lib/text-field/themes/solar/charcoal/index.js +1 -1
  321. package/lib/text-field/themes/solar/pearl/index.js +1 -1
  322. package/lib/time-picker/index.d.ts +6 -1
  323. package/lib/time-picker/index.js +11 -11
  324. package/lib/time-picker/themes/halo/dark/index.js +2 -2
  325. package/lib/time-picker/themes/halo/light/index.js +2 -2
  326. package/lib/time-picker/themes/solar/charcoal/index.js +2 -2
  327. package/lib/time-picker/themes/solar/pearl/index.js +2 -2
  328. package/lib/toggle/index.d.ts +5 -0
  329. package/lib/toggle/index.js +2 -2
  330. package/lib/tooltip/elements/tooltip-element.d.ts +1 -2
  331. package/lib/tooltip/index.d.ts +6 -0
  332. package/lib/tooltip/index.js +7 -8
  333. package/lib/tooltip/managers/tooltip-manager.js +2 -2
  334. package/lib/tooltip/themes/halo/dark/index.js +1 -1
  335. package/lib/tooltip/themes/halo/light/index.js +1 -1
  336. package/lib/tooltip/themes/solar/charcoal/index.js +1 -1
  337. package/lib/tooltip/themes/solar/pearl/index.js +1 -1
  338. package/lib/tornado-chart/elements/tornado-chart.d.ts +5 -0
  339. package/lib/tornado-chart/elements/tornado-chart.js +2 -2
  340. package/lib/tornado-chart/elements/tornado-item.d.ts +5 -0
  341. package/lib/tornado-chart/elements/tornado-item.js +3 -3
  342. package/lib/tornado-chart/themes/halo/dark/index.js +2 -2
  343. package/lib/tornado-chart/themes/halo/light/index.js +2 -2
  344. package/lib/tornado-chart/themes/solar/charcoal/index.js +2 -2
  345. package/lib/tornado-chart/themes/solar/pearl/index.js +2 -2
  346. package/lib/tree/elements/tree-item.d.ts +8 -3
  347. package/lib/tree/elements/tree-item.js +5 -6
  348. package/lib/tree/elements/tree.d.ts +7 -3
  349. package/lib/tree/elements/tree.js +6 -7
  350. package/lib/tree/helpers/renderer.d.ts +4 -0
  351. package/lib/tree/helpers/renderer.js +20 -13
  352. package/lib/tree/helpers/types.d.ts +1 -1
  353. package/lib/tree/managers/tree-manager.d.ts +1 -1
  354. package/lib/tree/themes/halo/dark/index.js +4 -4
  355. package/lib/tree/themes/halo/light/index.js +4 -4
  356. package/lib/tree/themes/solar/charcoal/index.js +4 -4
  357. package/lib/tree/themes/solar/pearl/index.js +4 -4
  358. package/lib/tree-select/index.d.ts +8 -7
  359. package/lib/tree-select/index.js +39 -38
  360. package/lib/tree-select/themes/halo/dark/index.js +9 -9
  361. package/lib/tree-select/themes/halo/light/index.js +9 -9
  362. package/lib/tree-select/themes/solar/charcoal/index.js +9 -9
  363. package/lib/tree-select/themes/solar/pearl/index.js +9 -9
  364. package/lib/version.js +1 -1
  365. package/package.json +35 -295
package/lib/item/index.js CHANGED
@@ -1,17 +1,14 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { ControlElement, css, html } from '@refinitiv-ui/core';
3
- import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
4
- import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
5
- import { query } from '@refinitiv-ui/core/lib/decorators/query.js';
3
+ import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
+ import { property } from '@refinitiv-ui/core/decorators/property.js';
5
+ import { query } from '@refinitiv-ui/core/decorators/query.js';
6
6
  import { VERSION } from '../version.js';
7
7
  import '../icon/index.js';
8
8
  import '../checkbox/index.js';
9
9
  export * from './helpers/types';
10
- const isAllWhitespaceTextNode = (node) => {
11
- var _a;
12
- return node.nodeType === document.TEXT_NODE
13
- && !((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim());
14
- };
10
+ const isAllWhitespaceTextNode = (node) => node.nodeType === document.TEXT_NODE
11
+ && !node.textContent?.trim();
15
12
  /**
16
13
  * Used as a basic building block to compose complex custom elements,
17
14
  * additionally it can be used by applications
@@ -43,12 +40,10 @@ let Item = class Item extends ControlElement {
43
40
  * Set the icon name from the ef-icon list
44
41
  */
45
42
  this.icon = null;
46
- this._selected = false;
47
43
  /**
48
- * Aria indicating current select state
49
- * @ignore
44
+ * Indicates that the item is selected
50
45
  */
51
- this.ariaSelected = 'false';
46
+ this.selected = false;
52
47
  /**
53
48
  * Is the item part of a multiple selection
54
49
  */
@@ -114,22 +109,6 @@ let Item = class Item extends ControlElement {
114
109
  }
115
110
  `;
116
111
  }
117
- /**
118
- * Indicates that the item is selected
119
- * @param value selected value
120
- * @default false
121
- */
122
- set selected(value) {
123
- const oldValue = this._selected;
124
- if (oldValue !== value) {
125
- this._selected = value;
126
- this.ariaSelected = String(value);
127
- void this.requestUpdate('selected', oldValue);
128
- }
129
- }
130
- get selected() {
131
- return this._selected;
132
- }
133
112
  /**
134
113
  * @param node that should be checked
135
114
  * @returns whether node can be ignored.
@@ -139,14 +118,48 @@ let Item = class Item extends ControlElement {
139
118
  || isAllWhitespaceTextNode(node);
140
119
  }
141
120
  /**
142
- * @override
121
+ * Handles aria-selected or aria-checked when toggle between single and multiple selection mode
122
+ * @returns {void}
123
+ **/
124
+ multipleChanged() {
125
+ this.removeAttribute(this.multiple ? 'aria-selected' : 'aria-checked');
126
+ this.selectedChanged();
127
+ }
128
+ /**
129
+ * Handles aria when selected state changes
130
+ * @returns {void}
131
+ */
132
+ selectedChanged() {
133
+ this.setAttribute(this.multiple ? 'aria-checked' : 'aria-selected', String(this.selected));
134
+ }
135
+ /**
136
+ * Control State behaviour will update tabindex based on the property
137
+ * @returns {void}
138
+ */
139
+ typeChanged() {
140
+ const noInteraction = this.type === 'header' || this.type === 'divider' || this.disabled;
141
+ if (noInteraction) {
142
+ this.disableFocus();
143
+ }
144
+ else if (!this.disabled) {
145
+ this.enableFocus();
146
+ }
147
+ }
148
+ /**
149
+ * Invoked before update() to compute values needed during the update.
150
+ * @param changedProperties changed properties
143
151
  * @returns {void}
144
152
  */
145
- update(changedProperties) {
153
+ willUpdate(changedProperties) {
146
154
  if (changedProperties.has('type')) {
147
155
  this.typeChanged();
148
156
  }
149
- super.update(changedProperties);
157
+ if (changedProperties.has('multiple')) {
158
+ this.multipleChanged();
159
+ }
160
+ else if (changedProperties.has('selected')) {
161
+ this.selectedChanged();
162
+ }
150
163
  }
151
164
  /**
152
165
  * Get icon template if icon attribute is defined
@@ -197,19 +210,6 @@ let Item = class Item extends ControlElement {
197
210
  get isTruncated() {
198
211
  return !!(this.labelEl && (this.labelEl.offsetWidth < this.labelEl.scrollWidth));
199
212
  }
200
- /**
201
- * Control State behaviour will update tabindex based on the property
202
- * @returns {void}
203
- */
204
- typeChanged() {
205
- const noInteraction = this.type === 'header' || this.type === 'divider' || this.disabled;
206
- if (noInteraction) {
207
- this.disableFocus();
208
- }
209
- else if (!this.disabled) {
210
- this.enableFocus();
211
- }
212
- }
213
213
  /**
214
214
  * A `TemplateResult` that will be used
215
215
  * to render the updated internal template.
@@ -245,10 +245,7 @@ __decorate([
245
245
  ], Item.prototype, "icon", void 0);
246
246
  __decorate([
247
247
  property({ type: Boolean, reflect: true })
248
- ], Item.prototype, "selected", null);
249
- __decorate([
250
- property({ type: String, reflect: true, attribute: 'aria-selected' })
251
- ], Item.prototype, "ariaSelected", void 0);
248
+ ], Item.prototype, "selected", void 0);
252
249
  __decorate([
253
250
  property({ type: Boolean, reflect: true })
254
251
  ], Item.prototype, "multiple", void 0);
@@ -1,4 +1,4 @@
1
- import '@refinitiv-ui/elements/lib/icon/themes/halo/dark';
2
- import '@refinitiv-ui/elements/lib/checkbox/themes/halo/dark';
1
+ import '@refinitiv-ui/elements/icon/themes/halo/dark';
2
+ import '@refinitiv-ui/elements/checkbox/themes/halo/dark';
3
3
 
4
4
  elf.customStyles.define('ef-item', ':host{outline:0;cursor:pointer;padding:0 8px;min-height:24px;box-sizing:border-box;touch-action:manipulation}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){:host(:after){content:\'\';min-height:inherit;font-size:0}}:host([selected]){color:#fff;font-weight:500}:host([readonly]){cursor:default}:host([focused]),:host([highlighted]){background-color:#334bff;color:#fff}:host([focused]:not([selected])),:host([highlighted]:not([selected])){color:#fff}:host [part=center],:host [part=sub-label]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}:host([disabled]){color:rgba(204,204,204,.5)}:host([type=divider]),:host([type=header]){pointer-events:none;min-height:auto}:host([type=divider]) [part=sub-label],:host([type=header]) [part=sub-label]{display:none}:host([type=header]){color:#999;background-color:transparent;font-size:83%;font-weight:500;border:none;height:24px;align-items:flex-end;margin:0;min-height:0;text-transform:uppercase;align-items:center}:host([type=divider]){border:none;padding:0;margin:0;height:5px;background:linear-gradient(#404040,#404040) 0 center/calc(100% - (0px * 2)) 1px no-repeat}:host [part=checkbox],:host [part=icon],:host [part=left] ::slotted(*){margin:0 .5em 0 0}:host [part=right] ::slotted(*){margin-left:.5em}:host [part=checkbox]{margin-right:8px}:host [part=sub-label]{font-size:90%}:host([sub-label]){padding:4px 8px}:host([selected]:not([highlighted]):not([focused])){background-color:#333}:host([selected]:not([multiple])){background-image:linear-gradient(#334bff,#334bff);background-size:4px 100%;background-position:left top;background-repeat:no-repeat}:host([selected][focused]),:host([selected][highlighted]){color:#fff}');
@@ -1,4 +1,4 @@
1
- import '@refinitiv-ui/elements/lib/icon/themes/halo/light';
2
- import '@refinitiv-ui/elements/lib/checkbox/themes/halo/light';
1
+ import '@refinitiv-ui/elements/icon/themes/halo/light';
2
+ import '@refinitiv-ui/elements/checkbox/themes/halo/light';
3
3
 
4
4
  elf.customStyles.define('ef-item', ':host{outline:0;cursor:pointer;padding:0 8px;min-height:24px;box-sizing:border-box;touch-action:manipulation}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){:host(:after){content:\'\';min-height:inherit;font-size:0}}:host([selected]){color:#0d0d0d;font-weight:500}:host([readonly]){cursor:default}:host([focused]),:host([highlighted]){background-color:#334bff;color:#fff}:host([focused]:not([selected])),:host([highlighted]:not([selected])){color:#fff}:host [part=center],:host [part=sub-label]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}:host([disabled]){color:rgba(64,64,64,.5)}:host([type=divider]),:host([type=header]){pointer-events:none;min-height:auto}:host([type=divider]) [part=sub-label],:host([type=header]) [part=sub-label]{display:none}:host([type=header]){color:#737373;background-color:transparent;font-size:83%;font-weight:500;border:none;height:24px;align-items:flex-end;margin:0;min-height:0;text-transform:uppercase;align-items:center}:host([type=divider]){border:none;padding:0;margin:0;height:5px;background:linear-gradient(#d9d9d9,#d9d9d9) 0 center/calc(100% - (0px * 2)) 1px no-repeat}:host [part=checkbox],:host [part=icon],:host [part=left] ::slotted(*){margin:0 .5em 0 0}:host [part=right] ::slotted(*){margin-left:.5em}:host [part=checkbox]{margin-right:8px}:host [part=sub-label]{font-size:90%}:host([sub-label]){padding:4px 8px}:host([selected]:not([highlighted]):not([focused])){background-color:#e6e6e6}:host([selected]:not([multiple])){background-image:linear-gradient(#334bff,#334bff);background-size:4px 100%;background-position:left top;background-repeat:no-repeat}:host([selected][focused]),:host([selected][highlighted]){color:#fff}');
@@ -1,4 +1,4 @@
1
- import '@refinitiv-ui/elements/lib/icon/themes/solar/charcoal';
2
- import '@refinitiv-ui/elements/lib/checkbox/themes/solar/charcoal';
1
+ import '@refinitiv-ui/elements/icon/themes/solar/charcoal';
2
+ import '@refinitiv-ui/elements/checkbox/themes/solar/charcoal';
3
3
 
4
4
  elf.customStyles.define('ef-item', ':host{outline:0;cursor:pointer;padding:0 7px;min-height:22px;box-sizing:border-box;touch-action:manipulation}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){:host(:after){content:\'\';min-height:inherit;font-size:0}}:host([selected]){color:#f93}:host([readonly]){cursor:default}:host([focused]),:host([highlighted]){background-color:rgba(255,255,255,.1)}:host([focused]:not([selected])),:host([highlighted]:not([selected])){color:#fff}:host [part=center],:host [part=sub-label]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}:host([disabled]){color:rgba(194,194,194,.5)}:host([type=divider]),:host([type=header]){pointer-events:none;min-height:auto}:host([type=divider]) [part=sub-label],:host([type=header]) [part=sub-label]{display:none}:host([type=header]){color:#c2c2c2;background-color:#4a4a52;font-size:100%;font-weight:400;border:1px solid #0a0a0a;height:22px;align-items:flex-end;margin:0;min-height:0;text-transform:uppercase;border:none;border-top:1px solid #0a0a0a;border-bottom:1px solid transparent;text-transform:none;align-items:center}:host([type=divider]){border:none;padding:0;margin:0;height:5px;background:linear-gradient(#2e2e33,#2e2e33) 0 center/calc(100% - (0px * 2)) 1px no-repeat}:host [part=checkbox],:host [part=icon],:host [part=left] ::slotted(*){margin:0 .5em 0 0}:host [part=sub-label]{font-size:80%}:host [part=icon],:host [part=left] ::slotted(*){margin-right:.33em}:host [part=right] ::slotted(*){margin-left:.33em}');
@@ -1,4 +1,4 @@
1
- import '@refinitiv-ui/elements/lib/icon/themes/solar/pearl';
2
- import '@refinitiv-ui/elements/lib/checkbox/themes/solar/pearl';
1
+ import '@refinitiv-ui/elements/icon/themes/solar/pearl';
2
+ import '@refinitiv-ui/elements/checkbox/themes/solar/pearl';
3
3
 
4
4
  elf.customStyles.define('ef-item', ':host{outline:0;cursor:pointer;padding:0 7px;min-height:22px;box-sizing:border-box;touch-action:manipulation}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){:host(:after){content:\'\';min-height:inherit;font-size:0}}:host([selected]){color:#ee7600}:host([readonly]){cursor:default}:host([focused]),:host([highlighted]){background-color:rgba(0,0,0,.08)}:host([focused]:not([selected])),:host([highlighted]:not([selected])){color:#000}:host [part=center],:host [part=sub-label]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}:host([disabled]){color:rgba(72,72,72,.5)}:host([type=divider]),:host([type=header]){pointer-events:none;min-height:auto}:host([type=divider]) [part=sub-label],:host([type=header]) [part=sub-label]{display:none}:host([type=header]){color:#484848;background-color:#f2f3f7;font-size:100%;font-weight:400;border:1px solid #d5d8db;height:22px;align-items:flex-end;margin:0;min-height:0;text-transform:uppercase;border:none;border-top:1px solid #d5d8db;border-bottom:1px solid transparent;text-transform:none;align-items:center}:host([type=divider]){border:none;padding:0;margin:0;height:5px;background:linear-gradient(#a9afba,#a9afba) 0 center/calc(100% - (0px * 2)) 1px no-repeat}:host [part=checkbox],:host [part=icon],:host [part=left] ::slotted(*){margin:0 .5em 0 0}:host [part=sub-label]{font-size:80%}:host [part=icon],:host [part=left] ::slotted(*){margin-right:.33em}:host [part=right] ::slotted(*){margin-left:.33em}');
@@ -63,7 +63,7 @@ export declare class Label extends BasicElement {
63
63
  protected shouldShowTooltip(tooltipTarget: HTMLElement): boolean;
64
64
  /**
65
65
  * Handles any modifications to the internal HTML
66
- * @param [mutation=false] is the request from a mutation event?
66
+ * @param [mutation=false] is the request from a mutation event ? ( reserved for future used )
67
67
  * @returns {void}
68
68
  */
69
69
  protected recalculate(mutation?: boolean): void;
@@ -86,6 +86,11 @@ export declare class Label extends BasicElement {
86
86
  */
87
87
  protected render(): TemplateResult;
88
88
  }
89
+ declare global {
90
+ interface HTMLElementTagNameMap {
91
+ 'ef-label': Label;
92
+ }
93
+ }
89
94
 
90
95
  declare global {
91
96
  interface HTMLElementTagNameMap {
@@ -1,10 +1,10 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { BasicElement, html, css } from '@refinitiv-ui/core';
3
- import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
4
- import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
5
- import { styleMap } from '@refinitiv-ui/core/lib/directives/style-map.js';
3
+ import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
+ import { property } from '@refinitiv-ui/core/decorators/property.js';
5
+ import { styleMap } from '@refinitiv-ui/core/directives/style-map.js';
6
6
  import { VERSION } from '../version.js';
7
- import { isIE } from '@refinitiv-ui/utils/lib/browser.js';
7
+ import { isIE } from '@refinitiv-ui/utils/browser.js';
8
8
  import { addTooltipCondition, removeTooltipCondition } from '../tooltip/index.js';
9
9
  /**
10
10
  * Configuration object
@@ -149,11 +149,11 @@ let Label = class Label extends BasicElement {
149
149
  }
150
150
  /**
151
151
  * Handles any modifications to the internal HTML
152
- * @param [mutation=false] is the request from a mutation event?
152
+ * @param [mutation=false] is the request from a mutation event ? ( reserved for future used )
153
153
  * @returns {void}
154
154
  */
155
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
155
156
  recalculate(mutation = false) {
156
- mutation; // keeping here for future use
157
157
  const oldValue = this.text;
158
158
  const raw = this.textContent || '';
159
159
  this.chunks = raw.split(_).map(chunk => chunk.trim()).filter(chunk => chunk);
@@ -1,3 +1,3 @@
1
- import '@refinitiv-ui/elements/lib/tooltip/themes/halo/dark';
1
+ import '@refinitiv-ui/elements/tooltip/themes/halo/dark';
2
2
 
3
3
  elf.customStyles.define('ef-label', ':host([warning]){color:#ffc800}:host([error]),:host([error][warning]){color:#f5475b}');
@@ -1,3 +1,3 @@
1
- import '@refinitiv-ui/elements/lib/tooltip/themes/halo/light';
1
+ import '@refinitiv-ui/elements/tooltip/themes/halo/light';
2
2
 
3
3
  elf.customStyles.define('ef-label', ':host([warning]){color:#cca000}:host([error]),:host([error][warning]){color:#d94255}');
@@ -1,3 +1,3 @@
1
- import '@refinitiv-ui/elements/lib/tooltip/themes/solar/charcoal';
1
+ import '@refinitiv-ui/elements/tooltip/themes/solar/charcoal';
2
2
 
3
3
  elf.customStyles.define('ef-label', ':host([warning]){color:#f93}:host([error]),:host([error][warning]){color:#f5475b}');
@@ -1,3 +1,3 @@
1
- import '@refinitiv-ui/elements/lib/tooltip/themes/solar/pearl';
1
+ import '@refinitiv-ui/elements/tooltip/themes/solar/pearl';
2
2
 
3
3
  elf.customStyles.define('ef-label', ':host([warning]){color:#f93}:host([error]),:host([error][warning]){color:#d94255}');
@@ -91,6 +91,11 @@ export declare class Layout extends ResponsiveElement {
91
91
  */
92
92
  protected render(): TemplateResult;
93
93
  }
94
+ declare global {
95
+ interface HTMLElementTagNameMap {
96
+ 'ef-layout': Layout;
97
+ }
98
+ }
94
99
 
95
100
  declare global {
96
101
  interface HTMLElementTagNameMap {
@@ -1,7 +1,7 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { ResponsiveElement, html, css } from '@refinitiv-ui/core';
3
- import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
4
- import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
3
+ import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
+ import { property } from '@refinitiv-ui/core/decorators/property.js';
5
5
  import { VERSION } from '../version.js';
6
6
  /**
7
7
  * Layout component for creating responsive applications and components
@@ -128,6 +128,11 @@ export declare class LedGauge extends BasicElement {
128
128
  */
129
129
  protected render(): TemplateResult;
130
130
  }
131
+ declare global {
132
+ interface HTMLElementTagNameMap {
133
+ 'ef-led-gauge': LedGauge;
134
+ }
135
+ }
131
136
 
132
137
  declare global {
133
138
  interface HTMLElementTagNameMap {
@@ -1,7 +1,7 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { BasicElement, html, css } from '@refinitiv-ui/core';
3
- import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
4
- import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
3
+ import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
+ import { property } from '@refinitiv-ui/core/decorators/property.js';
5
5
  import { VERSION } from '../version.js';
6
6
  import '../canvas/index.js';
7
7
  const ZERO_MAP = {
@@ -1,3 +1,3 @@
1
- import '@refinitiv-ui/elements/lib/canvas/themes/halo/dark';
1
+ import '@refinitiv-ui/elements/canvas/themes/halo/dark';
2
2
 
3
3
  elf.customStyles.define('ef-led-gauge', ':host{font-size:12px;--led-width:8px;--led-spacing:3px;--top-selected-color:#6678FF;--bottom-selected-color:#6678FF;--clash-color:#ffffff;--range-color:#c948a2;--neutral-color:#7a7a7a;--left-segment-color:#932b37;--center-left-segment-color:#60111a;--center-segment-color:#7a7a7a;--center-right-segment-color:#144628;--right-segment-color:#227642;height:68px;--led-width:5px;--led-spacing:1px;--left-segment-color:#B72536;--center-left-segment-color:#F5475B;--center-segment-color:#808080;--center-right-segment-color:#39C46E;--right-segment-color:#227542;--range-color:#6678FF;--top-selected-color:#6678FF;--bottom-selected-color:#F5475B}:host [part=label]{padding:3px}');
@@ -1,3 +1,3 @@
1
- import '@refinitiv-ui/elements/lib/canvas/themes/halo/light';
1
+ import '@refinitiv-ui/elements/canvas/themes/halo/light';
2
2
 
3
3
  elf.customStyles.define('ef-led-gauge', ':host{font-size:12px;--led-width:8px;--led-spacing:3px;--top-selected-color:#334BFF;--bottom-selected-color:#334BFF;--clash-color:#000000;--range-color:#fc73d2;--neutral-color:#b8b8b8;--left-segment-color:#B63243;--center-left-segment-color:#f3c5cb;--center-segment-color:#b8b8b8;--center-right-segment-color:#a8e2be;--right-segment-color:#246B3E;height:68px;--led-width:5px;--led-spacing:1px;--left-segment-color:#B63243;--center-left-segment-color:#D94255;--center-segment-color:#808080;--center-right-segment-color:#309054;--right-segment-color:#246B3E;--range-color:#334BFF;--top-selected-color:#334BFF;--bottom-selected-color:#F5475B}:host [part=label]{padding:3px}');
@@ -1,3 +1,3 @@
1
- import '@refinitiv-ui/elements/lib/canvas/themes/solar/charcoal';
1
+ import '@refinitiv-ui/elements/canvas/themes/solar/charcoal';
2
2
 
3
3
  elf.customStyles.define('ef-led-gauge', ':host{--led-width:8px;--led-spacing:3px;--top-selected-color:#FF9933;--bottom-selected-color:#FF9933;--clash-color:#ffffff;--range-color:#c948a2;--neutral-color:#747474;--left-segment-color:#932b37;--center-left-segment-color:#521822;--center-segment-color:#747474;--center-right-segment-color:#11472d;--right-segment-color:#227642;height:68px;font-size:10px;--led-width:5px;--led-spacing:4px;--top-selected-color:#FF9933;--bottom-selected-color:#46A0F0;--range-color:#2277AA}:host [part=label]{padding:2px}');
@@ -1,3 +1,3 @@
1
- import '@refinitiv-ui/elements/lib/canvas/themes/solar/pearl';
1
+ import '@refinitiv-ui/elements/canvas/themes/solar/pearl';
2
2
 
3
3
  elf.customStyles.define('ef-led-gauge', ':host{--led-width:8px;--led-spacing:3px;--top-selected-color:#EE7600;--bottom-selected-color:#EE7600;--clash-color:#000000;--range-color:#fc73d2;--neutral-color:#e2e4e6;--left-segment-color:#D94255;--center-left-segment-color:#f4b0bc;--center-segment-color:#e2e4e6;--center-right-segment-color:#a7e7c9;--right-segment-color:#309054;height:68px;font-size:10px;--led-width:5px;--led-spacing:4px;--top-selected-color:#EE7600;--bottom-selected-color:#0080F0;--range-color:#00B0FF}:host [part=label]{padding:2px}');
@@ -11,12 +11,6 @@
11
11
  "type": "boolean",
12
12
  "default": "false"
13
13
  },
14
- {
15
- "name": "aria-multiselectable",
16
- "description": "Aria indicating that list supports multiple selection",
17
- "type": "string",
18
- "default": "false"
19
- },
20
14
  {
21
15
  "name": "multiple",
22
16
  "description": "Allow multiple selections",
@@ -50,13 +44,6 @@
50
44
  "type": "boolean",
51
45
  "default": "false"
52
46
  },
53
- {
54
- "name": "ariaMultiselectable",
55
- "attribute": "aria-multiselectable",
56
- "description": "Aria indicating that list supports multiple selection",
57
- "type": "string",
58
- "default": "false"
59
- },
60
47
  {
61
48
  "name": "multiple",
62
49
  "attribute": "multiple",
@@ -4,16 +4,15 @@ Provides listing and immutable selection
4
4
 
5
5
  ## Properties
6
6
 
7
- | Property | Attribute | Type | Default | Description |
8
- |-----------------------------|------------------------|----------------|--------------------------|--------------------------------------------------|
9
- | `ariaMultiselectable` | `aria-multiselectable` | `string` | false | Aria indicating that list supports multiple selection |
10
- | `data` | | `ListData` | null | The data object, used to render the list. |
11
- | `delegatesFocus (readonly)` | | `false` | false | Element focus delegation.<br />Set to `false` and relies on native focusing. |
12
- | `multiple` | `multiple` | `boolean` | false | Allow multiple selections |
13
- | `renderer` | | `ListRenderer` | "new ListRenderer(this)" | Renderer used to render list item elements |
14
- | `stateless` | `stateless` | `boolean` | false | Disable selections |
15
- | `value` | `value` | `string` | "" | Returns the first selected item value.<br />Use `values` when multiple selection mode is enabled. |
16
- | `values` | | `string[]` | [] | Returns a values collection of the currently<br />selected item values |
7
+ | Property | Attribute | Type | Default | Description |
8
+ |-----------------------------|-------------|----------------|--------------------------|--------------------------------------------------|
9
+ | `data` | | `ListData` | null | The data object, used to render the list. |
10
+ | `delegatesFocus (readonly)` | | `false` | false | Element focus delegation.<br />Set to `false` and relies on native focusing. |
11
+ | `multiple` | `multiple` | `boolean` | false | Allow multiple selections |
12
+ | `renderer` | | `ListRenderer` | "new ListRenderer(this)" | Renderer used to render list item elements |
13
+ | `stateless` | `stateless` | `boolean` | false | Disable selections |
14
+ | `value` | `value` | `string` | "" | Returns the first selected item value.<br />Use `values` when multiple selection mode is enabled. |
15
+ | `values` | | `string[]` | [] | Returns a values collection of the currently<br />selected item values |
17
16
 
18
17
  ## Methods
19
18
 
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Combines prefix and a string to give unique item id used by aria-activedescendant
3
+ * @param prefix a unique randomly generated string
4
+ * @param value a string of valid item value
5
+ * @returns a unique item id
6
+ */
7
+ declare const getItemId: (prefix: string, value: string | undefined) => string;
8
+ export { getItemId };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Combines prefix and a string to give unique item id used by aria-activedescendant
3
+ * @param prefix a unique randomly generated string
4
+ * @param value a string of valid item value
5
+ * @returns a unique item id
6
+ */
7
+ const getItemId = (prefix, value) => {
8
+ if (!prefix || !value) {
9
+ return '';
10
+ }
11
+ return `${prefix}-${value}`;
12
+ };
13
+ export { getItemId };
@@ -5,5 +5,9 @@ import { Renderer } from '../renderer.js';
5
5
  * This is the default renderer for lists.
6
6
  */
7
7
  export declare class ListRenderer extends Renderer {
8
+ /**
9
+ * Renderer key prefix, used in combination with item value to give unique id to each item
10
+ */
11
+ key: string;
8
12
  constructor(context?: unknown);
9
13
  }
@@ -1,4 +1,6 @@
1
+ import { uuid } from '@refinitiv-ui/utils/uuid.js';
1
2
  import '../../item/index.js';
3
+ import { getItemId } from './item-id.js';
2
4
  import { Renderer } from '../renderer.js';
3
5
  /**
4
6
  * Renders list items as `ef-item` elements.
@@ -21,6 +23,7 @@ export class ListRenderer extends Renderer {
21
23
  el.label = composer.getItemPropertyValue(item, 'label');
22
24
  el.subLabel = composer.getItemPropertyValue(item, 'subLabel');
23
25
  el.value = composer.getItemPropertyValue(item, 'value');
26
+ el.id = getItemId(this.key, el.value);
24
27
  el.icon = composer.getItemPropertyValue(item, 'icon');
25
28
  el.highlighted = composer.getItemPropertyValue(item, 'highlighted') === true;
26
29
  el.selected = composer.getItemPropertyValue(item, 'selected') === true;
@@ -29,9 +32,14 @@ export class ListRenderer extends Renderer {
29
32
  el.type = composer.getItemPropertyValue(item, 'type');
30
33
  el.multiple = !!context && context.multiple === true;
31
34
  const itemRole = el.type === 'text' || !el.type ? 'option' : 'presentation';
35
+ el.tabIndex = -1;
32
36
  el.setAttribute('role', itemRole);
33
37
  tooltip ? el.setAttribute('title', tooltip) : el.removeAttribute('title');
34
38
  return el;
35
39
  });
40
+ /**
41
+ * Renderer key prefix, used in combination with item value to give unique id to each item
42
+ */
43
+ this.key = uuid();
36
44
  }
37
45
  }
@@ -1,3 +1,3 @@
1
- import type { CollectionComposer, DataItem } from '@refinitiv-ui/utils/lib/collection.js';
1
+ import type { CollectionComposer, DataItem } from '@refinitiv-ui/utils/collection.js';
2
2
  import type { ItemData } from '../../item';
3
3
  export declare type ListData<T extends DataItem = ItemData> = T[] | CollectionComposer<T> | null;
@@ -1,9 +1,9 @@
1
1
  import { JSXInterface } from '../jsx';
2
2
  import { ControlElement, CSSResultGroup, PropertyValues, TapEvent, TemplateResult } from '@refinitiv-ui/core';
3
- import { CollectionComposer, DataItem } from '@refinitiv-ui/utils/lib/collection.js';
3
+ import { CollectionComposer, DataItem } from '@refinitiv-ui/utils/collection.js';
4
4
  import type { ItemData } from '../item';
5
5
  import type { ListData } from './helpers/types';
6
- import { ListRenderer } from './helpers/list-renderer.js';
6
+ import { ListRenderer } from './helpers/renderer.js';
7
7
  import '../item/index.js';
8
8
  export type { ListData };
9
9
  export { ListRenderer };
@@ -48,10 +48,6 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
48
48
  * Composer used to query and modify item state.
49
49
  */
50
50
  protected composer: CollectionComposer<T>;
51
- /**
52
- * Use default `tabindex` so that items are priority focus targets
53
- */
54
- protected readonly defaultTabIndex: null;
55
51
  /**
56
52
  * Element focus delegation.
57
53
  * Set to `false` and relies on native focusing.
@@ -66,10 +62,6 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
66
62
  * Disable selections
67
63
  */
68
64
  stateless: boolean;
69
- /**
70
- * Aria indicating that list supports multiple selection
71
- */
72
- ariaMultiselectable: string;
73
65
  /**
74
66
  * Allow multiple selections
75
67
  */
@@ -280,9 +272,18 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
280
272
  * @returns {void}
281
273
  */
282
274
  protected renderLightDOM(): void;
275
+ /**
276
+ * Invoked when the element is first updated. Implement to perform one time work on the element after update.
277
+ * @param changeProperties changed properties
278
+ * @returns {void}
279
+ */
283
280
  protected firstUpdated(changeProperties: PropertyValues): void;
284
- protected update(changeProperties: PropertyValues): void;
285
- protected updated(changedProperties: PropertyValues): void;
281
+ /**
282
+ * Invoked before update() to compute values needed during the update.
283
+ * @param changeProperties changed properties
284
+ * @returns {void}
285
+ */
286
+ protected willUpdate(changeProperties: PropertyValues): void;
286
287
  /**
287
288
  * A `CSSResultGroup` that will be used
288
289
  * to style the host, slotted children
@@ -297,6 +298,11 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
297
298
  */
298
299
  protected render(): TemplateResult;
299
300
  }
301
+ declare global {
302
+ interface HTMLElementTagNameMap {
303
+ 'ef-list': List;
304
+ }
305
+ }
300
306
 
301
307
  declare global {
302
308
  interface HTMLElementTagNameMap {