@refinitiv-ui/elements 5.0.0-beta.3 → 5.0.0-dev.204

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 (596) hide show
  1. package/CHANGELOG.md +325 -73
  2. package/README.md +13 -2
  3. package/lib/accordion/custom-elements.json +0 -13
  4. package/lib/accordion/custom-elements.md +18 -0
  5. package/lib/accordion/index.d.ts +13 -10
  6. package/lib/accordion/index.js +15 -18
  7. package/lib/appstate-bar/custom-elements.json +1 -1
  8. package/lib/appstate-bar/custom-elements.md +22 -0
  9. package/lib/appstate-bar/index.d.ts +15 -6
  10. package/lib/appstate-bar/index.js +17 -11
  11. package/lib/autosuggest/custom-elements.json +24 -4
  12. package/lib/autosuggest/custom-elements.md +54 -0
  13. package/lib/autosuggest/helpers/types.d.ts +22 -1
  14. package/lib/autosuggest/helpers/types.js +0 -1
  15. package/lib/autosuggest/helpers/utils.d.ts +2 -2
  16. package/lib/autosuggest/helpers/utils.js +1 -3
  17. package/lib/autosuggest/index.d.ts +21 -9
  18. package/lib/autosuggest/index.js +45 -31
  19. package/lib/button/custom-elements.json +3 -3
  20. package/lib/button/custom-elements.md +23 -0
  21. package/lib/button/index.d.ts +27 -20
  22. package/lib/button/index.js +92 -74
  23. package/lib/button/themes/halo/dark/index.js +1 -1
  24. package/lib/button/themes/halo/light/index.js +1 -1
  25. package/lib/button/themes/solar/charcoal/index.js +1 -1
  26. package/lib/button/themes/solar/pearl/index.js +1 -1
  27. package/lib/button-bar/custom-elements.md +9 -0
  28. package/lib/button-bar/index.d.ts +60 -4
  29. package/lib/button-bar/index.js +164 -19
  30. package/lib/calendar/constants.d.ts +26 -0
  31. package/lib/calendar/constants.js +28 -0
  32. package/lib/calendar/custom-elements.json +8 -6
  33. package/lib/calendar/custom-elements.md +35 -0
  34. package/lib/calendar/index.d.ts +119 -21
  35. package/lib/calendar/index.js +512 -157
  36. package/lib/calendar/locales.d.ts +1 -31
  37. package/lib/calendar/locales.js +3 -107
  38. package/lib/calendar/themes/halo/dark/index.js +1 -1
  39. package/lib/calendar/themes/halo/light/index.js +1 -1
  40. package/lib/calendar/themes/solar/charcoal/index.js +1 -1
  41. package/lib/calendar/themes/solar/pearl/index.js +1 -1
  42. package/lib/calendar/types.d.ts +12 -13
  43. package/lib/calendar/types.js +1 -7
  44. package/lib/calendar/utils.d.ts +31 -1
  45. package/lib/calendar/utils.js +105 -3
  46. package/lib/canvas/custom-elements.json +9 -7
  47. package/lib/canvas/custom-elements.md +27 -0
  48. package/lib/canvas/index.d.ts +14 -6
  49. package/lib/canvas/index.js +17 -12
  50. package/lib/card/custom-elements.json +21 -9
  51. package/lib/card/custom-elements.md +24 -0
  52. package/lib/card/helpers/types.d.ts +1 -1
  53. package/lib/card/helpers/types.js +0 -1
  54. package/lib/card/index.d.ts +67 -20
  55. package/lib/card/index.js +132 -35
  56. package/lib/card/themes/halo/dark/index.js +1 -1
  57. package/lib/card/themes/halo/light/index.js +1 -1
  58. package/lib/card/themes/solar/charcoal/index.js +1 -1
  59. package/lib/card/themes/solar/pearl/index.js +1 -1
  60. package/lib/chart/custom-elements.json +3 -3
  61. package/lib/chart/custom-elements.md +16 -0
  62. package/lib/chart/helpers/index.d.ts +2 -0
  63. package/lib/chart/helpers/index.js +2 -0
  64. package/lib/chart/helpers/legend.d.ts +2 -2
  65. package/lib/chart/helpers/legend.js +2 -3
  66. package/lib/chart/helpers/merge.d.ts +15 -0
  67. package/lib/chart/helpers/merge.js +28 -0
  68. package/lib/chart/helpers/types.d.ts +40 -12
  69. package/lib/chart/helpers/types.js +0 -1
  70. package/lib/chart/index.d.ts +34 -26
  71. package/lib/chart/index.js +58 -55
  72. package/lib/chart/plugins/doughnut-center-label.js +4 -5
  73. package/lib/checkbox/custom-elements.json +4 -4
  74. package/lib/checkbox/custom-elements.md +18 -0
  75. package/lib/checkbox/index.d.ts +29 -14
  76. package/lib/checkbox/index.js +65 -34
  77. package/lib/checkbox/themes/halo/dark/index.js +1 -1
  78. package/lib/checkbox/themes/halo/light/index.js +1 -1
  79. package/lib/clock/custom-elements.json +21 -4
  80. package/lib/clock/custom-elements.md +28 -0
  81. package/lib/clock/index.d.ts +25 -6
  82. package/lib/clock/index.js +44 -18
  83. package/lib/clock/themes/halo/dark/index.js +1 -1
  84. package/lib/clock/themes/halo/light/index.js +1 -1
  85. package/lib/clock/themes/solar/charcoal/index.js +1 -1
  86. package/lib/clock/themes/solar/pearl/index.js +1 -1
  87. package/lib/clock/utils/TickManager.js +2 -3
  88. package/lib/clock/utils/timestamps.js +0 -1
  89. package/lib/collapse/custom-elements.md +27 -0
  90. package/lib/collapse/index.d.ts +15 -8
  91. package/lib/collapse/index.js +18 -13
  92. package/lib/color-dialog/custom-elements.json +29 -16
  93. package/lib/color-dialog/custom-elements.md +39 -0
  94. package/lib/color-dialog/elements/color-palettes.d.ts +13 -6
  95. package/lib/color-dialog/elements/color-palettes.js +16 -13
  96. package/lib/color-dialog/elements/grayscale-palettes.d.ts +13 -6
  97. package/lib/color-dialog/elements/grayscale-palettes.js +17 -13
  98. package/lib/color-dialog/elements/palettes.d.ts +15 -3
  99. package/lib/color-dialog/elements/palettes.js +65 -45
  100. package/lib/color-dialog/helpers/color-helpers.d.ts +7 -53
  101. package/lib/color-dialog/helpers/color-helpers.js +12 -110
  102. package/lib/color-dialog/helpers/value-model.d.ts +1 -1
  103. package/lib/color-dialog/helpers/value-model.js +18 -17
  104. package/lib/color-dialog/index.d.ts +27 -20
  105. package/lib/color-dialog/index.js +54 -45
  106. package/lib/combo-box/custom-elements.json +51 -17
  107. package/lib/combo-box/custom-elements.md +42 -0
  108. package/lib/combo-box/helpers/filter.d.ts +4 -4
  109. package/lib/combo-box/helpers/filter.js +0 -1
  110. package/lib/combo-box/helpers/keyboard-event.js +0 -1
  111. package/lib/combo-box/helpers/renderer.d.ts +8 -0
  112. package/lib/combo-box/helpers/renderer.js +24 -0
  113. package/lib/combo-box/helpers/types.d.ts +2 -2
  114. package/lib/combo-box/helpers/types.js +0 -1
  115. package/lib/combo-box/index.d.ts +63 -32
  116. package/lib/combo-box/index.js +102 -60
  117. package/lib/combo-box/themes/halo/dark/index.js +2 -3
  118. package/lib/combo-box/themes/halo/light/index.js +2 -3
  119. package/lib/combo-box/themes/solar/charcoal/index.js +2 -3
  120. package/lib/combo-box/themes/solar/pearl/index.js +2 -3
  121. package/lib/counter/custom-elements.json +39 -0
  122. package/lib/counter/custom-elements.md +11 -0
  123. package/lib/counter/index.d.ts +91 -0
  124. package/lib/counter/index.js +154 -0
  125. package/lib/counter/themes/halo/dark/index.js +3 -0
  126. package/lib/counter/themes/halo/light/index.js +3 -0
  127. package/lib/counter/themes/solar/charcoal/index.js +3 -0
  128. package/lib/counter/themes/solar/pearl/index.js +3 -0
  129. package/lib/counter/utils.d.ts +13 -0
  130. package/lib/counter/utils.js +52 -0
  131. package/lib/datetime-picker/custom-elements.json +53 -24
  132. package/lib/datetime-picker/custom-elements.md +57 -0
  133. package/lib/datetime-picker/index.d.ts +34 -16
  134. package/lib/datetime-picker/index.js +56 -38
  135. package/lib/datetime-picker/locales.d.ts +1 -1
  136. package/lib/datetime-picker/locales.js +12 -2
  137. package/lib/datetime-picker/themes/solar/charcoal/index.js +1 -1
  138. package/lib/datetime-picker/themes/solar/pearl/index.js +1 -1
  139. package/lib/datetime-picker/types.d.ts +1 -1
  140. package/lib/datetime-picker/types.js +0 -1
  141. package/lib/datetime-picker/utils.js +1 -2
  142. package/lib/dialog/custom-elements.json +34 -12
  143. package/lib/dialog/custom-elements.md +47 -0
  144. package/lib/dialog/draggable-element.js +25 -16
  145. package/lib/dialog/index.d.ts +25 -21
  146. package/lib/dialog/index.js +36 -32
  147. package/lib/email-field/custom-elements.json +81 -94
  148. package/lib/email-field/custom-elements.md +37 -0
  149. package/lib/email-field/index.d.ts +47 -112
  150. package/lib/email-field/index.js +48 -241
  151. package/lib/email-field/themes/halo/dark/index.js +1 -1
  152. package/lib/email-field/themes/halo/light/index.js +1 -1
  153. package/lib/email-field/themes/solar/charcoal/index.js +1 -1
  154. package/lib/email-field/themes/solar/pearl/index.js +1 -1
  155. package/lib/events.d.ts +121 -0
  156. package/lib/events.js +1 -0
  157. package/lib/flag/custom-elements.md +10 -0
  158. package/lib/flag/index.d.ts +14 -5
  159. package/lib/flag/index.js +19 -12
  160. package/lib/flag/utils/FlagLoader.d.ts +1 -1
  161. package/lib/flag/utils/FlagLoader.js +1 -2
  162. package/lib/header/custom-elements.md +18 -0
  163. package/lib/header/index.d.ts +10 -3
  164. package/lib/header/index.js +12 -8
  165. package/lib/heatmap/custom-elements.json +13 -0
  166. package/lib/heatmap/custom-elements.md +26 -0
  167. package/lib/heatmap/helpers/color.d.ts +1 -1
  168. package/lib/heatmap/helpers/color.js +1 -2
  169. package/lib/heatmap/helpers/text.d.ts +1 -1
  170. package/lib/heatmap/helpers/text.js +0 -1
  171. package/lib/heatmap/helpers/track.js +2 -3
  172. package/lib/heatmap/helpers/types.js +0 -1
  173. package/lib/heatmap/index.d.ts +32 -13
  174. package/lib/heatmap/index.js +61 -35
  175. package/lib/icon/custom-elements.json +6 -4
  176. package/lib/icon/custom-elements.md +8 -0
  177. package/lib/icon/index.d.ts +17 -7
  178. package/lib/icon/index.js +36 -18
  179. package/lib/icon/utils/IconLoader.d.ts +6 -1
  180. package/lib/icon/utils/IconLoader.js +24 -18
  181. package/lib/index.d.ts +2 -0
  182. package/lib/index.js +2 -1
  183. package/lib/interactive-chart/custom-elements.json +5 -11
  184. package/lib/interactive-chart/custom-elements.md +31 -0
  185. package/lib/interactive-chart/helpers/merge.d.ts +15 -0
  186. package/lib/interactive-chart/helpers/merge.js +28 -0
  187. package/lib/interactive-chart/helpers/types.d.ts +10 -9
  188. package/lib/interactive-chart/helpers/types.js +6 -2
  189. package/lib/interactive-chart/index.d.ts +37 -18
  190. package/lib/interactive-chart/index.js +61 -51
  191. package/lib/item/custom-elements.json +4 -4
  192. package/lib/item/custom-elements.md +29 -0
  193. package/lib/item/helpers/types.d.ts +1 -1
  194. package/lib/item/helpers/types.js +0 -1
  195. package/lib/item/index.d.ts +26 -9
  196. package/lib/item/index.js +43 -16
  197. package/lib/label/custom-elements.json +7 -16
  198. package/lib/label/custom-elements.md +11 -0
  199. package/lib/label/index.d.ts +41 -73
  200. package/lib/label/index.js +150 -187
  201. package/lib/layout/custom-elements.md +26 -0
  202. package/lib/layout/index.d.ts +11 -4
  203. package/lib/layout/index.js +13 -9
  204. package/lib/led-gauge/custom-elements.json +4 -4
  205. package/lib/led-gauge/custom-elements.md +17 -0
  206. package/lib/led-gauge/index.d.ts +13 -5
  207. package/lib/led-gauge/index.js +16 -11
  208. package/lib/list/custom-elements.json +37 -5
  209. package/lib/list/custom-elements.md +33 -0
  210. package/lib/list/extensible-function.js +2 -1
  211. package/lib/list/helpers/list-renderer.d.ts +2 -2
  212. package/lib/list/helpers/list-renderer.js +4 -3
  213. package/lib/list/helpers/types.d.ts +2 -2
  214. package/lib/list/helpers/types.js +0 -1
  215. package/lib/list/index.d.ts +47 -12
  216. package/lib/list/index.js +100 -39
  217. package/lib/list/renderer.d.ts +2 -2
  218. package/lib/list/renderer.js +1 -2
  219. package/lib/loader/custom-elements.md +5 -0
  220. package/lib/loader/index.d.ts +8 -1
  221. package/lib/loader/index.js +11 -8
  222. package/lib/multi-input/custom-elements.json +7 -6
  223. package/lib/multi-input/custom-elements.md +43 -0
  224. package/lib/multi-input/helpers/types.d.ts +1 -1
  225. package/lib/multi-input/helpers/types.js +0 -1
  226. package/lib/multi-input/index.d.ts +19 -8
  227. package/lib/multi-input/index.js +28 -18
  228. package/lib/multi-input/themes/solar/charcoal/index.js +1 -1
  229. package/lib/multi-input/themes/solar/pearl/index.js +1 -1
  230. package/lib/notification/custom-elements.md +26 -0
  231. package/lib/notification/elements/notification-tray.d.ts +10 -4
  232. package/lib/notification/elements/notification-tray.js +15 -11
  233. package/lib/notification/elements/notification.d.ts +19 -7
  234. package/lib/notification/elements/notification.js +25 -13
  235. package/lib/notification/helpers/status.d.ts +1 -1
  236. package/lib/notification/helpers/status.js +1 -2
  237. package/lib/notification/helpers/types.d.ts +1 -1
  238. package/lib/notification/helpers/types.js +0 -1
  239. package/lib/notification/index.d.ts +2 -2
  240. package/lib/notification/index.js +2 -3
  241. package/lib/number-field/custom-elements.json +99 -54
  242. package/lib/number-field/custom-elements.md +42 -0
  243. package/lib/number-field/index.d.ts +104 -52
  244. package/lib/number-field/index.js +129 -88
  245. package/lib/number-field/themes/halo/dark/index.js +1 -1
  246. package/lib/number-field/themes/halo/light/index.js +1 -1
  247. package/lib/number-field/themes/solar/charcoal/index.js +1 -1
  248. package/lib/number-field/themes/solar/pearl/index.js +1 -1
  249. package/lib/overlay/custom-elements.json +26 -13
  250. package/lib/overlay/custom-elements.md +54 -0
  251. package/lib/overlay/elements/overlay-backdrop.d.ts +12 -5
  252. package/lib/overlay/elements/overlay-backdrop.js +13 -9
  253. package/lib/overlay/elements/overlay-viewport.d.ts +11 -4
  254. package/lib/overlay/elements/overlay-viewport.js +12 -9
  255. package/lib/overlay/elements/overlay.d.ts +18 -6
  256. package/lib/overlay/elements/overlay.js +35 -28
  257. package/lib/overlay/helpers/functions.js +0 -1
  258. package/lib/overlay/helpers/types.js +0 -1
  259. package/lib/overlay/index.d.ts +2 -2
  260. package/lib/overlay/index.js +1 -2
  261. package/lib/overlay/managers/backdrop-manager.d.ts +2 -2
  262. package/lib/overlay/managers/backdrop-manager.js +2 -3
  263. package/lib/overlay/managers/close-manager.d.ts +1 -1
  264. package/lib/overlay/managers/close-manager.js +1 -2
  265. package/lib/overlay/managers/focus-manager.d.ts +1 -1
  266. package/lib/overlay/managers/focus-manager.js +3 -5
  267. package/lib/overlay/managers/interaction-lock-manager.js +2 -3
  268. package/lib/overlay/managers/viewport-manager.d.ts +3 -3
  269. package/lib/overlay/managers/viewport-manager.js +6 -3
  270. package/lib/overlay/managers/zindex-manager.d.ts +1 -1
  271. package/lib/overlay/managers/zindex-manager.js +1 -4
  272. package/lib/overlay-menu/custom-elements.json +126 -12
  273. package/lib/overlay-menu/custom-elements.md +44 -0
  274. package/lib/overlay-menu/helpers/types.d.ts +3 -3
  275. package/lib/overlay-menu/helpers/types.js +0 -1
  276. package/lib/overlay-menu/index.d.ts +44 -12
  277. package/lib/overlay-menu/index.js +66 -35
  278. package/lib/overlay-menu/managers/menu-manager.d.ts +2 -2
  279. package/lib/overlay-menu/managers/menu-manager.js +8 -8
  280. package/lib/pagination/custom-elements.json +16 -33
  281. package/lib/pagination/custom-elements.md +26 -0
  282. package/lib/pagination/index.d.ts +156 -81
  283. package/lib/pagination/index.js +373 -214
  284. package/lib/pagination/themes/halo/dark/index.js +1 -1
  285. package/lib/pagination/themes/halo/light/index.js +1 -1
  286. package/lib/pagination/themes/solar/charcoal/index.js +1 -1
  287. package/lib/pagination/themes/solar/pearl/index.js +1 -1
  288. package/lib/panel/custom-elements.md +11 -0
  289. package/lib/panel/index.d.ts +11 -4
  290. package/lib/panel/index.js +13 -9
  291. package/lib/password-field/custom-elements.json +62 -67
  292. package/lib/password-field/custom-elements.md +39 -0
  293. package/lib/password-field/index.d.ts +46 -90
  294. package/lib/password-field/index.js +52 -190
  295. package/lib/password-field/themes/halo/dark/index.js +1 -1
  296. package/lib/password-field/themes/halo/light/index.js +1 -1
  297. package/lib/password-field/themes/solar/charcoal/index.js +1 -1
  298. package/lib/password-field/themes/solar/pearl/index.js +1 -1
  299. package/lib/pill/custom-elements.json +9 -7
  300. package/lib/pill/custom-elements.md +22 -0
  301. package/lib/pill/index.d.ts +15 -7
  302. package/lib/pill/index.js +21 -27
  303. package/lib/pill/themes/halo/dark/index.js +1 -1
  304. package/lib/pill/themes/halo/light/index.js +1 -1
  305. package/lib/progress-bar/custom-elements.md +18 -0
  306. package/lib/progress-bar/index.d.ts +11 -15
  307. package/lib/progress-bar/index.js +14 -25
  308. package/lib/radio-button/custom-elements.json +4 -4
  309. package/lib/radio-button/custom-elements.md +19 -0
  310. package/lib/radio-button/index.d.ts +33 -9
  311. package/lib/radio-button/index.js +97 -24
  312. package/lib/radio-button/radio-button-registry.d.ts +3 -2
  313. package/lib/radio-button/radio-button-registry.js +57 -5
  314. package/lib/radio-button/themes/halo/dark/index.js +1 -1
  315. package/lib/radio-button/themes/halo/light/index.js +1 -1
  316. package/lib/rating/custom-elements.md +17 -0
  317. package/lib/rating/index.d.ts +11 -4
  318. package/lib/rating/index.js +16 -10
  319. package/lib/search-field/custom-elements.json +70 -74
  320. package/lib/search-field/custom-elements.md +41 -0
  321. package/lib/search-field/index.d.ts +47 -97
  322. package/lib/search-field/index.js +50 -212
  323. package/lib/search-field/themes/halo/dark/index.js +1 -1
  324. package/lib/search-field/themes/halo/light/index.js +1 -1
  325. package/lib/search-field/themes/solar/charcoal/index.js +1 -1
  326. package/lib/search-field/themes/solar/pearl/index.js +1 -1
  327. package/lib/select/custom-elements.json +5 -4
  328. package/lib/select/custom-elements.md +24 -0
  329. package/lib/select/helpers/types.d.ts +1 -1
  330. package/lib/select/helpers/types.js +0 -1
  331. package/lib/select/index.d.ts +26 -11
  332. package/lib/select/index.js +93 -52
  333. package/lib/select/themes/halo/dark/index.js +1 -1
  334. package/lib/select/themes/halo/light/index.js +1 -1
  335. package/lib/sidebar-layout/custom-elements.json +2 -6
  336. package/lib/sidebar-layout/custom-elements.md +21 -0
  337. package/lib/sidebar-layout/index.d.ts +15 -7
  338. package/lib/sidebar-layout/index.js +16 -10
  339. package/lib/slider/custom-elements.json +4 -4
  340. package/lib/slider/custom-elements.md +28 -0
  341. package/lib/slider/index.d.ts +18 -5
  342. package/lib/slider/index.js +69 -16
  343. package/lib/sparkline/custom-elements.json +4 -4
  344. package/lib/sparkline/custom-elements.md +16 -0
  345. package/lib/sparkline/index.d.ts +14 -5
  346. package/lib/sparkline/index.js +17 -10
  347. package/lib/swing-gauge/const.d.ts +22 -0
  348. package/lib/swing-gauge/const.js +26 -0
  349. package/lib/swing-gauge/custom-elements.json +51 -22
  350. package/lib/swing-gauge/custom-elements.md +17 -0
  351. package/lib/swing-gauge/helpers.d.ts +8 -0
  352. package/lib/swing-gauge/helpers.js +105 -0
  353. package/lib/swing-gauge/index.d.ts +220 -72
  354. package/lib/swing-gauge/index.js +648 -168
  355. package/lib/swing-gauge/themes/halo/dark/index.js +1 -1
  356. package/lib/swing-gauge/themes/halo/light/index.js +1 -1
  357. package/lib/swing-gauge/themes/solar/charcoal/index.js +1 -1
  358. package/lib/swing-gauge/themes/solar/pearl/index.js +1 -1
  359. package/lib/swing-gauge/types.d.ts +34 -0
  360. package/lib/swing-gauge/types.js +1 -0
  361. package/lib/tab/custom-elements.json +10 -21
  362. package/lib/tab/custom-elements.md +22 -0
  363. package/lib/tab/index.d.ts +19 -14
  364. package/lib/tab/index.js +31 -40
  365. package/lib/tab/themes/halo/dark/index.js +1 -1
  366. package/lib/tab/themes/halo/light/index.js +1 -1
  367. package/lib/tab/themes/solar/charcoal/index.js +1 -1
  368. package/lib/tab/themes/solar/pearl/index.js +1 -1
  369. package/lib/tab-bar/custom-elements.json +0 -6
  370. package/lib/tab-bar/custom-elements.md +11 -0
  371. package/lib/tab-bar/helpers/animate.d.ts +1 -1
  372. package/lib/tab-bar/helpers/animate.js +5 -2
  373. package/lib/tab-bar/index.d.ts +12 -5
  374. package/lib/tab-bar/index.js +18 -21
  375. package/lib/tab-bar/themes/solar/charcoal/index.js +1 -1
  376. package/lib/tab-bar/themes/solar/pearl/index.js +1 -1
  377. package/lib/text-field/custom-elements.json +78 -89
  378. package/lib/text-field/custom-elements.md +35 -0
  379. package/lib/text-field/index.d.ts +67 -80
  380. package/lib/text-field/index.js +106 -157
  381. package/lib/text-field/themes/halo/dark/index.js +1 -1
  382. package/lib/text-field/themes/halo/light/index.js +1 -1
  383. package/lib/text-field/themes/solar/charcoal/index.js +1 -1
  384. package/lib/text-field/themes/solar/pearl/index.js +1 -1
  385. package/lib/time-picker/custom-elements.json +6 -8
  386. package/lib/time-picker/custom-elements.md +28 -0
  387. package/lib/time-picker/index.d.ts +105 -65
  388. package/lib/time-picker/index.js +297 -169
  389. package/lib/time-picker/themes/solar/charcoal/index.js +1 -1
  390. package/lib/time-picker/themes/solar/pearl/index.js +1 -1
  391. package/lib/toggle/custom-elements.json +4 -4
  392. package/lib/toggle/custom-elements.md +19 -0
  393. package/lib/toggle/index.d.ts +22 -5
  394. package/lib/toggle/index.js +58 -13
  395. package/lib/toggle/themes/halo/dark/index.js +1 -1
  396. package/lib/toggle/themes/halo/light/index.js +1 -1
  397. package/lib/toggle/themes/solar/charcoal/index.js +1 -1
  398. package/lib/toggle/themes/solar/pearl/index.js +1 -1
  399. package/lib/tooltip/custom-elements.md +14 -0
  400. package/lib/tooltip/elements/title-tooltip.js +2 -3
  401. package/lib/tooltip/elements/tooltip-element.d.ts +2 -3
  402. package/lib/tooltip/elements/tooltip-element.js +0 -2
  403. package/lib/tooltip/helpers/overflow-tooltip.d.ts +1 -1
  404. package/lib/tooltip/helpers/overflow-tooltip.js +1 -2
  405. package/lib/tooltip/helpers/renderer.d.ts +1 -1
  406. package/lib/tooltip/helpers/renderer.js +0 -1
  407. package/lib/tooltip/helpers/types.d.ts +1 -1
  408. package/lib/tooltip/helpers/types.js +0 -1
  409. package/lib/tooltip/index.d.ts +18 -11
  410. package/lib/tooltip/index.js +27 -23
  411. package/lib/tooltip/managers/tooltip-manager.d.ts +2 -2
  412. package/lib/tooltip/managers/tooltip-manager.js +17 -11
  413. package/lib/tornado-chart/custom-elements.md +18 -0
  414. package/lib/tornado-chart/elements/tornado-chart.d.ts +12 -5
  415. package/lib/tornado-chart/elements/tornado-chart.js +15 -11
  416. package/lib/tornado-chart/elements/tornado-item.d.ts +13 -6
  417. package/lib/tornado-chart/elements/tornado-item.js +17 -12
  418. package/lib/tornado-chart/index.d.ts +2 -2
  419. package/lib/tornado-chart/index.js +2 -3
  420. package/lib/tree/custom-elements.json +30 -2
  421. package/lib/tree/custom-elements.md +32 -0
  422. package/lib/tree/elements/tree-item.d.ts +53 -5
  423. package/lib/tree/elements/tree-item.js +114 -34
  424. package/lib/tree/elements/tree.d.ts +65 -20
  425. package/lib/tree/elements/tree.js +151 -34
  426. package/lib/tree/helpers/filter.d.ts +8 -0
  427. package/lib/tree/helpers/filter.js +33 -0
  428. package/lib/tree/helpers/renderer.d.ts +2 -2
  429. package/lib/tree/helpers/renderer.js +4 -4
  430. package/lib/tree/helpers/types.d.ts +13 -1
  431. package/lib/tree/helpers/types.js +0 -1
  432. package/lib/tree/index.d.ts +4 -4
  433. package/lib/tree/index.js +3 -4
  434. package/lib/tree/managers/tree-manager.d.ts +22 -10
  435. package/lib/tree/managers/tree-manager.js +56 -41
  436. package/lib/tree/themes/halo/dark/index.js +1 -1
  437. package/lib/tree/themes/halo/light/index.js +1 -1
  438. package/lib/tree/themes/solar/charcoal/index.js +1 -1
  439. package/lib/tree/themes/solar/pearl/index.js +1 -1
  440. package/lib/tree-select/custom-elements.json +14 -5
  441. package/lib/tree-select/custom-elements.md +26 -0
  442. package/lib/tree-select/helpers/types.d.ts +2 -2
  443. package/lib/tree-select/helpers/types.js +0 -1
  444. package/lib/tree-select/index.d.ts +55 -27
  445. package/lib/tree-select/index.js +107 -45
  446. package/lib/tree-select/themes/halo/dark/index.js +3 -2
  447. package/lib/tree-select/themes/halo/light/index.js +3 -2
  448. package/lib/tree-select/themes/solar/charcoal/index.js +3 -2
  449. package/lib/tree-select/themes/solar/pearl/index.js +3 -2
  450. package/lib/version.d.ts +1 -0
  451. package/lib/version.js +1 -0
  452. package/package.json +601 -25
  453. package/lib/accordion/index.js.map +0 -1
  454. package/lib/appstate-bar/index.js.map +0 -1
  455. package/lib/autosuggest/helpers/const.d.ts +0 -2
  456. package/lib/autosuggest/helpers/const.js +0 -4
  457. package/lib/autosuggest/helpers/const.js.map +0 -1
  458. package/lib/autosuggest/helpers/types.js.map +0 -1
  459. package/lib/autosuggest/helpers/utils.js.map +0 -1
  460. package/lib/autosuggest/index.js.map +0 -1
  461. package/lib/button/index.js.map +0 -1
  462. package/lib/button-bar/index.js.map +0 -1
  463. package/lib/calendar/index.js.map +0 -1
  464. package/lib/calendar/locales.js.map +0 -1
  465. package/lib/calendar/types.js.map +0 -1
  466. package/lib/calendar/utils.js.map +0 -1
  467. package/lib/canvas/index.js.map +0 -1
  468. package/lib/card/helpers/types.js.map +0 -1
  469. package/lib/card/index.js.map +0 -1
  470. package/lib/chart/helpers/legend.js.map +0 -1
  471. package/lib/chart/helpers/types.js.map +0 -1
  472. package/lib/chart/index.js.map +0 -1
  473. package/lib/chart/plugins/doughnut-center-label.js.map +0 -1
  474. package/lib/checkbox/index.js.map +0 -1
  475. package/lib/clock/index.js.map +0 -1
  476. package/lib/clock/utils/TickManager.js.map +0 -1
  477. package/lib/clock/utils/timestamps.js.map +0 -1
  478. package/lib/collapse/index.js.map +0 -1
  479. package/lib/color-dialog/elements/color-palettes.js.map +0 -1
  480. package/lib/color-dialog/elements/grayscale-palettes.js.map +0 -1
  481. package/lib/color-dialog/elements/palettes.js.map +0 -1
  482. package/lib/color-dialog/helpers/color-helpers.js.map +0 -1
  483. package/lib/color-dialog/helpers/value-model.js.map +0 -1
  484. package/lib/color-dialog/index.js.map +0 -1
  485. package/lib/combo-box/helpers/filter.js.map +0 -1
  486. package/lib/combo-box/helpers/keyboard-event.js.map +0 -1
  487. package/lib/combo-box/helpers/types.js.map +0 -1
  488. package/lib/combo-box/index.js.map +0 -1
  489. package/lib/datetime-picker/index.js.map +0 -1
  490. package/lib/datetime-picker/locales.js.map +0 -1
  491. package/lib/datetime-picker/types.js.map +0 -1
  492. package/lib/datetime-picker/utils.js.map +0 -1
  493. package/lib/dialog/draggable-element.js.map +0 -1
  494. package/lib/dialog/index.js.map +0 -1
  495. package/lib/email-field/index.js.map +0 -1
  496. package/lib/flag/index.js.map +0 -1
  497. package/lib/flag/utils/FlagLoader.js.map +0 -1
  498. package/lib/header/index.js.map +0 -1
  499. package/lib/heatmap/helpers/color.js.map +0 -1
  500. package/lib/heatmap/helpers/text.js.map +0 -1
  501. package/lib/heatmap/helpers/track.js.map +0 -1
  502. package/lib/heatmap/helpers/types.js.map +0 -1
  503. package/lib/heatmap/index.js.map +0 -1
  504. package/lib/icon/index.js.map +0 -1
  505. package/lib/icon/utils/IconLoader.js.map +0 -1
  506. package/lib/index.js.map +0 -1
  507. package/lib/interactive-chart/helpers/types.js.map +0 -1
  508. package/lib/interactive-chart/index.js.map +0 -1
  509. package/lib/item/helpers/types.js.map +0 -1
  510. package/lib/item/index.js.map +0 -1
  511. package/lib/label/helpers/text.d.ts +0 -35
  512. package/lib/label/helpers/text.js +0 -57
  513. package/lib/label/helpers/text.js.map +0 -1
  514. package/lib/label/index.js.map +0 -1
  515. package/lib/layout/index.js.map +0 -1
  516. package/lib/led-gauge/index.js.map +0 -1
  517. package/lib/list/extensible-function.js.map +0 -1
  518. package/lib/list/helpers/list-renderer.js.map +0 -1
  519. package/lib/list/helpers/types.js.map +0 -1
  520. package/lib/list/index.js.map +0 -1
  521. package/lib/list/renderer.js.map +0 -1
  522. package/lib/loader/index.js.map +0 -1
  523. package/lib/multi-input/helpers/types.js.map +0 -1
  524. package/lib/multi-input/index.js.map +0 -1
  525. package/lib/notification/elements/notification-tray.js.map +0 -1
  526. package/lib/notification/elements/notification.js.map +0 -1
  527. package/lib/notification/helpers/status.js.map +0 -1
  528. package/lib/notification/helpers/types.js.map +0 -1
  529. package/lib/notification/index.js.map +0 -1
  530. package/lib/number-field/index.js.map +0 -1
  531. package/lib/overlay/elements/overlay-backdrop.js.map +0 -1
  532. package/lib/overlay/elements/overlay-viewport.js.map +0 -1
  533. package/lib/overlay/elements/overlay.js.map +0 -1
  534. package/lib/overlay/helpers/functions.js.map +0 -1
  535. package/lib/overlay/helpers/types.js.map +0 -1
  536. package/lib/overlay/index.js.map +0 -1
  537. package/lib/overlay/managers/backdrop-manager.js.map +0 -1
  538. package/lib/overlay/managers/close-manager.js.map +0 -1
  539. package/lib/overlay/managers/focus-manager.js.map +0 -1
  540. package/lib/overlay/managers/interaction-lock-manager.js.map +0 -1
  541. package/lib/overlay/managers/viewport-manager.js.map +0 -1
  542. package/lib/overlay/managers/zindex-manager.js.map +0 -1
  543. package/lib/overlay-menu/helpers/types.js.map +0 -1
  544. package/lib/overlay-menu/helpers/uuid.d.ts +0 -7
  545. package/lib/overlay-menu/helpers/uuid.js +0 -14
  546. package/lib/overlay-menu/helpers/uuid.js.map +0 -1
  547. package/lib/overlay-menu/index.js.map +0 -1
  548. package/lib/overlay-menu/managers/menu-manager.js.map +0 -1
  549. package/lib/pagination/helpers/types.d.ts +0 -9
  550. package/lib/pagination/helpers/types.js +0 -2
  551. package/lib/pagination/helpers/types.js.map +0 -1
  552. package/lib/pagination/index.js.map +0 -1
  553. package/lib/panel/index.js.map +0 -1
  554. package/lib/password-field/index.js.map +0 -1
  555. package/lib/pill/index.js.map +0 -1
  556. package/lib/progress-bar/index.js.map +0 -1
  557. package/lib/radio-button/index.js.map +0 -1
  558. package/lib/radio-button/radio-button-registry.js.map +0 -1
  559. package/lib/rating/index.js.map +0 -1
  560. package/lib/search-field/index.js.map +0 -1
  561. package/lib/select/helpers/types.js.map +0 -1
  562. package/lib/select/index.js.map +0 -1
  563. package/lib/sidebar-layout/index.js.map +0 -1
  564. package/lib/slider/index.js.map +0 -1
  565. package/lib/sparkline/index.js.map +0 -1
  566. package/lib/swing-gauge/helpers/canvas.d.ts +0 -8
  567. package/lib/swing-gauge/helpers/canvas.js +0 -115
  568. package/lib/swing-gauge/helpers/canvas.js.map +0 -1
  569. package/lib/swing-gauge/helpers/types.d.ts +0 -33
  570. package/lib/swing-gauge/helpers/types.js +0 -2
  571. package/lib/swing-gauge/helpers/types.js.map +0 -1
  572. package/lib/swing-gauge/index.js.map +0 -1
  573. package/lib/tab/index.js.map +0 -1
  574. package/lib/tab-bar/helpers/animate.js.map +0 -1
  575. package/lib/tab-bar/index.js.map +0 -1
  576. package/lib/text-field/index.js.map +0 -1
  577. package/lib/time-picker/index.js.map +0 -1
  578. package/lib/toggle/index.js.map +0 -1
  579. package/lib/tooltip/elements/title-tooltip.js.map +0 -1
  580. package/lib/tooltip/elements/tooltip-element.js.map +0 -1
  581. package/lib/tooltip/helpers/overflow-tooltip.js.map +0 -1
  582. package/lib/tooltip/helpers/renderer.js.map +0 -1
  583. package/lib/tooltip/helpers/types.js.map +0 -1
  584. package/lib/tooltip/index.js.map +0 -1
  585. package/lib/tooltip/managers/tooltip-manager.js.map +0 -1
  586. package/lib/tornado-chart/elements/tornado-chart.js.map +0 -1
  587. package/lib/tornado-chart/elements/tornado-item.js.map +0 -1
  588. package/lib/tornado-chart/index.js.map +0 -1
  589. package/lib/tree/elements/tree-item.js.map +0 -1
  590. package/lib/tree/elements/tree.js.map +0 -1
  591. package/lib/tree/helpers/renderer.js.map +0 -1
  592. package/lib/tree/helpers/types.js.map +0 -1
  593. package/lib/tree/index.js.map +0 -1
  594. package/lib/tree/managers/tree-manager.js.map +0 -1
  595. package/lib/tree-select/helpers/types.js.map +0 -1
  596. package/lib/tree-select/index.js.map +0 -1
