@descope/web-components-ui 1.0.135 → 1.0.148

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. package/package.json +77 -56
  2. package/src/baseClasses/createBaseClass.js +18 -16
  3. package/src/baseClasses/createBaseInputClass.js +14 -8
  4. package/src/baseClasses/createCssVarImageClass.js +27 -23
  5. package/src/components/boolean-fields/booleanFieldMixin.js +18 -29
  6. package/src/components/boolean-fields/commonStyles.js +1 -1
  7. package/src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js +46 -51
  8. package/src/components/boolean-fields/descope-boolean-field-internal/index.js +1 -1
  9. package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +80 -85
  10. package/src/components/boolean-fields/descope-checkbox/index.js +2 -2
  11. package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +88 -95
  12. package/src/components/boolean-fields/descope-switch-toggle/index.js +2 -2
  13. package/src/components/descope-button/ButtonClass.js +57 -47
  14. package/src/components/descope-button/clickableMixin.js +10 -0
  15. package/src/components/descope-combo-box/ComboBoxClass.js +156 -160
  16. package/src/components/descope-container/ContainerClass.js +32 -42
  17. package/src/components/descope-date-picker/index.js +9 -14
  18. package/src/components/descope-divider/DividerClass.js +52 -62
  19. package/src/components/descope-email-field/EmailFieldClass.js +25 -20
  20. package/src/components/descope-image/ImageClass.js +21 -24
  21. package/src/components/descope-link/LinkClass.js +31 -35
  22. package/src/components/descope-loader-linear/LoaderLinearClass.js +31 -36
  23. package/src/components/descope-loader-radial/LoaderRadialClass.js +23 -30
  24. package/src/components/descope-logo/LogoClass.js +5 -1
  25. package/src/components/descope-new-password/NewPasswordClass.js +63 -81
  26. package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +157 -162
  27. package/src/components/descope-new-password/descope-new-password-internal/componentName.js +1 -1
  28. package/src/components/descope-new-password/descope-new-password-internal/index.js +3 -3
  29. package/src/components/descope-new-password/index.js +3 -3
  30. package/src/components/descope-number-field/NumberFieldClass.js +25 -20
  31. package/src/components/descope-passcode/PasscodeClass.js +95 -95
  32. package/src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js +151 -157
  33. package/src/components/descope-passcode/descope-passcode-internal/helpers.js +7 -8
  34. package/src/components/descope-passcode/descope-passcode-internal/index.js +2 -2
  35. package/src/components/descope-passcode/index.js +2 -2
  36. package/src/components/descope-password/PasswordClass.js +75 -83
  37. package/src/components/descope-password/passwordDraggableMixin.js +28 -27
  38. package/src/components/descope-phone-field/CountryCodes.js +1210 -1210
  39. package/src/components/descope-phone-field/PhoneFieldClass.js +139 -141
  40. package/src/components/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +157 -173
  41. package/src/components/descope-phone-field/helpers.js +3 -3
  42. package/src/components/descope-text/TextClass.js +25 -29
  43. package/src/components/descope-text-area/TextAreaClass.js +68 -67
  44. package/src/components/descope-text-field/TextFieldClass.js +42 -37
  45. package/src/components/descope-text-field/textFieldMappings.js +40 -55
  46. package/src/components/descope-totp-image/TotpImageClass.js +5 -1
  47. package/src/components/descope-upload-file/UploadFileClass.js +202 -0
  48. package/src/components/descope-upload-file/helpers.js +11 -0
  49. package/src/components/descope-upload-file/index.js +6 -0
  50. package/src/constants.js +3 -3
  51. package/src/helpers/componentHelpers.js +68 -74
  52. package/src/helpers/index.js +17 -16
  53. package/src/helpers/mixinsHelpers.js +21 -10
  54. package/src/helpers/themeHelpers/colorsHelpers.js +18 -18
  55. package/src/helpers/themeHelpers/componentsThemeManager.js +7 -6
  56. package/src/helpers/themeHelpers/index.js +114 -124
  57. package/src/helpers/themeHelpers/resetHelpers.js +16 -16
  58. package/src/index.cjs.js +3 -3
  59. package/src/index.d.ts +22 -21
  60. package/src/index.js +5 -4
  61. package/src/index.umd.js +14 -13
  62. package/src/mixins/changeMixin.js +18 -17
  63. package/src/mixins/componentNameValidationMixin.js +19 -19
  64. package/src/mixins/createProxy.js +33 -33
  65. package/src/mixins/createStyleMixin/helpers.js +54 -64
  66. package/src/mixins/createStyleMixin/index.js +155 -141
  67. package/src/mixins/draggableMixin.js +61 -61
  68. package/src/mixins/hoverableMixin.js +11 -13
  69. package/src/mixins/index.js +6 -6
  70. package/src/mixins/inputEventsDispatchingMixin.js +61 -60
  71. package/src/mixins/inputValidationMixin.js +153 -148
  72. package/src/mixins/lifecycleEventsMixin.js +17 -15
  73. package/src/mixins/normalizeBooleanAttributesMixin.js +31 -23
  74. package/src/mixins/portalMixin.js +58 -52
  75. package/src/mixins/proxyInputMixin.js +138 -132
  76. package/src/theme/components/button.js +86 -81
  77. package/src/theme/components/checkbox.js +26 -28
  78. package/src/theme/components/comboBox.js +32 -31
  79. package/src/theme/components/container.js +99 -89
  80. package/src/theme/components/divider.js +30 -31
  81. package/src/theme/components/emailField.js +20 -19
  82. package/src/theme/components/image.js +3 -3
  83. package/src/theme/components/index.js +33 -25
  84. package/src/theme/components/inputWrapper.js +28 -25
  85. package/src/theme/components/link.js +29 -36
  86. package/src/theme/components/loader/index.js +3 -3
  87. package/src/theme/components/loader/loaderLinear.js +34 -34
  88. package/src/theme/components/loader/loaderRadial.js +40 -34
  89. package/src/theme/components/logo.js +4 -4
  90. package/src/theme/components/newPassword.js +14 -13
  91. package/src/theme/components/numberField.js +20 -19
  92. package/src/theme/components/passcode.js +20 -22
  93. package/src/theme/components/password.js +22 -21
  94. package/src/theme/components/phoneField.js +23 -23
  95. package/src/theme/components/switchToggle.js +47 -46
  96. package/src/theme/components/text.js +72 -72
  97. package/src/theme/components/textArea.js +27 -25
  98. package/src/theme/components/textField.js +23 -22
  99. package/src/theme/components/totpImage.js +4 -4
  100. package/src/theme/components/uploadFile.js +60 -0
  101. package/src/theme/globals.js +123 -124
  102. package/src/theme/index.js +1 -1
  103. package/dist/cjs/index.cjs.js +0 -5924
  104. package/dist/cjs/index.cjs.js.map +0 -1
  105. package/dist/cjs/package.json +0 -1
  106. package/dist/index.d.ts +0 -51
  107. package/dist/index.esm.js +0 -6606
  108. package/dist/index.esm.js.map +0 -1
  109. package/dist/umd/1018.js +0 -577
  110. package/dist/umd/1018.js.LICENSE.txt +0 -23
  111. package/dist/umd/2481.js +0 -1
  112. package/dist/umd/3208.js +0 -2
  113. package/dist/umd/3208.js.LICENSE.txt +0 -5
  114. package/dist/umd/3585.js +0 -1
  115. package/dist/umd/3878.js +0 -1
  116. package/dist/umd/4201.js +0 -1
  117. package/dist/umd/422.js +0 -2
  118. package/dist/umd/422.js.LICENSE.txt +0 -5
  119. package/dist/umd/4447.js +0 -1
  120. package/dist/umd/4513.js +0 -1
  121. package/dist/umd/4803.js +0 -1
  122. package/dist/umd/541.js +0 -744
  123. package/dist/umd/541.js.LICENSE.txt +0 -21
  124. package/dist/umd/5767.js +0 -2
  125. package/dist/umd/5767.js.LICENSE.txt +0 -15
  126. package/dist/umd/5806.js +0 -109
  127. package/dist/umd/5806.js.LICENSE.txt +0 -5
  128. package/dist/umd/7056.js +0 -48
  129. package/dist/umd/7056.js.LICENSE.txt +0 -5
  130. package/dist/umd/7101.js +0 -148
  131. package/dist/umd/7101.js.LICENSE.txt +0 -11
  132. package/dist/umd/729.js +0 -1
  133. package/dist/umd/7824.js +0 -229
  134. package/dist/umd/7824.js.LICENSE.txt +0 -27
  135. package/dist/umd/7840.js +0 -356
  136. package/dist/umd/7840.js.LICENSE.txt +0 -61
  137. package/dist/umd/8725.js +0 -37
  138. package/dist/umd/8725.js.LICENSE.txt +0 -11
  139. package/dist/umd/9211.js +0 -312
  140. package/dist/umd/9211.js.LICENSE.txt +0 -5
  141. package/dist/umd/9241.js +0 -1
  142. package/dist/umd/9314.js +0 -283
  143. package/dist/umd/9314.js.LICENSE.txt +0 -27
  144. package/dist/umd/9437.js +0 -19
  145. package/dist/umd/9437.js.LICENSE.txt +0 -5
  146. package/dist/umd/9515.js +0 -202
  147. package/dist/umd/9515.js.LICENSE.txt +0 -11
  148. package/dist/umd/9789.js +0 -1
  149. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +0 -1
  150. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +0 -1
  151. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +0 -1
  152. package/dist/umd/descope-button-index-js.js +0 -1
  153. package/dist/umd/descope-combo-box-index-js.js +0 -1
  154. package/dist/umd/descope-container-index-js.js +0 -1
  155. package/dist/umd/descope-date-picker-index-js.js +0 -1
  156. package/dist/umd/descope-divider-index-js.js +0 -1
  157. package/dist/umd/descope-email-field-index-js.js +0 -1
  158. package/dist/umd/descope-image-index-js.js +0 -1
  159. package/dist/umd/descope-link-index-js.js +0 -1
  160. package/dist/umd/descope-loader-linear-index-js.js +0 -1
  161. package/dist/umd/descope-loader-radial-index-js.js +0 -1
  162. package/dist/umd/descope-logo-index-js.js +0 -1
  163. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +0 -1
  164. package/dist/umd/descope-new-password-index-js.js +0 -1
  165. package/dist/umd/descope-number-field-index-js.js +0 -1
  166. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +0 -1
  167. package/dist/umd/descope-passcode-index-js.js +0 -1
  168. package/dist/umd/descope-password-index-js.js +0 -1
  169. package/dist/umd/descope-phone-field-descope-phone-field-internal-index-js.js +0 -1
  170. package/dist/umd/descope-phone-field-index-js.js +0 -1
  171. package/dist/umd/descope-text-area-index-js.js +0 -1
  172. package/dist/umd/descope-text-field-index-js.js +0 -1
  173. package/dist/umd/descope-text-index-js.js +0 -1
  174. package/dist/umd/descope-totp-image-index-js.js +0 -1
  175. package/dist/umd/index.js +0 -1
