@sonic-equipment/ui 0.0.27 → 0.0.29
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/algolia/algolia-index-config.d.ts +72 -0
- package/dist/algolia/algolia-provider.d.ts +1 -1
- package/dist/breadcrumbs/breadcrumb.stories.d.ts +2 -2
- package/dist/breadcrumbs/connected-breadcrumb.d.ts +1 -1
- package/dist/cards/category-card/category-card.d.ts +2 -5
- package/dist/cards/product-card/product-card.d.ts +4 -4
- package/dist/cards/product-card/product-card.stories.d.ts +1 -1
- package/dist/carousel/category-carousel/connected-category-carousel.d.ts +1 -0
- package/dist/display/product-price/product-price.d.ts +4 -4
- package/dist/display/product-price/product-price.stories.d.ts +1 -0
- package/dist/global-search/global-search-provider/global-search-provider.d.ts +8 -0
- package/dist/global-search/global-search-provider/use-global-search.d.ts +28 -0
- package/dist/{search/global-search → global-search}/global-search.d.ts +0 -7
- package/dist/{search/global-search → global-search}/global-search.stories.d.ts +3 -0
- package/dist/{search/global-search → global-search}/plugins/products-plugin.d.ts +2 -16
- package/dist/global-search/search-input/connected-search-input.d.ts +1 -0
- package/dist/{search → global-search}/search-input/search-input.d.ts +1 -1
- package/dist/global-search/search-result-panel/panel-content.d.ts +10 -0
- package/dist/global-search/search-result-panel/search-result-panel.d.ts +9 -0
- package/dist/global-search/search-root/search-root.d.ts +1 -0
- package/dist/{search/global-search → global-search}/types.d.ts +1 -0
- package/dist/index.d.ts +82 -63
- package/dist/index.js +955 -255
- package/dist/intl/translation-id.d.ts +1 -1
- package/dist/media/image/image.d.ts +2 -19
- package/dist/overlay-background/overlay-background.d.ts +7 -0
- package/dist/pages/product-listing-page/product-listing-page-data-types.d.ts +20 -0
- package/dist/pages/product-listing-page/product-listing-page-provider/product-listing-page-context.d.ts +9 -0
- package/dist/pages/product-listing-page/product-listing-page-provider/product-listing-page-provider.d.ts +8 -0
- package/dist/pages/product-listing-page/product-listing-page-provider/use-breadcrumb.d.ts +4 -0
- package/dist/pages/product-listing-page/product-listing-page-provider/use-subcategories.d.ts +4 -0
- package/dist/pages/product-listing-page/product-listing-page.d.ts +5 -3
- package/dist/pages/product-listing-page/product-listing-page.stories.d.ts +7 -10
- package/dist/pages/product-listing-page/use-fetch-product-listing-page/product-listing-page-data-response.d.ts +48 -0
- package/dist/pages/product-listing-page/use-fetch-product-listing-page/use-fetch-product-listing-page-data.d.ts +2 -0
- package/dist/pages/product-listing-page/use-fetch-product-listing-page/use-fetch-product-listing-page-data.stories.d.ts +20 -0
- package/dist/shared/fetch/ResponseError.d.ts +9 -0
- package/dist/shared/hooks/use-scroll-to.d.ts +1 -0
- package/dist/shared/types/category.d.ts +6 -0
- package/dist/shared/types/image.d.ts +20 -0
- package/dist/shared/types/price.d.ts +3 -3
- package/dist/shared/types/product.d.ts +34 -2
- package/dist/shared/utils/environment.d.ts +3 -0
- package/dist/styles.css +168 -4
- package/package.json +32 -26
- package/dist/search/global-search/clear-icon.d.ts +0 -2
- package/dist/search/global-search/search-icon.d.ts +0 -2
- package/dist/shared/providers/breadcrumb-provider.d.ts +0 -11
- /package/dist/{search/global-search → global-search}/plugins/categories-plugin.d.ts +0 -0
- /package/dist/{search/global-search → global-search}/plugins/popular-categories-plugin.d.ts +0 -0
- /package/dist/{search/global-search → global-search}/plugins/popular-searches-plugin.d.ts +0 -0
- /package/dist/{search/global-search → global-search}/plugins/query-suggestions-plugin.d.ts +0 -0
- /package/dist/{search/global-search → global-search}/plugins/quick-access-plugin.d.ts +0 -0
- /package/dist/{search/global-search → global-search}/plugins/recent-searches-plugin.d.ts +0 -0
- /package/dist/{search/global-search → global-search/search-highlight}/highlight.d.ts +0 -0
- /package/dist/{search → global-search}/search-input/search-input.stories.d.ts +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export interface Indexes {
|
|
2
|
+
default: string;
|
|
3
|
+
sort: {
|
|
4
|
+
index: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}[];
|
|
7
|
+
}
|
|
8
|
+
export declare const algoliaIndexesPerEnvironment: {
|
|
9
|
+
readonly production: {
|
|
10
|
+
readonly default: "prod_sonic_products_en";
|
|
11
|
+
readonly sort: [{
|
|
12
|
+
readonly index: "prod_sonic_products_en";
|
|
13
|
+
readonly name: "relevance";
|
|
14
|
+
}, {
|
|
15
|
+
readonly index: "prod_sonic_products_en_is-new_desc";
|
|
16
|
+
readonly name: "newest";
|
|
17
|
+
}, {
|
|
18
|
+
readonly index: "prod_sonic_products_en_price_asc";
|
|
19
|
+
readonly name: "price_asc";
|
|
20
|
+
}, {
|
|
21
|
+
readonly index: "prod_sonic_products_en_price_desc";
|
|
22
|
+
readonly name: "price_desc";
|
|
23
|
+
}];
|
|
24
|
+
};
|
|
25
|
+
readonly sandbox: {
|
|
26
|
+
readonly default: "dev_sonic_products_en";
|
|
27
|
+
readonly sort: [{
|
|
28
|
+
readonly index: "dev_sonic_products_en";
|
|
29
|
+
readonly name: "relevance";
|
|
30
|
+
}, {
|
|
31
|
+
readonly index: "dev_sonic_products_en_is-new_desc";
|
|
32
|
+
readonly name: "newest";
|
|
33
|
+
}, {
|
|
34
|
+
readonly index: "dev_sonic_products_en_price_asc";
|
|
35
|
+
readonly name: "price_asc";
|
|
36
|
+
}, {
|
|
37
|
+
readonly index: "dev_sonic_products_en_price_desc";
|
|
38
|
+
readonly name: "price_desc";
|
|
39
|
+
}];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export declare const currentIndexes: {
|
|
43
|
+
readonly default: "prod_sonic_products_en";
|
|
44
|
+
readonly sort: [{
|
|
45
|
+
readonly index: "prod_sonic_products_en";
|
|
46
|
+
readonly name: "relevance";
|
|
47
|
+
}, {
|
|
48
|
+
readonly index: "prod_sonic_products_en_is-new_desc";
|
|
49
|
+
readonly name: "newest";
|
|
50
|
+
}, {
|
|
51
|
+
readonly index: "prod_sonic_products_en_price_asc";
|
|
52
|
+
readonly name: "price_asc";
|
|
53
|
+
}, {
|
|
54
|
+
readonly index: "prod_sonic_products_en_price_desc";
|
|
55
|
+
readonly name: "price_desc";
|
|
56
|
+
}];
|
|
57
|
+
} | {
|
|
58
|
+
readonly default: "dev_sonic_products_en";
|
|
59
|
+
readonly sort: [{
|
|
60
|
+
readonly index: "dev_sonic_products_en";
|
|
61
|
+
readonly name: "relevance";
|
|
62
|
+
}, {
|
|
63
|
+
readonly index: "dev_sonic_products_en_is-new_desc";
|
|
64
|
+
readonly name: "newest";
|
|
65
|
+
}, {
|
|
66
|
+
readonly index: "dev_sonic_products_en_price_asc";
|
|
67
|
+
readonly name: "price_asc";
|
|
68
|
+
}, {
|
|
69
|
+
readonly index: "dev_sonic_products_en_price_desc";
|
|
70
|
+
readonly name: "price_desc";
|
|
71
|
+
}];
|
|
72
|
+
} | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react';
|
|
2
|
-
import {
|
|
2
|
+
import { ProductListingPageData } from 'pages/product-listing-page/product-listing-page-data-types';
|
|
3
3
|
import { Breadcrumb } from './breadcrumb';
|
|
4
4
|
declare const meta: {
|
|
5
5
|
component: typeof Breadcrumb;
|
|
@@ -15,5 +15,5 @@ export declare const FourLevelsMobile: Story;
|
|
|
15
15
|
export declare const TwoLevels: Story;
|
|
16
16
|
export declare const TwoLevelsMobile: Story;
|
|
17
17
|
export declare const Connected: StoryObj<{
|
|
18
|
-
|
|
18
|
+
data: ProductListingPageData;
|
|
19
19
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function ConnectedBreadcrumb(): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare function ConnectedBreadcrumb(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface CategoryCardProps {
|
|
3
|
-
href: string;
|
|
4
|
-
image: ImageProps;
|
|
1
|
+
import { Category } from 'shared/types/category';
|
|
2
|
+
export interface CategoryCardProps extends Category {
|
|
5
3
|
isSelected?: boolean;
|
|
6
|
-
title: string;
|
|
7
4
|
}
|
|
8
5
|
export declare function CategoryCard({ href, image, isSelected, title, }: CategoryCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { MouseEvent, ReactElement } from 'react';
|
|
2
2
|
import { PressEvent } from 'react-aria-components';
|
|
3
|
-
import {
|
|
3
|
+
import type { ImageSource } from 'shared/types/image';
|
|
4
4
|
import type { ProductPrice as ProductPriceType } from 'shared/types/price';
|
|
5
5
|
export interface ProductCardProps {
|
|
6
6
|
addToCartButton: ReactElement;
|
|
7
7
|
favoriteButton?: ReactElement;
|
|
8
8
|
href: string;
|
|
9
|
-
image:
|
|
9
|
+
image: ImageSource;
|
|
10
10
|
/** @deprecated Use `onPress` instead */
|
|
11
11
|
onClick?: (e: MouseEvent) => void;
|
|
12
12
|
onPress?: (e: PressEvent) => void;
|
|
13
13
|
price: ProductPriceType;
|
|
14
14
|
sku: string;
|
|
15
|
-
|
|
15
|
+
tags?: string[];
|
|
16
16
|
title: string;
|
|
17
17
|
}
|
|
18
|
-
export declare function ProductCard({ addToCartButton: AddToCartButton, favoriteButton: FavoriteButton, href, image: { alt, fit, src, title: imageTitle }, onClick, onPress, price, sku,
|
|
18
|
+
export declare function ProductCard({ addToCartButton: AddToCartButton, favoriteButton: FavoriteButton, href, image: { alt, fit, src, title: imageTitle }, onClick, onPress, price, sku, tags, title, }: ProductCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ConnectedCategoryCarousel(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface ProductPriceProps {
|
|
2
2
|
className?: string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
isVatIncluded: boolean;
|
|
4
|
+
originalPrice: number;
|
|
5
|
+
price: number;
|
|
6
6
|
}
|
|
7
|
-
export declare function ProductPrice({ className,
|
|
7
|
+
export declare function ProductPrice({ className, isVatIncluded, originalPrice, price, }: ProductPriceProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { SearchClient } from 'algoliasearch/lite';
|
|
3
|
+
import { Autocomplete, GlobalSearchContextValue } from 'global-search/types';
|
|
4
|
+
export declare const GlobalSearchContext: React.Context<GlobalSearchContextValue | null>;
|
|
5
|
+
export declare function GlobalSearchProvider({ children, searchClient, }: {
|
|
6
|
+
children?: ReactNode | ((autocomplete: Autocomplete) => ReactNode);
|
|
7
|
+
searchClient: SearchClient;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AutocompleteCollection } from '@algolia/autocomplete-core';
|
|
3
|
+
import { CategoryHit } from 'global-search/plugins/categories-plugin';
|
|
4
|
+
import { PopularCategoryHit } from 'global-search/plugins/popular-categories-plugin';
|
|
5
|
+
import { PopularSearchHit } from 'global-search/plugins/popular-searches-plugin';
|
|
6
|
+
import { ProductHit } from 'global-search/plugins/products-plugin';
|
|
7
|
+
import { QuerySuggestionHit } from 'global-search/plugins/query-suggestions-plugin';
|
|
8
|
+
import { QuickAccessHit } from 'global-search/plugins/quick-access-plugin';
|
|
9
|
+
import { RecentSearchHit } from 'global-search/plugins/recent-searches-plugin';
|
|
10
|
+
export declare function useGlobalSearch(): {
|
|
11
|
+
categories: AutocompleteCollection<CategoryHit> | undefined;
|
|
12
|
+
hasResults: boolean;
|
|
13
|
+
popularCategories: AutocompleteCollection<PopularCategoryHit> | undefined;
|
|
14
|
+
popularSearches: AutocompleteCollection<PopularSearchHit> | undefined;
|
|
15
|
+
products: AutocompleteCollection<ProductHit> | undefined;
|
|
16
|
+
querySuggestions: AutocompleteCollection<QuerySuggestionHit> | undefined;
|
|
17
|
+
quickAccess: AutocompleteCollection<QuickAccessHit> | undefined;
|
|
18
|
+
recentSearches: AutocompleteCollection<RecentSearchHit> | undefined;
|
|
19
|
+
autocomplete: import("../types").Autocomplete;
|
|
20
|
+
formRef: React.RefObject<HTMLFormElement>;
|
|
21
|
+
inputRef: React.RefObject<HTMLInputElement>;
|
|
22
|
+
panelRef: React.RefObject<HTMLDivElement>;
|
|
23
|
+
productsIndexName: string;
|
|
24
|
+
productsQuerySuggestionsIndexName: string;
|
|
25
|
+
searchClient: import("algoliasearch/lite").SearchClient;
|
|
26
|
+
setState: React.Dispatch<React.SetStateAction<import("../types").AutocompleteState>>;
|
|
27
|
+
state: import("../types").AutocompleteState;
|
|
28
|
+
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
import { SearchClient } from 'algoliasearch/lite';
|
|
3
|
-
import { Autocomplete } from './types';
|
|
4
2
|
/**
|
|
5
3
|
* Global search using algolia autocomplete with a custom renderer
|
|
6
4
|
* https://www.algolia.com/doc/ui-libraries/autocomplete/guides/creating-a-renderer/
|
|
@@ -12,8 +10,3 @@ import { Autocomplete } from './types';
|
|
|
12
10
|
export declare function GlobalSearch(props: {
|
|
13
11
|
searchClient: SearchClient;
|
|
14
12
|
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare function SearchForm(): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export declare function GlobalSearchProvider({ children, searchClient, }: {
|
|
17
|
-
children?: ReactNode | ((autocomplete: Autocomplete) => ReactNode);
|
|
18
|
-
searchClient: SearchClient;
|
|
19
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
import { AutocompletePlugin } from '@algolia/autocomplete-core';
|
|
2
2
|
import { Hit } from '@algolia/client-search';
|
|
3
3
|
import { SearchClient } from 'algoliasearch/lite';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
categories: string[];
|
|
7
|
-
discountedPrice: number;
|
|
8
|
-
ean: string;
|
|
9
|
-
id: string;
|
|
10
|
-
image: string;
|
|
11
|
-
images: {
|
|
12
|
-
quality: string;
|
|
13
|
-
url: string;
|
|
14
|
-
}[];
|
|
15
|
-
name: string;
|
|
16
|
-
objectID: string;
|
|
17
|
-
price: number;
|
|
18
|
-
slug: string;
|
|
19
|
-
}>;
|
|
4
|
+
import type { ProductHit as ProductHitType } from 'shared/types/product';
|
|
5
|
+
export type ProductHit = Hit<ProductHitType>;
|
|
20
6
|
export declare const productsPlugin: ({ productsIndexName, searchClient, }: {
|
|
21
7
|
productsIndexName: string;
|
|
22
8
|
searchClient: SearchClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ConnectedSearchInput(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function PanelContent(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function NoSearch(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function PopularSearchesSection(): import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
export declare function RecentSearchesSection(): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
export declare function QuickAccessSection(): import("react/jsx-runtime").JSX.Element | undefined;
|
|
6
|
+
export declare function NoResults(): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function PopularCategoriesSection(): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export declare function WithResults(): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function SuggestionsSection(): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function ProductResultsSection(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Autocomplete } from 'global-search/types';
|
|
3
|
+
export interface SearchResultPanelProps {
|
|
4
|
+
autocomplete: Autocomplete;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
closePanel: VoidFunction;
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function SearchResultPanel(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SearchRoot(): import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -13,9 +13,9 @@ declare const breakpoints: {
|
|
|
13
13
|
readonly xl: 1024;
|
|
14
14
|
readonly xxl: 1440;
|
|
15
15
|
};
|
|
16
|
-
type Breakpoint$
|
|
17
|
-
interface UseBreakpointReturnType extends Record<Breakpoint$
|
|
18
|
-
current: Breakpoint$
|
|
16
|
+
type Breakpoint$1 = keyof typeof breakpoints;
|
|
17
|
+
interface UseBreakpointReturnType extends Record<Breakpoint$1, boolean> {
|
|
18
|
+
current: Breakpoint$1;
|
|
19
19
|
}
|
|
20
20
|
declare const useBreakpoint: () => UseBreakpointReturnType;
|
|
21
21
|
|
|
@@ -32,17 +32,6 @@ declare const useDisclosure: (initialState?: boolean) => UseDisclosureReturnType
|
|
|
32
32
|
|
|
33
33
|
declare const useScrollLock: (lock: boolean) => void;
|
|
34
34
|
|
|
35
|
-
interface Link$1 {
|
|
36
|
-
href: string;
|
|
37
|
-
label: string;
|
|
38
|
-
}
|
|
39
|
-
interface Props$3 {
|
|
40
|
-
links: Link$1[];
|
|
41
|
-
updateLinks: (links: Link$1[]) => void;
|
|
42
|
-
}
|
|
43
|
-
declare function BreadcrumbProvider(props: Props$3): null;
|
|
44
|
-
declare function useBreadcrumb(): Props$3;
|
|
45
|
-
|
|
46
35
|
interface CartLine$1 {
|
|
47
36
|
id: string
|
|
48
37
|
productId: string | null
|
|
@@ -159,9 +148,41 @@ interface Cart<T extends CartLine = CartLine> {
|
|
|
159
148
|
cartLines?: T[] | null;
|
|
160
149
|
}
|
|
161
150
|
|
|
162
|
-
interface
|
|
151
|
+
interface ProductHit {
|
|
152
|
+
[key: string]: any;
|
|
153
|
+
alternativeNumber: string;
|
|
154
|
+
categories: string[];
|
|
155
|
+
categoryPageId: string[];
|
|
156
|
+
consumerPrice: number;
|
|
157
|
+
discountedPrice: number;
|
|
158
|
+
drawerQuantity: string;
|
|
159
|
+
ean: string;
|
|
160
|
+
height: number;
|
|
161
|
+
hierarchicalCategories: {
|
|
162
|
+
lvl0: string;
|
|
163
|
+
lvl1: string;
|
|
164
|
+
};
|
|
163
165
|
id: string;
|
|
164
|
-
|
|
166
|
+
images: {
|
|
167
|
+
quality: string;
|
|
168
|
+
url: string;
|
|
169
|
+
}[] | undefined;
|
|
170
|
+
isVatIncluded: boolean;
|
|
171
|
+
labels: string[];
|
|
172
|
+
length: number;
|
|
173
|
+
listPrice: number;
|
|
174
|
+
moreInformation: string;
|
|
175
|
+
name: string;
|
|
176
|
+
originalPrice: number;
|
|
177
|
+
price: number;
|
|
178
|
+
relatedProducts: string;
|
|
179
|
+
restrictionGroups: string[];
|
|
180
|
+
salePrice: number;
|
|
181
|
+
slug: string;
|
|
182
|
+
storefrontId: string;
|
|
183
|
+
storefrontSlug: string;
|
|
184
|
+
weight: number;
|
|
185
|
+
width: number;
|
|
165
186
|
}
|
|
166
187
|
|
|
167
188
|
interface Link {
|
|
@@ -173,7 +194,7 @@ interface BreadcrumbProps {
|
|
|
173
194
|
}
|
|
174
195
|
declare function Breadcrumb({ links }: BreadcrumbProps): react_jsx_runtime.JSX.Element | null;
|
|
175
196
|
|
|
176
|
-
declare function ConnectedBreadcrumb(): react_jsx_runtime.JSX.Element;
|
|
197
|
+
declare function ConnectedBreadcrumb(): react_jsx_runtime.JSX.Element | null;
|
|
177
198
|
|
|
178
199
|
interface ButtonProps {
|
|
179
200
|
_pseudo?: 'none' | 'focus' | 'hover' | 'active';
|
|
@@ -232,57 +253,60 @@ interface Props {
|
|
|
232
253
|
}
|
|
233
254
|
declare const ConnectedAddToCartButton: ({ productId }: Props) => react_jsx_runtime.JSX.Element;
|
|
234
255
|
|
|
235
|
-
|
|
256
|
+
type Breakpoint = 'lg' | 'md' | 'sm'
|
|
257
|
+
|
|
258
|
+
type Sizes = Record<Breakpoint, number>
|
|
259
|
+
|
|
260
|
+
interface Source {
|
|
236
261
|
url: string
|
|
237
262
|
width: number
|
|
238
263
|
}
|
|
239
264
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
type Sizes$1 = Record<Breakpoint$1, number>
|
|
243
|
-
|
|
244
|
-
interface ImageProps$1 {
|
|
265
|
+
interface ImageSource {
|
|
245
266
|
alt: string
|
|
246
267
|
className?: string
|
|
247
268
|
fallbackSrc?: string
|
|
248
269
|
fit?: 'contain' | 'cover'
|
|
249
270
|
height?: number
|
|
250
271
|
loading?: 'lazy' | 'eager'
|
|
251
|
-
sizes?: Sizes
|
|
272
|
+
sizes?: Sizes
|
|
252
273
|
src: string
|
|
253
|
-
srcSet?: Source
|
|
274
|
+
srcSet?: Source[]
|
|
254
275
|
title: string
|
|
255
276
|
width?: number
|
|
256
277
|
}
|
|
257
278
|
|
|
258
279
|
interface ProductPrice$1 {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
280
|
+
isVatIncluded: boolean
|
|
281
|
+
originalPrice: number
|
|
282
|
+
price: number
|
|
262
283
|
}
|
|
263
284
|
|
|
264
285
|
interface ProductCardProps {
|
|
265
286
|
addToCartButton: ReactElement;
|
|
266
287
|
favoriteButton?: ReactElement;
|
|
267
288
|
href: string;
|
|
268
|
-
image:
|
|
289
|
+
image: ImageSource;
|
|
269
290
|
/** @deprecated Use `onPress` instead */
|
|
270
291
|
onClick?: (e: MouseEvent) => void;
|
|
271
292
|
onPress?: (e: PressEvent) => void;
|
|
272
293
|
price: ProductPrice$1;
|
|
273
294
|
sku: string;
|
|
274
|
-
|
|
295
|
+
tags?: string[];
|
|
275
296
|
title: string;
|
|
276
297
|
}
|
|
277
|
-
declare function ProductCard({ addToCartButton: AddToCartButton, favoriteButton: FavoriteButton, href, image: { alt, fit, src, title: imageTitle }, onClick, onPress, price, sku,
|
|
298
|
+
declare function ProductCard({ addToCartButton: AddToCartButton, favoriteButton: FavoriteButton, href, image: { alt, fit, src, title: imageTitle }, onClick, onPress, price, sku, tags, title, }: ProductCardProps): react_jsx_runtime.JSX.Element;
|
|
278
299
|
|
|
279
|
-
interface
|
|
300
|
+
interface Category {
|
|
280
301
|
href: string
|
|
281
|
-
image:
|
|
282
|
-
isSelected?: boolean
|
|
302
|
+
image: ImageSource
|
|
283
303
|
title: string
|
|
284
304
|
}
|
|
285
305
|
|
|
306
|
+
interface CategoryCardProps extends Category {
|
|
307
|
+
isSelected?: boolean
|
|
308
|
+
}
|
|
309
|
+
|
|
286
310
|
interface CategoryCarouselProps {
|
|
287
311
|
categories: CategoryCardProps[];
|
|
288
312
|
}
|
|
@@ -319,11 +343,11 @@ declare const ShowAll: ({ children, hasTransparency, initialHeight, isOpen, onTo
|
|
|
319
343
|
|
|
320
344
|
interface ProductPriceProps {
|
|
321
345
|
className?: string;
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
346
|
+
isVatIncluded: boolean;
|
|
347
|
+
originalPrice: number;
|
|
348
|
+
price: number;
|
|
325
349
|
}
|
|
326
|
-
declare function ProductPrice({ className,
|
|
350
|
+
declare function ProductPrice({ className, isVatIncluded, originalPrice, price, }: ProductPriceProps): react_jsx_runtime.JSX.Element | undefined;
|
|
327
351
|
|
|
328
352
|
interface ProductSkuProps {
|
|
329
353
|
sku: string;
|
|
@@ -458,7 +482,7 @@ declare function FavoriteOutlinedIcon(props: React.SVGProps<SVGSVGElement>): rea
|
|
|
458
482
|
|
|
459
483
|
declare function HashedOutlinedIcon(props: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
|
|
460
484
|
|
|
461
|
-
type TranslationId = 'Chosen filters' | 'Clear' | 'Clear filters' | 'Excl. VAT' | 'Hide filters' | 'Incl. VAT' | 'Show' | 'Show all' | 'Show filters' | 'Show less' | 'Sort' | 'Submit' | 'articles' | 'article' | 'of';
|
|
485
|
+
type TranslationId = 'Chosen filters' | 'Clear' | 'Clear filters' | 'Excl. VAT' | 'Hide filters' | 'Incl. VAT' | 'Show' | 'Show all' | 'Show filters' | 'Show less' | 'Sort' | 'Submit' | 'articles' | 'article' | 'of' | 'sort.relevance' | 'sort.newest' | 'sort.price_asc' | 'sort.price_desc';
|
|
462
486
|
|
|
463
487
|
interface FormattedMessageProps {
|
|
464
488
|
fallbackValue?: string;
|
|
@@ -488,25 +512,7 @@ interface ProductOverviewGridProps {
|
|
|
488
512
|
}
|
|
489
513
|
declare function ProductOverviewGrid({ children }: ProductOverviewGridProps): react_jsx_runtime.JSX.Element;
|
|
490
514
|
|
|
491
|
-
|
|
492
|
-
url: string;
|
|
493
|
-
width: number;
|
|
494
|
-
}
|
|
495
|
-
type Breakpoint = 'lg' | 'md' | 'sm';
|
|
496
|
-
type Sizes = Record<Breakpoint, number>;
|
|
497
|
-
interface ImageProps {
|
|
498
|
-
alt: string;
|
|
499
|
-
className?: string;
|
|
500
|
-
fallbackSrc?: string;
|
|
501
|
-
fit?: 'contain' | 'cover';
|
|
502
|
-
height?: number;
|
|
503
|
-
loading?: 'lazy' | 'eager';
|
|
504
|
-
sizes?: Sizes;
|
|
505
|
-
src: string;
|
|
506
|
-
srcSet?: Source[];
|
|
507
|
-
title: string;
|
|
508
|
-
width?: number;
|
|
509
|
-
}
|
|
515
|
+
type ImageProps = ImageSource;
|
|
510
516
|
declare function Image({ alt, className, fallbackSrc, fit, height, loading, sizes: sizesProp, src, srcSet: srcSetProp, title, width, }: ImageProps): react_jsx_runtime.JSX.Element;
|
|
511
517
|
|
|
512
518
|
declare function PageLayout({ children, className, }: {
|
|
@@ -531,10 +537,11 @@ interface Filters {
|
|
|
531
537
|
};
|
|
532
538
|
}
|
|
533
539
|
type ProductListingPageProps = {
|
|
534
|
-
|
|
535
|
-
|
|
540
|
+
bffUrl: string;
|
|
541
|
+
pageUrl: string;
|
|
542
|
+
searchClient?: SearchClient;
|
|
536
543
|
};
|
|
537
|
-
declare function ProductListingPage({
|
|
544
|
+
declare function ProductListingPage({ bffUrl, pageUrl, searchClient, }: ProductListingPageProps): react_jsx_runtime.JSX.Element;
|
|
538
545
|
|
|
539
546
|
interface SidebarProps {
|
|
540
547
|
children: React.ReactNode;
|
|
@@ -588,7 +595,7 @@ interface AlgoliaContextType {
|
|
|
588
595
|
toggleOnline: VoidFunction;
|
|
589
596
|
}
|
|
590
597
|
interface AlgoliaProviderProps {
|
|
591
|
-
category: string[];
|
|
598
|
+
category: string[] | undefined;
|
|
592
599
|
children: ReactNode;
|
|
593
600
|
offlineSearchClient?: SearchClient;
|
|
594
601
|
online?: boolean;
|
|
@@ -602,4 +609,16 @@ declare function AlgoliaResultsCount(): string | null;
|
|
|
602
609
|
|
|
603
610
|
declare function AlgoliaSortBy(): react_jsx_runtime.JSX.Element | null;
|
|
604
611
|
|
|
605
|
-
|
|
612
|
+
/**
|
|
613
|
+
* Global search using algolia autocomplete with a custom renderer
|
|
614
|
+
* https://www.algolia.com/doc/ui-libraries/autocomplete/guides/creating-a-renderer/
|
|
615
|
+
*
|
|
616
|
+
* Highly influenced by the two column layout sandbox which
|
|
617
|
+
* uses the autocomplete widgets
|
|
618
|
+
* https://codesandbox.io/p/sandbox/github/algolia/autocomplete/tree/next/examples/two-column-layout
|
|
619
|
+
*/
|
|
620
|
+
declare function GlobalSearch(props: {
|
|
621
|
+
searchClient: SearchClient;
|
|
622
|
+
}): react_jsx_runtime.JSX.Element;
|
|
623
|
+
|
|
624
|
+
export { Accordion, AddToCartButton, AlgoliaCategories, AlgoliaFilterPanel, type AlgoliaFilterPanelProps, AlgoliaFilterSection, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, type Cart, CartFilledIcon, type CartLine, CartOutlinedIcon, CartProvider, CategoryCarousel, type CategoryCarouselProps, Checkbox, type CheckboxProps$1 as CheckboxProps, ColorCheckbox, type ColorCheckboxProps, ConnectedAddToCartButton, ConnectedBreadcrumb, DehashedOutlinedIcon, FavoriteButton, type FavoriteButtonProps, FavoriteFilledIcon, FavoriteOutlinedIcon, FavoriteProvider, type FilterOption, type Filters, FormattedMessage, type FormattedMessageFunction, type FormattedMessageProps, GlobalSearch, GlobalStateProvider, GlobalStateProviderContext, HashedOutlinedIcon, IconButton, type IconButtonProps, Image, IntlProvider, LeftArrowFilledIcon, LinkButton, type LinkButtonProps, MultiSelect, type MultiSelectProps, NumberField, type NumberFieldSize, Page, PageLayout, type PageProps, ProductCard, type ProductCardProps, type ProductHit, ProductListingPage, type ProductListingPageProps, ProductOverviewGrid, type ProductOverviewGridProps, ProductPrice, type ProductPriceProps, ProductSku, type ProductSkuProps, type RefinementListItem, RightArrowFilledIcon, Select, type SelectProps, ShowAll, type ShowAllProps, Sidebar, type SidebarProps, SidebarProvider, TextAlignedArrowIcon, TextField, createSonicSearchClient, useAlgolia, useBreakpoint, useCart, useDebouncedCallback, useDisclosure, useFavorite, useFormattedMessage, useGlobalState, useProductCartLine, useScrollLock };
|