@sonic-equipment/ui 0.0.23 → 0.0.24

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 (47) hide show
  1. package/dist/algolia/algolia-filter-section.d.ts +18 -0
  2. package/dist/algolia/algolia-multi-select-filter-section.d.ts +5 -0
  3. package/dist/algolia/algolia-provider.d.ts +5 -1
  4. package/dist/algolia/algolia-query-string-routing.d.ts +3 -0
  5. package/dist/badges/tag/tag.d.ts +2 -1
  6. package/dist/breadcrumbs/breadcrumb.d.ts +9 -0
  7. package/dist/breadcrumbs/breadcrumb.stories.d.ts +19 -0
  8. package/dist/breadcrumbs/connected-breadcrumb.d.ts +1 -0
  9. package/dist/buttons/favorite/connected-favorite-button.d.ts +3 -0
  10. package/dist/cards/category-card/category-card.d.ts +8 -0
  11. package/dist/cards/category-card/category-card.stories.d.ts +15 -0
  12. package/dist/cards/product-card/product-card.d.ts +4 -2
  13. package/dist/cards/product-card/product-card.stories.d.ts +2 -2
  14. package/dist/carousel/carousel-navigation-button.d.ts +6 -0
  15. package/dist/carousel/carousel.d.ts +13 -0
  16. package/dist/carousel/category-carousel/category-carousel.d.ts +5 -0
  17. package/dist/carousel/category-carousel/category-carousel.stories.d.ts +15 -0
  18. package/dist/collapsables/accordion/accordion-item.d.ts +2 -2
  19. package/dist/filters/multi-select/multi-select.d.ts +1 -3
  20. package/dist/filters/multi-select/multi-select.stories.d.ts +0 -1
  21. package/dist/icons/arrows/left-arrow-filled-icon.d.ts +2 -0
  22. package/dist/icons/home/home-filled-icon.d.ts +2 -0
  23. package/dist/index.d.ts +106 -44
  24. package/dist/index.js +5557 -272
  25. package/dist/intl/formatted-message.d.ts +1 -0
  26. package/dist/intl/translation-id.d.ts +1 -1
  27. package/dist/intl/types.d.ts +1 -1
  28. package/dist/intl/use-format-message.d.ts +1 -0
  29. package/dist/pages/page/page.d.ts +7 -0
  30. package/dist/pages/page/page.stories.d.ts +19 -0
  31. package/dist/pages/page-layout/page-layout.d.ts +5 -0
  32. package/dist/pages/page-layout/page-layout.stories.d.ts +22 -0
  33. package/dist/pages/product-listing-page/product-listing-page.d.ts +14 -0
  34. package/dist/{product-listing/product-listing.stories.d.ts → pages/product-listing-page/product-listing-page.stories.d.ts} +7 -3
  35. package/dist/shared/hooks/use-breakpoint.d.ts +9 -6
  36. package/dist/shared/providers/breadcrumb-provider.d.ts +11 -0
  37. package/dist/shared/providers/favorite-provider.d.ts +10 -0
  38. package/dist/sidebar/sidebar-context.d.ts +1 -0
  39. package/dist/styles.css +590 -42
  40. package/package.json +15 -4
  41. package/dist/algolia/algolia-multi-select.d.ts +0 -5
  42. package/dist/algolia/algolia-product-list.d.ts +0 -1
  43. package/dist/algolia/algolia.stories.d.ts +0 -17
  44. package/dist/product-listing/filters/colors/color-filter.d.ts +0 -11
  45. package/dist/product-listing/filters/filter/filter.d.ts +0 -7
  46. package/dist/product-listing/product-listing.d.ts +0 -13
  47. package/dist/product-listing/search-params.d.ts +0 -18
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ export interface RefinementListItem {
3
+ count: number;
4
+ highlighted?: string;
5
+ isRefined: boolean;
6
+ label: string;
7
+ value: string;
8
+ }
9
+ interface AlgoliaFilterSectionProps {
10
+ attribute: string;
11
+ children({ items, refine, }: {
12
+ items: RefinementListItem[];
13
+ refine(value: string): void;
14
+ }): React.ReactNode;
15
+ initialIsOpen?: boolean;
16
+ }
17
+ export declare function AlgoliaFilterSection({ attribute, children, initialIsOpen, }: AlgoliaFilterSectionProps): import("react/jsx-runtime").JSX.Element | null;
18
+ export {};
@@ -0,0 +1,5 @@
1
+ interface AlgoliaMultiSelectFilterSectionProps {
2
+ attribute: string;
3
+ }
4
+ export declare function AlgoliaMultiSelectFilterSection({ attribute, }: AlgoliaMultiSelectFilterSectionProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -1,16 +1,20 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SearchClient } from 'algoliasearch/lite';
3
+ import { RouterProps } from 'instantsearch.js/es/middlewares/createRouterMiddleware';
4
+ import { UiState } from 'instantsearch.js/es/types';
3
5
  interface AlgoliaContextType {
4
6
  online: boolean;
5
7
  setOnline: (online: boolean) => void;
6
8
  toggleOnline: VoidFunction;
7
9
  }
