@aws-amplify/ui-react 2.15.3 → 2.15.6
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/dist/esm/components/Authenticator/Router/index.js +1 -1
- package/dist/esm/components/Geo/Geocoder/index.js +1 -1
- package/dist/esm/components/Geo/MapView/index.js +1 -1
- package/dist/esm/primitives-catalog.js +4 -0
- package/dist/index.js +1 -1
- package/dist/primitives.json +4 -0
- package/dist/styles.css +11 -3
- package/dist/types/components/Authenticator/Router/index.d.ts +7 -5
- package/dist/types/components/Authenticator/withAuthenticator.d.ts +1 -1
- package/dist/types/components/Geo/Geocoder/index.d.ts +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,Fragment as e,jsxs as i}from"react/jsx-runtime";import{useAuthenticator as s}from"../hooks/useAuthenticator/index.js";import{View as t}from"../../../primitives/View/View.js";import{ConfirmSignUp as n}from"../ConfirmSignUp/ConfirmSignUp.js";import{ForceNewPassword as o}from"../ForceNewPassword/ForceNewPassword.js";import{useCustomComponents as a}from"../hooks/useCustomComponents/index.js";import{SetupTOTP as m}from"../SetupTOTP/SetupTOTP.js";import"@aws-amplify/ui";import"../../../primitives/TextField/TextField.js";import"../../../primitives/Button/Button.js";import"../../../primitives/Flex/Flex.js";import"../../../primitives/Alert/Alert.js";import{SignInSignUpTabs as u}from"../shared/SignInSignUpTabs.js";import{ConfirmVerifyUser as p}from"../VerifyUser/ConfirmVerifyUser.js";import{VerifyUser as c}from"../VerifyUser/VerifyUser.js";import{ConfirmSignIn as f}from"../ConfirmSignIn/ConfirmSignIn.js";import{ConfirmResetPassword as d}from"../ResetPassword/ConfirmResetPassword.js";import{ResetPassword as l}from"../ResetPassword/ResetPassword.js";const g=r=>"signIn"===r||"signUp";function j({children:j,className:
|
|
1
|
+
import{jsx as r,Fragment as e,jsxs as i}from"react/jsx-runtime";import{useAuthenticator as s}from"../hooks/useAuthenticator/index.js";import{View as t}from"../../../primitives/View/View.js";import{ConfirmSignUp as n}from"../ConfirmSignUp/ConfirmSignUp.js";import{ForceNewPassword as o}from"../ForceNewPassword/ForceNewPassword.js";import{useCustomComponents as a}from"../hooks/useCustomComponents/index.js";import{SetupTOTP as m}from"../SetupTOTP/SetupTOTP.js";import"@aws-amplify/ui";import"../../../primitives/TextField/TextField.js";import"../../../primitives/Button/Button.js";import"../../../primitives/Flex/Flex.js";import"../../../primitives/Alert/Alert.js";import{SignInSignUpTabs as u}from"../shared/SignInSignUpTabs.js";import{ConfirmVerifyUser as p}from"../VerifyUser/ConfirmVerifyUser.js";import{VerifyUser as c}from"../VerifyUser/VerifyUser.js";import{ConfirmSignIn as f}from"../ConfirmSignIn/ConfirmSignIn.js";import{ConfirmResetPassword as d}from"../ResetPassword/ConfirmResetPassword.js";import{ResetPassword as l}from"../ResetPassword/ResetPassword.js";const g=r=>"signIn"===r||"signUp";function j({children:j,className:h,variation:w="default",hideSignUp:U}){const{route:y,signOut:P,user:S}=s((r=>[r.route,r.signOut,r.user])),{components:{Header:O,Footer:v}}=a();return["authenticated","signOut"].includes(y)?j?r(e,{children:"function"==typeof j?j({signOut:P,user:S}):j}):null:r(e,{children:r(t,Object.assign({className:h,"data-amplify-authenticator":"","data-variation":w},{children:i(t,Object.assign({"data-amplify-container":""},{children:[r(O,{}),r(t,Object.assign({"data-amplify-router":"","data-amplify-router-content":g(y)?void 0:""},{children:(()=>{switch(y){case"idle":case"setup":return null;case"confirmSignUp":return r(n,{});case"confirmSignIn":return r(f,{});case"setupTOTP":return r(m,{});case"signIn":case"signUp":return r(u,{hideSignUp:U});case"forceNewPassword":return r(o,{});case"resetPassword":return r(l,{});case"confirmResetPassword":return r(d,{});case"verifyUser":return r(c,{});case"confirmVerifyUser":return r(p,{});default:return console.warn("Unhandled Authenicator route – please open an issue: ",y),null}})()})),r(v,{})]}))}))})}export{j as Router};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as r}from"../../../node_modules/tslib/tslib.es6.js";import{jsx as o}from"react/jsx-runtime";import
|
|
1
|
+
import{__rest as r}from"../../../node_modules/tslib/tslib.es6.js";import{jsx as o}from"react/jsx-runtime";import t from"maplibre-gl";import{createAmplifyGeocoder as e}from"maplibre-gl-js-amplify";import{useRef as i,useEffect as n}from"react";import{useMap as s,useControl as m}from"react-map-gl";const p={maplibregl:t,marker:{color:"#3FB1CE"},popup:!0,showResultMarkers:{color:"#3FB1CE"},showResultsWhileTyping:!0},l=r=>{const{current:t}=s();return o(t?c:a,Object.assign({},p,r))},c=o=>{var{position:t="top-right"}=o,i=r(o,["position"]);return m((()=>e(i)),{position:t}),null},a=r=>{const t=i(!1);return n((()=>{t.current||(e(r).addTo("#geocoder-container"),t.current=!0)}),[r]),o("div",{id:"geocoder-container"})};export{l as Geocoder};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as o,__awaiter as i}from"../../../node_modules/tslib/tslib.es6.js";import{jsx as e}from"react/jsx-runtime";import{Amplify as t,Auth as r}from"aws-amplify";import l from"maplibre-gl";import{AmplifyMapLibreRequest as
|
|
1
|
+
import{__rest as o,__awaiter as i}from"../../../node_modules/tslib/tslib.es6.js";import{jsx as e}from"react/jsx-runtime";import{Amplify as t,Auth as r}from"aws-amplify";import l from"maplibre-gl";import{AmplifyMapLibreRequest as m}from"maplibre-gl-js-amplify";import{useMemo as n,useState as a,useEffect as s}from"react";import p from"react-map-gl";const u=u=>{var v,{mapLib:d,mapStyle:c,style:f}=u,g=o(u,["mapLib","mapStyle","style"]);const b=t.configure(),y=n((()=>{var o,i,e,t;return null!==(t=null!==(i=null===(o=b.geo)||void 0===o?void 0:o.amazon_location_service)&&void 0!==i?i:null===(e=b.geo)||void 0===e?void 0:e.AmazonLocationService)&&void 0!==t?t:{}}),[b]),[j,h]=a(),w=n((()=>Object.assign({height:"100vh",position:"relative",width:"100vw"},f)),[f]);return s((()=>{i(void 0,void 0,void 0,(function*(){const o=yield r.currentUserCredentials();if(o){const{region:i}=y,{transformRequest:e}=new m(o,i);h((()=>e))}}))}),[y]),j?e(p,Object.assign({},g,{mapLib:null!=d?d:l,mapStyle:null!=c?c:null===(v=y.maps)||void 0===v?void 0:v.default,style:w,transformRequest:j})):null};export{u as MapView};
|