@@ -1,3 +1,3 @@
1
1
  import '@refinitiv-ui/elements/lib/canvas/themes/halo/dark';
2
2
 
3
- elf.customStyles.define('ef-swing-gauge', ':host{--primary-color:#6678FF;--secondary-color:#FFFFFF;--text-color:#FFFFFF;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6;--secondary-color:#0D0D0D;--center-line-color:#FFFFFF;--border-color:#6678FF;--center-line:dotted}');
3
+ elf.customStyles.define('ef-swing-gauge', ':host{--primary-color:#6678FF;--secondary-color:#FFFFFF;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6;--secondary-color:#0D0D0D;--center-line-color:#FFFFFF;--border-color:#6678FF;--center-line:dotted}:host [part=legend-container-outer]{padding-bottom:30px}:host [part=primary-legend],:host [part=secondary-legend]{margin-top:4px;align-items:center}:host [part=primary-legend-symbol],:host [part=secondary-legend-symbol]{border-radius:50%;margin-right:10px;align-self:baseline;margin-top:1px;border:1px solid var(--border-color,#6678ff);height:10px;width:10px}:host [part=primary-legend-symbol]{background-color:var(--primary-color)}:host [part=secondary-legend-symbol]{background-color:var(--secondary-color)}:host [part=primary-value],:host [part=secondary-value]{font-weight:500}');
@@ -1,3 +1,3 @@
1
1
  import '@refinitiv-ui/elements/lib/canvas/themes/halo/light';
