@refinitiv-ui/elements 6.8.8 → 6.8.10
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 +181 -440
- package/LICENSE +1 -1
- package/README.md +12 -10
- package/lib/accordion/index.d.ts +1 -1
- package/lib/accordion/index.js +4 -7
- package/lib/appstate-bar/index.d.ts +2 -2
- package/lib/appstate-bar/index.js +10 -4
- package/lib/autosuggest/index.d.ts +7 -7
- package/lib/autosuggest/index.js +85 -80
- package/lib/autosuggest/themes/solar/charcoal/index.js +1 -1
- package/lib/autosuggest/themes/solar/pearl/index.js +1 -1
- package/lib/button/index.js +7 -10
- package/lib/button-bar/index.d.ts +1 -1
- package/lib/button-bar/index.js +12 -12
- package/lib/calendar/index.d.ts +39 -39
- package/lib/calendar/index.js +160 -125
- package/lib/calendar/utils.js +2 -2
- package/lib/canvas/index.d.ts +1 -1
- package/lib/canvas/index.js +2 -4
- package/lib/card/helpers/types.d.ts +2 -2
- package/lib/card/index.d.ts +5 -5
- package/lib/card/index.js +34 -28
- package/lib/chart/helpers/legend.js +10 -8
- package/lib/chart/index.d.ts +3 -3
- package/lib/chart/index.js +17 -17
- package/lib/chart/plugins/doughnut-center-label.js +6 -5
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/index.js +12 -13
- package/lib/clock/index.d.ts +55 -55
- package/lib/clock/index.js +84 -95
- 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/collapse/index.d.ts +1 -1
- package/lib/collapse/index.js +28 -19
- package/lib/collapse/themes/halo/dark/index.js +1 -1
- package/lib/collapse/themes/halo/light/index.js +1 -1
- package/lib/color-dialog/elements/color-palettes.d.ts +1 -1
- package/lib/color-dialog/elements/color-palettes.js +5 -6
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +1 -1
- package/lib/color-dialog/elements/grayscale-palettes.js +9 -9
- package/lib/color-dialog/elements/palettes.js +5 -4
- package/lib/color-dialog/helpers/value-model.js +7 -9
- package/lib/color-dialog/index.d.ts +6 -6
- package/lib/color-dialog/index.js +53 -37
- package/lib/color-picker/index.d.ts +2 -2
- package/lib/color-picker/index.js +40 -34
- package/lib/combo-box/helpers/filter.d.ts +2 -2
- package/lib/combo-box/helpers/types.d.ts +1 -1
- package/lib/combo-box/index.d.ts +9 -9
- package/lib/combo-box/index.js +61 -55
- package/lib/configuration/elements/configuration.js +2 -2
- package/lib/counter/index.d.ts +4 -4
- package/lib/counter/index.js +9 -7
- package/lib/datetime-field/index.d.ts +4 -5
- package/lib/datetime-field/index.js +32 -23
- package/lib/datetime-field/utils.js +11 -1
- package/lib/datetime-picker/index.d.ts +75 -75
- package/lib/datetime-picker/index.js +151 -132
- package/lib/datetime-picker/locales.js +5 -5
- package/lib/datetime-picker/utils.js +9 -9
- package/lib/dialog/draggable-element.js +1 -2
- package/lib/dialog/index.d.ts +6 -6
- package/lib/dialog/index.js +48 -38
- package/lib/email-field/index.d.ts +1 -1
- package/lib/email-field/index.js +6 -6
- package/lib/events.d.ts +1 -1
- package/lib/flag/index.d.ts +1 -1
- package/lib/flag/index.js +6 -5
- package/lib/flag/utils/FlagLoader.js +1 -1
- package/lib/header/index.d.ts +1 -1
- package/lib/header/index.js +2 -2
- package/lib/header/themes/halo/dark/index.js +1 -1
- package/lib/header/themes/halo/light/index.js +1 -1
- package/lib/header/themes/solar/charcoal/index.js +1 -1
- package/lib/header/themes/solar/pearl/index.js +1 -1
- package/lib/heatmap/helpers/color.d.ts +1 -1
- package/lib/heatmap/helpers/color.js +11 -5
- package/lib/heatmap/helpers/track.js +3 -3
- package/lib/heatmap/index.d.ts +9 -9
- package/lib/heatmap/index.js +51 -42
- package/lib/icon/index.d.ts +2 -2
- package/lib/icon/index.js +6 -8
- package/lib/icon/utils/IconLoader.d.ts +1 -0
- package/lib/icon/utils/IconLoader.js +9 -1
- package/lib/interactive-chart/helpers/types.d.ts +3 -3
- package/lib/interactive-chart/index.d.ts +34 -34
- package/lib/interactive-chart/index.js +72 -57
- package/lib/item/helpers/types.d.ts +1 -1
- package/lib/item/index.d.ts +3 -3
- package/lib/item/index.js +24 -20
- package/lib/jsx.d.ts +6 -4
- package/lib/label/index.d.ts +1 -1
- package/lib/label/index.js +11 -8
- package/lib/layout/index.d.ts +7 -7
- package/lib/layout/index.js +7 -7
- package/lib/led-gauge/index.d.ts +1 -1
- package/lib/led-gauge/index.js +10 -10
- package/lib/list/elements/list.d.ts +3 -3
- package/lib/list/elements/list.js +10 -12
- package/lib/list/helpers/renderer.js +2 -2
- package/lib/list/helpers/types.d.ts +1 -1
- package/lib/list/index.d.ts +1 -1
- package/lib/list/renderer.d.ts +7 -7
- package/lib/loader/index.js +7 -8
- package/lib/multi-input/index.d.ts +6 -6
- package/lib/multi-input/index.js +39 -45
- package/lib/notification/elements/notification-tray.d.ts +2 -2
- package/lib/notification/elements/notification-tray.js +3 -3
- package/lib/notification/elements/notification.d.ts +2 -2
- package/lib/notification/elements/notification.js +17 -14
- package/lib/notification/helpers/status.js +1 -1
- package/lib/notification/themes/halo/dark/index.js +1 -1
- package/lib/notification/themes/halo/light/index.js +1 -1
- package/lib/notification/themes/solar/charcoal/index.js +1 -1
- package/lib/notification/themes/solar/pearl/index.js +1 -1
- package/lib/number-field/index.d.ts +5 -6
- package/lib/number-field/index.js +37 -47
- package/lib/overlay/elements/overlay-viewport.d.ts +1 -1
- package/lib/overlay/elements/overlay.d.ts +2 -2
- package/lib/overlay/elements/overlay.js +154 -98
- package/lib/overlay/helpers/types.d.ts +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 +2 -1
- package/lib/overlay/managers/focus-manager.js +23 -13
- package/lib/overlay/managers/interaction-lock-manager.d.ts +4 -4
- package/lib/overlay/managers/interaction-lock-manager.js +33 -25
- package/lib/overlay/managers/viewport-manager.d.ts +2 -2
- package/lib/overlay/managers/viewport-manager.js +3 -2
- package/lib/overlay/managers/zindex-manager.js +4 -2
- package/lib/overlay-menu/helpers/types.d.ts +2 -2
- package/lib/overlay-menu/index.d.ts +1 -1
- package/lib/overlay-menu/index.js +44 -33
- package/lib/overlay-menu/managers/menu-manager.d.ts +10 -10
- package/lib/overlay-menu/managers/menu-manager.js +15 -13
- package/lib/pagination/index.d.ts +4 -4
- package/lib/pagination/index.js +39 -14
- package/lib/panel/index.js +1 -1
- package/lib/password-field/index.d.ts +2 -2
- package/lib/password-field/index.js +4 -4
- package/lib/pill/index.d.ts +1 -1
- package/lib/pill/index.js +22 -19
- package/lib/progress-bar/index.d.ts +1 -1
- package/lib/progress-bar/index.js +38 -37
- package/lib/radio-button/index.d.ts +2 -2
- package/lib/radio-button/index.js +17 -12
- package/lib/radio-button/radio-button-registry.js +8 -5
- package/lib/rating/index.d.ts +1 -1
- package/lib/rating/index.js +2 -5
- package/lib/rating/utils.d.ts +6 -6
- package/lib/rating/utils.js +6 -6
- package/lib/search-field/index.d.ts +2 -2
- package/lib/search-field/index.js +4 -4
- package/lib/select/index.d.ts +34 -34
- package/lib/select/index.js +69 -82
- package/lib/sidebar-layout/index.d.ts +2 -2
- package/lib/sidebar-layout/index.js +7 -9
- package/lib/slider/index.d.ts +2 -2
- package/lib/slider/index.js +57 -45
- package/lib/slider/utils.d.ts +10 -10
- package/lib/slider/utils.js +10 -10
- package/lib/sparkline/index.d.ts +1 -1
- package/lib/sparkline/index.js +7 -8
- package/lib/swing-gauge/helpers.js +2 -2
- package/lib/swing-gauge/index.d.ts +19 -19
- package/lib/swing-gauge/index.js +91 -81
- package/lib/tab/index.d.ts +1 -1
- package/lib/tab/index.js +16 -27
- package/lib/tab/themes/halo/dark/index.js +1 -1
- package/lib/tab/themes/halo/light/index.js +1 -1
- package/lib/tab/themes/solar/charcoal/index.js +1 -1
- package/lib/tab/themes/solar/pearl/index.js +1 -1
- package/lib/tab-bar/helpers/animate.js +1 -1
- package/lib/tab-bar/index.d.ts +1 -1
- package/lib/tab-bar/index.js +34 -18
- package/lib/tab-bar/themes/halo/dark/index.js +1 -1
- package/lib/tab-bar/themes/halo/light/index.js +1 -1
- package/lib/text-field/index.d.ts +1 -1
- package/lib/text-field/index.js +36 -33
- package/lib/time-picker/index.d.ts +6 -6
- package/lib/time-picker/index.js +104 -90
- package/lib/toggle/index.d.ts +1 -1
- package/lib/toggle/index.js +4 -3
- package/lib/toggle/themes/halo/dark/index.js +1 -1
- package/lib/toggle/themes/halo/light/index.js +1 -1
- package/lib/toggle/themes/solar/charcoal/index.js +1 -1
- package/lib/toggle/themes/solar/pearl/index.js +1 -1
- package/lib/tooltip/elements/title-tooltip.js +2 -2
- package/lib/tooltip/index.d.ts +27 -27
- package/lib/tooltip/index.js +42 -38
- package/lib/tooltip/managers/tooltip-manager.d.ts +1 -1
- package/lib/tornado-chart/elements/tornado-chart.d.ts +1 -1
- package/lib/tornado-chart/elements/tornado-chart.js +1 -1
- package/lib/tornado-chart/elements/tornado-item.d.ts +2 -2
- package/lib/tornado-chart/elements/tornado-item.js +12 -10
- package/lib/tree/elements/tree-item.d.ts +3 -3
- package/lib/tree/elements/tree-item.js +21 -19
- package/lib/tree/elements/tree.d.ts +1 -1
- package/lib/tree/elements/tree.js +12 -11
- package/lib/tree/helpers/renderer.js +4 -3
- package/lib/tree/index.d.ts +1 -1
- package/lib/tree/managers/tree-manager.d.ts +1 -1
- package/lib/tree/managers/tree-manager.js +17 -18
- package/lib/tree/themes/solar/charcoal/index.js +1 -1
- package/lib/tree/themes/solar/pearl/index.js +1 -1
- package/lib/tree-select/index.d.ts +9 -9
- package/lib/tree-select/index.js +91 -82
- 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.js +1 -1
- package/package.json +17 -17
- package/tsconfig.tsbuildinfo +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Element Framework
|
|
2
2
|
|
|
3
|
-
Element Framework (EF) is a collection of elements that includes theming capability within the Refinitiv's design system. The elements are a set of web components which is a standard web technology and can be utilized across all browsers.
|
|
3
|
+
Element Framework (EF) is a collection of elements that includes theming capability within the Refinitiv Workspace's design system. The elements are a set of web components which is a standard web technology and can be utilized across all browsers.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -10,43 +10,44 @@ EF elements are published under single package.
|
|
|
10
10
|
npm install @refinitiv-ui/elements
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
The elements are required theme to instantiate itself in the app. Refinitiv's design system is called Halo theme and you can install it from npm command.
|
|
13
|
+
The elements are required theme to instantiate itself in the app. Refinitiv Workspace's design system is called Halo theme and you can install it from npm command.
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
16
|
npm install @refinitiv-ui/halo-theme
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
Finally, import both elements that you want to use and its themes into your application and it is ready to go. To follow Refinitiv design system, it is required styles of some native elements e.g. typography.
|
|
19
|
+
Finally, import both elements that you want to use and its themes into your application and it is ready to go. To follow Refinitiv Workspace's design system, it is required styles of some native elements e.g. typography.
|
|
20
20
|
|
|
21
21
|
<br>
|
|
22
22
|
|
|
23
|
-
>The font "Proxima Nova Fin" shall only be used within Refinitiv products or services. The copyright owner must approve any use of such font outside of Refinitiv products or services, which may be subject to a fee. Please see https://www.fontspring.com/lic/fontspring/webfont#license_text
|
|
23
|
+
> The font "Proxima Nova Fin" shall only be used within Refinitiv products or services. The copyright owner must approve any use of such font outside of Refinitiv products or services, which may be subject to a fee. Please see https://www.fontspring.com/lic/fontspring/webfont#license_text
|
|
24
24
|
|
|
25
25
|
<br>
|
|
26
26
|
|
|
27
27
|
```javascript
|
|
28
28
|
// import element and its Halo dark theme
|
|
29
29
|
import '@refinitiv-ui/elements/button';
|
|
30
|
+
import '@refinitiv-ui/elements/button/themes/halo/dark';
|
|
30
31
|
import '@refinitiv-ui/elements/panel';
|
|
32
|
+
import '@refinitiv-ui/elements/panel/themes/halo/dark';
|
|
33
|
+
|
|
31
34
|
// import native styles for typography, css variables, etc.
|
|
32
35
|
import '@refinitiv-ui/halo-theme/dark/imports/native-elements';
|
|
33
|
-
import '@refinitiv-ui/elements/button/themes/halo/dark';
|
|
34
|
-
import '@refinitiv-ui/elements/panel/themes/halo/dark';
|
|
35
36
|
```
|
|
36
37
|
|
|
37
38
|
Now, you can use the elements in your app.
|
|
38
39
|
|
|
39
40
|
```css
|
|
40
41
|
.content {
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 500px;
|
|
43
44
|
}
|
|
44
45
|
```
|
|
45
46
|
|
|
46
47
|
```html
|
|
47
48
|
<ef-panel class="content" spacing>
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
<h2>Hello EF!</h2>
|
|
50
|
+
<ef-button cta>OK</ef-button>
|
|
50
51
|
</ef-panel>
|
|
51
52
|
```
|
|
52
53
|
|
|
@@ -55,4 +56,5 @@ Now, you can use the elements in your app.
|
|
|
55
56
|
See list of elements, demo and more tutorial by visiting [EF Documentation](https://ui.refinitiv.com/).
|
|
56
57
|
|
|
57
58
|
# License
|
|
59
|
+
|
|
58
60
|
Apache License 2.0. However, Halo theme shall only be used within Refinitiv products or services due to license of the font "Proxima Nova Fin".
|
package/lib/accordion/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { PropertyValues, TemplateResult
|
|
2
|
+
import { CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
3
|
import { Collapse } from '../collapse/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Used to display a group of `Collapse` control.
|
package/lib/accordion/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { css, html } from '@refinitiv-ui/core';
|
|
3
3
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
4
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
|
-
import { VERSION } from '../version.js';
|
|
6
5
|
import { Collapse } from '../collapse/index.js';
|
|
6
|
+
import { VERSION } from '../version.js';
|
|
7
7
|
/**
|
|
8
8
|
* Finds closest accordion parent of element.
|
|
9
9
|
* Created, because IE11 doesn't support closest() method.
|
|
@@ -95,8 +95,7 @@ let Accordion = class Accordion extends Collapse {
|
|
|
95
95
|
* @returns array of accordion items
|
|
96
96
|
*/
|
|
97
97
|
getChildItems() {
|
|
98
|
-
return [...this.querySelectorAll('ef-collapse')]
|
|
99
|
-
.filter((el) => isDirectAccordionChild(el, this));
|
|
98
|
+
return [...this.querySelectorAll('ef-collapse')].filter((el) => isDirectAccordionChild(el, this));
|
|
100
99
|
}
|
|
101
100
|
/**
|
|
102
101
|
* collapse non selected child items on click
|
|
@@ -117,9 +116,7 @@ let Accordion = class Accordion extends Collapse {
|
|
|
117
116
|
* @return {TemplateResult} Render template
|
|
118
117
|
*/
|
|
119
118
|
render() {
|
|
120
|
-
return html `
|
|
121
|
-
<slot></slot>
|
|
122
|
-
`;
|
|
119
|
+
return html ` <slot></slot> `;
|
|
123
120
|
}
|
|
124
121
|
};
|
|
125
122
|
__decorate([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement,
|
|
3
|
-
import { Translate } from '@refinitiv-ui/translate';
|
|
2
|
+
import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
4
3
|
import '@refinitiv-ui/phrasebook/locale/en/appstate-bar.js';
|
|
4
|
+
import { Translate } from '@refinitiv-ui/translate';
|
|
5
5
|
import '../icon/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* Used to display at the top of application to provide a status or information.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { BasicElement,
|
|
2
|
+
import { BasicElement, css, html } from '@refinitiv-ui/core';
|
|
3
3
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
4
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
|
-
import { VERSION } from '../version.js';
|
|
6
|
-
import { translate } from '@refinitiv-ui/translate';
|
|
7
5
|
import '@refinitiv-ui/phrasebook/locale/en/appstate-bar.js';
|
|
6
|
+
import { translate } from '@refinitiv-ui/translate';
|
|
8
7
|
import '../icon/index.js';
|
|
8
|
+
import { VERSION } from '../version.js';
|
|
9
9
|
/**
|
|
10
10
|
* Used to display at the top of application to provide a status or information.
|
|
11
11
|
* @slot right - Place custom content on the right of bar.
|
|
@@ -78,7 +78,13 @@ let AppstateBar = class AppstateBar extends BasicElement {
|
|
|
78
78
|
<div part="heading">${this.heading}</div>
|
|
79
79
|
<div part="message"><slot></slot></div>
|
|
80
80
|
<div part="right"><slot name="right"></slot></div>
|
|
81
|
-
<ef-icon
|
|
81
|
+
<ef-icon
|
|
82
|
+
role="button"
|
|
83
|
+
part="close"
|
|
84
|
+
@tap="${this.clear}"
|
|
85
|
+
icon="cross"
|
|
86
|
+
aria-label="${this.t('CLOSE')}"
|
|
87
|
+
></ef-icon>
|
|
82
88
|
`;
|
|
83
89
|
}
|
|
84
90
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
2
|
import { CSSResultGroup, ElementSize, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
|
+
import '@refinitiv-ui/phrasebook/locale/en/autosuggest.js';
|
|
3
4
|
import { TranslateDirective } from '@refinitiv-ui/translate';
|
|
4
|
-
import type { AutosuggestTargetElement, AutosuggestHighlightable, AutosuggestMethodType, AutosuggestQuery, AutosuggestRenderer, AutosuggestReason, AutosuggestItem, AutosuggestSelectItemEvent, AutosuggestHighlightItemEvent } from './helpers/types';
|
|
5
|
-
import { escapeRegExp, itemHighlightable, queryWordSelect } from './helpers/utils.js';
|
|
6
|
-
import { renderer } from './helpers/renderer.js';
|
|
7
|
-
import { Overlay } from '../overlay/index.js';
|
|
8
|
-
import '../loader/index.js';
|
|
9
5
|
import '../item/index.js';
|
|
10
|
-
import '
|
|
11
|
-
import
|
|
6
|
+
import '../loader/index.js';
|
|
7
|
+
import { Overlay } from '../overlay/index.js';
|
|
8
|
+
import { renderer } from './helpers/renderer.js';
|
|
9
|
+
import { escapeRegExp, itemHighlightable, queryWordSelect } from './helpers/utils.js';
|
|
10
|
+
import type { AutosuggestHighlightItemEvent, AutosuggestHighlightable, AutosuggestItem, AutosuggestMethodType, AutosuggestQuery, AutosuggestReason, AutosuggestRenderer, AutosuggestSelectItemEvent, AutosuggestTargetElement } from './helpers/types';
|
|
11
|
+
import type { AddAttachTargetEventsEvent, ItemHighlightEvent, ItemSelectEvent, RemoveAttachTargetEventsEvent, SuggestionsChangedEvent, SuggestionsClearRequestedEvent, SuggestionsFetchRequestedEvent, SuggestionsQueryEvent } from './helpers/types';
|
|
12
12
|
export type { AutosuggestTargetElement, AutosuggestHighlightable, AutosuggestMethodType, AutosuggestQuery, AutosuggestRenderer, AutosuggestReason, AutosuggestItem, ItemHighlightEvent, AddAttachTargetEventsEvent, RemoveAttachTargetEventsEvent, ItemSelectEvent, SuggestionsFetchRequestedEvent, SuggestionsClearRequestedEvent, SuggestionsQueryEvent, SuggestionsChangedEvent };
|
|
13
13
|
export { updateElementContent } from './helpers/utils.js';
|
|
14
14
|
export { itemHighlightable, escapeRegExp, queryWordSelect, renderer, renderer as itemRenderer };
|
package/lib/autosuggest/index.js
CHANGED
|
@@ -2,20 +2,20 @@ var Autosuggest_1;
|
|
|
2
2
|
import { __decorate } from "tslib";
|
|
3
3
|
import { css, html } from '@refinitiv-ui/core';
|
|
4
4
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
5
|
-
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
6
5
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
7
|
-
import {
|
|
6
|
+
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
7
|
+
import { createRef, ref } from '@refinitiv-ui/core/directives/ref.js';
|
|
8
8
|
import { unsafeHTML } from '@refinitiv-ui/core/directives/unsafe-html.js';
|
|
9
|
-
import
|
|
9
|
+
import '@refinitiv-ui/phrasebook/locale/en/autosuggest.js';
|
|
10
|
+
import { TranslatePropertyKey, translate } from '@refinitiv-ui/translate';
|
|
10
11
|
import { AnimationTaskRunner, TimeoutTaskRunner } from '@refinitiv-ui/utils/async.js';
|
|
11
12
|
import { isIE, isMobile } from '@refinitiv-ui/utils/browser.js';
|
|
12
|
-
import { translate, TranslatePropertyKey } from '@refinitiv-ui/translate';
|
|
13
|
-
import { escapeRegExp, itemHighlightable, queryWordSelect } from './helpers/utils.js';
|
|
14
|
-
import { renderer } from './helpers/renderer.js';
|
|
15
|
-
import { Overlay } from '../overlay/index.js';
|
|
16
|
-
import '../loader/index.js';
|
|
17
13
|
import '../item/index.js';
|
|
18
|
-
import '
|
|
14
|
+
import '../loader/index.js';
|
|
15
|
+
import { Overlay } from '../overlay/index.js';
|
|
16
|
+
import { VERSION } from '../version.js';
|
|
17
|
+
import { renderer } from './helpers/renderer.js';
|
|
18
|
+
import { escapeRegExp, itemHighlightable, queryWordSelect } from './helpers/utils.js';
|
|
19
19
|
export { updateElementContent } from './helpers/utils.js';
|
|
20
20
|
export { itemHighlightable, escapeRegExp, queryWordSelect, renderer, renderer as itemRenderer // compatibility
|
|
21
21
|
};
|
|
@@ -64,13 +64,14 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
64
64
|
display: flex;
|
|
65
65
|
flex-direction: column;
|
|
66
66
|
}
|
|
67
|
-
[part=content] {
|
|
67
|
+
[part='content'] {
|
|
68
68
|
flex: 1 1 auto;
|
|
69
69
|
overflow-x: hidden;
|
|
70
70
|
overflow-y: auto;
|
|
71
71
|
-webkit-overflow-scrolling: touch;
|
|
72
72
|
}
|
|
73
|
-
[part=header],
|
|
73
|
+
[part='header'],
|
|
74
|
+
[part='footer'] {
|
|
74
75
|
flex: none;
|
|
75
76
|
}
|
|
76
77
|
`
|
|
@@ -190,76 +191,76 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
190
191
|
// TODO: think of a nicer way to do this
|
|
191
192
|
this.xmlSerializer = null;
|
|
192
193
|
/**
|
|
193
|
-
|
|
194
|
-
|
|
194
|
+
* @ignore
|
|
195
|
+
*/
|
|
195
196
|
this.position = ['bottom-start', 'top-start', 'right-middle'];
|
|
196
197
|
/**
|
|
197
|
-
|
|
198
|
-
|
|
198
|
+
* @ignore
|
|
199
|
+
*/
|
|
199
200
|
this.noCancelOnEscKey = true;
|
|
200
201
|
/**
|
|
201
|
-
|
|
202
|
-
|
|
202
|
+
* @ignore
|
|
203
|
+
*/
|
|
203
204
|
this.noCancelOnOutsideClick = true;
|
|
204
205
|
/**
|
|
205
|
-
|
|
206
|
-
|
|
206
|
+
* @ignore
|
|
207
|
+
*/
|
|
207
208
|
this.noAutofocus = true;
|
|
208
209
|
/**
|
|
209
|
-
|
|
210
|
-
|
|
210
|
+
* @ignore
|
|
211
|
+
*/
|
|
211
212
|
this.noOverlap = true;
|
|
212
213
|
/**
|
|
213
|
-
|
|
214
|
-
|
|
214
|
+
* @ignore
|
|
215
|
+
*/
|
|
215
216
|
this.withShadow = false;
|
|
216
217
|
/**
|
|
217
218
|
* @ignore
|
|
218
219
|
*/
|
|
219
220
|
this.noFocusManagement = true;
|
|
220
221
|
/**
|
|
221
|
-
|
|
222
|
-
|
|
222
|
+
* @ignore
|
|
223
|
+
*/
|
|
223
224
|
this.onInputValueChange = this.onInputValueChange.bind(this);
|
|
224
225
|
/**
|
|
225
|
-
|
|
226
|
-
|
|
226
|
+
* @ignore
|
|
227
|
+
*/
|
|
227
228
|
this.onInputKeyDown = this.onInputKeyDown.bind(this);
|
|
228
229
|
/**
|
|
229
|
-
|
|
230
|
-
|
|
230
|
+
* @ignore
|
|
231
|
+
*/
|
|
231
232
|
this.onInputBlur = this.onInputBlur.bind(this);
|
|
232
233
|
/**
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
* @ignore
|
|
235
|
+
*/
|
|
235
236
|
this.onInputFocus = this.onInputFocus.bind(this);
|
|
236
237
|
/**
|
|
237
|
-
|
|
238
|
-
|
|
238
|
+
* @ignore
|
|
239
|
+
*/
|
|
239
240
|
this.suggestionsQueryAction = this.suggestionsQueryAction.bind(this);
|
|
240
241
|
/**
|
|
241
|
-
|
|
242
|
-
|
|
242
|
+
* @ignore
|
|
243
|
+
*/
|
|
243
244
|
this.itemSelectAction = this.itemSelectAction.bind(this);
|
|
244
245
|
/**
|
|
245
|
-
|
|
246
|
-
|
|
246
|
+
* @ignore
|
|
247
|
+
*/
|
|
247
248
|
this.itemHighlightAction = this.itemHighlightAction.bind(this);
|
|
248
249
|
/**
|
|
249
|
-
|
|
250
|
-
|
|
250
|
+
* @ignore
|
|
251
|
+
*/
|
|
251
252
|
this.suggestionsFetchRequestedAction = this.suggestionsFetchRequestedAction.bind(this);
|
|
252
253
|
/**
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
* @ignore
|
|
255
|
+
*/
|
|
255
256
|
this.suggestionsClearRequestedAction = this.suggestionsClearRequestedAction.bind(this);
|
|
256
257
|
/**
|
|
257
|
-
|
|
258
|
-
|
|
258
|
+
* @ignore
|
|
259
|
+
*/
|
|
259
260
|
this.attachEventsAddAction = this.attachEventsAddAction.bind(this);
|
|
260
261
|
/**
|
|
261
|
-
|
|
262
|
-
|
|
262
|
+
* @ignore
|
|
263
|
+
*/
|
|
263
264
|
this.attachEventsRemoveAction = this.attachEventsRemoveAction.bind(this);
|
|
264
265
|
/**
|
|
265
266
|
* @ignore
|
|
@@ -280,7 +281,8 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
280
281
|
* @returns {void}
|
|
281
282
|
*/
|
|
282
283
|
onInputValueChange(event) {
|
|
283
|
-
if (!this.suspended) {
|
|
284
|
+
if (!this.suspended) {
|
|
285
|
+
// avoid circular
|
|
284
286
|
/* istanbul ignore next */
|
|
285
287
|
if (isMobile) {
|
|
286
288
|
this.lastActiveElement = event.target;
|
|
@@ -433,7 +435,7 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
433
435
|
const { detail: { query, suggestion } } = event;
|
|
434
436
|
/* istanbul ignore next */
|
|
435
437
|
if (this.attachTarget) {
|
|
436
|
-
this.attachTarget.value = suggestion && suggestion?.label || query;
|
|
438
|
+
this.attachTarget.value = (suggestion && suggestion?.label) || query;
|
|
437
439
|
}
|
|
438
440
|
}
|
|
439
441
|
/**
|
|
@@ -559,12 +561,14 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
559
561
|
}
|
|
560
562
|
const query = this.xmlSerializer.serializeToString(document.createTextNode(this.query ? this.query.toString() : ''));
|
|
561
563
|
return html `
|
|
562
|
-
<span part="more-results-text"
|
|
564
|
+
<span part="more-results-text"
|
|
565
|
+
>${this.moreSearchText
|
|
563
566
|
? unsafeHTML(this.moreSearchText.replace(/{0\}/g, `<mark>${query}</mark>`))
|
|
564
567
|
: this.t('MORE_RESULTS', {
|
|
565
568
|
query,
|
|
566
569
|
mark: (chunks) => `<mark>${chunks}</mark>`
|
|
567
|
-
})}</span
|
|
570
|
+
})}</span
|
|
571
|
+
>
|
|
568
572
|
<span part="more-results-keys" slot="right"><kbd>SHIFT</kbd> + <kbd>ENTER</kbd></span>
|
|
569
573
|
`;
|
|
570
574
|
}
|
|
@@ -577,7 +581,8 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
577
581
|
*/
|
|
578
582
|
requestSuggestions(reason, debounce = false) {
|
|
579
583
|
this.dispatchSuggestionsQuery(reason);
|
|
580
|
-
if (this.preservedQueryValue === this.query) {
|
|
584
|
+
if (this.preservedQueryValue === this.query) {
|
|
585
|
+
// if the query is the same do not re-issue the request, instead try to open auto suggest
|
|
581
586
|
if (!this.opened && ((this.suggestions && this.suggestions.length) || this.moreResults)) {
|
|
582
587
|
this.setOpened(true);
|
|
583
588
|
}
|
|
@@ -752,6 +757,7 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
752
757
|
get renderedSuggestions() {
|
|
753
758
|
const keys = [];
|
|
754
759
|
this.suggestionMap.forEach((value, key) => {
|
|
760
|
+
// support IE11
|
|
755
761
|
keys.push(key);
|
|
756
762
|
});
|
|
757
763
|
if (this.moreResults && this.moreResultsItem) {
|
|
@@ -784,13 +790,13 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
784
790
|
* @returns true if some of changedProperties modified
|
|
785
791
|
*/
|
|
786
792
|
shouldAutosuggestUpdate(changedProperties) {
|
|
787
|
-
return changedProperties.has('attach')
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
793
|
+
return (changedProperties.has('attach') ||
|
|
794
|
+
changedProperties.has('suggestions') ||
|
|
795
|
+
changedProperties.has('moreResults') ||
|
|
796
|
+
changedProperties.has('moreSearchText') ||
|
|
797
|
+
changedProperties.has('loading') ||
|
|
798
|
+
changedProperties.has('debounceRate') ||
|
|
799
|
+
changedProperties.has(TranslatePropertyKey));
|
|
794
800
|
}
|
|
795
801
|
/**
|
|
796
802
|
* Run when document click event happens.
|
|
@@ -1000,7 +1006,7 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
1000
1006
|
* @returns focused true if attach target is focused
|
|
1001
1007
|
*/
|
|
1002
1008
|
get attachTargetFocused() {
|
|
1003
|
-
return this.isFocused(document.activeElement) || this.attachTarget === this.lastActiveElement;
|
|
1009
|
+
return (this.isFocused(document.activeElement) || this.attachTarget === this.lastActiveElement);
|
|
1004
1010
|
}
|
|
1005
1011
|
/**
|
|
1006
1012
|
* Walk through shadowDOM to find activeElement
|
|
@@ -1097,6 +1103,7 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
1097
1103
|
if (focusElement) {
|
|
1098
1104
|
this.highlightItem(focusElement, false);
|
|
1099
1105
|
focusElement.scrollIntoView({
|
|
1106
|
+
// TODO: this has different behaviour in IE11
|
|
1100
1107
|
behavior: 'auto',
|
|
1101
1108
|
block: 'nearest'
|
|
1102
1109
|
});
|
|
@@ -1185,10 +1192,9 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
1185
1192
|
return null;
|
|
1186
1193
|
}
|
|
1187
1194
|
return html `
|
|
1188
|
-
<ef-item tabIndex="-1"
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
part="more-results">${this.moreResultsTextTemplate}</ef-item>
|
|
1195
|
+
<ef-item tabIndex="-1" role="option" id="moreResults" part="more-results"
|
|
1196
|
+
>${this.moreResultsTextTemplate}</ef-item
|
|
1197
|
+
>
|
|
1192
1198
|
`;
|
|
1193
1199
|
}
|
|
1194
1200
|
/**
|
|
@@ -1198,24 +1204,23 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
1198
1204
|
*/
|
|
1199
1205
|
render() {
|
|
1200
1206
|
return html `
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
${this.loaderTemplate}
|
|
1207
|
+
<div ${ref(this.headerElementRef)} part="header">
|
|
1208
|
+
<slot id="headerSlot" name="header"></slot>
|
|
1209
|
+
</div>
|
|
1210
|
+
<div
|
|
1211
|
+
${ref(this.contentElementRef)}
|
|
1212
|
+
part="content"
|
|
1213
|
+
@mousemove="${this.onItemMouseMove}"
|
|
1214
|
+
@mouseleave="${this.onItemMouseLeave}"
|
|
1215
|
+
@tap="${this.onItemMouseClick}"
|
|
1216
|
+
>
|
|
1217
|
+
<slot ${ref(this.contentSlotRef)} @slotchange="${this.onSlotChange}"></slot>
|
|
1218
|
+
${this.moreResultsTemplate}
|
|
1219
|
+
</div>
|
|
1220
|
+
<div ${ref(this.footerElementRef)} part="footer">
|
|
1221
|
+
<slot id="footerSlot" name="footer"></slot>
|
|
1222
|
+
</div>
|
|
1223
|
+
${this.loaderTemplate}
|
|
1219
1224
|
`;
|
|
1220
1225
|
}
|
|
1221
1226
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/item/themes/solar/charcoal';
|
|
2
2
|
import '@refinitiv-ui/elements/overlay/themes/solar/charcoal';
|
|
3
3
|
import '@refinitiv-ui/elements/loader/themes/solar/charcoal';
|
|
4
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-autosuggest', styles: 'kbd{display:inline-flex;border-radius:2px;font-family:inherit;justify-content:center;align-items:center;vertical-align:middle;box-sizing:border-box;background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);color:#151516;min-width:1.33em;height:1.33em;padding:0 .3em;font-size:.76em}mark{color:#ee7600;background-color:transparent}:host{min-height:0;max-height:350px;border:1px solid #4a4a52;margin-top:1px;background-color:#151516}:host([loading]){min-height:50px;min-width:150px;min-height:32px}:host [part=content]{overflow:auto;touch-action:manipulation;scrollbar-face-color:#666570;scrollbar-shadow-color:#666570;scrollbar-highlight-color:#666570;scrollbar-arrow-color:#666570;scrollbar-track-color:#2e2e33;scrollbar-3dlight-color:#2e2e33;scrollbar-darkshadow-color:#2e2e33;scrollbar-color:#666570 #2e2e33;background-color:#3c3c42}:host [part=more-results] mark{background-color:inherit;color:#ee7600;font-weight:400}:host [part=more-results-text]{font-size:.76em}:host [part=more-results-keys],:host [part=more-results] mark{color:#ee7600}:host [part=loader]{top:0;bottom:0;left:0;right:0;position:absolute}:host [part=backdrop]{background-color:#000;opacity:.6;width:100%;height:100%}::-webkit-scrollbar{width:13px;height:13px}::-webkit-scrollbar-button{background:0 0/1px 2px no-repeat #2e2e33;height:12px;width:12px;display:block}::-webkit-scrollbar-thumb{background:#666570;border-radius:7px;border:2px solid #2e2e33}::-webkit-scrollbar-thumb:hover{background:#e2e2e2}::-webkit-scrollbar-thumb:active{background:#f93}::-webkit-scrollbar-track{background:#2e2e33}::-webkit-scrollbar-corner{background:#2e2e33}::-webkit-scrollbar-button:end:decrement,::-webkit-scrollbar-button:start:increment{display:none}::-webkit-scrollbar-button:horizontal{background-size:2px 1px}::-webkit-scrollbar-button:vertical:start:decrement{background-image:linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570);background-position:10px 6.5px,9px 5.5px,8px 4.5px,7px 3.5px,6px 2.5px,5px 3.5px,4px 4.5px,3px 5.5px,2px 6.5px}::-webkit-scrollbar-button:vertical:start:decrement:hover{background-image:linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2);background-position:10px 6.5px,9px 5.5px,8px 4.5px,7px 3.5px,6px 2.5px,5px 3.5px,4px 4.5px,3px 5.5px,2px 6.5px}::-webkit-scrollbar-button:vertical:start:decrement:active{background-image:linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93);background-position:10px 6.5px,9px 5.5px,8px 4.5px,7px 3.5px,6px 2.5px,5px 3.5px,4px 4.5px,3px 5.5px,2px 6.5px}::-webkit-scrollbar-button:vertical:end:increment{background-image:linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570);background-position:10px 3.5px,9px 4.5px,8px 5.5px,7px 6.5px,6px 7.5px,5px 6.5px,4px 5.5px,3px 4.5px,2px 3.5px}::-webkit-scrollbar-button:vertical:end:increment:hover{background-image:linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2);background-position:10px 3.5px,9px 4.5px,8px 5.5px,7px 6.5px,6px 7.5px,5px 6.5px,4px 5.5px,3px 4.5px,2px 3.5px}::-webkit-scrollbar-button:vertical:end:increment:active{background-image:linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93);background-position:10px 3.5px,9px 4.5px,8px 5.5px,7px 6.5px,6px 7.5px,5px 6.5px,4px 5.5px,3px 4.5px,2px 3.5px}::-webkit-scrollbar-button:horizontal:start:decrement{background-image:linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570);background-position:6.5px 10px,5.5px 9px,4.5px 8px,3.5px 7px,2.5px 6px,3.5px 5px,4.5px 4px,5.5px 3px,6.5px 2px}::-webkit-scrollbar-button:horizontal:start:decrement:hover{background-image:linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2);background-position:6.5px 10px,5.5px 9px,4.5px 8px,3.5px 7px,2.5px 6px,3.5px 5px,4.5px 4px,5.5px 3px,6.5px 2px}::-webkit-scrollbar-button:horizontal:start:decrement:active{background-image:linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93);background-position:6.5px 10px,5.5px 9px,4.5px 8px,3.5px 7px,2.5px 6px,3.5px 5px,4.5px 4px,5.5px 3px,6.5px 2px}::-webkit-scrollbar-button:horizontal:end:increment{background-image:linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570);background-position:3.5px 10px,4.5px 9px,5.5px 8px,6.5px 7px,7.5px 6px,6.5px 5px,5.5px 4px,4.5px 3px,3.5px 2px}::-webkit-scrollbar-button:horizontal:end:increment:hover{background-image:linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2);background-position:3.5px 10px,4.5px 9px,5.5px 8px,6.5px 7px,7.5px 6px,6.5px 5px,5.5px 4px,4.5px 3px,3.5px 2px}::-webkit-scrollbar-button:horizontal:end:increment:active{background-image:linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93);background-position:3.5px 10px,4.5px 9px,5.5px 8px,6.5px 7px,7.5px 6px,6.5px 5px,5.5px 4px,4.5px 3px,3.5px 2px}:host [part=more-results]{border-top:1px solid #4a4a52;height:32px;font-size:13px}:host [part=more-results],:host [part=more-results]:focus,:host [part=more-results]:hover,:host [part=more-results][highlighted],:host [part=more-results][selected]{color:#46a0f0}:host [part=more-results-keys],:host [part=more-results-keys] kbd{font-size:inherit;color:#46a0f0}:host [part=more-results-keys] kbd{font-size:inherit;background-color:transparent;box-shadow:none;border-radius:0;padding:0;line-height:13px;display:inline}:host [part=more-results-text]{font-size:inherit}:host [part=more-results] mark:after,:host [part=more-results] mark:before{color:#46a0f0;content
|
|
4
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-autosuggest', styles: 'kbd{display:inline-flex;border-radius:2px;font-family:inherit;justify-content:center;align-items:center;vertical-align:middle;box-sizing:border-box;background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);color:#151516;min-width:1.33em;height:1.33em;padding:0 .3em;font-size:.76em}mark{color:#ee7600;background-color:transparent}:host{min-height:0;max-height:350px;border:1px solid #4a4a52;margin-top:1px;background-color:#151516}:host([loading]){min-height:50px;min-width:150px;min-height:32px}:host [part=content]{overflow:auto;touch-action:manipulation;scrollbar-face-color:#666570;scrollbar-shadow-color:#666570;scrollbar-highlight-color:#666570;scrollbar-arrow-color:#666570;scrollbar-track-color:#2e2e33;scrollbar-3dlight-color:#2e2e33;scrollbar-darkshadow-color:#2e2e33;scrollbar-color:#666570 #2e2e33;background-color:#3c3c42}:host [part=more-results] mark{background-color:inherit;color:#ee7600;font-weight:400}:host [part=more-results-text]{font-size:.76em}:host [part=more-results-keys],:host [part=more-results] mark{color:#ee7600}:host [part=loader]{top:0;bottom:0;left:0;right:0;position:absolute}:host [part=backdrop]{background-color:#000;opacity:.6;width:100%;height:100%}::-webkit-scrollbar{width:13px;height:13px}::-webkit-scrollbar-button{background:0 0/1px 2px no-repeat #2e2e33;height:12px;width:12px;display:block}::-webkit-scrollbar-thumb{background:#666570;border-radius:7px;border:2px solid #2e2e33}::-webkit-scrollbar-thumb:hover{background:#e2e2e2}::-webkit-scrollbar-thumb:active{background:#f93}::-webkit-scrollbar-track{background:#2e2e33}::-webkit-scrollbar-corner{background:#2e2e33}::-webkit-scrollbar-button:end:decrement,::-webkit-scrollbar-button:start:increment{display:none}::-webkit-scrollbar-button:horizontal{background-size:2px 1px}::-webkit-scrollbar-button:vertical:start:decrement{background-image:linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570);background-position:10px 6.5px,9px 5.5px,8px 4.5px,7px 3.5px,6px 2.5px,5px 3.5px,4px 4.5px,3px 5.5px,2px 6.5px}::-webkit-scrollbar-button:vertical:start:decrement:hover{background-image:linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2);background-position:10px 6.5px,9px 5.5px,8px 4.5px,7px 3.5px,6px 2.5px,5px 3.5px,4px 4.5px,3px 5.5px,2px 6.5px}::-webkit-scrollbar-button:vertical:start:decrement:active{background-image:linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93);background-position:10px 6.5px,9px 5.5px,8px 4.5px,7px 3.5px,6px 2.5px,5px 3.5px,4px 4.5px,3px 5.5px,2px 6.5px}::-webkit-scrollbar-button:vertical:end:increment{background-image:linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570);background-position:10px 3.5px,9px 4.5px,8px 5.5px,7px 6.5px,6px 7.5px,5px 6.5px,4px 5.5px,3px 4.5px,2px 3.5px}::-webkit-scrollbar-button:vertical:end:increment:hover{background-image:linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2);background-position:10px 3.5px,9px 4.5px,8px 5.5px,7px 6.5px,6px 7.5px,5px 6.5px,4px 5.5px,3px 4.5px,2px 3.5px}::-webkit-scrollbar-button:vertical:end:increment:active{background-image:linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93);background-position:10px 3.5px,9px 4.5px,8px 5.5px,7px 6.5px,6px 7.5px,5px 6.5px,4px 5.5px,3px 4.5px,2px 3.5px}::-webkit-scrollbar-button:horizontal:start:decrement{background-image:linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570);background-position:6.5px 10px,5.5px 9px,4.5px 8px,3.5px 7px,2.5px 6px,3.5px 5px,4.5px 4px,5.5px 3px,6.5px 2px}::-webkit-scrollbar-button:horizontal:start:decrement:hover{background-image:linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2);background-position:6.5px 10px,5.5px 9px,4.5px 8px,3.5px 7px,2.5px 6px,3.5px 5px,4.5px 4px,5.5px 3px,6.5px 2px}::-webkit-scrollbar-button:horizontal:start:decrement:active{background-image:linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93);background-position:6.5px 10px,5.5px 9px,4.5px 8px,3.5px 7px,2.5px 6px,3.5px 5px,4.5px 4px,5.5px 3px,6.5px 2px}::-webkit-scrollbar-button:horizontal:end:increment{background-image:linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570),linear-gradient(#666570,#666570);background-position:3.5px 10px,4.5px 9px,5.5px 8px,6.5px 7px,7.5px 6px,6.5px 5px,5.5px 4px,4.5px 3px,3.5px 2px}::-webkit-scrollbar-button:horizontal:end:increment:hover{background-image:linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2),linear-gradient(#e2e2e2,#e2e2e2);background-position:3.5px 10px,4.5px 9px,5.5px 8px,6.5px 7px,7.5px 6px,6.5px 5px,5.5px 4px,4.5px 3px,3.5px 2px}::-webkit-scrollbar-button:horizontal:end:increment:active{background-image:linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93),linear-gradient(#f93,#f93);background-position:3.5px 10px,4.5px 9px,5.5px 8px,6.5px 7px,7.5px 6px,6.5px 5px,5.5px 4px,4.5px 3px,3.5px 2px}:host [part=more-results]{border-top:1px solid #4a4a52;height:32px;font-size:13px}:host [part=more-results],:host [part=more-results]:focus,:host [part=more-results]:hover,:host [part=more-results][highlighted],:host [part=more-results][selected]{color:#46a0f0}:host [part=more-results-keys],:host [part=more-results-keys] kbd{font-size:inherit;color:#46a0f0}:host [part=more-results-keys] kbd{font-size:inherit;background-color:transparent;box-shadow:none;border-radius:0;padding:0;line-height:13px;display:inline}:host [part=more-results-text]{font-size:inherit}:host [part=more-results] mark:after,:host [part=more-results] mark:before{color:#46a0f0;content:\'"\'}' }}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/item/themes/solar/pearl';
|
|
2
2
|
import '@refinitiv-ui/elements/overlay/themes/solar/pearl';
|
|
3
3
|
import '@refinitiv-ui/elements/loader/themes/solar/pearl';
|
|
4
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-autosuggest', styles: 'kbd{display:inline-flex;border-radius:2px;font-family:inherit;justify-content:center;align-items:center;vertical-align:middle;box-sizing:border-box;background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);color:#484848;min-width:1.33em;height:1.33em;padding:0 .3em;font-size:.76em}mark{color:#ee7600;background-color:transparent}:host{min-height:0;max-height:350px;border:1px solid #a9afba;margin-top:1px;background-color:#c2c2c2}:host([loading]){min-height:50px;min-width:150px;min-height:32px}:host [part=content]{overflow:auto;touch-action:manipulation;scrollbar-face-color:#8a8a96;scrollbar-shadow-color:#8a8a96;scrollbar-highlight-color:#8a8a96;scrollbar-arrow-color:#8a8a96;scrollbar-track-color:#fff;scrollbar-3dlight-color:#fff;scrollbar-darkshadow-color:#fff;scrollbar-color:#8a8a96 #fff;background-color:#fafbfc}:host [part=more-results-text]{font-size:.76em}:host [part=more-results-keys],:host [part=more-results] mark{color:#484848}:host [part=loader]{top:0;bottom:0;left:0;right:0;position:absolute}:host [part=backdrop]{background-color:#000;opacity:.6;width:100%;height:100%}::-webkit-scrollbar{width:13px;height:13px}::-webkit-scrollbar-button{background:0 0/1px 2px no-repeat #fff;height:12px;width:12px;display:block}::-webkit-scrollbar-thumb{background:#8a8a96;border-radius:7px;border:2px solid #fff}::-webkit-scrollbar-thumb:hover{background:#a9afba}::-webkit-scrollbar-thumb:active{background:#ee7600}::-webkit-scrollbar-track{background:#fff}::-webkit-scrollbar-corner{background:#fff}::-webkit-scrollbar-button:end:decrement,::-webkit-scrollbar-button:start:increment{display:none}::-webkit-scrollbar-button:horizontal{background-size:2px 1px}::-webkit-scrollbar-button:vertical:start:decrement{background-image:linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96);background-position:10px 6.5px,9px 5.5px,8px 4.5px,7px 3.5px,6px 2.5px,5px 3.5px,4px 4.5px,3px 5.5px,2px 6.5px}::-webkit-scrollbar-button:vertical:start:decrement:hover{background-image:linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba);background-position:10px 6.5px,9px 5.5px,8px 4.5px,7px 3.5px,6px 2.5px,5px 3.5px,4px 4.5px,3px 5.5px,2px 6.5px}::-webkit-scrollbar-button:vertical:start:decrement:active{background-image:linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600);background-position:10px 6.5px,9px 5.5px,8px 4.5px,7px 3.5px,6px 2.5px,5px 3.5px,4px 4.5px,3px 5.5px,2px 6.5px}::-webkit-scrollbar-button:vertical:end:increment{background-image:linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96);background-position:10px 3.5px,9px 4.5px,8px 5.5px,7px 6.5px,6px 7.5px,5px 6.5px,4px 5.5px,3px 4.5px,2px 3.5px}::-webkit-scrollbar-button:vertical:end:increment:hover{background-image:linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba);background-position:10px 3.5px,9px 4.5px,8px 5.5px,7px 6.5px,6px 7.5px,5px 6.5px,4px 5.5px,3px 4.5px,2px 3.5px}::-webkit-scrollbar-button:vertical:end:increment:active{background-image:linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600);background-position:10px 3.5px,9px 4.5px,8px 5.5px,7px 6.5px,6px 7.5px,5px 6.5px,4px 5.5px,3px 4.5px,2px 3.5px}::-webkit-scrollbar-button:horizontal:start:decrement{background-image:linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96);background-position:6.5px 10px,5.5px 9px,4.5px 8px,3.5px 7px,2.5px 6px,3.5px 5px,4.5px 4px,5.5px 3px,6.5px 2px}::-webkit-scrollbar-button:horizontal:start:decrement:hover{background-image:linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba);background-position:6.5px 10px,5.5px 9px,4.5px 8px,3.5px 7px,2.5px 6px,3.5px 5px,4.5px 4px,5.5px 3px,6.5px 2px}::-webkit-scrollbar-button:horizontal:start:decrement:active{background-image:linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600);background-position:6.5px 10px,5.5px 9px,4.5px 8px,3.5px 7px,2.5px 6px,3.5px 5px,4.5px 4px,5.5px 3px,6.5px 2px}::-webkit-scrollbar-button:horizontal:end:increment{background-image:linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96);background-position:3.5px 10px,4.5px 9px,5.5px 8px,6.5px 7px,7.5px 6px,6.5px 5px,5.5px 4px,4.5px 3px,3.5px 2px}::-webkit-scrollbar-button:horizontal:end:increment:hover{background-image:linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba);background-position:3.5px 10px,4.5px 9px,5.5px 8px,6.5px 7px,7.5px 6px,6.5px 5px,5.5px 4px,4.5px 3px,3.5px 2px}::-webkit-scrollbar-button:horizontal:end:increment:active{background-image:linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600);background-position:3.5px 10px,4.5px 9px,5.5px 8px,6.5px 7px,7.5px 6px,6.5px 5px,5.5px 4px,4.5px 3px,3.5px 2px}:host [part=more-results]{border-top:1px solid #a9afba;height:32px;font-size:13px}:host [part=more-results],:host [part=more-results]:focus,:host [part=more-results]:hover,:host [part=more-results][highlighted],:host [part=more-results][selected]{color:#0080f0}:host [part=more-results-keys],:host [part=more-results-keys] kbd{font-size:inherit;color:#0080f0}:host [part=more-results-keys] kbd{font-size:inherit;background-color:transparent;box-shadow:none;border-radius:0;padding:0;line-height:13px;display:inline}:host [part=more-results-text]{font-size:inherit}:host [part=more-results] mark{background-color:inherit;color:#ee7600;font-weight:400}:host [part=more-results] mark:after,:host [part=more-results] mark:before{color:#0080f0;content
|
|
4
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-autosuggest', styles: 'kbd{display:inline-flex;border-radius:2px;font-family:inherit;justify-content:center;align-items:center;vertical-align:middle;box-sizing:border-box;background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);color:#484848;min-width:1.33em;height:1.33em;padding:0 .3em;font-size:.76em}mark{color:#ee7600;background-color:transparent}:host{min-height:0;max-height:350px;border:1px solid #a9afba;margin-top:1px;background-color:#c2c2c2}:host([loading]){min-height:50px;min-width:150px;min-height:32px}:host [part=content]{overflow:auto;touch-action:manipulation;scrollbar-face-color:#8a8a96;scrollbar-shadow-color:#8a8a96;scrollbar-highlight-color:#8a8a96;scrollbar-arrow-color:#8a8a96;scrollbar-track-color:#fff;scrollbar-3dlight-color:#fff;scrollbar-darkshadow-color:#fff;scrollbar-color:#8a8a96 #fff;background-color:#fafbfc}:host [part=more-results-text]{font-size:.76em}:host [part=more-results-keys],:host [part=more-results] mark{color:#484848}:host [part=loader]{top:0;bottom:0;left:0;right:0;position:absolute}:host [part=backdrop]{background-color:#000;opacity:.6;width:100%;height:100%}::-webkit-scrollbar{width:13px;height:13px}::-webkit-scrollbar-button{background:0 0/1px 2px no-repeat #fff;height:12px;width:12px;display:block}::-webkit-scrollbar-thumb{background:#8a8a96;border-radius:7px;border:2px solid #fff}::-webkit-scrollbar-thumb:hover{background:#a9afba}::-webkit-scrollbar-thumb:active{background:#ee7600}::-webkit-scrollbar-track{background:#fff}::-webkit-scrollbar-corner{background:#fff}::-webkit-scrollbar-button:end:decrement,::-webkit-scrollbar-button:start:increment{display:none}::-webkit-scrollbar-button:horizontal{background-size:2px 1px}::-webkit-scrollbar-button:vertical:start:decrement{background-image:linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96);background-position:10px 6.5px,9px 5.5px,8px 4.5px,7px 3.5px,6px 2.5px,5px 3.5px,4px 4.5px,3px 5.5px,2px 6.5px}::-webkit-scrollbar-button:vertical:start:decrement:hover{background-image:linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba);background-position:10px 6.5px,9px 5.5px,8px 4.5px,7px 3.5px,6px 2.5px,5px 3.5px,4px 4.5px,3px 5.5px,2px 6.5px}::-webkit-scrollbar-button:vertical:start:decrement:active{background-image:linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600);background-position:10px 6.5px,9px 5.5px,8px 4.5px,7px 3.5px,6px 2.5px,5px 3.5px,4px 4.5px,3px 5.5px,2px 6.5px}::-webkit-scrollbar-button:vertical:end:increment{background-image:linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96);background-position:10px 3.5px,9px 4.5px,8px 5.5px,7px 6.5px,6px 7.5px,5px 6.5px,4px 5.5px,3px 4.5px,2px 3.5px}::-webkit-scrollbar-button:vertical:end:increment:hover{background-image:linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba);background-position:10px 3.5px,9px 4.5px,8px 5.5px,7px 6.5px,6px 7.5px,5px 6.5px,4px 5.5px,3px 4.5px,2px 3.5px}::-webkit-scrollbar-button:vertical:end:increment:active{background-image:linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600);background-position:10px 3.5px,9px 4.5px,8px 5.5px,7px 6.5px,6px 7.5px,5px 6.5px,4px 5.5px,3px 4.5px,2px 3.5px}::-webkit-scrollbar-button:horizontal:start:decrement{background-image:linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96);background-position:6.5px 10px,5.5px 9px,4.5px 8px,3.5px 7px,2.5px 6px,3.5px 5px,4.5px 4px,5.5px 3px,6.5px 2px}::-webkit-scrollbar-button:horizontal:start:decrement:hover{background-image:linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba);background-position:6.5px 10px,5.5px 9px,4.5px 8px,3.5px 7px,2.5px 6px,3.5px 5px,4.5px 4px,5.5px 3px,6.5px 2px}::-webkit-scrollbar-button:horizontal:start:decrement:active{background-image:linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600);background-position:6.5px 10px,5.5px 9px,4.5px 8px,3.5px 7px,2.5px 6px,3.5px 5px,4.5px 4px,5.5px 3px,6.5px 2px}::-webkit-scrollbar-button:horizontal:end:increment{background-image:linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96),linear-gradient(#8a8a96,#8a8a96);background-position:3.5px 10px,4.5px 9px,5.5px 8px,6.5px 7px,7.5px 6px,6.5px 5px,5.5px 4px,4.5px 3px,3.5px 2px}::-webkit-scrollbar-button:horizontal:end:increment:hover{background-image:linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba),linear-gradient(#a9afba,#a9afba);background-position:3.5px 10px,4.5px 9px,5.5px 8px,6.5px 7px,7.5px 6px,6.5px 5px,5.5px 4px,4.5px 3px,3.5px 2px}::-webkit-scrollbar-button:horizontal:end:increment:active{background-image:linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600),linear-gradient(#ee7600,#ee7600);background-position:3.5px 10px,4.5px 9px,5.5px 8px,6.5px 7px,7.5px 6px,6.5px 5px,5.5px 4px,4.5px 3px,3.5px 2px}:host [part=more-results]{border-top:1px solid #a9afba;height:32px;font-size:13px}:host [part=more-results],:host [part=more-results]:focus,:host [part=more-results]:hover,:host [part=more-results][highlighted],:host [part=more-results][selected]{color:#0080f0}:host [part=more-results-keys],:host [part=more-results-keys] kbd{font-size:inherit;color:#0080f0}:host [part=more-results-keys] kbd{font-size:inherit;background-color:transparent;box-shadow:none;border-radius:0;padding:0;line-height:13px;display:inline}:host [part=more-results-text]{font-size:inherit}:host [part=more-results] mark{background-color:inherit;color:#ee7600;font-weight:400}:host [part=more-results] mark:after,:host [part=more-results] mark:before{color:#0080f0;content:\'"\'}' }}));
|
package/lib/button/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { ControlElement, html } from '@refinitiv-ui/core';
|
|
3
3
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
|
-
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
5
4
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
6
|
-
import {
|
|
7
|
-
import { registerOverflowTooltip } from '../tooltip/index.js';
|
|
5
|
+
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
8
6
|
import { isElementOverflown } from '@refinitiv-ui/utils/element.js';
|
|
9
7
|
import '../icon/index.js';
|
|
8
|
+
import { registerOverflowTooltip } from '../tooltip/index.js';
|
|
9
|
+
import { VERSION } from '../version.js';
|
|
10
10
|
/**
|
|
11
11
|
* Use button for actions in forms, dialogs,
|
|
12
12
|
* and more with support for different states and styles.
|
|
@@ -66,7 +66,8 @@ let Button = class Button extends ControlElement {
|
|
|
66
66
|
*/
|
|
67
67
|
willUpdate(changedProperties) {
|
|
68
68
|
super.willUpdate(changedProperties);
|
|
69
|
-
if (changedProperties.has('active') && this.toggles ||
|
|
69
|
+
if ((changedProperties.has('active') && this.toggles) ||
|
|
70
|
+
(changedProperties.has('toggles') && this.toggles)) {
|
|
70
71
|
if (this.getAttribute('role') === 'radio') {
|
|
71
72
|
this.setAttribute('aria-checked', String(this.active));
|
|
72
73
|
}
|
|
@@ -147,9 +148,7 @@ let Button = class Button extends ControlElement {
|
|
|
147
148
|
* @return {TemplateResult | null} Render template
|
|
148
149
|
*/
|
|
149
150
|
get iconTemplate() {
|
|
150
|
-
return this.icon
|
|
151
|
-
? html `<ef-icon part="icon" icon="${this.icon}" id="icon"></ef-icon>`
|
|
152
|
-
: null;
|
|
151
|
+
return this.icon ? html `<ef-icon part="icon" icon="${this.icon}" id="icon"></ef-icon>` : null;
|
|
153
152
|
}
|
|
154
153
|
/**
|
|
155
154
|
* Returns hover icon template if exists
|
|
@@ -157,9 +156,7 @@ let Button = class Button extends ControlElement {
|
|
|
157
156
|
*/
|
|
158
157
|
get hoverIconTemplate() {
|
|
159
158
|
const hoverIcon = this.hoverIcon || this.icon;
|
|
160
|
-
return hoverIcon
|
|
161
|
-
? html `<ef-icon part="icon" icon="${hoverIcon}" id="hover-icon"></ef-icon>`
|
|
162
|
-
: null;
|
|
159
|
+
return hoverIcon ? html `<ef-icon part="icon" icon="${hoverIcon}" id="hover-icon"></ef-icon>` : null;
|
|
163
160
|
}
|
|
164
161
|
/**
|
|
165
162
|
* A `TemplateResult` that will be used
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement,
|
|
2
|
+
import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
3
|
/**
|
|
4
4
|
* Used to display multiple buttons to create a list of commands bar.
|
|
5
5
|
*/
|