@sonic-equipment/ui 0.0.61 → 0.0.62
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/dist/index.js
CHANGED
|
@@ -7584,10 +7584,10 @@ function AlgoliaSortBy() {
|
|
|
7584
7584
|
|
|
7585
7585
|
var styles$i = {"category-card":"category-card-module-4NUjH","title":"category-card-module-LEhh3","arrow":"category-card-module-hL4-A","is-selected":"category-card-module-vJ7vB","image-container":"category-card-module-oNTrK"};
|
|
7586
7586
|
|
|
7587
|
-
function CategoryCard({ href, image, isSelected = false, title, withArrow = false, }) {
|
|
7587
|
+
function CategoryCard({ href, image, isSelected = false, onClick, title, withArrow = false, }) {
|
|
7588
7588
|
return (jsxs(RouteLink, { className: clsx({
|
|
7589
7589
|
[styles$i['is-selected']]: isSelected,
|
|
7590
|
-
}, styles$i['category-card']), href: href, children: [jsx("div", { className: styles$i['image-container'], children: jsx(Image, { ...image, fit: "contain" }) }), jsxs("p", { className: styles$i.title, children: [jsx("span", { children: title }), withArrow && jsx(GlyphsArrowBoldCapsRightIcon, { className: styles$i.arrow })] })] }));
|
|
7590
|
+
}, styles$i['category-card']), href: href, onClick: onClick, children: [jsx("div", { className: styles$i['image-container'], children: jsx(Image, { ...image, fit: "contain" }) }), jsxs("p", { className: styles$i.title, children: [jsx("span", { children: title }), withArrow && jsx(GlyphsArrowBoldCapsRightIcon, { className: styles$i.arrow })] })] }));
|
|
7591
7591
|
}
|
|
7592
7592
|
|
|
7593
7593
|
const ProductListingPageContext = createContext({
|
|
@@ -8155,12 +8155,12 @@ function ConnectedSearchInput() {
|
|
|
8155
8155
|
|
|
8156
8156
|
var styles$8 = {"categories-grid":"categories-grid-module-C751R","category":"categories-grid-module-7OZS1"};
|
|
8157
8157
|
|
|
8158
|
-
function CategoriesGrid({ categories }) {
|
|
8158
|
+
function CategoriesGrid({ categories, onItemClick, }) {
|
|
8159
8159
|
return (jsx("div", { className: styles$8['categories-grid'], children: categories.map(category => (jsx("div", { className: styles$8['category'], children: jsx(CategoryCard, { withArrow: true, href: category.href, image: {
|
|
8160
8160
|
fit: 'contain',
|
|
8161
8161
|
image: category.image,
|
|
8162
8162
|
title: category.title,
|
|
8163
|
-
}, title: category.title }, category.title) }, category.title))) }));
|
|
8163
|
+
}, onClick: onItemClick, title: category.title }, category.title) }, category.title))) }));
|
|
8164
8164
|
}
|
|
8165
8165
|
|
|
8166
8166
|
var styles$7 = {"search-section":"search-section-module-qaTiw","header":"search-section-module-E--U2","title":"search-section-module-AHlDR","content":"search-section-module-VZlvZ"};
|
|
@@ -8186,10 +8186,11 @@ function NotFound() {
|
|
|
8186
8186
|
function PopularCategoriesSection() {
|
|
8187
8187
|
const { popularCategories: collection } = useAlgoliaSearch();
|
|
8188
8188
|
const t = useFormattedMessage();
|
|
8189
|
+
const { close } = useGlobalSearchDisclosure();
|
|
8189
8190
|
if (!collection)
|
|
8190
8191
|
return null;
|
|
8191
8192
|
const { items } = collection;
|
|
8192
|
-
return (jsx(SearchSection, { title: t('Explore by categories'), children: jsx("div", { className: styles$6['categories-grid-container'], children: jsx(CategoriesGrid, { categories: items }) }) }));
|
|
8193
|
+
return (jsx(SearchSection, { title: t('Explore by categories'), children: jsx("div", { className: styles$6['categories-grid-container'], children: jsx(CategoriesGrid, { categories: items, onItemClick: close }) }) }));
|
|
8193
8194
|
}
|
|
8194
8195
|
|
|
8195
8196
|
function Highlight({ attribute, hit, tagName = 'mark', }) {
|
|
@@ -8245,11 +8246,12 @@ function RecentSearchesSection() {
|
|
|
8245
8246
|
}
|
|
8246
8247
|
function QuickAccessSection() {
|
|
8247
8248
|
const { quickAccess: collection } = useAlgoliaSearch();
|
|
8249
|
+
const { close } = useGlobalSearchDisclosure();
|
|
8248
8250
|
const t = useFormattedMessage();
|
|
8249
8251
|
if (!collection)
|
|
8250
8252
|
return;
|
|
8251
8253
|
const { items } = collection;
|
|
8252
|
-
return (jsx(SearchSection, { title: t('Quick access'), children: jsx("div", { className: styles$3['quick-access-section'], children: jsx(Carousel, { className: styles$3['quick-access-carousel'], hasNavigation: false, hasOverflow: false, navigationButtonsPosition: "center", slides: items.map((item, index) => (jsx(RouteLink, { className: styles$3['quick-access-card'], href: item.action.url, children: jsx(Image, { height: 343, image: item.image, title: item.image.altText, width: 192 }) }, index))), spaceBetween: 16 }) }) }));
|
|
8254
|
+
return (jsx(SearchSection, { title: t('Quick access'), children: jsx("div", { className: styles$3['quick-access-section'], children: jsx(Carousel, { className: styles$3['quick-access-carousel'], hasNavigation: false, hasOverflow: false, navigationButtonsPosition: "center", slides: items.map((item, index) => (jsx(RouteLink, { className: styles$3['quick-access-card'], href: item.action.url, onClick: close, children: jsx(Image, { height: 343, image: item.image, title: item.image.altText, width: 192 }) }, index))), spaceBetween: 16 }) }) }));
|
|
8253
8255
|
}
|
|
8254
8256
|
|
|
8255
8257
|
var styles$2 = {"slide":"product-carousel-module-XVTB1"};
|
|
@@ -3,7 +3,8 @@ export interface CategoryCardProps {
|
|
|
3
3
|
href: string;
|
|
4
4
|
image: ImageSource;
|
|
5
5
|
isSelected?: boolean;
|
|
6
|
+
onClick?: VoidFunction;
|
|
6
7
|
title: string;
|
|
7
8
|
withArrow?: boolean;
|
|
8
9
|
}
|
|
9
|
-
export declare function CategoryCard({ href, image, isSelected, title, withArrow, }: CategoryCardProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function CategoryCard({ href, image, isSelected, onClick, title, withArrow, }: CategoryCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Category } from 'shared/model/category';
|
|
2
2
|
export interface CategoriesGridProps {
|
|
3
3
|
categories: Category[];
|
|
4
|
+
onItemClick?: VoidFunction;
|
|
4
5
|
}
|
|
5
|
-
export declare function CategoriesGrid({ categories }: CategoriesGridProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function CategoriesGrid({ categories, onItemClick, }: CategoriesGridProps): import("react/jsx-runtime").JSX.Element;
|