@cuemath/leap 3.2.21-m → 3.2.22-m

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.
Files changed (70) hide show
  1. package/dist/assets/illustrations/illustrations.js +1 -0
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/star3.js +32 -0
  4. package/dist/assets/line-icons/icons/star3.js.map +1 -0
  5. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +19 -12
  6. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -1
  7. package/dist/features/chapters-v2/constants/block-constants.js +3 -2
  8. package/dist/features/chapters-v2/constants/block-constants.js.map +1 -1
  9. package/dist/features/chapters-v2/utils/index.js +6 -4
  10. package/dist/features/chapters-v2/utils/index.js.map +1 -1
  11. package/dist/features/chapters-v2/utils/node-card-utils.js +4 -0
  12. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
  13. package/dist/features/sheets/constants/sheet.js +2 -1
  14. package/dist/features/sheets/constants/sheet.js.map +1 -1
  15. package/dist/features/trial-session/comps/student-profile/student-profile.js +1 -1
  16. package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +7 -50
  17. package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
  18. package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +15 -69
  19. package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
  20. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +49 -0
  21. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -0
  22. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +64 -0
  23. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -0
  24. package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +28 -0
  25. package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +1 -0
  26. package/dist/features/ui/accordion/accordion-items/accordion-items.js +83 -0
  27. package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -0
  28. package/dist/features/ui/accordion/accordion.js +62 -0
  29. package/dist/features/ui/accordion/accordion.js.map +1 -0
  30. package/dist/features/ui/buttons/button/button.js +41 -38
  31. package/dist/features/ui/buttons/button/button.js.map +1 -1
  32. package/dist/features/ui/buttons/icon-button/icon-button.js +31 -27
  33. package/dist/features/ui/buttons/icon-button/icon-button.js.map +1 -1
  34. package/dist/features/ui/buttons/text-button/text-button.js +26 -22
  35. package/dist/features/ui/buttons/text-button/text-button.js.map +1 -1
  36. package/dist/features/ui/dot-lottie-animations/dot-lottie-animation-styled.js +9 -0
  37. package/dist/features/ui/dot-lottie-animations/dot-lottie-animation-styled.js.map +1 -0
  38. package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js +65 -0
  39. package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js.map +1 -0
  40. package/dist/features/ui/grade-selector/grade-selector.js +33 -27
  41. package/dist/features/ui/grade-selector/grade-selector.js.map +1 -1
  42. package/dist/features/ui/inputs/base-input/base-input.js +11 -11
  43. package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
  44. package/dist/features/ui/inputs/text-input/text-input.js +19 -18
  45. package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
  46. package/dist/features/ui/modals/modal-styled.js +42 -8
  47. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  48. package/dist/features/ui/modals/modal.js +37 -27
  49. package/dist/features/ui/modals/modal.js.map +1 -1
  50. package/dist/features/ui/tab/tab.js +30 -26
  51. package/dist/features/ui/tab/tab.js.map +1 -1
  52. package/dist/features/ui/text/text.js +31 -29
  53. package/dist/features/ui/text/text.js.map +1 -1
  54. package/dist/features/ui/theme/clrs.js +2 -0
  55. package/dist/features/ui/theme/clrs.js.map +1 -1
  56. package/dist/features/worksheet/worksheet/constants.js +13 -12
  57. package/dist/features/worksheet/worksheet/constants.js.map +1 -1
  58. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +260 -246
  59. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  60. package/dist/features/worksheet/worksheet/worksheet-styled.js +28 -37
  61. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  62. package/dist/features/worksheet/worksheet/worksheet.js +164 -166
  63. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  64. package/dist/index.d.ts +105 -5
  65. package/dist/index.js +637 -625
  66. package/dist/index.js.map +1 -1
  67. package/dist/node_modules/@lottiefiles/dotlottie-web/dist/index.js +1881 -0
  68. package/dist/node_modules/@lottiefiles/dotlottie-web/dist/index.js.map +1 -0
  69. package/dist/static/stripe-blurple.6abf422f.svg +1 -0
  70. package/package.json +1 -1
