fix: rename outlined bottom to underlined

This commit is contained in:
jongomez 2023-10-09 13:35:09 +01:00 committed by Jon
parent 9dc44e6d90
commit c993d0febb
18 changed files with 30 additions and 31 deletions

View File

@ -16,5 +16,5 @@ export const autocompleteClasses = {
small: `lsd-autocomplete--small`, small: `lsd-autocomplete--small`,
withIcon: `lsd-autocomplete--with-icon`, withIcon: `lsd-autocomplete--with-icon`,
outlined: `lsd-autocomplete--outlined`, outlined: `lsd-autocomplete--outlined`,
outlinedBottom: `lsd-autocomplete--outlined-bottom`, underlined: `lsd-autocomplete--underlined`,
} }

View File

@ -19,7 +19,7 @@ export default {
variant: { variant: {
type: { type: {
name: 'enum', name: 'enum',
value: ['outlined', 'outlined-bottom'], value: ['outlined', 'underlined'],
}, },
defaultValue: 'large', defaultValue: 'large',
}, },

View File

@ -114,8 +114,7 @@ export const AutocompleteStyles = css`
border: 1px solid rgb(var(--lsd-border-primary)); border: 1px solid rgb(var(--lsd-border-primary));
} }
.${autocompleteClasses.outlinedBottom} .${autocompleteClasses.underlined} .${autocompleteClasses.inputContainer} {
.${autocompleteClasses.inputContainer} {
border: 1px solid transparent; border: 1px solid transparent;
border-bottom: 1px solid rgb(var(--lsd-border-primary)); border-bottom: 1px solid rgb(var(--lsd-border-primary));
} }

View File

@ -27,7 +27,7 @@ export type AutocompleteProps = CommonProps &
defaultValue?: string defaultValue?: string
options?: string[] options?: string[]
inputProps?: React.InputHTMLAttributes<HTMLInputElement> inputProps?: React.InputHTMLAttributes<HTMLInputElement>
variant?: 'outlined' | 'outlined-bottom' variant?: 'outlined' | 'underlined'
} }
export const Autocomplete: React.FC<AutocompleteProps> & { export const Autocomplete: React.FC<AutocompleteProps> & {
@ -102,7 +102,7 @@ export const Autocomplete: React.FC<AutocompleteProps> & {
withIcon && autocompleteClasses.withIcon, withIcon && autocompleteClasses.withIcon,
variant === 'outlined' variant === 'outlined'
? autocompleteClasses.outlined ? autocompleteClasses.outlined
: autocompleteClasses.outlinedBottom, : autocompleteClasses.underlined,
)} )}
> >
{label && ( {label && (

View File

@ -18,5 +18,5 @@ export const dateFieldClasses = {
small: `lsd-date-field--small`, small: `lsd-date-field--small`,
outlined: `lsd-date-field--outlined`, outlined: `lsd-date-field--outlined`,
outlinedBottom: `lsd-date-field--outlined-bottom`, underlined: `lsd-date-field--underlined`,
} }

View File

@ -15,7 +15,7 @@ export default {
variant: { variant: {
type: { type: {
name: 'enum', name: 'enum',
value: ['outlined', 'outlined-bottom'], value: ['outlined', 'underlined'],
}, },
defaultValue: 'large', defaultValue: 'large',
}, },
@ -37,7 +37,7 @@ export const Uncontrolled: StoryObj<DateFieldProps> = {
error: false, error: false,
errorIcon: false, errorIcon: false,
clearButton: true, clearButton: true,
variant: 'outlined-bottom', variant: 'underlined',
label: 'Label', label: 'Label',
}, },
} }
@ -57,7 +57,7 @@ export const Controlled: StoryObj<DateFieldProps> = {
error: false, error: false,
errorIcon: false, errorIcon: false,
clearButton: true, clearButton: true,
variant: 'outlined-bottom', variant: 'underlined',
label: 'Label', label: 'Label',
}, },
} }

View File

@ -21,7 +21,7 @@ export const DateFieldStyles = css`
border: 1px solid rgb(var(--lsd-border-primary)); border: 1px solid rgb(var(--lsd-border-primary));
} }
.${dateFieldClasses.outlinedBottom} { .${dateFieldClasses.underlined} {
border-bottom: 1px solid rgb(var(--lsd-border-primary)); border-bottom: 1px solid rgb(var(--lsd-border-primary));
} }

