scb-wc-test 0.1.172 → 0.1.173

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,4 +1,4 @@
1
- import{a as f,n,i as y,E as b,x as u,t as v}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"./scb-checkbox-group.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(e,r,s){try{customElements.get(e)||i(e,r,s)}catch(l){var o=String(l||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var _=Object.defineProperty,k=Object.getOwnPropertyDescriptor,g=t=>{throw TypeError(t)},c=(t,i,e,r)=>{for(var s=r>1?void 0:r?k(i,e):i,o=t.length-1,l;o>=0;o--)(l=t[o])&&(s=(r?l(i,e,s):l(s))||s);return r&&s&&_(i,e,s),s},x=(t,i,e)=>i.has(t)||g("Cannot "+e),w=(t,i,e)=>i.has(t)?g("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),p=(t,i,e)=>(x(t,i,"access private method"),e),h,m,d;let a=class extends y{constructor(){super(),w(this,h),this._internals=null,this.disabled=!1,this.indeterminate=!1,this.checked=!1,this.label="",this.supportingText="",this.ariaLabel="",this.name="",this.value="on",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._form=null,this._formResetHandler=null,this._initialChecked=!1,this._checkboxId="","attachInternals"in this&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this._checkboxId=this.id||`scb-checkbox-${Math.random().toString(36).slice(2,11)}`,this._initialChecked=this.checked,this._form=this.closest("form"),this._form&&(this._formResetHandler=()=>{this.checked=this._initialChecked,this.indeterminate=!1,this.__syncFormValue()},this._form.addEventListener("reset",this._formResetHandler,!0)),this.__syncFormValue()}disconnectedCallback(){super.disconnectedCallback(),this._form&&this._formResetHandler&&this._form.removeEventListener("reset",this._formResetHandler,!0)}firstUpdated(){const t=this.shadowRoot?.querySelector("md-checkbox");t&&t.addEventListener("change",()=>{const e=t,r=!!e.checked,s=!!e.indeterminate;this.checked=r,this.indeterminate=s,this.dispatchEvent(new CustomEvent("change",{detail:{checked:r,indeterminate:s},bubbles:!0,composed:!0}))}),this.shadowRoot?.querySelector("label.wrap")?.addEventListener("click",e=>{if(this.disabled)return;if(!e.composedPath().some(o=>{const l=o;return l?.tagName?.toLowerCase?.()==="md-checkbox"||l?.classList?.contains("box-wrap")})){e.preventDefault();const o=this.shadowRoot.querySelector("md-checkbox");o&&(o.checked=!o.checked,o.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}}),this.__syncInnerAria(),p(this,h,m).call(this)}updated(t){super.updated(t),t.has("disabled")&&this.toggleAttribute("aria-disabled",this.disabled),(t.has("label")||t.has("supportingText")||t.has("ariaLabel"))&&this.__syncInnerAria(),(t.has("checked")||t.has("disabled")||t.has("value"))&&this.__syncFormValue(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&p(this,h,m).call(this)}formDisabledCallback(t){this.disabled=t}__syncInnerAria(){const i=this.shadowRoot?.querySelector("md-checkbox")?.shadowRoot;if(!i)return;const e=i.querySelector('[role="checkbox"]')||i.querySelector('input[type="checkbox"]');if(!e)return;const r=!!this.label?.trim(),s=r?`${this._checkboxId}-label`:"",o=this.supportingText?`${this._checkboxId}-supporting-text`:"";r&&s?(e.setAttribute("aria-labelledby",s),e.removeAttribute("aria-label")):(e.removeAttribute("aria-labelledby"),this.ariaLabel?.trim()?e.setAttribute("aria-label",this.ariaLabel.trim()):e.removeAttribute("aria-label")),o?e.setAttribute("aria-describedby",o):e.removeAttribute("aria-describedby")}__syncFormValue(){if(!this._internals)return;const t=this.disabled||!this.checked?null:this.value;this._internals.setFormValue(t)}render(){const t=this.supportingText?`${this._checkboxId}-supporting-text`:void 0,i=!!this.label?.trim(),e=i?b:this.ariaLabel||b;return u`
1
+ import{a as g,n,i as y,E as b,x as u,t as v}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"./scb-checkbox-group.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(e,a,s){try{customElements.get(e)||i(e,a,s)}catch(l){var o=String(l||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var _=Object.defineProperty,k=Object.getOwnPropertyDescriptor,f=t=>{throw TypeError(t)},c=(t,i,e,a)=>{for(var s=a>1?void 0:a?k(i,e):i,o=t.length-1,l;o>=0;o--)(l=t[o])&&(s=(a?l(i,e,s):l(s))||s);return a&&s&&_(i,e,s),s},x=(t,i,e)=>i.has(t)||f("Cannot "+e),w=(t,i,e)=>i.has(t)?f("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),p=(t,i,e)=>(x(t,i,"access private method"),e),h,m,d;let r=class extends y{constructor(){super(),w(this,h),this._internals=null,this.disabled=!1,this.indeterminate=!1,this.checked=!1,this.label="",this.supportingText="",this.ariaLabel="",this.name="",this.value="on",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._form=null,this._formResetHandler=null,this._initialChecked=!1,this._checkboxId="","attachInternals"in this&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this._checkboxId=this.id||`scb-checkbox-${Math.random().toString(36).slice(2,11)}`,this._initialChecked=this.checked,this._form=this.closest("form"),this._form&&(this._formResetHandler=()=>{this.checked=this._initialChecked,this.indeterminate=!1,this.__syncFormValue()},this._form.addEventListener("reset",this._formResetHandler,!0)),this.__syncFormValue()}disconnectedCallback(){super.disconnectedCallback(),this._form&&this._formResetHandler&&this._form.removeEventListener("reset",this._formResetHandler,!0)}firstUpdated(){const t=this.shadowRoot?.querySelector("md-checkbox");t&&t.addEventListener("change",()=>{const e=t,a=!!e.checked,s=!!e.indeterminate;this.checked=a,this.indeterminate=s,this.dispatchEvent(new CustomEvent("change",{detail:{checked:a,indeterminate:s},bubbles:!0,composed:!0}))}),this.shadowRoot?.querySelector("label.wrap")?.addEventListener("click",e=>{if(this.disabled)return;if(!e.composedPath().some(o=>{const l=o;return l?.tagName?.toLowerCase?.()==="md-checkbox"||l?.classList?.contains("box-wrap")})){e.preventDefault();const o=this.shadowRoot.querySelector("md-checkbox");o&&(o.checked=!o.checked,o.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}}),this.__syncInnerAria(),p(this,h,m).call(this)}updated(t){super.updated(t),t.has("disabled")&&this.toggleAttribute("aria-disabled",this.disabled),(t.has("label")||t.has("supportingText")||t.has("ariaLabel"))&&this.__syncInnerAria(),(t.has("checked")||t.has("disabled")||t.has("value"))&&this.__syncFormValue(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&p(this,h,m).call(this)}formDisabledCallback(t){this.disabled=t}__syncInnerAria(){const i=this.shadowRoot?.querySelector("md-checkbox")?.shadowRoot;if(!i)return;const e=i.querySelector('[role="checkbox"]')||i.querySelector('input[type="checkbox"]');if(!e)return;const a=!!this.label?.trim(),s=a?`${this._checkboxId}-label`:"",o=this.supportingText?`${this._checkboxId}-supporting-text`:"";a&&s?(e.setAttribute("aria-labelledby",s),e.removeAttribute("aria-label")):(e.removeAttribute("aria-labelledby"),this.ariaLabel?.trim()?e.setAttribute("aria-label",this.ariaLabel.trim()):e.removeAttribute("aria-label")),o?e.setAttribute("aria-describedby",o):e.removeAttribute("aria-describedby")}__syncFormValue(){if(!this._internals)return;const t=this.disabled||!this.checked?null:this.value;this._internals.setFormValue(t)}render(){const t=this.supportingText?`${this._checkboxId}-supporting-text`:void 0,i=!!this.label?.trim(),e=i?b:this.ariaLabel||b;return u`
2
2
  <label class="wrap">
3
3
  <div class="box-wrap">
4
4
  <md-checkbox
@@ -16,7 +16,7 @@ import{a as f,n,i as y,E as b,x as u,t as v}from"../../vendor/vendor.js";import"
16
16
  ${this.supportingText}
17
17
  </div>`:b}
18
18
  <slot></slot>
19
- `}};h=new WeakSet;m=function(){const t=p(this,h,d).call(this,this.spacing),i=p(this,h,d).call(this,this.spacingTop)??t,e=p(this,h,d).call(this,this.spacingBottom)??t,r=p(this,h,d).call(this,this.spacingLeft),s=p(this,h,d).call(this,this.spacingRight);i?this.style.setProperty("--scb-checkbox-spacing-block-start",i):this.style.removeProperty("--scb-checkbox-spacing-block-start"),e?this.style.setProperty("--scb-checkbox-spacing-block-end",e):this.style.removeProperty("--scb-checkbox-spacing-block-end"),r?this.style.setProperty("--scb-checkbox-spacing-inline-start",r):this.style.removeProperty("--scb-checkbox-spacing-inline-start"),s?this.style.setProperty("--scb-checkbox-spacing-inline-end",s):this.style.removeProperty("--scb-checkbox-spacing-inline-end")};d=function(t){if(!t)return;const i=String(t).trim();if(i)return/^\d+$/.test(i)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(i,10)))})`:i};a.formAssociated=!0;a.styles=f`
19
+ `}};h=new WeakSet;m=function(){const t=p(this,h,d).call(this,this.spacing),i=p(this,h,d).call(this,this.spacingTop)??t,e=p(this,h,d).call(this,this.spacingBottom)??t,a=p(this,h,d).call(this,this.spacingLeft),s=p(this,h,d).call(this,this.spacingRight);i?this.style.setProperty("--scb-checkbox-spacing-block-start",i):this.style.removeProperty("--scb-checkbox-spacing-block-start"),e?this.style.setProperty("--scb-checkbox-spacing-block-end",e):this.style.removeProperty("--scb-checkbox-spacing-block-end"),a?this.style.setProperty("--scb-checkbox-spacing-inline-start",a):this.style.removeProperty("--scb-checkbox-spacing-inline-start"),s?this.style.setProperty("--scb-checkbox-spacing-inline-end",s):this.style.removeProperty("--scb-checkbox-spacing-inline-end")};d=function(t){if(!t)return;const i=String(t).trim();if(i)return/^\d+$/.test(i)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(i,10)))})`:i};r.formAssociated=!0;r.styles=g`
20
20
  :host {
21
21
  display: inline-grid;
22
22
  grid-template-columns: auto;
@@ -40,7 +40,6 @@ import{a as f,n,i as y,E as b,x as u,t as v}from"../../vendor/vendor.js";import"
40
40
  gap: var(--spacing-5, 16px);
41
41
  cursor: pointer;
42
42
  overflow: visible;
43
- padding: var(--spacing-2, 4px);
44
43
  }
45
44
 
46
45
  :host([disabled]) .wrap {
@@ -91,4 +90,4 @@ import{a as f,n,i as y,E as b,x as u,t as v}from"../../vendor/vendor.js";import"
91
90
  color: var(--md-sys-color-on-surface-variant);
92
91
  }
93
92
  }
94
- `;c([n({type:Boolean,reflect:!0})],a.prototype,"disabled",2);c([n({type:Boolean,reflect:!0})],a.prototype,"indeterminate",2);c([n({type:Boolean,reflect:!0})],a.prototype,"checked",2);c([n({type:String})],a.prototype,"label",2);c([n({type:String,attribute:"supporting-text"})],a.prototype,"supportingText",2);c([n({type:String,reflect:!0,attribute:"aria-label"})],a.prototype,"ariaLabel",2);c([n({type:String})],a.prototype,"name",2);c([n({type:String})],a.prototype,"value",2);c([n({type:String,reflect:!0})],a.prototype,"spacing",2);c([n({type:String,attribute:"spacing-top",reflect:!0})],a.prototype,"spacingTop",2);c([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.prototype,"spacingBottom",2);c([n({type:String,attribute:"spacing-left",reflect:!0})],a.prototype,"spacingLeft",2);c([n({type:String,attribute:"spacing-right",reflect:!0})],a.prototype,"spacingRight",2);a=c([v("scb-checkbox")],a);export{a as ScbCheckbox};
93
+ `;c([n({type:Boolean,reflect:!0})],r.prototype,"disabled",2);c([n({type:Boolean,reflect:!0})],r.prototype,"indeterminate",2);c([n({type:Boolean,reflect:!0})],r.prototype,"checked",2);c([n({type:String})],r.prototype,"label",2);c([n({type:String,attribute:"supporting-text"})],r.prototype,"supportingText",2);c([n({type:String,reflect:!0,attribute:"aria-label"})],r.prototype,"ariaLabel",2);c([n({type:String})],r.prototype,"name",2);c([n({type:String})],r.prototype,"value",2);c([n({type:String,reflect:!0})],r.prototype,"spacing",2);c([n({type:String,attribute:"spacing-top",reflect:!0})],r.prototype,"spacingTop",2);c([n({type:String,attribute:"spacing-bottom",reflect:!0})],r.prototype,"spacingBottom",2);c([n({type:String,attribute:"spacing-left",reflect:!0})],r.prototype,"spacingLeft",2);c([n({type:String,attribute:"spacing-right",reflect:!0})],r.prototype,"spacingRight",2);r=c([v("scb-checkbox")],r);export{r as ScbCheckbox};
@@ -39,7 +39,6 @@ import{a as p,n as l,i as h,x as c,t as u}from"../../vendor/vendor.js";import"..
39
39
  .wrap {
40
40
  display: inline-flex;
41
41
  align-items: center;
42
- padding: var(--spacing-2, 4px);
43
42
  gap: var(--spacing-5, 16px);
44
43
  cursor: pointer;
45
44
  overflow: visible;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.172",
3
+ "version": "0.1.173",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -373,5 +373,5 @@
373
373
  },
374
374
  "./mvc/*": "./mvc/*"
375
375
  },
376
- "buildHash": "FD47BE08B5EC8F7F84AA6B97E2B5F42E5295E9DE67BA5593C907A1B80DD1BF32"
376
+ "buildHash": "1C943C4EF6C78D012216CD4D4ADB16CD0DA8F420BB78D3001943C2127C4FD02C"
377
377
  }
@@ -130,7 +130,6 @@ r.styles = _`
130
130
  gap: var(--spacing-5, 16px);
131
131
  cursor: pointer;
132
132
  overflow: visible;
133
- padding: var(--spacing-2, 4px);
134
133
  }
