@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,24 +1,19 @@
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 Overlay_1;
8
- import { ResponsiveElement, html, css, customElement, property } from '@refinitiv-ui/core';
9
- import { DEFAULT_ALIGN, DEFAULT_TARGET_STRATEGY } from '../helpers/types';
10
- import { valueOrZero, valueOrNull } from '../helpers/functions';
11
- import { applyLock } from '../managers/interaction-lock-manager';
12
- import { register as viewportRegister, deregister as viewportDeregister, getViewAreaInfo } from '../managers/viewport-manager';
13
- import { register as zIndexRegister, deregister as zIndexDeregister, toFront } from '../managers/zindex-manager';
14
- import { register as backdropRegister, deregister as backdropDeregister } from '../managers/backdrop-manager';
15
- import { register as closeRegister, deregister as closeDeregister } from '../managers/close-manager';
16
- import { register as focusableRegister, deregister as focusableDeregister } from '../managers/focus-manager';
17
- import { MicroTaskRunner, AnimationTaskRunner } from '@refinitiv-ui/utils';
18
- import { VERSION } from '../../';
19
- // TODO: use metrics once available
20
- const isEdge = (/Edge\/\d./i).test(navigator.userAgent);
21
- const isIE = (/Trident/g).test(navigator.userAgent) || (/MSIE/g).test(navigator.userAgent);
2
+ import { __decorate } from "tslib";
3
+ import { ResponsiveElement, html, css } 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';
7
+ import { MicroTaskRunner, AnimationTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
8
+ import { isIE, isEdge } from '@refinitiv-ui/utils/lib/browser.js';
9
+ import { DEFAULT_ALIGN, DEFAULT_TARGET_STRATEGY } from '../helpers/types.js';
10
+ import { valueOrZero, valueOrNull } from '../helpers/functions.js';
11
+ import { applyLock } from '../managers/interaction-lock-manager.js';
12
+ import { register as viewportRegister, deregister as viewportDeregister, getViewAreaInfo } from '../managers/viewport-manager.js';
13
+ import { register as zIndexRegister, deregister as zIndexDeregister, toFront } from '../managers/zindex-manager.js';
14
+ import { register as backdropRegister, deregister as backdropDeregister } from '../managers/backdrop-manager.js';
15
+ import { register as closeRegister, deregister as closeDeregister } from '../managers/close-manager.js';
16
+ import { register as focusableRegister, deregister as focusableDeregister } from '../managers/focus-manager.js';
22
17
  /**
23
18
  * Possible states of the overlay
24
19
  */
@@ -191,7 +186,7 @@ let Overlay = Overlay_1 = class Overlay extends ResponsiveElement {
191
186
  return VERSION;
192
187
  }
193
188
  /**
194
- * A `CSSResult` that will be used
189
+ * A `CSSResultGroup` that will be used
195
190
  * to style the host, slotted children
196
191
  * and the internal template of the element.
197
192
  * @return CSS template
@@ -339,7 +334,7 @@ let Overlay = Overlay_1 = class Overlay extends ResponsiveElement {
339
334
  if (oldPosition !== value) {
340
335
  this._positionStrategy = undefined;
341
336
  this._position = value;
342
- void this.requestUpdate('position', oldPosition);
337
+ this.requestUpdate('position', oldPosition);
343
338
  }
344
339
  }
345
340
  get position() {
@@ -558,7 +553,7 @@ let Overlay = Overlay_1 = class Overlay extends ResponsiveElement {
558
553
  const closing = changedProperties.has('opened') && isClosed;
559
554
  this.setRegisters(changedProperties);
560
555
  // Should update routing is calling render method. Not every attribute should result in render being called
561
- let shouldUpdate = opening || closing || this.hasUpdated === 0 || changedProperties.size === 0;
556
+ let shouldUpdate = opening || closing || !this.hasUpdated || changedProperties.size === 0;
562
557
  // Element may need to be updated if other attributes has been changed while the overlay is opened
563
558
  if (!shouldUpdate && isOpened) {
564
559
  if (shouldUpdateProperties.find(property => changedProperties.has(property))) {
@@ -1,2 +1,2 @@
1
- export { Position as OverlayPosition, PositionTarget as OverlayPositionTarget, TransitionStyle as OverlayTransitionStyle } from './helpers/types';
2
- export { Overlay } from './elements/overlay';
1
+ export type { Position as OverlayPosition, PositionTarget as OverlayPositionTarget, TransitionStyle as OverlayTransitionStyle } from './helpers/types';
2
+ export { Overlay } from './elements/overlay.js';
@@ -1 +1 @@
1
- export { Overlay } from './elements/overlay';
1
+ export { Overlay } from './elements/overlay.js';
@@ -1,5 +1,5 @@
1
1
  import type { Overlay } from '../elements/overlay';
2
- import '../elements/overlay-backdrop';
2
+ import '../elements/overlay-backdrop.js';
3
3
  /**
4
4
  * Backdrop manager adds a backdrop to the body
5
5
  * @returns {void}
@@ -1,5 +1,5 @@
1
- import { getOverlayLayers } from './zindex-manager';
2
- import '../elements/overlay-backdrop';
1
+ import { getOverlayLayers } from './zindex-manager.js';
2
+ import '../elements/overlay-backdrop.js';
3
3
  /**
4
4
  * Backdrop manager adds a backdrop to the body
5
5
  * @returns {void}
@@ -1,4 +1,4 @@
1
- import { getOverlays } from './zindex-manager';
1
+ import { getOverlays } from './zindex-manager.js';
2
2
  /**
3
3
  * Close manager ensures that the correct (or the most top) overlay
4
4
  * is closed on ESC and click events
@@ -1,5 +1,5 @@
1
- import { AnimationTaskRunner } from '@refinitiv-ui/utils';
2
- import { getOverlays } from './zindex-manager';
1
+ import { AnimationTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
2
+ import { getOverlays } from './zindex-manager.js';
3
3
  import { FocusableHelper } from '@refinitiv-ui/core';
4
4
  /**
5
5
  * Focus manager ensures that the correct
@@ -1,5 +1,5 @@
1
- import { AnimationTaskRunner } from '@refinitiv-ui/utils';
2
- import { getOverlays } from './zindex-manager';
1
+ import { AnimationTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
2
+ import { getOverlays } from './zindex-manager.js';
3
3
  /**
4
4
  * Check if two arrays are shallow equal
5
5
  * @param left Left side array
@@ -1,6 +1,6 @@
1
+ import type { ViewAreaInfo } from '../helpers/types';
1
2
  import type { Overlay } from '../elements/overlay';
2
- import '../elements/overlay-viewport';
3
- import { ViewAreaInfo } from '../helpers/types';
3
+ import '../elements/overlay-viewport.js';
4
4
  /**
5
5
  * Viewport manager singleton is responsible for getting
6
6
  * viewport sizes and reacting on viewport changes
@@ -1,5 +1,5 @@
1
- import { AnimationTaskRunner } from '@refinitiv-ui/utils';
2
- import '../elements/overlay-viewport';
1
+ import { AnimationTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
2
+ import '../elements/overlay-viewport.js';
3
3
  /**
4
4
  * Default values for area info
5
5
  */
@@ -89,6 +89,10 @@ export class ViewportManager {
89
89
  }
90
90
  const screenRect = this.screenViewport.getBoundingClientRect();
91
91
  // since screenViewport is applied on html element, it does not include body zoom
92
+ // Zoom is a legacy feature and must not be used by any means.
93
+ // Kept here for compatibility with old apps
94
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
95
+ // @ts-ignore
92
96
  const zoom = parseFloat(window.getComputedStyle(document.body).zoom);
93
97
  const screenHeight = screenRect.height / zoom;
94
98
  const screenWidth = screenRect.width / zoom;
@@ -1,4 +1,4 @@
1
- import { AfterRenderTaskRunner } from '@refinitiv-ui/utils';
1
+ import { AfterRenderTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
2
2
  export const ZIndex = 103; /* initial z-index to match Polymer. 102 is used for backdrop */
3
3
  /**
4
4
  * Z-index manager monitors z-indexes and ensures that the last opened/last
@@ -15,7 +15,36 @@
15
15
  "name": "opened",
16
16
  "description": "True if the menu is currently displayed",
17
17
  "type": "boolean",
18
- "default": "\"false\""
18
+ "default": "false"
19
+ },
20
+ {
21
+ "name": "with-backdrop",
22
+ "description": "True to show backdrop",
23
+ "type": "boolean",
24
+ "default": "false"
25
+ },
26
+ {
27
+ "name": "no-cancel-on-esc-key",
28
+ "description": "Set to true to disable canceling the overlay with the ESC key",
29
+ "type": "boolean",
30
+ "default": "false"
31
+ },
32
+ {
33
+ "name": "no-cancel-on-outside-click",
34
+ "description": "Set to true to disable canceling the overlay by clicking outside it",
35
+ "type": "boolean",
36
+ "default": "false"
37
+ },
38
+ {
39
+ "name": "lock-position-target",
40
+ "description": "Set to true to lock position target",
41
+ "type": "boolean",
42
+ "default": "false"
43
+ },
44
+ {
45
+ "name": "transition-style",
46
+ "description": "Set the transition style",
47
+ "type": "string | null"
19
48
  },
20
49
  {
21
50
  "name": "value",
@@ -26,12 +55,24 @@
26
55
  {
27
56
  "name": "x",
28
57
  "description": "Set a specific x coordinate",
29
- "type": "number"
58
+ "type": "number | undefined"
30
59
  },
31
60
  {
32
61
  "name": "y",
33
62
  "description": "Set a specific y coordinate",
34
- "type": "number"
63
+ "type": "number | undefined"
64
+ },
65
+ {
66
+ "name": "horizontal-offset",
67
+ "description": "A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`",
68
+ "type": "number",
69
+ "default": "0"
70
+ },
71
+ {
72
+ "name": "vertical-offset",
73
+ "description": "A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`",
74
+ "type": "number",
75
+ "default": "0"
35
76
  },
36
77
  {
37
78
  "name": "offset",
@@ -41,7 +82,7 @@
41
82
  {
42
83
  "name": "position",
43
84
  "description": "Set position and align against the attach target.",
44
- "type": "{} | undefined"
85
+ "type": "Position[] | undefined"
45
86
  },
46
87
  {
47
88
  "name": "with-backdrop",
@@ -90,54 +131,59 @@
90
131
  {
91
132
  "name": "values",
92
133
  "description": "Array of item's values",
93
- "type": "string[]"
134
+ "type": "string[]",
135
+ "default": "[]"
94
136
  },
95
137
  {
96
138
  "name": "data",
97
- "description": "Construct the menu from data object.\nCannot be used with internal content"
139
+ "description": "Construct the menu from data object.\nCannot be used with internal content",
140
+ "type": "OverlayMenuData|undefined"
98
141
  },
99
142
  {
100
143
  "name": "opened",
101
144
  "attribute": "opened",
102
145
  "description": "True if the menu is currently displayed",
103
146
  "type": "boolean",
104
- "default": "\"false\""
147
+ "default": "false"
105
148
  },
106
149
  {
107
150
  "name": "withBackdrop",
151
+ "attribute": "with-backdrop",
108
152
  "description": "True to show backdrop",
109
153
  "type": "boolean",
110
- "default": "\"false\""
154
+ "default": "false"
111
155
  },
112
156
  {
113
157
  "name": "noCancelOnEscKey",
158
+ "attribute": "no-cancel-on-esc-key",
114
159
  "description": "Set to true to disable canceling the overlay with the ESC key",
115
160
  "type": "boolean",
116
- "default": "\"false\""
161
+ "default": "false"
117
162
  },
118
163
  {
119
164
  "name": "noCancelOnOutsideClick",
165
+ "attribute": "no-cancel-on-outside-click",
120
166
  "description": "Set to true to disable canceling the overlay by clicking outside it",
121
167
  "type": "boolean",
122
- "default": "\"false\""
168
+ "default": "false"
123
169
  },
124
170
  {
125
171
  "name": "lockPositionTarget",
172
+ "attribute": "lock-position-target",
126
173
  "description": "Set to true to lock position target",
127
174
  "type": "boolean",
128
- "default": "\"false\""
175
+ "default": "false"
129
176
  },
130
177
  {
131
178
  "name": "positionTarget",
132
179
  "description": "Position next to the HTML element",
133
- "type": "HTMLElement|null",
134
- "default": "\"null\""
180
+ "type": "HTMLElement | null"
135
181
  },
136
182
  {
137
183
  "name": "transitionStyle",
184
+ "attribute": "transition-style",
138
185
  "description": "Set the transition style",
139
- "type": "string|null",
140
- "default": "\"null\""
186
+ "type": "string | null"
141
187
  },
142
188
  {
143
189
  "name": "value",
@@ -150,23 +196,27 @@
150
196
  "name": "x",
151
197
  "attribute": "x",
152
198
  "description": "Set a specific x coordinate",
153
- "type": "number"
199
+ "type": "number | undefined"
154
200
  },
155
201
  {
156
202
  "name": "y",
157
203
  "attribute": "y",
158
204
  "description": "Set a specific y coordinate",
159
- "type": "number"
205
+ "type": "number | undefined"
160
206
  },
161
207
  {
162
208
  "name": "horizontalOffset",
209
+ "attribute": "horizontal-offset",
163
210
  "description": "A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`",
164
- "type": "number"
211
+ "type": "number",
212
+ "default": "0"
165
213
  },
166
214
  {
167
215
  "name": "verticalOffset",
216
+ "attribute": "vertical-offset",
168
217
  "description": "A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`",
169
- "type": "number"
218
+ "type": "number",
219
+ "default": "0"
170
220
  },
171
221
  {
172
222
  "name": "offset",
@@ -178,7 +228,7 @@
178
228
  "name": "position",
179
229
  "attribute": "position",
180
230
  "description": "Set position and align against the attach target.",
181
- "type": "{} | undefined"
231
+ "type": "Position[] | undefined"
182
232
  }
183
233
  ],
184
234
  "events": [
@@ -0,0 +1,44 @@
1
+ # ef-overlay-menu
2
+
3
+ Overlay that supports single-level and multi-level menus
4
+
5
+ ## Attributes
6
+
7
+ | Attribute | Type | Description |
8
+ |------------------------------|-----------|--------------------------------------------------|
9
+ | `horizontal-offset` | `number` | A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget` |
10
+ | `lock-position-target` | `boolean` | Set to true to lock position target |
11
+ | `no-cancel-on-esc-key` | `boolean` | Set to true to disable canceling the overlay with the ESC key |
12
+ | `no-cancel-on-outside-click` | `boolean` | Set to true to disable canceling the overlay by clicking outside it |
13
+ | `transition-style` | `string` | Set the transition style |
14
+ | `vertical-offset` | `number` | A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget` |
15
+ | `with-backdrop` | `boolean` | True to show backdrop |
16
+
17
+ ## Properties
18
+
19
+ | Property | Attribute | Type | Default | Description |
20
+ |--------------------------|------------------------------|------------------------------|---------|--------------------------------------------------|
21
+ | `compact` | `compact` | `boolean` | false | Switch to compact style menu |
22
+ | `data` | | `OverlayMenuData\|undefined` | | Construct the menu from data object.<br />Cannot be used with internal content |
23
+ | `horizontalOffset` | `horizontal-offset` | `number` | 0 | A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget` |
24
+ | `lockPositionTarget` | `lock-position-target` | `boolean` | false | Set to true to lock position target |
25
+ | `noCancelOnEscKey` | `no-cancel-on-esc-key` | `boolean` | false | Set to true to disable canceling the overlay with the ESC key |
26
+ | `noCancelOnOutsideClick` | `no-cancel-on-outside-click` | `boolean` | false | Set to true to disable canceling the overlay by clicking outside it |
27
+ | `offset` | `offset` | `number` | | A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget` |
28
+ | `opened` | `opened` | `boolean` | false | True if the menu is currently displayed |
29
+ | `position` | `position` | `Position[] \| undefined` | | Set position and align against the attach target. |
30
+ | `positionTarget` | | `HTMLElement \| null` | null | Position next to the HTML element |
31
+ | `transitionStyle` | `transition-style` | `string \| null` | null | Set the transition style |
32
+ | `value` | `value` | `string` | "" | Returns the first selected item value. |
33
+ | `values` | | `string[]` | [] | Array of item's values |
34
+ | `verticalOffset` | `vertical-offset` | `number` | 0 | A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget` |
35
+ | `withBackdrop` | `with-backdrop` | `boolean` | false | True to show backdrop |
36
+ | `x` | `x` | `number \| undefined` | | Set a specific x coordinate |
37
+ | `y` | `y` | `number \| undefined` | | Set a specific y coordinate |
38
+
39
+ ## Events
40
+
41
+ | Event | Description |
42
+ |------------------|--------------------------------------------------|
43
+ | `item-trigger` | Dispatched when user clicks on item |
44
+ | `opened-changed` | Dispatched when when opened attribute changes internally. Prevent default to stop opening/closing pipeline |
@@ -1,6 +1,6 @@
1
- import { CollectionComposer } from '@refinitiv-ui/utils';
2
- import { OverlayMenu } from '../index';
3
- import { Item, ItemData } from '../../item';
1
+ import type { CollectionComposer } from '@refinitiv-ui/utils/lib/collection';
2
+ import type { OverlayMenu } from '../index';
3
+ import type { Item, ItemData } from '../../item';
4
4
  export declare type NestedMenu = {
5
5
  menu: OverlayMenu;
6
6
  item: Item;
@@ -1,10 +1,10 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { TemplateResult, CSSResult, PropertyValues } from '@refinitiv-ui/core';
3
- import '../icon';
4
- import '../item';
5
- import { Overlay } from '../overlay';
6
- import { OverlayMenuData } from './helpers/types';
7
- export { OverlayMenuData };
2
+ import { TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
3
+ import '../icon/index.js';
4
+ import '../item/index.js';
5
+ import { Overlay } from '../overlay/index.js';
6
+ import type { OverlayMenuData } from './helpers/types';
7
+ export type { OverlayMenuData };
8
8
  /**
9
9
  * Overlay that supports single-level and multi-level menus
10
10
  * @fires item-trigger - Dispatched when user clicks on item
@@ -25,30 +25,30 @@ export { OverlayMenuData };
25
25
  * @attr {boolean} lock-position-target - Set to true to lock position target
26
26
  * @prop {boolean} [lockPositionTarget=false] - Set to true to lock position target
27
27
  *
28
- * @prop {HTMLElement|null} [positionTarget=null] - Position next to the HTML element
28
+ * @prop {HTMLElement | null} [positionTarget=null] - Position next to the HTML element
29
29
  *
30
30
  * @attr {string} transition-style - Set the transition style
31
- * @prop {string|null} [transitionStyle=null] - Set the transition style
31
+ * @prop {string | null} [transitionStyle=null] - Set the transition style
32
32
  *
33
- * @prop {string} [value=] - Returns the first selected item from values.
33
+ * @prop {string} [value=""] - Returns the first selected item from values.
34
34
  *
35
- * @attr {number} x - Set a specific x coordinate
36
- * @prop {number} x - Set a specific x coordinate
35
+ * @attr {number | undefined} x - Set a specific x coordinate
36
+ * @prop {number | undefined} x - Set a specific x coordinate
37
37
  *
38
- * @attr {number} y - Set a specific y coordinate
39
- * @prop {number} y - Set a specific y coordinate
38
+ * @attr {number | undefined} y - Set a specific y coordinate
39
+ * @prop {number | undefined} y - Set a specific y coordinate
40
40
  *
41
41
  * @attr {number} horizontal-offset - A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`
42
- * @prop {number} horizontalOffset - A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`
42
+ * @prop {number} [horizontalOffset=0] - A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`
43
43
  *
44
44
  * @attr {number} vertical-offset - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
45
- * @prop {number} verticalOffset - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
45
+ * @prop {number} [verticalOffset=0] - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
46
46
  *
47
47
  * @attr {number} offset - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
48
48
  * @prop {number} offset - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
49
49
  *
50
- * @attr {{} | undefined} position - Set position and align against the attach target.
51
- * @prop {{} | undefined} position - Set position and align against the attach target.
50
+ * @attr {Position[] | undefined} position - Set position and align against the attach target.
51
+ * @prop {Position[] | undefined} position - Set position and align against the attach target.
52
52
  */
53
53
  export declare class OverlayMenu extends Overlay {
54
54
  /**
@@ -57,12 +57,12 @@ export declare class OverlayMenu extends Overlay {
57
57
  */
58
58
  static get version(): string;
59
59
  /**
60
- * A `CSSResult` that will be used
60
+ * A `CSSResultGroup` that will be used
61
61
  * to style the host, slotted children
62
62
  * and the internal template of the element.
63
63
  * @return CSS template
64
64
  */
65
- static get styles(): CSSResult | CSSResult[];
65
+ static get styles(): CSSResultGroup;
66
66
  constructor();
67
67
  private dataDisconnectThrottler;
68
68
  private menuHighlightedItem?;
@@ -81,6 +81,7 @@ export declare class OverlayMenu extends Overlay {
81
81
  /**
82
82
  * Array of item's values
83
83
  * @type {string[]}
84
+ * @default []
84
85
  */
85
86
  get values(): string[];
86
87
  set values(values: string[]);
@@ -92,6 +93,7 @@ export declare class OverlayMenu extends Overlay {
92
93
  /**
93
94
  * Construct the menu from data object.
94
95
  * Cannot be used with internal content
96
+ * @type {OverlayMenuData|undefined}
95
97
  */
96
98
  get data(): OverlayMenuData | undefined;
97
99
  set data(value: OverlayMenuData | undefined);
@@ -1,20 +1,19 @@
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 OverlayMenu_1;
8
- import { html, css, customElement, property, ifDefined, WarningNotice } from '@refinitiv-ui/core';
9
- import { AnimationTaskRunner, CollectionComposer } from '@refinitiv-ui/utils';
10
- import '../icon';
11
- import '../item';
12
- import { Item } from '../item';
13
- import { Overlay } from '../overlay';
2
+ import { __decorate } from "tslib";
3
+ import { html, css, WarningNotice } 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 { ifDefined } from '@refinitiv-ui/core/lib/directives/if-defined.js';
7
+ import { VERSION } from '../version.js';
8
+ import { AnimationTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
9
+ import { CollectionComposer } from '@refinitiv-ui/utils/lib/collection.js';
10
+ import { uuid } from '@refinitiv-ui/utils/lib/uuid.js';
11
+ import '../icon/index.js';
12
+ import '../item/index.js';
13
+ import { Item } from '../item/index.js';
14
+ import { Overlay } from '../overlay/index.js';
14
15
  import { applyLock } from '../overlay/managers/interaction-lock-manager.js';
15
- import { getId } from './helpers/uuid';
16
- import { OpenedMenusManager } from './managers/menu-manager';
17
- import { VERSION } from '../';
16
+ import { OpenedMenusManager } from './managers/menu-manager.js';
18
17
  /**
19
18
  * Overlay that supports single-level and multi-level menus
20
19
  * @fires item-trigger - Dispatched when user clicks on item
@@ -35,30 +34,30 @@ import { VERSION } from '../';
35
34
  * @attr {boolean} lock-position-target - Set to true to lock position target
36
35
  * @prop {boolean} [lockPositionTarget=false] - Set to true to lock position target
37
36
  *
38
- * @prop {HTMLElement|null} [positionTarget=null] - Position next to the HTML element
37
+ * @prop {HTMLElement | null} [positionTarget=null] - Position next to the HTML element
39
38
  *
40
39
  * @attr {string} transition-style - Set the transition style
41
- * @prop {string|null} [transitionStyle=null] - Set the transition style
40
+ * @prop {string | null} [transitionStyle=null] - Set the transition style
42
41
  *
43
- * @prop {string} [value=] - Returns the first selected item from values.
42
+ * @prop {string} [value=""] - Returns the first selected item from values.
44
43
  *
45
- * @attr {number} x - Set a specific x coordinate
46
- * @prop {number} x - Set a specific x coordinate
44
+ * @attr {number | undefined} x - Set a specific x coordinate
45
+ * @prop {number | undefined} x - Set a specific x coordinate
47
46
  *
48
- * @attr {number} y - Set a specific y coordinate
49
- * @prop {number} y - Set a specific y coordinate
47
+ * @attr {number | undefined} y - Set a specific y coordinate
48
+ * @prop {number | undefined} y - Set a specific y coordinate
50
49
  *
51
50
  * @attr {number} horizontal-offset - A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`
52
- * @prop {number} horizontalOffset - A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`
51
+ * @prop {number} [horizontalOffset=0] - A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`
53
52
  *
54
53
  * @attr {number} vertical-offset - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
55
- * @prop {number} verticalOffset - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
54
+ * @prop {number} [verticalOffset=0] - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
56
55
  *
57
56
  * @attr {number} offset - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
58
57
  * @prop {number} offset - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
59
58
  *
60
- * @attr {{} | undefined} position - Set position and align against the attach target.
61
- * @prop {{} | undefined} position - Set position and align against the attach target.
59
+ * @attr {Position[] | undefined} position - Set position and align against the attach target.
60
+ * @prop {Position[] | undefined} position - Set position and align against the attach target.
62
61
  */
63
62
  let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
64
63
  constructor() {
@@ -110,7 +109,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
110
109
  return VERSION;
111
110
  }
112
111
  /**
113
- * A `CSSResult` that will be used
112
+ * A `CSSResultGroup` that will be used
114
113
  * to style the host, slotted children
115
114
  * and the internal template of the element.
116
115
  * @return CSS template
@@ -132,6 +131,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
132
131
  /**
133
132
  * Array of item's values
134
133
  * @type {string[]}
134
+ * @default []
135
135
  */
136
136
  get values() {
137
137
  return this.withData ? this.getDataValues() : this.getSlottedValues();
@@ -142,7 +142,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
142
142
  return;
143
143
  }
144
144
  this.withData ? this.setDataValues(values) : this.setSlottedValues(values);
145
- void this.requestUpdate('values', oldValues);
145
+ this.requestUpdate('values', oldValues);
146
146
  }
147
147
  /**
148
148
  * Returns the first selected item value.
@@ -157,6 +157,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
157
157
  /**
158
158
  * Construct the menu from data object.
159
159
  * Cannot be used with internal content
160
+ * @type {OverlayMenuData|undefined}
160
161
  */
161
162
  get data() {
162
163
  return this._data;
@@ -185,7 +186,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
185
186
  this.composer.on('modification', // Listen for modifications
186
187
  this.modificationUpdate // Update the template
187
188
  );
188
- void this.requestUpdate('data', oldValue);
189
+ this.requestUpdate('data', oldValue);
189
190
  }
190
191
  /**
191
192
  * Get values from data collection
@@ -453,7 +454,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
453
454
  */
454
455
  modificationUpdate() {
455
456
  this.constructDataMenus();
456
- void this.requestUpdate();
457
+ this.requestUpdate();
457
458
  }
458
459
  /**
459
460
  * Construct menu items and nested menus from data object
@@ -826,7 +827,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
826
827
  menu.transitionStyle = this.transitionStyle;
827
828
  menu.noCancelOnOutsideClick = true;
828
829
  menu.compact = this.compact;
829
- menu.id = getId();
830
+ menu.id = uuid();
830
831
  return menu;
831
832
  }
832
833
  /**
@@ -1,5 +1,5 @@
1
- import { Item } from '../../item';
2
- import { OverlayMenu } from '../index';
1
+ import type { Item } from '../../item';
2
+ import { OverlayMenu } from '../index.js';
3
3
  /**
4
4
  * Overlay menu manager monitors menu nesting and ensures
5
5
  * that only a single menu tree can be opened