@descope/web-components-ui 1.0.319 → 1.0.321

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/dist/cjs/index.cjs.js +1390 -1010
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +1433 -1051
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1438.js +1 -1
  6. package/dist/umd/2362.js +1 -1
  7. package/dist/umd/3830.js +1 -1
  8. package/dist/umd/4028.js +1 -1
  9. package/dist/umd/5135.js +1 -1
  10. package/dist/umd/5806.js +1 -1
  11. package/dist/umd/602.js +170 -0
  12. package/dist/umd/{1621.js.LICENSE.txt → 602.js.LICENSE.txt} +0 -6
  13. package/dist/umd/6770.js +1 -1
  14. package/dist/umd/7056.js +2 -2
  15. package/dist/umd/7284.js +303 -0
  16. package/dist/umd/7284.js.LICENSE.txt +11 -0
  17. package/dist/umd/8137.js +452 -0
  18. package/dist/umd/8137.js.LICENSE.txt +17 -0
  19. package/dist/umd/8191.js +4 -4
  20. package/dist/umd/9092.js +2 -2
  21. package/dist/umd/DescopeDev.js +1 -1
  22. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  23. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  24. package/dist/umd/descope-email-field-index-js.js +1 -1
  25. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
  26. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  27. package/dist/umd/descope-new-password-index-js.js +1 -1
  28. package/dist/umd/descope-passcode-index-js.js +1 -1
  29. package/dist/umd/descope-password-index-js.js +1 -1
  30. package/dist/umd/descope-radio-group-index-js.js +1 -0
  31. package/dist/umd/descope-text-field-index-js.js +1 -1
  32. package/dist/umd/index.js +1 -1
  33. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
  34. package/package.json +2 -1
  35. package/src/components/descope-password/PasswordClass.js +56 -0
  36. package/src/components/descope-radio-group/RadioButtonClass.js +74 -0
  37. package/src/components/descope-radio-group/RadioGroupClass.js +192 -0
  38. package/src/components/descope-radio-group/index.js +8 -0
  39. package/src/index.cjs.js +2 -0
  40. package/src/index.js +1 -0
  41. package/src/theme/components/index.js +4 -0
  42. package/src/theme/components/radioGroup/radioButton.js +42 -0
  43. package/src/theme/components/radioGroup/radioGroup.js +37 -0
  44. package/dist/umd/1621.js +0 -620
package/dist/umd/1438.js CHANGED
@@ -264,7 +264,7 @@
264
264
  no-vertical-overlap
265
265
  restore-focus-node="[[inputElement]]"
266
266
  ></vaadin-multi-select-combo-box-overlay>
