@refinitiv-ui/elements 5.3.4 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +89 -0
- package/lib/accordion/custom-elements.md +18 -0
- package/lib/accordion/index.d.ts +5 -5
- package/lib/accordion/index.js +8 -11
- package/lib/appstate-bar/custom-elements.md +22 -0
- package/lib/appstate-bar/index.d.ts +5 -5
- package/lib/appstate-bar/index.js +8 -11
- package/lib/autosuggest/custom-elements.json +24 -4
- package/lib/autosuggest/custom-elements.md +54 -0
- package/lib/autosuggest/helpers/types.d.ts +1 -1
- package/lib/autosuggest/helpers/utils.d.ts +2 -2
- package/lib/autosuggest/helpers/utils.js +1 -2
- package/lib/autosuggest/index.d.ts +13 -8
- package/lib/autosuggest/index.js +38 -31
- package/lib/button/custom-elements.json +2 -2
- package/lib/button/custom-elements.md +23 -0
- package/lib/button/index.d.ts +13 -13
- package/lib/button/index.js +41 -31
- package/lib/button-bar/custom-elements.md +9 -0
- package/lib/button-bar/index.d.ts +3 -3
- package/lib/button-bar/index.js +8 -10
- package/lib/calendar/constants.d.ts +22 -0
- package/lib/calendar/constants.js +23 -0
- package/lib/calendar/custom-elements.json +8 -6
- package/lib/calendar/custom-elements.md +35 -0
- package/lib/calendar/index.d.ts +9 -7
- package/lib/calendar/index.js +20 -38
- package/lib/calendar/locales.d.ts +1 -31
- package/lib/calendar/locales.js +0 -104
- package/lib/calendar/types.d.ts +1 -5
- package/lib/calendar/types.js +1 -6
- package/lib/calendar/utils.d.ts +31 -1
- package/lib/calendar/utils.js +104 -2
- package/lib/canvas/custom-elements.json +7 -5
- package/lib/canvas/custom-elements.md +27 -0
- package/lib/canvas/index.d.ts +4 -3
- package/lib/canvas/index.js +8 -10
- package/lib/card/custom-elements.json +3 -1
- package/lib/card/custom-elements.md +24 -0
- package/lib/card/helpers/types.d.ts +1 -1
- package/lib/card/index.d.ts +10 -8
- package/lib/card/index.js +14 -13
- package/lib/chart/custom-elements.json +1 -1
- package/lib/chart/custom-elements.md +16 -0
- package/lib/chart/helpers/index.d.ts +2 -2
- package/lib/chart/helpers/index.js +2 -2
- package/lib/chart/index.d.ts +6 -6
- package/lib/chart/index.js +12 -14
- package/lib/checkbox/custom-elements.json +4 -4
- package/lib/checkbox/custom-elements.md +18 -0
- package/lib/checkbox/index.d.ts +21 -13
- package/lib/checkbox/index.js +56 -31
- package/lib/clock/custom-elements.json +21 -4
- package/lib/clock/custom-elements.md +28 -0
- package/lib/clock/index.d.ts +17 -5
- package/lib/clock/index.js +37 -18
- package/lib/clock/themes/halo/dark/index.js +1 -1
- package/lib/clock/themes/halo/light/index.js +1 -1
- package/lib/clock/themes/solar/charcoal/index.js +1 -1
- package/lib/clock/themes/solar/pearl/index.js +1 -1
- package/lib/clock/utils/TickManager.js +2 -2
- package/lib/collapse/custom-elements.md +27 -0
- package/lib/collapse/index.d.ts +7 -7
- package/lib/collapse/index.js +11 -13
- package/lib/color-dialog/custom-elements.json +29 -16
- package/lib/color-dialog/custom-elements.md +39 -0
- package/lib/color-dialog/elements/color-palettes.d.ts +5 -5
- package/lib/color-dialog/elements/color-palettes.js +9 -13
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -5
- package/lib/color-dialog/elements/grayscale-palettes.js +10 -13
- package/lib/color-dialog/elements/palettes.d.ts +10 -3
- package/lib/color-dialog/elements/palettes.js +58 -45
- package/lib/color-dialog/helpers/color-helpers.d.ts +7 -53
- package/lib/color-dialog/helpers/color-helpers.js +12 -109
- package/lib/color-dialog/helpers/value-model.d.ts +1 -1
- package/lib/color-dialog/helpers/value-model.js +18 -16
- package/lib/color-dialog/index.d.ts +19 -19
- package/lib/color-dialog/index.js +47 -45
- package/lib/combo-box/custom-elements.json +28 -16
- package/lib/combo-box/custom-elements.md +35 -0
- package/lib/combo-box/helpers/filter.d.ts +4 -4
- package/lib/combo-box/helpers/types.d.ts +2 -2
- package/lib/combo-box/index.d.ts +26 -18
- package/lib/combo-box/index.js +36 -27
- package/lib/combo-box/themes/halo/dark/index.js +1 -1
- package/lib/combo-box/themes/halo/light/index.js +1 -1
- package/lib/combo-box/themes/solar/charcoal/index.js +1 -1
- package/lib/combo-box/themes/solar/pearl/index.js +1 -1
- package/lib/counter/custom-elements.json +8 -4
- package/lib/counter/custom-elements.md +11 -0
- package/lib/counter/index.d.ts +5 -3
- package/lib/counter/index.js +11 -12
- package/lib/datetime-picker/custom-elements.json +52 -23
- package/lib/datetime-picker/custom-elements.md +57 -0
- package/lib/datetime-picker/index.d.ts +25 -14
- package/lib/datetime-picker/index.js +46 -35
- package/lib/datetime-picker/locales.d.ts +1 -1
- package/lib/datetime-picker/locales.js +12 -1
- package/lib/datetime-picker/themes/solar/charcoal/index.js +1 -1
- package/lib/datetime-picker/themes/solar/pearl/index.js +1 -1
- package/lib/datetime-picker/types.d.ts +1 -1
- package/lib/datetime-picker/utils.js +1 -1
- package/lib/dialog/custom-elements.json +34 -12
- package/lib/dialog/custom-elements.md +47 -0
- package/lib/dialog/index.d.ts +17 -20
- package/lib/dialog/index.js +28 -31
- package/lib/email-field/custom-elements.json +81 -94
- package/lib/email-field/custom-elements.md +37 -0
- package/lib/email-field/index.d.ts +44 -116
- package/lib/email-field/index.js +48 -249
- package/lib/email-field/themes/solar/charcoal/index.js +1 -1
- package/lib/email-field/themes/solar/pearl/index.js +1 -1
- package/lib/events.d.ts +2 -2
- package/lib/events.js +1 -2
- package/lib/flag/custom-elements.md +10 -0
- package/lib/flag/index.d.ts +6 -4
- package/lib/flag/index.js +12 -12
- package/lib/flag/utils/FlagLoader.d.ts +1 -1
- package/lib/flag/utils/FlagLoader.js +1 -1
- package/lib/header/custom-elements.md +18 -0
- package/lib/header/index.d.ts +2 -2
- package/lib/header/index.js +5 -8
- package/lib/heatmap/custom-elements.md +26 -0
- package/lib/heatmap/helpers/color.d.ts +1 -1
- package/lib/heatmap/helpers/color.js +1 -1
- package/lib/heatmap/helpers/text.d.ts +1 -1
- package/lib/heatmap/index.d.ts +7 -7
- package/lib/heatmap/index.js +15 -16
- package/lib/icon/custom-elements.json +6 -4
- package/lib/icon/custom-elements.md +8 -0
- package/lib/icon/index.d.ts +9 -6
- package/lib/icon/index.js +28 -18
- package/lib/icon/utils/IconLoader.d.ts +6 -1
- package/lib/icon/utils/IconLoader.js +24 -17
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/interactive-chart/custom-elements.json +6 -10
- package/lib/interactive-chart/custom-elements.md +31 -0
- package/lib/interactive-chart/helpers/types.d.ts +2 -2
- package/lib/interactive-chart/index.d.ts +11 -8
- package/lib/interactive-chart/index.js +17 -17
- package/lib/item/custom-elements.json +4 -4
- package/lib/item/custom-elements.md +29 -0
- package/lib/item/helpers/types.d.ts +1 -1
- package/lib/item/index.d.ts +18 -8
- package/lib/item/index.js +36 -16
- package/lib/label/custom-elements.md +11 -0
- package/lib/label/index.d.ts +3 -3
- package/lib/label/index.js +12 -20
- package/lib/layout/custom-elements.md +26 -0
- package/lib/layout/index.d.ts +3 -3
- package/lib/layout/index.js +6 -9
- package/lib/led-gauge/custom-elements.json +4 -4
- package/lib/led-gauge/custom-elements.md +17 -0
- package/lib/led-gauge/index.d.ts +5 -4
- package/lib/led-gauge/index.js +9 -11
- package/lib/list/custom-elements.json +18 -5
- package/lib/list/custom-elements.md +32 -0
- package/lib/list/helpers/list-renderer.d.ts +2 -2
- package/lib/list/helpers/list-renderer.js +4 -2
- package/lib/list/helpers/types.d.ts +2 -2
- package/lib/list/index.d.ts +27 -10
- package/lib/list/index.js +54 -25
- package/lib/list/renderer.d.ts +2 -2
- package/lib/list/renderer.js +1 -1
- package/lib/loader/custom-elements.md +5 -0
- package/lib/loader/index.js +4 -8
- package/lib/multi-input/custom-elements.json +7 -6
- package/lib/multi-input/custom-elements.md +43 -0
- package/lib/multi-input/helpers/types.d.ts +1 -1
- package/lib/multi-input/index.d.ts +11 -7
- package/lib/multi-input/index.js +20 -17
- package/lib/multi-input/themes/solar/charcoal/index.js +1 -1
- package/lib/multi-input/themes/solar/pearl/index.js +1 -1
- package/lib/notification/custom-elements.md +26 -0
- package/lib/notification/elements/notification-tray.d.ts +2 -2
- package/lib/notification/elements/notification-tray.js +6 -9
- package/lib/notification/elements/notification.d.ts +5 -5
- package/lib/notification/elements/notification.js +8 -11
- package/lib/notification/helpers/status.d.ts +1 -1
- package/lib/notification/helpers/status.js +1 -1
- package/lib/notification/helpers/types.d.ts +1 -1
- package/lib/notification/index.d.ts +2 -2
- package/lib/notification/index.js +2 -2
- package/lib/number-field/custom-elements.json +99 -54
- package/lib/number-field/custom-elements.md +42 -0
- package/lib/number-field/index.d.ts +96 -51
- package/lib/number-field/index.js +121 -89
- package/lib/number-field/themes/solar/charcoal/index.js +1 -1
- package/lib/number-field/themes/solar/pearl/index.js +1 -1
- package/lib/overlay/custom-elements.json +26 -13
- package/lib/overlay/custom-elements.md +54 -0
- package/lib/overlay/elements/overlay-backdrop.d.ts +4 -4
- package/lib/overlay/elements/overlay-backdrop.js +6 -9
- package/lib/overlay/elements/overlay-viewport.d.ts +3 -3
- package/lib/overlay/elements/overlay-viewport.js +5 -9
- package/lib/overlay/elements/overlay.d.ts +10 -5
- package/lib/overlay/elements/overlay.js +27 -28
- package/lib/overlay/index.d.ts +2 -2
- package/lib/overlay/index.js +1 -1
- package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
- package/lib/overlay/managers/backdrop-manager.js +2 -2
- package/lib/overlay/managers/close-manager.js +1 -1
- package/lib/overlay/managers/focus-manager.js +2 -2
- package/lib/overlay/managers/interaction-lock-manager.js +2 -2
- package/lib/overlay/managers/viewport-manager.d.ts +2 -2
- package/lib/overlay/managers/viewport-manager.js +6 -2
- package/lib/overlay/managers/zindex-manager.js +1 -1
- package/lib/overlay-menu/custom-elements.json +70 -20
- package/lib/overlay-menu/custom-elements.md +44 -0
- package/lib/overlay-menu/helpers/types.d.ts +3 -3
- package/lib/overlay-menu/index.d.ts +26 -19
- package/lib/overlay-menu/index.js +47 -33
- package/lib/overlay-menu/managers/menu-manager.d.ts +2 -2
- package/lib/overlay-menu/managers/menu-manager.js +3 -3
- package/lib/pagination/custom-elements.md +27 -0
- package/lib/pagination/index.d.ts +8 -8
- package/lib/pagination/index.js +13 -15
- package/lib/panel/custom-elements.md +11 -0
- package/lib/panel/index.d.ts +3 -3
- package/lib/panel/index.js +6 -9
- package/lib/password-field/custom-elements.json +62 -67
- package/lib/password-field/custom-elements.md +39 -0
- package/lib/password-field/index.d.ts +43 -94
- package/lib/password-field/index.js +52 -198
- package/lib/password-field/themes/solar/charcoal/index.js +1 -1
- package/lib/password-field/themes/solar/pearl/index.js +1 -1
- package/lib/pill/custom-elements.json +8 -6
- package/lib/pill/custom-elements.md +22 -0
- package/lib/pill/index.d.ts +5 -5
- package/lib/pill/index.js +9 -11
- package/lib/progress-bar/custom-elements.md +18 -0
- package/lib/progress-bar/index.d.ts +3 -3
- package/lib/progress-bar/index.js +7 -9
- package/lib/radio-button/custom-elements.json +4 -4
- package/lib/radio-button/custom-elements.md +19 -0
- package/lib/radio-button/index.d.ts +25 -8
- package/lib/radio-button/index.js +84 -21
- package/lib/radio-button/radio-button-registry.d.ts +3 -2
- package/lib/radio-button/radio-button-registry.js +57 -4
- package/lib/rating/custom-elements.md +17 -0
- package/lib/rating/index.d.ts +3 -3
- package/lib/rating/index.js +9 -10
- package/lib/search-field/custom-elements.json +70 -74
- package/lib/search-field/custom-elements.md +41 -0
- package/lib/search-field/index.d.ts +44 -101
- package/lib/search-field/index.js +50 -220
- package/lib/search-field/themes/solar/charcoal/index.js +1 -1
- package/lib/search-field/themes/solar/pearl/index.js +1 -1
- package/lib/select/custom-elements.json +5 -4
- package/lib/select/custom-elements.md +24 -0
- package/lib/select/helpers/types.d.ts +1 -1
- package/lib/select/index.d.ts +18 -10
- package/lib/select/index.js +84 -45
- package/lib/sidebar-layout/custom-elements.json +2 -6
- package/lib/sidebar-layout/custom-elements.md +21 -0
- package/lib/sidebar-layout/index.d.ts +7 -6
- package/lib/sidebar-layout/index.js +9 -10
- package/lib/slider/custom-elements.json +4 -4
- package/lib/slider/custom-elements.md +28 -0
- package/lib/slider/index.d.ts +4 -4
- package/lib/slider/index.js +9 -10
- package/lib/sparkline/custom-elements.json +4 -4
- package/lib/sparkline/custom-elements.md +16 -0
- package/lib/sparkline/index.d.ts +6 -4
- package/lib/sparkline/index.js +10 -10
- package/lib/swing-gauge/custom-elements.json +5 -3
- package/lib/swing-gauge/custom-elements.md +17 -0
- package/lib/swing-gauge/helpers.d.ts +1 -1
- package/lib/swing-gauge/helpers.js +1 -1
- package/lib/swing-gauge/index.d.ts +9 -7
- package/lib/swing-gauge/index.js +17 -15
- package/lib/tab/custom-elements.json +2 -2
- package/lib/tab/custom-elements.md +22 -0
- package/lib/tab/index.d.ts +5 -5
- package/lib/tab/index.js +9 -12
- package/lib/tab/themes/solar/charcoal/index.js +1 -1
- package/lib/tab/themes/solar/pearl/index.js +1 -1
- package/lib/tab-bar/custom-elements.md +11 -0
- package/lib/tab-bar/index.d.ts +4 -4
- package/lib/tab-bar/index.js +9 -11
- package/lib/tab-bar/themes/solar/charcoal/index.js +1 -1
- package/lib/tab-bar/themes/solar/pearl/index.js +1 -1
- package/lib/text-field/custom-elements.json +78 -89
- package/lib/text-field/custom-elements.md +35 -0
- package/lib/text-field/index.d.ts +59 -79
- package/lib/text-field/index.js +99 -158
- package/lib/text-field/themes/solar/charcoal/index.js +1 -1
- package/lib/text-field/themes/solar/pearl/index.js +1 -1
- package/lib/time-picker/custom-elements.json +4 -4
- package/lib/time-picker/custom-elements.md +28 -0
- package/lib/time-picker/index.d.ts +7 -4
- package/lib/time-picker/index.js +15 -14
- package/lib/time-picker/themes/solar/charcoal/index.js +1 -1
- package/lib/time-picker/themes/solar/pearl/index.js +1 -1
- package/lib/toggle/custom-elements.json +4 -4
- package/lib/toggle/custom-elements.md +19 -0
- package/lib/toggle/index.d.ts +14 -4
- package/lib/toggle/index.js +31 -12
- package/lib/tooltip/custom-elements.md +14 -0
- package/lib/tooltip/elements/title-tooltip.js +2 -2
- package/lib/tooltip/elements/tooltip-element.d.ts +1 -1
- package/lib/tooltip/helpers/overflow-tooltip.d.ts +1 -1
- package/lib/tooltip/helpers/overflow-tooltip.js +1 -1
- package/lib/tooltip/helpers/renderer.d.ts +1 -1
- package/lib/tooltip/helpers/types.d.ts +1 -1
- package/lib/tooltip/index.d.ts +9 -9
- package/lib/tooltip/index.js +18 -20
- package/lib/tooltip/managers/tooltip-manager.d.ts +2 -2
- package/lib/tooltip/managers/tooltip-manager.js +3 -7
- package/lib/tornado-chart/custom-elements.md +18 -0
- package/lib/tornado-chart/elements/tornado-chart.d.ts +4 -4
- package/lib/tornado-chart/elements/tornado-chart.js +8 -11
- package/lib/tornado-chart/elements/tornado-item.d.ts +5 -5
- package/lib/tornado-chart/elements/tornado-item.js +10 -12
- package/lib/tornado-chart/index.d.ts +2 -2
- package/lib/tornado-chart/index.js +2 -2
- package/lib/tree/custom-elements.json +17 -3
- package/lib/tree/custom-elements.md +32 -0
- package/lib/tree/elements/tree-item.d.ts +4 -4
- package/lib/tree/elements/tree-item.js +10 -13
- package/lib/tree/elements/tree.d.ts +51 -5
- package/lib/tree/elements/tree.js +138 -11
- package/lib/tree/helpers/filter.d.ts +8 -0
- package/lib/tree/helpers/filter.js +33 -0
- package/lib/tree/helpers/renderer.d.ts +2 -2
- package/lib/tree/helpers/renderer.js +3 -3
- package/lib/tree/helpers/types.d.ts +9 -1
- package/lib/tree/index.d.ts +4 -4
- package/lib/tree/index.js +3 -3
- package/lib/tree/managers/tree-manager.d.ts +22 -10
- package/lib/tree/managers/tree-manager.js +56 -40
- package/lib/tree/themes/halo/dark/index.js +1 -1
- package/lib/tree/themes/halo/light/index.js +1 -1
- package/lib/tree/themes/solar/charcoal/index.js +1 -1
- package/lib/tree/themes/solar/pearl/index.js +1 -1
- package/lib/tree-select/custom-elements.json +10 -6
- package/lib/tree-select/custom-elements.md +26 -0
- package/lib/tree-select/helpers/types.d.ts +2 -2
- package/lib/tree-select/index.d.ts +32 -28
- package/lib/tree-select/index.js +54 -44
- package/lib/tree-select/themes/halo/dark/index.js +1 -1
- package/lib/tree-select/themes/halo/light/index.js +1 -1
- package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
- package/lib/tree-select/themes/solar/pearl/index.js +1 -1
- package/lib/version.d.ts +1 -0
- package/lib/version.js +1 -0
- package/package.json +298 -15
- package/lib/autosuggest/helpers/const.d.ts +0 -2
- package/lib/autosuggest/helpers/const.js +0 -3
- package/lib/overlay-menu/helpers/uuid.d.ts +0 -7
- package/lib/overlay-menu/helpers/uuid.js +0 -13
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { TemplateResult,
|
|
2
|
+
import { TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
import '../button/index.js';
|
|
4
|
+
import '../number-field/index.js';
|
|
5
|
+
import '../text-field/index.js';
|
|
6
|
+
import { Dialog } from '../dialog/index.js';
|
|
7
|
+
import './elements/color-palettes.js';
|
|
8
|
+
import './elements/grayscale-palettes.js';
|
|
3
9
|
import { Translate } from '@refinitiv-ui/translate';
|
|
4
|
-
import '@refinitiv-ui/phrasebook/lib/locale/en/color-dialog';
|
|
5
|
-
import '../button';
|
|
6
|
-
import '../number-field';
|
|
7
|
-
import '../text-field';
|
|
8
|
-
import { Dialog } from '../dialog';
|
|
9
|
-
import './elements/color-palettes';
|
|
10
|
-
import './elements/grayscale-palettes';
|
|
10
|
+
import '@refinitiv-ui/phrasebook/lib/locale/en/color-dialog.js';
|
|
11
11
|
/**
|
|
12
12
|
* Displays a colour picker dialog,
|
|
13
13
|
* for selecting a predefined range of colours.
|
|
@@ -15,8 +15,8 @@ import './elements/grayscale-palettes';
|
|
|
15
15
|
* @fires value-changed - Fired when the `value` property changes.
|
|
16
16
|
* @fires opened-changed - Fired when the `opened` property changes.
|
|
17
17
|
*
|
|
18
|
-
* @attr {string|null} header - Set Header/Title of the color dialog
|
|
19
|
-
* @prop {string|null} header - Set Header/Title of the color dialog
|
|
18
|
+
* @attr {string | null} header - Set Header/Title of the color dialog
|
|
19
|
+
* @prop {string | null} [header=null] - Set Header/Title of the color dialog
|
|
20
20
|
*
|
|
21
21
|
* @attr {boolean} [opened=false] - Set dialog to open
|
|
22
22
|
* @prop {boolean} [opened=false] - Set dialog to open
|
|
@@ -24,14 +24,14 @@ import './elements/grayscale-palettes';
|
|
|
24
24
|
* @attr {boolean} [no-cancel-on-esc-key=false] - Prevents dialog to close when user presses ESC key
|
|
25
25
|
* @prop {boolean} [noCancelOnEscKey=false] - Prevents dialog to close when user presses ESC key
|
|
26
26
|
*
|
|
27
|
-
* @attr {string} x - Set a specific x coordinate of dialog
|
|
28
|
-
* @prop {string} x - Set a specific x coordinate of dialog
|
|
27
|
+
* @attr {string | undefined} x - Set a specific x coordinate of dialog
|
|
28
|
+
* @prop {string | undefined} x - Set a specific x coordinate of dialog
|
|
29
29
|
*
|
|
30
|
-
* @attr {string} y - Set a specific y coordinate of dialog
|
|
31
|
-
* @prop {string} y - Set a specific y coordinate of dialog
|
|
30
|
+
* @attr {string | undefined} y - Set a specific y coordinate of dialog
|
|
31
|
+
* @prop {string | undefined} y - Set a specific y coordinate of dialog
|
|
32
32
|
*
|
|
33
|
-
* @attr {string} position-target - Set position of dialog i.e. `top`, `right`, `left`, `bottom`, `center` or combination of theme e.g. `top right`.
|
|
34
|
-
* @prop {string} positionTarget - Set position of dialog i.e. `top`, `right`, `left`, `bottom`, `center` or combination of theme e.g. `top right`.
|
|
33
|
+
* @attr {string | undefined} position-target - Set position of dialog i.e. `top`, `right`, `left`, `bottom`, `center` or combination of theme e.g. `top right`.
|
|
34
|
+
* @prop {string | undefined} positionTarget - Set position of dialog i.e. `top`, `right`, `left`, `bottom`, `center` or combination of theme e.g. `top right`.
|
|
35
35
|
*
|
|
36
36
|
* @prop {boolean} [noCancelOnOutsideClick=true] - Prevents dialog to close when user clicks outside the dialog.
|
|
37
37
|
*
|
|
@@ -48,12 +48,12 @@ export declare class ColorDialog extends Dialog {
|
|
|
48
48
|
*/
|
|
49
49
|
static get version(): string;
|
|
50
50
|
/**
|
|
51
|
-
* A `
|
|
51
|
+
* A `CSSResultGroup` that will be used
|
|
52
52
|
* to style the host, slotted children
|
|
53
53
|
* and the internal template of the element.
|
|
54
|
-
* @return
|
|
54
|
+
* @return CSS template
|
|
55
55
|
*/
|
|
56
|
-
static get styles():
|
|
56
|
+
static get styles(): CSSResultGroup;
|
|
57
57
|
/**
|
|
58
58
|
* speed up rendering by not populating content on page load
|
|
59
59
|
*/
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import {
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, css, WarningNotice } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
5
|
+
import { query } from '@refinitiv-ui/core/lib/decorators/query.js';
|
|
6
|
+
import { styleMap } from '@refinitiv-ui/core/lib/directives/style-map.js';
|
|
7
|
+
import { rgb } from '@refinitiv-ui/utils/lib/color.js';
|
|
8
|
+
import { VERSION } from '../version.js';
|
|
9
|
+
import { ValueModel } from './helpers/value-model.js';
|
|
10
|
+
import { isHex, removeHashSign } from './helpers/color-helpers.js';
|
|
11
|
+
import '../button/index.js';
|
|
12
|
+
import '../number-field/index.js';
|
|
13
|
+
import '../text-field/index.js';
|
|
14
|
+
import { Dialog } from '../dialog/index.js';
|
|
15
|
+
import './elements/color-palettes.js';
|
|
16
|
+
import './elements/grayscale-palettes.js';
|
|
8
17
|
import { translate } from '@refinitiv-ui/translate';
|
|
9
|
-
import '@refinitiv-ui/phrasebook/lib/locale/en/color-dialog';
|
|
10
|
-
import '../button';
|
|
11
|
-
import '../number-field';
|
|
12
|
-
import '../text-field';
|
|
13
|
-
import { Dialog } from '../dialog';
|
|
14
|
-
import './elements/color-palettes';
|
|
15
|
-
import './elements/grayscale-palettes';
|
|
16
|
-
import { ColorHelpers } from './helpers/color-helpers';
|
|
17
|
-
import { ValueModel } from './helpers/value-model';
|
|
18
|
-
import { VERSION } from '../';
|
|
18
|
+
import '@refinitiv-ui/phrasebook/lib/locale/en/color-dialog.js';
|
|
19
19
|
/**
|
|
20
20
|
* Displays a colour picker dialog,
|
|
21
21
|
* for selecting a predefined range of colours.
|
|
@@ -23,8 +23,8 @@ import { VERSION } from '../';
|
|
|
23
23
|
* @fires value-changed - Fired when the `value` property changes.
|
|
24
24
|
* @fires opened-changed - Fired when the `opened` property changes.
|
|
25
25
|
*
|
|
26
|
-
* @attr {string|null} header - Set Header/Title of the color dialog
|
|
27
|
-
* @prop {string|null} header - Set Header/Title of the color dialog
|
|
26
|
+
* @attr {string | null} header - Set Header/Title of the color dialog
|
|
27
|
+
* @prop {string | null} [header=null] - Set Header/Title of the color dialog
|
|
28
28
|
*
|
|
29
29
|
* @attr {boolean} [opened=false] - Set dialog to open
|
|
30
30
|
* @prop {boolean} [opened=false] - Set dialog to open
|
|
@@ -32,14 +32,14 @@ import { VERSION } from '../';
|
|
|
32
32
|
* @attr {boolean} [no-cancel-on-esc-key=false] - Prevents dialog to close when user presses ESC key
|
|
33
33
|
* @prop {boolean} [noCancelOnEscKey=false] - Prevents dialog to close when user presses ESC key
|
|
34
34
|
*
|
|
35
|
-
* @attr {string} x - Set a specific x coordinate of dialog
|
|
36
|
-
* @prop {string} x - Set a specific x coordinate of dialog
|
|
35
|
+
* @attr {string | undefined} x - Set a specific x coordinate of dialog
|
|
36
|
+
* @prop {string | undefined} x - Set a specific x coordinate of dialog
|
|
37
37
|
*
|
|
38
|
-
* @attr {string} y - Set a specific y coordinate of dialog
|
|
39
|
-
* @prop {string} y - Set a specific y coordinate of dialog
|
|
38
|
+
* @attr {string | undefined} y - Set a specific y coordinate of dialog
|
|
39
|
+
* @prop {string | undefined} y - Set a specific y coordinate of dialog
|
|
40
40
|
*
|
|
41
|
-
* @attr {string} position-target - Set position of dialog i.e. `top`, `right`, `left`, `bottom`, `center` or combination of theme e.g. `top right`.
|
|
42
|
-
* @prop {string} positionTarget - Set position of dialog i.e. `top`, `right`, `left`, `bottom`, `center` or combination of theme e.g. `top right`.
|
|
41
|
+
* @attr {string | undefined} position-target - Set position of dialog i.e. `top`, `right`, `left`, `bottom`, `center` or combination of theme e.g. `top right`.
|
|
42
|
+
* @prop {string | undefined} positionTarget - Set position of dialog i.e. `top`, `right`, `left`, `bottom`, `center` or combination of theme e.g. `top right`.
|
|
43
43
|
*
|
|
44
44
|
* @prop {boolean} [noCancelOnOutsideClick=true] - Prevents dialog to close when user clicks outside the dialog.
|
|
45
45
|
*
|
|
@@ -79,13 +79,14 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
79
79
|
return VERSION;
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
* A `
|
|
82
|
+
* A `CSSResultGroup` that will be used
|
|
83
83
|
* to style the host, slotted children
|
|
84
84
|
* and the internal template of the element.
|
|
85
|
-
* @return
|
|
85
|
+
* @return CSS template
|
|
86
86
|
*/
|
|
87
87
|
static get styles() {
|
|
88
|
-
return [
|
|
88
|
+
return [
|
|
89
|
+
super.styles,
|
|
89
90
|
css `
|
|
90
91
|
:host {
|
|
91
92
|
display: block;
|
|
@@ -96,7 +97,8 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
96
97
|
var(--no-color-line-color, #ff0000) calc(50% + 1px),
|
|
97
98
|
transparent calc(50% + 2px));
|
|
98
99
|
}
|
|
99
|
-
`
|
|
100
|
+
`
|
|
101
|
+
];
|
|
100
102
|
}
|
|
101
103
|
/**
|
|
102
104
|
* Value of selected color from color dialog will be written here as hex value
|
|
@@ -111,7 +113,7 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
111
113
|
value = '';
|
|
112
114
|
}
|
|
113
115
|
this._value = value;
|
|
114
|
-
|
|
116
|
+
this.requestUpdate('value', oldValue);
|
|
115
117
|
}
|
|
116
118
|
get value() {
|
|
117
119
|
return this._value;
|
|
@@ -130,7 +132,7 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
130
132
|
}
|
|
131
133
|
get hex() {
|
|
132
134
|
const value = this.value;
|
|
133
|
-
return value ?
|
|
135
|
+
return value ? removeHashSign(value) : '';
|
|
134
136
|
}
|
|
135
137
|
/**
|
|
136
138
|
* Red value from 0 to 255
|
|
@@ -139,10 +141,10 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
139
141
|
*/
|
|
140
142
|
set red(red) {
|
|
141
143
|
red = String(red);
|
|
142
|
-
this.value = this.isValidRGB(red) ?
|
|
144
|
+
this.value = this.isValidRGB(red) ? rgb(Number(red), Number(this.green), Number(this.blue)).formatHex() : '';
|
|
143
145
|
}
|
|
144
146
|
get red() {
|
|
145
|
-
return this.hex ?
|
|
147
|
+
return this.hex ? rgb(`#${this.hex}`).r.toString() : '';
|
|
146
148
|
}
|
|
147
149
|
/**
|
|
148
150
|
* Green value from 0 to 255
|
|
@@ -151,10 +153,10 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
151
153
|
*/
|
|
152
154
|
set green(green) {
|
|
153
155
|
green = String(green);
|
|
154
|
-
this.value = this.isValidRGB(green) ?
|
|
156
|
+
this.value = this.isValidRGB(green) ? rgb(Number(this.red), Number(green), Number(this.blue)).formatHex() : '';
|
|
155
157
|
}
|
|
156
158
|
get green() {
|
|
157
|
-
return this.hex ?
|
|
159
|
+
return this.hex ? rgb(`#${this.hex}`).g.toString() : '';
|
|
158
160
|
}
|
|
159
161
|
/**
|
|
160
162
|
* Blue value from 0 to 255
|
|
@@ -163,10 +165,10 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
163
165
|
*/
|
|
164
166
|
set blue(blue) {
|
|
165
167
|
blue = String(blue);
|
|
166
|
-
this.value = this.isValidRGB(blue) ?
|
|
168
|
+
this.value = this.isValidRGB(blue) ? rgb(Number(this.red), Number(this.green), Number(blue)).formatHex() : '';
|
|
167
169
|
}
|
|
168
170
|
get blue() {
|
|
169
|
-
return this.hex ?
|
|
171
|
+
return this.hex ? rgb(`#${this.hex}`).b.toString() : '';
|
|
170
172
|
}
|
|
171
173
|
/**
|
|
172
174
|
* Check if component should be updated
|
|
@@ -225,7 +227,7 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
225
227
|
* @returns true if value is valid
|
|
226
228
|
*/
|
|
227
229
|
isValidValue(value) {
|
|
228
|
-
const isValid = value === '' ||
|
|
230
|
+
const isValid = value === '' || isHex(value);
|
|
229
231
|
if (!isValid) {
|
|
230
232
|
new WarningNotice(`The specified value "${value}" is not valid value. The correct value should look like "#fff" or "#ffffff".`).show();
|
|
231
233
|
}
|
|
@@ -237,7 +239,7 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
237
239
|
* @returns true if value is valid
|
|
238
240
|
*/
|
|
239
241
|
isValidHex(value) {
|
|
240
|
-
const isValid = value === '' || (!value.includes('#') &&
|
|
242
|
+
const isValid = value === '' || (!value.includes('#') && isHex(`#${value}`));
|
|
241
243
|
if (!isValid) {
|
|
242
244
|
new WarningNotice(`The specified hex "${value}" is not valid color. The correct value should look like "fff" or "ffffff".`).show();
|
|
243
245
|
}
|
|
@@ -249,7 +251,7 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
249
251
|
* @returns true if value is within 0 - 255
|
|
250
252
|
*/
|
|
251
253
|
isValidRGB(value) {
|
|
252
|
-
const isValid = value === '' ||
|
|
254
|
+
const isValid = value === '' || Number(value) >= 0 && Number(value) <= 255;
|
|
253
255
|
if (!isValid) {
|
|
254
256
|
new WarningNotice(`The specified RGB "${value}" is not valid color. The value should be 0 - 255.`).show();
|
|
255
257
|
}
|
|
@@ -261,8 +263,8 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
261
263
|
* @return {void}
|
|
262
264
|
*/
|
|
263
265
|
onColorChanged(event) {
|
|
264
|
-
this.valueModel.hex =
|
|
265
|
-
|
|
266
|
+
this.valueModel.hex = removeHashSign(event.target.value);
|
|
267
|
+
this.requestUpdate();
|
|
266
268
|
}
|
|
267
269
|
/**
|
|
268
270
|
* update hex value when typing on hex input
|
|
@@ -271,7 +273,7 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
271
273
|
*/
|
|
272
274
|
onHexChanged(event) {
|
|
273
275
|
this.valueModel.hex = event.target.value;
|
|
274
|
-
|
|
276
|
+
this.requestUpdate();
|
|
275
277
|
}
|
|
276
278
|
/**
|
|
277
279
|
* update r,g,b value when typing on RGB inputs
|
|
@@ -289,7 +291,7 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
289
291
|
else if (targetElem === this.blueInputEl) {
|
|
290
292
|
this.valueModel.blue = this.blueInputEl.value;
|
|
291
293
|
}
|
|
292
|
-
|
|
294
|
+
this.requestUpdate();
|
|
293
295
|
}
|
|
294
296
|
/**
|
|
295
297
|
* set opened state to false
|
|
@@ -346,7 +348,7 @@ let ColorDialog = class ColorDialog extends Dialog {
|
|
|
346
348
|
<div
|
|
347
349
|
part="preview-color"
|
|
348
350
|
style=${styleMap({
|
|
349
|
-
backgroundColor: this.valueModel.value
|
|
351
|
+
backgroundColor: this.valueModel.value || undefined
|
|
350
352
|
})}
|
|
351
353
|
?no-color=${!this.valueModel.value}></div>
|
|
352
354
|
<div>${this.t('RED')} :
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
{
|
|
9
9
|
"name": "multiple",
|
|
10
10
|
"description": "Multiple selection mode",
|
|
11
|
-
"type": "boolean"
|
|
11
|
+
"type": "boolean",
|
|
12
|
+
"default": "false"
|
|
12
13
|
},
|
|
13
14
|
{
|
|
14
15
|
"name": "opened",
|
|
@@ -31,7 +32,8 @@
|
|
|
31
32
|
{
|
|
32
33
|
"name": "free-text",
|
|
33
34
|
"description": "Allow to enter any value",
|
|
34
|
-
"type": "boolean"
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"default": "false"
|
|
35
37
|
},
|
|
36
38
|
{
|
|
37
39
|
"name": "error",
|
|
@@ -53,25 +55,26 @@
|
|
|
53
55
|
{
|
|
54
56
|
"name": "value",
|
|
55
57
|
"description": "Returns the first selected item value.\nUse `values` when multiple selection mode is enabled.",
|
|
56
|
-
"type": "string"
|
|
58
|
+
"type": "string",
|
|
59
|
+
"default": "\"\""
|
|
57
60
|
},
|
|
58
61
|
{
|
|
59
62
|
"name": "readonly",
|
|
60
63
|
"description": "Set readonly state",
|
|
61
64
|
"type": "boolean",
|
|
62
|
-
"default": "
|
|
65
|
+
"default": "false"
|
|
63
66
|
},
|
|
64
67
|
{
|
|
65
68
|
"name": "disabled",
|
|
66
69
|
"description": "Set disabled state",
|
|
67
70
|
"type": "boolean",
|
|
68
|
-
"default": "
|
|
71
|
+
"default": "false"
|
|
69
72
|
},
|
|
70
73
|
{
|
|
71
74
|
"name": "name",
|
|
72
75
|
"description": "Set name of the element",
|
|
73
76
|
"type": "string",
|
|
74
|
-
"default": "\"
|
|
77
|
+
"default": "\"\""
|
|
75
78
|
}
|
|
76
79
|
],
|
|
77
80
|
"properties": [
|
|
@@ -91,7 +94,8 @@
|
|
|
91
94
|
"name": "multiple",
|
|
92
95
|
"attribute": "multiple",
|
|
93
96
|
"description": "Multiple selection mode",
|
|
94
|
-
"type": "boolean"
|
|
97
|
+
"type": "boolean",
|
|
98
|
+
"default": "false"
|
|
95
99
|
},
|
|
96
100
|
{
|
|
97
101
|
"name": "opened",
|
|
@@ -118,7 +122,8 @@
|
|
|
118
122
|
"name": "freeText",
|
|
119
123
|
"attribute": "free-text",
|
|
120
124
|
"description": "Allow to enter any value",
|
|
121
|
-
"type": "boolean"
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"default": "false"
|
|
122
127
|
},
|
|
123
128
|
{
|
|
124
129
|
"name": "error",
|
|
@@ -143,18 +148,21 @@
|
|
|
143
148
|
{
|
|
144
149
|
"name": "data",
|
|
145
150
|
"description": "Data array to be displayed",
|
|
146
|
-
"type": "ComboBoxData<T>"
|
|
151
|
+
"type": "ComboBoxData<T>",
|
|
152
|
+
"default": "[]"
|
|
147
153
|
},
|
|
148
154
|
{
|
|
149
155
|
"name": "value",
|
|
150
156
|
"attribute": "value",
|
|
151
157
|
"description": "Returns the first selected item value.\nUse `values` when multiple selection mode is enabled.",
|
|
152
|
-
"type": "string"
|
|
158
|
+
"type": "string",
|
|
159
|
+
"default": "\"\""
|
|
153
160
|
},
|
|
154
161
|
{
|
|
155
162
|
"name": "values",
|
|
156
163
|
"description": "Returns a values collection of the currently\nselected item values",
|
|
157
|
-
"type": "string[]"
|
|
164
|
+
"type": "string[]",
|
|
165
|
+
"default": "[]"
|
|
158
166
|
},
|
|
159
167
|
{
|
|
160
168
|
"name": "query",
|
|
@@ -162,30 +170,31 @@
|
|
|
162
170
|
"type": "string | null"
|
|
163
171
|
},
|
|
164
172
|
{
|
|
165
|
-
"name": "label",
|
|
173
|
+
"name": "label (readonly)",
|
|
166
174
|
"description": "Label of selected value",
|
|
167
|
-
"type": "string"
|
|
175
|
+
"type": "string",
|
|
176
|
+
"default": "\"\""
|
|
168
177
|
},
|
|
169
178
|
{
|
|
170
179
|
"name": "readonly",
|
|
171
180
|
"attribute": "readonly",
|
|
172
181
|
"description": "Set readonly state",
|
|
173
182
|
"type": "boolean",
|
|
174
|
-
"default": "
|
|
183
|
+
"default": "false"
|
|
175
184
|
},
|
|
176
185
|
{
|
|
177
186
|
"name": "disabled",
|
|
178
187
|
"attribute": "disabled",
|
|
179
188
|
"description": "Set disabled state",
|
|
180
189
|
"type": "boolean",
|
|
181
|
-
"default": "
|
|
190
|
+
"default": "false"
|
|
182
191
|
},
|
|
183
192
|
{
|
|
184
193
|
"name": "name",
|
|
185
194
|
"attribute": "name",
|
|
186
195
|
"description": "Set name of the element",
|
|
187
196
|
"type": "string",
|
|
188
|
-
"default": "\"
|
|
197
|
+
"default": "\"\""
|
|
189
198
|
}
|
|
190
199
|
],
|
|
191
200
|
"events": [
|
|
@@ -200,6 +209,9 @@
|
|
|
200
209
|
{
|
|
201
210
|
"name": "opened-changed",
|
|
202
211
|
"description": "Dispatched when opened state changes"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "animationiteration"
|
|
203
215
|
}
|
|
204
216
|
]
|
|
205
217
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# ef-combo-box
|
|
2
|
+
|
|
3
|
+
Combines a popup with a filterable selection list
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|---------------------|-----------------------|-----------------------------|------------------------------|--------------------------------------------------|
|
|
9
|
+
| `clears` | `clears` | `boolean` | false | Show clears button |
|
|
10
|
+
| `data` | | `ComboBoxData<T>` | [] | Data array to be displayed |
|
|
11
|
+
| `disabled` | `disabled` | `boolean` | false | Set disabled state |
|
|
12
|
+
| `error` | `error` | `boolean` | false | Set state to error |
|
|
13
|
+
| `filter` | | `ComboBoxFilter<T> \| null` | "defaultFilter<T>(this)" | Custom filter for static data<br />Set this to null when data is filtered externally, eg XHR |
|
|
14
|
+
| `freeText` | `free-text` | `boolean` | false | Allow to enter any value |
|
|
15
|
+
| `label (readonly)` | | `string` | "" | Label of selected value |
|
|
16
|
+
| `multiple` | `multiple` | `boolean` | false | Multiple selection mode |
|
|
17
|
+
| `name` | `name` | `string` | "" | Set name of the element |
|
|
18
|
+
| `opened` | `opened` | `boolean` | false | Track opened state of popup |
|
|
19
|
+
| `placeholder` | `placeholder` | `string` | "" | Placeholder for input field |
|
|
20
|
+
| `query` | | `string \| null` | null | Query string applied to combo-box<br />Set via internal text-field input |
|
|
21
|
+
| `queryDebounceRate` | `query-debounce-rate` | `number` | | Control query rate, defaults to 0 |
|
|
22
|
+
| `readonly` | `readonly` | `boolean` | false | Set readonly state |
|
|
23
|
+
| `renderer` | | `ComboBoxRenderer` | "new ComboBoxRenderer(this)" | Renderer used to render list item elements |
|
|
24
|
+
| `value` | `value` | `string` | "" | Returns the first selected item value.<br />Use `values` when multiple selection mode is enabled. |
|
|
25
|
+
| `values` | | `string[]` | [] | Returns a values collection of the currently<br />selected item values |
|
|
26
|
+
| `warning` | `warning` | `boolean` | false | Set state to warning |
|
|
27
|
+
|
|
28
|
+
## Events
|
|
29
|
+
|
|
30
|
+
| Event | Description |
|
|
31
|
+
|----------------------|--------------------------------------|
|
|
32
|
+
| `animationiteration` | |
|
|
33
|
+
| `opened-changed` | Dispatched when opened state changes |
|
|
34
|
+
| `query-changed` | Dispatched when query changes |
|
|
35
|
+
| `value-changed` | Dispatched when value changes |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DataItem } from '@refinitiv-ui/utils';
|
|
2
|
-
import { ComboBox } from '../index';
|
|
3
|
-
import { ComboBoxFilter } from './types';
|
|
4
|
-
import { ItemData } from '../../item';
|
|
1
|
+
import type { DataItem } from '@refinitiv-ui/utils/lib/collection';
|
|
2
|
+
import type { ComboBox } from '../index';
|
|
3
|
+
import type { ComboBoxFilter } from './types';
|
|
4
|
+
import type { ItemData } from '../../item';
|
|
5
5
|
/**
|
|
6
6
|
* Default filter used by combo box
|
|
7
7
|
* @param el ComboBox instance to filter
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DataItem } from '@refinitiv-ui/utils';
|
|
2
|
-
import { ItemData } from '../../item';
|
|
1
|
+
import type { DataItem } from '@refinitiv-ui/utils/lib/collection';
|
|
2
|
+
import type { ItemData } from '../../item';
|
|
3
3
|
/**
|
|
4
4
|
* Predicate callback
|
|
5
5
|
* Matches item against filter function
|
package/lib/combo-box/index.d.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { ControlElement,
|
|
2
|
+
import { ControlElement, CSSResultGroup, PropertyValues, TapEvent, TemplateResult, StyleMap } from '@refinitiv-ui/core';
|
|
3
|
+
import { CollectionComposer, DataItem } from '@refinitiv-ui/utils/lib/collection.js';
|
|
4
|
+
import { AnimationTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
|
|
5
|
+
import type { ValueChangedEvent } from '../events';
|
|
6
|
+
import type { ItemData } from '../item';
|
|
7
|
+
import type { TextField } from '../text-field';
|
|
8
|
+
import type { ComboBoxData, ComboBoxFilter } from './helpers/types';
|
|
9
|
+
import { List, ListRenderer as ComboBoxRenderer } from '../list/index.js';
|
|
10
|
+
import { CustomKeyboardEvent } from './helpers/keyboard-event.js';
|
|
11
|
+
import '../icon/index.js';
|
|
12
|
+
import '../overlay/index.js';
|
|
13
|
+
import '../list/index.js';
|
|
14
|
+
import '../counter/index.js';
|
|
15
|
+
import '../text-field/index.js';
|
|
3
16
|
import { TranslateDirective } from '@refinitiv-ui/translate';
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import '../icon';
|
|
8
|
-
import '../overlay';
|
|
9
|
-
import '../list';
|
|
10
|
-
import '../counter';
|
|
11
|
-
import '../text-field';
|
|
12
|
-
import '../tooltip';
|
|
13
|
-
import { List, ListRenderer as ComboBoxRenderer } from '../list';
|
|
14
|
-
import { ItemData } from '../item';
|
|
15
|
-
import { TextField } from '../text-field';
|
|
16
|
-
import { ComboBoxData, ComboBoxFilter } from './helpers/types';
|
|
17
|
-
import { CustomKeyboardEvent } from './helpers/keyboard-event';
|
|
18
|
-
export { ComboBoxRenderer, ComboBoxFilter, ComboBoxData };
|
|
17
|
+
import '@refinitiv-ui/phrasebook/lib/locale/en/combo-box.js';
|
|
18
|
+
export type { ComboBoxFilter, ComboBoxData };
|
|
19
|
+
export { ComboBoxRenderer };
|
|
19
20
|
/**
|
|
20
21
|
* Combines a popup with a filterable selection list
|
|
21
22
|
*
|
|
@@ -39,12 +40,12 @@ export declare class ComboBox<T extends DataItem = ItemData> extends ControlElem
|
|
|
39
40
|
*/
|
|
40
41
|
static get version(): string;
|
|
41
42
|
/**
|
|
42
|
-
* A `
|
|
43
|
+
* A `CSSResultGroup` that will be used
|
|
43
44
|
* to style the host, slotted children
|
|
44
45
|
* and the internal template of the element.
|
|
45
46
|
* @return CSS template
|
|
46
47
|
*/
|
|
47
|
-
static get styles():
|
|
48
|
+
static get styles(): CSSResultGroup;
|
|
48
49
|
/**
|
|
49
50
|
* Custom filter for static data
|
|
50
51
|
* Set this to null when data is filtered externally, eg XHR
|
|
@@ -60,6 +61,7 @@ export declare class ComboBox<T extends DataItem = ItemData> extends ControlElem
|
|
|
60
61
|
/**
|
|
61
62
|
* Multiple selection mode
|
|
62
63
|
* @param multiple true to set multiple mode
|
|
64
|
+
* @default false
|
|
63
65
|
*/
|
|
64
66
|
set multiple(multiple: boolean);
|
|
65
67
|
get multiple(): boolean;
|
|
@@ -79,6 +81,7 @@ export declare class ComboBox<T extends DataItem = ItemData> extends ControlElem
|
|
|
79
81
|
/**
|
|
80
82
|
* Allow to enter any value
|
|
81
83
|
* @param freeText true to set freeText mode
|
|
84
|
+
* @default false
|
|
82
85
|
*/
|
|
83
86
|
set freeText(freeText: boolean);
|
|
84
87
|
get freeText(): boolean;
|
|
@@ -101,6 +104,7 @@ export declare class ComboBox<T extends DataItem = ItemData> extends ControlElem
|
|
|
101
104
|
/**
|
|
102
105
|
* Data array to be displayed
|
|
103
106
|
* @type {ComboBoxData<T>}
|
|
107
|
+
* @default []
|
|
104
108
|
*/
|
|
105
109
|
get data(): ComboBoxData<T>;
|
|
106
110
|
set data(value: ComboBoxData<T>);
|
|
@@ -112,6 +116,7 @@ export declare class ComboBox<T extends DataItem = ItemData> extends ControlElem
|
|
|
112
116
|
/**
|
|
113
117
|
* Returns the first selected item value.
|
|
114
118
|
* Use `values` when multiple selection mode is enabled.
|
|
119
|
+
* @default -
|
|
115
120
|
*/
|
|
116
121
|
get value(): string;
|
|
117
122
|
set value(value: string);
|
|
@@ -119,6 +124,7 @@ export declare class ComboBox<T extends DataItem = ItemData> extends ControlElem
|
|
|
119
124
|
* Returns a values collection of the currently
|
|
120
125
|
* selected item values
|
|
121
126
|
* @type {string[]}
|
|
127
|
+
* @default []
|
|
122
128
|
*/
|
|
123
129
|
get values(): string[];
|
|
124
130
|
set values(values: string[]);
|
|
@@ -133,12 +139,14 @@ export declare class ComboBox<T extends DataItem = ItemData> extends ControlElem
|
|
|
133
139
|
* Query string applied to combo-box
|
|
134
140
|
* Set via internal text-field input
|
|
135
141
|
* @readonly
|
|
142
|
+
* @default null
|
|
136
143
|
*/
|
|
137
144
|
get query(): string | null;
|
|
138
145
|
set query(query: string | null);
|
|
139
146
|
/**
|
|
140
147
|
* Label of selected value
|
|
141
148
|
* @returns Label to use, defaults to empty string
|
|
149
|
+
* @default -
|
|
142
150
|
* @readonly
|
|
143
151
|
*/
|
|
144
152
|
get label(): string;
|