diff --git a/.editorconfig b/.editorconfig index b21e6055..63627032 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,7 +2,7 @@ root = true [*] indent_style = tab -indent_size = 2 +indent_size = 4 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true diff --git a/packages/react/src/components/IDKitWidget/States/ErrorState.tsx b/packages/react/src/components/IDKitWidget/States/ErrorState.tsx index c2564977..e858406b 100644 --- a/packages/react/src/components/IDKitWidget/States/ErrorState.tsx +++ b/packages/react/src/components/IDKitWidget/States/ErrorState.tsx @@ -3,6 +3,7 @@ import useIDKitStore from '@/store/idkit' import type { IDKitStore } from '@/store/idkit' import ErrorIcon from '@/components/Icons/ErrorIcon' import { AppErrorCodes } from '@worldcoin/idkit-core' +import ReloadIcon from '@/components/Icons/ReloadIcon' const getParams = ({ retryFlow, errorState }: IDKitStore) => ({ retryFlow, errorState }) @@ -54,8 +55,9 @@ const ErrorState = () => { diff --git a/packages/react/src/components/IDKitWidget/States/WorldID/QRState.tsx b/packages/react/src/components/IDKitWidget/States/WorldID/QRState.tsx index aa119f37..4a064779 100644 --- a/packages/react/src/components/IDKitWidget/States/WorldID/QRState.tsx +++ b/packages/react/src/components/IDKitWidget/States/WorldID/QRState.tsx @@ -6,7 +6,6 @@ import { classNames } from '@/lib/utils' import Qrcode from '@/components/QRCode' import { useCallback, useState } from 'react' import { AnimatePresence, motion } from 'framer-motion' -import LoadingIcon from '@/components/Icons/LoadingIcon' import WorldcoinIcon from '@/components/Icons/WorldcoinIcon' import QRPlaceholderIcon from '@/components/Icons/QRPlaceholderIcon' @@ -45,7 +44,7 @@ const QRState: FC = ({ qrData, showQR, setShowQR }) => { opacity: 1, height: 'auto', marginTop: 8, - y: 6, + y: -20, transition: { duration: 0.25, opacity: { delay: 0.05, duration: 0.2 }, diff --git a/packages/react/src/components/IDKitWidget/States/WorldIDState.tsx b/packages/react/src/components/IDKitWidget/States/WorldIDState.tsx index 72692ff3..33c660d6 100644 --- a/packages/react/src/components/IDKitWidget/States/WorldIDState.tsx +++ b/packages/react/src/components/IDKitWidget/States/WorldIDState.tsx @@ -82,13 +82,26 @@ const WorldIDState = () => { Please use your World App to scan the QR code

- {verificationState === VerificationState.WaitingForApp ? ( -
- +
+ {verificationState == VerificationState.WaitingForApp && ( +
+ +
+

Verifying

+

Please continue in app

+
+
+ )} +
+
- ) : ( - - )} +
) } diff --git a/packages/react/src/components/Icons/LoadingIcon.tsx b/packages/react/src/components/Icons/LoadingIcon.tsx index 58efd14d..a34a68d8 100644 --- a/packages/react/src/components/Icons/LoadingIcon.tsx +++ b/packages/react/src/components/Icons/LoadingIcon.tsx @@ -1,16 +1,19 @@ -import { __ } from '@/lang' +import type { SVGAttributes } from 'react' -const LoadingIcon = ({ className = '' }: { className?: string }) => ( -
-
- - {__('Loading...')} - -
-
+const LoadingIcon = ({ className, ...props }: SVGAttributes) => ( + + + + ) export default LoadingIcon diff --git a/packages/react/src/components/Icons/ReloadIcon.tsx b/packages/react/src/components/Icons/ReloadIcon.tsx new file mode 100644 index 00000000..a1cc1445 --- /dev/null +++ b/packages/react/src/components/Icons/ReloadIcon.tsx @@ -0,0 +1,15 @@ +import type { SVGAttributes } from 'react' + +const ReloadIcon = (props: SVGAttributes) => ( + + + +) + +export default ReloadIcon diff --git a/packages/react/src/types/config.ts b/packages/react/src/types/config.ts index 25299ebe..06f99e90 100644 --- a/packages/react/src/types/config.ts +++ b/packages/react/src/types/config.ts @@ -22,7 +22,10 @@ export type WidgetConfig = { export type Config = Required> & WidgetConfig & - ((Exclude & { advanced: { self_hosted: true } }) | (IDKitConfig & { advanced?: { self_hosted?: false } })) + ( + | (Exclude & { advanced: { self_hosted: true } }) + | (IDKitConfig & { advanced?: { self_hosted?: false } }) + ) export type WidgetProps = Config & { children?: ({ open }: { open: () => void }) => JSX.Element diff --git a/packages/react/tailwind.config.cjs b/packages/react/tailwind.config.cjs index e401be1b..099456ab 100644 --- a/packages/react/tailwind.config.cjs +++ b/packages/react/tailwind.config.cjs @@ -27,19 +27,19 @@ module.exports = { darkMode: 'class', theme: { fontSize: { - xs: ["12px", { lineHeight: "16px" }], - sm: ["14px", { lineHeight: "20px" }], - base: ["16px", { lineHeight: "24px" }], - lg: ["18px", { lineHeight: "28px" }], - xl: ["20px", { lineHeight: "28px" }], - "2xl": ["24px", { lineHeight: "32px" }], - "3xl": ["30px", { lineHeight: "36px" }], - "4xl": ["36px", { lineHeight: "36px" }], - "5xl": ["48px", { lineHeight: "1" }], - "6xl": ["60px", { lineHeight: "1" }], - "7xl": ["72px", { lineHeight: "1" }], - "8xl": ["96px", { lineHeight: "1" }], - "9xl": ["144px", { lineHeight: "1" }], + xs: ['12px', { lineHeight: '16px' }], + sm: ['14px', { lineHeight: '20px' }], + base: ['16px', { lineHeight: '24px' }], + lg: ['18px', { lineHeight: '28px' }], + xl: ['20px', { lineHeight: '28px' }], + '2xl': ['24px', { lineHeight: '32px' }], + '3xl': ['30px', { lineHeight: '36px' }], + '4xl': ['36px', { lineHeight: '36px' }], + '5xl': ['48px', { lineHeight: '1' }], + '6xl': ['60px', { lineHeight: '1' }], + '7xl': ['72px', { lineHeight: '1' }], + '8xl': ['96px', { lineHeight: '1' }], + '9xl': ['144px', { lineHeight: '1' }], }, spacing: { px: '1px', @@ -110,6 +110,7 @@ module.exports = { '#0d151d', '#1e40af', '#29343f', + '#3c424b', '#4940e0', '#596673', '#657080', @@ -117,6 +118,7 @@ module.exports = { '#9eafc0', '#d3dfea', '#e5e7eb', + '#ebecef', '#ece8fb', '#f1f5f8', '#f2f5f9',