@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
@@ -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 { ControlElement, html, css, query, ifDefined, property, customElement, FocusedPropertyKey } from '@refinitiv-ui/core';
8
- import { VERSION } from '../';
9
- import '../icon';
1
+ import { __decorate } from "tslib";
2
+ import { FormFieldElement, html, css, FocusedPropertyKey } 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 '../icon/index.js';
10
8
  const NUMBER_PATTERN = '^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$';
11
9
  const DEFAULT_STEP_BASE = 1;
12
10
  const ANY_STEP = 'any';
@@ -16,27 +14,35 @@ var Direction;
16
14
  Direction[Direction["Down"] = -1] = "Down";
17
15
  })(Direction || (Direction = {}));
18
16
  /**
19
- * Form control element for numbers
17
+ * Form control element for numbers.
20
18
  *
21
19
  * @fires value-changed - Dispatched when value changes
22
20
  * @fires error-changed - Dispatched when error state changes
23
21
  *
24
- * @attr {string} value - Input's default value
25
- * @prop {string} [value=] - Input's value
22
+ * @attr {boolean} disabled - Set disabled state
23
+ * @prop {boolean} [disabled=false] - Set disabled state
24
+ *
25
+ * @attr {boolean} error - Set error state
26
+ * @prop {boolean} [error=false] - Set error state
27
+ *
28
+ * @attr {string} placeholder - Set placeholder text
29
+ * @prop {string} [placeholder=""] - Set placeholder text
26
30
  *
27
31
  * @attr {boolean} readonly - Set readonly state
28
32
  * @prop {boolean} [readonly=false] - Set readonly state
29
33
  *
30
- * @attr {boolean} disabled - Set disabled state
31
- * @prop {boolean} [disabled=false] - Set disabled state
34
+ * @attr {boolean} transparent - Disables all other states and border/background styles.
35
+ * @prop {boolean} [transparent=false] - Disables all other states and border/background styles.
36
+ *
37
+ * @attr {boolean} warning - Set warning state
38
+ * @prop {boolean} [warning=false] - Set warning state
39
+ *
40
+ * @attr {string} value - Input's value
41
+ * @prop {string} [value=""] - Input's value
32
42
  */
