@iris.interactive/handcook 2.10.30 → 2.10.32

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.10.30-blue.svg?cacheSeconds=2592000)
2
+ ![Version](https://img.shields.io/badge/version-2.10.32-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.10.30",
3
+ "version": "2.10.32",
4
4
  "description": "The web cooking by IRIS Interactive",
5
5
  "main": "./public/scripts/index.js",
6
6
  "scripts": {
@@ -39,18 +39,21 @@ export class HcSlider {
39
39
  // Options
40
40
  options = {};
41
41
 
42
+ // Events
43
+ initEvent;
44
+
42
45
  /**
43
46
  * @param elements
44
47
  */
45
48
  constructor(elements = ElementEnum.slider) {
46
- this.initOptions();
47
49
  document.querySelectorAll(elements).forEach(element => {
50
+ this.initEvent = new Event("init.hc.slider");
51
+ this.initOptions();
48
52
  this.slider = element;
49
53
  this.setOptions();
50
54
  this.buildDom();
51
55
  const instance = new Swiper(element, this.options);
52
56
  this.instances.push(instance);
53
- this.initOptions();
54
57
  });
55
58
  }
56
59
 
@@ -246,6 +249,8 @@ export class HcSlider {
246
249
  if (swiper.isLocked) {
247
250
  swiper.$el.addClass('hc-slider-lock');
248
251
  }
252
+
253
+ this.slider.dispatchEvent(this.initEvent);
249
254
  },
250
255
  slideChangeTransitionEnd: (swiper) => {
251
256
 
@@ -327,9 +327,7 @@ $button-background-color: var(--iris--button--background-color);
327
327
  $button-color-hover: var(--iris--button--color-hover);
328
328
  $button-background-color-hover: var(--iris--button--background-color-hover, none);
329
329
  $button-background-image: var(--iris--button--background-image, none);
330
- $button-gradient-background-image-size: var(--iris--button--background-size, var(--iris--global--gradient-background-size, (200% 100%)));
331
- $button-gradient-background-image-position: var(--iris--button--background-position, initial);
332
- $button-gradient-background-image-position-hover: var(--iris--button--background-position-hover, (bottom right, top right));
330
+ $button-gradient-background-image-size: var(--iris--global--gradient-background-size, (200% 100%));
333
331
  $button-border: var(--iris--button--border, none);
334
332
  $button-border-hover: var(--iris--button--border-hover, none);
335
333
  $button-background-color--force: var(--iris--button--border-color, $button-background-color);
@@ -153,7 +153,6 @@
153
153
  background-color: $button-background-color;
154
154
  background-image: $button-background-image;
155
155
  background-size: $button-gradient-background-image-size;
156
- background-position: $button-gradient-background-image-position;
157
156
  border: $button-border;
158
157
  word-break: normal;
159
158
  @include transition;
@@ -177,7 +176,6 @@
177
176
  background-color: $button-background-color;
178
177
  background-image: $button-background-image;
179
178
  background-size: $button-gradient-background-image-size;
180
- background-position: $button-gradient-background-image-position;
181
179
  border: $button-border;
182
180
  }
183
181
 
@@ -185,7 +183,7 @@
185
183
  color: $button-color-hover;
186
184
  background-color: $button-background-color-hover;
187
185
  border: $button-border-hover;
188
- background-position: $button-gradient-background-image-position-hover;
186
+ background-position: bottom right, top right;
189
187
 
190
188
  &:before {
191
189
  color: $button-color-hover;