ecabs-components 1.1.83 → 1.1.85

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.
@@ -1 +1,3 @@
1
1
  export declare type ButtonStyle = 'basic' | 'raised' | 'flat' | 'stroked' | undefined;
2
+ export declare type ButtonLoadingStyle = 'spinner-only' | 'spinner-label';
3
+ export declare type ButtonSize = 'small' | 'medium' | 'large';
@@ -1,24 +1,23 @@
1
- import { OnChanges, SimpleChanges } from '@angular/core';
2
1
  import { ThemePalette } from '@angular/material/core';
3
- import { ButtonStyle } from '../base/consts/buttons.consts';
2
+ import { ButtonLoadingStyle, ButtonSize, ButtonStyle } from '../base/consts/buttons.consts';
4
3
  import * as i0 from "@angular/core";
5
- export type ButtonSize = 'small' | 'medium' | 'large';
6
- export declare class ButtonsV2Component implements OnChanges {
4
+ export declare class ButtonsV2Component {
7
5
  disabled: boolean;
8
6
  loading: boolean;
7
+ loadingStyle: ButtonLoadingStyle;
9
8
  size: ButtonSize;
10
9
  type: 'button' | 'submit';
11
10
  style: ButtonStyle;
12
11
  color: ThemePalette | 'success' | null;
13
12
  fullWidth: boolean;
14
- hostWidth: string;
15
- classAttr: string;
16
- ngOnChanges(changes: SimpleChanges): void;
17
- private updateHostWidth;
13
+ get isDisabled(): boolean;
14
+ get hostWidth(): string;
18
15
  get sizeClass(): string;
16
+ get matColor(): ThemePalette;
17
+ get showLabel(): boolean;
19
18
  get buttonClasses(): {
20
19
  [key: string]: boolean;
21
20
  };
22
21
  static ɵfac: i0.ɵɵFactoryDeclaration<ButtonsV2Component, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<ButtonsV2Component, "ecabs-buttons-v2", never, { "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "size": { "alias": "size"; "required": false; }; "type": { "alias": "type"; "required": false; }; "style": { "alias": "style"; "required": false; }; "color": { "alias": "color"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; }, {}, never, ["mat-icon", "*"], false, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonsV2Component, "ecabs-buttons-v2", never, { "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "loadingStyle": { "alias": "loadingStyle"; "required": false; }; "size": { "alias": "size"; "required": false; }; "type": { "alias": "type"; "required": false; }; "style": { "alias": "style"; "required": false; }; "color": { "alias": "color"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; }, {}, never, ["mat-icon", "*"], false, never>;
24
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecabs-components",
3
- "version": "1.1.83",
3
+ "version": "1.1.85",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^16.2.12",
6
6
  "@angular/common": "^16.2.12",
@@ -1,134 +1,155 @@
1
- button,
2
- a {
3
- &.mdc-button {
4
- @extend .btn;
5
-
6
- &.btn__group--item,
7
- &.btn {
8
- @extend .btn__group--item;
9
- }
10
-
11
- .mat-icon {
12
- color: inherit;
13
- }
14
- }
15
-
16
- /**
17
- * #Basic
18
- */
19
- &.mdc-button.mat-mdc-button {
20
- @extend .btn--basic;
21
- }
22
-
23
- &.mdc-button--outlined {
24
- @extend .btn--basic--outline;
25
-
26
- border: 0;
27
- }
28
-
29
- &.mdc-button.mat-mdc-button {
30
- @extend .btn--basic--link;
31
- }
32
-
33
- &.mdc-button.mat-mdc-button:disabled {
34
- @extend .btn__disabled--outline;
35
-
36
- &:after {
37
- border: 0;
38
- }
39
- }
40
-
41
- /**
42
- * #Primary
43
- */
44
- &.mdc-button.mat-primary {
45
- @extend .btn--primary;
46
- }
47
-
48
- &.mdc-button--outlined.mat-primary {
49
- @extend .btn--primary--outline;
50
-
51
- border: 0;
52
- }
53
-
54
- &.mat-mdc-button.mat-primary {
55
- @extend .btn--primary--link;
56
- }
57
-
58
- /**
59
- * #Secondary
60
- */
61
-
62
- &.mdc-button.mat-accent {
63
- @extend .btn--secondary;
64
- }
65
-
66
- &.mdc-button--outlined.mat-accent {
67
- @extend .btn--secondary--outline;
68
-
69
- border: 0;
70
- }
71
-
72
- &.mat-mdc-button.mat-accent {
73
- @extend .btn--secondary--link;
74
- }
75
-
76
- /**
77
- * #Warn
78
- */
79
-
80
- &.mdc-button.mat-warn {
81
- @extend .btn--warn;
82
- }
83
-
84
- &.mdc-button--outlined.mat-warn {
85
- @extend .btn--warn--outline;
86
-
87
- border: 0;
88
- }
89
-
90
- &.mat-mdc-button.mat-warn {
91
- @extend .btn--warn--link;
92
- }
93
-
94
- /**
95
- * #Success
96
- */
97
-
98
- &.mdc-button.mat-success {
99
- @extend .btn--success;
100
- }
101
-
102
- &.mdc-button--outlined.mat-success {
103
- @extend .btn--success--outline;
104
-
105
- border: 0;
106
- }
107
-
108
- &.mat-mdc-button.mat-success {
109
- @extend .btn--success--link;
110
- }
111
-
112
- &.mat-mdc-unelevated-button:disabled {
113
- @extend .btn__disabled;
114
- }
115
-
116
- &.mat-mdc-outlined-button:disabled {
117
- @extend .btn__disabled--outline;
118
- }
119
-
120
- .mdc-button__label {
121
- @extend .btn__with-icon--wrapper;
122
- }
123
-
124
- &.mat-mdc-icon-button {
125
- min-width: auto;
126
- line-height: 1;
127
- }
128
- }
129
-
130
- // ::TODO Will be fixed in upgrade to >17.2.2
131
- .mat-mdc-unelevated-button.mat-primary,
132
- .mat-mdc-raised-button.mat-primary {
133
- --mdc-filled-button-label-text-color: var(--color-white) !important;
134
- }
1
+ button,
2
+ a {
3
+ &.mdc-button {
4
+ @extend .btn;
5
+
6
+ &.btn__group--item,
7
+ &.btn {
8
+ @extend .btn__group--item;
9
+ }
10
+
11
+ .mat-icon {
12
+ color: inherit;
13
+ }
14
+ }
15
+
16
+ /**
17
+ * #Basic
18
+ */
19
+ &.mdc-button.mat-mdc-button {
20
+ @extend .btn--basic;
21
+ }
22
+
23
+ &.mdc-button--outlined {
24
+ @extend .btn--basic--outline;
25
+
26
+ border: 0;
27
+ }
28
+
29
+ &.mdc-button.mat-mdc-button {
30
+ @extend .btn--basic--link;
31
+ }
32
+
33
+ &.mdc-button.mat-mdc-button:disabled:not(.loading) {
34
+ @extend .btn__disabled--outline;
35
+
36
+ &:after {
37
+ border: 0;
38
+ }
39
+ }
40
+
41
+ /**
42
+ * #Primary
43
+ */
44
+ &.mdc-button.mat-primary {
45
+ @extend .btn--primary;
46
+ }
47
+
48
+ &.mdc-button--outlined.mat-primary {
49
+ @extend .btn--primary--outline;
50
+
51
+ border: 0;
52
+ }
53
+
54
+ &.mat-mdc-button.mat-primary {
55
+ @extend .btn--primary--link;
56
+ }
57
+
58
+ /**
59
+ * #Secondary
60
+ */
61
+
62
+ &.mdc-button.mat-accent {
63
+ @extend .btn--secondary;
64
+ }
65
+
66
+ &.mdc-button--outlined.mat-accent {
67
+ @extend .btn--secondary--outline;
68
+
69
+ border: 0;
70
+ }
71
+
72
+ &.mat-mdc-button.mat-accent {
73
+ @extend .btn--secondary--link;
74
+ }
75
+
76
+ /**
77
+ * #Warn
78
+ */
79
+
80
+ &.mdc-button.mat-warn {
81
+ @extend .btn--warn;
82
+ }
83
+
84
+ &.mdc-button--outlined.mat-warn {
85
+ @extend .btn--warn--outline;
86
+
87
+ border: 0;
88
+ }
89
+
90
+ &.mat-mdc-button.mat-warn {
91
+ @extend .btn--warn--link;
92
+ }
93
+
94
+ /**
95
+ * #Success
96
+ */
97
+
98
+ &.mdc-button.mat-success {
99
+ @extend .btn--success;
100
+ }
101
+
102
+ &.mdc-button--outlined.mat-success {
103
+ @extend .btn--success--outline;
104
+
105
+ border: 0;
106
+ }
107
+
108
+ &.mat-mdc-button.mat-success {
109
+ @extend .btn--success--link;
110
+ }
111
+
112
+ &.mat-mdc-unelevated-button:disabled:not(.loading) {
113
+ @extend .btn__disabled;
114
+ }
115
+
116
+ &.mat-mdc-outlined-button:disabled:not(.loading) {
117
+ @extend .btn__disabled--outline;
118
+ }
119
+
120
+ &.mat-mdc-button,
121
+ &.mat-mdc-outlined-button,
122
+ &.mat-mdc-unelevated-button,
123
+ &.mat-mdc-raised-button {
124
+ &.ecabs-button-v2--small {
125
+ @extend .btn--small;
126
+ }
127
+
128
+ &.ecabs-button-v2--medium {
129
+ @extend .btn--medium;
130
+ }
131
+
132
+ &.ecabs-button-v2--large {
133
+ @extend .btn--large;
134
+ }
135
+ }
136
+
137
+ .mdc-button__label {
138
+ @extend .btn__with-icon--wrapper;
139
+ }
140
+
141
+ ecabs-loading-spinner {
142
+ --ecabs-spinner-color: currentColor;
143
+ }
144
+
145
+ &.mat-mdc-icon-button {
146
+ min-width: auto;
147
+ line-height: 1;
148
+ }
149
+ }
150
+
151
+ // ::TODO Will be fixed in upgrade to >17.2.2
152
+ .mat-mdc-unelevated-button.mat-primary,
153
+ .mat-mdc-raised-button.mat-primary {
154
+ --mdc-filled-button-label-text-color: var(--color-white) !important;
155
+ }