@riosst100/pwa-marketplace 1.5.1 → 1.5.3

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 (40) hide show
  1. package/package.json +1 -1
  2. package/src/components/CollectibleGameSets/collectibleGameSets.js +142 -41
  3. package/src/components/CollectibleGameSets/collectibleGameSets.module.css +38 -0
  4. package/src/components/Dropdown/dropdown.js +77 -0
  5. package/src/components/Dropdown/index.js +10 -0
  6. package/src/components/MtgSinglesPage/index.js +62 -0
  7. package/src/components/MtgSinglesPage/mtgSingles.js +90 -0
  8. package/src/components/MtgSinglesPage/singles.module.css +15 -0
  9. package/src/components/SubCategory/subCategory.js +14 -20
  10. package/src/intercept.js +7 -0
  11. package/src/overwrites/peregrine/lib/talons/RootComponents/Category/categoryContent.gql.js +1 -0
  12. package/src/overwrites/venia-ui/lib/RootComponents/Category/categoryContent.js +44 -30
  13. package/src/overwrites/venia-ui/lib/components/Button/button.module.css +10 -6
  14. package/src/overwrites/venia-ui/lib/components/FilterSidebar/filterSidebar.js +1 -1
  15. package/src/overwrites/venia-ui/lib/components/MegaMenu/customSubmenuColumn.js +4 -3
  16. package/src/overwrites/venia-ui/lib/components/MegaMenu/customSubmenuColumn.module.css +2 -2
  17. package/src/overwrites/venia-ui/lib/components/MegaMenu/megaMenuItem.js +6 -5
  18. package/src/overwrites/venia-ui/lib/components/MegaMenu/shopByColumn.module.css +2 -2
  19. package/src/overwrites/venia-ui/lib/components/MegaMenu/submenu.js +11 -2
  20. package/src/overwrites/venia-ui/lib/components/MegaMenu/submenu.module.css +4 -6
  21. package/src/overwrites/venia-ui/lib/components/MegaMenu/submenuColumn.js +10 -19
  22. package/src/overwrites/venia-ui/lib/components/MegaMenu/submenuColumn.module.css +2 -2
  23. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/CustomAttributes/customAttributes.js +2 -1
  24. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/CustomAttributes/customAttributes.module.css +6 -7
  25. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/components/auctionDetail.js +173 -0
  26. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/components/bidList.js +67 -0
  27. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/components/modalFormReview.js +164 -0
  28. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/components/preOrderDetail.js +52 -0
  29. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/components/productReview.js +45 -37
  30. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/components/starInput.js +33 -0
  31. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/productFullDetail.js +86 -22
  32. package/src/overwrites/venia-ui/lib/components/SearchBar/autocomplete.js +5 -1
  33. package/src/overwrites/venia-ui/lib/components/SearchBar/autocomplete.module.css +5 -6
  34. package/src/overwrites/venia-ui/lib/components/SearchBar/searchBar.js +27 -1
  35. package/src/overwrites/venia-ui/lib/components/SearchBar/searchBar.module.css +0 -1
  36. package/src/overwrites/venia-ui/lib/components/SearchBar/searchField.js +9 -2
  37. package/src/overwrites/venia-ui/lib/components/TextInput/field.module.css +4 -3
  38. package/src/overwrites/venia-ui/lib/components/TextInput/textInput.js +10 -2
  39. package/src/overwrites/venia-ui/lib/components/TextInput/textInput.module.css +1 -1
  40. package/src/talons/CollectibleGameSets/useCollectibleGameSets.js +4 -2
