@cuemath/leap 3.2.2-aa10 → 3.2.2-aa11
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,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as h, Suspense as
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as d, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { memo as h, Suspense as n } from "react";
|
|
3
|
+
import m from "../../../assets/line-icons/icons/cross.js";
|
|
4
4
|
import f from "../buttons/clickable/clickable.js";
|
|
5
|
-
import { ModalContainer as
|
|
6
|
-
const B = h(({ modal:
|
|
7
|
-
const { renderAs:
|
|
8
|
-
return
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
|
|
11
|
-
] }) : /* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
/* @__PURE__ */
|
|
5
|
+
import { ModalContainer as r, SpotlightModal as p, BaseModal as C, CloseButtonContainer as g, BaseModalContent as M } from "./modal-styled.js";
|
|
6
|
+
const B = h(({ modal: s, isClosing: o = !1, onClose: t }) => {
|
|
7
|
+
const { renderAs: a, element: e, modalWidth: i, isDismissable: c } = s;
|
|
8
|
+
return a === "spotlight" ? /* @__PURE__ */ d(r, { $isClosing: o, children: [
|
|
9
|
+
/* @__PURE__ */ l(p, { $isClosing: o }),
|
|
10
|
+
/* @__PURE__ */ l(n, { fallback: /* @__PURE__ */ l("div", { children: console.log("===Modal is loading...") }), children: e })
|
|
11
|
+
] }) : /* @__PURE__ */ l(r, { $isClosing: o, children: /* @__PURE__ */ d(C, { $isClosing: o, $width: i, children: [
|
|
12
|
+
c !== !1 && /* @__PURE__ */ l(g, { $modalWidth: i, children: /* @__PURE__ */ l(f, { label: "Close", onClick: t, children: /* @__PURE__ */ l(m, { width: 40, height: 40 }) }) }),
|
|
13
|
+
/* @__PURE__ */ l(M, { $modalWidth: i, children: /* @__PURE__ */ l(n, { fallback: /* @__PURE__ */ l("div", { children: console.log("===Modal is loading...") }), children: e }) })
|
|
14
14
|
] }) });
|
|
15
15
|
});
|
|
16
16
|
export {
|
|
@@ -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';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Clickable from '../buttons/clickable/clickable';\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 {element}
|
|
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';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Clickable from '../buttons/clickable/clickable';\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 <Suspense fallback={<div>{console.log('===Modal is loading...')}</div>}>{element}</Suspense>\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 <Suspense fallback={<div>{console.log('===Modal is loading...')}</div>}>\n {element}\n </Suspense>\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","Suspense","Styled.BaseModal","Styled.CloseButtonContainer","Clickable","CrossIcon","Styled.BaseModalContent"],"mappings":";;;;;AAaM,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,EAAsB,YAAYP,GACjC,UAAA;AAAA,IAAA,gBAAAQ,EAACC,GAAA,EAAsB,YAAYT,EAAW,CAAA;AAAA,IAC9C,gBAAAQ,EAACE,GAAS,EAAA,UAAW,gBAAAF,EAAA,OAAA,EAAK,kBAAQ,IAAI,wBAAwB,EAAE,CAAA,GAAS,UAAQL,EAAA,CAAA;AAAA,EACnF,EAAA,CAAA,IAKD,gBAAAK,EAAAD,GAAA,EAAsB,YAAYP,GACjC,UAAC,gBAAAM,EAAAK,GAAA,EAAiB,YAAYX,GAAW,QAAQI,GAC9C,UAAA;AAAA,IAAkBC,MAAA,wBAChBO,GAAA,EAA4B,aAAaR,GACxC,4BAACS,GAAU,EAAA,OAAM,SAAQ,SAASZ,GAChC,4BAACa,GAAU,EAAA,OAAO,IAAI,QAAQ,IAAI,GACpC,EACF,CAAA;AAAA,sBAEDC,GAAA,EAAwB,aAAaX,GACpC,UAAC,gBAAAI,EAAAE,GAAA,EAAS,UAAU,gBAAAF,EAAC,SAAK,UAAQ,QAAA,IAAI,wBAAwB,EAAE,CAAA,GAC7D,YACH,CAAA,GACF;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,CAAC;"}
|