fansunited-frontend-components 0.0.1-RC11 → 0.0.1-RC13
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 +14 -16
- package/components.d.ts +1 -2
- package/components.d.ts.map +1 -1
- package/components.js +2 -4
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -40,13 +40,11 @@ const App: React.FC = () => {
|
|
|
40
40
|
export default App;
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
##
|
|
44
|
-
|
|
45
|
-
### ClassicQuizPlay
|
|
43
|
+
## Classic Quiz Component
|
|
46
44
|
|
|
47
45
|
An interactive quiz component that supports multiple templates and customization options.
|
|
48
46
|
|
|
49
|
-
|
|
47
|
+
### Props
|
|
50
48
|
|
|
51
49
|
All props are defined in `fansunited-frontend-core`.
|
|
52
50
|
|
|
@@ -60,7 +58,7 @@ import {
|
|
|
60
58
|
} from "fansunited-frontend-core";
|
|
61
59
|
```
|
|
62
60
|
|
|
63
|
-
|
|
61
|
+
### Required Props
|
|
64
62
|
|
|
65
63
|
| Prop | Type | Description |
|
|
66
64
|
| ---------- | -------------------- | ------------------------------ |
|
|
@@ -69,7 +67,7 @@ import {
|
|
|
69
67
|
| `template` | `WidgetTemplate` | Widget template type |
|
|
70
68
|
| `language` | `LanguageType` | Display language |
|
|
71
69
|
|
|
72
|
-
|
|
70
|
+
### Optional Props
|
|
73
71
|
|
|
74
72
|
| Prop | Type | Description |
|
|
75
73
|
| ------------------------ | -------------------- | -------------------------------------------------------------- |
|
|
@@ -78,7 +76,7 @@ import {
|
|
|
78
76
|
| `leads` | `LeadsOptions` | Lead collection configuration |
|
|
79
77
|
| `imagePosition` | `"left" \| "right"` | Image position (STANDARD template only) |
|
|
80
78
|
|
|
81
|
-
|
|
79
|
+
### Templates
|
|
82
80
|
|
|
83
81
|
```tsx
|
|
84
82
|
import { WidgetTemplate } from "fansunited-frontend-core";
|
|
@@ -98,7 +96,7 @@ const overlayProps: ClassicQuizPlayProps = {
|
|
|
98
96
|
};
|
|
99
97
|
```
|
|
100
98
|
|
|
101
|
-
|
|
99
|
+
### Theming
|
|
102
100
|
|
|
103
101
|
Customize the appearance using theme options:
|
|
104
102
|
|
|
@@ -246,7 +244,7 @@ const themeOptions: CustomThemeOptions = {
|
|
|
246
244
|
<ClassicQuizPlay {...otherProps} themeOptions={themeOptions} />;
|
|
247
245
|
```
|
|
248
246
|
|
|
249
|
-
|
|
247
|
+
### Lead Collection
|
|
250
248
|
|
|
251
249
|
Enable lead capture functionality:
|
|
252
250
|
|
|
@@ -264,7 +262,7 @@ const leads: LeadsOptions = {
|
|
|
264
262
|
<ClassicQuizPlay {...otherProps} leads={leads} />;
|
|
265
263
|
```
|
|
266
264
|
|
|
267
|
-
|
|
265
|
+
### TypeScript Support
|
|
268
266
|
|
|
269
267
|
This package is built with TypeScript and provides full type definitions. Import types from `fansunited-frontend-core`:
|
|
270
268
|
|
|
@@ -279,7 +277,7 @@ import {
|
|
|
279
277
|
} from "fansunited-frontend-core";
|
|
280
278
|
```
|
|
281
279
|
|
|
282
|
-
|
|
280
|
+
### Peer Dependencies
|
|
283
281
|
|
|
284
282
|
```json
|
|
285
283
|
{
|
|
@@ -288,13 +286,13 @@ import {
|
|
|
288
286
|
}
|
|
289
287
|
```
|
|
290
288
|
|
|
291
|
-
|
|
289
|
+
### Bundle Size
|
|
292
290
|
|
|
293
291
|
The component uses shadow DOM and emotion for isolated styling, ensuring no CSS conflicts with your application.
|
|
294
292
|
|
|
295
|
-
|
|
293
|
+
### Examples
|
|
296
294
|
|
|
297
|
-
|
|
295
|
+
#### Basic Quiz
|
|
298
296
|
|
|
299
297
|
```tsx
|
|
300
298
|
import { ClassicQuizPlay } from "fansunited-frontend-components";
|
|
@@ -308,7 +306,7 @@ import { WidgetTemplate } from "fansunited-frontend-core";
|
|
|
308
306
|
/>;
|
|
309
307
|
```
|
|
310
308
|
|
|
311
|
-
|
|
309
|
+
#### Customized Quiz
|
|
312
310
|
|
|
313
311
|
```tsx
|
|
314
312
|
<ClassicQuizPlay
|
|
@@ -327,6 +325,6 @@ import { WidgetTemplate } from "fansunited-frontend-core";
|
|
|
327
325
|
/>
|
|
328
326
|
```
|
|
329
327
|
|
|
330
|
-
|
|
328
|
+
#### Related Packages
|
|
331
329
|
|
|
332
330
|
- [`fansunited-frontend-core`](https://www.npmjs.com/package/fansunited-frontend-core) - Core types and utilities
|
package/components.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ClassicQuizPlayProps } from 'fansunited-frontend-core';
|
|
2
2
|
|
|
3
|
-
declare const ClassicQuizPlay: React.FC<ClassicQuizPlayProps>;
|
|
4
|
-
export default ClassicQuizPlay;
|
|
3
|
+
export declare const ClassicQuizPlay: React.FC<ClassicQuizPlayProps>;
|
|
5
4
|
//# sourceMappingURL=components.d.ts.map
|
package/components.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/components.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAIhE,
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/components.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAIhE,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CACjC,CAAC"}
|
package/components.js
CHANGED
|
@@ -6812,7 +6812,7 @@ const Cp = (e, t = "theme-mode") => {
|
|
|
6812
6812
|
border: e.border || yd
|
|
6813
6813
|
}
|
|
6814
6814
|
};
|
|
6815
|
-
return
|
|
6815
|
+
return Ii(o);
|
|
6816
6816
|
}, Ep = (e) => {
|
|
6817
6817
|
const t = (e == null ? void 0 : e.mode) || "light", o = (e == null ? void 0 : e.modeStorageKey) || "theme-mode", n = xp(e);
|
|
6818
6818
|
return Ii({
|
|
@@ -29959,9 +29959,7 @@ function Na(e) {
|
|
|
29959
29959
|
const jI = (e) => {
|
|
29960
29960
|
const [t, o] = wt(1), [n, r] = wt(null), [i, s] = wt(!1), [l, c] = wt([]), [d, u] = wt(
|
|
29961
29961
|
[]
|
|
29962
|
-
), [A, f] = wt(!1), [p, h] = wt(!0), [y, I] = wt(0), x = C4(e.entityId, e.sdk), R = y4(e.entityId, e.sdk);
|
|
29963
|
-
console.log("props", e);
|
|
29964
|
-
const E = Ar(() => !x || !R ? !1 : x.maxAttempts === 1 && R.length > 0, [x, R]);
|
|
29962
|
+
), [A, f] = wt(!1), [p, h] = wt(!0), [y, I] = wt(0), x = C4(e.entityId, e.sdk), R = y4(e.entityId, e.sdk), E = Ar(() => !x || !R ? !1 : x.maxAttempts === 1 && R.length > 0, [x, R]);
|
|
29965
29963
|
if (oo(() => {
|
|
29966
29964
|
xm(e.language || "en");
|
|
29967
29965
|
}, [e.language]), oo(() => {
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ClassicQuizPlay } from './components';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fansunited-frontend-components",
|
|
3
|
-
"version": "0.0.1-
|
|
3
|
+
"version": "0.0.1-RC13",
|
|
4
4
|
"description": "Various user centric components for Fans United features",
|
|
5
5
|
"main": "components.js",
|
|
6
6
|
"types": "components.d.ts",
|
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"fansunited-frontend-core": "latest"
|
|
11
11
|
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"fansunited",
|
|
14
|
+
"frontend",
|
|
15
|
+
"components"
|
|
16
|
+
],
|
|
12
17
|
"devDependencies": {
|
|
13
18
|
"vite": "^5.0.0",
|
|
14
19
|
"vite-plugin-dts": "^3.0.0",
|