@syncfusion/ej2-splitbuttons 23.2.4 → 24.1.44

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 (52) hide show
  1. package/CHANGELOG.md +8 -6
  2. package/README.md +1 -1
  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 +24 -4
  7. package/dist/es6/ej2-splitbuttons.es2015.js.map +1 -1
  8. package/dist/es6/ej2-splitbuttons.es5.js +24 -4
  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.d.ts +1 -0
  15. package/src/drop-down-button/drop-down-button.js +14 -1
  16. package/src/progress-button/progress-button.js +1 -1
  17. package/src/split-button/split-button.js +9 -2
  18. package/styles/bootstrap-dark.css +14 -0
  19. package/styles/bootstrap.css +14 -0
  20. package/styles/bootstrap4.css +14 -0
  21. package/styles/bootstrap5-dark.css +14 -0
  22. package/styles/bootstrap5.css +14 -0
  23. package/styles/fabric-dark.css +14 -0
  24. package/styles/fabric.css +14 -0
  25. package/styles/fluent-dark.css +14 -0
  26. package/styles/fluent.css +14 -0
  27. package/styles/highcontrast-light.css +14 -0
  28. package/styles/highcontrast.css +14 -0
  29. package/styles/material-dark.css +14 -0
  30. package/styles/material.css +14 -0
  31. package/styles/material3-dark.css +14 -0
  32. package/styles/material3.css +14 -0
  33. package/styles/progress-button/_theme.scss +14 -0
  34. package/styles/progress-button/bootstrap-dark.css +14 -0
  35. package/styles/progress-button/bootstrap.css +14 -0
  36. package/styles/progress-button/bootstrap4.css +14 -0
  37. package/styles/progress-button/bootstrap5-dark.css +14 -0
  38. package/styles/progress-button/bootstrap5.css +14 -0
  39. package/styles/progress-button/fabric-dark.css +14 -0
  40. package/styles/progress-button/fabric.css +14 -0
  41. package/styles/progress-button/fluent-dark.css +14 -0
  42. package/styles/progress-button/fluent.css +14 -0
  43. package/styles/progress-button/highcontrast-light.css +14 -0
  44. package/styles/progress-button/highcontrast.css +14 -0
  45. package/styles/progress-button/material-dark.css +14 -0
  46. package/styles/progress-button/material.css +14 -0
  47. package/styles/progress-button/material3-dark.css +14 -0
  48. package/styles/progress-button/material3.css +14 -0
  49. package/styles/progress-button/tailwind-dark.css +14 -0
  50. package/styles/progress-button/tailwind.css +14 -0
  51. package/styles/tailwind-dark.css +14 -0
  52. package/styles/tailwind.css +14 -0
@@ -346,6 +346,8 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
346
346
  content: this.target ? this.getTargetElement() : '',
347
347
  enableRtl: this.enableRtl
348
348
  });
349
+ this.dropDown.element.setAttribute('role', 'dialog');
350
+ this.dropDown.element.setAttribute('aria-label', 'dropdown menu');
349
351
  if (!isNullOrUndefined(this.popupContent)) {
350
352
  this.popupContent.style.display = '';
351
353
  }
@@ -387,7 +389,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
387
389
  li = this.createElement('li', {
388
390
  innerHTML: item.url ? '' : tempItem,
389
391
  className: item.separator ? classNames.ITEM + ' ' + classNames.SEPARATOR : classNames.ITEM,
390
- attrs: item.separator ? { 'role': 'separator', 'tabindex': '-1' } : { 'role': 'menuitem', 'tabindex': '-1', 'aria-label': tempItem },
392
+ attrs: item.separator ? { 'role': 'separator', 'tabindex': '-1', 'aria-label': 'separator', 'aria-hidden': 'true' } : { 'role': 'menuitem', 'tabindex': '-1', 'aria-label': tempItem },
391
393
  id: item.id ? item.id : getUniqueID('e-' + this.getModuleName() + '-item')
392
394
  });
393
395
  if (this.enableHtmlSanitizer) {
@@ -419,6 +421,10 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
419
421
  }
420
422
  eventArgs = { item: item, element: li };
421
423
  this.trigger('beforeItemRender', eventArgs);
424
+ if (eventArgs.item.disabled && !li.classList.contains('e-disabled')) {
425
+ li.classList.add('e-disabled');
426
+ }
427
+
422
428
  ul.appendChild(li);
423
429
  }
424
430
  if (appendItems) {
@@ -579,6 +585,12 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
579
585
  }
580
586
  EventHandler.add(this.element, 'click', this.clickHandler, this);
581
587
  EventHandler.add(this.element, 'keydown', this.keyBoardHandler, this);
588
+ EventHandler.add(window, 'resize', this.windowResize, this);
589
+ };
590
+ DropDownButton.prototype.windowResize = function () {
591
+ if (!this.canOpen() && this.dropDown) {
592
+ this.dropDown.refreshPosition(this.element);
593
+ }
582
594
  };
583
595
  DropDownButton.prototype.popupWireEvents = function () {
584
596
  if (!this.delegateMousedownHandler) {
@@ -848,6 +860,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
848
860
  EventHandler.remove(this.getPopUpElement(), 'click', this.clickHandler);
849
861
  EventHandler.remove(this.getPopUpElement(), 'keydown', this.keyBoardHandler);
850
862
  }
863
+ EventHandler.remove(window, 'resize', this.windowResize);
851
864
  };
852
865
  /**
853
866
  * Called internally if any of the property value changed.
@@ -1252,13 +1265,20 @@ var SplitButton = /** @__PURE__ @class */ (function (_super) {
1252
1265
  this.unWireEvents();
1253
1266
  }
1254
1267
  }
1255
- this.wrapper = null;
1256
1268
  this.primaryBtnObj.destroy();
1257
1269
  this.secondaryBtnObj.destroy();
1258
1270
  _super.prototype.destroy.call(this);
1259
- if (!this.element.getAttribute('class')) {
1271
+ if (this.element && !this.element.getAttribute('class')) {
1260
1272
  this.element.removeAttribute('class');
1261
1273
  }
1274
+ if (this.refreshing && this.isAngular) {
1275
+ this.element = this.wrapper;
1276
+ ['e-control', 'e-split-btn', 'e-lib'].forEach(function (key) {
1277
+ _this.element.classList.add(key);
1278
+ });
1279
+ setValue('ej2_instances', [this], this.element);
1280
+ }
1281
+ this.wrapper = null;
1262
1282
  };
1263
1283
  SplitButton.prototype.wireEvents = function () {
1264
1284
  EventHandler.add(this.element, 'click', this.primaryBtnClickHandler, this);
@@ -1913,7 +1933,7 @@ var ProgressButton = /** @__PURE__ @class */ (function (_super) {
1913
1933
  };
1914
1934
  ProgressButton.prototype.setAria = function () {
1915
1935
  attributes(this.element, {
1916
- 'aria-label': this.element.textContent + ' progress', 'aria-valuemin': '0', 'aria-valuemax': '100', 'aria-valuenow': '0'
1936
+ 'aria-label': this.element.textContent + ' progress'
1917
1937
  });
1918
1938
  };
1919
1939
  ProgressButton.prototype.wireEvents = function () {