oneticket-sdk-vi 1.0.2 → 1.0.3
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/index.d.ts +2 -0
- package/dist/src/theme/colors.js +2 -1
- package/index.ts +2 -0
- package/package.json +1 -1
- package/src/theme/colors.ts +2 -1
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export { default as MetroApp } from "./App";
|
2
|
+
import { ColorPalette } from "./src/theme/types";
|
2
3
|
export type SdkConfig = {
|
3
4
|
sdkKey: string;
|
4
5
|
environment: 'preprod' | 'production';
|
@@ -7,6 +8,7 @@ export type SdkConfig = {
|
|
7
8
|
phoneNumber: number;
|
8
9
|
email?: string;
|
9
10
|
};
|
11
|
+
colorPalette?: ColorPalette;
|
10
12
|
};
|
11
13
|
export declare const initializeSdk: (config: SdkConfig) => void;
|
12
14
|
export declare const getSdkConfig: () => SdkConfig;
|
package/dist/src/theme/colors.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.colorPalettes = exports.darkColors = exports.lightColors = void 0;
|
4
|
+
const index_1 = require("../../index");
|
4
5
|
// Base colors
|
5
6
|
const baseColors = {
|
6
7
|
white: '#FFFFFF',
|
@@ -123,7 +124,7 @@ const semanticColors = {
|
|
123
124
|
exports.lightColors = Object.assign(Object.assign(Object.assign(Object.assign({}, baseColors), {
|
124
125
|
// Color palettes
|
125
126
|
// primary: tealPalette,
|
126
|
-
primary: customBluePalette, rose: rosePalette, blue: bluePalette, emerald: emeraldPalette, amber: amberPalette, gray: grayPalette, coolGray: coolGrayPalette }), semanticColors), {
|
127
|
+
primary: (0, index_1.getSdkConfig)().colorPalette || customBluePalette, rose: rosePalette, blue: bluePalette, emerald: emeraldPalette, amber: amberPalette, gray: grayPalette, coolGray: coolGrayPalette }), semanticColors), {
|
127
128
|
// Background colors
|
128
129
|
background: baseColors.white, surface: baseColors.white, surfaceVariant: grayPalette[100],
|
129
130
|
// Text colors
|
package/index.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export {default as MetroApp} from "./App";
|
2
|
+
import { ColorPalette } from "./src/theme/types";
|
2
3
|
|
3
4
|
export type SdkConfig = {
|
4
5
|
sdkKey: string;
|
@@ -8,6 +9,7 @@ export type SdkConfig = {
|
|
8
9
|
phoneNumber: number;
|
9
10
|
email?: string;
|
10
11
|
};
|
12
|
+
colorPalette?: ColorPalette;
|
11
13
|
};
|
12
14
|
let sdkConfig: SdkConfig | null = null;
|
13
15
|
export const initializeSdk = (config: SdkConfig) => {
|
package/package.json
CHANGED
package/src/theme/colors.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { getSdkConfig } from '../../index';
|
1
2
|
import { ColorPalette, ThemeColors } from './types';
|
2
3
|
|
3
4
|
// Base colors
|
@@ -135,7 +136,7 @@ export const lightColors: ThemeColors = {
|
|
135
136
|
|
136
137
|
// Color palettes
|
137
138
|
// primary: tealPalette,
|
138
|
-
primary: customBluePalette,
|
139
|
+
primary: getSdkConfig().colorPalette || customBluePalette,
|
139
140
|
rose: rosePalette,
|
140
141
|
blue: bluePalette,
|
141
142
|
emerald: emeraldPalette,
|