@descope/web-components-ui 3.12.1 → 3.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +4121 -2426
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3165 -1468
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/6618.js +591 -0
- package/dist/umd/{7387.js.LICENSE.txt → 6618.js.LICENSE.txt} +6 -0
- package/dist/umd/6618.js.map +1 -0
- package/dist/umd/8350.js +2 -0
- package/dist/umd/8350.js.map +1 -0
- package/dist/umd/9265.js +2 -0
- package/dist/umd/9265.js.map +1 -0
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +449 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
- package/dist/umd/descope-date-field-index-js.js +1 -1
- package/dist/umd/descope-date-field-index-js.js.map +1 -1
- package/dist/umd/descope-email-field-index-js.js +2 -2
- package/dist/umd/descope-email-field-index-js.js.map +1 -1
- package/dist/umd/descope-hybrid-field-index-js.js +1 -1
- package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
- package/dist/umd/descope-month-day-field-picker.js +114 -0
- package/dist/umd/descope-month-day-field-picker.js.LICENSE.txt +11 -0
- package/dist/umd/descope-month-day-field-picker.js.map +1 -0
- package/dist/umd/descope-month-day-field.js +2 -0
- package/dist/umd/descope-month-day-field.js.map +1 -0
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js.map +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js.map +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js.map +1 -1
- package/dist/umd/descope-radio-group-index-js.js +1 -1
- package/dist/umd/descope-radio-group-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
- package/dist/umd/descope-text-field.js +38 -0
- package/dist/umd/descope-text-field.js.map +1 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
- package/package.json +39 -36
- package/src/components/descope-date-field/DateFieldClass.js +1 -1
- package/src/components/descope-date-field/index.js +1 -1
- package/src/components/descope-email-field/EmailFieldClass.js +1 -1
- package/src/components/descope-new-password/index.js +1 -1
- package/src/components/descope-number-field/NumberFieldClass.js +1 -1
- package/src/components/descope-passcode/PasscodeClass.js +1 -1
- package/src/components/descope-passcode/index.js +1 -1
- package/src/components/descope-radio-group/RadioGroupClass.js +1 -1
- package/src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js +1 -1
- package/src/components/descope-security-questions-setup/index.js +1 -1
- package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +1 -1
- package/src/components/descope-security-questions-verify/index.js +1 -1
- package/src/components/mapping-fields/descope-mappings-field/index.js +1 -1
- package/src/components/mapping-fields/descope-saml-group-mappings/index.js +1 -1
- package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +1 -1
- package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/index.js +1 -1
- package/src/components/phone-fields/descope-phone-field/index.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/index.js +1 -1
- package/src/index.cjs.js +2 -2
- package/src/index.js +0 -1
- package/src/theme/components/index.js +5 -1
- package/stories/descope-text-field.stories.js +1 -1
- package/dist/umd/3685.js +0 -2
- package/dist/umd/3685.js.map +0 -1
- package/dist/umd/4518.js +0 -450
- package/dist/umd/4518.js.map +0 -1
- package/dist/umd/7387.js +0 -144
- package/dist/umd/7387.js.map +0 -1
- package/dist/umd/descope-text-field-index-js.js +0 -38
- package/dist/umd/descope-text-field-index-js.js.map +0 -1
- package/src/components/descope-text-field/TextFieldClass.js +0 -142
- package/src/components/descope-text-field/index.js +0 -9
- package/src/components/descope-text-field/textFieldMappings.js +0 -169
- package/src/theme/components/textField.js +0 -71
- /package/dist/umd/{4518.js.LICENSE.txt → descope-date-field-descope-calendar-index-js.js.LICENSE.txt} +0 -0
- /package/dist/umd/{descope-text-field-index-js.js.LICENSE.txt → descope-text-field.js.LICENSE.txt} +0 -0
package/dist/umd/7387.js
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 7387.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7387],{37436(e,t,o){o.d(t,{a:()=>i});var s=o(44218);const i=e=>class extends((0,s.R)(e)){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(e){this.__dataValue=e}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.value&&e.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),e.value=""),this.value&&(e.value=this.value))}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate()}_onInput(e){super._onInput(e),this.invalid&&this.validate()}_valueChanged(e,t){super._valueChanged(e,t),void 0!==t&&this.invalid&&this.validate()}}},20428(e,t,o){var s=o(51450),i=o(30025),r=o(82901),n=o(23927);const a=new WeakMap;var l=o(85725);const h={},_=/([A-Z])/gu;function d(e){return h[e]||(h[e]=e.replace(_,"-$1").toLowerCase()),h[e]}function u(e){return e[0].toUpperCase()+e.substring(1)}function c(e){const[t,o]=e.split("(");return{method:t,observerProps:o.replace(")","").split(",").map(e=>e.trim())}}function p(e,t){return Object.prototype.hasOwnProperty.call(e,t)||(e[t]=new Map(e[t])),e[t]}const v=(g=e=>class extends e{static createProperty(e,t){[String,Boolean,Number,Array].includes(t)&&(t={type:t}),t.reflectToAttribute&&(t.reflect=!0),super.createProperty(e,t)}static getOrCreateMap(e){return p(this,e)}static finalize(){if(super.finalize(),Array.isArray(this.observers)){const e=this.getOrCreateMap("__complexObservers");this.observers.forEach(t=>{const{method:o,observerProps:s}=c(t);e.set(o,s)})}}static addCheckedInitializer(e){super.addInitializer(t=>{t instanceof this&&e(t)})}static getPropertyDescriptor(e,t,o){const s=super.getPropertyDescriptor(e,t,o);let i=s;if(o.sync&&(i={get:s.get,set(s){const i=this[e];this[t]=s,this.requestUpdate(e,i,o),this.hasUpdated&&this.performUpdate()},configurable:!0,enumerable:!0}),o.readOnly){const t=s.set;this.addCheckedInitializer(s=>{s[`_set${u(e)}`]=function(e){t.call(s,e),o.sync&&this.performUpdate()}}),i={get:s.get,set(){},configurable:!0,enumerable:!0}}if("value"in o&&this.addCheckedInitializer(t=>{const s="function"==typeof o.value?o.value.call(t):o.value;o.readOnly?t[`_set${u(e)}`](s):t[e]=s}),o.observer){const t=o.observer;this.getOrCreateMap("__observers").set(e,t),this.addCheckedInitializer(e=>{e[t]||console.warn(`observer method ${t} not defined`)})}if(o.notify){if(this.__notifyProps){if(!this.hasOwnProperty("__notifyProps")){const e=this.__notifyProps;this.__notifyProps=new Set(e)}}else this.__notifyProps=new Set;this.__notifyProps.add(e)}if(o.computed){const t=`__assignComputed${e}`,s=c(o.computed);this.prototype[t]=function(...t){this[e]=this[s.method](...t)},this.getOrCreateMap("__complexObservers").set(t,s.observerProps)}return o.attribute||(o.attribute=d(e)),i}firstUpdated(){super.firstUpdated(),this.$||(this.$={}),this.renderRoot.querySelectorAll("[id]").forEach(e=>{this.$[e.id]=e})}ready(){}updated(e){this.constructor.__observers&&this.__runObservers(e,this.constructor.__observers),this.constructor.__complexObservers&&this.__runComplexObservers(e,this.constructor.__complexObservers),this.__dynamicObservers&&this.__runComplexObservers(e,this.__dynamicObservers),this.constructor.__notifyProps&&this.__runNotifyProps(e,this.constructor.__notifyProps),this.__isReadyInvoked||(this.__isReadyInvoked=!0,this.ready())}_createMethodObserver(e){const t=p(this,"__dynamicObservers"),{method:o,observerProps:s}=c(e);t.set(o,s)}__runComplexObservers(e,t){t.forEach((t,o)=>{t.some(t=>e.has(t))&&(this[o]?this[o](...t.map(e=>this[e])):console.warn(`observer method ${o} not defined`))})}__runObservers(e,t){e.forEach((e,o)=>{const s=t.get(o);void 0!==s&&this[s]&&this[s](this[o],e)})}__runNotifyProps(e,t){e.forEach((e,o)=>{t.has(o)&&this.dispatchEvent(new CustomEvent(`${d(o)}-changed`,{detail:{value:this[o]}}))})}_get(e,t){return(0,l.J)(e,t)}_set(e,t,o){(0,l.h)(e,t,o)}},e=>{if(function(e,t){let o=t;for(;o;){if(a.get(o)===e)return!0;o=Object.getPrototypeOf(o)}return!1}(g,e))return e;const t=g(e);return a.set(t,g),t});var g,y=o(5072),m=o(87550),f=o(58069),b=o(81481);const C=e=>class extends((0,b.t)((0,f.c)(e))){static get properties(){return{position:{type:String,reflectToAttribute:!0}}}get _tagNamePrefix(){return"vaadin-popover"}requestContentUpdate(){if(super.requestContentUpdate(),this.positionTarget&&this.owner){const e=getComputedStyle(this.owner);["top","bottom","start","end"].forEach(t=>{this.style.setProperty(`--${this._tagNamePrefix}-offset-${t}`,e.getPropertyValue(`--${this._tagNamePrefix}-offset-${t}`))})}}_updatePosition(){if(super._updatePosition(),this.positionTarget&&this.opened){if(this.removeAttribute("arrow-centered"),"bottom"===this.position||"top"===this.position){const e=this.positionTarget.getBoundingClientRect(),t=this.$.overlay.getBoundingClientRect(),o=e.width/2-t.width/2;if(this.style.left){const e=t.left+o;e>0&&(this.style.left=`${e}px`,this.setAttribute("arrow-centered",""))}if(this.style.right){const e=parseFloat(this.style.right)+o;e>0&&(this.style.right=`${e}px`,this.setAttribute("arrow-centered",""))}}if("start"===this.position||"end"===this.position){const e=this.positionTarget.getBoundingClientRect(),t=this.$.overlay.getBoundingClientRect(),o=e.height/2-t.height/2;this.style.top=`${t.top+o}px`}}}};class T extends(C((0,n.v)((0,m.cp)(v(s.WF))))){static get is(){return"vaadin-popover-overlay"}static get styles(){return[y.B,s.AH`
|
|
3
|
-
:host {
|
|
4
|
-
--_vaadin-popover-content-width: auto;
|
|
5
|
-
--_vaadin-popover-content-height: auto;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:host([modeless][with-backdrop]) [part='backdrop'] {
|
|
9
|
-
pointer-events: none;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
:host([position^='top'][top-aligned]) [part='overlay'],
|
|
13
|
-
:host([position^='bottom'][top-aligned]) [part='overlay'] {
|
|
14
|
-
margin-top: var(--vaadin-popover-offset-top, 0);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
[part='overlay'] {
|
|
18
|
-
position: relative;
|
|
19
|
-
overflow: visible;
|
|
20
|
-
max-height: 100%;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
[part='content'] {
|
|
24
|
-
overflow: auto;
|
|
25
|
-
box-sizing: border-box;
|
|
26
|
-
max-height: 100%;
|
|
27
|
-
width: var(--_vaadin-popover-content-width);
|
|
28
|
-
height: var(--_vaadin-popover-content-height);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* Increase the area of the popover so the pointer can go from the target directly to it. */
|
|
32
|
-
[part='overlay']::before {
|
|
33
|
-
position: absolute;
|
|
34
|
-
content: '';
|
|
35
|
-
inset-block: calc(var(--vaadin-popover-offset-top, 0) * -1) calc(var(--vaadin-popover-offset-bottom, 0) * -1);
|
|
36
|
-
inset-inline: calc(var(--vaadin-popover-offset-start, 0) * -1) calc(var(--vaadin-popover-offset-end, 0) * -1);
|
|
37
|
-
z-index: -1;
|
|
38
|
-
pointer-events: auto;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:host([position^='top'][bottom-aligned]) [part='overlay'],
|
|
42
|
-
:host([position^='bottom'][bottom-aligned]) [part='overlay'] {
|
|
43
|
-
margin-bottom: var(--vaadin-popover-offset-bottom, 0);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:host([position^='start'][start-aligned]) [part='overlay'],
|
|
47
|
-
:host([position^='end'][start-aligned]) [part='overlay'] {
|
|
48
|
-
margin-inline-start: var(--vaadin-popover-offset-start, 0);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
:host([position^='start'][end-aligned]) [part='overlay'],
|
|
52
|
-
:host([position^='end'][end-aligned]) [part='overlay'] {
|
|
53
|
-
margin-inline-end: var(--vaadin-popover-offset-end, 0);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
[part='arrow'] {
|
|
57
|
-
display: none;
|
|
58
|
-
position: absolute;
|
|
59
|
-
height: 0;
|
|
60
|
-
width: 0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
:host([theme~='arrow']) [part='arrow'] {
|
|
64
|
-
display: block;
|
|
65
|
-
}
|
|
66
|
-
`]}render(){return s.qy`
|
|
67
|
-
<div id="backdrop" part="backdrop" hidden ?hidden="${!this.withBackdrop}"></div>
|
|
68
|
-
<div part="overlay" id="overlay" tabindex="0">
|
|
69
|
-
<div part="arrow"></div>
|
|
70
|
-
<div part="content" id="content"><slot></slot></div>
|
|
71
|
-
</div>
|
|
72
|
-
`}_shouldCloseOnOutsideClick(e){return(!this.owner.__hasTrigger("focus")||!(0,i.Qj)(this))&&super._shouldCloseOnOutsideClick(e)}}(0,r.X)(T);var O=o(55670);const E=e=>e??O.s6;var w=o(72562),$=o(55341),k=o(11707),x=o(69168),D=o(75365),F=o(62804),I=o(76685);const P=e=>class extends e{static get properties(){return{for:{type:String,observer:"__forChanged"},target:{type:Object,observer:"__targetChanged"}}}connectedCallback(){super.connectedCallback(),this.target&&this._addTargetListeners(this.target)}disconnectedCallback(){super.disconnectedCallback(),this.target&&this._removeTargetListeners(this.target)}__forChanged(e){e&&(this.__setTargetByIdDebouncer=I.aq.debounce(this.__setTargetByIdDebouncer,F._3,()=>this.__setTargetById(e)))}__setTargetById(e){if(!this.isConnected)return;const t=this.getRootNode().getElementById(e);t?this.target=t:console.warn(`No element with id="${e}" set via "for" property found on the page.`)}__targetChanged(e,t){t&&this._removeTargetListeners(t),e&&this._addTargetListeners(e)}_addTargetListeners(e){}_removeTargetListeners(e){}},L=500;let S=L,A=L,M=L;class N{constructor(e){this.host=e}get isClosing(){return null!=this.__closeTimeout}get __focusDelay(){const e=this.host;return null!=e.focusDelay&&e.focusDelay>=0?e.focusDelay:S}get __hoverDelay(){const e=this.host;return null!=e.hoverDelay&&e.hoverDelay>=0?e.hoverDelay:A}get __hideDelay(){const e=this.host;return null!=e.hideDelay&&e.hideDelay>=0?e.hideDelay:M}open(e={immediate:!1}){const{immediate:t,trigger:o}=e,s="hover"===o&&this.__hoverDelay>0,i="focus"===o&&this.__focusDelay>0;t||!s&&!i||this.__closeTimeout?this.__showPopover():this.__scheduleOpen(o)}close(e){!e&&this.__hideDelay>0?this.__scheduleClose():(this.__abortClose(),this.__setOpened(!1)),this.__abortOpen()}__setOpened(e){this.host.opened=e}__showPopover(){this.__abortClose(),this.__setOpened(!0)}__abortClose(){this.__closeTimeout&&(clearTimeout(this.__closeTimeout),this.__closeTimeout=null)}__abortOpen(){this.__openTimeout&&(clearTimeout(this.__openTimeout),this.__openTimeout=null)}__scheduleClose(){this.__closeTimeout=setTimeout(()=>{this.__closeTimeout=null,this.__setOpened(!1)},this.__hideDelay)}__scheduleOpen(e){this.__abortOpen();const t="focus"===e?this.__focusDelay:this.__hoverDelay;this.__openTimeout=setTimeout(()=>{this.__openTimeout=null,this.__showPopover()},t)}}class B extends((e=>class extends e{static get properties(){return{position:{type:String},_position:{type:String,value:"bottom"},__effectivePosition:{type:String,computed:"__computePosition(position, _position)"}}}__computeHorizontalAlign(e){return["top-end","bottom-end","start-top","start","start-bottom"].includes(e)?"end":"start"}__computeNoHorizontalOverlap(e){return["start-top","start","start-bottom","end-top","end","end-bottom"].includes(e)}__computeNoVerticalOverlap(e){return["top-start","top-end","top","bottom-start","bottom","bottom-end"].includes(e)}__computeVerticalAlign(e){return["top-start","top-end","top","start-bottom","end-bottom"].includes(e)?"bottom":"top"}__computePosition(e,t){return e||t}})(P((0,$.i)((0,D._)((0,w.q)(v(s.WF))))))){static get is(){return"vaadin-popover"}static get styles(){return s.AH`
|
|
73
|
-
:host {
|
|
74
|
-
display: none !important;
|
|
75
|
-
}
|
|
76
|
-
`}static get properties(){return{accessibleName:{type:String},accessibleNameRef:{type:String},autofocus:{type:Boolean},contentHeight:{type:String},contentWidth:{type:String},focusDelay:{type:Number},hideDelay:{type:Number},hoverDelay:{type:Number},opened:{type:Boolean,value:!1,notify:!0,observer:"__openedChanged"},overlayRole:{type:String,value:"dialog"},renderer:{type:Object},modal:{type:Boolean,value:!1},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},trigger:{type:Array,value:()=>["click"]},withBackdrop:{type:Boolean,value:!1},__shouldRestoreFocus:{type:Boolean,value:!1,sync:!0},__overlayId:{type:String}}}static get observers(){return["__updateContentHeight(contentHeight, _overlayElement)","__updateContentWidth(contentWidth, _overlayElement)","__openedOrTargetChanged(opened, target)","__overlayRoleOrTargetChanged(overlayRole, target)"]}static setDefaultFocusDelay(e){S=null!=e&&e>=0?e:L}static setDefaultHideDelay(e){M=null!=e&&e>=0?e:L}static setDefaultHoverDelay(e){A=null!=e&&e>=0?e:L}constructor(){super(),this.__overlayId=`vaadin-popover-${(0,k.I)()}`,this.__onGlobalClick=this.__onGlobalClick.bind(this),this.__onGlobalKeyDown=this.__onGlobalKeyDown.bind(this),this.__onTargetClick=this.__onTargetClick.bind(this),this.__onTargetFocusIn=this.__onTargetFocusIn.bind(this),this.__onTargetFocusOut=this.__onTargetFocusOut.bind(this),this.__onTargetMouseEnter=this.__onTargetMouseEnter.bind(this),this.__onTargetMouseLeave=this.__onTargetMouseLeave.bind(this),this._openedStateController=new N(this)}render(){const e=this.__effectivePosition;return s.qy`
|
|
77
|
-
<vaadin-popover-overlay
|
|
78
|
-
id="${this.__overlayId}"
|
|
79
|
-
role="${this.overlayRole}"
|
|
80
|
-
aria-label="${E(this.accessibleName)}"
|
|
81
|
-
aria-labelledby="${E(this.accessibleNameRef)}"
|
|
82
|
-
.renderer="${this.renderer}"
|
|
83
|
-
.owner="${this}"
|
|
84
|
-
theme="${E(this._theme)}"
|
|
85
|
-
.positionTarget="${this.target}"
|
|
86
|
-
.position="${e}"
|
|
87
|
-
.opened="${this.opened}"
|
|
88
|
-
.modeless="${!this.modal}"
|
|
89
|
-
.focusTrap="${this.modal}"
|
|
90
|
-
.withBackdrop="${this.withBackdrop}"
|
|
91
|
-
?no-horizontal-overlap="${this.__computeNoHorizontalOverlap(e)}"
|
|
92
|
-
?no-vertical-overlap="${this.__computeNoVerticalOverlap(e)}"
|
|
93
|
-
.horizontalAlign="${this.__computeHorizontalAlign(e)}"
|
|
94
|
-
.verticalAlign="${this.__computeVerticalAlign(e)}"
|
|
95
|
-
@mousedown="${this.__onOverlayMouseDown}"
|
|
96
|
-
@mouseenter="${this.__onOverlayMouseEnter}"
|
|
97
|
-
@mouseleave="${this.__onOverlayMouseLeave}"
|
|
98
|
-
@focusin="${this.__onOverlayFocusIn}"
|
|
99
|
-
@focusout="${this.__onOverlayFocusOut}"
|
|
100
|
-
@opened-changed="${this.__onOpenedChanged}"
|
|
101
|
-
.restoreFocusOnClose="${this.__shouldRestoreFocus}"
|
|
102
|
-
.restoreFocusNode="${this.target}"
|
|
103
|
-
@vaadin-overlay-escape-press="${this.__onEscapePress}"
|
|
104
|
-
@vaadin-overlay-outside-click="${this.__onOutsideClick}"
|
|
105
|
-
@vaadin-overlay-open="${this.__onOverlayOpened}"
|
|
106
|
-
@vaadin-overlay-closed="${this.__onOverlayClosed}"
|
|
107
|
-
></vaadin-popover-overlay>
|
|
108
|
-
`}requestContentUpdate(){this.renderer&&this._overlayElement&&this._overlayElement.requestContentUpdate()}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-popover-overlay")}connectedCallback(){super.connectedCallback(),document.documentElement.addEventListener("click",this.__onGlobalClick,!0)}disconnectedCallback(){super.disconnectedCallback(),document.documentElement.removeEventListener("click",this.__onGlobalClick,!0),this._openedStateController.close(!0)}_addTargetListeners(e){e.addEventListener("click",this.__onTargetClick),e.addEventListener("mouseenter",this.__onTargetMouseEnter),e.addEventListener("mouseleave",this.__onTargetMouseLeave),e.addEventListener("focusin",this.__onTargetFocusIn),e.addEventListener("focusout",this.__onTargetFocusOut)}_removeTargetListeners(e){e.removeEventListener("click",this.__onTargetClick),e.removeEventListener("mouseenter",this.__onTargetMouseEnter),e.removeEventListener("mouseleave",this.__onTargetMouseLeave),e.removeEventListener("focusin",this.__onTargetFocusIn),e.removeEventListener("focusout",this.__onTargetFocusOut)}__openedChanged(e,t){e?document.addEventListener("keydown",this.__onGlobalKeyDown,!0):t&&document.removeEventListener("keydown",this.__onGlobalKeyDown,!0)}__openedOrTargetChanged(e,t){t&&(t.setAttribute("aria-expanded",e?"true":"false"),e?t.setAttribute("aria-controls",this.__overlayId):t.removeAttribute("aria-controls"))}__overlayRoleOrTargetChanged(e,t){if(this.__oldTarget&&this.__oldTarget.removeAttribute("aria-haspopup"),t){const o="dialog"===e||"alertdialog"===e;t.setAttribute("aria-haspopup",o?"dialog":"true"),this.__oldTarget=t}}__onGlobalClick(e){!this.opened||this.__isManual||this.modal||e.composedPath().some(e=>e===this._overlayElement||e===this.target)||this.noCloseOnOutsideClick||!(0,x.$)(this._overlayElement)||this._openedStateController.close(!0)}__onTargetClick(){this.__hasTrigger("click")&&(this.opened||(this.__shouldRestoreFocus=!0),this.opened?this._openedStateController.close(!0):this._openedStateController.open({immediate:!0}))}__onGlobalKeyDown(e){this.modal||("Escape"===e.key&&!this.noCloseOnEsc&&this.opened&&!this.__isManual&&(0,x.$)(this._overlayElement)&&(e.stopPropagation(),this._openedStateController.close(!0)),"Tab"===e.key&&(e.shiftKey?this.__onGlobalShiftTab(e):this.__onGlobalTab(e)))}__onGlobalTab(e){const t=this._overlayElement.$.overlay;if(this.target&&(0,i.Qj)(this.target))return e.preventDefault(),void t.focus();const o=this.__getLastFocusable(t);if(o&&(0,i.Qj)(o)){const o=this.__getNextBodyFocusable(this.target);if(o&&o!==t)return e.preventDefault(),void o.focus()}const s=(0,i.dw)();this.__getNextBodyFocusable(s)===t&&o&&o.focus()}__onGlobalShiftTab(e){const t=this._overlayElement.$.overlay;if(this.target&&(0,i.Qj)(this.target)&&this.__shouldRestoreFocus)return void(this.__shouldRestoreFocus=!1);if(this.target&&(0,i.Qj)(t))return e.preventDefault(),void this.target.focus();const o=this.__getNextBodyFocusable(this.target);if(o&&(0,i.Qj)(o)){const o=this.__getLastFocusable(t);o&&(e.preventDefault(),o.focus())}}__getNextBodyFocusable(e){const t=(0,i.iq)(document.body),o=t.findIndex(t=>t===e);return t[o+1]}__getLastFocusable(e){return(0,i.iq)(e).pop()}__onTargetFocusIn(){if(this.__focusInside=!0,this.__hasTrigger("focus")){if(this.__hasTrigger("click")&&!(0,i.aJ)())return;this.__shouldRestoreFocus||(this.__shouldRestoreFocus=!0,this._openedStateController.open({trigger:"focus"}))}}__onTargetFocusOut(e){(0,x.$)(this._overlayElement)&&(this.__hasTrigger("focus")&&this.__mouseDownInside||this._overlayElement.contains(e.relatedTarget)||this.__handleFocusout())}__onTargetMouseEnter(){this.__hoverInside=!0,this.__hasTrigger("hover")&&!this.opened&&(this.modal&&(this.target.style.pointerEvents="auto"),this._openedStateController.open({trigger:"hover"}))}__onTargetMouseLeave(e){this._overlayElement.opened&&!(0,x.$)(this._overlayElement)||this._overlayElement.contains(e.relatedTarget)||this.__handleMouseLeave()}__onOverlayFocusIn(){this.__focusInside=!0,(this.__hasTrigger("focus")||this.__hasTrigger("click"))&&(this.__shouldRestoreFocus=!0)}__onOverlayFocusOut(e){(0,x.$)(this._overlayElement)&&(this.__hasTrigger("focus")&&this.__mouseDownInside||e.relatedTarget===this.target||this._overlayElement.contains(e.relatedTarget)||this.__handleFocusout())}__onOverlayMouseDown(){this.__hasTrigger("focus")&&(this.__mouseDownInside=!0,document.addEventListener("mouseup",()=>{this.__mouseDownInside=!1},{once:!0}))}__onOverlayMouseEnter(){this.__hoverInside=!0,this.__hasTrigger("hover")&&this._openedStateController.isClosing&&this._openedStateController.open({immediate:!0})}__onOverlayMouseLeave(e){(0,x.$)(this._overlayElement)&&e.relatedTarget!==this.target&&this.__handleMouseLeave()}__handleFocusout(){this.__focusInside=!1,this.__hasTrigger("hover")&&this.__hoverInside||this.__hasTrigger("focus")&&this._openedStateController.close(!0)}__handleMouseLeave(){this.__hoverInside=!1,this.__hasTrigger("focus")&&this.__focusInside||this.__hasTrigger("hover")&&this._openedStateController.close()}__onOpenedChanged(e){this.opened=e.detail.value}__onOverlayOpened(){this.autofocus&&!this.modal&&this._overlayElement.$.overlay.focus()}__onOverlayClosed(){this.__shouldRestoreFocus&&setTimeout(()=>{this.__shouldRestoreFocus=!1}),this.modal&&this.target.style.pointerEvents&&(this.target.style.pointerEvents=""),this.dispatchEvent(new CustomEvent("closed"))}__onEscapePress(e){(this.noCloseOnEsc||this.__isManual)&&e.preventDefault()}__onOutsideClick(e){(this.noCloseOnOutsideClick||this.__isManual)&&e.preventDefault()}__hasTrigger(e){return Array.isArray(this.trigger)&&this.trigger.includes(e)}get __isManual(){return null==this.trigger||Array.isArray(this.trigger)&&0===this.trigger.length}__updateDimension(e,t,o){const s=`--_vaadin-popover-content-${t}`;o?e.style.setProperty(s,o):e.style.removeProperty(s)}__updateContentHeight(e,t){t&&this.__updateDimension(t,"height",e)}__updateContentWidth(e,t){t&&this.__updateDimension(t,"width",e)}}(0,r.X)(B)},27136(e,t,o){o.d(t,{A:()=>c}),o(86689);var s=o(13256),i=o(82901),r=o(72562),n=o(81488),a=o(86314),l=o(87550),h=o(18330),_=o(37436),d=o(37720);const u=e=>class extends((0,_.a)(e)){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 h.f(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new d.q(this.inputElement,this._labelController))}};(0,l.SF)("vaadin-text-field",a.k,{moduleId:"vaadin-text-field-styles"});class c extends(u((0,l.cp)((0,r.q)(s.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return s.qy`
|
|
109
|
-
<style>
|
|
110
|
-
[part='input-field'] {
|
|
111
|
-
flex-grow: 0;
|
|
112
|
-
}
|
|
113
|
-
</style>
|
|
114
|
-
|
|
115
|
-
<div class="vaadin-field-container">
|
|
116
|
-
<div part="label">
|
|
117
|
-
<slot name="label"></slot>
|
|
118
|
-
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
119
|
-
</div>
|
|
120
|
-
|
|
121
|
-
<vaadin-input-container
|
|
122
|
-
part="input-field"
|
|
123
|
-
readonly="[[readonly]]"
|
|
124
|
-
disabled="[[disabled]]"
|
|
125
|
-
invalid="[[invalid]]"
|
|
126
|
-
theme$="[[_theme]]"
|
|
127
|
-
>
|
|
128
|
-
<slot name="prefix" slot="prefix"></slot>
|
|
129
|
-
<slot name="input"></slot>
|
|
130
|
-
<slot name="suffix" slot="suffix"></slot>
|
|
131
|
-
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
132
|
-
</vaadin-input-container>
|
|
133
|
-
|
|
134
|
-
<div part="helper-text">
|
|
135
|
-
<slot name="helper"></slot>
|
|
136
|
-
</div>
|
|
137
|
-
|
|
138
|
-
<div part="error-message">
|
|
139
|
-
<slot name="error-message"></slot>
|
|
140
|
-
</div>
|
|
141
|
-
</div>
|
|
142
|
-
<slot name="tooltip"></slot>
|
|
143
|
-
`}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new n.I(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,i.X)(c)},52733(e,t,o){o(27397);var s=o(47642);(0,o(87550).SF)("vaadin-text-field",s.k,{moduleId:"lumo-text-field-styles"}),o(27136)},11284(e,t,o){o(52733),o(27136)}}]);
|
|
144
|
-
//# sourceMappingURL=7387.js.map
|
package/dist/umd/7387.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"7387.js","mappings":";sKAaO,MAAMA,EAAmBC,GAC9B,eAAmC,OAAkBA,IACnD,qBAAWC,GACT,MAAO,CAMLC,aAAc,CACZC,KAAMC,QAURC,YAAa,CACXF,KAAMC,QAYRE,eAAgB,CACdH,KAAMC,OACNG,oBAAoB,GAG1B,CAEA,wBAAWC,GACT,MAAO,IAAIC,MAAMD,cAA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AS,CACP3T,KAAMC,QAGZ,CAEA,wBAAWI,GACT,MAAO,IAAIC,MAAMD,cAAe,YAAa,YAAa,UAC5D,CAEA,sBAAWuT,GACT,MAAO,IAAItT,MAAMsT,YAAa,YAAa,YAAa,UAC1D,CAEA,WAAAlN,GACEpG,QACAE,KAAKqT,SAAS,OAChB,CAGA,gBAAIC,GACF,OAAOtT,KAAK2F,EAAE4N,WAChB,CAGA,KAAAvN,GACElG,MAAMkG,QAENhG,KAAKwT,cACH,IAAI,IAAgBxT,KAAOI,IACzBJ,KAAKyT,iBAAiBrT,GACtBJ,KAAK0T,iBAAiBtT,GACtBJ,KAAK2T,YAAcvT,EACnBJ,KAAK4T,WAAaxT,KAGtBJ,KAAKwT,cAAc,IAAI,IAAwBxT,KAAK6T,aAAc7T,KAAK8T,kBACzE,IC5DJ,QAAe,oBAAqB,IAAkB,CAAEC,SAAU,6BAuE3D,MAAMC,UAAkBhB,GAAe,SAAc,OAAa,SACvE,aAAWzJ,GACT,MAAO,mBACT,CAEA,mBAAW0K,GACT,OAAO,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoCb,CAEA,qBAAW3U,GACT,MAAO,CAIL2T,UAAW,CACTzT,KAAM6D,QAMR6P,UAAW,CACT1T,KAAM6D,QAGZ,CAGA,KAAA2C,GACElG,MAAMkG,QAENhG,KAAKkU,mBAAqB,IAAI,IAAkBlU,MAChDA,KAAKkU,mBAAmBC,YAAY,OACpCnU,KAAKkU,mBAAmBE,cAAcpU,KAAK6T,cAC3C7T,KAAKwT,cAAcxT,KAAKkU,mBAC1B,GAGF,OAAoBF,E,wCCrJpB,E,SAAA,IAAe,oBAAqB,IAAkB,CACpDD,SAAU,2B","sources":["webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@open-wc/dedupe-mixin/src/dedupeMixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/polylit-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/popover/src/vaadin-popover-overlay-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/popover/src/vaadin-popover-overlay.js","webpack://@descope/web-components-ui/../../../node_modules/lit-html/directives/if-defined.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/popover/src/vaadin-popover-target-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/popover/src/vaadin-popover.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/popover/src/vaadin-popover-position-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js"],"sourcesContent":["/**\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","const appliedClassMixins = new WeakMap();\n\n/** Vefify if the Mixin was previously applyed\n * @private\n * @param {function} mixin Mixin being applyed\n * @param {object} superClass Class receiving the new mixin\n * @returns {boolean}\n */\nfunction wasMixinPreviouslyApplied(mixin, superClass) {\n let klass = superClass;\n while (klass) {\n if (appliedClassMixins.get(klass) === mixin) {\n return true;\n }\n klass = Object.getPrototypeOf(klass);\n }\n return false;\n}\n\n/** Apply each mixin in the chain to make sure they are not applied more than once to the final class.\n * @export\n * @param {function} mixin Mixin to be applyed\n * @returns {object} Mixed class with mixin applied\n */\nexport function dedupeMixin(mixin) {\n return superClass => {\n if (wasMixinPreviouslyApplied(mixin, superClass)) {\n return superClass;\n }\n const mixedClass = mixin(superClass);\n appliedClassMixins.set(mixedClass, mixin);\n return mixedClass;\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 { dedupeMixin } from '@open-wc/dedupe-mixin';\nimport { get, set } from './path-utils.js';\n\nconst caseMap = {};\n\nconst CAMEL_TO_DASH = /([A-Z])/gu;\n\nfunction camelToDash(camel) {\n if (!caseMap[camel]) {\n caseMap[camel] = camel.replace(CAMEL_TO_DASH, '-$1').toLowerCase();\n }\n return caseMap[camel];\n}\n\nfunction upper(name) {\n return name[0].toUpperCase() + name.substring(1);\n}\n\nfunction parseObserver(observerString) {\n const [method, rest] = observerString.split('(');\n const observerProps = rest\n .replace(')', '')\n .split(',')\n .map((prop) => prop.trim());\n\n return {\n method,\n observerProps,\n };\n}\n\nfunction getOrCreateMap(obj, name) {\n if (!Object.prototype.hasOwnProperty.call(obj, name)) {\n // Clone any existing entries (superclasses)\n obj[name] = new Map(obj[name]);\n }\n return obj[name];\n}\n\nconst PolylitMixinImplementation = (superclass) => {\n class PolylitMixinClass extends superclass {\n static createProperty(name, options) {\n if ([String, Boolean, Number, Array].includes(options)) {\n options = {\n type: options,\n };\n }\n\n if (options.reflectToAttribute) {\n options.reflect = true;\n }\n\n super.createProperty(name, options);\n }\n\n static getOrCreateMap(name) {\n return getOrCreateMap(this, name);\n }\n\n /**\n * @protected\n * @override\n */\n static finalize() {\n super.finalize();\n\n if (Array.isArray(this.observers)) {\n const complexObservers = this.getOrCreateMap('__complexObservers');\n\n this.observers.forEach((observer) => {\n const { method, observerProps } = parseObserver(observer);\n complexObservers.set(method, observerProps);\n });\n }\n }\n\n static addCheckedInitializer(initializer) {\n super.addInitializer((instance) => {\n // Prevent initializer from affecting superclass\n if (instance instanceof this) {\n initializer(instance);\n }\n });\n }\n\n static getPropertyDescriptor(name, key, options) {\n const defaultDescriptor = super.getPropertyDescriptor(name, key, options);\n\n let result = defaultDescriptor;\n\n if (options.sync) {\n result = {\n get: defaultDescriptor.get,\n set(value) {\n const oldValue = this[name];\n this[key] = value;\n this.requestUpdate(name, oldValue, options);\n\n // Enforce synchronous update\n if (this.hasUpdated) {\n this.performUpdate();\n }\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n if (options.readOnly) {\n const setter = defaultDescriptor.set;\n\n this.addCheckedInitializer((instance) => {\n // This is run during construction of the element\n instance[`_set${upper(name)}`] = function (value) {\n setter.call(instance, value);\n\n if (options.sync) {\n this.performUpdate();\n }\n };\n });\n\n result = {\n get: defaultDescriptor.get,\n set() {\n // Do nothing, property is read-only.\n },\n configurable: true,\n enumerable: true,\n };\n }\n\n if ('value' in options) {\n // Set the default value\n this.addCheckedInitializer((instance) => {\n const value = typeof options.value === 'function' ? options.value.call(instance) : options.value;\n\n if (options.readOnly) {\n instance[`_set${upper(name)}`](value);\n } else {\n instance[name] = value;\n }\n });\n }\n\n if (options.observer) {\n const method = options.observer;\n\n // Set this method\n this.getOrCreateMap('__observers').set(name, method);\n\n this.addCheckedInitializer((instance) => {\n if (!instance[method]) {\n console.warn(`observer method ${method} not defined`);\n }\n });\n }\n\n if (options.notify) {\n if (!this.__notifyProps) {\n this.__notifyProps = new Set();\n // eslint-disable-next-line no-prototype-builtins\n } else if (!this.hasOwnProperty('__notifyProps')) {\n // Clone any existing observers (superclasses)\n const notifyProps = this.__notifyProps;\n this.__notifyProps = new Set(notifyProps);\n }\n\n // Set this method\n this.__notifyProps.add(name);\n }\n\n if (options.computed) {\n const assignComputedMethod = `__assignComputed${name}`;\n const observer = parseObserver(options.computed);\n this.prototype[assignComputedMethod] = function (...props) {\n this[name] = this[observer.method](...props);\n };\n\n this.getOrCreateMap('__complexObservers').set(assignComputedMethod, observer.observerProps);\n }\n\n if (!options.attribute) {\n options.attribute = camelToDash(name);\n }\n\n return result;\n }\n\n /** @protected */\n firstUpdated() {\n super.firstUpdated();\n\n if (!this.$) {\n this.$ = {};\n }\n\n this.renderRoot.querySelectorAll('[id]').forEach((node) => {\n this.$[node.id] = node;\n });\n }\n\n /** @protected */\n ready() {}\n\n /** @protected */\n updated(props) {\n if (this.constructor.__observers) {\n this.__runObservers(props, this.constructor.__observers);\n }\n\n if (this.constructor.__complexObservers) {\n this.__runComplexObservers(props, this.constructor.__complexObservers);\n }\n\n if (this.__dynamicObservers) {\n this.__runComplexObservers(props, this.__dynamicObservers);\n }\n\n if (this.constructor.__notifyProps) {\n this.__runNotifyProps(props, this.constructor.__notifyProps);\n }\n\n if (!this.__isReadyInvoked) {\n this.__isReadyInvoked = true;\n this.ready();\n }\n }\n\n /** @protected */\n _createMethodObserver(observer) {\n const dynamicObservers = getOrCreateMap(this, '__dynamicObservers');\n const { method, observerProps } = parseObserver(observer);\n dynamicObservers.set(method, observerProps);\n }\n\n /** @private */\n __runComplexObservers(props, observers) {\n observers.forEach((observerProps, method) => {\n if (observerProps.some((prop) => props.has(prop))) {\n if (!this[method]) {\n console.warn(`observer method ${method} not defined`);\n } else {\n this[method](...observerProps.map((prop) => this[prop]));\n }\n }\n });\n }\n\n /** @private */\n __runObservers(props, observers) {\n props.forEach((v, k) => {\n const observer = observers.get(k);\n if (observer !== undefined && this[observer]) {\n this[observer](this[k], v);\n }\n });\n }\n\n /** @private */\n __runNotifyProps(props, notifyProps) {\n props.forEach((_, k) => {\n if (notifyProps.has(k)) {\n this.dispatchEvent(\n new CustomEvent(`${camelToDash(k)}-changed`, {\n detail: {\n value: this[k],\n },\n }),\n );\n }\n });\n }\n\n /** @protected */\n _get(path, object) {\n return get(path, object);\n }\n\n /** @protected */\n _set(path, value, object) {\n set(path, value, object);\n }\n }\n\n return PolylitMixinClass;\n};\n\nexport const PolylitMixin = dedupeMixin(PolylitMixinImplementation);\n","/**\n * @license\n * Copyright (c) 2022 - 2024 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';\nimport { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';\n\n/**\n * A mixin providing common popover overlay functionality.\n *\n * @polymerMixin\n * @mixes PositionMixin\n * @mixes OverlayMixin\n */\nexport const PopoverOverlayMixin = (superClass) =>\n class PopoverOverlayMixinClass extends PositionMixin(OverlayMixin(superClass)) {\n static get properties() {\n return {\n position: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * Tag name prefix used by custom properties.\n * @protected\n * @return {string}\n */\n get _tagNamePrefix() {\n return 'vaadin-popover';\n }\n\n requestContentUpdate() {\n super.requestContentUpdate();\n\n // Copy custom properties from the owner\n if (this.positionTarget && this.owner) {\n const style = getComputedStyle(this.owner);\n ['top', 'bottom', 'start', 'end'].forEach((prop) => {\n this.style.setProperty(\n `--${this._tagNamePrefix}-offset-${prop}`,\n style.getPropertyValue(`--${this._tagNamePrefix}-offset-${prop}`),\n );\n });\n }\n }\n\n /**\n * @protected\n * @override\n */\n _updatePosition() {\n super._updatePosition();\n\n if (!this.positionTarget || !this.opened) {\n return;\n }\n\n this.removeAttribute('arrow-centered');\n\n // Center the overlay horizontally\n if (this.position === 'bottom' || this.position === 'top') {\n const targetRect = this.positionTarget.getBoundingClientRect();\n const overlayRect = this.$.overlay.getBoundingClientRect();\n\n const offset = targetRect.width / 2 - overlayRect.width / 2;\n\n if (this.style.left) {\n const left = overlayRect.left + offset;\n if (left > 0) {\n this.style.left = `${left}px`;\n // Center the pointer arrow horizontally\n this.setAttribute('arrow-centered', '');\n }\n }\n\n if (this.style.right) {\n const right = parseFloat(this.style.right) + offset;\n if (right > 0) {\n this.style.right = `${right}px`;\n // Center the pointer arrow horizontally\n this.setAttribute('arrow-centered', '');\n }\n }\n }\n\n // Center the overlay vertically\n if (this.position === 'start' || this.position === 'end') {\n const targetRect = this.positionTarget.getBoundingClientRect();\n const overlayRect = this.$.overlay.getBoundingClientRect();\n\n const offset = targetRect.height / 2 - overlayRect.height / 2;\n this.style.top = `${overlayRect.top + offset}px`;\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2024 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css, html, LitElement } from 'lit';\nimport { isElementFocused } from '@vaadin/a11y-base/src/focus-utils.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { PopoverOverlayMixin } from './vaadin-popover-overlay-mixin.js';\n\n/**\n * An element used internally by `<vaadin-popover>`. Not intended to be used separately.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes DirMixin\n * @mixes PopoverOverlayMixin\n * @mixes ThemableMixin\n * @private\n */\nclass PopoverOverlay extends PopoverOverlayMixin(DirMixin(ThemableMixin(PolylitMixin(LitElement)))) {\n static get is() {\n return 'vaadin-popover-overlay';\n }\n\n static get styles() {\n return [\n overlayStyles,\n css`\n :host {\n --_vaadin-popover-content-width: auto;\n --_vaadin-popover-content-height: auto;\n }\n\n :host([modeless][with-backdrop]) [part='backdrop'] {\n pointer-events: none;\n }\n\n :host([position^='top'][top-aligned]) [part='overlay'],\n :host([position^='bottom'][top-aligned]) [part='overlay'] {\n margin-top: var(--vaadin-popover-offset-top, 0);\n }\n\n [part='overlay'] {\n position: relative;\n overflow: visible;\n max-height: 100%;\n }\n\n [part='content'] {\n overflow: auto;\n box-sizing: border-box;\n max-height: 100%;\n width: var(--_vaadin-popover-content-width);\n height: var(--_vaadin-popover-content-height);\n }\n\n /* Increase the area of the popover so the pointer can go from the target directly to it. */\n [part='overlay']::before {\n position: absolute;\n content: '';\n inset-block: calc(var(--vaadin-popover-offset-top, 0) * -1) calc(var(--vaadin-popover-offset-bottom, 0) * -1);\n inset-inline: calc(var(--vaadin-popover-offset-start, 0) * -1) calc(var(--vaadin-popover-offset-end, 0) * -1);\n z-index: -1;\n pointer-events: auto;\n }\n\n :host([position^='top'][bottom-aligned]) [part='overlay'],\n :host([position^='bottom'][bottom-aligned]) [part='overlay'] {\n margin-bottom: var(--vaadin-popover-offset-bottom, 0);\n }\n\n :host([position^='start'][start-aligned]) [part='overlay'],\n :host([position^='end'][start-aligned]) [part='overlay'] {\n margin-inline-start: var(--vaadin-popover-offset-start, 0);\n }\n\n :host([position^='start'][end-aligned]) [part='overlay'],\n :host([position^='end'][end-aligned]) [part='overlay'] {\n margin-inline-end: var(--vaadin-popover-offset-end, 0);\n }\n\n [part='arrow'] {\n display: none;\n position: absolute;\n height: 0;\n width: 0;\n }\n\n :host([theme~='arrow']) [part='arrow'] {\n display: block;\n }\n `,\n ];\n }\n\n /** @protected */\n render() {\n return html`\n <div id=\"backdrop\" part=\"backdrop\" hidden ?hidden=\"${!this.withBackdrop}\"></div>\n <div part=\"overlay\" id=\"overlay\" tabindex=\"0\">\n <div part=\"arrow\"></div>\n <div part=\"content\" id=\"content\"><slot></slot></div>\n </div>\n `;\n }\n\n /**\n * Override method inherited from `OverlayMixin` to not close\n * modal popover on outside click when opening on focus.\n *\n * @param {Event} event\n * @return {boolean}\n * @protected\n */\n _shouldCloseOnOutsideClick(event) {\n // When opening a modal popover on mouse focusin, the focus moves to the overlay\n // and then outside click listener is fired. Detect this case and prevent closing.\n if (this.owner.__hasTrigger('focus') && isElementFocused(this)) {\n return false;\n }\n\n return super._shouldCloseOnOutsideClick(event);\n }\n}\n\ndefineCustomElement(PopoverOverlay);\n","import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=o=>o??t;export{o as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","/**\n * @license\n * Copyright (c) 2024 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { microTask } from '@vaadin/component-base/src/async.js';\nimport { Debouncer } from '@vaadin/component-base/src/debounce.js';\n\n/**\n * A mixin providing popover target functionality.\n *\n * @polymerMixin\n */\nexport const PopoverTargetMixin = (superClass) =>\n class PopoverTargetMixinClass extends superClass {\n static get properties() {\n return {\n /**\n * The id of the element to be used as `target` value.\n * The element should be in the DOM by the time when\n * the attribute is set, otherwise a warning is shown.\n */\n for: {\n type: String,\n observer: '__forChanged',\n },\n\n /**\n * Reference to the DOM element used both to trigger the overlay\n * by user interaction and to visually position it on the screen.\n *\n * Defaults to an element referenced with `for` attribute, in\n * which case it must be located in the same shadow scope.\n */\n target: {\n type: Object,\n observer: '__targetChanged',\n },\n };\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n if (this.target) {\n this._addTargetListeners(this.target);\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n if (this.target) {\n this._removeTargetListeners(this.target);\n }\n }\n\n /** @private */\n __forChanged(forId) {\n if (forId) {\n this.__setTargetByIdDebouncer = Debouncer.debounce(this.__setTargetByIdDebouncer, microTask, () =>\n this.__setTargetById(forId),\n );\n }\n }\n\n /** @private */\n __setTargetById(targetId) {\n if (!this.isConnected) {\n return;\n }\n\n const target = this.getRootNode().getElementById(targetId);\n\n if (target) {\n this.target = target;\n } else {\n console.warn(`No element with id=\"${targetId}\" set via \"for\" property found on the page.`);\n }\n }\n\n /** @private */\n __targetChanged(target, oldTarget) {\n if (oldTarget) {\n this._removeTargetListeners(oldTarget);\n }\n\n if (target) {\n this._addTargetListeners(target);\n }\n }\n\n /**\n * @param {HTMLElement} _target\n * @protected\n */\n _addTargetListeners(_target) {\n // To be implemented.\n }\n\n /**\n * @param {HTMLElement} _target\n * @protected\n */\n _removeTargetListeners(_target) {\n // To be implemented.\n }\n };\n","/**\n * @license\n * Copyright (c) 2024 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './vaadin-popover-overlay.js';\nimport { css, html, LitElement } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport {\n getDeepActiveElement,\n getFocusableElements,\n isElementFocused,\n isKeyboardActive,\n} from '@vaadin/a11y-base/src/focus-utils.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js';\nimport { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';\nimport { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';\nimport { isLastOverlay } from '@vaadin/overlay/src/vaadin-overlay-stack-mixin.js';\nimport { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';\nimport { PopoverPositionMixin } from './vaadin-popover-position-mixin.js';\nimport { PopoverTargetMixin } from './vaadin-popover-target-mixin.js';\n\nconst DEFAULT_DELAY = 500;\n\nlet defaultFocusDelay = DEFAULT_DELAY;\nlet defaultHoverDelay = DEFAULT_DELAY;\nlet defaultHideDelay = DEFAULT_DELAY;\n\n/**\n * Controller for handling popover opened state.\n */\nclass PopoverOpenedStateController {\n constructor(host) {\n this.host = host;\n }\n\n /**\n * Whether closing is currently in progress.\n * @return {boolean}\n */\n get isClosing() {\n return this.__closeTimeout != null;\n }\n\n /** @private */\n get __focusDelay() {\n const popover = this.host;\n return popover.focusDelay != null && popover.focusDelay >= 0 ? popover.focusDelay : defaultFocusDelay;\n }\n\n /** @private */\n get __hoverDelay() {\n const popover = this.host;\n return popover.hoverDelay != null && popover.hoverDelay >= 0 ? popover.hoverDelay : defaultHoverDelay;\n }\n\n /** @private */\n get __hideDelay() {\n const popover = this.host;\n return popover.hideDelay != null && popover.hideDelay >= 0 ? popover.hideDelay : defaultHideDelay;\n }\n\n /**\n * Schedule opening the popover.\n * @param {Object} options\n */\n open(options = { immediate: false }) {\n const { immediate, trigger } = options;\n const shouldDelayHover = trigger === 'hover' && this.__hoverDelay > 0;\n const shouldDelayFocus = trigger === 'focus' && this.__focusDelay > 0;\n\n if (!immediate && (shouldDelayHover || shouldDelayFocus) && !this.__closeTimeout) {\n this.__scheduleOpen(trigger);\n } else {\n this.__showPopover();\n }\n }\n\n /**\n * Schedule closing the popover.\n * @param {boolean} immediate\n */\n close(immediate) {\n if (!immediate && this.__hideDelay > 0) {\n this.__scheduleClose();\n } else {\n this.__abortClose();\n this.__setOpened(false);\n }\n\n this.__abortOpen();\n }\n\n /** @private */\n __setOpened(opened) {\n this.host.opened = opened;\n }\n\n /** @private */\n __showPopover() {\n this.__abortClose();\n this.__setOpened(true);\n }\n\n /** @private */\n __abortClose() {\n if (this.__closeTimeout) {\n clearTimeout(this.__closeTimeout);\n this.__closeTimeout = null;\n }\n }\n\n /** @private */\n __abortOpen() {\n if (this.__openTimeout) {\n clearTimeout(this.__openTimeout);\n this.__openTimeout = null;\n }\n }\n\n /** @private */\n __scheduleClose() {\n this.__closeTimeout = setTimeout(() => {\n this.__closeTimeout = null;\n this.__setOpened(false);\n }, this.__hideDelay);\n }\n\n /** @private */\n __scheduleOpen(trigger) {\n this.__abortOpen();\n\n const delay = trigger === 'focus' ? this.__focusDelay : this.__hoverDelay;\n this.__openTimeout = setTimeout(() => {\n this.__openTimeout = null;\n this.__showPopover();\n }, delay);\n }\n}\n\n/**\n * `<vaadin-popover>` is a Web Component for creating overlays\n * that are positioned next to specified DOM element (target).\n *\n * Unlike `<vaadin-tooltip>`, the popover supports rich content\n * that can be provided by using `renderer` function.\n *\n * ### Styling\n *\n * `<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\n * themable component as the actual visible overlay.\n *\n * See [`<vaadin-overlay>`](#/elements/vaadin-overlay) documentation\n * for `<vaadin-popover-overlay>` parts.\n *\n * In addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n *\n * Part name | Description\n * -----------------|-------------------------------------------\n * `arrow` | Optional arrow pointing to the target when using `theme=\"arrow\"`\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description\n * -----------------|----------------------------------------\n * `position` | Reflects the `position` property value.\n *\n * Note: the `theme` attribute value set on `<vaadin-popover>` is\n * propagated to the internal `<vaadin-popover-overlay>` component.\n *\n * ### Custom CSS Properties\n *\n * The following custom CSS properties are available on the `<vaadin-popover>` element:\n *\n * Custom CSS property | Description\n * ---------------------------------|-------------\n * `--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target\n * `--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target\n * `--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target\n * `--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.\n * @fires {CustomEvent} closed - Fired when the popover is closed.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes OverlayClassMixin\n * @mixes PopoverPositionMixin\n * @mixes PopoverTargetMixin\n * @mixes ThemePropertyMixin\n */\nclass Popover extends PopoverPositionMixin(\n PopoverTargetMixin(OverlayClassMixin(ThemePropertyMixin(ElementMixin(PolylitMixin(LitElement))))),\n) {\n static get is() {\n return 'vaadin-popover';\n }\n\n static get styles() {\n return css`\n :host {\n display: none !important;\n }\n `;\n }\n\n static get properties() {\n return {\n /**\n * String used to label the overlay to screen reader users.\n *\n * @attr {string} accessible-name\n */\n accessibleName: {\n type: String,\n },\n\n /**\n * Id of the element used as label of the overlay to screen reader users.\n *\n * @attr {string} accessible-name-ref\n */\n accessibleNameRef: {\n type: String,\n },\n\n /**\n * When true, the popover content automatically receives focus after\n * it is opened. Modal popovers use this behavior by default.\n */\n autofocus: {\n type: Boolean,\n },\n\n /**\n * Height to be set on the overlay content.\n *\n * @attr {string} content-height\n */\n contentHeight: {\n type: String,\n },\n\n /**\n * Width to be set on the overlay content.\n *\n * @attr {string} content-width\n */\n contentWidth: {\n type: String,\n },\n\n /**\n * The delay in milliseconds before the popover is opened\n * on focus when the corresponding trigger is used.\n *\n * When not specified, the global default (500ms) is used.\n *\n * @attr {number} focus-delay\n */\n focusDelay: {\n type: Number,\n },\n\n /**\n * The delay in milliseconds before the popover is closed\n * on losing hover, when the corresponding trigger is used.\n * On blur, the popover is closed immediately.\n *\n * When not specified, the global default (500ms) is used.\n *\n * @attr {number} hide-delay\n */\n hideDelay: {\n type: Number,\n },\n\n /**\n * The delay in milliseconds before the popover is opened\n * on hover when the corresponding trigger is used.\n *\n * When not specified, the global default (500ms) is used.\n *\n * @attr {number} hover-delay\n */\n hoverDelay: {\n type: Number,\n },\n\n /**\n * True if the popover overlay is opened, false otherwise.\n */\n opened: {\n type: Boolean,\n value: false,\n notify: true,\n observer: '__openedChanged',\n },\n\n /**\n * The `role` attribute value to be set on the overlay.\n *\n * @attr {string} overlay-role\n */\n overlayRole: {\n type: String,\n value: 'dialog',\n },\n\n /**\n * Custom function for rendering the content of the overlay.\n * Receives two arguments:\n *\n * - `root` The root container DOM element. Append your content to it.\n * - `popover` The reference to the `vaadin-popover` element (overlay host).\n */\n renderer: {\n type: Object,\n },\n\n /**\n * When true, the popover prevents interacting with background elements\n * by setting `pointer-events` style on the document body to `none`.\n * This also enables trapping focus inside the overlay.\n */\n modal: {\n type: Boolean,\n value: false,\n },\n\n /**\n * Set to true to disable closing popover overlay on outside click.\n *\n * @attr {boolean} no-close-on-outside-click\n */\n noCloseOnOutsideClick: {\n type: Boolean,\n value: false,\n },\n\n /**\n * Set to true to disable closing popover overlay on Escape press.\n * When the popover is modal, pressing Escape anywhere in the\n * document closes the overlay. Otherwise, only Escape press\n * from the popover itself or its target closes the overlay.\n *\n * @attr {boolean} no-close-on-esc\n */\n noCloseOnEsc: {\n type: Boolean,\n value: false,\n },\n\n /**\n * Popover trigger mode, used to configure how the overlay is opened or closed.\n * Could be set to multiple by providing an array, e.g. `trigger = ['hover', 'focus']`.\n *\n * Supported values:\n * - `click` (default) - opens and closes on target click.\n * - `hover` - opens on target mouseenter, closes on target mouseleave. Moving mouse\n * to the popover overlay content keeps the overlay opened.\n * - `focus` - opens on target focus, closes on target blur. Moving focus to the\n * popover overlay content keeps the overlay opened.\n *\n * In addition to the behavior specified by `trigger`, the popover can be closed by:\n * - pressing Escape key (unless `noCloseOnEsc` property is true)\n * - outside click (unless `noCloseOnOutsideClick` property is true)\n *\n * When setting `trigger` property to `null`, `undefined` or empty array, the popover\n * can be only opened or closed programmatically by changing `opened` property.\n */\n trigger: {\n type: Array,\n value: () => ['click'],\n },\n\n /**\n * When true, the overlay has a backdrop (modality curtain) on top of the\n * underlying page content, covering the whole viewport.\n *\n * @attr {boolean} with-backdrop\n */\n withBackdrop: {\n type: Boolean,\n value: false,\n },\n\n /** @private */\n __shouldRestoreFocus: {\n type: Boolean,\n value: false,\n sync: true,\n },\n\n /** @private */\n __overlayId: {\n type: String,\n },\n };\n }\n\n static get observers() {\n return [\n '__updateContentHeight(contentHeight, _overlayElement)',\n '__updateContentWidth(contentWidth, _overlayElement)',\n '__openedOrTargetChanged(opened, target)',\n '__overlayRoleOrTargetChanged(overlayRole, target)',\n ];\n }\n\n /**\n * Sets the default focus delay to be used by all popover instances,\n * except for those that have focus delay configured using property.\n *\n * @param {number} focusDelay\n */\n static setDefaultFocusDelay(focusDelay) {\n defaultFocusDelay = focusDelay != null && focusDelay >= 0 ? focusDelay : DEFAULT_DELAY;\n }\n\n /**\n * Sets the default hide delay to be used by all popover instances,\n * except for those that have hide delay configured using property.\n *\n * @param {number} hideDelay\n */\n static setDefaultHideDelay(hideDelay) {\n defaultHideDelay = hideDelay != null && hideDelay >= 0 ? hideDelay : DEFAULT_DELAY;\n }\n\n /**\n * Sets the default hover delay to be used by all popover instances,\n * except for those that have hover delay configured using property.\n *\n * @param {number} hoverDelay\n */\n static setDefaultHoverDelay(hoverDelay) {\n defaultHoverDelay = hoverDelay != null && hoverDelay >= 0 ? hoverDelay : DEFAULT_DELAY;\n }\n\n constructor() {\n super();\n\n this.__overlayId = `vaadin-popover-${generateUniqueId()}`;\n\n this.__onGlobalClick = this.__onGlobalClick.bind(this);\n this.__onGlobalKeyDown = this.__onGlobalKeyDown.bind(this);\n this.__onTargetClick = this.__onTargetClick.bind(this);\n this.__onTargetFocusIn = this.__onTargetFocusIn.bind(this);\n this.__onTargetFocusOut = this.__onTargetFocusOut.bind(this);\n this.__onTargetMouseEnter = this.__onTargetMouseEnter.bind(this);\n this.__onTargetMouseLeave = this.__onTargetMouseLeave.bind(this);\n\n this._openedStateController = new PopoverOpenedStateController(this);\n }\n\n /** @protected */\n render() {\n const effectivePosition = this.__effectivePosition;\n\n return html`\n <vaadin-popover-overlay\n id=\"${this.__overlayId}\"\n role=\"${this.overlayRole}\"\n aria-label=\"${ifDefined(this.accessibleName)}\"\n aria-labelledby=\"${ifDefined(this.accessibleNameRef)}\"\n .renderer=\"${this.renderer}\"\n .owner=\"${this}\"\n theme=\"${ifDefined(this._theme)}\"\n .positionTarget=\"${this.target}\"\n .position=\"${effectivePosition}\"\n .opened=\"${this.opened}\"\n .modeless=\"${!this.modal}\"\n .focusTrap=\"${this.modal}\"\n .withBackdrop=\"${this.withBackdrop}\"\n ?no-horizontal-overlap=\"${this.__computeNoHorizontalOverlap(effectivePosition)}\"\n ?no-vertical-overlap=\"${this.__computeNoVerticalOverlap(effectivePosition)}\"\n .horizontalAlign=\"${this.__computeHorizontalAlign(effectivePosition)}\"\n .verticalAlign=\"${this.__computeVerticalAlign(effectivePosition)}\"\n @mousedown=\"${this.__onOverlayMouseDown}\"\n @mouseenter=\"${this.__onOverlayMouseEnter}\"\n @mouseleave=\"${this.__onOverlayMouseLeave}\"\n @focusin=\"${this.__onOverlayFocusIn}\"\n @focusout=\"${this.__onOverlayFocusOut}\"\n @opened-changed=\"${this.__onOpenedChanged}\"\n .restoreFocusOnClose=\"${this.__shouldRestoreFocus}\"\n .restoreFocusNode=\"${this.target}\"\n @vaadin-overlay-escape-press=\"${this.__onEscapePress}\"\n @vaadin-overlay-outside-click=\"${this.__onOutsideClick}\"\n @vaadin-overlay-open=\"${this.__onOverlayOpened}\"\n @vaadin-overlay-closed=\"${this.__onOverlayClosed}\"\n ></vaadin-popover-overlay>\n `;\n }\n\n /**\n * Requests an update for the content of the popover.\n * While performing the update, it invokes the renderer passed in the `renderer` property.\n *\n * It is not guaranteed that the update happens immediately (synchronously) after it is requested.\n */\n requestContentUpdate() {\n if (!this.renderer || !this._overlayElement) {\n return;\n }\n\n this._overlayElement.requestContentUpdate();\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._overlayElement = this.shadowRoot.querySelector('vaadin-popover-overlay');\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n document.documentElement.addEventListener('click', this.__onGlobalClick, true);\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n document.documentElement.removeEventListener('click', this.__onGlobalClick, true);\n\n this._openedStateController.close(true);\n }\n\n /**\n * @param {HTMLElement} target\n * @protected\n * @override\n */\n _addTargetListeners(target) {\n target.addEventListener('click', this.__onTargetClick);\n target.addEventListener('mouseenter', this.__onTargetMouseEnter);\n target.addEventListener('mouseleave', this.__onTargetMouseLeave);\n target.addEventListener('focusin', this.__onTargetFocusIn);\n target.addEventListener('focusout', this.__onTargetFocusOut);\n }\n\n /**\n * @param {HTMLElement} target\n * @protected\n * @override\n */\n _removeTargetListeners(target) {\n target.removeEventListener('click', this.__onTargetClick);\n target.removeEventListener('mouseenter', this.__onTargetMouseEnter);\n target.removeEventListener('mouseleave', this.__onTargetMouseLeave);\n target.removeEventListener('focusin', this.__onTargetFocusIn);\n target.removeEventListener('focusout', this.__onTargetFocusOut);\n }\n\n /** @private */\n __openedChanged(opened, oldOpened) {\n if (opened) {\n document.addEventListener('keydown', this.__onGlobalKeyDown, true);\n } else if (oldOpened) {\n document.removeEventListener('keydown', this.__onGlobalKeyDown, true);\n }\n }\n\n /** @private */\n __openedOrTargetChanged(opened, target) {\n if (target) {\n target.setAttribute('aria-expanded', opened ? 'true' : 'false');\n\n if (opened) {\n target.setAttribute('aria-controls', this.__overlayId);\n } else {\n target.removeAttribute('aria-controls');\n }\n }\n }\n\n /** @private */\n __overlayRoleOrTargetChanged(overlayRole, target) {\n if (this.__oldTarget) {\n this.__oldTarget.removeAttribute('aria-haspopup');\n }\n\n if (target) {\n const isDialog = overlayRole === 'dialog' || overlayRole === 'alertdialog';\n target.setAttribute('aria-haspopup', isDialog ? 'dialog' : 'true');\n\n this.__oldTarget = target;\n }\n }\n\n /**\n * Overlay's global outside click listener doesn't work when\n * the overlay is modeless, so we use a separate listener.\n * @private\n */\n __onGlobalClick(event) {\n if (\n this.opened &&\n !this.__isManual &&\n !this.modal &&\n !event.composedPath().some((el) => el === this._overlayElement || el === this.target) &&\n !this.noCloseOnOutsideClick &&\n isLastOverlay(this._overlayElement)\n ) {\n this._openedStateController.close(true);\n }\n }\n\n /** @private */\n __onTargetClick() {\n if (this.__hasTrigger('click')) {\n if (!this.opened) {\n this.__shouldRestoreFocus = true;\n }\n if (this.opened) {\n this._openedStateController.close(true);\n } else {\n this._openedStateController.open({ immediate: true });\n }\n }\n }\n\n /**\n * Overlay's global Escape press listener doesn't work when\n * the overlay is modeless, so we use a separate listener.\n * @private\n */\n __onGlobalKeyDown(event) {\n // Modal popover uses overlay logic for Esc key and focus trap.\n if (this.modal) {\n return;\n }\n\n if (\n event.key === 'Escape' &&\n !this.noCloseOnEsc &&\n this.opened &&\n !this.__isManual &&\n isLastOverlay(this._overlayElement)\n ) {\n // Prevent closing parent overlay (e.g. dialog)\n event.stopPropagation();\n this._openedStateController.close(true);\n }\n\n // Include popover content in the Tab order after the target.\n if (event.key === 'Tab') {\n if (event.shiftKey) {\n this.__onGlobalShiftTab(event);\n } else {\n this.__onGlobalTab(event);\n }\n }\n }\n\n /** @private */\n __onGlobalTab(event) {\n const overlayPart = this._overlayElement.$.overlay;\n\n // Move focus to the popover content on target element Tab\n if (this.target && isElementFocused(this.target)) {\n event.preventDefault();\n overlayPart.focus();\n return;\n }\n\n // Move focus to the next element after target on content Tab\n const lastFocusable = this.__getLastFocusable(overlayPart);\n if (lastFocusable && isElementFocused(lastFocusable)) {\n const focusable = this.__getNextBodyFocusable(this.target);\n if (focusable && focusable !== overlayPart) {\n event.preventDefault();\n focusable.focus();\n return;\n }\n }\n\n // Prevent focusing the popover content on previous element Tab\n const activeElement = getDeepActiveElement();\n const nextFocusable = this.__getNextBodyFocusable(activeElement);\n if (nextFocusable === overlayPart && lastFocusable) {\n // Move focus to the last overlay focusable and do NOT prevent keydown\n // to move focus outside the popover content (e.g. to the URL bar).\n lastFocusable.focus();\n }\n }\n\n /** @private */\n __onGlobalShiftTab(event) {\n const overlayPart = this._overlayElement.$.overlay;\n\n // Prevent restoring focus after target blur on Shift + Tab\n if (this.target && isElementFocused(this.target) && this.__shouldRestoreFocus) {\n this.__shouldRestoreFocus = false;\n return;\n }\n\n // Move focus back to the target on overlay content Shift + Tab\n if (this.target && isElementFocused(overlayPart)) {\n event.preventDefault();\n this.target.focus();\n return;\n }\n\n // Move focus back to the popover on next element Shift + Tab\n const nextFocusable = this.__getNextBodyFocusable(this.target);\n if (nextFocusable && isElementFocused(nextFocusable)) {\n const lastFocusable = this.__getLastFocusable(overlayPart);\n if (lastFocusable) {\n event.preventDefault();\n lastFocusable.focus();\n }\n }\n }\n\n /** @private */\n __getNextBodyFocusable(target) {\n const focusables = getFocusableElements(document.body);\n const idx = focusables.findIndex((el) => el === target);\n return focusables[idx + 1];\n }\n\n /** @private */\n __getLastFocusable(container) {\n const focusables = getFocusableElements(container);\n return focusables.pop();\n }\n\n /** @private */\n __onTargetFocusIn() {\n this.__focusInside = true;\n\n if (this.__hasTrigger('focus')) {\n // When trigger is set to both focus and click, only open on\n // keyboard focus, to prevent issue when immediately closing\n // on click which occurs after the focus caused by mousedown.\n if (this.__hasTrigger('click') && !isKeyboardActive()) {\n return;\n }\n\n // Prevent overlay re-opening when restoring focus on close.\n if (!this.__shouldRestoreFocus) {\n this.__shouldRestoreFocus = true;\n this._openedStateController.open({ trigger: 'focus' });\n }\n }\n }\n\n /** @private */\n __onTargetFocusOut(event) {\n // Do not close the popover on overlay focusout if it's not the last one.\n // This covers the case when focus moves to the nested popover opened\n // without focusing parent popover overlay (e.g. using hover trigger).\n if (!isLastOverlay(this._overlayElement)) {\n return;\n }\n\n if ((this.__hasTrigger('focus') && this.__mouseDownInside) || this._overlayElement.contains(event.relatedTarget)) {\n return;\n }\n\n this.__handleFocusout();\n }\n\n /** @private */\n __onTargetMouseEnter() {\n this.__hoverInside = true;\n\n if (this.__hasTrigger('hover') && !this.opened) {\n // Prevent closing due to `pointer-events: none` set on body.\n if (this.modal) {\n this.target.style.pointerEvents = 'auto';\n }\n this._openedStateController.open({ trigger: 'hover' });\n }\n }\n\n /** @private */\n __onTargetMouseLeave(event) {\n // Do not close the popover on target focusout if the overlay is not the last one.\n // This happens e.g. when opening the nested popover that uses non-modal overlay.\n if (this._overlayElement.opened && !isLastOverlay(this._overlayElement)) {\n return;\n }\n\n if (this._overlayElement.contains(event.relatedTarget)) {\n return;\n }\n\n this.__handleMouseLeave();\n }\n\n /** @private */\n __onOverlayFocusIn() {\n this.__focusInside = true;\n\n // When using Tab to move focus, restoring focus is reset. However, if pressing Tab\n // causes focus to be moved inside the overlay, we should restore focus on close.\n if (this.__hasTrigger('focus') || this.__hasTrigger('click')) {\n this.__shouldRestoreFocus = true;\n }\n }\n\n /** @private */\n __onOverlayFocusOut(event) {\n // Do not close the popover on overlay focusout if it's not the last one.\n // This covers the following cases of nested overlay based components:\n // 1. Moving focus to the nested overlay (e.g. vaadin-select, vaadin-menu-bar)\n // 2. Closing not focused nested overlay on outside (e.g. vaadin-combo-box)\n if (!isLastOverlay(this._overlayElement)) {\n return;\n }\n\n if (\n (this.__hasTrigger('focus') && this.__mouseDownInside) ||\n event.relatedTarget === this.target ||\n this._overlayElement.contains(event.relatedTarget)\n ) {\n return;\n }\n\n this.__handleFocusout();\n }\n\n /** @private */\n __onOverlayMouseDown() {\n if (this.__hasTrigger('focus')) {\n this.__mouseDownInside = true;\n\n document.addEventListener(\n 'mouseup',\n () => {\n this.__mouseDownInside = false;\n },\n { once: true },\n );\n }\n }\n\n /** @private */\n __onOverlayMouseEnter() {\n this.__hoverInside = true;\n\n // Prevent closing if cursor moves to the overlay during hide delay.\n if (this.__hasTrigger('hover') && this._openedStateController.isClosing) {\n this._openedStateController.open({ immediate: true });\n }\n }\n\n /** @private */\n __onOverlayMouseLeave(event) {\n // Do not close the popover on overlay focusout if it's not the last one.\n // This happens when opening the nested component that uses \"modal\" overlay\n // setting `pointer-events: none` on the body (combo-box, date-picker etc).\n if (!isLastOverlay(this._overlayElement)) {\n return;\n }\n\n if (event.relatedTarget === this.target) {\n return;\n }\n\n this.__handleMouseLeave();\n }\n\n /** @private */\n __handleFocusout() {\n this.__focusInside = false;\n\n if (this.__hasTrigger('hover') && this.__hoverInside) {\n return;\n }\n\n if (this.__hasTrigger('focus')) {\n this._openedStateController.close(true);\n }\n }\n\n /** @private */\n __handleMouseLeave() {\n this.__hoverInside = false;\n\n if (this.__hasTrigger('focus') && this.__focusInside) {\n return;\n }\n\n if (this.__hasTrigger('hover')) {\n this._openedStateController.close();\n }\n }\n\n /** @private */\n __onOpenedChanged(event) {\n this.opened = event.detail.value;\n }\n\n /** @private */\n __onOverlayOpened() {\n if (this.autofocus && !this.modal) {\n this._overlayElement.$.overlay.focus();\n }\n }\n\n /** @private */\n __onOverlayClosed() {\n // Reset restoring focus state after a timeout to make sure focus was restored\n // and then allow re-opening overlay on re-focusing target with focus trigger.\n if (this.__shouldRestoreFocus) {\n setTimeout(() => {\n this.__shouldRestoreFocus = false;\n });\n }\n\n // Restore pointer-events set when opening on hover.\n if (this.modal && this.target.style.pointerEvents) {\n this.target.style.pointerEvents = '';\n }\n\n this.dispatchEvent(new CustomEvent('closed'));\n }\n\n /**\n * Close the popover if `noCloseOnEsc` isn't set to true.\n * @private\n */\n __onEscapePress(e) {\n if (this.noCloseOnEsc || this.__isManual) {\n e.preventDefault();\n }\n }\n\n /**\n * Close the popover if `noCloseOnOutsideClick` isn't set to true.\n * @private\n */\n __onOutsideClick(e) {\n if (this.noCloseOnOutsideClick || this.__isManual) {\n e.preventDefault();\n }\n }\n\n /** @private */\n __hasTrigger(trigger) {\n return Array.isArray(this.trigger) && this.trigger.includes(trigger);\n }\n\n /** @private */\n get __isManual() {\n return this.trigger == null || (Array.isArray(this.trigger) && this.trigger.length === 0);\n }\n\n /** @private */\n __updateDimension(overlay, dimension, value) {\n const prop = `--_vaadin-popover-content-${dimension}`;\n\n if (value) {\n overlay.style.setProperty(prop, value);\n } else {\n overlay.style.removeProperty(prop);\n }\n }\n\n /** @private */\n __updateContentHeight(height, overlay) {\n if (overlay) {\n this.__updateDimension(overlay, 'height', height);\n }\n }\n\n /** @private */\n __updateContentWidth(width, overlay) {\n if (overlay) {\n this.__updateDimension(overlay, 'width', width);\n }\n }\n\n /**\n * Fired when the popover is closed.\n *\n * @event closed\n */\n}\n\ndefineCustomElement(Popover);\n\nexport { Popover };\n","/**\n * @license\n * Copyright (c) 2024 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A mixin providing popover position functionality.\n *\n * @polymerMixin\n */\nexport const PopoverPositionMixin = (superClass) =>\n class PopoverPositionMixinClass extends superClass {\n static get properties() {\n return {\n /**\n * Position of the overlay with respect to the target.\n * Supported values: `top-start`, `top`, `top-end`,\n * `bottom-start`, `bottom`, `bottom-end`, `start-top`,\n * `start`, `start-bottom`, `end-top`, `end`, `end-bottom`.\n */\n position: {\n type: String,\n },\n\n /**\n * Default value used when `position` property is not set.\n * @protected\n */\n _position: {\n type: String,\n value: 'bottom',\n },\n\n /** @private */\n __effectivePosition: {\n type: String,\n computed: '__computePosition(position, _position)',\n },\n };\n }\n\n /** @protected */\n __computeHorizontalAlign(position) {\n return ['top-end', 'bottom-end', 'start-top', 'start', 'start-bottom'].includes(position) ? 'end' : 'start';\n }\n\n /** @protected */\n __computeNoHorizontalOverlap(position) {\n return ['start-top', 'start', 'start-bottom', 'end-top', 'end', 'end-bottom'].includes(position);\n }\n\n /** @protected */\n __computeNoVerticalOverlap(position) {\n return ['top-start', 'top-end', 'top', 'bottom-start', 'bottom', 'bottom-end'].includes(position);\n }\n\n /** @protected */\n __computeVerticalAlign(position) {\n return ['top-start', 'top-end', 'top', 'start-bottom', 'end-bottom'].includes(position) ? 'bottom' : 'top';\n }\n\n /** @private */\n __computePosition(position, defaultPosition) {\n return position || defaultPosition;\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":["InputFieldMixin","superclass","properties","autocomplete","type","String","autocorrect","autocapitalize","reflectToAttribute","delegateAttrs","super","__data","this","__dataValue","value","_inputElementChanged","input","console","warn","localName","_setFocused","focused","document","hasFocus","validate","_onInput","event","invalid","_valueChanged","newValue","oldValue","undefined","appliedClassMixins","WeakMap","caseMap","CAMEL_TO_DASH","camelToDash","camel","replace","toLowerCase","upper","name","toUpperCase","substring","parseObserver","observerString","method","rest","split","observerProps","map","prop","trim","getOrCreateMap","obj","Object","prototype","hasOwnProperty","call","Map","PolylitMixin","mixin","createProperty","options","Boolean","Number","Array","includes","reflect","finalize","isArray","observers","complexObservers","forEach","observer","set","addCheckedInitializer","initializer","addInitializer","instance","getPropertyDescriptor","key","defaultDescriptor","result","sync","get","requestUpdate","hasUpdated","performUpdate","configurable","enumerable","readOnly","setter","notify","__notifyProps","notifyProps","Set","add","computed","assignComputedMethod","props","attribute","firstUpdated","$","renderRoot","querySelectorAll","node","id","ready","updated","constructor","__observers","__runObservers","__complexObservers","__runComplexObservers","__dynamicObservers","__runNotifyProps","__isReadyInvoked","_createMethodObserver","dynamicObservers","some","has","v","k","_","dispatchEvent","CustomEvent","detail","_get","path","object","_set","superClass","klass","getPrototypeOf","wasMixinPreviouslyApplied","mixedClass","PopoverOverlayMixin","position","_tagNamePrefix","requestContentUpdate","positionTarget","owner","style","getComputedStyle","setProperty","getPropertyValue","_updatePosition","opened","removeAttribute","targetRect","getBoundingClientRect","overlayRect","overlay","offset","width","left","setAttribute","right","parseFloat","height","top","PopoverOverlay","is","styles","render","withBackdrop","_shouldCloseOnOutsideClick","__hasTrigger","o","PopoverTargetMixin","for","target","connectedCallback","_addTargetListeners","disconnectedCallback","_removeTargetListeners","__forChanged","forId","__setTargetByIdDebouncer","debounce","__setTargetById","targetId","isConnected","getRootNode","getElementById","__targetChanged","oldTarget","_target","DEFAULT_DELAY","defaultFocusDelay","defaultHoverDelay","defaultHideDelay","PopoverOpenedStateController","host","isClosing","__closeTimeout","__focusDelay","popover","focusDelay","__hoverDelay","hoverDelay","__hideDelay","hideDelay","open","immediate","trigger","shouldDelayHover","shouldDelayFocus","__showPopover","__scheduleOpen","close","__scheduleClose","__abortClose","__setOpened","__abortOpen","clearTimeout","__openTimeout","setTimeout","delay","Popover","_position","__effectivePosition","__computeHorizontalAlign","__computeNoHorizontalOverlap","__computeNoVerticalOverlap","__computeVerticalAlign","__computePosition","defaultPosition","PopoverPositionMixin","accessibleName","accessibleNameRef","autofocus","contentHeight","contentWidth","overlayRole","renderer","modal","noCloseOnOutsideClick","noCloseOnEsc","__shouldRestoreFocus","__overlayId","setDefaultFocusDelay","setDefaultHideDelay","setDefaultHoverDelay","__onGlobalClick","bind","__onGlobalKeyDown","__onTargetClick","__onTargetFocusIn","__onTargetFocusOut","__onTargetMouseEnter","__onTargetMouseLeave","_openedStateController","effectivePosition","_theme","__onOverlayMouseDown","__onOverlayMouseEnter","__onOverlayMouseLeave","__onOverlayFocusIn","__onOverlayFocusOut","__onOpenedChanged","__onEscapePress","__onOutsideClick","__onOverlayOpened","__onOverlayClosed","_overlayElement","shadowRoot","querySelector","documentElement","addEventListener","removeEventListener","__openedChanged","oldOpened","__openedOrTargetChanged","__overlayRoleOrTargetChanged","__oldTarget","isDialog","__isManual","composedPath","el","stopPropagation","shiftKey","__onGlobalShiftTab","__onGlobalTab","overlayPart","preventDefault","focus","lastFocusable","__getLastFocusable","focusable","__getNextBodyFocusable","activeElement","nextFocusable","focusables","body","idx","findIndex","container","pop","__focusInside","__mouseDownInside","contains","relatedTarget","__handleFocusout","__hoverInside","pointerEvents","__handleMouseLeave","once","e","length","__updateDimension","dimension","removeProperty","__updateContentHeight","__updateContentWidth","TextFieldMixin","maxlength","minlength","pattern","constraints","_setType","clearElement","clearButton","addController","_setInputElement","_setFocusElement","stateTarget","ariaTarget","inputElement","_labelController","moduleId","TextField","template","_tooltipController","setPosition","setAriaTarget"],"sourceRoot":""}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/*! For license information please see descope-text-field-index-js.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4838,5166],{79275(t,e,r){r.d(e,{T:()=>p,w:()=>d});var o=r(79365),i=r(6424),n=r(9696),l=r(97810),a=r(73551);const p=(0,l.xE)("text-field"),s=["type","label-type","copy-to-clipboard"],d=(0,n.Zz)((0,o.RF)({mappings:i.A}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),o.tQ,t=>class extends t{static get observedAttributes(){return s.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},r={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,r),setTimeout(()=>{Object.assign(this.icon,e)},5e3)})}onLabelClick(){this.focus()}attributeChangedCallback(t,e,r){super.attributeChangeCallback?.(t,e,r),"type"===t&&this.baseElement._setType(r),e!==r&&("label-type"===t?"floating"===r?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===r))}})((0,o.tz)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-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(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,a.$J)("vaadin-text-field")}\n\t\t\t${(0,a.cy)(d.cssVarList)}\n\t\t\t${(0,a.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,a.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:p}))},21374(t,e,r){r.r(e),r.d(e,{TextFieldClass:()=>o.w,componentName:()=>o.T}),r(11284),r(37182),r(95260);var o=r(79275);customElements.define(o.T,o.w)},6424(t,e,r){r.d(e,{A:()=>m});const{host:o,label:i,placeholder:n,requiredIndicator:l,inputField:a,input:p,inputMask:s,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:y,externalInput:g,externalInputDisabled:b,externalPlaceholder:f,externalDisabledPlaceholder:x}={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)"}},m={fontSize:[{},o],fontFamily:[i,a,d,c],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,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:{...c,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...l,property:"color"},{...i,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputDirection:{...p,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},errorMessageIcon:{...c,property:"background-image"},errorMessageIconSize:{...c,property:"background-size"},errorMessageIconPadding:{...c,property:"padding-inline-start"},errorMessageIconRepeat:{...c,property:"background-repeat"},errorMessageIconPosition:{...c,property:"background-position"},errorMessageFontSize:{...c,property:"font-size"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...b,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"},{...u,property:"-webkit-text-fill-color"},{...x,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,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"}]}},18330(t,e,r){r.d(e,{f:()=>i});var o=r(44099);class i extends o.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:()=>i});var o=r(44218);const i=t=>class extends((0,o.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 o=r(13256),i=r(82901),n=r(72562),l=r(81488),a=r(86314),p=r(87550),s=r(18330),d=r(37436),c=r(37720);const u=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 c.q(this.inputElement,this._labelController))}};(0,p.SF)("vaadin-text-field",a.k,{moduleId:"vaadin-text-field-styles"});class h extends(u((0,p.cp)((0,n.q)(o.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return o.qy`
|
|
3
|
-
<style>
|
|
4
|
-
[part='input-field'] {
|
|
5
|
-
flex-grow: 0;
|
|
6
|
-
}
|
|
7
|
-
</style>
|
|
8
|
-
|
|
9
|
-
<div class="vaadin-field-container">
|
|
10
|
-
<div part="label">
|
|
11
|
-
<slot name="label"></slot>
|
|
12
|
-
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
<vaadin-input-container
|
|
16
|
-
part="input-field"
|
|
17
|
-
readonly="[[readonly]]"
|
|
18
|
-
disabled="[[disabled]]"
|
|
19
|
-
invalid="[[invalid]]"
|
|
20
|
-
theme$="[[_theme]]"
|
|
21
|
-
>
|
|
22
|
-
<slot name="prefix" slot="prefix"></slot>
|
|
23
|
-
<slot name="input"></slot>
|
|
24
|
-
<slot name="suffix" slot="suffix"></slot>
|
|
25
|
-
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
26
|
-
</vaadin-input-container>
|
|
27
|
-
|
|
28
|
-
<div part="helper-text">
|
|
29
|
-
<slot name="helper"></slot>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div part="error-message">
|
|
33
|
-
<slot name="error-message"></slot>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
<slot name="tooltip"></slot>
|
|
37
|
-
`}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,i.X)(h)},52733(t,e,r){r(27397);var o=r(47642);(0,r(87550).SF)("vaadin-text-field",o.k,{moduleId:"lumo-text-field-styles"}),r(27136)},11284(t,e,r){r(52733),r(27136)}}]);
|
|
38
|
-
//# sourceMappingURL=descope-text-field-index-js.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"descope-text-field-index-js.js","mappings":";6NAiBO,MAAMA,GAAgB,QAAiB,cAExCC,EAAgB,CAAC,OAAQ,aAAc,qBA+EhCC,GAAiB,SAC5B,QAAiB,CACfC,SAAU,MAEZ,MACA,QAAgB,CAAEC,WAAY,CAAC,QAAS,kBAAmBC,iBAAiB,IAC5E,KAnFmBC,GACnB,cAA6BA,EAC3B,6BAAWC,GACT,OAAON,EAAcO,OAAOF,EAAWC,oBAAsB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AO,IAAI5H,MAAM4H,cAAe,YAAa,YAAa,UAC5D,CAEA,sBAAWwB,GACT,MAAO,IAAIpJ,MAAMoJ,YAAa,YAAa,YAAa,UAC1D,CAEA,WAAAxC,GACE5G,QACAG,KAAK0B,SAAS,OAChB,CAGA,gBAAIwH,GACF,OAAOlJ,KAAKmJ,EAAEC,WAChB,CAGA,KAAAC,GACExJ,MAAMwJ,QAENrJ,KAAKsJ,cACH,IAAI,IAAgBtJ,KAAOyC,IACzBzC,KAAKuJ,iBAAiB9G,GACtBzC,KAAKwJ,iBAAiB/G,GACtBzC,KAAKyJ,YAAchH,EACnBzC,KAAK0J,WAAajH,KAGtBzC,KAAKsJ,cAAc,IAAI,IAAwBtJ,KAAK2J,aAAc3J,KAAK4J,kBACzE,IC5DJ,QAAe,oBAAqB,IAAkB,CAAEC,SAAU,6BAuE3D,MAAMC,UAAkBnB,GAAe,SAAc,OAAa,SACvE,aAAWoB,GACT,MAAO,mBACT,CAEA,mBAAWC,GACT,OAAO,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoCb,CAEA,qBAAW7C,GACT,MAAO,CAIL0B,UAAW,CACThC,KAAMiC,QAMRC,UAAW,CACTlC,KAAMiC,QAGZ,CAGA,KAAAO,GACExJ,MAAMwJ,QAENrJ,KAAKiK,mBAAqB,IAAI,IAAkBjK,MAChDA,KAAKiK,mBAAmBC,YAAY,OACpClK,KAAKiK,mBAAmBE,cAAcnK,KAAK2J,cAC3C3J,KAAKsJ,cAActJ,KAAKiK,mBAC1B,GAGF,OAAoBH,E,wCCrJpB,E,SAAA,IAAe,oBAAqB,IAAkB,CACpDD,SAAU,2B","sources":["webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../mixins';\nimport textFieldMappings from './textFieldMappings';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-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(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","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: { selector: '[required]::part(required-indicator)::after' },\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: { selector: () => '::slotted(input:disabled::placeholder)' },\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 { selector: () => ':host input:placeholder-shown', property: 'font-weight' },\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: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\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 { 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":["componentName","observedAttrs","TextFieldClass","mappings","proxyProps","useProxyTargets","superclass","observedAttributes","concat","icon","init","super","renderCopyToClipboard","shouldRender","this","remove","iconInitConfig","title","style","iconCopiedConfig","Object","assign","document","createElement","slot","baseElement","appendChild","addEventListener","navigator","clipboard","writeText","value","setTimeout","onLabelClick","focus","attributeChangedCallback","attrName","oldVal","newVal","attributeChangeCallback","_setType","removeEventListener","slots","wrappedEleName","cssVarList","inputOutlineWidth","inputOutlineOffset","excludeAttrsSync","customElements","define","host","label","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","selector","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","textAlign","inputTextAlign","inputPlaceholderColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","inputIconOffset","inputIconSize","inputIconColor","inputTextSecurity","InputController","constructor","callback","initializer","node","type","setAttribute","id","defaultId","useUniqueId","InputFieldMixin","properties","autocomplete","String","autocorrect","autocapitalize","reflectToAttribute","delegateAttrs","__data","__dataValue","_inputElementChanged","console","warn","localName","_setFocused","focused","hasFocus","validate","_onInput","event","invalid","_valueChanged","newValue","oldValue","undefined","TextFieldMixin","superClass","maxlength","Number","minlength","pattern","constraints","clearElement","$","clearButton","ready","addController","_setInputElement","_setFocusElement","stateTarget","ariaTarget","inputElement","_labelController","moduleId","TextField","is","template","_tooltipController","setPosition","setAriaTarget"],"sourceRoot":""}
|