@vaadin/field-base 23.2.0 → 23.2.2
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/field-base",
|
|
3
|
-
"version": "23.2.
|
|
3
|
+
"version": "23.2.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
34
34
|
"@polymer/polymer": "^3.0.0",
|
|
35
|
-
"@vaadin/component-base": "
|
|
35
|
+
"@vaadin/component-base": "~23.2.2",
|
|
36
36
|
"lit": "^2.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
41
41
|
"sinon": "^13.0.2"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "a98818979098f4542ce557a58858fb6dad910a25"
|
|
44
44
|
}
|
|
@@ -14,6 +14,7 @@ import type { FieldMixinClass } from './field-mixin.js';
|
|
|
14
14
|
import type { InputConstraintsMixinClass } from './input-constraints-mixin.js';
|
|
15
15
|
import type { InputMixinClass } from './input-mixin.js';
|
|
16
16
|
import type { LabelMixinClass } from './label-mixin.js';
|
|
17
|
+
import type { SlotStylesMixinClass } from './slot-styles-mixin.js';
|
|
17
18
|
import type { ValidateMixinClass } from './validate-mixin.js';
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -32,6 +33,7 @@ export declare function InputControlMixin<T extends Constructor<HTMLElement>>(
|
|
|
32
33
|
Constructor<InputMixinClass> &
|
|
33
34
|
Constructor<KeyboardMixinClass> &
|
|
34
35
|
Constructor<LabelMixinClass> &
|
|
36
|
+
Constructor<SlotStylesMixinClass> &
|
|
35
37
|
Constructor<ValidateMixinClass> &
|
|
36
38
|
T;
|
|
37
39
|
|
|
@@ -46,6 +48,7 @@ export declare class InputControlMixinClass {
|
|
|
46
48
|
*
|
|
47
49
|
* For example, to allow entering only numbers and minus signs, use:
|
|
48
50
|
* `allowedCharPattern = "[\\d-]"`
|
|
51
|
+
* @attr {string} allowed-char-pattern
|
|
49
52
|
*/
|
|
50
53
|
allowedCharPattern: string;
|
|
51
54
|
|
|
@@ -9,6 +9,7 @@ import { KeyboardMixin } from '@vaadin/component-base/src/keyboard-mixin.js';
|
|
|
9
9
|
import { DelegateFocusMixin } from './delegate-focus-mixin.js';
|
|
10
10
|
import { FieldMixin } from './field-mixin.js';
|
|
11
11
|
import { InputConstraintsMixin } from './input-constraints-mixin.js';
|
|
12
|
+
import { SlotStylesMixin } from './slot-styles-mixin.js';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* A mixin to provide shared logic for the editable form input controls.
|
|
@@ -18,10 +19,11 @@ import { InputConstraintsMixin } from './input-constraints-mixin.js';
|
|
|
18
19
|
* @mixes FieldMixin
|
|
19
20
|
* @mixes InputConstraintsMixin
|
|
20
21
|
* @mixes KeyboardMixin
|
|
22
|
+
* @mixes SlotStylesMixin
|
|
21
23
|
*/
|
|
22
24
|
export const InputControlMixin = (superclass) =>
|
|
23
|
-
class InputControlMixinClass extends
|
|
24
|
-
InputConstraintsMixin(FieldMixin(KeyboardMixin(superclass))),
|
|
25
|
+
class InputControlMixinClass extends SlotStylesMixin(
|
|
26
|
+
DelegateFocusMixin(InputConstraintsMixin(FieldMixin(KeyboardMixin(superclass)))),
|
|
25
27
|
) {
|
|
26
28
|
static get properties() {
|
|
27
29
|
return {
|
|
@@ -35,6 +37,7 @@ export const InputControlMixin = (superclass) =>
|
|
|
35
37
|
*
|
|
36
38
|
* For example, to allow entering only numbers and minus signs, use:
|
|
37
39
|
* `allowedCharPattern = "[\\d-]"`
|
|
40
|
+
* @attr {string} allowed-char-pattern
|
|
38
41
|
*/
|
|
39
42
|
allowedCharPattern: {
|
|
40
43
|
type: String,
|
|
@@ -117,6 +120,19 @@ export const InputControlMixin = (superclass) =>
|
|
|
117
120
|
return null;
|
|
118
121
|
}
|
|
119
122
|
|
|
123
|
+
/** @protected */
|
|
124
|
+
get slotStyles() {
|
|
125
|
+
// Needed for Safari, where ::slotted(...)::placeholder does not work
|
|
126
|
+
return [
|
|
127
|
+
`
|
|
128
|
+
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
129
|
+
font: inherit;
|
|
130
|
+
color: inherit;
|
|
131
|
+
}
|
|
132
|
+
`,
|
|
133
|
+
];
|
|
134
|
+
}
|
|
135
|
+
|
|
120
136
|
/** @protected */
|
|
121
137
|
ready() {
|
|
122
138
|
super.ready();
|
|
@@ -15,6 +15,7 @@ import type { InputConstraintsMixinClass } from './input-constraints-mixin.js';
|
|
|
15
15
|
import type { InputControlMixinClass } from './input-control-mixin.js';
|
|
16
16
|
import type { InputMixinClass } from './input-mixin.js';
|
|
17
17
|
import type { LabelMixinClass } from './label-mixin.js';
|
|
18
|
+
import type { SlotStylesMixinClass } from './slot-styles-mixin.js';
|
|
18
19
|
import type { ValidateMixinClass } from './validate-mixin.js';
|
|
19
20
|
|
|
20
21
|
/**
|
|
@@ -34,6 +35,7 @@ export declare function InputFieldMixin<T extends Constructor<HTMLElement>>(
|
|
|
34
35
|
Constructor<InputMixinClass> &
|
|
35
36
|
Constructor<KeyboardMixinClass> &
|
|
36
37
|
Constructor<LabelMixinClass> &
|
|
38
|
+
Constructor<SlotStylesMixinClass> &
|
|
37
39
|
Constructor<ValidateMixinClass> &
|
|
38
40
|
T;
|
|
39
41
|
|