@kms-ngx-ui/presentational 20.0.11 → 20.1.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.
- package/fesm2022/kms-ngx-ui-presentational.mjs +1628 -298
- package/fesm2022/kms-ngx-ui-presentational.mjs.map +1 -1
- package/index.d.ts +703 -215
- package/package.json +2 -1
- package/src/assets/icons.json +1 -1
- package/src/assets/sprite.svg +1 -1
- package/src/lib/ui/molecules/date-input/date-input.component.scss +11 -0
- package/src/lib/ui/molecules/numeric-input/numeric-input.component.scss +11 -0
- package/src/lib/ui/molecules/text-input/text-input.component.scss +15 -0
- package/src/lib/ui/organisms/generic-form/components/form-actions/form-actions.component.scss +9 -0
- package/src/lib/ui/organisms/generic-form/components/form-field/form-field.component.scss +82 -0
- package/src/lib/ui/organisms/generic-form/components/form-section/form-section.component.scss +28 -0
- package/src/lib/ui/organisms/generic-form/components/generic-form/generic-form.component.scss +30 -0
- package/src/styles/default-values.scss +1 -0
- package/src/styles/styles.scss +5 -0
|
@@ -2,12 +2,23 @@
|
|
|
2
2
|
.numeric-input {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: row;
|
|
5
|
+
align-items: center;
|
|
5
6
|
gap: 16px;
|
|
6
7
|
width: fit-content;
|
|
7
8
|
background-color: var(--kms-tertiary-800);
|
|
8
9
|
padding: 4px 8px;
|
|
9
10
|
border-radius: 24px;
|
|
10
11
|
|
|
12
|
+
strong {
|
|
13
|
+
min-width: 1ch;
|
|
14
|
+
text-align: center;
|
|
15
|
+
line-height: 1.2;
|
|
16
|
+
|
|
17
|
+
&:empty::after {
|
|
18
|
+
content: '\00a0';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
11
22
|
&__icon {
|
|
12
23
|
cursor: pointer;
|
|
13
24
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.kms-form-field {
|
|
6
|
+
&__mat-field {
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&__label-row {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 4px;
|
|
14
|
+
margin-bottom: 4px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__group-label {
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
font-weight: 500;
|
|
20
|
+
color: var(--mat-form-field-label-text-color, rgba(0, 0, 0, 0.6));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__row {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: flex-start;
|
|
26
|
+
gap: 4px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__control {
|
|
30
|
+
flex: 1;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__tooltip {
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
cursor: help;
|
|
37
|
+
padding-top: 16px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&__errors {
|
|
41
|
+
padding: 0 16px;
|
|
42
|
+
margin-top: 4px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&__error {
|
|
46
|
+
font-size: 12px;
|
|
47
|
+
line-height: 1.2;
|
|
48
|
+
color: var(--mat-form-field-error-text-color, #f44336);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Full-width for library components that wrap a mat-form-field
|
|
53
|
+
:host ::ng-deep {
|
|
54
|
+
kms-dropdown-from-data,
|
|
55
|
+
kms-date-input,
|
|
56
|
+
kms-time-input,
|
|
57
|
+
kms-color-input {
|
|
58
|
+
display: block;
|
|
59
|
+
width: 100%;
|
|
60
|
+
|
|
61
|
+
.mat-mdc-form-field {
|
|
62
|
+
width: 100%;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Numeric input: label and control in one row
|
|
67
|
+
kms-numeric-input {
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
gap: 12px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Disabled styling via CSS custom property
|
|
74
|
+
.mat-mdc-form-field.mat-form-field-disabled .mdc-text-field {
|
|
75
|
+
background-color: var(--kms-field-disabled-bg, transparent);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Hide bottom line on disabled fields when no background is shown
|
|
79
|
+
.mat-mdc-form-field.mat-form-field-disabled .mdc-line-ripple {
|
|
80
|
+
display: var(--kms-field-disabled-line, none);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.kms-form-section {
|
|
6
|
+
border: none;
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 0;
|
|
9
|
+
min-inline-size: auto; // override fieldset default
|
|
10
|
+
|
|
11
|
+
&__legend {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 4px;
|
|
15
|
+
font-size: 16px;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
padding: 0 0 8px;
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&__grid {
|
|
22
|
+
display: grid;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__cell {
|
|
26
|
+
min-width: 0; // prevent grid blowout from long content
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.kms-generic-form {
|
|
6
|
+
position: relative;
|
|
7
|
+
|
|
8
|
+
&--loading {
|
|
9
|
+
pointer-events: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&__loading-overlay {
|
|
13
|
+
position: absolute;
|
|
14
|
+
inset: 0;
|
|
15
|
+
background: rgba(255, 255, 255, 0.6);
|
|
16
|
+
z-index: 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&__sr-only {
|
|
20
|
+
position: absolute;
|
|
21
|
+
width: 1px;
|
|
22
|
+
height: 1px;
|
|
23
|
+
padding: 0;
|
|
24
|
+
margin: -1px;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
clip: rect(0, 0, 0, 0);
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
border: 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
package/src/styles/styles.scss
CHANGED
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
@import '../lib/ui/molecules/time-input/time-input.component';
|
|
34
34
|
@import '../lib/ui/molecules/tooltip-icon/tooltip-icon.component';
|
|
35
35
|
@import '../lib/ui/molecules/yes-no-radiogroup/yes-no-radiogroup.component';
|
|
36
|
+
@import '../lib/ui/molecules/text-input/text-input.component';
|
|
37
|
+
@import '../lib/ui/molecules/date-input/date-input.component';
|
|
38
|
+
|
|
36
39
|
// Organisms
|
|
37
40
|
|
|
38
41
|
@include button-theme();
|
|
@@ -56,3 +59,5 @@
|
|
|
56
59
|
@include password-theme();
|
|
57
60
|
@include card-theme();
|
|
58
61
|
@include numeric-input-theme();
|
|
62
|
+
@include text-input-theme();
|
|
63
|
+
@include date-input-theme();
|