@refinitiv-ui/elements 5.12.2 → 6.0.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/README.md +4 -4
  2. package/lib/accordion/index.d.ts +5 -0
  3. package/lib/accordion/index.js +2 -2
  4. package/lib/accordion/themes/halo/dark/index.js +1 -1
  5. package/lib/accordion/themes/halo/light/index.js +1 -1
  6. package/lib/accordion/themes/solar/charcoal/index.js +1 -1
  7. package/lib/accordion/themes/solar/pearl/index.js +1 -1
  8. package/lib/appstate-bar/index.d.ts +11 -0
  9. package/lib/appstate-bar/index.js +8 -3
  10. package/lib/appstate-bar/themes/halo/dark/index.js +1 -1
  11. package/lib/appstate-bar/themes/halo/light/index.js +1 -1
  12. package/lib/appstate-bar/themes/solar/charcoal/index.js +1 -1
  13. package/lib/appstate-bar/themes/solar/pearl/index.js +1 -1
  14. package/lib/autosuggest/index.d.ts +5 -0
  15. package/lib/autosuggest/index.js +22 -12
  16. package/lib/autosuggest/themes/halo/dark/index.js +3 -3
  17. package/lib/autosuggest/themes/halo/light/index.js +3 -3
  18. package/lib/autosuggest/themes/solar/charcoal/index.js +3 -3
  19. package/lib/autosuggest/themes/solar/pearl/index.js +3 -3
  20. package/lib/button/index.d.ts +7 -13
  21. package/lib/button/index.js +8 -43
  22. package/lib/button/themes/halo/dark/index.js +1 -1
  23. package/lib/button/themes/halo/light/index.js +1 -1
  24. package/lib/button/themes/solar/charcoal/index.js +1 -1
  25. package/lib/button/themes/solar/pearl/index.js +1 -1
  26. package/lib/button-bar/index.d.ts +5 -0
  27. package/lib/button-bar/index.js +4 -5
  28. package/lib/button-bar/themes/halo/dark/index.js +1 -1
  29. package/lib/button-bar/themes/halo/light/index.js +1 -1
  30. package/lib/button-bar/themes/solar/charcoal/index.js +1 -1
  31. package/lib/button-bar/themes/solar/pearl/index.js +1 -1
  32. package/lib/calendar/constants.js +1 -1
  33. package/lib/calendar/index.d.ts +6 -1
  34. package/lib/calendar/index.js +39 -15
  35. package/lib/calendar/locales.js +5 -5
  36. package/lib/calendar/themes/halo/dark/index.js +1 -1
  37. package/lib/calendar/themes/halo/light/index.js +1 -1
  38. package/lib/calendar/themes/solar/charcoal/index.js +1 -1
  39. package/lib/calendar/themes/solar/pearl/index.js +1 -1
  40. package/lib/calendar/types.d.ts +1 -1
  41. package/lib/calendar/utils.js +5 -5
  42. package/lib/canvas/index.d.ts +5 -0
  43. package/lib/canvas/index.js +3 -4
  44. package/lib/card/index.d.ts +21 -0
  45. package/lib/card/index.js +37 -15
  46. package/lib/card/themes/halo/dark/index.js +3 -3
  47. package/lib/card/themes/halo/light/index.js +3 -3
  48. package/lib/card/themes/solar/charcoal/index.js +3 -3
  49. package/lib/card/themes/solar/pearl/index.js +3 -3
  50. package/lib/chart/index.d.ts +5 -0
  51. package/lib/chart/index.js +18 -22
  52. package/lib/chart/plugins/doughnut-center-label.js +6 -11
  53. package/lib/chart/themes/halo/dark/index.js +2 -2
  54. package/lib/chart/themes/halo/light/index.js +2 -2
  55. package/lib/chart/themes/solar/charcoal/index.js +2 -2
  56. package/lib/chart/themes/solar/pearl/index.js +2 -2
  57. package/lib/checkbox/index.d.ts +5 -0
  58. package/lib/checkbox/index.js +3 -3
  59. package/lib/checkbox/themes/halo/dark/index.js +2 -2
  60. package/lib/checkbox/themes/halo/light/index.js +2 -2
  61. package/lib/checkbox/themes/solar/charcoal/index.js +2 -2
  62. package/lib/checkbox/themes/solar/pearl/index.js +2 -2
  63. package/lib/clock/index.d.ts +5 -0
  64. package/lib/clock/index.js +6 -6
  65. package/lib/clock/utils/TickManager.js +2 -2
  66. package/lib/collapse/index.d.ts +5 -0
  67. package/lib/collapse/index.js +7 -9
  68. package/lib/collapse/themes/halo/dark/index.js +3 -3
  69. package/lib/collapse/themes/halo/light/index.js +3 -3
  70. package/lib/collapse/themes/solar/charcoal/index.js +3 -3
  71. package/lib/collapse/themes/solar/pearl/index.js +3 -3
  72. package/lib/color-dialog/elements/color-palettes.d.ts +5 -0
  73. package/lib/color-dialog/elements/color-palettes.js +1 -1
  74. package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -0
  75. package/lib/color-dialog/elements/grayscale-palettes.js +2 -2
  76. package/lib/color-dialog/elements/palettes.js +4 -5
  77. package/lib/color-dialog/helpers/value-model.js +1 -1
  78. package/lib/color-dialog/index.d.ts +6 -1
  79. package/lib/color-dialog/index.js +17 -12
  80. package/lib/color-dialog/themes/halo/dark/index.js +5 -5
  81. package/lib/color-dialog/themes/halo/light/index.js +5 -5
  82. package/lib/color-dialog/themes/solar/charcoal/index.js +5 -5
  83. package/lib/color-dialog/themes/solar/pearl/index.js +5 -5
  84. package/lib/combo-box/helpers/filter.d.ts +1 -1
  85. package/lib/combo-box/helpers/types.d.ts +1 -1
  86. package/lib/combo-box/index.d.ts +9 -4
  87. package/lib/combo-box/index.js +31 -14
  88. package/lib/combo-box/themes/halo/dark/index.js +5 -5
  89. package/lib/combo-box/themes/halo/light/index.js +5 -5
  90. package/lib/combo-box/themes/solar/charcoal/index.js +5 -5
  91. package/lib/combo-box/themes/solar/pearl/index.js +5 -5
  92. package/lib/counter/index.d.ts +11 -6
  93. package/lib/counter/index.js +8 -8
  94. package/lib/counter/themes/halo/dark/index.js +1 -1
  95. package/lib/counter/themes/halo/light/index.js +1 -1
  96. package/lib/counter/themes/solar/charcoal/index.js +1 -1
  97. package/lib/counter/themes/solar/pearl/index.js +1 -1
  98. package/lib/datetime-field/constants.d.ts +4 -0
  99. package/lib/datetime-field/constants.js +5 -0
  100. package/lib/datetime-field/custom-elements.json +345 -0
  101. package/lib/datetime-field/custom-elements.md +61 -0
  102. package/lib/datetime-field/index.d.ts +322 -0
  103. package/lib/datetime-field/index.js +660 -0
  104. package/lib/datetime-field/themes/halo/dark/index.js +3 -0
  105. package/lib/datetime-field/themes/halo/light/index.js +3 -0
  106. package/lib/datetime-field/themes/solar/charcoal/index.js +3 -0
  107. package/lib/datetime-field/themes/solar/pearl/index.js +3 -0
  108. package/lib/datetime-field/types.d.ts +10 -0
  109. package/lib/datetime-field/types.js +1 -0
  110. package/lib/datetime-field/utils.d.ts +25 -0
  111. package/lib/datetime-field/utils.js +79 -0
  112. package/lib/datetime-picker/index.d.ts +5 -0
  113. package/lib/datetime-picker/index.js +6 -7
  114. package/lib/datetime-picker/themes/halo/dark/index.js +5 -5
  115. package/lib/datetime-picker/themes/halo/light/index.js +5 -5
  116. package/lib/datetime-picker/themes/solar/charcoal/index.js +5 -5
  117. package/lib/datetime-picker/themes/solar/pearl/index.js +5 -5
  118. package/lib/datetime-picker/utils.js +1 -1
  119. package/lib/dialog/draggable-element.js +1 -2
  120. package/lib/dialog/index.d.ts +6 -1
  121. package/lib/dialog/index.js +5 -5
  122. package/lib/dialog/themes/halo/dark/index.js +5 -5
  123. package/lib/dialog/themes/halo/light/index.js +5 -5
  124. package/lib/dialog/themes/solar/charcoal/index.js +5 -5
  125. package/lib/dialog/themes/solar/pearl/index.js +5 -5
  126. package/lib/email-field/index.d.ts +6 -1
  127. package/lib/email-field/index.js +8 -3
  128. package/lib/email-field/themes/halo/dark/index.js +1 -1
  129. package/lib/email-field/themes/halo/light/index.js +1 -1
  130. package/lib/email-field/themes/solar/charcoal/index.js +1 -1
  131. package/lib/email-field/themes/solar/pearl/index.js +1 -1
  132. package/lib/flag/index.d.ts +5 -0
  133. package/lib/flag/index.js +3 -3
  134. package/lib/flag/utils/FlagLoader.d.ts +1 -1
  135. package/lib/flag/utils/FlagLoader.js +1 -1
  136. package/lib/header/index.d.ts +5 -0
  137. package/lib/header/index.js +2 -2
  138. package/lib/heatmap/helpers/color.d.ts +1 -1
  139. package/lib/heatmap/helpers/color.js +3 -5
  140. package/lib/heatmap/helpers/text.d.ts +1 -7
  141. package/lib/heatmap/helpers/text.js +1 -18
  142. package/lib/heatmap/index.d.ts +5 -0
  143. package/lib/heatmap/index.js +22 -30
  144. package/lib/heatmap/themes/halo/dark/index.js +2 -2
  145. package/lib/heatmap/themes/halo/light/index.js +2 -2
  146. package/lib/heatmap/themes/solar/charcoal/index.js +2 -2
  147. package/lib/heatmap/themes/solar/pearl/index.js +2 -2
  148. package/lib/icon/index.d.ts +5 -0
  149. package/lib/icon/index.js +3 -3
  150. package/lib/icon/utils/IconLoader.d.ts +1 -1
  151. package/lib/icon/utils/IconLoader.js +1 -1
  152. package/lib/interactive-chart/helpers/types.d.ts +1 -1
  153. package/lib/interactive-chart/index.d.ts +5 -12
  154. package/lib/interactive-chart/index.js +20 -36
  155. package/lib/interactive-chart/themes/halo/dark/index.js +1 -1
  156. package/lib/interactive-chart/themes/halo/light/index.js +1 -1
  157. package/lib/interactive-chart/themes/solar/charcoal/index.js +1 -1
  158. package/lib/interactive-chart/themes/solar/pearl/index.js +1 -1
  159. package/lib/item/helpers/types.d.ts +1 -1
  160. package/lib/item/index.d.ts +24 -17
  161. package/lib/item/index.js +45 -48
  162. package/lib/item/themes/halo/dark/index.js +2 -2
  163. package/lib/item/themes/halo/light/index.js +2 -2
  164. package/lib/item/themes/solar/charcoal/index.js +2 -2
  165. package/lib/item/themes/solar/pearl/index.js +2 -2
  166. package/lib/label/index.d.ts +6 -1
  167. package/lib/label/index.js +6 -6
  168. package/lib/label/themes/halo/dark/index.js +1 -1
  169. package/lib/label/themes/halo/light/index.js +1 -1
  170. package/lib/label/themes/solar/charcoal/index.js +1 -1
  171. package/lib/label/themes/solar/pearl/index.js +1 -1
  172. package/lib/layout/index.d.ts +5 -0
  173. package/lib/layout/index.js +2 -2
  174. package/lib/led-gauge/index.d.ts +5 -0
  175. package/lib/led-gauge/index.js +2 -2
  176. package/lib/led-gauge/themes/halo/dark/index.js +1 -1
  177. package/lib/led-gauge/themes/halo/light/index.js +1 -1
  178. package/lib/led-gauge/themes/solar/charcoal/index.js +1 -1
  179. package/lib/led-gauge/themes/solar/pearl/index.js +1 -1
  180. package/lib/list/custom-elements.json +0 -13
  181. package/lib/list/custom-elements.md +9 -10
  182. package/lib/list/helpers/item-id.d.ts +8 -0
  183. package/lib/list/helpers/item-id.js +13 -0
  184. package/lib/list/helpers/{list-renderer.d.ts → renderer.d.ts} +4 -0
  185. package/lib/list/helpers/{list-renderer.js → renderer.js} +8 -0
  186. package/lib/list/helpers/types.d.ts +1 -1
  187. package/lib/list/index.d.ts +18 -12
  188. package/lib/list/index.js +30 -29
  189. package/lib/list/renderer.d.ts +1 -1
  190. package/lib/list/themes/halo/dark/index.js +2 -2
  191. package/lib/list/themes/halo/light/index.js +2 -2
  192. package/lib/list/themes/solar/charcoal/index.js +2 -2
  193. package/lib/list/themes/solar/pearl/index.js +2 -2
  194. package/lib/loader/index.d.ts +6 -0
  195. package/lib/loader/index.js +5 -1
  196. package/lib/multi-input/helpers/types.d.ts +1 -1
  197. package/lib/multi-input/index.d.ts +5 -0
  198. package/lib/multi-input/index.js +6 -7
  199. package/lib/multi-input/themes/halo/dark/index.js +2 -2
  200. package/lib/multi-input/themes/halo/light/index.js +2 -2
  201. package/lib/multi-input/themes/solar/charcoal/index.js +2 -2
  202. package/lib/multi-input/themes/solar/pearl/index.js +2 -2
  203. package/lib/notification/elements/notification-tray.d.ts +5 -0
  204. package/lib/notification/elements/notification-tray.js +4 -4
  205. package/lib/notification/elements/notification.d.ts +15 -0
  206. package/lib/notification/elements/notification.js +12 -3
  207. package/lib/notification/themes/halo/dark/index.js +1 -1
  208. package/lib/notification/themes/halo/light/index.js +1 -1
  209. package/lib/notification/themes/solar/charcoal/index.js +1 -1
  210. package/lib/notification/themes/solar/pearl/index.js +1 -1
  211. package/lib/number-field/index.d.ts +8 -3
  212. package/lib/number-field/index.js +14 -4
  213. package/lib/number-field/themes/halo/dark/index.js +1 -1
  214. package/lib/number-field/themes/halo/light/index.js +1 -1
  215. package/lib/number-field/themes/solar/charcoal/index.js +1 -1
  216. package/lib/number-field/themes/solar/pearl/index.js +1 -1
  217. package/lib/overlay/elements/overlay-backdrop.d.ts +5 -0
  218. package/lib/overlay/elements/overlay-backdrop.js +2 -2
  219. package/lib/overlay/elements/overlay-viewport.d.ts +5 -0
  220. package/lib/overlay/elements/overlay-viewport.js +1 -1
  221. package/lib/overlay/elements/overlay.d.ts +5 -0
  222. package/lib/overlay/elements/overlay.js +7 -5
  223. package/lib/overlay/managers/focus-manager.js +11 -6
  224. package/lib/overlay/managers/interaction-lock-manager.js +1 -1
  225. package/lib/overlay/managers/viewport-manager.js +4 -5
  226. package/lib/overlay/managers/zindex-manager.js +1 -1
  227. package/lib/overlay-menu/helpers/types.d.ts +7 -1
  228. package/lib/overlay-menu/helpers/types.js +7 -1
  229. package/lib/overlay-menu/index.d.ts +14 -4
  230. package/lib/overlay-menu/index.js +57 -29
  231. package/lib/overlay-menu/managers/menu-manager.js +2 -1
  232. package/lib/overlay-menu/themes/halo/dark/index.js +3 -3
  233. package/lib/overlay-menu/themes/halo/light/index.js +3 -3
  234. package/lib/overlay-menu/themes/solar/charcoal/index.js +3 -3
  235. package/lib/overlay-menu/themes/solar/pearl/index.js +3 -3
  236. package/lib/pagination/index.d.ts +79 -91
  237. package/lib/pagination/index.js +205 -239
  238. package/lib/pagination/themes/halo/dark/index.js +4 -5
  239. package/lib/pagination/themes/halo/light/index.js +4 -5
  240. package/lib/pagination/themes/solar/charcoal/index.js +4 -5
  241. package/lib/pagination/themes/solar/pearl/index.js +4 -5
  242. package/lib/panel/index.d.ts +5 -0
  243. package/lib/panel/index.js +2 -2
  244. package/lib/password-field/index.d.ts +7 -2
  245. package/lib/password-field/index.js +7 -4
  246. package/lib/password-field/themes/halo/dark/index.js +1 -1
  247. package/lib/password-field/themes/halo/light/index.js +1 -1
  248. package/lib/password-field/themes/solar/charcoal/index.js +1 -1
  249. package/lib/password-field/themes/solar/pearl/index.js +1 -1
  250. package/lib/pill/index.d.ts +21 -0
  251. package/lib/pill/index.js +36 -5
  252. package/lib/pill/themes/halo/dark/index.js +2 -2
  253. package/lib/pill/themes/halo/light/index.js +2 -2
  254. package/lib/pill/themes/solar/charcoal/index.js +2 -2
  255. package/lib/pill/themes/solar/pearl/index.js +2 -2
  256. package/lib/progress-bar/index.d.ts +5 -0
  257. package/lib/progress-bar/index.js +3 -3
  258. package/lib/radio-button/index.d.ts +5 -0
  259. package/lib/radio-button/index.js +3 -3
  260. package/lib/radio-button/radio-button-registry.d.ts +1 -1
  261. package/lib/radio-button/radio-button-registry.js +4 -2
  262. package/lib/radio-button/themes/halo/dark/index.js +1 -1
  263. package/lib/radio-button/themes/halo/light/index.js +1 -1
  264. package/lib/radio-button/themes/solar/charcoal/index.js +1 -1
  265. package/lib/radio-button/themes/solar/pearl/index.js +1 -1
  266. package/lib/rating/index.d.ts +5 -0
  267. package/lib/rating/index.js +4 -4
  268. package/lib/search-field/index.d.ts +7 -2
  269. package/lib/search-field/index.js +8 -4
  270. package/lib/search-field/themes/halo/dark/index.js +1 -1
  271. package/lib/search-field/themes/halo/light/index.js +1 -1
  272. package/lib/search-field/themes/solar/charcoal/index.js +1 -1
  273. package/lib/search-field/themes/solar/pearl/index.js +1 -1
  274. package/lib/select/index.d.ts +5 -0
  275. package/lib/select/index.js +11 -14
  276. package/lib/select/themes/halo/dark/index.js +3 -3
  277. package/lib/select/themes/halo/light/index.js +3 -3
  278. package/lib/select/themes/solar/charcoal/index.js +3 -3
  279. package/lib/select/themes/solar/pearl/index.js +3 -3
  280. package/lib/sidebar-layout/index.d.ts +5 -0
  281. package/lib/sidebar-layout/index.js +4 -4
  282. package/lib/sidebar-layout/themes/halo/dark/index.js +1 -1
  283. package/lib/sidebar-layout/themes/halo/light/index.js +1 -1
  284. package/lib/sidebar-layout/themes/solar/charcoal/index.js +1 -1
  285. package/lib/sidebar-layout/themes/solar/pearl/index.js +1 -1
  286. package/lib/slider/constants.d.ts +15 -0
  287. package/lib/slider/constants.js +18 -0
  288. package/lib/slider/index.d.ts +55 -80
  289. package/lib/slider/index.js +365 -460
  290. package/lib/slider/themes/halo/dark/index.js +1 -1
  291. package/lib/slider/themes/halo/light/index.js +1 -1
  292. package/lib/slider/themes/solar/charcoal/index.js +1 -1
  293. package/lib/slider/themes/solar/pearl/index.js +1 -1
  294. package/lib/slider/utils.d.ts +35 -0
  295. package/lib/slider/utils.js +54 -0
  296. package/lib/sparkline/index.d.ts +5 -0
  297. package/lib/sparkline/index.js +9 -10
  298. package/lib/swing-gauge/index.d.ts +5 -0
  299. package/lib/swing-gauge/index.js +14 -8
  300. package/lib/swing-gauge/themes/halo/dark/index.js +1 -1
  301. package/lib/swing-gauge/themes/halo/light/index.js +1 -1
  302. package/lib/swing-gauge/themes/solar/charcoal/index.js +1 -1
  303. package/lib/swing-gauge/themes/solar/pearl/index.js +1 -1
  304. package/lib/tab/index.d.ts +5 -0
  305. package/lib/tab/index.js +4 -4
  306. package/lib/tab/themes/halo/dark/index.js +2 -2
  307. package/lib/tab/themes/halo/light/index.js +2 -2
  308. package/lib/tab/themes/solar/charcoal/index.js +2 -2
  309. package/lib/tab/themes/solar/pearl/index.js +2 -2
  310. package/lib/tab-bar/index.d.ts +5 -0
  311. package/lib/tab-bar/index.js +6 -6
  312. package/lib/tab-bar/themes/halo/dark/index.js +2 -2
  313. package/lib/tab-bar/themes/halo/light/index.js +2 -2
  314. package/lib/tab-bar/themes/solar/charcoal/index.js +2 -2
  315. package/lib/tab-bar/themes/solar/pearl/index.js +2 -2
  316. package/lib/text-field/index.d.ts +19 -1
  317. package/lib/text-field/index.js +35 -11
  318. package/lib/text-field/themes/halo/dark/index.js +1 -1
  319. package/lib/text-field/themes/halo/light/index.js +1 -1
  320. package/lib/text-field/themes/solar/charcoal/index.js +1 -1
  321. package/lib/text-field/themes/solar/pearl/index.js +1 -1
  322. package/lib/time-picker/index.d.ts +6 -1
  323. package/lib/time-picker/index.js +11 -11
  324. package/lib/time-picker/themes/halo/dark/index.js +2 -2
  325. package/lib/time-picker/themes/halo/light/index.js +2 -2
  326. package/lib/time-picker/themes/solar/charcoal/index.js +2 -2
  327. package/lib/time-picker/themes/solar/pearl/index.js +2 -2
  328. package/lib/toggle/index.d.ts +5 -0
  329. package/lib/toggle/index.js +2 -2
  330. package/lib/tooltip/elements/tooltip-element.d.ts +1 -2
  331. package/lib/tooltip/index.d.ts +6 -0
  332. package/lib/tooltip/index.js +7 -8
  333. package/lib/tooltip/managers/tooltip-manager.js +2 -2
  334. package/lib/tooltip/themes/halo/dark/index.js +1 -1
  335. package/lib/tooltip/themes/halo/light/index.js +1 -1
  336. package/lib/tooltip/themes/solar/charcoal/index.js +1 -1
  337. package/lib/tooltip/themes/solar/pearl/index.js +1 -1
  338. package/lib/tornado-chart/elements/tornado-chart.d.ts +5 -0
  339. package/lib/tornado-chart/elements/tornado-chart.js +2 -2
  340. package/lib/tornado-chart/elements/tornado-item.d.ts +5 -0
  341. package/lib/tornado-chart/elements/tornado-item.js +3 -3
  342. package/lib/tornado-chart/themes/halo/dark/index.js +2 -2
  343. package/lib/tornado-chart/themes/halo/light/index.js +2 -2
  344. package/lib/tornado-chart/themes/solar/charcoal/index.js +2 -2
  345. package/lib/tornado-chart/themes/solar/pearl/index.js +2 -2
  346. package/lib/tree/elements/tree-item.d.ts +8 -3
  347. package/lib/tree/elements/tree-item.js +5 -6
  348. package/lib/tree/elements/tree.d.ts +7 -3
  349. package/lib/tree/elements/tree.js +6 -7
  350. package/lib/tree/helpers/renderer.d.ts +4 -0
  351. package/lib/tree/helpers/renderer.js +20 -13
  352. package/lib/tree/helpers/types.d.ts +1 -1
  353. package/lib/tree/managers/tree-manager.d.ts +1 -1
  354. package/lib/tree/themes/halo/dark/index.js +4 -4
  355. package/lib/tree/themes/halo/light/index.js +4 -4
  356. package/lib/tree/themes/solar/charcoal/index.js +4 -4
  357. package/lib/tree/themes/solar/pearl/index.js +4 -4
  358. package/lib/tree-select/index.d.ts +8 -7
  359. package/lib/tree-select/index.js +39 -38
  360. package/lib/tree-select/themes/halo/dark/index.js +9 -9
  361. package/lib/tree-select/themes/halo/light/index.js +9 -9
  362. package/lib/tree-select/themes/solar/charcoal/index.js +9 -9
  363. package/lib/tree-select/themes/solar/pearl/index.js +9 -9
  364. package/lib/version.js +1 -1
  365. package/package.json +35 -295
