@aws-amplify/ui-react 2.19.0 → 2.19.1
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/shared/FormField.js +1 -1
- package/dist/esm/components/Authenticator/shared/ValidationErrors.js +1 -1
- package/dist/esm/primitives/SearchField/SearchField.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +358 -1189
- package/dist/types/components/Authenticator/shared/ValidationErrors.d.ts +2 -1
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as r}from"../../../node_modules/tslib/tslib.es6.js";import{jsxs as e,Fragment as o,jsx as
|
|
1
|
+
import{__rest as r}from"../../../node_modules/tslib/tslib.es6.js";import{jsxs as e,Fragment as o,jsx as i}from"react/jsx-runtime";import*as t from"react";import{getErrors as s}from"@aws-amplify/ui";import{PasswordField as a}from"../../../primitives/PasswordField/PasswordField.js";import{PhoneNumberField as m}from"../../../primitives/PhoneNumberField/PhoneNumberField.js";import{TextField as d}from"../../../primitives/TextField/TextField.js";import{useAuthenticator as l}from"../hooks/useAuthenticator/index.js";import{ValidationErrors as n}from"./ValidationErrors.js";import{useStableId as p}from"../../../primitives/utils/useStableId.js";function u(u){var{autocomplete:c,dialCode:b,name:f,type:h}=u,j=r(u,["autocomplete","dialCode","name","type"]);const{validationErrors:y}=l((({validationErrors:r})=>[r])),v=t.useMemo((()=>s(y[f])),[f,y]),C=(null==v?void 0:v.length)>0,E=p(),F=C?E:void 0;return e(o,"tel"===h?{children:[i(m,Object.assign({},j,{name:f,defaultCountryCode:b,countryCodeName:"country_code",autoComplete:c,hasError:C,"aria-describedby":F})),i(n,{errors:v,id:E})]}:"password"===h?{children:[i(a,Object.assign({},j,{name:f,autoComplete:c,hasError:C,"aria-describedby":F})),i(n,{errors:v,id:E})]}:{children:[i(d,Object.assign({},j,{name:f,autoComplete:c,hasError:C,type:h,"aria-describedby":F})),i(n,{errors:v,id:E})]})}export{u as FormField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{translate as i}from"@aws-amplify/ui";import{View as e}from"../../../primitives/View/View.js";import{Text as t}from"../../../primitives/Text/Text.js";const o=({errors:o})=>(null==o?void 0:o.length)>0?r(e,Object.assign({"data-amplify-sign-up-errors":!0},{children:o.map(((e,o)=>r(t,Object.assign({role:"alert",variation:"error"},{children:i(e)}),e)))})):null;export{o as ValidationErrors};
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{translate as i}from"@aws-amplify/ui";import{View as e}from"../../../primitives/View/View.js";import{Text as t}from"../../../primitives/Text/Text.js";const o=({errors:o,id:m})=>(null==o?void 0:o.length)>0?r(e,Object.assign({"data-amplify-sign-up-errors":!0,id:m},{children:o.map(((e,o)=>r(t,Object.assign({role:"alert",variation:"error"},{children:i(e)}),e)))})):null;export{o as ValidationErrors};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as e}from"../../node_modules/tslib/tslib.es6.js";import{jsx as o}from"react/jsx-runtime";import
|
|
1
|
+
import{__rest as e}from"../../node_modules/tslib/tslib.es6.js";import{jsx as o}from"react/jsx-runtime";import i from"classnames";import*as r from"react";import{ComponentClassNames as a}from"../shared/constants.js";import{FieldClearButton as s}from"../Field/FieldClearButton.js";import"../Field/FieldDescription.js";import"../Field/FieldErrorMessage.js";import{strHasLength as t}from"../shared/utils.js";import{SearchFieldButton as l}from"./SearchFieldButton.js";import{TextField as n}from"../TextField/TextField.js";import{useSearchField as m}from"./useSearchField.js";const d=r.forwardRef(((r,d)=>{var{autoComplete:c="off",className:u,isDisabled:p,clearButtonLabel:f,labelHidden:b=!0,name:C="q",onSubmit:F,onClear:j,searchButtonRef:h,size:D}=r,S=e(r,["autoComplete","className","isDisabled","clearButtonLabel","labelHidden","name","onSubmit","onClear","searchButtonRef","size"]);const{value:x,onClearHandler:B,onInput:z,onKeyDown:R,onClick:k,composedRefs:v}=m({onSubmit:F,onClear:j,externalRef:d});return o(n,Object.assign({autoComplete:c,className:i(a.SearchField,u),labelHidden:b,innerEndComponent:o(s,{ariaLabel:f,excludeFromTabOrder:!0,isVisible:t(x),onClick:B,size:D,variation:"link"}),isDisabled:p,isMultiline:!1,name:C,onInput:z,onKeyDown:R,outerEndComponent:o(l,{isDisabled:p,onClick:k,ref:h,size:D}),ref:v,size:D,value:x},S))}));d.displayName="SearchField";export{d as SearchField};
|