@softheon/armature 19.12.0 → 19.14.1

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,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,66 +39,61 @@ body {
59
39
  font-size: 18px;
60
40
  }
61
41
 
62
-
42
+ /*
43
+ Text Body/Emphasis
44
+ */
63
45
  .body1, .body2, .body3 {
64
- font-family: var(--sftn-font-family-body, sans-serif);
46
+ font-family: var(--sftn-font-family-body, sans-serif); // Consumer = 'Poppins'
65
47
  font-style: normal;
66
48
  font-weight: normal;
67
49
  letter-spacing: 0px;
68
50
  line-height: 150%;
69
51
  }
70
52
 
53
+ /* Body/Emphasis 1 */
71
54
  .body1 {
72
- font-size: var(--sftn-base-font-size-body-1);
55
+ font-size: var(--sftn-base-font-size-body-1); // Consumer = 16px
73
56
  }
74
57
 
58
+ /* Body/Emphasis 2 */
75
59
  .body2 {
76
- font-size: var(--sftn-base-font-size-body-2);
60
+ font-size: var(--sftn-base-font-size-body-2); // Consumer = 14px
77
61
  }
78
62
 
63
+ /* Body/Emphasis 3 */
79
64
  .body3 {
80
65
  font-size: 12px;
81
66
  }
82
67
 
68
+ /*
69
+ Text Body/Emphasis for mat-form-field's
70
+ */
83
71
  mat-form-field {
84
72
  &.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%;
73
+ font-family: var(--sftn-font-family-body, sans-serif) !important; // Consumer = 'Poppins'
74
+ font-style: normal !important;
75
+ font-weight: normal !important;
76
+ letter-spacing: 0px !important;
77
+ line-height: 150% !important;
90
78
  }
91
79
 
80
+ /* Body/Emphasis 1 */
92
81
  &.body1 {
93
- font-size: var(--sftn-base-font-size-body-1);
82
+ font-size: var(--sftn-base-font-size-body-1) !important; // Consumer = 16px
94
83
  }
95
84
 
85
+ /* Body/Emphasis 2 */
96
86
  &.body2 {
97
- font-size: var(--sftn-base-font-size-body-2);
87
+ font-size: var(--sftn-base-font-size-body-2) !important; // Consumer = 14px
98
88
  }
99
89
 
90
+ /* Body/Emphasis 3 */
100
91
  &.body3 {
101
- font-size: 12px;
102
- }
103
- }
104
-
105
- fieldset {
106
- border: none;
107
- padding: 0px;
108
- margin: 0px;
109
-
110
- legend {
111
- padding: 0;
92
+ font-size: 12px !important;
112
93
  }
113
94
  }
114
95
 
115
- .ls-half {
116
- letter-spacing: 0.5px !important;
117
- }
118
-
119
- .ls-quarter {
120
- letter-spacing: 0.25px !important;
121
- }
96
+ /* Font Weight's */
122
97
 
123
98
  .fw-400 {
124
99
  font-weight: 400 !important;
@@ -132,6 +107,28 @@ fieldset {
132
107
  font-weight: 600 !important;
133
108
  }
134
109
 
110
+ /* Text Color's */
111
+
112
+ [text-high-emphasis],
113
+ .text-high-emphasis {
114
+ color: vars.$text-high-emphasis;
115
+ }
116
+
117
+ [text-medium-emphasis],
118
+ .text-medium-emphasis {
119
+ color: vars.$text-medium-emphasis;
120
+ }
121
+
122
+ [text-low-emphasis],
123
+ .text-low-emphasis {
124
+ color: vars.$text-low-emphasis;
125
+ }
126
+
127
+ [text-inverse],
128
+ .text-inverse {
129
+ color: vars.$text-inverse;
130
+ }
131
+
135
132
  .color-primary {
136
133
  color: map.get(theme.$arm-primary, 500);
137
134
  }
@@ -160,48 +157,86 @@ fieldset {
160
157
  color: map.get(theme.$arm-neutral, 500);
161
158
  }
162
159
 
163
- .left-align {
164
- text-align: left;
160
+ .color-help {
161
+ color: map.get(theme.$arm-help, 500);
165
162
  }
166
163
 
167
- .center-align {
168
- text-align: center;
169
- }
164
+ /* Text Alignment's */
170
165
 
171
- .text-left,
172
- [text-left] {
166
+ [text-left],
167
+ .text-left {
173
168
  text-align: left !important;
174
169
  }
175
170
 
176
- .text-center,
177
- [text-center] {
171
+ [text-center],
172
+ .text-center {
178
173
  text-align: center !important;
179
174
  }
180
175
 
181
- [text-high-emphasis],
182
- .text-high-emphasis {
183
- color: vars.$text-high-emphasis;
176
+ [text-right],
177
+ .text-right {
178
+ text-align: right !important;
184
179
  }
185
180
 
186
- [text-medium-emphasis],
187
- .text-medium-emphasis {
188
- color: vars.$text-medium-emphasis;
181
+ /* Text Overflow Ellipsis ... */
182
+
183
+ [text-overflow-ellipsis],
184
+ .text-overflow-ellipsis {
185
+ width: 100%;
186
+ overflow: hidden;
187
+ white-space: nowrap;
188
+ text-overflow: ellipsis;
189
189
  }
190
190
 
191
- [text-low-emphasis],
192
- .text-low-emphasis {
193
- color: vars.$text-low-emphasis;
191
+
192
+ /* __OVERRIDES__ */
193
+
194
+ /* <body> override */
195
+ body {
196
+ font-family: var(--sftn-font-family-body, sans-serif) !important; // Consumer = 'Poppins'
197
+ letter-spacing: 0px !important;
198
+ font-size: var(--sftn-base-font-size); // Consumer = 16px
199
+ margin: 0 !important;
194
200
  }
195
201
 
196
- [text-inverse],
197
- .text-inverse {
198
- color: vars.$text-inverse;
202
+ /*
203
+ disable ripple effects globally
204
+ @note: this may not work in all cases due to scope ...
205
+ */
206
+ .mat-ripple {
207
+ display: none !important;
199
208
  }
200
209
 
201
- .text-overflow-ellipsis,
202
- [text-overflow-ellipsis] {
203
- width: 100%;
204
- overflow: hidden;
205
- white-space: nowrap;
206
- text-overflow: ellipsis;
207
- }
210
+ /* font-family for Consumer apps = 'Poppins' */
211
+ .poppins {
212
+ font-family: var(--sftn-font-family, sans-serif) !important; // Consumer = 'Poppins'
213
+ }
214
+
215
+ /* <fieldset> override */
216
+ fieldset {
217
+ border: none;
218
+ padding: 0px;
219
+ margin: 0px;
220
+
221
+ legend {
222
+ padding: 0;
223
+ }
224
+ }
225
+
226
+
227
+ /* __DEPRECATED__ */
228
+
229
+ /* @deprecated */
230
+ .merriweather {
231
+ font-family: var(--sftn-font-family-heading, sans-serif) !important;
232
+ }
233
+
234
+ /* @deprecated */
235
+ .ls-half {
236
+ letter-spacing: 0.5px !important;
237
+ }
238
+
239
+ /* @deprecated */
240
+ .ls-quarter {
241
+ letter-spacing: 0.25px !important;
242
+ }
@@ -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
+ }