@cuemath/leap 3.2.4-aa0 → 3.2.4-aa1

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,26 +1,32 @@
1
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
- import { memo as p, Suspense as t } from "react";
1
+ import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
+ import { memo as C, Suspense as t } from "react";
3
3
  import { ErrorBoundary as a } from "react-error-boundary";
4
- import C from "../../../assets/line-icons/icons/cross.js";
4
+ import b from "../../../assets/line-icons/icons/cross.js";
5
5
  import d from "../error/error.js";
6
- import b from "../buttons/clickable/clickable.js";
6
+ import g from "../buttons/clickable/clickable.js";
7
7
  import h from "../loader/app-loader/app-loader.js";
8
- import { ModalContainer as n, SpotlightModal as g, ModalLoaderWrapper as $, BaseModal as k, CloseButtonContainer as u, BaseModalContent as M } from "./modal-styled.js";
9
- const L = p(({ modal: s, isClosing: o = !1, onClose: m }) => {
10
- const { renderAs: c, element: e, modalWidth: l, isDismissable: f } = s;
11
- return c === "spotlight" ? /* @__PURE__ */ r(a, { fallback: /* @__PURE__ */ r(d, { height: "100vh" }), children: /* @__PURE__ */ i(n, { $isClosing: o, children: [
12
- /* @__PURE__ */ r(g, { $isClosing: o }),
8
+ import { ModalContainer as n, SpotlightModal as $, ModalLoaderWrapper as s, BaseModal as k, CloseButtonContainer as u, BaseModalContent as M } from "./modal-styled.js";
9
+ const L = C(({ modal: m, isClosing: o = !1, onClose: c }) => {
10
+ const { renderAs: f, element: e, modalWidth: l, isDismissable: p } = m;
11
+ return f === "spotlight" ? /* @__PURE__ */ i(n, { $isClosing: o, children: [
12
+ /* @__PURE__ */ r($, { $isClosing: o }),
13
13
  /* @__PURE__ */ r(
14
- t,
14
+ a,
15
15
  {
16
- fallback: /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(h, { height: "100vh" }) }),
17
- children: e
16
+ fallback: /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r(d, { height: "100vh" }) }),
17
+ children: /* @__PURE__ */ r(
18
+ t,
19
+ {
20
+ fallback: /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r(h, { height: "100vh" }) }),
21
+ children: e
22
+ }
23
+ )
18
24
  }
19
25
  )
20
- ] }) }) : /* @__PURE__ */ r(a, { fallback: /* @__PURE__ */ r(d, { height: "100vh" }), children: /* @__PURE__ */ r(n, { $isClosing: o, children: /* @__PURE__ */ i(k, { $isClosing: o, $width: l, children: [
21
- f !== !1 && /* @__PURE__ */ r(u, { $modalWidth: l, children: /* @__PURE__ */ r(b, { label: "Close", onClick: m, children: /* @__PURE__ */ r(C, { width: 40, height: 40 }) }) }),
22
- /* @__PURE__ */ r(M, { $modalWidth: l, children: /* @__PURE__ */ r(t, { fallback: /* @__PURE__ */ r(h, {}), children: e }) })
23
- ] }) }) });
26
+ ] }) : /* @__PURE__ */ r(n, { $isClosing: o, children: /* @__PURE__ */ i(k, { $isClosing: o, $width: l, children: [
27
+ p !== !1 && /* @__PURE__ */ r(u, { $modalWidth: l, children: /* @__PURE__ */ r(g, { label: "Close", onClick: c, children: /* @__PURE__ */ r(b, { width: 40, height: 40 }) }) }),
28
+ /* @__PURE__ */ r(M, { $modalWidth: l, children: /* @__PURE__ */ r(a, { fallback: /* @__PURE__ */ r(d, { height: "100vh" }), children: /* @__PURE__ */ r(t, { fallback: /* @__PURE__ */ r(h, {}), children: e }) }) })
29
+ ] }) });
24
30
  });