@@ -3,22 +3,22 @@ import { observeAttributes } from '../../../helpers/componentHelpers';
3
3
  import { NewPasswordClass } from '../NewPasswordClass';
4
4
  import { componentName } from './componentName';
5
5
 
6
- const passwordAttrPrefixRegex = /^password-/
7
- const confirmAttrPrefixRegex = /^confirm-/
6
+ const passwordAttrPrefixRegex = /^password-/;
7
+ const confirmAttrPrefixRegex = /^confirm-/;
8
8
 
9
- const removeAttrPrefix = (attr, prefix) => attr.replace(prefix, '')
9
+ const removeAttrPrefix = (attr, prefix) => attr.replace(prefix, '');
10
10
 
11
11
  const passwordInputAttrs = ['password-label', 'password-placeholder'];
12
12
  const confirmInputAttrs = ['confirm-label', 'confirm-placeholder'];
13
13
  const commonAttrs = [
14
- 'disabled',
15
- 'bordered',
16
- 'size',
17
- 'full-width',
18
- 'maxlength',
19
- 'invalid',
20
- 'readonly',
21
- 'draggable'
14
+ 'disabled',
15
+ 'bordered',
16
+ 'size',
17
+ 'full-width',
18
+ 'maxlength',
19
+ 'invalid',
20
+ 'readonly',
21
+ 'draggable',
22
22
  ];
