@descope/web-components-ui 1.0.102 → 1.0.104

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.
Files changed (61) hide show
  1. package/README.md +2 -156
  2. package/dist/cjs/index.cjs.js +1 -1
  3. package/dist/cjs/index.cjs.js.map +1 -1
  4. package/dist/index.esm.js +397 -365
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/umd/241.js +1 -0
  7. package/dist/umd/447.js +1 -1
  8. package/dist/umd/878.js +1 -1
  9. package/dist/umd/890.js +1 -1
  10. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  11. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  12. package/dist/umd/descope-button-index-js.js +1 -1
  13. package/dist/umd/descope-combo-box-index-js.js +1 -1
  14. package/dist/umd/descope-container-index-js.js +1 -1
  15. package/dist/umd/descope-date-picker-index-js.js +1 -1
  16. package/dist/umd/descope-divider-index-js.js +1 -1
  17. package/dist/umd/descope-email-field-index-js.js +1 -1
  18. package/dist/umd/descope-image-index-js.js +1 -1
  19. package/dist/umd/descope-link-index-js.js +1 -1
  20. package/dist/umd/descope-loader-linear-index-js.js +1 -1
  21. package/dist/umd/descope-loader-radial-index-js.js +1 -1
  22. package/dist/umd/descope-logo-index-js.js +1 -1
  23. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  24. package/dist/umd/descope-number-field-index-js.js +1 -1
  25. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
  26. package/dist/umd/descope-passcode-index-js.js +1 -1
  27. package/dist/umd/descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  28. package/dist/umd/descope-phone-field-index-js.js +1 -1
  29. package/dist/umd/descope-text-area-index-js.js +1 -1
  30. package/dist/umd/descope-text-field-index-js.js +1 -1
  31. package/dist/umd/descope-text-index-js.js +1 -1
  32. package/dist/umd/index.js +1 -1
  33. package/package.json +1 -1
  34. package/src/components/descope-combo-box/ComboBox.js +1 -1
  35. package/src/components/descope-container/Container.js +2 -1
  36. package/src/components/descope-divider/Divider.js +1 -0
  37. package/src/components/descope-email-field/EmailField.js +6 -8
  38. package/src/components/descope-new-password/NewPassword.js +16 -13
  39. package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +4 -1
  40. package/src/components/descope-number-field/NumberField.js +7 -10
  41. package/src/components/descope-passcode/Passcode.js +83 -67
  42. package/src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js +3 -7
  43. package/src/components/descope-password-field/PasswordField.js +27 -13
  44. package/src/components/descope-password-field/passwordDraggableMixin.js +3 -2
  45. package/src/components/descope-phone-field/PhoneField.js +15 -1
  46. package/src/components/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +5 -2
  47. package/src/components/descope-text-area/TextArea.js +6 -7
  48. package/src/components/descope-text-field/TextField.js +4 -10
  49. package/src/components/descope-text-field/textFieldMappings.js +1 -0
  50. package/src/helpers/themeHelpers/index.js +1 -1
  51. package/src/mixins/inputValidationMixin.js +15 -6
  52. package/src/mixins/proxyInputMixin.js +3 -1
  53. package/src/theme/components/comboBox.js +4 -10
  54. package/src/theme/components/logo.js +1 -0
  55. package/src/theme/components/newPassword.js +11 -24
  56. package/src/theme/components/passcode.js +3 -3
  57. package/src/theme/components/passwordField.js +7 -8
  58. package/src/theme/components/phoneField.js +8 -16
  59. package/src/theme/components/textArea.js +9 -2
  60. package/src/theme/components/textField.js +3 -5
  61. package/dist/umd/0.js +0 -1
