@syncfusion/ej2-splitbuttons 20.3.56 → 20.4.40

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.
Files changed (50) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +8 -3
  3. package/dist/ej2-splitbuttons.min.js +2 -2
  4. package/dist/ej2-splitbuttons.umd.min.js +2 -2
  5. package/dist/ej2-splitbuttons.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-splitbuttons.es2015.js +19 -13
  7. package/dist/es6/ej2-splitbuttons.es2015.js.map +1 -1
  8. package/dist/es6/ej2-splitbuttons.es5.js +14 -7
  9. package/dist/es6/ej2-splitbuttons.es5.js.map +1 -1
  10. package/dist/global/ej2-splitbuttons.min.js +2 -2
  11. package/dist/global/ej2-splitbuttons.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +8 -8
  14. package/src/drop-down-button/drop-down-button.js +13 -7
  15. package/src/progress-button/progress-button-model.d.ts +1 -1
  16. package/src/progress-button/progress-button.d.ts +1 -1
  17. package/styles/bootstrap-dark.css +21 -0
  18. package/styles/bootstrap.css +21 -0
  19. package/styles/bootstrap4.css +49 -28
  20. package/styles/bootstrap5-dark.css +21 -0
  21. package/styles/bootstrap5.css +21 -0
  22. package/styles/button-group/bootstrap4.css +24 -24
  23. package/styles/drop-down-button/bootstrap4.css +1 -1
  24. package/styles/fabric-dark.css +21 -0
  25. package/styles/fabric.css +21 -0
  26. package/styles/fluent-dark.css +21 -0
  27. package/styles/fluent.css +21 -0
  28. package/styles/highcontrast-light.css +21 -0
  29. package/styles/highcontrast.css +21 -0
  30. package/styles/material-dark.css +21 -0
  31. package/styles/material.css +21 -0
  32. package/styles/split-button/_layout.scss +7 -0
  33. package/styles/split-button/_theme.scss +31 -0
  34. package/styles/split-button/bootstrap-dark.css +21 -0
  35. package/styles/split-button/bootstrap.css +21 -0
  36. package/styles/split-button/bootstrap4.css +24 -3
  37. package/styles/split-button/bootstrap5-dark.css +21 -0
  38. package/styles/split-button/bootstrap5.css +21 -0
  39. package/styles/split-button/fabric-dark.css +21 -0
  40. package/styles/split-button/fabric.css +21 -0
  41. package/styles/split-button/fluent-dark.css +21 -0
  42. package/styles/split-button/fluent.css +21 -0
  43. package/styles/split-button/highcontrast-light.css +21 -0
  44. package/styles/split-button/highcontrast.css +21 -0
  45. package/styles/split-button/material-dark.css +21 -0
  46. package/styles/split-button/material.css +21 -0
  47. package/styles/split-button/tailwind-dark.css +21 -0
  48. package/styles/split-button/tailwind.css +21 -0
  49. package/styles/tailwind-dark.css +21 -0
  50. package/styles/tailwind.css +21 -0
@@ -338,7 +338,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
338
338
  this.dropDown.refreshPosition(this.element);
339
339
  }
340
340
  this.dropDown.hide();
341
- attributes(this.element, (_a = {}, _a['aria-haspopup'] = this.items.length || this.target ? 'true' : 'false', _a['aria-expanded'] = 'false', _a['aria-owns'] = this.getPopUpElement().id, _a['type'] = 'button', _a['aria-label'] = this.element.textContent ? this.element.textContent : 'dropdownbutton', _a));
341
+ attributes(this.element, (_a = {}, _a['aria-haspopup'] = this.items.length || this.target ? 'true' : 'false', _a['aria-expanded'] = 'false', _a['type'] = 'button', _a['aria-label'] = this.element.textContent ? this.element.textContent : 'dropdownbutton', _a));
342
342
  if (this.cssClass) {
343
343
  addClass([div], this.cssClass.split(' '));
344
344
  }
@@ -369,7 +369,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
369
369
  li = this.createElement('li', {
370
370
  innerHTML: item.url ? '' : tempItem,
371
371
  className: item.separator ? classNames.ITEM + ' ' + classNames.SEPARATOR : classNames.ITEM,
372
- attrs: { 'role': 'menuItem', 'tabindex': '-1', 'aria-label': tempItem },
372
+ attrs: item.separator ? { 'role': 'separator', 'tabindex': '-1' } : { 'role': 'menuitem', 'tabindex': '-1', 'aria-label': tempItem },
373
373
  id: item.id ? item.id : getUniqueID('e-' + this.getModuleName() + '-item')
374
374
  });
375
375
  if (this.enableHtmlSanitizer) {
@@ -412,7 +412,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
412
412
  };
413
413
  DropDownButton.prototype.hasIcon = function (items, field) {
414
414
  for (var i = 0, len = items.length; i < len; i++) {
415
- if (items[i][field]) {
415
+ if (items[i]["" + field]) {
416
416
  return true;
417
417
  }
418
418
  }
@@ -729,6 +729,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
729
729
  _this.dropDown.show(null, _this.element);
730
730
  addClass([_this.element], 'e-active');
731
731
  _this.element.setAttribute('aria-expanded', 'true');
732
+ _this.element.setAttribute('aria-owns', _this.getPopUpElement().id);
732
733
  if (ul_1) {
733
734
  ul_1.focus();
734
735
  }
@@ -742,12 +743,12 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
742
743
  if (e === void 0) { e = null; }
743
744
  var ul = this.getULElement();
744
745
  var beforeCloseArgs = { element: ul, items: this.items, event: e, cancel: false };
745
- var popupElement = this.getPopUpElement();
746
- if (popupElement) {
747
- EventHandler.remove(popupElement, 'keydown', this.keyBoardHandler);
748
- }
749
746
  this.trigger('beforeClose', beforeCloseArgs, function (observedArgs) {
750
747
  if (!observedArgs.cancel) {
748
+ var popupElement = _this.getPopUpElement();
749
+ if (popupElement) {
750
+ EventHandler.remove(popupElement, 'keydown', _this.keyBoardHandler);
751
+ }
751
752
  _this.popupUnWireEvents();
752
753
  var ul_2 = _this.getULElement();
753
754
  var selectedLi = void 0;
@@ -760,6 +761,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
760
761
  _this.dropDown.hide();
761
762
  removeClass(_this.activeElem, 'e-active');
762
763
  _this.element.setAttribute('aria-expanded', 'false');
764
+ _this.element.removeAttribute('aria-owns');
763
765
  if (focusEle) {
764
766
  focusEle.focus();
765
767
  }
@@ -777,6 +779,11 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
777
779
  _this.isPopupCreated = _this.createPopupOnClick ? false : true;
778
780
  }
779
781
  }
782
+ else {
783
+ if (ul) {
784
+ ul.focus();
785
+ }
786
+ }
780
787
  });
781
788
  };
782
789
  DropDownButton.prototype.unWireEvents = function () {