@refinitiv-ui/elements 7.0.0 → 7.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/CHANGELOG.md +195 -449
  2. package/LICENSE +2 -2
  3. package/README.md +12 -10
  4. package/cli.mjs +5 -3
  5. package/lib/accordion/index.d.ts +1 -1
  6. package/lib/accordion/index.js +4 -7
  7. package/lib/appstate-bar/index.d.ts +2 -2
  8. package/lib/appstate-bar/index.js +10 -4
  9. package/lib/autosuggest/index.d.ts +7 -7
  10. package/lib/autosuggest/index.js +80 -80
  11. package/lib/autosuggest/themes/solar/charcoal/index.js +1 -1
  12. package/lib/autosuggest/themes/solar/pearl/index.js +1 -1
  13. package/lib/button/index.js +7 -10
  14. package/lib/button-bar/index.d.ts +1 -1
  15. package/lib/button-bar/index.js +12 -12
  16. package/lib/calendar/index.d.ts +39 -39
  17. package/lib/calendar/index.js +156 -123
  18. package/lib/calendar/utils.js +1 -1
  19. package/lib/canvas/index.d.ts +1 -1
  20. package/lib/canvas/index.js +2 -4
  21. package/lib/card/helpers/types.d.ts +2 -2
  22. package/lib/card/index.d.ts +5 -5
  23. package/lib/card/index.js +34 -28
  24. package/lib/chart/elements/chart.d.ts +4 -4
  25. package/lib/chart/elements/chart.js +39 -33
  26. package/lib/chart/plugins/doughnut-center-label.d.ts +3 -3
  27. package/lib/chart/plugins/doughnut-center-label.js +13 -9
  28. package/lib/checkbox/index.d.ts +1 -1
  29. package/lib/checkbox/index.js +12 -13
  30. package/lib/clock/index.d.ts +55 -55
  31. package/lib/clock/index.js +84 -95
  32. package/lib/clock/themes/halo/dark/index.js +1 -1
  33. package/lib/clock/themes/halo/light/index.js +1 -1
  34. package/lib/clock/themes/solar/charcoal/index.js +1 -1
  35. package/lib/clock/themes/solar/pearl/index.js +1 -1
  36. package/lib/collapse/index.d.ts +1 -1
  37. package/lib/collapse/index.js +27 -18
  38. package/lib/collapse/themes/halo/dark/index.js +1 -1
  39. package/lib/collapse/themes/halo/light/index.js +1 -1
  40. package/lib/color-dialog/elements/color-palettes.d.ts +1 -1
  41. package/lib/color-dialog/elements/color-palettes.js +5 -6
  42. package/lib/color-dialog/elements/grayscale-palettes.d.ts +1 -1
  43. package/lib/color-dialog/elements/grayscale-palettes.js +9 -9
  44. package/lib/color-dialog/elements/palettes.js +5 -4
  45. package/lib/color-dialog/helpers/value-model.js +7 -9
  46. package/lib/color-dialog/index.d.ts +6 -6
  47. package/lib/color-dialog/index.js +53 -37
  48. package/lib/color-picker/index.d.ts +2 -2
  49. package/lib/color-picker/index.js +40 -34
  50. package/lib/combo-box/helpers/filter.d.ts +2 -2
  51. package/lib/combo-box/helpers/types.d.ts +1 -1
  52. package/lib/combo-box/index.d.ts +9 -9
  53. package/lib/combo-box/index.js +61 -55
  54. package/lib/configuration/elements/configuration.js +2 -2
  55. package/lib/counter/index.d.ts +4 -4
  56. package/lib/counter/index.js +9 -7
  57. package/lib/datetime-field/index.d.ts +4 -5
  58. package/lib/datetime-field/index.js +32 -23
  59. package/lib/datetime-field/utils.js +11 -1
  60. package/lib/datetime-picker/index.d.ts +75 -75
  61. package/lib/datetime-picker/index.js +150 -131
  62. package/lib/datetime-picker/locales.js +5 -5
  63. package/lib/datetime-picker/utils.js +9 -9
  64. package/lib/dialog/draggable-element.js +1 -2
  65. package/lib/dialog/index.d.ts +5 -5
  66. package/lib/dialog/index.js +51 -47
  67. package/lib/email-field/index.d.ts +1 -1
  68. package/lib/email-field/index.js +6 -6
  69. package/lib/events.d.ts +1 -1
  70. package/lib/flag/index.d.ts +1 -1
  71. package/lib/flag/index.js +6 -5
  72. package/lib/flag/utils/FlagLoader.js +1 -1
  73. package/lib/header/index.d.ts +1 -1
  74. package/lib/header/index.js +2 -2
  75. package/lib/header/themes/halo/dark/index.js +1 -1
  76. package/lib/header/themes/halo/light/index.js +1 -1
  77. package/lib/header/themes/solar/charcoal/index.js +1 -1
  78. package/lib/header/themes/solar/pearl/index.js +1 -1
  79. package/lib/heatmap/helpers/color.d.ts +1 -1
  80. package/lib/heatmap/helpers/color.js +11 -5
  81. package/lib/heatmap/helpers/track.js +3 -3
  82. package/lib/heatmap/index.d.ts +9 -9
  83. package/lib/heatmap/index.js +51 -42
  84. package/lib/icon/index.d.ts +2 -2
  85. package/lib/icon/index.js +8 -10
  86. package/lib/interactive-chart/helpers/types.d.ts +3 -3
  87. package/lib/interactive-chart/index.d.ts +29 -29
  88. package/lib/interactive-chart/index.js +69 -55
  89. package/lib/item/helpers/types.d.ts +1 -1
  90. package/lib/item/index.d.ts +3 -3
  91. package/lib/item/index.js +24 -20
  92. package/lib/jsx.d.ts +6 -4
  93. package/lib/label/index.d.ts +1 -1
  94. package/lib/label/index.js +10 -7
  95. package/lib/layout/index.d.ts +7 -7
  96. package/lib/layout/index.js +7 -7
  97. package/lib/led-gauge/index.d.ts +1 -1
  98. package/lib/led-gauge/index.js +10 -10
  99. package/lib/list/elements/list.d.ts +3 -3
  100. package/lib/list/elements/list.js +10 -12
  101. package/lib/list/helpers/renderer.js +2 -2
  102. package/lib/list/helpers/types.d.ts +1 -1
  103. package/lib/list/index.d.ts +1 -1
  104. package/lib/list/renderer.d.ts +7 -7
  105. package/lib/loader/index.js +7 -8
  106. package/lib/multi-input/index.d.ts +6 -6
  107. package/lib/multi-input/index.js +39 -45
  108. package/lib/notification/elements/notification-tray.d.ts +2 -2
  109. package/lib/notification/elements/notification-tray.js +3 -3
  110. package/lib/notification/elements/notification.d.ts +2 -2
  111. package/lib/notification/elements/notification.js +14 -13
  112. package/lib/notification/helpers/status.js +1 -1
  113. package/lib/notification/themes/halo/dark/index.js +1 -1
  114. package/lib/notification/themes/halo/light/index.js +1 -1
  115. package/lib/notification/themes/solar/charcoal/index.js +1 -1
  116. package/lib/notification/themes/solar/pearl/index.js +1 -1
  117. package/lib/number-field/index.d.ts +5 -6
  118. package/lib/number-field/index.js +37 -47
  119. package/lib/overlay/elements/overlay-viewport.d.ts +1 -1
  120. package/lib/overlay/elements/overlay.d.ts +2 -2
  121. package/lib/overlay/elements/overlay.js +152 -96
  122. package/lib/overlay/helpers/types.d.ts +1 -1
  123. package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
  124. package/lib/overlay/managers/backdrop-manager.js +2 -2
  125. package/lib/overlay/managers/close-manager.js +2 -1
  126. package/lib/overlay/managers/focus-manager.js +23 -13
  127. package/lib/overlay/managers/interaction-lock-manager.d.ts +4 -4
  128. package/lib/overlay/managers/interaction-lock-manager.js +33 -25
  129. package/lib/overlay/managers/viewport-manager.d.ts +2 -2
  130. package/lib/overlay/managers/viewport-manager.js +3 -2
  131. package/lib/overlay/managers/zindex-manager.js +4 -2
  132. package/lib/overlay-menu/helpers/types.d.ts +2 -2
  133. package/lib/overlay-menu/index.d.ts +1 -1
  134. package/lib/overlay-menu/index.js +44 -33
  135. package/lib/overlay-menu/managers/menu-manager.d.ts +10 -10
  136. package/lib/overlay-menu/managers/menu-manager.js +14 -13
  137. package/lib/pagination/index.d.ts +4 -4
  138. package/lib/pagination/index.js +39 -14
  139. package/lib/panel/index.js +1 -1
  140. package/lib/password-field/index.d.ts +2 -2
  141. package/lib/password-field/index.js +3 -3
  142. package/lib/pill/index.d.ts +1 -1
  143. package/lib/pill/index.js +22 -19
  144. package/lib/progress-bar/index.d.ts +1 -1
  145. package/lib/progress-bar/index.js +38 -37
  146. package/lib/radio-button/index.d.ts +2 -2
  147. package/lib/radio-button/index.js +17 -12
  148. package/lib/radio-button/radio-button-registry.js +8 -5
  149. package/lib/rating/index.d.ts +1 -1
  150. package/lib/rating/index.js +2 -5
  151. package/lib/rating/utils.d.ts +6 -6
  152. package/lib/rating/utils.js +6 -6
  153. package/lib/search-field/index.d.ts +2 -2
  154. package/lib/search-field/index.js +4 -4
  155. package/lib/select/index.d.ts +34 -34
  156. package/lib/select/index.js +68 -81
  157. package/lib/sidebar-layout/index.d.ts +2 -2
  158. package/lib/sidebar-layout/index.js +7 -9
  159. package/lib/slider/index.d.ts +2 -2
  160. package/lib/slider/index.js +57 -45
  161. package/lib/slider/utils.d.ts +10 -10
  162. package/lib/slider/utils.js +10 -10
  163. package/lib/sparkline/index.d.ts +1 -1
  164. package/lib/sparkline/index.js +7 -8
  165. package/lib/swing-gauge/helpers.js +2 -2
  166. package/lib/swing-gauge/index.d.ts +19 -19
  167. package/lib/swing-gauge/index.js +91 -81
  168. package/lib/tab/index.d.ts +1 -1
  169. package/lib/tab/index.js +16 -27
  170. package/lib/tab/themes/halo/dark/index.js +1 -1
  171. package/lib/tab/themes/halo/light/index.js +1 -1
  172. package/lib/tab/themes/solar/charcoal/index.js +1 -1
  173. package/lib/tab/themes/solar/pearl/index.js +1 -1
  174. package/lib/tab-bar/helpers/animate.js +1 -1
  175. package/lib/tab-bar/index.d.ts +1 -1
  176. package/lib/tab-bar/index.js +34 -18
  177. package/lib/tab-bar/themes/halo/dark/index.js +1 -1
  178. package/lib/tab-bar/themes/halo/light/index.js +1 -1
  179. package/lib/text-field/index.d.ts +1 -1
  180. package/lib/text-field/index.js +34 -31
  181. package/lib/time-picker/index.d.ts +6 -6
  182. package/lib/time-picker/index.js +103 -89
  183. package/lib/toggle/index.d.ts +1 -1
  184. package/lib/toggle/index.js +4 -3
  185. package/lib/toggle/themes/halo/dark/index.js +1 -1
  186. package/lib/toggle/themes/halo/light/index.js +1 -1
  187. package/lib/toggle/themes/solar/charcoal/index.js +1 -1
  188. package/lib/toggle/themes/solar/pearl/index.js +1 -1
  189. package/lib/tooltip/elements/title-tooltip.js +2 -2
  190. package/lib/tooltip/index.d.ts +27 -27
  191. package/lib/tooltip/index.js +42 -38
  192. package/lib/tooltip/managers/tooltip-manager.d.ts +1 -1
  193. package/lib/tornado-chart/elements/tornado-chart.d.ts +1 -1
  194. package/lib/tornado-chart/elements/tornado-chart.js +2 -2
  195. package/lib/tornado-chart/elements/tornado-item.d.ts +2 -2
  196. package/lib/tornado-chart/elements/tornado-item.js +12 -10
  197. package/lib/tree/elements/tree-item.d.ts +3 -3
  198. package/lib/tree/elements/tree-item.js +21 -19
  199. package/lib/tree/elements/tree.d.ts +1 -1
  200. package/lib/tree/elements/tree.js +12 -11
  201. package/lib/tree/helpers/renderer.js +4 -3
  202. package/lib/tree/index.d.ts +1 -1
  203. package/lib/tree/managers/tree-manager.d.ts +1 -1
  204. package/lib/tree/managers/tree-manager.js +17 -18
  205. package/lib/tree/themes/solar/charcoal/index.js +1 -1
  206. package/lib/tree/themes/solar/pearl/index.js +1 -1
  207. package/lib/tree-select/index.d.ts +9 -9
  208. package/lib/tree-select/index.js +91 -82
  209. package/lib/tree-select/themes/halo/dark/index.js +1 -1
  210. package/lib/tree-select/themes/halo/light/index.js +1 -1
  211. package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
  212. package/lib/tree-select/themes/solar/pearl/index.js +1 -1
  213. package/lib/version.js +1 -1
  214. package/package.json +17 -17
  215. package/tsconfig.tsbuildinfo +1 -1
