@vaadin/email-field 24.0.0-beta1 → 24.0.0-beta2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/email-field",
3
- "version": "24.0.0-beta1",
3
+ "version": "24.0.0-beta2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,6 +21,8 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
+ "!src/vaadin-lit-email-field.d.ts",
25
+ "!src/vaadin-lit-email-field.js",
24
26
  "theme",
25
27
  "vaadin-*.d.ts",
26
28
  "vaadin-*.js",
@@ -35,11 +37,12 @@
35
37
  ],
36
38
  "dependencies": {
37
39
  "@polymer/polymer": "^3.0.0",
38
- "@vaadin/component-base": "24.0.0-beta1",
39
- "@vaadin/text-field": "24.0.0-beta1",
40
- "@vaadin/vaadin-lumo-styles": "24.0.0-beta1",
41
- "@vaadin/vaadin-material-styles": "24.0.0-beta1",
42
- "@vaadin/vaadin-themable-mixin": "24.0.0-beta1"
40
+ "@vaadin/component-base": "24.0.0-beta2",
41
+ "@vaadin/text-field": "24.0.0-beta2",
42
+ "@vaadin/vaadin-lumo-styles": "24.0.0-beta2",
43
+ "@vaadin/vaadin-material-styles": "24.0.0-beta2",
44
+ "@vaadin/vaadin-themable-mixin": "24.0.0-beta2",
45
+ "lit": "^2.0.0"
43
46
  },
44
47
  "devDependencies": {
45
48
  "@esm-bundle/chai": "^4.3.4",
@@ -50,5 +53,5 @@
50
53
  "web-types.json",
51
54
  "web-types.lit.json"
52
55
  ],