267
- `}static get properties(){return{filteredItems:{type:Array,notify:!0},loading:{type:Boolean,notify:!0},size:{type:Number,notify:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1},lastFilter:{type:String,notify:!0},topGroup:{type:Array,observer:"_topGroupChanged"},_target:{type:Object}}}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}open(){this.disabled||this.readonly&&0===this.selectedItems.length||(this.opened=!0)}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button")}_setDropdownItems(e){if(this.readonly)this._dropdownItems=this.selectedItems;else if(!this.filter&&this.selectedItemsOnTop)if(e&&e.length&&this.topGroup&&this.topGroup.length){const t=e.filter((e=>-1===this._comboBox._findIndex(e,this.topGroup,this.itemIdPath)));this._dropdownItems=this.topGroup.concat(t)}else this._dropdownItems=e;else this._dropdownItems=e}_topGroupChanged(e){e&&this._setDropdownItems(this.filteredItems)}_initScroller(){const e=this.getRootNode().host;this._comboBox=e,super._initScroller(e)}_onEnter(e){if(this.opened){if(e.preventDefault(),e.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const e=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(e)}}else super._onEnter(e)}_onEscape(e){if(this.readonly)return e.stopPropagation(),void(this.opened&&this.close());super._onEscape(e)}_commitValue(){this.lastFilter=this.filter,super._commitValue()}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_setFocused(e){e||(this._ignoreCommitValue=!0),super._setFocused(e),e||!this.readonly||this._closeOnBlurIsPrevented||this.close()}_detectAndDispatchChange(){if(this._ignoreCommitValue)return this._ignoreCommitValue=!1,this.selectedItem=null,void(this._inputElementValue="");super._detectAndDispatchChange()}_overlaySelectedItemChanged(e){e.stopPropagation(),this.readonly||e.detail.item instanceof B.h||this.opened&&this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:e.detail.item}}))}_shouldLoadPage(e){return!this.readonly&&super._shouldLoadPage(e)}clearCache(){this.readonly||super.clearCache()}}(0,b.M)(V);var F=o(10063),T=o(12521),O=o(29680),L=o(9229),R=o(40262),D=o(34463),q=o(73406),G=o(73208),W=o(46729),H=o(62743);const N=s.iv`
267
+ `}static get properties(){return{filteredItems:{type:Array,notify:!0},loading:{type:Boolean,notify:!0},size:{type:Number,notify:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1},lastFilter:{type:String,notify:!0},topGroup:{type:Array,observer:"_topGroupChanged"},_target:{type:Object}}}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}open(){this.disabled||this.readonly&&0===this.selectedItems.length||(this.opened=!0)}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button")}_setDropdownItems(e){if(this.readonly)this._dropdownItems=this.selectedItems;else if(!this.filter&&this.selectedItemsOnTop)if(e&&e.length&&this.topGroup&&this.topGroup.length){const t=e.filter((e=>-1===this._comboBox._findIndex(e,this.topGroup,this.itemIdPath)));this._dropdownItems=this.topGroup.concat(t)}else this._dropdownItems=e;else this._dropdownItems=e}_topGroupChanged(e){e&&this._setDropdownItems(this.filteredItems)}_initScroller(){const e=this.getRootNode().host;this._comboBox=e,super._initScroller(e)}_onEnter(e){if(this.opened){if(e.preventDefault(),e.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const e=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(e)}}else super._onEnter(e)}_onEscape(e){if(this.readonly)return e.stopPropagation(),void(this.opened&&this.close());super._onEscape(e)}_commitValue(){this.lastFilter=this.filter,super._commitValue()}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_setFocused(e){e||(this._ignoreCommitValue=!0),super._setFocused(e),e||!this.readonly||this._closeOnBlurIsPrevented||this.close()}_detectAndDispatchChange(){if(this._ignoreCommitValue)return this._ignoreCommitValue=!1,this.selectedItem=null,void(this._inputElementValue="");super._detectAndDispatchChange()}_overlaySelectedItemChanged(e){e.stopPropagation(),this.readonly||e.detail.item instanceof B.h||this.opened&&this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:e.detail.item}}))}_shouldLoadPage(e){return!this.readonly&&super._shouldLoadPage(e)}clearCache(){this.readonly||super.clearCache()}}(0,b.M)(V);var F=o(10063),T=o(12521),O=o(29680),L=o(78591),R=o(40262),D=o(34463),q=o(73406),G=o(73208),W=o(46729),H=o(62743);const N=s.iv`
268
268
  :host {
269
269
  --input-min-width: var(--vaadin-multi-select-combo-box-input-min-width, 4em);
270
270
  --_chip-min-width: var(--vaadin-multi-select-combo-box-chip-min-width, 50px);
package/dist/umd/2362.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see 2362.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2362],{21360:(t,e,o)=>{o.d(e,{W:()=>n});var s=o(91014),i=o(3550);const n=(0,s.o)((t=>class extends t{get _keyboardActive(){return(0,i.LQ)()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}}))},3550:(t,e,o)=>{o.d(e,{GF:()=>r,GO:()=>u,Gf:()=>i,LQ:()=>n,Qw:()=>a});let s=!1;function i(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function n(){return s}function d(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const o=window.getComputedStyle(t);return"hidden"===o.visibility||"none"===o.display}function l(t,e){const o=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===o||0===s?s>o:o>s}function h(t){const e=t.length;if(e<2)return t;const o=Math.ceil(e/2);return function(t,e){const o=[];for(;t.length>0&&e.length>0;)l(t[0],e[0])?o.push(e.shift()):o.push(t.shift());return o.concat(t,e)}(h(t.slice(0,o)),h(t.slice(o)))}function r(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||d(t)}function a(t){return t.getRootNode().activeElement===t}function c(t,e){if(t.nodeType!==Node.ELEMENT_NODE||d(t))return!1;const o=t,s=function(t){if(!function(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(o);let i=s>0;s>=0&&e.push(o);let n=[];return n="slot"===o.localName?o.assignedNodes({flatten:!0}):(o.shadowRoot||o).children,[...n].forEach((t=>{i=c(t,e)||i})),i}function u(t){const e=[];return c(t,e)?h(e):e}window.addEventListener("keydown",(()=>{s=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{s=!1}),{capture:!0})},16155:(t,e,o)=>{o.d(e,{k:()=>s});const s=(0,o(91014).o)((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}}))},63726:(t,e,o)=>{function s(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}function i(t){const e=[];let o;return"slot"===t.localName?o=t.assignedElements():(e.push(t),o=[...t.children]),o.forEach((t=>e.push(...i(t)))),e}function n(t,e){return e?e.closest(t)||n(t,e.getRootNode().host):null}function d(t){return t?new Set(t.split(" ")):new Set}function l(t){return t?[...t].join(" "):""}function h(t,e,o){const s=d(t.getAttribute(e));s.add(o),t.setAttribute(e,l(s))}function r(t,e,o){const s=d(t.getAttribute(e));s.delete(o),0!==s.size?t.setAttribute(e,l(s)):t.removeAttribute(e)}function a(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}o.d(e,{$2:()=>h,AD:()=>s,Q4:()=>n,dV:()=>l,eC:()=>a,hK:()=>d,xX:()=>i,x_:()=>r})},12521:(t,e,o)=>{o.d(e,{S:()=>r});var s=o(89387),i=o(87913),n=o(36139),d=o(51914);let l;(0,s.xj)(!1),window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){};const h=new Set,r=t=>class extends((0,d.U)(t)){static finalize(){super.finalize();const{is:t}=this;t&&!h.has(t)&&(window.Vaadin.registrations.push(this),h.add(t),window.Vaadin.developmentModeCallback&&(l=n.dx.debounce(l,i.t$,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),(0,n.Ex)(l)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}},9229:(t,e,o)=>{o.d(e,{n:()=>d});var s=o(63726);class i{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const o=[],s=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,i)=>{const n=t.indexOf(e);-1===n?o.push(e):n!==i&&s.push(e)})),(e.length||o.length||s.length)&&this.callback({addedNodes:e,movedNodes:s,removedNodes:o}),this._storedNodes=t}}var n=o(73971);class d extends EventTarget{static generateId(t,e){return`${e||"default"}-${t.localName}-${(0,n.l)()}`}constructor(t,e,o,s={}){super();const{initializer:i,multiple:n,observe:d,useUniqueId:l}=s;this.host=t,this.slotName=e,this.tagName=o,this.observe="boolean"!=typeof d||d,this.multiple="boolean"==typeof n&&n,this.slotInitializer=i,n&&(this.nodes=[]),l&&(this.defaultId=this.constructor.generateId(t,e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:o}=this;let s=this.defaultNode;return!s&&o&&(s=document.createElement(o),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.node=s,this.defaultNode=s)),s&&t.appendChild(s),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=""===t?"slot:not([name])":`slot[name=${t}]`,o=this.host.shadowRoot.querySelector(e);this.__slotObserver=new i(o,(({addedNodes:t,removedNodes:e})=>{const o=this.multiple?this.nodes:[this.node],i=t.filter((t=>!(0,s.eC)(t)&&!o.includes(t)));e.length&&(this.nodes=o.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),i&&i.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...o,...i].filter((t=>t!==this.defaultNode)),i.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=i[0],this.initAddedNode(this.node)))}))}}},34463:(t,e,o)=>{o.d(e,{f:()=>i});var s=o(9229);class i extends s.n{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}},73971:(t,e,o)=>{o.d(e,{l:()=>i});let s=0;function i(){return s++}},79098:(t,e,o)=>{o(24407);var s=o(46570),i=o(32463);const n=s.iv`
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2362],{21360:(t,e,o)=>{o.d(e,{W:()=>n});var s=o(91014),i=o(3550);const n=(0,s.o)((t=>class extends t{get _keyboardActive(){return(0,i.LQ)()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}}))},3550:(t,e,o)=>{o.d(e,{GF:()=>r,GO:()=>u,Gf:()=>i,LQ:()=>n,Qw:()=>a});let s=!1;function i(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function n(){return s}function d(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const o=window.getComputedStyle(t);return"hidden"===o.visibility||"none"===o.display}function l(t,e){const o=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===o||0===s?s>o:o>s}function h(t){const e=t.length;if(e<2)return t;const o=Math.ceil(e/2);return function(t,e){const o=[];for(;t.length>0&&e.length>0;)l(t[0],e[0])?o.push(e.shift()):o.push(t.shift());return o.concat(t,e)}(h(t.slice(0,o)),h(t.slice(o)))}function r(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||d(t)}function a(t){return t.getRootNode().activeElement===t}function c(t,e){if(t.nodeType!==Node.ELEMENT_NODE||d(t))return!1;const o=t,s=function(t){if(!function(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(o);let i=s>0;s>=0&&e.push(o);let n=[];return n="slot"===o.localName?o.assignedNodes({flatten:!0}):(o.shadowRoot||o).children,[...n].forEach((t=>{i=c(t,e)||i})),i}function u(t){const e=[];return c(t,e)?h(e):e}window.addEventListener("keydown",(()=>{s=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{s=!1}),{capture:!0})},16155:(t,e,o)=>{o.d(e,{k:()=>s});const s=(0,o(91014).o)((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}}))},63726:(t,e,o)=>{function s(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}function i(t){const e=[];let o;return"slot"===t.localName?o=t.assignedElements():(e.push(t),o=[...t.children]),o.forEach((t=>e.push(...i(t)))),e}function n(t,e){return e?e.closest(t)||n(t,e.getRootNode().host):null}function d(t){return t?new Set(t.split(" ")):new Set}function l(t){return t?[...t].join(" "):""}function h(t,e,o){const s=d(t.getAttribute(e));s.add(o),t.setAttribute(e,l(s))}function r(t,e,o){const s=d(t.getAttribute(e));s.delete(o),0!==s.size?t.setAttribute(e,l(s)):t.removeAttribute(e)}function a(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}o.d(e,{$2:()=>h,AD:()=>s,Q4:()=>n,dV:()=>l,eC:()=>a,hK:()=>d,xX:()=>i,x_:()=>r})},12521:(t,e,o)=>{o.d(e,{S:()=>r});var s=o(89387),i=o(87913),n=o(36139),d=o(51914);let l;(0,s.xj)(!1),window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){};const h=new Set,r=t=>class extends((0,d.U)(t)){static finalize(){super.finalize();const{is:t}=this;t&&!h.has(t)&&(window.Vaadin.registrations.push(this),h.add(t),window.Vaadin.developmentModeCallback&&(l=n.dx.debounce(l,i.t$,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),(0,n.Ex)(l)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}},78591:(t,e,o)=>{o.d(e,{n:()=>d});var s=o(63726),i=o(44932),n=o(73971);class d extends EventTarget{static generateId(t,e){return`${e||"default"}-${t.localName}-${(0,n.l)()}`}constructor(t,e,o,s={}){super();const{initializer:i,multiple:n,observe:d,useUniqueId:l}=s;this.host=t,this.slotName=e,this.tagName=o,this.observe="boolean"!=typeof d||d,this.multiple="boolean"==typeof n&&n,this.slotInitializer=i,n&&(this.nodes=[]),l&&(this.defaultId=this.constructor.generateId(t,e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:o}=this;let s=this.defaultNode;return!s&&o&&(s=document.createElement(o),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.node=s,this.defaultNode=s)),s&&t.appendChild(s),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=""===t?"slot:not([name])":`slot[name=${t}]`,o=this.host.shadowRoot.querySelector(e);this.__slotObserver=new i.K(o,(({addedNodes:t,removedNodes:e})=>{const o=this.multiple?this.nodes:[this.node],i=t.filter((t=>!(0,s.eC)(t)&&!o.includes(t)));e.length&&(this.nodes=o.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),i&&i.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...o,...i].filter((t=>t!==this.defaultNode)),i.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=i[0],this.initAddedNode(this.node)))}))}}},44932:(t,e,o)=>{o.d(e,{K:()=>s});class s{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const o=[],s=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,i)=>{const n=t.indexOf(e);-1===n?o.push(e):n!==i&&s.push(e)})),(e.length||o.length||s.length)&&this.callback({addedNodes:e,movedNodes:s,removedNodes:o}),this._storedNodes=t}}},34463:(t,e,o)=>{o.d(e,{f:()=>i});var s=o(78591);class i extends s.n{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}},73971:(t,e,o)=>{o.d(e,{l:()=>i});let s=0;function i(){return s++}},79098:(t,e,o)=>{o(24407);var s=o(46570),i=o(32463);const n=s.iv`
3
3
  :host {
4
4
  --lumo-size-xs: 1.625rem;
5
5
  --lumo-size-s: 1.875rem;
package/dist/umd/3830.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 3830.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3830],{14905:(t,e,i)=>{function s(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}i.d(e,{U:()=>s})},40262:(t,e,i)=>{function s(t){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}i.d(e,{k:()=>s})},63003:(t,e,i)=>{i.d(e,{d:()=>c});var s=i(87913),l=i(61037),h=i(36139);const r=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),o=r&&r[1]>=8,n={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){const t=this._virtualCount;return Math.max(0,t-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,s)=>{e<this._scrollBottom&&(t=s),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),s.YA)}},_getReusables(t){let e,i,s;const l=[],h=this._hiddenContentSize*this._ratio,r=this._virtualStart,o=this._virtualEnd,n=this._physicalCount;let a=this._physicalTop+this._scrollOffset;const _=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,d=this._scrollBottom;for(t?(e=this._physicalStart,i=c-a):(e=this._physicalEnd,i=_-d);s=this._getPhysicalSizeIncrement(e),i-=s,!(l.length>=n||i<=h);)if(t){if(o+l.length+1>=this._virtualCount)break;if(a+s>=c-this._scrollOffset)break;l.push(e),a+=s,e=(e+1)%n}else{if(r-l.length<=0)break;if(a+this._physicalSize-s<=d)break;l.push(e),a-=s,e=0===e?n-1:e-1}return{indexes:l,physicalTop:a-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),s.t$):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),s.YA))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,s.rs))},_iterateItems(t,e){let i,s,l,h;if(2===arguments.length&&e){for(h=0;h<e.length;h++)if(i=e[h],s=this._computeVidx(i),null!=(l=t.call(this,i,s)))return l}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(l=t.call(this,i,s)))return l;for(i=0;i<this._physicalStart;i++,s++)if(null!=(l=t.call(this,i,s)))return l}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!o&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1)return;if((0,h.yl)(),0===this._physicalCount)return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,s=0;const l=this._hiddenContentSize;for(;i<t&&s<=l;)s+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),s.rs)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=h.dx.debounce(this._debouncers[t],i,e.bind(this)),(0,h.Ex)(this._debouncers[t])}},a=1e3;class _{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:l,reorderElements:h}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=l||s,this.reorderElements=h,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}__hasPlaceholders(){return this.__getVisibleElements().some((t=>t.__virtualizerPlaceholder))}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this.size-this._virtualCount):i<e?t<a?(i=t,this._vidxOffset=0):(i=a,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}flush(){const t=this._physicalCount;0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),(0,h.yl)(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush(),this._physicalCount!==t&&this.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((s=>{s.__virtualIndex>=t&&s.__virtualIndex<=e&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))})),this.__afterElementsUpdated(i)}_updateMetrics(t){(0,h.yl)();let e=0,i=0;const s=this._physicalAverageCount,l=this._physicalAverage;this._iterateItems(((t,s)=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((l*s+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.__virtualizerPlaceholder=!1),this.__preventElementUpdates||t.__lastUpdatedIndex===e&&!i||(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=h.dx.debounce(this.__placeholderClearDebouncer,s.rs,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}})),void 0===this.__pendingScrollToIndex||this.__hasPlaceholders()||this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;let e,i;if(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0,t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),(0,h.yl)(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const s=this.__getIndexScrollOffset(e);void 0!==i&&void 0!==s&&(this._scrollTop+=i-s)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),(0,h.yl)()}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=Boolean("rtl"===t.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const s=this._physicalItems[t];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),e.push(s))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,s){s.style.transform=`translateY(${e})`}toggleScrollListener(){}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=h.dx.debounce(this.__fixInvalidItemPositioningDebouncer,s.Wc.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=h.dx.debounce(this.__scrollReorderDebouncer,s.Wc.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=0===this.adjustedFirstVisibleIndex,s=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!s){const t=e,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(t?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=h.dx.debounce(this.__debouncerWheelAnimationFrame,s.rs,(()=>{this._wheelAnimationFrame=!1}));const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=h.dx.debounce(this._debouncerIgnoreNewWheel,s.Wc.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,e)))}else super._increasePoolIfNeeded(t)}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=e.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))||e[0];if(!i)return;const s=i.__virtualIndex-t,h=e.indexOf(i)-s;if(h>0)for(let t=0;t<h;t++)this.elementsContainer.appendChild(e[t]);else if(h<0)for(let t=e.length+h;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(l.G6){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const t=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.offsetHeight),e=t*this.size;this._vidxOffset=Math.round(e-t*this._virtualCount)}else{const t=this._vidxOffset,e=a,i=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<e&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset)));const s=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=s,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-e&&this._vidxOffset<s&&(this._vidxOffset+=Math.min(s-this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(_.prototype,n);class c{constructor(t){this.__adapter=new _(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}},73208:(t,e,i)=>{i.d(e,{b:()=>l});var s=i(9229);class l extends s.n{constructor(t,e){super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}}}]);
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3830],{14905:(t,e,i)=>{function s(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}i.d(e,{U:()=>s})},40262:(t,e,i)=>{function s(t){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}i.d(e,{k:()=>s})},63003:(t,e,i)=>{i.d(e,{d:()=>c});var s=i(87913),l=i(61037),h=i(36139);const r=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),o=r&&r[1]>=8,n={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){const t=this._virtualCount;return Math.max(0,t-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,s)=>{e<this._scrollBottom&&(t=s),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),s.YA)}},_getReusables(t){let e,i,s;const l=[],h=this._hiddenContentSize*this._ratio,r=this._virtualStart,o=this._virtualEnd,n=this._physicalCount;let a=this._physicalTop+this._scrollOffset;const _=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,d=this._scrollBottom;for(t?(e=this._physicalStart,i=c-a):(e=this._physicalEnd,i=_-d);s=this._getPhysicalSizeIncrement(e),i-=s,!(l.length>=n||i<=h);)if(t){if(o+l.length+1>=this._virtualCount)break;if(a+s>=c-this._scrollOffset)break;l.push(e),a+=s,e=(e+1)%n}else{if(r-l.length<=0)break;if(a+this._physicalSize-s<=d)break;l.push(e),a-=s,e=0===e?n-1:e-1}return{indexes:l,physicalTop:a-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),s.t$):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),s.YA))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,s.rs))},_iterateItems(t,e){let i,s,l,h;if(2===arguments.length&&e){for(h=0;h<e.length;h++)if(i=e[h],s=this._computeVidx(i),null!=(l=t.call(this,i,s)))return l}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(l=t.call(this,i,s)))return l;for(i=0;i<this._physicalStart;i++,s++)if(null!=(l=t.call(this,i,s)))return l}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!o&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1)return;if((0,h.yl)(),0===this._physicalCount)return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,s=0;const l=this._hiddenContentSize;for(;i<t&&s<=l;)s+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),s.rs)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=h.dx.debounce(this._debouncers[t],i,e.bind(this)),(0,h.Ex)(this._debouncers[t])}},a=1e3;class _{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:l,reorderElements:h}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=l||s,this.reorderElements=h,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}__hasPlaceholders(){return this.__getVisibleElements().some((t=>t.__virtualizerPlaceholder))}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this.size-this._virtualCount):i<e?t<a?(i=t,this._vidxOffset=0):(i=a,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}flush(){const t=this._physicalCount;0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),(0,h.yl)(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush(),this._physicalCount!==t&&this.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((s=>{s.__virtualIndex>=t&&s.__virtualIndex<=e&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))})),this.__afterElementsUpdated(i)}_updateMetrics(t){(0,h.yl)();let e=0,i=0;const s=this._physicalAverageCount,l=this._physicalAverage;this._iterateItems(((t,s)=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((l*s+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.__virtualizerPlaceholder=!1),this.__preventElementUpdates||t.__lastUpdatedIndex===e&&!i||(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=h.dx.debounce(this.__placeholderClearDebouncer,s.rs,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}})),void 0===this.__pendingScrollToIndex||this.__hasPlaceholders()||this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;let e,i;if(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0,t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),(0,h.yl)(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const s=this.__getIndexScrollOffset(e);void 0!==i&&void 0!==s&&(this._scrollTop+=i-s)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),(0,h.yl)()}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=Boolean("rtl"===t.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const s=this._physicalItems[t];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),e.push(s))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,s){s.style.transform=`translateY(${e})`}toggleScrollListener(){}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=h.dx.debounce(this.__fixInvalidItemPositioningDebouncer,s.Wc.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=h.dx.debounce(this.__scrollReorderDebouncer,s.Wc.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=0===this.adjustedFirstVisibleIndex,s=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!s){const t=e,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(t?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=h.dx.debounce(this.__debouncerWheelAnimationFrame,s.rs,(()=>{this._wheelAnimationFrame=!1}));const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=h.dx.debounce(this._debouncerIgnoreNewWheel,s.Wc.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,e)))}else super._increasePoolIfNeeded(t)}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=e.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))||e[0];if(!i)return;const s=i.__virtualIndex-t,h=e.indexOf(i)-s;if(h>0)for(let t=0;t<h;t++)this.elementsContainer.appendChild(e[t]);else if(h<0)for(let t=e.length+h;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(l.G6){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const t=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.offsetHeight),e=t*this.size;this._vidxOffset=Math.round(e-t*this._virtualCount)}else{const t=this._vidxOffset,e=a,i=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<e&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset)));const s=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=s,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-e&&this._vidxOffset<s&&(this._vidxOffset+=Math.min(s-this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(_.prototype,n);class c{constructor(t){this.__adapter=new _(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}},73208:(t,e,i)=>{i.d(e,{b:()=>l});var s=i(78591);class l extends s.n{constructor(t,e){super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}}}]);
package/dist/umd/4028.js CHANGED
@@ -56,7 +56,7 @@
56
56
  <div part="overlay" id="overlay">
57
57
  <div part="content" id="content"><slot></slot></div>
58
58
  </div>
59
- `}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this}}(0,r.M)(p);var v=o(16155),g=o(12521),m=o(61462),A=o(3550),b=o(87913),y=o(36139),f=o(63726),C=o(39320),w=o(9229),x=o(73971);const T=500;let E=T,O=T,B=T;const D=new Set;let L=!1,I=null,M=null;class S{constructor(t){this.host=t}get openedProp(){return this.host.manual?"opened":"_autoOpened"}get focusDelay(){const t=this.host;return null!=t.focusDelay&&t.focusDelay>0?t.focusDelay:E}get hoverDelay(){const t=this.host;return null!=t.hoverDelay&&t.hoverDelay>0?t.hoverDelay:O}get hideDelay(){const t=this.host;return null!=t.hideDelay&&t.hideDelay>0?t.hideDelay:B}get isClosing(){return D.has(this.host)}open(t={immediate:!1}){const{immediate:e,hover:o,focus:i}=t,s=o&&this.hoverDelay>0,n=i&&this.focusDelay>0;e||!s&&!n||this.__closeTimeout?this.__showTooltip():this.__warmupTooltip(n)}close(t){!t&&this.hideDelay>0?this.__scheduleClose():(this.__abortClose(),this._setOpened(!1)),this.__abortWarmUp(),L&&(this.__abortCooldown(),this.__scheduleCooldown())}_isOpened(){return this.host[this.openedProp]}_setOpened(t){this.host[this.openedProp]=t}__flushClosingTooltips(){D.forEach((t=>{t._stateController.close(!0),D.delete(t)}))}__showTooltip(){this.__abortClose(),this.__flushClosingTooltips(),this._setOpened(!0),L=!0,this.__abortWarmUp(),this.__abortCooldown()}__warmupTooltip(t){this._isOpened()||(L?this.__showTooltip():this.__scheduleWarmUp(t))}__abortClose(){this.__closeTimeout&&(clearTimeout(this.__closeTimeout),this.__closeTimeout=null)}__abortCooldown(){M&&(clearTimeout(M),M=null)}__abortWarmUp(){I&&(clearTimeout(I),I=null)}__scheduleClose(){this._isOpened()&&(D.add(this.host),this.__closeTimeout=setTimeout((()=>{D.delete(this.host),this.__closeTimeout=null,this._setOpened(!1)}),this.hideDelay))}__scheduleCooldown(){M=setTimeout((()=>{M=null,L=!1}),this.hideDelay)}__scheduleWarmUp(t){const e=t?this.focusDelay:this.hoverDelay;I=setTimeout((()=>{I=null,L=!0,this.__showTooltip()}),e)}}const P=t=>class extends((0,C.u)(t)){static get properties(){return{ariaTarget:{type:Object},context:{type:Object,value:()=>({})},focusDelay:{type:Number},for:{type:String,observer:"__forChanged"},generator:{type:Object},hideDelay:{type:Number},hoverDelay:{type:Number},manual:{type:Boolean,value:!1,sync:!0},opened:{type:Boolean,value:!1,sync:!0},position:{type:String},shouldShow:{type:Object,value:()=>(t,e)=>!0},target:{type:Object,observer:"__targetChanged"},text:{type:String,observer:"__textChanged"},_autoOpened:{type:Boolean,observer:"__autoOpenedChanged",sync:!0},_effectiveAriaTarget:{type:Object,computed:"__computeAriaTarget(ariaTarget, target)",observer:"__effectiveAriaTargetChanged"},__effectivePosition:{type:String,computed:"__computePosition(position, _position)"},__isTargetHidden:{type:Boolean,value:!1},_isConnected:{type:Boolean,sync:!0},_position:{type:String,value:"bottom"},_srLabel:{type:Object},_overlayContent:{type:String}}}static get observers(){return["__generatorChanged(_overlayElement, generator, context)","__updateSrLabelText(_srLabel, _overlayContent)"]}static setDefaultFocusDelay(t){E=null!=t&&t>=0?t:T}static setDefaultHideDelay(t){B=null!=t&&t>=0?t:T}static setDefaultHoverDelay(t){O=null!=t&&t>=0?t:T}constructor(){super(),this._uniqueId=`vaadin-tooltip-${(0,x.l)()}`,this._renderer=this.__tooltipRenderer.bind(this),this.__onFocusin=this.__onFocusin.bind(this),this.__onFocusout=this.__onFocusout.bind(this),this.__onMouseDown=this.__onMouseDown.bind(this),this.__onMouseEnter=this.__onMouseEnter.bind(this),this.__onMouseLeave=this.__onMouseLeave.bind(this),this.__onKeyDown=this.__onKeyDown.bind(this),this.__onOverlayOpen=this.__onOverlayOpen.bind(this),this.__targetVisibilityObserver=new IntersectionObserver((t=>{t.forEach((t=>this.__onTargetVisibilityChange(t.isIntersecting)))}),{threshold:0}),this._stateController=new S(this)}connectedCallback(){super.connectedCallback(),this._isConnected=!0,document.body.addEventListener("vaadin-overlay-open",this.__onOverlayOpen)}disconnectedCallback(){super.disconnectedCallback(),this._autoOpened&&this._stateController.close(!0),this._isConnected=!1,document.body.removeEventListener("vaadin-overlay-open",this.__onOverlayOpen)}ready(){super.ready(),this._srLabelController=new w.n(this,"sr-label","div",{initializer:t=>{t.id=this._uniqueId,t.setAttribute("role","tooltip"),this._srLabel=t}}),this.addController(this._srLabelController)}__computeHorizontalAlign(t){return["top-end","bottom-end","start-top","start","start-bottom"].includes(t)?"end":"start"}__computeNoHorizontalOverlap(t){return["start-top","start","start-bottom","end-top","end","end-bottom"].includes(t)}__computeNoVerticalOverlap(t){return["top-start","top-end","top","bottom-start","bottom","bottom-end"].includes(t)}__computeVerticalAlign(t){return["top-start","top-end","top","start-bottom","end-bottom"].includes(t)?"bottom":"top"}__computeOpened(t,e,o,i){return i&&(t?e:o)}__computePosition(t,e){return t||e}__autoOpenedChanged(t,e){t?document.addEventListener("keydown",this.__onKeyDown,!0):e&&document.removeEventListener("keydown",this.__onKeyDown,!0)}__forChanged(t){t&&(this.__setTargetByIdDebouncer=y.dx.debounce(this.__setTargetByIdDebouncer,b.YA,(()=>this.__setTargetById(t))))}__setTargetById(t){if(!this.isConnected)return;const e=this.getRootNode().getElementById(t);e?this.target=e:console.warn(`No element with id="${t}" found to show tooltip.`)}__targetChanged(t,e){e&&(e.removeEventListener("mouseenter",this.__onMouseEnter),e.removeEventListener("mouseleave",this.__onMouseLeave),e.removeEventListener("focusin",this.__onFocusin),e.removeEventListener("focusout",this.__onFocusout),e.removeEventListener("mousedown",this.__onMouseDown),this.__targetVisibilityObserver.unobserve(e)),t&&(t.addEventListener("mouseenter",this.__onMouseEnter),t.addEventListener("mouseleave",this.__onMouseLeave),t.addEventListener("focusin",this.__onFocusin),t.addEventListener("focusout",this.__onFocusout),t.addEventListener("mousedown",this.__onMouseDown),requestAnimationFrame((()=>{this.__targetVisibilityObserver.observe(t)})))}__onFocusin(t){this.manual||(0,A.LQ)()&&(this.target.contains(t.relatedTarget)||this.__isShouldShow()&&(this.__focusInside=!0,this.__isTargetHidden||this.__hoverInside&&this._autoOpened||this._stateController.open({focus:!0})))}__onFocusout(t){this.manual||this.target.contains(t.relatedTarget)||(this.__focusInside=!1,this.__hoverInside||this._stateController.close(!0))}__onKeyDown(t){"Escape"===t.key&&(t.stopPropagation(),this._stateController.close(!0))}__onMouseDown(){this._stateController.close(!0)}__onMouseEnter(){this.manual||this.__isShouldShow()&&(this.__hoverInside||(this.__hoverInside=!0,this.__isTargetHidden||this.__focusInside&&this._autoOpened||this._stateController.open({hover:!0})))}__onMouseLeave(t){t.relatedTarget!==this._overlayElement&&this.__handleMouseLeave()}__onOverlayMouseEnter(){this._stateController.isClosing&&this._stateController.open({immediate:!0})}__onOverlayMouseLeave(t){t.relatedTarget!==this.target&&this.__handleMouseLeave()}__handleMouseLeave(){this.manual||(this.__hoverInside=!1,this.__focusInside||this._stateController.close())}__onOverlayOpen(){this.manual||this._overlayElement.opened&&!this._overlayElement._last&&this._stateController.close(!0)}__onTargetVisibilityChange(t){const e=this.__isTargetHidden;this.__isTargetHidden=!t,e&&t&&(this.__focusInside||this.__hoverInside)?this._stateController.open({immediate:!0}):!t&&this._autoOpened&&this._stateController.close(!0)}__isShouldShow(){return"function"!=typeof this.shouldShow||!0===this.shouldShow(this.target,this.context)}__textChanged(t,e){this._overlayElement&&(t||e)&&this._overlayElement.requestContentUpdate()}__tooltipRenderer(t){t.textContent="function"==typeof this.generator?this.generator(this.context):this.text,this._overlayContent=t.textContent}__computeAriaTarget(t,e){return(Array.isArray(t)?t.some((t=>t&&t.nodeType===Node.ELEMENT_NODE)):t)?t:e}__effectiveAriaTargetChanged(t,e){e&&[e].flat().forEach((t=>{(0,f.x_)(t,"aria-describedby",this._uniqueId)})),t&&[t].flat().forEach((t=>{(0,f.$2)(t,"aria-describedby",this._uniqueId)}))}__generatorChanged(t,e,o){t&&(e===this.__oldTextGenerator&&o===this.__oldContext||t.requestContentUpdate(),this.__oldTextGenerator=e,this.__oldContext=o)}__updateSrLabelText(t,e){t&&(t.textContent=e)}};class z extends(P((0,m.I)((0,g.S)((0,v.k)(a.H3))))){static get is(){return"vaadin-tooltip"}static get template(){return a.dy`
59
+ `}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this}}(0,r.M)(p);var v=o(16155),g=o(12521),m=o(61462),A=o(3550),b=o(87913),y=o(36139),f=o(63726),C=o(39320),w=o(78591),x=o(73971);const T=500;let E=T,O=T,B=T;const D=new Set;let L=!1,I=null,M=null;class S{constructor(t){this.host=t}get openedProp(){return this.host.manual?"opened":"_autoOpened"}get focusDelay(){const t=this.host;return null!=t.focusDelay&&t.focusDelay>0?t.focusDelay:E}get hoverDelay(){const t=this.host;return null!=t.hoverDelay&&t.hoverDelay>0?t.hoverDelay:O}get hideDelay(){const t=this.host;return null!=t.hideDelay&&t.hideDelay>0?t.hideDelay:B}get isClosing(){return D.has(this.host)}open(t={immediate:!1}){const{immediate:e,hover:o,focus:i}=t,s=o&&this.hoverDelay>0,n=i&&this.focusDelay>0;e||!s&&!n||this.__closeTimeout?this.__showTooltip():this.__warmupTooltip(n)}close(t){!t&&this.hideDelay>0?this.__scheduleClose():(this.__abortClose(),this._setOpened(!1)),this.__abortWarmUp(),L&&(this.__abortCooldown(),this.__scheduleCooldown())}_isOpened(){return this.host[this.openedProp]}_setOpened(t){this.host[this.openedProp]=t}__flushClosingTooltips(){D.forEach((t=>{t._stateController.close(!0),D.delete(t)}))}__showTooltip(){this.__abortClose(),this.__flushClosingTooltips(),this._setOpened(!0),L=!0,this.__abortWarmUp(),this.__abortCooldown()}__warmupTooltip(t){this._isOpened()||(L?this.__showTooltip():this.__scheduleWarmUp(t))}__abortClose(){this.__closeTimeout&&(clearTimeout(this.__closeTimeout),this.__closeTimeout=null)}__abortCooldown(){M&&(clearTimeout(M),M=null)}__abortWarmUp(){I&&(clearTimeout(I),I=null)}__scheduleClose(){this._isOpened()&&(D.add(this.host),this.__closeTimeout=setTimeout((()=>{D.delete(this.host),this.__closeTimeout=null,this._setOpened(!1)}),this.hideDelay))}__scheduleCooldown(){M=setTimeout((()=>{M=null,L=!1}),this.hideDelay)}__scheduleWarmUp(t){const e=t?this.focusDelay:this.hoverDelay;I=setTimeout((()=>{I=null,L=!0,this.__showTooltip()}),e)}}const P=t=>class extends((0,C.u)(t)){static get properties(){return{ariaTarget:{type:Object},context:{type:Object,value:()=>({})},focusDelay:{type:Number},for:{type:String,observer:"__forChanged"},generator:{type:Object},hideDelay:{type:Number},hoverDelay:{type:Number},manual:{type:Boolean,value:!1,sync:!0},opened:{type:Boolean,value:!1,sync:!0},position:{type:String},shouldShow:{type:Object,value:()=>(t,e)=>!0},target:{type:Object,observer:"__targetChanged"},text:{type:String,observer:"__textChanged"},_autoOpened:{type:Boolean,observer:"__autoOpenedChanged",sync:!0},_effectiveAriaTarget:{type:Object,computed:"__computeAriaTarget(ariaTarget, target)",observer:"__effectiveAriaTargetChanged"},__effectivePosition:{type:String,computed:"__computePosition(position, _position)"},__isTargetHidden:{type:Boolean,value:!1},_isConnected:{type:Boolean,sync:!0},_position:{type:String,value:"bottom"},_srLabel:{type:Object},_overlayContent:{type:String}}}static get observers(){return["__generatorChanged(_overlayElement, generator, context)","__updateSrLabelText(_srLabel, _overlayContent)"]}static setDefaultFocusDelay(t){E=null!=t&&t>=0?t:T}static setDefaultHideDelay(t){B=null!=t&&t>=0?t:T}static setDefaultHoverDelay(t){O=null!=t&&t>=0?t:T}constructor(){super(),this._uniqueId=`vaadin-tooltip-${(0,x.l)()}`,this._renderer=this.__tooltipRenderer.bind(this),this.__onFocusin=this.__onFocusin.bind(this),this.__onFocusout=this.__onFocusout.bind(this),this.__onMouseDown=this.__onMouseDown.bind(this),this.__onMouseEnter=this.__onMouseEnter.bind(this),this.__onMouseLeave=this.__onMouseLeave.bind(this),this.__onKeyDown=this.__onKeyDown.bind(this),this.__onOverlayOpen=this.__onOverlayOpen.bind(this),this.__targetVisibilityObserver=new IntersectionObserver((t=>{t.forEach((t=>this.__onTargetVisibilityChange(t.isIntersecting)))}),{threshold:0}),this._stateController=new S(this)}connectedCallback(){super.connectedCallback(),this._isConnected=!0,document.body.addEventListener("vaadin-overlay-open",this.__onOverlayOpen)}disconnectedCallback(){super.disconnectedCallback(),this._autoOpened&&this._stateController.close(!0),this._isConnected=!1,document.body.removeEventListener("vaadin-overlay-open",this.__onOverlayOpen)}ready(){super.ready(),this._srLabelController=new w.n(this,"sr-label","div",{initializer:t=>{t.id=this._uniqueId,t.setAttribute("role","tooltip"),this._srLabel=t}}),this.addController(this._srLabelController)}__computeHorizontalAlign(t){return["top-end","bottom-end","start-top","start","start-bottom"].includes(t)?"end":"start"}__computeNoHorizontalOverlap(t){return["start-top","start","start-bottom","end-top","end","end-bottom"].includes(t)}__computeNoVerticalOverlap(t){return["top-start","top-end","top","bottom-start","bottom","bottom-end"].includes(t)}__computeVerticalAlign(t){return["top-start","top-end","top","start-bottom","end-bottom"].includes(t)?"bottom":"top"}__computeOpened(t,e,o,i){return i&&(t?e:o)}__computePosition(t,e){return t||e}__autoOpenedChanged(t,e){t?document.addEventListener("keydown",this.__onKeyDown,!0):e&&document.removeEventListener("keydown",this.__onKeyDown,!0)}__forChanged(t){t&&(this.__setTargetByIdDebouncer=y.dx.debounce(this.__setTargetByIdDebouncer,b.YA,(()=>this.__setTargetById(t))))}__setTargetById(t){if(!this.isConnected)return;const e=this.getRootNode().getElementById(t);e?this.target=e:console.warn(`No element with id="${t}" found to show tooltip.`)}__targetChanged(t,e){e&&(e.removeEventListener("mouseenter",this.__onMouseEnter),e.removeEventListener("mouseleave",this.__onMouseLeave),e.removeEventListener("focusin",this.__onFocusin),e.removeEventListener("focusout",this.__onFocusout),e.removeEventListener("mousedown",this.__onMouseDown),this.__targetVisibilityObserver.unobserve(e)),t&&(t.addEventListener("mouseenter",this.__onMouseEnter),t.addEventListener("mouseleave",this.__onMouseLeave),t.addEventListener("focusin",this.__onFocusin),t.addEventListener("focusout",this.__onFocusout),t.addEventListener("mousedown",this.__onMouseDown),requestAnimationFrame((()=>{this.__targetVisibilityObserver.observe(t)})))}__onFocusin(t){this.manual||(0,A.LQ)()&&(this.target.contains(t.relatedTarget)||this.__isShouldShow()&&(this.__focusInside=!0,this.__isTargetHidden||this.__hoverInside&&this._autoOpened||this._stateController.open({focus:!0})))}__onFocusout(t){this.manual||this.target.contains(t.relatedTarget)||(this.__focusInside=!1,this.__hoverInside||this._stateController.close(!0))}__onKeyDown(t){"Escape"===t.key&&(t.stopPropagation(),this._stateController.close(!0))}__onMouseDown(){this._stateController.close(!0)}__onMouseEnter(){this.manual||this.__isShouldShow()&&(this.__hoverInside||(this.__hoverInside=!0,this.__isTargetHidden||this.__focusInside&&this._autoOpened||this._stateController.open({hover:!0})))}__onMouseLeave(t){t.relatedTarget!==this._overlayElement&&this.__handleMouseLeave()}__onOverlayMouseEnter(){this._stateController.isClosing&&this._stateController.open({immediate:!0})}__onOverlayMouseLeave(t){t.relatedTarget!==this.target&&this.__handleMouseLeave()}__handleMouseLeave(){this.manual||(this.__hoverInside=!1,this.__focusInside||this._stateController.close())}__onOverlayOpen(){this.manual||this._overlayElement.opened&&!this._overlayElement._last&&this._stateController.close(!0)}__onTargetVisibilityChange(t){const e=this.__isTargetHidden;this.__isTargetHidden=!t,e&&t&&(this.__focusInside||this.__hoverInside)?this._stateController.open({immediate:!0}):!t&&this._autoOpened&&this._stateController.close(!0)}__isShouldShow(){return"function"!=typeof this.shouldShow||!0===this.shouldShow(this.target,this.context)}__textChanged(t,e){this._overlayElement&&(t||e)&&this._overlayElement.requestContentUpdate()}__tooltipRenderer(t){t.textContent="function"==typeof this.generator?this.generator(this.context):this.text,this._overlayContent=t.textContent}__computeAriaTarget(t,e){return(Array.isArray(t)?t.some((t=>t&&t.nodeType===Node.ELEMENT_NODE)):t)?t:e}__effectiveAriaTargetChanged(t,e){e&&[e].flat().forEach((t=>{(0,f.x_)(t,"aria-describedby",this._uniqueId)})),t&&[t].flat().forEach((t=>{(0,f.$2)(t,"aria-describedby",this._uniqueId)}))}__generatorChanged(t,e,o){t&&(e===this.__oldTextGenerator&&o===this.__oldContext||t.requestContentUpdate(),this.__oldTextGenerator=e,this.__oldContext=o)}__updateSrLabelText(t,e){t&&(t.textContent=e)}};class z extends(P((0,m.I)((0,g.S)((0,v.k)(a.H3))))){static get is(){return"vaadin-tooltip"}static get template(){return a.dy`
60
60
  <style>
61
61
  :host {
62
62
  display: none;
package/dist/umd/5135.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see 5135.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5135],{10063:(e,t,r)=>{r.d(t,{x:()=>a});var i=r(87913),o=r(36139);const s=document.createElement("div");let n;function a(e,t={}){const r=t.mode||"polite",a=void 0===t.timeout?150:t.timeout;"alert"===r?(s.removeAttribute("aria-live"),s.removeAttribute("role"),n=o.dx.debounce(n,i.rs,(()=>{s.setAttribute("role","alert")}))):(n&&n.cancel(),s.removeAttribute("role"),s.setAttribute("aria-live",r)),s.textContent="",setTimeout((()=>{s.textContent=e}),a)}s.style.position="fixed",s.style.clip="rect(0px, 0px, 0px, 0px)",s.setAttribute("aria-live","polite"),document.body.appendChild(s)},33392:(e,t,r)=>{r.d(t,{G:()=>o});var i=r(3550);class o{saveFocus(e){this.focusNode=e||(0,i.Gf)()}restoreFocus(){const e=this.focusNode;e&&((0,i.Gf)()===document.body?setTimeout((()=>e.focus())):e.focus(),this.focusNode=null)}}},91486:(e,t,r)=>{r.d(t,{f:()=>s});var i=r(3550);const o=[];class s{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return(0,i.GO)(this.__trapNode)}get __focusedElementIndex(){const e=this.__focusableElements;return e.indexOf(e.filter(i.Qw).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(e){if(this.__trapNode=e,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");o.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,o.pop()}__onKeyDown(e){if(this.__trapNode&&this===Array.from(o).pop()&&"Tab"===e.key){e.preventDefault();const t=e.shiftKey;this.__focusNextElement(t)}}__focusNextElement(e=!1){const t=this.__focusableElements,r=e?-1:1,i=this.__focusedElementIndex,o=t[(t.length+i+r)%t.length];o.focus(),"input"===o.localName&&o.select()}}},29680:(e,t,r)=>{r.d(t,{F:()=>s});var i=r(91014);const o=new ResizeObserver((e=>{setTimeout((()=>{e.forEach((e=>{e.target.resizables?e.target.resizables.forEach((t=>{t._onResize(e.contentRect)})):e.target._onResize(e.contentRect)}))}))})),s=(0,i.o)((e=>class extends e{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),o.observe(this),this._observeParent){const e=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;e.resizables||(e.resizables=new Set,o.observe(e)),e.resizables.add(this),this.__parent=e}}disconnectedCallback(){super.disconnectedCallback(),o.unobserve(this);const e=this.__parent;if(this._observeParent&&e){const t=e.resizables;t&&(t.delete(this),0===t.size&&o.unobserve(e)),this.__parent=null}}_onResize(e){}}))},28623:(e,t,r)=>{r.d(t,{w:()=>l}),r(93556),r(3654);var i=r(52807),o=r(65517),s=r(99109);const n=e=>class extends e{static get properties(){return{width:{type:String,value:"58px",sync:!0},flexGrow:{type:Number,value:0,sync:!0},selectAll:{type:Boolean,value:!1,notify:!0,sync:!0},autoSelect:{type:Boolean,value:!1,sync:!0},dragSelect:{type:Boolean,value:!1,sync:!0},_indeterminate:{type:Boolean,sync:!0},_selectAllHidden:Boolean}}static get observers(){return["_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header, selectAll, _indeterminate, _selectAllHidden)"]}_defaultHeaderRenderer(e,t){let r=e.firstElementChild;r||(r=document.createElement("vaadin-checkbox"),r.setAttribute("aria-label","Select All"),r.classList.add("vaadin-grid-select-all-checkbox"),e.appendChild(r),r.addEventListener("checked-changed",this.__onSelectAllCheckedChanged.bind(this)));const i=this.__isChecked(this.selectAll,this._indeterminate);r.__rendererChecked=i,r.checked=i,r.hidden=this._selectAllHidden,r.indeterminate=this._indeterminate}_defaultRenderer(e,t,{item:r,selected:i}){let o=e.firstElementChild;o||(o=document.createElement("vaadin-checkbox"),o.setAttribute("aria-label","Select Row"),e.appendChild(o),o.addEventListener("checked-changed",this.__onSelectRowCheckedChanged.bind(this)),(0,s.NH)(e,"track",this.__onCellTrack.bind(this)),e.addEventListener("mousedown",this.__onCellMouseDown.bind(this)),e.addEventListener("click",this.__onCellClick.bind(this))),o.__item=r,o.__rendererChecked=i,o.checked=i}__onSelectAllCheckedChanged(e){e.target.checked!==e.target.__rendererChecked&&(this._indeterminate||e.target.checked?this._selectAll():this._deselectAll())}__onSelectRowCheckedChanged(e){e.target.checked!==e.target.__rendererChecked&&(e.target.checked?this._selectItem(e.target.__item):this._deselectItem(e.target.__item))}__onCellTrack(e){if(this.dragSelect)if(this.__dragCurrentY=e.detail.y,this.__dragDy=e.detail.dy,"start"===e.detail.state){const t=this._grid._getRenderedRows().find((t=>t.contains(e.currentTarget.assignedSlot)));this.__selectOnDrag=!this._grid._isSelected(t._item),this.__dragStartIndex=t.index,this.__dragStartItem=t._item,this.__dragAutoScroller()}else"end"===e.detail.state&&(this.__dragStartItem&&(this.__selectOnDrag?this._selectItem(this.__dragStartItem):this._deselectItem(this.__dragStartItem)),setTimeout((()=>{this.__dragStartIndex=void 0})))}__onCellMouseDown(e){this.dragSelect&&e.preventDefault()}__onCellClick(e){void 0!==this.__dragStartIndex&&e.preventDefault()}__dragAutoScroller(){if(void 0===this.__dragStartIndex)return;const e=this._grid._getRenderedRows(),t=e.find((e=>{const t=e.getBoundingClientRect();return this.__dragCurrentY>=t.top&&this.__dragCurrentY<=t.bottom}));let r=t?t.index:void 0;const i=this.__getScrollableArea();this.__dragCurrentY<i.top?r=this._grid._firstVisibleIndex:this.__dragCurrentY>i.bottom&&(r=this._grid._lastVisibleIndex),void 0!==r&&e.forEach((e=>{(r>this.__dragStartIndex&&e.index>=this.__dragStartIndex&&e.index<=r||r<this.__dragStartIndex&&e.index<=this.__dragStartIndex&&e.index>=r)&&(this.__selectOnDrag?this._selectItem(e._item):this._deselectItem(e._item),this.__dragStartItem=void 0)}));const o=.15*i.height;if(this.__dragDy<0&&this.__dragCurrentY<i.top+o){const e=i.top+o-this.__dragCurrentY,t=Math.min(1,e/o);this._grid.$.table.scrollTop-=10*t}if(this.__dragDy>0&&this.__dragCurrentY>i.bottom-o){const e=this.__dragCurrentY-(i.bottom-o),t=Math.min(1,e/o);this._grid.$.table.scrollTop+=10*t}setTimeout((()=>this.__dragAutoScroller()),10)}__getScrollableArea(){const e=this._grid.$.table.getBoundingClientRect(),t=this._grid.$.header.getBoundingClientRect(),r=this._grid.$.footer.getBoundingClientRect();return{top:e.top+t.height,bottom:e.bottom-r.height,left:e.left,right:e.right,height:e.height-t.height-r.height,width:e.width}}_selectAll(){}_deselectAll(){}_selectItem(e){}_deselectItem(e){}__isChecked(e,t){return t||e}},a=e=>class extends(n(e)){static get properties(){return{__previousActiveItem:Object}}static get observers(){return["__onSelectAllChanged(selectAll)"]}constructor(){super(),this.__boundOnActiveItemChanged=this.__onActiveItemChanged.bind(this),this.__boundOnDataProviderChanged=this.__onDataProviderChanged.bind(this),this.__boundOnSelectedItemsChanged=this.__onSelectedItemsChanged.bind(this)}disconnectedCallback(){this._grid.removeEventListener("active-item-changed",this.__boundOnActiveItemChanged),this._grid.removeEventListener("data-provider-changed",this.__boundOnDataProviderChanged),this._grid.removeEventListener("filter-changed",this.__boundOnSelectedItemsChanged),this._grid.removeEventListener("selected-items-changed",this.__boundOnSelectedItemsChanged),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),this._grid&&(this._grid.addEventListener("active-item-changed",this.__boundOnActiveItemChanged),this._grid.addEventListener("data-provider-changed",this.__boundOnDataProviderChanged),this._grid.addEventListener("filter-changed",this.__boundOnSelectedItemsChanged),this._grid.addEventListener("selected-items-changed",this.__boundOnSelectedItemsChanged))}__onSelectAllChanged(e){void 0!==e&&this._grid&&(this.__selectAllInitialized?this._selectAllChangeLock||(e&&this.__hasArrayDataProvider()?this.__withFilteredItemsArray((e=>{this._grid.selectedItems=e})):this._grid.selectedItems=[]):this.__selectAllInitialized=!0)}__arrayContains(e,t){return Array.isArray(e)&&Array.isArray(t)&&t.every((t=>e.includes(t)))}_selectAll(){this.selectAll=!0}_deselectAll(){this.selectAll=!1}_selectItem(e){this._grid.selectItem(e)}_deselectItem(e){this._grid.deselectItem(e)}__onActiveItemChanged(e){const t=e.detail.value;if(this.autoSelect){const e=t||this.__previousActiveItem;e&&this._grid._toggleItem(e)}this.__previousActiveItem=t}__hasArrayDataProvider(){return Array.isArray(this._grid.items)&&!!this._grid.dataProvider}__onSelectedItemsChanged(){this._selectAllChangeLock=!0,this.__hasArrayDataProvider()&&this.__withFilteredItemsArray((e=>{this._grid.selectedItems.length?this.__arrayContains(this._grid.selectedItems,e)?(this.selectAll=!0,this._indeterminate=!1):(this.selectAll=!1,this._indeterminate=!0):(this.selectAll=!1,this._indeterminate=!1)})),this._selectAllChangeLock=!1}__onDataProviderChanged(){this._selectAllHidden=!Array.isArray(this._grid.items)}__withFilteredItemsArray(e){const t={page:0,pageSize:1/0,sortOrders:[],filters:this._grid._mapFilters()};this._grid.dataProvider(t,(t=>e(t)))}};class l extends(a(o.C)){static get is(){return"vaadin-grid-selection-column"}}(0,i.M)(l)},30322:(e,t,r)=>{r.d(t,{n:()=>_}),r(51195),r(29849),r(29416);var i=r(46570);(0,i.hC)("vaadin-grid-sorter",i.iv`
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5135],{10063:(e,t,r)=>{r.d(t,{x:()=>a});var i=r(87913),o=r(36139);const s=document.createElement("div");let n;function a(e,t={}){const r=t.mode||"polite",a=void 0===t.timeout?150:t.timeout;"alert"===r?(s.removeAttribute("aria-live"),s.removeAttribute("role"),n=o.dx.debounce(n,i.rs,(()=>{s.setAttribute("role","alert")}))):(n&&n.cancel(),s.removeAttribute("role"),s.setAttribute("aria-live",r)),s.textContent="",setTimeout((()=>{s.textContent=e}),a)}s.style.position="fixed",s.style.clip="rect(0px, 0px, 0px, 0px)",s.setAttribute("aria-live","polite"),document.body.appendChild(s)},33392:(e,t,r)=>{r.d(t,{G:()=>o});var i=r(3550);class o{saveFocus(e){this.focusNode=e||(0,i.Gf)()}restoreFocus(){const e=this.focusNode;e&&((0,i.Gf)()===document.body?setTimeout((()=>e.focus())):e.focus(),this.focusNode=null)}}},91486:(e,t,r)=>{r.d(t,{f:()=>s});var i=r(3550);const o=[];class s{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return(0,i.GO)(this.__trapNode)}get __focusedElementIndex(){const e=this.__focusableElements;return e.indexOf(e.filter(i.Qw).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(e){if(this.__trapNode=e,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");o.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,o.pop()}__onKeyDown(e){if(this.__trapNode&&this===Array.from(o).pop()&&"Tab"===e.key){e.preventDefault();const t=e.shiftKey;this.__focusNextElement(t)}}__focusNextElement(e=!1){const t=this.__focusableElements,r=e?-1:1,i=this.__focusedElementIndex,o=t[(t.length+i+r)%t.length];o.focus(),"input"===o.localName&&o.select()}}},29680:(e,t,r)=>{r.d(t,{F:()=>s});var i=r(91014);const o=new ResizeObserver((e=>{setTimeout((()=>{e.forEach((e=>{e.target.resizables?e.target.resizables.forEach((t=>{t._onResize(e.contentRect)})):e.target._onResize(e.contentRect)}))}))})),s=(0,i.o)((e=>class extends e{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),o.observe(this),this._observeParent){const e=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;e.resizables||(e.resizables=new Set,o.observe(e)),e.resizables.add(this),this.__parent=e}}disconnectedCallback(){super.disconnectedCallback(),o.unobserve(this);const e=this.__parent;if(this._observeParent&&e){const t=e.resizables;t&&(t.delete(this),0===t.size&&o.unobserve(e)),this.__parent=null}}_onResize(e){}}))},28623:(e,t,r)=>{r.d(t,{w:()=>l}),r(93556),r(20764);var i=r(52807),o=r(65517),s=r(99109);const n=e=>class extends e{static get properties(){return{width:{type:String,value:"58px",sync:!0},flexGrow:{type:Number,value:0,sync:!0},selectAll:{type:Boolean,value:!1,notify:!0,sync:!0},autoSelect:{type:Boolean,value:!1,sync:!0},dragSelect:{type:Boolean,value:!1,sync:!0},_indeterminate:{type:Boolean,sync:!0},_selectAllHidden:Boolean}}static get observers(){return["_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header, selectAll, _indeterminate, _selectAllHidden)"]}_defaultHeaderRenderer(e,t){let r=e.firstElementChild;r||(r=document.createElement("vaadin-checkbox"),r.setAttribute("aria-label","Select All"),r.classList.add("vaadin-grid-select-all-checkbox"),e.appendChild(r),r.addEventListener("checked-changed",this.__onSelectAllCheckedChanged.bind(this)));const i=this.__isChecked(this.selectAll,this._indeterminate);r.__rendererChecked=i,r.checked=i,r.hidden=this._selectAllHidden,r.indeterminate=this._indeterminate}_defaultRenderer(e,t,{item:r,selected:i}){let o=e.firstElementChild;o||(o=document.createElement("vaadin-checkbox"),o.setAttribute("aria-label","Select Row"),e.appendChild(o),o.addEventListener("checked-changed",this.__onSelectRowCheckedChanged.bind(this)),(0,s.NH)(e,"track",this.__onCellTrack.bind(this)),e.addEventListener("mousedown",this.__onCellMouseDown.bind(this)),e.addEventListener("click",this.__onCellClick.bind(this))),o.__item=r,o.__rendererChecked=i,o.checked=i}__onSelectAllCheckedChanged(e){e.target.checked!==e.target.__rendererChecked&&(this._indeterminate||e.target.checked?this._selectAll():this._deselectAll())}__onSelectRowCheckedChanged(e){e.target.checked!==e.target.__rendererChecked&&(e.target.checked?this._selectItem(e.target.__item):this._deselectItem(e.target.__item))}__onCellTrack(e){if(this.dragSelect)if(this.__dragCurrentY=e.detail.y,this.__dragDy=e.detail.dy,"start"===e.detail.state){const t=this._grid._getRenderedRows().find((t=>t.contains(e.currentTarget.assignedSlot)));this.__selectOnDrag=!this._grid._isSelected(t._item),this.__dragStartIndex=t.index,this.__dragStartItem=t._item,this.__dragAutoScroller()}else"end"===e.detail.state&&(this.__dragStartItem&&(this.__selectOnDrag?this._selectItem(this.__dragStartItem):this._deselectItem(this.__dragStartItem)),setTimeout((()=>{this.__dragStartIndex=void 0})))}__onCellMouseDown(e){this.dragSelect&&e.preventDefault()}__onCellClick(e){void 0!==this.__dragStartIndex&&e.preventDefault()}__dragAutoScroller(){if(void 0===this.__dragStartIndex)return;const e=this._grid._getRenderedRows(),t=e.find((e=>{const t=e.getBoundingClientRect();return this.__dragCurrentY>=t.top&&this.__dragCurrentY<=t.bottom}));let r=t?t.index:void 0;const i=this.__getScrollableArea();this.__dragCurrentY<i.top?r=this._grid._firstVisibleIndex:this.__dragCurrentY>i.bottom&&(r=this._grid._lastVisibleIndex),void 0!==r&&e.forEach((e=>{(r>this.__dragStartIndex&&e.index>=this.__dragStartIndex&&e.index<=r||r<this.__dragStartIndex&&e.index<=this.__dragStartIndex&&e.index>=r)&&(this.__selectOnDrag?this._selectItem(e._item):this._deselectItem(e._item),this.__dragStartItem=void 0)}));const o=.15*i.height;if(this.__dragDy<0&&this.__dragCurrentY<i.top+o){const e=i.top+o-this.__dragCurrentY,t=Math.min(1,e/o);this._grid.$.table.scrollTop-=10*t}if(this.__dragDy>0&&this.__dragCurrentY>i.bottom-o){const e=this.__dragCurrentY-(i.bottom-o),t=Math.min(1,e/o);this._grid.$.table.scrollTop+=10*t}setTimeout((()=>this.__dragAutoScroller()),10)}__getScrollableArea(){const e=this._grid.$.table.getBoundingClientRect(),t=this._grid.$.header.getBoundingClientRect(),r=this._grid.$.footer.getBoundingClientRect();return{top:e.top+t.height,bottom:e.bottom-r.height,left:e.left,right:e.right,height:e.height-t.height-r.height,width:e.width}}_selectAll(){}_deselectAll(){}_selectItem(e){}_deselectItem(e){}__isChecked(e,t){return t||e}},a=e=>class extends(n(e)){static get properties(){return{__previousActiveItem:Object}}static get observers(){return["__onSelectAllChanged(selectAll)"]}constructor(){super(),this.__boundOnActiveItemChanged=this.__onActiveItemChanged.bind(this),this.__boundOnDataProviderChanged=this.__onDataProviderChanged.bind(this),this.__boundOnSelectedItemsChanged=this.__onSelectedItemsChanged.bind(this)}disconnectedCallback(){this._grid.removeEventListener("active-item-changed",this.__boundOnActiveItemChanged),this._grid.removeEventListener("data-provider-changed",this.__boundOnDataProviderChanged),this._grid.removeEventListener("filter-changed",this.__boundOnSelectedItemsChanged),this._grid.removeEventListener("selected-items-changed",this.__boundOnSelectedItemsChanged),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),this._grid&&(this._grid.addEventListener("active-item-changed",this.__boundOnActiveItemChanged),this._grid.addEventListener("data-provider-changed",this.__boundOnDataProviderChanged),this._grid.addEventListener("filter-changed",this.__boundOnSelectedItemsChanged),this._grid.addEventListener("selected-items-changed",this.__boundOnSelectedItemsChanged))}__onSelectAllChanged(e){void 0!==e&&this._grid&&(this.__selectAllInitialized?this._selectAllChangeLock||(e&&this.__hasArrayDataProvider()?this.__withFilteredItemsArray((e=>{this._grid.selectedItems=e})):this._grid.selectedItems=[]):this.__selectAllInitialized=!0)}__arrayContains(e,t){return Array.isArray(e)&&Array.isArray(t)&&t.every((t=>e.includes(t)))}_selectAll(){this.selectAll=!0}_deselectAll(){this.selectAll=!1}_selectItem(e){this._grid.selectItem(e)}_deselectItem(e){this._grid.deselectItem(e)}__onActiveItemChanged(e){const t=e.detail.value;if(this.autoSelect){const e=t||this.__previousActiveItem;e&&this._grid._toggleItem(e)}this.__previousActiveItem=t}__hasArrayDataProvider(){return Array.isArray(this._grid.items)&&!!this._grid.dataProvider}__onSelectedItemsChanged(){this._selectAllChangeLock=!0,this.__hasArrayDataProvider()&&this.__withFilteredItemsArray((e=>{this._grid.selectedItems.length?this.__arrayContains(this._grid.selectedItems,e)?(this.selectAll=!0,this._indeterminate=!1):(this.selectAll=!1,this._indeterminate=!0):(this.selectAll=!1,this._indeterminate=!1)})),this._selectAllChangeLock=!1}__onDataProviderChanged(){this._selectAllHidden=!Array.isArray(this._grid.items)}__withFilteredItemsArray(e){const t={page:0,pageSize:1/0,sortOrders:[],filters:this._grid._mapFilters()};this._grid.dataProvider(t,(t=>e(t)))}};class l extends(a(o.C)){static get is(){return"vaadin-grid-selection-column"}}(0,i.M)(l)},30322:(e,t,r)=>{r.d(t,{n:()=>_}),r(51195),r(29849),r(29416);var i=r(46570);(0,i.hC)("vaadin-grid-sorter",i.iv`
3
3
  :host {
4
4
  justify-content: flex-start;
5
5
  align-items: baseline;
package/dist/umd/5806.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see 5806.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5806],{73208:(e,t,n)=>{n.d(t,{b:()=>s});var i=n(9229);class s extends i.n{constructor(e,t){super(e,"input","input",{initializer:(e,n)=>{n.value&&(e.value=n.value),n.type&&e.setAttribute("type",n.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0})}}},20422:(e,t,n)=>{n.d(t,{j:()=>s});var i=n(73406);const s=e=>class extends((0,i.L)(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()}}},95806:(e,t,n)=>{n(21578),n(79098);var i=n(14398),s=n(83208),a=n(46570);const r=a.iv`
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5806],{73208:(e,t,n)=>{n.d(t,{b:()=>s});var i=n(78591);class s extends i.n{constructor(e,t){super(e,"input","input",{initializer:(e,n)=>{n.value&&(e.value=n.value),n.type&&e.setAttribute("type",n.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0})}}},20422:(e,t,n)=>{n.d(t,{j:()=>s});var i=n(73406);const s=e=>class extends((0,i.L)(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()}}},95806:(e,t,n)=>{n(21578),n(79098);var i=n(14398),s=n(83208),a=n(46570);const r=a.iv`
3
3
  :host([step-buttons-visible]:not([theme~='align-right'])) ::slotted(input) {
4
4
  text-align: center;
5
5
  }
@@ -0,0 +1,170 @@
1
+ /*! For license information please see 602.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[602],{41370:(e,t,r)=>{r.d(t,{B:()=>o});var s=r(91014),i=r(21360),a=r(58298);const o=(0,s.o)((e=>class extends((0,i.W)((0,a.N)(e))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(e,t){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):t&&this._removeFocusListeners(t)}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus)}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,t){super._disabledChanged(e,t),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur()}_tabindexChanged(e){this.__forwardTabIndex(e)}__forwardTabIndex(e){void 0!==e&&this.focusElement&&(this.focusElement.tabIndex=e,-1!==e&&(this.tabindex=void 0)),this.disabled&&e&&(-1!==e&&(this._lastTabIndex=e),this.tabindex=void 0)}}))},95229:(e,t,r)=>{r.d(t,{f:()=>s});const s=(0,r(91014).o)((e=>class extends e{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(e){this._setAriaDisabled(e)}_setAriaDisabled(e){e?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}}))},39107:(e,t,r)=>{r.d(t,{o:()=>d});var s=r(63726);const i=new Map;function a(e){return i.has(e)||i.set(e,new WeakMap),i.get(e)}function o(e,t){e&&e.removeAttribute(t)}function l(e,t){if(!e||!t)return;const r=a(t);if(r.has(e))return;const i=(0,s.hK)(e.getAttribute(t));r.set(e,new Set(i))}function n(e,t,r={newId:null,oldId:null,fromUser:!1}){if(!e||!t)return;const{newId:i,oldId:n,fromUser:d}=r,h=a(t),u=h.get(e);if(!d&&u)return n&&u.delete(n),void(i&&u.add(i));d&&(u?i||h.delete(e):l(e,t),o(e,t)),(0,s.x_)(e,t,n);const _=i||(0,s.dV)(u);_&&(0,s.$2)(e,t,_)}class d{constructor(e){this.host=e,this.__required=!1}setTarget(e){this.__target=e,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(e){this.__setAriaRequiredAttribute(e),this.__required=e}setAriaLabel(e){this.__setAriaLabelToAttribute(e),this.__label=e}setLabelId(e,t=!1){const r=t?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(e,r,t),t?this.__labelIdFromUser=e:this.__labelId=e}setErrorId(e){this.__setErrorIdToAriaAttribute(e,this.__errorId),this.__errorId=e}setHelperId(e){this.__setHelperIdToAriaAttribute(e,this.__helperId),this.__helperId=e}__setAriaLabelToAttribute(e){var t;this.__target&&(e?(l(t=this.__target,"aria-labelledby"),o(t,"aria-labelledby"),this.__target.setAttribute("aria-label",e)):this.__label&&(function(e,t){if(!e)return;const r=a(t),i=r.get(e);i&&0!==i.size?(0,s.$2)(e,t,(0,s.dV)(i)):e.removeAttribute(t),r.delete(e)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(e,t,r){n(this.__target,"aria-labelledby",{newId:e,oldId:t,fromUser:r})}__setErrorIdToAriaAttribute(e,t){n(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setHelperIdToAriaAttribute(e,t){n(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setAriaRequiredAttribute(e){this.__target&&(["input","textarea"].includes(this.__target.localName)||(e?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}},52628:(e,t,r)=>{r.d(t,{L:()=>s});const s=(0,r(91014).o)((e=>class extends e{ready(){super.ready(),this.addEventListener("keydown",(e=>{this._onKeyDown(e)})),this.addEventListener("keyup",(e=>{this._onKeyUp(e)}))}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e)}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}}))},58298:(e,t,r)=>{r.d(t,{N:()=>i});var s=r(95229);const i=e=>class extends((0,s.f)(e)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(e,t){super._disabledChanged(e,t),e?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):t&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(e){this.disabled&&-1!==e&&(this._lastTabIndex=e,this.tabindex=-1)}}},86328:(e,t,r)=>{r.d(t,{A:()=>s});const s=(0,r(91014).o)((e=>class extends e{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(e){e&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((e=>{this._delegateAttribute(e,this[e])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((e=>{this._delegateProperty(e,this[e])}))}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach(((t,r)=>{this._delegateAttribute(t,e[r])}))}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach(((t,r)=>{this._delegateProperty(t,e[r])}))}_delegateAttribute(e,t){this.stateTarget&&("invalid"===e&&this._delegateAttribute("aria-invalid",!!t&&"true"),"boolean"==typeof t?this.stateTarget.toggleAttribute(e,t):t?this.stateTarget.setAttribute(e,t):this.stateTarget.removeAttribute(e))}_delegateProperty(e,t){this.stateTarget&&(this.stateTarget[e]=t)}}))},22604:(e,t,r)=>{r.d(t,{v:()=>i});var s=r(78591);class i extends s.n{constructor(e,t,r,s={}){super(e,t,r,{...s,useUniqueId:!0})}initCustomNode(e){this.__updateNodeId(e),this.__notifyChange(e)}teardownNode(e){const t=this.getSlotChild();t&&t!==this.defaultNode?this.__notifyChange(t):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const e=super.attachDefaultNode();return e&&this.__updateNodeId(e),e}restoreDefaultNode(){}updateDefaultNode(e){this.__notifyChange(e)}observeNode(e){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((e=>{e.forEach((e=>{const t=e.target,r=t===this.node;"attributes"===e.type?r&&this.__updateNodeId(t):(r||t.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(e){return!!e&&(e.nodeType===Node.ELEMENT_NODE&&(customElements.get(e.localName)||e.children.length>0)||e.textContent&&""!==e.textContent.trim())}__notifyChange(e){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(e),node:e}}))}__updateNodeId(e){const t=!this.nodes||e===this.nodes[0];e.nodeType!==Node.ELEMENT_NODE||this.multiple&&!t||e.id||(e.id=this.defaultId)}}},17412:(e,t,r)=>{r.d(t,{f:()=>h});var s=r(39107),i=r(16155),a=r(22604);class o extends a.v{constructor(e){super(e,"error-message","div")}setErrorMessage(e){this.errorMessage=e,this.updateDefaultNode(this.node)}setInvalid(e){this.invalid=e,this.updateDefaultNode(this.node)}initAddedNode(e){e!==this.defaultNode&&this.initCustomNode(e)}initNode(e){this.updateDefaultNode(e)}initCustomNode(e){e.textContent&&!this.errorMessage&&(this.errorMessage=e.textContent.trim()),super.initCustomNode(e)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(e){const{errorMessage:t,invalid:r}=this,s=Boolean(r&&t&&""!==t.trim());e&&(e.textContent=s?t:"",e.hidden=!s,s?e.setAttribute("role","alert"):e.removeAttribute("role")),super.updateDefaultNode(e)}}class l extends a.v{constructor(e){super(e,"helper",null)}setHelperText(e){this.helperText=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:e}=this;if(e&&""!==e.trim()){this.tagName="div";const e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(e){e&&(e.textContent=this.helperText),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}var n=r(26821),d=r(34524);const h=e=>class extends((0,d.n)((0,n.h)((0,i.k)(e)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new s.o(this),this._helperController=new l(this),this._errorController=new o(this),this._errorController.addEventListener("slot-content-changed",(e=>{this.toggleAttribute("has-error-message",e.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(e=>{const{hasContent:t,node:r}=e.detail;this.__labelChanged(t,r)})),this._helperController.addEventListener("slot-content-changed",(e=>{const{hasContent:t,node:r}=e.detail;this.toggleAttribute("has-helper",t),this.__helperChanged(t,r)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(e,t){e?this._fieldAriaController.setHelperId(t.id):this._fieldAriaController.setHelperId(null)}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e)}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0)}__labelChanged(e,t){e?this._fieldAriaController.setLabelId(t.id):this._fieldAriaController.setLabelId(null)}_errorMessageChanged(e){this._errorController.setErrorMessage(e)}_helperTextChanged(e){this._helperController.setHelperText(e)}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e)}_requiredChanged(e){this._fieldAriaController.setRequired(e)}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout((()=>{if(e){const e=this._errorNode;this._fieldAriaController.setErrorId(e&&e.id)}else this._fieldAriaController.setErrorId(null)}))}}},56326:(e,t,r)=>{r.d(t,{J:()=>s});const s=(0,r(91014).o)((e=>class extends e{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange)}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange)}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=null!=e?e:"")}_inputElementChanged(e,t){e?this._addInputListeners(e):t&&this._removeInputListeners(t)}_hasInputValueChanged(e,t){(e||t)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(e){this._setHasInputValue(e),this._onInput(e)}_onInput(e){const t=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=t.value,this.__userInput=!1}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e)}_valueChanged(e,t){this._toggleHasValue(this._hasValue),""===e&&void 0===t||this.__userInput||this._forwardInputValue(e)}_setHasInputValue(e){const t=e.composedPath()[0];this._hasInputValue=t.value.length>0}}))},26821:(e,t,r)=>{r.d(t,{h:()=>l});var s=r(91014),i=r(16155),a=r(22604);class o extends a.v{constructor(e){super(e,"label","label")}setLabel(e){this.label=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:e}=this;if(e&&""!==e.trim()){const e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(e){e&&(e.textContent=this.label),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}const l=(0,s.o)((e=>class extends((0,i.k)(e)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new o(this),this._labelController.addEventListener("slot-content-changed",(e=>{this.toggleAttribute("has-label",e.detail.hasContent)}))}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(e){this._labelController.setLabel(e)}}))},46729:(e,t,r)=>{r.d(t,{v:()=>s});class s{constructor(e,t){this.input=e,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),t.addEventListener("slot-content-changed",(e=>{this.__initLabel(e.detail.node)})),this.__initLabel(t.node)}__initLabel(e){e&&(e.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&e.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const e=t=>{t.stopImmediatePropagation(),this.input.removeEventListener("click",e)};this.input.addEventListener("click",e)}}},34524:(e,t,r)=>{r.d(t,{n:()=>s});const s=(0,r(91014).o)((e=>class extends e{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return!this.required||!!this.value}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}}))},82982:(e,t,r)=>{r.d(t,{_:()=>s}),r(51195),r(79098),r(29849),r(34173);const s=r(46570).iv`
3
+ :host {
4
+ --_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
5
+ }
6
+
7
+ :host([has-helper]) [part='helper-text']::before {
8
+ content: '';
9
+ display: block;
10
+ height: var(--_helper-spacing);
11
+ }
12
+
13
+ [part='helper-text'] {
14
+ display: block;
15
+ color: var(--vaadin-input-field-helper-color, var(--lumo-secondary-text-color));
16
+ font-size: var(--vaadin-input-field-helper-font-size, var(--lumo-font-size-xs));
17
+ line-height: var(--lumo-line-height-xs);
18
+ font-weight: var(--vaadin-input-field-helper-font-weight, 400);
19
+ margin-left: calc(var(--lumo-border-radius-m) / 4);
20
+ transition: color 0.2s;
21
+ }
22
+
23
+ :host(:hover:not([readonly])) [part='helper-text'] {
24
+ color: var(--lumo-body-text-color);
25
+ }
26
+
27
+ :host([disabled]) [part='helper-text'] {
28
+ color: var(--lumo-disabled-text-color);
29
+ -webkit-text-fill-color: var(--lumo-disabled-text-color);
30
+ }
31
+
32
+ :host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
33
+ display: none;
34
+ }
35
+
36
+ :host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
37
+ content: '';
38
+ display: block;
39
+ height: var(--_helper-spacing);
40
+ }
41
+
42
+ :host([has-helper][theme~='helper-above-field']) [part='label'] {
43
+ order: 0;
44
+ padding-bottom: var(--_helper-spacing);
45
+ }
46
+
47
+ :host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
48
+ order: 1;
49
+ }
50
+
51
+ :host([has-helper][theme~='helper-above-field']) [part='label'] + * {
52
+ order: 2;
53
+ }
54
+
55
+ :host([has-helper][theme~='helper-above-field']) [part='error-message'] {
56
+ order: 3;
57
+ }
58
+ `},1251:(e,t,r)=>{r.d(t,{l:()=>i}),r(51195),r(29416),r(29849),r(34173);var s=r(46570);const i=s.iv`
59
+ [part='label'] {
60
+ align-self: flex-start;
61
+ color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
62
+ font-weight: var(--vaadin-input-field-label-font-weight, 500);
63
+ font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
64
+ margin-left: calc(var(--lumo-border-radius-m) / 4);
65
+ transition: color 0.2s;
66
+ line-height: 1;
67
+ padding-right: 1em;
68
+ padding-bottom: 0.5em;
69
+ /* As a workaround for diacritics being cut off, add a top padding and a
70
+ negative margin to compensate */
71
+ padding-top: 0.25em;
72
+ margin-top: -0.25em;
73
+ overflow: hidden;
74
+ white-space: nowrap;
75
+ text-overflow: ellipsis;
76
+ position: relative;
77
+ max-width: 100%;
78
+ box-sizing: border-box;
79
+ }
80
+
81
+ :host([focused]:not([readonly])) [part='label'] {
82
+ color: var(--vaadin-input-field-focused-label-color, var(--lumo-primary-text-color));
83
+ }
84
+
85
+ :host(:hover:not([readonly]):not([focused])) [part='label'] {
86
+ color: var(--vaadin-input-field-hovered-label-color, var(--lumo-body-text-color));
87
+ }
88
+
89
+ /* Touch device adjustment */
90
+ @media (pointer: coarse) {
91
+ :host(:hover:not([readonly]):not([focused])) [part='label'] {
92
+ color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
93
+ }
94
+ }
95
+
96
+ :host([has-label])::before {
97
+ margin-top: calc(var(--lumo-font-size-s) * 1.5);
98
+ }
99
+
100
+ :host([has-label][theme~='small'])::before {
101
+ margin-top: calc(var(--lumo-font-size-xs) * 1.5);
102
+ }
103
+
104
+ :host([has-label]) {
105
+ padding-top: var(--lumo-space-m);
106
+ }
107
+
108
+ :host([has-label]) ::slotted([slot='tooltip']) {
109
+ --vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);
110
+ }
111
+
112
+ :host([required]) [part='required-indicator']::after {
113
+ content: var(--lumo-required-field-indicator, '\\2022');
114
+ transition: opacity 0.2s;
115
+ color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
116
+ position: absolute;
117
+ right: 0;
118
+ width: 1em;
119
+ text-align: center;
120
+ }
121
+
122
+ :host([invalid]) [part='required-indicator']::after {
123
+ color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
124
+ }
125
+
126
+ [part='error-message'] {
127
+ margin-left: calc(var(--lumo-border-radius-m) / 4);
128
+ font-size: var(--vaadin-input-field-error-font-size, var(--lumo-font-size-xs));
129
+ line-height: var(--lumo-line-height-xs);
130
+ font-weight: var(--vaadin-input-field-error-font-weight, 400);
131
+ color: var(--vaadin-input-field-error-color, var(--lumo-error-text-color));
132
+ will-change: max-height;
133
+ transition: 0.4s max-height;
134
+ max-height: 5em;
135
+ }
136
+
137
+ :host([has-error-message]) [part='error-message']::before,
138
+ :host([has-error-message]) [part='error-message']::after {
139
+ content: '';
140
+ display: block;
141
+ height: 0.4em;
142
+ }
143
+
144
+ :host(:not([invalid])) [part='error-message'] {
145
+ max-height: 0;
146
+ overflow: hidden;
147
+ }
148
+
149
+ /* RTL specific styles */
150
+
151
+ :host([dir='rtl']) [part='label'] {
152
+ margin-left: 0;
153
+ margin-right: calc(var(--lumo-border-radius-m) / 4);
154
+ }
155
+
156
+ :host([dir='rtl']) [part='label'] {
157
+ padding-left: 1em;
158
+ padding-right: 0;
159
+ }
160
+
161
+ :host([dir='rtl']) [part='required-indicator']::after {
162
+ right: auto;
163
+ left: 0;
164
+ }
165
+
166
+ :host([dir='rtl']) [part='error-message'] {
167
+ margin-left: 0;
168
+ margin-right: calc(var(--lumo-border-radius-m) / 4);
169
+ }
170
+ `;(0,s.hC)("",i,{moduleId:"lumo-required-field"})}}]);
@@ -10,12 +10,6 @@
10
10
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
11
11
  */
12
12
 
13
- /**
14
- * @license
15
- * Copyright (c) 2021 - 2023 Vaadin Ltd..
16
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
17
- */
18
-
19
13
  /**
20
14
  * @license
21
15
  * Copyright (c) 2022 - 2023 Vaadin Ltd.
package/dist/umd/6770.js CHANGED
@@ -49,7 +49,7 @@
49
49
  [part='input-field'] ::slotted(vaadin-icon) {
50
50
  margin-top: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2);
51
51
  }
52
- `;(0,n.hC)("vaadin-text-area",[a.J,r],{moduleId:"lumo-text-area"}),i(13553);var o=i(74241),s=i(52807),l=i(12521),d=i(34463),p=i(62743),u=i(29680),h=i(20422),c=i(46729),v=i(9229);class m extends v.n{constructor(t,e){super(t,"textarea","textarea",{initializer:(t,i)=>{const a=i.getAttribute("value");a&&(t.value=a);const n=i.getAttribute("name");n&&t.setAttribute("name",n),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}const g=t=>class extends((0,u.F)((0,h.j)(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"]}get clearElement(){return this.$.clearButton}_onResize(){this._updateHeight(),this.__scrollPositionUpdated()}_onScroll(){this.__scrollPositionUpdated()}ready(){super.ready(),this.addController(new m(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new c.v(this.inputElement,this._labelController)),this.addEventListener("animationend",this._onAnimationEnd),this._inputField=this.shadowRoot.querySelector("[part=input-field]"),this._inputField.addEventListener("wheel",(t=>{const e=this._inputField.scrollTop;this._inputField.scrollTop+=t.deltaY,e!==this._inputField.scrollTop&&(t.preventDefault(),this.__scrollPositionUpdated())})),this._updateHeight(),this.__scrollPositionUpdated()}__scrollPositionUpdated(){this._inputField.style.setProperty("--_text-area-vertical-scroll-position","0px"),this._inputField.style.setProperty("--_text-area-vertical-scroll-position",`${this._inputField.scrollTop}px`)}_onAnimationEnd(t){0===t.animationName.indexOf("vaadin-text-area-appear")&&this._updateHeight()}_valueChanged(t,e){super._valueChanged(t,e),this._updateHeight()}_updateHeight(){const t=this.inputElement,e=this._inputField;if(!t||!e)return;const i=e.scrollTop,a=this.value?this.value.length:0;if(this._oldValueLength>=a){const i=getComputedStyle(e).height,a=getComputedStyle(t).width;e.style.display="block",e.style.height=i,t.style.maxWidth=a,t.style.height="auto"}this._oldValueLength=a;const n=t.scrollHeight;n>t.clientHeight&&(t.style.height=`${n}px`),t.style.removeProperty("max-width"),e.style.removeProperty("display"),e.style.removeProperty("height"),e.scrollTop=i}checkValidity(){if(!super.checkValidity())return!1;if(!this.pattern||!this.inputElement.value)return!0;try{const t=this.inputElement.value.match(this.pattern);return!!t&&t[0]===t.input}catch(t){return!0}}},_=i(9392).iv`
52
+ `;(0,n.hC)("vaadin-text-area",[a.J,r],{moduleId:"lumo-text-area"}),i(13553);var o=i(74241),s=i(52807),l=i(12521),d=i(34463),p=i(62743),u=i(29680),h=i(20422),c=i(46729),v=i(78591);class m extends v.n{constructor(t,e){super(t,"textarea","textarea",{initializer:(t,i)=>{const a=i.getAttribute("value");a&&(t.value=a);const n=i.getAttribute("name");n&&t.setAttribute("name",n),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}const g=t=>class extends((0,u.F)((0,h.j)(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"]}get clearElement(){return this.$.clearButton}_onResize(){this._updateHeight(),this.__scrollPositionUpdated()}_onScroll(){this.__scrollPositionUpdated()}ready(){super.ready(),this.addController(new m(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new c.v(this.inputElement,this._labelController)),this.addEventListener("animationend",this._onAnimationEnd),this._inputField=this.shadowRoot.querySelector("[part=input-field]"),this._inputField.addEventListener("wheel",(t=>{const e=this._inputField.scrollTop;this._inputField.scrollTop+=t.deltaY,e!==this._inputField.scrollTop&&(t.preventDefault(),this.__scrollPositionUpdated())})),this._updateHeight(),this.__scrollPositionUpdated()}__scrollPositionUpdated(){this._inputField.style.setProperty("--_text-area-vertical-scroll-position","0px"),this._inputField.style.setProperty("--_text-area-vertical-scroll-position",`${this._inputField.scrollTop}px`)}_onAnimationEnd(t){0===t.animationName.indexOf("vaadin-text-area-appear")&&this._updateHeight()}_valueChanged(t,e){super._valueChanged(t,e),this._updateHeight()}_updateHeight(){const t=this.inputElement,e=this._inputField;if(!t||!e)return;const i=e.scrollTop,a=this.value?this.value.length:0;if(this._oldValueLength>=a){const i=getComputedStyle(e).height,a=getComputedStyle(t).width;e.style.display="block",e.style.height=i,t.style.maxWidth=a,t.style.height="auto"}this._oldValueLength=a;const n=t.scrollHeight;n>t.clientHeight&&(t.style.height=`${n}px`),t.style.removeProperty("max-width"),e.style.removeProperty("display"),e.style.removeProperty("height"),e.scrollTop=i}checkValidity(){if(!super.checkValidity())return!1;if(!this.pattern||!this.inputElement.value)return!0;try{const t=this.inputElement.value.match(this.pattern);return!!t&&t[0]===t.input}catch(t){return!0}}},_=i(9392).iv`
53
53
  :host {
54
54
  animation: 1ms vaadin-text-area-appear;
55
55
  }
package/dist/umd/7056.js CHANGED
@@ -335,7 +335,7 @@
335
335
  margin-left: 0;
336
336
  margin-right: 0;
337
337
  }
338
- `;(0,r.hC)("vaadin-button",a,{moduleId:"lumo-button"})},73208:(t,e,o)=>{o.d(e,{b:()=>a});var r=o(9229);class a extends r.n{constructor(t,e){super(t,"input","input",{initializer:(t,o)=>{o.value&&(t.value=o.value),o.type&&t.setAttribute("type",o.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},20422:(t,e,o)=>{o.d(e,{j:()=>a});var r=o(73406);const a=t=>class extends((0,r.L)(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()}}},17056:(t,e,o)=>{o(58725);var r=o(74750),a=o(46570);const i=a.iv`
338
+ `;(0,r.hC)("vaadin-button",a,{moduleId:"lumo-button"})},73208:(t,e,o)=>{o.d(e,{b:()=>a});var r=o(78591);class a extends r.n{constructor(t,e){super(t,"input","input",{initializer:(t,o)=>{o.value&&(t.value=o.value),o.type&&t.setAttribute("type",o.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},20422:(t,e,o)=>{o.d(e,{j:()=>a});var r=o(73406);const a=t=>class extends((0,r.L)(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()}}},17056:(t,e,o)=>{o(58725);var r=o(74750),a=o(46570);const i=a.iv`
339
339
  :host {
340
340
  position: absolute;
341
341
  right: 0;
@@ -377,7 +377,7 @@
377
377
  }
378
378
  </style>
379
379
  <slot name="tooltip"></slot>
380
- `}}(0,u.M)(h);var c=o(91121),p=o(9229),v=o(18005);const m=c.d`
380
+ `}}(0,u.M)(h);var c=o(91121),p=o(78591),v=o(18005);const m=c.d`
381
381
  <div part="reveal-button" slot="suffix">
382
382
  <slot name="reveal"></slot>
383
383
  </div>