ferns-ui 0.37.9 → 0.38.1
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/dist/ActionSheet.js +1 -1
- package/dist/ActionSheet.js.map +1 -1
- package/dist/Avatar.js.map +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Banner.js +3 -3
- package/dist/Banner.js.map +1 -1
- package/dist/BlurBox.native.js.map +1 -1
- package/dist/Body.js.map +1 -1
- package/dist/Box.js +7 -7
- package/dist/Box.js.map +1 -1
- package/dist/Button.js +1 -1
- package/dist/Button.js.map +1 -1
- package/dist/CheckBox.js.map +1 -1
- package/dist/Common.js.map +1 -1
- package/dist/CustomSelect.js.map +1 -1
- package/dist/DateTimeActionSheet.js.map +1 -1
- package/dist/DateTimeField.android.js.map +1 -1
- package/dist/DateTimeField.ios.js.map +1 -1
- package/dist/DateTimeField.js.map +1 -1
- package/dist/ErrorBoundary.js.map +1 -1
- package/dist/Field.js.map +1 -1
- package/dist/Form.js.map +1 -1
- package/dist/HeaderButtons.js +2 -2
- package/dist/HeaderButtons.js.map +1 -1
- package/dist/Heading.js.map +1 -1
- package/dist/Hyperlink.js +1 -1
- package/dist/Hyperlink.js.map +1 -1
- package/dist/IconButton.js +2 -2
- package/dist/IconButton.js.map +1 -1
- package/dist/Image.js.map +1 -1
- package/dist/Mask.js.map +1 -1
- package/dist/MediaQuery.js.map +1 -1
- package/dist/MobileAddressAutoComplete.js.map +1 -1
- package/dist/Modal.js.map +1 -1
- package/dist/ModalSheet.js.map +1 -1
- package/dist/Page.d.ts +1 -0
- package/dist/Page.js +1 -1
- package/dist/Page.js.map +1 -1
- package/dist/PickerSelect.js +2 -2
- package/dist/PickerSelect.js.map +1 -1
- package/dist/SegmentedControl.js.map +1 -1
- package/dist/SelectList.js.map +1 -1
- package/dist/Spinner.js.map +1 -1
- package/dist/SplitPage.js +7 -7
- package/dist/SplitPage.js.map +1 -1
- package/dist/SplitPage.native.js +8 -8
- package/dist/SplitPage.native.js.map +1 -1
- package/dist/Table.js.map +1 -1
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableRow.js.map +1 -1
- package/dist/TapToEdit.js +2 -2
- package/dist/TapToEdit.js.map +1 -1
- package/dist/Text.js.map +1 -1
- package/dist/TextField.js.map +1 -1
- package/dist/TextFieldNumberActionSheet.js.map +1 -1
- package/dist/Theme.js +4 -4
- package/dist/Theme.js.map +1 -1
- package/dist/Toast.js.map +1 -1
- package/dist/Tooltip.js.map +1 -1
- package/dist/UnifiedAddressAutoComplete.js.map +1 -1
- package/dist/UnifiedScreens.js.map +1 -1
- package/dist/Unifier.js.map +1 -1
- package/dist/Utilities.js.map +1 -1
- package/dist/WebAddressAutocomplete.js.map +1 -1
- package/dist/WithLabel.js.map +1 -1
- package/dist/index.d.ts +20 -20
- package/dist/index.js +20 -23
- package/dist/index.js.map +1 -1
- package/dist/useStoredState.js +1 -1
- package/dist/useStoredState.js.map +1 -1
- package/package.json +18 -15
- package/src/ActionSheet.tsx +1 -1
- package/src/Banner.tsx +3 -3
- package/src/Box.tsx +7 -7
- package/src/Button.tsx +1 -1
- package/src/HeaderButtons.tsx +2 -2
- package/src/Hyperlink.tsx +1 -1
- package/src/IconButton.tsx +2 -2
- package/src/Page.tsx +2 -1
- package/src/SplitPage.native.tsx +8 -8
- package/src/SplitPage.tsx +7 -7
- package/src/TapToEdit.tsx +2 -2
- package/src/index.tsx +23 -24
- package/src/useStoredState.ts +1 -1
package/src/Button.tsx
CHANGED
package/src/HeaderButtons.tsx
CHANGED
package/src/Hyperlink.tsx
CHANGED
|
@@ -170,7 +170,7 @@ export function Hyperlink(props: Props) {
|
|
|
170
170
|
urlObject.protocol = urlObject.protocol.toLowerCase();
|
|
171
171
|
const normalizedURL = mdurl.format(urlObject);
|
|
172
172
|
|
|
173
|
-
Linking.canOpenURL(normalizedURL).then(
|
|
173
|
+
void Linking.canOpenURL(normalizedURL).then(
|
|
174
174
|
(supported) => supported && Linking.openURL(normalizedURL)
|
|
175
175
|
);
|
|
176
176
|
};
|
package/src/IconButton.tsx
CHANGED
|
@@ -131,8 +131,8 @@ export const IconButton = forwardRef(
|
|
|
131
131
|
justifyContent: "center",
|
|
132
132
|
alignItems: "center",
|
|
133
133
|
}}
|
|
134
|
-
onPress={() => {
|
|
135
|
-
Unifier.utils.haptic();
|
|
134
|
+
onPress={async () => {
|
|
135
|
+
await Unifier.utils.haptic();
|
|
136
136
|
if (withConfirmation && !showConfirmation) {
|
|
137
137
|
setShowConfirmation(true);
|
|
138
138
|
} else if (onClick) {
|
package/src/Page.tsx
CHANGED
|
@@ -26,6 +26,7 @@ interface PageProps {
|
|
|
26
26
|
rightButton?: string;
|
|
27
27
|
rightButtonOnClick?: () => void;
|
|
28
28
|
children?: any;
|
|
29
|
+
onError?: (error: Error, stack: any) => void;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
export class Page extends React.Component<PageProps, {}> {
|
|
@@ -82,7 +83,7 @@ export class Page extends React.Component<PageProps, {}> {
|
|
|
82
83
|
|
|
83
84
|
render() {
|
|
84
85
|
return (
|
|
85
|
-
<ErrorBoundary>
|
|
86
|
+
<ErrorBoundary onError={this.props.onError}>
|
|
86
87
|
<Box
|
|
87
88
|
alignSelf="center"
|
|
88
89
|
avoidKeyboard
|
package/src/SplitPage.native.tsx
CHANGED
|
@@ -36,21 +36,21 @@ export const SplitPage = ({
|
|
|
36
36
|
const {width} = Dimensions.get("window");
|
|
37
37
|
|
|
38
38
|
const onItemSelect = useCallback(
|
|
39
|
-
(item: ListRenderItemInfo<any>) => {
|
|
39
|
+
async (item: ListRenderItemInfo<any>) => {
|
|
40
40
|
setSelectedId(item.index);
|
|
41
|
-
onSelectionChange(item);
|
|
41
|
+
await onSelectionChange(item);
|
|
42
42
|
},
|
|
43
43
|
[onSelectionChange]
|
|
44
44
|
);
|
|
45
45
|
|
|
46
|
-
const onItemDeselect = useCallback(() => {
|
|
46
|
+
const onItemDeselect = useCallback(async (): Promise<void> => {
|
|
47
47
|
setSelectedId(undefined);
|
|
48
|
-
onSelectionChange(undefined);
|
|
48
|
+
await onSelectionChange(undefined);
|
|
49
49
|
}, [onSelectionChange]);
|
|
50
50
|
|
|
51
51
|
useEffect(() => {
|
|
52
52
|
if (showItemList) {
|
|
53
|
-
onItemDeselect();
|
|
53
|
+
void onItemDeselect();
|
|
54
54
|
}
|
|
55
55
|
}, [showItemList, onItemDeselect]);
|
|
56
56
|
|
|
@@ -62,9 +62,9 @@ export const SplitPage = ({
|
|
|
62
62
|
const renderItem = (itemInfo: ListRenderItemInfo<any>) => {
|
|
63
63
|
return (
|
|
64
64
|
<Box
|
|
65
|
-
onClick={() => {
|
|
66
|
-
Unifier.utils.haptic();
|
|
67
|
-
onItemSelect(itemInfo);
|
|
65
|
+
onClick={async () => {
|
|
66
|
+
await Unifier.utils.haptic();
|
|
67
|
+
await onItemSelect(itemInfo);
|
|
68
68
|
}}
|
|
69
69
|
>
|
|
70
70
|
{renderListViewItem(itemInfo)}
|
package/src/SplitPage.tsx
CHANGED
|
@@ -40,21 +40,21 @@ export const SplitPage = ({
|
|
|
40
40
|
const elementArray = Children.toArray(children).filter((c) => c !== null);
|
|
41
41
|
|
|
42
42
|
const onItemSelect = useCallback(
|
|
43
|
-
(item: ListRenderItemInfo<any>) => {
|
|
43
|
+
async (item: ListRenderItemInfo<any>): Promise<void> => {
|
|
44
44
|
setSelectedId(item.index);
|
|
45
|
-
onSelectionChange(item);
|
|
45
|
+
await onSelectionChange(item);
|
|
46
46
|
},
|
|
47
47
|
[onSelectionChange]
|
|
48
48
|
);
|
|
49
49
|
|
|
50
|
-
const onItemDeselect = useCallback(() => {
|
|
50
|
+
const onItemDeselect = useCallback(async () => {
|
|
51
51
|
setSelectedId(undefined);
|
|
52
|
-
onSelectionChange(undefined);
|
|
52
|
+
await onSelectionChange(undefined);
|
|
53
53
|
}, [onSelectionChange]);
|
|
54
54
|
|
|
55
55
|
useEffect(() => {
|
|
56
56
|
if (showItemList) {
|
|
57
|
-
onItemDeselect();
|
|
57
|
+
void onItemDeselect();
|
|
58
58
|
}
|
|
59
59
|
}, [showItemList, onItemDeselect]);
|
|
60
60
|
|
|
@@ -71,8 +71,8 @@ export const SplitPage = ({
|
|
|
71
71
|
const renderItem = (itemInfo: ListRenderItemInfo<any>) => {
|
|
72
72
|
return (
|
|
73
73
|
<Box
|
|
74
|
-
onClick={() => {
|
|
75
|
-
onItemSelect(itemInfo);
|
|
74
|
+
onClick={async () => {
|
|
75
|
+
await onItemSelect(itemInfo);
|
|
76
76
|
}}
|
|
77
77
|
>
|
|
78
78
|
{renderListViewItem(itemInfo)}
|
package/src/TapToEdit.tsx
CHANGED
|
@@ -179,9 +179,9 @@ export const TapToEdit = ({
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
const openLink = (): void => {
|
|
182
|
+
const openLink = async (): Promise<void> => {
|
|
183
183
|
if (fieldProps?.type === "url") {
|
|
184
|
-
Linking.openURL(value);
|
|
184
|
+
await Linking.openURL(value);
|
|
185
185
|
}
|
|
186
186
|
};
|
|
187
187
|
|
package/src/index.tsx
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export * from "./Constants";
|
|
2
|
-
export * from "./Common";
|
|
3
|
-
export * from "./MediaQuery";
|
|
4
1
|
export * from "./ActionSheet";
|
|
5
2
|
export * from "./Avatar";
|
|
6
3
|
export * from "./Badge";
|
|
@@ -11,61 +8,63 @@ export * from "./Box";
|
|
|
11
8
|
export * from "./Button";
|
|
12
9
|
export * from "./Card";
|
|
13
10
|
export * from "./CheckBox";
|
|
11
|
+
export * from "./Common";
|
|
12
|
+
export * from "./Constants";
|
|
14
13
|
export * from "./DateTimeActionSheet";
|
|
14
|
+
export * from "./DateTimeField";
|
|
15
|
+
export * from "./DecimalRangeActionSheet";
|
|
15
16
|
export * from "./ErrorBoundary";
|
|
16
17
|
export * from "./ErrorPage";
|
|
17
18
|
export * from "./FernsProvider";
|
|
18
|
-
export * from "./FlatList";
|
|
19
19
|
export * from "./Field";
|
|
20
|
+
export * from "./FlatList";
|
|
20
21
|
export * from "./Form";
|
|
21
22
|
export * from "./HeaderButtons";
|
|
22
23
|
export * from "./Heading";
|
|
24
|
+
export * from "./HeightActionSheet";
|
|
23
25
|
export * from "./Icon";
|
|
24
26
|
export * from "./IconButton";
|
|
25
27
|
export * from "./Image";
|
|
26
28
|
export * from "./ImageBackground";
|
|
27
29
|
export * from "./InfoTooltipButton";
|
|
28
|
-
// export * from "./Layout";
|
|
29
|
-
// export * from "./Drawer";
|
|
30
30
|
export * from "./Link";
|
|
31
31
|
export * from "./Mask";
|
|
32
|
+
export * from "./MediaQuery";
|
|
32
33
|
export * from "./Meta";
|
|
33
34
|
export * from "./MobileAddressAutoComplete";
|
|
34
35
|
export * from "./Modal";
|
|
35
|
-
|
|
36
|
+
export * from "./ModalSheet";
|
|
37
|
+
export * from "./NumberPickerActionSheet";
|
|
36
38
|
export * from "./Page";
|
|
37
39
|
export * from "./Pill";
|
|
40
|
+
export * from "./ProgressBar";
|
|
38
41
|
export * from "./ScrollView";
|
|
39
42
|
export * from "./SegmentedControl";
|
|
40
43
|
export * from "./SelectList";
|
|
41
|
-
export * from "./
|
|
44
|
+
export * from "./SideDrawer";
|
|
42
45
|
export * from "./Spinner";
|
|
46
|
+
export * from "./SplitPage";
|
|
43
47
|
export * from "./Switch";
|
|
48
|
+
export * from "./Table";
|
|
49
|
+
export * from "./TableHeader";
|
|
50
|
+
export * from "./TableHeaderCell";
|
|
51
|
+
export * from "./TableRow";
|
|
44
52
|
export * from "./TapToEdit";
|
|
45
53
|
export * from "./Text";
|
|
46
54
|
export * from "./TextArea";
|
|
47
55
|
export * from "./TextField";
|
|
48
|
-
export * from "./
|
|
56
|
+
export * from "./Theme";
|
|
49
57
|
export * from "./Toast";
|
|
58
|
+
export * from "./Tooltip";
|
|
59
|
+
export * from "./UnifiedAddressAutoComplete";
|
|
50
60
|
export * from "./UnifiedScreens";
|
|
51
61
|
export * from "./Unifier";
|
|
52
|
-
export * from "./UnifiedAddressAutoComplete";
|
|
53
|
-
export * from "./WithLabel";
|
|
54
|
-
export * from "./DecimalRangeActionSheet";
|
|
55
|
-
export * from "./HeightActionSheet";
|
|
56
|
-
export * from "./NumberPickerActionSheet";
|
|
57
|
-
// export * from "./Chart";
|
|
58
|
-
export * from "./ModalSheet";
|
|
59
|
-
export * from "./ProgressBar";
|
|
60
|
-
export * from "./DateTimeField";
|
|
61
|
-
export * from "./SideDrawer";
|
|
62
|
-
export * from "./Table";
|
|
63
|
-
export * from "./TableHeader";
|
|
64
|
-
export * from "./TableHeaderCell";
|
|
65
|
-
export * from "./TableRow";
|
|
66
|
-
export * from "./Theme";
|
|
67
62
|
export * from "./useStoredState";
|
|
68
63
|
export * from "./WebAddressAutocomplete";
|
|
64
|
+
export * from "./WithLabel";
|
|
65
|
+
// export * from "./Layout";
|
|
66
|
+
// export * from "./Drawer";
|
|
67
|
+
// export * from "./Chart";
|
|
69
68
|
|
|
70
69
|
// Lifted from react-native
|
|
71
70
|
type ImageRequireSource = number;
|
package/src/useStoredState.ts
CHANGED