@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.
Files changed (185) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/lib/accordion/custom-elements.md +18 -0
  3. package/lib/appstate-bar/custom-elements.md +22 -0
  4. package/lib/autosuggest/custom-elements.json +24 -4
  5. package/lib/autosuggest/custom-elements.md +54 -0
  6. package/lib/autosuggest/index.d.ts +4 -0
  7. package/lib/autosuggest/index.js +4 -0
  8. package/lib/button/custom-elements.json +2 -2
  9. package/lib/button/custom-elements.md +23 -0
  10. package/lib/button-bar/custom-elements.md +9 -0
  11. package/lib/calendar/custom-elements.json +8 -6
  12. package/lib/calendar/custom-elements.md +35 -0
  13. package/lib/calendar/index.d.ts +2 -0
  14. package/lib/calendar/index.js +2 -0
  15. package/lib/canvas/custom-elements.json +7 -5
  16. package/lib/canvas/custom-elements.md +27 -0
  17. package/lib/canvas/index.d.ts +1 -0
  18. package/lib/canvas/index.js +1 -0
  19. package/lib/card/custom-elements.json +3 -1
  20. package/lib/card/custom-elements.md +24 -0
  21. package/lib/card/index.d.ts +2 -0
  22. package/lib/card/index.js +2 -0
  23. package/lib/chart/custom-elements.json +1 -1
  24. package/lib/chart/custom-elements.md +16 -0
  25. package/lib/checkbox/custom-elements.json +12 -8
  26. package/lib/checkbox/custom-elements.md +18 -0
  27. package/lib/checkbox/index.d.ts +3 -1
  28. package/lib/checkbox/index.js +2 -0
  29. package/lib/clock/custom-elements.json +8 -4
  30. package/lib/clock/custom-elements.md +28 -0
  31. package/lib/clock/index.d.ts +2 -0
  32. package/lib/clock/index.js +2 -0
  33. package/lib/clock/themes/halo/dark/index.js +1 -1
  34. package/lib/clock/themes/halo/light/index.js +1 -1
  35. package/lib/clock/themes/solar/charcoal/index.js +1 -1
  36. package/lib/clock/themes/solar/pearl/index.js +1 -1
  37. package/lib/collapse/custom-elements.md +27 -0
  38. package/lib/color-dialog/custom-elements.json +29 -16
  39. package/lib/color-dialog/custom-elements.md +39 -0
  40. package/lib/color-dialog/index.d.ts +8 -8
  41. package/lib/color-dialog/index.js +8 -8
  42. package/lib/combo-box/custom-elements.json +28 -16
  43. package/lib/combo-box/custom-elements.md +35 -0
  44. package/lib/combo-box/index.d.ts +10 -2
  45. package/lib/combo-box/index.js +10 -1
  46. package/lib/combo-box/themes/halo/dark/index.js +1 -1
  47. package/lib/combo-box/themes/halo/light/index.js +1 -1
  48. package/lib/combo-box/themes/solar/charcoal/index.js +1 -1
  49. package/lib/combo-box/themes/solar/pearl/index.js +1 -1
  50. package/lib/counter/custom-elements.json +8 -4
  51. package/lib/counter/custom-elements.md +11 -0
  52. package/lib/counter/index.d.ts +2 -0
  53. package/lib/counter/index.js +2 -0
  54. package/lib/datetime-picker/custom-elements.json +52 -23
  55. package/lib/datetime-picker/custom-elements.md +57 -0
  56. package/lib/datetime-picker/index.d.ts +15 -4
  57. package/lib/datetime-picker/index.js +15 -4
  58. package/lib/dialog/custom-elements.json +34 -12
  59. package/lib/dialog/custom-elements.md +47 -0
  60. package/lib/dialog/index.d.ts +7 -10
  61. package/lib/dialog/index.js +7 -10
  62. package/lib/email-field/custom-elements.json +81 -94
  63. package/lib/email-field/custom-elements.md +37 -0
  64. package/lib/email-field/index.d.ts +43 -115
  65. package/lib/email-field/index.js +44 -244
  66. package/lib/flag/custom-elements.md +10 -0
  67. package/lib/flag/index.d.ts +2 -0
  68. package/lib/flag/index.js +2 -0
  69. package/lib/header/custom-elements.md +18 -0
  70. package/lib/heatmap/custom-elements.md +26 -0
  71. package/lib/icon/custom-elements.md +8 -0
  72. package/lib/icon/index.d.ts +2 -0
  73. package/lib/icon/index.js +2 -0
  74. package/lib/interactive-chart/custom-elements.json +6 -10
  75. package/lib/interactive-chart/custom-elements.md +31 -0
  76. package/lib/interactive-chart/index.d.ts +5 -2
  77. package/lib/interactive-chart/index.js +5 -2
  78. package/lib/item/custom-elements.json +4 -4
  79. package/lib/item/custom-elements.md +29 -0
  80. package/lib/item/index.d.ts +11 -2
  81. package/lib/item/index.js +25 -4
  82. package/lib/label/custom-elements.md +11 -0
  83. package/lib/layout/custom-elements.md +26 -0
  84. package/lib/led-gauge/custom-elements.json +4 -4
  85. package/lib/led-gauge/custom-elements.md +17 -0
  86. package/lib/led-gauge/index.d.ts +1 -0
  87. package/lib/led-gauge/index.js +1 -0
  88. package/lib/list/custom-elements.json +18 -5
  89. package/lib/list/custom-elements.md +32 -0
  90. package/lib/list/helpers/list-renderer.js +2 -0
  91. package/lib/list/index.d.ts +19 -2
  92. package/lib/list/index.js +34 -1
  93. package/lib/loader/custom-elements.md +5 -0
  94. package/lib/multi-input/custom-elements.json +7 -6
  95. package/lib/multi-input/custom-elements.md +43 -0
  96. package/lib/multi-input/index.d.ts +4 -0
  97. package/lib/multi-input/index.js +4 -0
  98. package/lib/notification/custom-elements.md +26 -0
  99. package/lib/number-field/custom-elements.json +99 -54
  100. package/lib/number-field/custom-elements.md +42 -0
  101. package/lib/number-field/index.d.ts +92 -47
  102. package/lib/number-field/index.js +113 -80
  103. package/lib/overlay/custom-elements.json +26 -13
  104. package/lib/overlay/custom-elements.md +54 -0
  105. package/lib/overlay/elements/overlay.d.ts +5 -0
  106. package/lib/overlay-menu/custom-elements.json +70 -20
  107. package/lib/overlay-menu/custom-elements.md +44 -0
  108. package/lib/overlay-menu/index.d.ts +13 -11
  109. package/lib/overlay-menu/index.js +13 -11
  110. package/lib/pagination/custom-elements.md +27 -0
  111. package/lib/panel/custom-elements.md +11 -0
  112. package/lib/password-field/custom-elements.json +62 -67
  113. package/lib/password-field/custom-elements.md +39 -0
  114. package/lib/password-field/index.d.ts +42 -94
  115. package/lib/password-field/index.js +48 -194
  116. package/lib/pill/custom-elements.json +8 -6
  117. package/lib/pill/custom-elements.md +22 -0
  118. package/lib/pill/index.d.ts +1 -1
  119. package/lib/pill/index.js +1 -1
  120. package/lib/progress-bar/custom-elements.md +18 -0
  121. package/lib/radio-button/custom-elements.json +8 -6
  122. package/lib/radio-button/custom-elements.md +19 -0
  123. package/lib/radio-button/index.d.ts +6 -5
  124. package/lib/radio-button/index.js +5 -4
  125. package/lib/rating/custom-elements.md +17 -0
  126. package/lib/search-field/custom-elements.json +70 -74
  127. package/lib/search-field/custom-elements.md +41 -0
  128. package/lib/search-field/index.d.ts +43 -100
  129. package/lib/search-field/index.js +46 -215
  130. package/lib/select/custom-elements.json +5 -4
  131. package/lib/select/custom-elements.md +24 -0
  132. package/lib/select/index.d.ts +11 -3
  133. package/lib/select/index.js +65 -26
  134. package/lib/sidebar-layout/custom-elements.json +2 -6
  135. package/lib/sidebar-layout/custom-elements.md +21 -0
  136. package/lib/sidebar-layout/index.d.ts +2 -1
  137. package/lib/slider/custom-elements.json +4 -4
  138. package/lib/slider/custom-elements.md +28 -0
  139. package/lib/slider/index.d.ts +1 -1
  140. package/lib/slider/index.js +1 -1
  141. package/lib/sparkline/custom-elements.json +4 -4
  142. package/lib/sparkline/custom-elements.md +16 -0
  143. package/lib/sparkline/index.d.ts +3 -1
  144. package/lib/sparkline/index.js +2 -0
  145. package/lib/swing-gauge/custom-elements.json +5 -3
  146. package/lib/swing-gauge/custom-elements.md +17 -0
  147. package/lib/swing-gauge/index.d.ts +3 -1
  148. package/lib/swing-gauge/index.js +3 -1
  149. package/lib/tab/custom-elements.json +2 -2
  150. package/lib/tab/custom-elements.md +22 -0
  151. package/lib/tab-bar/custom-elements.md +11 -0
  152. package/lib/text-field/custom-elements.json +78 -89
  153. package/lib/text-field/custom-elements.md +35 -0
  154. package/lib/text-field/index.d.ts +50 -92
  155. package/lib/text-field/index.js +81 -230
  156. package/lib/time-picker/custom-elements.json +4 -4
  157. package/lib/time-picker/custom-elements.md +28 -0
  158. package/lib/time-picker/index.d.ts +3 -0
  159. package/lib/time-picker/index.js +3 -0
  160. package/lib/toggle/custom-elements.json +8 -6
  161. package/lib/toggle/custom-elements.md +19 -0
  162. package/lib/toggle/index.d.ts +2 -1
  163. package/lib/toggle/index.js +1 -0
  164. package/lib/tooltip/custom-elements.md +14 -0
  165. package/lib/tornado-chart/custom-elements.md +18 -0
  166. package/lib/tree/custom-elements.json +4 -3
  167. package/lib/tree/custom-elements.md +32 -0
  168. package/lib/tree/elements/tree.d.ts +1 -0
  169. package/lib/tree/elements/tree.js +1 -0
  170. package/lib/tree/managers/tree-manager.d.ts +20 -2
  171. package/lib/tree/managers/tree-manager.js +55 -28
  172. package/lib/tree/themes/halo/dark/index.js +1 -1
  173. package/lib/tree/themes/halo/light/index.js +1 -1
  174. package/lib/tree/themes/solar/charcoal/index.js +1 -1
  175. package/lib/tree/themes/solar/pearl/index.js +1 -1
  176. package/lib/tree-select/custom-elements.json +10 -6
  177. package/lib/tree-select/custom-elements.md +26 -0
  178. package/lib/tree-select/index.d.ts +5 -3
  179. package/lib/tree-select/index.js +3 -2
  180. package/lib/tree-select/themes/halo/dark/index.js +1 -1
  181. package/lib/tree-select/themes/halo/light/index.js +1 -1
  182. package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
  183. package/lib/tree-select/themes/solar/pearl/index.js +1 -1
  184. package/lib/version.js +1 -1
  185. 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} [value=] - Value of the radio button
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} [name=] - Group multiple radio buttons by assigning the same name
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 = "radio";
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} [value=] - Value of the radio button
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} [name=] - Group multiple radio buttons by assigning the same name
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": "pattern",
10
- "description": "Set regular expression for input validation",
11
- "type": "string",
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 to error",
16
+ "description": "Set error state",
23
17
  "type": "boolean",
