@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
package/lib/pill/index.js CHANGED
@@ -2,11 +2,11 @@ import { __decorate } from "tslib";
2
2
  import { ControlElement, css, html } from '@refinitiv-ui/core';
3
3
  import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
4
  import { property } from '@refinitiv-ui/core/decorators/property.js';
5
- import { registerOverflowTooltip } from '../tooltip/index.js';
6
- import { isElementOverflown } from '@refinitiv-ui/utils/element.js';
7
5
  import { createRef, ref } from '@refinitiv-ui/core/directives/ref.js';
8
- import { VERSION } from '../version.js';
6
+ import { isElementOverflown } from '@refinitiv-ui/utils/element.js';
9
7
  import '../icon/index.js';
8
+ import { registerOverflowTooltip } from '../tooltip/index.js';
9
+ import { VERSION } from '../version.js';
10
10
  /**
11
11
  * A small button style component
12
12
  * which is used to show one or multiple selected item.
@@ -69,15 +69,15 @@ let Pill = class Pill extends ControlElement {
69
69
  */
70
70
  static get styles() {
71
71
  return css `
72
- :host {
73
- display: inline-block;
74
- position: relative;
75
- }
76
- [part=content] {
77
- text-overflow: ellipsis;
78
- white-space: nowrap;
79
- overflow: hidden;
80
- }
72
+ :host {
73
+ display: inline-block;
74
+ position: relative;
75
+ }
76
+ [part='content'] {
77
+ text-overflow: ellipsis;
78
+ white-space: nowrap;
79
+ overflow: hidden;
80
+ }
81
81
  `;
82
82
  }
