@seniorsistemas/angular-components 16.9.3 → 16.10.0

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 (28) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +87 -0
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/split-button/index.d.ts +4 -0
  6. package/components/split-button/models/split-button-option.d.ts +4 -0
  7. package/components/split-button/models/split-button-type.d.ts +5 -0
  8. package/components/split-button/split-button.component.d.ts +19 -0
  9. package/components/split-button/split-button.module.d.ts +2 -0
  10. package/esm2015/components/split-button/index.js +4 -0
  11. package/esm2015/components/split-button/models/split-button-option.js +1 -0
  12. package/esm2015/components/split-button/models/split-button-type.js +7 -0
  13. package/esm2015/components/split-button/split-button.component.js +68 -0
  14. package/esm2015/components/split-button/split-button.module.js +15 -0
  15. package/esm2015/public-api.js +2 -1
  16. package/esm5/components/split-button/index.js +4 -0
  17. package/esm5/components/split-button/models/split-button-option.js +1 -0
  18. package/esm5/components/split-button/models/split-button-type.js +7 -0
  19. package/esm5/components/split-button/split-button.component.js +69 -0
  20. package/esm5/components/split-button/split-button.module.js +18 -0
  21. package/esm5/public-api.js +2 -1
  22. package/fesm2015/seniorsistemas-angular-components.js +82 -1
  23. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  24. package/fesm5/seniorsistemas-angular-components.js +86 -1
  25. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  26. package/package.json +1 -1
  27. package/public-api.d.ts +1 -0
  28. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -12010,6 +12010,91 @@
12010
12010
  ProgressBarColors["Yellow"] = "yellow";
12011
12011
  })(exports.ProgressBarColors || (exports.ProgressBarColors = {}));
12012
12012
 