@@ -0,0 +1,164 @@
1
+ import React, { useState } from 'react';
2
+ import Modal from '@riosst100/pwa-marketplace/src/components/Modal';
3
+ import { X } from 'react-feather';
4
+ import Field from '@magento/venia-ui/lib/components/Field';
5
+ import TextInput from '@magento/venia-ui/lib/components/TextInput';
6
+ import Button from '@magento/venia-ui/lib/components/Button';
7
+ import { isRequired } from '@magento/venia-ui/lib/util/formValidators';
8
+ import { Form } from 'informed';
9
+ import StarRating from './starInput';
10
+
11
+ import { primary900 } from '@riosst100/pwa-marketplace/src/theme/vars';
12
+
13
+ const modalFormReview = (props) => {
14
+
15
+ const { open, setOpen } = props;
16
+ const [currentRating, setCurrentRating] = useState(0);
17
+
18
+ const handleRatingChange = (newRating) => {
19
+ setCurrentRating(newRating);
20
+ };
21
+
22
+
23
+ return (
24
+ <>
25
+ <Modal
26
+ open={open}
27
+ className="modal_form_review !p-[30px] md_min-w-[650px]"
28
+ >
29
+ <div className='form_review-container'>
30
+ <div className='header_title-modal flex justify-between mb-10'>
31
+ <div className='text-lg text-black font-semibold'>
32
+ Write Review
33
+ </div>
34
+ <button onClick={() => { setOpen(!open) }} >
35
+ <X size={24} color={primary900} />
36
+ </button>
37
+ </div>
38
+
39
+ <Form
40
+ data-cy="form_review"
41
+ className="flex flex-col gap-y-6"
42
+ initialValues={{}}
43
+ onSubmit={() => { }}
44
+ onChange={() => { }}
45
+ >
46
+ <Field
47
+ id="nickname_field"
48
+ label={'Nickname'}
49
+ >
50
+ <TextInput
51
+ id="nickname"
52
+ field="nickname"
53
+ validate={isRequired}
54
+ validateOnBlur
55
+ mask={value => value && value.trim()}
56
+ maskOnBlur={true}
57
+ data-cy="nickname"
58
+ aria-label={'nickname'}
59
+ placeholder={'e.g John Doe'}
60
+ />
61
+ </Field>
62
+
63
+ <Field
64
+ id="rating_field"
65
+ label={'Rating'}
66
+ >
67
+ <StarRating rating={currentRating} onRatingChange={handleRatingChange} />
68
+ </Field>
69
+
70
+ <Field
71
+ id="summary_field"
72
+ label={'Summary'}
73
+ >
74
+ <TextInput
75
+ id="summary"
76
+ field="summary"
77
+ validate={isRequired}
78
+ validateOnBlur
79
+ mask={value => value && value.trim()}
80
+ maskOnBlur={true}
81
+ data-cy="summary"
82
+ aria-label={'summary'}
83
+ placeholder={'Summary of your rating'}
84
+ />
85
+ </Field>
86
+
87
+ <Field
88
+ id="review_field"
89
+ label={'Review'}
90
+ >
91
+ <TextInput
92
+ id="review"
93
+ field="review"
94
+ validate={isRequired}
95
+ validateOnBlur
96
+ mask={value => value && value.trim()}
97
+ maskOnBlur={true}
98
+ data-cy="review"
99
+ aria-label={'review'}
100
+ placeholder={'Let us know your thougts'}
101
+ />
102
+ </Field>
103
+
104
+ <Field
105
+ id="like_reason_field"
106
+ label={'I like about'}
107
+ >
108
+ <TextInput
109
+ id="like_reason"
110
+ field="like_reason"
111
+ validate={isRequired}
112
+ validateOnBlur
113
+ mask={value => value && value.trim()}
114
+ maskOnBlur={true}
115
+ data-cy="like_reason"
116
+ aria-label={'like_reason'}
117
+ placeholder={'Summary of your rating'}
118
+ />
119
+ </Field>
120
+
121
+ <Field
122
+ id="dont_like_reason_field"
123
+ label={"I dont't like about"}
124
+ >
125
+ <TextInput
126
+ id="dont_like_reason"
127
+ field="dont_like_reason"
128
+ validate={isRequired}
129
+ validateOnBlur
130
+ mask={value => value && value.trim()}
131
+ maskOnBlur={true}
132
+ data-cy="dont_like_reason"
133
+ aria-label={'dont_like_reason'}
134
+ placeholder={'Summary of your rating'}
135
+ />
136
+ </Field>
137
+
138
+ <div className='actions flex justify-end gap-x-2.5 mt-4'>
139
+ <Button
140
+ priority='low'
141
+ classes={{
142
+ content: 'capitalize text-[16px] font-semibold'
143
+ }}
144
+ onClick={() => setOpen(false)}
145
+ >
146
+ Cancel
147
+ </Button>
148
+ <Button
149
+ priority='high'
150
+ classes={{
151
+ content: 'capitalize text-[16px] font-semibold'
152
+ }}
153
+ >
154
+ Submit Review
155
+ </Button>
156
+ </div>
157
+ </Form>
158
+ </div>
159
+ </Modal>
160
+ </>
161
+ )
162
+ }
163
+
164
+ export default modalFormReview
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ import cn from 'classnames';
3
+ import Divider from '@riosst100/pwa-marketplace/src/components/Divider';
4
+
5
+ const preOrderInfo = (props) => {
6
+ const { className } = props
7
+ return (
8
+ <>
9
+ <div
10
+ className={cn(
11
+ 'flex flex-col border border-gray-100 rounded-lg p-5 gap-2.5',
12
+ className
13
+ )}
14
+ >
15
+ <div className='flex flex-row justify-between'>
16
+ <div className='flex flex-col gap-2.5'>
17
+ <div className='text-[14px] font-medium text-gray-500'>
18
+ Release Date
19
+ </div>
20
+ <div className='text-[16px] font-semibold text-colorDefault text-center'>
21
+ 27, February 2024
22
+ </div>
23
+ </div>
24
+ <Divider className="w-[1px] h-[50px]" />
25
+ <div className='flex flex-col gap-2.5'>
26
+ <div className='text-[14px] font-medium text-gray-500'>
27
+ Last Date
28
+ </div>
29
+ <div className='text-[16px] font-semibold text-colorDefault text-center'>
30
+ 31, March 2024
31
+ </div>
32
+ </div>
33
+ <Divider className="w-[1px] h-[50px]" />
34
+ <div className='flex flex-col gap-2.5'>
35
+ <div className='text-[14px] font-medium text-gray-500'>
36
+ Deposite
37
+ </div>
38
+ <div className='text-[16px] font-semibold text-colorDefault text-center'>
39
+ 40%
40
+ </div>
41
+ </div>
42
+ </div>
43
+
44
+ <p>
45
+ Notes : Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh viverra non semper suscipit posuere a pede.
46
+ </p>
47
+ </div>
48
+ </>
49
+ )
50
+ }
51
+
52
+ export default preOrderInfo
@@ -1,54 +1,62 @@
1
- import React from 'react'
1
+ import React, { useState } from 'react'
2
2
  import Review from '@riosst100/pwa-marketplace/src/components/SellerReviewItem';
