@faststore/core 0.3.15 → 0.3.17

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 (57) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/cypress/integration/analytics.test.js +3 -3
  3. package/cypress/integration/plp.test.js +1 -1
  4. package/package.json +4 -4
  5. package/src/Layout.tsx +6 -1
  6. package/src/components/cart/CartItem/CartItem.tsx +2 -2
  7. package/src/components/cart/CartSidebar/CartSidebar.tsx +5 -6
  8. package/src/components/cart/CartSidebar/cart-sidebar.module.scss +2 -0
  9. package/src/components/common/Alert/Alert.tsx +6 -22
  10. package/src/components/common/Footer/Footer.stories.mdx +1 -1
  11. package/src/components/common/Footer/FooterLinks.tsx +16 -12
  12. package/src/components/search/Filter/Facets.stories.mdx +9 -9
  13. package/src/components/search/Filter/Facets.tsx +69 -61
  14. package/src/components/search/Filter/facets.module.scss +16 -16
  15. package/src/components/search/Search.stories.mdx +28 -24
  16. package/src/components/search/SearchDropdown/SearchDropdown.stories.mdx +0 -1
  17. package/src/components/search/SearchInput/SearchInput.stories.mdx +0 -1
  18. package/src/components/search/SearchTop/SearchTop.stories.mdx +0 -1
  19. package/src/components/sections/ProducDetailsContent/ProductDetailsContent.tsx +147 -149
  20. package/src/components/sections/ProductDetails/ProductDetails.tsx +2 -2
  21. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +17 -16
  22. package/src/components/ui/Gift/Gift.tsx +7 -13
  23. package/src/components/ui/ShippingSimulation/ShippingSimulation.stories.mdx +0 -27
  24. package/src/components/ui/ShippingSimulation/ShippingSimulation.tsx +6 -13
  25. package/src/components/ui/ShippingSimulation/shipping-simulation.module.scss +0 -39
  26. package/src/components/ui/SkuSelector/sku-selector.module.scss +1 -1
  27. package/tsconfig.json +1 -1
  28. package/src/components/sections/ProducDetailsContent/product-details-content.module.scss +0 -41
  29. package/src/components/ui/Accordion/Accordion.stories.mdx +0 -222
  30. package/src/components/ui/Accordion/Accordion.tsx +0 -39
  31. package/src/components/ui/Accordion/AccordionItem.stories.mdx +0 -116
  32. package/src/components/ui/Accordion/AccordionItem.tsx +0 -82
  33. package/src/components/ui/Accordion/accordion.module.scss +0 -65
  34. package/src/components/ui/Accordion/index.ts +0 -2
  35. package/src/components/ui/Alert/Alert.stories.mdx +0 -164
  36. package/src/components/ui/Alert/Alert.tsx +0 -81
  37. package/src/components/ui/Alert/alert.module.scss +0 -93
  38. package/src/components/ui/Alert/index.ts +0 -1
  39. package/src/components/ui/Dropdown/Dropdown.stories.mdx +0 -232
  40. package/src/components/ui/Dropdown/Dropdown.tsx +0 -12
  41. package/src/components/ui/Dropdown/DropdownButton.tsx +0 -20
  42. package/src/components/ui/Dropdown/DropdownItem.stories.mdx +0 -139
  43. package/src/components/ui/Dropdown/DropdownItem.tsx +0 -26
  44. package/src/components/ui/Dropdown/DropdownMenu.stories.mdx +0 -115
  45. package/src/components/ui/Dropdown/DropdownMenu.tsx +0 -34
  46. package/src/components/ui/Dropdown/dropdown.module.scss +0 -101
  47. package/src/components/ui/Dropdown/index.ts +0 -4
  48. package/src/components/ui/Gift/Gift.stories.mdx +0 -99
  49. package/src/components/ui/Gift/gift.module.scss +0 -94
  50. package/src/components/ui/PriceRange/PriceRange.stories.mdx +0 -192
  51. package/src/components/ui/PriceRange/PriceRange.tsx +0 -140
  52. package/src/components/ui/PriceRange/index.ts +0 -1
  53. package/src/components/ui/PriceRange/price-range.module.scss +0 -176
  54. package/src/components/ui/QuantitySelector/QuantitySelector.stories.mdx +0 -246
  55. package/src/components/ui/QuantitySelector/QuantitySelector.tsx +0 -103
  56. package/src/components/ui/QuantitySelector/index.ts +0 -1
  57. package/src/components/ui/QuantitySelector/quantity-selector.module.scss +0 -155
