@cuemath/leap 3.5.41 → 3.5.42

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 (52) hide show
  1. package/dist/assets/illustrations/illustrations.js +2 -1
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/apple-icon2.js +17 -0
  4. package/dist/assets/line-icons/icons/apple-icon2.js.map +1 -0
  5. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +14 -12
  6. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -1
  7. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +45 -43
  8. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -1
  9. package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js +14 -14
  10. package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js.map +1 -1
  11. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +16 -15
  12. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  13. package/dist/features/auth/comps/otp-input/otp-input-styled.js +10 -12
  14. package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +1 -1
  15. package/dist/features/auth/comps/otp-input/otp-input.js +31 -20
  16. package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -1
  17. package/dist/features/auth/comps/pill-button/pill-button-styled.js +22 -19
  18. package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +1 -1
  19. package/dist/features/auth/comps/pill-button/pill-button.js +42 -39
  20. package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -1
  21. package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +6 -6
  22. package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +1 -1
  23. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +42 -40
  24. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +1 -1
  25. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js +19 -17
  26. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js.map +1 -1
  27. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js +34 -29
  28. package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js.map +1 -1
  29. package/dist/features/auth/pla-signup/pla-analytics-events.js +18 -20
  30. package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
  31. package/dist/features/auth/pla-signup/signup-header/signup-header.js +18 -31
  32. package/dist/features/auth/pla-signup/signup-header/signup-header.js.map +1 -1
  33. package/dist/features/auth/pla-signup/signup-options/signup-options.js +56 -46
  34. package/dist/features/auth/pla-signup/signup-options/signup-options.js.map +1 -1
  35. package/dist/features/parent-dashboard/comps/compact-header/compact-header.js +19 -15
  36. package/dist/features/parent-dashboard/comps/compact-header/compact-header.js.map +1 -1
  37. package/dist/features/trial-session/trial-session-constants.js +9 -8
  38. package/dist/features/trial-session/trial-session-constants.js.map +1 -1
  39. package/dist/features/ui/tabs/tab-tem/tab-item.js +25 -22
  40. package/dist/features/ui/tabs/tab-tem/tab-item.js.map +1 -1
  41. package/dist/features/ui/tabs/tabs-styled.js +14 -18
  42. package/dist/features/ui/tabs/tabs-styled.js.map +1 -1
  43. package/dist/features/ui/tabs/tabs.js +17 -13
  44. package/dist/features/ui/tabs/tabs.js.map +1 -1
  45. package/dist/index.d.ts +33 -22
  46. package/dist/index.js +247 -247
  47. package/dist/static/stripe-blurple.7f233048.svg +1 -0
  48. package/dist/static/trustpilot-black.3878bb6f.svg +1 -0
  49. package/package.json +1 -1
  50. package/dist/assets/line-icons/icons/apple-icon-white.js +0 -42
  51. package/dist/assets/line-icons/icons/apple-icon-white.js.map +0 -1
  52. package/dist/static/stripe-blurple.6abf422f.svg +0 -1
