@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.
Files changed (35) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/cache/config.json +3 -3
  4. package/.next/cache/eslint/.cache_1gneedd +1 -1
  5. package/.next/cache/webpack/client-production/0.pack +0 -0
  6. package/.next/cache/webpack/client-production/index.pack +0 -0
  7. package/.next/cache/webpack/server-production/0.pack +0 -0
  8. package/.next/cache/webpack/server-production/index.pack +0 -0
  9. package/.next/next-minimal-server.js.nft.json +1 -1
  10. package/.next/next-server.js.nft.json +1 -1
  11. package/.next/prerender-manifest.js +1 -1
  12. package/.next/prerender-manifest.json +1 -1
  13. package/.next/routes-manifest.json +1 -1
  14. package/.next/server/chunks/242.js +1 -1
  15. package/.next/server/middleware-build-manifest.js +1 -1
  16. package/.next/server/pages/api/graphql.js +1 -1
  17. package/.next/server/pages/en-US/404.html +2 -2
  18. package/.next/server/pages/en-US/500.html +2 -2
  19. package/.next/server/pages/en-US/account.html +2 -2
  20. package/.next/server/pages/en-US/checkout.html +2 -2
  21. package/.next/server/pages/en-US/login.html +2 -2
  22. package/.next/server/pages/en-US/s.html +2 -2
  23. package/.next/server/pages/en-US.html +2 -2
  24. package/.next/server/pages-manifest.json +1 -1
  25. package/.next/trace +91 -91
  26. package/.turbo/turbo-test.log +9 -9
  27. package/package.json +9 -9
  28. package/pull_request_template.md +0 -1
  29. package/src/components/product/ProductCard/ProductCard.stories.mdx +0 -413
  30. package/src/components/ui/Breadcrumb/Breadcrumb.stories.mdx +0 -197
  31. package/src/components/ui/Link/Link.stories.mdx +0 -272
  32. package/src/components/ui/ProductDescription/ProductDescription.stories.mdx +0 -66
  33. package/src/components/ui/SkuSelector/Selectors.stories.mdx +0 -86
  34. /package/.next/static/{ynVKyS-l-nXEqvPtRj6Vi → qNZTpBDkQaWkLQfUrkXy7}/_buildManifest.js +0 -0
  35. /package/.next/static/{ynVKyS-l-nXEqvPtRj6Vi → qNZTpBDkQaWkLQfUrkXy7}/_ssgManifest.js +0 -0
@@ -1,23 +1,23 @@
1
1
  $ jest
2
- PASS test/server/index.test.ts (26.714 s)
2
+ PASS test/server/index.test.ts (26.365 s)
3
3
  FastStore GraphQL Layer
4
4
  @faststore/api
5
- ✓ should return a valid GraphQL schema (15 ms)
6
- ✓ should return a valid GraphQL schema contain all expected types (22 ms)
5
+ ✓ should return a valid GraphQL schema (8 ms)
6
+ ✓ should return a valid GraphQL schema contain all expected types (10 ms)
7
7
  ✓ should return a valid GraphQL schema contain all expected queries (2 ms)
8
8
  ✓ should return a valid GraphQL schema contain all expected mutations
9
9
  VTEX API Extension
10
- ✓ getTypeDefsFromFolder function should return an Array (25 ms)
11
- Third Party API Extension
12
10
  ✓ getTypeDefsFromFolder function should return an Array (9 ms)
11
+ Third Party API Extension
12
+ ✓ getTypeDefsFromFolder function should return an Array (18 ms)
13
13
  Final Schema after merging
14
- ✓ should return a valid merged GraphQL schema (90 ms)
14
+ ✓ should return a valid merged GraphQL schema (59 ms)
15
15
  Envelop
16
- ✓ should exist with its plugins (42 ms)
17
- ✓ should handle options and execute (598 ms)
16
+ ✓ should exist with its plugins (53 ms)
17
+ ✓ should handle options and execute (237 ms)
18
18
 
19
19
  Test Suites: 1 passed, 1 total
20
20
  Tests: 9 passed, 9 total
21
21
  Snapshots: 0 total
22
- Time: 26.82 s
22
+ Time: 26.461 s
23
23
  Ran all test suites.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.0.39",
3
+ "version": "3.0.40",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -39,11 +39,11 @@
39
39
  "@envelop/graphql-jit": "^1.1.1",
40
40
  "@envelop/parser-cache": "^2.2.0",
41
41
  "@envelop/validation-cache": "^2.2.0",
