@refinitiv-ui/elements 5.5.0 → 5.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. package/CHANGELOG.md +65 -8
  2. package/lib/accordion/custom-elements.md +18 -0
  3. package/lib/accordion/index.d.ts +5 -5
  4. package/lib/accordion/index.js +8 -11
  5. package/lib/appstate-bar/custom-elements.md +22 -0
  6. package/lib/appstate-bar/index.d.ts +5 -5
  7. package/lib/appstate-bar/index.js +8 -11
  8. package/lib/autosuggest/custom-elements.json +24 -4
  9. package/lib/autosuggest/custom-elements.md +54 -0
  10. package/lib/autosuggest/helpers/types.d.ts +1 -1
  11. package/lib/autosuggest/helpers/utils.d.ts +2 -2
  12. package/lib/autosuggest/helpers/utils.js +1 -2
  13. package/lib/autosuggest/index.d.ts +13 -8
  14. package/lib/autosuggest/index.js +38 -31
  15. package/lib/button/custom-elements.json +2 -2
  16. package/lib/button/custom-elements.md +23 -0
  17. package/lib/button/index.d.ts +13 -13
  18. package/lib/button/index.js +41 -31
  19. package/lib/button-bar/custom-elements.md +9 -0
  20. package/lib/button-bar/index.d.ts +3 -3
  21. package/lib/button-bar/index.js +8 -10
  22. package/lib/calendar/constants.d.ts +22 -0
  23. package/lib/calendar/constants.js +23 -0
  24. package/lib/calendar/custom-elements.json +8 -6
  25. package/lib/calendar/custom-elements.md +35 -0
  26. package/lib/calendar/index.d.ts +9 -7
  27. package/lib/calendar/index.js +20 -38
  28. package/lib/calendar/locales.d.ts +1 -31
  29. package/lib/calendar/locales.js +0 -104
  30. package/lib/calendar/types.d.ts +1 -5
  31. package/lib/calendar/types.js +1 -6
  32. package/lib/calendar/utils.d.ts +31 -1
  33. package/lib/calendar/utils.js +104 -2
  34. package/lib/canvas/custom-elements.json +7 -5
  35. package/lib/canvas/custom-elements.md +27 -0
  36. package/lib/canvas/index.d.ts +4 -3
  37. package/lib/canvas/index.js +8 -10
  38. package/lib/card/custom-elements.json +3 -1
  39. package/lib/card/custom-elements.md +24 -0
  40. package/lib/card/helpers/types.d.ts +1 -1
  41. package/lib/card/index.d.ts +10 -8
  42. package/lib/card/index.js +14 -13
  43. package/lib/chart/custom-elements.json +1 -1
  44. package/lib/chart/custom-elements.md +16 -0
  45. package/lib/chart/helpers/index.d.ts +2 -2
  46. package/lib/chart/helpers/index.js +2 -2
  47. package/lib/chart/index.d.ts +6 -6
  48. package/lib/chart/index.js +12 -14
  49. package/lib/checkbox/custom-elements.json +4 -4
  50. package/lib/checkbox/custom-elements.md +18 -0
  51. package/lib/checkbox/index.d.ts +21 -13
  52. package/lib/checkbox/index.js +56 -31
  53. package/lib/clock/custom-elements.json +21 -4
  54. package/lib/clock/custom-elements.md +28 -0
  55. package/lib/clock/index.d.ts +17 -5
  56. package/lib/clock/index.js +37 -18
  57. package/lib/clock/themes/halo/dark/index.js +1 -1
  58. package/lib/clock/themes/halo/light/index.js +1 -1
  59. package/lib/clock/themes/solar/charcoal/index.js +1 -1
  60. package/lib/clock/themes/solar/pearl/index.js +1 -1
  61. package/lib/clock/utils/TickManager.js +2 -2
  62. package/lib/collapse/custom-elements.md +27 -0
  63. package/lib/collapse/index.d.ts +7 -7
  64. package/lib/collapse/index.js +11 -13
  65. package/lib/color-dialog/custom-elements.json +29 -16
  66. package/lib/color-dialog/custom-elements.md +39 -0
  67. package/lib/color-dialog/elements/color-palettes.d.ts +5 -5
  68. package/lib/color-dialog/elements/color-palettes.js +8 -12
  69. package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -5
  70. package/lib/color-dialog/elements/grayscale-palettes.js +9 -12
  71. package/lib/color-dialog/elements/palettes.d.ts +3 -3
  72. package/lib/color-dialog/elements/palettes.js +49 -47
  73. package/lib/color-dialog/helpers/value-model.js +2 -2
  74. package/lib/color-dialog/index.d.ts +19 -19
  75. package/lib/color-dialog/index.js +36 -35
  76. package/lib/combo-box/custom-elements.json +28 -16
  77. package/lib/combo-box/custom-elements.md +35 -0
  78. package/lib/combo-box/helpers/filter.d.ts +4 -4
  79. package/lib/combo-box/helpers/types.d.ts +2 -2
  80. package/lib/combo-box/index.d.ts +26 -18
  81. package/lib/combo-box/index.js +36 -27
  82. package/lib/combo-box/themes/halo/dark/index.js +1 -1
  83. package/lib/combo-box/themes/halo/light/index.js +1 -1
  84. package/lib/combo-box/themes/solar/charcoal/index.js +1 -1
  85. package/lib/combo-box/themes/solar/pearl/index.js +1 -1
  86. package/lib/counter/custom-elements.json +8 -4
  87. package/lib/counter/custom-elements.md +11 -0
  88. package/lib/counter/index.d.ts +5 -3
  89. package/lib/counter/index.js +11 -12
  90. package/lib/datetime-picker/custom-elements.json +52 -23
  91. package/lib/datetime-picker/custom-elements.md +57 -0
  92. package/lib/datetime-picker/index.d.ts +25 -14
  93. package/lib/datetime-picker/index.js +46 -35
  94. package/lib/datetime-picker/locales.d.ts +1 -1
  95. package/lib/datetime-picker/locales.js +12 -1
  96. package/lib/datetime-picker/types.d.ts +1 -1
  97. package/lib/datetime-picker/utils.js +1 -1
  98. package/lib/dialog/custom-elements.json +34 -12
  99. package/lib/dialog/custom-elements.md +47 -0
  100. package/lib/dialog/index.d.ts +17 -20
  101. package/lib/dialog/index.js +28 -31
  102. package/lib/email-field/custom-elements.json +81 -94
  103. package/lib/email-field/custom-elements.md +37 -0
  104. package/lib/email-field/index.d.ts +44 -116
  105. package/lib/email-field/index.js +48 -249
  106. package/lib/events.d.ts +2 -2
  107. package/lib/events.js +1 -2
  108. package/lib/flag/custom-elements.md +10 -0
  109. package/lib/flag/index.d.ts +6 -4
  110. package/lib/flag/index.js +12 -12
  111. package/lib/flag/utils/FlagLoader.d.ts +1 -1
  112. package/lib/flag/utils/FlagLoader.js +1 -1
  113. package/lib/header/custom-elements.md +18 -0
  114. package/lib/header/index.d.ts +2 -2
  115. package/lib/header/index.js +5 -8
  116. package/lib/heatmap/custom-elements.md +26 -0
  117. package/lib/heatmap/helpers/color.d.ts +1 -1
  118. package/lib/heatmap/helpers/color.js +1 -1
  119. package/lib/heatmap/helpers/text.d.ts +1 -1
  120. package/lib/heatmap/index.d.ts +7 -7
  121. package/lib/heatmap/index.js +15 -16
  122. package/lib/icon/custom-elements.json +6 -4
  123. package/lib/icon/custom-elements.md +8 -0
  124. package/lib/icon/index.d.ts +9 -6
  125. package/lib/icon/index.js +28 -18
  126. package/lib/icon/utils/IconLoader.d.ts +6 -1
  127. package/lib/icon/utils/IconLoader.js +24 -17
  128. package/lib/index.d.ts +2 -1
  129. package/lib/index.js +2 -1
  130. package/lib/interactive-chart/custom-elements.json +6 -10
  131. package/lib/interactive-chart/custom-elements.md +31 -0
  132. package/lib/interactive-chart/helpers/types.d.ts +2 -2
  133. package/lib/interactive-chart/index.d.ts +11 -8
  134. package/lib/interactive-chart/index.js +17 -17
  135. package/lib/item/custom-elements.json +4 -4
  136. package/lib/item/custom-elements.md +29 -0
  137. package/lib/item/helpers/types.d.ts +1 -1
  138. package/lib/item/index.d.ts +18 -8
  139. package/lib/item/index.js +36 -16
  140. package/lib/label/custom-elements.md +11 -0
  141. package/lib/label/index.d.ts +3 -3
  142. package/lib/label/index.js +12 -20
  143. package/lib/layout/custom-elements.md +26 -0
  144. package/lib/layout/index.d.ts +3 -3
  145. package/lib/layout/index.js +6 -9
  146. package/lib/led-gauge/custom-elements.json +4 -4
  147. package/lib/led-gauge/custom-elements.md +17 -0
  148. package/lib/led-gauge/index.d.ts +5 -4
  149. package/lib/led-gauge/index.js +9 -11
  150. package/lib/list/custom-elements.json +18 -5
  151. package/lib/list/custom-elements.md +32 -0
  152. package/lib/list/helpers/list-renderer.d.ts +2 -2
  153. package/lib/list/helpers/list-renderer.js +4 -2
  154. package/lib/list/helpers/types.d.ts +2 -2
  155. package/lib/list/index.d.ts +27 -10
  156. package/lib/list/index.js +54 -25
  157. package/lib/list/renderer.d.ts +2 -2
  158. package/lib/list/renderer.js +1 -1
  159. package/lib/loader/custom-elements.md +5 -0
  160. package/lib/loader/index.js +4 -8
  161. package/lib/multi-input/custom-elements.json +7 -6
  162. package/lib/multi-input/custom-elements.md +43 -0
  163. package/lib/multi-input/helpers/types.d.ts +1 -1
  164. package/lib/multi-input/index.d.ts +11 -7
  165. package/lib/multi-input/index.js +20 -17
  166. package/lib/notification/custom-elements.md +26 -0
  167. package/lib/notification/elements/notification-tray.d.ts +2 -2
  168. package/lib/notification/elements/notification-tray.js +6 -9
  169. package/lib/notification/elements/notification.d.ts +5 -5
  170. package/lib/notification/elements/notification.js +8 -11
  171. package/lib/notification/helpers/status.d.ts +1 -1
  172. package/lib/notification/helpers/status.js +1 -1
  173. package/lib/notification/helpers/types.d.ts +1 -1
  174. package/lib/notification/index.d.ts +2 -2
  175. package/lib/notification/index.js +2 -2
  176. package/lib/number-field/custom-elements.json +99 -54
  177. package/lib/number-field/custom-elements.md +42 -0
  178. package/lib/number-field/index.d.ts +96 -51
  179. package/lib/number-field/index.js +121 -89
  180. package/lib/overlay/custom-elements.json +26 -13
  181. package/lib/overlay/custom-elements.md +54 -0
  182. package/lib/overlay/elements/overlay-backdrop.d.ts +4 -4
  183. package/lib/overlay/elements/overlay-backdrop.js +6 -9
  184. package/lib/overlay/elements/overlay-viewport.d.ts +3 -3
  185. package/lib/overlay/elements/overlay-viewport.js +5 -9
  186. package/lib/overlay/elements/overlay.d.ts +10 -5
  187. package/lib/overlay/elements/overlay.js +18 -23
  188. package/lib/overlay/index.d.ts +2 -2
  189. package/lib/overlay/index.js +1 -1
  190. package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
  191. package/lib/overlay/managers/backdrop-manager.js +2 -2
  192. package/lib/overlay/managers/close-manager.js +1 -1
  193. package/lib/overlay/managers/focus-manager.js +2 -2
  194. package/lib/overlay/managers/interaction-lock-manager.js +2 -2
  195. package/lib/overlay/managers/viewport-manager.d.ts +2 -2
  196. package/lib/overlay/managers/viewport-manager.js +6 -2
  197. package/lib/overlay/managers/zindex-manager.js +1 -1
  198. package/lib/overlay-menu/custom-elements.json +70 -20
  199. package/lib/overlay-menu/custom-elements.md +44 -0
  200. package/lib/overlay-menu/helpers/types.d.ts +3 -3
  201. package/lib/overlay-menu/index.d.ts +21 -19
  202. package/lib/overlay-menu/index.js +32 -31
  203. package/lib/overlay-menu/managers/menu-manager.d.ts +2 -2
  204. package/lib/overlay-menu/managers/menu-manager.js +3 -3
  205. package/lib/pagination/custom-elements.md +27 -0
  206. package/lib/pagination/index.d.ts +8 -8
  207. package/lib/pagination/index.js +13 -15
  208. package/lib/panel/custom-elements.md +11 -0
  209. package/lib/panel/index.d.ts +3 -3
  210. package/lib/panel/index.js +6 -9
  211. package/lib/password-field/custom-elements.json +62 -67
  212. package/lib/password-field/custom-elements.md +39 -0
  213. package/lib/password-field/index.d.ts +43 -94
  214. package/lib/password-field/index.js +52 -198
  215. package/lib/pill/custom-elements.json +8 -6
  216. package/lib/pill/custom-elements.md +22 -0
  217. package/lib/pill/index.d.ts +5 -5
  218. package/lib/pill/index.js +9 -11
  219. package/lib/progress-bar/custom-elements.md +18 -0
  220. package/lib/progress-bar/index.d.ts +3 -3
  221. package/lib/progress-bar/index.js +7 -9
  222. package/lib/radio-button/custom-elements.json +4 -4
  223. package/lib/radio-button/custom-elements.md +19 -0
  224. package/lib/radio-button/index.d.ts +25 -8
  225. package/lib/radio-button/index.js +84 -21
  226. package/lib/radio-button/radio-button-registry.d.ts +3 -2
  227. package/lib/radio-button/radio-button-registry.js +57 -4
  228. package/lib/rating/custom-elements.md +17 -0
  229. package/lib/rating/index.d.ts +3 -3
  230. package/lib/rating/index.js +9 -10
  231. package/lib/search-field/custom-elements.json +70 -74
  232. package/lib/search-field/custom-elements.md +41 -0
  233. package/lib/search-field/index.d.ts +44 -101
  234. package/lib/search-field/index.js +50 -220
  235. package/lib/select/custom-elements.json +5 -4
  236. package/lib/select/custom-elements.md +24 -0
  237. package/lib/select/helpers/types.d.ts +1 -1
  238. package/lib/select/index.d.ts +18 -10
  239. package/lib/select/index.js +84 -45
  240. package/lib/sidebar-layout/custom-elements.json +2 -6
  241. package/lib/sidebar-layout/custom-elements.md +21 -0
  242. package/lib/sidebar-layout/index.d.ts +7 -6
  243. package/lib/sidebar-layout/index.js +9 -10
  244. package/lib/slider/custom-elements.json +4 -4
  245. package/lib/slider/custom-elements.md +28 -0
  246. package/lib/slider/index.d.ts +4 -4
  247. package/lib/slider/index.js +9 -10
  248. package/lib/sparkline/custom-elements.json +4 -4
  249. package/lib/sparkline/custom-elements.md +16 -0
  250. package/lib/sparkline/index.d.ts +6 -4
  251. package/lib/sparkline/index.js +10 -10
  252. package/lib/swing-gauge/custom-elements.json +5 -3
  253. package/lib/swing-gauge/custom-elements.md +17 -0
  254. package/lib/swing-gauge/helpers.d.ts +1 -1
  255. package/lib/swing-gauge/helpers.js +1 -1
  256. package/lib/swing-gauge/index.d.ts +9 -7
  257. package/lib/swing-gauge/index.js +17 -15
  258. package/lib/tab/custom-elements.json +2 -2
  259. package/lib/tab/custom-elements.md +22 -0
  260. package/lib/tab/index.d.ts +5 -5
  261. package/lib/tab/index.js +9 -12
  262. package/lib/tab-bar/custom-elements.md +11 -0
  263. package/lib/tab-bar/index.d.ts +4 -4
  264. package/lib/tab-bar/index.js +9 -11
  265. package/lib/text-field/custom-elements.json +78 -89
  266. package/lib/text-field/custom-elements.md +35 -0
  267. package/lib/text-field/index.d.ts +59 -79
  268. package/lib/text-field/index.js +99 -158
  269. package/lib/time-picker/custom-elements.json +4 -4
  270. package/lib/time-picker/custom-elements.md +28 -0
  271. package/lib/time-picker/index.d.ts +7 -4
  272. package/lib/time-picker/index.js +15 -14
  273. package/lib/toggle/custom-elements.json +4 -4
  274. package/lib/toggle/custom-elements.md +19 -0
  275. package/lib/toggle/index.d.ts +14 -4
  276. package/lib/toggle/index.js +31 -12
  277. package/lib/tooltip/custom-elements.md +14 -0
  278. package/lib/tooltip/elements/title-tooltip.js +2 -2
  279. package/lib/tooltip/elements/tooltip-element.d.ts +1 -1
  280. package/lib/tooltip/helpers/overflow-tooltip.d.ts +1 -1
  281. package/lib/tooltip/helpers/overflow-tooltip.js +1 -1
  282. package/lib/tooltip/helpers/renderer.d.ts +1 -1
  283. package/lib/tooltip/helpers/types.d.ts +1 -1
  284. package/lib/tooltip/index.d.ts +9 -9
  285. package/lib/tooltip/index.js +18 -20
  286. package/lib/tooltip/managers/tooltip-manager.d.ts +2 -2
  287. package/lib/tooltip/managers/tooltip-manager.js +3 -7
  288. package/lib/tornado-chart/custom-elements.md +18 -0
  289. package/lib/tornado-chart/elements/tornado-chart.d.ts +4 -4
  290. package/lib/tornado-chart/elements/tornado-chart.js +8 -11
  291. package/lib/tornado-chart/elements/tornado-item.d.ts +5 -5
  292. package/lib/tornado-chart/elements/tornado-item.js +10 -12
  293. package/lib/tornado-chart/index.d.ts +2 -2
  294. package/lib/tornado-chart/index.js +2 -2
  295. package/lib/tree/custom-elements.json +4 -3
  296. package/lib/tree/custom-elements.md +32 -0
  297. package/lib/tree/elements/tree-item.d.ts +4 -4
  298. package/lib/tree/elements/tree-item.js +10 -13
  299. package/lib/tree/elements/tree.d.ts +6 -5
  300. package/lib/tree/elements/tree.js +9 -12
  301. package/lib/tree/helpers/filter.d.ts +2 -2
  302. package/lib/tree/helpers/renderer.d.ts +2 -2
  303. package/lib/tree/helpers/renderer.js +3 -3
  304. package/lib/tree/helpers/types.d.ts +1 -1
  305. package/lib/tree/index.d.ts +4 -4
  306. package/lib/tree/index.js +3 -3
  307. package/lib/tree/managers/tree-manager.d.ts +22 -10
  308. package/lib/tree/managers/tree-manager.js +56 -40
  309. package/lib/tree/themes/halo/dark/index.js +1 -1
  310. package/lib/tree/themes/halo/light/index.js +1 -1
  311. package/lib/tree/themes/solar/charcoal/index.js +1 -1
  312. package/lib/tree/themes/solar/pearl/index.js +1 -1
  313. package/lib/tree-select/custom-elements.json +10 -6
  314. package/lib/tree-select/custom-elements.md +26 -0
  315. package/lib/tree-select/helpers/types.d.ts +2 -2
  316. package/lib/tree-select/index.d.ts +28 -20
  317. package/lib/tree-select/index.js +44 -31
  318. package/lib/tree-select/themes/halo/dark/index.js +1 -1
  319. package/lib/tree-select/themes/halo/light/index.js +1 -1
  320. package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
  321. package/lib/tree-select/themes/solar/pearl/index.js +1 -1
  322. package/lib/version.d.ts +1 -0
  323. package/lib/version.js +1 -0
  324. package/package.json +298 -15
  325. package/lib/autosuggest/helpers/const.d.ts +0 -2
  326. package/lib/autosuggest/helpers/const.js +0 -3
  327. package/lib/overlay-menu/helpers/uuid.d.ts +0 -7
  328. package/lib/overlay-menu/helpers/uuid.js +0 -13
