@creative-web-solution/front-library 7.1.37 → 7.1.38
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/CHANGELOG.md +4 -0
- package/Modules/Popin/Popin.ts +18 -0
- package/Modules/Popin/Tools.ts +1 -0
- package/README.md +1 -1
- package/Types/Popin.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/Modules/Popin/Popin.ts
CHANGED
|
@@ -115,6 +115,16 @@ export default class Popin {
|
|
|
115
115
|
}
|
|
116
116
|
);
|
|
117
117
|
|
|
118
|
+
if (!this.#options.isBackgroundAside && !this.#options.modal) {
|
|
119
|
+
on(
|
|
120
|
+
this.#$popin,
|
|
121
|
+
{
|
|
122
|
+
"eventsName": CLICK_EVENT_NAME,
|
|
123
|
+
"callback": this.#clickBgHandler
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
118
128
|
|
|
119
129
|
if ( this.#options.enableKeyboard ) {
|
|
120
130
|
this.#keyboardControls = new KeyboardHandler( this.#$popin, {
|
|
@@ -432,6 +442,14 @@ export default class Popin {
|
|
|
432
442
|
this.#closePopin();
|
|
433
443
|
}
|
|
434
444
|
|
|
445
|
+
#clickBgHandler = ( e: Event ): void => {
|
|
446
|
+
const $target = e.target as HTMLElement;
|
|
447
|
+
|
|
448
|
+
if (!$target?.closest(this.#options.selectors.popinBody)) {
|
|
449
|
+
this.#closePopinHandler(e);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
435
453
|
|
|
436
454
|
#resize = (): void => {
|
|
437
455
|
if ( !this.#options.autoResize ) {
|
package/Modules/Popin/Tools.ts
CHANGED
package/README.md
CHANGED
package/Types/Popin.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ declare namespace FLib {
|
|
|
35
35
|
interface SelectorsOptions {
|
|
36
36
|
/** @defaultValue .popin */
|
|
37
37
|
popin: string;
|
|
38
|
+
/** @defaultValue .popin */
|
|
39
|
+
popinBody: string;
|
|
38
40
|
/** @defaultValue .popin-content */
|
|
39
41
|
popinContent: string;
|
|
40
42
|
/** @defaultValue a[data-popin] */
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@creative-web-solution/front-library",
|
|
3
3
|
"title": "Frontend library",
|
|
4
4
|
"description": "Frontend functions and modules",
|
|
5
|
-
"version": "7.1.
|
|
5
|
+
"version": "7.1.38",
|
|
6
6
|
"homepage": "https://github.com/creative-web-solution/front-library",
|
|
7
7
|
"author": "Creative Web Solution <contact@cws-studio.com> (https://www.cws-studio.com)",
|
|
8
8
|
"keywords": [],
|