@cuemath/leap 2.9.10 → 2.9.11

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 (44) hide show
  1. package/dist/features/post-game-stats/digital-meter/constants.js +12 -11
  2. package/dist/features/post-game-stats/digital-meter/constants.js.map +1 -1
  3. package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js +15 -16
  4. package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js.map +1 -1
  5. package/dist/features/post-game-stats/digital-meter/digital-meter.js +88 -86
  6. package/dist/features/post-game-stats/digital-meter/digital-meter.js.map +1 -1
  7. package/dist/features/post-game-stats/digital-meter/helper.js +3 -13
  8. package/dist/features/post-game-stats/digital-meter/helper.js.map +1 -1
  9. package/dist/features/ui/animated-arc/animated-arc-constants.js +6 -0
  10. package/dist/features/ui/animated-arc/animated-arc-constants.js.map +1 -0
  11. package/dist/features/ui/animated-arc/animated-arc-helpers.js +14 -0
  12. package/dist/features/ui/animated-arc/animated-arc-helpers.js.map +1 -0
  13. package/dist/features/ui/animated-arc/animated-arc-styled.js +33 -0
  14. package/dist/features/ui/animated-arc/animated-arc-styled.js.map +1 -0
  15. package/dist/features/ui/animated-arc/animated-arc.js +49 -0
  16. package/dist/features/ui/animated-arc/animated-arc.js.map +1 -0
  17. package/dist/features/ui/context-menu/context-menu.js +28 -18
  18. package/dist/features/ui/context-menu/context-menu.js.map +1 -1
  19. package/dist/features/ui/image/image.js +12 -12
  20. package/dist/features/ui/image/image.js.map +1 -1
  21. package/dist/features/ui/inputs/base-input/base-input-styled.js +77 -67
  22. package/dist/features/ui/inputs/base-input/base-input-styled.js.map +1 -1
  23. package/dist/features/ui/inputs/base-input/base-input.js +49 -47
  24. package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
  25. package/dist/features/ui/inputs/text-input/text-input.js +14 -12
  26. package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
  27. package/dist/features/ui/lottie-animation/lottie-animation.js +37 -28
  28. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  29. package/dist/features/ui/text/text.js +29 -27
  30. package/dist/features/ui/text/text.js.map +1 -1
  31. package/dist/features/ui/theme/button.js +17 -0
  32. package/dist/features/ui/theme/button.js.map +1 -1
  33. package/dist/features/ui/theme/input.js +67 -14
  34. package/dist/features/ui/theme/input.js.map +1 -1
  35. package/dist/index.d.ts +31 -2
  36. package/dist/index.js +229 -225
  37. package/dist/index.js.map +1 -1
  38. package/package.json +1 -1
  39. package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc-styled.js +0 -17
  40. package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc-styled.js.map +0 -1
  41. package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc.js +0 -50
  42. package/dist/features/post-game-stats/digital-meter/comp/animated-arc/animated-arc.js.map +0 -1
  43. package/dist/features/post-game-stats/digital-meter/comp/animated-arc/constants.js +0 -6
  44. package/dist/features/post-game-stats/digital-meter/comp/animated-arc/constants.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animated-arc-styled.js","sources":["../../../../src/features/ui/animated-arc/animated-arc-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../types';\n\nimport styled, { keyframes } from 'styled-components';\n\nimport { ANIMATED_ARC_Z_INDEX, RAINBOW_COLOR_ANIMATION_DURATION } from './animated-arc-constants';\n\nconst rainbowColorAnimation = keyframes`\n 0% {\n stroke: #FFB700;\n color: #FFB700;\n }\n 33% {\n stroke: #FF884C;\n color: #FF884C;\n }\n 66% {\n stroke: #FF80F4;\n color: #FF80F4;\n }\n 100% {\n stroke: #33CCFF;\n color: #33CCFF;\n }\n`;\n\nexport const Svg = styled.svg`\n position: absolute;\n z-index: ${ANIMATED_ARC_Z_INDEX};\n pointer-events: none;\n`;\n\nexport const Path = styled.path<{ stroke: TColorNames; $showAnimatedRainbowArc: boolean }>`\n stroke: ${({ theme, stroke }) => theme.colors[stroke]};\n animation: ${({ $showAnimatedRainbowArc }) =>\n $showAnimatedRainbowArc ? rainbowColorAnimation : 'undefined'}\n ${RAINBOW_COLOR_ANIMATION_DURATION}s ease infinite forwards;\n`;\n"],"names":["rainbowColorAnimation","keyframes","Svg","styled","ANIMATED_ARC_Z_INDEX","Path","theme","stroke","$showAnimatedRainbowArc","RAINBOW_COLOR_ANIMATION_DURATION"],"mappings":";;AAMA,MAAMA,IAAwBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAmBjBC,IAAMC,EAAO;AAAA;AAAA,aAEbC,CAAoB;AAAA;AAAA,GAIpBC,IAAOF,EAAO;AAAA,YACf,CAAC,EAAE,OAAAG,GAAO,QAAAC,EAAA,MAAaD,EAAM,OAAOC,CAAM,CAAC;AAAA,eACxC,CAAC,EAAE,yBAAAC,EAAA,MACZA,IAA0BR,IAAwB,WAAW;AAAA,MAC7DS,CAAgC;AAAA;"}
