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.
Files changed (59) hide show
  1. package/components/Card/Card.tsx +1 -1
  2. package/components/Checkbox/CheckboxBase.ios.tsx +9 -16
  3. package/components/Checkbox/CheckboxBase.tsx +11 -18
  4. package/components/DateField/DateField.tsx +4 -3
  5. package/components/DatePicker/DateCalendar.tsx +4 -4
  6. package/components/DatePicker/DatePickerModal.tsx +35 -23
  7. package/components/DatePicker/DatePickerProvider.tsx +8 -2
  8. package/components/DatePicker/context.tsx +2 -1
  9. package/components/DatePicker/index.tsx +1 -0
  10. package/components/DatePickerInline/DatePickerDockedHeader.tsx +11 -7
  11. package/components/DatePickerInline/DatePickerInline.tsx +1 -1
  12. package/components/DatePickerInline/DatePickerInlineBase.tsx +3 -3
  13. package/components/DatePickerInline/DatePickerInlineHeader.tsx +50 -20
  14. package/components/DatePickerInline/DayNames.tsx +13 -10
  15. package/components/DatePickerInline/HeaderItem.tsx +2 -2
  16. package/components/DatePickerInline/Month.tsx +4 -3
  17. package/components/DatePickerInline/MonthPicker.tsx +74 -54
  18. package/components/DatePickerInline/Swiper.native.tsx +2 -2
  19. package/components/DatePickerInline/Swiper.tsx +3 -3
  20. package/components/DatePickerInline/YearPicker.tsx +136 -112
  21. package/components/DatePickerInline/{DatePickerContext.tsx → store.tsx} +7 -3
  22. package/components/DatePickerInline/types.ts +4 -3
  23. package/components/Divider/Divider.tsx +192 -0
  24. package/components/Divider/index.tsx +11 -0
  25. package/components/Drawer/DrawerItemGroup.tsx +3 -7
  26. package/components/IconButton/IconButton.tsx +2 -12
  27. package/components/List/List.tsx +507 -0
  28. package/components/List/context.tsx +28 -0
  29. package/components/List/index.ts +9 -0
  30. package/components/List/types.ts +149 -0
  31. package/components/{ListItem → List}/utils.ts +47 -50
  32. package/components/Menu/Menu.tsx +156 -12
  33. package/components/Menu/index.tsx +11 -7
  34. package/components/Menu/utils.ts +21 -70
  35. package/components/RadioButton/RadioButtonAndroid.tsx +38 -54
  36. package/components/RadioButton/RadioButtonIOS.tsx +2 -16
  37. package/components/Select/Select.tsx +139 -497
  38. package/components/Select/context.tsx +14 -32
  39. package/components/Select/types.ts +44 -53
  40. package/components/Select/utils.ts +15 -47
  41. package/components/Text/textFactory.tsx +17 -5
  42. package/components/TimeField/TimeField.tsx +1 -1
  43. package/components/TimePicker/TimeInput.tsx +2 -7
  44. package/components/TimePicker/TimePickerModal.tsx +15 -15
  45. package/components/TimePicker/utils.ts +0 -4
  46. package/components/TouchableRipple/TouchableRipple.native.tsx +36 -5
  47. package/components/TouchableRipple/TouchableRipple.tsx +53 -19
  48. package/components/TouchableRipple/rippleFromForegroundColor.ts +21 -0
  49. package/package.json +4 -2
  50. package/components/HorizontalDivider/HorizontalDivider.tsx +0 -103
  51. package/components/HorizontalDivider/index.tsx +0 -9
  52. package/components/ListItem/ListItem.tsx +0 -138
  53. package/components/ListItem/ListItemDescription.tsx +0 -25
  54. package/components/ListItem/ListItemTitle.tsx +0 -25
  55. package/components/ListItem/index.tsx +0 -14
  56. package/components/Menu/MenuDivider.tsx +0 -13
  57. package/components/Menu/MenuItem.tsx +0 -128
  58. package/components/VerticalDivider/VerticalDivider.tsx +0 -100
  59. 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';