Skip to content

Commit 72ef7ef

Browse files
authored
feat(input): end-slot hover and 16px icon buttons #IX-2004 (#2441)
1 parent b38ca0a commit 72ef7ef

30 files changed

Lines changed: 27 additions & 8 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@siemens/ix': patch
3+
---
4+
5+
Unify hover behavior for input end slots and use 16px icon in end-slot icon buttons.
6+
7+
**Affected components:** ix-input (password toggle), ix-date-input (calendar), ix-time-input (clock).

packages/core/src/components/date-input/date-input.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ export class DateInput implements IxInputFieldComponent<string | undefined> {
456456
data-testid="open-calendar"
457457
class={{ 'calendar-hidden': this.disabled || this.readonly }}
458458
variant="subtle-tertiary"
459+
size="16"
459460
icon={iconCalendar}
460461
onClick={(event) => this.onCalenderClick(event)}
461462
aria-label={this.ariaLabelCalendarButton}

packages/core/src/components/input/input.mixins.scss

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@
7676
}
7777

7878
.start-container {
79-
left: 0;
79+
left: var(--theme-input--border-thickness);
8080
}
8181

8282
.end-container {
83-
right: 0;
83+
right: calc(var(--theme-input--border-thickness) + 0.125rem);
8484
}
8585

8686
@include applySpacingToStartSlot;
@@ -90,6 +90,11 @@
9090
margin-top: 0.25rem;
9191
margin-bottom: 0.25rem;
9292
}
93+
94+
.input-wrapper:hover input:not(:disabled):not(:read-only) {
95+
border-color: var(--theme-input--border-color--hover) !important;
96+
background-color: var(--theme-input--background--hover);
97+
}
9398
}
9499

95100
:host(.disabled) {
@@ -108,7 +113,8 @@
108113
border-color: var(--theme-input--border-color--info);
109114
}
110115

111-
input:hover {
116+
input:hover,
117+
.input-wrapper:hover input {
112118
border-color: var(--theme-input--border-color--info--hover) !important;
113119
}
114120

@@ -125,7 +131,8 @@
125131
) !important;
126132
}
127133

128-
input:hover {
134+
input:hover,
135+
.input-wrapper:hover input {
129136
background-color: var(--theme-input--background--warning--hover);
130137
border-color: var(
131138
--theme-input--border-color--warning--active
@@ -145,7 +152,8 @@
145152
border-color: var(--theme-input--border-color--invalid) !important;
146153
}
147154

148-
input:hover {
155+
input:hover,
156+
.input-wrapper:hover input {
149157
background-color: var(--theme-input--background--invalid--hover);
150158
border-color: var(--theme-input--border-color--invalid--hover) !important;
151159
}

packages/core/src/components/input/input.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ export class Input implements IxInputFieldComponent<string> {
361361
'eye-hidden': this.type !== 'password' || this.disabled,
362362
}}
363363
variant="tertiary"
364+
size="16"
364365
icon={
365366
this.inputType === 'password' ? iconEye : iconEyeCancelled
366367
}

packages/core/src/components/input/number-input.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
position: relative;
2323
flex-direction: row;
2424
flex-wrap: nowrap;
25-
margin-right: 0.25rem;
2625

2726
&.container-hidden {
2827
display: none;

packages/core/src/components/time-input/time-input.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ export class TimeInput implements IxInputFieldComponent<string> {
469469
data-testid="open-time-picker"
470470
class={{ 'time-icon-hidden': this.disabled || this.readonly }}
471471
variant="subtle-tertiary"
472+
size="16"
472473
icon={iconClock}
473474
onClick={(event) => this.onTimeIconClick(event)}
474475
aria-label="Toggle time picker"
441 Bytes
Loading
405 Bytes
Loading
281 Bytes
Loading
280 Bytes
Loading

0 commit comments

Comments
 (0)