@syncfusion/ej2-splitbuttons 20.4.48 → 21.1.35
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/CHANGELOG.md +9 -6
- 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 +27 -7
- package/dist/es6/ej2-splitbuttons.es2015.js.map +1 -1
- package/dist/es6/ej2-splitbuttons.es5.js +27 -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 +9 -8
- package/src/drop-down-button/drop-down-button.js +9 -4
- package/src/progress-button/progress-button-model.d.ts +3 -1
- package/src/progress-button/progress-button.d.ts +19 -1
- package/src/split-button/split-button.js +18 -3
- package/styles/bootstrap-dark.css +44 -44
- package/styles/bootstrap.css +44 -44
- package/styles/bootstrap4.css +44 -44
- package/styles/bootstrap5-dark.css +48 -48
- package/styles/bootstrap5.css +48 -48
- package/styles/button-group/_bootstrap5-definition.scss +2 -2
- package/styles/button-group/_fluent-definition.scss +2 -2
- package/styles/button-group/_tailwind-definition.scss +1 -1
- package/styles/button-group/_theme.scss +4 -2
- package/styles/button-group/bootstrap-dark.css +30 -30
- package/styles/button-group/bootstrap.css +30 -30
- package/styles/button-group/bootstrap4.css +31 -31
- package/styles/button-group/bootstrap5-dark.css +30 -30
- package/styles/button-group/bootstrap5.css +30 -30
- package/styles/button-group/fabric-dark.css +30 -30
- package/styles/button-group/fabric.css +30 -30
- package/styles/button-group/fluent-dark.css +30 -30
- package/styles/button-group/fluent.css +30 -30
- package/styles/button-group/highcontrast-light.css +30 -30
- package/styles/button-group/highcontrast.css +30 -30
- package/styles/button-group/material-dark.css +30 -30
- package/styles/button-group/material.css +30 -30
- package/styles/button-group/tailwind-dark.css +30 -30
- package/styles/button-group/tailwind.css +30 -30
- package/styles/drop-down-button/_bootstrap5-definition.scss +5 -5
- package/styles/drop-down-button/_fluent-definition.scss +5 -5
- package/styles/drop-down-button/_layout.scss +12 -0
- package/styles/drop-down-button/_tailwind-definition.scss +4 -4
- package/styles/fabric-dark.css +44 -44
- package/styles/fabric.css +44 -44
- package/styles/fluent-dark.css +48 -48
- package/styles/fluent.css +48 -48
- package/styles/highcontrast-light.css +44 -44
- package/styles/highcontrast.css +44 -44
- package/styles/material-dark.css +43 -43
- package/styles/material.css +43 -43
- package/styles/progress-button/_theme.scss +45 -19
- package/styles/progress-button/bootstrap-dark.css +14 -14
- package/styles/progress-button/bootstrap.css +14 -14
- package/styles/progress-button/bootstrap4.css +13 -13
- package/styles/progress-button/bootstrap5-dark.css +18 -18
- package/styles/progress-button/bootstrap5.css +18 -18
- package/styles/progress-button/fabric-dark.css +14 -14
- package/styles/progress-button/fabric.css +14 -14
- package/styles/progress-button/fluent-dark.css +18 -18
- package/styles/progress-button/fluent.css +18 -18
- package/styles/progress-button/highcontrast-light.css +14 -14
- package/styles/progress-button/highcontrast.css +14 -14
- package/styles/progress-button/material-dark.css +13 -13
- package/styles/progress-button/material.css +13 -13
- package/styles/progress-button/tailwind-dark.css +18 -18
- package/styles/progress-button/tailwind.css +18 -18
- package/styles/tailwind-dark.css +48 -48
- package/styles/tailwind.css +48 -48
- package/styles/button-group/_material3-definition.scss +0 -31
- package/styles/drop-down-button/_material3-definition.scss +0 -50
- package/styles/progress-button/_material3-definition.scss +0 -21
- package/styles/split-button/_material3-definition.scss +0 -24
|
@@ -348,7 +348,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
|
|
|
348
348
|
this.dropDown.hide();
|
|
349
349
|
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));
|
|
350
350
|
if (this.cssClass) {
|
|
351
|
-
addClass([div], this.cssClass.split(' '));
|
|
351
|
+
addClass([div], this.cssClass.replace(/\s+/g, ' ').trim().split(' '));
|
|
352
352
|
}
|
|
353
353
|
this.isPopupCreated = true;
|
|
354
354
|
};
|
|
@@ -628,6 +628,10 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
|
|
|
628
628
|
if (this.target && (e.keyCode === 13 || e.keyCode === 9)) {
|
|
629
629
|
return;
|
|
630
630
|
}
|
|
631
|
+
if (e.keyCode === 13 && this.activeElem[0].classList.contains('e-split-btn')) {
|
|
632
|
+
this.activeElem[0].focus();
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
631
635
|
if (e.target && e.target.className.indexOf('e-edit-template') > -1 && e.keyCode === 32) {
|
|
632
636
|
return;
|
|
633
637
|
}
|
|
@@ -844,19 +848,20 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
|
|
|
844
848
|
}
|
|
845
849
|
break;
|
|
846
850
|
case 'cssClass':
|
|
847
|
-
if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
|
|
851
|
+
if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1 || oldProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
|
|
848
852
|
if (!this.element.querySelector('span.e-caret')) {
|
|
849
853
|
this.appendArrowSpan();
|
|
850
854
|
}
|
|
851
855
|
var arrowSpan = this.element.querySelector('span.e-caret');
|
|
852
|
-
classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right'])
|
|
856
|
+
newProp.cssClass.indexOf(classNames.VERTICAL) > -1 ? classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right'])
|
|
857
|
+
: classList(arrowSpan, ['e-icon-right'], ['e-icon-bottom']);
|
|
853
858
|
}
|
|
854
859
|
if (this.isPopupCreated) {
|
|
855
860
|
if (oldProp.cssClass) {
|
|
856
861
|
removeClass([popupElement], oldProp.cssClass.split(' '));
|
|
857
862
|
}
|
|
858
863
|
if (newProp.cssClass) {
|
|
859
|
-
addClass([popupElement], newProp.cssClass.split(' '));
|
|
864
|
+
addClass([popupElement], newProp.cssClass.replace(/\s+/g, ' ').trim().split(' '));
|
|
860
865
|
}
|
|
861
866
|
}
|
|
862
867
|
break;
|
|
@@ -1078,7 +1083,7 @@ var SplitButton = /** @__PURE__ @class */ (function (_super) {
|
|
|
1078
1083
|
this.wrapper.classList.add(RTL);
|
|
1079
1084
|
}
|
|
1080
1085
|
if (this.cssClass) {
|
|
1081
|
-
addClass([this.wrapper], this.cssClass.split(' '));
|
|
1086
|
+
addClass([this.wrapper], this.cssClass.replace(/\s+/g, ' ').trim().split(' '));
|
|
1082
1087
|
}
|
|
1083
1088
|
};
|
|
1084
1089
|
SplitButton.prototype.createPrimaryButton = function () {
|
|
@@ -1130,6 +1135,10 @@ var SplitButton = /** @__PURE__ @class */ (function (_super) {
|
|
|
1130
1135
|
_this.trigger('select', args);
|
|
1131
1136
|
};
|
|
1132
1137
|
dropDownBtnModel.beforeOpen = function (args) {
|
|
1138
|
+
if (_this.createPopupOnClick && _this.items.length == 0) {
|
|
1139
|
+
_this.secondaryBtnObj.dropDown.relateTo = _this.wrapper;
|
|
1140
|
+
_this.dropDown = _this.secondaryBtnObj.dropDown;
|
|
1141
|
+
}
|
|
1133
1142
|
var callBackPromise = new Deferred();
|
|
1134
1143
|
_this.trigger('beforeOpen', args, function (observedArgs) {
|
|
1135
1144
|
callBackPromise.resolve(observedArgs);
|
|
@@ -1213,7 +1222,8 @@ var SplitButton = /** @__PURE__ @class */ (function (_super) {
|
|
|
1213
1222
|
new KeyboardEvents(this.element, {
|
|
1214
1223
|
keyAction: this.btnKeyBoardHandler.bind(this),
|
|
1215
1224
|
keyConfigs: {
|
|
1216
|
-
altdownarrow: 'alt+downarrow'
|
|
1225
|
+
altdownarrow: 'alt+downarrow',
|
|
1226
|
+
enter: 'enter'
|
|
1217
1227
|
}
|
|
1218
1228
|
});
|
|
1219
1229
|
};
|
|
@@ -1229,6 +1239,16 @@ var SplitButton = /** @__PURE__ @class */ (function (_super) {
|
|
|
1229
1239
|
case 'altdownarrow':
|
|
1230
1240
|
this.clickHandler(e);
|
|
1231
1241
|
break;
|
|
1242
|
+
case 'enter':
|
|
1243
|
+
this.clickHandler(e);
|
|
1244
|
+
if (!this.getPopUpElement().classList.contains('e-popup-close')) {
|
|
1245
|
+
this.element.classList.remove('e-active');
|
|
1246
|
+
this.secondaryBtnObj.element.classList.add('e-active');
|
|
1247
|
+
}
|
|
1248
|
+
else {
|
|
1249
|
+
this.secondaryBtnObj.element.classList.remove('e-active');
|
|
1250
|
+
}
|
|
1251
|
+
break;
|
|
1232
1252
|
}
|
|
1233
1253
|
};
|
|
1234
1254
|
/**
|
|
@@ -1255,7 +1275,7 @@ var SplitButton = /** @__PURE__ @class */ (function (_super) {
|
|
|
1255
1275
|
if (oldProp.cssClass) {
|
|
1256
1276
|
removeClass([this.wrapper], oldProp.cssClass.split(' '));
|
|
1257
1277
|
}
|
|
1258
|
-
addClass([this.wrapper], newProp.cssClass.split(' '));
|
|
1278
|
+
addClass([this.wrapper], newProp.cssClass.replace(/\s+/g, ' ').trim().split(' '));
|
|
1259
1279
|
break;
|
|
1260
1280
|
case 'enableRtl':
|
|
1261
1281
|
if (newProp.enableRtl) {
|