@cal.macconnachie/web-components 2.6.12 → 2.6.13

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4721,9 +4721,9 @@ class H extends M {
4721
4721
  if (this.open) {
4722
4722
  this.isVisible = !0;
4723
4723
  const e = this.getActiveDetents();
4724
- if (this.defaultDetent) {
4725
- const t = e.indexOf(Number(this.defaultDetent));
4726
- this.currentDetentIndex = t !== -1 ? t : this.isClosable() ? Math.max(0, e.length - 1) : 0;
4724
+ if (this.defaultDetent != "") {
4725
+ const t = Number(this.defaultDetent), i = e.findIndex((s) => s === t);
4726
+ this.currentDetentIndex = i !== -1 ? i : 0;
4727
4727
  } else
4728
4728
  this.currentDetentIndex = this.isClosable() ? Math.max(0, e.length - 1) : 0;
4729
4729
  }
@@ -4733,9 +4733,9 @@ class H extends M {
4733
4733
  if (this.open) {
4734
4734
  this.isVisible = !0;
4735
4735
  const t = this.getActiveDetents();
4736
- if (this.defaultDetent) {
4737
- const i = t.indexOf(Number(this.defaultDetent));
4738
- this.currentDetentIndex = i !== -1 ? i : this.isClosable() ? Math.max(0, t.length - 1) : 0;
4736
+ if (this.defaultDetent != "") {
4737
+ const i = Number(this.defaultDetent), s = t.findIndex((o) => o === i);
4738
+ this.currentDetentIndex = s !== -1 ? s : 0;
4739
4739
  } else
4740
4740
  this.currentDetentIndex = this.isClosable() ? Math.max(0, t.length - 1) : 0;
4741
4741
  this.lockBodyScroll();
@@ -4773,9 +4773,9 @@ class H extends M {
4773
4773
  openDrawer() {
4774
4774
  this.open = !0, this.isVisible = !0;
4775
4775
  const e = this.getActiveDetents();
4776
- if (this.defaultDetent) {
4777
- const t = e.indexOf(Number(this.defaultDetent));
4778
- this.currentDetentIndex = t !== -1 ? t : this.isClosable() ? Math.max(0, e.length - 1) : 0;
4776
+ if (this.defaultDetent != "") {
4777
+ const t = Number(this.defaultDetent), i = e.findIndex((s) => s === t);
4778
+ this.currentDetentIndex = i !== -1 ? i : 0;
4779
4779
  } else
4780
4780
  this.currentDetentIndex = this.isClosable() ? Math.max(0, e.length - 1) : 0;
4781
4781
  this.dispatchEvent(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cal.macconnachie/web-components",
3
- "version": "2.6.12",
3
+ "version": "2.6.13",
4
4
  "description": "Web components hosted on a CDN",
5
5
  "keywords": [
6
6
  "web-components",