@refinitiv-ui/elements 7.6.2 → 7.8.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.
- package/CHANGELOG.md +22 -0
- package/lib/accordion/custom-elements.json +2 -2
- package/lib/accordion/custom-elements.md +2 -2
- package/lib/accordion/index.d.ts +2 -2
- package/lib/accordion/index.js +2 -2
- package/lib/appstate-bar/custom-elements.json +2 -2
- package/lib/appstate-bar/custom-elements.md +4 -4
- package/lib/appstate-bar/index.d.ts +1 -1
- package/lib/appstate-bar/index.js +1 -1
- package/lib/autosuggest/custom-elements.json +14 -9
- package/lib/autosuggest/custom-elements.md +15 -15
- package/lib/autosuggest/index.d.ts +10 -5
- package/lib/autosuggest/index.js +9 -4
- package/lib/button/custom-elements.json +6 -6
- package/lib/button/custom-elements.md +3 -3
- package/lib/button/index.d.ts +3 -4
- package/lib/button/index.js +3 -4
- package/lib/chart/custom-elements.json +1 -9
- package/lib/chart/custom-elements.md +8 -8
- package/lib/chart/elements/chart.d.ts +4 -4
- package/lib/chart/elements/chart.js +4 -4
- package/lib/checkbox/custom-elements.json +2 -2
- package/lib/checkbox/custom-elements.md +6 -6
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/index.js +1 -1
- package/lib/clock/custom-elements.json +6 -17
- package/lib/clock/custom-elements.md +1 -7
- package/lib/clock/index.d.ts +4 -2
- package/lib/clock/index.js +4 -2
- package/lib/collapse/custom-elements.json +2 -2
- package/lib/collapse/custom-elements.md +2 -2
- package/lib/collapse/index.d.ts +2 -2
- package/lib/collapse/index.js +2 -2
- package/lib/color-dialog/custom-elements.json +36 -6
- package/lib/color-dialog/custom-elements.md +24 -22
- package/lib/color-dialog/index.d.ts +3 -2
- package/lib/color-dialog/index.js +3 -2
- package/lib/combo-box/custom-elements.json +10 -21
- package/lib/combo-box/custom-elements.md +3 -4
- package/lib/combo-box/helpers/filter.d.ts +1 -1
- package/lib/combo-box/helpers/types.d.ts +1 -1
- package/lib/combo-box/index.d.ts +6 -8
- package/lib/combo-box/index.js +4 -6
- package/lib/configuration/custom-elements.json +11 -1
- package/lib/configuration/custom-elements.md +3 -3
- package/lib/configuration/elements/configuration.d.ts +3 -0
- package/lib/configuration/elements/configuration.js +3 -0
- package/lib/counter/custom-elements.json +1 -1
- package/lib/counter/custom-elements.md +1 -1
- package/lib/counter/index.d.ts +1 -1
- package/lib/counter/index.js +1 -1
- package/lib/datetime-picker/custom-elements.json +5 -5
- package/lib/datetime-picker/custom-elements.md +3 -3
- package/lib/datetime-picker/index.d.ts +3 -3
- package/lib/datetime-picker/index.js +3 -3
- package/lib/header/custom-elements.json +2 -2
- package/lib/header/custom-elements.md +2 -2
- package/lib/header/index.d.ts +2 -2
- package/lib/header/index.js +2 -2
- package/lib/heatmap/custom-elements.json +1 -1
- package/lib/heatmap/custom-elements.md +3 -3
- package/lib/heatmap/index.d.ts +2 -2
- package/lib/heatmap/index.js +2 -2
- package/lib/interactive-chart/custom-elements.md +3 -3
- package/lib/interactive-chart/helpers/types.d.ts +1 -1
- package/lib/interactive-chart/index.d.ts +2 -2
- package/lib/interactive-chart/index.js +1 -1
- package/lib/item/custom-elements.json +2 -1
- package/lib/item/custom-elements.md +1 -1
- package/lib/item/index.d.ts +1 -0
- package/lib/item/index.js +1 -0
- package/lib/label/custom-elements.json +4 -4
- package/lib/label/custom-elements.md +2 -2
- package/lib/label/index.d.ts +2 -2
- package/lib/label/index.js +2 -2
- package/lib/list/custom-elements.md +8 -8
- package/lib/list/elements/list.d.ts +4 -4
- package/lib/list/elements/list.js +20 -13
- package/lib/list/helpers/types.d.ts +1 -1
- package/lib/list/renderer.d.ts +1 -1
- package/lib/multi-input/custom-elements.json +4 -4
- package/lib/multi-input/custom-elements.md +2 -2
- package/lib/multi-input/index.d.ts +2 -2
- package/lib/multi-input/index.js +2 -2
- package/lib/number-field/index.d.ts +27 -0
- package/lib/number-field/index.js +37 -7
- package/lib/overlay/custom-elements.json +10 -6
- package/lib/overlay/custom-elements.md +29 -29
- package/lib/overlay/elements/overlay.d.ts +6 -0
- package/lib/overlay/elements/overlay.js +6 -0
- package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
- package/lib/overlay/managers/viewport-manager.d.ts +1 -1
- package/lib/overlay/managers/viewport-manager.js +1 -0
- package/lib/overlay-menu/custom-elements.json +4 -2
- package/lib/overlay-menu/custom-elements.md +1 -1
- package/lib/overlay-menu/helpers/types.d.ts +1 -1
- package/lib/overlay-menu/index.d.ts +1 -1
- package/lib/overlay-menu/index.js +1 -1
- package/lib/overlay-menu/managers/menu-manager.d.ts +1 -1
- package/lib/pagination/custom-elements.json +12 -8
- package/lib/pagination/custom-elements.md +5 -5
- package/lib/pagination/index.d.ts +4 -2
- package/lib/pagination/index.js +4 -2
- package/lib/password-field/index.d.ts +23 -1
- package/lib/password-field/index.js +45 -3
- package/lib/pill/custom-elements.json +2 -2
- package/lib/pill/custom-elements.md +8 -8
- package/lib/pill/index.d.ts +1 -1
- package/lib/pill/index.js +1 -1
- package/lib/select/custom-elements.json +5 -5
- package/lib/select/custom-elements.md +10 -10
- package/lib/select/index.d.ts +3 -3
- package/lib/select/index.js +3 -3
- package/lib/sidebar-layout/index.d.ts +1 -1
- package/lib/slider/custom-elements.json +2 -2
- package/lib/slider/custom-elements.md +1 -1
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/index.js +1 -1
- package/lib/swing-gauge/custom-elements.json +8 -4
- package/lib/swing-gauge/custom-elements.md +2 -2
- package/lib/swing-gauge/index.d.ts +2 -0
- package/lib/swing-gauge/index.js +2 -0
- package/lib/time-picker/custom-elements.json +6 -4
- package/lib/time-picker/custom-elements.md +3 -3
- package/lib/time-picker/index.d.ts +4 -1
- package/lib/time-picker/index.js +4 -1
- package/lib/toggle/custom-elements.json +2 -2
- package/lib/toggle/custom-elements.md +7 -7
- package/lib/toggle/index.d.ts +1 -1
- package/lib/toggle/index.js +1 -1
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/tree/elements/tree-item.d.ts +1 -1
- package/lib/tree/elements/tree.d.ts +1 -1
- package/lib/tree/managers/tree-manager.d.ts +1 -1
- package/lib/tree-select/index.d.ts +3 -3
- package/lib/version.js +1 -1
- package/package.json +28 -27
- package/cli.mjs +0 -23
|
@@ -8,7 +8,7 @@ An input control component to display a selection of pills
|
|
|
8
8
|
|---------------------|---------------|--------------------------|---------|------------------------------------------------|
|
|
9
9
|
| `data` | | `MultiInputData \| null` | null | The data object, used to render the list. |
|
|
10
10
|
| `disabled` | `disabled` | `boolean` | false | Set disabled state |
|
|
11
|
-
| `error` | `error` | `boolean` | false | Set state
|
|
11
|
+
| `error` | `error` | `boolean` | false | Set error state |
|
|
12
12
|
| `icon` | `icon` | `string` | "" | Specify icon to display inside input box |
|
|
13
13
|
| `maxLength` | `maxlength` | `number \| null` | null | Set character max limit |
|
|
14
14
|
| `minLength` | `minlength` | `number \| null` | null | Set character min limit |
|
|
@@ -19,7 +19,7 @@ An input control component to display a selection of pills
|
|
|
19
19
|
| `selectionStart` | | `number \| null` | null | Selection start index |
|
|
20
20
|
| `value` | `value` | `string` | "" | Current value of text field |
|
|
21
21
|
| `values (readonly)` | | `string[]` | [] | Array of item's values ( readonly ) |
|
|
22
|
-
| `warning` | `warning` | `boolean` | false | Set state
|
|
22
|
+
| `warning` | `warning` | `boolean` | false | Set warning state |
|
|
23
23
|
|
|
24
24
|
## Methods
|
|
25
25
|
|
|
@@ -56,11 +56,11 @@ export declare class MultiInput extends ControlElement implements MultiValue {
|
|
|
56
56
|
*/
|
|
57
57
|
placeholder: string;
|
|
58
58
|
/**
|
|
59
|
-
* Set state
|
|
59
|
+
* Set error state
|
|
60
60
|
*/
|
|
61
61
|
error: boolean;
|
|
62
62
|
/**
|
|
63
|
-
* Set state
|
|
63
|
+
* Set warning state
|
|
64
64
|
*/
|
|
65
65
|
warning: boolean;
|
|
66
66
|
/**
|
package/lib/multi-input/index.js
CHANGED
|
@@ -43,11 +43,11 @@ let MultiInput = class MultiInput extends ControlElement {
|
|
|
43
43
|
*/
|
|
44
44
|
this.placeholder = '';
|
|
45
45
|
/**
|
|
46
|
-
* Set state
|
|
46
|
+
* Set error state
|
|
47
47
|
*/
|
|
48
48
|
this.error = false;
|
|
49
49
|
/**
|
|
50
|
-
* Set state
|
|
50
|
+
* Set warning state
|
|
51
51
|
*/
|
|
52
52
|
this.warning = false;
|
|
53
53
|
/**
|
|
@@ -49,6 +49,14 @@ export declare class NumberField extends FormFieldElement {
|
|
|
49
49
|
* @return CSS template
|
|
50
50
|
*/
|
|
51
51
|
static get styles(): CSSResultGroup;
|
|
52
|
+
/**
|
|
53
|
+
* Time period (ms) before press repetition starts
|
|
54
|
+
*/
|
|
55
|
+
private repeatDelay;
|
|
56
|
+
/**
|
|
57
|
+
* Time period (ms) between each repeat
|
|
58
|
+
*/
|
|
59
|
+
private repeatRate;
|
|
52
60
|
/**
|
|
53
61
|
* Set spinner's visibility
|
|
54
62
|
*/
|
|
@@ -87,6 +95,20 @@ export declare class NumberField extends FormFieldElement {
|
|
|
87
95
|
* Get spinner down element
|
|
88
96
|
*/
|
|
89
97
|
private spinnerDownEl?;
|
|
98
|
+
/**
|
|
99
|
+
* An object's returned from setTimeout to use with repeat delay.
|
|
100
|
+
*/
|
|
101
|
+
private repeatDelayTimer;
|
|
102
|
+
/**
|
|
103
|
+
* An object's returned from setInterval to use with repeat rate.
|
|
104
|
+
*/
|
|
105
|
+
private repeatRateTimer;
|
|
106
|
+
/**
|
|
107
|
+
* Called after the component is first rendered
|
|
108
|
+
* @param changedProperties Properties which have changed
|
|
109
|
+
* @returns {void}
|
|
110
|
+
*/
|
|
111
|
+
protected firstUpdated(changedProperties: PropertyValues): void;
|
|
90
112
|
/**
|
|
91
113
|
* Updates the element
|
|
92
114
|
* @param changedProperties Properties that has changed
|
|
@@ -164,6 +186,11 @@ export declare class NumberField extends FormFieldElement {
|
|
|
164
186
|
* @returns {void}
|
|
165
187
|
*/
|
|
166
188
|
protected onSpinnerTap(event: TapEvent): void;
|
|
189
|
+
/**
|
|
190
|
+
* Clear repeatDelayTimer and repeatRateTimer if exist
|
|
191
|
+
* @returns {void}
|
|
192
|
+
*/
|
|
193
|
+
protected clearTimer: () => void;
|
|
167
194
|
/**
|
|
168
195
|
* Step down or up and notify value change
|
|
169
196
|
* @param direction Up or Down
|
|
@@ -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
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
this.
|
|
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" @
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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
|
|
8
|
-
|
|
9
|
-
| `focusBoundary` | |
|
|
10
|
-
| `fullScreen` | `full-screen` | `boolean`
|
|
11
|
-
| `fullyOpened (readonly)` | | `boolean`
|
|
12
|
-
| `horizontalOffset` | `horizontal-offset` | `number`
|
|
13
|
-
| `interactiveElements` | | `
|
|
14
|
-
| `lockPositionTarget` | `lock-position-target` | `boolean`
|
|
15
|
-
| `noAutofocus` | `no-autofocus` | `boolean`
|
|
16
|
-
| `noCancelOnEscKey` | `no-cancel-on-esc-key` | `boolean`
|
|
17
|
-
| `noCancelOnOutsideClick` | `no-cancel-on-outside-click` | `boolean`
|
|
18
|
-
| `noFocusManagement` | `no-focus-management` | `boolean`
|
|
19
|
-
| `noInteractionLock` | `no-interaction-lock` | `boolean`
|
|
20
|
-
| `noOverlap` | `no-overlap` | `boolean`
|
|
21
|
-
| `offset` | `offset` | `number`
|
|
22
|
-
| `opened` | `opened` | `boolean`
|
|
23
|
-
| `position` | `position` | `
|
|
24
|
-
| `positionTarget` | `position-target` | `PositionTarget\|null\|undefined`
|
|
25
|
-
| `positionTargetConfig (readonly)` | |
|
|
26
|
-
| `spacing` | `spacing` | `boolean`
|
|
27
|
-
| `transitionStyle` | `transition-style` | `TransitionStyle\|null\|undefined`
|
|
28
|
-
| `transitioning (readonly)` | | `boolean`
|
|
29
|
-
| `transparent` | `transparent` | `boolean`
|
|
30
|
-
| `verticalOffset` | `vertical-offset` | `number`
|
|
31
|
-
| `withBackdrop` | `with-backdrop` | `boolean`
|
|
32
|
-
| `withShadow` | `with-shadow` | `boolean`
|
|
33
|
-
| `x` | `x` | `number\|null\|undefined`
|
|
34
|
-
| `y` | `y` | `number\|null\|undefined`
|
|
35
|
-
| `zIndex` | `z-index` | `number\|null\|undefined`
|
|
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() {
|
|
@@ -95,6 +95,7 @@ export class ViewportManager {
|
|
|
95
95
|
// Safari does but zooming doesn't update this property value
|
|
96
96
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
97
97
|
// @ts-ignore
|
|
98
|
+
// TODO: Remove @ts-ignore and re-test again when standardized zoom is implemented across major browsers and TypeScript, https://github.com/w3c/csswg-drafts/issues/5623
|
|
98
99
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
99
100
|
const zoom = parseFloat(window.getComputedStyle(document.body).zoom);
|
|
100
101
|
const screenHeight = screenRect.height / zoom;
|
|
@@ -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` |
|
|
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 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { CollectionComposer } from '@refinitiv-ui/utils/collection.js';
|
|
1
2
|
import type { Item, ItemData } from '../../item';
|
|
2
3
|
import type { OverlayMenu } from '../index';
|
|
3
|
-
import type { CollectionComposer } from '@refinitiv-ui/utils/collection.js';
|
|
4
4
|
export type NestedMenu = {
|
|
5
5
|
menu: OverlayMenu;
|
|
6
6
|
item: Item;
|
|
@@ -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": "
|
|
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
|
|
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": "
|
|
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
|
|
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
|
|
10
|
-
| `max` | `max` | `string` |
|
|
11
|
-
| `value` | `value` | `string` |
|
|
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
|
-
*
|
|
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
|
|
63
|
+
* Set disabled state
|
|
62
64
|
*/
|
|
63
65
|
disabled: boolean;
|
|
64
66
|
/**
|
package/lib/pagination/index.js
CHANGED
|
@@ -31,7 +31,7 @@ let Pagination = class Pagination extends BasicElement {
|
|
|
31
31
|
*/
|
|
32
32
|
this._max = '';
|
|
33
33
|
/**
|
|
34
|
-
* Set state
|
|
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
|
-
*
|
|
98
|
+
* Maximum page limit
|
|
99
|
+
* @default -
|
|
98
100
|
* @returns max page
|
|
99
101
|
*/
|
|
100
102
|
get max() {
|