View File

@ -23,7 +23,7 @@ export type DateFieldProps = Omit<
icon?: React.ReactNode icon?: React.ReactNode
onIconClick?: () => void onIconClick?: () => void
inputProps?: React.InputHTMLAttributes<HTMLInputElement> inputProps?: React.InputHTMLAttributes<HTMLInputElement>
variant?: 'outlined' | 'outlined-bottom' variant?: 'outlined' | 'underlined'
calendarIconRef?: React.RefObject<HTMLSpanElement> calendarIconRef?: React.RefObject<HTMLSpanElement>
} }
@ -45,7 +45,7 @@ export const DateField: React.FC<DateFieldProps> & {
icon, icon,
onIconClick, onIconClick,
inputProps = {}, inputProps = {},
variant = 'outlined-bottom', variant = 'underlined',
...props ...props
}) => { }) => {
const ref = useRef<HTMLInputElement>(null) const ref = useRef<HTMLInputElement>(null)
@ -87,7 +87,7 @@ export const DateField: React.FC<DateFieldProps> & {
dateFieldClasses.inputContainer, dateFieldClasses.inputContainer,
variant === 'outlined' variant === 'outlined'
? dateFieldClasses.outlined ? dateFieldClasses.outlined
: dateFieldClasses.outlinedBottom, : dateFieldClasses.underlined,
)} )}
> >
<input <input

View File

@ -15,7 +15,7 @@ export default {
variant: { variant: {
type: { type: {
name: 'enum', name: 'enum',
value: ['outlined', 'outlined-bottom'], value: ['outlined', 'underlined'],
}, },
defaultValue: 'large', defaultValue: 'large',
}, },
@ -38,7 +38,7 @@ export const Uncontrolled: StoryObj<DatePickerProps> = {
clearButton: true, clearButton: true,
withCalendar: true, withCalendar: true,
size: 'large', size: 'large',
variant: 'outlined-bottom', variant: 'underlined',
label: 'Label', label: 'Label',
}, },
} }
@ -59,7 +59,7 @@ export const Controlled: StoryObj<DatePickerProps> = {
clearButton: true, clearButton: true,
withCalendar: true, withCalendar: true,
size: 'large', size: 'large',
variant: 'outlined-bottom', variant: 'underlined',
label: 'Label', label: 'Label',
}, },
} }

View File

@ -27,7 +27,7 @@ export type DatePickerProps = Omit<
defaultValue?: string defaultValue?: string
placeholder?: string placeholder?: string
size?: 'large' | 'medium' | 'small' size?: 'large' | 'medium' | 'small'
variant?: 'outlined' | 'outlined-bottom' variant?: 'outlined' | 'underlined'
inputProps?: React.InputHTMLAttributes<HTMLInputElement> inputProps?: React.InputHTMLAttributes<HTMLInputElement>
} }
@ -39,7 +39,7 @@ export const DatePicker: React.FC<DatePickerProps> & {
value: valueProp, value: valueProp,
onChange, onChange,
withCalendar = true, withCalendar = true,
variant = 'outlined-bottom', variant = 'underlined',
...props ...props
}) => { }) => {
const ref = useRef<HTMLDivElement>(null) const ref = useRef<HTMLDivElement>(null)

View File

@ -20,5 +20,5 @@ export const dropdownClasses = {
medium: `lsd-dropdown--medium`, medium: `lsd-dropdown--medium`,
large: `lsd-dropdown--large`, large: `lsd-dropdown--large`,
outlined: `lsd-dropdown--outlined`, outlined: `lsd-dropdown--outlined`,
outlinedBottom: `lsd-dropdown--outlined-bottom`, underlined: `lsd-dropdown--underlined`,
} }

View File

