import type { Theme } from '@hero-design/rn'; const getTextInputTheme = (theme: Theme) => { const baseTextInputTheme = theme.__hd__.textInput; // Override specific values here as needed const colors = { ...baseTextInputTheme.colors, // Example: override specific colors asterisks: { default: theme.colors.onErrorSurface, error: theme.colors.onErrorSurface, disabled: theme.colors.disabledOnDefaultGlobalSurface, readonly: theme.colors.inactiveOnDefaultGlobalSurface, filled: theme.colors.onErrorSurface, }, borders: { default: theme.colors.secondaryOutline, error: theme.colors.onErrorSurface, disabled: theme.colors.disabledOutline, readonly: theme.colors.disabledOutline, filled: theme.colors.secondaryOutline, focused: theme.colors.primaryOutline, }, labels: { default: theme.colors.inactiveOnDefaultGlobalSurface, error: theme.colors.onErrorSurface, disabled: theme.colors.disabledOnDefaultGlobalSurface, readonly: theme.colors.inactiveOnDefaultGlobalSurface, filled: theme.colors.inactiveOnDefaultGlobalSurface, focused: theme.colors.onDefaultGlobalSurface, }, labelsInsideTextInput: { default: theme.colors.onDefaultGlobalSurface, error: theme.colors.onDefaultGlobalSurface, disabled: theme.colors.disabledOnDefaultGlobalSurface, readonly: theme.colors.inactiveOnDefaultGlobalSurface, filled: theme.colors.onDefaultGlobalSurface, }, maxLengthLabels: { default: theme.colors.onDefaultGlobalSurface, error: theme.colors.onErrorSurface, disabled: theme.colors.disabledOnDefaultGlobalSurface, readonly: theme.colors.inactiveOnDefaultGlobalSurface, filled: theme.colors.onDefaultGlobalSurface, focused: theme.colors.onDefaultGlobalSurface, }, }; const space = { ...baseTextInputTheme.space, // Example: override specific spacing containerPadding: theme.space.medium, errorMarginLeft: theme.space.xsmall, inputWrapperMarginVertical: theme.space.small, prefixAndInputContainerGap: theme.space.xsmall, }; const fonts = { ...baseTextInputTheme.fonts, // Example: override fonts // text: theme.fonts.custom.bold, }; const fontSizes = { ...baseTextInputTheme.fontSizes, // Example: override font sizes // text: theme.fontSizes.xlarge, }; const borderWidths = { ...baseTextInputTheme.borderWidths, }; const radii = { ...baseTextInputTheme.radii, }; const sizes = { ...baseTextInputTheme.sizes, containerMinHeight: theme.sizes.xxxxlarge, errorAndHelpTextContainerHeight: 0, textInputMinHeight: baseTextInputTheme.fontSizes.text + theme.space.small, textareaHeight: theme.sizes['15xlarge'], }; const lineHeights = { ...baseTextInputTheme.lineHeights, }; return { colors, space, fonts, fontSizes, borderWidths, radii, sizes, lineHeights, }; }; export default getTextInputTheme;