cloudcommerce 0.6.7 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/renovate.json +1 -1
- package/CHANGELOG.md +16 -0
- package/ecomplus-stores/monocard/.devcontainer/devcontainer.json +3 -0
- package/ecomplus-stores/monocard/.github/workflows/build-and-deploy.yml +4 -9
- package/ecomplus-stores/monocard/.vscode/launch.json +11 -0
- package/ecomplus-stores/monocard/functions/core/package.json +1 -1
- package/ecomplus-stores/monocard/functions/events/package.json +2 -2
- package/ecomplus-stores/monocard/functions/modules/package.json +2 -2
- package/ecomplus-stores/monocard/functions/passport/package.json +2 -2
- package/ecomplus-stores/monocard/functions/ssr/content/header.json +16 -28
- package/ecomplus-stores/monocard/functions/ssr/content/settings.json +39 -2
- package/ecomplus-stores/monocard/functions/ssr/package.json +14 -18
- package/ecomplus-stores/monocard/functions/ssr/public/assets/lotties/img_1.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/lotties/phone-nfc.json +1 -1
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-arcelor-mittal.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-azul.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-banco-pan.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-brinks.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-mastercard.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-pfizer.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-prudential.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo-unimed.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo.webp +0 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/AccountMenu.vue +104 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/CasesGrid.astro +49 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/LottiePhoneNFC.vue +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/MonocardCustomizer.vue +8 -8
- package/ecomplus-stores/monocard/functions/ssr/src/components/MotionFade.vue +17 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/PitchBar.vue +61 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/Prices.vue +112 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/SearchModal.vue +6 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeader.vue +97 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeaderMenu.vue +92 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenav.vue +65 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenavCategory.vue +78 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderButtons.vue +1 -21
- package/ecomplus-stores/monocard/functions/ssr/src/components/header/HeaderNav.vue +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/env.d.ts +2 -1
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Base.astro +11 -20
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Pages.astro +15 -2
- package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +53 -32
- package/ecomplus-stores/monocard/functions/ssr/src/pages/[...slug].astro +2 -2
- package/ecomplus-stores/monocard/functions/ssr/src/pages/_vue.ts +8 -1
- package/ecomplus-stores/monocard/functions/ssr/src/pages/comprar/index.astro +0 -2
- package/ecomplus-stores/monocard/functions/ssr/src/pages/fallback.astro +4 -2
- package/ecomplus-stores/monocard/functions/ssr/src/pages/index.astro +1 -1
- package/ecomplus-stores/monocard/functions/ssr/tailwind.config.cjs +29 -1
- package/ecomplus-stores/monocard/functions/ssr/tsconfig.json +0 -4
- package/ecomplus-stores/monocard/functions/ssr/uno.config.cjs +2 -1
- package/ecomplus-stores/monocard/package.json +1 -1
- package/ecomplus-stores/monocard/scripts/install.sh +1 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/package.json +0 -8
- package/package.json +9 -9
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/package.json +2 -2
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +2 -2
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +1 -1
- package/packages/apps/frenet/package.json +2 -2
- package/packages/apps/galaxpay/package.json +2 -2
- package/packages/apps/google-analytics/package.json +2 -2
- package/packages/apps/infinitepay/package.json +2 -2
- package/packages/apps/jadlog/package.json +2 -2
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +2 -2
- package/packages/apps/mercadopago/package.json +2 -2
- package/packages/apps/pagarme/package.json +2 -2
- package/packages/apps/paghiper/package.json +2 -2
- package/packages/apps/pix/package.json +2 -2
- package/packages/apps/tiny-erp/package.json +2 -2
- package/packages/apps/webhooks/package.json +2 -2
- package/packages/cli/package.json +2 -2
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +2 -2
- package/packages/events/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +3 -3
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +6 -6
- package/packages/storefront/dist/client/_astro/PitchBar.db7cd775.js +1 -0
- package/packages/storefront/dist/client/_astro/{Prices.7368883b.js → Prices.55399c72.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ProductCard.b9f8f3e7.js → ProductCard.7e891c08.js} +1 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.301e109b.js +4 -0
- package/packages/storefront/dist/client/_astro/_...slug_.0607a6ef.css +1 -0
- package/packages/storefront/dist/client/_astro/{_plugin-vue_export-helper.3dfd3410.js → _plugin-vue_export-helper.77ed7c18.js} +1 -1
- package/packages/storefront/dist/client/_astro/client.0de2f274.js +1 -0
- package/packages/storefront/dist/client/_astro/{format-money.e75b6ce1.js → format-money.ab6b71eb.js} +1 -1
- package/packages/storefront/dist/client/_astro/index.16f33784.js +1 -0
- package/packages/storefront/dist/client/_astro/{modules-info.6e650119.js → modules-info.06ac0727.js} +1 -1
- package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.d2f39f33.js +1 -0
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/client/workbox-e0d788d4.js +1 -0
- package/packages/storefront/dist/server/chunks/{astro.a9f695c0.mjs → astro.2e59789d.mjs} +7 -18
- package/packages/storefront/dist/server/chunks/pages/{all.571056bd.mjs → all.726ca7f4.mjs} +19 -14
- package/packages/storefront/dist/server/entry.mjs +10 -16
- package/packages/storefront/package.json +10 -10
- package/packages/storefront/src/lib/assets/base.css +5 -0
- package/packages/storefront/src/lib/pages/_vue.ts +6 -2
- package/packages/storefront/src/lib/ssr/Picture.astro +13 -4
- package/packages/storefront/src/lib/ssr-context.ts +1 -1
- package/packages/storefront/src/vue-globals.d.ts +2 -0
- package/packages/types/index.ts +1 -0
- package/packages/types/package.json +1 -1
- package/pnpm-workspace.yaml +3 -3
- package/ecomplus-stores/monocard/functions/ssr/content/contacts.json +0 -13
- package/ecomplus-stores/monocard/functions/ssr/content/info.json +0 -18
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/logo.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/HowItWorksAccordion.vue +0 -32
- package/ecomplus-stores/monocard/functions/ssr/src/components/TheHeader.vue +0 -42
- package/ecomplus-stores/monocard/functions/ssr/src/components/TopBar.vue +0 -10
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/PagesHeader.astro +0 -51
- package/packages/storefront/dist/client/_astro/PitchBar.16431255.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.7967a383.js +0 -4
- package/packages/storefront/dist/client/_astro/_...slug_.61014c4c.css +0 -1
- package/packages/storefront/dist/client/_astro/client.3ab4cffd.js +0 -1
- package/packages/storefront/dist/client/_astro/index.140ec818.js +0 -1
- package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.b4764bdb.js +0 -1
- package/packages/storefront/dist/client/assets/icons/bootstrap-icons/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/assets/icons/feather-icons/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/assets/icons/font-awesome/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/assets/icons/line-awesome/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/assets/icons/tabler-icons/font/storefront-icons.woff2 +0 -0
- package/packages/storefront/dist/client/workbox-e2ee76b5.js +0 -1
- /package/ecomplus-stores/monocard/functions/ssr/content/{social.json → metatags.json} +0 -0
- /package/ecomplus-stores/monocard/functions/ssr/src/{pages/monocard.astro → layouts/Checkout.astro} +0 -0
|
@@ -112,16 +112,16 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
112
112
|
<article class="lg:flex gap-5 max-w-4xl mx-auto">
|
|
113
113
|
<div class="mb-10 lg:mb-0 basis-1/2 order-2">
|
|
114
114
|
<div class="inline-block mb-3 mr-5">
|
|
115
|
-
<i class="i-
|
|
115
|
+
<i class="i-checkbox-circle-fill bg-primary mr-1"></i> Frete grátis
|
|
116
116
|
</div>
|
|
117
117
|
<div class="inline-block mb-3">
|
|
118
|
-
<i class="i-
|
|
118
|
+
<i class="i-checkbox-circle-fill bg-primary mr-1"></i> Sem mensalidade
|
|
119
119
|
</div>
|
|
120
120
|
<a name="comprar"></a>
|
|
121
121
|
<h1 class="mb-3">Seu cartão de visitas eletrônico personalizado</h1>
|
|
122
122
|
<h4 class="text-sm mb-10">
|
|
123
123
|
<a href="#como-funciona">
|
|
124
|
-
<i class="i-play-circle mr-1"></i>Como o Monocard funciona?
|
|
124
|
+
<i class="i-play-circle-line mr-1"></i>Como o Monocard funciona?
|
|
125
125
|
</a>
|
|
126
126
|
</h4>
|
|
127
127
|
<form>
|
|
@@ -152,7 +152,7 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
152
152
|
>
|
|
153
153
|
<div v-if="cardsBag.length > 1" class="flex-auto">
|
|
154
154
|
<div
|
|
155
|
-
class="text-xl ml-1 bg-red-400 i-
|
|
155
|
+
class="text-xl ml-1 bg-red-400 i-close-fill"
|
|
156
156
|
role="button"
|
|
157
157
|
:aria-label="`Remover cartão ${(i + 1)}`"
|
|
158
158
|
@click="removeCard(i)"
|
|
@@ -167,7 +167,7 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
167
167
|
type="button"
|
|
168
168
|
@click="cardsBag.push({ holderName: '', quantity: 1 })"
|
|
169
169
|
>
|
|
170
|
-
<i class="i-
|
|
170
|
+
<i class="i-add-circle-fill mr-1"></i>
|
|
171
171
|
Adicionar cartão
|
|
172
172
|
</button>
|
|
173
173
|
</div>
|
|
@@ -189,7 +189,7 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
189
189
|
<div class="card mt-2 mb-5" :class="cardAnimationClass">
|
|
190
190
|
<div class="card__front card__part">
|
|
191
191
|
<div class="card__front-square card__square">
|
|
192
|
-
<div class="text-5xl i-qr-code-
|
|
192
|
+
<div class="text-5xl i-qr-code-line"></div>
|
|
193
193
|
</div>
|
|
194
194
|
<div class="card__front-logo card__logo">
|
|
195
195
|
<div class="text-sm font-bold">monocard</div>
|
|
@@ -199,7 +199,7 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
199
199
|
</div>
|
|
200
200
|
<div class="card__space-25">
|
|
201
201
|
<p class="card__info">
|
|
202
|
-
<i class="text-lg i-wifi-
|
|
202
|
+
<i class="text-lg i-wifi-fill rotate-90"></i>
|
|
203
203
|
</p>
|
|
204
204
|
</div>
|
|
205
205
|
</div>
|
|
@@ -221,7 +221,7 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
221
221
|
>
|
|
222
222
|
<i
|
|
223
223
|
v-if="cardBgColor === bgColor"
|
|
224
|
-
class="text-xs i-
|
|
224
|
+
class="text-xs i-checkbox-fill absolute bg-green-300"
|
|
225
225
|
></i>
|
|
226
226
|
</button>
|
|
227
227
|
<div class="mt-5">
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component :is="as" v-if="!isOnce" v-motion-fade-visible>
|
|
3
|
+
<slot />
|
|
4
|
+
</component>
|
|
5
|
+
<component :is="as" v-else v-motion-fade-visible-once>
|
|
6
|
+
<slot />
|
|
7
|
+
</component>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup lang="ts">
|
|
11
|
+
export interface Props {
|
|
12
|
+
as?: string;
|
|
13
|
+
isOnce?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
withDefaults(defineProps<Props>(), { as: 'div' });
|
|
17
|
+
</script>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bg-black uppercase relative z-1">
|
|
3
|
+
<div class="bg-primary/20">
|
|
4
|
+
<div class="container md:w-2/3 mx-auto px-3 py-1">
|
|
5
|
+
<Carousel :autoplay="countValidSlides > 1 ? 7000 : null">
|
|
6
|
+
<li
|
|
7
|
+
v-for="(slide, i) in slides"
|
|
8
|
+
:key="i"
|
|
9
|
+
class="shrink-0 basis-full h-full text-center"
|
|
10
|
+
>
|
|
11
|
+
<component
|
|
12
|
+
:is="slide.href ? 'ALink' : 'span'"
|
|
13
|
+
:href="slide.href"
|
|
14
|
+
:target="slide.target"
|
|
15
|
+
class="inline-block px-8"
|
|
16
|
+
:class="slide.href ? 'hover:underline' : null"
|
|
17
|
+
>
|
|
18
|
+
<span
|
|
19
|
+
v-if="parsedContents[i]"
|
|
20
|
+
v-html="parsedContents[i]"
|
|
21
|
+
class="prose text-sm text-primary-100"
|
|
22
|
+
></span>
|
|
23
|
+
</component>
|
|
24
|
+
</li>
|
|
25
|
+
<template #controls>
|
|
26
|
+
<div
|
|
27
|
+
v-show="countValidSlides > 1"
|
|
28
|
+
class="text-xl leading-none text-primary-400"
|
|
29
|
+
>
|
|
30
|
+
<CarouselControl
|
|
31
|
+
:direction="-1"
|
|
32
|
+
class="pr-2 hover:text-primary-200"
|
|
33
|
+
/>
|
|
34
|
+
<CarouselControl class="pl-2 hover:text-primary-200" />
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
</Carousel>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script setup lang="ts">
|
|
44
|
+
import usePitchBar from '@@sf/composables/use-pitch-bar';
|
|
45
|
+
import Carousel from '@@sf/components/Carousel.vue';
|
|
46
|
+
import CarouselControl from '@@sf/components/CarouselControl.vue';
|
|
47
|
+
|
|
48
|
+
export interface Props {
|
|
49
|
+
slides: Array<{
|
|
50
|
+
href?: string;
|
|
51
|
+
target?: string;
|
|
52
|
+
html: string;
|
|
53
|
+
}>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const props = defineProps<Props>();
|
|
57
|
+
const {
|
|
58
|
+
parsedContents,
|
|
59
|
+
countValidSlides,
|
|
60
|
+
} = usePitchBar(props);
|
|
61
|
+
</script>
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="text-base-600"
|
|
4
|
+
:class="isBig ? 'text-lg' : null"
|
|
5
|
+
data-prices
|
|
6
|
+
>
|
|
7
|
+
<span v-if="comparePrice" class="text-base-500 mr-1">
|
|
8
|
+
<small v-if="isLiteral">
|
|
9
|
+
{{ `${$t.i19from} ` }}
|
|
10
|
+
</small>
|
|
11
|
+
<s>{{ $money(comparePrice) }}</s>
|
|
12
|
+
<small v-if="isLiteral">
|
|
13
|
+
{{ ` ${$t.i19to}` }}
|
|
14
|
+
</small>
|
|
15
|
+
</span>
|
|
16
|
+
<strong
|
|
17
|
+
class="inline-block text-base-800"
|
|
18
|
+
:class="isBig ? 'text-5xl block' : null"
|
|
19
|
+
>
|
|
20
|
+
<small v-if="hasVariedPrices">
|
|
21
|
+
{{ `${$t.i19asOf} ` }}
|
|
22
|
+
</small>
|
|
23
|
+
{{ $money(salePrice) }}
|
|
24
|
+
</strong>
|
|
25
|
+
<Fade slide="down">
|
|
26
|
+
<div v-if="cashbackValue && hasCashback" class="relative z-10">
|
|
27
|
+
<span :data-tooltip="$t.i19get$1back
|
|
28
|
+
.replace('$1', $percentage(cashbackPercentage))">
|
|
29
|
+
<i class="i-cashback mr-1"></i>
|
|
30
|
+
<span class="font-medium">
|
|
31
|
+
{{ $money(cashbackValue) }}
|
|
32
|
+
</span>
|
|
33
|
+
<small> cashback</small>
|
|
34
|
+
</span>
|
|
35
|
+
</div>
|
|
36
|
+
</Fade>
|
|
37
|
+
<Fade slide="down">
|
|
38
|
+
<div v-if="installmentValue && hasPriceOptions">
|
|
39
|
+
<small v-if="isLiteral">
|
|
40
|
+
{{ `${$t.i19upTo} ` }}
|
|
41
|
+
</small>
|
|
42
|
+
{{ installmentsNumber }}x
|
|
43
|
+
<small v-if="isLiteral">
|
|
44
|
+
{{ ` ${$t.i19of} ` }}
|
|
45
|
+
</small>
|
|
46
|
+
<span>{{ $money(installmentValue) }}</span>
|
|
47
|
+
<small v-if="!monthlyInterest && isLiteral">
|
|
48
|
+
{{ $t.i19interestFree }}
|
|
49
|
+
</small>
|
|
50
|
+
</div>
|
|
51
|
+
</Fade>
|
|
52
|
+
<Fade slide="down">
|
|
53
|
+
<div v-if="priceWithDiscount < salePrice && hasPriceOptions">
|
|
54
|
+
<small v-if="!discountLabel">
|
|
55
|
+
{{ `${$t.i19asOf} ` }}
|
|
56
|
+
</small>
|
|
57
|
+
<span>{{ $money(priceWithDiscount) }}</span>
|
|
58
|
+
<small v-if="discountLabel">
|
|
59
|
+
{{ ` ${discountLabel}` }}
|
|
60
|
+
</small>
|
|
61
|
+
</div>
|
|
62
|
+
</Fade>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<script setup lang="ts">
|
|
67
|
+
import type { Products, ListPaymentsResponse } from '@cloudcommerce/types';
|
|
68
|
+
import usePrices from '@@sf/composables/use-prices';
|
|
69
|
+
|
|
70
|
+
export interface Props {
|
|
71
|
+
product?: Partial<Products> & { price: number, final_price?: number };
|
|
72
|
+
price?: number;
|
|
73
|
+
basePrice?: number;
|
|
74
|
+
isAmountTotal?: boolean;
|
|
75
|
+
installmentsOption?: ListPaymentsResponse['installments_option'];
|
|
76
|
+
discountOption?: ListPaymentsResponse['discount_option'];
|
|
77
|
+
isBig?: boolean;
|
|
78
|
+
isLiteral?: boolean;
|
|
79
|
+
hasCashback?: boolean;
|
|
80
|
+
hasPriceOptions?: boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
84
|
+
hasCashback: true,
|
|
85
|
+
hasPriceOptions: true,
|
|
86
|
+
});
|
|
87
|
+
const {
|
|
88
|
+
hasVariedPrices,
|
|
89
|
+
salePrice,
|
|
90
|
+
comparePrice,
|
|
91
|
+
cashbackPercentage,
|
|
92
|
+
cashbackValue,
|
|
93
|
+
installmentsNumber,
|
|
94
|
+
monthlyInterest,
|
|
95
|
+
installmentValue,
|
|
96
|
+
priceWithDiscount,
|
|
97
|
+
discountLabel,
|
|
98
|
+
} = usePrices(props);
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<style>
|
|
102
|
+
[data-prices] > span {
|
|
103
|
+
font-size: 87%;
|
|
104
|
+
}
|
|
105
|
+
[data-prices] > div {
|
|
106
|
+
font-size: 90%;
|
|
107
|
+
}
|
|
108
|
+
[data-prices] small {
|
|
109
|
+
@apply lowercase;
|
|
110
|
+
font-size: 92%;
|
|
111
|
+
}
|
|
112
|
+
</style>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header
|
|
3
|
+
ref="header"
|
|
4
|
+
class="relative top-0 z-50 transition-colors"
|
|
5
|
+
:class="[
|
|
6
|
+
isSticky && !isSidenavOpen ? 'bg-black/80' : 'bg-black',
|
|
7
|
+
isSticky ? 'backdrop-blur-md shadow py-2 md:py-3' : 'py-3 sm:py-4 md:py-5',
|
|
8
|
+
]"
|
|
9
|
+
>
|
|
10
|
+
<div class="container lg:max-w-7xl mx-auto px-1 lg:pl-3
|
|
11
|
+
grid grid-flow-col grid-cols-3 justify-between items-center
|
|
12
|
+
lg:grid-cols-none lg:auto-cols-max">
|
|
13
|
+
<div class="lg:hidden">
|
|
14
|
+
<button
|
|
15
|
+
class="px-2 my-1"
|
|
16
|
+
:aria-label="$t.i19toggleMenu"
|
|
17
|
+
@click="isSidenavOpen = !isSidenavOpen"
|
|
18
|
+
>
|
|
19
|
+
<i
|
|
20
|
+
class="text-base-100 text-3xl"
|
|
21
|
+
:class="isSidenavOpen ? 'i-close' : 'i-menu'"
|
|
22
|
+
></i>
|
|
23
|
+
</button>
|
|
24
|
+
</div>
|
|
25
|
+
<slot name="logo" />
|
|
26
|
+
<ShopHeaderMenu
|
|
27
|
+
class="hidden lg:block"
|
|
28
|
+
v-bind="{ isSticky, ...headerNavLinks }"
|
|
29
|
+
/>
|
|
30
|
+
<div class="px-2 flex justify-end items-center gap-3 lg:gap-4">
|
|
31
|
+
<AccountMenu
|
|
32
|
+
class="hidden sm:block"
|
|
33
|
+
:aria-label="$t.i19myAccount"
|
|
34
|
+
:service-links="serviceLinks"
|
|
35
|
+
>
|
|
36
|
+
<template #button="{ open }">
|
|
37
|
+
<i
|
|
38
|
+
class="i-account w-7 h-7
|
|
39
|
+
hover:text-primary hover:scale-110 active:scale-125"
|
|
40
|
+
:class="open ? 'text-white scale-110' : 'text-base-200'"
|
|
41
|
+
></i>
|
|
42
|
+
</template>
|
|
43
|
+
</AccountMenu>
|
|
44
|
+
<button :aria-label="$t.i19openCart">
|
|
45
|
+
<i class="i-shopping-cart w-7 h-7
|
|
46
|
+
text-base-200 hover:text-primary hover:scale-110 active:scale-125"></i>
|
|
47
|
+
</button>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<Drawer
|
|
51
|
+
v-model="isSidenavOpen"
|
|
52
|
+
:has-close-button="false"
|
|
53
|
+
position="absolute"
|
|
54
|
+
:class="isSticky ? 'mt-2 md:mt-3' : 'mt-3 sm:mt-4 md:mt-5'"
|
|
55
|
+
:style="{ height: `calc(100vh - ${positionY}px + .5rem)` }"
|
|
56
|
+
>
|
|
57
|
+
<ShopSidenav class="bg-white pt-6" />
|
|
58
|
+
</Drawer>
|
|
59
|
+
</header>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script setup lang="ts">
|
|
63
|
+
import type { CategoriesList } from '@cloudcommerce/api/types';
|
|
64
|
+
import { getCurrentInstance, ref } from 'vue';
|
|
65
|
+
import useShopHeader from '@@sf/composables/use-shop-header';
|
|
66
|
+
import Drawer from '@@sf/components/Drawer.vue';
|
|
67
|
+
import ShopSidenav from '~/components/ShopSidenav.vue';
|
|
68
|
+
import ShopHeaderMenu from '~/components/ShopHeaderMenu.vue';
|
|
69
|
+
import AccountMenu from '~/components/AccountMenu.vue';
|
|
70
|
+
|
|
71
|
+
export interface Props {
|
|
72
|
+
categories: CategoriesList;
|
|
73
|
+
menuCategorySlugs?: string[];
|
|
74
|
+
menuRandomCategories?: number;
|
|
75
|
+
isAlphabeticalSortSubmenu?: boolean;
|
|
76
|
+
serviceLinks?: Array<{
|
|
77
|
+
title: string;
|
|
78
|
+
href: string;
|
|
79
|
+
}>;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const props = defineProps<Props>();
|
|
83
|
+
const header = ref<HTMLElement | null>(null);
|
|
84
|
+
const {
|
|
85
|
+
isSticky,
|
|
86
|
+
positionY,
|
|
87
|
+
} = useShopHeader({ ...props, header });
|
|
88
|
+
const isSidenavOpen = ref(false);
|
|
89
|
+
const vm = getCurrentInstance();
|
|
90
|
+
const { metafields } = vm.appContext.app.config.globalProperties.$settings;
|
|
91
|
+
const headerNavLinks = {
|
|
92
|
+
supportUrl: metafields.support_url,
|
|
93
|
+
businessLpUrl: metafields.business_lp_url,
|
|
94
|
+
monocardSlug: metafields.monocard_slug,
|
|
95
|
+
monodotSlug: metafields.monodot_slug,
|
|
96
|
+
};
|
|
97
|
+
</script>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav class="font-brand lowercase text-lg text-base-100">
|
|
3
|
+
<ul class="flex items-center gap-6 xl:gap-7">
|
|
4
|
+
<li>
|
|
5
|
+
<ALink
|
|
6
|
+
:href="supportUrl"
|
|
7
|
+
class="hover:text-white hover:underline decoration-2 underline-offset-4"
|
|
8
|
+
>
|
|
9
|
+
{{ $t.i19support }}
|
|
10
|
+
</ALink>
|
|
11
|
+
</li>
|
|
12
|
+
<li>
|
|
13
|
+
<a
|
|
14
|
+
:href="businessLpUrl"
|
|
15
|
+
class="text-white hover:text-primary underline
|
|
16
|
+
decoration-2 decoration-primary underline-offset-4"
|
|
17
|
+
>
|
|
18
|
+
<i class="i-stack-line opacity-50 mr-1.5"></i>
|
|
19
|
+
<h4 class="inline">Para empresas e times</h4>
|
|
20
|
+
</a>
|
|
21
|
+
</li>
|
|
22
|
+
<li>
|
|
23
|
+
<Menu as="div" v-slot="{ open }" class="relative z-50">
|
|
24
|
+
<MenuButton
|
|
25
|
+
class="group lowercase pl-4 pr-3 py-1 rounded-full"
|
|
26
|
+
:class="isSticky
|
|
27
|
+
? 'bg-primary/20 text-primary hover:primary'
|
|
28
|
+
: 'primary hover:bg-primary-50'"
|
|
29
|
+
>
|
|
30
|
+
<span>{{ $t.i19buy }}</span>
|
|
31
|
+
<i
|
|
32
|
+
class="i-chevron-down ml-1 transition-transform"
|
|
33
|
+
:class="open ? 'rotate-180' : 'opacity-50'"
|
|
34
|
+
></i>
|
|
35
|
+
</MenuButton>
|
|
36
|
+
<Fade>
|
|
37
|
+
<MenuItems
|
|
38
|
+
as="ul"
|
|
39
|
+
class="absolute -left-7 mt-3 w-48 rounded-b-md overflow-hidden
|
|
40
|
+
bg-black/80 text-white backdrop-blur-md shadow"
|
|
41
|
+
>
|
|
42
|
+
<MenuItem as="li">
|
|
43
|
+
<a
|
|
44
|
+
:href="monocardSlug"
|
|
45
|
+
class="flex gap-3 px-5 py-2.5 hover:bg-black"
|
|
46
|
+
>
|
|
47
|
+
<h4 class="basis-4/6 text-right">
|
|
48
|
+
<span class="opacity-70">Mono</span>card
|
|
49
|
+
</h4>
|
|
50
|
+
<span class="basis-2/6 opacity-80">
|
|
51
|
+
<i class="i-qr-code-line"></i>
|
|
52
|
+
<i class="i-signal-tower-fill ml-1.5"></i>
|
|
53
|
+
</span>
|
|
54
|
+
</a>
|
|
55
|
+
<a
|
|
56
|
+
:href="monodotSlug"
|
|
57
|
+
class="flex gap-3 px-5 py-2.5 hover:bg-black"
|
|
58
|
+
>
|
|
59
|
+
<h4 class="basis-4/6 text-right">
|
|
60
|
+
<span class="opacity-70">Mono</span>dot
|
|
61
|
+
</h4>
|
|
62
|
+
<span class="basis-2/6 opacity-80">
|
|
63
|
+
<i class="i-qr-code-line"></i>
|
|
64
|
+
</span>
|
|
65
|
+
</a>
|
|
66
|
+
</MenuItem>
|
|
67
|
+
</MenuItems>
|
|
68
|
+
</Fade>
|
|
69
|
+
</Menu>
|
|
70
|
+
</li>
|
|
71
|
+
</ul>
|
|
72
|
+
</nav>
|
|
73
|
+
</template>
|
|
74
|
+
|
|
75
|
+
<script setup lang="ts">
|
|
76
|
+
import {
|
|
77
|
+
Menu,
|
|
78
|
+
MenuButton,
|
|
79
|
+
MenuItems,
|
|
80
|
+
MenuItem,
|
|
81
|
+
} from '@headlessui/vue';
|
|
82
|
+
|
|
83
|
+
export interface Props {
|
|
84
|
+
isSticky?: boolean;
|
|
85
|
+
monocardSlug: string;
|
|
86
|
+
monodotSlug: string;
|
|
87
|
+
supportUrl: string;
|
|
88
|
+
businessLpUrl: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
defineProps<Props>();
|
|
92
|
+
</script>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<aside class="flex flex-col h-full">
|
|
3
|
+
<nav class="py-4 grow">
|
|
4
|
+
<ul class="relative h-full">
|
|
5
|
+
<ShopSidenavCategory
|
|
6
|
+
v-for="categoryTree in categoryTrees"
|
|
7
|
+
:key="categoryTree._id"
|
|
8
|
+
:category-tree="categoryTree"
|
|
9
|
+
/>
|
|
10
|
+
</ul>
|
|
11
|
+
</nav>
|
|
12
|
+
<footer class="text-base">
|
|
13
|
+
<div class="flex items-center px-2 py-4 bg-base-100">
|
|
14
|
+
<AccountLink class="p-2 grow flex items-center gap-3">
|
|
15
|
+
<i class="i-account text-4xl text-base-500 m-0"></i>
|
|
16
|
+
<span class="leading-tight">
|
|
17
|
+
{{ `${$t.i19hello} ${customerName || $t.i19visitor}` }}
|
|
18
|
+
<small class="block lowercase font-semibold text-primary">
|
|
19
|
+
{{ $t.i19myOrders }}, {{ $t.i19myAccount }}
|
|
20
|
+
</small>
|
|
21
|
+
</span>
|
|
22
|
+
</AccountLink>
|
|
23
|
+
<button
|
|
24
|
+
v-if="isLogged"
|
|
25
|
+
@click="logout"
|
|
26
|
+
class="p-2 text-right text-base-800"
|
|
27
|
+
>
|
|
28
|
+
<span class="text-base-600">{{ $t.i19logout }}</span>
|
|
29
|
+
<i class="i-logout text-lg ml-1"></i>
|
|
30
|
+
</button>
|
|
31
|
+
</div>
|
|
32
|
+
<ul class="flex gap-3 p-4 bg-base-200 text-xl text-base-700">
|
|
33
|
+
<li v-for="(href, network) in socialNetworks" :key="network">
|
|
34
|
+
<SocialNetworkLink :network="network" class="p-1 active:text-primary" />
|
|
35
|
+
</li>
|
|
36
|
+
</ul>
|
|
37
|
+
</footer>
|
|
38
|
+
</aside>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script setup lang="ts">
|
|
42
|
+
import type { CategoryTree } from '@@sf/composables/use-shop-header';
|
|
43
|
+
import { onMounted } from 'vue';
|
|
44
|
+
import {
|
|
45
|
+
customerName,
|
|
46
|
+
initializeFirebaseAuth,
|
|
47
|
+
isLogged,
|
|
48
|
+
logout,
|
|
49
|
+
} from '@@sf/state/customer-session';
|
|
50
|
+
import { socialNetworks } from '@@sf/server-data';
|
|
51
|
+
import AccountLink from '@@sf/components/AccountLink.vue';
|
|
52
|
+
import SocialNetworkLink from '@@sf/components/SocialNetworkLink.vue';
|
|
53
|
+
import ShopSidenavCategory from '~/components/ShopSidenavCategory.vue';
|
|
54
|
+
|
|
55
|
+
export interface Props {
|
|
56
|
+
categoryTrees?: CategoryTree[];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
withDefaults(defineProps<Props>(), {
|
|
60
|
+
categoryTrees() {
|
|
61
|
+
return [];
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
onMounted(() => initializeFirebaseAuth());
|
|
65
|
+
</script>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li class="text-lg text-base-800">
|
|
3
|
+
<details
|
|
4
|
+
v-if="categoryTree.subcategories.length"
|
|
5
|
+
class="bg-white overflow-y-auto overflow-x-hidden z-10
|
|
6
|
+
open:absolute open:top-0 open:left-0 open:w-full open:h-full"
|
|
7
|
+
@toggle="isOpen = !isOpen"
|
|
8
|
+
>
|
|
9
|
+
<summary
|
|
10
|
+
class="cursor-pointer list-none px-6 py-3 active:bg-base-100 transition-colors"
|
|
11
|
+
:class="isOpen ? 'bg-base-100' : null"
|
|
12
|
+
>
|
|
13
|
+
<i :class="!isOpen
|
|
14
|
+
? 'i-arrow-right float-right mb-0 mt-1 text-xl text-base-500'
|
|
15
|
+
: 'i-arrow-left text-lg'"></i>
|
|
16
|
+
<AImg
|
|
17
|
+
v-if="!isOpen && categoryTree.icon"
|
|
18
|
+
:picture="categoryTree.icon"
|
|
19
|
+
class="w-auto h-5 inline mr-3"
|
|
20
|
+
/>
|
|
21
|
+
<h3 class="inline" :class="isOpen ? 'ml-4 text-base' : null">
|
|
22
|
+
{{ categoryTree.name }}
|
|
23
|
+
</h3>
|
|
24
|
+
</summary>
|
|
25
|
+
<ul
|
|
26
|
+
class="mt-2 transition-opacity"
|
|
27
|
+
:class="isFaded ? 'opacity-20' : 'opacity-100'"
|
|
28
|
+
tabindex="-1"
|
|
29
|
+
>
|
|
30
|
+
<ShopSidenavCategory
|
|
31
|
+
v-for="subcategoryTree in categoryTree.subcategories"
|
|
32
|
+
:key="subcategoryTree._id"
|
|
33
|
+
:category-tree="subcategoryTree"
|
|
34
|
+
/>
|
|
35
|
+
<li>
|
|
36
|
+
<a
|
|
37
|
+
:href="`/${categoryTree.slug}`"
|
|
38
|
+
class="block px-6 py-3 text-base underline active:bg-base-200"
|
|
39
|
+
>
|
|
40
|
+
{{ $t.i19seeAll$1Category.replace('$1', categoryTree.name) }}
|
|
41
|
+
</a>
|
|
42
|
+
</li>
|
|
43
|
+
</ul>
|
|
44
|
+
</details>
|
|
45
|
+
<a
|
|
46
|
+
v-else
|
|
47
|
+
:href="`/${categoryTree.slug}`"
|
|
48
|
+
class="block px-6 py-3 active:bg-base-200"
|
|
49
|
+
>
|
|
50
|
+
<AImg
|
|
51
|
+
v-if="!isOpen && categoryTree.icon"
|
|
52
|
+
:picture="categoryTree.icon"
|
|
53
|
+
class="w-auto h-5 inline mr-3"
|
|
54
|
+
/>
|
|
55
|
+
<h3 class="inline">{{ categoryTree.name }}</h3>
|
|
56
|
+
</a>
|
|
57
|
+
</li>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script setup lang="ts">
|
|
61
|
+
import type { CategoryTree } from '@@sf/composables/use-shop-header';
|
|
62
|
+
import { ref, watch } from 'vue';
|
|
63
|
+
|
|
64
|
+
export interface Props {
|
|
65
|
+
categoryTree: CategoryTree;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
defineProps<Props>();
|
|
69
|
+
const isOpen = ref(false);
|
|
70
|
+
const isFaded = ref(true);
|
|
71
|
+
watch(isOpen, (_isOpen) => {
|
|
72
|
+
if (_isOpen) {
|
|
73
|
+
setTimeout(() => { isFaded.value = false; }, 25);
|
|
74
|
+
} else {
|
|
75
|
+
isFaded.value = true;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
</script>
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import {
|
|
3
|
-
i19myAccountAndOrders,
|
|
4
3
|
i19openCart,
|
|
5
|
-
i19signUp,
|
|
6
4
|
} from '@@i18n';
|
|
7
|
-
import
|
|
8
|
-
import HeaderButtonLink from '@@components/header/HeaderButtonLink.vue';
|
|
5
|
+
import HeaderButtonLink from '~/components/header/HeaderButtonLink.vue';
|
|
9
6
|
|
|
10
7
|
export interface Props {
|
|
11
8
|
accountUrl?: string;
|
|
12
9
|
cartUrl?: string;
|
|
13
|
-
loginDrawerAdditionalLinks?: LoginDrawerProps['additionalLinks'];
|
|
14
10
|
}
|
|
15
11
|
|
|
16
12
|
withDefaults(defineProps<Props>(), {
|
|
@@ -31,22 +27,6 @@ withDefaults(defineProps<Props>(), {
|
|
|
31
27
|
</a>
|
|
32
28
|
</slot>
|
|
33
29
|
<slot name="account">
|
|
34
|
-
<LoginDrawer
|
|
35
|
-
:account-url="accountUrl"
|
|
36
|
-
:additional-links="loginDrawerAdditionalLinks"
|
|
37
|
-
>
|
|
38
|
-
<template #toggle>
|
|
39
|
-
<HeaderButtonLink
|
|
40
|
-
:href="accountUrl"
|
|
41
|
-
:title="i19myAccountAndOrders"
|
|
42
|
-
>
|
|
43
|
-
<div class="i-user-circle"></div>
|
|
44
|
-
</HeaderButtonLink>
|
|
45
|
-
</template>
|
|
46
|
-
<template #form-button-content="{ isSignUp }">
|
|
47
|
-
{{ isSignUp ? i19signUp : 'Acompanhar pedidos' }}
|
|
48
|
-
</template>
|
|
49
|
-
</LoginDrawer>
|
|
50
30
|
</slot>
|
|
51
31
|
<slot name="cart">
|
|
52
32
|
<HeaderButtonLink
|