@cuemath/leap 3.3.24-as1 → 3.3.24-as2

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,58 +1,58 @@
1
- import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
- import n from "styled-components";
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
+ import m from "styled-components";
3
3
  import { ILLUSTRATIONS as f } from "../../../../assets/illustrations/illustrations.js";
4
4
  import C from "../../../../assets/line-icons/icons/clock2.js";
5
- import a from "../../layout/flex-view.js";
5
+ import p from "../../layout/flex-view.js";
6
6
  import h from "../../loader/reverse-circular-bar/reverse-circular-bar.js";
7
- import { IconWrapper as u } from "../class-time/constants.js";
8
- import w from "../timer/timer.js";
9
- const $ = n.div`
7
+ import { IconWrapper as w } from "../class-time/constants.js";
8
+ import $ from "../timer/timer.js";
9
+ const u = m.div`
10
10
  position: absolute;
11
11
  left: 50%;
12
12
  top: 54%;
13
13
  transform: translate(-50%, -50%);
14
- `, R = n(a)`
14
+ `, R = m(p)`
15
15
  position: relative;
16
16
  `, I = ({
17
17
  hideDigits: o,
18
- onTimerComplete: m,
18
+ onTimerComplete: a,
19
19
  timeRemaining: e,
20
- duration: p,
20
+ duration: t,
21
21
  textVariant: c = "eyebrow1",
22
22
  textColor: l = "BLACK",
23
- background: t = "ORANGE_1",
23
+ background: i = "GREY_1",
24
24
  iconColor: s = "BLACK",
25
25
  renderAs: d = "circular-progressive-bar"
26
- }) => /* @__PURE__ */ i(
27
- a,
26
+ }) => /* @__PURE__ */ n(
27
+ p,
28
28
  {
29
29
  $flexDirection: "row",
30
30
  $alignItems: "center",
31
- $background: t,
31
+ $background: i,
32
32
  $borderRadius: 18,
33
33
  $width: "fit-content",
34
34
  $gutter: o ? 4 : 8,
35
35
  $gap: 4,
36
36
  $flexGap: 4,
37
37
  children: [
38
- d === "circular-progressive-bar" ? /* @__PURE__ */ i(R, { children: [
38
+ d === "circular-progressive-bar" && t ? /* @__PURE__ */ n(R, { children: [
39
39
  /* @__PURE__ */ r("img", { src: f.CROSSHAIR_CIRCLE, width: 28, height: 28 }),
40
- /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(
40
+ /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(
41
41
  h,
42
42
  {
43
43
  timeRemaining: e,
44
- duration: p,
45
- color: t === "GREEN_1" ? "GREEN_5" : "ORANGE_5",
44
+ duration: t,
45
+ color: i === "GREEN_1" ? "GREEN_5" : "ORANGE_5",
46
46
  width: 14,
47
47
  height: 14
48
48
  }
49
49
  ) })
50
- ] }) : /* @__PURE__ */ r(u, { $iconColor: s, children: /* @__PURE__ */ r(C, {}) }),
50
+ ] }) : /* @__PURE__ */ r(w, { $iconColor: s, children: /* @__PURE__ */ r(C, {}) }),
51
51
  !o && /* @__PURE__ */ r(
52
- w,
52
+ $,
53
53
  {
54
54
  endTime: +new Date(Date.now() + e * 1e3) / 1e3,
55
- onComplete: m,
55
+ onComplete: a,
56
56
  textVariant: c,
57
57
  textColor: l
58
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"countdown-timer.js","sources":["../../../../../src/features/ui/timers/countdown-timer/countdown-timer.tsx"],"sourcesContent":["import type { TColorNames, TTextVariants } from '../../types';\nimport type { FC } from 'react';\n\nimport styled from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Clock2Icon from '../../../../assets/line-icons/icons/clock2';\nimport FlexView from '../../layout/flex-view';\nimport CircularProgressiveBar from '../../loader/reverse-circular-bar/reverse-circular-bar';\nimport { IconWrapper } from '../class-time/constants';\nimport Timer from '../timer/timer';\n\ninterface ICountdownTimer {\n hideDigits: boolean;\n onTimerComplete?: () => void;\n timeRemaining: number;\n duration: number;\n renderAs: 'circular-progressive-bar' | 'default';\n textVariant?: TTextVariants;\n textColor?: TColorNames;\n background: 'GREEN_1' | 'ORANGE_1' | 'GREY_1';\n iconColor: 'YELLOW_3' | 'ORANGE_3' | 'BLACK' | 'WHITE';\n}\n\nconst LoaderWrapper = styled.div`\n position: absolute;\n left: 50%;\n top: 54%;\n transform: translate(-50%, -50%);\n`;\n\nconst ImageWrapper = styled(FlexView)`\n position: relative;\n`;\n\nconst CountdownTimer: FC<ICountdownTimer> = ({\n hideDigits,\n onTimerComplete,\n timeRemaining,\n duration,\n textVariant = 'eyebrow1',\n textColor = 'BLACK',\n background = 'ORANGE_1',\n iconColor = 'BLACK',\n renderAs = 'circular-progressive-bar',\n}) => {\n return (\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $background={background}\n $borderRadius={18}\n $width=\"fit-content\"\n $gutter={hideDigits ? 4 : 8}\n $gap={4}\n $flexGap={4}\n >\n {renderAs === 'circular-progressive-bar' ? (\n <ImageWrapper>\n <img src={ILLUSTRATIONS.CROSSHAIR_CIRCLE} width={28} height={28} />\n <LoaderWrapper>\n <CircularProgressiveBar\n timeRemaining={timeRemaining}\n duration={duration}\n color={background === 'GREEN_1' ? 'GREEN_5' : 'ORANGE_5'}\n width={14}\n height={14}\n />\n </LoaderWrapper>\n </ImageWrapper>\n ) : (\n <IconWrapper $iconColor={iconColor}>\n <Clock2Icon />\n </IconWrapper>\n )}\n {!hideDigits && (\n <Timer\n endTime={+new Date(Date.now() + timeRemaining * 1000) / 1000}\n onComplete={onTimerComplete}\n textVariant={textVariant}\n textColor={textColor}\n />\n )}\n </FlexView>\n );\n};\n\nexport default CountdownTimer;\n"],"names":["LoaderWrapper","styled","ImageWrapper","FlexView","CountdownTimer","hideDigits","onTimerComplete","timeRemaining","duration","textVariant","textColor","background","iconColor","renderAs","jsxs","jsx","ILLUSTRATIONS","CircularProgressiveBar","IconWrapper","Clock2Icon","Timer","CountdownTimer$1"],"mappings":";;;;;;;;AAwBA,MAAMA,IAAgBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAOvBC,IAAeD,EAAOE,CAAQ;AAAA;AAAA,GAI9BC,IAAsC,CAAC;AAAA,EAC3C,YAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,WAAAC,IAAY;AAAA,EACZ,YAAAC,IAAa;AAAA,EACb,WAAAC,IAAY;AAAA,EACZ,UAAAC,IAAW;AACb,MAEI,gBAAAC;AAAA,EAACX;AAAA,EAAA;AAAA,IACC,gBAAe;AAAA,IACf,aAAY;AAAA,IACZ,aAAaQ;AAAA,IACb,eAAe;AAAA,IACf,QAAO;AAAA,IACP,SAASN,IAAa,IAAI;AAAA,IAC1B,MAAM;AAAA,IACN,UAAU;AAAA,IAET,UAAA;AAAA,MAAaQ,MAAA,+CACXX,GACC,EAAA,UAAA;AAAA,QAAA,gBAAAa,EAAC,SAAI,KAAKC,EAAc,kBAAkB,OAAO,IAAI,QAAQ,IAAI;AAAA,0BAChEhB,GACC,EAAA,UAAA,gBAAAe;AAAA,UAACE;AAAAA,UAAA;AAAA,YACC,eAAAV;AAAA,YACA,UAAAC;AAAA,YACA,OAAOG,MAAe,YAAY,YAAY;AAAA,YAC9C,OAAO;AAAA,YACP,QAAQ;AAAA,UAAA;AAAA,QAAA,GAEZ;AAAA,MAAA,EAAA,CACF,IAEC,gBAAAI,EAAAG,GAAA,EAAY,YAAYN,GACvB,UAAA,gBAAAG,EAACI,KAAW,EACd,CAAA;AAAA,MAED,CAACd,KACA,gBAAAU;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,SAAS,CAAC,IAAI,KAAK,KAAK,IAAI,IAAIb,IAAgB,GAAI,IAAI;AAAA,UACxD,YAAYD;AAAA,UACZ,aAAAG;AAAA,UACA,WAAAC;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAAA,GAMRW,IAAejB;"}
1
+ {"version":3,"file":"countdown-timer.js","sources":["../../../../../src/features/ui/timers/countdown-timer/countdown-timer.tsx"],"sourcesContent":["import type { TColorNames, TTextVariants } from '../../types';\nimport type { FC } from 'react';\n\nimport styled from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Clock2Icon from '../../../../assets/line-icons/icons/clock2';\nimport FlexView from '../../layout/flex-view';\nimport CircularProgressiveBar from '../../loader/reverse-circular-bar/reverse-circular-bar';\nimport { IconWrapper } from '../class-time/constants';\nimport Timer from '../timer/timer';\n\ninterface ICountdownTimer {\n renderAs: 'circular-progressive-bar' | 'default';\n hideDigits: boolean;\n onTimerComplete?: () => void;\n timeRemaining: number;\n background: 'GREEN_1' | 'ORANGE_1' | 'GREY_1';\n duration?: number;\n textVariant?: TTextVariants;\n textColor?: TColorNames;\n iconColor?: 'YELLOW_3' | 'ORANGE_3' | 'BLACK' | 'WHITE';\n}\n\nconst LoaderWrapper = styled.div`\n position: absolute;\n left: 50%;\n top: 54%;\n transform: translate(-50%, -50%);\n`;\n\nconst ImageWrapper = styled(FlexView)`\n position: relative;\n`;\n\nconst CountdownTimer: FC<ICountdownTimer> = ({\n hideDigits,\n onTimerComplete,\n timeRemaining,\n duration,\n textVariant = 'eyebrow1',\n textColor = 'BLACK',\n background = 'GREY_1',\n iconColor = 'BLACK',\n renderAs = 'circular-progressive-bar',\n}) => {\n return (\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $background={background}\n $borderRadius={18}\n $width=\"fit-content\"\n $gutter={hideDigits ? 4 : 8}\n $gap={4}\n $flexGap={4}\n >\n {renderAs === 'circular-progressive-bar' && duration ? (\n <ImageWrapper>\n <img src={ILLUSTRATIONS.CROSSHAIR_CIRCLE} width={28} height={28} />\n <LoaderWrapper>\n <CircularProgressiveBar\n timeRemaining={timeRemaining}\n duration={duration}\n color={background === 'GREEN_1' ? 'GREEN_5' : 'ORANGE_5'}\n width={14}\n height={14}\n />\n </LoaderWrapper>\n </ImageWrapper>\n ) : (\n <IconWrapper $iconColor={iconColor}>\n <Clock2Icon />\n </IconWrapper>\n )}\n {!hideDigits && (\n <Timer\n endTime={+new Date(Date.now() + timeRemaining * 1000) / 1000}\n onComplete={onTimerComplete}\n textVariant={textVariant}\n textColor={textColor}\n />\n )}\n </FlexView>\n );\n};\n\nexport default CountdownTimer;\n"],"names":["LoaderWrapper","styled","ImageWrapper","FlexView","CountdownTimer","hideDigits","onTimerComplete","timeRemaining","duration","textVariant","textColor","background","iconColor","renderAs","jsxs","jsx","ILLUSTRATIONS","CircularProgressiveBar","IconWrapper","Clock2Icon","Timer","CountdownTimer$1"],"mappings":";;;;;;;;AAwBA,MAAMA,IAAgBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAOvBC,IAAeD,EAAOE,CAAQ;AAAA;AAAA,GAI9BC,IAAsC,CAAC;AAAA,EAC3C,YAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,WAAAC,IAAY;AAAA,EACZ,YAAAC,IAAa;AAAA,EACb,WAAAC,IAAY;AAAA,EACZ,UAAAC,IAAW;AACb,MAEI,gBAAAC;AAAA,EAACX;AAAA,EAAA;AAAA,IACC,gBAAe;AAAA,IACf,aAAY;AAAA,IACZ,aAAaQ;AAAA,IACb,eAAe;AAAA,IACf,QAAO;AAAA,IACP,SAASN,IAAa,IAAI;AAAA,IAC1B,MAAM;AAAA,IACN,UAAU;AAAA,IAET,UAAA;AAAA,MAAaQ,MAAA,8BAA8BL,IAC1C,gBAAAM,EAACZ,GACC,EAAA,UAAA;AAAA,QAAA,gBAAAa,EAAC,SAAI,KAAKC,EAAc,kBAAkB,OAAO,IAAI,QAAQ,IAAI;AAAA,0BAChEhB,GACC,EAAA,UAAA,gBAAAe;AAAA,UAACE;AAAAA,UAAA;AAAA,YACC,eAAAV;AAAA,YACA,UAAAC;AAAA,YACA,OAAOG,MAAe,YAAY,YAAY;AAAA,YAC9C,OAAO;AAAA,YACP,QAAQ;AAAA,UAAA;AAAA,QAAA,GAEZ;AAAA,MAAA,EAAA,CACF,IAEC,gBAAAI,EAAAG,GAAA,EAAY,YAAYN,GACvB,UAAA,gBAAAG,EAACI,KAAW,EACd,CAAA;AAAA,MAED,CAACd,KACA,gBAAAU;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,SAAS,CAAC,IAAI,KAAK,KAAK,IAAI,IAAIb,IAAgB,GAAI,IAAI;AAAA,UACxD,YAAYD;AAAA,UACZ,aAAAG;AAAA,UACA,WAAAC;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAAA,GAMRW,IAAejB;"}
package/dist/index.d.ts CHANGED
@@ -1477,15 +1477,15 @@ declare interface IContextMenuProps {
1477
1477
  }
1478
1478
 
1479
1479
  declare interface ICountdownTimer {
1480
+ renderAs: 'circular-progressive-bar' | 'default';
1480
1481
  hideDigits: boolean;
1481
1482
  onTimerComplete?: () => void;
1482
1483
  timeRemaining: number;
1483
- duration: number;
1484
- renderAs: 'circular-progressive-bar' | 'default';
1484
+ background: 'GREEN_1' | 'ORANGE_1' | 'GREY_1';
1485
+ duration?: number;
1485
1486
  textVariant?: TTextVariants;
1486
1487
  textColor?: TColorNames;
1487
- background: 'GREEN_1' | 'ORANGE_1' | 'GREY_1';
1488
- iconColor: 'YELLOW_3' | 'ORANGE_3' | 'BLACK' | 'WHITE';
1488
+ iconColor?: 'YELLOW_3' | 'ORANGE_3' | 'BLACK' | 'WHITE';
1489
1489
  }
1490
1490
 
1491
1491
  export declare interface ICreateUserPayloadDal {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.3.24-as1",
3
+ "version": "3.3.24-as2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"