@vscode-elements/elements 2.4.1-pre.1 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/custom-elements.json +337 -337
  2. package/dist/bundled.js +30 -30
  3. package/dist/includes/VscElement.js +1 -1
  4. package/dist/includes/VscElement.js.map +1 -1
  5. package/dist/includes/vscode-select/styles.d.ts.map +1 -1
  6. package/dist/includes/vscode-select/styles.js +12 -14
  7. package/dist/includes/vscode-select/styles.js.map +1 -1
  8. package/dist/vscode-button/vscode-button.styles.js +4 -4
  9. package/dist/vscode-button/vscode-button.styles.js.map +1 -1
  10. package/dist/vscode-checkbox/vscode-checkbox.js +1 -1
  11. package/dist/vscode-checkbox/vscode-checkbox.js.map +1 -1
  12. package/dist/vscode-collapsible/vscode-collapsible.d.ts +1 -1
  13. package/dist/vscode-collapsible/vscode-collapsible.d.ts.map +1 -1
  14. package/dist/vscode-collapsible/vscode-collapsible.js +5 -3
  15. package/dist/vscode-collapsible/vscode-collapsible.js.map +1 -1
  16. package/dist/vscode-icon/vscode-icon.js +1 -1
  17. package/dist/vscode-icon/vscode-icon.js.map +1 -1
  18. package/dist/vscode-multi-select/vscode-multi-select.js +1 -1
  19. package/dist/vscode-multi-select/vscode-multi-select.js.map +1 -1
  20. package/dist/vscode-radio/vscode-radio.js +1 -1
  21. package/dist/vscode-radio/vscode-radio.js.map +1 -1
  22. package/dist/vscode-single-select/vscode-single-select.js +1 -1
  23. package/dist/vscode-single-select/vscode-single-select.js.map +1 -1
  24. package/dist/vscode-textarea/vscode-textarea.styles.js +1 -1
  25. package/dist/vscode-textarea/vscode-textarea.styles.js.map +1 -1
  26. package/dist/vscode-textfield/vscode-textfield.js +1 -1
  27. package/dist/vscode-textfield/vscode-textfield.js.map +1 -1
  28. package/dist/vscode-textfield/vscode-textfield.styles.js +1 -1
  29. package/dist/vscode-textfield/vscode-textfield.styles.js.map +1 -1
  30. package/package.json +1 -2
  31. package/vscode.css-custom-data.json +3 -3
  32. package/vscode.html-custom-data.json +16 -16
