@faststore/core 3.0.38 → 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 +3 -3
- package/.next/cache/.tsbuildinfo +1 -1
- 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/chunks/404.js +1 -0
- package/.next/server/chunks/498.js +1 -1
- package/.next/server/chunks/57.js +1 -0
- package/.next/server/chunks/997.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.js.nft.json +1 -1
- package/.next/server/pages/[...slug].js +1 -1
- package/.next/server/pages/[...slug].js.nft.json +1 -1
- package/.next/server/pages/[slug]/p.js +1 -1
- package/.next/server/pages/[slug]/p.js.nft.json +1 -1
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_document.js.nft.json +1 -1
- package/.next/server/pages/_error.js.nft.json +1 -1
- package/.next/server/pages/account.js.nft.json +1 -1
- package/.next/server/pages/api/graphql.js +1 -1
- package/.next/server/pages/api/graphql.js.nft.json +1 -1
- package/.next/server/pages/api/health/live.js.nft.json +1 -1
- package/.next/server/pages/api/health/ready.js.nft.json +1 -1
- package/.next/server/pages/api/preview.js.nft.json +1 -1
- package/.next/server/pages/checkout.js.nft.json +1 -1
- package/.next/server/pages/en-US/404.html +2 -2
- package/.next/server/pages/en-US/404.json +1 -1
- package/.next/server/pages/en-US/500.html +2 -2
- package/.next/server/pages/en-US/500.json +1 -1
- package/.next/server/pages/en-US/account.html +2 -2
- package/.next/server/pages/en-US/account.json +1 -1
- package/.next/server/pages/en-US/checkout.html +2 -2
- package/.next/server/pages/en-US/checkout.json +1 -1
- package/.next/server/pages/en-US/login.html +2 -2
- package/.next/server/pages/en-US/login.json +1 -1
- package/.next/server/pages/en-US/s.html +2 -2
- package/.next/server/pages/en-US/s.json +1 -1
- package/.next/server/pages/en-US.html +2 -2
- package/.next/server/pages/en-US.json +1 -1
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/login.js.nft.json +1 -1
- package/.next/server/pages/s.js.nft.json +1 -1
- package/.next/static/chunks/pages/{_app-4df2b21628950d8a.js → _app-ec0d2e833bd9cea0.js} +1 -1
- package/.next/trace +91 -91
- package/.turbo/turbo-build.log +6 -6
- package/.turbo/turbo-test.log +10 -10
- package/faststore.config.default.js +2 -1
- package/package.json +9 -13
- package/pull_request_template.md +0 -1
- package/src/components/auth/ProfileChallenge/ProfileChallenge.tsx +17 -0
- package/src/components/auth/ProfileChallenge/index.ts +1 -0
- package/src/experimental/index.ts +2 -0
- package/src/sdk/auth/index.ts +19 -0
- package/tsconfig.json +1 -1
- package/.next/server/chunks/257.js +0 -6
- package/.next/server/chunks/981.js +0 -6
- package/src/components/product/ProductCard/ProductCard.stories.mdx +0 -413
- package/src/components/search/searchMock.ts +0 -48
- 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/{eU9NSkrfATHvVghBMZcAI → qNZTpBDkQaWkLQfUrkXy7}/_buildManifest.js +0 -0
- /package/.next/static/{eU9NSkrfATHvVghBMZcAI → qNZTpBDkQaWkLQfUrkXy7}/_ssgManifest.js +0 -0
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { rest } from 'msw'
|
|
2
|
-
|
|
3
|
-
import { productGridItems, searchTerms } from 'src/../.storybook/mocks'
|
|
4
|
-
|
|
5
|
-
export const products = productGridItems.map((item) => item.node)
|
|
6
|
-
|
|
7
|
-
export const msw = {
|
|
8
|
-
handlers: [
|
|
9
|
-
rest.get('/api/graphql', (req, res, ctx) => {
|
|
10
|
-
const {
|
|
11
|
-
url: { searchParams },
|
|
12
|
-
} = req
|
|
13
|
-
|
|
14
|
-
const operationName = searchParams.get('operationName')
|
|
15
|
-
|
|
16
|
-
if (operationName === 'TopSearchSuggestionsQuery') {
|
|
17
|
-
return res(
|
|
18
|
-
ctx.json({
|
|
19
|
-
data: {
|
|
20
|
-
search: {
|
|
21
|
-
suggestions: {
|
|
22
|
-
terms: searchTerms,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
})
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (operationName === 'SearchSuggestionsQuery') {
|
|
31
|
-
return res(
|
|
32
|
-
ctx.json({
|
|
33
|
-
data: {
|
|
34
|
-
search: {
|
|
35
|
-
suggestions: {
|
|
36
|
-
terms: searchTerms,
|
|
37
|
-
products,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
})
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return res(ctx.status(400))
|
|
46
|
-
}),
|
|
47
|
-
],
|
|
48
|
-
}
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
-
import Breadcrumb from '.'
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
TokenTable,
|
|
6
|
-
TokenRow,
|
|
7
|
-
TokenDivider,
|
|
8
|
-
} from 'src/../.storybook/components'
|
|
9
|
-
|
|
10
|
-
<Meta component={Breadcrumb} title="Molecules/Breadcrumb" />
|
|
11
|
-
|
|
12
|
-
export const breadcrumbList = [
|
|
13
|
-
{ item: 'technology', name: 'Technology', position: 1 },
|
|
14
|
-
{
|
|
15
|
-
item: 'technology/electronics',
|
|
16
|
-
name: 'Electronics',
|
|
17
|
-
position: 2,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
item: 'technology/electronics/audio-and-video',
|
|
21
|
-
name: 'Audio & Video',
|
|
22
|
-
position: 3,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
item: 'technology/electronics/audio-and-video/headphones',
|
|
26
|
-
name: 'Headphones',
|
|
27
|
-
position: 4,
|
|
28
|
-
},
|
|
29
|
-
]
|
|
30
|
-
|
|
31
|
-
export const Template = (args) => <Breadcrumb {...args} />
|
|
32
|
-
|
|
33
|
-
<header>
|
|
34
|
-
|
|
35
|
-
# Breadcrumb
|
|
36
|
-
|
|
37
|
-
Breadcrumbs indicate the user's location in a website hierarchy, facilitating the navigation to previous page levels.
|
|
38
|
-
|
|
39
|
-
</header>
|
|
40
|
-
|
|
41
|
-
## Overview
|
|
42
|
-
|
|
43
|
-
The `Breadcrumb` component uses [FastStore UI Breadcrumb](https://www.faststore.dev/reference/ui/molecules/Breadcrumb) as base.
|
|
44
|
-
|
|
45
|
-
<Canvas isColumn>
|
|
46
|
-
<Story name="overview" args={{ breadcrumbList }}>
|
|
47
|
-
{Template.bind({})}
|
|
48
|
-
</Story>
|
|
49
|
-
<Story
|
|
50
|
-
name="overview-with-dropdown"
|
|
51
|
-
args={{
|
|
52
|
-
breadcrumbList: [
|
|
53
|
-
...breadcrumbList,
|
|
54
|
-
{
|
|
55
|
-
item: 'technology/electronics/audio-and-video/headphones/headphonesaedle-vk1-headphone',
|
|
56
|
-
name: 'Aedle VK-1 L Headphone',
|
|
57
|
-
position: 5,
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
}}
|
|
61
|
-
>
|
|
62
|
-
{Template.bind({})}
|
|
63
|
-
</Story>
|
|
64
|
-
</Canvas>
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Usage
|
|
69
|
-
|
|
70
|
-
`import Breadcrumb from 'src/components/ui/Breadcrumb'`
|
|
71
|
-
|
|
72
|
-
<Canvas>
|
|
73
|
-
<Story name="default" args={{ breadcrumbList }}>
|
|
74
|
-
{Template.bind({})}
|
|
75
|
-
</Story>
|
|
76
|
-
</Canvas>
|
|
77
|
-
|
|
78
|
-
<ArgsTable story="default" />
|
|
79
|
-
|
|
80
|
-
<TokenTable>
|
|
81
|
-
<TokenRow
|
|
82
|
-
token="--fs-breadcrumb-margin-left"
|
|
83
|
-
value="calc(-1 * var(--fs-spacing-1))"
|
|
84
|
-
/>
|
|
85
|
-
</TokenTable>
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Nested Elements
|
|
90
|
-
|
|
91
|
-
### List Item
|
|
92
|
-
|
|
93
|
-
<TokenTable>
|
|
94
|
-
<TokenRow
|
|
95
|
-
token="--fs-breadcrumb-list-item-padding"
|
|
96
|
-
value="var(--fs-spacing-0)"
|
|
97
|
-
/>
|
|
98
|
-
<TokenDivider />
|
|
99
|
-
<TokenRow
|
|
100
|
-
token="--fs-breadcrumb-list-item-last-text-color"
|
|
101
|
-
value="var(--fs-color-text-light)"
|
|
102
|
-
isColor
|
|
103
|
-
/>
|
|
104
|
-
<TokenDivider />
|
|
105
|
-
<TokenRow token="--fs-breadcrumb-list-item-max-width-mobile" value="30%" />
|
|
106
|
-
</TokenTable>
|
|
107
|
-
|
|
108
|
-
### Link
|
|
109
|
-
|
|
110
|
-
<TokenTable>
|
|
111
|
-
<TokenRow
|
|
112
|
-
token="--fs-breadcrumb-link-color-visited"
|
|
113
|
-
value="var(--fs-color-link)"
|
|
114
|
-
isColor
|
|
115
|
-
/>
|
|
116
|
-
</TokenTable>
|
|
117
|
-
|
|
118
|
-
### Link Home
|
|
119
|
-
|
|
120
|
-
<TokenTable>
|
|
121
|
-
<TokenRow
|
|
122
|
-
token="--fs-breadcrumb-link-home-padding"
|
|
123
|
-
value="var(--fs-spacing-1)"
|
|
124
|
-
/>
|
|
125
|
-
<TokenDivider />
|
|
126
|
-
<TokenRow
|
|
127
|
-
token="--fs-breadcrumb-link-home-border-radius"
|
|
128
|
-
value="var(--fs-border-radius-circle)"
|
|
129
|
-
/>
|
|
130
|
-
<TokenDivider />
|
|
131
|
-
<TokenRow
|
|
132
|
-
token="--fs-breadcrumb-link-home-hover-bkg-color"
|
|
133
|
-
value="var(--fs-color-primary-bkg-light)"
|
|
134
|
-
isColor
|
|
135
|
-
/>
|
|
136
|
-
<TokenRow
|
|
137
|
-
token="--fs-breadcrumb-link-home-color"
|
|
138
|
-
value="var(--fs-color-text)"
|
|
139
|
-
isColor
|
|
140
|
-
/>
|
|
141
|
-
</TokenTable>
|
|
142
|
-
|
|
143
|
-
### Divider
|
|
144
|
-
|
|
145
|
-
<TokenTable>
|
|
146
|
-
<TokenRow
|
|
147
|
-
token="--fs-breadcrumb-divider-height"
|
|
148
|
-
value="var(--fs-spacing-3)"
|
|
149
|
-
/>
|
|
150
|
-
<TokenRow
|
|
151
|
-
token="--fs-breadcrumb-divider-margin"
|
|
152
|
-
value="var(--fs-spacing-1)"
|
|
153
|
-
/>
|
|
154
|
-
<TokenDivider />
|
|
155
|
-
<TokenRow
|
|
156
|
-
token="--fs-breadcrumb-divider-border-left-width"
|
|
157
|
-
value="var(--fs-border-width)"
|
|
158
|
-
/>
|
|
159
|
-
<TokenRow
|
|
160
|
-
token="--fs-breadcrumb-divider-border-left-color"
|
|
161
|
-
value="var(--fs-border-color-light)"
|
|
162
|
-
isColor
|
|
163
|
-
/>
|
|
164
|
-
</TokenTable>
|
|
165
|
-
|
|
166
|
-
### Dropdown Button
|
|
167
|
-
|
|
168
|
-
<TokenTable>
|
|
169
|
-
<TokenRow
|
|
170
|
-
token="--fs-breadcrumb-dropdown-button-margin-left"
|
|
171
|
-
value="var(--fs-breadcrumb-margin-left)"
|
|
172
|
-
/>
|
|
173
|
-
<TokenDivider />
|
|
174
|
-
<TokenRow
|
|
175
|
-
token="--fs-breadcrumb-dropdown-button-color"
|
|
176
|
-
value="var(--fs-color-link)"
|
|
177
|
-
isColor
|
|
178
|
-
/>
|
|
179
|
-
<TokenDivider />
|
|
180
|
-
<TokenRow
|
|
181
|
-
token="--fs-breadcrumb-dropdown-button-border-radius"
|
|
182
|
-
value="var(--fs-spacing-0)"
|
|
183
|
-
/>
|
|
184
|
-
<TokenDivider />
|
|
185
|
-
<TokenRow
|
|
186
|
-
token="--fs-breadcrumb-dropdown-button-transition-property"
|
|
187
|
-
value="var(--fs-transition-property)"
|
|
188
|
-
/>
|
|
189
|
-
<TokenRow
|
|
190
|
-
token="--fs-breadcrumb-dropdown-button-transition-timing"
|
|
191
|
-
value="var(--fs-transition-timing)"
|
|
192
|
-
/>
|
|
193
|
-
<TokenRow
|
|
194
|
-
token="--fs-breadcrumb-dropdown-button-transition-function"
|
|
195
|
-
value="var(--fs-transition-function)"
|
|
196
|
-
/>
|
|
197
|
-
</TokenTable>
|
|
@@ -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
|