@refinitiv-ui/elements 5.7.0 → 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.
Files changed (161) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/lib/autosuggest/custom-elements.json +14 -4
  3. package/lib/autosuggest/custom-elements.md +21 -14
  4. package/lib/autosuggest/index.d.ts +4 -0
  5. package/lib/autosuggest/index.js +4 -0
  6. package/lib/calendar/custom-elements.json +4 -2
  7. package/lib/calendar/custom-elements.md +2 -2
  8. package/lib/calendar/index.d.ts +2 -0
  9. package/lib/calendar/index.js +2 -0
  10. package/lib/canvas/custom-elements.json +7 -5
  11. package/lib/canvas/custom-elements.md +8 -8
  12. package/lib/canvas/index.d.ts +1 -0
  13. package/lib/canvas/index.js +1 -0
  14. package/lib/card/custom-elements.json +3 -1
  15. package/lib/card/custom-elements.md +5 -5
  16. package/lib/card/index.d.ts +2 -0
  17. package/lib/card/index.js +2 -0
  18. package/lib/chart/custom-elements.json +1 -1
  19. package/lib/chart/custom-elements.md +4 -4
  20. package/lib/checkbox/custom-elements.json +8 -4
  21. package/lib/checkbox/custom-elements.md +2 -2
  22. package/lib/checkbox/index.d.ts +3 -1
  23. package/lib/checkbox/index.js +2 -0
  24. package/lib/clock/custom-elements.json +8 -4
  25. package/lib/clock/custom-elements.md +9 -9
  26. package/lib/clock/index.d.ts +2 -0
  27. package/lib/clock/index.js +2 -0
  28. package/lib/clock/themes/halo/dark/index.js +1 -1
  29. package/lib/clock/themes/halo/light/index.js +1 -1
  30. package/lib/clock/themes/solar/charcoal/index.js +1 -1
  31. package/lib/clock/themes/solar/pearl/index.js +1 -1
  32. package/lib/color-dialog/custom-elements.json +21 -8
  33. package/lib/color-dialog/custom-elements.md +22 -22
  34. package/lib/color-dialog/index.d.ts +8 -8
  35. package/lib/color-dialog/index.js +8 -8
  36. package/lib/combo-box/custom-elements.json +19 -10
  37. package/lib/combo-box/custom-elements.md +20 -20
  38. package/lib/combo-box/index.d.ts +10 -2
  39. package/lib/combo-box/index.js +10 -1
  40. package/lib/combo-box/themes/halo/dark/index.js +1 -1
  41. package/lib/combo-box/themes/halo/light/index.js +1 -1
  42. package/lib/combo-box/themes/solar/charcoal/index.js +1 -1
  43. package/lib/combo-box/themes/solar/pearl/index.js +1 -1
  44. package/lib/counter/custom-elements.json +8 -4
  45. package/lib/counter/custom-elements.md +4 -4
  46. package/lib/counter/index.d.ts +2 -0
  47. package/lib/counter/index.js +2 -0
  48. package/lib/datetime-picker/custom-elements.json +48 -19
  49. package/lib/datetime-picker/custom-elements.md +36 -28
  50. package/lib/datetime-picker/index.d.ts +15 -4
  51. package/lib/datetime-picker/index.js +15 -4
  52. package/lib/dialog/custom-elements.json +30 -8
  53. package/lib/dialog/custom-elements.md +16 -16
  54. package/lib/dialog/index.d.ts +7 -10
  55. package/lib/dialog/index.js +7 -10
  56. package/lib/email-field/custom-elements.json +80 -93
  57. package/lib/email-field/custom-elements.md +22 -20
  58. package/lib/email-field/index.d.ts +43 -115
  59. package/lib/email-field/index.js +44 -244
  60. package/lib/flag/custom-elements.md +4 -4
  61. package/lib/flag/index.d.ts +2 -0
  62. package/lib/flag/index.js +2 -0
  63. package/lib/icon/custom-elements.md +4 -4
  64. package/lib/icon/index.d.ts +2 -0
  65. package/lib/icon/index.js +2 -0
  66. package/lib/interactive-chart/custom-elements.json +6 -10
  67. package/lib/interactive-chart/custom-elements.md +6 -7
  68. package/lib/interactive-chart/index.d.ts +5 -2
  69. package/lib/interactive-chart/index.js +5 -2
  70. package/lib/item/custom-elements.json +8 -6
  71. package/lib/item/custom-elements.md +14 -14
  72. package/lib/item/index.d.ts +2 -1
  73. package/lib/item/index.js +2 -1
  74. package/lib/led-gauge/custom-elements.json +4 -4
  75. package/lib/led-gauge/custom-elements.md +2 -2
  76. package/lib/led-gauge/index.d.ts +1 -0
  77. package/lib/led-gauge/index.js +1 -0
  78. package/lib/list/custom-elements.json +18 -5
  79. package/lib/list/custom-elements.md +12 -10
  80. package/lib/list/helpers/list-renderer.js +2 -0
  81. package/lib/list/index.d.ts +19 -2
  82. package/lib/list/index.js +34 -1
  83. package/lib/multi-input/custom-elements.json +3 -2
  84. package/lib/multi-input/custom-elements.md +16 -16
  85. package/lib/multi-input/index.d.ts +4 -0
  86. package/lib/multi-input/index.js +4 -0
  87. package/lib/number-field/custom-elements.json +97 -52
  88. package/lib/number-field/custom-elements.md +27 -22
  89. package/lib/number-field/index.d.ts +92 -47
  90. package/lib/number-field/index.js +113 -80
  91. package/lib/overlay/custom-elements.json +23 -13
  92. package/lib/overlay/custom-elements.md +29 -29
  93. package/lib/overlay/elements/overlay.d.ts +5 -0
  94. package/lib/overlay-menu/custom-elements.json +66 -14
  95. package/lib/overlay-menu/custom-elements.md +19 -19
  96. package/lib/overlay-menu/index.d.ts +13 -11
  97. package/lib/overlay-menu/index.js +13 -11
  98. package/lib/password-field/custom-elements.json +62 -67
  99. package/lib/password-field/custom-elements.md +19 -11
  100. package/lib/password-field/index.d.ts +42 -94
  101. package/lib/password-field/index.js +48 -194
  102. package/lib/pill/custom-elements.json +4 -2
  103. package/lib/pill/custom-elements.md +1 -1
  104. package/lib/pill/index.d.ts +1 -1
  105. package/lib/pill/index.js +1 -1
  106. package/lib/radio-button/custom-elements.json +8 -6
  107. package/lib/radio-button/custom-elements.md +3 -3
  108. package/lib/radio-button/index.d.ts +6 -5
  109. package/lib/radio-button/index.js +5 -4
  110. package/lib/search-field/custom-elements.json +70 -74
  111. package/lib/search-field/custom-elements.md +24 -16
  112. package/lib/search-field/index.d.ts +43 -100
  113. package/lib/search-field/index.js +46 -215
  114. package/lib/select/custom-elements.json +3 -2
  115. package/lib/select/custom-elements.md +10 -10
  116. package/lib/select/index.d.ts +11 -3
  117. package/lib/select/index.js +65 -26
  118. package/lib/sidebar-layout/custom-elements.json +2 -6
  119. package/lib/sidebar-layout/custom-elements.md +5 -6
  120. package/lib/sidebar-layout/index.d.ts +2 -1
  121. package/lib/slider/custom-elements.json +2 -2
  122. package/lib/slider/custom-elements.md +1 -1
  123. package/lib/slider/index.d.ts +1 -1
  124. package/lib/slider/index.js +1 -1
  125. package/lib/sparkline/custom-elements.json +4 -4
  126. package/lib/sparkline/custom-elements.md +2 -2
  127. package/lib/sparkline/index.d.ts +3 -1
  128. package/lib/sparkline/index.js +2 -0
  129. package/lib/swing-gauge/custom-elements.json +5 -3
  130. package/lib/swing-gauge/custom-elements.md +11 -11
  131. package/lib/swing-gauge/index.d.ts +3 -1
  132. package/lib/swing-gauge/index.js +3 -1
  133. package/lib/text-field/custom-elements.json +76 -87
  134. package/lib/text-field/custom-elements.md +24 -26
  135. package/lib/text-field/index.d.ts +50 -92
  136. package/lib/text-field/index.js +81 -230
  137. package/lib/time-picker/custom-elements.md +3 -3
  138. package/lib/time-picker/index.d.ts +3 -0
  139. package/lib/time-picker/index.js +3 -0
  140. package/lib/toggle/custom-elements.json +4 -2
  141. package/lib/toggle/custom-elements.md +1 -1
  142. package/lib/toggle/index.d.ts +2 -1
  143. package/lib/toggle/index.js +1 -0
  144. package/lib/tree/custom-elements.json +2 -1
  145. package/lib/tree/custom-elements.md +1 -1
  146. package/lib/tree/elements/tree.d.ts +1 -0
  147. package/lib/tree/elements/tree.js +1 -0
  148. package/lib/tree/themes/halo/dark/index.js +1 -1
  149. package/lib/tree/themes/halo/light/index.js +1 -1
  150. package/lib/tree/themes/solar/charcoal/index.js +1 -1
  151. package/lib/tree/themes/solar/pearl/index.js +1 -1
  152. package/lib/tree-select/custom-elements.json +8 -4
  153. package/lib/tree-select/custom-elements.md +3 -3
  154. package/lib/tree-select/index.d.ts +5 -3
  155. package/lib/tree-select/index.js +3 -2
  156. package/lib/tree-select/themes/halo/dark/index.js +1 -1
  157. package/lib/tree-select/themes/halo/light/index.js +1 -1
  158. package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
  159. package/lib/tree-select/themes/solar/pearl/index.js +1 -1
  160. package/lib/version.js +1 -1
  161. package/package.json +10 -10
