@refinitiv-ui/elements 6.8.7 → 6.8.9

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 (209) hide show
  1. package/CHANGELOG.md +180 -433
  2. package/LICENSE +1 -1
  3. package/README.md +13 -11
  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.d.ts +1 -1
  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 +151 -132
  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 +6 -6
  66. package/lib/dialog/index.js +48 -38
  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 +6 -8
  86. package/lib/icon/utils/IconLoader.d.ts +1 -0
  87. package/lib/icon/utils/IconLoader.js +9 -1
  88. package/lib/interactive-chart/helpers/types.d.ts +3 -3
  89. package/lib/interactive-chart/index.d.ts +34 -34
  90. package/lib/interactive-chart/index.js +72 -57
  91. package/lib/item/helpers/types.d.ts +1 -1
  92. package/lib/item/index.d.ts +3 -3
  93. package/lib/item/index.js +24 -20
  94. package/lib/jsx.d.ts +6 -4
  95. package/lib/label/index.d.ts +1 -1
  96. package/lib/label/index.js +11 -8
  97. package/lib/layout/index.d.ts +7 -7
  98. package/lib/layout/index.js +7 -7
  99. package/lib/led-gauge/index.d.ts +1 -1
  100. package/lib/led-gauge/index.js +10 -10
  101. package/lib/list/elements/list.d.ts +3 -3
  102. package/lib/list/elements/list.js +10 -12
  103. package/lib/list/helpers/renderer.js +2 -2
  104. package/lib/list/helpers/types.d.ts +1 -1
  105. package/lib/list/index.d.ts +1 -1
  106. package/lib/list/renderer.d.ts +7 -7
  107. package/lib/loader/index.js +7 -8
  108. package/lib/multi-input/index.d.ts +6 -6
  109. package/lib/multi-input/index.js +39 -45
  110. package/lib/notification/elements/notification-tray.d.ts +2 -2
  111. package/lib/notification/elements/notification-tray.js +3 -3
  112. package/lib/notification/elements/notification.d.ts +2 -2
  113. package/lib/notification/elements/notification.js +22 -14
  114. package/lib/notification/helpers/status.js +1 -1
  115. package/lib/number-field/index.d.ts +5 -6
  116. package/lib/number-field/index.js +37 -47
  117. package/lib/overlay/elements/overlay-viewport.d.ts +1 -1
  118. package/lib/overlay/elements/overlay.d.ts +2 -2
  119. package/lib/overlay/elements/overlay.js +154 -98
  120. package/lib/overlay/helpers/types.d.ts +1 -1
  121. package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
  122. package/lib/overlay/managers/backdrop-manager.js +2 -2
  123. package/lib/overlay/managers/close-manager.js +2 -1
  124. package/lib/overlay/managers/focus-manager.js +23 -13
  125. package/lib/overlay/managers/interaction-lock-manager.d.ts +4 -4
  126. package/lib/overlay/managers/interaction-lock-manager.js +33 -25
  127. package/lib/overlay/managers/viewport-manager.d.ts +2 -2
  128. package/lib/overlay/managers/viewport-manager.js +3 -2
  129. package/lib/overlay/managers/zindex-manager.js +4 -2
  130. package/lib/overlay-menu/helpers/types.d.ts +2 -2
  131. package/lib/overlay-menu/index.d.ts +1 -1
  132. package/lib/overlay-menu/index.js +44 -33
  133. package/lib/overlay-menu/managers/menu-manager.d.ts +10 -10
  134. package/lib/overlay-menu/managers/menu-manager.js +15 -13
  135. package/lib/pagination/index.d.ts +4 -4
  136. package/lib/pagination/index.js +39 -14
  137. package/lib/panel/index.js +1 -1
  138. package/lib/password-field/index.d.ts +2 -2
  139. package/lib/password-field/index.js +4 -4
  140. package/lib/pill/index.d.ts +1 -1
  141. package/lib/pill/index.js +22 -19
  142. package/lib/progress-bar/index.d.ts +1 -1
  143. package/lib/progress-bar/index.js +38 -37
  144. package/lib/radio-button/index.d.ts +2 -2
  145. package/lib/radio-button/index.js +17 -12
  146. package/lib/radio-button/radio-button-registry.js +8 -5
  147. package/lib/rating/index.d.ts +1 -1
  148. package/lib/rating/index.js +2 -5
  149. package/lib/rating/utils.d.ts +6 -6
  150. package/lib/rating/utils.js +6 -6
  151. package/lib/search-field/index.d.ts +2 -2
  152. package/lib/search-field/index.js +4 -4
  153. package/lib/select/index.d.ts +34 -34
  154. package/lib/select/index.js +70 -83
  155. package/lib/sidebar-layout/index.d.ts +2 -2
  156. package/lib/sidebar-layout/index.js +7 -9
  157. package/lib/slider/index.d.ts +2 -2
  158. package/lib/slider/index.js +57 -45
  159. package/lib/slider/utils.d.ts +10 -10
  160. package/lib/slider/utils.js +10 -10
  161. package/lib/sparkline/index.d.ts +1 -1
  162. package/lib/sparkline/index.js +7 -8
  163. package/lib/swing-gauge/helpers.js +2 -2
  164. package/lib/swing-gauge/index.d.ts +19 -19
  165. package/lib/swing-gauge/index.js +91 -81
  166. package/lib/tab/index.d.ts +1 -1
  167. package/lib/tab/index.js +16 -27
  168. package/lib/tab/themes/halo/dark/index.js +1 -1
  169. package/lib/tab/themes/halo/light/index.js +1 -1
  170. package/lib/tab/themes/solar/charcoal/index.js +1 -1
  171. package/lib/tab/themes/solar/pearl/index.js +1 -1
  172. package/lib/tab-bar/helpers/animate.js +1 -1
  173. package/lib/tab-bar/index.d.ts +1 -1
  174. package/lib/tab-bar/index.js +34 -18
  175. package/lib/tab-bar/themes/halo/dark/index.js +1 -1
  176. package/lib/tab-bar/themes/halo/light/index.js +1 -1
  177. package/lib/text-field/index.d.ts +1 -1
  178. package/lib/text-field/index.js +36 -33
  179. package/lib/time-picker/index.d.ts +6 -6
  180. package/lib/time-picker/index.js +104 -90
  181. package/lib/toggle/index.d.ts +1 -1
  182. package/lib/toggle/index.js +4 -3
  183. package/lib/tooltip/elements/title-tooltip.js +2 -2
  184. package/lib/tooltip/index.d.ts +27 -27
  185. package/lib/tooltip/index.js +42 -38
  186. package/lib/tooltip/managers/tooltip-manager.d.ts +1 -1
  187. package/lib/tornado-chart/elements/tornado-chart.d.ts +1 -1
  188. package/lib/tornado-chart/elements/tornado-chart.js +1 -1
  189. package/lib/tornado-chart/elements/tornado-item.d.ts +2 -2
  190. package/lib/tornado-chart/elements/tornado-item.js +12 -10
  191. package/lib/tree/elements/tree-item.d.ts +3 -3
  192. package/lib/tree/elements/tree-item.js +21 -19
  193. package/lib/tree/elements/tree.d.ts +1 -1
  194. package/lib/tree/elements/tree.js +12 -11
  195. package/lib/tree/helpers/renderer.js +4 -3
  196. package/lib/tree/index.d.ts +1 -1
  197. package/lib/tree/managers/tree-manager.d.ts +1 -1
  198. package/lib/tree/managers/tree-manager.js +17 -18
  199. package/lib/tree/themes/solar/charcoal/index.js +1 -1
  200. package/lib/tree/themes/solar/pearl/index.js +1 -1
  201. package/lib/tree-select/index.d.ts +9 -9
  202. package/lib/tree-select/index.js +91 -82
  203. package/lib/tree-select/themes/halo/dark/index.js +1 -1
  204. package/lib/tree-select/themes/halo/light/index.js +1 -1
  205. package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
  206. package/lib/tree-select/themes/solar/pearl/index.js +1 -1
  207. package/lib/version.js +1 -1
  208. package/package.json +16 -16
  209. package/tsconfig.tsbuildinfo +1 -1