package/dist/bundled.js CHANGED
@@ -1,4 +1,4 @@
1
- const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),s=new WeakMap;let o=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const i=this.t;if(e&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=s.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&s.set(i,t))}return t}toString(){return this.cssText}};const r=t=>new o("string"==typeof t?t:t+"",void 0,i),n=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new o(s,t,i)},h=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return r(e)})(t):t,{is:a,defineProperty:l,getOwnPropertyDescriptor:c,getOwnPropertyNames:d,getOwnPropertySymbols:u,getPrototypeOf:p}=Object,v=globalThis,b=v.trustedTypes,f=b?b.emptyScript:"",g=v.reactiveElementPolyfillSupport,m=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},w=(t,e)=>!a(t,e),y={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:w};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;let k=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&l(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const r=s?.call(this);o?.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const t=this.properties,e=[...d(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(h(t))}else void 0!==t&&e.push(h(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((i,s)=>{if(e)i.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of s){const s=document.createElement("style"),o=t.litNonce;void 0!==o&&s.setAttribute("nonce",o),s.textContent=e.cssText,i.appendChild(s)}})(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:x).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=s,this[s]=o.fromAttribute(e,t.type)??this._$Ej?.get(s)??null,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const s=this.constructor,o=this[t];if(i??=s.getPropertyOptions(t),!((i.hasChanged??w)(o,e)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),!0!==o||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[m("elementProperties")]=new Map,k[m("finalized")]=new Map,g?.({ReactiveElement:k}),(v.reactiveElementVersions??=[]).push("2.1.0");const $=globalThis,_=$.trustedTypes,S=_?_.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,A="?"+B,O=`<${A}>`,z=document,E=()=>z.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,M="[ \t\n\f\r]",D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,P=/>/g,V=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),N=/'/g,T=/"/g,R=/^(?:script|style|textarea|title)$/i,L=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),U=L(1),H=L(2),G=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),W=new WeakMap,K=z.createTreeWalker(z,129);function X(t,e){if(!j(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(e):e}const J=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=D;for(let e=0;e<i;e++){const i=t[e];let h,a,l=-1,c=0;for(;c<i.length&&(n.lastIndex=c,a=n.exec(i),null!==a);)c=n.lastIndex,n===D?"!--"===a[1]?n=F:void 0!==a[1]?n=P:void 0!==a[2]?(R.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=V):void 0!==a[3]&&(n=V):n===V?">"===a[0]?(n=o??D,l=-1):void 0===a[1]?l=-2:(l=n.lastIndex-a[2].length,h=a[1],n=void 0===a[3]?V:'"'===a[3]?T:N):n===T||n===N?n=V:n===F||n===P?n=D:(n=V,o=void 0);const d=n===V&&t[e+1].startsWith("/>")?" ":"";r+=n===D?i+O:l>=0?(s.push(h),i.slice(0,l)+C+i.slice(l)+B+d):i+B+(-2===l?e:d)}return[X(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class Y{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,h=this.parts,[a,l]=J(t,e);if(this.el=Y.createElement(a,i),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=K.nextNode())&&h.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(C)){const e=l[r++],i=s.getAttribute(t).split(B),n=/([.?@])?(.*)/.exec(e);h.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?et:"?"===n[1]?it:"@"===n[1]?st:tt}),s.removeAttribute(t)}else t.startsWith(B)&&(h.push({type:6,index:o}),s.removeAttribute(t));if(R.test(s.tagName)){const t=s.textContent.split(B),e=t.length-1;if(e>0){s.textContent=_?_.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],E()),K.nextNode(),h.push({type:2,index:++o});s.append(t[e],E())}}}else if(8===s.nodeType)if(s.data===A)h.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(B,t+1));)h.push({type:7,index:o}),t+=B.length-1}o++}}static createElement(t,e){const i=z.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,s){if(e===G)return e;let o=void 0!==s?i._$Co?.[s]:i._$Cl;const r=I(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=o:i._$Cl=o),void 0!==o&&(e=Z(t,o._$AS(t,e.values),o,s)),e}class Q{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),I(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==G&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>j(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==q&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=Y.createElement(X(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??z).importNode(e,!0);K.currentNode=s;let o=K.nextNode(),r=0,n=0,h=i[0];for(;void 0!==h;){if(r===h.index){let e;2===h.type?e=new Q(o,o.nextSibling,this,t):1===h.type?e=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(e=new ot(o,this,t)),this._$AV.push(e),h=i[++n]}r!==h?.index&&(o=K.nextNode(),r++)}return K.currentNode=z,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new Y(t)),e}k(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Q(this.O(E()),this.O(E()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=q}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=Z(this,t,e,0),r=!I(t)||t!==this._$AH&&t!==G,r&&(this._$AH=t);else{const s=t;let n,h;for(t=o[0],n=0;n<o.length-1;n++)h=Z(this,s[i+n],e,n),h===G&&(h=this._$AH[n]),r||=!I(h)||h!==this._$AH[n],h===q?t=q:t!==q&&(t+=(h??"")+o[n+1]),this._$AH[n]=h}r&&!s&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class it extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class st extends tt{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=Z(this,t,e,0)??q)===G)return;const i=this._$AH,s=t===q&&i!==q||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==q&&(i===q||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ot{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const rt={I:Q},nt=$.litHtmlPolyfillSupport;nt?.(Y,Q),($.litHtmlVersions??=[]).push("3.3.0");const ht=(t,e,i)=>{const s=i?.renderBefore??e;let o=s._$litPart$;if(void 0===o){const t=i?.renderBefore??null;s._$litPart$=o=new Q(e.insertBefore(E(),t),t,void 0,i??{})}return o._$AI(t),o},at=globalThis;let lt=class extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return G}};lt._$litElement$=!0,lt.finalized=!0,at.litElementHydrateSupport?.({LitElement:lt});const ct=at.litElementPolyfillSupport;ct?.({LitElement:lt}),(at.litElementVersions??=[]).push("4.2.0");const dt={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:w},ut=(t=dt,e,i)=>{const{kind:s,metadata:o}=i;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),r.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,o,t)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const o=this[s];e.call(this,i),this.requestUpdate(s,o,t)}}throw Error("Unsupported decorator location: "+s)};function pt(t){return(e,i)=>"object"==typeof i?ut(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function vt(t){return pt({...t,state:!0,attribute:!1})}const bt=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,i);function ft(t,e){return(i,s,o)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof s?i:o??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return bt(0,0,{get(){let i=t.call(this);return void 0===i&&(i=r(this),(null!==i||this.hasUpdated)&&e.call(this,i)),i}})}return bt(0,0,{get(){return r(this)}})}}let gt;function mt(t){return(e,i)=>{const{slot:s,selector:o}=t??{},r="slot"+(s?`[name=${s}]`:":not([name])");return bt(0,0,{get(){const e=this.renderRoot?.querySelector(r),i=e?.assignedElements(t)??[];return void 0===o?i:i.filter((t=>t.matches(o)))}})}}const xt="2.4.1-pre.1",wt="__vscodeElements_disableRegistryWarning__",yt=(t,e)=>{e?console.warn(`[VSCode Elements] ${t}\n%o`,e):console.warn(`${t}\n%o`,e)};class kt extends lt{get version(){return xt}warn(t){yt(t,this)}}const $t=t=>e=>{if(!customElements.get(t))return void customElements.define(t,e);if(wt in window)return;const i=document.createElement(t),s=i?.version;let o="";s?s!==xt?(o+="is already registered by a different version of VSCode Elements. ",o+=`This version is "${xt}", while the other one is "${s}".`):o+=`is already registered by the same version of VSCode Elements (${xt}).`:o+="is already registered by an unknown custom element handler class.",yt(`The custom element "${t}" ${o}\nTo suppress this warning, set window.${wt} to true`)};var _t=n`
1
+ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),s=new WeakMap;let o=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const i=this.t;if(e&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=s.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&s.set(i,t))}return t}toString(){return this.cssText}};const r=t=>new o("string"==typeof t?t:t+"",void 0,i),n=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new o(s,t,i)},h=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return r(e)})(t):t,{is:a,defineProperty:l,getOwnPropertyDescriptor:c,getOwnPropertyNames:d,getOwnPropertySymbols:u,getPrototypeOf:p}=Object,v=globalThis,b=v.trustedTypes,f=b?b.emptyScript:"",g=v.reactiveElementPolyfillSupport,m=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},w=(t,e)=>!a(t,e),y={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:w};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;let k=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&l(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:s,set(e){const r=s?.call(this);o?.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(m("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const t=this.properties,e=[...d(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(h(t))}else void 0!==t&&e.push(h(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((i,s)=>{if(e)i.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of s){const s=document.createElement("style"),o=t.litNonce;void 0!==o&&s.setAttribute("nonce",o),s.textContent=e.cssText,i.appendChild(s)}})(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:x).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=s,this[s]=o.fromAttribute(e,t.type)??this._$Ej?.get(s)??null,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const s=this.constructor,o=this[t];if(i??=s.getPropertyOptions(t),!((i.hasChanged??w)(o,e)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),!0!==o||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[m("elementProperties")]=new Map,k[m("finalized")]=new Map,g?.({ReactiveElement:k}),(v.reactiveElementVersions??=[]).push("2.1.0");const $=globalThis,_=$.trustedTypes,S=_?_.createPolicy("lit-html",{createHTML:t=>t}):void 0,C="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,A="?"+B,O=`<${A}>`,z=document,E=()=>z.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,M="[ \t\n\f\r]",D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,P=/>/g,V=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),N=/'/g,T=/"/g,R=/^(?:script|style|textarea|title)$/i,L=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),U=L(1),H=L(2),G=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),W=new WeakMap,K=z.createTreeWalker(z,129);function X(t,e){if(!j(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(e):e}const J=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=D;for(let e=0;e<i;e++){const i=t[e];let h,a,l=-1,c=0;for(;c<i.length&&(n.lastIndex=c,a=n.exec(i),null!==a);)c=n.lastIndex,n===D?"!--"===a[1]?n=F:void 0!==a[1]?n=P:void 0!==a[2]?(R.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=V):void 0!==a[3]&&(n=V):n===V?">"===a[0]?(n=o??D,l=-1):void 0===a[1]?l=-2:(l=n.lastIndex-a[2].length,h=a[1],n=void 0===a[3]?V:'"'===a[3]?T:N):n===T||n===N?n=V:n===F||n===P?n=D:(n=V,o=void 0);const d=n===V&&t[e+1].startsWith("/>")?" ":"";r+=n===D?i+O:l>=0?(s.push(h),i.slice(0,l)+C+i.slice(l)+B+d):i+B+(-2===l?e:d)}return[X(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class Y{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,h=this.parts,[a,l]=J(t,e);if(this.el=Y.createElement(a,i),K.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=K.nextNode())&&h.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(C)){const e=l[r++],i=s.getAttribute(t).split(B),n=/([.?@])?(.*)/.exec(e);h.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?et:"?"===n[1]?it:"@"===n[1]?st:tt}),s.removeAttribute(t)}else t.startsWith(B)&&(h.push({type:6,index:o}),s.removeAttribute(t));if(R.test(s.tagName)){const t=s.textContent.split(B),e=t.length-1;if(e>0){s.textContent=_?_.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],E()),K.nextNode(),h.push({type:2,index:++o});s.append(t[e],E())}}}else if(8===s.nodeType)if(s.data===A)h.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(B,t+1));)h.push({type:7,index:o}),t+=B.length-1}o++}}static createElement(t,e){const i=z.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,s){if(e===G)return e;let o=void 0!==s?i._$Co?.[s]:i._$Cl;const r=I(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=o:i._$Cl=o),void 0!==o&&(e=Z(t,o._$AS(t,e.values),o,s)),e}class Q{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),I(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==G&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>j(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==q&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=Y.createElement(X(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??z).importNode(e,!0);K.currentNode=s;let o=K.nextNode(),r=0,n=0,h=i[0];for(;void 0!==h;){if(r===h.index){let e;2===h.type?e=new Q(o,o.nextSibling,this,t):1===h.type?e=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(e=new ot(o,this,t)),this._$AV.push(e),h=i[++n]}r!==h?.index&&(o=K.nextNode(),r++)}return K.currentNode=z,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new Y(t)),e}k(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Q(this.O(E()),this.O(E()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=q}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=Z(this,t,e,0),r=!I(t)||t!==this._$AH&&t!==G,r&&(this._$AH=t);else{const s=t;let n,h;for(t=o[0],n=0;n<o.length-1;n++)h=Z(this,s[i+n],e,n),h===G&&(h=this._$AH[n]),r||=!I(h)||h!==this._$AH[n],h===q?t=q:t!==q&&(t+=(h??"")+o[n+1]),this._$AH[n]=h}r&&!s&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class et extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}class it extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==q)}}class st extends tt{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=Z(this,t,e,0)??q)===G)return;const i=this._$AH,s=t===q&&i!==q||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==q&&(i===q||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ot{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const rt={I:Q},nt=$.litHtmlPolyfillSupport;nt?.(Y,Q),($.litHtmlVersions??=[]).push("3.3.0");const ht=(t,e,i)=>{const s=i?.renderBefore??e;let o=s._$litPart$;if(void 0===o){const t=i?.renderBefore??null;s._$litPart$=o=new Q(e.insertBefore(E(),t),t,void 0,i??{})}return o._$AI(t),o},at=globalThis;let lt=class extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return G}};lt._$litElement$=!0,lt.finalized=!0,at.litElementHydrateSupport?.({LitElement:lt});const ct=at.litElementPolyfillSupport;ct?.({LitElement:lt}),(at.litElementVersions??=[]).push("4.2.0");const dt={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:w},ut=(t=dt,e,i)=>{const{kind:s,metadata:o}=i;let r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),"setter"===s&&((t=Object.create(t)).wrapped=!0),r.set(i.name,t),"accessor"===s){const{name:s}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,o,t)},init(e){return void 0!==e&&this.C(s,void 0,t,e),e}}}if("setter"===s){const{name:s}=i;return function(i){const o=this[s];e.call(this,i),this.requestUpdate(s,o,t)}}throw Error("Unsupported decorator location: "+s)};function pt(t){return(e,i)=>"object"==typeof i?ut(t,e,i):((t,e,i)=>{const s=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}function vt(t){return pt({...t,state:!0,attribute:!1})}const bt=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,i);function ft(t,e){return(i,s,o)=>{const r=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof s?i:o??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return bt(0,0,{get(){let i=t.call(this);return void 0===i&&(i=r(this),(null!==i||this.hasUpdated)&&e.call(this,i)),i}})}return bt(0,0,{get(){return r(this)}})}}let gt;function mt(t){return(e,i)=>{const{slot:s,selector:o}=t??{},r="slot"+(s?`[name=${s}]`:":not([name])");return bt(0,0,{get(){const e=this.renderRoot?.querySelector(r),i=e?.assignedElements(t)??[];return void 0===o?i:i.filter((t=>t.matches(o)))}})}}const xt="2.5.0",wt="__vscodeElements_disableRegistryWarning__",yt=(t,e)=>{e?console.warn(`[VSCode Elements] ${t}\n%o`,e):console.warn(`${t}\n%o`,e)};class kt extends lt{get version(){return xt}warn(t){yt(t,this)}}const $t=t=>e=>{if(!customElements.get(t))return void customElements.define(t,e);if(wt in window)return;const i=document.createElement(t),s=i?.version;let o="";s?s!==xt?(o+="is already registered by a different version of VSCode Elements. ",o+=`This version is "${xt}", while the other one is "${s}".`):o+=`is already registered by the same version of VSCode Elements (${xt}).`:o+="is already registered by an unknown custom element handler class.",yt(`The custom element "${t}" ${o}\nTo suppress this warning, set window.${wt} to true`)};var _t=n`
2
2
  :host([hidden]) {
3
3
  display: none;
4
4
  }
@@ -134,7 +134,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
134
134
  rel="stylesheet"
135
135
  href=${Dt(t)}
136
136
  nonce=${Dt(e)}
137
- >
137
+ />
138
138
  ${s}
139
139
  `}};Tt.styles=Pt,Tt.stylesheetHref="",Tt.nonce="",Nt([pt()],Tt.prototype,"label",void 0),Nt([pt({type:String})],Tt.prototype,"name",void 0),Nt([pt({type:Number})],Tt.prototype,"size",void 0),Nt([pt({type:Boolean,reflect:!0})],Tt.prototype,"spin",void 0),Nt([pt({type:Number,attribute:"spin-duration"})],Tt.prototype,"spinDuration",void 0),Nt([pt({type:Boolean,reflect:!0,attribute:"action-icon"})],Tt.prototype,"actionIcon",void 0),Tt=Vt=Nt([$t("vscode-icon")],Tt);const Rt=[_t,n`
140
140
  :host {
@@ -151,15 +151,15 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
151
151
  .base {
152
152
  align-items: center;
153
153
  background-color: var(--vscode-button-background, #0078d4);
154
- border-bottom-left-radius: var(--vsc-border-left-radius, 2px);
155
- border-bottom-right-radius: var(--vsc-border-right-radius, 2px);
154
+ border-bottom-left-radius: var(--vsc-border-left-radius, 4px);
155
+ border-bottom-right-radius: var(--vsc-border-right-radius, 4px);
156
156
  border-bottom-width: 1px;
157
157
  border-color: var(--vscode-button-border, transparent);
158
158
  border-left-width: var(--vsc-border-left-width, 1px);
159
159
  border-right-width: var(--vsc-border-right-width, 1px);
160
160
  border-style: solid;
161
- border-top-left-radius: var(--vsc-border-left-radius, 2px);
162
- border-top-right-radius: var(--vsc-border-right-radius, 2px);
161
+ border-top-left-radius: var(--vsc-border-left-radius, 4px);
162
+ border-top-right-radius: var(--vsc-border-right-radius, 4px);
163
163
  border-top-width: 1px;
164
164
  box-sizing: border-box;
165
165
  color: var(--vscode-button-foreground, #ffffff);
@@ -580,7 +580,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
580
580
  role=${Dt(this.toggle?"switch":void 0)}
581
581
  aria-checked=${Dt(this.toggle?this.checked?"true":"false":void 0)}
582
582
  value=${this.value}
583
- >
583
+ />
584
584
  <div class=${t}>${r}</div>
585
585
  <label for="input" class="label" @click=${this._handleClick}>
586
586
  <span class=${e}>
@@ -717,7 +717,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
717
717
  .collapsible.open .collapsible-body {
718
718
  display: block;
719
719
  }
720
- `];var re=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,h=t.length-1;h>=0;h--)(o=t[h])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let ne=class extends kt{constructor(){super(...arguments),this.alwaysShowHeaderActions=!1,this.title="",this.heading="",this.description="",this.open=!1}_emitToggleEvent(){this.dispatchEvent(new CustomEvent("vsc-collapsible-toggle",{detail:{open:this.open}}))}_onHeaderClick(){this.open=!this.open,this._emitToggleEvent()}_onHeaderKeyDown(t){"Enter"===t.key&&(this.open=!this.open,this._emitToggleEvent())}_onActionClick(t){t.stopPropagation()}render(){const t={collapsible:!0,open:this.open},e={actions:!0,"always-visible":this.alwaysShowHeaderActions},i=this.heading?this.heading:this.title,s=U`<svg
720
+ `];var re=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,h=t.length-1;h>=0;h--)(o=t[h])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};let ne=class extends kt{constructor(){super(...arguments),this.alwaysShowHeaderActions=!1,this.title="",this.heading="",this.description="",this.open=!1}_emitToggleEvent(){this.dispatchEvent(new CustomEvent("vsc-collapsible-toggle",{detail:{open:this.open}}))}_onHeaderClick(){this.open=!this.open,this._emitToggleEvent()}_onHeaderKeyDown(t){"Enter"===t.key&&(this.open=!this.open,this._emitToggleEvent())}_onHeaderSlotClick(t){t.stopPropagation()}render(){const t={collapsible:!0,open:this.open},e={actions:!0,"always-visible":this.alwaysShowHeaderActions},i=this.heading?this.heading:this.title,s=U`<svg
721
721
  width="16"
722
722
  height="16"
723
723
  viewBox="0 0 16 16"
@@ -742,9 +742,11 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
742
742
  <h3 class="title">${i}${o}</h3>
743
743
  <div class="header-slots">
744
744
  <div class=${Mt(e)}>
745
- <slot name="actions" @click=${this._onActionClick}></slot>
745
+ <slot name="actions" @click=${this._onHeaderSlotClick}></slot>
746
+ </div>
747
+ <div class="decorations">
748
+ <slot name="decorations" @click=${this._onHeaderSlotClick}></slot>
746
749
  </div>
747
- <div class="decorations"><slot name="decorations"></slot></div>
748
750
  </div>
749
751
  </div>
750
752
  <div class="collapsible-body" part="body">
@@ -1261,7 +1263,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1261
1263
  .combobox-face {
1262
1264
  background-color: var(--vscode-settings-dropdownBackground, #313131);
1263
1265
  border-color: var(--vscode-settings-dropdownBorder, #3c3c3c);
1264
- border-radius: 2px;
1266
+ border-radius: 4px;
1265
1267
  border-style: solid;
1266
1268
  border-width: 1px;
1267
1269
  box-sizing: border-box;
@@ -1328,10 +1330,16 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1328
1330
  :host(:focus) .combobox-face,
1329
1331
  :host([focused]) .select-face,
1330
1332
  :host([focused]) .combobox-face {
1331
- border-color: var(--vscode-focusBorder, #0078d4);
1332
1333
  outline: none;
1333
1334
  }
1334
1335
 
1336
+ :host(:focus:not([open])) .select-face,
1337
+ :host(:focus:not([open])) .combobox-face,
1338
+ :host([focused]:not([open])) .select-face,
1339
+ :host([focused]:not([open])) .combobox-face {
1340
+ border-color: var(--vscode-focusBorder, #0078d4);
1341
+ }
1342
+
1335
1343
  .combobox-input {
1336
1344
  background-color: transparent;
1337
1345
  box-sizing: border-box;
@@ -1403,16 +1411,14 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1403
1411
  .dropdown {
1404
1412
  background-color: var(--vscode-settings-dropdownBackground, #313131);
1405
1413
  border-color: var(--vscode-settings-dropdownListBorder, #454545);
1406
- border-radius: 0 0 3px 3px;
1414
+ border-radius: 4px;
1407
1415
  border-style: solid;
1408
1416
  border-width: 1px;
1409
1417
  bottom: unset;
1418
+ box-shadow: 0 2px 8px var(--vscode-widget-shadow, rgba(0, 0, 0, 0.36));
1410
1419
  box-sizing: border-box;
1411
1420
  display: none;
1412
- padding-bottom: 2px;
1413
- padding-left: 0;
1414
- padding-right: 0;
1415
- padding-top: 0;
1421
+ padding: 0;
1416
1422
  right: unset;
1417
1423
  }
1418
1424
 
@@ -1421,22 +1427,16 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1421
1427
  }
1422
1428
 
1423
1429
  :host([position='above']) .dropdown {
1424
- border-radius: 3px 3px 0 0;
1425
1430
  bottom: 26px;
1426
1431
  padding-bottom: 0;
1427
1432
  padding-top: 2px;
1428
1433
  top: unset;
1429
1434
  }
1430
1435
 
1431
- :host(:focus) .dropdown,
1432
- :host([focused]) .dropdown {
1433
- border-color: var(--vscode-focusBorder, #0078d4);
1434
- }
1435
-
1436
1436
  .scrollable {
1437
1437
  display: block;
1438
1438
  max-height: 222px;
1439
- margin: 1px;
1439
+ margin: 0;
1440
1440
  outline: none;
1441
1441
  overflow: hidden;
1442
1442
  }
@@ -1677,7 +1677,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1677
1677
  @input=${this._onComboboxInputInput}
1678
1678
  @click=${this._onComboboxInputClick}
1679
1679
  @keydown=${this._onComboboxInputSpaceKeyDown}
1680
- >
1680
+ />
1681
1681
  <button
1682
1682
  aria-label="Open the list of options"
1683
1683
  class="combobox-button"
@@ -1922,7 +1922,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1922
1922
  ?checked=${this.checked}
1923
1923
  value=${this.value}
1924
1924
  tabindex=${this.tabIndex}
1925
- >
1925
+ />
1926
1926
  <div class=${t}></div>
1927
1927
  <label for="input" class="label" @click=${this._handleClick}>
1928
1928
  <span class=${e}>
@@ -2002,7 +2002,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2002
2002
  @input=${this._onComboboxInputInput}
2003
2003
  @click=${this._onComboboxInputClick}
2004
2004
  @keydown=${this._onComboboxInputSpaceKeyDown}
2005
- >
2005
+ />
2006
2006
  <button
2007
2007
  aria-label="Open the list of options"
2008
2008
  class="combobox-button"
@@ -2642,7 +2642,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2642
2642
  textarea {
2643
2643
  background-color: var(--vscode-settings-textInputBackground, #313131);
2644
2644
  border-color: var(--vscode-settings-textInputBorder, transparent);
2645
- border-radius: 2px;
2645
+ border-radius: 4px;
2646
2646
  border-style: solid;
2647
2647
  border-width: 1px;
2648
2648
  box-sizing: border-box;
@@ -2780,7 +2780,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2780
2780
  --vscode-settings-textInputBorder,
2781
2781
  var(--vscode-settings-textInputBackground, #3c3c3c)
2782
2782
  );
2783
- border-radius: 2px;
2783
+ border-radius: 4px;
2784
2784
  border-style: solid;
2785
2785
  border-width: 1px;
2786
2786
  box-sizing: border-box;
@@ -2898,7 +2898,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2898
2898
  @focus=${this._onFocus}
2899
2899
  @input=${this._onInput}
2900
2900
  @keydown=${this._onKeyDown}
2901
- >
2901
+ />
2902
2902
  <slot name="content-after"></slot>
2903
2903
  </div>
2904
2904
  `}};as.styles=ns,as.formAssociated=!0,as.shadowRootOptions={...lt.shadowRootOptions,delegatesFocus:!0},hs([pt()],as.prototype,"autocomplete",void 0),hs([pt({type:Boolean,reflect:!0})],as.prototype,"autofocus",void 0),hs([pt({attribute:"default-value"})],as.prototype,"defaultValue",void 0),hs([pt({type:Boolean,reflect:!0})],as.prototype,"disabled",void 0),hs([pt({type:Boolean,reflect:!0})],as.prototype,"focused",void 0),hs([pt({type:Boolean,reflect:!0})],as.prototype,"invalid",void 0),hs([pt({attribute:!1})],as.prototype,"label",void 0),hs([pt({type:Number})],as.prototype,"max",void 0),hs([pt({type:Number})],as.prototype,"maxLength",void 0),hs([pt({type:Number})],as.prototype,"min",void 0),hs([pt({type:Number})],as.prototype,"minLength",void 0),hs([pt({type:Boolean,reflect:!0})],as.prototype,"multiple",void 0),hs([pt({reflect:!0})],as.prototype,"name",void 0),hs([pt()],as.prototype,"pattern",void 0),hs([pt()],as.prototype,"placeholder",void 0),hs([pt({type:Boolean,reflect:!0})],as.prototype,"readonly",void 0),hs([pt({type:Boolean,reflect:!0})],as.prototype,"required",void 0),hs([pt({type:Number})],as.prototype,"step",void 0),hs([pt({reflect:!0})],as.prototype,"type",null),hs([pt()],as.prototype,"value",null),hs([ft("#input")],as.prototype,"_inputEl",void 0),hs([vt()],as.prototype,"_value",void 0),hs([vt()],as.prototype,"_type",void 0),as=hs([$t("vscode-textfield")],as);const ls=[_t,n`
@@ -1,5 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
- const VERSION = '2.4.1-pre.1';
2
+ const VERSION = '2.5.0';
3
3
  const CONFIG_KEY = '__vscodeElements_disableRegistryWarning__';
4
4
  const warn = (message, componentInstance) => {
5
5
  const prefix = '[VSCode Elements] ';
@@ -1 +1 @@
1
- {"version":3,"file":"VscElement.js","sourceRoot":"","sources":["../../src/includes/VscElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAE/B,MAAM,OAAO,GAAG,aAAa,CAAC;A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,KAAK,OAAO,EAAE,CAAC;YACtC,OAAO;gBACL,mEAAmE,CAAC;YACtE,OAAO,IAAI,oBAAoB,OAAO,8BAA8B,cAAc,IAAI,CAAC;QACzF,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,iEAAiE,OAAO,IAAI,CAAC;QAC1F,CAAC;QAED,IAAI,CACF,uBAAuB,OAAO,KAAK,OAAO,0CAA0C,UAAU,UAAU,CACzG,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {LitElement} from 'lit';\n\nconst VERSION = '2.4.1-pre.1';\nconst CONFIG_KEY = '__vscodeElements_disableRegistryWarning__';\n\nconst warn = (message: string, componentInstance?: VscElement) => {\n const prefix = '[VSCode Elements] ';\n\n if (componentInstance) {\n // eslint-disable-next-line no-console\n console.warn(`${prefix}${message}\\n%o`, componentInstance);\n } else {\n // eslint-disable-next-line no-console\n console.warn(`${message}\\n%o`, componentInstance);\n }\n};\n\nexport class VscElement extends LitElement {\n /** VSCode Elements version */\n get version(): string {\n return VERSION;\n }\n\n warn(message: string) {\n warn(message, this);\n }\n}\n\ntype CustomElementClass = Omit<typeof HTMLElement, 'new'>;\n\nexport type Constructor<T> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n};\n\n/**\n * Own implementation of Lit's customElement decorator.\n */\nexport const customElement = (tagName: string) => {\n return (classOrTarget: CustomElementClass) => {\n const customElementClass = customElements.get(tagName);\n\n if (!customElementClass) {\n customElements.define(tagName, classOrTarget as CustomElementConstructor);\n return;\n }\n\n if (CONFIG_KEY in window) {\n return;\n }\n\n const el = document.createElement(tagName);\n const anotherVersion = (el as VscElement)?.version;\n let message = '';\n\n if (!anotherVersion) {\n message +=\n 'is already registered by an unknown custom element handler class.';\n } else if (anotherVersion !== VERSION) {\n message +=\n 'is already registered by a different version of VSCode Elements. ';\n message += `This version is \"${VERSION}\", while the other one is \"${anotherVersion}\".`;\n } else {\n message += `is already registered by the same version of VSCode Elements (${VERSION}).`;\n }\n\n warn(\n `The custom element \"${tagName}\" ${message}\\nTo suppress this warning, set window.${CONFIG_KEY} to true`\n );\n };\n};\n"]}
1
+ {"version":3,"file":"VscElement.js","sourceRoot":"","sources":["../../src/includes/VscElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAE/B,MAAM,OAAO,GAAG,OAAO,CAAC;AACxB,MAAM,UAAU,GAAG,2CAA2C,CAAC;AAE/D,MAAM,IAAI,GAAG,CAAC,OAAe,EAAE,iBAA8B,EAAE,EAAE;IAC/D,MAAM,MAAM,GAAG,oBAAoB,CAAC;IAEpC,IAAI,iBAAiB,EAAE,CAAC;QACtB,sCAAsC;QACtC,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC7D,CAAC;SAAM,CAAC;QACN,sCAAsC;QACtC,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACpD,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,OAAO,UAAW,SAAQ,UAAU;IACxC,8BAA8B;IAC9B,IAAI,OAAO;QACT,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,IAAI,CAAC,OAAe;QAClB,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACtB,CAAC;CACF;AASD;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAe,EAAE,EAAE;IAC/C,OAAO,CAAC,aAAiC,EAAE,EAAE;QAC3C,MAAM,kBAAkB,GAAG,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAEvD,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACxB,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,aAAyC,CAAC,CAAC;YAC1E,OAAO;QACT,CAAC;QAED,IAAI,UAAU,IAAI,MAAM,EAAE,CAAC;YACzB,OAAO;QACT,CAAC;QAED,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC3C,MAAM,cAAc,GAAI,EAAiB,EAAE,OAAO,CAAC;QACnD,IAAI,OAAO,GAAG,EAAE,CAAC;QAEjB,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,OAAO;gBACL,mEAAmE,CAAC;QACxE,CAAC;aAAM,IAAI,cAAc,KAAK,OAAO,EAAE,CAAC;YACtC,OAAO;gBACL,mEAAmE,CAAC;YACtE,OAAO,IAAI,oBAAoB,OAAO,8BAA8B,cAAc,IAAI,CAAC;QACzF,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,iEAAiE,OAAO,IAAI,CAAC;QAC1F,CAAC;QAED,IAAI,CACF,uBAAuB,OAAO,KAAK,OAAO,0CAA0C,UAAU,UAAU,CACzG,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {LitElement} from 'lit';\n\nconst VERSION = '2.5.0';\nconst CONFIG_KEY = '__vscodeElements_disableRegistryWarning__';\n\nconst warn = (message: string, componentInstance?: VscElement) => {\n const prefix = '[VSCode Elements] ';\n\n if (componentInstance) {\n // eslint-disable-next-line no-console\n console.warn(`${prefix}${message}\\n%o`, componentInstance);\n } else {\n // eslint-disable-next-line no-console\n console.warn(`${message}\\n%o`, componentInstance);\n }\n};\n\nexport class VscElement extends LitElement {\n /** VSCode Elements version */\n get version(): string {\n return VERSION;\n }\n\n warn(message: string) {\n warn(message, this);\n }\n}\n\ntype CustomElementClass = Omit<typeof HTMLElement, 'new'>;\n\nexport type Constructor<T> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n};\n\n/**\n * Own implementation of Lit's customElement decorator.\n */\nexport const customElement = (tagName: string) => {\n return (classOrTarget: CustomElementClass) => {\n const customElementClass = customElements.get(tagName);\n\n if (!customElementClass) {\n customElements.define(tagName, classOrTarget as CustomElementConstructor);\n return;\n }\n\n if (CONFIG_KEY in window) {\n return;\n }\n\n const el = document.createElement(tagName);\n const anotherVersion = (el as VscElement)?.version;\n let message = '';\n\n if (!anotherVersion) {\n message +=\n 'is already registered by an unknown custom element handler class.';\n } else if (anotherVersion !== VERSION) {\n message +=\n 'is already registered by a different version of VSCode Elements. ';\n message += `This version is \"${VERSION}\", while the other one is \"${anotherVersion}\".`;\n } else {\n message += `is already registered by the same version of VSCode Elements (${VERSION}).`;\n }\n\n warn(\n `The custom element \"${tagName}\" ${message}\\nTo suppress this warning, set window.${CONFIG_KEY} to true`\n );\n };\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/includes/vscode-select/styles.ts"],"names":[],"mappings":";AAGA,wBA6ZE"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/includes/vscode-select/styles.ts"],"names":[],"mappings":";AAGA,wBA2ZE"}
@@ -19,7 +19,7 @@ export default [
19
19
  .combobox-face {
20
20
  background-color: var(--vscode-settings-dropdownBackground, #313131);
21
21
  border-color: var(--vscode-settings-dropdownBorder, #3c3c3c);
22
- border-radius: 2px;
22
+ border-radius: 4px;
23
23
  border-style: solid;
24
24
  border-width: 1px;
25
25
  box-sizing: border-box;
@@ -86,10 +86,16 @@ export default [
86
86
  :host(:focus) .combobox-face,
87
87
  :host([focused]) .select-face,
88
88
  :host([focused]) .combobox-face {
89
- border-color: var(--vscode-focusBorder, #0078d4);
90
89
  outline: none;
91
90
  }
92
91
 
92
+ :host(:focus:not([open])) .select-face,
93
+ :host(:focus:not([open])) .combobox-face,
94
+ :host([focused]:not([open])) .select-face,
95
+ :host([focused]:not([open])) .combobox-face {
96
+ border-color: var(--vscode-focusBorder, #0078d4);
97
+ }
98
+
93
99
  .combobox-input {
94
100
  background-color: transparent;
95
101
  box-sizing: border-box;
@@ -161,16 +167,14 @@ export default [
161
167
  .dropdown {
162
168
  background-color: var(--vscode-settings-dropdownBackground, #313131);
163
169
  border-color: var(--vscode-settings-dropdownListBorder, #454545);
164
- border-radius: 0 0 3px 3px;
170
+ border-radius: 4px;
165
171
  border-style: solid;
166
172
  border-width: 1px;
167
173
  bottom: unset;
174
+ box-shadow: 0 2px 8px var(--vscode-widget-shadow, rgba(0, 0, 0, 0.36));
168
175
  box-sizing: border-box;
169
176
  display: none;
170
- padding-bottom: 2px;
171
- padding-left: 0;
172
- padding-right: 0;
173
- padding-top: 0;
177
+ padding: 0;
174
178
  right: unset;
175
179
  }
176
180
 
@@ -179,22 +183,16 @@ export default [
179
183
  }
180
184
 
181
185
  :host([position='above']) .dropdown {
182
- border-radius: 3px 3px 0 0;
183
186
  bottom: 26px;
184
187
  padding-bottom: 0;
185
188
  padding-top: 2px;
186
189
  top: unset;
187
190
  }
188
191
 
189
- :host(:focus) .dropdown,
190
- :host([focused]) .dropdown {
191
- border-color: var(--vscode-focusBorder, #0078d4);
192
- }
193
-
194
192
  .scrollable {
195
193
  display: block;
196
194
  max-height: 222px;
197
- margin: 1px;
195
+ margin: 0;
198
196
  outline: none;
199
197
  overflow: hidden;
200
198
  }
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/includes/vscode-select/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAEjD,eAAe;IACb,aAAa;IACb,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0ZF;CACF,CAAC","sourcesContent":["import {css} from 'lit';\nimport defaultStyles from '../default.styles.js';\n\nexport default [\n defaultStyles,\n css`\n :host {\n display: inline-block;\n max-width: 100%;\n outline: none;\n position: relative;\n width: 320px;\n }\n\n .main-slot {\n display: none;\n }\n\n .select-face,\n .combobox-face {\n background-color: var(--vscode-settings-dropdownBackground, #313131);\n border-color: var(--vscode-settings-dropdownBorder, #3c3c3c);\n border-radius: 2px;\n border-style: solid;\n border-width: 1px;\n box-sizing: border-box;\n color: var(--vscode-settings-dropdownForeground, #cccccc);\n font-family: var(--vscode-font-family, sans-serif);\n font-size: var(--vscode-font-size, 13px);\n font-weight: var(--vscode-font-weight, normal);\n line-height: 18px;\n position: relative;\n user-select: none;\n width: 100%;\n }\n\n :host([invalid]) .select-face,\n :host(:invalid) .select-face,\n :host([invalid]) .combobox-face,\n :host(:invalid) .combobox-face {\n background-color: var(--vscode-inputValidation-errorBackground, #5a1d1d);\n border-color: var(--vscode-inputValidation-errorBorder, #be1100);\n }\n\n .select-face {\n cursor: pointer;\n display: block;\n padding: 3px 4px;\n }\n\n .select-face .text {\n display: block;\n height: 18px;\n overflow: hidden;\n padding-right: 20px;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .select-face.multiselect {\n padding: 0;\n }\n\n .select-face-badge {\n background-color: var(--vscode-badge-background, #616161);\n border-radius: 2px;\n color: var(--vscode-badge-foreground, #f8f8f8);\n display: inline-block;\n flex-shrink: 0;\n font-size: 11px;\n line-height: 16px;\n margin: 2px;\n padding: 2px 3px;\n white-space: nowrap;\n }\n\n .select-face-badge.no-item {\n background-color: transparent;\n color: inherit;\n }\n\n .combobox-face {\n display: flex;\n }\n\n :host(:focus) .select-face,\n :host(:focus) .combobox-face,\n :host([focused]) .select-face,\n :host([focused]) .combobox-face {\n border-color: var(--vscode-focusBorder, #0078d4);\n outline: none;\n }\n\n .combobox-input {\n background-color: transparent;\n box-sizing: border-box;\n border: 0;\n color: var(--vscode-foreground, #cccccc);\n display: block;\n font-family: var(--vscode-font-family, sans-serif);\n font-size: var(--vscode-font-size, 13px);\n line-height: 16px;\n padding: 4px;\n width: 100%;\n }\n\n .combobox-input:focus {\n outline: none;\n }\n\n .combobox-button {\n align-items: center;\n background-color: transparent;\n border: 0;\n border-radius: 2px;\n box-sizing: content-box;\n color: var(--vscode-foreground, #cccccc);\n cursor: pointer;\n display: flex;\n flex-shrink: 0;\n height: 16px;\n justify-content: center;\n margin: 1px 1px 0 0;\n padding: 3px;\n width: 22px;\n }\n\n .combobox-button:hover,\n .combobox-button:focus-visible {\n background-color: var(\n --vscode-toolbar-hoverBackground,\n rgba(90, 93, 94, 0.31)\n );\n outline-style: dashed;\n outline-color: var(--vscode-toolbar-hoverOutline, transparent);\n }\n\n .combobox-button:focus-visible {\n outline: none;\n }\n\n .icon {\n color: var(--vscode-foreground, #cccccc);\n display: block;\n height: 14px;\n pointer-events: none;\n width: 14px;\n }\n\n .select-face .icon {\n position: absolute;\n right: 6px;\n top: 5px;\n }\n\n .icon svg {\n color: var(--vscode-foreground, #cccccc);\n height: 100%;\n width: 100%;\n }\n\n .dropdown {\n background-color: var(--vscode-settings-dropdownBackground, #313131);\n border-color: var(--vscode-settings-dropdownListBorder, #454545);\n border-radius: 0 0 3px 3px;\n border-style: solid;\n border-width: 1px;\n bottom: unset;\n box-sizing: border-box;\n display: none;\n padding-bottom: 2px;\n padding-left: 0;\n padding-right: 0;\n padding-top: 0;\n right: unset;\n }\n\n .dropdown.open {\n display: block;\n }\n\n :host([position='above']) .dropdown {\n border-radius: 3px 3px 0 0;\n bottom: 26px;\n padding-bottom: 0;\n padding-top: 2px;\n top: unset;\n }\n\n :host(:focus) .dropdown,\n :host([focused]) .dropdown {\n border-color: var(--vscode-focusBorder, #0078d4);\n }\n\n .scrollable {\n display: block;\n max-height: 222px;\n margin: 1px;\n outline: none;\n overflow: hidden;\n }\n\n .options {\n box-sizing: border-box;\n cursor: pointer;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .option {\n box-sizing: border-box;\n color: var(--vscode-foreground, #cccccc);\n cursor: pointer;\n font-family: var(--vscode-font-family, sans-serif);\n font-size: var(--vscode-font-size, 13px);\n font-weight: var(--vscode-font-weight, normal);\n height: 22px;\n line-height: 20px;\n min-height: calc(var(--vscode-font-size) * 1.3);\n padding: 1px 3px;\n user-select: none;\n outline-color: transparent;\n outline-offset: -1px;\n outline-style: solid;\n outline-width: 1px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .option.single-select {\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .option.multi-select {\n align-items: center;\n display: flex;\n }\n\n .option b {\n color: var(--vscode-list-highlightForeground, #2aaaff);\n }\n\n .option.active b {\n color: var(--vscode-list-focusHighlightForeground, #2aaaff);\n }\n\n .option:not(.disabled):hover {\n background-color: var(--vscode-list-hoverBackground, #2a2d2e);\n color: var(--vscode-list-hoverForeground, #ffffff);\n }\n\n :host-context(body[data-vscode-theme-kind='vscode-high-contrast'])\n .option:hover,\n :host-context(body[data-vscode-theme-kind='vscode-high-contrast-light'])\n .option:hover {\n outline-style: dotted;\n outline-color: var(--vscode-list-focusOutline, #0078d4);\n outline-width: 1px;\n }\n\n .option.disabled {\n cursor: not-allowed;\n opacity: 0.4;\n }\n\n .option.active,\n .option.active:hover {\n background-color: var(--vscode-list-activeSelectionBackground, #04395e);\n color: var(--vscode-list-activeSelectionForeground, #ffffff);\n outline-color: var(--vscode-list-activeSelectionBackground, #04395e);\n outline-style: solid;\n outline-width: 1px;\n }\n\n .no-options {\n align-items: center;\n border-color: transparent;\n border-style: solid;\n border-width: 1px;\n color: var(--vscode-foreground, #cccccc);\n cursor: default;\n display: flex;\n font-family: var(--vscode-font-family, sans-serif);\n font-size: var(--vscode-font-size, 13px);\n font-weight: var(--vscode-font-weight, normal);\n line-height: 18px;\n min-height: calc(var(--vscode-font-size) * 1.3);\n opacity: 0.85;\n padding: 1px 3px;\n user-select: none;\n }\n\n .placeholder {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .placeholder span {\n font-weight: bold;\n }\n\n .placeholder:not(.disabled):hover {\n color: var(--vscode-list-activeSelectionForeground, #ffffff);\n }\n\n :host-context(body[data-vscode-theme-kind='vscode-high-contrast'])\n .option.active,\n :host-context(body[data-vscode-theme-kind='vscode-high-contrast-light'])\n .option.active:hover {\n outline-color: var(--vscode-list-focusOutline, #0078d4);\n outline-style: dashed;\n }\n\n .option-label {\n display: block;\n overflow: hidden;\n pointer-events: none;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n }\n\n .dropdown.multiple .option.selected {\n background-color: var(--vscode-list-hoverBackground, #2a2d2e);\n outline-color: var(--vscode-list-hoverBackground, #2a2d2e);\n }\n\n .dropdown.multiple .option.selected.active {\n background-color: var(--vscode-list-activeSelectionBackground, #04395e);\n color: var(--vscode-list-activeSelectionForeground, #ffffff);\n outline-color: var(--vscode-list-activeSelectionBackground, #04395e);\n }\n\n .checkbox-icon {\n align-items: center;\n background-color: var(--vscode-checkbox-background, #313131);\n border-radius: 2px;\n border: 1px solid var(--vscode-checkbox-border);\n box-sizing: border-box;\n color: var(--vscode-checkbox-foreground);\n display: flex;\n flex-basis: 15px;\n flex-shrink: 0;\n height: 15px;\n justify-content: center;\n margin-right: 5px;\n overflow: hidden;\n position: relative;\n width: 15px;\n }\n\n .checkbox-icon svg {\n display: none;\n height: 13px;\n width: 13px;\n }\n\n .checkbox-icon.checked svg {\n display: block;\n }\n\n .dropdown-controls {\n display: flex;\n justify-content: flex-end;\n padding: 4px;\n }\n\n .dropdown-controls :not(:last-child) {\n margin-right: 4px;\n }\n\n .action-icon {\n align-items: center;\n background-color: transparent;\n border: 0;\n color: var(--vscode-foreground, #cccccc);\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n padding: 0;\n width: 24px;\n }\n\n .action-icon:focus {\n outline: none;\n }\n\n .action-icon:focus-visible {\n outline: 1px solid var(--vscode-focusBorder, #0078d4);\n outline-offset: -1px;\n }\n\n .description {\n border-color: var(--vscode-settings-dropdownBorder, #3c3c3c);\n border-style: solid;\n border-width: 1px 0 0;\n color: var(--vscode-foreground, #cccccc);\n font-family: var(--vscode-font-family, sans-serif);\n font-size: var(--vscode-font-size, 13px);\n font-weight: var(--vscode-font-weight, normal);\n line-height: 1.3;\n padding: 6px 4px;\n word-wrap: break-word;\n }\n\n :host([position='above']) .description {\n border-width: 0 0 1px;\n }\n `,\n];\n"]}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/includes/vscode-select/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAEjD,eAAe;IACb,aAAa;IACb,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwZF;CACF,CAAC","sourcesContent":["import {css} from 'lit';\nimport defaultStyles from '../default.styles.js';\n\nexport default [\n defaultStyles,\n css`\n :host {\n display: inline-block;\n max-width: 100%;\n outline: none;\n position: relative;\n width: 320px;\n }\n\n .main-slot {\n display: none;\n }\n\n .select-face,\n .combobox-face {\n background-color: var(--vscode-settings-dropdownBackground, #313131);\n border-color: var(--vscode-settings-dropdownBorder, #3c3c3c);\n border-radius: 4px;\n border-style: solid;\n border-width: 1px;\n box-sizing: border-box;\n color: var(--vscode-settings-dropdownForeground, #cccccc);\n font-family: var(--vscode-font-family, sans-serif);\n font-size: var(--vscode-font-size, 13px);\n font-weight: var(--vscode-font-weight, normal);\n line-height: 18px;\n position: relative;\n user-select: none;\n width: 100%;\n }\n\n :host([invalid]) .select-face,\n :host(:invalid) .select-face,\n :host([invalid]) .combobox-face,\n :host(:invalid) .combobox-face {\n background-color: var(--vscode-inputValidation-errorBackground, #5a1d1d);\n border-color: var(--vscode-inputValidation-errorBorder, #be1100);\n }\n\n .select-face {\n cursor: pointer;\n display: block;\n padding: 3px 4px;\n }\n\n .select-face .text {\n display: block;\n height: 18px;\n overflow: hidden;\n padding-right: 20px;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .select-face.multiselect {\n padding: 0;\n }\n\n .select-face-badge {\n background-color: var(--vscode-badge-background, #616161);\n border-radius: 2px;\n color: var(--vscode-badge-foreground, #f8f8f8);\n display: inline-block;\n flex-shrink: 0;\n font-size: 11px;\n line-height: 16px;\n margin: 2px;\n padding: 2px 3px;\n white-space: nowrap;\n }\n\n .select-face-badge.no-item {\n background-color: transparent;\n color: inherit;\n }\n\n .combobox-face {\n display: flex;\n }\n\n :host(:focus) .select-face,\n :host(:focus) .combobox-face,\n :host([focused]) .select-face,\n :host([focused]) .combobox-face {\n outline: none;\n }\n\n :host(:focus:not([open])) .select-face,\n :host(:focus:not([open])) .combobox-face,\n :host([focused]:not([open])) .select-face,\n :host([focused]:not([open])) .combobox-face {\n border-color: var(--vscode-focusBorder, #0078d4);\n }\n\n .combobox-input {\n background-color: transparent;\n box-sizing: border-box;\n border: 0;\n color: var(--vscode-foreground, #cccccc);\n display: block;\n font-family: var(--vscode-font-family, sans-serif);\n font-size: var(--vscode-font-size, 13px);\n line-height: 16px;\n padding: 4px;\n width: 100%;\n }\n\n .combobox-input:focus {\n outline: none;\n }\n\n .combobox-button {\n align-items: center;\n background-color: transparent;\n border: 0;\n border-radius: 2px;\n box-sizing: content-box;\n color: var(--vscode-foreground, #cccccc);\n cursor: pointer;\n display: flex;\n flex-shrink: 0;\n height: 16px;\n justify-content: center;\n margin: 1px 1px 0 0;\n padding: 3px;\n width: 22px;\n }\n\n .combobox-button:hover,\n .combobox-button:focus-visible {\n background-color: var(\n --vscode-toolbar-hoverBackground,\n rgba(90, 93, 94, 0.31)\n );\n outline-style: dashed;\n outline-color: var(--vscode-toolbar-hoverOutline, transparent);\n }\n\n .combobox-button:focus-visible {\n outline: none;\n }\n\n .icon {\n color: var(--vscode-foreground, #cccccc);\n display: block;\n height: 14px;\n pointer-events: none;\n width: 14px;\n }\n\n .select-face .icon {\n position: absolute;\n right: 6px;\n top: 5px;\n }\n\n .icon svg {\n color: var(--vscode-foreground, #cccccc);\n height: 100%;\n width: 100%;\n }\n\n .dropdown {\n background-color: var(--vscode-settings-dropdownBackground, #313131);\n border-color: var(--vscode-settings-dropdownListBorder, #454545);\n border-radius: 4px;\n border-style: solid;\n border-width: 1px;\n bottom: unset;\n box-shadow: 0 2px 8px var(--vscode-widget-shadow, rgba(0, 0, 0, 0.36));\n box-sizing: border-box;\n display: none;\n padding: 0;\n right: unset;\n }\n\n .dropdown.open {\n display: block;\n }\n\n :host([position='above']) .dropdown {\n bottom: 26px;\n padding-bottom: 0;\n padding-top: 2px;\n top: unset;\n }\n\n .scrollable {\n display: block;\n max-height: 222px;\n margin: 0;\n outline: none;\n overflow: hidden;\n }\n\n .options {\n box-sizing: border-box;\n cursor: pointer;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .option {\n box-sizing: border-box;\n color: var(--vscode-foreground, #cccccc);\n cursor: pointer;\n font-family: var(--vscode-font-family, sans-serif);\n font-size: var(--vscode-font-size, 13px);\n font-weight: var(--vscode-font-weight, normal);\n height: 22px;\n line-height: 20px;\n min-height: calc(var(--vscode-font-size) * 1.3);\n padding: 1px 3px;\n user-select: none;\n outline-color: transparent;\n outline-offset: -1px;\n outline-style: solid;\n outline-width: 1px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .option.single-select {\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .option.multi-select {\n align-items: center;\n display: flex;\n }\n\n .option b {\n color: var(--vscode-list-highlightForeground, #2aaaff);\n }\n\n .option.active b {\n color: var(--vscode-list-focusHighlightForeground, #2aaaff);\n }\n\n .option:not(.disabled):hover {\n background-color: var(--vscode-list-hoverBackground, #2a2d2e);\n color: var(--vscode-list-hoverForeground, #ffffff);\n }\n\n :host-context(body[data-vscode-theme-kind='vscode-high-contrast'])\n .option:hover,\n :host-context(body[data-vscode-theme-kind='vscode-high-contrast-light'])\n .option:hover {\n outline-style: dotted;\n outline-color: var(--vscode-list-focusOutline, #0078d4);\n outline-width: 1px;\n }\n\n .option.disabled {\n cursor: not-allowed;\n opacity: 0.4;\n }\n\n .option.active,\n .option.active:hover {\n background-color: var(--vscode-list-activeSelectionBackground, #04395e);\n color: var(--vscode-list-activeSelectionForeground, #ffffff);\n outline-color: var(--vscode-list-activeSelectionBackground, #04395e);\n outline-style: solid;\n outline-width: 1px;\n }\n\n .no-options {\n align-items: center;\n border-color: transparent;\n border-style: solid;\n border-width: 1px;\n color: var(--vscode-foreground, #cccccc);\n cursor: default;\n display: flex;\n font-family: var(--vscode-font-family, sans-serif);\n font-size: var(--vscode-font-size, 13px);\n font-weight: var(--vscode-font-weight, normal);\n line-height: 18px;\n min-height: calc(var(--vscode-font-size) * 1.3);\n opacity: 0.85;\n padding: 1px 3px;\n user-select: none;\n }\n\n .placeholder {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .placeholder span {\n font-weight: bold;\n }\n\n .placeholder:not(.disabled):hover {\n color: var(--vscode-list-activeSelectionForeground, #ffffff);\n }\n\n :host-context(body[data-vscode-theme-kind='vscode-high-contrast'])\n .option.active,\n :host-context(body[data-vscode-theme-kind='vscode-high-contrast-light'])\n .option.active:hover {\n outline-color: var(--vscode-list-focusOutline, #0078d4);\n outline-style: dashed;\n }\n\n .option-label {\n display: block;\n overflow: hidden;\n pointer-events: none;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n }\n\n .dropdown.multiple .option.selected {\n background-color: var(--vscode-list-hoverBackground, #2a2d2e);\n outline-color: var(--vscode-list-hoverBackground, #2a2d2e);\n }\n\n .dropdown.multiple .option.selected.active {\n background-color: var(--vscode-list-activeSelectionBackground, #04395e);\n color: var(--vscode-list-activeSelectionForeground, #ffffff);\n outline-color: var(--vscode-list-activeSelectionBackground, #04395e);\n }\n\n .checkbox-icon {\n align-items: center;\n background-color: var(--vscode-checkbox-background, #313131);\n border-radius: 2px;\n border: 1px solid var(--vscode-checkbox-border);\n box-sizing: border-box;\n color: var(--vscode-checkbox-foreground);\n display: flex;\n flex-basis: 15px;\n flex-shrink: 0;\n height: 15px;\n justify-content: center;\n margin-right: 5px;\n overflow: hidden;\n position: relative;\n width: 15px;\n }\n\n .checkbox-icon svg {\n display: none;\n height: 13px;\n width: 13px;\n }\n\n .checkbox-icon.checked svg {\n display: block;\n }\n\n .dropdown-controls {\n display: flex;\n justify-content: flex-end;\n padding: 4px;\n }\n\n .dropdown-controls :not(:last-child) {\n margin-right: 4px;\n }\n\n .action-icon {\n align-items: center;\n background-color: transparent;\n border: 0;\n color: var(--vscode-foreground, #cccccc);\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n padding: 0;\n width: 24px;\n }\n\n .action-icon:focus {\n outline: none;\n }\n\n .action-icon:focus-visible {\n outline: 1px solid var(--vscode-focusBorder, #0078d4);\n outline-offset: -1px;\n }\n\n .description {\n border-color: var(--vscode-settings-dropdownBorder, #3c3c3c);\n border-style: solid;\n border-width: 1px 0 0;\n color: var(--vscode-foreground, #cccccc);\n font-family: var(--vscode-font-family, sans-serif);\n font-size: var(--vscode-font-size, 13px);\n font-weight: var(--vscode-font-weight, normal);\n line-height: 1.3;\n padding: 6px 4px;\n word-wrap: break-word;\n }\n\n :host([position='above']) .description {\n border-width: 0 0 1px;\n }\n `,\n];\n"]}
@@ -19,15 +19,15 @@ const styles = [
19
19
  .base {
20
20
  align-items: center;
21
21
  background-color: var(--vscode-button-background, #0078d4);
22
- border-bottom-left-radius: var(--vsc-border-left-radius, 2px);
23
- border-bottom-right-radius: var(--vsc-border-right-radius, 2px);
22
+ border-bottom-left-radius: var(--vsc-border-left-radius, 4px);
23
+ border-bottom-right-radius: var(--vsc-border-right-radius, 4px);
24
24
  border-bottom-width: 1px;
25
25
  border-color: var(--vscode-button-border, transparent);
26
26
  border-left-width: var(--vsc-border-left-width, 1px);
27
27
  border-right-width: var(--vsc-border-right-width, 1px);
28
28
  border-style: solid;
29
- border-top-left-radius: var(--vsc-border-left-radius, 2px);
30
- border-top-right-radius: var(--vsc-border-right-radius, 2px);
29
+ border-top-left-radius: var(--vsc-border-left-radius, 4px);
30
+ border-top-right-radius: var(--vsc-border-right-radius, 4px);
31
31
  border-top-width: 1px;
32
32
  box-sizing: border-box;
33
33
  color: var(--vscode-button-foreground, #ffffff);
@@ -1 +1 @@
1
- {"version":3,"file":"vscode-button.styles.js","sourceRoot":"","sources":["../../src/vscode-button/vscode-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAkB,SAAS,EAAC,MAAM,KAAK,CAAC;AACnD,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAC;AAE3D,MAAM,gBAAgB,GAAG,SAAS,CAAC,mBAAmB,EAAE,CAAC,CAAC;AAE1D,MAAM,MAAM,GAAmB;IAC7B,aAAa;IACb,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CA4B0C,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4J5D;CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import {css, CSSResultGroup, unsafeCSS} from 'lit';\nimport defaultStyles from '../includes/default.styles.js';\nimport {getDefaultFontStack} from '../includes/helpers.js';\n\nconst defaultFontStack = unsafeCSS(getDefaultFontStack());\n\nconst styles: CSSResultGroup = [\n defaultStyles,\n css`\n :host {\n cursor: pointer;\n display: inline-block;\n width: auto;\n }\n\n :host([block]) {\n display: block;\n width: 100%;\n }\n\n .base {\n align-items: center;\n background-color: var(--vscode-button-background, #0078d4);\n border-bottom-left-radius: var(--vsc-border-left-radius, 2px);\n border-bottom-right-radius: var(--vsc-border-right-radius, 2px);\n border-bottom-width: 1px;\n border-color: var(--vscode-button-border, transparent);\n border-left-width: var(--vsc-border-left-width, 1px);\n border-right-width: var(--vsc-border-right-width, 1px);\n border-style: solid;\n border-top-left-radius: var(--vsc-border-left-radius, 2px);\n border-top-right-radius: var(--vsc-border-right-radius, 2px);\n border-top-width: 1px;\n box-sizing: border-box;\n color: var(--vscode-button-foreground, #ffffff);\n display: flex;\n font-family: var(--vscode-font-family, ${defaultFontStack});\n font-size: var(--vscode-font-size, 13px);\n font-weight: var(--vscode-font-weight, normal);\n height: 100%;\n justify-content: center;\n line-height: 22px;\n overflow: hidden;\n padding: 1px calc(13px + var(--vsc-base-additional-right-padding, 0px))\n 1px 13px;\n position: relative;\n user-select: none;\n white-space: nowrap;\n width: 100%;\n }\n\n :host([block]) .base {\n min-height: 28px;\n text-align: center;\n width: 100%;\n }\n\n .base:after {\n background-color: var(\n --vscode-button-separator,\n rgba(255, 255, 255, 0.4)\n );\n content: var(--vsc-base-after-content);\n display: var(--vsc-divider-display, none);\n position: absolute;\n right: 0;\n top: 4px;\n bottom: 4px;\n width: 1px;\n }\n\n :host([secondary]) .base:after {\n background-color: var(--vscode-button-secondaryForeground, #cccccc);\n opacity: 0.4;\n }\n\n :host([secondary]) .base {\n color: var(--vscode-button-secondaryForeground, #cccccc);\n background-color: var(--vscode-button-secondaryBackground, #313131);\n border-color: var(\n --vscode-button-border,\n var(--vscode-button-secondaryBackground, rgba(255, 255, 255, 0.07))\n );\n }\n\n :host([disabled]) {\n cursor: default;\n opacity: 0.4;\n pointer-events: none;\n }\n\n :host(:hover) .base {\n background-color: var(--vscode-button-hoverBackground, #026ec1);\n }\n\n :host([disabled]:hover) .base {\n background-color: var(--vscode-button-background, #0078d4);\n }\n\n :host([secondary]:hover) .base {\n background-color: var(--vscode-button-secondaryHoverBackground, #3c3c3c);\n }\n\n :host([secondary][disabled]:hover) .base {\n background-color: var(--vscode-button-secondaryBackground, #313131);\n }\n\n :host(:focus),\n :host(:active) {\n outline: none;\n }\n\n :host(:focus) .base {\n background-color: var(--vscode-button-hoverBackground, #026ec1);\n outline: 1px solid var(--vscode-focusBorder, #0078d4);\n outline-offset: 2px;\n }\n\n :host([disabled]:focus) .base {\n background-color: var(--vscode-button-background, #0078d4);\n outline: 0;\n }\n\n :host([secondary]:focus) .base {\n background-color: var(--vscode-button-secondaryHoverBackground, #3c3c3c);\n }\n\n :host([secondary][disabled]:focus) .base {\n background-color: var(--vscode-button-secondaryBackground, #313131);\n }\n\n ::slotted(*) {\n display: inline-block;\n margin-left: 4px;\n margin-right: 4px;\n }\n\n ::slotted(*:first-child) {\n margin-left: 0;\n }\n\n ::slotted(*:last-child) {\n margin-right: 0;\n }\n\n ::slotted(vscode-icon) {\n color: inherit;\n }\n\n .content {\n display: flex;\n position: relative;\n width: 100%;\n height: 100%;\n padding: 1px 13px;\n }\n\n :host(:empty) .base,\n .base.icon-only {\n min-height: 24px;\n min-width: 26px;\n padding: 1px 4px;\n }\n\n slot {\n align-items: center;\n display: flex;\n height: 100%;\n }\n\n .has-content-before slot[name='content-before'] {\n margin-right: 4px;\n }\n\n .has-content-after slot[name='content-after'] {\n margin-left: 4px;\n }\n\n .icon,\n .icon-after {\n color: inherit;\n display: block;\n }\n\n :host(:not(:empty)) .icon {\n margin-right: 3px;\n }\n\n :host(:not(:empty)) .icon-after,\n :host([icon]) .icon-after {\n margin-left: 3px;\n }\n `,\n];\n\nexport default styles;\n"]}
1
+ {"version":3,"file":"vscode-button.styles.js","sourceRoot":"","sources":["../../src/vscode-button/vscode-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAkB,SAAS,EAAC,MAAM,KAAK,CAAC;AACnD,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAC;AAE3D,MAAM,gBAAgB,GAAG,SAAS,CAAC,mBAAmB,EAAE,CAAC,CAAC;AAE1D,MAAM,MAAM,GAAmB;IAC7B,aAAa;IACb,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CA4B0C,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4J5D;CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import {css, CSSResultGroup, unsafeCSS} from 'lit';\nimport defaultStyles from '../includes/default.styles.js';\nimport {getDefaultFontStack} from '../includes/helpers.js';\n\nconst defaultFontStack = unsafeCSS(getDefaultFontStack());\n\nconst styles: CSSResultGroup = [\n defaultStyles,\n css`\n :host {\n cursor: pointer;\n display: inline-block;\n width: auto;\n }\n\n :host([block]) {\n display: block;\n width: 100%;\n }\n\n .base {\n align-items: center;\n background-color: var(--vscode-button-background, #0078d4);\n border-bottom-left-radius: var(--vsc-border-left-radius, 4px);\n border-bottom-right-radius: var(--vsc-border-right-radius, 4px);\n border-bottom-width: 1px;\n border-color: var(--vscode-button-border, transparent);\n border-left-width: var(--vsc-border-left-width, 1px);\n border-right-width: var(--vsc-border-right-width, 1px);\n border-style: solid;\n border-top-left-radius: var(--vsc-border-left-radius, 4px);\n border-top-right-radius: var(--vsc-border-right-radius, 4px);\n border-top-width: 1px;\n box-sizing: border-box;\n color: var(--vscode-button-foreground, #ffffff);\n display: flex;\n font-family: var(--vscode-font-family, ${defaultFontStack});\n font-size: var(--vscode-font-size, 13px);\n font-weight: var(--vscode-font-weight, normal);\n height: 100%;\n justify-content: center;\n line-height: 22px;\n overflow: hidden;\n padding: 1px calc(13px + var(--vsc-base-additional-right-padding, 0px))\n 1px 13px;\n position: relative;\n user-select: none;\n white-space: nowrap;\n width: 100%;\n }\n\n :host([block]) .base {\n min-height: 28px;\n text-align: center;\n width: 100%;\n }\n\n .base:after {\n background-color: var(\n --vscode-button-separator,\n rgba(255, 255, 255, 0.4)\n );\n content: var(--vsc-base-after-content);\n display: var(--vsc-divider-display, none);\n position: absolute;\n right: 0;\n top: 4px;\n bottom: 4px;\n width: 1px;\n }\n\n :host([secondary]) .base:after {\n background-color: var(--vscode-button-secondaryForeground, #cccccc);\n opacity: 0.4;\n }\n\n :host([secondary]) .base {\n color: var(--vscode-button-secondaryForeground, #cccccc);\n background-color: var(--vscode-button-secondaryBackground, #313131);\n border-color: var(\n --vscode-button-border,\n var(--vscode-button-secondaryBackground, rgba(255, 255, 255, 0.07))\n );\n }\n\n :host([disabled]) {\n cursor: default;\n opacity: 0.4;\n pointer-events: none;\n }\n\n :host(:hover) .base {\n background-color: var(--vscode-button-hoverBackground, #026ec1);\n }\n\n :host([disabled]:hover) .base {\n background-color: var(--vscode-button-background, #0078d4);\n }\n\n :host([secondary]:hover) .base {\n background-color: var(--vscode-button-secondaryHoverBackground, #3c3c3c);\n }\n\n :host([secondary][disabled]:hover) .base {\n background-color: var(--vscode-button-secondaryBackground, #313131);\n }\n\n :host(:focus),\n :host(:active) {\n outline: none;\n }\n\n :host(:focus) .base {\n background-color: var(--vscode-button-hoverBackground, #026ec1);\n outline: 1px solid var(--vscode-focusBorder, #0078d4);\n outline-offset: 2px;\n }\n\n :host([disabled]:focus) .base {\n background-color: var(--vscode-button-background, #0078d4);\n outline: 0;\n }\n\n :host([secondary]:focus) .base {\n background-color: var(--vscode-button-secondaryHoverBackground, #3c3c3c);\n }\n\n :host([secondary][disabled]:focus) .base {\n background-color: var(--vscode-button-secondaryBackground, #313131);\n }\n\n ::slotted(*) {\n display: inline-block;\n margin-left: 4px;\n margin-right: 4px;\n }\n\n ::slotted(*:first-child) {\n margin-left: 0;\n }\n\n ::slotted(*:last-child) {\n margin-right: 0;\n }\n\n ::slotted(vscode-icon) {\n color: inherit;\n }\n\n .content {\n display: flex;\n position: relative;\n width: 100%;\n height: 100%;\n padding: 1px 13px;\n }\n\n :host(:empty) .base,\n .base.icon-only {\n min-height: 24px;\n min-width: 26px;\n padding: 1px 4px;\n }\n\n slot {\n align-items: center;\n display: flex;\n height: 100%;\n }\n\n .has-content-before slot[name='content-before'] {\n margin-right: 4px;\n }\n\n .has-content-after slot[name='content-after'] {\n margin-left: 4px;\n }\n\n .icon,\n .icon-after {\n color: inherit;\n display: block;\n }\n\n :host(:not(:empty)) .icon {\n margin-right: 3px;\n }\n\n :host(:not(:empty)) .icon-after,\n :host([icon]) .icon-after {\n margin-left: 3px;\n }\n `,\n];\n\nexport default styles;\n"]}
@@ -233,7 +233,7 @@ let VscodeCheckbox = class VscodeCheckbox extends LabelledCheckboxOrRadioMixin(F
233
233
  role=${ifDefined(this.toggle ? 'switch' : undefined)}
234
234
  aria-checked=${ifDefined(this.toggle ? (this.checked ? 'true' : 'false') : undefined)}
235
235
  value=${this.value}
236
- >
236
+ />
237
237
  <div class=${iconClasses}>${iconContent}</div>
238
238
  <label for="input" class="label" @click=${this._handleClick}>
239
239
  <span class=${labelInnerClasses}>
@@ -1 +1 @@
1
- {"version":3,"file":"vscode-checkbox.js","sourceRoot":"","sources":["../../src/vscode-checkbox/vscode-checkbox.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,aAAa,EAAC,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAC,oBAAoB,EAAC,MAAM,wDAAwD,CAAC;AAC5F,OAAO,EAAC,4BAA4B,EAAC,MAAM,2DAA2D,CAAC;AACvG,OAAO,MAAM,MAAM,6BAA6B,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEI,IAAM,cAAc,GAApB,MAAM,cACX,SAAQ,4BAA4B,CAAC,oBAAoB,CAAC;IAuB1D,IAAI,OAAO,CAAC,MAAe;QACzB,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC;QACvB,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IACD,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAuCD,IAAI,QAAQ,CAAC,MAAe;QAC1B,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC;QACxB,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IACD,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;I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I,EAAC,CAAC;6CAKxC;AAWD;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAC,CAAC;sDAChD;AAGvB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;+CACzB;AAGhB;IADC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;4CACW;AAMrC;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;8CAC1B;AAUf;IADC,QAAQ,EAAE;6CACA;AAGX;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;gDACxB;AAGjB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;qDACnB;AAGtB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;8CAKxC;AAYD;IADC,QAAQ,EAAE;4CACO;AAuEV;IADP,KAAK,CAAC,QAAQ,CAAC;gDACoB;AA7JzB,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAyR1B","sourcesContent":["import {html, LitElement, nothing, TemplateResult} from 'lit';\nimport {ifDefined} from 'lit/directives/if-defined.js';\nimport {property, query} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../includes/VscElement.js';\nimport {FormButtonWidgetBase} from '../includes/form-button-widget/FormButtonWidgetBase.js';\nimport {LabelledCheckboxOrRadioMixin} from '../includes/form-button-widget/LabelledCheckboxOrRadio.js';\nimport styles from './vscode-checkbox.styles.js';\nimport {AssociatedFormControl} from '../includes/AssociatedFormControl.js';\n\n/**\n * Allows users to select one or more options from a set. When participating in a form, it supports\n * the `:invalid` pseudo class. Otherwise the error styles can be applied through the `invalid`\n * property.\n *\n * @tag vscode-checkbox\n *\n * @attr name - Name which is used as a variable name in the data of the form-container.\n * @attr label - Attribute pair of the `label` property.\n * @prop label - Label text. It is only applied if component's innerHTML doesn't contain any text.\n *\n * @fires {Event} change - Dispatched when checked state is changed. The event is bubbled, so it can be listened on a parent element like the `CheckboxGroup`.\n * @fires {Event} invalid - Dispatched when the element is invalid and `checkValidity()` has been called or the form containing this element is submitted.\n *\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event)\n *\n * @cssprop [--vscode-font-family=sans-serif]\n * @cssprop [--vscode-font-size=13px]\n * @cssprop [--vscode-font-weight=normal]\n * @cssprop [--vscode-foreground=#cccccc]\n * @cssprop [--vscode-settings-checkboxBackground=#313131]\n * @cssprop [--vscode-settings-checkboxBorder=#3c3c3c]\n * @cssprop [--vscode-settings-checkboxForeground=#cccccc]\n * @cssprop [--vscode-focusBorder=#0078d4]\n * @cssprop [--vscode-inputValidation-errorBackground=#5a1d1d]\n * @cssprop [--vscode-inputValidation-errorBorder=#be1100]\n */\n@customElement('vscode-checkbox')\nexport class VscodeCheckbox\n extends LabelledCheckboxOrRadioMixin(FormButtonWidgetBase)\n implements AssociatedFormControl\n{\n static override styles = styles;\n\n /** @internal */\n static formAssociated = true;\n\n /** @internal */\n static override shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /**\n * Automatically focus on the element when the page loads.\n *\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus)\n */\n @property({type: Boolean, reflect: true})\n override autofocus = false;\n\n @property({type: Boolean, reflect: true})\n set checked(newVal: boolean) {\n this._checked = newVal;\n this._manageRequired();\n this.requestUpdate();\n }\n get checked(): boolean {\n return this._checked;\n }\n\n private _checked = false;\n\n /**\n * The element's initial checked state, which will be restored when the containing form is reset.\n */\n @property({type: Boolean, reflect: true, attribute: 'default-checked'})\n defaultChecked = false;\n\n @property({type: Boolean, reflect: true})\n invalid = false;\n\n @property({reflect: true})\n name: string | undefined = undefined;\n\n /**\n * When true, renders as a toggle switch instead of a checkbox.\n */\n @property({type: Boolean, reflect: true})\n toggle = false;\n\n /**\n * Associate a value to the checkbox. According to the native checkbox [specification](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#value_2), If the component participates in a form:\n *\n * - If it is unchecked, the value will not be submitted.\n * - If it is checked but the value is not set, `on` will be submitted.\n * - If it is checked and value is set, the value will be submitted.\n */\n @property()\n value = '';\n\n @property({type: Boolean, reflect: true})\n disabled = false;\n\n @property({type: Boolean, reflect: true})\n indeterminate = false;\n\n @property({type: Boolean, reflect: true})\n set required(newVal: boolean) {\n this._required = newVal;\n this._manageRequired();\n this.requestUpdate();\n }\n get required() {\n return this._required;\n }\n private _required = false;\n\n get form(): HTMLFormElement | null {\n return this._internals.form;\n }\n\n /** @internal */\n @property()\n type = 'checkbox';\n\n get validity(): ValidityState {\n return this._internals.validity;\n }\n\n get validationMessage(): string {\n return this._internals.validationMessage;\n }\n\n get willValidate(): boolean {\n return this._internals.willValidate;\n }\n\n /**\n * Returns `true` if the element's value is valid; otherwise, it returns `false`.\n * If the element's value is invalid, an invalid event is triggered on the element.\n *\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checkValidity)\n */\n checkValidity(): boolean {\n return this._internals.checkValidity();\n }\n\n /**\n * Returns `true` if the element's value is valid; otherwise, it returns `false`.\n * If the element's value is invalid, an invalid event is triggered on the element, and the\n * browser displays an error message to the user.\n *\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/reportValidity)\n */\n reportValidity(): boolean {\n return this._internals.reportValidity();\n }\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n\n this.addEventListener('keydown', this._handleKeyDown);\n\n this.updateComplete.then(() => {\n this._manageRequired();\n this._setActualFormValue();\n });\n }\n\n override disconnectedCallback(): void {\n this.removeEventListener('keydown', this._handleKeyDown);\n }\n\n /** @internal */\n formResetCallback(): void {\n this.checked = this.defaultChecked;\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string,\n _mode: 'restore' | 'autocomplete'\n ): void {\n if (state) {\n this.checked = true;\n }\n }\n\n @query('#input')\n private _inputEl!: HTMLInputElement;\n\n private _internals: ElementInternals;\n\n // Sets the value of the control according to the native checkbox behavior.\n // - If the checkbox is unchecked, the value will be null, so the control will\n // excluded from the form.\n // - If the control is checked but the value is not set, the value will be \"on\".\n // - If the control is checked and value is set, the value won't be changed.\n private _setActualFormValue() {\n let actualValue: string | null = '';\n\n if (this.checked) {\n actualValue = !this.value ? 'on' : this.value;\n } else {\n actualValue = null;\n }\n\n this._internals.setFormValue(actualValue);\n }\n\n private _toggleState() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this._setActualFormValue();\n this._manageRequired();\n this.dispatchEvent(new Event('change', {bubbles: true}));\n }\n\n private _handleClick = (ev: MouseEvent): void => {\n ev.preventDefault();\n\n if (this.disabled) {\n return;\n }\n\n this._toggleState();\n };\n\n private _handleKeyDown = (ev: KeyboardEvent): void => {\n if (!this.disabled && (ev.key === 'Enter' || ev.key === ' ')) {\n ev.preventDefault();\n\n if (ev.key === ' ') {\n this._toggleState();\n }\n\n if (ev.key === 'Enter') {\n this._internals.form?.requestSubmit();\n }\n }\n };\n\n private _manageRequired() {\n if (!this.checked && this.required) {\n this._internals.setValidity(\n {\n valueMissing: true,\n },\n 'Please check this box if you want to proceed.',\n this._inputEl ?? undefined\n );\n } else {\n this._internals.setValidity({});\n }\n }\n\n override render(): TemplateResult {\n const iconClasses = classMap({\n icon: true,\n checked: this.checked,\n indeterminate: this.indeterminate,\n });\n const labelInnerClasses = classMap({\n 'label-inner': true,\n });\n\n const icon = html`<svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n class=\"check-icon\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z\"\n />\n </svg>`;\n const check = this.checked && !this.indeterminate ? icon : nothing;\n const indeterminate = this.indeterminate\n ? html`<span class=\"indeterminate-icon\"></span>`\n : nothing;\n\n const iconContent = this.toggle\n ? html`<span class=\"thumb\"></span>`\n : html`${indeterminate}${check}`;\n\n return html`\n <div class=\"wrapper\">\n <input\n ?autofocus=${this.autofocus}\n id=\"input\"\n class=\"checkbox\"\n type=\"checkbox\"\n ?checked=${this.checked}\n role=${ifDefined(this.toggle ? 'switch' : undefined)}\n aria-checked=${ifDefined(\n this.toggle ? (this.checked ? 'true' : 'false') : undefined\n )}\n value=${this.value}\n >\n <div class=${iconClasses}>${iconContent}</div>\n <label for=\"input\" class=\"label\" @click=${this._handleClick}>\n <span class=${labelInnerClasses}>\n ${this._renderLabelAttribute()}\n <slot @slotchange=${this._handleSlotChange}></slot>\n </span>\n </label>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'vscode-checkbox': VscodeCheckbox;\n }\n}\n"]}
1
+ {"version":3,"file":"vscode-checkbox.js","sourceRoot":"","sources":["../../src/vscode-checkbox/vscode-checkbox.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,aAAa,EAAC,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAC,oBAAoB,EAAC,MAAM,wDAAwD,CAAC;AAC5F,OAAO,EAAC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C,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;qDACnB;AAGtB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;8CAKxC;AAYD;IADC,QAAQ,EAAE;4CACO;AAuEV;IADP,KAAK,CAAC,QAAQ,CAAC;gDACoB;AA7JzB,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAyR1B","sourcesContent":["import {html, LitElement, nothing, TemplateResult} from 'lit';\nimport {ifDefined} from 'lit/directives/if-defined.js';\nimport {property, query} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../includes/VscElement.js';\nimport {FormButtonWidgetBase} from '../includes/form-button-widget/FormButtonWidgetBase.js';\nimport {LabelledCheckboxOrRadioMixin} from '../includes/form-button-widget/LabelledCheckboxOrRadio.js';\nimport styles from './vscode-checkbox.styles.js';\nimport {AssociatedFormControl} from '../includes/AssociatedFormControl.js';\n\n/**\n * Allows users to select one or more options from a set. When participating in a form, it supports\n * the `:invalid` pseudo class. Otherwise the error styles can be applied through the `invalid`\n * property.\n *\n * @tag vscode-checkbox\n *\n * @attr name - Name which is used as a variable name in the data of the form-container.\n * @attr label - Attribute pair of the `label` property.\n * @prop label - Label text. It is only applied if component's innerHTML doesn't contain any text.\n *\n * @fires {Event} change - Dispatched when checked state is changed. The event is bubbled, so it can be listened on a parent element like the `CheckboxGroup`.\n * @fires {Event} invalid - Dispatched when the element is invalid and `checkValidity()` has been called or the form containing this element is submitted.\n *\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event)\n *\n * @cssprop [--vscode-font-family=sans-serif]\n * @cssprop [--vscode-font-size=13px]\n * @cssprop [--vscode-font-weight=normal]\n * @cssprop [--vscode-foreground=#cccccc]\n * @cssprop [--vscode-settings-checkboxBackground=#313131]\n * @cssprop [--vscode-settings-checkboxBorder=#3c3c3c]\n * @cssprop [--vscode-settings-checkboxForeground=#cccccc]\n * @cssprop [--vscode-focusBorder=#0078d4]\n * @cssprop [--vscode-inputValidation-errorBackground=#5a1d1d]\n * @cssprop [--vscode-inputValidation-errorBorder=#be1100]\n */\n@customElement('vscode-checkbox')\nexport class VscodeCheckbox\n extends LabelledCheckboxOrRadioMixin(FormButtonWidgetBase)\n implements AssociatedFormControl\n{\n static override styles = styles;\n\n /** @internal */\n static formAssociated = true;\n\n /** @internal */\n static override shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /**\n * Automatically focus on the element when the page loads.\n *\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus)\n */\n @property({type: Boolean, reflect: true})\n override autofocus = false;\n\n @property({type: Boolean, reflect: true})\n set checked(newVal: boolean) {\n this._checked = newVal;\n this._manageRequired();\n this.requestUpdate();\n }\n get checked(): boolean {\n return this._checked;\n }\n\n private _checked = false;\n\n /**\n * The element's initial checked state, which will be restored when the containing form is reset.\n */\n @property({type: Boolean, reflect: true, attribute: 'default-checked'})\n defaultChecked = false;\n\n @property({type: Boolean, reflect: true})\n invalid = false;\n\n @property({reflect: true})\n name: string | undefined = undefined;\n\n /**\n * When true, renders as a toggle switch instead of a checkbox.\n */\n @property({type: Boolean, reflect: true})\n toggle = false;\n\n /**\n * Associate a value to the checkbox. According to the native checkbox [specification](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#value_2), If the component participates in a form:\n *\n * - If it is unchecked, the value will not be submitted.\n * - If it is checked but the value is not set, `on` will be submitted.\n * - If it is checked and value is set, the value will be submitted.\n */\n @property()\n value = '';\n\n @property({type: Boolean, reflect: true})\n disabled = false;\n\n @property({type: Boolean, reflect: true})\n indeterminate = false;\n\n @property({type: Boolean, reflect: true})\n set required(newVal: boolean) {\n this._required = newVal;\n this._manageRequired();\n this.requestUpdate();\n }\n get required() {\n return this._required;\n }\n private _required = false;\n\n get form(): HTMLFormElement | null {\n return this._internals.form;\n }\n\n /** @internal */\n @property()\n type = 'checkbox';\n\n get validity(): ValidityState {\n return this._internals.validity;\n }\n\n get validationMessage(): string {\n return this._internals.validationMessage;\n }\n\n get willValidate(): boolean {\n return this._internals.willValidate;\n }\n\n /**\n * Returns `true` if the element's value is valid; otherwise, it returns `false`.\n * If the element's value is invalid, an invalid event is triggered on the element.\n *\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checkValidity)\n */\n checkValidity(): boolean {\n return this._internals.checkValidity();\n }\n\n /**\n * Returns `true` if the element's value is valid; otherwise, it returns `false`.\n * If the element's value is invalid, an invalid event is triggered on the element, and the\n * browser displays an error message to the user.\n *\n * [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/reportValidity)\n */\n reportValidity(): boolean {\n return this._internals.reportValidity();\n }\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n\n this.addEventListener('keydown', this._handleKeyDown);\n\n this.updateComplete.then(() => {\n this._manageRequired();\n this._setActualFormValue();\n });\n }\n\n override disconnectedCallback(): void {\n this.removeEventListener('keydown', this._handleKeyDown);\n }\n\n /** @internal */\n formResetCallback(): void {\n this.checked = this.defaultChecked;\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string,\n _mode: 'restore' | 'autocomplete'\n ): void {\n if (state) {\n this.checked = true;\n }\n }\n\n @query('#input')\n private _inputEl!: HTMLInputElement;\n\n private _internals: ElementInternals;\n\n // Sets the value of the control according to the native checkbox behavior.\n // - If the checkbox is unchecked, the value will be null, so the control will\n // excluded from the form.\n // - If the control is checked but the value is not set, the value will be \"on\".\n // - If the control is checked and value is set, the value won't be changed.\n private _setActualFormValue() {\n let actualValue: string | null = '';\n\n if (this.checked) {\n actualValue = !this.value ? 'on' : this.value;\n } else {\n actualValue = null;\n }\n\n this._internals.setFormValue(actualValue);\n }\n\n private _toggleState() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this._setActualFormValue();\n this._manageRequired();\n this.dispatchEvent(new Event('change', {bubbles: true}));\n }\n\n private _handleClick = (ev: MouseEvent): void => {\n ev.preventDefault();\n\n if (this.disabled) {\n return;\n }\n\n this._toggleState();\n };\n\n private _handleKeyDown = (ev: KeyboardEvent): void => {\n if (!this.disabled && (ev.key === 'Enter' || ev.key === ' ')) {\n ev.preventDefault();\n\n if (ev.key === ' ') {\n this._toggleState();\n }\n\n if (ev.key === 'Enter') {\n this._internals.form?.requestSubmit();\n }\n }\n };\n\n private _manageRequired() {\n if (!this.checked && this.required) {\n this._internals.setValidity(\n {\n valueMissing: true,\n },\n 'Please check this box if you want to proceed.',\n this._inputEl ?? undefined\n );\n } else {\n this._internals.setValidity({});\n }\n }\n\n override render(): TemplateResult {\n const iconClasses = classMap({\n icon: true,\n checked: this.checked,\n indeterminate: this.indeterminate,\n });\n const labelInnerClasses = classMap({\n 'label-inner': true,\n });\n\n const icon = html`<svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n class=\"check-icon\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z\"\n />\n </svg>`;\n const check = this.checked && !this.indeterminate ? icon : nothing;\n const indeterminate = this.indeterminate\n ? html`<span class=\"indeterminate-icon\"></span>`\n : nothing;\n\n const iconContent = this.toggle\n ? html`<span class=\"thumb\"></span>`\n : html`${indeterminate}${check}`;\n\n return html`\n <div class=\"wrapper\">\n <input\n ?autofocus=${this.autofocus}\n id=\"input\"\n class=\"checkbox\"\n type=\"checkbox\"\n ?checked=${this.checked}\n role=${ifDefined(this.toggle ? 'switch' : undefined)}\n aria-checked=${ifDefined(\n this.toggle ? (this.checked ? 'true' : 'false') : undefined\n )}\n value=${this.value}\n />\n <div class=${iconClasses}>${iconContent}</div>\n <label for=\"input\" class=\"label\" @click=${this._handleClick}>\n <span class=${labelInnerClasses}>\n ${this._renderLabelAttribute()}\n <slot @slotchange=${this._handleSlotChange}></slot>\n </span>\n </label>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'vscode-checkbox': VscodeCheckbox;\n }\n}\n"]}
@@ -48,7 +48,7 @@ export declare class VscodeCollapsible extends VscElement {
48
48
  private _emitToggleEvent;
49
49
  private _onHeaderClick;
50
50
  private _onHeaderKeyDown;
51
- private _onActionClick;
51
+ private _onHeaderSlotClick;
52
52
  render(): TemplateResult;
53
53
  }
54
54
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"vscode-collapsible.d.ts","sourceRoot":"","sources":["../../src/vscode-collapsible/vscode-collapsible.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,cAAc,EAAC,MAAM,KAAK,CAAC;AAGlD,OAAO,EAAgB,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAGpE,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAC,CAAC,CAAC;AAErE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,iBAAkB,SAAQ,UAAU;IAC/C,OAAgB,MAAM,+BAAU;IAEhC;;;;OAIG;IAMH,uBAAuB,UAAS;IAEhC;;;;;OAKG;IAEM,KAAK,EAAE,MAAM,CAAM;IAE5B;;OAEG;IAEH,OAAO,SAAM;IAEb,yCAAyC;IAEzC,WAAW,SAAM;IAGjB,IAAI,UAAS;IAEb,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,cAAc;IAIb,MAAM,IAAI,cAAc;CAkDlC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,iBAAiB,CAAC;KACzC;IAED,UAAU,2BAA2B;QACnC,wBAAwB,EAAE,yBAAyB,CAAC;KACrD;CACF"}
1
+ {"version":3,"file":"vscode-collapsible.d.ts","sourceRoot":"","sources":["../../src/vscode-collapsible/vscode-collapsible.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,cAAc,EAAC,MAAM,KAAK,CAAC;AAGlD,OAAO,EAAgB,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAGpE,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAC,CAAC,CAAC;AAErE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,iBAAkB,SAAQ,UAAU;IAC/C,OAAgB,MAAM,+BAAU;IAEhC;;;;OAIG;IAMH,uBAAuB,UAAS;IAEhC;;;;;OAKG;IAEM,KAAK,EAAE,MAAM,CAAM;IAE5B;;OAEG;IAEH,OAAO,SAAM;IAEb,yCAAyC;IAEzC,WAAW,SAAM;IAGjB,IAAI,UAAS;IAEb,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,kBAAkB;IAIjB,MAAM,IAAI,cAAc;CAoDlC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,iBAAiB,CAAC;KACzC;IAED,UAAU,2BAA2B;QACnC,wBAAwB,EAAE,yBAAyB,CAAC;KACrD;CACF"}
@@ -68,7 +68,7 @@ let VscodeCollapsible = class VscodeCollapsible extends VscElement {
68
68
  this._emitToggleEvent();
69
69
  }
70
70
  }
71
- _onActionClick(event) {
71
+ _onHeaderSlotClick(event) {
72
72
  event.stopPropagation();
73
73
  }
74
74
  render() {
@@ -107,9 +107,11 @@ let VscodeCollapsible = class VscodeCollapsible extends VscElement {
107
107
  <h3 class="title">${heading}${descriptionMarkup}</h3>
108
108
  <div class="header-slots">
109
109
  <div class=${classMap(actionsClasses)}>
110
- <slot name="actions" @click=${this._onActionClick}></slot>
110
+ <slot name="actions" @click=${this._onHeaderSlotClick}></slot>
111
+ </div>
112
+ <div class="decorations">
113
+ <slot name="decorations" @click=${this._onHeaderSlotClick}></slot>
111
114
  </div>
112
- <div class="decorations"><slot name="decorations"></slot></div>
113
115
  </div>
114
116
  </div>
115
117
  <div class="collapsible-body" part="body">