@vaadin/field-base 23.1.7 → 23.1.9

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.1.7",
3
+ "version": "23.1.9",
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": "~23.1.7",
35
+ "@vaadin/component-base": "~23.1.9",
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": "879a4e5e6a245809bafa0ef2b5cdb24aef72565d"
43
+ "gitHead": "ad8461e09f049c3f04f50278d38d0f5a98604904"
44
44
  }
@@ -14,6 +14,7 @@ import { FieldMixinClass } from './field-mixin.js';
14
14
  import { InputConstraintsMixinClass } from './input-constraints-mixin.js';
15
15
  import { InputMixinClass } from './input-mixin.js';
16
16
  import { LabelMixinClass } from './label-mixin.js';
17
+ import { SlotStylesMixinClass } from './slot-styles-mixin.js';
17
18
  import { 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
 
@@ -7,6 +7,7 @@ import { KeyboardMixin } from '@vaadin/component-base/src/keyboard-mixin.js';
7
7
  import { DelegateFocusMixin } from './delegate-focus-mixin.js';
8
8
  import { FieldMixin } from './field-mixin.js';
9
9
  import { InputConstraintsMixin } from './input-constraints-mixin.js';
10
+ import { SlotStylesMixin } from './slot-styles-mixin.js';
10
11
 
11
12
  /**
12
13
  * A mixin to provide shared logic for the editable form input controls.
@@ -16,10 +17,11 @@ import { InputConstraintsMixin } from './input-constraints-mixin.js';
16
17
  * @mixes FieldMixin
17
18
  * @mixes InputConstraintsMixin
18
19
  * @mixes KeyboardMixin
20
+ * @mixes SlotStylesMixin
19
21
  */
20
22
  export const InputControlMixin = (superclass) =>
21
- class InputControlMixinClass extends DelegateFocusMixin(
22
- InputConstraintsMixin(FieldMixin(KeyboardMixin(superclass))),
23
+ class InputControlMixinClass extends SlotStylesMixin(
24
+ DelegateFocusMixin(InputConstraintsMixin(FieldMixin(KeyboardMixin(superclass)))),
23
25
  ) {
24
26
  static get properties() {
25
27
  return {
@@ -91,6 +93,19 @@ export const InputControlMixin = (superclass) =>
91
93
  return null;
92
94
  }
93
95
 
96
+ /** @protected */
97
+ get slotStyles() {
98
+ // Needed for Safari, where ::slotted(...)::placeholder does not work
99
+ return [
100
+ `
101
+ :is(input[slot='input'], textarea[slot='textarea'])::placeholder {
102
+ font: inherit;
103
+ color: inherit;
104
+ }
105
+ `,
106
+ ];
107
+ }
108
+
94
109
  /** @protected */
95
110
  ready() {
96
111
  super.ready();
@@ -15,6 +15,7 @@ import { InputConstraintsMixinClass } from './input-constraints-mixin.js';
15
15
  import { InputControlMixinClass } from './input-control-mixin.js';
16
16
  import { InputMixinClass } from './input-mixin.js';
17
17
  import { LabelMixinClass } from './label-mixin.js';
18
+ import { SlotStylesMixinClass } from './slot-styles-mixin.js';
18
19
  import { 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