@@ -1,11 +1,11 @@
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
- import { translate } from '@refinitiv-ui/translate';
6
- import { VERSION } from '../../version.js';
7
5
  import '@refinitiv-ui/phrasebook/locale/en/notification.js';
6
+ import { translate } from '@refinitiv-ui/translate';
8
7
  import '../../icon/index.js';
8
+ import { VERSION } from '../../version.js';
9
9
  /**
10
10
  * Used to show informative content when something happens in the application
11
11
  *
@@ -60,7 +60,9 @@ let Notification = class Notification extends BasicElement {
60
60
  update(changedProperties) {
61
61
  super.update(changedProperties);
62
62
  // Fix bg doesn't work on IE 11
63
- if (changedProperties.has('confirm') || changedProperties.has('warning') || changedProperties.has('error')) {
63
+ if (changedProperties.has('confirm') ||
64
+ changedProperties.has('warning') ||
65
+ changedProperties.has('error')) {
64
66
  this.updateStyles();
65
67
  }
66
68
  }
@@ -112,7 +114,7 @@ let Notification = class Notification extends BasicElement {
112
114
  :host {
113
115
  display: block;
114
116
  }
115
- [part=label] {
117
+ [part='label'] {
116
118
  color: red;
117
119
  }
118
120
  `;
@@ -125,15 +127,21 @@ let Notification = class Notification extends BasicElement {
125
127
  */