53
- "gitHead": "c5b48921a62482746df8e46994b37e1490fec27e"
56
+ "gitHead": "00086f1f6d487f042f189c9b9ecd7ba736960888"
54
57
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import type { CSSResult } from 'lit';
7
+
8
+ export const emailFieldStyles: CSSResult;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import { css } from 'lit';
7
+
8
+ // See https://github.com/vaadin/vaadin-text-field/issues/466
9
+ export const emailFieldStyles = css`
10
+ :host([dir='rtl']) [part='input-field'] {
11
+ direction: ltr;
12
+ }
13
+
14
+ :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
15
+ direction: rtl;
16
+ text-align: left;
17
+ }
18
+ `;
@@ -4,23 +4,10 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { TextField } from '@vaadin/text-field/src/vaadin-text-field.js';
7
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
7
+ import { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
+ import { emailFieldStyles } from './vaadin-email-field-styles.js';
8
9
 
9
- // See https://github.com/vaadin/vaadin-text-field/issues/466
10
- registerStyles(
11
- 'vaadin-email-field',
12
- css`
13
- :host([dir='rtl']) [part='input-field'] {
14
- direction: ltr;
15
- }
16
-
17
- :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
18
- direction: rtl;
19
- text-align: left;
20
- }
21
- `,
22
- { moduleId: 'vaadin-email-field-styles' },
23
- );
10
+ registerStyles('vaadin-email-field', emailFieldStyles, { moduleId: 'vaadin-email-field-styles' });
24
11
 
25
12
  /**
26
13
  * `<vaadin-email-field>` is a Web Component for email field control in forms.
package/web-types.json CHANGED
@@ -1,29 +1,29 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/email-field",
4
- "version": "24.0.0-alpha12",
4
+ "version": "24.0.0-beta2",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-email-field",
11
- "description": "`<vaadin-email-field>` is a Web Component for email field control in forms.\n\n```html\n<vaadin-email-field label=\"Email\"></vaadin-email-field>\n```\n\n### Styling\n\n`<vaadin-email-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-text-field) for the styling documentation.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
11
+ "description": "`<vaadin-email-field>` is a Web Component for email field control in forms.\n\n```html\n<vaadin-email-field label=\"Email\"></vaadin-email-field>\n```\n\n### Styling\n\n`<vaadin-email-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-text-field) for the styling documentation.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
12
12
  "attributes": [
13
13
  {
14
- "name": "value",
15
- "description": "The value of the field.",
14
+ "name": "disabled",
15
+ "description": "If true, the user cannot interact with this element.",
16
16
  "value": {
17
17
  "type": [
18
- "string",
18
+ "boolean",
19
19
  "null",
20
20
  "undefined"
21
21
  ]
22
22
  }
23
23
  },
24
24
  {
25
- "name": "invalid",
26
- "description": "Set to true when the field is invalid.",
25
+ "name": "autofocus",
26
+ "description": "Specify that this control should have input focus when the page loads.",
27
27
  "value": {
28
28
  "type": [
29
29
  "boolean",
@@ -33,30 +33,30 @@
33
33
  }
34
34
  },
35
35
  {
36
- "name": "required",
37
- "description": "Specifies that the user must fill in a value.",
36
+ "name": "label",
37
+ "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
38
38
  "value": {
39
39
  "type": [
40
- "boolean",
40
+ "string",
41
41
  "null",
42
42
  "undefined"
43
43
  ]
44
44
  }
45
45
  },
46
46
  {
47
- "name": "pattern",
48
- "description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
47
+ "name": "invalid",
48
+ "description": "Set to true when the field is invalid.",
49
49
  "value": {
50
50
  "type": [
51
- "string",
51
+ "boolean",
52
52
  "null",
53
53
  "undefined"
54
54
  ]
55
55
  }
56
56
  },
57
57
  {
58
- "name": "disabled",
59
- "description": "If true, the user cannot interact with this element.",
58
+ "name": "required",
59
+ "description": "Specifies that the user must fill in a value.",
60
60
  "value": {
61
61
  "type": [
62
62
  "boolean",
@@ -66,19 +66,19 @@
66
66
  }
67
67
  },
68
68
  {
69
- "name": "autofocus",
70
- "description": "Specify that this control should have input focus when the page loads.",
69
+ "name": "error-message",
70
+ "description": "Error to show when the field is invalid.",
71
71
  "value": {
72
72
  "type": [
73
- "boolean",
73
+ "string",
74
74
  "null",
75
75
  "undefined"
76
76
  ]
77
77
  }
78
78
  },
79
79
  {
80
- "name": "label",
81
- "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
80
+ "name": "helper-text",
81
+ "description": "String used for the helper text.",
82
82
  "value": {
83
83
  "type": [
84
84
  "string",
@@ -88,8 +88,8 @@
88
88
  }
89
89
  },
90
90
  {
91
- "name": "error-message",
92
- "description": "Error to show when the field is invalid.",
91
+ "name": "value",
92
+ "description": "The value of the field.",
93
93
  "value": {
94
94
  "type": [
95
95
  "string",
@@ -99,11 +99,11 @@
99
99
  }
100
100
  },
101
101
  {
102
- "name": "helper-text",
103
- "description": "String used for the helper text.",
102
+ "name": "clear-button-visible",
103
+ "description": "Set to true to display the clear icon which clears the input.\n\nIt is up to the component to choose where to place the clear icon:\nin the Shadow DOM or in the light DOM. In any way, a reference to\nthe clear icon element should be provided via the `clearElement` getter.",
104
104
  "value": {
105
105
  "type": [
106
- "string",
106
+ "boolean",
107
107
  "null",
108
108
  "undefined"
109
109
  ]
@@ -131,17 +131,6 @@
131
131
  ]
132
132
  }
133
133
  },
134
- {
135
- "name": "clear-button-visible",
136
- "description": "Set to true to display the clear icon which clears the input.",
137
- "value": {
138
- "type": [
139
- "boolean",
140
- "null",
141
- "undefined"
142
- ]
143
- }
144
- },
145
134
  {
146
135
  "name": "name",
147
136
  "description": "The name of this field.",
@@ -241,6 +230,17 @@
241
230
  ]
242
231
  }
243
232
  },
233
+ {
234
+ "name": "pattern",
235
+ "description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
236
+ "value": {
237
+ "type": [
238
+ "string",
239
+ "null",
240
+ "undefined"
241
+ ]
242
+ }
243
+ },
244
244
  {
245
245
  "name": "theme",
246
246
  "description": "The theme variants to apply to the component.",
@@ -256,19 +256,19 @@
256
256
  "js": {
257
257
  "properties": [
258
258
  {
259
- "name": "value",
260
- "description": "The value of the field.",
259
+ "name": "disabled",
260
+ "description": "If true, the user cannot interact with this element.",
261
261
  "value": {
262
262
  "type": [
263
- "string",
263
+ "boolean",
264
264
  "null",
265
265
  "undefined"
266
266
  ]
267
267
  }
268
268
  },
269
269
  {
270
- "name": "invalid",
271
- "description": "Set to true when the field is invalid.",
270
+ "name": "autofocus",
271
+ "description": "Specify that this control should have input focus when the page loads.",
272
272
  "value": {
273
273
  "type": [
274
274
  "boolean",
@@ -278,30 +278,30 @@
278
278
  }
279
279
  },
280
280
  {
281
- "name": "required",
282
- "description": "Specifies that the user must fill in a value.",
281
+ "name": "label",
282
+ "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
283
283
  "value": {
284
284
  "type": [
285
- "boolean",
285
+ "string",
286
286
  "null",
287
287
  "undefined"
288
288
  ]
289
289
  }
290
290
  },
291
291
  {
292
- "name": "pattern",
293
- "description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
292
+ "name": "invalid",
293
+ "description": "Set to true when the field is invalid.",
294
294
  "value": {
295
295
  "type": [
296
- "string",
296
+ "boolean",
297
297
  "null",
298
298
  "undefined"
299
299
  ]
300
300
  }
301
301
  },
302
302
  {
303
- "name": "disabled",
304
- "description": "If true, the user cannot interact with this element.",
303
+ "name": "required",
304
+ "description": "Specifies that the user must fill in a value.",
305
305
  "value": {
306
306
  "type": [
307
307
  "boolean",
@@ -311,19 +311,19 @@
311
311
  }
312
312
  },
313
313
  {
314
- "name": "autofocus",
315
- "description": "Specify that this control should have input focus when the page loads.",
314
+ "name": "errorMessage",
315
+ "description": "Error to show when the field is invalid.",
316
316
  "value": {
317
317
  "type": [
318
- "boolean",
318
+ "string",
319
319
  "null",
320
320
  "undefined"
321
321
  ]
322
322
  }
323
323
  },
324
324
  {
325
- "name": "label",
326
- "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
325
+ "name": "helperText",
326
+ "description": "String used for the helper text.",
327
327
  "value": {
328
328
  "type": [
329
329
  "string",
@@ -333,8 +333,8 @@
333
333
  }
334
334
  },
335
335
  {
336
- "name": "errorMessage",
337
- "description": "Error to show when the field is invalid.",
336
+ "name": "value",
337
+ "description": "The value of the field.",
338
338
  "value": {
339
339
  "type": [
340
340
  "string",
@@ -344,11 +344,11 @@
344
344
  }
345
345
  },
346
346
  {
347
- "name": "helperText",
348
- "description": "String used for the helper text.",
347
+ "name": "clearButtonVisible",
348
+ "description": "Set to true to display the clear icon which clears the input.\n\nIt is up to the component to choose where to place the clear icon:\nin the Shadow DOM or in the light DOM. In any way, a reference to\nthe clear icon element should be provided via the `clearElement` getter.",
349
349
  "value": {
350
350
  "type": [
351
- "string",
351
+ "boolean",
352
352
  "null",
353
353
  "undefined"
354
354
  ]
@@ -376,17 +376,6 @@
376
376
  ]
377
377
  }
378
378
  },
379
- {
380
- "name": "clearButtonVisible",
381
- "description": "Set to true to display the clear icon which clears the input.",
382
- "value": {
383
- "type": [
384
- "boolean",
385
- "null",
386
- "undefined"
387
- ]
388
- }
389
- },
390
379
  {
391
380
  "name": "name",
392
381
  "description": "The name of this field.",
@@ -485,6 +474,17 @@
485
474
  "undefined"
486
475
  ]
487
476
  }
477
+ },
478
+ {
479
+ "name": "pattern",
480
+ "description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
481
+ "value": {
482
+ "type": [
483
+ "string",
484
+ "null",
485
+ "undefined"
486
+ ]
487
+ }
488
488
  }
489
489
  ],
490
490
  "events": [
@@ -500,13 +500,13 @@
500
500
  "name": "input",
501
501
  "description": "Fired when the value is changed by the user: on every typing keystroke,\nand the value is cleared using the clear button."
502
502
  },
503
- {
504
- "name": "value-changed",
505
- "description": "Fired when the `value` property changes."
506
- },
507
503
  {
508
504
  "name": "invalid-changed",
509
505
  "description": "Fired when the `invalid` property changes."
506
+ },
507
+ {
508
+ "name": "value-changed",
509
+ "description": "Fired when the `value` property changes."
510
510
  }
511
511
  ]
512
512
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/email-field",
4
- "version": "24.0.0-alpha12",
4
+ "version": "24.0.0-beta2",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,23 +16,9 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-email-field",
19
- "description": "`<vaadin-email-field>` is a Web Component for email field control in forms.\n\n```html\n<vaadin-email-field label=\"Email\"></vaadin-email-field>\n```\n\n### Styling\n\n`<vaadin-email-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-text-field) for the styling documentation.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
19
+ "description": "`<vaadin-email-field>` is a Web Component for email field control in forms.\n\n```html\n<vaadin-email-field label=\"Email\"></vaadin-email-field>\n```\n\n### Styling\n\n`<vaadin-email-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-text-field) for the styling documentation.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
- {
23
- "name": "?invalid",
24
- "description": "Set to true when the field is invalid.",
25
- "value": {
26
- "kind": "expression"
27
- }
28
- },
29
- {
30
- "name": "?required",
31
- "description": "Specifies that the user must fill in a value.",
32
- "value": {
33
- "kind": "expression"
34
- }
35
- },
36
22
  {
37
23
  "name": "?disabled",
38
24
  "description": "If true, the user cannot interact with this element.",
@@ -48,36 +34,36 @@
48
34
  }
49
35
  },
50
36
  {
51
- "name": "?autoselect",
52
- "description": "If true, the input text gets fully selected when the field is focused using click or touch / tap.",
37
+ "name": "?invalid",
38
+ "description": "Set to true when the field is invalid.",
53
39
  "value": {
54
40
  "kind": "expression"
55
41
  }
56
42
  },
57
43
  {
58
- "name": "?clearButtonVisible",
59
- "description": "Set to true to display the clear icon which clears the input.",
44
+ "name": "?required",
45
+ "description": "Specifies that the user must fill in a value.",
60
46
  "value": {
61
47
  "kind": "expression"
62
48
  }
63
49
  },
64
50
  {
65
- "name": "?readonly",
66
- "description": "When present, it specifies that the field is read-only.",
51
+ "name": "?clearButtonVisible",
52
+ "description": "Set to true to display the clear icon which clears the input.\n\nIt is up to the component to choose where to place the clear icon:\nin the Shadow DOM or in the light DOM. In any way, a reference to\nthe clear icon element should be provided via the `clearElement` getter.",
67
53
  "value": {
68
54
  "kind": "expression"
69
55
  }
70
56
  },
71
57
  {
72
- "name": ".value",
73
- "description": "The value of the field.",
58
+ "name": "?autoselect",
59
+ "description": "If true, the input text gets fully selected when the field is focused using click or touch / tap.",
74
60
  "value": {
75
61
  "kind": "expression"
76
62
  }
77
63
  },
78
64
  {
79
- "name": ".pattern",
80
- "description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
65
+ "name": "?readonly",
66
+ "description": "When present, it specifies that the field is read-only.",
81
67
  "value": {
82
68
  "kind": "expression"
83
69
  }
@@ -103,6 +89,13 @@
103
89
  "kind": "expression"
104
90
  }
105
91
  },
92
+ {
93
+ "name": ".value",
94
+ "description": "The value of the field.",
95
+ "value": {
96
+ "kind": "expression"
97
+ }
98
+ },
106
99
  {
107
100
  "name": ".allowedCharPattern",
108
101
  "description": "A pattern matched against individual characters the user inputs.\n\nWhen set, the field will prevent:\n- `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`\n- `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`\n- `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`\n\nFor example, to allow entering only numbers and minus signs, use:\n`allowedCharPattern = \"[\\\\d-]\"`",
@@ -166,6 +159,13 @@
166
159
  "kind": "expression"
167
160
  }
168
161
  },
162
+ {
163
+ "name": ".pattern",
164
+ "description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
165
+ "value": {
166
+ "kind": "expression"
167
+ }
168
+ },
169
169
  {
170
170
  "name": "@validated",
171
171
  "description": "Fired whenever the field is validated.",
@@ -188,15 +188,15 @@
188
188
  }
189
189
  },
190
190
  {
191
- "name": "@value-changed",
192
- "description": "Fired when the `value` property changes.",
191
+ "name": "@invalid-changed",
192
+ "description": "Fired when the `invalid` property changes.",
193
193
  "value": {
194
194
  "kind": "expression"
195
195
  }
196
196
  },
197
197
  {
198
- "name": "@invalid-changed",
199
- "description": "Fired when the `invalid` property changes.",
198
+ "name": "@value-changed",
199
+ "description": "Fired when the `value` property changes.",
200
200
  "value": {
201
201
  "kind": "expression"
202
202
  }