scb-wc-test 0.1.110 → 0.1.112
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.
- package/blazor/ScbBlazorInteropBase.cs +11 -0
- package/blazor/scb-blazor-bridge.js +293 -5
- package/mvc/components/scb-textfield/scb-textfield.js +76 -50
- package/mvc/scb-blazor-bridge.js +293 -5
- package/package.json +2 -2
- package/scb-textfield/scb-textfield.js +110 -75
- package/scb-wc-test.bundle.js +75 -49
package/scb-wc-test.bundle.js
CHANGED
|
@@ -4147,7 +4147,7 @@ var ScbWcTest=function(a){"use strict";var Sl;function d(o,e,t,i){var r=argument
|
|
|
4147
4147
|
.close-datepicker:hover {
|
|
4148
4148
|
background: var(--md-sys-color-primary-container, #e3f2fd);
|
|
4149
4149
|
}
|
|
4150
|
-
`],je([w()],a.ScbDatepicker.prototype,"_currentDate",2),je([w()],a.ScbDatepicker.prototype,"_selectedDate",2),je([w()],a.ScbDatepicker.prototype,"_showMonthDropdown",2),je([w()],a.ScbDatepicker.prototype,"_showYearDropdown",2),je([n({type:String})],a.ScbDatepicker.prototype,"variant",2),je([n({type:String})],a.ScbDatepicker.prototype,"lang",2),je([n({type:String})],a.ScbDatepicker.prototype,"selectedValue",2),je([n({type:Boolean})],a.ScbDatepicker.prototype,"open",2),a.ScbDatepicker=je([g("scb-datepicker")],a.ScbDatepicker);var Ep=Object.defineProperty,Tp=Object.getOwnPropertyDescriptor,jn=o=>{throw TypeError(o)},Y=(o,e,t,i)=>{for(var r=i>1?void 0:i?Tp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Ep(e,t,r),r},Ap=(o,e,t)=>e.has(o)||jn("Cannot "+t),zp=(o,e,t)=>e.has(o)?jn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Ke=(o,e,t)=>(Ap(o,e,"access private method"),t),Ce,Fa,Xr,Pi;a.ScbTextField=class extends y{constructor(){super(),zp(this,Ce),this._internals=null,this._inputFocused=!1,this._kbShouldShowRing=!1,this._onGlobalKeydown=e=>{e.key==="Tab"&&(this._kbShouldShowRing=!0,this._inputFocused&&Ke(this,Ce,Pi).call(this))},this._onGlobalPointerDown=()=>{this._kbShouldShowRing=!1,this._inputFocused&&Ke(this,Ce,Pi).call(this)},this.type="text",this.label="",this.supportingText="",this.errorText="",this.leadingIcon="",this.name="",this.pattern="",this.value="",this.underLabel="",this.error=!1,this.disabled=!1,this.required=!1,this.spacing="",this.spacingTop="",this.spacingBottom="",this._form=null,this._formSubmitHandler=null,this._formResetHandler=null,this._initialValue="",this._inputId="",this._showDatepicker=!1,this._toggleDatepicker=()=>{this._showDatepicker=!this._showDatepicker},this._onDateSelected=e=>{this.value=e.detail.value,this._showDatepicker=!1,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("onValueChanged",{detail:{value:this.value},bubbles:!0,composed:!0}))},"attachInternals"in this&&(this._internals=this.attachInternals())}render(){const e=this.leadingIcon?c`<md-icon class="scb-textfield-icon">${this.leadingIcon}</md-icon>`:null,t=this.error?c`<md-icon class="scb-textfield-error-icon" aria-hidden="true">error</md-icon>`:null;this.underLabel=this.error?this.errorText||"Ogiltig inmatning.":this.supportingText,this.value=this.value||"";const i=this.underLabel?`${this._inputId}-supporting-text`:void 0,r=this.type==="search"&&this.value?c`
|
|
4150
|
+
`],je([w()],a.ScbDatepicker.prototype,"_currentDate",2),je([w()],a.ScbDatepicker.prototype,"_selectedDate",2),je([w()],a.ScbDatepicker.prototype,"_showMonthDropdown",2),je([w()],a.ScbDatepicker.prototype,"_showYearDropdown",2),je([n({type:String})],a.ScbDatepicker.prototype,"variant",2),je([n({type:String})],a.ScbDatepicker.prototype,"lang",2),je([n({type:String})],a.ScbDatepicker.prototype,"selectedValue",2),je([n({type:Boolean})],a.ScbDatepicker.prototype,"open",2),a.ScbDatepicker=je([g("scb-datepicker")],a.ScbDatepicker);var Ep=Object.defineProperty,Tp=Object.getOwnPropertyDescriptor,jn=o=>{throw TypeError(o)},Y=(o,e,t,i)=>{for(var r=i>1?void 0:i?Tp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Ep(e,t,r),r},Ap=(o,e,t)=>e.has(o)||jn("Cannot "+t),zp=(o,e,t)=>e.has(o)?jn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Ke=(o,e,t)=>(Ap(o,e,"access private method"),t),Ce,Fa,Xr,Pi;a.ScbTextField=class extends y{constructor(){super(),zp(this,Ce),this._internals=null,this._inputFocused=!1,this._kbShouldShowRing=!1,this._onGlobalKeydown=e=>{e.key==="Tab"&&(this._kbShouldShowRing=!0,this._inputFocused&&Ke(this,Ce,Pi).call(this))},this._onGlobalPointerDown=()=>{this._kbShouldShowRing=!1,this._inputFocused&&Ke(this,Ce,Pi).call(this)},this.type="text",this.label="",this.supportingText="",this.errorText="",this.leadingIcon="",this.name="",this.pattern="",this.value="",this.underLabel="",this.error=!1,this.disabled=!1,this.required=!1,this.spacing="",this.spacingTop="",this.spacingBottom="",this._form=null,this._formSubmitHandler=null,this._formResetHandler=null,this._initialValue="",this._inputId="",this._showDatepicker=!1,this._toggleDatepicker=()=>{this._showDatepicker=!this._showDatepicker},this._onDateSelected=e=>{if(this.value=e.detail.value,this._showDatepicker=!1,this._internals){const t=this.disabled?null:this.value;this._internals.setFormValue(t)}if(this.pattern){const t=new RegExp(this.pattern);this.error=!t.test(this.value)}this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("onValueChanged",{detail:{value:this.value},bubbles:!0,composed:!0}))},"attachInternals"in this&&(this._internals=this.attachInternals())}render(){const e=this.leadingIcon?c`<md-icon class="scb-textfield-icon">${this.leadingIcon}</md-icon>`:null,t=this.error?c`<md-icon class="scb-textfield-error-icon" aria-hidden="true">error</md-icon>`:null;this.underLabel=this.error?this.errorText||"Ogiltig inmatning.":this.supportingText,this.value=this.value||"";const i=this.underLabel?`${this._inputId}-supporting-text`:void 0,r=this.type==="search"&&this.value?c`
|
|
4151
4151
|
<button
|
|
4152
4152
|
type="button"
|
|
4153
4153
|
class="scb-textfield-clear"
|
|
@@ -4188,20 +4188,22 @@ var ScbWcTest=function(a){"use strict";var Sl;function d(o,e,t,i){var r=argument
|
|
|
4188
4188
|
id="${this.underLabel?`${this._inputId}-supporting-text`:""}"
|
|
4189
4189
|
>${this.underLabel}</span
|
|
4190
4190
|
>
|
|
4191
|
-
<div class="scb-textfield-wrapper
|
|
4192
|
-
<
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4191
|
+
<div class="scb-textfield-wrapper">
|
|
4192
|
+
<div class="ripple-wrapper">
|
|
4193
|
+
<textarea
|
|
4194
|
+
class="scb-textfield"
|
|
4195
|
+
?disabled=${this.disabled}
|
|
4196
|
+
name="${this.name}"
|
|
4197
|
+
id="${this._inputId}"
|
|
4198
|
+
?required=${this.required}
|
|
4199
|
+
aria-invalid=${this.error?"true":"false"}
|
|
4200
|
+
aria-describedby=${i}
|
|
4201
|
+
>
|
|
4201
4202
|
${this.value}</textarea
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4203
|
+
>
|
|
4204
|
+
<md-ripple></md-ripple>
|
|
4205
|
+
<md-focus-ring class="input-ring"></md-focus-ring>
|
|
4206
|
+
</div>
|
|
4205
4207
|
</div>
|
|
4206
4208
|
`:this.type==="date"?c`
|
|
4207
4209
|
<label class="scb-textfield-label" for="${this._inputId}">${this.label}</label>
|
|
@@ -4210,28 +4212,37 @@ ${this.value}</textarea
|
|
|
4210
4212
|
id="${this.underLabel?`${this._inputId}-supporting-text`:""}"
|
|
4211
4213
|
>${this.underLabel}</span
|
|
4212
4214
|
>
|
|
4213
|
-
<div class="scb-textfield-wrapper"
|
|
4215
|
+
<div class="scb-textfield-wrapper">
|
|
4214
4216
|
${e}
|
|
4215
|
-
<
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4217
|
+
<div class="ripple-wrapper">
|
|
4218
|
+
<input
|
|
4219
|
+
class="scb-textfield${this.error?" has-error-icon":""}"
|
|
4220
|
+
.value=${this.value}
|
|
4221
|
+
type="text"
|
|
4222
|
+
name="${this.name}"
|
|
4223
|
+
id="${this._inputId}"
|
|
4224
|
+
?disabled=${this.disabled}
|
|
4225
|
+
?required=${this.required}
|
|
4226
|
+
aria-invalid=${this.error?"true":"false"}
|
|
4227
|
+
aria-describedby=${i}
|
|
4228
|
+
readonly
|
|
4229
|
+
/>
|
|
4230
|
+
${t}
|
|
4231
|
+
<md-ripple></md-ripple>
|
|
4232
|
+
<md-focus-ring class="input-ring"></md-focus-ring>
|
|
4233
|
+
</div>
|
|
4234
|
+
<scb-icon-button
|
|
4235
|
+
class="scb-textfield-datepicker-button"
|
|
4236
|
+
icon="calendar_today"
|
|
4237
|
+
@click=${this._toggleDatepicker}
|
|
4238
|
+
aria-label="Välj datum"
|
|
4239
|
+
></scb-icon-button>
|
|
4228
4240
|
<scb-datepicker
|
|
4229
4241
|
variant="popup"
|
|
4230
4242
|
.selectedValue=${this.value}
|
|
4231
4243
|
.open=${this._showDatepicker}
|
|
4232
4244
|
@date-selected=${this._onDateSelected}
|
|
4233
4245
|
></scb-datepicker>
|
|
4234
|
-
${t}
|
|
4235
4246
|
</div>
|
|
4236
4247
|
`:c`
|
|
4237
4248
|
<label class="scb-textfield-label" for="${this._inputId}">${this.label}</label>
|
|
@@ -4240,23 +4251,25 @@ ${this.value}</textarea
|
|
|
4240
4251
|
id="${this.underLabel?`${this._inputId}-supporting-text`:""}"
|
|
4241
4252
|
>${this.underLabel}</span
|
|
4242
4253
|
>
|
|
4243
|
-
<div class="scb-textfield-wrapper
|
|
4254
|
+
<div class="scb-textfield-wrapper">
|
|
4244
4255
|
${e}
|
|
4245
|
-
<
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4256
|
+
<div class="ripple-wrapper">
|
|
4257
|
+
<input
|
|
4258
|
+
class="scb-textfield${this.error?" has-error-icon":""}"
|
|
4259
|
+
.value=${this.value}
|
|
4260
|
+
type="${this.type}"
|
|
4261
|
+
name="${this.name}"
|
|
4262
|
+
id="${this._inputId}"
|
|
4263
|
+
?disabled=${this.disabled}
|
|
4264
|
+
?required=${this.required}
|
|
4265
|
+
aria-invalid=${this.error?"true":"false"}
|
|
4266
|
+
aria-describedby=${i}
|
|
4267
|
+
/>
|
|
4268
|
+
${r}
|
|
4269
|
+
${t}
|
|
4270
|
+
<md-ripple></md-ripple>
|
|
4271
|
+
<md-focus-ring class="input-ring"></md-focus-ring>
|
|
4272
|
+
</div>
|
|
4260
4273
|
</div>
|
|
4261
4274
|
`}firstUpdated(e){var i;super.firstUpdated(e),this._initialValue=this.value;const t=(i=this.shadowRoot)==null?void 0:i.querySelector(".scb-textfield");t&&(t.addEventListener("input",()=>{const r=t;if(this.value=r.value,this._internals){const s=this.disabled?null:this.value;this._internals.setFormValue(s)}if(this.pattern){const s=new RegExp(this.pattern);this.error=!s.test(this.value)}this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("onValueChanged",{detail:{value:this.value},bubbles:!0,composed:!0}))}),t.addEventListener("change",()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}),t.addEventListener("select",()=>{this.dispatchEvent(new Event("select",{bubbles:!0,composed:!0}))}),t.addEventListener("focus",()=>{this._inputFocused=!0,Ke(this,Ce,Pi).call(this)}),t.addEventListener("blur",()=>{this._inputFocused=!1,Ke(this,Ce,Pi).call(this)})),Ke(this,Ce,Fa).call(this)}updated(e){if(super.updated(e),this.toggleAttribute("aria-disabled",this.disabled),this._internals&&(e.has("value")||e.has("disabled"))){const t=this.disabled?null:this.value;this._internals.setFormValue(t)}(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&Ke(this,Ce,Fa).call(this)}formDisabledCallback(e){this.disabled=e}connectedCallback(){super.connectedCallback(),this._inputId=this.id||`scb-textfield-${Math.random().toString(36).substr(2,9)}`,this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form=this.closest("form"),this._form&&(this._form.addEventListener("submit",this._formSubmitHandler,!0),this._formResetHandler=()=>{var t;this.value=this._initialValue;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".scb-textfield");e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.value=this._initialValue),this.error=!1},this._form.addEventListener("reset",this._formResetHandler,!0)),window.addEventListener("keydown",this._onGlobalKeydown,!0),window.addEventListener("pointerdown",this._onGlobalPointerDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this._form&&this._formSubmitHandler&&(this._form.removeEventListener("submit",this._formSubmitHandler,!0),this._formResetHandler&&this._form.removeEventListener("reset",this._formResetHandler,!0)),window.removeEventListener("keydown",this._onGlobalKeydown,!0),window.removeEventListener("pointerdown",this._onGlobalPointerDown,!0)}reportValidity(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".scb-textfield");if(e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){this.required&&!e.value?e.setCustomValidity(this.errorText||"Ogiltig inmatning."):e.setCustomValidity("");const i=e.reportValidity();this.error=!i;const r=i?"":this.errorText||e.validationMessage||"Ogiltig inmatning.";return i||(this.errorText=r),this._internals&&(i?this._internals.setValidity({}):this._internals.setValidity({customError:!0},r,e)),i}return!0}_onClearClick(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".scb-textfield");if(e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){if(e.value="",this.value="",this._internals){const i=this.disabled?null:this.value;this._internals.setFormValue(i),this._internals.setValidity({})}this.error=!1,e.setCustomValidity(""),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("onValueChanged",{detail:{value:this.value},bubbles:!0,composed:!0})),e.focus()}}},Ce=new WeakSet,Fa=function(){const o=Ke(this,Ce,Xr).call(this,this.spacing),e=Ke(this,Ce,Xr).call(this,this.spacingTop)??o,t=Ke(this,Ce,Xr).call(this,this.spacingBottom)??o;e?this.style.setProperty("--scb-textfield-spacing-block-start",e):this.style.removeProperty("--scb-textfield-spacing-block-start"),t?this.style.setProperty("--scb-textfield-spacing-block-end",t):this.style.removeProperty("--scb-textfield-spacing-block-end")},Xr=function(o){if(!o)return;const e=String(o).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e},Pi=function(){var e;const o=(e=this.renderRoot)==null?void 0:e.querySelector(".ripple-wrapper");o&&(this._inputFocused&&this._kbShouldShowRing?o.setAttribute("data-kb-focus","true"):o.removeAttribute("data-kb-focus"))},a.ScbTextField.formAssociated=!0,a.ScbTextField.styles=[m`
|
|
4262
4275
|
:host {
|
|
@@ -4284,9 +4297,6 @@ ${this.value}</textarea
|
|
|
4284
4297
|
:host([type='text']) {
|
|
4285
4298
|
--scb-textfield-max-width: var(--scb-textfield-text-max-width);
|
|
4286
4299
|
}
|
|
4287
|
-
:host([type='date']) {
|
|
4288
|
-
--scb-textfield-max-width: var(--scb-textfield-text-max-width);
|
|
4289
|
-
}
|
|
4290
4300
|
:host([type='search']) {
|
|
4291
4301
|
--scb-textfield-max-width: var(--scb-textfield-search-max-width);
|
|
4292
4302
|
}
|
|
@@ -4305,6 +4315,9 @@ ${this.value}</textarea
|
|
|
4305
4315
|
:host([type='textarea']) {
|
|
4306
4316
|
--scb-textfield-max-width: var(--scb-textfield-textarea-max-width);
|
|
4307
4317
|
}
|
|
4318
|
+
:host([type='date']) {
|
|
4319
|
+
--scb-textfield-max-width: var(--scb-textfield-text-max-width);
|
|
4320
|
+
}
|
|
4308
4321
|
|
|
4309
4322
|
:host {
|
|
4310
4323
|
display: flex;
|
|
@@ -4363,6 +4376,10 @@ ${this.value}</textarea
|
|
|
4363
4376
|
padding-right: var(--spacing-11);
|
|
4364
4377
|
}
|
|
4365
4378
|
|
|
4379
|
+
:host([type='date']) .scb-textfield {
|
|
4380
|
+
padding-right: var(--spacing-11);
|
|
4381
|
+
}
|
|
4382
|
+
|
|
4366
4383
|
md-icon + .scb-textfield {
|
|
4367
4384
|
padding-left: var(--spacing-10);
|
|
4368
4385
|
}
|
|
@@ -4474,7 +4491,16 @@ ${this.value}</textarea
|
|
|
4474
4491
|
height: 100%;
|
|
4475
4492
|
display: block;
|
|
4476
4493
|
}
|
|
4477
|
-
|
|
4494
|
+
|
|
4495
|
+
/* Datumknappen ovanför input/ripple */
|
|
4496
|
+
.scb-textfield-datepicker-button {
|
|
4497
|
+
position: absolute;
|
|
4498
|
+
right: var(--spacing-4);
|
|
4499
|
+
top: 50%;
|
|
4500
|
+
transform: translateY(-50%);
|
|
4501
|
+
z-index: 4;
|
|
4502
|
+
}
|
|
4503
|
+
`],Y([n({type:String,reflect:!0})],a.ScbTextField.prototype,"type",2),Y([n({type:String})],a.ScbTextField.prototype,"label",2),Y([n({type:String,attribute:"supporting-text"})],a.ScbTextField.prototype,"supportingText",2),Y([n({type:String,attribute:"error-text"})],a.ScbTextField.prototype,"errorText",2),Y([n({type:String,attribute:"leading-icon"})],a.ScbTextField.prototype,"leadingIcon",2),Y([n({type:String})],a.ScbTextField.prototype,"name",2),Y([n({type:String})],a.ScbTextField.prototype,"pattern",2),Y([n({type:String,attribute:"value"})],a.ScbTextField.prototype,"value",2),Y([n({type:String})],a.ScbTextField.prototype,"underLabel",2),Y([n({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"error",2),Y([n({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"disabled",2),Y([n({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"required",2),Y([n({type:String,reflect:!0})],a.ScbTextField.prototype,"spacing",2),Y([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbTextField.prototype,"spacingTop",2),Y([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbTextField.prototype,"spacingBottom",2),Y([w()],a.ScbTextField.prototype,"_showDatepicker",2),a.ScbTextField=Y([g("scb-textfield")],a.ScbTextField);var Ip=Object.defineProperty,Pp=Object.getOwnPropertyDescriptor,Kn=o=>{throw TypeError(o)},Ge=(o,e,t,i)=>{for(var r=i>1?void 0:i?Pp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Ip(e,t,r),r},Gn=(o,e,t)=>e.has(o)||Kn("Cannot "+t),Tt=(o,e,t)=>(Gn(o,e,"read from private field"),t?t.call(o):e.get(o)),Zr=(o,e,t)=>e.has(o)?Kn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Oi=(o,e,t)=>(Gn(o,e,"access private method"),t),Ha,Zt,Jr,At,Na,Qr;a.ScbRadioGroup=class extends y{constructor(){super(),Zr(this,At),this.name="",this.orientation="vertical",this.disabled=!1,this.ariaLabel=null,this.spacing="",this.spacingTop="",this.spacingBottom="",this.value="",this._internals=null,this._form=null,this._formResetHandler=null,this._initialValue="",Zr(this,Ha,()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");return e?e.assignedElements({flatten:!0}).filter(i=>i.tagName.toLowerCase()==="scb-radio-button"):[]}),Zr(this,Zt,()=>{const e=Tt(this,Ha).call(this);if(!e.length)return;let t=null;for(const i of e){const r=i;this.name&&i.setAttribute("name",this.name),this.disabled?i.setAttribute("disabled",""):i.removeAttribute("disabled"),this.orientation==="horizontal"?i.setAttribute("orientation","horizontal"):i.removeAttribute("orientation");const s=r.value??i.getAttribute("value")??"",l=typeof r.checked=="boolean"?r.checked:i.hasAttribute("checked");if(this.value){const h=String(s)===this.value;h&&!l?r.checked=!0:!h&&l&&(r.checked=!1)}else l&&t===null&&(t=String(s))}!this.value&&t!==null&&(this.value=t)}),Zr(this,Jr,e=>{var r,s;const t=e.composedPath().find(l=>{var h;return((h=l==null?void 0:l.tagName)==null?void 0:h.toLowerCase())==="scb-radio-button"}),i=(t==null?void 0:t.value)??((r=t==null?void 0:t.getAttribute)==null?void 0:r.call(t,"value"))??((s=e.target)==null?void 0:s.value)??"";this.value=String(i??""),this.dispatchEvent(new CustomEvent("scb-change",{detail:{value:String(i??""),originalIsTrusted:(e==null?void 0:e.isTrusted)===!0},bubbles:!0,composed:!0}))}),"attachInternals"in this&&(this._internals=this.attachInternals())}render(){const e=this.orientation==="horizontal"?"row":"column";return c`
|
|
4478
4504
|
<div
|
|
4479
4505
|
class="g"
|
|
4480
4506
|
role="radiogroup"
|