@momo-kits/foundation 0.109.1-tracking.1 → 0.109.1-tracking.2

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.
package/Button/index.tsx CHANGED
@@ -88,6 +88,7 @@ const Button: FC<ButtonProps> = ({
88
88
  ...rest
89
89
  }) => {
90
90
  const {theme, config} = useContext(ApplicationContext);
91
+ const component = useContext<any>(ComponentContext);
91
92
  const {gradient, color} = config?.navigationBar?.buttonColors ?? {};
92
93
  let gradientPros;
93
94
  let state = 'enabled';
@@ -292,6 +293,7 @@ const Button: FC<ButtonProps> = ({
292
293
  return (
293
294
  <ComponentContext.Provider
294
295
  value={{
296
+ ...component,
295
297
  componentName: 'Button',
296
298
  params,
297
299
  state: state,
package/Input/Input.tsx CHANGED
@@ -65,6 +65,7 @@ const Input = forwardRef(
65
65
  ref
66
66
  ) => {
67
67
  const {theme} = useContext(ApplicationContext);
68
+ const component = useContext<any>(ComponentContext);
68
69
  const [focused, setFocused] = useState(false);
69
70
  const [haveValue, setHaveValue] = useState(!!value || !!props.defaultValue);
70
71
  const [secureTextInput, setSecureTextInput] = useState(secureTextEntry);
@@ -260,6 +261,7 @@ const Input = forwardRef(
260
261
  return (
261
262
  <ComponentContext.Provider
262
263
  value={{
264
+ ...component,
263
265
  componentName: 'Input',
264
266
  params,
265
267
  state: inputState,
@@ -30,6 +30,7 @@ const InputDropDown = ({
30
30
  multiline,
31
31
  }: InputDropDownProps) => {
32
32
  const {theme} = useContext(ApplicationContext);
33
+ const component = useContext<any>(ComponentContext);
33
34
 
34
35
  /**
35
36
  * Render the input view
@@ -105,6 +106,7 @@ const InputDropDown = ({
105
106
  return (
106
107
  <ComponentContext.Provider
107
108
  value={{
109
+ ...component,
108
110
  componentName: 'InputDropDown',
109
111
  params,
110
112
  state: 'enabled',
@@ -59,6 +59,8 @@ const InputMoney = forwardRef(
59
59
  ref
60
60
  ) => {
61
61
  const {theme} = useContext(ApplicationContext);
62
+ const component = useContext<any>(ComponentContext);
63
+
62
64
  const [focused, setFocused] = useState(false);
63
65
  const inputRef = useRef<TextInput>(null);
64
66
 
@@ -202,6 +204,7 @@ const InputMoney = forwardRef(
202
204
  return (
203
205
  <ComponentContext.Provider
204
206
  value={{
207
+ ...component,
205
208
  componentName: 'InputMoney',
206
209
  params,
207
210
  state: inputState,
@@ -88,6 +88,7 @@ const InputOTP = forwardRef(
88
88
  const [focused, setFocused] = useState(false);
89
89
  const inputRef = useRef<TextInput | null>(null);
90
90
  const {theme} = useContext(ApplicationContext);
91
+ const component = useContext<any>(ComponentContext);
91
92
 
92
93
  useImperativeHandle(ref, () => ({
93
94
  onChangeText: (text: string) => {
@@ -229,6 +230,7 @@ const InputOTP = forwardRef(
229
230
  return (
230
231
  <ComponentContext.Provider
231
232
  value={{
233
+ ...component,
232
234
  componentName: 'InputOTP',
233
235
  params,
234
236
  state: 'enabled',
@@ -139,6 +139,8 @@ const InputSearch: ForwardRefRenderFunction<InputRef, InputSearchProps> = (
139
139
  ref
140
140
  ) => {
141
141
  const {theme} = useContext(ApplicationContext);
142
+ const component = useContext<any>(ComponentContext);
143
+
142
144
  const [focused, setFocused] = useState(false);
143
145
  const [haveValue, setHaveValue] = useState(!!value || !!defaultValue);
144
146
  const inputRef = useRef<TextInput | null>(null);
@@ -264,6 +266,7 @@ const InputSearch: ForwardRefRenderFunction<InputRef, InputSearchProps> = (
264
266
  return (
265
267
  <ComponentContext.Provider
266
268
  value={{
269
+ ...component,
267
270
  componentName: 'InputSearch',
268
271
  params,
269
272
  state: inputState,
@@ -50,6 +50,7 @@ const InputTextArea = forwardRef(
50
50
  ref
51
51
  ) => {
52
52
  const {theme} = useContext(ApplicationContext);
53
+
53
54
  const [focused, setFocused] = useState(false);
54
55
  const [inputValue, setInputValue] = useState(defaultValue ?? '');
55
56
  const inputRef = useRef<TextInput | null>(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.109.1-tracking.1",
3
+ "version": "0.109.1-tracking.2",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},