@codeleap/mobile 3.24.2 → 3.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/package.json +6 -4
  2. package/src/Registry.ts +52 -0
  3. package/src/components/ActionIcon/index.tsx +55 -37
  4. package/src/components/ActionIcon/styles.ts +2 -4
  5. package/src/components/ActionIcon/types.ts +15 -0
  6. package/src/components/ActivityIndicator/index.tsx +42 -64
  7. package/src/components/ActivityIndicator/styles.ts +1 -10
  8. package/src/components/ActivityIndicator/types.ts +9 -0
  9. package/src/components/Autocomplete/index.tsx +46 -54
  10. package/src/components/Autocomplete/styles.ts +2 -5
  11. package/src/components/Autocomplete/types.ts +13 -23
  12. package/src/components/Avatar/index.tsx +59 -71
  13. package/src/components/Avatar/styles.ts +1 -9
  14. package/src/components/Avatar/types.ts +23 -0
  15. package/src/components/AvatarGroup/index.tsx +30 -44
  16. package/src/components/AvatarGroup/styles.ts +0 -6
  17. package/src/components/AvatarGroup/types.ts +10 -0
  18. package/src/components/Backdrop/index.tsx +51 -34
  19. package/src/components/Backdrop/styles.ts +5 -10
  20. package/src/components/Backdrop/types.ts +14 -0
  21. package/src/components/Badge/index.tsx +36 -62
  22. package/src/components/Badge/styles.ts +3 -11
  23. package/src/components/Badge/types.ts +27 -0
  24. package/src/components/Button/index.tsx +55 -82
  25. package/src/components/Button/styles.ts +13 -14
  26. package/src/components/Button/types.ts +20 -0
  27. package/src/components/Calendar/index.tsx +35 -29
  28. package/src/components/Checkbox/index.tsx +43 -64
  29. package/src/components/Checkbox/styles.ts +1 -6
  30. package/src/components/Checkbox/types.ts +13 -0
  31. package/src/components/DatePickerModal/index.tsx +50 -65
  32. package/src/components/DatePickerModal/styles.ts +9 -10
  33. package/src/components/DatePickerModal/types.ts +36 -54
  34. package/src/components/EmptyPlaceholder/index.tsx +40 -63
  35. package/src/components/EmptyPlaceholder/styles.ts +0 -5
  36. package/src/components/EmptyPlaceholder/types.ts +21 -0
  37. package/src/components/FileInput/index.tsx +11 -49
  38. package/src/components/FileInput/types.ts +27 -0
  39. package/src/components/Grid/index.tsx +84 -116
  40. package/src/components/Grid/styles.ts +0 -5
  41. package/src/components/Grid/types.ts +20 -0
  42. package/src/components/Icon/index.tsx +44 -79
  43. package/src/components/Icon/styles.ts +0 -6
  44. package/src/components/Icon/types.ts +15 -0
  45. package/src/components/Image/index.tsx +58 -78
  46. package/src/components/Image/styles.ts +1 -6
  47. package/src/components/Image/types.ts +18 -0
  48. package/src/components/ImageView/Spotlight.tsx +1 -4
  49. package/src/components/ImageView/component.tsx +1 -2
  50. package/src/components/InputBase/index.tsx +33 -24
  51. package/src/components/InputBase/styles.ts +66 -75
  52. package/src/components/InputBase/types.ts +3 -4
  53. package/src/components/InputBase/utils.ts +6 -4
  54. package/src/components/List/index.tsx +99 -151
  55. package/src/components/List/styles.ts +0 -6
  56. package/src/components/List/types.ts +41 -0
  57. package/src/components/LoadingOverlay/index.tsx +42 -29
  58. package/src/components/LoadingOverlay/styles.ts +7 -7
  59. package/src/components/LoadingOverlay/types.ts +9 -0
  60. package/src/components/Modal/index.tsx +80 -127
  61. package/src/components/Modal/styles.ts +0 -8
  62. package/src/components/Modal/types.ts +41 -0
  63. package/src/components/Navigation/Navigation.tsx +1 -0
  64. package/src/components/Navigation/types.ts +2 -9
  65. package/src/components/NumberIncrement/index.tsx +50 -60
  66. package/src/components/NumberIncrement/styles.ts +0 -5
  67. package/src/components/NumberIncrement/types.ts +32 -39
  68. package/src/components/Pager/index.tsx +42 -94
  69. package/src/components/Pager/styles.ts +1 -13
  70. package/src/components/Pager/types.ts +37 -0
  71. package/src/components/PaginationIndicator/index.tsx +51 -0
  72. package/src/components/PaginationIndicator/styles.ts +3 -0
  73. package/src/components/PaginationIndicator/types.ts +10 -0
  74. package/src/components/RadioInput/index.tsx +32 -57
  75. package/src/components/RadioInput/styles.ts +5 -7
  76. package/src/components/RadioInput/types.ts +31 -0
  77. package/src/components/RefreshControl/index.tsx +39 -19
  78. package/src/components/RefreshControl/styles.ts +1 -6
  79. package/src/components/RefreshControl/types.ts +9 -0
  80. package/src/components/Scroll/index.tsx +89 -105
  81. package/src/components/Scroll/styles.ts +0 -5
  82. package/src/components/Scroll/types.ts +21 -0
  83. package/src/components/SearchInput/index.tsx +90 -0
  84. package/src/components/Sections/index.tsx +111 -161
  85. package/src/components/Sections/styles.ts +0 -5
  86. package/src/components/Sections/types.ts +39 -0
  87. package/src/components/SegmentedControl/Option.tsx +46 -31
  88. package/src/components/SegmentedControl/index.tsx +86 -121
  89. package/src/components/SegmentedControl/styles.ts +15 -22
  90. package/src/components/SegmentedControl/types.ts +31 -0
  91. package/src/components/Select/index.tsx +71 -82
  92. package/src/components/Select/styles.ts +3 -5
  93. package/src/components/Select/types.ts +20 -25
  94. package/src/components/Slider/index.tsx +58 -43
  95. package/src/components/Slider/styles.ts +15 -6
  96. package/src/components/Slider/types.ts +9 -14
  97. package/src/components/Switch/index.tsx +43 -56
  98. package/src/components/Switch/styles.ts +1 -7
  99. package/src/components/Switch/types.ts +12 -0
  100. package/src/components/Text/index.tsx +56 -52
  101. package/src/components/Text/styles.ts +1 -7
  102. package/src/components/Text/types.ts +18 -0
  103. package/src/components/TextInput/index.tsx +49 -162
  104. package/src/components/TextInput/styles.ts +2 -8
  105. package/src/components/TextInput/types.ts +23 -0
  106. package/src/components/Touchable/index.tsx +44 -87
  107. package/src/components/Touchable/styles.ts +0 -9
  108. package/src/components/Touchable/types.ts +27 -0
  109. package/src/components/View/index.tsx +23 -92
  110. package/src/components/View/styles.ts +0 -6
  111. package/src/components/View/types.ts +13 -0
  112. package/src/components/components.ts +2 -6
  113. package/src/hooks/index.ts +13 -0
  114. package/src/index.ts +2 -0
  115. package/src/modules/PressableRipple/type.ts +1 -0
  116. package/src/utils/KeyboardAware/context.tsx +0 -2
  117. package/src/utils/KeyboardAware/keyboardHooks.ts +1 -2
  118. package/src/utils/ModalManager/components.tsx +1 -30
  119. package/src/utils/ModalManager/context.tsx +4 -4
  120. package/src/utils/ModalManager/index.ts +1 -4
  121. package/src/utils/hooks.ts +12 -1
  122. package/src/components/Calendar/style.ts +0 -6
  123. package/src/components/ContentView/index.tsx +0 -63
  124. package/src/components/ContentView/styles.ts +0 -8
  125. package/src/components/Drawer/index.tsx +0 -28
  126. package/src/components/Drawer/styles.ts +0 -8
  127. package/src/components/FileInput/styles.ts +0 -8
  128. package/src/components/InputLabel/index.tsx +0 -38
  129. package/src/components/InputLabel/styles.ts +0 -7
  130. package/src/components/List/PaginationIndicator.tsx +0 -54
  131. package/src/components/defaultStyles.ts +0 -77