42
- "@faststore/api": "^3.0.39",
43
- "@faststore/components": "^3.0.39",
44
- "@faststore/graphql-utils": "^3.0.39",
45
- "@faststore/sdk": "^3.0.39",
46
- "@faststore/ui": "^3.0.39",
42
+ "@faststore/api": "^3.0.40",
43
+ "@faststore/components": "^3.0.40",
44
+ "@faststore/graphql-utils": "^3.0.40",
45
+ "@faststore/sdk": "^3.0.40",
46
+ "@faststore/ui": "^3.0.40",
47
47
  "@graphql-codegen/cli": "^3.3.1",
48
48
  "@graphql-codegen/client-preset": "^4.1.0",
49
49
  "@graphql-codegen/typescript": "^3.0.4",
@@ -82,8 +82,8 @@
82
82
  "devDependencies": {
83
83
  "@cypress/code-coverage": "^3.12.1",
84
84
  "@envelop/testing": "^6.0.0",
85
- "@faststore/cli": "^3.0.39",
86
- "@faststore/eslint-config": "^3.0.39",
85
+ "@faststore/cli": "^3.0.40",
86
+ "@faststore/eslint-config": "^3.0.40",
87
87
  "@faststore/lighthouse": "^1.12.32",
88
88
  "@lhci/cli": "^0.9.0",
89
89
  "@testing-library/cypress": "^10.0.1",
@@ -124,5 +124,5 @@
124
124
  "node": "18.19.0",
125
125
  "yarn": "1.19.1"
126
126
  },
127
- "gitHead": "164257d98e270785aaefc2c174a02f39c1c545d4"
127
+ "gitHead": "0c9cf2d2306ff21a626c3073a54e2ee69aaac919"
128
128
  }
@@ -33,5 +33,4 @@
33
33
 
34
34
  **Documentation**
35
35
  - [ ] PR description
36
- - [ ] Added to/Updated the Storybook - *if applicable*
37
36
  - [ ] For documentation changes, ping `@carolinamenezes` or `@PedroAntunesCosta` to review and update