2
2
 
3
- elf.customStyles.define('ef-swing-gauge', ':host{--primary-color:#334BFF;--secondary-color:#0D0D0D;--text-color:#FFFFFF;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6;--secondary-color:#0D0D0D;--center-line-color:#FFFFFF;--border-color:#334BFF;--center-line:dotted}');
3
+ elf.customStyles.define('ef-swing-gauge', ':host{--primary-color:#334BFF;--secondary-color:#0D0D0D;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6;--secondary-color:#0D0D0D;--center-line-color:#FFFFFF;--border-color:#334BFF;--center-line:dotted}:host [part=legend-container-outer]{padding-bottom:30px}:host [part=primary-legend],:host [part=secondary-legend]{margin-top:4px;align-items:center}:host [part=primary-legend-symbol],:host [part=secondary-legend-symbol]{border-radius:50%;margin-right:10px;align-self:baseline;margin-top:1px;height:12px;width:12px}:host [part=primary-legend-symbol]{background-color:var(--primary-color)}:host [part=secondary-legend-symbol]{background-color:var(--secondary-color)}:host [part=primary-value],:host [part=secondary-value]{font-weight:500}');
@@ -1,3 +1,3 @@
1
1
  import '@refinitiv-ui/elements/lib/canvas/themes/solar/charcoal';