126
128
  render() {
127
129
  return html `
128
- <style>
129
- :host {
130
- display: block;
131
- }
132
- </style>
133
- <div part="container">
134
- <div part="content"><slot>${this.message}</slot></div>
135
- <ef-icon part="clear" icon="cross" role="button" aria-description="${this.t('CLOSE')}" @click="${this.onClearClick.bind(this)}"></ef-icon>
136
- </div>
130
+ <style>
131
+ :host {
132
+ display: block;
133
+ }
134
+ </style>
135
+ <div part="container">
136
+ <div part="content"><slot>${this.message}</slot></div>
137
+ <ef-icon
138
+ part="clear"
139
+ icon="cross"
140
+ role="button"
141
+ aria-description="${this.t('CLOSE')}"
142
+ @click="${this.onClearClick.bind(this)}"
143
+ ></ef-icon>
144
+ </div>
137
145
  `;
138
146
  }
139
147
  };
@@ -1,6 +1,6 @@
1
1
  import { NotificationTray } from '../elements/notification-tray.js';
2
2
  // TODO: Add to utils?
3
- const DEV_ENV = (/^(localhost|127\.0\.0\.1)$/).test(location.hostname);
3
+ const DEV_ENV = /^(localhost|127\.0\.0\.1)$/.test(location.hostname);
4
4
  const NotificationType = {
5
5
  INFO: 'INFO',
6
6
  CONFIRM: 'CONFIRM',
@@ -1,5 +1,5 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { FormFieldElement, CSSResultGroup, TemplateResult, PropertyValues, TapEvent } from '@refinitiv-ui/core';
2
+ import { CSSResultGroup, FormFieldElement, PropertyValues, TapEvent, TemplateResult } from '@refinitiv-ui/core';
3
3
  import { TemplateMap } from '@refinitiv-ui/core/directives/template-map.js';
4
4
  import '../icon/index.js';
5
5
  type SelectionDirection = 'forward' | 'backward' | 'none';
@@ -67,10 +67,10 @@ export declare class NumberField extends FormFieldElement {
67
67
  max: string | null;
68
68
  private interimValueState;
69
69
  /**
70
- * The value of the number entered into the input.
71
- * @param value number-field value
72
- * @default -
73
- */
70
+ * The value of the number entered into the input.
71
+ * @param value number-field value
72
+ * @default -
73
+ */
74
74
  set value(value: string);
75
75
  get value(): string;
76
76
  /**
@@ -313,7 +313,6 @@ export declare class NumberField extends FormFieldElement {
313
313
  * type="text" - always `text`
314
314
  * part="input" - always "input", used for styling
315
315
  * inputmode="decimal" - show decimals keyboard by default
316
- * pattern="'^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$'" - numbers only
317
316
  * role="spinbutton" - number field is actually a spinner
318
317
  * aria-valuenow - current value or 0
319
318
  * @keydown - Listener for `keydown` event. Runs `this.onInputKeyDown`
@@ -1,11 +1,10 @@
1
1
  import { __decorate } from "tslib";
2
- import { FormFieldElement, html, css, FocusedPropertyKey } from '@refinitiv-ui/core';
2
+ import { FocusedPropertyKey, FormFieldElement, 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 '../icon/index.js';
8
- const NUMBER_PATTERN = '^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$';
7
+ import { VERSION } from '../version.js';
9
8
  const DEFAULT_STEP_BASE = 1;
10
9
  const ANY_STEP = 'any';
11
10
  var Direction;
@@ -81,41 +80,43 @@ let NumberField = class NumberField extends FormFieldElement {
81
80
  :host {
82
81
  display: inline-block;
83
82
  }
84
- :host(:focus), :host input:focus {
83
+ :host(:focus),
84
+ :host input:focus {
85
85
  outline: none;
86
86
  }
87
87
  :host([transparent]) {
88
88
  background: none !important;
89
89
  border: none !important;
90
90
  }
91
- [part=input] {
91
+ [part='input'] {
92
92
  font: inherit;
93
93
  background: none;
94
94
  color: currentColor;
95
95
  border: none;
96
96
  text-align: inherit;
97
97
  }
98
- [part=spinner]{
98
+ [part='spinner'] {
99
99
  display: flex;
100
100
  flex-direction: column;
101
101
  }
102
- [part=spinner-up], [part=spinner-down] {
102
+ [part='spinner-up'],
103
+ [part='spinner-down'] {
103
104
  display: flex;
104
105
  height: 50%;
105
106
  cursor: pointer;
106
107
  user-select: none;
107
108
  }
108
- [part^=spinner][disabled],
109
- [part^=spinner][readonly] {
109
+ [part^='spinner'][disabled],
110
+ [part^='spinner'][readonly] {
110
111
  cursor: default;
111
112
  }
112
113
  `;
113
114
  }
114
115
  /**
115
- * The value of the number entered into the input.
116
- * @param value number-field value
117
- * @default -
118
- */
116
+ * The value of the number entered into the input.
117
+ * @param value number-field value
118
+ * @default -
119
+ */
119
120
  set value(value) {
120
121
  this.interimValueState = true;
121
122
  super.value = value;
@@ -194,7 +195,7 @@ let NumberField = class NumberField extends FormFieldElement {
194
195
  if (Math.floor(value) === value || isNaN(value) || !isFinite(value)) {
195
196
  return 0;
196
197
  }
197
- return new Intl.NumberFormat('en', { minimumSignificantDigits: 1 }).format(value).split('.')[1].length || 0;
198
+ return (new Intl.NumberFormat('en', { minimumSignificantDigits: 1 }).format(value).split('.')[1].length || 0);
198
199
  }
199
200
  /**
200
201
  * Get number of decimals based on step base and allowed value step
@@ -307,7 +308,9 @@ let NumberField = class NumberField extends FormFieldElement {
307
308
  const selectionEnd = inputEl.selectionEnd || 0;
308
309
  const newInput = `${oldInput.substring(0, selectionStart)}${data}${oldInput.substring(selectionEnd)}`;
309
310
  const validatedInput = this.stripeInvalidCharacters(newInput, oldInput, data);
310
- const insertionData = validatedInput.slice(0, validatedInput.length - (oldInput.length - selectionEnd)).substring(selectionStart);
311
+ const insertionData = validatedInput
312
+ .slice(0, validatedInput.length - (oldInput.length - selectionEnd))
313
+ .substring(selectionStart);
311
314
  // Invalid characters or sequence of characters
312
315
  if (!insertionData.length) {
313
316
  event.preventDefault();
@@ -380,18 +383,18 @@ let NumberField = class NumberField extends FormFieldElement {
380
383
  if (dotIndex !== -1) {
381
384
  input = `${input.substring(0, dotIndex + 1)}${input.substring(dotIndex + 1).replace(/\./g, '')}`;
382
385
  if (!valueHasE) {
383
- input = `${input.substring(0, dotIndex).replace(/e/ig, '')}${input.substring(dotIndex)}`;
386
+ input = `${input.substring(0, dotIndex).replace(/e/gi, '')}${input.substring(dotIndex)}`;
384
387
  }
385
388
  }
386
389
  // stripe all dots after e and multiple e occurrences
387
390
  if (eIndex !== -1) {
388
- input = `${input.substring(0, eIndex + 1)}${input.substring(eIndex + 1).replace(/e/ig, '')}`;
391
+ input = `${input.substring(0, eIndex + 1)}${input.substring(eIndex + 1).replace(/e/gi, '')}`;
389
392
  if (!valueHasDot) {
390
393
  input = `${input.substring(0, eIndex)}${input.substring(eIndex).replace(/\./g, '')}`;
391
394
  }
392
395
  }
393
396
  // stripe all other invalid characters and make sure that + and - signs are correct
394
- return input.replace(/(^[-+]|[e][-+])|[-+]|[^0-9e.+-]/ig, '$1');
397
+ return input.replace(/(^[-+]|[e][-+])|[-+]|[^0-9e.+-]/gi, '$1');
395
398
  }
396
399
  /**
397
400
  * On *user-interaction* set the value and notify.
@@ -500,7 +503,7 @@ let NumberField = class NumberField extends FormFieldElement {
500
503
  */
501
504
  findNearestSteppedValue(value, stepBase, allowedValueStep, direction) {
502
505
  // TODO: there is probably much better way on how to implement this function
503
- let newValue = this.toFixedNumber(value + (stepBase - value) % allowedValueStep);
506
+ let newValue = this.toFixedNumber(value + ((stepBase - value) % allowedValueStep));
504
507
  if (direction === Direction.Up) {
505
508
  // with float number rounding this may need to run more than once to find the valid value
506
509
  while (newValue <= value) {
@@ -577,7 +580,9 @@ let NumberField = class NumberField extends FormFieldElement {
577
580
  }
578
581
  // If either the method invoked was the stepDown() method and value is greater than valueBeforeStepping
579
582
  // or the method invoked was the stepUp() method and value is less than valueBeforeStepping, then return.
580
- if (!isNaN(inputValue) && ((direction === Direction.Up && value < valueBeforeStepping) || (direction === Direction.Down && value > valueBeforeStepping))) {
583
+ if (!isNaN(inputValue) &&
584
+ ((direction === Direction.Up && value < valueBeforeStepping) ||
585
+ (direction === Direction.Down && value > valueBeforeStepping))) {
581
586
  return;
582
587
  }
583
588
  this.inputValue = String(value);
@@ -651,7 +656,7 @@ let NumberField = class NumberField extends FormFieldElement {
651
656
  */
652
657
  /* istanbul ignore next */
653
658
  set selectionStart(index) {
654
- throw new Error('Failed to set the \'selectionStart\' property on \'NumberField\': The element does not support selection.');
659
+ throw new Error("Failed to set the 'selectionStart' property on 'NumberField': The element does not support selection.");
655
660
  }
656
661
  /**
657
662
  * @ignore
@@ -667,7 +672,7 @@ let NumberField = class NumberField extends FormFieldElement {
667
672
  */
668
673
  /* istanbul ignore next */
669
674
  set selectionEnd(index) {
670
- throw new Error('Failed to set the \'selectionEnd\' property on \'NumberField\': The element does not support selection.');
675
+ throw new Error("Failed to set the 'selectionEnd' property on 'NumberField': The element does not support selection.");
671
676
  }
672
677
  /**
673
678
  * @ignore
@@ -683,7 +688,7 @@ let NumberField = class NumberField extends FormFieldElement {
683
688
  */
684
689
  /* istanbul ignore next */
685
690
  set selectionDirection(direction) {
686
- throw new Error('Failed to set the \'selectionDirection\' property on \'NumberField\': The element does not support selection.');
691
+ throw new Error("Failed to set the 'selectionDirection' property on 'NumberField': The element does not support selection.");
687
692
  }
688
693
  /**
689
694
  * @ignore
@@ -692,7 +697,7 @@ let NumberField = class NumberField extends FormFieldElement {
692
697
  /* istanbul ignore next */
693
698
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
694
699
  setSelectionRange(startSelection, endSelection, selectionDirection) {
695
- throw new Error('Failed to execute \'setSelectionRange\' on \'NumberField\': The element does not support selection.');
700
+ throw new Error("Failed to execute 'setSelectionRange' on 'NumberField': The element does not support selection.");
696
701
  }
697
702
  /**
698
703
  * Renders spinner
@@ -700,20 +705,9 @@ let NumberField = class NumberField extends FormFieldElement {
700
705
  */
701
706
  renderSpinner() {
702
707
  return html `
703
- <div
704
- part="spinner"
705
- @tap=${this.onSpinnerTap}>
706
- <ef-icon
707
- icon="up"
708
- part="spinner-up"
709
- ?readonly=${this.readonly}
710
- ?disabled=${this.disabled}>
711
- </ef-icon>
712
- <ef-icon
713
- icon="down"
714
- part="spinner-down"
715
- ?readonly=${this.readonly}
716
- ?disabled=${this.disabled}>
708
+ <div part="spinner" @tap=${this.onSpinnerTap}>
709
+ <ef-icon icon="up" part="spinner-up" ?readonly=${this.readonly} ?disabled=${this.disabled}> </ef-icon>
710
+ <ef-icon icon="down" part="spinner-down" ?readonly=${this.readonly} ?disabled=${this.disabled}>
717
711
  </ef-icon>
718
712
  </div>
719
713
  `;
@@ -723,7 +717,6 @@ let NumberField = class NumberField extends FormFieldElement {
723
717
  * type="text" - always `text`
724
718
  * part="input" - always "input", used for styling
725
719
  * inputmode="decimal" - show decimals keyboard by default
726
- * pattern="'^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$'" - numbers only
727
720
  * role="spinbutton" - number field is actually a spinner
728
721
  * aria-valuenow - current value or 0
729
722
  * @keydown - Listener for `keydown` event. Runs `this.onInputKeyDown`
@@ -733,11 +726,10 @@ let NumberField = class NumberField extends FormFieldElement {
733
726
  get decorateInputMap() {
734
727
  return {
735
728
  ...super.decorateInputMap,
736
- 'type': 'text',
737
- 'part': 'input',
738
- 'inputmode': 'decimal',
739
- 'pattern': NUMBER_PATTERN,
740
- 'role': 'spinbutton',
729
+ type: 'text',
730
+ part: 'input',
731
+ inputmode: 'decimal',
732
+ role: 'spinbutton',
741
733
  'aria-valuenow': `${this.value || 0}`,
742
734
  '@keydown': this.onInputKeyDown,
743
735
  '@beforeinput': this.onBeforeInputChange
@@ -749,9 +741,7 @@ let NumberField = class NumberField extends FormFieldElement {
749
741
  * @return {TemplateResult} Render template
750
742
  */
751
743
  render() {
752
- return html `
753
- ${super.render()}
754
- ${this.noSpinner ? null : this.renderSpinner()}`;
744
+ return html ` ${super.render()} ${this.noSpinner ? null : this.renderSpinner()}`;
755
745
  }
756
746
  };
757
747
  __decorate([
@@ -1,5 +1,5 @@
1
1
  import { JSXInterface } from '../../jsx';
2
- import { ResponsiveElement, CSSResultGroup, TemplateResult } from '@refinitiv-ui/core';
2
+ import { CSSResultGroup, ResponsiveElement, TemplateResult } from '@refinitiv-ui/core';
3
3
  /**
4
4
  * A private element to find overlay size boundaries
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import { JSXInterface } from '../../jsx';
2
- import { ResponsiveElement, TemplateResult, CSSResultGroup, PropertyValues, ElementSize } from '@refinitiv-ui/core';
3
- import { TransitionStyle, PositionTarget, Position, NullOrUndefined, PositionTargetStrategy } from '../helpers/types.js';
2
+ import { CSSResultGroup, ElementSize, PropertyValues, ResponsiveElement, TemplateResult } from '@refinitiv-ui/core';
3
+ import { NullOrUndefined, Position, PositionTarget, PositionTargetStrategy, TransitionStyle } from '../helpers/types.js';
4
4
  export type { TransitionStyle, PositionTarget, Position, PositionTargetStrategy };
5
5
  /**
6
6
  * Element to help building modals, dialogs and other overlay content