Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): Addition of search to TextInputType #1518

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions src/core/primitives/textInput/textInput.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import {CloseIcon} from '@sanity/icons'
import {ThemeFontWeightKey} from '@sanity/ui/theme'
import {forwardRef, isValidElement, useCallback, useImperativeHandle, useMemo, useRef} from 'react'
import {isValidElementType} from 'react-is'
import {styled} from 'styled-components'
import {EMPTY_RECORD} from '../../constants'
import {useArrayProp, useCustomValidity} from '../../hooks'
import { CloseIcon } from '@sanity/icons'

Check failure on line 1 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·CloseIcon·` with `CloseIcon`
import { ThemeFontWeightKey } from '@sanity/ui/theme'

Check failure on line 2 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·ThemeFontWeightKey·` with `ThemeFontWeightKey`
import { forwardRef, isValidElement, useCallback, useImperativeHandle, useMemo, useRef } from 'react'

Check failure on line 3 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·forwardRef,·isValidElement,·useCallback,·useImperativeHandle,·useMemo,·useRef·` with `forwardRef,·isValidElement,·useCallback,·useImperativeHandle,·useMemo,·useRef`
import { isValidElementType } from 'react-is'

Check failure on line 4 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·isValidElementType·` with `isValidElementType`
import { styled } from 'styled-components'

Check failure on line 5 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·styled·` with `styled`
import { EMPTY_RECORD } from '../../constants'

Check failure on line 6 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·EMPTY_RECORD·` with `EMPTY_RECORD`
import { useArrayProp, useCustomValidity } from '../../hooks'

Check failure on line 7 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·useArrayProp,·useCustomValidity·` with `useArrayProp,·useCustomValidity`
import {
responsiveInputPaddingStyle,
responsiveRadiusStyle,
ResponsiveRadiusStyleProps,
responsiveInputPaddingStyle,
TextInputInputStyleProps,
TextInputRepresentationStyleProps,
TextInputResponsivePaddingStyleProps,
textInputBaseStyle,
textInputFontSizeStyle,
TextInputInputStyleProps,
textInputRepresentationStyle,
TextInputRepresentationStyleProps,
TextInputResponsivePaddingStyleProps,
textInputRootStyle,
} from '../../styles/internal'
import {useRootTheme} from '../../theme'
import {Radius} from '../../types'
import {Box} from '../box'
import {Button, ButtonProps} from '../button'
import {Card} from '../card'
import {Text} from '../text'
import { useRootTheme } from '../../theme'

Check failure on line 20 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·useRootTheme·` with `useRootTheme`
import { Radius } from '../../types'

Check failure on line 21 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·Radius·` with `Radius`
import { Box } from '../box'

Check failure on line 22 in src/core/primitives/textInput/textInput.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Replace `·Box·` with `Box`
import { Button, ButtonProps } from '../button'
import { Card } from '../card'
import { Text } from '../text'

/**
* @public
Expand All @@ -34,6 +34,7 @@
* @public
*/
export type TextInputType =
| 'search'
| 'date'
| 'datetime-local'
| 'email'
Expand Down
Loading