23
23
 
24
24
  const inputRelatedAttrs = [].concat(commonAttrs, passwordInputAttrs, confirmInputAttrs);
@@ -26,166 +26,161 @@ const inputRelatedAttrs = [].concat(commonAttrs, passwordInputAttrs, confirmInpu
26
26
  const BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });
27
27
 
28
28
  class NewPasswordInternal extends BaseInputClass {
29
- static get observedAttributes() {
30
- return ['has-confirm'].concat(
31
- BaseInputClass.observedAttributes || [],
32
- inputRelatedAttrs,
33
- );
34
- }
29
+ static get observedAttributes() {
30
+ return ['has-confirm'].concat(BaseInputClass.observedAttributes || [], inputRelatedAttrs);
31
+ }
35
32
 
36
- constructor() {
37
- super();
33
+ constructor() {
34
+ super();
38
35
 
39
- this.innerHTML = `
36
+ this.innerHTML = `
40
37
  <div class="wrapper"></div>
41
38
  `;
42
39
 
43
- this.wrapperEle = this.querySelector('.wrapper')
44
- }
45
-
46
- get value() {
47
- return this.passwordInput?.value || '';
48
- }
49
-
50
- set value(val) {
51
- if (val === this.value) return;
52
- this.value = val;
53
- }
54
-
55
- get hasConfirm() {
56
- return this.getAttribute('has-confirm') === 'true';
57
- }
58
-
59
- getValidity() {
60
- if (this.isRequired && !this.value) {
61
- return { valueMissing: true };
62
- }
63
- if (this.hasConfirm && this.confirmInput && this.value !== this.confirmInput.value) {
64
- return { patternMismatch: true };
65
- }
66
-
67
- const min = this.getAttribute('minlength');
68
- const minVal = parseInt(min, 10) || 0;
69
- const minValid = this.value.length >= minVal;
70
- if (!minValid) {
71
- return { tooShort: true }
72
- }
73
-
74
- return {}
75
- };
76
-
77
- init() {
78
- this.addEventListener('focus', (e) => {
79
- // we want to ignore focus events we are dispatching
80
- if (e.isTrusted) {
81
- this.passwordInput.focus()
82
- }
83
- });
84
-
85
- super.init?.();
86
- this.renderInputs(this.hasConfirm);
87
- }
88
-
89
- renderInputs(shouldRenderConfirm) {
90
- let template = `<descope-password data-id="password"></descope-password>`;
91
-
92
- if (shouldRenderConfirm) {
93
- template += `<descope-password data-id="confirm"></descope-password>`
94
- }
95
-
96
- this.wrapperEle.innerHTML = template;
97
-
98
- this.passwordInput = this.querySelector('[data-id="password"]');
99
- this.confirmInput = this.querySelector('[data-id="confirm"]');
100
-
101
- this.inputs = [this.passwordInput, this.confirmInput];
102
-
103
- this.initInputs();
104
-
105
- // we are calling attributeChangedCallback with all the input related attributes
106
- // in order to set it on the newly generated input
107
- [...passwordInputAttrs, ...confirmInputAttrs, ...commonAttrs].forEach(attr => {
108
- this.attributeChangedCallback(attr, null, this.getAttribute(attr))
109
- })
110
- }
111
-
112
- // the inputs are not required but we still want it to have a required
113
- // indicator in case the root component is required
114
- handleIndicatorStyle() {
115
- for (const input of this.inputs) {
116
- const styleTag = document.createElement('style');
117
- styleTag.innerHTML = `
40
+ this.wrapperEle = this.querySelector('.wrapper');
41
+ }
42
+
43
+ get value() {
44
+ return this.passwordInput?.value || '';
45
+ }
46
+
47
+ set value(val) {
48
+ if (val === this.value) return;
49
+ this.value = val;
50
+ }
51
+
52
+ get hasConfirm() {
53
+ return this.getAttribute('has-confirm') === 'true';
54
+ }
55
+
56
+ getValidity() {
57
+ if (this.isRequired && !this.value) {
58
+ return { valueMissing: true };
59
+ }
60
+ if (this.hasConfirm && this.confirmInput && this.value !== this.confirmInput.value) {
61
+ return { patternMismatch: true };
62
+ }
63
+
64
+ const min = this.getAttribute('minlength');
65
+ const minVal = parseInt(min, 10) || 0;
66
+ const minValid = this.value.length >= minVal;
67
+ if (!minValid) {
68
+ return { tooShort: true };
69
+ }
70
+
71
+ return {};
72
+ }
73
+
74
+ init() {
75
+ this.addEventListener('focus', (e) => {
76
+ // we want to ignore focus events we are dispatching
77
+ if (e.isTrusted) {
78
+ this.passwordInput.focus();
79
+ }
80
+ });
81
+
82
+ super.init?.();
83
+ this.renderInputs(this.hasConfirm);
84
+ }
85
+
86
+ renderInputs(shouldRenderConfirm) {
87
+ let template = `<descope-password data-id="password"></descope-password>`;
88
+
89
+ if (shouldRenderConfirm) {
90
+ template += `<descope-password data-id="confirm"></descope-password>`;
91
+ }
92
+
93
+ this.wrapperEle.innerHTML = template;
94
+
95
+ this.passwordInput = this.querySelector('[data-id="password"]');
96
+ this.confirmInput = this.querySelector('[data-id="confirm"]');
97
+
98
+ this.inputs = [this.passwordInput, this.confirmInput];
99
+
100
+ this.initInputs();
101
+
102
+ // we are calling attributeChangedCallback with all the input related attributes
103
+ // in order to set it on the newly generated input
104
+ [...passwordInputAttrs, ...confirmInputAttrs, ...commonAttrs].forEach((attr) => {
105
+ this.attributeChangedCallback(attr, null, this.getAttribute(attr));
106
+ });
107
+ }
108
+
109
+ // the inputs are not required but we still want it to have a required
110
+ // indicator in case the root component is required
111
+ handleIndicatorStyle() {
112
+ this.inputs.forEach((input) => {
113
+ const styleTag = document.createElement('style');
114
+ styleTag.innerHTML = `
118
115
  :host::part(required-indicator)::after {
119
116
  content: var(${NewPasswordClass.cssVarList.inputsRequiredIndicator});
120
117
  }
121
118
  `;
122
- input?.shadowRoot.appendChild(styleTag);
123
- }
124
- }
125
-
126
- get isInvalid() {
127
- return this.hasAttribute('invalid') && this.getAttribute('invalid') !== 'false'
128
- }
129
-
130
- // for some reason, Vaadin is removing the invalid attribute on several events,
131
- // e.g. focus, input, etc..., so we need to make sure the inputs will stay invalid
132
- // if the root component is invalid
133
- handleInputsInvalidAttribute() {
134
- this.inputs.forEach(input => {
135
- input && observeAttributes(input, (changedAttributes) => {
136
- if (changedAttributes.includes('invalid')) {
137
- const inputInvalidValue = input.getAttribute('invalid')
138
- const rootInvalidValue = this.getAttribute('invalid')
139
-
140
- if (this.isInvalid && rootInvalidValue !== inputInvalidValue) {
141
- input.setAttribute('invalid', 'true')
142
- }
143
- }
144
- }, {});
145
- })
146
- }
147
-
148
- initInputs() {
149
- this.handleIndicatorStyle()
150
- this.handleInputsInvalidAttribute();
151
- this.handleFocusEventsDispatching(this.inputs)
152
- }
153
-
154
- toggleBooleanAttribute(ele, name, value) {
155
- value === null ?
156
- ele?.removeAttribute(name) :
157
- ele?.setAttribute(name, value)
158
- }
159
-
160
- attributeChangedCallback(attrName, oldValue, newValue) {
161
- super.attributeChangedCallback?.(attrName, oldValue, newValue);
162
-
163
- if (oldValue !== newValue) {
164
- if (attrName === 'has-confirm') {
165
- this.renderInputs(newValue !== null && newValue !== 'false');
166
- }
167
- else if (commonAttrs.includes(attrName)) {
168
- this.inputs.forEach(
169
- (input) => this.toggleBooleanAttribute(input, attrName, newValue)
170
- );
171
- }
172
- else if (passwordInputAttrs.includes(attrName)) {
173
- this.toggleBooleanAttribute(
174
- this.passwordInput,
175
- removeAttrPrefix(attrName, passwordAttrPrefixRegex),
176
- newValue
177
- );
178
- }
179
- else if (confirmInputAttrs.includes(attrName)) {
180
- this.toggleBooleanAttribute(
181
- this.confirmInput,
182
- removeAttrPrefix(attrName, confirmAttrPrefixRegex),
183
- newValue
184
- );
185
-
186
- }
187
- }
188
- }
119
+ input?.shadowRoot.appendChild(styleTag);
120
+ });
121
+ }
122
+
123
+ get isInvalid() {
124
+ return this.hasAttribute('invalid') && this.getAttribute('invalid') !== 'false';
125
+ }
126
+
127
+ // for some reason, Vaadin is removing the invalid attribute on several events,
128
+ // e.g. focus, input, etc..., so we need to make sure the inputs will stay invalid
129
+ // if the root component is invalid
130
+ handleInputsInvalidAttribute() {
131
+ this.inputs.forEach((input) => {
132
+ input &&
133
+ observeAttributes(
134
+ input,
135
+ (changedAttributes) => {
136
+ if (changedAttributes.includes('invalid')) {
137
+ const inputInvalidValue = input.getAttribute('invalid');
138
+ const rootInvalidValue = this.getAttribute('invalid');
139
+
140
+ if (this.isInvalid && rootInvalidValue !== inputInvalidValue) {
141
+ input.setAttribute('invalid', 'true');
142
+ }
143
+ }
144
+ },
145
+ {}
146
+ );
147
+ });
148
+ }
149
+
150
+ initInputs() {
151
+ this.handleIndicatorStyle();
152
+ this.handleInputsInvalidAttribute();
153
+ this.handleFocusEventsDispatching(this.inputs);
154
+ }
155
+
156
+ // eslint-disable-next-line class-methods-use-this
157
+ toggleBooleanAttribute(ele, name, value) {
158
+ value === null ? ele?.removeAttribute(name) : ele?.setAttribute(name, value);
159
+ }
160
+
161
+ attributeChangedCallback(attrName, oldValue, newValue) {
162
+ super.attributeChangedCallback?.(attrName, oldValue, newValue);
163
+
164
+ if (oldValue !== newValue) {
165
+ if (attrName === 'has-confirm') {
166
+ this.renderInputs(newValue !== null && newValue !== 'false');
167
+ } else if (commonAttrs.includes(attrName)) {
168
+ this.inputs.forEach((input) => this.toggleBooleanAttribute(input, attrName, newValue));
169
+ } else if (passwordInputAttrs.includes(attrName)) {
170
+ this.toggleBooleanAttribute(
171
+ this.passwordInput,
172
+ removeAttrPrefix(attrName, passwordAttrPrefixRegex),
173
+ newValue
174
+ );
175
+ } else if (confirmInputAttrs.includes(attrName)) {
176
+ this.toggleBooleanAttribute(
177
+ this.confirmInput,
178
+ removeAttrPrefix(attrName, confirmAttrPrefixRegex),
179
+ newValue
180
+ );
181
+ }
182
+ }
183
+ }
189
184
  }
