@aws-amplify/ui 3.8.0 → 3.8.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.
- package/dist/esm/machines/authenticator/index.js +1 -1
- package/dist/esm/theme/tokens/colors.js +1 -1
- package/dist/esm/theme/tokens/components/link.js +1 -1
- package/dist/esm/theme/tokens/components/sliderField.js +1 -1
- package/dist/esm/theme/tokens/components/switchField.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +1013 -447
- package/dist/theme.css +6 -7
- package/dist/types/theme/tokens/components/link.d.ts +1 -6
- package/dist/types/theme/tokens/types/scales.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t,__spreadArray as o,__rest as n}from"../../node_modules/tslib/tslib.es6.js";import{createMachine as r,forwardTo as i,assign as e,spawn as a}from"xstate";import{
|
|
1
|
+
import{__assign as t,__spreadArray as o,__rest as n}from"../../node_modules/tslib/tslib.es6.js";import{createMachine as r,forwardTo as i,assign as e,spawn as a}from"xstate";import{choose as s}from"xstate/lib/actions";import{stopActor as c}from"./actions.js";import{signInActor as u}from"./actors/signIn.js";import{signOutActor as d}from"./actors/signOut.js";import{resetPasswordActor as l}from"./actors/resetPassword.js";import{defaultServices as g}from"./defaultServices.js";import{createSignUpMachine as v}from"./signUp.js";function f(){return r({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:g,actorRef:void 0,hasSetup:!1},states:{idle:{invoke:{src:"getCurrentUser",onDone:{actions:"setUser",target:"authenticated"},onError:{target:"setup"}}},setup:{initial:"waitConfig",states:{waitConfig:{on:{INIT:{actions:["configure","setHasSetup"],target:"applyConfig"}}},applyConfig:{invoke:{src:"getAmplifyConfig",onDone:{actions:"applyAmplifyConfig",target:"goToInitialState"}}},goToInitialState:{always:[{target:"#authenticator.signUp",cond:"isInitialStateSignUp"},{target:"#authenticator.resetPassword",cond:"isInitialStateResetPassword"},{target:"#authenticator.signIn"}]}}},signIn:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:"stopSignInActor"}},on:{SIGN_UP:"signUp",RESET_PASSWORD:"resetPassword","done.invoke.signInActor":[{target:"signUp",actions:"setActorDoneData",cond:"shouldRedirectToSignUp"},{target:"resetPassword",actions:"setActorDoneData",cond:"shouldRedirectToResetPassword"},{target:"authenticated",actions:"setActorDoneData"}]}},signUp:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:"stopSignUpActor"},autoSignIn:{invoke:{src:"getCurrentUser",onDone:"#authenticator.authenticated",onError:"#authenticator.setup.goToInitialState"}}},on:{SIGN_IN:"signIn","done.invoke.signUpActor":{target:"signUp.autoSignIn",actions:"setActorDoneData"}}},resetPassword:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnResetPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:"stopResetPasswordActor"}},on:{SIGN_IN:"signIn","done.invoke.resetPasswordActor":{target:"signIn",actions:"setActorDoneData"}}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:["stopSignOutActor","clearUser"]}},on:{"done.invoke.signOutActor":[{target:"setup",cond:"shouldSetup"},{target:"setup.goToInitialState"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}}},on:{CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{forwardToActor:s([{cond:"hasActor",actions:i((function(t){return t.actorRef}))}]),setUser:e({user:function(t,o){return o.data}}),setActorDoneData:e({actorDoneData:function(o,n){var r,i;return{authAttributes:t({},null===(r=n.data)||void 0===r?void 0:r.authAttributes),intent:null===(i=n.data)||void 0===i?void 0:i.intent}},user:function(t,o){var n;return null===(n=o.data)||void 0===n?void 0:n.user}}),clearUser:e({user:void 0}),clearActorDoneData:e({actorDoneData:void 0}),applyAmplifyConfig:e({config:function(t,n){var r,i,e,a,s,c,u,d,l,g=null!==(i=null===(r=n.data.aws_cognito_username_attributes)||void 0===r?void 0:r.map((function(t){return t.toLowerCase()})))&&void 0!==i?i:[],v=null!==(a=null===(e=n.data.aws_cognito_verification_mechanisms)||void 0===e?void 0:e.map((function(t){return t.toLowerCase()})))&&void 0!==a?a:[],f=null!==(c=null===(s=n.data.aws_cognito_signup_attributes)||void 0===s?void 0:s.map((function(t){return t.toLowerCase()})))&&void 0!==c?c:[],A=null!==(d=null===(u=n.data.aws_cognito_social_providers)||void 0===u?void 0:u.map((function(t){return t.toLowerCase()})))&&void 0!==d?d:[],w=n.data.aws_cognito_password_protection_settings||{};0===g.length&&g.push("username");var m=t.config,S=m.loginMechanisms,h=m.signUpAttributes,D=m.socialProviders,I=m.initialState;return{loginMechanisms:null!=S?S:g,formFields:null!==(l=p(m.formFields))&&void 0!==l?l:{},passwordSettings:w,signUpAttributes:null!=h?h:Array.from(new Set(o(o([],v,!0),f,!0))),socialProviders:null!=D?D:A.sort(),initialState:I}}}),spawnSignInActor:e({actorRef:function(t,o){var n,r,i,e,s,c=t.services,d=u({services:c}).withContext({authAttributes:null===(n=t.actorDoneData)||void 0===n?void 0:n.authAttributes,user:t.user,intent:null===(r=t.actorDoneData)||void 0===r?void 0:r.intent,country_code:"+1",formValues:{},touched:{},validationError:{},loginMechanisms:null===(i=t.config)||void 0===i?void 0:i.loginMechanisms,socialProviders:null===(e=t.config)||void 0===e?void 0:e.socialProviders,formFields:null===(s=t.config)||void 0===s?void 0:s.formFields});return a(d,{name:"signInActor"})}}),spawnSignUpActor:e({actorRef:function(t,o){var n,r,i,e,s,c,u,d=t.services,l=v({services:d}).withContext({authAttributes:null!==(r=null===(n=t.actorDoneData)||void 0===n?void 0:n.authAttributes)&&void 0!==r?r:{},country_code:"+1",intent:null===(i=t.actorDoneData)||void 0===i?void 0:i.intent,formValues:{},touched:{},validationError:{},loginMechanisms:null===(e=t.config)||void 0===e?void 0:e.loginMechanisms,socialProviders:null===(s=t.config)||void 0===s?void 0:s.socialProviders,formFields:null===(c=t.config)||void 0===c?void 0:c.formFields,passwordSettings:null===(u=t.config)||void 0===u?void 0:u.passwordSettings});return a(l,{name:"signUpActor"})}}),spawnResetPasswordActor:e({actorRef:function(t,o){var n,r,i,e,s=t.services,c=l({services:s}).withContext({formValues:{},touched:{},intent:null===(n=t.actorDoneData)||void 0===n?void 0:n.intent,username:null===(i=null===(r=t.actorDoneData)||void 0===r?void 0:r.authAttributes)||void 0===i?void 0:i.username,formFields:null===(e=t.config)||void 0===e?void 0:e.formFields,validationError:{}});return a(c,{name:"resetPasswordActor"})}}),spawnSignOutActor:e({actorRef:function(t){var o=d.withContext({user:t.user});return a(o,{name:"signOutActor"})}}),stopSignInActor:c("signInActor"),stopSignUpActor:c("signUpActor"),stopResetPasswordActor:c("resetPasswordActor"),stopSignOutActor:c("signOutActor"),configure:e((function(o,r){var i=r.data,e=i.services,a=n(i,["services"]);return{services:t(t({},g),e),config:a}})),setHasSetup:e({hasSetup:!0})},guards:{isInitialStateSignUp:function(t){return"signUp"===t.config.initialState},isInitialStateResetPassword:function(t){return"resetPassword"===t.config.initialState},shouldRedirectToSignUp:function(t,o){var n;return"confirmSignUp"===(null===(n=o.data)||void 0===n?void 0:n.intent)},shouldRedirectToResetPassword:function(t,o){var n;return"confirmPasswordReset"===(null===(n=o.data)||void 0===n?void 0:n.intent)},shouldSetup:function(t){return!1===t.hasSetup},hasActor:function(t){return!!t.actorRef}},services:{getCurrentUser:function(t,o){return t.services.getCurrentUser()},getAmplifyConfig:function(t,o){return t.services.getAmplifyConfig()}}})}function p(t){return t&&Object.keys(t).forEach((function(o){Object.keys(t[o]).forEach((function(n){var r=t[o][n];r.required=r.isRequired}))})),t}export{f as createAuthenticatorMachine};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var l={red:{10:{value:"hsl(0, 75%, 95%)"},20:{value:"hsl(0, 75%, 85%)"},40:{value:"hsl(0, 75%, 75%)"},60:{value:"hsl(0, 50%, 50%)"},80:{value:"hsl(0, 95%, 30%)"},90:{value:"hsl(0, 100%, 20%)"},100:{value:"hsl(0, 100%, 15%)"}},orange:{10:{value:"hsl(30, 75%, 95%)"},20:{value:"hsl(30, 75%, 85%)"},40:{value:"hsl(30, 75%, 75%)"},60:{value:"hsl(30, 50%, 50%)"},80:{value:"hsl(30, 95%, 30%)"},90:{value:"hsl(30, 100%, 20%)"},100:{value:"hsl(30, 100%, 15%)"}},yellow:{10:{value:"hsl(60, 75%, 95%)"},20:{value:"hsl(60, 75%, 85%)"},40:{value:"hsl(60, 75%, 75%)"},60:{value:"hsl(60, 50%, 50%)"},80:{value:"hsl(60, 95%, 30%)"},90:{value:"hsl(60, 100%, 20%)"},100:{value:"hsl(60, 100%, 15%)"}},green:{10:{value:"hsl(130, 60%, 95%)"},20:{value:"hsl(130, 60%, 90%)"},40:{value:"hsl(130, 44%, 63%)"},60:{value:"hsl(130, 43%, 46%)"},80:{value:"hsl(130, 33%, 37%)"},90:{value:"hsl(130, 27%, 29%)"},100:{value:"hsl(130, 22%, 23%)"}},teal:{10:{value:"hsl(190, 75%, 95%)"},20:{value:"hsl(190, 75%, 85%)"},40:{value:"hsl(190, 70%, 70%)"},60:{value:"hsl(190, 50%, 50%)"},80:{value:"hsl(190, 95%, 30%)"},90:{value:"hsl(190, 100%, 20%)"},100:{value:"hsl(190, 100%, 15%)"}},blue:{10:{value:"hsl(220, 95%, 95%)"},20:{value:"hsl(220, 85%, 85%)"},40:{value:"hsl(220, 70%, 70%)"},60:{value:"hsl(220, 50%, 50%)"},80:{value:"hsl(220, 95%, 30%)"},90:{value:"hsl(220, 100%, 20%)"},100:{value:"hsl(220, 100%, 15%)"}},purple:{10:{value:"hsl(300, 95%, 95%)"},20:{value:"hsl(300, 85%, 85%)"},40:{value:"hsl(300, 70%, 70%)"},60:{value:"hsl(300, 50%, 50%)"},80:{value:"hsl(300, 95%, 30%)"},90:{value:"hsl(300, 100%, 20%)"},100:{value:"hsl(300, 100%, 15%)"}},pink:{10:{value:"hsl(340, 95%, 95%)"},20:{value:"hsl(340, 90%, 85%)"},40:{value:"hsl(340, 70%, 70%)"},60:{value:"hsl(340, 50%, 50%)"},80:{value:"hsl(340, 95%, 30%)"},90:{value:"hsl(340, 100%, 20%)"},100:{value:"hsl(340, 100%, 15%)"}},neutral:{10:{value:"hsl(210, 5%, 98%)"},20:{value:"hsl(210, 5%, 94%)"},40:{value:"hsl(210, 5%, 87%)"},60:{value:"hsl(210,
|
|
1
|
+
var l={red:{10:{value:"hsl(0, 75%, 95%)"},20:{value:"hsl(0, 75%, 85%)"},40:{value:"hsl(0, 75%, 75%)"},60:{value:"hsl(0, 50%, 50%)"},80:{value:"hsl(0, 95%, 30%)"},90:{value:"hsl(0, 100%, 20%)"},100:{value:"hsl(0, 100%, 15%)"}},orange:{10:{value:"hsl(30, 75%, 95%)"},20:{value:"hsl(30, 75%, 85%)"},40:{value:"hsl(30, 75%, 75%)"},60:{value:"hsl(30, 50%, 50%)"},80:{value:"hsl(30, 95%, 30%)"},90:{value:"hsl(30, 100%, 20%)"},100:{value:"hsl(30, 100%, 15%)"}},yellow:{10:{value:"hsl(60, 75%, 95%)"},20:{value:"hsl(60, 75%, 85%)"},40:{value:"hsl(60, 75%, 75%)"},60:{value:"hsl(60, 50%, 50%)"},80:{value:"hsl(60, 95%, 30%)"},90:{value:"hsl(60, 100%, 20%)"},100:{value:"hsl(60, 100%, 15%)"}},green:{10:{value:"hsl(130, 60%, 95%)"},20:{value:"hsl(130, 60%, 90%)"},40:{value:"hsl(130, 44%, 63%)"},60:{value:"hsl(130, 43%, 46%)"},80:{value:"hsl(130, 33%, 37%)"},90:{value:"hsl(130, 27%, 29%)"},100:{value:"hsl(130, 22%, 23%)"}},teal:{10:{value:"hsl(190, 75%, 95%)"},20:{value:"hsl(190, 75%, 85%)"},40:{value:"hsl(190, 70%, 70%)"},60:{value:"hsl(190, 50%, 50%)"},80:{value:"hsl(190, 95%, 30%)"},90:{value:"hsl(190, 100%, 20%)"},100:{value:"hsl(190, 100%, 15%)"}},blue:{10:{value:"hsl(220, 95%, 95%)"},20:{value:"hsl(220, 85%, 85%)"},40:{value:"hsl(220, 70%, 70%)"},60:{value:"hsl(220, 50%, 50%)"},80:{value:"hsl(220, 95%, 30%)"},90:{value:"hsl(220, 100%, 20%)"},100:{value:"hsl(220, 100%, 15%)"}},purple:{10:{value:"hsl(300, 95%, 95%)"},20:{value:"hsl(300, 85%, 85%)"},40:{value:"hsl(300, 70%, 70%)"},60:{value:"hsl(300, 50%, 50%)"},80:{value:"hsl(300, 95%, 30%)"},90:{value:"hsl(300, 100%, 20%)"},100:{value:"hsl(300, 100%, 15%)"}},pink:{10:{value:"hsl(340, 95%, 95%)"},20:{value:"hsl(340, 90%, 85%)"},40:{value:"hsl(340, 70%, 70%)"},60:{value:"hsl(340, 50%, 50%)"},80:{value:"hsl(340, 95%, 30%)"},90:{value:"hsl(340, 100%, 20%)"},100:{value:"hsl(340, 100%, 15%)"}},neutral:{10:{value:"hsl(210, 5%, 98%)"},20:{value:"hsl(210, 5%, 94%)"},40:{value:"hsl(210, 5%, 87%)"},60:{value:"hsl(210, 8%, 55%)"},80:{value:"hsl(210, 10%, 40%)"},90:{value:"hsl(210, 25%, 25%)"},100:{value:"hsl(210, 50%, 10%)"}},brand:{primary:{10:{value:"{colors.teal.10.value}"},20:{value:"{colors.teal.20.value}"},40:{value:"{colors.teal.40.value}"},60:{value:"{colors.teal.60.value}"},80:{value:"{colors.teal.80.value}"},90:{value:"{colors.teal.90.value}"},100:{value:"{colors.teal.100.value}"}},secondary:{10:{value:"{colors.purple.10.value}"},20:{value:"{colors.purple.20.value}"},40:{value:"{colors.purple.40.value}"},60:{value:"{colors.purple.60.value}"},80:{value:"{colors.purple.80.value}"},90:{value:"{colors.purple.90.value}"},100:{value:"{colors.purple.100.value}"}}},font:{primary:{value:"{colors.neutral.100.value}"},secondary:{value:"{colors.neutral.90.value}"},tertiary:{value:"{colors.neutral.80.value}"},disabled:{value:"{colors.font.tertiary.value}"},inverse:{value:"{colors.white.value}"},interactive:{value:"{colors.brand.primary.80.value}"},hover:{value:"{colors.brand.primary.90.value}"},focus:{value:"{colors.brand.primary.100.value}"},active:{value:"{colors.brand.primary.100.value}"},info:{value:"{colors.blue.90.value}"},warning:{value:"{colors.orange.90.value}"},error:{value:"{colors.red.90.value}"},success:{value:"{colors.green.90.value}"}},background:{primary:{value:"{colors.white.value}"},secondary:{value:"{colors.neutral.10.value}"},tertiary:{value:"{colors.neutral.20.value}"},quaternary:{value:"{colors.neutral.60.value}"},disabled:{value:"{colors.background.tertiary.value}"},info:{value:"{colors.blue.20.value}"},warning:{value:"{colors.orange.20.value}"},error:{value:"{colors.red.20.value}"},success:{value:"{colors.green.20.value}"}},border:{primary:{value:"{colors.neutral.60.value}"},secondary:{value:"{colors.neutral.40.value}"},tertiary:{value:"{colors.neutral.20.value}"},disabled:{value:"{colors.border.tertiary.value}"},focus:{value:"{colors.brand.primary.100.value}"},error:{value:"{colors.red.80.value}"}},shadow:{primary:{value:"hsla(210, 50%, 10%, 0.25)"},secondary:{value:"hsla(210, 50%, 10%, 0.15)"},tertiary:{value:"hsla(210, 50%, 10%, 0.05)"}},overlay:{10:{value:"hsla(0, 0%, 0%, 0.1)"},20:{value:"hsla(0, 0%, 0%, 0.2)"},30:{value:"hsla(0, 0%, 0%, 0.3)"},40:{value:"hsla(0, 0%, 0%, 0.4)"},50:{value:"hsla(0, 0%, 0%, 0.5)"},60:{value:"hsla(0, 0%, 0%, 0.6)"},70:{value:"hsla(0, 0%, 0%, 0.7)"},80:{value:"hsla(0, 0%, 0%, 0.8)"},90:{value:"hsla(0, 0%, 0%, 0.9)"}},black:{value:"hsl(0, 0%, 0%)"},white:{value:"hsl(0, 0%, 100%)"},transparent:{value:"transparent"}};export{l as colors};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var o={active:{color:{value:"{colors.font.active.value}"}},color:{value:"{colors.font.interactive.value}"},focus:{color:{value:"{colors.font.focus.value}"}},hover:{color:{value:"{colors.font.hover.value}"}},
|
|
1
|
+
var o={active:{color:{value:"{colors.font.active.value}"}},color:{value:"{colors.font.interactive.value}"},focus:{color:{value:"{colors.font.focus.value}"}},hover:{color:{value:"{colors.font.hover.value}"}},visited:{color:{value:"{colors.font.interactive.value}"}}};export{o as link};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var r={paddingBlock:{value:"{space.xs.value}"},track:{backgroundColor:{value:"{colors.background.
|
|
1
|
+
var r={paddingBlock:{value:"{space.xs.value}"},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"9999px"},height:{value:"0.375rem"},minWidth:{value:"10rem"}},range:{backgroundColor:{value:"{colors.brand.primary.80.value}"},borderRadius:{value:"9999px"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}},thumb:{width:{value:"1.25rem"},height:{value:"1.25rem"},backgroundColor:{value:"{colors.background.primary.value}"},boxShadow:{value:"{shadows.small.value}"},borderRadius:{value:"50%"},borderWidth:{value:"{borderWidths.small.value}"},borderColor:{value:"{colors.border.primary.value}"},borderStyle:{value:"solid"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"},borderColor:{value:"transparent"},boxShadow:{value:"none"}},_hover:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.focus.value}"}},_focus:{boxShadow:{value:{offsetX:"0",offsetY:"0",blurRadius:"0",spreadRadius:"3px",color:"{colors.border.focus.value}"}}}},small:{track:{height:{value:"0.25rem"}},thumb:{width:{value:"1rem"},height:{value:"1rem"}}},large:{track:{height:{value:"0.625rem"}},thumb:{width:{value:"1.5rem"},height:{value:"1.5rem"}}}};export{r as sliderfield};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={_disabled:{opacity:{value:"{opacities.60.value}"}},_focused:{shadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.focus.value}"}}},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}},label:{padding:{value:"{space.xs.value}"}},thumb:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.tertiary.value}"},borderRadius:{value:"{radii.xxxl.value}"},checked:{transform:{value:"{transforms.slideX.medium.value}"}},transition:{duration:{value:"{time.medium.value}"}},width:{value:"{space.relative.medium.value}"}},track:{backgroundColor:{value:"{colors.background.
|
|
1
|
+
var e={_disabled:{opacity:{value:"{opacities.60.value}"}},_focused:{shadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.focus.value}"}}},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}},label:{padding:{value:"{space.xs.value}"}},thumb:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.tertiary.value}"},borderRadius:{value:"{radii.xxxl.value}"},checked:{transform:{value:"{transforms.slideX.medium.value}"}},transition:{duration:{value:"{time.medium.value}"}},width:{value:"{space.relative.medium.value}"}},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"{radii.xxxl.value}"},checked:{backgroundColor:{value:"{colors.brand.primary.80.value}"}},height:{value:"{space.relative.medium.value}"},padding:{value:"{outlineWidths.medium.value}"},transition:{duration:{value:"{time.short.value}"}},width:{value:"{space.relative.xl.value}"}}};export{e as switchfield};
|