@vaadin/field-base 25.3.0-alpha2 → 25.3.0-alpha4
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/custom-elements.json
CHANGED
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"type": {
|
|
151
151
|
"text": "boolean"
|
|
152
152
|
},
|
|
153
|
-
"description": "Set to true to display the clear icon which clears the input.\
|
|
153
|
+
"description": "Set to true to display the clear icon which clears the input.\nThis also enables clearing the input when pressing Esc key.",
|
|
154
154
|
"attribute": "clear-button-visible"
|
|
155
155
|
},
|
|
156
156
|
{
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"type": {
|
|
175
175
|
"text": "boolean"
|
|
176
176
|
},
|
|
177
|
-
"description": "Set to true to display the clear icon which clears the input.\
|
|
177
|
+
"description": "Set to true to display the clear icon which clears the input.\nThis also enables clearing the input when pressing Esc key.",
|
|
178
178
|
"fieldName": "clearButtonVisible"
|
|
179
179
|
},
|
|
180
180
|
{
|
|
@@ -782,7 +782,7 @@
|
|
|
782
782
|
"type": {
|
|
783
783
|
"text": "boolean"
|
|
784
784
|
},
|
|
785
|
-
"description": "Set to true to display the clear icon which clears the input.\
|
|
785
|
+
"description": "Set to true to display the clear icon which clears the input.\nThis also enables clearing the input when pressing Esc key.",
|
|
786
786
|
"attribute": "clear-button-visible",
|
|
787
787
|
"inheritedFrom": {
|
|
788
788
|
"name": "ClearButtonMixin",
|
|
@@ -1014,7 +1014,7 @@
|
|
|
1014
1014
|
"type": {
|
|
1015
1015
|
"text": "boolean"
|
|
1016
1016
|
},
|
|
1017
|
-
"description": "Set to true to display the clear icon which clears the input.\
|
|
1017
|
+
"description": "Set to true to display the clear icon which clears the input.\nThis also enables clearing the input when pressing Esc key.",
|
|
1018
1018
|
"fieldName": "clearButtonVisible",
|
|
1019
1019
|
"inheritedFrom": {
|
|
1020
1020
|
"name": "ClearButtonMixin",
|
|
@@ -1355,7 +1355,7 @@
|
|
|
1355
1355
|
"type": {
|
|
1356
1356
|
"text": "boolean"
|
|
1357
1357
|
},
|
|
1358
|
-
"description": "Set to true to display the clear icon which clears the input.\
|
|
1358
|
+
"description": "Set to true to display the clear icon which clears the input.\nThis also enables clearing the input when pressing Esc key.",
|
|
1359
1359
|
"attribute": "clear-button-visible",
|
|
1360
1360
|
"inheritedFrom": {
|
|
1361
1361
|
"name": "ClearButtonMixin",
|
|
@@ -1635,7 +1635,7 @@
|
|
|
1635
1635
|
"type": {
|
|
1636
1636
|
"text": "boolean"
|
|
1637
1637
|
},
|
|
1638
|
-
"description": "Set to true to display the clear icon which clears the input.\
|
|
1638
|
+
"description": "Set to true to display the clear icon which clears the input.\nThis also enables clearing the input when pressing Esc key.",
|
|
1639
1639
|
"fieldName": "clearButtonVisible",
|
|
1640
1640
|
"inheritedFrom": {
|
|
1641
1641
|
"name": "ClearButtonMixin",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/field-base",
|
|
3
|
-
"version": "25.3.0-
|
|
3
|
+
"version": "25.3.0-alpha4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
35
|
-
"@vaadin/a11y-base": "25.3.0-
|
|
36
|
-
"@vaadin/component-base": "25.3.0-
|
|
35
|
+
"@vaadin/a11y-base": "25.3.0-alpha4",
|
|
36
|
+
"@vaadin/component-base": "25.3.0-alpha4",
|
|
37
37
|
"lit": "^3.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@vaadin/chai-plugins": "25.3.0-
|
|
41
|
-
"@vaadin/input-container": "25.3.0-
|
|
42
|
-
"@vaadin/test-runner-commands": "25.3.0-
|
|
40
|
+
"@vaadin/chai-plugins": "25.3.0-alpha4",
|
|
41
|
+
"@vaadin/input-container": "25.3.0-alpha4",
|
|
42
|
+
"@vaadin/test-runner-commands": "25.3.0-alpha4",
|
|
43
43
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
44
44
|
"sinon": "^22.0.0"
|
|
45
45
|
},
|
|
46
46
|
"customElements": "custom-elements.json",
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "ff0efcd52d3b8a081e8101d36cf7bef65ed71cb1"
|
|
48
48
|
}
|
|
@@ -17,10 +17,7 @@ export declare function ClearButtonMixin<T extends Constructor<HTMLElement>>(
|
|
|
17
17
|
export declare class ClearButtonMixinClass {
|
|
18
18
|
/**
|
|
19
19
|
* Set to true to display the clear icon which clears the input.
|
|
20
|
-
*
|
|
21
|
-
* It is up to the component to choose where to place the clear icon:
|
|
22
|
-
* in the Shadow DOM or in the light DOM. In any way, a reference to
|
|
23
|
-
* the clear icon element should be provided via the `clearElement` getter.
|
|
20
|
+
* This also enables clearing the input when pressing Esc key.
|
|
24
21
|
*
|
|
25
22
|
* @attr {boolean} clear-button-visible
|
|
26
23
|
*/
|
|
@@ -17,10 +17,7 @@ export const ClearButtonMixin = (superclass) =>
|
|
|
17
17
|
return {
|
|
18
18
|
/**
|
|
19
19
|
* Set to true to display the clear icon which clears the input.
|
|
20
|
-
*
|
|
21
|
-
* It is up to the component to choose where to place the clear icon:
|
|
22
|
-
* in the Shadow DOM or in the light DOM. In any way, a reference to
|
|
23
|
-
* the clear icon element should be provided via the `clearElement` getter.
|
|
20
|
+
* This also enables clearing the input when pressing Esc key.
|
|
24
21
|
*
|
|
25
22
|
* @attr {boolean} clear-button-visible
|
|
26
23
|
*/
|
|
@@ -18,10 +18,6 @@ export const checkable = (part, propName = part) => css`
|
|
|
18
18
|
--_cursor: var(--vaadin-clickable-cursor);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
:host([disabled]) {
|
|
22
|
-
--_cursor: var(--vaadin-disabled-cursor);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
21
|
:host(:not([has-label])) {
|
|
26
22
|
column-gap: 0;
|
|
27
23
|
}
|
|
@@ -109,10 +105,24 @@ export const checkable = (part, propName = part) => css`
|
|
|
109
105
|
--vaadin-${unsafeCSS(propName)}-border-color: transparent;
|
|
110
106
|
}
|
|
111
107
|
|
|
108
|
+
:host([readonly]) {
|
|
109
|
+
--vaadin-${unsafeCSS(part)}-background: transparent;
|
|
110
|
+
--vaadin-${unsafeCSS(part)}-border-color: var(--vaadin-border-color);
|
|
111
|
+
--vaadin-${unsafeCSS(part)}-marker-color: var(--vaadin-text-color);
|
|
112
|
+
--_border-style: dashed;
|
|
113
|
+
--_cursor: var(--vaadin-disabled-cursor);
|
|
114
|
+
|
|
115
|
+
[part='label'],
|
|
116
|
+
::slotted(label) {
|
|
117
|
+
cursor: default;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
112
121
|
:host([disabled]) {
|
|
113
122
|
--vaadin-${unsafeCSS(propName)}-background: var(--vaadin-input-field-disabled-background, var(--vaadin-background-container-strong));
|
|
114
123
|
--vaadin-${unsafeCSS(propName)}-border-color: transparent;
|
|
115
124
|
--vaadin-${unsafeCSS(propName)}-marker-color: var(--vaadin-text-color-disabled);
|
|
125
|
+
--_cursor: var(--vaadin-disabled-cursor);
|
|
116
126
|
}
|
|
117
127
|
|
|
118
128
|
/* Focus ring */
|
|
@@ -146,6 +156,30 @@ export const checkable = (part, propName = part) => css`
|
|
|
146
156
|
opacity: 0;
|
|
147
157
|
}
|
|
148
158
|
|
|
159
|
+
/* Reverse variant */
|
|
160
|
+
:host([theme~='reverse']) {
|
|
161
|
+
grid-template-columns: 1fr auto;
|
|
162
|
+
|
|
163
|
+
&::before {
|
|
164
|
+
display: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
[part='label'],
|
|
168
|
+
[part='helper-text'],
|
|
169
|
+
[part='error-message'] {
|
|
170
|
+
grid-column: 1;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
[part='${unsafeCSS(part)}'],
|
|
174
|
+
::slotted(input) {
|
|
175
|
+
grid-column: 2;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
::slotted(input) {
|
|
179
|
+
margin-inline: calc(min(0px, (24px - 100%) / -2) - var(--vaadin-${unsafeCSS(propName)}-gap, var(--vaadin-gap-s))) 0 !important;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
149
183
|
@media (forced-colors: active) {
|
|
150
184
|
:host(:is([checked], [indeterminate])) {
|
|
151
185
|
--vaadin-${unsafeCSS(propName)}-border-color: CanvasText !important;
|