@sonic-equipment/ui 0.0.22 → 0.0.23
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-provider.d.ts +6 -3
- package/dist/algolia/algolia-searchclient-offline.d.ts +3 -0
- package/dist/badges/tag/tag.stories.d.ts +0 -1
- package/dist/buttons/add-to-cart-button/add-to-cart-button.stories.d.ts +0 -1
- package/dist/buttons/button/button.stories.d.ts +0 -1
- package/dist/buttons/favorite/favorite-button.stories.d.ts +0 -1
- package/dist/buttons/icon-button/icon-button.stories.d.ts +0 -1
- package/dist/buttons/link-button/link-button.stories.d.ts +0 -1
- package/dist/cards/product-card/product-card.stories.d.ts +0 -1
- package/dist/collapsables/accordion/accordion-item.d.ts +1 -1
- package/dist/collapsables/accordion/accordion.stories.d.ts +0 -1
- package/dist/collapsables/show-all/show-all.stories.d.ts +0 -1
- package/dist/display/product-price/product-price.stories.d.ts +0 -1
- package/dist/display/product-sku/product-sku.stories.d.ts +0 -1
- package/dist/filters/pagination/pagination.stories.d.ts +0 -1
- package/dist/forms/checkbox/checkbox.stories.d.ts +0 -1
- package/dist/forms/color-checkbox/color-checkbox.stories.d.ts +0 -1
- package/dist/forms/field-error/field-error.stories.d.ts +0 -1
- package/dist/forms/input/input.stories.d.ts +0 -1
- package/dist/forms/label/label.stories.d.ts +0 -1
- package/dist/forms/number-field/number-field.stories.d.ts +0 -1
- package/dist/forms/select/select.stories.d.ts +0 -1
- package/dist/forms/text-field/text-field.stories.d.ts +0 -1
- package/dist/forms/textarea/textarea.stories.d.ts +0 -1
- package/dist/index.d.ts +27 -11
- package/dist/index.js +129 -1518
- package/dist/intl/formatted-message.d.ts +1 -0
- package/dist/intl/formatted-message.stories.d.ts +1 -1
- package/dist/intl/use-format-message.d.ts +4 -1
- package/dist/media/image/image.stories.d.ts +0 -1
- package/dist/product-listing/product-listing.stories.d.ts +0 -1
- package/dist/shared/hooks/use-breakpoint.d.ts +9 -4
- package/dist/shared/hooks/use-disclosure.d.ts +1 -1
- package/dist/styles.css +51 -20
- package/dist/typography/heading/heading.stories.d.ts +1 -2
- package/package.json +1 -1
- package/dist/algolia/algolia-searchclient-mock.d.ts +0 -4
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SearchClient } from 'algoliasearch/lite';
|
|
2
3
|
interface AlgoliaContextType {
|
|
3
4
|
online: boolean;
|
|
4
5
|
setOnline: (online: boolean) => void;
|
|
5
6
|
toggleOnline: VoidFunction;
|
|
6
7
|
}
|
|
7
8
|
interface AlgoliaProviderProps {
|
|
8
|
-
children:
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
offlineSearchClient?: SearchClient;
|
|
9
11
|
online?: boolean;
|
|
12
|
+
searchClient: SearchClient;
|
|
10
13
|
}
|
|
11
|
-
export declare function AlgoliaProvider({ children, online: _online, }: AlgoliaProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function AlgoliaProvider({ children, offlineSearchClient, online: _online, searchClient, }: AlgoliaProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
15
|
export declare function useAlgolia(): AlgoliaContextType;
|
|
13
16
|
export {};
|
|
@@ -7,6 +7,6 @@ export interface AccordionItemProps {
|
|
|
7
7
|
isDisabled?: boolean;
|
|
8
8
|
isOpen?: boolean;
|
|
9
9
|
size?: 'md' | 'lg';
|
|
10
|
-
title:
|
|
10
|
+
title: ReactNode;
|
|
11
11
|
}
|
|
12
12
|
export declare function AccordionItem({ _pseudo, children, className, id, isDisabled, isOpen: isOpenProp, size, title, }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { SearchClient } from 'algoliasearch/lite';
|
|
5
|
+
|
|
6
|
+
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];
|
|
9
12
|
};
|
|
13
|
+
type UseBreakpointReturnType = Record<keyof typeof breakpoints, boolean>;
|
|
14
|
+
declare const useBreakpoint: () => UseBreakpointReturnType;
|
|
10
15
|
|
|
11
16
|
declare function useDebouncedCallback<T extends (...args: any[]) => any>(func: T, delay: number): (...args: Parameters<T>) => void;
|
|
12
17
|
|
|
@@ -17,7 +22,7 @@ interface UseDisclosureReturnType {
|
|
|
17
22
|
open: () => void;
|
|
18
23
|
toggle: () => void;
|
|
19
24
|
}
|
|
20
|
-
declare const useDisclosure: () => UseDisclosureReturnType;
|
|
25
|
+
declare const useDisclosure: (initialState?: boolean) => UseDisclosureReturnType;
|
|
21
26
|
|
|
22
27
|
declare const useScrollLock: (lock: boolean) => void;
|
|
23
28
|
|
|
@@ -237,7 +242,7 @@ interface AccordionItemProps {
|
|
|
237
242
|
isDisabled?: boolean;
|
|
238
243
|
isOpen?: boolean;
|
|
239
244
|
size?: 'md' | 'lg';
|
|
240
|
-
title:
|
|
245
|
+
title: ReactNode;
|
|
241
246
|
}
|
|
242
247
|
|
|
243
248
|
interface AccordionProps {
|
|
@@ -401,6 +406,7 @@ type TranslationId = 'Chosen filters' | 'Clear filters' | 'Excl. VAT' | 'Incl. V
|
|
|
401
406
|
|
|
402
407
|
interface FormattedMessageProps {
|
|
403
408
|
id: TranslationId;
|
|
409
|
+
optional?: boolean;
|
|
404
410
|
replacementValues?: Record<string, string>;
|
|
405
411
|
}
|
|
406
412
|
declare const FormattedMessage: ComponentType<FormattedMessageProps>;
|
|
@@ -413,7 +419,10 @@ interface IntlProviderProps {
|
|
|
413
419
|
}
|
|
414
420
|
declare function IntlProvider({ children, formatMessage }: IntlProviderProps): react_jsx_runtime.JSX.Element;
|
|
415
421
|
|
|
416
|
-
type FormattedMessageFunction = (
|
|
422
|
+
type FormattedMessageFunction = (id: TranslationId, options?: {
|
|
423
|
+
optional?: boolean;
|
|
424
|
+
replacementValues?: Record<string, string>;
|
|
425
|
+
}) => string;
|
|
417
426
|
declare const useFormattedMessage: () => FormattedMessageFunction;
|
|
418
427
|
|
|
419
428
|
interface ProductOverviewGridProps {
|
|
@@ -480,6 +489,11 @@ interface SidebarProps {
|
|
|
480
489
|
}
|
|
481
490
|
declare function Sidebar({ children }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
482
491
|
|
|
492
|
+
interface SidebarProviderProps {
|
|
493
|
+
children: ReactElement;
|
|
494
|
+
}
|
|
495
|
+
declare function SidebarProvider({ children }: SidebarProviderProps): react_jsx_runtime.JSX.Element;
|
|
496
|
+
|
|
483
497
|
declare function AlgoliaCategories(): react_jsx_runtime.JSX.Element;
|
|
484
498
|
|
|
485
499
|
interface AlgoliaFilterPanelProps {
|
|
@@ -502,14 +516,16 @@ interface AlgoliaContextType {
|
|
|
502
516
|
toggleOnline: VoidFunction;
|
|
503
517
|
}
|
|
504
518
|
interface AlgoliaProviderProps {
|
|
505
|
-
children:
|
|
519
|
+
children: ReactNode;
|
|
520
|
+
offlineSearchClient?: SearchClient;
|
|
506
521
|
online?: boolean;
|
|
522
|
+
searchClient: SearchClient;
|
|
507
523
|
}
|
|
508
|
-
declare function AlgoliaProvider({ children, online: _online, }: AlgoliaProviderProps): react_jsx_runtime.JSX.Element;
|
|
524
|
+
declare function AlgoliaProvider({ children, offlineSearchClient, online: _online, searchClient, }: AlgoliaProviderProps): react_jsx_runtime.JSX.Element;
|
|
509
525
|
declare function useAlgolia(): AlgoliaContextType;
|
|
510
526
|
|
|
511
527
|
declare function AlgoliaResultsCount(): string | null;
|
|
512
528
|
|
|
513
529
|
declare function AlgoliaSortBy(): react_jsx_runtime.JSX.Element | null;
|
|
514
530
|
|
|
515
|
-
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, TextField, createProductListingSearchParams, parseProductListingSearchParams, useAlgolia, useBreakpoint, useCart, useDebouncedCallback, useDisclosure, useFormattedMessage, useGlobalState, useProductCartLine, useScrollLock };
|
|
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 };
|