@@ -26,17 +26,17 @@ import '@refinitiv-ui/phrasebook/lib/locale/en/dialog.js';
26
26
  * @attr {boolean} [no-cancel-on-esc-key=false] - Prevents dialog to close when user presses ESC key
27
27
  * @prop {boolean} [noCancelOnEscKey=false] - Prevents dialog to close when user presses ESC key
28
28
  *
29
- * @attr {string} x - Set a specific x coordinate of dialog
30
- * @prop {string} x - Set a specific x coordinate of dialog
29
+ * @attr {string | undefined} x - Set a specific x coordinate of dialog
30
+ * @prop {string | undefined} x - Set a specific x coordinate of dialog
31
31
  *
32
- * @attr {string} y - Set a specific y coordinate of dialog
33
- * @prop {string} y - Set a specific y coordinate of dialog
32
+ * @attr {string | undefined} y - Set a specific y coordinate of dialog
33
+ * @prop {string | undefined} y - Set a specific y coordinate of dialog
34
34
  *
35
35
  * @attr {boolean} full-screen - Set dialog to full screen
36
- * @prop {boolean} fullScreen - Set dialog to full screen
36
+ * @prop {boolean} [fullScreen=false] - Set dialog to full screen
37
37
  *
38
- * @attr {string} position-target - Set position of dialog i.e. `top`, `right`, `left`, `bottom`, `center` or combination of theme e.g. `top right`.
39
- * @prop {string} positionTarget - Set position of dialog i.e. `top`, `right`, `left`, `bottom`, `center` or combination of theme e.g. `top right`.
38
+ * @attr {string | undefined} position-target - Set position of dialog i.e. `top`, `right`, `left`, `bottom`, `center` or combination of theme e.g. `top right`.
39
+ * @prop {string | undefined} positionTarget - Set position of dialog i.e. `top`, `right`, `left`, `bottom`, `center` or combination of theme e.g. `top right`.
40
40
  *
