i-tech-shared-components 1.0.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.
- package/.npmignore +2 -0
- package/README.md +24 -0
- package/esm2022/i-tech-shared-components.mjs +5 -0
- package/esm2022/lib/components/button/button.component.mjs +66 -0
- package/esm2022/lib/components/icon-button/icon-button.component.mjs +49 -0
- package/esm2022/lib/components/text/text-input.component.mjs +75 -0
- package/esm2022/lib/directives/input-mask.directive.mjs +92 -0
- package/esm2022/lib/interfaces/app-input.interface.mjs +2 -0
- package/esm2022/lib/interfaces/button-types.constants.mjs +9 -0
- package/esm2022/lib/pipes/generate-error-messages.pipe.mjs +31 -0
- package/esm2022/lib/services/input.service.mjs +29 -0
- package/esm2022/public-api.mjs +11 -0
- package/fesm2022/i-tech-shared-components.mjs +335 -0
- package/fesm2022/i-tech-shared-components.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/button/button.component.d.ts +21 -0
- package/lib/components/icon-button/icon-button.component.d.ts +14 -0
- package/lib/components/text/text-input.component.d.ts +21 -0
- package/lib/directives/input-mask.directive.d.ts +21 -0
- package/lib/interfaces/app-input.interface.d.ts +31 -0
- package/lib/interfaces/button-types.constants.d.ts +7 -0
- package/lib/pipes/generate-error-messages.pipe.d.ts +10 -0
- package/lib/services/input.service.d.ts +7 -0
- package/package.json +32 -0
- package/public-api.d.ts +7 -0
- package/theme/_buttons.scss +63 -0
- package/theme/_color_themes.scss +136 -0
- package/theme/_date_picker.scss +77 -0
- package/theme/_form_fields.scss +106 -0
- package/theme/_icon-button.scss +123 -0
- package/theme/_label.scss +119 -0
- package/theme/_mat-selects.scss +248 -0
- package/theme/_menu.scss +9 -0
- package/theme/_text_input.scss +28 -0
- package/theme.scss +36 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
// Import Material theming
|
|
2
|
+
@use '@angular/material' as mat;
|
|
3
|
+
@import "./color_themes.scss";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
body {
|
|
7
|
+
--mat-option-hover-state-layer-color: #{mat.get-theme-color($m3-light-theme, primary, 99)} !important;
|
|
8
|
+
--mat-option-selected-state-layer-color: #{mat.get-theme-color($m3-light-theme, primary, 99)} !important;
|
|
9
|
+
--mat-option-focus-state-layer-color: #{mat.get-theme-color($m3-light-theme, primary, 99)} !important;
|
|
10
|
+
--mat-select-trigger-text-line-height: 20px !important;
|
|
11
|
+
--mat-select-trigger-text-size: 13px !important;
|
|
12
|
+
--mat-select-trigger-text-weight: 500 !important;
|
|
13
|
+
--mat-select-trigger-text-tracking: 0.2px !important;
|
|
14
|
+
--mat-select-enabled-trigger-text-color: #{mat.get-theme-color($m3-light-theme, tertiary, 50)} !important;
|
|
15
|
+
--mat-full-pseudo-checkbox-unselected-icon-color: #{mat.get-theme-color($m3-light-theme, primary, 80)} !important;
|
|
16
|
+
--mat-select-placeholder-text-color: #{mat.get-theme-color($m3-light-theme, tertiary, 50)} !important;
|
|
17
|
+
--mat-option-selected-state-label-text-color: #{mat.get-theme-color($m3-light-theme, tertiary, 30)} !important;
|
|
18
|
+
--mat-option-label-text-color: #{mat.get-theme-color($m3-light-theme, tertiary, 30)} !important;
|
|
19
|
+
|
|
20
|
+
.new-mat-autocomplete {
|
|
21
|
+
.mat-mdc-form-field {
|
|
22
|
+
.mat-mdc-form-field-icon-suffix>.mat-icon {
|
|
23
|
+
padding-left: 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
.select-arrow {
|
|
27
|
+
&.open {
|
|
28
|
+
transform: rotate(180deg);
|
|
29
|
+
padding-left: 12px !important;
|
|
30
|
+
padding-right: 0 !important;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mat-mdc-select-arrow {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
position: relative;
|
|
39
|
+
width: 100%;
|
|
40
|
+
// Search input container
|
|
41
|
+
.search-input {
|
|
42
|
+
position: relative;
|
|
43
|
+
width: 100%;
|
|
44
|
+
|
|
45
|
+
input {
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 40px;
|
|
48
|
+
padding: 8px 40px 8px 36px !important;
|
|
49
|
+
border: 1px solid #{mat.get-theme-color($m3-light-theme, tertiary, 90)};
|
|
50
|
+
border-radius: 4px;
|
|
51
|
+
font-size: 13px;
|
|
52
|
+
line-height: 24px;
|
|
53
|
+
letter-spacing: 0.5px;
|
|
54
|
+
color: #{mat.get-theme-color($m3-light-theme, tertiary, 30)};
|
|
55
|
+
background: white;
|
|
56
|
+
|
|
57
|
+
&:disabled {
|
|
58
|
+
border: 1px solid #{mat.get-theme-color($m3-light-theme, tertiary, 99)};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:focus {
|
|
62
|
+
border-color: #0060DF;
|
|
63
|
+
border-width: 3px;
|
|
64
|
+
outline: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:hover:not(:focus):not(:disabled) {
|
|
68
|
+
border-color: #{mat.get-theme-color($m3-light-theme, tertiary, 70)};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&::placeholder {
|
|
72
|
+
color: #{mat.get-theme-color($m3-light-theme, tertiary, 50)};
|
|
73
|
+
font-size: 13px;
|
|
74
|
+
font-weight: 500;
|
|
75
|
+
line-height: 20px;
|
|
76
|
+
letter-spacing: 0.2px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Search icon
|
|
81
|
+
.search-icon {
|
|
82
|
+
position: absolute;
|
|
83
|
+
left: 50px;
|
|
84
|
+
top: 57%;
|
|
85
|
+
transform: translateY(-50%);
|
|
86
|
+
color: #{mat.get-theme-color($m3-light-theme, tertiary, 50)};
|
|
87
|
+
|
|
88
|
+
mat-icon {
|
|
89
|
+
font-size: 20px;
|
|
90
|
+
width: 20px;
|
|
91
|
+
height: 20px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Dropdown arrow
|
|
96
|
+
app-icon-button {
|
|
97
|
+
position: absolute;
|
|
98
|
+
right: 0;
|
|
99
|
+
top: 50%;
|
|
100
|
+
transform: translateY(-50%);
|
|
101
|
+
color: #{mat.get-theme-color($m3-light-theme, tertiary, 50)};
|
|
102
|
+
|
|
103
|
+
&.rotated {
|
|
104
|
+
transform: translateY(-50%) rotate(180deg);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&.readonly-color {
|
|
108
|
+
opacity: 0.5;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
//// Placeholder and selected value
|
|
114
|
+
.custom-placeholder {
|
|
115
|
+
position: absolute;
|
|
116
|
+
top: 28px;
|
|
117
|
+
left: 17px;
|
|
118
|
+
font-size: 13px;
|
|
119
|
+
color: #647081;
|
|
120
|
+
pointer-events: none;
|
|
121
|
+
|
|
122
|
+
&.custom-value {
|
|
123
|
+
color: #{mat.get-theme-color($m3-light-theme, tertiary, 30)};
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Error state
|
|
128
|
+
.mat-mdc-form-field-error {
|
|
129
|
+
//color: #{mat.get-theme-color($m3-light-theme, error, 40)};
|
|
130
|
+
animation: mat-form-field-animation 900ms cubic-bezier(0.0, 0.0, 0.2, 1);
|
|
131
|
+
position: absolute;
|
|
132
|
+
left: 16px;
|
|
133
|
+
font-weight: 500;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@keyframes mat-form-field-animation {
|
|
137
|
+
from {
|
|
138
|
+
opacity: 0;
|
|
139
|
+
transform: translateY(-0.5em);
|
|
140
|
+
}
|
|
141
|
+
to {
|
|
142
|
+
opacity: 1;
|
|
143
|
+
transform: translateY(0);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Hide mat option checkbox when it doesnt have multiple state
|
|
150
|
+
.mat-mdc-option:not(.mat-mdc-option-multiple) {
|
|
151
|
+
.mat-pseudo-checkbox {
|
|
152
|
+
display: none !important;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.mat-select-with-search {
|
|
157
|
+
// Hidden select element
|
|
158
|
+
.mat-mdc-form-field {
|
|
159
|
+
.mat-mdc-select {
|
|
160
|
+
opacity: 0;
|
|
161
|
+
position: absolute;
|
|
162
|
+
width: 100%;
|
|
163
|
+
height: 0;
|
|
164
|
+
top: 25px;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.search-input {
|
|
169
|
+
position: absolute;
|
|
170
|
+
input {
|
|
171
|
+
padding-left: 10px;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
.mat-mdc-select {
|
|
175
|
+
visibility: hidden !important;
|
|
176
|
+
display: block;
|
|
177
|
+
height: 0;
|
|
178
|
+
}
|
|
179
|
+
.custom-value {
|
|
180
|
+
color: unset;
|
|
181
|
+
}
|
|
182
|
+
.custom_drop_down_icon {
|
|
183
|
+
position: absolute;
|
|
184
|
+
height: 10px;
|
|
185
|
+
width: 10px;
|
|
186
|
+
right: 10px;
|
|
187
|
+
top: 45px;
|
|
188
|
+
}
|
|
189
|
+
.close_dropdown_icon {
|
|
190
|
+
transform: rotate(180deg);
|
|
191
|
+
}
|
|
192
|
+
& app-error-message {
|
|
193
|
+
& .text {
|
|
194
|
+
margin-top: 40px;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.empty_selection_state {
|
|
200
|
+
height: 142px !important;
|
|
201
|
+
justify-content: center !important;
|
|
202
|
+
padding: 0 56px;
|
|
203
|
+
background: #F7FDFC;
|
|
204
|
+
pointer-events: auto !important;
|
|
205
|
+
|
|
206
|
+
span {
|
|
207
|
+
width: 100%;
|
|
208
|
+
margin: unset !important;
|
|
209
|
+
opacity: 1 !important;
|
|
210
|
+
}
|
|
211
|
+
.mat-pseudo-checkbox {
|
|
212
|
+
display: none;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
.empty_selection_state.mdc-list-item--disabled {
|
|
216
|
+
opacity: 1 !important;
|
|
217
|
+
min-height: 100px !important;
|
|
218
|
+
span {
|
|
219
|
+
font-size: unset !important;
|
|
220
|
+
color: unset !important;
|
|
221
|
+
}
|
|
222
|
+
.actions_and_tile > span {
|
|
223
|
+
display: inline-block;
|
|
224
|
+
color: #8A8383 !important;
|
|
225
|
+
width: 100%;
|
|
226
|
+
text-align: center;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.option_loading {
|
|
231
|
+
.mat-pseudo-checkbox {
|
|
232
|
+
display: none;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.mat-mdc-option {
|
|
237
|
+
min-height: 40px !important;
|
|
238
|
+
padding: 10px 12px !important;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.mat-mdc-option {
|
|
242
|
+
font-size: 13px;
|
|
243
|
+
font-style: normal;
|
|
244
|
+
font-weight: 500;
|
|
245
|
+
line-height: 20px;
|
|
246
|
+
letter-spacing: 0.2px;
|
|
247
|
+
}
|
|
248
|
+
}
|
package/theme/_menu.scss
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
@import "./color_themes.scss";
|
|
3
|
+
|
|
4
|
+
.mat-mdc-menu-panel {
|
|
5
|
+
border: 1px solid mat.get-theme-color($m3-light-theme, tertiary, 90) !important;
|
|
6
|
+
--mat-app-elevation-shadow-level-2: 0px !important;
|
|
7
|
+
--mat-menu-item-hover-state-layer-color: #{mat.get-theme-color($m3-light-theme, primary, 98)} !important;
|
|
8
|
+
}
|
|
9
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
@import "./color_themes.scss";
|
|
3
|
+
|
|
4
|
+
body {
|
|
5
|
+
.readonly-field {
|
|
6
|
+
--mdc-outlined-text-field-hover-outline-color: #{mat.get-theme-color($m3-light-theme, tertiary, 90)};
|
|
7
|
+
--mdc-outlined-text-field-focus-outline-color: #{mat.get-theme-color($m3-light-theme, tertiary, 90)};
|
|
8
|
+
--mdc-outlined-text-field-focus-outline-width: 1px;
|
|
9
|
+
--mdc-outlined-text-field-error-focus-outline-color: #{mat.get-theme-color($m3-light-theme, tertiary, 90)};
|
|
10
|
+
--mdc-outlined-text-field-error-outline-color: #{mat.get-theme-color($m3-light-theme, tertiary, 90)};
|
|
11
|
+
--mdc-outlined-text-field-error-hover-outline-color: #{mat.get-theme-color($m3-light-theme, tertiary, 90)};
|
|
12
|
+
--mat-select-disabled-trigger-text-color: #{mat.get-theme-color($m3-light-theme, tertiary, 90)};
|
|
13
|
+
--mat-select-placeholder-text-color: #{mat.get-theme-color($m3-light-theme, tertiary, 90)};
|
|
14
|
+
--mdc-outlined-text-field-disabled-input-text-color: #{mat.get-theme-color($m3-light-theme, tertiary, 90)};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.readonly-color {
|
|
18
|
+
color: #{mat.get-theme-color($m3-light-theme, tertiary, 90)} !important;
|
|
19
|
+
.mat-mdc-icon-button.tonal mat-icon {
|
|
20
|
+
color: #{mat.get-theme-color($m3-light-theme, tertiary, 90)} !important;
|
|
21
|
+
}
|
|
22
|
+
--mdc-outlined-text-field-input-text-placeholder-color: #{mat.get-theme-color($m3-light-theme, tertiary, 90)} !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.mat-mdc-form-field-icon-prefix {
|
|
26
|
+
padding: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
package/theme.scss
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");
|
|
3
|
+
|
|
4
|
+
@import "./theme/buttons.scss";
|
|
5
|
+
@import "./theme/label.scss";
|
|
6
|
+
@import "./theme/icon-button.scss";
|
|
7
|
+
@import "./theme/color_themes.scss";
|
|
8
|
+
@import "./theme/date_picker.scss";
|
|
9
|
+
@import "./theme/text_input.scss";
|
|
10
|
+
@import "./theme/form_fields.scss";
|
|
11
|
+
@import "./theme/mat-selects.scss";
|
|
12
|
+
@import "./theme/menu.scss";
|
|
13
|
+
|
|
14
|
+
@include mat.core();
|
|
15
|
+
|
|
16
|
+
body {
|
|
17
|
+
// BASE CSS PROPERTIES
|
|
18
|
+
margin: 0;
|
|
19
|
+
font-family: "Noto Sans";
|
|
20
|
+
font-style: normal;
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
|
|
23
|
+
button, input, textarea, select, .gm-style {
|
|
24
|
+
font-family: "Noto Sans" !important;
|
|
25
|
+
}
|
|
26
|
+
// END OF BASE CSS PROPERTIES
|
|
27
|
+
@import "./theme/color_themes.scss";
|
|
28
|
+
|
|
29
|
+
@include mat.core-theme($m3-light-theme);
|
|
30
|
+
@include mat.all-component-themes($m3-light-theme);
|
|
31
|
+
@include mat.color-variants-backwards-compatibility($m3-light-theme);
|
|
32
|
+
@include mat.form-field-theme($m3-light-theme, $color-variant: secondary);
|
|
33
|
+
.new-mat-autocomplete {
|
|
34
|
+
@include mat.button-density(-3);
|
|
35
|
+
};
|
|
36
|
+
}
|