@@ -1,11 +1,11 @@
1
1
  var ButtonBar_1;
2
2
  import { __decorate } from "tslib";
3
- import { BasicElement, html, css } from '@refinitiv-ui/core';
3
+ import { BasicElement, css, html } from '@refinitiv-ui/core';
4
4
  import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
5
5
  import { property } from '@refinitiv-ui/core/decorators/property.js';
6
- import { ref, createRef } from '@refinitiv-ui/core/directives/ref.js';
7
- import { VERSION } from '../version.js';
6
+ import { createRef, ref } from '@refinitiv-ui/core/directives/ref.js';
8
7
  import { Button } from '../button/index.js';
8
+ import { VERSION } from '../version.js';
9
9
  /**
10
10
  * Used to display multiple buttons to create a list of commands bar.
11
11
  */
@@ -65,7 +65,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
65
65
  :host ::slotted(ef-button:not(:hover):not(:focus)) {
66
66
  box-shadow: none;
67
67
  }
68
- @media (pointer: coarse){
68
+ @media (pointer: coarse) {
69
69
  :host ::slotted(ef-button) {
70
70
  box-shadow: none;
71
71
  }
@@ -146,7 +146,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
146
146
  if (buttons.length <= 0) {
147
147
  return;
148
148
  }
149
- const focusedButtonIndex = buttons.findIndex(button => button === document.activeElement);
149
+ const focusedButtonIndex = buttons.findIndex((button) => button === document.activeElement);
150
150
  const nextButton = direction === 'next'
151
151
  ? buttons[focusedButtonIndex + 1] || buttons[0]
152
152
  : buttons[focusedButtonIndex - 1] || buttons[buttons.length - 1];
@@ -200,7 +200,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
200
200
  const buttons = this.getFocusableButtons();
201
201
  if (buttons && buttons.length > 0) {
202
202
  // Set tabindex=0 to previous focused button when new button added If not found set it to first button instead
203
- let focusedButtonIndex = buttons.findIndex(button => document.activeElement === button);
203
+ let focusedButtonIndex = buttons.findIndex((button) => document.activeElement === button);
204
204
  if (focusedButtonIndex === -1) {
205
205
  focusedButtonIndex = 0;
206
206
  }
@@ -238,11 +238,11 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
238
238
  */
239
239
  manageButtons(targetButton) {
240
240
  const managedButtons = this.getManagedButtons();
241
- const isTargetOfManaged = managedButtons.some(managedButton => managedButton === targetButton);
241
+ const isTargetOfManaged = managedButtons.some((managedButton) => managedButton === targetButton);
242
242
  if (!isTargetOfManaged) {
243
243
  return;
244
244
  }
245
- managedButtons.forEach(managedButton => {
245
+ managedButtons.forEach((managedButton) => {
246
246
  managedButton.active = managedButton === targetButton;
247
247
  });
248
248
  }
@@ -251,14 +251,14 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
251
251
  * @returns the array of Element of the default slot
252
252
  */
253
253
  getElementsOfSlot() {
254
- return this.defaultSlot.value?.assignedNodes().filter(node => node instanceof Element);
254
+ return this.defaultSlot.value?.assignedNodes().filter((node) => node instanceof Element);
255
255
  }
256
256
  /**
257
257
  * Return the array of Buttons which focusable
258
258
  * @returns the array of focusable Buttons
259
259
  */
260
260
  getFocusableButtons() {
261
- return [...this.querySelectorAll('ef-button,coral-button')].filter(button => !button.disabled);
261
+ return [...this.querySelectorAll('ef-button,coral-button')].filter((button) => !button.disabled);
262
262
  }
263
263
  /**
264
264
  * Filter Button classes by the toggles property
@@ -267,7 +267,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
267
267
  */
268
268
  getManagedButtons() {
269
269
  const elements = this.getElementsOfSlot();
270
- return elements.filter(element => element instanceof Button && element.toggles);
270
+ return elements.filter((element) => element instanceof Button && element.toggles);
271
271
  }
272
272
  /**
273
273
  * A `TemplateResult` that will be used
@@ -275,7 +275,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
275
275
  * @return {TemplateResult} Render template
276
276
  */
277
277
  render() {
278
- return html `<slot ${ref(this.defaultSlot)} ></slot>`;
278
+ return html `<slot ${ref(this.defaultSlot)}></slot>`;
279
279
  }
280
280
  };
281
281
  __decorate([
@@ -1,10 +1,10 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { ControlElement, TemplateResult, CSSResultGroup, PropertyValues, MultiValue } from '@refinitiv-ui/core';
2
+ import { CSSResultGroup, ControlElement, MultiValue, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
+ import '@refinitiv-ui/phrasebook/locale/en/calendar.js';
3
4
  import { TranslateDirective, TranslatePromise } from '@refinitiv-ui/translate';
4
- import type { CalendarFilter } from './types';
5
- import './locales.js';
6
5
  import '../button/index.js';
7
- import '@refinitiv-ui/phrasebook/locale/en/calendar.js';
6
+ import './locales.js';
7
+ import type { CalendarFilter } from './types';
8
8
  export { CalendarFilter };
9
9
  /**
10
10
  * Standard calendar element
@@ -40,39 +40,39 @@ export declare class Calendar extends ControlElement implements MultiValue {
40
40
  private viewBtnRef;
41
41
  private _min;
42
42
  /**
43
- * Set minimum date
44
- * @param min min date
45
- * @default -
46
- */
43
+ * Set minimum date
44
+ * @param min min date
45
+ * @default -
46
+ */
47
47
  set min(min: string);
48
48
  get min(): string;
49
49
  private _max;
50
50
  /**
51
- * Set maximum date
52
- * @param max max date
53
- * @default -
54
- */
51
+ * Set maximum date
52
+ * @param max max date
53
+ * @default -
54
+ */
55
55
  set max(max: string);
56
56
  get max(): string;
57
57
  /**
58
- * Only enable weekdays
59
- */
58
+ * Only enable weekdays
59
+ */
60
60
  weekdaysOnly: boolean;
61
61
  /**
62
- * Only enable weekends
63
- */
62
+ * Only enable weekends
63
+ */
64
64
  weekendsOnly: boolean;
65
65
  /**
66
- * Custom filter, used for enabling/disabling certain dates
67
- * @type {CalendarFilter | null}
68
- */
66
+ * Custom filter, used for enabling/disabling certain dates
67
+ * @type {CalendarFilter | null}
68
+ */
69
69
  filter: CalendarFilter | null;
70
70
  private _view;
71
71
  /**
72
- * Current calendar view date
73
- * @param view view date
74
- * @default -
75
- */
72
+ * Current calendar view date
73
+ * @param view view date
74
+ * @default -
75
+ */
76
76
  set view(view: string);
77
77
  get view(): string;
78
78
  private localFirstDayOfWeek;
@@ -89,18 +89,18 @@ export declare class Calendar extends ControlElement implements MultiValue {
89
89
  set firstDayOfWeek(firstDayOfWeek: number);
90
90
  get firstDayOfWeek(): number;
91
91
  /**
92
- * Set to switch to range select mode
93
- */
92
+ * Set to switch to range select mode
93
+ */
94
94
  range: boolean;
95
95
  /**
96
- * Set to switch to multiple select mode
97
- */
96
+ * Set to switch to multiple select mode
97
+ */
98
98
  multiple: boolean;
99
99
  /**
100
- * Current date time value
101
- * @param value Calendar value
102
- * @default -
103
- */
100
+ * Current date time value
101
+ * @param value Calendar value
102
+ * @default -
103
+ */
104
104
  set value(value: string);
105
105
  get value(): string;
106
106
  private _values;
@@ -186,10 +186,10 @@ export declare class Calendar extends ControlElement implements MultiValue {
186
186
  */
187
187
  protected willUpdate(changedProperties: PropertyValues): void;
188
188
  /**
189
- * Updates the element
190
- * @param changedProperties Properties that has changed
191
- * @returns {void}
192
- */
189
+ * Updates the element
190
+ * @param changedProperties Properties that has changed
191
+ * @returns {void}
192
+ */
193
193
  protected update(changedProperties: PropertyValues): void;
194
194
  /**
195
195
  * Called after render life-cycle finished
@@ -216,10 +216,10 @@ export declare class Calendar extends ControlElement implements MultiValue {
216
216
  */
217
217
  protected warnInvalidValue(value: string): void;
218
218
  /**
219
- * Validate that the value confirms the control type
220
- * @param value Value to check
221
- * @returns false if value is invalid
222
- */
219
+ * Validate that the value confirms the control type
220
+ * @param value Value to check
221
+ * @returns false if value is invalid
222
+ */
223
223
  protected isValidValue(value: string): boolean;
224
224
  /**
225
225
  * A helper method to make sure that only valid values are passed