@cuemath/leap 3.2.17 → 3.2.18-link.0
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.
- package/dist/assets/illustrations/illustrations.js +1 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/star3.js +32 -0
- package/dist/assets/line-icons/icons/star3.js.map +1 -0
- package/dist/features/trial-session/comps/student-profile/student-profile.js +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +7 -50
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +15 -69
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +49 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +64 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +28 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js +83 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -0
- package/dist/features/ui/accordion/accordion.js +62 -0
- package/dist/features/ui/accordion/accordion.js.map +1 -0
- package/dist/features/ui/inputs/base-input/base-input.js +11 -11
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input.js +19 -18
- package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +43 -8
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +37 -27
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/text/text.js +31 -29
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/clrs.js +2 -0
- package/dist/features/ui/theme/clrs.js.map +1 -1
- package/dist/index.d.ts +67 -2
- package/dist/index.js +635 -625
- package/dist/index.js.map +1 -1
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/dist/static/stripe-blurple.6abf422f.svg +1 -0
- package/package.json +2 -3
- package/dist/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
- /package/dist/node_modules/{decode-uri-component → query-string/node_modules/decode-uri-component}/index.js +0 -0
@@ -0,0 +1,62 @@
|
|
1
|
+
import { jsxs as k, jsx as f } from "react/jsx-runtime";
|
2
|
+
import { memo as C, useState as $, useMemo as b, useCallback as m, useEffect as x } from "react";
|
3
|
+
import H from "../layout/flex-view.js";
|
4
|
+
import R from "../separator/separator.js";
|
5
|
+
import V from "../text/text.js";
|
6
|
+
import w from "./accordion-items/accordion-items.js";
|
7
|
+
const y = C((S) => {
|
8
|
+
const { theme: p = "light", visibleBuffer: i, accordionData: c, defaultOpenElement: v = -1 } = S, [l, g] = $(i), [o, E] = $(v), r = b(() => [], []), s = b(() => [], []), T = p === "dark", A = m(() => {
|
9
|
+
g((e) => e < c.length ? c.length : i);
|
10
|
+
}, [c.length, i]), n = m((e, t) => {
|
11
|
+
e instanceof HTMLDivElement ? e.style.maxHeight = t ? `${e.scrollHeight}px` : "0px" : e instanceof SVGSVGElement && (e.style.transform = t ? "rotateZ(45deg)" : "rotateZ(0deg)");
|
12
|
+
}, []), D = m(
|
13
|
+
(e) => {
|
14
|
+
const t = r[e], h = s[e];
|
15
|
+
if (!t || !h) return;
|
16
|
+
const a = o === e, L = a ? -1 : e;
|
17
|
+
if (o !== -1 && o !== e) {
|
18
|
+
const u = r[o], d = s[o];
|
19
|
+
u && d && (n(u, !1), n(d, !1));
|
20
|
+
}
|
21
|
+
n(t, !a), n(h, !a), E(L);
|
22
|
+
},
|
23
|
+
[r, s, o, n]
|
24
|
+
);
|
25
|
+
return x(() => {
|
26
|
+
g(i);
|
27
|
+
}, [i]), x(() => {
|
28
|
+
o !== -1 && r[o] && s[o] && (n(r[o], !0), n(s[o], !0));
|
29
|
+
}, [l, o, r, s, n]), /* @__PURE__ */ k(H, { $flexDirection: "column", children: [
|
30
|
+
c.map((e, t) => /* @__PURE__ */ f(
|
31
|
+
w,
|
32
|
+
{
|
33
|
+
item: e,
|
34
|
+
index: t,
|
35
|
+
handleToggle: D,
|
36
|
+
refList: r,
|
37
|
+
iconRef: s,
|
38
|
+
visible: t < l,
|
39
|
+
theme: p
|
40
|
+
},
|
41
|
+
`${e.accordionQuestion}-${t}`
|
42
|
+
)),
|
43
|
+
/* @__PURE__ */ f(R, { height: 24 }),
|
44
|
+
/* @__PURE__ */ f(
|
45
|
+
V,
|
46
|
+
{
|
47
|
+
$renderAs: "ub3-bold",
|
48
|
+
$align: "center",
|
49
|
+
$textDecoration: "underline",
|
50
|
+
$marginBottom: 24,
|
51
|
+
onClick: A,
|
52
|
+
$color: T ? "WHITE" : "BLACK",
|
53
|
+
$cursor: "pointer",
|
54
|
+
children: l < c.length ? "See More" : "See Less"
|
55
|
+
}
|
56
|
+
)
|
57
|
+
] });
|
58
|
+
}), Z = y;
|
59
|
+
export {
|
60
|
+
Z as default
|
61
|
+
};
|
62
|
+
//# sourceMappingURL=accordion.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"accordion.js","sources":["../../../../src/features/ui/accordion/accordion.tsx"],"sourcesContent":["import type { AccordionProps } from './accordion-types';\n\nimport { useCallback, useEffect, useMemo, useState, memo } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport Separator from '../separator/separator';\nimport Text from '../text/text';\nimport AccordionItem from './accordion-items/accordion-items';\n\nconst Accordion = memo<AccordionProps>(props => {\n const { theme = 'light', visibleBuffer, accordionData, defaultOpenElement = -1 } = props;\n const [visible, setVisible] = useState(visibleBuffer);\n const [openIndex, setOpenIndex] = useState<number>(defaultOpenElement);\n const refList = useMemo<(HTMLDivElement | null)[]>(() => [], []);\n const iconRef = useMemo<(SVGSVGElement | null)[]>(() => [], []);\n const isDarkTheme = theme === 'dark';\n\n const handleShowToggle = useCallback(() => {\n setVisible(prev => (prev < accordionData.length ? accordionData.length : visibleBuffer));\n }, [accordionData.length, visibleBuffer]);\n\n const animateElement = useCallback((element: HTMLElement | SVGElement, isOpen: boolean) => {\n if (element instanceof HTMLDivElement) {\n element.style.maxHeight = isOpen ? `${element.scrollHeight}px` : '0px';\n } else if (element instanceof SVGSVGElement) {\n element.style.transform = isOpen ? 'rotateZ(45deg)' : 'rotateZ(0deg)';\n }\n }, []);\n\n const handleToggle = useCallback(\n (currentIndex: number) => {\n const currentRefList = refList[currentIndex];\n const currentIconRef = iconRef[currentIndex];\n\n if (!currentRefList || !currentIconRef) return;\n\n const isCurrentlyOpen = openIndex === currentIndex;\n const newOpenIndex = isCurrentlyOpen ? -1 : currentIndex;\n\n // Close previously open item\n if (openIndex !== -1 && openIndex !== currentIndex) {\n const prevRef = refList[openIndex];\n const prevIcon = iconRef[openIndex];\n\n if (prevRef && prevIcon) {\n animateElement(prevRef, false);\n animateElement(prevIcon, false);\n }\n }\n\n // Toggle current item\n animateElement(currentRefList, !isCurrentlyOpen);\n animateElement(currentIconRef, !isCurrentlyOpen);\n\n setOpenIndex(newOpenIndex);\n },\n [refList, iconRef, openIndex, animateElement],\n );\n\n useEffect(() => {\n setVisible(visibleBuffer);\n }, [visibleBuffer]);\n\n useEffect(() => {\n if (openIndex !== -1 && refList[openIndex] && iconRef[openIndex]) {\n animateElement(refList[openIndex]!, true);\n animateElement(iconRef[openIndex]!, true);\n }\n }, [visible, openIndex, refList, iconRef, animateElement]);\n\n return (\n <FlexView $flexDirection=\"column\">\n {accordionData.map((item, index) => (\n <AccordionItem\n key={`${item.accordionQuestion}-${index}`}\n item={item}\n index={index}\n handleToggle={handleToggle}\n refList={refList}\n iconRef={iconRef}\n visible={index < visible}\n theme={theme}\n />\n ))}\n <Separator height={24} />\n <Text\n $renderAs=\"ub3-bold\"\n $align=\"center\"\n $textDecoration=\"underline\"\n $marginBottom={24}\n onClick={handleShowToggle}\n $color={isDarkTheme ? 'WHITE' : 'BLACK'}\n $cursor=\"pointer\"\n >\n {visible < accordionData.length ? 'See More' : 'See Less'}\n </Text>\n </FlexView>\n );\n});\n\nexport default Accordion;\n"],"names":["Accordion","memo","props","theme","visibleBuffer","accordionData","defaultOpenElement","visible","setVisible","useState","openIndex","setOpenIndex","refList","useMemo","iconRef","isDarkTheme","handleShowToggle","useCallback","prev","animateElement","element","isOpen","handleToggle","currentIndex","currentRefList","currentIconRef","isCurrentlyOpen","newOpenIndex","prevRef","prevIcon","useEffect","jsxs","FlexView","item","index","jsx","AccordionItem","Separator","Text","Accordion$1"],"mappings":";;;;;;AASA,MAAMA,IAAYC,EAAqB,CAASC,MAAA;AAC9C,QAAM,EAAE,OAAAC,IAAQ,SAAS,eAAAC,GAAe,eAAAC,GAAe,oBAAAC,IAAqB,GAAO,IAAAJ,GAC7E,CAACK,GAASC,CAAU,IAAIC,EAASL,CAAa,GAC9C,CAACM,GAAW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,CAAS,MAC9CS,EAAAP,EAAQF,CAAS,GAAI,EAAI,GACzBS,EAAAL,EAAQJ,CAAS,GAAI,EAAI;AAAA,EAC1C,GACC,CAACH,GAASG,GAAWE,GAASE,GAASK,CAAc,CAAC,GAGvD,gBAAAY,EAACC,GAAS,EAAA,gBAAe,UACtB,UAAA;AAAA,IAAc3B,EAAA,IAAI,CAAC4B,GAAMC,MACxB,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QAEC,MAAAH;AAAA,QACA,OAAAC;AAAA,QACA,cAAAZ;AAAA,QACA,SAAAV;AAAA,QACA,SAAAE;AAAA,QACA,SAASoB,IAAQ3B;AAAA,QACjB,OAAAJ;AAAA,MAAA;AAAA,MAPK,GAAG8B,EAAK,iBAAiB,IAAIC,CAAK;AAAA,IAAA,CAS1C;AAAA,IACD,gBAAAC,EAACE,GAAU,EAAA,QAAQ,GAAI,CAAA;AAAA,IACvB,gBAAAF;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,QAAO;AAAA,QACP,iBAAgB;AAAA,QAChB,eAAe;AAAA,QACf,SAAStB;AAAA,QACT,QAAQD,IAAc,UAAU;AAAA,QAChC,SAAQ;AAAA,QAEP,UAAAR,IAAUF,EAAc,SAAS,aAAa;AAAA,MAAA;AAAA,IACjD;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC,GAEDkC,IAAevC;"}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { jsx as r, jsxs as
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
2
2
|
import { useTheme as g } from "styled-components";
|
3
3
|
import { Container as x, Wrapper as z, InputWrapper as f, Error as L, HelperText as y, SiblingWrapper as R, Label as E } from "./base-input-styled.js";
|
4
|
-
const
|
4
|
+
const H = ($) => {
|
5
5
|
const {
|
6
|
-
label:
|
7
|
-
stickyLabel:
|
6
|
+
label: l,
|
7
|
+
stickyLabel: h,
|
8
8
|
renderAs: e,
|
9
9
|
width: b,
|
10
10
|
widthX: c,
|
@@ -19,8 +19,8 @@ const k = (h) => {
|
|
19
19
|
shape: t,
|
20
20
|
isTransparent: p = !1,
|
21
21
|
helperText: o
|
22
|
-
} =
|
23
|
-
return /* @__PURE__ */ r(x, { $width: b, $widthX: c, $size: s, $willShowMessage: u, children: /* @__PURE__ */
|
22
|
+
} = $, { input: T } = g();
|
23
|
+
return /* @__PURE__ */ r(x, { $width: b, $widthX: c, $size: s, $willShowMessage: u, children: /* @__PURE__ */ a(
|
24
24
|
z,
|
25
25
|
{
|
26
26
|
$renderAs: e,
|
@@ -29,7 +29,7 @@ const k = (h) => {
|
|
29
29
|
$shape: t,
|
30
30
|
$isTransparent: p,
|
31
31
|
children: [
|
32
|
-
/* @__PURE__ */
|
32
|
+
/* @__PURE__ */ a(f, { children: [
|
33
33
|
w,
|
34
34
|
n && /* @__PURE__ */ r(L, { $renderAs: "body3", $inputRenderAs: e, children: n }),
|
35
35
|
o && !n && /* @__PURE__ */ r(y, { $renderAs: "ub3", $inputRenderAs: e, children: o })
|
@@ -44,18 +44,18 @@ const k = (h) => {
|
|
44
44
|
children: d
|
45
45
|
}
|
46
46
|
) : void 0,
|
47
|
-
|
47
|
+
l && t !== "curved" && /* @__PURE__ */ a(
|
48
48
|
E,
|
49
49
|
{
|
50
50
|
$renderAs: T.sizes[s].labelTextVariant,
|
51
51
|
$inputRenderAs: e,
|
52
52
|
$size: s,
|
53
|
-
$stickyLabel:
|
53
|
+
$stickyLabel: h,
|
54
54
|
$disabled: i,
|
55
55
|
$shape: t,
|
56
56
|
$isTransparent: p,
|
57
57
|
children: [
|
58
|
-
|
58
|
+
l,
|
59
59
|
A && /* @__PURE__ */ r("span", { children: "*" })
|
60
60
|
]
|
61
61
|
}
|
@@ -63,7 +63,7 @@ const k = (h) => {
|
|
63
63
|
]
|
64
64
|
}
|
65
65
|
) });
|
66
|
-
};
|
66
|
+
}, k = H;
|
67
67
|
export {
|
68
68
|
k as default
|
69
69
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"base-input.js","sources":["../../../../../src/features/ui/inputs/base-input/base-input.tsx"],"sourcesContent":["import type { IBaseInputProps } from './base-input-types';\n\nimport React from 'react';\nimport { useTheme } from 'styled-components';\n\nimport {\n Container,\n Error,\n InputWrapper,\n Label,\n SiblingWrapper,\n Wrapper,\n HelperText,\n} from './base-input-styled';\n\nconst BaseInput: React.FC<IBaseInputProps> = props => {\n const {\n label,\n stickyLabel,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n inputElement,\n siblingElement,\n siblingPosition,\n size,\n errorMessage,\n mandatory,\n shape,\n isTransparent = false,\n helperText,\n } = props;\n const { input } = useTheme();\n const showLabel = label && shape !== 'curved';\n const showHelperText = helperText && !errorMessage;\n\n return (\n <Container $width={width} $widthX={widthX} $size={size} $willShowMessage={willShowMessage}>\n <Wrapper\n $renderAs={renderAs}\n $size={size}\n $disabled={disabled}\n $shape={shape}\n $isTransparent={isTransparent}\n >\n <InputWrapper>\n {inputElement}\n {errorMessage && (\n <Error $renderAs=\"body3\" $inputRenderAs={renderAs}>\n {errorMessage}\n </Error>\n )}\n {showHelperText && (\n <HelperText $renderAs=\"ub3\" $inputRenderAs={renderAs}>\n {helperText}\n </HelperText>\n )}\n </InputWrapper>\n {siblingElement ? (\n <SiblingWrapper\n $inputRenderAs={renderAs}\n $disabled={disabled}\n $size={size}\n $siblingPosition={siblingPosition ?? 'right'}\n >\n {siblingElement}\n </SiblingWrapper>\n ) : undefined}\n {showLabel && (\n <Label\n $renderAs={input.sizes[size].labelTextVariant}\n $inputRenderAs={renderAs}\n $size={size}\n $stickyLabel={stickyLabel}\n $disabled={disabled}\n $shape={shape}\n $isTransparent={isTransparent}\n >\n {label}\n {mandatory && <span>*</span>}\n </Label>\n )}\n </Wrapper>\n </Container>\n );\n};\n\nexport default BaseInput;\n"],"names":["BaseInput","props","label","stickyLabel","renderAs","width","widthX","disabled","willShowMessage","inputElement","siblingElement","siblingPosition","size","errorMessage","mandatory","shape","isTransparent","helperText","input","useTheme","jsx","Container","jsxs","Wrapper","InputWrapper","Error","HelperText","SiblingWrapper","Label"],"mappings":";;;AAeA,MAAMA,IAAuC,CAASC,MAAA;AAC9C,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,IAChB,YAAAC;AAAA,EACE,IAAAhB,GACE,EAAE,OAAAiB,MAAUC;AAKhB,SAAA,gBAAAC,EAACC,KAAU,QAAQhB,GAAO,SAASC,GAAQ,OAAOM,GAAM,kBAAkBJ,GACxE,UAAA,gBAAAc;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWnB;AAAA,MACX,OAAOQ;AAAA,MACP,WAAWL;AAAA,MACX,QAAQQ;AAAA,MACR,gBAAgBC;AAAA,MAEhB,UAAA;AAAA,QAAA,gBAAAM,EAACE,GACE,EAAA,UAAA;AAAA,UAAAf;AAAA,UACAI,KACE,gBAAAO,EAAAK,GAAA,EAAM,WAAU,SAAQ,gBAAgBrB,GACtC,UACHS,GAAA;AAAA,UAhBaI,KAAc,CAACJ,KAmB3B,gBAAAO,EAAAM,GAAA,EAAW,WAAU,OAAM,gBAAgBtB,GACzC,UACHa,GAAA;AAAA,QAAA,GAEJ;AAAA,QACCP,IACC,gBAAAU;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,gBAAgBvB;AAAA,YAChB,WAAWG;AAAA,YACX,OAAOK;AAAA,YACP,kBAAkBD,KAAmB;AAAA,YAEpC,UAAAD;AAAA,UAAA;AAAA,QAED,IAAA;AAAA,QAlCQR,KAASa,MAAU,YAoC7B,gBAAAO;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,WAAWV,EAAM,MAAMN,CAAI,EAAE;AAAA,YAC7B,gBAAgBR;AAAA,YAChB,OAAOQ;AAAA,YACP,cAAcT;AAAA,YACd,WAAWI;AAAA,YACX,QAAQQ;AAAA,YACR,gBAAgBC;AAAA,YAEf,UAAA;AAAA,cAAAd;AAAA,cACAY,KAAc,gBAAAM,EAAA,QAAA,EAAK,UAAC,IAAA,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACvB;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN,EAAA,CAAA;AAEJ;"}
|
1
|
+
{"version":3,"file":"base-input.js","sources":["../../../../../src/features/ui/inputs/base-input/base-input.tsx"],"sourcesContent":["import type { IBaseInputProps } from './base-input-types';\n\nimport React from 'react';\nimport { useTheme } from 'styled-components';\n\nimport {\n Container,\n Error,\n InputWrapper,\n Label,\n SiblingWrapper,\n Wrapper,\n HelperText,\n} from './base-input-styled';\n\nconst BaseInput: React.FC<IBaseInputProps> = props => {\n const {\n label,\n stickyLabel,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n inputElement,\n siblingElement,\n siblingPosition,\n size,\n errorMessage,\n mandatory,\n shape,\n isTransparent = false,\n helperText,\n } = props;\n const { input } = useTheme();\n const showLabel = label && shape !== 'curved';\n const showHelperText = helperText && !errorMessage;\n\n return (\n <Container $width={width} $widthX={widthX} $size={size} $willShowMessage={willShowMessage}>\n <Wrapper\n $renderAs={renderAs}\n $size={size}\n $disabled={disabled}\n $shape={shape}\n $isTransparent={isTransparent}\n >\n <InputWrapper>\n {inputElement}\n {errorMessage && (\n <Error $renderAs=\"body3\" $inputRenderAs={renderAs}>\n {errorMessage}\n </Error>\n )}\n {showHelperText && (\n <HelperText $renderAs=\"ub3\" $inputRenderAs={renderAs}>\n {helperText}\n </HelperText>\n )}\n </InputWrapper>\n {siblingElement ? (\n <SiblingWrapper\n $inputRenderAs={renderAs}\n $disabled={disabled}\n $size={size}\n $siblingPosition={siblingPosition ?? 'right'}\n >\n {siblingElement}\n </SiblingWrapper>\n ) : undefined}\n {showLabel && (\n <Label\n $renderAs={input.sizes[size].labelTextVariant}\n $inputRenderAs={renderAs}\n $size={size}\n $stickyLabel={stickyLabel}\n $disabled={disabled}\n $shape={shape}\n $isTransparent={isTransparent}\n >\n {label}\n {mandatory && <span>*</span>}\n </Label>\n )}\n </Wrapper>\n </Container>\n );\n};\n\nexport default BaseInput;\n"],"names":["BaseInput","props","label","stickyLabel","renderAs","width","widthX","disabled","willShowMessage","inputElement","siblingElement","siblingPosition","size","errorMessage","mandatory","shape","isTransparent","helperText","input","useTheme","jsx","Container","jsxs","Wrapper","InputWrapper","Error","HelperText","SiblingWrapper","Label","BaseInput$1"],"mappings":";;;AAeA,MAAMA,IAAuC,CAASC,MAAA;AAC9C,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,IAChB,YAAAC;AAAA,EACE,IAAAhB,GACE,EAAE,OAAAiB,MAAUC;AAKhB,SAAA,gBAAAC,EAACC,KAAU,QAAQhB,GAAO,SAASC,GAAQ,OAAOM,GAAM,kBAAkBJ,GACxE,UAAA,gBAAAc;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWnB;AAAA,MACX,OAAOQ;AAAA,MACP,WAAWL;AAAA,MACX,QAAQQ;AAAA,MACR,gBAAgBC;AAAA,MAEhB,UAAA;AAAA,QAAA,gBAAAM,EAACE,GACE,EAAA,UAAA;AAAA,UAAAf;AAAA,UACAI,KACE,gBAAAO,EAAAK,GAAA,EAAM,WAAU,SAAQ,gBAAgBrB,GACtC,UACHS,GAAA;AAAA,UAhBaI,KAAc,CAACJ,KAmB3B,gBAAAO,EAAAM,GAAA,EAAW,WAAU,OAAM,gBAAgBtB,GACzC,UACHa,GAAA;AAAA,QAAA,GAEJ;AAAA,QACCP,IACC,gBAAAU;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,gBAAgBvB;AAAA,YAChB,WAAWG;AAAA,YACX,OAAOK;AAAA,YACP,kBAAkBD,KAAmB;AAAA,YAEpC,UAAAD;AAAA,UAAA;AAAA,QAED,IAAA;AAAA,QAlCQR,KAASa,MAAU,YAoC7B,gBAAAO;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,WAAWV,EAAM,MAAMN,CAAI,EAAE;AAAA,YAC7B,gBAAgBR;AAAA,YAChB,OAAOQ;AAAA,YACP,cAAcT;AAAA,YACd,WAAWI;AAAA,YACX,QAAQQ;AAAA,YACR,gBAAgBC;AAAA,YAEf,UAAA;AAAA,cAAAd;AAAA,cACAY,KAAc,gBAAAM,EAAA,QAAA,EAAK,UAAC,IAAA,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACvB;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN,EAAA,CAAA;AAEJ,GAEAS,IAAe7B;"}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { jsx as
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
2
2
|
import { forwardRef as I } from "react";
|
3
3
|
import T from "../base-input/base-input.js";
|
4
|
-
import { Input as
|
5
|
-
const i = "regular",
|
4
|
+
import { Input as g } from "./text-input-styled.js";
|
5
|
+
const i = "regular", $ = I((o, l) => {
|
6
6
|
const {
|
7
7
|
type: e,
|
8
|
-
label:
|
8
|
+
label: p,
|
9
9
|
value: t,
|
10
10
|
renderAs: r,
|
11
11
|
width: m,
|
@@ -14,43 +14,44 @@ const i = "regular", g = I((o, p) => {
|
|
14
14
|
willShowMessage: d,
|
15
15
|
siblingElement: f,
|
16
16
|
errorMessage: c,
|
17
|
-
shape:
|
18
|
-
isTransparent:
|
19
|
-
helperText:
|
17
|
+
shape: b,
|
18
|
+
isTransparent: a,
|
19
|
+
helperText: h,
|
20
|
+
stickyLabel: w,
|
20
21
|
...x
|
21
22
|
} = o;
|
22
|
-
return /* @__PURE__ */
|
23
|
+
return /* @__PURE__ */ n(
|
23
24
|
T,
|
24
25
|
{
|
25
26
|
renderAs: r,
|
26
|
-
label:
|
27
|
-
stickyLabel: !!t || e === "date",
|
27
|
+
label: p,
|
28
|
+
stickyLabel: !!t || e === "date" || w,
|
28
29
|
width: m,
|
29
30
|
widthX: u,
|
30
31
|
disabled: s,
|
31
32
|
willShowMessage: d,
|
32
33
|
size: i,
|
33
|
-
shape:
|
34
|
+
shape: b,
|
34
35
|
errorMessage: c,
|
35
|
-
helperText:
|
36
|
-
isTransparent:
|
37
|
-
inputElement: /* @__PURE__ */
|
38
|
-
|
36
|
+
helperText: h,
|
37
|
+
isTransparent: a,
|
38
|
+
inputElement: /* @__PURE__ */ n(
|
39
|
+
g,
|
39
40
|
{
|
40
|
-
ref:
|
41
|
+
ref: l,
|
41
42
|
type: e,
|
42
43
|
value: t ?? "",
|
43
44
|
$renderAs: r,
|
44
45
|
$size: i,
|
45
46
|
disabled: s,
|
46
|
-
$isTransparent:
|
47
|
+
$isTransparent: a,
|
47
48
|
...x
|
48
49
|
}
|
49
50
|
),
|
50
51
|
siblingElement: f
|
51
52
|
}
|
52
53
|
);
|
53
|
-
}), z =
|
54
|
+
}), z = $;
|
54
55
|
export {
|
55
56
|
z as default
|
56
57
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text-input.js","sources":["../../../../../src/features/ui/inputs/text-input/text-input.tsx"],"sourcesContent":["import type { ITextInputProps } from './text-input-types';\nimport type { Ref } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport BaseInput from '../base-input/base-input';\nimport * as Styled from './text-input-styled';\n\nconst SIZE = 'regular';\n\nconst TextInput = forwardRef((props: ITextInputProps, ref: Ref<HTMLInputElement>) => {\n const {\n type,\n label,\n value,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n siblingElement,\n errorMessage,\n shape,\n isTransparent,\n helperText,\n ...rest\n } = props;\n\n return (\n <BaseInput\n renderAs={renderAs}\n label={label}\n stickyLabel={!!value || type === 'date'}\n width={width}\n widthX={widthX}\n disabled={disabled}\n willShowMessage={willShowMessage}\n size={SIZE}\n shape={shape}\n errorMessage={errorMessage}\n helperText={helperText}\n isTransparent={isTransparent}\n inputElement={\n <Styled.Input\n ref={ref}\n type={type}\n value={value ?? ''}\n $renderAs={renderAs}\n $size={SIZE}\n disabled={disabled}\n $isTransparent={isTransparent}\n {...rest}\n />\n }\n siblingElement={siblingElement}\n />\n );\n});\n\nexport default TextInput;\n"],"names":["SIZE","TextInput","forwardRef","props","ref","type","label","value","renderAs","width","widthX","disabled","willShowMessage","siblingElement","errorMessage","shape","isTransparent","helperText","rest","jsx","BaseInput","Styled.Input","TextInput$1"],"mappings":";;;;AAQA,MAAMA,IAAO,WAEPC,IAAYC,EAAW,CAACC,GAAwBC,MAA+B;AAC7E,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YAAAC;AAAA,IACA,GAAGC;AAAA,EACD,
|
1
|
+
{"version":3,"file":"text-input.js","sources":["../../../../../src/features/ui/inputs/text-input/text-input.tsx"],"sourcesContent":["import type { ITextInputProps } from './text-input-types';\nimport type { Ref } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport BaseInput from '../base-input/base-input';\nimport * as Styled from './text-input-styled';\n\nconst SIZE = 'regular';\n\nconst TextInput = forwardRef((props: ITextInputProps, ref: Ref<HTMLInputElement>) => {\n const {\n type,\n label,\n value,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n siblingElement,\n errorMessage,\n shape,\n isTransparent,\n helperText,\n stickyLabel,\n ...rest\n } = props;\n\n return (\n <BaseInput\n renderAs={renderAs}\n label={label}\n stickyLabel={!!value || type === 'date' || stickyLabel}\n width={width}\n widthX={widthX}\n disabled={disabled}\n willShowMessage={willShowMessage}\n size={SIZE}\n shape={shape}\n errorMessage={errorMessage}\n helperText={helperText}\n isTransparent={isTransparent}\n inputElement={\n <Styled.Input\n ref={ref}\n type={type}\n value={value ?? ''}\n $renderAs={renderAs}\n $size={SIZE}\n disabled={disabled}\n $isTransparent={isTransparent}\n {...rest}\n />\n }\n siblingElement={siblingElement}\n />\n );\n});\n\nexport default TextInput;\n"],"names":["SIZE","TextInput","forwardRef","props","ref","type","label","value","renderAs","width","widthX","disabled","willShowMessage","siblingElement","errorMessage","shape","isTransparent","helperText","stickyLabel","rest","jsx","BaseInput","Styled.Input","TextInput$1"],"mappings":";;;;AAQA,MAAMA,IAAO,WAEPC,IAAYC,EAAW,CAACC,GAAwBC,MAA+B;AAC7E,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,GAAGC;AAAA,EACD,IAAAhB;AAGF,SAAA,gBAAAiB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAAb;AAAA,MACA,OAAAF;AAAA,MACA,aAAa,CAAC,CAACC,KAASF,MAAS,UAAUa;AAAA,MAC3C,OAAAT;AAAA,MACA,QAAAC;AAAA,MACA,UAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,MAAMZ;AAAA,MACN,OAAAe;AAAA,MACA,cAAAD;AAAA,MACA,YAAAG;AAAA,MACA,eAAAD;AAAA,MACA,cACE,gBAAAI;AAAA,QAACE;AAAAA,QAAA;AAAA,UACC,KAAAlB;AAAA,UACA,MAAAC;AAAA,UACA,OAAOE,KAAS;AAAA,UAChB,WAAWC;AAAA,UACX,OAAOR;AAAA,UACP,UAAAW;AAAA,UACA,gBAAgBK;AAAA,UACf,GAAGG;AAAA,QAAA;AAAA,MACN;AAAA,MAEF,gBAAAN;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC,GAEDU,IAAetB;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import a from "styled-components";
|
2
|
-
const
|
2
|
+
const p = a.div(
|
3
3
|
({ theme: { colors: t, zIndex: o }, $isClosing: e }) => `
|
4
4
|
position: fixed;
|
5
5
|
top: 0;
|
@@ -82,7 +82,7 @@ const s = a.div(
|
|
82
82
|
max-height: 100vh;
|
83
83
|
}
|
84
84
|
}`
|
85
|
-
),
|
85
|
+
), m = a.div(
|
86
86
|
({ theme: { colors: t }, $modalWidth: o }) => `
|
87
87
|
position: absolute;
|
88
88
|
top: -56px;
|
@@ -100,13 +100,13 @@ const s = a.div(
|
|
100
100
|
color: ${t.BLACK_1};
|
101
101
|
}
|
102
102
|
`
|
103
|
-
),
|
103
|
+
), d = a.div`
|
104
104
|
display: flex;
|
105
105
|
align-items: center;
|
106
106
|
justify-content: center;
|
107
107
|
height: 100vh;
|
108
108
|
width: 100%;
|
109
|
-
`, i = 720, r = 800, n = 500,
|
109
|
+
`, i = 720, r = 800, n = 500, f = a.div(
|
110
110
|
({ $isClosing: t }) => `
|
111
111
|
position: absolute;
|
112
112
|
width: ${i}px;
|
@@ -150,13 +150,48 @@ const s = a.div(
|
|
150
150
|
}
|
151
151
|
}
|
152
152
|
`
|
153
|
+
), h = a.div(
|
154
|
+
({ $isClosing: t }) => `
|
155
|
+
width: 100%;
|
156
|
+
height: max-content;
|
157
|
+
background: white; // Remove
|
158
|
+
overflow: scroll;
|
159
|
+
position: fixed;
|
160
|
+
left: 0;
|
161
|
+
right: 0;
|
162
|
+
bottom: 0;
|
163
|
+
animation: ${t ? "slideOut" : "slideIn"} 0.3s forwards;
|
164
|
+
|
165
|
+
@keyframes slideIn {
|
166
|
+
from {
|
167
|
+
transform: translateY(100%);
|
168
|
+
opacity: 0;
|
169
|
+
}
|
170
|
+
to {
|
171
|
+
transform: translateY(0%);
|
172
|
+
opacity: 1;
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
@keyframes slideOut {
|
177
|
+
from {
|
178
|
+
transform: translateY(0%);
|
179
|
+
opacity: 1;
|
180
|
+
}
|
181
|
+
to {
|
182
|
+
transform: translateY(100%);
|
183
|
+
opacity: 0;
|
184
|
+
}
|
185
|
+
}
|
186
|
+
`
|
153
187
|
);
|
154
188
|
export {
|
155
189
|
l as BaseModal,
|
156
190
|
c as BaseModalContent,
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
191
|
+
h as BottomSheetModal,
|
192
|
+
m as CloseButtonContainer,
|
193
|
+
p as ModalContainer,
|
194
|
+
d as ModalLoaderWrapper,
|
195
|
+
f as SpotlightModal
|
161
196
|
};
|
162
197
|
//# sourceMappingURL=modal-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst ModalLoaderWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n width: 100%;\n`;\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nexport {\n ModalContainer,\n BaseModal,\n BaseModalContent,\n CloseButtonContainer,\n SpotlightModal,\n ModalLoaderWrapper,\n};\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","ModalLoaderWrapper","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,QAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM3BF,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBE,IAAa,oBAAoB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IAAiB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQdC,CAA+B;AAAA;AAAA;AAAA;AAAA,IAKnDR,IACI;AAAA;AAAA,4BAEoBS,CAA6B;AAAA;AAAA;AAAA;AAAA,QAKjD,EACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF;"}
|
1
|
+
{"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst ModalLoaderWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n width: 100%;\n`;\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nconst BottomSheetModal = styled.div<{ $isClosing?: boolean }>(\n ({ $isClosing }) => `\n width: 100%;\n height: max-content;\n background: white; // Remove\n overflow: scroll;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n animation: ${$isClosing ? 'slideOut' : 'slideIn'} 0.3s forwards;\n\n @keyframes slideIn {\n from {\n transform: translateY(100%);\n opacity: 0;\n }\n to {\n transform: translateY(0%);\n opacity: 1;\n }\n }\n\n @keyframes slideOut {\n from {\n transform: translateY(0%);\n opacity: 1;\n }\n to {\n transform: translateY(100%);\n opacity: 0;\n }\n }\n `,\n);\n\nexport {\n ModalContainer,\n BaseModal,\n BaseModalContent,\n CloseButtonContainer,\n SpotlightModal,\n ModalLoaderWrapper,\n BottomSheetModal,\n};\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","ModalLoaderWrapper","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal","BottomSheetModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,QAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM3BF,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBE,IAAa,oBAAoB,gBAAgB;AAAA,aACnDD,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AAAA;AAAA;AAAA;AAAA,IAKnDR,IACI;AAAA;AAAA,4BAEoBS,CAA6B;AAAA;AAAA;AAAA;AAAA,QAKjD,EACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF,GAEME,IAAmBd,EAAO;AAAA,EAC9B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBASLA,IAAa,aAAa,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBpD;"}
|
@@ -1,45 +1,55 @@
|
|
1
|
-
import { jsx as r, jsxs as
|
2
|
-
import { captureException as
|
3
|
-
import { memo as
|
4
|
-
import { ErrorBoundary as
|
5
|
-
import
|
1
|
+
import { jsx as r, jsxs as f } from "react/jsx-runtime";
|
2
|
+
import { captureException as u } from "@sentry/browser";
|
3
|
+
import { memo as $, useCallback as g, Suspense as n } from "react";
|
4
|
+
import { ErrorBoundary as a } from "react-error-boundary";
|
5
|
+
import E from "../../../assets/line-icons/icons/cross.js";
|
6
6
|
import h from "../error/error.js";
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
import M from "../buttons/clickable/clickable.js";
|
8
|
+
import x from "../layout/flex-view.js";
|
9
|
+
import c from "../loader/app-loader/app-loader.js";
|
10
|
+
import { ModalContainer as d, BottomSheetModal as v, ModalLoaderWrapper as C, SpotlightModal as B, BaseModal as S, CloseButtonContainer as W, BaseModalContent as w } from "./modal-styled.js";
|
11
|
+
const q = $(({ modal: b, isClosing: o = !1, onClose: m }) => {
|
12
|
+
const { renderAs: s, element: e, modalWidth: l, isDismissable: p } = b, i = g((t) => {
|
13
|
+
u(t);
|
14
|
+
}, []), k = g((t) => {
|
15
|
+
t.stopPropagation();
|
13
16
|
}, []);
|
14
|
-
return
|
15
|
-
|
17
|
+
return s === "bottom-sheet" ? /* @__PURE__ */ r(d, { $isClosing: o, onClick: p ? m : () => null, children: /* @__PURE__ */ r(v, { $isClosing: o, onClick: k, children: /* @__PURE__ */ r(
|
18
|
+
a,
|
16
19
|
{
|
17
|
-
fallback: /* @__PURE__ */ r(
|
18
|
-
onError:
|
19
|
-
children: /* @__PURE__ */
|
20
|
-
|
20
|
+
fallback: /* @__PURE__ */ r(x, { $gap: 24, children: /* @__PURE__ */ r(h, { height: "100%" }) }),
|
21
|
+
onError: i,
|
22
|
+
children: /* @__PURE__ */ r(n, { fallback: /* @__PURE__ */ r(c, { height: "50vh" }), children: e })
|
23
|
+
}
|
24
|
+
) }) }) : s === "spotlight" ? /* @__PURE__ */ r(d, { $isClosing: o, children: /* @__PURE__ */ r(
|
25
|
+
a,
|
26
|
+
{
|
27
|
+
fallback: /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(h, { height: "100vh" }) }),
|
28
|
+
onError: i,
|
29
|
+
children: /* @__PURE__ */ f(
|
30
|
+
n,
|
21
31
|
{
|
22
|
-
fallback: /* @__PURE__ */ r(
|
32
|
+
fallback: /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(c, { height: "100vh" }) }),
|
23
33
|
children: [
|
24
|
-
/* @__PURE__ */ r(
|
25
|
-
|
34
|
+
/* @__PURE__ */ r(B, { $isClosing: o }),
|
35
|
+
e
|
26
36
|
]
|
27
37
|
}
|
28
38
|
)
|
29
39
|
}
|
30
|
-
) }) : /* @__PURE__ */ r(
|
31
|
-
|
32
|
-
/* @__PURE__ */ r(
|
33
|
-
|
40
|
+
) }) : /* @__PURE__ */ r(d, { $isClosing: o, children: /* @__PURE__ */ f(S, { $isClosing: o, $width: l, children: [
|
41
|
+
p !== !1 && /* @__PURE__ */ r(W, { $modalWidth: l, children: /* @__PURE__ */ r(M, { label: "Close", onClick: m, children: /* @__PURE__ */ r(E, { width: 40, height: 40 }) }) }),
|
42
|
+
/* @__PURE__ */ r(w, { $modalWidth: l, children: /* @__PURE__ */ r(
|
43
|
+
a,
|
34
44
|
{
|
35
45
|
fallback: /* @__PURE__ */ r(h, { height: "50vh", size: "compact" }),
|
36
|
-
onError:
|
37
|
-
children: /* @__PURE__ */ r(
|
46
|
+
onError: i,
|
47
|
+
children: /* @__PURE__ */ r(n, { fallback: /* @__PURE__ */ r(c, { height: "50vh" }), children: e })
|
38
48
|
}
|
39
49
|
) })
|
40
50
|
] }) });
|
41
51
|
});
|
42
52
|
export {
|
43
|
-
|
53
|
+
q as default
|
44
54
|
};
|
45
55
|
//# sourceMappingURL=modal.js.map
|
@@ -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 { captureException } from '@sentry/browser';\nimport { memo, Suspense, useCallback } 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 const sentryCaptureException = useCallback((error: Error) => {\n captureException(error);\n }, []);\n\n if (renderAs === 'spotlight') {\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <ErrorBoundary\n fallback={\n <Styled.ModalLoaderWrapper>\n <Error height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n onError={sentryCaptureException}\n >\n <Suspense\n fallback={\n <Styled.ModalLoaderWrapper>\n <AppLoader height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n >\n <Styled.SpotlightModal $isClosing={isClosing} />\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\n fallback={<Error height=\"50vh\" size=\"compact\" />}\n onError={sentryCaptureException}\n >\n <Suspense fallback={<AppLoader height=\"50vh\" />}>{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","sentryCaptureException","useCallback","error","captureException","
|
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 { captureException } from '@sentry/browser';\nimport { memo, Suspense, useCallback } 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 FlexView from '../layout/flex-view';\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 const sentryCaptureException = useCallback((error: Error) => {\n captureException(error);\n }, []);\n\n const handleStopPropagation = useCallback((e: React.MouseEvent) => {\n e.stopPropagation();\n }, []);\n\n if (renderAs === 'bottom-sheet') {\n return (\n <Styled.ModalContainer $isClosing={isClosing} onClick={isDismissable ? onClose : () => null}>\n <Styled.BottomSheetModal $isClosing={isClosing} onClick={handleStopPropagation}>\n <ErrorBoundary\n fallback={\n <FlexView $gap={24}>\n <Error height=\"100%\" />\n </FlexView>\n }\n onError={sentryCaptureException}\n >\n <Suspense fallback={<AppLoader height=\"50vh\" />}>{element}</Suspense>\n </ErrorBoundary>\n </Styled.BottomSheetModal>\n </Styled.ModalContainer>\n );\n }\n\n if (renderAs === 'spotlight') {\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <ErrorBoundary\n fallback={\n <Styled.ModalLoaderWrapper>\n <Error height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n onError={sentryCaptureException}\n >\n <Suspense\n fallback={\n <Styled.ModalLoaderWrapper>\n <AppLoader height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n >\n <Styled.SpotlightModal $isClosing={isClosing} />\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\n fallback={<Error height=\"50vh\" size=\"compact\" />}\n onError={sentryCaptureException}\n >\n <Suspense fallback={<AppLoader height=\"50vh\" />}>{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","sentryCaptureException","useCallback","error","captureException","handleStopPropagation","e","Styled.ModalContainer","Styled.BottomSheetModal","jsx","ErrorBoundary","FlexView","Error","Suspense","AppLoader","Styled.ModalLoaderWrapper","jsxs","Styled.SpotlightModal","Styled.BaseModal","Styled.CloseButtonContainer","Clickable","CrossIcon","Styled.BaseModalContent"],"mappings":";;;;;;;;;;AAkBM,MAAAA,IAAyBC,EAAK,CAAC,EAAE,OAAAC,GAAO,WAAAC,IAAY,IAAO,SAAAC,QAAc;AAC7E,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,YAAAC,GAAY,eAAAC,MAAkBN,GAEnDO,IAAyBC,EAAY,CAACC,MAAiB;AAC3D,IAAAC,EAAiBD,CAAK;AAAA,EACxB,GAAG,CAAE,CAAA,GAECE,IAAwBH,EAAY,CAACI,MAAwB;AACjE,IAAAA,EAAE,gBAAgB;AAAA,EACpB,GAAG,CAAE,CAAA;AAEL,SAAIT,MAAa,mCAEZU,GAAA,EAAsB,YAAYZ,GAAW,SAASK,IAAgBJ,IAAU,MAAM,MACrF,4BAACY,GAAA,EAAwB,YAAYb,GAAW,SAASU,GACvD,UAAA,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,4BACGC,GAAS,EAAA,MAAM,IACd,UAAC,gBAAAF,EAAAG,GAAA,EAAM,QAAO,OAAA,CAAO,EACvB,CAAA;AAAA,MAEF,SAASX;AAAA,MAET,UAAA,gBAAAQ,EAACI,KAAS,UAAU,gBAAAJ,EAACK,KAAU,QAAO,OAAO,CAAA,GAAK,UAAQhB,EAAA,CAAA;AAAA,IAAA;AAAA,EAAA,EAE9D,CAAA,EACF,CAAA,IAIAD,MAAa,cAEZ,gBAAAY,EAAAF,GAAA,EAAsB,YAAYZ,GACjC,UAAA,gBAAAc;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,4BACGK,GAAA,EACC,UAAC,gBAAAN,EAAAG,GAAA,EAAM,QAAO,QAAQ,CAAA,GACxB;AAAA,MAEF,SAASX;AAAA,MAET,UAAA,gBAAAe;AAAA,QAACH;AAAA,QAAA;AAAA,UACC,4BACGE,GAAA,EACC,UAAC,gBAAAN,EAAAK,GAAA,EAAU,QAAO,QAAQ,CAAA,GAC5B;AAAA,UAGF,UAAA;AAAA,YAAA,gBAAAL,EAACQ,GAAA,EAAsB,YAAYtB,EAAW,CAAA;AAAA,YAC7CG;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA,IAKD,gBAAAW,EAAAF,GAAA,EAAsB,YAAYZ,GACjC,UAAC,gBAAAqB,EAAAE,GAAA,EAAiB,YAAYvB,GAAW,QAAQI,GAC9C,UAAA;AAAA,IAAkBC,MAAA,wBAChBmB,GAAA,EAA4B,aAAapB,GACxC,4BAACqB,GAAU,EAAA,OAAM,SAAQ,SAASxB,GAChC,4BAACyB,GAAU,EAAA,OAAO,IAAI,QAAQ,IAAI,GACpC,EACF,CAAA;AAAA,IAED,gBAAAZ,EAAAa,GAAA,EAAwB,aAAavB,GACpC,UAAA,gBAAAU;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAW,gBAAAD,EAAAG,GAAA,EAAM,QAAO,QAAO,MAAK,WAAU;AAAA,QAC9C,SAASX;AAAA,QAET,UAAA,gBAAAQ,EAACI,KAAS,UAAU,gBAAAJ,EAACK,KAAU,QAAO,OAAO,CAAA,GAAK,UAAQhB,EAAA,CAAA;AAAA,MAAA;AAAA,IAAA,GAE9D;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,CAAC;"}
|
@@ -1,54 +1,56 @@
|
|
1
|
-
import { useMemo as
|
2
|
-
import
|
1
|
+
import { useMemo as F } from "react";
|
2
|
+
import H from "styled-components";
|
3
3
|
import { EDeviceType as y } from "../theme/constants.js";
|
4
|
-
const
|
4
|
+
const g = H.div(
|
5
5
|
({
|
6
|
-
theme:
|
6
|
+
theme: T,
|
7
7
|
$renderAs: t,
|
8
8
|
$color: n,
|
9
|
-
$align:
|
9
|
+
$align: b = "left",
|
10
10
|
$width: e,
|
11
11
|
$widthX: f,
|
12
12
|
$marginBottom: o,
|
13
13
|
$marginBottomX: r,
|
14
14
|
$alignSelf: l,
|
15
|
-
$opacity:
|
16
|
-
$inline:
|
15
|
+
$opacity: v = 1,
|
16
|
+
$inline: E,
|
17
17
|
$textDecoration: x,
|
18
18
|
$whiteSpace: a,
|
19
19
|
$renderOnMobileAs: c,
|
20
|
-
$renderOnTabletAs: i
|
20
|
+
$renderOnTabletAs: i,
|
21
|
+
$cursor: m
|
21
22
|
}) => {
|
22
|
-
const { text:
|
23
|
-
fontFamily:
|
24
|
-
fontSize:
|
25
|
-
lineHeight:
|
26
|
-
letterSpacing:
|
27
|
-
textTransform:
|
28
|
-
} =
|
23
|
+
const { text: L, colors: u, layout: s, device: p } = T, h = F(() => p <= y.MOBILE ? c || i || t : p <= y.TABLET && i || t, [p, t, c, i]), {
|
24
|
+
fontFamily: k,
|
25
|
+
fontSize: z,
|
26
|
+
lineHeight: d,
|
27
|
+
letterSpacing: $,
|
28
|
+
textTransform: C = "none"
|
29
|
+
} = L[h];
|
29
30
|
return `
|
30
|
-
display: ${
|
31
|
-
font-family: ${
|
32
|
-
font-size: ${
|
33
|
-
text-align: ${
|
34
|
-
line-height: ${
|
35
|
-
text-transform: ${
|
36
|
-
${typeof
|
37
|
-
color: ${n ?
|
38
|
-
opacity: ${
|
31
|
+
display: ${E ? "inline-block" : "block"};
|
32
|
+
font-family: ${k};
|
33
|
+
font-size: ${z}px;
|
34
|
+
text-align: ${b};
|
35
|
+
line-height: ${d}px;
|
36
|
+
text-transform: ${C};
|
37
|
+
${typeof $ == "number" ? `letter-spacing: ${$}px;` : ""}
|
38
|
+
color: ${n ? u[n] : u.BLACK};
|
39
|
+
opacity: ${v};
|
39
40
|
width: ${e ? `${e}` : "auto"}${typeof e == "number" ? "px" : ""};
|
40
|
-
${f ? `width: ${f *
|
41
|
+
${f ? `width: ${f * s.gutter}px;` : ""}
|
41
42
|
margin-bottom: ${o ? `${o}` : "initial"}${typeof o == "number" ? "px" : ""};
|
42
|
-
${r ? `margin-bottom: ${r *
|
43
|
+
${r ? `margin-bottom: ${r * s.gutter}px;` : ""}
|
43
44
|
${l ? `align-self: ${l};` : ""}
|
44
45
|
${x ? `text-decoration: ${x};` : ""}
|
45
46
|
${a ? `white-space: ${a};` : ""}
|
47
|
+
${m ? `cursor: ${m};` : ""}
|
46
48
|
`;
|
47
49
|
}
|
48
50
|
);
|
49
|
-
|
50
|
-
const
|
51
|
+
g.displayName = "Text";
|
52
|
+
const N = g;
|
51
53
|
export {
|
52
|
-
|
54
|
+
N as default
|
53
55
|
};
|
54
56
|
//# sourceMappingURL=text.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text.js","sources":["../../../../src/features/ui/text/text.tsx"],"sourcesContent":["import type { TColorNames, TTextVariants } from '../types';\n\nimport { useMemo } from 'react';\nimport styled from 'styled-components';\n\nimport { EDeviceType } from '../theme/constants';\n\nexport interface TextProps {\n $renderAs: TTextVariants;\n $color?: TColorNames;\n $align?: 'auto' | 'left' | 'right' | 'center' | 'justify';\n $alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';\n $opacity?: number | undefined;\n $width?: number | string;\n $widthX?: number;\n $marginBottom?: number;\n $marginBottomX?: number;\n $inline?: boolean;\n $textDecoration?: string;\n $whiteSpace?: 'pre-line' | 'normal' | 'pre-wrap' | 'no-wrap' | 'pre' | 'break-spaces';\n $renderOnMobileAs?: TTextVariants;\n $renderOnTabletAs?: TTextVariants;\n}\n\n/**\n * @param $renderAs (fallback for any device), @param $renderOnMobileAs, @param $renderOnTabletAs - The text variant to render as (ah1-ah4, ab1-ab3, ac1-ac4, ub1-ub3), anything else is deprecated\n */\nconst Text = styled.div<TextProps>(\n ({\n theme,\n $renderAs,\n $color,\n $align = 'left',\n $width,\n $widthX,\n $marginBottom,\n $marginBottomX,\n $alignSelf,\n $opacity = 1,\n $inline,\n $textDecoration,\n $whiteSpace,\n $renderOnMobileAs,\n $renderOnTabletAs,\n }) => {\n const { text, colors, layout, device } = theme;\n const renderAs = useMemo(() => {\n if (device <= EDeviceType.MOBILE) {\n return $renderOnMobileAs || $renderOnTabletAs || $renderAs;\n }\n\n if (device <= EDeviceType.TABLET) {\n return $renderOnTabletAs || $renderAs;\n }\n\n return $renderAs;\n }, [device, $renderAs, $renderOnMobileAs, $renderOnTabletAs]);\n\n const {\n fontFamily,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform = 'none',\n } = text[renderAs];\n\n return `\n display: ${$inline ? 'inline-block' : 'block'};\n font-family: ${fontFamily};\n font-size: ${fontSize}px;\n text-align: ${$align};\n line-height: ${lineHeight}px;\n text-transform: ${textTransform};\n ${typeof letterSpacing === 'number' ? `letter-spacing: ${letterSpacing}px;` : ''}\n color: ${$color ? colors[$color] : colors.BLACK};\n opacity: ${$opacity};\n width: ${$width ? `${$width}` : 'auto'}${typeof $width === 'number' ? 'px' : ''};\n ${$widthX ? `width: ${$widthX * layout.gutter}px;` : ''}\n margin-bottom: ${$marginBottom ? `${$marginBottom}` : 'initial'}${\n typeof $marginBottom === 'number' ? 'px' : ''\n };\n ${$marginBottomX ? `margin-bottom: ${$marginBottomX * layout.gutter}px;` : ''}\n ${$alignSelf ? `align-self: ${$alignSelf};` : ''}\n ${$textDecoration ? `text-decoration: ${$textDecoration};` : ''}\n ${$whiteSpace ? `white-space: ${$whiteSpace};` : ''}\n `;\n },\n);\n\nText.displayName = 'Text';\n\nexport default Text;\n"],"names":["Text","styled","theme","$renderAs","$color","$align","$width","$widthX","$marginBottom","$marginBottomX","$alignSelf","$opacity","$inline","$textDecoration","$whiteSpace","$renderOnMobileAs","$renderOnTabletAs","text","colors","layout","device","renderAs","useMemo","EDeviceType","fontFamily","fontSize","lineHeight","letterSpacing","textTransform","Text$1"],"mappings":";;;
|
1
|
+
{"version":3,"file":"text.js","sources":["../../../../src/features/ui/text/text.tsx"],"sourcesContent":["import type { TColorNames, TTextVariants } from '../types';\n\nimport { useMemo } from 'react';\nimport styled from 'styled-components';\n\nimport { EDeviceType } from '../theme/constants';\n\nexport interface TextProps {\n $renderAs: TTextVariants;\n $color?: TColorNames;\n $align?: 'auto' | 'left' | 'right' | 'center' | 'justify';\n $alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';\n $opacity?: number | undefined;\n $width?: number | string;\n $widthX?: number;\n $marginBottom?: number;\n $marginBottomX?: number;\n $inline?: boolean;\n $textDecoration?: string;\n $whiteSpace?: 'pre-line' | 'normal' | 'pre-wrap' | 'no-wrap' | 'pre' | 'break-spaces';\n $renderOnMobileAs?: TTextVariants;\n $renderOnTabletAs?: TTextVariants;\n $cursor?: 'pointer' | 'default' | 'text' | 'not-allowed' | 'move' | 'help';\n}\n\n/**\n * @param $renderAs (fallback for any device), @param $renderOnMobileAs, @param $renderOnTabletAs - The text variant to render as (ah1-ah4, ab1-ab3, ac1-ac4, ub1-ub3), anything else is deprecated\n */\nconst Text = styled.div<TextProps>(\n ({\n theme,\n $renderAs,\n $color,\n $align = 'left',\n $width,\n $widthX,\n $marginBottom,\n $marginBottomX,\n $alignSelf,\n $opacity = 1,\n $inline,\n $textDecoration,\n $whiteSpace,\n $renderOnMobileAs,\n $renderOnTabletAs,\n $cursor,\n }) => {\n const { text, colors, layout, device } = theme;\n const renderAs = useMemo(() => {\n if (device <= EDeviceType.MOBILE) {\n return $renderOnMobileAs || $renderOnTabletAs || $renderAs;\n }\n\n if (device <= EDeviceType.TABLET) {\n return $renderOnTabletAs || $renderAs;\n }\n\n return $renderAs;\n }, [device, $renderAs, $renderOnMobileAs, $renderOnTabletAs]);\n\n const {\n fontFamily,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform = 'none',\n } = text[renderAs];\n\n return `\n display: ${$inline ? 'inline-block' : 'block'};\n font-family: ${fontFamily};\n font-size: ${fontSize}px;\n text-align: ${$align};\n line-height: ${lineHeight}px;\n text-transform: ${textTransform};\n ${typeof letterSpacing === 'number' ? `letter-spacing: ${letterSpacing}px;` : ''}\n color: ${$color ? colors[$color] : colors.BLACK};\n opacity: ${$opacity};\n width: ${$width ? `${$width}` : 'auto'}${typeof $width === 'number' ? 'px' : ''};\n ${$widthX ? `width: ${$widthX * layout.gutter}px;` : ''}\n margin-bottom: ${$marginBottom ? `${$marginBottom}` : 'initial'}${\n typeof $marginBottom === 'number' ? 'px' : ''\n };\n ${$marginBottomX ? `margin-bottom: ${$marginBottomX * layout.gutter}px;` : ''}\n ${$alignSelf ? `align-self: ${$alignSelf};` : ''}\n ${$textDecoration ? `text-decoration: ${$textDecoration};` : ''}\n ${$whiteSpace ? `white-space: ${$whiteSpace};` : ''}\n ${$cursor ? `cursor: ${$cursor};` : ''}\n `;\n },\n);\n\nText.displayName = 'Text';\n\nexport default Text;\n"],"names":["Text","styled","theme","$renderAs","$color","$align","$width","$widthX","$marginBottom","$marginBottomX","$alignSelf","$opacity","$inline","$textDecoration","$whiteSpace","$renderOnMobileAs","$renderOnTabletAs","$cursor","text","colors","layout","device","renderAs","useMemo","EDeviceType","fontFamily","fontSize","lineHeight","letterSpacing","textTransform","Text$1"],"mappings":";;;AA4BA,MAAMA,IAAOC,EAAO;AAAA,EAClB,CAAC;AAAA,IACC,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,SAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,SAAAC;AAAA,EAAA,MACI;AACJ,UAAM,EAAE,MAAAC,GAAM,QAAAC,GAAQ,QAAAC,GAAQ,QAAAC,MAAWnB,GACnCoB,IAAWC,EAAQ,MACnBF,KAAUG,EAAY,SACjBT,KAAqBC,KAAqBb,IAG/CkB,KAAUG,EAAY,UACjBR,KAAqBb,GAI7B,CAAC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