@syncfusion/ej2-ribbon 28.2.3 → 29.1.34

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 (102) hide show
  1. package/README.md +1 -1
  2. package/dist/ej2-ribbon.umd.min.js +2 -2
  3. package/dist/ej2-ribbon.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-ribbon.es2015.js +42 -13
  5. package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
  6. package/dist/es6/ej2-ribbon.es5.js +42 -13
  7. package/dist/es6/ej2-ribbon.es5.js.map +1 -1
  8. package/dist/global/ej2-ribbon.min.js +2 -2
  9. package/dist/global/ej2-ribbon.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +21 -23
  12. package/src/ribbon/items/ribbon-button.js +3 -1
  13. package/src/ribbon/items/ribbon-checkbox.js +3 -1
  14. package/src/ribbon/items/ribbon-colorpicker.js +3 -1
  15. package/src/ribbon/items/ribbon-dropdown.js +7 -1
  16. package/src/ribbon/items/ribbon-splitbutton.js +7 -1
  17. package/src/ribbon/modules/ribbon-keytip.d.ts +1 -0
  18. package/src/ribbon/modules/ribbon-keytip.js +19 -8
  19. package/styles/bds-lite.css +546 -451
  20. package/styles/bds.css +709 -590
  21. package/styles/bootstrap-dark-lite.css +531 -472
  22. package/styles/bootstrap-dark.css +694 -611
  23. package/styles/bootstrap-lite.css +511 -452
  24. package/styles/bootstrap.css +674 -591
  25. package/styles/bootstrap4-lite.css +517 -458
  26. package/styles/bootstrap4.css +680 -597
  27. package/styles/bootstrap5-dark-lite.css +559 -500
  28. package/styles/bootstrap5-dark.css +722 -639
  29. package/styles/bootstrap5-lite.css +539 -480
  30. package/styles/bootstrap5.3-lite.css +518 -459
  31. package/styles/bootstrap5.3.css +683 -600
  32. package/styles/bootstrap5.css +702 -619
  33. package/styles/fabric-dark-lite.css +527 -468
  34. package/styles/fabric-dark.css +690 -607
  35. package/styles/fabric-lite.css +518 -459
  36. package/styles/fabric.css +681 -598
  37. package/styles/fluent-dark-lite.css +517 -458
  38. package/styles/fluent-dark.css +680 -597
  39. package/styles/fluent-lite.css +517 -458
  40. package/styles/fluent.css +680 -597
  41. package/styles/fluent2-lite.css +530 -469
  42. package/styles/fluent2.css +721 -636
  43. package/styles/highcontrast-light-lite.css +514 -451
  44. package/styles/highcontrast-light.css +677 -590
  45. package/styles/highcontrast-lite.css +514 -451
  46. package/styles/highcontrast.css +677 -590
  47. package/styles/material-dark-lite.css +512 -453
  48. package/styles/material-dark.css +676 -593
  49. package/styles/material-lite.css +511 -452
  50. package/styles/material.css +674 -591
  51. package/styles/material3-dark-lite.css +511 -452
  52. package/styles/material3-dark.css +674 -591
  53. package/styles/material3-lite.css +511 -452
  54. package/styles/material3.css +674 -591
  55. package/styles/ribbon/_bds-definition.scss +6 -1
  56. package/styles/ribbon/_bigger.scss +79 -56
  57. package/styles/ribbon/_bootstrap-dark-definition.scss +10 -3
  58. package/styles/ribbon/_bootstrap-definition.scss +7 -2
  59. package/styles/ribbon/_bootstrap4-definition.scss +12 -5
  60. package/styles/ribbon/_bootstrap5-definition.scss +7 -2
  61. package/styles/ribbon/_bootstrap5.3-definition.scss +10 -5
  62. package/styles/ribbon/_fabric-dark-definition.scss +7 -2
  63. package/styles/ribbon/_fabric-definition.scss +7 -2
  64. package/styles/ribbon/_fluent-definition.scss +7 -2
  65. package/styles/ribbon/_fluent2-definition.scss +8 -3
  66. package/styles/ribbon/_fusionnew-definition.scss +6 -1
  67. package/styles/ribbon/_highcontrast-definition.scss +7 -2
  68. package/styles/ribbon/_highcontrast-light-definition.scss +7 -2
  69. package/styles/ribbon/_layout.scss +100 -58
  70. package/styles/ribbon/_material-dark-definition.scss +9 -4
  71. package/styles/ribbon/_material-definition.scss +7 -2
  72. package/styles/ribbon/_material3-definition.scss +7 -2
  73. package/styles/ribbon/_tailwind-definition.scss +7 -2
  74. package/styles/ribbon/_tailwind3-definition.scss +13 -8
  75. package/styles/ribbon/_theme.scss +108 -51
  76. package/styles/ribbon/bds.css +709 -590
  77. package/styles/ribbon/bootstrap-dark.css +694 -611
  78. package/styles/ribbon/bootstrap.css +674 -591
  79. package/styles/ribbon/bootstrap4.css +680 -597
  80. package/styles/ribbon/bootstrap5-dark.css +722 -639
  81. package/styles/ribbon/bootstrap5.3.css +683 -600
  82. package/styles/ribbon/bootstrap5.css +702 -619
  83. package/styles/ribbon/fabric-dark.css +690 -607
  84. package/styles/ribbon/fabric.css +681 -598
  85. package/styles/ribbon/fluent-dark.css +680 -597
  86. package/styles/ribbon/fluent.css +680 -597
  87. package/styles/ribbon/fluent2.css +721 -636
  88. package/styles/ribbon/highcontrast-light.css +677 -590
  89. package/styles/ribbon/highcontrast.css +677 -590
  90. package/styles/ribbon/material-dark.css +676 -593
  91. package/styles/ribbon/material.css +674 -591
  92. package/styles/ribbon/material3-dark.css +674 -591
  93. package/styles/ribbon/material3.css +674 -591
  94. package/styles/ribbon/tailwind-dark.css +710 -591
  95. package/styles/ribbon/tailwind.css +710 -591
  96. package/styles/ribbon/tailwind3.css +716 -597
  97. package/styles/tailwind-dark-lite.css +547 -452
  98. package/styles/tailwind-dark.css +710 -591
  99. package/styles/tailwind-lite.css +547 -452
  100. package/styles/tailwind.css +710 -591
  101. package/styles/tailwind3-lite.css +553 -458
  102. package/styles/tailwind3.css +716 -597
