@vaadin/custom-field 24.4.0-alpha9 → 24.4.0-dev.4b20a0c55

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/README.md CHANGED
@@ -5,7 +5,6 @@ A web component for wrapping multiple components as a single field.
5
5
  [Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/custom-field)
6
6
 
7
7
  [![npm version](https://badgen.net/npm/v/@vaadin/custom-field)](https://www.npmjs.com/package/@vaadin/custom-field)
8
- [![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)
9
8
 
10
9
  ```html
11
10
  <vaadin-custom-field label="Enrollment period" helper-text="Cannot be longer than 30 days" required>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/custom-field",
3
- "version": "24.4.0-alpha9",
3
+ "version": "24.4.0-dev.4b20a0c55",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,32 +38,32 @@
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
40
  "@polymer/polymer": "^3.0.0",
41
- "@vaadin/a11y-base": "24.4.0-alpha9",
42
- "@vaadin/component-base": "24.4.0-alpha9",
43
- "@vaadin/field-base": "24.4.0-alpha9",
44
- "@vaadin/vaadin-lumo-styles": "24.4.0-alpha9",
45
- "@vaadin/vaadin-material-styles": "24.4.0-alpha9",
46
- "@vaadin/vaadin-themable-mixin": "24.4.0-alpha9",
41
+ "@vaadin/a11y-base": "24.4.0-dev.4b20a0c55",
42
+ "@vaadin/component-base": "24.4.0-dev.4b20a0c55",
43
+ "@vaadin/field-base": "24.4.0-dev.4b20a0c55",
44
+ "@vaadin/vaadin-lumo-styles": "24.4.0-dev.4b20a0c55",
45
+ "@vaadin/vaadin-material-styles": "24.4.0-dev.4b20a0c55",
46
+ "@vaadin/vaadin-themable-mixin": "24.4.0-dev.4b20a0c55",
47
47
  "lit": "^3.0.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@esm-bundle/chai": "^4.3.4",
51
- "@vaadin/combo-box": "24.4.0-alpha9",
52
- "@vaadin/date-picker": "24.4.0-alpha9",
53
- "@vaadin/email-field": "24.4.0-alpha9",
54
- "@vaadin/form-layout": "24.4.0-alpha9",
55
- "@vaadin/number-field": "24.4.0-alpha9",
56
- "@vaadin/password-field": "24.4.0-alpha9",
57
- "@vaadin/select": "24.4.0-alpha9",
51
+ "@vaadin/combo-box": "24.4.0-dev.4b20a0c55",
52
+ "@vaadin/date-picker": "24.4.0-dev.4b20a0c55",
53
+ "@vaadin/email-field": "24.4.0-dev.4b20a0c55",
54
+ "@vaadin/form-layout": "24.4.0-dev.4b20a0c55",
55
+ "@vaadin/number-field": "24.4.0-dev.4b20a0c55",
56
+ "@vaadin/password-field": "24.4.0-dev.4b20a0c55",
57
+ "@vaadin/select": "24.4.0-dev.4b20a0c55",
58
58
  "@vaadin/testing-helpers": "^0.6.0",
59
- "@vaadin/text-area": "24.4.0-alpha9",
60
- "@vaadin/text-field": "24.4.0-alpha9",
61
- "@vaadin/time-picker": "24.4.0-alpha9",
59
+ "@vaadin/text-area": "24.4.0-dev.4b20a0c55",
60
+ "@vaadin/text-field": "24.4.0-dev.4b20a0c55",
61
+ "@vaadin/time-picker": "24.4.0-dev.4b20a0c55",
62
62
  "sinon": "^13.0.2"
63
63
  },
64
64
  "web-types": [
65
65
  "web-types.json",
66
66
  "web-types.lit.json"
67
67
  ],
68
- "gitHead": "effb81abe3c6283a6ec620cc0cee56069af58226"
68
+ "gitHead": "b79c81e5f6fd24684b34ee0dc434e94d943ea13e"
69
69
  }
@@ -1,11 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2019 - 2024 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import '@vaadin/vaadin-lumo-styles/color.js';
7
- import '@vaadin/vaadin-lumo-styles/sizing.js';
8
- import '@vaadin/vaadin-lumo-styles/spacing.js';
9
- import '@vaadin/vaadin-lumo-styles/typography.js';
10
- declare const customField: import("lit").CSSResult;
11
- export { customField };
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2019 - 2024 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import './vaadin-custom-field-styles.js';
7
- import '../../src/vaadin-custom-field.js';
@@ -1,9 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2019 - 2024 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import '@vaadin/vaadin-material-styles/color.js';
7
- import '@vaadin/vaadin-material-styles/typography.js';
8
- declare const customField: import("lit").CSSResult;
9
- export { customField };
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2019 - 2024 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import './vaadin-custom-field-styles.js';
7
- import '../../src/vaadin-custom-field.js';
package/web-types.json DELETED
@@ -1,269 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/web-types",
3
- "name": "@vaadin/custom-field",
4
- "version": "24.4.0-alpha9",
5
- "description-markup": "markdown",
6
- "contributions": {
7
- "html": {
8
- "elements": [
9
- {
10
- "name": "vaadin-custom-field",
11
- "description": "`<vaadin-custom-field>` is a web component for wrapping multiple components as a single field.\n\n```\n<vaadin-custom-field label=\"Appointment time\">\n <vaadin-date-picker></vaadin-date-picker>\n <vaadin-time-picker></vaadin-time-picker>\n</vaadin-custom-field>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n`input-fields` | The slotted input elements wrapper\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`invalid` | Set when the element is invalid | :host\n`focused` | Set when the element is focused | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\nYou may also manually set `disabled` or `readonly` attribute on this component to make the label\npart look visually the same as on a `<vaadin-text-field>` when it is disabled or readonly.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
- "attributes": [
13
- {
14
- "name": "label",
15
- "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
16
- "value": {
17
- "type": [
18
- "string",
19
- "null",
20
- "undefined"
21
- ]
22
- }
23
- },
24
- {
25
- "name": "invalid",
26
- "description": "Set to true when the field is invalid.",
27
- "value": {
28
- "type": [
29
- "boolean",
30
- "null",
31
- "undefined"
32
- ]
33
- }
34
- },
35
- {
36
- "name": "required",
37
- "description": "Specifies that the user must fill in a value.",
38
- "value": {
39
- "type": [
40
- "boolean",
41
- "null",
42
- "undefined"
43
- ]
44
- }
45
- },
46
- {
47
- "name": "error-message",
48
- "description": "Error to show when the field is invalid.",
49
- "value": {
50
- "type": [
51
- "string",
52
- "null",
53
- "undefined"
54
- ]
55
- }
56
- },
57
- {
58
- "name": "helper-text",
59
- "description": "String used for the helper text.",
60
- "value": {
61
- "type": [
62
- "string",
63
- "null",
64
- "undefined"
65
- ]
66
- }
67
- },
68
- {
69
- "name": "accessible-name",
70
- "description": "String used to label the component to screen reader users.",
71
- "value": {
72
- "type": [
73
- "string",
74
- "null",
75
- "undefined"
76
- ]
77
- }
78
- },
79
- {
80
- "name": "accessible-name-ref",
81
- "description": "Id of the element used as label of the component to screen reader users.",
82
- "value": {
83
- "type": [
84
- "string",
85
- "null",
86
- "undefined"
87
- ]
88
- }
89
- },
90
- {
91
- "name": "name",
92
- "description": "The name of the control, which is submitted with the form data.",
93
- "value": {
94
- "type": [
95
- "string",
96
- "null",
97
- "undefined"
98
- ]
99
- }
100
- },
101
- {
102
- "name": "value",
103
- "description": "The value of the field. When wrapping several inputs, it will contain `\\t`\n(Tab character) as a delimiter indicating parts intended to be used as the\ncorresponding inputs values.\nUse the [`formatValue`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-alpha9/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-alpha9/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
104
- "value": {
105
- "type": [
106
- "string",
107
- "null",
108
- "undefined"
109
- ]
110
- }
111
- },
112
- {
113
- "name": "theme",
114
- "description": "The theme variants to apply to the component.",
115
- "value": {
116
- "type": [
117
- "string",
118
- "null",
119
- "undefined"
120
- ]
121
- }
122
- }
123
- ],
124
- "js": {
125
- "properties": [
126
- {
127
- "name": "label",
128
- "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
129
- "value": {
130
- "type": [
131
- "string",
132
- "null",
133
- "undefined"
134
- ]
135
- }
136
- },
137
- {
138
- "name": "invalid",
139
- "description": "Set to true when the field is invalid.",
140
- "value": {
141
- "type": [
142
- "boolean",
143
- "null",
144
- "undefined"
145
- ]
146
- }
147
- },
148
- {
149
- "name": "required",
150
- "description": "Specifies that the user must fill in a value.",
151
- "value": {
152
- "type": [
153
- "boolean",
154
- "null",
155
- "undefined"
156
- ]
157
- }
158
- },
159
- {
160
- "name": "errorMessage",
161
- "description": "Error to show when the field is invalid.",
162
- "value": {
163
- "type": [
164
- "string",
165
- "null",
166
- "undefined"
167
- ]
168
- }
169
- },
170
- {
171
- "name": "helperText",
172
- "description": "String used for the helper text.",
173
- "value": {
174
- "type": [
175
- "string",
176
- "null",
177
- "undefined"
178
- ]
179
- }
180
- },
181
- {
182
- "name": "accessibleName",
183
- "description": "String used to label the component to screen reader users.",
184
- "value": {
185
- "type": [
186
- "string",
187
- "null",
188
- "undefined"
189
- ]
190
- }
191
- },
192
- {
193
- "name": "accessibleNameRef",
194
- "description": "Id of the element used as label of the component to screen reader users.",
195
- "value": {
196
- "type": [
197
- "string",
198
- "null",
199
- "undefined"
200
- ]
201
- }
202
- },
203
- {
204
- "name": "name",
205
- "description": "The name of the control, which is submitted with the form data.",
206
- "value": {
207
- "type": [
208
- "string",
209
- "null",
210
- "undefined"
211
- ]
212
- }
213
- },
214
- {
215
- "name": "value",
216
- "description": "The value of the field. When wrapping several inputs, it will contain `\\t`\n(Tab character) as a delimiter indicating parts intended to be used as the\ncorresponding inputs values.\nUse the [`formatValue`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-alpha9/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-alpha9/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
217
- "value": {
218
- "type": [
219
- "string",
220
- "null",
221
- "undefined"
222
- ]
223
- }
224
- },
225
- {
226
- "name": "formatValue",
227
- "description": "A function to format the values of the individual fields contained by\nthe custom field into a single component value. The function receives\nan array of all values of the individual fields in the order of their\npresence in the DOM, and must return a single component value.\nThis function is called each time a value of an internal field is\nchanged.\n\nExample:\n```js\ncustomField.formatValue = (fieldValues) => {\n return fieldValues.join(\"-\");\n}\n```",
228
- "value": {
229
- "type": [
230
- "CustomFieldFormatValueFn",
231
- "undefined"
232
- ]
233
- }
234
- },
235
- {
236
- "name": "parseValue",
237
- "description": "A function to parse the component value into values for the individual\nfields contained by the custom field. The function receives the\ncomponent value, and must return an array of values for the individual\nfields in the order of their presence in the DOM.\nThe function is called each time the value of the component changes.\n\nExample:\n```js\ncustomField.parseValue = (componentValue) => {\n return componentValue.split(\"-\");\n}\n```",
238
- "value": {
239
- "type": [
240
- "CustomFieldParseValueFn",
241
- "undefined"
242
- ]
243
- }
244
- }
245
- ],
246
- "events": [
247
- {
248
- "name": "validated",
249
- "description": "Fired whenever the field is validated."
250
- },
251
- {
252
- "name": "change",
253
- "description": "Fired when the user commits a value change for any of the internal inputs."
254
- },
255
- {
256
- "name": "invalid-changed",
257
- "description": "Fired when the `invalid` property changes."
258
- },
259
- {
260
- "name": "value-changed",
261
- "description": "Fired when the `value` property changes."
262
- }
263
- ]
264
- }
265
- }
266
- ]
267
- }
268
- }
269
- }
@@ -1,132 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/web-types",
3
- "name": "@vaadin/custom-field",
4
- "version": "24.4.0-alpha9",
5
- "description-markup": "markdown",
6
- "framework": "lit",
7
- "framework-config": {
8
- "enable-when": {
9
- "node-packages": [
10
- "lit"
11
- ]
12
- }
13
- },
14
- "contributions": {
15
- "html": {
16
- "elements": [
17
- {
18
- "name": "vaadin-custom-field",
19
- "description": "`<vaadin-custom-field>` is a web component for wrapping multiple components as a single field.\n\n```\n<vaadin-custom-field label=\"Appointment time\">\n <vaadin-date-picker></vaadin-date-picker>\n <vaadin-time-picker></vaadin-time-picker>\n</vaadin-custom-field>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n`input-fields` | The slotted input elements wrapper\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`invalid` | Set when the element is invalid | :host\n`focused` | Set when the element is focused | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\nYou may also manually set `disabled` or `readonly` attribute on this component to make the label\npart look visually the same as on a `<vaadin-text-field>` when it is disabled or readonly.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
- "extension": true,
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
- {
37
- "name": ".label",
38
- "description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
39
- "value": {
40
- "kind": "expression"
41
- }
42
- },
43
- {
44
- "name": ".errorMessage",
45
- "description": "Error to show when the field is invalid.",
46
- "value": {
47
- "kind": "expression"
48
- }
49
- },
50
- {
51
- "name": ".helperText",
52
- "description": "String used for the helper text.",
53
- "value": {
54
- "kind": "expression"
55
- }
56
- },
57
- {
58
- "name": ".accessibleName",
59
- "description": "String used to label the component to screen reader users.",
60
- "value": {
61
- "kind": "expression"
62
- }
63
- },
64
- {
65
- "name": ".accessibleNameRef",
66
- "description": "Id of the element used as label of the component to screen reader users.",
67
- "value": {
68
- "kind": "expression"
69
- }
70
- },
71
- {
72
- "name": ".name",
73
- "description": "The name of the control, which is submitted with the form data.",
74
- "value": {
75
- "kind": "expression"
76
- }
77
- },
78
- {
79
- "name": ".value",
80
- "description": "The value of the field. When wrapping several inputs, it will contain `\\t`\n(Tab character) as a delimiter indicating parts intended to be used as the\ncorresponding inputs values.\nUse the [`formatValue`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-alpha9/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-alpha9/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
81
- "value": {
82
- "kind": "expression"
83
- }
84
- },
85
- {
86
- "name": ".formatValue",
87
- "description": "A function to format the values of the individual fields contained by\nthe custom field into a single component value. The function receives\nan array of all values of the individual fields in the order of their\npresence in the DOM, and must return a single component value.\nThis function is called each time a value of an internal field is\nchanged.\n\nExample:\n```js\ncustomField.formatValue = (fieldValues) => {\n return fieldValues.join(\"-\");\n}\n```",
88
- "value": {
89
- "kind": "expression"
90
- }
91
- },
92
- {
93
- "name": ".parseValue",
94
- "description": "A function to parse the component value into values for the individual\nfields contained by the custom field. The function receives the\ncomponent value, and must return an array of values for the individual\nfields in the order of their presence in the DOM.\nThe function is called each time the value of the component changes.\n\nExample:\n```js\ncustomField.parseValue = (componentValue) => {\n return componentValue.split(\"-\");\n}\n```",
95
- "value": {
96
- "kind": "expression"
97
- }
98
- },
99
- {
100
- "name": "@validated",
101
- "description": "Fired whenever the field is validated.",
102
- "value": {
103
- "kind": "expression"
104
- }
105
- },
106
- {
107
- "name": "@change",
108
- "description": "Fired when the user commits a value change for any of the internal inputs.",
109
- "value": {
110
- "kind": "expression"
111
- }
112
- },
113
- {
114
- "name": "@invalid-changed",
115
- "description": "Fired when the `invalid` property changes.",
116
- "value": {
117
- "kind": "expression"
118
- }
119
- },
120
- {
121
- "name": "@value-changed",
122
- "description": "Fired when the `value` property changes.",
123
- "value": {
124
- "kind": "expression"
125
- }
126
- }
127
- ]
128
- }
129
- ]
130
- }
131
- }
132
- }