@@ -0,0 +1,49 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { useRef as u, useMemo as A, useLayoutEffect as g } from "react";
3
+ import { describeArc as w } from "./animated-arc-helpers.js";
4
+ import { Svg as R, Path as k } from "./animated-arc-styled.js";
5
+ const b = ({
6
+ radius: e,
7
+ strokeWidth: i,
8
+ color: y,
9
+ targetAngle: a,
10
+ startAngle: c = 0,
11
+ duration: o = 2,
12
+ mode: s = "draw",
13
+ delay: n = 0,
14
+ showAnimatedRainbowArc: $ = !1
15
+ }) => {
16
+ const f = u(null), r = e, l = e - i / 2, h = A(
17
+ () => w(r, r, l, c, a),
18
+ [a, c, l, r]
19
+ );
20
+ return g(() => {
21
+ const t = f.current;
22
+ if (t) {
23
+ if (s === "draw") {
24
+ const m = t.getTotalLength();
25
+ t.style.strokeDasharray = `${m}`, t.style.strokeDashoffset = `${m}`, t.getBoundingClientRect(), requestAnimationFrame(() => {
26
+ t.style.transition = `stroke-dashoffset ${o}s linear ${n}s`, t.style.strokeDashoffset = "0";
27
+ });
28
+ }
29
+ s === "fade" && (t.style.opacity = "0", t.getBoundingClientRect(), requestAnimationFrame(() => {
30
+ t.style.transition = `opacity ${o} ease-in-out ${n}s`, t.style.opacity = "1";
31
+ }));
32
+ }
33
+ }, [h, s, o, n]), /* @__PURE__ */ p(R, { width: 2 * e, height: 2 * e, viewBox: `0 0 ${2 * e} ${2 * e}`, children: /* @__PURE__ */ p(
34
+ k,
35
+ {
36
+ ref: f,
37
+ d: h,
38
+ fill: "none",
39
+ stroke: y,
40
+ strokeWidth: i,
41
+ strokeLinecap: "butt",
42
+ $showAnimatedRainbowArc: $
43
+ }
44
+ ) });
45
+ }, L = b;
46
+ export {
47
+ L as default
48
+ };
49
+ //# sourceMappingURL=animated-arc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animated-arc.js","sources":["../../../../src/features/ui/animated-arc/animated-arc.tsx"],"sourcesContent":["import type { IAnimatedArcProps } from './animated-arc-types';\n\nimport React, { useRef, useLayoutEffect, useMemo } from 'react';\n\nimport { describeArc } from './animated-arc-helpers';\nimport * as Styled from './animated-arc-styled';\n\nconst AnimatedArc: React.FC<IAnimatedArcProps> = ({\n radius,\n strokeWidth,\n color,\n targetAngle,\n startAngle = 0,\n duration = 2,\n mode = 'draw',\n delay = 0,\n showAnimatedRainbowArc = false,\n}) => {\n const pathRef = useRef<SVGPathElement>(null);\n\n const center = radius;\n const arcRadius = radius - strokeWidth / 2; // draw arc inside the visible bounds\n const arcPath = useMemo(\n () => describeArc(center, center, arcRadius, startAngle, targetAngle),\n [targetAngle, startAngle, arcRadius, center],\n );\n\n useLayoutEffect(() => {\n const path = pathRef.current;\n\n if (!path) return;\n\n if (mode === 'draw') {\n const length = path.getTotalLength();\n\n path.style.strokeDasharray = `${length}`;\n path.style.strokeDashoffset = `${length}`;\n path.getBoundingClientRect();\n\n requestAnimationFrame(() => {\n path.style.transition = `stroke-dashoffset ${duration}s linear ${delay}s`;\n path.style.strokeDashoffset = '0';\n });\n }\n\n if (mode === 'fade') {\n path.style.opacity = '0';\n path.getBoundingClientRect();\n\n requestAnimationFrame(() => {\n path.style.transition = `opacity ${duration} ease-in-out ${delay}s`;\n path.style.opacity = '1';\n });\n }\n }, [arcPath, mode, duration, delay]);\n\n return (\n <Styled.Svg width={2 * radius} height={2 * radius} viewBox={`0 0 ${2 * radius} ${2 * radius}`}>\n <Styled.Path\n ref={pathRef}\n d={arcPath}\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"butt\"\n $showAnimatedRainbowArc={showAnimatedRainbowArc}\n />\n </Styled.Svg>\n );\n};\n\nexport default AnimatedArc;\n"],"names":["AnimatedArc","radius","strokeWidth","color","targetAngle","startAngle","duration","mode","delay","showAnimatedRainbowArc","pathRef","useRef","center","arcRadius","arcPath","useMemo","describeArc","useLayoutEffect","path","length","Styled.Svg","jsx","Styled.Path","AnimatedArc$1"],"mappings":";;;;AAOA,MAAMA,IAA2C,CAAC;AAAA,EAChD,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,UAAAC,IAAW;AAAA,EACX,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,wBAAAC,IAAyB;AAC3B,MAAM;AACE,QAAAC,IAAUC,EAAuB,IAAI,GAErCC,IAASX,GACTY,IAAYZ,IAASC,IAAc,GACnCY,IAAUC;AAAA,IACd,MAAMC,EAAYJ,GAAQA,GAAQC,GAAWR,GAAYD,CAAW;AAAA,IACpE,CAACA,GAAaC,GAAYQ,GAAWD,CAAM;AAAA,EAAA;AAG7C,SAAAK,EAAgB,MAAM;AACpB,UAAMC,IAAOR,EAAQ;AAErB,QAAKQ,GAEL;AAAA,UAAIX,MAAS,QAAQ;AACb,cAAAY,IAASD,EAAK;AAEf,QAAAA,EAAA,MAAM,kBAAkB,GAAGC,CAAM,IACjCD,EAAA,MAAM,mBAAmB,GAAGC,CAAM,IACvCD,EAAK,sBAAsB,GAE3B,sBAAsB,MAAM;AAC1B,UAAAA,EAAK,MAAM,aAAa,qBAAqBZ,CAAQ,YAAYE,CAAK,KACtEU,EAAK,MAAM,mBAAmB;AAAA,QAAA,CAC/B;AAAA,MACH;AAEA,MAAIX,MAAS,WACXW,EAAK,MAAM,UAAU,KACrBA,EAAK,sBAAsB,GAE3B,sBAAsB,MAAM;AAC1B,QAAAA,EAAK,MAAM,aAAa,WAAWZ,CAAQ,gBAAgBE,CAAK,KAChEU,EAAK,MAAM,UAAU;AAAA,MAAA,CACtB;AAAA;AAAA,KAEF,CAACJ,GAASP,GAAMD,GAAUE,CAAK,CAAC,qBAGhCY,GAAA,EAAW,OAAO,IAAInB,GAAQ,QAAQ,IAAIA,GAAQ,SAAS,OAAO,IAAIA,CAAM,IAAI,IAAIA,CAAM,IACzF,UAAA,gBAAAoB;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,KAAKZ;AAAA,MACL,GAAGI;AAAA,MACH,MAAK;AAAA,MACL,QAAQX;AAAA,MACR,aAAAD;AAAA,MACA,eAAc;AAAA,MACd,yBAAyBO;AAAA,IAAA;AAAA,EAE7B,EAAA,CAAA;AAEJ,GAEAc,IAAevB;"}
@@ -1,27 +1,37 @@
1
- import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
- import { memo as c, useRef as f } from "react";
1
+ import { jsxs as u, jsx as m } from "react/jsx-runtime";
2
+ import { memo as x, useRef as $, useEffect as d } from "react";
3
3
  import a from "../hooks/use-context-menu-click-handler.js";
