@faststore/core 0.3.16 → 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.
- package/CHANGELOG.md +22 -0
- package/cypress/integration/analytics.test.js +3 -3
- package/cypress/integration/plp.test.js +1 -1
- package/package.json +4 -4
- package/src/Layout.tsx +6 -1
- package/src/components/cart/CartItem/CartItem.tsx +2 -2
- package/src/components/cart/CartSidebar/CartSidebar.tsx +5 -6
- package/src/components/cart/CartSidebar/cart-sidebar.module.scss +2 -0
- package/src/components/common/Alert/Alert.tsx +6 -22
- package/src/components/common/Footer/Footer.stories.mdx +1 -1
- package/src/components/common/Footer/FooterLinks.tsx +16 -12
- package/src/components/search/Filter/Facets.stories.mdx +9 -9
- package/src/components/search/Filter/Facets.tsx +69 -61
- package/src/components/search/Filter/facets.module.scss +16 -16
- package/src/components/search/Search.stories.mdx +28 -24
- package/src/components/search/SearchDropdown/SearchDropdown.stories.mdx +0 -1
- package/src/components/search/SearchInput/SearchInput.stories.mdx +0 -1
- package/src/components/search/SearchTop/SearchTop.stories.mdx +0 -1
- package/src/components/sections/ProducDetailsContent/ProductDetailsContent.tsx +146 -146
- package/src/components/sections/ProductDetails/ProductDetails.tsx +2 -2
- package/src/components/ui/Breadcrumb/Breadcrumb.tsx +17 -16
- package/src/components/ui/Gift/Gift.tsx +7 -13
- package/src/components/ui/SkuSelector/sku-selector.module.scss +1 -1
- package/tsconfig.json +1 -1
- package/src/components/ui/Accordion/Accordion.stories.mdx +0 -222
- package/src/components/ui/Accordion/Accordion.tsx +0 -39
- package/src/components/ui/Accordion/AccordionItem.stories.mdx +0 -116
- package/src/components/ui/Accordion/AccordionItem.tsx +0 -82
- package/src/components/ui/Accordion/accordion.module.scss +0 -65
- package/src/components/ui/Accordion/index.ts +0 -2
- package/src/components/ui/Alert/Alert.stories.mdx +0 -164
- package/src/components/ui/Alert/Alert.tsx +0 -81
- package/src/components/ui/Alert/alert.module.scss +0 -93
- package/src/components/ui/Alert/index.ts +0 -1
- package/src/components/ui/Dropdown/Dropdown.stories.mdx +0 -232
- package/src/components/ui/Dropdown/Dropdown.tsx +0 -12
- package/src/components/ui/Dropdown/DropdownButton.tsx +0 -20
- package/src/components/ui/Dropdown/DropdownItem.stories.mdx +0 -139
- package/src/components/ui/Dropdown/DropdownItem.tsx +0 -26
- package/src/components/ui/Dropdown/DropdownMenu.stories.mdx +0 -115
- package/src/components/ui/Dropdown/DropdownMenu.tsx +0 -34
- package/src/components/ui/Dropdown/dropdown.module.scss +0 -101
- package/src/components/ui/Dropdown/index.ts +0 -4
- package/src/components/ui/Gift/Gift.stories.mdx +0 -99
- package/src/components/ui/Gift/gift.module.scss +0 -94
- package/src/components/ui/PriceRange/PriceRange.stories.mdx +0 -192
- package/src/components/ui/PriceRange/PriceRange.tsx +0 -140
- package/src/components/ui/PriceRange/index.ts +0 -1
- package/src/components/ui/PriceRange/price-range.module.scss +0 -176
- package/src/components/ui/QuantitySelector/QuantitySelector.stories.mdx +0 -246
- package/src/components/ui/QuantitySelector/QuantitySelector.tsx +0 -103
- package/src/components/ui/QuantitySelector/index.ts +0 -1
- 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
|
-
|
|
100
|
+
Displays a set of navigation links that self-adapts on mobile or
|
|
101
|
+
desktop screens.
|
|
103
102
|
</>
|
|
104
103
|
}
|
|
105
|
-
containerStyle={{ overflowY:
|
|
104
|
+
containerStyle={{ overflowY: 'scroll', alignItems: 'flex-start' }}
|
|
106
105
|
>
|
|
107
|
-
<SearchSuggestions
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
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={{
|
|
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:
|
|
170
|
+
<SearchInput containerStyle={{ width: '100%' }} />
|
|
167
171
|
</SectionItem>
|
|
168
172
|
</SectionList>
|
|
169
173
|
</SearchInputProvider>
|
|
@@ -6,9 +6,12 @@ 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
17
|
import Section from '../Section'
|
|
@@ -100,175 +103,172 @@ function ProductDetailsContent({
|
|
|
100
103
|
|
|
101
104
|
return (
|
|
102
105
|
<Section data-fs-product-details-content>
|
|
103
|
-
<
|
|
104
|
-
|
|
106
|
+
<UIAccordion
|
|
107
|
+
indices={indices}
|
|
105
108
|
onChange={onChange}
|
|
106
109
|
aria-label="Product Details Content"
|
|
107
110
|
>
|
|
108
|
-
<
|
|
111
|
+
<UIAccordionItem
|
|
109
112
|
as="article"
|
|
110
113
|
index={0}
|
|
111
|
-
isExpanded={indices.has(0)}
|
|
112
|
-
buttonLabel={
|
|
113
|
-
<h2 className="text__title-subsection">{labels.description}</h2>
|
|
114
|
-
}
|
|
115
114
|
data-fs-product-details-description
|
|
116
115
|
prefixId="product-details-content"
|
|
117
116
|
>
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
|
124
126
|
as="article"
|
|
125
127
|
index={1}
|
|
126
|
-
isExpanded={indices.has(1)}
|
|
127
|
-
buttonLabel={
|
|
128
|
-
<h2 className="text__title-subsection">{labels.about}</h2>
|
|
129
|
-
}
|
|
130
128
|
data-fs-product-details-about
|
|
131
129
|
prefixId="product-details-content"
|
|
132
130
|
>
|
|
133
|
-
<
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
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
|
|
209
210
|
as="article"
|
|
210
211
|
className="text__body"
|
|
211
212
|
index={2}
|
|
212
|
-
isExpanded={indices.has(2)}
|
|
213
|
-
buttonLabel={
|
|
214
|
-
<h2 className="text__title-subsection">{labels.highlights}</h2>
|
|
215
|
-
}
|
|
216
213
|
data-fs-product-details-highlights
|
|
217
214
|
prefixId="product-details-content"
|
|
218
215
|
>
|
|
219
|
-
<
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
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
|
|
252
253
|
as="article"
|
|
253
254
|
index={3}
|
|
254
|
-
isExpanded={indices.has(3)}
|
|
255
|
-
buttonLabel={
|
|
256
|
-
<h2 className="text__title-subsection">{labels.learnMore}</h2>
|
|
257
|
-
}
|
|
258
255
|
data-fs-product-details-learn-more
|
|
259
256
|
prefixId="product-details-content"
|
|
260
257
|
>
|
|
261
|
-
<
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
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>
|
|
272
272
|
</Section>
|
|
273
273
|
)
|
|
274
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
|
-
<
|
|
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 {
|
|
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
|
-
<
|
|
81
|
-
<
|
|
81
|
+
<UIDropdown>
|
|
82
|
+
<UIDropdownButton data-fs-breadcrumb-dropdown-button size="small">
|
|
82
83
|
<Icon name="DotsThree" width={24} height={24} />
|
|
83
|
-
</
|
|
84
|
-
<
|
|
84
|
+
</UIDropdownButton>
|
|
85
|
+
<UIDropdownMenu data-fs-breadcrumb-dropdown-menu>
|
|
85
86
|
{mediumItems.map(({ item, name }, index) => (
|
|
86
|
-
<
|
|
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
|
-
</
|
|
96
|
+
</UIDropdownItem>
|
|
96
97
|
))}
|
|
97
|
-
</
|
|
98
|
-
</
|
|
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
|
-
|
|
6
|
+
GiftImage as UIGiftImage,
|
|
6
7
|
} from '@faststore/ui'
|
|
7
|
-
import type { GiftProps } from '@faststore/ui'
|
|
8
8
|
|
|
9
|
-
import {
|
|
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
|
|
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>
|
package/tsconfig.json
CHANGED