|
21 | 21 | * @prop --margin-bottom: Bottom margin of the input group |
22 | 22 | * @prop --margin-start: Left margin if direction is left-to-right, and right margin if direction is right-to-left of the input group |
23 | 23 | * |
24 | | - * @prop --padding-top: Top padding of the input boxes |
25 | | - * @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the input boxes |
26 | | - * @prop --padding-bottom: Bottom padding of the input boxes |
27 | | - * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the input boxes |
| 24 | + * @prop --padding-top: Top padding of the input group |
| 25 | + * @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the input group |
| 26 | + * @prop --padding-bottom: Bottom padding of the input group |
| 27 | + * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the input group |
28 | 28 | * |
29 | 29 | * @prop --height: Height of input boxes |
30 | 30 | * @prop --width: Width of input boxes |
|
33 | 33 | * @prop --separator-color: Color of the separator between boxes |
34 | 34 | * @prop --separator-width: Width of the separator between boxes |
35 | 35 | * @prop --separator-height: Height of the separator between boxes |
| 36 | + * @prop --separator-border-radius: Border radius of the separator between boxes |
36 | 37 | * |
37 | | - * @prop --highlight-color: Color used for the invalid state |
| 38 | + * @prop --highlight-color-invalid: Color used for the invalid state |
38 | 39 | */ |
39 | | - --margin-top: 16px; |
| 40 | + --margin-top: 0; |
40 | 41 | --margin-end: 0; |
41 | | - --margin-bottom: 16px; |
| 42 | + --margin-bottom: 0; |
42 | 43 | --margin-start: 0; |
43 | | - --padding-top: 0; |
| 44 | + --padding-top: 16px; |
44 | 45 | --padding-end: 0; |
45 | | - --padding-bottom: 0; |
| 46 | + --padding-bottom: 16px; |
46 | 47 | --padding-start: 0; |
47 | 48 | --min-width: 40px; |
48 | 49 | --separator-width: 8px; |
|
51 | 52 | --separator-color: #{$background-color-step-150}; |
52 | 53 | --background-focused: var(--background); |
53 | 54 | --border-color-focused: #{ion-color(primary, base, 0.4)}; |
| 55 | + --highlight-color-invalid: #{ion-color(danger, base)}; |
54 | 56 |
|
55 | 57 | display: block; |
56 | 58 | position: relative; |
57 | 59 | } |
58 | 60 |
|
59 | 61 | .input-otp-group { |
60 | 62 | @include margin(var(--margin-top), var(--margin-end), var(--margin-bottom), var(--margin-start)); |
| 63 | + @include padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start)); |
61 | 64 |
|
62 | 65 | display: flex; |
63 | 66 |
|
|
76 | 79 |
|
77 | 80 | .native-input { |
78 | 81 | @include border-radius(var(--border-radius)); |
79 | | - @include padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start)); |
80 | 82 |
|
81 | 83 | width: var(--width); |
82 | 84 |
|
83 | 85 | // Required to shrink the input box width |
84 | 86 | min-width: inherit; |
85 | 87 | height: var(--height); |
86 | 88 |
|
87 | | - border: var(--border-width, 1px) solid var(--border-color, var(--ion-border-color)); |
| 89 | + border-width: var(--border-width); |
| 90 | + border-color: var(--border-color); |
| 91 | + border-style: solid; |
88 | 92 |
|
89 | 93 | background: var(--background, var(--ion-background-color)); |
90 | 94 | color: var(--color, var(--ion-text-color)); |
|
203 | 207 | background: var(--background-focused); |
204 | 208 | } |
205 | 209 |
|
| 210 | +:host(.ion-invalid) .native-input { |
| 211 | + border-color: var(--highlight-color-invalid); |
| 212 | +} |
| 213 | + |
206 | 214 | // Colors |
207 | 215 | // -------------------------------------------------- |
208 | 216 |
|
|
0 commit comments