24
18
  "default": "false"
25
19
  },
26
20
  {
27
- "name": "warning",
28
- "description": "Set state to warning",
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": "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.",
35
- "type": "boolean",
36
- "default": "false"
27
+ "name": "placeholder",
28
+ "description": "Set placeholder text",
29
+ "type": "string",
30
+ "default": "\"\""
37
31
  },
38
32
  {
39
- "name": "maxlength",
40
- "description": "Set character max limit",
41
- "type": "number | null"
33
+ "name": "readonly",
34
+ "description": "Set readonly state",
35
+ "type": "boolean",
36
+ "default": "false"
42
37
  },
43
38
  {
44
- "name": "minlength",
45
- "description": "Set character min limit",
46
- "type": "number | null"
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": "icon-has-action",
50
- "description": "Specify when icon need to be clickable",
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": "readonly",
62
- "description": "Set readonly state",
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": "disabled",
68
- "description": "Set disabled state",
69
- "type": "boolean",
70
- "default": "\"false\""
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": "pattern",
76
- "attribute": "pattern",
77
- "description": "Set regular expression for input validation",
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": "warning",
97
- "attribute": "warning",
98
- "description": "Set state to warning",
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": "transparent",
104
- "attribute": "transparent",
105
- "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.",
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": "iconHasAction",
123
- "attribute": "icon-has-action",
124
- "description": "Specify when icon need to be clickable",
125
- "type": "boolean",
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": "value",
130
- "attribute": "value",
131
- "description": "Input's value",
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": "\"false\""
122
+ "default": "false"
141
123
  },