@@ -1458,7 +1458,9 @@ class RibbonButton {
1458
1458
  return;
1459
1459
  }
1460
1460
  const buttonObj = getComponent(buttonEle, Button);
1461
- buttonObj.click();
1461
+ if (!buttonObj.disabled) {
1462
+ buttonObj.click();
1463
+ }
1462
1464
  }
1463
1465
  /**
1464
1466
  * Updates the button properties.
@@ -1615,7 +1617,9 @@ class RibbonCheckBox {
1615
1617
  return;
1616
1618
  }
1617
1619
  const checkBoxObj = getComponent(inputEle, CheckBox);
1618
- checkBoxObj.click();
1620
+ if (!checkBoxObj.disabled) {
1621
+ checkBoxObj.click();
1622
+ }
1619
1623
  }
1620
1624
  /**
1621
1625
  * Updates the checkbox.
@@ -1824,7 +1828,9 @@ class RibbonColorPicker {
1824
1828
  if (!colorPickerObj) {
1825
1829
  return;
1826
1830
  }
1827
- colorPickerObj.toggle();
1831
+ if (!colorPickerObj.disabled) {
1832
+ colorPickerObj.toggle();
1833
+ }
1828
1834
  }
1829
1835
  /**
1830
1836
  * Updates the colorpicker properties.
@@ -2451,7 +2457,13 @@ class RibbonDropDown {
2451
2457
  * @returns {void}
2452
2458
  */
2453
2459
  toggle(controlId) {
2454
- this.getDropDownObj(controlId).toggle();
2460
+ const dropdownObj = this.getDropDownObj(controlId);
2461
+ if (!dropdownObj) {
2462
+ return;
2463
+ }
2464
+ if (!dropdownObj.disabled) {
2465
+ dropdownObj.toggle();
2466
+ }
2455
2467
  }