4
- import { TargetElementWrapper as x, OptionsMenuWrapper as $, MenuElementWrapper as d } from "./context-menu-styled.js";
5
- const C = c(
6
- ({ targetElement: r, menuElement: o, menuOffset: i, startLeft: l, menuZIndex: m, placeTop: e }) => {
7
- const n = f(null), { menuVisible: s, onMenuClick: p } = a(n);
8
- return /* @__PURE__ */ u(x, { ref: n, onClick: p, children: [
9
- r,
10
- /* @__PURE__ */ t(
11
- $,
4
+ import { TargetElementWrapper as k, OptionsMenuWrapper as E, MenuElementWrapper as W } from "./context-menu-styled.js";
5
+ const j = x(
6
+ ({
7
+ targetElement: n,
8
+ menuElement: p,
9
+ menuOffset: c,
10
+ startLeft: f,
11
+ menuZIndex: s,
12
+ placeTop: t,
13
+ onMenuVisibilityChange: e
14
+ }) => {
15
+ const o = $(null), { menuVisible: r, onMenuClick: l } = a(o);
16
+ return d(() => {
17
+ e == null || e(r);
18
+ }, [r, e]), /* @__PURE__ */ u(k, { ref: o, onClick: l, children: [
19
+ n,
20
+ /* @__PURE__ */ m(
21
+ E,
12
22
  {
13
- $menuOffset: i,
14
- $visible: s,
15
- $startLeft: l,
16
- $menuZIndex: m,
17
- $placeTop: e,
18
- children: /* @__PURE__ */ t(d, { $placeTop: e, children: o })
23
+ $menuOffset: c,
24
+ $visible: r,
25
+ $startLeft: f,
26
+ $menuZIndex: s,
27
+ $placeTop: t,
28
+ children: /* @__PURE__ */ m(W, { $placeTop: t, children: p })
19
29
  }
20
30
  )
21
31
  ] });
22
32
  }
23
- ), b = C;
33
+ ), C = j;
24
34
  export {
25
- b as default
35
+ C as default
26
36
  };
27
37
  //# sourceMappingURL=context-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { memo, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({ targetElement, menuElement, menuOffset, startLeft, menuZIndex, placeTop }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\n return (\n <Styled.TargetElementWrapper ref={containerRef} onClick={onMenuClick}>\n {targetElement}\n\n <Styled.OptionsMenuWrapper\n $menuOffset={menuOffset}\n $visible={menuVisible}\n $startLeft={startLeft}\n $menuZIndex={menuZIndex}\n $placeTop={placeTop}\n >\n <Styled.MenuElementWrapper $placeTop={placeTop}>{menuElement}</Styled.MenuElementWrapper>\n </Styled.OptionsMenuWrapper>\n </Styled.TargetElementWrapper>\n );\n },\n);\n\nexport default ContextMenu;\n"],"names":["ContextMenu","memo","targetElement","menuElement","menuOffset","startLeft","menuZIndex","placeTop","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","Styled.TargetElementWrapper","jsx","Styled.OptionsMenuWrapper","Styled.MenuElementWrapper","ContextMenu$1"],"mappings":";;;;AAQA,MAAMA,IAAqCC;AAAA,EACzC,CAAC,EAAE,eAAAC,GAAe,aAAAC,GAAa,YAAAC,GAAY,WAAAC,GAAW,YAAAC,GAAY,UAAAC,QAAe;AACzE,UAAAC,IAAeC,EAAuB,IAAI,GAE1C,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAA2BJ,CAAY;AAE5E,6BACGK,GAAA,EAA4B,KAAKL,GAAc,SAASG,GACtD,UAAA;AAAA,MAAAT;AAAA,MAED,gBAAAY;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAaX;AAAA,UACb,UAAUM;AAAA,UACV,YAAYL;AAAA,UACZ,aAAaC;AAAA,UACb,WAAWC;AAAA,UAEX,4BAACS,GAAA,EAA0B,WAAWT,GAAW,UAAYJ,GAAA;AAAA,QAAA;AAAA,MAC/D;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAc,IAAejB;"}
1
+ {"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { memo, useEffect, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({\n targetElement,\n menuElement,\n menuOffset,\n startLeft,\n menuZIndex,\n placeTop,\n onMenuVisibilityChange,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\n useEffect(() => {\n onMenuVisibilityChange?.(menuVisible);\n }, [menuVisible, onMenuVisibilityChange]);\n\n return (\n <Styled.TargetElementWrapper ref={containerRef} onClick={onMenuClick}>\n {targetElement}\n\n <Styled.OptionsMenuWrapper\n $menuOffset={menuOffset}\n $visible={menuVisible}\n $startLeft={startLeft}\n $menuZIndex={menuZIndex}\n $placeTop={placeTop}\n >\n <Styled.MenuElementWrapper $placeTop={placeTop}>{menuElement}</Styled.MenuElementWrapper>\n </Styled.OptionsMenuWrapper>\n </Styled.TargetElementWrapper>\n );\n },\n);\n\nexport default ContextMenu;\n"],"names":["ContextMenu","memo","targetElement","menuElement","menuOffset","startLeft","menuZIndex","placeTop","onMenuVisibilityChange","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","useEffect","Styled.TargetElementWrapper","jsx","Styled.OptionsMenuWrapper","Styled.MenuElementWrapper","ContextMenu$1"],"mappings":";;;;AAQA,MAAMA,IAAqCC;AAAA,EACzC,CAAC;AAAA,IACC,eAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,wBAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAeC,EAAuB,IAAI,GAC1C,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAA2BJ,CAAY;AAE5E,WAAAK,EAAU,MAAM;AACd,MAAAN,KAAA,QAAAA,EAAyBG;AAAA,IAAW,GACnC,CAACA,GAAaH,CAAsB,CAAC,qBAGrCO,GAAA,EAA4B,KAAKN,GAAc,SAASG,GACtD,UAAA;AAAA,MAAAV;AAAA,MAED,gBAAAc;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAab;AAAA,UACb,UAAUO;AAAA,UACV,YAAYN;AAAA,UACZ,aAAaC;AAAA,UACb,WAAWC;AAAA,UAEX,4BAACW,GAAA,EAA0B,WAAWX,GAAW,UAAYJ,GAAA;AAAA,QAAA;AAAA,MAC/D;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAgB,IAAenB;"}
@@ -1,30 +1,30 @@
1
1
  import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
2
  import { memo as g, useState as f } from "react";
3
3
  import t from "styled-components";
4
- import { skeletonLoadingAnimation as p } from "../constants/style.js";
4
+ import { skeletonLoadingAnimation as c } from "../constants/style.js";
5
5
  import i from "../layout/flex-view.js";
6
- const L = t(i)`
7
- animation: ${p} 2s linear infinite;
6
+ const p = t(i)`
7
+ animation: ${c} 2s linear infinite;
8
8
  position: absolute;
9
9
  left: 0;
10
10
  right: 0;
11
11
  top: 0;
12
12
  bottom: 0;
13
- `, c = t(i)`
13
+ `, L = t(i)`
14
14
  overflow: hidden;
15
15
  position: relative;
16
- `, v = g(
17
- ({ borderRadius: r = 0, borderColor: n, withLoader: a, ...o }) => {
16
+ `, u = g(
17
+ ({ borderRadius: n = 0, borderColor: r, withLoader: a, ...o }) => {
18
18
  const { width: s, height: d } = o, [m, l] = f(!0);
19
19
  return /* @__PURE__ */ h(
20
- c,
20
+ L,
21
21
  {
22
22
  $width: s,
23
23
  $height: d,
24
- $borderColor: n,
25
- $borderRadius: r,
24
+ $borderColor: r,
25
+ $borderRadius: n,
26
26
  children: [
27
- m && a && /* @__PURE__ */ e(L, { $inherit: !0 }),
27
+ m && a && /* @__PURE__ */ e(p, { $inherit: !0 }),
28
28
  /* @__PURE__ */ e("img", { onLoad: () => {
29
29
  l(!1);
30
30
  }, ...o })
@@ -32,8 +32,8 @@ const L = t(i)`
32
32
  }
33
33
  );
34
34
  }
35
- );
35
+ ), F = u;
36
36
  export {
37
- v as default
37
+ F as default
38
38
  };
39
39
  //# sourceMappingURL=image.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"image.js","sources":["../../../../src/features/ui/image/image.tsx"],"sourcesContent":["import type { IImageProps } from './image-types';\n\nimport { useState, memo } from 'react';\nimport styled from 'styled-components';\n\nimport { skeletonLoadingAnimation } from '../constants/style';\nimport FlexView from '../layout/flex-view';\n\nconst LoadingFlexView = styled(FlexView)`\n animation: ${skeletonLoadingAnimation} 2s linear infinite;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst ImageWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nconst Image: React.FC<IImageProps> = memo(\n ({ borderRadius = 0, borderColor, withLoader, ...props }) => {\n const { width, height } = props;\n const [isLoading, setIsLoading] = useState(true);\n const handleImgLoaded = () => {\n setIsLoading(false);\n };\n const showLoader = isLoading && withLoader;\n\n return (\n <ImageWrapper\n $width={width}\n $height={height}\n $borderColor={borderColor}\n $borderRadius={borderRadius}\n >\n {showLoader && <LoadingFlexView $inherit={true} />}\n <img onLoad={handleImgLoaded} {...props} />\n </ImageWrapper>\n );\n },\n);\n\nexport default Image;\n"],"names":["LoadingFlexView","styled","FlexView","skeletonLoadingAnimation","ImageWrapper","Image","memo","borderRadius","borderColor","withLoader","props","width","height","isLoading","setIsLoading","useState","jsxs","jsx"],"mappings":";;;;;AAQA,MAAMA,IAAkBC,EAAOC,CAAQ;AAAA,eACxBC,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK9BG,IAA+BC;AAAA,EACnC,CAAC,EAAE,cAAAC,IAAe,GAAG,aAAAC,GAAa,YAAAC,GAAY,GAAGC,QAAY;AACrD,UAAA,EAAE,OAAAC,GAAO,QAAAC,EAAW,IAAAF,GACpB,CAACG,GAAWC,CAAY,IAAIC,EAAS,EAAI;AAO7C,WAAA,gBAAAC;AAAA,MAACZ;AAAA,MAAA;AAAA,QACC,QAAQO;AAAA,QACR,SAASC;AAAA,QACT,cAAcJ;AAAA,QACd,eAAeD;AAAA,QAEd,UAAA;AAAA,UATcM,KAAaJ,KASb,gBAAAQ,EAACjB,GAAgB,EAAA,UAAU,GAAM,CAAA;AAAA,UAC/C,gBAAAiB,EAAA,OAAA,EAAI,QAbe,MAAM;AAC5B,YAAAH,EAAa,EAAK;AAAA,UAAA,GAYe,GAAGJ,EAAO,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG/C;AACF;"}
1
+ {"version":3,"file":"image.js","sources":["../../../../src/features/ui/image/image.tsx"],"sourcesContent":["import type { IImageProps } from './image-types';\n\nimport { useState, memo } from 'react';\nimport styled from 'styled-components';\n\nimport { skeletonLoadingAnimation } from '../constants/style';\nimport FlexView from '../layout/flex-view';\n\nconst LoadingFlexView = styled(FlexView)`\n animation: ${skeletonLoadingAnimation} 2s linear infinite;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst ImageWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nconst Image: React.FC<IImageProps> = memo(\n ({ borderRadius = 0, borderColor, withLoader, ...props }) => {\n const { width, height } = props;\n const [isLoading, setIsLoading] = useState(true);\n const handleImgLoaded = () => {\n setIsLoading(false);\n };\n const showLoader = isLoading && withLoader;\n\n return (\n <ImageWrapper\n $width={width}\n $height={height}\n $borderColor={borderColor}\n $borderRadius={borderRadius}\n >\n {showLoader && <LoadingFlexView $inherit={true} />}\n <img onLoad={handleImgLoaded} {...props} />\n </ImageWrapper>\n );\n },\n);\n\nexport default Image;\n"],"names":["LoadingFlexView","styled","FlexView","skeletonLoadingAnimation","ImageWrapper","Image","memo","borderRadius","borderColor","withLoader","props","width","height","isLoading","setIsLoading","useState","jsxs","jsx","Image$1"],"mappings":";;;;;AAQA,MAAMA,IAAkBC,EAAOC,CAAQ;AAAA,eACxBC,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK9BG,IAA+BC;AAAA,EACnC,CAAC,EAAE,cAAAC,IAAe,GAAG,aAAAC,GAAa,YAAAC,GAAY,GAAGC,QAAY;AACrD,UAAA,EAAE,OAAAC,GAAO,QAAAC,EAAW,IAAAF,GACpB,CAACG,GAAWC,CAAY,IAAIC,EAAS,EAAI;AAO7C,WAAA,gBAAAC;AAAA,MAACZ;AAAA,MAAA;AAAA,QACC,QAAQO;AAAA,QACR,SAASC;AAAA,QACT,cAAcJ;AAAA,QACd,eAAeD;AAAA,QAEd,UAAA;AAAA,UATcM,KAAaJ,KASb,gBAAAQ,EAACjB,GAAgB,EAAA,UAAU,GAAM,CAAA;AAAA,UAC/C,gBAAAiB,EAAA,OAAA,EAAI,QAbe,MAAM;AAC5B,YAAAH,EAAa,EAAK;AAAA,UAAA,GAYe,GAAGJ,EAAO,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG/C;AACF,GAEAQ,IAAeb;"}
@@ -1,114 +1,124 @@
1
- import g from "styled-components";
1
+ import p from "styled-components";
2
2
  import C from "../../text/text.js";
3
- const E = g.div(
4
- ({ theme: i, $size: s, $willShowMessage: c, $width: o, $widthX: e }) => {
5
- const { height: a, marginTop: t, marginBottom: r } = i.input.sizes[s], n = a + t + (c ? r : 0);
3
+ const k = p.div(
4
+ ({ theme: r, $size: e, $willShowMessage: n, $width: t, $widthX: o }) => {
5
+ const { height: c, marginTop: a, marginBottom: s } = r.input.sizes[e], i = c + a + (n ? s : 0);
6
6
  return `
7
- width: ${o || "auto"}${typeof o == "number" ? "px" : ""};
8
- ${e ? `width: ${e * i.layout.gutter}px;` : ""}
9
- height: ${n}px;
7
+ width: ${t || "auto"}${typeof t == "number" ? "px" : ""};
8
+ ${o ? `width: ${o * r.layout.gutter}px;` : ""}
9
+ height: ${i}px;
10
10
  `;
11
11
  }
12
- ), x = g.div(
13
- ({ theme: i, $size: s, $renderAs: c, $disabled: o, $shape: e, $isTransparent: a }) => {
14
- const { colors: t, input: r } = i, { height: n, marginTop: b, paddingLeft: f, paddingRight: u, borderRadius: h } = r.sizes[s], { borderColorName: d, backgroundColorName: $ } = r.variants[c], p = e === "borderLess", l = e === "curved", v = p ? 0 : h, m = a ? "transparent" : t[$ ?? "WHITE"];
12
+ ), b = p.div(
13
+ ({ theme: r, $size: e, $renderAs: n, $disabled: t, $shape: o, $isTransparent: c }) => {
14
+ const { colors: a, input: s } = r, { height: i, marginTop: x, paddingLeft: f, paddingRight: u, borderRadius: h } = s.sizes[e], { borderColorName: d, backgroundColorName: $ } = s.variants[n], l = o === "borderLess", g = o === "curved", m = l ? 0 : h, v = c ? "transparent" : a[$ ?? "WHITE"];
15
15
  return `
16
16
  position: relative;
17
17
  display: flex;
18
- height: ${n}px;
19
- margin-top: ${b}px;
20
- padding-left: ${p ? 0 : f}px;
21
- padding-right: ${p ? 0 : u}px;
22
- padding-top: ${l ? 1 : 0}px;
23
- padding-bottom: ${l ? 1 : 0}px;
24
- ${p ? `
18
+ height: ${i}px;
19
+ margin-top: ${x}px;
20
+ padding-left: ${l ? 0 : f}px;
21
+ padding-right: ${l ? 0 : u}px;
22
+ padding-top: ${g ? 1 : 0}px;
23
+ padding-bottom: ${g ? 1 : 0}px;
24
+ ${l ? `
25
25
  border: none;
26
- border-bottom: 1px solid ${t[d[o ? "disabled" : "inactive"]]};
27
- ` : `border: 1px solid ${t[d[o ? "disabled" : l ? "active" : "inactive"]]};`}
28
- border-radius: ${l ? 40 : v}px;
26
+ border-bottom: 1px solid ${a[d[t ? "disabled" : "inactive"]]};
27
+ ` : `border: 1px solid ${a[d[t ? "disabled" : g ? "active" : "inactive"]]};`}
28
+ border-radius: ${g ? 40 : m}px;
29
29
  transition: border-color 0.2s ease-in-out;
30
30
 
31
- background: ${m};
31
+ background: ${v};
32
32
 
33
33
  &:focus-within {
34
- border-color: ${t[d.active]};
34
+ border-color: ${a[d.active]};
35
35
  }
36
36
 
37
37
  &:hover {
38
- ${o ? "" : `border-color: ${t[d.active]};`}
38
+ ${t ? "" : `border-color: ${a[d.active]};`}
39
39
  }
40
40
  `;
41
41
  }
42
- ), R = g.div`
42
+ ), B = p.div`
43
43
  flex-grow: 1;
44
- `, k = g.div(
45
- ({ theme: i, $inputRenderAs: s, $disabled: c, $size: o, $siblingPosition: e }) => {
46
- const { colors: a, input: t } = i, { iconPadding: r } = t.sizes[o], { labelColorName: n } = t.variants[s];
44
+ `, E = p.div(
45
+ ({ theme: r, $inputRenderAs: e, $disabled: n, $size: t, $siblingPosition: o }) => {
46
+ const { colors: c, input: a } = r, { iconPadding: s } = a.sizes[t], { labelColorName: i } = a.variants[e];
47
47
  return `
48
- order: ${e === "left" ? -1 : 1};
49
- padding-${e === "left" ? "right" : "left"}: ${r}px;
48
+ order: ${o === "left" ? -1 : 1};
49
+ padding-${o === "left" ? "right" : "left"}: ${s}px;
50
50
  align-self: center;
51
- color: ${a[n[c ? "disabled" : "inactive"]]};
51
+ color: ${c[i[n ? "disabled" : "inactive"]]};
52
52
 
53
- ${x}:focus-within & {
54
- color: ${a[n.active]};
53
+ ${b}:focus-within & {
54
+ color: ${c[i.active]};
55
55
  }
56
56
 
57
- ${x}:hover & {
58
- ${c ? "" : `color: ${a[n.active]};`}
57
+ ${b}:hover & {
58
+ ${n ? "" : `color: ${c[i.active]};`}
59
59
  }
60
60
  `;
61
61
  }
62
- ), y = g(C)(({
63
- theme: i,
64
- $size: s,
65
- $inputRenderAs: c,
66
- $stickyLabel: o,
67
- $disabled: e,
68
- $shape: a,
69
- $isTransparent: t
62
+ ), H = p(C)(({
63
+ theme: r,
64
+ $size: e,
65
+ $inputRenderAs: n,
66
+ $stickyLabel: t,
67
+ $disabled: o,
68
+ $shape: c,
69
+ $isTransparent: a
70
70
  }) => {
71
- const { colors: r, input: n, text: b, layout: f } = i, { gutter: u } = f, { height: h, paddingLeft: d } = n.sizes[s], { lineHeight: $ } = b[n.sizes[s].labelTextVariant], { labelColorName: p } = n.variants[c], l = h / 2 - $ / 2 - 1, v = -l - $ / 2 - 1, m = a === "borderLess", L = t ? "transparent" : r.WHITE;
71
+ const { colors: s, input: i, text: x, layout: f } = r, { gutter: u } = f, { height: h, paddingLeft: d } = i.sizes[e], { lineHeight: $ } = x[i.sizes[e].labelTextVariant], { labelColorName: l, labelBackgroundColorName: g } = i.variants[n], m = h / 2 - $ / 2 - 1, v = -m - $ / 2 - 1, N = c === "borderLess", T = a ? "transparent" : s[g ?? "WHITE"];
72
72
  return `
73
73
  position: absolute;
74
- top: ${l}px;
75
- left: ${(m ? 0 : d) - u * 0.375}px;
74
+ top: ${m}px;
75
+ left: ${(N ? 0 : d) - u * 0.375}px;
76
76
  padding: 0 ${u * 0.375}px;
77
- background-color: ${L};
78
- color: ${r[p[e ? "disabled" : "inactive"]]};
77
+ background-color: ${T};
78
+ color: ${s[l[o ? "disabled" : "inactive"]]};
79
79
  pointer-events: none;
80
80
  transform-origin: left;
81
- transform: translateY(${o ? v : 0}px) scale(${o ? 0.75 : 1});
81
+ transform: translateY(${t ? v : 0}px) scale(${t ? 0.75 : 1});
82
82
  transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
83
83
 
84
- ${x}:focus-within & {
85
- color: ${r[p.active]};
84
+ ${b}:focus-within & {
85
+ color: ${s[l.active]};
86
86
  transform: translateY(${v}px) scale(0.75);
87
87
  }
88
88
 
89
- ${x}:hover & {
90
- ${e ? "" : `color: ${r[p.active]};`}
89
+ ${b}:hover & {
90
+ ${o ? "" : `color: ${s[l.active]};`}
91
91
  }
92
92
 
93
93
  & span {
94
- color: ${r.RED};
94
+ color: ${s.RED};
95
95
  margin-left: 2px;
96
96
  }
97
97
  `;
98
- }), z = g(C)(
99
- ({ theme: { colors: i } }) => `
100
- position: absolute;
101
- bottom: -2px;
102
- transform: translateY(calc(100%));
103
- color: ${i.RED};
104
- `
105
- );
98
+ }), R = p(C)(({ theme: { input: r, colors: e }, $inputRenderAs: n }) => {
99
+ var o;
100
+ return `
101
+ position: absolute;
102
+ bottom: -2px;
103
+ transform: translateY(calc(100%));
104
+ color: ${e[((o = r.variants[n]) == null ? void 0 : o.errorMessageColorName) ?? "RED"]};
105
+ `;
106
+ }), y = p(C)(({ theme: { input: r, colors: e }, $inputRenderAs: n }) => {
107
+ var o;
108
+ return `
109
+ position: absolute;
110
+ bottom: -2px;
111
+ transform: translateY(calc(100%));
112
+ color: ${e[(o = r.variants[n]) == null ? void 0 : o.messageColorName.active]};
113
+ `;
114
+ });
106
115
  export {
107
- E as Container,
108
- z as Error,
109
- R as InputWrapper,
110
- y as Label,
111
- k as SiblingWrapper,
112
- x as Wrapper
116
+ k as Container,
117
+ R as Error,
118
+ y as HelperText,
119
+ B as InputWrapper,
120
+ H as Label,
121
+ E as SiblingWrapper,
122
+ b as Wrapper
113
123
  };
114
124
  //# sourceMappingURL=base-input-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-input-styled.js","sources":["../../../../../src/features/ui/inputs/base-input/base-input-styled.tsx"],"sourcesContent":["import type { IBaseInputProps } from './base-input-types';\n\nimport styled from 'styled-components';\n\nimport Text from '../../text/text';\n\ninterface IContainerProps {\n $width?: string | number;\n $widthX?: number;\n $size: IBaseInputProps['size'];\n $willShowMessage: IBaseInputProps['willShowMessage'];\n}\n\nconst Container = styled.div<IContainerProps>(\n ({ theme, $size, $willShowMessage, $width, $widthX }) => {\n const { height, marginTop, marginBottom } = theme.input.sizes[$size];\n const containerHeight = height + marginTop + ($willShowMessage ? marginBottom : 0);\n\n return `\n width: ${$width ? $width : 'auto'}${typeof $width === 'number' ? 'px' : ''};\n ${$widthX ? `width: ${$widthX * theme.layout.gutter}px;` : ''}\n height: ${containerHeight}px;\n `;\n },\n);\n\ninterface IWrapperProps {\n $size: IBaseInputProps['size'];\n $disabled?: boolean;\n $renderAs: IBaseInputProps['renderAs'];\n $shape?: IBaseInputProps['shape'];\n $isTransparent?: boolean;\n}\n\nconst Wrapper = styled.div<IWrapperProps>(\n ({ theme, $size, $renderAs, $disabled, $shape, $isTransparent }) => {\n const { colors, input } = theme;\n const { height, marginTop, paddingLeft, paddingRight, borderRadius } = input.sizes[$size];\n const { borderColorName, backgroundColorName } = input.variants[$renderAs];\n\n const isBorderLessShape = $shape === 'borderLess';\n const isCurvedShape = $shape === 'curved';\n const defaultBorderRadius = isBorderLessShape ? 0 : borderRadius;\n\n const background = $isTransparent ? 'transparent' : colors[backgroundColorName ?? 'WHITE'];\n\n return `\n position: relative;\n display: flex;\n height: ${height}px;\n margin-top: ${marginTop}px;\n padding-left: ${isBorderLessShape ? 0 : paddingLeft}px;\n padding-right: ${isBorderLessShape ? 0 : paddingRight}px;\n padding-top: ${isCurvedShape ? 1 : 0}px;\n padding-bottom: ${isCurvedShape ? 1 : 0}px;\n ${\n isBorderLessShape\n ? `\n border: none;\n border-bottom: 1px solid ${colors[borderColorName[$disabled ? 'disabled' : 'inactive']]};\n `\n : `border: 1px solid ${\n colors[borderColorName[$disabled ? 'disabled' : isCurvedShape ? 'active' : 'inactive']]\n };`\n }\n border-radius: ${isCurvedShape ? 40 : defaultBorderRadius}px;\n transition: border-color 0.2s ease-in-out;\n \n background: ${background};\n \n &:focus-within {\n border-color: ${colors[borderColorName.active]};\n }\n \n &:hover {\n ${!$disabled ? `border-color: ${colors[borderColorName.active]};` : ''}\n }\n `;\n },\n);\n\nconst InputWrapper = styled.div`\n flex-grow: 1;\n`;\n\ninterface ISiblingWrapperProps {\n $inputRenderAs: IBaseInputProps['renderAs'];\n $size: IBaseInputProps['size'];\n $siblingPosition: NonNullable<IBaseInputProps['siblingPosition']>;\n $disabled?: boolean;\n}\n\nconst SiblingWrapper = styled.div<ISiblingWrapperProps>(\n ({ theme, $inputRenderAs, $disabled, $size, $siblingPosition }) => {\n const { colors, input } = theme;\n const { iconPadding } = input.sizes[$size];\n const { labelColorName } = input.variants[$inputRenderAs];\n\n return `\n order: ${$siblingPosition === 'left' ? -1 : 1};\n padding-${$siblingPosition === 'left' ? 'right' : 'left'}: ${iconPadding}px;\n align-self: center;\n color: ${colors[labelColorName[$disabled ? 'disabled' : 'inactive']]};\n\n ${Wrapper}:focus-within & {\n color: ${colors[labelColorName.active]};\n }\n \n ${Wrapper}:hover & {\n ${!$disabled ? `color: ${colors[labelColorName.active]};` : ''}\n }\n `;\n },\n);\n\ninterface ILabelProps {\n $size: IBaseInputProps['size'];\n $inputRenderAs: IBaseInputProps['renderAs'];\n $stickyLabel: IBaseInputProps['stickyLabel'];\n $disabled?: boolean;\n $shape?: IBaseInputProps['shape'];\n $isTransparent: IBaseInputProps['isTransparent'];\n}\n\nconst Label = styled(Text)<ILabelProps>(({\n theme,\n $size,\n $inputRenderAs,\n $stickyLabel,\n $disabled,\n $shape,\n $isTransparent,\n}) => {\n const { colors, input, text, layout } = theme;\n const { gutter } = layout;\n const { height, paddingLeft } = input.sizes[$size];\n const { lineHeight } = text[input.sizes[$size].labelTextVariant];\n const { labelColorName } = input.variants[$inputRenderAs];\n const topPosition = height / 2 - lineHeight / 2 - 1;\n const topPositionWhenActive = -topPosition - lineHeight / 2 - 1;\n\n const isBorderLessShape = $shape === 'borderLess';\n\n const backgroundColor = $isTransparent ? 'transparent' : colors.WHITE;\n\n return `\n position: absolute;\n top: ${topPosition}px;\n left: ${(isBorderLessShape ? 0 : paddingLeft) - gutter * 0.375}px;\n padding: 0 ${gutter * 0.375}px;\n background-color: ${backgroundColor};\n color: ${colors[labelColorName[$disabled ? 'disabled' : 'inactive']]};\n pointer-events: none;\n transform-origin: left;\n transform: translateY(${$stickyLabel ? topPositionWhenActive : 0}px) scale(${\n $stickyLabel ? 0.75 : 1\n });\n transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;\n\n ${Wrapper}:focus-within & {\n color: ${colors[labelColorName.active]};\n transform: translateY(${topPositionWhenActive}px) scale(0.75);\n }\n \n ${Wrapper}:hover & {\n ${!$disabled ? `color: ${colors[labelColorName.active]};` : ''}\n }\n\n & span {\n color: ${colors.RED};\n margin-left: 2px;\n }\n `;\n});\n\nconst Error = styled(Text)(\n ({ theme: { colors } }) => `\nposition: absolute;\nbottom: -2px;\ntransform: translateY(calc(100%));\ncolor: ${colors.RED};\n`,\n);\n\nexport { Container, Wrapper, InputWrapper, SiblingWrapper, Label, Error };\n"],"names":["Container","styled","theme","$size","$willShowMessage","$width","$widthX","height","marginTop","marginBottom","containerHeight","Wrapper","$renderAs","$disabled","$shape","$isTransparent","colors","input","paddingLeft","paddingRight","borderRadius","borderColorName","backgroundColorName","isBorderLessShape","isCurvedShape","defaultBorderRadius","background","InputWrapper","SiblingWrapper","$inputRenderAs","$siblingPosition","iconPadding","labelColorName","Label","Text","$stickyLabel","text","layout","gutter","lineHeight","topPosition","topPositionWhenActive","backgroundColor","Error"],"mappings":";;AAaA,MAAMA,IAAYC,EAAO;AAAA,EACvB,CAAC,EAAE,OAAAC,GAAO,OAAAC,GAAO,kBAAAC,GAAkB,QAAAC,GAAQ,SAAAC,QAAc;AACjD,UAAA,EAAE,QAAAC,GAAQ,WAAAC,GAAW,cAAAC,EAAA,IAAiBP,EAAM,MAAM,MAAMC,CAAK,GAC7DO,IAAkBH,IAASC,KAAaJ,IAAmBK,IAAe;AAEzE,WAAA;AAAA,eACIJ,KAAkB,MAAM,GAAG,OAAOA,KAAW,WAAW,OAAO,EAAE;AAAA,QACxEC,IAAU,UAAUA,IAAUJ,EAAM,OAAO,MAAM,QAAQ,EAAE;AAAA,gBACnDQ,CAAe;AAAA;AAAA,EAE7B;AACF,GAUMC,IAAUV,EAAO;AAAA,EACrB,CAAC,EAAE,OAAAC,GAAO,OAAAC,GAAO,WAAAS,GAAW,WAAAC,GAAW,QAAAC,GAAQ,gBAAAC,QAAqB;AAC5D,UAAA,EAAE,QAAAC,GAAQ,OAAAC,EAAU,IAAAf,GACpB,EAAE,QAAAK,GAAQ,WAAAC,GAAW,aAAAU,GAAa,cAAAC,GAAc,cAAAC,EAAa,IAAIH,EAAM,MAAMd,CAAK,GAClF,EAAE,iBAAAkB,GAAiB,qBAAAC,EAAA,IAAwBL,EAAM,SAASL,CAAS,GAEn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AAA,QACJE,IAAyD,KAA7C,UAAUG,EAAOgB,EAAe,MAAM,CAAC,GAAQ;AAAA;AAAA;AAAA;AAAA,eAIrDhB,EAAO,GAAG;AAAA;AAAA;AAAA;AAIzB,CAAC,GAEK2B,IAAQ1C,EAAOiC,CAAI;AAAA,EACvB,CAAC,EAAE,OAAO,EAAE,QAAAlB,EAAA,EAAe,MAAA;AAAA;AAAA;AAAA;AAAA,SAIpBA,EAAO,GAAG;AAAA;AAEnB;"}
1
+ {"version":3,"file":"base-input-styled.js","sources":["../../../../../src/features/ui/inputs/base-input/base-input-styled.tsx"],"sourcesContent":["import type { IBaseInputProps } from './base-input-types';\n\nimport styled from 'styled-components';\n\nimport Text from '../../text/text';\n\ninterface IContainerProps {\n $width?: string | number;\n $widthX?: number;\n $size: IBaseInputProps['size'];\n $willShowMessage: IBaseInputProps['willShowMessage'];\n}\n\nconst Container = styled.div<IContainerProps>(\n ({ theme, $size, $willShowMessage, $width, $widthX }) => {\n const { height, marginTop, marginBottom } = theme.input.sizes[$size];\n const containerHeight = height + marginTop + ($willShowMessage ? marginBottom : 0);\n\n return `\n width: ${$width ? $width : 'auto'}${typeof $width === 'number' ? 'px' : ''};\n ${$widthX ? `width: ${$widthX * theme.layout.gutter}px;` : ''}\n height: ${containerHeight}px;\n `;\n },\n);\n\ninterface IWrapperProps {\n $size: IBaseInputProps['size'];\n $disabled?: boolean;\n $renderAs: IBaseInputProps['renderAs'];\n $shape?: IBaseInputProps['shape'];\n $isTransparent?: boolean;\n}\n\nconst Wrapper = styled.div<IWrapperProps>(\n ({ theme, $size, $renderAs, $disabled, $shape, $isTransparent }) => {\n const { colors, input } = theme;\n const { height, marginTop, paddingLeft, paddingRight, borderRadius } = input.sizes[$size];\n const { borderColorName, backgroundColorName } = input.variants[$renderAs];\n\n const isBorderLessShape = $shape === 'borderLess';\n const isCurvedShape = $shape === 'curved';\n const defaultBorderRadius = isBorderLessShape ? 0 : borderRadius;\n\n const background = $isTransparent ? 'transparent' : colors[backgroundColorName ?? 'WHITE'];\n\n return `\n position: relative;\n display: flex;\n height: ${height}px;\n margin-top: ${marginTop}px;\n padding-left: ${isBorderLessShape ? 0 : paddingLeft}px;\n padding-right: ${isBorderLessShape ? 0 : paddingRight}px;\n padding-top: ${isCurvedShape ? 1 : 0}px;\n padding-bottom: ${isCurvedShape ? 1 : 0}px;\n ${\n isBorderLessShape\n ? `\n border: none;\n border-bottom: 1px solid ${colors[borderColorName[$disabled ? 'disabled' : 'inactive']]};\n `\n : `border: 1px solid ${\n colors[borderColorName[$disabled ? 'disabled' : isCurvedShape ? 'active' : 'inactive']]\n };`\n }\n border-radius: ${isCurvedShape ? 40 : defaultBorderRadius}px;\n transition: border-color 0.2s ease-in-out;\n \n background: ${background};\n \n &:focus-within {\n border-color: ${colors[borderColorName.active]};\n }\n \n &:hover {\n ${!$disabled ? `border-color: ${colors[borderColorName.active]};` : ''}\n }\n `;\n },\n);\n\nconst InputWrapper = styled.div`\n flex-grow: 1;\n`;\n\ninterface ISiblingWrapperProps {\n $inputRenderAs: IBaseInputProps['renderAs'];\n $size: IBaseInputProps['size'];\n $siblingPosition: NonNullable<IBaseInputProps['siblingPosition']>;\n $disabled?: boolean;\n}\n\nconst SiblingWrapper = styled.div<ISiblingWrapperProps>(\n ({ theme, $inputRenderAs, $disabled, $size, $siblingPosition }) => {\n const { colors, input } = theme;\n const { iconPadding } = input.sizes[$size];\n const { labelColorName } = input.variants[$inputRenderAs];\n\n return `\n order: ${$siblingPosition === 'left' ? -1 : 1};\n padding-${$siblingPosition === 'left' ? 'right' : 'left'}: ${iconPadding}px;\n align-self: center;\n color: ${colors[labelColorName[$disabled ? 'disabled' : 'inactive']]};\n\n ${Wrapper}:focus-within & {\n color: ${colors[labelColorName.active]};\n }\n \n ${Wrapper}:hover & {\n ${!$disabled ? `color: ${colors[labelColorName.active]};` : ''}\n }\n `;\n },\n);\n\ninterface ILabelProps {\n $size: IBaseInputProps['size'];\n $inputRenderAs: IBaseInputProps['renderAs'];\n $stickyLabel: IBaseInputProps['stickyLabel'];\n $disabled?: boolean;\n $shape?: IBaseInputProps['shape'];\n $isTransparent: IBaseInputProps['isTransparent'];\n}\n\nconst Label = styled(Text)<ILabelProps>(({\n theme,\n $size,\n $inputRenderAs,\n $stickyLabel,\n $disabled,\n $shape,\n $isTransparent,\n}) => {\n const { colors, input, text, layout } = theme;\n const { gutter } = layout;\n const { height, paddingLeft } = input.sizes[$size];\n const { lineHeight } = text[input.sizes[$size].labelTextVariant];\n const { labelColorName, labelBackgroundColorName } = input.variants[$inputRenderAs];\n const topPosition = height / 2 - lineHeight / 2 - 1;\n const topPositionWhenActive = -topPosition - lineHeight / 2 - 1;\n\n const isBorderLessShape = $shape === 'borderLess';\n\n const backgroundColor = $isTransparent\n ? 'transparent'\n : colors[labelBackgroundColorName ?? 'WHITE'];\n\n return `\n position: absolute;\n top: ${topPosition}px;\n left: ${(isBorderLessShape ? 0 : paddingLeft) - gutter * 0.375}px;\n padding: 0 ${gutter * 0.375}px;\n background-color: ${backgroundColor};\n color: ${colors[labelColorName[$disabled ? 'disabled' : 'inactive']]};\n pointer-events: none;\n transform-origin: left;\n transform: translateY(${$stickyLabel ? topPositionWhenActive : 0}px) scale(${\n $stickyLabel ? 0.75 : 1\n });\n transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;\n\n ${Wrapper}:focus-within & {\n color: ${colors[labelColorName.active]};\n transform: translateY(${topPositionWhenActive}px) scale(0.75);\n }\n \n ${Wrapper}:hover & {\n ${!$disabled ? `color: ${colors[labelColorName.active]};` : ''}\n }\n\n & span {\n color: ${colors.RED};\n margin-left: 2px;\n }\n `;\n});\n\ninterface IErrorProps {\n $inputRenderAs: IBaseInputProps['renderAs'];\n}\n\nconst Error = styled(Text)<IErrorProps>(({ theme: { input, colors }, $inputRenderAs }) => {\n const color = colors[input.variants[$inputRenderAs]?.errorMessageColorName ?? 'RED'];\n\n return `\n position: absolute;\n bottom: -2px;\n transform: translateY(calc(100%));\n color: ${color};\n`;\n});\n\nconst HelperText = styled(Text)<IErrorProps>(({ theme: { input, colors }, $inputRenderAs }) => {\n const color = colors[input.variants[$inputRenderAs]?.messageColorName.active];\n\n return `\n position: absolute;\n bottom: -2px;\n transform: translateY(calc(100%));\n color: ${color};\n`;\n});\n\nexport { Container, Wrapper, InputWrapper, SiblingWrapper, Label, Error, HelperText };\n"],"names":["Container","styled","theme","$size","$willShowMessage","$width","$widthX","height","marginTop","marginBottom","containerHeight","Wrapper","$renderAs","$disabled","$shape","$isTransparent","colors","input","paddingLeft","paddingRight","borderRadius","borderColorName","backgroundColorName","isBorderLessShape","isCurvedShape","defaultBorderRadius","background","InputWrapper","SiblingWrapper","$inputRenderAs","$siblingPosition","iconPadding","labelColorName","Label","Text","$stickyLabel","text","layout","gutter","lineHeight","labelBackgroundColorName","topPosition","topPositionWhenActive","backgroundColor","Error","_a","HelperText"],"mappings":";;AAaA,MAAMA,IAAYC,EAAO;AAAA,EACvB,CAAC,EAAE,OAAAC,GAAO,OAAAC,GAAO,kBAAAC,GAAkB,QAAAC,GAAQ,SAAAC,QAAc;AACjD,UAAA,EAAE,QAAAC,GAAQ,WAAAC,GAAW,cAAAC,EAAA,IAAiBP,EAAM,MAAM,MAAMC,CAAK,GAC7DO,IAAkBH,IAASC,KAAaJ,IAAmBK,IAAe;AAEzE,WAAA;AAAA,eACIJ,KAAkB,MAAM,GAAG,OAAOA,KAAW,WAAW,OAAO,EAAE;AAAA,QACxEC,IAAU,UAAUA,IAAUJ,EAAM,OAAO,MAAM,QAAQ,EAAE;AAAA,gBACnDQ,CAAe;AAAA;AAAA,EAE7B;AACF,GAUMC,IAAUV,EAAO;AAAA,EACrB,CAAC,EAAE,OAAAC,GAAO,OAAAC,GAAO,WAAAS,GAAW,WAAAC,GAAW,QAAAC,GAAQ,gBAAAC,QAAqB;AAC5D,UAAA,EAAE,QAAAC,GAAQ,OAAAC,EAAU,IAAAf,GACpB,EAAE,QAAAK,GAAQ,WAAAC,GAAW,aAAAU,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AwB,CAAC,aAC9DP,IAAe,OAAO,CACxB;AAAA;AAAA;AAAA,MAGExB,CAAO;AAAA,eACEK,EAAOgB,EAAe,MAAM,CAAC;AAAA,8BACdU,CAAqB;AAAA;AAAA;AAAA,MAG7C/B,CAAO;AAAA,QACJE,IAAyD,KAA7C,UAAUG,EAAOgB,EAAe,MAAM,CAAC,GAAQ;AAAA;AAAA;AAAA;AAAA,eAIrDhB,EAAO,GAAG;AAAA;AAAA;AAAA;AAIzB,CAAC,GAMK4B,IAAQ3C,EAAOiC,CAAI,EAAe,CAAC,EAAE,OAAO,EAAE,OAAAjB,GAAO,QAAAD,KAAU,gBAAAa,QAAqB;;AAGjF,SAAA;AAAA;AAAA;AAAA;AAAA,aAFOb,IAAO6B,IAAA5B,EAAM,SAASY,CAAc,MAA7B,gBAAAgB,EAAgC,0BAAyB,KAAK,CAMnE;AAAA;AAElB,CAAC,GAEKC,IAAa7C,EAAOiC,CAAI,EAAe,CAAC,EAAE,OAAO,EAAE,OAAAjB,GAAO,QAAAD,KAAU,gBAAAa,QAAqB;;AAGtF,SAAA;AAAA;AAAA;AAAA;AAAA,aAFOb,GAAO6B,IAAA5B,EAAM,SAASY,CAAc,MAA7B,gBAAAgB,EAAgC,iBAAiB,MAAM,CAM5D;AAAA;AAElB,CAAC;"}
@@ -1,60 +1,62 @@
1
- import { jsx as s, jsxs as a } from "react/jsx-runtime";
2
- import { useTheme as z } from "styled-components";
3
- import { Container as A, Wrapper as f, InputWrapper as L, Error as T, SiblingWrapper as x, Label as y } from "./base-input-styled.js";
4
- const j = (p) => {
1
+ import { jsx as r, jsxs as l } from "react/jsx-runtime";
2
+ import { useTheme as g } from "styled-components";
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) => {
5
5
  const {
6
- label: t,
6
+ label: a,
7
7
  stickyLabel: $,
8
- renderAs: i,
9
- width: h,
10
- widthX: b,
11
- disabled: r,
12
- willShowMessage: c,
13
- inputElement: m,
14
- siblingElement: l,
15
- siblingPosition: u,
16
- size: e,
17
- errorMessage: d,
18
- mandatory: w,
19
- shape: n,
20
- isTransparent: o = !1
21
- } = p, { input: g } = z();
22
- return /* @__PURE__ */ s(A, { $width: h, $widthX: b, $size: e, $willShowMessage: c, children: /* @__PURE__ */ a(
23
- f,
8
+ renderAs: e,
9
+ width: b,
10
+ widthX: c,
11
+ disabled: i,
12
+ willShowMessage: u,
13
+ inputElement: w,
14
+ siblingElement: d,
15
+ siblingPosition: m,
16
+ size: s,
17
+ errorMessage: n,
18
+ mandatory: A,
19
+ shape: t,
20
+ isTransparent: p = !1,
21
+ helperText: o
22
+ } = h, { input: T } = g();
23
+ return /* @__PURE__ */ r(x, { $width: b, $widthX: c, $size: s, $willShowMessage: u, children: /* @__PURE__ */ l(
24
+ z,
24
25
  {
25
- $renderAs: i,
26
- $size: e,
27
- $disabled: r,
28
- $shape: n,
29
- $isTransparent: o,
26
+ $renderAs: e,
27
+ $size: s,
28
+ $disabled: i,
29
+ $shape: t,
30
+ $isTransparent: p,
30
31
  children: [
31
- /* @__PURE__ */ a(L, { children: [
32
- m,
33
- d && /* @__PURE__ */ s(T, { $renderAs: "body3", children: d })
32
+ /* @__PURE__ */ l(f, { children: [
33
+ w,
34
+ n && /* @__PURE__ */ r(L, { $renderAs: "body3", $inputRenderAs: e, children: n }),
35
+ o && !n && /* @__PURE__ */ r(y, { $renderAs: "ub3", $inputRenderAs: e, children: o })
34
36
  ] }),
35
- l ? /* @__PURE__ */ s(
36
- x,
37
+ d ? /* @__PURE__ */ r(
38
+ R,
37
39
  {
38
- $inputRenderAs: i,
39
- $disabled: r,
40
- $size: e,
41
- $siblingPosition: u ?? "right",
42
- children: l
40
+ $inputRenderAs: e,
41
+ $disabled: i,
42
+ $size: s,
43
+ $siblingPosition: m ?? "right",
44
+ children: d
43
45
  }
44
46
  ) : void 0,
45
- t && n !== "curved" && /* @__PURE__ */ a(
46
- y,
47
+ a && t !== "curved" && /* @__PURE__ */ l(
48
+ E,
47
49
  {
48
- $renderAs: g.sizes[e].labelTextVariant,
49
- $inputRenderAs: i,
50
- $size: e,
50
+ $renderAs: T.sizes[s].labelTextVariant,
51
+ $inputRenderAs: e,
52
+ $size: s,
51
53
  $stickyLabel: $,
52
- $disabled: r,
53
- $shape: n,
54
- $isTransparent: o,
54
+ $disabled: i,
55
+ $shape: t,
56
+ $isTransparent: p,
55
57
  children: [
56
- t,
57
- w && /* @__PURE__ */ s("span", { children: "*" })
58
+ a,
59
+ A && /* @__PURE__ */ r("span", { children: "*" })
58
60
  ]
59
61
  }
60
62
  )
@@ -63,6 +65,6 @@ const j = (p) => {
63
65
  ) });
64
66
  };
65
67
  export {
66
- j as default
68
+ k as default
67
69
  };
68
70
  //# sourceMappingURL=base-input.js.map
@@ -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} 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 } = props;\n const { input } = useTheme();\n const showLabel = label && shape !== 'curved';\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 && <Error $renderAs=\"body3\">{errorMessage}</Error>}\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","input","useTheme","jsx","Container","jsxs","Wrapper","InputWrapper","Error","SiblingWrapper","Label"],"mappings":";;;AAcA,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,EACd,IAAAf,GACE,EAAE,OAAAgB,MAAUC;AAIhB,SAAA,gBAAAC,EAACC,KAAU,QAAQf,GAAO,SAASC,GAAQ,OAAOM,GAAM,kBAAkBJ,GACxE,UAAA,gBAAAa;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWlB;AAAA,MACX,OAAOQ;AAAA,MACP,WAAWL;AAAA,MACX,QAAQQ;AAAA,MACR,gBAAgBC;AAAA,MAEhB,UAAA;AAAA,QAAA,gBAAAK,EAACE,GACE,EAAA,UAAA;AAAA,UAAAd;AAAA,UACAI,KAAgB,gBAAAM,EAACK,GAAM,EAAA,WAAU,SAAS,UAAaX,GAAA;AAAA,QAAA,GAC1D;AAAA,QACCH,IACC,gBAAAS;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,gBAAgBrB;AAAA,YAChB,WAAWG;AAAA,YACX,OAAOK;AAAA,YACP,kBAAkBD,KAAmB;AAAA,YAEpC,UAAAD;AAAA,UAAA;AAAA,QAED,IAAA;AAAA,QAxBQR,KAASa,MAAU,YA0B7B,gBAAAM;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,WAAWT,EAAM,MAAML,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,gBAAAK,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"],"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;AAA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