@getflip/swirl-components 0.50.1 → 0.50.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.
package/components.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-05-05T11:11:43",
2
+ "timestamp": "2023-05-05T12:10:55",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "3.0.0",
@@ -6316,7 +6316,7 @@ const SwirlDateInput = class {
6316
6316
  this.iconSize = 24;
6317
6317
  }
6318
6318
  componentWillLoad() {
6319
- const index = document.querySelectorAll("swirl-date-input").length;
6319
+ const index = Array.from(document.querySelectorAll("swirl-date-input")).indexOf(this.el);
6320
6320
  this.id = `swirl-date-input-${index}`;
6321
6321
  }
6322
6322
  componentDidLoad() {
@@ -6362,8 +6362,9 @@ const SwirlDateInput = class {
6362
6362
  const className = index.classnames("date-input", {
6363
6363
  "date-input--inline": this.inline,
6364
6364
  });
6365
- return (index$1.h(index$1.Host, null, index$1.h("div", { class: className }, index$1.h("input", { "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled ? "true" : undefined, "aria-invalid": ariaInvalid, autoFocus: this.autoFocus, class: "date-input__input", disabled: this.disabled, id: this.id, onClick: this.onClick, onFocus: this.onFocus, onInput: this.onInput, placeholder: this.placeholder, required: this.required, type: "text", value: displayValue }), index$1.h("button", { "aria-label": this.datePickerTriggerLabel, class: "date-input__date-picker-button", disabled: this.disabled, id: `${this.id}-trigger`, type: "button" }, index$1.h("swirl-icon-today", { size: this.iconSize }))), !this.disabled && (index$1.h("swirl-popover", { animation: "scale-in-y", label: this.datePickerLabel, placement: "bottom-end", popoverId: "popover", ref: (el) => (this.pickerPopover = el), trigger: `${this.id}-trigger` }, index$1.h("swirl-date-picker", { labels: this.labels, locale: this.locale, onValueChange: this.onPickDate, value: dateValue })))));
6365
+ return (index$1.h(index$1.Host, null, index$1.h("div", { class: className }, index$1.h("input", { "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled ? "true" : undefined, "aria-invalid": ariaInvalid, autoFocus: this.autoFocus, class: "date-input__input", disabled: this.disabled, id: this.id, onClick: this.onClick, onFocus: this.onFocus, onInput: this.onInput, placeholder: this.placeholder, required: this.required, type: "text", value: displayValue }), index$1.h("button", { "aria-label": this.datePickerTriggerLabel, class: "date-input__date-picker-button", disabled: this.disabled, id: `${this.id}-trigger`, type: "button" }, index$1.h("swirl-icon-today", { size: this.iconSize }))), !this.disabled && (index$1.h("swirl-popover", { animation: "scale-in-y", label: this.datePickerLabel, placement: "bottom-end", popoverId: `popover-${this.id}`, ref: (el) => (this.pickerPopover = el), trigger: `${this.id}-trigger` }, index$1.h("swirl-date-picker", { labels: this.labels, locale: this.locale, onValueChange: this.onPickDate, value: dateValue })))));
6366
6366
  }
6367
+ get el() { return index$1.getElement(this); }
6367
6368
  static get watchers() { return {
6368
6369
  "format": ["watchFormat"]
6369
6370
  }; }