12013
+
12014
+ (function (SplitButtonType) {
12015
+ SplitButtonType["Primary"] = "primary";
12016
+ SplitButtonType["Secondary"] = "secondary";
12017
+ SplitButtonType["Default"] = "default";
12018
+ })(exports.SplitButtonType || (exports.SplitButtonType = {}));
12019
+
12020
+ var SplitButtonComponent = /** @class */ (function () {
12021
+ function SplitButtonComponent(eRef) {
12022
+ this.eRef = eRef;
12023
+ this.disabled = false;
12024
+ this.type = exports.SplitButtonType.Primary;
12025
+ this.buttonClicked = new core.EventEmitter();
12026
+ this.open = false;
12027
+ }
12028
+ SplitButtonComponent.prototype.onClickout = function (event) {
12029
+ if (!this.eRef.nativeElement.contains(event.target)) {
12030
+ this.closeDropdown();
12031
+ }
12032
+ };
12033
+ SplitButtonComponent.prototype.onButtonClick = function () {
12034
+ if (!this.disabled) {
12035
+ this.buttonClicked.emit();
12036
+ this.closeDropdown();
12037
+ }
12038
+ };
12039
+ SplitButtonComponent.prototype.onDropdownClick = function () {
12040
+ if (!this.disabled) {
12041
+ this.open = !this.open;
12042
+ }
12043
+ };
12044
+ SplitButtonComponent.prototype.onOptionClick = function (option) {
12045
+ option.action && option.action();
12046
+ this.closeDropdown();
12047
+ };
12048
+ SplitButtonComponent.prototype.closeDropdown = function () {
12049
+ this.open = false;
12050
+ };
12051
+ SplitButtonComponent.ctorParameters = function () { return [
12052
+ { type: core.ElementRef }
12053
+ ]; };
12054
+ __decorate([
12055
+ core.Input()
12056
+ ], SplitButtonComponent.prototype, "disabled", void 0);
12057
+ __decorate([
12058
+ core.Input()
12059
+ ], SplitButtonComponent.prototype, "iconClass", void 0);
12060
+ __decorate([
12061
+ core.Input()
12062
+ ], SplitButtonComponent.prototype, "label", void 0);
12063
+ __decorate([
12064
+ core.Input()
12065
+ ], SplitButtonComponent.prototype, "type", void 0);
12066
+ __decorate([
12067
+ core.Input()
12068
+ ], SplitButtonComponent.prototype, "options", void 0);
12069
+ __decorate([
12070
+ core.Output()
12071
+ ], SplitButtonComponent.prototype, "buttonClicked", void 0);
12072
+ __decorate([
12073
+ core.HostListener("document:click", ["$event"])
12074
+ ], SplitButtonComponent.prototype, "onClickout", null);
12075
+ SplitButtonComponent = __decorate([
12076
+ core.Component({
12077
+ selector: "s-split-button",
12078
+ template: "<div class=\"split-button\" [ngClass]=\"{\n 'split-button--primary': type == 'primary',\n 'split-button--secondary': type == 'secondary',\n 'split-button--default': type == 'default',\n 'split-button--disabled': disabled\n }\">\n <button class=\"button\" (click)=\"onButtonClick()\">\n <span class=\"button__icon\" [ngClass]=\"iconClass\"></span>\n <span class=\"button__label\">{{ label }}</span>\n </button>\n <button class=\"dropdown\" (click)=\"onDropdownClick()\">\n <span class=\"dropdown__icon\" [ngClass]=\"{\n 'far': true,\n 'fa-chevron-down': !open,\n 'fa-chevron-up': open\n }\">\n </span>\n </button>\n</div>\n\n<ul *ngIf=\"this.open\" class=\"options\">\n <li *ngFor=\"let option of options\" (click)=\"onOptionClick(option)\">\n {{ option.title }}\n </li>\n</ul>",
12079
+ styles: [".split-button{display:-ms-flexbox;display:flex;-webkit-user-select:none;-ms-user-select:none;user-select:none}.split-button .button{-ms-flex-align:center;align-items:center;border:none;border-radius:4px 0 0 4px;display:-ms-flexbox;display:flex;padding:8px 8px 8px 12px;transition:.3s ease-in-out}.split-button .button__icon{font-size:16px;padding:0 4px}.split-button .button__title{font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;line-height:21px}.split-button .dropdown{-ms-flex-align:center;align-items:center;border:none;border-left:1px solid #608190;border-radius:0 4px 4px 0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:12px 8px;transition:.3s ease-in-out}.split-button--disabled{opacity:.5}.split-button--primary .button,.split-button--primary .dropdown{background-color:#428bca;color:#fff}.split-button--primary:not(.split-button--primary--disabled) .button,.split-button--primary:not(.split-button--primary--disabled) .dropdown{cursor:pointer}.split-button--primary:not(.split-button--primary--disabled) .button:hover,.split-button--primary:not(.split-button--primary--disabled) .dropdown:hover{background-color:#063951}.split-button--secondary .button,.split-button--secondary .dropdown{background-color:#7892a1;color:#fff}.split-button--secondary:not(.split-button--secondary--disabled) .button,.split-button--secondary:not(.split-button--secondary--disabled) .dropdown{cursor:pointer}.split-button--secondary:not(.split-button--secondary--disabled) .button:hover,.split-button--secondary:not(.split-button--secondary--disabled) .dropdown:hover{background-color:#697882}.split-button--default .button,.split-button--default .dropdown{background-color:unset;border:1px solid #d8d8d8;color:#333}.split-button--default:not(.split-button--default--disabled) .button,.split-button--default:not(.split-button--default--disabled) .dropdown{cursor:pointer}.split-button--default:not(.split-button--default--disabled) .button:hover,.split-button--default:not(.split-button--default--disabled) .dropdown:hover{background-color:#d8d8d8}.options{background-color:#fff;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.25);display:inline-block;list-style:none;margin:2px 0;padding:8px 0;position:absolute;-webkit-user-select:none;-ms-user-select:none;user-select:none}.options li{color:#333;cursor:pointer;font-family:\"Open Sans\",sans-serif;font-weight:400;font-size:14px;line-height:21px;padding:8px 16px}.options li:hover{background-color:#d8d8d8}"]
12080
+ })
12081
+ ], SplitButtonComponent);
12082
+ return SplitButtonComponent;
12083
+ }());
12084
+
12085
+ var SplitButtonModule = /** @class */ (function () {
12086
+ function SplitButtonModule() {
12087
+ }
12088
+ SplitButtonModule = __decorate([
12089
+ core.NgModule({
12090
+ imports: [common.CommonModule],
12091
+ declarations: [SplitButtonComponent],
12092
+ exports: [SplitButtonComponent],
12093
+ })
12094
+ ], SplitButtonModule);
12095
+ return SplitButtonModule;
12096
+ }());
12097
+
12013
12098
  var PanelComponent = /** @class */ (function () {
12014
12099
  function PanelComponent() {
12015
12100
  this.toggleable = true;
@@ -12412,6 +12497,8 @@
12412
12497
  exports.SelectOption = SelectOption;
12413
12498
  exports.SidebarComponent = SidebarComponent;
12414
12499
  exports.SidebarModule = SidebarModule;
12500
+ exports.SplitButtonComponent = SplitButtonComponent;
12501
+ exports.SplitButtonModule = SplitButtonModule;
12415
12502
  exports.StatsCardComponent = StatsCardComponent;
12416
12503
  exports.StatsCardModule = StatsCardModule;
12417
12504
  exports.StepsComponent = StepsComponent;