@@ -35,6 +35,8 @@ const EmailField = compose(
35
35
  overrides = `
36
36
  :host {
37
37
  display: inline-block;
38
+ min-width: 10em;
39
+ max-width: 100%;
38
40
  }
39
41
  vaadin-email-field {
40
42
  margin: 0;
@@ -44,8 +46,12 @@ overrides = `
44
46
  vaadin-email-field::before {
45
47
  height: 0;
46
48
  }
49
+ vaadin-email-field > input {
50
+ -webkit-mask-image: none;
51
+ }
47
52
  vaadin-email-field::part(input-field) {
48
53
  overflow: hidden;
54
+ padding: 0;
49
55
  }
50
56
  vaadin-email-field[readonly] > input:placeholder-shown {
51
57
  opacity: 1;
@@ -58,14 +64,6 @@ overrides = `
58
64
  -webkit-text-fill-color: var(${EmailField.cssVarList.color});
59
65
  box-shadow: 0 0 0 var(${EmailField.cssVarList.height}) var(${EmailField.cssVarList.backgroundColor}) inset;
60
66
  }
61
- vaadin-email-field > label,
62
- vaadin-email-field::part(input-field) {
63
- cursor: pointer;
64
- color: var(${EmailField.cssVarList.color});
65
- }
66
- vaadin-email-field::part(input-field):focus {
67
- cursor: text;
68
- }
69
67
  vaadin-email-field[required]::part(required-indicator)::after {
70
68
  content: "*";
71
69
  color: var(${EmailField.cssVarList.color});
@@ -7,7 +7,7 @@ import {
7
7
  createProxy,
8
8
  } from '../../mixins';
9
9
  import { componentName as descopeInternalComponentName } from './descope-new-password-internal/componentName';
10
- import PasswordField from "../descope-password-field/PasswordField";
10
+ import PasswordField from '../descope-password-field/PasswordField';
11
11
 
12
12
  export const componentName = getComponentName('new-password');
13
13
 
@@ -46,6 +46,8 @@ const customMixin = (superclass) =>
46
46
  'label',
47
47
  'has-confirm',
48
48
  'invalid',
49
+ 'readonly',
50
+ 'draggable'
49
51
  ]
50
52
  });
51
53
  }
@@ -58,17 +60,16 @@ const { host, internalInputsWrapper } = {
58
60
  const NewPassword = compose(
59
61
  createStyleMixin({
60
62
  mappings: {
63
+ fontSize: [
64
+ host,
65
+ {
66
+ selector: PasswordField.componentName,
67
+ property: PasswordField.cssVarList.fontSize
68
+ }
69
+ ],
61
70
  componentWidth: { ...host, property: 'width' },
62
71
  requiredContent: { ...host, property: 'content' },
63
- inputLabelTextColor: {
64
- selector: PasswordField.componentName,
65
- property: PasswordField.cssVarList.labelTextColor
66
- },
67
- inputTextColor: {
68
- selector: PasswordField.componentName,
69
- property: PasswordField.cssVarList.inputTextColor
70
- },
71
- inputsGap: { ...internalInputsWrapper, property: 'gap' }
72
+ inputsGap: { ...internalInputsWrapper, property: 'gap' },
72
73
  }
73
74
  }),
74
75
  draggableMixin,
@@ -88,6 +89,8 @@ const overrides = `
88
89
  :host {
89
90
  --vaadin-field-default-width: auto;
90
91
  display: inline-block;
92
+ min-width: 10em;
93
+ max-width: 100%;
91
94
  }
92
95
  vaadin-text-field {
93
96
  padding: 0;
@@ -107,16 +110,16 @@ const overrides = `
107
110
  }
108
111
  descope-new-password-internal {
109
112
  -webkit-mask-image: none;
110
- padding: 0;
111
113
  min-height: 0;
112
114
  width: 100%;
113
- height: 100%;
115
+ height: 100%;
116
+ padding: 0;
114
117
  }
115
118
  descope-new-password-internal > .wrapper {
116
119
  width: 100%;
117
120
  height: 100%;
118
121
  display: flex;
119
- flex-direction: column;
122
+ flex-direction: column;
120
123
  }
121
124
  descope-password-field {
122
125
  display: block;
@@ -17,6 +17,9 @@ const commonAttrs = [
17
17
  'full-width',
18
18
  'maxlength',
19
19
  'invalid',
20
+ 'readonly',
21
+ 'draggable'
22
+
20
23
  ];
21
24
 
22
25
  const inputRelatedAttrs = [].concat(commonAttrs, passwordInputAttrs, confirmInputAttrs);
@@ -80,7 +83,7 @@ class NewPasswordInternal extends BaseInputClass {
80
83
  }
81
84
  });
82
85
 
83
- super.init();
86
+ super.init?.();
84
87
  this.renderInputs(this.hasConfirm);
85
88
  }
86
89
 
@@ -35,13 +35,19 @@ const NumberField = compose(
35
35
  overrides = `
36
36
  :host {
37
37
  display: inline-block;
38
+ min-width: 10em;
39
+ max-width: 100%;
38
40
  }
39
41
  vaadin-number-field {
40
42
  margin: 0;
41
43
  padding: 0;
44
+ width: 100%;
45
+ }
46
+ vaadin-number-field > input {
47
+ -webkit-mask-image: none;
42
48
  }
43
49
  vaadin-number-field::part(input-field) {
44
- overflow: hidden;
50
+ padding: 0;
45
51
  }
46
52
  vaadin-number-field[readonly] > input:placeholder-shown {
47
53
  opacity: 1;
@@ -54,16 +60,7 @@ overrides = `
54
60
  -webkit-text-fill-color: var(${NumberField.cssVarList.color});
55
61
  box-shadow: 0 0 0 var(${NumberField.cssVarList.height}) var(${NumberField.cssVarList.backgroundColor}) inset;
56
62
  }
57
- vaadin-number-field > label,
58
- vaadin-number-field::part(input-field) {
59
- cursor: pointer;
60
- color: var(${NumberField.cssVarList.color});
61
- }
62
- vaadin-number-field::part(input-field):focus {
63
- cursor: text;
64
- }
65
63
  vaadin-number-field[required]::part(required-indicator)::after {
66
- font-size: "12px";
67
64
  content: "*";
68
65
  color: var(${NumberField.cssVarList.color});
69
66
  }
@@ -13,8 +13,16 @@ import { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';
13
13
 
14
14
  export const componentName = getComponentName('passcode');
15
15
 
16
+ const observedAttributes = [
17
+ 'digits'
18
+ ];
19
+
16
20
  const customMixin = (superclass) =>
17
21
  class PasscodeClass extends superclass {
22
+ static get observedAttributes() {
23
+ return observedAttributes.concat(superclass.observedAttributes || []);
24
+ }
25
+
18
26
  constructor() {
19
27
  super();
20
28
  }
@@ -42,6 +50,14 @@ const customMixin = (superclass) =>
42
50
 
43
51
  forwardAttrs(this, this.inputElement, { includeAttrs: ['digits', 'size'] })
44
52
  }
53
+
54
+ attributeChangedCallback(attrName, oldValue, newValue) {
55
+ super.attributeChangedCallback?.(attrName, oldValue, newValue);
56
+
57
+ if (attrName === 'digits') {
58
+ this.style.setProperty('--passcode-digits-count', newValue);
59
+ }
60
+ }
45
61
  };
46
62
 
47
63
  const { borderStyle, borderWidth, ...restTextFieldMappings } =
@@ -50,7 +66,7 @@ const { borderStyle, borderWidth, ...restTextFieldMappings } =
50
66
  const { digitField, label, requiredIndicator, internalWrapper, focusedDigitField } = {
51
67
  focusedDigitField: { selector: () => `${TextField.componentName}[focused="true"]` },
52
68
  digitField: { selector: () => TextField.componentName },
53
- label: { selector: '> label' },
69
+ label: { selector: '::part(label)' },
54
70
  requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
55
71
  internalWrapper: { selector: 'descope-passcode-internal .wrapper' }
56
72
  }
@@ -75,10 +91,7 @@ const Passcode = compose(
75
91
  textAlign: { ...digitField, property: textVars.textAlign },
76
92
  caretColor: { ...digitField, property: textVars.caretColor },
77
93
  digitsGap: { ...internalWrapper, property: 'gap' },
78
- focusedDigitFieldBorderColor: [
79
- { ...focusedDigitField, property: textVars.borderColor },
80
- { ...focusedDigitField, property: textVars.outlineColor }
81
- ]
94
+ focusedDigitFieldOutlineColor: { ...focusedDigitField, property: textVars.outlineColor }
82
95
  },
83
96
  }),
84
97
  draggableMixin,
@@ -90,68 +103,71 @@ const Passcode = compose(
90
103
  slots: [],
91
104
  wrappedEleName: 'vaadin-text-field',
92
105
  style: () => `
93
- :host {
94
- --vaadin-field-default-width: auto;
95
- display: inline-block;
96
- }
97
- :host::after {
98
- background-color: transparent;
99
- }
100
- :host::part(input-field)::after {
101
- background-color: transparent;
102
- }
103
-
104
- descope-passcode-internal {
105
- -webkit-mask-image: none;
106
- padding: 0;
107
- width: 100%;
108
- height: 100%;
109
- min-height: initial;
110
- }
111
-
112
- descope-passcode-internal .wrapper {
113
- box-sizing: border-box;
114
- min-height: initial;
115
- height: 100%;
116
- justify-content: center;
117
- }
118
-
119
- descope-passcode-internal descope-text-field {
120
- width: var(${textVars.height})
121
- }
122
-
123
- vaadin-text-field::part(input-field) {
124
- background-color: transparent;
125
- padding: 0;
126
- overflow: hidden;
127
- -webkit-mask-image: none;
128
- }
129
-
130
- vaadin-text-field {
131
- margin: 0;
132
- padding: 0;
133
- width: 100%
134
- }
135
-
136
- vaadin-text-field::before {
137
- height: 0;
138
- }
139
-
140
- vaadin-text-field[readonly] > input:placeholder-shown {
141
- opacity: 1;
142
- }
143
-
144
- vaadin-text-field::part(input-field):focus {
145
- cursor: text;
146
- }
147
-
148
- vaadin-text-field[required]::part(required-indicator)::after {
149
- content: "*";
150
- }
151
- vaadin-text-field[readonly]::part(input-field)::after {
152
- border: 0 solid;
153
- }
154
- `,
106
+ :host {
107
+ --vaadin-field-default-width: auto;
108
+ display: inline-block;
109
+ max-width: 100%;
110
+ min-width: calc(var(--passcode-digits-count) * 2em);
111
+ }
112
+ :host::after {
113
+ background-color: transparent;
114
+ }
115
+ :host::part(input-field)::after {
116
+ background-color: transparent;
117
+ }
118
+
119
+ descope-passcode-internal {
120
+ -webkit-mask-image: none;
121
+ padding: 0;
122
+ width: 100%;
123
+ height: 100%;
124
+ min-height: initial;
125
+ }
126
+
127
+ descope-passcode-internal .wrapper {
128
+ box-sizing: border-box;
129
+ min-height: initial;
130
+ height: 100%;
131
+ justify-content: space-between;
132
+ }
133
+
134
+ descope-passcode-internal descope-text-field {
135
+ min-width: 2em;
136
+ max-width: var(${textVars.height});
137
+ }
138
+
139
+ vaadin-text-field::part(input-field) {
140
+ background-color: transparent;
141
+ padding: 0;
142
+ overflow: hidden;
143
+ -webkit-mask-image: none;
144
+ }
145
+
146
+ vaadin-text-field {
147
+ margin: 0;
148
+ padding: 0;
149
+ width: 100%
150
+ }
151
+
152
+ vaadin-text-field::before {
153
+ height: 0;
154
+ }
155
+
156
+ vaadin-text-field[readonly] > input:placeholder-shown {
157
+ opacity: 1;
158
+ }
159
+
160
+ vaadin-text-field::part(input-field):focus {
161
+ cursor: text;
162
+ }
163
+
164
+ vaadin-text-field[required]::part(required-indicator)::after {
165
+ content: "*";
166
+ }
167
+ vaadin-text-field[readonly]::part(input-field)::after {
168
+ border: 0 solid;
169
+ }
170
+ `,
155
171
  excludeAttrsSync: ['tabindex'],
156
172
  componentName
157
173
  })
@@ -1,6 +1,5 @@
1
1
  import { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';
2
2
  import { forwardAttrs, getComponentName } from '../../../helpers/componentHelpers';
3
- import { createDispatchEvent } from '../../../helpers/mixinsHelpers';
4
3
  import { getSanitizedCharacters, focusElement } from './helpers';
5
4
 
6
5
  export const componentName = getComponentName('passcode-internal');
@@ -28,9 +27,6 @@ class PasscodeInternal extends BaseInputClass {
28
27
  return componentName;
29
28
  }
30
29
 
31
- #dispatchBlur = createDispatchEvent.bind(this, 'blur')
32
- #dispatchFocus = createDispatchEvent.bind(this, 'focus')
33
-
34
30
  constructor() {
35
31
  super();
36
32
 
@@ -53,7 +49,8 @@ class PasscodeInternal extends BaseInputClass {
53
49
  <descope-text-field
54
50
  data-id=${idx}
55
51
  type="tel"
56
- autocomplete="off"
52
+ autocomplete="one-time-code"
53
+ inputMode="numeric"
57
54
  ></descope-text-field>
58
55
  `)
59
56
 
@@ -108,8 +105,7 @@ class PasscodeInternal extends BaseInputClass {
108
105
 
109
106
  super.init?.();
110
107
 
111
- this.renderInputs()
112
-
108
+ this.renderInputs();
113
109
  }
114
110
 
115
111
  getInputIdx(inputEle) {
@@ -18,27 +18,37 @@ const {
18
18
  inputElementPlaceholder,
19
19
  revealButton,
20
20
  revealButtonIcon,
21
+ revealButtonIconOutline,
21
22
  label,
22
23
  requiredIndicator
23
24
  } = {
24
- host: () => ':host',
25
+ host: { selector: () => ':host' },
25
26
  inputWrapper: { selector: '::part(input-field)' },
26
27
  inputElement: { selector: '> input' },
27
28
  inputElementPlaceholder: { selector: '> input:placeholder-shown' },
28
29
  revealButton: { selector: 'vaadin-password-field-button' },
29
30
  revealButtonIcon: { selector: () => '::part(reveal-button)::before' },
30
- label: { selector: '> label' },
31
+ revealButtonIconOutline: { selector: () => 'vaadin-password-field-button[focus-ring]' },
32
+ label: { selector: '::part(label)' },
31
33
  requiredIndicator: { selector: '::part(required-indicator)::after' },
32
34
  }
33
35
 
34
36
  const PasswordField = compose(
35
37
  createStyleMixin({
36
38
  mappings: {
37
- width: { selector: host },
39
+ width: host,
38
40
  wrapperBorderStyle: { ...inputWrapper, property: 'border-style' },
39
41
  wrapperBorderWidth: { ...inputWrapper, property: 'border-width' },
40
42
  wrapperBorderColor: { ...inputWrapper, property: 'border-color' },
41
43
  wrapperBorderRadius: { ...inputWrapper, property: 'border-radius' },
44
+
45
+ revealButtonOutlineBoxShadow: [
46
+ {
47
+ ...revealButtonIconOutline,
48
+ property: 'box-shadow'
49
+ }
50
+ ],
51
+
42
52
  labelTextColor: [
43
53
  { ...label, property: 'color' },
44
54
  { ...requiredIndicator, property: 'color' }
@@ -56,10 +66,10 @@ const PasswordField = compose(
56
66
  { ...label, property: 'cursor' },
57
67
  { ...requiredIndicator, property: 'cursor' }
58
68
  ],
59
- outlineColor: { ...inputWrapper },
60
- outlineStyle: { ...inputWrapper },
69
+ outlineColor: inputWrapper,
70
+ outlineStyle: inputWrapper,
61
71
  outlineWidth: [
62
- { ...inputWrapper },
72
+ inputWrapper,
63
73
  // we need to make sure there is enough space for the outline
64
74
  { property: 'padding' }
65
75
  ],
@@ -76,32 +86,36 @@ const PasswordField = compose(
76
86
  wrappedEleName: 'vaadin-password-field',
77
87
  style: `
78
88
  :host {
79
- display: inline-flex;
89
+ display: inline-block;
90
+ min-width: 10em;
91
+ max-width: 100%;
80
92
  }
81
93
  vaadin-password-field {
82
94
  width: 100%;
95
+ box-sizing: border-box;
83
96
  }
84
97
  vaadin-password-field::part(input-field) {
85
98
  padding: 0;
86
99
  }
87
100
  vaadin-password-field > input {
88
101
  min-height: 0;
102
+ -webkit-mask-image: none;
89
103
  }
90
-
91
104
  vaadin-password-field[readonly] > input:placeholder-shown {
92
105
  opacity: 1;
93
106
  }
94
-
95
- vaadin-password-field::part(input-field)::after {
96
- opacity: 0;
97
- }
98
107
  vaadin-password-field::before {
99
108
  height: initial;
100
109
  }
101
-
110
+ vaadin-password-field::part(input-field)::after {
111
+ opacity: 0;
112
+ }
102
113
  vaadin-password-field[required]::part(required-indicator)::after {
103
114
  content: "*";
104
115
  }
116
+ [readonly] vaadin-password-field-button {
117
+ pointer-events: none;
118
+ }
105
119
  `,
106
120
  excludeAttrsSync: ['tabindex'],
107
121
  componentName
@@ -10,11 +10,12 @@ const passwordDraggableMixin = (superclass) => class PasswordDraggableMixinClass
10
10
  this.addEventListener('mousedown', (e) => {
11
11
  if (this.isDraggable & this.isReadOnly) {
12
12
  const inputEle = this.baseElement.querySelector('input');
13
-
14
13
  const prevType = inputEle.getAttribute('type')
14
+
15
15
  inputEle.setAttribute('type', 'text');
16
+ setTimeout(() => inputEle.focus());
16
17
 
17
- const onComplete = () => {
18
+ const onComplete = (e) => {
18
19
  inputEle.setAttribute('type', prevType)
19
20
 
20
21
  e.target.removeEventListener('mouseup', onComplete)
@@ -78,6 +78,18 @@ const {
78
78
  const PhoneField = compose(
79
79
  createStyleMixin({
80
80
  mappings: {
81
+ fontSize: [
82
+ host, inputWrapper,
83
+ {
84
+ selector: TextField.componentName,
85
+ property: TextField.cssVarList.fontSize
86
+ },
87
+ {
88
+ selector: ComboBox.componentName,
89
+ property: ComboBox.cssVarList.fontSize
90
+ }
91
+ ],
92
+
81
93
  componentWidth: { ...host, property: 'width' },
82
94
 
83
95
  wrapperBorderStyle: [
@@ -137,6 +149,8 @@ const PhoneField = compose(
137
149
  :host {
138
150
  --vaadin-field-default-width: auto;
139
151
  display: inline-block;
152
+ max-width: 100%;
153
+ min-width: 15em;
140
154
  }
141
155
  div {
142
156
  display: inline-flex;
@@ -163,7 +177,7 @@ const PhoneField = compose(
163
177
  padding: 0;
164
178
  min-height: 0;
165
179
  width: 100%;
166
- height: 100%;
180
+ height: 100%;
167
181
  }
168
182
  descope-phone-field-internal > div {
169
183
  width: 100%;
@@ -102,7 +102,7 @@ class PhoneFieldInternal extends BaseInputClass {
102
102
  this.inputs[0].focus()
103
103
  })
104
104
 
105
- super.init();
105
+ super.init?.();
106
106
  this.initInputs();
107
107
  this.setComboBoxDescriptor();
108
108
  }
@@ -115,7 +115,10 @@ class PhoneFieldInternal extends BaseInputClass {
115
115
  // Vaadin resets the input's value. We use setTimeout in order to make sure this happens
116
116
  // after the reset.
117
117
  if (countryData) {
118
- setTimeout(() => this.countryCodeInput.value = countryData);
118
+ setTimeout(() => {
119
+ this.countryCodeInput.selectedItem = this.countryCodeInput.items.find(node => node['data-id'] === countryCode);
120
+ });
121
+
119
122
  }
120
123
  }
121
124
  }
@@ -31,6 +31,7 @@ let overrides = ``;
31
31
  const TextArea = compose(
32
32
  createStyleMixin({
33
33
  mappings: {
34
+ fontSize: [host, textArea],
34
35
  resize: textArea,
35
36
  color: textArea,
36
37
  cursor: {},
@@ -45,10 +46,10 @@ const TextArea = compose(
45
46
  borderStyle: input,
46
47
  borderColor: input,
47
48
  borderRadius: input,
48
- outlineWidth: input,
49
+ outlineWidth: [input, { property: 'padding' }],
49
50
  outlineStyle: input,
50
51
  outlineColor: input,
51
- outlineOffset: [input, { property: 'padding' }],
52
+ outlineOffset: input,
52
53
  }
53
54
  }),
54
55
  draggableMixin,
@@ -67,8 +68,9 @@ const TextArea = compose(
67
68
  overrides = `
68
69
  :host {
69
70
  display: inline-block;
71
+ min-width: 10em;
72
+ max-width: 100%;
70
73
  }
71
-
72
74
  vaadin-text-area {
73
75
  margin: 0;
74
76
  width: 100%;
@@ -76,10 +78,7 @@ overrides = `
76
78
  }
77
79
  vaadin-text-area > label,
78
80
  vaadin-text-area::part(input-field) {
79
- cursor: pointer;
80
- }
81
- vaadin-text-area[focused]::part(input-field) {
82
- cursor: text;
81
+ padding: 0;
83
82
  }
84
83
  vaadin-text-area[required]::part(required-indicator)::after {
85
84
  content: "*";
@@ -57,10 +57,12 @@ overrides = `
57
57
  :host {
58
58
  display: inline-block;
59
59
  --vaadin-field-default-width: auto;
60
+ max-width: 100%;
61
+ min-width: 10em;
62
+
60
63
  }
61
64
  vaadin-text-field {
62
65
  margin: 0;
63
- padding: 0;
64
66
  width: 100%;
65
67
  height: 100%;
66
68
  box-sizing: border-box;
@@ -83,18 +85,11 @@ overrides = `
83
85
  box-shadow: 0 0 0 var(${TextField.cssVarList.height}) var(${TextField.cssVarList.backgroundColor}) inset;
84
86
  }
85
87
 
86
- vaadin-text-field input {
88
+ vaadin-text-field > input {
87
89
  -webkit-mask-image: none;
88
90
  min-height: 0;
89
91
  }
90
92
 
91
- vaadin-text-field > label,
92
- vaadin-text-field::part(input-field) {
93
- color: var(${TextField.cssVarList.color});
94
- }
95
- vaadin-text-field::part(input-field):focus {
96
- cursor: text;
97
- }
98
93
  vaadin-text-field[required]::part(required-indicator)::after {
99
94
  content: "*";
100
95
  color: var(${TextField.cssVarList.color});
@@ -103,7 +98,6 @@ overrides = `
103
98
  opacity: 0 !important;
104
99
  }
105
100
 
106
-
107
101
  vaadin-text-field::before {
108
102
  height: unset;
109
103
  }
@@ -9,6 +9,7 @@ const selectors = {
9
9
 
10
10
  export default {
11
11
  backgroundColor: { selector: selectors.inputWrapper },
12
+ labelTextColor: { selector: selectors.label, property: 'color' },
12
13
  color: { selector: selectors.inputWrapper },
13
14
  width: { selector: selectors.host },
14
15
  borderColor: [
@@ -96,7 +96,7 @@ const componentsThemeToStyleObj = (componentsTheme) =>
96
96
  [componentName]: {
97
97
  [themeName]: {
98
98
  [selector]: {
99
- [property]: val
99
+ [property]: getCssVarValue(val)
100
100
  }
101
101
  }
102
102
  }