@kupola/kupola 1.6.0 → 1.6.2

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/js/dropdown.js CHANGED
@@ -183,8 +183,8 @@ class Dropdown {
183
183
 
184
184
  _bindMenuItems() {
185
185
  this.menu.querySelectorAll('.ds-dropdown__item').forEach(item => {
186
- item.addEventListener('click', this._itemClickHandler);
187
- item._dropdownItemClickHandler = this._itemClickHandler;
186
+ item.addEventListener('click', (e) => this._itemClickHandler(e));
187
+ item._dropdownItemClickHandler = (e) => this._itemClickHandler(e);
188
188
  });
189
189
  }
190
190
 
package/js/select.js CHANGED
@@ -246,8 +246,8 @@ class Select {
246
246
  if (opt.disabled) el.classList.add('is-disabled');
247
247
  if (this.selectedValues.has(opt.value)) el.classList.add('is-selected');
248
248
 
249
- el.addEventListener('click', this._optionClickHandler);
250
- el._selectOptionClickHandler = this._optionClickHandler;
249
+ el.addEventListener('click', (e) => this._optionClickHandler(e));
250
+ el._selectOptionClickHandler = (e) => this._optionClickHandler(e);
251
251
 
252
252
  this.optionsEl.appendChild(el);
253
253
  });
@@ -408,8 +408,8 @@ class Select {
408
408
 
409
409
  _bindOptionClicks() {
410
410
  this.optionsEl.querySelectorAll('.ds-select__option, .ds-select__item').forEach(option => {
411
- option.addEventListener('click', this._optionClickHandler);
412
- option._selectOptionClickHandler = this._optionClickHandler;
411
+ option.addEventListener('click', (e) => this._optionClickHandler(e));
412
+ option._selectOptionClickHandler = (e) => this._optionClickHandler(e);
413
413
  });
414
414
  }
415
415
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kupola/kupola",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "A lightweight UI toolkit for any web project. No heavy frontend frameworks required.",
5
5
  "main": "dist/kupola.cjs.js",
6
6
  "module": "dist/kupola.esm.js",