190
185
 
191
186
  export default NewPasswordInternal;
@@ -1,3 +1,3 @@
1
- import { getComponentName } from "../../../helpers/componentHelpers";
1
+ import { getComponentName } from '../../../helpers/componentHelpers';
2
2
 
3
3
  export const componentName = getComponentName('new-password-internal');
@@ -1,4 +1,4 @@
1
- import NewPasswordInternal from "./NewPasswordInternal"
2
- import { componentName } from "./componentName"
1
+ import NewPasswordInternal from './NewPasswordInternal';
2
+ import { componentName } from './componentName';
3
3
 
4
- customElements.define(componentName, NewPasswordInternal)
4
+ customElements.define(componentName, NewPasswordInternal);
@@ -1,7 +1,7 @@
1
1
  import { componentName, NewPasswordClass } from './NewPasswordClass';
2
- import '../descope-text-field'
3
- import '../descope-password'
4
- import './descope-new-password-internal'
2
+ import '../descope-text-field';
3
+ import '../descope-password';
4
+ import './descope-new-password-internal';
5
5
 
6
6
  customElements.define(componentName, NewPasswordClass);
7
7
 
@@ -1,38 +1,43 @@
1
1
  import {
2
- createStyleMixin,
3
- draggableMixin,
4
- createProxy,
5
- proxyInputMixin,
6
- componentNameValidationMixin
2
+ createStyleMixin,
3
+ draggableMixin,
4
+ createProxy,
5
+ proxyInputMixin,
6
+ componentNameValidationMixin,
7
7
  } from '../../mixins';
