@fluid-topics/ft-radio 1.0.34 → 1.0.36

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.
@@ -18,7 +18,6 @@ class FtRadioGroup extends FtLitElement {
18
18
  <slot @slotchange=${this.onSlotChange}
19
19
  @change=${this.onChange}
20
20
  @keydown=${this.onKeyDown}
21
- @focusin=${this.focusCurrentValue}
22
21
  ></slot>
23
22
  `;
24
23
  }
@@ -325,6 +325,5 @@ const rt=Symbol.for(""),nt=t=>{if((null==t?void 0:t.r)===rt)return null==t?void
325
325
  <slot @slotchange=${this.onSlotChange}
326
326
  @change=${this.onChange}
327
327
  @keydown=${this.onKeyDown}
328
- @focusin=${this.focusCurrentValue}
329
328
  ></slot>
330
329
  `}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((i=>i.checked=t.detail.value===i.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let i=this.findFtRadio(t),e=this.radioButtons.indexOf(i)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let i=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[i>this.radioButtons.length-1?0:i].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Zi.elementDefinitions={},Zi.styles=Ti,Ui([o.property()],Zi.prototype,"name",void 0),Ui([o.queryAssignedElements()],Zi.prototype,"radioButtons",void 0),i.customElement("ft-radio")(Mi),i.customElement("ft-radio-group")(Zi),t.FtRadio=Mi,t.FtRadioChangeEvent=Ii,t.FtRadioCssVariables=Di,t.FtRadioGroup=Zi,t.FtRadioGroupCssVariables={},t.groupStyles=Ti,t.styles=Bi}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
@@ -432,6 +432,5 @@ const Vt=Symbol.for(""),Jt=t=>{if((null==t?void 0:t.r)===Vt)return null==t?void
432
432
  <slot @slotchange=${this.onSlotChange}
433
433
  @change=${this.onChange}
434
434
  @keydown=${this.onKeyDown}
435
- @focusin=${this.focusCurrentValue}
436
435
  ></slot>
437
436
  `}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Ei.elementDefinitions={},Ei.styles=Ci,Ni([o()],Ei.prototype,"name",void 0),Ni([function(t){const{slot:e,selector:i}=null!=t?t:{};return s({descriptor:o=>({get(){var o;const r="slot"+(e?`[name=${e}]`:":not([name])"),s=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),n=null!=s?l(s,t):[];return i?n.filter((t=>t.matches(i))):n},enumerable:!0,configurable:!0})})}()],Ei.prototype,"radioButtons",void 0),c("ft-radio")(ki),c("ft-radio-group")(Ei),t.FtRadio=ki,t.FtRadioChangeEvent=Si,t.FtRadioCssVariables=wi,t.FtRadioGroup=Ei,t.FtRadioGroupCssVariables={},t.groupStyles=Ci,t.styles=$i}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-radio",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "A radio component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,10 +19,10 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-ripple": "1.0.34",
23
- "@fluid-topics/ft-typography": "1.0.34",
24
- "@fluid-topics/ft-wc-utils": "1.0.34",
22
+ "@fluid-topics/ft-ripple": "1.0.36",
23
+ "@fluid-topics/ft-typography": "1.0.36",
24
+ "@fluid-topics/ft-wc-utils": "1.0.36",
25
25
  "lit": "2.7.2"
26
26
  },
27
- "gitHead": "58212a7e56bb7f81046ebf1c0ac93a7dfca9d279"
27
+ "gitHead": "7ace912b9fec53f21ded2d3b32ba7d723118d334"
28
28
  }