135
134
 
136
135
  :host([disabled]) .wrap {
@@ -2,10 +2,10 @@ import { css as c, LitElement as h, html as p } from "lit";
2
2
  import { property as s, customElement as u } from "lit/decorators.js";
3
3
  import "@material/web/radio/radio.js";
4
4
  import "./scb-radio-group.js";
5
- var g = Object.defineProperty, m = Object.getOwnPropertyDescriptor, r = (e, t, n, o) => {
6
- for (var a = o > 1 ? void 0 : o ? m(t, n) : t, d = e.length - 1, l; d >= 0; d--)
7
- (l = e[d]) && (a = (o ? l(t, n, a) : l(a)) || a);
8
- return o && a && g(t, n, a), a;
5
+ var m = Object.defineProperty, g = Object.getOwnPropertyDescriptor, a = (e, t, n, o) => {
6
+ for (var r = o > 1 ? void 0 : o ? g(t, n) : t, d = e.length - 1, l; d >= 0; d--)
7
+ (l = e[d]) && (r = (o ? l(t, n, r) : l(r)) || r);
8
+ return o && r && m(t, n, r), r;
9
9
  };
10
10
  let i = class extends h {
11
11
  constructor() {
@@ -97,7 +97,6 @@ i.styles = c`
97
97
  .wrap {
98
98
  display: inline-flex;
99
99
  align-items: center;
100
- padding: var(--spacing-2, 4px);
101
100
  gap: var(--spacing-5, 16px);
102
101
  cursor: pointer;
103
102
  overflow: visible;
@@ -144,25 +143,25 @@ i.styles = c`
144
143
  .supporting-text { color: var(--md-sys-color-on-surface-variant); }
145
144
  }
146
145
  `;
147
- r([
146
+ a([
148
147
  s({ type: Boolean, reflect: !0 })
149
148
  ], i.prototype, "disabled", 2);
150
- r([
149
+ a([
151
150
  s({ type: Boolean, reflect: !0 })
152
151
  ], i.prototype, "checked", 2);
153
- r([
152
+ a([
154
153
  s({ type: String, reflect: !0 })
155
154
  ], i.prototype, "name", 2);
156
- r([
155
+ a([
157
156
  s({ type: String, reflect: !0 })
158
157
  ], i.prototype, "value", 2);
159
- r([
158
+ a([
160
159
  s({ type: String })
161
160
  ], i.prototype, "label", 2);
162
- r([
161
+ a([
163
162
  s({ type: String, attribute: "supporting-text" })
164
163
  ], i.prototype, "supportingText", 2);
165
- i = r([
164
+ i = a([
166
165
  u("scb-radio-button")
167
166
  ], i);
168
167
  export {
@@ -4155,7 +4155,6 @@ ${this.value}</textarea
4155
4155
  gap: var(--spacing-5, 16px);
4156
4156
  cursor: pointer;
4157
4157
  overflow: visible;
4158
- padding: var(--spacing-2, 4px);
4159
4158
  }
4160
4159
 
4161
4160
  :host([disabled]) .wrap {
@@ -4287,7 +4286,6 @@ ${this.value}</textarea
4287
4286
  .wrap {
4288
4287
  display: inline-flex;
4289
4288
  align-items: center;
4290
- padding: var(--spacing-2, 4px);
4291
4289
  gap: var(--spacing-5, 16px);
4292
4290
  cursor: pointer;
4293
4291
  overflow: visible;