scb-wc-test 0.1.361 → 0.1.362

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.
@@ -1,10 +1,10 @@
1
- import{a as x,n as _,i as w,E as f,x as k,t as E}from"../../vendor/vendor.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(s,n,i){try{customElements.get(s)||t(s,n,i)}catch(r){var a=String(r||"");if(a.indexOf("already been used")===-1&&a.indexOf("NotSupportedError")===-1)throw r}}}}catch{}})();var C=Object.defineProperty,z=Object.getOwnPropertyDescriptor,y=e=>{throw TypeError(e)},b=(e,t,s,n)=>{for(var i=n>1?void 0:n?z(t,s):t,a=e.length-1,r;a>=0;a--)(r=e[a])&&(i=(n?r(t,s,i):r(i))||i);return n&&i&&C(t,s,i),i},m=(e,t,s)=>t.has(e)||y("Cannot "+s),d=(e,t,s)=>(m(e,t,"read from private field"),s?s.call(e):t.get(e)),p=(e,t,s)=>t.has(e)?y("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),v=(e,t,s)=>(m(e,t,"access private method"),s),o,u,g,h,c;let l=class extends w{constructor(){super(...arguments),p(this,o),this.open=!1,this.ariaLabel="",p(this,h,e=>{v(this,o,g).call(this,e)||v(this,o,u).call(this)}),p(this,c,e=>{this.open&&e.key==="Escape"&&v(this,o,u).call(this)})}render(){return this.open?k`
2
- <div class="scrim" @click=${d(this,h)}>
3
- <div class="content" role="dialog" aria-modal="true" aria-label="${this.ariaLabel||f}">
1
+ import{a as x,n as b,i as w,E as _,x as k,t as E}from"../../vendor/vendor.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(i,a,s){try{customElements.get(i)||t(i,a,s)}catch(r){var n=String(r||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw r}}}}catch{}})();var S=Object.defineProperty,C=Object.getOwnPropertyDescriptor,y=e=>{throw TypeError(e)},d=(e,t,i,a)=>{for(var s=a>1?void 0:a?C(t,i):t,n=e.length-1,r;n>=0;n--)(r=e[n])&&(s=(a?r(t,i,s):r(s))||s);return a&&s&&S(t,i,s),s},m=(e,t,i)=>t.has(e)||y("Cannot "+i),p=(e,t,i)=>(m(e,t,"read from private field"),i?i.call(e):t.get(e)),u=(e,t,i)=>t.has(e)?y("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),v=(e,t,i)=>(m(e,t,"access private method"),i),c,h,g,f,l;let o=class extends w{constructor(){super(...arguments),u(this,c),this.open=!1,this.isStatic=!1,this.ariaLabel="",u(this,f,e=>{this.isStatic||v(this,c,g).call(this,e)||v(this,c,h).call(this)}),u(this,l,e=>{this.open&&e.key==="Escape"&&v(this,c,h).call(this)})}render(){return this.open?k`
2
+ <div class="scrim" @click=${p(this,f)}>
3
+ <div class="content" role="dialog" aria-modal="true" aria-label="${this.ariaLabel||_}">
4
4
  <slot></slot>
5
5
  </div>
6
6
  </div>
7
- `:f}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",d(this,c))}disconnectedCallback(){window.removeEventListener("keydown",d(this,c)),super.disconnectedCallback()}};o=new WeakSet;u=function(){this.open&&(this.open=!1,this.dispatchEvent(new CustomEvent("scb-overlay-dismiss",{bubbles:!0,composed:!0})))};g=function(e){const t=this.renderRoot.querySelector("slot");if(!(t instanceof HTMLSlotElement))return!1;const s=e.composedPath();return t.assignedNodes({flatten:!0}).some(i=>s.includes(i))};h=new WeakMap;c=new WeakMap;l.styles=x`
7
+ `:_}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",p(this,l))}disconnectedCallback(){window.removeEventListener("keydown",p(this,l)),super.disconnectedCallback()}};c=new WeakSet;h=function(){this.open&&(this.isStatic||(this.open=!1,this.dispatchEvent(new CustomEvent("scb-overlay-dismiss",{bubbles:!0,composed:!0}))))};g=function(e){const t=this.renderRoot.querySelector("slot");if(!(t instanceof HTMLSlotElement))return!1;const i=e.composedPath();return t.assignedNodes({flatten:!0}).some(s=>i.includes(s))};f=new WeakMap;l=new WeakMap;o.styles=x`
8
8
  :host {
9
9
  position: fixed;
10
10
  inset: 0;
@@ -39,4 +39,4 @@ import{a as x,n as _,i as w,E as f,x as k,t as E}from"../../vendor/vendor.js";(f
39
39
  max-inline-size: 100%;
40
40
  max-block-size: 100%;
41
41
  }
42
- `;b([_({type:Boolean,reflect:!0})],l.prototype,"open",2);b([_({type:String,attribute:"aria-label"})],l.prototype,"ariaLabel",2);l=b([E("scb-overlay")],l);
42
+ `;d([b({type:Boolean,reflect:!0})],o.prototype,"open",2);d([b({type:Boolean,reflect:!0,attribute:"static"})],o.prototype,"isStatic",2);d([b({type:String,attribute:"aria-label"})],o.prototype,"ariaLabel",2);o=d([E("scb-overlay")],o);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.361",
3
+ "version": "0.1.362",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -428,5 +428,5 @@
428
428
  },
429
429
  "./mvc/*": "./mvc/*"
430
430
  },
431
- "buildHash": "586EBD00409B420F8BAFC9407DC7D9517D1263865A60AACC5828C7D248AC975D"
431
+ "buildHash": "FC9D7D265E8562DD969E6ABE139740DCD76EE8CFD602F96452AAEBD7E080971C"
432
432
  }
