@cuemath/leap 3.1.46 → 3.1.47

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,8 +1,8 @@
1
1
  import { styled as t } from "styled-components";
2
- import i from "../../ui/buttons/button/button.js";
3
- import p from "../../ui/layout/flex-view.js";
4
- import { media as o } from "../../utils/media.js";
5
- const x = t.form`
2
+ import e from "../../ui/buttons/button/button.js";
3
+ import o from "../../ui/layout/flex-view.js";
4
+ import { getTheme as p } from "../../ui/theme/get-theme.js";
5
+ const { mediaQueries: i } = p(), x = t.form`
6
6
  display: flex;
7
7
  flex: 1;
8
8
  margin-top: 0;
@@ -11,27 +11,27 @@ const x = t.form`
11
11
  max-width: 336px;
12
12
  width: 100%;
13
13
  height: 308px;
14
- ${o.minDesktop} {
14
+ ${i.minWidthDesktop} {
15
15
  margin-top: 8px;
16
16
  }
17
- `, a = t(p)`
17
+ `, a = t(o)`
18
18
  margin-top: 0;
19
19
  max-width: 336px;
20
20
  width: 100%;
21
- ${o.minDesktop} {
21
+ ${i.minWidthDesktop} {
22
22
  margin-top: 8px;
23
23
  }
24
- `, h = t(p)`
24
+ `, s = t(o)`
25
25
  min-height: 300px;
26
- ${o.minDesktop} {
26
+ ${i.minWidthDesktop} {
27
27
  height: 308px;
28
28
  }
29
- `, s = t(i)`
29
+ `, d = t(e)`
30
30
  width: 100%;
31
31
  `;
32
32
  export {
33
- s as ButtonWrapper,
34
- h as Container,
33
+ d as ButtonWrapper,
34
+ s as Container,
35
35
  x as FormWrapper,
36
36
  a as OtpFormWrapper
37
37
  };
@@ -1 +1 @@
1
- {"version":3,"file":"forgot-password-styled.js","sources":["../../../../src/features/auth/forgot-password/forgot-password-styled.tsx"],"sourcesContent":["import { styled } from 'styled-components';\n\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport { media } from '../../utils/media';\n\nexport const FormWrapper = styled.form`\n display: flex;\n flex: 1;\n margin-top: 0;\n flex-direction: column;\n justify-content: space-between;\n max-width: 336px;\n width: 100%;\n height: 308px;\n ${media.minDesktop} {\n margin-top: 8px;\n }\n`;\n\nexport const OtpFormWrapper = styled(FlexView)`\n margin-top: 0;\n max-width: 336px;\n width: 100%;\n ${media.minDesktop} {\n margin-top: 8px;\n }\n`;\n\nexport const Container = styled(FlexView)`\n min-height: 300px;\n ${media.minDesktop} {\n height: 308px;\n }\n`;\n\nexport const ButtonWrapper = styled(Button)`\n width: 100%;\n`;\n"],"names":["FormWrapper","styled","media","OtpFormWrapper","FlexView","Container","ButtonWrapper","Button"],"mappings":";;;;AAMO,MAAMA,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAS9BC,EAAM,UAAU;AAAA;AAAA;AAAA,GAKPC,IAAiBF,EAAOG,CAAQ;AAAA;AAAA;AAAA;AAAA,IAIzCF,EAAM,UAAU;AAAA;AAAA;AAAA,GAKPG,IAAYJ,EAAOG,CAAQ;AAAA;AAAA,IAEpCF,EAAM,UAAU;AAAA;AAAA;AAAA,GAKPI,IAAgBL,EAAOM,CAAM;AAAA;AAAA;"}
1
+ {"version":3,"file":"forgot-password-styled.js","sources":["../../../../src/features/auth/forgot-password/forgot-password-styled.tsx"],"sourcesContent":["import { styled } from 'styled-components';\n\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport { getTheme } from '../../ui/theme/get-theme';\n\nconst { mediaQueries } = getTheme();\n\nexport const FormWrapper = styled.form`\n display: flex;\n flex: 1;\n margin-top: 0;\n flex-direction: column;\n justify-content: space-between;\n max-width: 336px;\n width: 100%;\n height: 308px;\n ${mediaQueries.minWidthDesktop} {\n margin-top: 8px;\n }\n`;\n\nexport const OtpFormWrapper = styled(FlexView)`\n margin-top: 0;\n max-width: 336px;\n width: 100%;\n ${mediaQueries.minWidthDesktop} {\n margin-top: 8px;\n }\n`;\n\nexport const Container = styled(FlexView)`\n min-height: 300px;\n ${mediaQueries.minWidthDesktop} {\n height: 308px;\n }\n`;\n\nexport const ButtonWrapper = styled(Button)`\n width: 100%;\n`;\n"],"names":["mediaQueries","getTheme","FormWrapper","styled","OtpFormWrapper","FlexView","Container","ButtonWrapper","Button"],"mappings":";;;;AAMA,MAAM,EAAE,cAAAA,EAAa,IAAIC,KAEZC,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAS9BH,EAAa,eAAe;AAAA;AAAA;AAAA,GAKnBI,IAAiBD,EAAOE,CAAQ;AAAA;AAAA;AAAA;AAAA,IAIzCL,EAAa,eAAe;AAAA;AAAA;AAAA,GAKnBM,IAAYH,EAAOE,CAAQ;AAAA;AAAA,IAEpCL,EAAa,eAAe;AAAA;AAAA;AAAA,GAKnBO,IAAgBJ,EAAOK,CAAM;AAAA;AAAA;"}
@@ -1,7 +1,7 @@
1
- import t from "styled-components";
2
- import o from "../../../ui/layout/flex-view.js";
3
- import { media as e } from "../../../utils/media.js";
4
- const r = t.form`
1
+ import e from "styled-components";
2
+ import i from "../../../ui/layout/flex-view.js";
3
+ import { getTheme as o } from "../../../ui/theme/get-theme.js";
4
+ const { mediaQueries: t } = o(), n = e.form`
5
5
  display: flex;
6
6
  flex-direction: column;
7
7
  justify-content: space-between;
