q2-tecton-elements 1.11.2 → 1.11.4-alpha.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.
- package/dist/cjs/q2-radio-group.cjs.entry.js +6 -4
- package/dist/cjs/q2-radio.cjs.entry.js +4 -0
- package/dist/collection/components/q2-radio/index.js +4 -0
- package/dist/collection/components/q2-radio-group/index.js +6 -4
- package/dist/esm/q2-radio-group.entry.js +6 -4
- package/dist/esm/q2-radio.entry.js +4 -0
- package/dist/q2-tecton-elements/p-3479847c.entry.js +1 -0
- package/dist/q2-tecton-elements/p-f435dc7e.entry.js +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/types/components/q2-radio/index.d.ts +1 -0
- package/dist/types/components/q2-radio-group/index.d.ts +2 -1
- package/dist/types/workspace/workspace/{tecton-production_release_1.11.x → _production_release_1.11.4-alpha}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
- package/package.json +2 -2
- package/dist/q2-tecton-elements/p-3cb34e2e.entry.js +0 -1
- package/dist/q2-tecton-elements/p-f7f7f235.entry.js +0 -1
|
@@ -16,7 +16,7 @@ const Q2RadioGroup = class {
|
|
|
16
16
|
this.hasError = false;
|
|
17
17
|
this.id = `radio-group-${index$1.createGuid()}`;
|
|
18
18
|
this.onMutationObserved = () => {
|
|
19
|
-
this.valueUpdated();
|
|
19
|
+
this.valueUpdated(this.value);
|
|
20
20
|
this.nameUpdated();
|
|
21
21
|
this.disabledUpdated();
|
|
22
22
|
this.readonlyUpdated();
|
|
@@ -33,17 +33,19 @@ const Q2RadioGroup = class {
|
|
|
33
33
|
return Array.from(this.hostElement.querySelectorAll('q2-radio'));
|
|
34
34
|
}
|
|
35
35
|
/////// LIFECYCLE HOOK ///////
|
|
36
|
+
componentWillLoad() {
|
|
37
|
+
this.onMutationObserved();
|
|
38
|
+
}
|
|
36
39
|
componentDidLoad() {
|
|
37
40
|
const observer = new MutationObserver(this.onMutationObserved);
|
|
38
41
|
observer.observe(this.hostElement, { childList: true });
|
|
39
42
|
this.mutationObserver = observer;
|
|
40
|
-
this.onMutationObserved();
|
|
41
43
|
index$1.overrideFocus(this.hostElement);
|
|
42
44
|
}
|
|
43
45
|
/////// OBSERVERS ///////
|
|
44
|
-
valueUpdated() {
|
|
46
|
+
valueUpdated(newVal) {
|
|
45
47
|
this.radioElements.forEach(radio => {
|
|
46
|
-
radio.checked =
|
|
48
|
+
radio.checked = newVal === radio.value;
|
|
47
49
|
});
|
|
48
50
|
}
|
|
49
51
|
nameUpdated() {
|
|
@@ -17,6 +17,7 @@ const Q2Radio = class {
|
|
|
17
17
|
this.groupReadonly = false;
|
|
18
18
|
this.groupTileLayout = false;
|
|
19
19
|
this.id = `radio-${index$1.createGuid()}`;
|
|
20
|
+
this.isLoaded = false;
|
|
20
21
|
this.inputChange = (event) => {
|
|
21
22
|
event.stopPropagation();
|
|
22
23
|
if (this.groupReadonly) {
|
|
@@ -33,6 +34,7 @@ const Q2Radio = class {
|
|
|
33
34
|
index$1.handleAriaLabel(this);
|
|
34
35
|
}
|
|
35
36
|
componentDidLoad() {
|
|
37
|
+
this.isLoaded = true;
|
|
36
38
|
index$1.overrideFocus(this.hostElement);
|
|
37
39
|
}
|
|
38
40
|
////////// OBSERVERS //////////
|
|
@@ -40,6 +42,8 @@ const Q2Radio = class {
|
|
|
40
42
|
index$1.handleAriaLabel(this);
|
|
41
43
|
}
|
|
42
44
|
checkedObserver() {
|
|
45
|
+
if (!this.isLoaded)
|
|
46
|
+
return;
|
|
43
47
|
if (!this.checked)
|
|
44
48
|
return;
|
|
45
49
|
this.change.emit({ value: this.value });
|
|
@@ -8,6 +8,7 @@ export class Q2Radio {
|
|
|
8
8
|
this.groupReadonly = false;
|
|
9
9
|
this.groupTileLayout = false;
|
|
10
10
|
this.id = `radio-${createGuid()}`;
|
|
11
|
+
this.isLoaded = false;
|
|
11
12
|
this.inputChange = (event) => {
|
|
12
13
|
event.stopPropagation();
|
|
13
14
|
if (this.groupReadonly) {
|
|
@@ -24,6 +25,7 @@ export class Q2Radio {
|
|
|
24
25
|
handleAriaLabel(this);
|
|
25
26
|
}
|
|
26
27
|
componentDidLoad() {
|
|
28
|
+
this.isLoaded = true;
|
|
27
29
|
overrideFocus(this.hostElement);
|
|
28
30
|
}
|
|
29
31
|
////////// OBSERVERS //////////
|
|
@@ -31,6 +33,8 @@ export class Q2Radio {
|
|
|
31
33
|
handleAriaLabel(this);
|
|
32
34
|
}
|
|
33
35
|
checkedObserver() {
|
|
36
|
+
if (!this.isLoaded)
|
|
37
|
+
return;
|
|
34
38
|
if (!this.checked)
|
|
35
39
|
return;
|
|
36
40
|
this.change.emit({ value: this.value });
|
|
@@ -7,7 +7,7 @@ export class Q2RadioGroup {
|
|
|
7
7
|
this.hasError = false;
|
|
8
8
|
this.id = `radio-group-${createGuid()}`;
|
|
9
9
|
this.onMutationObserved = () => {
|
|
10
|
-
this.valueUpdated();
|
|
10
|
+
this.valueUpdated(this.value);
|
|
11
11
|
this.nameUpdated();
|
|
12
12
|
this.disabledUpdated();
|
|
13
13
|
this.readonlyUpdated();
|
|
@@ -24,17 +24,19 @@ export class Q2RadioGroup {
|
|
|
24
24
|
return Array.from(this.hostElement.querySelectorAll('q2-radio'));
|
|
25
25
|
}
|
|
26
26
|
/////// LIFECYCLE HOOK ///////
|
|
27
|
+
componentWillLoad() {
|
|
28
|
+
this.onMutationObserved();
|
|
29
|
+
}
|
|
27
30
|
componentDidLoad() {
|
|
28
31
|
const observer = new MutationObserver(this.onMutationObserved);
|
|
29
32
|
observer.observe(this.hostElement, { childList: true });
|
|
30
33
|
this.mutationObserver = observer;
|
|
31
|
-
this.onMutationObserved();
|
|
32
34
|
overrideFocus(this.hostElement);
|
|
33
35
|
}
|
|
34
36
|
/////// OBSERVERS ///////
|
|
35
|
-
valueUpdated() {
|
|
37
|
+
valueUpdated(newVal) {
|
|
36
38
|
this.radioElements.forEach(radio => {
|
|
37
|
-
radio.checked =
|
|
39
|
+
radio.checked = newVal === radio.value;
|
|
38
40
|
});
|
|
39
41
|
}
|
|
40
42
|
nameUpdated() {
|
|
@@ -12,7 +12,7 @@ const Q2RadioGroup = class {
|
|
|
12
12
|
this.hasError = false;
|
|
13
13
|
this.id = `radio-group-${createGuid()}`;
|
|
14
14
|
this.onMutationObserved = () => {
|
|
15
|
-
this.valueUpdated();
|
|
15
|
+
this.valueUpdated(this.value);
|
|
16
16
|
this.nameUpdated();
|
|
17
17
|
this.disabledUpdated();
|
|
18
18
|
this.readonlyUpdated();
|
|
@@ -29,17 +29,19 @@ const Q2RadioGroup = class {
|
|
|
29
29
|
return Array.from(this.hostElement.querySelectorAll('q2-radio'));
|
|
30
30
|
}
|
|
31
31
|
/////// LIFECYCLE HOOK ///////
|
|
32
|
+
componentWillLoad() {
|
|
33
|
+
this.onMutationObserved();
|
|
34
|
+
}
|
|
32
35
|
componentDidLoad() {
|
|
33
36
|
const observer = new MutationObserver(this.onMutationObserved);
|
|
34
37
|
observer.observe(this.hostElement, { childList: true });
|
|
35
38
|
this.mutationObserver = observer;
|
|
36
|
-
this.onMutationObserved();
|
|
37
39
|
overrideFocus(this.hostElement);
|
|
38
40
|
}
|
|
39
41
|
/////// OBSERVERS ///////
|
|
40
|
-
valueUpdated() {
|
|
42
|
+
valueUpdated(newVal) {
|
|
41
43
|
this.radioElements.forEach(radio => {
|
|
42
|
-
radio.checked =
|
|
44
|
+
radio.checked = newVal === radio.value;
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
nameUpdated() {
|
|
@@ -13,6 +13,7 @@ const Q2Radio = class {
|
|
|
13
13
|
this.groupReadonly = false;
|
|
14
14
|
this.groupTileLayout = false;
|
|
15
15
|
this.id = `radio-${createGuid()}`;
|
|
16
|
+
this.isLoaded = false;
|
|
16
17
|
this.inputChange = (event) => {
|
|
17
18
|
event.stopPropagation();
|
|
18
19
|
if (this.groupReadonly) {
|
|
@@ -29,6 +30,7 @@ const Q2Radio = class {
|
|
|
29
30
|
handleAriaLabel(this);
|
|
30
31
|
}
|
|
31
32
|
componentDidLoad() {
|
|
33
|
+
this.isLoaded = true;
|
|
32
34
|
overrideFocus(this.hostElement);
|
|
33
35
|
}
|
|
34
36
|
////////// OBSERVERS //////////
|
|
@@ -36,6 +38,8 @@ const Q2Radio = class {
|
|
|
36
38
|
handleAriaLabel(this);
|
|
37
39
|
}
|
|
38
40
|
checkedObserver() {
|
|
41
|
+
if (!this.isLoaded)
|
|
42
|
+
return;
|
|
39
43
|
if (!this.checked)
|
|
40
44
|
return;
|
|
41
45
|
this.change.emit({ value: this.value });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,F as o,g as a}from"./p-080839ed.js";import{c as r,o as s,i as n,l}from"./p-f85da2a8.js";const d=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.disabled=!1,this.tileAlignment="center",this.hasError=!1,this.id=`radio-group-${r()}`,this.onMutationObserved=()=>{this.valueUpdated(this.value),this.nameUpdated(),this.disabledUpdated(),this.readonlyUpdated(),this.tileLayoutUpdated()},this.onInnerRadioChange=t=>{t.stopImmediatePropagation(),this.readonly||this.change.emit({value:t.detail.value})}}get radioElements(){return Array.from(this.hostElement.querySelectorAll("q2-radio"))}componentWillLoad(){this.onMutationObserved()}componentDidLoad(){const t=new MutationObserver(this.onMutationObserved);t.observe(this.hostElement,{childList:!0}),this.mutationObserver=t,s(this.hostElement)}valueUpdated(t){this.radioElements.forEach((e=>{e.checked=t===e.value}))}nameUpdated(){this.radioElements.forEach((t=>{t.name=this.name||this.id}))}disabledUpdated(){this.radioElements.forEach((t=>{t.groupDisabled=this.disabled}))}readonlyUpdated(){const t=this.readonly;this.radioElements.forEach((e=>e.groupReadonly=t))}tileLayoutUpdated(){this.radioElements.forEach((t=>{t.groupTileLayout=this.tilelayout}))}onHostElementChange(t){t.target===this.hostElement&&(this.hostElement.onchange||(this.value=t.detail.value))}delegateFocus(t){if(!n(t,this.hostElement))return;const e=this.hostElement.querySelector("q2-radio[checked]")||this.hostElement.querySelector("q2-radio");null==e||e.dispatchEvent(new FocusEvent("focus"))}keydownHandler(t){const e=t.target.getAttribute("value")||this.value;let i=this.radioElements.findIndex((i=>i===t.target||i.getAttribute("value")===e)),o=0;switch(t.key){case"ArrowLeft":case"ArrowUp":o=-1;break;case"ArrowRight":case"ArrowDown":o=1}-1!==i&&0!==o&&(i+=o,i=o<0?Math.max(0,i):Math.min(this.radioElements.length-1,i),t.preventDefault(),this.readonly||(this.value=this.radioElements[i].value),this.radioElements[i].dispatchEvent(new FocusEvent("focus")))}labelDOM(){const{label:t,optional:e,readonly:a}=this;let r="";return a?r=i("span",{class:"optional-tag"},l("tecton.element.input.readonly")):e&&(r=i("span",{class:"optional-tag"},l("tecton.element.input.optional"))),i(o,null,t&&l(t),!!r&&i("span",{class:"optional-tag"},r))}render(){const t=this.label||this.optional||this.readonly;return i("div",null,t&&i("div",{class:"group-legend"},this.labelDOM()),i("fieldset",{class:"q2-radio-fieldset "+(this.hasError?"has-error":""),onChange:this.onInnerRadioChange,"aria-required":`${!this.optional}`,"aria-readonly":`${this.readonly}`},t&&i("legend",{class:"sr-only"},this.labelDOM()),this.hasError?i("div",{class:`error-icon-container ${!t&&"no-label"}`},i("q2-icon",{class:"h(4) w(4) mrg-b(2)",type:"error"})):"",this.inputDom()))}inputDom(){if(this.tilelayout){const{tileAlignment:t}=this,e=["left","center","right"].includes(t)?t:"center";return i("div",{class:`flexed ${e}`},i("slot",null))}return i("slot",null)}get hostElement(){return a(this)}static get watchers(){return{value:["valueUpdated"],name:["nameUpdated"],disabled:["disabledUpdated"],readonly:["readonlyUpdated"],tilelayout:["tileLayoutUpdated"]}}};d.style="*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{margin-top:var(--tct-scale-2, var(--app-scale-2, 10px))}fieldset{padding:0;margin:0;border:0}fieldset.has-error{border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #c30000));border-width:1px;border-style:solid;border-radius:var(--tct-border-radius-1, var(--app-border-radius-1, 2px));position:relative}fieldset.has-error .error-icon-container{top:8px;right:8px;position:absolute;width:40%;text-align:right;background:linear-gradient(to right, transparent, white)}fieldset.has-error legend+div.error-icon-container.no-label{top:28px}.group-legend{font-weight:600}legend.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--t-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1, 5px))));color:var(--tct-input-label-optional-font-color, var(--t-input-label-optional-font-color, var(--t-textA, var(--t-a11y-gray-color, rgba(77, 77, 77, 0.77)))));font-size:var(--tct-input-label-optional-font-size, var(--t-input-label-optional-font-size, 12px));font-weight:var(--tct-input-label-optional-font-weight, var(--t-input-label-optional-font-weight, 400))}.flexed{margin:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:center}.flexed.left{justify-content:left}.flexed.right{justify-content:right}";export{d as q2_radio_group}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as r,h as e,g as o}from"./p-080839ed.js";import{c as i,h as a,o as c,l as s}from"./p-f85da2a8.js";const l=class{constructor(e){t(this,e),this.change=r(this,"change",7),this.disabled=!1,this.checked=!1,this.groupDisabled=!1,this.groupReadonly=!1,this.groupTileLayout=!1,this.id=`radio-${i()}`,this.isLoaded=!1,this.inputChange=t=>{if(t.stopPropagation(),this.groupReadonly)return t.preventDefault(),!1;t.target instanceof HTMLInputElement&&(this.checked=t.target.checked)}}componentWillLoad(){a(this)}componentDidLoad(){this.isLoaded=!0,c(this.hostElement)}ariaLabelObserver(){a(this)}checkedObserver(){this.isLoaded&&this.checked&&this.change.emit({value:this.value})}onHostClick(t){this.disabled&&t.stopImmediatePropagation()}delegateFocus(t){t.target===this.hostElement&&this.inputField.focus()}render(){return e("div",{class:this.groupTileLayout?"radio-tile":"radio-container"},e("input",{ref:t=>this.inputField=t,class:"sr",id:this.id,type:"radio",name:this.name,value:this.value,disabled:this.disabled||this.groupDisabled,checked:this.checked,"aria-label":this.label&&this.hideLabel?s(this.label):void 0,onChange:this.inputChange,"test-id":"q2RadioInnerRadioBox"}),e("label",{htmlFor:this.id,"test-id":"radioButton"},!this.groupTileLayout&&e("svg",{viewBox:"0 0 18 18"},e("circle",{stroke:"none",fill:"none",cx:"9",cy:"9",r:"8"}),e("circle",{stroke:"none",fill:"none",cx:"9",cy:"9",r:"4"})),!this.hideLabel&&e("div",{class:"label-content"},this.label&&s(this.label)||"",e("slot",null))))}get hostElement(){return o(this)}static get watchers(){return{ariaLabel:["ariaLabelObserver"],checked:["checkedObserver"]}}};l.style='*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{margin-top:var(--tct-radio-margin-vertical, var(--tct-scale-2, 10px));margin-right:var(--tct-radio-margin-horizontal, var(--tct-scale-3, 15px));display:block}:host .radio-container{margin-bottom:var(--tct-radio-margin-vertical, var(--tct-scale-2, 10px))}:host .radio-container label[for]{font-weight:var(--tct-radio-font-weight, var(--tct-checkbox-font-weight, 400));align-items:center;cursor:pointer;margin-right:1rem;display:grid;grid-template-columns:18px 1fr;gap:var(--tct-scale-1, var(--app-scale-1, 5px))}:host .radio-container svg{border-radius:50%;transition:box-shadow var(--tct-tween-1, var(--app-tween-1, 0.2s ease));outline:0;width:100%}:host .radio-container circle:nth-child(1){stroke-width:2;stroke:var(--tct-radio-stroke-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc)))))}:host .radio-container input:focus+label svg{box-shadow:var(--tct-global-focus, var(--const-global-focus, 0 0 0 2px #33b4ff))}:host .radio-container input:focus+label circle:nth-child(1){stroke:var(--tct-radio-focus-stroke-color, var(--tct-checkbox-check-stroke-color, var(--t-checkbox-fill, #2e2e2e)))}:host .radio-container input:checked+label circle:nth-child(1){background-color:var(--tct-radio-checked-bg, transparent);stroke:var(--tct-radio-checked-stroke-color, var(--tct-radio-stroke-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))))}:host .radio-container input:checked+label .label-content{font-weight:var(--tct-checkbox-selected-font-weight, 600);letter-spacing:var(--tct-checkbox-selected-letter-spacing, 0.25)}:host .radio-container input:checked+label circle:nth-child(2){fill:var(--tct-radio-checked-fill, var(--tct-checkbox-check-stroke-color, var(--t-checkbox-fill, #2e2e2e)))}:host .radio-tile{flex-basis:100px;flex-grow:0;flex-wrap:wrap}:host .radio-tile label[for]{align-items:center;border-radius:3px;border:2px solid var(--tct-radio-stroke-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc)))));cursor:pointer;display:block;padding:1rem;position:relative;text-align:center;transition:border-color var(--tct-tween-1, var(--app-tween-1, 0.2s ease));white-space:nowrap}:host .radio-tile input:focus+label{border-color:#0079c1;box-shadow:var(--tct-global-focus, var(--const-global-focus, 0 0 0 2px #33b4ff))}:host .radio-tile input:checked+label{border-color:var(--tct-checkbox-check-stroke-color, var(--t-checkbox-fill, #2e2e2e));box-shadow:inset 0 0 0 2px #ffffff}:host .radio-tile input:checked+label:after{border-bottom-width:3px;border-bottom:5px solid #0079c1;border-left-width:5px;border-left:8px solid transparent;border-right-width:5px;border-right:8px solid transparent;bottom:0;content:"";height:0;left:50%;margin-left:-5px;position:absolute;width:0}:host input:disabled+label{cursor:not-allowed;opacity:var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))}';export{l as q2_radio}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-080839ed.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-88bc2f49",[[1,"q2-icon",{type:[513],label:[513]}]]],["p-a72e7a12",[[1,"q2-calendar",{value:[1537],label:[513],hideLabel:[516,"hide-label"],ariaLabel:[513,"aria-label"],optional:[516],disabled:[516],readonly:[516],invalid:[1540],typeable:[516],placeholder:[513],buttonLabel:[513,"button-label"],disabledMsg:[513,"disabled-msg"],calendarLabel:[513,"calendar-label"],disclaimer:[513],displayFormat:[513,"display-format"],startDate:[513,"start-date"],endDate:[513,"end-date"],cutoffTime:[513,"cutoff-time"],daysOfWeekChecksum:[514,"days-of-week-checksum"],popDirection:[513,"pop-direction"],assume:[513],errors:[1040],invalidDates:[16],validDates:[16],onsuccess:[16],dropdownOpen:[32],keyboardSelection:[32],typedValue:[32],dateList:[32],hintMessage:[32],hintMessageType:[32]},[[0,"change","defaultChangeHandler"],[0,"error","defaultErrorHandler"],[0,"success","defaultSuccessHandler"],[0,"focus","delegateFocus"]]]]],["p-f85bf7fb",[[1,"q2-dropdown",{type:[513],icon:[513],label:[513],hideLabel:[516,"hide-label"],ariaLabel:[513,"aria-label"],disabled:[516],popDirection:[513,"pop-direction"],name:[513],context:[513],contextValue:[513,"context-value"],resolvedType:[513,"resolved-type"],dropdownOpen:[32]},[[0,"focus","delegateFocus"]]]]],["p-564154f3",[[1,"q2-select",{label:[513],hideLabel:[516,"hide-label"],value:[1025],ariaLabel:[513,"aria-label"],selectedOptions:[1032,"selected-options"],disabled:[516],readonly:[516],invalid:[516],errors:[16],multiple:[516],minRows:[2,"min-rows"],popDirection:[513,"pop-direction"],searchable:[516],multilineOptions:[516,"multiline-options"],optional:[516],dropdownOpen:[32],onlyShowingSelected:[32],activeOptionId:[32],searchText:[32],hasCustomDisplay:[32],inputFocused:[32],statusMessage:[32]},[[0,"change","onHostElementChange"],[0,"input","onHostElementInput"],[0,"focus","delegateFocus"],[0,"click","clickHandler"],[0,"keydown","keydownHandler"]]]]],["p-c83dba0a",[[1,"q2-editable-field",{value:[1537],editing:[1540],label:[1537],hideLabel:[1540,"hide-label"],ariaLabel:[1537,"aria-label"],type:[513],formatModifier:[513,"format-modifier"],truncated:[513],maxlength:[514],persistentLabel:[516,"persistent-label"],hints:[16],errors:[16]},[[0,"change","onHostElementChange"],[0,"focus","delegateFocus"]]]]],["p-346b65d5",[[1,"q2-pagination",{recordType:[1,"record-type"],perPage:[2,"per-page"],total:[514],page:[1538],pages:[1538],recordsOnly:[1540,"records-only"],pagesOnly:[1540,"pages-only"],isSmall:[32]},[[0,"focus","onHostElementFocus"]]]]],["p-bfd77f9b",[[4,"q2-carousel",{autoPlay:[516,"auto-play"],fullWidthPanes:[516,"full-width-panes"],hidePagination:[516,"hide-pagination"],showNavigationArrows:[516,"show-navigation-arrows"],ariaLabel:[513,"aria-label"],label:[513],index:[1538],universalCarouselOptions:[32],fullWidthDisplayOptions:[32],activePaneIndex:[32],applyFocus:[32],applyPaginationFocus:[32],autoPlayInProgress:[32],compactMode:[32],carouselWrapperWidth:[32]},[[0,"change","onHostElementChange"],[0,"clickCarouselPane","carouselPaneClicked"],[0,"focus","delegateFocus"]]]]],["p-701b381a",[[1,"q2-section",{label:[513],collapsible:[516],noCollapseIcon:[516,"no-collapse-icon"],expanded:[1540],contentHeight:[32],hasYieldedHeader:[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]]]]],["p-b5b12e46",[[1,"q2-stepper",{currentStep:[1538,"current-step"],stepCount:[1026,"step-count"],lastEnabledStep:[1026,"last-enabled-step"],scrollEnabled:[32],showScrollLeft:[32],showScrollRight:[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]]]]],["p-dffbcec3",[[1,"q2-tab-container",{value:[1537],type:[513],name:[513],color:[513],noPrint:[516,"no-print"],hasLeft:[32],hasRight:[32],scrollEnabled:[32],showScrollLeft:[32],showScrollRight:[32],tabs:[32]},[[0,"change","defaultChangeHandler"],[9,"resize","onResize"],[0,"focus","onFocus"]]]]],["p-27ec0a16",[[1,"q2-card",{title:[513],description:[513],avatarName:[513,"avatar-name"],avatarInitials:[513,"avatar-initials"],avatarIcon:[513,"avatar-icon"],avatarSrc:[513,"avatar-src"],isSmall:[516,"is-small"],isTouch:[516,"is-touch"],url:[513],target:[513],isAutoTouch:[32],isAutoSmall:[32]},[[0,"focus","onHostElementFocus"]]]]],["p-841ec108",[[1,"q2-checkbox",{checked:[1540],type:[513],label:[513],hideLabel:[516,"hide-label"],ariaLabel:[513,"aria-label"],indeterminate:[516],disabled:[516],readonly:[516],value:[513],name:[513],hasError:[516,"has-error"],groupDisabled:[516,"group-disabled"],alignment:[513]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]]]]],["p-ca847db7",[[1,"q2-checkbox-group",{label:[513],value:[1040],disabled:[516],readonly:[516],optional:[516],hasError:[516,"has-error"]},[[0,"change","onHostElementChange"]]]]],["p-6702eb4d",[[1,"q2-option",{role:[513],tabindex:[513],display:[513],value:[513],disabled:[516],optionId:[513,"option-id"],disabledGroup:[516,"disabled-group"],selected:[516],hidden:[516],multiline:[516],active:[516],_multiSelectHidden:[516,"_multiselecthidden"]}]]],["p-
|
|
1
|
+
import{p as e,b as a}from"./p-080839ed.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-88bc2f49",[[1,"q2-icon",{type:[513],label:[513]}]]],["p-a72e7a12",[[1,"q2-calendar",{value:[1537],label:[513],hideLabel:[516,"hide-label"],ariaLabel:[513,"aria-label"],optional:[516],disabled:[516],readonly:[516],invalid:[1540],typeable:[516],placeholder:[513],buttonLabel:[513,"button-label"],disabledMsg:[513,"disabled-msg"],calendarLabel:[513,"calendar-label"],disclaimer:[513],displayFormat:[513,"display-format"],startDate:[513,"start-date"],endDate:[513,"end-date"],cutoffTime:[513,"cutoff-time"],daysOfWeekChecksum:[514,"days-of-week-checksum"],popDirection:[513,"pop-direction"],assume:[513],errors:[1040],invalidDates:[16],validDates:[16],onsuccess:[16],dropdownOpen:[32],keyboardSelection:[32],typedValue:[32],dateList:[32],hintMessage:[32],hintMessageType:[32]},[[0,"change","defaultChangeHandler"],[0,"error","defaultErrorHandler"],[0,"success","defaultSuccessHandler"],[0,"focus","delegateFocus"]]]]],["p-f85bf7fb",[[1,"q2-dropdown",{type:[513],icon:[513],label:[513],hideLabel:[516,"hide-label"],ariaLabel:[513,"aria-label"],disabled:[516],popDirection:[513,"pop-direction"],name:[513],context:[513],contextValue:[513,"context-value"],resolvedType:[513,"resolved-type"],dropdownOpen:[32]},[[0,"focus","delegateFocus"]]]]],["p-564154f3",[[1,"q2-select",{label:[513],hideLabel:[516,"hide-label"],value:[1025],ariaLabel:[513,"aria-label"],selectedOptions:[1032,"selected-options"],disabled:[516],readonly:[516],invalid:[516],errors:[16],multiple:[516],minRows:[2,"min-rows"],popDirection:[513,"pop-direction"],searchable:[516],multilineOptions:[516,"multiline-options"],optional:[516],dropdownOpen:[32],onlyShowingSelected:[32],activeOptionId:[32],searchText:[32],hasCustomDisplay:[32],inputFocused:[32],statusMessage:[32]},[[0,"change","onHostElementChange"],[0,"input","onHostElementInput"],[0,"focus","delegateFocus"],[0,"click","clickHandler"],[0,"keydown","keydownHandler"]]]]],["p-c83dba0a",[[1,"q2-editable-field",{value:[1537],editing:[1540],label:[1537],hideLabel:[1540,"hide-label"],ariaLabel:[1537,"aria-label"],type:[513],formatModifier:[513,"format-modifier"],truncated:[513],maxlength:[514],persistentLabel:[516,"persistent-label"],hints:[16],errors:[16]},[[0,"change","onHostElementChange"],[0,"focus","delegateFocus"]]]]],["p-346b65d5",[[1,"q2-pagination",{recordType:[1,"record-type"],perPage:[2,"per-page"],total:[514],page:[1538],pages:[1538],recordsOnly:[1540,"records-only"],pagesOnly:[1540,"pages-only"],isSmall:[32]},[[0,"focus","onHostElementFocus"]]]]],["p-bfd77f9b",[[4,"q2-carousel",{autoPlay:[516,"auto-play"],fullWidthPanes:[516,"full-width-panes"],hidePagination:[516,"hide-pagination"],showNavigationArrows:[516,"show-navigation-arrows"],ariaLabel:[513,"aria-label"],label:[513],index:[1538],universalCarouselOptions:[32],fullWidthDisplayOptions:[32],activePaneIndex:[32],applyFocus:[32],applyPaginationFocus:[32],autoPlayInProgress:[32],compactMode:[32],carouselWrapperWidth:[32]},[[0,"change","onHostElementChange"],[0,"clickCarouselPane","carouselPaneClicked"],[0,"focus","delegateFocus"]]]]],["p-701b381a",[[1,"q2-section",{label:[513],collapsible:[516],noCollapseIcon:[516,"no-collapse-icon"],expanded:[1540],contentHeight:[32],hasYieldedHeader:[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]]]]],["p-b5b12e46",[[1,"q2-stepper",{currentStep:[1538,"current-step"],stepCount:[1026,"step-count"],lastEnabledStep:[1026,"last-enabled-step"],scrollEnabled:[32],showScrollLeft:[32],showScrollRight:[32]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]]]]],["p-dffbcec3",[[1,"q2-tab-container",{value:[1537],type:[513],name:[513],color:[513],noPrint:[516,"no-print"],hasLeft:[32],hasRight:[32],scrollEnabled:[32],showScrollLeft:[32],showScrollRight:[32],tabs:[32]},[[0,"change","defaultChangeHandler"],[9,"resize","onResize"],[0,"focus","onFocus"]]]]],["p-27ec0a16",[[1,"q2-card",{title:[513],description:[513],avatarName:[513,"avatar-name"],avatarInitials:[513,"avatar-initials"],avatarIcon:[513,"avatar-icon"],avatarSrc:[513,"avatar-src"],isSmall:[516,"is-small"],isTouch:[516,"is-touch"],url:[513],target:[513],isAutoTouch:[32],isAutoSmall:[32]},[[0,"focus","onHostElementFocus"]]]]],["p-841ec108",[[1,"q2-checkbox",{checked:[1540],type:[513],label:[513],hideLabel:[516,"hide-label"],ariaLabel:[513,"aria-label"],indeterminate:[516],disabled:[516],readonly:[516],value:[513],name:[513],hasError:[516,"has-error"],groupDisabled:[516,"group-disabled"],alignment:[513]},[[0,"change","defaultChangeHandler"],[0,"focus","delegateFocus"]]]]],["p-ca847db7",[[1,"q2-checkbox-group",{label:[513],value:[1040],disabled:[516],readonly:[516],optional:[516],hasError:[516,"has-error"]},[[0,"change","onHostElementChange"]]]]],["p-6702eb4d",[[1,"q2-option",{role:[513],tabindex:[513],display:[513],value:[513],disabled:[516],optionId:[513,"option-id"],disabledGroup:[516,"disabled-group"],selected:[516],hidden:[516],multiline:[516],active:[516],_multiSelectHidden:[516,"_multiselecthidden"]}]]],["p-3479847c",[[1,"q2-radio-group",{label:[513],value:[1025],disabled:[516],name:[513],optional:[516],readonly:[516],tilelayout:[516],tileAlignment:[513,"tile-alignment"],hasError:[516,"has-error"]},[[0,"change","onHostElementChange"],[0,"focus","delegateFocus"],[0,"keydown","keydownHandler"]]]]],["p-9ccbc3d8",[[1,"q2-textarea",{value:[1025],label:[513],hideLabel:[516,"hide-label"],hideMessages:[516,"hide-messages"],optional:[516],placeholder:[513],disabled:[516],readonly:[516],spellcheck:[516],maxlength:[1538],rows:[514],cols:[514],resize:[513],errors:[16],hints:[16],hasFocus:[32],downParams:[32]},[[0,"focus","onHostElementFocus"],[0,"change","onHostElementChange"]]]]],["p-6a83a97c",[[4,"q2-carousel-pane",{index:[2],siblingCount:[2,"sibling-count"],isActivePane:[516,"is-active-pane"],label:[513]}]]],["p-32ad664c",[[0,"q2-loading-element",{shape:[513],width:[513],height:[513],borderRadius:[513,"border-radius"]}]]],["p-2be33492",[[1,"q2-loc",{value:[513],substitutions:[16]}]]],["p-fe61c1aa",[[1,"q2-optgroup",{disabled:[516],label:[513],hidden:[32]}]]],["p-f435dc7e",[[1,"q2-radio",{label:[513],hideLabel:[516,"hide-label"],value:[513],disabled:[516],checked:[516],name:[513],ariaLabel:[513,"aria-label"],groupDisabled:[4,"group-disabled"],groupReadonly:[4,"group-readonly"],groupTileLayout:[4,"group-tile-layout"]},[[0,"click","onHostClick"],[0,"focus","delegateFocus"]]]]],["p-492dfb55",[[1,"q2-stepper-pane",{label:[513],description:[513],isActive:[516,"is-active"]}]]],["p-750bcd33",[[1,"q2-tab-pane",{value:[513],label:[513],name:[513],selected:[516],index:[2],guid:[2]}]]],["p-8ea2c4f7",[[1,"tecton-tab-pane",{value:[513],label:[513],name:[513],selected:[516],index:[2],guid:[2],provided:[516],url:[513],moduleId:[513,"module-id"],minHeight:[513,"min-height"],authPayload:[16],showForm:[4,"show-form"],_showForm:[32]}]]],["p-2372f988",[[1,"q2-dropdown-item",{disabled:[516],removable:[516],separator:[516],label:[513],ariaLabel:[513,"aria-label"],value:[513]},[[0,"focus","onHostElementFocus"]]]]],["p-af202624",[[1,"q2-avatar",{name:[513],initials:[513],src:[513],icon:[1],badSrc:[32]}]]],["p-d199fca8",[[1,"q2-message",{type:[513],appearance:[513],description:[516],presentToggle:[32],present:[64]},[[0,"focus","delegateFocus"]]]]],["p-9024859f",[[0,"click-elsewhere"]]],["p-f73df612",[[1,"q2-btn",{ariaExpanded:[4,"aria-expanded"],ariaHasPopup:[8,"aria-has-popup"],ariaControls:[1,"aria-controls"],ariaSelected:[4,"aria-selected"],label:[513],hideLabel:[516,"hide-label"],ariaLabel:[513,"aria-label"],tabIndex:[2,"tab-index"],intent:[513],disabled:[516],type:[513],loading:[516],badge:[516],active:[516],fab:[516],iconPosition:[32]},[[2,"click","disable"],[0,"focus","delegateFocus"]]],[1,"q2-loading",{type:[513],shape:[513],modifiers:[513],counts:[513],label:[513],ariaLabel:[513,"aria-label"],inline:[516]}]]],["p-fc318ae2",[[1,"q2-input",{value:[1025],label:[513],hideLabel:[516,"hide-label"],type:[513],placeholder:[513],disabled:[516],autocomplete:[513],autocorrect:[513],autocapitalize:[513],hideMessages:[516,"hide-messages"],iconLeft:[513,"icon-left"],iconRight:[513,"icon-right"],readonly:[516],clearable:[516],optional:[516],min:[514],max:[514],formatModifier:[513,"format-modifier"],maxlength:[1538],pseudo:[516],showVisibilityToggle:[516,"show-visibility-toggle"],textHidden:[1540,"text-hidden"],ariaControls:[1,"aria-controls"],role:[1],ariaOwns:[1,"aria-owns"],ariaLabel:[513,"aria-label"],ariaHaspopup:[1,"aria-haspopup"],ariaExpanded:[4,"aria-expanded"],ariaActivedescendant:[8,"aria-activedescendant"],current:[1],errors:[16],hints:[16],formattedValueObject:[32],hasFocus:[32]},[[0,"focus","onHostElementFocus"],[0,"change","onHostElementChange"]]]]]],e)));
|
|
@@ -15,8 +15,9 @@ export declare class Q2RadioGroup implements ComponentInterface {
|
|
|
15
15
|
get radioElements(): HTMLQ2RadioElement[];
|
|
16
16
|
onMutationObserved: () => void;
|
|
17
17
|
onInnerRadioChange: (event: CustomEvent) => void;
|
|
18
|
+
componentWillLoad(): void;
|
|
18
19
|
componentDidLoad(): void;
|
|
19
|
-
valueUpdated(): void;
|
|
20
|
+
valueUpdated(newVal: any): void;
|
|
20
21
|
nameUpdated(): void;
|
|
21
22
|
disabledUpdated(): void;
|
|
22
23
|
readonlyUpdated(): void;
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "q2-tecton-elements",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.4-alpha.0",
|
|
4
4
|
"description": "Q2 Tecton Custom Elements",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"smoothscroll-polyfill": "^0.4.4",
|
|
49
49
|
"swiper": "7.4.1"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "1dfc0e8fac6cb795a0c9576c4ebe036efc361f2b"
|
|
52
52
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,F as o,g as r}from"./p-080839ed.js";import{c as a,o as s,i as n,l}from"./p-f85da2a8.js";const d=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.disabled=!1,this.tileAlignment="center",this.hasError=!1,this.id=`radio-group-${a()}`,this.onMutationObserved=()=>{this.valueUpdated(),this.nameUpdated(),this.disabledUpdated(),this.readonlyUpdated(),this.tileLayoutUpdated()},this.onInnerRadioChange=t=>{t.stopImmediatePropagation(),this.readonly||this.change.emit({value:t.detail.value})}}get radioElements(){return Array.from(this.hostElement.querySelectorAll("q2-radio"))}componentDidLoad(){const t=new MutationObserver(this.onMutationObserved);t.observe(this.hostElement,{childList:!0}),this.mutationObserver=t,this.onMutationObserved(),s(this.hostElement)}valueUpdated(){this.radioElements.forEach((t=>{t.checked=this.value===t.value}))}nameUpdated(){this.radioElements.forEach((t=>{t.name=this.name||this.id}))}disabledUpdated(){this.radioElements.forEach((t=>{t.groupDisabled=this.disabled}))}readonlyUpdated(){const t=this.readonly;this.radioElements.forEach((e=>e.groupReadonly=t))}tileLayoutUpdated(){this.radioElements.forEach((t=>{t.groupTileLayout=this.tilelayout}))}onHostElementChange(t){t.target===this.hostElement&&(this.hostElement.onchange||(this.value=t.detail.value))}delegateFocus(t){if(!n(t,this.hostElement))return;const e=this.hostElement.querySelector("q2-radio[checked]")||this.hostElement.querySelector("q2-radio");null==e||e.dispatchEvent(new FocusEvent("focus"))}keydownHandler(t){const e=t.target.getAttribute("value")||this.value;let i=this.radioElements.findIndex((i=>i===t.target||i.getAttribute("value")===e)),o=0;switch(t.key){case"ArrowLeft":case"ArrowUp":o=-1;break;case"ArrowRight":case"ArrowDown":o=1}-1!==i&&0!==o&&(i+=o,i=o<0?Math.max(0,i):Math.min(this.radioElements.length-1,i),t.preventDefault(),this.readonly||(this.value=this.radioElements[i].value),this.radioElements[i].dispatchEvent(new FocusEvent("focus")))}labelDOM(){const{label:t,optional:e,readonly:r}=this;let a="";return r?a=i("span",{class:"optional-tag"},l("tecton.element.input.readonly")):e&&(a=i("span",{class:"optional-tag"},l("tecton.element.input.optional"))),i(o,null,t&&l(t),!!a&&i("span",{class:"optional-tag"},a))}render(){const t=this.label||this.optional||this.readonly;return i("div",null,t&&i("div",{class:"group-legend"},this.labelDOM()),i("fieldset",{class:"q2-radio-fieldset "+(this.hasError?"has-error":""),onChange:this.onInnerRadioChange,"aria-required":`${!this.optional}`,"aria-readonly":`${this.readonly}`},t&&i("legend",{class:"sr-only"},this.labelDOM()),this.hasError?i("div",{class:`error-icon-container ${!t&&"no-label"}`},i("q2-icon",{class:"h(4) w(4) mrg-b(2)",type:"error"})):"",this.inputDom()))}inputDom(){if(this.tilelayout){const{tileAlignment:t}=this,e=["left","center","right"].includes(t)?t:"center";return i("div",{class:`flexed ${e}`},i("slot",null))}return i("slot",null)}get hostElement(){return r(this)}static get watchers(){return{value:["valueUpdated"],name:["nameUpdated"],disabled:["disabledUpdated"],readonly:["readonlyUpdated"],tilelayout:["tileLayoutUpdated"]}}};d.style="*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{margin-top:var(--tct-scale-2, var(--app-scale-2, 10px))}fieldset{padding:0;margin:0;border:0}fieldset.has-error{border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #c30000));border-width:1px;border-style:solid;border-radius:var(--tct-border-radius-1, var(--app-border-radius-1, 2px));position:relative}fieldset.has-error .error-icon-container{top:8px;right:8px;position:absolute;width:40%;text-align:right;background:linear-gradient(to right, transparent, white)}fieldset.has-error legend+div.error-icon-container.no-label{top:28px}.group-legend{font-weight:600}legend.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--t-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1, 5px))));color:var(--tct-input-label-optional-font-color, var(--t-input-label-optional-font-color, var(--t-textA, var(--t-a11y-gray-color, rgba(77, 77, 77, 0.77)))));font-size:var(--tct-input-label-optional-font-size, var(--t-input-label-optional-font-size, 12px));font-weight:var(--tct-input-label-optional-font-weight, var(--t-input-label-optional-font-weight, 400))}.flexed{margin:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:center}.flexed.left{justify-content:left}.flexed.right{justify-content:right}";export{d as q2_radio_group}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as r,h as e,g as o}from"./p-080839ed.js";import{c as i,h as a,o as c,l as s}from"./p-f85da2a8.js";const l=class{constructor(e){t(this,e),this.change=r(this,"change",7),this.disabled=!1,this.checked=!1,this.groupDisabled=!1,this.groupReadonly=!1,this.groupTileLayout=!1,this.id=`radio-${i()}`,this.inputChange=t=>{if(t.stopPropagation(),this.groupReadonly)return t.preventDefault(),!1;t.target instanceof HTMLInputElement&&(this.checked=t.target.checked)}}componentWillLoad(){a(this)}componentDidLoad(){c(this.hostElement)}ariaLabelObserver(){a(this)}checkedObserver(){this.checked&&this.change.emit({value:this.value})}onHostClick(t){this.disabled&&t.stopImmediatePropagation()}delegateFocus(t){t.target===this.hostElement&&this.inputField.focus()}render(){return e("div",{class:this.groupTileLayout?"radio-tile":"radio-container"},e("input",{ref:t=>this.inputField=t,class:"sr",id:this.id,type:"radio",name:this.name,value:this.value,disabled:this.disabled||this.groupDisabled,checked:this.checked,"aria-label":this.label&&this.hideLabel?s(this.label):void 0,onChange:this.inputChange,"test-id":"q2RadioInnerRadioBox"}),e("label",{htmlFor:this.id,"test-id":"radioButton"},!this.groupTileLayout&&e("svg",{viewBox:"0 0 18 18"},e("circle",{stroke:"none",fill:"none",cx:"9",cy:"9",r:"8"}),e("circle",{stroke:"none",fill:"none",cx:"9",cy:"9",r:"4"})),!this.hideLabel&&e("div",{class:"label-content"},this.label&&s(this.label)||"",e("slot",null))))}get hostElement(){return o(this)}static get watchers(){return{ariaLabel:["ariaLabelObserver"],checked:["checkedObserver"]}}};l.style='*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-global-focus)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{margin-top:var(--tct-radio-margin-vertical, var(--tct-scale-2, 10px));margin-right:var(--tct-radio-margin-horizontal, var(--tct-scale-3, 15px));display:block}:host .radio-container{margin-bottom:var(--tct-radio-margin-vertical, var(--tct-scale-2, 10px))}:host .radio-container label[for]{font-weight:var(--tct-radio-font-weight, var(--tct-checkbox-font-weight, 400));align-items:center;cursor:pointer;margin-right:1rem;display:grid;grid-template-columns:18px 1fr;gap:var(--tct-scale-1, var(--app-scale-1, 5px))}:host .radio-container svg{border-radius:50%;transition:box-shadow var(--tct-tween-1, var(--app-tween-1, 0.2s ease));outline:0;width:100%}:host .radio-container circle:nth-child(1){stroke-width:2;stroke:var(--tct-radio-stroke-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc)))))}:host .radio-container input:focus+label svg{box-shadow:var(--tct-global-focus, var(--const-global-focus, 0 0 0 2px #33b4ff))}:host .radio-container input:focus+label circle:nth-child(1){stroke:var(--tct-radio-focus-stroke-color, var(--tct-checkbox-check-stroke-color, var(--t-checkbox-fill, #2e2e2e)))}:host .radio-container input:checked+label circle:nth-child(1){background-color:var(--tct-radio-checked-bg, transparent);stroke:var(--tct-radio-checked-stroke-color, var(--tct-radio-stroke-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))))}:host .radio-container input:checked+label .label-content{font-weight:var(--tct-checkbox-selected-font-weight, 600);letter-spacing:var(--tct-checkbox-selected-letter-spacing, 0.25)}:host .radio-container input:checked+label circle:nth-child(2){fill:var(--tct-radio-checked-fill, var(--tct-checkbox-check-stroke-color, var(--t-checkbox-fill, #2e2e2e)))}:host .radio-tile{flex-basis:100px;flex-grow:0;flex-wrap:wrap}:host .radio-tile label[for]{align-items:center;border-radius:3px;border:2px solid var(--tct-radio-stroke-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc)))));cursor:pointer;display:block;padding:1rem;position:relative;text-align:center;transition:border-color var(--tct-tween-1, var(--app-tween-1, 0.2s ease));white-space:nowrap}:host .radio-tile input:focus+label{border-color:#0079c1;box-shadow:var(--tct-global-focus, var(--const-global-focus, 0 0 0 2px #33b4ff))}:host .radio-tile input:checked+label{border-color:var(--tct-checkbox-check-stroke-color, var(--t-checkbox-fill, #2e2e2e));box-shadow:inset 0 0 0 2px #ffffff}:host .radio-tile input:checked+label:after{border-bottom-width:3px;border-bottom:5px solid #0079c1;border-left-width:5px;border-left:8px solid transparent;border-right-width:5px;border-right:8px solid transparent;bottom:0;content:"";height:0;left:50%;margin-left:-5px;position:absolute;width:0}:host input:disabled+label{cursor:not-allowed;opacity:var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))}';export{l as q2_radio}
|