@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.
Files changed (54) hide show
  1. package/lib/commonjs/components/ActionList/ActionList.component.js +14 -6
  2. package/lib/commonjs/components/ActionList/ActionList.component.js.map +1 -1
  3. package/lib/commonjs/components/ActionList/ActionList.styles.js +8 -5
  4. package/lib/commonjs/components/ActionList/ActionList.styles.js.map +1 -1
  5. package/lib/commonjs/components/countdown/countdown.component.js +7 -2
  6. package/lib/commonjs/components/countdown/countdown.component.js.map +1 -1
  7. package/lib/commonjs/components/index.js +26 -0
  8. package/lib/commonjs/components/index.js.map +1 -1
  9. package/lib/commonjs/components/selection-modal/selection-modal.component.js +116 -0
  10. package/lib/commonjs/components/selection-modal/selection-modal.component.js.map +1 -0
  11. package/lib/commonjs/components/selection-modal/selection-modal.style.js +20 -0
  12. package/lib/commonjs/components/selection-modal/selection-modal.style.js.map +1 -0
  13. package/lib/commonjs/components/selection-modal/selection-modal.type.js +6 -0
  14. package/lib/commonjs/components/selection-modal/selection-modal.type.js.map +1 -0
  15. package/lib/module/components/ActionList/ActionList.component.js +14 -6
  16. package/lib/module/components/ActionList/ActionList.component.js.map +1 -1
  17. package/lib/module/components/ActionList/ActionList.styles.js +8 -5
  18. package/lib/module/components/ActionList/ActionList.styles.js.map +1 -1
  19. package/lib/module/components/countdown/countdown.component.js +7 -2
  20. package/lib/module/components/countdown/countdown.component.js.map +1 -1
  21. package/lib/module/components/index.js +2 -0
  22. package/lib/module/components/index.js.map +1 -1
  23. package/lib/module/components/selection-modal/selection-modal.component.js +108 -0
  24. package/lib/module/components/selection-modal/selection-modal.component.js.map +1 -0
  25. package/lib/module/components/selection-modal/selection-modal.style.js +13 -0
  26. package/lib/module/components/selection-modal/selection-modal.style.js.map +1 -0
  27. package/lib/module/components/selection-modal/selection-modal.type.js +2 -0
  28. package/lib/module/components/selection-modal/selection-modal.type.js.map +1 -0
  29. package/lib/typescript/components/ActionList/ActionList.component.d.ts.map +1 -1
  30. package/lib/typescript/components/ActionList/ActionList.styles.d.ts +1 -0
  31. package/lib/typescript/components/ActionList/ActionList.styles.d.ts.map +1 -1
  32. package/lib/typescript/components/ActionList/ActionList.type.d.ts +1 -0
  33. package/lib/typescript/components/ActionList/ActionList.type.d.ts.map +1 -1
  34. package/lib/typescript/components/countdown/countdown.component.d.ts.map +1 -1
  35. package/lib/typescript/components/countdown/countdown.type.d.ts +1 -0
  36. package/lib/typescript/components/countdown/countdown.type.d.ts.map +1 -1
  37. package/lib/typescript/components/index.d.ts +2 -0
  38. package/lib/typescript/components/index.d.ts.map +1 -1
  39. package/lib/typescript/components/selection-modal/selection-modal.component.d.ts +4 -0
  40. package/lib/typescript/components/selection-modal/selection-modal.component.d.ts.map +1 -0
  41. package/lib/typescript/components/selection-modal/selection-modal.style.d.ts +8 -0
  42. package/lib/typescript/components/selection-modal/selection-modal.style.d.ts.map +1 -0
  43. package/lib/typescript/components/selection-modal/selection-modal.type.d.ts +22 -0
  44. package/lib/typescript/components/selection-modal/selection-modal.type.d.ts.map +1 -0
  45. package/package.json +2 -2
  46. package/src/components/ActionList/ActionList.component.tsx +35 -20
  47. package/src/components/ActionList/ActionList.styles.tsx +10 -4
  48. package/src/components/ActionList/ActionList.type.tsx +2 -0
  49. package/src/components/countdown/countdown.component.tsx +12 -2
  50. package/src/components/countdown/countdown.type.ts +2 -0
  51. package/src/components/index.ts +6 -0
  52. package/src/components/selection-modal/selection-modal.component.tsx +147 -0
  53. package/src/components/selection-modal/selection-modal.style.tsx +22 -0
  54. 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;