@@ -7,7 +7,6 @@ import {
7
7
  TokenDivider,
8
8
  } from 'src/../.storybook/components'
9
9
  import { SearchInputProvider } from 'src/sdk/search/useSearchInput'
10
- import { rest } from 'msw'
11
10
  import SearchDropdown from './SearchDropdown'
12
11
  import SearchInput from './SearchInput'
13
12
  import SearchProductCard from './SearchProductCard'
@@ -98,35 +97,39 @@ import SearchInput from 'src/components/search/SearchInput'
98
97
  actionPath="../?path=/docs/features-search-searchsuggestions--default-story"
99
98
  description={
100
99
  <>
101
- Displays a set of navigation links that self-adapts on mobile{' '}
102
- or desktop screens.
100
+ Displays a set of navigation links that self-adapts on mobile or
101
+ desktop screens.
103
102
  </>
104
103
  }
105
- containerStyle={{ overflowY: "scroll", alignItems: "flex-start" }}
104
+ containerStyle={{ overflowY: 'scroll', alignItems: 'flex-start' }}
106
105
  >
107
- <SearchSuggestions term="Ste" products={products.slice(0, 3)} terms={searchTerms} style={{ width: "100%" }} />
106
+ <SearchSuggestions
107
+ term="Ste"
108
+ products={products.slice(0, 3)}
109
+ terms={searchTerms}
110
+ style={{ width: '100%' }}
111
+ />
108
112
  </SectionItem>
109
113
  <SectionItem
110
114
  title="SearchProductCard"
111
115
  actionPath="../?path=/docs/features-search-searchproductcard--search-product-card"
112
116
  description={
113
117
  <>
114
- Card to show details of the product and suggestions in <code>SearchDropdown</code>.
118
+ Card to show details of the product and suggestions in{' '}
119
+ <code>SearchDropdown</code>.
115
120
  </>
116
121
  }
117
122
  >
118
- <SearchProductCard product={product} style={{ width: "100%" }} />
123
+ <SearchProductCard product={product} style={{ width: '100%' }} />
119
124
  </SectionItem>
120
125
  <SectionItem
121
126
  title="SearchTop"
122
127
  actionPath="../?path=/docs/features-search-searchtop--default-story"
123
128
  description={
124
- <>
125
- This section displays the most searched terms by customers.
126
- </>
129
+ <>This section displays the most searched terms by customers.</>
127
130
  }
128
131
  >
129
- <SearchTop style={{ width: "100%" }} />
132
+ <SearchTop style={{ width: '100%' }} />
130
133
  </SectionItem>
131
134
  </SectionList>
132
135
  <SectionList grid="grid">
@@ -134,36 +137,37 @@ import SearchInput from 'src/components/search/SearchInput'
134
137
  title="SearchHistory"
135
138
  actionPath="../?path=/docs/features-search-searchhistory--default-story"
136
139
  description={
137
- <>
138
- Responsible for showing the latest terms searched by the user.
139
- </>
140
+ <>Responsible for showing the latest terms searched by the user.</>
140
141
  }
141
142
  >
142
- <SearchHistory style={{ width: "100%" }} />
143
+ <SearchHistory style={{ width: '100%' }} />
143
144
  </SectionItem>
144
145
  <SectionItem
145
146
  title="SearchDropdown"
146
147
  actionPath="../?path=/docs/features-search-searchdropdown--default-story"
147
148
  description={
148
149
  <>
149
- Combine <code>SearchHistory</code>, <code>SearchTop</code>, and <code>SearchSuggestions</code> to show all options in <code>SearchInput</code>.
150
+ Combine <code>SearchHistory</code>, <code>SearchTop</code>, and{' '}
151
+ <code>SearchSuggestions</code> to show all options in{' '}
152
+ <code>SearchInput</code>.
150
153
  </>
151
154
  }
