@descope/web-components-ui 3.24.0 → 3.26.0

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 (40) hide show
  1. package/dist/cjs/index.cjs.js +2134 -1370
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +3057 -2083
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/8961.js +1 -1
  6. package/dist/umd/8961.js.map +1 -1
  7. package/dist/umd/DescopeDev.js +1 -1
  8. package/dist/umd/DescopeDev.js.map +1 -1
  9. package/dist/umd/descope-email-field.js +55 -0
  10. package/dist/umd/descope-email-field.js.map +1 -0
  11. package/dist/umd/descope-hybrid-field-index-js.js +3 -3
  12. package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
  13. package/dist/umd/descope-new-email.js +55 -0
  14. package/dist/umd/descope-new-email.js.LICENSE.txt +11 -0
  15. package/dist/umd/descope-new-email.js.map +1 -0
  16. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  17. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -1
  18. package/dist/umd/descope-new-password-index-js.js +1 -1
  19. package/dist/umd/descope-new-password-index-js.js.map +1 -1
  20. package/dist/umd/descope-policy-validation-index-js.js +1 -1
  21. package/dist/umd/descope-policy-validation-index-js.js.map +1 -1
  22. package/dist/umd/index.js +1 -1
  23. package/dist/umd/index.js.map +1 -1
  24. package/package.json +45 -43
  25. package/src/components/descope-hybrid-field/index.js +1 -1
  26. package/src/components/descope-new-password/NewPasswordClass.js +1 -0
  27. package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +1 -0
  28. package/src/components/descope-policy-validation/PolicyValidationClass.js +21 -6
  29. package/src/index.cjs.js +0 -1
  30. package/src/index.js +0 -1
  31. package/src/theme/components/index.js +3 -1
  32. package/stories/descope-email-field.stories.js +1 -1
  33. package/stories/descope-policy-validation.stories.js +21 -1
  34. package/dist/umd/descope-email-field-index-js.js +0 -55
  35. package/dist/umd/descope-email-field-index-js.js.map +0 -1
  36. package/src/components/descope-email-field/EmailFieldClass.js +0 -138
  37. package/src/components/descope-email-field/emailPattern.js +0 -7
  38. package/src/components/descope-email-field/index.js +0 -6
  39. package/src/theme/components/emailField.js +0 -55
  40. /package/dist/umd/{descope-email-field-index-js.js.LICENSE.txt → descope-email-field.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "git+https://github.com/descope/web-components-ui.git",
6
6
  "directory": "packages/web-components/web-components-ui"
7
7
  },
8
- "version": "3.24.0",
8
+ "version": "3.26.0",
9
9
  "description": "",
10
10
  "main": "dist/cjs/index.cjs.js",
11
11
  "module": "dist/index.esm.js",
@@ -57,11 +57,11 @@
57
57
  "webpack-cli": "^7.0.0",
58
58
  "webpack-dev-server": "^5.0.0",
59
59
  "webpack-subresource-integrity": "5.2.0-rc.1",
60
- "eslint-plugin-no-bare-class-import": "3.24.0",
61
- "rollup-replace-plugin": "3.24.0",
62
- "test-drivers": "3.24.0",
63
- "webpack-extract-font-loader": "3.24.0",
64
- "webpack-replace-plugin": "3.24.0"
60
+ "test-drivers": "3.26.0",
61
+ "webpack-extract-font-loader": "3.26.0",
62
+ "webpack-replace-plugin": "3.26.0",
63
+ "rollup-replace-plugin": "3.26.0",
64
+ "eslint-plugin-no-bare-class-import": "3.26.0"
65
65
  },