3
3
  import { Star1 } from 'iconsax-react';
4
4
  import Button from '../../Button';
5
+ import ModalFormReview from './modalFormReview';
5
6
 
6
7
  const productReview = (props) => {
7
8
 
8
9
  const { className } = props;
9
10
 
11
+ const [open, setOpen] = useState(false);
12
+
10
13
  return (
11
- <div className={className}>
12
- <div className='review-summary flex justify-between mb-[30px] pb-[30px] border-b border-gray-100'>
13
- <div className="justify-start items-end gap-[15px] inline-flex">
14
- <div className="text-center text-zinc-900 text-[40px] font-semibold leading-10">4.7</div>
15
- <div className="flex-col justify-start items-start gap-[9px] inline-flex">
16
- <div className="justify-start items-start gap-1.5 inline-flex">
17
- <div className="w-3.5 h-3.5 relative">
18
- <Star1 color='#F7C317' size={14} className='fill-[#F7C317]' />
19
- </div>
20
- <div className="w-3.5 h-3.5 relative">
21
- <Star1 color='#F7C317' size={14} className='fill-[#F7C317]' />
22
- </div>
23
- <div className="w-3.5 h-3.5 relative">
24
- <Star1 color='#F7C317' size={14} className='fill-[#F7C317]' />
25
- </div>
26
- <div className="w-3.5 h-3.5 relative">
27
- <Star1 color='#F7C317' size={14} className='fill-[#F7C317]' />
28
- </div>
29
- <div className="w-3.5 h-3.5 relative">
30
- <Star1 color='#D9D9D9' size={14} className='fill-[#D9D9D9]' />
14
+ <>
15
+ <ModalFormReview open={open} setOpen={setOpen} />
16
+ <div className={className}>
17
+ <div className='review-summary flex justify-between mb-[30px] pb-[30px] border-b border-gray-100'>
18
+ <div className="justify-start items-end gap-[15px] inline-flex">
19
+ <div className="text-center text-zinc-900 text-[40px] font-semibold leading-10">4.7</div>
20
+ <div className="flex-col justify-start items-start gap-[9px] inline-flex">
21
+ <div className="justify-start items-start gap-1.5 inline-flex">
22
+ <div className="w-3.5 h-3.5 relative">
23
+ <Star1 color='#F7C317' size={14} className='fill-[#F7C317]' />
24
+ </div>
25
+ <div className="w-3.5 h-3.5 relative">
26
+ <Star1 color='#F7C317' size={14} className='fill-[#F7C317]' />
27
+ </div>
28
+ <div className="w-3.5 h-3.5 relative">
29
+ <Star1 color='#F7C317' size={14} className='fill-[#F7C317]' />
30
+ </div>
31
+ <div className="w-3.5 h-3.5 relative">
32
+ <Star1 color='#F7C317' size={14} className='fill-[#F7C317]' />
33
+ </div>
34
+ <div className="w-3.5 h-3.5 relative">
35
+ <Star1 color='#D9D9D9' size={14} className='fill-[#D9D9D9]' />
36
+ </div>
31
37
  </div>
38
+ <div className="text-center text-zinc-900 text-sm font-normal leading-[18px]">(26 Reviews)</div>
32
39
  </div>
33
- <div className="text-center text-zinc-900 text-sm font-normal leading-[18px]">(26 Reviews)</div>
34
40
  </div>
41
+ <Button
42
+ priority='low'
43
+ classes={{
44
+ content: 'normal-case font-normal text-base'
45
+ }}
46
+ onClick={() => setOpen(true)}
47
+ >
48
+ Write a review
49
+ </Button>
50
+ </div>
51
+ <div className='review-list flex flex-col gap-y-4'>
52
+ <Review />
53
+ <Review />
54
+ <Review />
55
+ <Review />
56
+ <Review />
35
57
  </div>
36
- <Button
37
- classes={{
38
- content: 'normal-case font-normal text-base'
39
- }}
40
- >
41
- Write a review
42
- </Button>
43
- </div>
44
- <div className='review-list flex flex-col gap-y-4'>
45
- <Review />
46
- <Review />
47
- <Review />
48
- <Review />
49
- <Review />
50
58
  </div>
51
- </div>
59
+ </>
52
60
  )
53
61
  }
