scb-wc-test 0.1.169 → 0.1.170

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 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`
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`
2
2
  <label class="wrap">
3
3
  <div class="box-wrap">
4
4
  <md-checkbox
@@ -16,7 +16,7 @@ import{a as g,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,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`
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`
20
20
  :host {
21
21
  display: inline-grid;
22
22
  grid-template-columns: auto;
@@ -40,6 +40,7 @@ import{a as g,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);
43
44
  }
44
45
 
45
46
  :host([disabled]) .wrap {
@@ -90,4 +91,4 @@ import{a as g,n,i as y,E as b,x as u,t as v}from"../../vendor/vendor.js";import"
90
91
  color: var(--md-sys-color-on-surface-variant);
91
92
  }
92
93
  }
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};
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};
@@ -39,6 +39,7 @@ 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);
42
43
  gap: var(--spacing-5, 16px);
43
44
  cursor: pointer;
44
45
  overflow: visible;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.169",
3
+ "version": "0.1.170",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -365,5 +365,5 @@
365
365
  },
366
366
  "./mvc/*": "./mvc/*"
367
367
  },
368
- "buildHash": "F9F5688F9BB9A33B25976ED4E9D368B502900D424629EB538CEB24B772ACDF91"
368
+ "buildHash": "3E9BD7677929010257DBDB90BC4C31C7F66D64CF1690442315624A308C69C7CF"
369
369
  }
@@ -130,6 +130,7 @@ r.styles = _`
130
130
  gap: var(--spacing-5, 16px);
131
131
  cursor: pointer;
132
132
  overflow: visible;
133
+ padding: var(--spacing-2, 4px);
133
134
  }
134
135
 
135
136
  :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 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;
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;
9
9
  };
10
10
  let i = class extends h {
11
11
  constructor() {
@@ -97,6 +97,7 @@ i.styles = c`
97
97
  .wrap {
98
98
  display: inline-flex;
99
99
  align-items: center;
100
+ padding: var(--spacing-2, 4px);
100
101
  gap: var(--spacing-5, 16px);
101
102
  cursor: pointer;
102
103
  overflow: visible;
@@ -143,25 +144,25 @@ i.styles = c`
143
144
  .supporting-text { color: var(--md-sys-color-on-surface-variant); }
144
145
  }
145
146
  `;
146
- a([
147
+ r([
147
148
  s({ type: Boolean, reflect: !0 })
148
149
  ], i.prototype, "disabled", 2);
149
- a([
150
+ r([
150
151
  s({ type: Boolean, reflect: !0 })
151
152
  ], i.prototype, "checked", 2);
152
- a([
153
+ r([
153
154
  s({ type: String, reflect: !0 })
154
155
  ], i.prototype, "name", 2);
155
- a([
156
+ r([
156
157
  s({ type: String, reflect: !0 })
157
158
  ], i.prototype, "value", 2);
158
- a([
159
+ r([
159
160
  s({ type: String })
160
161
  ], i.prototype, "label", 2);
161
- a([
162
+ r([
162
163
  s({ type: String, attribute: "supporting-text" })
163
164
  ], i.prototype, "supportingText", 2);
164
- i = a([
165
+ i = r([
165
166
  u("scb-radio-button")
166
167
  ], i);
167
168
  export {
@@ -4158,6 +4158,7 @@ ${this.value}</textarea
4158
4158
  gap: var(--spacing-5, 16px);
4159
4159
  cursor: pointer;
4160
4160
  overflow: visible;
4161
+ padding: var(--spacing-2, 4px);
4161
4162
  }
4162
4163
 
4163
4164
  :host([disabled]) .wrap {
@@ -4289,6 +4290,7 @@ ${this.value}</textarea
4289
4290
  .wrap {
4290
4291
  display: inline-flex;
4291
4292
  align-items: center;
4293
+ padding: var(--spacing-2, 4px);
4292
4294
  gap: var(--spacing-5, 16px);
4293
4295
  cursor: pointer;
4294
4296
  overflow: visible;