@refinitiv-ui/elements 7.0.0 → 7.0.2
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 +195 -449
- package/LICENSE +2 -2
- package/README.md +12 -10
- package/cli.mjs +5 -3
- 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 +80 -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 +156 -123
- package/lib/calendar/utils.js +1 -1
- 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/elements/chart.d.ts +4 -4
- package/lib/chart/elements/chart.js +39 -33
- package/lib/chart/plugins/doughnut-center-label.d.ts +3 -3
- package/lib/chart/plugins/doughnut-center-label.js +13 -9
- 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 +27 -18
- 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 +150 -131
- 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 +5 -5
- package/lib/dialog/index.js +51 -47
- 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 +8 -10
- package/lib/interactive-chart/helpers/types.d.ts +3 -3
- package/lib/interactive-chart/index.d.ts +29 -29
- package/lib/interactive-chart/index.js +69 -55
- 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 +10 -7
- 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 +14 -13
- 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 +152 -96
- 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 +14 -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 +3 -3
- 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 +68 -81
- 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 +34 -31
- package/lib/time-picker/index.d.ts +6 -6
- package/lib/time-picker/index.js +103 -89
- 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 +2 -2
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright ©
|
|
1
|
+
Copyright © 2023, Refinitiv.
|
|
2
2
|
|
|
3
3
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
you may not use this file except in compliance with the License.
|
|
@@ -10,4 +10,4 @@ Unless required by applicable law or agreed to in writing, software
|
|
|
10
10
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
11
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
See the License for the specific language governing permissions and
|
|
13
|
-
limitations under the License.
|
|
13
|
+
limitations under the License.
|
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/cli.mjs
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import yargs from 'yargs/yargs';
|
|
3
2
|
import { hideBin } from 'yargs/helpers';
|
|
4
|
-
import
|
|
3
|
+
import yargs from 'yargs/yargs';
|
|
4
|
+
|
|
5
5
|
import { commands } from './scripts/cmd/index.mjs';
|
|
6
|
+
import { errorHandler, info } from './scripts/helpers/index.mjs';
|
|
6
7
|
|
|
7
8
|
yargs(hideBin(process.argv))
|
|
8
9
|
.usage('Element Framework CLI Commands\n\nUsage: $0 <command> [options]')
|
|
9
10
|
.command(commands)
|
|
10
11
|
.demandCommand(1, 'You need at least one command.')
|
|
11
12
|
.version(false)
|
|
12
|
-
.help('help')
|
|
13
|
+
.help('help')
|
|
14
|
+
.alias('help', 'h')
|
|
13
15
|
.fail(function (msg, err, yargs) {
|
|
14
16
|
if (msg) {
|
|
15
17
|
errorHandler(msg);
|
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
|
* @param element - potential child of accordion
|
|
@@ -86,8 +86,7 @@ let Accordion = class Accordion extends Collapse {
|
|
|
86
86
|
* @returns array of accordion items
|
|
87
87
|
*/
|
|
88
88
|
getChildItems() {
|
|
89
|
-
return [...this.querySelectorAll('ef-collapse')]
|
|
90
|
-
.filter((el) => isDirectAccordionChild(el, this));
|
|
89
|
+
return [...this.querySelectorAll('ef-collapse')].filter((el) => isDirectAccordionChild(el, this));
|
|
91
90
|
}
|
|
92
91
|
/**
|
|
93
92
|
* collapse non selected child items on click
|
|
@@ -108,9 +107,7 @@ let Accordion = class Accordion extends Collapse {
|
|
|
108
107
|
* @return {TemplateResult} Render template
|
|
109
108
|
*/
|
|
110
109
|
render() {
|
|
111
|
-
return html `
|
|
112
|
-
<slot></slot>
|
|
113
|
-
`;
|
|
110
|
+
return html ` <slot></slot> `;
|
|
114
111
|
}
|
|
115
112
|
};
|
|
116
113
|
__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, 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.
|
|
@@ -66,7 +66,13 @@ let AppstateBar = class AppstateBar extends BasicElement {
|
|
|
66
66
|
<div part="heading">${this.heading}</div>
|
|
67
67
|
<div part="message"><slot></slot></div>
|
|
68
68
|
<div part="right"><slot name="right"></slot></div>
|
|
69
|
-
<ef-icon
|
|
69
|
+
<ef-icon
|
|
70
|
+
role="button"
|
|
71
|
+
part="close"
|
|
72
|
+
@tap="${this.clear}"
|
|
73
|
+
icon="cross"
|
|
74
|
+
aria-label="${this.t('CLOSE')}"
|
|
75
|
+
></ef-icon>
|
|
70
76
|
`;
|
|
71
77
|
}
|
|
72
78
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
2
|
import { CSSResultGroup, 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 { 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
|
`
|
|
@@ -189,76 +190,76 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
189
190
|
// TODO: think of a nicer way to do this
|
|
190
191
|
this.xmlSerializer = null;
|
|
191
192
|
/**
|
|
192
|
-
|
|
193
|
-
|
|
193
|
+
* @ignore
|
|
194
|
+
*/
|
|
194
195
|
this.position = ['bottom-start', 'top-start', 'right-middle'];
|
|
195
196
|
/**
|
|
196
|
-
|
|
197
|
-
|
|
197
|
+
* @ignore
|
|
198
|
+
*/
|
|
198
199
|
this.noCancelOnEscKey = true;
|
|
199
200
|
/**
|
|
200
|
-
|
|
201
|
-
|
|
201
|
+
* @ignore
|
|
202
|
+
*/
|
|
202
203
|
this.noCancelOnOutsideClick = true;
|
|
203
204
|
/**
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
* @ignore
|
|
206
|
+
*/
|
|
206
207
|
this.noAutofocus = true;
|
|
207
208
|
/**
|
|
208
|
-
|
|
209
|
-
|
|
209
|
+
* @ignore
|
|
210
|
+
*/
|
|
210
211
|
this.noOverlap = true;
|
|
211
212
|
/**
|
|
212
|
-
|
|
213
|
-
|
|
213
|
+
* @ignore
|
|
214
|
+
*/
|
|
214
215
|
this.withShadow = false;
|
|
215
216
|
/**
|
|
216
217
|
* @ignore
|
|
217
218
|
*/
|
|
218
219
|
this.noFocusManagement = true;
|
|
219
220
|
/**
|
|
220
|
-
|
|
221
|
-
|
|
221
|
+
* @ignore
|
|
222
|
+
*/
|
|
222
223
|
this.onInputValueChange = this.onInputValueChange.bind(this);
|
|
223
224
|
/**
|
|
224
|
-
|
|
225
|
-
|
|
225
|
+
* @ignore
|
|
226
|
+
*/
|
|
226
227
|
this.onInputKeyDown = this.onInputKeyDown.bind(this);
|
|
227
228
|
/**
|
|
228
|
-
|
|
229
|
-
|
|
229
|
+
* @ignore
|
|
230
|
+
*/
|
|
230
231
|
this.onInputBlur = this.onInputBlur.bind(this);
|
|
231
232
|
/**
|
|
232
|
-
|
|
233
|
-
|
|
233
|
+
* @ignore
|
|
234
|
+
*/
|
|
234
235
|
this.onInputFocus = this.onInputFocus.bind(this);
|
|
235
236
|
/**
|
|
236
|
-
|
|
237
|
-
|
|
237
|
+
* @ignore
|
|
238
|
+
*/
|
|
238
239
|
this.suggestionsQueryAction = this.suggestionsQueryAction.bind(this);
|
|
239
240
|
/**
|
|
240
|
-
|
|
241
|
-
|
|
241
|
+
* @ignore
|
|
242
|
+
*/
|
|
242
243
|
this.itemSelectAction = this.itemSelectAction.bind(this);
|
|
243
244
|
/**
|
|
244
|
-
|
|
245
|
-
|
|
245
|
+
* @ignore
|
|
246
|
+
*/
|
|
246
247
|
this.itemHighlightAction = this.itemHighlightAction.bind(this);
|
|
247
248
|
/**
|
|
248
|
-
|
|
249
|
-
|
|
249
|
+
* @ignore
|
|
250
|
+
*/
|
|
250
251
|
this.suggestionsFetchRequestedAction = this.suggestionsFetchRequestedAction.bind(this);
|
|
251
252
|
/**
|
|
252
|
-
|
|
253
|
-
|
|
253
|
+
* @ignore
|
|
254
|
+
*/
|
|
254
255
|
this.suggestionsClearRequestedAction = this.suggestionsClearRequestedAction.bind(this);
|
|
255
256
|
/**
|
|
256
|
-
|
|
257
|
-
|
|
257
|
+
* @ignore
|
|
258
|
+
*/
|
|
258
259
|
this.attachEventsAddAction = this.attachEventsAddAction.bind(this);
|
|
259
260
|
/**
|
|
260
|
-
|
|
261
|
-
|
|
261
|
+
* @ignore
|
|
262
|
+
*/
|
|
262
263
|
this.attachEventsRemoveAction = this.attachEventsRemoveAction.bind(this);
|
|
263
264
|
/**
|
|
264
265
|
* @ignore
|
|
@@ -279,7 +280,8 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
279
280
|
* @returns {void}
|
|
280
281
|
*/
|
|
281
282
|
onInputValueChange(event) {
|
|
282
|
-
if (!this.suspended) {
|
|
283
|
+
if (!this.suspended) {
|
|
284
|
+
// avoid circular
|
|
283
285
|
/* c8 ignore next */
|
|
284
286
|
if (isMobile) {
|
|
285
287
|
this.lastActiveElement = event.target;
|
|
@@ -409,7 +411,7 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
409
411
|
const { detail: { query, suggestion } } = event;
|
|
410
412
|
/* c8 ignore next */
|
|
411
413
|
if (this.attachTarget) {
|
|
412
|
-
this.attachTarget.value = suggestion && suggestion.label || query;
|
|
414
|
+
this.attachTarget.value = (suggestion && suggestion.label) || query;
|
|
413
415
|
}
|
|
414
416
|
}
|
|
415
417
|
/**
|
|
@@ -536,7 +538,8 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
536
538
|
const query = this.xmlSerializer.serializeToString(document.createTextNode(this.query ? this.query.toString() : ''));
|
|
537
539
|
return html `
|
|
538
540
|
<span part="more-results-text">
|
|
539
|
-
${this.moreSearchText
|
|
541
|
+
${this.moreSearchText
|
|
542
|
+
? unsafeHTML(this.moreSearchText.replace(/{0\}/g, `<mark>${query}</mark>`))
|
|
540
543
|
: this.t('MORE_RESULTS', {
|
|
541
544
|
query,
|
|
542
545
|
mark: (chunks) => `<mark>${chunks}</mark>`
|
|
@@ -554,7 +557,8 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
554
557
|
*/
|
|
555
558
|
requestSuggestions(reason, debounce = false) {
|
|
556
559
|
this.dispatchSuggestionsQuery(reason);
|
|
557
|
-
if (this.preservedQueryValue === this.query) {
|
|
560
|
+
if (this.preservedQueryValue === this.query) {
|
|
561
|
+
// if the query is the same do not re-issue the request, instead try to open auto suggest
|
|
558
562
|
if (!this.opened && ((this.suggestions && this.suggestions.length) || this.moreResults)) {
|
|
559
563
|
this.setOpened(true);
|
|
560
564
|
}
|
|
@@ -760,13 +764,13 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
760
764
|
* @returns true if some of changedProperties modified
|
|
761
765
|
*/
|
|
762
766
|
shouldAutosuggestUpdate(changedProperties) {
|
|
763
|
-
return changedProperties.has('attach')
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
767
|
+
return (changedProperties.has('attach') ||
|
|
768
|
+
changedProperties.has('suggestions') ||
|
|
769
|
+
changedProperties.has('moreResults') ||
|
|
770
|
+
changedProperties.has('moreSearchText') ||
|
|
771
|
+
changedProperties.has('loading') ||
|
|
772
|
+
changedProperties.has('debounceRate') ||
|
|
773
|
+
changedProperties.has(TranslatePropertyKey));
|
|
770
774
|
}
|
|
771
775
|
/**
|
|
772
776
|
* Run when document click event happens.
|
|
@@ -976,7 +980,7 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
976
980
|
* @returns focused true if attach target is focused
|
|
977
981
|
*/
|
|
978
982
|
get attachTargetFocused() {
|
|
979
|
-
return this.isFocused(document.activeElement) || this.attachTarget === this.lastActiveElement;
|
|
983
|
+
return (this.isFocused(document.activeElement) || this.attachTarget === this.lastActiveElement);
|
|
980
984
|
}
|
|
981
985
|
/**
|
|
982
986
|
* Walk through shadowDOM to find activeElement
|
|
@@ -1150,11 +1154,8 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
1150
1154
|
return null;
|
|
1151
1155
|
}
|
|
1152
1156
|
return html `
|
|
1153
|
-
<ef-item
|
|
1154
|
-
|
|
1155
|
-
role="option"
|
|
1156
|
-
id="moreResults"
|
|
1157
|
-
part="more-results">${this.moreResultsTextTemplate}
|
|
1157
|
+
<ef-item tabIndex="-1" role="option" id="moreResults" part="more-results"
|
|
1158
|
+
>${this.moreResultsTextTemplate}
|
|
1158
1159
|
</ef-item>
|
|
1159
1160
|
`;
|
|
1160
1161
|
}
|
|
@@ -1165,24 +1166,23 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
1165
1166
|
*/
|
|
1166
1167
|
render() {
|
|
1167
1168
|
return html `
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
${this.loaderTemplate}
|
|
1169
|
+
<div ${ref(this.headerElementRef)} part="header">
|
|
1170
|
+
<slot id="headerSlot" name="header"></slot>
|
|
1171
|
+
</div>
|
|
1172
|
+
<div
|
|
1173
|
+
${ref(this.contentElementRef)}
|
|
1174
|
+
part="content"
|
|
1175
|
+
@mousemove="${this.onItemMouseMove}"
|
|
1176
|
+
@mouseleave="${this.onItemMouseLeave}"
|
|
1177
|
+
@tap="${this.onItemMouseClick}"
|
|
1178
|
+
>
|
|
1179
|
+
<slot ${ref(this.contentSlotRef)} @slotchange="${this.onSlotChange}"></slot>
|
|
1180
|
+
${this.moreResultsTemplate}
|
|
1181
|
+
</div>
|
|
1182
|
+
<div ${ref(this.footerElementRef)} part="footer">
|
|
1183
|
+
<slot id="footerSlot" name="footer"></slot>
|
|
1184
|
+
</div>
|
|
1185
|
+
${this.loaderTemplate}
|
|
1186
1186
|
`;
|
|
1187
1187
|
}
|
|
1188
1188
|
};
|
|
@@ -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-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-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-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-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
|
*/
|