@adiraku/react-native-ui 1.2.1 → 1.2.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/lib/commonjs/components/Appbar/Appbar.component.js +6 -4
- package/lib/commonjs/components/Appbar/Appbar.component.js.map +1 -1
- package/lib/commonjs/components/Appbar/Appbar.style.js +9 -2
- package/lib/commonjs/components/Appbar/Appbar.style.js.map +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.component.js +6 -23
- package/lib/commonjs/components/BottomSheet/BottomSheet.component.js.map +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.style.js +11 -4
- package/lib/commonjs/components/BottomSheet/BottomSheet.style.js.map +1 -1
- package/lib/commonjs/components/CheckBoxInput/CheckBoxInput.component.js +18 -10
- package/lib/commonjs/components/CheckBoxInput/CheckBoxInput.component.js.map +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.component.js +5 -3
- package/lib/commonjs/components/Checkbox/Checkbox.component.js.map +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.type.js +4 -0
- package/lib/commonjs/components/RadioButton/RadioButton.component.js +5 -3
- package/lib/commonjs/components/RadioButton/RadioButton.component.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButton.type.js +4 -0
- package/lib/commonjs/components/RadioInput/RadioInput.component.js +18 -10
- package/lib/commonjs/components/RadioInput/RadioInput.component.js.map +1 -1
- package/lib/commonjs/components/Tabs/Tabs.component.js +1 -0
- package/lib/commonjs/components/Tabs/Tabs.component.js.map +1 -1
- package/lib/commonjs/components/TextArea/TextArea.component.js +3 -2
- package/lib/commonjs/components/TextArea/TextArea.component.js.map +1 -1
- package/lib/commonjs/components/TextInput/TextInput.component.js +3 -2
- package/lib/commonjs/components/TextInput/TextInput.component.js.map +1 -1
- package/lib/commonjs/components/index.js +7 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/rounded-tab/rounded-tab.component.js +7 -2
- package/lib/commonjs/components/rounded-tab/rounded-tab.component.js.map +1 -1
- package/lib/commonjs/components/search-input/search-input.component.js +57 -0
- package/lib/commonjs/components/search-input/search-input.component.js.map +1 -0
- package/lib/commonjs/components/search-input/search-input.style.js +34 -0
- package/lib/commonjs/components/search-input/search-input.style.js.map +1 -0
- package/lib/commonjs/components/search-input/search-input.type.js +6 -0
- package/lib/commonjs/components/search-input/search-input.type.js.map +1 -0
- package/lib/commonjs/components/textlink/textlink.component.js +7 -2
- package/lib/commonjs/components/textlink/textlink.component.js.map +1 -1
- package/lib/module/components/Appbar/Appbar.component.js +6 -4
- package/lib/module/components/Appbar/Appbar.component.js.map +1 -1
- package/lib/module/components/Appbar/Appbar.style.js +9 -2
- package/lib/module/components/Appbar/Appbar.style.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.component.js +7 -25
- package/lib/module/components/BottomSheet/BottomSheet.component.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.style.js +11 -4
- package/lib/module/components/BottomSheet/BottomSheet.style.js.map +1 -1
- package/lib/module/components/CheckBoxInput/CheckBoxInput.component.js +18 -10
- package/lib/module/components/CheckBoxInput/CheckBoxInput.component.js.map +1 -1
- package/lib/module/components/Checkbox/Checkbox.component.js +5 -3
- package/lib/module/components/Checkbox/Checkbox.component.js.map +1 -1
- package/lib/module/components/Checkbox/Checkbox.type.js +1 -1
- package/lib/module/components/RadioButton/RadioButton.component.js +5 -3
- package/lib/module/components/RadioButton/RadioButton.component.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButton.type.js +1 -1
- package/lib/module/components/RadioInput/RadioInput.component.js +18 -10
- package/lib/module/components/RadioInput/RadioInput.component.js.map +1 -1
- package/lib/module/components/Tabs/Tabs.component.js +1 -0
- package/lib/module/components/Tabs/Tabs.component.js.map +1 -1
- package/lib/module/components/TextArea/TextArea.component.js +3 -2
- package/lib/module/components/TextArea/TextArea.component.js.map +1 -1
- package/lib/module/components/TextInput/TextInput.component.js +3 -2
- package/lib/module/components/TextInput/TextInput.component.js.map +1 -1
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/rounded-tab/rounded-tab.component.js +7 -2
- package/lib/module/components/rounded-tab/rounded-tab.component.js.map +1 -1
- package/lib/module/components/search-input/search-input.component.js +50 -0
- package/lib/module/components/search-input/search-input.component.js.map +1 -0
- package/lib/module/components/search-input/search-input.style.js +27 -0
- package/lib/module/components/search-input/search-input.style.js.map +1 -0
- package/lib/module/components/search-input/search-input.type.js +2 -0
- package/lib/module/components/search-input/search-input.type.js.map +1 -0
- package/lib/module/components/textlink/textlink.component.js +7 -2
- package/lib/module/components/textlink/textlink.component.js.map +1 -1
- package/lib/typescript/components/Appbar/Appbar.component.d.ts.map +1 -1
- package/lib/typescript/components/Appbar/Appbar.style.d.ts +3 -1
- package/lib/typescript/components/Appbar/Appbar.style.d.ts.map +1 -1
- package/lib/typescript/components/Appbar/Appbar.type.d.ts +2 -0
- package/lib/typescript/components/Appbar/Appbar.type.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet/BottomSheet.component.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet/BottomSheet.style.d.ts +1 -0
- package/lib/typescript/components/BottomSheet/BottomSheet.style.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet/BottomSheet.type.d.ts +2 -2
- package/lib/typescript/components/BottomSheet/BottomSheet.type.d.ts.map +1 -1
- package/lib/typescript/components/CheckBoxInput/CheckBoxInput.component.d.ts.map +1 -1
- package/lib/typescript/components/CheckBoxInput/CheckBoxInput.type.d.ts +7 -4
- package/lib/typescript/components/CheckBoxInput/CheckBoxInput.type.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/Checkbox.component.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/Checkbox.type.d.ts +2 -1
- package/lib/typescript/components/Checkbox/Checkbox.type.d.ts.map +1 -1
- package/lib/typescript/components/RadioButton/RadioButton.component.d.ts.map +1 -1
- package/lib/typescript/components/RadioButton/RadioButton.type.d.ts +2 -1
- package/lib/typescript/components/RadioButton/RadioButton.type.d.ts.map +1 -1
- package/lib/typescript/components/RadioInput/RadioInput.component.d.ts.map +1 -1
- package/lib/typescript/components/RadioInput/RadioInput.type.d.ts +7 -4
- package/lib/typescript/components/RadioInput/RadioInput.type.d.ts.map +1 -1
- package/lib/typescript/components/Tabs/Tabs.component.d.ts.map +1 -1
- package/lib/typescript/components/TextArea/TextArea.component.d.ts.map +1 -1
- package/lib/typescript/components/TextArea/TextArea.type.d.ts +2 -0
- package/lib/typescript/components/TextArea/TextArea.type.d.ts.map +1 -1
- package/lib/typescript/components/TextInput/TextInput.component.d.ts.map +1 -1
- package/lib/typescript/components/TextInput/TextInput.type.d.ts +2 -0
- package/lib/typescript/components/TextInput/TextInput.type.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +2 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/rounded-tab/rounded-tab.component.d.ts.map +1 -1
- package/lib/typescript/components/rounded-tab/rounded-tab.type.d.ts +3 -1
- package/lib/typescript/components/rounded-tab/rounded-tab.type.d.ts.map +1 -1
- package/lib/typescript/components/search-input/search-input.component.d.ts +4 -0
- package/lib/typescript/components/search-input/search-input.component.d.ts.map +1 -0
- package/lib/typescript/components/search-input/search-input.style.d.ts +10 -0
- package/lib/typescript/components/search-input/search-input.style.d.ts.map +1 -0
- package/lib/typescript/components/search-input/search-input.type.d.ts +7 -0
- package/lib/typescript/components/search-input/search-input.type.d.ts.map +1 -0
- package/lib/typescript/components/textlink/textlink.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Appbar/Appbar.component.tsx +35 -34
- package/src/components/Appbar/Appbar.style.tsx +9 -2
- package/src/components/Appbar/Appbar.type.ts +4 -0
- package/src/components/BottomSheet/BottomSheet.component.tsx +32 -53
- package/src/components/BottomSheet/BottomSheet.style.tsx +11 -2
- package/src/components/BottomSheet/BottomSheet.type.ts +3 -2
- package/src/components/CheckBoxInput/CheckBoxInput.component.tsx +18 -2
- package/src/components/CheckBoxInput/CheckBoxInput.type.ts +7 -5
- package/src/components/Checkbox/Checkbox.component.tsx +2 -1
- package/src/components/Checkbox/Checkbox.type.ts +3 -1
- package/src/components/RadioButton/RadioButton.component.tsx +2 -1
- package/src/components/RadioButton/RadioButton.type.ts +3 -1
- package/src/components/RadioInput/RadioInput.component.tsx +18 -2
- package/src/components/RadioInput/RadioInput.type.ts +7 -5
- package/src/components/Tabs/Tabs.component.tsx +1 -0
- package/src/components/TextArea/TextArea.component.tsx +6 -1
- package/src/components/TextArea/TextArea.type.ts +2 -0
- package/src/components/TextInput/TextInput.component.tsx +6 -1
- package/src/components/TextInput/TextInput.type.ts +2 -0
- package/src/components/index.ts +2 -0
- package/src/components/rounded-tab/rounded-tab.component.tsx +11 -2
- package/src/components/rounded-tab/rounded-tab.type.ts +3 -1
- package/src/components/search-input/search-input.component.tsx +66 -0
- package/src/components/search-input/search-input.style.ts +38 -0
- package/src/components/search-input/search-input.type.ts +7 -0
- package/src/components/textlink/textlink.component.tsx +6 -0
|
@@ -22,6 +22,7 @@ const TextInput = props => {
|
|
|
22
22
|
onFocus = () => null,
|
|
23
23
|
errorMessage,
|
|
24
24
|
helperMessage,
|
|
25
|
+
helperMessageProps,
|
|
25
26
|
isError,
|
|
26
27
|
counter = 0,
|
|
27
28
|
inputIcon = null,
|
|
@@ -98,10 +99,10 @@ const TextInput = props => {
|
|
|
98
99
|
}, rest)), inputIcon || counter > 0 ? inputIcon || /*#__PURE__*/React.createElement(_typography.Typography, {
|
|
99
100
|
style: computedStyle.counter,
|
|
100
101
|
variant: "caption"
|
|
101
|
-
}, `${value === null || value === void 0 ? void 0 : value.length}/${counter}`) : null)), errorMessage || helperMessage ? /*#__PURE__*/React.createElement(_typography.Typography, {
|
|
102
|
+
}, `${value === null || value === void 0 ? void 0 : value.length}/${counter}`) : null)), errorMessage || helperMessage ? /*#__PURE__*/React.createElement(_typography.Typography, _extends({
|
|
102
103
|
variant: "caption",
|
|
103
104
|
style: computedStyle.messageHelper
|
|
104
|
-
}, errorMessage || !isError && helperMessage) : null);
|
|
105
|
+
}, helperMessageProps), errorMessage || !isError && helperMessage) : null);
|
|
105
106
|
};
|
|
106
107
|
exports.TextInput = TextInput;
|
|
107
108
|
//# sourceMappingURL=TextInput.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TextInput","props","value","label","onBlur","onFocus","errorMessage","helperMessage","isError","counter","inputIcon","rest","labelWidth","setLabelWidth","React","useState","focused","setFocused","computedStyle","getStyle","animation","useRef","Animated","Value","scale","current","interpolate","inputRange","outputRange","translateY","translateX","animate","toValue","spring","useNativeDriver","start","useEffect","handleOnFocus","event","handleOnBlur","getLabelWidth","width","nativeEvent","layout","fieldWrapper","fieldContainer","labelContainer","transform","inputWrapper","textField","Palettes","black","length","messageHelper"],"sourceRoot":"../../src","sources":["TextInput.component.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AAEA;AACA;AAEA;AAAwC;AAAA;AAAA;AAAA;AAKxC,MAAMA,SAAkD,GAAIC,KAAK,IAAK;EACpE,MAAM;IACJC,KAAK;IACLC,KAAK;IACLC,MAAM,GAAG,MAAM,IAAI;IACnBC,OAAO,GAAG,MAAM,IAAI;IACpBC,YAAY;IACZC,aAAa;IACbC,OAAO;IACPC,OAAO,GAAG,CAAC;IACXC,SAAS,GAAG,IAAI;IAChB,GAAGC;EACL,CAAC,
|
|
1
|
+
{"version":3,"names":["TextInput","props","value","label","onBlur","onFocus","errorMessage","helperMessage","helperMessageProps","isError","counter","inputIcon","rest","labelWidth","setLabelWidth","React","useState","focused","setFocused","computedStyle","getStyle","animation","useRef","Animated","Value","scale","current","interpolate","inputRange","outputRange","translateY","translateX","animate","toValue","spring","useNativeDriver","start","useEffect","handleOnFocus","event","handleOnBlur","getLabelWidth","width","nativeEvent","layout","fieldWrapper","fieldContainer","labelContainer","transform","inputWrapper","textField","Palettes","black","length","messageHelper"],"sourceRoot":"../../src","sources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gBAEpB,oBAAC,sBAAU;IAAC,OAAO,EAAC,OAAO;IAAC,KAAK,EAAEtB,aAAa,CAAChB;EAAM,GACpDA,KAAK,CACK,CAEhB,eACD,oBAAC,iBAAI;IAAC,KAAK,EAAEgB,aAAa,CAAC8B;EAAa,gBACtC,oBAAC,6BAAS;IACR,KAAK,EAAE/C,KAAM;IACb,KAAK,EAAE,CAACiB,aAAa,CAAC+B,SAAS,CAAE;IACjC,OAAO,EAAEZ,aAAc;IACvB,MAAM,EAAEE,YAAa;IACrB,oBAAoB,EAAEvB,OAAO,GAAGkC,gBAAQ,CAACC,KAAK,CAAC,GAAG,CAAC,GAAG;EAAc,GAChExC,IAAI,EACR,EACDD,SAAS,IAAID,OAAO,GAAG,CAAC,GACrBC,SAAS,iBACP,oBAAC,sBAAU;IAAC,KAAK,EAAEQ,aAAa,CAACT,OAAQ;IAAC,OAAO,EAAC;EAAS,GACvD,GAAER,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEmD,MAAO,IAAG3C,OAAQ,EAAC,CAEjC,GACD,IAAI,CACH,CACF,EACNJ,YAAY,IAAIC,aAAa,gBAC5B,oBAAC,sBAAU;IACT,OAAO,EAAC,SAAS;IACjB,KAAK,EAAEY,aAAa,CAACmC;EAAc,GAC/B9C,kBAAkB,GAErBF,YAAY,IAAM,CAACG,OAAO,IAAIF,aAAyB,CAC7C,GACX,IAAI,CACH;AAEX,CAAC;AAAC"}
|
|
@@ -129,6 +129,12 @@ Object.defineProperty(exports, "RoundedTab", {
|
|
|
129
129
|
return _roundedTab.RoundedTab;
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
+
Object.defineProperty(exports, "SearchInput", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () {
|
|
135
|
+
return _searchInput.SearchInput;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
132
138
|
Object.defineProperty(exports, "SliderIndicator", {
|
|
133
139
|
enumerable: true,
|
|
134
140
|
get: function () {
|
|
@@ -227,6 +233,7 @@ var _Divider = require("./Divider/Divider.component");
|
|
|
227
233
|
var _Tabs = require("./Tabs/Tabs.component");
|
|
228
234
|
var _RadioButton = require("./RadioButton/RadioButton.component");
|
|
229
235
|
var _BottomSheet = require("./BottomSheet/BottomSheet.component");
|
|
236
|
+
var _searchInput = require("./search-input/search-input.component");
|
|
230
237
|
var _RadioInput = require("./RadioInput/RadioInput.component");
|
|
231
238
|
var _CheckBoxInput = require("./CheckBoxInput/CheckBoxInput.component");
|
|
232
239
|
var _Checkbox = require("./Checkbox/Checkbox.component");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
|
@@ -15,14 +15,18 @@ const RoundedTab = props => {
|
|
|
15
15
|
const {
|
|
16
16
|
data = [],
|
|
17
17
|
selectedValue = '',
|
|
18
|
-
onTabItemPress = () => null
|
|
18
|
+
onTabItemPress = () => null,
|
|
19
|
+
containerStyle,
|
|
20
|
+
contentContainerStyle
|
|
19
21
|
} = props;
|
|
20
22
|
const computedStyle = (0, _roundedTab.getStyle)(props);
|
|
21
23
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
22
|
-
style: [computedStyle.container]
|
|
24
|
+
style: [computedStyle.container, containerStyle]
|
|
23
25
|
}, /*#__PURE__*/React.createElement(_reactNative.FlatList, {
|
|
24
26
|
horizontal: true,
|
|
25
27
|
data: data,
|
|
28
|
+
showsHorizontalScrollIndicator: false,
|
|
29
|
+
contentContainerStyle: [contentContainerStyle],
|
|
26
30
|
renderItem: _ref => {
|
|
27
31
|
let {
|
|
28
32
|
item
|
|
@@ -35,6 +39,7 @@ const RoundedTab = props => {
|
|
|
35
39
|
...rest
|
|
36
40
|
} = item;
|
|
37
41
|
return /*#__PURE__*/React.createElement(TabItem, _extends({
|
|
42
|
+
key: label,
|
|
38
43
|
label: label,
|
|
39
44
|
value: value,
|
|
40
45
|
isSelected: selectedValue === value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RoundedTab","props","data","selectedValue","onTabItemPress","computedStyle","getStyle","container","item","label","value","leading","trailing","rest","itemSeparator","TabItem","isSelected","onPress","getTabItemStyle","animatedButtonScale","Animated","Value","onPressIn","spring","toValue","useNativeDriver","start","onPressOut","animatedScaleStyle","transform","scale","leadingWrapper","trailingWrapper"],"sourceRoot":"../../src","sources":["rounded-tab.component.tsx"],"mappings":";;;;;;AAAA;AACA;AAEA;AAIA;AAAgE;AAAA;AAAA;AAKhE,MAAMA,UAAoD,GAAIC,KAAK,IAAK;EACtE,MAAM;
|
|
1
|
+
{"version":3,"names":["RoundedTab","props","data","selectedValue","onTabItemPress","containerStyle","contentContainerStyle","computedStyle","getStyle","container","item","label","value","leading","trailing","rest","itemSeparator","TabItem","isSelected","onPress","getTabItemStyle","animatedButtonScale","Animated","Value","onPressIn","spring","toValue","useNativeDriver","start","onPressOut","animatedScaleStyle","transform","scale","leadingWrapper","trailingWrapper"],"sourceRoot":"../../src","sources":["rounded-tab.component.tsx"],"mappings":";;;;;;AAAA;AACA;AAEA;AAIA;AAAgE;AAAA;AAAA;AAKhE,MAAMA,UAAoD,GAAIC,KAAK,IAAK;EACtE,MAAM;IACJC,IAAI,GAAG,EAAE;IACTC,aAAa,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|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SearchInput = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _themes = require("../../themes");
|
|
10
|
+
var _icons = require("../../icons");
|
|
11
|
+
var _searchInput = require("./search-input.style");
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
15
|
+
const SearchInput = props => {
|
|
16
|
+
const {
|
|
17
|
+
value = '',
|
|
18
|
+
onFocus = () => null,
|
|
19
|
+
onBlur = () => null,
|
|
20
|
+
trailingIcon,
|
|
21
|
+
onTraillingIconPress,
|
|
22
|
+
...rest
|
|
23
|
+
} = props;
|
|
24
|
+
const computedStyle = (0, _searchInput.getStyles)();
|
|
25
|
+
const [focused, setFocused] = React.useState(false);
|
|
26
|
+
const handleOnFocus = event => {
|
|
27
|
+
setFocused(true);
|
|
28
|
+
onFocus(event);
|
|
29
|
+
};
|
|
30
|
+
const handleOnBlur = event => {
|
|
31
|
+
onBlur(event);
|
|
32
|
+
setFocused(false);
|
|
33
|
+
};
|
|
34
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
35
|
+
style: [computedStyle.container, {
|
|
36
|
+
borderColor: focused ? _themes.Palettes.black[900] : _themes.Palettes.grey[300]
|
|
37
|
+
}]
|
|
38
|
+
}, /*#__PURE__*/React.createElement(_icons.IconSearch, {
|
|
39
|
+
width: 24,
|
|
40
|
+
height: 24
|
|
41
|
+
}), /*#__PURE__*/React.createElement(_reactNative.TextInput, _extends({
|
|
42
|
+
style: [computedStyle.textInput],
|
|
43
|
+
placeholderTextColor: _themes.Palettes.grey[400],
|
|
44
|
+
onBlur: handleOnBlur,
|
|
45
|
+
onFocus: handleOnFocus,
|
|
46
|
+
value: value
|
|
47
|
+
}, rest)), value.length > 0 && /*#__PURE__*/React.createElement(_reactNative.TouchableWithoutFeedback, {
|
|
48
|
+
onPress: onTraillingIconPress
|
|
49
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
50
|
+
style: [computedStyle.trailingIconContainer]
|
|
51
|
+
}, trailingIcon || /*#__PURE__*/React.createElement(_icons.IconRoundClose, {
|
|
52
|
+
width: 16,
|
|
53
|
+
height: 16
|
|
54
|
+
}))));
|
|
55
|
+
};
|
|
56
|
+
exports.SearchInput = SearchInput;
|
|
57
|
+
//# sourceMappingURL=search-input.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SearchInput","props","value","onFocus","onBlur","trailingIcon","onTraillingIconPress","rest","computedStyle","getStyles","focused","setFocused","React","useState","handleOnFocus","event","handleOnBlur","container","borderColor","Palettes","black","grey","textInput","length","trailingIconContainer"],"sourceRoot":"../../src","sources":["search-input.component.tsx"],"mappings":";;;;;;AAAA;AACA;AAGA;AACA;AACA;AAAiD;AAAA;AAAA;AAM1C,MAAMA,WAAW,GAAIC,KAAuB,IAAK;EACtD,MAAM;IACJC,KAAK,GAAG,EAAE;IACVC,OAAO,GAAG,MAAM,IAAI;IACpBC,MAAM,GAAG,MAAM,IAAI;IACnBC,YAAY;IACZC,oBAAoB;IACpB,GAAGC;EACL,CAAC,GAAGN,KAAK;EAET,MAAMO,aAAa,GAAG,IAAAC,sBAAS,GAAE;EAEjC,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;EAEnD,MAAMC,aAAa,GACjBC,KAAoD,IACjD;IACHJ,UAAU,CAAC,IAAI,CAAC;IAChBR,OAAO,CAACY,KAAK,CAAC;EAChB,CAAC;EACD,MAAMC,YAAY,GAChBD,KAAoD,IACjD;IACHX,MAAM,CAACW,KAAK,CAAC;IACbJ,UAAU,CAAC,KAAK,CAAC;EACnB,CAAC;EACD,oBACE,oBAAC,iBAAI;IACH,KAAK,EAAE,CACLH,aAAa,CAACS,SAAS,EACvB;MAAEC,WAAW,EAAER,OAAO,GAAGS,gBAAQ,CAACC,KAAK,CAAC,GAAG,CAAC,GAAGD,gBAAQ,CAACE,IAAI,CAAC,GAAG;IAAE,CAAC;EACnE,gBAEF,oBAAC,iBAAU;IAAC,KAAK,EAAE,EAAG;IAAC,MAAM,EAAE;EAAG,EAAG,eAErC,oBAAC,sBAAS;IACR,KAAK,EAAE,CAACb,aAAa,CAACc,SAAS,CAAE;IACjC,oBAAoB,EAAEH,gBAAQ,CAACE,IAAI,CAAC,GAAG,CAAE;IACzC,MAAM,EAAEL,YAAa;IACrB,OAAO,EAAEF,aAAc;IACvB,KAAK,EAAEZ;EAAM,GACTK,IAAI,EACR,EAEDL,KAAK,CAACqB,MAAM,GAAG,CAAC,iBACf,oBAAC,qCAAwB;IAAC,OAAO,EAAEjB;EAAqB,gBACtD,oBAAC,iBAAI;IAAC,KAAK,EAAE,CAACE,aAAa,CAACgB,qBAAqB;EAAE,GAChDnB,YAAY,iBAAI,oBAAC,qBAAc;IAAC,KAAK,EAAE,EAAG;IAAC,MAAM,EAAE;EAAG,EAAG,CACrD,CAEV,CACI;AAEX,CAAC;AAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getStyles = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _themes = require("../../themes");
|
|
9
|
+
const getStyles = () => {
|
|
10
|
+
const style = {};
|
|
11
|
+
style.container = {
|
|
12
|
+
width: '100%',
|
|
13
|
+
maxHeight: 40,
|
|
14
|
+
flexDirection: 'row',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
borderRadius: _themes.Radius.full,
|
|
17
|
+
overflow: 'hidden',
|
|
18
|
+
borderWidth: 1.5,
|
|
19
|
+
paddingHorizontal: _themes.Spacing[12]
|
|
20
|
+
};
|
|
21
|
+
style.textInput = {
|
|
22
|
+
marginLeft: _themes.Spacing[8],
|
|
23
|
+
fontFamily: 'Montserrat-Regular',
|
|
24
|
+
flex: 1,
|
|
25
|
+
textAlignVertical: 'center',
|
|
26
|
+
color: _themes.Palettes.black[900]
|
|
27
|
+
};
|
|
28
|
+
style.trailingIconContainer = {
|
|
29
|
+
padding: _themes.Spacing[4]
|
|
30
|
+
};
|
|
31
|
+
return _reactNative.StyleSheet.create(style);
|
|
32
|
+
};
|
|
33
|
+
exports.getStyles = getStyles;
|
|
34
|
+
//# sourceMappingURL=search-input.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getStyles","style","container","width","maxHeight","flexDirection","alignItems","borderRadius","Radius","full","overflow","borderWidth","paddingHorizontal","Spacing","textInput","marginLeft","fontFamily","flex","textAlignVertical","color","Palettes","black","trailingIconContainer","padding","StyleSheet","create"],"sourceRoot":"../../src","sources":["search-input.style.ts"],"mappings":";;;;;;AAAA;AACA;AASO,MAAMA,SAAS,GAAG,MAAM;EAC7B,MAAMC,KAAgB,GAAG,CAAC,CAAC;EAE3BA,KAAK,CAACC,SAAS,GAAG;IAChBC,KAAK,EAAE,MAAM;IACbC,SAAS,EAAE,EAAE;IACbC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,YAAY,EAAEC,cAAM,CAACC,IAAI;IACzBC,QAAQ,EAAE,QAAQ;IAClBC,WAAW,EAAE,GAAG;IAChBC,iBAAiB,EAAEC,eAAO,CAAC,EAAE;EAC/B,CAAC;EAEDZ,KAAK,CAACa,SAAS,GAAG;IAChBC,UAAU,EAAEF,eAAO,CAAC,CAAC,CAAC;IACtBG,UAAU,EAAE,oBAAoB;IAChCC,IAAI,EAAE,CAAC;IACPC,iBAAiB,EAAE,QAAQ;IAC3BC,KAAK,EAAEC,gBAAQ,CAACC,KAAK,CAAC,GAAG;EAC3B,CAAC;EAEDpB,KAAK,CAACqB,qBAAqB,GAAG;IAC5BC,OAAO,EAAEV,eAAO,CAAC,CAAC;EACpB,CAAC;EAED,OAAOW,uBAAU,CAACC,MAAM,CAACxB,KAAK,CAAC;AACjC,CAAC;AAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["search-input.type.ts"],"mappings":""}
|
|
@@ -8,6 +8,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _typography = require("../typography/typography.component");
|
|
9
9
|
var _reactNative = require("react-native");
|
|
10
10
|
var _textlink = require("./textlink.style");
|
|
11
|
+
var _themes = require("../../themes");
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
13
14
|
const TextLink = props => {
|
|
@@ -18,16 +19,20 @@ const TextLink = props => {
|
|
|
18
19
|
leading,
|
|
19
20
|
containerStyles,
|
|
20
21
|
numberOfLines,
|
|
22
|
+
disabled,
|
|
21
23
|
...rest
|
|
22
24
|
} = props;
|
|
23
25
|
const hasTrailing = !!trailing;
|
|
24
26
|
const hasLeading = !!leading;
|
|
25
27
|
const computedStyle = (0, _textlink.getStyle)();
|
|
26
28
|
return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, _extends({
|
|
27
|
-
style: [computedStyle.container, containerStyles]
|
|
29
|
+
style: [computedStyle.container, containerStyles],
|
|
30
|
+
disabled: disabled
|
|
28
31
|
}, rest), hasLeading && leading, /*#__PURE__*/_react.default.createElement(_typography.Typography, {
|
|
29
32
|
variant: "button",
|
|
30
|
-
style: [computedStyle.label, hasLeading && computedStyle.hasLeading, hasTrailing && computedStyle.hasTrailing, textStyles
|
|
33
|
+
style: [computedStyle.label, hasLeading && computedStyle.hasLeading, hasTrailing && computedStyle.hasTrailing, textStyles, {
|
|
34
|
+
color: disabled ? _themes.Palettes.grey[500] : _themes.Palettes.blueDark[700]
|
|
35
|
+
}],
|
|
31
36
|
numberOfLines: numberOfLines
|
|
32
37
|
}, label), hasTrailing && trailing);
|
|
33
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TextLink","props","label","textStyles","trailing","leading","containerStyles","numberOfLines","rest","hasTrailing","hasLeading","computedStyle","getStyle","container"],"sourceRoot":"../../src","sources":["textlink.component.tsx"],"mappings":";;;;;;AAAA;AAEA;AACA;AACA;
|
|
1
|
+
{"version":3,"names":["TextLink","props","label","textStyles","trailing","leading","containerStyles","numberOfLines","disabled","rest","hasTrailing","hasLeading","computedStyle","getStyle","container","color","Palettes","grey","blueDark"],"sourceRoot":"../../src","sources":["textlink.component.tsx"],"mappings":";;;;;;AAAA;AAEA;AACA;AACA;AACA;AAAwC;AAAA;AAEjC,MAAMA,QAAgD,GAAIC,KAAK,IAAK;EACzE,MAAM;IACJC,KAAK,GAAG,EAAE;IACVC,UAAU;IACVC,QAAQ;IACRC,OAAO;IACPC,eAAe;IACfC,aAAa;IACbC,QAAQ;IACR,GAAGC;EACL,CAAC,GAAGR,KAAK;EAET,MAAMS,WAAW,GAAG,CAAC,CAACN,QAAQ;EAC9B,MAAMO,UAAU,GAAG,CAAC,CAACN,OAAO;EAE5B,MAAMO,aAAa,GAAG,IAAAC,kBAAQ,GAAE;EAEhC,oBACE,6BAAC,6BAAgB;IACf,KAAK,EAAE,CAACD,aAAa,CAACE,SAAS,EAAER,eAAe,CAAE;IAClD,QAAQ,EAAEE;EAAS,GACfC,IAAI,GAEPE,UAAU,IAAIN,OAAO,eACtB,6BAAC,sBAAU;IACT,OAAO,EAAC,QAAQ;IAChB,KAAK,EAAE,CACLO,aAAa,CAACV,KAAK,EACnBS,UAAU,IAAIC,aAAa,CAACD,UAAU,EACtCD,WAAW,IAAIE,aAAa,CAACF,WAAW,EACxCP,UAAU,EACV;MACEY,KAAK,EAAEP,QAAQ,GAAGQ,gBAAQ,CAACC,IAAI,CAAC,GAAG,CAAC,GAAGD,gBAAQ,CAACE,QAAQ,CAAC,GAAG;IAC9D,CAAC,CACD;IACF,aAAa,EAAEX;EAAc,GAE5BL,KAAK,CACK,EACZQ,WAAW,IAAIN,QAAQ,CACP;AAEvB,CAAC;AAAC"}
|
|
@@ -21,10 +21,12 @@ const Appbar = props => {
|
|
|
21
21
|
backIconProps = {},
|
|
22
22
|
titleProps = {}
|
|
23
23
|
} = props;
|
|
24
|
-
const computedStyle = getStyle();
|
|
24
|
+
const computedStyle = getStyle(props);
|
|
25
25
|
return /*#__PURE__*/React.createElement(View, {
|
|
26
|
-
style: [computedStyle.container,
|
|
27
|
-
},
|
|
26
|
+
style: [computedStyle.container, withShadow && Shadow['shadow-elevation-2']]
|
|
27
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
28
|
+
style: [computedStyle.wrapperContainer, containerStyle]
|
|
29
|
+
}, customHeader ?? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TouchableHighlight, _extends({
|
|
28
30
|
onPress: onBackPress,
|
|
29
31
|
style: [computedStyle.iconWrapper],
|
|
30
32
|
underlayColor: Palettes.grey[50]
|
|
@@ -38,7 +40,7 @@ const Appbar = props => {
|
|
|
38
40
|
onPress: action.onPress,
|
|
39
41
|
style: [computedStyle.iconWrapper],
|
|
40
42
|
underlayColor: Palettes.grey[50]
|
|
41
|
-
}, action.props), action.icon)))));
|
|
43
|
+
}, action.props), action.icon))))));
|
|
42
44
|
};
|
|
43
45
|
export { Appbar };
|
|
44
46
|
//# sourceMappingURL=Appbar.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","TouchableHighlight","View","getStyle","Palettes","Shadow","IconArrowLeft","Typography","Appbar","props","backIcon","black","title","customHeader","containerStyle","onBackPress","buttonActions","withShadow","backIconProps","titleProps","computedStyle","container","iconWrapper","grey","contentWrapper","length","map","action","idx","onPress","icon"],"sourceRoot":"../../src","sources":["Appbar.component.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB,EAAEC,IAAI,QAAQ,cAAc;AAEvD,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,QAAQ,EAAEC,MAAM,QAAQ,cAAc;AAC/C,SAASC,aAAa,QAAQ,aAAa;AAC3C,SAASC,UAAU,QAAQ,oCAAoC;AAI/D,MAAMC,MAA4C,GAAIC,KAAK,IAAK;EAC9D,MAAM;IACJC,QAAQ,gBACN,oBAAC,aAAa;MAAC,KAAK,EAAE,EAAG;MAAC,MAAM,EAAE,EAAG;MAAC,IAAI,EAAEN,QAAQ,CAACO,KAAK,CAAC,GAAG;IAAE,EACjE;IACDC,KAAK,GAAG,EAAE;IACVC,YAAY,GAAG,IAAI;IACnBC,cAAc;IACdC,WAAW,GAAG,MAAM,CAAC,CAAC;IACtBC,aAAa,GAAG,EAAE;IAClBC,UAAU,GAAG,IAAI;IACjBC,aAAa,GAAG,CAAC,CAAC;IAClBC,UAAU,GAAG,CAAC;EAChB,CAAC,GAAGV,KAAK;EAET,MAAMW,aAAa,GAAGjB,QAAQ,
|
|
1
|
+
{"version":3,"names":["React","TouchableHighlight","View","getStyle","Palettes","Shadow","IconArrowLeft","Typography","Appbar","props","backIcon","black","title","customHeader","containerStyle","onBackPress","buttonActions","withShadow","backIconProps","titleProps","computedStyle","container","wrapperContainer","iconWrapper","grey","contentWrapper","length","map","action","idx","onPress","icon"],"sourceRoot":"../../src","sources":["Appbar.component.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB,EAAEC,IAAI,QAAQ,cAAc;AAEvD,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,QAAQ,EAAEC,MAAM,QAAQ,cAAc;AAC/C,SAASC,aAAa,QAAQ,aAAa;AAC3C,SAASC,UAAU,QAAQ,oCAAoC;AAI/D,MAAMC,MAA4C,GAAIC,KAAK,IAAK;EAC9D,MAAM;IACJC,QAAQ,gBACN,oBAAC,aAAa;MAAC,KAAK,EAAE,EAAG;MAAC,MAAM,EAAE,EAAG;MAAC,IAAI,EAAEN,QAAQ,CAACO,KAAK,CAAC,GAAG;IAAE,EACjE;IACDC,KAAK,GAAG,EAAE;IACVC,YAAY,GAAG,IAAI;IACnBC,cAAc;IACdC,WAAW,GAAG,MAAM,CAAC,CAAC;IACtBC,aAAa,GAAG,EAAE;IAClBC,UAAU,GAAG,IAAI;IACjBC,aAAa,GAAG,CAAC,CAAC;IAClBC,UAAU,GAAG,CAAC;EAChB,CAAC,GAAGV,KAAK;EAET,MAAMW,aAAa,GAAGjB,QAAQ,CAACM,KAAK,CAAC;EAErC,oBACE,oBAAC,IAAI;IACH,KAAK,EAAE,CACLW,aAAa,CAACC,SAAS,EACvBJ,UAAU,IAAIZ,MAAM,CAAC,oBAAoB,CAAC;EAC1C,gBAEF,oBAAC,IAAI;IAAC,KAAK,EAAE,CAACe,aAAa,CAACE,gBAAgB,EAAER,cAAc;EAAE,GAC3DD,YAAY,iBACX,uDACE,oBAAC,kBAAkB;IACjB,OAAO,EAAEE,WAAY;IACrB,KAAK,EAAE,CAACK,aAAa,CAACG,WAAW,CAAE;IACnC,aAAa,EAAEnB,QAAQ,CAACoB,IAAI,CAAC,EAAE;EAAE,GAC7BN,aAAa,GAEhBR,QAAQ,CACU,eACrB,oBAAC,IAAI;IAAC,KAAK,EAAE,CAACU,aAAa,CAACK,cAAc;EAAE,gBAC1C,oBAAC,UAAU;IACT,OAAO,EAAC,WAAW;IACnB,KAAK,EAAE,CAACL,aAAa,CAACR,KAAK;EAAE,GACzBO,UAAU,GAEbP,KAAK,CACK,EACZI,aAAa,CAACU,MAAM,GAAG,CAAC,IACvBV,aAAa,CAACW,GAAG,CAAC,CAACC,MAAM,EAAEC,GAAG,kBAC5B,oBAAC,kBAAkB;IACjB,GAAG,EAAEA,GAAI;IACT,OAAO,EAAED,MAAM,CAACE,OAAQ;IACxB,KAAK,EAAE,CAACV,aAAa,CAACG,WAAW,CAAE;IACnC,aAAa,EAAEnB,QAAQ,CAACoB,IAAI,CAAC,EAAE;EAAE,GAC7BI,MAAM,CAACnB,KAAK,GAEfmB,MAAM,CAACG,IAAI,CAEf,CAAC,CACC,CAEV,CACI,CACF;AAEX,CAAC;AAED,SAASvB,MAAM"}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
import { Palettes, Radius, Spacing } from '../../themes';
|
|
3
|
-
export const getStyle =
|
|
3
|
+
export const getStyle = props => {
|
|
4
|
+
const {
|
|
5
|
+
statusBarHeight = 0,
|
|
6
|
+
backgroundColor = Palettes.white[50]
|
|
7
|
+
} = props;
|
|
4
8
|
const computedStyle = {};
|
|
5
9
|
computedStyle.container = {
|
|
10
|
+
paddingTop: statusBarHeight,
|
|
11
|
+
backgroundColor
|
|
12
|
+
};
|
|
13
|
+
computedStyle.wrapperContainer = {
|
|
6
14
|
width: '100%',
|
|
7
15
|
height: 56,
|
|
8
16
|
padding: Spacing[16],
|
|
9
|
-
backgroundColor: Palettes.white[50],
|
|
10
17
|
flexDirection: 'row',
|
|
11
18
|
justifyContent: 'flex-start',
|
|
12
19
|
alignItems: 'center'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","Palettes","Radius","Spacing","getStyle","computedStyle","container","
|
|
1
|
+
{"version":3,"names":["StyleSheet","Palettes","Radius","Spacing","getStyle","props","statusBarHeight","backgroundColor","white","computedStyle","container","paddingTop","wrapperContainer","width","height","padding","flexDirection","justifyContent","alignItems","iconWrapper","borderRadius","contentWrapper","flex","marginLeft","title","create"],"sourceRoot":"../../src","sources":["Appbar.style.tsx"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,QAAQ,cAAc;AAcxD,OAAO,MAAMC,QAAQ,GAAIC,KAAkB,IAAK;EAC9C,MAAM;IAAEC,eAAe,GAAG,CAAC;IAAEC,eAAe,GAAGN,QAAQ,CAACO,KAAK,CAAC,EAAE;EAAE,CAAC,GAAGH,KAAK;EAC3E,MAAMI,aAAiC,GAAG,CAAC,CAAC;EAE5CA,aAAa,CAACC,SAAS,GAAG;IACxBC,UAAU,EAAEL,eAAe;IAC3BC;EACF,CAAC;EAEDE,aAAa,CAACG,gBAAgB,GAAG;IAC/BC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,EAAE;IACVC,OAAO,EAAEZ,OAAO,CAAC,EAAE,CAAC;IACpBa,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,YAAY;IAC5BC,UAAU,EAAE;EACd,CAAC;EAEDT,aAAa,CAACU,WAAW,GAAG;IAC1BJ,OAAO,EAAEZ,OAAO,CAAC,CAAC,CAAC;IACnBiB,YAAY,EAAElB,MAAM,CAAC,CAAC;EACxB,CAAC;EAEDO,aAAa,CAACY,cAAc,GAAG;IAC7BC,IAAI,EAAE,CAAC;IACPC,UAAU,EAAEpB,OAAO,CAAC,EAAE,CAAC;IACvBa,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE;EACd,CAAC;EAEDT,aAAa,CAACe,KAAK,GAAG;IACpBF,IAAI,EAAE;EACR,CAAC;EAED,OAAOtB,UAAU,CAACyB,MAAM,CAAChB,aAAa,CAAC;AACzC,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Animated, Dimensions, PanResponder, View } from 'react-native';
|
|
3
|
+
import { Animated, Dimensions, PanResponder, TouchableHighlight, View } from 'react-native';
|
|
4
4
|
import Modal from 'react-native-modal';
|
|
5
5
|
import { getStyle } from './BottomSheet.style';
|
|
6
6
|
import { Typography } from '../typography/typography.component';
|
|
7
|
-
import { TouchableHighlight } from 'react-native';
|
|
8
7
|
const deviceWindow = Dimensions.get('window');
|
|
9
8
|
const BottomSheet = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
9
|
const {
|
|
@@ -83,33 +82,20 @@ const BottomSheet = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
83
82
|
style: [computedStyle.sheetHeaderWrapper]
|
|
84
83
|
}, /*#__PURE__*/React.createElement(View, {
|
|
85
84
|
style: [computedStyle.sheetHeader]
|
|
86
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
87
|
-
style: [{
|
|
88
|
-
maxWidth: (deviceWindow.width - 32) / 8 * 2,
|
|
89
|
-
minWidth: (deviceWindow.width - 32) / 8 * 2
|
|
90
|
-
}]
|
|
91
85
|
}, !!dismissIcon && /*#__PURE__*/React.createElement(TouchableHighlight, _extends({
|
|
92
86
|
onPress: handleDismiss,
|
|
93
87
|
style: [computedStyle.sheetDismissIconWrapper],
|
|
94
88
|
underlayColor: 'transparent'
|
|
95
|
-
}, dismissIconProps), dismissIcon)
|
|
96
|
-
style: [{
|
|
97
|
-
maxWidth: (deviceWindow.width - 32) / 8 * 4,
|
|
98
|
-
minWidth: (deviceWindow.width - 32) / 8 * 4
|
|
99
|
-
}]
|
|
100
|
-
}, !!title && /*#__PURE__*/React.createElement(Typography, _extends({
|
|
89
|
+
}, dismissIconProps), dismissIcon), !!title && /*#__PURE__*/React.createElement(Typography, _extends({
|
|
101
90
|
variant: "subtitle1",
|
|
102
91
|
style: [computedStyle.textCenter],
|
|
103
92
|
numberOfLines: 2
|
|
104
|
-
}, titleProps), title)
|
|
105
|
-
style: [
|
|
106
|
-
|
|
107
|
-
minWidth: (deviceWindow.width - 32) / 8 * 2
|
|
108
|
-
}, computedStyle.sheetActionWrapper]
|
|
109
|
-
}, action || null)), !!subtitle && /*#__PURE__*/React.createElement(Typography, _extends({
|
|
93
|
+
}, titleProps), title), action && /*#__PURE__*/React.createElement(View, {
|
|
94
|
+
style: [computedStyle.sheetActionWrapper]
|
|
95
|
+
}, action)), !!subtitle && /*#__PURE__*/React.createElement(Typography, _extends({
|
|
110
96
|
variant: "body2",
|
|
111
97
|
numberOfLines: 2,
|
|
112
|
-
style: [computedStyle.textCenter]
|
|
98
|
+
style: [computedStyle.textCenter, computedStyle.subtitleText]
|
|
113
99
|
}, subtitleProps), subtitle));
|
|
114
100
|
};
|
|
115
101
|
const renderLargeIconComponent = () => {
|
|
@@ -121,11 +107,7 @@ const BottomSheet = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
121
107
|
style: [computedStyle.largeIconAbsoluteWrapper]
|
|
122
108
|
}, largeIcon), !!dismissIcon && /*#__PURE__*/React.createElement(TouchableHighlight, _extends({
|
|
123
109
|
onPress: handleDismiss,
|
|
124
|
-
style: [computedStyle.sheetDismissIconWrapper,
|
|
125
|
-
position: 'absolute',
|
|
126
|
-
left: 16,
|
|
127
|
-
zIndex: 99
|
|
128
|
-
}],
|
|
110
|
+
style: [computedStyle.sheetDismissIconWrapper],
|
|
129
111
|
underlayColor: 'transparent'
|
|
130
112
|
}, dismissIconProps), dismissIcon));
|
|
131
113
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","Dimensions","PanResponder","View","Modal","getStyle","Typography","
|
|
1
|
+
{"version":3,"names":["React","Animated","Dimensions","PanResponder","TouchableHighlight","View","Modal","getStyle","Typography","deviceWindow","get","BottomSheet","forwardRef","props","ref","onDismiss","title","titleProps","subtitle","subtitleProps","dismissIcon","dismissIconProps","action","largeIcon","largeIconContainerHeight","maxSheetHeight","sheetHeader","backdropTransitionOutTiming","onBackdropPress","onBackButtonPress","children","rest","computedStyle","visibility","setVisibility","useState","panY","useRef","Value","height","current","useImperativeHandle","open","close","handleDismiss","closeAnim","start","resetPositionAnim","timing","toValue","duration","useNativeDriver","translateY","interpolate","inputRange","outputRange","useEffect","panResponders","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderMove","event","dy","onPanResponderRelease","_","gs","vy","renderSheetHeader","sheetHeaderWrapper","sheetDismissIconWrapper","textCenter","sheetActionWrapper","subtitleText","renderLargeIconComponent","largeIconContainer","largeIconAbsoluteWrapper","flex","margin","container","maxHeight","transform","sheetIndicatorWrapper","panHandlers","sliderIndicator"],"sourceRoot":"../../src","sources":["BottomSheet.component.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,UAAU,EACVC,YAAY,EACZC,kBAA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AS,CACL,EACN,CAAC,CAACH,WAAW,iBACZ,oBAAC,kBAAkB;MACjB,OAAO,EAAEwB,aAAc;MACvB,KAAK,EAAE,CAACZ,aAAa,CAACsC,uBAAuB,CAAE;MAC/C,aAAa,EAAE;IAAc,GACzBjD,gBAAgB,GAEnBD,WAAW,CAEf,CACI;EAEX,CAAC;EACD,oBACE,oBAAC,KAAK;IACJ,SAAS,EAAEa,UAAW;IACtB,2BAA2B,EAAEN,2BAA4B;IACzD,eAAe,EAAE,MAAM;MACrBC,eAAe,EAAE;MACjBgB,aAAa,EAAE;IACjB,CAAE;IACF,iBAAiB,EAAE,MAAM;MACvBf,iBAAiB,EAAE;MACnBe,aAAa,EAAE;IACjB,CAAE;IACF,eAAe,EAAE,MAAMA,aAAa,EAAG;IACvC,KAAK,EAAE;MAAEiC,IAAI,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE;EAAE,GAC1B/C,IAAI,gBAER,oBAAC,QAAQ,CAAC,IAAI;IACZ,KAAK,EAAE,CACLC,aAAa,CAAC+C,SAAS,EACvB;MACEC,SAAS,EAAEvE,YAAY,CAAC8B,MAAM,GAAGd,cAAc;MAC/CwD,SAAS,EAAE,CAAC;QAAE7B,UAAU,EAAEA;MAAW,CAAC;IACxC,CAAC;EACD,gBAEF,oBAAC,IAAI;IACH,KAAK,EAAE,CAACpB,aAAa,CAACkD,qBAAqB;EAAE,GACzCzB,aAAa,CAAC0B,WAAW,GAE5B,CAAC5D,SAAS,iBAAI,oBAAC,IAAI;IAAC,KAAK,EAAES,aAAa,CAACoD;EAAgB,EAAG,CACxD,EACN7D,SAAS,GAAGmD,wBAAwB,EAAE,GAAGN,iBAAiB,EAAE,EAC5DtC,QAAQ,CACK,CACV;AAEZ,CAAC,CACF;AAED,SAASnB,WAAW"}
|
|
@@ -31,18 +31,22 @@ export const getStyle = () => {
|
|
|
31
31
|
computedStyle.sheetHeader = {
|
|
32
32
|
flexDirection: 'row',
|
|
33
33
|
alignItems: 'center',
|
|
34
|
-
justifyContent: '
|
|
34
|
+
justifyContent: 'center'
|
|
35
35
|
};
|
|
36
36
|
computedStyle.sheetHeaderWrapper = {
|
|
37
37
|
paddingHorizontal: Spacing[16],
|
|
38
38
|
paddingBottom: Spacing[8]
|
|
39
39
|
};
|
|
40
40
|
computedStyle.sheetDismissIconWrapper = {
|
|
41
|
-
padding: 4
|
|
41
|
+
padding: 4,
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
left: 0,
|
|
44
|
+
zIndex: 99
|
|
42
45
|
};
|
|
43
46
|
computedStyle.sheetActionWrapper = {
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
justifyContent: 'flex-end',
|
|
48
|
+
position: 'absolute',
|
|
49
|
+
right: 0
|
|
46
50
|
};
|
|
47
51
|
computedStyle.textCenter = {
|
|
48
52
|
textAlign: 'center'
|
|
@@ -54,6 +58,9 @@ export const getStyle = () => {
|
|
|
54
58
|
position: 'absolute',
|
|
55
59
|
bottom: 0
|
|
56
60
|
};
|
|
61
|
+
computedStyle.subtitleText = {
|
|
62
|
+
marginTop: Spacing[8]
|
|
63
|
+
};
|
|
57
64
|
return StyleSheet.create(computedStyle);
|
|
58
65
|
};
|
|
59
66
|
//# sourceMappingURL=BottomSheet.style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","Palettes","Radius","Spacing","getStyle","computedStyle","flex","overlay","justifyContent","container","backgroundColor","white","position","bottom","width","borderTopEndRadius","borderTopStartRadius","sliderIndicator","height","borderRadius","full","grey","sheetIndicatorWrapper","alignItems","sheetHeader","flexDirection","sheetHeaderWrapper","paddingHorizontal","paddingBottom","sheetDismissIconWrapper","padding","sheetActionWrapper","textCenter","textAlign","largeIconContainer","largeIconAbsoluteWrapper","create"],"sourceRoot":"../../src","sources":["BottomSheet.style.tsx"],"mappings":"AACA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["StyleSheet","Palettes","Radius","Spacing","getStyle","computedStyle","flex","overlay","justifyContent","container","backgroundColor","white","position","bottom","width","borderTopEndRadius","borderTopStartRadius","sliderIndicator","height","borderRadius","full","grey","sheetIndicatorWrapper","alignItems","sheetHeader","flexDirection","sheetHeaderWrapper","paddingHorizontal","paddingBottom","sheetDismissIconWrapper","padding","left","zIndex","sheetActionWrapper","right","textCenter","textAlign","largeIconContainer","largeIconAbsoluteWrapper","subtitleText","marginTop","create"],"sourceRoot":"../../src","sources":["BottomSheet.style.tsx"],"mappings":"AACA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,QAAQ,cAAc;AAoBxD,OAAO,MAAMC,QAAQ,GAAG,MAAM;EAC5B,MAAMC,aAAiC,GAAG,CAAC,CAAC;EAE5CA,aAAa,CAACC,IAAI,GAAG;IACnBA,IAAI,EAAE;EACR,CAAC;EAEDD,aAAa,CAACE,OAAO,GAAG;IACtBD,IAAI,EAAE,CAAC;IACPE,cAAc,EAAE;EAClB,CAAC;EAEDH,aAAa,CAACI,SAAS,GAAG;IACxBC,eAAe,EAAET,QAAQ,CAACU,KAAK,CAAC,EAAE,CAAC;IACnCC,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE,MAAM;IACbC,kBAAkB,EAAEZ,OAAO,CAAC,EAAE,CAAC;IAC/Ba,oBAAoB,EAAEb,OAAO,CAAC,EAAE;EAClC,CAAC;EAEDE,aAAa,CAACY,eAAe,GAAG;IAC9BC,MAAM,EAAE,CAAC;IACTJ,KAAK,EAAE,GAAG;IACVK,YAAY,EAAEjB,MAAM,CAACkB,IAAI;IACzBV,eAAe,EAAET,QAAQ,CAACoB,IAAI,CAAC,GAAG;EACpC,CAAC;EAEDhB,aAAa,CAACiB,qBAAqB,GAAG;IACpCJ,MAAM,EAAE,EAAE;IACVK,UAAU,EAAE,QAAQ;IACpBf,cAAc,EAAE;EAClB,CAAC;EAEDH,aAAa,CAACmB,WAAW,GAAG;IAC1BC,aAAa,EAAE,KAAK;IACpBF,UAAU,EAAE,QAAQ;IACpBf,cAAc,EAAE;EAClB,CAAC;EAEDH,aAAa,CAACqB,kBAAkB,GAAG;IACjCC,iBAAiB,EAAExB,OAAO,CAAC,EAAE,CAAC;IAC9ByB,aAAa,EAAEzB,OAAO,CAAC,CAAC;EAC1B,CAAC;EACDE,aAAa,CAACwB,uBAAuB,GAAG;IACtCC,OAAO,EAAE,CAAC;IACVlB,QAAQ,EAAE,UAAU;IACpBmB,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE;EACV,CAAC;EACD3B,aAAa,CAAC4B,kBAAkB,GAAG;IACjCzB,cAAc,EAAE,UAAU;IAC1BI,QAAQ,EAAE,UAAU;IACpBsB,KAAK,EAAE;EACT,CAAC;EAED7B,aAAa,CAAC8B,UAAU,GAAG;IACzBC,SAAS,EAAE;EACb,CAAC;EAED/B,aAAa,CAACgC,kBAAkB,GAAG;IACjCd,UAAU,EAAE;EACd,CAAC;EAEDlB,aAAa,CAACiC,wBAAwB,GAAG;IACvC1B,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE;EACV,CAAC;EAEDR,aAAa,CAACkC,YAAY,GAAG;IAC3BC,SAAS,EAAErC,OAAO,CAAC,CAAC;EACtB,CAAC;EAED,OAAOH,UAAU,CAACyC,MAAM,CAACpC,aAAa,CAAC;AACzC,CAAC"}
|
|
@@ -15,6 +15,7 @@ const CheckBoxInput = props => {
|
|
|
15
15
|
label,
|
|
16
16
|
errorMessage,
|
|
17
17
|
helperMessage,
|
|
18
|
+
helperMessageProps,
|
|
18
19
|
isError,
|
|
19
20
|
disabled,
|
|
20
21
|
editable = true,
|
|
@@ -31,7 +32,9 @@ const CheckBoxInput = props => {
|
|
|
31
32
|
selectionLimit,
|
|
32
33
|
onInputDismiss = () => {},
|
|
33
34
|
customCheckboxInput,
|
|
34
|
-
customItemSeparator = /*#__PURE__*/React.createElement(Divider, null)
|
|
35
|
+
customItemSeparator = /*#__PURE__*/React.createElement(Divider, null),
|
|
36
|
+
testID = '',
|
|
37
|
+
...rest
|
|
35
38
|
} = props;
|
|
36
39
|
const [labelWidth, setLabelWidth] = React.useState(0);
|
|
37
40
|
const [selectedValue, setSelectedValue] = React.useState(value);
|
|
@@ -110,9 +113,10 @@ const CheckBoxInput = props => {
|
|
|
110
113
|
(_bottomSheetref$curre2 = bottomSheetref.current) === null || _bottomSheetref$curre2 === void 0 ? void 0 : _bottomSheetref$curre2.open();
|
|
111
114
|
}
|
|
112
115
|
};
|
|
113
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
|
|
114
|
-
onPress: openBottomSheet
|
|
115
|
-
|
|
116
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TouchableWithoutFeedback, _extends({
|
|
117
|
+
onPress: openBottomSheet,
|
|
118
|
+
testID: testID
|
|
119
|
+
}, rest), /*#__PURE__*/React.createElement(View, {
|
|
116
120
|
style: computedStyle.fieldWrapper
|
|
117
121
|
}, /*#__PURE__*/React.createElement(View, {
|
|
118
122
|
style: computedStyle.fieldContainer
|
|
@@ -137,10 +141,10 @@ const CheckBoxInput = props => {
|
|
|
137
141
|
variant: "body2",
|
|
138
142
|
style: [computedStyle.textField],
|
|
139
143
|
numberOfLines: 1
|
|
140
|
-
}, selectedObject()), inputIcon)), errorMessage || helperMessage ? /*#__PURE__*/React.createElement(Typography, {
|
|
144
|
+
}, selectedObject()), inputIcon)), errorMessage || helperMessage ? /*#__PURE__*/React.createElement(Typography, _extends({
|
|
141
145
|
variant: "caption",
|
|
142
146
|
style: computedStyle.messageHelper
|
|
143
|
-
}, errorMessage || !isError && helperMessage) : null)), /*#__PURE__*/React.createElement(BottomSheet, _extends({
|
|
147
|
+
}, helperMessageProps), errorMessage || !isError && helperMessage) : null)), /*#__PURE__*/React.createElement(BottomSheet, _extends({
|
|
144
148
|
ref: bottomSheetref,
|
|
145
149
|
onDismiss: handleOnBottomSheetDismiss
|
|
146
150
|
}, bottomSheetOpt), /*#__PURE__*/React.createElement(FlatList, {
|
|
@@ -156,7 +160,8 @@ const CheckBoxInput = props => {
|
|
|
156
160
|
return /*#__PURE__*/React.createElement(CheckboxItem, {
|
|
157
161
|
data: item,
|
|
158
162
|
selectedValue: selectedValue,
|
|
159
|
-
onItemPress: onCheckboxItemPress
|
|
163
|
+
onItemPress: onCheckboxItemPress,
|
|
164
|
+
testID: `${testID}_checkbox_item_${item.index}`
|
|
160
165
|
});
|
|
161
166
|
}
|
|
162
167
|
// eslint-disable-next-line react-native/no-inline-styles
|
|
@@ -180,7 +185,9 @@ function CheckboxItem(_ref) {
|
|
|
180
185
|
let {
|
|
181
186
|
data,
|
|
182
187
|
selectedValue,
|
|
183
|
-
onItemPress = () => {}
|
|
188
|
+
onItemPress = () => {},
|
|
189
|
+
testID,
|
|
190
|
+
...rest
|
|
184
191
|
} = _ref;
|
|
185
192
|
const {
|
|
186
193
|
item
|
|
@@ -195,14 +202,15 @@ function CheckboxItem(_ref) {
|
|
|
195
202
|
onPress: () => onItemPress(item),
|
|
196
203
|
underlayColor: Palettes.whiteDark[100],
|
|
197
204
|
disabled: disabled
|
|
198
|
-
}, item), /*#__PURE__*/React.createElement(View, {
|
|
205
|
+
}, rest, item), /*#__PURE__*/React.createElement(View, {
|
|
199
206
|
style: [computedStyle.checkboxItemWrapper]
|
|
200
207
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
201
208
|
variant: "body2",
|
|
202
209
|
numberOfLines: 2
|
|
203
210
|
}, label), /*#__PURE__*/React.createElement(Checkbox, {
|
|
204
211
|
selected: !!(selectedValue !== null && selectedValue !== void 0 && selectedValue.some(selected => selected.value === value)),
|
|
205
|
-
disabled: disabled
|
|
212
|
+
disabled: disabled,
|
|
213
|
+
testID: testID
|
|
206
214
|
})));
|
|
207
215
|
}
|
|
208
216
|
export { CheckBoxInput };
|