152
- containerStyle={{ display: "flex", flexDirection: "column", overflowY: "scroll", justifyContent: "start" }}
155
+ containerStyle={{
156
+ display: 'flex',
157
+ flexDirection: 'column',
158
+ overflowY: 'scroll',
159
+ justifyContent: 'start',
160
+ }}
153
161
  >
154
162
  <SearchDropdown />
155
163
  </SectionItem>
156
164
  <SectionItem
157
165
  title="SearchInput"
158
166
  actionPath="../?path=/docs/features-search-searchinput--default-story"
159
- description={
160
- <>
161
- Responsible to receive, search and display suggestions.
162
- </>
163
- }
164
- containerStyle={{ overflowY: "scroll" }}
167
+ description={<>Responsible to receive, search and display suggestions.</>}
168
+ containerStyle={{ overflowY: 'scroll' }}
165
169
  >
166
- <SearchInput containerStyle={{ width: "100%" }} />
170
+ <SearchInput containerStyle={{ width: '100%' }} />
167
171
  </SectionItem>
168
172
  </SectionList>
169
173
  </SearchInputProvider>
@@ -1,5 +1,4 @@
1
1
  import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'
2
- import { rest } from 'msw'
3
2
 
4
3
  import {
5
4
  TokenTable,
@@ -1,5 +1,4 @@
1
1
  import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'
2
- import { rest } from 'msw'
3
2
 
4
3
  import {
5
4
  TokenTable,
@@ -1,5 +1,4 @@
1
1
  import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'
2
- import { rest } from 'msw'
3
2
 
4
3
  import { SearchInputProvider } from 'src/sdk/search/useSearchInput'
5
4
  import { searchTerms } from 'src/../.storybook/mocks'
@@ -6,12 +6,14 @@ import {
6
6
  TableCell as UITableCell,
7
7
  TableRow as UITableRow,
8
8
  Icon as UIIcon,
9
+ Accordion as UIAccordion,
10
+ AccordionItem as UIAccordionItem,
11
+ AccordionButton as UIAccordionButton,
12
+ AccordionPanel as UIAccordionPanel,
9
13
  } from '@faststore/ui'
10
14
 
11
- import Accordion, { AccordionItem } from 'src/components/ui/Accordion'
12
15
  import Icon from 'src/components/ui/Icon'
13
16
 
14
- import styles from './product-details-content.module.scss'
15
17
  import Section from '../Section'
16
18
 
17
19
  interface ArticleLabels {
@@ -100,177 +102,173 @@ function ProductDetailsContent({
100
102
  const labels = { ...DEFAULT_LABELS, ...propLabels }
101
103
 
102
104
  return (
103
- <Section
104
- className={styles.fsProductDetailsContent}
105
- data-fs-product-details-content
106
- >
107
- <Accordion
108
- expandedIndices={indices}
105
+ <Section data-fs-product-details-content>
106
+ <UIAccordion
107
+ indices={indices}
109
108
  onChange={onChange}
110
109
  aria-label="Product Details Content"
111
110
  >
112
- <AccordionItem
111
+ <UIAccordionItem
113
112
  as="article"
114
113
  index={0}
115
- isExpanded={indices.has(0)}
116
- buttonLabel={
117
- <h2 className="text__title-subsection">{labels.description}</h2>
118
- }
119
114
  data-fs-product-details-description
120
115
  prefixId="product-details-content"
121
116
  >
122
- <p className="text__body">
123
- Sony WH-1000XM4 Wireless Industry Leading Noise Canceling Overhead
124
- Headphones with Mic for Phone-Call and Alexa Voice Control, Black.
125
- </p>
126
- </AccordionItem>
127
- <AccordionItem
117
+ <UIAccordionButton>{labels.description}</UIAccordionButton>
118
+ <UIAccordionPanel>
119
+ <p className="text__body">
120
+ Sony WH-1000XM4 Wireless Industry Leading Noise Canceling Overhead
121
+ Headphones with Mic for Phone-Call and Alexa Voice Control, Black.
122
+ </p>
123
+ </UIAccordionPanel>
124
+ </UIAccordionItem>
125
+ <UIAccordionItem
128
126
  as="article"
129
127
  index={1}
130
- isExpanded={indices.has(1)}
131
- buttonLabel={
132
- <h2 className="text__title-subsection">{labels.about}</h2>
133
- }
134
128
  data-fs-product-details-about
135
129
  prefixId="product-details-content"
136
130
  >
137
- <UITable
138
- cellPadding={0}
139
- cellSpacing={0}
140
- className="text__title-mini-alt"
141
- >
142
- <UITableBody>
143
- <UITableRow>
144
- <UITableCell variant="header">
145
- <UIIcon
146
- data-fs-accordion-item-button-icon
147
- component={<Icon name="Ruler" width={18} height={18} />}
148
- />
149
- <span>Width</span>
150
- </UITableCell>
151
- <UITableCell>1.50m</UITableCell>
152
- </UITableRow>
153
- <UITableRow>
154
- <UITableCell variant="header">
155
- <UIIcon
156
- data-fs-accordion-item-button-icon
157
- component={<Icon name="Ruler" width={18} height={18} />}
158
- />
159
- Height
160
- </UITableCell>
161
- <UITableCell>1.50m</UITableCell>
162
- </UITableRow>
163
- <UITableRow>
164
- <UITableCell variant="header">
165
- <UIIcon
166
- data-fs-accordion-item-button-icon
167
- component={<Icon name="Ruler" width={18} height={18} />}
168
- />
169
- Dimensions
170
- </UITableCell>
171
- <UITableCell>7.27 x 3.03 x 9.94 inches</UITableCell>
172
- </UITableRow>
173
- <UITableRow>
174
- <UITableCell variant="header">
175
- <UIIcon
176
- data-fs-accordion-item-button-icon
177
- component={<Icon name="Bag" width={18} height={18} />}
178
- />
179
- Weight
180
- </UITableCell>
181
- <UITableCell>12oz</UITableCell>
182
- </UITableRow>
183
- <UITableRow>
184
- <UITableCell variant="header">
185
- <UIIcon
186
- data-fs-accordion-item-button-icon
187
- component={
188
- <Icon name="RocketLaunch" width={18} height={18} />
189
- }
190
- />
191
- Days to ship
192
- </UITableCell>
193
- <UITableCell>11 Days</UITableCell>
194
- </UITableRow>
195
- <UITableRow>
196
- <UITableCell variant="header">
197
- <UIIcon
198
- data-fs-accordion-item-button-icon
199
- component={
200
- <Icon name="CircleWavyCheck" width={18} height={18} />
201
- }
202
- />
203
- Estimated
204
- </UITableCell>
205
- <UITableCell>Nov 10th</UITableCell>
206
- </UITableRow>
207
- </UITableBody>
208
- </UITable>
209
- </AccordionItem>
210
- <AccordionItem
131
+ <UIAccordionButton>{labels.about}</UIAccordionButton>
132
+ <UIAccordionPanel>
133
+ <UITable
134
+ cellPadding={0}
135
+ cellSpacing={0}
136
+ className="text__title-mini-alt"
137
+ >
138
+ <UITableBody>
139
+ <UITableRow>
140
+ <UITableCell variant="header" align="left">
141
+ <UIIcon
142
+ data-fs-accordion-item-button-icon
143
+ component={<Icon name="Ruler" width={18} height={18} />}
144
+ />
145
+ <span>Width</span>
146
+ </UITableCell>
147
+ <UITableCell align="right">1.50m</UITableCell>
148
+ </UITableRow>
149
+ <UITableRow>
150
+ <UITableCell variant="header" align="left">
151
+ <UIIcon
152
+ data-fs-accordion-item-button-icon
153
+ component={<Icon name="Ruler" width={18} height={18} />}
154
+ />
155
+ Height
156
+ </UITableCell>
157
+ <UITableCell align="right">1.50m</UITableCell>
158
+ </UITableRow>
159
+ <UITableRow>
160
+ <UITableCell variant="header" align="left">
161
+ <UIIcon
162
+ data-fs-accordion-item-button-icon
163
+ component={<Icon name="Ruler" width={18} height={18} />}
164
+ />
165
+ Dimensions
166
+ </UITableCell>
167
+ <UITableCell align="right">
168
+ 7.27 x 3.03 x 9.94 inches
169
+ </UITableCell>
170
+ </UITableRow>
171
+ <UITableRow>
172
+ <UITableCell variant="header" align="left">
173
+ <UIIcon
174
+ data-fs-accordion-item-button-icon
175
+ component={<Icon name="Bag" width={18} height={18} />}
176
+ />
177
+ Weight
178
+ </UITableCell>
179
+ <UITableCell align="right">12oz</UITableCell>
180
+ </UITableRow>
181
+ <UITableRow>
182
+ <UITableCell variant="header" align="left">
183
+ <UIIcon
184
+ data-fs-accordion-item-button-icon
185
+ component={
186
+ <Icon name="RocketLaunch" width={18} height={18} />
187
+ }
188
+ />
189
+ Days to ship
190
+ </UITableCell>
191
+ <UITableCell align="right">11 Days</UITableCell>
192
+ </UITableRow>
193
+ <UITableRow>
194
+ <UITableCell variant="header" align="left">
195
+ <UIIcon
196
+ data-fs-accordion-item-button-icon
197
+ component={
198
+ <Icon name="CircleWavyCheck" width={18} height={18} />
199
+ }
200
+ />
201
+ Estimated
202
+ </UITableCell>
203
+ <UITableCell align="right">Nov 10th</UITableCell>
204
+ </UITableRow>
205
+ </UITableBody>
206
+ </UITable>
207
+ </UIAccordionPanel>
208
+ </UIAccordionItem>
209
+ <UIAccordionItem
211
210
  as="article"
212
211
  className="text__body"
213
212
  index={2}
214
- isExpanded={indices.has(2)}
215
- buttonLabel={
216
- <h2 className="text__title-subsection">{labels.highlights}</h2>
217
- }
218
213
  data-fs-product-details-highlights
219
214
  prefixId="product-details-content"
220
215
  >
221
- <UIList marker>
222
- <li>
223
- Industry-leading noise canceling with Dual Noise Sensor technology
224
- </li>
225
- <li>
226
- Next-level music with Edge-AI, co-developed with Sony Music
227
- Studios Tokyo
228
- </li>
229
- <li>
230
- Up to 30-hour battery life with quick charging (10 min charge for
231
- 5 hours of playback)
232
- </li>
233
- <li>
234
- Touch Sensor controls to pause play skip tracks, control volume,
235
- activate your voice assistant, and answer phone calls
236
- </li>
237
- <li>
238
- Speak-to-chat technology automatically reduces volume during
239
- conversations
240
- </li>
241
- <li>Superior call quality with precise voice pickup</li>
242
- <li>
243
- Wearing detection pauses playback when headphones are removed
244
- </li>
245
- <li>Seamless multiple-device pairing</li>
246
- <li>
247
- Adaptive Sound Control provides a personalized listening
248
- experience
249
- </li>
250
- <li>Updated design relieves pressure for long-lasting comfort</li>
251
- </UIList>
252
- </AccordionItem>
253
- <AccordionItem
216
+ <UIAccordionButton>{labels.highlights}</UIAccordionButton>
217
+ <UIAccordionPanel>
218
+ <UIList marker>
219
+ <li>
220
+ Industry-leading noise canceling with Dual Noise Sensor
221
+ technology
222
+ </li>
223
+ <li>
224
+ Next-level music with Edge-AI, co-developed with Sony Music
225
+ Studios Tokyo
226
+ </li>
227
+ <li>
228
+ Up to 30-hour battery life with quick charging (10 min charge
229
+ for 5 hours of playback)
230
+ </li>
231
+ <li>
232
+ Touch Sensor controls to pause play skip tracks, control volume,
233
+ activate your voice assistant, and answer phone calls
234
+ </li>
235
+ <li>
236
+ Speak-to-chat technology automatically reduces volume during
237
+ conversations
238
+ </li>
239
+ <li>Superior call quality with precise voice pickup</li>
240
+ <li>
241
+ Wearing detection pauses playback when headphones are removed
242
+ </li>
243
+ <li>Seamless multiple-device pairing</li>
244
+ <li>
245
+ Adaptive Sound Control provides a personalized listening
246
+ experience
247
+ </li>
248
+ <li>Updated design relieves pressure for long-lasting comfort</li>
249
+ </UIList>
250
+ </UIAccordionPanel>
251
+ </UIAccordionItem>
252
+ <UIAccordionItem
254
253
  as="article"
255
254
  index={3}
256
- isExpanded={indices.has(3)}
257
- buttonLabel={
258
- <h2 className="text__title-subsection">{labels.learnMore}</h2>
259
- }
260
255
  data-fs-product-details-learn-more
261
256
  prefixId="product-details-content"
262
257
  >
263
- <p className="text__body">
264
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
265
- eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
266
- ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
267
- aliquip ex ea commodo consequat. Duis aute irure dolor in
268
- reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
269
- pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
270
- culpa qui officia deserunt mollit anim id est laboru.
271
- </p>
272
- </AccordionItem>
273
- </Accordion>
258
+ <UIAccordionButton>{labels.learnMore}</UIAccordionButton>
259
+ <UIAccordionPanel>
260
+ <p className="text__body">
261
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
262
+ eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
263
+ enim ad minim veniam, quis nostrud exercitation ullamco laboris
264
+ nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
265
+ reprehenderit in voluptate velit esse cillum dolore eu fugiat
266
+ nulla pariatur. Excepteur sint occaecat cupidatat non proident,
267
+ sunt in culpa qui officia deserunt mollit anim id est laboru.
268
+ </p>
269
+ </UIAccordionPanel>
270
+ </UIAccordionItem>
271
+ </UIAccordion>
274
272
  </Section>
275
273
  )
276
274
  }
@@ -5,6 +5,7 @@ import { useEffect, useState } from 'react'
5
5
  import {
6
6
  BuyButton as UIBuyButton,
7
7
  DiscountBadge as UIDiscountBadge,
8
+ QuantitySelector as UIQuantitySelector,
8
9
  } from '@faststore/ui'
9
10
 
10
11
  import type { ProductDetailsFragment_ProductFragment } from '@generated/graphql'
@@ -13,7 +14,6 @@ import Breadcrumb from 'src/components/ui/Breadcrumb'
13
14
  import { ImageGallery } from 'src/components/ui/ImageGallery'
14
15
  import Price from 'src/components/ui/Price'
15
16
  import ProductTitle from 'src/components/ui/ProductTitle'
16
- import QuantitySelector from 'src/components/ui/QuantitySelector'
17
17
  import ShippingSimulation from 'src/components/ui/ShippingSimulation'
18
18
  import Selectors from 'src/components/ui/SkuSelector'
19
19
  import type { AnalyticsItem } from 'src/sdk/analytics/types'
@@ -167,7 +167,7 @@ function ProductDetails({ context: staleProduct }: Props) {
167
167
  <p className="price__old text__legend">{formattedListPrice}</p>
168
168
  <p className="price__new">{isValidating ? '' : formattedPrice}</p>
169
169
  </div> */}
170
- <QuantitySelector min={1} max={10} onChange={setAddQuantity} />
170
+ <UIQuantitySelector min={1} max={10} onChange={setAddQuantity} />
171
171
  </section>
172
172
  {skuVariants && (
173
173
  <Selectors
@@ -1,13 +1,14 @@
1
1
  import type { BreadcrumbProps as UIBreadcrumbProps } from '@faststore/ui'
2
- import { Breadcrumb as UIBreadcrumb } from '@faststore/ui'
2
+ import {
3
+ Breadcrumb as UIBreadcrumb,
4
+ Dropdown as UIDropdown,
5
+ DropdownButton as UIDropdownButton,
6
+ DropdownMenu as UIDropdownMenu,
7
+ DropdownItem as UIDropdownItem,
8
+ } from '@faststore/ui'
3
9
  import { useRouter } from 'next/router'
4
10
  import { memo } from 'react'
5
11
 
6
- import Dropdown, {
7
- DropdownButton,
8
- DropdownItem,
9
- DropdownMenu,
10
- } from 'src/components/ui/Dropdown'
11
12
  import Icon from 'src/components/ui/Icon'
12
13
  import Link from 'src/components/ui/Link'
13
14
 
@@ -77,25 +78,25 @@ function BaseBreadcrumb({
77
78
  )}
78
79
 
79
80
  {collapseBreadcrumb && (
80
- <Dropdown>
81
- <DropdownButton data-fs-breadcrumb-dropdown-button>
81
+ <UIDropdown>
82
+ <UIDropdownButton data-fs-breadcrumb-dropdown-button size="small">
82
83
  <Icon name="DotsThree" width={24} height={24} />
83
- </DropdownButton>
84
- <DropdownMenu data-fs-breadcrumb-dropdown-menu>
84
+ </UIDropdownButton>
85
+ <UIDropdownMenu data-fs-breadcrumb-dropdown-menu>
85
86
  {mediumItems.map(({ item, name }, index) => (
86
- <DropdownItem
87
+ <UIDropdownItem
87
88
  data-fs-breadcrumb-dropdown-item
89
+ onClick={() => router.push(item)}
90
+ key={String(index)}
88
91
  icon={
89
92
  <Icon name="ArrowElbowDownRight" width={24} height={24} />
90
93
  }
91
- onClick={() => router.push(item)}
92
- key={String(index)}
93
94
  >
94
95
  {name}
95
- </DropdownItem>
96
+ </UIDropdownItem>
96
97
  ))}
97
- </DropdownMenu>
98
- </Dropdown>
98
+ </UIDropdownMenu>
99
+ </UIDropdown>
99
100
  )}
100
101
 
101
102
  {collapseBreadcrumb &&
@@ -1,18 +1,16 @@
1
+ import type { GiftProps } from '@faststore/ui'
1
2
  import {
3
+ Badge as UIBadge,
2
4
  Gift as UIGift,
3
- GiftImage as UIGiftImage,
4
5
  GiftContent as UIGiftContent,
5
- Badge as UIBadge,
6
+ GiftImage as UIGiftImage,
6
7
  } from '@faststore/ui'
7
- import type { GiftProps } from '@faststore/ui'
8
8
 
9
- import { useFormattedPrice } from 'src/sdk/product/useFormattedPrice'
9
+ import type { ProductSummary_ProductFragment } from '@generated/graphql'
10
10
  import Icon from 'src/components/ui/Icon'
11
- import Price from 'src/components/ui/Price'
12
11
  import { Image } from 'src/components/ui/Image'
13
- import type { ProductSummary_ProductFragment } from '@generated/graphql'
14
-
15
- import styles from './gift.module.scss'
12
+ import Price from 'src/components/ui/Price'
13
+ import { useFormattedPrice } from 'src/sdk/product/useFormattedPrice'
16
14
 
17
15
  export type Props = GiftProps & {
18
16
  /**
@@ -44,11 +42,7 @@ function Gift({
44
42
  } = product
45
43
 
46
44
  return (
47
- <UIGift
48
- className={styles.fsGift}
49
- icon={<Icon name="Tag" width={18} height={18} />}
50
- {...otherProps}
51
- >
45
+ <UIGift icon={<Icon name="Tag" width={18} height={18} />} {...otherProps}>
52
46
  <UIGiftImage>
53
47
  <Image src={img.url} alt={img.alternateName} width={89} height={89} />
54
48
  </UIGiftImage>
@@ -111,30 +111,3 @@ The `ShippingSimulation` component uses [FastStore UI Table](https://www.faststo
111
111
  value="var(--fs-spacing-2)"
112
112
  />
113
113
  </TokenTable>
114
-
115
- ### Table
116
-
117
- <TokenTable>
118
- <TokenRow
119
- token="--fs-shipping-simulation-table-row-bkg-color"
120
- value="var(--fs-color-main-0)"
121
- isColor
122
- />
123
- <TokenRow
124
- token="--fs-shipping-simulation-table-row-even-bkg-color"
125
- value="transparent"
126
- />
127
- <TokenDivider />
128
- <TokenRow
129
- token="--fs-shipping-simulation-table-cell-padding"
130
- value="var(--fs-spacing-2)"
131
- />
132
- <TokenRow
133
- token="--fs-shipping-simulation-table-cell-text-size"
134
- value="var(--fs-text-size-2)"
135
- />
136
- <TokenRow
137
- token="--fs-shipping-simulation-table-cell-border-radius"
138
- value="var(--fs-border-radius)"
139
- />
140
- </TokenTable>