142
124
  {
143
- "name": "disabled",
144
- "attribute": "disabled",
145
- "description": "Set disabled state",
125
+ "name": "transparent",
126
+ "attribute": "transparent",
127
+ "description": "Disables all other states and border/background styles.",
146
128
  "type": "boolean",
147
- "default": "\"false\""
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 only when element has icon-has-action attribute and icon is clicked"
157
+ "description": "Dispatched when icon is clicked"
162
158
  }
163
159
  ],
164
160
  "methods": [
165
161
  {
166
- "name": "select",
167
- "description": "Select the contents of input",
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 { ControlElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
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 {string} value - Input's value
11
- * @prop {string} [value=] - Input's value
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} disabled - Set disabled state
17
- * @prop {boolean} [disabled=false] - Set disabled state
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 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 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
- * 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.
49
+ * Used for translations
52
50
  */
53
- transparent: boolean;
51
+ protected t: Translate;
54
52
  /**
55
- * Set character max limit
56
- */
57
- maxLength: number | null;
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
- private handleKeyDown;
57
+ protected get decorateInputMap(): TemplateMap;
115
58
  /**
116
- * Fire event on icon click
59
+ * Renders icon element
117
60
  * @returns {void}
118
61
  */
119
- private notifyIcon;
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.ControlHTMLAttributes<SearchField>;
72
+ 'ef-search-field': Partial<SearchField> | JSXInterface.HTMLAttributes<SearchField>;
130
73
  }
131
74
  }
132
75
  }