q2-tecton-elements 1.11.2-alpha.0 → 1.11.2

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.
@@ -23,7 +23,9 @@ const Q2Radio = class {
23
23
  event.preventDefault();
24
24
  return false;
25
25
  }
26
- this.change.emit({ value: this.value });
26
+ if (event.target instanceof HTMLInputElement) {
27
+ this.checked = event.target.checked;
28
+ }
27
29
  };
28
30
  }
29
31
  ////////// LIFECYCLE HOOKS ////////
@@ -37,6 +39,11 @@ const Q2Radio = class {
37
39
  ariaLabelObserver() {
38
40
  index$1.handleAriaLabel(this);
39
41
  }
42
+ checkedObserver() {
43
+ if (!this.checked)
44
+ return;
45
+ this.change.emit({ value: this.value });
46
+ }
40
47
  /////// HOST ELEMENT EVENTS ///////
41
48
  onHostClick(event) {
42
49
  if (this.disabled) {
@@ -49,11 +56,12 @@ const Q2Radio = class {
49
56
  }
50
57
  }
51
58
  render() {
52
- return (index.h("div", { class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, index.h("input", { ref: el => (this.inputField = el), 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 ? index$1.loc(this.label) : undefined, onChange: this.inputChange, onClick: this.inputChange, "test-id": "q2RadioInnerRadioBox" }), index.h("label", { htmlFor: this.id, "test-id": "radioButton" }, !this.groupTileLayout && (index.h("svg", { viewBox: "0 0 18 18" }, index.h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), index.h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (index.h("div", { class: "label-content" }, (this.label && index$1.loc(this.label)) || '', index.h("slot", null))))));
59
+ return (index.h("div", { class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, index.h("input", { ref: el => (this.inputField = el), 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 ? index$1.loc(this.label) : undefined, onChange: this.inputChange, "test-id": "q2RadioInnerRadioBox" }), index.h("label", { htmlFor: this.id, "test-id": "radioButton" }, !this.groupTileLayout && (index.h("svg", { viewBox: "0 0 18 18" }, index.h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), index.h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (index.h("div", { class: "label-content" }, (this.label && index$1.loc(this.label)) || '', index.h("slot", null))))));
53
60
  }
54
61
  get hostElement() { return index.getElement(this); }
55
62
  static get watchers() { return {
56
- "ariaLabel": ["ariaLabelObserver"]
63
+ "ariaLabel": ["ariaLabelObserver"],
64
+ "checked": ["checkedObserver"]
57
65
  }; }
58
66
  };
59
67
  Q2Radio.style = stylesCss;
@@ -14,7 +14,9 @@ export class Q2Radio {
14
14
  event.preventDefault();
15
15
  return false;
16
16
  }
17
- this.change.emit({ value: this.value });
17
+ if (event.target instanceof HTMLInputElement) {
18
+ this.checked = event.target.checked;
19
+ }
18
20
  };
19
21
  }
20
22
  ////////// LIFECYCLE HOOKS ////////
@@ -28,6 +30,11 @@ export class Q2Radio {
28
30
  ariaLabelObserver() {
29
31
  handleAriaLabel(this);
30
32
  }
33
+ checkedObserver() {
34
+ if (!this.checked)
35
+ return;
36
+ this.change.emit({ value: this.value });
37
+ }
31
38
  /////// HOST ELEMENT EVENTS ///////
32
39
  onHostClick(event) {
33
40
  if (this.disabled) {
@@ -41,7 +48,7 @@ export class Q2Radio {
41
48
  }
42
49
  render() {
43
50
  return (h("div", { class: this.groupTileLayout ? 'radio-tile' : 'radio-container' },
44
- h("input", { ref: el => (this.inputField = el), 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 ? loc(this.label) : undefined, onChange: this.inputChange, onClick: this.inputChange, "test-id": "q2RadioInnerRadioBox" }),
51
+ h("input", { ref: el => (this.inputField = el), 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 ? loc(this.label) : undefined, onChange: this.inputChange, "test-id": "q2RadioInnerRadioBox" }),
45
52
  h("label", { htmlFor: this.id, "test-id": "radioButton" },
46
53
  !this.groupTileLayout && (h("svg", { viewBox: "0 0 18 18" },
47
54
  h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }),
@@ -255,6 +262,9 @@ export class Q2Radio {
255
262
  static get watchers() { return [{
256
263
  "propName": "ariaLabel",
257
264
  "methodName": "ariaLabelObserver"
265
+ }, {
266
+ "propName": "checked",
267
+ "methodName": "checkedObserver"
258
268
  }]; }
259
269
  static get listeners() { return [{
260
270
  "name": "click",
@@ -19,7 +19,9 @@ const Q2Radio = class {
19
19
  event.preventDefault();
20
20
  return false;
21
21
  }
22
- this.change.emit({ value: this.value });
22
+ if (event.target instanceof HTMLInputElement) {
23
+ this.checked = event.target.checked;
24
+ }
23
25
  };
24
26
  }
25
27
  ////////// LIFECYCLE HOOKS ////////
@@ -33,6 +35,11 @@ const Q2Radio = class {
33
35
  ariaLabelObserver() {
34
36
  handleAriaLabel(this);
35
37
  }
38
+ checkedObserver() {
39
+ if (!this.checked)
40
+ return;
41
+ this.change.emit({ value: this.value });
42
+ }
36
43
  /////// HOST ELEMENT EVENTS ///////
37
44
  onHostClick(event) {
38
45
  if (this.disabled) {
@@ -45,11 +52,12 @@ const Q2Radio = class {
45
52
  }
46
53
  }
47
54
  render() {
48
- return (h("div", { class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, h("input", { ref: el => (this.inputField = el), 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 ? loc(this.label) : undefined, onChange: this.inputChange, onClick: this.inputChange, "test-id": "q2RadioInnerRadioBox" }), h("label", { htmlFor: this.id, "test-id": "radioButton" }, !this.groupTileLayout && (h("svg", { viewBox: "0 0 18 18" }, h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (h("div", { class: "label-content" }, (this.label && loc(this.label)) || '', h("slot", null))))));
55
+ return (h("div", { class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, h("input", { ref: el => (this.inputField = el), 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 ? loc(this.label) : undefined, onChange: this.inputChange, "test-id": "q2RadioInnerRadioBox" }), h("label", { htmlFor: this.id, "test-id": "radioButton" }, !this.groupTileLayout && (h("svg", { viewBox: "0 0 18 18" }, h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (h("div", { class: "label-content" }, (this.label && loc(this.label)) || '', h("slot", null))))));
49
56
  }
50
57
  get hostElement() { return getElement(this); }
51
58
  static get watchers() { return {
52
- "ariaLabel": ["ariaLabelObserver"]
59
+ "ariaLabel": ["ariaLabelObserver"],
60
+ "checked": ["checkedObserver"]
53
61
  }; }
54
62
  };
55
63
  Q2Radio.style = stylesCss;
@@ -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.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}
@@ -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-3cb34e2e",[[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-7dec37d6",[[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)));
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-3cb34e2e",[[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-f7f7f235",[[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)));
@@ -17,6 +17,7 @@ export declare class Q2Radio implements ComponentInterface {
17
17
  componentWillLoad(): void;
18
18
  componentDidLoad(): void;
19
19
  ariaLabelObserver(): void;
20
+ checkedObserver(): void;
20
21
  onHostClick(event: Event): void;
21
22
  delegateFocus(event: FocusEvent): void;
22
23
  inputChange: (event: Event) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q2-tecton-elements",
3
- "version": "1.11.2-alpha.0",
3
+ "version": "1.11.2",
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": "caf923e11be9b12b6534837341f5d47902d674e4"
51
+ "gitHead": "a4069cfedbb12a04c8db746f9aa0b60ab6f5ff2b"
52
52
  }
@@ -1 +0,0 @@
1
- import{r as t,c as r,h as o,g as e}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(o){t(this,o),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;this.change.emit({value:this.value})}}componentWillLoad(){a(this)}componentDidLoad(){c(this.hostElement)}ariaLabelObserver(){a(this)}onHostClick(t){this.disabled&&t.stopImmediatePropagation()}delegateFocus(t){t.target===this.hostElement&&this.inputField.focus()}render(){return o("div",{class:this.groupTileLayout?"radio-tile":"radio-container"},o("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,onClick:this.inputChange,"test-id":"q2RadioInnerRadioBox"}),o("label",{htmlFor:this.id,"test-id":"radioButton"},!this.groupTileLayout&&o("svg",{viewBox:"0 0 18 18"},o("circle",{stroke:"none",fill:"none",cx:"9",cy:"9",r:"8"}),o("circle",{stroke:"none",fill:"none",cx:"9",cy:"9",r:"4"})),!this.hideLabel&&o("div",{class:"label-content"},this.label&&s(this.label)||"",o("slot",null))))}get hostElement(){return e(this)}static get watchers(){return{ariaLabel:["ariaLabelObserver"]}}};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}