From 74e76adbcf97f0ce76bbb3d3e382be52fdf3cfdb Mon Sep 17 00:00:00 2001 From: Harsh Karande Date: Fri, 4 Jun 2021 14:13:35 +0530 Subject: [PATCH] fix: remove ms-reveal for input (#553) * fix: remove ms-reveal for input * fix(lint): no-unused-vars for next line --- .../__snapshots__/search.test.tsx.snap | 32 +++++++++++++ .../__snapshots__/index.test.tsx.snap | 48 +++++++++++++++++++ .../__snapshots__/password.test.tsx.snap | 4 ++ components/input/input.tsx | 4 ++ .../create-geist-context.tsx | 8 ++-- 5 files changed, 92 insertions(+), 4 deletions(-) diff --git a/components/auto-complete/__tests__/__snapshots__/search.test.tsx.snap b/components/auto-complete/__tests__/__snapshots__/search.test.tsx.snap index bb26421..9ae1e5d 100644 --- a/components/auto-complete/__tests__/__snapshots__/search.test.tsx.snap +++ b/components/auto-complete/__tests__/__snapshots__/search.test.tsx.snap @@ -154,6 +154,10 @@ initialize { color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -272,6 +276,10 @@ initialize { color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -577,6 +585,10 @@ initialize { color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -695,6 +707,10 @@ initialize { color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -989,6 +1005,10 @@ initialize { color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -1107,6 +1127,10 @@ initialize { color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -1412,6 +1436,10 @@ initialize { color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -1530,6 +1558,10 @@ initialize { color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, diff --git a/components/input/__tests__/__snapshots__/index.test.tsx.snap b/components/input/__tests__/__snapshots__/index.test.tsx.snap index 4af4f8a..b7b6574 100644 --- a/components/input/__tests__/__snapshots__/index.test.tsx.snap +++ b/components/input/__tests__/__snapshots__/index.test.tsx.snap @@ -97,6 +97,10 @@ exports[`Input should be work with icon 1`] = ` color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -200,6 +204,10 @@ exports[`Input should be work with icon 1`] = ` color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -320,6 +328,10 @@ exports[`Input should be work with label 1`] = ` color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -436,6 +448,10 @@ exports[`Input should be work with label 1`] = ` color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -542,6 +558,10 @@ exports[`Input should be work with label 1`] = ` color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -634,6 +654,10 @@ exports[`Input should work with different sizes 1`] = ` color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -722,6 +746,10 @@ exports[`Input should work with different sizes 1`] = ` color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -810,6 +838,10 @@ exports[`Input should work with different sizes 1`] = ` color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -898,6 +930,10 @@ exports[`Input should work with different sizes 1`] = ` color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -990,6 +1026,10 @@ exports[`Input should work with different status 1`] = ` color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -1078,6 +1118,10 @@ exports[`Input should work with different status 1`] = ` color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, @@ -1166,6 +1210,10 @@ exports[`Input should work with different status 1`] = ` color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, diff --git a/components/input/__tests__/__snapshots__/password.test.tsx.snap b/components/input/__tests__/__snapshots__/password.test.tsx.snap index 7b4eded..76752b2 100644 --- a/components/input/__tests__/__snapshots__/password.test.tsx.snap +++ b/components/input/__tests__/__snapshots__/password.test.tsx.snap @@ -97,6 +97,10 @@ exports[`InputPassword should render correctly 1`] = ` color: #999; } + ::-ms-reveal { + display: none !important; + } + input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:active, diff --git a/components/input/input.tsx b/components/input/input.tsx index 32a62f5..2019c97 100644 --- a/components/input/input.tsx +++ b/components/input/input.tsx @@ -254,6 +254,10 @@ const Input = React.forwardRef(values: S): ContextStates => { const keys = Object.keys(values) as Array const handlers = keys.reduce>((pre, current) => { const updateHandler = { - // @ts-ignore - [`set${capitalize(current)}`]: (next: S[typeof current]) => {}, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + [`set${capitalize(current)}`]: (_next: S[typeof current]) => {}, } return { ...pre, ...updateHandler } }, {} as ContextHandler) - // @ts-ignore - const update: ContextHandlerWhere = (key, next) => {} + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const update: ContextHandlerWhere = (_key, _next) => {} return { update, ...values,