@refinitiv-ui/elements 6.8.8 → 6.8.10

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 (216) hide show
  1. package/CHANGELOG.md +181 -440
  2. package/LICENSE +1 -1
  3. package/README.md +12 -10
  4. package/lib/accordion/index.d.ts +1 -1
  5. package/lib/accordion/index.js +4 -7
  6. package/lib/appstate-bar/index.d.ts +2 -2
  7. package/lib/appstate-bar/index.js +10 -4
  8. package/lib/autosuggest/index.d.ts +7 -7
  9. package/lib/autosuggest/index.js +85 -80
  10. package/lib/autosuggest/themes/solar/charcoal/index.js +1 -1
  11. package/lib/autosuggest/themes/solar/pearl/index.js +1 -1
  12. package/lib/button/index.js +7 -10
  13. package/lib/button-bar/index.d.ts +1 -1
  14. package/lib/button-bar/index.js +12 -12
  15. package/lib/calendar/index.d.ts +39 -39
  16. package/lib/calendar/index.js +160 -125
  17. package/lib/calendar/utils.js +2 -2
  18. package/lib/canvas/index.d.ts +1 -1
  19. package/lib/canvas/index.js +2 -4
  20. package/lib/card/helpers/types.d.ts +2 -2
  21. package/lib/card/index.d.ts +5 -5
  22. package/lib/card/index.js +34 -28
  23. package/lib/chart/helpers/legend.js +10 -8
  24. package/lib/chart/index.d.ts +3 -3
  25. package/lib/chart/index.js +17 -17
  26. package/lib/chart/plugins/doughnut-center-label.js +6 -5
  27. package/lib/checkbox/index.d.ts +1 -1
  28. package/lib/checkbox/index.js +12 -13
  29. package/lib/clock/index.d.ts +55 -55
  30. package/lib/clock/index.js +84 -95
  31. package/lib/clock/themes/halo/dark/index.js +1 -1
  32. package/lib/clock/themes/halo/light/index.js +1 -1
  33. package/lib/clock/themes/solar/charcoal/index.js +1 -1
  34. package/lib/clock/themes/solar/pearl/index.js +1 -1
  35. package/lib/collapse/index.d.ts +1 -1
  36. package/lib/collapse/index.js +28 -19
  37. package/lib/collapse/themes/halo/dark/index.js +1 -1
  38. package/lib/collapse/themes/halo/light/index.js +1 -1
  39. package/lib/color-dialog/elements/color-palettes.d.ts +1 -1
  40. package/lib/color-dialog/elements/color-palettes.js +5 -6
  41. package/lib/color-dialog/elements/grayscale-palettes.d.ts +1 -1
  42. package/lib/color-dialog/elements/grayscale-palettes.js +9 -9
  43. package/lib/color-dialog/elements/palettes.js +5 -4
  44. package/lib/color-dialog/helpers/value-model.js +7 -9
  45. package/lib/color-dialog/index.d.ts +6 -6
  46. package/lib/color-dialog/index.js +53 -37
  47. package/lib/color-picker/index.d.ts +2 -2
  48. package/lib/color-picker/index.js +40 -34
  49. package/lib/combo-box/helpers/filter.d.ts +2 -2
  50. package/lib/combo-box/helpers/types.d.ts +1 -1
  51. package/lib/combo-box/index.d.ts +9 -9
  52. package/lib/combo-box/index.js +61 -55
  53. package/lib/configuration/elements/configuration.js +2 -2
  54. package/lib/counter/index.d.ts +4 -4
  55. package/lib/counter/index.js +9 -7
  56. package/lib/datetime-field/index.d.ts +4 -5
  57. package/lib/datetime-field/index.js +32 -23
  58. package/lib/datetime-field/utils.js +11 -1
  59. package/lib/datetime-picker/index.d.ts +75 -75
  60. package/lib/datetime-picker/index.js +151 -132
  61. package/lib/datetime-picker/locales.js +5 -5
  62. package/lib/datetime-picker/utils.js +9 -9
  63. package/lib/dialog/draggable-element.js +1 -2
  64. package/lib/dialog/index.d.ts +6 -6
  65. package/lib/dialog/index.js +48 -38
  66. package/lib/email-field/index.d.ts +1 -1
  67. package/lib/email-field/index.js +6 -6
  68. package/lib/events.d.ts +1 -1
  69. package/lib/flag/index.d.ts +1 -1
  70. package/lib/flag/index.js +6 -5
  71. package/lib/flag/utils/FlagLoader.js +1 -1
  72. package/lib/header/index.d.ts +1 -1
  73. package/lib/header/index.js +2 -2
  74. package/lib/header/themes/halo/dark/index.js +1 -1
  75. package/lib/header/themes/halo/light/index.js +1 -1
  76. package/lib/header/themes/solar/charcoal/index.js +1 -1
  77. package/lib/header/themes/solar/pearl/index.js +1 -1
  78. package/lib/heatmap/helpers/color.d.ts +1 -1
  79. package/lib/heatmap/helpers/color.js +11 -5
  80. package/lib/heatmap/helpers/track.js +3 -3
  81. package/lib/heatmap/index.d.ts +9 -9
  82. package/lib/heatmap/index.js +51 -42
  83. package/lib/icon/index.d.ts +2 -2
  84. package/lib/icon/index.js +6 -8
  85. package/lib/icon/utils/IconLoader.d.ts +1 -0
  86. package/lib/icon/utils/IconLoader.js +9 -1
  87. package/lib/interactive-chart/helpers/types.d.ts +3 -3
  88. package/lib/interactive-chart/index.d.ts +34 -34
  89. package/lib/interactive-chart/index.js +72 -57
  90. package/lib/item/helpers/types.d.ts +1 -1
  91. package/lib/item/index.d.ts +3 -3
  92. package/lib/item/index.js +24 -20
  93. package/lib/jsx.d.ts +6 -4
  94. package/lib/label/index.d.ts +1 -1
  95. package/lib/label/index.js +11 -8
  96. package/lib/layout/index.d.ts +7 -7
  97. package/lib/layout/index.js +7 -7
  98. package/lib/led-gauge/index.d.ts +1 -1
  99. package/lib/led-gauge/index.js +10 -10
  100. package/lib/list/elements/list.d.ts +3 -3
  101. package/lib/list/elements/list.js +10 -12
  102. package/lib/list/helpers/renderer.js +2 -2
  103. package/lib/list/helpers/types.d.ts +1 -1
  104. package/lib/list/index.d.ts +1 -1
  105. package/lib/list/renderer.d.ts +7 -7
  106. package/lib/loader/index.js +7 -8
  107. package/lib/multi-input/index.d.ts +6 -6
  108. package/lib/multi-input/index.js +39 -45
  109. package/lib/notification/elements/notification-tray.d.ts +2 -2
  110. package/lib/notification/elements/notification-tray.js +3 -3
  111. package/lib/notification/elements/notification.d.ts +2 -2
  112. package/lib/notification/elements/notification.js +17 -14
  113. package/lib/notification/helpers/status.js +1 -1
  114. package/lib/notification/themes/halo/dark/index.js +1 -1
  115. package/lib/notification/themes/halo/light/index.js +1 -1
  116. package/lib/notification/themes/solar/charcoal/index.js +1 -1
  117. package/lib/notification/themes/solar/pearl/index.js +1 -1
  118. package/lib/number-field/index.d.ts +5 -6
  119. package/lib/number-field/index.js +37 -47
  120. package/lib/overlay/elements/overlay-viewport.d.ts +1 -1
  121. package/lib/overlay/elements/overlay.d.ts +2 -2
  122. package/lib/overlay/elements/overlay.js +154 -98
  123. package/lib/overlay/helpers/types.d.ts +1 -1
  124. package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
  125. package/lib/overlay/managers/backdrop-manager.js +2 -2
  126. package/lib/overlay/managers/close-manager.js +2 -1
  127. package/lib/overlay/managers/focus-manager.js +23 -13
  128. package/lib/overlay/managers/interaction-lock-manager.d.ts +4 -4
  129. package/lib/overlay/managers/interaction-lock-manager.js +33 -25
  130. package/lib/overlay/managers/viewport-manager.d.ts +2 -2
  131. package/lib/overlay/managers/viewport-manager.js +3 -2
  132. package/lib/overlay/managers/zindex-manager.js +4 -2
  133. package/lib/overlay-menu/helpers/types.d.ts +2 -2
  134. package/lib/overlay-menu/index.d.ts +1 -1
  135. package/lib/overlay-menu/index.js +44 -33
  136. package/lib/overlay-menu/managers/menu-manager.d.ts +10 -10
  137. package/lib/overlay-menu/managers/menu-manager.js +15 -13
  138. package/lib/pagination/index.d.ts +4 -4
  139. package/lib/pagination/index.js +39 -14
  140. package/lib/panel/index.js +1 -1
  141. package/lib/password-field/index.d.ts +2 -2
  142. package/lib/password-field/index.js +4 -4
  143. package/lib/pill/index.d.ts +1 -1
  144. package/lib/pill/index.js +22 -19
  145. package/lib/progress-bar/index.d.ts +1 -1
  146. package/lib/progress-bar/index.js +38 -37
  147. package/lib/radio-button/index.d.ts +2 -2
  148. package/lib/radio-button/index.js +17 -12
  149. package/lib/radio-button/radio-button-registry.js +8 -5
  150. package/lib/rating/index.d.ts +1 -1
  151. package/lib/rating/index.js +2 -5
  152. package/lib/rating/utils.d.ts +6 -6
  153. package/lib/rating/utils.js +6 -6
  154. package/lib/search-field/index.d.ts +2 -2
  155. package/lib/search-field/index.js +4 -4
  156. package/lib/select/index.d.ts +34 -34
  157. package/lib/select/index.js +69 -82
  158. package/lib/sidebar-layout/index.d.ts +2 -2
  159. package/lib/sidebar-layout/index.js +7 -9
  160. package/lib/slider/index.d.ts +2 -2
  161. package/lib/slider/index.js +57 -45
  162. package/lib/slider/utils.d.ts +10 -10
  163. package/lib/slider/utils.js +10 -10
  164. package/lib/sparkline/index.d.ts +1 -1
  165. package/lib/sparkline/index.js +7 -8
  166. package/lib/swing-gauge/helpers.js +2 -2
  167. package/lib/swing-gauge/index.d.ts +19 -19
  168. package/lib/swing-gauge/index.js +91 -81
  169. package/lib/tab/index.d.ts +1 -1
  170. package/lib/tab/index.js +16 -27
  171. package/lib/tab/themes/halo/dark/index.js +1 -1
  172. package/lib/tab/themes/halo/light/index.js +1 -1
  173. package/lib/tab/themes/solar/charcoal/index.js +1 -1
  174. package/lib/tab/themes/solar/pearl/index.js +1 -1
  175. package/lib/tab-bar/helpers/animate.js +1 -1
  176. package/lib/tab-bar/index.d.ts +1 -1
  177. package/lib/tab-bar/index.js +34 -18
  178. package/lib/tab-bar/themes/halo/dark/index.js +1 -1
  179. package/lib/tab-bar/themes/halo/light/index.js +1 -1
  180. package/lib/text-field/index.d.ts +1 -1
  181. package/lib/text-field/index.js +36 -33
  182. package/lib/time-picker/index.d.ts +6 -6
  183. package/lib/time-picker/index.js +104 -90
  184. package/lib/toggle/index.d.ts +1 -1
  185. package/lib/toggle/index.js +4 -3
  186. package/lib/toggle/themes/halo/dark/index.js +1 -1
  187. package/lib/toggle/themes/halo/light/index.js +1 -1
  188. package/lib/toggle/themes/solar/charcoal/index.js +1 -1
  189. package/lib/toggle/themes/solar/pearl/index.js +1 -1
  190. package/lib/tooltip/elements/title-tooltip.js +2 -2
  191. package/lib/tooltip/index.d.ts +27 -27
  192. package/lib/tooltip/index.js +42 -38
  193. package/lib/tooltip/managers/tooltip-manager.d.ts +1 -1
  194. package/lib/tornado-chart/elements/tornado-chart.d.ts +1 -1
  195. package/lib/tornado-chart/elements/tornado-chart.js +1 -1
  196. package/lib/tornado-chart/elements/tornado-item.d.ts +2 -2
  197. package/lib/tornado-chart/elements/tornado-item.js +12 -10
  198. package/lib/tree/elements/tree-item.d.ts +3 -3
  199. package/lib/tree/elements/tree-item.js +21 -19
  200. package/lib/tree/elements/tree.d.ts +1 -1
  201. package/lib/tree/elements/tree.js +12 -11
  202. package/lib/tree/helpers/renderer.js +4 -3
  203. package/lib/tree/index.d.ts +1 -1
  204. package/lib/tree/managers/tree-manager.d.ts +1 -1
  205. package/lib/tree/managers/tree-manager.js +17 -18
  206. package/lib/tree/themes/solar/charcoal/index.js +1 -1
  207. package/lib/tree/themes/solar/pearl/index.js +1 -1
  208. package/lib/tree-select/index.d.ts +9 -9
  209. package/lib/tree-select/index.js +91 -82
  210. package/lib/tree-select/themes/halo/dark/index.js +1 -1
  211. package/lib/tree-select/themes/halo/light/index.js +1 -1
  212. package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
  213. package/lib/tree-select/themes/solar/pearl/index.js +1 -1
  214. package/lib/version.js +1 -1
  215. package/package.json +17 -17
  216. 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
  }
