@codeleap/mobile 5.8.21 → 6.1.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/dist/Registry.js.map +1 -1
- package/dist/components/ActionIcon/index.d.ts +2 -3
- package/dist/components/ActionIcon/index.js +5 -11
- package/dist/components/ActionIcon/index.js.map +1 -1
- package/dist/components/ActivityIndicator/index.d.ts +2 -2
- package/dist/components/ActivityIndicator/index.js +2 -2
- package/dist/components/ActivityIndicator/index.js.map +1 -1
- package/dist/components/ActivityIndicator/types.d.ts +0 -1
- package/dist/components/Autocomplete/index.d.ts +2 -3
- package/dist/components/Autocomplete/index.js +15 -18
- package/dist/components/Autocomplete/index.js.map +1 -1
- package/dist/components/Autocomplete/types.d.ts +1 -2
- package/dist/components/Avatar/components/Badge.d.ts +1 -2
- package/dist/components/Avatar/components/Badge.js +2 -2
- package/dist/components/Avatar/components/Badge.js.map +1 -1
- package/dist/components/Avatar/components/Content.d.ts +1 -1
- package/dist/components/Avatar/components/Content.js +3 -7
- package/dist/components/Avatar/components/Content.js.map +1 -1
- package/dist/components/Avatar/components/Illustration.d.ts +1 -2
- package/dist/components/Avatar/components/Illustration.js +2 -5
- package/dist/components/Avatar/components/Illustration.js.map +1 -1
- package/dist/components/Avatar/components/OverlayIcon.d.ts +1 -2
- package/dist/components/Avatar/components/OverlayIcon.js +2 -3
- package/dist/components/Avatar/components/OverlayIcon.js.map +1 -1
- package/dist/components/Avatar/components/Text.d.ts +1 -2
- package/dist/components/Avatar/components/Text.js +2 -1
- package/dist/components/Avatar/components/Text.js.map +1 -1
- package/dist/components/Avatar/components/Wrapper.d.ts +1 -2
- package/dist/components/Avatar/components/Wrapper.js +3 -6
- package/dist/components/Avatar/components/Wrapper.js.map +1 -1
- package/dist/components/Avatar/context.d.ts +108 -111
- package/dist/components/Avatar/context.js.map +1 -1
- package/dist/components/Avatar/index.d.ts +6 -7
- package/dist/components/Avatar/index.js +2 -6
- package/dist/components/Avatar/index.js.map +1 -1
- package/dist/components/AvatarGroup/index.d.ts +2 -3
- package/dist/components/AvatarGroup/index.js +2 -4
- package/dist/components/AvatarGroup/index.js.map +1 -1
- package/dist/components/Backdrop/index.d.ts +2 -3
- package/dist/components/Backdrop/index.js +4 -8
- package/dist/components/Backdrop/index.js.map +1 -1
- package/dist/components/Badge/index.d.ts +2 -3
- package/dist/components/Badge/index.js +5 -9
- package/dist/components/Badge/index.js.map +1 -1
- package/dist/components/Badge/types.d.ts +1 -2
- package/dist/components/Button/index.js +3 -9
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Calendar/index.d.ts +2 -3
- package/dist/components/Calendar/index.js +5 -4
- package/dist/components/Calendar/index.js.map +1 -1
- package/dist/components/CalendarInput/index.d.ts +2 -3
- package/dist/components/CalendarInput/index.js +11 -12
- package/dist/components/CalendarInput/index.js.map +1 -1
- package/dist/components/Checkbox/index.d.ts +2 -3
- package/dist/components/Checkbox/index.js +9 -15
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Collapse/index.d.ts +6 -0
- package/dist/components/Collapse/index.js +42 -0
- package/dist/components/Collapse/index.js.map +1 -0
- package/dist/components/Collapse/types.d.ts +14 -0
- package/dist/components/Collapse/types.js.map +1 -0
- package/dist/components/DatePickerModal/index.d.ts +2 -3
- package/dist/components/DatePickerModal/index.js +13 -21
- package/dist/components/DatePickerModal/index.js.map +1 -1
- package/dist/components/EmptyPlaceholder/components/Button.d.ts +1 -2
- package/dist/components/EmptyPlaceholder/components/Button.js +2 -2
- package/dist/components/EmptyPlaceholder/components/Button.js.map +1 -1
- package/dist/components/EmptyPlaceholder/components/Content.d.ts +1 -1
- package/dist/components/EmptyPlaceholder/components/Content.js +6 -8
- package/dist/components/EmptyPlaceholder/components/Content.js.map +1 -1
- package/dist/components/EmptyPlaceholder/components/Illustration.d.ts +1 -2
- package/dist/components/EmptyPlaceholder/components/Illustration.js +2 -5
- package/dist/components/EmptyPlaceholder/components/Illustration.js.map +1 -1
- package/dist/components/EmptyPlaceholder/components/Info.d.ts +1 -2
- package/dist/components/EmptyPlaceholder/components/Info.js +2 -5
- package/dist/components/EmptyPlaceholder/components/Info.js.map +1 -1
- package/dist/components/EmptyPlaceholder/components/Loading.d.ts +1 -2
- package/dist/components/EmptyPlaceholder/components/Loading.js +3 -4
- package/dist/components/EmptyPlaceholder/components/Loading.js.map +1 -1
- package/dist/components/EmptyPlaceholder/context.d.ts +4 -5
- package/dist/components/EmptyPlaceholder/context.js.map +1 -1
- package/dist/components/EmptyPlaceholder/index.d.ts +5 -6
- package/dist/components/EmptyPlaceholder/index.js +2 -6
- package/dist/components/EmptyPlaceholder/index.js.map +1 -1
- package/dist/components/FileInput/index.d.ts +1 -1
- package/dist/components/FileInput/index.js +1 -1
- package/dist/components/FileInput/index.js.map +1 -1
- package/dist/components/Grid/index.js +11 -10
- package/dist/components/Grid/index.js.map +1 -1
- package/dist/components/Grid/types.d.ts +0 -1
- package/dist/components/Icon/index.d.ts +1 -2
- package/dist/components/Icon/index.js +3 -5
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Image/index.js +9 -15
- package/dist/components/Image/index.js.map +1 -1
- package/dist/components/Image/types.d.ts +1 -2
- package/dist/components/ImageView/Spotlight.d.ts +4 -4
- package/dist/components/ImageView/Spotlight.js +4 -5
- package/dist/components/ImageView/Spotlight.js.map +1 -1
- package/dist/components/ImageView/component.d.ts +1 -2
- package/dist/components/ImageView/component.js +4 -2
- package/dist/components/ImageView/component.js.map +1 -1
- package/dist/components/InputBase/index.js +3 -16
- package/dist/components/InputBase/index.js.map +1 -1
- package/dist/components/InputBase/types.d.ts +3 -4
- package/dist/components/InputBase/useInputBase.d.ts +2 -3
- package/dist/components/InputBase/useInputBase.js +1 -1
- package/dist/components/InputBase/useInputBase.js.map +1 -1
- package/dist/components/InputBase/useInputBasePartialStyles.js.map +1 -1
- package/dist/components/InputOverlay/index.d.ts +3 -4
- package/dist/components/InputOverlay/index.js +6 -21
- package/dist/components/InputOverlay/index.js.map +1 -1
- package/dist/components/InputOverlay/store.js.map +1 -1
- package/dist/components/List/index.js +5 -4
- package/dist/components/List/index.js.map +1 -1
- package/dist/components/List/types.d.ts +0 -1
- package/dist/components/LoadingOverlay/index.d.ts +2 -3
- package/dist/components/LoadingOverlay/index.js +5 -7
- package/dist/components/LoadingOverlay/index.js.map +1 -1
- package/dist/components/Modal/index.d.ts +2 -3
- package/dist/components/Modal/index.js +13 -39
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/types.d.ts +0 -1
- package/dist/components/NumberIncrement/index.js +5 -7
- package/dist/components/NumberIncrement/index.js.map +1 -1
- package/dist/components/NumberIncrement/useNumberIncrement.d.ts +3 -4
- package/dist/components/NumberIncrement/useNumberIncrement.js.map +1 -1
- package/dist/components/Pager/PagerDots.d.ts +1 -2
- package/dist/components/Pager/PagerDots.js +3 -6
- package/dist/components/Pager/PagerDots.js.map +1 -1
- package/dist/components/Pager/PagerItem.d.ts +1 -2
- package/dist/components/Pager/PagerItem.js +3 -2
- package/dist/components/Pager/PagerItem.js.map +1 -1
- package/dist/components/Pager/index.d.ts +2 -3
- package/dist/components/Pager/index.js +9 -16
- package/dist/components/Pager/index.js.map +1 -1
- package/dist/components/Pager/types.d.ts +2 -2
- package/dist/components/PaginationIndicator/index.d.ts +2 -3
- package/dist/components/PaginationIndicator/index.js +3 -3
- package/dist/components/PaginationIndicator/index.js.map +1 -1
- package/dist/components/PaginationIndicator/types.d.ts +2 -3
- package/dist/components/PlacesAutocomplete/index.d.ts +6 -7
- package/dist/components/PlacesAutocomplete/index.js +11 -17
- package/dist/components/PlacesAutocomplete/index.js.map +1 -1
- package/dist/components/PlacesAutocomplete/types.d.ts +3 -4
- package/dist/components/RadioInput/index.d.ts +2 -3
- package/dist/components/RadioInput/index.js +4 -22
- package/dist/components/RadioInput/index.js.map +1 -1
- package/dist/components/RefreshControl/index.d.ts +2 -3
- package/dist/components/RefreshControl/index.js +2 -2
- package/dist/components/RefreshControl/index.js.map +1 -1
- package/dist/components/Scroll/index.d.ts +2 -3
- package/dist/components/Scroll/index.js +9 -12
- package/dist/components/Scroll/index.js.map +1 -1
- package/dist/components/SearchInput/index.d.ts +7 -4
- package/dist/components/SearchInput/index.js +4 -3
- package/dist/components/SearchInput/index.js.map +1 -1
- package/dist/components/SectionFilters/context.d.ts +3 -24
- package/dist/components/SectionFilters/index.d.ts +1 -2
- package/dist/components/SectionFilters/index.js +5 -7
- package/dist/components/SectionFilters/index.js.map +1 -1
- package/dist/components/SectionFilters/useSectionFilters.js.map +1 -1
- package/dist/components/Sections/index.d.ts +2 -3
- package/dist/components/Sections/index.js +5 -4
- package/dist/components/Sections/index.js.map +1 -1
- package/dist/components/Sections/types.d.ts +0 -1
- package/dist/components/SegmentedControl/Option.d.ts +1 -1
- package/dist/components/SegmentedControl/Option.js +7 -13
- package/dist/components/SegmentedControl/Option.js.map +1 -1
- package/dist/components/SegmentedControl/index.js +16 -26
- package/dist/components/SegmentedControl/index.js.map +1 -1
- package/dist/components/SegmentedControl/types.d.ts +2 -3
- package/dist/components/Select/index.d.ts +2 -3
- package/dist/components/Select/index.js +20 -25
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Select/types.d.ts +2 -3
- package/dist/components/Slider/index.d.ts +2 -3
- package/dist/components/Slider/index.js +23 -38
- package/dist/components/Slider/index.js.map +1 -1
- package/dist/components/Slider/types.d.ts +0 -1
- package/dist/components/SortablePhotos/index.d.ts +2 -3
- package/dist/components/SortablePhotos/index.js +7 -18
- package/dist/components/SortablePhotos/index.js.map +1 -1
- package/dist/components/SortablePhotos/useSortablePhotos.d.ts +0 -2
- package/dist/components/SortablePhotos/useSortablePhotos.js.map +1 -1
- package/dist/components/Switch/index.d.ts +2 -3
- package/dist/components/Switch/index.js +9 -13
- package/dist/components/Switch/index.js.map +1 -1
- package/dist/components/Tabs/Context.d.ts +2 -3
- package/dist/components/Tabs/Context.js +2 -1
- package/dist/components/Tabs/Context.js.map +1 -1
- package/dist/components/Tabs/Panel.d.ts +1 -1
- package/dist/components/Tabs/Panel.js +3 -5
- package/dist/components/Tabs/Panel.js.map +1 -1
- package/dist/components/Tabs/Tab.d.ts +1 -2
- package/dist/components/Tabs/Tab.js +12 -16
- package/dist/components/Tabs/Tab.js.map +1 -1
- package/dist/components/Tabs/TabList.d.ts +1 -2
- package/dist/components/Tabs/TabList.js +2 -1
- package/dist/components/Tabs/TabList.js.map +1 -1
- package/dist/components/Tabs/index.d.ts +197 -192
- package/dist/components/Tabs/index.js +2 -6
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Text/index.js +5 -7
- package/dist/components/Text/index.js.map +1 -1
- package/dist/components/Text/types.d.ts +2 -2
- package/dist/components/TextInput/index.js +13 -14
- package/dist/components/TextInput/index.js.map +1 -1
- package/dist/components/TextInput/types.d.ts +0 -1
- package/dist/components/TextInput/useTextInput.d.ts +2 -3
- package/dist/components/TimeInput/index.d.ts +2 -3
- package/dist/components/TimeInput/index.js +8 -12
- package/dist/components/TimeInput/index.js.map +1 -1
- package/dist/components/Touchable/index.js +5 -10
- package/dist/components/Touchable/index.js.map +1 -1
- package/dist/components/Touchable/types.d.ts +0 -1
- package/dist/components/View/index.d.ts +4 -6
- package/dist/components/View/index.js +4 -3
- package/dist/components/View/index.js.map +1 -1
- package/dist/components/View/types.d.ts +2 -3
- package/dist/components/components.d.ts +1 -0
- package/dist/components/components.js +1 -0
- package/dist/components/components.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/modules/PressableRipple/ripple.d.ts +2 -2
- package/dist/modules/PressableRipple/ripple.js +4 -11
- package/dist/modules/PressableRipple/ripple.js.map +1 -1
- package/dist/modules/PressableRipple/styles.d.ts +5 -5
- package/dist/modules/backgroundTimer.js.map +1 -1
- package/dist/modules/reactNavigation.js.map +1 -1
- package/dist/modules/scroll.d.ts +3 -3
- package/dist/modules/scroll.js +3 -4
- package/dist/modules/scroll.js.map +1 -1
- package/dist/modules/textInputMask.d.ts +1 -2
- package/dist/types/index.d.ts +2 -3
- package/dist/types/utility.d.ts +2 -2
- package/dist/utils/NotificationManager/index.js.map +1 -1
- package/dist/utils/OSAlert.js.map +1 -1
- package/dist/utils/StorageManager.js.map +1 -1
- package/dist/utils/Subscription.js.map +1 -1
- package/dist/utils/hooks.d.ts +3 -3
- package/dist/utils/hooks.js.map +1 -1
- package/dist/utils/input.d.ts +1 -1
- package/dist/utils/input.js.map +1 -1
- package/dist/utils/misc.d.ts +0 -1
- package/dist/utils/misc.js.map +1 -1
- package/dist/utils/useQueryListRefresh.js.map +1 -1
- package/package.json +30 -32
- package/package.json.bak +14 -16
- package/src/components/Autocomplete/types.ts +1 -1
- package/src/components/Badge/types.ts +1 -1
- package/src/components/Collapse/index.tsx +70 -0
- package/src/components/Collapse/types.ts +16 -0
- package/src/components/FileInput/index.tsx +2 -2
- package/src/components/Image/types.ts +1 -1
- package/src/components/ImageView/Spotlight.tsx +2 -2
- package/src/components/ImageView/component.tsx +1 -0
- package/src/components/InputBase/types.ts +3 -3
- package/src/components/InputBase/useInputBase.ts +1 -1
- package/src/components/Pager/PagerItem.tsx +1 -1
- package/src/components/Pager/index.tsx +1 -0
- package/src/components/Pager/types.ts +1 -1
- package/src/components/PaginationIndicator/types.ts +2 -2
- package/src/components/PlacesAutocomplete/types.ts +3 -3
- package/src/components/Scroll/index.tsx +1 -1
- package/src/components/SearchInput/index.tsx +7 -3
- package/src/components/SectionFilters/index.tsx +1 -1
- package/src/components/SegmentedControl/types.ts +2 -2
- package/src/components/Select/types.ts +2 -2
- package/src/components/Slider/index.tsx +1 -0
- package/src/components/Text/types.ts +2 -2
- package/src/components/View/index.tsx +1 -1
- package/src/components/View/types.ts +2 -2
- package/src/components/components.ts +2 -1
- package/src/index.ts +0 -1
- package/src/modules/scroll.tsx +1 -1
- package/src/types/index.ts +2 -2
- package/src/types/utility.ts +2 -2
- package/src/utils/hooks.ts +3 -3
- package/dist/deprecated/index.d.ts +0 -2
- package/dist/deprecated/index.js +0 -5
- package/dist/deprecated/index.js.map +0 -1
- package/dist/deprecated/modals/Context.d.ts +0 -48
- package/dist/deprecated/modals/Context.js +0 -187
- package/dist/deprecated/modals/Context.js.map +0 -1
- package/dist/deprecated/modals/components.d.ts +0 -15
- package/dist/deprecated/modals/components.js +0 -53
- package/dist/deprecated/modals/components.js.map +0 -1
- package/dist/deprecated/modals/index.d.ts +0 -10
- package/dist/deprecated/modals/index.js +0 -9
- package/dist/deprecated/modals/index.js.map +0 -1
- package/dist/deprecated/permissions/Context.d.ts +0 -53
- package/dist/deprecated/permissions/Context.js +0 -208
- package/dist/deprecated/permissions/Context.js.map +0 -1
- package/dist/deprecated/permissions/index.d.ts +0 -5
- package/dist/deprecated/permissions/index.js +0 -4
- package/dist/deprecated/permissions/index.js.map +0 -1
- package/dist/deprecated/permissions/package/Manager.d.ts +0 -23
- package/dist/deprecated/permissions/package/Manager.js +0 -84
- package/dist/deprecated/permissions/package/Manager.js.map +0 -1
- package/dist/deprecated/permissions/package/Permission.d.ts +0 -19
- package/dist/deprecated/permissions/package/Permission.js +0 -65
- package/dist/deprecated/permissions/package/Permission.js.map +0 -1
- package/dist/deprecated/permissions/package/index.d.ts +0 -3
- package/dist/deprecated/permissions/package/index.js +0 -5
- package/dist/deprecated/permissions/package/index.js.map +0 -1
- package/dist/deprecated/permissions/package/types.d.ts +0 -31
- package/dist/deprecated/permissions/package/types.js +0 -2
- package/dist/deprecated/permissions/package/types.js.map +0 -1
- package/dist/deprecated/permissions/types.d.ts +0 -16
- package/dist/deprecated/permissions/types.js.map +0 -1
- package/mobile-packages.code-workspace +0 -27
- package/src/deprecated/index.ts +0 -2
- package/src/deprecated/modals/Context.tsx +0 -259
- package/src/deprecated/modals/components.tsx +0 -84
- package/src/deprecated/modals/index.ts +0 -13
- package/src/deprecated/permissions/Context.tsx +0 -316
- package/src/deprecated/permissions/index.ts +0 -16
- package/src/deprecated/permissions/package/Manager.ts +0 -123
- package/src/deprecated/permissions/package/Permission.ts +0 -79
- package/src/deprecated/permissions/package/index.ts +0 -3
- package/src/deprecated/permissions/package/types.ts +0 -43
- package/src/deprecated/permissions/types.ts +0 -27
- /package/dist/{deprecated/permissions → components/Collapse}/types.js +0 -0
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { EmptyPlaceholderProps } from './types';
|
|
3
2
|
import { AnyRecord, IJSX, StyledComponentProps } from '@codeleap/styles';
|
|
4
3
|
export * from './styles';
|
|
5
4
|
export * from './types';
|
|
6
5
|
export declare const EmptyPlaceholder: {
|
|
7
|
-
(props: EmptyPlaceholderProps): JSX.Element;
|
|
6
|
+
(props: EmptyPlaceholderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
styleRegistryName: string;
|
|
9
8
|
elements: string[];
|
|
10
9
|
rootElement: string;
|
|
11
|
-
Info: (props: import("./types").EmptyPlaceholderInfoProps) => JSX.Element;
|
|
12
|
-
Button: (props: import("./types").EmptyPlaceholderButtonProps) => JSX.Element;
|
|
13
|
-
Illustration: (props: import("./types").EmptyPlaceholderIllustrationProps) => JSX.Element;
|
|
14
|
-
withVariantTypes<S extends AnyRecord>(styles: S): ((props: StyledComponentProps<EmptyPlaceholderProps,
|
|
10
|
+
Info: (props: import("./types").EmptyPlaceholderInfoProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
Button: (props: import("./types").EmptyPlaceholderButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
Illustration: (props: import("./types").EmptyPlaceholderIllustrationProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
withVariantTypes<S extends AnyRecord>(styles: S): ((props: StyledComponentProps<EmptyPlaceholderProps, typeof styles>) => IJSX) & Pick<typeof EmptyPlaceholder, "Button" | "Illustration" | "Info">;
|
|
15
14
|
defaultProps: Partial<EmptyPlaceholderProps>;
|
|
16
15
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { MobileStyleRegistry } from '../../Registry';
|
|
3
3
|
import { useStylesFor } from '../../hooks';
|
|
4
4
|
import { EmptyPlaceholderContext } from './context';
|
|
@@ -14,11 +14,7 @@ export const EmptyPlaceholder = (props) => {
|
|
|
14
14
|
...props,
|
|
15
15
|
};
|
|
16
16
|
const styles = useStylesFor(EmptyPlaceholder.styleRegistryName, style);
|
|
17
|
-
return (
|
|
18
|
-
<EmptyPlaceholderContent>
|
|
19
|
-
{children}
|
|
20
|
-
</EmptyPlaceholderContent>
|
|
21
|
-
</EmptyPlaceholderContext.Provider>);
|
|
17
|
+
return (_jsx(EmptyPlaceholderContext.Provider, { value: { ...contextValue, styles }, children: _jsx(EmptyPlaceholderContent, { children: children }) }));
|
|
22
18
|
};
|
|
23
19
|
EmptyPlaceholder.styleRegistryName = 'EmptyPlaceholder';
|
|
24
20
|
EmptyPlaceholder.elements = ['wrapper', 'loader', 'title', 'description', 'image', 'icon'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/EmptyPlaceholder/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/EmptyPlaceholder/index.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAEvB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;IAC/D,MAAM,EACJ,QAAQ,EACR,KAAK,EACL,GAAG,YAAY,EAChB,GAAG;QACF,GAAG,gBAAgB,CAAC,YAAY;QAChC,GAAG,KAAK;KACT,CAAA;IAED,MAAM,MAAM,GAAG,YAAY,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAA;IAEtE,OAAO,CACL,KAAC,uBAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,GAAG,YAAY,EAAE,MAAM,EAAE,YAClE,KAAC,uBAAuB,cACrB,QAAQ,GACe,GACO,CACpC,CAAA;AACH,CAAC,CAAA;AAED,gBAAgB,CAAC,iBAAiB,GAAG,kBAAkB,CAAA;AACvD,gBAAgB,CAAC,QAAQ,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;AAC1F,gBAAgB,CAAC,WAAW,GAAG,SAAS,CAAA;AAExC,gBAAgB,CAAC,IAAI,GAAG,oBAAoB,CAAA;AAC5C,gBAAgB,CAAC,MAAM,GAAG,sBAAsB,CAAA;AAChD,gBAAgB,CAAC,YAAY,GAAG,4BAA4B,CAAA;AAE5D,gBAAgB,CAAC,gBAAgB,GAAG,CAAsB,MAAS,EAAE,EAAE;IACrE,OAAO,gBAAqK,CAAA;AAC9K,CAAC,CAAA;AAED,gBAAgB,CAAC,YAAY,GAAG;IAC9B,KAAK,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,QAAQ,CAAC;CACR,CAAA;AAEnC,mBAAmB,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAA"}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Options } from 'react-native-image-crop-picker';
|
|
3
3
|
import { FileInputImageSource, FileInputProps, FileInputRef, FileResult } from './types';
|
|
4
4
|
export * from './types';
|
|
5
|
-
export declare const FileInput: ((props: FileInputProps) =>
|
|
5
|
+
export declare const FileInput: ((props: FileInputProps) => React.ReactElement) & {
|
|
6
6
|
defaultProps: Partial<FileInputProps>;
|
|
7
7
|
};
|
|
8
8
|
export declare const useFileInput: () => {
|
|
@@ -26,7 +26,7 @@ const _FileInput = forwardRef((fileInputProps, ref) => {
|
|
|
26
26
|
...fileInputProps,
|
|
27
27
|
...FileInput.defaultProps,
|
|
28
28
|
};
|
|
29
|
-
const resolveWithFile = useRef();
|
|
29
|
+
const resolveWithFile = useRef(undefined);
|
|
30
30
|
const handleResolve = (files) => {
|
|
31
31
|
if (resolveWithFile.current) {
|
|
32
32
|
resolveWithFile?.current?.(files);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FileInput/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,eAA0C,MAAM,gCAAgC,CAAA;AAEvF,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,cAAc,SAAS,CAAA;AAEvB,MAAM,cAAc,GAAG;IACrB,QAAQ,EAAE,IAAI;CACf,CAAA;AAED,SAAS,eAAe,CAAC,IAAkB;IACzC,MAAM,YAAY,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAEjD,MAAM,IAAI,GAAe;QACvB,GAAG,IAAI;QACP,IAAI,EAAE,YAAY,CAAC,IAAI;QACvB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,GAAG,EAAE,IAAI,CAAC,IAAI;QACd,WAAW,EAAE,IAAI,CAAC,IAAI;KACvB,CAAA;IAED,OAAO;QACL,IAAI;QACJ,OAAO,EAAE,IAAI,CAAC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AE,CAAC,CAAC;QAC9B,cAAc,EAAE,CAAC,cAAoC,IAAI,EAAE,UAA4B,EAAE,EAAE,EAAE;YAC3F,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,CAAA;YACpC,OAAO,IAAI,OAAO,CAAe,CAAC,OAAO,EAAE,EAAE;gBAC3C,eAAe,CAAC,OAAO,GAAG,OAAO,CAAA;YACnC,CAAC,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAC,CAAA;IAEH,OAAO,IAAI,CAAA;AACb,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,UAAoH,CAAA;AAE7I,SAAS,CAAC,YAAY,GAAG,EAAE,CAAA;AAE3B,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,QAAQ,GAAG,MAAM,CAAe,IAAI,CAAC,CAAA;IAE3C,MAAM,cAAc,GAAG,CAAC,cAAoC,IAAI,EAAE,UAA4B,EAAE,EAAyB,EAAE;QACzH,OAAO,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,CAAA;IAC/D,CAAC,CAAA;IAED,OAAO;QACL,cAAc;QACd,GAAG,EAAE,QAAgD;KACtD,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, forwardRef } from 'react';
|
|
2
3
|
import { View } from '../View';
|
|
3
4
|
import { EmptyPlaceholder } from '../EmptyPlaceholder';
|
|
4
5
|
import { RefreshControl } from '../RefreshControl';
|
|
@@ -10,7 +11,7 @@ import { TypeGuards } from '@codeleap/types';
|
|
|
10
11
|
export * from './styles';
|
|
11
12
|
export * from './types';
|
|
12
13
|
const RenderSeparator = (props) => {
|
|
13
|
-
return
|
|
14
|
+
return _jsx(View, { style: props.separatorStyles });
|
|
14
15
|
};
|
|
15
16
|
export const Grid = forwardRef((flatGridProps, ref) => {
|
|
16
17
|
const { style, onRefresh, refreshing, placeholder, refreshControlProps = {}, spacing, numColumns, renderItem: providedRenderItem, ...props } = {
|
|
@@ -36,19 +37,19 @@ export const Grid = forwardRef((flatGridProps, ref) => {
|
|
|
36
37
|
else if (isOnlyInRow)
|
|
37
38
|
gap = themeSpacing?.marginHorizontal?.(spacing / 2);
|
|
38
39
|
const _itemProps = { isFirst, isLast, isOnly, isFirstInRow, isLastInRow, isOnlyInRow };
|
|
39
|
-
return (
|
|
40
|
-
{providedRenderItem({
|
|
40
|
+
return (_jsx(View, { style: [styles.itemWrapper, gap], children: providedRenderItem({
|
|
41
41
|
...data,
|
|
42
42
|
..._itemProps
|
|
43
|
-
})}
|
|
44
|
-
</View>);
|
|
43
|
+
}) }));
|
|
45
44
|
}, [providedRenderItem, props?.data?.length]);
|
|
46
45
|
const separatorStyles = { height: themeSpacing?.value?.(spacing), ...styles.separator };
|
|
47
|
-
const separator = props?.separators || (!!spacing ?
|
|
48
|
-
const refreshControl = TypeGuards.isFunction(onRefresh) ?
|
|
49
|
-
return (
|
|
46
|
+
const separator = props?.separators || (!!spacing ? _jsx(RenderSeparator, { separatorStyles: separatorStyles }) : null);
|
|
47
|
+
const refreshControl = TypeGuards.isFunction(onRefresh) ? _jsx(RefreshControl, { refreshing: refreshing, onRefresh: onRefresh, ...refreshControlProps }) : null;
|
|
48
|
+
return (_jsx(List
|
|
50
49
|
// @ts-expect-error
|
|
51
|
-
|
|
50
|
+
, {
|
|
51
|
+
// @ts-expect-error
|
|
52
|
+
ref: ref, ...props, ListEmptyComponent: _jsx(EmptyPlaceholder, { ...placeholder }), ListHeaderComponentStyle: styles.header, ListFooterComponentStyle: styles.footer, ItemSeparatorComponent: separator, refreshControl: refreshControl, style: styles.wrapper, contentContainerStyle: [styles.content, props?.contentContainerStyle], showsVerticalScrollIndicator: false, numColumns: numColumns, renderItem: renderItem }));
|
|
52
53
|
});
|
|
53
54
|
Grid.styleRegistryName = 'Grid';
|
|
54
55
|
Grid.elements = ['wrapper', 'content', 'separator', 'header', 'refreshControl', 'itemWrapper', 'footer'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Grid/index.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Grid/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,UAAU,EAAiB,MAAM,OAAO,CAAA;AAErE,OAAO,EAAE,IAAI,EAAa,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAA;AAExC,OAAO,EAAmE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC5G,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAEvB,MAAM,eAAe,GAAG,CAAC,KAA8C,EAAE,EAAE;IACzE,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,eAAe,GAAI,CAAA;AAC/C,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAsB,CAAC,aAAa,EAAE,GAAG,EAAE,EAAE;IACzE,MAAM,EACJ,KAAK,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,mBAAmB,GAAG,EAAE,EACxB,OAAO,EACP,UAAU,EACV,UAAU,EAAE,kBAAkB,EAC9B,GAAG,KAAK,EACT,GAAG;QACF,GAAG,IAAI,CAAC,YAAY;QACpB,GAAG,aAAa;KACjB,CAAA;IAED,MAAM,Y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CAAC,CAAwC,CAAA;AAEzC,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAA;AAC/B,IAAI,CAAC,QAAQ,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAA;AACxG,IAAI,CAAC,WAAW,GAAG,SAAS,CAAA;AAE5B,IAAI,CAAC,gBAAgB,GAAG,CAAsB,MAAS,EAAE,EAAE;IACzD,OAAO,IAAgG,CAAA;AACzG,CAAC,CAAA;AAED,IAAI,CAAC,YAAY,GAAG;IAClB,yBAAyB,EAAE,SAAS;IACpC,mBAAmB,EAAE,EAAE;CACF,CAAA;AAEvB,mBAAmB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IconProps } from './types';
|
|
3
2
|
import { StyledComponentWithProps } from '@codeleap/styles';
|
|
4
3
|
export * from './styles';
|
|
5
4
|
export * from './types';
|
|
6
|
-
export declare const IconComponent: (props: IconProps) => JSX.Element;
|
|
5
|
+
export declare const IconComponent: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export declare const Icon: StyledComponentWithProps<IconProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { TypeGuards } from '@codeleap/types';
|
|
3
4
|
import { arePropsEqual } from '@codeleap/utils';
|
|
@@ -30,12 +31,9 @@ export const IconComponent = (props) => {
|
|
|
30
31
|
// @ts-expect-error
|
|
31
32
|
width: styles.icon?.size || styles.icon?.width || props?.size,
|
|
32
33
|
};
|
|
33
|
-
return
|
|
34
|
-
<Component {...otherProps} style={styles.icon} source={source}/>
|
|
35
|
-
<Badge style={badgeStyles} badge={badge} {...badgeProps}/>
|
|
36
|
-
</View>;
|
|
34
|
+
return _jsxs(View, { ...wrapperProps, style: [sized, styles.iconBadgeWrapper], children: [_jsx(Component, { ...otherProps, style: styles.icon, source: source }), _jsx(Badge, { style: badgeStyles, badge: badge, ...badgeProps })] });
|
|
37
35
|
}
|
|
38
|
-
return
|
|
36
|
+
return _jsx(Component, { ...otherProps, style: styles.icon, source: source });
|
|
39
37
|
};
|
|
40
38
|
function areEqual(prevProps, nextProps) {
|
|
41
39
|
const check = ['name', 'style', 'renderEmptySpace', 'badgeProps', 'badge'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,OAAO,EAAE,oBAAoB,EAAyC,QAAQ,EAA4B,MAAM,kBAAkB,CAAA;AAClI,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAEvB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAgB,EAAE,EAAE;IAChD,MAAM,EACJ,IAAI,EACJ,KAAK,EACL,KAAK,EACL,UAAU,GAAG,EAAE,EACf,YAAY,GAAG,EAAE,EACjB,MAAM,EACN,GAAG,UAAU,EACd,GAAG;QACF,GAAG,IAAI,CAAC,YAAY;QACpB,GAAG,KAAK;KACT,CAAA;IAED,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;IAE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AA;IAC1D,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAwC,CAAA;AAE9F,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAA;AAC/B,IAAI,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAA;AACrD,IAAI,CAAC,WAAW,GAAG,MAAM,CAAA;AAEzB,IAAI,CAAC,YAAY,GAAG;IAClB,KAAK,EAAE,KAAK;CACS,CAAA;AAEvB,IAAI,CAAC,gBAAgB,GAAG,CAAsB,MAAS,EAAE,EAAE;IACzD,OAAO,IAAuE,CAAA;AAChF,CAAC,CAAA;AAED,mBAAmB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { TypeGuards } from '@codeleap/types';
|
|
3
4
|
import { arePropsEqual } from '@codeleap/utils';
|
|
@@ -27,7 +28,7 @@ export const Image = React.memo((props) => {
|
|
|
27
28
|
imSource = { uri: source };
|
|
28
29
|
}
|
|
29
30
|
const spotlightActions = useImageSpotlight(spotlight, props.source);
|
|
30
|
-
const Wrapper = !!spotlight ? Touchable : ({ children }) =>
|
|
31
|
+
const Wrapper = !!spotlight ? Touchable : ({ children }) => _jsx(_Fragment, { children: children });
|
|
31
32
|
const wrapperProps = {
|
|
32
33
|
onPress: spotlightActions.onImagePressed,
|
|
33
34
|
debugName: `Press spotlight image ${props.source}`,
|
|
@@ -73,23 +74,16 @@ export const Image = React.memo((props) => {
|
|
|
73
74
|
const showLoading = !!withLoadingOverlay;
|
|
74
75
|
const overlayStyle = useNestedStylesByKey('overlay', styles);
|
|
75
76
|
const loadingElement = React.useMemo(() => {
|
|
76
|
-
return showLoading ? (
|
|
77
|
+
return showLoading ? (_jsx(Loading, { visible: loading, style: overlayStyle })) : null;
|
|
77
78
|
}, [showLoading, loading]);
|
|
78
79
|
if (fast) {
|
|
79
|
-
return (
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
source={imSource} resizeMode={FastImage.resizeMode[resizeMode || 'contain']} {...loadProps.current} {...imageProps}/>
|
|
85
|
-
{loadingElement}
|
|
86
|
-
</Wrapper>);
|
|
80
|
+
return (_jsxs(Wrapper, { ...wrapperProps, children: [_jsx(FastImage, { style: [aspectRatioStyle, styles.wrapper],
|
|
81
|
+
// @ts-ignore
|
|
82
|
+
tintColor: styles?.wrapper?.tintColor,
|
|
83
|
+
// @ts-ignore
|
|
84
|
+
source: imSource, resizeMode: FastImage.resizeMode[resizeMode || 'contain'], ...loadProps.current, ...imageProps }), loadingElement] }));
|
|
87
85
|
}
|
|
88
|
-
return (
|
|
89
|
-
<NativeImage resizeMode={resizeMode} source={imSource} {...imageProps} {...loadProps.current} style={[aspectRatioStyle, styles.wrapper]}/>
|
|
90
|
-
|
|
91
|
-
{loadingElement}
|
|
92
|
-
</Wrapper>);
|
|
86
|
+
return (_jsxs(Wrapper, { ...wrapperProps, children: [_jsx(NativeImage, { resizeMode: resizeMode, source: imSource, ...imageProps, ...loadProps.current, style: [aspectRatioStyle, styles.wrapper] }), loadingElement] }));
|
|
93
87
|
}, (prevProps, nextProps) => {
|
|
94
88
|
const equal = arePropsEqual(prevProps, nextProps, { check: ['source', 'style', 'resizeMode', 'fast'] });
|
|
95
89
|
return equal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Image/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,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B,UAAU,GACd,EACD,cAAc,IACP,CACX,CAAA;IACH,CAAC;IAED,OAAO,CACL,MAAC,OAAO,OAAK,YAAY,aACvB,KAAC,WAAW,IACV,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,QAAQ,KACX,UAAkB,KACnB,SAAS,CAAC,OAAO,EACrB,KAAK,EAAE,CAAC,gBAAgB,EAAE,MAAM,CAAC,OAAO,CAAC,GACzC,EAED,cAAc,IACP,CACX,CAAA;AACH,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE;IAC1B,MAAM,KAAK,GAAG,aAAa,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC,CAAA;IACvG,OAAO,KAAK,CAAA;AACd,CAAC,CAAyC,CAAA;AAE1C,KAAK,CAAC,iBAAiB,GAAG,OAAO,CAAA;AACjC,KAAK,CAAC,QAAQ,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAA;AACpD,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;AAE7B,KAAK,CAAC,gBAAgB,GAAG,CAAsB,MAAS,EAAE,EAAE;IAC1D,OAAO,KAAyE,CAAA;AAClF,CAAC,CAAA;AAED,KAAK,CAAC,YAAY,GAAG;IACnB,IAAI,EAAE,IAAI;IACV,UAAU,EAAE,SAAS;IACrB,kBAAkB,EAAE,KAAK;IACzB,mBAAmB,EAAE,IAAI;CAC1B,CAAA;AAED,mBAAmB,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAA"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { LoadingOverlayProps } from '../LoadingOverlay';
|
|
3
2
|
import FastImage, { FastImageProps } from '@d11/react-native-fast-image';
|
|
4
3
|
import { ImageComposition } from './styles';
|
|
@@ -10,6 +9,6 @@ export type ImageProps = Omit<FastImageProps, 'style' | 'resizeMode'> & {
|
|
|
10
9
|
resizeMode?: keyof typeof FastImage.resizeMode;
|
|
11
10
|
spotlight?: string;
|
|
12
11
|
maintainAspectRatio?: boolean;
|
|
13
|
-
withLoadingOverlay?: boolean | ((props: LoadingOverlayProps) =>
|
|
12
|
+
withLoadingOverlay?: boolean | ((props: LoadingOverlayProps) => React.ReactElement);
|
|
14
13
|
touchProps?: Partial<TouchableProps>;
|
|
15
14
|
};
|
|
@@ -18,7 +18,7 @@ export declare function useSpotlight(name: string): {
|
|
|
18
18
|
close(): void;
|
|
19
19
|
clear(): void;
|
|
20
20
|
};
|
|
21
|
-
export declare const useImageSpotlight: (name: string | null, src: ImageProps[
|
|
21
|
+
export declare const useImageSpotlight: (name: string | null, src: ImageProps["source"]) => {
|
|
22
22
|
onImagePressed: () => void;
|
|
23
23
|
};
|
|
24
24
|
export type SpotlightHeaderComponent = {
|
|
@@ -33,9 +33,9 @@ export type SpootlightFooterComponent = React.ComponentType<{
|
|
|
33
33
|
type FooterComponentProps = SpotlightHeaderComponent;
|
|
34
34
|
export type SpotlightProps = {
|
|
35
35
|
name?: string;
|
|
36
|
-
HeaderComponent?: (props: SpotlightHeaderComponent) =>
|
|
37
|
-
FooterComponent?: (props: FooterComponentProps) =>
|
|
36
|
+
HeaderComponent?: (props: SpotlightHeaderComponent) => React.ReactElement;
|
|
37
|
+
FooterComponent?: (props: FooterComponentProps) => React.ReactElement;
|
|
38
38
|
showFooter?: boolean;
|
|
39
39
|
} & ImageViewProps;
|
|
40
|
-
export declare const Spotlight: (props: SpotlightProps) => JSX.Element;
|
|
40
|
+
export declare const Spotlight: (props: SpotlightProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
41
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import React, { useContext, useState } from 'react';
|
|
2
3
|
import { TypeGuards } from '@codeleap/types';
|
|
3
4
|
import { onUpdate, usePrevious, useUnmount } from '@codeleap/hooks';
|
|
@@ -16,9 +17,7 @@ export const SpotlightProvider = ({ children }) => {
|
|
|
16
17
|
indexes,
|
|
17
18
|
setIndexes,
|
|
18
19
|
};
|
|
19
|
-
return
|
|
20
|
-
{children}
|
|
21
|
-
</SpotlightCtx.Provider>;
|
|
20
|
+
return _jsx(SpotlightCtx.Provider, { value: ctxValue, children: children });
|
|
22
21
|
};
|
|
23
22
|
export function useSpotlight(name) {
|
|
24
23
|
const ctx = useContext(SpotlightCtx);
|
|
@@ -111,7 +110,7 @@ export const useImageSpotlight = (name, src) => {
|
|
|
111
110
|
},
|
|
112
111
|
};
|
|
113
112
|
};
|
|
114
|
-
const DefaultFooterComponent = ({ imageIndex, imagesLength }) => (
|
|
113
|
+
const DefaultFooterComponent = ({ imageIndex, imagesLength }) => (_jsx(View, { children: _jsx(Text, { text: imageIndex + 1 + '/' + imagesLength }) }));
|
|
115
114
|
export const Spotlight = (props) => {
|
|
116
115
|
const { name, HeaderComponent, showFooter, FooterComponent, ...rest } = props;
|
|
117
116
|
const spotlight = useSpotlight(name);
|
|
@@ -119,6 +118,6 @@ export const Spotlight = (props) => {
|
|
|
119
118
|
spotlight.clear();
|
|
120
119
|
});
|
|
121
120
|
const Footer = showFooter ? FooterComponent || DefaultFooterComponent : (() => null);
|
|
122
|
-
return
|
|
121
|
+
return _jsx(ImageView, { imageIndex: spotlight.currentIndex, images: spotlight.images.map(x => x.source), keyExtractor: (_, index) => index.toString(), onRequestClose: spotlight.close, visible: typeof spotlight.currentIndex !== 'undefined', ...rest, FooterComponent: ({ imageIndex }) => _jsx(Footer, { imageIndex: imageIndex, spotlight: spotlight, imagesLength: spotlight.images.length }), HeaderComponent: !!HeaderComponent ? ({ imageIndex }) => _jsx(HeaderComponent, { spotlight: spotlight, imageIndex: imageIndex }) : undefined });
|
|
123
122
|
};
|
|
124
123
|
//# sourceMappingURL=Spotlight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spotlight.js","sourceRoot":"","sources":["../../../src/components/ImageView/Spotlight.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,EAAc,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,IAAI,MAAM,mBAAmB,CAAA;AACpC,OAAO,EAAE,SAAS,EAAkB,MAAM,aAAa,CAAA;AAGvD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAqB9B,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC,EAAmB,CAAC,CAAA;AAE7D,MAAM,CAAC,MAAM,iBAAiB,GAA2C,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAA8B,EAAE,CAAC,CAAA;IAC7E,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAA2B,EAAE,CAAC,CAAA;IACpE,MAAM,QAAQ,GAAkB;QAC9B,UAAU;QACV,aAAa;QACb,OAAO;QACP,UAAU;KACX,CAAA;IAED,OAAO,
|
|
1
|
+
{"version":3,"file":"Spotlight.js","sourceRoot":"","sources":["../../../src/components/ImageView/Spotlight.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,EAAc,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAi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C,MAAM,GAAI,EACpI,eAAe,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,KAAC,eAAe,IAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,GAAI,CAAC,CAAC,CAAC,SAAS,GACtI,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PropsOf } from '@codeleap/types';
|
|
3
2
|
import _ImageView from 'react-native-image-viewing';
|
|
4
3
|
export type ImageViewProps = PropsOf<typeof _ImageView>;
|
|
5
|
-
export declare const ImageView: (props: ImageViewProps) => JSX.Element;
|
|
4
|
+
export declare const ImageView: (props: ImageViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { onUpdate } from '@codeleap/hooks';
|
|
3
3
|
import _ImageView from 'react-native-image-viewing';
|
|
4
4
|
import { StatusBar } from 'react-native';
|
|
@@ -6,6 +6,8 @@ export const ImageView = (props) => {
|
|
|
6
6
|
onUpdate(() => {
|
|
7
7
|
StatusBar.setHidden(props.visible);
|
|
8
8
|
}, [props.visible]);
|
|
9
|
-
return (
|
|
9
|
+
return (
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
_jsx(_ImageView, { doubleTapToZoomEnabled: false, presentationStyle: 'overFullScreen', ...props }));
|
|
10
12
|
};
|
|
11
13
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/ImageView/component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/ImageView/component.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE1C,OAAO,UAAU,MAAM,4BAA4B,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAIxC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IACjD,QAAQ,CAAC,GAAG,EAAE;QACZ,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACpC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;IAEnB,OAAO;IACL,aAAa;IACb,KAAC,UAAU,IACT,sBAAsB,EAAE,KAAK,EAC7B,iBAAiB,EAAE,gBAAgB,KAC/B,KAAK,GACT,CACH,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import { TypeGuards } from '@codeleap/types';
|
|
3
4
|
import { getRenderedComponent } from '@codeleap/utils';
|
|
4
5
|
import { ActionIcon } from '../ActionIcon';
|
|
@@ -36,21 +37,7 @@ export const InputBase = forwardRef((props, ref) => {
|
|
|
36
37
|
});
|
|
37
38
|
const WrapperComponent = wrapper ?? View;
|
|
38
39
|
const InnerWrapperComponent = innerWrapper ?? View;
|
|
39
|
-
return
|
|
40
|
-
{TypeGuards.isString(label) ? <Text text={label} style={styles.labelStyle}/> : label}
|
|
41
|
-
|
|
42
|
-
{TypeGuards.isString(description) ? <Text text={description} style={styles.descriptionStyle}/> : description}
|
|
43
|
-
|
|
44
|
-
<InnerWrapperComponent style={styles.innerWrapperStyle} {...innerWrapperProps}>
|
|
45
|
-
{_leftIcon}
|
|
46
|
-
{children}
|
|
47
|
-
{_rightIcon}
|
|
48
|
-
</InnerWrapperComponent>
|
|
49
|
-
|
|
50
|
-
{hideErrorMessage || !error ? null : (<RNAnimated.View exiting={FadeOut.duration(100)} entering={FadeIn.duration(200)}>
|
|
51
|
-
{TypeGuards.isString(error) ? <Text text={error} style={styles.errorStyle}/> : error}
|
|
52
|
-
</RNAnimated.View>)}
|
|
53
|
-
</WrapperComponent>;
|
|
40
|
+
return _jsxs(WrapperComponent, { ...otherProps, ...wrapperProps, style: styles.wrapperStyle, ref: ref, children: [TypeGuards.isString(label) ? _jsx(Text, { text: label, style: styles.labelStyle }) : label, TypeGuards.isString(description) ? _jsx(Text, { text: description, style: styles.descriptionStyle }) : description, _jsxs(InnerWrapperComponent, { style: styles.innerWrapperStyle, ...innerWrapperProps, children: [_leftIcon, children, _rightIcon] }), hideErrorMessage || !error ? null : (_jsx(RNAnimated.View, { exiting: FadeOut.duration(100), entering: FadeIn.duration(200), children: TypeGuards.isString(error) ? _jsx(Text, { text: error, style: styles.errorStyle }) : error }))] });
|
|
54
41
|
});
|
|
55
42
|
InputBase.elements = ['wrapper', 'innerWrapper', 'label', 'errorMessage', 'description', 'icon', 'leftIcon', 'rightIcon'];
|
|
56
43
|
InputBase.defaultProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/InputBase/index.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/InputBase/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,UAAU,EAAmB,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,UAAU,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,yBAAyB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,EAAE,KAAK;IACvB,KAAK,EAAE,qBAAqB;IAC5B,OAAO,EAAE,IAAI;IACb,YAAY,EAAE,IAAI;CACQ,CAAA"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PropsOf, StylesOf } from '@codeleap/types';
|
|
3
2
|
import { InputBaseComposition } from './styles';
|
|
4
3
|
import { ActionIcon } from '../ActionIcon';
|
|
5
4
|
import { ViewProps } from 'react-native';
|
|
6
5
|
type ActionIconProps = PropsOf<typeof ActionIcon>;
|
|
7
6
|
type OrderedParts = 'label' | 'description' | 'innerWrapper' | 'error';
|
|
8
|
-
type IconProp = Partial<ActionIconProps> |
|
|
7
|
+
type IconProp = Partial<ActionIconProps> | React.ReactElement;
|
|
9
8
|
export type InputBaseProps = React.PropsWithChildren<{
|
|
10
9
|
label?: React.ReactNode;
|
|
11
10
|
error?: React.ReactNode;
|
|
12
11
|
leftIcon?: IconProp;
|
|
13
12
|
rightIcon?: IconProp;
|
|
14
|
-
wrapper?: (props: any) =>
|
|
13
|
+
wrapper?: (props: any) => React.ReactElement;
|
|
15
14
|
wrapperProps?: any;
|
|
16
|
-
innerWrapper?: (props: any) =>
|
|
15
|
+
innerWrapper?: (props: any) => React.ReactElement;
|
|
17
16
|
innerWrapperProps?: any;
|
|
18
17
|
description?: React.ReactNode;
|
|
19
18
|
debugName?: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { View, TextInput } from 'react-native';
|
|
3
2
|
import { Field, IFieldRef } from '@codeleap/form';
|
|
4
3
|
import { AnyRecord } from '@codeleap/types';
|
|
@@ -54,8 +53,8 @@ export declare function useInputBase<V, T extends Field<V, any, any, unknown> =
|
|
|
54
53
|
validation: import("@codeleap/form").ValidationResult<any, unknown>;
|
|
55
54
|
value: unknown;
|
|
56
55
|
};
|
|
57
|
-
wrapperRef: import("react").
|
|
58
|
-
innerInputRef: import("react").
|
|
56
|
+
wrapperRef: import("react").RefObject<View>;
|
|
57
|
+
innerInputRef: import("react").RefObject<TextInput>;
|
|
59
58
|
scrollable: import("react").MutableRefObject<import("../../modules/scroll").Scrollable>;
|
|
60
59
|
inputValue: V;
|
|
61
60
|
onInputValueChange: (value: V) => void;
|
|
@@ -5,7 +5,7 @@ import { TypeGuards } from '@codeleap/types';
|
|
|
5
5
|
export function useInputBase(field, defaultField = fields.text, internalState, params = {}, deps = []) {
|
|
6
6
|
const { value, onValueChange } = internalState;
|
|
7
7
|
const hasInternalState = useMemo(() => TypeGuards.isFunction(onValueChange) && !TypeGuards.isNil(value), []);
|
|
8
|
-
const wrapperRef = useRef();
|
|
8
|
+
const wrapperRef = useRef(null);
|
|
9
9
|
const innerInputRef = useRef(null);
|
|
10
10
|
const scrollable = useWrappingScrollable();
|
|
11
11
|
const fieldHandle = hasInternalState ? {} : useField(field, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInputBase.js","sourceRoot":"","sources":["../../../src/components/InputBase/useInputBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAoB,MAAM,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAa,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEvD,MAAM,UAAU,YAAY,CAC1B,KAAQ,EACR,eAA2C,MAAM,CAAC,IAAe,EACjE,aAA8D,EAC9D,SAAgC,EAAE,EAClC,OAAc,EAAE;IAEhB,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,aAAa,CAAA;IAE9C,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAA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,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,EAAE;oBAC9D,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,CAAA;gBAC3C,CAAC,CAAC,CAAA;YACJ,CAAC;YACD,GAAG,MAAM;SACV;QACD,IAAI;KAC8B,EAAE,YAAY,CAAC,CAAA;IAEnD,MAAM,UAAU,GAAG,WAAW,EAAE,UAAU,CAAA;IAE1C,OAAO;QACL,WAAW;QACX,UAAU;QACV,UAAU;QACV,aAAa;QACb,UAAU;QACV,UAAU,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,CAAM;QAChE,kBAAkB,EAAE,gBAAgB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,EAAE,QAAQ;KAC7E,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInputBasePartialStyles.js","sourceRoot":"","sources":["../../../src/components/InputBase/useInputBasePartialStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAG/B,MAAM,UAAU,yBAAyB,CACvC,MAA4B,EAC5B,SAAkC,EAClC,MAAS;IAET,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YACrC,MAAM,CAAC,GAAG,EAAE,mBAAmB,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;YAE/E,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE;gBAChE,IAAI,CAAC,EAAE;oB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ACN,GAAG,MAAM,CAAC,GAAG,GAAG,IAAI,KAAK,EAAO,CAAC;iBAClC,CAAA;YACH,CAAC,EAAE,EAAE,CAAC,CAAA;YAEN,IAAI,mBAAmB,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC3C,GAAG,CAAC,GAAG,CAAC,GAAG;oBACT,GAAG,MAAM,CAAC,GAAG,CAAC;oBACd,GAAG,MAAM;iBACV,CAAA;YACH,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAA;YACnB,CAAC;YAED,OAAO,GAAG,CAAA;QACZ,CAAC,EAAE,EAAsC,CAAC,CAAA;IAC5C,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;AACd,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { DetectorProps, InterceptorProps, LayoutProps } from './types';
|
|
3
2
|
export * from './store';
|
|
4
3
|
export declare const InputOverlay: {
|
|
5
|
-
Detector: ({ children, style, withWrapper }: DetectorProps) => JSX.Element;
|
|
6
|
-
Interceptor: ({ children }: InterceptorProps) => JSX.Element;
|
|
7
|
-
Layout: (props: LayoutProps) => JSX.Element;
|
|
4
|
+
Detector: ({ children, style, withWrapper }: DetectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
Interceptor: ({ children }: InterceptorProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Layout: (props: LayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
};
|