@navservice/web-components 1.0.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.
@@ -0,0 +1,629 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+
3
+ if(typeof exports === 'object' && typeof module === 'object') {
4
+ module.exports = factory();
5
+ }else if(typeof define === 'function' && define.amd) {
6
+
7
+ define([], factory);
8
+
9
+ } else {
10
+ var a = factory();
11
+
12
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
13
+
14
+ }
15
+
16
+ })(globalThis, () => {
17
+ return (() => {
18
+ "use strict";
19
+ // The require scope
20
+ var __webpack_require__ = {};
21
+
22
+ // webpack/runtime/define_property_getters
23
+ (() => {
24
+ __webpack_require__.d = (exports, definition) => {
25
+ for(var key in definition) {
26
+ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
27
+ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
28
+ }
29
+ }
30
+ };
31
+ })();
32
+ // webpack/runtime/has_own_property
33
+ (() => {
34
+ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
35
+ })();
36
+ // webpack/runtime/make_namespace_object
37
+ (() => {
38
+ // define __esModule on exports
39
+ __webpack_require__.r = (exports) => {
40
+ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
41
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
42
+ }
43
+ Object.defineProperty(exports, '__esModule', { value: true });
44
+ };
45
+ })();
46
+ var __webpack_exports__ = {};
47
+ // ESM COMPAT FLAG
48
+ __webpack_require__.r(__webpack_exports__);
49
+
50
+ // EXPORTS
51
+ __webpack_require__.d(__webpack_exports__, {
52
+ MyElement: () => (/* reexport */ MyElement)
53
+ });
54
+
55
+ ;// CONCATENATED MODULE: ./src/index.css
56
+ // extracted by css-extract-rspack-plugin
57
+
58
+ ;// CONCATENATED MODULE: ./node_modules/@lit/reactive-element/css-tag.js
59
+ /**
60
+ * @license
61
+ * Copyright 2019 Google LLC
62
+ * SPDX-License-Identifier: BSD-3-Clause
63
+ */
64
+ const css_tag_t=globalThis,css_tag_e=css_tag_t.ShadowRoot&&(void 0===css_tag_t.ShadyCSS||css_tag_t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,css_tag_s=Symbol(),css_tag_o=new WeakMap;class css_tag_n{constructor(t,e,o){if(this._$cssResult$=!0,o!==css_tag_s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(css_tag_e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=css_tag_o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&css_tag_o.set(s,t))}return t}toString(){return this.cssText}}const css_tag_r=t=>new css_tag_n("string"==typeof t?t:t+"",void 0,css_tag_s),css_tag_i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>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.")})(s)+t[o+1],t[0]);return new css_tag_n(o,t,css_tag_s)},S=(s,o)=>{if(css_tag_e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),n=css_tag_t.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},css_tag_c=css_tag_e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return css_tag_r(e)})(t):t;
65
+ //# sourceMappingURL=css-tag.js.map
66
+
67
+ ;// CONCATENATED MODULE: ./node_modules/@lit/reactive-element/reactive-element.js
68
+
69
+ /**
70
+ * @license
71
+ * Copyright 2017 Google LLC
72
+ * SPDX-License-Identifier: BSD-3-Clause
73
+ */const{is:reactive_element_i,defineProperty:reactive_element_e,getOwnPropertyDescriptor:reactive_element_h,getOwnPropertyNames:reactive_element_r,getOwnPropertySymbols:reactive_element_o,getPrototypeOf:reactive_element_n}=Object,reactive_element_a=globalThis,reactive_element_c=reactive_element_a.trustedTypes,reactive_element_l=reactive_element_c?reactive_element_c.emptyScript:"",p=reactive_element_a.reactiveElementPolyfillSupport,reactive_element_d=(t,s)=>t,reactive_element_u={toAttribute(t,s){switch(s){case Boolean:t=t?reactive_element_l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){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}},reactive_element_f=(t,s)=>!reactive_element_i(t,s),b={attribute:!0,type:String,converter:reactive_element_u,reflect:!1,useDefault:!1,hasChanged:reactive_element_f};Symbol.metadata??=Symbol("metadata"),reactive_element_a.litPropertyMetadata??=new WeakMap;class y 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,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&reactive_element_e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=reactive_element_h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(reactive_element_d("elementProperties")))return;const t=reactive_element_n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(reactive_element_d("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(reactive_element_d("properties"))){const t=this.properties,s=[...reactive_element_r(t),...reactive_element_o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(css_tag_c(s))}else void 0!==s&&i.push(css_tag_c(s));return i}static _$Eu(t,s){const i=s.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,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S(t,this.constructor.elementStyles),t}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,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:reactive_element_u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:reactive_element_u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??reactive_element_f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&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,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}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){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[reactive_element_d("elementProperties")]=new Map,y[reactive_element_d("finalized")]=new Map,p?.({ReactiveElement:y}),(reactive_element_a.reactiveElementVersions??=[]).push("2.1.2");
74
+ //# sourceMappingURL=reactive-element.js.map
75
+
76
+ ;// CONCATENATED MODULE: ./node_modules/lit-html/lit-html.js
77
+ /**
78
+ * @license
79
+ * Copyright 2017 Google LLC
80
+ * SPDX-License-Identifier: BSD-3-Clause
81
+ */
82
+ const lit_html_t=globalThis,lit_html_i=t=>t,lit_html_s=lit_html_t.trustedTypes,lit_html_e=lit_html_s?lit_html_s.createPolicy("lit-html",{createHTML:t=>t}):void 0,lit_html_h="$lit$",lit_html_o=`lit$${Math.random().toFixed(9).slice(2)}$`,lit_html_n="?"+lit_html_o,lit_html_r=`<${lit_html_n}>`,lit_html_l=document,lit_html_c=()=>lit_html_l.createComment(""),lit_html_a=t=>null===t||"object"!=typeof t&&"function"!=typeof t,lit_html_u=Array.isArray,lit_html_d=t=>lit_html_u(t)||"function"==typeof t?.[Symbol.iterator],lit_html_f="[ \t\n\f\r]",lit_html_v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,lit_html_p=RegExp(`>|${lit_html_f}(?:([^\\s"'>=/]+)(${lit_html_f}*=${lit_html_f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,lit_html_y=/^(?:script|style|textarea|title)$/i,lit_html_x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),lit_html_b=lit_html_x(1),w=lit_html_x(2),T=lit_html_x(3),E=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),C=new WeakMap,P=lit_html_l.createTreeWalker(lit_html_l,129);function V(t,i){if(!lit_html_u(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==lit_html_e?lit_html_e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?"<svg>":3===i?"<math>":"",c=lit_html_v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===lit_html_v?"!--"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(lit_html_y.test(u[2])&&(n=RegExp("</"+u[2],"g")),c=lit_html_p):void 0!==u[3]&&(c=lit_html_p):c===lit_html_p?">"===u[0]?(c=n??lit_html_v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?lit_html_p:'"'===u[3]?$:g):c===$||c===g?c=lit_html_p:c===_||c===m?c=lit_html_v:(c=lit_html_p,n=void 0);const x=c===lit_html_p&&t[i+1].startsWith("/>")?" ":"";l+=c===lit_html_v?s+lit_html_r:d>=0?(e.push(a),s.slice(0,d)+lit_html_h+s.slice(d)+lit_html_o+x):s+lit_html_o+(-2===d?i:x)}return[V(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),e]};class lit_html_S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=lit_html_S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(lit_html_h)){const i=v[a++],s=r.getAttribute(t).split(lit_html_o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:"."===e[1]?I:"?"===e[1]?L:"@"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(lit_html_o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(lit_html_y.test(r.tagName)){const t=r.textContent.split(lit_html_o),i=t.length-1;if(i>0){r.textContent=lit_html_s?lit_html_s.emptyScript:"";for(let s=0;s<i;s++)r.append(t[s],lit_html_c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],lit_html_c())}}}else if(8===r.nodeType)if(r.data===lit_html_n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(lit_html_o,t+1));)d.push({type:7,index:l}),t+=lit_html_o.length-1}l++}}static createElement(t,i){const s=lit_html_l.createElement("template");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=lit_html_a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??lit_html_l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=lit_html_l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),lit_html_a(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):lit_html_d(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!==A&&lit_html_a(this._$AH)?this._$AA.nextSibling.data=t:this.T(lit_html_l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=lit_html_S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new lit_html_S(t)),i}k(t){lit_html_u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(lit_html_c()),this.O(lit_html_c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=lit_html_i(t).nextSibling;lit_html_i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!lit_html_a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!lit_html_a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??"")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&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 Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j=(/* unused pure expression or super */ null && ({M:lit_html_h,P:lit_html_o,A:lit_html_n,C:1,L:N,R,D:lit_html_d,V:M,I:k,H,N:L,U:z,B:I,F:Z})),B=lit_html_t.litHtmlPolyfillSupport;B?.(lit_html_S,k),(lit_html_t.litHtmlVersions??=[]).push("3.3.2");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(lit_html_c(),t),t,void 0,s??{})}return h._$AI(t),h};
83
+ //# sourceMappingURL=lit-html.js.map
84
+
85
+ ;// CONCATENATED MODULE: ./node_modules/lit-element/lit-element.js
86
+
87
+ /**
88
+ * @license
89
+ * Copyright 2017 Google LLC
90
+ * SPDX-License-Identifier: BSD-3-Clause
91
+ */const lit_element_s=globalThis;class lit_element_i extends y{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 r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=D(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return E}}lit_element_i._$litElement$=!0,lit_element_i["finalized"]=!0,lit_element_s.litElementHydrateSupport?.({LitElement:lit_element_i});const lit_element_o=lit_element_s.litElementPolyfillSupport;lit_element_o?.({LitElement:lit_element_i});const lit_element_n=(/* unused pure expression or super */ null && ({_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL}));(lit_element_s.litElementVersions??=[]).push("4.2.2");
92
+ //# sourceMappingURL=lit-element.js.map
93
+
94
+ ;// CONCATENATED MODULE: ./node_modules/lit/index.js
95
+
96
+ //# sourceMappingURL=index.js.map
97
+
98
+ ;// CONCATENATED MODULE: ./node_modules/@lit/reactive-element/decorators/property.js
99
+
100
+ /**
101
+ * @license
102
+ * Copyright 2017 Google LLC
103
+ * SPDX-License-Identifier: BSD-3-Clause
104
+ */const property_o={attribute:!0,type:String,converter:reactive_element_u,reflect:!1,hasChanged:reactive_element_f},property_r=(t=property_o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),"setter"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),"accessor"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t,!0,r)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t,!0,r)}}throw Error("Unsupported decorator location: "+n)};function property_n(t){return(e,o)=>"object"==typeof o?property_r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}
105
+ //# sourceMappingURL=property.js.map
106
+
107
+ ;// CONCATENATED MODULE: ./node_modules/@lit/reactive-element/decorators/state.js
108
+
109
+ /**
110
+ * @license
111
+ * Copyright 2017 Google LLC
112
+ * SPDX-License-Identifier: BSD-3-Clause
113
+ */function state_r(r){return t({...r,state:!0,attribute:!1})}
114
+ //# sourceMappingURL=state.js.map
115
+
116
+ ;// CONCATENATED MODULE: ./node_modules/lit/decorators.js
117
+
118
+ //# sourceMappingURL=decorators.js.map
119
+
120
+ ;// CONCATENATED MODULE: ./src/my-element.ts
121
+ function applyDecs2203RFactory() {
122
+ function createAddInitializerMethod(initializers, decoratorFinishedRef) {
123
+ return function addInitializer(initializer) {
124
+ assertNotFinished(decoratorFinishedRef, "addInitializer");
125
+ assertCallable(initializer, "An initializer");
126
+ initializers.push(initializer);
127
+ };
128
+ }
129
+ function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
130
+ var kindStr;
131
+ switch(kind){
132
+ case 1:
133
+ kindStr = "accessor";
134
+ break;
135
+ case 2:
136
+ kindStr = "method";
137
+ break;
138
+ case 3:
139
+ kindStr = "getter";
140
+ break;
141
+ case 4:
142
+ kindStr = "setter";
143
+ break;
144
+ default:
145
+ kindStr = "field";
146
+ }
147
+ var ctx = {
148
+ kind: kindStr,
149
+ name: isPrivate ? "#" + name : name,
150
+ static: isStatic,
151
+ private: isPrivate,
152
+ metadata: metadata
153
+ };
154
+ var decoratorFinishedRef = {
155
+ v: false
156
+ };
157
+ ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
158
+ var get, set;
159
+ if (kind === 0) {
160
+ if (isPrivate) {
161
+ get = desc.get;
162
+ set = desc.set;
163
+ } else {
164
+ get = function() {
165
+ return this[name];
166
+ };
167
+ set = function(v) {
168
+ this[name] = v;
169
+ };
170
+ }
171
+ } else if (kind === 2) {
172
+ get = function() {
173
+ return desc.value;
174
+ };
175
+ } else {
176
+ if (kind === 1 || kind === 3) {
177
+ get = function() {
178
+ return desc.get.call(this);
179
+ };
180
+ }
181
+ if (kind === 1 || kind === 4) {
182
+ set = function(v) {
183
+ desc.set.call(this, v);
184
+ };
185
+ }
186
+ }
187
+ ctx.access = get && set ? {
188
+ get: get,
189
+ set: set
190
+ } : get ? {
191
+ get: get
192
+ } : {
193
+ set: set
194
+ };
195
+ try {
196
+ return dec(value, ctx);
197
+ } finally{
198
+ decoratorFinishedRef.v = true;
199
+ }
200
+ }
201
+ function assertNotFinished(decoratorFinishedRef, fnName) {
202
+ if (decoratorFinishedRef.v) {
203
+ throw new Error("attempted to call " + fnName + " after decoration was finished");
204
+ }
205
+ }
206
+ function assertCallable(fn, hint) {
207
+ if (typeof fn !== "function") {
208
+ throw new TypeError(hint + " must be a function");
209
+ }
210
+ }
211
+ function assertValidReturnValue(kind, value) {
212
+ var type = typeof value;
213
+ if (kind === 1) {
214
+ if (type !== "object" || value === null) {
215
+ throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
216
+ }
217
+ if (value.get !== undefined) {
218
+ assertCallable(value.get, "accessor.get");
219
+ }
220
+ if (value.set !== undefined) {
221
+ assertCallable(value.set, "accessor.set");
222
+ }
223
+ if (value.init !== undefined) {
224
+ assertCallable(value.init, "accessor.init");
225
+ }
226
+ } else if (type !== "function") {
227
+ var hint;
228
+ if (kind === 0) {
229
+ hint = "field";
230
+ } else if (kind === 10) {
231
+ hint = "class";
232
+ } else {
233
+ hint = "method";
234
+ }
235
+ throw new TypeError(hint + " decorators must return a function or void 0");
236
+ }
237
+ }
238
+ function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
239
+ var decs = decInfo[0];
240
+ var desc, init, value;
241
+ if (isPrivate) {
242
+ if (kind === 0 || kind === 1) {
243
+ desc = {
244
+ get: decInfo[3],
245
+ set: decInfo[4]
246
+ };
247
+ } else if (kind === 3) {
248
+ desc = {
249
+ get: decInfo[3]
250
+ };
251
+ } else if (kind === 4) {
252
+ desc = {
253
+ set: decInfo[3]
254
+ };
255
+ } else {
256
+ desc = {
257
+ value: decInfo[3]
258
+ };
259
+ }
260
+ } else if (kind !== 0) {
261
+ desc = Object.getOwnPropertyDescriptor(base, name);
262
+ }
263
+ if (kind === 1) {
264
+ value = {
265
+ get: desc.get,
266
+ set: desc.set
267
+ };
268
+ } else if (kind === 2) {
269
+ value = desc.value;
270
+ } else if (kind === 3) {
271
+ value = desc.get;
272
+ } else if (kind === 4) {
273
+ value = desc.set;
274
+ }
275
+ var newValue, get, set;
276
+ if (typeof decs === "function") {
277
+ newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
278
+ if (newValue !== void 0) {
279
+ assertValidReturnValue(kind, newValue);
280
+ if (kind === 0) {
281
+ init = newValue;
282
+ } else if (kind === 1) {
283
+ init = newValue.init;
284
+ get = newValue.get || value.get;
285
+ set = newValue.set || value.set;
286
+ value = {
287
+ get: get,
288
+ set: set
289
+ };
290
+ } else {
291
+ value = newValue;
292
+ }
293
+ }
294
+ } else {
295
+ for(var i = decs.length - 1; i >= 0; i--){
296
+ var dec = decs[i];
297
+ newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
298
+ if (newValue !== void 0) {
299
+ assertValidReturnValue(kind, newValue);
300
+ var newInit;
301
+ if (kind === 0) {
302
+ newInit = newValue;
303
+ } else if (kind === 1) {
304
+ newInit = newValue.init;
305
+ get = newValue.get || value.get;
306
+ set = newValue.set || value.set;
307
+ value = {
308
+ get: get,
309
+ set: set
310
+ };
311
+ } else {
312
+ value = newValue;
313
+ }
314
+ if (newInit !== void 0) {
315
+ if (init === void 0) {
316
+ init = newInit;
317
+ } else if (typeof init === "function") {
318
+ init = [
319
+ init,
320
+ newInit
321
+ ];
322
+ } else {
323
+ init.push(newInit);
324
+ }
325
+ }
326
+ }
327
+ }
328
+ }
329
+ if (kind === 0 || kind === 1) {
330
+ if (init === void 0) {
331
+ init = function(instance, init) {
332
+ return init;
333
+ };
334
+ } else if (typeof init !== "function") {
335
+ var ownInitializers = init;
336
+ init = function(instance, init) {
337
+ var value = init;
338
+ for(var i = 0; i < ownInitializers.length; i++){
339
+ value = ownInitializers[i].call(instance, value);
340
+ }
341
+ return value;
342
+ };
343
+ } else {
344
+ var originalInitializer = init;
345
+ init = function(instance, init) {
346
+ return originalInitializer.call(instance, init);
347
+ };
348
+ }
349
+ ret.push(init);
350
+ }
351
+ if (kind !== 0) {
352
+ if (kind === 1) {
353
+ desc.get = value.get;
354
+ desc.set = value.set;
355
+ } else if (kind === 2) {
356
+ desc.value = value;
357
+ } else if (kind === 3) {
358
+ desc.get = value;
359
+ } else if (kind === 4) {
360
+ desc.set = value;
361
+ }
362
+ if (isPrivate) {
363
+ if (kind === 1) {
364
+ ret.push(function(instance, args) {
365
+ return value.get.call(instance, args);
366
+ });
367
+ ret.push(function(instance, args) {
368
+ return value.set.call(instance, args);
369
+ });
370
+ } else if (kind === 2) {
371
+ ret.push(value);
372
+ } else {
373
+ ret.push(function(instance, args) {
374
+ return value.call(instance, args);
375
+ });
376
+ }
377
+ } else {
378
+ Object.defineProperty(base, name, desc);
379
+ }
380
+ }
381
+ }
382
+ function applyMemberDecs(Class, decInfos, metadata) {
383
+ var ret = [];
384
+ var protoInitializers;
385
+ var staticInitializers;
386
+ var existingProtoNonFields = new Map();
387
+ var existingStaticNonFields = new Map();
388
+ for(var i = 0; i < decInfos.length; i++){
389
+ var decInfo = decInfos[i];
390
+ if (!Array.isArray(decInfo)) continue;
391
+ var kind = decInfo[1];
392
+ var name = decInfo[2];
393
+ var isPrivate = decInfo.length > 3;
394
+ var isStatic = kind >= 5;
395
+ var base;
396
+ var initializers;
397
+ if (isStatic) {
398
+ base = Class;
399
+ kind = kind - 5;
400
+ staticInitializers = staticInitializers || [];
401
+ initializers = staticInitializers;
402
+ } else {
403
+ base = Class.prototype;
404
+ protoInitializers = protoInitializers || [];
405
+ initializers = protoInitializers;
406
+ }
407
+ if (kind !== 0 && !isPrivate) {
408
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
409
+ var existingKind = existingNonFields.get(name) || 0;
410
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) {
411
+ throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
412
+ } else if (!existingKind && kind > 2) {
413
+ existingNonFields.set(name, kind);
414
+ } else {
415
+ existingNonFields.set(name, true);
416
+ }
417
+ }
418
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
419
+ }
420
+ pushInitializers(ret, protoInitializers);
421
+ pushInitializers(ret, staticInitializers);
422
+ return ret;
423
+ }
424
+ function pushInitializers(ret, initializers) {
425
+ if (initializers) {
426
+ ret.push(function(instance) {
427
+ for(var i = 0; i < initializers.length; i++){
428
+ initializers[i].call(instance);
429
+ }
430
+ return instance;
431
+ });
432
+ }
433
+ }
434
+ function applyClassDecs(targetClass, classDecs, metadata) {
435
+ if (classDecs.length > 0) {
436
+ var initializers = [];
437
+ var newClass = targetClass;
438
+ var name = targetClass.name;
439
+ for(var i = classDecs.length - 1; i >= 0; i--){
440
+ var decoratorFinishedRef = {
441
+ v: false
442
+ };
443
+ try {
444
+ var nextNewClass = classDecs[i](newClass, {
445
+ kind: "class",
446
+ name: name,
447
+ addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef),
448
+ metadata
449
+ });
450
+ } finally{
451
+ decoratorFinishedRef.v = true;
452
+ }
453
+ if (nextNewClass !== undefined) {
454
+ assertValidReturnValue(10, nextNewClass);
455
+ newClass = nextNewClass;
456
+ }
457
+ }
458
+ return [
459
+ defineMetadata(newClass, metadata),
460
+ function() {
461
+ for(var i = 0; i < initializers.length; i++){
462
+ initializers[i].call(newClass);
463
+ }
464
+ }
465
+ ];
466
+ }
467
+ }
468
+ function defineMetadata(Class, metadata) {
469
+ return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), {
470
+ configurable: true,
471
+ enumerable: true,
472
+ value: metadata
473
+ });
474
+ }
475
+ return function applyDecs2203R(targetClass, memberDecs, classDecs, parentClass) {
476
+ if (parentClass !== void 0) {
477
+ var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
478
+ }
479
+ var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
480
+ var e = applyMemberDecs(targetClass, memberDecs, metadata);
481
+ if (!classDecs.length) defineMetadata(targetClass, metadata);
482
+ return {
483
+ e: e,
484
+ get c () {
485
+ return applyClassDecs(targetClass, classDecs, metadata);
486
+ }
487
+ };
488
+ };
489
+ }
490
+ function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) {
491
+ return (_apply_decs_2203_r = applyDecs2203RFactory())(targetClass, memberDecs, classDecs, parentClass);
492
+ }
493
+ var _dec, _dec1, _init_open, _init_setOnEscClose, _initProto;
494
+
495
+
496
+ _dec = property_n({
497
+ type: Boolean
498
+ }), _dec1 = property_n({
499
+ type: Boolean
500
+ });
501
+ class MyElement extends lit_element_i {
502
+ static{
503
+ ({ e: [_init_open, _init_setOnEscClose, _initProto] } = _apply_decs_2203_r(this, [
504
+ [
505
+ _dec,
506
+ 1,
507
+ "open"
508
+ ],
509
+ [
510
+ _dec1,
511
+ 1,
512
+ "setOnEscClose"
513
+ ]
514
+ ], []));
515
+ }
516
+ #___private_open_1 = (_initProto(this), _init_open(this, false));
517
+ get open() {
518
+ return this.#___private_open_1;
519
+ }
520
+ set open(_v) {
521
+ this.#___private_open_1 = _v;
522
+ }
523
+ #___private_setOnEscClose_2 = _init_setOnEscClose(this, true);
524
+ get setOnEscClose() {
525
+ return this.#___private_setOnEscClose_2;
526
+ }
527
+ set setOnEscClose(_v) {
528
+ this.#___private_setOnEscClose_2 = _v;
529
+ }
530
+ createRenderRoot() {
531
+ return this;
532
+ }
533
+ connectedCallback() {
534
+ super.connectedCallback();
535
+ window.addEventListener('keydown', this.handleKeydown);
536
+ }
537
+ disconnectedCallback() {
538
+ window.removeEventListener('keydown', this.handleKeydown);
539
+ super.disconnectedCallback();
540
+ }
541
+ handleKeydown = (event)=>{
542
+ if (this.setOnEscClose && event.key === 'Escape' && this.open) {
543
+ this.closeModal();
544
+ }
545
+ };
546
+ openModal = ()=>{
547
+ this.open = true;
548
+ };
549
+ closeModal = ()=>{
550
+ this.open = false;
551
+ };
552
+ clearAndClose = ()=>{
553
+ console.log('Clear acionado');
554
+ this.open = false;
555
+ };
556
+ render() {
557
+ return lit_html_b`
558
+ <div class="min-h-screen flex flex-col items-center justify-center gap-3 bg-gradient-to-br from-gray-50 to-gray-100">
559
+ <h1 class="text-3xl font-semibold tracking-tight text-gray-900">
560
+ Rsbuild + Lit
561
+ </h1>
562
+ <p class="text-sm text-gray-500">
563
+ Interface minimalista, rápida e moderna.
564
+ </p>
565
+
566
+ <button
567
+ class="mt-4 inline-flex items-center justify-center rounded-lg border border-gray-300 bg-white px-5 py-2.5 text-sm font-medium text-gray-900 shadow-sm transition hover:bg-gray-50 hover:shadow-md focus:outline-none focus:ring-2 focus:ring-indigo-500"
568
+ @click=${this.openModal}
569
+ >
570
+ Abrir modal lateral
571
+ </button>
572
+ </div>
573
+
574
+ <!-- Overlay -->
575
+ <div
576
+ class="fixed inset-0 z-40 bg-black/40 backdrop-blur-sm transition-opacity duration-300
577
+ ${this.open ? 'opacity-100 pointer-events-auto' : 'opacity-0 pointer-events-none'}"
578
+ @click=${this.closeModal}
579
+ ></div>
580
+
581
+ <!-- Drawer -->
582
+ <aside
583
+ class="fixed right-0 top-0 z-50 h-full w-full max-w-md bg-white shadow-2xl
584
+ transition-transform duration-300 ease-out
585
+ ${this.open ? 'translate-x-0' : 'translate-x-full'}"
586
+ >
587
+ <div class="flex h-full flex-col p-6">
588
+ <div class="mb-4">
589
+ <h2 class="text-lg font-semibold text-gray-900">
590
+ Confirmação
591
+ </h2>
592
+ <p class="mt-1 text-sm text-gray-500">
593
+ Este é um modal lateral com UX inspirada em Vercel e Cloudflare.
594
+ </p>
595
+ </div>
596
+
597
+ <div class="flex-1"></div>
598
+
599
+ <div class="flex justify-end gap-3 border-t pt-4">
600
+ <button
601
+ class="rounded-md px-4 py-2 text-sm font-medium text-gray-600 hover:bg-gray-100 transition"
602
+ @click=${this.clearAndClose}
603
+ >
604
+ Cancelar
605
+ </button>
606
+
607
+ <button
608
+ class="rounded-md bg-indigo-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 transition"
609
+ @click=${this.closeModal}
610
+ >
611
+ Confirmar
612
+ </button>
613
+ </div>
614
+ </div>
615
+ </aside>
616
+ `;
617
+ }
618
+ }
619
+
620
+ ;// CONCATENATED MODULE: ./src/index.ts
621
+
622
+
623
+
624
+ customElements.define('my-element', MyElement);
625
+
626
+ return __webpack_exports__;
627
+ })()
628
+
629
+ });
@@ -0,0 +1,13 @@
1
+ import { LitElement } from 'lit';
2
+ export declare class MyElement extends LitElement {
3
+ accessor open: boolean;
4
+ accessor setOnEscClose: boolean;
5
+ createRenderRoot(): this;
6
+ connectedCallback(): void;
7
+ disconnectedCallback(): void;
8
+ handleKeydown: (event: KeyboardEvent) => void;
9
+ openModal: () => void;
10
+ closeModal: () => void;
11
+ clearAndClose: () => void;
12
+ render(): import("lit-html").TemplateResult<1>;
13
+ }