@refinitiv-ui/elements 7.6.1 → 7.7.0

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 (123) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/lib/accordion/custom-elements.json +2 -2
  3. package/lib/accordion/custom-elements.md +2 -2
  4. package/lib/accordion/index.d.ts +2 -2
  5. package/lib/accordion/index.js +2 -2
  6. package/lib/appstate-bar/custom-elements.json +2 -2
  7. package/lib/appstate-bar/custom-elements.md +4 -4
  8. package/lib/appstate-bar/index.d.ts +1 -1
  9. package/lib/appstate-bar/index.js +1 -1
  10. package/lib/autosuggest/custom-elements.json +14 -9
  11. package/lib/autosuggest/custom-elements.md +15 -15
  12. package/lib/autosuggest/index.d.ts +9 -4
  13. package/lib/autosuggest/index.js +9 -4
  14. package/lib/button/custom-elements.json +6 -6
  15. package/lib/button/custom-elements.md +3 -3
  16. package/lib/button/index.d.ts +3 -4
  17. package/lib/button/index.js +3 -4
  18. package/lib/chart/custom-elements.json +1 -9
  19. package/lib/chart/custom-elements.md +8 -8
  20. package/lib/chart/elements/chart.d.ts +3 -3
  21. package/lib/chart/elements/chart.js +4 -4
  22. package/lib/checkbox/custom-elements.json +2 -2
  23. package/lib/checkbox/custom-elements.md +6 -6
  24. package/lib/checkbox/index.d.ts +1 -1
  25. package/lib/checkbox/index.js +1 -1
  26. package/lib/clock/custom-elements.json +6 -17
  27. package/lib/clock/custom-elements.md +1 -7
  28. package/lib/clock/index.d.ts +4 -2
  29. package/lib/clock/index.js +4 -2
  30. package/lib/collapse/custom-elements.json +2 -2
  31. package/lib/collapse/custom-elements.md +2 -2
  32. package/lib/collapse/index.d.ts +2 -2
  33. package/lib/collapse/index.js +2 -2
  34. package/lib/color-dialog/custom-elements.json +36 -6
  35. package/lib/color-dialog/custom-elements.md +24 -22
  36. package/lib/color-dialog/index.d.ts +3 -2
  37. package/lib/color-dialog/index.js +3 -2
  38. package/lib/combo-box/custom-elements.json +10 -21
  39. package/lib/combo-box/custom-elements.md +3 -4
  40. package/lib/combo-box/index.d.ts +4 -6
  41. package/lib/combo-box/index.js +4 -6
  42. package/lib/configuration/custom-elements.json +11 -1
  43. package/lib/configuration/custom-elements.md +3 -3
  44. package/lib/configuration/elements/configuration.d.ts +3 -0
  45. package/lib/configuration/elements/configuration.js +3 -0
  46. package/lib/counter/custom-elements.json +1 -1
  47. package/lib/counter/custom-elements.md +1 -1
  48. package/lib/counter/index.d.ts +1 -1
  49. package/lib/counter/index.js +1 -1
  50. package/lib/datetime-picker/custom-elements.json +5 -5
  51. package/lib/datetime-picker/custom-elements.md +3 -3
  52. package/lib/datetime-picker/index.d.ts +3 -3
  53. package/lib/datetime-picker/index.js +3 -3
  54. package/lib/header/custom-elements.json +2 -2
  55. package/lib/header/custom-elements.md +2 -2
  56. package/lib/header/index.d.ts +2 -2
  57. package/lib/header/index.js +2 -2
  58. package/lib/heatmap/custom-elements.json +1 -1
  59. package/lib/heatmap/custom-elements.md +3 -3
  60. package/lib/heatmap/index.d.ts +2 -2
  61. package/lib/heatmap/index.js +2 -2
  62. package/lib/interactive-chart/custom-elements.md +3 -3
  63. package/lib/interactive-chart/index.d.ts +1 -1
  64. package/lib/interactive-chart/index.js +1 -1
  65. package/lib/item/custom-elements.json +2 -1
  66. package/lib/item/custom-elements.md +1 -1
  67. package/lib/item/helpers/types.d.ts +4 -0
  68. package/lib/item/index.d.ts +1 -0
  69. package/lib/item/index.js +1 -0
  70. package/lib/label/custom-elements.json +4 -4
  71. package/lib/label/custom-elements.md +2 -2
  72. package/lib/label/index.d.ts +2 -2
  73. package/lib/label/index.js +2 -2
  74. package/lib/list/custom-elements.md +8 -8
  75. package/lib/list/elements/list.d.ts +1 -1
  76. package/lib/list/elements/list.js +1 -1
  77. package/lib/multi-input/custom-elements.json +4 -4
  78. package/lib/multi-input/custom-elements.md +2 -2
  79. package/lib/multi-input/index.d.ts +2 -2
  80. package/lib/multi-input/index.js +2 -2
  81. package/lib/number-field/index.d.ts +27 -0
  82. package/lib/number-field/index.js +37 -7
  83. package/lib/overlay/custom-elements.json +10 -6
  84. package/lib/overlay/custom-elements.md +29 -29
  85. package/lib/overlay/elements/overlay.d.ts +6 -0
  86. package/lib/overlay/elements/overlay.js +6 -0
  87. package/lib/overlay-menu/custom-elements.json +4 -2
  88. package/lib/overlay-menu/custom-elements.md +1 -1
  89. package/lib/overlay-menu/index.d.ts +1 -1
  90. package/lib/overlay-menu/index.js +1 -1
  91. package/lib/pagination/custom-elements.json +12 -8
  92. package/lib/pagination/custom-elements.md +5 -5
  93. package/lib/pagination/index.d.ts +4 -2
  94. package/lib/pagination/index.js +4 -2
  95. package/lib/password-field/index.d.ts +23 -1
  96. package/lib/password-field/index.js +45 -3
  97. package/lib/pill/custom-elements.json +2 -2
  98. package/lib/pill/custom-elements.md +8 -8
  99. package/lib/pill/index.d.ts +1 -1
  100. package/lib/pill/index.js +1 -1
  101. package/lib/select/custom-elements.json +5 -5
  102. package/lib/select/custom-elements.md +10 -10
  103. package/lib/select/index.d.ts +3 -3
  104. package/lib/select/index.js +3 -3
  105. package/lib/slider/custom-elements.json +2 -2
  106. package/lib/slider/custom-elements.md +1 -1
  107. package/lib/slider/index.d.ts +1 -1
  108. package/lib/slider/index.js +1 -1
  109. package/lib/swing-gauge/custom-elements.json +8 -4
  110. package/lib/swing-gauge/custom-elements.md +2 -2
  111. package/lib/swing-gauge/index.d.ts +2 -0
  112. package/lib/swing-gauge/index.js +2 -0
  113. package/lib/time-picker/custom-elements.json +6 -4
  114. package/lib/time-picker/custom-elements.md +3 -3
  115. package/lib/time-picker/index.d.ts +4 -1
  116. package/lib/time-picker/index.js +4 -1
  117. package/lib/toggle/custom-elements.json +2 -2
  118. package/lib/toggle/custom-elements.md +7 -7
  119. package/lib/toggle/index.d.ts +1 -1
  120. package/lib/toggle/index.js +1 -1
  121. package/lib/tree/helpers/types.d.ts +4 -0
  122. package/lib/version.js +1 -1
  123. package/package.json +14 -14
