@cuemath/leap 2.9.12-j5 → 2.9.12-j6

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 (24) hide show
  1. package/dist/features/auth/signup/custom-input-field/{phone-input/country-selector → country-selector}/country-code-button.js +4 -4
  2. package/dist/features/auth/signup/custom-input-field/country-selector/country-code-button.js.map +1 -0
  3. package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js +29 -0
  4. package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js.map +1 -0
  5. package/dist/features/auth/signup/custom-input-field/{phone-input/phone-input-styled.js → country-selector/country-selector-styled.js} +2 -2
  6. package/dist/features/auth/signup/custom-input-field/country-selector/country-selector-styled.js.map +1 -0
  7. package/dist/features/auth/signup/custom-input-field/country-selector/country-selector.js +26 -0
  8. package/dist/features/auth/signup/custom-input-field/country-selector/country-selector.js.map +1 -0
  9. package/dist/features/auth/signup/custom-input-field/custom-input-field-styled.js +2 -10
  10. package/dist/features/auth/signup/custom-input-field/custom-input-field-styled.js.map +1 -1
  11. package/dist/features/auth/signup/custom-input-field/custom-input-field.js +60 -64
  12. package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -1
  13. package/dist/features/auth/signup/custom-input-field/password-toggle/password-toggle.js +9 -0
  14. package/dist/features/auth/signup/custom-input-field/password-toggle/password-toggle.js.map +1 -0
  15. package/dist/index.d.ts +3 -8
  16. package/dist/index.js +253 -255
  17. package/dist/index.js.map +1 -1
  18. package/package.json +1 -1
  19. package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-code-button.js.map +0 -1
  20. package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-list-menu.js +0 -28
  21. package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-list-menu.js.map +0 -1
  22. package/dist/features/auth/signup/custom-input-field/phone-input/phone-input-styled.js.map +0 -1
  23. package/dist/features/auth/signup/custom-input-field/phone-input/phone-input.js +0 -67
  24. package/dist/features/auth/signup/custom-input-field/phone-input/phone-input.js.map +0 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "2.9.12-j5",