8
8
  import textFieldMappings from '../descope-text-field/textFieldMappings';
9
9
  import { compose } from '../../helpers';
10
10
  import { getComponentName } from '../../helpers/componentHelpers';
11
- import { resetInputOverrides, useHostExternalPadding } from '../../helpers/themeHelpers/resetHelpers';
11
+ import {
12
+ resetInputOverrides,
13
+ useHostExternalPadding,
14
+ } from '../../helpers/themeHelpers/resetHelpers';
12
15
 
13
16
  export const componentName = getComponentName('number-field');
14
17
 
15
18
  export const NumberFieldClass = compose(
16
- createStyleMixin({
17
- mappings: textFieldMappings
18
- }),
19
- draggableMixin,
20
- proxyInputMixin,
21
- componentNameValidationMixin
19
+ createStyleMixin({
20
+ mappings: textFieldMappings,
21
+ }),
22
+ draggableMixin,
23
+ proxyInputMixin,
24
+ componentNameValidationMixin
22
25
  )(
23
- createProxy({
24
- slots: ['prefix', 'suffix'],
25
- wrappedEleName: 'vaadin-number-field',
26
- style: () => `
26
+ createProxy({
27
+ slots: ['prefix', 'suffix'],
28
+ wrappedEleName: 'vaadin-number-field',
29
+ style: () => `
27
30
  :host {
28
31
  display: inline-block;
29
32
  max-width: 100%;
30
- padding: calc(var(${NumberFieldClass.cssVarList.inputOutlineWidth}) + var(${NumberFieldClass.cssVarList.inputOutlineOffset}));
33
+ padding: calc(var(${NumberFieldClass.cssVarList.inputOutlineWidth}) + var(${
34
+ NumberFieldClass.cssVarList.inputOutlineOffset
35
+ }));
31
36
  }
32
37
  ${useHostExternalPadding(NumberFieldClass.cssVarList)}
33
38
  ${resetInputOverrides('vaadin-number-field', NumberFieldClass.cssVarList)}
34
39
  `,
35
- excludeAttrsSync: ['tabindex'],
36
- componentName
37
- })
40
+ excludeAttrsSync: ['tabindex'],
41
+ componentName,
42
+ })
38
43
  );