cloudcommerce 0.26.7 → 0.27.0

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.
Files changed (193) hide show
  1. package/.github/workflows/test-apps.yml +2 -2
  2. package/.gitmodules +0 -3
  3. package/.vscode/settings.json +3 -1
  4. package/CHANGELOG.md +31 -0
  5. package/action.yml +2 -2
  6. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  7. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  8. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  9. package/ecomplus-stores/barra-doce/package.json +2 -2
  10. package/ecomplus-stores/monocard/functions/many/package.json +3 -3
  11. package/ecomplus-stores/monocard/functions/ssr/package.json +6 -6
  12. package/ecomplus-stores/monocard/functions/with-apps/package.json +3 -3
  13. package/ecomplus-stores/monocard/package.json +2 -2
  14. package/package.json +6 -6
  15. package/packages/api/package.json +1 -1
  16. package/packages/apps/affilate-program/package.json +2 -2
  17. package/packages/apps/correios/package.json +3 -4
  18. package/packages/apps/custom-payment/package.json +1 -1
  19. package/packages/apps/custom-shipping/package.json +1 -1
  20. package/packages/apps/datafrete/package.json +3 -3
  21. package/packages/apps/discounts/package.json +1 -1
  22. package/packages/apps/emails/package.json +2 -2
  23. package/packages/apps/fb-conversions/package.json +3 -3
  24. package/packages/apps/flash-courier/package.json +2 -2
  25. package/packages/apps/frenet/package.json +3 -3
  26. package/packages/apps/galaxpay/package.json +3 -3
  27. package/packages/apps/google-analytics/package.json +3 -3
  28. package/packages/apps/jadlog/package.json +2 -2
  29. package/packages/apps/loyalty-points/package.json +1 -1
  30. package/packages/apps/melhor-envio/package.json +3 -3
  31. package/packages/apps/mercadopago/package.json +3 -3
  32. package/packages/apps/pagarme/package.json +3 -3
  33. package/packages/apps/paghiper/package.json +3 -3
  34. package/packages/apps/pix/package.json +3 -3
  35. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +22 -0
  36. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +1 -1
  37. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js +2 -2
  38. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js.map +1 -1
  39. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +7 -1
  40. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +1 -1
  41. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +14 -5
  42. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +1 -1
  43. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js +9 -1
  44. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js.map +1 -1
  45. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js +8 -6
  46. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js.map +1 -1
  47. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +118 -38
  48. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +1 -1
  49. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js +8 -0
  50. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js.map +1 -1
  51. package/packages/apps/tiny-erp/package.json +3 -3
  52. package/packages/apps/tiny-erp/src/integration/export-order-to-tiny.ts +24 -0
  53. package/packages/apps/tiny-erp/src/integration/helpers/format-tiny-date.ts +2 -2
  54. package/packages/apps/tiny-erp/src/integration/import-order-from-tiny.ts +8 -1
  55. package/packages/apps/tiny-erp/src/integration/import-product-from-tiny.ts +17 -5
  56. package/packages/apps/tiny-erp/src/integration/parsers/order-from-tiny.ts +13 -1
  57. package/packages/apps/tiny-erp/src/integration/parsers/order-to-tiny.ts +11 -6
  58. package/packages/apps/tiny-erp/src/integration/parsers/product-from-tiny.ts +144 -41
  59. package/packages/apps/tiny-erp/src/integration/parsers/product-to-tiny.ts +10 -0
  60. package/packages/apps/webhooks/package.json +3 -3
  61. package/packages/cli/package.json +1 -1
  62. package/packages/config/package.json +1 -1
  63. package/packages/emails/package.json +4 -4
  64. package/packages/eslint/base.eslintrc.cjs +3 -0
  65. package/packages/eslint/package.json +5 -4
  66. package/packages/eslint/storefront.eslintrc.cjs +8 -1
  67. package/packages/events/package.json +2 -2
  68. package/packages/feeds/package.json +1 -1
  69. package/packages/firebase/package.json +2 -2
  70. package/packages/i18n/package.json +1 -1
  71. package/packages/modules/package.json +3 -3
  72. package/packages/passport/package.json +2 -2
  73. package/packages/ssr/package.json +3 -3
  74. package/packages/storefront/.auto-imports.d.ts +65 -0
  75. package/packages/storefront/astro.config.mjs +24 -1
  76. package/packages/storefront/client.d.ts +1 -0
  77. package/packages/storefront/config/astro/context-directive.mjs +21 -0
  78. package/packages/storefront/config/astro/index.d.ts +8 -0
  79. package/packages/storefront/config/storefront.tailwind.cjs +0 -1
  80. package/packages/storefront/package.json +4 -3
  81. package/packages/storefront/server.d.ts +1 -1
  82. package/packages/storefront/src/lib/$storefront.d.ts +8 -8
  83. package/packages/storefront/src/lib/assets/base.css +5 -0
  84. package/packages/storefront/src/lib/components/Carousel.vue +93 -72
  85. package/packages/storefront/src/lib/components/CarouselControl.vue +13 -7
  86. package/packages/storefront/src/lib/components/ContentClearfix.vue +17 -0
  87. package/packages/storefront/src/lib/components/Drawer.vue +2 -2
  88. package/packages/storefront/src/lib/components/PaymentMethodFlag.vue +1 -1
  89. package/packages/storefront/src/lib/components/QuantitySelector.vue +4 -4
  90. package/packages/storefront/src/lib/components/QuantitySelectorControl.vue +2 -2
  91. package/packages/storefront/src/lib/components/ViewTransitions.astro +409 -0
  92. package/packages/storefront/src/lib/components/globals/AImg.vue +2 -1
  93. package/packages/storefront/src/lib/layouts/BaseBody.astro +0 -2
  94. package/packages/storefront/src/lib/layouts/BaseHead.astro +25 -7
  95. package/packages/test-base/package.json +1 -1
  96. package/packages/types/package.json +1 -1
  97. package/ecomplus-stores/iluminim/.devcontainer/devcontainer.json +0 -30
  98. package/ecomplus-stores/iluminim/.editorconfig +0 -13
  99. package/ecomplus-stores/iluminim/.eslintrc.cjs +0 -3
  100. package/ecomplus-stores/iluminim/.firebaserc +0 -5
  101. package/ecomplus-stores/iluminim/.github/renovate.json +0 -5
  102. package/ecomplus-stores/iluminim/.github/workflows/build-and-deploy.yml +0 -36
  103. package/ecomplus-stores/iluminim/.github/workflows/calibreapp-image-actions.yml +0 -23
  104. package/ecomplus-stores/iluminim/.gitpod.yml +0 -12
  105. package/ecomplus-stores/iluminim/.idx/dev.nix +0 -24
  106. package/ecomplus-stores/iluminim/.nvmrc +0 -1
  107. package/ecomplus-stores/iluminim/.vscode/extensions.json +0 -8
  108. package/ecomplus-stores/iluminim/.vscode/launch.json +0 -11
  109. package/ecomplus-stores/iluminim/.vscode/settings.json +0 -10
  110. package/ecomplus-stores/iluminim/README.md +0 -31
  111. package/ecomplus-stores/iluminim/SETUP.md +0 -117
  112. package/ecomplus-stores/iluminim/SETUP.pt-BR.md +0 -117
  113. package/ecomplus-stores/iluminim/functions/config.json +0 -3
  114. package/ecomplus-stores/iluminim/functions/example.env +0 -10
  115. package/ecomplus-stores/iluminim/functions/many/index.js +0 -14
  116. package/ecomplus-stores/iluminim/functions/many/package.json +0 -22
  117. package/ecomplus-stores/iluminim/functions/ssr/.eslintrc.cjs +0 -6
  118. package/ecomplus-stores/iluminim/functions/ssr/astro.config.mjs +0 -4
  119. package/ecomplus-stores/iluminim/functions/ssr/content/blog/.gitkeep +0 -0
  120. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/contato.json +0 -11
  121. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/terms.json +0 -11
  122. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/trocas.json +0 -11
  123. package/ecomplus-stores/iluminim/functions/ssr/content/layout.json +0 -57
  124. package/ecomplus-stores/iluminim/functions/ssr/content/pages/home.json +0 -70
  125. package/ecomplus-stores/iluminim/functions/ssr/content/settings.json +0 -65
  126. package/ecomplus-stores/iluminim/functions/ssr/index.js +0 -18
  127. package/ecomplus-stores/iluminim/functions/ssr/package.json +0 -31
  128. package/ecomplus-stores/iluminim/functions/ssr/public/admin/.gitkeep +0 -2
  129. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cms-preview.css +0 -274
  130. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cms.css +0 -114
  131. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cvv.png +0 -0
  132. package/ecomplus-stores/iluminim/functions/ssr/public/assets/img-placeholder.png +0 -0
  133. package/ecomplus-stores/iluminim/functions/ssr/public/assets/payments.png +0 -0
  134. package/ecomplus-stores/iluminim/functions/ssr/public/assets/ssl-safe.png +0 -0
  135. package/ecomplus-stores/iluminim/functions/ssr/public/img/icon.png +0 -0
  136. package/ecomplus-stores/iluminim/functions/ssr/public/img/large-icon.png +0 -0
  137. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner-chamada-desktop-9x81zmd91q.webp +0 -0
  138. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner2.webp +0 -0
  139. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/chamada-mobile-q1c6om6jx4.webp +0 -0
  140. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/ecom-icon.png +0 -0
  141. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/headphone.webp +0 -0
  142. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/logo.webp +0 -0
  143. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/og-image.png +0 -0
  144. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/passion.webp +0 -0
  145. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect8589.png +0 -0
  146. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect859.png +0 -0
  147. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect89.webp +0 -0
  148. package/ecomplus-stores/iluminim/functions/ssr/public/robots.txt +0 -6
  149. package/ecomplus-stores/iluminim/functions/ssr/scripts/build.sh +0 -14
  150. package/ecomplus-stores/iluminim/functions/ssr/src/assets/style.css +0 -65
  151. package/ecomplus-stores/iluminim/functions/ssr/src/components/AccountMenu.vue +0 -95
  152. package/ecomplus-stores/iluminim/functions/ssr/src/components/Banner.vue +0 -57
  153. package/ecomplus-stores/iluminim/functions/ssr/src/components/BannersGrid.astro +0 -25
  154. package/ecomplus-stores/iluminim/functions/ssr/src/components/CartItem.vue +0 -64
  155. package/ecomplus-stores/iluminim/functions/ssr/src/components/CartSidebar.vue +0 -66
  156. package/ecomplus-stores/iluminim/functions/ssr/src/components/Countdown.vue +0 -79
  157. package/ecomplus-stores/iluminim/functions/ssr/src/components/HeroSlider.vue +0 -52
  158. package/ecomplus-stores/iluminim/functions/ssr/src/components/PitchBar.vue +0 -56
  159. package/ecomplus-stores/iluminim/functions/ssr/src/components/Prices.vue +0 -95
  160. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductCard.vue +0 -117
  161. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductShelf.vue +0 -57
  162. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductsCountdown.vue +0 -20
  163. package/ecomplus-stores/iluminim/functions/ssr/src/components/SearchModal.vue +0 -6
  164. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopFooter.vue +0 -149
  165. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +0 -158
  166. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderMenu.vue +0 -58
  167. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderSubmenu.vue +0 -88
  168. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenav.vue +0 -61
  169. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenavCategory.vue +0 -80
  170. package/ecomplus-stores/iluminim/functions/ssr/src/env.d.ts +0 -13
  171. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/Base.astro +0 -16
  172. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/Checkout.astro +0 -0
  173. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageFooter.astro +0 -68
  174. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +0 -42
  175. package/ecomplus-stores/iluminim/functions/ssr/src/main/Fallback.astro +0 -10
  176. package/ecomplus-stores/iluminim/functions/ssr/src/main/Home.astro +0 -49
  177. package/ecomplus-stores/iluminim/functions/ssr/src/main/Sections.astro +0 -42
  178. package/ecomplus-stores/iluminim/functions/ssr/src/main/Wildcard.astro +0 -18
  179. package/ecomplus-stores/iluminim/functions/ssr/src/pages/[...slug].astro +0 -40
  180. package/ecomplus-stores/iluminim/functions/ssr/src/pages/_vue.ts +0 -3
  181. package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/account.astro +0 -0
  182. package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/index.astro +0 -0
  183. package/ecomplus-stores/iluminim/functions/ssr/src/pages/index.astro +0 -37
  184. package/ecomplus-stores/iluminim/functions/ssr/src/pages/~fallback.astro +0 -25
  185. package/ecomplus-stores/iluminim/functions/ssr/src/scripts/InlineScripts.astro +0 -10
  186. package/ecomplus-stores/iluminim/functions/ssr/tailwind.config.cjs +0 -13
  187. package/ecomplus-stores/iluminim/functions/ssr/tsconfig.json +0 -12
  188. package/ecomplus-stores/iluminim/functions/ssr/uno.config.cjs +0 -5
  189. package/ecomplus-stores/iluminim/functions/with-apps/index.js +0 -12
  190. package/ecomplus-stores/iluminim/functions/with-apps/package.json +0 -22
  191. package/ecomplus-stores/iluminim/package.json +0 -31
  192. package/ecomplus-stores/iluminim/scripts/install.sh +0 -24
  193. package/packages/storefront/src/lib/components/ContentClearfix.astro +0 -15
