@refinitiv-ui/elements 5.5.0 → 5.8.1
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 +65 -8
- package/lib/accordion/custom-elements.md +18 -0
- package/lib/accordion/index.d.ts +5 -5
- package/lib/accordion/index.js +8 -11
- package/lib/appstate-bar/custom-elements.md +22 -0
- package/lib/appstate-bar/index.d.ts +5 -5
- package/lib/appstate-bar/index.js +8 -11
- package/lib/autosuggest/custom-elements.json +24 -4
- package/lib/autosuggest/custom-elements.md +54 -0
- package/lib/autosuggest/helpers/types.d.ts +1 -1
- package/lib/autosuggest/helpers/utils.d.ts +2 -2
- package/lib/autosuggest/helpers/utils.js +1 -2
- package/lib/autosuggest/index.d.ts +13 -8
- package/lib/autosuggest/index.js +38 -31
- package/lib/button/custom-elements.json +2 -2
- package/lib/button/custom-elements.md +23 -0
- package/lib/button/index.d.ts +13 -13
- package/lib/button/index.js +41 -31
- package/lib/button-bar/custom-elements.md +9 -0
- package/lib/button-bar/index.d.ts +3 -3
- package/lib/button-bar/index.js +8 -10
- package/lib/calendar/constants.d.ts +22 -0
- package/lib/calendar/constants.js +23 -0
- package/lib/calendar/custom-elements.json +8 -6
- package/lib/calendar/custom-elements.md +35 -0
- package/lib/calendar/index.d.ts +9 -7
- package/lib/calendar/index.js +20 -38
- package/lib/calendar/locales.d.ts +1 -31
- package/lib/calendar/locales.js +0 -104
- package/lib/calendar/types.d.ts +1 -5
- package/lib/calendar/types.js +1 -6
- package/lib/calendar/utils.d.ts +31 -1
- package/lib/calendar/utils.js +104 -2
- package/lib/canvas/custom-elements.json +7 -5
- package/lib/canvas/custom-elements.md +27 -0
- package/lib/canvas/index.d.ts +4 -3
- package/lib/canvas/index.js +8 -10
- package/lib/card/custom-elements.json +3 -1
- package/lib/card/custom-elements.md +24 -0
- package/lib/card/helpers/types.d.ts +1 -1
- package/lib/card/index.d.ts +10 -8
- package/lib/card/index.js +14 -13
- package/lib/chart/custom-elements.json +1 -1
- package/lib/chart/custom-elements.md +16 -0
- package/lib/chart/helpers/index.d.ts +2 -2
- package/lib/chart/helpers/index.js +2 -2
- package/lib/chart/index.d.ts +6 -6
- package/lib/chart/index.js +12 -14
- package/lib/checkbox/custom-elements.json +4 -4
- package/lib/checkbox/custom-elements.md +18 -0
- package/lib/checkbox/index.d.ts +21 -13
- package/lib/checkbox/index.js +56 -31
- package/lib/clock/custom-elements.json +21 -4
- package/lib/clock/custom-elements.md +28 -0
- package/lib/clock/index.d.ts +17 -5
- package/lib/clock/index.js +37 -18
- package/lib/clock/themes/halo/dark/index.js +1 -1
- package/lib/clock/themes/halo/light/index.js +1 -1
- package/lib/clock/themes/solar/charcoal/index.js +1 -1
- package/lib/clock/themes/solar/pearl/index.js +1 -1
- package/lib/clock/utils/TickManager.js +2 -2
- package/lib/collapse/custom-elements.md +27 -0
- package/lib/collapse/index.d.ts +7 -7
- package/lib/collapse/index.js +11 -13
- package/lib/color-dialog/custom-elements.json +29 -16
- package/lib/color-dialog/custom-elements.md +39 -0
- package/lib/color-dialog/elements/color-palettes.d.ts +5 -5
- package/lib/color-dialog/elements/color-palettes.js +8 -12
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -5
- package/lib/color-dialog/elements/grayscale-palettes.js +9 -12
- package/lib/color-dialog/elements/palettes.d.ts +3 -3
- package/lib/color-dialog/elements/palettes.js +49 -47
- package/lib/color-dialog/helpers/value-model.js +2 -2
- package/lib/color-dialog/index.d.ts +19 -19
- package/lib/color-dialog/index.js +36 -35
- package/lib/combo-box/custom-elements.json +28 -16
- package/lib/combo-box/custom-elements.md +35 -0
- package/lib/combo-box/helpers/filter.d.ts +4 -4
- package/lib/combo-box/helpers/types.d.ts +2 -2
- package/lib/combo-box/index.d.ts +26 -18
- package/lib/combo-box/index.js +36 -27
- package/lib/combo-box/themes/halo/dark/index.js +1 -1
- package/lib/combo-box/themes/halo/light/index.js +1 -1
- package/lib/combo-box/themes/solar/charcoal/index.js +1 -1
- package/lib/combo-box/themes/solar/pearl/index.js +1 -1
- package/lib/counter/custom-elements.json +8 -4
- package/lib/counter/custom-elements.md +11 -0
- package/lib/counter/index.d.ts +5 -3
- package/lib/counter/index.js +11 -12
- package/lib/datetime-picker/custom-elements.json +52 -23
- package/lib/datetime-picker/custom-elements.md +57 -0
- package/lib/datetime-picker/index.d.ts +25 -14
- package/lib/datetime-picker/index.js +46 -35
- package/lib/datetime-picker/locales.d.ts +1 -1
- package/lib/datetime-picker/locales.js +12 -1
- package/lib/datetime-picker/types.d.ts +1 -1
- package/lib/datetime-picker/utils.js +1 -1
- package/lib/dialog/custom-elements.json +34 -12
- package/lib/dialog/custom-elements.md +47 -0
- package/lib/dialog/index.d.ts +17 -20
- package/lib/dialog/index.js +28 -31
- package/lib/email-field/custom-elements.json +81 -94
- package/lib/email-field/custom-elements.md +37 -0
- package/lib/email-field/index.d.ts +44 -116
- package/lib/email-field/index.js +48 -249
- package/lib/events.d.ts +2 -2
- package/lib/events.js +1 -2
- package/lib/flag/custom-elements.md +10 -0
- package/lib/flag/index.d.ts +6 -4
- package/lib/flag/index.js +12 -12
- package/lib/flag/utils/FlagLoader.d.ts +1 -1
- package/lib/flag/utils/FlagLoader.js +1 -1
- package/lib/header/custom-elements.md +18 -0
- package/lib/header/index.d.ts +2 -2
- package/lib/header/index.js +5 -8
- package/lib/heatmap/custom-elements.md +26 -0
- package/lib/heatmap/helpers/color.d.ts +1 -1
- package/lib/heatmap/helpers/color.js +1 -1
- package/lib/heatmap/helpers/text.d.ts +1 -1
- package/lib/heatmap/index.d.ts +7 -7
- package/lib/heatmap/index.js +15 -16
- package/lib/icon/custom-elements.json +6 -4
- package/lib/icon/custom-elements.md +8 -0
- package/lib/icon/index.d.ts +9 -6
- package/lib/icon/index.js +28 -18
- package/lib/icon/utils/IconLoader.d.ts +6 -1
- package/lib/icon/utils/IconLoader.js +24 -17
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/interactive-chart/custom-elements.json +6 -10
- package/lib/interactive-chart/custom-elements.md +31 -0
- package/lib/interactive-chart/helpers/types.d.ts +2 -2
- package/lib/interactive-chart/index.d.ts +11 -8
- package/lib/interactive-chart/index.js +17 -17
- package/lib/item/custom-elements.json +4 -4
- package/lib/item/custom-elements.md +29 -0
- package/lib/item/helpers/types.d.ts +1 -1
- package/lib/item/index.d.ts +18 -8
- package/lib/item/index.js +36 -16
- package/lib/label/custom-elements.md +11 -0
- package/lib/label/index.d.ts +3 -3
- package/lib/label/index.js +12 -20
- package/lib/layout/custom-elements.md +26 -0
- package/lib/layout/index.d.ts +3 -3
- package/lib/layout/index.js +6 -9
- package/lib/led-gauge/custom-elements.json +4 -4
- package/lib/led-gauge/custom-elements.md +17 -0
- package/lib/led-gauge/index.d.ts +5 -4
- package/lib/led-gauge/index.js +9 -11
- package/lib/list/custom-elements.json +18 -5
- package/lib/list/custom-elements.md +32 -0
- package/lib/list/helpers/list-renderer.d.ts +2 -2
- package/lib/list/helpers/list-renderer.js +4 -2
- package/lib/list/helpers/types.d.ts +2 -2
- package/lib/list/index.d.ts +27 -10
- package/lib/list/index.js +54 -25
- package/lib/list/renderer.d.ts +2 -2
- package/lib/list/renderer.js +1 -1
- package/lib/loader/custom-elements.md +5 -0
- package/lib/loader/index.js +4 -8
- package/lib/multi-input/custom-elements.json +7 -6
- package/lib/multi-input/custom-elements.md +43 -0
- package/lib/multi-input/helpers/types.d.ts +1 -1
- package/lib/multi-input/index.d.ts +11 -7
- package/lib/multi-input/index.js +20 -17
- package/lib/notification/custom-elements.md +26 -0
- package/lib/notification/elements/notification-tray.d.ts +2 -2
- package/lib/notification/elements/notification-tray.js +6 -9
- package/lib/notification/elements/notification.d.ts +5 -5
- package/lib/notification/elements/notification.js +8 -11
- package/lib/notification/helpers/status.d.ts +1 -1
- package/lib/notification/helpers/status.js +1 -1
- package/lib/notification/helpers/types.d.ts +1 -1
- package/lib/notification/index.d.ts +2 -2
- package/lib/notification/index.js +2 -2
- package/lib/number-field/custom-elements.json +99 -54
- package/lib/number-field/custom-elements.md +42 -0
- package/lib/number-field/index.d.ts +96 -51
- package/lib/number-field/index.js +121 -89
- package/lib/overlay/custom-elements.json +26 -13
- package/lib/overlay/custom-elements.md +54 -0
- package/lib/overlay/elements/overlay-backdrop.d.ts +4 -4
- package/lib/overlay/elements/overlay-backdrop.js +6 -9
- package/lib/overlay/elements/overlay-viewport.d.ts +3 -3
- package/lib/overlay/elements/overlay-viewport.js +5 -9
- package/lib/overlay/elements/overlay.d.ts +10 -5
- package/lib/overlay/elements/overlay.js +18 -23
- package/lib/overlay/index.d.ts +2 -2
- package/lib/overlay/index.js +1 -1
- package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
- package/lib/overlay/managers/backdrop-manager.js +2 -2
- package/lib/overlay/managers/close-manager.js +1 -1
- package/lib/overlay/managers/focus-manager.js +2 -2
- package/lib/overlay/managers/interaction-lock-manager.js +2 -2
- package/lib/overlay/managers/viewport-manager.d.ts +2 -2
- package/lib/overlay/managers/viewport-manager.js +6 -2
- package/lib/overlay/managers/zindex-manager.js +1 -1
- package/lib/overlay-menu/custom-elements.json +70 -20
- package/lib/overlay-menu/custom-elements.md +44 -0
- package/lib/overlay-menu/helpers/types.d.ts +3 -3
- package/lib/overlay-menu/index.d.ts +21 -19
- package/lib/overlay-menu/index.js +32 -31
- package/lib/overlay-menu/managers/menu-manager.d.ts +2 -2
- package/lib/overlay-menu/managers/menu-manager.js +3 -3
- package/lib/pagination/custom-elements.md +27 -0
- package/lib/pagination/index.d.ts +8 -8
- package/lib/pagination/index.js +13 -15
- package/lib/panel/custom-elements.md +11 -0
- package/lib/panel/index.d.ts +3 -3
- package/lib/panel/index.js +6 -9
- package/lib/password-field/custom-elements.json +62 -67
- package/lib/password-field/custom-elements.md +39 -0
- package/lib/password-field/index.d.ts +43 -94
- package/lib/password-field/index.js +52 -198
- package/lib/pill/custom-elements.json +8 -6
- package/lib/pill/custom-elements.md +22 -0
- package/lib/pill/index.d.ts +5 -5
- package/lib/pill/index.js +9 -11
- package/lib/progress-bar/custom-elements.md +18 -0
- package/lib/progress-bar/index.d.ts +3 -3
- package/lib/progress-bar/index.js +7 -9
- package/lib/radio-button/custom-elements.json +4 -4
- package/lib/radio-button/custom-elements.md +19 -0
- package/lib/radio-button/index.d.ts +25 -8
- package/lib/radio-button/index.js +84 -21
- package/lib/radio-button/radio-button-registry.d.ts +3 -2
- package/lib/radio-button/radio-button-registry.js +57 -4
- package/lib/rating/custom-elements.md +17 -0
- package/lib/rating/index.d.ts +3 -3
- package/lib/rating/index.js +9 -10
- package/lib/search-field/custom-elements.json +70 -74
- package/lib/search-field/custom-elements.md +41 -0
- package/lib/search-field/index.d.ts +44 -101
- package/lib/search-field/index.js +50 -220
- package/lib/select/custom-elements.json +5 -4
- package/lib/select/custom-elements.md +24 -0
- package/lib/select/helpers/types.d.ts +1 -1
- package/lib/select/index.d.ts +18 -10
- package/lib/select/index.js +84 -45
- package/lib/sidebar-layout/custom-elements.json +2 -6
- package/lib/sidebar-layout/custom-elements.md +21 -0
- package/lib/sidebar-layout/index.d.ts +7 -6
- package/lib/sidebar-layout/index.js +9 -10
- package/lib/slider/custom-elements.json +4 -4
- package/lib/slider/custom-elements.md +28 -0
- package/lib/slider/index.d.ts +4 -4
- package/lib/slider/index.js +9 -10
- package/lib/sparkline/custom-elements.json +4 -4
- package/lib/sparkline/custom-elements.md +16 -0
- package/lib/sparkline/index.d.ts +6 -4
- package/lib/sparkline/index.js +10 -10
- package/lib/swing-gauge/custom-elements.json +5 -3
- package/lib/swing-gauge/custom-elements.md +17 -0
- package/lib/swing-gauge/helpers.d.ts +1 -1
- package/lib/swing-gauge/helpers.js +1 -1
- package/lib/swing-gauge/index.d.ts +9 -7
- package/lib/swing-gauge/index.js +17 -15
- package/lib/tab/custom-elements.json +2 -2
- package/lib/tab/custom-elements.md +22 -0
- package/lib/tab/index.d.ts +5 -5
- package/lib/tab/index.js +9 -12
- package/lib/tab-bar/custom-elements.md +11 -0
- package/lib/tab-bar/index.d.ts +4 -4
- package/lib/tab-bar/index.js +9 -11
- package/lib/text-field/custom-elements.json +78 -89
- package/lib/text-field/custom-elements.md +35 -0
- package/lib/text-field/index.d.ts +59 -79
- package/lib/text-field/index.js +99 -158
- package/lib/time-picker/custom-elements.json +4 -4
- package/lib/time-picker/custom-elements.md +28 -0
- package/lib/time-picker/index.d.ts +7 -4
- package/lib/time-picker/index.js +15 -14
- package/lib/toggle/custom-elements.json +4 -4
- package/lib/toggle/custom-elements.md +19 -0
- package/lib/toggle/index.d.ts +14 -4
- package/lib/toggle/index.js +31 -12
- package/lib/tooltip/custom-elements.md +14 -0
- package/lib/tooltip/elements/title-tooltip.js +2 -2
- package/lib/tooltip/elements/tooltip-element.d.ts +1 -1
- package/lib/tooltip/helpers/overflow-tooltip.d.ts +1 -1
- package/lib/tooltip/helpers/overflow-tooltip.js +1 -1
- package/lib/tooltip/helpers/renderer.d.ts +1 -1
- package/lib/tooltip/helpers/types.d.ts +1 -1
- package/lib/tooltip/index.d.ts +9 -9
- package/lib/tooltip/index.js +18 -20
- package/lib/tooltip/managers/tooltip-manager.d.ts +2 -2
- package/lib/tooltip/managers/tooltip-manager.js +3 -7
- package/lib/tornado-chart/custom-elements.md +18 -0
- package/lib/tornado-chart/elements/tornado-chart.d.ts +4 -4
- package/lib/tornado-chart/elements/tornado-chart.js +8 -11
- package/lib/tornado-chart/elements/tornado-item.d.ts +5 -5
- package/lib/tornado-chart/elements/tornado-item.js +10 -12
- package/lib/tornado-chart/index.d.ts +2 -2
- package/lib/tornado-chart/index.js +2 -2
- package/lib/tree/custom-elements.json +4 -3
- package/lib/tree/custom-elements.md +32 -0
- package/lib/tree/elements/tree-item.d.ts +4 -4
- package/lib/tree/elements/tree-item.js +10 -13
- package/lib/tree/elements/tree.d.ts +6 -5
- package/lib/tree/elements/tree.js +9 -12
- package/lib/tree/helpers/filter.d.ts +2 -2
- package/lib/tree/helpers/renderer.d.ts +2 -2
- package/lib/tree/helpers/renderer.js +3 -3
- package/lib/tree/helpers/types.d.ts +1 -1
- package/lib/tree/index.d.ts +4 -4
- package/lib/tree/index.js +3 -3
- package/lib/tree/managers/tree-manager.d.ts +22 -10
- package/lib/tree/managers/tree-manager.js +56 -40
- package/lib/tree/themes/halo/dark/index.js +1 -1
- package/lib/tree/themes/halo/light/index.js +1 -1
- package/lib/tree/themes/solar/charcoal/index.js +1 -1
- package/lib/tree/themes/solar/pearl/index.js +1 -1
- package/lib/tree-select/custom-elements.json +10 -6
- package/lib/tree-select/custom-elements.md +26 -0
- package/lib/tree-select/helpers/types.d.ts +2 -2
- package/lib/tree-select/index.d.ts +28 -20
- package/lib/tree-select/index.js +44 -31
- package/lib/tree-select/themes/halo/dark/index.js +1 -1
- package/lib/tree-select/themes/halo/light/index.js +1 -1
- package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
- package/lib/tree-select/themes/solar/pearl/index.js +1 -1
- package/lib/version.d.ts +1 -0
- package/lib/version.js +1 -0
- package/package.json +298 -15
- package/lib/autosuggest/helpers/const.d.ts +0 -2
- package/lib/autosuggest/helpers/const.js +0 -3
- package/lib/overlay-menu/helpers/uuid.d.ts +0 -7
- package/lib/overlay-menu/helpers/uuid.js +0 -13
package/lib/item/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import
|
|
8
|
-
import '../
|
|
9
|
-
import '../checkbox';
|
|
10
|
-
import { VERSION } from '../';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { ControlElement, css, html } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
5
|
+
import { query } from '@refinitiv-ui/core/lib/decorators/query.js';
|
|
6
|
+
import { VERSION } from '../version.js';
|
|
7
|
+
import '../icon/index.js';
|
|
8
|
+
import '../checkbox/index.js';
|
|
11
9
|
export * from './helpers/types';
|
|
12
10
|
const isAllWhitespaceTextNode = (node) => {
|
|
13
11
|
var _a;
|
|
@@ -20,7 +18,7 @@ const isAllWhitespaceTextNode = (node) => {
|
|
|
20
18
|
* to create simple menus or navigation panels.
|
|
21
19
|
*
|
|
22
20
|
* @attr {string} value - The content of this attribute represents the value of the item.
|
|
23
|
-
* @prop {string} [value=] - The content of this attribute represents the value of the item.
|
|
21
|
+
* @prop {string} [value=""] - The content of this attribute represents the value of the item.
|
|
24
22
|
*
|
|
25
23
|
* @attr {boolean} disabled - Set disabled state.
|
|
26
24
|
* @prop {boolean} [disabled=false] - Set disabled state.
|
|
@@ -45,10 +43,12 @@ let Item = class Item extends ControlElement {
|
|
|
45
43
|
* Set the icon name from the ef-icon list
|
|
46
44
|
*/
|
|
47
45
|
this.icon = null;
|
|
46
|
+
this._selected = false;
|
|
48
47
|
/**
|
|
49
|
-
*
|
|
48
|
+
* Aria indicating current select state
|
|
49
|
+
* @ignore
|
|
50
50
|
*/
|
|
51
|
-
this.
|
|
51
|
+
this.ariaSelected = 'false';
|
|
52
52
|
/**
|
|
53
53
|
* Is the item part of a multiple selection
|
|
54
54
|
*/
|
|
@@ -77,7 +77,7 @@ let Item = class Item extends ControlElement {
|
|
|
77
77
|
this.checkSlotChildren = (event) => {
|
|
78
78
|
const slot = event.target;
|
|
79
79
|
this.isSlotEmpty = !slot.assignedNodes().filter(node => !this.isIgnorable(node)).length;
|
|
80
|
-
|
|
80
|
+
this.requestUpdate();
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
@@ -88,8 +88,9 @@ let Item = class Item extends ControlElement {
|
|
|
88
88
|
return VERSION;
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* `CSSResultGroup` that will be used to style the host,
|
|
92
92
|
* slotted children and the internal template of the element.
|
|
93
|
+
* @returns CSS template
|
|
93
94
|
*/
|
|
94
95
|
static get styles() {
|
|
95
96
|
return css `
|
|
@@ -113,6 +114,22 @@ let Item = class Item extends ControlElement {
|
|
|
113
114
|
}
|
|
114
115
|
`;
|
|
115
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Indicates that the item is selected
|
|
119
|
+
* @param value selected value
|
|
120
|
+
* @default false
|
|
121
|
+
*/
|
|
122
|
+
set selected(value) {
|
|
123
|
+
const oldValue = this._selected;
|
|
124
|
+
if (oldValue !== value) {
|
|
125
|
+
this._selected = value;
|
|
126
|
+
this.ariaSelected = String(value);
|
|
127
|
+
void this.requestUpdate('selected', oldValue);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
get selected() {
|
|
131
|
+
return this._selected;
|
|
132
|
+
}
|
|
116
133
|
/**
|
|
117
134
|
* @param node that should be checked
|
|
118
135
|
* @returns whether node can be ignored.
|
|
@@ -228,7 +245,10 @@ __decorate([
|
|
|
228
245
|
], Item.prototype, "icon", void 0);
|
|
229
246
|
__decorate([
|
|
230
247
|
property({ type: Boolean, reflect: true })
|
|
231
|
-
], Item.prototype, "selected",
|
|
248
|
+
], Item.prototype, "selected", null);
|
|
249
|
+
__decorate([
|
|
250
|
+
property({ type: String, reflect: true, attribute: 'aria-selected' })
|
|
251
|
+
], Item.prototype, "ariaSelected", void 0);
|
|
232
252
|
__decorate([
|
|
233
253
|
property({ type: Boolean, reflect: true })
|
|
234
254
|
], Item.prototype, "multiple", void 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# ef-label
|
|
2
|
+
|
|
3
|
+
Displays a text with alternative truncation
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|-------------|--------------|-----------|---------|---------------------------------------------|
|
|
9
|
+
| `error` | `error` | `boolean` | false | Set state to error |
|
|
10
|
+
| `lineClamp` | `line-clamp` | `number` | 0 | Limit the number of lines before truncating |
|
|
11
|
+
| `warning` | `warning` | `boolean` | false | Set state to warning |
|
package/lib/label/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement, TemplateResult,
|
|
2
|
+
import { BasicElement, TemplateResult, CSSResultGroup } from '@refinitiv-ui/core';
|
|
3
3
|
/**
|
|
4
4
|
* Displays a text with alternative truncation
|
|
5
5
|
*/
|
|
@@ -10,12 +10,12 @@ export declare class Label extends BasicElement {
|
|
|
10
10
|
*/
|
|
11
11
|
static get version(): string;
|
|
12
12
|
/**
|
|
13
|
-
* A `
|
|
13
|
+
* A `CSSResultGroup` that will be used
|
|
14
14
|
* to style the host, slotted children
|
|
15
15
|
* and the internal template of the element.
|
|
16
16
|
* @returns CSS template
|
|
17
17
|
*/
|
|
18
|
-
static get styles():
|
|
18
|
+
static get styles(): CSSResultGroup;
|
|
19
19
|
/**
|
|
20
20
|
* Limit the number of lines before truncating
|
|
21
21
|
*/
|
package/lib/label/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { addTooltipCondition, removeTooltipCondition } from '../tooltip';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { BasicElement, html, css } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
5
|
+
import { styleMap } from '@refinitiv-ui/core/lib/directives/style-map.js';
|
|
6
|
+
import { VERSION } from '../version.js';
|
|
7
|
+
import { isIE } from '@refinitiv-ui/utils/lib/browser.js';
|
|
8
|
+
import { addTooltipCondition, removeTooltipCondition } from '../tooltip/index.js';
|
|
10
9
|
/**
|
|
11
10
|
* Configuration object
|
|
12
11
|
* for mutations observers
|
|
@@ -20,16 +19,11 @@ const observerOptions = {
|
|
|
20
19
|
* Reusable SPACE
|
|
21
20
|
*/
|
|
22
21
|
const _ = ' ';
|
|
23
|
-
/**
|
|
24
|
-
* Helper to check if the browser is IE
|
|
25
|
-
* @returns True if the browser is IE
|
|
26
|
-
*/
|
|
27
|
-
const isIE = () => !!navigator.userAgent.match(/Trident/g) || !!navigator.userAgent.match(/MSIE/g);
|
|
28
22
|
/**
|
|
29
23
|
* Determines if the browser is legacy or modern.
|
|
30
24
|
*/
|
|
31
25
|
/* istanbul ignore next */
|
|
32
|
-
const browserType = isIE
|
|
26
|
+
const browserType = isIE ? 'legacy' : 'modern';
|
|
33
27
|
/**
|
|
34
28
|
* Displays a text with alternative truncation
|
|
35
29
|
*/
|
|
@@ -76,7 +70,7 @@ let Label = class Label extends BasicElement {
|
|
|
76
70
|
return VERSION;
|
|
77
71
|
}
|
|
78
72
|
/**
|
|
79
|
-
* A `
|
|
73
|
+
* A `CSSResultGroup` that will be used
|
|
80
74
|
* to style the host, slotted children
|
|
81
75
|
* and the internal template of the element.
|
|
82
76
|
* @returns CSS template
|
|
@@ -130,7 +124,7 @@ let Label = class Label extends BasicElement {
|
|
|
130
124
|
super.connectedCallback();
|
|
131
125
|
addTooltipCondition(this.tooltipCondition, this.tooltipRenderer);
|
|
132
126
|
this.mutationObserver.observe(this, observerOptions);
|
|
133
|
-
!isIE
|
|
127
|
+
!isIE && this.recalculate(); // In IE the mutation will trigger
|
|
134
128
|
}
|
|
135
129
|
/**
|
|
136
130
|
* @override
|
|
@@ -165,7 +159,7 @@ let Label = class Label extends BasicElement {
|
|
|
165
159
|
this.chunks = raw.split(_).map(chunk => chunk.trim()).filter(chunk => chunk);
|
|
166
160
|
const newValue = this.text;
|
|
167
161
|
if (oldValue !== newValue) {
|
|
168
|
-
|
|
162
|
+
this.requestUpdate('text', oldValue);
|
|
169
163
|
}
|
|
170
164
|
}
|
|
171
165
|
/**
|
|
@@ -204,8 +198,6 @@ let Label = class Label extends BasicElement {
|
|
|
204
198
|
*/
|
|
205
199
|
get clampTemplate() {
|
|
206
200
|
const styles = {
|
|
207
|
-
maxHeight: '',
|
|
208
|
-
whiteSpace: '',
|
|
209
201
|
lineClamp: `${this.lineClamp}`,
|
|
210
202
|
'-webkit-line-clamp': `${this.lineClamp}`
|
|
211
203
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ef-layout
|
|
2
|
+
|
|
3
|
+
Layout component for creating responsive applications and components
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|--------------|--------------|------------------|---------|--------------------------------------------------|
|
|
9
|
+
| `basis` | `basis` | `string \| null` | null | Sets the rough size of the element based on other siblings and content.<br />Value could be pixel, percents or auto. |
|
|
10
|
+
| `container` | `container` | `boolean` | false | Tells the element to display as a container,<br />displaying children in a vertical nowrap layout. |
|
|
11
|
+
| `debug` | `debug` | `boolean` | false | Displays debug lines. |
|
|
12
|
+
| `flex` | `flex` | `boolean` | false | Tells the element to display flex,<br />displaying children in a row wrap layout. |
|
|
13
|
+
| `maxHeight` | `max-height` | `string \| null` | null | Prevents the height from expanding past a certain point.<br />Value could be pixel, percents or _empty_. |
|
|
14
|
+
| `maxWidth` | `max-width` | `string \| null` | null | Prevents the width from expanding past a certain point.<br />Value could be pixel, percents or _empty_. |
|
|
15
|
+
| `minHeight` | `min-height` | `string \| null` | null | Allows the height to shrink below its contents.<br />Also prevents the height from shrinking past a certain point.<br />Value could be pixel, percents or _empty_. |
|
|
16
|
+
| `minWidth` | `min-width` | `string \| null` | null | Allows the width to shrink below its contents.<br />Also prevents the width from shrinking past a certain point.<br />Value could be pixel, percents or _empty_. |
|
|
17
|
+
| `noflex` | `noflex` | `boolean` | false | Prevents the element from being flexible,<br />when inside of another flex layout. |
|
|
18
|
+
| `nowrap` | `nowrap` | `boolean` | false | Prevents wrapping flex items,<br />when the parent isn't a container. |
|
|
19
|
+
| `scrollable` | `scrollable` | `boolean` | false | Makes the element a scrollable viewport. |
|
|
20
|
+
| `size` | `size` | `string \| null` | null | Sets the fixed size of the element.<br />Value could be pixel, percents or auto. |
|
|
21
|
+
|
|
22
|
+
## Events
|
|
23
|
+
|
|
24
|
+
| Event | Description |
|
|
25
|
+
|----------|----------------------------------------|
|
|
26
|
+
| `resize` | Fired when the element's size changes. |
|
package/lib/layout/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { ResponsiveElement, TemplateResult,
|
|
2
|
+
import { ResponsiveElement, TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
|
|
3
3
|
/**
|
|
4
4
|
* Layout component for creating responsive applications and components
|
|
5
5
|
* @fires resize - Fired when the element's size changes.
|
|
@@ -11,12 +11,12 @@ export declare class Layout extends ResponsiveElement {
|
|
|
11
11
|
*/
|
|
12
12
|
static get version(): string;
|
|
13
13
|
/**
|
|
14
|
-
* A `
|
|
14
|
+
* A `CSSResultGroup` that will be used
|
|
15
15
|
* to style the host, slotted children
|
|
16
16
|
* and the internal template of the element.
|
|
17
17
|
* @return CSS template
|
|
18
18
|
*/
|
|
19
|
-
static get styles():
|
|
19
|
+
static get styles(): CSSResultGroup;
|
|
20
20
|
/**
|
|
21
21
|
* Displays debug lines.
|
|
22
22
|
* @type {boolean}
|
package/lib/layout/index.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import { ResponsiveElement, html, css, customElement, property } from '@refinitiv-ui/core';
|
|
8
|
-
import { VERSION } from '../';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { ResponsiveElement, html, css } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
5
|
+
import { VERSION } from '../version.js';
|
|
9
6
|
/**
|
|
10
7
|
* Layout component for creating responsive applications and components
|
|
11
8
|
* @fires resize - Fired when the element's size changes.
|
|
@@ -83,7 +80,7 @@ let Layout = class Layout extends ResponsiveElement {
|
|
|
83
80
|
return VERSION;
|
|
84
81
|
}
|
|
85
82
|
/**
|
|
86
|
-
* A `
|
|
83
|
+
* A `CSSResultGroup` that will be used
|
|
87
84
|
* to style the host, slotted children
|
|
88
85
|
* and the internal template of the element.
|
|
89
86
|
* @return CSS template
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{
|
|
19
19
|
"name": "range",
|
|
20
20
|
"description": "Value of range. eg [-20, 70]",
|
|
21
|
-
"type": "
|
|
21
|
+
"type": "number[]",
|
|
22
22
|
"default": "[]"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"name": "neutral-color",
|
|
44
44
|
"description": "Turn off background color and use grey",
|
|
45
45
|
"type": "boolean",
|
|
46
|
-
"default": "
|
|
46
|
+
"default": "false"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"name": "zero",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"name": "range",
|
|
70
70
|
"attribute": "range",
|
|
71
71
|
"description": "Value of range. eg [-20, 70]",
|
|
72
|
-
"type": "
|
|
72
|
+
"type": "number[]",
|
|
73
73
|
"default": "[]"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"attribute": "neutral-color",
|
|
99
99
|
"description": "Turn off background color and use grey",
|
|
100
100
|
"type": "boolean",
|
|
101
|
-
"default": "
|
|
101
|
+
"default": "false"
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
"name": "zero",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# ef-led-gauge
|
|
2
|
+
|
|
3
|
+
A component used to show data in a LED-like
|
|
4
|
+
horizontal bar visualization.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
| Property | Attribute | Type | Default | Description |
|
|
9
|
+
|----------------|-----------------|------------------|----------|--------------------------------------------------|
|
|
10
|
+
| `bottomLabel` | `bottom-label` | `string` | "" | Label to be displayed in the bottom legend |
|
|
11
|
+
| `bottomValue` | `bottom-value` | `number \| null` | null | Value of bar for bottom legend position<br />Value can be -100 to 100 |
|
|
12
|
+
| `neutralColor` | `neutral-color` | `boolean` | false | Turn off background color and use grey |
|
|
13
|
+
| `range` | `range` | `number[]` | [] | Value of range. eg [-20, 70] |
|
|
14
|
+
| `rangeLabel` | `range-label` | `string` | "" | Label to be displayed in the bottom legend<br />when a range is displayed<br />and no bottom text is already set. |
|
|
15
|
+
| `topLabel` | `top-label` | `string` | "" | Label to be displayed in the top legend |
|
|
16
|
+
| `topValue` | `top-value` | `number \| null` | null | Value of bar for top legend position<br />Value can be -100 to 100 |
|
|
17
|
+
| `zero` | `zero` | `string` | "center" | Sets the zero scale position. [center, left, right] |
|
package/lib/led-gauge/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement, TemplateResult,
|
|
3
|
-
import '../canvas';
|
|
2
|
+
import { BasicElement, TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
import '../canvas/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* A component used to show data in a LED-like
|
|
6
6
|
* horizontal bar visualization.
|
|
@@ -14,12 +14,12 @@ export declare class LedGauge extends BasicElement {
|
|
|
14
14
|
private _zero;
|
|
15
15
|
constructor();
|
|
16
16
|
/**
|
|
17
|
-
* A `
|
|
17
|
+
* A `CSSResultGroup` that will be used
|
|
18
18
|
* to style the host, slotted children
|
|
19
19
|
* and the internal template of the element.
|
|
20
20
|
* @return CSS template
|
|
21
21
|
*/
|
|
22
|
-
static get styles():
|
|
22
|
+
static get styles(): CSSResultGroup;
|
|
23
23
|
/**
|
|
24
24
|
* Value of bar for top legend position
|
|
25
25
|
* Value can be -100 to 100
|
|
@@ -32,6 +32,7 @@ export declare class LedGauge extends BasicElement {
|
|
|
32
32
|
bottomValue: number | null;
|
|
33
33
|
/**
|
|
34
34
|
* Value of range. eg [-20, 70]
|
|
35
|
+
* @type {number[]}
|
|
35
36
|
*/
|
|
36
37
|
range: number[];
|
|
37
38
|
/**
|
package/lib/led-gauge/index.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { BasicElement, html, css, customElement, property } from '@refinitiv-ui/core';
|
|
8
|
-
import { VERSION } from '../';
|
|
9
|
-
import '../canvas';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { BasicElement, html, css } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
5
|
+
import { VERSION } from '../version.js';
|
|
6
|
+
import '../canvas/index.js';
|
|
10
7
|
const ZERO_MAP = {
|
|
11
8
|
LEFT: 'left',
|
|
12
9
|
CENTER: 'center',
|
|
@@ -33,6 +30,7 @@ let LedGauge = class LedGauge extends BasicElement {
|
|
|
33
30
|
this.bottomValue = null;
|
|
34
31
|
/**
|
|
35
32
|
* Value of range. eg [-20, 70]
|
|
33
|
+
* @type {number[]}
|
|
36
34
|
*/
|
|
37
35
|
this.range = [];
|
|
38
36
|
/**
|
|
@@ -64,7 +62,7 @@ let LedGauge = class LedGauge extends BasicElement {
|
|
|
64
62
|
return VERSION;
|
|
65
63
|
}
|
|
66
64
|
/**
|
|
67
|
-
* A `
|
|
65
|
+
* A `CSSResultGroup` that will be used
|
|
68
66
|
* to style the host, slotted children
|
|
69
67
|
* and the internal template of the element.
|
|
70
68
|
* @return CSS template
|
|
@@ -139,7 +137,7 @@ let LedGauge = class LedGauge extends BasicElement {
|
|
|
139
137
|
else {
|
|
140
138
|
this._zero = ZERO_MAP.CENTER;
|
|
141
139
|
}
|
|
142
|
-
|
|
140
|
+
this.requestUpdate('zero', oldValue);
|
|
143
141
|
}
|
|
144
142
|
get _shadowRoot() {
|
|
145
143
|
if (!this.shadowRoot) {
|
|
@@ -20,12 +20,13 @@
|
|
|
20
20
|
{
|
|
21
21
|
"name": "value",
|
|
22
22
|
"description": "Returns the first selected item value.\nUse `values` when multiple selection mode is enabled.",
|
|
23
|
-
"type": "string"
|
|
23
|
+
"type": "string",
|
|
24
|
+
"default": "\"\""
|
|
24
25
|
}
|
|
25
26
|
],
|
|
26
27
|
"properties": [
|
|
27
28
|
{
|
|
28
|
-
"name": "delegatesFocus",
|
|
29
|
+
"name": "delegatesFocus (readonly)",
|
|
29
30
|
"description": "Element focus delegation.\nSet to `false` and relies on native focusing.",
|
|
30
31
|
"type": "false",
|
|
31
32
|
"default": "false"
|
|
@@ -59,12 +60,14 @@
|
|
|
59
60
|
"name": "value",
|
|
60
61
|
"attribute": "value",
|
|
61
62
|
"description": "Returns the first selected item value.\nUse `values` when multiple selection mode is enabled.",
|
|
62
|
-
"type": "string"
|
|
63
|
+
"type": "string",
|
|
64
|
+
"default": "\"\""
|
|
63
65
|
},
|
|
64
66
|
{
|
|
65
67
|
"name": "values",
|
|
66
68
|
"description": "Returns a values collection of the currently\nselected item values",
|
|
67
|
-
"type": "
|
|
69
|
+
"type": "string[]",
|
|
70
|
+
"default": "[]"
|
|
68
71
|
}
|
|
69
72
|
],
|
|
70
73
|
"events": [
|
|
@@ -91,7 +94,17 @@
|
|
|
91
94
|
},
|
|
92
95
|
{
|
|
93
96
|
"name": "down",
|
|
94
|
-
"description": "Navigate
|
|
97
|
+
"description": "Navigate down through the list items",
|
|
98
|
+
"params": []
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "first",
|
|
102
|
+
"description": "Navigate to first focusable item of the list",
|
|
103
|
+
"params": []
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "last",
|
|
107
|
+
"description": "Navigate to first focusable item of the list",
|
|
95
108
|
"params": []
|
|
96
109
|
},
|
|
97
110
|
{
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# ef-list
|
|
2
|
+
|
|
3
|
+
Provides listing and immutable selection
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|-----------------------------|-------------|----------------|--------------------------|--------------------------------------------------|
|
|
9
|
+
| `data` | | `ListData` | null | The data object, used to render the list. |
|
|
10
|
+
| `delegatesFocus (readonly)` | | `false` | false | Element focus delegation.<br />Set to `false` and relies on native focusing. |
|
|
11
|
+
| `multiple` | `multiple` | `boolean` | false | Allow multiple selections |
|
|
12
|
+
| `renderer` | | `ListRenderer` | "new ListRenderer(this)" | Renderer used to render list item elements |
|
|
13
|
+
| `stateless` | `stateless` | `boolean` | false | Disable selections |
|
|
14
|
+
| `value` | `value` | `string` | "" | Returns the first selected item value.<br />Use `values` when multiple selection mode is enabled. |
|
|
15
|
+
| `values` | | `string[]` | [] | Returns a values collection of the currently<br />selected item values |
|
|
16
|
+
|
|
17
|
+
## Methods
|
|
18
|
+
|
|
19
|
+
| Method | Type | Description |
|
|
20
|
+
|----------------|-------------------------|--------------------------------------------------|
|
|
21
|
+
| `down` | `(): void` | Navigate down through the list items |
|
|
22
|
+
| `first` | `(): void` | Navigate to first focusable item of the list |
|
|
23
|
+
| `last` | `(): void` | Navigate to first focusable item of the list |
|
|
24
|
+
| `scrollToItem` | `(item: T): void` | Scroll to list item element<br /><br />**item**: Data item to scroll to |
|
|
25
|
+
| `selectItem` | `(item?: any): boolean` | Selects an item in the list<br /><br />**item**: Data Item or Item Element |
|
|
26
|
+
| `up` | `(): void` | Navigate up through the list items |
|
|
27
|
+
|
|
28
|
+
## Events
|
|
29
|
+
|
|
30
|
+
| Event | Description |
|
|
31
|
+
|-----------------|-------------------------------|
|
|
32
|
+
| `value-changed` | Dispatched when value changes |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '../../item';
|
|
2
|
-
import { Renderer } from '../renderer';
|
|
1
|
+
import '../../item/index.js';
|
|
2
|
+
import { Renderer } from '../renderer.js';
|
|
3
3
|
/**
|
|
4
4
|
* Renders list items as `ef-item` elements.
|
|
5
5
|
* This is the default renderer for lists.
|
|
@@ -28,6 +28,8 @@ export class ListRenderer extends Renderer {
|
|
|
28
28
|
el.hidden = composer.getItemPropertyValue(item, 'hidden') === true;
|
|
29
29
|
el.type = composer.getItemPropertyValue(item, 'type');
|
|
30
30
|
el.multiple = !!context && context.multiple === true;
|
|
31
|
+
const itemRole = el.type === 'text' || !el.type ? 'option' : 'presentation';
|
|
32
|
+
el.setAttribute('role', itemRole);
|
|
31
33
|
tooltip ? el.setAttribute('title', tooltip) : el.removeAttribute('title');
|
|
32
34
|
return el;
|
|
33
35
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CollectionComposer, DataItem } from '@refinitiv-ui/utils';
|
|
2
|
-
import { ItemData } from '../../item';
|
|
1
|
+
import type { CollectionComposer, DataItem } from '@refinitiv-ui/utils/lib/collection.js';
|
|
2
|
+
import type { ItemData } from '../../item';
|
|
3
3
|
export declare type ListData<T extends DataItem = ItemData> = T[] | CollectionComposer<T> | null;
|
package/lib/list/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { ControlElement,
|
|
3
|
-
import { CollectionComposer, DataItem } from '@refinitiv-ui/utils';
|
|
4
|
-
import '../item';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
export { ListData
|
|
2
|
+
import { ControlElement, CSSResultGroup, PropertyValues, TapEvent, TemplateResult } from '@refinitiv-ui/core';
|
|
3
|
+
import { CollectionComposer, DataItem } from '@refinitiv-ui/utils/lib/collection.js';
|
|
4
|
+
import type { ItemData } from '../item';
|
|
5
|
+
import type { ListData } from './helpers/types';
|
|
6
|
+
import { ListRenderer } from './helpers/list-renderer.js';
|
|
7
|
+
import '../item/index.js';
|
|
8
|
+
export type { ListData };
|
|
9
|
+
export { ListRenderer };
|
|
9
10
|
/**
|
|
10
11
|
* Key direction
|
|
11
12
|
*/
|
|
@@ -23,6 +24,7 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
|
|
|
23
24
|
* @returns version number
|
|
24
25
|
*/
|
|
25
26
|
static get version(): string;
|
|
27
|
+
protected readonly defaultRole: string | null;
|
|
26
28
|
/**
|
|
27
29
|
* Used to timestamp renders.
|
|
28
30
|
* This enables diff checking against item updates,
|
|
@@ -71,6 +73,7 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
|
|
|
71
73
|
/**
|
|
72
74
|
* The data object, used to render the list.
|
|
73
75
|
* @type {ListData}
|
|
76
|
+
* @default null
|
|
74
77
|
*/
|
|
75
78
|
get data(): ListData<T>;
|
|
76
79
|
set data(value: ListData<T>);
|
|
@@ -78,12 +81,15 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
|
|
|
78
81
|
/**
|
|
79
82
|
* Returns the first selected item value.
|
|
80
83
|
* Use `values` when multiple selection mode is enabled.
|
|
84
|
+
* @default -
|
|
81
85
|
*/
|
|
82
86
|
get value(): string;
|
|
83
87
|
set value(value: string);
|
|
84
88
|
/**
|
|
85
89
|
* Returns a values collection of the currently
|
|
86
90
|
* selected item values
|
|
91
|
+
* @type {string[]}
|
|
92
|
+
* @default []
|
|
87
93
|
* @readonly
|
|
88
94
|
*/
|
|
89
95
|
get values(): string[];
|
|
@@ -100,10 +106,20 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
|
|
|
100
106
|
*/
|
|
101
107
|
up(): void;
|
|
102
108
|
/**
|
|
103
|
-
* Navigate
|
|
109
|
+
* Navigate down through the list items
|
|
104
110
|
* @returns {void}
|
|
105
111
|
*/
|
|
106
112
|
down(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Navigate to first focusable item of the list
|
|
115
|
+
* @returns {void}
|
|
116
|
+
*/
|
|
117
|
+
first(): void;
|
|
118
|
+
/**
|
|
119
|
+
* Navigate to first focusable item of the list
|
|
120
|
+
* @returns {void}
|
|
121
|
+
*/
|
|
122
|
+
last(): void;
|
|
107
123
|
/**
|
|
108
124
|
* Proxy for querying the composer
|
|
109
125
|
* @param engine composer querying engine
|
|
@@ -262,13 +278,14 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
|
|
|
262
278
|
protected renderLightDOM(): void;
|
|
263
279
|
protected firstUpdated(changeProperties: PropertyValues): void;
|
|
264
280
|
protected update(changeProperties: PropertyValues): void;
|
|
281
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
265
282
|
/**
|
|
266
|
-
* A `
|
|
283
|
+
* A `CSSResultGroup` that will be used
|
|
267
284
|
* to style the host, slotted children
|
|
268
285
|
* and the internal template of the element.
|
|
269
286
|
* @return CSS template
|
|
270
287
|
*/
|
|
271
|
-
static get styles():
|
|
288
|
+
static get styles(): CSSResultGroup;
|
|
272
289
|
/**
|
|
273
290
|
* A `TemplateResult` that will be used
|
|
274
291
|
* to render the updated internal template.
|