@aws-amplify/ui-react 2.18.2 → 2.18.3

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.
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import*as m from"react";import{createTheme as o}from"@aws-amplify/ui";import{AmplifyContext as n}from"./AmplifyContext.js";function d({children:d,colorMode:i,theme:a,nonce:c}){const r=o(a),{name:l,cssText:u}=r;return m.useEffect((()=>{if(document&&document.documentElement){const t=document.documentElement.getAttribute("data-amplify-theme"),e=document.documentElement.getAttribute("data-amplify-color-mode");return document.documentElement.setAttribute("data-amplify-theme",l),document.documentElement.setAttribute("data-amplify-color-mode",i||""),function(){document.documentElement.setAttribute("data-amplify-theme",t),document.documentElement.setAttribute("data-amplify-color-mode",e)}}}),[l,i]),t(n.Provider,Object.assign({value:{theme:r}},{children:[e("div",Object.assign({"data-amplify-theme":l,"data-amplify-color-mode":i},{children:d})),void 0===a||/<\/style/i.test(u)?null:e("style",{id:`amplify-theme-${l}`,dangerouslySetInnerHTML:{__html:u},nonce:c})]}))}export{d as AmplifyProvider};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import*as m from"react";import{createTheme as o}from"@aws-amplify/ui";import{AmplifyContext as n}from"./AmplifyContext.js";function c({children:c,colorMode:d,theme:i,nonce:a}){const r=o(i),{name:l,cssText:u}=r;return m.useEffect((()=>{if(document&&document.documentElement){const t=document.documentElement.getAttribute("data-amplify-theme"),e=document.documentElement.getAttribute("data-amplify-color-mode");return document.documentElement.setAttribute("data-amplify-theme",l),document.documentElement.setAttribute("data-amplify-color-mode",d||""),function(){document.documentElement.setAttribute("data-amplify-theme",t),document.documentElement.setAttribute("data-amplify-color-mode",e)}}}),[l,d]),t(n.Provider,Object.assign({value:{theme:r}},{children:[e("div",Object.assign({"data-amplify-theme":l,"data-amplify-color-mode":d},{children:c})),void 0===i||/<\/style/i.test(u)?null:e("style",{id:`amplify-theme-${l}`,dangerouslySetInnerHTML:{__html:u},nonce:a})]}))}const d=c;export{c as AmplifyProvider,d as ThemeProvider};
@@ -1 +1 @@
1
- export{AmplifyProvider}from"./AmplifyProvider/index.js";export{Authenticator}from"./Authenticator/Authenticator.js";import"react";import"lodash/isEmpty";import"lodash/isArray";import"lodash/isObject";export{useAuthenticator}from"./Authenticator/hooks/useAuthenticator/index.js";import"./Authenticator/hooks/useCustomComponents/index.js";export{withAuthenticator}from"./Authenticator/withAuthenticator.js";export{MapView}from"./Geo/MapView/index.js";export{Geocoder,LocationSearch}from"./Geo/LocationSearch/index.js";
1
+ export{AmplifyProvider,ThemeProvider}from"./ThemeProvider/index.js";export{Authenticator}from"./Authenticator/Authenticator.js";import"react";import"lodash/isEmpty";import"lodash/isArray";import"lodash/isObject";export{useAuthenticator}from"./Authenticator/hooks/useAuthenticator/index.js";import"./Authenticator/hooks/useCustomComponents/index.js";export{withAuthenticator}from"./Authenticator/withAuthenticator.js";export{MapView}from"./Geo/MapView/index.js";export{Geocoder,LocationSearch}from"./Geo/LocationSearch/index.js";
@@ -1 +1 @@
1
- import*as o from"react";import{AmplifyContext as t}from"../components/AmplifyProvider/AmplifyContext.js";import{getThemeFromContext as e}from"./useTheme.js";function r(){const r=o.useContext(t);return{theme:e(r)}}export{r as useAmplify};
1
+ import*as e from"react";import{AmplifyContext as o}from"../components/ThemeProvider/AmplifyContext.js";import{getThemeFromContext as t}from"./useTheme.js";function r(){const r=e.useContext(o);return{theme:t(r)}}export{r as useAmplify};
@@ -1 +1 @@
1
- import*as o from"react";import{createTheme as t}from"@aws-amplify/ui";import{AmplifyContext as e}from"../components/AmplifyProvider/AmplifyContext.js";const m=()=>{const t=o.useContext(e);return r(t)},r=o=>void 0===o||void 0===o.theme?t():o.theme;export{r as getThemeFromContext,m as useTheme};
1
+ import*as o from"react";import{createTheme as t}from"@aws-amplify/ui";import{AmplifyContext as e}from"../components/ThemeProvider/AmplifyContext.js";const m=()=>{const t=o.useContext(e);return r(t)},r=o=>void 0===o||void 0===o.theme?t():o.theme;export{r as getThemeFromContext,m as useTheme};