@@ -0,0 +1,18 @@
1
+ import { LoadingOverlayProps } from '../LoadingOverlay'
2
+ import FastImage, { Source } from 'react-native-fast-image'
3
+ import { ImageProps as RNImageProps } from 'react-native'
4
+ import { ImageComposition } from './styles'
5
+ import { StyledProp } from '@codeleap/styles'
6
+ import { FormTypes } from '@codeleap/common'
7
+
8
+ export type ImageProps =
9
+ Omit<RNImageProps, 'source' | 'style'> &
10
+ {
11
+ fast?: boolean
12
+ style?: StyledProp<ImageComposition>
13
+ source: Source | FormTypes.AnyFile
14
+ resizeMode?: keyof typeof FastImage.resizeMode
15
+ spotlight?: string
16
+ maintainAspectRatio?: boolean
17
+ withLoadingOverlay?: boolean | ((props: LoadingOverlayProps) => JSX.Element)
18
+ }
@@ -1,6 +1,5 @@
1
1
  import React, { useContext, useState } from 'react'
2
2
  import { deepEqual, onUpdate, ReactState, TypeGuards, usePrevious, useUnmount } from '@codeleap/common'
3
-
4
3
  import uuid from 'react-native-uuid'
5
4
  import { ImageView, ImageViewProps } from './component'
