@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.
- package/.eslintrc.json +16 -1
- package/CHANGELOG.md +8 -3
- package/dist/ej2-splitbuttons.min.js +2 -2
- package/dist/ej2-splitbuttons.umd.min.js +2 -2
- package/dist/ej2-splitbuttons.umd.min.js.map +1 -1
- package/dist/es6/ej2-splitbuttons.es2015.js +19 -13
- package/dist/es6/ej2-splitbuttons.es2015.js.map +1 -1
- package/dist/es6/ej2-splitbuttons.es5.js +14 -7
- package/dist/es6/ej2-splitbuttons.es5.js.map +1 -1
- package/dist/global/ej2-splitbuttons.min.js +2 -2
- package/dist/global/ej2-splitbuttons.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/drop-down-button/drop-down-button.js +13 -7
- package/src/progress-button/progress-button-model.d.ts +1 -1
- package/src/progress-button/progress-button.d.ts +1 -1
- package/styles/bootstrap-dark.css +21 -0
- package/styles/bootstrap.css +21 -0
- package/styles/bootstrap4.css +49 -28
- package/styles/bootstrap5-dark.css +21 -0
- package/styles/bootstrap5.css +21 -0
- package/styles/button-group/bootstrap4.css +24 -24
- package/styles/drop-down-button/bootstrap4.css +1 -1
- package/styles/fabric-dark.css +21 -0
- package/styles/fabric.css +21 -0
- package/styles/fluent-dark.css +21 -0
- package/styles/fluent.css +21 -0
- package/styles/highcontrast-light.css +21 -0
- package/styles/highcontrast.css +21 -0
- package/styles/material-dark.css +21 -0
- package/styles/material.css +21 -0
- package/styles/split-button/_layout.scss +7 -0
- package/styles/split-button/_theme.scss +31 -0
- package/styles/split-button/bootstrap-dark.css +21 -0
- package/styles/split-button/bootstrap.css +21 -0
- package/styles/split-button/bootstrap4.css +24 -3
- package/styles/split-button/bootstrap5-dark.css +21 -0
- package/styles/split-button/bootstrap5.css +21 -0
- package/styles/split-button/fabric-dark.css +21 -0
- package/styles/split-button/fabric.css +21 -0
- package/styles/split-button/fluent-dark.css +21 -0
- package/styles/split-button/fluent.css +21 -0
- package/styles/split-button/highcontrast-light.css +21 -0
- package/styles/split-button/highcontrast.css +21 -0
- package/styles/split-button/material-dark.css +21 -0
- package/styles/split-button/material.css +21 -0
- package/styles/split-button/tailwind-dark.css +21 -0
- package/styles/split-button/tailwind.css +21 -0
- package/styles/tailwind-dark.css +21 -0
- package/styles/tailwind.css +21 -0
|
@@ -304,8 +304,7 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
304
304
|
this.dropDown.hide();
|
|
305
305
|
attributes(this.element, {
|
|
306
306
|
['aria-haspopup']: this.items.length || this.target ? 'true' : 'false', ['aria-expanded']: 'false',
|
|
307
|
-
['
|
|
308
|
-
['aria-label']: this.element.textContent ? this.element.textContent : 'dropdownbutton'
|
|
307
|
+
['type']: 'button', ['aria-label']: this.element.textContent ? this.element.textContent : 'dropdownbutton'
|
|
309
308
|
});
|
|
310
309
|
if (this.cssClass) {
|
|
311
310
|
addClass([div], this.cssClass.split(' '));
|
|
@@ -337,7 +336,7 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
337
336
|
li = this.createElement('li', {
|
|
338
337
|
innerHTML: item.url ? '' : tempItem,
|
|
339
338
|
className: item.separator ? classNames.ITEM + ' ' + classNames.SEPARATOR : classNames.ITEM,
|
|
340
|
-
attrs: { 'role': '
|
|
339
|
+
attrs: item.separator ? { 'role': 'separator', 'tabindex': '-1' } : { 'role': 'menuitem', 'tabindex': '-1', 'aria-label': tempItem },
|
|
341
340
|
id: item.id ? item.id : getUniqueID('e-' + this.getModuleName() + '-item')
|
|
342
341
|
});
|
|
343
342
|
if (this.enableHtmlSanitizer) {
|
|
@@ -380,7 +379,7 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
380
379
|
}
|
|
381
380
|
hasIcon(items, field) {
|
|
382
381
|
for (let i = 0, len = items.length; i < len; i++) {
|
|
383
|
-
if (items[i][field]) {
|
|
382
|
+
if (items[i][`${field}`]) {
|
|
384
383
|
return true;
|
|
385
384
|
}
|
|
386
385
|
}
|
|
@@ -611,14 +610,14 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
611
610
|
}
|
|
612
611
|
focusoutHandler(e) {
|
|
613
612
|
if (this.isPopupCreated && !this.canOpen()) {
|
|
614
|
-
|
|
613
|
+
const liTarget = e.relatedTarget;
|
|
615
614
|
if (liTarget && liTarget.className.indexOf('e-item') > -1) {
|
|
616
615
|
const li = this.getLI(liTarget);
|
|
617
616
|
if (li) {
|
|
618
|
-
|
|
619
|
-
|
|
617
|
+
const liIdx = Array.prototype.indexOf.call(this.getULElement().children, li);
|
|
618
|
+
const item = this.items[liIdx];
|
|
620
619
|
if (item) {
|
|
621
|
-
|
|
620
|
+
const selectEventArgs = { element: li, item: item };
|
|
622
621
|
this.trigger('select', selectEventArgs);
|
|
623
622
|
}
|
|
624
623
|
}
|
|
@@ -670,7 +669,7 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
670
669
|
}
|
|
671
670
|
else {
|
|
672
671
|
if (this.activeElem.length > 1) {
|
|
673
|
-
|
|
672
|
+
const splitButton = getComponent(this.activeElem[0], 'split-btn');
|
|
674
673
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
675
674
|
if (splitButton.isReact && popupElem.childNodes.length < 1) {
|
|
676
675
|
splitButton.appendReactElement(this.getTargetElement(), this.getPopUpElement());
|
|
@@ -694,6 +693,7 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
694
693
|
this.dropDown.show(null, this.element);
|
|
695
694
|
addClass([this.element], 'e-active');
|
|
696
695
|
this.element.setAttribute('aria-expanded', 'true');
|
|
696
|
+
this.element.setAttribute('aria-owns', this.getPopUpElement().id);
|
|
697
697
|
if (ul) {
|
|
698
698
|
ul.focus();
|
|
699
699
|
}
|
|
@@ -705,12 +705,12 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
705
705
|
closePopup(e = null, focusEle) {
|
|
706
706
|
const ul = this.getULElement();
|
|
707
707
|
const beforeCloseArgs = { element: ul, items: this.items, event: e, cancel: false };
|
|
708
|
-
let popupElement = this.getPopUpElement();
|
|
709
|
-
if (popupElement) {
|
|
710
|
-
EventHandler.remove(popupElement, 'keydown', this.keyBoardHandler);
|
|
711
|
-
}
|
|
712
708
|
this.trigger('beforeClose', beforeCloseArgs, (observedArgs) => {
|
|
713
709
|
if (!observedArgs.cancel) {
|
|
710
|
+
const popupElement = this.getPopUpElement();
|
|
711
|
+
if (popupElement) {
|
|
712
|
+
EventHandler.remove(popupElement, 'keydown', this.keyBoardHandler);
|
|
713
|
+
}
|
|
714
714
|
this.popupUnWireEvents();
|
|
715
715
|
const ul = this.getULElement();
|
|
716
716
|
let selectedLi;
|
|
@@ -723,6 +723,7 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
723
723
|
this.dropDown.hide();
|
|
724
724
|
removeClass(this.activeElem, 'e-active');
|
|
725
725
|
this.element.setAttribute('aria-expanded', 'false');
|
|
726
|
+
this.element.removeAttribute('aria-owns');
|
|
726
727
|
if (focusEle) {
|
|
727
728
|
focusEle.focus();
|
|
728
729
|
}
|
|
@@ -740,6 +741,11 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
740
741
|
this.isPopupCreated = this.createPopupOnClick ? false : true;
|
|
741
742
|
}
|
|
742
743
|
}
|
|
744
|
+
else {
|
|
745
|
+
if (ul) {
|
|
746
|
+
ul.focus();
|
|
747
|
+
}
|
|
748
|
+
}
|
|
743
749
|
});
|
|
744
750
|
}
|
|
745
751
|
unWireEvents() {
|