@streamlayer/react-ui 0.5.7 → 0.22.0
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 +1 -1
- package/lib/icon-chevron-138a557c.js +4 -0
- package/lib/icon-exit-d3f9fc80.js +4 -0
- package/lib/index-d5620d2c.js +71 -0
- package/lib/index.js +91 -0
- package/lib/lib/demo/Gamification.js +95 -0
- package/lib/lib/demo/Highlights.js +59 -0
- package/lib/lib/demo/Login.js +25 -0
- package/lib/lib/demo/components/EventProvider.js +5 -0
- package/lib/lib/demo/components/Insight.js +31 -0
- package/lib/lib/demo/components/Insights.js +16 -0
- package/lib/lib/demo/components/Question.js +101 -0
- package/lib/lib/demo/components/QuestionsList.js +16 -0
- package/lib/lib/demo/components/UserSummary.js +32 -0
- package/lib/lib/demo/components/index.js +59 -0
- package/lib/lib/demo/index.js +126 -0
- package/lib/lib/demo/styles.js +58 -0
- package/lib/lib/gamification/common-header/index.js +14 -0
- package/lib/lib/gamification/common-header/styles.js +31 -0
- package/lib/lib/gamification/detailed-insight/index.js +29 -0
- package/lib/lib/gamification/detailed-insight/styles.js +62 -0
- package/lib/lib/gamification/insight/index.js +26 -0
- package/lib/lib/gamification/insight/styles.js +65 -0
- package/lib/lib/gamification/insight-list/index.js +11 -0
- package/lib/lib/gamification/insight-list/styles.js +20 -0
- package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-instructions/index.js +10 -0
- package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-instructions/styles.js +30 -0
- package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/index.js +17 -0
- package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/styles.js +55 -0
- package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-rules/index.js +13 -0
- package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-rules/styles.js +43 -0
- package/lib/lib/gamification/onboarding/index.js +66 -0
- package/lib/lib/gamification/onboarding/styles.js +69 -0
- package/lib/lib/gamification/question/index.js +39 -0
- package/{src → lib}/lib/gamification/question/styles.js +30 -28
- package/lib/lib/gamification/question-list/index.js +14 -0
- package/{src → lib}/lib/gamification/question-list/styles.js +11 -9
- package/lib/lib/gamification/user-statistics/components/rank/index.js +10 -0
- package/{src → lib}/lib/gamification/user-statistics/components/rank/styles.js +9 -7
- package/lib/lib/gamification/user-statistics/components/statistics/index.js +10 -0
- package/{src → lib}/lib/gamification/user-statistics/components/statistics/styles.js +7 -5
- package/lib/lib/gamification/user-statistics/index.js +57 -0
- package/{src → lib}/lib/gamification/user-statistics/styles.js +52 -37
- package/lib/lib/gamification/vote/components/voting-header/components/points/index.js +13 -0
- package/{src → lib}/lib/gamification/vote/components/voting-header/components/points/styles.js +13 -11
- package/lib/lib/gamification/vote/components/voting-header/components/timer/index.js +28 -0
- package/lib/lib/gamification/vote/components/voting-header/components/timer/styles.js +8 -0
- package/lib/lib/gamification/vote/components/voting-header/index.js +44 -0
- package/{src → lib}/lib/gamification/vote/components/voting-header/styles.js +22 -19
- package/lib/lib/gamification/vote/components/voting-option/index.js +8 -0
- package/lib/lib/gamification/vote/components/voting-option/styles.js +96 -0
- package/lib/lib/gamification/vote/index.js +51 -0
- package/{src → lib}/lib/gamification/vote/styles.js +21 -19
- package/lib/lib/gamification/vote/types.d.js +1 -0
- package/lib/lib/login/index.js +70 -0
- package/{src/lib/gamification → lib/lib}/login/styles.js +24 -20
- package/lib/lib/notifications/decorator.js +64 -0
- package/lib/lib/notifications/index.js +28 -0
- package/lib/lib/notifications/notification/index.js +36 -0
- package/lib/lib/notifications/notification/onboarding-inapp/index.js +25 -0
- package/lib/lib/notifications/notification/onboarding-inapp/styles.js +77 -0
- package/lib/lib/notifications/notification/question-inapp/index.js +23 -0
- package/lib/lib/notifications/notification/question-inapp/styles.js +61 -0
- package/lib/lib/notifications/notification/styles.js +32 -0
- package/lib/lib/notifications/styles.js +15 -0
- package/lib/lib/theme/constants.js +38 -0
- package/lib/lib/theme/index.js +8 -0
- package/lib/lib/theme/theme.js +27 -0
- package/lib/lib/user-account/index.js +27 -0
- package/lib/lib/user-account/styles.js +80 -0
- package/lib/utils/common.js +4 -0
- package/lib/utils/components/bypassLogin.js +63 -0
- package/lib/utils/components/developer.js +76 -0
- package/lib/utils/components/eventInput.js +56 -0
- package/lib/utils/createDemo.js +46 -0
- package/lib/utils/decorators/container.js +11 -0
- package/lib/utils/decorators/styles.js +27 -0
- package/lib/utils/login.js +25 -0
- package/lib/utils/storage.js +36 -0
- package/lib/utils/useStreamLayerApp.js +25 -0
- package/package.json +49 -23
- package/src/assets/demo-bg.webp +0 -0
- package/src/assets/icons/fedex.svg +0 -7
- package/src/assets/icons/icon-check-green.svg +0 -5
- package/src/assets/icons/icon-check-white.svg +0 -5
- package/src/assets/icons/icon-check.svg +0 -5
- package/src/assets/icons/icon-chevron.svg +0 -5
- package/src/assets/icons/icon-circle-arrow-right.svg +0 -4
- package/src/assets/icons/icon-close.svg +0 -5
- package/src/assets/icons/icon-cross.svg +0 -6
- package/src/assets/icons/icon-exit.svg +0 -5
- package/src/assets/icons/icon-poll.svg +0 -5
- package/src/assets/icons/icon-prediction.svg +0 -5
- package/src/assets/icons/icon-thumb-down.svg +0 -3
- package/src/assets/icons/icon-trivia.svg +0 -5
- package/src/assets/icons/icon-trophy-green.svg +0 -5
- package/src/assets/icons/icon-trophy.svg +0 -5
- package/src/index.d.ts +0 -10
- package/src/index.js +0 -11
- package/src/index.js.map +0 -1
- package/src/lib/demo/Gamification.d.ts +0 -7
- package/src/lib/demo/Gamification.js +0 -30
- package/src/lib/demo/Gamification.js.map +0 -1
- package/src/lib/demo/Login.d.ts +0 -5
- package/src/lib/demo/Login.js +0 -15
- package/src/lib/demo/Login.js.map +0 -1
- package/src/lib/demo/components/InPlayGame.d.ts +0 -6
- package/src/lib/demo/components/InPlayGame.js +0 -6
- package/src/lib/demo/components/InPlayGame.js.map +0 -1
- package/src/lib/demo/components/Notifications.d.ts +0 -6
- package/src/lib/demo/components/Notifications.js +0 -37
- package/src/lib/demo/components/Notifications.js.map +0 -1
- package/src/lib/demo/components/Question.d.ts +0 -7
- package/src/lib/demo/components/Question.js +0 -61
- package/src/lib/demo/components/Question.js.map +0 -1
- package/src/lib/demo/components/QuestionsList.d.ts +0 -6
- package/src/lib/demo/components/QuestionsList.js +0 -13
- package/src/lib/demo/components/QuestionsList.js.map +0 -1
- package/src/lib/demo/components/UserSummary.d.ts +0 -5
- package/src/lib/demo/components/UserSummary.js +0 -11
- package/src/lib/demo/components/UserSummary.js.map +0 -1
- package/src/lib/demo/components/index.d.ts +0 -5
- package/src/lib/demo/components/index.js +0 -6
- package/src/lib/demo/components/index.js.map +0 -1
- package/src/lib/demo/index.d.ts +0 -5
- package/src/lib/demo/index.js +0 -26
- package/src/lib/demo/index.js.map +0 -1
- package/src/lib/demo/styles.d.ts +0 -13
- package/src/lib/demo/styles.js +0 -14
- package/src/lib/demo/styles.js.map +0 -1
- package/src/lib/gamification/inapp/index.d.ts +0 -13
- package/src/lib/gamification/inapp/index.js +0 -12
- package/src/lib/gamification/inapp/index.js.map +0 -1
- package/src/lib/gamification/inapp/styles.d.ts +0 -37
- package/src/lib/gamification/inapp/styles.js +0 -74
- package/src/lib/gamification/inapp/styles.js.map +0 -1
- package/src/lib/gamification/login/index.d.ts +0 -7
- package/src/lib/gamification/login/index.js +0 -54
- package/src/lib/gamification/login/index.js.map +0 -1
- package/src/lib/gamification/login/styles.d.ts +0 -29
- package/src/lib/gamification/login/styles.js.map +0 -1
- package/src/lib/gamification/onboarding/index.d.ts +0 -6
- package/src/lib/gamification/onboarding/index.js +0 -4
- package/src/lib/gamification/onboarding/index.js.map +0 -1
- package/src/lib/gamification/onboarding/styles.d.ts +0 -21
- package/src/lib/gamification/onboarding/styles.js +0 -41
- package/src/lib/gamification/onboarding/styles.js.map +0 -1
- package/src/lib/gamification/question/index.d.ts +0 -5
- package/src/lib/gamification/question/index.js +0 -28
- package/src/lib/gamification/question/index.js.map +0 -1
- package/src/lib/gamification/question/styles.d.ts +0 -45
- package/src/lib/gamification/question/styles.js.map +0 -1
- package/src/lib/gamification/question-list/index.d.ts +0 -8
- package/src/lib/gamification/question-list/index.js +0 -7
- package/src/lib/gamification/question-list/index.js.map +0 -1
- package/src/lib/gamification/question-list/styles.d.ts +0 -13
- package/src/lib/gamification/question-list/styles.js.map +0 -1
- package/src/lib/gamification/user-statistics/components/rank/index.d.ts +0 -7
- package/src/lib/gamification/user-statistics/components/rank/index.js +0 -4
- package/src/lib/gamification/user-statistics/components/rank/index.js.map +0 -1
- package/src/lib/gamification/user-statistics/components/rank/styles.d.ts +0 -13
- package/src/lib/gamification/user-statistics/components/rank/styles.js.map +0 -1
- package/src/lib/gamification/user-statistics/components/statistics/index.d.ts +0 -7
- package/src/lib/gamification/user-statistics/components/statistics/index.js +0 -4
- package/src/lib/gamification/user-statistics/components/statistics/index.js.map +0 -1
- package/src/lib/gamification/user-statistics/components/statistics/styles.d.ts +0 -9
- package/src/lib/gamification/user-statistics/components/statistics/styles.js.map +0 -1
- package/src/lib/gamification/user-statistics/index.d.ts +0 -15
- package/src/lib/gamification/user-statistics/index.js +0 -14
- package/src/lib/gamification/user-statistics/index.js.map +0 -1
- package/src/lib/gamification/user-statistics/styles.d.ts +0 -57
- package/src/lib/gamification/user-statistics/styles.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-header/components/points/index.d.ts +0 -6
- package/src/lib/gamification/vote/components/voting-header/components/points/index.js +0 -4
- package/src/lib/gamification/vote/components/voting-header/components/points/index.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-header/components/points/styles.d.ts +0 -21
- package/src/lib/gamification/vote/components/voting-header/components/points/styles.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-header/components/timer/index.d.ts +0 -8
- package/src/lib/gamification/vote/components/voting-header/components/timer/index.js +0 -19
- package/src/lib/gamification/vote/components/voting-header/components/timer/index.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-header/components/timer/styles.d.ts +0 -7
- package/src/lib/gamification/vote/components/voting-header/components/timer/styles.js +0 -6
- package/src/lib/gamification/vote/components/voting-header/components/timer/styles.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-header/index.d.ts +0 -12
- package/src/lib/gamification/vote/components/voting-header/index.js +0 -17
- package/src/lib/gamification/vote/components/voting-header/index.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-header/styles.d.ts +0 -35
- package/src/lib/gamification/vote/components/voting-header/styles.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-option/index.d.ts +0 -17
- package/src/lib/gamification/vote/components/voting-option/index.js +0 -14
- package/src/lib/gamification/vote/components/voting-option/index.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-option/styles.d.ts +0 -49
- package/src/lib/gamification/vote/components/voting-option/styles.js +0 -85
- package/src/lib/gamification/vote/components/voting-option/styles.js.map +0 -1
- package/src/lib/gamification/vote/index.d.ts +0 -13
- package/src/lib/gamification/vote/index.js +0 -22
- package/src/lib/gamification/vote/index.js.map +0 -1
- package/src/lib/gamification/vote/styles.d.ts +0 -33
- package/src/lib/gamification/vote/styles.js.map +0 -1
- package/src/lib/theme/index.d.ts +0 -4
- package/src/lib/theme/index.js +0 -5
- package/src/lib/theme/index.js.map +0 -1
- package/src/lib/theme/theme.d.ts +0 -41
- package/src/lib/theme/theme.js +0 -35
- package/src/lib/theme/theme.js.map +0 -1
- package/src/utils/login.d.ts +0 -3
- package/src/utils/login.js +0 -28
- package/src/utils/login.js.map +0 -1
package/src/lib/demo/index.d.ts
DELETED
package/src/lib/demo/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { useStore } from '@nanostores/react';
|
|
3
|
-
import { GamificationComponent } from './Gamification';
|
|
4
|
-
import { LoginComponent } from './Login';
|
|
5
|
-
export const Demo = ({ sdk }) => {
|
|
6
|
-
const organization = useStore(sdk.organizationStore());
|
|
7
|
-
const user = useStore(sdk.getUserStore());
|
|
8
|
-
if (organization.loading) {
|
|
9
|
-
return _jsx("div", { children: "authentificating..." });
|
|
10
|
-
}
|
|
11
|
-
if (!organization.data) {
|
|
12
|
-
return _jsx("div", { children: "wrong sdk key..." });
|
|
13
|
-
}
|
|
14
|
-
if (user.loading) {
|
|
15
|
-
return _jsx("div", { children: "authentificating..." });
|
|
16
|
-
}
|
|
17
|
-
if (!user.data) {
|
|
18
|
-
return _jsx(LoginComponent, { sdk: sdk });
|
|
19
|
-
}
|
|
20
|
-
const gamification = sdk.getFeatures().get('games');
|
|
21
|
-
if (!gamification) {
|
|
22
|
-
return _jsx("div", { children: "wait gamification..." });
|
|
23
|
-
}
|
|
24
|
-
return _jsx(GamificationComponent, { gamification: gamification, sdk: sdk });
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/react-ui/src/lib/demo/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC,MAAM,CAAC,MAAM,IAAI,GAAsC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;IACjE,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAA;IACtD,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAA;IAEzC,IAAI,YAAY,CAAC,OAAO,EAAE;QACxB,OAAO,gDAA8B,CAAA;KACtC;IAED,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;QACtB,OAAO,6CAA2B,CAAA;KACnC;IAED,IAAI,IAAI,CAAC,OAAO,EAAE;QAChB,OAAO,gDAA8B,CAAA;KACtC;IAED,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACd,OAAO,KAAC,cAAc,IAAC,GAAG,EAAE,GAAG,GAAI,CAAA;KACpC;IAED,MAAM,YAAY,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,OAAO,CAAiB,CAAA;IAEnE,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO,iDAA+B,CAAA;KACvC;IAED,OAAO,KAAC,qBAAqB,IAAC,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,GAAI,CAAA;AACxE,CAAC,CAAA"}
|
package/src/lib/demo/styles.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const DemoContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
5
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
-
export declare const DemoContainerNotifications: import("@emotion/styled").StyledComponent<{
|
|
7
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
9
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
-
export declare const UserStatisticsContainer: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
package/src/lib/demo/styles.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import styled from '@emotion/styled';
|
|
2
|
-
export const DemoContainer = styled.div `
|
|
3
|
-
position: relative;
|
|
4
|
-
height: 100%;
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
`;
|
|
7
|
-
export const DemoContainerNotifications = styled.div `
|
|
8
|
-
position: absolute;
|
|
9
|
-
width: 100%;
|
|
10
|
-
`;
|
|
11
|
-
export const UserStatisticsContainer = styled.div `
|
|
12
|
-
margin-bottom: 15px;
|
|
13
|
-
`;
|
|
14
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../packages/react-ui/src/lib/demo/styles.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AAEpC,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAItC,CAAA;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGnD,CAAA;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA;;CAEhD,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface InAppProps {
|
|
3
|
-
title: string;
|
|
4
|
-
icon: string;
|
|
5
|
-
color?: string;
|
|
6
|
-
imagePosition?: string;
|
|
7
|
-
imageMode?: string;
|
|
8
|
-
body?: string;
|
|
9
|
-
openVoiting: () => void;
|
|
10
|
-
closeInApp: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const InApp: React.FC<InAppProps>;
|
|
13
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { useCallback } from 'react';
|
|
3
|
-
import closeIcon from '../../../assets/icons/icon-exit.svg';
|
|
4
|
-
import { Container, Content, IconWrap, Icon, TitleWrap, Title, CloseBtnWrap, CloseBtn, CloseIcon } from './styles';
|
|
5
|
-
export const InApp = ({ title = '', icon, color, openVoiting, closeInApp }) => {
|
|
6
|
-
const _closeInApp = useCallback((e) => {
|
|
7
|
-
e.stopPropagation();
|
|
8
|
-
closeInApp();
|
|
9
|
-
}, [closeInApp]);
|
|
10
|
-
return (_jsxs(Container, { onClick: openVoiting, children: [_jsx(IconWrap, { style: color ? { backgroundColor: color } : {}, children: !!icon && _jsx(Icon, { alt: "in-app-icon", src: icon }) }), _jsxs(Content, { children: [_jsx(TitleWrap, { children: _jsx(Title, { id: "in-app-title", children: title }) }), _jsx(CloseBtnWrap, { children: _jsx(CloseBtn, { onClick: _closeInApp, children: _jsx(CloseIcon, { alt: "close-in-app-icon", src: closeIcon }) }) })] })] }));
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/gamification/inapp/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAEnC,OAAO,SAAS,MAAM,qCAAqC,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAalH,MAAM,CAAC,MAAM,KAAK,GAAyB,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,EAAE;IAClG,MAAM,WAAW,GAAG,WAAW,CAC7B,CAAC,CAAsC,EAAE,EAAE;QACzC,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,UAAU,EAAE,CAAA;IACd,CAAC,EACD,CAAC,UAAU,CAAC,CACb,CAAA;IAED,OAAO,CACL,MAAC,SAAS,IAAC,OAAO,EAAE,WAAW,aAC7B,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,YACrD,CAAC,CAAC,IAAI,IAAI,KAAC,IAAI,IAAC,GAAG,EAAC,aAAa,EAAC,GAAG,EAAE,IAAI,GAAI,GACvC,EACX,MAAC,OAAO,eACN,KAAC,SAAS,cACR,KAAC,KAAK,IAAC,EAAE,EAAC,cAAc,YAAE,KAAK,GAAS,GAC9B,EACZ,KAAC,YAAY,cACX,KAAC,QAAQ,IAAC,OAAO,EAAE,WAAW,YAC5B,KAAC,SAAS,IAAC,GAAG,EAAC,mBAAmB,EAAC,GAAG,EAAE,SAAS,GAAI,GAC5C,GACE,IACP,IACA,CACb,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const Container: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
5
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
-
export declare const IconWrap: import("@emotion/styled").StyledComponent<{
|
|
7
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
9
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
-
export declare const Icon: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
}, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
14
|
-
export declare const Content: import("@emotion/styled").StyledComponent<{
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any> | undefined;
|
|
17
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
|
-
export declare const TitleWrap: import("@emotion/styled").StyledComponent<{
|
|
19
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
20
|
-
as?: import("react").ElementType<any> | undefined;
|
|
21
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
22
|
-
export declare const Title: import("@emotion/styled").StyledComponent<{
|
|
23
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
-
as?: import("react").ElementType<any> | undefined;
|
|
25
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
26
|
-
export declare const CloseBtnWrap: import("@emotion/styled").StyledComponent<{
|
|
27
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
28
|
-
as?: import("react").ElementType<any> | undefined;
|
|
29
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
30
|
-
export declare const CloseBtn: import("@emotion/styled").StyledComponent<{
|
|
31
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
32
|
-
as?: import("react").ElementType<any> | undefined;
|
|
33
|
-
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
34
|
-
export declare const CloseIcon: import("@emotion/styled").StyledComponent<{
|
|
35
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
36
|
-
as?: import("react").ElementType<any> | undefined;
|
|
37
|
-
}, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import styled from '@emotion/styled';
|
|
2
|
-
export const Container = styled.div `
|
|
3
|
-
box-sizing: border-box;
|
|
4
|
-
border: ${(props) => `1px solid ${props.theme.COLORS.BLUE_PRIMARY}`};
|
|
5
|
-
border-radius: 13px;
|
|
6
|
-
background-color: ${(props) => props.theme.COLORS.BG_TRANSPARENT};
|
|
7
|
-
color: ${(props) => props.theme.COLORS.WHITE};
|
|
8
|
-
display: flex;
|
|
9
|
-
user-select: none;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
animation: slidein 0.3s ease-in;
|
|
13
|
-
|
|
14
|
-
@keyframes slidein {
|
|
15
|
-
from {
|
|
16
|
-
transform: translateX(-100%);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
to {
|
|
20
|
-
transform: translateX(0);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
export const IconWrap = styled.div `
|
|
25
|
-
display: flex;
|
|
26
|
-
justify-content: center;
|
|
27
|
-
align-items: center;
|
|
28
|
-
padding: 14px;
|
|
29
|
-
background-color: ${(props) => props.theme.COLORS.BLUE_PRIMARY};
|
|
30
|
-
`;
|
|
31
|
-
export const Icon = styled.img `
|
|
32
|
-
max-width: 40px;
|
|
33
|
-
max-height: 40px;
|
|
34
|
-
width: 100%;
|
|
35
|
-
height: 100%;
|
|
36
|
-
border-radius: 50%;
|
|
37
|
-
`;
|
|
38
|
-
export const Content = styled.div `
|
|
39
|
-
display: flex;
|
|
40
|
-
justify-content: space-between;
|
|
41
|
-
width: 100%;
|
|
42
|
-
align-items: center;
|
|
43
|
-
`;
|
|
44
|
-
export const TitleWrap = styled.div `
|
|
45
|
-
padding-left: 20px;
|
|
46
|
-
padding-right: 5px;
|
|
47
|
-
font-weight: 700;
|
|
48
|
-
font-size: 14px;
|
|
49
|
-
flex: 1;
|
|
50
|
-
`;
|
|
51
|
-
export const Title = styled.div `
|
|
52
|
-
display: -webkit-box;
|
|
53
|
-
-webkit-box-orient: vertical;
|
|
54
|
-
-webkit-line-clamp: 2;
|
|
55
|
-
overflow: hidden;
|
|
56
|
-
text-overflow: ellipsis;
|
|
57
|
-
`;
|
|
58
|
-
export const CloseBtnWrap = styled.div `
|
|
59
|
-
padding: 20px;
|
|
60
|
-
`;
|
|
61
|
-
export const CloseBtn = styled.button `
|
|
62
|
-
border: none;
|
|
63
|
-
outline: none;
|
|
64
|
-
background-color: transparent;
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
display: flex;
|
|
67
|
-
justify-content: center;
|
|
68
|
-
align-items: center;
|
|
69
|
-
`;
|
|
70
|
-
export const CloseIcon = styled.img `
|
|
71
|
-
width: 24px;
|
|
72
|
-
height: 24px;
|
|
73
|
-
`;
|
|
74
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/gamification/inapp/styles.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AAEpC,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;YAEvB,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE;;sBAE/C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc;WACvD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;;CAgB7C,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;sBAKZ,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY;CAC/D,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAM7B,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAKhC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAMlC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAM9B,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;CAErC,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAA;;;;;;;;CAQpC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGlC,CAAA"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import PhoneInput, { isValidPhoneNumber, formatPhoneNumberIntl } from 'react-phone-number-input';
|
|
4
|
-
import 'react-phone-number-input/style.css';
|
|
5
|
-
import useDigitInput from 'react-digit-input';
|
|
6
|
-
import * as loginApi from '../../../utils/login';
|
|
7
|
-
import { Timer } from '../vote/components/voting-header/components/timer';
|
|
8
|
-
import { Panel, Digits, Form, FormTitle, FormDescription, FormSubmit, FormInputContainer } from './styles';
|
|
9
|
-
export const Login = ({ login, anonymousLogin, host }) => {
|
|
10
|
-
const [phoneInput, setPhoneInput] = useState('');
|
|
11
|
-
const [phone, setPhone] = useState('');
|
|
12
|
-
const [code, setCode] = useState('');
|
|
13
|
-
const digits = useDigitInput({
|
|
14
|
-
acceptedCharacters: /^[0-9]$/,
|
|
15
|
-
length: 4,
|
|
16
|
-
value: code,
|
|
17
|
-
onChange: setCode,
|
|
18
|
-
});
|
|
19
|
-
const requestCode = async (e) => {
|
|
20
|
-
e.preventDefault();
|
|
21
|
-
try {
|
|
22
|
-
const parsed = phoneInput.replaceAll('+', '');
|
|
23
|
-
try {
|
|
24
|
-
await loginApi.requestLoginCode(host, parsed);
|
|
25
|
-
}
|
|
26
|
-
catch (err) {
|
|
27
|
-
await loginApi.register(host, parsed);
|
|
28
|
-
}
|
|
29
|
-
setPhone(parsed);
|
|
30
|
-
}
|
|
31
|
-
catch (err) {
|
|
32
|
-
window.alert(err);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
const loginByCode = async (e) => {
|
|
36
|
-
e.preventDefault();
|
|
37
|
-
if (phone && code) {
|
|
38
|
-
try {
|
|
39
|
-
const token = await loginApi.login(host, phone, code);
|
|
40
|
-
if (token && login) {
|
|
41
|
-
await login(token);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
console.log('token', token);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
catch (err) {
|
|
48
|
-
window.alert(err);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
return (_jsxs(Panel, { children: [!phone && (_jsxs("div", { children: [_jsxs(Form, { onSubmit: requestCode, children: [_jsx(FormTitle, { children: "Enter your phone number" }), _jsx(FormDescription, { children: "Enter your phone up for number to log in or sign an account." }), _jsx(FormInputContainer, { children: _jsx(PhoneInput, { value: phoneInput, onChange: (val) => setPhoneInput(`${val}`) }) }), _jsx(FormSubmit, { disabled: !isValidPhoneNumber(phoneInput), type: "submit", children: "request code" })] }), anonymousLogin && (_jsx(FormSubmit, { style: { display: 'block', margin: 'auto' }, onClick: anonymousLogin, children: "anonymous login" }))] })), phone && (_jsxs(Form, { onSubmit: loginByCode, children: [_jsx(FormTitle, { children: "Enter Verification Code" }), _jsxs(FormDescription, { children: ["Please enter the verification code ", _jsx("br", {}), "sent to ", _jsx("b", { children: formatPhoneNumberIntl(phoneInput) })] }), _jsxs(Digits, { children: [_jsx("input", { autoFocus: true, inputMode: "decimal", ...digits[0] }), _jsx("input", { inputMode: "decimal", ...digits[1] }), _jsx("input", { inputMode: "decimal", ...digits[2] }), _jsx("input", { inputMode: "decimal", ...digits[3] })] }), _jsx(FormSubmit, { disabled: code.length !== 4, type: "submit", children: "login" }), _jsxs(FormDescription, { children: ["Didn't get 59 the code? ", _jsx("br", {}), "Resend Code in", _jsx(Timer, { duration: 30, setTimeToExpire: () => { }, isPlaying: true })] })] }))] }));
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/gamification/login/index.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const Panel: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
5
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
-
export declare const Form: import("@emotion/styled").StyledComponent<{
|
|
7
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
9
|
-
}, import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, {}>;
|
|
10
|
-
export declare const FormTitle: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
14
|
-
export declare const FormDescription: import("@emotion/styled").StyledComponent<{
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any> | undefined;
|
|
17
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
|
-
export declare const FormSubmit: import("@emotion/styled").StyledComponent<{
|
|
19
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
20
|
-
as?: import("react").ElementType<any> | undefined;
|
|
21
|
-
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
22
|
-
export declare const FormInputContainer: import("@emotion/styled").StyledComponent<{
|
|
23
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
-
as?: import("react").ElementType<any> | undefined;
|
|
25
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
26
|
-
export declare const Digits: import("@emotion/styled").StyledComponent<{
|
|
27
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
28
|
-
as?: import("react").ElementType<any> | undefined;
|
|
29
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/gamification/login/styles.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AAEpC,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;;;sBAGT,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,mBAAmB;;;;CAItE,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAA;;;;;;CAM9B,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGlC,CAAA;AACD,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;CAOxC,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAA;sBACjB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,wBAAwB;;;;;;;;;;;;;CAa3E,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;CAW3C,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;CAU/B,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { Container, Content, Description, Title, OnboardingActionBtn } from './styles';
|
|
3
|
-
export const Onboarding = ({ action }) => (_jsxs(Container, { children: [_jsxs(Content, { children: [_jsx(Description, { children: "Welcome to the" }), _jsx(Title, { children: "Inplay Game" })] }), _jsx(OnboardingActionBtn, { onClick: action, children: "Let\u2019s play" })] }));
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/gamification/onboarding/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAMtF,MAAM,CAAC,MAAM,UAAU,GAA6B,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAClE,MAAC,SAAS,eACR,MAAC,OAAO,eACN,KAAC,WAAW,iCAA6B,EACzC,KAAC,KAAK,8BAAoB,IAClB,EACV,KAAC,mBAAmB,IAAC,OAAO,EAAE,MAAM,gCAAkC,IAC5D,CACb,CAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const Container: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
5
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
-
export declare const Content: import("@emotion/styled").StyledComponent<{
|
|
7
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
9
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
-
export declare const Description: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
14
|
-
export declare const Title: import("@emotion/styled").StyledComponent<{
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any> | undefined;
|
|
17
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
|
-
export declare const OnboardingActionBtn: import("@emotion/styled").StyledComponent<{
|
|
19
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
20
|
-
as?: import("react").ElementType<any> | undefined;
|
|
21
|
-
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import styled from '@emotion/styled';
|
|
2
|
-
export const Container = styled.div `
|
|
3
|
-
box-sizing: border-box;
|
|
4
|
-
display: flex;
|
|
5
|
-
color: ${(props) => props.theme.COLORS.WHITE};
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
height: 100%;
|
|
8
|
-
width: 100%;
|
|
9
|
-
`;
|
|
10
|
-
export const Content = styled.div `
|
|
11
|
-
flex: 1;
|
|
12
|
-
display: flex;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
`;
|
|
17
|
-
export const Description = styled.div `
|
|
18
|
-
font-size: 22px;
|
|
19
|
-
font-weight: 300;
|
|
20
|
-
margin-bottom: 4px;
|
|
21
|
-
`;
|
|
22
|
-
export const Title = styled.div `
|
|
23
|
-
font-size: 26px;
|
|
24
|
-
font-weight: 700;
|
|
25
|
-
`;
|
|
26
|
-
export const OnboardingActionBtn = styled.button `
|
|
27
|
-
color: ${(props) => props.theme.COLORS.WHITE};
|
|
28
|
-
width: 100%;
|
|
29
|
-
border: none;
|
|
30
|
-
outline: none;
|
|
31
|
-
background-color: ${(props) => props.theme.COLORS.GREEN_PRIMARY_BTN};
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
padding: 12px 16px;
|
|
34
|
-
display: flex;
|
|
35
|
-
justify-content: center;
|
|
36
|
-
align-items: center;
|
|
37
|
-
font-size: 16px;
|
|
38
|
-
font-weight: 600;
|
|
39
|
-
border-radius: 6px;
|
|
40
|
-
`;
|
|
41
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/gamification/onboarding/styles.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AAEpC,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;WAGxB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;;;CAI7C,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAMhC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIpC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAG9B,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAA;WACrC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;;;sBAIxB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,iBAAiB;;;;;;;;;CASpE,CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { QuestionType, QuestionStatus, PickHistoryStatus } from '@streamlayer/sdk-web-types';
|
|
3
|
-
import iconPoll from '../../../assets/icons/icon-poll.svg';
|
|
4
|
-
import iconPrediction from '../../../assets/icons/icon-prediction.svg';
|
|
5
|
-
import iconTrivia from '../../../assets/icons/icon-trivia.svg';
|
|
6
|
-
import iconSuccess from '../../../assets/icons/icon-check-green.svg';
|
|
7
|
-
import iconError from '../../../assets/icons/icon-cross.svg';
|
|
8
|
-
import iconChevron from '../../../assets/icons/icon-chevron.svg';
|
|
9
|
-
import { Panel, QuestionTypeIconWrap, QuestionTypeIcon, QuestionContent, QuestionTypeLabel, QuestionSubject, QuestionActionTitle, QuestionActionIcon, QuestionStatusIcon, QuestionTypeTitle, ExpiredQuestion, } from './styles';
|
|
10
|
-
const QuestionTypeData = {
|
|
11
|
-
[QuestionType.POLL]: { label: 'Poll', icon: iconPoll },
|
|
12
|
-
[QuestionType.TRIVIA]: { label: 'Trivia', icon: iconTrivia },
|
|
13
|
-
[QuestionType.PREDICTION]: { label: 'Prediction', icon: iconPrediction },
|
|
14
|
-
};
|
|
15
|
-
const QuestionStatusTypeData = {
|
|
16
|
-
[PickHistoryStatus.LOST]: iconError,
|
|
17
|
-
[PickHistoryStatus.WON]: iconSuccess,
|
|
18
|
-
[PickHistoryStatus.UNSET]: iconChevron,
|
|
19
|
-
[PickHistoryStatus.DNP]: iconChevron,
|
|
20
|
-
};
|
|
21
|
-
export const Question = ({ questionId, questionType, questionStatus, subject, openForVoting, openQuestion, status, }) => {
|
|
22
|
-
const questionTypeData = QuestionTypeData[questionType];
|
|
23
|
-
if (questionTypeData === undefined) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
return (_jsxs(Panel, { onClick: () => openQuestion?.(questionId), children: [_jsx(QuestionTypeIconWrap, { children: _jsx(QuestionTypeIcon, { alt: "question-type-icon", src: questionTypeData.icon }) }), _jsxs(QuestionContent, { children: [_jsxs(QuestionTypeLabel, { children: [_jsx(QuestionTypeTitle, { children: questionTypeData.label }), questionType === QuestionType.TRIVIA && questionStatus === QuestionStatus.RESOLVED && (_jsx(ExpiredQuestion, { children: "Expired" }))] }), _jsx(QuestionSubject, { children: subject || '' })] }), openForVoting ? (_jsx(QuestionActionTitle, { children: "play" })) : (_jsx(QuestionActionIcon, { children: _jsx(QuestionStatusIcon, { alt: "question-status-icon", src: QuestionStatusTypeData[status] }) }))] }));
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/gamification/question/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAoB,MAAM,4BAA4B,CAAA;AAE9G,OAAO,QAAQ,MAAM,qCAAqC,CAAA;AAC1D,OAAO,cAAc,MAAM,2CAA2C,CAAA;AACtE,OAAO,UAAU,MAAM,uCAAuC,CAAA;AAC9D,OAAO,WAAW,MAAM,4CAA4C,CAAA;AACpE,OAAO,SAAS,MAAM,sCAAsC,CAAA;AAC5D,OAAO,WAAW,MAAM,wCAAwC,CAAA;AAEhE,OAAO,EACL,KAAK,EACL,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,UAAU,CAAA;AAEjB,MAAM,gBAAgB,GAAmE;IACvF,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;IACtD,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE;IAC5D,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE;CACzE,CAAA;AAED,MAAM,sBAAsB,GAA+C;IACzE,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,SAAS;IACnC,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,WAAW;IACpC,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,WAAW;IACtC,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,WAAW;CACrC,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAA4E,CAAC,EAChG,UAAU,EACV,YAAY,EACZ,cAAc,EACd,OAAO,EACP,aAAa,EACb,YAAY,EACZ,MAAM,GACP,EAAE,EAAE;IACH,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAA;IAEvD,IAAI,gBAAgB,KAAK,SAAS,EAAE;QAClC,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,CACL,MAAC,KAAK,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE,CAAC,UAAU,CAAC,aAC9C,KAAC,oBAAoB,cACnB,KAAC,gBAAgB,IAAC,GAAG,EAAC,oBAAoB,EAAC,GAAG,EAAE,gBAAgB,CAAC,IAAI,GAAI,GACpD,EACvB,MAAC,eAAe,eACd,MAAC,iBAAiB,eAChB,KAAC,iBAAiB,cAAE,gBAAgB,CAAC,KAAK,GAAqB,EAC9D,YAAY,KAAK,YAAY,CAAC,MAAM,IAAI,cAAc,KAAK,cAAc,CAAC,QAAQ,IAAI,CACrF,KAAC,eAAe,0BAA0B,CAC3C,IACiB,EACpB,KAAC,eAAe,cAAE,OAAO,IAAI,EAAE,GAAmB,IAClC,EACjB,aAAa,CAAC,CAAC,CAAC,CACf,KAAC,mBAAmB,uBAA2B,CAChD,CAAC,CAAC,CAAC,CACF,KAAC,kBAAkB,cACjB,KAAC,kBAAkB,IAAC,GAAG,EAAC,sBAAsB,EAAC,GAAG,EAAE,sBAAsB,CAAC,MAAM,CAAC,GAAI,GACnE,CACtB,IACK,CACT,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const Panel: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
5
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
-
export declare const QuestionTypeIconWrap: import("@emotion/styled").StyledComponent<{
|
|
7
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
9
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
-
export declare const QuestionTypeIcon: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
}, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
14
|
-
export declare const QuestionContent: import("@emotion/styled").StyledComponent<{
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any> | undefined;
|
|
17
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
|
-
export declare const QuestionTypeLabel: import("@emotion/styled").StyledComponent<{
|
|
19
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
20
|
-
as?: import("react").ElementType<any> | undefined;
|
|
21
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
22
|
-
export declare const QuestionSubject: import("@emotion/styled").StyledComponent<{
|
|
23
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
-
as?: import("react").ElementType<any> | undefined;
|
|
25
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
26
|
-
export declare const QuestionActionTitle: import("@emotion/styled").StyledComponent<{
|
|
27
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
28
|
-
as?: import("react").ElementType<any> | undefined;
|
|
29
|
-
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
30
|
-
export declare const QuestionActionIcon: import("@emotion/styled").StyledComponent<{
|
|
31
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
32
|
-
as?: import("react").ElementType<any> | undefined;
|
|
33
|
-
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
34
|
-
export declare const QuestionStatusIcon: import("@emotion/styled").StyledComponent<{
|
|
35
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
36
|
-
as?: import("react").ElementType<any> | undefined;
|
|
37
|
-
}, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
38
|
-
export declare const QuestionTypeTitle: import("@emotion/styled").StyledComponent<{
|
|
39
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
40
|
-
as?: import("react").ElementType<any> | undefined;
|
|
41
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
42
|
-
export declare const ExpiredQuestion: import("@emotion/styled").StyledComponent<{
|
|
43
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
44
|
-
as?: import("react").ElementType<any> | undefined;
|
|
45
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/gamification/question/styles.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AAEpC,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;;;sBAGT,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,mBAAmB;;;;;;;;CAQtE,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAK7C,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGzC,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAMxC,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;WAChC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY;;;;;;;CAOpD,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;WAC9B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;;;;CAK7C,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAA;sBAC1B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,wBAAwB;;;;;;;;;CAS3E,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAA;;;;;;;;CAQ9C,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAG3C,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAA;;CAE3C,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAA;;iBAEzB,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE;;;CAGzE,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { PickHistory } from '@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb';
|
|
3
|
-
interface QuestionListProps {
|
|
4
|
-
questions: PickHistory[];
|
|
5
|
-
openQuestion: (questionId: string) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const QuestionList: React.FC<QuestionListProps>;
|
|
8
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { Question } from '../question';
|
|
3
|
-
import { Container, Title, ItemsContainer } from './styles';
|
|
4
|
-
export const QuestionList = ({ questions, openQuestion }) => {
|
|
5
|
-
return (_jsxs(Container, { children: [_jsx(Title, { children: "PICK HISTORY" }), _jsx(ItemsContainer, { children: questions?.map((props) => (_jsx(Question, { openQuestion: openQuestion, ...props }, props.questionId))) })] }));
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/gamification/question-list/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAO3D,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,EAAE;IACvF,OAAO,CACL,MAAC,SAAS,eACR,KAAC,KAAK,+BAAqB,EAC3B,KAAC,cAAc,cACZ,SAAS,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACzB,KAAC,QAAQ,IAAC,YAAY,EAAE,YAAY,KAA6B,KAAK,IAA3B,KAAK,CAAC,UAAU,CAAe,CAC3E,CAAC,GACa,IACP,CACb,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const Container: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
5
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
-
export declare const Title: import("@emotion/styled").StyledComponent<{
|
|
7
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
9
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
-
export declare const ItemsContainer: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/gamification/question-list/styles.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AAEpC,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAKlC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;WACpB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY;;;;;CAKpD,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;CASvC,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { Container, Indicator, Title } from './styles';
|
|
3
|
-
export const Rank = ({ indicator, title }) => (_jsxs(Container, { children: [_jsx(Title, { children: title }), _jsx(Indicator, { children: indicator })] }));
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-ui/src/lib/gamification/user-statistics/components/rank/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAOtD,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACjE,MAAC,SAAS,eACR,KAAC,KAAK,cAAE,KAAK,GAAS,EACtB,KAAC,SAAS,cAAE,SAAS,GAAa,IACxB,CACb,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const Container: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
5
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
-
export declare const Title: import("@emotion/styled").StyledComponent<{
|
|
7
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
9
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
-
export declare const Indicator: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-ui/src/lib/gamification/user-statistics/components/rank/styles.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AAEpC,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAMlC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;;CAE9B,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;CAOlC,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { Container, Indicator } from './styles';
|
|
3
|
-
export const Statistics = ({ indicator, title }) => (_jsxs(Container, { children: [_jsx(Indicator, { children: indicator }), _jsx("p", { children: title })] }));
|
|
4
|
-
//# sourceMappingURL=index.js.map
|