6
5
  import { ImageProps } from '../Image'
@@ -166,9 +165,7 @@ export type SpotlightProps = {
166
165
  } & ImageViewProps
167
166
 
168
167
  const DefaultFooterComponent: SpootlightFooterComponent = ({ imageIndex, imagesLength }) => (
169
- <View variants={['marginBottom:5', 'alignCenter']}>
170
- <Text text={imageIndex + 1 + '/' + imagesLength} />
171
- </View>
168
+ <View><Text text={imageIndex + 1 + '/' + imagesLength} /></View>
172
169
  )
173
170
 
174
171
  export const Spotlight = (props: SpotlightProps) => {
@@ -1,5 +1,4 @@
1
- import * as React from 'react'
2
-
1
+ import React from 'react'
3
2
  import { onUpdate, PropsOf } from '@codeleap/common'
4
3
  import _ImageView from 'react-native-image-viewing'
5
4
  import { StatusBar } from 'react-native'
@@ -16,11 +16,12 @@ export const InputBaseDefaultOrder: InputBaseProps['order'] = [
16
16
  'innerWrapper',
17
17
  'error',
18
18
  ]
19
+
19
20
  const KeyPassthrough = (props: React.PropsWithChildren<any>) => {
20
21
  return <>{props.children}</>
21
22
  }
22
23
 
23
- export const InputBase = React.forwardRef<any, InputBaseProps>((props, ref) => {
24
+ export const InputBase = (props: InputBaseProps) => {
24
25
  const {
25
26
  children,
26
27
  error = null,
@@ -28,69 +29,67 @@ export const InputBase = React.forwardRef<any, InputBaseProps>((props, ref) => {
28
29
  description = null,
29
30
  leftIcon = null,
30
31
  rightIcon = null,
31
- styles,
32
- wrapper,
32
+ wrapper: WrapperComponent,
33
33
  debugName,
34
- innerWrapper,
34
+ innerWrapper: InnerWrapperComponent,
35
35
  focused,
36
36
  innerWrapperProps = {},
37
37
  wrapperProps = {},
38
- disabled = false,
38
+ disabled,
39
39
  order = InputBaseDefaultOrder,
40
40
  style,
41
- labelAsRow = false,
42
- hideErrorMessage = false,
41
+ labelAsRow,
42
+ hideErrorMessage,
43
43
  ...otherProps
44
- } = props
45
-
46
- const WrapperComponent = wrapper || View
47
- const InnerWrapperComponent = innerWrapper || View
44
+ } = {
45
+ ...InputBase.defaultProps,
46
+ ...props,
47
+ }
48
48
 
49
- const _styles = useInputBaseStyles(props)
49
+ const styles = useInputBaseStyles(props)
50
50
 
51
51
  const _leftIcon = getRenderedComponent<Partial<ActionIconProps>>(leftIcon, ActionIcon, {
52
52
  // @ts-ignore
53
- styles: _styles.leftIconStyles,
53
+ style: styles.leftIconStyles,
54
54
  debugName: `${debugName} left icon`,
55
55
  dismissKeyboard: false,
56
56
  })
57
57
 
58
58
  const _rightIcon = getRenderedComponent<Partial<ActionIconProps>>(rightIcon, ActionIcon, {
59
-
60
59
  // @ts-ignore
61
- styles: _styles.rightIconStyles,
60
+ style: styles.rightIconStyles,
62
61
  debugName: `${debugName} right icon`,
63
62
  dismissKeyboard: false,
64
63
  })
65
64
 
66
- const _label = TypeGuards.isString(label) ? <Text text={label} style={_styles.labelStyle} /> : label
65
+ const _label = TypeGuards.isString(label) ? <Text text={label} style={styles.labelStyle} /> : label
67
66
 
68
- const _error = TypeGuards.isString(error) ? <Text text={error} style={_styles.errorStyle} /> : error
67
+ const _error = TypeGuards.isString(error) ? <Text text={error} style={styles.errorStyle} /> : error
69
68
 
70
- const _description = TypeGuards.isString(description) ? <Text text={description} style={_styles.descriptionStyle} /> : description
69
+ const _description = TypeGuards.isString(description) ? <Text text={description} style={styles.descriptionStyle} /> : description
71
70
 
72
71
  const parts = {
73
- label: labelAsRow ? <View style={_styles.labelRowStyle}>
72
+ label: labelAsRow ? <View style={styles.labelRowStyle}>
74
73
  {_label}
75
74
  {_description}
76
75
  </View> : _label,
77
76
  description: labelAsRow ? null : _description,
78
77
  innerWrapper: <InnerWrapperComponent style={[
79
- _styles.innerWrapperStyle,
78
+ styles.innerWrapperStyle,
80
79
  ]} {...innerWrapperProps}>
81
80
  {_leftIcon}
82
81
  {children}
83
82
  {_rightIcon}
84
83
  </InnerWrapperComponent>,
85
84
  error: hideErrorMessage ? null : (
86
- _error || <Text text={''} style={_styles.errorStyle} />
85
+ _error || <Text text={''} style={styles.errorStyle} />
87
86
  ),
88
87
  }
89
88
 
90
89
  return <WrapperComponent
91
- style={[_styles.wrapperStyle, style]}
92
90
  {...otherProps}
93
91
  {...wrapperProps}
92
+ style={styles.wrapperStyle}
94
93
  >
95
94
  {
96
95
  order.map((key) => <KeyPassthrough key={key}>
@@ -98,6 +97,16 @@ export const InputBase = React.forwardRef<any, InputBaseProps>((props, ref) => {
98
97
  </KeyPassthrough>)
99
98
 
100
99
  }
101
-
102
100
  </WrapperComponent>
103
- })
101
+ }
102
+
103
+ InputBase.elements = ['wrapper', 'innerWrapper', 'label', 'errorMessage', 'description', 'icon', 'leftIcon', 'rightIcon']
104
+
105
+ InputBase.defaultProps = {
106
+ disabled: false,
107
+ labelAsRow: false,
108
+ hideErrorMessage: false,
109
+ order: InputBaseDefaultOrder,
110
+ wrapper: View,
111
+ innerWrapper: View,
112
+ } as Partial<InputBaseProps>
@@ -1,7 +1,8 @@
1
- import { TypeGuards, createDefaultVariantFactory, getRenderedComponent, includePresets, useDefaultComponentStyle, useMemo, useNestedStylesByKey } from "@codeleap/common"
2
- import { ActionIconComposition, ActionIconParts } from "../ActionIcon"
1
+ import { TypeGuards } from "@codeleap/common"
2
+ import { ActionIconParts } from "../ActionIcon"
3
3
  import { InputBaseProps } from "./types"
4
- import { StyleSheet } from "react-native"
4
+ import { mergeStyles, useCompositionStyles } from '@codeleap/styles'
5
+ import { useMemo } from 'react'
5
6
 
6
7
  type InputIcons = 'icon' | 'leftIcon' | 'rightIcon'
7
8
 
@@ -24,32 +25,33 @@ export type IconLessInputBaseParts = Exclude<InputBaseParts, InputIconCompositio
24
25
 
25
26
  export type InputBaseComposition = `${InputBaseParts}:${InputBaseStates}` | InputBaseParts
26
27
 
27
- const createTextInputBaseComposition = createDefaultVariantFactory<InputBaseComposition>()
28
-
29
- export const InputBasePresets = includePresets((styles) => createTextInputBaseComposition(() => ({ wrapper: styles })))
30
-
31
-
32
- const getIconStyles = (obj, state) => {
33
- return {
34
- icon: [
35
- obj.icon,
36
- state.focused && obj['icon:focus'],
37
- state.hasError && obj['icon:error'],
38
- state.disabled && obj['icon:disabled']
39
- ],
40
- 'icon:disabled': [
41
- state.disabled && obj['icon:disabled']
42
- ],
43
- touchableWrapper: [
44
- obj.touchableWrapper,
45
- state.focused && obj['touchableWrapper:focus'],
46
- state.hasError && obj['touchableWrapper:error'],
47
- state.disabled && obj['touchableWrapper:disabled']
48
- ],
49
- 'touchableWrapper:disabled': [
50
- state.disabled && obj['touchableWrapper:disabled']
51
- ]
52
- }
28
+ const getIconStyles = (obj, state) => ({
29
+ icon: mergeStyles([
30
+ obj.icon,
31
+ state.focused && obj['icon:focus'],
32
+ state.hasError && obj['icon:error'],
33
+ state.disabled && obj['icon:disabled']
34
+ ]),
35
+ 'icon:disabled': mergeStyles([
36
+ state.disabled && obj['icon:disabled']
37
+ ]),
38
+ touchableWrapper: mergeStyles([
39
+ obj.touchableWrapper,
40
+ state.focused && obj['touchableWrapper:focus'],
41
+ state.hasError && obj['touchableWrapper:error'],
42
+ state.disabled && obj['touchableWrapper:disabled']
43
+ ]),
44
+ 'touchableWrapper:disabled': mergeStyles([
45
+ state.disabled && obj['touchableWrapper:disabled']
46
+ ])
47
+ })
48
+
49
+ const useIconStyles = (styles, iconStyles, states) => {
50
+ return useMemo(() => {
51
+ const _iconStyles = getIconStyles(iconStyles, states)
52
+
53
+ return mergeStyles([styles, _iconStyles])
54
+ }, [states, styles, iconStyles])
53
55
  }
54
56
 
55
57
  export const useInputBaseStyles = (props: InputBaseProps) => {
@@ -57,76 +59,65 @@ export const useInputBaseStyles = (props: InputBaseProps) => {
57
59
  focused,
58
60
  disabled,
59
61
  error,
60
- styles
62
+ style: styles,
61
63
  } = props
62
64
 
63
65
  const hasError = !TypeGuards.isNil(error)
64
66
 
65
- const variantStyles = useDefaultComponentStyle<'u:InputBase', typeof InputBasePresets>('u:InputBase', {
66
- styles,
67
- transform: StyleSheet.flatten,
68
- rootElement: 'wrapper'
69
- })
70
-
71
- const _leftIconStyles = useNestedStylesByKey<ActionIconComposition>('leftIcon', variantStyles)
72
- const _rightIconStyles = useNestedStylesByKey<ActionIconComposition>('rightIcon', variantStyles)
73
- const _generalIconStyles = useNestedStylesByKey<ActionIconComposition>('icon', variantStyles)
67
+ const compositionStyles = useCompositionStyles(['leftIcon', 'rightIcon', 'icon'], styles)
74
68
 
75
- const generalIconStyles = getIconStyles(_generalIconStyles, { hasError, disabled })
69
+ const generalIconStyles = getIconStyles(compositionStyles?.icon, { hasError, disabled })
76
70
 
77
- const leftIconStyles = [
78
- generalIconStyles,
79
- // @ts-ignore
80
- getIconStyles(_leftIconStyles, { hasError, disabled: disabled || props?.leftIcon?.disabled, focused })
81
- ]
71
+ const leftIconStyles = useIconStyles(generalIconStyles, compositionStyles?.leftIcon, {
72
+ // @ts-expect-error
73
+ hasError, disabled: (disabled || props?.leftIcon?.disabled), focused
74
+ })
82
75
 
83
- const rightIconStyles = [
84
- generalIconStyles,
85
- // @ts-ignore
86
- getIconStyles(_rightIconStyles, { hasError, disabled: disabled || props?.right?.disabled, focused })
87
- ]
76
+ const rightIconStyles = useIconStyles(generalIconStyles, compositionStyles?.rightIcon, {
77
+ // @ts-expect-error
78
+ hasError, disabled: (disabled || props?.rightIcon?.disabled), focused
79
+ })
88
80
 
89
81
  const labelStyle = [
90
- variantStyles.label,
91
- focused && variantStyles['label:focus'],
92
- hasError && variantStyles['label:error'],
93
- disabled && variantStyles['label:disabled'],
94
-
82
+ styles.label,
83
+ focused && styles['label:focus'],
84
+ hasError && styles['label:error'],
85
+ disabled && styles['label:disabled'],
95
86
  ]
96
87
 
97
88
  const errorStyle = [
98
- variantStyles.errorMessage,
99
- focused && variantStyles['errorMessage:focus'],
100
- hasError && variantStyles['errorMessage:error'],
101
- disabled && variantStyles['errorMessage:disabled'],
89
+ styles.errorMessage,
90
+ focused && styles['errorMessage:focus'],
91
+ hasError && styles['errorMessage:error'],
92
+ disabled && styles['errorMessage:disabled'],
102
93
  ]
103
94
 
104
95
  const descriptionStyle = [
105
- variantStyles.description,
106
- focused && variantStyles['description:focus'],
107
- hasError && variantStyles['description:error'],
108
- disabled && variantStyles['description:disabled'],
96
+ styles.description,
97
+ focused && styles['description:focus'],
98
+ hasError && styles['description:error'],
99
+ disabled && styles['description:disabled'],
109
100
  ]
110
101
 
111
102
  const wrapperStyle = [
112
- variantStyles.wrapper,
113
- focused && variantStyles['wrapper:focus'],
114
- error && variantStyles['wrapper:error'],
115
- disabled && variantStyles['wrapper:disabled'],
103
+ styles.wrapper,
104
+ focused && styles['wrapper:focus'],
105
+ error && styles['wrapper:error'],
106
+ disabled && styles['wrapper:disabled'],
116
107
  ]
117
108
 
118
109
  const innerWrapperStyle = [
119
- variantStyles.innerWrapper,
120
- focused && variantStyles['innerWrapper:focus'],
121
- hasError && variantStyles['innerWrapper:error'],
122
- disabled && variantStyles['innerWrapper:disabled'],
110
+ styles.innerWrapper,
111
+ focused && styles['innerWrapper:focus'],
112
+ hasError && styles['innerWrapper:error'],
113
+ disabled && styles['innerWrapper:disabled'],
123
114
  ]
124
115
 
125
116
  const labelRowStyle = [
126
- variantStyles.labelRow,
127
- focused && variantStyles['labelRow:focus'],
128
- hasError && variantStyles['labelRow:error'],
129
- disabled && variantStyles['labelRow:disabled'],
117
+ styles.labelRow,
118
+ focused && styles['labelRow:focus'],
119
+ hasError && styles['labelRow:error'],
120
+ disabled && styles['labelRow:disabled'],
130
121
  ]
131
122
 
132
123
  return {
@@ -1,5 +1,4 @@
1
- import { PropsOf } from '@codeleap/common'
2
- import { StylesOf } from '../../types'
1
+ import { PropsOf, StylesOf } from '@codeleap/common'
3
2
  import { InputBaseComposition } from './styles'
4
3
  import { ActionIcon } from '../ActionIcon'
5
4
 
@@ -7,6 +6,7 @@ type ActionIconProps = PropsOf<typeof ActionIcon>
7
6
 
8
7
  type OrderedParts = 'label' | 'description' | 'innerWrapper' | 'error'
9
8
  type IconProp = Partial<ActionIconProps> | JSX.Element
9
+
10
10
  export type InputBaseProps = React.PropsWithChildren<{
11
11
  label?: React.ReactNode
12
12
  error?: React.ReactNode
@@ -16,13 +16,12 @@ export type InputBaseProps = React.PropsWithChildren<{
16
16
  wrapperProps?: any
17
17
  innerWrapper?: React.FC<any>
18
18
  innerWrapperProps?: any
19
- styles?: StylesOf<InputBaseComposition>
20
19
  description?: React.ReactNode
21
20
  debugName: string
22
21
  focused?: boolean
23
22
  disabled?: boolean
24
23
  order?: OrderedParts[]
25
- style?: any
24
+ style?: StylesOf<InputBaseComposition>
26
25
  labelAsRow?: boolean
27
26
  hideErrorMessage?: boolean
28
27
  }>
@@ -8,8 +8,10 @@ type OmitDiff<T1, T2> = {
8
8
 
9
9
  type InputBaseKey = keyof InputBaseProps
10
10
 
11
- export function selectInputBaseProps<T extends InputBaseProps>(props: T): {
12
- inputBaseProps: InputBaseProps
11
+ type BaseProps = Omit<InputBaseProps, 'style'>
12
+
13
+ export function selectInputBaseProps<T extends BaseProps>(props: T): {
14
+ inputBaseProps: BaseProps
13
15
  others: OmitDiff<T, T>
14
16
  } {
15
17
  const varList:InputBaseKey[] = [
@@ -19,7 +21,6 @@ export function selectInputBaseProps<T extends InputBaseProps>(props: T): {
19
21
  'innerWrapper',
20
22
  'leftIcon',
21
23
  'rightIcon',
22
- // 'styles',
23
24
  'description',
24
25
  'wrapper',
25
26
  'children',
@@ -27,6 +28,7 @@ export function selectInputBaseProps<T extends InputBaseProps>(props: T): {
27
28
  'wrapperProps',
28
29
  'disabled',
29
30
  'hideErrorMessage',
31
+ 'style',
30
32
  ]
31
33
 
32
34
  const copy = { ...props }
@@ -36,7 +38,7 @@ export function selectInputBaseProps<T extends InputBaseProps>(props: T): {
36
38
  acc[key] = copy[key]
37
39
 
38
40
  return acc
39
- }, {} as InputBaseProps)
41
+ }, {} as BaseProps)
40
42
 
41
43
  return { inputBaseProps: result, others: copy as OmitDiff<T, T> }
42
44
  }