8
10
  interface AlgoliaProviderProps {
11
+ category: string;
9
12
  children: ReactNode;
10
13
  offlineSearchClient?: SearchClient;
11
14
  online?: boolean;
15
+ routing?: boolean | RouterProps<UiState, UiState> | undefined;
12
16
  searchClient: SearchClient;
13
17
  }
14
- export declare function AlgoliaProvider({ children, offlineSearchClient, online: _online, searchClient, }: AlgoliaProviderProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function AlgoliaProvider({ category, children, offlineSearchClient, online: _online, routing, searchClient, }: AlgoliaProviderProps): import("react/jsx-runtime").JSX.Element;
15
19
  export declare function useAlgolia(): AlgoliaContextType;
16
20
  export {};
@@ -0,0 +1,3 @@
1
+ import { RouterProps } from 'instantsearch.js/es/middlewares/createRouterMiddleware';
2
+ import { UiState } from 'instantsearch.js/es/types';
3
+ export declare const queryStringRouting: RouterProps<UiState, UiState>;
@@ -1,5 +1,6 @@
1
+ import { ReactNode } from 'react';
1
2
  interface TagProps {
2
- children: string;
3
+ children: ReactNode;
3
4
  }
4
5
  export declare function Tag({ children }: TagProps): import("react/jsx-runtime").JSX.Element | null;
5
6
  export {};
@@ -0,0 +1,9 @@
1
+ interface Link {
2
+ href: string;
3
+ label: string;
4
+ }
5
+ export interface BreadcrumbProps {
6
+ links: Link[];
7
+ }
8
+ export declare function Breadcrumb({ links }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element | null;
9
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { Link } from 'shared/providers/breadcrumb-provider';
3
+ import { Breadcrumb } from './breadcrumb';
4
+ declare const meta: {
5
+ component: typeof Breadcrumb;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ title: string;
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const FourLevels: Story;
14
+ export declare const FourLevelsMobile: Story;
15
+ export declare const TwoLevels: Story;
16
+ export declare const TwoLevelsMobile: Story;
17
+ export declare const Connected: StoryObj<{
18
+ links: Link[];
19
+ }>;
@@ -0,0 +1 @@
1
+ export declare function ConnectedBreadcrumb(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function ConnectedFavoriteButton({ productId }: {
2
+ productId: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { type ImageProps } from 'media/image/image';
2
+ export interface CategoryCardProps {
3
+ href: string;
4
+ image: ImageProps;
5
+ isSelected?: boolean;
6
+ title: string;
7
+ }
8
+ export declare function CategoryCard({ href, image, isSelected, title, }: CategoryCardProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { CategoryCard } from './category-card';
3
+ declare const meta: {
4
+ component: typeof CategoryCard;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ title: string;
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Small: Story;
13
+ export declare const Medium: Story;
14
+ export declare const Large: Story;
15
+ export declare const Selected: Story;
@@ -1,14 +1,16 @@
1
1
  import { ReactElement } from 'react';
2
+ import { PressEvent } from 'react-aria-components';
2
3
  import { ImageProps } from 'media/image/image';
3
4
  import type { ProductPrice as ProductPriceType } from 'shared/types/price';
4
5
  export interface ProductCardProps {
5
6
  addToCartButton: ReactElement;
6
7
  favoriteButton?: ReactElement;
8
+ href: string;
7
9
  image: ImageProps;
8
- onClick: React.MouseEventHandler<HTMLDivElement>;
10
+ onClick?: (e: PressEvent) => void;
9
11
  price: ProductPriceType;
10
12
  sku: string;
11
13
  tag?: 'new' | 'sale';
12
14
  title: string;
13
15
  }
14
- export declare function ProductCard({ addToCartButton: AddToCartButton, favoriteButton: FavoriteButton, image: { alt, fit, src, title: imageTitle }, onClick, price, sku, tag, title, }: ProductCardProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function ProductCard({ addToCartButton: AddToCartButton, favoriteButton: FavoriteButton, href, image: { alt, fit, src, title: imageTitle }, onClick, price, sku, tag, title, }: ProductCardProps): import("react/jsx-runtime").JSX.Element;
@@ -1,17 +1,17 @@
1
- /// <reference types="react" />
2
1
  import { StoryObj } from '@storybook/react';
3
2
  import { ProductCard } from './product-card';
4
3
  declare const meta: {
5
4
  args: {
6
5
  addToCartButton: import("react/jsx-runtime").JSX.Element;
7
6
  favoriteButton: import("react/jsx-runtime").JSX.Element;
7
+ href: string;
8
8
  image: {
9
9
  alt: string;
10
10
  fit: "contain";
11
11
  src: string;
12
12
  title: string;
13
13
  };
14
- onClick: import("@vitest/spy").Mock<[event: React.MouseEvent<HTMLDivElement, MouseEvent>], void>;
14
+ onClick: import("@vitest/spy").Mock<[e: import("react-aria").PressEvent], void>;
15
15
  sku: string;
16
16
  tag: "new";
17
17
  };
@@ -0,0 +1,6 @@
1
+ interface CarouselNavigationButtonProps {
2
+ direction: 'previous' | 'next';
3
+ isDisabled?: boolean;
4
+ }
5
+ export declare function CarouselNavigationButton({ direction, isDisabled, }: CarouselNavigationButtonProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ import { SwiperOptions } from 'swiper/types';
3
+ import 'swiper/css';
4
+ export interface CarouselProps {
5
+ breakpoints?: SwiperOptions['breakpoints'];
6
+ hasNavigation?: boolean;
7
+ hasOverflow?: boolean;
8
+ navigationButtonsPosition?: 'top' | 'center';
9
+ slides: ReactNode[];
10
+ slidesPerView?: number | 'auto';
11
+ spaceBetween?: number;
12
+ }
13
+ export declare function Carousel({ breakpoints, hasNavigation, navigationButtonsPosition, slides, slidesPerView, spaceBetween, }: CarouselProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { type CategoryCardProps } from 'cards/category-card/category-card';
2
+ export interface CategoryCarouselProps {
3
+ categories: CategoryCardProps[];
4
+ }
5
+ export declare function CategoryCarousel({ categories }: CategoryCarouselProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { CategoryCarousel } from './category-carousel';
3
+ declare const meta: {
4
+ component: typeof CategoryCarousel;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ title: string;
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Small: Story;
13
+ export declare const Medium: Story;
14
+ export declare const Large: Story;
15
+ export declare const Hover: Story;
@@ -4,9 +4,9 @@ export interface AccordionItemProps {
4
4
  children: ReactNode;
5
5
  className?: string;
6
6
  id: string;
7
+ initialIsOpen?: boolean;
7
8
  isDisabled?: boolean;
8
- isOpen?: boolean;
9
9
  size?: 'md' | 'lg';
10
10
  title: ReactNode;
11
11
  }
12
- export declare function AccordionItem({ _pseudo, children, className, id, isDisabled, isOpen: isOpenProp, size, title, }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function AccordionItem({ _pseudo, children, className, id, initialIsOpen, isDisabled, size, title, }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
@@ -7,13 +7,11 @@ export interface FilterOption {
7
7
  }
8
8
  export interface MultiSelectProps<T extends FilterOption> {
9
9
  amountShown?: number;
10
- isOpen: boolean;
11
10
  onChange: (value: T) => void;
12
- onToggleOpen: (isOpen: boolean) => void;
13
11
  options: T[];
14
12
  render: ({ onChange, option, }: {
15
13
  onChange: (key: string) => void;
16
14
  option: T;
17
15
  }) => ReactNode;
18
16
  }
19
- export declare function MultiSelect<T extends FilterOption>({ amountShown, isOpen, onChange, onToggleOpen, options, render, }: MultiSelectProps<T>): import("react/jsx-runtime").JSX.Element;
17
+ export declare function MultiSelect<T extends FilterOption>({ amountShown, onChange, options, render, }: MultiSelectProps<T>): import("react/jsx-runtime").JSX.Element | null;
@@ -6,7 +6,6 @@ type ColorFilterOption = FilterOption & {
6
6
  declare const meta: {
7
7
  args: {
8
8
  onChange: import("@vitest/spy").Mock<[value: FilterOption], void>;
9
- onToggleOpen: import("@vitest/spy").Mock<[isOpen: boolean], void>;
10
9
  };
11
10
  component: typeof MultiSelect;
12
11
  parameters: {
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function LeftArrowFilledIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function HomeFilledIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1,16 +1,22 @@
1
1
  /// <reference types="react" />
2
2
  import { ReactElement, MutableRefObject, ReactNode, HTMLAttributeAnchorTarget, FormEventHandler, KeyboardEvent, ComponentType } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import { PressEvent } from 'react-aria-components';
4
5
  import { SearchClient } from 'algoliasearch/lite';
6
+ import { RouterProps } from 'instantsearch.js/es/middlewares/createRouterMiddleware';
7
+ import { UiState } from 'instantsearch.js/es/types';
5
8
 
6
9
  declare const breakpoints: {
7
- readonly sm: readonly [0, 575];
8
- readonly md: readonly [576, 767];
9
- readonly lg: readonly [768, 1023];
10
- readonly xl: readonly [1024, 1439];
11
- readonly xxl: readonly [1440];
10
+ readonly sm: 0;
11
+ readonly md: 576;
12
+ readonly lg: 768;
13
+ readonly xl: 1024;
14
+ readonly xxl: 1440;
12
15
  };
13
- type UseBreakpointReturnType = Record<keyof typeof breakpoints, boolean>;
16
+ type Breakpoint$2 = keyof typeof breakpoints;
17
+ interface UseBreakpointReturnType extends Record<Breakpoint$2, boolean> {
18
+ current: Breakpoint$2;
19
+ }
14
20
  declare const useBreakpoint: () => UseBreakpointReturnType;
15
21
 
16
22
  declare function useDebouncedCallback<T extends (...args: any[]) => any>(func: T, delay: number): (...args: Parameters<T>) => void;
@@ -26,6 +32,17 @@ declare const useDisclosure: (initialState?: boolean) => UseDisclosureReturnType
26
32
 
27
33
  declare const useScrollLock: (lock: boolean) => void;
28
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
+
29
46
  interface CartLine$1 {
30
47
  id: string
31
48
  productId: string | null
@@ -36,7 +53,7 @@ interface Cart$1<T extends CartLine$1 = CartLine$1> {
36
53
  cartLines?: T[] | null
37
54
  }
38
55
 
39
- interface Props$1<TCartLine extends CartLine$1 = CartLine$1, TCart extends Cart$1<TCartLine> = Cart$1<TCartLine>> {
56
+ interface Props$2<TCartLine extends CartLine$1 = CartLine$1, TCart extends Cart$1<TCartLine> = Cart$1<TCartLine>> {
40
57
  addToCart: (args: {
41
58
  productId: string;
42
59
  quantity: number;
@@ -50,8 +67,8 @@ interface Props$1<TCartLine extends CartLine$1 = CartLine$1, TCart extends Cart$
50
67
  }) => void;
51
68
  updateCartLine: (cartLine: TCartLine) => void;
52
69
  }
53
- declare function CartProvider<TCartLine extends CartLine$1 = CartLine$1, TCart extends Cart$1<TCartLine> = Cart$1<TCartLine>>(props: Props$1<TCartLine, TCart>): null;
54
- declare function useCart(): Props$1<CartLine$1, Cart$1<CartLine$1>>;
70
+ declare function CartProvider<TCartLine extends CartLine$1 = CartLine$1, TCart extends Cart$1<TCartLine> = Cart$1<TCartLine>>(props: Props$2<TCartLine, TCart>): null;
71
+ declare function useCart(): Props$2<CartLine$1, Cart$1<CartLine$1>>;
55
72
  declare function useProductCartLine(productId: string): {
56
73
  addToCart: (args: {
57
74
  productId: string;
@@ -68,6 +85,16 @@ declare function useProductCartLine(productId: string): {
68
85
  updateCartLine: (cartLine: CartLine$1) => void;
69
86
  };
70
87
 
88
+ interface Props$1 {
89
+ isFavorite: (productId: string) => boolean;
90
+ toggleFavorite: (productId: string) => void;
91
+ }
92
+ declare function FavoriteProvider(props: Props$1): null;
93
+ declare function useFavorite(productId: string): {
94
+ isFavorite: boolean;
95
+ toggle: () => void;
96
+ };
97
+
71
98
  type EventCallback<T> = (data: T) => void
72
99
 
73
100
  declare class EventEmitter<T> {
@@ -137,6 +164,17 @@ interface Product {
137
164
  title: string;
138
165
  }
139
166
 
167
+ interface Link {
168
+ href: string;
169
+ label: string;
170
+ }
171
+ interface BreadcrumbProps {
172
+ links: Link[];
173
+ }
174
+ declare function Breadcrumb({ links }: BreadcrumbProps): react_jsx_runtime.JSX.Element | null;
175
+
176
+ declare function ConnectedBreadcrumb(): react_jsx_runtime.JSX.Element;
177
+
140
178
  interface ButtonProps {
141
179
  _pseudo?: 'none' | 'focus' | 'hover' | 'active';
142
180
  children?: ReactNode | string;
@@ -225,22 +263,35 @@ interface ProductPrice$1 {
225
263
  interface ProductCardProps {
226
264
  addToCartButton: ReactElement;
227
265
  favoriteButton?: ReactElement;
266
+ href: string;
228
267
  image: ImageProps$1;
229
- onClick: React.MouseEventHandler<HTMLDivElement>;
268
+ onClick?: (e: PressEvent) => void;
230
269
  price: ProductPrice$1;
231
270
  sku: string;
232
271
  tag?: 'new' | 'sale';
233
272
  title: string;
234
273
  }
235
- declare function ProductCard({ addToCartButton: AddToCartButton, favoriteButton: FavoriteButton, image: { alt, fit, src, title: imageTitle }, onClick, price, sku, tag, title, }: ProductCardProps): react_jsx_runtime.JSX.Element;
274
+ declare function ProductCard({ addToCartButton: AddToCartButton, favoriteButton: FavoriteButton, href, image: { alt, fit, src, title: imageTitle }, onClick, price, sku, tag, title, }: ProductCardProps): react_jsx_runtime.JSX.Element;
275
+
276
+ interface CategoryCardProps {
277
+ href: string
278
+ image: ImageProps$1
279
+ isSelected?: boolean
280
+ title: string
281
+ }
282
+
283
+ interface CategoryCarouselProps {
284
+ categories: CategoryCardProps[];
285
+ }
286
+ declare function CategoryCarousel({ categories }: CategoryCarouselProps): react_jsx_runtime.JSX.Element;
236
287
 
237
288
  interface AccordionItemProps {
238
289
  _pseudo?: 'none' | 'focus' | 'hover' | 'active';
239
290
  children: ReactNode;
240
291
  className?: string;
241
292
  id: string;
293
+ initialIsOpen?: boolean;
242
294
  isDisabled?: boolean;
243
- isOpen?: boolean;
244
295
  size?: 'md' | 'lg';
245
296
  title: ReactNode;
246
297
  }
@@ -284,16 +335,14 @@ interface FilterOption {
284
335
  }
285
336
  interface MultiSelectProps<T extends FilterOption> {
286
337
  amountShown?: number;
287
- isOpen: boolean;
288
338
  onChange: (value: T) => void;
289
- onToggleOpen: (isOpen: boolean) => void;
290
339
  options: T[];
291
340
  render: ({ onChange, option, }: {
292
341
  onChange: (key: string) => void;
293
342
  option: T;
294
343
  }) => ReactNode;
295
344
  }
296
- declare function MultiSelect<T extends FilterOption>({ amountShown, isOpen, onChange, onToggleOpen, options, render, }: MultiSelectProps<T>): react_jsx_runtime.JSX.Element;
345
+ declare function MultiSelect<T extends FilterOption>({ amountShown, onChange, options, render, }: MultiSelectProps<T>): react_jsx_runtime.JSX.Element | null;
297
346
 
298
347
  interface CheckboxProps$1 {
299
348
  _pseudo?: 'none' | 'focus' | 'hover' | 'active';
@@ -402,16 +451,17 @@ declare function FavoriteOutlinedIcon(props: React.SVGProps<SVGSVGElement>): rea
402
451
 
403
452
  declare function HashedOutlinedIcon(props: React.SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
404
453
 
405
- type TranslationId = 'Chosen filters' | 'Clear filters' | 'Excl. VAT' | 'Incl. VAT' | 'Show' | 'Show all' | 'Show filters' | 'Show less' | 'Sort' | 'articles' | 'article' | 'of';
454
+ type TranslationId = 'Chosen filters' | 'Clear filters' | 'Excl. VAT' | 'Hide filters' | 'Incl. VAT' | 'Show' | 'Show all' | 'Show filters' | 'Show less' | 'Sort' | 'articles' | 'article' | 'of';
406
455
 
407
456
  interface FormattedMessageProps {
457
+ fallbackValue?: string;
408
458
  id: TranslationId;
409
459
  optional?: boolean;
410
460
  replacementValues?: Record<string, string>;
411
461
  }
412
462
  declare const FormattedMessage: ComponentType<FormattedMessageProps>;
413
463
 
414
- type FormatMessageFunction = (id: string, ...replacementValues: readonly string[]) => string;
464
+ type FormatMessageFunction = (id: string, ...replacementValues: readonly string[]) => string | undefined;
415
465
 
416
466
  interface IntlProviderProps {
417
467
  children: React.ReactNode;
@@ -420,6 +470,7 @@ interface IntlProviderProps {
420
470
  declare function IntlProvider({ children, formatMessage }: IntlProviderProps): react_jsx_runtime.JSX.Element;
421
471
 
422
472
  type FormattedMessageFunction = (id: TranslationId, options?: {
473
+ fallbackValue?: string;
423
474
  optional?: boolean;
424
475
  replacementValues?: Record<string, string>;
425
476
  }) => string;
@@ -451,6 +502,18 @@ interface ImageProps {
451
502
  }
452
503
  declare function Image({ alt, className, fallbackSrc, fit, height, loading, sizes: sizesProp, src, srcSet: srcSetProp, title, width, }: ImageProps): react_jsx_runtime.JSX.Element;
453
504
 
505
+ declare function PageLayout({ children, className, }: {
506
+ children: ReactNode;
507
+ className?: string;
508
+ }): react_jsx_runtime.JSX.Element;
509
+
510
+ interface PageProps {
511
+ children: ReactNode;
512
+ className?: string;
513
+ title?: string;
514
+ }
515
+ declare function Page({ children, className, title }: PageProps): react_jsx_runtime.JSX.Element;
516
+
454
517
  interface Filters {
455
518
  color: {
456
519
  options: {
@@ -460,29 +523,11 @@ interface Filters {
460
523
  }[];
461
524
  };
462
525
  }
463
- type ProductListingProps = {
526
+ type ProductListingPageProps = {
527
+ category: string;
464
528
  isLoading?: boolean;
465
529
  };
466
- declare function ProductListing({ isLoading }: ProductListingProps): react_jsx_runtime.JSX.Element;
467
-
468
- declare function createProductListingSearchParams(state: {
469
- filters: {
470
- colors: string[];
471
- };
472
- sort: {
473
- by: string;
474
- direction: string;
475
- };
476
- }): URLSearchParams;
477
- declare function parseProductListingSearchParams(params: URLSearchParams): {
478
- filters: {
479
- colors: string[];
480
- };
481
- sort: {
482
- by: string;
483
- direction: string;
484
- };
485
- };
530
+ declare function ProductListingPage({ category, isLoading, }: ProductListingPageProps): react_jsx_runtime.JSX.Element;
486
531
 
487
532
  interface SidebarProps {
488
533
  children: React.ReactNode;
@@ -501,31 +546,48 @@ interface AlgoliaFilterPanelProps {
501
546
  }
502
547
  declare function AlgoliaFilterPanel({ onShowProducts, }: AlgoliaFilterPanelProps): react_jsx_runtime.JSX.Element;
503
548
 
504
- interface AlgoliaMultiSelectProps {
549
+ interface RefinementListItem {
550
+ count: number;
551
+ highlighted?: string;
552
+ isRefined: boolean;
553
+ label: string;
554
+ value: string;
555
+ }
556
+ interface AlgoliaFilterSectionProps {
557
+ attribute: string;
558
+ children({ items, refine, }: {
559
+ items: RefinementListItem[];
560
+ refine(value: string): void;
561
+ }): React.ReactNode;
562
+ initialIsOpen?: boolean;
563
+ }
564
+ declare function AlgoliaFilterSection({ attribute, children, initialIsOpen, }: AlgoliaFilterSectionProps): react_jsx_runtime.JSX.Element | null;
565
+
566
+ interface AlgoliaMultiSelectFilterSectionProps {
505
567
  attribute: string;
506
568
  }
507
- declare function AlgoliaMultiSelect({ attribute }: AlgoliaMultiSelectProps): react_jsx_runtime.JSX.Element;
569
+ declare function AlgoliaMultiSelectFilterSection({ attribute, }: AlgoliaMultiSelectFilterSectionProps): react_jsx_runtime.JSX.Element;
508
570
 
509
571
  declare function AlgoliaPagination(): react_jsx_runtime.JSX.Element;
510
572
 
511
- declare function AlgoliaProductList(): react_jsx_runtime.JSX.Element;
512
-
513
573
  interface AlgoliaContextType {
514
574
  online: boolean;
515
575
  setOnline: (online: boolean) => void;
516
576
  toggleOnline: VoidFunction;
517
577
  }
518
578
  interface AlgoliaProviderProps {
579
+ category: string;
519
580
  children: ReactNode;
520
581
  offlineSearchClient?: SearchClient;
521
582
  online?: boolean;
583
+ routing?: boolean | RouterProps<UiState, UiState> | undefined;
522
584
  searchClient: SearchClient;
523
585
  }
524
- declare function AlgoliaProvider({ children, offlineSearchClient, online: _online, searchClient, }: AlgoliaProviderProps): react_jsx_runtime.JSX.Element;
586
+ declare function AlgoliaProvider({ category, children, offlineSearchClient, online: _online, routing, searchClient, }: AlgoliaProviderProps): react_jsx_runtime.JSX.Element;
525
587
  declare function useAlgolia(): AlgoliaContextType;
526
588
 
527
589
  declare function AlgoliaResultsCount(): string | null;
528
590
 
529
591
  declare function AlgoliaSortBy(): react_jsx_runtime.JSX.Element | null;
530
592
 
531
- export { Accordion, AddToCartButton, AlgoliaCategories, AlgoliaFilterPanel, type AlgoliaFilterPanelProps, AlgoliaMultiSelect, AlgoliaPagination, AlgoliaProductList, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, Button, type ButtonProps, type Cart, CartFilledIcon, type CartLine, CartOutlinedIcon, CartProvider, Checkbox, type CheckboxProps$1 as CheckboxProps, ColorCheckbox, type ColorCheckboxProps, ConnectedAddToCartButton, DehashedOutlinedIcon, FavoriteButton, type FavoriteButtonProps, FavoriteFilledIcon, FavoriteOutlinedIcon, type FilterOption, type Filters, FormattedMessage, type FormattedMessageFunction, type FormattedMessageProps, GlobalStateProvider, GlobalStateProviderContext, HashedOutlinedIcon, IconButton, type IconButtonProps, Image, type ImageProps, IntlProvider, LinkButton, type LinkButtonProps, MultiSelect, type MultiSelectProps, NumberField, type NumberFieldSize, type Product, ProductCard, type ProductCardProps, ProductListing, type ProductListingProps, ProductOverviewGrid, type ProductOverviewGridProps, ProductPrice, type ProductPriceProps, ProductSku, type ProductSkuProps, RightArrowFilledIcon, Select, type SelectProps, ShowAll, type ShowAllProps, Sidebar, type SidebarProps, SidebarProvider, TextField, createProductListingSearchParams, parseProductListingSearchParams, useAlgolia, useBreakpoint, useCart, useDebouncedCallback, useDisclosure, useFormattedMessage, useGlobalState, useProductCartLine, useScrollLock };
593
+ export { Accordion, AddToCartButton, AlgoliaCategories, AlgoliaFilterPanel, type AlgoliaFilterPanelProps, AlgoliaFilterSection, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, Breadcrumb, type BreadcrumbProps, BreadcrumbProvider, 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, GlobalStateProvider, GlobalStateProviderContext, HashedOutlinedIcon, IconButton, type IconButtonProps, Image, type ImageProps, IntlProvider, type Link$1 as Link, LinkButton, type LinkButtonProps, MultiSelect, type MultiSelectProps, NumberField, type NumberFieldSize, Page, PageLayout, type PageProps, type Product, ProductCard, type ProductCardProps, 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, TextField, useAlgolia, useBreadcrumb, useBreakpoint, useCart, useDebouncedCallback, useDisclosure, useFavorite, useFormattedMessage, useGlobalState, useProductCartLine, useScrollLock };