@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.
@@ -0,0 +1,11 @@
1
+ @mixin date-input-theme() {
2
+ .kms-date-input {
3
+ &__form-field {
4
+ width: 100%;
5
+ }
6
+
7
+ &__icon {
8
+ vertical-align: unset;
9
+ }
10
+ }
11
+ }
@@ -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,15 @@
1
+ @mixin text-input-theme() {
2
+ .kms-text-input {
3
+ &__form-field {
4
+ width: 100%;
5
+ }
6
+
7
+ &__prefix {
8
+ margin-left: $base-spacing;
9
+ }
10
+
11
+ &__suffix {
12
+ margin-right: $base-spacing;
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,9 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .kms-form-actions {
6
+ display: flex;
7
+ justify-content: flex-end;
8
+ padding: 8px 0;
9
+ }
@@ -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
+ }
@@ -8,6 +8,7 @@ $responsive-breakpoint-xxxl: 1920px !default;
8
8
  $responsive-breakpoint: $responsive-breakpoint-s !default;
9
9
 
10
10
  // spacing
11
+ $base-spacing: 16px;
11
12
  $base-spacing-vert: 16px !default;
12
13
  $base-spacing-hoz: 24px !default;
13
14
  $base-spacing-vert-half: 8px !default;
@@ -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();