@ -8,7 +8,7 @@ export default {
variant: { variant: {
type: { type: {
name: 'enum', name: 'enum',
value: ['outlined', 'outlined-bottom'], value: ['outlined', 'underlined'],
}, },
defaultValue: 'large', defaultValue: 'large',
}, },

View File

@ -135,7 +135,7 @@ export const DropdownStyles = css`
} }
} }
.${dropdownClasses.outlinedBottom} { .${dropdownClasses.underlined} {
.${dropdownClasses.buttonContainer} { .${dropdownClasses.buttonContainer} {
border: 1px solid transparent; border: 1px solid transparent;
border-bottom: 1px solid rgb(var(--lsd-border-primary)); border-bottom: 1px solid rgb(var(--lsd-border-primary));

View File

@ -31,7 +31,7 @@ export type DropdownProps = CommonProps &
options?: DropdownOption[] options?: DropdownOption[]
value?: string | string[] value?: string | string[]
onChange?: (value: string | string[]) => void onChange?: (value: string | string[]) => void
variant?: 'outlined' | 'outlined-bottom' variant?: 'outlined' | 'underlined'
isOpen?: boolean isOpen?: boolean
onToggle?: (open: boolean) => void onToggle?: (open: boolean) => void
} }
@ -103,7 +103,7 @@ export const Dropdown: React.FC<DropdownProps> & {
openState && dropdownClasses.open, openState && dropdownClasses.open,
variant === 'outlined' variant === 'outlined'
? dropdownClasses.outlined ? dropdownClasses.outlined
: dropdownClasses.outlinedBottom, : dropdownClasses.underlined,
)} )}
> >
{label && ( {label && (

View File

@ -13,5 +13,5 @@ export const textFieldClasses = {
large: `lsd-text-field--large`, large: `lsd-text-field--large`,
medium: `lsd-text-field--medium`, medium: `lsd-text-field--medium`,
outlined: `lsd-text-field--outlined`, outlined: `lsd-text-field--outlined`,
outlinedBottom: `lsd-text-field--outlined-bottom`, underlined: `lsd-text-field--underlined`,
} }

View File

@ -23,7 +23,7 @@ export default {
variant: { variant: {
type: { type: {
name: 'enum', name: 'enum',
value: ['outlined', 'outlined-bottom'], value: ['outlined', 'underlined'],
}, },
defaultValue: 'large', defaultValue: 'large',
}, },
@ -48,7 +48,7 @@ export const Root: StoryObj<Omit<TextFieldProps, 'icon'> & { icon: string }> = {
error: false, error: false,
errorIcon: false, errorIcon: false,
icon: 'None', icon: 'None',
variant: 'outlined-bottom', variant: 'underlined',
clearButton: true, clearButton: true,
placeholder: 'Placeholder', placeholder: 'Placeholder',
defaultValue: 'default value', defaultValue: 'default value',

View File

@ -60,7 +60,7 @@ export const TextFieldStyles = css`
border: 1px solid rgb(var(--lsd-border-primary)); border: 1px solid rgb(var(--lsd-border-primary));
} }
.${textFieldClasses.outlinedBottom} { .${textFieldClasses.underlined} {
border: 1px solid transparent; border: 1px solid transparent;
border-bottom: 1px solid rgb(var(--lsd-border-primary)); border-bottom: 1px solid rgb(var(--lsd-border-primary));
} }

View File

@ -25,7 +25,7 @@ export type TextFieldProps = CommonProps &
defaultValue?: string defaultValue?: string
placeholder?: string placeholder?: string
inputProps?: React.InputHTMLAttributes<HTMLInputElement> inputProps?: React.InputHTMLAttributes<HTMLInputElement>
variant?: 'outlined' | 'outlined-bottom' variant?: 'outlined' | 'underlined'
} }
export const TextField: React.FC<TextFieldProps> & { export const TextField: React.FC<TextFieldProps> & {
@ -44,7 +44,7 @@ export const TextField: React.FC<TextFieldProps> & {
disabled, disabled,
onChange, onChange,
inputProps = {}, inputProps = {},
variant = 'outlined-bottom', variant = 'underlined',
...props ...props
}) => { }) => {
const commonProps = useCommonProps(props) const commonProps = useCommonProps(props)
@ -66,7 +66,7 @@ export const TextField: React.FC<TextFieldProps> & {
error && textFieldClasses.error, error && textFieldClasses.error,
variant === 'outlined' variant === 'outlined'
? textFieldClasses.outlined ? textFieldClasses.outlined
: textFieldClasses.outlinedBottom, : textFieldClasses.underlined,
)} )}
> >
<div className={textFieldClasses.inputContainer}> <div className={textFieldClasses.inputContainer}>