@tecsinapse/react-core 2.0.6-beta.5 → 2.0.6-beta.6
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/dist/cjs/components/atoms/Input/InputElement/InputElement.js +3 -3
- package/dist/cjs/components/atoms/Input/InputElement/InputElement.js.map +1 -1
- package/dist/esm/components/atoms/Input/InputElement/InputElement.js +2 -2
- package/dist/esm/components/atoms/Input/InputElement/InputElement.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var react = require('@emotion/react');
|
|
4
3
|
var React = require('react');
|
|
5
4
|
var styled = require('../styled.js');
|
|
5
|
+
var reactCore = require('@tecsinapse/react-core');
|
|
6
6
|
|
|
7
7
|
const InputElement = React.forwardRef(
|
|
8
8
|
({
|
|
@@ -13,8 +13,8 @@ const InputElement = React.forwardRef(
|
|
|
13
13
|
placeholderTextColor,
|
|
14
14
|
...rest
|
|
15
15
|
}, ref) => {
|
|
16
|
-
const theme =
|
|
17
|
-
const _placeholderColor = placeholderTextColor || theme.font
|
|
16
|
+
const theme = reactCore.useTheme();
|
|
17
|
+
const _placeholderColor = placeholderTextColor || theme.font?.color?.dark;
|
|
18
18
|
return /* @__PURE__ */ React.createElement(
|
|
19
19
|
styled.StyledInputElement,
|
|
20
20
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputElement.js","sources":["../../../../../../src/components/atoms/Input/InputElement/InputElement.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"InputElement.js","sources":["../../../../../../src/components/atoms/Input/InputElement/InputElement.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, TextInput, TextInputProps, TextStyle } from 'react-native';\nimport { StyledInputElement } from '../styled';\nimport { useTheme } from '@tecsinapse/react-core';\n\nexport interface InputElementProps\n extends Omit<TextInputProps, 'onChange' | 'value' | 'ref'> {\n style?: StyleProp<TextStyle>;\n value?: string;\n placeholder?: string;\n disabled?: boolean;\n onChange?: (value: string) => void;\n onFocus?: () => void;\n onBlur?: () => void;\n}\n\nconst InputElement = React.forwardRef<TextInput, InputElementProps>(\n (\n {\n onChange,\n placeholder,\n value,\n disabled = false,\n placeholderTextColor,\n ...rest\n },\n ref\n ): JSX.Element => {\n const theme = useTheme();\n const _placeholderColor = placeholderTextColor || theme.font?.color?.dark;\n\n return (\n <StyledInputElement\n {...rest}\n ref={ref}\n onChangeText={onChange}\n value={value}\n placeholder={placeholder}\n placeholderTextColor={_placeholderColor}\n disabled={disabled}\n editable={!disabled}\n />\n );\n }\n);\n\nInputElement.displayName = 'InputElement';\n\nexport default InputElement;\n"],"names":["useTheme","StyledInputElement"],"mappings":";;;;;;AAgBA,MAAM,eAAe,KAAM,CAAA,UAAA;AAAA,EACzB,CACE;AAAA,IACE,QAAA;AAAA,IACA,WAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAW,GAAA,KAAA;AAAA,IACX,oBAAA;AAAA,IACA,GAAG,IAAA;AAAA,KAEL,GACgB,KAAA;AAChB,IAAA,MAAM,QAAQA,kBAAS,EAAA,CAAA;AACvB,IAAA,MAAM,iBAAoB,GAAA,oBAAA,IAAwB,KAAM,CAAA,IAAA,EAAM,KAAO,EAAA,IAAA,CAAA;AAErE,IACE,uBAAA,KAAA,CAAA,aAAA;AAAA,MAACC,yBAAA;AAAA,MAAA;AAAA,QACE,GAAG,IAAA;AAAA,QACJ,GAAA;AAAA,QACA,YAAc,EAAA,QAAA;AAAA,QACd,KAAA;AAAA,QACA,WAAA;AAAA,QACA,oBAAsB,EAAA,iBAAA;AAAA,QACtB,QAAA;AAAA,QACA,UAAU,CAAC,QAAA;AAAA,OAAA;AAAA,KACb,CAAA;AAAA,GAEJ;AACF,EAAA;AAEA,YAAA,CAAa,WAAc,GAAA,cAAA;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useTheme } from '@emotion/react';
|
|
2
1
|
import React__default from 'react';
|
|
3
2
|
import { StyledInputElement } from '../styled.js';
|
|
3
|
+
import { useTheme } from '@tecsinapse/react-core';
|
|
4
4
|
|
|
5
5
|
const InputElement = React__default.forwardRef(
|
|
6
6
|
({
|
|
@@ -12,7 +12,7 @@ const InputElement = React__default.forwardRef(
|
|
|
12
12
|
...rest
|
|
13
13
|
}, ref) => {
|
|
14
14
|
const theme = useTheme();
|
|
15
|
-
const _placeholderColor = placeholderTextColor || theme.font
|
|
15
|
+
const _placeholderColor = placeholderTextColor || theme.font?.color?.dark;
|
|
16
16
|
return /* @__PURE__ */ React__default.createElement(
|
|
17
17
|
StyledInputElement,
|
|
18
18
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputElement.js","sources":["../../../../../../src/components/atoms/Input/InputElement/InputElement.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"InputElement.js","sources":["../../../../../../src/components/atoms/Input/InputElement/InputElement.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, TextInput, TextInputProps, TextStyle } from 'react-native';\nimport { StyledInputElement } from '../styled';\nimport { useTheme } from '@tecsinapse/react-core';\n\nexport interface InputElementProps\n extends Omit<TextInputProps, 'onChange' | 'value' | 'ref'> {\n style?: StyleProp<TextStyle>;\n value?: string;\n placeholder?: string;\n disabled?: boolean;\n onChange?: (value: string) => void;\n onFocus?: () => void;\n onBlur?: () => void;\n}\n\nconst InputElement = React.forwardRef<TextInput, InputElementProps>(\n (\n {\n onChange,\n placeholder,\n value,\n disabled = false,\n placeholderTextColor,\n ...rest\n },\n ref\n ): JSX.Element => {\n const theme = useTheme();\n const _placeholderColor = placeholderTextColor || theme.font?.color?.dark;\n\n return (\n <StyledInputElement\n {...rest}\n ref={ref}\n onChangeText={onChange}\n value={value}\n placeholder={placeholder}\n placeholderTextColor={_placeholderColor}\n disabled={disabled}\n editable={!disabled}\n />\n );\n }\n);\n\nInputElement.displayName = 'InputElement';\n\nexport default InputElement;\n"],"names":["React"],"mappings":";;;;AAgBA,MAAM,eAAeA,cAAM,CAAA,UAAA;AAAA,EACzB,CACE;AAAA,IACE,QAAA;AAAA,IACA,WAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAW,GAAA,KAAA;AAAA,IACX,oBAAA;AAAA,IACA,GAAG,IAAA;AAAA,KAEL,GACgB,KAAA;AAChB,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AACvB,IAAA,MAAM,iBAAoB,GAAA,oBAAA,IAAwB,KAAM,CAAA,IAAA,EAAM,KAAO,EAAA,IAAA,CAAA;AAErE,IACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,MAAC,kBAAA;AAAA,MAAA;AAAA,QACE,GAAG,IAAA;AAAA,QACJ,GAAA;AAAA,QACA,YAAc,EAAA,QAAA;AAAA,QACd,KAAA;AAAA,QACA,WAAA;AAAA,QACA,oBAAsB,EAAA,iBAAA;AAAA,QACtB,QAAA;AAAA,QACA,UAAU,CAAC,QAAA;AAAA,OAAA;AAAA,KACb,CAAA;AAAA,GAEJ;AACF,EAAA;AAEA,YAAA,CAAa,WAAc,GAAA,cAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/react-core",
|
|
3
3
|
"description": "TecSinapse hybrid React components",
|
|
4
|
-
"version": "2.0.6-beta.
|
|
4
|
+
"version": "2.0.6-beta.6+4efed5e4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/esm/index.js",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"react-native": "^0.71.0",
|
|
40
40
|
"react-native-vector-icons": "^9.0.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "4efed5e43465f3e9ac408dade79e20670f7f4c93"
|
|
43
43
|
}
|