@registrucentras/rc-ses-angular-components 0.2.0 → 0.4.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/README.md +31 -31
- package/esm2022/lib/components/accordion/accordion.mjs +40 -0
- package/esm2022/lib/components/breadcrumbs/breadcrumbs.mjs +43 -0
- package/esm2022/lib/components/button/button.mjs +43 -0
- package/esm2022/lib/components/divider/divider.mjs +23 -0
- package/esm2022/lib/components/form/form-field/form-field.mjs +105 -0
- package/esm2022/lib/components/form/input/agreement-checkbox/agreement-checkbox.mjs +102 -0
- package/esm2022/lib/components/form/input/input/input.mjs +38 -0
- package/esm2022/lib/components/form/input/number-stepper/number-stepper.mjs +112 -0
- package/esm2022/lib/components/form/input/radio-button-group/radio-button-group.mjs +111 -0
- package/esm2022/lib/components/form/input/select/select.mjs +164 -0
- package/esm2022/lib/components/icons/icons.module.mjs +33 -0
- package/esm2022/lib/components/layout/service-form-actions/service-form-actions.mjs +48 -0
- package/esm2022/lib/components/layout/service-form-container/service-form-container.mjs +48 -0
- package/esm2022/lib/components/layout/service-header/service-header.mjs +50 -0
- package/esm2022/lib/components/layout/service-page/service-page.mjs +41 -0
- package/esm2022/lib/components/layout/service-wizard-steps/service-wizard-steps.mjs +43 -0
- package/esm2022/lib/components/message/message.mjs +62 -0
- package/esm2022/public-api.mjs +19 -0
- package/esm2022/registrucentras-rc-ses-angular-components.mjs +5 -0
- package/fesm2022/registrucentras-rc-ses-angular-components.mjs +1008 -0
- package/fesm2022/registrucentras-rc-ses-angular-components.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/accordion/accordion.d.ts +18 -0
- package/lib/components/breadcrumbs/breadcrumbs.d.ts +18 -0
- package/lib/components/button/button.d.ts +15 -0
- package/lib/components/divider/divider.d.ts +5 -0
- package/lib/components/form/form-field/form-field.d.ts +29 -0
- package/lib/components/form/input/agreement-checkbox/agreement-checkbox.d.ts +28 -0
- package/lib/components/form/input/input/input.d.ts +14 -0
- package/lib/components/form/input/number-stepper/number-stepper.d.ts +33 -0
- package/lib/components/form/input/radio-button-group/radio-button-group.d.ts +38 -0
- package/lib/components/form/input/select/select.d.ts +47 -0
- package/lib/components/icons/icons.module.d.ts +10 -0
- package/lib/components/layout/service-form-actions/service-form-actions.d.ts +16 -0
- package/lib/components/layout/service-form-container/service-form-container.d.ts +18 -0
- package/lib/components/layout/service-header/service-header.d.ts +23 -0
- package/lib/components/layout/service-page/service-page.d.ts +16 -0
- package/lib/components/layout/service-wizard-steps/service-wizard-steps.d.ts +18 -0
- package/lib/components/message/message.d.ts +23 -0
- package/package.json +39 -36
- package/{projects/rc-ses/angular-components/src/public-api.ts → public-api.d.ts} +15 -22
- package/{projects/rc-ses/angular-components/src → src}/lib/theme/index.scss +65 -65
- package/{projects/rc-ses/angular-components/src → src}/lib/theme/palette.scss +183 -183
- package/{projects/rc-ses/angular-components/src → src}/lib/theme/theme.scss +24 -24
- package/{projects/rc-ses/angular-components/src → src}/lib/theme/typography.scss +63 -63
- package/.editorconfig +0 -17
- package/.gitattributes +0 -1
- package/.github/workflows/build-and-publish.yml +0 -50
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -20
- package/.vscode/tasks.json +0 -42
- package/RELEASE_NOTES.md +0 -29
- package/angular.json +0 -173
- package/karma.conf.js +0 -53
- package/projects/app/public/favicon.ico +0 -0
- package/projects/app/src/app/app.component.html +0 -3
- package/projects/app/src/app/app.component.scss +0 -0
- package/projects/app/src/app/app.component.ts +0 -20
- package/projects/app/src/app/app.config.ts +0 -33
- package/projects/app/src/app/app.routes.ts +0 -16
- package/projects/app/src/app/landing-page/landing-page.html +0 -20
- package/projects/app/src/app/landing-page/landing-page.scss +0 -0
- package/projects/app/src/app/landing-page/landing-page.ts +0 -37
- package/projects/app/src/app/sample-form-multiple-steps/sample-form-multiple-steps.html +0 -283
- package/projects/app/src/app/sample-form-multiple-steps/sample-form-multiple-steps.scss +0 -0
- package/projects/app/src/app/sample-form-multiple-steps/sample-form-multiple-steps.ts +0 -223
- package/projects/app/src/app/sample-form-single-step/sample-form-single-step.html +0 -271
- package/projects/app/src/app/sample-form-single-step/sample-form-single-step.scss +0 -0
- package/projects/app/src/app/sample-form-single-step/sample-form-single-step.ts +0 -142
- package/projects/app/src/index.html +0 -18
- package/projects/app/src/main.ts +0 -6
- package/projects/app/tsconfig.app.json +0 -15
- package/projects/app/tsconfig.spec.json +0 -15
- package/projects/rc-ses/angular-components/README.md +0 -31
- package/projects/rc-ses/angular-components/ng-package.json +0 -13
- package/projects/rc-ses/angular-components/package-lock.json +0 -224
- package/projects/rc-ses/angular-components/package.json +0 -40
- package/projects/rc-ses/angular-components/src/lib/components/accordion/accordion.scss +0 -71
- package/projects/rc-ses/angular-components/src/lib/components/accordion/accordion.ts +0 -31
- package/projects/rc-ses/angular-components/src/lib/components/breadcrumbs/breadcrumbs.html +0 -7
- package/projects/rc-ses/angular-components/src/lib/components/breadcrumbs/breadcrumbs.scss +0 -54
- package/projects/rc-ses/angular-components/src/lib/components/breadcrumbs/breadcrumbs.ts +0 -40
- package/projects/rc-ses/angular-components/src/lib/components/button/button.scss +0 -248
- package/projects/rc-ses/angular-components/src/lib/components/button/button.spec.ts +0 -46
- package/projects/rc-ses/angular-components/src/lib/components/button/button.ts +0 -34
- package/projects/rc-ses/angular-components/src/lib/components/divider/divider.scss +0 -18
- package/projects/rc-ses/angular-components/src/lib/components/divider/divider.ts +0 -16
- package/projects/rc-ses/angular-components/src/lib/components/form/form-field/form-field.html +0 -11
- package/projects/rc-ses/angular-components/src/lib/components/form/form-field/form-field.scss +0 -149
- package/projects/rc-ses/angular-components/src/lib/components/form/form-field/form-field.ts +0 -87
- package/projects/rc-ses/angular-components/src/lib/components/form/input/agreement-checkbox/agreement-checkbox.html +0 -10
- package/projects/rc-ses/angular-components/src/lib/components/form/input/agreement-checkbox/agreement-checkbox.scss +0 -36
- package/projects/rc-ses/angular-components/src/lib/components/form/input/agreement-checkbox/agreement-checkbox.ts +0 -89
- package/projects/rc-ses/angular-components/src/lib/components/form/input/checkbox/checkbox.scss +0 -132
- package/projects/rc-ses/angular-components/src/lib/components/form/input/datepicker/datepicker.scss +0 -18
- package/projects/rc-ses/angular-components/src/lib/components/form/input/input/input.scss +0 -66
- package/projects/rc-ses/angular-components/src/lib/components/form/input/input/input.ts +0 -31
- package/projects/rc-ses/angular-components/src/lib/components/form/input/number-stepper/number-stepper.html +0 -30
- package/projects/rc-ses/angular-components/src/lib/components/form/input/number-stepper/number-stepper.scss +0 -88
- package/projects/rc-ses/angular-components/src/lib/components/form/input/number-stepper/number-stepper.ts +0 -103
- package/projects/rc-ses/angular-components/src/lib/components/form/input/radio/radio.scss +0 -85
- package/projects/rc-ses/angular-components/src/lib/components/form/input/radio-button-group/radio-button-group.html +0 -7
- package/projects/rc-ses/angular-components/src/lib/components/form/input/radio-button-group/radio-button-group.scss +0 -87
- package/projects/rc-ses/angular-components/src/lib/components/form/input/radio-button-group/radio-button-group.ts +0 -101
- package/projects/rc-ses/angular-components/src/lib/components/form/input/select/select.html +0 -40
- package/projects/rc-ses/angular-components/src/lib/components/form/input/select/select.scss +0 -153
- package/projects/rc-ses/angular-components/src/lib/components/form/input/select/select.ts +0 -155
- package/projects/rc-ses/angular-components/src/lib/components/icons/icons.module.ts +0 -61
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-form-actions/service-form-actions.html +0 -19
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-form-actions/service-form-actions.scss +0 -64
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-form-actions/service-form-actions.ts +0 -45
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-form-container/service-form-container.html +0 -16
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-form-container/service-form-container.scss +0 -32
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-form-container/service-form-container.ts +0 -43
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-header/service-header.html +0 -5
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-header/service-header.scss +0 -35
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-header/service-header.ts +0 -48
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-page/service-page.html +0 -14
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-page/service-page.scss +0 -38
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-page/service-page.ts +0 -37
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-wizard-steps/service-wizard-steps.html +0 -18
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-wizard-steps/service-wizard-steps.scss +0 -93
- package/projects/rc-ses/angular-components/src/lib/components/layout/service-wizard-steps/service-wizard-steps.ts +0 -41
- package/projects/rc-ses/angular-components/src/lib/components/message/message.html +0 -39
- package/projects/rc-ses/angular-components/src/lib/components/message/message.scss +0 -141
- package/projects/rc-ses/angular-components/src/lib/components/message/message.ts +0 -52
- package/projects/rc-ses/angular-components/src/styles.scss +0 -40
- package/projects/rc-ses/angular-components/src/test.ts +0 -14
- package/projects/rc-ses/angular-components/tsconfig.lib.json +0 -15
- package/projects/rc-ses/angular-components/tsconfig.lib.prod.json +0 -11
- package/tsconfig.json +0 -37
- package/tsconfig.spec.json +0 -18
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
@use '@angular/material' as mat;
|
|
2
|
-
|
|
3
|
-
@mixin bootstrap($theme, $typography) {
|
|
4
|
-
@layer rc-ses {
|
|
5
|
-
.rc-ses-button {
|
|
6
|
-
|
|
7
|
-
&:not(:disabled):not(.disabled) {
|
|
8
|
-
|
|
9
|
-
&:hover {
|
|
10
|
-
.mat-mdc-button-persistent-ripple::before {
|
|
11
|
-
background-color: mat.get-theme-color($theme, primary, 90) !important;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&:active {
|
|
16
|
-
.mat-mdc-button-persistent-ripple::before {
|
|
17
|
-
background-color: mat.get-theme-color($theme, primary, 70) !important;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&:focus:not(:hover) {
|
|
22
|
-
outline: 2px solid #{mat.get-theme-color($theme, neutral, 0)} !important;
|
|
23
|
-
outline-offset: 2px;
|
|
24
|
-
|
|
25
|
-
.mat-mdc-button-persistent-ripple::before {
|
|
26
|
-
background-color: mat.get-theme-color($theme, primary, 90) !important;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.mat-mdc-button-touch-target {
|
|
31
|
-
height: var(--mdc-text-button-container-height) !important;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/*
|
|
35
|
-
* TEXT ONLY
|
|
36
|
-
*/
|
|
37
|
-
&.mat-mdc-button {
|
|
38
|
-
|
|
39
|
-
&:hover {
|
|
40
|
-
background-color: mat.get-theme-color($theme, primary, 98) !important;
|
|
41
|
-
color: mat.get-theme-color($theme, primary, 30) !important;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&:active {
|
|
45
|
-
background-color: mat.get-theme-color($theme, primary, 95) !important;
|
|
46
|
-
color: mat.get-theme-color($theme, primary, 20) !important;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&.mat-mdc-outlined-button {
|
|
51
|
-
background-color: white !important;
|
|
52
|
-
color: mat.get-theme-color($theme, primary, 40) !important;
|
|
53
|
-
|
|
54
|
-
.mat-mdc-button-touch-target {
|
|
55
|
-
height: var(--mdc-outlined-button-container-height) !important;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.mat-mdc-button-persistent-ripple {
|
|
59
|
-
display: none !important;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&:hover {
|
|
63
|
-
background-color: mat.get-theme-color($theme, primary, 100) !important;
|
|
64
|
-
color: mat.get-theme-color($theme, primary, 30) !important;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&:active {
|
|
68
|
-
background-color: mat.get-theme-color($theme, primary, 98) !important;
|
|
69
|
-
color: mat.get-theme-color($theme, primary, 30) !important;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/*
|
|
74
|
-
* SECONDARY
|
|
75
|
-
*/
|
|
76
|
-
&.mat-secondary {
|
|
77
|
-
background-color: mat.get-theme-color($theme, secondary, 95) !important;
|
|
78
|
-
color: mat.get-theme-color($theme, secondary, 10) !important;
|
|
79
|
-
|
|
80
|
-
&:hover {
|
|
81
|
-
.mat-mdc-button-persistent-ripple::before {
|
|
82
|
-
background-color: mat.get-theme-color($theme, secondary, 90) !important;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&:active {
|
|
87
|
-
.mat-mdc-button-persistent-ripple::before {
|
|
88
|
-
background-color: mat.get-theme-color($theme, secondary, 90) !important;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&.mat-mdc-outlined-button {
|
|
93
|
-
background-color: white !important;
|
|
94
|
-
border-color: mat.get-theme-color($theme, secondary, 30) !important;
|
|
95
|
-
color: mat.get-theme-color($theme, secondary, 30) !important;
|
|
96
|
-
|
|
97
|
-
&:hover {
|
|
98
|
-
background-color: mat.get-theme-color($theme, secondary, 99) !important;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&:active {
|
|
102
|
-
background-color: mat.get-theme-color($theme, secondary, 98) !important;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/*
|
|
108
|
-
* TERTIARY
|
|
109
|
-
*/
|
|
110
|
-
&.mat-neutral {
|
|
111
|
-
color: mat.get-theme-color($theme, neutral, 20) !important;
|
|
112
|
-
|
|
113
|
-
&:hover {
|
|
114
|
-
.mat-mdc-button-persistent-ripple::before {
|
|
115
|
-
background-color: mat.get-theme-color($theme, neutral, 95) !important;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
&:active {
|
|
120
|
-
.mat-mdc-button-persistent-ripple::before {
|
|
121
|
-
background-color: mat.get-theme-color($theme, neutral, 90) !important;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&.mat-mdc-unelevated-button {
|
|
126
|
-
background-color: mat.get-theme-color($theme, neutral, 98) !important;
|
|
127
|
-
|
|
128
|
-
&:hover {
|
|
129
|
-
.mat-mdc-button-persistent-ripple::before {
|
|
130
|
-
background-color: mat.get-theme-color($theme, neutral, 95) !important;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&:active {
|
|
135
|
-
.mat-mdc-button-persistent-ripple::before {
|
|
136
|
-
background-color: mat.get-theme-color($theme, neutral, 90) !important;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&.mat-mdc-outlined-button {
|
|
142
|
-
background-color: white !important;
|
|
143
|
-
border-color: mat.get-theme-color($theme, neutral, 40) !important;
|
|
144
|
-
color: mat.get-theme-color($theme, neutral, 20) !important;
|
|
145
|
-
|
|
146
|
-
&:hover {
|
|
147
|
-
background-color: mat.get-theme-color($theme, neutral, 25) !important;
|
|
148
|
-
color: white !important;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
&:active {
|
|
152
|
-
background-color: mat.get-theme-color($theme, neutral, 20) !important;
|
|
153
|
-
color: white !important;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/*
|
|
159
|
-
* DARK
|
|
160
|
-
*/
|
|
161
|
-
&.mat-dark {
|
|
162
|
-
background-color: mat.get-theme-color($theme, neutral, 20) !important;
|
|
163
|
-
color: white !important;
|
|
164
|
-
|
|
165
|
-
&:hover {
|
|
166
|
-
.mat-mdc-button-persistent-ripple::before {
|
|
167
|
-
background-color: mat.get-theme-color($theme, neutral, 25) !important;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
&:active {
|
|
172
|
-
.mat-mdc-button-persistent-ripple::before {
|
|
173
|
-
background-color: mat.get-theme-color($theme, neutral, 30) !important;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/*
|
|
179
|
-
* DANGER
|
|
180
|
-
*/
|
|
181
|
-
&.mat-danger {
|
|
182
|
-
background-color: mat.get-theme-color($theme, error, 98) !important;
|
|
183
|
-
color: mat.get-theme-color($theme, error, 30) !important;
|
|
184
|
-
|
|
185
|
-
&:hover {
|
|
186
|
-
.mat-mdc-button-persistent-ripple::before {
|
|
187
|
-
background-color: mat.get-theme-color($theme, error, 90) !important;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
&:active {
|
|
192
|
-
.mat-mdc-button-persistent-ripple::before {
|
|
193
|
-
background-color: mat.get-theme-color($theme, error, 80) !important;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
&:focus:not(:hover) {
|
|
198
|
-
outline-color: #{mat.get-theme-color($theme, error, 30)} !important;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
&.mat-danger {
|
|
204
|
-
&.disabled,
|
|
205
|
-
&:disabled {
|
|
206
|
-
background-color: mat.get-theme-color($theme, error, 100) !important;
|
|
207
|
-
color: mat.get-theme-color($theme, error, 90) !important;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
@layer rc-ses-variables {
|
|
214
|
-
:root {
|
|
215
|
-
--mdc-text-button-container-shape: .1875rem;
|
|
216
|
-
--mdc-text-button-container-height: 2.75rem;
|
|
217
|
-
--mdc-text-button-label-text-size: #{map-get($typography, 'body-2', 'font-size')};
|
|
218
|
-
|
|
219
|
-
--mdc-filled-button-container-color: #{mat.get-theme-color($theme, primary, 95)};
|
|
220
|
-
--mdc-filled-button-container-height: 2.75rem;
|
|
221
|
-
--mdc-filled-button-container-shape: .1875rem;
|
|
222
|
-
--mdc-filled-button-disabled-label-text-color: #{mat.get-theme-color($theme, neutral, 50)};
|
|
223
|
-
--mdc-filled-button-disabled-container-color: #{mat.get-theme-color($theme, neutral, 98)};
|
|
224
|
-
--mat-filled-button-horizontal-padding: 1.25rem;
|
|
225
|
-
--mdc-filled-button-label-text-weight: 600;
|
|
226
|
-
--mat-filled-button-hover-state-layer-opacity: 1;
|
|
227
|
-
--mdc-filled-button-label-text-color: #{mat.get-theme-color($theme, primary, 0)};
|
|
228
|
-
--mat-filled-button-pressed-state-layer-opacity: 1;
|
|
229
|
-
--mat-filled-button-state-layer-color: 0;
|
|
230
|
-
--mdc-filled-button-label-text-size: #{map-get($typography, 'body-2', 'font-size')};
|
|
231
|
-
|
|
232
|
-
--mdc-outlined-button-container-color: white;
|
|
233
|
-
--mdc-outlined-button-container-height: 2.75rem;
|
|
234
|
-
--mdc-outlined-button-container-shape: .1875rem;
|
|
235
|
-
--mdc-outlined-button-disabled-label-text-color: #{mat.get-theme-color($theme, neutral, 70)};
|
|
236
|
-
--mdc-outlined-button-disabled-container-color: #{mat.get-theme-color($theme, neutral, 90)};
|
|
237
|
-
--mat-outlined-button-horizontal-padding: 1.25rem;
|
|
238
|
-
--mat-outlined-button-hover-state-layer-opacity: 1;
|
|
239
|
-
--mdc-outlined-button-label-text-size: #{map-get($typography, 'body-2', 'font-size')};
|
|
240
|
-
--mdc-outlined-button-label-text-color: #{mat.get-theme-color($theme, primary, 40)};
|
|
241
|
-
--mdc-outlined-button-label-text-weight: 600;
|
|
242
|
-
--mdc-outlined-button-outline-color: #{mat.get-theme-color($theme, primary, 40)};
|
|
243
|
-
--mat-outlined-button-pressed-state-layer-opacity: 1;
|
|
244
|
-
--mat-outlined-button-state-layer-color: 0;
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { RcSesButtonDirective } from "./button";
|
|
2
|
-
import { ElementRef } from "@angular/core";
|
|
3
|
-
|
|
4
|
-
describe("RcSesButtonDirective", () => {
|
|
5
|
-
it("removes mat-ripple attributes on init", () => {
|
|
6
|
-
const buttonEl = document.createElement("button");
|
|
7
|
-
buttonEl.setAttribute("mat-ripple-loader-class-name", "loader");
|
|
8
|
-
buttonEl.setAttribute("mat-ripple-loader-uninitialized", "true");
|
|
9
|
-
|
|
10
|
-
const renderer = {
|
|
11
|
-
removeAttribute: (el: HTMLElement, name: string) => el.removeAttribute(name),
|
|
12
|
-
} as any;
|
|
13
|
-
|
|
14
|
-
const directive = new RcSesButtonDirective(
|
|
15
|
-
document,
|
|
16
|
-
new ElementRef(buttonEl),
|
|
17
|
-
renderer,
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
directive.ngOnInit();
|
|
21
|
-
|
|
22
|
-
expect(buttonEl.hasAttribute("mat-ripple-loader-class-name")).toBeFalse();
|
|
23
|
-
expect(buttonEl.hasAttribute("mat-ripple-loader-uninitialized")).toBeFalse();
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it("toggles initialized flag on lifecycle", () => {
|
|
27
|
-
const buttonEl = document.createElement("button");
|
|
28
|
-
const renderer = {
|
|
29
|
-
removeAttribute: (el: HTMLElement, name: string) => el.removeAttribute(name),
|
|
30
|
-
} as any;
|
|
31
|
-
|
|
32
|
-
const directive = new RcSesButtonDirective(
|
|
33
|
-
document,
|
|
34
|
-
new ElementRef(buttonEl),
|
|
35
|
-
renderer,
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
expect(directive.initialized).toBeUndefined();
|
|
39
|
-
|
|
40
|
-
directive.ngAfterViewInit();
|
|
41
|
-
expect(directive.initialized).toBeTrue();
|
|
42
|
-
|
|
43
|
-
directive.ngOnDestroy();
|
|
44
|
-
expect(directive.initialized).toBeFalse();
|
|
45
|
-
});
|
|
46
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { DOCUMENT } from "@angular/common";
|
|
2
|
-
import { Directive, AfterViewInit, OnDestroy, ElementRef, Inject, OnInit, Renderer2, Input } from "@angular/core";
|
|
3
|
-
|
|
4
|
-
@Directive({
|
|
5
|
-
selector: '[rc-ses-button]',
|
|
6
|
-
standalone: true,
|
|
7
|
-
host: {
|
|
8
|
-
class: 'rc-ses-element rc-ses-button'
|
|
9
|
-
},
|
|
10
|
-
})
|
|
11
|
-
export class RcSesButtonDirective implements AfterViewInit, OnDestroy, OnInit {
|
|
12
|
-
@Input() color: "primary" | "secondary" | "neutral" | "dark" | "danger" = "primary";
|
|
13
|
-
|
|
14
|
-
public initialized: boolean | undefined;
|
|
15
|
-
|
|
16
|
-
constructor(
|
|
17
|
-
@Inject(DOCUMENT) private _document: Document,
|
|
18
|
-
public _el: ElementRef,
|
|
19
|
-
private _renderer: Renderer2,
|
|
20
|
-
) {}
|
|
21
|
-
|
|
22
|
-
ngOnInit() {
|
|
23
|
-
this._renderer.removeAttribute(this._el.nativeElement, 'mat-ripple-loader-class-name');
|
|
24
|
-
this._renderer.removeAttribute(this._el.nativeElement, 'mat-ripple-loader-uninitialized');
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
ngAfterViewInit() {
|
|
28
|
-
this.initialized = true;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
ngOnDestroy() {
|
|
32
|
-
this.initialized = false;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
@use '@angular/material' as mat;
|
|
2
|
-
|
|
3
|
-
@mixin bootstrap($theme, $typography) {
|
|
4
|
-
@layer rc-ses {
|
|
5
|
-
.rc-ses-divider {
|
|
6
|
-
|
|
7
|
-
.mat-divider {
|
|
8
|
-
margin: 2rem 0 !important;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@layer rc-ses-variables {
|
|
14
|
-
:root {
|
|
15
|
-
--mat-divider-color: #{mat.get-theme-color($theme, neutral, 95)};
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Component } from "@angular/core";
|
|
2
|
-
import { MatDividerModule } from "@angular/material/divider";
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'rc-ses-divider',
|
|
6
|
-
standalone: true,
|
|
7
|
-
imports: [
|
|
8
|
-
MatDividerModule,
|
|
9
|
-
],
|
|
10
|
-
host: {
|
|
11
|
-
class: 'rc-ses-element rc-ses-divider',
|
|
12
|
-
},
|
|
13
|
-
template: `<mat-divider />`,
|
|
14
|
-
})
|
|
15
|
-
export class RcSesDividerComponent {
|
|
16
|
-
}
|
package/projects/rc-ses/angular-components/src/lib/components/form/form-field/form-field.scss
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
@use 'sass:color';
|
|
2
|
-
@use '@angular/material' as mat;
|
|
3
|
-
|
|
4
|
-
@layer rc-ses {
|
|
5
|
-
:host {
|
|
6
|
-
align-items: flex-start;
|
|
7
|
-
display: flex;
|
|
8
|
-
|
|
9
|
-
&.rc-ses-has-label-subtitle {
|
|
10
|
-
align-items: center;
|
|
11
|
-
|
|
12
|
-
.rc-ses-label {
|
|
13
|
-
margin-top: 0 !important;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@mixin bootstrap($theme, $typography) {
|
|
20
|
-
@layer rc-ses {
|
|
21
|
-
|
|
22
|
-
.rc-ses-form-field {
|
|
23
|
-
margin-bottom: 1rem;
|
|
24
|
-
|
|
25
|
-
.rc-ses-label {
|
|
26
|
-
color: mat.get-theme-color($theme, neutral, 0);
|
|
27
|
-
flex: 0 0 243px;
|
|
28
|
-
font-size: map-get($typography, 'body-2', 'font-size');
|
|
29
|
-
font-weight: 500;
|
|
30
|
-
line-height: 1.125rem;
|
|
31
|
-
margin-right: 1.5rem;
|
|
32
|
-
margin-top: .75rem;
|
|
33
|
-
text-align: right;
|
|
34
|
-
width: 243px;
|
|
35
|
-
|
|
36
|
-
.rc-ses-label-subtitle {
|
|
37
|
-
color: mat.get-theme-color($theme, neutral, 30);
|
|
38
|
-
font-size: .75rem;
|
|
39
|
-
font-style: italic;
|
|
40
|
-
font-weight: 500;
|
|
41
|
-
line-height: 1rem;
|
|
42
|
-
margin-top: .125rem;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.rc-ses-form-field__input-wrapper {
|
|
47
|
-
flex-grow: 1;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.mat-form-field {
|
|
51
|
-
|
|
52
|
-
&-appearance-fill {
|
|
53
|
-
background-color: transparent !important;
|
|
54
|
-
|
|
55
|
-
.mat-mdc-text-field-wrapper,
|
|
56
|
-
.mat-mdc-form-field-focus-overlay {
|
|
57
|
-
background-color: transparent !important;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.mdc-line-ripple {
|
|
61
|
-
display: none !important;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.mat-mdc-form-field {
|
|
67
|
-
width: 100%;
|
|
68
|
-
|
|
69
|
-
&:not(:disabled):not(.mat-form-field-disabled):not(.mat-form-field--readonly) {
|
|
70
|
-
|
|
71
|
-
&:not(.mat-form-field-invalid):hover {
|
|
72
|
-
|
|
73
|
-
.mat-mdc-notch-piece {
|
|
74
|
-
border-color: mat.get-theme-color($theme, neutral, 20) !important;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&-disabled {
|
|
80
|
-
background-color: mat.get-theme-color($theme, neutral, 98) !important;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
&--readonly {
|
|
85
|
-
|
|
86
|
-
.mat-mdc-notch-piece,
|
|
87
|
-
&:active .mat-mdc-notch-piece,
|
|
88
|
-
&:hover .mat-mdc-notch-piece,
|
|
89
|
-
&:focus .mat-mdc-notch-piece {
|
|
90
|
-
border-color: mat.get-theme-color($theme, neutral, 40) !important;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.mat-mdc-input-element {
|
|
94
|
-
color: mat.get-theme-color($theme, neutral, 20) !important;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.mdc-notched-outline {
|
|
98
|
-
|
|
99
|
-
&::before {
|
|
100
|
-
content: unset !important;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.mat-mdc-notch-piece {
|
|
104
|
-
border-color: mat.get-theme-color($theme, neutral, 40) !important;
|
|
105
|
-
border-width: 1px !important;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
&-hint {
|
|
111
|
-
display: block;
|
|
112
|
-
font-size: .875rem;
|
|
113
|
-
line-height: 1.125rem;
|
|
114
|
-
padding-top: .625rem;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
&-hint-wrapper,
|
|
118
|
-
&-error-wrapper {
|
|
119
|
-
padding-left: 0 !important;
|
|
120
|
-
padding-right: 0 !important;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&--contains {
|
|
125
|
-
|
|
126
|
-
&--agreement-checkbox-component,
|
|
127
|
-
&--radio-button-group-component {
|
|
128
|
-
align-items: center !important;
|
|
129
|
-
|
|
130
|
-
.rc-ses-label {
|
|
131
|
-
margin-top: 0;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
@layer rc-ses-variables {
|
|
139
|
-
:root {
|
|
140
|
-
--mat-form-field-container-height: 2.75rem;
|
|
141
|
-
--mat-form-field-container-text-line-height: 1.125rem;
|
|
142
|
-
--mat-form-field-container-text-size: #{map-get($typography, 'body-2', 'font-size')};
|
|
143
|
-
--mat-form-field-container-vertical-padding: .8125rem;
|
|
144
|
-
|
|
145
|
-
--mat-form-field-subscript-text-line-height: 1rem;
|
|
146
|
-
--mat-form-field-subscript-text-size: .8125rem;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { CommonModule, DOCUMENT } from "@angular/common";
|
|
2
|
-
import { Component, AfterViewInit, OnDestroy, ElementRef, Inject, OnInit, Renderer2, Input, ContentChild, AfterContentInit, ViewChild } from "@angular/core";
|
|
3
|
-
import { ControlContainer, FormGroupDirective, FormsModule } from "@angular/forms";
|
|
4
|
-
import { MatError, MatFormField, MatFormFieldControl, MatFormFieldModule, MatLabel } from "@angular/material/form-field";
|
|
5
|
-
import { MatInput, MatInputModule } from "@angular/material/input";
|
|
6
|
-
import { MatIconModule } from "@angular/material/icon";
|
|
7
|
-
import { MatButtonModule } from "@angular/material/button";
|
|
8
|
-
import { RcSesInputDirective } from "../input/input/input";
|
|
9
|
-
import { RcSesAgreementCheckboxComponent } from "../input/agreement-checkbox/agreement-checkbox";
|
|
10
|
-
import { RcSesRadioButtonGroupComponent } from "../input/radio-button-group/radio-button-group";
|
|
11
|
-
|
|
12
|
-
@Component({
|
|
13
|
-
selector: 'rc-ses-form-field',
|
|
14
|
-
standalone: true,
|
|
15
|
-
templateUrl: './form-field.html',
|
|
16
|
-
styleUrl: './form-field.scss',
|
|
17
|
-
imports: [
|
|
18
|
-
CommonModule,
|
|
19
|
-
FormsModule,
|
|
20
|
-
MatButtonModule,
|
|
21
|
-
MatIconModule,
|
|
22
|
-
MatInputModule,
|
|
23
|
-
MatFormFieldModule,
|
|
24
|
-
MatError,
|
|
25
|
-
RcSesInputDirective,
|
|
26
|
-
],
|
|
27
|
-
host: {
|
|
28
|
-
class: 'rc-ses-element rc-ses-form-field'
|
|
29
|
-
},
|
|
30
|
-
viewProviders: [
|
|
31
|
-
{ provide: ControlContainer, useExisting: FormGroupDirective }
|
|
32
|
-
],
|
|
33
|
-
})
|
|
34
|
-
export class RcSesFormFieldComponent implements AfterViewInit, AfterContentInit, OnDestroy, OnInit {
|
|
35
|
-
@ContentChild(MatFormFieldControl) control!: MatFormFieldControl<any>;
|
|
36
|
-
|
|
37
|
-
@ContentChild(MatFormField, { read: ElementRef}) formFieldRef!: ElementRef<MatFormField>;
|
|
38
|
-
@ContentChild(MatFormField) formField!: MatFormField;
|
|
39
|
-
|
|
40
|
-
@ContentChild(MatInput, { read: ElementRef}) inputRef!: ElementRef<MatInput>;
|
|
41
|
-
@ContentChild(MatInput) input!: MatInput;
|
|
42
|
-
|
|
43
|
-
@ContentChild(RcSesAgreementCheckboxComponent, { read: ElementRef })
|
|
44
|
-
rcSesAgreementCheckboxComponent: RcSesAgreementCheckboxComponent | undefined = undefined;
|
|
45
|
-
|
|
46
|
-
@ContentChild(RcSesRadioButtonGroupComponent, { read: ElementRef })
|
|
47
|
-
rcSesRadioButtonGroupComponent: RcSesRadioButtonGroupComponent | undefined = undefined;
|
|
48
|
-
|
|
49
|
-
@ViewChild(MatLabel, { read: ElementRef }) labelComponent: MatLabel | undefined;
|
|
50
|
-
|
|
51
|
-
@Input() label: string | undefined = undefined;
|
|
52
|
-
@Input() labelSubtitle: string | undefined = undefined;
|
|
53
|
-
|
|
54
|
-
public initialized: boolean = false;
|
|
55
|
-
|
|
56
|
-
constructor(
|
|
57
|
-
@Inject(DOCUMENT) private _document: Document,
|
|
58
|
-
public _element: ElementRef,
|
|
59
|
-
private _renderer: Renderer2,
|
|
60
|
-
) {}
|
|
61
|
-
|
|
62
|
-
ngOnInit() {
|
|
63
|
-
if (this.labelSubtitle)
|
|
64
|
-
this._renderer.addClass(this._element.nativeElement, 'rc-ses-has-label-subtitle');
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
ngAfterViewInit() {}
|
|
68
|
-
|
|
69
|
-
ngAfterContentInit(): void {
|
|
70
|
-
if (this.input?.readonly) {
|
|
71
|
-
this._renderer.addClass(this.formField._elementRef.nativeElement, 'mat-form-field-readonly');
|
|
72
|
-
this._renderer.addClass(this.formFieldRef.nativeElement, 'mat-form-field--readonly');
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (this.rcSesAgreementCheckboxComponent)
|
|
76
|
-
this._renderer.addClass(this._element.nativeElement, 'rc-ses-form-field--contains--agreement-checkbox-component');
|
|
77
|
-
|
|
78
|
-
if (this.rcSesRadioButtonGroupComponent)
|
|
79
|
-
this._renderer.addClass(this._element.nativeElement, 'rc-ses-form-field--contains--radio-button-group-component');
|
|
80
|
-
|
|
81
|
-
this.initialized = true;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
ngOnDestroy() {
|
|
85
|
-
this.initialized = false;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
@use 'sass:color';
|
|
2
|
-
@use '@angular/material' as mat;
|
|
3
|
-
|
|
4
|
-
@mixin bootstrap($theme, $typography) {
|
|
5
|
-
@layer rc-ses {
|
|
6
|
-
.rc-ses-agreement-checkbox {
|
|
7
|
-
flex-grow: 1;
|
|
8
|
-
|
|
9
|
-
b, strong {
|
|
10
|
-
font-weight: 600;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.mat-mdc-form-field {
|
|
14
|
-
background-color: mat.get-theme-color($theme, neutral, 99);
|
|
15
|
-
display: block !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.mat-form-field {
|
|
19
|
-
|
|
20
|
-
&-appearance-fill {
|
|
21
|
-
|
|
22
|
-
.mat-internal-form-field {
|
|
23
|
-
--mat-checkbox-label-text-size: #{map-get($typography, 'body-2', 'font-size')};
|
|
24
|
-
line-height: 1.3125rem;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@layer rc-ses-variables {
|
|
32
|
-
:root {
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|