41
41
  * @fires opened-changed - Fired when value of `opened` property is changed. Prevent default to stop default action
42
42
  * @fires confirm - Fired when dialog is closed by user clicked a default OK button. Prevent default to stop default action
@@ -55,9 +55,6 @@ let Dialog = class Dialog extends Overlay {
55
55
  * Should the dialog be draggable
56
56
  */
57
57
  this.draggable = false;
58
- /**
59
- * @ignore
60
- */
61
58
  this.noCancelOnOutsideClick = true;
62
59
  /**
63
60
  * @ignore
@@ -3,160 +3,140 @@
3
3
  "tags": [
4
4
  {
5
5
  "name": "ef-email-field",
6
- "description": "A form control element for email",
6
+ "description": "A form control element for email.",
7
7
  "attributes": [
8
8
  {
9
- "name": "pattern",
10
- "description": "Set regular expression for input validation",
11
- "type": "string",
12
- "default": "\"\""
9
+ "name": "multiple",
10
+ "description": "Set to multiple mode, allows multiple emails in a single input",
11
+ "type": "boolean",
12
+ "default": "false"
13
13
  },
14
14
  {
15
- "name": "placeholder",
16
- "description": "Set placeholder text",
17
- "type": "string",
18
- "default": "\"\""
15
+ "name": "disabled",
16
+ "description": "Set disabled state",
17
+ "type": "boolean",
18
+ "default": "false"
19
19
  },
20
20
  {
21
21
  "name": "error",
22
- "description": "Set state to error",
22
+ "description": "Set error state",
23
23
  "type": "boolean",
24
24
  "default": "false"
25
25
  },
26
26
  {
27
- "name": "warning",
28
- "description": "Set state to warning",
29
- "type": "boolean",
30
- "default": "false"
27
+ "name": "icon",
28
+ "description": "Specify icon to display in input. Value can be icon name",
29
+ "type": "string | null"
31
30
  },
32
31
  {
33
- "name": "transparent",
34
- "description": "Disables all other states and border/background styles.\nUse with advanced composite elements requiring e.g. multi selection in\ncombo-box when parent container handles element states.",
32
+ "name": "icon-has-action",
33
+ "description": "Specify when icon need to be clickable",
35
34
  "type": "boolean",
36
35
  "default": "false"
37
36
  },
38
37
  {
39
- "name": "maxlength",
40
- "description": "Set character max limit",
41
- "type": "number | null"
38
+ "name": "placeholder",
39
+ "description": "Set placeholder text",
40
+ "type": "string",
41
+ "default": "\"\""
42
42
  },
43
43
  {
44
- "name": "minlength",
45
- "description": "Set character min limit",
46
- "type": "number | null"
44
+ "name": "readonly",
45
+ "description": "Set readonly state",
46
+ "type": "boolean",
47
+ "default": "false"
47
48
  },
48
49
  {
49
- "name": "multiple",
50
- "description": "Set to multiple mode, allows multiple emails in a single input",
50
+ "name": "transparent",
51
+ "description": "Disables all other states and border/background styles.",
51
52
  "type": "boolean",
52
53
  "default": "false"
53
54
  },
54
55
  {
55
- "name": "icon",
56
- "description": "Specify icon to display in input. Value can be icon name",
56
+ "name": "warning",
57
+ "description": "Set warning state",
58
+ "type": "boolean",
59
+ "default": "false"
60
+ },
61
+ {
62
+ "name": "value",
63
+ "description": "Input's value",
57
64
  "type": "string",
58
65
  "default": "\"\""
59
66
  },
60
67
  {
61
68
  "name": "icon-has-action",
62
69
  "description": "Specify when icon need to be clickable",
63
- "type": "boolean",
64
- "default": "false"
70
+ "type": "boolean"
65
71
  },
66
72
  {
67
- "name": "value",
68
- "description": "Input's value",
69
- "type": "string",
70
- "default": "0"
73
+ "name": "maxlength",
74
+ "description": "Set character max limit",
75
+ "type": "number"
71
76
  },
72
77
  {
73
- "name": "readonly",
74
- "description": "Set readonly state",
78
+ "name": "minlength",
79
+ "description": "Set character min limit",
80
+ "type": "number"
81
+ }
82
+ ],
83
+ "properties": [
84
+ {
85
+ "name": "multiple",
86
+ "attribute": "multiple",
87
+ "description": "Set to multiple mode, allows multiple emails in a single input",
75
88
  "type": "boolean",
76
89
  "default": "false"
77
90
  },
78
91
  {
79
92
  "name": "disabled",
93
+ "attribute": "disabled",
80
94
  "description": "Set disabled state",
81
95
  "type": "boolean",
82
96
  "default": "false"
83
- }
84
- ],
85
- "properties": [
86
- {
87
- "name": "pattern",
88
- "attribute": "pattern",
89
- "description": "Set regular expression for input validation",
90
- "type": "string",
91
- "default": "\"\""
92
- },
93
- {
94
- "name": "placeholder",
95
- "attribute": "placeholder",
96
- "description": "Set placeholder text",
97
- "type": "string",
98
- "default": "\"\""
99
97
  },
100
98
  {
101
99
  "name": "error",
102
100
  "attribute": "error",
103
- "description": "Set state to error",
101
+ "description": "Set error state",
104
102
  "type": "boolean",
105
103
  "default": "false"
106
104
  },
107
105
  {
108
- "name": "warning",
109
- "attribute": "warning",
110
- "description": "Set state to warning",
111
- "type": "boolean",
112
- "default": "false"
106
+ "name": "icon",
107
+ "attribute": "icon",
108
+ "description": "Specify icon to display in input. Value can be icon name",
109
+ "type": "string | null"
113
110
  },
114
111
  {
115
- "name": "transparent",
116
- "attribute": "transparent",
117
- "description": "Disables all other states and border/background styles.\nUse with advanced composite elements requiring e.g. multi selection in\ncombo-box when parent container handles element states.",
112
+ "name": "iconHasAction",
113
+ "attribute": "icon-has-action",
114
+ "description": "Specify when icon need to be clickable",
118
115
  "type": "boolean",
119
116
  "default": "false"
120
117
  },
121
118
  {
122
119
  "name": "maxLength",
123
- "attribute": "maxlength",
124
120
  "description": "Set character max limit",
125
121
  "type": "number | null"
126
122
  },
127
123
  {
128
124
  "name": "minLength",
129
- "attribute": "minlength",
130
125
  "description": "Set character min limit",
131
126
  "type": "number | null"
132
127
  },
133
128
  {
134
- "name": "multiple",
135
- "attribute": "multiple",
136
- "description": "Set to multiple mode, allows multiple emails in a single input",
137
- "type": "boolean",
138
- "default": "false"
139
- },
140
- {
141
- "name": "icon",
142
- "attribute": "icon",
143
- "description": "Specify icon to display in input. Value can be icon name",
129
+ "name": "pattern",
130
+ "description": "Set regular expression for input validation",
144
131
  "type": "string",
145
132
  "default": "\"\""
146
133
  },
147
134
  {
148
- "name": "iconHasAction",
149
- "attribute": "icon-has-action",
150
- "description": "Specify when icon need to be clickable",
151
- "type": "boolean",
152
- "default": "false"
153
- },
154
- {
155
- "name": "value",
156
- "attribute": "value",
157
- "description": "Input's value",
135
+ "name": "placeholder",
136
+ "attribute": "placeholder",
137
+ "description": "Set placeholder text",
158
138
  "type": "string",
159
- "default": "0"
139
+ "default": "\"\""
160
140
  },
161
141
  {
162
142
  "name": "readonly",
@@ -166,11 +146,25 @@
166
146
  "default": "false"
167
147
  },
168
148
  {
169
- "name": "disabled",
170
- "attribute": "disabled",
171
- "description": "Set disabled state",
149
+ "name": "transparent",
150
+ "attribute": "transparent",
151
+ "description": "Disables all other states and border/background styles.",
172
152
  "type": "boolean",
173
153
  "default": "false"
154
+ },
155
+ {
156
+ "name": "warning",
157
+ "attribute": "warning",
158
+ "description": "Set warning state",
159
+ "type": "boolean",
160
+ "default": "false"
161
+ },
162
+ {
163
+ "name": "value",
164
+ "attribute": "value",
165
+ "description": "Input's value",
166
+ "type": "string",
167
+ "default": "\"\""
174
168
  }
175
169
  ],
176
170
  "events": [
@@ -184,14 +178,7 @@
184
178
  },
185
179
  {
186
180
  "name": "icon-click",
187
- "description": "Dispatched only when element has icon-has-action attribute and icon is clicked"
188
- }
189
- ],
190
- "methods": [
191
- {
192
- "name": "select",
193
- "description": "Select the contents of input",
194
- "params": []
181
+ "description": "Dispatched when icon is clicked"
195
182
  }
196
183
  ]
197
184
  }
@@ -1,35 +1,37 @@
1
1
  # ef-email-field
2
2
 
3
- A form control element for email
3
+ A form control element for email.
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 |
4
12
 
5
13
  ## Properties
6
14
 
7
15
  | Property | Attribute | Type | Default | Description |
8
16
  |-----------------|-------------------|------------------|---------|--------------------------------------------------|
9
17
  | `disabled` | `disabled` | `boolean` | false | Set disabled state |
10
- | `error` | `error` | `boolean` | false | Set state to error |
11
- | `icon` | `icon` | `string` | "" | Specify icon to display in input. Value can be icon name |
18
+ | `error` | `error` | `boolean` | false | Set error state |
19
+ | `icon` | `icon` | `string \| null` | null | Specify icon to display in input. Value can be icon name |
12
20
  | `iconHasAction` | `icon-has-action` | `boolean` | false | Specify when icon need to be clickable |
13
- | `maxLength` | `maxlength` | `number \| null` | null | Set character max limit |
14
- | `minLength` | `minlength` | `number \| null` | null | Set character min limit |
21
+ | `maxLength` | | `number \| null` | null | Set character max limit |
22
+ | `minLength` | | `number \| null` | null | Set character min limit |
15
23
  | `multiple` | `multiple` | `boolean` | false | Set to multiple mode, allows multiple emails in a single input |
16
- | `pattern` | `pattern` | `string` | "" | Set regular expression for input validation |
24
+ | `pattern` | | `string` | "" | Set regular expression for input validation |
17
25
  | `placeholder` | `placeholder` | `string` | "" | Set placeholder text |
18
26
  | `readonly` | `readonly` | `boolean` | false | Set readonly state |
19
- | `transparent` | `transparent` | `boolean` | false | Disables all other states and border/background styles.<br />Use with advanced composite elements requiring e.g. multi selection in<br />combo-box when parent container handles element states. |
20
- | `value` | `value` | `string` | 0 | Input's value |
21
- | `warning` | `warning` | `boolean` | false | Set state to warning |
22
-
23
- ## Methods
24
-
25
- | Method | Type | Description |
26
- |----------|------------|------------------------------|
27
- | `select` | `(): void` | Select the contents of input |
27
+ | `transparent` | `transparent` | `boolean` | false | Disables all other states and border/background styles. |
28
+ | `value` | `value` | `string` | "" | Input's value |
29
+ | `warning` | `warning` | `boolean` | false | Set warning state |
28
30
 
29
31
  ## Events
30
32
 
31
- | Event | Description |
32
- |-----------------|--------------------------------------------------|
33
- | `error-changed` | Dispatched when error state changes |
34
- | `icon-click` | Dispatched only when element has icon-has-action attribute and icon is clicked |
35
- | `value-changed` | Dispatched when value changes |
33
+ | Event | Description |
34
+ |-----------------|-------------------------------------|
35
+ | `error-changed` | Dispatched when error state changes |
36
+ | `icon-click` | Dispatched when icon is clicked |
37
+ | `value-changed` | Dispatched when value changes |
@@ -1,140 +1,68 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { ControlElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
2
+ import { PropertyValues } from '@refinitiv-ui/core';
3
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 {string} value - Input's value
11
- * @prop {string} [value=] - Input's value
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} disabled - Set disabled state
17
- * @prop {boolean} [disabled=false] - Set disabled state
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 ControlElement {
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 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
- * Specify icon to display in input. Value can be icon name
68
- */
69
- icon: string;
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
- private inputElement;
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
- private shouldValidateInput;
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.ControlHTMLAttributes<EmailField>;
75
+ 'ef-email-field': Partial<EmailField> | JSXInterface.HTMLAttributes<EmailField>;
148
76
  }
149
77
  }
150
78
  }