@@ -44,6 +44,14 @@ var Direction;
44
44
  let NumberField = class NumberField extends FormFieldElement {
45
45
  constructor() {
46
46
  super(...arguments);
47
+ /**
48
+ * Time period (ms) before press repetition starts
49
+ */
50
+ this.repeatDelay = 300;
51
+ /**
52
+ * Time period (ms) between each repeat
53
+ */
54
+ this.repeatRate = 50;
47
55
  /**
48
56
  * Set spinner's visibility
49
57
  */
@@ -63,6 +71,16 @@ let NumberField = class NumberField extends FormFieldElement {
63
71
  */
64
72
  this.max = null;
65
73
  this.interimValueState = false; // make sure that internal input field value is updated only on external value change
74
+ /**
75
+ * Clear repeatDelayTimer and repeatRateTimer if exist
76
+ * @returns {void}
77
+ */
78
+ this.clearTimer = () => {
79
+ if (this.repeatDelayTimer || this.repeatRateTimer) {
80
+ clearTimeout(this.repeatDelayTimer);
81
+ clearInterval(this.repeatRateTimer);
82
+ }
83
+ };
66
84
  }
67
85
  /**
68
86
  * Element version number
@@ -132,6 +150,16 @@ let NumberField = class NumberField extends FormFieldElement {
132
150
  get valueAsNumber() {
133
151
  return this.stringToNumber(this.internalValue);
134
152
  }
153
+ /**
154
+ * Called after the component is first rendered
155
+ * @param changedProperties Properties which have changed
156
+ * @returns {void}
157
+ */
158
+ firstUpdated(changedProperties) {
159
+ super.firstUpdated(changedProperties);
160
+ // To remove press repetition when tap event ends outside of the pressed button
161
+ document.addEventListener('tapend', this.clearTimer);
162
+ }
135
163
  /**
136
164
  * Updates the element
137
165
  * @param changedProperties Properties that has changed
@@ -272,12 +300,14 @@ let NumberField = class NumberField extends FormFieldElement {
272
300
  return;
273
301
  }
274
302
  const target = event.target;
275
- if (target === this.spinnerDownEl) {
276
- this.onApplyStep(Direction.Down);
277
- }
278
- else if (target === this.spinnerUpEl) {
279
- this.onApplyStep(Direction.Up);
280
- }
303
+ const direction = target === this.spinnerDownEl ? Direction.Down : Direction.Up;
304
+ this.onApplyStep(direction);
305
+ // Support long tap at a spinner
306
+ this.repeatDelayTimer = setTimeout(() => {
307
+ this.repeatRateTimer = setInterval(() => {
308
+ this.onApplyStep(direction);
309
+ }, this.repeatRate);
310
+ }, this.repeatDelay);
281
311
  }
282
312
  /**
283
313
  * Step down or up and notify value change
@@ -713,7 +743,7 @@ let NumberField = class NumberField extends FormFieldElement {
713
743
  */
714
744
  renderSpinner() {
715
745
  return html `
716
- <div part="spinner" @tap=${this.onSpinnerTap}>
746
+ <div part="spinner" @tapstart=${this.onSpinnerTap}>
717
747
  <ef-icon icon="up" part="spinner-up" ?readonly=${this.readonly} ?disabled=${this.disabled}> </ef-icon>
718
748
  <ef-icon icon="down" part="spinner-down" ?readonly=${this.readonly} ?disabled=${this.disabled}>
719
749
  </ef-icon>
@@ -129,7 +129,7 @@
129
129
  {
130
130
  "name": "position",
131
131
  "description": "Set position and align against the attach target.\nPosition may contain a single word or a comma separated list to set the priority.\nPosition is not applied if `positionTarget` is not an HTML Element.\nFor instance: `bottom-middle, top-middle` - default position is `bottom-middle`, if cannot fit then position would be `top-middle`;\nor `left, right` - align is not set, set best position on the `left` or `right`\n\nPosition can be: `top`, `right`, `bottom`, `left`, `center`\nAlign can be: `start`, `middle`, `end`",
132
- "type": "{} | undefined"
132
+ "type": "Position[] | undefined"
133
133
  }
134
134
  ],
135
135
  "properties": [
@@ -264,7 +264,7 @@
264
264
  {
265
265
  "name": "interactiveElements",
266
266
  "description": "A list of elements, which are active when overlay is opened\nValid only if noInteractionLock is false (default)",
267
- "type": "object",
267
+ "type": "HTMLElement[]",
268
268
  "default": "[]"
269
269
  },
270
270
  {
@@ -285,26 +285,30 @@
285
285
  "name": "position",
286
286
  "attribute": "position",
287
287
  "description": "Set position and align against the attach target.\nPosition may contain a single word or a comma separated list to set the priority.\nPosition is not applied if `positionTarget` is not an HTML Element.\nFor instance: `bottom-middle, top-middle` - default position is `bottom-middle`, if cannot fit then position would be `top-middle`;\nor `left, right` - align is not set, set best position on the `left` or `right`\n\nPosition can be: `top`, `right`, `bottom`, `left`, `center`\nAlign can be: `start`, `middle`, `end`",
288
- "type": "{} | undefined"
288
+ "type": "Position[] | undefined"
289
289
  },
290
290
  {
291
291
  "name": "positionTargetConfig (readonly)",
292
- "description": "Get position target configuration based on positionTarget and fullScreen properties\nUsed for caching and calculations"
292
+ "description": "Get position target configuration based on positionTarget and fullScreen properties\nUsed for caching and calculations",
293
+ "type": "PositionTargetStrategy"
293
294
  },
294
295
  {
295
296
  "name": "focusBoundary",
296
297
  "description": "Set focus boundary to restrict tabbing. Default's overlay itself.\nIf external focus is required, set to null",
298
+ "type": "HTMLElement | ShadowRoot | null",
297
299
  "default": "\"this\""
298
300
  },
299
301
  {
300
302
  "name": "fullyOpened (readonly)",
301
303
  "description": "Returns true if the overlay is opened and animation is not running.\nReturns false if overlay is closed and animation is not running",
302
- "type": "boolean"
304
+ "type": "boolean",
305
+ "default": "false"
303
306
  },
304
307
  {
305
308
  "name": "transitioning (readonly)",
306
309
  "description": "Returns true if overlay is doing opening or closing transition",
307
- "type": "boolean"
310
+ "type": "boolean",
311
+ "default": "false"
308
312
  }
309
313
  ],
310
314
  "events": [
@@ -4,35 +4,35 @@ Element to help building modals, dialogs and other overlay content
4
4
 
5
5
  ## Properties
6
6
 
7
- | Property | Attribute | Type | Default | Description |
8
- |-----------------------------------|------------------------------|------------------------------------|---------|--------------------------------------------------|
9
- | `focusBoundary` | | | "this" | Set focus boundary to restrict tabbing. Default's overlay itself.<br />If external focus is required, set to null |
10
- | `fullScreen` | `full-screen` | `boolean` | false | Set to true to show overlay in full screen mode |
11
- | `fullyOpened (readonly)` | | `boolean` | | Returns true if the overlay is opened and animation is not running.<br />Returns false if overlay is closed and animation is not running |
12
- | `horizontalOffset` | `horizontal-offset` | `number` | 0 | A pixel value that will be added to the position calculated on the horizontal axis.<br />The offset will be applied either to the `left` or `right` depending on the `positionTarget` |
13
- | `interactiveElements` | | `object` | [] | A list of elements, which are active when overlay is opened<br />Valid only if noInteractionLock is false (default) |
14
- | `lockPositionTarget` | `lock-position-target` | `boolean` | false | True to lock position target<br />Valid only if noInteractionLock is false (default) |
15
- | `noAutofocus` | `no-autofocus` | `boolean` | false | Set to true to disable autofocusing the overlay or open |
16
- | `noCancelOnEscKey` | `no-cancel-on-esc-key` | `boolean` | false | Set to true to disable canceling the overlay with the ESC key |
17
- | `noCancelOnOutsideClick` | `no-cancel-on-outside-click` | `boolean` | false | Set to true to disable canceling the overlay by clicking outside it |
18
- | `noFocusManagement` | `no-focus-management` | `boolean` | false | True to not apply focus management.<br />The overlay will not limit Tab behaviour or do auto-focusing |
19
- | `noInteractionLock` | `no-interaction-lock` | `boolean` | false | Stop preventing user interaction when overlay is visible |
20
- | `noOverlap` | `no-overlap` | `boolean` | false | True to not overlap positionTarget |
21
- | `offset` | `offset` | `number` | 0 | A pixel value that will be added to the position calculated on the vertical or horizontal axis.<br />The offset is applied dynamically depending on the `positionTarget` |
22
- | `opened` | `opened` | `boolean` | false | True if the overlay is currently displayed |
23
- | `position` | `position` | `{} \| undefined` | | Set position and align against the attach target.<br />Position may contain a single word or a comma separated list to set the priority.<br />Position is not applied if `positionTarget` is not an HTML Element.<br />For instance: `bottom-middle, top-middle` - default position is `bottom-middle`, if cannot fit then position would be `top-middle`;<br />or `left, right` - align is not set, set best position on the `left` or `right`<br /><br />Position can be: `top`, `right`, `bottom`, `left`, `center`<br />Align can be: `start`, `middle`, `end` |
24
- | `positionTarget` | `position-target` | `PositionTarget\|null\|undefined` | | Set the position target as follows:<br />- HTMLElement if overlay is position next to the HTML element<br />- String containing `top`, `right`, `left`, `bottom`, `center` combinations to position against the screen.<br />For instance: `top left` - put the overlay at `top left` point of the screen; `bottom` - put overlay at `bottom center` point of the screen |
25
- | `positionTargetConfig (readonly)` | | | | Get position target configuration based on positionTarget and fullScreen properties<br />Used for caching and calculations |
26
- | `spacing` | `spacing` | `boolean` | false | True to apply spacing for overlay content |
27
- | `transitionStyle` | `transition-style` | `TransitionStyle\|null\|undefined` | | Set the transition style |
28
- | `transitioning (readonly)` | | `boolean` | | Returns true if overlay is doing opening or closing transition |
29
- | `transparent` | `transparent` | `boolean` | false | True to make overlay background transparent |
30
- | `verticalOffset` | `vertical-offset` | `number` | 0 | A pixel value that will be added to the position calculated on the vertical axis.<br />The offset will be applied either to the `top` or `bottom` depending on the `positionTarget` |
31
- | `withBackdrop` | `with-backdrop` | `boolean` | false | True to show backdrop |
32
- | `withShadow` | `with-shadow` | `boolean` | false | True to add shadow |
33
- | `x` | `x` | `number\|null\|undefined` | | Set a specific x coordinate |
34
- | `y` | `y` | `number\|null\|undefined` | | Set a specific y coordinate |
35
- | `zIndex` | `z-index` | `number\|null\|undefined` | | Set a preferable z-index to override automatically calculated z-index |
7
+ | Property | Attribute | Type | Default | Description |
8
+ |-----------------------------------|------------------------------|-------------------------------------|---------|--------------------------------------------------|
9
+ | `focusBoundary` | | `HTMLElement \| ShadowRoot \| null` | "this" | Set focus boundary to restrict tabbing. Default's overlay itself.<br />If external focus is required, set to null |
10
+ | `fullScreen` | `full-screen` | `boolean` | false | Set to true to show overlay in full screen mode |
11
+ | `fullyOpened (readonly)` | | `boolean` | false | Returns true if the overlay is opened and animation is not running.<br />Returns false if overlay is closed and animation is not running |
12
+ | `horizontalOffset` | `horizontal-offset` | `number` | 0 | A pixel value that will be added to the position calculated on the horizontal axis.<br />The offset will be applied either to the `left` or `right` depending on the `positionTarget` |
13
+ | `interactiveElements` | | `HTMLElement[]` | [] | A list of elements, which are active when overlay is opened<br />Valid only if noInteractionLock is false (default) |
14
+ | `lockPositionTarget` | `lock-position-target` | `boolean` | false | True to lock position target<br />Valid only if noInteractionLock is false (default) |
15
+ | `noAutofocus` | `no-autofocus` | `boolean` | false | Set to true to disable autofocusing the overlay or open |
16
+ | `noCancelOnEscKey` | `no-cancel-on-esc-key` | `boolean` | false | Set to true to disable canceling the overlay with the ESC key |
17
+ | `noCancelOnOutsideClick` | `no-cancel-on-outside-click` | `boolean` | false | Set to true to disable canceling the overlay by clicking outside it |
18
+ | `noFocusManagement` | `no-focus-management` | `boolean` | false | True to not apply focus management.<br />The overlay will not limit Tab behaviour or do auto-focusing |
19
+ | `noInteractionLock` | `no-interaction-lock` | `boolean` | false | Stop preventing user interaction when overlay is visible |
20
+ | `noOverlap` | `no-overlap` | `boolean` | false | True to not overlap positionTarget |
21
+ | `offset` | `offset` | `number` | 0 | A pixel value that will be added to the position calculated on the vertical or horizontal axis.<br />The offset is applied dynamically depending on the `positionTarget` |
22
+ | `opened` | `opened` | `boolean` | false | True if the overlay is currently displayed |
23
+ | `position` | `position` | `Position[] \| undefined` | | Set position and align against the attach target.<br />Position may contain a single word or a comma separated list to set the priority.<br />Position is not applied if `positionTarget` is not an HTML Element.<br />For instance: `bottom-middle, top-middle` - default position is `bottom-middle`, if cannot fit then position would be `top-middle`;<br />or `left, right` - align is not set, set best position on the `left` or `right`<br /><br />Position can be: `top`, `right`, `bottom`, `left`, `center`<br />Align can be: `start`, `middle`, `end` |
24
+ | `positionTarget` | `position-target` | `PositionTarget\|null\|undefined` | | Set the position target as follows:<br />- HTMLElement if overlay is position next to the HTML element<br />- String containing `top`, `right`, `left`, `bottom`, `center` combinations to position against the screen.<br />For instance: `top left` - put the overlay at `top left` point of the screen; `bottom` - put overlay at `bottom center` point of the screen |
25
+ | `positionTargetConfig (readonly)` | | `PositionTargetStrategy` | | Get position target configuration based on positionTarget and fullScreen properties<br />Used for caching and calculations |
26
+ | `spacing` | `spacing` | `boolean` | false | True to apply spacing for overlay content |
27
+ | `transitionStyle` | `transition-style` | `TransitionStyle\|null\|undefined` | | Set the transition style |
28
+ | `transitioning (readonly)` | | `boolean` | false | Returns true if overlay is doing opening or closing transition |
29
+ | `transparent` | `transparent` | `boolean` | false | True to make overlay background transparent |
30
+ | `verticalOffset` | `vertical-offset` | `number` | 0 | A pixel value that will be added to the position calculated on the vertical axis.<br />The offset will be applied either to the `top` or `bottom` depending on the `positionTarget` |
31
+ | `withBackdrop` | `with-backdrop` | `boolean` | false | True to show backdrop |
32
+ | `withShadow` | `with-shadow` | `boolean` | false | True to add shadow |
33
+ | `x` | `x` | `number\|null\|undefined` | | Set a specific x coordinate |
34
+ | `y` | `y` | `number\|null\|undefined` | | Set a specific y coordinate |
35
+ | `zIndex` | `z-index` | `number\|null\|undefined` | | Set a preferable z-index to override automatically calculated z-index |
36
36
 
37
37
  ## Methods
38
38
 
@@ -117,6 +117,7 @@ export declare class Overlay extends ResponsiveElement {
117
117
  /**
118
118
  * A list of elements, which are active when overlay is opened
119
119
  * Valid only if noInteractionLock is false (default)
120
+ * @type {HTMLElement[]}
120
121
  */
121
122
  interactiveElements: HTMLElement[];
122
123
  /**
@@ -142,6 +143,7 @@ export declare class Overlay extends ResponsiveElement {
142
143
  * Align can be: `start`, `middle`, `end`
143
144
  *
144
145
  * @param value Position value
146
+ * @type {Position[] | undefined}
145
147
  */
146
148
  set position(value: Position[] | undefined);
147
149
  get position(): Position[] | undefined;
@@ -157,11 +159,13 @@ export declare class Overlay extends ResponsiveElement {
157
159
  /**
158
160
  * Get position target configuration based on positionTarget and fullScreen properties
159
161
  * Used for caching and calculations
162
+ * @type {PositionTargetStrategy}
160
163
  */
161
164
  get positionTargetConfig(): PositionTargetStrategy;
162
165
  /**
163
166
  * Set focus boundary to restrict tabbing. Default's overlay itself.
164
167
  * If external focus is required, set to null
168
+ * @type {HTMLElement | ShadowRoot | null}
165
169
  */
166
170
  focusBoundary: HTMLElement | ShadowRoot | null;
167
171
  /**
@@ -369,11 +373,13 @@ export declare class Overlay extends ResponsiveElement {
369
373
  /**
370
374
  * Returns true if the overlay is opened and animation is not running.
371
375
  * Returns false if overlay is closed and animation is not running
376
+ * @default false
372
377
  * @readonly
373
378
  */
374
379
  get fullyOpened(): boolean;
375
380
  /**
376
381
  * Returns true if overlay is doing opening or closing transition
382
+ * @default false
377
383
  * @readonly
378
384
  */
379
385
  get transitioning(): boolean;
@@ -153,6 +153,7 @@ let Overlay = Overlay_1 = class Overlay extends ResponsiveElement {
153
153
  /**
154
154
  * A list of elements, which are active when overlay is opened
155
155
  * Valid only if noInteractionLock is false (default)
156
+ * @type {HTMLElement[]}
156
157
  */
157
158
  this.interactiveElements = [];
158
159
  /**
@@ -166,6 +167,7 @@ let Overlay = Overlay_1 = class Overlay extends ResponsiveElement {
166
167
  /**
167
168
  * Set focus boundary to restrict tabbing. Default's overlay itself.
168
169
  * If external focus is required, set to null
170
+ * @type {HTMLElement | ShadowRoot | null}
169
171
  */
170
172
  this.focusBoundary = this;
171
173
  /**
@@ -358,6 +360,7 @@ let Overlay = Overlay_1 = class Overlay extends ResponsiveElement {
358
360
  * Align can be: `start`, `middle`, `end`
359
361
  *
360
362
  * @param value Position value
363
+ * @type {Position[] | undefined}
361
364
  */
362
365
  set position(value) {
363
366
  const oldPosition = this._position;
@@ -403,6 +406,7 @@ let Overlay = Overlay_1 = class Overlay extends ResponsiveElement {
403
406
  /**
404
407
  * Get position target configuration based on positionTarget and fullScreen properties
405
408
  * Used for caching and calculations
409
+ * @type {PositionTargetStrategy}
406
410
  */
407
411
  get positionTargetConfig() {
408
412
  const { viewHeight, viewWidth, viewOffsetTop, viewOffsetLeft } = this.viewAreaInfo;
@@ -1320,6 +1324,7 @@ let Overlay = Overlay_1 = class Overlay extends ResponsiveElement {
1320
1324
  /**
1321
1325
  * Returns true if the overlay is opened and animation is not running.
1322
1326
  * Returns false if overlay is closed and animation is not running
1327
+ * @default false
1323
1328
  * @readonly
1324
1329
  */
1325
1330
  get fullyOpened() {
@@ -1327,6 +1332,7 @@ let Overlay = Overlay_1 = class Overlay extends ResponsiveElement {
1327
1332
  }
1328
1333
  /**
1329
1334
  * Returns true if overlay is doing opening or closing transition
1335
+ * @default false
1330
1336
  * @readonly
1331
1337
  */
1332
1338
  get transitioning() {
@@ -77,7 +77,8 @@
77
77
  {
78
78
  "name": "offset",
79
79
  "description": "A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`",
80
- "type": "number"
80
+ "type": "number",
81
+ "default": "0"
81
82
  },
82
83
  {
83
84
  "name": "position",
@@ -222,7 +223,8 @@
222
223
  "name": "offset",
223
224
  "attribute": "offset",
224
225
  "description": "A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`",
225
- "type": "number"
226
+ "type": "number",
227
+ "default": "0"
226
228
  },
227
229
  {
228
230
  "name": "position",
@@ -24,7 +24,7 @@ Overlay that supports single-level and multi-level menus
24
24
  | `lockPositionTarget` | `lock-position-target` | `boolean` | false | Set to true to lock position target |
25
25
  | `noCancelOnEscKey` | `no-cancel-on-esc-key` | `boolean` | false | Set to true to disable canceling the overlay with the ESC key |
26
26
  | `noCancelOnOutsideClick` | `no-cancel-on-outside-click` | `boolean` | false | Set to true to disable canceling the overlay by clicking outside it |
27
- | `offset` | `offset` | `number` | | A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget` |
27
+ | `offset` | `offset` | `number` | 0 | A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget` |
28
28
  | `opened` | `opened` | `boolean` | false | True if the menu is currently displayed |
29
29
  | `position` | `position` | `Position[] \| undefined` | | Set position and align against the attach target. |
30
30
  | `positionTarget` | | `HTMLElement \| null` | null | Position next to the HTML element |
@@ -45,7 +45,7 @@ export type { OverlayMenuData };
45
45
  * @prop {number} [verticalOffset=0] - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
46
46
  *
47
47
  * @attr {number} offset - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
48
- * @prop {number} offset - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
48
+ * @prop {number} [offset=0] - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
49
49
  *
50
50
  * @attr {Position[] | undefined} position - Set position and align against the attach target.
51
51
  * @prop {Position[] | undefined} position - Set position and align against the attach target.
@@ -54,7 +54,7 @@ import { OpenedMenusManager } from './managers/menu-manager.js';
54
54
  * @prop {number} [verticalOffset=0] - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
55
55
  *
56
56
  * @attr {number} offset - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
57
- * @prop {number} offset - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
57
+ * @prop {number} [offset=0] - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
58
58
  *
59
59
  * @attr {Position[] | undefined} position - Set position and align against the attach target.
60
60
  * @prop {Position[] | undefined} position - Set position and align against the attach target.
@@ -8,16 +8,18 @@
8
8
  {
9
9
  "name": "value",
10
10
  "description": "Current page",
11
- "type": "string"
11
+ "type": "string",
12
+ "default": "\"\""
12
13
  },
13
14
  {
14
15
  "name": "max",
15
- "description": "Max page",
16
- "type": "string"
16
+ "description": "Maximum page limit",
17
+ "type": "string",
18
+ "default": "\"\""
17
19
  },
18
20
  {
19
21
  "name": "disabled",
20
- "description": "Set state to disable",
22
+ "description": "Set disabled state",
21
23
  "type": "boolean",
22
24
  "default": "false"
23
25
  }
@@ -27,18 +29,20 @@
27
29
  "name": "value",
28
30
  "attribute": "value",
29
31
  "description": "Current page",
30
- "type": "string"
32
+ "type": "string",
33
+ "default": "\"\""
31
34
  },
32
35
  {
33
36
  "name": "max",
34
37
  "attribute": "max",
35
- "description": "Max page",
36
- "type": "string"
38
+ "description": "Maximum page limit",
39
+ "type": "string",
40
+ "default": "\"\""
37
41
  },
38
42
  {
39
43
  "name": "disabled",
40
44
  "attribute": "disabled",
41
- "description": "Set state to disable",
45
+ "description": "Set disabled state",
42
46
  "type": "boolean",
43
47
  "default": "false"
44
48
  }
@@ -4,11 +4,11 @@ Used to control and navigate through multiple pages
4
4
 
5
5
  ## Properties
6
6
 
7
- | Property | Attribute | Type | Default | Description |
8
- |------------|------------|-----------|---------|----------------------|
9
- | `disabled` | `disabled` | `boolean` | false | Set state to disable |
10
- | `max` | `max` | `string` | | Max page |
11
- | `value` | `value` | `string` | | Current page |
7
+ | Property | Attribute | Type | Default | Description |
8
+ |------------|------------|-----------|---------|--------------------|
9
+ | `disabled` | `disabled` | `boolean` | false | Set disabled state |
10
+ | `max` | `max` | `string` | "" | Maximum page limit |
11
+ | `value` | `value` | `string` | "" | Current page |
12
12
 
13
13
  ## Methods
14
14
 
@@ -31,6 +31,7 @@ export declare class Pagination extends BasicElement {
31
31
  private get internalValue();
32
32
  /**
33
33
  * Current page
34
+ * @default -
34
35
  */
35
36
  get value(): string;
36
37
  /**
@@ -48,7 +49,8 @@ export declare class Pagination extends BasicElement {
48
49
  */
49
50
  private get internalMax();
50
51
  /**
51
- * Max page
52
+ * Maximum page limit
53
+ * @default -
52
54
  * @returns max page
53
55
  */
54
56
  get max(): string;
@@ -58,7 +60,7 @@ export declare class Pagination extends BasicElement {
58
60
  */
59
61
  set max(value: string);
60
62
  /**
61
- * Set state to disable
63
+ * Set disabled state
62
64
  */
63
65
  disabled: boolean;
64
66
  /**
@@ -31,7 +31,7 @@ let Pagination = class Pagination extends BasicElement {
31
31
  */
32
32
  this._max = '';
33
33
  /**
34
- * Set state to disable
34
+ * Set disabled state
35
35
  */
36
36
  this.disabled = false;
37
37
  /**
@@ -63,6 +63,7 @@ let Pagination = class Pagination extends BasicElement {
63
63
  }
64
64
  /**
65
65
  * Current page
66
+ * @default -
66
67
  */
67
68
  get value() {
68
69
  return this._value;
@@ -94,7 +95,8 @@ let Pagination = class Pagination extends BasicElement {
94
95
  return max >= 1 ? max : 1;
95
96
  }
96
97
  /**
97
- * Max page
98
+ * Maximum page limit
99
+ * @default -
98
100
  * @returns max page
99
101
  */
100
102
  get max() {
@@ -1,5 +1,5 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { PropertyValues, TemplateResult } from '@refinitiv-ui/core';
2
+ import { CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
3
  import { TemplateMap } from '@refinitiv-ui/core/directives/template-map.js';
4
4
  import '@refinitiv-ui/phrasebook/locale/en/password-field.js';
5
5
  import { Translate } from '@refinitiv-ui/translate';
@@ -49,6 +49,16 @@ export declare class PasswordField extends TextField {
49
49
  * Defines whether password is visible or not
50
50
  */
51
51
  private isPasswordVisible;
52
+ /**
53
+ * live region content presenting password field visibility state
54
+ */
55
+ private liveRegionContent;
56
+ /**
57
+ * A `CSSResultGroup` that will be used to style the host,
58
+ * slotted children and the internal template of the element.
59
+ * @returns CSS template
60
+ */
61
+ static get styles(): CSSResultGroup;
52
62
  /**
53
63
  * Called when the element’s DOM has been updated and rendered for the first time
54
64
  * @param changedProperties Properties that has changed
@@ -76,6 +86,18 @@ export declare class PasswordField extends TextField {
76
86
  * @returns {void}
77
87
  */
78
88
  protected renderIcon(): TemplateResult | null;
89
+ /**
90
+ * update live region content describing password visibility state
91
+ * @param event event trigging live region content update
92
+ * @return void
93
+ */
94
+ protected updateLiveRegionContent(event: Event): void;
95
+ /**
96
+ * Handle tap events of toggle password icon
97
+ * @param event custom event
98
+ * @returns {void}
99
+ */
100
+ protected onTogglePasswordTap(event: CustomEvent): void;
79
101
  /**
80
102
  * Toggles password visibility state
81
103
  * @return void
@@ -1,9 +1,10 @@
1
1
  import { __decorate } from "tslib";
2
- import { html } from '@refinitiv-ui/core';
2
+ import { html, unsafeCSS } from '@refinitiv-ui/core';
3
3
  import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
4
  import { state } from '@refinitiv-ui/core/decorators/state.js';
5
5
  import '@refinitiv-ui/phrasebook/locale/en/password-field.js';
6
6
  import { translate } from '@refinitiv-ui/translate';
7
+ import { VISUALLY_HIDDEN_STYLE } from '@refinitiv-ui/utils/accessibility.js';
7
8
  import '../icon/index.js';
8
9
  import { TextField } from '../text-field/index.js';
9
10
  import { deregisterOverflowTooltip } from '../tooltip/index.js';
@@ -49,6 +50,18 @@ let PasswordField = class PasswordField extends TextField {
49
50
  * Defines whether password is visible or not
50
51
  */
51
52
  this.isPasswordVisible = false;
53
+ /**
54
+ * live region content presenting password field visibility state
55
+ */
56
+ this.liveRegionContent = '';
57
+ }
58
+ /**
59
+ * A `CSSResultGroup` that will be used to style the host,
60
+ * slotted children and the internal template of the element.
61
+ * @returns CSS template
62
+ */
63
+ static get styles() {
64
+ return [super.styles, unsafeCSS(VISUALLY_HIDDEN_STYLE)];
52
65
  }
53
66
  /**
54
67
  * Called when the element’s DOM has been updated and rendered for the first time
@@ -95,14 +108,40 @@ let PasswordField = class PasswordField extends TextField {
95
108
  part="icon"
96
109
  role="button"
97
110
  tabindex="0"
98
- aria-label="${this.isPasswordVisible ? this.t('HIDE_PASSWORD') : this.t('SHOW_PASSWORD')}"
111
+ aria-pressed="${this.isPasswordVisible}"
112
+ aria-label="${this.t('SHOW_PASSWORD')}"
99
113
  icon=${this.isPasswordVisible ? 'eye-off' : 'eye'}
100
114
  ?readonly="${this.readonly}"
101
115
  ?disabled="${this.disabled}"
102
- @tap="${this.togglePasswordVisibility}"
116
+ @tap="${this.onTogglePasswordTap}"
117
+ @focus="${this.updateLiveRegionContent}"
118
+ @blur="${this.updateLiveRegionContent}"
103
119
  ></ef-icon>
120
+ <div part="live-region" aria-live="polite" class="visually-hidden">${this.liveRegionContent}</div>
104
121
  `;
105
122
  }
123
+ /**
124
+ * update live region content describing password visibility state
125
+ * @param event event trigging live region content update
126
+ * @return void
127
+ */
128
+ updateLiveRegionContent(event) {
129
+ this.liveRegionContent =
130
+ event.type === 'blur'
131
+ ? ''
132
+ : this.isPasswordVisible
133
+ ? this.t('SHOW_PASSWORD_ON')
134
+ : this.t('SHOW_PASSWORD_OFF');
135
+ }
136
+ /**
137
+ * Handle tap events of toggle password icon
138
+ * @param event custom event
139
+ * @returns {void}
140
+ */
141
+ onTogglePasswordTap(event) {
142
+ this.togglePasswordVisibility();
143
+ this.updateLiveRegionContent(event);
144
+ }
106
145
  /**
107
146
  * Toggles password visibility state
108
147
  * @return void
@@ -117,6 +156,9 @@ __decorate([
117
156
  __decorate([
118
157
  state()
119
158
  ], PasswordField.prototype, "isPasswordVisible", void 0);
159
+ __decorate([
160
+ state()
161
+ ], PasswordField.prototype, "liveRegionContent", void 0);
120
162
  PasswordField = __decorate([
121
163
  customElement('ef-password-field')
122
164
  ], PasswordField);
@@ -19,7 +19,7 @@
19
19
  },
20
20
  {
21
21
  "name": "active",
22
- "description": "Add to pill for active state",
22
+ "description": "Set active state",
23
23
  "type": "boolean",
24
24
  "default": "false"
25
25
  },
@@ -60,7 +60,7 @@
60
60
  {
61
61
  "name": "active",
62
62
  "attribute": "active",
63
- "description": "Add to pill for active state",
63
+ "description": "Set active state",
64
64
  "type": "boolean",
65
65
  "default": "false"
66
66
  },
@@ -6,14 +6,14 @@ It is rarely used in the UI but inside other components to visualize multiple it
6
6
 
7
7
  ## Properties
8
8
 
9
- | Property | Attribute | Type | Default | Description |
10
- |------------|------------|-----------|---------|------------------------------|
11
- | `active` | `active` | `boolean` | false | Add to pill for active state |
12
- | `clears` | `clears` | `boolean` | false | Set pill to clearable |
13
- | `disabled` | `disabled` | `boolean` | false | Set disabled state |
14
- | `readonly` | `readonly` | `boolean` | false | Set readonly state |
15
- | `toggles` | `toggles` | `boolean` | false | Set pill to toggle mode |
16
- | `value` | `value` | `string` | "" | Value of pill |
9
+ | Property | Attribute | Type | Default | Description |
10
+ |------------|------------|-----------|---------|-------------------------|
11
+ | `active` | `active` | `boolean` | false | Set active state |
12
+ | `clears` | `clears` | `boolean` | false | Set pill to clearable |
13
+ | `disabled` | `disabled` | `boolean` | false | Set disabled state |
14
+ | `readonly` | `readonly` | `boolean` | false | Set readonly state |
15
+ | `toggles` | `toggles` | `boolean` | false | Set pill to toggle mode |
16
+ | `value` | `value` | `string` | "" | Value of pill |
17
17
 
18
18
  ## Events
19
19