25
31
  export {
26
32
  L as default
@@ -1 +1 @@
1
- {"version":3,"file":"modal.js","sources":["../../../../src/features/ui/modals/modal.tsx"],"sourcesContent":["import type { IModalProps } from './modal-types';\nimport type { FC } from 'react';\n\nimport { memo, Suspense } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Error from '../../ui/error/error';\nimport Clickable from '../buttons/clickable/clickable';\nimport AppLoader from '../loader/app-loader/app-loader';\nimport * as Styled from './modal-styled';\n\n/**\n * Modal component that renders modal content with close button\n * Handles animation state for entry and exit transitions\n */\nconst Modal: FC<IModalProps> = memo(({ modal, isClosing = false, onClose }) => {\n const { renderAs, element, modalWidth, isDismissable } = modal;\n\n if (renderAs === 'spotlight') {\n return (\n <ErrorBoundary fallback={<Error height=\"100vh\" />}>\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.SpotlightModal $isClosing={isClosing} />\n <Suspense\n fallback={\n <Styled.ModalLoaderWrapper>\n <AppLoader height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n >\n {element}\n </Suspense>\n </Styled.ModalContainer>\n </ErrorBoundary>\n );\n }\n\n return (\n <ErrorBoundary fallback={<Error height=\"100vh\" />}>\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.BaseModal $isClosing={isClosing} $width={modalWidth}>\n {isDismissable !== false && (\n <Styled.CloseButtonContainer $modalWidth={modalWidth}>\n <Clickable label=\"Close\" onClick={onClose}>\n <CrossIcon width={40} height={40} />\n </Clickable>\n </Styled.CloseButtonContainer>\n )}\n <Styled.BaseModalContent $modalWidth={modalWidth}>\n <Suspense fallback={<AppLoader />}>{element}</Suspense>\n </Styled.BaseModalContent>\n </Styled.BaseModal>\n </Styled.ModalContainer>\n </ErrorBoundary>\n );\n});\n\nexport default Modal;\n"],"names":["Modal","memo","modal","isClosing","onClose","renderAs","element","modalWidth","isDismissable","jsx","ErrorBoundary","Error","jsxs","Styled.ModalContainer","Styled.SpotlightModal","Suspense","Styled.ModalLoaderWrapper","AppLoader","Styled.BaseModal","Styled.CloseButtonContainer","Clickable","CrossIcon","Styled.BaseModalContent"],"mappings":";;;;;;;;AAgBM,MAAAA,IAAyBC,EAAK,CAAC,EAAE,OAAAC,GAAO,WAAAC,IAAY,IAAO,SAAAC,QAAc;AAC7E,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,YAAAC,GAAY,eAAAC,MAAkBN;AAEzD,SAAIG,MAAa,cAEZ,gBAAAI,EAAAC,GAAA,EAAc,UAAU,gBAAAD,EAACE,GAAM,EAAA,QAAO,QAAQ,CAAA,GAC7C,UAAC,gBAAAC,EAAAC,GAAA,EAAsB,YAAYV,GACjC,UAAA;AAAA,IAAA,gBAAAM,EAACK,GAAA,EAAsB,YAAYX,EAAW,CAAA;AAAA,IAC9C,gBAAAM;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,4BACGC,GAAA,EACC,UAAC,gBAAAP,EAAAQ,GAAA,EAAU,QAAO,QAAQ,CAAA,GAC5B;AAAA,QAGD,UAAAX;AAAA,MAAA;AAAA,IACH;AAAA,EAAA,EACF,CAAA,EACF,CAAA,IAKF,gBAAAG,EAACC,KAAc,UAAU,gBAAAD,EAACE,KAAM,QAAO,SAAQ,GAC7C,UAAC,gBAAAF,EAAAI,GAAA,EAAsB,YAAYV,GACjC,UAAC,gBAAAS,EAAAM,GAAA,EAAiB,YAAYf,GAAW,QAAQI,GAC9C,UAAA;AAAA,IAAkBC,MAAA,wBAChBW,GAAA,EAA4B,aAAaZ,GACxC,4BAACa,GAAU,EAAA,OAAM,SAAQ,SAAShB,GAChC,4BAACiB,GAAU,EAAA,OAAO,IAAI,QAAQ,IAAI,GACpC,EACF,CAAA;AAAA,IAED,gBAAAZ,EAAAa,GAAA,EAAwB,aAAaf,GACpC,UAAC,gBAAAE,EAAAM,GAAA,EAAS,UAAU,gBAAAN,EAACQ,GAAU,CAAA,CAAA,GAAK,YAAQ,CAAA,GAC9C;AAAA,EAAA,GACF,GACF,EACF,CAAA;AAEJ,CAAC;"}
1
+ {"version":3,"file":"modal.js","sources":["../../../../src/features/ui/modals/modal.tsx"],"sourcesContent":["import type { IModalProps } from './modal-types';\nimport type { FC } from 'react';\n\nimport { memo, Suspense } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Error from '../../ui/error/error';\nimport Clickable from '../buttons/clickable/clickable';\nimport AppLoader from '../loader/app-loader/app-loader';\nimport * as Styled from './modal-styled';\n\n/**\n * Modal component that renders modal content with close button\n * Handles animation state for entry and exit transitions\n */\nconst Modal: FC<IModalProps> = memo(({ modal, isClosing = false, onClose }) => {\n const { renderAs, element, modalWidth, isDismissable } = modal;\n\n if (renderAs === 'spotlight') {\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.SpotlightModal $isClosing={isClosing} />\n <ErrorBoundary\n fallback={\n <Styled.ModalLoaderWrapper>\n <Error height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n >\n <Suspense\n fallback={\n <Styled.ModalLoaderWrapper>\n <AppLoader height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n >\n {element}\n </Suspense>\n </ErrorBoundary>\n </Styled.ModalContainer>\n );\n }\n\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.BaseModal $isClosing={isClosing} $width={modalWidth}>\n {isDismissable !== false && (\n <Styled.CloseButtonContainer $modalWidth={modalWidth}>\n <Clickable label=\"Close\" onClick={onClose}>\n <CrossIcon width={40} height={40} />\n </Clickable>\n </Styled.CloseButtonContainer>\n )}\n <Styled.BaseModalContent $modalWidth={modalWidth}>\n <ErrorBoundary fallback={<Error height=\"100vh\" />}>\n <Suspense fallback={<AppLoader />}>{element}</Suspense>\n </ErrorBoundary>\n </Styled.BaseModalContent>\n </Styled.BaseModal>\n </Styled.ModalContainer>\n );\n});\n\nexport default Modal;\n"],"names":["Modal","memo","modal","isClosing","onClose","renderAs","element","modalWidth","isDismissable","jsxs","Styled.ModalContainer","jsx","Styled.SpotlightModal","ErrorBoundary","Styled.ModalLoaderWrapper","Error","Suspense","AppLoader","Styled.BaseModal","Styled.CloseButtonContainer","Clickable","CrossIcon","Styled.BaseModalContent"],"mappings":";;;;;;;;AAgBM,MAAAA,IAAyBC,EAAK,CAAC,EAAE,OAAAC,GAAO,WAAAC,IAAY,IAAO,SAAAC,QAAc;AAC7E,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,YAAAC,GAAY,e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