2
2
 
3
- elf.customStyles.define('ef-swing-gauge', ':host{--primary-color:#FF9933;--secondary-color:#3780BF;--text-color:#FFFFFF;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6;--primary-color:#2EB4C9;--secondary-color:#C93C4B;--text-color:#FFFFFF;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6}');
3
+ elf.customStyles.define('ef-swing-gauge', ':host{--primary-color:#FF9933;--secondary-color:#3780BF;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6;--primary-color:#2EB4C9;--secondary-color:#C93C4B;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6}:host [part=legend-container-outer]{padding-bottom:30px}:host [part=primary-legend],:host [part=secondary-legend]{margin-top:4px;align-items:center}:host [part=primary-legend-symbol],:host [part=secondary-legend-symbol]{height:12px;width:12px;border-radius:50%;margin-right:10px;align-self:baseline;margin-top:1px}:host [part=primary-legend-symbol]{background-color:var(--primary-color)}:host [part=secondary-legend-symbol]{background-color:var(--secondary-color)}:host [part=primary-value],:host [part=secondary-value]{font-weight:500}');
@@ -1,3 +1,3 @@
1
1
  import '@refinitiv-ui/elements/lib/canvas/themes/solar/pearl';
2
2
 
3
- elf.customStyles.define('ef-swing-gauge', ':host{--primary-color:#EE7600;--secondary-color:#3780BF;--text-color:#FFFFFF;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6;--primary-color:#2EB4C9;--secondary-color:#C93C4B;--text-color:#FFFFFF;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6}');
3
+ elf.customStyles.define('ef-swing-gauge', ':host{--primary-color:#EE7600;--secondary-color:#3780BF;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6;--primary-color:#2EB4C9;--secondary-color:#C93C4B;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6}:host [part=legend-container-outer]{padding-bottom:30px}:host [part=primary-legend],:host [part=secondary-legend]{margin-top:4px;align-items:center}:host [part=primary-legend-symbol],:host [part=secondary-legend-symbol]{height:12px;width:12px;border-radius:50%;margin-right:10px;align-self:baseline;margin-top:1px}:host [part=primary-legend-symbol]{background-color:var(--primary-color)}:host [part=secondary-legend-symbol]{background-color:var(--secondary-color)}:host [part=primary-value],:host [part=secondary-value]{font-weight:500}');
@@ -0,0 +1,34 @@
1
+ declare type SwingGaugeValueFormatter = (value: number, rawValue?: number) => string | number | undefined;
2
+ interface SwingGaugeData {
3
+ size: number;
4
+ width: number;
5
+ height: number;
6
+ fillPercentage?: number;
7
+ gaugeWidthScale: number;
8
+ gaugeHeightScale: number;
9
+ gaugeUpperBound: number;
10
+ gaugeLowerBound: number;
11
+ lineLength: number;
12
+ offsetLeftPrimaryLine: number;
13
+ offsetTopPrimaryLine: number;
14
+ offsetLeftPrimaryPoint: number;
15
+ offsetTopPrimaryPoint: number;
16
+ offsetLeftSecondaryLine: number;
17
+ offsetTopSecondaryLine: number;
18
+ offsetLeftSecondaryPoint: number;
19
+ offsetTopSecondaryPoint: number;
20
+ }
21
+ interface SwingGaugeStyle {
22
+ strokeWidth: number;
23
+ primaryColor: string;
24
+ secondaryColor: string;
25
+ borderColor: string;
26
+ centerline: string;
27
+ centerlineOpacity: string;
28
+ centerlineColor: string;
29
+ }
30
+ interface SwingGaugeCanvasSize {
31
+ width: number;
32
+ height: number;
33
+ }
34
+ export { SwingGaugeData, SwingGaugeStyle, SwingGaugeCanvasSize, SwingGaugeValueFormatter };
@@ -0,0 +1 @@
1
+ export {};
@@ -36,15 +36,10 @@
36
36
  "default": "false"
37
37
  },
38
38
  {
39
- "name": "truncate",
40
- "description": "Enable shortening the label",
41
- "type": "\"\" | \"center\" | null | undefined",
42
- "default": "\"\""
43
- },
44
- {
45
- "name": "max-line",
39
+ "name": "line-clamp",
46
40
  "description": "Limit the number of lines before truncating",
47
- "type": "string | null | undefined"
41
+ "type": "number",
42
+ "default": "1"
48
43
  },
49
44
  {
50
45
  "name": "clears-on-hover",
@@ -56,7 +51,7 @@
56
51
  "name": "disabled",
57
52
  "description": "Set disabled state",
58
53
  "type": "boolean",
59
- "default": "\"false\""
54
+ "default": "false"
60
55
  }
61
56
  ],
62
57
  "properties": [
@@ -96,17 +91,11 @@
96
91
  "default": "false"
97
92
  },
98
93
  {
99
- "name": "truncate",
100
- "attribute": "truncate",
101
- "description": "Enable shortening the label",
102
- "type": "\"\" | \"center\" | null | undefined",
103
- "default": "\"\""
104
- },
105
- {
106
- "name": "maxLine",
107
- "attribute": "max-line",
94
+ "name": "lineClamp",
95
+ "attribute": "line-clamp",
108
96
  "description": "Limit the number of lines before truncating",
109
- "type": "string | null | undefined"
97
+ "type": "number",
98
+ "default": "1"
110
99
  },