54
62
 
@@ -0,0 +1,33 @@
1
+ import React, { useState } from 'react';
2
+
3
+ const StarRating = ({ totalStars = 5, rating, onRatingChange }) => {
4
+ const [hover, setHover] = useState(0);
5
+
6
+ const handleClick = (newRating) => {
7
+ onRatingChange(newRating);
8
+ };
9
+
10
+ return (
11
+ <div className="star-rating flex flex-row gap-x-1">
12
+ {[...Array(totalStars)].map((star, index) => {
13
+ const ratingClass = index < (hover || rating) ? 'filled text-yellow-400' : 'empty text-gray-400';
14
+ return (
15
+ <span
16
+ key={index}
17
+ className={`star ${ratingClass}`}
18
+ onMouseEnter={() => setHover(index + 1)}
19
+ onMouseLeave={() => setHover(0)}
20
+ onClick={() => handleClick(index + 1)}
21
+ >
22
+ <svg className={ratingClass} width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
23
+ <path d="M8.00887 2.04754L9.03554 4.10087C9.17554 4.38671 9.54887 4.66087 9.86387 4.71337L11.7247 5.02254C12.9147 5.22087 13.1947 6.08421 12.3372 6.93587L10.8905 8.38254C10.6455 8.62754 10.5114 9.10004 10.5872 9.43837L11.0014 11.2292C11.328 12.6467 10.5755 13.195 9.32137 12.4542L7.5772 11.4217C7.2622 11.235 6.74304 11.235 6.4222 11.4217L4.67804 12.4542C3.4297 13.195 2.67137 12.6409 2.99804 11.2292L3.4122 9.43837C3.48804 9.10004 3.35387 8.62754 3.10887 8.38254L1.6622 6.93587C0.810536 6.08421 1.0847 5.22087 2.2747 5.02254L4.13554 4.71337C4.4447 4.66087 4.81804 4.38671 4.95804 4.10087L5.9847 2.04754C6.5447 0.933372 7.4547 0.933372 8.00887 2.04754Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
24
+ </svg>
25
+
26
+ </span>
27
+ );
28
+ })}
29
+ </div>
30
+ );
31
+ };
32
+
33
+ export default StarRating;
@@ -30,6 +30,8 @@ import Divider from '@riosst100/pwa-marketplace/src/components/Divider';
30
30
  const WishlistButton = React.lazy(() => import('@magento/venia-ui/lib/components/Wishlist/AddToListButton'));