66
66
  "dependencies": {
67
67
  "@vaadin/checkbox": "24.3.4",
@@ -85,43 +85,45 @@
85
85
  "libphonenumber-js": "^1.11.12",
86
86
  "lodash.debounce": "4.0.8",
87
87
  "lodash.merge": "4.6.2",
88
- "@descope-ui/common": "3.24.0",
89
- "@descope-ui/descope-active-sessions": "3.24.0",
90
- "@descope-ui/descope-address-field": "3.24.0",
91
- "@descope-ui/descope-country-subdivision-city-field": "3.24.0",
92
- "@descope-ui/descope-apps-list": "3.24.0",
93
- "@descope-ui/descope-autocomplete-field": "3.24.0",
94
- "@descope-ui/descope-avatar": "3.24.0",
95
- "@descope-ui/descope-badge": "3.24.0",
96
- "@descope-ui/descope-button": "3.24.0",
97
- "@descope-ui/descope-collapsible-container": "3.24.0",
98
- "@descope-ui/descope-combo-box": "3.24.0",
99
- "@descope-ui/descope-enriched-text": "3.24.0",
100
- "@descope-ui/descope-icon": "3.24.0",
101
- "@descope-ui/descope-image": "3.24.0",
102
- "@descope-ui/descope-link": "3.24.0",
103
- "@descope-ui/descope-list": "3.24.0",
104
- "@descope-ui/descope-list-item": "3.24.0",
105
- "@descope-ui/descope-month-day-field": "3.24.0",
106
- "@descope-ui/descope-month-day-field-picker": "3.24.0",
107
- "@descope-ui/descope-multi-line-mappings": "3.24.0",
108
- "@descope-ui/descope-multi-select-combo-box": "3.24.0",
109
- "@descope-ui/descope-outbound-app-button": "3.24.0",
110
- "@descope-ui/descope-outbound-apps": "3.24.0",
111
- "@descope-ui/descope-password-strength": "3.24.0",
112
- "@descope-ui/descope-ponyhot": "3.24.0",
113
- "@descope-ui/descope-recovery-codes": "3.24.0",
114
- "@descope-ui/descope-text": "3.24.0",
115
- "@descope-ui/descope-text-field": "3.24.0",
116
- "@descope-ui/descope-timer": "3.24.0",
117
- "@descope-ui/descope-timer-button": "3.24.0",
118
- "@descope-ui/descope-tooltip": "3.24.0",
119
- "@descope-ui/descope-multi-sso": "3.24.0",
120
- "@descope-ui/descope-trusted-devices": "3.24.0",
121
- "@descope-ui/descope-attachment": "3.24.0",
122
- "@descope-ui/descope-anchored": "3.24.0",
123
- "@descope-ui/descope-user-passkeys": "3.24.0",
124
- "@descope-ui/descope-filter": "3.24.0"
88
+ "@descope-ui/common": "3.26.0",
89
+ "@descope-ui/descope-active-sessions": "3.26.0",
90
+ "@descope-ui/descope-address-field": "3.26.0",
91
+ "@descope-ui/descope-country-subdivision-city-field": "3.26.0",
92
+ "@descope-ui/descope-apps-list": "3.26.0",
93
+ "@descope-ui/descope-autocomplete-field": "3.26.0",
94
+ "@descope-ui/descope-avatar": "3.26.0",
95
+ "@descope-ui/descope-badge": "3.26.0",
96
+ "@descope-ui/descope-button": "3.26.0",
97
+ "@descope-ui/descope-collapsible-container": "3.26.0",
98
+ "@descope-ui/descope-combo-box": "3.26.0",
99
+ "@descope-ui/descope-email-field": "3.26.0",
100
+ "@descope-ui/descope-list": "3.26.0",
101
+ "@descope-ui/descope-list-item": "3.26.0",
102
+ "@descope-ui/descope-month-day-field": "3.26.0",
103
+ "@descope-ui/descope-month-day-field-picker": "3.26.0",
104
+ "@descope-ui/descope-image": "3.26.0",
105
+ "@descope-ui/descope-multi-line-mappings": "3.26.0",
106
+ "@descope-ui/descope-new-email": "3.26.0",
107
+ "@descope-ui/descope-outbound-app-button": "3.26.0",
108
+ "@descope-ui/descope-outbound-apps": "3.26.0",
109
+ "@descope-ui/descope-multi-select-combo-box": "3.26.0",
110
+ "@descope-ui/descope-password-strength": "3.26.0",
111
+ "@descope-ui/descope-ponyhot": "3.26.0",
112
+ "@descope-ui/descope-enriched-text": "3.26.0",
113
+ "@descope-ui/descope-link": "3.26.0",
114
+ "@descope-ui/descope-icon": "3.26.0",
115
+ "@descope-ui/descope-timer": "3.26.0",
116
+ "@descope-ui/descope-timer-button": "3.26.0",
117
+ "@descope-ui/descope-tooltip": "3.26.0",
118
+ "@descope-ui/descope-text-field": "3.26.0",
119
+ "@descope-ui/descope-multi-sso": "3.26.0",
120
+ "@descope-ui/descope-trusted-devices": "3.26.0",
121
+ "@descope-ui/descope-attachment": "3.26.0",
122
+ "@descope-ui/descope-anchored": "3.26.0",
123
+ "@descope-ui/descope-filter": "3.26.0",
124
+ "@descope-ui/descope-text": "3.26.0",
125
+ "@descope-ui/descope-user-passkeys": "3.26.0",
126
+ "@descope-ui/descope-recovery-codes": "3.26.0"
125
127
  },
126
128
  "overrides": {
127
129
  "@vaadin/avatar": "24.3.4",
@@ -1,4 +1,4 @@
1
- import '../descope-email-field';
1
+ import '@descope-ui/descope-email-field';
2
2
  import '../phone-fields/descope-phone-field';
3
3
  import '../phone-fields/descope-phone-input-box-field';
4
4
 
@@ -60,6 +60,7 @@ const customMixin = (superclass) =>
60
60
  'data-password-policy-value-passwordstrength',
61
61
  'data-password-policy-value-disallowedchars',
62
62
  'data-password-policy-value-email',
63
+ 'data-password-policy-value-reuse',
63
64
  'label-type',
64
65
  'manual-visibility-toggle',
65
66
  ],
@@ -20,6 +20,7 @@ const policyPanelAttrs = [
20
20
  'data-password-policy-value-passwordstrength',
21
21
  'data-password-policy-value-disallowedchars',
22
22
  'data-password-policy-value-email',
23
+ 'data-password-policy-value-reuse',
23
24
  'manual-visibility-toggle',
24
25
  ];