111
100
  {
112
101
  "name": "clearsOnHover",
@@ -120,13 +109,13 @@
120
109
  "attribute": "disabled",
121
110
  "description": "Set disabled state",
122
111
  "type": "boolean",
123
- "default": "\"false\""
112
+ "default": "false"
124
113
  }
125
114
  ],
126
115
  "events": [
127
116
  {
128
117
  "name": "clear",
129
- "description": "Fires when click on cross occurs. `detail.label` provides label of tab if defined. `detail.active` provides current active state."
118
+ "description": "Dispatched when click on cross button occurs"
130
119
  }
131
120
  ]
132
121
  }
@@ -0,0 +1,22 @@
1
+ # ef-tab
2
+
3
+ A building block for individual tab
4
+
5
+ ## Properties
6
+
7
+ | Property | Attribute | Type | Default | Description |
8
+ |-----------------|-------------------|-----------|---------|---------------------------------------------|
9
+ | `active` | `active` | `boolean` | false | Specify tab's active status |
10
+ | `clears` | `clears` | `boolean` | false | Set tab to clearable |
11
+ | `clearsOnHover` | `clears-on-hover` | `boolean` | false | Set tab to clearable on hover |
12
+ | `disabled` | `disabled` | `boolean` | false | Set disabled state |
13
+ | `icon` | `icon` | `string` | "" | Specify icon name to display in tab |
14
+ | `label` | `label` | `string` | "" | Specify tab's label text |
15
+ | `lineClamp` | `line-clamp` | `number` | 1 | Limit the number of lines before truncating |
16
+ | `subLabel` | `sub-label` | `string` | "" | Specify tab's sub-label text |
17
+
18
+ ## Events
19
+
20
+ | Event | Description |
21
+ |---------|----------------------------------------------|
22
+ | `clear` | Dispatched when click on cross button occurs |
@@ -1,13 +1,20 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { TemplateResult, CSSResult, ControlElement } from '@refinitiv-ui/core';
3
- import '../icon';
4
- import '../label';
2
+ import { TemplateResult, CSSResultGroup, ControlElement } from '@refinitiv-ui/core';
3
+ import '../icon/index.js';
4
+ import '../label/index.js';
5
5
  /**
6
6
  * A building block for individual tab
7
7
  * @attr {boolean} disabled - Set disabled state
8
8
  * @prop {boolean} [disabled=false] - Set disabled state
9
+ *
10
+ * @fires clear - Dispatched when click on cross button occurs
9
11
  */
