diff --git a/frontend/assets/css/tailwind.css b/frontend/assets/css/tailwind.css index c4265cd..daa5770 100644 --- a/frontend/assets/css/tailwind.css +++ b/frontend/assets/css/tailwind.css @@ -271,4 +271,40 @@ button { @apply cursor-pointer; } + + .vpd-main { + @apply !w-full !border-none !p-0; + } + + .vpd-input-group { + @apply !flex-row-reverse; + } + + .vpd-input-group > input { + @apply !border-e-0 !rounded-none !rounded-s-100 !px-4; + } + + .vpd-input-group > label { + @apply !rounded-e-100; + } + + .vpd-main > .vpd-wrapper > .vpd-container { + @apply !rounded-xl !overflow-hidden; + } + + .vpd-main.error > .vpd-input-group > #vpd-vpd-date-picker { + @apply border-danger-600 border-2; + } + + .vpd-main > .vpd-input-group > .vpd-icon-btn { + @apply !bg-black; + } + + .vpd-main.error > .vpd-input-group > .vpd-icon-btn { + @apply bg-danger-600 border-danger-600 border-t-2 border-r-2 border-b; + } + + .vpd-controls button { + @apply flex justify-center items-center; + } } diff --git a/frontend/components/global/Datepicker.vue b/frontend/components/global/Datepicker.vue new file mode 100644 index 0000000..5cabbeb --- /dev/null +++ b/frontend/components/global/Datepicker.vue @@ -0,0 +1,48 @@ + + + diff --git a/frontend/components/global/Header.vue b/frontend/components/global/Header.vue index d94de13..0ee91ea 100644 --- a/frontend/components/global/Header.vue +++ b/frontend/components/global/Header.vue @@ -43,7 +43,7 @@ const isHomePage = computed(() => route.path === "/"); ? `${account.first_name.charAt( 0 )} ${account.last_name.charAt(0)}` - : '' + : 'بدون نام کاربری' " /> diff --git a/frontend/components/global/Input.vue b/frontend/components/global/Input.vue index 7481b6b..f467f30 100644 --- a/frontend/components/global/Input.vue +++ b/frontend/components/global/Input.vue @@ -5,15 +5,17 @@ type Props = { error?: boolean; message?: string; placeholder?: string; - modelValue?: string; + modelValue: string; }; // props const props = withDefaults(defineProps(), { variant: "solid", + disabled: false, + placeholder: "وارد نشده", }); -const { variant, message, error, disabled } = toRefs(props); +const { variant, message, error, disabled, modelValue } = toRefs(props); // emits @@ -25,6 +27,11 @@ const inputRef = ref(null); // computed +const value = computed({ + get: () => modelValue.value ?? "", + set: (value) => emit("update:modelValue", value), +}); + const classes = computed(() => { return [ "flex items-center text-black justify-between cursor-text transition-all border-[1.5px] gap-3 typo-label-md px-4 py-3.5 selection:bg-slate-100 rounded-100", @@ -38,12 +45,6 @@ const classes = computed(() => { }, ]; }); - -// methods - -const onInput = (e: any) => { - emit("update:modelValue", e.target.value); -};