react-native-molecules 0.5.0-beta.20 → 0.5.0-beta.22
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/components/Card/Card.tsx +1 -1
- package/components/Checkbox/CheckboxBase.ios.tsx +9 -16
- package/components/Checkbox/CheckboxBase.tsx +11 -18
- package/components/DateField/DateField.tsx +4 -3
- package/components/DatePicker/DateCalendar.tsx +4 -4
- package/components/DatePicker/DatePickerModal.tsx +35 -23
- package/components/DatePicker/DatePickerProvider.tsx +8 -2
- package/components/DatePicker/context.tsx +2 -1
- package/components/DatePicker/index.tsx +1 -0
- package/components/DatePickerInline/DatePickerDockedHeader.tsx +11 -7
- package/components/DatePickerInline/DatePickerInline.tsx +1 -1
- package/components/DatePickerInline/DatePickerInlineBase.tsx +3 -3
- package/components/DatePickerInline/DatePickerInlineHeader.tsx +50 -20
- package/components/DatePickerInline/DayNames.tsx +13 -10
- package/components/DatePickerInline/HeaderItem.tsx +2 -2
- package/components/DatePickerInline/Month.tsx +4 -3
- package/components/DatePickerInline/MonthPicker.tsx +74 -54
- package/components/DatePickerInline/Swiper.native.tsx +2 -2
- package/components/DatePickerInline/Swiper.tsx +3 -3
- package/components/DatePickerInline/YearPicker.tsx +136 -112
- package/components/DatePickerInline/{DatePickerContext.tsx → store.tsx} +7 -3
- package/components/DatePickerInline/types.ts +4 -3
- package/components/Divider/Divider.tsx +192 -0
- package/components/Divider/index.tsx +11 -0
- package/components/Drawer/DrawerItemGroup.tsx +3 -7
- package/components/IconButton/IconButton.tsx +2 -12
- package/components/List/List.tsx +507 -0
- package/components/List/context.tsx +28 -0
- package/components/List/index.ts +9 -0
- package/components/List/types.ts +149 -0
- package/components/{ListItem → List}/utils.ts +47 -50
- package/components/Menu/Menu.tsx +156 -12
- package/components/Menu/index.tsx +11 -7
- package/components/Menu/utils.ts +21 -70
- package/components/RadioButton/RadioButtonAndroid.tsx +38 -54
- package/components/RadioButton/RadioButtonIOS.tsx +2 -16
- package/components/Select/Select.tsx +139 -497
- package/components/Select/context.tsx +14 -32
- package/components/Select/types.ts +44 -53
- package/components/Select/utils.ts +15 -47
- package/components/Text/textFactory.tsx +17 -5
- package/components/TimeField/TimeField.tsx +1 -1
- package/components/TimePicker/TimeInput.tsx +2 -7
- package/components/TimePicker/TimePickerModal.tsx +15 -15
- package/components/TimePicker/utils.ts +0 -4
- package/components/TouchableRipple/TouchableRipple.native.tsx +36 -5
- package/components/TouchableRipple/TouchableRipple.tsx +53 -19
- package/components/TouchableRipple/rippleFromForegroundColor.ts +21 -0
- package/package.json +4 -2
- package/components/HorizontalDivider/HorizontalDivider.tsx +0 -103
- package/components/HorizontalDivider/index.tsx +0 -9
- package/components/ListItem/ListItem.tsx +0 -138
- package/components/ListItem/ListItemDescription.tsx +0 -25
- package/components/ListItem/ListItemTitle.tsx +0 -25
- package/components/ListItem/index.tsx +0 -14
- package/components/Menu/MenuDivider.tsx +0 -13
- package/components/Menu/MenuItem.tsx +0 -128
- package/components/VerticalDivider/VerticalDivider.tsx +0 -100
- package/components/VerticalDivider/index.tsx +0 -9
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { memo } from 'react';
|
|
2
|
-
import { View, type ViewProps } from 'react-native';
|
|
3
|
-
import { StyleSheet } from 'react-native-unistyles';
|
|
4
|
-
|
|
5
|
-
import { getRegisteredComponentStylesWithFallback } from '../../core';
|
|
6
|
-
|
|
7
|
-
export type Props = Omit<ViewProps, 'children'> & {
|
|
8
|
-
/**
|
|
9
|
-
* Top Inset of the Divider.
|
|
10
|
-
*/
|
|
11
|
-
topInset?: number;
|
|
12
|
-
/**
|
|
13
|
-
* Bottom Inset of the Divider.
|
|
14
|
-
*/
|
|
15
|
-
bottomInset?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Whether divider should be bolded.
|
|
18
|
-
*/
|
|
19
|
-
bold?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Horizontal spacing of the Divider
|
|
22
|
-
*/
|
|
23
|
-
spacing?: number;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* A divider is a thin, lightweight separator that groups content in lists and page layouts.
|
|
28
|
-
*
|
|
29
|
-
* <div class="screenshots">
|
|
30
|
-
* <figure>
|
|
31
|
-
* <img class="medium" src="screenshots/divider.png" />
|
|
32
|
-
* </figure>
|
|
33
|
-
* </div>
|
|
34
|
-
*
|
|
35
|
-
* ## Usage
|
|
36
|
-
* ```js
|
|
37
|
-
* import * as React from 'react';
|
|
38
|
-
* import { View } from 'react-native';
|
|
39
|
-
* import { Divider, Text } from 'react-native-paper';
|
|
40
|
-
*
|
|
41
|
-
* const MyComponent = () => (
|
|
42
|
-
* <View>
|
|
43
|
-
* <Text>Lemon</Text>
|
|
44
|
-
* <Divider />
|
|
45
|
-
* <Text>Mango</Text>
|
|
46
|
-
* <Divider />
|
|
47
|
-
* </View>
|
|
48
|
-
* );
|
|
49
|
-
*
|
|
50
|
-
* export default MyComponent;
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
const VerticalDivider = ({
|
|
55
|
-
topInset = 0,
|
|
56
|
-
bottomInset = 0,
|
|
57
|
-
spacing = 0,
|
|
58
|
-
style,
|
|
59
|
-
bold = false,
|
|
60
|
-
...rest
|
|
61
|
-
}: Props) => {
|
|
62
|
-
verticalDividerStyles.useVariants({
|
|
63
|
-
isBold: bold,
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<View
|
|
68
|
-
{...rest}
|
|
69
|
-
style={[
|
|
70
|
-
verticalDividerStyles.root,
|
|
71
|
-
style,
|
|
72
|
-
topInset ? { marginTop: topInset } : undefined,
|
|
73
|
-
bottomInset ? { marginBottom: bottomInset } : undefined,
|
|
74
|
-
spacing ? { marginHorizontal: spacing } : undefined,
|
|
75
|
-
]}
|
|
76
|
-
/>
|
|
77
|
-
);
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export const verticalDividerStylesDefault = StyleSheet.create(theme => ({
|
|
81
|
-
root: {
|
|
82
|
-
width: StyleSheet.hairlineWidth,
|
|
83
|
-
background: theme.colors.outlineVariant,
|
|
84
|
-
|
|
85
|
-
variants: {
|
|
86
|
-
isBold: {
|
|
87
|
-
true: {
|
|
88
|
-
width: 1,
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
}));
|
|
94
|
-
|
|
95
|
-
export const verticalDividerStyles = getRegisteredComponentStylesWithFallback(
|
|
96
|
-
'VerticalDivider',
|
|
97
|
-
verticalDividerStylesDefault,
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
export default memo(VerticalDivider);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { getRegisteredComponentWithFallback } from '../../core';
|
|
2
|
-
import VerticalDividerDefault from './VerticalDivider';
|
|
3
|
-
|
|
4
|
-
export const VerticalDivider = getRegisteredComponentWithFallback(
|
|
5
|
-
'VerticalDivider',
|
|
6
|
-
VerticalDividerDefault,
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
export { type Props as VerticalDividerProps, verticalDividerStyles } from './VerticalDivider';
|