@refinitiv-ui/elements 5.6.0 → 5.8.2-alpha.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 +51 -0
- package/lib/accordion/custom-elements.md +18 -0
- package/lib/appstate-bar/custom-elements.md +22 -0
- package/lib/autosuggest/custom-elements.json +24 -4
- package/lib/autosuggest/custom-elements.md +54 -0
- package/lib/autosuggest/index.d.ts +4 -0
- package/lib/autosuggest/index.js +4 -0
- package/lib/button/custom-elements.json +2 -2
- package/lib/button/custom-elements.md +23 -0
- package/lib/button-bar/custom-elements.md +9 -0
- package/lib/calendar/custom-elements.json +8 -6
- package/lib/calendar/custom-elements.md +35 -0
- package/lib/calendar/index.d.ts +2 -0
- package/lib/calendar/index.js +2 -0
- package/lib/canvas/custom-elements.json +7 -5
- package/lib/canvas/custom-elements.md +27 -0
- package/lib/canvas/index.d.ts +1 -0
- package/lib/canvas/index.js +1 -0
- package/lib/card/custom-elements.json +3 -1
- package/lib/card/custom-elements.md +24 -0
- package/lib/card/index.d.ts +2 -0
- package/lib/card/index.js +2 -0
- package/lib/chart/custom-elements.json +1 -1
- package/lib/chart/custom-elements.md +16 -0
- package/lib/checkbox/custom-elements.json +12 -8
- package/lib/checkbox/custom-elements.md +18 -0
- package/lib/checkbox/index.d.ts +3 -1
- package/lib/checkbox/index.js +2 -0
- package/lib/clock/custom-elements.json +8 -4
- package/lib/clock/custom-elements.md +28 -0
- package/lib/clock/index.d.ts +2 -0
- package/lib/clock/index.js +2 -0
- package/lib/clock/themes/halo/dark/index.js +1 -1
- package/lib/clock/themes/halo/light/index.js +1 -1
- package/lib/clock/themes/solar/charcoal/index.js +1 -1
- package/lib/clock/themes/solar/pearl/index.js +1 -1
- package/lib/collapse/custom-elements.md +27 -0
- package/lib/color-dialog/custom-elements.json +29 -16
- package/lib/color-dialog/custom-elements.md +39 -0
- package/lib/color-dialog/index.d.ts +8 -8
- package/lib/color-dialog/index.js +8 -8
- package/lib/combo-box/custom-elements.json +28 -16
- package/lib/combo-box/custom-elements.md +35 -0
- package/lib/combo-box/index.d.ts +10 -2
- package/lib/combo-box/index.js +10 -1
- 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 +2 -0
- package/lib/counter/index.js +2 -0
- 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 +15 -4
- package/lib/datetime-picker/index.js +15 -4
- package/lib/dialog/custom-elements.json +34 -12
- package/lib/dialog/custom-elements.md +47 -0
- package/lib/dialog/index.d.ts +7 -10
- package/lib/dialog/index.js +7 -10
- 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 +43 -115
- package/lib/email-field/index.js +44 -244
- package/lib/flag/custom-elements.md +10 -0
- package/lib/flag/index.d.ts +2 -0
- package/lib/flag/index.js +2 -0
- package/lib/header/custom-elements.md +18 -0
- package/lib/heatmap/custom-elements.md +26 -0
- package/lib/icon/custom-elements.md +8 -0
- package/lib/icon/index.d.ts +2 -0
- package/lib/icon/index.js +2 -0
- package/lib/interactive-chart/custom-elements.json +6 -10
- package/lib/interactive-chart/custom-elements.md +31 -0
- package/lib/interactive-chart/index.d.ts +5 -2
- package/lib/interactive-chart/index.js +5 -2
- package/lib/item/custom-elements.json +4 -4
- package/lib/item/custom-elements.md +29 -0
- package/lib/item/index.d.ts +11 -2
- package/lib/item/index.js +25 -4
- package/lib/label/custom-elements.md +11 -0
- package/lib/layout/custom-elements.md +26 -0
- 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 +1 -0
- package/lib/led-gauge/index.js +1 -0
- package/lib/list/custom-elements.json +18 -5
- package/lib/list/custom-elements.md +32 -0
- package/lib/list/helpers/list-renderer.js +2 -0
- package/lib/list/index.d.ts +19 -2
- package/lib/list/index.js +34 -1
- package/lib/loader/custom-elements.md +5 -0
- package/lib/multi-input/custom-elements.json +7 -6
- package/lib/multi-input/custom-elements.md +43 -0
- package/lib/multi-input/index.d.ts +4 -0
- package/lib/multi-input/index.js +4 -0
- package/lib/notification/custom-elements.md +26 -0
- 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 +92 -47
- package/lib/number-field/index.js +113 -80
- package/lib/overlay/custom-elements.json +26 -13
- package/lib/overlay/custom-elements.md +54 -0
- package/lib/overlay/elements/overlay.d.ts +5 -0
- package/lib/overlay-menu/custom-elements.json +70 -20
- package/lib/overlay-menu/custom-elements.md +44 -0
- package/lib/overlay-menu/index.d.ts +13 -11
- package/lib/overlay-menu/index.js +13 -11
- package/lib/pagination/custom-elements.md +27 -0
- package/lib/panel/custom-elements.md +11 -0
- 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 +42 -94
- package/lib/password-field/index.js +48 -194
- package/lib/pill/custom-elements.json +8 -6
- package/lib/pill/custom-elements.md +22 -0
- package/lib/pill/index.d.ts +1 -1
- package/lib/pill/index.js +1 -1
- package/lib/progress-bar/custom-elements.md +18 -0
- package/lib/radio-button/custom-elements.json +8 -6
- package/lib/radio-button/custom-elements.md +19 -0
- package/lib/radio-button/index.d.ts +6 -5
- package/lib/radio-button/index.js +5 -4
- package/lib/rating/custom-elements.md +17 -0
- 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 +43 -100
- package/lib/search-field/index.js +46 -215
- package/lib/select/custom-elements.json +5 -4
- package/lib/select/custom-elements.md +24 -0
- package/lib/select/index.d.ts +11 -3
- package/lib/select/index.js +65 -26
- 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 +2 -1
- package/lib/slider/custom-elements.json +4 -4
- package/lib/slider/custom-elements.md +28 -0
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/index.js +1 -1
- package/lib/sparkline/custom-elements.json +4 -4
- package/lib/sparkline/custom-elements.md +16 -0
- package/lib/sparkline/index.d.ts +3 -1
- package/lib/sparkline/index.js +2 -0
- package/lib/swing-gauge/custom-elements.json +5 -3
- package/lib/swing-gauge/custom-elements.md +17 -0
- package/lib/swing-gauge/index.d.ts +3 -1
- package/lib/swing-gauge/index.js +3 -1
- package/lib/tab/custom-elements.json +2 -2
- package/lib/tab/custom-elements.md +22 -0
- package/lib/tab-bar/custom-elements.md +11 -0
- 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 +50 -92
- package/lib/text-field/index.js +81 -230
- 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 +3 -0
- package/lib/time-picker/index.js +3 -0
- package/lib/toggle/custom-elements.json +8 -6
- package/lib/toggle/custom-elements.md +19 -0
- package/lib/toggle/index.d.ts +2 -1
- package/lib/toggle/index.js +1 -0
- package/lib/tooltip/custom-elements.md +14 -0
- package/lib/tornado-chart/custom-elements.md +18 -0
- package/lib/tree/custom-elements.json +4 -3
- package/lib/tree/custom-elements.md +32 -0
- package/lib/tree/elements/tree.d.ts +1 -0
- package/lib/tree/elements/tree.js +1 -0
- package/lib/tree/managers/tree-manager.d.ts +20 -2
- package/lib/tree/managers/tree-manager.js +55 -28
- 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/index.d.ts +5 -3
- package/lib/tree-select/index.js +3 -2
- package/lib/tree-select/themes/halo/dark/index.js +1 -1
- package/lib/tree-select/themes/halo/light/index.js +1 -1
- package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
- package/lib/tree-select/themes/solar/pearl/index.js +1 -1
- package/lib/version.js +1 -1
- package/package.json +293 -12
|
@@ -5,11 +5,11 @@ import { CSSResultGroup, ControlElement, TemplateResult, PropertyValues } from '
|
|
|
5
5
|
*
|
|
6
6
|
* @fires checked-changed - Fired when the `checked` property changes.
|
|
7
7
|
*
|
|
8
|
-
* @attr {string}
|
|
9
|
-
* @prop {string} [value=] - Value of the radio button
|
|
8
|
+
* @attr {string} value - Value of the radio button
|
|
9
|
+
* @prop {string} [value=""] - Value of the radio button
|
|
10
10
|
*
|
|
11
|
-
* @attr {string}
|
|
12
|
-
* @prop {string} [name=] - Group multiple radio buttons by assigning the same name
|
|
11
|
+
* @attr {string} name - Group multiple radio buttons by assigning the same name
|
|
12
|
+
* @prop {string} [name=""] - Group multiple radio buttons by assigning the same name
|
|
13
13
|
*
|
|
14
14
|
* @attr {boolean} readonly - Set readonly state
|
|
15
15
|
* @prop {boolean} [readonly=false] - Set readonly state
|
|
@@ -23,7 +23,7 @@ export declare class RadioButton extends ControlElement {
|
|
|
23
23
|
* @returns version number
|
|
24
24
|
*/
|
|
25
25
|
static get version(): string;
|
|
26
|
-
protected readonly defaultRole
|
|
26
|
+
protected readonly defaultRole: string | null;
|
|
27
27
|
/**
|
|
28
28
|
* A `CSSResultGroup` that will be used
|
|
29
29
|
* to style the host, slotted children
|
|
@@ -35,6 +35,7 @@ export declare class RadioButton extends ControlElement {
|
|
|
35
35
|
/**
|
|
36
36
|
* Radio button checked state
|
|
37
37
|
* @param value checked state
|
|
38
|
+
* @default false
|
|
38
39
|
* @returns {void}
|
|
39
40
|
*/
|
|
40
41
|
set checked(value: boolean);
|
|
@@ -11,11 +11,11 @@ import { applyRegistry, removeFromRegistry, getRadioGroup } from './radio-button
|
|
|
11
11
|
*
|
|
12
12
|
* @fires checked-changed - Fired when the `checked` property changes.
|
|
13
13
|
*
|
|
14
|
-
* @attr {string}
|
|
15
|
-
* @prop {string} [value=] - Value of the radio button
|
|
14
|
+
* @attr {string} value - Value of the radio button
|
|
15
|
+
* @prop {string} [value=""] - Value of the radio button
|
|
16
16
|
*
|
|
17
|
-
* @attr {string}
|
|
18
|
-
* @prop {string} [name=] - Group multiple radio buttons by assigning the same name
|
|
17
|
+
* @attr {string} name - Group multiple radio buttons by assigning the same name
|
|
18
|
+
* @prop {string} [name=""] - Group multiple radio buttons by assigning the same name
|
|
19
19
|
*
|
|
20
20
|
* @attr {boolean} readonly - Set readonly state
|
|
21
21
|
* @prop {boolean} [readonly=false] - Set readonly state
|
|
@@ -74,6 +74,7 @@ let RadioButton = class RadioButton extends ControlElement {
|
|
|
74
74
|
/**
|
|
75
75
|
* Radio button checked state
|
|
76
76
|
* @param value checked state
|
|
77
|
+
* @default false
|
|
77
78
|
* @returns {void}
|
|
78
79
|
*/
|
|
79
80
|
set checked(value) {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# ef-rating
|
|
2
|
+
|
|
3
|
+
Star visualisation component that is generally used for ranking
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|---------------|---------------|-----------|---------|--------------------------------------------------|
|
|
9
|
+
| `interactive` | `interactive` | `boolean` | false | Make it possible to interact with rating control and change the value |
|
|
10
|
+
| `max` | `max` | `string` | "5" | Set number of total stars |
|
|
11
|
+
| `value` | `value` | `string` | "0" | Set number of selected stars. Value can be any number between 0 and `max`.<br />Decimal values are calculated to empty star (0 - .25); half-star (.25 - .75) and full star (.75 - 1) |
|
|
12
|
+
|
|
13
|
+
## Events
|
|
14
|
+
|
|
15
|
+
| Event | Description |
|
|
16
|
+
|-----------------|---------------------------------|
|
|
17
|
+
| `value-changed` | Fired when the `value` changes. |
|
|
@@ -6,48 +6,44 @@
|
|
|
6
6
|
"description": "Form control to get a search input from users.",
|
|
7
7
|
"attributes": [
|
|
8
8
|
{
|
|
9
|
-
"name": "
|
|
10
|
-
"description": "Set
|
|
11
|
-
"type": "
|
|
12
|
-
"default": "
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"name": "placeholder",
|
|
16
|
-
"description": "Set place holder text",
|
|
17
|
-
"type": "string",
|
|
18
|
-
"default": "\"\""
|
|
9
|
+
"name": "disabled",
|
|
10
|
+
"description": "Set disabled state",
|
|
11
|
+
"type": "boolean",
|
|
12
|
+
"default": "false"
|
|
19
13
|
},
|
|
20
14
|
{
|
|
21
15
|
"name": "error",
|
|
22
|
-
"description": "Set state
|
|
16
|
+
"description": "Set error state",
|
|
23
17
|
"type": "boolean",
|
|
24
18
|
"default": "false"
|
|
25
19
|
},
|
|
26
20
|
{
|
|
27
|
-
"name": "
|
|
28
|
-
"description": "
|
|
21
|
+
"name": "icon-has-action",
|
|
22
|
+
"description": "Specify when icon need to be clickable",
|
|
29
23
|
"type": "boolean",
|
|
30
24
|
"default": "false"
|
|
31
25
|
},
|
|
32
26
|
{
|
|
33
|
-
"name": "
|
|
34
|
-
"description": "
|
|
35
|
-
"type": "
|
|
36
|
-
"default": "
|
|
27
|
+
"name": "placeholder",
|
|
28
|
+
"description": "Set placeholder text",
|
|
29
|
+
"type": "string",
|
|
30
|
+
"default": "\"\""
|
|
37
31
|
},
|
|
38
32
|
{
|
|
39
|
-
"name": "
|
|
40
|
-
"description": "Set
|
|
41
|
-
"type": "
|
|
33
|
+
"name": "readonly",
|
|
34
|
+
"description": "Set readonly state",
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"default": "false"
|
|
42
37
|
},
|
|
43
38
|
{
|
|
44
|
-
"name": "
|
|
45
|
-
"description": "
|
|
46
|
-
"type": "
|
|
39
|
+
"name": "transparent",
|
|
40
|
+
"description": "Disables all other states and border/background styles.",
|
|
41
|
+
"type": "boolean",
|
|
42
|
+
"default": "false"
|
|
47
43
|
},
|
|
48
44
|
{
|
|
49
|
-
"name": "
|
|
50
|
-
"description": "
|
|
45
|
+
"name": "warning",
|
|
46
|
+
"description": "Set warning state",
|
|
51
47
|
"type": "boolean",
|
|
52
48
|
"default": "false"
|
|
53
49
|
},
|
|
@@ -58,77 +54,63 @@
|
|
|
58
54
|
"default": "\"\""
|
|
59
55
|
},
|
|
60
56
|
{
|
|
61
|
-
"name": "
|
|
62
|
-
"description": "
|
|
63
|
-
"type": "boolean"
|
|
64
|
-
"default": "\"false\""
|
|
57
|
+
"name": "icon-has-action",
|
|
58
|
+
"description": "Specify when icon need to be clickable",
|
|
59
|
+
"type": "boolean"
|
|
65
60
|
},
|
|
66
61
|
{
|
|
67
|
-
"name": "
|
|
68
|
-
"description": "Set
|
|
69
|
-
"type": "
|
|
70
|
-
|
|
62
|
+
"name": "maxlength",
|
|
63
|
+
"description": "Set character max limit",
|
|
64
|
+
"type": "number"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "minlength",
|
|
68
|
+
"description": "Set character min limit",
|
|
69
|
+
"type": "number"
|
|
71
70
|
}
|
|
72
71
|
],
|
|
73
72
|
"properties": [
|
|
74
73
|
{
|
|
75
|
-
"name": "
|
|
76
|
-
"attribute": "
|
|
77
|
-
"description": "Set
|
|
78
|
-
"type": "string",
|
|
79
|
-
"default": "\"\""
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"name": "placeholder",
|
|
83
|
-
"attribute": "placeholder",
|
|
84
|
-
"description": "Set place holder text",
|
|
85
|
-
"type": "string",
|
|
86
|
-
"default": "\"\""
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"name": "error",
|
|
90
|
-
"attribute": "error",
|
|
91
|
-
"description": "Set state to error",
|
|
74
|
+
"name": "disabled",
|
|
75
|
+
"attribute": "disabled",
|
|
76
|
+
"description": "Set disabled state",
|
|
92
77
|
"type": "boolean",
|
|
93
78
|
"default": "false"
|
|
94
79
|
},
|
|
95
80
|
{
|
|
96
|
-
"name": "
|
|
97
|
-
"attribute": "
|
|
98
|
-
"description": "Set state
|
|
81
|
+
"name": "error",
|
|
82
|
+
"attribute": "error",
|
|
83
|
+
"description": "Set error state",
|
|
99
84
|
"type": "boolean",
|
|
100
85
|
"default": "false"
|
|
101
86
|
},
|
|
102
87
|
{
|
|
103
|
-
"name": "
|
|
104
|
-
"attribute": "
|
|
105
|
-
"description": "
|
|
88
|
+
"name": "iconHasAction",
|
|
89
|
+
"attribute": "icon-has-action",
|
|
90
|
+
"description": "Specify when icon need to be clickable",
|
|
106
91
|
"type": "boolean",
|
|
107
92
|
"default": "false"
|
|
108
93
|
},
|
|
109
94
|
{
|
|
110
95
|
"name": "maxLength",
|
|
111
|
-
"attribute": "maxlength",
|
|
112
96
|
"description": "Set character max limit",
|
|
113
97
|
"type": "number | null"
|
|
114
98
|
},
|
|
115
99
|
{
|
|
116
100
|
"name": "minLength",
|
|
117
|
-
"attribute": "minlength",
|
|
118
101
|
"description": "Set character min limit",
|
|
119
102
|
"type": "number | null"
|
|
120
103
|
},
|
|
121
104
|
{
|
|
122
|
-
"name": "
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"default": "false"
|
|
105
|
+
"name": "pattern",
|
|
106
|
+
"description": "Set regular expression for input validation",
|
|
107
|
+
"type": "string",
|
|
108
|
+
"default": "\"\""
|
|
127
109
|
},
|
|
128
110
|
{
|
|
129
|
-
"name": "
|
|
130
|
-
"attribute": "
|
|
131
|
-
"description": "
|
|
111
|
+
"name": "placeholder",
|
|
112
|
+
"attribute": "placeholder",
|
|
113
|
+
"description": "Set placeholder text",
|
|
132
114
|
"type": "string",
|
|
133
115
|
"default": "\"\""
|
|
134
116
|
},
|
|
@@ -137,14 +119,28 @@
|
|
|
137
119
|
"attribute": "readonly",
|
|
138
120
|
"description": "Set readonly state",
|
|
139
121
|
"type": "boolean",
|
|
140
|
-
"default": "
|
|
122
|
+
"default": "false"
|
|
141
123
|
},
|
|
142
124
|
{
|
|
143
|
-
"name": "
|
|
144
|
-
"attribute": "
|
|
145
|
-
"description": "
|
|
125
|
+
"name": "transparent",
|
|
126
|
+
"attribute": "transparent",
|
|
127
|
+
"description": "Disables all other states and border/background styles.",
|
|
146
128
|
"type": "boolean",
|
|
147
|
-
"default": "
|
|
129
|
+
"default": "false"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "warning",
|
|
133
|
+
"attribute": "warning",
|
|
134
|
+
"description": "Set warning state",
|
|
135
|
+
"type": "boolean",
|
|
136
|
+
"default": "false"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "value",
|
|
140
|
+
"attribute": "value",
|
|
141
|
+
"description": "Input's value",
|
|
142
|
+
"type": "string",
|
|
143
|
+
"default": "\"\""
|
|
148
144
|
}
|
|
149
145
|
],
|
|
150
146
|
"events": [
|
|
@@ -158,13 +154,13 @@
|
|
|
158
154
|
},
|
|
159
155
|
{
|
|
160
156
|
"name": "icon-click",
|
|
161
|
-
"description": "Dispatched
|
|
157
|
+
"description": "Dispatched when icon is clicked"
|
|
162
158
|
}
|
|
163
159
|
],
|
|
164
160
|
"methods": [
|
|
165
161
|
{
|
|
166
|
-
"name": "
|
|
167
|
-
"description": "
|
|
162
|
+
"name": "renderIcon",
|
|
163
|
+
"description": "",
|
|
168
164
|
"params": []
|
|
169
165
|
}
|
|
170
166
|
]
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# ef-search-field
|
|
2
|
+
|
|
3
|
+
Form control to get a search input from users.
|
|
4
|
+
|
|
5
|
+
## Attributes
|
|
6
|
+
|
|
7
|
+
| Attribute | Type | Description |
|
|
8
|
+
|-------------------|-----------|----------------------------------------|
|
|
9
|
+
| `icon-has-action` | `boolean` | Specify when icon need to be clickable |
|
|
10
|
+
| `maxlength` | `number` | Set character max limit |
|
|
11
|
+
| `minlength` | `number` | Set character min limit |
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
| Property | Attribute | Type | Default | Description |
|
|
16
|
+
|-----------------|-------------------|------------------|---------|--------------------------------------------------|
|
|
17
|
+
| `disabled` | `disabled` | `boolean` | false | Set disabled state |
|
|
18
|
+
| `error` | `error` | `boolean` | false | Set error state |
|
|
19
|
+
| `iconHasAction` | `icon-has-action` | `boolean` | false | Specify when icon need to be clickable |
|
|
20
|
+
| `maxLength` | | `number \| null` | null | Set character max limit |
|
|
21
|
+
| `minLength` | | `number \| null` | null | Set character min limit |
|
|
22
|
+
| `pattern` | | `string` | "" | Set regular expression for input validation |
|
|
23
|
+
| `placeholder` | `placeholder` | `string` | "" | Set placeholder text |
|
|
24
|
+
| `readonly` | `readonly` | `boolean` | false | Set readonly state |
|
|
25
|
+
| `transparent` | `transparent` | `boolean` | false | Disables all other states and border/background styles. |
|
|
26
|
+
| `value` | `value` | `string` | "" | Input's value |
|
|
27
|
+
| `warning` | `warning` | `boolean` | false | Set warning state |
|
|
28
|
+
|
|
29
|
+
## Methods
|
|
30
|
+
|
|
31
|
+
| Method | Type |
|
|
32
|
+
|--------------|-----------|
|
|
33
|
+
| `renderIcon` | `(): any` |
|
|
34
|
+
|
|
35
|
+
## Events
|
|
36
|
+
|
|
37
|
+
| Event | Description |
|
|
38
|
+
|-----------------|-------------------------------------|
|
|
39
|
+
| `error-changed` | Dispatched when error state changes |
|
|
40
|
+
| `icon-click` | Dispatched when icon is clicked |
|
|
41
|
+
| `value-changed` | Dispatched when value changes |
|
|
@@ -1,122 +1,65 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { TemplateResult } from '@refinitiv-ui/core';
|
|
3
|
+
import { TemplateMap } from '@refinitiv-ui/core/lib/directives/template-map.js';
|
|
3
4
|
import '../icon/index.js';
|
|
5
|
+
import { TextField } from '../text-field/index.js';
|
|
6
|
+
import { Translate } from '@refinitiv-ui/translate';
|
|
7
|
+
import '@refinitiv-ui/phrasebook/lib/locale/en/search-field.js';
|
|
4
8
|
/**
|
|
5
9
|
* Form control to get a search input from users.
|
|
6
10
|
*
|
|
7
11
|
* @fires value-changed - Dispatched when value changes
|
|
8
12
|
* @fires error-changed - Dispatched when error state changes
|
|
13
|
+
* @fires icon-click - Dispatched when icon is clicked
|
|
9
14
|
*
|
|
10
|
-
* @attr {
|
|
11
|
-
* @prop {
|
|
15
|
+
* @attr {boolean} disabled - Set disabled state
|
|
16
|
+
* @prop {boolean} [disabled=false] - Set disabled state
|
|
17
|
+
*
|
|
18
|
+
* @attr {boolean} error - Set error state
|
|
19
|
+
* @prop {boolean} [error=false] - Set error state
|
|
20
|
+
*
|
|
21
|
+
* @attr {boolean} icon-has-action - Specify when icon need to be clickable
|
|
22
|
+
* @prop {boolean} [iconHasAction=false] - Specify when icon need to be clickable
|
|
23
|
+
*
|
|
24
|
+
* @attr {number} maxlength - Set character max limit
|
|
25
|
+
* @prop {number | null} [maxLength=null] - Set character max limit
|
|
26
|
+
*
|
|
27
|
+
* @attr {number} minlength - Set character min limit
|
|
28
|
+
* @prop {number | null} [minLength=null] - Set character min limit
|
|
29
|
+
*
|
|
30
|
+
* @prop {string} [pattern=""] - Set regular expression for input validation
|
|
31
|
+
*
|
|
32
|
+
* @attr {string} placeholder - Set placeholder text
|
|
33
|
+
* @prop {string} [placeholder=""] - Set placeholder text
|
|
12
34
|
*
|
|
13
35
|
* @attr {boolean} readonly - Set readonly state
|
|
14
36
|
* @prop {boolean} [readonly=false] - Set readonly state
|
|
15
37
|
*
|
|
16
|
-
* @attr {boolean}
|
|
17
|
-
* @prop {boolean} [
|
|
38
|
+
* @attr {boolean} transparent - Disables all other states and border/background styles.
|
|
39
|
+
* @prop {boolean} [transparent=false] - Disables all other states and border/background styles.
|
|
40
|
+
*
|
|
41
|
+
* @attr {boolean} warning - Set warning state
|
|
42
|
+
* @prop {boolean} [warning=false] - Set warning state
|
|
43
|
+
*
|
|
44
|
+
* @attr {string} value - Input's value
|
|
45
|
+
* @prop {string} [value=""] - Input's value
|
|
18
46
|
*/
|
|
19
|
-
export declare class SearchField extends
|
|
20
|
-
/**
|
|
21
|
-
* Element version number
|
|
22
|
-
* @returns version number
|
|
23
|
-
*/
|
|
24
|
-
static get version(): string;
|
|
25
|
-
/**
|
|
26
|
-
* A `CSSResultGroup` that will be used
|
|
27
|
-
* to style the host, slotted children
|
|
28
|
-
* and the internal template of the element.
|
|
29
|
-
* @return CSS template
|
|
30
|
-
*/
|
|
31
|
-
static get styles(): CSSResultGroup;
|
|
32
|
-
/**
|
|
33
|
-
* Set regular expression for input validation
|
|
34
|
-
*/
|
|
35
|
-
pattern: string;
|
|
36
|
-
/**
|
|
37
|
-
* Set place holder 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;
|
|
47
|
+
export declare class SearchField extends TextField {
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
50
|
-
* Use with advanced composite elements requiring e.g. multi selection in
|
|
51
|
-
* combo-box when parent container handles element states.
|
|
49
|
+
* Used for translations
|
|
52
50
|
*/
|
|
53
|
-
|
|
51
|
+
protected t: Translate;
|
|
54
52
|
/**
|
|
55
|
-
*
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Set character min limit
|
|
60
|
-
*/
|
|
61
|
-
minLength: number | null;
|
|
62
|
-
/**
|
|
63
|
-
* Specify when icon need to be clickable
|
|
64
|
-
*/
|
|
65
|
-
iconHasAction: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Get native input element from shadow roots
|
|
68
|
-
*/
|
|
69
|
-
private inputElement;
|
|
70
|
-
/**
|
|
71
|
-
* Select the contents of input
|
|
72
|
-
* @returns void
|
|
73
|
-
*/
|
|
74
|
-
select(): void;
|
|
75
|
-
/**
|
|
76
|
-
* A `TemplateResult` that will be used
|
|
77
|
-
* to render the updated internal template.
|
|
78
|
-
* @return Render template
|
|
79
|
-
*/
|
|
80
|
-
protected render(): TemplateResult;
|
|
81
|
-
/**
|
|
82
|
-
* Called when the element’s DOM has been updated and rendered
|
|
83
|
-
* @param changedProperties Properties that has changed
|
|
84
|
-
* @returns {void}
|
|
85
|
-
*/
|
|
86
|
-
protected updated(changedProperties: PropertyValues): void;
|
|
87
|
-
/**
|
|
88
|
-
* Check if input should be re-validated
|
|
89
|
-
* @param changedProperties Properties that has changed
|
|
90
|
-
* @returns True if input should be re-validated
|
|
91
|
-
*/
|
|
92
|
-
private shouldValidateInput;
|
|
93
|
-
/**
|
|
94
|
-
* validate input according `pattern`, `minLength` and `maxLength` properties
|
|
95
|
-
* change state of `error` property according pattern validation
|
|
96
|
-
* @returns {void}
|
|
97
|
-
*/
|
|
98
|
-
private validateInput;
|
|
99
|
-
/**
|
|
100
|
-
* @param error existing state of error
|
|
101
|
-
* @returns true if there is no error and browser is IE11 and minLength more than 0 and value exists
|
|
102
|
-
*/
|
|
103
|
-
private shouldValidateForMinLength;
|
|
104
|
-
/**
|
|
105
|
-
* Check if value is changed
|
|
106
|
-
* @returns {void}
|
|
107
|
-
*/
|
|
108
|
-
private onPossibleValueChange;
|
|
109
|
-
/**
|
|
110
|
-
* Detect `enter` and `space` keydown and fire
|
|
111
|
-
* @param event keydown event
|
|
112
|
-
* @returns {void}
|
|
53
|
+
* Decorate `<input>` element with common properties extended from text-field:
|
|
54
|
+
* type="search" - always `search`
|
|
55
|
+
* @returns template map
|
|
113
56
|
*/
|
|
114
|
-
|
|
57
|
+
protected get decorateInputMap(): TemplateMap;
|
|
115
58
|
/**
|
|
116
|
-
*
|
|
59
|
+
* Renders icon element
|
|
117
60
|
* @returns {void}
|
|
118
61
|
*/
|
|
119
|
-
|
|
62
|
+
protected renderIcon(): TemplateResult | null;
|
|
120
63
|
}
|
|
121
64
|
|
|
122
65
|
declare global {
|
|
@@ -126,7 +69,7 @@ declare global {
|
|
|
126
69
|
|
|
127
70
|
namespace JSX {
|
|
128
71
|
interface IntrinsicElements {
|
|
129
|
-
'ef-search-field': Partial<SearchField> | JSXInterface.
|
|
72
|
+
'ef-search-field': Partial<SearchField> | JSXInterface.HTMLAttributes<SearchField>;
|
|
130
73
|
}
|
|
131
74
|
}
|
|
132
75
|
}
|