@@ -0,0 +1,9 @@
1
+ import p from "styled-components";
2
+ const a = p.canvas`
3
+ ${({ $renderWidth: o }) => typeof o == "number" ? `width: ${o}px;` : `width: ${o};`}
4
+ ${({ $renderHeight: o }) => typeof o == "number" ? `height: ${o}px;` : `height: ${o};`}
5
+ `;
6
+ export {
7
+ a as Canvas
8
+ };
9
+ //# sourceMappingURL=dot-lottie-animation-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dot-lottie-animation-styled.js","sources":["../../../../src/features/ui/dot-lottie-animations/dot-lottie-animation-styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const Canvas = styled.canvas<{\n $renderWidth: string | number;\n $renderHeight: string | number;\n}>`\n ${({ $renderWidth }) =>\n typeof $renderWidth === 'number' ? `width: ${$renderWidth}px;` : `width: ${$renderWidth};`}\n ${({ $renderHeight }) =>\n typeof $renderHeight === 'number' ? `height: ${$renderHeight}px;` : `height: ${$renderHeight};`}\n`;\n"],"names":["Canvas","styled","$renderWidth","$renderHeight"],"mappings":";AAEO,MAAMA,IAASC,EAAO;AAAA,IAIzB,CAAC,EAAE,cAAAC,EAAa,MAChB,OAAOA,KAAiB,WAAW,UAAUA,CAAY,QAAQ,UAAUA,CAAY,GAAG;AAAA,IAC1F,CAAC,EAAE,eAAAC,EAAc,MACjB,OAAOA,KAAkB,WAAW,WAAWA,CAAa,QAAQ,WAAWA,CAAa,GAAG;AAAA;"}
@@ -0,0 +1,65 @@
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { DotLottieWorker as w } from "../../../node_modules/@lottiefiles/dotlottie-web/dist/index.js";
3
+ import { memo as y, forwardRef as g, useRef as l, useImperativeHandle as x, useEffect as p } from "react";
4
+ import E from "../layout/flex-view.js";
5
+ import { Canvas as R } from "./dot-lottie-animation-styled.js";
6
+ const H = g((h, v) => {
7
+ const { src: s, width: i = "100%", height: a = "100%", settings: m, eventListeners: r, onRender: u } = h, c = l(null), t = l(null);
8
+ return x(
9
+ v,
10
+ () => ({
11
+ playSegments: (e) => {
12
+ var n, o;
13
+ (n = t.current) == null || n.setSegment(e[0], e[1]), (o = t.current) == null || o.play();
14
+ },
15
+ play: () => {
16
+ var e;
17
+ (e = t.current) == null || e.play();
18
+ },
19
+ pause: () => {
20
+ var e;
21
+ (e = t.current) == null || e.pause();
22
+ }
23
+ }),
24
+ []
25
+ ), p(() => {
26
+ c.current && (t.current = new w({
27
+ src: s,
28
+ canvas: c.current,
29
+ autoplay: !0,
30
+ loop: !1,
31
+ renderConfig: {
32
+ autoResize: !0,
33
+ devicePixelRatio: window.devicePixelRatio,
34
+ freezeOnOffscreen: !0
35
+ },
36
+ ...m
37
+ }), u == null || u());
38
+ }, [s, m, u]), p(() => (r == null || r.forEach(
39
+ ({ name: e, callback: n }) => {
40
+ var o;
41
+ return (o = t.current) == null ? void 0 : o.addEventListener(e, n);
42
+ }
43
+ ), () => {
44
+ var e;
45
+ r == null || r.forEach(
46
+ ({ name: n, callback: o }) => {
47
+ var f;
48
+ return (f = t.current) == null ? void 0 : f.removeEventListener(n, o);
49
+ }
50
+ ), (e = t.current) == null || e.destroy();
51
+ }), [r]), /* @__PURE__ */ d(E, { $width: i, $height: a, children: /* @__PURE__ */ d(
52
+ R,
53
+ {
54
+ ref: c,
55
+ $renderWidth: i,
56
+ $renderHeight: a,
57
+ width: typeof i == "number" ? i : void 0,
58
+ height: typeof a == "number" ? a : void 0
59
+ }
60
+ ) });
61
+ }), D = y(H);
62
+ export {
63
+ D as default
64
+ };
65
+ //# sourceMappingURL=dot-lottie-animation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dot-lottie-animation.js","sources":["../../../../src/features/ui/dot-lottie-animations/dot-lottie-animation.tsx"],"sourcesContent":["import type {\n AnimationSegment,\n ILottieAnimationProps,\n ILottieAnimationRef,\n} from './dot-lottie-types';\n\nimport { DotLottieWorker } from '@lottiefiles/dotlottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport * as Styled from './dot-lottie-animation-styled';\n\nconst DotLottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const { src, width = '100%', height = '100%', settings, eventListeners, onRender } = props;\n\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const animationInstance = useRef<DotLottieWorker | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n playSegments: (segments: AnimationSegment) => {\n animationInstance.current?.setSegment(segments[0], segments[1]);\n animationInstance.current?.play();\n },\n play: () => {\n animationInstance.current?.play();\n },\n pause: () => {\n animationInstance.current?.pause();\n },\n }),\n [],\n );\n\n useEffect(() => {\n if (!canvasRef.current) return;\n\n animationInstance.current = new DotLottieWorker({\n src,\n canvas: canvasRef.current,\n autoplay: true,\n loop: false,\n renderConfig: {\n autoResize: true,\n devicePixelRatio: window.devicePixelRatio,\n freezeOnOffscreen: true,\n },\n ...settings,\n });\n\n onRender?.();\n }, [src, settings, onRender]);\n\n useEffect(() => {\n eventListeners?.forEach(\n ({ name, callback }) => animationInstance.current?.addEventListener(name, callback),\n );\n\n return () => {\n eventListeners?.forEach(\n ({ name, callback }) => animationInstance.current?.removeEventListener(name, callback),\n );\n animationInstance.current?.destroy();\n };\n }, [eventListeners]);\n\n const isNumW = typeof width === 'number';\n const isNumH = typeof height === 'number';\n\n return (\n <FlexView $width={width} $height={height}>\n <Styled.Canvas\n ref={canvasRef}\n $renderWidth={width}\n $renderHeight={height}\n width={isNumW ? width : undefined}\n height={isNumH ? height : undefined}\n />\n </FlexView>\n );\n});\n\nexport default memo(DotLottieAnimation);\n"],"names":["DotLottieAnimation","forwardRef","props","ref","src","width","height","settings","eventListeners","onRender","canvasRef","useRef","animationInstance","useImperativeHandle","segments","_a","_b","useEffect","DotLottieWorker","name","callback","jsx","FlexView","Styled.Canvas","dotLottieAnimation","memo"],"mappings":";;;;;AAYA,MAAMA,IAAqBC,EAAuD,CAACC,GAAOC,MAAQ;AAC1F,QAAA,EAAE,KAAAC,GAAK,OAAAC,IAAQ,QAAQ,QAAAC,IAAS,QAAQ,UAAAC,GAAU,gBAAAC,GAAgB,UAAAC,EAAa,IAAAP,GAE/EQ,IAAYC,EAA0B,IAAI,GAC1CC,IAAoBD,EAA+B,IAAI;AAE7D,SAAAE;AAAA,IACEV;AAAA,IACA,OAAO;AAAA,MACL,cAAc,CAACW,MAA+B;;AAC5C,SAAAC,IAAAH,EAAkB,YAAlB,QAAAG,EAA2B,WAAWD,EAAS,CAAC,GAAGA,EAAS,CAAC,KAC7DE,IAAAJ,EAAkB,YAAlB,QAAAI,EAA2B;AAAA,MAC7B;AAAA,MACA,MAAM,MAAM;;AACV,SAAAD,IAAAH,EAAkB,YAAlB,QAAAG,EAA2B;AAAA,MAC7B;AAAA,MACA,OAAO,MAAM;;AACX,SAAAA,IAAAH,EAAkB,YAAlB,QAAAG,EAA2B;AAAA,MAC7B;AAAA,IAAA;AAAA,IAEF,CAAC;AAAA,EAAA,GAGHE,EAAU,MAAM;AACV,IAACP,EAAU,YAEGE,EAAA,UAAU,IAAIM,EAAgB;AAAA,MAC9C,KAAAd;AAAA,MACA,QAAQM,EAAU;AAAA,MAClB,UAAU;AAAA,MACV,MAAM;AAAA,MACN,cAAc;AAAA,QACZ,YAAY;AAAA,QACZ,kBAAkB,OAAO;AAAA,QACzB,mBAAmB;AAAA,MACrB;AAAA,MACA,GAAGH;AAAA,IAAA,CACJ,GAEUE,KAAA,QAAAA;AAAA,EACV,GAAA,CAACL,GAAKG,GAAUE,CAAQ,CAAC,GAE5BQ,EAAU,OACQT,KAAA,QAAAA,EAAA;AAAA,IACd,CAAC,EAAE,MAAAW,GAAM,UAAAC,QAAe;;AAAA,cAAAL,IAAAH,EAAkB,YAAlB,gBAAAG,EAA2B,iBAAiBI,GAAMC;AAAA;AAAA,KAGrE,MAAM;;AACK,IAAAZ,KAAA,QAAAA,EAAA;AAAA,MACd,CAAC,EAAE,MAAAW,GAAM,UAAAC,QAAe;;AAAA,gBAAAL,IAAAH,EAAkB,YAAlB,gBAAAG,EAA2B,oBAAoBI,GAAMC;AAAA;AAAA,QAE/EL,IAAAH,EAAkB,YAAlB,QAAAG,EAA2B;AAAA,EAAQ,IAEpC,CAACP,CAAc,CAAC,GAMhB,gBAAAa,EAAAC,GAAA,EAAS,QAAQjB,GAAO,SAASC,GAChC,UAAA,gBAAAe;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,KAAKb;AAAA,MACL,cAAcL;AAAA,MACd,eAAeC;AAAA,MACf,OATS,OAAOD,KAAU,WASVA,IAAQ;AAAA,MACxB,QATS,OAAOC,KAAW,WASVA,IAAS;AAAA,IAAA;AAAA,EAE9B,EAAA,CAAA;AAEJ,CAAC,GAEckB,IAAAC,EAAKzB,CAAkB;"}
@@ -1,40 +1,46 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { GradeSelectorWrapper as a } from "./grade-selector-styled.js";
3
- import f from "./grade-tab.js";
4
- function d({
5
- selectedValue: t,
6
- onSelect: o,
7
- tabsWidth: i,
8
- width: l,
9
- grades: m,
10
- renderAs: n,
11
- size: c,
12
- layoutAlignment: p
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { useMemo as h } from "react";
3
+ import { useTheme as s } from "styled-components";
4
+ import { EDeviceType as f } from "../theme/constants.js";
5
+ import { GradeSelectorWrapper as x } from "./grade-selector-styled.js";
6
+ import E from "./grade-tab.js";
7
+ function I({
8
+ selectedValue: i,
9
+ onSelect: n,
10
+ tabsWidth: p,
11
+ width: u,
12
+ grades: l,
13
+ renderAs: d,
14
+ size: e,
15
+ sizeOnMobile: m,
16
+ sizeOnTablet: t,
17
+ layoutAlignment: a
13
18
  }) {
14
- return /* @__PURE__ */ r(
15
- a,
19
+ const { device: o } = s(), G = h(() => o <= f.MOBILE ? m || t || e : o <= f.TABLET && t || e, [o, e, m, t]);
20
+ return /* @__PURE__ */ c(
21
+ x,
16
22
  {
17
- width: l,
18
- layoutAlignment: p,
23
+ width: u,
24
+ layoutAlignment: a,
19
25
  $alignItems: "center",
20
26
  $flexDirection: "row",
21
- children: m.map((e) => /* @__PURE__ */ r(
22
- f,
27
+ children: l.map((r) => /* @__PURE__ */ c(
28
+ E,
23
29
  {
24
- label: e === "0" ? "KG" : e,
25
- selected: t === e,
26
- width: i,
27
- onSelect: o,
28
- renderAs: n,
29
- size: c,
30
- grade: e
30
+ label: r === "0" ? "KG" : r,
31
+ selected: i === r,
32
+ width: p,
33
+ onSelect: n,
34
+ renderAs: d,
35
+ size: G,
36
+ grade: r
31
37
  },
32
- e
38
+ r
33
39
  ))
34
40
  }
35
41
  );
36
42
  }
37
43
  export {
38
- d as default
44
+ I as default
39
45
  };
40
46
  //# sourceMappingURL=grade-selector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"grade-selector.js","sources":["../../../../src/features/ui/grade-selector/grade-selector.tsx"],"sourcesContent":["import type { IGradeSelectorProps } from './grade-selector-types';\nimport type { ReactElement } from 'react';\n\nimport * as Styled from './grade-selector-styled';\nimport GradeTab from './grade-tab';\n\nfunction GradeSelector({\n selectedValue,\n onSelect,\n tabsWidth,\n width,\n grades,\n renderAs,\n size,\n layoutAlignment,\n}: IGradeSelectorProps): ReactElement {\n return (\n <Styled.GradeSelectorWrapper\n width={width}\n layoutAlignment={layoutAlignment}\n $alignItems=\"center\"\n $flexDirection=\"row\"\n >\n {grades.map(grade => {\n return (\n <GradeTab\n key={grade}\n label={grade === '0' ? 'KG' : grade}\n selected={selectedValue === grade}\n width={tabsWidth}\n onSelect={onSelect}\n renderAs={renderAs}\n size={size}\n grade={grade}\n />\n );\n })}\n </Styled.GradeSelectorWrapper>\n );\n}\n\nexport default GradeSelector;\n"],"names":["GradeSelector","selectedValue","onSelect","tabsWidth","width","grades","renderAs","size","layoutAlignment","jsx","Styled.GradeSelectorWrapper","grade","GradeTab"],"mappings":";;;AAMA,SAASA,EAAc;AAAA,EACrB,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,iBAAAC;AACF,GAAsC;AAElC,SAAA,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,OAAAN;AAAA,MACA,iBAAAI;AAAA,MACA,aAAY;AAAA,MACZ,gBAAe;AAAA,MAEd,UAAAH,EAAO,IAAI,CAASM,MAEjB,gBAAAF;AAAA,QAACG;AAAA,QAAA;AAAA,UAEC,OAAOD,MAAU,MAAM,OAAOA;AAAA,UAC9B,UAAUV,MAAkBU;AAAA,UAC5B,OAAOR;AAAA,UACP,UAAAD;AAAA,UACA,UAAAI;AAAA,UACA,MAAAC;AAAA,UACA,OAAAI;AAAA,QAAA;AAAA,QAPKA;AAAA,MAAA,CAUV;AAAA,IAAA;AAAA,EAAA;AAGP;"}
1
+ {"version":3,"file":"grade-selector.js","sources":["../../../../src/features/ui/grade-selector/grade-selector.tsx"],"sourcesContent":["import type { IGradeSelectorProps } from './grade-selector-types';\n\nimport { useMemo, type ReactElement } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { EDeviceType } from '../theme/constants';\nimport * as Styled from './grade-selector-styled';\nimport GradeTab from './grade-tab';\n\nfunction GradeSelector({\n selectedValue,\n onSelect,\n tabsWidth,\n width,\n grades,\n renderAs,\n size,\n sizeOnMobile,\n sizeOnTablet,\n layoutAlignment,\n}: IGradeSelectorProps): ReactElement {\n const { device } = useTheme();\n const renderSize = useMemo(() => {\n if (device <= EDeviceType.MOBILE) {\n return sizeOnMobile || sizeOnTablet || size;\n }\n\n if (device <= EDeviceType.TABLET) {\n return sizeOnTablet || size;\n }\n\n return size;\n }, [device, size, sizeOnMobile, sizeOnTablet]);\n\n return (\n <Styled.GradeSelectorWrapper\n width={width}\n layoutAlignment={layoutAlignment}\n $alignItems=\"center\"\n $flexDirection=\"row\"\n >\n {grades.map(grade => {\n return (\n <GradeTab\n key={grade}\n label={grade === '0' ? 'KG' : grade}\n selected={selectedValue === grade}\n width={tabsWidth}\n onSelect={onSelect}\n renderAs={renderAs}\n size={renderSize}\n grade={grade}\n />\n );\n })}\n </Styled.GradeSelectorWrapper>\n );\n}\n\nexport default GradeSelector;\n"],"names":["GradeSelector","selectedValue","onSelect","tabsWidth","width","grades","renderAs","size","sizeOnMobile","sizeOnTablet","layoutAlignment","device","useTheme","renderSize","useMemo","EDeviceType","jsx","Styled.GradeSelectorWrapper","grade","GradeTab"],"mappings":";;;;;;AASA,SAASA,EAAc;AAAA,EACrB,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,iBAAAC;AACF,GAAsC;AAC9B,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAaC,EAAQ,MACrBH,KAAUI,EAAY,SACjBP,KAAgBC,KAAgBF,IAGrCI,KAAUI,EAAY,UACjBN,KAAgBF,GAIxB,CAACI,GAAQJ,GAAMC,GAAcC,CAAY,CAAC;AAG3C,SAAA,gBAAAO;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,OAAAb;AAAA,MACA,iBAAAM;AAAA,MACA,aAAY;AAAA,MACZ,gBAAe;AAAA,MAEd,UAAAL,EAAO,IAAI,CAASa,MAEjB,gBAAAF;AAAA,QAACG;AAAA,QAAA;AAAA,UAEC,OAAOD,MAAU,MAAM,OAAOA;AAAA,UAC9B,UAAUjB,MAAkBiB;AAAA,UAC5B,OAAOf;AAAA,UACP,UAAAD;AAAA,UACA,UAAAI;AAAA,UACA,MAAMO;AAAA,UACN,OAAAK;AAAA,QAAA;AAAA,QAPKA;AAAA,MAAA,CAUV;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -1,10 +1,10 @@
1
- import { jsx as r, jsxs as l } from "react/jsx-runtime";
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 k = (h) => {
4
+ const H = ($) => {
5
5
  const {
6
- label: a,
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
- } = h, { input: T } = g();
23
- return /* @__PURE__ */ r(x, { $width: b, $widthX: c, $size: s, $willShowMessage: u, children: /* @__PURE__ */ l(
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__ */ l(f, { children: [
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
- a && t !== "curved" && /* @__PURE__ */ l(
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
- a,
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 a } from "react/jsx-runtime";
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 b } from "./text-input-styled.js";
5
- const i = "regular", g = I((o, p) => {
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: l,
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: h,
18
- isTransparent: n,
19
- helperText: w,
17
+ shape: b,
18
+ isTransparent: a,
19
+ helperText: h,
20
+ stickyLabel: w,
20
21
  ...x
21
22
  } = o;
22
- return /* @__PURE__ */ a(
23
+ return /* @__PURE__ */ n(
23
24
  T,
24
25
  {
25
26
  renderAs: r,
26
- label: l,
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: h,
34
+ shape: b,
34
35
  errorMessage: c,
35
- helperText: w,
36
- isTransparent: n,
37
- inputElement: /* @__PURE__ */ a(
38
- b,
36
+ helperText: h,
37
+ isTransparent: a,
38
+ inputElement: /* @__PURE__ */ n(
39
+ g,
39
40
  {
40
- ref: p,
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: n,
47
+ $isTransparent: a,
47
48
  ...x
48
49
  }
49
50
  ),
50
51
  siblingElement: f
51
52
  }
52
53
  );
53
- }), z = g;
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,IAAAf;AAGF,SAAA,gBAAAgB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAAZ;AAAA,MACA,OAAAF;AAAA,MACA,aAAa,CAAC,CAACC,KAASF,MAAS;AAAA,MACjC,OAAAI;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,gBAAAG;AAAA,QAACE;AAAAA,QAAA;AAAA,UACC,KAAAjB;AAAA,UACA,MAAAC;AAAA,UACA,OAAOE,KAAS;AAAA,UAChB,WAAWC;AAAA,UACX,OAAOR;AAAA,UACP,UAAAW;AAAA,UACA,gBAAgBK;AAAA,UACf,GAAGE;AAAA,QAAA;AAAA,MACN;AAAA,MAEF,gBAAAL;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC,GAEDS,IAAerB;"}
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 s = a.div(
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
- ), d = a.div(
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
- ), m = a.div`
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, h = a.div(
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,47 @@ 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
+ overflow: auto;
158
+ position: fixed;
159
+ left: 0;
160
+ right: 0;
161
+ bottom: 0;
162
+ animation: ${t ? "slideOut" : "slideIn"} 0.3s forwards;
163
+
164
+ @keyframes slideIn {
165
+ from {
166
+ transform: translateY(100%);
167
+ opacity: 0;
168
+ }
169
+ to {
170
+ transform: translateY(0%);
171
+ opacity: 1;
172
+ }
173
+ }
174
+
175
+ @keyframes slideOut {
176
+ from {
177
+ transform: translateY(0%);
178
+ opacity: 1;
179
+ }
180
+ to {
181
+ transform: translateY(100%);
182
+ opacity: 0;
183
+ }
184
+ }
185
+ `
153
186
  );
154
187
  export {
155
188
  l as BaseModal,
156
189
  c as BaseModalContent,
157
- d as CloseButtonContainer,
158
- s as ModalContainer,
159
- m as ModalLoaderWrapper,
160
- h as SpotlightModal
190
+ h as BottomSheetModal,
191
+ m as CloseButtonContainer,
192
+ p as ModalContainer,
193
+ d as ModalLoaderWrapper,
194
+ f as SpotlightModal
161
195
  };
162
196
  //# 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,gBAAgB;AAAA,aACnDD,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAKME,IAAYJ,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAE,GAAY,QAAAE,QAAa;AAAA;AAAA;AAAA;AAAA,WAItCA,CAAM;AAAA,sBACKJ,EAAO,OAAO;AAAA,sBACdA,EAAO,OAAO;AAAA;AAAA,eAGhCE,IAAa,mBAAmB,aAClC;AAAA;AAAA;AAAA;AAAA,4BAI0BE,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BlC,GAKMC,IAAmBN,EAAO;AAAA,EAC9B,CAAC,EAAE,aAAAO,EAAA,MAAkB;AAAA;AAAA;AAAA;AAAA,4BAIKA,CAAW;AAAA;AAAA;AAAA;AAIvC,GAKMC,IAAuBR,EAAO;AAAA,EAClC,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,aAAAM,EAAkB,MAAA;AAAA;AAAA;AAAA;AAAA,WAI/BN,EAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAOGM,CAAW;AAAA;AAAA;AAAA,aAG1BN,EAAO,OAAO;AAAA;AAAA;AAG3B,GAEMQ,IAAqBT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQ5BU,IAAiB,KACjBC,IAAkC,KAClCC,IAAgC,KAEhCC,IAAiBb,EAAO;AAAA,EAG5B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA,WAEXO,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,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 overflow: auto;\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAKME,IAAYJ,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAE,GAAY,QAAAE,QAAa;AAAA;AAAA;AAAA;AAAA,WAItCA,CAAM;AAAA,sBACKJ,EAAO,OAAO;AAAA,sBACdA,EAAO,OAAO;AAAA;AAAA,eAGhCE,IAAa,mBAAmB,aAClC;AAAA;AAAA;AAAA;AAAA,4BAI0BE,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BlC,GAKMC,IAAmBN,EAAO;AAAA,EAC9B,CAAC,EAAE,aAAAO,EAAA,MAAkB;AAAA;AAAA;AAAA;AAAA,4BAIKA,CAAW;AAAA;AAAA;AAAA;AAIvC,GAKMC,IAAuBR,EAAO;AAAA,EAClC,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,aAAAM,EAAkB,MAAA;AAAA;AAAA;AAAA;AAAA,WAI/BN,EAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAOGM,CAAW;AAAA;AAAA;AAAA,aAG1BN,EAAO,OAAO;AAAA;AAAA;AAG3B,GAEMQ,IAAqBT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQ5BU,IAAiB,KACjBC,IAAkC,KAClCC,IAAgC,KAEhCC,IAAiBb,EAAO;AAAA,EAG5B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA,WAEXO,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,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,GAEME,IAAmBd,EAAO;AAAA,EAC9B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAQLA,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 t } from "react/jsx-runtime";
2
- import { captureException as b } from "@sentry/browser";
3
- import { memo as g, useCallback as k, Suspense as a } from "react";
4
- import { ErrorBoundary as n } from "react-error-boundary";
5
- import $ from "../../../assets/line-icons/icons/cross.js";
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 E from "../buttons/clickable/clickable.js";
8
- import d from "../loader/app-loader/app-loader.js";
9
- import { ModalContainer as c, ModalLoaderWrapper as s, SpotlightModal as M, BaseModal as x, CloseButtonContainer as v, BaseModalContent as B } from "./modal-styled.js";
10
- const I = g(({ modal: m, isClosing: o = !1, onClose: p }) => {
11
- const { renderAs: f, element: i, modalWidth: e, isDismissable: C } = m, l = k((u) => {
12
- b(u);
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 f === "spotlight" ? /* @__PURE__ */ r(c, { $isClosing: o, children: /* @__PURE__ */ r(
15
- n,
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(s, { children: /* @__PURE__ */ r(h, { height: "100vh" }) }),
18
- onError: l,
19
- children: /* @__PURE__ */ t(
20
- a,
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(s, { children: /* @__PURE__ */ r(d, { height: "100vh" }) }),
32
+ fallback: /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(c, { height: "100vh" }) }),
23
33
  children: [
24
- /* @__PURE__ */ r(M, { $isClosing: o }),
25
- i
34
+ /* @__PURE__ */ r(B, { $isClosing: o }),
35
+ e
26
36
  ]
27
37
  }
28
38
  )
29
39
  }
30
- ) }) : /* @__PURE__ */ r(c, { $isClosing: o, children: /* @__PURE__ */ t(x, { $isClosing: o, $width: e, children: [
31
- C !== !1 && /* @__PURE__ */ r(v, { $modalWidth: e, children: /* @__PURE__ */ r(E, { label: "Close", onClick: p, children: /* @__PURE__ */ r($, { width: 40, height: 40 }) }) }),
32
- /* @__PURE__ */ r(B, { $modalWidth: e, children: /* @__PURE__ */ r(
33
- n,
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: l,
37
- children: /* @__PURE__ */ r(a, { fallback: /* @__PURE__ */ r(d, { height: "50vh" }), children: i })
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
- I as default
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","jsx","Styled.ModalContainer","ErrorBoundary","Styled.ModalLoaderWrapper","Error","jsxs","Suspense","AppLoader","Styled.SpotlightModal","Styled.BaseModal","Styled.CloseButtonContainer","Clickable","CrossIcon","Styled.BaseModalContent"],"mappings":";;;;;;;;;AAiBM,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;AAEL,SAAIN,MAAa,cAEZ,gBAAAQ,EAAAC,GAAA,EAAsB,YAAYX,GACjC,UAAA,gBAAAU;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,4BACGC,GAAA,EACC,UAAC,gBAAAH,EAAAI,GAAA,EAAM,QAAO,QAAQ,CAAA,GACxB;AAAA,MAEF,SAASR;AAAA,MAET,UAAA,gBAAAS;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,4BACGH,GAAA,EACC,UAAC,gBAAAH,EAAAO,GAAA,EAAU,QAAO,QAAQ,CAAA,GAC5B;AAAA,UAGF,UAAA;AAAA,YAAA,gBAAAP,EAACQ,GAAA,EAAsB,YAAYlB,EAAW,CAAA;AAAA,YAC7CG;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA,IAKD,gBAAAO,EAAAC,GAAA,EAAsB,YAAYX,GACjC,UAAC,gBAAAe,EAAAI,GAAA,EAAiB,YAAYnB,GAAW,QAAQI,GAC9C,UAAA;AAAA,IAAkBC,MAAA,wBAChBe,GAAA,EAA4B,aAAahB,GACxC,4BAACiB,GAAU,EAAA,OAAM,SAAQ,SAASpB,GAChC,4BAACqB,GAAU,EAAA,OAAO,IAAI,QAAQ,IAAI,GACpC,EACF,CAAA;AAAA,IAED,gBAAAZ,EAAAa,GAAA,EAAwB,aAAanB,GACpC,UAAA,gBAAAM;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,UAAW,gBAAAF,EAAAI,GAAA,EAAM,QAAO,QAAO,MAAK,WAAU;AAAA,QAC9C,SAASR;AAAA,QAET,UAAA,gBAAAI,EAACM,KAAS,UAAU,gBAAAN,EAACO,KAAU,QAAO,OAAO,CAAA,GAAK,UAAQd,EAAA,CAAA;AAAA,MAAA;AAAA,IAAA,GAE9D;AAAA,EAAA,EACF,CAAA,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 { 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;"}