@tecsinapse/react-native-kit 1.9.0 → 1.10.3
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/CHANGELOG.md +35 -0
- package/dist/components/atoms/BottomNavigator/Item.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/styled.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.d.ts +1 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/components/atoms/Input/Input.js +5 -3
- package/dist/components/atoms/Input/Input.js.map +1 -1
- package/dist/components/atoms/Select/Modal.js.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.d.ts +1 -2
- package/dist/components/atoms/TextArea/TextArea.js.map +1 -1
- package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/components/molecules/InputPassword/InputPassword.js +5 -3
- package/dist/components/molecules/InputPassword/InputPassword.js.map +1 -1
- package/package.json +3 -3
- package/src/components/atoms/BottomNavigator/Item.tsx +1 -1
- package/src/components/atoms/BottomNavigator/styled.ts +1 -1
- package/src/components/atoms/GroupButton/GroupButtonOption.tsx +1 -1
- package/src/components/atoms/Input/Input.tsx +72 -64
- package/src/components/atoms/Select/Modal.tsx +1 -1
- package/src/components/atoms/TextArea/TextArea.tsx +1 -2
- package/src/components/molecules/Calendar/Calendar.tsx +3 -1
- package/src/components/molecules/InputPassword/InputPassword.tsx +24 -22
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.10.3](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-native-kit@1.10.2...@tecsinapse/react-native-kit@1.10.3) (2021-11-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @tecsinapse/react-native-kit
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.10.2](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-native-kit@1.10.1...@tecsinapse/react-native-kit@1.10.2) (2021-11-16)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @tecsinapse/react-native-kit
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [1.10.1](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-native-kit@1.10.0...@tecsinapse/react-native-kit@1.10.1) (2021-10-08)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @tecsinapse/react-native-kit
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [1.10.0](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-native-kit@1.9.0...@tecsinapse/react-native-kit@1.10.0) (2021-10-01)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* Rename mask interface to avoid mismatch ([589ce1e](https://github.com/tecsinapse/design-system/commit/589ce1e3a63dff4334b48f218d3918dfb2837026))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
# [1.9.0](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-native-kit@1.8.0...@tecsinapse/react-native-kit@1.9.0) (2021-09-29)
|
|
7
42
|
|
|
8
43
|
**Note:** Version bump only for package @tecsinapse/react-native-kit
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/BottomNavigator/Item.tsx"],"names":["Item","_selected","icon","children","rest","styledButtonStyle","undefined","backgroundColor","iconColorVariant"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AA6BA,SAASA,IAAT,CAAmC;AACjCC,EAAAA,SADiC;AAEjCC,EAAAA,IAFiC;AAGjCC,EAAAA,QAHiC;AAIjC,KAAGC;AAJ8B,CAAnC,EAKsD;AACpD,QAAMC,iBAAiB,GAAGJ,SAAS,GAC/BK,SAD+B,GAE/B;AAAEC,IAAAA,eAAe,EAAE;AAAnB,GAFJ;AAIA,QAAMC,gBAAgB,GAAGP,SAAS,GAAG,SAAH,GAAe,WAAjD;;AAEA,MAAIC,IAAJ,EAAU;AACR,WACE,oBAAC,kBAAD;AAAY,MAAA,KAAK,EAAEG;AAAnB,OAA0CD,IAA1C,GACE,oBAAC,eAAD;AAAM,MAAA,YAAY,EAAEI,gBAApB;AAAsC,MAAA,IAAI,EAAE;AAA5C,OAAyDN,IAAzD,EADF,CADF;AAKD,GAND,MAMO;AACL,WAAO,oBAAC,wBAAD,QAAmBC,QAAnB,CAAP;AACD;AACF;;eAEcH,I","sourcesContent":["import * as React from 'react';\nimport { Icon, IconProps } from '@tecsinapse/react-core';\nimport { TabContent, CustomTabContent } from './styled';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/BottomNavigator/Item.tsx"],"names":["Item","_selected","icon","children","rest","styledButtonStyle","undefined","backgroundColor","iconColorVariant"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AA6BA,SAASA,IAAT,CAAmC;AACjCC,EAAAA,SADiC;AAEjCC,EAAAA,IAFiC;AAGjCC,EAAAA,QAHiC;AAIjC,KAAGC;AAJ8B,CAAnC,EAKsD;AACpD,QAAMC,iBAAiB,GAAGJ,SAAS,GAC/BK,SAD+B,GAE/B;AAAEC,IAAAA,eAAe,EAAE;AAAnB,GAFJ;AAIA,QAAMC,gBAAgB,GAAGP,SAAS,GAAG,SAAH,GAAe,WAAjD;;AAEA,MAAIC,IAAJ,EAAU;AACR,WACE,oBAAC,kBAAD;AAAY,MAAA,KAAK,EAAEG;AAAnB,OAA0CD,IAA1C,GACE,oBAAC,eAAD;AAAM,MAAA,YAAY,EAAEI,gBAApB;AAAsC,MAAA,IAAI,EAAE;AAA5C,OAAyDN,IAAzD,EADF,CADF;AAKD,GAND,MAMO;AACL,WAAO,oBAAC,wBAAD,QAAmBC,QAAnB,CAAP;AACD;AACF;;eAEcH,I","sourcesContent":["import * as React from 'react';\nimport { Icon, IconProps } from '@tecsinapse/react-core';\nimport { TabContent, CustomTabContent } from './styled';\nimport { ViewProps } from 'react-native';\nimport { TextNativeProps } from '../Text';\n\ntype ValueType = string | number | symbol;\n\nexport interface BottomNavigatorItemProps<T extends ValueType>\n extends Omit<ViewProps, 'children'> {\n _selected?: boolean;\n value: T;\n icon: IconProps;\n label?: string;\n labelProps?: TextNativeProps;\n labelElement?: React.ReactNode | React.ReactNode[];\n children: React.ReactNode | React.ReactNode[];\n}\n\ntype ItemPropsWithIcon<T extends ValueType> = Omit<\n BottomNavigatorItemProps<T>,\n 'children'\n>;\n\ntype ItemPropsWithChildren<T extends ValueType> = Omit<\n BottomNavigatorItemProps<T>,\n 'icon' | 'label' | 'labelElement' | 'labelProps'\n>;\n\nfunction Item<T extends ValueType>(props: ItemPropsWithChildren<T>);\nfunction Item<T extends ValueType>(props: ItemPropsWithIcon<T>);\nfunction Item<T extends ValueType>({\n _selected,\n icon,\n children,\n ...rest\n}: Partial<BottomNavigatorItemProps<T>>): JSX.Element {\n const styledButtonStyle = _selected\n ? undefined\n : { backgroundColor: 'transparent' };\n\n const iconColorVariant = _selected ? 'primary' : 'secondary';\n\n if (icon) {\n return (\n <TabContent style={styledButtonStyle} {...rest}>\n <Icon colorVariant={iconColorVariant} size={'centi'} {...icon} />\n </TabContent>\n );\n } else {\n return <CustomTabContent>{children}</CustomTabContent>;\n }\n}\n\nexport default Item;\n"],"file":"Item.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/BottomNavigator/styled.ts"],"names":["StyledView","styled","View","theme","spacing","deca","kilo","miscellaneous","surfaceColor","TabContainer","Pressable","mili","selected","color","primary","medium","TabContent","xlight","borderRadius","CustomTabContent"],"mappings":";;;;;;;AAAA;;;;AAIO,MAAMA,UAAU,GAAGC,gBAAOC,IAAsC;AACvE;AACA;AACA,wBAAwB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcC,IAAK;AAC1D,oBAAoB,CAAC;AAAEF,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcE,IAAK;AACtD,sBAAsB,CAAC;AAAEH,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,aAAN,CAAoBC,YAAa;AACtE,CANO;;AAQA,MAAMC,YAAY,GAAGR,gBAAOS,SAEjC;AACF;AACA,uBAAuB,CAAC;AAAEP,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcO,IAAK;AACzD,iBAAiB,CAAC;AAAER,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcC,IAAK;AACnD,sBAAsB,CAAC;AAAEO,EAAAA;AAAF,CAAD,KAAmBA,QAAQ,GAAG,KAAH,GAAW,CAAG;AAC/D,kBAAkB,CAAC;AAAET,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACU,KAAN,CAAYC,OAAZ,CAAoBC,MAAO;AAC5D;AACA;AACA,CAVO;;AAYA,MAAMC,UAAU,GAAGf,gBAAOC,IAAsC;AACvE;AACA;AACA;AACA;AACA,sBAAsB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACU,KAAN,CAAYC,OAAZ,CAAoBG,MAAO;AAChE,mBAAmB,CAAC;AAAEd,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACe,YAAN,CAAmB,MAAnB,CAA2B;AAC7D,CAPO;;AASA,MAAMC,gBAAgB,GAAGlB,gBAAOC,IAAsC,EAAtE","sourcesContent":["import styled from '@emotion/native';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/BottomNavigator/styled.ts"],"names":["StyledView","styled","View","theme","spacing","deca","kilo","miscellaneous","surfaceColor","TabContainer","Pressable","mili","selected","color","primary","medium","TabContent","xlight","borderRadius","CustomTabContent"],"mappings":";;;;;;;AAAA;;;;AAIO,MAAMA,UAAU,GAAGC,gBAAOC,IAAsC;AACvE;AACA;AACA,wBAAwB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcC,IAAK;AAC1D,oBAAoB,CAAC;AAAEF,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcE,IAAK;AACtD,sBAAsB,CAAC;AAAEH,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACI,aAAN,CAAoBC,YAAa;AACtE,CANO;;AAQA,MAAMC,YAAY,GAAGR,gBAAOS,SAEjC;AACF;AACA,uBAAuB,CAAC;AAAEP,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcO,IAAK;AACzD,iBAAiB,CAAC;AAAER,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAcC,IAAK;AACnD,sBAAsB,CAAC;AAAEO,EAAAA;AAAF,CAAD,KAAmBA,QAAQ,GAAG,KAAH,GAAW,CAAG;AAC/D,kBAAkB,CAAC;AAAET,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACU,KAAN,CAAYC,OAAZ,CAAoBC,MAAO;AAC5D;AACA;AACA,CAVO;;AAYA,MAAMC,UAAU,GAAGf,gBAAOC,IAAsC;AACvE;AACA;AACA;AACA;AACA,sBAAsB,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACU,KAAN,CAAYC,OAAZ,CAAoBG,MAAO;AAChE,mBAAmB,CAAC;AAAEd,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACe,YAAN,CAAmB,MAAnB,CAA2B;AAC7D,CAPO;;AASA,MAAMC,gBAAgB,GAAGlB,gBAAOC,IAAsC,EAAtE","sourcesContent":["import styled from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { PressableProps, ViewProps } from 'react-native';\n\nexport const StyledView = styled.View<ViewProps & Partial<StyleProps>>`\n flex-direction: row;\n justify-content: space-between;\n padding-horizontal: ${({ theme }) => theme.spacing.deca};\n padding-bottom: ${({ theme }) => theme.spacing.kilo};\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n`;\n\nexport const TabContainer = styled.Pressable<\n { selected: boolean } & PressableProps & Partial<StyleProps>\n>`\n flex: 1;\n margin-horizontal: ${({ theme }) => theme.spacing.mili};\n padding-top: ${({ theme }) => theme.spacing.deca};\n border-top-width: ${({ selected }) => (selected ? '2px' : 0)};\n border-color: ${({ theme }) => theme.color.primary.medium};\n align-items: center;\n justify-content: flex-end;\n`;\n\nexport const TabContent = styled.View<ViewProps & Partial<StyleProps>>`\n aspect-ratio: 1;\n justify-content: center;\n align-items: center;\n min-height: 48px;\n background-color: ${({ theme }) => theme.color.primary.xlight};\n border-radius: ${({ theme }) => theme.borderRadius['mili']};\n`;\n\nexport const CustomTabContent = styled.View<ViewProps & Partial<StyleProps>>``;\n"],"file":"styled.js"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const GroupButtonOption:
|
|
1
|
+
declare const GroupButtonOption: (props: any) => JSX.Element;
|
|
2
2
|
export default GroupButtonOption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/GroupButton/GroupButtonOption.tsx"],"names":["GroupButtonOption","props","Text"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;;;;;AAEA,MAAMA,iBAAiB,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/GroupButton/GroupButtonOption.tsx"],"names":["GroupButtonOption","props","Text"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;;;;;AAEA,MAAMA,iBAAiB,GAAIC,KAAD,IAAgD;AACxE,SAAO,6BAAC,4BAAD,eAA2BA,KAA3B;AAAkC,IAAA,aAAa,EAAEC;AAAjD,KAAP;AACD,CAFD;;eAIeF,iB","sourcesContent":["import {\n GroupButtonOption as CoreGroupButtonOption,\n GroupButtonOptionProps,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { Text } from '../Text';\n\nconst GroupButtonOption = (props: GroupButtonOptionProps): JSX.Element => {\n return <CoreGroupButtonOption {...props} TextComponent={Text} />;\n};\n\nexport default GroupButtonOption;\n"],"file":"GroupButtonOption.js"}
|
|
@@ -19,7 +19,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
19
19
|
|
|
20
20
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
21
|
|
|
22
|
-
const Input = ({
|
|
22
|
+
const Input = _react.default.forwardRef(({
|
|
23
23
|
label,
|
|
24
24
|
labelColor,
|
|
25
25
|
labelColorVariant,
|
|
@@ -42,7 +42,7 @@ const Input = ({
|
|
|
42
42
|
onFocus,
|
|
43
43
|
onBlur,
|
|
44
44
|
...rest
|
|
45
|
-
}) => {
|
|
45
|
+
}, ref) => {
|
|
46
46
|
const _hint = hintComponent || _react.default.createElement(_reactCore.Hint, {
|
|
47
47
|
TextComponent: _Text.Text,
|
|
48
48
|
text: hint,
|
|
@@ -74,14 +74,16 @@ const Input = ({
|
|
|
74
74
|
disabled: disabled,
|
|
75
75
|
variant: variant
|
|
76
76
|
}, _react.default.createElement(_styled.StyledNativeInput, _extends({}, rest, {
|
|
77
|
+
ref: ref,
|
|
77
78
|
fontStack: inputFontStack,
|
|
78
79
|
fontWeight: inputFontWeight,
|
|
79
80
|
disabled: disabled,
|
|
80
81
|
onFocus: handleFocus,
|
|
81
82
|
onBlur: handleBlur
|
|
82
83
|
}))), hint && _hint);
|
|
83
|
-
};
|
|
84
|
+
});
|
|
84
85
|
|
|
86
|
+
Input.displayName = 'Input';
|
|
85
87
|
var _default = Input;
|
|
86
88
|
exports.default = _default;
|
|
87
89
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Input/Input.tsx"],"names":["Input","label","labelColor","labelColorVariant","labelColorTone","labelTypography","labelStack","labelWeight","leftComponent","rightComponent","disabled","style","borderColor","borderColorGradation","inputFontStack","inputFontWeight","inputContainerStyle","variant","hintComponent","hint","onFocus","onBlur","rest","_hint","Text","focused","handleBlur","handleFocus"],"mappings":";;;;;;;AAAA;;AAQA;;AACA;;AACA;;AACA;;;;;;AASA,MAAMA,KAA2B,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Input/Input.tsx"],"names":["Input","React","forwardRef","label","labelColor","labelColorVariant","labelColorTone","labelTypography","labelStack","labelWeight","leftComponent","rightComponent","disabled","style","borderColor","borderColorGradation","inputFontStack","inputFontWeight","inputContainerStyle","variant","hintComponent","hint","onFocus","onBlur","rest","ref","_hint","Text","focused","handleBlur","handleFocus","displayName"],"mappings":";;;;;;;AAAA;;AAQA;;AACA;;AACA;;AACA;;;;;;AASA,MAAMA,KAA2B,GAAGC,eAAMC,UAAN,CAClC,CACE;AACEC,EAAAA,KADF;AAEEC,EAAAA,UAFF;AAGEC,EAAAA,iBAHF;AAIEC,EAAAA,cAJF;AAKEC,EAAAA,eALF;AAMEC,EAAAA,UANF;AAOEC,EAAAA,WAPF;AAQEC,EAAAA,aARF;AASEC,EAAAA,cATF;AAUEC,EAAAA,QAVF;AAWEC,EAAAA,KAXF;AAYEC,EAAAA,WAZF;AAaEC,EAAAA,oBAbF;AAcEC,EAAAA,cAAc,GAAG,SAdnB;AAeEC,EAAAA,eAAe,GAAG,MAfpB;AAgBEC,EAAAA,mBAhBF;AAiBEC,EAAAA,OAAO,GAAG,SAjBZ;AAkBEC,EAAAA,aAlBF;AAmBEC,EAAAA,IAnBF;AAoBEC,EAAAA,OApBF;AAqBEC,EAAAA,MArBF;AAsBE,KAAGC;AAtBL,CADF,EAyBEC,GAzBF,KA0BK;AACH,QAAMC,KAAK,GAAGN,aA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WeightType,\n Hint,\n InputContainerProps,\n InputElementProps,\n useInputFocus,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { View } from 'react-native';\nimport { Text } from '../Text';\nimport { StyledInputContainer, StyledNativeInput } from './styled';\n\nexport interface InputNativeProps\n extends Omit<InputElementProps, 'style'>,\n InputContainerProps {\n inputFontStack?: FontStackType;\n inputFontWeight?: FontWeightType;\n}\n\nconst Input: FC<InputNativeProps> = React.forwardRef(\n (\n {\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n style,\n borderColor,\n borderColorGradation,\n inputFontStack = 'default',\n inputFontWeight = 'bold',\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n ...rest\n },\n ref\n ) => {\n const _hint = hintComponent || (\n <Hint TextComponent={Text} text={hint} variant={variant} />\n );\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n return (\n <View style={style}>\n <StyledInputContainer\n label={label}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={Text}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n >\n <StyledNativeInput\n {...rest}\n ref={ref}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </StyledInputContainer>\n {hint && _hint}\n </View>\n );\n }\n);\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"file":"Input.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Select/Modal.tsx"],"names":["Component","options","keyExtractor","labelExtractor","groupKeyExtractor","hideSearchBar","searchBarPlaceholder","focused","type","value","onSelect","onSearch","onRequestClose","selectModalTitle","selectModalTitleComponent","confirmButtonText","modalProps","selectedValues","setSelectedValues","React","useState","searchArg","setSearchArg","useEffect","data","map","option","index","_checked","find","handlePressItem","newArr","found","push","handleConfirm","headerContent","onPress","icon","name","fontColor","text","item","Modal"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;AAEA;;AACA;;AAKA;;AACA;;;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAwC;AACxDC,EAAAA,OADwD;AAExDC,EAAAA,YAFwD;AAGxDC,EAAAA,cAHwD;AAIxDC,EAAAA,iBAJwD;AAKxDC,EAAAA,aALwD;AAMxDC,EAAAA,oBANwD;AAOxDC,EAAAA,OAPwD;AAQxDC,EAAAA,IARwD;AASxDC,EAAAA,KATwD;AAUxDC,EAAAA,QAVwD;AAWxDC,EAAAA,QAXwD;AAYxDC,EAAAA,cAZwD;AAaxDC,EAAAA,gBAbwD;AAcxDC,EAAAA,yBAdwD;AAexDC,EAAAA,iBAfwD;AAgBxD,KAAGC;AAhBqD,CAAxC,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Select/Modal.tsx"],"names":["Component","options","keyExtractor","labelExtractor","groupKeyExtractor","hideSearchBar","searchBarPlaceholder","focused","type","value","onSelect","onSearch","onRequestClose","selectModalTitle","selectModalTitleComponent","confirmButtonText","modalProps","selectedValues","setSelectedValues","React","useState","searchArg","setSearchArg","useEffect","data","map","option","index","_checked","find","handlePressItem","newArr","found","push","handleConfirm","headerContent","onPress","icon","name","fontColor","text","item","Modal"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;AAEA;;AACA;;AAKA;;AACA;;;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAwC;AACxDC,EAAAA,OADwD;AAExDC,EAAAA,YAFwD;AAGxDC,EAAAA,cAHwD;AAIxDC,EAAAA,iBAJwD;AAKxDC,EAAAA,aALwD;AAMxDC,EAAAA,oBANwD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ADF;AALJ,IAzBF,EAyDE,oBAAC,sBAAD;AACE,IAAA,OAAO,EAAE,QADX;AAEE,IAAA,KAAK,EAAE,SAFT;AAGE,IAAA,OAAO,EAAEP;AAHX,KAKE,oBAAC,UAAD;AAAM,IAAA,SAAS,EAAE,OAAjB;AAA0B,IAAA,UAAU,EAAC;AAArC,KACGnB,iBADH,CALF,CAzDF,CANF,CADF;AA4ED,CAxJD;;AA0JO,MAAM2B,KAAK,GAAG1C,SAAd","sourcesContent":["import * as React from 'react';\nimport {\n FloatingButton,\n ListFooter,\n ListItem,\n SearchBarContainer,\n SelectIcon,\n StyledModal,\n} from './styled';\nimport { FlatList, Modal as RNModal, ModalProps, View } from 'react-native';\nimport { SelectNativeProps } from './Select';\nimport { Text } from '../Text';\nimport {\n Checkbox,\n RadioButton,\n useDebouncedState,\n} from '@tecsinapse/react-core';\nimport { Input } from '../Input';\nimport { Header } from '../Header';\n\nconst Component = <Data, Type extends 'single' | 'multi'>({\n options,\n keyExtractor,\n labelExtractor,\n groupKeyExtractor,\n hideSearchBar,\n searchBarPlaceholder,\n focused,\n type,\n value,\n onSelect,\n onSearch,\n onRequestClose,\n selectModalTitle,\n selectModalTitleComponent,\n confirmButtonText,\n ...modalProps\n}: SelectNativeProps<Data, Type> & ModalProps): JSX.Element => {\n const [selectedValues, setSelectedValues] = React.useState<Data[]>([]);\n const [searchArg, setSearchArg] = useDebouncedState<string>('', onSearch);\n\n // Resets the temporary state to the initial state whenever the\n // modal is reopened or the value changes\n React.useEffect(() => {\n setSelectedValues(\n (value ? (type === 'multi' ? value : [value]) : []) as Data[]\n );\n }, [value, focused, setSelectedValues]);\n\n const data = options.map((option, index) => ({\n ...option,\n _checked:\n type === 'multi'\n ? !!selectedValues.find(\n value => keyExtractor(option, index) == keyExtractor(value, index)\n )\n : keyExtractor((selectedValues[0] || {}) as Data, index) ==\n keyExtractor(option, index),\n }));\n\n const handlePressItem = (option: Data) => () => {\n setSelectedValues(selectedValues => {\n if (type === 'multi') {\n const newArr: Data[] = [];\n let found = false;\n for (const value of selectedValues) {\n if (keyExtractor(value) != keyExtractor(option)) newArr.push(value);\n else found = true;\n }\n if (!found) newArr.push(option);\n return newArr;\n }\n return keyExtractor((selectedValues[0] || {}) as Data) ===\n keyExtractor(option)\n ? []\n : [option];\n });\n };\n\n const handleConfirm = () => {\n // TS Workaround since TS won't infer the ternary operator's result type correctly\n type OnSelectArg = Parameters<typeof onSelect>[0];\n onSelect(\n (type === 'single' ? selectedValues[0] : selectedValues) as OnSelectArg\n );\n onRequestClose && onRequestClose();\n };\n\n const headerContent = selectModalTitleComponent ? (\n selectModalTitleComponent\n ) : selectModalTitle ? (\n <Text typography=\"h4\" fontWeight=\"bold\">\n {selectModalTitle}\n </Text>\n ) : null;\n\n return (\n <RNModal\n transparent\n hardwareAccelerated\n {...modalProps}\n onRequestClose={onRequestClose}\n >\n <StyledModal>\n <Header\n rightButton={{\n onPress: onRequestClose,\n icon: {\n name: 'close',\n type: 'material-community',\n fontColor: 'light',\n },\n }}\n >\n {headerContent}\n </Header>\n {!hideSearchBar && (\n <SearchBarContainer>\n <Input\n placeholder={searchBarPlaceholder}\n value={searchArg}\n onChange={text => setSearchArg(text)}\n leftComponent={\n <SelectIcon name=\"search\" type=\"ionicon\" size=\"centi\" />\n }\n />\n </SearchBarContainer>\n )}\n <FlatList\n data={data}\n keyExtractor={keyExtractor}\n ListFooterComponent={<ListFooter />}\n renderItem={({ item }) => (\n <ListItem onPress={handlePressItem(item)}>\n <View pointerEvents={'none'}>\n {type === 'multi' ? (\n <Checkbox\n color={'primary'}\n labelPosition={'right'}\n checked={item._checked}\n >\n <Text fontWeight={item._checked ? 'bold' : 'regular'}>\n {labelExtractor(item)}\n </Text>\n </Checkbox>\n ) : (\n <RadioButton\n color={'primary'}\n labelPosition={'right'}\n checked={item._checked}\n >\n <Text fontWeight={item._checked ? 'bold' : 'regular'}>\n {labelExtractor(item)}\n </Text>\n </RadioButton>\n )}\n </View>\n </ListItem>\n )}\n />\n <FloatingButton\n variant={'filled'}\n color={'primary'}\n onPress={handleConfirm}\n >\n <Text fontColor={'light'} fontWeight=\"bold\">\n {confirmButtonText}\n </Text>\n </FloatingButton>\n </StyledModal>\n </RNModal>\n );\n};\n\nexport const Modal = Component;\n"],"file":"Modal.js"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { TextAreaProps as ITACore } from '@tecsinapse/react-core';
|
|
3
|
-
export
|
|
4
|
-
}
|
|
3
|
+
export declare type TextAreaProps = Omit<ITACore, 'TextComponent' | 'focused'>;
|
|
5
4
|
declare const TextArea: FC<TextAreaProps>;
|
|
6
5
|
export default TextArea;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/TextArea/TextArea.tsx"],"names":["TextArea","label","labelColor","labelColorVariant","labelColorTone","labelTypography","labelStack","labelWeight","leftComponent","rightComponent","disabled","style","borderColor","borderColorGradation","inputFontStack","inputFontWeight","inputContainerStyle","variant","hintComponent","hint","onFocus","onBlur","value","maxLength","rest","focused","handleBlur","handleFocus","Text"],"mappings":";;;;;;;AAAA;;AACA;;AAKA;;AACA;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/TextArea/TextArea.tsx"],"names":["TextArea","label","labelColor","labelColorVariant","labelColorTone","labelTypography","labelStack","labelWeight","leftComponent","rightComponent","disabled","style","borderColor","borderColorGradation","inputFontStack","inputFontWeight","inputContainerStyle","variant","hintComponent","hint","onFocus","onBlur","value","maxLength","rest","focused","handleBlur","handleFocus","Text"],"mappings":";;;;;;;AAAA;;AACA;;AAKA;;AACA;;;;;;AAIA,MAAMA,QAA2B,GAAG,CAAC;AACnCC,EAAAA,KADmC;AAEnCC,EAAAA,UAFmC;AAGnCC,EAAAA,iBAHmC;AAInCC,EAAAA,cAJmC;AAKnCC,EAAAA,eALmC;AAMnCC,EAAAA,UANmC;AAOnCC,EAAAA,WAPmC;AAQnCC,EAAAA,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IAAA,KAAK,EAAER,KApBT;AAqBE,IAAA,aAAa,EAAEiB,UArBjB;AAsBE,IAAA,SAAS,EAAEL;AAtBb,KAwBE,6BAAC,yBAAD,eACMC,IADN;AAEE,IAAA,SAAS,EAAEV,cAFb;AAGE,IAAA,UAAU,EAAEC,eAHd;AAIE,IAAA,QAAQ,EAAEL,QAJZ;AAKE,IAAA,OAAO,EAAEiB,WALX;AAME,IAAA,MAAM,EAAED,UANV;AAOE,IAAA,iBAAiB,EAAE,KAPrB;AAQE,IAAA,SAAS,MARX;AASE,IAAA,KAAK,EAAEJ,KATT;AAUE,IAAA,SAAS,EAAEC;AAVb,KAxBF,CADF;AAuCD,CAvED;;eAyEevB,Q","sourcesContent":["import React, { FC } from 'react';\nimport {\n useInputFocus,\n TextAreaProps as ITACore,\n TextArea as TACore,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\nimport { StyledNativeInput } from './styled';\n\nexport type TextAreaProps = Omit<ITACore, 'TextComponent' | 'focused'>;\n\nconst TextArea: FC<TextAreaProps> = ({\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n style,\n borderColor,\n borderColorGradation,\n inputFontStack = 'default',\n inputFontWeight = 'bold',\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n value,\n maxLength,\n ...rest\n}) => {\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n return (\n <TACore\n label={label}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={Text}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n value={value}\n hintComponent={hintComponent}\n hint={hint}\n style={style}\n TextComponent={Text}\n maxLength={maxLength}\n >\n <StyledNativeInput\n {...rest}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n textAlignVertical={'top'}\n multiline\n value={value}\n maxLength={maxLength}\n />\n </TACore>\n );\n};\n\nexport default TextArea;\n"],"file":"TextArea.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/molecules/Calendar/Calendar.tsx"],"names":["Calendar","props","Text"],"mappings":";;;;;;;AAAA;;AAKA;;AACA;;;;;;AAEO,MAAMA,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/molecules/Calendar/Calendar.tsx"],"names":["Calendar","props","Text"],"mappings":";;;;;;;AAAA;;AAKA;;AACA;;;;;;AAEO,MAAMA,QAAQ,GACnBC,KADsB,IAEN;AAChB,SAAO,6BAAC,mBAAD,eAAkBA,KAAlB;AAAyB,IAAA,aAAa,EAAEC;AAAxC,KAAP;AACD,CAJM","sourcesContent":["import {\n Calendar as CalendarCore,\n CalendarProps,\n SelectionType,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { Text } from '../../atoms/Text';\n\nexport const Calendar = <T extends SelectionType>(\n props: CalendarProps<T>\n): JSX.Element => {\n return <CalendarCore {...props} TextComponent={Text} />;\n};\n"],"file":"Calendar.js"}
|
|
@@ -17,12 +17,13 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
17
17
|
|
|
18
18
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
|
-
const InputPassword = ({
|
|
20
|
+
const InputPassword = _react.default.forwardRef(({
|
|
21
21
|
rightComponent,
|
|
22
22
|
...rest
|
|
23
|
-
}) => {
|
|
23
|
+
}, ref) => {
|
|
24
24
|
const [revealed, setRevealed] = (0, _react.useState)(false);
|
|
25
25
|
return _react.default.createElement(_Input.Input, _extends({}, rest, {
|
|
26
|
+
ref: ref,
|
|
26
27
|
secureTextEntry: !revealed,
|
|
27
28
|
rightComponent: _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_reactCore.InputPasswordIcon, {
|
|
28
29
|
onChangeState: setRevealed,
|
|
@@ -30,8 +31,9 @@ const InputPassword = ({
|
|
|
30
31
|
effect: "none"
|
|
31
32
|
}), rightComponent)
|
|
32
33
|
}));
|
|
33
|
-
};
|
|
34
|
+
});
|
|
34
35
|
|
|
36
|
+
InputPassword.displayName = 'InputPassword';
|
|
35
37
|
var _default = InputPassword;
|
|
36
38
|
exports.default = _default;
|
|
37
39
|
//# sourceMappingURL=InputPassword.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/molecules/InputPassword/InputPassword.tsx"],"names":["InputPassword","rightComponent","rest","revealed","setRevealed"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAIA,MAAMA,aAA2C,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/molecules/InputPassword/InputPassword.tsx"],"names":["InputPassword","React","forwardRef","rightComponent","rest","ref","revealed","setRevealed","displayName"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAIA,MAAMA,aAA2C,GAAGC,eAAMC,UAAN,CAClD,CAAC;AAAEC,EAAAA,cAAF;AAAkB,KAAGC;AAArB,CAAD,EAA8BC,GAA9B,KAAsC;AACpC,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0B,qBAAS,KAAT,CAAhC;AACA,SACE,6BAAC,YAAD,eACMH,IADN;AAEE,IAAA,GAAG,EAAEC,GAFP;AAGE,IAAA,eAAe,EAAE,CAACC,QAHpB;AAIE,IAAA,cAAc,EACZ,4DACE,6BAAC,4BAAD;AACE,MAAA,aAAa,EAAEC,WADjB;AAEE,MAAA,QAAQ,EAAED,QAFZ;AAGE,MAAA,MAAM,EAAC;AAHT,MADF,EAMGH,cANH;AALJ,KADF;AAiBD,CApBiD,CAApD;;AAuBAH,aAAa,CAACQ,WAAd,GAA4B,eAA5B;eAEeR,a","sourcesContent":["import { InputPasswordIcon } from '@tecsinapse/react-core';\nimport React, { FC, useState } from 'react';\nimport { Input, InputNativeProps } from '../../atoms/Input';\n\nexport type InputPasswordNativeProps = InputNativeProps;\n\nconst InputPassword: FC<InputPasswordNativeProps> = React.forwardRef(\n ({ rightComponent, ...rest }, ref) => {\n const [revealed, setRevealed] = useState(false);\n return (\n <Input\n {...rest}\n ref={ref}\n secureTextEntry={!revealed}\n rightComponent={\n <>\n <InputPasswordIcon\n onChangeState={setRevealed}\n revealed={revealed}\n effect=\"none\"\n />\n {rightComponent}\n </>\n }\n />\n );\n }\n);\n\nInputPassword.displayName = 'InputPassword';\n\nexport default InputPassword;\n"],"file":"InputPassword.js"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/react-native-kit",
|
|
3
3
|
"description": "TecSinapse React Native components",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.10.3",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "MIT",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@emotion/native": "^11.0.0",
|
|
15
15
|
"@emotion/react": "^11.4.1",
|
|
16
|
-
"@tecsinapse/react-core": "^1.
|
|
16
|
+
"@tecsinapse/react-core": "^1.10.3"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"react-native": ">=0.64.0",
|
|
30
30
|
"react-native-vector-icons": ">=8.1.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "2608df0807f22cca02b657a64b3bfef334daf0e9"
|
|
33
33
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Icon, IconProps } from '@tecsinapse/react-core';
|
|
3
3
|
import { TabContent, CustomTabContent } from './styled';
|
|
4
|
-
import {
|
|
4
|
+
import { ViewProps } from 'react-native';
|
|
5
5
|
import { TextNativeProps } from '../Text';
|
|
6
6
|
|
|
7
7
|
type ValueType = string | number | symbol;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled from '@emotion/native';
|
|
2
|
-
import {
|
|
2
|
+
import { StyleProps } from '@tecsinapse/react-core';
|
|
3
3
|
import { PressableProps, ViewProps } from 'react-native';
|
|
4
4
|
|
|
5
5
|
export const StyledView = styled.View<ViewProps & Partial<StyleProps>>`
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { Text } from '../Text';
|
|
7
7
|
|
|
8
|
-
const GroupButtonOption =
|
|
8
|
+
const GroupButtonOption = (props: GroupButtonOptionProps): JSX.Element => {
|
|
9
9
|
return <CoreGroupButtonOption {...props} TextComponent={Text} />;
|
|
10
10
|
};
|
|
11
11
|
|
|
@@ -18,71 +18,79 @@ export interface InputNativeProps
|
|
|
18
18
|
inputFontWeight?: FontWeightType;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
const Input: FC<InputNativeProps> = (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
21
|
+
const Input: FC<InputNativeProps> = React.forwardRef(
|
|
22
|
+
(
|
|
23
|
+
{
|
|
24
|
+
label,
|
|
25
|
+
labelColor,
|
|
26
|
+
labelColorVariant,
|
|
27
|
+
labelColorTone,
|
|
28
|
+
labelTypography,
|
|
29
|
+
labelStack,
|
|
30
|
+
labelWeight,
|
|
31
|
+
leftComponent,
|
|
32
|
+
rightComponent,
|
|
33
|
+
disabled,
|
|
34
|
+
style,
|
|
35
|
+
borderColor,
|
|
36
|
+
borderColorGradation,
|
|
37
|
+
inputFontStack = 'default',
|
|
38
|
+
inputFontWeight = 'bold',
|
|
39
|
+
inputContainerStyle,
|
|
40
|
+
variant = 'default',
|
|
41
|
+
hintComponent,
|
|
42
|
+
hint,
|
|
43
|
+
onFocus,
|
|
44
|
+
onBlur,
|
|
45
|
+
...rest
|
|
46
|
+
},
|
|
47
|
+
ref
|
|
48
|
+
) => {
|
|
49
|
+
const _hint = hintComponent || (
|
|
50
|
+
<Hint TextComponent={Text} text={hint} variant={variant} />
|
|
51
|
+
);
|
|
52
|
+
const { focused, handleBlur, handleFocus } = useInputFocus(
|
|
53
|
+
onFocus,
|
|
54
|
+
onBlur,
|
|
55
|
+
!disabled
|
|
56
|
+
);
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
disabled={disabled}
|
|
72
|
-
variant={variant}
|
|
73
|
-
>
|
|
74
|
-
<StyledNativeInput
|
|
75
|
-
{...rest}
|
|
76
|
-
fontStack={inputFontStack}
|
|
77
|
-
fontWeight={inputFontWeight}
|
|
58
|
+
return (
|
|
59
|
+
<View style={style}>
|
|
60
|
+
<StyledInputContainer
|
|
61
|
+
label={label}
|
|
62
|
+
labelColor={labelColor}
|
|
63
|
+
labelColorVariant={labelColorVariant}
|
|
64
|
+
labelColorTone={labelColorTone}
|
|
65
|
+
labelTypography={labelTypography}
|
|
66
|
+
labelStack={labelStack}
|
|
67
|
+
labelWeight={labelWeight}
|
|
68
|
+
LabelComponent={Text}
|
|
69
|
+
leftComponent={leftComponent}
|
|
70
|
+
rightComponent={rightComponent}
|
|
71
|
+
borderColor={borderColor}
|
|
72
|
+
borderColorGradation={borderColorGradation}
|
|
73
|
+
inputContainerStyle={inputContainerStyle}
|
|
74
|
+
focused={focused}
|
|
78
75
|
disabled={disabled}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
76
|
+
variant={variant}
|
|
77
|
+
>
|
|
78
|
+
<StyledNativeInput
|
|
79
|
+
{...rest}
|
|
80
|
+
ref={ref}
|
|
81
|
+
fontStack={inputFontStack}
|
|
82
|
+
fontWeight={inputFontWeight}
|
|
83
|
+
disabled={disabled}
|
|
84
|
+
onFocus={handleFocus}
|
|
85
|
+
onBlur={handleBlur}
|
|
86
|
+
/>
|
|
87
|
+
</StyledInputContainer>
|
|
88
|
+
{hint && _hint}
|
|
89
|
+
</View>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
Input.displayName = 'Input';
|
|
87
95
|
|
|
88
96
|
export default Input;
|
|
@@ -35,7 +35,7 @@ const Component = <Data, Type extends 'single' | 'multi'>({
|
|
|
35
35
|
selectModalTitleComponent,
|
|
36
36
|
confirmButtonText,
|
|
37
37
|
...modalProps
|
|
38
|
-
}: SelectNativeProps<Data, Type> & ModalProps) => {
|
|
38
|
+
}: SelectNativeProps<Data, Type> & ModalProps): JSX.Element => {
|
|
39
39
|
const [selectedValues, setSelectedValues] = React.useState<Data[]>([]);
|
|
40
40
|
const [searchArg, setSearchArg] = useDebouncedState<string>('', onSearch);
|
|
41
41
|
|
|
@@ -7,8 +7,7 @@ import {
|
|
|
7
7
|
import { Text } from '../Text';
|
|
8
8
|
import { StyledNativeInput } from './styled';
|
|
9
9
|
|
|
10
|
-
export
|
|
11
|
-
extends Omit<ITACore, 'TextComponent' | 'focused'> {}
|
|
10
|
+
export type TextAreaProps = Omit<ITACore, 'TextComponent' | 'focused'>;
|
|
12
11
|
|
|
13
12
|
const TextArea: FC<TextAreaProps> = ({
|
|
14
13
|
label,
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { Text } from '../../atoms/Text';
|
|
8
8
|
|
|
9
|
-
export const Calendar = <T extends SelectionType>(
|
|
9
|
+
export const Calendar = <T extends SelectionType>(
|
|
10
|
+
props: CalendarProps<T>
|
|
11
|
+
): JSX.Element => {
|
|
10
12
|
return <CalendarCore {...props} TextComponent={Text} />;
|
|
11
13
|
};
|
|
@@ -4,27 +4,29 @@ import { Input, InputNativeProps } from '../../atoms/Input';
|
|
|
4
4
|
|
|
5
5
|
export type InputPasswordNativeProps = InputNativeProps;
|
|
6
6
|
|
|
7
|
-
const InputPassword: FC<InputPasswordNativeProps> = (
|
|
8
|
-
rightComponent,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
7
|
+
const InputPassword: FC<InputPasswordNativeProps> = React.forwardRef(
|
|
8
|
+
({ rightComponent, ...rest }, ref) => {
|
|
9
|
+
const [revealed, setRevealed] = useState(false);
|
|
10
|
+
return (
|
|
11
|
+
<Input
|
|
12
|
+
{...rest}
|
|
13
|
+
ref={ref}
|
|
14
|
+
secureTextEntry={!revealed}
|
|
15
|
+
rightComponent={
|
|
16
|
+
<>
|
|
17
|
+
<InputPasswordIcon
|
|
18
|
+
onChangeState={setRevealed}
|
|
19
|
+
revealed={revealed}
|
|
20
|
+
effect="none"
|
|
21
|
+
/>
|
|
22
|
+
{rightComponent}
|
|
23
|
+
</>
|
|
24
|
+
}
|
|
25
|
+
/>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
InputPassword.displayName = 'InputPassword';
|
|
29
31
|
|
|
30
32
|
export default InputPassword;
|