@@ -9,17 +9,17 @@ const r = t.form`
9
9
  flex: 1;
10
10
  width: 100%;
11
11
  max-width: 336px;
12
- ${e.minDesktop} {
12
+ ${t.minWidthDesktop} {
13
13
  margin-top: 8px;
14
14
  }
15
- `, n = t(o)`
15
+ `, s = e(i)`
16
16
  height: 300px;
17
- ${e.minDesktop} {
17
+ ${t.minWidthDesktop} {
18
18
  height: 308px;
19
19
  }
20
20
  `;
21
21
  export {
22
- n as Container,
23
- r as FormWrapper
22
+ s as Container,
23
+ n as FormWrapper
24
24
  };
25
25
  //# sourceMappingURL=identifier-otp-form-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"identifier-otp-form-styled.js","sources":["../../../../../src/features/auth/login/identifier-otp-form/identifier-otp-form-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport { media } from '../../../utils/media';\n\nconst FormWrapper = styled.form`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin-top: 0;\n flex: 1;\n width: 100%;\n max-width: 336px;\n ${media.minDesktop} {\n margin-top: 8px;\n }\n`;\n\nconst Container = styled(FlexView)`\n height: 300px;\n ${media.minDesktop} {\n height: 308px;\n }\n`;\n\nexport { FormWrapper, Container };\n"],"names":["FormWrapper","styled","media","Container","FlexView"],"mappings":";;;AAKA,MAAMA,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQvBC,EAAM,UAAU;AAAA;AAAA;AAAA,GAKdC,IAAYF,EAAOG,CAAQ;AAAA;AAAA,IAE7BF,EAAM,UAAU;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"identifier-otp-form-styled.js","sources":["../../../../../src/features/auth/login/identifier-otp-form/identifier-otp-form-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport { getTheme } from '../../../ui/theme/get-theme';\n\nconst { mediaQueries } = getTheme();\n\nconst FormWrapper = styled.form`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin-top: 0;\n flex: 1;\n width: 100%;\n max-width: 336px;\n ${mediaQueries.minWidthDesktop} {\n margin-top: 8px;\n }\n`;\n\nconst Container = styled(FlexView)`\n height: 300px;\n ${mediaQueries.minWidthDesktop} {\n height: 308px;\n }\n`;\n\nexport { FormWrapper, Container };\n"],"names":["mediaQueries","getTheme","FormWrapper","styled","Container","FlexView"],"mappings":";;;AAKA,MAAM,EAAE,cAAAA,EAAa,IAAIC,KAEnBC,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQvBH,EAAa,eAAe;AAAA;AAAA;AAAA,GAK1BI,IAAYD,EAAOE,CAAQ;AAAA;AAAA,IAE7BL,EAAa,eAAe;AAAA;AAAA;AAAA;"}
@@ -1,21 +1,21 @@
1
1
  import t from "styled-components";
2
- import i from "../../ui/buttons/button/button.js";
2
+ import o from "../../ui/buttons/button/button.js";
3
3
  import m from "../../ui/layout/flex-view.js";
4
- import { media as o } from "../../utils/media.js";
5
- const x = t.form`
4
+ import { getTheme as e } from "../../ui/theme/get-theme.js";
5
+ const { mediaQueries: i } = e(), x = t.form`
6
6
  max-width: 336px;
7
7
  width: 100%;
8
8
  margin-top: 0;
