@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,6 +1,6 @@
1
- import { AfterRenderTaskRunner } from '@refinitiv-ui/utils';
2
- import { OverlayMenu } from '../index';
3
- import { getOverlays } from '../../overlay/managers/zindex-manager';
1
+ import { AfterRenderTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
2
+ import { OverlayMenu } from '../index.js';
3
+ import { getOverlays } from '../../overlay/managers/zindex-manager.js';
4
4
  /**
5
5
  * Overlay menu manager monitors menu nesting and ensures
6
6
  * that only a single menu tree can be opened
@@ -0,0 +1,27 @@
1
+ # ef-pagination
2
+
3
+ Used to control and navigate through multiple pages
4
+
5
+ ## Properties
6
+
7
+ | Property | Attribute | Type | Default | Description |
8
+ |--------------|---------------|-----------|---------|-------------------------|
9
+ | `disabled` | `disabled` | `boolean` | false | Set state to disable |
10
+ | `page` | `page` | `string` | "1" | Set current page |
11
+ | `pageSize` | `page-size` | `string` | "10" | Number of item per page |
12
+ | `totalItems` | `total-items` | `string` | "10" | Total items |
13
+
14
+ ## Methods
15
+
16
+ | Method | Type | Description |
17
+ |------------|------------|-------------------------|
18
+ | `first` | `(): void` | Go to the first page |
19
+ | `last` | `(): void` | Go to the last page |
20
+ | `next` | `(): void` | Go to the next page |
21
+ | `previous` | `(): void` | Go to the previous page |
22
+
23
+ ## Events
24
+
25
+ | Event | Description |
26
+ |----------------|-------------------------------------------|
27
+ | `page-changed` | Fired when the `page` property is changed |
@@ -1,11 +1,11 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { BasicElement, PropertyValues, TemplateResult, CSSResult } from '@refinitiv-ui/core';
3
- import '@refinitiv-ui/phrasebook/lib/locale/en/pagination';
2
+ import { BasicElement, PropertyValues, TemplateResult, CSSResultGroup } from '@refinitiv-ui/core';
3
+ import '../button/index.js';
4
+ import '../button-bar/index.js';
5
+ import '../layout/index.js';
6
+ import '../text-field/index.js';
7
+ import '@refinitiv-ui/phrasebook/lib/locale/en/pagination.js';
4
8
  import { Translate } from '@refinitiv-ui/translate';
5
- import '../button';
6
- import '../button-bar';
7
- import '../layout';
8
- import '../text-field';
9
9
  /**
10
10
  * Used to control and navigate through multiple pages
11
11
  * @fires page-changed - Fired when the `page` property is changed
@@ -17,12 +17,12 @@ export declare class Pagination extends BasicElement {
17
17
  */
18
18
  static get version(): string;
19
19
  /**
20
- * A `CSSResult` that will be used
20
+ * A `CSSResultGroup` that will be used
21
21
  * to style the host, slotted children
22
22
  * and the internal template of the element.
23
23
  * @return CSS template
24
24
  */
25
- static get styles(): CSSResult | CSSResult[];
25
+ static get styles(): CSSResultGroup;
26
26
  /**
27
27
  * Set current page
28
28
  */
@@ -1,17 +1,15 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { BasicElement, html, css, customElement, property, query } from '@refinitiv-ui/core';
8
- import '@refinitiv-ui/phrasebook/lib/locale/en/pagination';
1
+ import { __decorate } from "tslib";
2
+ import { BasicElement, html, css } from '@refinitiv-ui/core';
3
+ import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
4
+ import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
5
+ import { query } from '@refinitiv-ui/core/lib/decorators/query.js';
6
+ import { VERSION } from '../version.js';
7
+ import '../button/index.js';
8
+ import '../button-bar/index.js';
9
+ import '../layout/index.js';
10
+ import '../text-field/index.js';
11
+ import '@refinitiv-ui/phrasebook/lib/locale/en/pagination.js';
9
12
  import { translate } from '@refinitiv-ui/translate';
10
- import '../button';
11
- import '../button-bar';
12
- import '../layout';
13
- import '../text-field';
14
- import { VERSION } from '../';
15
13
  /**
16
14
  * Used to control and navigate through multiple pages
17
15
  * @fires page-changed - Fired when the `page` property is changed
@@ -44,7 +42,7 @@ let Pagination = class Pagination extends BasicElement {
44
42
  return VERSION;
45
43
  }
46
44
  /**
47
- * A `CSSResult` that will be used
45
+ * A `CSSResultGroup` that will be used
48
46
  * to style the host, slotted children
49
47
  * and the internal template of the element.
50
48
  * @return CSS template
@@ -221,7 +219,7 @@ let Pagination = class Pagination extends BasicElement {
221
219
  const oldPageValue = this.page;
222
220
  this.page = this.validatePage(this.page, event.target.value);
223
221
  // need this to update input text
224
- void this.requestUpdate();
222
+ this.requestUpdate();
225
223
  if (this.page !== oldPageValue) {
226
224
  this.notifyPropertyChange('page', this.page);
227
225
  }
@@ -0,0 +1,11 @@
1
+ # ef-panel
2
+
3
+ A container for components.
4
+ It provides a standard background color and padding, depends on theme.
5
+
6
+ ## Properties
7
+
8
+ | Property | Attribute | Type | Default | Description |
9
+ |---------------|---------------|-----------|---------|-------------------------------------|
10
+ | `spacing` | `spacing` | `boolean` | false | Apply default padding from theme |
11
+ | `transparent` | `transparent` | `boolean` | false | Set panel background to transparent |
@@ -1,5 +1,5 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { BasicElement, CSSResult, TemplateResult } from '@refinitiv-ui/core';
2
+ import { BasicElement, CSSResultGroup, TemplateResult } from '@refinitiv-ui/core';
3
3
  /**
4
4
  * A container for components.
5
5
  * It provides a standard background color and padding, depends on theme.
@@ -11,12 +11,12 @@ export declare class Panel extends BasicElement {
11
11
  */
12
12
  static get version(): string;
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 | CSSResult[];
19
+ static get styles(): CSSResultGroup;
20
20
  /**
21
21
  * Apply default padding from theme
22
22
  */
@@ -1,11 +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
- import { BasicElement, html, customElement, property, css } from '@refinitiv-ui/core';
8
- import { VERSION } from '../';
1
+ import { __decorate } from "tslib";
2
+ import { BasicElement, html, css } from '@refinitiv-ui/core';
3
+ import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
4
+ import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
5
+ import { VERSION } from '../version.js';
9
6
  /**
10
7
  * A container for components.
11
8
  * It provides a standard background color and padding, depends on theme.
@@ -30,7 +27,7 @@ let Panel = class Panel extends BasicElement {
30
27
  return VERSION;
31
28
  }
32
29
  /**
33
- * A `CSSResult` that will be used
30
+ * A `CSSResultGroup` that will be used
34
31
  * to style the host, slotted children
35
32
  * and the internal template of the element.
36
33
  * @return CSS template
@@ -3,13 +3,19 @@
3
3
  "tags": [
4
4
  {
5
5
  "name": "ef-password-field",
6
- "description": "A form control element for password",
6
+ "description": "A form control element for password.",
7
7
  "attributes": [
8
8
  {
9
- "name": "pattern",
10
- "description": "Set regular expression for input validation",
11
- "type": "string",
12
- "default": "\"\""
9
+ "name": "disabled",
10
+ "description": "Set disabled state",
11
+ "type": "boolean",
12
+ "default": "false"
13
+ },
14
+ {
15
+ "name": "error",
16
+ "description": "Set error state",
17
+ "type": "boolean",
18
+ "default": "false"
13
19
  },
14
20
  {
15
21
  "name": "placeholder",
@@ -18,33 +24,23 @@
18
24
  "default": "\"\""
19
25
  },
20
26
  {
21
- "name": "error",
22
- "description": "Set state to error",
27
+ "name": "readonly",
28
+ "description": "Set readonly state",
23
29
  "type": "boolean",
24
30
  "default": "false"
25
31
  },
26
32
  {
27
- "name": "warning",
28
- "description": "Set state to warning",
33
+ "name": "transparent",
34
+ "description": "Disables all other states and border/background styles.",
29
35
  "type": "boolean",
30
36
  "default": "false"
31
37
  },
32
38
  {
33
- "name": "transparent",
34
- "description": "Disables all other states and border/background styles.\nUse with advanced composite elements requiring e.g. multi selection in\ncombo-box when parent container handles element states.",
39
+ "name": "warning",
40
+ "description": "Set warning state",
35
41
  "type": "boolean",
36
42
  "default": "false"
37
43
  },
38
- {
39
- "name": "minlength",
40
- "description": "Set character minimum limit",
41
- "type": "number | null"
42
- },
43
- {
44
- "name": "maxlength",
45
- "description": "Set character maximum limit",
46
- "type": "number | null"
47
- },
48
44
  {
49
45
  "name": "value",
50
46
  "description": "Input's value",
@@ -52,22 +48,43 @@
52
48
  "default": "\"\""
53
49
  },
54
50
  {
55
- "name": "readonly",
56
- "description": "Set readonly state",
57
- "type": "boolean",
58
- "default": "\"false\""
51
+ "name": "maxlength",
52
+ "description": "Set character max limit",
53
+ "type": "number"
59
54
  },
60
55
  {
61
- "name": "disabled",
62
- "description": "Set disabled state",
63
- "type": "boolean",
64
- "default": "\"false\""
56
+ "name": "minlength",
57
+ "description": "Set character min limit",
58
+ "type": "number"
65
59
  }
66
60
  ],
67
61
  "properties": [
62
+ {
63
+ "name": "disabled",
64
+ "attribute": "disabled",
65
+ "description": "Set disabled state",
66
+ "type": "boolean",
67
+ "default": "false"
68
+ },
69
+ {
70
+ "name": "error",
71
+ "attribute": "error",
72
+ "description": "Set error state",
73
+ "type": "boolean",
74
+ "default": "false"
75
+ },
76
+ {
77
+ "name": "maxLength",
78
+ "description": "Set character max limit",
79
+ "type": "number | null"
80
+ },
81
+ {
82
+ "name": "minLength",
83
+ "description": "Set character min limit",
84
+ "type": "number | null"
85
+ },
68
86
  {
69
87
  "name": "pattern",
70
- "attribute": "pattern",
71
88
  "description": "Set regular expression for input validation",
72
89
  "type": "string",
73
90
  "default": "\"\""
@@ -80,37 +97,25 @@
80
97
  "default": "\"\""
81
98
  },
82
99
  {
83
- "name": "error",
84
- "attribute": "error",
85
- "description": "Set state to error",
86
- "type": "boolean",
87
- "default": "false"
88
- },
89
- {
90
- "name": "warning",
91
- "attribute": "warning",
92
- "description": "Set state to warning",
100
+ "name": "readonly",
101
+ "attribute": "readonly",
102
+ "description": "Set readonly state",
93
103
  "type": "boolean",
94
104
  "default": "false"
95
105
  },
96
106
  {
97
107
  "name": "transparent",
98
108
  "attribute": "transparent",
99
- "description": "Disables all other states and border/background styles.\nUse with advanced composite elements requiring e.g. multi selection in\ncombo-box when parent container handles element states.",
109
+ "description": "Disables all other states and border/background styles.",
100
110
  "type": "boolean",
101
111
  "default": "false"
102
112
  },
103
113
  {
104
- "name": "minLength",
105
- "attribute": "minlength",
106
- "description": "Set character minimum limit",
107
- "type": "number | null"
108
- },
109
- {
110
- "name": "maxLength",
111
- "attribute": "maxlength",
112
- "description": "Set character maximum limit",
113
- "type": "number | null"
114
+ "name": "warning",
115
+ "attribute": "warning",
116
+ "description": "Set warning state",
117
+ "type": "boolean",
118
+ "default": "false"
114
119
  },
115
120
  {
116
121
  "name": "value",
@@ -118,20 +123,6 @@
118
123
  "description": "Input's value",
119
124
  "type": "string",
120
125
  "default": "\"\""
121
- },
122
- {
123
- "name": "readonly",
124
- "attribute": "readonly",
125
- "description": "Set readonly state",
126
- "type": "boolean",
127
- "default": "\"false\""
128
- },
129
- {
130
- "name": "disabled",
131
- "attribute": "disabled",
132
- "description": "Set disabled state",
133
- "type": "boolean",
134
- "default": "\"false\""
135
126
  }
136
127
  ],
137
128
  "events": [
@@ -142,12 +133,16 @@
142
133
  {
143
134
  "name": "error-changed",
144
135
  "description": "Dispatched when error state changes"
136
+ },
137
+ {
138
+ "name": "icon-click",
139
+ "description": "Dispatched when icon is clicked"
145
140
  }
146
141
  ],
147
142
  "methods": [
148
143
  {
149
- "name": "select",
150
- "description": "Select the contents of input",
144
+ "name": "renderIcon",
145
+ "description": "",
151
146
  "params": []
152
147
  }
153
148
  ]
@@ -0,0 +1,39 @@
1
+ # ef-password-field
2
+
3
+ A form control element for password.
4
+
5
+ ## Attributes
6
+
7
+ | Attribute | Type | Description |
8
+ |-------------|----------|-------------------------|
9
+ | `maxlength` | `number` | Set character max limit |
10
+ | `minlength` | `number` | Set character min limit |
11
+
12
+ ## Properties
13
+
14
+ | Property | Attribute | Type | Default | Description |
15
+ |---------------|---------------|------------------|---------|--------------------------------------------------|
16
+ | `disabled` | `disabled` | `boolean` | false | Set disabled state |
17
+ | `error` | `error` | `boolean` | false | Set error state |
18
+ | `maxLength` | | `number \| null` | null | Set character max limit |
19
+ | `minLength` | | `number \| null` | null | Set character min limit |
20
+ | `pattern` | | `string` | "" | Set regular expression for input validation |
21
+ | `placeholder` | `placeholder` | `string` | "" | Set placeholder text |
22
+ | `readonly` | `readonly` | `boolean` | false | Set readonly state |
23
+ | `transparent` | `transparent` | `boolean` | false | Disables all other states and border/background styles. |
24
+ | `value` | `value` | `string` | "" | Input's value |
25
+ | `warning` | `warning` | `boolean` | false | Set warning state |
26
+
27
+ ## Methods
28
+
29
+ | Method | Type |
30
+ |--------------|-----------|
31
+ | `renderIcon` | `(): any` |
32
+
33
+ ## Events
34
+
35
+ | Event | Description |
36
+ |-----------------|-------------------------------------|
37
+ | `error-changed` | Dispatched when error state changes |
38
+ | `icon-click` | Dispatched when icon is clicked |
39
+ | `value-changed` | Dispatched when value changes |
@@ -1,75 +1,55 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { ControlElement, CSSResult, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
- import '../icon';
2
+ import { PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
+ import { TemplateMap } from '@refinitiv-ui/core/lib/directives/template-map.js';
4
+ import { TextField } from '../text-field/index.js';
5
+ import '../icon/index.js';
6
+ import '@refinitiv-ui/phrasebook/lib/locale/en/password-field.js';
7
+ import { Translate } from '@refinitiv-ui/translate';
4
8
  /**
5
- * A form control element for password
9
+ * A form control element for password.
6
10
  *
7
11
  * @fires value-changed - Dispatched when value changes
8
12
  * @fires error-changed - Dispatched when error state changes
13
+ * @fires icon-click - Dispatched when icon is clicked
9
14
  *
10
- * @attr {string} value - Input's value
11
- * @prop {string} [value=] - Input's value
15
+ * @attr {boolean} disabled - Set disabled state
16
+ * @prop {boolean} [disabled=false] - Set disabled state
17
+ *
18
+ * @attr {boolean} error - Set error state
19
+ * @prop {boolean} [error=false] - Set error state
20
+ *
21
+ * @attr {number} maxlength - Set character max limit
22
+ * @prop {number | null} [maxLength=null] - Set character max limit
23
+ *
24
+ * @attr {number} minlength - Set character min limit
25
+ * @prop {number | null} [minLength=null] - Set character min limit
26
+ *
27
+ * @prop {string} [pattern=""] - Set regular expression for input validation
28
+ *
29
+ * @attr {string} placeholder - Set placeholder text
30
+ * @prop {string} [placeholder=""] - Set placeholder text
12
31
  *
13
32
  * @attr {boolean} readonly - Set readonly state
14
33
  * @prop {boolean} [readonly=false] - Set readonly state
15
34
  *
16
- * @attr {boolean} disabled - Set disabled state
17
- * @prop {boolean} [disabled=false] - Set disabled state
35
+ * @attr {boolean} transparent - Disables all other states and border/background styles.
36
+ * @prop {boolean} [transparent=false] - Disables all other states and border/background styles.
37
+ *
38
+ * @attr {boolean} warning - Set warning state
39
+ * @prop {boolean} [warning=false] - Set warning state
40
+ *
41
+ * @attr {string} value - Input's value
42
+ * @prop {string} [value=""] - Input's value
18
43
  */
19
- export declare class PasswordField extends ControlElement {
20
- /**
21
- * Element version number
22
- * @returns version number
23
- */
24
- static get version(): string;
25
- /**
26
- * @return A `CSSResult` that will be used to style the host,
27
- * slotted children and the internal template of the element.
28
- */
29
- static get styles(): CSSResult | CSSResult[];
30
- /**
31
- * Set regular expression for input validation
32
- */
33
- pattern: string;
34
- /**
35
- * Set placeholder text
36
- */
37
- placeholder: string;
38
- /**
39
- * Set state to error
40
- */
41
- error: boolean;
42
- /**
43
- * Set state to warning
44
- */
45
- warning: boolean;
46
- /**
47
- * Disables all other states and border/background styles.
48
- * Use with advanced composite elements requiring e.g. multi selection in
49
- * combo-box when parent container handles element states.
50
- */
51
- transparent: boolean;
52
- /**
53
- * Set character minimum limit
54
- */
55
- minLength: number | null;
56
- /**
57
- * Set character maximum limit
58
- */
59
- maxLength: number | null;
44
+ export declare class PasswordField extends TextField {
60
45
  /**
61
- * Get native input element from shadow roots
46
+ * Used for translations
62
47
  */
63
- private inputElement;
48
+ protected t: Translate;
64
49
  /**
65
50
  * Defines whether password is visible or not
66
51
  */
67
52
  private isPasswordVisible;
68
- /**
69
- * Select the contents of input
70
- * @return void
71
- */
72
- select(): void;
73
53
  /**
74
54
  * Called when the element’s DOM has been updated and rendered for the first time
75
55
  * @param changedProperties Properties that has changed
@@ -77,52 +57,21 @@ export declare class PasswordField extends ControlElement {
77
57
  */
78
58
  protected firstUpdated(changedProperties: PropertyValues): void;
79
59
  /**
80
- * Called when the element’s DOM has been updated and rendered
81
- * @param changedProperties Properties that has changed
82
- * @return shouldUpdate
83
- */
84
- protected updated(changedProperties: PropertyValues): void;
85
- /**
86
- * A `TemplateResult` that will be used
87
- * to render the updated internal template.
88
- * @return Render template
89
- */
90
- protected render(): TemplateResult;
91
- /**
92
- * Check if input should be re-validated
93
- * True if value changed and pattern or minlength is present
94
- * True if pattern or minlength changed
95
- * @param changedProperties Properties that has changed
96
- * @return True if input should be re-validated
97
- */
98
- private shouldValidateInput;
99
- /**
100
- * check if value is changed and fire event
101
- * @return {void}
102
- */
103
- private onPossibleValueChange;
104
- /**
105
- * validate input according `pattern`, `min` and `max` properties
106
- * change state of `error` property according pattern validation
107
- * @return void
108
- */
109
- private validateInput;
110
- /**
111
- * @param error existing state of error
112
- * @returns true if there is no error and browser is IE11 and minLength more than 0 and value exists
60
+ * Decorate `<input>` element with common properties extended from text-field:
61
+ * type="text|password" - text if password is visible
62
+ * @returns template map
113
63
  */
114
- private shouldValidateForMinLength;
64
+ protected get decorateInputMap(): TemplateMap;
115
65
  /**
116
- * Detect `enter` and `space` keydown and fire
117
- * @param event keydown event
66
+ * Renders icon element
118
67
  * @returns {void}
119
68
  */
120
- private handleKeyDown;
69
+ protected renderIcon(): TemplateResult | null;
121
70
  /**
122
71
  * Toggles password visibility state
123
72
  * @return void
124
73
  */
125
- private togglePasswordVisibility;
74
+ protected togglePasswordVisibility(): void;
126
75
  }
127
76
 
128
77
  declare global {
@@ -132,7 +81,7 @@ declare global {
132
81
 
133
82
  namespace JSX {
134
83
  interface IntrinsicElements {
135
- 'ef-password-field': Partial<PasswordField> | JSXInterface.ControlHTMLAttributes<PasswordField>;
84
+ 'ef-password-field': Partial<PasswordField> | JSXInterface.HTMLAttributes<PasswordField>;
136
85
  }
137
86
  }
138
87
  }