@@ -0,0 +1,322 @@
1
+ import { JSXInterface } from '../jsx';
2
+ import { PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
+ import { TemplateMap } from '@refinitiv-ui/core/directives/template-map.js';
4
+ import { Locale } from '@refinitiv-ui/utils/date.js';
5
+ import { TranslateDirective } from '@refinitiv-ui/translate';
6
+ import { NavigationKeys, DateTimeFormatPart } from './types';
7
+ import { TextField } from '../text-field/index.js';
8
+ import '@refinitiv-ui/phrasebook/locale/en/datetime-field.js';
9
+ /**
10
+ * A form control element for datetime input.
11
+ *
12
+ * @fires value-changed - Dispatched when value changes
13
+ * @fires error-changed - Dispatched when error state changes
14
+ * @fires icon-click - Dispatched when icon is clicked
15
+ *
16
+ * @attr {boolean} disabled - Set disabled state
17
+ * @prop {boolean} [disabled=false] - Set disabled state
18
+ *
19
+ * @attr {boolean} error - Set error state
20
+ * @prop {boolean} [error=false] - Set error state
21
+ *
22
+ * @attr {string} icon - Specify icon to display in input. Value can be icon name
23
+ * @prop {string | null} [icon=null] - Specify icon to display in input. Value can be icon name
24
+ *
25
+ * @attr {boolean} icon-has-action - Specify when icon need to be clickable
26
+ * @prop {boolean} [iconHasAction=false] - Specify when icon need to be clickable
27
+ *
28
+ * @attr {number} maxlength - Set character max limit
29
+ * @prop {number | null} [maxLength=null] - Set character max limit
30
+ *
31
+ * @attr {number} minlength - Set character min limit
32
+ * @prop {number | null} [minLength=null] - Set character min limit
33
+ *
34
+ * @prop {string} [pattern=""] - Set regular expression for input validation
35
+ *
36
+ * @attr {string} placeholder - Set placeholder text
37
+ * @prop {string} [placeholder=""] - Set placeholder text
38
+ *
39
+ * @attr {boolean} readonly - Set readonly state
40
+ * @prop {boolean} [readonly=false] - Set readonly state
41
+ *
42
+ * @attr {boolean} transparent - Disables all other states and border/background styles.
43
+ * @prop {boolean} [transparent=false] - Disables all other states and border/background styles.
44
+ *
45
+ * @attr {boolean} warning - Set warning state
46
+ * @prop {boolean} [warning=false] - Set warning state
47
+ */
48
+ export declare class DatetimeField extends TextField {
49
+ /**
50
+ * Element version number
51
+ * @returns version number
52
+ */
53
+ static get version(): string;
54
+ /**
55
+ * Delay selecting a part to ensure
56
+ * that scroll can be updated
57
+ */
58
+ private selectPartFrame;
59
+ /**
60
+ * Set minimum date.
61
+ * This value must follow the `format` and be less
62
+ * than or equal to the value of the `max` attribute
63
+ */
64
+ min: string | null;
65
+ /**
66
+ * Set maximum date.
67
+ * This value must follow the `format` and be greater
68
+ * than or equal to the value of the `min` attribute
69
+ */
70
+ max: string | null;
71
+ private _timepicker;
72
+ /**
73
+ * Toggle to display the time picker
74
+ * @param timepicker true to set timepicker mode
75
+ * @default false
76
+ */
77
+ set timepicker(timepicker: boolean);
78
+ get timepicker(): boolean;
79
+ private _showSeconds;
80
+ /**
81
+ * Toggle to display the seconds
82
+ * @param showSeconds true to show seconds
83
+ * @default false
84
+ */
85
+ set showSeconds(showSeconds: boolean);
86
+ get showSeconds(): boolean;
87
+ private _amPm;
88
+ /**
89
+ * Overrides 12hr time display format
90
+ * @param amPm true to show 12hr time format
91
+ * @default false
92
+ */
93
+ set amPm(amPm: boolean);
94
+ get amPm(): boolean;
95
+ private _formatOptions;
96
+ /**
97
+ * Set the datetime format options based on
98
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat
99
+ * `formatOptions` overrides `timepicker` and `showSeconds` properties.
100
+ * Note: time-zone is not supported
101
+ * @param formatOptions Format options
102
+ * @default - null
103
+ */
104
+ set formatOptions(formatOptions: Intl.DateTimeFormatOptions | null);
105
+ get formatOptions(): Intl.DateTimeFormatOptions | null;
106
+ /**
107
+ * Used for translations
108
+ */
109
+ protected t: TranslateDirective;
110
+ /**
111
+ * Format, which is based on locale
112
+ */
113
+ private _locale;
114
+ protected get locale(): Locale;
115
+ private interimValueState;
116
+ /**
117
+ * Current date time value
118
+ * @param value Calendar value
119
+ * @default -
120
+ */
121
+ set value(value: string);
122
+ get value(): string;
123
+ /**
124
+ * Returns the value of the element, interpreted as double number
125
+ */
126
+ get valueAsNumber(): number;
127
+ /**
128
+ * Set the value of the element, interpreted as double number
129
+ * @param value number value
130
+ */
131
+ set valueAsNumber(value: number);
132
+ /**
133
+ * Returns the value of the element, interpreted as Date
134
+ */
135
+ get valueAsDate(): null | Date;
136
+ /**
137
+ * Set the value of the element, interpreted as Date
138
+ * @param value date value
139
+ */
140
+ set valueAsDate(value: null | Date);
141
+ /**
142
+ * Currently selected part
143
+ */
144
+ protected partLabel: string;
145
+ /**
146
+ * Transform Date object to date string
147
+ * @param value Date
148
+ * @returns dateSting
149
+ */
150
+ protected dateToString(value: Date): string;
151
+ /**
152
+ * Returns true if the datetime field has timepicker
153
+ * @returns hasTimePicker
154
+ */
155
+ protected get hasTimePicker(): boolean;
156
+ /**
157
+ * Returns true if the datetime field has seconds
158
+ * @returns hasSeconds
159
+ */
160
+ protected get hasSeconds(): boolean;
161
+ /**
162
+ * Returns true if the datetime field has am-pm
163
+ * @returns hasAmPm
164
+ */
165
+ protected get hasAmPm(): boolean;
166
+ /**
167
+ * Get today's date noon as the start date when the value is not set
168
+ */
169
+ protected get startDate(): string;
170
+ /**
171
+ * Updates the element
172
+ * @param changedProperties Properties that has changed
173
+ * @returns {void}
174
+ */
175
+ willUpdate(changedProperties: PropertyValues): void;
176
+ /**
177
+ * Check if input value should be synchronised with component value
178
+ * @param changedProperties Properties that has changed
179
+ * @returns True if input should be synchronised
180
+ */
181
+ protected shouldSyncInputValue(changedProperties: PropertyValues): boolean;
182
+ /**
183
+ * Synchronise input value with value.
184
+ * Override the method if value and input value are not the same
185
+ * @param changedProperties Properties that has changed
186
+ * @returns {void}
187
+ */
188
+ protected syncInputValue(changedProperties: PropertyValues): void;
189
+ protected syncInputValue(): void;
190
+ /**
191
+ * Check if input should be re-validated
192
+ * @param changedProperties Properties that has changed
193
+ * @returns True if input should be re-validated
194
+ */
195
+ protected shouldValidateInput(changedProperties: PropertyValues): boolean;
196
+ /**
197
+ * Validate input according `pattern`, `minLength` and `maxLength` properties
198
+ * change state of `error` property according pattern validation
199
+ * @returns {void}
200
+ */
201
+ protected validateInput(): void;
202
+ /**
203
+ * Override validation method for value
204
+ * @param value value
205
+ * @returns value validity
206
+ */
207
+ protected isValidValue(value: string): boolean;
208
+ /**
209
+ * Used to show a warning when the value does not pass the validation
210
+ * @param value that is invalid
211
+ * @returns {void}
212
+ */
213
+ protected warnInvalidValue(value: string): void;
214
+ /**
215
+ * Resolve locale based on element parameters
216
+ * @returns locale Resolved locale
217
+ */
218
+ protected resolveLocale(): Locale;
219
+ /**
220
+ * Get Intl.DateTimeFormat object from locale
221
+ */
222
+ protected get formatter(): Intl.DateTimeFormat;
223
+ /**
224
+ * Try to format ISO date/time/datetime string into datetime format parts
225
+ * Throw an error if value is invalid
226
+ * @param value ISO string date/time/datetime
227
+ * @returns parts
228
+ */
229
+ protected formatToParts(value: string): DateTimeFormatPart[];
230
+ /**
231
+ * Format value to inputValue
232
+ * @param value Date string
233
+ * @returns inputValue
234
+ */
235
+ protected toInputValue(value: string): string;
236
+ /**
237
+ * Format inputValue to value
238
+ * @param inputValue Date string
239
+ * @returns value
240
+ */
241
+ protected toValue(inputValue: string): string;
242
+ /**
243
+ * On *user-interaction* set the value and notify.
244
+ * @param value New value
245
+ * @returns {void}
246
+ */
247
+ protected setValueAndNotify(value: string): void;
248
+ /**
249
+ * Reset error state on input
250
+ * @returns {void}
251
+ */
252
+ protected resetError(): void;
253
+ /**
254
+ * Returns true if an input element contains valid data.
255
+ * @returns true if input is valid
256
+ */
257
+ checkValidity(): boolean;
258
+ /**
259
+ * Validate input. Mark as error if input is invalid
260
+ * @returns false if there is an error
261
+ */
262
+ reportValidity(): boolean;
263
+ /**
264
+ * Select part
265
+ * @param index Part index
266
+ * @param parts The list of parts
267
+ * @returns {void}
268
+ */
269
+ protected selectPart(index: number | undefined, parts: DateTimeFormatPart[]): void;
270
+ /**
271
+ * Change value or selection based on keyboard navigation
272
+ * @param key Navigation key
273
+ * @param event Keyboard event
274
+ * @returns {void}
275
+ */
276
+ protected onNavigation(key: NavigationKeys, event: KeyboardEvent): void;
277
+ /**
278
+ * Check if value is changed and fire event
279
+ * @returns {void}
280
+ */
281
+ protected onPossibleValueChange(event: InputEvent): void;
282
+ /**
283
+ * Handles key down input event
284
+ * @param event Key down event object
285
+ * @returns {void}
286
+ */
287
+ protected onInputKeyDown(event: KeyboardEvent): void;
288
+ /**
289
+ * Decorate `<input>` element with common properties.
290
+ * @returns template map
291
+ */
292
+ protected get decorateInputMap(): TemplateMap;
293
+ /**
294
+ * Used to announce part and value statuses
295
+ */
296
+ protected get screenReaderTemplate(): TemplateResult | null;
297
+ /**
298
+ * A `TemplateResult` that will be used
299
+ * to render the updated internal template.
300
+ * @return Render template
301
+ */
302
+ protected render(): TemplateResult;
303
+ }
304
+ declare global {
305
+ interface HTMLElementTagNameMap {
306
+ 'ef-datetime-field': DatetimeField;
307
+ }
308
+ }
309
+
310
+ declare global {
311
+ interface HTMLElementTagNameMap {
312
+ 'ef-datetime-field': DatetimeField;
313
+ }
314
+
315
+ namespace JSX {
316
+ interface IntrinsicElements {
317
+ 'ef-datetime-field': Partial<DatetimeField> | JSXInterface.HTMLAttributes<DatetimeField>;
318
+ }
319
+ }
320
+ }
321
+
322
+ export {};