3
+ "version": "2.9.12-j6",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1 +0,0 @@
1
- {"version":3,"file":"country-code-button.js","sources":["../../../../../../../src/features/auth/signup/custom-input-field/phone-input/country-selector/country-code-button.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nimport ChevronDownIcon from '../../../../../../assets/line-icons/icons/chevron-down';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Text from '../../../../../ui/text/text';\nimport * as Styled from '../phone-input-styled';\n\nconst CountryCodeButton: FC<{ value?: string; menuVisible?: boolean }> = ({\n value,\n menuVisible,\n}) => {\n return (\n <Styled.CountryCodeButton\n $background=\"BLACK_5\"\n $borderRadius={4}\n $gutterX={0.5}\n $gap={5}\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n $borderColor={menuVisible ? 'WHITE_T_38' : 'BLACK_5'}\n $flexDirection=\"row\"\n $flexGap={2}\n >\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n +{value}\n </Text>\n <FlexView $width={20}>\n <ChevronDownIcon width={20} height={20} color=\"WHITE\" />\n </FlexView>\n </Styled.CountryCodeButton>\n );\n};\n\nexport default CountryCodeButton;\n"],"names":["CountryCodeButton","value","menuVisible","jsxs","Styled.CountryCodeButton","Text","jsx","FlexView","ChevronDownIcon"],"mappings":";;;;;AAOA,MAAMA,IAAmE,CAAC;AAAA,EACxE,OAAAC;AAAA,EACA,aAAAC;AACF,MAEI,gBAAAC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,aAAY;AAAA,IACZ,eAAe;AAAA,IACf,UAAU;AAAA,IACV,MAAM;AAAA,IACN,aAAY;AAAA,IACZ,iBAAgB;AAAA,IAChB,cAAcF,IAAc,eAAe;AAAA,IAC3C,gBAAe;AAAA,IACf,UAAU;AAAA,IAEV,UAAA;AAAA,MAAA,gBAAAC,EAACE,GAAK,EAAA,WAAU,OAAM,QAAO,SAAQ,UAAA;AAAA,QAAA;AAAA,QACjCJ;AAAA,MAAA,GACJ;AAAA,MACC,gBAAAK,EAAAC,GAAA,EAAS,QAAQ,IAChB,UAAC,gBAAAD,EAAAE,GAAA,EAAgB,OAAO,IAAI,QAAQ,IAAI,OAAM,QAAQ,CAAA,GACxD;AAAA,IAAA;AAAA,EAAA;AAAA;"}
@@ -1,28 +0,0 @@
1
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
- import a from "../../../../../ui/text/text.js";
3
- import { MenuWrapper as s, MenuItem as p, Icon as u } from "../phone-input-styled.js";
4
- const g = ({ options: o, selectedCountry: t, onChange: n }) => /* @__PURE__ */ e(s, { $widthX: 10, $gapX: 0.5, $background: "BLACK_2", $borderColor: "BLACK_5", children: o.map((i) => {
5
- const { id: r, value: c, icon: d, code: $ } = i;
6
- return /* @__PURE__ */ l(
7
- p,
8
- {
9
- $gutterX: 0.5,
10
- $gapX: 0.75,
11
- onClick: () => n({ code: $, id: r }),
12
- $width: "100%",
13
- $flexDirection: "row",
14
- $alignItems: "center",
15
- $flexGap: 8,
16
- $isSelected: t.id === r,
17
- children: [
18
- /* @__PURE__ */ e(u, { src: d }),
19
- /* @__PURE__ */ e(a, { $renderAs: "ab3", $color: "WHITE", children: c })
20
- ]
21
- },
22
- r
23
- );
24
- }) });
25
- export {
26
- g as default
27
- };
28
- //# sourceMappingURL=country-list-menu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"country-list-menu.js","sources":["../../../../../../../src/features/auth/signup/custom-input-field/phone-input/country-selector/country-list-menu.tsx"],"sourcesContent":["import type { ICountryListMenuProps } from '../phone-input-types';\nimport type { FC } from 'react';\n\nimport Text from '../../../../../ui/text/text';\nimport * as Styled from '../phone-input-styled';\n\nconst CountryListMenu: FC<ICountryListMenuProps> = ({ options, selectedCountry, onChange }) => {\n return (\n <Styled.MenuWrapper $widthX={10} $gapX={0.5} $background={'BLACK_2'} $borderColor={'BLACK_5'}>\n {options.map(option => {\n const { id, value, icon, code } = option;\n\n return (\n <Styled.MenuItem\n key={id}\n $gutterX={0.5}\n $gapX={0.75}\n onClick={() => onChange({ code, id })}\n $width=\"100%\"\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGap={8}\n $isSelected={selectedCountry.id === id}\n >\n <Styled.Icon src={icon} />\n <Text $renderAs=\"ab3\" $color={'WHITE'}>\n {value}\n </Text>\n </Styled.MenuItem>\n );\n })}\n </Styled.MenuWrapper>\n );\n};\n\nexport default CountryListMenu;\n"],"names":["CountryListMenu","options","selectedCountry","onChange","jsx","Styled.MenuWrapper","option","id","value","icon","code","jsxs","Styled.MenuItem","Styled.Icon","Text"],"mappings":";;;AAMA,MAAMA,IAA6C,CAAC,EAAE,SAAAC,GAAS,iBAAAC,GAAiB,UAAAC,QAE3E,gBAAAC,EAAAC,GAAA,EAAmB,SAAS,IAAI,OAAO,KAAK,aAAa,WAAW,cAAc,WAChF,UAAAJ,EAAQ,IAAI,CAAUK,MAAA;AACrB,QAAM,EAAE,IAAAC,GAAI,OAAAC,GAAO,MAAAC,GAAM,MAAAC,MAASJ;AAGhC,SAAA,gBAAAK;AAAA,IAACC;AAAAA,IAAA;AAAA,MAEC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,SAAS,MAAMT,EAAS,EAAE,MAAAO,GAAM,IAAAH,GAAI;AAAA,MACpC,QAAO;AAAA,MACP,gBAAe;AAAA,MACf,aAAY;AAAA,MACZ,UAAU;AAAA,MACV,aAAaL,EAAgB,OAAOK;AAAA,MAEpC,UAAA;AAAA,QAAA,gBAAAH,EAACS,GAAA,EAAY,KAAKJ,EAAM,CAAA;AAAA,0BACvBK,GAAK,EAAA,WAAU,OAAM,QAAQ,SAC3B,UACHN,GAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAbKD;AAAA,EAAA;AAgBV,CAAA,EACH,CAAA;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"phone-input-styled.js","sources":["../../../../../../src/features/auth/signup/custom-input-field/phone-input/phone-input-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nexport const MenuWrapper = styled(FlexView)`\n border-radius: 2px;\n max-height: 220px;\n overflow-y: scroll;\n width: 271px;\n`;\n\nexport const MenuItem = styled(FlexView)<{ $isSelected: boolean }>(({ theme, $isSelected }) => {\n return `\n cursor: pointer;\n background: ${$isSelected ? theme.colors.BLACK_5 : 'transparent'};\n &:hover {\n background: ${theme.colors.BLACK_5};\n }\n `;\n});\n\nexport const Icon = styled.img`\n width: 20px;\n height: 20px;\n`;\n\nexport const CountryCodeButton = styled(FlexView)`\n cursor: pointer;\n padding-right: 4px;\n max-width: 100px;\n min-width: 80px;\n`;\n"],"names":["MenuWrapper","styled","FlexView","MenuItem","theme","$isSelected","Icon","CountryCodeButton"],"mappings":";;AAIa,MAAAA,IAAcC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,GAO7BC,IAAWF,EAAOC,CAAQ,EAA4B,CAAC,EAAE,OAAAE,GAAO,aAAAC,QACpE;AAAA;AAAA,oBAEWA,IAAcD,EAAM,OAAO,UAAU,aAAa;AAAA;AAAA,0BAE5CA,EAAM,OAAO,OAAO;AAAA;AAAA,IAG7C,GAEYE,IAAOL,EAAO;AAAA;AAAA;AAAA,GAKdM,IAAoBN,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,67 +0,0 @@
1
- import { jsx as e, jsxs as C } from "react/jsx-runtime";
2
- import { useState as x, useCallback as l } from "react";
3
- import { useTheme as y } from "styled-components";
4
- import { InputWrapper as b } from "../../../../circle-games/sign-up/comp/input-wrapper/input-wrapper.js";
5
- import g from "../../../../ui/context-menu/context-menu.js";
6
- import n from "../../../../ui/layout/flex-view.js";
7
- import w from "../../../../ui/separator/separator.js";
8
- import { COUNTRY_CODE_MAP as I } from "../../signup-constants.js";
9
- import { CustomInput as M } from "../custom-input-field-styled.js";
10
- import D from "./country-selector/country-code-button.js";
11
- import V from "./country-selector/country-list-menu.js";
12
- const T = ({
13
- error: i,
14
- value: u,
15
- onChange: a,
16
- selectedCountry: r,
17
- onCountryChange: p,
18
- onEnter: o
19
- }) => {
20
- var m;
21
- const s = y(), [f, h] = x(!1), c = l(
22
- (t) => {
23
- t.key === "Enter" && (o == null || o());
24
- },
25
- [o]
26
- ), d = l((t) => {
27
- h(t);
28
- }, []);
29
- return /* @__PURE__ */ e(b, { helperText: i, children: /* @__PURE__ */ C(n, { $flexDirection: "row", children: [
30
- /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(
31
- g,
32
- {
33
- startLeft: !0,
34
- targetElement: /* @__PURE__ */ e(D, { value: r.code, menuVisible: f }),
35
- menuElement: /* @__PURE__ */ e(
36
- V,
37
- {
38
- options: I,
39
- onChange: p,
40
- selectedCountry: r
41
- }
42
- ),
43
- menuOffset: 5,
44
- menuZIndex: 1,
45
- onMenuVisibilityChange: d
46
- }
47
- ) }),
48
- /* @__PURE__ */ e(w, { width: 8 }),
49
- /* @__PURE__ */ e(n, { $width: 224, children: /* @__PURE__ */ e(
50
- M,
51
- {
52
- value: u,
53
- onChange: (t) => a(t.target.value),
54
- placeholder: "00000 00000",
55
- type: "number",
56
- align: "left",
57
- autoCapitalize: "none",
58
- color: (m = s.colors) == null ? void 0 : m[i ? "RED" : "WHITE"],
59
- onKeyDown: c
60
- }
61
- ) })
62
- ] }) });
63
- }, _ = T;
64
- export {
65
- _ as default
66
- };
67
- //# sourceMappingURL=phone-input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"phone-input.js","sources":["../../../../../../src/features/auth/signup/custom-input-field/phone-input/phone-input.tsx"],"sourcesContent":["import type { IPhoneInputProps } from './phone-input-types';\n\nimport { useCallback, useState, type FC, type KeyboardEvent } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { InputWrapper } from '../../../../circle-games/sign-up/comp/input-wrapper/input-wrapper';\nimport ContextMenu from '../../../../ui/context-menu/context-menu';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport { COUNTRY_CODE_MAP } from '../../signup-constants';\nimport * as Styled from '../custom-input-field-styled';\nimport CountryCodeButton from './country-selector/country-code-button';\nimport CountryListMenu from './country-selector/country-list-menu';\n\nconst PhoneInput: FC<IPhoneInputProps> = ({\n error,\n value,\n onChange,\n selectedCountry,\n onCountryChange,\n onEnter,\n}) => {\n const theme = useTheme();\n const [menuVisible, setMenuVisible] = useState(false);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n onEnter?.();\n }\n },\n [onEnter],\n );\n\n const handleMenuVisibility = useCallback((visible: boolean) => {\n setMenuVisible(visible);\n }, []);\n\n return (\n <InputWrapper helperText={error}>\n <FlexView $flexDirection=\"row\">\n <FlexView>\n <ContextMenu\n startLeft\n targetElement={\n <CountryCodeButton value={selectedCountry.code} menuVisible={menuVisible} />\n }\n menuElement={\n <CountryListMenu\n options={COUNTRY_CODE_MAP}\n onChange={onCountryChange}\n selectedCountry={selectedCountry}\n />\n }\n menuOffset={5}\n menuZIndex={1}\n onMenuVisibilityChange={handleMenuVisibility}\n />\n </FlexView>\n <Separator width={8} />\n <FlexView $width={224}>\n <Styled.CustomInput\n value={value}\n onChange={event => onChange(event.target.value)}\n placeholder=\"00000 00000\"\n type=\"number\"\n align=\"left\"\n autoCapitalize=\"none\"\n color={theme.colors?.[error ? 'RED' : 'WHITE']}\n onKeyDown={handleKeyDown}\n />\n </FlexView>\n </FlexView>\n </InputWrapper>\n );\n};\n\nexport default PhoneInput;\n"],"names":["PhoneInput","error","value","onChange","selectedCountry","onCountryChange","onEnter","theme","useTheme","menuVisible","setMenuVisible","useState","handleKeyDown","useCallback","event","handleMenuVisibility","visible","InputWrapper","jsxs","FlexView","jsx","ContextMenu","CountryCodeButton","CountryListMenu","COUNTRY_CODE_MAP","Separator","Styled.CustomInput","_a","PhoneInput$1"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAmC,CAAC;AAAA,EACxC,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,SAAAC;AACF,MAAM;;AACJ,QAAMC,IAAQC,KACR,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAK,GAE9CC,IAAgBC;AAAA,IACpB,CAACC,MAA2C;AACtC,MAAAA,EAAM,QAAQ,YACNR,KAAA,QAAAA;AAAA,IAEd;AAAA,IACA,CAACA,CAAO;AAAA,EAAA,GAGJS,IAAuBF,EAAY,CAACG,MAAqB;AAC7D,IAAAN,EAAeM,CAAO;AAAA,EACxB,GAAG,CAAE,CAAA;AAEL,2BACGC,GAAa,EAAA,YAAYhB,GACxB,UAAC,gBAAAiB,EAAAC,GAAA,EAAS,gBAAe,OACvB,UAAA;AAAA,IAAA,gBAAAC,EAACD,GACC,EAAA,UAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,WAAS;AAAA,QACT,eACG,gBAAAD,EAAAE,GAAA,EAAkB,OAAOlB,EAAgB,MAAM,aAAAK,GAA0B;AAAA,QAE5E,aACE,gBAAAW;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAASC;AAAA,YACT,UAAUnB;AAAA,YACV,iBAAAD;AAAA,UAAA;AAAA,QACF;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,wBAAwBW;AAAA,MAAA;AAAA,IAAA,GAE5B;AAAA,IACA,gBAAAK,EAACK,GAAU,EAAA,OAAO,EAAG,CAAA;AAAA,IACrB,gBAAAL,EAACD,GAAS,EAAA,QAAQ,KAChB,UAAA,gBAAAC;AAAA,MAACM;AAAAA,MAAA;AAAA,QACC,OAAAxB;AAAA,QACA,UAAU,CAAAY,MAASX,EAASW,EAAM,OAAO,KAAK;AAAA,QAC9C,aAAY;AAAA,QACZ,MAAK;AAAA,QACL,OAAM;AAAA,QACN,gBAAe;AAAA,QACf,QAAOa,IAAApB,EAAM,WAAN,gBAAAoB,EAAe1B,IAAQ,QAAQ;AAAA,QACtC,WAAWW;AAAA,MAAA;AAAA,IAAA,GAEf;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,GAEAgB,IAAe5B;"}