diff --git a/package-lock.json b/package-lock.json index 854c6f2..17d3362 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,6 @@ "axios": "^1.2.1", "pinia": "^2.0.11", "quasar": "^2.6.0", - "swiper": "^11.0.5", "v-mask": "^2.3.0", "vee-validate": "^4.12.2", "vue": "^3.0.0", @@ -23,6 +22,7 @@ "zod": "^3.22.4" }, "devDependencies": { + "@babel/types": "^7.23.6", "@faker-js/faker": "^8.3.1", "@quasar/app-vite": "^1.3.0", "@types/node": "^12.20.21", @@ -51,6 +51,24 @@ "node": ">=0.10.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/parser": { "version": "7.23.6", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", @@ -62,6 +80,20 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/types": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", + "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -5287,24 +5319,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/swiper": { - "version": "11.0.5", - "resolved": "https://registry.npmjs.org/swiper/-/swiper-11.0.5.tgz", - "integrity": "sha512-rhCwupqSyRnWrtNzWzemnBLMoyYuoDgGgspAm/8iBD3jCvAWycPLH4Z3TB0O5520DHLzMx94yUMH/B9Efpa48w==", - "funding": [ - { - "type": "patreon", - "url": "https://www.patreon.com/swiperjs" - }, - { - "type": "open_collective", - "url": "http://opencollective.com/swiper" - } - ], - "engines": { - "node": ">= 4.7.0" - } - }, "node_modules/table": { "version": "6.8.1", "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", @@ -5383,6 +5397,15 @@ "node": ">=0.6.0" } }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/package.json b/package.json index 890ef42..2519361 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "dev": "quasar dev -m ssr", "backend": "json-server -p 5000 -d 3000 -w src/services/json-server/db.json", "build": "quasar build -m ssr", - "start:build": "npm run build && cd dist/ssr && npm i && npm run start" + "start:build": "npm run build && cd dist/ssr && npm i && npm run start", + "typecheck": "tsc --project tsconfig.json --noEmit" }, "dependencies": { "@quasar/extras": "^1.16.4", @@ -20,7 +21,6 @@ "axios": "^1.2.1", "pinia": "^2.0.11", "quasar": "^2.6.0", - "swiper": "^11.0.5", "v-mask": "^2.3.0", "vee-validate": "^4.12.2", "vue": "^3.0.0", @@ -29,6 +29,7 @@ "zod": "^3.22.4" }, "devDependencies": { + "@babel/types": "^7.23.6", "@faker-js/faker": "^8.3.1", "@quasar/app-vite": "^1.3.0", "@types/node": "^12.20.21", diff --git a/src/components/@inputs/Calendar.vue b/src/components/@inputs/Calendar.vue index 782779d..d6deadd 100644 --- a/src/components/@inputs/Calendar.vue +++ b/src/components/@inputs/Calendar.vue @@ -50,9 +50,9 @@ import { toTypedSchema } from '@vee-validate/zod'; import { storeToRefs } from 'pinia'; import { useFormStore } from 'src/stores/forms'; +import { availabilitySchema } from 'src/utils/zod/schemas/availabilitySchema'; import { useForm } from 'vee-validate'; import { defineComponent, ref } from 'vue'; -import { z } from 'zod'; import IconCalendar from '../icons/IconCalendar.vue'; export default defineComponent({ @@ -70,34 +70,7 @@ export default defineComponent({ const proxyDate = ref(fullCurrentDate); const validationSchema = toTypedSchema( - z.object({ - date: z.string().refine((val) => { - const [day, month, year] = val.split('/'); - console.log({ day, month, year }); - const regex = /\//g; - const valWithoutSlash = val.replace(regex, ''); - /* const daysOnMonth = (month: number, year: number) => { - const data = new Date(year, month, 0); - return data.getDate(); - }; - const daysOnMonthValue = daysOnMonth(+month, +year); */ - - const data = new Date(`${year}-${month}-${day}`); - const today = new Date(); - - return ( - valWithoutSlash.length === 8 && - /* +year >= currentYear && - +month >= currentMonth && - +day >= +currentDay && */ - data >= today /* && - +month > 0 && - +month <= 12 && - +day > 0 && - +day <= daysOnMonthValue */ - ); - }, 'La fecha no puede ser inferior al día de hoy!'), - }) + availabilitySchema.pick({ date: true }) ); const { errors, defineField } = useForm({ validationSchema, diff --git a/src/components/@inputs/PostalCode.vue b/src/components/@inputs/PostalCode.vue index 36309ef..0aa2122 100644 --- a/src/components/@inputs/PostalCode.vue +++ b/src/components/@inputs/PostalCode.vue @@ -26,9 +26,9 @@ import { toTypedSchema } from '@vee-validate/zod'; import { storeToRefs } from 'pinia'; import { useFormStore } from 'src/stores/forms'; +import { availabilitySchema } from 'src/utils/zod/schemas/availabilitySchema'; import { useForm } from 'vee-validate'; import { defineComponent } from 'vue'; -import { z } from 'zod'; import IconPostalCode from '../icons/IconPostalCode.vue'; export default defineComponent({ @@ -38,19 +38,7 @@ export default defineComponent({ const formStore = useFormStore(); const { availability } = storeToRefs(formStore); const validationSchema = toTypedSchema( - z - .object({ - postalCode: z.string().refine((val) => { - const valWithoutHifen = val.replace('-', ''); - const valLength = valWithoutHifen.length; - const regex = /^[0-9]+$/; - - return ( - regex.test(valWithoutHifen) && valLength === 8 && valLength > 0 - ); - }, 'El código postal no puede contener letras y debe constar de 8 caracteres!'), - }) - .partial() + availabilitySchema.pick({ postalCode: true }).partial() ); const { errors, defineField } = useForm({ validationSchema, diff --git a/src/components/@inputs/SortSelect.vue b/src/components/@inputs/SortSelect.vue new file mode 100644 index 0000000..09e14b5 --- /dev/null +++ b/src/components/@inputs/SortSelect.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/src/components/ExampleComponent.vue b/src/components/ExampleComponent.vue deleted file mode 100644 index 3bfd35e..0000000 --- a/src/components/ExampleComponent.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - diff --git a/src/components/icons/credit-flags/IconExpress.vue b/src/components/icons/credit-flags/IconExpress.vue new file mode 100644 index 0000000..68a900e --- /dev/null +++ b/src/components/icons/credit-flags/IconExpress.vue @@ -0,0 +1,54 @@ + diff --git a/src/components/icons/credit-flags/IconMaster.vue b/src/components/icons/credit-flags/IconMaster.vue new file mode 100644 index 0000000..16b1a07 --- /dev/null +++ b/src/components/icons/credit-flags/IconMaster.vue @@ -0,0 +1,42 @@ + + + diff --git a/src/components/icons/svg/ArrowCircleFilledLeft.svg b/src/components/icons/svg/ArrowCircleFilledLeft.svg new file mode 100644 index 0000000..fa7240e --- /dev/null +++ b/src/components/icons/svg/ArrowCircleFilledLeft.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/src/components/icons/svg/ArrowCircleFilledRight.svg b/src/components/icons/svg/ArrowCircleFilledRight.svg new file mode 100644 index 0000000..31ecbba --- /dev/null +++ b/src/components/icons/svg/ArrowCircleFilledRight.svg @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/src/components/models.ts b/src/components/models.ts deleted file mode 100644 index 6945920..0000000 --- a/src/components/models.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface Todo { - id: number; - content: string; -} - -export interface Meta { - totalCount: number; -} diff --git a/src/components/quasar-components/carousel/HorizontalCarousel.vue b/src/components/quasar-components/carousel/HorizontalCarousel.vue index 035449c..611ae6a 100644 --- a/src/components/quasar-components/carousel/HorizontalCarousel.vue +++ b/src/components/quasar-components/carousel/HorizontalCarousel.vue @@ -1,29 +1,87 @@ + + diff --git a/src/components/swiper/Swiper.vue b/src/components/swiper/Swiper.vue new file mode 100644 index 0000000..d4ab691 --- /dev/null +++ b/src/components/swiper/Swiper.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/src/components/ui/Card.vue b/src/components/ui/Card.vue index a8b67c5..05c9823 100644 --- a/src/components/ui/Card.vue +++ b/src/components/ui/Card.vue @@ -139,6 +139,9 @@ export default defineComponent({ border-radius: 15px; overflow: hidden; position: relative; + &:focus-visible { + outline: 2px solid $primary-light; + } &:hover { & .tags { @@ -170,6 +173,7 @@ export default defineComponent({ font-family: $font-lora; user-select: none; font-weight: 600; + font-size: $font-12; &.new { color: $white; @@ -180,6 +184,10 @@ export default defineComponent({ background: $primary-light; color: $primary-dark; } + + @media only screen and (max-width: $med-lg) { + font-size: $font-10; + } } } diff --git a/src/components/ui/MobileNav.vue b/src/components/ui/MobileNav.vue index 948b0a0..06e52bf 100644 --- a/src/components/ui/MobileNav.vue +++ b/src/components/ui/MobileNav.vue @@ -1,11 +1,19 @@ @@ -216,7 +264,16 @@ export default defineComponent({ padding: 4px 30px 4px 14px; } &.order-filter { - padding: 4px 30px 4px 14px; + padding: 4px 10px 4px 20px; + text-align: end; + border-radius: 10px 0px 0px 10px; + &.active { + border-radius: 10px 0px 0px 0px; + } + + & .order-filters { + position: relative; + } } &.filters { @@ -230,6 +287,7 @@ export default defineComponent({ & .filter-btn { padding: 8px; border-radius: 0 30px 30px 0; + &.availability, &.price-order { position: absolute; @@ -243,6 +301,7 @@ export default defineComponent({ &.price-order { right: -33px; padding: 9.5px; + top: 0; } } @@ -250,6 +309,7 @@ export default defineComponent({ display: flex; gap: 40px; margin-right: 33px; + align-items: flex-start; } @media only screen and (max-width: $med-md) { diff --git a/src/pages/CheckoutPage.vue b/src/pages/CheckoutPage.vue index 3cec1dc..b264577 100644 --- a/src/pages/CheckoutPage.vue +++ b/src/pages/CheckoutPage.vue @@ -1,75 +1,86 @@