31
31
  const Options = React.lazy(() => import('@magento/venia-ui/lib/components/ProductOptions'));
32
32
  import Share from '@riosst100/pwa-marketplace/src/components/SocialMediaShare';
33
+ import PreorderDetail from './components/preOrderDetail';
34
+ import AuctionDetail from './components/auctionDetail';
33
35
 
34
36
  // Correlate a GQL error message to a field. GQL could return a longer error
35
37
  // string but it may contain contextual info such as product id. We can use
@@ -195,7 +197,52 @@ const ProductFullDetail = props => {
195
197
  );
196
198
  // Error message for screen reader
197
199
  const cartActionContent = isSupportedProductType ? (
198
- <section className={classes.actButton}>
200
+ <section className={cn(classes.actButton, 'flex gap-x-[30px]')}>
201
+
202
+ <Button
203
+ data-cy="ProductFullDetail-addToCartButton"
204
+ disabled={isAddToCartDisabled}
205
+ aria-disabled={isAddToCartDisabled}
206
+ aria-label={
207
+ isEverythingOutOfStock
208
+ ? formatMessage({
209
+ id: 'productFullDetail.outOfStockProduct',
210
+ defaultMessage:
211
+ 'This item is currently out of stock'
212
+ })
213
+ : ''
214
+ }
215
+ classes={{
216
+ content: 'normal-case font-semibold text-[16px]'
217
+ }}
218
+ priority="low"
219
+ type="submit"
220
+ >
221
+ Buy Now
222
+ </Button>
223
+
224
+ <Button
225
+ data-cy="ProductFullDetail-addToCartButton"
226
+ disabled={isAddToCartDisabled}
227
+ aria-disabled={isAddToCartDisabled}
228
+ aria-label={
229
+ isEverythingOutOfStock
230
+ ? formatMessage({
231
+ id: 'productFullDetail.outOfStockProduct',
232
+ defaultMessage:
233
+ 'This item is currently out of stock'
234
+ })
235
+ : ''
236
+ }
237
+ classes={{
238
+ content: 'normal-case font-semibold text-[16px]'
239
+ }}
240
+ priority="low"
241
+ type="submit"
242
+ >
243
+ Make An Offer
244
+ </Button>
245
+
199
246
  <Button
200
247
  data-cy="ProductFullDetail-addToCartButton"
201
248
  disabled={isAddToCartDisabled}
@@ -210,7 +257,7 @@ const ProductFullDetail = props => {
210
257
  : ''
211
258
  }
212
259
  classes={{
213
- content: 'normal-case font-normal text-base'
260
+ content: 'normal-case font-semibold text-[16px]'
214
261
  }}
215
262
  priority="high"
216
263
  type="submit"
@@ -334,9 +381,17 @@ const ProductFullDetail = props => {
334
381
 
335
382
  const ProductFAQ = () => (
336
383
  <div className={cn(contentContainerClass)}>
337
- <p>
338
- Frequently Ask Question
339
- </p>
384
+ {customAttributesList.map((data, index) => {
385
+ if (data.code == "faq") {
386
+ return (
387
+ <RichText
388
+ rootClassName="px-0"
389
+ content={data.value}
390
+ />
391
+ );
392
+ }
393
+ })}
394
+
340
395
  </div>
341
396
  )
342
397
 
@@ -390,7 +445,7 @@ const ProductFullDetail = props => {
390
445
  >
391
446
  <section className={classes.leftContainer}>
392
447
  <Carousel images={mediaGalleryEntries} />
393
- <div className='product_group-actions flex gap-x-[18px] gap-y-4 justify-center items-center'>
448
+ <div className='product_group-actions flex gap-x-[18px] gap-y-4 justify-center items-center mt-5'>
394
449
  <Suspense fallback={null}>
395
450
  <WishlistButton
396
451
  classes={{
@@ -456,24 +511,33 @@ const ProductFullDetail = props => {
456
511
  <div
457
512
  className={cn(
458
513
  'product_price_container',
459
- 'py-[30px]'
514
+ 'py-[30px] flex justify-between flex-wrap gap-y-5'
460
515
  )}
461
516
  >
462
- <p
463
- data-cy="ProductFullDetail-productPrice"
464
- className={cn(
465
- classes.productPrice,
466
- 'text-[32px] font-semibold leading-[32px] mb-[15px]',
467
- )}
468
- >
469
- <Price
470
- currencyCode={productDetails.price.currency}
471
- value={productDetails.price.value}
472
- />
473
- </p>
474
- <small className='shipping-calculation-notes text-gray-200 text-xs'>
475
- Shipping method is calculated on checkout
476
- </small>
517
+ <div className='flex flex-col gap-y-5 max-w-[448px]'>
518
+ <p
519
+ data-cy="ProductFullDetail-productPrice"
520
+ className={cn(
521
+ classes.productPrice,
522
+ 'text-[32px] font-semibold leading-[32px] mb-0',
523
+ )}
524
+ >
525
+ <Price
526
+ currencyCode={productDetails.price.currency}
527
+ value={productDetails.price.value}
528
+ />
529
+ </p>
530
+ <AuctionDetail className="auction_detail-container" />
531
+ <PreorderDetail className={'preorder_detail-container'} />
532
+ <small className='shipping-calculation-notes text-gray-200 text-xs'>
533
+ Shipping method is calculated on checkout
534
+ </small>
535
+ </div>
536
+ <div>
537
+ <p className='text-gray-200 text-[14px]'>
538
+ SKU : {productDetails.sku}
539
+ </p>
540
+ </div>
477
541
  </div>
478
542
  <Divider />
479
543
  <FormError
@@ -7,6 +7,7 @@ import { useIntl } from 'react-intl';
7
7
  import defaultClasses from './autocomplete.module.css';
8
8
  import { useStyle } from '@magento/venia-ui/lib/classify';
9
9
  import Suggestions from './suggestions';
10
+ import cn from 'classnames';
10
11
 
11
12
  const GET_AUTOCOMPLETE_RESULTS = gql`
12
13
  query getAutocompleteResults($inputText: String!) {
@@ -136,7 +137,10 @@ const Autocomplete = props => {
136
137
  : messageTpl;
137
138
 
138
139
  return (
139
- <div data-cy="Autocomplete-root" className={rootClassName}>
140
+ <div
141
+ data-cy="Autocomplete-root"
142
+ className={cn(rootClassName)}
143
+ >
140
144
  <label
141
145
  id="search_query"
142
146
  data-cy="Autocomplete-message"
@@ -1,21 +1,20 @@
1
1
  .root {
2
2
  composes: absolute from global;
3
3
  composes: bg-white from global;
4
- composes: border-2 from global;
5
- composes: border-input from global;
4
+ composes: border from global;
5
+ composes: border-gray-100 from global;
6
6
  composes: border-solid from global;
7
- composes: border-t-0 from global;
8
7
  composes: gap-3 from global;
9
8
  composes: grid from global;
10
9
  composes: left-0 from global;
11
10
  composes: p-xs from global;
12
11
  composes: right-0 from global;
13
12
  composes: rounded-b-md from global;
14
- composes: rounded-t-none from global;
15
- composes: shadow-inputFocus from global;
13
+ composes: rounded-t-md from global;
16
14
  composes: text-base from global;
17
15
  composes: top-9 from global;
18
16
  composes: z-menu from global;
17
+ composes: mt-3 from global;
19
18
  transition-property: opacity, transform, visibility;
20
19
  }
21
20
 
@@ -59,4 +58,4 @@
59
58
  /* TODO @TW: cannot compose */
60
59
  .suggestions:empty {
61
60
  display: none;
62
- }
61
+ }
@@ -8,6 +8,8 @@ import { useStyle } from '@magento/venia-ui/lib/classify';
8
8
  import Autocomplete from './autocomplete';
9
9
  import SearchField from './searchField';
10
10
  import defaultClasses from './searchBar.module.css';
11
+ import Dropdown from '@riosst100/pwa-marketplace/src/components/Dropdown';
12
+ import cn from 'classnames';
11
13
 
12
14
  const SearchBar = React.forwardRef((props, ref) => {
13
15
  const { isOpen } = props;
@@ -26,6 +28,16 @@ const SearchBar = React.forwardRef((props, ref) => {
26
28
  const classes = useStyle(defaultClasses, props.classes);
27
29
  const rootClassName = isOpen ? classes.root_open : classes.root;
28
30
  const { formatMessage } = useIntl();
31
+
32
+ const options = [
33
+ { value: '2', label: 'Action Figures' },
34
+ { value: '3', label: 'Anime' },
35
+ ];
36
+
37
+ const handleSelect = (option) => {
38
+ console.log('Selected:', option);
39
+ };
40
+
29
41
  return (
30
42
  <div className={rootClassName} data-cy="SearchBar-root" ref={ref}>
31
43
  <div ref={containerRef} className={classes.container}>
@@ -35,7 +47,21 @@ const SearchBar = React.forwardRef((props, ref) => {
35
47
  initialValues={initialValues}
36
48
  onSubmit={handleSubmit}
37
49
  >
38
- <div className={classes.search}>
50
+ <div
51
+ className={cn(
52
+ classes.search,
53
+ 'flex flex-row relative border border-gray-100 rounded-full'
54
+ )}
55
+ >
56
+ <Dropdown
57
+ placeholder="All Category"
58
+ options={options}
59
+ onSelect={handleSelect}
60
+ rootClassName="!static"
61
+ optionsClassName="w-full grid grid-cols-4 !mt-2.5"
62
+ optionItemClassName="hover_bg-white hover_text-blue-400 font-medium"
63
+ className="border-none after_w-[1px] after_h-[18px] after_bg-gray-100 h-10"
64
+ />
39
65
  <SearchField
40
66
  addLabel={formatMessage({
41
67
  id: 'global.clearText',
@@ -38,7 +38,6 @@
38
38
  }
39
39
 
40
40
  .search {
41
- composes: grid from global;
42
41
  composes: relative from global;
43
42
  }
44
43
 
@@ -13,7 +13,13 @@ const SearchField = props => {
13
13
  const handleSearch = () => {
14
14
  }
15
15
  const searchButton =
16
- <Trigger action={handleSearch} addLabel={addLabel}>
16
+ <Trigger
17
+ action={handleSearch}
18
+ addLabel={addLabel}
19
+ classes={{
20
+ root: 'bg-transparent'
21
+ }}
22
+ >
17
23
  <SearchNormal size="18" color="#280135" variant="Outline" />
18
24
  </Trigger>
19
25
 
@@ -27,8 +33,9 @@ const SearchField = props => {
27
33
  onValueChange={onChange}
28
34
  forwardedRef={inputRef}
29
35
  className={{
30
- inputClassName: cn('rounded-full border-[1px] border-gray-100')
36
+ inputClassName: cn('border-none bg-transparent rounded-r-full')
31
37
  }}
38
+ placeholder="Search..."
32
39
  />
33
40
  );
34
41
  };