9
- ${o.minDesktop} {
9
+ ${i.minWidthDesktop} {
10
10
  margin-top: 8px;
11
11
  }
12
12
  `;
13
- t(i)`
13
+ t(o)`
14
14
  max-width: 160px;
15
15
  `;
16
16
  const a = t(m)`
17
17
  min-height: 300px;
18
- ${o.minDesktop} {
18
+ ${i.minWidthDesktop} {
19
19
  height: 308px;
20
20
  }
21
21
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"login-styled.js","sources":["../../../../src/features/auth/login/login-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport { media } from '../../utils/media';\n\nexport const FormContainer = styled.form`\n max-width: 336px;\n width: 100%;\n margin-top: 0;\n ${media.minDesktop} {\n margin-top: 8px;\n }\n`;\n\nconst ButtonWrapper = styled(Button)`\n max-width: 160px;\n`;\n\nconst Container = styled(FlexView)`\n min-height: 300px;\n ${media.minDesktop} {\n height: 308px;\n }\n`;\n\nexport { ButtonWrapper, Container };\n"],"names":["FormContainer","styled","media","Button","Container","FlexView"],"mappings":";;;;AAMO,MAAMA,IAAgBC,EAAO;AAAA;AAAA;AAAA;AAAA,IAIhCC,EAAM,UAAU;AAAA;AAAA;AAAA;AAKED,EAAOE,CAAM;AAAA;AAAA;AAI7B,MAAAC,IAAYH,EAAOI,CAAQ;AAAA;AAAA,IAE7BH,EAAM,UAAU;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"login-styled.js","sources":["../../../../src/features/auth/login/login-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport { getTheme } from '../../ui/theme/get-theme';\n\nconst { mediaQueries } = getTheme();\n\nexport const FormContainer = styled.form`\n max-width: 336px;\n width: 100%;\n margin-top: 0;\n ${mediaQueries.minWidthDesktop} {\n margin-top: 8px;\n }\n`;\n\nconst ButtonWrapper = styled(Button)`\n max-width: 160px;\n`;\n\nconst Container = styled(FlexView)`\n min-height: 300px;\n ${mediaQueries.minWidthDesktop} {\n height: 308px;\n }\n`;\n\nexport { ButtonWrapper, Container };\n"],"names":["mediaQueries","getTheme","FormContainer","styled","Button","Container","FlexView"],"mappings":";;;;AAMA,MAAM,EAAE,cAAAA,EAAa,IAAIC,KAEZC,IAAgBC,EAAO;AAAA;AAAA;AAAA;AAAA,IAIhCH,EAAa,eAAe;AAAA;AAAA;AAAA;AAKVG,EAAOC,CAAM;AAAA;AAAA;AAI7B,MAAAC,IAAYF,EAAOG,CAAQ;AAAA;AAAA,IAE7BN,EAAa,eAAe;AAAA;AAAA;AAAA;"}
@@ -1,21 +1,22 @@
1
- import { useState as n, useEffect as r } from "react";
2
- import { getDeviceType as c } from "../../utils/media.js";
3
- const d = () => {
4
- const [s, o] = n(() => window.innerWidth);
1
+ import { useState as c, useEffect as r } from "react";
2
+ import { getTheme as i } from "../../ui/theme/get-theme.js";
3
+ const a = () => {
4
+ const [e, o] = c(() => i().device);
5
5
  r(() => {
6
- function i() {
7
- o(window.innerWidth);
6
+ function t() {
7
+ const { device: n } = i();
8
+ o(n);
8
9
  }
9
- return window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
10
+ return window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
10
11
  }, []);
11
- const e = c(s), t = e === "mobile";
12
+ const s = e === "mobile";
12
13
  return {
13
- isMobile: t,
14
- isCompact: t || e === "tablet",
15
- isDesktop: e === "desktop" || e === "large" || e === "xl"
14
+ isMobile: s,
15
+ isCompact: s || e === "tablet",
16
+ isDesktop: e === "small-desktop" || e === "desktop" || e === "large-device" || e === "xlarge-device"
16
17
  };
17
- }, f = d;
18
+ }, w = a;
18
19
  export {
19
- f as default
20
+ w as default
20
21
  };
21
22
  //# sourceMappingURL=use-viewport.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-viewport.js","sources":["../../../../src/features/hooks/use-viewport/use-viewport.ts"],"sourcesContent":["import type { IUseViewportReturn } from './use-viewport-types';\n\nimport { useEffect, useState } from 'react';\n\nimport { getDeviceType } from '../../utils/media';\n\nconst useViewport = (): IUseViewportReturn => {\n const [width, setWidth] = useState(() => window.innerWidth);\n\n useEffect(() => {\n function handleResize() {\n setWidth(window.innerWidth);\n }\n\n window.addEventListener('resize', handleResize);\n\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n\n const deviceType = getDeviceType(width);\n const isMobile = deviceType === 'mobile';\n const isTablet = deviceType === 'tablet';\n const isDesktop = deviceType === 'desktop';\n const isLarge = deviceType === 'large';\n const isXL = deviceType === 'xl';\n\n return {\n isMobile: isMobile,\n isCompact: isMobile || isTablet,\n isDesktop: isDesktop || isLarge || isXL,\n };\n};\n\nexport default useViewport;\n"],"names":["useViewport","width","setWidth","useState","useEffect","handleResize","deviceType","getDeviceType","isMobile","useViewport$1"],"mappings":";;AAMA,MAAMA,IAAc,MAA0B;AAC5C,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAS,MAAM,OAAO,UAAU;AAE1D,EAAAC,EAAU,MAAM;AACd,aAASC,IAAe;AACtB,MAAAH,EAAS,OAAO,UAAU;AAAA,IAC5B;AAEO,kBAAA,iBAAiB,UAAUG,CAAY,GAEvC,MAAM,OAAO,oBAAoB,UAAUA,CAAY;AAAA,EAChE,GAAG,CAAE,CAAA;AAEC,QAAAC,IAAaC,EAAcN,CAAK,GAChCO,IAAWF,MAAe;AAMzB,SAAA;AAAA,IACL,UAAAE;AAAA,IACA,WAAWA,KAPIF,MAAe;AAAA,IAQ9B,WAPgBA,MAAe,aACjBA,MAAe,WAClBA,MAAe;AAAA,EAKS;AAEvC,GAEAG,IAAeT;"}
1
+ {"version":3,"file":"use-viewport.js","sources":["../../../../src/features/hooks/use-viewport/use-viewport.ts"],"sourcesContent":["import type { IUseViewportReturn } from './use-viewport-types';\n\nimport { useEffect, useState } from 'react';\n\nimport { getTheme } from '../../ui/theme/get-theme';\n\nconst useViewport = (): IUseViewportReturn => {\n const [deviceType, setDeviceType] = useState(() => getTheme().device);\n\n useEffect(() => {\n function handleResize() {\n const { device: newDeviceType } = getTheme();\n\n setDeviceType(newDeviceType);\n }\n\n window.addEventListener('resize', handleResize);\n\n return () => window.removeEventListener('resize', handleResize);\n }, []);\n\n const isMobile = deviceType === 'mobile';\n const isTablet = deviceType === 'tablet';\n const isSmallDesktop = deviceType === 'small-desktop';\n const isDesktop = deviceType === 'desktop';\n const isLarge = deviceType === 'large-device';\n const isXL = deviceType === 'xlarge-device';\n\n return {\n isMobile: isMobile,\n isCompact: isMobile || isTablet,\n isDesktop: isSmallDesktop || isDesktop || isLarge || isXL,\n };\n};\n\nexport default useViewport;\n"],"names":["useViewport","deviceType","setDeviceType","useState","getTheme","useEffect","handleResize","newDeviceType","isMobile","useViewport$1"],"mappings":";;AAMA,MAAMA,IAAc,MAA0B;AACtC,QAAA,CAACC,GAAYC,CAAa,IAAIC,EAAS,MAAMC,EAAA,EAAW,MAAM;AAEpE,EAAAC,EAAU,MAAM;AACd,aAASC,IAAe;AACtB,YAAM,EAAE,QAAQC,EAAc,IAAIH,EAAS;AAE3C,MAAAF,EAAcK,CAAa;AAAA,IAC7B;AAEO,kBAAA,iBAAiB,UAAUD,CAAY,GAEvC,MAAM,OAAO,oBAAoB,UAAUA,CAAY;AAAA,EAChE,GAAG,CAAE,CAAA;AAEL,QAAME,IAAWP,MAAe;AAOzB,SAAA;AAAA,IACL,UAAAO;AAAA,IACA,WAAWA,KARIP,MAAe;AAAA,IAS9B,WARqBA,MAAe,mBACpBA,MAAe,aACjBA,MAAe,kBAClBA,MAAe;AAAA,EAK2B;AAEzD,GAEAQ,IAAeT;"}
@@ -0,0 +1,11 @@
1
+ const e = {
2
+ tablet: 760,
3
+ smallDesktop: 920,
4
+ desktop: 1072,
5
+ largeDevice: 1232,
6
+ xlargeDevice: 1424
7
+ };
8
+ export {
9
+ e as BREAKPOINTS
10
+ };
11
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/features/ui/theme/constants.ts"],"sourcesContent":["export const BREAKPOINTS = {\n tablet: 760,\n smallDesktop: 920,\n desktop: 1072,\n largeDevice: 1232,\n xlargeDevice: 1424,\n};\n"],"names":["BREAKPOINTS"],"mappings":"AAAO,MAAMA,IAAc;AAAA,EACzB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,SAAS;AAAA,EACT,aAAa;AAAA,EACb,cAAc;AAChB;"}
@@ -0,0 +1,6 @@
1
+ import { BREAKPOINTS as r } from "./constants.js";
2
+ const l = (e) => e >= r.xlargeDevice ? "xlarge-device" : e >= r.largeDevice ? "large-device" : e >= r.smallDesktop ? "small-desktop" : e >= r.desktop ? "desktop" : e >= r.tablet ? "tablet" : "mobile";
3
+ export {
4
+ l as getDevice
5
+ };
6
+ //# sourceMappingURL=get-device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-device.js","sources":["../../../../src/features/ui/theme/get-device.ts"],"sourcesContent":["import type { TDeviceType } from '../types';\n\nimport { BREAKPOINTS } from './constants';\n\nexport const getDevice = (width: number): TDeviceType => {\n if (width >= BREAKPOINTS.xlargeDevice) return 'xlarge-device';\n\n if (width >= BREAKPOINTS.largeDevice) return 'large-device';\n\n if (width >= BREAKPOINTS.smallDesktop) return 'small-desktop';\n\n if (width >= BREAKPOINTS.desktop) return 'desktop';\n\n if (width >= BREAKPOINTS.tablet) return 'tablet';\n\n return 'mobile';\n};\n"],"names":["getDevice","width","BREAKPOINTS"],"mappings":";AAIa,MAAAA,IAAY,CAACC,MACpBA,KAASC,EAAY,eAAqB,kBAE1CD,KAASC,EAAY,cAAoB,iBAEzCD,KAASC,EAAY,eAAqB,kBAE1CD,KAASC,EAAY,UAAgB,YAErCD,KAASC,EAAY,SAAe,WAEjC;"}
@@ -1,32 +1,34 @@
1
1
  import r from "./arrow-tooltip.js";
2
- import e from "./button.js";
3
- import i from "./checkbox.js";
4
- import m, { hues as g } from "./clrs.js";
5
- import { getDeviceConfig as n } from "./device.js";
6
- import f from "./input.js";
7
- import p from "./layout.js";
8
- import u from "./tab.js";
9
- import C from "./text.js";
10
- import c from "./text-button.js";
11
- import { getZIndexConfig as x } from "./z-index.js";
12
- const v = () => {
13
- const t = p(), { gutter: o } = t;
2
+ import i from "./button.js";
3
+ import m from "./checkbox.js";
4
+ import g, { hues as f } from "./clrs.js";
5
+ import { getDevice as n } from "./get-device.js";
6
+ import p from "./input.js";
7
+ import u from "./layout.js";
8
+ import { getMediaQueries as c } from "./media-queries.js";
9
+ import s from "./tab.js";
10
+ import x from "./text.js";
11
+ import C from "./text-button.js";
12
+ import { getZIndexConfig as a } from "./z-index.js";
13
+ const z = () => {
14
+ const t = u(), { gutter: o, deviceWidth: e } = t;
14
15
  return {
15
16
  arrowTooltip: r(),
16
- button: e(o),
17
- colors: m(),
18
- hues: g,
19
- input: f(o),
20
- checkbox: i(o),
17
+ button: i(o),
18
+ colors: g(),
19
+ hues: f,
20
+ input: p(o),
21
+ checkbox: m(o),
21
22
  layout: t,
22
- tab: u(t.gutter),
23
- text: C(),
24
- textButton: c(),
25
- zIndex: x(),
26
- device: n()
23
+ tab: s(t.gutter),
24
+ text: x(),
25
+ textButton: C(),
26
+ zIndex: a(),
27
+ device: n(e),
28
+ mediaQueries: c()
27
29
  };
28
30
  };
29
31
  export {
30
- v as getTheme
32
+ z as getTheme
31
33
  };
32
34
  //# sourceMappingURL=get-theme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-theme.js","sources":["../../../../src/features/ui/theme/get-theme.ts"],"sourcesContent":["import type { DefaultTheme } from 'styled-components';\n\nimport getArrowTooltipConfig from './arrow-tooltip';\nimport getButtonConfig from './button';\nimport getCheckboxConfig from './checkbox';\nimport getColors, { hues } from './clrs';\nimport { getDeviceConfig } from './device';\nimport getInputConfig from './input';\nimport getLayout from './layout';\nimport getTabConfig from './tab';\nimport getTextTypes from './text';\nimport getTextButtonConfig from './text-button';\nimport { getZIndexConfig } from './z-index';\n\nconst getTheme: () => DefaultTheme = () => {\n const layout = getLayout();\n const { gutter } = layout;\n\n return {\n arrowTooltip: getArrowTooltipConfig(),\n button: getButtonConfig(gutter),\n colors: getColors(),\n hues: hues,\n input: getInputConfig(gutter),\n checkbox: getCheckboxConfig(gutter),\n layout,\n tab: getTabConfig(layout.gutter),\n text: getTextTypes(),\n textButton: getTextButtonConfig(),\n zIndex: getZIndexConfig(),\n device: getDeviceConfig(),\n };\n};\n\nexport { getTheme };\n"],"names":["getTheme","layout","getLayout","gutter","getArrowTooltipConfig","getButtonConfig","getColors","hues","getInputConfig","getCheckboxConfig","getTabConfig","getTextTypes","getTextButtonConfig","getZIndexConfig","getDeviceConfig"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAA+B,MAAM;AACzC,QAAMC,IAASC,KACT,EAAE,QAAAC,EAAW,IAAAF;AAEZ,SAAA;AAAA,IACL,cAAcG,EAAsB;AAAA,IACpC,QAAQC,EAAgBF,CAAM;AAAA,IAC9B,QAAQG,EAAU;AAAA,IAClB,MAAAC;AAAA,IACA,OAAOC,EAAeL,CAAM;AAAA,IAC5B,UAAUM,EAAkBN,CAAM;AAAA,IAClC,QAAAF;AAAA,IACA,KAAKS,EAAaT,EAAO,MAAM;AAAA,IAC/B,MAAMU,EAAa;AAAA,IACnB,YAAYC,EAAoB;AAAA,IAChC,QAAQC,EAAgB;AAAA,IACxB,QAAQC,EAAgB;AAAA,EAAA;AAE5B;"}
1
+ {"version":3,"file":"get-theme.js","sources":["../../../../src/features/ui/theme/get-theme.ts"],"sourcesContent":["import type { DefaultTheme } from 'styled-components';\n\nimport getArrowTooltipConfig from './arrow-tooltip';\nimport getButtonConfig from './button';\nimport getCheckboxConfig from './checkbox';\nimport getColors, { hues } from './clrs';\nimport { getDevice } from './get-device';\nimport getInputConfig from './input';\nimport getLayout from './layout';\nimport { getMediaQueries } from './media-queries';\nimport getTabConfig from './tab';\nimport getTextTypes from './text';\nimport getTextButtonConfig from './text-button';\nimport { getZIndexConfig } from './z-index';\n\nconst getTheme: () => DefaultTheme = () => {\n const layout = getLayout();\n const { gutter, deviceWidth } = layout;\n\n return {\n arrowTooltip: getArrowTooltipConfig(),\n button: getButtonConfig(gutter),\n colors: getColors(),\n hues: hues,\n input: getInputConfig(gutter),\n checkbox: getCheckboxConfig(gutter),\n layout,\n tab: getTabConfig(layout.gutter),\n text: getTextTypes(),\n textButton: getTextButtonConfig(),\n zIndex: getZIndexConfig(),\n device: getDevice(deviceWidth),\n mediaQueries: getMediaQueries(),\n };\n};\n\nexport { getTheme };\n"],"names":["getTheme","layout","getLayout","gutter","deviceWidth","getArrowTooltipConfig","getButtonConfig","getColors","hues","getInputConfig","getCheckboxConfig","getTabConfig","getTextTypes","getTextButtonConfig","getZIndexConfig","getDevice","getMediaQueries"],"mappings":";;;;;;;;;;;;AAeA,MAAMA,IAA+B,MAAM;AACzC,QAAMC,IAASC,KACT,EAAE,QAAAC,GAAQ,aAAAC,EAAgB,IAAAH;AAEzB,SAAA;AAAA,IACL,cAAcI,EAAsB;AAAA,IACpC,QAAQC,EAAgBH,CAAM;AAAA,IAC9B,QAAQI,EAAU;AAAA,IAClB,MAAAC;AAAA,IACA,OAAOC,EAAeN,CAAM;AAAA,IAC5B,UAAUO,EAAkBP,CAAM;AAAA,IAClC,QAAAF;AAAA,IACA,KAAKU,EAAaV,EAAO,MAAM;AAAA,IAC/B,MAAMW,EAAa;AAAA,IACnB,YAAYC,EAAoB;AAAA,IAChC,QAAQC,EAAgB;AAAA,IACxB,QAAQC,EAAUX,CAAW;AAAA,IAC7B,cAAcY,EAAgB;AAAA,EAAA;AAElC;"}
@@ -1,9 +1,12 @@
1
- function e(t = 1) {
1
+ function n(t = 1) {
2
+ const e = window.innerWidth, i = window.innerHeight;
2
3
  return {
3
- gutter: 16 * t
4
+ gutter: 16 * t,
5
+ deviceWidth: e,
6
+ deviceHeight: i
4
7
  };
5
8
  }
6
9
  export {
7
- e as default
10
+ n as default
8
11
  };
9
12
  //# sourceMappingURL=layout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout.js","sources":["../../../../src/features/ui/theme/layout.ts"],"sourcesContent":["import type { ILayout } from '../types';\n\nfunction getLayout(multiplier: number = 1): ILayout {\n return {\n gutter: 16 * multiplier,\n };\n}\n\nexport default getLayout;\n"],"names":["getLayout","multiplier"],"mappings":"AAEA,SAASA,EAAUC,IAAqB,GAAY;AAC3C,SAAA;AAAA,IACL,QAAQ,KAAKA;AAAA,EAAA;AAEjB;"}
1
+ {"version":3,"file":"layout.js","sources":["../../../../src/features/ui/theme/layout.ts"],"sourcesContent":["import type { ILayout } from '../types';\n\nfunction getLayout(multiplier: number = 1): ILayout {\n const width = window.innerWidth;\n const height = window.innerHeight;\n\n return {\n gutter: 16 * multiplier,\n deviceWidth: width,\n deviceHeight: height,\n };\n}\n\nexport default getLayout;\n"],"names":["getLayout","multiplier","width","height"],"mappings":"AAEA,SAASA,EAAUC,IAAqB,GAAY;AAClD,QAAMC,IAAQ,OAAO,YACfC,IAAS,OAAO;AAEf,SAAA;AAAA,IACL,QAAQ,KAAKF;AAAA,IACb,aAAaC;AAAA,IACb,cAAcC;AAAA,EAAA;AAElB;"}
@@ -0,0 +1,11 @@
1
+ import { BREAKPOINTS as i } from "./constants.js";
2
+ const t = () => ({
3
+ minWidthTablet: `@media (min-width: ${i.tablet}px)`,
4
+ minWidthSmallDesktop: `@media (min-width: ${i.smallDesktop}px)`,
5
+ minWidthDesktop: `@media (min-width: ${i.desktop}px)`,
6
+ minWidthLargeDevice: `@media (min-width: ${i.largeDevice}px)`
7
+ });
8
+ export {
9
+ t as getMediaQueries
10
+ };
11
+ //# sourceMappingURL=media-queries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-queries.js","sources":["../../../../src/features/ui/theme/media-queries.ts"],"sourcesContent":["import { BREAKPOINTS } from './constants';\n\nexport const getMediaQueries = () => ({\n minWidthTablet: `@media (min-width: ${BREAKPOINTS.tablet}px)`,\n minWidthSmallDesktop: `@media (min-width: ${BREAKPOINTS.smallDesktop}px)`,\n minWidthDesktop: `@media (min-width: ${BREAKPOINTS.desktop}px)`,\n minWidthLargeDevice: `@media (min-width: ${BREAKPOINTS.largeDevice}px)`,\n});\n"],"names":["getMediaQueries","BREAKPOINTS"],"mappings":";AAEO,MAAMA,IAAkB,OAAO;AAAA,EACpC,gBAAgB,sBAAsBC,EAAY,MAAM;AAAA,EACxD,sBAAsB,sBAAsBA,EAAY,YAAY;AAAA,EACpE,iBAAiB,sBAAsBA,EAAY,OAAO;AAAA,EAC1D,qBAAqB,sBAAsBA,EAAY,WAAW;AACpE;"}
package/dist/index.d.ts CHANGED
@@ -510,12 +510,19 @@ declare const getCheckboxConfig: IGetCheckboxConfig;
510
510
 
511
511
  declare function getColors(): TColorsMap;
512
512
 
513
- declare const getDeviceConfig: () => TSupportedDevices;
513
+ declare const getDevice: (width: number) => TDeviceType;
514
514
 
515
515
  declare const getInputConfig: IGetInputConfig;
516
516
 
517
517
  declare function getLayout(multiplier?: number): ILayout;
518
518
 
519
+ declare const getMediaQueries: () => {
520
+ minWidthTablet: string;
521
+ minWidthSmallDesktop: string;
522
+ minWidthDesktop: string;
523
+ minWidthLargeDevice: string;
524
+ };
525
+
519
526
  declare const getTabConfig: IGetTabConfig;
520
527
 
521
528
  declare const getTextButtonConfig: IGetTextButtonConfig;
@@ -1686,6 +1693,8 @@ declare interface IJourneyProviderProps {
1686
1693
 
1687
1694
  export declare interface ILayout {
1688
1695
  gutter: number;
1696
+ deviceWidth: number;
1697
+ deviceHeight: number;
1689
1698
  }
1690
1699
 
1691
1700
  export declare interface ILeaderboardDetails {
@@ -3471,7 +3480,8 @@ export declare interface ITheme {
3471
3480
  textButton: ReturnType<typeof getTextButtonConfig>;
3472
3481
  zIndex: ReturnType<typeof getZIndexConfig>;
3473
3482
  checkbox: ReturnType<typeof getCheckboxConfig>;
3474
- device: ReturnType<typeof getDeviceConfig>;
3483
+ device: ReturnType<typeof getDevice>;
3484
+ mediaQueries: ReturnType<typeof getMediaQueries>;
3475
3485
  }
3476
3486
 
3477
3487
  declare interface ITile {
@@ -4221,11 +4231,6 @@ export declare const Maintenance: React_2.FC<IMaintenanceProps>;
4221
4231
 
4222
4232
  declare const MASTERY: "mastery";
4223
4233
 
4224
- export declare const media: {
4225
- minDesktop: string;
4226
- minLarge: string;
4227
- };
4228
-
4229
4234
  export declare const MilestoneActionWidget: React_2.FC<IMilestoneActionWidgetProps>;
4230
4235
 
4231
4236
  export declare const MilestoneCreate: React.FC<IMileStoneCreateContainerProps>;
@@ -4937,6 +4942,8 @@ declare type TCueProgramData = {
4937
4942
 
4938
4943
  declare type TDefaultSection = Record<string, unknown>;
4939
4944
 
4945
+ export declare type TDeviceType = 'mobile' | 'tablet' | 'small-desktop' | 'desktop' | 'large-device' | 'xlarge-device';
4946
+
4940
4947
  declare type TDrawingData = ITile | IStroke | undefined;
4941
4948
 
4942
4949
  declare type TEnglishSectionSummary = {
@@ -5750,8 +5757,6 @@ declare type TSubscribe = (id: string, cb: (data: IActionData | IActionData[]) =
5750
5757
 
5751
5758
  declare type TSubscribeMouseMove = (id: string, callback: (data: IPointerData) => void) => void;
5752
5759
 
5753
- export declare type TSupportedDevices = 'mobile' | 'desktop';
5754
-
5755
5760
  export declare type TTableMode = 'random' | 'sequence' | 'advance' | 'infinite';
5756
5761
 
5757
5762
  export declare type TTabSizes = 'xsmall' | 'small' | 'regular' | 'medium';
package/dist/index.js CHANGED
@@ -265,21 +265,20 @@ import { WORKSHEET_V3_NODE_TYPES as eu } from "./features/sheets/utils/is-v3-wor
265
265
  import { COMPLETED_SHEET_STATE as ru, NODE_LABELS as tu, NODE_SUB_GROUP as au, NODE_TYPE as fu, PYTHON_NODE_TYPES as su, REWARDS_LIST as lu, SHEET_ACTIONS as pu, SHEET_ATTEMPT_LOCATION as uu, SHEET_ATTEMPT_LOCATION_MAP as mu, SHEET_ATTEMPT_STATE as du, SHEET_DATA_TYPE as xu, SHEET_STATE as nu } from "./features/sheets/constants/sheet.js";
266
266
  import { default as iu } from "./features/student-details/student-details.js";
267
267
  import { default as Tu } from "./features/utils/load-script.js";
268
- import { media as Eu } from "./features/utils/media.js";
269
- import { ACTION_BAR_HEIGHT as Au, QUESTIONS_GAP as Pu, QUESTION_WIDTH as _u, TOP_NAVIGATION_HEIGHT as hu } from "./features/worksheet/worksheet/constants.js";
270
- import { isOkayTypeQuestion as Lu } from "./features/worksheet/worksheet/worksheet-helpers.js";
271
- import { default as ku } from "./features/worksheet/worksheet/worksheet-container.js";
272
- import { default as Ou } from "./features/worksheet/worksheet-preview/worksheet-preview.js";
273
- import { default as Du } from "./features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js";
274
- import { default as gu } from "./features/worksheet/worksheet/worksheet-permissions/sheet-locked.js";
275
- import { default as Uu } from "./features/worksheet/worksheet/worksheet-permissions/error.js";
276
- import { default as Bu } from "./features/worksheet/learnosity-preloader/learnosity-preloader.js";
277
- import { default as wu } from "./features/worksheet/learnosity-preloader/use-is-learnosity-loaded.js";
278
- import { default as Vu } from "./features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js";
279
- import { default as Yu } from "./features/hooks/use-viewport/use-viewport.js";
280
- import { default as Ju } from "./features/puzzles/puzzle-container/puzzle-container.js";
281
- import { invalidatePuzzleToAssign as Ku, useGetPuzzleToAssign as ju } from "./features/puzzles/api/puzzle-assign.js";
282
- import { COUNTRY_CODE_MAP as qu } from "./constants/country.js";
268
+ import { ACTION_BAR_HEIGHT as Eu, QUESTIONS_GAP as Cu, QUESTION_WIDTH as Au, TOP_NAVIGATION_HEIGHT as Pu } from "./features/worksheet/worksheet/constants.js";
269
+ import { isOkayTypeQuestion as hu } from "./features/worksheet/worksheet/worksheet-helpers.js";
270
+ import { default as Lu } from "./features/worksheet/worksheet/worksheet-container.js";
271
+ import { default as ku } from "./features/worksheet/worksheet-preview/worksheet-preview.js";
272
+ import { default as Ou } from "./features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js";
273
+ import { default as Du } from "./features/worksheet/worksheet/worksheet-permissions/sheet-locked.js";
274
+ import { default as gu } from "./features/worksheet/worksheet/worksheet-permissions/error.js";
275
+ import { default as Uu } from "./features/worksheet/learnosity-preloader/learnosity-preloader.js";
276
+ import { default as Bu } from "./features/worksheet/learnosity-preloader/use-is-learnosity-loaded.js";
277
+ import { default as wu } from "./features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js";
278
+ import { default as Vu } from "./features/hooks/use-viewport/use-viewport.js";
279
+ import { default as Yu } from "./features/puzzles/puzzle-container/puzzle-container.js";
280
+ import { invalidatePuzzleToAssign as Ju, useGetPuzzleToAssign as Qu } from "./features/puzzles/api/puzzle-assign.js";
281
+ import { COUNTRY_CODE_MAP as ju } from "./constants/country.js";
283
282
  export {
284
283
  Ip as ACHIEVEMENT_ACTIONS,
285
284
  nf as AUTH_TABS,
@@ -312,7 +311,7 @@ export {
312
311
  Cs as CIRCLE_ACTION_IDS,
313
312
  Ss as CIRCLE_ONBOARDING_ANALYTICS_STEPS,
314
313
  ru as COMPLETED_SHEET_STATE,
315
- qu as COUNTRY_CODE_MAP,
314
+ ju as COUNTRY_CODE_MAP,
316
315
  D as CalendarIcon,
317
316
  Zt as Callout,
318
317
  Pt as CascadingSelectInput,
@@ -358,7 +357,7 @@ export {
358
357
  ee as DownIcon,
359
358
  re as DraftIcon,
360
359
  ae as DragIcon,
361
- Du as DynamicPreviewWorksheet,
360
+ Ou as DynamicPreviewWorksheet,
362
361
  al as EClassTimeAlertLevel,
363
362
  es as ELeaderboardType,
364
363
  cp as EPResourceAssign,
@@ -409,7 +408,7 @@ export {
409
408
  Df as LPARChapter,
410
409
  gf as LPARMilestoneChapter,
411
410
  Ls as Leaderboard,
412
- Bu as LearnosityPreloader,
411
+ Uu as LearnosityPreloader,
413
412
  ge as LeftIcon,
414
413
  Be as Lock2Icon,
415
414
  we as Lock3Icon,
@@ -451,12 +450,12 @@ export {
451
450
  ro as PointerIcon,
452
451
  bp as PostGameStats,
453
452
  no as PracticeIcon,
454
- Ou as PreviewWorksheet,
453
+ ku as PreviewWorksheet,
455
454
  io as ProgressIcon,
456
455
  ps as ProjectOutcome,
457
456
  xs as ProjectType,
458
457
  Eo as Puzzle2Icon,
459
- Ju as PuzzleCard,
458
+ Yu as PuzzleCard,
460
459
  To as PuzzleIcon,
461
460
  Ao as QuestionIcon,
462
461
  _o as QuestionLetterIcon,
@@ -488,10 +487,10 @@ export {
488
487
  ct as SelectInput,
489
488
  kt as SelectionCards,
490
489
  ia as Separator,
491
- Uu as SheetError,
490
+ gu as SheetError,
492
491
  Go as SheetIcon,
493
492
  Zp as SheetList,
494
- gu as SheetLocked,
493
+ Du as SheetLocked,
495
494
  Gs as SignUp,
496
495
  ja as SignupMethods,
497
496
  cr as SketchIcon,
@@ -537,14 +536,14 @@ export {
537
536
  tf as UsernamePasswordForm,
538
537
  Ta as Video,
539
538
  Pf as WHITELIST_EVENTS,
540
- Au as WORKSHEET_ACTION_BAR_HEIGHT,
541
- Pu as WORKSHEET_QUESTIONS_GAP,
542
- _u as WORKSHEET_QUESTION_WIDTH,
543
- hu as WORKSHEET_TOP_NAVIGATION_HEIGHT,
539
+ Eu as WORKSHEET_ACTION_BAR_HEIGHT,
540
+ Cu as WORKSHEET_QUESTIONS_GAP,
541
+ Au as WORKSHEET_QUESTION_WIDTH,
542
+ Pu as WORKSHEET_TOP_NAVIGATION_HEIGHT,
544
543
  eu as WORKSHEET_V3_NODE_TYPES,
545
544
  ss as WebView,
546
545
  ms as WebViewEvent,
547
- ku as Worksheet,
546
+ Lu as Worksheet,
548
547
  Bf as checkIfPPTNodeType,
549
548
  fa as getTheme,
550
549
  Vf as invalidateGetChapterDetails,
@@ -552,11 +551,10 @@ export {
552
551
  kp as invalidateMilestoneResources,
553
552
  Ep as invalidateMilestonesData,
554
553
  Pp as invalidatePastMilestoneCount,
555
- Ku as invalidatePuzzleToAssign,
554
+ Ju as invalidatePuzzleToAssign,
556
555
  Rp as invalidateTestHelpData,
557
- Lu as isOkayTypeQuestion,
556
+ hu as isOkayTypeQuestion,
558
557
  Tu as loadScript,
559
- Eu as media,
560
558
  Il as useAutoPlayPermission,
561
559
  Ws as useCanvasSyncBroker,
562
560
  gl as useChapterPageJourney,
@@ -570,13 +568,13 @@ export {
570
568
  Xf as useGetLeaderboardDal,
571
569
  Np as useGetMilestoneResources,
572
570
  _p as useGetPastMilestoneCount,
573
- ju as useGetPuzzleToAssign,
571
+ Qu as useGetPuzzleToAssign,
574
572
  Lp as useGetTestHelpData,
575
573
  Dl as useHomePageJourney,
576
574
  $s as useInClassActionDispatcher,
577
575
  el as useInClassActionListener,
578
576
  Qs as useInClassMessageBroker,
579
- wu as useIsLearnosityLoaded,
577
+ Bu as useIsLearnosityLoaded,
580
578
  hf as useIsTabBlocked,
581
579
  Pl as useJourney,
582
580
  Bt as useModalActions,
@@ -585,8 +583,8 @@ export {
585
583
  oa as useTrackingContext,
586
584
  js as useTrialSessionMessageBroker,
587
585
  $t as useUIContext,
588
- Yu as useViewport,
589
- Vu as useWorksheetLayout,
586
+ Vu as useViewport,
587
+ wu as useWorksheetLayout,
590
588
  Ur as useZoomDisable
591
589
  };
592
590
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.1.46",
3
+ "version": "3.1.47",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,5 +0,0 @@
1
- const n = () => window.innerWidth <= 600 ? "mobile" : "desktop";
2
- export {
3
- n as getDeviceConfig
4
- };
5
- //# sourceMappingURL=device.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"device.js","sources":["../../../../src/features/ui/theme/device.ts"],"sourcesContent":["import type { TSupportedDevices } from '../types';\n\nexport const getDeviceConfig = (): TSupportedDevices => {\n const MOBILE_WIDTH = 600;\n\n return window.innerWidth <= MOBILE_WIDTH ? 'mobile' : 'desktop';\n};\n"],"names":["getDeviceConfig"],"mappings":"AAEO,MAAMA,IAAkB,MAGtB,OAAO,cAAc,MAAe,WAAW;"}
@@ -1,16 +0,0 @@
1
- const e = {
2
- mobile: 480,
3
- tablet: 760,
4
- desktop: 920,
5
- large: 1200,
6
- xl: 1424
7
- }, l = (r) => r < e.mobile || r >= e.mobile && r < e.tablet ? "mobile" : r >= e.tablet && r < e.desktop ? "tablet" : r >= e.desktop && r < e.large ? "desktop" : r >= e.large && r < e.xl ? "large" : (r >= e.xl, "xl"), t = {
8
- minDesktop: `@media (min-width: ${e.desktop}px)`,
9
- minLarge: `@media (min-width: ${e.large}px)`
10
- };
11
- export {
12
- e as BREAKPOINTS,
13
- l as getDeviceType,
14
- t as media
15
- };
16
- //# sourceMappingURL=media.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"media.js","sources":["../../../src/features/utils/media.ts"],"sourcesContent":["export const BREAKPOINTS = {\n mobile: 480,\n tablet: 760,\n desktop: 920,\n large: 1200,\n xl: 1424,\n};\nexport type TDeviceType = 'mobile' | 'tablet' | 'desktop' | 'large' | 'xl';\n\nexport const getDeviceType = (width: number): TDeviceType => {\n if (width < BREAKPOINTS.mobile) return 'mobile';\n\n if (width >= BREAKPOINTS.mobile && width < BREAKPOINTS.tablet) return 'mobile';\n\n if (width >= BREAKPOINTS.tablet && width < BREAKPOINTS.desktop) return 'tablet';\n\n if (width >= BREAKPOINTS.desktop && width < BREAKPOINTS.large) return 'desktop';\n\n if (width >= BREAKPOINTS.large && width < BREAKPOINTS.xl) return 'large';\n\n if (width >= BREAKPOINTS.xl) return 'xl';\n\n return 'xl';\n};\n\nexport const media = {\n minDesktop: `@media (min-width: ${BREAKPOINTS.desktop}px)`,\n minLarge: `@media (min-width: ${BREAKPOINTS.large}px)`,\n};\n"],"names":["BREAKPOINTS","getDeviceType","width","media"],"mappings":"AAAO,MAAMA,IAAc;AAAA,EACzB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP,IAAI;AACN,GAGaC,IAAgB,CAACC,MACxBA,IAAQF,EAAY,UAEpBE,KAASF,EAAY,UAAUE,IAAQF,EAAY,SAAe,WAElEE,KAASF,EAAY,UAAUE,IAAQF,EAAY,UAAgB,WAEnEE,KAASF,EAAY,WAAWE,IAAQF,EAAY,QAAc,YAElEE,KAASF,EAAY,SAASE,IAAQF,EAAY,KAAW,WAE7DE,KAASF,EAAY,IAAW,OAKzBG,IAAQ;AAAA,EACnB,YAAY,sBAAsBH,EAAY,OAAO;AAAA,EACrD,UAAU,sBAAsBA,EAAY,KAAK;AACnD;"}