@vaadin/custom-field 25.0.0-alpha10 → 25.0.0-alpha12
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 +19 -22
- package/src/vaadin-custom-field.js +1 -1
- package/vaadin-custom-field.js +1 -1
- package/web-types.json +3 -3
- package/web-types.lit.json +2 -2
- package/src/styles/vaadin-custom-field-core-styles.d.ts +0 -8
- package/src/styles/vaadin-custom-field-core-styles.js +0 -34
- package/theme/lumo/vaadin-custom-field-styles.d.ts +0 -11
- package/theme/lumo/vaadin-custom-field-styles.js +0 -97
- package/theme/lumo/vaadin-custom-field.d.ts +0 -7
- package/theme/lumo/vaadin-custom-field.js +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/custom-field",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,9 +21,6 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"files": [
|
|
23
23
|
"src",
|
|
24
|
-
"!src/styles/*-base-styles.d.ts",
|
|
25
|
-
"!src/styles/*-base-styles.js",
|
|
26
|
-
"theme",
|
|
27
24
|
"vaadin-*.d.ts",
|
|
28
25
|
"vaadin-*.js",
|
|
29
26
|
"web-types.json",
|
|
@@ -37,32 +34,32 @@
|
|
|
37
34
|
],
|
|
38
35
|
"dependencies": {
|
|
39
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
41
|
-
"@vaadin/component-base": "25.0.0-
|
|
42
|
-
"@vaadin/field-base": "25.0.0-
|
|
43
|
-
"@vaadin/vaadin-
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha10",
|
|
37
|
+
"@vaadin/a11y-base": "25.0.0-alpha12",
|
|
38
|
+
"@vaadin/component-base": "25.0.0-alpha12",
|
|
39
|
+
"@vaadin/field-base": "25.0.0-alpha12",
|
|
40
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha12",
|
|
45
41
|
"lit": "^3.0.0"
|
|
46
42
|
},
|
|
47
43
|
"devDependencies": {
|
|
48
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
49
|
-
"@vaadin/combo-box": "25.0.0-
|
|
50
|
-
"@vaadin/date-picker": "25.0.0-
|
|
51
|
-
"@vaadin/email-field": "25.0.0-
|
|
52
|
-
"@vaadin/form-layout": "25.0.0-
|
|
53
|
-
"@vaadin/number-field": "25.0.0-
|
|
54
|
-
"@vaadin/password-field": "25.0.0-
|
|
55
|
-
"@vaadin/select": "25.0.0-
|
|
56
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
44
|
+
"@vaadin/chai-plugins": "25.0.0-alpha12",
|
|
45
|
+
"@vaadin/combo-box": "25.0.0-alpha12",
|
|
46
|
+
"@vaadin/date-picker": "25.0.0-alpha12",
|
|
47
|
+
"@vaadin/email-field": "25.0.0-alpha12",
|
|
48
|
+
"@vaadin/form-layout": "25.0.0-alpha12",
|
|
49
|
+
"@vaadin/number-field": "25.0.0-alpha12",
|
|
50
|
+
"@vaadin/password-field": "25.0.0-alpha12",
|
|
51
|
+
"@vaadin/select": "25.0.0-alpha12",
|
|
52
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha12",
|
|
57
53
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
58
|
-
"@vaadin/text-area": "25.0.0-
|
|
59
|
-
"@vaadin/text-field": "25.0.0-
|
|
60
|
-
"@vaadin/time-picker": "25.0.0-
|
|
54
|
+
"@vaadin/text-area": "25.0.0-alpha12",
|
|
55
|
+
"@vaadin/text-field": "25.0.0-alpha12",
|
|
56
|
+
"@vaadin/time-picker": "25.0.0-alpha12",
|
|
57
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha12",
|
|
61
58
|
"sinon": "^18.0.0"
|
|
62
59
|
},
|
|
63
60
|
"web-types": [
|
|
64
61
|
"web-types.json",
|
|
65
62
|
"web-types.lit.json"
|
|
66
63
|
],
|
|
67
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "e75527348f9ba7c363d068c868b9f030c15b84a1"
|
|
68
65
|
}
|
|
@@ -9,7 +9,7 @@ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
|
9
9
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
10
10
|
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
11
11
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
12
|
-
import { customFieldStyles } from './styles/vaadin-custom-field-
|
|
12
|
+
import { customFieldStyles } from './styles/vaadin-custom-field-base-styles.js';
|
|
13
13
|
import { CustomFieldMixin } from './vaadin-custom-field-mixin.js';
|
|
14
14
|
|
|
15
15
|
/**
|
package/vaadin-custom-field.js
CHANGED
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/custom-field",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha12",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
"name": "value",
|
|
114
|
-
"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/25.0.0-
|
|
114
|
+
"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/25.0.0-alpha12/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha12/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
|
|
115
115
|
"value": {
|
|
116
116
|
"type": [
|
|
117
117
|
"string",
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
},
|
|
236
236
|
{
|
|
237
237
|
"name": "value",
|
|
238
|
-
"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/25.0.0-
|
|
238
|
+
"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/25.0.0-alpha12/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha12/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
|
|
239
239
|
"value": {
|
|
240
240
|
"type": [
|
|
241
241
|
"string",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/custom-field",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha12",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
"name": ".value",
|
|
87
|
-
"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/25.0.0-
|
|
87
|
+
"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/25.0.0-alpha12/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha12/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
|
|
88
88
|
"value": {
|
|
89
89
|
"kind": "expression"
|
|
90
90
|
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2019 - 2025 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
|
-
export const customFieldStyles = css`
|
|
9
|
-
:host {
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host::before {
|
|
14
|
-
content: '\\2003';
|
|
15
|
-
width: 0;
|
|
16
|
-
display: inline-block;
|
|
17
|
-
/* Size and position this element on the same vertical position as the input-field element
|
|
18
|
-
to make vertical align for the host element work as expected */
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
:host([hidden]) {
|
|
22
|
-
display: none !important;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.vaadin-custom-field-container {
|
|
26
|
-
width: 100%;
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.inputs-wrapper {
|
|
32
|
-
flex: none;
|
|
33
|
-
}
|
|
34
|
-
`;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2019 - 2025 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,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2019 - 2025 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
|
-
import { helper } from '@vaadin/vaadin-lumo-styles/mixins/helper.js';
|
|
11
|
-
import { requiredField } from '@vaadin/vaadin-lumo-styles/mixins/required-field.js';
|
|
12
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
|
-
|
|
14
|
-
const customField = css`
|
|
15
|
-
:host {
|
|
16
|
-
--lumo-text-field-size: var(--lumo-size-m);
|
|
17
|
-
color: var(--lumo-body-text-color);
|
|
18
|
-
font-size: var(--lumo-font-size-m);
|
|
19
|
-
/* align with text-field height + vertical paddings */
|
|
20
|
-
line-height: calc(var(--lumo-text-field-size) + 2 * var(--lumo-space-xs));
|
|
21
|
-
font-family: var(--lumo-font-family);
|
|
22
|
-
-webkit-font-smoothing: antialiased;
|
|
23
|
-
-moz-osx-font-smoothing: grayscale;
|
|
24
|
-
-webkit-tap-highlight-color: transparent;
|
|
25
|
-
padding: 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:host::before {
|
|
29
|
-
margin-top: var(--lumo-space-xs);
|
|
30
|
-
height: var(--lumo-text-field-size);
|
|
31
|
-
box-sizing: border-box;
|
|
32
|
-
display: inline-flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* align with text-field label */
|
|
37
|
-
:host([has-label]) [part='label'] {
|
|
38
|
-
padding-bottom: calc(0.5em - var(--lumo-space-xs));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:host(:not([has-label])) [part='label'],
|
|
42
|
-
:host(:not([has-label]))::before {
|
|
43
|
-
display: none;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* align with text-field error message */
|
|
47
|
-
:host([has-error-message]) [part='error-message']::before {
|
|
48
|
-
height: calc(0.4em - var(--lumo-space-xs));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
:host([focused]:not([readonly]):not([disabled])) [part='label'] {
|
|
52
|
-
color: var(--lumo-primary-text-color);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
:host(:hover:not([readonly]):not([disabled]):not([focused])) [part='label'],
|
|
56
|
-
:host(:hover:not([readonly]):not([disabled]):not([focused])) [part='helper-text'] {
|
|
57
|
-
color: var(--lumo-body-text-color);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* Touch device adjustment */
|
|
61
|
-
@media (pointer: coarse) {
|
|
62
|
-
:host(:hover:not([readonly]):not([disabled]):not([focused])) [part='label'] {
|
|
63
|
-
color: var(--lumo-secondary-text-color);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* Disabled */
|
|
68
|
-
:host([disabled]) [part='label'] {
|
|
69
|
-
color: var(--lumo-disabled-text-color);
|
|
70
|
-
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* Small theme */
|
|
74
|
-
:host([theme~='small']) {
|
|
75
|
-
font-size: var(--lumo-font-size-s);
|
|
76
|
-
--lumo-text-field-size: var(--lumo-size-s);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
:host([theme~='small'][has-label]) [part='label'] {
|
|
80
|
-
font-size: var(--lumo-font-size-xs);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
:host([theme~='small'][has-label]) [part='error-message'] {
|
|
84
|
-
font-size: var(--lumo-font-size-xxs);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/* When custom-field is used with components without outer margin */
|
|
88
|
-
:host([theme~='whitespace'][has-label]) [part='label'] {
|
|
89
|
-
padding-bottom: 0.5em;
|
|
90
|
-
}
|
|
91
|
-
`;
|
|
92
|
-
|
|
93
|
-
registerStyles('vaadin-custom-field', [requiredField, helper, customField], {
|
|
94
|
-
moduleId: 'lumo-custom-field',
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
export { customField };
|