@firebase-oss/ui-react 0.0.2-exp.102954a → 0.0.2-exp.1809b08
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.
- package/LICENSE +202 -0
- package/README.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +37 -38
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {registerFramework,getBehavior,getTranslation,createSignInAuthFormSchema,createSignUpAuthFormSchema,createForgotPasswordAuthFormSchema,createEmailLinkAuthFormSchema,createPhoneAuthNumberFormSchema,createPhoneAuthVerifyFormSchema,createMultiFactorPhoneAuthNumberFormSchema,createMultiFactorPhoneAuthVerifyFormSchema,createMultiFactorTotpAuthNumberFormSchema,createMultiFactorTotpAuthVerifyFormSchema,sendSignInLinkToEmail,FirebaseUIError,completeEmailLinkSignIn,sendPasswordResetEmail,signInWithMultiFactorAssertion,verifyPhoneNumber,enrollWithMultiFactorAssertion,generateTotpSecret,generateTotpQrCode,confirmPhoneNumber,signInWithEmailAndPassword,hasBehavior,createUserWithEmailAndPassword,signInWithProvider,formatPhoneNumber}from'@firebase-oss/ui-core';import {createContext,forwardRef,useState,useCallback,useImperativeHandle,useContext,cloneElement,useEffect,useMemo,useRef}from'react';import {useStore}from'@nanostores/react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {createFormHookContexts,createFormHook}from'@tanstack/react-form';import {Slot}from'@radix-ui/react-slot';import {buttonVariant}from'@firebase-oss/ui-styles';import {twMerge}from'tailwind-merge';import {clsx}from'clsx';import {FactorId,TotpMultiFactorGenerator,PhoneAuthProvider,PhoneMultiFactorGenerator,multiFactor,OAuthProvider,FacebookAuthProvider,GithubAuthProvider,GoogleAuthProvider,TwitterAuthProvider}from'firebase/auth';var tr={version:"0.0.2-exp.
|
|
1
|
+
import {registerFramework,getBehavior,getTranslation,createSignInAuthFormSchema,createSignUpAuthFormSchema,createForgotPasswordAuthFormSchema,createEmailLinkAuthFormSchema,createPhoneAuthNumberFormSchema,createPhoneAuthVerifyFormSchema,createMultiFactorPhoneAuthNumberFormSchema,createMultiFactorPhoneAuthVerifyFormSchema,createMultiFactorTotpAuthNumberFormSchema,createMultiFactorTotpAuthVerifyFormSchema,sendSignInLinkToEmail,FirebaseUIError,completeEmailLinkSignIn,sendPasswordResetEmail,signInWithMultiFactorAssertion,verifyPhoneNumber,enrollWithMultiFactorAssertion,generateTotpSecret,generateTotpQrCode,confirmPhoneNumber,signInWithEmailAndPassword,hasBehavior,createUserWithEmailAndPassword,signInWithProvider,formatPhoneNumber}from'@firebase-oss/ui-core';import {createContext,forwardRef,useState,useCallback,useImperativeHandle,useContext,cloneElement,useEffect,useMemo,useRef}from'react';import {useStore}from'@nanostores/react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {createFormHookContexts,createFormHook}from'@tanstack/react-form';import {Slot}from'@radix-ui/react-slot';import {buttonVariant}from'@firebase-oss/ui-styles';import {twMerge}from'tailwind-merge';import {clsx}from'clsx';import {FactorId,TotpMultiFactorGenerator,PhoneAuthProvider,PhoneMultiFactorGenerator,multiFactor,OAuthProvider,FacebookAuthProvider,GithubAuthProvider,GoogleAuthProvider,TwitterAuthProvider}from'firebase/auth';var tr={version:"0.0.2-exp.1809b08"};var vt=createContext(void 0);function er({children:t,policies:e}){return jsx(vt.Provider,{value:e,children:t})}function A(){let t=s(),e=useContext(vt);if(!e)return null;let{termsOfServiceUrl:r,privacyPolicyUrl:o,onNavigate:n}=e,a=getTranslation(t,"messages","termsAndPrivacy").split(/(\{tos\}|\{privacy\})/),C=n?jsx("button",{}):jsx("a",{target:"_blank",rel:"noopener noreferrer"});return jsx("div",{className:"fui-policies",children:a.map((y,T)=>y==="{tos}"?cloneElement(C,{key:T,onClick:n?()=>n(r):void 0,href:n?void 0:r,children:getTranslation(t,"labels","termsOfService")}):y==="{privacy}"?cloneElement(C,{key:T,onClick:n?()=>n(o):void 0,href:n?void 0:o,children:getTranslation(t,"labels","privacyPolicy")}):jsx("span",{children:y},T))})}var Pt=createContext(null);function Ge({children:t,ui:e,policies:r}){let o=useStore(e);return jsx(Pt.Provider,{value:o,children:jsx(er,{policies:r,children:t})})}function s(){let t=useContext(Pt);if(!t)throw new Error(`No FirebaseUI context found. Your application must be wrapped in a FirebaseUIProvider:
|
|
2
2
|
|
|
3
3
|
const ui = initializeUI(...);
|
|
4
4
|
|