@@ -1,117 +0,0 @@
1
- <template>
2
- <article
3
- ref="card"
4
- :data-sku="product.sku"
5
- class="relative h-full max-w-[350px] mx-auto py-3 group"
6
- >
7
- <ALink
8
- :href="link"
9
- class="flex flex-col h-full rounded overflow-hidden
10
- group-hover:shadow group-hover:ring-1 ring-black/5"
11
- >
12
- <div class="aspect-square p-2
13
- motion-safe:group-hover:scale-110 transition-transform">
14
- <div class="relative w-full h-full bg-white rounded overflow-hidden
15
- group-hover:rounded-none">
16
- <span v-if="images?.length" class="text-xs text-opacity-70">
17
- <AImg
18
- :picture="images[0]"
19
- :alt="title"
20
- class="absolute top-0 left-0 block w-full h-full object-cover"
21
- />
22
- <AImg
23
- v-if="images[1] && wasHoveredOnce"
24
- :picture="images[1]"
25
- :alt="title"
26
- class="absolute top-0 left-0 block w-full h-full object-cover
27
- opacity-0 group-hover:opacity-100 transition-opacity
28
- motion-safe:duration-300 text-transparent z-10"
29
- />
30
- </span>
31
- <div
32
- v-else
33
- class="w-full h-full bg-gradient-to-br from-base-50/20 to-base-100"
34
- />
35
- </div>
36
- </div>
37
- <span
38
- v-if="discountPercentage"
39
- class=":uno: absolute top-9 right-2
40
- group-hover:scale-110 group-hover:translate-x-2 transition-transform
41
- bg-secondary/70 text-on-secondary text-xs
42
- py-0.5 pr-1.5 pl-3 [clip-path:polygon(20%_0,100%_0,100%_100%,0_100%)]"
43
- >
44
- -<strong>{{ discountPercentage }}</strong>%
45
- </span>
46
- <div class="relative flex flex-col grow justify-between p-4
47
- group-hover:backdrop-blur-md bg-white/40 z-10">
48
- <component
49
- :is="headingTag"
50
- class="ui-link uppercase font-bold text-sm no-underline line-clamp-2"
51
- :class="[
52
- isActive ? 'text-base-700' : 'text-base-500',
53
- link ? 'group-hover:underline group-hover:text-primary' : null,
54
- ]"
55
- >
56
- {{ title }}
57
- </component>
58
- <div class="pt-2">
59
- <div v-if="isActive">
60
- <Prices :product="product" />
61
- </div>
62
- <span v-else class="ui-badge bg-warning-100 text-warning-700">
63
- {{ !isInStock ? $t.i19outOfStock : $t.i19inactive }}
64
- </span>
65
- </div>
66
- <button
67
- v-if="isActive && !hasVariations"
68
- class=":uno: hidden md:block ui-btn-sm ui-btn-primary
69
- absolute -top-6 left-0 w-full rounded-none
70
- opacity-0 group-hover:opacity-100 transition -z-10 group-hover:z-10"
71
- @click.prevent="addProductToCart(product)"
72
- >
73
- <span class="inline-block h-4 w-4 leading-none text-base text-center
74
- bg-on-primary text-primary opacity-80 rounded-full mr-1">
75
- &plus;
76
- </span>
77
- {{ $t.i19addToCart }}
78
- </button>
79
- </div>
80
- </ALink>
81
- </article>
82
- </template>
83
-
84
- <script setup lang="ts">
85
- import { ref } from 'vue';
86
- import { watchOnce, useElementHover } from '@vueuse/core';
87
- import { addProductToCart } from '@@sf/state/shopping-cart';
88
- import {
89
- type Props as UseProductCardProps,
90
- useProductCard,
91
- } from '@@sf/composables/use-product-card';
92
- import Prices from '~/components/Prices.vue';
93
-
94
- export type Props = UseProductCardProps & {
95
- headingTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
96
- };
97
-
98
- const props = withDefaults(defineProps<Props>(), {
99
- headingTag: 'h3',
100
- });
101
- const {
102
- product,
103
- title,
104
- link,
105
- images,
106
- isInStock,
107
- isActive,
108
- discountPercentage,
109
- hasVariations,
110
- } = useProductCard(props as UseProductCardProps);
111
- const card = ref<HTMLElement | null>(null);
112
- const isHovered = useElementHover(card);
113
- const wasHoveredOnce = ref(false);
114
- watchOnce(isHovered, () => {
115
- wasHoveredOnce.value = true;
116
- });
117
- </script>
@@ -1,57 +0,0 @@
1
- <template>
2
- <section class="ui-section">
3
- <div v-if="title" class="max-w-prose mx-auto text-center mb-2">
4
- <h2 class="ui-text-brand text-3xl">
5
- <ALink :href="titleLink" :class="titleLink ? 'ui-link' : 'text-base-700'">
6
- {{ title }}
7
- </ALink>
8
- </h2>
9
- </div>
10
- <Carousel class="group/shelf">
11
- <li
12
- v-for="product in products"
13
- :key="product._id"
14
- class="basis-1/2 md:basis-1/3 lg:basis-1/4 shrink-0"
15
- >
16
- <ProductCard :product="product" />
17
- </li>
18
- <template #controls>
19
- <div
20
- v-show="products.length > 2"
21
- class="text-3xl lg:text-2xl leading-none text-primary
22
- lg:opacity-0 group-hover/shelf:opacity-90 transition-opacity"
23
- >
24
- <CarouselControl class="!top-1/2 !-left-4 w-12 h-12
25
- bg-transparent lg:bg-white/80 lg:hover:bg-primary-300/60 rounded-full
26
- lg:shadow-sm lg:ring-1 ring-black/5" is-prev />
27
- <CarouselControl class="!top-1/2 !-right-4 w-12 h-12
28
- bg-transparent lg:bg-white/80 lg:hover:bg-primary-300/60 rounded-full
29
- lg:shadow-sm lg:ring-1 ring-black/5" />
30
- </div>
31
- </template>
32
- </Carousel>
33
- </section>
34
- </template>
35
-
36
- <script setup lang="ts">
37
- import {
38
- type Props as UseProductShelfProps,
39
- useProductShelf,
40
- } from '@@sf/composables/use-product-shelf';
41
- import Carousel from '@@sf/components/Carousel.vue';
42
- import CarouselControl from '@@sf/components/CarouselControl.vue';
43
- import ProductCard from '~/components/ProductCard.vue';
44
-
45
- export interface Props extends UseProductShelfProps {}
46
-
47
- const props = defineProps<Props>();
48
- const {
49
- title,
50
- titleLink,
51
- fetching,
52
- products,
53
- } = useProductShelf(props);
54
- if (import.meta.env.SSR) {
55
- await fetching;
56
- }
57
- </script>
@@ -1,20 +0,0 @@
1
- <template>
2
- <section class="ui-section">
3
- <Countdown />
4
- <article v-for="product in products" :key="product._id">
5
- <ProductCard :product="product" />
6
- </article>
7
- </section>
8
- </template>
9
-
10
- <script setup lang="ts">
11
- import type { ProductItem } from '@@sf/composables/use-product-card';
12
- import ProductCard from '~/components/ProductCard.vue';
13
- import Countdown from '~/components/Countdown.vue';
14
-
15
- export interface Props {
16
- products: ProductItem[];
17
- }
18
-
19
- defineProps<Props>();
20
- </script>
@@ -1,6 +0,0 @@
1
- <template>
2
- <div class="w-full h-40 bg-base-300"></div>
3
- </template>
4
-
5
- <script setup lang="ts">
6
- </script>
@@ -1,149 +0,0 @@
1
- <template>
2
- <footer class="w-screen bg-base-50 border-t border-base-100 py-2">
3
- <div class="ui-section">
4
- <div class="pb-7 border-b border-base-200
5
- flex justify-between flex-wrap lg:flex-nowrap sm:gap-x-10 gap-y-5">
6
- <div class="shrink">
7
- <slot name="logo" />
8
- <div v-if="$settings.description" class="prose">
9
- <p>{{ $settings.description }}</p>
10
- </div>
11
- <div class="flex gap-2 text-base-500">
12
- <span v-for="(href, network) in socialNetworks" :key="network">
13
- <SocialNetworkLink :network="network" class="p-1 hover:text-primary">
14
- <template v-if="network === 'whatsapp'" #append>
15
- <span class="ml-1 text-sm text-base-600">
16
- {{ $settings.whatsapp }}
17
- </span>
18
- </template>
19
- </SocialNetworkLink>
20
- </span>
21
- </div>
22
- <div v-if="$settings.address || $settings.phone" class="mt-3 text-base-700">
23
- <address v-if="$settings.address" class="inline-block mr-4">
24
- {{ $settings.address }}
25
- </address>
26
- <ALink
27
- v-if="$settings.phone"
28
- :href="`tel:${$settings.phone.replace(/\D/g, '')}`"
29
- class="hover:text-primary"
30
- >
31
- <i class="i-phone mr-0.5"></i>
32
- {{ $settings.phone }}
33
- </ALink>
34
- </div>
35
- </div>
36
- <div v-if="categories?.length" class="basis-1/2 sm:basis-auto">
37
- <div class="text-lg font-medium mb-2.5">
38
- {{ categoriesColTitle || $t.i19categories }}
39
- </div>
40
- <ul
41
- class="text-sm"
42
- :class="categories.length > 4
43
- ? 'grid md:grid-cols-2 gap-x-5 gap-y-1.5' : 'space-y-1.5'"
44
- >
45
- <li v-for="({ name, slug }, i) in categories" :key="`c-${i}`">
46
- <ALink :href="`/${slug}`" class="ui-link text-base-600">
47
- {{ name }}
48
- </ALink>
49
- </li>
50
- <li>
51
- <ALink href="/s" class="ui-link text-base-900">
52
- {{ $t.i19allProducts }}
53
- </ALink>
54
- </li>
55
- </ul>
56
- </div>
57
- <div v-if="pageLinks?.length" class="basis-1/2 sm:basis-auto">
58
- <div class="text-lg font-medium mb-2.5">
59
- {{ pagesColTitle || $t.i19institutional }}
60
- </div>
61
- <ul
62
- class="text-sm"
63
- :class="pageLinks.length > 5
64
- ? 'grid md:grid-cols-2 gap-x-5 gap-y-1.5' : 'space-y-1.5'"
65
- >
66
- <li v-for="({ title, href }, i) in pageLinks" :key="`p-${i}`">
67
- <ALink :href="href" class="ui-link text-base-600">
68
- {{ title }}
69
- </ALink>
70
- </li>
71
- </ul>
72
- </div>
73
- </div>
74
- </div>
75
- <div class="ui-section">
76
- <div class="flex flex-wrap lg:flex-nowrap justify-between items-start gap-5">
77
- <ul class="flex gap-y-3 gap-x-6 lg:gap-x-8 items-center
78
- md:flex-wrap mx-auto md:mx-0 overflow-x-auto md:overflow-hidden">
79
- <li v-for="(stamp, i) in stamps" :key="i">
80
- <ALink :href="stamp.href?.replace('{domain}', $settings.domain || '')">
81
- <slot :name="`picture-${i}`" />
82
- <span v-if="!stamp.img" class="flex items-center">
83
- <span
84
- v-if="stamp.icon"
85
- class="text-4xl mr-2
86
- [&>*]:bg-gradient-to-br [&>*]:from-success-200 [&>*]:to-success-700"
87
- >
88
- <i v-if="stamp.icon === 'lock'" class="i-lock-closed"></i>
89
- <i v-else-if="stamp.icon === 'check'" class="i-check-badge"></i>
90
- <i v-else class="i-arrow-path-rounded-square"></i>
91
- </span>
92
- <span class="text-sm font-medium text-base-600 max-w-[140px]">
93
- {{ stamp.alt }}
94
- <i
95
- v-if="stamp.href && stamp.href.charAt(0) !== '/'"
96
- class="bg-base-400 ml-0.5 i-arrow-top-right-on-square"
97
- ></i>
98
- </span>
99
- </span>
100
- </ALink>
101
- </li>
102
- </ul>
103
- <div class="flex flex-wrap md:flex-nowrap justify-end items-center
104
- gap-4 text-2xl mx-auto md:mx-0 overflow-x-auto md:overflow-hidden">
105
- <PaymentMethodFlag
106
- v-for="paymentMethod in $settings.payment_methods"
107
- :key="paymentMethod"
108
- :flag="paymentMethod"
109
- />
110
- </div>
111
- </div>
112
- <div class="mt-7 text-xs text-center md:text-left
113
- md:flex justify-between gap-4">
114
- <div class="mb-3 md:mb-0">
115
- @ {{ new Date().getFullYear() }} {{ $settings.corporate_name }}
116
- {{ $settings.address ? `/ ${$settings.address}` : '' }}
117
- / {{ $settings.doc_number }}
118
- </div>
119
- <ALink href="https://www.ecomplus.io/" class="italic text-[#37003c]">
120
- powered by <b>E-Com Plus</b>
121
- </ALink>
122
- </div>
123
- </div>
124
- </footer>
125
- </template>
126
-
127
- <script setup lang="ts">
128
- import type { Categories } from '@cloudcommerce/api/types';
129
- import type { LayoutContent } from '@@sf/content';
130
- import { socialNetworks } from '@@sf/sf-lib';
131
- import SocialNetworkLink from '@@sf/components/SocialNetworkLink.vue';
132
- import PaymentMethodFlag from '@@sf/components/PaymentMethodFlag.vue';
133
-
134
- export interface Props {
135
- stamps?: LayoutContent['footer']['stamps'];
136
- categories?: Array<Partial<Categories> & {
137
- name: string;
138
- slug: string;
139
- }>;
140
- categoriesColTitle?: string;
141
- pageLinks?: Array<{
142
- title: string;
143
- href: string;
144
- }>;
145
- pagesColTitle?: string;
146
- }
147
-
148
- defineProps<Props>();
149
- </script>
@@ -1,158 +0,0 @@
1
- <template>
2
- <header
3
- ref="header"
4
- class="relative top-0 z-50 transition-colors"
5
- :class="[
6
- isSticky && !isSidenavOpen ? 'bg-white/80' : 'bg-white',
7
- isSticky ? 'backdrop-blur-md shadow py-2 md:py-3' : 'py-3 sm:py-4 md:py-5',
8
- ]"
9
- >
10
- <div class="w-screen lg:w-[calc(100vw-1rem)] xl:max-w-[82rem] 2xl:max-w-[85rem]
11
- mx-auto px-1 sm:pl-2 sm:pr-2.5 lg:px-1
12
- flex md:grid grid-flow-col grid-cols-3 lg:grid-cols-none lg:auto-cols-max
13
- justify-between items-center">
14
- <div class="basis-1/4 lg:hidden">
15
- <button
16
- class="px-2 my-1"
17
- :aria-label="$t.i19toggleMenu"
18
- @click="isSidenavOpen = !isSidenavOpen"
19
- >
20
- <i
21
- class="text-base-500 text-3xl"
22
- :class="isSidenavOpen ? 'i-close' : 'i-bars-3-bottom-left'"
23
- ></i>
24
- </button>
25
- </div>
26
- <slot name="logo" />
27
- <ShopHeaderMenu class="hidden lg:block" v-bind="{ inlineMenuTrees }" />
28
- <div class="basis-1/4 px-2
29
- flex justify-end items-center gap-3 lg:gap-4 text-base-800">
30
- <button
31
- :aria-label="$t.i19searchProducts"
32
- @click="isSearchOpen = !isSearchOpen"
33
- >
34
- <i class="i-magnifying-glass w-7 h-7
35
- hover:text-primary hover:scale-110 active:scale-125"></i>
36
- </button>
37
- <AccountMenu class="hidden sm:block">
38
- <template #button="{ open }">
39
- <i
40
- class="i-user-circle w-7 h-7
41
- hover:text-primary hover:scale-110 active:scale-125"
42
- :class="open ? 'text-black scale-110' : null"
43
- ></i>
44
- </template>
45
- </AccountMenu>
46
- <button
47
- :aria-label="$t.i19openCart"
48
- @click="isCartOpen = !isCartOpen"
49
- class="relative group"
50
- >
51
- <i class="i-carbon:shopping-cart w-7 h-7 group-hover:text-primary
52
- text-secondary-900 group-hover:scale-110 group-active:scale-125"></i>
53
- <span
54
- v-if="delayedTotalItems"
55
- class="ui-badge-pill-sm absolute -top-1 -right-1.5"
56
- >
57
- {{ delayedTotalItems }}
58
- </span>
59
- </button>
60
- </div>
61
- </div>
62
- <Drawer
63
- v-model="isSidenavOpen"
64
- :has-close-button="false"
65
- position="absolute"
66
- :class="isSticky ? 'mt-2 md:mt-3' : 'mt-3 sm:mt-4 md:mt-5'"
67
- :style="{ height: `calc(100vh - ${positionY}px + .5rem)` }"
68
- >
69
- <ShopSidenav class="bg-white pt-6" v-bind="{ categoryTrees }" />
70
- </Drawer>
71
- <Drawer
72
- v-model="isSearchOpen"
73
- :has-close-button="false"
74
- placement="top"
75
- >
76
- <Suspense>
77
- <SearchModal v-if="isSearchOpenOnce" />
78
- <template #fallback>
79
- <div class="container mx-auto">
80
- <Skeleton class="p-6" is-large />
81
- </div>
82
- </template>
83
- </Suspense>
84
- </Drawer>
85
- <Teleport v-if="isMounted" to="#teleported-overlap">
86
- <Drawer
87
- v-model="isCartOpen"
88
- placement="end"
89
- backdrop-target="#teleported-overlap"
90
- >
91
- <Suspense>
92
- <CartSidebar v-if="isCartOpenOnce" @close="isCartOpen = false" />
93
- <template #fallback>
94
- <Skeleton class="pt-16 px-6" is-bold />
95
- </template>
96
- </Suspense>
97
- </Drawer>
98
- </Teleport>
99
- </header>
100
- </template>
101
-
102
- <script setup lang="ts">
103
- import {
104
- ref,
105
- watch,
106
- onMounted,
107
- defineAsyncComponent,
108
- } from 'vue';
109
- import { watchOnce } from '@vueuse/core';
110
- import { totalItems } from '@@sf/state/shopping-cart';
111
- import {
112
- type Props as UseShopHeaderProps,
113
- useShopHeader,
114
- } from '@@sf/composables/use-shop-header';
115
- import Drawer from '@@sf/components/Drawer.vue';
116
- import ShopSidenav from '~/components/ShopSidenav.vue';
117
- import ShopHeaderMenu from '~/components/ShopHeaderMenu.vue';
118
- import AccountMenu from '~/components/AccountMenu.vue';
119
-
120
- export interface Props extends Omit<UseShopHeaderProps, 'header'> {}
121
-
122
- const SearchModal = defineAsyncComponent(() => import('~/components/SearchModal.vue'));
123
- const CartSidebar = defineAsyncComponent(() => import('~/components/CartSidebar.vue'));
124
- const props = defineProps<Props>();
125
- const header = ref<HTMLElement | null>(null);
126
- const {
127
- isSticky,
128
- positionY,
129
- categoryTrees,
130
- inlineMenuTrees,
131
- } = useShopHeader({ ...props, header });
132
- const isSidenavOpen = ref(false);
133
- const isSearchOpen = ref(false);
134
- const isSearchOpenOnce = ref(false);
135
- watchOnce(isSearchOpen, () => {
136
- isSearchOpenOnce.value = true;
137
- });
138
- const isCartOpen = ref(false);
139
- const isCartOpenOnce = ref(false);
140
- watchOnce(isCartOpen, () => {
141
- isCartOpenOnce.value = true;
142
- });
143
- const isMounted = ref(false);
144
- const delayedTotalItems = ref(0);
145
- onMounted(() => {
146
- isMounted.value = true;
147
- watch(totalItems, (newTotalItems, prevTotalItems) => {
148
- if (typeof prevTotalItems === 'number') {
149
- if (prevTotalItems < newTotalItems) {
150
- isCartOpen.value = true;
151
- } else if (prevTotalItems && !newTotalItems) {
152
- isCartOpen.value = false;
153
- }
154
- }
155
- delayedTotalItems.value = newTotalItems;
156
- }, { immediate: true });
157
- });
158
- </script>
@@ -1,58 +0,0 @@
1
- <template>
2
- <nav>
3
- <ul
4
- class="flex gap-4 xl:gap-5 text-base-700"
5
- :class="inlineMenuTrees.length < 7 ? 'text-base' : 'text-sm'"
6
- >
7
- <li v-for="(categoryTree, i) in inlineMenuTrees" :key="i">
8
- <ShopHeaderSubmenu
9
- v-if="categoryTree.subcategories.length"
10
- :category-tree="categoryTree"
11
- >
12
- <template #button="{ open }">
13
- <span class="hover:text-primary group">
14
- <h3
15
- class="group-hover:underline inline"
16
- :class="[
17
- inlineMenuTrees.length < 7 ? 'decoration-2' : null,
18
- open ? 'underline' : null,
19
- ]"
20
- >
21
- {{ categoryTree.name }}
22
- </h3>
23
- <i
24
- v-if="hasOneLevelSubcategories"
25
- class="i-chevron-down ml-1 transition-transform
26
- text-base-400 group-hover:text-primary-subtle"
27
- :class="open ? 'rotate-180' : null"
28
- ></i>
29
- </span>
30
- </template>
31
- </ShopHeaderSubmenu>
32
- <a
33
- v-else
34
- :href="`/${categoryTree.slug}`"
35
- class="hover:text-primary hover:underline"
36
- :class="inlineMenuTrees.length < 7 ? 'decoration-2' : null"
37
- >
38
- <h3 class="inline">{{ categoryTree.name }}</h3>
39
- </a>
40
- </li>
41
- </ul>
42
- </nav>
43
- </template>
44
-
45
- <script setup lang="ts">
46
- import type { CategoryTree } from '@@sf/composables/use-shop-header';
47
- import { computed } from 'vue';
48
- import ShopHeaderSubmenu from '~/components/ShopHeaderSubmenu.vue';
49
-
50
- export interface Props {
51
- inlineMenuTrees: CategoryTree[];
52
- }
53
-
54
- const props = defineProps<Props>();
55
- const hasOneLevelSubcategories = computed(() => {
56
- return !!props.inlineMenuTrees.find(({ subcategories }) => !subcategories.length);
57
- });
58
- </script>
@@ -1,88 +0,0 @@
1
- <template>
2
- <Popover v-slot="{ open }">
3
- <PopoverButton class="outline-none">
4
- <slot name="button" v-bind="{ open }" />
5
- </PopoverButton>
6
- <div class="relative">
7
- <Fade>
8
- <PopoverPanel
9
- class="absolute z-20 top-3 left-1/2 -translate-x-1/2 !transform
10
- px-6 py-4 rounded backdrop-blur-md shadow bg-white/80
11
- text-base text-base-700"
12
- :class="countMenuCols === 1 ? 'w-60'
13
- : countMenuCols === 2 ? `w-screen ${(categoryPicture ? 'max-w-lg' : 'max-w-sm')}`
14
- : countMenuCols === 3 ? `w-screen ${(categoryPicture ? 'max-w-xl' : 'max-w-md')}`
15
- : countMenuCols < 6 ? 'w-screen max-w-3xl' : 'w-screen max-w-5xl'"
16
- >
17
- <div class="flex gap-6 w-full">
18
- <ul v-if="subcategoryLinks.length" class="flex-1">
19
- <li
20
- v-for="(subcategory, i) in subcategoryLinks"
21
- :key="`link-${i}`"
22
- :class="subcategoryLinks.length > 10 ? 'text-sm mb-1' : 'mb-2'"
23
- >
24
- <a :href="`/${subcategory.slug}`" class="hover:text-primary">
25
- <h3>{{ subcategory.name }}</h3>
26
- </a>
27
- </li>
28
- </ul>
29
- <div
30
- v-for="(subcategory, i) in subcategoryCols"
31
- :key="i"
32
- class="flex-1"
33
- >
34
- <a :href="`/${subcategory.slug}`" class="hover:text-primary">
35
- <h3>{{ subcategory.name }}</h3>
36
- </a>
37
- <ul class="text-sm text-base-600 mt-1 mb-1.5">
38
- <li
39
- v-for="(nestedSubcategory, ii) in subcategory.subcategories"
40
- :key="`${i}-${ii}`"
41
- class="mb-0.5"
42
- >
43
- <a
44
- :href="`/${nestedSubcategory.slug}`"
45
- class="hover:text-primary hover:underline"
46
- >
47
- <h3>{{ nestedSubcategory.name }}</h3>
48
- </a>
49
- </li>
50
- </ul>
51
- </div>
52
- <div
53
- v-if="categoryPicture"
54
- :class="countMenuCols === 2 ? 'basis-1/2'
55
- : countMenuCols < 5 ? 'basis-2/5' : 'basis-1/3'"
56
- >
57
- <AImg :picture="categoryPicture" class="ml-auto rounded" />
58
- </div>
59
- </div>
60
- <a
61
- :href="`/${categoryTree.slug}`"
62
- class="block mt-1 text-xs text-base-600 leading-snug underline"
63
- >
64
- {{ $t.i19seeAll$1Category.replace('$1', categoryTree.name) }}
65
- </a>
66
- </PopoverPanel>
67
- </Fade>
68
- </div>
69
- </Popover>
70
- </template>
71
-
72
- <script setup lang="ts">
73
- import { Popover, PopoverButton, PopoverPanel } from '@headlessui/vue';
74
- import {
75
- type Props as UseShopHeaderSubmenuProps,
76
- useShopHeaderSubmenu,
77
- } from '@@sf/composables/use-shop-header-submenu';
78
-
79
- export interface Props extends UseShopHeaderSubmenuProps {}
80
-
81
- const props = defineProps<Props>();
82
- const {
83
- categoryPicture,
84
- subcategoryLinks,
85
- subcategoryCols,
86
- countMenuCols,
87
- } = useShopHeaderSubmenu(props);
88
- </script>