@meeovi/layer-shared 1.0.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.
- package/README.md +0 -0
- package/app/components/Gallery/Gallery.vue +187 -0
- package/app/components/Gallery/__tests__/Gallery.spec.ts +14 -0
- package/app/components/Heading/Heading.vue +14 -0
- package/app/components/Heading/__tests__/Heading.spec.ts +14 -0
- package/app/components/Heading/types.ts +5 -0
- package/app/components/media/audioGallery.vue +70 -0
- package/app/components/media/dragDropUpload.vue +67 -0
- package/app/components/media/fullscreenMediaModal.vue +66 -0
- package/app/components/media/imageCard.vue +65 -0
- package/app/components/media/imageGallery.vue +40 -0
- package/app/components/media/mediaCard.vue +89 -0
- package/app/components/media/mediaCarousel.vue +65 -0
- package/app/components/media/mediaFolderSidebar.vue +72 -0
- package/app/components/media/mediaPlayer.vue +40 -0
- package/app/components/media/mediaSearchBar.vue +16 -0
- package/app/components/media/videoGallery.vue +77 -0
- package/app/components/ui/AccordionItem/AccordionItem.vue +24 -0
- package/app/components/ui/AccordionItem/__tests__/AccordionItem.spec.ts +14 -0
- package/app/components/ui/AccordionItem/types.ts +5 -0
- package/app/components/ui/Alert/Alert.vue +34 -0
- package/app/components/ui/Alert/types.ts +5 -0
- package/app/components/ui/Breadcrumbs/Breadcrumbs.vue +76 -0
- package/app/components/ui/Breadcrumbs/__tests__/Breadcrumbs.spec.ts +14 -0
- package/app/components/ui/Breadcrumbs/types.ts +8 -0
- package/app/components/ui/CartProductCard/CartProductCard.vue +66 -0
- package/app/components/ui/CartProductCard/types.ts +18 -0
- package/app/components/ui/CategoryCard/CategoryCard.vue +41 -0
- package/app/components/ui/CategoryCard/types.ts +9 -0
- package/app/components/ui/Display/Display.vue +55 -0
- package/app/components/ui/Display/types.ts +12 -0
- package/app/components/ui/Divider/Divider.vue +3 -0
- package/app/components/ui/Divider/__tests__/Divider.spec.tsx +10 -0
- package/app/components/ui/Footer.vue +92 -0
- package/app/components/ui/Form/FormHelperText.vue +5 -0
- package/app/components/ui/Form/FormLabel.vue +5 -0
- package/app/components/ui/Form/FormPasswordInput.vue +15 -0
- package/app/components/ui/Form/__tests__/FormHelperText.spec.ts +10 -0
- package/app/components/ui/Form/__tests__/FormLabel.spec.ts +10 -0
- package/app/components/ui/Hero/Hero.vue +44 -0
- package/app/components/ui/Hero/types.ts +10 -0
- package/app/components/ui/Modal/Modal.vue +19 -0
- package/app/components/ui/Modal/types.ts +8 -0
- package/app/components/ui/Motionable.vue +45 -0
- package/app/components/ui/NavbarBottom.vue +63 -0
- package/app/components/ui/NavbarTop.vue +25 -0
- package/app/components/ui/Overlay/Overlay.vue +14 -0
- package/app/components/ui/Overlay/__tests__/Overlay.spec.ts +14 -0
- package/app/components/ui/Overlay/types.ts +3 -0
- package/app/components/ui/PageBuilder.vue +39 -0
- package/app/components/ui/PageContainer.vue +5 -0
- package/app/components/ui/Pagination/Pagination.vue +151 -0
- package/app/components/ui/Pagination/__tests__/Pagination.spec.ts +17 -0
- package/app/components/ui/Pagination/types.ts +6 -0
- package/app/components/ui/ProductCard/ProductCard.vue +55 -0
- package/app/components/ui/ProductCard/__tests__/ProductCard.spec.ts +16 -0
- package/app/components/ui/ProductCard/types.ts +12 -0
- package/app/components/ui/ProductCardHorizontal/ProductCardHorizontal.vue +34 -0
- package/app/components/ui/ProductCardHorizontal/__tests__/ProductCardHorizontal.spec.ts +36 -0
- package/app/components/ui/ProductCardHorizontal/types.ts +8 -0
- package/app/components/ui/PurchaseCard/PurchaseCard.vue +109 -0
- package/app/components/ui/PurchaseCard/__tests__/PurchaseCard.spec.ts +15 -0
- package/app/components/ui/PurchaseCard/types.ts +5 -0
- package/app/components/ui/QuantitySelector/QuantitySelector.vue +69 -0
- package/app/components/ui/QuantitySelector/__tests__/QuantitySelector.spec.ts +15 -0
- package/app/components/ui/QuantitySelector/types.ts +5 -0
- package/app/components/ui/RadialProgress.vue +44 -0
- package/app/components/ui/Review/Review.vue +57 -0
- package/app/components/ui/Review/__tests__/Review.spec.ts +15 -0
- package/app/components/ui/Review/types.ts +5 -0
- package/app/components/ui/ScrollTop.vue +82 -0
- package/app/components/ui/Search.vue +54 -0
- package/app/components/ui/Tag/Tag.vue +38 -0
- package/app/components/ui/Tag/__tests__/Tag.spec.ts +10 -0
- package/app/components/ui/Tag/types.ts +16 -0
- package/app/components/ui/VsfLogo.vue +7 -0
- package/app/components/ui/forms/BooleanInput.vue +34 -0
- package/app/components/ui/forms/DateTime.vue +44 -0
- package/app/components/ui/forms/DirectusFormElement.vue +60 -0
- package/app/components/ui/forms/DynamicTableElement.vue +57 -0
- package/app/components/ui/forms/FileInput.vue +85 -0
- package/app/components/ui/forms/FormField.vue +34 -0
- package/app/components/ui/forms/RelationSelect.vue +63 -0
- package/app/components/ui/forms/RepeaterInput.vue +121 -0
- package/app/components/ui/forms/SelectInput.vue +65 -0
- package/app/components/ui/forms/TextArea.vue +59 -0
- package/app/components/ui/forms/TextInput.vue +42 -0
- package/app/components/ui/forms/TiptapEditor.vue +136 -0
- package/app/components/ui/forms/[collection].vue +22 -0
- package/app/components/ui/studio/builder.vue +57 -0
- package/app/components/ui/studio/document.vue +69 -0
- package/app/components/ui/studio/email.vue +57 -0
- package/app/composables/globals/uploadFiles.js +41 -0
- package/app/composables/globals/useAdminTable.ts +12 -0
- package/app/composables/globals/useCustomFetch.ts +13 -0
- package/app/composables/globals/useDirectusField.ts +144 -0
- package/app/composables/globals/useDirectusForm.ts +70 -0
- package/app/composables/globals/useDirectusSchema.js +9 -0
- package/app/composables/globals/useFileManager.ts +76 -0
- package/app/composables/globals/useLivePreview.ts +17 -0
- package/app/composables/globals/useLoading.ts +23 -0
- package/app/composables/globals/useNavigation.js +19 -0
- package/app/composables/globals/useNotifications.ts +153 -0
- package/app/composables/globals/usePages.js +36 -0
- package/app/composables/globals/useRichText.ts +33 -0
- package/app/composables/globals/useServerRootMixin.ts +19 -0
- package/app/composables/globals/useVisualEditing.ts +38 -0
- package/app/composables/media/useFile.ts +6 -0
- package/app/composables/media/useMediaCenter.ts +353 -0
- package/app/composables/media/useVideojs.ts +45 -0
- package/app/composables/registry.ts +13 -0
- package/app/composables/types.ts +12 -0
- package/app/composables/useContent.ts +13 -0
- package/app/composables/useDirectusRequest.ts +32 -0
- package/app/stores/index.ts +0 -0
- package/app/types/api/global-search.ts +8 -0
- package/app/types/blocks/block-button-group.ts +7 -0
- package/app/types/blocks/block-button.ts +14 -0
- package/app/types/blocks/block-column.ts +20 -0
- package/app/types/blocks/block-cta.ts +10 -0
- package/app/types/blocks/block-divider.ts +4 -0
- package/app/types/blocks/block-faq.ts +12 -0
- package/app/types/blocks/block-form.ts +8 -0
- package/app/types/blocks/block-gallery.ts +14 -0
- package/app/types/blocks/block-hero.ts +12 -0
- package/app/types/blocks/block-html.ts +4 -0
- package/app/types/blocks/block-logocloud.ts +14 -0
- package/app/types/blocks/block-quote.ts +11 -0
- package/app/types/blocks/block-richtext.ts +7 -0
- package/app/types/blocks/block-steps.ts +22 -0
- package/app/types/blocks/block-team.ts +6 -0
- package/app/types/blocks/block-testimonial.ts +14 -0
- package/app/types/blocks/block-video.ts +10 -0
- package/app/types/blocks/block.ts +49 -0
- package/app/types/blocks/index.ts +18 -0
- package/app/types/componentMap.ts +15 -0
- package/app/types/content/category.ts +11 -0
- package/app/types/content/form.ts +20 -0
- package/app/types/content/index.ts +6 -0
- package/app/types/content/page.ts +76 -0
- package/app/types/content/post.ts +39 -0
- package/app/types/content/team.ts +16 -0
- package/app/types/content/testimonial.ts +19 -0
- package/app/types/directus.d.ts +47 -0
- package/app/types/env.d.ts +8 -0
- package/app/types/help/index.ts +53 -0
- package/app/types/index.d.ts +9 -0
- package/app/types/index.ts +7 -0
- package/app/types/meta/analytics.ts +18 -0
- package/app/types/meta/config.ts +21 -0
- package/app/types/meta/globals.ts +30 -0
- package/app/types/meta/index.ts +6 -0
- package/app/types/meta/navigation.ts +32 -0
- package/app/types/meta/redirect.ts +13 -0
- package/app/types/meta/seo.ts +19 -0
- package/app/types/os/contact.ts +23 -0
- package/app/types/os/conversation.ts +25 -0
- package/app/types/os/index.ts +16 -0
- package/app/types/os/organization.ts +54 -0
- package/app/types/os/os-activity.ts +28 -0
- package/app/types/os/os-deal.ts +45 -0
- package/app/types/os/os-expense.ts +22 -0
- package/app/types/os/os-invoice.ts +48 -0
- package/app/types/os/os-item.ts +18 -0
- package/app/types/os/os-payment.ts +29 -0
- package/app/types/os/os-project.ts +47 -0
- package/app/types/os/os-proposal.ts +84 -0
- package/app/types/os/os-settings.ts +19 -0
- package/app/types/os/os-subscription.ts +12 -0
- package/app/types/os/os-task.ts +34 -0
- package/app/types/os/os-tax-rate.ts +13 -0
- package/app/types/pageComponentMap.ts +8 -0
- package/app/types/schema.d.ts +39 -0
- package/app/types/schema.ts +151 -0
- package/app/types/system/file.ts +46 -0
- package/app/types/system/folder.ts +8 -0
- package/app/types/system/index.ts +4 -0
- package/app/types/system/role.ts +21 -0
- package/app/types/system/user.ts +56 -0
- package/app/utils/Timer.js +44 -0
- package/app/utils/billing-address.ts +24 -0
- package/app/utils/color.ts +14 -0
- package/app/utils/currency.ts +29 -0
- package/app/utils/embed.ts +57 -0
- package/app/utils/errors.ts +9 -0
- package/app/utils/fieldRegistry.js +89 -0
- package/app/utils/fonts.ts +24 -0
- package/app/utils/formkit.ts +75 -0
- package/app/utils/icons.ts +62 -0
- package/app/utils/index.js +0 -0
- package/app/utils/links.ts +28 -0
- package/app/utils/lodash.ts +33 -0
- package/app/utils/markdown.ts +9 -0
- package/app/utils/math.ts +25 -0
- package/app/utils/navigation.ts +11 -0
- package/app/utils/objects.ts +11 -0
- package/app/utils/paths.ts +21 -0
- package/app/utils/relations.ts +33 -0
- package/app/utils/strings.ts +113 -0
- package/app/utils/time.ts +148 -0
- package/app/utils/url.ts +22 -0
- package/app/utils/user-name.ts +21 -0
- package/app/utils/video/README.md +51 -0
- package/app/utils/video/playlist.js +0 -0
- package/dist/api/global-search.d.ts +8 -0
- package/dist/api/global-search.js +1 -0
- package/dist/blocks/block-button-group.d.ts +6 -0
- package/dist/blocks/block-button-group.js +1 -0
- package/dist/blocks/block-button.d.ts +13 -0
- package/dist/blocks/block-button.js +1 -0
- package/dist/blocks/block-column.d.ts +18 -0
- package/dist/blocks/block-column.js +1 -0
- package/dist/blocks/block-cta.d.ts +11 -0
- package/dist/blocks/block-cta.js +1 -0
- package/dist/blocks/block-divider.d.ts +4 -0
- package/dist/blocks/block-divider.js +1 -0
- package/dist/blocks/block-faq.d.ts +11 -0
- package/dist/blocks/block-faq.js +1 -0
- package/dist/blocks/block-form.d.ts +7 -0
- package/dist/blocks/block-form.js +1 -0
- package/dist/blocks/block-gallery.d.ts +13 -0
- package/dist/blocks/block-gallery.js +1 -0
- package/dist/blocks/block-hero.d.ts +11 -0
- package/dist/blocks/block-hero.js +1 -0
- package/dist/blocks/block-html.d.ts +4 -0
- package/dist/blocks/block-html.js +1 -0
- package/dist/blocks/block-logocloud.d.ts +13 -0
- package/dist/blocks/block-logocloud.js +1 -0
- package/dist/blocks/block-quote.d.ts +10 -0
- package/dist/blocks/block-quote.js +1 -0
- package/dist/blocks/block-richtext.d.ts +7 -0
- package/dist/blocks/block-richtext.js +1 -0
- package/dist/blocks/block-steps.d.ts +21 -0
- package/dist/blocks/block-steps.js +1 -0
- package/dist/blocks/block-team.d.ts +6 -0
- package/dist/blocks/block-team.js +1 -0
- package/dist/blocks/block-testimonial.d.ts +13 -0
- package/dist/blocks/block-testimonial.js +1 -0
- package/dist/blocks/block-video.d.ts +9 -0
- package/dist/blocks/block-video.js +1 -0
- package/dist/blocks/block.d.ts +17 -0
- package/dist/blocks/block.js +1 -0
- package/dist/blocks/index.d.ts +18 -0
- package/dist/blocks/index.js +1 -0
- package/dist/componentMap.d.ts +6 -0
- package/dist/componentMap.js +8 -0
- package/dist/content/category.d.ts +10 -0
- package/dist/content/category.js +1 -0
- package/dist/content/form.d.ts +21 -0
- package/dist/content/form.js +1 -0
- package/dist/content/index.d.ts +6 -0
- package/dist/content/index.js +1 -0
- package/dist/content/page.d.ts +38 -0
- package/dist/content/page.js +1 -0
- package/dist/content/post.d.ts +38 -0
- package/dist/content/post.js +1 -0
- package/dist/content/team.d.ts +17 -0
- package/dist/content/team.js +1 -0
- package/dist/content/testimonial.d.ts +18 -0
- package/dist/content/testimonial.js +1 -0
- package/dist/help/index.d.ts +51 -0
- package/dist/help/index.js +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1 -0
- package/dist/meta/analytics.d.ts +21 -0
- package/dist/meta/analytics.js +1 -0
- package/dist/meta/config.d.ts +22 -0
- package/dist/meta/config.js +1 -0
- package/dist/meta/globals.d.ts +33 -0
- package/dist/meta/globals.js +1 -0
- package/dist/meta/index.d.ts +6 -0
- package/dist/meta/index.js +1 -0
- package/dist/meta/navigation.d.ts +31 -0
- package/dist/meta/navigation.js +1 -0
- package/dist/meta/redirect.d.ts +12 -0
- package/dist/meta/redirect.js +1 -0
- package/dist/meta/seo.d.ts +19 -0
- package/dist/meta/seo.js +1 -0
- package/dist/os/contact.d.ts +22 -0
- package/dist/os/contact.js +1 -0
- package/dist/os/conversation.d.ts +23 -0
- package/dist/os/conversation.js +1 -0
- package/dist/os/index.d.ts +16 -0
- package/dist/os/index.js +1 -0
- package/dist/os/organization.d.ts +51 -0
- package/dist/os/organization.js +1 -0
- package/dist/os/os-activity.d.ts +26 -0
- package/dist/os/os-activity.js +1 -0
- package/dist/os/os-deal.d.ts +42 -0
- package/dist/os/os-deal.js +1 -0
- package/dist/os/os-expense.d.ts +21 -0
- package/dist/os/os-expense.js +1 -0
- package/dist/os/os-invoice.d.ts +46 -0
- package/dist/os/os-invoice.js +1 -0
- package/dist/os/os-item.d.ts +17 -0
- package/dist/os/os-item.js +1 -0
- package/dist/os/os-payment.d.ts +27 -0
- package/dist/os/os-payment.js +1 -0
- package/dist/os/os-project.d.ts +45 -0
- package/dist/os/os-project.js +1 -0
- package/dist/os/os-proposal.d.ts +61 -0
- package/dist/os/os-proposal.js +1 -0
- package/dist/os/os-settings.d.ts +17 -0
- package/dist/os/os-settings.js +1 -0
- package/dist/os/os-subscription.d.ts +12 -0
- package/dist/os/os-subscription.js +1 -0
- package/dist/os/os-task.d.ts +32 -0
- package/dist/os/os-task.js +1 -0
- package/dist/os/os-tax-rate.d.ts +12 -0
- package/dist/os/os-tax-rate.js +1 -0
- package/dist/pageComponentMap.d.ts +2 -0
- package/dist/pageComponentMap.js +7 -0
- package/dist/schema.d.ts +78 -0
- package/dist/schema.js +1 -0
- package/dist/system/file.d.ts +47 -0
- package/dist/system/file.js +1 -0
- package/dist/system/folder.d.ts +8 -0
- package/dist/system/folder.js +1 -0
- package/dist/system/index.d.ts +4 -0
- package/dist/system/index.js +1 -0
- package/dist/system/role.d.ts +20 -0
- package/dist/system/role.js +1 -0
- package/dist/system/user.d.ts +57 -0
- package/dist/system/user.js +1 -0
- package/nuxt.config.ts +5 -0
- package/package.json +42 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import Divider from '~/components/ui/Divider/Divider.vue';
|
|
3
|
+
|
|
4
|
+
describe('<Divider />', () => {
|
|
5
|
+
it('should render component', () => {
|
|
6
|
+
const { getByTestId } = mount(Divider);
|
|
7
|
+
|
|
8
|
+
expect(getByTestId('divider'));
|
|
9
|
+
});
|
|
10
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<footer class="pt-10 bg-neutral-100 mb-[58px] md:mb-0" data-testid="footer">
|
|
3
|
+
<div
|
|
4
|
+
class="grid justify-center grid-cols-[1fr_1fr] md:grid-cols-[repeat(4,1fr)] px-4 md:px-6 pb-10 max-w-screen-3xl mx-auto"
|
|
5
|
+
data-testid="section-top"
|
|
6
|
+
>
|
|
7
|
+
<div v-for="{ key, subcategories } in categories" :key="key" class="min-w-[25%] xs:min-w-[50%] flex flex-col">
|
|
8
|
+
<div class="ml-4 text-lg font-medium leading-7 text-neutral-900 font-body">
|
|
9
|
+
{{ $t(`categories.${key}.label`) }}
|
|
10
|
+
</div>
|
|
11
|
+
<ul>
|
|
12
|
+
<SfListItem
|
|
13
|
+
v-for="{ key: subcategoryKey, link } in subcategories"
|
|
14
|
+
:key="subcategoryKey"
|
|
15
|
+
class="py-2 !bg-transparent typography-text-sm font-body"
|
|
16
|
+
>
|
|
17
|
+
<SfLink
|
|
18
|
+
:tag="NuxtLink"
|
|
19
|
+
class="no-underline text-neutral-600 hover:underline hover:!text-neutral-900 active:underline active:!text-neutral-900"
|
|
20
|
+
variant="secondary"
|
|
21
|
+
:to="link"
|
|
22
|
+
>
|
|
23
|
+
{{ $t(`categories.${key}.subcategories.${subcategoryKey}`) }}
|
|
24
|
+
</SfLink>
|
|
25
|
+
</SfListItem>
|
|
26
|
+
</ul>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<hr />
|
|
30
|
+
<div class="py-10 md:flex md:mx-auto max-w-screen-3xl" data-testid="section-middle">
|
|
31
|
+
<div v-for="{ key, icon, link, details } in contactOptions" :key="key" class="mx-auto my-4 text-center">
|
|
32
|
+
<component :is="icon" size="lg" />
|
|
33
|
+
<p class="py-1 my-2 font-medium typography-text-lg font-body">
|
|
34
|
+
<SfLink
|
|
35
|
+
:tag="NuxtLink"
|
|
36
|
+
class="no-underline text-neutral-600 hover:underline hover:!text-neutral-900 active:underline active:!text-neutral-900"
|
|
37
|
+
variant="secondary"
|
|
38
|
+
:to="link"
|
|
39
|
+
>
|
|
40
|
+
{{ $t(`contactOptions.${key}.label`) }}
|
|
41
|
+
</SfLink>
|
|
42
|
+
</p>
|
|
43
|
+
<p v-for="option in details" :key="option" class="leading-5 typography-text-sm text-neutral-600 font-body">
|
|
44
|
+
{{ $t(`contactOptions.${key}.details.${option}`) }}
|
|
45
|
+
</p>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="bg-neutral-900" data-testid="section-bottom">
|
|
49
|
+
<div class="justify-end px-4 py-10 md:flex md:py-6 max-w-screen-3xl mx-auto">
|
|
50
|
+
<div class="flex justify-center py-2 gap-x-4 md:self-start">
|
|
51
|
+
<SfButton
|
|
52
|
+
v-for="{ label, link, icon } in socialMedia"
|
|
53
|
+
:key="label"
|
|
54
|
+
:tag="NuxtLink"
|
|
55
|
+
:to="link"
|
|
56
|
+
:title="$t('socialLabel', { label })"
|
|
57
|
+
square
|
|
58
|
+
variant="tertiary"
|
|
59
|
+
class="text-white active:text-white hover:text-white hover:!bg-neutral-500 active:!bg-transparent"
|
|
60
|
+
:data-testid="label"
|
|
61
|
+
>
|
|
62
|
+
<component :is="icon" />
|
|
63
|
+
</SfButton>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="flex items-center justify-center gap-6 py-2 my-4 md:ml-auto md:my-0">
|
|
66
|
+
<SfLink
|
|
67
|
+
v-for="{ key, link } in bottomLinks"
|
|
68
|
+
:key="key"
|
|
69
|
+
:tag="NuxtLink"
|
|
70
|
+
class="text-white no-underline typography-text-sm active:text-white active:underline hover:text-white hover:underline"
|
|
71
|
+
variant="secondary"
|
|
72
|
+
:to="link"
|
|
73
|
+
>
|
|
74
|
+
{{ $t(`bottomLinks.${key}`) }}
|
|
75
|
+
</SfLink>
|
|
76
|
+
</div>
|
|
77
|
+
<p
|
|
78
|
+
class="flex items-center justify-center leading-5 text-center typography-text-sm text-white/50 font-body md:ml-6"
|
|
79
|
+
>
|
|
80
|
+
{{ companyName }}
|
|
81
|
+
</p>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</footer>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<script setup lang="ts">
|
|
88
|
+
import { SfButton, SfLink, SfListItem } from '@storefront-ui/vue';
|
|
89
|
+
import { bottomLinks, categories, companyName, contactOptions, socialMedia } from '~/mocks';
|
|
90
|
+
|
|
91
|
+
const NuxtLink = resolveComponent('NuxtLink');
|
|
92
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<SfInput :type="isPasswordVisible ? 'text' : 'password'">
|
|
3
|
+
<template #suffix>
|
|
4
|
+
<button type="button" @click="isPasswordVisible = !isPasswordVisible">
|
|
5
|
+
<component :is="isPasswordVisible ? SfIconVisibilityOff : SfIconVisibility" />
|
|
6
|
+
</button>
|
|
7
|
+
</template>
|
|
8
|
+
</SfInput>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import { SfInput, SfIconVisibility, SfIconVisibilityOff } from '@storefront-ui/vue';
|
|
13
|
+
|
|
14
|
+
const isPasswordVisible = ref<boolean>();
|
|
15
|
+
</script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import FormHelperText from '~/components/ui/Form/FormHelperText.vue';
|
|
3
|
+
|
|
4
|
+
describe('<FormHelperText />', () => {
|
|
5
|
+
it('should render component', () => {
|
|
6
|
+
const { getByTestId } = mount(FormHelperText);
|
|
7
|
+
|
|
8
|
+
expect(getByTestId('form-helper-text'));
|
|
9
|
+
});
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import FormLabel from '~/components/ui/Form/FormLabel.vue';
|
|
3
|
+
|
|
4
|
+
describe('<FormLabel />', () => {
|
|
5
|
+
it('should render component', () => {
|
|
6
|
+
const { getByTestId } = mount(FormLabel);
|
|
7
|
+
|
|
8
|
+
expect(getByTestId('form-label'));
|
|
9
|
+
});
|
|
10
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="relative min-h-[600px] mb-10">
|
|
3
|
+
<div class="md:flex md:flex-row-reverse md:justify-center min-h-[600px] max-w-screen-3xl mx-auto">
|
|
4
|
+
<div class="flex flex-col justify-center md:basis-2/4 md:items-stretch md:overflow-hidden">
|
|
5
|
+
<NuxtImg
|
|
6
|
+
:src="image"
|
|
7
|
+
alt="Hero"
|
|
8
|
+
class="h-auto w-full object-cover object-left"
|
|
9
|
+
width="764"
|
|
10
|
+
height="600"
|
|
11
|
+
fetchpriority="high"
|
|
12
|
+
format="webp"
|
|
13
|
+
preload
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="p-4 md:p-10 md:flex md:flex-col md:justify-center md:items-start md:basis-2/4">
|
|
17
|
+
<p class="typography-text-xs md:typography-text-sm font-bold tracking-widest text-neutral-500 uppercase">
|
|
18
|
+
{{ subtitle }}
|
|
19
|
+
</p>
|
|
20
|
+
<h1 class="typography-headline-2 md:typography-headline-1 md:leading-[67.5px] font-bold mt-2 mb-4">
|
|
21
|
+
{{ title }}
|
|
22
|
+
</h1>
|
|
23
|
+
<p class="typography-text-base md:typography-text-lg">{{ description }}</p>
|
|
24
|
+
<div class="flex flex-col md:flex-row gap-4 mt-6">
|
|
25
|
+
<SfButton size="lg" :tag="NuxtLink" :to="primaryButtonLink">
|
|
26
|
+
{{ primaryButtonText }}
|
|
27
|
+
</SfButton>
|
|
28
|
+
<SfButton size="lg" :tag="NuxtLink" :to="secondaryButtonLink" class="bg-white" variant="secondary">
|
|
29
|
+
{{ secondaryButtonText }}
|
|
30
|
+
</SfButton>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script setup lang="ts">
|
|
38
|
+
import { SfButton } from '@storefront-ui/vue';
|
|
39
|
+
import type { HeroProps } from '~/components/ui/Hero/types';
|
|
40
|
+
|
|
41
|
+
defineProps<HeroProps>();
|
|
42
|
+
|
|
43
|
+
const NuxtLink = resolveComponent('NuxtLink');
|
|
44
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UiOverlay :visible="modelValue">
|
|
3
|
+
<SfModal class="md:max-h-[min(calc(100vh-32px),100%)]" v-bind="{ ...$attrs, ...props }">
|
|
4
|
+
<slot />
|
|
5
|
+
</SfModal>
|
|
6
|
+
</UiOverlay>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
export default {
|
|
11
|
+
inheritAttrs: false,
|
|
12
|
+
};
|
|
13
|
+
</script>
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import { SfModal } from '@storefront-ui/vue';
|
|
16
|
+
import type { ModalProps } from '~/components/ui/Modal/types';
|
|
17
|
+
|
|
18
|
+
const props = defineProps<ModalProps>();
|
|
19
|
+
</script>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useMotions } from '@vueuse/motion';
|
|
3
|
+
|
|
4
|
+
interface MotionableProps {
|
|
5
|
+
as?: string | object;
|
|
6
|
+
name: string;
|
|
7
|
+
show?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(defineProps<MotionableProps>(), {
|
|
11
|
+
as: 'div',
|
|
12
|
+
show: true,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const motions = useMotions();
|
|
16
|
+
const leaved = ref(!props.show);
|
|
17
|
+
|
|
18
|
+
watch(
|
|
19
|
+
() => props.show,
|
|
20
|
+
async (newShow) => {
|
|
21
|
+
const motion = motions[props.name];
|
|
22
|
+
|
|
23
|
+
if (motion && motion.isAnimating.value) {
|
|
24
|
+
motion.stop('leave');
|
|
25
|
+
|
|
26
|
+
if (newShow) {
|
|
27
|
+
motion.apply('enter');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (!newShow) {
|
|
32
|
+
leaved.value = false;
|
|
33
|
+
|
|
34
|
+
motion.leave(() => {
|
|
35
|
+
leaved.value = true;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
);
|
|
40
|
+
</script>
|
|
41
|
+
<template>
|
|
42
|
+
<component :is="as" v-if="show || !leaved" v-motion="name">
|
|
43
|
+
<slot />
|
|
44
|
+
</component>
|
|
45
|
+
</template>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav class="w-full fixed bottom-0 left-0 flex flex-row items-stretch md:hidden" data-testid="navbar-bottom">
|
|
3
|
+
<SfButton
|
|
4
|
+
v-for="{ label, icon, link } in items"
|
|
5
|
+
:key="label"
|
|
6
|
+
variant="tertiary"
|
|
7
|
+
:class="[
|
|
8
|
+
'!p-1 !pt-3 flex flex-col h-full w-full rounded-none bg-primary-700 text-white hover:text-white hover:bg-primary-800 active:text-white active:bg-primary-900 !text-xs !font-base',
|
|
9
|
+
{ 'text-white bg-primary-900': $route.path === link },
|
|
10
|
+
]"
|
|
11
|
+
size="sm"
|
|
12
|
+
:tag="NuxtLink"
|
|
13
|
+
:to="link"
|
|
14
|
+
>
|
|
15
|
+
<template #prefix>
|
|
16
|
+
<div class="relative">
|
|
17
|
+
<component :is="icon" />
|
|
18
|
+
<SfBadge
|
|
19
|
+
v-if="label === 'cart'"
|
|
20
|
+
:content="cartLineItemsCount"
|
|
21
|
+
class="outline-white bg-white !text-neutral-900 translate-x-[5px] translate-y-[-3px]"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
{{ label }}
|
|
26
|
+
</SfButton>
|
|
27
|
+
</nav>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import { SfButton, SfBadge, SfIconShoppingCart, SfIconHome, SfIconMenu, SfIconPerson } from '@storefront-ui/vue';
|
|
32
|
+
|
|
33
|
+
const { t } = useI18n();
|
|
34
|
+
const { data: cart } = useCart();
|
|
35
|
+
|
|
36
|
+
const items = [
|
|
37
|
+
{
|
|
38
|
+
label: t('home'),
|
|
39
|
+
icon: SfIconHome,
|
|
40
|
+
link: paths.home,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: t('products'),
|
|
44
|
+
icon: SfIconMenu,
|
|
45
|
+
link: paths.category,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: t('cart'),
|
|
49
|
+
icon: SfIconShoppingCart,
|
|
50
|
+
link: paths.cart,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: t('account.navBarBottomHeading'),
|
|
54
|
+
icon: SfIconPerson,
|
|
55
|
+
link: paths.account,
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
const cartLineItemsCount = computed(
|
|
60
|
+
() => cart.value?.lineItems.reduce((total, { quantity }) => total + quantity, 0) ?? 0,
|
|
61
|
+
);
|
|
62
|
+
const NuxtLink = resolveComponent('NuxtLink');
|
|
63
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header
|
|
3
|
+
:class="[
|
|
4
|
+
'h-14 md:h-20 flex z-50 md:sticky md:-top-5 md:pt-2.5 md:shadow-md',
|
|
5
|
+
{ 'bg-primary-700 text-white': filled },
|
|
6
|
+
{ 'bg-white text-[#02C652] border-b border-neutral-200': !filled },
|
|
7
|
+
]"
|
|
8
|
+
data-testid="navbar-top"
|
|
9
|
+
>
|
|
10
|
+
<div
|
|
11
|
+
class="flex gap-[clamp(1rem,3vw,3rem)] items-center w-full md:h-[60px] max-w-screen-3xl py-6 px-4 md:px-6 lg:px-10 mx-auto sticky top-0 justify-between md:justify-normal"
|
|
12
|
+
>
|
|
13
|
+
<NuxtLink :to="paths.home" aria-label="Sf Homepage" class="h-6 md:h-7 -mt-1.5">
|
|
14
|
+
<UiVsfLogo />
|
|
15
|
+
</NuxtLink>
|
|
16
|
+
<slot />
|
|
17
|
+
</div>
|
|
18
|
+
</header>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
defineProps<{
|
|
23
|
+
filled?: boolean;
|
|
24
|
+
}>();
|
|
25
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="visible"
|
|
4
|
+
class="w-full h-full top-0 bottom-0 left-0 right-0 bg-neutral-500/50 fixed z-50"
|
|
5
|
+
data-testid="overlay"
|
|
6
|
+
>
|
|
7
|
+
<slot />
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
<script setup lang="ts">
|
|
11
|
+
import type { OverlayProps } from '~/components/ui/Overlay/types';
|
|
12
|
+
|
|
13
|
+
defineProps<OverlayProps>();
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import Overlay from '~/components/ui/Overlay/Overlay.vue';
|
|
3
|
+
|
|
4
|
+
describe('<Overlay />', () => {
|
|
5
|
+
it('should render component', () => {
|
|
6
|
+
const wrapper = mount(Overlay, {
|
|
7
|
+
props: {
|
|
8
|
+
visible: true,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
expect(wrapper.getByTestId('overlay'));
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Page, OsProposal, PageBlock, BlockType } from '~/types';
|
|
3
|
+
|
|
4
|
+
const componentMap: Record<BlockType, any> = {
|
|
5
|
+
block_hero: resolveComponent('BlocksHero'),
|
|
6
|
+
block_faqs: resolveComponent('BlocksFaqs'),
|
|
7
|
+
block_richtext: resolveComponent('BlocksRichText'),
|
|
8
|
+
block_testimonials: resolveComponent('BlocksTestimonials'),
|
|
9
|
+
block_quote: resolveComponent('BlocksQuote'),
|
|
10
|
+
block_cta: resolveComponent('BlocksCta'),
|
|
11
|
+
block_form: resolveComponent('BlocksForm'),
|
|
12
|
+
block_logocloud: resolveComponent('BlocksLogoCloud'),
|
|
13
|
+
block_team: resolveComponent('BlocksTeam'),
|
|
14
|
+
block_html: resolveComponent('BlocksRawHtml'),
|
|
15
|
+
block_video: resolveComponent('BlocksVideo'),
|
|
16
|
+
block_gallery: resolveComponent('BlocksGallery'),
|
|
17
|
+
block_steps: resolveComponent('BlocksSteps'),
|
|
18
|
+
block_columns: resolveComponent('BlocksColumns'),
|
|
19
|
+
block_divider: resolveComponent('BlocksDivider'),
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const props = defineProps<{
|
|
23
|
+
page: Page | OsProposal;
|
|
24
|
+
}>();
|
|
25
|
+
|
|
26
|
+
const blocks = computed(() => {
|
|
27
|
+
const blocks = unref(props.page as Page)?.blocks as PageBlock[];
|
|
28
|
+
return blocks?.filter((block) => {
|
|
29
|
+
return block.hide_block !== true;
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
</script>
|
|
33
|
+
<template>
|
|
34
|
+
<div id="content" class="mx-auto">
|
|
35
|
+
<template v-for="block in blocks" :key="block.id">
|
|
36
|
+
<component :is="componentMap[block.collection]" v-if="block && block.collection" :data="block.item" />
|
|
37
|
+
</template>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav
|
|
3
|
+
class="flex justify-between items-end border-t border-neutral-200"
|
|
4
|
+
role="navigation"
|
|
5
|
+
aria-label="pagination"
|
|
6
|
+
data-testid="pagination"
|
|
7
|
+
>
|
|
8
|
+
<SfButton
|
|
9
|
+
size="lg"
|
|
10
|
+
:aria-label="$t('prevAriaLabel')"
|
|
11
|
+
:disabled="pagination.selectedPage <= 1"
|
|
12
|
+
variant="tertiary"
|
|
13
|
+
class="gap-3"
|
|
14
|
+
@click="pagination.prev"
|
|
15
|
+
>
|
|
16
|
+
<template #prefix>
|
|
17
|
+
<SfIconChevronLeft />
|
|
18
|
+
</template>
|
|
19
|
+
<span class="hidden sm:inline-flex">{{ $t('prev') }}</span>
|
|
20
|
+
</SfButton>
|
|
21
|
+
<ul class="flex justify-center">
|
|
22
|
+
<li v-if="!pagination.pages.includes(1)">
|
|
23
|
+
<div
|
|
24
|
+
:class="[
|
|
25
|
+
'flex pt-1 border-t-4 border-transparent',
|
|
26
|
+
{ 'font-medium border-t-4 !border-primary-500': pagination.selectedPage === 1 },
|
|
27
|
+
]"
|
|
28
|
+
>
|
|
29
|
+
<button
|
|
30
|
+
type="button"
|
|
31
|
+
class="px-4 py-3 md:w-12 rounded-md text-neutral-500 hover:bg-primary-100 hover:text-primary-800 active:bg-primary-200 active:text-primary-900"
|
|
32
|
+
:aria-current="pagination.selectedPage === 1"
|
|
33
|
+
@click="pagination.setPage(1)"
|
|
34
|
+
>
|
|
35
|
+
1
|
|
36
|
+
</button>
|
|
37
|
+
</div>
|
|
38
|
+
</li>
|
|
39
|
+
<li v-if="pagination.startPage > 2">
|
|
40
|
+
<div class="flex pt-1 border-t-4 border-transparent">
|
|
41
|
+
<button type="button" disabled aria-hidden="true" class="px-4 py-3 md:w-12 rounded-md text-neutral-500">
|
|
42
|
+
...
|
|
43
|
+
</button>
|
|
44
|
+
</div>
|
|
45
|
+
</li>
|
|
46
|
+
<li v-if="maxVisiblePages === 1 && pagination.selectedPage === pagination.totalPages">
|
|
47
|
+
<div class="flex pt-1 border-t-4 border-transparent">
|
|
48
|
+
<button
|
|
49
|
+
type="button"
|
|
50
|
+
class="px-4 py-3 md:w-12 rounded-md text-neutral-500 hover:bg-primary-100 hover:text-primary-800 active:bg-primary-200 active:text-primary-900"
|
|
51
|
+
:aria-current="pagination.endPage - 1 === pagination.selectedPage"
|
|
52
|
+
@click="pagination.setPage(pagination.endPage - 1)"
|
|
53
|
+
>
|
|
54
|
+
{{ pagination.endPage - 1 }}
|
|
55
|
+
</button>
|
|
56
|
+
</div>
|
|
57
|
+
</li>
|
|
58
|
+
<li v-for="page in pagination.pages" :key="`page-${page}`">
|
|
59
|
+
<div
|
|
60
|
+
:class="[
|
|
61
|
+
'flex pt-1 border-t-4 border-transparent',
|
|
62
|
+
{ 'font-medium border-t-4 !border-primary-700': pagination.selectedPage === page },
|
|
63
|
+
]"
|
|
64
|
+
>
|
|
65
|
+
<button
|
|
66
|
+
type="button"
|
|
67
|
+
:class="[
|
|
68
|
+
'px-4 py-3 md:w-12 text-neutral-500 rounded-md hover:bg-primary-100 hover:text-primary-800 active:bg-primary-200 active:text-primary-900',
|
|
69
|
+
{
|
|
70
|
+
'!text-neutral-900 hover:!text-primary-800 active:!text-primary-900': pagination.selectedPage === page,
|
|
71
|
+
},
|
|
72
|
+
]"
|
|
73
|
+
:aria-label="$t('currentPage', { page, totalPages: pagination.totalPages })"
|
|
74
|
+
:aria-current="pagination.selectedPage === page"
|
|
75
|
+
@click="pagination.setPage(page)"
|
|
76
|
+
>
|
|
77
|
+
{{ page }}
|
|
78
|
+
</button>
|
|
79
|
+
</div>
|
|
80
|
+
</li>
|
|
81
|
+
<li v-if="maxVisiblePages === 1 && pagination.selectedPage === 1">
|
|
82
|
+
<div class="flex pt-1 border-t-4 border-transparent">
|
|
83
|
+
<button
|
|
84
|
+
type="button"
|
|
85
|
+
class="px-4 py-3 md:w-12 rounded-md text-neutral-500 hover:bg-primary-100 hover:text-primary-800 active:bg-primary-200 active:text-primary-900"
|
|
86
|
+
:aria-label="$t('secondPageAriaLabel')"
|
|
87
|
+
@click="pagination.setPage(2)"
|
|
88
|
+
>
|
|
89
|
+
2
|
|
90
|
+
</button>
|
|
91
|
+
</div>
|
|
92
|
+
</li>
|
|
93
|
+
<li v-if="pagination.endPage < pagination.totalPages - 1">
|
|
94
|
+
<div class="flex pt-1 border-t-4 border-transparent">
|
|
95
|
+
<button type="button" disabled aria-hidden="true" class="px-4 py-3 md:w-12 rounded-md text-neutral-500">
|
|
96
|
+
...
|
|
97
|
+
</button>
|
|
98
|
+
</div>
|
|
99
|
+
</li>
|
|
100
|
+
<li v-if="!pagination.pages.includes(pagination.totalPages)">
|
|
101
|
+
<div
|
|
102
|
+
:class="[
|
|
103
|
+
'flex pt-1 border-t-4 border-transparent',
|
|
104
|
+
{ 'font-medium border-t-4 !border-primary-500': pagination.selectedPage === pagination.totalPages },
|
|
105
|
+
]"
|
|
106
|
+
>
|
|
107
|
+
<button
|
|
108
|
+
type="button"
|
|
109
|
+
class="px-4 py-3 md:w-12 rounded-md text-neutral-500 hover:bg-primary-100 hover:text-primary-800 active:bg-primary-200 active:text-primary-900"
|
|
110
|
+
:aria-current="pagination.totalPages === pagination.selectedPage"
|
|
111
|
+
@click="pagination.setPage(pagination.totalPages)"
|
|
112
|
+
>
|
|
113
|
+
{{ pagination.totalPages }}
|
|
114
|
+
</button>
|
|
115
|
+
</div>
|
|
116
|
+
</li>
|
|
117
|
+
</ul>
|
|
118
|
+
<SfButton
|
|
119
|
+
size="lg"
|
|
120
|
+
:aria-label="$t('nextAriaLabel')"
|
|
121
|
+
:disabled="pagination.selectedPage >= pagination.totalPages"
|
|
122
|
+
variant="tertiary"
|
|
123
|
+
class="gap-3"
|
|
124
|
+
@click="pagination.next"
|
|
125
|
+
>
|
|
126
|
+
<span class="hidden sm:inline-flex">{{ $t('next') }}</span>
|
|
127
|
+
<template #suffix>
|
|
128
|
+
<SfIconChevronRight />
|
|
129
|
+
</template>
|
|
130
|
+
</SfButton>
|
|
131
|
+
</nav>
|
|
132
|
+
</template>
|
|
133
|
+
|
|
134
|
+
<script setup lang="ts">
|
|
135
|
+
import { SfButton, SfIconChevronLeft, SfIconChevronRight, usePagination } from '@storefront-ui/vue';
|
|
136
|
+
import type { PaginationProps } from '~/components/ui/Pagination/types';
|
|
137
|
+
|
|
138
|
+
const props = defineProps<PaginationProps>();
|
|
139
|
+
|
|
140
|
+
const { currentPage, pageSize, totalItems, maxVisiblePages: maxVisiblePagesProperty } = toRefs(props);
|
|
141
|
+
const pagination = computed(() =>
|
|
142
|
+
reactive(
|
|
143
|
+
usePagination({
|
|
144
|
+
totalItems: totalItems.value,
|
|
145
|
+
currentPage: currentPage.value,
|
|
146
|
+
pageSize: pageSize.value,
|
|
147
|
+
maxPages: maxVisiblePagesProperty.value,
|
|
148
|
+
}),
|
|
149
|
+
),
|
|
150
|
+
);
|
|
151
|
+
</script>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import Pagination from '~/components/ui/Pagination/Pagination.vue';
|
|
3
|
+
|
|
4
|
+
describe('<Pagination />', () => {
|
|
5
|
+
it('should render component', () => {
|
|
6
|
+
const { getByTestId } = mount(Pagination, {
|
|
7
|
+
props: {
|
|
8
|
+
currentPage: 4,
|
|
9
|
+
pageSize: 24,
|
|
10
|
+
maxVisiblePages: 5,
|
|
11
|
+
totalItems: 2137,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
expect(getByTestId('pagination'));
|
|
16
|
+
});
|
|
17
|
+
});
|