From 094976642aca5b5cb1554b318481cf04c82b03fc Mon Sep 17 00:00:00 2001 From: Maria Rushkova <66270386+mrushkova@users.noreply.github.com> Date: Tue, 28 Dec 2021 12:34:54 +0100 Subject: [PATCH] Login flow (#163) * Add button styles * Fix UserCreation styles * Extract addWrapper * Fix UserCreationModal styles * Add next step modal * Change UserLogo styles * Add colorWheel to You user * Add qrcode.react package * Fix profile icon * Add icons * Add Status modal for mobile * Extract input styles * Add Status modal for desktop * Change paste function * Extract login instructions --- ....react-npm-1.0.2-f8cabf6225-be256f0192.zip | Bin 0 -> 3389 bytes .../qr.js-npm-0.0.0-eea89f459b-5ac6c39396.zip | Bin 0 -> 12406 bytes ....react-npm-1.0.1-ddb3a7650e-154a9557d1.zip | Bin 0 -> 9865 bytes packages/react-chat/package.json | 2 + .../src/components/ActivityCenter.tsx | 16 +- .../src/components/Buttons/DownloadButton.tsx | 4 - .../src/components/Buttons/buttonStyle.ts | 40 +++++ .../src/components/Buttons/buttonStyle.tsx | 12 -- packages/react-chat/src/components/Chat.tsx | 2 + .../src/components/Form/CopyInput.tsx | 58 +------ .../src/components/Form/LoginInstructions.tsx | 93 +++++++++++ .../src/components/Form/PasteInput.tsx | 43 +++++ .../src/components/Form/inputStyles.ts | 73 ++++++++ .../src/components/Icons/ChainIcon.tsx | 30 ++++ .../src/components/Icons/MobileIcon.tsx | 25 +++ .../src/components/Icons/ProfileIcon.tsx | 12 +- .../src/components/Icons/ScanIcon.tsx | 40 +++++ .../src/components/Members/Member.tsx | 13 +- .../src/components/Members/MembersList.tsx | 45 +++-- .../src/components/Members/UserLogo.tsx | 35 ++-- .../src/components/Modals/EditModal.tsx | 17 +- .../src/components/Modals/LinkModal.tsx | 4 - .../src/components/Modals/ModalStyle.tsx | 28 ++-- .../src/components/Modals/ProfileModal.tsx | 17 +- .../src/components/Modals/StatusModal.tsx | 92 ++++++++++ .../components/Modals/UserCreationModal.tsx | 157 +++++++++++++----- .../components/UserCreation/UserCreation.tsx | 69 ++++---- packages/react-chat/src/models/Contact.ts | 6 +- packages/react-chat/src/styles/Inputs.ts | 10 -- packages/react-chat/src/utils/paste.ts | 9 + yarn.lock | 31 ++++ 31 files changed, 704 insertions(+), 279 deletions(-) create mode 100644 .yarn/cache/@types-qrcode.react-npm-1.0.2-f8cabf6225-be256f0192.zip create mode 100644 .yarn/cache/qr.js-npm-0.0.0-eea89f459b-5ac6c39396.zip create mode 100644 .yarn/cache/qrcode.react-npm-1.0.1-ddb3a7650e-154a9557d1.zip create mode 100644 packages/react-chat/src/components/Buttons/buttonStyle.ts delete mode 100644 packages/react-chat/src/components/Buttons/buttonStyle.tsx create mode 100644 packages/react-chat/src/components/Form/LoginInstructions.tsx create mode 100644 packages/react-chat/src/components/Form/PasteInput.tsx create mode 100644 packages/react-chat/src/components/Form/inputStyles.ts create mode 100644 packages/react-chat/src/components/Icons/ChainIcon.tsx create mode 100644 packages/react-chat/src/components/Icons/MobileIcon.tsx create mode 100644 packages/react-chat/src/components/Icons/ScanIcon.tsx create mode 100644 packages/react-chat/src/components/Modals/StatusModal.tsx delete mode 100644 packages/react-chat/src/styles/Inputs.ts create mode 100644 packages/react-chat/src/utils/paste.ts diff --git a/.yarn/cache/@types-qrcode.react-npm-1.0.2-f8cabf6225-be256f0192.zip b/.yarn/cache/@types-qrcode.react-npm-1.0.2-f8cabf6225-be256f0192.zip new file mode 100644 index 0000000000000000000000000000000000000000..e2cd2fc6e8e67be95155779375ecbffb80a6a6ab GIT binary patch literal 3389 zcma);2T)Vn7KTF)ErJFSuu(*cp-7~vfOJ9?L_$*t0VyH$5)}kOl@6f@atRSGAVmWb zR6s0L=^}=JpRs^K5v{jVOvzwz+#MeKx>@kKf!{J#Zc1OWfe z%{m6Eah(wW2w(;PBzEI&WT2&EVxePyzRPPuj;C=|Qa8^=lG3oy#cWY-JkchPREd7U zQ*|!Ev$_QRL;+OeUZmfbFtZ^f1SkLtat!B4X8(D-TsSBz2yLo`otbAb91h_hk#`!s zl!qn+yh;usD$+f*npn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y!6wU*NNhg0p!2My#%c3#DF;ZoGFs zzQOTa^1x={wH_$zrC5n{jrDu%RJSn$O}`n}Whj(+Z1KQFAu}Jmr_yb2Pph8ZLIbd&0>E3>P%!Z86wO5XBNRz@I(< zbB@QG>q_WAoBj7Ea#A7dThl!}Y;o%F>x^bF21a$J-%H<}U;VeuX?~r4Qn&x+`Va8C z>+g=9e~fcLTQ0{p*?YzAZ5$prvl+Zi%D_sSQJ HuW$bWu(g%& literal 0 HcmV?d00001 diff --git a/.yarn/cache/qr.js-npm-0.0.0-eea89f459b-5ac6c39396.zip b/.yarn/cache/qr.js-npm-0.0.0-eea89f459b-5ac6c39396.zip new file mode 100644 index 0000000000000000000000000000000000000000..0ba96dc4e4c296cfa3d75bf8c6c47b404347dc3d GIT binary patch literal 12406 zcmaKy1z1#DyT@syyE~*Cq;u#Py1TnWN{}vL=ui>q?(RlH>F#a`K|*4<_?_eRJKW>l zJbPw%p1pp1?f3t#*lYcj<)LA)A$}gBG z;UAQdW)Ugk=rF?#;CMb!aOGcEC(Ow97u%dDPSj#WCDC=feqEpF21gz}MJI<2y$et4 znC&j{(j2JnbY7WIJT|S+W<&`+t4WcG0RI+lpi_+0;w%@L*`_{0#jANDu_v^XPd|8V z{D*Z}S*w|0Bsy zfzFOMlYR>G^CbEAAhI|*JJ?t`I=Nc>w|aD_LxRQ~|~=u%WlzYDLdMmrhY%Y3kYZxr*ARrbr$^QkZ;2U_YEQ5v0iLXir4f6q@%r zzZ3q1=A3_*l*FGHi3=G_%tG7+Ypo05-G8GPrr$HhS57W5HpBmt-5L#-2w9Vq4?E`G zpH&qPNQtN<>g7nXZqKi+K-N*{!p$o*Xu-{F77`o)e}5HhJa)_V#n;qOdeKLLgDJ|S z-r$7%77@FJ)McAwX~c64ldbL=p>aYG*~c2QCs(OpY6eznB5YZ52t4kw>B3Wz_I^~d z%e{m^5>`3BV?Z_zz}qL0i>ia^ z^4%7w1L%C+oA)qqtO?sdK-s04fpt&j)Tk)%i#i)HmZ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H!$MQkpFT^{i@V2-c$R~Z(h@*C;DHW?q{X`+f4Kn_|ymU8z}aeFn<94 zn=9ri_^Hk1H@M}`;J-~TPgzf`9lu#v$bYQlqZ|CE(c>xWsVU<(EAP*&e^@l05})qk z|0aGy{bTKZ@996qJ>7`;jZ=NJ3H(8kzqe(cvYsxT{bqfA9E|?J`rn1Lr?jWju-~-f z$647QX#bp){X+gM`m~Y#93FoiM`A^E|BC!I=KTWwY8X$4%U__}z>WVO^t<`PKK2g~ R5ZI4@$FL9(t_(l_`yXm3LFWJf literal 0 HcmV?d00001 diff --git a/.yarn/cache/qrcode.react-npm-1.0.1-ddb3a7650e-154a9557d1.zip b/.yarn/cache/qrcode.react-npm-1.0.1-ddb3a7650e-154a9557d1.zip new file mode 100644 index 0000000000000000000000000000000000000000..bb13128cae4f7764bb7926ea64b56613c423133d GIT binary patch literal 9865 zcmaia18`?u^7b#b?PP+9?TKyMwr$&XGO?41&50+rZQJ_h-QD-w|GriGZr`eV&aFEA z+&;I??bChwk&^@gMFspJeANq(|LFYd2KT$Qu{AQ*wYD{Kwla34ll!kjvHv>M-ofy< zCar_9zM<2<^nd}7|9FM9=YZb|5CCui3;+=Qt)7&)psXivXw z;^VrZr=-vH>EnJi7Ix*s0sQ`O(bn-~XnMenw9xrBF?Ko>DFu*v#K@k@5?Dh2L|pyO z?ghmJ%R^hgsf!LVIwBgj-O_PaA4qKTu$wHE>JB~K8>uVf_c?=23xk^tGWUJ$>_OEn z>($;~5PTLl=Y0!Y>J-C^mK5R7Uo20QE0?-y`Fm`jriHnfcczq_FyG|6S_XdfgkWj`wd)}Ce5TBOD69aw2k0{fx9k9v-eA4h{UDD&QWZGH|rI2xOo zDZ3`TYp$F~ARVoR2^OZbXe8n>q=rn8K#(~*jDn|iUxJJ!MME0J-za$tEs;ZzSiWL~ zGWzF42R37FM&?{8XXcs(TtDoHP55!!;y1ns)LF*pP}`#njSt^G($ErMO7;TK5oE2YE=ejCEmXK`4GVQ-q6 zFDbUm_4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z2sE0CEE?6ZO88G?1fLiSbpt{v=oNgodn6u&@*!ek=?x}Q?(67g_N4pWE2D|+}YD6 zTRfVHM;4w*taiM)eAwmaMma82USS|NXtFY|0n|Kx)5%`m5^ugU!peGS7CSok{n61|hSU(aa` zKzgMg=OK?=M1oV&idKl=e?; zFaMc_?CDZ&HxL$!hM&Y8@46efcUw@)nHov&;W(k4-G zp>{>t7!pu)(I!!j7udz^=tdj7cYZO6Gn+DVX@$HTP3TRJr?}KU@H0DZNqeG+n={Af z>jCr+v5)cvsFHxYDyjxUaJz-m%3x?Wo+A*AaAX+63)99sX>ya9F_eBUz-=Uof~EA- zM+hpGKaaa-E4o6s08vMCv163;9fUb|z@`i2&?yq7R(P&g)1-{+>Gj>RbHljX%q~>K zH`}7>=RB}M$C}ib%kZe@QdAF`HAoQ~?bs(0V6Jof!R$A>-a%`;72tCu+N;zbKBT?* zI+(^sP6XbyS__l6N_`9~i*{!SV z!wi{|u!ypX7Zk4;!@p68Ct%Aj(ymK&rPwRXT1|$X+`==Tg|&&6iNirDoq&$wq;<-! z#RnbvhCL%wjg+*Mv1Ps?Q^Gd5dwQHSNV`nhQJNTUE+K&H9`m*e12QZon50mIoVF=I zsx9gl<0fiXB)8m2jZj*1P8Tv`Mh7W5^&?Wefl&t~eLF2wh9@^4^qBI?p4!V=;ap*% zDNHc=Wga6Acc3r5;zEAaby`IwhU5%ednHe@5%ZmrwMq2CFUlJ;VE6jzRAIP5#rgzw%A~ z#47Y}`JY&SvQPfB@6YM}HI4Z theme.bodyBackgroundColor}; + ${buttonTransparentStyles} & + & { margin-left: 8px; } - - &:hover { - background: ${({ theme }) => theme.buttonBgHover}; - } - - &:focus { - background: ${({ theme }) => theme.buttonBg}; - } `; const BtnWrapper = styled.div` diff --git a/packages/react-chat/src/components/Buttons/DownloadButton.tsx b/packages/react-chat/src/components/Buttons/DownloadButton.tsx index 9734b6ac..aabbb4b4 100644 --- a/packages/react-chat/src/components/Buttons/DownloadButton.tsx +++ b/packages/react-chat/src/components/Buttons/DownloadButton.tsx @@ -66,10 +66,6 @@ const Link = styled.a` ${buttonStyles} - &:hover { - background: ${({ theme }) => theme.buttonBgHover}; - } - &.activity { margin: 0; padding: 0; diff --git a/packages/react-chat/src/components/Buttons/buttonStyle.ts b/packages/react-chat/src/components/Buttons/buttonStyle.ts new file mode 100644 index 00000000..d531e9f7 --- /dev/null +++ b/packages/react-chat/src/components/Buttons/buttonStyle.ts @@ -0,0 +1,40 @@ +import { css } from "styled-components"; + +export const buttonStyles = css` + font-family: "Inter"; + font-weight: 500; + font-size: 15px; + line-height: 22px; + text-align: center; + border-radius: 8px; + color: ${({ theme }) => theme.tertiary}; + background: ${({ theme }) => theme.buttonBg}; + + &:hover { + background: ${({ theme }) => theme.buttonBgHover}; + } + + &:focus { + background: ${({ theme }) => theme.buttonBg}; + } +`; + +export const buttonTransparentStyles = css` + font-family: "Inter"; + font-weight: 500; + font-size: 13px; + line-height: 18px; + text-align: center; + color: ${({ theme }) => theme.tertiary}; + background: inherit; + padding: 10px 12px; + border-radius: 8px; + + &:hover { + background: ${({ theme }) => theme.buttonBgHover}; + } + + &:focus { + background: ${({ theme }) => theme.buttonBg}; + } +`; diff --git a/packages/react-chat/src/components/Buttons/buttonStyle.tsx b/packages/react-chat/src/components/Buttons/buttonStyle.tsx deleted file mode 100644 index 70a7157d..00000000 --- a/packages/react-chat/src/components/Buttons/buttonStyle.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { css } from "styled-components"; - -export const buttonStyles = css` - border-radius: 8px; - font-family: "Inter"; - font-weight: 500; - font-size: 15px; - line-height: 22px; - text-align: center; - color: ${({ theme }) => theme.tertiary}; - background: ${({ theme }) => theme.buttonBg}; -`; diff --git a/packages/react-chat/src/components/Chat.tsx b/packages/react-chat/src/components/Chat.tsx index 64d42486..ccccf116 100644 --- a/packages/react-chat/src/components/Chat.tsx +++ b/packages/react-chat/src/components/Chat.tsx @@ -13,6 +13,7 @@ import { Members } from "./Members/Members"; import { CommunityModal } from "./Modals/CommunityModal"; import { EditModal } from "./Modals/EditModal"; import { ProfileModal } from "./Modals/ProfileModal"; +import { StatusModal } from "./Modals/StatusModal"; import { UserCreationModal } from "./Modals/UserCreationModal"; import { ToastMessageList } from "./ToastMessages/ToastMessageList"; import { UserCreation } from "./UserCreation/UserCreation"; @@ -24,6 +25,7 @@ function Modals() { + ); } diff --git a/packages/react-chat/src/components/Form/CopyInput.tsx b/packages/react-chat/src/components/Form/CopyInput.tsx index e600a193..da8aa915 100644 --- a/packages/react-chat/src/components/Form/CopyInput.tsx +++ b/packages/react-chat/src/components/Form/CopyInput.tsx @@ -1,9 +1,9 @@ import React from "react"; -import styled from "styled-components"; import { copy } from "../../utils/copy"; import { reduceString } from "../../utils/reduceString"; -import { textMediumStyles, textSmallStyles } from "../Text"; + +import { ButtonWrapper, InputBtn, Label, Text, Wrapper } from "./inputStyles"; interface CopyInputProps { label: string; @@ -15,57 +15,9 @@ export const CopyInput = ({ label, value }: CopyInputProps) => ( {reduceString(value, 15, 15)} - - copy(value)}>Copy - + + copy(value)}>Copy + ); - -const Label = styled.p` - margin-bottom: 7px; - font-weight: 500; - display: flex; - align-items: center; - color: ${({ theme }) => theme.primary}; - - ${textSmallStyles} -`; - -const Wrapper = styled.div` - position: relative; - padding: 14px 70px 14px 8px; - background: ${({ theme }) => theme.inputColor}; - border-radius: 8px; -`; - -const Text = styled.p` - color: ${({ theme }) => theme.primary}; - - ${textMediumStyles} -`; - -const CopyButtonWrapper = styled.div` - position: absolute; - top: 50%; - right: 0; - display: flex; - align-items: center; - justify-content: center; - height: 100%; - width: 70px; - transform: translateY(-50%); - background: ${({ theme }) => theme.inputColor}; - border-radius: 8px; -`; - -const CopyButton = styled.button` - padding: 6px 12px; - font-size: 12px; - line-height: 16px; - letter-spacing: 0.1px; - color: ${({ theme }) => theme.tertiary}; - background: ${({ theme }) => theme.buttonBg}; - border: 1px solid ${({ theme }) => theme.tertiary}; - border-radius: 6px; -`; diff --git a/packages/react-chat/src/components/Form/LoginInstructions.tsx b/packages/react-chat/src/components/Form/LoginInstructions.tsx new file mode 100644 index 00000000..91fa8f06 --- /dev/null +++ b/packages/react-chat/src/components/Form/LoginInstructions.tsx @@ -0,0 +1,93 @@ +import React from "react"; +import styled from "styled-components"; + +import { MobileIcon } from "../Icons/MobileIcon"; +import { ProfileSvg } from "../Icons/ProfileIcon"; +import { ScanIcon } from "../Icons/ScanIcon"; +import { textMediumStyles } from "../Text"; + +interface LoginInstructionsProps { + mobileFlow: boolean; +} + +export function LoginInstructions({ mobileFlow }: LoginInstructionsProps) { + return ( + + + Open Status App on your {mobileFlow ? "mobile" : "desktop"} + + + Navigate yourself to{" "} + + {" "} + Profile + {" "} + tab + + + Select{" "} + + + {" "} + Sync Settings + + + Tap{" "} + + {" "} + {" "} + {" "} + {mobileFlow ? "Scan" : "Display"} sync code + + + {mobileFlow + ? "Scan the sync code from this screen" + : "Paste the sync code above"}{" "} + ↑ + + + ); +} + +const Instructions = styled.ol` + color: ${({ theme }) => theme.secondary}; + margin: auto 0; + list-style-type: decimal; + counter-reset: ollist; + + ${textMediumStyles} +`; + +const InstructionStep = styled.li` + display: flex; + align-items: center; + + & + & { + margin-top: 10px; + } + + & > span { + color: ${({ theme }) => theme.tertiary}; + } + + &::before { + counter-increment: ollist; + content: counter(ollist) "."; + margin-right: 4px; + } +`; + +const InstructionIcon = styled.div` + width: 40px; + height: 40px; + display: inline-flex; + flex-direction: column; + align-items: center; + justify-content: center; + border-radius: 50%; + background: ${({ theme }) => theme.buttonBg}; + color: ${({ theme }) => theme.tertiary}; + font-size: 8px; + line-height: 10px; + margin: 0 6px; +`; diff --git a/packages/react-chat/src/components/Form/PasteInput.tsx b/packages/react-chat/src/components/Form/PasteInput.tsx new file mode 100644 index 00000000..5f4f0720 --- /dev/null +++ b/packages/react-chat/src/components/Form/PasteInput.tsx @@ -0,0 +1,43 @@ +import React from "react"; +import styled from "styled-components"; + +import { paste } from "../../utils/paste"; + +import { + ButtonWrapper, + InputBtn, + inputStyles, + Label, + Wrapper, +} from "./inputStyles"; + +interface PasteInputProps { + label: string; +} + +export const PasteInput = ({ label }: PasteInputProps) => ( + + + + + + paste("pasteInput")}>Paste + + + +); + +const PasteWrapper = styled.div` + width: 100%; +`; + +const Input = styled.input` + ${inputStyles} + width: 100%; + + &:focus { + outline: none; + } + + border: none; +`; diff --git a/packages/react-chat/src/components/Form/inputStyles.ts b/packages/react-chat/src/components/Form/inputStyles.ts new file mode 100644 index 00000000..8f971d9a --- /dev/null +++ b/packages/react-chat/src/components/Form/inputStyles.ts @@ -0,0 +1,73 @@ +import styled, { css } from "styled-components"; + +import { textMediumStyles, textSmallStyles } from "../Text"; + +export const inputStyles = css` + background: ${({ theme }) => theme.inputColor}; + border-radius: 8px; + border: 1px solid ${({ theme }) => theme.inputColor}; + color: ${({ theme }) => theme.primary}; + outline: none; + + ${textMediumStyles} + + &:focus { + outline: 1px solid ${({ theme }) => theme.tertiary}; + caret-color: ${({ theme }) => theme.notificationColor}; + } +`; + +export const Label = styled.p` + margin-bottom: 7px; + font-weight: 500; + display: flex; + align-items: center; + color: ${({ theme }) => theme.primary}; + + ${textSmallStyles} +`; + +export const Wrapper = styled.div` + position: relative; + padding: 14px 70px 14px 8px; + background: ${({ theme }) => theme.inputColor}; + border-radius: 8px; +`; + +export const Text = styled.p` + color: ${({ theme }) => theme.primary}; + + ${textMediumStyles} +`; + +export const ButtonWrapper = styled.div` + position: absolute; + top: 50%; + right: 0; + display: flex; + align-items: center; + justify-content: center; + height: 100%; + width: 70px; + transform: translateY(-50%); + background: ${({ theme }) => theme.inputColor}; + border-radius: 8px; +`; + +export const InputBtn = styled.button` + padding: 6px 12px; + font-size: 12px; + line-height: 16px; + letter-spacing: 0.1px; + color: ${({ theme }) => theme.tertiary}; + background: ${({ theme }) => theme.buttonBg}; + border: 1px solid ${({ theme }) => theme.tertiary}; + border-radius: 6px; +`; + +export const NameInput = styled.input` + width: 328px; + padding: 11px 16px; + + ${inputStyles} +`; diff --git a/packages/react-chat/src/components/Icons/ChainIcon.tsx b/packages/react-chat/src/components/Icons/ChainIcon.tsx new file mode 100644 index 00000000..3fb34b9c --- /dev/null +++ b/packages/react-chat/src/components/Icons/ChainIcon.tsx @@ -0,0 +1,30 @@ +import React from "react"; +import styled from "styled-components"; + +interface ChainIconProps { + className?: string; +} + +export const ChainIcon = ({ className }: ChainIconProps) => { + return ( + + + + ); +}; + +const Icon = styled.svg` + fill: ${({ theme }) => theme.secondary}; + transform: rotate(15deg); + + &.transformed { + transform: matrix(-0.97, 0.26, 0.26, 0.97, 0, 0); + } +`; diff --git a/packages/react-chat/src/components/Icons/MobileIcon.tsx b/packages/react-chat/src/components/Icons/MobileIcon.tsx new file mode 100644 index 00000000..f35c8c0b --- /dev/null +++ b/packages/react-chat/src/components/Icons/MobileIcon.tsx @@ -0,0 +1,25 @@ +import React from "react"; +import styled from "styled-components"; + +export const MobileIcon = () => { + return ( + + + + + ); +}; + +const Icon = styled.svg` + fill: ${({ theme }) => theme.tertiary}; +`; diff --git a/packages/react-chat/src/components/Icons/ProfileIcon.tsx b/packages/react-chat/src/components/Icons/ProfileIcon.tsx index a12470e5..dcb0f450 100644 --- a/packages/react-chat/src/components/Icons/ProfileIcon.tsx +++ b/packages/react-chat/src/components/Icons/ProfileIcon.tsx @@ -9,7 +9,7 @@ type ProfileSvgProps = { export function ProfileSvg({ width, height, className }: ProfileSvgProps) { return ( - - + ); } @@ -36,12 +36,10 @@ export const ProfileIcon = () => { return ; }; -const Icon = styled(ProfileSvg)` - & > path { - fill: ${({ theme }) => theme.tertiary}; - } +const Icon = styled.svg` + fill: ${({ theme }) => theme.tertiary}; - &:hover > path { + &:hover { fill: ${({ theme }) => theme.bodyBackgroundColor}; } `; diff --git a/packages/react-chat/src/components/Icons/ScanIcon.tsx b/packages/react-chat/src/components/Icons/ScanIcon.tsx new file mode 100644 index 00000000..e6c506cb --- /dev/null +++ b/packages/react-chat/src/components/Icons/ScanIcon.tsx @@ -0,0 +1,40 @@ +import React from "react"; +import styled from "styled-components"; + +export const ScanIcon = () => { + return ( + + + + + + + + ); +}; + +const Icon = styled.svg` + fill: ${({ theme }) => theme.tertiary}; +`; diff --git a/packages/react-chat/src/components/Members/Member.tsx b/packages/react-chat/src/components/Members/Member.tsx index 1d1a7a48..996e64d2 100644 --- a/packages/react-chat/src/components/Members/Member.tsx +++ b/packages/react-chat/src/components/Members/Member.tsx @@ -12,6 +12,7 @@ import { UserLogo } from "./UserLogo"; interface MemberProps { contact: Contact; isOnline?: boolean; + isYou?: boolean; switchShowMembers?: () => void; onClick?: () => void; } @@ -19,6 +20,7 @@ interface MemberProps { export function Member({ contact, isOnline, + isYou, switchShowMembers, onClick, }: MemberProps) { @@ -38,12 +40,17 @@ export function Member({ }; return ( - + setShowMenu((e) => !e)} > {showMenu && } @@ -74,7 +81,7 @@ export const MemberData = styled.div` cursor: pointer; &.you { - justify-content: space-between; + margin-bottom: 0; } `; diff --git a/packages/react-chat/src/components/Members/MembersList.tsx b/packages/react-chat/src/components/Members/MembersList.tsx index 2f2c6001..7d780de6 100644 --- a/packages/react-chat/src/components/Members/MembersList.tsx +++ b/packages/react-chat/src/components/Members/MembersList.tsx @@ -1,4 +1,5 @@ import React, { useMemo } from "react"; +import { utils } from "status-communities/dist/cjs"; import { bufToHex } from "status-communities/dist/cjs/utils"; import styled from "styled-components"; @@ -10,9 +11,8 @@ import { import { useMessengerContext } from "../../contexts/messengerProvider"; import { TopBtn } from "../Chat/ChatTopbar"; import { LogoutIcon } from "../Icons/LogoutIcon"; -import { UserIcon } from "../Icons/UserIcon"; -import { Member, MemberData, MemberIcon } from "./Member"; +import { Member } from "./Member"; interface MembersListProps { switchShowMembers?: () => void; @@ -21,8 +21,10 @@ interface MembersListProps { export function MembersList({ switchShowMembers }: MembersListProps) { const { contacts } = useMessengerContext(); const identity = useIdentity(); - const nickname = useNickname(); + const logout = useSetIdentity(); + const nickname = useNickname(); + const userContacts = useMemo(() => { if (identity) { return Object.values(contacts).filter( @@ -32,6 +34,7 @@ export function MembersList({ switchShowMembers }: MembersListProps) { return Object.values(contacts); } }, [contacts, identity]); + const onlineContacts = useMemo( () => userContacts.filter((e) => e.online), [userContacts] @@ -46,17 +49,20 @@ export function MembersList({ switchShowMembers }: MembersListProps) { {identity && ( You - - - - - - {nickname} - + + logout(undefined)}> - + )} {onlineContacts.length > 0 && ( @@ -113,21 +119,8 @@ const MemberCategoryName = styled.h3` margin-bottom: 8px; `; -const MemberName = styled.p` - font-weight: 500; - font-size: 15px; - line-height: 22px; - color: ${({ theme }) => theme.primary}; - opacity: 0.7; - margin-left: 8px; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; -`; - const Row = styled.div` display: flex; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; + align-items: center; + justify-content: space-between; `; diff --git a/packages/react-chat/src/components/Members/UserLogo.tsx b/packages/react-chat/src/components/Members/UserLogo.tsx index ee8e1827..91156bad 100644 --- a/packages/react-chat/src/components/Members/UserLogo.tsx +++ b/packages/react-chat/src/components/Members/UserLogo.tsx @@ -6,7 +6,7 @@ import { Contact } from "../../models/Contact"; type UserLogoProps = { radius: number; colorWheel: [string, number][]; - contact: Contact; + contact?: Contact; showOnlineStatus?: boolean; icon?: string; }; @@ -29,17 +29,17 @@ export function UserLogo({ }, [colorWheel]); const letters = useMemo(() => { - if (contact?.customName) { + if (contact && contact?.customName) { return contact.customName.slice(0, 2); } - if (contact.trueName) { + if (contact && contact.trueName) { return contact.trueName.slice(0, 2); } }, [contact]); const logoClassnName = useMemo(() => { if (showOnlineStatus) { - if (contact.online) { + if (contact && contact.online) { return "online"; } return "offline"; @@ -49,7 +49,11 @@ export function UserLogo({ return ( - + {!icon && {letters}} @@ -57,8 +61,6 @@ export function UserLogo({ } const TextWrapper = styled.div<{ radius: number }>` - font-family: Inter; - font-style: normal; font-weight: bold; font-size: calc(${({ radius }) => radius}px / 2.5); line-height: calc(${({ radius }) => radius}px / 2.1); @@ -66,12 +68,13 @@ const TextWrapper = styled.div<{ radius: number }>` align-items: center; text-align: center; letter-spacing: -0.4px; - color: rgba(255, 255, 255, 0.7); + color: ${({ theme }) => theme.iconTextColor}; `; const Logo = styled.div<{ radius: number; icon?: string }>` width: calc(${({ radius }) => radius}px - 6px); height: calc(${({ radius }) => radius}px - 6px); + display: flex; align-items: center; justify-content: center; flex-shrink: 0; @@ -83,9 +86,6 @@ const Logo = styled.div<{ radius: number; icon?: string }>` background-size: cover; background-repeat: no-repeat; background-image: ${({ icon }) => icon && `url(${icon}`}; - color: ${({ theme }) => theme.iconTextColor}; - margin: auto; - display: flex; &.offline { &::after { @@ -110,18 +110,23 @@ const Logo = styled.div<{ radius: number; icon?: string }>` width: 7px; height: 7px; border-radius: 50%; - background-color: #4ebc60; + background-color: ${({ theme }) => theme.greenColor}; border: 2px solid ${({ theme }) => theme.bodyBackgroundColor}; } } + + &.empty { + background-color: ${({ theme }) => theme.bodyBackgroundColor}; + background-image: none; + } `; -const Wrapper = styled.div<{ radius: number; conicGradient: string }>` +export const Wrapper = styled.div<{ radius: number; conicGradient: string }>` width: ${({ radius }) => radius}px; height: ${({ radius }) => radius}px; display: flex; - margin-left: auto; - margin-right: auto; + align-items: center; + justify-content: center; border-radius: 50%; background: ${({ conicGradient }) => conicGradient}; `; diff --git a/packages/react-chat/src/components/Modals/EditModal.tsx b/packages/react-chat/src/components/Modals/EditModal.tsx index 750b9b1b..d36c0538 100644 --- a/packages/react-chat/src/components/Modals/EditModal.tsx +++ b/packages/react-chat/src/components/Modals/EditModal.tsx @@ -5,15 +5,16 @@ import { useMessengerContext } from "../../contexts/messengerProvider"; import { useModal } from "../../contexts/modalProvider"; import { buttonStyles } from "../Buttons/buttonStyle"; import { ChannelLogo } from "../Channels/Channel"; +import { inputStyles } from "../Form/inputStyles"; import { AddIcon } from "../Icons/AddIcon"; import { textMediumStyles } from "../Text"; import { Modal } from "./Modal"; import { + AddWrapper, ButtonSection, Heading, Hint, - inputStyles, Section, } from "./ModalStyle"; @@ -125,17 +126,9 @@ const GroupLogo = styled(ChannelLogo)` margin-right: 0; `; -const AddPictureInputWrapper = styled.div` - display: flex; - justify-content: center; - align-items: center; - position: absolute; +const AddPictureInputWrapper = styled(AddWrapper)` top: 0; right: 8px; - width: 40px; - height: 40px; - background: ${({ theme }) => theme.tertiary}; - border-radius: 50%; `; const AddPictureInput = styled.input` @@ -153,8 +146,4 @@ const SaveBtn = styled.button` padding: 11px 24px; ${buttonStyles} - - &:hover { - background: ${({ theme }) => theme.buttonBgHover}; - } `; diff --git a/packages/react-chat/src/components/Modals/LinkModal.tsx b/packages/react-chat/src/components/Modals/LinkModal.tsx index 8f01dc93..e288298c 100644 --- a/packages/react-chat/src/components/Modals/LinkModal.tsx +++ b/packages/react-chat/src/components/Modals/LinkModal.tsx @@ -64,8 +64,4 @@ const ButtonYes = styled.button` padding: 11px 24px; ${buttonStyles} - - &:hover { - background: ${({ theme }) => theme.buttonBgHover}; - } `; diff --git a/packages/react-chat/src/components/Modals/ModalStyle.tsx b/packages/react-chat/src/components/Modals/ModalStyle.tsx index 4cc291d0..0631b537 100644 --- a/packages/react-chat/src/components/Modals/ModalStyle.tsx +++ b/packages/react-chat/src/components/Modals/ModalStyle.tsx @@ -1,4 +1,4 @@ -import styled, { css } from "styled-components"; +import styled from "styled-components"; import { buttonStyles } from "../Buttons/buttonStyle"; import { textMediumStyles } from "../Text"; @@ -29,10 +29,6 @@ export const Btn = styled.button` margin-left: 8px; ${buttonStyles} - &:hover { - background: ${({ theme }) => theme.buttonBgHover}; - } - &:disabled { background: ${({ theme }) => theme.border}; color: ${({ theme }) => theme.secondary}; @@ -67,17 +63,13 @@ export const Hint = styled.p` line-height: 16px; `; -export const inputStyles = css` - background: ${({ theme }) => theme.inputColor}; - border-radius: 8px; - border: 1px solid ${({ theme }) => theme.inputColor}; - color: ${({ theme }) => theme.primary}; - outline: none; - - ${textMediumStyles} - - &:focus { - outline: 1px solid ${({ theme }) => theme.tertiary}; - caret-color: ${({ theme }) => theme.notificationColor}; - } +export const AddWrapper = styled.div` + display: flex; + justify-content: center; + align-items: center; + position: absolute; + width: 40px; + height: 40px; + background: ${({ theme }) => theme.tertiary}; + border-radius: 50%; `; diff --git a/packages/react-chat/src/components/Modals/ProfileModal.tsx b/packages/react-chat/src/components/Modals/ProfileModal.tsx index dd143cbd..d0a5a312 100644 --- a/packages/react-chat/src/components/Modals/ProfileModal.tsx +++ b/packages/react-chat/src/components/Modals/ProfileModal.tsx @@ -7,9 +7,9 @@ import { useIdentity } from "../../contexts/identityProvider"; import { useModal } from "../../contexts/modalProvider"; import { useToasts } from "../../contexts/toastProvider"; import { useManageContact } from "../../hooks/useManageContact"; -import { NameInput } from "../../styles/Inputs"; import { copy } from "../../utils"; import { buttonStyles } from "../Buttons/buttonStyle"; +import { inputStyles, NameInput } from "../Form/inputStyles"; import { ClearSvg } from "../Icons/ClearIcon"; import { CopySvg } from "../Icons/CopyIcon"; import { EditSvg } from "../Icons/EditIcon"; @@ -25,7 +25,6 @@ import { ButtonSection, Heading, Hint, - inputStyles, Section, } from "./ModalStyle"; @@ -349,7 +348,7 @@ const UserAddressWrapper = styled.div` } `; -const UserAddress = styled.p` +export const UserAddress = styled.p` display: flex; letter-spacing: 1px; margin-right: 8px; @@ -363,11 +362,8 @@ const UserAddress = styled.p` ${textSmallStyles} } `; -const EmojiKey = styled.div` - display: flex; - justify-content: center; - align-items: center; - flex-wrap: wrap; +export const EmojiKey = styled.div` + width: 116px; gap: 8px; font-size: 15px; line-height: 14px; @@ -383,7 +379,6 @@ const ProfileBtn = styled.button` ${buttonStyles} background: ${({ theme }) => theme.bodyBackgroundColor}; border: 1px solid ${({ theme }) => theme.border}; - border-radius: 8px; margin-left: 8px; &.red { @@ -393,10 +388,6 @@ const ProfileBtn = styled.button` &.red:hover { background: ${({ theme }) => theme.buttonNoBgHover}; } - - &:hover { - background: ${({ theme }) => theme.buttonBgHover}; - } `; const CopyButton = styled.button` diff --git a/packages/react-chat/src/components/Modals/StatusModal.tsx b/packages/react-chat/src/components/Modals/StatusModal.tsx new file mode 100644 index 00000000..97acab8b --- /dev/null +++ b/packages/react-chat/src/components/Modals/StatusModal.tsx @@ -0,0 +1,92 @@ +import QRCode from "qrcode.react"; +import React, { useState } from "react"; +import styled from "styled-components"; + +import { buttonStyles } from "../Buttons/buttonStyle"; +import { LoginInstructions } from "../Form/LoginInstructions"; +import { PasteInput } from "../Form/PasteInput"; + +import { Modal } from "./Modal"; +import { Heading, Section } from "./ModalStyle"; + +export const StatusModalName = "StatusModal"; + +export enum StatusModalState { + Mobile, + Desktop, +} + +export function StatusModal() { + const [modalState, setModalState] = useState( + StatusModalState.Mobile + ); + + const mobileFlow = modalState === StatusModalState.Mobile; + const desktopFlow = modalState === StatusModalState.Desktop; + + const switchModalState = (state: StatusModalState) => { + setModalState((prev) => (prev === state ? StatusModalState.Mobile : state)); + }; + return ( + +
+ Sync with Status profile +
+ + + switchModalState(StatusModalState.Mobile)} + > + From mobile + + switchModalState(StatusModalState.Desktop)} + > + From desktop + + + + {mobileFlow && } + + {desktopFlow && } + + + +
+ ); +} + +const MiddleSection = styled(Section)` + display: flex; + flex-direction: column; + align-items: center; + height: 514px; +`; + +const Switch = styled.div` + display: flex; + align-items: center; + margin-bottom: 32px; +`; + +const SwitchBtn = styled.button` + ${buttonStyles} + width: 159px; + padding: 7px 0; + text-align: center; + color: ${({ theme }) => theme.tertiary}; + background: ${({ theme }) => theme.buttonBg}; + position: relative; + + &.active { + background: ${({ theme }) => theme.tertiary}; + color: ${({ theme }) => theme.bodyBackgroundColor}; + z-index: 10000; + } +`; + +const SwitchBtnMobile = styled(SwitchBtn)` + margin-left: -8px; +`; diff --git a/packages/react-chat/src/components/Modals/UserCreationModal.tsx b/packages/react-chat/src/components/Modals/UserCreationModal.tsx index 1833a405..521647f1 100644 --- a/packages/react-chat/src/components/Modals/UserCreationModal.tsx +++ b/packages/react-chat/src/components/Modals/UserCreationModal.tsx @@ -3,17 +3,21 @@ import { Identity } from "status-communities/dist/cjs"; import styled from "styled-components"; import { + useIdentity, useSetIdentity, useSetNikcname, } from "../../contexts/identityProvider"; import { useModal } from "../../contexts/modalProvider"; import { Contact } from "../../models/Contact"; -import { NameInput } from "../../styles/Inputs"; +import { NameInput } from "../Form/inputStyles"; +import { AddIcon } from "../Icons/AddIcon"; +import { ChainIcon } from "../Icons/ChainIcon"; import { LeftIconSvg } from "../Icons/LeftIcon"; import { UserLogo } from "../Members/UserLogo"; import { Modal } from "./Modal"; import { + AddWrapper, BackBtn, Btn, ButtonSection, @@ -22,44 +26,90 @@ import { Section, Text, } from "./ModalStyle"; +import { EmojiKey, UserAddress } from "./ProfileModal"; export const UserCreationModalName = "UserCreationModal"; export function UserCreationModal() { + const identity = useIdentity(); const setIdentity = useSetIdentity(); const setNickname = useSetNikcname(); const [customNameInput, setCustomNameInput] = useState(""); + const [nextStep, setNextStep] = useState(false); const { setModal } = useModal(UserCreationModalName); return (
Create a Status Profile
- - + + {nextStep ? ( + Your emojihash and identicon ring + ) : ( Your profile + )} + {nextStep ? ( - Longer and unusual names are better as they are less likely to be - used by someone else. + {" "} + This set of emojis and coloured ring around your avatar are unique + and represent your chat key, so your friends can easily distinguish + you from potential impersonators. - - - + ) : ( + + Longer and unusual names are better as they are
less likely + to be used by someone else. +
+ )} + + + + {!nextStep && ( + + + + )} + + {!nextStep && ( setCustomNameInput(e.currentTarget.value)} /> -
+ )} + {nextStep && identity && ( + <> + + {" "} + Chatkey: {identity.privateKey.slice(0, 10)}... + {identity.privateKey.slice(-3)}{" "} + + + + + + + 🎩🍞πŸ₯‘πŸ¦πŸŒˆπŸ“‘πŸ’…πŸ»β™£οΈπŸ””β›ΈπŸ‘΅πŸ…± + + + + )}
setModal(false)}> @@ -67,10 +117,13 @@ export function UserCreationModal() { { - setIdentity(Identity.generate()); - setNickname(customNameInput); - setModal(false); + nextStep + ? setModal(false) + : (setIdentity(Identity.generate()), + setNickname(customNameInput), + setNextStep(true)); }} + disabled={!customNameInput} > Next @@ -80,39 +133,55 @@ export function UserCreationModal() { } const MiddleSection = styled(Section)` - margin-bottom: 102px; + height: 420px; + display: flex; + flex-direction: column; + align-items: center; + + &.initial { + padding: 32px; + } +`; + +const Title = styled(Text)` + font-weight: bold; + font-size: 22px; + line-height: 30px; + letter-spacing: -0.2px; + margin-bottom: 16px; +`; + +const StyledHint = styled(Hint)` + font-size: 15px; + line-height: 22px; + margin-bottom: 32px; + text-align: center; `; const LogoWrapper = styled.div` position: relative; display: flex; - margin-top: 32px; - margin-bottom: 38px; + margin-bottom: 32px; `; -const StyledHint = styled(Hint)` - font-family: Inter; - font-style: normal; - font-weight: normal; - font-size: 15px; - line-height: 22px; - text-align: center; +const AddIconWrapper = styled(AddWrapper)` + top: 0; + right: -50%; + transform: translateX(-50%); `; -const Title = styled(Text)` - font-family: Inter; - font-style: normal; - font-weight: bold; - font-size: 22px; - line-height: 30px; - - text-align: center; - letter-spacing: -0.2px; - margin-bottom: 16px; +const ChainIcons = styled.div` + width: 104px; + display: flex; + justify-content: space-between; + align-items: center; + margin: 16px 0; `; -const Content = styled.div` - margin-top: 16px; - margin-left: 65px; - margin-right: 65px; +const UserAttributes = styled.div` + width: 200px; + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 32px; `; diff --git a/packages/react-chat/src/components/UserCreation/UserCreation.tsx b/packages/react-chat/src/components/UserCreation/UserCreation.tsx index bc3b478d..ec71ee45 100644 --- a/packages/react-chat/src/components/UserCreation/UserCreation.tsx +++ b/packages/react-chat/src/components/UserCreation/UserCreation.tsx @@ -2,65 +2,56 @@ import React from "react"; import styled from "styled-components"; import { useModal } from "../../contexts/modalProvider"; +import { buttonStyles, buttonTransparentStyles } from "../Buttons/buttonStyle"; import { ColorChatIcon } from "../Icons/ColorChatIcon"; +import { StatusModalName } from "../Modals/StatusModal"; import { UserCreationModalName } from "../Modals/UserCreationModal"; +import { textSmallStyles } from "../Text"; export function UserCreation() { const { setModal } = useModal(UserCreationModalName); + const { setModal: setStatusModal } = useModal(StatusModalName); + return ( - - - - - - Want in on the discussion ? - setModal(true)}> - Use a throwaway account - - - + + + Want to jump into the discussion? + setStatusModal(true)}> + Sync with Status profile + + Connect Ethereum Wallet + setModal(true)}> + Use a throwaway account + + ); } -const ThrowAwayButton = styled.button` - font-family: Inter; - font-style: normal; - font-weight: 500; - font-size: 13px; - line-height: 18px; +const Wrapper = styled.div` display: flex; + flex-direction: column; align-items: center; - text-align: center; - color: #4360df; -`; - -const IconWrapper = styled.div` - margin-left: auto; - margin-right: auto; + justify-content: center; + flex: 1; + background-color: ${({ theme }) => theme.sectionBackgroundColor}; `; const TitleWrapper = styled.div` - font-family: Inter; - font-style: normal; font-weight: bold; font-size: 17px; line-height: 24px; text-align: center; - margin-top: 25px; - margin-bottom: 24px; + margin: 24px 0; + color: ${({ theme }) => theme.primary}; `; -const Wrapper = styled.div` - margin: auto; - align-items: center; - display: flex; - flex-direction: column; +const LoginBtn = styled.button` + ${buttonStyles} + ${textSmallStyles} + padding: 10px 12px; + margin-bottom: 16px; `; -const Background = styled.div` - background: #f6f8fa; - display: flex; - flex-direction: column; - align-items: center; - height: 100%; +const ThrowAwayButton = styled.button` + ${buttonTransparentStyles} `; diff --git a/packages/react-chat/src/models/Contact.ts b/packages/react-chat/src/models/Contact.ts index d122906b..79047b9b 100644 --- a/packages/react-chat/src/models/Contact.ts +++ b/packages/react-chat/src/models/Contact.ts @@ -1,10 +1,10 @@ export type Contact = { id: string; - online: boolean; + online?: boolean; trueName: string; customName?: string; - isUntrustworthy: boolean; - blocked: boolean; + isUntrustworthy?: boolean; + blocked?: boolean; isFriend?: boolean; }; diff --git a/packages/react-chat/src/styles/Inputs.ts b/packages/react-chat/src/styles/Inputs.ts deleted file mode 100644 index 57d5a90b..00000000 --- a/packages/react-chat/src/styles/Inputs.ts +++ /dev/null @@ -1,10 +0,0 @@ -import styled from "styled-components"; - -import { inputStyles } from "../components/Modals/ModalStyle"; - -export const NameInput = styled.input` - width: 328px; - padding: 11px 16px; - - ${inputStyles} -`; diff --git a/packages/react-chat/src/utils/paste.ts b/packages/react-chat/src/utils/paste.ts new file mode 100644 index 00000000..ba171a10 --- /dev/null +++ b/packages/react-chat/src/utils/paste.ts @@ -0,0 +1,9 @@ +export const paste = (elementId: string) => { + navigator.clipboard + .readText() + .then( + (clipText) => + ((document.getElementById(elementId)).value = + clipText) + ); +}; diff --git a/yarn.lock b/yarn.lock index e53b8562..b5f42b7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -279,6 +279,7 @@ __metadata: "@types/emoji-mart": ^3.0.6 "@types/mocha": ^9.0.0 "@types/node": ^16.9.6 + "@types/qrcode.react": ^1.0.2 "@types/react": ^17.0.16 "@types/styled-components": ^5.1.12 "@typescript-eslint/eslint-plugin": ^4.29.0 @@ -295,6 +296,7 @@ __metadata: npm-run-all: ^4.1.5 npm-watch: ^0.11.0 prettier: ^2.3.2 + qrcode.react: ^1.0.1 react: ^17.0.2 react-dom: ^17.0.2 react-is: ^17.0.2 @@ -983,6 +985,15 @@ __metadata: languageName: node linkType: hard +"@types/qrcode.react@npm:^1.0.2": + version: 1.0.2 + resolution: "@types/qrcode.react@npm:1.0.2" + dependencies: + "@types/react": "*" + checksum: be256f0192366b4c0822da43c732bf3e29beb954c89d739aa770f09e5160842a3ca4d6814cb57bbcbbf8997cf7af0b998de318dab957f0820f267bb746c9a329 + languageName: node + linkType: hard + "@types/react-dom@npm:>=16.9.0, @types/react-dom@npm:^17.0.9": version: 17.0.9 resolution: "@types/react-dom@npm:17.0.9" @@ -9261,6 +9272,26 @@ fsevents@~2.3.2: languageName: node linkType: hard +"qr.js@npm:0.0.0": + version: 0.0.0 + resolution: "qr.js@npm:0.0.0" + checksum: 5ac6c393967bdeaa660e7fd3a501a25eb538c1f6008a4d30ab2b97bbe520e5c236530090773f1578aa0a523cdaa6923c866615e21143f9e7cd22abd41c789b69 + languageName: node + linkType: hard + +"qrcode.react@npm:^1.0.1": + version: 1.0.1 + resolution: "qrcode.react@npm:1.0.1" + dependencies: + loose-envify: ^1.4.0 + prop-types: ^15.6.0 + qr.js: 0.0.0 + peerDependencies: + react: ^15.5.3 || ^16.0.0 || ^17.0.0 + checksum: 154a9557d103fa776cd99bc0d2600b862be74872ff965052533bc38ea0606c4d0965b4dd6df93e53f1db86699517a25db2718bbbc08c5d535a90c0d335552e9a + languageName: node + linkType: hard + "qs@npm:6.7.0": version: 6.7.0 resolution: "qs@npm:6.7.0"