loyalty-protocol 1.1.13 → 1.1.15
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/config/config.js +7 -0
- package/config/ht-kstore-india/index.js +17 -0
- package/config/index.ts +9 -0
- package/config/indian-express/index.js +6 -0
- package/package.json +3 -6
- package/theme/theme.css +228 -0
- package/tsconfig.json +17 -0
package/config/config.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const HT_CONFIG = {
|
|
2
|
+
currency: {
|
|
3
|
+
"K-Cash": {
|
|
4
|
+
name: "Coins",
|
|
5
|
+
logo: "https://images.hindustantimes.com/sso/prod/loyalty-reward-sdk/images/goCoinHT.svg",
|
|
6
|
+
},
|
|
7
|
+
"K-Points": {
|
|
8
|
+
name: "T-Points",
|
|
9
|
+
logo: "https://s2.coinmarketcap.com/static/img/coins/128x128/1958.png",
|
|
10
|
+
},
|
|
11
|
+
rKGeN: {
|
|
12
|
+
name: "T Coin",
|
|
13
|
+
logo: "https://s2.coinmarketcap.com/static/img/coins/128x128/32196.png",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
showHeader: false,
|
|
17
|
+
};
|
package/config/index.ts
ADDED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "loyalty-protocol",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./dist",
|
|
8
|
-
"./config
|
|
8
|
+
"./config": "./config/index.ts",
|
|
9
9
|
"./theme": "./theme/theme.css"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
@@ -21,8 +21,5 @@
|
|
|
21
21
|
"csso-cli": "^4.0.2",
|
|
22
22
|
"tsup": "^8.5.0",
|
|
23
23
|
"typescript": "^5.9.2"
|
|
24
|
-
}
|
|
25
|
-
"files": [
|
|
26
|
-
"dist"
|
|
27
|
-
]
|
|
24
|
+
}
|
|
28
25
|
}
|
package/theme/theme.css
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
[data-theme="light"] {
|
|
2
|
+
--primary-color-base: 140, 255, 5; /* #8cff05 */
|
|
3
|
+
--secondary-color-base: 31, 51, 56; /* #1f3338 */
|
|
4
|
+
--background-color-base: 65, 95, 102; /* #415f66 */
|
|
5
|
+
--tertiary-color-base: 134, 166, 166; /* #86a6a6 */
|
|
6
|
+
--text-color-base: 219, 237, 241; /* #dbedf1 */
|
|
7
|
+
--accent-text-color-base: 190, 220, 218; /* #bedcda */
|
|
8
|
+
|
|
9
|
+
--error-color-base: 255, 115, 115; /* #ff7373 */
|
|
10
|
+
|
|
11
|
+
--white-base: 255, 255, 255; /* #ffffff */
|
|
12
|
+
--black-base: 0, 0, 0; /* #000000 */
|
|
13
|
+
--processing-color-base: 255, 158, 44; /* #ff9e2c */
|
|
14
|
+
--partial-color-base: 255, 195, 44; /* #ffc32c */
|
|
15
|
+
--success-color-base: 38, 216, 109; /* #26d86d */
|
|
16
|
+
--failed-color-base: 255, 115, 115; /* #ff7373 */
|
|
17
|
+
|
|
18
|
+
--trim: "Trim";
|
|
19
|
+
--trim-mono: "Trim-Mono";
|
|
20
|
+
--trim-poster: "Trim-Poster";
|
|
21
|
+
--trim-poster-lean: "Trim-Poster-Lean";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[data-theme="dark"] {
|
|
25
|
+
--primary-color-base: 140, 255, 5; /* #8cff05 */
|
|
26
|
+
--secondary-color-base: 31, 51, 56; /* #1f3338 */
|
|
27
|
+
--background-color-base: 65, 95, 102; /* #415f66 */
|
|
28
|
+
--tertiary-color-base: 134, 166, 166; /* #86a6a6 */
|
|
29
|
+
--text-color-base: 219, 237, 241; /* #dbedf1 */
|
|
30
|
+
--accent-text-color-base: 190, 220, 218; /* #bedcda */
|
|
31
|
+
|
|
32
|
+
--error-color-base: 255, 115, 115; /* #ff7373 */
|
|
33
|
+
--white-base: 255, 255, 255; /* #ffffff */
|
|
34
|
+
--black-base: 0, 0, 0; /* #000000 */
|
|
35
|
+
--processing-color-base: 255, 158, 44; /* #ff9e2c */
|
|
36
|
+
--partial-color-base: 255, 195, 44; /* #ffc32c */
|
|
37
|
+
--success-color-base: 38, 216, 109; /* #26d86d */
|
|
38
|
+
--failed-color-base: 255, 115, 115; /* #ff7373 */
|
|
39
|
+
|
|
40
|
+
--trim: "Trim";
|
|
41
|
+
--trim-mono: "Trim-Mono";
|
|
42
|
+
--trim-poster: "Trim-Poster";
|
|
43
|
+
--trim-poster-lean: "Trim-Poster-Lean";
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[data-theme="kgen"] {
|
|
47
|
+
--primary-color-base: 140, 255, 5; /* #8cff05 */
|
|
48
|
+
--secondary-color-base: 31, 51, 56; /* #1f3338 */
|
|
49
|
+
--background-color-base: 65, 95, 102; /* #415f66 */
|
|
50
|
+
--tertiary-color-base: 134, 166, 166; /* #86a6a6 */
|
|
51
|
+
--text-color-base: 219, 237, 241; /* #dbedf1 */
|
|
52
|
+
--accent-text-color-base: 190, 220, 218; /* #bedcda */
|
|
53
|
+
|
|
54
|
+
--error-color-base: 255, 115, 115; /* #ff7373 */
|
|
55
|
+
--white-base: 255, 255, 255; /* #ffffff */
|
|
56
|
+
--black-base: 0, 0, 0; /* #000000 */
|
|
57
|
+
--processing-color-base: 255, 158, 44; /* #ff9e2c */
|
|
58
|
+
--partial-color-base: 255, 195, 44; /* #ffc32c */
|
|
59
|
+
--success-color-base: 38, 216, 109; /* #26d86d */
|
|
60
|
+
--failed-color-base: 255, 115, 115; /* #ff7373 */
|
|
61
|
+
|
|
62
|
+
--trim: "Trim";
|
|
63
|
+
--trim-mono: "Trim-Mono";
|
|
64
|
+
--trim-poster: "Trim-Poster";
|
|
65
|
+
--trim-poster-lean: "Trim-Poster-Lean";
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-theme="ht-kstore-india"] {
|
|
69
|
+
--primary-color-base: 0, 157, 182; /* #009db6 */
|
|
70
|
+
--secondary-color-base: 255, 255, 255; /* #ffffff */
|
|
71
|
+
--background-color-base: 219, 219, 219; /* #1f3338 */
|
|
72
|
+
--tertiary-color-base: 220, 218, 218; /* #dcdada */
|
|
73
|
+
--text-color-base: 0, 0, 0; /* #000000 */
|
|
74
|
+
--accent-text-color-base: 68, 68, 68; /* #444444 */
|
|
75
|
+
|
|
76
|
+
--error-color-base: 255, 115, 115; /* #ff7373 */
|
|
77
|
+
--white-base: 255, 255, 255; /* #ffffff */
|
|
78
|
+
--black-base: 0, 0, 0; /* #000000 */
|
|
79
|
+
--processing-color-base: 255, 158, 44; /* #ff9e2c */
|
|
80
|
+
--partial-color-base: 255, 195, 44; /* #ffc32c */
|
|
81
|
+
--success-color-base: 38, 216, 109; /* #26d86d */
|
|
82
|
+
--failed-color-base: 255, 115, 115; /* #ff7373 */
|
|
83
|
+
|
|
84
|
+
--trim: "Trim";
|
|
85
|
+
--trim-mono: "Trim-Mono";
|
|
86
|
+
--trim-poster: "Trim-Poster";
|
|
87
|
+
--trim-poster-lean: "Trim-Poster-Lean";
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
[data-theme="indian-express"] {
|
|
91
|
+
--primary-color-base: 255, 157, 182; /* #ff9db6 */
|
|
92
|
+
--secondary-color-base: 255, 255, 255; /* #ffffff */
|
|
93
|
+
--background-color-base: 31, 51, 56; /* #1f3338 */
|
|
94
|
+
--tertiary-color-base: 220, 218, 218; /* #dcdada */
|
|
95
|
+
--text-color-base: 0, 0, 0; /* #000000 */
|
|
96
|
+
--accent-text-color-base: 68, 68, 68; /* #444444 */
|
|
97
|
+
|
|
98
|
+
--error-color-base: 255, 115, 115; /* #ff7373 */
|
|
99
|
+
--white-base: 255, 255, 255; /* #ffffff */
|
|
100
|
+
--black-base: 0, 0, 0; /* #000000 */
|
|
101
|
+
--processing-color-base: 255, 158, 44; /* #ff9e2c */
|
|
102
|
+
--partial-color-base: 255, 195, 44; /* #ffc32c */
|
|
103
|
+
--success-color-base: 38, 216, 109; /* #26d86d */
|
|
104
|
+
--failed-color-base: 255, 115, 115; /* #ff7373 */
|
|
105
|
+
|
|
106
|
+
--trim: "Trim";
|
|
107
|
+
--trim-mono: "Trim-Mono";
|
|
108
|
+
--trim-poster: "Trim-Poster";
|
|
109
|
+
--trim-poster-lean: "Trim-Poster-Lean";
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:root {
|
|
113
|
+
--primary-color: rgba(var(--primary-color-base));
|
|
114
|
+
--primary-color-10: rgba(var(--primary-color-base), 0.1);
|
|
115
|
+
--primary-color-20: rgba(var(--primary-color-base), 0.2);
|
|
116
|
+
--primary-color-25: rgba(var(--primary-color-base), 0.25);
|
|
117
|
+
--primary-color-30: rgba(var(--primary-color-base), 0.3);
|
|
118
|
+
--primary-color-40: rgba(var(--primary-color-base), 0.4);
|
|
119
|
+
--primary-color-50: rgba(var(--primary-color-base), 0.5);
|
|
120
|
+
--primary-color-60: rgba(var(--primary-color-base), 0.6);
|
|
121
|
+
--primary-color-70: rgba(var(--primary-color-base), 0.7);
|
|
122
|
+
--primary-color-75: rgba(var(--primary-color-base), 0.75);
|
|
123
|
+
--primary-color-80: rgba(var(--primary-color-base), 0.8);
|
|
124
|
+
--primary-color-90: rgba(var(--primary-color-base), 0.9);
|
|
125
|
+
|
|
126
|
+
--secondary-color: rgba(var(--secondary-color-base));
|
|
127
|
+
--secondary-color-10: rgba(var(--secondary-color-base), 0.1);
|
|
128
|
+
--secondary-color-15: rgba(var(--secondary-color-base), 0.15);
|
|
129
|
+
--secondary-color-20: rgba(var(--secondary-color-base), 0.2);
|
|
130
|
+
--secondary-color-25: rgba(var(--secondary-color-base), 0.25);
|
|
131
|
+
--secondary-color-30: rgba(var(--secondary-color-base), 0.3);
|
|
132
|
+
--secondary-color-40: rgba(var(--secondary-color-base), 0.4);
|
|
133
|
+
--secondary-color-50: rgba(var(--secondary-color-base), 0.5);
|
|
134
|
+
--secondary-color-60: rgba(var(--secondary-color-base), 0.6);
|
|
135
|
+
--secondary-color-70: rgba(var(--secondary-color-base), 0.7);
|
|
136
|
+
--secondary-color-75: rgba(var(--secondary-color-base), 0.75);
|
|
137
|
+
--secondary-color-80: rgba(var(--secondary-color-base), 0.8);
|
|
138
|
+
--secondary-color-90: rgba(var(--secondary-color-base), 0.9);
|
|
139
|
+
|
|
140
|
+
--background-color: rgba(var(--background-color-base));
|
|
141
|
+
--background-color-10: rgba(var(--background-color-base), 0.1);
|
|
142
|
+
--background-color-15: rgba(var(--background-color-base), 0.15);
|
|
143
|
+
--background-color-20: rgba(var(--background-color-base), 0.2);
|
|
144
|
+
--background-color-25: rgba(var(--background-color-base), 0.25);
|
|
145
|
+
--background-color-30: rgba(var(--background-color-base), 0.3);
|
|
146
|
+
--background-color-40: rgba(var(--background-color-base), 0.4);
|
|
147
|
+
--background-color-50: rgba(var(--background-color-base), 0.5);
|
|
148
|
+
--background-color-60: rgba(var(--background-color-base), 0.6);
|
|
149
|
+
--background-color-70: rgba(var(--background-color-base), 0.7);
|
|
150
|
+
--background-color-75: rgba(var(--background-color-base), 0.75);
|
|
151
|
+
--background-color-80: rgba(var(--background-color-base), 0.8);
|
|
152
|
+
--background-color-85: rgba(var(--background-color-base), 0.85);
|
|
153
|
+
--background-color-90: rgba(var(--background-color-base), 0.9);
|
|
154
|
+
|
|
155
|
+
--tertiary-color: rgba(var(--tertiary-color-base));
|
|
156
|
+
--tertiary-color-10: rgba(var(--tertiary-color-base), 0.1);
|
|
157
|
+
--tertiary-color-20: rgba(var(--tertiary-color-base), 0.2);
|
|
158
|
+
--tertiary-color-25: rgba(var(--tertiary-color-base), 0.25);
|
|
159
|
+
--tertiary-color-30: rgba(var(--tertiary-color-base), 0.3);
|
|
160
|
+
--tertiary-color-40: rgba(var(--tertiary-color-base), 0.4);
|
|
161
|
+
--tertiary-color-50: rgba(var(--tertiary-color-base), 0.5);
|
|
162
|
+
--tertiary-color-60: rgba(var(--tertiary-color-base), 0.6);
|
|
163
|
+
--tertiary-color-70: rgba(var(--tertiary-color-base), 0.7);
|
|
164
|
+
--tertiary-color-75: rgba(var(--tertiary-color-base), 0.75);
|
|
165
|
+
--tertiary-color-80: rgba(var(--tertiary-color-base), 0.8);
|
|
166
|
+
--tertiary-color-90: rgba(var(--tertiary-color-base), 0.9);
|
|
167
|
+
|
|
168
|
+
--text-color: rgba(var(--text-color-base));
|
|
169
|
+
--text-color-10: rgba(var(--text-color-base), 0.1);
|
|
170
|
+
--text-color-20: rgba(var(--text-color-base), 0.2);
|
|
171
|
+
--text-color-25: rgba(var(--text-color-base), 0.25);
|
|
172
|
+
--text-color-30: rgba(var(--text-color-base), 0.3);
|
|
173
|
+
--text-color-40: rgba(var(--text-color-base), 0.4);
|
|
174
|
+
--text-color-50: rgba(var(--text-color-base), 0.5);
|
|
175
|
+
--text-color-60: rgba(var(--text-color-base), 0.6);
|
|
176
|
+
--text-color-70: rgba(var(--text-color-base), 0.7);
|
|
177
|
+
--text-color-75: rgba(var(--text-color-base), 0.75);
|
|
178
|
+
--text-color-80: rgba(var(--text-color-base), 0.8);
|
|
179
|
+
--text-color-90: rgba(var(--text-color-base), 0.9);
|
|
180
|
+
|
|
181
|
+
--accent-text-color: rgba(var(--accent-text-color-base));
|
|
182
|
+
--accent-text-color-10: rgba(var(--accent-text-color-base), 0.1);
|
|
183
|
+
--accent-text-color-20: rgba(var(--accent-text-color-base), 0.2);
|
|
184
|
+
--accent-text-color-25: rgba(var(--accent-text-color-base), 0.25);
|
|
185
|
+
--accent-text-color-30: rgba(var(--accent-text-color-base), 0.3);
|
|
186
|
+
--accent-text-color-40: rgba(var(--accent-text-color-base), 0.4);
|
|
187
|
+
--accent-text-color-50: rgba(var(--accent-text-color-base), 0.5);
|
|
188
|
+
--accent-text-color-60: rgba(var(--accent-text-color-base), 0.6);
|
|
189
|
+
--accent-text-color-70: rgba(var(--accent-text-color-base), 0.7);
|
|
190
|
+
--accent-text-color-75: rgba(var(--accent-text-color-base), 0.75);
|
|
191
|
+
--accent-text-color-80: rgba(var(--accent-text-color-base), 0.8);
|
|
192
|
+
--accent-text-color-90: rgba(var(--accent-text-color-base), 0.9);
|
|
193
|
+
|
|
194
|
+
--error-text-color: rgba(var(--error-color-base));
|
|
195
|
+
|
|
196
|
+
--error-background-color: rgba(var(--error-color-base), 0.15);
|
|
197
|
+
|
|
198
|
+
--black: rgba(var(--black-base));
|
|
199
|
+
--black-10: rgba(var(--black-base), 0.1);
|
|
200
|
+
--black-20: rgba(var(--black-base), 0.2);
|
|
201
|
+
--black-25: rgba(var(--black-base), 0.25);
|
|
202
|
+
--black-30: rgba(var(--black-base), 0.3);
|
|
203
|
+
--black-40: rgba(var(--black-base), 0.4);
|
|
204
|
+
--black-50: rgba(var(--black-base), 0.5);
|
|
205
|
+
--black-60: rgba(var(--black-base), 0.6);
|
|
206
|
+
--black-70: rgba(var(--black-base), 0.7);
|
|
207
|
+
--black-75: rgba(var(--black-base), 0.75);
|
|
208
|
+
--black-80: rgba(var(--black-base), 0.8);
|
|
209
|
+
--black-90: rgba(var(--black-base), 0.9);
|
|
210
|
+
|
|
211
|
+
--white: rgba(var(--white-base));
|
|
212
|
+
--white-10: rgba(var(--white-base), 0.1);
|
|
213
|
+
--white-20: rgba(var(--white-base), 0.2);
|
|
214
|
+
--white-25: rgba(var(--white-base), 0.25);
|
|
215
|
+
--white-30: rgba(var(--white-base), 0.3);
|
|
216
|
+
--white-40: rgba(var(--white-base), 0.4);
|
|
217
|
+
--white-50: rgba(var(--white-base), 0.5);
|
|
218
|
+
--white-60: rgba(var(--white-base), 0.6);
|
|
219
|
+
--white-70: rgba(var(--white-base), 0.7);
|
|
220
|
+
--white-75: rgba(var(--white-base), 0.75);
|
|
221
|
+
--white-80: rgba(var(--white-base), 0.8);
|
|
222
|
+
--white-90: rgba(var(--white-base), 0.9);
|
|
223
|
+
|
|
224
|
+
--processing-color: rgba(var(--processing-color-base));
|
|
225
|
+
--partial-color: rgba(var(--partial-color-base));
|
|
226
|
+
--success-color: rgba(var(--success-color-base));
|
|
227
|
+
--failed-color: rgba(var(--failed-color-base));
|
|
228
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"outDir": "dist",
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"moduleResolution": "Node",
|
|
10
|
+
"jsx": "react-jsx",
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"strict": true,
|
|
13
|
+
"skipLibCheck": true
|
|
14
|
+
},
|
|
15
|
+
"include": ["src/**.*", "index.ts"],
|
|
16
|
+
"exclude": ["node_modules", "dist"]
|
|
17
|
+
}
|