@softheon/armature 19.12.0 → 19.13.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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../fesm2022/softheon-armature-ag-grid-components.mjs"
3
+ }
@@ -1,4 +1,7 @@
1
- @use "./variables" as vars;
1
+ /*
2
+ ⚠️ NOTE: do not reference these variables, for internal use only ( do use './_variables.scss' )
3
+ * try not to add anything to this file ...
4
+ */
2
5
 
3
6
  // Fonts - B2C
4
7
  $sof-b2c-font-family-heading: 'Poppins', sans-serif;
@@ -2,35 +2,15 @@
2
2
  @use "./arm-theme" as theme;
3
3
  @use "./variables" as vars;
4
4
 
5
- body {
6
- font-family: var(--sftn-font-family-body, sans-serif) !important;
7
- letter-spacing: 0px !important;
8
- font-size: var(--sftn-base-font-size);
9
- margin: 0 !important;
10
- }
11
-
12
5
  /*
13
- disable ripple effects globally
14
- @note: this may not work in all cases due to scope ...
6
+ Heading Styles
7
+ * please use semantic html, styles will be applied per tag ex: <h1>
15
8
  */
16
- .mat-ripple {
17
- display: none !important;
18
- }
19
-
20
- /* @deprecated */
21
- .merriweather {
22
- font-family: var(--sftn-font-family-heading, sans-serif) !important;
23
- }
24
-
25
- .poppins {
26
- font-family: var(--sftn-font-family, sans-serif) !important;
27
- }
28
-
29
9
  .h1, [h1], h1,
30
10
  .h2, [h2], h2,
31
11
  .h3, [h3], h3,
