@descope/web-components-ui 1.0.295 → 1.0.297
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +586 -359
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +569 -341
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1224.js +1 -1
- package/dist/umd/1438.js +16 -9
- package/dist/umd/1438.js.LICENSE.txt +12 -0
- package/dist/umd/1612.js +338 -0
- package/dist/umd/1621.js +2 -2
- package/dist/umd/2362.js +129 -0
- package/dist/umd/3830.js +2 -0
- package/dist/umd/{3003.js.LICENSE.txt → 3830.js.LICENSE.txt} +12 -0
- package/dist/umd/3951.js +116 -4
- package/dist/umd/3951.js.LICENSE.txt +18 -0
- package/dist/umd/{9211.js → 4024.js} +5 -5
- package/dist/umd/{2775.js → 4028.js} +10 -10
- package/dist/umd/4028.js.LICENSE.txt +23 -0
- package/dist/umd/4052.js +338 -0
- package/dist/umd/4392.js +1 -0
- package/dist/umd/4569.js +1 -0
- package/dist/umd/4746.js +124 -0
- package/dist/umd/{6091.js.LICENSE.txt → 4746.js.LICENSE.txt} +6 -0
- package/dist/umd/4978.js +1 -0
- package/dist/umd/{4595.js → 5135.js} +93 -5
- package/dist/umd/{2775.js.LICENSE.txt → 5135.js.LICENSE.txt} +2 -2
- package/dist/umd/5517.js +1 -1
- package/dist/umd/5806.js +4 -4
- package/dist/umd/5910.js +1 -1
- package/dist/umd/63.js +147 -1
- package/dist/umd/63.js.LICENSE.txt +13 -1
- package/dist/umd/6594.js +2 -0
- package/dist/umd/{1940.js.LICENSE.txt → 6594.js.LICENSE.txt} +1 -1
- package/dist/umd/6770.js +4 -4
- package/dist/umd/7056.js +376 -5
- package/dist/umd/7056.js.LICENSE.txt +6 -0
- package/dist/umd/7164.js +148 -0
- package/dist/umd/{2106.js.LICENSE.txt → 7164.js.LICENSE.txt} +1 -7
- package/dist/umd/7531.js +2 -2
- package/dist/umd/7911.js +4 -4
- package/dist/umd/7911.js.LICENSE.txt +6 -0
- package/dist/umd/{3092.js → 8191.js} +40 -5
- package/dist/umd/8866.js +97 -5
- package/dist/umd/8866.js.LICENSE.txt +12 -0
- package/dist/umd/9092.js +440 -12
- package/dist/umd/9092.js.LICENSE.txt +6 -0
- package/dist/umd/{1940.js → 9314.js} +126 -7
- package/dist/umd/9314.js.LICENSE.txt +11 -0
- package/dist/umd/9423.js +608 -0
- package/dist/umd/9423.js.LICENSE.txt +23 -0
- package/dist/umd/9562.js +338 -0
- package/dist/umd/9562.js.LICENSE.txt +11 -0
- package/dist/umd/DescopeDev.js +1 -0
- package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js +2 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +2 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-internal-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-internal-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
- package/dist/umd/descope-avatar-index-js.js +1 -1
- package/dist/umd/descope-badge-index-js.js +1 -1
- package/dist/umd/descope-button-index-js.js +338 -1
- package/dist/umd/descope-button-index-js.js.LICENSE.txt +11 -0
- package/dist/umd/descope-combo-box-index-js.js +113 -1
- package/dist/umd/descope-container-index-js.js +1 -1
- package/dist/umd/descope-date-picker-index-js.js +1 -1
- package/dist/umd/descope-divider-index-js.js +1 -1
- package/dist/umd/descope-email-field-index-js.js +54 -1
- package/dist/umd/descope-email-field-index-js.js.LICENSE.txt +11 -0
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +90 -1
- package/dist/umd/{1735.js.LICENSE.txt → descope-grid-descope-grid-custom-column-index-js.js.LICENSE.txt} +2 -2
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +2 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.LICENSE.txt +17 -0
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +90 -1
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.LICENSE.txt +17 -0
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/dist/umd/descope-image-index-js.js +1 -1
- package/dist/umd/descope-link-index-js.js +1 -1
- package/dist/umd/descope-loader-linear-index-js.js +1 -1
- package/dist/umd/descope-loader-radial-index-js.js +1 -1
- package/dist/umd/descope-logo-index-js.js +1 -1
- package/dist/umd/descope-modal-index-js.js +1 -1
- package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-notification-descope-notification-card-index-js.js +1 -1
- package/dist/umd/descope-notification-index-js.js +1 -1
- package/dist/umd/descope-notp-image-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js +37 -1
- package/dist/umd/descope-passcode-index-js.js.LICENSE.txt +11 -0
- package/dist/umd/descope-password-index-js.js +1 -1
- package/dist/umd/descope-policy-validation-index-js.js +1 -1
- package/dist/umd/descope-recaptcha-index-js.js +1 -1
- package/dist/umd/descope-text-area-index-js.js +1 -1
- package/dist/umd/descope-text-field-index-js.js +37 -1
- package/dist/umd/descope-text-field-index-js.js.LICENSE.txt +11 -0
- package/dist/umd/descope-totp-image-index-js.js +1 -1
- package/dist/umd/descope-upload-file-index-js.js +1 -1
- package/dist/umd/descope-user-attribute-index-js.js +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -126
- package/dist/umd/mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +37 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.LICENSE.txt +11 -0
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/dist/umd/text-components-descope-markdown-content-index-js.js +1 -0
- package/dist/umd/text-components-descope-text-index-js.js +1 -0
- package/package.json +4 -2
- package/src/components/descope-divider/DividerClass.js +1 -1
- package/src/components/descope-divider/index.js +1 -1
- package/src/components/descope-link/LinkClass.js +1 -1
- package/src/components/descope-link/index.js +1 -1
- package/src/components/descope-user-attribute/UserAttributeClass.js +1 -1
- package/src/components/descope-user-attribute/index.js +1 -1
- package/src/components/descope-user-auth-method/UserAuthMethodClass.js +3 -2
- package/src/components/descope-user-auth-method/index.js +1 -1
- package/src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js +1 -1
- package/src/components/mapping-fields/descope-mappings-field/index.js +1 -1
- package/src/components/text-components/createBaseTextClass.js +26 -0
- package/src/components/text-components/descope-markdown-content/MarkdownContentClass.js +98 -0
- package/src/components/text-components/descope-markdown-content/helpers.js +41 -0
- package/src/components/text-components/descope-markdown-content/index.js +5 -0
- package/src/components/text-components/descope-text/TextClass.js +34 -0
- package/src/components/text-components/hideWhenEmptyMixin.js +17 -0
- package/src/dev/index.js +1 -0
- package/src/index.cjs.js +2 -1
- package/src/index.d.ts +2 -1
- package/src/index.js +2 -1
- package/src/mixins/normalizeBooleanAttributesMixin.js +1 -1
- package/src/theme/components/index.js +2 -0
- package/src/theme/components/markdownContent.js +84 -0
- package/src/theme/components/text.js +1 -1
- package/dist/umd/1000.js +0 -1
- package/dist/umd/1037.js +0 -2
- package/dist/umd/1721.js +0 -1
- package/dist/umd/1735.js +0 -73
- package/dist/umd/2066.js +0 -2
- package/dist/umd/2106.js +0 -73
- package/dist/umd/2269.js +0 -2
- package/dist/umd/2269.js.LICENSE.txt +0 -5
- package/dist/umd/2481.js +0 -1
- package/dist/umd/262.js +0 -2
- package/dist/umd/262.js.LICENSE.txt +0 -5
- package/dist/umd/3003.js +0 -2
- package/dist/umd/3208.js +0 -2
- package/dist/umd/3208.js.LICENSE.txt +0 -5
- package/dist/umd/322.js +0 -90
- package/dist/umd/322.js.LICENSE.txt +0 -5
- package/dist/umd/3249.js +0 -2
- package/dist/umd/3249.js.LICENSE.txt +0 -5
- package/dist/umd/3373.js +0 -2
- package/dist/umd/3373.js.LICENSE.txt +0 -5
- package/dist/umd/3585.js +0 -1
- package/dist/umd/3878.js +0 -1
- package/dist/umd/4201.js +0 -1
- package/dist/umd/422.js +0 -2
- package/dist/umd/422.js.LICENSE.txt +0 -5
- package/dist/umd/4226.js +0 -114
- package/dist/umd/4447.js +0 -1
- package/dist/umd/4567.js +0 -1
- package/dist/umd/4577.js +0 -1
- package/dist/umd/4595.js.LICENSE.txt +0 -11
- package/dist/umd/4803.js +0 -1
- package/dist/umd/4905.js +0 -2
- package/dist/umd/4905.js.LICENSE.txt +0 -5
- package/dist/umd/4946.js +0 -2
- package/dist/umd/4946.js.LICENSE.txt +0 -5
- package/dist/umd/6091.js +0 -124
- package/dist/umd/6606.js +0 -17
- package/dist/umd/6687.js +0 -9
- package/dist/umd/6687.js.LICENSE.txt +0 -5
- package/dist/umd/6977.js +0 -2
- package/dist/umd/6977.js.LICENSE.txt +0 -5
- package/dist/umd/7044.js +0 -1
- package/dist/umd/7583.js +0 -113
- package/dist/umd/8623.js +0 -2
- package/dist/umd/8623.js.LICENSE.txt +0 -5
- package/dist/umd/8725.js +0 -37
- package/dist/umd/9189.js +0 -2
- package/dist/umd/9189.js.LICENSE.txt +0 -5
- package/dist/umd/9211.js.LICENSE.txt +0 -5
- package/dist/umd/9214.js +0 -1
- package/dist/umd/9320.js +0 -2
- package/dist/umd/9320.js.LICENSE.txt +0 -5
- package/dist/umd/9383.js +0 -94
- package/dist/umd/9434.js +0 -1
- package/dist/umd/9437.js +0 -19
- package/dist/umd/9437.js.LICENSE.txt +0 -5
- package/dist/umd/9680.js +0 -2
- package/dist/umd/9680.js.LICENSE.txt +0 -5
- package/dist/umd/9789.js +0 -1
- package/dist/umd/descope-text-index-js.js +0 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.LICENSE.txt +0 -5
- package/src/components/descope-text/TextClass.js +0 -67
- /package/dist/umd/{3092.js.LICENSE.txt → 1612.js.LICENSE.txt} +0 -0
- /package/dist/umd/{6606.js.LICENSE.txt → 2362.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4226.js.LICENSE.txt → 4024.js.LICENSE.txt} +0 -0
- /package/dist/umd/{8725.js.LICENSE.txt → 4052.js.LICENSE.txt} +0 -0
- /package/dist/umd/{9383.js.LICENSE.txt → 8191.js.LICENSE.txt} +0 -0
- /package/dist/umd/{1037.js.LICENSE.txt → boolean-fields-descope-checkbox-index-js.js.LICENSE.txt} +0 -0
- /package/dist/umd/{2066.js.LICENSE.txt → boolean-fields-descope-switch-toggle-index-js.js.LICENSE.txt} +0 -0
- /package/dist/umd/{7583.js.LICENSE.txt → descope-combo-box-index-js.js.LICENSE.txt} +0 -0
- /package/src/components/{descope-text → text-components/descope-text}/index.js +0 -0
package/dist/umd/1224.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 1224.js.LICENSE.txt */
|
2
|
-
"use strict";(self.
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1224],{1224:(t,e,n)=>{n.d(e,{D:()=>c});var o=n(9109),s=n(5229),i=n(2628);const c=t=>class extends((0,s.f)((0,i.L)(t))){get _activeKeys(){return[" "]}ready(){super.ready(),(0,o.NH)(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),(0,o.NH)(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}},9109:(t,e,n)=>{n.d(e,{BP:()=>D,NH:()=>M});var o=n(7913);const s=!1,i=t=>t,c="string"==typeof document.head.style.touchAction,u="__polymerGestures",r="__polymerGesturesHandled",a="__polymerGesturesTouchAction",h=["mousedown","mousemove","mouseup","click"],d=[0,1,4,2],f=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function l(t){return h.indexOf(t)>-1}let m=!1;function p(t){if(!l(t)&&"touchend"!==t)return c&&m&&s?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){m=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const v=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),y={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function w(t){const e=t.type;if(!l(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!f&&(e=d[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const g={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function b(t,e,n){t.movefn=e,t.upfn=n,document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)}function _(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const x=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],k={},E=[];function A(t){const e=x(t);return e.length>0?e[0]:t.target}function N(t){const e=t.type,n=t.currentTarget[u];if(!n)return;const o=n[e];if(!o)return;if(!t[r]&&(t[r]={},e.startsWith("touch"))){const n=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(g.touch.id=n.identifier),g.touch.id!==n.identifier)return;c||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],n=t.type;if("touchstart"===n)g.touch.x=e.clientX,g.touch.y=e.clientY,g.touch.scrollDecided=!1;else if("touchmove"===n){if(g.touch.scrollDecided)return;g.touch.scrollDecided=!0;const n=function(t){let e="auto";const n=x(t);for(let t,o=0;o<n.length;o++)if(t=n[o],t[a]){e=t[a];break}return e}(t);let o=!1;const s=Math.abs(g.touch.x-e.clientX),i=Math.abs(g.touch.y-e.clientY);t.cancelable&&("none"===n?o=!0:"pan-x"===n?o=i>s:"pan-y"===n&&(o=s>i)),o?t.preventDefault():X("track")}}(t)}const s=t[r];if(!s.skip){for(let e,n=0;n<E.length;n++)e=E[n],o[e.name]&&!s[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let n,i=0;i<E.length;i++)n=E[i],o[n.name]&&!s[n.name]&&(s[n.name]=!0,n[e](t))}}function M(t,e,n){return!!k[e]&&(function(t,e,n){const o=k[e],s=o.deps,i=o.name;let c=t[u];c||(t[u]=c={});for(let e,n,o=0;o<s.length;o++)e=s[o],v&&l(e)&&"click"!==e||(n=c[e],n||(c[e]=n={_count:0}),0===n._count&&t.addEventListener(e,N,p(e)),n[i]=(n[i]||0)+1,n._count=(n._count||0)+1);t.addEventListener(e,n),o.touchAction&&D(t,o.touchAction)}(t,e,n),!0)}function Y(t){E.push(t),t.emits.forEach((e=>{k[e]=t}))}function D(t,e){c&&t instanceof HTMLElement&&o.YA.run((()=>{t.style.touchAction=e})),t[a]=e}function T(t,e,n){const o=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(o.detail=n,i(t).dispatchEvent(o),o.defaultPrevented){const t=n.preventer||n.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function X(t){const e=function(t){for(let e,n=0;n<E.length;n++){e=E[n];for(let n,o=0;o<e.emits.length;o++)if(n=e.emits[o],n===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function L(t,e,n,o){e&&T(e,t,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:o,prevent:t=>X(t)})}function P(t,e,n){if(t.prevent)return!1;if(t.started)return!0;const o=Math.abs(t.x-e),s=Math.abs(t.y-n);return o>=5||s>=5}function O(t,e,n){if(!e)return;const o=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1],i=s.x-t.x,c=s.y-t.y;let u,r=0;o&&(u=s.x-o.x,r=s.y-o.y),T(e,"track",{state:t.state,x:n.clientX,y:n.clientY,dx:i,dy:c,ddx:u,ddy:r,sourceEvent:n,hover:()=>function(t,e){let n=document.elementFromPoint(t,e),o=n;for(;o&&o.shadowRoot&&!window.ShadyDOM;){const s=o;if(o=o.shadowRoot.elementFromPoint(t,e),s===o)break;o&&(n=o)}return n}(n.clientX,n.clientY)})}function S(t,e,n){const o=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y),i=A(n||e);!i||y[i.localName]&&i.hasAttribute("disabled")||(isNaN(o)||isNaN(s)||o<=25&&s<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=A(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const n=e.getBoundingClientRect(),o=t.pageX,s=t.pageY;return!(o>=n.left&&o<=n.right&&s>=n.top&&s<=n.bottom)}return!1}(e))&&(t.prevent||T(i,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:n}))}Y({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){_(this.info)},mousedown(t){if(!w(t))return;const e=A(t),n=this;b(this.info,(t=>{w(t)||(L("up",e,t),_(n.info))}),(t=>{w(t)&&L("up",e,t),_(n.info)})),L("down",e,t)},touchstart(t){L("down",A(t),t.changedTouches[0],t)},touchend(t){L("up",A(t),t.changedTouches[0],t)}}),Y({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,_(this.info)},mousedown(t){if(!w(t))return;const e=A(t),n=this,o=t=>{const o=t.clientX,s=t.clientY;P(n.info,o,s)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&X("tap"),n.info.addMove({x:o,y:s}),w(t)||(n.info.state="end",_(n.info)),e&&O(n.info,e,t),n.info.started=!0)};b(this.info,o,(t=>{n.info.started&&o(t),_(n.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=A(t),n=t.changedTouches[0],o=n.clientX,s=n.clientY;P(this.info,o,s)&&("start"===this.info.state&&X("tap"),this.info.addMove({x:o,y:s}),O(this.info,e,n),this.info.state="track",this.info.started=!0)},touchend(t){const e=A(t),n=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),O(this.info,e,n))}}),Y({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){w(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){w(t)&&S(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){S(this.info,t.changedTouches[0],t)}})}}]);
|
package/dist/umd/1438.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! For license information please see 1438.js.LICENSE.txt */
|
2
|
-
"use strict";(self.
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1438],{63:(e,t,o)=>{o.d(t,{x:()=>r});var i=o(7913),s=o(6139);const l=document.createElement("div");let a;function r(e,t={}){const o=t.mode||"polite",r=void 0===t.timeout?150:t.timeout;"alert"===o?(l.removeAttribute("aria-live"),l.removeAttribute("role"),a=s.dx.debounce(a,i.rs,(()=>{l.setAttribute("role","alert")}))):(a&&a.cancel(),l.removeAttribute("role"),l.setAttribute("aria-live",o)),l.textContent="",setTimeout((()=>{l.textContent=e}),r)}l.style.position="fixed",l.style.clip="rect(0px, 0px, 0px, 0px)",l.setAttribute("aria-live","polite"),document.body.appendChild(l)},9680:(e,t,o)=>{o.d(t,{F:()=>l});var i=o(1014);const s=new ResizeObserver((e=>{setTimeout((()=>{e.forEach((e=>{e.target.resizables?e.target.resizables.forEach((t=>{t._onResize(e.contentRect)})):e.target._onResize(e.contentRect)}))}))})),l=(0,i.o)((e=>class extends e{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),s.observe(this),this._observeParent){const e=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;e.resizables||(e.resizables=new Set,s.observe(e)),e.resizables.add(this),this.__parent=e}}disconnectedCallback(){super.disconnectedCallback(),s.unobserve(this);const e=this.__parent;if(this._observeParent&&e){const t=e.resizables;t&&(t.delete(this),0===t.size&&s.unobserve(e)),this.__parent=null}}_onResize(e){}}))},1438:(e,t,o)=>{o(6687),o(1195),o(1735),o(9416),o(9849),o(4173);var i=o(4398),s=o(6570);const l=s.iv`
|
3
3
|
:host {
|
4
4
|
font-size: var(--lumo-font-size-xxs);
|
5
5
|
line-height: 1;
|
@@ -84,7 +84,7 @@
|
|
84
84
|
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
85
85
|
pointer-events: none;
|
86
86
|
}
|
87
|
-
`;(0,s.hC)("vaadin-multi-select-combo-box-chip",[i.q,l],{moduleId:"lumo-multi-select-combo-box-chip"}),o(1578);var a=o(8900),r=o(3891),n=o(7026),d=o(7205),c=o(
|
87
|
+
`;(0,s.hC)("vaadin-multi-select-combo-box-chip",[i.q,l],{moduleId:"lumo-multi-select-combo-box-chip"}),o(1578);var a=o(8900),r=o(3891),n=o(7026),d=o(7205),c=o(3985),h=o(6754),u=o(510);const p=s.iv`
|
88
88
|
@media (any-hover: hover) {
|
89
89
|
:host(:hover[readonly]) {
|
90
90
|
background-color: transparent;
|
@@ -192,7 +192,7 @@
|
|
192
192
|
:host([auto-expand-vertically]) #wrapper {
|
193
193
|
flex-wrap: wrap;
|
194
194
|
}
|
195
|
-
`,{moduleId:"vaadin-multi-select-combo-box-container-styles"});class y extends f.f{static get is(){return"vaadin-multi-select-combo-box-container"}static get template(){if(!g){g=super.template.cloneNode(!0);const e=g.content,t=e.querySelectorAll("slot"),o=document.createElement("div");o.setAttribute("id","wrapper"),e.insertBefore(o,t[2]),o.appendChild(t[0]),o.appendChild(t[1])}return g}static get properties(){return{autoExpandVertically:{type:Boolean,reflectToAttribute:!0}}}}(0,b.M)(y);var x=o(5115),
|
195
|
+
`,{moduleId:"vaadin-multi-select-combo-box-container-styles"});class y extends f.f{static get is(){return"vaadin-multi-select-combo-box-container"}static get template(){if(!g){g=super.template.cloneNode(!0);const e=g.content,t=e.querySelectorAll("slot"),o=document.createElement("div");o.setAttribute("id","wrapper"),e.insertBefore(o,t[2]),o.appendChild(t[0]),o.appendChild(t[1])}return g}static get properties(){return{autoExpandVertically:{type:Boolean,reflectToAttribute:!0}}}}(0,b.M)(y);var x=o(5115),C=o(1914);class w extends((0,x.O)((0,s.Tb)((0,C.U)(v.H3)))){static get is(){return"vaadin-multi-select-combo-box-item"}static get template(){return v.dy`
|
196
196
|
<style>
|
197
197
|
:host {
|
198
198
|
display: block;
|
@@ -206,7 +206,7 @@
|
|
206
206
|
<div part="content">
|
207
207
|
<slot></slot>
|
208
208
|
</div>
|
209
|
-
`}}(0,b.M)(w);var
|
209
|
+
`}}(0,b.M)(w);var I=o(3515),A=o(3423);let E;(0,s.hC)("vaadin-multi-select-combo-box-overlay",s.iv`
|
210
210
|
#overlay {
|
211
211
|
width: var(
|
212
212
|
--vaadin-multi-select-combo-box-overlay-width,
|
@@ -219,7 +219,7 @@
|
|
219
219
|
flex-direction: column;
|
220
220
|
height: 100%;
|
221
221
|
}
|
222
|
-
`,{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class
|
222
|
+
`,{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class S extends((0,I.H)(A.a)){static get is(){return"vaadin-multi-select-combo-box-overlay"}static get template(){if(!E){E=super.template.cloneNode(!0);const e=E.content.querySelector('[part~="overlay"]');e.removeAttribute("tabindex");const t=document.createElement("div");t.setAttribute("part","loader"),e.insertBefore(t,e.firstElementChild)}return E}}(0,b.M)(S);var B=o(4843),k=o(1502);class z extends((0,k.t)(v.H3)){static get is(){return"vaadin-multi-select-combo-box-scroller"}static get template(){return v.dy`
|
223
223
|
<style>
|
224
224
|
:host {
|
225
225
|
display: block;
|
@@ -246,7 +246,7 @@
|
|
246
246
|
<div id="selector">
|
247
247
|
<slot></slot>
|
248
248
|
</div>
|
249
|
-
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(e,t,o){return!(e instanceof
|
249
|
+
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(e,t,o){return!(e instanceof B.h)&&!this.owner.readonly&&this.owner._findIndex(e,this.owner.selectedItems,o)>-1}_updateElement(e,t){super._updateElement(e,t),e.toggleAttribute("readonly",this.owner.readonly)}}(0,b.M)(z);var $=o(9031),P=o(2589);class V extends((0,$.Y)((0,P.t)((0,s.Tb)(v.H3)))){static get is(){return"vaadin-multi-select-combo-box-internal"}static get template(){return v.dy`
|
250
250
|
<style>
|
251
251
|
:host([opened]) {
|
252
252
|
pointer-events: auto;
|
@@ -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
|
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(63),T=o(2521),O=o(9680),L=o(9229),R=o(262),D=o(4463),q=o(3406),G=o(3208),W=o(6729),H=o(2743);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);
|
@@ -302,7 +302,7 @@
|
|
302
302
|
:host([auto-expand-horizontally]) [class$='container'] {
|
303
303
|
width: auto;
|
304
304
|
}
|
305
|
-
`;(0,s.hC)("vaadin-multi-select-combo-box",[H.J,
|
305
|
+
`;(0,s.hC)("vaadin-multi-select-combo-box",[H.J,N],{moduleId:"vaadin-multi-select-combo-box-styles"});class M extends((0,O.F)((0,q.L)((0,s.Tb)((0,T.S)(v.H3))))){static get is(){return"vaadin-multi-select-combo-box"}static get template(){return v.dy`
|
306
306
|
<div class="vaadin-multi-select-combo-box-container">
|
307
307
|
<div part="label">
|
308
308
|
<slot name="label"></slot>
|
@@ -371,4 +371,11 @@
|
|
371
371
|
</div>
|
372
372
|
|
373
373
|
<slot name="tooltip"></slot>
|
374
|
-
`}static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged"},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged"},autoOpenDisabled:Boolean,clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1},items:{type:Array},itemLabelPath:{type:String,value:"label"},itemValuePath:{type:String,value:"value"},itemIdPath:{type:String},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},loading:{type:Boolean,value:!1,reflectToAttribute:!0},overlayClass:{type:String},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0},selectedItems:{type:Array,value:()=>[],notify:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},size:{type:Number},pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,value:"",observer:"_placeholderChanged"},renderer:Function,filter:{type:String,value:"",notify:!0},filteredItems:Array,selectedItemsOnTop:{type:Boolean,value:!1},value:{type:String},__effectiveItems:{type:Array,computed:"__computeEffectiveItems(items, selectedItems, readonly)"},__effectiveFilteredItems:{type:Array,computed:"__computeEffectiveFilteredItems(items, filteredItems, selectedItems, readonly)"},_overflowItems:{type:Array,value:()=>[]},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String},_topGroup:{type:Array}}}static get observers(){return["_selectedItemsChanged(selectedItems, selectedItems.*)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){const e=this.localName;return[...super.slotStyles,`\n ${e}[has-value] input::placeholder {\n color: transparent !important;\n forced-color-adjust: none;\n }\n `]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new W.b(this,(e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e}))),this.addController(new R.v(this.inputElement,this._labelController)),this._tooltipController=new q.f(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((e=>!e.opened)),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new O.n(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:e=>{e.addEventListener("mousedown",(e=>this._preventBlur(e))),this._overflow=e}}),this.addController(this._overflowController),this.__updateChips(),(0,D.k)(this)}checkValidity(){return!(this.required&&!this.readonly)||this._hasValue}clear(){this.__updateSelection([]),(0,T.x)(this.i18n.cleared)}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache()}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate()}_disabledChanged(e,t){super._disabledChanged(e,t),(e||t)&&this.__updateChips()}_inputElementChanged(e){super._inputElementChanged(e),e&&this.$.comboBox._setInputElement(e)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate())}_onResize(){this.__updateChips()}_delegateAttribute(e,t){this.stateTarget&&("required"!==e?super._delegateAttribute(e,t):this._delegateAttribute("aria-required",!!t&&"true"))}_autoExpandHorizontallyChanged(e,t){(e||t)&&this.__updateChips()}_autoExpandVerticallyChanged(e,t){(e||t)&&this.__updateChips()}_clearButtonVisibleChanged(e,t){(e||t)&&this.__updateChips()}_onFilteredItemsChanged(e){const{value:t}=e.detail;(Array.isArray(t)||null==t)&&(this.filteredItems=t)}_readonlyChanged(e,t){(e||t)&&this.__updateChips(),this.dataProvider&&this.clearCache()}_pageSizeChanged(e,t){(Math.floor(e)!==e||e<=0)&&(this.pageSize=t,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize}_placeholderChanged(e){const t=this.__tmpA11yPlaceholder;t!==e&&(this.__savedPlaceholder=e,t&&(this.placeholder=t))}_selectedItemsChanged(e){if(this._toggleHasValue(this._hasValue),this._hasValue){const t=this._mergeItemLabels(e);this.__tmpA11yPlaceholder=t,this.placeholder=t}else delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder;this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth()}_getItemLabel(e){return this.$.comboBox._getItemLabel(e)}_mergeItemLabels(e){return e.map((e=>this._getItemLabel(e))).join(", ")}_findIndex(e,t,o){if(o&&e){for(let i=0;i<t.length;i++)if(t[i]&&t[i][o]===e[o])return i;return-1}return t.indexOf(e)}__clearFilter(){this.filter="",this.$.comboBox.clear()}__announceItem(e,t,o){const i=t?"selected":"deselected",s=this.i18n.total.replace("{count}",o||0);(0,T.x)(`${e} ${this.i18n[i]} ${s}`)}__removeItem(e){const t=[...this.selectedItems];t.splice(t.indexOf(e),1),this.__updateSelection(t);const o=this._getItemLabel(e);this.__announceItem(o,!1,t.length)}__selectItem(e){const t=[...this.selectedItems],o=this._findIndex(e,t,this.itemIdPath),i=this._getItemLabel(e);let s=!1;if(-1!==o){const e=this._lastFilter;if(e&&e.toLowerCase()===i.toLowerCase())return void this.__clearFilter();t.splice(o,1)}else t.push(e),s=!0;this.__updateSelection(t),this.__clearFilter(),this.__announceItem(i,s,t.length)}__updateSelection(e){this.selectedItems=e,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(e,t,o){e?o||(this._topGroup=[...t]):this._topGroup=[]}__createChip(e){const t=document.createElement("vaadin-multi-select-combo-box-chip");t.setAttribute("slot","chip"),t.item=e,t.disabled=this.disabled,t.readonly=this.readonly;const o=this._getItemLabel(e);return t.label=o,t.setAttribute("title",o),t.addEventListener("item-removed",(e=>this._onItemRemoved(e))),t.addEventListener("mousedown",(e=>this._preventBlur(e))),t}__getOverflowWidth(){const e=this._overflow;e.style.visibility="hidden",e.removeAttribute("hidden");const t=e.getAttribute("count");e.setAttribute("count","99");const o=getComputedStyle(e),i=e.clientWidth+parseInt(o.marginInlineStart);return e.setAttribute("count",t),e.setAttribute("hidden",""),e.style.visibility="",i}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach((e=>{e.remove()}));const e=[...this.selectedItems],t=this._inputField.$.wrapper.clientWidth,o=parseInt(getComputedStyle(this.inputElement).flexBasis);let i=t-o;e.length>1&&(i-=this.__getOverflowWidth());const s=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const t=[];for(let o=e.length-1,i=null;o>=0;o--){const s=this.__createChip(e[o]);this.insertBefore(s,i),i=s,t.unshift(s)}const l=[],a=this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth;if(!this.autoExpandVertically&&a<o){for(;t.length>1;){t.pop().remove(),l.unshift(e.pop());const i=l.length>0?o+this.__getOverflowWidth():o;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=i)break}1===t.length&&(t[0].style.maxWidth=`${Math.max(s,i)}px`)}this._overflowItems=l}else{for(let t=e.length-1,o=null;t>=0;t--){const l=this.__createChip(e[t]);if(this.insertBefore(l,o),!this.autoExpandVertically&&this.$.chips.clientWidth>i){if(null!==o){l.remove();break}l.style.maxWidth=`${Math.max(s,i)}px`}e.pop(),o=l}this._overflowItems=e}}__updateOverflowChip(e,t,o,i){if(e){const s=t.length;e.label=`${s}`,e.setAttribute("count",`${s}`),e.setAttribute("title",this._mergeItemLabels(t)),e.toggleAttribute("hidden",0===s),e.disabled=o,e.readonly=i}}_onClearButtonTouchend(e){e.preventDefault(),e.stopPropagation(),this.clear()}_onClearButtonClick(e){e.stopPropagation(),this.clear()}_onChange(e){e.stopPropagation()}_onEscape(e){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(e.stopPropagation(),this.selectedItems=[])}_onKeyDown(e){super._onKeyDown(e);const t=this._chips;if(!this.readonly&&t.length>0)switch(e.key){case"Backspace":this._onBackSpace(t);break;case"ArrowLeft":this._onArrowLeft(t,e);break;case"ArrowRight":this._onArrowRight(t,e);break;default:this._focusedChipIndex=-1}}_onArrowLeft(e,t){if(0!==this.inputElement.selectionStart)return;const o=this._focusedChipIndex;let i;-1!==o&&t.preventDefault(),this.__isRTL?o===e.length-1?i=-1:o>-1&&(i=o+1):-1===o?i=e.length-1:o>0&&(i=o-1),void 0!==i&&(this._focusedChipIndex=i)}_onArrowRight(e,t){if(0!==this.inputElement.selectionStart)return;const o=this._focusedChipIndex;let i;-1!==o&&t.preventDefault(),this.__isRTL?-1===o?i=e.length-1:o>0&&(i=o-1):o===e.length-1?i=-1:o>-1&&(i=o+1),void 0!==i&&(this._focusedChipIndex=i)}_onBackSpace(e){if(0!==this.inputElement.selectionStart)return;const t=this._focusedChipIndex;-1===t?this._focusedChipIndex=e.length-1:(this.__removeItem(e[t].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(e,t){if(e>-1||t>-1){const t=this._chips;if(t.forEach(((t,o)=>{t.toggleAttribute("focused",o===e)})),e>-1){const o=t[e].item,i=this._getItemLabel(o);(0,T.x)(`${i} ${this.i18n.focused}`)}}}_onComboBoxChange(){const e=this.$.comboBox.selectedItem;e&&this.__selectItem(e)}_onComboBoxItemSelected(e){this.__selectItem(e.detail.item)}_onCustomValueSet(e){e.preventDefault(),e.stopPropagation(),this.__clearFilter(),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:e.detail,composed:!0,bubbles:!0}))}_onItemRemoved(e){this.__removeItem(e.detail.item)}_preventBlur(e){e.preventDefault()}__computeEffectiveItems(e,t,o){return e&&o?t:e}__computeEffectiveFilteredItems(e,t,o,i){return!e&&i?o:t}}(0,b.M)(N)}}]);
|
374
|
+
`}static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged"},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged"},autoOpenDisabled:Boolean,clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1},items:{type:Array},itemLabelPath:{type:String,value:"label"},itemValuePath:{type:String,value:"value"},itemIdPath:{type:String},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},loading:{type:Boolean,value:!1,reflectToAttribute:!0},overlayClass:{type:String},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0},selectedItems:{type:Array,value:()=>[],notify:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},size:{type:Number},pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,value:"",observer:"_placeholderChanged"},renderer:Function,filter:{type:String,value:"",notify:!0},filteredItems:Array,selectedItemsOnTop:{type:Boolean,value:!1},value:{type:String},__effectiveItems:{type:Array,computed:"__computeEffectiveItems(items, selectedItems, readonly)"},__effectiveFilteredItems:{type:Array,computed:"__computeEffectiveFilteredItems(items, filteredItems, selectedItems, readonly)"},_overflowItems:{type:Array,value:()=>[]},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String},_topGroup:{type:Array}}}static get observers(){return["_selectedItemsChanged(selectedItems, selectedItems.*)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){const e=this.localName;return[...super.slotStyles,`\n ${e}[has-value] input::placeholder {\n color: transparent !important;\n forced-color-adjust: none;\n }\n `]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new G.b(this,(e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e}))),this.addController(new W.v(this.inputElement,this._labelController)),this._tooltipController=new D.f(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((e=>!e.opened)),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new L.n(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:e=>{e.addEventListener("mousedown",(e=>this._preventBlur(e))),this._overflow=e}}),this.addController(this._overflowController),this.__updateChips(),(0,R.k)(this)}checkValidity(){return!(this.required&&!this.readonly)||this._hasValue}clear(){this.__updateSelection([]),(0,F.x)(this.i18n.cleared)}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache()}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate()}_disabledChanged(e,t){super._disabledChanged(e,t),(e||t)&&this.__updateChips()}_inputElementChanged(e){super._inputElementChanged(e),e&&this.$.comboBox._setInputElement(e)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate())}_onResize(){this.__updateChips()}_delegateAttribute(e,t){this.stateTarget&&("required"!==e?super._delegateAttribute(e,t):this._delegateAttribute("aria-required",!!t&&"true"))}_autoExpandHorizontallyChanged(e,t){(e||t)&&this.__updateChips()}_autoExpandVerticallyChanged(e,t){(e||t)&&this.__updateChips()}_clearButtonVisibleChanged(e,t){(e||t)&&this.__updateChips()}_onFilteredItemsChanged(e){const{value:t}=e.detail;(Array.isArray(t)||null==t)&&(this.filteredItems=t)}_readonlyChanged(e,t){(e||t)&&this.__updateChips(),this.dataProvider&&this.clearCache()}_pageSizeChanged(e,t){(Math.floor(e)!==e||e<=0)&&(this.pageSize=t,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize}_placeholderChanged(e){const t=this.__tmpA11yPlaceholder;t!==e&&(this.__savedPlaceholder=e,t&&(this.placeholder=t))}_selectedItemsChanged(e){if(this._toggleHasValue(this._hasValue),this._hasValue){const t=this._mergeItemLabels(e);this.__tmpA11yPlaceholder=t,this.placeholder=t}else delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder;this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth()}_getItemLabel(e){return this.$.comboBox._getItemLabel(e)}_mergeItemLabels(e){return e.map((e=>this._getItemLabel(e))).join(", ")}_findIndex(e,t,o){if(o&&e){for(let i=0;i<t.length;i++)if(t[i]&&t[i][o]===e[o])return i;return-1}return t.indexOf(e)}__clearFilter(){this.filter="",this.$.comboBox.clear()}__announceItem(e,t,o){const i=t?"selected":"deselected",s=this.i18n.total.replace("{count}",o||0);(0,F.x)(`${e} ${this.i18n[i]} ${s}`)}__removeItem(e){const t=[...this.selectedItems];t.splice(t.indexOf(e),1),this.__updateSelection(t);const o=this._getItemLabel(e);this.__announceItem(o,!1,t.length)}__selectItem(e){const t=[...this.selectedItems],o=this._findIndex(e,t,this.itemIdPath),i=this._getItemLabel(e);let s=!1;if(-1!==o){const e=this._lastFilter;if(e&&e.toLowerCase()===i.toLowerCase())return void this.__clearFilter();t.splice(o,1)}else t.push(e),s=!0;this.__updateSelection(t),this.__clearFilter(),this.__announceItem(i,s,t.length)}__updateSelection(e){this.selectedItems=e,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(e,t,o){e?o||(this._topGroup=[...t]):this._topGroup=[]}__createChip(e){const t=document.createElement("vaadin-multi-select-combo-box-chip");t.setAttribute("slot","chip"),t.item=e,t.disabled=this.disabled,t.readonly=this.readonly;const o=this._getItemLabel(e);return t.label=o,t.setAttribute("title",o),t.addEventListener("item-removed",(e=>this._onItemRemoved(e))),t.addEventListener("mousedown",(e=>this._preventBlur(e))),t}__getOverflowWidth(){const e=this._overflow;e.style.visibility="hidden",e.removeAttribute("hidden");const t=e.getAttribute("count");e.setAttribute("count","99");const o=getComputedStyle(e),i=e.clientWidth+parseInt(o.marginInlineStart);return e.setAttribute("count",t),e.setAttribute("hidden",""),e.style.visibility="",i}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach((e=>{e.remove()}));const e=[...this.selectedItems],t=this._inputField.$.wrapper.clientWidth,o=parseInt(getComputedStyle(this.inputElement).flexBasis);let i=t-o;e.length>1&&(i-=this.__getOverflowWidth());const s=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const t=[];for(let o=e.length-1,i=null;o>=0;o--){const s=this.__createChip(e[o]);this.insertBefore(s,i),i=s,t.unshift(s)}const l=[],a=this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth;if(!this.autoExpandVertically&&a<o){for(;t.length>1;){t.pop().remove(),l.unshift(e.pop());const i=l.length>0?o+this.__getOverflowWidth():o;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=i)break}1===t.length&&(t[0].style.maxWidth=`${Math.max(s,i)}px`)}this._overflowItems=l}else{for(let t=e.length-1,o=null;t>=0;t--){const l=this.__createChip(e[t]);if(this.insertBefore(l,o),!this.autoExpandVertically&&this.$.chips.clientWidth>i){if(null!==o){l.remove();break}l.style.maxWidth=`${Math.max(s,i)}px`}e.pop(),o=l}this._overflowItems=e}}__updateOverflowChip(e,t,o,i){if(e){const s=t.length;e.label=`${s}`,e.setAttribute("count",`${s}`),e.setAttribute("title",this._mergeItemLabels(t)),e.toggleAttribute("hidden",0===s),e.disabled=o,e.readonly=i}}_onClearButtonTouchend(e){e.preventDefault(),e.stopPropagation(),this.clear()}_onClearButtonClick(e){e.stopPropagation(),this.clear()}_onChange(e){e.stopPropagation()}_onEscape(e){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(e.stopPropagation(),this.selectedItems=[])}_onKeyDown(e){super._onKeyDown(e);const t=this._chips;if(!this.readonly&&t.length>0)switch(e.key){case"Backspace":this._onBackSpace(t);break;case"ArrowLeft":this._onArrowLeft(t,e);break;case"ArrowRight":this._onArrowRight(t,e);break;default:this._focusedChipIndex=-1}}_onArrowLeft(e,t){if(0!==this.inputElement.selectionStart)return;const o=this._focusedChipIndex;let i;-1!==o&&t.preventDefault(),this.__isRTL?o===e.length-1?i=-1:o>-1&&(i=o+1):-1===o?i=e.length-1:o>0&&(i=o-1),void 0!==i&&(this._focusedChipIndex=i)}_onArrowRight(e,t){if(0!==this.inputElement.selectionStart)return;const o=this._focusedChipIndex;let i;-1!==o&&t.preventDefault(),this.__isRTL?-1===o?i=e.length-1:o>0&&(i=o-1):o===e.length-1?i=-1:o>-1&&(i=o+1),void 0!==i&&(this._focusedChipIndex=i)}_onBackSpace(e){if(0!==this.inputElement.selectionStart)return;const t=this._focusedChipIndex;-1===t?this._focusedChipIndex=e.length-1:(this.__removeItem(e[t].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(e,t){if(e>-1||t>-1){const t=this._chips;if(t.forEach(((t,o)=>{t.toggleAttribute("focused",o===e)})),e>-1){const o=t[e].item,i=this._getItemLabel(o);(0,F.x)(`${i} ${this.i18n.focused}`)}}}_onComboBoxChange(){const e=this.$.comboBox.selectedItem;e&&this.__selectItem(e)}_onComboBoxItemSelected(e){this.__selectItem(e.detail.item)}_onCustomValueSet(e){e.preventDefault(),e.stopPropagation(),this.__clearFilter(),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:e.detail,composed:!0,bubbles:!0}))}_onItemRemoved(e){this.__removeItem(e.detail.item)}_preventBlur(e){e.preventDefault()}__computeEffectiveItems(e,t,o){return e&&o?t:e}__computeEffectiveFilteredItems(e,t,o,i){return!e&&i?o:t}}(0,b.M)(M)},3423:(e,t,o)=>{o.d(t,{a:()=>c});var i=o(4241),s=o(2807),l=o(1914),a=o(262),r=o(6570),n=o(4457),d=o(6196);(0,r.hC)("vaadin-overlay",d.r,{moduleId:"vaadin-overlay-styles"});class c extends((0,n.F)((0,r.Tb)((0,l.U)(i.H3)))){static get template(){return i.dy`
|
375
|
+
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
376
|
+
<div part="overlay" id="overlay" tabindex="0">
|
377
|
+
<div part="content" id="content">
|
378
|
+
<slot></slot>
|
379
|
+
</div>
|
380
|
+
</div>
|
381
|
+
`}static get is(){return"vaadin-overlay"}ready(){super.ready(),(0,a.k)(this)}}(0,s.M)(c)},6687:(e,t,o)=>{var i=o(510);(0,o(6570).hC)("vaadin-overlay",i.I,{moduleId:"lumo-vaadin-overlay"}),o(3423)}}]);
|
@@ -1,5 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
5
|
+
*/
|
6
|
+
|
1
7
|
/**
|
2
8
|
* @license
|
3
9
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
4
10
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
5
11
|
*/
|
12
|
+
|
13
|
+
/**
|
14
|
+
* @license
|
15
|
+
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
16
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
17
|
+
*/
|
package/dist/umd/1612.js
ADDED
@@ -0,0 +1,338 @@
|
|
1
|
+
/*! For license information please see 1612.js.LICENSE.txt */
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1612,4024,9562,4052],{5229:(t,e,o)=>{o.d(e,{f:()=>r});const r=(0,o(1014).o)((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}}))},2628:(t,e,o)=>{o.d(e,{L:()=>r});const r=(0,o(1014).o)((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}}))},8298:(t,e,o)=>{o.d(e,{N:()=>a});var r=o(5229);const a=t=>class extends((0,r.f)(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}},7078:(t,e,o)=>{o.d(e,{z:()=>b});var r=o(4241),a=o(6155),i=o(2807),n=o(2521),s=o(4463),l=o(6570);const d=o(235).iv`
|
3
|
+
:host {
|
4
|
+
display: inline-block;
|
5
|
+
position: relative;
|
6
|
+
outline: none;
|
7
|
+
white-space: nowrap;
|
8
|
+
-webkit-user-select: none;
|
9
|
+
-moz-user-select: none;
|
10
|
+
user-select: none;
|
11
|
+
}
|
12
|
+
|
13
|
+
:host([hidden]) {
|
14
|
+
display: none !important;
|
15
|
+
}
|
16
|
+
|
17
|
+
/* Aligns the button with form fields when placed on the same line.
|
18
|
+
Note, to make it work, the form fields should have the same "::before" pseudo-element. */
|
19
|
+
.vaadin-button-container::before {
|
20
|
+
content: '\\2003';
|
21
|
+
display: inline-block;
|
22
|
+
width: 0;
|
23
|
+
max-height: 100%;
|
24
|
+
}
|
25
|
+
|
26
|
+
.vaadin-button-container {
|
27
|
+
display: inline-flex;
|
28
|
+
align-items: center;
|
29
|
+
justify-content: center;
|
30
|
+
text-align: center;
|
31
|
+
width: 100%;
|
32
|
+
height: 100%;
|
33
|
+
min-height: inherit;
|
34
|
+
text-shadow: inherit;
|
35
|
+
}
|
36
|
+
|
37
|
+
[part='prefix'],
|
38
|
+
[part='suffix'] {
|
39
|
+
flex: none;
|
40
|
+
}
|
41
|
+
|
42
|
+
[part='label'] {
|
43
|
+
white-space: nowrap;
|
44
|
+
overflow: hidden;
|
45
|
+
text-overflow: ellipsis;
|
46
|
+
}
|
47
|
+
|
48
|
+
@media (forced-colors: active) {
|
49
|
+
:host {
|
50
|
+
outline: 1px solid;
|
51
|
+
outline-offset: -1px;
|
52
|
+
}
|
53
|
+
|
54
|
+
:host([focused]) {
|
55
|
+
outline-width: 2px;
|
56
|
+
}
|
57
|
+
|
58
|
+
:host([disabled]) {
|
59
|
+
outline-color: GrayText;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
`;var c=o(1224),u=o(1360),h=o(8298);const m=t=>class extends((0,c.D)((0,h.N)((0,u.W)(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}};(0,l.hC)("vaadin-button",d,{moduleId:"vaadin-button-styles"});class b extends(m((0,n.S)((0,l.Tb)((0,a.k)(r.H3))))){static get is(){return"vaadin-button"}static get template(){return r.dy`
|
63
|
+
<div class="vaadin-button-container">
|
64
|
+
<span part="prefix" aria-hidden="true">
|
65
|
+
<slot name="prefix"></slot>
|
66
|
+
</span>
|
67
|
+
<span part="label">
|
68
|
+
<slot></slot>
|
69
|
+
</span>
|
70
|
+
<span part="suffix" aria-hidden="true">
|
71
|
+
<slot name="suffix"></slot>
|
72
|
+
</span>
|
73
|
+
</div>
|
74
|
+
<slot name="tooltip"></slot>
|
75
|
+
`}ready(){super.ready(),this._tooltipController=new s.f(this),this.addController(this._tooltipController)}}(0,i.M)(b)},4750:(t,e,o)=>{o.d(e,{L:()=>a}),o(1195),o(9098),o(9416),o(9849),o(4173);var r=o(6570);const a=r.iv`
|
76
|
+
:host {
|
77
|
+
/* Sizing */
|
78
|
+
--lumo-button-size: var(--lumo-size-m);
|
79
|
+
min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));
|
80
|
+
height: var(--_button-size);
|
81
|
+
padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));
|
82
|
+
margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);
|
83
|
+
box-sizing: border-box;
|
84
|
+
/* Style */
|
85
|
+
font-family: var(--lumo-font-family);
|
86
|
+
font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));
|
87
|
+
font-weight: var(--vaadin-button-font-weight, 500);
|
88
|
+
color: var(--_lumo-button-text-color);
|
89
|
+
background: var(--_lumo-button-background);
|
90
|
+
border: var(--vaadin-button-border, none);
|
91
|
+
border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));
|
92
|
+
cursor: var(--lumo-clickable-cursor);
|
93
|
+
-webkit-tap-highlight-color: transparent;
|
94
|
+
-webkit-font-smoothing: antialiased;
|
95
|
+
-moz-osx-font-smoothing: grayscale;
|
96
|
+
flex-shrink: 0;
|
97
|
+
--_button-size: var(--vaadin-button-height, var(--lumo-button-size));
|
98
|
+
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
|
99
|
+
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
|
100
|
+
/* Used by notification */
|
101
|
+
--_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));
|
102
|
+
--_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));
|
103
|
+
--_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));
|
104
|
+
--_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));
|
105
|
+
}
|
106
|
+
|
107
|
+
/* Set only for the internal parts so we don't affect the host vertical alignment */
|
108
|
+
[part='label'],
|
109
|
+
[part='prefix'],
|
110
|
+
[part='suffix'] {
|
111
|
+
line-height: var(--lumo-line-height-xs);
|
112
|
+
}
|
113
|
+
|
114
|
+
[part='label'] {
|
115
|
+
padding: calc(var(--lumo-button-size) / 6) 0;
|
116
|
+
}
|
117
|
+
|
118
|
+
:host([theme~='small']) {
|
119
|
+
font-size: var(--lumo-font-size-s);
|
120
|
+
--lumo-button-size: var(--lumo-size-s);
|
121
|
+
}
|
122
|
+
|
123
|
+
:host([theme~='large']) {
|
124
|
+
font-size: var(--lumo-font-size-l);
|
125
|
+
--lumo-button-size: var(--lumo-size-l);
|
126
|
+
}
|
127
|
+
|
128
|
+
/* For interaction states */
|
129
|
+
:host::before,
|
130
|
+
:host::after {
|
131
|
+
content: '';
|
132
|
+
/* We rely on the host always being relative */
|
133
|
+
position: absolute;
|
134
|
+
z-index: 1;
|
135
|
+
inset: 0;
|
136
|
+
background-color: currentColor;
|
137
|
+
border-radius: inherit;
|
138
|
+
opacity: 0;
|
139
|
+
pointer-events: none;
|
140
|
+
}
|
141
|
+
|
142
|
+
/* Hover */
|
143
|
+
|
144
|
+
@media (any-hover: hover) {
|
145
|
+
:host(:hover)::before {
|
146
|
+
opacity: 0.02;
|
147
|
+
}
|
148
|
+
}
|
149
|
+
|
150
|
+
/* Active */
|
151
|
+
|
152
|
+
:host::after {
|
153
|
+
transition: opacity 1.4s, transform 0.1s;
|
154
|
+
filter: blur(8px);
|
155
|
+
}
|
156
|
+
|
157
|
+
:host([active])::before {
|
158
|
+
opacity: 0.05;
|
159
|
+
transition-duration: 0s;
|
160
|
+
}
|
161
|
+
|
162
|
+
:host([active])::after {
|
163
|
+
opacity: 0.1;
|
164
|
+
transition-duration: 0s, 0s;
|
165
|
+
transform: scale(0);
|
166
|
+
}
|
167
|
+
|
168
|
+
/* Keyboard focus */
|
169
|
+
|
170
|
+
:host([focus-ring]) {
|
171
|
+
box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
172
|
+
}
|
173
|
+
|
174
|
+
:host([theme~='primary'][focus-ring]) {
|
175
|
+
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
|
176
|
+
}
|
177
|
+
|
178
|
+
/* Types (primary, tertiary, tertiary-inline */
|
179
|
+
|
180
|
+
:host([theme~='tertiary']),
|
181
|
+
:host([theme~='tertiary-inline']) {
|
182
|
+
--_background: transparent !important;
|
183
|
+
background: var(--vaadin-button-tertiary-background, var(--_background));
|
184
|
+
min-width: 0;
|
185
|
+
}
|
186
|
+
|
187
|
+
:host([theme~='tertiary']) {
|
188
|
+
border: var(--vaadin-button-tertiary-border, none);
|
189
|
+
color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));
|
190
|
+
font-weight: var(--vaadin-button-tertiary-font-weight, 500);
|
191
|
+
padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));
|
192
|
+
}
|
193
|
+
|
194
|
+
:host([theme~='tertiary-inline'])::before {
|
195
|
+
display: none;
|
196
|
+
}
|
197
|
+
|
198
|
+
:host([theme~='tertiary-inline']) {
|
199
|
+
margin: 0;
|
200
|
+
height: auto;
|
201
|
+
padding: 0;
|
202
|
+
line-height: inherit;
|
203
|
+
font-size: inherit;
|
204
|
+
}
|
205
|
+
|
206
|
+
:host([theme~='tertiary-inline']) [part='label'] {
|
207
|
+
padding: 0;
|
208
|
+
overflow: visible;
|
209
|
+
line-height: inherit;
|
210
|
+
}
|
211
|
+
|
212
|
+
:host([theme~='primary']) {
|
213
|
+
background: var(--_lumo-button-primary-background);
|
214
|
+
border: var(--vaadin-button-primary-border, none);
|
215
|
+
color: var(--_lumo-button-primary-text-color);
|
216
|
+
font-weight: var(--vaadin-button-primary-font-weight, 600);
|
217
|
+
min-width: calc(var(--lumo-button-size) * 2.5);
|
218
|
+
}
|
219
|
+
|
220
|
+
:host([theme~='primary'])::before {
|
221
|
+
background-color: black;
|
222
|
+
}
|
223
|
+
|
224
|
+
@media (any-hover: hover) {
|
225
|
+
:host([theme~='primary']:hover)::before {
|
226
|
+
opacity: 0.05;
|
227
|
+
}
|
228
|
+
}
|
229
|
+
|
230
|
+
:host([theme~='primary'][active])::before {
|
231
|
+
opacity: 0.1;
|
232
|
+
}
|
233
|
+
|
234
|
+
:host([theme~='primary'][active])::after {
|
235
|
+
opacity: 0.2;
|
236
|
+
}
|
237
|
+
|
238
|
+
/* Colors (success, error, contrast) */
|
239
|
+
|
240
|
+
:host([theme~='success']) {
|
241
|
+
color: var(--lumo-success-text-color);
|
242
|
+
}
|
243
|
+
|
244
|
+
:host([theme~='success'][theme~='primary']) {
|
245
|
+
background-color: var(--lumo-success-color);
|
246
|
+
color: var(--lumo-success-contrast-color);
|
247
|
+
}
|
248
|
+
|
249
|
+
:host([theme~='error']) {
|
250
|
+
color: var(--lumo-error-text-color);
|
251
|
+
}
|
252
|
+
|
253
|
+
:host([theme~='error'][theme~='primary']) {
|
254
|
+
background-color: var(--lumo-error-color);
|
255
|
+
color: var(--lumo-error-contrast-color);
|
256
|
+
}
|
257
|
+
|
258
|
+
:host([theme~='contrast']) {
|
259
|
+
color: var(--lumo-contrast);
|
260
|
+
}
|
261
|
+
|
262
|
+
:host([theme~='contrast'][theme~='primary']) {
|
263
|
+
background-color: var(--lumo-contrast);
|
264
|
+
color: var(--lumo-base-color);
|
265
|
+
}
|
266
|
+
|
267
|
+
/* Disabled state. Keep selectors after other color variants. */
|
268
|
+
|
269
|
+
:host([disabled]) {
|
270
|
+
pointer-events: none;
|
271
|
+
color: var(--lumo-disabled-text-color);
|
272
|
+
}
|
273
|
+
|
274
|
+
:host([theme~='primary'][disabled]) {
|
275
|
+
background-color: var(--lumo-contrast-30pct);
|
276
|
+
color: var(--lumo-base-color);
|
277
|
+
}
|
278
|
+
|
279
|
+
:host([theme~='primary'][disabled]) [part] {
|
280
|
+
opacity: 0.7;
|
281
|
+
}
|
282
|
+
|
283
|
+
/* Icons */
|
284
|
+
|
285
|
+
[part] ::slotted(vaadin-icon) {
|
286
|
+
display: inline-block;
|
287
|
+
width: var(--lumo-icon-size-m);
|
288
|
+
height: var(--lumo-icon-size-m);
|
289
|
+
}
|
290
|
+
|
291
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
292
|
+
[part] ::slotted(vaadin-icon[icon^='vaadin:']) {
|
293
|
+
padding: 0.25em;
|
294
|
+
box-sizing: border-box !important;
|
295
|
+
}
|
296
|
+
|
297
|
+
[part='prefix'] {
|
298
|
+
margin-left: -0.25em;
|
299
|
+
margin-right: 0.25em;
|
300
|
+
}
|
301
|
+
|
302
|
+
[part='suffix'] {
|
303
|
+
margin-left: 0.25em;
|
304
|
+
margin-right: -0.25em;
|
305
|
+
}
|
306
|
+
|
307
|
+
/* Icon-only */
|
308
|
+
|
309
|
+
:host([theme~='icon']:not([theme~='tertiary-inline'])) {
|
310
|
+
min-width: var(--lumo-button-size);
|
311
|
+
padding-left: calc(var(--lumo-button-size) / 4);
|
312
|
+
padding-right: calc(var(--lumo-button-size) / 4);
|
313
|
+
}
|
314
|
+
|
315
|
+
:host([theme~='icon']) [part='prefix'],
|
316
|
+
:host([theme~='icon']) [part='suffix'] {
|
317
|
+
margin-left: 0;
|
318
|
+
margin-right: 0;
|
319
|
+
}
|
320
|
+
|
321
|
+
/* RTL specific styles */
|
322
|
+
|
323
|
+
:host([dir='rtl']) [part='prefix'] {
|
324
|
+
margin-left: 0.25em;
|
325
|
+
margin-right: -0.25em;
|
326
|
+
}
|
327
|
+
|
328
|
+
:host([dir='rtl']) [part='suffix'] {
|
329
|
+
margin-left: -0.25em;
|
330
|
+
margin-right: 0.25em;
|
331
|
+
}
|
332
|
+
|
333
|
+
:host([dir='rtl'][theme~='icon']) [part='prefix'],
|
334
|
+
:host([dir='rtl'][theme~='icon']) [part='suffix'] {
|
335
|
+
margin-left: 0;
|
336
|
+
margin-right: 0;
|
337
|
+
}
|
338
|
+
`;(0,r.hC)("vaadin-button",a,{moduleId:"lumo-button"})},1721:(t,e,o)=>{o(4750),o(7078)},1037:(t,e,o)=>{o.d(e,{Dt:()=>i,G6:()=>c,T:()=>u,gn:()=>d,i7:()=>n,vU:()=>s});const r=t=>t.test(navigator.userAgent),a=t=>t.test(navigator.platform),i=r(/Android/u),n=r(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),s=r(/Firefox/u),l=a(/^iPad/u)||a(/^Mac/u)&&navigator.maxTouchPoints>1,d=a(/^iPhone/u)||l,c=r(/^((?!chrome|android).)*safari/iu),u=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})()},4946:(t,e,o)=>{o.d(e,{W:()=>i});var r=o(1014);const a=new WeakMap,i=(0,r.o)((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return a.has(t)||a.set(t,new Set),a.get(t)}(t);this.slotStyles.forEach((o=>{e.has(o)||(function(t,e){const o=document.createElement("style");o.textContent=t,e===document?document.head.appendChild(o):e.insertBefore(o,e.firstChild)}(o,t),e.add(o))}))}}))}}]);
|