@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,140 +1,68 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
3
|
-
import '../icon';
|
|
2
|
+
import { PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
import '../icon/index.js';
|
|
4
|
+
import { TextField } from '../text-field/index.js';
|
|
5
|
+
import { TemplateMap } from '@refinitiv-ui/core/lib/directives/template-map.js';
|
|
4
6
|
/**
|
|
5
|
-
* A form control element for email
|
|
7
|
+
* A form control element for email.
|
|
6
8
|
*
|
|
7
9
|
* @fires value-changed - Dispatched when value changes
|
|
8
10
|
* @fires error-changed - Dispatched when error state changes
|
|
11
|
+
* @fires icon-click - Dispatched when icon is clicked
|
|
9
12
|
*
|
|
10
|
-
* @attr {
|
|
11
|
-
* @prop {
|
|
13
|
+
* @attr {boolean} disabled - Set disabled state
|
|
14
|
+
* @prop {boolean} [disabled=false] - Set disabled state
|
|
15
|
+
*
|
|
16
|
+
* @attr {boolean} error - Set error state
|
|
17
|
+
* @prop {boolean} [error=false] - Set error state
|
|
18
|
+
*
|
|
19
|
+
* @attr {string} icon - Specify icon to display in input. Value can be icon name
|
|
20
|
+
* @prop {string | null} [icon=null] - Specify icon to display in input. Value can be icon name
|
|
21
|
+
*
|
|
22
|
+
* @attr {boolean} icon-has-action - Specify when icon need to be clickable
|
|
23
|
+
* @prop {boolean} [iconHasAction=false] - Specify when icon need to be clickable
|
|
24
|
+
*
|
|
25
|
+
* @attr {number} maxlength - Set character max limit
|
|
26
|
+
* @prop {number | null} [maxLength=null] - Set character max limit
|
|
27
|
+
*
|
|
28
|
+
* @attr {number} minlength - Set character min limit
|
|
29
|
+
* @prop {number | null} [minLength=null] - Set character min limit
|
|
30
|
+
*
|
|
31
|
+
* @prop {string} [pattern=""] - Set regular expression for input validation
|
|
32
|
+
*
|
|
33
|
+
* @attr {string} placeholder - Set placeholder text
|
|
34
|
+
* @prop {string} [placeholder=""] - Set placeholder text
|
|
12
35
|
*
|
|
13
36
|
* @attr {boolean} readonly - Set readonly state
|
|
14
37
|
* @prop {boolean} [readonly=false] - Set readonly state
|
|
15
38
|
*
|
|
16
|
-
* @attr {boolean}
|
|
17
|
-
* @prop {boolean} [
|
|
39
|
+
* @attr {boolean} transparent - Disables all other states and border/background styles.
|
|
40
|
+
* @prop {boolean} [transparent=false] - Disables all other states and border/background styles.
|
|
41
|
+
*
|
|
42
|
+
* @attr {boolean} warning - Set warning state
|
|
43
|
+
* @prop {boolean} [warning=false] - Set warning state
|
|
44
|
+
*
|
|
45
|
+
* @attr {string} value - Input's value
|
|
46
|
+
* @prop {string} [value=""] - Input's value
|
|
18
47
|
*/
|
|
19
|
-
export declare class EmailField extends
|
|
20
|
-
/**
|
|
21
|
-
* Element version number
|
|
22
|
-
* @returns version number
|
|
23
|
-
*/
|
|
24
|
-
static get version(): string;
|
|
25
|
-
/**
|
|
26
|
-
* A `CSSResult` that will be used
|
|
27
|
-
* to style the host, slotted children
|
|
28
|
-
* and the internal template of the element.
|
|
29
|
-
* @return {CSSResult | CSSResult[]} CSS template
|
|
30
|
-
*/
|
|
31
|
-
static get styles(): CSSResult | CSSResult[];
|
|
32
|
-
/**
|
|
33
|
-
* Set regular expression for input validation
|
|
34
|
-
*/
|
|
35
|
-
pattern: string;
|
|
36
|
-
/**
|
|
37
|
-
* Set placeholder text
|
|
38
|
-
*/
|
|
39
|
-
placeholder: string;
|
|
40
|
-
/**
|
|
41
|
-
* Set state to error
|
|
42
|
-
*/
|
|
43
|
-
error: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Set state to warning
|
|
46
|
-
*/
|
|
47
|
-
warning: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Disables all other states and border/background styles.
|
|
50
|
-
* Use with advanced composite elements requiring e.g. multi selection in
|
|
51
|
-
* combo-box when parent container handles element states.
|
|
52
|
-
*/
|
|
53
|
-
transparent: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Set character max limit
|
|
56
|
-
*/
|
|
57
|
-
maxLength: number | null;
|
|
58
|
-
/**
|
|
59
|
-
* Set character min limit
|
|
60
|
-
*/
|
|
61
|
-
minLength: number | null;
|
|
48
|
+
export declare class EmailField extends TextField {
|
|
62
49
|
/**
|
|
63
50
|
* Set to multiple mode, allows multiple emails in a single input
|
|
64
51
|
*/
|
|
65
52
|
multiple: boolean;
|
|
66
53
|
/**
|
|
67
|
-
*
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
* Specify when icon need to be clickable
|
|
72
|
-
*/
|
|
73
|
-
iconHasAction: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Get native input element from shadow roots
|
|
54
|
+
* Decorate `<input>` element with common properties extended from text-field:
|
|
55
|
+
* type="email" - always `email`
|
|
56
|
+
* multiple - defined if supports multiple emails
|
|
57
|
+
* @returns template map
|
|
76
58
|
*/
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Select the contents of input
|
|
80
|
-
* @returns {void}
|
|
81
|
-
*/
|
|
82
|
-
select(): void;
|
|
83
|
-
/**
|
|
84
|
-
* Called when the element’s DOM has been updated and rendered
|
|
85
|
-
* @param changedProperties Properties that has changed
|
|
86
|
-
* @returns {void}
|
|
87
|
-
*/
|
|
88
|
-
protected updated(changedProperties: PropertyValues): void;
|
|
59
|
+
protected get decorateInputMap(): TemplateMap;
|
|
89
60
|
/**
|
|
90
61
|
* Check if input should be re-validated
|
|
91
62
|
* @param changedProperties Properties that has changed
|
|
92
63
|
* @returns True if input should be re-validated
|
|
93
64
|
*/
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Check if value is changed and fire event
|
|
97
|
-
* @returns {void}
|
|
98
|
-
*/
|
|
99
|
-
private onPossibleValueChange;
|
|
100
|
-
/**
|
|
101
|
-
* Validate input according `pattern`, `minLength` and `maxLength` properties
|
|
102
|
-
* change state of `error` property according pattern validation
|
|
103
|
-
* @returns {void}
|
|
104
|
-
*/
|
|
105
|
-
private validateInput;
|
|
106
|
-
/**
|
|
107
|
-
* @param error existing state of error
|
|
108
|
-
* @returns true if there is no error and browser is IE11 and minLength more than 0 and value exists
|
|
109
|
-
*/
|
|
110
|
-
private shouldValidateForMinLength;
|
|
111
|
-
/**
|
|
112
|
-
* Detect `enter` and `space` keydown and fire
|
|
113
|
-
* @param event keydown event
|
|
114
|
-
* @returns {void}
|
|
115
|
-
*/
|
|
116
|
-
private handleKeyDown;
|
|
117
|
-
/**
|
|
118
|
-
* Process internal icon click and fire `icon-click` event
|
|
119
|
-
* @returns {void}
|
|
120
|
-
*/
|
|
121
|
-
private iconClick;
|
|
122
|
-
/**
|
|
123
|
-
* Fire event on `icon` click
|
|
124
|
-
* @returns {void}
|
|
125
|
-
*/
|
|
126
|
-
private notifyIcon;
|
|
127
|
-
/**
|
|
128
|
-
* Renders icon element if property present
|
|
129
|
-
* @returns {TemplateResult | null} Template result
|
|
130
|
-
*/
|
|
131
|
-
private renderIcon;
|
|
132
|
-
/**
|
|
133
|
-
* A `TemplateResult` that will be used
|
|
134
|
-
* to render the updated internal template.
|
|
135
|
-
* @return {TemplateResult} Render template
|
|
136
|
-
*/
|
|
137
|
-
protected render(): TemplateResult;
|
|
65
|
+
protected shouldValidateInput(changedProperties: PropertyValues): boolean;
|
|
138
66
|
}
|
|
139
67
|
|
|
140
68
|
declare global {
|
|
@@ -144,7 +72,7 @@ declare global {
|
|
|
144
72
|
|
|
145
73
|
namespace JSX {
|
|
146
74
|
interface IntrinsicElements {
|
|
147
|
-
'ef-email-field': Partial<EmailField> | JSXInterface.
|
|
75
|
+
'ef-email-field': Partial<EmailField> | JSXInterface.HTMLAttributes<EmailField>;
|
|
148
76
|
}
|
|
149
77
|
}
|
|
150
78
|
}
|
package/lib/email-field/index.js
CHANGED
|
@@ -1,284 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import { ControlElement, css, customElement, html, ifDefined, property, query } from '@refinitiv-ui/core';
|
|
8
|
-
import { VERSION } from '../';
|
|
9
|
-
import '../icon';
|
|
10
|
-
const hasChanged = (newVal, oldVal) => oldVal === undefined ? false : newVal !== oldVal;
|
|
11
|
-
const isIE = (/Trident/g).test(navigator.userAgent);
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
3
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
4
|
+
import '../icon/index.js';
|
|
5
|
+
import { TextField } from '../text-field/index.js';
|
|
12
6
|
/**
|
|
13
|
-
* A form control element for email
|
|
7
|
+
* A form control element for email.
|
|
14
8
|
*
|
|
15
9
|
* @fires value-changed - Dispatched when value changes
|
|
16
10
|
* @fires error-changed - Dispatched when error state changes
|
|
11
|
+
* @fires icon-click - Dispatched when icon is clicked
|
|
17
12
|
*
|
|
18
|
-
* @attr {
|
|
19
|
-
* @prop {
|
|
13
|
+
* @attr {boolean} disabled - Set disabled state
|
|
14
|
+
* @prop {boolean} [disabled=false] - Set disabled state
|
|
15
|
+
*
|
|
16
|
+
* @attr {boolean} error - Set error state
|
|
17
|
+
* @prop {boolean} [error=false] - Set error state
|
|
18
|
+
*
|
|
19
|
+
* @attr {string} icon - Specify icon to display in input. Value can be icon name
|
|
20
|
+
* @prop {string | null} [icon=null] - Specify icon to display in input. Value can be icon name
|
|
21
|
+
*
|
|
22
|
+
* @attr {boolean} icon-has-action - Specify when icon need to be clickable
|
|
23
|
+
* @prop {boolean} [iconHasAction=false] - Specify when icon need to be clickable
|
|
24
|
+
*
|
|
25
|
+
* @attr {number} maxlength - Set character max limit
|
|
26
|
+
* @prop {number | null} [maxLength=null] - Set character max limit
|
|
27
|
+
*
|
|
28
|
+
* @attr {number} minlength - Set character min limit
|
|
29
|
+
* @prop {number | null} [minLength=null] - Set character min limit
|
|
30
|
+
*
|
|
31
|
+
* @prop {string} [pattern=""] - Set regular expression for input validation
|
|
32
|
+
*
|
|
33
|
+
* @attr {string} placeholder - Set placeholder text
|
|
34
|
+
* @prop {string} [placeholder=""] - Set placeholder text
|
|
20
35
|
*
|
|
21
36
|
* @attr {boolean} readonly - Set readonly state
|
|
22
37
|
* @prop {boolean} [readonly=false] - Set readonly state
|
|
23
38
|
*
|
|
24
|
-
* @attr {boolean}
|
|
25
|
-
* @prop {boolean} [
|
|
39
|
+
* @attr {boolean} transparent - Disables all other states and border/background styles.
|
|
40
|
+
* @prop {boolean} [transparent=false] - Disables all other states and border/background styles.
|
|
41
|
+
*
|
|
42
|
+
* @attr {boolean} warning - Set warning state
|
|
43
|
+
* @prop {boolean} [warning=false] - Set warning state
|
|
44
|
+
*
|
|
45
|
+
* @attr {string} value - Input's value
|
|
46
|
+
* @prop {string} [value=""] - Input's value
|
|
26
47
|
*/
|
|
27
|
-
let EmailField = class EmailField extends
|
|
48
|
+
let EmailField = class EmailField extends TextField {
|
|
28
49
|
constructor() {
|
|
29
50
|
super(...arguments);
|
|
30
|
-
/**
|
|
31
|
-
* Set regular expression for input validation
|
|
32
|
-
*/
|
|
33
|
-
this.pattern = '';
|
|
34
|
-
/**
|
|
35
|
-
* Set placeholder text
|
|
36
|
-
*/
|
|
37
|
-
this.placeholder = '';
|
|
38
|
-
/**
|
|
39
|
-
* Set state to error
|
|
40
|
-
*/
|
|
41
|
-
this.error = false;
|
|
42
|
-
/**
|
|
43
|
-
* Set state to warning
|
|
44
|
-
*/
|
|
45
|
-
this.warning = false;
|
|
46
|
-
/**
|
|
47
|
-
* Disables all other states and border/background styles.
|
|
48
|
-
* Use with advanced composite elements requiring e.g. multi selection in
|
|
49
|
-
* combo-box when parent container handles element states.
|
|
50
|
-
*/
|
|
51
|
-
this.transparent = false;
|
|
52
|
-
/**
|
|
53
|
-
* Set character max limit
|
|
54
|
-
*/
|
|
55
|
-
this.maxLength = null;
|
|
56
|
-
/**
|
|
57
|
-
* Set character min limit
|
|
58
|
-
*/
|
|
59
|
-
this.minLength = null;
|
|
60
51
|
/**
|
|
61
52
|
* Set to multiple mode, allows multiple emails in a single input
|
|
62
53
|
*/
|
|
63
54
|
this.multiple = false;
|
|
64
|
-
/**
|
|
65
|
-
* Specify icon to display in input. Value can be icon name
|
|
66
|
-
*/
|
|
67
|
-
this.icon = '';
|
|
68
|
-
/**
|
|
69
|
-
* Specify when icon need to be clickable
|
|
70
|
-
*/
|
|
71
|
-
this.iconHasAction = false;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Element version number
|
|
75
|
-
* @returns version number
|
|
76
|
-
*/
|
|
77
|
-
static get version() {
|
|
78
|
-
return VERSION;
|
|
79
55
|
}
|
|
80
56
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* @
|
|
57
|
+
* Decorate `<input>` element with common properties extended from text-field:
|
|
58
|
+
* type="email" - always `email`
|
|
59
|
+
* multiple - defined if supports multiple emails
|
|
60
|
+
* @returns template map
|
|
85
61
|
*/
|
|
86
|
-
|
|
87
|
-
return
|
|
88
|
-
:host {
|
|
89
|
-
display: inline-block;
|
|
90
|
-
}
|
|
91
|
-
:host(:focus), :host input:focus {
|
|
92
|
-
outline: none;
|
|
93
|
-
}
|
|
94
|
-
[part=input] {
|
|
95
|
-
font: inherit;
|
|
96
|
-
background: none;
|
|
97
|
-
color: currentColor;
|
|
98
|
-
border: none;
|
|
99
|
-
text-align: inherit;
|
|
100
|
-
}
|
|
101
|
-
:host [part=icon]{
|
|
102
|
-
display: flex;
|
|
103
|
-
outline: none;
|
|
104
|
-
}
|
|
105
|
-
:host([transparent]) {
|
|
106
|
-
background: none !important;
|
|
107
|
-
border: none !important;
|
|
108
|
-
}
|
|
109
|
-
:host([icon][icon-has-action]) [part=icon] {
|
|
110
|
-
cursor: pointer;
|
|
111
|
-
}
|
|
112
|
-
`;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Select the contents of input
|
|
116
|
-
* @returns {void}
|
|
117
|
-
*/
|
|
118
|
-
/* istanbul ignore next */
|
|
119
|
-
select() {
|
|
120
|
-
if (!this.disabled && !this.readonly) {
|
|
121
|
-
this.inputElement.select();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Called when the element’s DOM has been updated and rendered
|
|
126
|
-
* @param changedProperties Properties that has changed
|
|
127
|
-
* @returns {void}
|
|
128
|
-
*/
|
|
129
|
-
updated(changedProperties) {
|
|
130
|
-
super.updated(changedProperties);
|
|
131
|
-
if (this.inputElement.value !== this.value) {
|
|
132
|
-
this.inputElement.value = this.value;
|
|
133
|
-
}
|
|
134
|
-
if (this.shouldValidateInput(changedProperties)) {
|
|
135
|
-
this.validateInput();
|
|
136
|
-
}
|
|
62
|
+
get decorateInputMap() {
|
|
63
|
+
return Object.assign(Object.assign({}, super.decorateInputMap), { 'type': 'email', 'inputmode': 'email', 'multiple': this.multiple });
|
|
137
64
|
}
|
|
138
65
|
/**
|
|
139
66
|
* Check if input should be re-validated
|
|
140
67
|
* @param changedProperties Properties that has changed
|
|
141
68
|
* @returns True if input should be re-validated
|
|
142
69
|
*/
|
|
70
|
+
/* istanbul ignore next */
|
|
143
71
|
shouldValidateInput(changedProperties) {
|
|
72
|
+
// TODO: This validation should be refactored
|
|
144
73
|
return changedProperties.has('value')
|
|
145
|
-
|| changedProperties.has('
|
|
146
|
-
||
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Check if value is changed and fire event
|
|
150
|
-
* @returns {void}
|
|
151
|
-
*/
|
|
152
|
-
onPossibleValueChange() {
|
|
153
|
-
const value = this.inputElement.value;
|
|
154
|
-
this.setValueAndNotify(value);
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Validate input according `pattern`, `minLength` and `maxLength` properties
|
|
158
|
-
* change state of `error` property according pattern validation
|
|
159
|
-
* @returns {void}
|
|
160
|
-
*/
|
|
161
|
-
validateInput() {
|
|
162
|
-
let error = !this.inputElement.checkValidity();
|
|
163
|
-
if (this.shouldValidateForMinLength(error)) {
|
|
164
|
-
error = !!this.minLength && (this.minLength > this.value.length);
|
|
165
|
-
}
|
|
166
|
-
if (this.error !== error) {
|
|
167
|
-
this.error = error;
|
|
168
|
-
this.notifyPropertyChange('error', this.error);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* @param error existing state of error
|
|
173
|
-
* @returns true if there is no error and browser is IE11 and minLength more than 0 and value exists
|
|
174
|
-
*/
|
|
175
|
-
shouldValidateForMinLength(error) {
|
|
176
|
-
return !!(!error && isIE && this.minLength && !!this.value);
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Detect `enter` and `space` keydown and fire
|
|
180
|
-
* @param event keydown event
|
|
181
|
-
* @returns {void}
|
|
182
|
-
*/
|
|
183
|
-
handleKeyDown(event) {
|
|
184
|
-
if (event.key === 'Spacebar' || event.key === ' ' || event.key === 'Enter') {
|
|
185
|
-
this.notifyIcon();
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Process internal icon click and fire `icon-click` event
|
|
190
|
-
* @returns {void}
|
|
191
|
-
*/
|
|
192
|
-
iconClick() {
|
|
193
|
-
this.notifyIcon();
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Fire event on `icon` click
|
|
197
|
-
* @returns {void}
|
|
198
|
-
*/
|
|
199
|
-
notifyIcon() {
|
|
200
|
-
if (this.iconHasAction) {
|
|
201
|
-
/**
|
|
202
|
-
* Dispatched only when element has icon-has-action attribute and icon is clicked
|
|
203
|
-
*/
|
|
204
|
-
this.dispatchEvent(new CustomEvent('icon-click', { bubbles: false }));
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Renders icon element if property present
|
|
209
|
-
* @returns {TemplateResult | null} Template result
|
|
210
|
-
*/
|
|
211
|
-
renderIcon() {
|
|
212
|
-
return this.icon ? html `
|
|
213
|
-
<ef-icon
|
|
214
|
-
part="icon"
|
|
215
|
-
icon="${this.icon}"
|
|
216
|
-
?readonly="${this.readonly}"
|
|
217
|
-
?disabled="${this.disabled}"
|
|
218
|
-
@tap="${this.iconClick}"
|
|
219
|
-
@keydown="${this.handleKeyDown}"
|
|
220
|
-
tabindex="${ifDefined(this.iconHasAction ? '0' : undefined)}"
|
|
221
|
-
></ef-icon>
|
|
222
|
-
` : null;
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* A `TemplateResult` that will be used
|
|
226
|
-
* to render the updated internal template.
|
|
227
|
-
* @return {TemplateResult} Render template
|
|
228
|
-
*/
|
|
229
|
-
render() {
|
|
230
|
-
return html `
|
|
231
|
-
<input
|
|
232
|
-
type="email"
|
|
233
|
-
part="input"
|
|
234
|
-
?readonly="${this.readonly}"
|
|
235
|
-
?disabled="${this.disabled}"
|
|
236
|
-
placeholder="${ifDefined(this.placeholder || undefined)}"
|
|
237
|
-
maxlength="${ifDefined(this.maxLength || undefined)}"
|
|
238
|
-
minlength="${ifDefined(this.minLength || undefined)}"
|
|
239
|
-
@input="${this.onPossibleValueChange}"
|
|
240
|
-
@change="${this.onPossibleValueChange}"
|
|
241
|
-
pattern="${ifDefined(this.pattern || undefined)}"
|
|
242
|
-
?multiple="${this.multiple}"
|
|
243
|
-
autocomplete="off"
|
|
244
|
-
/>
|
|
245
|
-
${this.renderIcon()}
|
|
246
|
-
`;
|
|
74
|
+
|| changedProperties.has('multiple')
|
|
75
|
+
|| super.shouldValidateInput(changedProperties);
|
|
247
76
|
}
|
|
248
77
|
};
|
|
249
|
-
__decorate([
|
|
250
|
-
property({ type: String, hasChanged })
|
|
251
|
-
], EmailField.prototype, "pattern", void 0);
|
|
252
|
-
__decorate([
|
|
253
|
-
property({ type: String })
|
|
254
|
-
], EmailField.prototype, "placeholder", void 0);
|
|
255
|
-
__decorate([
|
|
256
|
-
property({ type: Boolean, reflect: true })
|
|
257
|
-
], EmailField.prototype, "error", void 0);
|
|
258
|
-
__decorate([
|
|
259
|
-
property({ type: Boolean, reflect: true })
|
|
260
|
-
], EmailField.prototype, "warning", void 0);
|
|
261
|
-
__decorate([
|
|
262
|
-
property({ type: Boolean, reflect: true })
|
|
263
|
-
], EmailField.prototype, "transparent", void 0);
|
|
264
|
-
__decorate([
|
|
265
|
-
property({ type: Number, attribute: 'maxlength', reflect: true })
|
|
266
|
-
], EmailField.prototype, "maxLength", void 0);
|
|
267
|
-
__decorate([
|
|
268
|
-
property({ type: Number, attribute: 'minlength', reflect: true })
|
|
269
|
-
], EmailField.prototype, "minLength", void 0);
|
|
270
78
|
__decorate([
|
|
271
79
|
property({ type: Boolean, reflect: true })
|
|
272
80
|
], EmailField.prototype, "multiple", void 0);
|
|
273
|
-
__decorate([
|
|
274
|
-
property({ type: String, reflect: true })
|
|
275
|
-
], EmailField.prototype, "icon", void 0);
|
|
276
|
-
__decorate([
|
|
277
|
-
property({ type: Boolean, reflect: true, attribute: 'icon-has-action' })
|
|
278
|
-
], EmailField.prototype, "iconHasAction", void 0);
|
|
279
|
-
__decorate([
|
|
280
|
-
query('[part="input"]', true)
|
|
281
|
-
], EmailField.prototype, "inputElement", void 0);
|
|
282
81
|
EmailField = __decorate([
|
|
283
82
|
customElement('ef-email-field', {
|
|
284
83
|
alias: 'coral-email-field'
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/lib/icon/themes/solar/charcoal';
|
|
2
2
|
|
|
3
|
-
elf.customStyles.define('ef-email-field', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13rem;font-weight:400;height:23px;width:140px;max-width:100%;padding:0 5px;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#c2c2c2;border-radius:0;text-overflow:ellipsis;background-color:#000;border:1px solid #4a4a52}:host([type=number]){padding-right:0}:host([error]),:host([error][warning]){border:1px solid #f5475b}:host([error][disabled]),:host([error][warning][disabled]){color:rgba(194,194,194,.6);border:1px solid rgba(245,71,91,.6)}:host ::-ms-clear{display:none}:host [part=input]{color:inherit;padding:0;margin:0;flex:1 1 auto;min-width:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;touch-action:manipulation}:host [part=input]::-webkit-clear-button,:host [part=input]::-webkit-inner-spin-button,:host [part=input]::-webkit-search-cancel-button,:host [part=input]::-webkit-search-decoration{-webkit-appearance:none}:host [part=input]:invalid{box-shadow:none}:host [part=icon]{color:#e2e2e2;min-width:1em}:host([disabled]) [part=input]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host([disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6)}:host([readonly]){border:1px solid rgba(74,74,82,.6)}:host(:not([focused]):not(:focus):hover){border:1px solid #77777d}:host([warning]){background-color:#000;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(194,194,194,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#000;border:1px solid #f5475b}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(245,71,91,.6);color:rgba(194,194,194,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(245,71,91,.6)}:host([error]:not([focused]):not(:focus):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):hover){border:1px solid #f87584}:host([highlight]){background-color:#1b252f;border:1px solid #4a4a52}:host([highlight][disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6);background-color:rgba(27,37,47,.6)}:host([highlight][readonly]){border:1px solid rgba(74,74,82,.6)}:host([highlight]:not([focused]):not(:focus):hover){border:1px solid #77777d}:host([indirect]){color:#0fd;background-color:#000;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,255,221,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):hover){border:1px solid #a7a45a}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#f93;border-style:dotted}:host([disabled]) [part=input]::-webkit-input-placeholder{color:rgba(102,101,112,.6)}:host([disabled]) [part=input]::-moz-placeholder{color:rgba(102,101,112,.6)}:host([disabled]) [part=input]:-ms-input-placeholder{color:rgba(102,101,112,.6)}');
|
|
3
|
+
elf.customStyles.define('ef-email-field', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13rem;font-weight:400;height:23px;width:140px;max-width:100%;padding:0 5px;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#c2c2c2;border-radius:0;text-overflow:ellipsis;background-color:#000;border:1px solid #4a4a52}:host([type=number]){padding-right:0}:host([error]),:host([error][warning]){border:1px solid #f5475b}:host([error][disabled]),:host([error][warning][disabled]){color:rgba(194,194,194,.6);border:1px solid rgba(245,71,91,.6)}:host ::-ms-clear{display:none}:host [part=input]{color:inherit;padding:0;margin:0;flex:1 1 auto;min-width:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;touch-action:manipulation}:host [part=input]::-webkit-clear-button,:host [part=input]::-webkit-inner-spin-button,:host [part=input]::-webkit-search-cancel-button,:host [part=input]::-webkit-search-decoration{-webkit-appearance:none}:host [part=input]:invalid{box-shadow:none}:host [part=icon]{color:#e2e2e2;min-width:1em}:host([disabled]) [part=input]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host([disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6)}:host([readonly]){border:1px solid rgba(74,74,82,.6)}:host(:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #77777d}:host([warning]){background-color:#000;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(194,194,194,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#000;border:1px solid #f5475b}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(245,71,91,.6);color:rgba(194,194,194,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(245,71,91,.6)}:host([error]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #f87584}:host([highlight]){background-color:#1b252f;border:1px solid #4a4a52}:host([highlight][disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6);background-color:rgba(27,37,47,.6)}:host([highlight][readonly]){border:1px solid rgba(74,74,82,.6)}:host([highlight]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #77777d}:host([indirect]){color:#0fd;background-color:#000;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,255,221,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #a7a45a}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#f93;border-style:dotted}:host([disabled]) [part=input]::-webkit-input-placeholder{color:rgba(102,101,112,.6)}:host([disabled]) [part=input]::-moz-placeholder{color:rgba(102,101,112,.6)}:host([disabled]) [part=input]:-ms-input-placeholder{color:rgba(102,101,112,.6)}');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/lib/icon/themes/solar/pearl';
|
|
2
2
|
|
|
3
|
-
elf.customStyles.define('ef-email-field', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13rem;font-weight:400;height:23px;width:140px;max-width:100%;padding:0 5px;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#484848;border-radius:0;text-overflow:ellipsis;background-color:#fff;border:1px solid #a9afba}:host([type=number]){padding-right:0}:host([error]),:host([error][warning]){border:1px solid #d94255}:host([error][disabled]),:host([error][warning][disabled]){color:rgba(72,72,72,.6);border:1px solid rgba(217,66,85,.6)}:host ::-ms-clear{display:none}:host [part=input]{color:inherit;padding:0;margin:0;flex:1 1 auto;min-width:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;touch-action:manipulation}:host [part=input]::-webkit-clear-button,:host [part=input]::-webkit-inner-spin-button,:host [part=input]::-webkit-search-cancel-button,:host [part=input]::-webkit-search-decoration{-webkit-appearance:none}:host [part=input]:invalid{box-shadow:none}:host [part=icon]{color:#acafb5;min-width:1em}:host([disabled]) [part=input]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host([disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6)}:host([readonly]){border:1px solid rgba(169,175,186,.6)}:host(:not([focused]):not(:focus):hover){border:1px solid #bfc3cb}:host([warning]){background-color:#fff;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(72,72,72,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#fff;border:1px solid #d94255}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(217,66,85,.6);color:rgba(72,72,72,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(217,66,85,.6)}:host([error]:not([focused]):not(:focus):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):hover){border:1px solid #e37180}:host([highlight]){background-color:#b0ffff;border:1px solid #a9afba}:host([highlight][disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6);background-color:rgba(176,255,255,.6)}:host([highlight][readonly]){border:1px solid rgba(169,175,186,.6)}:host([highlight]:not([focused]):not(:focus):hover){border:1px solid #bfc3cb}:host([indirect]){color:#009494;background-color:#effefe;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,148,148,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):hover){border:1px solid #a7a45a}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#ffb266;border-style:dotted}:host([disabled]) [part=input]::-webkit-input-placeholder{color:rgba(102,101,112,.6)}:host([disabled]) [part=input]::-moz-placeholder{color:rgba(102,101,112,.6)}:host([disabled]) [part=input]:-ms-input-placeholder{color:rgba(102,101,112,.6)}');
|
|
3
|
+
elf.customStyles.define('ef-email-field', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13rem;font-weight:400;height:23px;width:140px;max-width:100%;padding:0 5px;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#484848;border-radius:0;text-overflow:ellipsis;background-color:#fff;border:1px solid #a9afba}:host([type=number]){padding-right:0}:host([error]),:host([error][warning]){border:1px solid #d94255}:host([error][disabled]),:host([error][warning][disabled]){color:rgba(72,72,72,.6);border:1px solid rgba(217,66,85,.6)}:host ::-ms-clear{display:none}:host [part=input]{color:inherit;padding:0;margin:0;flex:1 1 auto;min-width:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;touch-action:manipulation}:host [part=input]::-webkit-clear-button,:host [part=input]::-webkit-inner-spin-button,:host [part=input]::-webkit-search-cancel-button,:host [part=input]::-webkit-search-decoration{-webkit-appearance:none}:host [part=input]:invalid{box-shadow:none}:host [part=icon]{color:#acafb5;min-width:1em}:host([disabled]) [part=input]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host([disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6)}:host([readonly]){border:1px solid rgba(169,175,186,.6)}:host(:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #bfc3cb}:host([warning]){background-color:#fff;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(72,72,72,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#fff;border:1px solid #d94255}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(217,66,85,.6);color:rgba(72,72,72,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(217,66,85,.6)}:host([error]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #e37180}:host([highlight]){background-color:#b0ffff;border:1px solid #a9afba}:host([highlight][disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6);background-color:rgba(176,255,255,.6)}:host([highlight][readonly]){border:1px solid rgba(169,175,186,.6)}:host([highlight]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #bfc3cb}:host([indirect]){color:#009494;background-color:#effefe;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,148,148,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #a7a45a}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#ffb266;border-style:dotted}:host([disabled]) [part=input]::-webkit-input-placeholder{color:rgba(102,101,112,.6)}:host([disabled]) [part=input]::-moz-placeholder{color:rgba(102,101,112,.6)}:host([disabled]) [part=input]:-ms-input-placeholder{color:rgba(102,101,112,.6)}');
|
package/lib/events.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TapEvent, ResizeEvent } from '@refinitiv-ui/core';
|
|
1
|
+
import type { TapEvent, ResizeEvent, FocusedChangedEvent } from '@refinitiv-ui/core';
|
|
2
2
|
/**
|
|
3
3
|
* Dispatched when `opened` state changes
|
|
4
4
|
* Prevent default to stop opening/closing pipeline
|
|
@@ -118,4 +118,4 @@ declare type ItemTriggerEvent = CustomEvent<{
|
|
|
118
118
|
*/
|
|
119
119
|
value: string;
|
|
120
120
|
}>;
|
|
121
|
-
export { OpenedChangedEvent, ValueChangedEvent, ErrorChangedEvent, ActiveChangedEvent, ViewChangedEvent, ItemTriggerEvent, CheckChangedEvent, OffsetChangedEvent, ExpandedChangedEvent, QueryChangedEvent, PageChangedEvent, FromChangedEvent, ToChangedEvent, TapEvent, ResizeEvent };
|
|
121
|
+
export { OpenedChangedEvent, ValueChangedEvent, ErrorChangedEvent, ActiveChangedEvent, ViewChangedEvent, ItemTriggerEvent, CheckChangedEvent, OffsetChangedEvent, ExpandedChangedEvent, QueryChangedEvent, PageChangedEvent, FromChangedEvent, ToChangedEvent, TapEvent, ResizeEvent, FocusedChangedEvent };
|
package/lib/events.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { TapEvent };
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# ef-flag
|
|
2
|
+
|
|
3
|
+
Provides a collection of flags.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|----------|-----------|------------------|---------|---------------------------------|
|
|
9
|
+
| `flag` | `flag` | `string \| null` | null | Name of a known flag to render. |
|
|
10
|
+
| `src` | `src` | `string \| null` | null | Src location of an svg flag. |
|
package/lib/flag/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement,
|
|
3
|
-
export { preload } from './utils/FlagLoader';
|
|
2
|
+
import { BasicElement, CSSResultGroup, TemplateResult, PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
export { preload } from './utils/FlagLoader.js';
|
|
4
4
|
/**
|
|
5
5
|
* Provides a collection of flags.
|
|
6
6
|
*
|
|
@@ -15,16 +15,17 @@ export declare class Flag extends BasicElement {
|
|
|
15
15
|
*/
|
|
16
16
|
static get version(): string;
|
|
17
17
|
/**
|
|
18
|
-
* A `
|
|
18
|
+
* A `CSSResultGroup` that will be used
|
|
19
19
|
* to style the host, slotted children
|
|
20
20
|
* and the internal template of the element.
|
|
21
21
|
* @returns CSS template
|
|
22
22
|
*/
|
|
23
|
-
static get styles():
|
|
23
|
+
static get styles(): CSSResultGroup;
|
|
24
24
|
private _flag;
|
|
25
25
|
/**
|
|
26
26
|
* Name of a known flag to render.
|
|
27
27
|
* @example gb
|
|
28
|
+
* @default null
|
|
28
29
|
*/
|
|
29
30
|
get flag(): string | null;
|
|
30
31
|
set flag(value: string | null);
|
|
@@ -32,6 +33,7 @@ export declare class Flag extends BasicElement {
|
|
|
32
33
|
/**
|
|
33
34
|
* Src location of an svg flag.
|
|
34
35
|
* @example https://cdn.io/flags/gb.svg
|
|
36
|
+
* @default null
|
|
35
37
|
*/
|
|
36
38
|
get src(): string | null;
|
|
37
39
|
set src(value: string | null);
|