@proximus/lavender-cell 1.0.0-beta.1 → 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { WithExtraAttributes } from '@proximus/lavender-common';
2
2
  import { Cell } from '@proximus/lavender-cell';
3
- import { type IRadio, type RadioBase } from '@proximus/lavender-radio-group';
3
+ import { type IRadio, type Radio } from '@proximus/lavender-radio-group';
4
4
  export declare const cellRadioPosition: string[];
5
5
  export declare class CellRadio extends WithExtraAttributes implements IRadio {
6
6
  protected internals: ElementInternals;
@@ -18,7 +18,7 @@ export declare class CellRadio extends WithExtraAttributes implements IRadio {
18
18
  formData(): FormData;
19
19
  get $cell(): Cell;
20
20
  get $el(): HTMLElement;
21
- get $radio(): RadioBase;
21
+ get $radio(): Radio;
22
22
  get $slotVisual(): HTMLSlotElement;
23
23
  get $children(): NodeListOf<Element>;
24
24
  get inverted(): boolean;
package/dist/index.es.js CHANGED
@@ -1245,7 +1245,7 @@ class K extends f {
1245
1245
  return `
1246
1246
  <div class="cell-radio">
1247
1247
  <px-cell hoverable>
1248
- <px-radio-base slot="prefix" aria-hidden="true" tabindex="-1"></px-radio-base>
1248
+ <px-radio slot="prefix" aria-hidden="true" tabindex="-1"></px-radio>
1249
1249
  <slot name="visual" slot="visual"></slot>
1250
1250
  <slot name="label" slot="label"></slot>
1251
1251
  <slot name="description" slot="description"></slot>
@@ -1254,26 +1254,27 @@ class K extends f {
1254
1254
  `;
1255
1255
  }
1256
1256
  constructor() {
1257
- var t, e;
1258
- super(T), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = ((e = this.parentElement) == null ? void 0 : e.firstElementChild) === this ? 0 : -1, this.internals && (this.internals.role = "radio", this.internals.ariaChecked = `${this.checked}`);
1257
+ var t;
1258
+ super(T), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.internals && (this.internals.role = "radio", this.internals.ariaChecked = `${this.checked}`);
1259
1259
  }
1260
1260
  connectedCallback() {
1261
- if (this.$slotVisual) {
1262
- const t = this.querySelector('px-img[slot="visual"]');
1263
- t && l(t);
1261
+ var t;
1262
+ if (this.tabIndex = ((t = this.parentElement) == null ? void 0 : t.firstElementChild) === this ? 0 : -1, this.$slotVisual) {
1263
+ const e = this.querySelector('px-img[slot="visual"]');
1264
+ e && l(e);
1264
1265
  }
1265
1266
  this.addEventListener("mouseover", () => {
1266
1267
  this.$radio.setAttribute("hover", "");
1267
1268
  }), this.addEventListener("mouseout", () => {
1268
1269
  this.$radio.removeAttribute("hover");
1269
- }), this.addEventListener("keypress", (t) => {
1270
- switch (t.stopPropagation(), t.preventDefault(), t.code) {
1270
+ }), this.addEventListener("keypress", (e) => {
1271
+ switch (e.stopPropagation(), e.preventDefault(), e.code) {
1271
1272
  case "Space":
1272
1273
  this.click();
1273
1274
  break;
1274
1275
  }
1275
- }), this.addEventListener("click", (t) => {
1276
- this.checked || (this.checked = !0), t.stopPropagation(), t.preventDefault();
1276
+ }), this.addEventListener("click", (e) => {
1277
+ this.checked || (this.checked = !0), e.stopPropagation(), e.preventDefault();
1277
1278
  }), this.hasAttribute("checked") && (this.checked = !0), c(this);
1278
1279
  }
1279
1280
  static get observedAttributes() {
@@ -1358,7 +1359,7 @@ class K extends f {
1358
1359
  }
1359
1360
  handleCheckedAttributeChange(t) {
1360
1361
  var e;
1361
- (e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.setAttribute("tabIndex", "-1"), this.checked = !1, this.$radio && this.$radio.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.setAttribute("tabIndex", "0"), this.checked = !0, this.$radio && this.$radio.setAttribute("checked", ""), this.dispatchEvent(
1362
+ (e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.tabIndex = -1, this.checked = !1, this.$radio && this.$radio.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.tabIndex = 0, this.checked = !0, this.$radio && this.$radio.setAttribute("checked", ""), this.dispatchEvent(
1362
1363
  new Event("change", {
1363
1364
  bubbles: !0,
1364
1365
  composed: !0
@@ -1397,7 +1398,7 @@ class K extends f {
1397
1398
  return this.shadowRoot.querySelector(".cell-radio");
1398
1399
  }
1399
1400
  get $radio() {
1400
- return this.shadowRoot.querySelector("px-radio-base");
1401
+ return this.shadowRoot.querySelector("px-radio");
1401
1402
  }
1402
1403
  get $slotVisual() {
1403
1404
  return this.querySelector('[slot="visual"]');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-cell",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.3",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",