💄 Fix design review for input component

This commit is contained in:
Xavier Julian 2025-05-07 10:28:44 +02:00 committed by Xaviju
parent 92f5b5f92b
commit 36e1ad287c
4 changed files with 8 additions and 3 deletions

View file

@ -48,9 +48,9 @@
props (mf/spread-props props {:ref ref props (mf/spread-props props {:ref ref
:type type :type type
:id id :id id
:hint-type hint-type
:max-length max-length :max-length max-length
:has-hint has-hint :has-hint has-hint
:hint-type hint-type
:variant variant})] :variant variant})]
[:div {:class (dm/str class " " (stl/css-case :input-wrapper true [:div {:class (dm/str class " " (stl/css-case :input-wrapper true
:variant-dense (= variant "dense") :variant-dense (= variant "dense")

View file

@ -26,7 +26,6 @@
background: var(--input-bg-color); background: var(--input-bg-color);
border-radius: $br-8; border-radius: $br-8;
padding: 0 var(--sp-s); padding: 0 var(--sp-s);
outline-offset: #{$b-1};
outline: $b-1 solid var(--input-outline-color); outline: $b-1 solid var(--input-outline-color);
&:hover { &:hover {
@ -112,7 +111,7 @@
margin-inline-start: var(--sp-xxs); margin-inline-start: var(--sp-xxs);
} }
.hint-type-error:has(.has-hint) { .hint-type-error {
--input-outline-color: var(--color-foreground-error); --input-outline-color: var(--color-foreground-error);
} }

View file

@ -19,6 +19,11 @@
align-items: center; align-items: center;
} }
.label-text,
.label-optional {
line-height: inherit;
}
.label-text { .label-text {
color: var(--label-color); color: var(--label-color);
} }

View file

@ -536,6 +536,7 @@
:variant "comfortable" :variant "comfortable"
:auto-focus true :auto-focus true
:default-value @token-name-ref :default-value @token-name-ref
:hint-type (when (seq (:errors @name-errors)) "error")
:ref name-ref :ref name-ref
:on-blur on-blur-name :on-blur on-blur-name
:on-change on-update-name}]) :on-change on-update-name}])