33
- let NumberField = class NumberField extends ControlElement {
43
+ let NumberField = class NumberField extends FormFieldElement {
34
44
  constructor() {
35
45
  super(...arguments);
36
- /**
37
- * Set placeholder text
38
- */
39
- this.placeholder = null;
40
46
  /**
41
47
  * Set spinner's visibility
42
48
  */
@@ -55,18 +61,6 @@ let NumberField = class NumberField extends ControlElement {
55
61
  * This value must be greater than or equal to the value of the `min` attribute
56
62
  */
57
63
  this.max = null;
58
- /**
59
- * Set state to transparent
60
- */
61
- this.transparent = false;
62
- /**
63
- * Set state to error
64
- */
65
- this.error = false;
66
- /**
67
- * Set state to warning
68
- */
69
- this.warning = false;
70
64
  this.interimValueState = false; // make sure that internal input field value is updated only on external value change
71
65
  }
72
66
  /**
@@ -77,10 +71,10 @@ let NumberField = class NumberField extends ControlElement {
77
71
  return VERSION;
78
72
  }
79
73
  /**
80
- * A `CSSResult` that will be used
74
+ * A `CSSResultGroup` that will be used
81
75
  * to style the host, slotted children
82
76
  * and the internal template of the element.
83
- * @return {CSSResult | CSSResult[]} CSS template
77
+ * @return CSS template
84
78
  */
85
79
  static get styles() {
86
80
  return css `
@@ -120,6 +114,7 @@ let NumberField = class NumberField extends ControlElement {
120
114
  /**
121
115
  * The value of the number entered into the input.
122
116
  * @param value number-field value
117
+ * @default -
123
118
  */
124
119
  set value(value) {
125
120
  this.interimValueState = true;
@@ -232,28 +227,14 @@ let NumberField = class NumberField extends ControlElement {
232
227
  */
233
228
  get internalValue() {
234
229
  // cover the case when value getter is called before first render or in interim state
235
- return this.interimValueState || !this.inputEl ? super.value : this.inputValue;
236
- }
237
- /**
238
- * Get native input value
239
- * @returns string of input value
240
- */
241
- get inputValue() {
242
- return this.inputEl.value;
243
- }
244
- /**
245
- * Set native input value
246
- * @param value input's value
247
- */
248
- set inputValue(value) {
249
- this.inputEl.value = value;
230
+ return this.interimValueState || !this.inputElement ? super.value : this.inputValue;
250
231
  }
251
232
  /**
252
233
  * Handles key down input event
253
234
  * @param event Key down event object
254
235
  * @returns {void}
255
236
  */
256
- onNativeInputKeyDown(event) {
237
+ onInputKeyDown(event) {
257
238
  if (this.readonly || this.disabled || event.defaultPrevented) {
258
239
  return;
259
240
  }
@@ -310,7 +291,7 @@ let NumberField = class NumberField extends ControlElement {
310
291
  * @returns {void}
311
292
  */
312
293
  /* istanbul ignore next */
313
- onNativeBeforeInputChange(event) {
294
+ onBeforeInputChange(event) {
314
295
  // The event is not supported in IE11 and old browsers
315
296
  // Therefore just try to prevent some of invalid characters to be entered
316
297
  // but still do full validation on actual `input` and `change` events
@@ -318,7 +299,8 @@ let NumberField = class NumberField extends ControlElement {
318
299
  // cover all insert types, such as type, paste, drag&drop and others
319
300
  if (inputType.startsWith('insert')) {
320
301
  const data = event.data || '';
321
- const inputEl = this.inputEl;
302
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
303
+ const inputEl = this.inputElement;
322
304
  const oldInput = this.inputValue;
323
305
  // Calculate what could be the new input
324
306
  const selectionStart = inputEl.selectionStart || 0;
@@ -338,6 +320,22 @@ let NumberField = class NumberField extends ControlElement {
338
320
  }
339
321
  }
340
322
  }
323
+ /**
324
+ * Runs on input element `input` event
325
+ * @param event `input` event
326
+ * @returns {void}
327
+ */
328
+ onInputInput(event) {
329
+ this.onNativeInputChange(event);
330
+ }
331
+ /**
332
+ * Runs on input element `change` event
333
+ * @param event `change` event
334
+ * @returns {void}
335
+ */
336
+ onInputChange(event) {
337
+ this.onNativeInputChange(event);
338
+ }
341
339
  /**
342
340
  * Triggers when native input value change with input event or change event
343
341
  * @param event Input event
@@ -347,7 +345,8 @@ let NumberField = class NumberField extends ControlElement {
347
345
  const currentInput = this.inputValue;
348
346
  const inputValue = this.stripeInvalidCharacters(currentInput, this.value, event.data || '');
349
347
  if (inputValue !== currentInput) {
350
- const inputEl = this.inputEl;
348
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
349
+ const inputEl = this.inputElement;
351
350
  // we can only stripe the characters, so try to make the best guess where the cursor should be
352
351
  const selectionStart = inputEl.selectionStart || 0;
353
352
  const selectionEnd = inputEl.selectionEnd || 0;
@@ -607,13 +606,60 @@ let NumberField = class NumberField extends ControlElement {
607
606
  return !hasError;
608
607
  }
609
608
  /**
610
- * Select the contents of input
611
- * @returns void
609
+ * @ignore
610
+ * @inheritDoc
612
611
  */
613
- select() {
614
- if (!this.disabled) {
615
- this.inputEl && this.inputEl.select();
616
- }
612
+ /* istanbul ignore next */
613
+ get selectionStart() {
614
+ return null;
615
+ }
616
+ /**
617
+ * @ignore
618
+ * @inheritDoc
619
+ */
620
+ /* istanbul ignore next */
621
+ set selectionStart(index) {
622
+ throw new Error('Failed to set the \'selectionStart\' property on \'NumberField\': The element does not support selection.');
623
+ }
624
+ /**
625
+ * @ignore
626
+ * @inheritDoc
627
+ */
628
+ /* istanbul ignore next */
629
+ get selectionEnd() {
630
+ return null;
631
+ }
632
+ /**
633
+ * @ignore
634
+ * @inheritDoc
635
+ */
636
+ /* istanbul ignore next */
637
+ set selectionEnd(index) {
638
+ throw new Error('Failed to set the \'selectionEnd\' property on \'NumberField\': The element does not support selection.');
639
+ }
640
+ /**
641
+ * @ignore
642
+ * @inheritDoc
643
+ */
644
+ /* istanbul ignore next */
645
+ get selectionDirection() {
646
+ return null;
647
+ }
648
+ /**
649
+ * @ignore
650
+ * @inheritDoc
651
+ */
652
+ /* istanbul ignore next */
653
+ set selectionDirection(direction) {
654
+ throw new Error('Failed to set the \'selectionDirection\' property on \'NumberField\': The element does not support selection.');
655
+ }
656
+ /**
657
+ * @ignore
658
+ * @inheritDoc
659
+ */
660
+ /* istanbul ignore next */
661
+ setSelectionRange(startSelection, endSelection, selectionDirection) {
662
+ throw new Error('Failed to execute \'setSelectionRange\' on \'NumberField\': The element does not support selection.');
617
663
  }
618
664
  /**
619
665
  * Renders spinner
@@ -639,6 +685,21 @@ let NumberField = class NumberField extends ControlElement {
639
685
  </div>
640
686
  `;
641
687
  }
688
+ /**
689
+ * Decorate `<input>` element with common properties extended from form field element:
690
+ * type="text" - always `text`
691
+ * part="input" - always "input", used for styling
692
+ * inputmode="decimal" - show decimals keyboard by default
693
+ * pattern="'^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$'" - numbers only
694
+ * role="spinbutton" - number field is actually a spinner
695
+ * aria-valuenow - current value or 0
696
+ * @keydown - Listener for `keydown` event. Runs `this.onInputKeyDown`
697
+ * @beforeinput - Listener for `beforeinput` event. Runs `this.onBeforeInputChange`
698
+ * @returns template map
699
+ */
700
+ get decorateInputMap() {
701
+ return Object.assign(Object.assign({}, super.decorateInputMap), { 'type': 'text', 'part': 'input', 'inputmode': 'decimal', 'pattern': NUMBER_PATTERN, 'role': 'spinbutton', 'aria-valuenow': `${this.value || 0}`, '@keydown': this.onInputKeyDown, '@beforeinput': this.onBeforeInputChange });
702
+ }
642
703
  /**
643
704
  * A `TemplateResult` that will be used
644
705
  * to render the updated internal template.
@@ -646,27 +707,10 @@ let NumberField = class NumberField extends ControlElement {
646
707
  */
647
708
  render() {
648
709
  return html `
649
- <input
650
- part="input"
651
- type="text"
652
- inputmode="decimal"
653
- pattern="${NUMBER_PATTERN}"
654
- ?readonly=${this.readonly}
655
- ?disabled=${this.disabled}
656
- placeholder=${ifDefined(this.placeholder ? this.placeholder : undefined)}
657
- @input="${this.onNativeInputChange}"
658
- @keydown="${this.onNativeInputKeyDown}"
659
- @beforeinput="${this.onNativeBeforeInputChange}"
660
- @change="${this.onNativeInputChange}"
661
- autocomplete="off"
662
- >
663
- ${this.noSpinner ? null : this.renderSpinner()}
664
- `;
710
+ ${super.render()}
711
+ ${this.noSpinner ? null : this.renderSpinner()}`;
665
712
  }
666
713
  };
667
- __decorate([
668
- property({ type: String, reflect: true })
669
- ], NumberField.prototype, "placeholder", void 0);
670
714
  __decorate([
671
715
  property({ type: Boolean, attribute: 'no-spinner', reflect: true })
672
716
  ], NumberField.prototype, "noSpinner", void 0);
@@ -679,21 +723,9 @@ __decorate([
679
723
  __decorate([
680
724
  property({ type: String, reflect: true })
681
725
  ], NumberField.prototype, "max", void 0);
682
- __decorate([
683
- property({ type: Boolean, reflect: true })
684
- ], NumberField.prototype, "transparent", void 0);
685
- __decorate([
686
- property({ type: Boolean, reflect: true })
687
- ], NumberField.prototype, "error", void 0);
688
- __decorate([
689
- property({ type: Boolean, reflect: true })
690
- ], NumberField.prototype, "warning", void 0);
691
726
  __decorate([
692
727
  property({ type: String })
693
728
  ], NumberField.prototype, "value", null);
694
- __decorate([
695
- query('[part=input]')
696
- ], NumberField.prototype, "inputEl", void 0);
697
729
  __decorate([
698
730
  query('[part=spinner-up]')
699
731
  ], NumberField.prototype, "spinnerUpEl", void 0);
@@ -31,23 +31,28 @@
31
31
  },
32
32
  {
33
33
  "name": "transition-style",
34
- "description": "Set the transition style"
34
+ "description": "Set the transition style",
35
+ "type": "TransitionStyle|null|undefined"
35
36
  },
36
37
  {
37
38
  "name": "z-index",
38
- "description": "Set a preferable z-index to override automatically calculated z-index"
39
+ "description": "Set a preferable z-index to override automatically calculated z-index",
40
+ "type": "number|null|undefined"
39
41
  },
40
42
  {
41
43
  "name": "x",
42
- "description": "Set a specific x coordinate"
44
+ "description": "Set a specific x coordinate",
45
+ "type": "number|null|undefined"
43
46
  },
44
47
  {
45
48
  "name": "y",
46
- "description": "Set a specific y coordinate"
49
+ "description": "Set a specific y coordinate",
50
+ "type": "number|null|undefined"
47
51
  },
48
52
  {
49
53
  "name": "position-target",
50
- "description": "Set the position target as follows:\n- HTMLElement if overlay is position next to the HTML element\n- String containing `top`, `right`, `left`, `bottom`, `center` combinations to position against the screen.\nFor instance: `top left` - put the overlay at `top left` point of the screen; `bottom` - put overlay at `bottom center` point of the screen"
54
+ "description": "Set the position target as follows:\n- HTMLElement if overlay is position next to the HTML element\n- String containing `top`, `right`, `left`, `bottom`, `center` combinations to position against the screen.\nFor instance: `top left` - put the overlay at `top left` point of the screen; `bottom` - put overlay at `bottom center` point of the screen",
55
+ "type": "PositionTarget|null|undefined"
51
56
  },
52
57
  {
53
58
  "name": "horizontal-offset",
@@ -159,27 +164,32 @@
159
164
  {
160
165
  "name": "transitionStyle",
161
166
  "attribute": "transition-style",
162
- "description": "Set the transition style"
167
+ "description": "Set the transition style",
168
+ "type": "TransitionStyle|null|undefined"
163
169
  },
164
170
  {
165
171
  "name": "zIndex",
166
172
  "attribute": "z-index",
167
- "description": "Set a preferable z-index to override automatically calculated z-index"
173
+ "description": "Set a preferable z-index to override automatically calculated z-index",
174
+ "type": "number|null|undefined"
168
175
  },
169
176
  {
170
177
  "name": "x",
171
178
  "attribute": "x",
172
- "description": "Set a specific x coordinate"
179
+ "description": "Set a specific x coordinate",
180
+ "type": "number|null|undefined"
173
181
  },
174
182
  {
175
183
  "name": "y",
176
184
  "attribute": "y",
177
- "description": "Set a specific y coordinate"
185
+ "description": "Set a specific y coordinate",
186
+ "type": "number|null|undefined"
178
187
  },
179
188
  {
180
189
  "name": "positionTarget",
181
190
  "attribute": "position-target",
182
- "description": "Set the position target as follows:\n- HTMLElement if overlay is position next to the HTML element\n- String containing `top`, `right`, `left`, `bottom`, `center` combinations to position against the screen.\nFor instance: `top left` - put the overlay at `top left` point of the screen; `bottom` - put overlay at `bottom center` point of the screen"
191
+ "description": "Set the position target as follows:\n- HTMLElement if overlay is position next to the HTML element\n- String containing `top`, `right`, `left`, `bottom`, `center` combinations to position against the screen.\nFor instance: `top left` - put the overlay at `top left` point of the screen; `bottom` - put overlay at `bottom center` point of the screen",
192
+ "type": "PositionTarget|null|undefined"
183
193
  },
184
194
  {
185
195
  "name": "horizontalOffset",
@@ -278,7 +288,7 @@
278
288
  "type": "{} | undefined"
279
289
  },
280
290
  {
281
- "name": "positionTargetConfig",
291
+ "name": "positionTargetConfig (readonly)",
282
292
  "description": "Get position target configuration based on positionTarget and fullScreen properties\nUsed for caching and calculations"
283
293
  },
284
294
  {
@@ -287,12 +297,12 @@
287
297
  "default": "\"this\""
288
298
  },
289
299
  {
290
- "name": "fullyOpened",
300
+ "name": "fullyOpened (readonly)",
291
301
  "description": "Returns true if the overlay is opened and animation is not running.\nReturns false if overlay is closed and animation is not running",
292
302
  "type": "boolean"
293
303
  },
294
304
  {
295
- "name": "transitioning",
305
+ "name": "transitioning (readonly)",
296
306
  "description": "Returns true if overlay is doing opening or closing transition",
297
307
  "type": "boolean"
298
308
  }
@@ -313,6 +323,9 @@
313
323
  {
314
324
  "name": "opened-changed",
315
325
  "description": "Dispatched when when open attribute changes internally. Prevent default to stop opening/closing pipeline"
326
+ },
327
+ {
328
+ "name": "animationiteration"
316
329
  }
317
330
  ],
318
331
  "methods": [
@@ -0,0 +1,54 @@
1
+ # ef-overlay
2
+
3
+ Element to help building modals, dialogs and other overlay content
4
+
5
+ ## Properties
6
+
7
+ | Property | Attribute | Type | Default | Description |
8
+ |-----------------------------------|------------------------------|------------------------------------|---------|--------------------------------------------------|
9
+ | `focusBoundary` | | | "this" | Set focus boundary to restrict tabbing. Default's overlay itself.<br />If external focus is required, set to null |
10
+ | `fullScreen` | `full-screen` | `boolean` | false | Set to true to show overlay in full screen mode |
11
+ | `fullyOpened (readonly)` | | `boolean` | | Returns true if the overlay is opened and animation is not running.<br />Returns false if overlay is closed and animation is not running |
12
+ | `horizontalOffset` | `horizontal-offset` | `number` | 0 | A pixel value that will be added to the position calculated on the horizontal axis.<br />The offset will be applied either to the `left` or `right` depending on the `positionTarget` |
13
+ | `interactiveElements` | | `object` | [] | A list of elements, which are active when overlay is opened<br />Valid only if noInteractionLock is false (default) |
14
+ | `lockPositionTarget` | `lock-position-target` | `boolean` | false | True to lock position target<br />Valid only if noInteractionLock is false (default) |
15
+ | `noAutofocus` | `no-autofocus` | `boolean` | false | Set to true to disable autofocusing the overlay or open |
16
+ | `noCancelOnEscKey` | `no-cancel-on-esc-key` | `boolean` | false | Set to true to disable canceling the overlay with the ESC key |
17
+ | `noCancelOnOutsideClick` | `no-cancel-on-outside-click` | `boolean` | false | Set to true to disable canceling the overlay by clicking outside it |
18
+ | `noFocusManagement` | `no-focus-management` | `boolean` | false | True to not apply focus management.<br />The overlay will not limit Tab behaviour or do auto-focusing |
19
+ | `noInteractionLock` | `no-interaction-lock` | `boolean` | false | Stop preventing user interaction when overlay is visible |
20
+ | `noOverlap` | `no-overlap` | `boolean` | false | True to not overlap positionTarget |
21
+ | `offset` | `offset` | `number` | 0 | A pixel value that will be added to the position calculated on the vertical or horizontal axis.<br />The offset is applied dynamically depending on the `positionTarget` |
22
+ | `opened` | `opened` | `boolean` | false | True if the overlay is currently displayed |
23
+ | `position` | `position` | `{} \| undefined` | | Set position and align against the attach target.<br />Position may contain a single word or a comma separated list to set the priority.<br />Position is not applied if `attachTarget` is not HTML Element.<br />For instance: `[bottom-middle, top-middle]` - default position is bottom-middle, if cannot fit position top-middle;<br />or `[left, right]` - align is not set, set best position on the left or right<br /><br />Position can be: `top`, `right`, `bottom`, `left`, `center`<br />Align can be: `start`, `middle`, `end` |
24
+ | `positionTarget` | `position-target` | `PositionTarget\|null\|undefined` | | Set the position target as follows:<br />- HTMLElement if overlay is position next to the HTML element<br />- String containing `top`, `right`, `left`, `bottom`, `center` combinations to position against the screen.<br />For instance: `top left` - put the overlay at `top left` point of the screen; `bottom` - put overlay at `bottom center` point of the screen |
25
+ | `positionTargetConfig (readonly)` | | | | Get position target configuration based on positionTarget and fullScreen properties<br />Used for caching and calculations |
26
+ | `spacing` | `spacing` | `boolean` | false | True to apply spacing for overlay content |
27
+ | `transitionStyle` | `transition-style` | `TransitionStyle\|null\|undefined` | | Set the transition style |
28
+ | `transitioning (readonly)` | | `boolean` | | Returns true if overlay is doing opening or closing transition |
29
+ | `transparent` | `transparent` | `boolean` | false | True to make overlay background transparent |
30
+ | `verticalOffset` | `vertical-offset` | `number` | 0 | A pixel value that will be added to the position calculated on the vertical axis.<br />The offset will be applied either to the `top` or `bottom` depending on the `positionTarget` |
31
+ | `withBackdrop` | `with-backdrop` | `boolean` | false | True to show backdrop |
32
+ | `withShadow` | `with-shadow` | `boolean` | false | True to add shadow |
33
+ | `x` | `x` | `number\|null\|undefined` | | Set a specific x coordinate |
34
+ | `y` | `y` | `number\|null\|undefined` | | Set a specific y coordinate |
35
+ | `zIndex` | `z-index` | `number\|null\|undefined` | | Set a preferable z-index to override automatically calculated z-index |
36
+
37
+ ## Methods
38
+
39
+ | Method | Type | Description |
40
+ |---------------|------------|--------------------------------------------------|
41
+ | `clearCached` | `(): void` | Clear all cached values.<br />Run when external changes occur to styles to re-calculate position. |
42
+ | `fit` | `(): void` | Fit the overlay panel |
43
+ | `refit` | `(): void` | Clear all cached values and fit the overlay.<br />Use this function if any of `maxWidth`, `maxHeight`, `minWidth`, `minHeight`, `height` or `width` changed |
44
+ | `toFront` | `(): void` | Move overlay to front of other overlays |
45
+
46
+ ## Events
47
+
48
+ | Event | Description |
49
+ |----------------------|--------------------------------------------------|
50
+ | `animationiteration` | |
51
+ | `closed` | Dispatched when overlay becomes invisible and close animation finishes |
52
+ | `opened` | Dispatched when the overlay becomes visible and the open animation finishes |
53
+ | `opened-changed` | Dispatched when when open attribute changes internally. Prevent default to stop opening/closing pipeline |
54
+ | `refit` | Dispatched when refit algorithm finishes calculations |
@@ -1,6 +1,6 @@
1
1
  import { JSXInterface } from '../../jsx';
2
- import { BasicElement, CSSResult, TemplateResult } from '@refinitiv-ui/core';
3
- import { NullOrUndefined } from '../helpers/types';
2
+ import { BasicElement, CSSResultGroup, TemplateResult } from '@refinitiv-ui/core';
3
+ import type { NullOrUndefined } from '../helpers/types';
4
4
  /**
5
5
  * A private element to show backdrop for overlay
6
6
  */
@@ -12,12 +12,12 @@ export declare class OverlayBackdrop extends BasicElement {
12
12
  static get version(): string;
13
13
  private static Template;
14
14
  /**
15
- * A `CSSResult` that will be used
15
+ * A `CSSResultGroup` that will be used
16
16
  * to style the host, slotted children
17
17
  * and the internal template of the element.
18
18
  * @return CSS template
19
19
  */
20
- static get styles(): CSSResult;
20
+ static get styles(): CSSResultGroup;
21
21
  /**
22
22
  * Set a specific z-index to override automatically calculated z-index
23
23
  * @param zIndex zIndex value
@@ -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
1
  var OverlayBackdrop_1;
8
- import { BasicElement, css, customElement, property, html } from '@refinitiv-ui/core';
9
- import { VERSION } from '../../';
2
+ import { __decorate } from "tslib";
3
+ import { BasicElement, css, html } from '@refinitiv-ui/core';
4
+ import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
5
+ import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
6
+ import { VERSION } from '../../version.js';
10
7
  /**
11
8
  * A private element to show backdrop for overlay
12
9
  */
@@ -19,7 +16,7 @@ let OverlayBackdrop = OverlayBackdrop_1 = class OverlayBackdrop extends BasicEle
19
16
  return VERSION;
20
17
  }
21
18
  /**
22
- * A `CSSResult` that will be used
19
+ * A `CSSResultGroup` that will be used
23
20
  * to style the host, slotted children
24
21
  * and the internal template of the element.
25
22
  * @return CSS template
@@ -1,5 +1,5 @@
1
1
  import { JSXInterface } from '../../jsx';
2
- import { ResponsiveElement, CSSResult, TemplateResult } from '@refinitiv-ui/core';
2
+ import { ResponsiveElement, CSSResultGroup, TemplateResult } from '@refinitiv-ui/core';
3
3
  /**
4
4
  * A private element to find overlay size boundaries
5
5
  */
@@ -11,12 +11,12 @@ export declare class OverlayViewport extends ResponsiveElement {
11
11
  static get version(): string;
12
12
  private static Template;
13
13
  /**
14
- * A `CSSResult` that will be used
14
+ * A `CSSResultGroup` that will be used
15
15
  * to style the host, slotted children
16
16
  * and the internal template of the element.
17
17
  * @return CSS template
18
18
  */
19
- static get styles(): CSSResult;
19
+ static get styles(): CSSResultGroup;
20
20
  /**
21
21
  * A `TemplateResult` that will be used
22
22
  * to render the updated internal template.
@@ -1,12 +1,8 @@
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 OverlayViewport_1;
8
- import { ResponsiveElement, css, customElement, html } from '@refinitiv-ui/core';
9
- import { VERSION } from '../../';
2
+ import { __decorate } from "tslib";
3
+ import { ResponsiveElement, css, html } from '@refinitiv-ui/core';
4
+ import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
5
+ import { VERSION } from '../../version.js';
10
6
  /**
11
7
  * A private element to find overlay size boundaries
12
8
  */
@@ -19,7 +15,7 @@ let OverlayViewport = OverlayViewport_1 = class OverlayViewport extends Responsi
19
15
  return VERSION;
20
16
  }
21
17
  /**
22
- * A `CSSResult` that will be used
18
+ * A `CSSResultGroup` that will be used
23
19
  * to style the host, slotted children
24
20
  * and the internal template of the element.
25
21
  * @return CSS template
@@ -1,7 +1,7 @@
1
1
  import { JSXInterface } from '../../jsx';
2
- import { ResponsiveElement, TemplateResult, CSSResult, PropertyValues, ElementSize } from '@refinitiv-ui/core';
3
- import { TransitionStyle, PositionTarget, Position, NullOrUndefined, PositionTargetStrategy } from '../helpers/types';
4
- export { TransitionStyle, PositionTarget, Position, PositionTargetStrategy };
2
+ import { ResponsiveElement, TemplateResult, CSSResultGroup, PropertyValues, ElementSize } from '@refinitiv-ui/core';
3
+ import { TransitionStyle, PositionTarget, Position, NullOrUndefined, PositionTargetStrategy } from '../helpers/types.js';
4
+ export type { TransitionStyle, PositionTarget, Position, PositionTargetStrategy };
5
5
  /**
6
6
  * Element to help building modals, dialogs and other overlay content
7
7
  * @fires closed - Dispatched when overlay becomes invisible and close animation finishes
@@ -19,12 +19,12 @@ export declare class Overlay extends ResponsiveElement {
19
19
  private _fullyOpened;
20
20
  private static Template;
21
21
  /**
22
- * A `CSSResult` that will be used
22
+ * A `CSSResultGroup` that will be used
23
23
  * to style the host, slotted children
24
24
  * and the internal template of the element.
25
25
  * @return CSS template
26
26
  */
27
- static get styles(): CSSResult | CSSResult[];
27
+ static get styles(): CSSResultGroup;
28
28
  /**
29
29
  * True if the overlay is currently displayed
30
30
  */
@@ -43,18 +43,22 @@ export declare class Overlay extends ResponsiveElement {
43
43
  spacing: boolean;
44
44
  /**
45
45
  * Set the transition style
46
+ * @type {TransitionStyle|null|undefined}
46
47
  */
47
48
  transitionStyle: TransitionStyle | NullOrUndefined;
48
49
  /**
49
50
  * Set a preferable z-index to override automatically calculated z-index
51
+ * @type {number|null|undefined}
50
52
  */
51
53
  zIndex: number | NullOrUndefined;
52
54
  /**
53
55
  * Set a specific x coordinate
56
+ * @type {number|null|undefined}
54
57
  */
55
58
  x: number | NullOrUndefined;
56
59
  /**
57
60
  * Set a specific y coordinate
61
+ * @type {number|null|undefined}
58
62
  */
59
63
  y: number | NullOrUndefined;
60
64
  /**
@@ -62,6 +66,7 @@ export declare class Overlay extends ResponsiveElement {
62
66
  * - HTMLElement if overlay is position next to the HTML element
63
67
  * - String containing `top`, `right`, `left`, `bottom`, `center` combinations to position against the screen.
64
68
  * For instance: `top left` - put the overlay at `top left` point of the screen; `bottom` - put overlay at `bottom center` point of the screen
69
+ * @type {PositionTarget|null|undefined}
65
70
  */
66
71
  positionTarget: HTMLElement | PositionTarget | NullOrUndefined;
67
72
  /**