Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions src/Select.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import styled from 'styled-components'
import TextInputWrapper, {StyledWrapperProps} from './_TextInputWrapper'
import TextInputWrapper, {StyledWrapperProps} from './internal/components/TextInputWrapper'

export type SelectProps = Omit<
Omit<React.ComponentPropsWithoutRef<'select'>, 'size'> & Omit<StyledWrapperProps, 'variant'>,
Expand All @@ -21,7 +21,7 @@ const StyledSelect = styled.select`
/* Firefox hacks: */
/* 1. Makes Firefox's native dropdown menu's background match the theme.

background-color should be 'transparent', but Firefox uses the background-color on
background-color should be 'transparent', but Firefox uses the background-color on
<select> to determine the background color used for the dropdown menu.

2. Adds 1px margins to the <select> so the background color doesn't hide the focus outline created with an inset box-shadow.
Expand All @@ -32,15 +32,15 @@ const StyledSelect = styled.select`
margin-bottom: 1px;

/* 2. Prevents visible overlap of partially transparent background colors.

'colors.input.disabledBg' happens to be partially transparent in light mode, so we use a
transparent background-color on a disabled <select>. */
&:disabled {
background-color: transparent;
}

/* 3. Maintain dark bg color in Firefox on Windows high-contrast mode

Firefox makes the <select>'s background color white when setting 'background-color: transparent;' */
@media screen and (forced-colors: active) {
&:disabled {
Expand Down
2 changes: 1 addition & 1 deletion src/Select/Select.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import styled from 'styled-components'
import TextInputWrapper, {StyledWrapperProps} from '../_TextInputWrapper'
import TextInputWrapper, {StyledWrapperProps} from '../internal/components/TextInputWrapper'

export type SelectProps = Omit<
Omit<React.ComponentPropsWithoutRef<'select'>, 'size'> & Omit<StyledWrapperProps, 'variant'>,
Expand Down
2 changes: 1 addition & 1 deletion src/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import classnames from 'classnames'
import TextInputInnerVisualSlot from '../_TextInputInnerVisualSlot'
import {useProvidedRefOrCreate} from '../hooks'
import {Merge} from '../utils/types'
import TextInputWrapper, {StyledWrapperProps} from '../_TextInputWrapper'
import TextInputWrapper, {StyledWrapperProps} from '../internal/components/TextInputWrapper'
import UnstyledTextInput from '../_UnstyledTextInput'
import TextInputAction from '../_TextInputInnerAction'

Expand Down
2 changes: 1 addition & 1 deletion src/TextInputWithTokens/TextInputWithTokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {TextInputProps} from '../TextInput'
import Token from '../Token/Token'
import {TokenSizeKeys} from '../Token/TokenBase'
import TextInputInnerVisualSlot from '../_TextInputInnerVisualSlot'
import TextInputWrapper, {textInputHorizPadding, TextInputSizes} from '../_TextInputWrapper'
import TextInputWrapper, {textInputHorizPadding, TextInputSizes} from '../internal/components/TextInputWrapper'
import UnstyledTextInput from '../_UnstyledTextInput'

// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down
2 changes: 1 addition & 1 deletion src/Textarea/Textarea.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled, {css} from 'styled-components'
import React, {TextareaHTMLAttributes, ReactElement} from 'react'
import {TextInputBaseWrapper} from '../_TextInputWrapper'
import {TextInputBaseWrapper} from '../internal/components/TextInputWrapper'
import {FormValidationStatus} from '../utils/types/FormValidationStatus'
import sx, {SxProp} from '../sx'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import styled, {css} from 'styled-components'
import {maxWidth, MaxWidthProps, minWidth, MinWidthProps, variant, width, WidthProps} from 'styled-system'
import {get} from './constants'
import sx, {SxProp} from './sx'
import {FormValidationStatus} from './utils/types/FormValidationStatus'
import {get} from '../../constants'
import sx, {SxProp} from '../../sx'
import {FormValidationStatus} from '../../utils/types/FormValidationStatus'

export type TextInputSizes = 'small' | 'medium' | 'large'

Expand Down