@faststore/core 2.0.121-alpha.0 → 2.0.122-alpha.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/.next/BUILD_ID +1 -0
- package/.next/build-manifest.json +120 -0
- package/.next/cache/.tsbuildinfo +1 -0
- package/.next/cache/config.json +7 -0
- package/.next/cache/eslint/.cache_1gneedd +1 -0
- package/.next/cache/next-server.js.nft.json +1 -0
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/export-marker.json +1 -0
- package/.next/images-manifest.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +1 -0
- package/.next/react-loadable-manifest.json +52 -0
- package/.next/required-server-files.json +1 -0
- package/.next/routes-manifest.json +1 -0
- package/.next/server/chunks/104.js +255 -0
- package/.next/server/chunks/120.js +435 -0
- package/.next/server/chunks/123.js +58 -0
- package/.next/server/chunks/143.js +106 -0
- package/.next/server/chunks/154.js +206 -0
- package/.next/server/chunks/183.js +80 -0
- package/.next/server/chunks/247.js +61 -0
- package/.next/server/chunks/254.js +159 -0
- package/.next/server/chunks/256.js +1787 -0
- package/.next/server/chunks/280.js +322 -0
- package/.next/server/chunks/287.js +58 -0
- package/.next/server/chunks/312.js +674 -0
- package/.next/server/chunks/336.js +820 -0
- package/.next/server/chunks/350.js +142 -0
- package/.next/server/chunks/398.js +132 -0
- package/.next/server/chunks/401.js +7241 -0
- package/.next/server/chunks/431.js +7241 -0
- package/.next/server/chunks/502.js +603 -0
- package/.next/server/chunks/554.js +264 -0
- package/.next/server/chunks/557.js +135 -0
- package/.next/server/chunks/576.js +80 -0
- package/.next/server/chunks/597.js +169 -0
- package/.next/server/chunks/608.js +515 -0
- package/.next/server/chunks/664.js +3401 -0
- package/.next/server/chunks/676.js +32 -0
- package/.next/server/chunks/74.js +2606 -0
- package/.next/server/chunks/746.js +249 -0
- package/.next/server/chunks/82.js +371 -0
- package/.next/server/chunks/854.js +72 -0
- package/.next/server/chunks/859.js +959 -0
- package/.next/server/chunks/872.js +358 -0
- package/.next/server/chunks/886.js +120 -0
- package/.next/server/chunks/98.js +124 -0
- package/.next/server/chunks/font-manifest.json +1 -0
- package/.next/server/font-manifest.json +1 -0
- package/.next/server/middleware-build-manifest.js +1 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/pages/404.js +414 -0
- package/.next/server/pages/404.js.nft.json +1 -0
- package/.next/server/pages/500.js +384 -0
- package/.next/server/pages/500.js.nft.json +1 -0
- package/.next/server/pages/[...slug].js +700 -0
- package/.next/server/pages/[...slug].js.nft.json +1 -0
- package/.next/server/pages/[slug]/p.js +2338 -0
- package/.next/server/pages/[slug]/p.js.nft.json +1 -0
- package/.next/server/pages/_app.js +368 -0
- package/.next/server/pages/_app.js.nft.json +1 -0
- package/.next/server/pages/_document.js +304 -0
- package/.next/server/pages/_document.js.nft.json +1 -0
- package/.next/server/pages/_error.js +164 -0
- package/.next/server/pages/_error.js.nft.json +1 -0
- package/.next/server/pages/account.js +370 -0
- package/.next/server/pages/account.js.nft.json +1 -0
- package/.next/server/pages/api/graphql.js +315 -0
- package/.next/server/pages/api/graphql.js.nft.json +1 -0
- package/.next/server/pages/api/preview.js +118 -0
- package/.next/server/pages/api/preview.js.nft.json +1 -0
- package/.next/server/pages/checkout.js +370 -0
- package/.next/server/pages/checkout.js.nft.json +1 -0
- package/.next/server/pages/en-US/404.html +81 -0
- package/.next/server/pages/en-US/404.json +1 -0
- package/.next/server/pages/en-US/500.html +81 -0
- package/.next/server/pages/en-US/500.json +1 -0
- package/.next/server/pages/en-US/account.html +81 -0
- package/.next/server/pages/en-US/account.json +1 -0
- package/.next/server/pages/en-US/checkout.html +81 -0
- package/.next/server/pages/en-US/checkout.json +1 -0
- package/.next/server/pages/en-US/login.html +81 -0
- package/.next/server/pages/en-US/login.json +1 -0
- package/.next/server/pages/en-US/s.html +81 -0
- package/.next/server/pages/en-US/s.json +1 -0
- package/.next/server/pages/en-US.html +81 -0
- package/.next/server/pages/en-US.json +1 -0
- package/.next/server/pages/index.js +580 -0
- package/.next/server/pages/index.js.nft.json +1 -0
- package/.next/server/pages/login.js +396 -0
- package/.next/server/pages/login.js.nft.json +1 -0
- package/.next/server/pages/s.js +438 -0
- package/.next/server/pages/s.js.nft.json +1 -0
- package/.next/server/pages-manifest.json +16 -0
- package/.next/server/webpack-api-runtime.js +229 -0
- package/.next/server/webpack-runtime.js +229 -0
- package/.next/static/chunks/143.dd8a556e6957baa1.js +1 -0
- package/.next/static/chunks/170.b45293edb4f089c8.js +1 -0
- package/.next/static/chunks/226.b57e10ad9932f88c.js +1 -0
- package/.next/static/chunks/336.84e96cd7aa2412bc.js +1 -0
- package/.next/static/chunks/419-274b5b8beee8c7b2.js +1 -0
- package/.next/static/chunks/495.e6b60941cc3e82e4.js +1 -0
- package/.next/static/chunks/54.1d3e6cb43b5b1626.js +1 -0
- package/.next/static/chunks/597.d0da2018cc312352.js +1 -0
- package/.next/static/chunks/608.59e69b83f35d9c44.js +1 -0
- package/.next/static/chunks/651.7142f31ce1e052b3.js +1 -0
- package/.next/static/chunks/706-abfba2e18f084aed.js +1 -0
- package/.next/static/chunks/741.52f7fb873418346f.js +1 -0
- package/.next/static/chunks/832-99f4667bdaf092f8.js +1 -0
- package/.next/static/chunks/861-d1a326525092ab9c.js +1 -0
- package/.next/static/chunks/98.97381d2021f86cd9.js +1 -0
- package/.next/static/chunks/framework-dfd14d7ce6600b03.js +1 -0
- package/.next/static/chunks/main-9746772201fe3ac1.js +1 -0
- package/.next/static/chunks/pages/404-ac22e12eb22b9c50.js +1 -0
- package/.next/static/chunks/pages/500-7b708e8b89389d0e.js +1 -0
- package/.next/static/chunks/pages/[...slug]-3aaeeabdb9564d0f.js +1 -0
- package/.next/static/chunks/pages/[slug]/p-b269ba68926617dd.js +1 -0
- package/.next/static/chunks/pages/_app-b601536188b9a919.js +1 -0
- package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +1 -0
- package/.next/static/chunks/pages/account-04a0a6c07709c50e.js +1 -0
- package/.next/static/chunks/pages/checkout-2ed6b828bb6ed7e6.js +1 -0
- package/.next/static/chunks/pages/index-c2b6dfd205dc6cc2.js +1 -0
- package/.next/static/chunks/pages/login-3bb40d77e6ee120a.js +1 -0
- package/.next/static/chunks/pages/s-8fec20c40a2bd7da.js +1 -0
- package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +1 -0
- package/.next/static/chunks/webpack-426a37879992164d.js +1 -0
- package/.next/static/css/025f924b9633ecd3.css +1 -0
- package/.next/static/css/2253644409b99b98.css +1 -0
- package/.next/static/css/364c439adafef5c8.css +1 -0
- package/.next/static/css/4b7b7b64ae6afe67.css +1 -0
- package/.next/static/css/4e0fc649e912b30f.css +1 -0
- package/.next/static/css/501cb58eaa378545.css +1 -0
- package/.next/static/css/587c27bbda64e700.css +1 -0
- package/.next/static/css/5f1b35b69b2ba1f7.css +1 -0
- package/.next/static/css/7a8417de90d11c60.css +1 -0
- package/.next/static/css/7df2581c69fe96b4.css +1 -0
- package/.next/static/media/brandless-neutral.76ddf63a.png +0 -0
- package/.next/static/z81uKE37lBbYBn8W-39Mb/_buildManifest.js +1 -0
- package/.next/static/z81uKE37lBbYBn8W-39Mb/_ssgManifest.js +1 -0
- package/.next/trace +65 -0
- package/.turbo/turbo-build.log +15 -16
- package/CHANGELOG.md +6 -0
- package/package.json +4 -4
- package/public/~partytown/debug/partytown-atomics.js +556 -0
- package/public/~partytown/debug/partytown-media.js +374 -0
- package/public/~partytown/debug/partytown-sandbox-sw.js +543 -0
- package/public/~partytown/debug/partytown-sw.js +59 -0
- package/public/~partytown/debug/partytown-ww-atomics.js +1789 -0
- package/public/~partytown/debug/partytown-ww-sw.js +1781 -0
- package/public/~partytown/debug/partytown.js +72 -0
- package/public/~partytown/partytown-atomics.js +2 -0
- package/public/~partytown/partytown-media.js +2 -0
- package/public/~partytown/partytown-sw.js +2 -0
- package/public/~partytown/partytown.js +2 -0
- package/src/components/cart/CartSidebar/CartSidebar.tsx +6 -2
- package/src/components/cart/CartSidebar/section.module.scss +21 -0
- package/src/components/cms/GlobalSections.tsx +6 -6
- package/src/components/common/Alert/Alert.tsx +8 -3
- package/src/components/common/Alert/section.module.scss +9 -0
- package/src/components/common/Footer/Footer.tsx +87 -89
- package/src/components/common/Footer/FooterLinks.tsx +4 -6
- package/src/components/common/Footer/section.module.scss +12 -0
- package/src/components/common/RegionBar/RegionBar.tsx +17 -0
- package/src/components/common/RegionBar/index.ts +1 -0
- package/src/components/common/RegionBar/section.module.scss +8 -0
- package/src/components/navigation/Navbar/Navbar.tsx +62 -61
- package/src/components/navigation/Navbar/section.module.scss +26 -0
- package/src/components/navigation/NavbarLinks/NavbarLinks.tsx +0 -1
- package/src/components/navigation/NavbarSlider/NavbarSlider.tsx +11 -7
- package/src/components/navigation/NavbarSlider/section.module.scss +26 -0
- package/src/components/product/ProductGrid/ProductGrid.tsx +2 -4
- package/src/components/region/RegionModal/RegionModal.tsx +6 -1
- package/src/components/region/RegionModal/section.module.scss +13 -0
- package/src/components/search/Filter/Filter.tsx +6 -3
- package/src/components/search/Filter/FilterSlider.tsx +5 -0
- package/src/components/search/Filter/section.module.scss +22 -0
- package/src/components/sections/BannerNewsletter/BannerNewsletter.tsx +5 -3
- package/src/components/sections/BannerNewsletter/section.module.scss +8 -0
- package/src/components/sections/BannerText/BannerText.tsx +4 -2
- package/src/components/sections/BannerText/section.module.scss +8 -0
- package/src/components/sections/Breadcrumb/Breadcrumb.tsx +4 -2
- package/src/components/sections/Breadcrumb/section.module.scss +9 -0
- package/src/components/sections/Hero/Hero.tsx +5 -9
- package/src/components/sections/Hero/section.module.scss +9 -0
- package/src/components/sections/{Incentives → IncentivesHeader}/IncentivesHeader.tsx +3 -2
- package/src/components/sections/IncentivesHeader/index.ts +1 -0
- package/src/components/sections/IncentivesHeader/section.module.scss +8 -0
- package/src/components/sections/Newsletter/Newsletter.tsx +68 -69
- package/src/components/sections/Newsletter/section.module.scss +11 -0
- package/src/components/sections/ProducDetailsContent/ProductDetailsContent.tsx +2 -4
- package/src/components/sections/ProductDetails/ProductDetails.tsx +44 -43
- package/src/components/sections/ProductDetails/section.module.scss +27 -0
- package/src/components/sections/ProductGallery/ProductGallery.tsx +121 -119
- package/src/components/sections/ProductGallery/section.module.scss +28 -0
- package/src/components/sections/ProductShelf/ProductShelf.tsx +8 -4
- package/src/components/sections/ProductShelf/section.module.scss +17 -0
- package/src/components/sections/ProductTiles/ProductTiles.tsx +9 -4
- package/src/components/sections/ProductTiles/section.module.scss +17 -0
- package/src/components/sections/ScrollToTopButton/ScrollToTopButton.tsx +3 -3
- package/src/components/sections/ScrollToTopButton/section.module.scss +11 -0
- package/src/components/skeletons/FilterSkeleton/FilterSkeleton.tsx +1 -2
- package/src/components/skeletons/ProductCardSkeleton/ProductCardSkeleton.tsx +0 -3
- package/src/components/skeletons/ProductShelfSkeleton/ProductShelfSkeleton.tsx +2 -2
- package/src/components/skeletons/ProductTilesSkeleton/ProductTileSkeleton/ProductTileSkeleton.tsx +0 -3
- package/src/components/ui/BannerText/BannerText.tsx +0 -3
- package/src/components/ui/Button/ButtonSignIn/ButtonSignIn.tsx +1 -2
- package/src/components/{sections → ui}/Incentives/Incentives.tsx +0 -3
- package/src/components/ui/Incentives/incentivesMock.ts +27 -0
- package/src/components/ui/Logo/Logo.tsx +1 -10
- package/src/components/ui/Tiles/Tiles.tsx +1 -6
- package/src/pages/[slug]/p.tsx +1 -1
- package/src/pages/_app.tsx +2 -2
- package/src/pages/index.tsx +2 -2
- package/src/styles/global/components.scss +8 -0
- package/src/styles/themes/midnight.scss +1 -1
- package/src/components/common/Footer/Footer.stories.mdx +0 -158
- package/src/components/common/Footer/footer.module.scss +0 -220
- package/src/components/sections/BannerNewsletter/banner-newsletter.module.scss +0 -23
- package/src/components/sections/Incentives/Incentives.stories.mdx +0 -159
- package/src/components/sections/Incentives/IncentivesFooter.tsx +0 -8
- package/src/components/sections/Incentives/incentives.module.scss +0 -122
- package/src/components/sections/Incentives/incentivesMock.ts +0 -55
- package/src/components/sections/Newsletter/Newsletter.stories.mdx +0 -139
- package/src/components/sections/Newsletter/newsletter.module.scss +0 -135
- package/src/components/sections/ProductDetails/product-details.module.scss +0 -185
- package/src/components/sections/ProductGallery/product-gallery.module.scss +0 -184
- package/src/components/sections/ScrollToTopButton/scroll-to-top-button.module.scss +0 -12
- package/src/components/skeletons/FilterSkeleton/FilterSkeleton.stories.mdx +0 -97
- package/src/components/skeletons/FilterSkeleton/filter-skeleton.module.scss +0 -51
- package/src/components/skeletons/ProductCardSkeleton/ProductCardSkeleton.stories.mdx +0 -113
- package/src/components/skeletons/ProductCardSkeleton/product-card-skeleton.module.scss +0 -58
- package/src/components/skeletons/ProductTilesSkeleton/ProductTileSkeleton/product-tile-skeleton.module.scss +0 -81
- package/src/components/ui/BannerText/BannerText.stories.mdx +0 -270
- package/src/components/ui/BannerText/banner-text.module.scss +0 -127
- package/src/components/ui/Button/Button.stories.mdx +0 -643
- package/src/components/ui/Button/button.module.scss +0 -11
- package/src/components/ui/Carousel/Carousel.stories.mdx +0 -201
- package/src/components/ui/Carousel/carousel.module.scss +0 -147
- package/src/components/ui/Logo/logo.module.scss +0 -12
- package/src/components/ui/Tiles/Tiles.stories.mdx +0 -151
- package/src/components/ui/Tiles/tiles.module.scss +0 -58
- /package/src/components/{sections → ui}/Incentives/index.ts +0 -0
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs'
|
|
2
|
-
import {
|
|
3
|
-
TokenTable,
|
|
4
|
-
TokenRow,
|
|
5
|
-
TokenDivider,
|
|
6
|
-
BestPractices,
|
|
7
|
-
BestPracticesRule,
|
|
8
|
-
} from 'src/../.storybook/components'
|
|
9
|
-
|
|
10
|
-
import Carousel from '.'
|
|
11
|
-
import ProductCard from 'src/components/product/ProductCard'
|
|
12
|
-
|
|
13
|
-
<Meta
|
|
14
|
-
component={Carousel}
|
|
15
|
-
title="Molecules/Carousel"
|
|
16
|
-
argTypes={{
|
|
17
|
-
itemsPerPage: {
|
|
18
|
-
control: 'number',
|
|
19
|
-
table: { type: 'number' },
|
|
20
|
-
},
|
|
21
|
-
}}
|
|
22
|
-
/>
|
|
23
|
-
|
|
24
|
-
export const product = {
|
|
25
|
-
id: '15503951',
|
|
26
|
-
slug: 'handmade-steel-towels-practical-15503951',
|
|
27
|
-
sku: '15503951',
|
|
28
|
-
brand: { brandName: 'Brand', name: 'Brand' },
|
|
29
|
-
name: 'red',
|
|
30
|
-
gtin: '5595633577807',
|
|
31
|
-
isVariantOf: {
|
|
32
|
-
productGroupID: '130742',
|
|
33
|
-
name: 'Handmade Steel Towels Practical',
|
|
34
|
-
},
|
|
35
|
-
image: [
|
|
36
|
-
{
|
|
37
|
-
url: 'http://storeframework.vtexassets.com/arquivos/ids/190191/numquam.jpg?v=637755599170100000',
|
|
38
|
-
alternateName: 'est',
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
offers: {
|
|
42
|
-
lowPrice: 181.71,
|
|
43
|
-
offers: [
|
|
44
|
-
{
|
|
45
|
-
availability: 'https://schema.org/InStock',
|
|
46
|
-
price: 181.71,
|
|
47
|
-
listPrice: 208.72,
|
|
48
|
-
quantity: 1,
|
|
49
|
-
seller: { identifier: '1' },
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export const Template = ({ ...args }) => (
|
|
56
|
-
<Carousel {...args}>
|
|
57
|
-
{Array.from({ length: 8 }, (_, index) => (
|
|
58
|
-
<ProductCard
|
|
59
|
-
index={index}
|
|
60
|
-
key={String(index)}
|
|
61
|
-
product={{ ...product, isVariantOf: { name: `Product ${index + 1}` } }}
|
|
62
|
-
/>
|
|
63
|
-
))}
|
|
64
|
-
</Carousel>
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
<header>
|
|
68
|
-
|
|
69
|
-
# Carousel
|
|
70
|
-
|
|
71
|
-
The `Carousel` component is great for swiping images.
|
|
72
|
-
|
|
73
|
-
</header>
|
|
74
|
-
|
|
75
|
-
## Overview
|
|
76
|
-
|
|
77
|
-
The `Carousel` component uses [FastStore UI Carousel](https://www.faststore.dev/reference/ui/molecules/Carousel) as base.
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## Usage
|
|
82
|
-
|
|
83
|
-
`import Carousel from 'src/components/ui/Carousel'`
|
|
84
|
-
|
|
85
|
-
<Canvas>
|
|
86
|
-
<Story name="usage" args={{ itemsPerPage: 5 }}>
|
|
87
|
-
{Template.bind({})}
|
|
88
|
-
</Story>
|
|
89
|
-
</Canvas>
|
|
90
|
-
|
|
91
|
-
<ArgsTable story="usage" />
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Nested Elements
|
|
96
|
-
|
|
97
|
-
### Track
|
|
98
|
-
|
|
99
|
-
<TokenTable>
|
|
100
|
-
<TokenRow
|
|
101
|
-
token="--fs-carousel-padding-desktop"
|
|
102
|
-
value="var(--fs-spacing-0) 6.25rem"
|
|
103
|
-
/>
|
|
104
|
-
</TokenTable>
|
|
105
|
-
|
|
106
|
-
### Item
|
|
107
|
-
|
|
108
|
-
<TokenTable>
|
|
109
|
-
<TokenRow token="--fs-carousel-item-width-mobile" value="80%" />
|
|
110
|
-
<TokenRow token="--fs-carousel-item-width-desktop" value="15rem" />
|
|
111
|
-
<TokenRow
|
|
112
|
-
token="--fs-carousel-item-margin-right"
|
|
113
|
-
value="var(--fs-spacing-0)"
|
|
114
|
-
/>
|
|
115
|
-
</TokenTable>
|
|
116
|
-
|
|
117
|
-
### Controls
|
|
118
|
-
|
|
119
|
-
<TokenTable>
|
|
120
|
-
<TokenRow token="--fs-carousel-controls-width" value="3.125rem" />
|
|
121
|
-
<TokenRow
|
|
122
|
-
token="--fs-carousel-controls-height"
|
|
123
|
-
value="var(--fs-carousel-controls-width)"
|
|
124
|
-
/>
|
|
125
|
-
<TokenRow
|
|
126
|
-
token="--fs-carousel-controls-position-top"
|
|
127
|
-
value="calc((100% - var(--fs-spacing-7) - var(--fs-spacing-1)) / 2)"
|
|
128
|
-
/>
|
|
129
|
-
<TokenRow
|
|
130
|
-
token="--fs-carousel-controls-bkg-color"
|
|
131
|
-
value="var(--fs-color-neutral-0)"
|
|
132
|
-
isColor
|
|
133
|
-
/>
|
|
134
|
-
<TokenRow
|
|
135
|
-
token="--fs-carousel-controls-border-radius"
|
|
136
|
-
value="var(--fs-border-radius-circle)"
|
|
137
|
-
/>
|
|
138
|
-
<TokenRow
|
|
139
|
-
token="--fs-carousel-controls-box-shadow"
|
|
140
|
-
value="var(--fs-shadow-darker)"
|
|
141
|
-
/>
|
|
142
|
-
<TokenDivider />
|
|
143
|
-
<TokenRow
|
|
144
|
-
token="--fs-carousel-controls-control-left"
|
|
145
|
-
value="var(--fs-spacing-5)"
|
|
146
|
-
/>
|
|
147
|
-
<TokenRow
|
|
148
|
-
token="--fs-carousel-controls-control-right"
|
|
149
|
-
value="var(--fs-carousel-controls-control-left)"
|
|
150
|
-
/>
|
|
151
|
-
</TokenTable>
|
|
152
|
-
|
|
153
|
-
### Bullets
|
|
154
|
-
|
|
155
|
-
<TokenTable>
|
|
156
|
-
<TokenRow
|
|
157
|
-
token="--fs-carousel-bullets-padding-top"
|
|
158
|
-
value="var(--fs-carousel-controls-control-left)"
|
|
159
|
-
/>
|
|
160
|
-
<TokenDivider />
|
|
161
|
-
<TokenRow token="--fs-carousel-bullet-width-mobile" value="100%" />
|
|
162
|
-
<TokenRow
|
|
163
|
-
token="--fs-carousel-bullet-width-desktop"
|
|
164
|
-
value="var(--fs-spacing-1)"
|
|
165
|
-
/>
|
|
166
|
-
<TokenRow
|
|
167
|
-
token="--fs-carousel-bullet-height-mobile"
|
|
168
|
-
value="var(--fs-carousel-item-margin-right)"
|
|
169
|
-
/>
|
|
170
|
-
<TokenRow
|
|
171
|
-
token="--fs-carousel-bullet-height-desktop"
|
|
172
|
-
value="var(--fs-carousel-bullet-width-desktop)"
|
|
173
|
-
/>
|
|
174
|
-
<TokenRow
|
|
175
|
-
token="--fs-carousel-bullet-margin-right"
|
|
176
|
-
value="var(--fs-carousel-item-margin-right)"
|
|
177
|
-
/>
|
|
178
|
-
<TokenRow
|
|
179
|
-
token="--fs-carousel-bullet-bkg-color"
|
|
180
|
-
value="var(--fs-color-neutral-3)"
|
|
181
|
-
isColor
|
|
182
|
-
/>
|
|
183
|
-
<TokenRow
|
|
184
|
-
token="--fs-carousel-bullet-bkg-color-selected"
|
|
185
|
-
value="var(--fs-color-main-4)"
|
|
186
|
-
isColor
|
|
187
|
-
/>
|
|
188
|
-
<TokenRow
|
|
189
|
-
token="--fs-carousel-bullet-border-radius"
|
|
190
|
-
value="var(--fs-carousel-controls-border-radius)"
|
|
191
|
-
/>
|
|
192
|
-
</TokenTable>
|
|
193
|
-
|
|
194
|
-
---
|
|
195
|
-
|
|
196
|
-
<BestPractices>
|
|
197
|
-
<BestPracticesRule
|
|
198
|
-
recommendedDescription="Always use more than 1 item per page so then the component keeps the proposed navigation behavior for both versions (mobile and desktop)."
|
|
199
|
-
discouragedDescription="Avoid using more items per page than the total number of items."
|
|
200
|
-
/>
|
|
201
|
-
</BestPractices>
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
@import "src/styles/scaffold";
|
|
2
|
-
|
|
3
|
-
.fs-carousel {
|
|
4
|
-
// --------------------------------------------------------
|
|
5
|
-
// Design Tokens for Carousel
|
|
6
|
-
// --------------------------------------------------------
|
|
7
|
-
|
|
8
|
-
// Track
|
|
9
|
-
--fs-carousel-padding-desktop : var(--fs-spacing-0) 6.25rem;
|
|
10
|
-
|
|
11
|
-
// Item
|
|
12
|
-
--fs-carousel-item-width-mobile : 80%;
|
|
13
|
-
--fs-carousel-item-width-desktop : 15rem;
|
|
14
|
-
--fs-carousel-item-margin-right : var(--fs-spacing-0);
|
|
15
|
-
|
|
16
|
-
// Controls
|
|
17
|
-
--fs-carousel-controls-width : 3.125rem;
|
|
18
|
-
--fs-carousel-controls-height : var(--fs-carousel-controls-width);
|
|
19
|
-
--fs-carousel-controls-position-top : calc((100% - var(--fs-spacing-7) - var(--fs-spacing-1)) / 2);
|
|
20
|
-
--fs-carousel-controls-bkg-color : var(--fs-color-neutral-0);
|
|
21
|
-
--fs-carousel-controls-border-radius : var(--fs-border-radius-circle);
|
|
22
|
-
--fs-carousel-controls-box-shadow : var(--fs-shadow-darker);
|
|
23
|
-
--fs-carousel-controls-icon-color : var(--fs-color-neutral-7);
|
|
24
|
-
|
|
25
|
-
--fs-carousel-controls-control-left : var(--fs-spacing-5);
|
|
26
|
-
--fs-carousel-controls-control-right : var(--fs-carousel-controls-control-left);
|
|
27
|
-
|
|
28
|
-
// Bullets
|
|
29
|
-
--fs-carousel-bullets-padding-top : var(--fs-carousel-controls-control-left);
|
|
30
|
-
|
|
31
|
-
--fs-carousel-bullet-width-mobile : 100%;
|
|
32
|
-
--fs-carousel-bullet-width-desktop : var(--fs-spacing-1);
|
|
33
|
-
--fs-carousel-bullet-height-mobile : var(--fs-carousel-item-margin-right);
|
|
34
|
-
--fs-carousel-bullet-height-desktop : var(--fs-carousel-bullet-width-desktop);
|
|
35
|
-
--fs-carousel-bullet-margin-right : var(--fs-carousel-item-margin-right);
|
|
36
|
-
--fs-carousel-bullet-bkg-color : var(--fs-color-neutral-3);
|
|
37
|
-
--fs-carousel-bullet-bkg-color-selected : var(--fs-color-main-4);
|
|
38
|
-
--fs-carousel-bullet-border-radius : var(--fs-carousel-controls-border-radius);
|
|
39
|
-
|
|
40
|
-
// --------------------------------------------------------
|
|
41
|
-
// Structural Styles
|
|
42
|
-
// --------------------------------------------------------
|
|
43
|
-
|
|
44
|
-
&:hover {
|
|
45
|
-
[data-fs-carousel-controls] {
|
|
46
|
-
@include media(">=tablet") {
|
|
47
|
-
display: flex;
|
|
48
|
-
width: 100%;
|
|
49
|
-
|
|
50
|
-
[data-fs-carousel-control] {
|
|
51
|
-
top: var(--fs-carousel-controls-position-top);
|
|
52
|
-
display: flex;
|
|
53
|
-
align-items: center;
|
|
54
|
-
justify-content: center;
|
|
55
|
-
width: var(--fs-carousel-controls-width);
|
|
56
|
-
height: var(--fs-carousel-controls-height);
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
background-color: var(--fs-carousel-controls-bkg-color);
|
|
59
|
-
border-color: transparent;
|
|
60
|
-
border-radius: var(--fs-carousel-controls-border-radius);
|
|
61
|
-
box-shadow: var(--fs-carousel-controls-box-shadow);
|
|
62
|
-
transform: translateY(-50%);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
[data-fs-carousel-control="left"] {
|
|
66
|
-
position: absolute;
|
|
67
|
-
left: var(--fs-carousel-controls-control-left);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
[data-fs-carousel-control="right"] {
|
|
71
|
-
position: absolute;
|
|
72
|
-
right: var(--fs-carousel-controls-control-right);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
[data-fs-icon] { display: flex; }
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
[data-fs-carousel-track] {
|
|
81
|
-
&::-webkit-scrollbar {
|
|
82
|
-
display: none;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
@include media(">=tablet") {
|
|
86
|
-
padding: var(--fs-carousel-padding-desktop);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
[data-fs-carousel-item] {
|
|
91
|
-
width: var(--fs-carousel-item-width-mobile);
|
|
92
|
-
|
|
93
|
-
@include media(">=tablet") {
|
|
94
|
-
width: var(--fs-carousel-item-width-desktop);
|
|
95
|
-
height: 100%;
|
|
96
|
-
margin-right: var(--fs-carousel-item-margin-right);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
[data-fs-icon] {
|
|
101
|
-
color: var(--fs-carousel-controls-icon-color);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
[data-fs-carousel-controls] {
|
|
105
|
-
display: none;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
[data-fs-carousel-bullets] {
|
|
109
|
-
width: 100%;
|
|
110
|
-
padding-top: var(--fs-carousel-bullets-padding-top);
|
|
111
|
-
|
|
112
|
-
@include media(">=tablet") {
|
|
113
|
-
display: flex;
|
|
114
|
-
align-items: center;
|
|
115
|
-
justify-content: center;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
[data-fs-bullets] {
|
|
119
|
-
display: flex;
|
|
120
|
-
flex-flow: row nowrap;
|
|
121
|
-
|
|
122
|
-
@include media(">=tablet") {
|
|
123
|
-
column-gap: var(--fs-spacing-3);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
[data-fs-bullet] {
|
|
127
|
-
width: var(--fs-carousel-bullet-width-mobile);
|
|
128
|
-
height: var(--fs-carousel-bullet-height-mobile);
|
|
129
|
-
padding: 0;
|
|
130
|
-
margin-right: var(--fs-carousel-bullet-margin-right);
|
|
131
|
-
background-color: var(--fs-carousel-bullet-bkg-color);
|
|
132
|
-
border-color: transparent;
|
|
133
|
-
|
|
134
|
-
&[aria-selected="true"] {
|
|
135
|
-
background-color: var(--fs-carousel-bullet-bkg-color-selected);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
@include media(">=tablet") {
|
|
139
|
-
width: var(--fs-carousel-bullet-width-desktop);
|
|
140
|
-
height: var(--fs-carousel-bullet-height-desktop);
|
|
141
|
-
margin: 0;
|
|
142
|
-
border-radius: var(--fs-carousel-bullet-border-radius);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
.fs-logo {
|
|
2
|
-
--fs-logo-width : 7rem;
|
|
3
|
-
--fs-logo-img : url("~/public/brandless-neutral.png");
|
|
4
|
-
|
|
5
|
-
display: block;
|
|
6
|
-
width: var(--fs-logo-width);
|
|
7
|
-
height: 100%;
|
|
8
|
-
min-height: var(--fs-spacing-6);
|
|
9
|
-
background: var(--fs-logo-img) no-repeat;
|
|
10
|
-
background-position: center;
|
|
11
|
-
background-size: 100% auto;
|
|
12
|
-
}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs'
|
|
2
|
-
import {
|
|
3
|
-
TokenTable,
|
|
4
|
-
TokenRow,
|
|
5
|
-
TokenDivider,
|
|
6
|
-
Callout,
|
|
7
|
-
} from 'src/../.storybook/components'
|
|
8
|
-
|
|
9
|
-
import { Image } from 'src/components/ui/Image'
|
|
10
|
-
import ProductCard from 'src/components/product/ProductCard'
|
|
11
|
-
|
|
12
|
-
import Tiles, { Tile } from '.'
|
|
13
|
-
|
|
14
|
-
export const product = {
|
|
15
|
-
id: '15503951',
|
|
16
|
-
slug: 'handmade-steel-towels-practical-15503951',
|
|
17
|
-
sku: '15503951',
|
|
18
|
-
brand: { brandName: 'Brand', name: 'Brand' },
|
|
19
|
-
name: 'red',
|
|
20
|
-
gtin: '5595633577807',
|
|
21
|
-
isVariantOf: {
|
|
22
|
-
productGroupID: '130742',
|
|
23
|
-
name: 'Handmade Steel Towels Practical',
|
|
24
|
-
},
|
|
25
|
-
image: [
|
|
26
|
-
{
|
|
27
|
-
url: 'http://storeframework.vtexassets.com/arquivos/ids/190191/numquam.jpg?v=637755599170100000',
|
|
28
|
-
alternateName: 'est',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
offers: {
|
|
32
|
-
lowPrice: 181.71,
|
|
33
|
-
offers: [
|
|
34
|
-
{
|
|
35
|
-
availability: 'https://schema.org/InStock',
|
|
36
|
-
price: 181.71,
|
|
37
|
-
listPrice: 208.72,
|
|
38
|
-
quantity: 1,
|
|
39
|
-
seller: { identifier: '1' },
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
},
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export const MDXCustomImage = ({ aspectRatio = 3 / 4 }) => (
|
|
46
|
-
<Image
|
|
47
|
-
width={200}
|
|
48
|
-
height={200 / aspectRatio}
|
|
49
|
-
alt="Unsplash Monitor"
|
|
50
|
-
src="https://storeframework.vtexassets.com/arquivos/ids/190903/unsplash-monitor.jpg"
|
|
51
|
-
/>
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
export const MDXProductCard = ({ product }) => (
|
|
55
|
-
<ProductCard variant="wide" index={0} product={product} aspectRatio={4 / 3} />
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
<Meta component={Tiles} title="Molecules/Tiles" />
|
|
59
|
-
|
|
60
|
-
<header>
|
|
61
|
-
|
|
62
|
-
# Tiles (WIP)
|
|
63
|
-
|
|
64
|
-
This component works like layout boxes/cards, which can be arranged in different ways next to each other.
|
|
65
|
-
|
|
66
|
-
</header>
|
|
67
|
-
|
|
68
|
-
## Overview
|
|
69
|
-
|
|
70
|
-
<code>Tiles</code> is a list of <code>Tile</code> components. According to the quantity
|
|
71
|
-
of items to be displayed, the tiles will be arranged differently.
|
|
72
|
-
|
|
73
|
-
<Callout>
|
|
74
|
-
The minimum number of items is 2, and the maximum is 4. In the future, this
|
|
75
|
-
component will be improved to accept different possibilities, for example,
|
|
76
|
-
using only one tile occupying the entire section space.
|
|
77
|
-
</Callout>
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## Usage
|
|
82
|
-
|
|
83
|
-
`import Tiles, { Tile } from 'src/components/ui/Tiles'`
|
|
84
|
-
|
|
85
|
-
<Canvas>
|
|
86
|
-
<Story name="Usage--2-Tiles">
|
|
87
|
-
<Tiles>
|
|
88
|
-
<Tile>
|
|
89
|
-
<MDXCustomImage aspectRatio={4 / 3} />
|
|
90
|
-
</Tile>
|
|
91
|
-
<Tile>
|
|
92
|
-
<MDXCustomImage aspectRatio={4 / 3} />
|
|
93
|
-
</Tile>
|
|
94
|
-
</Tiles>
|
|
95
|
-
</Story>
|
|
96
|
-
</Canvas>
|
|
97
|
-
|
|
98
|
-
<Canvas>
|
|
99
|
-
<Story name="Usage--3-Tiles">
|
|
100
|
-
<Tiles>
|
|
101
|
-
<Tile>
|
|
102
|
-
<MDXProductCard product={product} />
|
|
103
|
-
</Tile>
|
|
104
|
-
<Tile>
|
|
105
|
-
<MDXCustomImage />
|
|
106
|
-
</Tile>
|
|
107
|
-
<Tile>
|
|
108
|
-
<MDXCustomImage />
|
|
109
|
-
</Tile>
|
|
110
|
-
</Tiles>
|
|
111
|
-
</Story>
|
|
112
|
-
</Canvas>
|
|
113
|
-
|
|
114
|
-
<Canvas>
|
|
115
|
-
<Story name="Usage--4-Tiles">
|
|
116
|
-
<Tiles>
|
|
117
|
-
<Tile>
|
|
118
|
-
<MDXCustomImage />
|
|
119
|
-
</Tile>
|
|
120
|
-
<Tile>
|
|
121
|
-
<MDXCustomImage />
|
|
122
|
-
</Tile>
|
|
123
|
-
<Tile>
|
|
124
|
-
<MDXCustomImage />
|
|
125
|
-
</Tile>
|
|
126
|
-
<Tile>
|
|
127
|
-
<MDXCustomImage />
|
|
128
|
-
</Tile>
|
|
129
|
-
</Tiles>
|
|
130
|
-
</Story>
|
|
131
|
-
</Canvas>
|
|
132
|
-
|
|
133
|
-
<TokenTable>
|
|
134
|
-
<TokenRow token="--fs-tiles-gap-mobile" value="var(--fs-grid-gap-2)" />
|
|
135
|
-
<TokenRow token="--fs-tiles-gap-notebook" value="var(--fs-grid-gap-3)" />
|
|
136
|
-
</TokenTable>
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## Compound Components
|
|
141
|
-
|
|
142
|
-
### Tile
|
|
143
|
-
|
|
144
|
-
<TokenTable>
|
|
145
|
-
<TokenRow token="--fs-tiles-tile-min-width" value="9rem" />
|
|
146
|
-
<TokenDivider />
|
|
147
|
-
<TokenRow
|
|
148
|
-
token="--fs-tiles-tile-border-radius"
|
|
149
|
-
value="var(--fs-border-radius)"
|
|
150
|
-
/>
|
|
151
|
-
</TokenTable>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
@import "src/styles/scaffold";
|
|
2
|
-
|
|
3
|
-
.fs-tiles {
|
|
4
|
-
// --------------------------------------------------------
|
|
5
|
-
// Design Tokens for Tiles
|
|
6
|
-
// --------------------------------------------------------
|
|
7
|
-
|
|
8
|
-
// Default properties
|
|
9
|
-
--fs-tiles-gap-mobile : var(--fs-grid-gap-2);
|
|
10
|
-
--fs-tiles-gap-notebook : var(--fs-grid-gap-3);
|
|
11
|
-
|
|
12
|
-
// Tile
|
|
13
|
-
--fs-tiles-tile-min-width : 9rem;
|
|
14
|
-
--fs-tiles-tile-border-radius : var(--fs-border-radius);
|
|
15
|
-
|
|
16
|
-
// --------------------------------------------------------
|
|
17
|
-
// Structural Styles
|
|
18
|
-
// --------------------------------------------------------
|
|
19
|
-
|
|
20
|
-
display: grid;
|
|
21
|
-
grid-template-columns: repeat(2, 1fr);
|
|
22
|
-
row-gap: var(--fs-tiles-gap-mobile);
|
|
23
|
-
column-gap: var(--fs-tiles-gap-mobile);
|
|
24
|
-
|
|
25
|
-
@include media(">=tablet") {
|
|
26
|
-
grid-template-columns: repeat(4, 1fr);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@include media(">=notebook") { column-gap: var(--fs-tiles-gap-notebook); }
|
|
30
|
-
|
|
31
|
-
[data-fs-tile] {
|
|
32
|
-
min-width: var(--fs-tiles-tile-min-width);
|
|
33
|
-
|
|
34
|
-
> * {
|
|
35
|
-
overflow: hidden;
|
|
36
|
-
border-radius: var(--fs-tiles-tile-border-radius);
|
|
37
|
-
|
|
38
|
-
@include media(">=tablet") {
|
|
39
|
-
display: grid;
|
|
40
|
-
grid-auto-rows: 62% auto;
|
|
41
|
-
[data-fs-product-card-image] { height: 100%; }
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@include media(">=notebook") { grid-auto-rows: 80% auto; }
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// --------------------------------------------------------
|
|
49
|
-
// Variants Styles
|
|
50
|
-
// --------------------------------------------------------
|
|
51
|
-
|
|
52
|
-
&[data-fs-tiles-variant="expanded-first"] > [data-fs-tile]:first-child,
|
|
53
|
-
&[data-fs-tiles-variant="expanded-first-two"] > [data-fs-tile]:first-child,
|
|
54
|
-
&[data-fs-tiles-variant="expanded-first-two"] > [data-fs-tile]:nth-child(2) {
|
|
55
|
-
grid-column: span 2;
|
|
56
|
-
min-width: 12rem;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
File without changes
|