@soma-vertical-web/multi-lib 0.0.13 → 0.0.14
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/contexts/store/cart.d.ts +1 -0
- package/data/helpers/cart/index.d.ts +188 -0
- package/data/index.d.ts +2 -0
- package/index.js +4 -4
- package/index.mjs +825 -764
- package/layout/team-component/AddToCart/AddToCart.d.ts +1 -1
- package/layout/team-component/AddToCart/Composite/Root.d.ts +1 -1
- package/package.json +1 -1
- package/types/constants.d.ts +2 -0
- package/types/layout/team-components/AddToCart/index.d.ts +9 -3
|
@@ -26,7 +26,7 @@ declare const AddToCart: {
|
|
|
26
26
|
displayName: string;
|
|
27
27
|
};
|
|
28
28
|
Root: {
|
|
29
|
-
({ children, component,
|
|
29
|
+
({ children, component, CONSTANTS, ...props }: import('../../../types/layout/team-components/AddToCart').RootProps): import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
displayName: string;
|
|
31
31
|
};
|
|
32
32
|
Tooltip: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RootProps } from '../../../../types/layout/team-components/AddToCart';
|
|
2
2
|
|
|
3
3
|
declare const Root: {
|
|
4
|
-
({ children, component,
|
|
4
|
+
({ children, component, CONSTANTS, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
7
|
export default Root;
|
package/package.json
CHANGED
package/types/constants.d.ts
CHANGED
|
@@ -21,4 +21,6 @@ export declare const PLP_FILTERS_SORT: {
|
|
|
21
21
|
default_option: string;
|
|
22
22
|
};
|
|
23
23
|
export type Z_INDEX_WARType = Record<string, number>;
|
|
24
|
+
export type ADD_TO_CARTType = Record<string, Record<string, string>>;
|
|
25
|
+
export type TEXTURE_IMAGEType = string;
|
|
24
26
|
export declare const ObjectFitsDefault: readonly ["contain", "cover", "fill", "none"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ObjectFitsDefault, Z_INDEX_WARType } from '../../../constants';
|
|
1
|
+
import { ADD_TO_CARTType, ObjectFitsDefault, TEXTURE_IMAGEType, Z_INDEX_WARType } from '../../../constants';
|
|
2
2
|
import { CartItemStore } from '../../../contexts/store/cart';
|
|
3
3
|
import { Dispatch, HTMLAttributes, MutableRefObject, ReactNode, SetStateAction, VideoHTMLAttributes } from 'react';
|
|
4
4
|
|
|
@@ -9,11 +9,16 @@ export type MenuItems = Array<{
|
|
|
9
9
|
}>;
|
|
10
10
|
export type CartItem = CartItemStore;
|
|
11
11
|
export type ContentProps = HTMLAttributes<HTMLDivElement>;
|
|
12
|
+
type CONSTANTS_TYPE = {
|
|
13
|
+
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
14
|
+
ADD_TO_CART: ADD_TO_CARTType;
|
|
15
|
+
TEXTURE_IMAGE: TEXTURE_IMAGEType;
|
|
16
|
+
};
|
|
12
17
|
export interface RootProps extends HTMLAttributes<HTMLDivElement> {
|
|
13
18
|
component?: ReactNode;
|
|
14
19
|
count: number;
|
|
15
20
|
isMobile?: boolean | null;
|
|
16
|
-
|
|
21
|
+
CONSTANTS: CONSTANTS_TYPE;
|
|
17
22
|
}
|
|
18
23
|
export interface AddToCartContextProps extends RootProps {
|
|
19
24
|
count: number;
|
|
@@ -30,10 +35,11 @@ export interface AddToCartContextProps extends RootProps {
|
|
|
30
35
|
export interface AddToCartProviderProps extends RootProps {
|
|
31
36
|
delay?: number;
|
|
32
37
|
gap?: number;
|
|
38
|
+
CONSTANTS: CONSTANTS_TYPE;
|
|
33
39
|
}
|
|
34
40
|
export interface AddToCartProps {
|
|
35
41
|
title?: string;
|
|
36
|
-
|
|
42
|
+
CONSTANTS: CONSTANTS_TYPE;
|
|
37
43
|
}
|
|
38
44
|
export interface CardContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
39
45
|
item: CartItem;
|