@descope/web-components-ui 1.0.386 → 1.0.387
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +68 -47
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +68 -47
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/8980.js +5 -2
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
- package/dist/umd/descope-date-field-index-js.js +1 -1
- package/package.json +2 -2
- package/src/components/descope-date-field/DateFieldClass.js +66 -44
- package/src/components/descope-date-field/descope-calendar/CalendarClass.js +2 -2
- package/src/theme/components/dateField.js +0 -1
package/dist/umd/8980.js
CHANGED
@@ -17,10 +17,13 @@
|
|
17
17
|
[part='overlay'] {
|
18
18
|
position: relative;
|
19
19
|
overflow: visible;
|
20
|
+
max-height: 100%;
|
20
21
|
}
|
21
22
|
|
22
23
|
[part='content'] {
|
23
24
|
overflow: auto;
|
25
|
+
box-sizing: border-box;
|
26
|
+
max-height: 100%;
|
24
27
|
width: var(--_vaadin-popover-content-width);
|
25
28
|
height: var(--_vaadin-popover-content-height);
|
26
29
|
}
|
@@ -66,7 +69,7 @@
|
|
66
69
|
<div part="arrow"></div>
|
67
70
|
<div part="content" id="content"><slot></slot></div>
|
68
71
|
</div>
|
69
|
-
`}_shouldCloseOnOutsideClick(e){return(!this.owner.__hasTrigger("focus")||!(0,i.Qj)(this))&&super._shouldCloseOnOutsideClick(e)}}(0,r.X)(T);var O=o(36752);const E=e=>e??O.s6;var w=o(31846),$=o(55231),k=o(78065),
|
72
|
+
`}_shouldCloseOnOutsideClick(e){return(!this.owner.__hasTrigger("focus")||!(0,i.Qj)(this))&&super._shouldCloseOnOutsideClick(e)}}(0,r.X)(T);var O=o(36752);const E=e=>e??O.s6;var w=o(31846),$=o(55231),k=o(78065),x=o(18626),D=o(3843),F=o(81510),I=o(27111);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`
|
70
73
|
:host {
|
71
74
|
display: none !important;
|
72
75
|
}
|
@@ -102,7 +105,7 @@
|
|
102
105
|
@vaadin-overlay-open="${this.__onOverlayOpened}"
|
103
106
|
@vaadin-overlay-closed="${this.__onOverlayClosed}"
|
104
107
|
></vaadin-popover-overlay>
|
105
|
-
`}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,
|
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)},34068:(e,t,o)=>{o.d(t,{A:()=>c}),o(9077);var s=o(33791),i=o(38735),r=o(31846),n=o(58074),a=o(89385),l=o(6052),h=o(15408),_=o(53430),d=o(3550);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`
|
106
109
|
<style>
|
107
110
|
[part='input-field'] {
|
108
111
|
flex-grow: 0;
|