@adiraku/react-native-ui 1.2.10-canary-1 → 1.2.10-canary-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/ActionList/ActionList.component.js +14 -6
- package/lib/commonjs/components/ActionList/ActionList.component.js.map +1 -1
- package/lib/commonjs/components/ActionList/ActionList.styles.js +8 -5
- package/lib/commonjs/components/ActionList/ActionList.styles.js.map +1 -1
- package/lib/commonjs/components/index.js +26 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/selection-modal/selection-modal.component.js +116 -0
- package/lib/commonjs/components/selection-modal/selection-modal.component.js.map +1 -0
- package/lib/commonjs/components/selection-modal/selection-modal.style.js +20 -0
- package/lib/commonjs/components/selection-modal/selection-modal.style.js.map +1 -0
- package/lib/commonjs/components/selection-modal/selection-modal.type.js +6 -0
- package/lib/commonjs/components/selection-modal/selection-modal.type.js.map +1 -0
- package/lib/module/components/ActionList/ActionList.component.js +14 -6
- package/lib/module/components/ActionList/ActionList.component.js.map +1 -1
- package/lib/module/components/ActionList/ActionList.styles.js +8 -5
- package/lib/module/components/ActionList/ActionList.styles.js.map +1 -1
- package/lib/module/components/index.js +2 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/selection-modal/selection-modal.component.js +108 -0
- package/lib/module/components/selection-modal/selection-modal.component.js.map +1 -0
- package/lib/module/components/selection-modal/selection-modal.style.js +13 -0
- package/lib/module/components/selection-modal/selection-modal.style.js.map +1 -0
- package/lib/module/components/selection-modal/selection-modal.type.js +2 -0
- package/lib/module/components/selection-modal/selection-modal.type.js.map +1 -0
- package/lib/typescript/components/ActionList/ActionList.component.d.ts.map +1 -1
- package/lib/typescript/components/ActionList/ActionList.styles.d.ts +1 -0
- package/lib/typescript/components/ActionList/ActionList.styles.d.ts.map +1 -1
- package/lib/typescript/components/ActionList/ActionList.type.d.ts +1 -0
- package/lib/typescript/components/ActionList/ActionList.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/selection-modal/selection-modal.component.d.ts +4 -0
- package/lib/typescript/components/selection-modal/selection-modal.component.d.ts.map +1 -0
- package/lib/typescript/components/selection-modal/selection-modal.style.d.ts +8 -0
- package/lib/typescript/components/selection-modal/selection-modal.style.d.ts.map +1 -0
- package/lib/typescript/components/selection-modal/selection-modal.type.d.ts +22 -0
- package/lib/typescript/components/selection-modal/selection-modal.type.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/components/ActionList/ActionList.component.tsx +35 -20
- package/src/components/ActionList/ActionList.styles.tsx +10 -4
- package/src/components/ActionList/ActionList.type.tsx +2 -0
- package/src/components/index.ts +6 -0
- package/src/components/selection-modal/selection-modal.component.tsx +147 -0
- package/src/components/selection-modal/selection-modal.style.tsx +22 -0
- package/src/components/selection-modal/selection-modal.type.ts +36 -0
|
@@ -21,6 +21,8 @@ const ActionList = props => {
|
|
|
21
21
|
leadingComponent,
|
|
22
22
|
trailingComponent,
|
|
23
23
|
containerStyle,
|
|
24
|
+
isLast,
|
|
25
|
+
testID = '',
|
|
24
26
|
...rest
|
|
25
27
|
} = props;
|
|
26
28
|
const computedStyle = (0, _ActionList.getStyle)({
|
|
@@ -31,27 +33,33 @@ const ActionList = props => {
|
|
|
31
33
|
disabled: disabled
|
|
32
34
|
}, rest, {
|
|
33
35
|
underlayColor: _themes.Palettes.grey[50]
|
|
34
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
36
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
35
37
|
style: [computedStyle.container, containerStyle]
|
|
36
38
|
}, leadingComponent && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
37
39
|
style: computedStyle.leadingWrapper
|
|
38
40
|
}, leadingComponent), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
39
41
|
style: computedStyle.textContainer
|
|
40
|
-
}, /*#__PURE__*/_react.default.createElement(_typography.Typography, {
|
|
42
|
+
}, !!title && /*#__PURE__*/_react.default.createElement(_typography.Typography, {
|
|
41
43
|
variant: 'subtitle2',
|
|
42
44
|
textStyles: {
|
|
43
45
|
...computedStyle.title,
|
|
44
46
|
...textStyles
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
+
},
|
|
48
|
+
testID: 'action_list_title' + testID,
|
|
49
|
+
accessibilityLabel: 'action_list_title' + testID
|
|
50
|
+
}, title), !!description && /*#__PURE__*/_react.default.createElement(_typography.Typography, {
|
|
47
51
|
variant: 'body2',
|
|
48
52
|
textStyles: {
|
|
49
53
|
...computedStyle.description,
|
|
50
54
|
...textStyles
|
|
51
|
-
}
|
|
55
|
+
},
|
|
56
|
+
testID: 'action_list_subtitle' + testID,
|
|
57
|
+
accessibilityLabel: 'action_list_subtitle' + testID
|
|
52
58
|
}, description)), trailingComponent && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
53
59
|
style: computedStyle.trailingWrapper
|
|
54
|
-
}, trailingComponent))
|
|
60
|
+
}, trailingComponent)), !isLast && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
61
|
+
style: computedStyle.borderBottom
|
|
62
|
+
})));
|
|
55
63
|
};
|
|
56
64
|
exports.ActionList = ActionList;
|
|
57
65
|
//# sourceMappingURL=ActionList.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_typography","_ActionList","_themes","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","ActionList","props","onPress","title","description","textStyles","disabled","leadingComponent","trailingComponent","containerStyle","rest","computedStyle","getStyle","createElement","TouchableHighlight","underlayColor","Palettes","grey","View","style","container","leadingWrapper","textContainer","Typography","variant","trailingWrapper","exports"],"sourceRoot":"../../../../src","sources":["components/ActionList/ActionList.component.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAGA,IAAAI,OAAA,GAAAJ,OAAA;AAAwC,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAExC,MAAMO,UAAqC,GAAIC,KAAK,IAAK;EACvD,MAAM;IACJC,OAAO,GAAGA,CAAA,KAAM,CAAC,CAAC;IAClBC,KAAK;IACLC,WAAW;IACXC,UAAU;IACVC,QAAQ,GAAG,KAAK;IAChBC,gBAAgB;IAChBC,iBAAiB;IACjBC,cAAc;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_typography","_ActionList","_themes","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","ActionList","props","onPress","title","description","textStyles","disabled","leadingComponent","trailingComponent","containerStyle","isLast","testID","rest","computedStyle","getStyle","createElement","TouchableHighlight","underlayColor","Palettes","grey","View","style","container","leadingWrapper","textContainer","Typography","variant","accessibilityLabel","trailingWrapper","borderBottom","exports"],"sourceRoot":"../../../../src","sources":["components/ActionList/ActionList.component.tsx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GACxCpB,iBACG,CAEJ,CAAC,EACN,CAACE,MAAM,iBAAIhC,MAAA,CAAAS,OAAA,CAAA4B,aAAA,CAAClC,YAAA,CAAAuC,IAAI;IAACC,KAAK,EAAER,aAAa,CAACgB;EAAa,CAAE,CAClD,CACY,CAAC;AAEzB,CAAC;AAACC,OAAA,CAAA9B,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -8,15 +8,12 @@ var _reactNative = require("react-native");
|
|
|
8
8
|
var _themes = require("../../themes");
|
|
9
9
|
const getStyle = props => {
|
|
10
10
|
const {
|
|
11
|
-
disabled
|
|
12
|
-
isLast
|
|
11
|
+
disabled
|
|
13
12
|
} = props;
|
|
14
13
|
const computedStyle = {};
|
|
15
14
|
computedStyle.container = {
|
|
16
|
-
|
|
17
|
-
paddingHorizontal: disabled ? 16 : 0,
|
|
15
|
+
padding: _themes.Spacing[16],
|
|
18
16
|
borderBottomColor: _themes.Palettes.black[400],
|
|
19
|
-
borderBottomWidth: disabled || isLast ? 0 : 0.5,
|
|
20
17
|
backgroundColor: disabled ? _themes.Palettes.grey[50] : 'transparent',
|
|
21
18
|
flexDirection: 'row',
|
|
22
19
|
justifyContent: 'flex-start',
|
|
@@ -50,6 +47,12 @@ const getStyle = props => {
|
|
|
50
47
|
justifyContent: 'center',
|
|
51
48
|
alignItems: 'center'
|
|
52
49
|
};
|
|
50
|
+
computedStyle.borderBottom = {
|
|
51
|
+
marginHorizontal: _themes.Spacing[16],
|
|
52
|
+
height: 1,
|
|
53
|
+
flex: 1,
|
|
54
|
+
backgroundColor: _themes.Palettes.grey[100]
|
|
55
|
+
};
|
|
53
56
|
return _reactNative.StyleSheet.create(computedStyle);
|
|
54
57
|
};
|
|
55
58
|
exports.getStyle = getStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_themes","getStyle","props","disabled","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_themes","getStyle","props","disabled","computedStyle","container","padding","Spacing","borderBottomColor","Palettes","black","backgroundColor","grey","flexDirection","justifyContent","alignItems","width","minWidth","title","fontWeight","fontSize","lineHeight","color","description","textContainer","flex","leadingWrapper","marginRight","trailingWrapper","marginLeft","borderBottom","marginHorizontal","height","StyleSheet","create","exports"],"sourceRoot":"../../../../src","sources":["components/ActionList/ActionList.styles.tsx"],"mappings":";;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAaO,MAAME,QAAQ,GAAIC,KAAsB,IAAK;EAClD,MAAM;IAAEC;EAAS,CAAC,GAAGD,KAAK;EAE1B,MAAME,aAAiC,GAAG,CAAC,CAAC;EAE5CA,aAAa,CAACC,SAAS,GAAG;IACxBC,OAAO,EAAEC,eAAO,CAAC,EAAE,CAAC;IACpBC,iBAAiB,EAAEC,gBAAQ,CAACC,KAAK,CAAC,GAAG,CAAC;IACtCC,eAAe,EAAER,QAAQ,GAAGM,gBAAQ,CAACG,IAAI,CAAC,EAAE,CAAC,GAAG,aAAa;IAC7DC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,YAAY;IAC5BC,UAAU,EAAE,QAAQ;IACpBC,KAAK,EAAE,MAAM;IACbC,QAAQ,EAAE;EACZ,CAAC;EACDb,aAAa,CAACc,KAAK,GAAG;IACpBC,UAAU,EAAE,KAAK;IACjBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,KAAK,EAAEnB,QAAQ,GAAGM,gBAAQ,CAACG,IAAI,CAAC,GAAG,CAAC,GAAGH,gBAAQ,CAACC,KAAK,CAAC,GAAG;EAC3D,CAAC;EACDN,aAAa,CAACmB,WAAW,GAAG;IAC1BJ,UAAU,EAAE,KAAK;IACjBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,KAAK,EAAEnB,QAAQ,GAAGM,gBAAQ,CAACG,IAAI,CAAC,GAAG,CAAC,GAAGH,gBAAQ,CAACC,KAAK,CAAC,GAAG;EAC3D,CAAC;EAEDN,aAAa,CAACoB,aAAa,GAAG;IAC5BT,UAAU,EAAE,YAAY;IACxBU,IAAI,EAAE;EACR,CAAC;EAEDrB,aAAa,CAACsB,cAAc,GAAG;IAC7BC,WAAW,EAAEpB,eAAO,CAAC,EAAE,CAAC;IACxBO,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EAEDX,aAAa,CAACwB,eAAe,GAAG;IAC9BC,UAAU,EAAEtB,eAAO,CAAC,EAAE,CAAC;IACvBO,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EAEDX,aAAa,CAAC0B,YAAY,GAAG;IAC3BC,gBAAgB,EAAExB,eAAO,CAAC,EAAE,CAAC;IAC7ByB,MAAM,EAAE,CAAC;IACTP,IAAI,EAAE,CAAC;IACPd,eAAe,EAAEF,gBAAQ,CAACG,IAAI,CAAC,GAAG;EACpC,CAAC;EAED,OAAOqB,uBAAU,CAACC,MAAM,CAAC9B,aAAa,CAAC;AACzC,CAAC;AAAC+B,OAAA,CAAAlC,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
@@ -225,6 +225,30 @@ Object.defineProperty(exports, "SelectionCard", {
|
|
|
225
225
|
return _SelectionCard.SelectionCard;
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
|
+
Object.defineProperty(exports, "SelectionItemData", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function () {
|
|
231
|
+
return _selectionModal2.SelectionItemData;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
Object.defineProperty(exports, "SelectionModal", {
|
|
235
|
+
enumerable: true,
|
|
236
|
+
get: function () {
|
|
237
|
+
return _selectionModal.SelectionModal;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
Object.defineProperty(exports, "SelectionModalProps", {
|
|
241
|
+
enumerable: true,
|
|
242
|
+
get: function () {
|
|
243
|
+
return _selectionModal2.SelectionModalProps;
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
Object.defineProperty(exports, "SelectionModalValue", {
|
|
247
|
+
enumerable: true,
|
|
248
|
+
get: function () {
|
|
249
|
+
return _selectionModal2.SelectionModalValue;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
228
252
|
Object.defineProperty(exports, "SliderIndicator", {
|
|
229
253
|
enumerable: true,
|
|
230
254
|
get: function () {
|
|
@@ -354,6 +378,7 @@ var _CheckBoxInput = require("./CheckBoxInput/CheckBoxInput.component");
|
|
|
354
378
|
var _Checkbox = require("./Checkbox/Checkbox.component");
|
|
355
379
|
var _Appbar = require("./Appbar/Appbar.component");
|
|
356
380
|
var _Snackbar = require("./Snackbar/Snackbar.component");
|
|
381
|
+
var _selectionModal = require("./selection-modal/selection-modal.component");
|
|
357
382
|
var _switch = require("./switch/switch.component");
|
|
358
383
|
var _dot = require("./dot/dot.component");
|
|
359
384
|
var _informationBox = require("./information-box/information-box.component");
|
|
@@ -369,4 +394,5 @@ var _reactNativeMaskInput = require("react-native-mask-input");
|
|
|
369
394
|
var _SelectionCard = require("./selection-card/SelectionCard.component");
|
|
370
395
|
var _Ribbon = require("./Ribbon/Ribbon.component");
|
|
371
396
|
var _StickyBar = require("./StickyBar/StickyBar.component");
|
|
397
|
+
var _selectionModal2 = require("./selection-modal/selection-modal.type");
|
|
372
398
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_ActionList","require","_Badge","_BottomTabBar","_button","_calendars","_CategoryCard","_ContentCard","_label","_base","_typography","_coachmark","_textlink","_sliderIndicator","_TextInput","_TextArea","_StepperCounter","_Divider","_Tabs","_RadioButton","_Chips","_BottomSheet","_searchInput","_RadioInput","_CheckBoxInput","_Checkbox","_Appbar","_Snackbar","_switch","_dot","_informationBox","_roundedTab","_countdown","_loader","_notification","_pagination","_budgetCard","_banner","_FilterList","_reactNativeMaskInput","_SelectionCard","_Ribbon","_StickyBar"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_ActionList","require","_Badge","_BottomTabBar","_button","_calendars","_CategoryCard","_ContentCard","_label","_base","_typography","_coachmark","_textlink","_sliderIndicator","_TextInput","_TextArea","_StepperCounter","_Divider","_Tabs","_RadioButton","_Chips","_BottomSheet","_searchInput","_RadioInput","_CheckBoxInput","_Checkbox","_Appbar","_Snackbar","_selectionModal","_switch","_dot","_informationBox","_roundedTab","_countdown","_loader","_notification","_pagination","_budgetCard","_banner","_FilterList","_reactNativeMaskInput","_SelectionCard","_Ribbon","_StickyBar","_selectionModal2"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AACA,IAAAW,SAAA,GAAAX,OAAA;AACA,IAAAY,gBAAA,GAAAZ,OAAA;AACA,IAAAa,UAAA,GAAAb,OAAA;AACA,IAAAc,SAAA,GAAAd,OAAA;AACA,IAAAe,eAAA,GAAAf,OAAA;AACA,IAAAgB,QAAA,GAAAhB,OAAA;AACA,IAAAiB,KAAA,GAAAjB,OAAA;AACA,IAAAkB,YAAA,GAAAlB,OAAA;AACA,IAAAmB,MAAA,GAAAnB,OAAA;AACA,IAAAoB,YAAA,GAAApB,OAAA;AAIA,IAAAqB,YAAA,GAAArB,OAAA;AACA,IAAAsB,WAAA,GAAAtB,OAAA;AACA,IAAAuB,cAAA,GAAAvB,OAAA;AACA,IAAAwB,SAAA,GAAAxB,OAAA;AACA,IAAAyB,OAAA,GAAAzB,OAAA;AACA,IAAA0B,SAAA,GAAA1B,OAAA;AAKA,IAAA2B,eAAA,GAAA3B,OAAA;AACA,IAAA4B,OAAA,GAAA5B,OAAA;AACA,IAAA6B,IAAA,GAAA7B,OAAA;AACA,IAAA8B,eAAA,GAAA9B,OAAA;AACA,IAAA+B,WAAA,GAAA/B,OAAA;AACA,IAAAgC,UAAA,GAAAhC,OAAA;AACA,IAAAiC,OAAA,GAAAjC,OAAA;AACA,IAAAkC,aAAA,GAAAlC,OAAA;AACA,IAAAmC,WAAA,GAAAnC,OAAA;AACA,IAAAoC,WAAA,GAAApC,OAAA;AACA,IAAAqC,OAAA,GAAArC,OAAA;AACA,IAAAsC,WAAA,GAAAtC,OAAA;AACA,IAAAuC,qBAAA,GAAAvC,OAAA;AAWA,IAAAwC,cAAA,GAAAxC,OAAA;AACA,IAAAyC,OAAA,GAAAzC,OAAA;AACA,IAAA0C,UAAA,GAAA1C,OAAA;AA4BA,IAAA2C,gBAAA,GAAA3C,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SelectionModal = SelectionModal;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _selectionModal = require("./selection-modal.style");
|
|
10
|
+
var _ActionList = require("../ActionList/ActionList.component");
|
|
11
|
+
var _BottomSheet = require("../BottomSheet/BottomSheet.component");
|
|
12
|
+
var _button = require("../button/button.component");
|
|
13
|
+
var _Checkbox = require("../Checkbox/Checkbox.component");
|
|
14
|
+
var _RadioButton = require("../RadioButton/RadioButton.component");
|
|
15
|
+
var _icons = require("../../icons");
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
19
|
+
function SelectionModal(props) {
|
|
20
|
+
const {
|
|
21
|
+
type = 'radio',
|
|
22
|
+
renderDisplayComponent,
|
|
23
|
+
listOptions,
|
|
24
|
+
maxSelectedItem = -1,
|
|
25
|
+
bottomSheetOpt,
|
|
26
|
+
saveButtonProps,
|
|
27
|
+
bottomActionContainerStyle,
|
|
28
|
+
onSaveButtonPress = () => {},
|
|
29
|
+
renderCutomBottomAction,
|
|
30
|
+
value = []
|
|
31
|
+
} = props;
|
|
32
|
+
const {
|
|
33
|
+
renderItem,
|
|
34
|
+
...listOptionsRest
|
|
35
|
+
} = listOptions;
|
|
36
|
+
const ref = (0, _react.useRef)(null);
|
|
37
|
+
const computedStyles = (0, _selectionModal.getStyle)();
|
|
38
|
+
const [selectedTemp, setSelectedTemp] = (0, _react.useState)(value);
|
|
39
|
+
if (!renderDisplayComponent) {
|
|
40
|
+
console.warn('Please provide renderDisplayComponent props (SelectionModal - adiraku)');
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const renderActionList = ({
|
|
44
|
+
item,
|
|
45
|
+
index
|
|
46
|
+
}) => {
|
|
47
|
+
var _listOptions$data;
|
|
48
|
+
const {
|
|
49
|
+
value: valueItem,
|
|
50
|
+
title,
|
|
51
|
+
disabled,
|
|
52
|
+
...itemRest
|
|
53
|
+
} = item;
|
|
54
|
+
const isSelected = !!(selectedTemp !== null && selectedTemp !== void 0 && selectedTemp.find(i => i.value === valueItem));
|
|
55
|
+
return /*#__PURE__*/_react.default.createElement(_ActionList.ActionList, _extends({
|
|
56
|
+
title: title,
|
|
57
|
+
onPress: () => handleOnItemPress(item),
|
|
58
|
+
trailingComponent: type === 'radio' ? /*#__PURE__*/_react.default.createElement(_RadioButton.RadioButton, {
|
|
59
|
+
selected: isSelected,
|
|
60
|
+
disabled: disabled
|
|
61
|
+
}) : /*#__PURE__*/_react.default.createElement(_Checkbox.Checkbox, {
|
|
62
|
+
selected: isSelected,
|
|
63
|
+
disabled: disabled
|
|
64
|
+
}),
|
|
65
|
+
disabled: disabled,
|
|
66
|
+
isLast: index === (((_listOptions$data = listOptions.data) === null || _listOptions$data === void 0 ? void 0 : _listOptions$data.length) ?? 0) - 1
|
|
67
|
+
}, itemRest));
|
|
68
|
+
};
|
|
69
|
+
const handleOnItemPress = item => {
|
|
70
|
+
if (type === 'radio') {
|
|
71
|
+
setSelectedTemp([item]);
|
|
72
|
+
} else if (type === 'checkbox') {
|
|
73
|
+
const isItemExist = selectedTemp === null || selectedTemp === void 0 ? void 0 : selectedTemp.find(i => i.value === item.value);
|
|
74
|
+
|
|
75
|
+
// Takeout current item if it's in the stack
|
|
76
|
+
if (isItemExist) {
|
|
77
|
+
const filterData = selectedTemp === null || selectedTemp === void 0 ? void 0 : selectedTemp.filter(i => i.value !== item.value);
|
|
78
|
+
setSelectedTemp(filterData);
|
|
79
|
+
} else {
|
|
80
|
+
if (maxSelectedItem < 0) {
|
|
81
|
+
setSelectedTemp([...(selectedTemp ?? []), item]);
|
|
82
|
+
} else {
|
|
83
|
+
setSelectedTemp([...(selectedTemp ?? []), item]);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const handleShowSheet = () => {
|
|
89
|
+
var _ref$current;
|
|
90
|
+
setSelectedTemp(value);
|
|
91
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.open();
|
|
92
|
+
};
|
|
93
|
+
const handleCloseSheet = () => {
|
|
94
|
+
var _ref$current2;
|
|
95
|
+
(_ref$current2 = ref.current) === null || _ref$current2 === void 0 || _ref$current2.close();
|
|
96
|
+
};
|
|
97
|
+
const handleOnSaveButtonPress = () => {
|
|
98
|
+
var _ref$current3;
|
|
99
|
+
onSaveButtonPress(selectedTemp);
|
|
100
|
+
(_ref$current3 = ref.current) === null || _ref$current3 === void 0 || _ref$current3.close();
|
|
101
|
+
};
|
|
102
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderDisplayComponent === null || renderDisplayComponent === void 0 ? void 0 : renderDisplayComponent(handleShowSheet), /*#__PURE__*/_react.default.createElement(_BottomSheet.BottomSheet, _extends({
|
|
103
|
+
ref: ref,
|
|
104
|
+
dismissIcon: (bottomSheetOpt === null || bottomSheetOpt === void 0 ? void 0 : bottomSheetOpt.dismissIcon) ?? /*#__PURE__*/_react.default.createElement(_icons.IconArrowLeft, null)
|
|
105
|
+
}, bottomSheetOpt), /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, _extends({
|
|
106
|
+
renderItem: renderItem || renderActionList,
|
|
107
|
+
style: [computedStyles.flatListContentContainer, listOptions.contentContainerStyle]
|
|
108
|
+
}, listOptionsRest)), renderCutomBottomAction ? renderCutomBottomAction(handleOnSaveButtonPress, handleCloseSheet) : /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
109
|
+
style: [computedStyles.bottomActionContainer, bottomActionContainerStyle]
|
|
110
|
+
}, /*#__PURE__*/_react.default.createElement(_button.Button, _extends({
|
|
111
|
+
label: (saveButtonProps === null || saveButtonProps === void 0 ? void 0 : saveButtonProps.label) ?? 'Simpan',
|
|
112
|
+
onPress: handleOnSaveButtonPress,
|
|
113
|
+
disabled: ((selectedTemp === null || selectedTemp === void 0 ? void 0 : selectedTemp.length) ?? 0) <= 0
|
|
114
|
+
}, saveButtonProps)))));
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=selection-modal.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_selectionModal","_ActionList","_BottomSheet","_button","_Checkbox","_RadioButton","_icons","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","SelectionModal","props","type","renderDisplayComponent","listOptions","maxSelectedItem","bottomSheetOpt","saveButtonProps","bottomActionContainerStyle","onSaveButtonPress","renderCutomBottomAction","value","renderItem","listOptionsRest","ref","useRef","computedStyles","getStyle","selectedTemp","setSelectedTemp","useState","console","warn","renderActionList","item","index","_listOptions$data","valueItem","title","disabled","itemRest","isSelected","find","createElement","ActionList","onPress","handleOnItemPress","trailingComponent","RadioButton","selected","Checkbox","isLast","data","isItemExist","filterData","filter","handleShowSheet","_ref$current","current","open","handleCloseSheet","_ref$current2","close","handleOnSaveButtonPress","_ref$current3","Fragment","BottomSheet","dismissIcon","IconArrowLeft","FlatList","style","flatListContentContainer","contentContainerStyle","View","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AE,GACvCS,eAAe,CACpB,CACG,CAEG,CACb,CAAC;AAEP","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getStyle = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _themes = require("../../themes");
|
|
9
|
+
const getStyle = () => {
|
|
10
|
+
const computedStyle = {};
|
|
11
|
+
computedStyle.flatListContentContainer = {};
|
|
12
|
+
computedStyle.bottomActionContainer = {
|
|
13
|
+
padding: _themes.Spacing[16],
|
|
14
|
+
paddingBottom: _themes.Spacing[24],
|
|
15
|
+
backgroundColor: 'transparent'
|
|
16
|
+
};
|
|
17
|
+
return _reactNative.StyleSheet.create(computedStyle);
|
|
18
|
+
};
|
|
19
|
+
exports.getStyle = getStyle;
|
|
20
|
+
//# sourceMappingURL=selection-modal.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_themes","getStyle","computedStyle","flatListContentContainer","bottomActionContainer","padding","Spacing","paddingBottom","backgroundColor","StyleSheet","create","exports"],"sourceRoot":"../../../../src","sources":["components/selection-modal/selection-modal.style.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAOO,MAAME,QAAQ,GAAGA,CAAA,KAAM;EAC5B,MAAMC,aAAiC,GAAG,CAAC,CAAC;EAE5CA,aAAa,CAACC,wBAAwB,GAAG,CAAC,CAAC;EAE3CD,aAAa,CAACE,qBAAqB,GAAG;IACpCC,OAAO,EAAEC,eAAO,CAAC,EAAE,CAAC;IACpBC,aAAa,EAAED,eAAO,CAAC,EAAE,CAAC;IAC1BE,eAAe,EAAE;EACnB,CAAC;EAED,OAAOC,uBAAU,CAACC,MAAM,CAACR,aAAa,CAAC;AACzC,CAAC;AAACS,OAAA,CAAAV,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/selection-modal/selection-modal.type.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -14,6 +14,8 @@ const ActionList = props => {
|
|
|
14
14
|
leadingComponent,
|
|
15
15
|
trailingComponent,
|
|
16
16
|
containerStyle,
|
|
17
|
+
isLast,
|
|
18
|
+
testID = '',
|
|
17
19
|
...rest
|
|
18
20
|
} = props;
|
|
19
21
|
const computedStyle = getStyle({
|
|
@@ -24,27 +26,33 @@ const ActionList = props => {
|
|
|
24
26
|
disabled: disabled
|
|
25
27
|
}, rest, {
|
|
26
28
|
underlayColor: Palettes.grey[50]
|
|
27
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
29
|
+
}), /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
|
28
30
|
style: [computedStyle.container, containerStyle]
|
|
29
31
|
}, leadingComponent && /*#__PURE__*/React.createElement(View, {
|
|
30
32
|
style: computedStyle.leadingWrapper
|
|
31
33
|
}, leadingComponent), /*#__PURE__*/React.createElement(View, {
|
|
32
34
|
style: computedStyle.textContainer
|
|
33
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
35
|
+
}, !!title && /*#__PURE__*/React.createElement(Typography, {
|
|
34
36
|
variant: 'subtitle2',
|
|
35
37
|
textStyles: {
|
|
36
38
|
...computedStyle.title,
|
|
37
39
|
...textStyles
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
+
},
|
|
41
|
+
testID: 'action_list_title' + testID,
|
|
42
|
+
accessibilityLabel: 'action_list_title' + testID
|
|
43
|
+
}, title), !!description && /*#__PURE__*/React.createElement(Typography, {
|
|
40
44
|
variant: 'body2',
|
|
41
45
|
textStyles: {
|
|
42
46
|
...computedStyle.description,
|
|
43
47
|
...textStyles
|
|
44
|
-
}
|
|
48
|
+
},
|
|
49
|
+
testID: 'action_list_subtitle' + testID,
|
|
50
|
+
accessibilityLabel: 'action_list_subtitle' + testID
|
|
45
51
|
}, description)), trailingComponent && /*#__PURE__*/React.createElement(View, {
|
|
46
52
|
style: computedStyle.trailingWrapper
|
|
47
|
-
}, trailingComponent))
|
|
53
|
+
}, trailingComponent)), !isLast && /*#__PURE__*/React.createElement(View, {
|
|
54
|
+
style: computedStyle.borderBottom
|
|
55
|
+
})));
|
|
48
56
|
};
|
|
49
57
|
export { ActionList };
|
|
50
58
|
//# sourceMappingURL=ActionList.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","TouchableHighlight","Typography","getStyle","Palettes","ActionList","props","onPress","title","description","textStyles","disabled","leadingComponent","trailingComponent","containerStyle","rest","computedStyle","createElement","_extends","underlayColor","grey","style","container","leadingWrapper","textContainer","variant","trailingWrapper"],"sourceRoot":"../../../../src","sources":["components/ActionList/ActionList.component.tsx"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,kBAAkB,QAAQ,cAAc;AAEvD,SAASC,UAAU,QAAQ,oCAAoC;AAC/D,SAASC,QAAQ,QAAQ,qBAAqB;AAG9C,SAASC,QAAQ,QAAQ,cAAc;AAEvC,MAAMC,UAAqC,GAAIC,KAAK,IAAK;EACvD,MAAM;IACJC,OAAO,GAAGA,CAAA,KAAM,CAAC,CAAC;IAClBC,KAAK;IACLC,WAAW;IACXC,UAAU;IACVC,QAAQ,GAAG,KAAK;IAChBC,gBAAgB;IAChBC,iBAAiB;IACjBC,cAAc;
|
|
1
|
+
{"version":3,"names":["React","View","TouchableHighlight","Typography","getStyle","Palettes","ActionList","props","onPress","title","description","textStyles","disabled","leadingComponent","trailingComponent","containerStyle","isLast","testID","rest","computedStyle","createElement","_extends","underlayColor","grey","style","container","leadingWrapper","textContainer","variant","accessibilityLabel","trailingWrapper","borderBottom"],"sourceRoot":"../../../../src","sources":["components/ActionList/ActionList.component.tsx"],"mappings":";AAA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DM,MAAM,EAAE,mBAAmB,GAAGA,MAAO;IACrCY,kBAAkB,EAAE,mBAAmB,GAAGZ;EAAO,GAEhDR,KACS,CACb,EACA,CAAC,CAACC,WAAW,iBACZV,KAAA,CAAAoB,aAAA,CAACjB,UAAU;IACTyB,OAAO,EAAE,OAAQ;IACjBjB,UAAU,EAAE;MAAE,GAAGQ,aAAa,CAACT,WAAW;MAAE,GAAGC;IAAW,CAAE;IAC5DM,MAAM,EAAE,sBAAsB,GAAGA,MAAO;IACxCY,kBAAkB,EAAE,sBAAsB,GAAGZ;EAAO,GAEnDP,WACS,CAEV,CAAC,EACNI,iBAAiB,iBAChBd,KAAA,CAAAoB,aAAA,CAACnB,IAAI;IAACuB,KAAK,EAAEL,aAAa,CAACW;EAAgB,GACxChB,iBACG,CAEJ,CAAC,EACN,CAACE,MAAM,iBAAIhB,KAAA,CAAAoB,aAAA,CAACnB,IAAI;IAACuB,KAAK,EAAEL,aAAa,CAACY;EAAa,CAAE,CAClD,CACY,CAAC;AAEzB,CAAC;AAED,SAASzB,UAAU","ignoreList":[]}
|
|
@@ -2,15 +2,12 @@ import { StyleSheet } from 'react-native';
|
|
|
2
2
|
import { Palettes, Spacing } from '../../themes';
|
|
3
3
|
export const getStyle = props => {
|
|
4
4
|
const {
|
|
5
|
-
disabled
|
|
6
|
-
isLast
|
|
5
|
+
disabled
|
|
7
6
|
} = props;
|
|
8
7
|
const computedStyle = {};
|
|
9
8
|
computedStyle.container = {
|
|
10
|
-
|
|
11
|
-
paddingHorizontal: disabled ? 16 : 0,
|
|
9
|
+
padding: Spacing[16],
|
|
12
10
|
borderBottomColor: Palettes.black[400],
|
|
13
|
-
borderBottomWidth: disabled || isLast ? 0 : 0.5,
|
|
14
11
|
backgroundColor: disabled ? Palettes.grey[50] : 'transparent',
|
|
15
12
|
flexDirection: 'row',
|
|
16
13
|
justifyContent: 'flex-start',
|
|
@@ -44,6 +41,12 @@ export const getStyle = props => {
|
|
|
44
41
|
justifyContent: 'center',
|
|
45
42
|
alignItems: 'center'
|
|
46
43
|
};
|
|
44
|
+
computedStyle.borderBottom = {
|
|
45
|
+
marginHorizontal: Spacing[16],
|
|
46
|
+
height: 1,
|
|
47
|
+
flex: 1,
|
|
48
|
+
backgroundColor: Palettes.grey[100]
|
|
49
|
+
};
|
|
47
50
|
return StyleSheet.create(computedStyle);
|
|
48
51
|
};
|
|
49
52
|
//# sourceMappingURL=ActionList.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","Palettes","Spacing","getStyle","props","disabled","
|
|
1
|
+
{"version":3,"names":["StyleSheet","Palettes","Spacing","getStyle","props","disabled","computedStyle","container","padding","borderBottomColor","black","backgroundColor","grey","flexDirection","justifyContent","alignItems","width","minWidth","title","fontWeight","fontSize","lineHeight","color","description","textContainer","flex","leadingWrapper","marginRight","trailingWrapper","marginLeft","borderBottom","marginHorizontal","height","create"],"sourceRoot":"../../../../src","sources":["components/ActionList/ActionList.styles.tsx"],"mappings":"AAEA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,QAAQ,EAAEC,OAAO,QAAQ,cAAc;AAahD,OAAO,MAAMC,QAAQ,GAAIC,KAAsB,IAAK;EAClD,MAAM;IAAEC;EAAS,CAAC,GAAGD,KAAK;EAE1B,MAAME,aAAiC,GAAG,CAAC,CAAC;EAE5CA,aAAa,CAACC,SAAS,GAAG;IACxBC,OAAO,EAAEN,OAAO,CAAC,EAAE,CAAC;IACpBO,iBAAiB,EAAER,QAAQ,CAACS,KAAK,CAAC,GAAG,CAAC;IACtCC,eAAe,EAAEN,QAAQ,GAAGJ,QAAQ,CAACW,IAAI,CAAC,EAAE,CAAC,GAAG,aAAa;IAC7DC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,YAAY;IAC5BC,UAAU,EAAE,QAAQ;IACpBC,KAAK,EAAE,MAAM;IACbC,QAAQ,EAAE;EACZ,CAAC;EACDX,aAAa,CAACY,KAAK,GAAG;IACpBC,UAAU,EAAE,KAAK;IACjBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,KAAK,EAAEjB,QAAQ,GAAGJ,QAAQ,CAACW,IAAI,CAAC,GAAG,CAAC,GAAGX,QAAQ,CAACS,KAAK,CAAC,GAAG;EAC3D,CAAC;EACDJ,aAAa,CAACiB,WAAW,GAAG;IAC1BJ,UAAU,EAAE,KAAK;IACjBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,KAAK,EAAEjB,QAAQ,GAAGJ,QAAQ,CAACW,IAAI,CAAC,GAAG,CAAC,GAAGX,QAAQ,CAACS,KAAK,CAAC,GAAG;EAC3D,CAAC;EAEDJ,aAAa,CAACkB,aAAa,GAAG;IAC5BT,UAAU,EAAE,YAAY;IACxBU,IAAI,EAAE;EACR,CAAC;EAEDnB,aAAa,CAACoB,cAAc,GAAG;IAC7BC,WAAW,EAAEzB,OAAO,CAAC,EAAE,CAAC;IACxBY,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EAEDT,aAAa,CAACsB,eAAe,GAAG;IAC9BC,UAAU,EAAE3B,OAAO,CAAC,EAAE,CAAC;IACvBY,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EAEDT,aAAa,CAACwB,YAAY,GAAG;IAC3BC,gBAAgB,EAAE7B,OAAO,CAAC,EAAE,CAAC;IAC7B8B,MAAM,EAAE,CAAC;IACTP,IAAI,EAAE,CAAC;IACPd,eAAe,EAAEV,QAAQ,CAACW,IAAI,CAAC,GAAG;EACpC,CAAC;EAED,OAAOZ,UAAU,CAACiC,MAAM,CAAC3B,aAAa,CAAC;AACzC,CAAC","ignoreList":[]}
|
|
@@ -25,6 +25,7 @@ export { CheckBoxInput } from './CheckBoxInput/CheckBoxInput.component';
|
|
|
25
25
|
export { Checkbox } from './Checkbox/Checkbox.component';
|
|
26
26
|
export { Appbar } from './Appbar/Appbar.component';
|
|
27
27
|
export { Snackbar, SnackbarComponent, SnackbarUI } from './Snackbar/Snackbar.component';
|
|
28
|
+
export { SelectionModal } from './selection-modal/selection-modal.component';
|
|
28
29
|
export { Switch } from './switch/switch.component';
|
|
29
30
|
export { Dot } from './dot/dot.component';
|
|
30
31
|
export { InformationBox } from './information-box/information-box.component';
|
|
@@ -40,4 +41,5 @@ export { Mask, MaskArray, MaskInputProps, MaskItem, Masks, UseMaskedInputProps,
|
|
|
40
41
|
export { SelectionCard } from './selection-card/SelectionCard.component';
|
|
41
42
|
export { Ribbon } from './Ribbon/Ribbon.component';
|
|
42
43
|
export { StickyBar } from './StickyBar/StickyBar.component';
|
|
44
|
+
export { SelectionModalProps, SelectionItemData, SelectionModalValue } from './selection-modal/selection-modal.type';
|
|
43
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ActionList","Badges","BottomTabBar","Button","Calendars","CategoryCard","ContentCard","Label","BaseComponent","Typography","Coachmark","circleSvgPath","TextLink","SliderIndicator","TextInput","TextArea","StepperCounter","Divider","Tabs","RadioButton","Chips","BottomSheet","BottomSheetHandler","SearchInput","RadioInput","CheckBoxInput","Checkbox","Appbar","Snackbar","SnackbarComponent","SnackbarUI","Switch","Dot","InformationBox","RoundedTab","Countdown","Loader","Notification","Pagination","BudgetCard","Banner","FilterList","Mask","MaskArray","MaskInputProps","MaskItem","Masks","UseMaskedInputProps","createNumberMask","formatWithMask","useMaskedInputProps","SelectionCard","Ribbon","StickyBar"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,mCAAmC;AAC9D,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,YAAY,QAAQ,uCAAuC;AACpE,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,SAAS,QAAQ,iCAAiC;AAC3D,SAASC,YAAY,QAAQ,uCAAuC;AACpE,SAASC,WAAW,QAAQ,qCAAqC;AACjE,SAASC,KAAK,QAAQ,yBAAyB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ASC,aAAa,QAAQ,0CAA0C;AACxE,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,SAAS,QAAQ,iCAAiC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["ActionList","Badges","BottomTabBar","Button","Calendars","CategoryCard","ContentCard","Label","BaseComponent","Typography","Coachmark","circleSvgPath","TextLink","SliderIndicator","TextInput","TextArea","StepperCounter","Divider","Tabs","RadioButton","Chips","BottomSheet","BottomSheetHandler","SearchInput","RadioInput","CheckBoxInput","Checkbox","Appbar","Snackbar","SnackbarComponent","SnackbarUI","SelectionModal","Switch","Dot","InformationBox","RoundedTab","Countdown","Loader","Notification","Pagination","BudgetCard","Banner","FilterList","Mask","MaskArray","MaskInputProps","MaskItem","Masks","UseMaskedInputProps","createNumberMask","formatWithMask","useMaskedInputProps","SelectionCard","Ribbon","StickyBar","SelectionModalProps","SelectionItemData","SelectionModalValue"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,mCAAmC;AAC9D,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,YAAY,QAAQ,uCAAuC;AACpE,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,SAAS,QAAQ,iCAAiC;AAC3D,SAASC,YAAY,QAAQ,uCAAuC;AACpE,SAASC,WAAW,QAAQ,qCAAqC;AACjE,SAASC,KAAK,QAAQ,yBAAyB;AAC/C,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,UAAU,QAAQ,mCAAmC;AAC9D,SAASC,SAAS,EAAEC,aAAa,QAAQ,iCAAiC;AAC1E,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,eAAe,QAAQ,+CAA+C;AAC/E,SAASC,SAAS,QAAQ,iCAAiC;AAC3D,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,cAAc,QAAQ,2CAA2C;AAC1E,SAASC,OAAO,QAAQ,6BAA6B;AACrD,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,WAAW,QAAQ,qCAAqC;AACjE,SAASC,KAAK,QAAQ,yBAAyB;AAC/C,SACEC,WAAW,EACXC,kBAAkB,QACb,qCAAqC;AAC5C,SAASC,WAAW,QAAQ,uCAAuC;AACnE,SAASC,UAAU,QAAQ,mCAAmC;AAC9D,SAASC,aAAa,QAAQ,yCAAyC;AACvE,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SACEC,QAAQ,EACRC,iBAAiB,EACjBC,UAAU,QACL,+BAA+B;AACtC,SAASC,cAAc,QAAQ,6CAA6C;AAC5E,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,GAAG,QAAQ,qBAAqB;AACzC,SAASC,cAAc,QAAQ,6CAA6C;AAC5E,SAASC,UAAU,QAAQ,qCAAqC;AAChE,SAASC,SAAS,QAAQ,iCAAiC;AAC3D,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,YAAY,QAAQ,uCAAuC;AACpE,SAASC,UAAU,QAAQ,mCAAmC;AAC9D,SAASC,UAAU,QAAQ,oCAAoC;AAC/D,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,UAAU,QAAQ,mCAAmC;AAC9D,SACEC,IAAI,EACJC,SAAS,EACTC,cAAc,EACdC,QAAQ,EACRC,KAAK,EACLC,mBAAmB,EACnBC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,QACd,yBAAyB;AAChC,SAASC,aAAa,QAAQ,0CAA0C;AACxE,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,SAAS,QAAQ,iCAAiC;AA4B3D,SACEC,mBAAmB,EACnBC,iBAAiB,EACjBC,mBAAmB,QACd,wCAAwC","ignoreList":[]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import React, { useRef, useState } from 'react';
|
|
3
|
+
import { FlatList, View } from 'react-native';
|
|
4
|
+
import { getStyle } from './selection-modal.style';
|
|
5
|
+
import { ActionList } from '../ActionList/ActionList.component';
|
|
6
|
+
import { BottomSheet } from '../BottomSheet/BottomSheet.component';
|
|
7
|
+
import { Button } from '../button/button.component';
|
|
8
|
+
import { Checkbox } from '../Checkbox/Checkbox.component';
|
|
9
|
+
import { RadioButton } from '../RadioButton/RadioButton.component';
|
|
10
|
+
import { IconArrowLeft } from '../../icons';
|
|
11
|
+
export function SelectionModal(props) {
|
|
12
|
+
const {
|
|
13
|
+
type = 'radio',
|
|
14
|
+
renderDisplayComponent,
|
|
15
|
+
listOptions,
|
|
16
|
+
maxSelectedItem = -1,
|
|
17
|
+
bottomSheetOpt,
|
|
18
|
+
saveButtonProps,
|
|
19
|
+
bottomActionContainerStyle,
|
|
20
|
+
onSaveButtonPress = () => {},
|
|
21
|
+
renderCutomBottomAction,
|
|
22
|
+
value = []
|
|
23
|
+
} = props;
|
|
24
|
+
const {
|
|
25
|
+
renderItem,
|
|
26
|
+
...listOptionsRest
|
|
27
|
+
} = listOptions;
|
|
28
|
+
const ref = useRef(null);
|
|
29
|
+
const computedStyles = getStyle();
|
|
30
|
+
const [selectedTemp, setSelectedTemp] = useState(value);
|
|
31
|
+
if (!renderDisplayComponent) {
|
|
32
|
+
console.warn('Please provide renderDisplayComponent props (SelectionModal - adiraku)');
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
const renderActionList = ({
|
|
36
|
+
item,
|
|
37
|
+
index
|
|
38
|
+
}) => {
|
|
39
|
+
var _listOptions$data;
|
|
40
|
+
const {
|
|
41
|
+
value: valueItem,
|
|
42
|
+
title,
|
|
43
|
+
disabled,
|
|
44
|
+
...itemRest
|
|
45
|
+
} = item;
|
|
46
|
+
const isSelected = !!(selectedTemp !== null && selectedTemp !== void 0 && selectedTemp.find(i => i.value === valueItem));
|
|
47
|
+
return /*#__PURE__*/React.createElement(ActionList, _extends({
|
|
48
|
+
title: title,
|
|
49
|
+
onPress: () => handleOnItemPress(item),
|
|
50
|
+
trailingComponent: type === 'radio' ? /*#__PURE__*/React.createElement(RadioButton, {
|
|
51
|
+
selected: isSelected,
|
|
52
|
+
disabled: disabled
|
|
53
|
+
}) : /*#__PURE__*/React.createElement(Checkbox, {
|
|
54
|
+
selected: isSelected,
|
|
55
|
+
disabled: disabled
|
|
56
|
+
}),
|
|
57
|
+
disabled: disabled,
|
|
58
|
+
isLast: index === (((_listOptions$data = listOptions.data) === null || _listOptions$data === void 0 ? void 0 : _listOptions$data.length) ?? 0) - 1
|
|
59
|
+
}, itemRest));
|
|
60
|
+
};
|
|
61
|
+
const handleOnItemPress = item => {
|
|
62
|
+
if (type === 'radio') {
|
|
63
|
+
setSelectedTemp([item]);
|
|
64
|
+
} else if (type === 'checkbox') {
|
|
65
|
+
const isItemExist = selectedTemp === null || selectedTemp === void 0 ? void 0 : selectedTemp.find(i => i.value === item.value);
|
|
66
|
+
|
|
67
|
+
// Takeout current item if it's in the stack
|
|
68
|
+
if (isItemExist) {
|
|
69
|
+
const filterData = selectedTemp === null || selectedTemp === void 0 ? void 0 : selectedTemp.filter(i => i.value !== item.value);
|
|
70
|
+
setSelectedTemp(filterData);
|
|
71
|
+
} else {
|
|
72
|
+
if (maxSelectedItem < 0) {
|
|
73
|
+
setSelectedTemp([...(selectedTemp ?? []), item]);
|
|
74
|
+
} else {
|
|
75
|
+
setSelectedTemp([...(selectedTemp ?? []), item]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const handleShowSheet = () => {
|
|
81
|
+
var _ref$current;
|
|
82
|
+
setSelectedTemp(value);
|
|
83
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.open();
|
|
84
|
+
};
|
|
85
|
+
const handleCloseSheet = () => {
|
|
86
|
+
var _ref$current2;
|
|
87
|
+
(_ref$current2 = ref.current) === null || _ref$current2 === void 0 || _ref$current2.close();
|
|
88
|
+
};
|
|
89
|
+
const handleOnSaveButtonPress = () => {
|
|
90
|
+
var _ref$current3;
|
|
91
|
+
onSaveButtonPress(selectedTemp);
|
|
92
|
+
(_ref$current3 = ref.current) === null || _ref$current3 === void 0 || _ref$current3.close();
|
|
93
|
+
};
|
|
94
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, renderDisplayComponent === null || renderDisplayComponent === void 0 ? void 0 : renderDisplayComponent(handleShowSheet), /*#__PURE__*/React.createElement(BottomSheet, _extends({
|
|
95
|
+
ref: ref,
|
|
96
|
+
dismissIcon: (bottomSheetOpt === null || bottomSheetOpt === void 0 ? void 0 : bottomSheetOpt.dismissIcon) ?? /*#__PURE__*/React.createElement(IconArrowLeft, null)
|
|
97
|
+
}, bottomSheetOpt), /*#__PURE__*/React.createElement(FlatList, _extends({
|
|
98
|
+
renderItem: renderItem || renderActionList,
|
|
99
|
+
style: [computedStyles.flatListContentContainer, listOptions.contentContainerStyle]
|
|
100
|
+
}, listOptionsRest)), renderCutomBottomAction ? renderCutomBottomAction(handleOnSaveButtonPress, handleCloseSheet) : /*#__PURE__*/React.createElement(View, {
|
|
101
|
+
style: [computedStyles.bottomActionContainer, bottomActionContainerStyle]
|
|
102
|
+
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
103
|
+
label: (saveButtonProps === null || saveButtonProps === void 0 ? void 0 : saveButtonProps.label) ?? 'Simpan',
|
|
104
|
+
onPress: handleOnSaveButtonPress,
|
|
105
|
+
disabled: ((selectedTemp === null || selectedTemp === void 0 ? void 0 : selectedTemp.length) ?? 0) <= 0
|
|
106
|
+
}, saveButtonProps)))));
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=selection-modal.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useRef","useState","FlatList","View","getStyle","ActionList","BottomSheet","Button","Checkbox","RadioButton","IconArrowLeft","SelectionModal","props","type","renderDisplayComponent","listOptions","maxSelectedItem","bottomSheetOpt","saveButtonProps","bottomActionContainerStyle","onSaveButtonPress","renderCutomBottomAction","value","renderItem","listOptionsRest","ref","computedStyles","selectedTemp","setSelectedTemp","console","warn","renderActionList","item","index","_listOptions$data","valueItem","title","disabled","itemRest","isSelected","find","i","createElement","_extends","onPress","handleOnItemPress","trailingComponent","selected","isLast","data","length","isItemExist","filterData","filter","handleShowSheet","_ref$current","current","open","handleCloseSheet","_ref$current2","close","handleOnSaveButtonPress","_ref$current3","Fragment","dismissIcon","style","flatListContentContainer","contentContainerStyle","bottomActionContainer","label"],"sourceRoot":"../../../../src","sources":["components/selection-modal/selection-modal.component.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAgBC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC3D,SAASC,QAAQ,EAAiBC,IAAI,QAAQ,cAAc;AAO5D,SAASC,QAAQ,QAAQ,yBAAyB;AAElD,SAASC,UAAU,QAAQ,oCAAoC;AAC/D,SAASC,WAAW,QAAQ,sCAAsC;AAClE,SAASC,MAAM,QAAQ,4BAA4B;AACnD,SAASC,QAAQ,QAAQ,gCAAgC;AACzD,SAASC,WAAW,QAAQ,sCAAsC;AAClE,SAASC,aAAa,QAAQ,aAAa;AAG3C,OAAO,SAASC,cAAcA,CAACC,KAA0B,EAAE;EACzD,MAAM;IACJC,IAAI,GAAG,OAAO;IACdC,sBAAsB;IACtBC,WAAW;IACXC,eAAe,GAAG,CAAC,CAAC;IACpBC,cAAc;IACdC,eAAe;IACfC,0BAA0B;IAC1BC,iBAAiB,GAAGA,CAAA,KAAM,CAAC,CAAC;IAC5BC,uBAAuB;IACvBC,KAAK,GAAG;EACV,CAAC,GAAGV,KAAK;EAET,MAAM;IAAEW,UAAU;IAAE,GAAGC;EAAgB,CAAC,GAAGT,WAAW;EAEtD,MAAMU,GAAG,GAAGzB,MAAM,CAAqB,IAAI,CAAC;EAE5C,MAAM0B,cAAc,GAAG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leSheet } from 'react-native';
|
|
2
|
+
import { Spacing } from '../../themes';
|
|
3
|
+
export const getStyle = () => {
|
|
4
|
+
const computedStyle = {};
|
|
5
|
+
computedStyle.flatListContentContainer = {};
|
|
6
|
+
computedStyle.bottomActionContainer = {
|
|
7
|
+
padding: Spacing[16],
|
|
8
|
+
paddingBottom: Spacing[24],
|
|
9
|
+
backgroundColor: 'transparent'
|
|
10
|
+
};
|
|
11
|
+
return StyleSheet.create(computedStyle);
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=selection-modal.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","Spacing","getStyle","computedStyle","flatListContentContainer","bottomActionContainer","padding","paddingBottom","backgroundColor","create"],"sourceRoot":"../../../../src","sources":["components/selection-modal/selection-modal.style.tsx"],"mappings":"AAAA,SAASA,UAAU,QAAmB,cAAc;AAEpD,SAASC,OAAO,QAAQ,cAAc;AAOtC,OAAO,MAAMC,QAAQ,GAAGA,CAAA,KAAM;EAC5B,MAAMC,aAAiC,GAAG,CAAC,CAAC;EAE5CA,aAAa,CAACC,wBAAwB,GAAG,CAAC,CAAC;EAE3CD,aAAa,CAACE,qBAAqB,GAAG;IACpCC,OAAO,EAAEL,OAAO,CAAC,EAAE,CAAC;IACpBM,aAAa,EAAEN,OAAO,CAAC,EAAE,CAAC;IAC1BO,eAAe,EAAE;EACnB,CAAC;EAED,OAAOR,UAAU,CAACS,MAAM,CAACN,aAAa,CAAC;AACzC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/selection-modal/selection-modal.type.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionList.component.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionList/ActionList.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"ActionList.component.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionList/ActionList.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA+DzC,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionList.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionList/ActionList.styles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionList.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionList/ActionList.styles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B;AAED,eAAO,MAAM,QAAQ,UAAW,eAAe,uBAqD9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionList.type.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionList/ActionList.type.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,6BAA6B,EAC7B,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,oBAAY,eAAe,GAAG;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH;;;OAGG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionList.type.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionList/ActionList.type.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,6BAA6B,EAC7B,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,oBAAY,eAAe,GAAG;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH;;;OAGG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,SAAS,CAAC;IAE3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,IAAI,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -25,6 +25,7 @@ export { CheckBoxInput } from './CheckBoxInput/CheckBoxInput.component';
|
|
|
25
25
|
export { Checkbox } from './Checkbox/Checkbox.component';
|
|
26
26
|
export { Appbar } from './Appbar/Appbar.component';
|
|
27
27
|
export { Snackbar, SnackbarComponent, SnackbarUI, } from './Snackbar/Snackbar.component';
|
|
28
|
+
export { SelectionModal } from './selection-modal/selection-modal.component';
|
|
28
29
|
export { Switch } from './switch/switch.component';
|
|
29
30
|
export { Dot } from './dot/dot.component';
|
|
30
31
|
export { InformationBox } from './information-box/information-box.component';
|
|
@@ -57,6 +58,7 @@ export type { DividerProps } from './Divider/Divider.type';
|
|
|
57
58
|
export type { TabsProps } from './Tabs/Tabs.type';
|
|
58
59
|
export type { SearchInputProps } from './search-input/search-input.type';
|
|
59
60
|
export type { SelectionCardProps } from './selection-card/SelectionCard.type';
|
|
61
|
+
export { SelectionModalProps, SelectionItemData, SelectionModalValue, } from './selection-modal/selection-modal.type';
|
|
60
62
|
export type { RibbonProps } from './Ribbon/Ribbon.type';
|
|
61
63
|
export type { StickyBarProps } from './StickyBar/StickyBar.type';
|
|
62
64
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
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AACvE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,YAAY,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,YAAY,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,wCAAwC,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-modal.component.d.ts","sourceRoot":"","sources":["../../../../src/components/selection-modal/selection-modal.component.tsx"],"names":[],"mappings":";AAGA,OAAO,EAEL,mBAAmB,EAEpB,MAAM,wBAAwB,CAAC;AAWhC,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,sBAgIxD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ViewStyle } from 'react-native';
|
|
2
|
+
interface ComputedStyleProps {
|
|
3
|
+
flatListContentContainer?: ViewStyle;
|
|
4
|
+
bottomActionContainer?: ViewStyle;
|
|
5
|
+
}
|
|
6
|
+
export declare const getStyle: () => ComputedStyleProps;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=selection-modal.style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-modal.style.d.ts","sourceRoot":"","sources":["../../../../src/components/selection-modal/selection-modal.style.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,MAAM,cAAc,CAAC;AAIrD,UAAU,kBAAkB;IAC1B,wBAAwB,CAAC,EAAE,SAAS,CAAC;IACrC,qBAAqB,CAAC,EAAE,SAAS,CAAC;CACnC;AAED,eAAO,MAAM,QAAQ,0BAYpB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FlatListProps, ViewStyle } from 'react-native';
|
|
3
|
+
import { ActionListProps } from '../ActionList/ActionList.type';
|
|
4
|
+
import { BottomSheetProps } from '../BottomSheet/BottomSheet.type';
|
|
5
|
+
import { ButtonProps } from '../button/button.type';
|
|
6
|
+
export declare type SelectionModalValue = FlatListProps<SelectionItemData>['data'];
|
|
7
|
+
export declare type SelectionModalProps = {
|
|
8
|
+
type: 'checkbox' | 'radio';
|
|
9
|
+
value: SelectionModalValue;
|
|
10
|
+
renderDisplayComponent: (openModal: () => void) => ReactNode;
|
|
11
|
+
listOptions: Omit<FlatListProps<SelectionItemData>, 'renderItem'> & Partial<Pick<FlatListProps<SelectionItemData>, 'renderItem'>>;
|
|
12
|
+
maxSelectedItem?: number;
|
|
13
|
+
bottomSheetOpt: Omit<BottomSheetProps, 'visibility' | 'onDismiss'>;
|
|
14
|
+
saveButtonProps?: ButtonProps;
|
|
15
|
+
bottomActionContainerStyle?: ViewStyle;
|
|
16
|
+
onSaveButtonPress: (data: SelectionModalValue) => void;
|
|
17
|
+
renderCutomBottomAction?: (handleOnSaveButtonPress: (data: SelectionModalValue) => void, closeModal?: () => void) => ReactNode;
|
|
18
|
+
};
|
|
19
|
+
export declare type SelectionItemData = {
|
|
20
|
+
value: string;
|
|
21
|
+
} & ActionListProps;
|
|
22
|
+
//# sourceMappingURL=selection-modal.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-modal.type.d.ts","sourceRoot":"","sources":["../../../../src/components/selection-modal/selection-modal.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,oBAAY,mBAAmB,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3E,oBAAY,mBAAmB,GAAG;IAChC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC;IAE3B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,sBAAsB,EAAE,CAAC,SAAS,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;IAE7D,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,GAC/D,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;IAEhE,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,cAAc,EAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,GAAG,WAAW,CAAC,CAAC;IAEnE,eAAe,CAAC,EAAE,WAAW,CAAC;IAE9B,0BAA0B,CAAC,EAAE,SAAS,CAAC;IAEvC,iBAAiB,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAEvD,uBAAuB,CAAC,EAAE,CACxB,uBAAuB,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,EAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,KACpB,SAAS,CAAC;CAChB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adiraku/react-native-ui",
|
|
3
|
-
"version": "1.2.10-canary-
|
|
3
|
+
"version": "1.2.10-canary-2",
|
|
4
4
|
"description": "UI library for Adiraku apps",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"bugs": {
|
|
49
49
|
"url": "https://bitbucket.org/dcoedev/adiraku-react-native-ui/issues"
|
|
50
50
|
},
|
|
51
|
-
"homepage": "https://
|
|
51
|
+
"homepage": "https://www.npmjs.com/package/@adiraku/react-native-ui?activeTab=readme",
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@commitlint/config-conventional": "^17.0.2",
|
|
54
54
|
"@evilmartians/lefthook": "^1.2.2",
|
|
@@ -17,6 +17,8 @@ const ActionList: React.FC<ActionListProps> = (props) => {
|
|
|
17
17
|
leadingComponent,
|
|
18
18
|
trailingComponent,
|
|
19
19
|
containerStyle,
|
|
20
|
+
isLast,
|
|
21
|
+
testID = '',
|
|
20
22
|
...rest
|
|
21
23
|
} = props;
|
|
22
24
|
|
|
@@ -31,27 +33,40 @@ const ActionList: React.FC<ActionListProps> = (props) => {
|
|
|
31
33
|
{...rest}
|
|
32
34
|
underlayColor={Palettes.grey[50]}
|
|
33
35
|
>
|
|
34
|
-
<View
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
<View>
|
|
37
|
+
<View style={[computedStyle.container, containerStyle]}>
|
|
38
|
+
{leadingComponent && (
|
|
39
|
+
<View style={computedStyle.leadingWrapper}>{leadingComponent}</View>
|
|
40
|
+
)}
|
|
41
|
+
<View style={computedStyle.textContainer}>
|
|
42
|
+
{!!title && (
|
|
43
|
+
<Typography
|
|
44
|
+
variant={'subtitle2'}
|
|
45
|
+
textStyles={{ ...computedStyle.title, ...textStyles }}
|
|
46
|
+
testID={'action_list_title' + testID}
|
|
47
|
+
accessibilityLabel={'action_list_title' + testID}
|
|
48
|
+
>
|
|
49
|
+
{title}
|
|
50
|
+
</Typography>
|
|
51
|
+
)}
|
|
52
|
+
{!!description && (
|
|
53
|
+
<Typography
|
|
54
|
+
variant={'body2'}
|
|
55
|
+
textStyles={{ ...computedStyle.description, ...textStyles }}
|
|
56
|
+
testID={'action_list_subtitle' + testID}
|
|
57
|
+
accessibilityLabel={'action_list_subtitle' + testID}
|
|
58
|
+
>
|
|
59
|
+
{description}
|
|
60
|
+
</Typography>
|
|
61
|
+
)}
|
|
62
|
+
</View>
|
|
63
|
+
{trailingComponent && (
|
|
64
|
+
<View style={computedStyle.trailingWrapper}>
|
|
65
|
+
{trailingComponent}
|
|
66
|
+
</View>
|
|
67
|
+
)}
|
|
51
68
|
</View>
|
|
52
|
-
{
|
|
53
|
-
<View style={computedStyle.trailingWrapper}>{trailingComponent}</View>
|
|
54
|
-
)}
|
|
69
|
+
{!isLast && <View style={computedStyle.borderBottom} />}
|
|
55
70
|
</View>
|
|
56
71
|
</TouchableHighlight>
|
|
57
72
|
);
|
|
@@ -11,18 +11,17 @@ interface ComputedStyleProps {
|
|
|
11
11
|
textContainer?: TextStyle;
|
|
12
12
|
leadingWrapper?: ViewStyle;
|
|
13
13
|
trailingWrapper?: ViewStyle;
|
|
14
|
+
borderBottom?: ViewStyle;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export const getStyle = (props: ActionListProps) => {
|
|
17
|
-
const { disabled
|
|
18
|
+
const { disabled } = props;
|
|
18
19
|
|
|
19
20
|
const computedStyle: ComputedStyleProps = {};
|
|
20
21
|
|
|
21
22
|
computedStyle.container = {
|
|
22
|
-
|
|
23
|
-
paddingHorizontal: disabled ? 16 : 0,
|
|
23
|
+
padding: Spacing[16],
|
|
24
24
|
borderBottomColor: Palettes.black[400],
|
|
25
|
-
borderBottomWidth: disabled || isLast ? 0 : 0.5,
|
|
26
25
|
backgroundColor: disabled ? Palettes.grey[50] : 'transparent',
|
|
27
26
|
flexDirection: 'row',
|
|
28
27
|
justifyContent: 'flex-start',
|
|
@@ -60,5 +59,12 @@ export const getStyle = (props: ActionListProps) => {
|
|
|
60
59
|
alignItems: 'center',
|
|
61
60
|
};
|
|
62
61
|
|
|
62
|
+
computedStyle.borderBottom = {
|
|
63
|
+
marginHorizontal: Spacing[16],
|
|
64
|
+
height: 1,
|
|
65
|
+
flex: 1,
|
|
66
|
+
backgroundColor: Palettes.grey[100],
|
|
67
|
+
};
|
|
68
|
+
|
|
63
69
|
return StyleSheet.create(computedStyle);
|
|
64
70
|
};
|
package/src/components/index.ts
CHANGED
|
@@ -32,6 +32,7 @@ export {
|
|
|
32
32
|
SnackbarComponent,
|
|
33
33
|
SnackbarUI,
|
|
34
34
|
} from './Snackbar/Snackbar.component';
|
|
35
|
+
export { SelectionModal } from './selection-modal/selection-modal.component';
|
|
35
36
|
export { Switch } from './switch/switch.component';
|
|
36
37
|
export { Dot } from './dot/dot.component';
|
|
37
38
|
export { InformationBox } from './information-box/information-box.component';
|
|
@@ -84,5 +85,10 @@ export type { DividerProps } from './Divider/Divider.type';
|
|
|
84
85
|
export type { TabsProps } from './Tabs/Tabs.type';
|
|
85
86
|
export type { SearchInputProps } from './search-input/search-input.type';
|
|
86
87
|
export type { SelectionCardProps } from './selection-card/SelectionCard.type';
|
|
88
|
+
export {
|
|
89
|
+
SelectionModalProps,
|
|
90
|
+
SelectionItemData,
|
|
91
|
+
SelectionModalValue,
|
|
92
|
+
} from './selection-modal/selection-modal.type';
|
|
87
93
|
export type { RibbonProps } from './Ribbon/Ribbon.type';
|
|
88
94
|
export type { StickyBarProps } from './StickyBar/StickyBar.type';
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import React, { ElementRef, useRef, useState } from 'react';
|
|
2
|
+
import { FlatList, FlatListProps, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
SelectionItemData,
|
|
6
|
+
SelectionModalProps,
|
|
7
|
+
SelectionModalValue,
|
|
8
|
+
} from './selection-modal.type';
|
|
9
|
+
import { getStyle } from './selection-modal.style';
|
|
10
|
+
|
|
11
|
+
import { ActionList } from '../ActionList/ActionList.component';
|
|
12
|
+
import { BottomSheet } from '../BottomSheet/BottomSheet.component';
|
|
13
|
+
import { Button } from '../button/button.component';
|
|
14
|
+
import { Checkbox } from '../Checkbox/Checkbox.component';
|
|
15
|
+
import { RadioButton } from '../RadioButton/RadioButton.component';
|
|
16
|
+
import { IconArrowLeft } from '../../icons';
|
|
17
|
+
|
|
18
|
+
type BottomSheetHandler = ElementRef<typeof BottomSheet>;
|
|
19
|
+
export function SelectionModal(props: SelectionModalProps) {
|
|
20
|
+
const {
|
|
21
|
+
type = 'radio',
|
|
22
|
+
renderDisplayComponent,
|
|
23
|
+
listOptions,
|
|
24
|
+
maxSelectedItem = -1,
|
|
25
|
+
bottomSheetOpt,
|
|
26
|
+
saveButtonProps,
|
|
27
|
+
bottomActionContainerStyle,
|
|
28
|
+
onSaveButtonPress = () => {},
|
|
29
|
+
renderCutomBottomAction,
|
|
30
|
+
value = [],
|
|
31
|
+
} = props;
|
|
32
|
+
|
|
33
|
+
const { renderItem, ...listOptionsRest } = listOptions;
|
|
34
|
+
|
|
35
|
+
const ref = useRef<BottomSheetHandler>(null);
|
|
36
|
+
|
|
37
|
+
const computedStyles = getStyle();
|
|
38
|
+
|
|
39
|
+
const [selectedTemp, setSelectedTemp] = useState<SelectionModalValue>(value);
|
|
40
|
+
|
|
41
|
+
if (!renderDisplayComponent) {
|
|
42
|
+
console.warn(
|
|
43
|
+
'Please provide renderDisplayComponent props (SelectionModal - adiraku)'
|
|
44
|
+
);
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const renderActionList: FlatListProps<SelectionItemData>['renderItem'] = ({
|
|
49
|
+
item,
|
|
50
|
+
index,
|
|
51
|
+
}) => {
|
|
52
|
+
const { value: valueItem, title, disabled, ...itemRest } = item;
|
|
53
|
+
|
|
54
|
+
const isSelected = !!selectedTemp?.find((i) => i.value === valueItem);
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<ActionList
|
|
58
|
+
title={title}
|
|
59
|
+
onPress={() => handleOnItemPress(item)}
|
|
60
|
+
trailingComponent={
|
|
61
|
+
type === 'radio' ? (
|
|
62
|
+
<RadioButton selected={isSelected} disabled={disabled} />
|
|
63
|
+
) : (
|
|
64
|
+
<Checkbox selected={isSelected} disabled={disabled} />
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
disabled={disabled}
|
|
68
|
+
isLast={index === (listOptions.data?.length ?? 0) - 1}
|
|
69
|
+
{...itemRest}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const handleOnItemPress = (item: SelectionItemData) => {
|
|
75
|
+
if (type === 'radio') {
|
|
76
|
+
setSelectedTemp([item]);
|
|
77
|
+
} else if (type === 'checkbox') {
|
|
78
|
+
const isItemExist = selectedTemp?.find((i) => i.value === item.value);
|
|
79
|
+
|
|
80
|
+
// Takeout current item if it's in the stack
|
|
81
|
+
if (isItemExist) {
|
|
82
|
+
const filterData = selectedTemp?.filter((i) => i.value !== item.value);
|
|
83
|
+
|
|
84
|
+
setSelectedTemp(filterData);
|
|
85
|
+
} else {
|
|
86
|
+
if (maxSelectedItem < 0) {
|
|
87
|
+
setSelectedTemp([...(selectedTemp ?? []), item]);
|
|
88
|
+
} else {
|
|
89
|
+
setSelectedTemp([...(selectedTemp ?? []), item]);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const handleShowSheet = () => {
|
|
96
|
+
setSelectedTemp(value);
|
|
97
|
+
ref.current?.open();
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const handleCloseSheet = () => {
|
|
101
|
+
ref.current?.close();
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const handleOnSaveButtonPress = () => {
|
|
105
|
+
onSaveButtonPress(selectedTemp);
|
|
106
|
+
ref.current?.close();
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<>
|
|
111
|
+
{renderDisplayComponent?.(handleShowSheet)}
|
|
112
|
+
|
|
113
|
+
<BottomSheet
|
|
114
|
+
ref={ref}
|
|
115
|
+
dismissIcon={bottomSheetOpt?.dismissIcon ?? <IconArrowLeft />}
|
|
116
|
+
{...bottomSheetOpt}
|
|
117
|
+
>
|
|
118
|
+
<FlatList
|
|
119
|
+
renderItem={renderItem || renderActionList}
|
|
120
|
+
style={[
|
|
121
|
+
computedStyles.flatListContentContainer,
|
|
122
|
+
listOptions.contentContainerStyle,
|
|
123
|
+
]}
|
|
124
|
+
{...listOptionsRest}
|
|
125
|
+
/>
|
|
126
|
+
|
|
127
|
+
{renderCutomBottomAction ? (
|
|
128
|
+
renderCutomBottomAction(handleOnSaveButtonPress, handleCloseSheet)
|
|
129
|
+
) : (
|
|
130
|
+
<View
|
|
131
|
+
style={[
|
|
132
|
+
computedStyles.bottomActionContainer,
|
|
133
|
+
bottomActionContainerStyle,
|
|
134
|
+
]}
|
|
135
|
+
>
|
|
136
|
+
<Button
|
|
137
|
+
label={saveButtonProps?.label ?? 'Simpan'}
|
|
138
|
+
onPress={handleOnSaveButtonPress}
|
|
139
|
+
disabled={(selectedTemp?.length ?? 0) <= 0}
|
|
140
|
+
{...saveButtonProps}
|
|
141
|
+
/>
|
|
142
|
+
</View>
|
|
143
|
+
)}
|
|
144
|
+
</BottomSheet>
|
|
145
|
+
</>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StyleSheet, ViewStyle } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import { Spacing } from '../../themes';
|
|
4
|
+
|
|
5
|
+
interface ComputedStyleProps {
|
|
6
|
+
flatListContentContainer?: ViewStyle;
|
|
7
|
+
bottomActionContainer?: ViewStyle;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const getStyle = () => {
|
|
11
|
+
const computedStyle: ComputedStyleProps = {};
|
|
12
|
+
|
|
13
|
+
computedStyle.flatListContentContainer = {};
|
|
14
|
+
|
|
15
|
+
computedStyle.bottomActionContainer = {
|
|
16
|
+
padding: Spacing[16],
|
|
17
|
+
paddingBottom: Spacing[24],
|
|
18
|
+
backgroundColor: 'transparent',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return StyleSheet.create(computedStyle);
|
|
22
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FlatListProps, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { ActionListProps } from '../ActionList/ActionList.type';
|
|
5
|
+
import { BottomSheetProps } from '../BottomSheet/BottomSheet.type';
|
|
6
|
+
import { ButtonProps } from '../button/button.type';
|
|
7
|
+
|
|
8
|
+
export type SelectionModalValue = FlatListProps<SelectionItemData>['data'];
|
|
9
|
+
export type SelectionModalProps = {
|
|
10
|
+
type: 'checkbox' | 'radio';
|
|
11
|
+
|
|
12
|
+
value: SelectionModalValue;
|
|
13
|
+
renderDisplayComponent: (openModal: () => void) => ReactNode;
|
|
14
|
+
|
|
15
|
+
listOptions: Omit<FlatListProps<SelectionItemData>, 'renderItem'> &
|
|
16
|
+
Partial<Pick<FlatListProps<SelectionItemData>, 'renderItem'>>;
|
|
17
|
+
|
|
18
|
+
maxSelectedItem?: number;
|
|
19
|
+
|
|
20
|
+
bottomSheetOpt: Omit<BottomSheetProps, 'visibility' | 'onDismiss'>;
|
|
21
|
+
|
|
22
|
+
saveButtonProps?: ButtonProps;
|
|
23
|
+
|
|
24
|
+
bottomActionContainerStyle?: ViewStyle;
|
|
25
|
+
|
|
26
|
+
onSaveButtonPress: (data: SelectionModalValue) => void;
|
|
27
|
+
|
|
28
|
+
renderCutomBottomAction?: (
|
|
29
|
+
handleOnSaveButtonPress: (data: SelectionModalValue) => void,
|
|
30
|
+
closeModal?: () => void
|
|
31
|
+
) => ReactNode;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type SelectionItemData = {
|
|
35
|
+
value: string;
|
|
36
|
+
} & ActionListProps;
|