@iris.interactive/handcook 2.6.23 → 2.6.24
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/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Welcome to HandCook 👨🍳
|
|
2
|
-

|
|
3
3
|

|
|
4
4
|
[](#)
|
|
5
5
|
[](https://twitter.com/captain\_iris)
|
package/package.json
CHANGED
|
@@ -21,16 +21,19 @@ export class HcLightbox {
|
|
|
21
21
|
|
|
22
22
|
instance;
|
|
23
23
|
|
|
24
|
-
constructor(elements = ElementEnum.lightbox) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
constructor(elements = ElementEnum.lightbox, options = {}) {
|
|
25
|
+
if ( elements === ElementEnum.lightbox ) {
|
|
26
|
+
Object.assign(options, {
|
|
27
|
+
groupAttr: ElementEnum.lightboxAttr
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
Fancybox.bind(elements,options);
|
|
28
31
|
this.instance = Fancybox.getInstance();
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
34
|
|
|
32
|
-
const hc_lightbox = function (trigger) {
|
|
33
|
-
return new HcLightbox(trigger);
|
|
35
|
+
const hc_lightbox = function (trigger = ElementEnum.lightbox, options = {}) {
|
|
36
|
+
return new HcLightbox(trigger, options);
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
export default hc_lightbox;
|
|
@@ -18,7 +18,8 @@ export default class ElementEnum {
|
|
|
18
18
|
static popover = '[data-hc-popover]';
|
|
19
19
|
static scrollSmooth = '[data-hc-smooth-scroll]';
|
|
20
20
|
static modal = '[data-hc-modal]';
|
|
21
|
-
static
|
|
21
|
+
static lightboxAttr = 'data-hc-lightbox';
|
|
22
|
+
static lightbox = `[${ElementEnum.lightboxAttr}]`;
|
|
22
23
|
static dropdown = '[data-hc-dropdown]';
|
|
23
24
|
static collapse = '[data-hc-collapse]';
|
|
24
25
|
static collapseItem = '[data-hc-collapse-item]';
|