10
12
  export declare class Tab extends ControlElement {
13
+ /**
14
+ * Element version number
15
+ * @returns version number
16
+ */
17
+ static get version(): string;
11
18
  /**
12
19
  * Specify icon name to display in tab
13
20
  */
@@ -28,14 +35,10 @@ export declare class Tab extends ControlElement {
28
35
  * Set tab to clearable
29
36
  */
30
37
  clears: boolean;
31
- /**
32
- * Enable shortening the label
33
- */
34
- truncate: 'center' | '' | null | undefined;
35
38
  /**
36
39
  * Limit the number of lines before truncating
37
40
  */
38
- maxLine: string | null | undefined;
41
+ lineClamp: number;
39
42
  /**
40
43
  * Set tab to clearable on hover
41
44
  */
@@ -61,22 +64,22 @@ export declare class Tab extends ControlElement {
61
64
  */
62
65
  private checkSlotChildren;
63
66
  /**
64
- * Omitted maxLine if subLabel is provided
65
- * @returns Max line value
67
+ * Omitted lineClamp if subLabel is provided
68
+ * @returns line Clamp value
66
69
  */
67
- private getMaxLine;
70
+ private getLineClamp;
68
71
  /**
69
72
  * @param event event from close button
70
73
  * @returns {void}
71
74
  */
72
75
  private handleClickClear;
73
76
  /**
74
- * A `CSSResult` that will be used
77
+ * A `CSSResultGroup` that will be used
75
78
  * to style the host, slotted children
76
79
  * and the internal template of the element.
77
80
  * @returns CSS template
78
81
  */
79
- static get styles(): CSSResult | CSSResult[];
82
+ static get styles(): CSSResultGroup;
80
83
  /**
81
84
  * Show Close Button if allow clears
82
85
  * @returns close button template
@@ -110,4 +113,6 @@ declare global {
110
113
  'ef-tab': Partial<Tab> | JSXInterface.ControlHTMLAttributes<Tab>;
111
114
  }
112
115
  }
113
- }
116
+ }
117
+
118
+ export {};
package/lib/tab/index.js CHANGED
@@ -1,12 +1,10 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { html, css, customElement, property, ControlElement } from '@refinitiv-ui/core';
8
- import '../icon';
9
- import '../label';
1
+ import { __decorate } from "tslib";
2
+ import { html, css, ControlElement } 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 { VERSION } from '../version.js';
6
+ import '../icon/index.js';
7
+ import '../label/index.js';
10
8
  const isAllWhitespaceTextNode = (node) => {
11
9
  var _a;
12
10
  return node.nodeType === document.TEXT_NODE
@@ -16,6 +14,8 @@ const isAllWhitespaceTextNode = (node) => {
16
14
  * A building block for individual tab
17
15
  * @attr {boolean} disabled - Set disabled state
18
16
  * @prop {boolean} [disabled=false] - Set disabled state
17
+ *
18
+ * @fires clear - Dispatched when click on cross button occurs
19
19
  */
20
20
  let Tab = class Tab extends ControlElement {
21
21
  constructor() {
@@ -41,9 +41,9 @@ let Tab = class Tab extends ControlElement {
41
41
  */
42
42
  this.clears = false;
43
43
  /**
44
- * Enable shortening the label
44
+ * Limit the number of lines before truncating
45
45
  */
46
- this.truncate = '';
46
+ this.lineClamp = 1;
47
47
  /**
48
48
  * Set tab to clearable on hover
49
49
  */
@@ -65,9 +65,16 @@ let Tab = class Tab extends ControlElement {
65
65
  this.checkSlotChildren = (event) => {
66
66
  const slot = event.target;
67
67
  this.isSlotHasChildren = !slot.assignedNodes().filter(node => !this.isIgnorable(node)).length;
68
- void this.requestUpdate();
68
+ this.requestUpdate();
69
69
  };
70
70
  }
71
+ /**
72
+ * Element version number
73
+ * @returns version number
74
+ */
75
+ static get version() {
76
+ return VERSION;
77
+ }
71
78
  /**
72
79
  * @param node that should be checked
73
80
  * @returns whether node can be ignored.
@@ -77,11 +84,11 @@ let Tab = class Tab extends ControlElement {
77
84
  || isAllWhitespaceTextNode(node);
78
85
  }
79
86
  /**
80
- * Omitted maxLine if subLabel is provided
81
- * @returns Max line value
87
+ * Omitted lineClamp if subLabel is provided
88
+ * @returns line Clamp value
82
89
  */
83
- getMaxLine() {
84
- return this.subLabel ? null : this.maxLine;
90
+ getLineClamp() {
91
+ return !this.lineClamp ? 0 : this.subLabel ? 1 : this.lineClamp;
85
92
  }
86
93
  /**
87
94
  * @param event event from close button
@@ -90,19 +97,12 @@ let Tab = class Tab extends ControlElement {
90
97
  handleClickClear(event) {
91
98
  event.stopPropagation();
92
99
  /**
93
- * Fires when click on cross occurs. `detail.label` provides label of tab if defined. `detail.active` provides current active state.
94
- * @param detail.label - label stored on the tab
95
- * @param detail.active - current active state, always present
100
+ * Fires when click on cross occurs
96
101
  */
97
- this.dispatchEvent(new CustomEvent('clear', {
98
- detail: {
99
- label: this.label,
100
- active: this.active
101
- }
102
- }));
102
+ this.dispatchEvent(new CustomEvent('clear'));
103
103
  }
104
104
  /**
105
- * A `CSSResult` that will be used
105
+ * A `CSSResultGroup` that will be used
106
106
  * to style the host, slotted children
107
107
  * and the internal template of the element.
108
108
  * @returns CSS template
@@ -111,9 +111,7 @@ let Tab = class Tab extends ControlElement {
111
111
  return css `
112
112
  :host {
113
113
  display: inline-flex;
114
- }
115
- :host [part=sub-label] {
116
- display: block;
114
+ flex-shrink: 0;
117
115
  }
118
116
  `;
119
117
  }
@@ -139,9 +137,7 @@ let Tab = class Tab extends ControlElement {
139
137
  return html `
140
138
  <ef-label
141
139
  part="label"
142
- .truncate=${this.truncate}
143
- .maxLine=${this.getMaxLine()}
144
- >
140
+ .lineClamp=${this.getLineClamp()}>
145
141
  ${this.label}
146
142
  </ef-label>
147
143
  `;
@@ -157,8 +153,7 @@ let Tab = class Tab extends ControlElement {
157
153
  return html `
158
154
  <ef-label
159
155
  part="sub-label"
160
- .truncate=${this.truncate}
161
- .maxLine=${this.getMaxLine()}>
156
+ .lineClamp=${this.getLineClamp()}>
162
157
  ${this.subLabel}
163
158
  </ef-label>
164
159
  `;
@@ -197,11 +192,8 @@ __decorate([
197
192
  property({ type: Boolean, reflect: true })
198
193
  ], Tab.prototype, "clears", void 0);
199
194
  __decorate([
200
- property({ type: String, reflect: true })
201
- ], Tab.prototype, "truncate", void 0);
202
- __decorate([
203
- property({ type: String, reflect: true, attribute: 'max-line' })
204
- ], Tab.prototype, "maxLine", void 0);
195
+ property({ type: Number, reflect: true, attribute: 'line-clamp' })
196
+ ], Tab.prototype, "lineClamp", void 0);
205
197
  __decorate([
206
198
  property({ type: Boolean, reflect: true, attribute: 'clears-on-hover' })
207
199
  ], Tab.prototype, "clearsOnHover", void 0);
@@ -214,4 +206,3 @@ Tab = __decorate([
214
206
  })
215
207
  ], Tab);
216
208
  export { Tab };
217
- //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/lib/icon/themes/halo/dark';
2
2
  import '@refinitiv-ui/elements/lib/label/themes/halo/dark';
3
3
 
4
- elf.customStyles.define('ef-tab', ':host{cursor:pointer;background-color:#404040;color:#ccc;height:36px;padding:9px 12px;outline:0;font-size:12rem;font-weight:500;transition:120ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;touch-action:manipulation}:host [part=icon]{min-width:1em;font-size:1.5em}:host [part=label-container]{display:flex;align-items:flex-start;flex-direction:column;width:100%;min-width:0}:host(:not([sub-label])) [part=label-container]{align-items:center}:host([icon]) [part=label-container]{padding-left:.3em}:host [part=sub-label]{font-weight:400;font-size:.875em}:host(:not([active]):not(:active):not(:hover)) [part=sub-label]{opacity:.7}:host([sub-label]){height:46px}:host([sub-label]) [part=icon]{font-size:1.8em}:host([sub-label]) [part=close]{font-size:1.25em}:host([sub-label][clears]){padding-right:2.5em}:host(:not([truncate=center])[max-line]){height:46px}:host([icon][sub-label]) [part=label-container]{padding-left:.5em}:host([clears]){padding-right:2em}:host [part=close-container]{position:absolute;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}:host [part=close]{margin-right:.5em;min-width:1em;font-size:1em}:host([clears-on-hover]) [part=close]{color:#fff}:host([clears-on-hover]) [part=close-container]{width:2em;opacity:0;transition:120ms;background:#334bff;box-shadow:-1em 0 .75em -.5em #334bff}:host([active]){color:#fff;background-color:#334bff}:host([active]:hover){background-color:#4158ff}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#4158ff;box-shadow:-1em 0 .75em -.5em #4158ff}:host([active]:active){background-color:#0f1e8a}:host([active]:active[clears-on-hover]) [part=close-container]{background-color:#0f1e8a;box-shadow:-1em 0 .75em -.5em #0f1e8a}:host([active][disabled]){color:rgba(255,255,255,.5);background-color:rgba(51,75,255,.5)}:host([disabled]){pointer-events:none;color:rgba(204,204,204,.5);background-color:rgba(64,64,64,.5)}:host(:focus:not([focused])),:host([focused=visible]){box-shadow:none;background-color:#4158ff}:host(:focus:not([focused]):not([active]):not(:hover)),:host([focused=visible]:not([active]):not(:hover)){color:#6678ff;background-color:#404040}:host(:hover){color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.8);background-color:#334bff}:host(:hover[clears-on-hover]) [part=close-container]{opacity:1}:host(:active){color:#fff;background-color:#0f1e8a}:host(:active[clears-on-hover]) [part=close-container]{background-color:#0f1e8a;box-shadow:-1em 0 .75em -.5em #0f1e8a}:host([level="1"]){border-right:1px solid #0d0d0d}:host([level="2"]:not(:last-child)){border-right:none}:host([level="2"]:not(:last-child)) [part=label-container]::after{content:\'\';position:absolute;margin:auto;width:1px;background:#404040;height:70%;right:0;top:0;bottom:0;z-index:1}:host([level="2"]:not(:active):not([active]):not(:hover)){background-color:#262626}:host([level="2"][active]:not(:active):not(:hover)){color:#6678ff;background-color:#0d0d0d}:host([level="2"][active]:focus:not([focused])),:host([level="2"][focused=visible]:not(:active):not(:hover)){color:#6678ff}:host([level="3"]){border-bottom:2px solid transparent;color:#ccc;background-color:#0d0d0d}:host([level="3"][clears-on-hover]) [part=close-container]{background:#0d0d0d;box-shadow:-1em 0 .75em -.5em #0d0d0d}:host([level="3"]:focus:not([focused])),:host([level="3"][focused=visible]){color:#fff;background-color:#262626}:host([level="3"]:active),:host([level="3"]:hover),:host([level="3"][active]){color:#fff;background-color:#0d0d0d;border-color:#334bff}:host([level="3"]:active) [part=close-container],:host([level="3"]:hover) [part=close-container],:host([level="3"][active]) [part=close-container]{background:#0d0d0d;box-shadow:-1em 0 .75em -.5em #0d0d0d}:host([level="3"]:active) [part=close],:host([level="3"]:hover) [part=close],:host([level="3"][active]) [part=close]{color:#fff}:host([level="3"]:active){border-color:#0f1e8a}');
4
+ elf.customStyles.define('ef-tab', ':host{cursor:pointer;background-color:#404040;color:#ccc;height:36px;padding:9px 12px;outline:0;font-size:12rem;font-weight:500;transition:120ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;touch-action:manipulation}:host [part=icon]{min-width:1em;font-size:1.5em}:host [part=label-container]{display:flex;align-items:flex-start;flex-direction:column;width:100%;min-width:0}:host(:not([sub-label])) [part=label-container]{align-items:center}:host([icon]) [part=label-container]{padding-left:.3em}:host [part=sub-label]{font-weight:400;font-size:.875em}:host(:not([active]):not(:active):not(:hover)) [part=sub-label]{opacity:.7}:host([sub-label]){height:46px}:host([sub-label]) [part=icon]{font-size:1.8em}:host([sub-label]) [part=close]{font-size:1.25em}:host([sub-label][clears]){padding-right:2.5em}:host([line-clamp="2"]),:host([line-clamp="3"]){height:46px}:host([icon][sub-label]) [part=label-container]{padding-left:.5em}:host([clears]){padding-right:2em}:host [part=close-container]{position:absolute;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}:host [part=close]{margin-right:.5em;min-width:1em;font-size:1em}:host([clears-on-hover]) [part=close]{color:#fff}:host([clears-on-hover]) [part=close-container]{width:2em;opacity:0;transition:120ms;background:#334bff;box-shadow:-1em 0 .75em -.5em #334bff}:host([active]){color:#fff;background-color:#334bff}:host([active]:hover){background-color:#4158ff}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#4158ff;box-shadow:-1em 0 .75em -.5em #4158ff}:host([active]:active){background-color:#0f1e8a}:host([active]:active[clears-on-hover]) [part=close-container]{background-color:#0f1e8a;box-shadow:-1em 0 .75em -.5em #0f1e8a}:host([active][disabled]){color:rgba(255,255,255,.5);background-color:rgba(51,75,255,.5)}:host([disabled]){pointer-events:none;color:rgba(204,204,204,.5);background-color:rgba(64,64,64,.5)}:host(:focus:not([focused])),:host([focused=visible]){box-shadow:none;background-color:#4158ff}:host(:focus:not([focused]):not([active]):not(:hover)),:host([focused=visible]:not([active]):not(:hover)){color:#6678ff;background-color:#404040}:host(:hover){color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.8);background-color:#334bff}:host(:hover[clears-on-hover]) [part=close-container]{opacity:1}:host(:active){color:#fff;background-color:#0f1e8a}:host(:active[clears-on-hover]) [part=close-container]{background-color:#0f1e8a;box-shadow:-1em 0 .75em -.5em #0f1e8a}:host([level="1"]){border-right:1px solid #0d0d0d}:host([level="2"]:not(:last-child)){border-right:none}:host([level="2"]:not(:last-child)) [part=label-container]::after{content:\'\';position:absolute;margin:auto;width:1px;background:#404040;height:70%;right:0;top:0;bottom:0;z-index:1}:host([level="2"]:not(:active):not([active]):not(:hover)){background-color:#262626}:host([level="2"][active]:not(:active):not(:hover)){color:#6678ff;background-color:#0d0d0d}:host([level="2"][active]:focus:not([focused])),:host([level="2"][focused=visible]:not(:active):not(:hover)){color:#6678ff}:host([level="3"]){border-bottom:2px solid transparent;color:#ccc;background-color:#0d0d0d}:host([level="3"][clears-on-hover]) [part=close-container]{background:#0d0d0d;box-shadow:-1em 0 .75em -.5em #0d0d0d}:host([level="3"]:focus:not([focused])),:host([level="3"][focused=visible]){color:#fff;background-color:#262626}:host([level="3"]:active),:host([level="3"]:hover),:host([level="3"][active]){color:#fff;background-color:#0d0d0d;border-color:#334bff}:host([level="3"]:active) [part=close-container],:host([level="3"]:hover) [part=close-container],:host([level="3"][active]) [part=close-container]{background:#0d0d0d;box-shadow:-1em 0 .75em -.5em #0d0d0d}:host([level="3"]:active) [part=close],:host([level="3"]:hover) [part=close],:host([level="3"][active]) [part=close]{color:#fff}:host([level="3"]:active){border-color:#0f1e8a}');
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/lib/icon/themes/halo/light';
2
2
  import '@refinitiv-ui/elements/lib/label/themes/halo/light';
3
3
 
4
- elf.customStyles.define('ef-tab', ':host{cursor:pointer;background-color:#e6e6e6;color:#0d0d0d;height:36px;padding:9px 12px;outline:0;font-size:12rem;font-weight:500;transition:120ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;touch-action:manipulation}:host [part=icon]{min-width:1em;font-size:1.5em}:host [part=label-container]{display:flex;align-items:flex-start;flex-direction:column;width:100%;min-width:0}:host(:not([sub-label])) [part=label-container]{align-items:center}:host([icon]) [part=label-container]{padding-left:.3em}:host [part=sub-label]{font-weight:400;font-size:.875em}:host(:not([active]):not(:active):not(:hover)) [part=sub-label]{opacity:.7}:host([sub-label]){height:46px}:host([sub-label]) [part=icon]{font-size:1.8em}:host([sub-label]) [part=close]{font-size:1.25em}:host([sub-label][clears]){padding-right:2.5em}:host(:not([truncate=center])[max-line]){height:46px}:host([icon][sub-label]) [part=label-container]{padding-left:.5em}:host([clears]){padding-right:2em}:host [part=close-container]{position:absolute;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}:host [part=close]{margin-right:.5em;min-width:1em;font-size:1em}:host([clears-on-hover]) [part=close]{color:#fff}:host([clears-on-hover]) [part=close-container]{width:2em;opacity:0;transition:120ms;background:#334bff;box-shadow:-1em 0 .75em -.5em #334bff}:host([active]){color:#fff;background-color:#334bff}:host([active]:hover){background-color:#4158ff}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#4158ff;box-shadow:-1em 0 .75em -.5em #4158ff}:host([active]:active){background-color:#0f1e8a}:host([active]:active[clears-on-hover]) [part=close-container]{background-color:#0f1e8a;box-shadow:-1em 0 .75em -.5em #0f1e8a}:host([active][disabled]){color:rgba(255,255,255,.5);background-color:rgba(51,75,255,.5)}:host([disabled]){pointer-events:none;color:rgba(13,13,13,.5);background-color:rgba(230,230,230,.5)}:host(:focus:not([focused])),:host([focused=visible]){box-shadow:none;background-color:#4158ff}:host(:focus:not([focused]):not([active]):not(:hover)),:host([focused=visible]:not([active]):not(:hover)){color:#6678ff;background-color:#e6e6e6}:host(:hover){color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.55);background-color:#334bff}:host(:hover[clears-on-hover]) [part=close-container]{opacity:1}:host(:active){color:#fff;background-color:#0f1e8a}:host(:active[clears-on-hover]) [part=close-container]{background-color:#0f1e8a;box-shadow:-1em 0 .75em -.5em #0f1e8a}:host([level="1"]){border-right:1px solid #fff}:host([level="2"]:not(:last-child)){border-right:none}:host([level="2"]:not(:last-child)) [part=label-container]::after{content:\'\';position:absolute;margin:auto;width:1px;background:#d9d9d9;height:70%;right:0;top:0;bottom:0;z-index:1}:host([level="2"]:not(:active):not([active]):not(:hover)){background-color:#f2f2f2}:host([level="2"][active]:not(:active):not(:hover)){color:#334bff;background-color:#fff}:host([level="2"][active]:focus:not([focused])),:host([level="2"][focused=visible]:not(:active):not(:hover)){color:#6678ff}:host([level="3"]){border-bottom:2px solid transparent;color:#404040;background-color:#fff}:host([level="3"][clears-on-hover]) [part=close-container]{background:#fff;box-shadow:-1em 0 .75em -.5em #fff}:host([level="3"]:focus:not([focused])),:host([level="3"][focused=visible]){color:#0d0d0d;background-color:#f2f2f2}:host([level="3"]:active),:host([level="3"]:hover),:host([level="3"][active]){color:#0d0d0d;background-color:#fff;border-color:#334bff}:host([level="3"]:active) [part=close-container],:host([level="3"]:hover) [part=close-container],:host([level="3"][active]) [part=close-container]{background:#fff;box-shadow:-1em 0 .75em -.5em #fff}:host([level="3"]:active) [part=close],:host([level="3"]:hover) [part=close],:host([level="3"][active]) [part=close]{color:#0d0d0d}:host([level="3"]:active){border-color:#0f1e8a}');
4
+ elf.customStyles.define('ef-tab', ':host{cursor:pointer;background-color:#e6e6e6;color:#0d0d0d;height:36px;padding:9px 12px;outline:0;font-size:12rem;font-weight:500;transition:120ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;touch-action:manipulation}:host [part=icon]{min-width:1em;font-size:1.5em}:host [part=label-container]{display:flex;align-items:flex-start;flex-direction:column;width:100%;min-width:0}:host(:not([sub-label])) [part=label-container]{align-items:center}:host([icon]) [part=label-container]{padding-left:.3em}:host [part=sub-label]{font-weight:400;font-size:.875em}:host(:not([active]):not(:active):not(:hover)) [part=sub-label]{opacity:.7}:host([sub-label]){height:46px}:host([sub-label]) [part=icon]{font-size:1.8em}:host([sub-label]) [part=close]{font-size:1.25em}:host([sub-label][clears]){padding-right:2.5em}:host([line-clamp="2"]),:host([line-clamp="3"]){height:46px}:host([icon][sub-label]) [part=label-container]{padding-left:.5em}:host([clears]){padding-right:2em}:host [part=close-container]{position:absolute;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}:host [part=close]{margin-right:.5em;min-width:1em;font-size:1em}:host([clears-on-hover]) [part=close]{color:#fff}:host([clears-on-hover]) [part=close-container]{width:2em;opacity:0;transition:120ms;background:#334bff;box-shadow:-1em 0 .75em -.5em #334bff}:host([active]){color:#fff;background-color:#334bff}:host([active]:hover){background-color:#4158ff}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#4158ff;box-shadow:-1em 0 .75em -.5em #4158ff}:host([active]:active){background-color:#0f1e8a}:host([active]:active[clears-on-hover]) [part=close-container]{background-color:#0f1e8a;box-shadow:-1em 0 .75em -.5em #0f1e8a}:host([active][disabled]){color:rgba(255,255,255,.5);background-color:rgba(51,75,255,.5)}:host([disabled]){pointer-events:none;color:rgba(13,13,13,.5);background-color:rgba(230,230,230,.5)}:host(:focus:not([focused])),:host([focused=visible]){box-shadow:none;background-color:#4158ff}:host(:focus:not([focused]):not([active]):not(:hover)),:host([focused=visible]:not([active]):not(:hover)){color:#6678ff;background-color:#e6e6e6}:host(:hover){color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.55);background-color:#334bff}:host(:hover[clears-on-hover]) [part=close-container]{opacity:1}:host(:active){color:#fff;background-color:#0f1e8a}:host(:active[clears-on-hover]) [part=close-container]{background-color:#0f1e8a;box-shadow:-1em 0 .75em -.5em #0f1e8a}:host([level="1"]){border-right:1px solid #fff}:host([level="2"]:not(:last-child)){border-right:none}:host([level="2"]:not(:last-child)) [part=label-container]::after{content:\'\';position:absolute;margin:auto;width:1px;background:#d9d9d9;height:70%;right:0;top:0;bottom:0;z-index:1}:host([level="2"]:not(:active):not([active]):not(:hover)){background-color:#f2f2f2}:host([level="2"][active]:not(:active):not(:hover)){color:#334bff;background-color:#fff}:host([level="2"][active]:focus:not([focused])),:host([level="2"][focused=visible]:not(:active):not(:hover)){color:#6678ff}:host([level="3"]){border-bottom:2px solid transparent;color:#404040;background-color:#fff}:host([level="3"][clears-on-hover]) [part=close-container]{background:#fff;box-shadow:-1em 0 .75em -.5em #fff}:host([level="3"]:focus:not([focused])),:host([level="3"][focused=visible]){color:#0d0d0d;background-color:#f2f2f2}:host([level="3"]:active),:host([level="3"]:hover),:host([level="3"][active]){color:#0d0d0d;background-color:#fff;border-color:#334bff}:host([level="3"]:active) [part=close-container],:host([level="3"]:hover) [part=close-container],:host([level="3"][active]) [part=close-container]{background:#fff;box-shadow:-1em 0 .75em -.5em #fff}:host([level="3"]:active) [part=close],:host([level="3"]:hover) [part=close],:host([level="3"][active]) [part=close]{color:#0d0d0d}:host([level="3"]:active){border-color:#0f1e8a}');
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/lib/icon/themes/solar/charcoal';
2
2
  import '@refinitiv-ui/elements/lib/label/themes/solar/charcoal';
3
3
 
4
- elf.customStyles.define('ef-tab', ':host{cursor:pointer;background-color:#bec3cc;color:#fff;height:23px;padding:7px 15px;outline:0;font-size:13rem;font-weight:500;transition:70ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;touch-action:manipulation}:host [part=icon]{min-width:1em;font-size:1.5em}:host [part=label-container]{display:flex;align-items:flex-start;flex-direction:column;width:100%;min-width:0}:host(:not([sub-label])) [part=label-container]{align-items:center}:host([icon]) [part=label-container]{padding-left:.3em}:host [part=sub-label]{font-weight:400;font-size:.875em}:host(:not([active]):not(:active):not(:hover)) [part=sub-label]{opacity:.7}:host([sub-label]){height:33px}:host([sub-label]) [part=icon]{font-size:1.8em}:host([sub-label]) [part=close]{font-size:1.25em}:host([sub-label][clears]){padding-right:2.5em}:host(:not([truncate=center])[max-line]){height:33px}:host([icon][sub-label]) [part=label-container]{padding-left:.5em}:host([clears]){padding-right:2em}:host [part=close-container]{position:absolute;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}:host [part=close]{margin-right:.5em;min-width:1em;font-size:1em}:host([clears-on-hover]) [part=close]{color:#fff}:host([clears-on-hover]) [part=close-container]{width:2em;opacity:0;transition:70ms;background:#c3c7d0;box-shadow:-1em 0 .75em -.5em #c3c7d0}:host([active]){color:#fff;background-color:#e01865}:host([active]:hover){background-color:#e32970}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#e32970;box-shadow:-1em 0 .75em -.5em #e32970}:host([active]:active){background-color:#d1175f}:host([active]:active[clears-on-hover]) [part=close-container]{background-color:#d1175f;box-shadow:-1em 0 .75em -.5em #d1175f}:host([active][disabled]){color:#f3a3c2;background-color:#e74784}:host([disabled]){pointer-events:none;color:#e5e7eb;background-color:#cbcfd6}:host(:focus:not([focused])),:host([focused=visible]){box-shadow:0 0 0 2px rgba(0,0,0,.9);background-color:#e32970}:host(:focus:not([focused]):not([active]):not(:hover)),:host([focused=visible]:not([active]):not(:hover)){color:#fff;background-color:#bec3cc}:host(:hover){color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.9);background-color:#c3c7d0}:host(:hover[clears-on-hover]) [part=close-container]{opacity:1}:host(:active){color:#fff;background-color:#b1b5be}:host(:active[clears-on-hover]) [part=close-container]{background-color:#b1b5be;box-shadow:-1em 0 .75em -.5em #b1b5be}');
4
+ elf.customStyles.define('ef-tab', ':host{cursor:pointer;background-color:#3c3c42;color:#c2c2c2;height:23px;padding:7px 15px;outline:0;font-size:13rem;font-weight:500;transition:70ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;touch-action:manipulation;border:1px solid #000;border-left:none}:host [part=label-container]{display:flex;align-items:flex-start;flex-direction:column;width:100%;min-width:0}:host(:not([sub-label])) [part=label-container]{align-items:center}:host([icon]) [part=label-container]{padding-left:.3em}:host [part=sub-label]{font-weight:400;font-size:.875em}:host(:not([active]):not(:active):not(:hover)) [part=sub-label]{opacity:.7}:host([sub-label]){height:33px}:host([sub-label]) [part=close]{font-size:1.25em}:host([sub-label][clears]){padding-right:2.5em}:host([line-clamp="2"]),:host([line-clamp="3"]){height:33px}:host([icon][sub-label]) [part=label-container]{padding-left:.5em}:host([clears]){padding-right:2em}:host [part=close-container]{position:absolute;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}:host [part=close]{margin-right:.5em;min-width:1em;font-size:1em}:host([clears-on-hover]) [part=close]{color:#e2e2e2}:host([clears-on-hover]) [part=close-container]{width:2em;opacity:0;transition:70ms;background:#4a4a4f;box-shadow:-1em 0 .75em -.5em #4a4a4f}:host([active]){color:#0a0a0a;background-color:#f93}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#ffa041;box-shadow:-1em 0 .75em -.5em #ffa041}:host([active]:active){background-color:#ed8e2f}:host([active]:active[clears-on-hover]) [part=close-container]{background-color:#ed8e2f;box-shadow:-1em 0 .75em -.5em #ed8e2f}:host([active][disabled]){background-color:#ffad5c;color:rgba(10,10,10,.7)}:host([disabled]){pointer-events:none;color:#c2c2c2;background-color:#636368}:host(:focus:not([focused])),:host([focused=visible]){box-shadow:none;background-color:#ffa041}:host(:focus:not([focused]):not([active]):not(:hover)),:host([focused=visible]:not([active]):not(:hover)){color:#e2e2e2;background-color:#3c3c42}:host(:hover){color:#e2e2e2;box-shadow:0 0 0 0 rgba(0,0,0,.9);background-color:#4a4a4f}:host(:hover[clears-on-hover]) [part=close-container]{opacity:1}:host(:active){color:#c2c2c2;background-color:#38383d}:host(:active[clears-on-hover]) [part=close-container]{background-color:#38383d;box-shadow:-1em 0 .75em -.5em #38383d}:host [part=icon]{min-width:1em;font-size:1em}:host([sub-label]) [part=icon]{font-size:1.2em}:host([active]:hover){color:#0a0a0a;background-color:#ffb366}');
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/lib/icon/themes/solar/pearl';
2
2
  import '@refinitiv-ui/elements/lib/label/themes/solar/pearl';
3
3
 
4
- elf.customStyles.define('ef-tab', ':host{cursor:pointer;background-color:#bec3cc;color:#fff;height:23px;padding:7px 15px;outline:0;font-size:13rem;font-weight:500;transition:70ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;touch-action:manipulation}:host [part=icon]{min-width:1em;font-size:1.5em}:host [part=label-container]{display:flex;align-items:flex-start;flex-direction:column;width:100%;min-width:0}:host(:not([sub-label])) [part=label-container]{align-items:center}:host([icon]) [part=label-container]{padding-left:.3em}:host [part=sub-label]{font-weight:400;font-size:.875em}:host(:not([active]):not(:active):not(:hover)) [part=sub-label]{opacity:.7}:host([sub-label]){height:33px}:host([sub-label]) [part=icon]{font-size:1.8em}:host([sub-label]) [part=close]{font-size:1.25em}:host([sub-label][clears]){padding-right:2.5em}:host(:not([truncate=center])[max-line]){height:33px}:host([icon][sub-label]) [part=label-container]{padding-left:.5em}:host([clears]){padding-right:2em}:host [part=close-container]{position:absolute;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}:host [part=close]{margin-right:.5em;min-width:1em;font-size:1em}:host([clears-on-hover]) [part=close]{color:#fff}:host([clears-on-hover]) [part=close-container]{width:2em;opacity:0;transition:70ms;background:#c3c7d0;box-shadow:-1em 0 .75em -.5em #c3c7d0}:host([active]){color:#fff;background-color:#e01865}:host([active]:hover){background-color:#e32970}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#e32970;box-shadow:-1em 0 .75em -.5em #e32970}:host([active]:active){background-color:#d1175f}:host([active]:active[clears-on-hover]) [part=close-container]{background-color:#d1175f;box-shadow:-1em 0 .75em -.5em #d1175f}:host([active][disabled]){color:#f3a3c2;background-color:#e74784}:host([disabled]){pointer-events:none;color:#e5e7eb;background-color:#cbcfd6}:host(:focus:not([focused])),:host([focused=visible]){box-shadow:0 0 0 2px rgba(0,0,0,.6);background-color:#e32970}:host(:focus:not([focused]):not([active]):not(:hover)),:host([focused=visible]:not([active]):not(:hover)){color:#fff;background-color:#bec3cc}:host(:hover){color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.6);background-color:#c3c7d0}:host(:hover[clears-on-hover]) [part=close-container]{opacity:1}:host(:active){color:#fff;background-color:#b1b5be}:host(:active[clears-on-hover]) [part=close-container]{background-color:#b1b5be;box-shadow:-1em 0 .75em -.5em #b1b5be}');
4
+ elf.customStyles.define('ef-tab', ':host{cursor:pointer;background-color:#fafbfc;color:#505050;height:23px;padding:7px 15px;outline:0;font-size:13rem;font-weight:500;transition:70ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;touch-action:manipulation;border:1px solid #a9afba;border-left:none}:host [part=label-container]{display:flex;align-items:flex-start;flex-direction:column;width:100%;min-width:0}:host(:not([sub-label])) [part=label-container]{align-items:center}:host([icon]) [part=label-container]{padding-left:.3em}:host [part=sub-label]{font-weight:400;font-size:.875em}:host(:not([active]):not(:active):not(:hover)) [part=sub-label]{opacity:.7}:host([sub-label]){height:33px}:host([sub-label]) [part=close]{font-size:1.25em}:host([sub-label][clears]){padding-right:2.5em}:host([line-clamp="2"]),:host([line-clamp="3"]){height:33px}:host([icon][sub-label]) [part=label-container]{padding-left:.5em}:host([clears]){padding-right:2em}:host [part=close-container]{position:absolute;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}:host [part=close]{margin-right:.5em;min-width:1em;font-size:1em}:host([clears-on-hover]) [part=close]{color:#1d1d1d}:host([clears-on-hover]) [part=close-container]{width:2em;opacity:0;transition:70ms;background:#fafbfc;box-shadow:-1em 0 .75em -.5em #fafbfc}:host([active]){color:#505050;background-color:#ffb266}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#ffb771;box-shadow:-1em 0 .75em -.5em #ffb771}:host([active]:active){background-color:#eda65f}:host([active]:active[clears-on-hover]) [part=close-container]{background-color:#eda65f;box-shadow:-1em 0 .75em -.5em #eda65f}:host([active][disabled]){color:#a8896a;background-color:#ffc185}:host([disabled]){pointer-events:none;color:#505050;background-color:#fbfcfd}:host(:focus:not([focused])),:host([focused=visible]){box-shadow:none;background-color:#ffb771}:host(:focus:not([focused]):not([active]):not(:hover)),:host([focused=visible]:not([active]):not(:hover)){color:#1d1d1d;background-color:#fafbfc}:host(:hover){color:#1d1d1d;box-shadow:0 0 0 0 rgba(0,0,0,.6);background-color:#fafbfc}:host(:hover[clears-on-hover]) [part=close-container]{opacity:1}:host(:active){color:#505050;background-color:#e8e9ea}:host(:active[clears-on-hover]) [part=close-container]{background-color:#e8e9ea;box-shadow:-1em 0 .75em -.5em #e8e9ea}:host [part=icon]{min-width:1em;font-size:1em}:host([sub-label]) [part=icon]{font-size:1.2em}:host([active]:hover){color:#505050;background-color:#fc9}');
@@ -46,12 +46,6 @@
46
46
  "type": "boolean",
47
47
  "default": "false"
48
48
  }
49
- ],
50
- "events": [
51
- {
52
- "name": "resize",
53
- "description": "Resize fired when the element's size changes."
54
- }
55
49
  ]
56
50
  }
57
51
  ]
@@ -0,0 +1,11 @@
1
+ # ef-tab-bar
2
+
3
+ Container for tabs
4
+
5
+ ## Properties
6
+
7
+ | Property | Attribute | Type | Default | Description |
8
+ |-------------|-------------|---------------------------------|---------|--------------------------------------------------|
9
+ | `alignment` | `alignment` | `"left" \| "center" \| "right"` | "left" | Specify tab's horizontal alignment |
10
+ | `level` | `level` | `"1" \| "2" \| "3"` | "1" | Use level styling from theme |
11
+ | `vertical` | `vertical` | `boolean` | false | Use to switch from horizontal to vertical layout. |
@@ -4,7 +4,7 @@ interface Configs {
4
4
  endPosition: number;
5
5
  duration?: number;
6
6
  easing?: string;
7
- complete?: Function;
7
+ complete?: () => void;
8
8
  }
9
9
  declare const ANIMATION_DURATION = 100;
10
10
  /**
@@ -1,5 +1,9 @@
1
+ var Easings;
2
+ (function (Easings) {
3
+ Easings["EaseOutQuad"] = "easeOutQuad";
4
+ })(Easings || (Easings = {}));
1
5
  const ANIMATION_DURATION = 100; // specifies the length of time an animation should take to complete
2
- const DEFAULT_EASING = 'easeOutQuad';
6
+ const DEFAULT_EASING = Easings.EaseOutQuad;
3
7
  /**
4
8
  * Common easing equations from https://easings.net
5
9
  * @param name type of easing
@@ -47,4 +51,3 @@ const tweenAnimate = (configs) => {
47
51
  tweenLoop();
48
52
  };
49
53
  export { tweenAnimate, ANIMATION_DURATION };
50
- //# sourceMappingURL=animate.js.map
@@ -1,17 +1,22 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { TemplateResult, CSSResult, PropertyValues, ResponsiveElement, ElementSize } from '@refinitiv-ui/core';
3
- import '../button';
2
+ import { TemplateResult, CSSResultGroup, PropertyValues, ResponsiveElement, ElementSize } from '@refinitiv-ui/core';
3
+ import '../button/index.js';
4
4
  /**
5
5
  * Container for tabs
6
6
  */
7
7
  export declare class TabBar extends ResponsiveElement {
8
8
  /**
9
- * A `CSSResult` that will be used
9
+ * Element version number
10
+ * @returns version number
11
+ */
12
+ static get version(): string;
13
+ /**
14
+ * A `CSSResultGroup` that will be used
10
15
  * to style the host, slotted children
11
16
  * and the internal template of the element.
12
17
  * @returns CSS template
13
18
  */
14
- static get styles(): CSSResult | CSSResult[];
19
+ static get styles(): CSSResultGroup;
15
20
  /**
16
21
  * Specify tab's horizontal alignment
17
22
  */
@@ -98,4 +103,6 @@ declare global {
98
103
  'ef-tab-bar': Partial<TabBar> | JSXInterface.HTMLAttributes<TabBar>;
99
104
  }
100
105
  }
101
- }
106
+ }
107
+
108
+ export {};
@@ -1,12 +1,11 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { html, css, customElement, property, query, ResponsiveElement } from '@refinitiv-ui/core';
8
- import { tweenAnimate } from './helpers/animate';
9
- import '../button';
1
+ import { __decorate } from "tslib";
2
+ import { html, css, ResponsiveElement } 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';
6
+ import { VERSION } from '../version.js';
7
+ import { tweenAnimate } from './helpers/animate.js';
8
+ import '../button/index.js';
10
9
  const BAR_TRAVEL_DISTANCE = 150; // scroll distance
11
10
  /**
12
11
  * Container for tabs
@@ -28,7 +27,14 @@ let TabBar = class TabBar extends ResponsiveElement {
28
27
  this.vertical = false;
29
28
  }
30
29
  /**
31
- * A `CSSResult` that will be used
30
+ * Element version number
31
+ * @returns version number
32
+ */
33
+ static get version() {
34
+ return VERSION;
35
+ }
36
+ /**
37
+ * A `CSSResultGroup` that will be used
32
38
  * to style the host, slotted children
33
39
  * and the internal template of the element.
34
40
  * @returns CSS template
@@ -56,9 +62,9 @@ let TabBar = class TabBar extends ResponsiveElement {
56
62
  super.firstUpdated(changedProperties);
57
63
  this.content.addEventListener('scroll', () => {
58
64
  // Clear our timeout throughout the scroll
59
- clearTimeout(this.isScrolling);
65
+ window.clearTimeout(this.isScrolling);
60
66
  // Set a timeout to run after scrolling ends
61
- this.isScrolling = setTimeout(() => {
67
+ this.isScrolling = window.setTimeout(() => {
62
68
  this.toggleScrollButton(this.content.clientWidth);
63
69
  }, 66); // equal 15 fps for compatibility
64
70
  });
@@ -92,14 +98,6 @@ let TabBar = class TabBar extends ResponsiveElement {
92
98
  if (!this.vertical) {
93
99
  this.toggleScrollButton(size.width);
94
100
  }
95
- /**
96
- * Resize fired when the element's size changes.
97
- */
98
- this.dispatchEvent(new CustomEvent('resize', {
99
- bubbles: false,
100
- cancelable: false,
101
- detail: size
102
- }));
103
101
  }
104
102
  /**
105
103
  * Hide all scroll buttons
@@ -218,4 +216,3 @@ TabBar = __decorate([
218
216
  })
219
217
  ], TabBar);
220
218
  export { TabBar };
221
- //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/lib/tab/themes/solar/charcoal';
2
2
  import '@refinitiv-ui/elements/lib/button/themes/solar/charcoal';
3
3
 
4
- elf.customStyles.define('ef-tab-bar', ':host{position:relative;background-color:#151516}:host [part=content]{display:flex;overflow:hidden}:host [part=left-btn],:host [part=right-btn]{display:none;position:absolute;height:auto;margin:auto;z-index:2;top:0;bottom:0;background-color:#bec3cc}:host [part=left-btn]:hover,:host [part=right-btn]:hover{background-color:#c3c7d0}:host [part=left-btn]:active,:host [part=right-btn]:active{background-color:#b1b5be}:host [part=left-btn]:focus:not([focused]),:host [part=left-btn][focused=visible],:host [part=right-btn]:focus:not([focused]),:host [part=right-btn][focused=visible]{background-color:#e32970}:host [part=left-btn]:focus:not([focused]):not([active]):not(:hover),:host [part=left-btn][focused=visible]:not([active]):not(:hover),:host [part=right-btn]:focus:not([focused]):not([active]):not(:hover),:host [part=right-btn][focused=visible]:not([active]):not(:hover){color:#fff;background-color:#bec3cc}:host [part=left-btn]{left:0}:host [part=right-btn]{right:0}:host([vertical]){width:180px;flex-shrink:0}:host([vertical]) [part=content]{flex-direction:column}:host([vertical]) [part=content] ::slotted(ef-tab){justify-content:flex-start;border-bottom:1px solid #4a4a52}');
4
+ elf.customStyles.define('ef-tab-bar', ':host{position:relative;background-color:#151516}:host [part=content]{display:flex;overflow:hidden}:host [part=left-btn],:host [part=right-btn]{display:none;position:absolute;height:auto;margin:auto;z-index:2;top:0;bottom:0;background-color:#3c3c42}:host [part=left-btn]:hover,:host [part=right-btn]:hover{background-color:#4a4a4f}:host [part=left-btn]:active,:host [part=right-btn]:active{background-color:#38383d}:host [part=left-btn]:focus:not([focused]),:host [part=left-btn][focused=visible],:host [part=right-btn]:focus:not([focused]),:host [part=right-btn][focused=visible]{background-color:#ffa041}:host [part=left-btn]:focus:not([focused]):not([active]):not(:hover),:host [part=left-btn][focused=visible]:not([active]):not(:hover),:host [part=right-btn]:focus:not([focused]):not([active]):not(:hover),:host [part=right-btn][focused=visible]:not([active]):not(:hover){color:#e2e2e2;background-color:#3c3c42}:host [part=left-btn]{left:0}:host [part=right-btn]{right:0}:host([vertical]){width:180px;flex-shrink:0}:host([vertical]) [part=content]{flex-direction:column}:host([vertical]) [part=content] ::slotted(ef-tab){justify-content:flex-start;border:none;border-bottom:1px solid #000}:host(:not([vertical])) [part=content] ::slotted(ef-tab:first-of-type){border-left:1px solid #000}');