@sonic-equipment/ui 0.0.23 → 0.0.25

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 +5553 -271
  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 +11 -3
  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
@@ -1,6 +1,7 @@
1
1
  import { ComponentType } from 'react';
2
2
  import { TranslationId } from './translation-id';
3
3
  export interface FormattedMessageProps {
4
+ fallbackValue?: string;
4
5
  id: TranslationId;
5
6
  optional?: boolean;
6
7
  replacementValues?: Record<string, string>;
@@ -1 +1 @@
1
- export type TranslationId = 'Chosen filters' | 'Clear filters' | 'Excl. VAT' | 'Incl. VAT' | 'Show' | 'Show all' | 'Show filters' | 'Show less' | 'Sort' | 'articles' | 'article' | 'of';
1
+ export type TranslationId = 'Chosen filters' | 'Clear filters' | 'Excl. VAT' | 'Hide filters' | 'Incl. VAT' | 'Show' | 'Show all' | 'Show filters' | 'Show less' | 'Sort' | 'articles' | 'article' | 'of';
@@ -1 +1 @@
1
- export type FormatMessageFunction = (id: string, ...replacementValues: readonly string[]) => string;
1
+ export type FormatMessageFunction = (id: string, ...replacementValues: readonly string[]) => string | undefined;
@@ -1,5 +1,6 @@
1
1
  import { TranslationId } from './translation-id';
2
2
  export type FormattedMessageFunction = (id: TranslationId, options?: {
3
+ fallbackValue?: string;
3
4
  optional?: boolean;
4
5
  replacementValues?: Record<string, string>;
5
6
  }) => string;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export interface PageProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ title?: string;
6
+ }
7
+ export declare function Page({ children, className, title }: PageProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { Page } from './page';
3
+ declare const meta: {
4
+ args: {
5
+ children: import("react/jsx-runtime").JSX.Element;
6
+ title: string;
7
+ };
8
+ component: typeof Page;
9
+ parameters: {
10
+ layout: string;
11
+ };
12
+ render: ({ children, ...props }: import("./page").PageProps) => import("react/jsx-runtime").JSX.Element;
13
+ title: string;
14
+ };
15
+ export default meta;
16
+ type Story = StoryObj<typeof meta>;
17
+ export declare const Large: Story;
18
+ export declare const Medium: Story;
19
+ export declare const Small: Story;
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function PageLayout({ children, className, }: {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ import type { StoryObj } from '@storybook/react';
3
+ import { PageLayout } from './page-layout';
4
+ declare const meta: {
5
+ args: {
6
+ children: import("react/jsx-runtime").JSX.Element;
7
+ };
8
+ component: typeof PageLayout;
9
+ parameters: {
10
+ layout: string;
11
+ };
12
+ render: ({ children }: {
13
+ children: React.ReactNode;
14
+ className?: string | undefined;
15
+ }) => import("react/jsx-runtime").JSX.Element;
16
+ title: string;
17
+ };
18
+ export default meta;
19
+ type Story = StoryObj<typeof meta>;
20
+ export declare const Large: Story;
21
+ export declare const Medium: Story;
22
+ export declare const Small: Story;
@@ -0,0 +1,14 @@
1
+ export interface Filters {
2
+ color: {
3
+ options: {
4
+ count: number;
5
+ label: string;
6
+ value: string;
7
+ }[];
8
+ };
9
+ }
10
+ export type ProductListingPageProps = {
11
+ category: string[];
12
+ isLoading?: boolean;
13
+ };
14
+ export declare function ProductListingPage({ category, isLoading, }: ProductListingPageProps): import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,20 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { StoryObj } from '@storybook/react';
3
- import { ProductListing } from './product-listing';
3
+ import { ProductListingPage } from './product-listing-page';
4
4
  declare const meta: {
5
5
  args: {
6
+ category: string[];
6
7
  isLoading: false;
7
8
  online: false;
8
9
  };
9
- component: typeof ProductListing;
10
+ component: typeof ProductListingPage;
11
+ parameters: {
12
+ layout: string;
13
+ };
10
14
  title: string;
11
15
  };
12
16
  export default meta;
13
- type StoryProps = ComponentProps<typeof ProductListing> & {
17
+ type StoryProps = ComponentProps<typeof ProductListingPage> & {
14
18
  online: boolean;
15
19
  };
16
20
  type Story = StoryObj<StoryProps>;
@@ -1,10 +1,13 @@
1
1
  declare const breakpoints: {
2
- readonly sm: readonly [0, 575];
3
- readonly md: readonly [576, 767];
4
- readonly lg: readonly [768, 1023];
5
- readonly xl: readonly [1024, 1439];
6
- readonly xxl: readonly [1440];
2
+ readonly sm: 0;
3
+ readonly md: 576;
4
+ readonly lg: 768;
5
+ readonly xl: 1024;
6
+ readonly xxl: 1440;
7
7
  };
8
- type UseBreakpointReturnType = Record<keyof typeof breakpoints, boolean>;
8
+ type Breakpoint = keyof typeof breakpoints;
9
+ interface UseBreakpointReturnType extends Record<Breakpoint, boolean> {
10
+ current: Breakpoint;
11
+ }
9
12
  export declare const useBreakpoint: () => UseBreakpointReturnType;
10
13
  export {};
@@ -0,0 +1,11 @@
1
+ export interface Link {
2
+ href: string;
3
+ label: string;
4
+ }
5
+ interface Props {
6
+ links: Link[];
7
+ updateLinks: (links: Link[]) => void;
8
+ }
9
+ export declare function BreadcrumbProvider(props: Props): null;
10
+ export declare function useBreadcrumb(): Props;
11
+ export {};
@@ -0,0 +1,10 @@
1
+ interface Props {
2
+ isFavorite: (productId: string) => boolean;
3
+ toggleFavorite: (productId: string) => void;
4
+ }
5
+ export declare function FavoriteProvider(props: Props): null;
6
+ export declare function useFavorite(productId: string): {
7
+ isFavorite: boolean;
8
+ toggle: () => void;
9
+ };
10
+ export {};
@@ -2,5 +2,6 @@
2
2
  export interface SidebarContextType {
3
3
  isOpen: boolean;
4
4
  toggle: () => void;
5
+ transition: boolean;
5
6
  }
6
7
  export declare const SidebarContext: React.Context<SidebarContextType>;