@@ -1,29 +1,39 @@
1
- import { jsxs as I, jsx as f } from "react/jsx-runtime";
2
- import { memo as w, useRef as y, useCallback as a } from "react";
3
- import { LOTTIE as D } from "../../../../assets/lottie/lottie.js";
4
- import E from "../../../ui/lottie-animation/lottie-animation.js";
5
- import { Wrapper as T, InputBox as $ } from "./otp-input-styled.js";
6
- const j = ({ length: n = 4, value: e, onChange: c, error: m, isBusy: i = !1 }) => {
7
- const s = y([]), l = a(
1
+ import { jsxs as k, jsx as n } from "react/jsx-runtime";
2
+ import { memo as w, useRef as D, useCallback as c } from "react";
3
+ import { InputBox as L } from "./otp-input-styled.js";
4
+ import y from "../../../ui/layout/flex-view.js";
5
+ import E from "../../../ui/image/image.js";
6
+ import { ILLUSTRATIONS as R } from "../../../../assets/illustrations/illustrations.js";
7
+ import $ from "../../../ui/lottie-animation/lottie-animation.js";
8
+ import { LOTTIE as A } from "../../../../assets/lottie/lottie.js";
9
+ const O = ({
10
+ length: a = 4,
11
+ value: e,
12
+ onChange: m,
13
+ error: f,
14
+ isBusy: l = !1,
15
+ renderThemeAs: h = "dark"
16
+ }) => {
17
+ const i = h === "dark", s = D([]), I = c(
8
18
  (r, t) => {
9
19
  var u;
10
20
  const o = t.replace(/\D/g, "").slice(-1), p = e.split("");
11
- p[r] = o, c(p.join("")), o && r < n - 1 && ((u = s.current[r + 1]) == null || u.focus());
21
+ p[r] = o, m(p.join("")), o && r < a - 1 && ((u = s.current[r + 1]) == null || u.focus());
12
22
  },
13
- [n, c, e]
14
- ), g = a(
23
+ [a, m, e]
24
+ ), g = c(
15
25
  (r, t) => {
16
26
  var o;
17
27
  r.key === "Backspace" && !e[t] && t > 0 && ((o = s.current[t - 1]) == null || o.focus());
18
28
  },
19
29
  [e]
20
- ), h = a((r) => {
30
+ ), T = c((r) => {
21
31
  const t = r.target;
22
32
  t.value.length > 1 && (t.value = t.value.slice(-1));
23
33
  }, []);
24
- return /* @__PURE__ */ I(T, { $flexDirection: "row", $flexColumnGapX: 1, $alignItems: "center", children: [
25
- Array.from({ length: n }).map((r, t) => /* @__PURE__ */ f(
26
- $,
34
+ return /* @__PURE__ */ k(y, { $flexDirection: "row", $flexColumnGapX: 1, $alignItems: "center", children: [
35
+ Array.from({ length: a }).map((r, t) => /* @__PURE__ */ n(
36
+ L,
27
37
  {
28
38
  autoFocus: t === 0,
29
39
  type: "text",
@@ -31,21 +41,22 @@ const j = ({ length: n = 4, value: e, onChange: c, error: m, isBusy: i = !1 }) =
31
41
  pattern: "[0-9]*",
32
42
  maxLength: 1,
33
43
  value: e[t] || "",
34
- onChange: (o) => l(t, o.target.value),
35
- onInput: h,
44
+ onChange: (o) => I(t, o.target.value),
45
+ $isDarkTheme: i,
46
+ onInput: T,
36
47
  onFocus: (o) => o.target.select(),
37
48
  onKeyDown: (o) => g(o, t),
38
- $hasError: !!m,
49
+ $hasError: !!f,
39
50
  ref: (o) => {
40
51
  o && (s.current[t] = o);
41
52
  }
42
53
  },
43
54
  t
44
55
  )),
45
- i && /* @__PURE__ */ f(E, { src: D.SPINNER_WHITE, height: 24, width: 24 })
56
+ l && (i ? /* @__PURE__ */ n($, { src: A.SPINNER_WHITE, height: 24, width: 24 }) : /* @__PURE__ */ n(E, { src: R.LOADER, height: 40, width: 40, alt: "loader" }))
46
57
  ] });
47
- }, B = w(j);
58
+ }, P = w(O);
48
59
  export {
49
- B as default
60
+ P as default
50
61
  };
51
62
  //# sourceMappingURL=otp-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"otp-input.js","sources":["../../../../../src/features/auth/comps/otp-input/otp-input.tsx"],"sourcesContent":["import { useCallback, useRef, memo, type FC, type KeyboardEvent, type FormEvent } from 'react';\n\nimport { LOTTIE } from '../../../../assets/lottie/lottie';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport * as styled from './otp-input-styled';\nimport type { IOTPInputProps } from './otp-input-types';\n\nconst OTPInput: FC<IOTPInputProps> = ({ length = 4, value, onChange, error, isBusy = false }) => {\n const inputsRef = useRef<HTMLInputElement[]>([]);\n\n const handleChange = useCallback(\n (index: number, val: string) => {\n // Only allow single digit numbers\n const digit = val.replace(/\\D/g, '').slice(-1);\n\n const newValue = value.split('');\n\n newValue[index] = digit;\n onChange(newValue.join(''));\n\n if (digit && index < length - 1) {\n inputsRef.current[index + 1]?.focus();\n }\n },\n [length, onChange, value],\n );\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLInputElement>, index: number) => {\n if (e.key === 'Backspace' && !value[index] && index > 0) {\n inputsRef.current[index - 1]?.focus();\n }\n },\n [value],\n );\n\n const handleInput = useCallback((e: FormEvent<HTMLInputElement>) => {\n // Prevent more than 1 character\n const target = e.target as HTMLInputElement;\n\n if (target.value.length > 1) {\n target.value = target.value.slice(-1);\n }\n }, []);\n\n return (\n <styled.Wrapper $flexDirection=\"row\" $flexColumnGapX={1} $alignItems=\"center\">\n {Array.from({ length }).map((_, index) => (\n <styled.InputBox\n autoFocus={index === 0}\n key={index}\n type=\"text\"\n inputMode=\"numeric\"\n pattern=\"[0-9]*\"\n maxLength={1}\n value={value[index] || ''}\n onChange={e => handleChange(index, e.target.value)}\n onInput={handleInput}\n onFocus={e => e.target.select()}\n onKeyDown={e => handleKeyDown(e, index)}\n $hasError={!!error}\n ref={el => {\n if (el) inputsRef.current[index] = el;\n }}\n />\n ))}\n {isBusy && <LottieAnimation src={LOTTIE.SPINNER_WHITE} height={24} width={24} />}\n </styled.Wrapper>\n );\n};\n\nexport default memo(OTPInput);\n"],"names":["OTPInput","length","value","onChange","error","isBusy","inputsRef","useRef","handleChange","useCallback","index","val","digit","newValue","_a","handleKeyDown","e","handleInput","target","jsxs","styled.Wrapper","_","jsx","styled.InputBox","el","LottieAnimation","LOTTIE","otpInput","memo"],"mappings":";;;;;AAOA,MAAMA,IAA+B,CAAC,EAAE,QAAAC,IAAS,GAAG,OAAAC,GAAO,UAAAC,GAAU,OAAAC,GAAO,QAAAC,IAAS,SAAY;AACzF,QAAAC,IAAYC,EAA2B,CAAA,CAAE,GAEzCC,IAAeC;AAAA,IACnB,CAACC,GAAeC,MAAgB;;AAE9B,YAAMC,IAAQD,EAAI,QAAQ,OAA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AAA,QACb,KAAK,CAAMoB,MAAA;AACT,UAAIA,MAAIlB,EAAU,QAAQI,CAAK,IAAIc;AAAA,QACrC;AAAA,MAAA;AAAA,MAbKd;AAAA,IAAA,CAeR;AAAA,IACAL,uBAAWoB,GAAgB,EAAA,KAAKC,EAAO,eAAe,QAAQ,IAAI,OAAO,GAAI,CAAA;AAAA,EAChF,EAAA,CAAA;AAEJ,GAEeC,IAAAC,EAAK5B,CAAQ;"}
1
+ {"version":3,"file":"otp-input.js","sources":["../../../../../src/features/auth/comps/otp-input/otp-input.tsx"],"sourcesContent":["import { useCallback, useRef, memo, type FC, type KeyboardEvent, type FormEvent } from 'react';\n\nimport * as Styled from './otp-input-styled';\nimport type { IOTPInputProps } from './otp-input-types';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Image from '../../../ui/image/image';\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport { LOTTIE } from '../../../../assets/lottie/lottie';\n\nconst OTPInput: FC<IOTPInputProps> = ({\n length = 4,\n value,\n onChange,\n error,\n isBusy = false,\n renderThemeAs = 'dark',\n}) => {\n const isDarkTheme = renderThemeAs === 'dark';\n const inputsRef = useRef<HTMLInputElement[]>([]);\n\n const handleChange = useCallback(\n (index: number, val: string) => {\n // Only allow single digit numbers\n const digit = val.replace(/\\D/g, '').slice(-1);\n\n const newValue = value.split('');\n\n newValue[index] = digit;\n onChange(newValue.join(''));\n\n if (digit && index < length - 1) {\n inputsRef.current[index + 1]?.focus();\n }\n },\n [length, onChange, value],\n );\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLInputElement>, index: number) => {\n if (e.key === 'Backspace' && !value[index] && index > 0) {\n inputsRef.current[index - 1]?.focus();\n }\n },\n [value],\n );\n\n const handleInput = useCallback((e: FormEvent<HTMLInputElement>) => {\n // Prevent more than 1 character\n const target = e.target as HTMLInputElement;\n\n if (target.value.length > 1) {\n target.value = target.value.slice(-1);\n }\n }, []);\n\n return (\n <FlexView $flexDirection=\"row\" $flexColumnGapX={1} $alignItems=\"center\">\n {Array.from({ length }).map((_, index) => (\n <Styled.InputBox\n autoFocus={index === 0}\n key={index}\n type=\"text\"\n inputMode=\"numeric\"\n pattern=\"[0-9]*\"\n maxLength={1}\n value={value[index] || ''}\n onChange={e => handleChange(index, e.target.value)}\n $isDarkTheme={isDarkTheme}\n onInput={handleInput}\n onFocus={e => e.target.select()}\n onKeyDown={e => handleKeyDown(e, index)}\n $hasError={!!error}\n ref={el => {\n if (el) inputsRef.current[index] = el;\n }}\n />\n ))}\n {isBusy &&\n (isDarkTheme ? (\n <LottieAnimation src={LOTTIE.SPINNER_WHITE} height={24} width={24} />\n ) : (\n <Image src={ILLUSTRATIONS.LOADER} height={40} width={40} alt=\"loader\" />\n ))}\n </FlexView>\n );\n};\n\nexport default memo(OTPInput);\n"],"names":["OTPInput","length","value","onChange","error","isBusy","renderThemeAs","isDarkTheme","inputsRef","useRef","handleChange","useCallback","index","val","digit","newValue","_a","handleKeyDown","e","handleInput","target","FlexView","_","jsx","Styled.InputBox","el","LottieAnimation","LOTTIE","Image","ILLUSTRATIONS","otpInput","memo"],"mappings":";;;;;;;;AAUA,MAAMA,IAA+B,CAAC;AAAA,EACpC,QAAAC,IAAS;AAAA,EACT,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,eAAAC,IAAgB;AAClB,MAAM;AACJ,QAAMC,IAAcD,MAAkB,QAChCE,IAAYC,EAA2B,CAAA,CAAE,GAEzCC,IAAeC;AAAA,IACnB,CAACC,GAAeC,MAAgB;;AAE9B,YAAMC,IAAQD,EAAI,QAAQ,OAAO,EAAE,EAAE,MAAM,EAAE,GAEvCE,IAAWb,EAAM,MAAM,EAAE;AAE/B,MAAAa,EAASH,CAAK,IAAIE,GACTX,EAAAY,EAAS,KAAK,EAAE,CAAC,GAEtBD,KAASF,IAAQX,IAAS,OAC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AAAgB,EAAAG,GAAA,EAAgB,KAAKC,EAAO,eAAe,QAAQ,IAAI,OAAO,GAAI,CAAA,IAElE,gBAAAJ,EAAAK,GAAA,EAAM,KAAKC,EAAc,QAAQ,QAAQ,IAAI,OAAO,IAAI,KAAI,SAAS,CAAA;AAAA,EAE5E,EAAA,CAAA;AAEJ,GAEeC,IAAAC,EAAK/B,CAAQ;"}
@@ -1,31 +1,31 @@
1
- import l, { css as p } from "styled-components";
2
- import $ from "../../../ui/layout/flex-view.js";
3
- import u from "../../../ui/text/text.js";
4
- const g = l.button`
5
- ${({ selected: o, disabled: r, width: t, height: n, borderColor: e, theme: i, isTransparent: s }) => {
6
- const c = r ? i.colors.WHITE_T_10 : o ? i.colors.WHITE_1 : s ? i.colors.TRANSPARENT : i.colors.BLACK_1, a = r ? i.colors.WHITE_T_15 : e;
1
+ import e, { css as p } from "styled-components";
2
+ import u from "../../../ui/layout/flex-view.js";
3
+ import $ from "../../../ui/text/text.js";
4
+ const d = e.button`
5
+ ${({ selected: o, disabled: t, width: l, height: i, borderColor: s, theme: r, isTransparent: c, isDarkTheme: n }) => {
6
+ const _ = t ? r.colors[n ? "WHITE_T_10" : "REAL_BLACK_10"] : o ? r.colors[n ? "WHITE_1" : "BLACK_1"] : c ? r.colors.TRANSPARENT : r.colors[n ? "BLACK_1" : "WHITE_1"], a = t ? r.colors[n ? "WHITE_T_15" : "REAL_BLACK_15"] : s;
7
7
  return p`
8
8
  position: relative;
9
9
  display: inline-flex;
10
10
  align-items: center;
11
11
  justify-content: center;
12
- cursor: ${r ? "not-allowed" : "pointer"};
12
+ cursor: ${t ? "not-allowed" : "pointer"};
13
13
  transition: all 0.3s ease;
14
14
  padding: 7.5px 16px;
15
15
  border-radius: 40px;
16
16
  border: 1px solid ${a};
17
- width: ${t ? `${t}` : "auto"}${typeof t == "number" ? "px" : ""};
18
- height: ${n ? `${n}px` : "auto"};
17
+ width: ${l ? `${l}` : "auto"}${typeof l == "number" ? "px" : ""};
18
+ height: ${i ? `${i}px` : "auto"};
19
19
  min-height: 37px;
20
- background-color: ${c};
20
+ background-color: ${_};
21
21
  &:hover {
22
- background-color: ${!o && !r ? i.colors.WHITE_T_10 : void 0};
22
+ background-color: ${!o && !t ? r.colors[n ? "WHITE_T_10" : "REAL_BLACK_10"] : void 0};
23
23
  }
24
24
  `;
25
25
  }}
26
- `, d = l($)`
26
+ `, E = e(u)`
27
27
  visibility: ${({ $showLottie: o }) => o ? "visible" : "hidden"};
28
- `, b = l(u)`
28
+ `, L = e($)`
29
29
  transition:
30
30
  color 0.3s ease,
31
31
  left 0.3s ease,
@@ -38,13 +38,16 @@ const g = l.button`
38
38
  left: ${o ? "0" : "-10px"};
39
39
  `};
40
40
 
41
- ${({ selected: o, disabled: r, theme: t, textColor: n }) => `
42
- color: ${r ? t.colors.WHITE_T_38 : o ? t.colors.BLACK_1 : n};
43
- `};
41
+ ${({ selected: o, disabled: t, theme: l, textColor: i, isDarkTheme: s }) => {
42
+ const r = l.colors[s ? "WHITE_T_38" : "BLACK_T_38"], c = l.colors[s ? "BLACK_1" : "WHITE_1"];
43
+ return p`
44
+ color: ${t ? r : o ? c : i};
45
+ `;
46
+ }};
44
47
  `;
45
48
  export {
46
- d as IconWrapper,
47
- b as Label,
48
- g as Wrapper
49
+ E as IconWrapper,
50
+ L as Label,
51
+ d as Wrapper
49
52
  };
50
53
  //# sourceMappingURL=pill-button-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pill-button-styled.js","sources":["../../../../../src/features/auth/comps/pill-button/pill-button-styled.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\nexport const Wrapper = styled.button<{\n selected: boolean;\n disabled: boolean;\n width?: number | string;\n height?: number;\n borderColor?: string;\n isTransparent?: boolean;\n}>`\n ${({ selected, disabled, width, height, borderColor, theme, isTransparent }) => {\n const getDefaultBgColor = () => {\n if (disabled) return theme.colors.WHITE_T_10;\n\n if (selected) return theme.colors.WHITE_1;\n\n if (isTransparent) return theme.colors.TRANSPARENT;\n\n return theme.colors.BLACK_1;\n };\n\n const defaultBgColor = getDefaultBgColor();\n\n const borderColorVal = disabled ? theme.colors.WHITE_T_15 : borderColor;\n\n return css`\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: ${disabled ? 'not-allowed' : 'pointer'};\n transition: all 0.3s ease;\n padding: 7.5px 16px;\n border-radius: 40px;\n border: 1px solid ${borderColorVal};\n width: ${width ? `${width}` : 'auto'}${typeof width === 'number' ? 'px' : ''};\n height: ${height ? `${height}px` : 'auto'};\n min-height: 37px;\n background-color: ${defaultBgColor};\n &:hover {\n background-color: ${!selected && !disabled ? theme.colors.WHITE_T_10 : undefined};\n }\n `;\n }}\n`;\n\nexport const IconWrapper = styled(FlexView)<{\n $showLottie: boolean;\n}>`\n visibility: ${({ $showLottie }) => ($showLottie ? 'visible' : 'hidden')};\n`;\n\nexport const Label = styled(Text)<{\n selected: boolean;\n disabled: boolean;\n shouldOffsetLabel: boolean;\n textColor: string;\n isVisible: boolean;\n width?: string;\n}>`\n transition:\n color 0.3s ease,\n left 0.3s ease,\n opacity 0.8s ease;\n position: relative;\n ${({ width }) => width && `min-width: ${width};`}\n opacity: ${({ isVisible }) => (isVisible ? 1 : 0)};\n\n ${({ shouldOffsetLabel }) => `\n left: ${shouldOffsetLabel ? '0' : '-10px'};\n `};\n\n ${({ selected, disabled, theme, textColor }) => `\n color: ${disabled ? theme.colors.WHITE_T_38 : selected ? theme.colors.BLACK_1 : textColor};\n `};\n`;\n"],"names":["Wrapper","styled","selected","disabled","width","height","borderColor","theme","isTransparent","defaultBgColor","borderColorVal","css","IconWrapper","FlexView","$showLottie","Label","Text","isVisible","shouldOffsetLabel","textColor"],"mappings":";;;AAKO,MAAMA,IAAUC,EAAO;AAAA,IAQ1B,CAAC,EAAE,UAAAC,GAAU,UAAAC,GAAU,OAAAC,GAAO,QAAAC,GAAQ,aAAAC,GAAa,OAAAC,GAAO,eAAAC,QAAoB;AAW9E,QAAMC,IATAN,IAAiBI,EAAM,OAAO,aAE9BL,IAAiBK,EAAM,OAAO,UAE9BC,IAAsBD,EAAM,OAAO,cAEhCA,EAAM,OAAO,SAKhBG,IAAiBP,IAAWI,EAAM,OAAO,aAAaD;AAErD,SAAAK;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKKR,IAAW,gBAAgB,SAAS;AAAA;AAAA;AAAA;AAAA,0BAI1BO,CAAc;AAAA,eACzBN,IAAQ,GAAGA,CAAK,KAAK,MAAM,GAAG,OAAOA,KAAU,WAAW,OAAO,EAAE;AAAA,gBAClEC,IAAS,GAAGA,CAAM,OAAO,MAAM;AAAA;AAAA,0BAErBI,CAAc;AAAA;AAAA,4BAEZ,CAACP,KAAY,CAACC,IAAWI,EAAM,OAAO,aAAa,MAAS;AAAA;AAAA;AAGtF,CAAC;AAAA,GAGUK,IAAcX,EAAOY,CAAQ;AAAA,gBAG1B,CAAC,EAAE,aAAAC,EAAA,MAAmBA,IAAc,YAAY,QAAS;AAAA,GAG5DC,IAAQd,EAAOe,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAa5B,CAAC,EAAE,OAAAZ,QAAYA,KAAS,cAAcA,CAAK,GAAG;AAAA,aACrC,CAAC,EAAE,WAAAa,EAAA,MAAiBA,IAAY,IAAI,CAAE;AAAA;AAAA,IAE/C,CAAC,EAAE,mBAAAC,EAAA,MAAwB;AAAA,YACnBA,IAAoB,MAAM,OAAO;AAAA,GAC1C;AAAA;AAAA,IAEC,CAAC,EAAE,UAAAhB,GAAU,UAAAC,GAAU,OAAAI,GAAO,WAAAY,EAAgB,MAAA;AAAA,aACrChB,IAAWI,EAAM,OAAO,aAAaL,IAAWK,EAAM,OAAO,UAAUY,CAAS;AAAA,GAC1F;AAAA;"}
1
+ {"version":3,"file":"pill-button-styled.js","sources":["../../../../../src/features/auth/comps/pill-button/pill-button-styled.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\nexport const Wrapper = styled.button<{\n selected: boolean;\n disabled: boolean;\n width?: number | string;\n height?: number;\n borderColor?: string;\n isTransparent?: boolean;\n isDarkTheme?: boolean;\n}>`\n ${({ selected, disabled, width, height, borderColor, theme, isTransparent, isDarkTheme }) => {\n const getDefaultBgColor = () => {\n if (disabled) return theme.colors[isDarkTheme ? 'WHITE_T_10' : 'REAL_BLACK_10'];\n\n if (selected) return theme.colors[isDarkTheme ? 'WHITE_1' : 'BLACK_1'];\n\n if (isTransparent) return theme.colors.TRANSPARENT;\n\n return theme.colors[isDarkTheme ? 'BLACK_1' : 'WHITE_1'];\n };\n\n const defaultBgColor = getDefaultBgColor();\n\n const borderColorVal = disabled\n ? theme.colors[isDarkTheme ? 'WHITE_T_15' : 'REAL_BLACK_15']\n : borderColor;\n\n return css`\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: ${disabled ? 'not-allowed' : 'pointer'};\n transition: all 0.3s ease;\n padding: 7.5px 16px;\n border-radius: 40px;\n border: 1px solid ${borderColorVal};\n width: ${width ? `${width}` : 'auto'}${typeof width === 'number' ? 'px' : ''};\n height: ${height ? `${height}px` : 'auto'};\n min-height: 37px;\n background-color: ${defaultBgColor};\n &:hover {\n background-color: ${!selected && !disabled\n ? theme.colors[isDarkTheme ? 'WHITE_T_10' : 'REAL_BLACK_10']\n : undefined};\n }\n `;\n }}\n`;\n\nexport const IconWrapper = styled(FlexView)<{\n $showLottie: boolean;\n}>`\n visibility: ${({ $showLottie }) => ($showLottie ? 'visible' : 'hidden')};\n`;\n\nexport const Label = styled(Text)<{\n selected: boolean;\n disabled: boolean;\n shouldOffsetLabel: boolean;\n textColor: string;\n isVisible: boolean;\n width?: string;\n isDarkTheme?: boolean;\n}>`\n transition:\n color 0.3s ease,\n left 0.3s ease,\n opacity 0.8s ease;\n position: relative;\n ${({ width }) => width && `min-width: ${width};`}\n opacity: ${({ isVisible }) => (isVisible ? 1 : 0)};\n\n ${({ shouldOffsetLabel }) => `\n left: ${shouldOffsetLabel ? '0' : '-10px'};\n `};\n\n ${({ selected, disabled, theme, textColor, isDarkTheme }) => {\n const disabledColor = theme.colors[isDarkTheme ? 'WHITE_T_38' : 'BLACK_T_38'];\n const selectedColor = theme.colors[isDarkTheme ? 'BLACK_1' : 'WHITE_1'];\n\n return css`\n color: ${disabled ? disabledColor : selected ? selectedColor : textColor};\n `;\n }};\n`;\n"],"names":["Wrapper","styled","selected","disabled","width","height","borderColor","theme","isTransparent","isDarkTheme","defaultBgColor","borderColorVal","css","IconWrapper","FlexView","$showLottie","Label","Text","isVisible","shouldOffsetLabel","textColor","disabledColor","selectedColor"],"mappings":";;;AAKO,MAAMA,IAAUC,EAAO;AAAA,IAS1B,CAAC,EAAE,UAAAC,GAAU,UAAAC,GAAU,OAAAC,GAAO,QAAAC,GAAQ,aAAAC,GAAa,OAAAC,GAAO,eAAAC,GAAe,aAAAC,QAAkB;AAW3F,QAAMC,IATAP,IAAiBI,EAAM,OAAOE,IAAc,eAAe,eAAe,IAE1EP,IAAiBK,EAAM,OAAOE,IAAc,YAAY,SAAS,IAEjED,IAAsBD,EAAM,OAAO,cAEhCA,EAAM,OAAOE,IAAc,YAAY,SAAS,GAKnDE,IAAiBR,IACnBI,EAAM,OAAOE,IAAc,eAAe,eAAe,IACzDH;AAEG,SAAAM;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKKT,IAAW,gBAAgB,SAAS;AAAA;AAAA;AAAA;AAAA,0BAI1BQ,CAAc;AAAA,eACzBP,IAAQ,GAAGA,CAAK,KAAK,MAAM,GAAG,OAAOA,KAAU,WAAW,OAAO,EAAE;AAAA,gBAClEC,IAAS,GAAGA,CAAM,OAAO,MAAM;AAAA;AAAA,0BAErBK,CAAc;AAAA;AAAA,4BAEZ,CAACR,KAAY,CAACC,IAC9BI,EAAM,OAAOE,IAAc,eAAe,eAAe,IACzD,MAAS;AAAA;AAAA;AAGnB,CAAC;AAAA,GAGUI,IAAcZ,EAAOa,CAAQ;AAAA,gBAG1B,CAAC,EAAE,aAAAC,EAAA,MAAmBA,IAAc,YAAY,QAAS;AAAA,GAG5DC,IAAQf,EAAOgB,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAc5B,CAAC,EAAE,OAAAb,QAAYA,KAAS,cAAcA,CAAK,GAAG;AAAA,aACrC,CAAC,EAAE,WAAAc,EAAA,MAAiBA,IAAY,IAAI,CAAE;AAAA;AAAA,IAE/C,CAAC,EAAE,mBAAAC,EAAA,MAAwB;AAAA,YACnBA,IAAoB,MAAM,OAAO;AAAA,GAC1C;AAAA;AAAA,IAEC,CAAC,EAAE,UAAAjB,GAAU,UAAAC,GAAU,OAAAI,GAAO,WAAAa,GAAW,aAAAX,QAAkB;AAC3D,QAAMY,IAAgBd,EAAM,OAAOE,IAAc,eAAe,YAAY,GACtEa,IAAgBf,EAAM,OAAOE,IAAc,YAAY,SAAS;AAE/D,SAAAG;AAAA,eACIT,IAAWkB,IAAgBnB,IAAWoB,IAAgBF,CAAS;AAAA;AAE5E,CAAC;AAAA;"}
@@ -1,71 +1,74 @@
1
- import { jsx as r, jsxs as k } from "react/jsx-runtime";
2
- import { memo as y, useState as l, useCallback as c, useEffect as B } from "react";
3
- import { useTheme as O } from "styled-components";
4
- import S from "../../../ui/arrow-tooltip/arrow-tooltip.js";
5
- import V from "../../../ui/hooks/use-click-handler.js";
6
- import X from "../../../ui/layout/flex-view.js";
7
- import Y from "../../../ui/lottie-animation/lottie-animation.js";
8
- import { Wrapper as D, IconWrapper as F, Label as G } from "./pill-button-styled.js";
9
- const q = {
1
+ import { jsx as r, jsxs as O } from "react/jsx-runtime";
2
+ import { memo as S, useState as l, useCallback as a, useEffect as V } from "react";
3
+ import { useTheme as X } from "styled-components";
4
+ import D from "../../../ui/arrow-tooltip/arrow-tooltip.js";
5
+ import Y from "../../../ui/hooks/use-click-handler.js";
6
+ import F from "../../../ui/layout/flex-view.js";
7
+ import G from "../../../ui/lottie-animation/lottie-animation.js";
8
+ import { Wrapper as K, IconWrapper as q, Label as z } from "./pill-button-styled.js";
9
+ const J = {
10
10
  autoplay: !0,
11
11
  loop: !0,
12
12
  renderer: "canvas"
13
- }, z = ({
14
- id: a,
13
+ }, N = ({
14
+ id: h,
15
15
  label: n,
16
16
  selected: t = !1,
17
17
  disabled: e = !1,
18
18
  animatedLabel: u = "",
19
19
  icon: s,
20
20
  onClick: f,
21
- tooltip: h,
21
+ tooltip: m,
22
22
  width: w,
23
- analyticsLabel: A,
24
- analyticsProps: C,
25
- isTransparent: $ = !1
23
+ analyticsLabel: $,
24
+ analyticsProps: g,
25
+ isTransparent: I = !1,
26
+ renderThemeAs: T = "dark"
26
27
  }) => {
27
- const [g, m] = l(!1), [o, I] = l(!1), [E, p] = l(!0), [L, T] = l(n), { colors: d } = O(), i = !!u, b = c(() => {
28
- f(a);
29
- }, [a, f]), { handleClick: H } = V({ label: n, analyticsLabel: A, analyticsProps: C }, b);
30
- B(() => {
28
+ const [b, p] = l(!1), [o, k] = l(!1), [E, d] = l(!0), [L, H] = l(n), { colors: x } = X(), i = !!u, c = T === "dark", W = a(() => {
29
+ f(h);
30
+ }, [h, f]), { handleClick: B } = Y({ label: n, analyticsLabel: $, analyticsProps: g }, W);
31
+ V(() => {
31
32
  if (!i || e) return;
32
- const _ = setInterval(() => {
33
- p(!1), setTimeout(() => {
34
- I((j) => !j), T(o ? n : u), p(!0);
33
+ const j = setInterval(() => {
34
+ d(!1), setTimeout(() => {
35
+ k((y) => !y), H(o ? n : u), d(!0);
35
36
  }, 400);
36
37
  }, 1500);
37
- return () => clearInterval(_);
38
+ return () => clearInterval(j);
38
39
  }, [u, e, o, n, i]);
39
- const W = c(() => m(!0), []), M = c(() => m(!1), []), x = !!s && !e && (i || t || g), P = d[o ? "YELLOW_4" : "WHITE_1"], R = d[o && !t ? "YELLOW_4" : "WHITE_1"], v = /* @__PURE__ */ r(
40
- D,
40
+ const M = a(() => p(!0), []), P = a(() => p(!1), []), C = !!s && !e && (i || t || b), A = c ? "WHITE_1" : "BLACK_1", R = x[o ? "YELLOW_4" : A], _ = x[o && !t ? "YELLOW_4" : A], v = /* @__PURE__ */ r(
41
+ K,
41
42
  {
42
43
  selected: t,
43
44
  disabled: e,
44
- onClick: H,
45
- onMouseEnter: W,
46
- onMouseLeave: M,
45
+ onClick: B,
46
+ onMouseEnter: M,
47
+ onMouseLeave: P,
47
48
  width: w,
48
- borderColor: P,
49
- isTransparent: $,
50
- children: /* @__PURE__ */ k(
51
- X,
49
+ borderColor: R,
50
+ isTransparent: I,
51
+ isDarkTheme: c,
52
+ children: /* @__PURE__ */ O(
53
+ F,
52
54
  {
53
55
  $flexDirection: "row",
54
56
  $alignItems: "center",
55
57
  $justifyContent: "center",
56
58
  $flexColumnGapX: 0.25,
57
59
  children: [
58
- s && /* @__PURE__ */ r(F, { $widthX: 1, $heightX: 1, $showLottie: x, children: /* @__PURE__ */ r(Y, { src: s, settings: q }) }),
60
+ s && /* @__PURE__ */ r(q, { $widthX: 1, $heightX: 1, $showLottie: C, children: /* @__PURE__ */ r(G, { src: s, settings: J }) }),
59
61
  /* @__PURE__ */ r(
60
- G,
62
+ z,
61
63
  {
62
- shouldOffsetLabel: x || !s,
64
+ shouldOffsetLabel: C || !s,
63
65
  selected: t,
64
66
  disabled: e,
65
67
  $renderAs: o ? t ? "ub3-bold" : "ub3" : t ? "ub2-bold" : "ub2",
66
- textColor: R,
68
+ textColor: _,
67
69
  isVisible: E,
68
70
  width: i ? "85px" : void 0,
71
+ isDarkTheme: c,
69
72
  children: L
70
73
  },
71
74
  L
@@ -75,9 +78,9 @@ const q = {
75
78
  )
76
79
  }
77
80
  );
78
- return e && h ? /* @__PURE__ */ r(S, { renderAs: "primary", tooltipItem: h, position: "top", children: v }) : v;
79
- }, st = y(z);
81
+ return e && m ? /* @__PURE__ */ r(D, { renderAs: "primary", tooltipItem: m, position: "top", children: v }) : v;
82
+ }, ut = S(N);
80
83
  export {
81
- st as default
84
+ ut as default
82
85
  };
83
86
  //# sourceMappingURL=pill-button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pill-button.js","sources":["../../../../../src/features/auth/comps/pill-button/pill-button.tsx"],"sourcesContent":["import { useCallback, useEffect, useState, type FC, memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport useClickHandler from '../../../ui/hooks/use-click-handler';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport * as Styled from './pill-button-styled';\nimport type { IPillButtonProps } from './pill-button-types';\n\nconst lottieSettings = {\n autoplay: true,\n loop: true,\n renderer: 'canvas',\n};\n\nconst PillButton: FC<IPillButtonProps> = ({\n id,\n label,\n selected = false,\n disabled = false,\n animatedLabel = '',\n icon,\n onClick,\n tooltip,\n width,\n analyticsLabel,\n analyticsProps,\n isTransparent = false,\n}) => {\n const [isHovered, setHovered] = useState(false);\n const [highlightPhase, setHighlightPhase] = useState(false);\n const [isVisible, setIsVisible] = useState(true);\n const [currentLabel, setCurrentLabel] = useState(label);\n const { colors } = useTheme();\n const shouldAnimate = !!animatedLabel;\n\n const handleSelect = useCallback(() => {\n onClick(id);\n }, [id, onClick]);\n\n const { handleClick } = useClickHandler({ label, analyticsLabel, analyticsProps }, handleSelect);\n\n useEffect(() => {\n if (!shouldAnimate || disabled) return;\n\n const interval = setInterval(() => {\n setIsVisible(false);\n\n setTimeout(() => {\n setHighlightPhase(prev => !prev);\n const newLabel = !highlightPhase ? animatedLabel : label;\n\n setCurrentLabel(newLabel);\n setIsVisible(true);\n }, 400);\n }, 1500);\n\n return () => clearInterval(interval);\n }, [animatedLabel, disabled, highlightPhase, label, shouldAnimate]);\n\n const handleMouseEnter = useCallback(() => setHovered(true), []);\n const handleMouseLeave = useCallback(() => setHovered(false), []);\n\n const showLottie = !!icon && !disabled && (shouldAnimate || selected || isHovered);\n\n const borderColor = colors[highlightPhase ? 'YELLOW_4' : 'WHITE_1'];\n const textColor = colors[highlightPhase && !selected ? 'YELLOW_4' : 'WHITE_1'];\n const defaultTextRenderAs = selected ? 'ub2-bold' : 'ub2';\n const textRenderAs = highlightPhase ? (selected ? 'ub3-bold' : 'ub3') : defaultTextRenderAs;\n\n const ButtonContent = (\n <Styled.Wrapper\n selected={selected}\n disabled={disabled}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n width={width}\n borderColor={borderColor}\n isTransparent={isTransparent}\n >\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $flexColumnGapX={0.25}\n >\n {icon && (\n <Styled.IconWrapper $widthX={1} $heightX={1} $showLottie={showLottie}>\n <LottieAnimation src={icon} settings={lottieSettings} />\n </Styled.IconWrapper>\n )}\n <Styled.Label\n key={currentLabel}\n shouldOffsetLabel={showLottie || !icon}\n selected={selected}\n disabled={disabled}\n $renderAs={textRenderAs}\n textColor={textColor}\n isVisible={isVisible}\n width={shouldAnimate ? '85px' : undefined}\n >\n {currentLabel}\n </Styled.Label>\n </FlexView>\n </Styled.Wrapper>\n );\n\n return disabled && tooltip ? (\n <ArrowTooltip renderAs=\"primary\" tooltipItem={tooltip} position=\"top\">\n {ButtonContent}\n </ArrowTooltip>\n ) : (\n ButtonContent\n );\n};\n\nexport default memo(PillButton);\n"],"names":["lottieSettings","PillButton","id","label","selected","disabled","animatedLabel","icon","onClick","tooltip","width","analyticsLabel","analyticsProps","isTransparent","isHovered","setHovered","useState","highlightPhase","setHighlightPhase","isVisible","setIsVisible","currentLabel","setCurrentLabel","colors","useTheme","shouldAnimate","handleSelect","useCallback","handleClick","useClickHandler","useEffect","interval","prev","handleMouseEnter","handleMouseLeave","showLottie","borderColor","textColor","ButtonContent","jsx","Styled.Wrapper","jsxs","FlexView","Styled.IconWrapper","LottieAnimation","Styled.Label","ArrowTooltip","PillButton$1","memo"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AEJ,GAEeS,KAAAC,EAAK/C,CAAU;"}
1
+ {"version":3,"file":"pill-button.js","sources":["../../../../../src/features/auth/comps/pill-button/pill-button.tsx"],"sourcesContent":["import { useCallback, useEffect, useState, type FC, memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport useClickHandler from '../../../ui/hooks/use-click-handler';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport * as Styled from './pill-button-styled';\nimport type { IPillButtonProps } from './pill-button-types';\n\nconst lottieSettings = {\n autoplay: true,\n loop: true,\n renderer: 'canvas',\n};\n\nconst PillButton: FC<IPillButtonProps> = ({\n id,\n label,\n selected = false,\n disabled = false,\n animatedLabel = '',\n icon,\n onClick,\n tooltip,\n width,\n analyticsLabel,\n analyticsProps,\n isTransparent = false,\n renderThemeAs = 'dark',\n}) => {\n const [isHovered, setHovered] = useState(false);\n const [highlightPhase, setHighlightPhase] = useState(false);\n const [isVisible, setIsVisible] = useState(true);\n const [currentLabel, setCurrentLabel] = useState(label);\n const { colors } = useTheme();\n const shouldAnimate = !!animatedLabel;\n const isDarkTheme = renderThemeAs === 'dark';\n\n const handleSelect = useCallback(() => {\n onClick(id);\n }, [id, onClick]);\n\n const { handleClick } = useClickHandler({ label, analyticsLabel, analyticsProps }, handleSelect);\n\n useEffect(() => {\n if (!shouldAnimate || disabled) return;\n\n const interval = setInterval(() => {\n setIsVisible(false);\n\n setTimeout(() => {\n setHighlightPhase(prev => !prev);\n const newLabel = !highlightPhase ? animatedLabel : label;\n\n setCurrentLabel(newLabel);\n setIsVisible(true);\n }, 400);\n }, 1500);\n\n return () => clearInterval(interval);\n }, [animatedLabel, disabled, highlightPhase, label, shouldAnimate]);\n\n const handleMouseEnter = useCallback(() => setHovered(true), []);\n const handleMouseLeave = useCallback(() => setHovered(false), []);\n\n const showLottie = !!icon && !disabled && (shouldAnimate || selected || isHovered);\n\n const themeColor = isDarkTheme ? 'WHITE_1' : 'BLACK_1';\n const borderColor = colors[highlightPhase ? 'YELLOW_4' : themeColor];\n const textColor = colors[highlightPhase && !selected ? 'YELLOW_4' : themeColor];\n const defaultTextRenderAs = selected ? 'ub2-bold' : 'ub2';\n const textRenderAs = highlightPhase ? (selected ? 'ub3-bold' : 'ub3') : defaultTextRenderAs;\n\n const ButtonContent = (\n <Styled.Wrapper\n selected={selected}\n disabled={disabled}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n width={width}\n borderColor={borderColor}\n isTransparent={isTransparent}\n isDarkTheme={isDarkTheme}\n >\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $flexColumnGapX={0.25}\n >\n {icon && (\n <Styled.IconWrapper $widthX={1} $heightX={1} $showLottie={showLottie}>\n <LottieAnimation src={icon} settings={lottieSettings} />\n </Styled.IconWrapper>\n )}\n <Styled.Label\n key={currentLabel}\n shouldOffsetLabel={showLottie || !icon}\n selected={selected}\n disabled={disabled}\n $renderAs={textRenderAs}\n textColor={textColor}\n isVisible={isVisible}\n width={shouldAnimate ? '85px' : undefined}\n isDarkTheme={isDarkTheme}\n >\n {currentLabel}\n </Styled.Label>\n </FlexView>\n </Styled.Wrapper>\n );\n\n return disabled && tooltip ? (\n <ArrowTooltip renderAs=\"primary\" tooltipItem={tooltip} position=\"top\">\n {ButtonContent}\n </ArrowTooltip>\n ) : (\n ButtonContent\n );\n};\n\nexport default memo(PillButton);\n"],"names":["lottieSettings","PillButton","id","label","selected","disabled","animatedLabel","icon","onClick","tooltip","width","analyticsLabel","analyticsProps","isTransparent","renderThemeAs","isHovered","setHovered","useState","highlightPhase","setHighlightPhase","isVisible","setIsVisible","currentLabel","setCurrentLabel","colors","useTheme","shouldAnimate","isDarkTheme","handleSelect","useCallback","handleClick","useClickHandler","useEffect","interval","prev","handleMouseEnter","handleMouseLeave","showLottie","themeColor","borderColor","textColor","ButtonContent","jsx","Styled.Wrapper","jsxs","FlexView","Styled.IconWrapper","LottieAnimation","Styled.Label","ArrowTooltip","PillButton$1","memo"],"mappings":";;;;;;;;AAUA,MAAMA,IAAiB;AAAA,EACrB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ,GAEMC,IAAmC,CAAC;AAAA,EACxC,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,UAAAC,IAAW;AAAA,EACX,eAAAC,IAAgB;AAAA,EAChB,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,eAAAC,IAAgB;AAClB,MAAM;AACJ,QAAM,CAACC,GAAWC,CAAU,IAAIC,EAAS,EAAK,GACxC,CAACC,GAAgBC,CAAiB,IAAIF,EAAS,EAAK,GACpD,CAACG,GAAWC,CAAY,IAAIJ,EAAS,EAAI,GACzC,CAACK,GAAcC,CAAe,IAAIN,EAASd,CAAK,GAChD,EAAE,QAAAqB,MAAWC,KACbC,IAAgB,CAAC,CAACpB,GAClBqB,IAAcb,MAAkB,QAEhCc,IAAeC,EAAY,MAAM;AACrC,IAAArB,EAAQN,CAAE;AAAA,EAAA,GACT,CAACA,GAAIM,CAAO,CAAC,GAEV,EAAE,aAAAsB,EAAgB,IAAAC,EAAgB,EAAE,OAAA5B,GAAO,gBAAAQ,GAAgB,gBAAAC,KAAkBgB,CAAY;AAE/F,EAAAI,EAAU,MAAM;AACV,QAAA,CAACN,KAAiBrB,EAAU;AAE1B,UAAA4B,IAAW,YAAY,MAAM;AACjC,MAAAZ,EAAa,EAAK,GAElB,WAAW,MAAM;AACG,QAAAF,EAAA,CAAAe,MAAQ,CAACA,CAAI,GAG/BX,EAFkBL,IAAiCf,IAAhBG,CAEX,GACxBe,EAAa,EAAI;AAAA,SAChB,GAAG;AAAA,OACL,IA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A;AAAA,cAVIA;AAAA,YAWP;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAIG,SAAAjB,KAAYI,IACjB,gBAAAiC,EAACO,GAAa,EAAA,UAAS,WAAU,aAAaxC,GAAS,UAAS,OAC7D,UAAAgC,EAAA,CACH,IAEAA;AAEJ,GAEeS,KAAAC,EAAKlD,CAAU;"}
@@ -1,16 +1,16 @@
1
- import e from "styled-components";
2
- import t from "../../../ui/layout/flex-view.js";
3
- const l = e(t)`
4
- ${({ selected: r, theme: o }) => `
1
+ import t from "styled-components";
2
+ import i from "../../../ui/layout/flex-view.js";
3
+ const n = t(i)`
4
+ ${({ selected: r, theme: o, hoverBackground: e }) => `
5
5
  cursor: pointer;
6
6
  transition: all 0.3s ease;
7
7
 
8
8
  &:hover {
9
- background-color: ${r ? void 0 : o.colors.BLACK_5};
9
+ background-color: ${r ? void 0 : o.colors[e]};
10
10
  }
11
11
  `}
12
12
  `;
13
13
  export {
14
- l as Wrapper
14
+ n as Wrapper
15
15
  };
16
16
  //# sourceMappingURL=selectable-info-card-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectable-info-card-styled.js","sources":["../../../../../src/features/auth/comps/selectable-info-card/selectable-info-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const Wrapper = styled(FlexView)<{ selected: boolean }>`\n ${({ selected, theme }) => {\n return `\n cursor: pointer;\n transition: all 0.3s ease;\n\n &:hover {\n background-color: ${!selected ? theme.colors.BLACK_5 : undefined};\n }\n `;\n }}\n`;\n"],"names":["Wrapper","styled","FlexView","selected","theme"],"mappings":";;AAIa,MAAAA,IAAUC,EAAOC,CAAQ;AAAA,IAClC,CAAC,EAAE,UAAAC,GAAU,OAAAC,QACN;AAAA;AAAA;AAAA;AAAA;AAAA,4BAKkBD,IAAkC,SAAvBC,EAAM,OAAO,OAAmB;AAAA;AAAA,GAGrE;AAAA;"}
1
+ {"version":3,"file":"selectable-info-card-styled.js","sources":["../../../../../src/features/auth/comps/selectable-info-card/selectable-info-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport type { TColorNames } from '../../../ui/types';\n\nexport const Wrapper = styled(FlexView)<{ selected: boolean; hoverBackground: TColorNames }>`\n ${({ selected, theme, hoverBackground }) => {\n return `\n cursor: pointer;\n transition: all 0.3s ease;\n\n &:hover {\n background-color: ${!selected ? theme.colors[hoverBackground] : undefined};\n }\n `;\n }}\n`;\n"],"names":["Wrapper","styled","FlexView","selected","theme","hoverBackground"],"mappings":";;AAKa,MAAAA,IAAUC,EAAOC,CAAQ;AAAA,IAClC,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,iBAAAC,QACb;AAAA;AAAA;AAAA;AAAA;AAAA,0BAKgBF,IAA2C,SAAhCC,EAAM,OAAOC,CAAe,CAAa;AAAA;AAAA,GAG5E;AAAA;"}
@@ -1,32 +1,33 @@
1
- import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
- import { memo as g, useRef as x, useCallback as t, useMemo as I } from "react";
3
- import T from "../../../ui/hooks/use-click-handler.js";
4
- import _ from "../../../ui/layout/flex-view.js";
5
- import A from "../../../ui/lottie-animation/lottie-animation.js";
1
+ import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
+ import { memo as g, useRef as k, useCallback as a, useMemo as A } from "react";
3
+ import I from "../../../ui/hooks/use-click-handler.js";
4
+ import L from "../../../ui/layout/flex-view.js";
5
+ import x from "../../../ui/lottie-animation/lottie-animation.js";
6
6
  import u from "../../../ui/text/text.js";
7
7
  import { Wrapper as E } from "./selectable-info-card-styled.js";
8
- const L = ({
9
- id: a,
10
- title: l,
11
- description: c,
12
- icon: i,
8
+ const B = ({
9
+ id: l,
10
+ title: i,
11
+ description: f,
12
+ icon: s,
13
13
  selected: r,
14
- onClick: s,
15
- analyticsLabel: f,
16
- analyticsProps: p
14
+ onClick: m,
15
+ analyticsLabel: p,
16
+ analyticsProps: d,
17
+ renderThemeAs: h = "dark"
17
18
  }) => {
18
- const e = x(null), d = t(() => {
19
- s(a);
20
- }, [a, s]), { handleClick: h } = T(
21
- { label: l, analyticsLabel: f, analyticsProps: p },
22
- d
23
- ), $ = t(() => {
24
- var o;
25
- (o = e.current) == null || o.play();
26
- }, []), C = t(() => {
27
- var o;
28
- r || (o = e.current) == null || o.stop();
29
- }, [r]), b = I(
19
+ const n = k(null), o = h === "dark", C = a(() => {
20
+ m(l);
21
+ }, [l, m]), { handleClick: $ } = I(
22
+ { label: i, analyticsLabel: p, analyticsProps: d },
23
+ C
24
+ ), T = a(() => {
25
+ var e;
26
+ (e = n.current) == null || e.play();
27
+ }, []), _ = a(() => {
28
+ var e;
29
+ r || (e = n.current) == null || e.stop();
30
+ }, [r]), b = A(
30
31
  () => ({
31
32
  autoplay: r,
32
33
  loop: !0,
@@ -34,40 +35,41 @@ const L = ({
34
35
  }),
35
36
  [r]
36
37
  );
37
- return /* @__PURE__ */ m(
38
+ return /* @__PURE__ */ c(
38
39
  E,
39
40
  {
40
41
  $gutterX: 1,
41
42
  $gapX: 1,
42
- $borderColor: "WHITE",
43
+ $borderColor: o ? "WHITE" : "BLACK",
43
44
  $flexDirection: "row",
44
- $background: r ? "WHITE_1" : "BLACK_1",
45
- onMouseEnter: $,
46
- onMouseLeave: C,
47
- onClick: h,
45
+ $background: r && !o ? "BLACK_1" : "WHITE_1",
46
+ onMouseEnter: T,
47
+ onMouseLeave: _,
48
+ onClick: $,
48
49
  $flexColumnGapX: 0.5,
49
50
  selected: r,
50
51
  $alignItems: "center",
52
+ hoverBackground: o ? "BLACK_5" : "WHITE_5",
51
53
  children: [
52
- i && /* @__PURE__ */ n(
53
- A,
54
+ s && /* @__PURE__ */ t(
55
+ x,
54
56
  {
55
- src: i,
56
- ref: e,
57
+ src: s,
58
+ ref: n,
57
59
  settings: b,
58
60
  width: 40,
59
61
  height: 40
60
62
  }
61
63
  ),
62
- /* @__PURE__ */ m(_, { children: [
63
- /* @__PURE__ */ n(u, { $renderAs: "ab3", $color: r ? "BLACK_1" : "WHITE", children: l }),
64
- /* @__PURE__ */ n(u, { $renderAs: "ub3", $color: r ? "BLACK_T_60" : "WHITE_T_60", children: c })
64
+ /* @__PURE__ */ c(L, { children: [
65
+ /* @__PURE__ */ t(u, { $renderAs: "ab3", $color: r && !o ? "WHITE" : "BLACK_1", children: i }),
66
+ /* @__PURE__ */ t(u, { $renderAs: "ub3", $color: r && !o ? "WHITE_T_60" : "BLACK_T_60", children: f })
65
67
  ] })
66
68
  ]
67
69
  }
68
70
  );
69
- }, K = g(L);
71
+ }, X = g(B);
70
72
  export {
71
- K as default
73
+ X as default
72
74
  };
73
75
  //# sourceMappingURL=selectable-info-card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectable-info-card.js","sources":["../../../../../src/features/auth/comps/selectable-info-card/selectable-info-card.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef, memo } from 'react';\n\nimport useClickHandler from '../../../ui/hooks/use-click-handler';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './selectable-info-card-styled';\nimport type { ISelectableInfoCardProps } from './selectable-info-card-types';\n\nconst SelectableInfoCard = ({\n id,\n title,\n description,\n icon,\n selected,\n onClick,\n analyticsLabel,\n analyticsProps,\n}: ISelectableInfoCardProps) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n\n const handleSelect = useCallback(() => {\n onClick(id);\n }, [id, onClick]);\n\n const { handleClick } = useClickHandler(\n { label: title, analyticsLabel, analyticsProps },\n handleSelect,\n );\n\n const handleOnMouseEnter = useCallback(() => {\n animationRef.current?.play();\n }, []);\n\n const handleOnMouseLeave = useCallback(() => {\n if (selected) return;\n animationRef.current?.stop();\n }, [selected]);\n\n const renderSettings = useMemo(\n () => ({\n autoplay: selected,\n loop: true,\n renderer: 'canvas',\n }),\n [selected],\n );\n\n return (\n <Styled.Wrapper\n $gutterX={1}\n $gapX={1}\n $borderColor=\"WHITE\"\n $flexDirection=\"row\"\n $background={selected ? 'WHITE_1' : 'BLACK_1'}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n onClick={handleClick}\n $flexColumnGapX={0.5}\n selected={selected}\n $alignItems=\"center\"\n >\n {icon && (\n <LottieAnimation\n src={icon}\n ref={animationRef}\n settings={renderSettings}\n width={40}\n height={40}\n />\n )}\n\n <FlexView>\n <Text $renderAs=\"ab3\" $color={selected ? 'BLACK_1' : 'WHITE'}>\n {title}\n </Text>\n <Text $renderAs=\"ub3\" $color={selected ? 'BLACK_T_60' : 'WHITE_T_60'}>\n {description}\n </Text>\n </FlexView>\n </Styled.Wrapper>\n );\n};\n\nexport default memo(SelectableInfoCard);\n"],"names":["SelectableInfoCard","id","title","description","icon","selected","onClick","analyticsLabel","analyticsProps","animationRef","useRef","handleSelect","useCallback","handleClick","useClickHandler","handleOnMouseEnter","_a","handleOnMouseLeave","renderSettings","useMemo","jsxs","Styled.Wrapper","jsx","LottieAnimation","FlexView","Text","selectableInfoCard","memo"],"mappings":";;;;;;;AAUA,MAAMA,IAAqB,CAAC;AAAA,EAC1B,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AACF,MAAgC;AACxB,QAAAC,IAAeC,EAAmC,IAAI,GAEtDC,IAAeC,EAAY,MAAM;AACrC,IAAAN,EAAQL,CAAE;AAAA,EAAA,GACT,CAACA,GAAIK,CAAO,CAAC,GAEV,EAAE,aAAAO,MAAgBC;AAAA,IACtB,EAAE,OAAOZ,GAAO,gBAAAK,GAAgB,gBAAAC,EAAe;AAAA,IAC/CG;AAAA,EAAA,GAGII,IAAqBH,EAAY,MAAM;;AAC3C,KAAAI,IAAAP,EAAa,YAAb,QAAAO,EAAsB;AAAA,EACxB,GAAG,CAAE,CAAA,GAECC,IAAqBL,EAAY,MAAM;;AAC3C,IAAIP,MACJW,IAAAP,EAAa,YAAb,QAAAO,EAAsB;AAAA,EAAK,GAC1B,CAACX,CAAQ,CAAC,GAEPa,IAAiBC;AAAA,IACrB,OAAO;AAAA,MACL,UAAUd;AAAA,MACV,MAAM;AAAA,MACN,UAAU;AAAA,IAAA;AAAA,IAEZ,CAACA,CAAQ;AAAA,EAAA;AAIT,SAAA,gBAAAe;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,cAAa;AAAA,MACb,gBAAe;AAAA,MACf,aAAahB,IAAW,YAAY;AAAA,MACpC,cAAcU;AAAA,MACd,cAAcE;AAAA,MACd,SAASJ;AAAA,MACT,iBAAiB;AAAA,MACjB,UAAAR;AAAA,MACA,aAAY;AAAA,MAEX,UAAA;AAAA,QACCD,KAAA,gBAAAkB;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,KAAKnB;AAAA,YACL,KAAKK;AAAA,YACL,UAAUS;AAAA,YACV,OAAO;AAAA,YACP,QAAQ;AAAA,UAAA;AAAA,QACV;AAAA,0BAGDM,GACC,EAAA,UAAA;AAAA,UAAA,gBAAAF,EAACG,KAAK,WAAU,OAAM,QAAQpB,IAAW,YAAY,SAClD,UACHH,EAAA,CAAA;AAAA,UACA,gBAAAoB,EAACG,KAAK,WAAU,OAAM,QAAQpB,IAAW,eAAe,cACrD,UACHF,EAAA,CAAA;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeuB,IAAAC,EAAK3B,CAAkB;"}
1
+ {"version":3,"file":"selectable-info-card.js","sources":["../../../../../src/features/auth/comps/selectable-info-card/selectable-info-card.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef, memo } from 'react';\n\nimport useClickHandler from '../../../ui/hooks/use-click-handler';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './selectable-info-card-styled';\nimport type { ISelectableInfoCardProps } from './selectable-info-card-types';\n\nconst SelectableInfoCard = ({\n id,\n title,\n description,\n icon,\n selected,\n onClick,\n analyticsLabel,\n analyticsProps,\n renderThemeAs = 'dark',\n}: ISelectableInfoCardProps) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const isDarkTheme = renderThemeAs === 'dark';\n\n const handleSelect = useCallback(() => {\n onClick(id);\n }, [id, onClick]);\n\n const { handleClick } = useClickHandler(\n { label: title, analyticsLabel, analyticsProps },\n handleSelect,\n );\n\n const handleOnMouseEnter = useCallback(() => {\n animationRef.current?.play();\n }, []);\n\n const handleOnMouseLeave = useCallback(() => {\n if (selected) return;\n animationRef.current?.stop();\n }, [selected]);\n\n const renderSettings = useMemo(\n () => ({\n autoplay: selected,\n loop: true,\n renderer: 'canvas',\n }),\n [selected],\n );\n\n return (\n <Styled.Wrapper\n $gutterX={1}\n $gapX={1}\n $borderColor={isDarkTheme ? 'WHITE' : 'BLACK'}\n $flexDirection=\"row\"\n $background={selected && !isDarkTheme ? 'BLACK_1' : 'WHITE_1'}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n onClick={handleClick}\n $flexColumnGapX={0.5}\n selected={selected}\n $alignItems=\"center\"\n hoverBackground={isDarkTheme ? 'BLACK_5' : 'WHITE_5'}\n >\n {icon && (\n <LottieAnimation\n src={icon}\n ref={animationRef}\n settings={renderSettings}\n width={40}\n height={40}\n />\n )}\n\n <FlexView>\n <Text $renderAs=\"ab3\" $color={selected && !isDarkTheme ? 'WHITE' : 'BLACK_1'}>\n {title}\n </Text>\n <Text $renderAs=\"ub3\" $color={selected && !isDarkTheme ? 'WHITE_T_60' : 'BLACK_T_60'}>\n {description}\n </Text>\n </FlexView>\n </Styled.Wrapper>\n );\n};\n\nexport default memo(SelectableInfoCard);\n"],"names":["SelectableInfoCard","id","title","description","icon","selected","onClick","analyticsLabel","analyticsProps","renderThemeAs","animationRef","useRef","isDarkTheme","handleSelect","useCallback","handleClick","useClickHandler","handleOnMouseEnter","_a","handleOnMouseLeave","renderSettings","useMemo","jsxs","Styled.Wrapper","jsx","LottieAnimation","FlexView","Text","selectableInfoCard","memo"],"mappings":";;;;;;;AAUA,MAAMA,IAAqB,CAAC;AAAA,EAC1B,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,eAAAC,IAAgB;AAClB,MAAgC;AACxB,QAAAC,IAAeC,EAAmC,IAAI,GACtDC,IAAcH,MAAkB,QAEhCI,IAAeC,EAAY,MAAM;AACrC,IAAAR,EAAQL,CAAE;AAAA,EAAA,GACT,CAACA,GAAIK,CAAO,CAAC,GAEV,EAAE,aAAAS,MAAgBC;AAAA,IACtB,EAAE,OAAOd,GAAO,gBAAAK,GAAgB,gBAAAC,EAAe;AAAA,IAC/CK;AAAA,EAAA,GAGII,IAAqBH,EAAY,MAAM;;AAC3C,KAAAI,IAAAR,EAAa,YAAb,QAAAQ,EAAsB;AAAA,EACxB,GAAG,CAAE,CAAA,GAECC,IAAqBL,EAAY,MAAM;;AAC3C,IAAIT,MACJa,IAAAR,EAAa,YAAb,QAAAQ,EAAsB;AAAA,EAAK,GAC1B,CAACb,CAAQ,CAAC,GAEPe,IAAiBC;AAAA,IACrB,OAAO;AAAA,MACL,UAAUhB;AAAA,MACV,MAAM;AAAA,MACN,UAAU;AAAA,IAAA;AAAA,IAEZ,CAACA,CAAQ;AAAA,EAAA;AAIT,SAAA,gBAAAiB;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,M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