@datarailsshared/datarailsshared 1.3.26 → 1.3.27
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/assets/styles/img/default-avatar.svg +5 -0
- package/bundles/datarailsshared-datarailsshared.umd.js +43 -14
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.3.27.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/dr-avatar/dr-avatar.component.js +1 -1
- package/esm2015/lib/dr-inputs/button/button.component.js +5 -13
- package/esm2015/lib/dr-inputs/dr-select/dr-select.component.js +25 -4
- package/fesm2015/datarailsshared-datarailsshared.js +27 -14
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-inputs/button/button.component.d.ts +0 -4
- package/lib/dr-inputs/dr-select/dr-select.component.d.ts +5 -1
- package/package.json +1 -1
- package/assets/styles/img/default_avatar.svg +0 -4
- package/datarailsshared-datarailsshared-1.3.26.tgz +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="24" height="24" rx="12" fill="#E5E6EA"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 9.75C15 11.4069 13.6569 12.75 12 12.75C10.3431 12.75 9 11.4069 9 9.75C9 8.09315 10.3431 6.75 12 6.75C13.6569 6.75 15 8.09315 15 9.75ZM13.875 9.75C13.875 10.7855 13.0355 11.625 12 11.625C10.9645 11.625 10.125 10.7855 10.125 9.75C10.125 8.71447 10.9645 7.875 12 7.875C13.0355 7.875 13.875 8.71447 13.875 9.75Z" fill="#51566F"/>
|
|
4
|
+
<path d="M15.9968 16.7631C15.5425 15.3973 14.0368 14.25 12 14.25C9.9632 14.25 8.45748 15.3973 8.00319 16.7631C7.91242 17.0359 7.67416 17.25 7.38657 17.25C7.04536 17.25 6.77507 16.9539 6.86275 16.6241C7.39546 14.6206 9.49327 13.125 12 13.125C14.5067 13.125 16.6045 14.6206 17.1373 16.6241C17.2249 16.9539 16.9546 17.25 16.6134 17.25C16.3259 17.25 16.0876 17.0359 15.9968 16.7631Z" fill="#51566F"/>
|
|
5
|
+
</svg>
|
|
@@ -1647,8 +1647,16 @@
|
|
|
1647
1647
|
tabindex: [{ type: i0.HostBinding, args: ['tabindex',] }]
|
|
1648
1648
|
};
|
|
1649
1649
|
|
|
1650
|
+
var SELECT_HOST_ATTRIBUTES = [
|
|
1651
|
+
'no-left-border',
|
|
1652
|
+
'no-left-border-radius',
|
|
1653
|
+
'no-right-border',
|
|
1654
|
+
'no-right-border-radius',
|
|
1655
|
+
];
|
|
1650
1656
|
var DrSelectComponent = /** @class */ (function () {
|
|
1651
|
-
function DrSelectComponent() {
|
|
1657
|
+
function DrSelectComponent(elementRef) {
|
|
1658
|
+
var e_1, _a;
|
|
1659
|
+
this.elementRef = elementRef;
|
|
1652
1660
|
this.items = [];
|
|
1653
1661
|
this.appendTo = 'body';
|
|
1654
1662
|
this.disabled = false;
|
|
@@ -1656,6 +1664,21 @@
|
|
|
1656
1664
|
this.change = new i0.EventEmitter();
|
|
1657
1665
|
this.onChange = function () { };
|
|
1658
1666
|
this.onTouched = function () { };
|
|
1667
|
+
try {
|
|
1668
|
+
for (var SELECT_HOST_ATTRIBUTES_1 = __values(SELECT_HOST_ATTRIBUTES), SELECT_HOST_ATTRIBUTES_1_1 = SELECT_HOST_ATTRIBUTES_1.next(); !SELECT_HOST_ATTRIBUTES_1_1.done; SELECT_HOST_ATTRIBUTES_1_1 = SELECT_HOST_ATTRIBUTES_1.next()) {
|
|
1669
|
+
var attr = SELECT_HOST_ATTRIBUTES_1_1.value;
|
|
1670
|
+
if (this.hasHostAttributes(attr)) {
|
|
1671
|
+
(this.getHostElement()).classList.add(attr);
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1676
|
+
finally {
|
|
1677
|
+
try {
|
|
1678
|
+
if (SELECT_HOST_ATTRIBUTES_1_1 && !SELECT_HOST_ATTRIBUTES_1_1.done && (_a = SELECT_HOST_ATTRIBUTES_1.return)) _a.call(SELECT_HOST_ATTRIBUTES_1);
|
|
1679
|
+
}
|
|
1680
|
+
finally { if (e_1) throw e_1.error; }
|
|
1681
|
+
}
|
|
1659
1682
|
}
|
|
1660
1683
|
DrSelectComponent.prototype.writeValue = function (value) {
|
|
1661
1684
|
this.selectedItem = value;
|
|
@@ -1673,6 +1696,17 @@
|
|
|
1673
1696
|
DrSelectComponent.prototype.setDisabledState = function (isDisabled) {
|
|
1674
1697
|
this.disabled = isDisabled;
|
|
1675
1698
|
};
|
|
1699
|
+
DrSelectComponent.prototype.getHostElement = function () {
|
|
1700
|
+
return this.elementRef.nativeElement;
|
|
1701
|
+
};
|
|
1702
|
+
DrSelectComponent.prototype.hasHostAttributes = function () {
|
|
1703
|
+
var _this = this;
|
|
1704
|
+
var attributes = [];
|
|
1705
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1706
|
+
attributes[_i] = arguments[_i];
|
|
1707
|
+
}
|
|
1708
|
+
return attributes.some(function (attribute) { return _this.getHostElement().hasAttribute(attribute); });
|
|
1709
|
+
};
|
|
1676
1710
|
return DrSelectComponent;
|
|
1677
1711
|
}());
|
|
1678
1712
|
DrSelectComponent.decorators = [
|
|
@@ -1684,9 +1718,12 @@
|
|
|
1684
1718
|
useExisting: DrSelectComponent,
|
|
1685
1719
|
multi: true
|
|
1686
1720
|
}],
|
|
1687
|
-
styles: [":host{width:100%;height:32px}:host ::ng-deep ng-select.ng-select .ng-select-container{min-height:32px;height:32px;width:100%;border-radius:6px!important;border:1px solid #C3C4CE;box-shadow:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container:hover{border-color:#85889c}:host ::ng-deep ng-select.ng-select .ng-select-container:focus-within{border-color:#21b8f1}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input{top:0!important;line-height:30px;padding:0 50px 0 8px!important;color:#151b3f;font-size:14px;font-weight:400}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding:0 0 0 8px;height:100%;overflow:auto}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container .ng-value{line-height:1}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container .ng-input{padding:0 0 0 3px!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container{max-height:58px;height:100%}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container{max-height:58px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{color:#151a41;height:24px;padding:2px 8px;font-size:12px;margin:2px 2px 2px 0;background:#E5E6EA;display:flex;flex-direction:row-reverse;align-items:center;border-radius:12px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-label{line-height:20px;padding:0!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon{border:none!important;padding:0 0 0 9px!important;color:#51566f;font-size:16px;font-weight:bold}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon,:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon:hover{background:transparent!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within{background:#E5E6EA!important;border:1px solid #E5E6EA!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within .ng-value{color:#bcbcbc!important}:host ::ng-deep ng-select.ng-select.ng-select-single.ng-invalid.ng-touched .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-multiple.ng-invalid.ng-touched .ng-select-container{border-color:#de2833}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select{border:1px solid #DBDEE3;border-radius:6px!important;margin-top:8px!important;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:empty{display:none}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option{display:flex;align-items:center;min-height:36px;padding:10px 12px}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option>.ng-option-label{text-overflow:ellipsis;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-marked{background:#fff}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked{background:#F3F7FF;color:#151b3f}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected span,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked span{font-weight:normal!important}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:hover,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected:hover,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked:hover{background:#F6F7F8}\n"]
|
|
1721
|
+
styles: [":host{width:100%;height:32px}:host.no-left-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-left-radius:0!important;border-top-left-radius:0!important}:host.no-right-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-right-radius:0!important;border-top-right-radius:0!important}:host.no-right-border ::ng-deep ng-select.ng-select .ng-select-container{border-right:none!important}:host.no-left-border ::ng-deep ng-select.ng-select .ng-select-container{border-left:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container{min-height:32px;height:32px;width:100%;border-radius:6px!important;border:1px solid #C3C4CE;box-shadow:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container:hover{border-color:#85889c}:host ::ng-deep ng-select.ng-select .ng-select-container:focus-within{border-color:#21b8f1}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input{top:0!important;line-height:30px;padding:0 50px 0 8px!important;color:#151b3f;font-size:14px;font-weight:400}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding:0 0 0 8px;height:100%;overflow:auto}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container .ng-value{line-height:1}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container .ng-input{padding:0 0 0 3px!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container{max-height:58px;height:100%}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container{max-height:58px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{color:#151a41;height:24px;padding:2px 8px;font-size:12px;margin:2px 2px 2px 0;background:#E5E6EA;display:flex;flex-direction:row-reverse;align-items:center;border-radius:12px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-label{line-height:20px;padding:0!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon{border:none!important;padding:0 0 0 9px!important;color:#51566f;font-size:16px;font-weight:bold}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon,:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon:hover{background:transparent!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within{background:#E5E6EA!important;border:1px solid #E5E6EA!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within .ng-value{color:#bcbcbc!important}:host ::ng-deep ng-select.ng-select.ng-select-single.ng-invalid.ng-touched .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-multiple.ng-invalid.ng-touched .ng-select-container{border-color:#de2833}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select{border:1px solid #DBDEE3;border-radius:6px!important;margin-top:8px!important;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:empty{display:none}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option{display:flex;align-items:center;min-height:36px;padding:10px 12px}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option>.ng-option-label{text-overflow:ellipsis;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-marked{background:#fff}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked{background:#F3F7FF;color:#151b3f}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected span,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked span{font-weight:normal!important}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:hover,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected:hover,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked:hover{background:#F6F7F8}\n"]
|
|
1688
1722
|
},] }
|
|
1689
1723
|
];
|
|
1724
|
+
DrSelectComponent.ctorParameters = function () { return [
|
|
1725
|
+
{ type: i0.ElementRef }
|
|
1726
|
+
]; };
|
|
1690
1727
|
DrSelectComponent.propDecorators = {
|
|
1691
1728
|
className: [{ type: i0.Input }],
|
|
1692
1729
|
items: [{ type: i0.Input }],
|
|
@@ -1748,7 +1785,7 @@
|
|
|
1748
1785
|
selector: 'dr-avatar',
|
|
1749
1786
|
template: "<div class=\"users-section\">\r\n <div *ngIf=\"!parsedUsers.length\"\r\n class=\"users-section__default\">\r\n </div>\r\n\r\n <div *ngFor=\"let user of getFirstUsers()\"\r\n class=\"users-section__user\"\r\n [class]=\"'icon-' + user.colorNumber + ' ' + user.status\"\r\n (click)=\"userClicked.emit()\"\r\n [matTooltip]=\"user | drAvatar\"\r\n [matTooltipPosition]=\"'below'\">\r\n {{user | drAvatar: 'initials'}}\r\n </div>\r\n\r\n <div *ngIf=\"parsedUsers.length > 2\"\r\n class=\"users-section__user icon-2\"\r\n [drTooltip]=\"usersTemplate\"\r\n [drTooltipPosition]=\"'bottom'\">\r\n {{getLastUsers().length}}\r\n </div>\r\n</div>\r\n\r\n<ng-template #usersTemplate>\r\n <div *ngFor=\"let user of getLastUsers()\" class=\"users-popover-item\">\r\n <div class=\"users-section__user\"\r\n (click)=\"userClicked.emit()\"\r\n [class]=\"user.class\">\r\n {{user | drAvatar: 'initials'}}\r\n </div>\r\n <span class=\"username\">\r\n {{user | drAvatar}}\r\n </span>\r\n </div>\r\n</ng-template>\r\n",
|
|
1750
1787
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1751
|
-
styles: [":host{width:auto}.users-section{display:flex;height:28px}.users-section__default{display:flex;height:28px;width:28px;border-radius:14px;background:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Crect width%3D%2224%22 height%3D%2224%22 rx%3D%2212%22 fill%3D%22%
|
|
1788
|
+
styles: [":host{width:auto}.users-section{display:flex;height:28px}.users-section__default{display:flex;height:28px;width:28px;border-radius:14px;background:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Crect width%3D%2224%22 height%3D%2224%22 rx%3D%2212%22 fill%3D%22%23E5E6EA%22%2F%3E%0D%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M15 9.75C15 11.4069 13.6569 12.75 12 12.75C10.3431 12.75 9 11.4069 9 9.75C9 8.09315 10.3431 6.75 12 6.75C13.6569 6.75 15 8.09315 15 9.75ZM13.875 9.75C13.875 10.7855 13.0355 11.625 12 11.625C10.9645 11.625 10.125 10.7855 10.125 9.75C10.125 8.71447 10.9645 7.875 12 7.875C13.0355 7.875 13.875 8.71447 13.875 9.75Z%22 fill%3D%22%2351566F%22%2F%3E%0D%3Cpath d%3D%22M15.9968 16.7631C15.5425 15.3973 14.0368 14.25 12 14.25C9.9632 14.25 8.45748 15.3973 8.00319 16.7631C7.91242 17.0359 7.67416 17.25 7.38657 17.25C7.04536 17.25 6.77507 16.9539 6.86275 16.6241C7.39546 14.6206 9.49327 13.125 12 13.125C14.5067 13.125 16.6045 14.6206 17.1373 16.6241C17.2249 16.9539 16.9546 17.25 16.6134 17.25C16.3259 17.25 16.0876 17.0359 15.9968 16.7631Z%22 fill%3D%22%2351566F%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat;background-size:cover}.users-popover-item{display:flex;align-items:center;margin:12px}.users-popover-item .username{color:#51566f;font-size:14px}.users-popover-item .users-section__user{margin-right:8px}.users-section__user{position:relative;display:flex;justify-content:center;align-items:center;height:28px;width:28px;border-radius:14px;background:red;color:#fff;font-size:12px}.users-section__user.icon-0{background-color:#7b61ff}.users-section__user.icon-1{background-color:#21b8f1}.users-section__user.icon-2{background-color:#2969b0}.users-section__user.icon-3{background-color:#51566f}.users-section__user.icon-4{background-color:#0061ff}.users-section__user:hover{cursor:pointer}.users-section__user:not(:first-child){margin-left:4px}.users-section__user.online:after,.users-section__user.offline:after,.users-section__user.warning:after{content:\"\";display:flex;width:8px;height:8px;position:absolute;border-radius:4px;top:-2px;right:0}.users-section__user.online:after{background:#03A678}.users-section__user.offline:after{background:#DE2833}.users-section__user.warning:after{background:#FDA014}\n"]
|
|
1752
1789
|
},] }
|
|
1753
1790
|
];
|
|
1754
1791
|
DrAvatarComponent.ctorParameters = function () { return []; };
|
|
@@ -2226,23 +2263,16 @@
|
|
|
2226
2263
|
this.theme = 'primary';
|
|
2227
2264
|
this.isBold = false;
|
|
2228
2265
|
this.isLoading = false;
|
|
2229
|
-
this.click = new i0.EventEmitter();
|
|
2230
2266
|
}
|
|
2231
|
-
DrButtonComponent.prototype.onClick = function ($event) {
|
|
2232
|
-
$event.preventDefault();
|
|
2233
|
-
$event.stopPropagation();
|
|
2234
|
-
this.click.emit($event);
|
|
2235
|
-
};
|
|
2236
2267
|
return DrButtonComponent;
|
|
2237
2268
|
}());
|
|
2238
2269
|
DrButtonComponent.decorators = [
|
|
2239
2270
|
{ type: i0.Component, args: [{
|
|
2240
2271
|
selector: 'dr-button',
|
|
2241
|
-
template: "<button
|
|
2242
|
-
styles: [":host{display:inline-block}:host button[theme]{cursor:pointer;border-radius:16px;padding:5px 16px;font-family:\"Poppins\";font-style:normal;font-weight:400;font-size:14px;line-height:22px;color:#4e566c;border:1px solid #7F7FDD;display:flex;justify-content:space-between;align-items:center;height:32px}:host button[theme] .dr{padding:0;margin-left:5.35px;margin-right:8.64px}:host button[theme] .dr-spinner{animation-name:rotate;animation-iteration-count:infinite;animation-duration:1s}@keyframes rotate{0%{transform:rotate()}to{transform:rotate(360deg)}}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=secondary]{padding:5px 16px;background:#FFFFFF;border-radius:16px;min-width:90px}:host button[theme][theme~=split-secondary-first]:hover:not([disabled]),:host button[theme][theme~=split-secondary-last]:hover:not([disabled]),:host button[theme][theme~=secondary]:hover:not([disabled]){color:#4e566c;transition:.2ms ease-in all;background:#F2F2FB;box-shadow:0 4px 14px #0000001a;border:1px solid #4646CE}:host button[theme][theme~=split-secondary-first]:active,:host button[theme][theme~=split-secondary-last]:active,:host button[theme][theme~=secondary]:active{box-shadow:none;background:#F2F2FB}:host button[theme][theme~=split-secondary-first][disabled],:host button[theme][theme~=split-secondary-last][disabled],:host button[theme][theme~=secondary][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default}:host button[theme][theme~=split-secondary-first][is-loading=true],:host button[theme][theme~=split-secondary-last][is-loading=true],:host button[theme][theme~=secondary][is-loading=true]{justify-content:center;padding:5px 16px}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-last],:host button[theme][theme~=primary]{background:#4646CE;color:#fff;border:none;min-width:90px}:host button[theme][theme~=split-primary-first]:hover:not([disabled]),:host button[theme][theme~=split-primary-last]:hover:not([disabled]),:host button[theme][theme~=primary]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#25258C 0%,#4646CE 100%);box-shadow:0 4px 14px #0000001a;border:none}:host button[theme][theme~=split-primary-first]:active,:host button[theme][theme~=split-primary-last]:active,:host button[theme][theme~=primary]:active{background:#25258C}:host button[theme][theme~=split-primary-first][disabled],:host button[theme][theme~=split-primary-last][disabled],:host button[theme][theme~=primary][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default}:host button[theme][theme~=split-primary-first][is-loading=true],:host button[theme][theme~=split-primary-last][is-loading=true],:host button[theme][theme~=primary][is-loading=true]{justify-content:center;padding:5px 16px}:host button[theme][theme~=split-primary-first] .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=primary] .dr{margin:0}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover,:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{min-width:unset;border-bottom-right-radius:0;border-top-right-radius:0;padding-left:10px;padding-right:8px}:host button[theme][theme~=split-secondary-first][icon=true],:host button[theme][theme~=split-secondary-first]:hover[icon=true],:host button[theme][theme~=split-primary-first][icon=true],:host button[theme][theme~=split-primary-first]:hover[icon=true]{padding-left:6px;padding-right:2px}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{border-right:1px solid #fff!important}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover{border-right:none!important}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover,:host button[theme][theme~=split-primary-last],:host button[theme][theme~=split-primary-last]:hover{min-width:unset;border-bottom-left-radius:0;border-top-left-radius:0;padding-left:8px;padding-right:10px}:host button[theme][theme~=split-secondary-last][icon=true],:host button[theme][theme~=split-secondary-last]:hover[icon=true],:host button[theme][theme~=split-primary-last][icon=true],:host button[theme][theme~=split-primary-last]:hover[icon=true]{padding-left:2px;padding-right:6px}:host button[theme][theme~=split-secondary-last] .dr,:host button[theme][theme~=split-secondary-last]:hover .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=split-primary-last]:hover .dr{margin:0}:host button[theme][theme~=split-primary-last],:host button[theme][theme~=split-primary-last]:hover{border-left:none}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover{margin-left:-1px}:host button[theme][theme~=danger]{background:#BF1D30;color:#fff;border:none;min-width:90px}:host button[theme][theme~=danger]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#740e1a 0%,#BF1D30 100%);box-shadow:0 4px 14px #0000001a;border-radius:16px;border:none}:host button[theme][theme~=danger]:active{background:#740e1a}:host button[theme][theme~=danger][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default}:host button[theme][theme~=danger][is-loading=true]{justify-content:center;padding:5px 16px}:host button[theme][theme~=ghost]{background:none;border:none;color:#151b3f;padding:4px 8px}:host button[theme][theme~=ghost] .dr{margin-left:4.5px;margin-right:12.5px}:host button[theme][theme~=ghost]:hover:not([disabled]){color:#4646ce;background:#F2F2FB;border-radius:4px}:host button[theme][theme~=ghost][disabled]{color:#727583;cursor:default}:host button[theme][theme~=text-link]{background:none;border:none;color:#0b5af9
|
|
2272
|
+
template: "<button [disabled]=\"disabled\" [attr.is-loading]=\"isLoading\" [attr.bold]=\"isBold\"\r\n [attr.icon]=\"!!icon\" [attr.theme]=\"theme\">\r\n <ng-container *ngIf=\"!isLoading\">\r\n <i *ngIf=\"icon\" class=\"dr\" [class]=\"icon\" [style.color]=\"iconColor || 'inherit'\"></i>\r\n <ng-content></ng-content>\r\n <i *ngIf=\"theme === 'dropdown'\" class=\"dr-icon-arrow-down\"></i>\r\n </ng-container>\r\n <i *ngIf=\"isLoading\" class=\"dr dr-spinner dr-icon-load\"></i>\r\n</button>\r\n",
|
|
2273
|
+
styles: [":host{display:inline-block}:host[ng-reflect-disabled=true],:host[ng-reflect-is-loading=true]{pointer-events:none}:host button[theme]{cursor:pointer;border-radius:16px;padding:5px 16px;font-family:\"Poppins\";font-style:normal;font-weight:400;font-size:14px;line-height:22px;color:#4e566c;border:1px solid #7F7FDD;display:flex;justify-content:space-between;align-items:center;height:32px}:host button[theme] .dr{padding:0;margin-left:5.35px;margin-right:8.64px}:host button[theme] .dr-spinner{animation-name:rotate;animation-iteration-count:infinite;animation-duration:1s}@keyframes rotate{0%{transform:rotate()}to{transform:rotate(360deg)}}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=secondary]{padding:5px 16px;background:#FFFFFF;border-radius:16px;min-width:90px}:host button[theme][theme~=split-secondary-first]:hover:not([disabled]),:host button[theme][theme~=split-secondary-last]:hover:not([disabled]),:host button[theme][theme~=secondary]:hover:not([disabled]){color:#4e566c;transition:.2ms ease-in all;background:#F2F2FB;box-shadow:0 4px 14px #0000001a;border:1px solid #4646CE}:host button[theme][theme~=split-secondary-first]:active,:host button[theme][theme~=split-secondary-last]:active,:host button[theme][theme~=secondary]:active{box-shadow:none;background:#F2F2FB}:host button[theme][theme~=split-secondary-first][disabled],:host button[theme][theme~=split-secondary-last][disabled],:host button[theme][theme~=secondary][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=split-secondary-first][is-loading=true],:host button[theme][theme~=split-secondary-last][is-loading=true],:host button[theme][theme~=secondary][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-last],:host button[theme][theme~=primary]{background:#4646CE;color:#fff;border:none;min-width:90px}:host button[theme][theme~=split-primary-first]:hover:not([disabled]),:host button[theme][theme~=split-primary-last]:hover:not([disabled]),:host button[theme][theme~=primary]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#25258C 0%,#4646CE 100%);box-shadow:0 4px 14px #0000001a;border:none}:host button[theme][theme~=split-primary-first]:active,:host button[theme][theme~=split-primary-last]:active,:host button[theme][theme~=primary]:active{background:#25258C}:host button[theme][theme~=split-primary-first][disabled],:host button[theme][theme~=split-primary-last][disabled],:host button[theme][theme~=primary][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=split-primary-first][is-loading=true],:host button[theme][theme~=split-primary-last][is-loading=true],:host button[theme][theme~=primary][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=split-primary-first] .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=primary] .dr{margin:0}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover,:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{min-width:unset;border-bottom-right-radius:0;border-top-right-radius:0;padding-left:10px;padding-right:8px}:host button[theme][theme~=split-secondary-first][icon=true],:host button[theme][theme~=split-secondary-first]:hover[icon=true],:host button[theme][theme~=split-primary-first][icon=true],:host button[theme][theme~=split-primary-first]:hover[icon=true]{padding-left:6px;padding-right:2px}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{border-right:1px solid #fff!important}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover{border-right:none!important}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover,:host button[theme][theme~=split-primary-last],:host button[theme][theme~=split-primary-last]:hover{min-width:unset;border-bottom-left-radius:0;border-top-left-radius:0;padding-left:8px;padding-right:10px}:host button[theme][theme~=split-secondary-last][icon=true],:host button[theme][theme~=split-secondary-last]:hover[icon=true],:host button[theme][theme~=split-primary-last][icon=true],:host button[theme][theme~=split-primary-last]:hover[icon=true]{padding-left:2px;padding-right:6px}:host button[theme][theme~=split-secondary-last] .dr,:host button[theme][theme~=split-secondary-last]:hover .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=split-primary-last]:hover .dr{margin:0}:host button[theme][theme~=split-primary-last],:host button[theme][theme~=split-primary-last]:hover{border-left:none}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover{margin-left:-1px}:host button[theme][theme~=danger]{background:#BF1D30;color:#fff;border:none;min-width:90px}:host button[theme][theme~=danger]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#740e1a 0%,#BF1D30 100%);box-shadow:0 4px 14px #0000001a;border-radius:16px;border:none}:host button[theme][theme~=danger]:active{background:#740e1a}:host button[theme][theme~=danger][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=danger][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=ghost]{background:none;border:none;color:#151b3f;padding:4px 8px}:host button[theme][theme~=ghost] .dr{margin-left:4.5px;margin-right:12.5px}:host button[theme][theme~=ghost]:hover:not([disabled]){color:#4646ce;background:#F2F2FB;border-radius:4px}:host button[theme][theme~=ghost][disabled]{color:#727583;cursor:default;pointer-events:none}:host button[theme][theme~=text-link]{background:none;border:none;color:#0b5af9}:host button[theme][theme~=text-link][disabled]{color:#727583;pointer-events:none}:host button[theme][theme~=primary-icon]{padding:8px;width:28px;height:28px;justify-content:center;color:#fff;background:#4646CE;border:none}:host button[theme][theme~=primary-icon]:hover,:host button[theme][theme~=primary-icon]:active{background:linear-gradient(96.89deg,#131318 0%,#4646CE 100%)}:host button[theme][theme~=primary-icon][disabled]{color:#bcbcbc;background:#E5E6EA;cursor:default;pointer-events:none}:host button[theme][theme~=primary-icon] .dr{margin:0}:host button[theme][theme~=secondary-icon]{background:white;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:1px solid #7F7FDD}:host button[theme][theme~=secondary-icon]:hover,:host button[theme][theme~=secondary-icon]:active{color:#4646ce;background:#F2F2FB}:host button[theme][theme~=secondary-icon][disabled]{color:#bcbcbc;background:#E5E6EA;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=secondary-icon] .dr{margin:0}:host button[theme][theme~=icon]{background:none;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:none}:host button[theme][theme~=icon]:hover,:host button[theme][theme~=icon]:active{background:#F0F3FC;color:#4646ce}:host button[theme][theme~=icon][disabled]{color:#bcbcbc;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=icon][disabled]:hover,:host button[theme][theme~=icon][disabled]:active{background:none}:host button[theme][theme~=icon] .dr{margin:0}:host button[theme][theme~=dropdown]{padding:0 8px;background:#FFFFFF;border-radius:6px;border:1px solid #C3C4CE;min-width:unset;box-shadow:none}:host button[theme][theme~=dropdown]:hover{border-color:#85889c}:host button[theme][theme~=dropdown]:active{border-color:#4646ce}:host button[theme][theme~=dropdown] i:first-child{margin-right:3px}:host button[theme][theme~=dropdown] i:last-child{margin-left:3px}:host button[theme][bold=true]{font-weight:600}:host button[theme][icon=true]{padding-left:8px}:host button[theme][icon=false]{justify-content:center}\n"]
|
|
2243
2274
|
},] }
|
|
2244
2275
|
];
|
|
2245
|
-
DrButtonComponent.ctorParameters = function () { return []; };
|
|
2246
2276
|
DrButtonComponent.propDecorators = {
|
|
2247
2277
|
title: [{ type: i0.Input }],
|
|
2248
2278
|
theme: [{ type: i0.Input }],
|
|
@@ -2250,8 +2280,7 @@
|
|
|
2250
2280
|
icon: [{ type: i0.Input }],
|
|
2251
2281
|
isBold: [{ type: i0.Input }],
|
|
2252
2282
|
isLoading: [{ type: i0.Input }],
|
|
2253
|
-
iconColor: [{ type: i0.Input }]
|
|
2254
|
-
click: [{ type: i0.Output }]
|
|
2283
|
+
iconColor: [{ type: i0.Input }]
|
|
2255
2284
|
};
|
|
2256
2285
|
// Examples:
|
|
2257
2286
|
/*
|