@getflip/swirl-components 0.50.0 → 0.50.1
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 +1 -1
- package/dist/cjs/swirl-date-input.cjs.entry.js +1 -1
- package/dist/cjs/swirl-popover.cjs.entry.js +3 -1
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/collection/components/swirl-date-input/swirl-date-input.js +1 -1
- package/dist/collection/components/swirl-popover/swirl-popover.js +3 -1
- package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/components/swirl-date-input.js +1 -1
- package/dist/components/swirl-popover2.js +3 -1
- package/dist/esm/swirl-date-input.entry.js +1 -1
- package/dist/esm/swirl-popover.entry.js +3 -1
- package/dist/swirl-components/{p-5dd48e42.entry.js → p-3955db23.entry.js} +1 -1
- package/dist/swirl-components/p-406d1673.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/package.json +1 -1
- package/dist/swirl-components/p-dc67a056.entry.js +0 -1
package/components.json
CHANGED
|
@@ -6362,7 +6362,7 @@ 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", { 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", 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
6367
|
static get watchers() { return {
|
|
6368
6368
|
"format": ["watchFormat"]
|
|
@@ -82,7 +82,9 @@ const SwirlPopover = class {
|
|
|
82
82
|
}
|
|
83
83
|
const target = event.target;
|
|
84
84
|
const activeElement = utils.getActiveElement();
|
|
85
|
-
const popoverLostFocus = !this.el.contains(target) &&
|
|
85
|
+
const popoverLostFocus = !this.el.contains(target) &&
|
|
86
|
+
!this.el.contains(activeElement) &&
|
|
87
|
+
target !== this.triggerEl;
|
|
86
88
|
if (popoverLostFocus) {
|
|
87
89
|
this.close();
|
|
88
90
|
}
|