@@ -2,6 +2,7 @@ import { LitElement, nothing } from 'lit';
2
2
  export declare class ScbOverlay extends LitElement {
3
3
  #private;
4
4
  open: boolean;
5
+ isStatic: boolean;
5
6
  ariaLabel: string;
6
7
  static styles: import('lit').CSSResult;
7
8
  render(): import('lit-html').TemplateResult<1> | typeof nothing;
@@ -1,44 +1,44 @@
1
- import { css as k, LitElement as x, nothing as f, html as w } from "lit";
2
- import { property as m, customElement as C } from "lit/decorators.js";
3
- var z = Object.defineProperty, E = Object.getOwnPropertyDescriptor, y = (e) => {
1
+ import { css as k, LitElement as x, nothing as m, html as w } from "lit";
2
+ import { property as f, customElement as C } from "lit/decorators.js";
3
+ var S = Object.defineProperty, z = Object.getOwnPropertyDescriptor, y = (e) => {
4
4
  throw TypeError(e);
5
- }, u = (e, t, s, r) => {
6
- for (var i = r > 1 ? void 0 : r ? E(t, s) : t, l = e.length - 1, c; l >= 0; l--)
7
- (c = e[l]) && (i = (r ? c(t, s, i) : c(i)) || i);
8
- return r && i && z(t, s, i), i;
9
- }, _ = (e, t, s) => t.has(e) || y("Cannot " + s), d = (e, t, s) => (_(e, t, "read from private field"), s ? s.call(e) : t.get(e)), p = (e, t, s) => t.has(e) ? y("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), v = (e, t, s) => (_(e, t, "access private method"), s), n, h, g, b, o;
10
- let a = class extends x {
5
+ }, l = (e, t, s, a) => {
6
+ for (var i = a > 1 ? void 0 : a ? z(t, s) : t, c = e.length - 1, d; c >= 0; c--)
7
+ (d = e[c]) && (i = (a ? d(t, s, i) : d(i)) || i);
8
+ return a && i && S(t, s, i), i;
9
+ }, _ = (e, t, s) => t.has(e) || y("Cannot " + s), p = (e, t, s) => (_(e, t, "read from private field"), s ? s.call(e) : t.get(e)), v = (e, t, s) => t.has(e) ? y("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), h = (e, t, s) => (_(e, t, "access private method"), s), n, u, g, b, o;
10
+ let r = class extends x {
11
11
  constructor() {
12
- super(...arguments), p(this, n), this.open = !1, this.ariaLabel = "", p(this, b, (e) => {
13
- v(this, n, g).call(this, e) || v(this, n, h).call(this);
14
- }), p(this, o, (e) => {
15
- this.open && e.key === "Escape" && v(this, n, h).call(this);
12
+ super(...arguments), v(this, n), this.open = !1, this.isStatic = !1, this.ariaLabel = "", v(this, b, (e) => {
13
+ this.isStatic || h(this, n, g).call(this, e) || h(this, n, u).call(this);
14
+ }), v(this, o, (e) => {
15
+ this.open && e.key === "Escape" && h(this, n, u).call(this);
16
16
  });
17
17
  }
18
18
  render() {
19
19
  return this.open ? w`
20
- <div class="scrim" @click=${d(this, b)}>
21
- <div class="content" role="dialog" aria-modal="true" aria-label="${this.ariaLabel || f}">
20
+ <div class="scrim" @click=${p(this, b)}>
21
+ <div class="content" role="dialog" aria-modal="true" aria-label="${this.ariaLabel || m}">
22
22
  <slot></slot>
23
23
  </div>
24
24
  </div>
25
- ` : f;
25
+ ` : m;
26
26
  }
27
27
  connectedCallback() {
28
- super.connectedCallback(), window.addEventListener("keydown", d(this, o));
28
+ super.connectedCallback(), window.addEventListener("keydown", p(this, o));
29
29
  }
30
30
  disconnectedCallback() {
31
- window.removeEventListener("keydown", d(this, o)), super.disconnectedCallback();
31
+ window.removeEventListener("keydown", p(this, o)), super.disconnectedCallback();
32
32
  }
33
33
  };
34
34
  n = /* @__PURE__ */ new WeakSet();
35
- h = function() {
36
- this.open && (this.open = !1, this.dispatchEvent(
35
+ u = function() {
36
+ this.open && (this.isStatic || (this.open = !1, this.dispatchEvent(
37
37
  new CustomEvent("scb-overlay-dismiss", {
38
38
  bubbles: !0,
39
39
  composed: !0
40
40
  })
41
- ));
41
+ )));
42
42
  };
43
43
  g = function(e) {
44
44
  const t = this.renderRoot.querySelector("slot");
@@ -48,7 +48,7 @@ g = function(e) {
48
48
  };
49
49
  b = /* @__PURE__ */ new WeakMap();
50
50
  o = /* @__PURE__ */ new WeakMap();
51
- a.styles = k`
51
+ r.styles = k`
52
52
  :host {
53
53
  position: fixed;
54
54
  inset: 0;
@@ -84,15 +84,18 @@ a.styles = k`
84
84
  max-block-size: 100%;
85
85
  }
86
86
  `;
87
- u([
88
- m({ type: Boolean, reflect: !0 })
89
- ], a.prototype, "open", 2);
90
- u([
91
- m({ type: String, attribute: "aria-label" })
92
- ], a.prototype, "ariaLabel", 2);
93
- a = u([
87
+ l([
88
+ f({ type: Boolean, reflect: !0 })
89
+ ], r.prototype, "open", 2);
90
+ l([
91
+ f({ type: Boolean, reflect: !0, attribute: "static" })
92
+ ], r.prototype, "isStatic", 2);
93
+ l([
94
+ f({ type: String, attribute: "aria-label" })
95
+ ], r.prototype, "ariaLabel", 2);
96
+ r = l([
94
97
  C("scb-overlay")
95
- ], a);
98
+ ], r);
96
99
  export {
97
- a as ScbOverlay
100
+ r as ScbOverlay
98
101
  };