25
26
  const commonAttrs = [
@@ -13,6 +13,7 @@ const overrideAttrs = [
13
13
  'data-password-policy-actual-passwordstrength',
14
14
  'data-password-policy-value-disallowedchars',
15
15
  'data-password-policy-value-email',
16
+ 'data-password-policy-value-reuse',
16
17
  ];
17
18
  const dataAttrs = ['data', 'active-policies', 'overrides', ...overrideAttrs];
18
19
  const policyAttrs = ['label', 'value', ...dataAttrs];
@@ -109,6 +110,13 @@ class RawPolicyValidation extends createBaseClass({ componentName, baseSelector:
109
110
  }
110
111
  }
111
112
 
113
+ if (attrName === 'data-password-policy-value-reuse') {
114
+ const ln = Number(newValue);
115
+ if (!Number.isNaN(ln) && ln > 0) {
116
+ this.#overrides = { ...this.#overrides, reuse: { value: `${ln}` } };
117
+ }
118
+ }
119
+
112
120
  if (attrName === 'data-password-policy-value-passwordstrength') {
113
121
  const passwordStrength = parseInt(newValue);
114
122
  if (!Number.isNaN(passwordStrength) && passwordStrength >= 0) {
@@ -227,17 +235,17 @@ class RawPolicyValidation extends createBaseClass({ componentName, baseSelector:
227
235
  });
228
236
  }
229
237
 
230
- return this.#activePolicies.reduce((results, id) => {
238
+ const items = this.#activePolicies.reduce((results, id) => {
231
239
  const policy = policies.find((p) => p.id === id);
232
240
 
233
241
  if (!policy) {
234
242
  return results;
235
243
  }
236
244
 
237
- const { pattern, message, data, compare } = policy;
245
+ const { pattern, message, data, compare, info } = policy;
238
246
  const normalizedCompare = typeof compare === 'string' ? compare.toUpperCase() : compare;
239
247
 
240
- if ((!pattern && !compare) || !message) {
248
+ if ((!pattern && !compare && !info) || !message) {
241
249
  return results;
242
250
  }
243
251
 
@@ -246,7 +254,11 @@ class RawPolicyValidation extends createBaseClass({ componentName, baseSelector:
246
254
  id,
247
255
  };
248
256
 
249
- if (pattern) {
257
+ if (info) {
258
+ // informational rule the client can't check (e.g. password reuse):
259
+ // `valid` stays undefined, so it renders neutral and never blocks `isValid`
260
+ validationResult.info = true;
261
+ } else if (pattern) {
250
262
  const exp = new RegExp(interpolateString(pattern, data));
251
263
  validationResult.valid = exp.test(this.value);
252
264
  } else if (normalizedCompare === 'STR_NEQ_CI') {
@@ -275,14 +287,17 @@ class RawPolicyValidation extends createBaseClass({ componentName, baseSelector:
275
287
 
276
288
  return results;
277
289
  }, []);
290
+
291
+ // informational rules always render last
292
+ return items.sort((a, b) => Number(!!a.info) - Number(!!b.info));
278
293
  }
279
294
 
280
295
  get isValid() {
281
296
  return !this.validate().some(({ valid }) => valid === false);
282
297
  }
283
298
 
284
- buildValidationItem({ valid, message }) {
285
- const status = !this.value ? 'none' : valid;
299
+ buildValidationItem({ valid, message, info }) {
300
+ const status = !this.value || info ? 'none' : valid;
286
301
  const li = document.createElement('li');
287
302
  li.className = 'item';
288
303
  li.dataset.valid = status;
package/src/index.cjs.js CHANGED
@@ -11,7 +11,6 @@ export { LoaderLinearClass } from './components/descope-loader-linear/LoaderLine
11
11
  export { LoaderRadialClass } from './components/descope-loader-radial/LoaderRadialClass';
12
12
  export { ContainerClass } from './components/descope-container/ContainerClass';
13
13
  export { DividerClass } from './components/descope-divider/DividerClass';
14
- export { EmailFieldClass } from './components/descope-email-field/EmailFieldClass';
15
14
  export { LogoClass } from './components/descope-logo/LogoClass';
16
15
  export { TotpImageClass } from './components/descope-totp-image/TotpImageClass';
17
16
  export { NotpImageClass } from './components/descope-notp-image/NotpImageClass';
package/src/index.js CHANGED
@@ -6,7 +6,6 @@ export * from './components/descope-container';
6
6
  export * from './components/descope-date-field/descope-calendar';
7
7
  export * from './components/descope-date-field';
8
8
  export * from './components/descope-divider';
9
- export * from './components/descope-email-field';
10
9
  export * from './components/descope-logo';
11
10
  export * from './components/descope-totp-image';
12
11
  export * from './components/descope-notp-image';
@@ -32,9 +32,10 @@ import * as textField from '@descope-ui/descope-text-field/theme';
32
32
  import * as monthDayField from '@descope-ui/descope-month-day-field/theme';
33
33
  import * as monthDayFieldPicker from '@descope-ui/descope-month-day-field-picker/theme';
34
34
  import * as filter from '@descope-ui/descope-filter/theme';
35
+ import * as emailField from '@descope-ui/descope-email-field/theme';
36
+ import * as newEmail from '@descope-ui/descope-new-email/theme';
35
37
  import * as password from './password';
36
38
  import * as numberField from './numberField';
37
- import * as emailField from './emailField';
38
39
  import * as textArea from './textArea';
39
40
  import * as checkbox from './checkbox';
40
41
  import * as switchToggle from './switchToggle';
@@ -98,6 +99,7 @@ const components = {
98
99
  phoneField,
99
100
  phoneInputBoxField,
100
101
  newPassword,
102
+ newEmail,
101
103
  inputWrapper,
102
104
  uploadFile,
103
105
  buttonSelectionGroupItem,
@@ -1,4 +1,4 @@
1
- import { componentName } from '../src/components/descope-email-field';
1
+ import { componentName } from '@descope-ui/descope-email-field';
2
2
  import {
3
3
  toggleDefaultErrorMessagePatternMismatchDecorator,
4
4
  toggleDefaultErrorMessageValueMissingDecorator,
@@ -47,6 +47,12 @@ const availablePolicies = [
47
47
  compare: 'STR_NEQ_CI',
48
48
  data: { expected: 'user@example.com' },
49
49
  },
50
+ {
51
+ id: 'reuse',
52
+ message: 'Cannot be one of your last {{value}} passwords',
53
+ info: true,
54
+ data: { value: 3 },
55
+ },
50
56
  ];
51
57
 
52
58
  // HTML-attribute-escape any user-supplied string so the template still parses
@@ -72,10 +78,21 @@ const Template = ({
72
78
  useMinLength,
73
79
  useDisallowedChars,
74
80
  useDisallowEmail,
81
+ useReuse,
75
82
  minLengthValue,
76
83
  disallowedCharsValue,
77
84
  emailValue,
85
+ useCustomReuseMessage,
78
86
  }) => {
87
+ // custom reuse message, as a Descoper would set it on the screen
88
+ const policiesData = useCustomReuseMessage
89
+ ? data.map((p) =>
90
+ p.id === 'reuse'
91
+ ? { ...p, message: 'Must differ from your previous {{value}} passwords' }
92
+ : p
93
+ )
94
+ : data;
95
+
79
96
  const policies = [
80
97
  useMinLength ? 'minlength' : null,
81
98
  useLowercase ? 'lowercase' : null,
@@ -85,13 +102,14 @@ const Template = ({
85
102
  useSymbol ? 'nonalphanumeric' : null,
86
103
  useDisallowedChars ? 'disallowedchars' : null,
87
104
  useDisallowEmail ? 'disallowemail' : null,
105
+ useReuse ? 'reuse' : null,
88
106
  ].filter(Boolean);
89
107
 
90
108
  return `
91
109
  <descope-policy-validation
92
110
  label="${escapeAttr(label)}"
93
111
  value="${escapeAttr(value)}"
94
- data="${escapeAttr(JSON.stringify(data) || '')}"
112
+ data="${escapeAttr(JSON.stringify(policiesData) || '')}"
95
113
  active-policies="${policies || ''}"
96
114
  data-password-policy-value-minlength="${escapeAttr(minLengthValue)}"
97
115
  data-password-policy-value-disallowedchars="${escapeAttr(disallowedCharsValue)}"
@@ -128,7 +146,9 @@ Default.args = {
128
146
  useMinLength: false,
129
147
  useDisallowedChars: false,
130
148
  useDisallowEmail: false,
149
+ useReuse: false,
131
150
  minLengthValue: undefined,
132
151
  disallowedCharsValue: `'"`,
133
152
  emailValue: 'user@example.com',
153
+ useCustomReuseMessage: false,
134
154
  };
@@ -1,55 +0,0 @@
1
- /*! For license information please see descope-email-field-index-js.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4838,5695],{47656(t,e,r){r.d(e,{A:()=>x});const{host:i,label:o,placeholder:n,requiredIndicator:l,inputField:a,input:p,inputMask:s,helperText:d,errorMessage:u,disabledPlaceholder:c,inputDisabled:h,inputIcon:y,externalInput:g,externalInputDisabled:m,externalPlaceholder:f,externalDisabledPlaceholder:b}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},i],fontFamily:[o,a,d,u],labelFontSize:{...o,property:"font-size"},labelFontWeight:{...o,property:"font-weight"},inputValueFontWeight:[{...p,property:"font-weight"},{...g,property:"font-weight"}],inputPlaceholderFontWeight:[{selector:()=>":host input:placeholder-shown",property:"font-weight"},{...f,property:"font-weight"}],helperTextFontWeight:{...d,property:"font-weight"},errorMessageFontWeight:{...u,property:"font-weight"},labelTextColor:[{...o,property:"color"},{...l,property:"color"},{...o,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],hostWidth:{...i,property:"width"},hostMinWidth:{...i,property:"min-width"},hostDirection:{...i,property:"direction"},inputDirection:{...p,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...u,property:"color"},errorMessageIcon:{...u,property:"background-image"},errorMessageIconSize:{...u,property:"background-size"},errorMessageIconPadding:{...u,property:"padding-inline-start"},errorMessageIconRepeat:{...u,property:"background-repeat"},errorMessageIconPosition:{...u,property:"background-position"},errorMessageFontSize:{...u,property:"font-size"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...m,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...g,property:"caret-color"}],labelRequiredIndicator:{...l,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"},{...g,property:"padding-left"},{...g,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...g,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...f,property:"color"},{...n,property:"color"},{...c,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],labelPosition:{...o,property:"position"},labelTopPosition:{...o,property:"top"},labelHorizontalPosition:[{...o,property:"left"},{...o,property:"right"}],inputTransformY:{...o,property:"transform"},inputTransition:{...o,property:"transition"},marginInlineStart:{...o,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...f,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...g,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...g,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...g,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"},inputTextSecurity:[{...p,property:"-webkit-text-security"},{...p,property:"text-security"},{...g,property:"-webkit-text-security"},{...g,property:"text-security"}]}},63768(t,e,r){r.r(e),r.d(e,{EmailFieldClass:()=>f,componentName:()=>g}),r(52733);var i=r(47642),o=r(87550);const n=o.AH`
3
- :host([dir='rtl']) [part='input-field'] ::slotted(input) {
4
- --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
5
- }
6
-
7
- :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
8
- --_lumo-text-field-overflow-mask-image: none;
9
- }
10
- `;(0,o.SF)("vaadin-email-field",[i.k,n],{moduleId:"lumo-email-field"});var l=r(82901),a=r(27136);const p=r(51450).AH`
11
- :host([dir='rtl']) [part='input-field'] {
12
- direction: ltr;
13
- }
14
-
15
- :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
16
- direction: rtl;
17
- text-align: left;
18
- }
19
- `;(0,o.SF)("vaadin-email-field",p,{moduleId:"vaadin-email-field-styles"});class s extends a.A{static get is(){return"vaadin-email-field"}constructor(){super(),this._setType("email"),this.pattern="^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9\\-.]+\\.[a-zA-Z0-9\\-]{2,}$"}ready(){super.ready(),this.inputElement&&(this.inputElement.autocapitalize="off")}}(0,l.X)(s);var d=r(47656),u=r(79365),c=r(9696),h=r(97810),y=r(73551);const g=(0,h.xE)("email-field"),m="email",f=(0,c.Zz)((0,u.RF)({mappings:d.A}),u.VO,(0,u.RV)({inputType:"email",inputName:"email",autocompleteType:"username",includeAttrs:["disabled","readonly","pattern"]}),(0,u.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),u.tQ,t=>class extends t{get acceptsUnicode(){return"false"!==this.getAttribute("accept-unicode")}init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.getAttribute("autocomplete")||this.setAttribute("autocomplete","username"),this.createExternalInput(),[this.inputElement,this.externalInput].filter(Boolean).forEach(t=>{t.addEventListener("change",this.stripSurroundingWhitespace)}),this.acceptsUnicode&&this.enableUnicode()}enableUnicode(){this.baseElement.setAttribute("pattern","^[\\p{L}\\p{M}\\p{N}._%+'\\-]+@[\\p{L}\\p{M}\\p{N}.\\-]+\\.[\\p{L}\\p{M}][\\p{L}\\p{M}\\p{N}\\-]+$"),this.baseElement._setType("text"),this.externalInput&&(this.externalInput.type="text"),this.getAttribute("inputmode")||this.setAttribute("inputmode",m),this.externalInput?.setAttribute("inputmode",m)}stripSurroundingWhitespace=t=>{const e=t.target.value.trim();e!==t.target.value&&(this.value=e,this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))}})((0,u.tz)({slots:["","suffix"],wrappedEleName:"vaadin-email-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${f.cssVarList.inputOutlineWidth}) + var(${f.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,y.$J)("vaadin-email-field")}\n\t\t\t${(0,y.cy)(f.cssVarList)}\n\t\t\t${(0,y.LJ)("vaadin-email-field",f.cssVarList)}\n ${(0,y.Kl)()}\n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\n vaadin-email-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:g}));customElements.define(g,f)},18330(t,e,r){r.d(e,{f:()=>o});var i=r(44099);class o extends i.r{constructor(t,e){super(t,"input","input",{initializer:(t,r)=>{r.value&&(t.value=r.value),r.type&&t.setAttribute("type",r.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},37436(t,e,r){r.d(e,{a:()=>o});var i=r(44218);const o=t=>class extends((0,i.R)(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}},27136(t,e,r){r.d(e,{A:()=>h}),r(86689);var i=r(13256),o=r(82901),n=r(72562),l=r(81488),a=r(86314),p=r(87550),s=r(18330),d=r(37436),u=r(37720);const c=t=>class extends((0,d.a)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new s.f(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t})),this.addController(new u.q(this.inputElement,this._labelController))}};(0,p.SF)("vaadin-text-field",a.k,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,p.cp)((0,n.q)(i.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return i.qy`
20
- <style>
21
- [part='input-field'] {
22
- flex-grow: 0;
23
- }
24
- </style>
25
-
26
- <div class="vaadin-field-container">
27
- <div part="label">
28
- <slot name="label"></slot>
29
- <span part="required-indicator" aria-hidden="true" on-click="focus"></span>
30
- </div>
31
-
32
- <vaadin-input-container
33
- part="input-field"
34
- readonly="[[readonly]]"
35
- disabled="[[disabled]]"
36
- invalid="[[invalid]]"
37
- theme$="[[_theme]]"
38
- >
39
- <slot name="prefix" slot="prefix"></slot>
40
- <slot name="input"></slot>
41
- <slot name="suffix" slot="suffix"></slot>
42
- <div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
43
- </vaadin-input-container>
44
-
45
- <div part="helper-text">
46
- <slot name="helper"></slot>
47
- </div>
48
-
49
- <div part="error-message">
50
- <slot name="error-message"></slot>
51
- </div>
52
- </div>
53
- <slot name="tooltip"></slot>
54
- `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new l.I(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,o.X)(h)},52733(t,e,r){r(27397);var i=r(47642);(0,r(87550).SF)("vaadin-text-field",i.k,{moduleId:"lumo-text-field-styles"}),r(27136)}}]);
55
- //# sourceMappingURL=descope-email-field-index-js.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"descope-email-field-index-js.js","mappings":";4JAAA,MAAAA,KACAA,EAAAC,MACAA,EAAAC,YACAA,EAAAC,kBACAA,EAAAC,WACAA,EAAAC,MACAA,EAAAC,UACAA,EAAAC,WACAA,EAAAC,aACAA,EAAAC,oBACAA,EAAAC,cACAA,EAAAC,UACAA,EAAAC,cACAA,EAAAC,sBACAA,EAAAC,oBACAA,EAAAC,4BACAA,GACE,CACFf,KAAA,CAAUgB,SAAA,aACVf,MAAA,CAAWe,SAAA,iBACXb,kBAAA,CACAa,SAAA,+CAEAd,YAAA,CACA,CAAMc,SAAA,6BACN,CAAMA,SAAA,gDAENP,oBAAA,CAAyBO,SAAA,iCACzBZ,WAAA,CAAgBY,SAAA,uBAChBX,MAAA,CAAWW,SAAA,SACXV,UAAA,CAAeU,SAAA,+BACfN,cAAA,CAAmBM,SAAA,kBACnBT,WAAA,CAAgBS,SAAA,uBAChBR,aAAA,CAAkBQ,SAAA,yBAClBL,UAAA,CAAeK,SAAA,eACfJ,cAAA,CAAmBI,SAAA,wBACnBH,sBAAA,CAA2BG,SAAA,iCAC3BF,oBAAA,CAAyBE,SAAA,0CACzBD,4BAAA,CACAC,SAAA,+CAIAC,EAAA,CAEAC,SAAA,IAAelB,GACfmB,WAAA,CAAAlB,EAAAG,EAAAG,EAAAC,GAEAY,cAAA,IAAmBnB,EAAAoB,SAAA,aAC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H,WAAAtM,KAGAgF,KAAAgH,cAAA,IAA6BO,EAAAC,EAAuBxH,KAAAI,aAAAJ,KAAAyH,kBACpD,IC5DA,EAAAtI,EAAAE,IAAc,oBAAsBqI,EAAAnI,EAAgB,CAAIC,SAAA,6BAuEjD,MAAAmI,UAAwBtB,GAAe,EAAAlH,EAAAyI,KAAc,EAAAC,EAAAL,GAAaM,EAAAC,OACzE,aAAAlI,GACA,yBACA,CAEA,mBAAAmI,GACA,OAAWF,EAAAG,EAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoCf,CAEA,qBAAApD,GACA,OAIA4B,UAAA,CACA/D,KAAAgE,QAMAC,UAAA,CACAjE,KAAAgE,QAGA,CAGA,KAAAvG,GACAJ,MAAAI,QAEAH,KAAAkI,mBAAA,IAAkCC,EAAAC,EAAiBpI,MACnDA,KAAAkI,mBAAAG,YAAA,OACArI,KAAAkI,mBAAAI,cAAAtI,KAAAI,cACAJ,KAAAgH,cAAAhH,KAAAkI,mBACA,GAGA,EAAA5H,EAAAC,GAAmBoH,0CCrJnB,WAAAtI,IAAc,oBAAsBC,EAAAC,EAAgB,CACpDC,SAAA","sources":["webpack://@descope/web-components-ui/../components/descope-text-field/src/component/textFieldMappings.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/email-field/theme/lumo/vaadin-email-field-styles.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/email-field/src/vaadin-email-field-styles.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/email-field/src/vaadin-email-field.js","webpack://@descope/web-components-ui/./src/components/descope-email-field/EmailFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-email-field/emailPattern.js","webpack://@descope/web-components-ui/./src/components/descope-email-field/index.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/field-base/src/input-field-mixin.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/text-field/src/vaadin-text-field-mixin.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/text-field/src/vaadin-text-field.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js"],"sourcesContent":["const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: {\n selector: '[required]::part(required-indicator)::after',\n },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: {\n selector: () => '::slotted(input:disabled::placeholder)',\n },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n inputValueFontWeight: [\n { ...input, property: 'font-weight' },\n { ...externalInput, property: 'font-weight' },\n ],\n inputPlaceholderFontWeight: [\n {\n selector: () => ':host input:placeholder-shown',\n property: 'font-weight',\n },\n { ...externalPlaceholder, property: 'font-weight' },\n ],\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: {\n ...errorMessage,\n property: 'padding-inline-start',\n },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: {\n ...errorMessage,\n property: 'background-position',\n },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\n ],\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n inputTextSecurity: [\n { ...input, property: '-webkit-text-security' },\n { ...input, property: 'text-security' },\n { ...externalInput, property: '-webkit-text-security' },\n { ...externalInput, property: 'text-security' },\n ],\n};\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst emailField = css`\n :host([dir='rtl']) [part='input-field'] ::slotted(input) {\n --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);\n }\n\n :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {\n --_lumo-text-field-overflow-mask-image: none;\n }\n`;\n\nregisterStyles('vaadin-email-field', [inputFieldShared, emailField], {\n moduleId: 'lumo-email-field',\n});\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\n// See https://github.com/vaadin/vaadin-text-field/issues/466\nexport const emailFieldStyles = css`\n :host([dir='rtl']) [part='input-field'] {\n direction: ltr;\n }\n\n :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {\n direction: rtl;\n text-align: left;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { TextField } from '@vaadin/text-field/src/vaadin-text-field.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { emailFieldStyles } from './vaadin-email-field-styles.js';\n\nregisterStyles('vaadin-email-field', emailFieldStyles, { moduleId: 'vaadin-email-field-styles' });\n\n/**\n * `<vaadin-email-field>` is a Web Component for email field control in forms.\n *\n * ```html\n * <vaadin-email-field label=\"Email\"></vaadin-email-field>\n * ```\n *\n * ### Styling\n *\n * `<vaadin-email-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\n * See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends TextField\n */\nexport class EmailField extends TextField {\n static get is() {\n return 'vaadin-email-field';\n }\n\n constructor() {\n super();\n this._setType('email');\n this.pattern = '^([a-zA-Z0-9_\\\\.\\\\-+])+@[a-zA-Z0-9\\\\-.]+\\\\.[a-zA-Z0-9\\\\-]{2,}$';\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n if (this.inputElement) {\n this.inputElement.autocapitalize = 'off';\n }\n }\n}\n\ndefineCustomElement(EmailField);\n","import textFieldMappings from '@descope-ui/descope-text-field/mappings';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n externalInputMixin,\n} from '../../mixins';\nimport { compose } from '../../helpers';\nimport { asciiPattern, unicodePattern } from './emailPattern';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('email-field');\n\nconst defaultAutocomplete = 'username';\nconst defaultInputMode = 'email';\n\nconst customMixin = (superclass) =>\n class EmailFieldMixinClass extends superclass {\n // On by default - `accept-unicode=\"false\"` restores the pre-unicode field:\n // native `type=\"email\"` validation and the ASCII pattern.\n //\n // Read once, in `init`. Changing the attribute afterwards has no effect; it\n // is static configuration, which is how every consumer sets it.\n get acceptsUnicode() {\n return this.getAttribute('accept-unicode') !== 'false';\n }\n\n init() {\n super.init?.();\n\n // we need to set the pattern on the base element because vaadin-email-field is overriding it\n this.baseElement.setAttribute('pattern', asciiPattern);\n\n if (!this.getAttribute('autocomplete')) {\n this.setAttribute('autocomplete', defaultAutocomplete);\n }\n\n this.createExternalInput();\n\n [this.inputElement, this.externalInput].filter(Boolean).forEach((input) => {\n input.addEventListener('change', this.stripSurroundingWhitespace);\n });\n\n if (this.acceptsUnicode) {\n this.enableUnicode();\n }\n }\n\n enableUnicode() {\n this.baseElement.setAttribute('pattern', unicodePattern);\n\n // native `type=\"email\"` validation is ASCII only and sets typeMismatch\n // before `pattern` is consulted, so `text` is what lets the pattern decide.\n // Through vaadin's `_setType` because `type` is a readOnly property bound\n // to the inner input - assigning `input.type` is re-applied over.\n this.baseElement._setType('text');\n\n if (this.externalInput) {\n this.externalInput.type = 'text';\n }\n\n // `type=\"text\"` loses the email keyboard on mobile\n if (!this.getAttribute('inputmode')) {\n this.setAttribute('inputmode', defaultInputMode);\n }\n\n this.externalInput?.setAttribute('inputmode', defaultInputMode);\n }\n\n stripSurroundingWhitespace = (e) => {\n const trimmed = e.target.value.trim();\n if (trimmed === e.target.value) return;\n this.value = trimmed;\n\n // validity is cached and was computed against the untrimmed value\n this.inputElement.dispatchEvent(new Event('input', { bubbles: true, composed: true }));\n };\n };\n\nexport const EmailFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n externalInputMixin({\n inputType: 'email',\n inputName: 'email',\n autocompleteType: 'username',\n includeAttrs: ['disabled', 'readonly', 'pattern'],\n }),\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['', 'suffix'],\n wrappedEleName: 'vaadin-email-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${EmailFieldClass.cssVarList.inputOutlineWidth}) + var(${\n EmailFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n ${resetInputLabelPosition('vaadin-email-field')}\n\t\t\t${useHostExternalPadding(EmailFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-email-field', EmailFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-email-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-email-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\n vaadin-email-field[external-input=\"true\"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","// Kept in its own module (with no imports) so it can be unit tested without\n// pulling in the whole component / vaadin dependency chain.\n\nexport const asciiPattern = \"^[\\\\w\\\\.\\\\%\\\\+\\\\-']+@[\\\\w\\\\.\\\\-]+\\\\.[A-Za-z]{2,}$\";\n\nexport const unicodePattern =\n \"^[\\\\p{L}\\\\p{M}\\\\p{N}._%+'\\\\-]+@[\\\\p{L}\\\\p{M}\\\\p{N}.\\\\-]+\\\\.[\\\\p{L}\\\\p{M}][\\\\p{L}\\\\p{M}\\\\p{N}\\\\-]+$\";\n","import '@vaadin/email-field';\nimport { componentName, EmailFieldClass } from './EmailFieldClass';\n\ncustomElements.define(componentName, EmailFieldClass);\n\nexport { EmailFieldClass, componentName };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputControlMixin } from './input-control-mixin.js';\n\n/**\n * A mixin to provide logic for vaadin-text-field and related components.\n *\n * @polymerMixin\n * @mixes InputControlMixin\n */\nexport const InputFieldMixin = (superclass) =>\n class InputFieldMixinClass extends InputControlMixin(superclass) {\n static get properties() {\n return {\n /**\n * Whether the value of the control can be automatically completed by the browser.\n * List of available options at:\n * https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete\n */\n autocomplete: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari that is used to control whether\n * autocorrection should be enabled when the user is entering/editing the text.\n * Possible values are:\n * on: Enable autocorrection.\n * off: Disable autocorrection.\n */\n autocorrect: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari and Chrome that is used to control whether\n * autocapitalization should be enabled when the user is entering/editing the text.\n * Possible values are:\n * characters: Characters capitalization.\n * words: Words capitalization.\n * sentences: Sentences capitalization.\n * none: No capitalization.\n */\n autocapitalize: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'autocapitalize', 'autocomplete', 'autocorrect'];\n }\n\n // Workaround for https://github.com/Polymer/polymer/issues/5259\n get __data() {\n return this.__dataValue || {};\n }\n\n set __data(value) {\n this.__dataValue = value;\n }\n\n /**\n * @param {HTMLElement} input\n * @protected\n * @override\n */\n _inputElementChanged(input) {\n super._inputElementChanged(input);\n\n if (input) {\n // Discard value set on the custom slotted input.\n if (input.value && input.value !== this.value) {\n console.warn(`Please define value on the <${this.localName}> component!`);\n input.value = '';\n }\n\n if (this.value) {\n input.value = this.value;\n }\n }\n }\n\n /**\n * Override an event listener from `FocusMixin`.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * Override an event listener from `InputMixin`\n * to mark as valid after user started typing.\n * @param {Event} event\n * @protected\n * @override\n */\n _onInput(event) {\n super._onInput(event);\n\n if (this.invalid) {\n this.validate();\n }\n }\n\n /**\n * Override an observer from `InputMixin` to validate the field\n * when a new value is set programmatically.\n *\n * @param {string | undefined} newValue\n * @param {string | undefined} oldValue\n * @protected\n * @override\n */\n _valueChanged(newValue, oldValue) {\n super._valueChanged(newValue, oldValue);\n\n if (oldValue === undefined) {\n return;\n }\n\n if (this.invalid) {\n this.validate();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common text field functionality.\n *\n * @polymerMixin\n * @mixes InputFieldMixin\n */\nexport const TextFieldMixin = (superClass) =>\n class TextFieldMixinClass extends InputFieldMixin(superClass) {\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n\n /**\n * A regular expression that the value is checked against.\n * The pattern must match the entire value, not just some subset.\n */\n pattern: {\n type: String,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'maxlength', 'minlength', 'pattern'];\n }\n\n static get constraints() {\n return [...super.constraints, 'maxlength', 'minlength', 'pattern'];\n }\n\n constructor() {\n super();\n this._setType('text');\n }\n\n /** @protected */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport { html, PolymerElement } from '@polymer/polymer';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { TextFieldMixin } from './vaadin-text-field-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, { moduleId: 'vaadin-text-field-styles' });\n\n/**\n * `<vaadin-text-field>` is a web component that allows the user to input and edit text.\n *\n * ```html\n * <vaadin-text-field label=\"First Name\"></vaadin-text-field>\n * ```\n *\n * ### Prefixes and suffixes\n *\n * These are child elements of a `<vaadin-text-field>` that are displayed\n * inline with the input, before or after.\n * In order for an element to be considered as a prefix, it must have the slot\n * attribute set to `prefix` (and similarly for `suffix`).\n *\n * ```html\n * <vaadin-text-field label=\"Email address\">\n * <div slot=\"prefix\">Sent to:</div>\n * <div slot=\"suffix\">@vaadin.com</div>\n * </vaadin-text-field>\n * ```\n *\n * ### Styling\n *\n * The following custom properties are available for styling:\n *\n * Custom property | Description | Default\n * -------------------------------|----------------------------|---------\n * `--vaadin-field-default-width` | Default width of the field | `12em`\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ---------------------|----------------\n * `label` | The label element\n * `input-field` | The element that wraps prefix, value and suffix\n * `clear-button` | The clear button\n * `error-message` | The error message element\n * `helper-text` | The helper text element wrapper\n * `required-indicator` | The `required` state indicator element\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * --------------------|-------------|------------\n * `disabled` | Set to a disabled text field | :host\n * `has-value` | Set when the element has a value | :host\n * `has-label` | Set when the element has a label | :host\n * `has-helper` | Set when the element has helper text or slot | :host\n * `has-error-message` | Set when the element has an error message | :host\n * `invalid` | Set when the element is invalid | :host\n * `input-prevented` | Temporarily set when invalid input is prevented | :host\n * `focused` | Set when the element is focused | :host\n * `focus-ring` | Set when the element is keyboard focused | :host\n * `readonly` | Set to a readonly text field | :host\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes ThemableMixin\n * @mixes TextFieldMixin\n */\nexport class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-text-field';\n }\n\n static get template() {\n return html`\n <style>\n [part='input-field'] {\n flex-grow: 0;\n }\n </style>\n\n <div class=\"vaadin-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <slot name=\"suffix\" slot=\"suffix\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n };\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(TextField);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, {\n moduleId: 'lumo-text-field-styles',\n});\n"],"names":["host","label","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","selector","__WEBPACK_DEFAULT_EXPORT__","fontSize","fontFamily","labelFontSize","property","labelFontWeight","inputValueFontWeight","inputPlaceholderFontWeight","helperTextFontWeight","errorMessageFontWeight","labelTextColor","hostWidth","hostMinWidth","hostDirection","inputDirection","inputBackgroundColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","helperTextColor","inputValueTextColor","inputCaretTextColor","labelRequiredIndicator","inputBorderColor","inputBorderWidth","inputBorderStyle","inputBorderRadius","inputHeight","inputHorizontalPadding","inputOutlineColor","inputOutlineStyle","inputOutlineWidth","inputOutlineOffset","textAlign","inputTextAlign","inputPlaceholderColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","inputIconOffset","inputIconSize","inputIconColor","inputTextSecurity","emailField","vaadin_themable_mixin","AH","SF","input_field_shared","k","moduleId","emailFieldStyles","EmailField","src_vaadin_text_field","A","is","constructor","super","this","_setType","pattern","ready","inputElement","autocapitalize","src_define","X","componentName","componentHelpers","xE","defaultInputMode","EmailFieldClass","helpers","Zz","mixins","RF","mappings","textFieldMappings","VO","RV","inputType","inputName","autocompleteType","includeAttrs","OZ","proxyProps","useProxyTargets","tQ","superclass","acceptsUnicode","getAttribute","init","baseElement","setAttribute","createExternalInput","filter","Boolean","forEach","addEventListener","stripSurroundingWhitespace","enableUnicode","type","e","trimmed","target","value","trim","dispatchEvent","Event","bubbles","composed","tz","slots","wrappedEleName","style","cssVarList","resetHelpers","$J","cy","LJ","Kl","excludeAttrsSync","customElements","define","InputController","_vaadin_component_base_src_slot_controller_js__WEBPACK_IMPORTED_MODULE_0__","r","callback","initializer","node","id","defaultId","useUniqueId","InputFieldMixin","_input_control_mixin_js__WEBPACK_IMPORTED_MODULE_0__","R","properties","autocomplete","String","autocorrect","reflectToAttribute","delegateAttrs","__data","__dataValue","_inputElementChanged","console","warn","localName","_setFocused","focused","document","hasFocus","validate","_onInput","event","invalid","_valueChanged","newValue","oldValue","undefined","TextFieldMixin","superClass","input_field_mixin","a","maxlength","Number","minlength","constraints","clearElement","$","clearButton","addController","input_controller","f","_setInputElement","_setFocusElement","stateTarget","ariaTarget","labelled_input_controller","q","_labelController","input_field_shared_styles","TextField","cp","element_mixin","polymer_element","Pu","template","qy","_tooltipController","tooltip_controller","I","setPosition","setAriaTarget"],"sourceRoot":""}