fix(style): consistent input colors

This commit is contained in:
ArneBo 2025-01-18 00:34:46 +01:00
parent ac9eaa4e5f
commit aac44f930e
5 changed files with 28 additions and 21 deletions

View File

@ -7,16 +7,23 @@ import { color } from "~/composables/color.ts";
import Button from "~/components/ui/Button.vue"
import Layout from "~/components/ui/Layout.vue"
const { icon, placeholder, ...restProps } = defineProps<{
icon?: string,
placeholder?: string,
password?: true,
search?: true,
numeric?: true,
label?: string,
const props = withDefaults(
defineProps<{
icon?: string;
placeholder?: string;
password?: true;
search?: true;
numeric?: true;
label?: string;
autofocus?: boolean;
raised?: boolean;
}>(),
{
raised: false, // Default value
}
);
autofocus? : boolean
}>()
const { icon, placeholder, ...restProps } = props;
// TODO(A11y): Add `inputmode="numeric" pattern="[0-9]*"` to input if model type is number:
// https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/
@ -60,7 +67,7 @@ const model = defineModel<string|number>()
</span>
<input
v-bind="{...$attrs, ...attributes, ...color({}, ['default', 'raised', 'solid', 'secondary'])()}"
v-bind="{...$attrs, ...attributes, ...color(props, ['solid', 'default', 'secondary'])()}"
v-model="model"
ref="input"
:placeholder="placeholder"

View File

@ -65,7 +65,7 @@ const deselectPill = (value:string) =>
<!-- List of Pills -->
<Layout flex gap-8
v-bind="color({}, ['solid', 'default', 'raised'])()"
v-bind="color({}, ['solid', 'default', 'secondary'])()"
:class="$style.list"
>
<Pill outline raised

View File

@ -7,7 +7,6 @@ import Button from '../Button.vue'
icon="bi-three-dots-vertical"
class="options-button"
secondary
raised
round
/>
</template>

View File

@ -6,21 +6,22 @@
--padding: 16px;
> input {
background-color: var(--fw-bg-color);
box-shadow: inset 0 0 0 4px var(--fw-border-color);
outline: none;
border:none;
border: none !important;
width: 100%;
padding: 9px 16px;
padding: calc(var(--padding-v) - 1px) var(--padding) calc(var(--padding-v) + 1px) var(--padding);
padding: 10px 16px;
font-size: 14px;
font-family: $font-main;
line-height: 28px;
border: none;
border-radius: var(--fw-border-radius);
cursor: text;
@include light-theme {
&.raised {
background-color: #ffffff;
border-color: var(--border-color);
}
}
&:hover {
box-shadow: inset 0 0 0 4px var(--border-color);
}

View File

@ -130,7 +130,7 @@
.secondary {
--color: var(--fw-gray-700);
--background-color: var(--fw-gray-200);
--border-color:var(--fw-gray-700);
--border-color:var(--fw-gray-300);
--hover-color:var(--fw-gray-800);
--hover-background-color:var(--fw-gray-300);