@faststore/core 3.0.39 → 3.0.40
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 -1
- package/.next/build-manifest.json +2 -2
- package/.next/cache/config.json +3 -3
- package/.next/cache/eslint/.cache_1gneedd +1 -1
- 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/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.js +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/242.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/api/graphql.js +1 -1
- package/.next/server/pages/en-US/404.html +2 -2
- package/.next/server/pages/en-US/500.html +2 -2
- package/.next/server/pages/en-US/account.html +2 -2
- package/.next/server/pages/en-US/checkout.html +2 -2
- package/.next/server/pages/en-US/login.html +2 -2
- package/.next/server/pages/en-US/s.html +2 -2
- package/.next/server/pages/en-US.html +2 -2
- package/.next/server/pages-manifest.json +1 -1
- package/.next/trace +91 -91
- package/.turbo/turbo-test.log +9 -9
- package/package.json +9 -9
- package/pull_request_template.md +0 -1
- package/src/components/product/ProductCard/ProductCard.stories.mdx +0 -413
- package/src/components/ui/Breadcrumb/Breadcrumb.stories.mdx +0 -197
- package/src/components/ui/Link/Link.stories.mdx +0 -272
- package/src/components/ui/ProductDescription/ProductDescription.stories.mdx +0 -66
- package/src/components/ui/SkuSelector/Selectors.stories.mdx +0 -86
- /package/.next/static/{ynVKyS-l-nXEqvPtRj6Vi → qNZTpBDkQaWkLQfUrkXy7}/_buildManifest.js +0 -0
- /package/.next/static/{ynVKyS-l-nXEqvPtRj6Vi → qNZTpBDkQaWkLQfUrkXy7}/_ssgManifest.js +0 -0
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
-
|
|
3
|
-
import Link from '.'
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
TokenTable,
|
|
7
|
-
TokenRow,
|
|
8
|
-
TokenDivider,
|
|
9
|
-
} from 'src/../.storybook/components'
|
|
10
|
-
|
|
11
|
-
<Meta
|
|
12
|
-
title="Atoms/Link"
|
|
13
|
-
component={Link}
|
|
14
|
-
argTypes={{
|
|
15
|
-
href: {
|
|
16
|
-
type: { name: 'string', required: true },
|
|
17
|
-
},
|
|
18
|
-
ref: { table: { disable: true } },
|
|
19
|
-
as: { table: { disable: true } },
|
|
20
|
-
children: { table: { disable: true } },
|
|
21
|
-
replace: { table: { disable: true } },
|
|
22
|
-
scroll: { table: { disable: true } },
|
|
23
|
-
shallow: { table: { disable: true } },
|
|
24
|
-
passHref: { table: { disable: true } },
|
|
25
|
-
prefetch: { table: { disable: true } },
|
|
26
|
-
locale: { table: { disable: true } },
|
|
27
|
-
legacyBehavior: { table: { disable: true } },
|
|
28
|
-
}}
|
|
29
|
-
/>
|
|
30
|
-
|
|
31
|
-
export const Template = ({ children, ...args }) => (
|
|
32
|
-
<Link {...args}>{children}</Link>
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
<header>
|
|
36
|
-
|
|
37
|
-
# Link
|
|
38
|
-
|
|
39
|
-
The Link component behaves as a regular anchor tag `<a />`, but can be used as any HTML tag.
|
|
40
|
-
|
|
41
|
-
</header>
|
|
42
|
-
|
|
43
|
-
## Overview
|
|
44
|
-
|
|
45
|
-
The `Link` component uses [FastStore UI Link](https://www.faststore.dev/reference/ui/atoms/Link) and [Next.js Link](https://nextjs.org/docs/api-reference/next/link) as base.
|
|
46
|
-
|
|
47
|
-
Internally, the `Link` component handles client-side navigation through the Next.js `Link`, so all the Next.js `Link` attributes can be used for this case.
|
|
48
|
-
|
|
49
|
-
<Canvas style={{ backgroundColor: 'var(--fs-color-neutral-3)' }}>
|
|
50
|
-
<Story
|
|
51
|
-
name="overview-default"
|
|
52
|
-
args={{
|
|
53
|
-
href: '#',
|
|
54
|
-
children: 'Default',
|
|
55
|
-
}}
|
|
56
|
-
>
|
|
57
|
-
{Template.bind({})}
|
|
58
|
-
</Story>
|
|
59
|
-
<Story
|
|
60
|
-
name="overview-inverse"
|
|
61
|
-
args={{
|
|
62
|
-
href: '#',
|
|
63
|
-
inverse: true,
|
|
64
|
-
children: 'Inverse',
|
|
65
|
-
}}
|
|
66
|
-
>
|
|
67
|
-
{Template.bind({})}
|
|
68
|
-
</Story>
|
|
69
|
-
<Story
|
|
70
|
-
name="overview-display"
|
|
71
|
-
args={{
|
|
72
|
-
href: '#',
|
|
73
|
-
variant: 'display',
|
|
74
|
-
children: 'Display',
|
|
75
|
-
}}
|
|
76
|
-
>
|
|
77
|
-
{Template.bind({})}
|
|
78
|
-
</Story>
|
|
79
|
-
<Story
|
|
80
|
-
name="overview-inline"
|
|
81
|
-
args={{
|
|
82
|
-
href: '#',
|
|
83
|
-
variant: 'inline',
|
|
84
|
-
children: 'Inline',
|
|
85
|
-
}}
|
|
86
|
-
>
|
|
87
|
-
{Template.bind({})}
|
|
88
|
-
</Story>
|
|
89
|
-
<Story
|
|
90
|
-
name="overview-footer"
|
|
91
|
-
args={{
|
|
92
|
-
href: '#',
|
|
93
|
-
variant: 'footer',
|
|
94
|
-
children: 'Footer',
|
|
95
|
-
}}
|
|
96
|
-
>
|
|
97
|
-
{Template.bind({})}
|
|
98
|
-
</Story>
|
|
99
|
-
</Canvas>
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Usage
|
|
104
|
-
|
|
105
|
-
`import Link from '../components/ui/Link'`
|
|
106
|
-
|
|
107
|
-
<Canvas>
|
|
108
|
-
<Story
|
|
109
|
-
name="default"
|
|
110
|
-
args={{
|
|
111
|
-
href: '#',
|
|
112
|
-
children: 'Link',
|
|
113
|
-
}}
|
|
114
|
-
>
|
|
115
|
-
{Template.bind({})}
|
|
116
|
-
</Story>
|
|
117
|
-
</Canvas>
|
|
118
|
-
|
|
119
|
-
<ArgsTable story="default" />
|
|
120
|
-
|
|
121
|
-
<TokenTable>
|
|
122
|
-
<TokenRow token="--fs-link-min-width" value="auto" />
|
|
123
|
-
<TokenRow token="--fs-link-min-height" value="var(--fs-link-min-width)" />
|
|
124
|
-
<TokenRow
|
|
125
|
-
token="--fs-link-padding"
|
|
126
|
-
value="var(--fs-spacing-2) var(--fs-spacing-0)"
|
|
127
|
-
/>
|
|
128
|
-
<TokenRow token="--fs-link-border-radius" value="var(--fs-border-radius)" />
|
|
129
|
-
<TokenDivider />
|
|
130
|
-
<TokenRow token="--fs-link-text-line-height" value="1.5" />
|
|
131
|
-
<TokenRow token="--fs-link-text-color" value="var(--fs-color-link)" isColor />
|
|
132
|
-
<TokenRow
|
|
133
|
-
token="--fs-link-text-color-visited"
|
|
134
|
-
value="var(--fs-color-link-visited)"
|
|
135
|
-
isColor
|
|
136
|
-
/>
|
|
137
|
-
<TokenRow token="--fs-link-text-decoration" value="none" />
|
|
138
|
-
<TokenRow token="--fs-link-text-decoration-hover" value="underline" />
|
|
139
|
-
<TokenDivider />
|
|
140
|
-
<TokenRow
|
|
141
|
-
token="--fs-link-transition-function"
|
|
142
|
-
value="var(--fs-transition-function)"
|
|
143
|
-
/>
|
|
144
|
-
<TokenRow
|
|
145
|
-
token="--fs-link-transition-property"
|
|
146
|
-
value="var(--fs-transition-property)"
|
|
147
|
-
/>
|
|
148
|
-
<TokenRow
|
|
149
|
-
token="--fs-link-transition-timing"
|
|
150
|
-
value="var(--fs-transition-timing)"
|
|
151
|
-
/>
|
|
152
|
-
</TokenTable>
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## Variants
|
|
157
|
-
|
|
158
|
-
### Inverse
|
|
159
|
-
|
|
160
|
-
<Canvas style={{ backgroundColor: 'var(--fs-color-neutral-7)' }}>
|
|
161
|
-
<Story
|
|
162
|
-
name="link-inverse"
|
|
163
|
-
args={{
|
|
164
|
-
href: '#',
|
|
165
|
-
inverse: true,
|
|
166
|
-
children: 'Link Inverse',
|
|
167
|
-
}}
|
|
168
|
-
>
|
|
169
|
-
{Template.bind({})}
|
|
170
|
-
</Story>
|
|
171
|
-
</Canvas>
|
|
172
|
-
|
|
173
|
-
<TokenTable>
|
|
174
|
-
<TokenRow
|
|
175
|
-
token="--fs-link-inverse-text-color"
|
|
176
|
-
value="var(--fs-color-link-inverse)"
|
|
177
|
-
isColor
|
|
178
|
-
/>
|
|
179
|
-
<TokenRow
|
|
180
|
-
token="--fs-link-inverse-text-color-visited"
|
|
181
|
-
value="var(--fs-link-inverse-text-color)"
|
|
182
|
-
globalValue="var(--fs-color-link-inverse)"
|
|
183
|
-
isColor
|
|
184
|
-
/>
|
|
185
|
-
</TokenTable>
|
|
186
|
-
|
|
187
|
-
### Display
|
|
188
|
-
|
|
189
|
-
<Canvas>
|
|
190
|
-
<Story
|
|
191
|
-
name="link-display"
|
|
192
|
-
args={{
|
|
193
|
-
href: '#',
|
|
194
|
-
variant: 'display',
|
|
195
|
-
children: 'Link Display',
|
|
196
|
-
}}
|
|
197
|
-
>
|
|
198
|
-
{Template.bind({})}
|
|
199
|
-
</Story>
|
|
200
|
-
</Canvas>
|
|
201
|
-
|
|
202
|
-
<TokenTable>
|
|
203
|
-
<TokenRow
|
|
204
|
-
token="--fs-link-display-text-line-height"
|
|
205
|
-
value="var(--fs-link-text-line-height)"
|
|
206
|
-
/>
|
|
207
|
-
<TokenRow
|
|
208
|
-
token="--fs-link-display-text-color"
|
|
209
|
-
value="var(--fs-color-text-display)"
|
|
210
|
-
isColor
|
|
211
|
-
/>
|
|
212
|
-
<TokenRow
|
|
213
|
-
token="--fs-link-display-text-color-visited"
|
|
214
|
-
value="var(--fs-link-display-text-color)"
|
|
215
|
-
globalValue="var(--fs-color-text-display)"
|
|
216
|
-
isColor
|
|
217
|
-
/>
|
|
218
|
-
</TokenTable>
|
|
219
|
-
|
|
220
|
-
### Inline
|
|
221
|
-
|
|
222
|
-
<Canvas>
|
|
223
|
-
<Story
|
|
224
|
-
name="link-inline"
|
|
225
|
-
args={{
|
|
226
|
-
href: '#',
|
|
227
|
-
variant: 'inline',
|
|
228
|
-
children: 'Link Inline',
|
|
229
|
-
}}
|
|
230
|
-
>
|
|
231
|
-
{Template.bind({})}
|
|
232
|
-
</Story>
|
|
233
|
-
</Canvas>
|
|
234
|
-
|
|
235
|
-
<TokenTable>
|
|
236
|
-
<TokenRow token="--fs-link-inline-padding" value="0" />
|
|
237
|
-
<TokenRow token="--fs-link-inline-text-decoration" value="underline" />
|
|
238
|
-
<TokenRow
|
|
239
|
-
token="--fs-link-inline-text-color"
|
|
240
|
-
value="var(--fs-link-text-color)"
|
|
241
|
-
globalValue="var(--fs-color-link)"
|
|
242
|
-
isColor
|
|
243
|
-
/>
|
|
244
|
-
</TokenTable>
|
|
245
|
-
|
|
246
|
-
### Footer
|
|
247
|
-
|
|
248
|
-
<Canvas>
|
|
249
|
-
<Story
|
|
250
|
-
name="link-footer"
|
|
251
|
-
args={{
|
|
252
|
-
href: '#',
|
|
253
|
-
variant: 'footer',
|
|
254
|
-
children: 'Link Footer',
|
|
255
|
-
}}
|
|
256
|
-
>
|
|
257
|
-
{Template.bind({})}
|
|
258
|
-
</Story>
|
|
259
|
-
</Canvas>
|
|
260
|
-
|
|
261
|
-
<TokenTable>
|
|
262
|
-
<TokenRow token="--fs-link-footer-text-size" value="var(--fs-text-size-1)" />
|
|
263
|
-
<TokenRow
|
|
264
|
-
token="--fs-link-footer-text-color"
|
|
265
|
-
value="var(--fs-color-info-text)"
|
|
266
|
-
isColor
|
|
267
|
-
/>
|
|
268
|
-
<TokenRow
|
|
269
|
-
token="--fs-link-footer-padding"
|
|
270
|
-
value="var(--fs-spacing-1) var(--fs-spacing-0)"
|
|
271
|
-
/>
|
|
272
|
-
</TokenTable>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
-
import ProductDetailsContent from '.'
|
|
3
|
-
import {
|
|
4
|
-
TokenTable,
|
|
5
|
-
TokenRow,
|
|
6
|
-
TokenDivider,
|
|
7
|
-
} from 'src/../.storybook/components'
|
|
8
|
-
|
|
9
|
-
<Meta
|
|
10
|
-
title="Organisms/ProductDetailsContent"
|
|
11
|
-
component={ProductDetailsContent}
|
|
12
|
-
argTypes={{
|
|
13
|
-
initiallyExpanded: { defaultValue: 'first' },
|
|
14
|
-
}}
|
|
15
|
-
/>
|
|
16
|
-
|
|
17
|
-
export const TemplateProvider = (args) => {
|
|
18
|
-
return <ProductDetailsContent {...args} />
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const CustomLabelsTemplateProvider = (args) => {
|
|
22
|
-
return (
|
|
23
|
-
<ProductDetailsContent
|
|
24
|
-
labels={{
|
|
25
|
-
description: 'Product description',
|
|
26
|
-
about: 'Product specifications',
|
|
27
|
-
highlights: 'Highlights',
|
|
28
|
-
learnMore: 'More',
|
|
29
|
-
}}
|
|
30
|
-
/>
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
<header>
|
|
35
|
-
|
|
36
|
-
# Product Details Content
|
|
37
|
-
|
|
38
|
-
This component is used to show information related to a product
|
|
39
|
-
|
|
40
|
-
</header>
|
|
41
|
-
|
|
42
|
-
## Overview
|
|
43
|
-
|
|
44
|
-
The `ProductDetailsContent` component uses [Accordion](/docs/molecules-accordion-overview--default-story), [FastStore UI Table](https://www.faststore.dev/reference/ui/molecules/Table), and [FastStore UI List](https://www.faststore.dev/reference/ui/molecules/List) as base.
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Usage
|
|
49
|
-
|
|
50
|
-
`import ProductDetailsContent from 'src/components/sections/ProductDetailsContent'`
|
|
51
|
-
|
|
52
|
-
<Canvas>
|
|
53
|
-
<Story name="default">{TemplateProvider.bind({})}</Story>
|
|
54
|
-
</Canvas>
|
|
55
|
-
|
|
56
|
-
<ArgsTable story="default" />
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## Variants
|
|
61
|
-
|
|
62
|
-
### Custom labels for each article
|
|
63
|
-
|
|
64
|
-
<Canvas>
|
|
65
|
-
<Story name="customLabels">{CustomLabelsTemplateProvider.bind({})}</Story>
|
|
66
|
-
</Canvas>
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react'
|
|
2
|
-
import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'
|
|
3
|
-
|
|
4
|
-
import Selectors from '.'
|
|
5
|
-
|
|
6
|
-
<Meta title="Molecules/SkuSelector/Selectors" component={Selectors} />
|
|
7
|
-
|
|
8
|
-
<header>
|
|
9
|
-
|
|
10
|
-
# Selectors
|
|
11
|
-
|
|
12
|
-
Component used for controlling behavior and the SKUs selection of the `SkuSelector`.
|
|
13
|
-
|
|
14
|
-
</header>
|
|
15
|
-
|
|
16
|
-
## Overview
|
|
17
|
-
|
|
18
|
-
The `Selectors` component is responsible for rendering `SkuSelector` according to the kind of variants available for each product.
|
|
19
|
-
|
|
20
|
-
It also handles the general `SkuSelector` behavior, like navigating between SKUs and managing the combination between available SKUs for each variant.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Usage
|
|
25
|
-
|
|
26
|
-
The code snippet below is an example of what `Selectors` props should look like, but remember that this info comes from the API when the product has available SKU variants.
|
|
27
|
-
|
|
28
|
-
`import Selectors from 'src/components/ui/SkuSelector'`
|
|
29
|
-
|
|
30
|
-
<Canvas withSource="open" className="no-code">
|
|
31
|
-
<Story
|
|
32
|
-
name="overview"
|
|
33
|
-
decorators={[
|
|
34
|
-
(Story) => (
|
|
35
|
-
<div style={{ display: 'none' }}>
|
|
36
|
-
<Story />
|
|
37
|
-
</div>
|
|
38
|
-
),
|
|
39
|
-
]}
|
|
40
|
-
>
|
|
41
|
-
<Selectors
|
|
42
|
-
activeVariations={{
|
|
43
|
-
Color: 'White',
|
|
44
|
-
Size: '42',
|
|
45
|
-
}}
|
|
46
|
-
slugsMap={{
|
|
47
|
-
'Color-Pink-Size-42': 'classic-shoes-37',
|
|
48
|
-
'Color-White-Size-42': 'classic-shoes-36',
|
|
49
|
-
'Color-White-Size-41': 'classic-shoes-310124175',
|
|
50
|
-
}}
|
|
51
|
-
dominantVariation: 'Color'
|
|
52
|
-
availableVariations={{
|
|
53
|
-
Size: [
|
|
54
|
-
{
|
|
55
|
-
src: '/',
|
|
56
|
-
label: '42',
|
|
57
|
-
value: '42',
|
|
58
|
-
alt: 'Size 42',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
src: '/',
|
|
62
|
-
label: '41',
|
|
63
|
-
value: '41',
|
|
64
|
-
alt: 'Size 41',
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
Color: [
|
|
68
|
-
{
|
|
69
|
-
src: '/',
|
|
70
|
-
label: 'Pink',
|
|
71
|
-
value: 'Pink',
|
|
72
|
-
alt: 'Color Pink',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
src: '/',
|
|
76
|
-
label: 'White',
|
|
77
|
-
value: 'White',
|
|
78
|
-
alt: 'Color White',
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
}}
|
|
82
|
-
/>
|
|
83
|
-
</Story>
|
|
84
|
-
</Canvas>
|
|
85
|
-
|
|
86
|
-
<ArgsTable of={Selectors} />
|
|
File without changes
|
|
File without changes
|