@@ -151,7 +151,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
151
151
  if (buttons.length <= 0) {
152
152
  return;
153
153
  }
154
- const focusedButtonIndex = buttons.findIndex(button => button === document.activeElement);
154
+ const focusedButtonIndex = buttons.findIndex((button) => button === document.activeElement);
155
155
  const nextButton = direction === 'next'
156
156
  ? buttons[focusedButtonIndex + 1] || buttons[0]
157
157
  : buttons[focusedButtonIndex - 1] || buttons[buttons.length - 1];
@@ -205,7 +205,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
205
205
  const buttons = this.getFocusableButtons();
206
206
  if (buttons && buttons.length > 0) {
207
207
  // Set tabindex=0 to previous focused button when new button added If not found set it to first button instead
208
- let focusedButtonIndex = buttons.findIndex(button => document.activeElement === button);
208
+ let focusedButtonIndex = buttons.findIndex((button) => document.activeElement === button);
209
209
  if (focusedButtonIndex === -1) {
210
210
  focusedButtonIndex = 0;
211
211
  }
@@ -243,11 +243,11 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
243
243
  */
244
244
  manageButtons(targetButton) {
245
245
  const managedButtons = this.getManagedButtons();
246
- const isTargetOfManaged = managedButtons.some(managedButton => managedButton === targetButton);
246
+ const isTargetOfManaged = managedButtons.some((managedButton) => managedButton === targetButton);
247
247
  if (!isTargetOfManaged) {
248
248
  return;
249
249
  }
250
- managedButtons.forEach(managedButton => {
250
+ managedButtons.forEach((managedButton) => {
251
251
  managedButton.active = managedButton === targetButton;
252
252
  });
253
253
  }
@@ -256,14 +256,14 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
256
256
  * @returns the array of Element of the default slot
257
257
  */
258
258
  getElementsOfSlot() {
259
- return this.defaultSlot.value?.assignedNodes().filter(node => node instanceof Element);
259
+ return this.defaultSlot.value?.assignedNodes().filter((node) => node instanceof Element);
260
260
  }
261
261
  /**
262
262
  * Return the array of Buttons which focusable
263
263
  * @returns the array of focusable Buttons
264
264
  */
265
265
  getFocusableButtons() {
266
- return [...this.querySelectorAll('ef-button,coral-button')].filter(button => !button.disabled);
266
+ return [...this.querySelectorAll('ef-button,coral-button')].filter((button) => !button.disabled);
267
267
  }
268
268
  /**
269
269
  * Filter Button classes by the toggles property
@@ -272,7 +272,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
272
272
  */
273
273
  getManagedButtons() {
274
274
  const elements = this.getElementsOfSlot();
275
- return elements.filter(element => element instanceof Button && element.toggles);
275
+ return elements.filter((element) => element instanceof Button && element.toggles);
276
276
  }
277
277
  /**
278
278
  * A `TemplateResult` that will be used
@@ -280,7 +280,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
280
280
  * @return {TemplateResult} Render template
281
281
  */
282
282
  render() {
283
- return html `<slot ${ref(this.defaultSlot)} ></slot>`;
283
+ return html `<slot ${ref(this.defaultSlot)}></slot>`;
284
284
  }
285
285
  };
286
286
  __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