|
199 | 199 | if (!labelRef) return; |
200 | 200 | if (position === NeoInputLabelPosition.Inside && !floating) return; |
201 | 201 | labelHeight = `${labelRef?.clientHeight ?? 0}px`; |
202 | | - if (position === NeoInputLabelPosition.Left || position === NeoInputLabelPosition.Right) return; |
| 202 | + if (position !== NeoInputLabelPosition.Left && position !== NeoInputLabelPosition.Right) return; |
203 | 203 | labelWidth = `${labelRef?.clientWidth ?? 0}px`; |
204 | 204 | }); |
205 | 205 |
|
|
261 | 261 | {#if affix} |
262 | 262 | <span class="neo-input-affix" class:suffix role="none" onclick={focus}> |
263 | 263 | {#if loading} |
264 | | - <span out:fade={enterDefaultTransition}> |
| 264 | + <span class="neo-input-loading" out:fade={enterDefaultTransition}> |
265 | 265 | <IconCircleLoading width="1.1875rem" height="1.1875rem" /> |
266 | 266 | </span> |
267 | 267 | {:else if close} |
268 | 268 | <button class="neo-input-clear" aria-label="clear" in:fade out:fade={enterDefaultTransition} onclick={() => clear()}> |
269 | | - <IconClear width="1.1875rem" height="1.1875rem" /> |
| 269 | + <IconClear /> |
270 | 270 | </button> |
271 | 271 | {:else} |
272 | 272 | <span class="neo-input-affix-validation" in:fade={leaveDefaultTransition}> |
|
396 | 396 |
|
397 | 397 | .neo-input-group, |
398 | 398 | .neo-input, |
| 399 | + .neo-input-loading, |
399 | 400 | .neo-input-clear, |
400 | 401 | .neo-input-affix, |
401 | 402 | .neo-input-prefix, |
|
445 | 446 | } |
446 | 447 |
|
447 | 448 | &.prefix { |
448 | | - margin-left: -0.9rem; |
| 449 | + margin-left: -0.7rem; |
449 | 450 | } |
450 | 451 |
|
451 | 452 | &.suffix { |
|
480 | 481 |
|
481 | 482 | &.suffix { |
482 | 483 | min-width: 2rem; |
483 | | - margin-right: -0.25rem; |
| 484 | + margin-right: -0.05rem; |
484 | 485 | padding-right: 0; |
485 | 486 | } |
486 | 487 | } |
|
528 | 529 |
|
529 | 530 | align-items: center; |
530 | 531 | justify-content: center; |
| 532 | + width: 1.1875rem; |
| 533 | + height: 1.1875rem; |
| 534 | + margin: 0; |
| 535 | + padding: 0; |
531 | 536 | color: var(--neo-input-clear-color, inherit); |
532 | 537 | background-color: var(--neo-background-color-darker); |
533 | 538 | border: none; |
534 | 539 | border-radius: 50%; |
535 | 540 | aspect-ratio: 1; |
536 | 541 |
|
| 542 | + :global(svg) { |
| 543 | + width: 100%; |
| 544 | + height: 100%; |
| 545 | + margin: 0.05rem; |
| 546 | + } |
| 547 | +
|
537 | 548 | &:focus-visible { |
538 | 549 | color: var(--neo-close-color-focused, rgb(255 0 0 / 75%)); |
539 | 550 | background-color: var(--neo-close-bg-color-focused, rgb(255 0 0 / 5%)); |
|
615 | 626 | .neo-input-group { |
616 | 627 | position: relative; |
617 | 628 | margin: var(--neo-shadow-margin, 0.6rem); |
| 629 | + padding: 0 0.2rem; |
618 | 630 | color: var(--neo-input-text-color, inherit); |
619 | 631 | background-color: var(--neo-input-bg-color, inherit); |
620 | 632 | border: var(--neo-border-width, 1px) var(--neo-input-border-color, transparent) solid; |
|
670 | 682 | border-radius: var(--neo-input-border-radius-lg, var(--neo-border-radius-lg)); |
671 | 683 |
|
672 | 684 | &.prefix { |
673 | | - margin-left: -1.25rem; |
| 685 | + margin-left: -0.9rem; |
674 | 686 | } |
675 | 687 |
|
676 | 688 | &-prefix { |
677 | 689 | padding: 0.75rem 0.75rem 0.75rem 1rem; |
678 | 690 | } |
679 | 691 |
|
680 | 692 | &.suffix { |
681 | | - margin-right: -1.25rem; |
| 693 | + margin-right: -0.9rem; |
682 | 694 | } |
683 | 695 |
|
684 | 696 | &-suffix { |
|
0 commit comments