@cuemath/leap 3.3.15-j2 → 3.3.15-j6

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.
@@ -1,24 +1,23 @@
1
- import { jsxs as r, jsx as e, Fragment as s } from "react/jsx-runtime";
2
- import { memo as d } from "react";
3
- import { useTheme as $ } from "styled-components";
4
- import { ILLUSTRATIONS as m } from "../../../assets/illustrations/illustrations.js";
5
- import f from "../../ui/image/image.js";
6
- import t from "../../ui/layout/flex-view.js";
7
- import o from "../../ui/separator/separator.js";
8
- import n from "../../ui/text/text.js";
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import { memo as s } from "react";
3
+ import { useTheme as p } from "styled-components";
4
+ import { ILLUSTRATIONS as f } from "../../../assets/illustrations/illustrations.js";
5
+ import l from "../../ui/image/image.js";
6
+ import h from "../../ui/layout/flex-view.js";
7
+ import t from "../../ui/separator/separator.js";
8
+ import T from "../../ui/text/text.js";
9
9
  import { EDeviceType as g } from "../../ui/theme/constants.js";
10
- import T from "../comps/overlay-loader/overlay-loader.js";
11
- import u from "../comps/user-list/user-list.js";
12
- import { ImageWrapper as w } from "./account-selector-styled.js";
13
- const L = ({
14
- userAccounts: i,
15
- onSelect: c,
16
- onAddNew: h,
17
- isLoading: l
10
+ import $ from "../comps/overlay-loader/overlay-loader.js";
11
+ import d from "../comps/user-list/user-list.js";
12
+ const u = ({
13
+ userAccounts: r,
14
+ onSelect: o,
15
+ onAddNew: m,
16
+ isLoading: i
18
17
  }) => {
19
- const { device: p } = $(), a = p <= g.TABLET;
20
- return /* @__PURE__ */ r(
21
- t,
18
+ const { device: n } = p(), c = n <= g.TABLET;
19
+ return /* @__PURE__ */ a(
20
+ h,
22
21
  {
23
22
  $flex: 1,
24
23
  $alignItems: "center",
@@ -27,44 +26,17 @@ const L = ({
27
26
  $height: "100%",
28
27
  $gapX: 2,
29
28
  children: [
30
- /* @__PURE__ */ e(T, { isLoading: l }),
31
- /* @__PURE__ */ e(f, { src: m.CIRCLE_CUEMATH_LOGO_WHITE, alt: "Parent Signup", withLoader: !1 }),
32
- /* @__PURE__ */ e(o, { heightX: 1 }),
33
- /* @__PURE__ */ e(n, { $renderAs: "ab1", $color: "WHITE_T_60", $align: "center", children: "Switch between accounts" }),
34
- /* @__PURE__ */ e(o, { heightX: a ? 1.5 : 5 }),
35
- i.length > 0 && /* @__PURE__ */ r(s, { children: [
36
- /* @__PURE__ */ e(u, { users: i, onSelect: c, onAddNew: h }),
37
- /* @__PURE__ */ e(o, { heightX: a ? 1.5 : 5 }),
38
- /* @__PURE__ */ r(
39
- t,
40
- {
41
- $gutterX: 0.5,
42
- $gapX: 1,
43
- $flexGapX: 0.5,
44
- $width: 280,
45
- $borderColor: "BLACK_5",
46
- $background: "BLACK_3",
47
- $flexDirection: "row",
48
- children: [
49
- /* @__PURE__ */ e(
50
- w,
51
- {
52
- src: m.CUEMATH_APP_QR_CODE,
53
- width: 80,
54
- height: 80,
55
- withLoader: !1
56
- }
57
- ),
58
- /* @__PURE__ */ e(t, { $gapX: 0.5, $flex: 1, children: /* @__PURE__ */ e(n, { $color: "WHITE", $renderOnTabletAs: "ab3", $renderAs: "ab2", children: "Download the cuemath app to view your children’s report" }) })
59
- ]
60
- }
61
- )
62
- ] })
29
+ /* @__PURE__ */ e($, { isLoading: i }),
30
+ /* @__PURE__ */ e(l, { src: f.CIRCLE_CUEMATH_LOGO_WHITE, alt: "Parent Signup", withLoader: !1 }),
31
+ /* @__PURE__ */ e(t, { heightX: 1 }),
32
+ /* @__PURE__ */ e(T, { $renderAs: "ab1", $color: "WHITE_T_60", $align: "center", children: "Switch between accounts" }),
33
+ /* @__PURE__ */ e(t, { heightX: c ? 1.5 : 5 }),
34
+ r.length > 0 && /* @__PURE__ */ e(d, { users: r, onSelect: o, onAddNew: m, maxColumns: 3 })
63
35
  ]
64
36
  }
65
37
  );
66
- }, y = d(L);
38
+ }, v = s(u);
67
39
  export {
68
- y as default
40
+ v as default
69
41
  };
70
42
  //# sourceMappingURL=account-selector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"account-selector.js","sources":["../../../../src/features/auth/account-selector/account-selector.tsx"],"sourcesContent":["import type { IAccountSelectorViewProps } from './account-selector-types';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { EDeviceType } from '../../ui/theme/constants';\nimport OverlayLoader from '../comps/overlay-loader/overlay-loader';\nimport UserList from '../comps/user-list/user-list';\nimport * as Styled from './account-selector-styled';\n\nconst AccountSelector = ({\n userAccounts,\n onSelect,\n onAddNew,\n isLoading,\n}: IAccountSelectorViewProps) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n\n return (\n <FlexView\n $flex={1}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n $gapX={2}\n >\n <OverlayLoader isLoading={isLoading} />\n <Image src={ILLUSTRATIONS.CIRCLE_CUEMATH_LOGO_WHITE} alt=\"Parent Signup\" withLoader={false} />\n <Separator heightX={1} />\n <Text $renderAs=\"ab1\" $color=\"WHITE_T_60\" $align=\"center\">\n Switch between accounts\n </Text>\n <Separator heightX={isCompact ? 1.5 : 5} />\n {userAccounts.length > 0 && (\n <>\n <UserList users={userAccounts} onSelect={onSelect} onAddNew={onAddNew} />\n <Separator heightX={isCompact ? 1.5 : 5} />\n <FlexView\n $gutterX={0.5}\n $gapX={1}\n $flexGapX={0.5}\n $width={280}\n $borderColor=\"BLACK_5\"\n $background=\"BLACK_3\"\n $flexDirection=\"row\"\n >\n <Styled.ImageWrapper\n src={ILLUSTRATIONS.CUEMATH_APP_QR_CODE}\n width={80}\n height={80}\n withLoader={false}\n />\n <FlexView $gapX={0.5} $flex={1}>\n <Text $color=\"WHITE\" $renderOnTabletAs=\"ab3\" $renderAs=\"ab2\">\n Download the cuemath app to view your children’s report\n </Text>\n </FlexView>\n </FlexView>\n </>\n )}\n </FlexView>\n );\n};\n\nexport default memo(AccountSelector);\n"],"names":["AccountSelector","userAccounts","onSelect","onAddNew","isLoading","device","useTheme","isCompact","EDeviceType","jsxs","FlexView","jsx","OverlayLoader","Image","ILLUSTRATIONS","Separator","Text","Fragment","UserList","Styled.ImageWrapper","accountSelector","memo"],"mappings":";;;;;;;;;;;;AAeA,MAAMA,IAAkB,CAAC;AAAA,EACvB,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,MAAiC;AACzB,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAYF,KAAUG,EAAY;AAGtC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,OAAO;AAAA,MAEP,UAAA;AAAA,QAAA,gBAAAC,EAACC,KAAc,WAAAR,GAAsB;AAAA,QACrC,gBAAAO,EAACE,KAAM,KAAKC,EAAc,2BAA2B,KAAI,iBAAgB,YAAY,IAAO;AAAA,QAC5F,gBAAAH,EAACI,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,QACvB,gBAAAJ,EAACK,KAAK,WAAU,OAAM,QAAO,cAAa,QAAO,UAAS,UAE1D,0BAAA,CAAA;AAAA,QACC,gBAAAL,EAAAI,GAAA,EAAU,SAASR,IAAY,MAAM,GAAG;AAAA,QACxCN,EAAa,SAAS,KAEnB,gBAAAQ,EAAAQ,GAAA,EAAA,UAAA;AAAA,UAAA,gBAAAN,EAACO,GAAS,EAAA,OAAOjB,GAAc,UAAAC,GAAoB,UAAAC,GAAoB;AAAA,UACtE,gBAAAQ,EAAAI,GAAA,EAAU,SAASR,IAAY,MAAM,GAAG;AAAA,UACzC,gBAAAE;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,UAAU;AAAA,cACV,OAAO;AAAA,cACP,WAAW;AAAA,cACX,QAAQ;AAAA,cACR,cAAa;AAAA,cACb,aAAY;AAAA,cACZ,gBAAe;AAAA,cAEf,UAAA;AAAA,gBAAA,gBAAAC;AAAA,kBAACQ;AAAAA,kBAAA;AAAA,oBACC,KAAKL,EAAc;AAAA,oBACnB,OAAO;AAAA,oBACP,QAAQ;AAAA,oBACR,YAAY;AAAA,kBAAA;AAAA,gBACd;AAAA,gBACC,gBAAAH,EAAAD,GAAA,EAAS,OAAO,KAAK,OAAO,GAC3B,UAAA,gBAAAC,EAACK,GAAK,EAAA,QAAO,SAAQ,mBAAkB,OAAM,WAAU,OAAM,oEAE7D,CAAA,GACF;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,GAEeI,IAAAC,EAAKrB,CAAe;"}
1
+ {"version":3,"file":"account-selector.js","sources":["../../../../src/features/auth/account-selector/account-selector.tsx"],"sourcesContent":["import type { IAccountSelectorViewProps } from './account-selector-types';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { EDeviceType } from '../../ui/theme/constants';\nimport OverlayLoader from '../comps/overlay-loader/overlay-loader';\nimport UserList from '../comps/user-list/user-list';\n\nconst AccountSelector = ({\n userAccounts,\n onSelect,\n onAddNew,\n isLoading,\n}: IAccountSelectorViewProps) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n\n return (\n <FlexView\n $flex={1}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n $gapX={2}\n >\n <OverlayLoader isLoading={isLoading} />\n <Image src={ILLUSTRATIONS.CIRCLE_CUEMATH_LOGO_WHITE} alt=\"Parent Signup\" withLoader={false} />\n <Separator heightX={1} />\n <Text $renderAs=\"ab1\" $color=\"WHITE_T_60\" $align=\"center\">\n Switch between accounts\n </Text>\n <Separator heightX={isCompact ? 1.5 : 5} />\n {userAccounts.length > 0 && (\n <UserList users={userAccounts} onSelect={onSelect} onAddNew={onAddNew} maxColumns={3} />\n )}\n </FlexView>\n );\n};\n\nexport default memo(AccountSelector);\n"],"names":["AccountSelector","userAccounts","onSelect","onAddNew","isLoading","device","useTheme","isCompact","EDeviceType","jsxs","FlexView","jsx","OverlayLoader","Image","ILLUSTRATIONS","Separator","Text","UserList","accountSelector","memo"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAkB,CAAC;AAAA,EACvB,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,MAAiC;AACzB,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAYF,KAAUG,EAAY;AAGtC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,OAAO;AAAA,MAEP,UAAA;AAAA,QAAA,gBAAAC,EAACC,KAAc,WAAAR,GAAsB;AAAA,QACrC,gBAAAO,EAACE,KAAM,KAAKC,EAAc,2BAA2B,KAAI,iBAAgB,YAAY,IAAO;AAAA,QAC5F,gBAAAH,EAACI,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,QACvB,gBAAAJ,EAACK,KAAK,WAAU,OAAM,QAAO,cAAa,QAAO,UAAS,UAE1D,0BAAA,CAAA;AAAA,QACC,gBAAAL,EAAAI,GAAA,EAAU,SAASR,IAAY,MAAM,GAAG;AAAA,QACxCN,EAAa,SAAS,KACpB,gBAAAU,EAAAM,GAAA,EAAS,OAAOhB,GAAc,UAAAC,GAAoB,UAAAC,GAAoB,YAAY,EAAG,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAI9F,GAEee,IAAAC,EAAKnB,CAAe;"}
@@ -1,10 +1,22 @@
1
- import { useContext as r } from "react";
2
- import { JourneyContext as e } from "./journey-context-provider.js";
1
+ import { useContext as o } from "react";
2
+ import { JourneyContext as r } from "./journey-context-provider.js";
3
3
  const u = () => {
4
- const o = r(e);
5
- if (!o)
6
- throw new Error("useJourney must be used within a JourneyProvider");
7
- return o;
4
+ const e = o(r);
5
+ return e || {
6
+ nextCoachmark: () => {
7
+ },
8
+ setJourney: () => {
9
+ },
10
+ addCoachmark: () => {
11
+ },
12
+ clearJourney: () => {
13
+ },
14
+ endJourney: () => {
15
+ },
16
+ coachmarks: [],
17
+ userCompletedJourneyIds: [],
18
+ isJourneyActive: !1
19
+ };
8
20
  };
9
21
  export {
10
22
  u as useJourney
@@ -1 +1 @@
1
- {"version":3,"file":"use-journey.js","sources":["../../../../src/features/journey/use-journey/use-journey.tsx"],"sourcesContent":["import { useContext } from 'react';\n\nimport { JourneyContext } from './journey-context-provider';\n\nexport const useJourney = () => {\n const context = useContext(JourneyContext);\n\n if (!context) {\n throw new Error('useJourney must be used within a JourneyProvider');\n }\n\n return context;\n};\n"],"names":["useJourney","context","useContext","JourneyContext"],"mappings":";;AAIO,MAAMA,IAAa,MAAM;AACxB,QAAAC,IAAUC,EAAWC,CAAc;AAEzC,MAAI,CAACF;AACG,UAAA,IAAI,MAAM,kDAAkD;AAG7D,SAAAA;AACT;"}
1
+ {"version":3,"file":"use-journey.js","sources":["../../../../src/features/journey/use-journey/use-journey.tsx"],"sourcesContent":["import { useContext } from 'react';\n\nimport { JourneyContext } from './journey-context-provider';\n\nexport const useJourney = () => {\n const context = useContext(JourneyContext);\n\n if (!context) {\n return {\n nextCoachmark: () => {},\n setJourney: () => {},\n addCoachmark: () => {},\n clearJourney: () => {},\n endJourney: () => {},\n coachmarks: [],\n userCompletedJourneyIds: [],\n isJourneyActive: false,\n };\n }\n\n return context;\n};\n"],"names":["useJourney","context","useContext","JourneyContext"],"mappings":";;AAIO,MAAMA,IAAa,MAAM;AACxB,QAAAC,IAAUC,EAAWC,CAAc;AAEzC,SAAKF,KACI;AAAA,IACL,eAAe,MAAM;AAAA,IAAC;AAAA,IACtB,YAAY,MAAM;AAAA,IAAC;AAAA,IACnB,cAAc,MAAM;AAAA,IAAC;AAAA,IACrB,cAAc,MAAM;AAAA,IAAC;AAAA,IACrB,YAAY,MAAM;AAAA,IAAC;AAAA,IACnB,YAAY,CAAC;AAAA,IACb,yBAAyB,CAAC;AAAA,IAC1B,iBAAiB;AAAA,EAAA;AAKvB;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.3.15-j2",
3
+ "version": "3.3.15-j6",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,9 +0,0 @@
1
- import r from "styled-components";
2
- import m from "../../ui/image/image.js";
3
- const t = r(m)`
4
- background-color: ${({ theme: o }) => o.colors.WHITE};
5
- `;
6
- export {
7
- t as ImageWrapper
8
- };
9
- //# sourceMappingURL=account-selector-styled.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"account-selector-styled.js","sources":["../../../../src/features/auth/account-selector/account-selector-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport Image from '../../ui/image/image';\n\nexport const ImageWrapper = styled(Image)`\n background-color: ${({ theme }) => theme.colors.WHITE};\n`;\n"],"names":["ImageWrapper","styled","Image","theme"],"mappings":";;AAIa,MAAAA,IAAeC,EAAOC,CAAK;AAAA,sBAClB,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;"}