@@ -1,413 +0,0 @@
1
- import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'
2
-
3
- import { Button } from '@faststore/ui'
4
-
5
- import Icon from '../../ui/Icon'
6
- import ProductCard from '.'
7
-
8
- import {
9
- TokenTable,
10
- TokenRow,
11
- TokenDivider,
12
- } from 'src/../.storybook/components'
13
-
14
- <Meta
15
- title="Molecules/ProductCard"
16
- component={ProductCard}
17
- argTypes={{
18
- variant: {
19
- defaultValue: 'default',
20
- table: { defaultValue: 'default' },
21
- },
22
- product: { table: { disable: true } },
23
- index: { table: { disable: true } },
24
- aspectRatio: {
25
- options: [0.75, 1.5, 1],
26
- control: { type: 'radio' },
27
- table: { defaultValue: '1' },
28
- },
29
- BuyButton: {
30
- control: 'boolean',
31
- table: { defaultValue: false },
32
- },
33
- }}
34
- />
35
-
36
- export const product = {
37
- id: '15503951',
38
- slug: 'handmade-steel-towels-practical-15503951',
39
- sku: '15503951',
40
- brand: { brandName: 'Brand', name: 'Brand' },
41
- name: 'red',
42
- gtin: '5595633577807',
43
- isVariantOf: {
44
- productGroupID: '130742',
45
- name: 'Handmade Steel Towels Practical',
46
- },
47
- image: [
48
- {
49
- url: 'http://storeframework.vtexassets.com/arquivos/ids/190191/numquam.jpg?v=637755599170100000',
50
- alternateName: 'est',
51
- },
52
- ],
53
- offers: {
54
- lowPrice: 181.71,
55
- offers: [
56
- {
57
- availability: 'https://schema.org/InStock',
58
- price: 181.71,
59
- listPrice: 208.72,
60
- quantity: 1,
61
- seller: { identifier: '1' },
62
- },
63
- ],
64
- },
65
- }
66
-
67
- export const Template = ({ BuyButton, ...args }) => {
68
- const button = BuyButton ? (
69
- <Button
70
- variant="primary"
71
- data-fs-button-size="small"
72
- icon={<Icon name="ShoppingCart" width={18} height={18} />}
73
- iconPosition="left"
74
- >
75
- Add
76
- </Button>
77
- ) : null
78
- return (
79
- <div style={{ width: 300 }}>
80
- <ProductCard BuyButton={button} {...args} />
81
- </div>
82
- )
83
- }
84
-
85
- export const TemplateWide = ({ BuyButton, ...args }) => {
86
- const button = BuyButton ? (
87
- <Button
88
- variant="primary"
89
- data-fs-button-size="small"
90
- icon={<Icon name="ShoppingCart" width={18} height={18} />}
91
- iconPosition="left"
92
- >
93
- Add
94
- </Button>
95
- ) : null
96
- return (
97
- <div style={{ width: 400 }}>
98
- <ProductCard BuyButton={button} {...args} />
99
- </div>
100
- )
101
- }
102
-
103
- <header>
104
-
105
- # Product Card
106
-
107
- ProductCard displays summarized information about a product. They usually present a call-to-action button, as well as the product's name, price, and image.
108
-
109
- </header>
110
-
111
- ## Overview
112
-
113
- The `ProductCard` component uses [FastStore UI ProductCard](https://www.faststore.dev/reference/ui/molecules/ProductCard).
114
-
115
- <Canvas className="sbdocs-vertically-center">
116
- <Story
117
- name="overview-default"
118
- args={{
119
- product: product,
120
- index: 1,
121
- variant: 'default',
122
- bordered: false,
123
- aspectRatio: 1,
124
- BuyButton: false,
125
- }}
126
- >
127
- {Template.bind({})}
128
- </Story>
129
- <Story
130
- name="overview-bordered"
131
- args={{
132
- product: product,
133
- index: 1,
134
- variant: 'default',
135
- bordered: true,
136
- aspectRatio: 1,
137
- BuyButton: false,
138
- }}
139
- >
140
- {Template.bind({})}
141
- </Story>
142
- <Story
143
- name="overview-wide"
144
- args={{
145
- product: product,
146
- index: 1,
147
- variant: 'wide',
148
- bordered: false,
149
- aspectRatio: 1.5,
150
- BuyButton: false,
151
- }}
152
- >
153
- {TemplateWide.bind({})}
154
- </Story>
155
- </Canvas>
156
-
157
- ---
158
-
159
- ## Usage
160
-
161
- <Canvas>
162
- <Story
163
- name="default"
164
- args={{
165
- product: product,
166
- index: 1,
167
- variant: 'default',
168
- bordered: false,
169
- aspectRatio: 1,
170
- BuyButton: false,
171
- }}
172
- >
173
- {Template.bind({})}
174
- </Story>
175
- </Canvas>
176
-
177
- <ArgsTable story="default" />
178
-
179
- <TokenTable>
180
- <TokenRow
181
- token="--fs-product-card-padding"
182
- value="var(--fs-spacing-1) var(--fs-spacing-1) var(--fs-spacing-2) var(--fs-spacing-1)"
183
- />
184
- <TokenRow token="--fs-product-card-gap" value="var(--fs-grid-gap-2)" />
185
- <TokenRow token="--fs-product-card-min-width" value="10rem" />
186
- <TokenDivider />
187
- <TokenRow token="--fs-product-card-shadow" value="var(--fs-shadow)" />
188
- <TokenRow
189
- token="--fs-product-card-shadow-hover"
190
- value="var(--fs-shadow-hover)"
191
- />
192
- <TokenDivider />
193
- <TokenRow
194
- token="--fs-product-card-bkg-color"
195
- value="var(--fs-color-body-bkg)"
196
- isColor
197
- />
198
- <TokenRow
199
- token="--fs-product-card-bkg-color-hover"
200
- value="var(--fs-product-card-bkg-color)"
201
- globalValue="var(--fs-color-body-bkg)"
202
- isColor
203
- />
204
- <TokenRow
205
- token="--fs-product-card-bkg-color-focus"
206
- value="var(--fs-product-card-bkg-color-hover)"
207
- globalValue="var(--fs-color-body-bkg)"
208
- isColor
209
- />
210
- <TokenDivider />
211
- <TokenRow
212
- token="--fs-product-card-border-radius"
213
- value="var(--fs-border-radius)"
214
- />
215
- <TokenRow
216
- token="--fs-product-card-border-color-hover"
217
- value="var(--fs-border-color-hover)"
218
- isColor
219
- />
220
- <TokenDivider />
221
- <TokenRow
222
- token="--fs-product-card-transition-function"
223
- value="var(--fs-transition-function)"
224
- />
225
- <TokenRow
226
- token="--fs-product-card-transition-property"
227
- value="var(--fs-transition-property)"
228
- />
229
- <TokenRow
230
- token="--fs-product-card-transition-timing"
231
- value="var(--fs-transition-timing)"
232
- />
233
- </TokenTable>
234
-
235
- ---
236
-
237
- ## Nested Elements
238
-
239
- ### Content
240
-
241
- <TokenTable>
242
- <TokenRow
243
- token="--fs-product-card-content-padding"
244
- value="var(--fs-spacing-2) 0 0 0"
245
- />
246
- </TokenTable>
247
-
248
- ### Image
249
-
250
- <TokenTable>
251
- <TokenRow
252
- token="--fs-product-card-img-radius"
253
- value="var(--fs-product-card-border-radius)"
254
- />
255
- <TokenRow token="--fs-product-card-img-scale-hover" value="1" />
256
- </TokenTable>
257
-
258
- ### Title
259
-
260
- <TokenTable>
261
- <TokenRow
262
- token="--fs-product-card-title-color"
263
- value="var(--fs-color-text)"
264
- isColor
265
- />
266
- <TokenRow
267
- token="--fs-product-card-title-size"
268
- value="var(--fs-text-size-base)"
269
- />
270
- <TokenRow
271
- token="--fs-product-card-title-weight"
272
- value="var(--fs-text-weight-regular)"
273
- />
274
- <TokenRow
275
- token="--fs-product-card-title-max-lines"
276
- value="var(--fs-text-max-lines)"
277
- />
278
- </TokenTable>
279
-
280
- ### Price
281
-
282
- <TokenTable>
283
- <TokenRow
284
- token="--fs-product-card-price-color"
285
- value="var(--fs-color-text)"
286
- isColor
287
- />
288
- <TokenRow
289
- token="--fs-product-card-price-size"
290
- value="var(--fs-text-size-base)"
291
- />
292
- <TokenRow
293
- token="--fs-product-card-price-listing-color"
294
- value="var(--fs-color-text-light)"
295
- isColor
296
- />
297
- <TokenRow
298
- token="--fs-product-card-price-listing-size"
299
- value="var(--fs-text-size-legend)"
300
- />
301
- </TokenTable>
302
-
303
- ### Description
304
-
305
- <TokenTable>
306
- <TokenRow
307
- token="--fs-product-card-description-color"
308
- value="var(--fs-color-text)"
309
- isColor
310
- />
311
- <TokenRow
312
- token="--fs-product-card-description-size"
313
- value="var(--fs-text-size-legend)"
314
- />
315
- </TokenTable>
316
-
317
- ### Subtitle
318
-
319
- <TokenTable>
320
- <TokenRow
321
- token="--fs-product-card-subtitle-color"
322
- value="var(--fs-color-text-light)"
323
- isColor
324
- />
325
- <TokenRow
326
- token="--fs-product-card-subtitle-size"
327
- value="var(--fs-text-size-tiny)"
328
- />
329
- </TokenTable>
330
-
331
- ---
332
-
333
- ## Variants
334
-
335
- ### Default
336
-
337
- <Canvas>
338
- <Story
339
- name="product-card-default"
340
- args={{
341
- product: product,
342
- index: 1,
343
- variant: 'default',
344
- bordered: false,
345
- aspectRatio: 1,
346
- BuyButton: false,
347
- }}
348
- >
349
- {Template.bind({})}
350
- </Story>
351
- </Canvas>
352
-
353
- ### Bordered
354
-
355
- <Canvas>
356
- <Story
357
- name="product-card-bordered"
358
- args={{
359
- product: product,
360
- index: 1,
361
- variant: 'default',
362
- bordered: true,
363
- aspectRatio: 1,
364
- BuyButton: false,
365
- }}
366
- >
367
- {Template.bind({})}
368
- </Story>
369
- </Canvas>
370
-
371
- <TokenTable>
372
- <TokenRow
373
- token="--fs-product-card-border-width"
374
- value="var(--fs-border-width)"
375
- />
376
- <TokenRow
377
- token="--fs-product-card-border-color"
378
- value="var(--fs-border-color-light)"
379
- isColor
380
- />
381
- </TokenTable>
382
-
383
- ### Wide
384
-
385
- <Canvas>
386
- <Story
387
- name="product-card-wide"
388
- args={{
389
- product: product,
390
- index: 1,
391
- variant: 'wide',
392
- bordered: false,
393
- aspectRatio: 1.5,
394
- BuyButton: false,
395
- }}
396
- >
397
- {TemplateWide.bind({})}
398
- </Story>
399
- </Canvas>
400
-
401
- <TokenTable>
402
- <TokenRow token="--fs-product-card-wide-padding" value="0" />
403
- <TokenRow
404
- token="--fs-product-card-wide-content-padding"
405
- value="var(--fs-spacing-2)"
406
- />
407
- <TokenRow
408
- token="--fs-product-card-wide-bkg-color"
409
- value="var(--fs-color-neutral-bkg)"
410
- isColor
411
- />
412
- <TokenRow token="--fs-product-card-wide-min-width" value="9rem" />
413
- </TokenTable>
@@ -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>