package/CHANGELOG.md CHANGED
@@ -3,27 +3,84 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [5.5.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@5.3.3...@refinitiv-ui/elements@5.5.0) (2021-10-25)
6
+ ## [5.8.1](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@5.8.0...@refinitiv-ui/elements@5.8.1) (2021-12-07)
7
+
8
+ **Note:** Version bump only for package @refinitiv-ui/elements
9
+
10
+
11
+
12
+
13
+
14
+ # [5.8.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@5.7.0...@refinitiv-ui/elements@5.8.0) (2021-12-03)
7
15
 
8
16
 
9
17
  ### Bug Fixes
10
18
 
11
- * dev server should start with source maps and declaration maps ([3e81b33](https://github.com/Refinitiv/refinitiv-ui/commit/3e81b33d4fb2136af2b18eeaf1fc1d740bd38105))
12
- * **overlay-menu:** interactiveElements list is not reset in some scenarios ([6e17cce](https://github.com/Refinitiv/refinitiv-ui/commit/6e17cce224eafe3e54ee9c2fdfa7bf9bce5dcbfc))
13
- * **overlay-menu:** remove wrong super call ([0a63e1f](https://github.com/Refinitiv/refinitiv-ui/commit/0a63e1fc9c0bb8a161010fd15df47198a9101bfa))
14
- * **overlay:** incorrect change check for `interactiveElements` property ([d1da5b6](https://github.com/Refinitiv/refinitiv-ui/commit/d1da5b692df070f0bb8f08644dd30b43673ffb49))
19
+ * change default role to more generic type for better extendibility ([#100](https://github.com/Refinitiv/refinitiv-ui/issues/100)) ([fe999dc](https://github.com/Refinitiv/refinitiv-ui/commit/fe999dc66b5f42581a37329ced697ae6ac2dc929))
20
+ * **combo-box:** fix arrow icon not show in Solar when disabled ([55c1008](https://github.com/Refinitiv/refinitiv-ui/commit/55c1008b7b63f915a7575059c6539e63a757e389))
21
+ * **combo-box:** import counter instead of pill ([6410c03](https://github.com/Refinitiv/refinitiv-ui/commit/6410c03dd12077f25347dddb249b6a6700186abc))
15
22
 
16
23
 
17
24
  ### Features
18
25
 
19
- * add browsers option to test command ([#27](https://github.com/Refinitiv/refinitiv-ui/issues/27)) ([64a1d46](https://github.com/Refinitiv/refinitiv-ui/commit/64a1d464fb3c4a1f1cf851c3ab070cd9f615fb6c))
20
- * **tree:** query attribute and property ([ce067c7](https://github.com/Refinitiv/refinitiv-ui/commit/ce067c723cf42a57545589dea4feb57ac1e08822))
26
+ * **list:** improve screen reader ([0bc3a8c](https://github.com/Refinitiv/refinitiv-ui/commit/0bc3a8c9c4051200cd1a5c8ed655d1d3ebbd9021))
27
+ * **select:** improve screen reader support ([#80](https://github.com/Refinitiv/refinitiv-ui/issues/80)) ([a43fbcd](https://github.com/Refinitiv/refinitiv-ui/commit/a43fbcd4b23b2f508ddc94b8007913f66da1ae89))
28
+
29
+
30
+
31
+
32
+
33
+ # [5.7.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@5.6.0...@refinitiv-ui/elements@5.7.0) (2021-11-22)
34
+
35
+
36
+ ### Bug Fixes
21
37
 
38
+ * **tree:** correctly update dependant checked states ([#82](https://github.com/Refinitiv/refinitiv-ui/issues/82)) ([fdb7018](https://github.com/Refinitiv/refinitiv-ui/commit/fdb7018f9446f933f428448ada60f4a8cacc1acf))
22
39
 
23
40
 
41
+ ### Features
42
+
43
+ * **item:** improve screen reader support ([#74](https://github.com/Refinitiv/refinitiv-ui/issues/74)) ([b14b950](https://github.com/Refinitiv/refinitiv-ui/commit/b14b950897cb96cdc957e12d93b510cc4361c4f3))
44
+
45
+
46
+
47
+
48
+
49
+ # [5.6.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@5.5.0...@refinitiv-ui/elements@5.6.0) (2021-11-08)
50
+
51
+
52
+ ### Bug Fixes
53
+
54
+ * **datetime-picker:** values are not update synchronously ([#59](https://github.com/Refinitiv/refinitiv-ui/issues/59)) ([55500a3](https://github.com/Refinitiv/refinitiv-ui/commit/55500a30f4daab1110d7664b6c244dd2b83995cb))
55
+ * incorrect tap behaviour ([#57](https://github.com/Refinitiv/refinitiv-ui/issues/57)) ([a245fbe](https://github.com/Refinitiv/refinitiv-ui/commit/a245fbe1999057de0525313e35d5156cc497135f))
56
+ * **multi-input:** only focus input on click clear button ([#64](https://github.com/Refinitiv/refinitiv-ui/issues/64)) ([214452a](https://github.com/Refinitiv/refinitiv-ui/commit/214452ac02f77c91090226597c2c02e95fc3d084))
57
+ * **tree-select:** update selectAll condition when search no match ([#53](https://github.com/Refinitiv/refinitiv-ui/issues/53)) ([c3b5e46](https://github.com/Refinitiv/refinitiv-ui/commit/c3b5e461bdf56ad9d17ae921d1c5f980d44754ac))
24
58
 
25
59
 
26
- # [5.4.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@5.3.3...@refinitiv-ui/elements@5.4.0) (2021-10-25)
60
+ ### Features
61
+
62
+ * **button:** improve accessibility for screen readers ([#33](https://github.com/Refinitiv/refinitiv-ui/issues/33)) ([89f2e19](https://github.com/Refinitiv/refinitiv-ui/commit/89f2e19f631257e5572d2c74cf7449f9be265aca))
63
+ * **checkbox:** improve accessibility for screen readers ([#37](https://github.com/Refinitiv/refinitiv-ui/issues/37)) ([93509d0](https://github.com/Refinitiv/refinitiv-ui/commit/93509d0ec801b880b9bf68013d83c140075c59dd))
64
+ * **clock:** small analogue clock face ([#54](https://github.com/Refinitiv/refinitiv-ui/issues/54)) ([bc4b2a8](https://github.com/Refinitiv/refinitiv-ui/commit/bc4b2a816135ef70819d826d15ba9b36dda99207))
65
+ * **core:** add latest lit directives, add focused-changed event ([69168f6](https://github.com/Refinitiv/refinitiv-ui/commit/69168f6fe3e6eea8e9abb2a875a2f283eb06d42b))
66
+ * **icon:** support icon names and icon urls ([6d3a92d](https://github.com/Refinitiv/refinitiv-ui/commit/6d3a92db329c5198d56aeed4a1944ef3d0e29f1d))
67
+ * Lit@2 upgrade ([dbda63b](https://github.com/Refinitiv/refinitiv-ui/commit/dbda63be97257f891cb1f2c5ff46b638c70e0b15))
68
+ * **radio-button:** improve radio button accessibility ([#43](https://github.com/Refinitiv/refinitiv-ui/issues/43)) ([12d2b23](https://github.com/Refinitiv/refinitiv-ui/commit/12d2b238c988e880d8055afe280cfb93ace6dd51))
69
+ * **text-field:** improve screen reader support ([#65](https://github.com/Refinitiv/refinitiv-ui/issues/65)) ([65bfa44](https://github.com/Refinitiv/refinitiv-ui/commit/65bfa4404bb4b462f20163c733b75fd509485b1b))
70
+ * **toggle:** improve accessibility for screen readers ([#42](https://github.com/Refinitiv/refinitiv-ui/issues/42)) ([7554471](https://github.com/Refinitiv/refinitiv-ui/commit/755447104777606247bb06bfba5e97accb893ccf))
71
+
72
+
73
+ ### Performance Improvements
74
+
75
+ * **icon:** cache svg template results ([463c6ba](https://github.com/Refinitiv/refinitiv-ui/commit/463c6ba1f0403aa25605fd363ac863159ee4c492))
76
+ * **list:** check before positioning element in dom ([244b44f](https://github.com/Refinitiv/refinitiv-ui/commit/244b44fba553e1f40e0a55ecda93e7d943b13994))
77
+ * **tree:** reduce calculations for visible items ([c231f06](https://github.com/Refinitiv/refinitiv-ui/commit/c231f06a1a4a901bafefdee7dcc1e009a7902ac5))
78
+
79
+
80
+
81
+
82
+
83
+ # [5.5.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@5.3.3...@refinitiv-ui/elements@5.5.0) (2021-10-25)
27
84
 
28
85
 
29
86
  ### Bug Fixes
@@ -0,0 +1,18 @@
1
+ # ef-accordion
2
+
3
+ Used to display a group of `Collapse` control.
4
+ Only one item will be able to expand by default but you can customize its behavior.
5
+
6
+ ## Properties
7
+
8
+ | Property | Attribute | Type | Default | Description |
9
+ |------------------------|--------------------------|-----------|---------|--------------------------------------------------|
10
+ | `autoCollapseDisabled` | `auto-collapse-disabled` | `boolean` | false | Allow multiple sections expand at the same time |
11
+ | `spacing` | `spacing` | `boolean` | false | Add spacing to content section in all collapse items |
12
+
13
+ ## Slots
14
+
15
+ | Name | Description |
16
+ |----------------|--------------------------------------------------|
17
+ | `header-left` | Slot to add custom contents to the left side of header e.g. ef-icon, ef-checkbox |
18
+ | `header-right` | Slot to add custom contents to the right side of header e.g. ef-icon, ef-checkbox |
@@ -1,6 +1,6 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { PropertyValues, TemplateResult, CSSResult } from '@refinitiv-ui/core';
3
- import { Collapse } from '../collapse';
2
+ import { PropertyValues, TemplateResult, CSSResultGroup } from '@refinitiv-ui/core';
3
+ import { Collapse } from '../collapse/index.js';
4
4
  /**
5
5
  * Used to display a group of `Collapse` control.
6
6
  * Only one item will be able to expand by default but you can customize its behavior.
@@ -16,12 +16,12 @@ export declare class Accordion extends Collapse {
16
16
  */
17
17
  static get version(): string;
18
18
  /**
19
- * A `CSSResult` that will be used
19
+ * A `CSSResultGroup` that will be used
20
20
  * to style the host, slotted children
21
21
  * and the internal template of the element.
22
- * @return {CSSResult | CSSResult[]} CSS template
22
+ * @return CSS template
23
23
  */
24
- static get styles(): CSSResult | CSSResult[];
24
+ static get styles(): CSSResultGroup;
25
25
  /**
26
26
  * Allow multiple sections expand at the same time
27
27
  */
@@ -1,12 +1,9 @@
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 } from '@refinitiv-ui/core';
8
- import { VERSION } from '../';
9
- import { Collapse } from '../collapse';
1
+ import { __decorate } from "tslib";
2
+ import { 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 { VERSION } from '../version.js';
6
+ import { Collapse } from '../collapse/index.js';
10
7
  /**
11
8
  * Finds closest accordion parent of element.
12
9
  * Created, because IE11 doesn't support closest() method.
@@ -72,10 +69,10 @@ let Accordion = class Accordion extends Collapse {
72
69
  return VERSION;
73
70
  }
74
71
  /**
75
- * A `CSSResult` that will be used
72
+ * A `CSSResultGroup` that will be used
76
73
  * to style the host, slotted children
77
74
  * and the internal template of the element.
78
- * @return {CSSResult | CSSResult[]} CSS template
75
+ * @return CSS template
79
76
  */
80
77
  static get styles() {
81
78
  return css `
@@ -0,0 +1,22 @@
1
+ # ef-appstate-bar
2
+
3
+ Used to display at the top of application to provide a status or information.
4
+
5
+ ## Properties
6
+
7
+ | Property | Attribute | Type | Default | Description |
8
+ |-----------|-----------|---------------------------------|---------|--------------------------------------------------|
9
+ | `heading` | `heading` | `string` | "" | Text to display in heading section. |
10
+ | `state` | `state` | `"info" \| "highlight" \| null` | null | (optional) Type of state bar. Supported value are `info`, `highlight`. |
11
+
12
+ ## Events
13
+
14
+ | Event | Description |
15
+ |---------|------------------------------------|
16
+ | `clear` | fired when clear button is clicked |
17
+
18
+ ## Slots
19
+
20
+ | Name | Description |
21
+ |---------|-------------------------------------------|
22
+ | `right` | place custom content on the right of bar. |
@@ -1,6 +1,6 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { BasicElement, TemplateResult, CSSResult, PropertyValues } from '@refinitiv-ui/core';
3
- import '../icon';
2
+ import { BasicElement, TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
3
+ import '../icon/index.js';
4
4
  /**
5
5
  * Used to display at the top of application to provide a status or information.
6
6
  * @slot right - place custom content on the right of bar.
@@ -14,13 +14,13 @@ export declare class AppstateBar extends BasicElement {
14
14
  */
15
15
  static get version(): string;
16
16
  /**
17
- * A `CSSResult` that will be used
17
+ * A `CSSResultGroup` that will be used
18
18
  * to style the host, slotted children
19
19
  * and the internal template of the element.
20
20
  *
21
- * @returns {(CSSResult|CSSResult[])} CSS template
21
+ * @returns CSS template
22
22
  */
23
- static get styles(): CSSResult | CSSResult[];
23
+ static get styles(): CSSResultGroup;
24
24
  /**
25
25
  * Text to display in heading section.
26
26
  */
@@ -1,12 +1,9 @@
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 { BasicElement, html, css, customElement, property } from '@refinitiv-ui/core';
8
- import { VERSION } from '../';
9
- import '../icon';
1
+ import { __decorate } from "tslib";
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 { VERSION } from '../version.js';
6
+ import '../icon/index.js';
10
7
  /**
11
8
  * Used to display at the top of application to provide a status or information.
12
9
  * @slot right - place custom content on the right of bar.
@@ -50,11 +47,11 @@ let AppstateBar = class AppstateBar extends BasicElement {
50
47
  return VERSION;
51
48
  }
52
49
  /**
53
- * A `CSSResult` that will be used
50
+ * A `CSSResultGroup` that will be used
54
51
  * to style the host, slotted children
55
52
  * and the internal template of the element.
56
53
  *
57
- * @returns {(CSSResult|CSSResult[])} CSS template
54
+ * @returns CSS template
58
55
  */
59
56
  static get styles() {
60
57
  return css `
@@ -26,7 +26,7 @@
26
26
  "name": "more-search-text",
27
27
  "description": "Custom text for More Search",
28
28
  "type": "string",
29
- "default": "\"defaultMoreSearchText\""
29
+ "default": "\"More results for {0}\""
30
30
  },
31
31
  {
32
32
  "name": "loading",
@@ -50,10 +50,20 @@
50
50
  "name": "opened",
51
51
  "description": "Auto suggest popup's open state",
52
52
  "type": "boolean",
53
- "default": "\"false\""
53
+ "default": "false"
54
54
  }
55
55
  ],
56
56
  "properties": [
57
+ {
58
+ "name": "defaultDebounceRate (readonly)",
59
+ "type": "100",
60
+ "default": "100"
61
+ },
62
+ {
63
+ "name": "defaultMoreSearchText (readonly)",
64
+ "type": "\"More results for {0}\"",
65
+ "default": "\"More results for {0}\""
66
+ },
57
67
  {
58
68
  "name": "attach",
59
69
  "attribute": "attach",
@@ -79,7 +89,7 @@
79
89
  "attribute": "more-search-text",
80
90
  "description": "Custom text for More Search",
81
91
  "type": "string",
82
- "default": "\"defaultMoreSearchText\""
92
+ "default": "\"More results for {0}\""
83
93
  },
84
94
  {
85
95
  "name": "loading",
@@ -130,7 +140,7 @@
130
140
  "attribute": "opened",
131
141
  "description": "Auto suggest popup's open state",
132
142
  "type": "boolean",
133
- "default": "\"false\""
143
+ "default": "false"
134
144
  }
135
145
  ],
136
146
  "events": [
@@ -167,6 +177,16 @@
167
177
  "description": "Fired when suggestions changed"
168
178
  }
169
179
  ],
180
+ "slots": [
181
+ {
182
+ "name": "header",
183
+ "description": "Slot to add custom contents at the top of autosuggest popup"
184
+ },
185
+ {
186
+ "name": "footer",
187
+ "description": "Slot to add custom contents at the bottom of autosuggest popup"
188
+ }
189
+ ],
170
190
  "methods": [
171
191
  {
172
192
  "name": "onInputValueChange",
@@ -0,0 +1,54 @@
1
+ # ef-autosuggest
2
+
3
+ Shows suggestions based on users' query.
4
+ It can be used by attaching to text form control
5
+ such as TextField, Multi Input, etc.
6
+ Autosuggest supports various use cases such as
7
+ custom rendering, pagination, asynchronous data request, etc.
8
+
9
+ ## Properties
10
+
11
+ | Property | Attribute | Type | Default | Description |
12
+ |------------------|--------------------|----------------------------------------------|------------------------|--------------------------------------------------|
13
+ | `attach` | `attach` | `AutosuggestTargetElement \| string \| null` | null | An HTML Element or CSS selector |
14
+ | `debounceRate` | `debounce-rate` | `number` | "100" | Debounce rate in ms of the filter as a number.<br />Used to throttle the filter rate so as not to trigger unneeded filtering |
15
+ | `highlightable` | | `AutosuggestHighlightable` | "itemHighlightable" | A function that is applied to every suggestion during the render process<br />to say whether the item can be highlighted and selected. Only items that return true are considered.<br />By default the function checks for `item` `highlightable` property. |
16
+ | `htmlRenderer` | `html-renderer` | `boolean` | false | If set to true, the render function is not called. Instead the wrapper element<br />should populate and destroy suggestion elements. Rendering items manually<br />may have performance benefits in frameworks that use virtual DOM (such as `Vue`, `React`, `hyperHTML` and others) |
17
+ | `loading` | `loading` | `boolean` | false | If set to true show loading mask |
18
+ | `moreResults` | `more-results` | `boolean` | false | If set to true display 'Has more results' item |
19
+ | `moreSearchText` | `more-search-text` | `string` | "More results for {0}" | Custom text for More Search |
20
+ | `opened` | `opened` | `boolean` | false | Auto suggest popup's open state |
21
+ | `query` | | `AutosuggestQuery \| null` | null | An object that represents a query from attach target |
22
+ | `renderer` | | `AutosuggestRenderer` | "itemRenderer" | A renderer applied to suggestion.<br />By default a render maps data to item attributes |
23
+ | `requestOnFocus` | `request-on-focus` | `boolean` | false | Request suggestions when attach target is focused |
24
+ | `suggestions` | | `AutosuggestItem[]` | [] | A list of suggestion items |
25
+
26
+ ## Methods
27
+
28
+ | Method | Type | Description |
29
+ |----------------------|----------------------|--------------------------------------------------|
30
+ | `onInputBlur` | `(event: any): void` | Run when input has lost focus<br /><br />**event**: by default `blur` event is listened |
31
+ | `onInputFocus` | `(event: any): void` | Run when input received focus<br /><br />**event**: by default `focus` event is listened |
32
+ | `onInputKeyDown` | `(event: any): void` | Run when input key down event has happened<br /><br />**event**: by default `keydown` event is listened |
33
+ | `onInputValueChange` | `(event: any): void` | Run when attach target value changes.<br /><br />**event**: by default `value-changed` event is listened |
34
+ | `refit` | `(): void` | Set the width |
35
+
36
+ ## Events
37
+
38
+ | Event | Description |
39
+ |-------------------------------|--------------------------------------------------|
40
+ | `add-attach-target-events` | Fired when attach has been set |
41
+ | `item-highlight` | Fired when an item gets highlighted or highlight is removed |
42
+ | `item-select` | Fired when an item gets selected |
43
+ | `remove-attach-target-events` | Fired when attach has been removed |
44
+ | `suggestions-changed` | Fired when suggestions changed |
45
+ | `suggestions-clear-requested` | Fired when auto suggest requests to clear the data. If used in reactive application, prevent default and set suggestions to [] |
46
+ | `suggestions-fetch-requested` | Fired when auto suggest requests the data |
47
+ | `suggestions-query` | Fired when input value has changed and the query must be set |
48
+
49
+ ## Slots
50
+
51
+ | Name | Description |
52
+ |----------|--------------------------------------------------|
53
+ | `footer` | Slot to add custom contents at the bottom of autosuggest popup |
54
+ | `header` | Slot to add custom contents at the top of autosuggest popup |
@@ -1,4 +1,4 @@
1
- import { ItemType } from '../../item';
1
+ import type { ItemType } from '../../item';
2
2
  export declare type AutosuggestSelectItemEvent = CustomEvent<{
3
3
  query: string;
4
4
  suggestion: Suggestion;
@@ -1,5 +1,5 @@
1
- import { Item } from '../../item';
2
- import { AutosuggestHighlightable, AutosuggestRenderer } from './types';
1
+ import type { Item } from '../../item';
2
+ import type { AutosuggestHighlightable, AutosuggestRenderer } from './types';
3
3
  /**
4
4
  * Check whether item can be highlighted
5
5
  * @param suggestion Suggestion object
@@ -1,4 +1,3 @@
1
- import { Item } from '../../item';
2
1
  /**
3
2
  * Check whether item can be highlighted
4
3
  * @param suggestion Suggestion object
@@ -54,7 +53,7 @@ export const updateElementContent = (el, query, label, value) => {
54
53
  * @returns item
55
54
  */
56
55
  export const itemRenderer = (suggestion, query) => {
57
- const el = new Item();
56
+ const el = document.createElement('ef-item');
58
57
  if (typeof suggestion === 'object') {
59
58
  const { type, label, title, icon, disabled, value } = suggestion;
60
59
  el.type = type || null;
@@ -1,10 +1,11 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { CSSResult, ElementSize, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
- import { Overlay } from '../overlay';
4
- import '../loader';
5
- import { AutosuggestTargetElement, AutosuggestHighlightable, AutosuggestMethodType, AutosuggestQuery, AutosuggestRenderer, AutosuggestReason, AutosuggestItem, AutosuggestSelectItemEvent, AutosuggestHighlightItemEvent } from './helpers/types';
6
- export { AutosuggestTargetElement, AutosuggestHighlightable, AutosuggestMethodType, AutosuggestQuery, AutosuggestRenderer, AutosuggestReason, AutosuggestItem } from './helpers/types';
7
- export { queryWordSelect, itemRenderer, escapeRegExp, itemHighlightable, updateElementContent } from './helpers/utils';
2
+ import { CSSResultGroup, ElementSize, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
+ import type { AutosuggestTargetElement, AutosuggestHighlightable, AutosuggestMethodType, AutosuggestQuery, AutosuggestRenderer, AutosuggestReason, AutosuggestItem, AutosuggestSelectItemEvent, AutosuggestHighlightItemEvent } from './helpers/types';
4
+ import { Overlay } from '../overlay/index.js';
5
+ import '../loader/index.js';
6
+ import '../item/index.js';
7
+ export type { AutosuggestTargetElement, AutosuggestHighlightable, AutosuggestMethodType, AutosuggestQuery, AutosuggestRenderer, AutosuggestReason, AutosuggestItem } from './helpers/types';
8
+ export { queryWordSelect, itemRenderer, escapeRegExp, itemHighlightable, updateElementContent } from './helpers/utils.js';
8
9
  /**
9
10
  * Shows suggestions based on users' query.
10
11
  * It can be used by attaching to text form control
@@ -23,6 +24,9 @@ export { queryWordSelect, itemRenderer, escapeRegExp, itemHighlightable, updateE
23
24
  *
24
25
  * @attr {boolean} opened - Set to open auto suggest popup
25
26
  * @prop {boolean} [opened=false] - Auto suggest popup's open state
27
+ *
28
+ * @slot header - Slot to add custom contents at the top of autosuggest popup
29
+ * @slot footer - Slot to add custom contents at the bottom of autosuggest popup
26
30
  */
27
31
  export declare class Autosuggest extends Overlay {
28
32
  /**
@@ -31,12 +35,12 @@ export declare class Autosuggest extends Overlay {
31
35
  */
32
36
  static get version(): string;
33
37
  /**
34
- * A `CSSResult` that will be used
38
+ * A `CSSResultGroup` that will be used
35
39
  * to style the host, slotted children
36
40
  * and the internal template of the element.
37
41
  * @return CSS template
38
42
  */
39
- static get styles(): CSSResult | CSSResult[];
43
+ static get styles(): CSSResultGroup;
40
44
  /**
41
45
  * A basic regexp matching pattern to replace text based on string input.
42
46
  * @param text Value to test against
@@ -82,6 +86,7 @@ export declare class Autosuggest extends Overlay {
82
86
  moreResults: boolean;
83
87
  /**
84
88
  * Custom text for More Search
89
+ * @default More results for {0}
85
90
  */
86
91
  moreSearchText: string;
87
92
  /**
@@ -1,18 +1,18 @@
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
1
  var Autosuggest_1;
8
- import { css, customElement, html, property, query, unsafeHTML } from '@refinitiv-ui/core';
9
- import { AnimationTaskRunner, TimeoutTaskRunner } from '@refinitiv-ui/utils';
10
- import { Overlay } from '../overlay';
11
- import '../loader';
12
- import { escapeRegExp, itemHighlightable, itemRenderer, queryWordSelect } from './helpers/utils';
13
- import { isIE, isMobile } from './helpers/const';
14
- import { VERSION } from '../';
15
- export { queryWordSelect, itemRenderer, escapeRegExp, itemHighlightable, updateElementContent } from './helpers/utils';
2
+ import { __decorate } from "tslib";
3
+ import { css, html } from '@refinitiv-ui/core';
4
+ import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
5
+ import { query } from '@refinitiv-ui/core/lib/decorators/query.js';
6
+ import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
7
+ import { unsafeHTML } from '@refinitiv-ui/core/lib/directives/unsafe-html.js';
8
+ import { VERSION } from '../version.js';
9
+ import { AnimationTaskRunner, TimeoutTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
10
+ import { escapeRegExp, itemHighlightable, itemRenderer, queryWordSelect } from './helpers/utils.js';
11
+ import { isIE, isMobile } from '@refinitiv-ui/utils/lib/browser.js';
12
+ import { Overlay } from '../overlay/index.js';
13
+ import '../loader/index.js';
14
+ import '../item/index.js';
15
+ export { queryWordSelect, itemRenderer, escapeRegExp, itemHighlightable, updateElementContent } from './helpers/utils.js';
16
16
  /**
17
17
  * Shows suggestions based on users' query.
18
18
  * It can be used by attaching to text form control
@@ -31,6 +31,9 @@ export { queryWordSelect, itemRenderer, escapeRegExp, itemHighlightable, updateE
31
31
  *
32
32
  * @attr {boolean} opened - Set to open auto suggest popup
33
33
  * @prop {boolean} [opened=false] - Auto suggest popup's open state
34
+ *
35
+ * @slot header - Slot to add custom contents at the top of autosuggest popup
36
+ * @slot footer - Slot to add custom contents at the bottom of autosuggest popup
34
37
  */
35
38
  let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
36
39
  /**
@@ -53,6 +56,7 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
53
56
  this.moreResults = false;
54
57
  /**
55
58
  * Custom text for More Search
59
+ * @default More results for {0}
56
60
  */
57
61
  this.moreSearchText = Autosuggest_1.defaultMoreSearchText;
58
62
  /**
@@ -267,28 +271,31 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
267
271
  return VERSION;
268
272
  }
269
273
  /**
270
- * A `CSSResult` that will be used
274
+ * A `CSSResultGroup` that will be used
271
275
  * to style the host, slotted children
272
276
  * and the internal template of the element.
273
277
  * @return CSS template
274
278
  */
275
279
  static get styles() {
276
- return [Overlay.styles, css `
277
- :host {
278
- overflow: hidden;
279
- display: flex;
280
- flex-direction: column;
281
- }
282
- [part=content] {
283
- flex: 1 1 auto;
284
- overflow-x: hidden;
285
- overflow-y: auto;
286
- -webkit-overflow-scrolling: touch;
287
- }
288
- [part=header], [part=footer] {
289
- flex: none;
290
- }
291
- `];
280
+ return [
281
+ super.styles,
282
+ css `
283
+ :host {
284
+ overflow: hidden;
285
+ display: flex;
286
+ flex-direction: column;
287
+ }
288
+ [part=content] {
289
+ flex: 1 1 auto;
290
+ overflow-x: hidden;
291
+ overflow-y: auto;
292
+ -webkit-overflow-scrolling: touch;
293
+ }
294
+ [part=header], [part=footer] {
295
+ flex: none;
296
+ }
297
+ `
298
+ ];
292
299
  }
293
300
  /**
294
301
  * A basic regexp matching pattern to replace text based on string input.
@@ -49,7 +49,7 @@
49
49
  "name": "disabled",
50
50
  "description": "Set state to disabled",
51
51
  "type": "boolean",
52
- "default": "\"false\""
52
+ "default": "false"
53
53
  }
54
54
  ],
55
55
  "properties": [
@@ -105,7 +105,7 @@
105
105
  "attribute": "disabled",
106
106
  "description": "Set state to disabled",
107
107
  "type": "boolean",
108
- "default": "\"false\""
108
+ "default": "false"
109
109
  }
110
110
  ],
111
111
  "events": [
@@ -0,0 +1,23 @@
1
+ # ef-button
2
+
3
+ Use button for actions in forms, dialogs,
4
+ and more with support for different states and styles.
5
+
6
+ ## Properties
7
+
8
+ | Property | Attribute | Type | Default | Description |
9
+ |---------------|---------------|-----------------------|---------|--------------------------------------------------|
10
+ | `active` | `active` | `boolean` | false | An active or inactive state, can only be used with toggles property/attribute |
11
+ | `cta` | `cta` | `boolean` | false | Set state to call-to-action |
12
+ | `disabled` | `disabled` | `boolean` | false | Set state to disabled |
13
+ | `hoverIcon` | `hover-icon` | `string \| null` | null | Specify icon to display when hovering. Value can be icon name |
14
+ | `icon` | `icon` | `string \| null` | null | Specify icon to display in button. Value can be icon name |
15
+ | `textpos` | `textpos` | `"before" \| "after"` | "after" | Customises text alignment when specified alongside `icon` property<br />Value can be `before` or `after` |
16
+ | `toggles` | `toggles` | `boolean` | false | Enable or disable ability to be toggled |
17
+ | `transparent` | `transparent` | `boolean` | false | Removes background when specified alongside `icon` property |
18
+
19
+ ## Events
20
+
21
+ | Event | Description |
22
+ |------------------|--------------------------------------------------|
23
+ | `active-changed` | Dispatched on changing `active` property state by taping on button when property `toggles` is true. |