2456
2468
  /**
2457
2469
  * Updates the dropdown.
@@ -2720,7 +2732,13 @@ class RibbonSplitButton {
2720
2732
  * @returns {void}
2721
2733
  */
2722
2734
  toggle(controlId) {
2723
- this.getSplitButtonObj(controlId).toggle();
2735
+ const splitBtnObj = this.getSplitButtonObj(controlId);
2736
+ if (!splitBtnObj) {
2737
+ return;
2738
+ }
2739
+ if (!splitBtnObj.disabled) {
2740
+ splitBtnObj.toggle();
2741
+ }
2724
2742
  }
2725
2743
  /**
2726
2744
  * Updates the splitbutton.
@@ -10509,7 +10527,8 @@ class RibbonKeyTip {
10509
10527
  if ((isPopUpItem && isPopUpPresent) || !isPopUpItem) {
10510
10528
  const keytipElement = this.parent.createElement('div', {
10511
10529
  className: RIBBON_KEYTIP,
10512
- id: id + RIBBON_KEYTIP_ID
10530
+ id: id + RIBBON_KEYTIP_ID,
10531
+ attrs: { role: 'dialog', 'aria-label': 'ribbon-keytip' }
10513
10532
  });
10514
10533
  document.body.append(keytipElement);
10515
10534
  const keytipPopup = new Popup(keytipElement, {
@@ -10518,7 +10537,8 @@ class RibbonKeyTip {
10518
10537
  collision: { X: 'fit', Y: 'flip' },
10519
10538
  targetType: 'relative',
10520
10539
  position: { X: xOffset, Y: yOffset },
10521
- enableRtl: this.parent.enableRtl
10540
+ enableRtl: this.parent.enableRtl,
10541
+ actionOnScroll: 'hide'
10522
10542
  });
10523
10543
  keytipPopup.show();
10524
10544
  this.calculateKeyTipPosition(keyEle, keytipElement, type, yOffset);
@@ -10681,24 +10701,30 @@ class RibbonKeyTip {
10681
10701
  break;
10682
10702
  case 'combobox': {
10683
10703
  const itemEle = document.querySelector('#' + itemID);
10684
- setTimeout(() => {
10685
- itemEle.focus();
10686
- }, 100);
10704
+ if (this.isInteractableElement(itemEle)) {
10705
+ setTimeout(() => {
10706
+ itemEle.focus();
10707
+ }, 100);
10708
+ }
10687
10709
  break;
10688
10710
  }
10689
10711
  case 'gallery': {
10690
10712
  const galleryEle = document.querySelector('#' + itemID);
10691
- galleryEle.click();
10713
+ if (this.isInteractableElement(galleryEle)) {
10714
+ galleryEle.click();
10715
+ }
10692
10716
  break;
10693
10717
  }
10694
10718
  case 'template': {
10695
10719
  const templateEle = document.querySelector('#' + itemID);
10696
- templateEle.focus();
10720
+ if (this.isInteractableElement(templateEle)) {
10721
+ templateEle.focus();
10722
+ }
10697
10723
  break;
10698
10724
  }
10699
10725
  case 'group-btn': {
10700
10726
  const itemElement = document.querySelector('#' + itemID);
10701
- if (itemElement) {
10727
+ if (this.isInteractableElement(itemElement)) {
10702
10728
  const item = getInstance(itemElement, DropDownButton);
10703
10729
  item.toggle();
10704
10730
  for (let i = 0; i < itemProp.item.groupButtonSettings.items.length; i++) {
@@ -10712,6 +10738,9 @@ class RibbonKeyTip {
10712
10738
  }
10713
10739
  }
10714
10740
  }
10741
+ isInteractableElement(element) {
10742
+ return element && !element.closest('.e-ribbon-item').classList.contains('e-disabled');
10743
+ }
10715
10744
  commonItemsKeyTipPress(keyPress, key, isMethod) {
10716
10745
  if (this.parent.keyTipElements[`${key}`]) {
10717
10746
  let isKeyPressed = false;