32
12
  .h4, [h4], h4 {
33
- font-family: var(--sftn-font-family, sans-serif);
13
+ font-family: var(--sftn-font-family, sans-serif); // Consumer = 'Poppins'
34
14
  font-style: normal;
35
15
  font-weight: normal;
36
16
  letter-spacing: 0px;
@@ -59,149 +39,213 @@ body {
59
39
  font-size: 18px;
60
40
  }
61
41
 
62
-
42
+ /*
43
+ Text Body/Emphasis
44
+ */
45
+ [body1], [body2], [body3],
63
46
  .body1, .body2, .body3 {
64
- font-family: var(--sftn-font-family-body, sans-serif);
47
+ font-family: var(--sftn-font-family-body, sans-serif); // Consumer = 'Poppins'
65
48
  font-style: normal;
66
49
  font-weight: normal;
67
50
  letter-spacing: 0px;
68
51
  line-height: 150%;
69
52
  }
70
53
 
54
+ /* Body/Emphasis 1 */
55
+ [body1],
71
56
  .body1 {
72
- font-size: var(--sftn-base-font-size-body-1);
57
+ font-size: var(--sftn-base-font-size-body-1); // Consumer = 16px
73
58
  }
74
59
 
60
+ [body2],
61
+ /* Body/Emphasis 2 */
75
62
  .body2 {
76
- font-size: var(--sftn-base-font-size-body-2);
63
+ font-size: var(--sftn-base-font-size-body-2); // Consumer = 14px
77
64
  }
78
65
 
66
+ /* Body/Emphasis 3 */
67
+ [body3],
79
68
  .body3 {
80
69
  font-size: 12px;
81
70
  }
82
71
 
72
+ /*
73
+ Text Body/Emphasis for mat-form-field's
74
+ */
83
75
  mat-form-field {
76
+ &[body1], &[body2], &[body3],
84
77
  &.body1, &.body2, &.body3 {
85
- font-family: var(--sftn-font-family-body, sans-serif) !important;
86
- font-style: normal;
87
- font-weight: normal;
88
- letter-spacing: 0px;
89
- line-height: 150%;
78
+ font-family: var(--sftn-font-family-body, sans-serif) !important; // Consumer = 'Poppins'
79
+ font-style: normal !important;
80
+ font-weight: normal !important;
81
+ letter-spacing: 0px !important;
82
+ line-height: 150% !important;
90
83
  }
91
84
 
85
+ /* Body/Emphasis 1 */
86
+ &[body1],
92
87
  &.body1 {
93
- font-size: var(--sftn-base-font-size-body-1);
88
+ font-size: var(--sftn-base-font-size-body-1) !important; // Consumer = 16px
94
89
  }
95
90
 
91
+ /* Body/Emphasis 2 */
92
+ &[body2],
96
93
  &.body2 {
97
- font-size: var(--sftn-base-font-size-body-2);
94
+ font-size: var(--sftn-base-font-size-body-2) !important; // Consumer = 14px
98
95
  }
99
96
 
97
+ /* Body/Emphasis 3 */
98
+ &[body3],
100
99
  &.body3 {
101
- font-size: 12px;
100
+ font-size: 12px !important;
102
101
  }
103
102
  }
104
103
 
105
- fieldset {
106
- border: none;
107
- padding: 0px;
108
- margin: 0px;
109
-
110
- legend {
111
- padding: 0;
112
- }
113
- }
114
-
115
- .ls-half {
116
- letter-spacing: 0.5px !important;
117
- }
118
-
119
- .ls-quarter {
120
- letter-spacing: 0.25px !important;
121
- }
104
+ /* Font Weight's */
122
105
 
106
+ [fw-400],
123
107
  .fw-400 {
124
108
  font-weight: 400 !important;
125
109
  }
126
110
 
111
+ [fw-500],
127
112
  .fw-500 {
128
113
  font-weight: 500 !important;
129
114
  }
130
115
 
116
+ [fw-600],
131
117
  .fw-600 {
132
118
  font-weight: 600 !important;
133
119
  }
134
120
 
121
+ /* Text Color's */
122
+
123
+ [text-high-emphasis],
124
+ .text-high-emphasis {
125
+ color: vars.$text-high-emphasis;
126
+ }
127
+
128
+ [text-medium-emphasis],
129
+ .text-medium-emphasis {
130
+ color: vars.$text-medium-emphasis;
131
+ }
132
+
133
+ [text-low-emphasis],
134
+ .text-low-emphasis {
135
+ color: vars.$text-low-emphasis;
136
+ }
137
+
138
+ [text-inverse],
139
+ .text-inverse {
140
+ color: vars.$text-inverse;
141
+ }
142
+
143
+ [color-primary],
135
144
  .color-primary {
136
145
  color: map.get(theme.$arm-primary, 500);
137
146
  }
138
147
 
148
+ [color-accent],
139
149
  .color-accent {
140
150
  color: map.get(theme.$arm-accent, 500);
141
151
  }
142
152
 
153
+ [color-warn],
143
154
  .color-warn {
144
155
  color: map.get(theme.$arm-warn, 500);
145
156
  }
146
157
 
158
+ [color-info],
147
159
  .color-info {
148
160
  color: map.get(theme.$arm-info, 500);
149
161
  }
150
162
 
163
+ [color-success],
151
164
  .color-success {
152
165
  color: map.get(theme.$arm-success, 500);
153
166
  }
154
167
 
168
+ [color-error],
155
169
  .color-error {
156
170
  color: map.get(theme.$arm-error, 500);
157
171
  }
158
172
 
173
+ [color-neutral],
159
174
  .color-neutral {
160
175
  color: map.get(theme.$arm-neutral, 500);
161
176
  }
162
177
 
163
- .left-align {
164
- text-align: left;
178
+ /* Text Alignment's */
179
+
180
+ [text-left],
181
+ .text-left {
182
+ text-align: left !important;
165
183
  }
166
184
 
167
- .center-align {
168
- text-align: center;
185
+ [text-center],
186
+ .text-center {
187
+ text-align: center !important;
169
188
  }
170
189
 
171
- .text-left,
172
- [text-left] {
173
- text-align: left !important;
190
+ /* Text Overflow Ellipsis ... */
191
+
192
+ [text-overflow-ellipsis],
193
+ .text-overflow-ellipsis {
194
+ width: 100%;
195
+ overflow: hidden;
196
+ white-space: nowrap;
197
+ text-overflow: ellipsis;
174
198
  }
175
199
 
176
- .text-center,
177
- [text-center] {
178
- text-align: center !important;
200
+
201
+ /* __OVERRIDES__ */
202
+
203
+ /* <body> override */
204
+ body {
205
+ font-family: var(--sftn-font-family-body, sans-serif) !important; // Consumer = 'Poppins'
206
+ letter-spacing: 0px !important;
207
+ font-size: var(--sftn-base-font-size); // Consumer = 16px
208
+ margin: 0 !important;
179
209
  }
180
210
 
181
- [text-high-emphasis],
182
- .text-high-emphasis {
183
- color: vars.$text-high-emphasis;
211
+ /*
212
+ disable ripple effects globally
213
+ @note: this may not work in all cases due to scope ...
214
+ */
215
+ .mat-ripple {
216
+ display: none !important;
184
217
  }
185
218
 
186
- [text-medium-emphasis],
187
- .text-medium-emphasis {
188
- color: vars.$text-medium-emphasis;
219
+ /* font-family for Consumer apps = 'Poppins' */
220
+ .poppins {
221
+ font-family: var(--sftn-font-family, sans-serif) !important; // Consumer = 'Poppins'
189
222
  }
190
223
 
191
- [text-low-emphasis],
192
- .text-low-emphasis {
193
- color: vars.$text-low-emphasis;
224
+ /* <fieldset> override */
225
+ fieldset {
226
+ border: none;
227
+ padding: 0px;
228
+ margin: 0px;
229
+
230
+ legend {
231
+ padding: 0;
232
+ }
194
233
  }
195
234
 
196
- [text-inverse],
197
- .text-inverse {
198
- color: vars.$text-inverse;
235
+
236
+ /* __DEPRECATED__ */
237
+
238
+ /* @deprecated */
239
+ .merriweather {
240
+ font-family: var(--sftn-font-family-heading, sans-serif) !important;
199
241
  }
200
242
 
201
- .text-overflow-ellipsis,
202
- [text-overflow-ellipsis] {
203
- width: 100%;
204
- overflow: hidden;
205
- white-space: nowrap;
206
- text-overflow: ellipsis;
207
- }
243
+ /* @deprecated */
244
+ .ls-half {
245
+ letter-spacing: 0.5px !important;
246
+ }
247
+
248
+ /* @deprecated */
249
+ .ls-quarter {
250
+ letter-spacing: 0.25px !important;
251
+ }
@@ -1,6 +1,6 @@
1
1
  @use "sass:map";
2
- @use "../arm-theme" as theme;
3
2
  @use "../variables" as vars;
3
+ @use "../mixins/button-theme-emphasis-mixin" as button-mixin;
4
4
 
5
5
  // Base 'sof-button-v2'
6
6
  .sof-button-v2 {
@@ -51,7 +51,7 @@
51
51
  }
52
52
  }
53
53
 
54
- // Base 'sof-button-icon-v2'
54
+ // Base 'sof-button-icon-v2' (icon only button)
55
55
  .sof-button-icon-v2 {
56
56
  border-radius: 8px !important;
57
57
  height: 40px !important;
@@ -72,169 +72,18 @@
72
72
  }
73
73
 
74
74
  /**
75
- Button v2 variations -
75
+ Button v2 variations - (see mixin)
76
76
  3 [theme] ( 'primary', 'neutral', 'destroy' )
77
77
  Each [theme] has 4 [emphasis] ( 'solid', 'secondary', 'floating', 'contained' )
78
78
  Each [emphasis] has 4 states ( 'hover', 'pressed', 'disabled', 'focus )
79
79
  */
80
80
  .sof-button-v2,
81
81
  .sof-button-icon-v2 {
82
- // solid
83
- &[emphasis="solid"] {
84
- &[theme="primary"] {
85
- background: map.get(theme.$arm-primary, 500) !important;
86
- color: map.get(theme.$arm-primary, contrast, 500) !important;
87
- &:hover {
88
- background: map.get(theme.$arm-primary, 700) !important;
89
- }
90
- &:active {
91
- background: map.get(theme.$arm-primary, 800) !important;
92
- }
93
- }
94
- &[theme="neutral"] {
95
- background: map.get(theme.$arm-neutral, 500) !important;
96
- color: map.get(theme.$arm-neutral, contrast, 500) !important;
97
- &:hover {
98
- background: map.get(theme.$arm-neutral, 700) !important;
99
- }
100
- &:active {
101
- background: map.get(theme.$arm-neutral, 800) !important;
102
- }
103
- }
104
- &[theme="destroy"] {
105
- background: map.get(theme.$arm-error, 500) !important;
106
- color: map.get(theme.$arm-error, contrast, 500) !important;
107
- &:hover {
108
- background: map.get(theme.$arm-error, 700) !important;
109
- }
110
- &:active {
111
- background: map.get(theme.$arm-error, 800) !important;
112
- }
113
- }
114
- &[theme="primary"], &[theme="neutral"], &[theme="destroy"] {
115
- &:disabled {
116
- background: map.get(theme.$arm-neutral, A50) !important;
117
- color: vars.$text-low-emphasis !important;
118
- }
119
- }
120
- }
121
- // secondary
122
- &[emphasis="secondary"] {
123
- &[theme="primary"], &[theme="neutral"], &[theme="destroy"] {
124
- background: vars.$surface-color-level-one-light !important;
125
- &:hover {
126
- background: linear-gradient(
127
- 0deg,
128
- map.get(theme.$arm-neutral, A100) 0%,
129
- map.get(theme.$arm-neutral, A100) 100%
130
- ), vars.$surface-color-level-one-light !important;
131
- }
132
- &:active {
133
- background: linear-gradient(
134
- 0deg,
135
- map.get(theme.$arm-neutral, A200) 0%,
136
- map.get(theme.$arm-neutral, A200) 100%
137
- ), vars.$surface-color-level-one-light !important;
138
- }
139
- &:disabled {
140
- background: map.get(theme.$arm-neutral, A50) !important;
141
- color: vars.$text-low-emphasis !important;
142
- }
143
- }
144
- &[theme="primary"] {
145
- color: map.get(theme.$arm-primary, 500) !important;
146
- }
147
- &[theme="neutral"] {
148
- color: vars.$text-high-emphasis !important;
149
- }
150
- &[theme="destroy"] {
151
- color: map.get(theme.$arm-error, 500) !important;
152
- }
153
- }
154
- // floating, contained
155
- &[emphasis="floating"], &[emphasis="contained"] {
156
- &[theme="primary"], &[theme="neutral"], &[theme="destroy"] {
157
- background: transparent !important;
158
- }
159
- &[theme="primary"] {
160
- color: map.get(theme.$arm-primary, 500) !important;
161
- &:hover {
162
- background: map.get(theme.$arm-primary, A100) !important;
163
- }
164
- &:active {
165
- background: map.get(theme.$arm-primary, A200) !important;
166
- }
167
- }
168
- &[theme="neutral"] {
169
- color: vars.$text-high-emphasis !important;
170
- &:hover {
171
- background: map.get(theme.$arm-neutral, A100) !important;
172
- }
173
- &:active {
174
- background: map.get(theme.$arm-neutral, A200) !important;
175
- }
176
- }
177
- &[theme="destroy"] {
178
- color: map.get(theme.$arm-error, 500) !important;
179
- &:hover {
180
- background: map.get(theme.$arm-error, A100) !important;
181
- }
182
- &:active {
183
- background: map.get(theme.$arm-error, A200) !important;
184
- }
185
- }
186
- &[theme="primary"], &[theme="neutral"], &[theme="destroy"] {
187
- &:disabled {
188
- color: vars.$text-low-emphasis !important;
189
- }
190
- }
191
- }
192
- // contained
193
- &[emphasis="contained"] {
194
- &[theme="primary"], &[theme="neutral"], &[theme="destroy"] {
195
- box-sizing: border-box !important;
196
- border: 2px solid !important;
197
- }
198
- &[theme="primary"] {
199
- border-color: map.get(theme.$arm-primary, 500) !important;
200
- color: map.get(theme.$arm-primary, 500) !important;
201
- }
202
- &[theme="neutral"] {
203
- border-color: map.get(theme.$arm-neutral, 500) !important;
204
- color: vars.$text-high-emphasis !important;
205
- }
206
- &[theme="destroy"] {
207
- border-color: map.get(theme.$arm-error, 500) !important;
208
- color: map.get(theme.$arm-error, 500) !important;
209
- }
210
- &[theme="primary"], &[theme="neutral"], &[theme="destroy"] {
211
- &:disabled {
212
- border-color: vars.$text-low-emphasis !important;
213
- }
214
- }
215
- }
216
- // focus ring for all
217
- &[theme="primary"], &[theme="neutral"], &[theme="destroy"] {
218
- &:focus {
219
- outline: 3px solid map.get(theme.$arm-primary, A500) !important;
220
- outline-offset: 2px !important;
221
- }
222
- }
223
- &[theme="destroy"] {
224
- &:focus {
225
- outline-color: map.get(theme.$arm-error, A500) !important;
226
- }
227
- }
228
- // Remove mat-ripple effects
229
- span.mat-mdc-button-persistent-ripple {
230
- display: none !important;
231
- }
232
- span.mat-mdc-button-ripple {
233
- display: none !important;
234
- }
82
+ @include button-mixin.button-theme-emphasis-variations;
235
83
  }
236
84
 
237
85
  // Mat Notification badge
238
- button .mat-badge-content {
86
+ .mat-badge-content {
239
87
  background: vars.$surface-color-inverse-light !important;
88
+ background-color: vars.$surface-color-inverse-light !important;
240
89
  }
@@ -2,45 +2,73 @@
2
2
  @use "../arm-theme" as theme;
3
3
  @use "../variables" as vars;
4
4
 
5
- ::ng-deep .mat-mdc-menu-panel {
6
- background-color: vars.$surface-color-level-one-light !important;
7
- box-shadow: 0px 4px 8px 0px map.get(theme.$arm-neutral, A300) !important;
8
- border-radius: 8px !important;
9
- max-width: unset !important;
10
- }
11
-
12
- ::ng-deep .mat-mdc-menu-ripple {
13
- display: none !important;
14
- }
5
+ /**
6
+ NOTE: due to the Angular Material menu's component scope,
7
+ we need to '@use' this file directly in the component or page using it,
8
+ * using in a global file like the main 'styles.scss' will not take effect.
9
+ */
15
10
 
16
- ::ng-deep .mat-mdc-menu-item {
17
- .mat-mdc-menu-item-text {
18
- font-weight: 500 !important;
19
- color: vars.$text-high-emphasis !important;
20
- font-family: var(--sftn-font-family, sans-serif) !important;
21
- display: flex !important;
22
- align-items: center !important;
23
- letter-spacing: 0px !important;
24
- white-space: nowrap !important;
11
+ ::ng-deep {
12
+ .mat-mdc-menu-panel {
13
+ background-color: vars.$surface-color-level-one-light !important;
14
+ box-shadow: 0px 4px 8px 0px map.get(theme.$arm-neutral, A300) !important;
15
+ border-radius: 8px !important;
16
+ max-width: unset !important;
17
+ }
25
18
 
26
- i {
27
- margin-right: 8px !important;
28
- }
19
+ .mat-mdc-menu-ripple {
20
+ display: none !important;
29
21
  }
30
22
 
31
- &.delete {
23
+ .mat-mdc-menu-item {
32
24
  .mat-mdc-menu-item-text {
33
- color: map.get(theme.$arm-error, 500) !important;
25
+ font-weight: 500 !important;
26
+ color: vars.$text-high-emphasis !important;
27
+ font-family: var(--sftn-font-family, sans-serif) !important;
28
+ display: flex !important;
29
+ align-items: center !important;
30
+ letter-spacing: 0px !important;
31
+ white-space: nowrap !important;
34
32
 
35
33
  i {
34
+ margin-right: 8px !important;
35
+ }
36
+ }
37
+
38
+ &.delete {
39
+ .mat-mdc-menu-item-text {
36
40
  color: map.get(theme.$arm-error, 500) !important;
41
+
42
+ i {
43
+ color: map.get(theme.$arm-error, 500) !important;
44
+ }
37
45
  }
38
46
  }
39
47
  }
48
+
49
+ .mat-mdc-menu-content {
50
+ white-space: nowrap !important;
51
+ padding: 0 !important;
52
+ }
53
+
54
+ .mat-mdc-menu-item:not([disabled]):hover {
55
+ background-color: map.get(theme.$arm-neutral, A50) !important;
56
+ }
57
+
58
+ .mat-mdc-menu-item:not([disabled]):focus {
59
+ background-color: map.get(theme.$arm-neutral, A50) !important;
60
+ }
40
61
  }
41
62
 
63
+ .menu-title {
64
+ height: 20px;
65
+ padding: 12px 16px;
66
+ display: flex;
67
+ align-items: center;
68
+ }
42
69
 
43
- ::ng-deep .mat-mdc-menu-content {
44
- white-space: nowrap !important;
45
- padding: 0 !important;
46
- }
70
+ .menu-option-label {
71
+ margin-left: 8px;
72
+ flex: 1;
73
+ text-align: end;
74
+ }