@adiraku/react-native-ui 1.2.9 → 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/countdown/countdown.component.js +7 -2
- package/lib/commonjs/components/countdown/countdown.component.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/countdown/countdown.component.js +7 -2
- package/lib/module/components/countdown/countdown.component.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/countdown/countdown.component.d.ts.map +1 -1
- package/lib/typescript/components/countdown/countdown.type.d.ts +1 -0
- package/lib/typescript/components/countdown/countdown.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/countdown/countdown.component.tsx +12 -2
- package/src/components/countdown/countdown.type.ts +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
|
@@ -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;
|