@thefittingroom/shop-ui 1.2.6 → 1.3.1
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/README.md +82 -2
- package/dist/esm/index.js +98 -43
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +120 -120
- package/dist/esm/init.d.ts +2 -1
- package/dist/esm/styles/index.d.ts +1 -0
- package/dist/esm/tfr-size-rec.d.ts +28 -1
- package/dist/esm/tfr.d.ts +2 -2
- package/package.json +1 -1
package/dist/esm/init.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { FittingRoom, TfrHooks } from './tfr';
|
|
2
|
-
|
|
2
|
+
import { TfrCssVariables } from './tfr-size-rec';
|
|
3
|
+
export declare const initFittingRoom: (shopId: string | number, modalDivId: string, sizeRecMainDivId: string, hooks?: TfrHooks, cssVariables?: TfrCssVariables, env?: string) => Promise<FittingRoom>;
|
|
@@ -1,11 +1,37 @@
|
|
|
1
1
|
import { TfrShop } from '@thefittingroom/sdk';
|
|
2
|
+
export type TfrCssVariables = {
|
|
3
|
+
brandColor?: string;
|
|
4
|
+
black?: string;
|
|
5
|
+
red?: string;
|
|
6
|
+
white?: string;
|
|
7
|
+
muted?: string;
|
|
8
|
+
dark?: string;
|
|
9
|
+
grey?: string;
|
|
10
|
+
lightGrey?: string;
|
|
11
|
+
mainBorderColor?: string;
|
|
12
|
+
mainBorderRadius?: string;
|
|
13
|
+
mainBorderWidth?: string;
|
|
14
|
+
mainBgColor?: string;
|
|
15
|
+
mainWidth?: string;
|
|
16
|
+
mainVPadding?: string;
|
|
17
|
+
mainHPadding?: string;
|
|
18
|
+
mainFont?: string;
|
|
19
|
+
titleFont?: string;
|
|
20
|
+
subtitleFont?: string;
|
|
21
|
+
rowFont?: string;
|
|
22
|
+
ctaFont?: string;
|
|
23
|
+
sizeSelectorTextColor?: string;
|
|
24
|
+
sizeSelectorBgColor?: string;
|
|
25
|
+
sizeSelectorBgColorHover?: string;
|
|
26
|
+
sizeSelectorBgColorActive?: string;
|
|
27
|
+
};
|
|
2
28
|
export declare class TfrSizeRec {
|
|
3
29
|
private readonly tfrShop;
|
|
4
30
|
private readonly onSignInClick;
|
|
5
31
|
private readonly onSignOutClick;
|
|
6
32
|
private readonly sizeRecComponent;
|
|
7
33
|
private readonly perfectFits;
|
|
8
|
-
constructor(sizeRecMainDivId: string, tfrShop: TfrShop, onSignInClick: () => void, onSignOutClick: () => void);
|
|
34
|
+
constructor(sizeRecMainDivId: string, cssVariables: TfrCssVariables, tfrShop: TfrShop, onSignInClick: () => void, onSignOutClick: () => void);
|
|
9
35
|
get sku(): string;
|
|
10
36
|
setSku(sku: string): void;
|
|
11
37
|
setIsLoggedIn(isLoggedIn: boolean): void;
|
|
@@ -14,4 +40,5 @@ export declare class TfrSizeRec {
|
|
|
14
40
|
private getGarmentLocations;
|
|
15
41
|
private getRecommenedSize;
|
|
16
42
|
private getRecommendedSizes;
|
|
43
|
+
private setCssVariables;
|
|
17
44
|
}
|
package/dist/esm/tfr.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TfrShop } from '@thefittingroom/sdk';
|
|
2
2
|
import { TfrModal } from './tfr-modal';
|
|
3
|
-
import { TfrSizeRec } from './tfr-size-rec';
|
|
3
|
+
import { TfrCssVariables, TfrSizeRec } from './tfr-size-rec';
|
|
4
4
|
import * as types from './types';
|
|
5
5
|
export interface TfrHooks {
|
|
6
6
|
onLoading?: () => void;
|
|
@@ -18,7 +18,7 @@ export declare class FittingRoom {
|
|
|
18
18
|
readonly tfrSizeRec: TfrSizeRec;
|
|
19
19
|
private readonly tfrShop;
|
|
20
20
|
private unsub;
|
|
21
|
-
constructor(shopId: string | number, modalDivId: string, sizeRecMainDivId: string, hooks
|
|
21
|
+
constructor(shopId: string | number, modalDivId: string, sizeRecMainDivId: string, hooks: TfrHooks, cssVariables: TfrCssVariables, _env?: string);
|
|
22
22
|
get shop(): TfrShop;
|
|
23
23
|
get sku(): string;
|
|
24
24
|
checkIfPublished(brandStyleIdOrSku: string): Promise<boolean>;
|