@iris.interactive/handcook 2.6.23 → 2.6.26

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
- ![Version](https://img.shields.io/badge/version-2.6.23-blue.svg?cacheSeconds=2592000)
2
+ ![Version](https://img.shields.io/badge/version-2.6.24-blue.svg?cacheSeconds=2592000)
3
3
  ![Prerequisite](https://img.shields.io/badge/node-%3E%3D%2012.14.0-blue.svg)
4
4
  [![License: UNLICENSED](https://img.shields.io/badge/License-UNLICENSED-yellow.svg)](#)
5
5
  [![Twitter: captain\_iris](https://img.shields.io/twitter/follow/captain\_iris.svg?style=social)](https://twitter.com/captain\_iris)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iris.interactive/handcook",
3
- "version": "2.6.23",
3
+ "version": "2.6.26",
4
4
  "description": "The web cooking by IRIS Interactive",
5
5
  "main": "./public/scripts/index.js",
6
6
  "scripts": {
@@ -21,16 +21,19 @@ export class HcLightbox {
21
21
 
22
22
  instance;
23
23
 
24
- constructor(elements = ElementEnum.lightbox) {
25
- Fancybox.bind(elements,{
26
- groupAll: true
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 lightbox = '[data-hc-lightbox]';
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]';
@@ -369,6 +369,14 @@ $video-highlight-link-color: var(--iris--video-highlight--color-link);
369
369
  $video-highlight-link-color-hover: var(--iris--video-highlight--color-link-hover);
370
370
 
371
371
 
372
+ // Webcam
373
+ $webcam-color: var(--iris--webcam--color);
374
+ $webcam-color-title: var(--iris--webcam--color-title, var(--iris--webcam--color));
375
+ $webcam-background-color: var(--iris--webcam--background-color);
376
+ $webcam-link-color: var(--iris--webcam--color-link);
377
+ $webcam-link-color-hover: var(--iris--webcam--color-link-hover);
378
+
379
+
372
380
  // Authors
373
381
  $authors-color: var(--iris--authors--color);
374
382
  $authors-color-title: var(--iris--authors--color-title, var(--iris--authors--color));
@@ -425,4 +433,4 @@ $c-warning: #ff890e;
425
433
  / ================================================== */
426
434
  $c-easy: #9ccc65;
427
435
  $c-medium: #ff890e;
428
- $c-hard: #ef5350;
436
+ $c-hard: #ef5350;