83
83
  firstUpdated(changedProperties) {
@@ -112,17 +112,20 @@ let Pill = class Pill extends ControlElement {
112
112
  * @returns {void}
113
113
  */
114
114
  onKeyDown(event) {
115
- if (event.key === 'Delete' && (this.clears && !this.readonly)) {
115
+ if (event.key === 'Delete' && this.clears && !this.readonly) {
116
116
  this.dispatchEvent(new CustomEvent('clear'));
117
117
  }
118
118
  }
119
119
  get closeTemplate() {
120
- return this.clears && !this.readonly ? html `<ef-icon
121
- ${ref(this.closeIconRef)}
122
- part="close"
123
- icon="cross"
124
- aria-hidden="true"
125
- @tap="${this.clear}"></ef-icon>` : null;
120
+ return this.clears && !this.readonly
121
+ ? html `<ef-icon
122
+ ${ref(this.closeIconRef)}
123
+ part="close"
124
+ icon="cross"
125
+ aria-hidden="true"
126
+ @tap="${this.clear}"
127
+ ></ef-icon>`
128
+ : null;
126
129
  }
127
130
  /**
128
131
  * A `TemplateResult` that will be used
@@ -1,5 +1,5 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { CSSResultGroup, TemplateResult, BasicElement, PropertyValues } from '@refinitiv-ui/core';
2
+ import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
3
  /**
4
4
  * Data visualisation component,
5
5
  * showing a simple percentage bar.
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { css, html, BasicElement } from '@refinitiv-ui/core';
2
+ import { BasicElement, css, html } from '@refinitiv-ui/core';
3
3
  import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
4
  import { property } from '@refinitiv-ui/core/decorators/property.js';
5
5
  import { styleMap } from '@refinitiv-ui/core/directives/style-map.js';
@@ -45,36 +45,36 @@ let ProgressBar = class ProgressBar extends BasicElement {
45
45
  */
46
46
  static get styles() {
47
47
  return css `
48
- :host {
49
- height: 10px;
50
- display: flex;
51
- position: relative;
52
- }
53
- [part~=bar] {
54
- height: 100%;
55
- position: relative;
56
- }
57
- [part=label] {
58
- position: absolute;
59
- top: 50%;
60
- left: 100%;
61
- height: 0;
62
- line-height: 0;
63
- white-space: nowrap;
64
- margin-left: 10px;
65
- }
66
- :host([alignment=right]) {
67
- justify-content: flex-end;
68
- }
69
- :host([alignment=right]) [part=label] {
70
- left: auto;
71
- right: 100%;
72
- margin-left: 0;
73
- margin-right: 10px;
74
- }
75
- :host [part~=bar-zero] [part=label] {
76
- margin: 0;
77
- }
48
+ :host {
49
+ height: 10px;
50
+ display: flex;
51
+ position: relative;
52
+ }
53
+ [part~='bar'] {
54
+ height: 100%;
55
+ position: relative;
56
+ }
57
+ [part='label'] {
58
+ position: absolute;
59
+ top: 50%;
60
+ left: 100%;
61
+ height: 0;
62
+ line-height: 0;
63
+ white-space: nowrap;
64
+ margin-left: 10px;
65
+ }
66
+ :host([alignment='right']) {
67
+ justify-content: flex-end;
68
+ }
69
+ :host([alignment='right']) [part='label'] {
70
+ left: auto;
71
+ right: 100%;
72
+ margin-left: 0;
73
+ margin-right: 10px;
74
+ }
75
+ :host [part~='bar-zero'] [part='label'] {
76
+ margin: 0;
77
+ }
78
78
  `;
79
79
  }
80
80
  /**
@@ -83,7 +83,8 @@ let ProgressBar = class ProgressBar extends BasicElement {
83
83
  */
84
84
  get valueNumber() {
85
85
  const value = parseFloat(this.value);
86
- if (!this.value || isNaN(value)) { // check value is invalid
86
+ if (!this.value || isNaN(value)) {
87
+ // check value is invalid
87
88
  const valuePrevious = parseFloat(this.valuePrevious);
88
89
  // if valuePrevious is invalid return default value 100
89
90
  return !valuePrevious || isNaN(valuePrevious) ? 100 : valuePrevious;
@@ -132,11 +133,11 @@ let ProgressBar = class ProgressBar extends BasicElement {
132
133
  */
133
134
  render() {
134
135
  return html `
135
- <div part="${this.barParts}" style="${styleMap(this.barStyle)}">
136
- <span part="label">
137
- <slot name="label">${this.label}</slot>
138
- </span>
139
- </div>
136
+ <div part="${this.barParts}" style="${styleMap(this.barStyle)}">
137
+ <span part="label">
138
+ <slot name="label">${this.label}</slot>
139
+ </span>
140
+ </div>
140
141
  `;
141
142
  }
142
143
  };
@@ -1,5 +1,5 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { CSSResultGroup, ControlElement, TemplateResult, PropertyValues } from '@refinitiv-ui/core';
2
+ import { CSSResultGroup, ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
3
  /**
4
4
  * Basic radio button
5
5
  *
@@ -7,7 +7,7 @@ import { CSSResultGroup, ControlElement, TemplateResult, PropertyValues } from '
7
7
  *
8
8
  * @attr {string} value - Value of the radio button
9
9
  * @prop {string} [value=""] - Value of the radio button
10
- *
10
+ *
11
11
  * @attr {string} name - Group multiple radio buttons by assigning the same name
12
12
  * @prop {string} [name=""] - Group multiple radio buttons by assigning the same name
13
13
  *
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
- import { html, css, ControlElement } from '@refinitiv-ui/core';
2
+ import { ControlElement, css, html } from '@refinitiv-ui/core';
3
3
  import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
4
  import { property } from '@refinitiv-ui/core/decorators/property.js';
5
5
  import { query } from '@refinitiv-ui/core/decorators/query.js';
6
- import { VERSION } from '../version.js';
7
6
  import { registerOverflowTooltip } from '../tooltip/index.js';
8
- import { applyRegistry, removeFromRegistry, getRadioGroup } from './radio-button-registry.js';
7
+ import { VERSION } from '../version.js';
8
+ import { applyRegistry, getRadioGroup, removeFromRegistry } from './radio-button-registry.js';
9
9
  /**
10
10
  * Basic radio button
11
11
  *
@@ -13,7 +13,7 @@ import { applyRegistry, removeFromRegistry, getRadioGroup } from './radio-button
13
13
  *
14
14
  * @attr {string} value - Value of the radio button
15
15
  * @prop {string} [value=""] - Value of the radio button
16
- *
16
+ *
17
17
  * @attr {string} name - Group multiple radio buttons by assigning the same name
18
18
  * @prop {string} [name=""] - Group multiple radio buttons by assigning the same name
19
19
  *
@@ -50,21 +50,22 @@ let RadioButton = class RadioButton extends ControlElement {
50
50
  :host {
51
51
  display: inline-block;
52
52
  }
53
- [part=check] {
53
+ [part='check'] {
54
54
  visibility: hidden;
55
55
  }
56
- :host([checked]) [part=check] {
56
+ :host([checked]) [part='check'] {
57
57
  visibility: inherit;
58
58
  }
59
- [part=label],
60
- [part=container] {
59
+ [part='label'],
60
+ [part='container'] {
61
61
  display: inline-block;
62
62
  white-space: nowrap;
63
63
  vertical-align: middle;
64
64
  overflow: hidden;
65
65
  text-overflow: ellipsis;
66
66
  }
67
- :host(:empty) [part=label], [part=label]:empty {
67
+ :host(:empty) [part='label'],
68
+ [part='label']:empty {
68
69
  display: none;
69
70
  }
70
71
  `;
@@ -107,7 +108,9 @@ let RadioButton = class RadioButton extends ControlElement {
107
108
  applyRegistry(this, changedProperties.get('name'));
108
109
  }
109
110
  // Ensure only one radio button is checked
110
- if (this.isConnected && this.hasUpdated && (changedProperties.has('checked') || (changedProperties.has('name')))) {
111
+ if (this.isConnected &&
112
+ this.hasUpdated &&
113
+ (changedProperties.has('checked') || changedProperties.has('name'))) {
111
114
  this.manageGroupState();
112
115
  }
113
116
  super.updated(changedProperties);
@@ -131,7 +134,9 @@ let RadioButton = class RadioButton extends ControlElement {
131
134
  if (this.checked && this.name) {
132
135
  // restore tab index when checked
133
136
  this.tabIndex = 0;
134
- getRadioGroup(this).filter(radio => radio !== this).forEach(radio => {
137
+ getRadioGroup(this)
138
+ .filter((radio) => radio !== this)
139
+ .forEach((radio) => {
135
140
  // uncheck and hide the rest of the group members from focusability
136
141
  radio.checked = false;
137
142
  radio.tabIndex = -1;
@@ -199,7 +204,7 @@ let RadioButton = class RadioButton extends ControlElement {
199
204
  if (!this.name) {
200
205
  return;
201
206
  }
202
- const group = getRadioGroup(this).filter(radio => !radio.disabled);
207
+ const group = getRadioGroup(this).filter((radio) => !radio.disabled);
203
208
  const index = group.indexOf(this);
204
209
  let element;
205
210
  if (direction === 'next') {
@@ -1,3 +1,4 @@
1
+ // Keeps registration records of radio button group per its name
1
2
  import { getElementScope } from '@refinitiv-ui/utils/element.js';
2
3
  const registry = [];
3
4
  /**
@@ -36,7 +37,7 @@ const applyRegistry = (radio, oldGroupName = '') => {
36
37
  removeFromRegistry(radio);
37
38
  radio.tabIndex = 0; // Restores tabIndex and switch to single mode
38
39
  // Re-compute tabIndex for old radio group
39
- const oldRadioGroup = registry.filter(radio => radio.name === oldGroupName);
40
+ const oldRadioGroup = registry.filter((radio) => radio.name === oldGroupName);
40
41
  restoreTabIndex(oldRadioGroup);
41
42
  }
42
43
  // Changes group
@@ -46,7 +47,9 @@ const applyRegistry = (radio, oldGroupName = '') => {
46
47
  if (radio.checked) {
47
48
  radio.tabIndex = 0;
48
49
  // uncheck and hide the rest of the group members from focusability
49
- newRadioGroup.filter((newRadio) => newRadio !== radio).forEach(newRadio => {
50
+ newRadioGroup
51
+ .filter((newRadio) => newRadio !== radio)
52
+ .forEach((newRadio) => {
50
53
  newRadio.checked = false;
51
54
  newRadio.tabIndex = -1;
52
55
  });
@@ -56,7 +59,7 @@ const applyRegistry = (radio, oldGroupName = '') => {
56
59
  restoreTabIndex(newRadioGroup);
57
60
  }
58
61
  // Re-compute tabIndex for old radio group when name attribute has changed.
59
- const oldRadioGroup = registry.filter(radio => radio.name === oldGroupName);
62
+ const oldRadioGroup = registry.filter((radio) => radio.name === oldGroupName);
60
63
  restoreTabIndex(oldRadioGroup);
61
64
  }
62
65
  };
@@ -71,7 +74,7 @@ const restoreTabIndex = (radioGroup) => {
71
74
  if (!radioGroup.length) {
72
75
  return;
73
76
  }
74
- const checkedRadio = radioGroup.filter(radio => radio.checked);
77
+ const checkedRadio = radioGroup.filter((radio) => radio.checked);
75
78
  if (checkedRadio.length) {
76
79
  return;
77
80
  }
@@ -90,6 +93,6 @@ const getRadioGroup = (radio) => {
90
93
  }
91
94
  const groupName = radio.name;
92
95
  const rootNode = getElementScope(radio);
93
- return registry.filter(radio => rootNode === getElementScope(radio) && radio.name === groupName);
96
+ return registry.filter((radio) => rootNode === getElementScope(radio) && radio.name === groupName);
94
97
  };
95
98
  export { applyRegistry, removeFromRegistry, getRadioGroup };
@@ -1,5 +1,5 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { BasicElement, TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
2
+ import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
3
  /**
4
4
  * Star visualisation component that is generally used for ranking
5
5
  * @fires value-changed - Fired when the user commits a value change. The event is not triggered if `value` property is changed programmatically.
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { BasicElement, html, css } from '@refinitiv-ui/core';
2
+ import { BasicElement, css, html } from '@refinitiv-ui/core';
3
3
  import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
4
  import { property } from '@refinitiv-ui/core/decorators/property.js';
5
5
  import { VERSION } from '../version.js';
@@ -259,10 +259,7 @@ let Rating = class Rating extends BasicElement {
259
259
  * @return Render template
260
260
  */
261
261
  render() {
262
- return html `
263
- <div part="container">
264
- ${this.starsTemplate}
265
- </div>`;
262
+ return html ` <div part="container">${this.starsTemplate}</div>`;
266
263
  }
267
264
  };
268
265
  __decorate([
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Return value that never exceed the maximum boundary
3
- * @param value value for check clamp
4
- * @param min max value
5
- * @param max min value
6
- * @returns number between two numbers
7
- */
2
+ * Return value that never exceed the maximum boundary
3
+ * @param value value for check clamp
4
+ * @param min max value
5
+ * @param max min value
6
+ * @returns number between two numbers
7
+ */
8
8
  declare const clamp: (value: number, min: number, max: number) => number;
9
9
  export { clamp };
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Return value that never exceed the maximum boundary
3
- * @param value value for check clamp
4
- * @param min max value
5
- * @param max min value
6
- * @returns number between two numbers
7
- */
2
+ * Return value that never exceed the maximum boundary
3
+ * @param value value for check clamp
4
+ * @param min max value
5
+ * @param max min value
6
+ * @returns number between two numbers
7
+ */
8
8
  const clamp = function (value, min, max) {
9
9
  return Math.max(min, Math.min(value, max));
10
10
  };
@@ -1,10 +1,10 @@
1
1
  import { JSXInterface } from '../jsx';
2
2
  import { TemplateResult } from '@refinitiv-ui/core';
3
3
  import { TemplateMap } from '@refinitiv-ui/core/directives/template-map.js';
4
+ import '@refinitiv-ui/phrasebook/locale/en/search-field.js';
5
+ import { Translate } from '@refinitiv-ui/translate';
4
6
  import '../icon/index.js';
5
7
  import { TextField } from '../text-field/index.js';
6
- import { Translate } from '@refinitiv-ui/translate';
7
- import '@refinitiv-ui/phrasebook/locale/en/search-field.js';
8
8
  /**
9
9
  * Form control to get a search input from users.
10
10
  *
@@ -1,10 +1,10 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { html, nothing } from '@refinitiv-ui/core';
3
3
  import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
+ import '@refinitiv-ui/phrasebook/locale/en/search-field.js';
5
+ import { translate } from '@refinitiv-ui/translate';
4
6
  import '../icon/index.js';
5
7
  import { TextField } from '../text-field/index.js';
6
- import { translate } from '@refinitiv-ui/translate';
7
- import '@refinitiv-ui/phrasebook/locale/en/search-field.js';
8
8
  /**
9
9
  * Form control to get a search input from users.
10
10
  *
@@ -53,8 +53,8 @@ let SearchField = class SearchField extends TextField {
53
53
  get decorateInputMap() {
54
54
  return {
55
55
  ...super.decorateInputMap,
56
- 'type': 'search',
57
- 'inputmode': 'search'
56
+ type: 'search',
57
+ inputmode: 'search'
58
58
  };
59
59
  }
60
60
  /**
@@ -1,8 +1,8 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { ControlElement, TemplateResult, CSSResultGroup, PropertyValues, MultiValue } from '@refinitiv-ui/core';
3
- import '../overlay/index.js';
4
- import '../item/index.js';
2
+ import { CSSResultGroup, ControlElement, MultiValue, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
5
3
  import '../icon/index.js';
4
+ import '../item/index.js';
5
+ import '../overlay/index.js';
6
6
  import type { SelectData, SelectDataItem } from './helpers/types';
7
7
  export type { SelectData, SelectDataItem };
8
8
  /**
@@ -41,47 +41,47 @@ export declare class Select extends ControlElement implements MultiValue {
41
41
  private keySearchThrottler;
42
42
  private resizeThrottler;
43
43
  /**
44
- * Current text content of the selected value
45
- * @readonly
46
- */
44
+ * Current text content of the selected value
45
+ * @readonly
46
+ */
47
47
  get label(): string;
48
48
  /**
49
- * Current text content of the selected values
50
- * @ignore
51
- * @readonly
52
- */
49
+ * Current text content of the selected values
50
+ * @ignore
51
+ * @readonly
52
+ */
53
53
  get labels(): string[];
54
54
  /**
55
- * Placeholder to display when no value is set
56
- */
55
+ * Placeholder to display when no value is set
56
+ */
57
57
  placeholder: string;
58
58
  /**
59
- * Toggles the opened state of the list
60
- */
59
+ * Toggles the opened state of the list
60
+ */
61
61
  opened: boolean;
62
62
  /**
63
- * Set state to error
64
- */
63
+ * Set state to error
64
+ */
65
65
  error: boolean;
66
66
  /**
67
- * Set state to warning
68
- */
67
+ * Set state to warning
68
+ */
69
69
  warning: boolean;
70
70
  /**
71
- * Switch to multiple select input
72
- * @ignore
73
- * @param multiple True if element needs to support multi selection
74
- */
71
+ * Switch to multiple select input
72
+ * @ignore
73
+ * @param multiple True if element needs to support multi selection
74
+ */
75
75
  set multiple(multiple: boolean);
76
76
  /**
77
- * @ignore
78
- */
77
+ * @ignore
78
+ */
79
79
  get multiple(): boolean;
80
80
  /**
81
- * Construct the menu from data object. Cannot be used with slotted content
82
- * @type {SelectData | null}
83
- * @default null
84
- */
81
+ * Construct the menu from data object. Cannot be used with slotted content
82
+ * @type {SelectData | null}
83
+ * @default null
84
+ */
85
85
  get data(): SelectData | null;
86
86
  set data(value: SelectData | null);
87
87
  /**
@@ -91,10 +91,10 @@ export declare class Select extends ControlElement implements MultiValue {
91
91
  */
92
92
  private cachedValue;
93
93
  /**
94
- * Value of the element
95
- * @param value Element value
96
- * @default -
97
- */
94
+ * Value of the element
95
+ * @param value Element value
96
+ * @default -
97
+ */
98
98
  set value(value: string);
99
99
  get value(): string;
100
100
  /**
@@ -382,8 +382,8 @@ export declare class Select extends ControlElement implements MultiValue {
382
382
  */
383
383
  private get dataContent();
384
384
  /**
385
- * Edit template when select is not readonly or disabled
386
- */
385
+ * Edit template when select is not readonly or disabled
386
+ */
387
387
  private get popupTemplate();
388
388
  /**
389
389
  * A `TemplateResult` that will be used