@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
@@ -310,6 +310,8 @@ let DropDownButton = class DropDownButton extends Component {
310
310
  content: this.target ? this.getTargetElement() : '',
311
311
  enableRtl: this.enableRtl
312
312
  });
313
+ this.dropDown.element.setAttribute('role', 'dialog');
314
+ this.dropDown.element.setAttribute('aria-label', 'dropdown menu');
313
315
  if (!isNullOrUndefined(this.popupContent)) {
314
316
  this.popupContent.style.display = '';
315
317
  }
@@ -354,7 +356,7 @@ let DropDownButton = class DropDownButton extends Component {
354
356
  li = this.createElement('li', {
355
357
  innerHTML: item.url ? '' : tempItem,
356
358
  className: item.separator ? classNames.ITEM + ' ' + classNames.SEPARATOR : classNames.ITEM,
357
- attrs: item.separator ? { 'role': 'separator', 'tabindex': '-1' } : { 'role': 'menuitem', 'tabindex': '-1', 'aria-label': tempItem },
359
+ attrs: item.separator ? { 'role': 'separator', 'tabindex': '-1', 'aria-label': 'separator', 'aria-hidden': 'true' } : { 'role': 'menuitem', 'tabindex': '-1', 'aria-label': tempItem },
358
360
  id: item.id ? item.id : getUniqueID('e-' + this.getModuleName() + '-item')
359
361
  });
360
362
  if (this.enableHtmlSanitizer) {
@@ -386,6 +388,10 @@ let DropDownButton = class DropDownButton extends Component {
386
388
  }
387
389
  eventArgs = { item: item, element: li };
388
390
  this.trigger('beforeItemRender', eventArgs);
391
+ if (eventArgs.item.disabled && !li.classList.contains('e-disabled')) {
392
+ li.classList.add('e-disabled');
393
+ }
394
+
389
395
  ul.appendChild(li);
390
396
  }
391
397
  if (appendItems) {
@@ -545,6 +551,12 @@ let DropDownButton = class DropDownButton extends Component {
545
551
  }
546
552
  EventHandler.add(this.element, 'click', this.clickHandler, this);
547
553
  EventHandler.add(this.element, 'keydown', this.keyBoardHandler, this);
554
+ EventHandler.add(window, 'resize', this.windowResize, this);
555
+ }
556
+ windowResize() {
557
+ if (!this.canOpen() && this.dropDown) {
558
+ this.dropDown.refreshPosition(this.element);
559
+ }
548
560
  }
549
561
  popupWireEvents() {
550
562
  if (!this.delegateMousedownHandler) {
@@ -810,6 +822,7 @@ let DropDownButton = class DropDownButton extends Component {
810
822
  EventHandler.remove(this.getPopUpElement(), 'click', this.clickHandler);
811
823
  EventHandler.remove(this.getPopUpElement(), 'keydown', this.keyBoardHandler);
812
824
  }
825
+ EventHandler.remove(window, 'resize', this.windowResize);
813
826
  }
814
827
  /**
815
828
  * Called internally if any of the property value changed.
@@ -1196,13 +1209,20 @@ let SplitButton = class SplitButton extends DropDownButton {
1196
1209
  this.unWireEvents();
1197
1210
  }
1198
1211
  }
1199
- this.wrapper = null;
1200
1212
  this.primaryBtnObj.destroy();
1201
1213
  this.secondaryBtnObj.destroy();
1202
1214
  super.destroy();
1203
- if (!this.element.getAttribute('class')) {
1215
+ if (this.element && !this.element.getAttribute('class')) {
1204
1216
  this.element.removeAttribute('class');
1205
1217
  }
1218
+ if (this.refreshing && this.isAngular) {
1219
+ this.element = this.wrapper;
1220
+ ['e-control', 'e-split-btn', 'e-lib'].forEach((key) => {
1221
+ this.element.classList.add(key);
1222
+ });
1223
+ setValue('ej2_instances', [this], this.element);
1224
+ }
1225
+ this.wrapper = null;
1206
1226
  }
1207
1227
  wireEvents() {
1208
1228
  EventHandler.add(this.element, 'click', this.primaryBtnClickHandler, this);
@@ -1823,7 +1843,7 @@ let ProgressButton = class ProgressButton extends Button {
1823
1843
  }
1824
1844
  setAria() {
1825
1845
  attributes(this.element, {
1826
- 'aria-label': this.element.textContent + ' progress', 'aria-valuemin': '0', 'aria-valuemax': '100', 'aria-valuenow': '0'
1846
+ 'aria-label': this.element.textContent + ' progress'
1827
1847
  });
1828
1848
  }
1829
1849
  wireEvents() {