@faststore/core 0.3.16 → 2.0.65-alpha.0
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/.storybook/storybook.css +1 -0
- package/.turbo/turbo-build.log +50 -0
- package/.turbo/turbo-lint.log +2 -0
- package/@generated/graphql/index.ts +27 -3
- package/@generated/graphql/persisted.json +1 -1
- package/CHANGELOG.md +127 -169
- package/README.md +2 -2
- package/cypress/integration/analytics.test.js +4 -4
- package/cypress/integration/cart.test.js +2 -2
- package/cypress/integration/plp.test.js +9 -9
- package/package.json +9 -10
- package/src/Layout.tsx +7 -2
- package/src/components/cart/CartItem/CartItem.tsx +30 -71
- package/src/components/cart/CartSidebar/CartSidebar.stories.mdx +1 -1
- package/src/components/cart/CartSidebar/CartSidebar.tsx +13 -17
- 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/Footer.tsx +5 -38
- package/src/components/common/Footer/FooterFlags.tsx +23 -0
- package/src/components/common/Footer/FooterLinks.tsx +16 -12
- package/src/components/common/Footer/footer.module.scss +2 -28
- package/src/components/common/Footer/index.ts +1 -0
- package/src/components/common/Navbar/NavLinks.stories.mdx +1 -1
- package/src/components/common/Navbar/Navbar.stories.mdx +1 -1
- package/src/components/common/Navbar/Navbar.tsx +1 -1
- package/src/components/common/Navbar/NavbarSlider.stories.mdx +1 -1
- package/src/components/common/Navbar/NavbarSlider.tsx +2 -2
- package/src/components/common/Toast/Toast.tsx +1 -1
- package/src/components/product/ProductCard/ProductCard.tsx +44 -59
- package/src/components/product/ProductGrid/ProductGrid.tsx +7 -1
- package/src/components/regionalization/Regionalization.stories.mdx +24 -6
- package/src/components/regionalization/RegionalizationBar/RegionalizationBar.stories.mdx +1 -1
- package/src/components/regionalization/RegionalizationBar/RegionalizationBar.tsx +1 -1
- package/src/components/regionalization/RegionalizationButton/RegionalizationButton.tsx +1 -1
- package/src/components/regionalization/RegionalizationModal/RegionalizationModal.stories.mdx +17 -4
- package/src/components/regionalization/RegionalizationModal/RegionalizationModal.tsx +4 -5
- package/src/components/regionalization/RegionalizationModal/RegionalizationModalContent.tsx +19 -26
- package/src/components/regionalization/RegionalizationModal/regionalization-modal-body.module.scss +25 -0
- package/src/components/search/Filter/Facets.stories.mdx +10 -10
- package/src/components/search/Filter/Facets.tsx +69 -61
- package/src/components/search/Filter/Filter.stories.mdx +1 -1
- package/src/components/search/Filter/Filter.tsx +1 -1
- package/src/components/search/Filter/FilterSlider.stories.mdx +1 -1
- package/src/components/search/Filter/FilterSlider.tsx +2 -2
- 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/Newsletter/Newsletter.stories.mdx +1 -1
- package/src/components/sections/Newsletter/Newsletter.tsx +1 -1
- package/src/components/sections/ProducDetailsContent/ProductDetailsContent.tsx +146 -146
- package/src/components/sections/ProductDetails/ProductDetails.tsx +4 -4
- package/src/components/sections/ProductGallery/ProductGallery.tsx +18 -18
- package/src/components/sections/ProductShelf/ProductShelf.tsx +10 -2
- package/src/components/sections/ProductTiles/ProductTiles.tsx +2 -2
- package/src/components/skeletons/FilterSkeleton/FilterSkeleton.stories.mdx +1 -1
- package/src/components/skeletons/FilterSkeleton/FilterSkeleton.tsx +20 -8
- package/src/components/skeletons/FilterSkeleton/filter-skeleton.module.scss +2 -2
- package/src/components/skeletons/ProductCardSkeleton/ProductCardSkeleton.stories.mdx +6 -69
- package/src/components/skeletons/ProductCardSkeleton/ProductCardSkeleton.tsx +36 -9
- package/src/components/skeletons/ProductCardSkeleton/product-card-skeleton.module.scss +16 -55
- package/src/components/skeletons/ProductGridSkeleton/ProductGridSkeleton.tsx +3 -1
- package/src/components/skeletons/ProductShelfSkeleton/ProductShelfSkeleton.tsx +3 -1
- package/src/components/skeletons/ProductTilesSkeleton/ProductTileSkeleton/ProductTileSkeleton.tsx +18 -17
- package/src/components/skeletons/ProductTilesSkeleton/ProductTileSkeleton/product-tile-skeleton.module.scss +37 -174
- package/src/components/skeletons/ProductTilesSkeleton/ProductTilesSkeleton.tsx +18 -3
- package/src/components/ui/Breadcrumb/Breadcrumb.tsx +17 -16
- package/src/components/ui/Gift/Gift.tsx +18 -27
- package/src/components/ui/SkuSelector/sku-selector.module.scss +1 -1
- package/src/components/ui/SlideOver/SlideOver.stories.mdx +2 -2
- package/src/components/ui/SlideOver/SlideOver.tsx +1 -0
- package/src/components/ui/Tiles/Tiles.stories.mdx +1 -3
- package/src/components/ui/Tiles/tiles.module.scss +11 -13
- package/src/components/ui/Toast/Toast.stories.mdx +1 -1
- package/src/components/ui/Toast/Toast.tsx +1 -1
- package/src/pages/_app.tsx +1 -1
- package/src/sdk/cart/index.ts +5 -0
- package/src/sdk/cart/useBuyButton.ts +1 -1
- package/src/sdk/cart/useCartToggleButton.ts +1 -1
- package/src/styles/vendors/include-media.scss +1 -1
- package/tsconfig.json +4 -6
- package/.eslintrc.json +0 -3
- package/.github/CODEOWNERS +0 -2
- package/.github/workflows/release.yml +0 -42
- package/.release-it.json +0 -32
- package/src/components/cart/CartItem/cart-item.module.scss +0 -68
- package/src/components/product/ProductCard/product-card.module.scss +0 -254
- package/src/components/regionalization/RegionalizationModal/regionalization-modal-content.module.scss +0 -79
- package/src/components/skeletons/Shimmer/Shimmer.tsx +0 -11
- package/src/components/skeletons/Shimmer/index.ts +0 -1
- package/src/components/skeletons/Shimmer/shimmer.module.scss +0 -43
- package/src/components/skeletons/Skeleton/Skeleton.tsx +0 -49
- package/src/components/skeletons/Skeleton/index.ts +0 -1
- package/src/components/skeletons/Skeleton/skeleton.module.scss +0 -77
- package/src/components/skeletons/Skeletons.stories.mdx +0 -177
- 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/Modal/Modal.stories.mdx +0 -144
- package/src/components/ui/Modal/Modal.tsx +0 -43
- package/src/components/ui/Modal/index.ts +0 -1
- package/src/components/ui/Modal/modal.module.scss +0 -46
- 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/ProductTitle/ProductTitle.stories.mdx +0 -105
- package/src/components/ui/ProductTitle/ProductTitle.tsx +0 -11
- package/src/components/ui/ProductTitle/index.ts +0 -1
- package/src/components/ui/ProductTitle/product-title.module.scss +0 -48
- 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
- package/src/sdk/ui/Provider.tsx +0 -151
- package/src/sdk/ui/useFadeEffect.ts +0 -21
|
@@ -3,14 +3,19 @@ import {
|
|
|
3
3
|
Label as UILabel,
|
|
4
4
|
List as UIList,
|
|
5
5
|
Badge as UIBadge,
|
|
6
|
+
Accordion as UIAccordion,
|
|
7
|
+
AccordionItem as UIAccordionItem,
|
|
8
|
+
AccordionButton as UIAccordionButton,
|
|
9
|
+
AccordionPanel as UIAccordionPanel,
|
|
10
|
+
PriceRange as UIPriceRange,
|
|
6
11
|
} from '@faststore/ui'
|
|
7
12
|
|
|
13
|
+
import { useFormattedPrice } from 'src/sdk/product/useFormattedPrice'
|
|
14
|
+
|
|
8
15
|
import type {
|
|
9
16
|
Filter_FacetsFragment,
|
|
10
17
|
IStoreSelectedFacet,
|
|
11
18
|
} from '@generated/graphql'
|
|
12
|
-
import Accordion, { AccordionItem } from 'src/components/ui/Accordion'
|
|
13
|
-
import PriceRange from 'src/components/ui/PriceRange'
|
|
14
19
|
|
|
15
20
|
import styles from './facets.module.scss'
|
|
16
21
|
|
|
@@ -58,80 +63,83 @@ function Facets({
|
|
|
58
63
|
<h2 className="text__title-mini-alt" data-fs-facets-title>
|
|
59
64
|
Filters
|
|
60
65
|
</h2>
|
|
61
|
-
<
|
|
62
|
-
|
|
66
|
+
<UIAccordion
|
|
67
|
+
indices={indicesExpanded}
|
|
63
68
|
onChange={onAccordionChange}
|
|
64
69
|
data-fs-facets-accordion
|
|
65
70
|
>
|
|
66
71
|
{facets.map((facet, index) => {
|
|
67
72
|
const isExpanded = indicesExpanded.has(index)
|
|
68
73
|
const { __typename: type, label } = facet
|
|
69
|
-
|
|
70
74
|
return (
|
|
71
|
-
<
|
|
75
|
+
<UIAccordionItem
|
|
72
76
|
key={`${label}-${index}`}
|
|
73
77
|
prefixId={testId}
|
|
74
78
|
testId={`${testId}-accordion`}
|
|
75
|
-
isExpanded={isExpanded}
|
|
76
|
-
buttonLabel={label}
|
|
77
79
|
data-type={type}
|
|
78
80
|
data-fs-facets-accordion-item
|
|
79
81
|
>
|
|
80
|
-
{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
82
|
+
<UIAccordionButton testId={`${testId}-accordion-button`}>
|
|
83
|
+
{label}
|
|
84
|
+
</UIAccordionButton>
|
|
85
|
+
<UIAccordionPanel>
|
|
86
|
+
{type === 'StoreFacetBoolean' && isExpanded && (
|
|
87
|
+
<UIList data-fs-facets-list>
|
|
88
|
+
{facet.values.map((item) => {
|
|
89
|
+
const id = `${testId}-${facet.label}-${item.label}`
|
|
90
|
+
return (
|
|
91
|
+
<li key={id} data-fs-facets-list-item>
|
|
92
|
+
<UICheckbox
|
|
93
|
+
id={id}
|
|
94
|
+
checked={item.selected}
|
|
95
|
+
onChange={() =>
|
|
96
|
+
onFacetChange(
|
|
97
|
+
{ key: facet.key, value: item.value },
|
|
98
|
+
'BOOLEAN'
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
data-fs-facets-list-item-checkbox
|
|
102
|
+
data-testid={`${testId}-accordion-panel-checkbox`}
|
|
103
|
+
data-value={item.value}
|
|
104
|
+
data-quantity={item.quantity}
|
|
105
|
+
/>
|
|
106
|
+
<UILabel
|
|
107
|
+
htmlFor={id}
|
|
108
|
+
className="text__title-mini-alt"
|
|
109
|
+
data-fs-facets-list-item-label
|
|
110
|
+
>
|
|
111
|
+
{item.label}{' '}
|
|
112
|
+
<UIBadge data-fs-facets-list-item-badge>
|
|
113
|
+
{item.quantity}
|
|
114
|
+
</UIBadge>
|
|
115
|
+
</UILabel>
|
|
116
|
+
</li>
|
|
117
|
+
)
|
|
118
|
+
})}
|
|
119
|
+
</UIList>
|
|
120
|
+
)}
|
|
121
|
+
{type === 'StoreFacetRange' && isExpanded && (
|
|
122
|
+
<UIPriceRange
|
|
123
|
+
min={facet.min}
|
|
124
|
+
max={facet.max}
|
|
125
|
+
formatter={useFormattedPrice}
|
|
126
|
+
step={1}
|
|
127
|
+
onEnd={(v) =>
|
|
128
|
+
onFacetChange(
|
|
129
|
+
{
|
|
130
|
+
key: facet.key,
|
|
131
|
+
value: formatRange(v.min, v.max),
|
|
132
|
+
},
|
|
133
|
+
'RANGE'
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
/>
|
|
137
|
+
)}
|
|
138
|
+
</UIAccordionPanel>
|
|
139
|
+
</UIAccordionItem>
|
|
132
140
|
)
|
|
133
141
|
})}
|
|
134
|
-
</
|
|
142
|
+
</UIAccordion>
|
|
135
143
|
</div>
|
|
136
144
|
)
|
|
137
145
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SearchProvider } from '@faststore/sdk'
|
|
2
2
|
import { useSearch } from '@faststore/sdk'
|
|
3
3
|
|
|
4
|
-
import UIProvider,
|
|
4
|
+
import { UIProvider, useUI } from '@faststore/ui'
|
|
5
5
|
import { validateSession } from 'src/sdk/session'
|
|
6
6
|
import { useFilter } from './useFilter'
|
|
7
7
|
|
|
@@ -2,7 +2,7 @@ import { gql } from '@faststore/graphql-utils'
|
|
|
2
2
|
import { setFacet, toggleFacet, useSearch } from '@faststore/sdk'
|
|
3
3
|
|
|
4
4
|
import type { Filter_FacetsFragment } from '@generated/graphql'
|
|
5
|
-
import { useUI } from '
|
|
5
|
+
import { useUI } from '@faststore/ui'
|
|
6
6
|
|
|
7
7
|
import Facets from './Facets'
|
|
8
8
|
import FilterSlider from './FilterSlider'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SearchProvider } from '@faststore/sdk'
|
|
2
2
|
import { useSearch } from '@faststore/sdk'
|
|
3
3
|
|
|
4
|
-
import UIProvider,
|
|
4
|
+
import { UIProvider, useUI } from '@faststore/ui'
|
|
5
5
|
import { validateSession } from 'src/sdk/session'
|
|
6
6
|
import { useFilter } from './useFilter'
|
|
7
7
|
|
|
@@ -4,8 +4,8 @@ import { Button as UIButton, IconButton as UIIconButton } from '@faststore/ui'
|
|
|
4
4
|
import type { Filter_FacetsFragment } from '@generated/graphql'
|
|
5
5
|
import Icon from 'src/components/ui/Icon'
|
|
6
6
|
import SlideOver from 'src/components/ui/SlideOver'
|
|
7
|
-
import { useUI } from '
|
|
8
|
-
import { useFadeEffect } from '
|
|
7
|
+
import { useUI } from '@faststore/ui'
|
|
8
|
+
import { useFadeEffect } from '@faststore/ui'
|
|
9
9
|
|
|
10
10
|
import Facets from './Facets'
|
|
11
11
|
import styles from './filter-slider.module.scss'
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
--fs-facets-accordion-border-radius-notebook : var(--fs-border-radius);
|
|
16
16
|
|
|
17
17
|
// Accordion Item Button
|
|
18
|
-
--fs-facets-accordion-
|
|
19
|
-
--fs-facets-accordion-
|
|
20
|
-
--fs-facets-accordion-
|
|
21
|
-
--fs-facets-accordion-
|
|
22
|
-
--fs-facets-accordion-
|
|
18
|
+
--fs-facets-accordion-button-text-size : var(--fs-text-size-lead);
|
|
19
|
+
--fs-facets-accordion-button-text-weight : var(--fs-text-weight-regular);
|
|
20
|
+
--fs-facets-accordion-button-line-height : 1.5;
|
|
21
|
+
--fs-facets-accordion-button-padding-right-notebook : var(--fs-spacing-4);
|
|
22
|
+
--fs-facets-accordion-button-padding-left-notebook : var(--fs-facets-accordion-button-padding-right-notebook);
|
|
23
23
|
|
|
24
|
-
--fs-facets-accordion-
|
|
25
|
-
--fs-facets-accordion-
|
|
24
|
+
--fs-facets-accordion-button-text-weight-notebook : var(--fs-text-size-2);
|
|
25
|
+
--fs-facets-accordion-button-line-height-notebook : 1.25;
|
|
26
26
|
|
|
27
27
|
// Accordion Item Panel
|
|
28
28
|
--fs-facets-accordion-item-panel-padding-right-notebook : var(--fs-spacing-4);
|
|
@@ -64,20 +64,20 @@
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
[data-fs-facets-accordion-item] {
|
|
67
|
-
[data-fs-accordion-
|
|
68
|
-
font-size: var(--fs-facets-accordion-
|
|
69
|
-
font-weight: var(--fs-facets-accordion-
|
|
70
|
-
line-height: var(--fs-facets-accordion-
|
|
67
|
+
[data-fs-accordion-button] {
|
|
68
|
+
font-size: var(--fs-facets-accordion-button-text-size);
|
|
69
|
+
font-weight: var(--fs-facets-accordion-button-text-weight);
|
|
70
|
+
line-height: var(--fs-facets-accordion-button-line-height);
|
|
71
71
|
|
|
72
72
|
@include media(">=notebook") {
|
|
73
|
-
padding-right: var(--fs-facets-accordion-
|
|
74
|
-
padding-left: var(--fs-facets-accordion-
|
|
75
|
-
font-size: var(--fs-facets-accordion-
|
|
76
|
-
line-height: var(--fs-facets-accordion-
|
|
73
|
+
padding-right: var(--fs-facets-accordion-button-padding-right-notebook);
|
|
74
|
+
padding-left: var(--fs-facets-accordion-button-padding-left-notebook);
|
|
75
|
+
font-size: var(--fs-facets-accordion-button-text-weight-notebook);
|
|
76
|
+
line-height: var(--fs-facets-accordion-button-line-height-notebook);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
[data-fs-accordion-
|
|
80
|
+
[data-fs-accordion-panel] {
|
|
81
81
|
@include media(">=notebook") {
|
|
82
82
|
padding-right: var(--fs-facets-accordion-item-panel-padding-right-notebook);
|
|
83
83
|
padding-left: var(--fs-facets-accordion-item-panel-padding-left-notebook);
|
|
@@ -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>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs'
|
|
2
2
|
import { TokenTable, TokenRow } from 'src/../.storybook/components'
|
|
3
3
|
|
|
4
|
-
import UIProvider from '
|
|
4
|
+
import { UIProvider } from '@faststore/ui'
|
|
5
5
|
|
|
6
6
|
import Newsletter from '.'
|
|
7
7
|
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
InputField as UIInputField,
|
|
7
7
|
} from '@faststore/ui'
|
|
8
8
|
|
|
9
|
-
import { useUI } from '
|
|
9
|
+
import { useUI } from '@faststore/ui'
|
|
10
10
|
import Icon from 'src/components/ui/Icon'
|
|
11
11
|
import Link from 'src/components/ui/Link'
|
|
12
12
|
import { useNewsletter } from 'src/sdk/newsletter/useNewsletter'
|