@makroz/mobile 1.1.1 → 1.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/package.json +6 -6
- package/dist/__mocks__/flash-list.d.ts +0 -12
- package/dist/__mocks__/react-native.d.ts +0 -77
- package/dist/auth/MkAuthContext.d.ts +0 -72
- package/dist/auth/MkAuthForm.d.ts +0 -31
- package/dist/auth/MkAuthProvider.d.ts +0 -57
- package/dist/auth/secureStorage.d.ts +0 -63
- package/dist/auth/types.d.ts +0 -65
- package/dist/auth/useMkAuth.d.ts +0 -17
- package/dist/components/MkAccordion.d.ts +0 -19
- package/dist/components/MkAccordion.test.d.ts +0 -2
- package/dist/components/MkAlert.d.ts +0 -18
- package/dist/components/MkAlert.test.d.ts +0 -2
- package/dist/components/MkAvatar.d.ts +0 -12
- package/dist/components/MkAvatar.test.d.ts +0 -2
- package/dist/components/MkBadge.d.ts +0 -11
- package/dist/components/MkBadge.test.d.ts +0 -2
- package/dist/components/MkButton.d.ts +0 -13
- package/dist/components/MkButton.test.d.ts +0 -2
- package/dist/components/MkCard.d.ts +0 -15
- package/dist/components/MkCard.test.d.ts +0 -2
- package/dist/components/MkCheck.d.ts +0 -18
- package/dist/components/MkCheck.test.d.ts +0 -2
- package/dist/components/MkDatePicker.d.ts +0 -30
- package/dist/components/MkDatePicker.test.d.ts +0 -2
- package/dist/components/MkDivider.d.ts +0 -11
- package/dist/components/MkDivider.test.d.ts +0 -2
- package/dist/components/MkDropDown.d.ts +0 -37
- package/dist/components/MkDropDown.test.d.ts +0 -2
- package/dist/components/MkEmptyState.d.ts +0 -11
- package/dist/components/MkEmptyState.test.d.ts +0 -2
- package/dist/components/MkFileUpload.d.ts +0 -63
- package/dist/components/MkFileUpload.test.d.ts +0 -2
- package/dist/components/MkIcons.d.ts +0 -15
- package/dist/components/MkInfiniteList.d.ts +0 -22
- package/dist/components/MkInfiniteList.test.d.ts +0 -2
- package/dist/components/MkInput.d.ts +0 -16
- package/dist/components/MkInput.test.d.ts +0 -2
- package/dist/components/MkLoading.d.ts +0 -12
- package/dist/components/MkLoading.test.d.ts +0 -2
- package/dist/components/MkModal.d.ts +0 -20
- package/dist/components/MkModal.test.d.ts +0 -2
- package/dist/components/MkProgressBar.d.ts +0 -13
- package/dist/components/MkProgressBar.test.d.ts +0 -2
- package/dist/components/MkRadio.d.ts +0 -20
- package/dist/components/MkRadio.test.d.ts +0 -2
- package/dist/components/MkSearchInput.d.ts +0 -21
- package/dist/components/MkSearchInput.test.d.ts +0 -2
- package/dist/components/MkSelect.d.ts +0 -16
- package/dist/components/MkSelect.test.d.ts +0 -2
- package/dist/components/MkSkeleton.d.ts +0 -13
- package/dist/components/MkSkeleton.test.d.ts +0 -2
- package/dist/components/MkSwitch.d.ts +0 -13
- package/dist/components/MkSwitch.test.d.ts +0 -2
- package/dist/components/MkTable.d.ts +0 -39
- package/dist/components/MkTable.test.d.ts +0 -2
- package/dist/components/MkTabs.d.ts +0 -19
- package/dist/components/MkTabs.test.d.ts +0 -2
- package/dist/components/MkTextArea.d.ts +0 -17
- package/dist/components/MkTextArea.test.d.ts +0 -2
- package/dist/components/MkToastRenderer.d.ts +0 -3
- package/dist/components/MkToastRenderer.test.d.ts +0 -2
- package/dist/components/MkTooltip.d.ts +0 -15
- package/dist/components/MkTooltip.test.d.ts +0 -2
- package/dist/components/MkWindowList.d.ts +0 -47
- package/dist/components/MkWindowList.test.d.ts +0 -2
- package/dist/components/index.d.ts +0 -30
- package/dist/context/MkApiContext.d.ts +0 -15
- package/dist/context/MkAuthContext.d.ts +0 -19
- package/dist/context/MkConfirmContext.d.ts +0 -8
- package/dist/context/MkToastContext.d.ts +0 -19
- package/dist/hooks/filePicker.types.d.ts +0 -13
- package/dist/hooks/useApi.d.ts +0 -19
- package/dist/hooks/useApi.test.d.ts +0 -2
- package/dist/hooks/useMkCrud.d.ts +0 -39
- package/dist/hooks/useMkDebounce.d.ts +0 -24
- package/dist/hooks/useMkEffectDebug.d.ts +0 -6
- package/dist/hooks/useMkEvent.d.ts +0 -42
- package/dist/hooks/useMkFilePickerCli.d.ts +0 -59
- package/dist/hooks/useMkFilePickerExpo.d.ts +0 -38
- package/dist/hooks/useMkForm.d.ts +0 -43
- package/dist/hooks/useMkInfiniteList.d.ts +0 -16
- package/dist/hooks/useMkList.d.ts +0 -61
- package/dist/hooks/useMkLocalStorage.d.ts +0 -6
- package/dist/hooks/useMkPrevious.d.ts +0 -6
- package/dist/hooks/useMkToggle.d.ts +0 -6
- package/dist/index.d.ts +0 -29
- package/dist/test-setup.d.ts +0 -28
- package/dist/test-utils.d.ts +0 -22
- package/dist/theme/MkThemeProvider.d.ts +0 -14
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
export interface MkEmptyStateProps {
|
|
4
|
-
icon?: React.ReactNode;
|
|
5
|
-
title?: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
action?: React.ReactNode;
|
|
8
|
-
style?: ViewStyle;
|
|
9
|
-
}
|
|
10
|
-
export declare const MkEmptyState: React.FC<MkEmptyStateProps>;
|
|
11
|
-
//# sourceMappingURL=MkEmptyState.d.ts.map
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
/**
|
|
4
|
-
* @module MkFileUpload (Mobile)
|
|
5
|
-
* @description 100% dependency-free file upload UI for React Native.
|
|
6
|
-
*
|
|
7
|
-
* This component has ZERO native picker dependencies — it never imports
|
|
8
|
-
* expo-image-picker, expo-document-picker, react-native-image-picker, or
|
|
9
|
-
* react-native-document-picker. It only handles UI: the tap zone, previews,
|
|
10
|
-
* file list, and error display.
|
|
11
|
-
*
|
|
12
|
-
* Use a picker adapter hook to bridge it with your preferred library:
|
|
13
|
-
* - Expo projects → `useMkFilePickerExpo` (from this package)
|
|
14
|
-
* - RN CLI projects → `useMkFilePickerCli` (from this package)
|
|
15
|
-
*
|
|
16
|
-
* @example Expo
|
|
17
|
-
* ```tsx
|
|
18
|
-
* const picker = useMkFilePickerExpo({ mediaType: 'images', multiple: true });
|
|
19
|
-
* <MkFileUpload onTap={picker.pick} onFiles={handleFiles} />
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* @example RN CLI
|
|
23
|
-
* ```tsx
|
|
24
|
-
* const picker = useMkFilePickerCli({ type: ['image/*'], multiple: true });
|
|
25
|
-
* <MkFileUpload onTap={picker.pick} onFiles={handleFiles} />
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
/** Normalized file result returned by picker adapters (useMkFilePickerExpo / useMkFilePickerCli). */
|
|
29
|
-
export interface MkFilePickerResult {
|
|
30
|
-
name: string;
|
|
31
|
-
uri: string;
|
|
32
|
-
type: string;
|
|
33
|
-
sizeMB?: number;
|
|
34
|
-
}
|
|
35
|
-
/** @deprecated Use MkFilePickerResult instead */
|
|
36
|
-
export type MkMobileFileInfo = MkFilePickerResult;
|
|
37
|
-
export interface MkFileInfo {
|
|
38
|
-
file?: any;
|
|
39
|
-
name: string;
|
|
40
|
-
sizeMB: number;
|
|
41
|
-
preview?: string;
|
|
42
|
-
type: string;
|
|
43
|
-
/** Mobile-only: local URI to the file */
|
|
44
|
-
uri?: string;
|
|
45
|
-
}
|
|
46
|
-
export interface MkFileUploadProps {
|
|
47
|
-
onFiles: (files: MkFileInfo[]) => void;
|
|
48
|
-
/**
|
|
49
|
-
* Called when user taps the zone. Return picked files or [].
|
|
50
|
-
* Use `useMkFilePickerExpo().pick` or `useMkFilePickerCli().pick` as the value.
|
|
51
|
-
*/
|
|
52
|
-
onTap?: () => Promise<MkFilePickerResult[]>;
|
|
53
|
-
accept?: string;
|
|
54
|
-
multiple?: boolean;
|
|
55
|
-
maxSizeMB?: number;
|
|
56
|
-
label?: string;
|
|
57
|
-
sublabel?: string;
|
|
58
|
-
disabled?: boolean;
|
|
59
|
-
error?: string;
|
|
60
|
-
style?: ViewStyle;
|
|
61
|
-
}
|
|
62
|
-
export declare const MkFileUpload: React.FC<MkFileUploadProps>;
|
|
63
|
-
//# sourceMappingURL=MkFileUpload.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { SvgProps } from 'react-native-svg';
|
|
3
|
-
export interface MkIconProps extends SvgProps {
|
|
4
|
-
size?: number | string;
|
|
5
|
-
color?: string;
|
|
6
|
-
variant?: 'primary' | 'muted' | 'error' | string;
|
|
7
|
-
}
|
|
8
|
-
export declare const MkIconWrap: React.FC<MkIconProps>;
|
|
9
|
-
export declare const IconArrowDown: (props: MkIconProps) => React.JSX.Element;
|
|
10
|
-
export declare const IconCheck: (props: MkIconProps) => React.JSX.Element;
|
|
11
|
-
export declare const IconTrash: (props: MkIconProps) => React.JSX.Element;
|
|
12
|
-
export declare const IconEdit: (props: MkIconProps) => React.JSX.Element;
|
|
13
|
-
export declare const IconClose: (props: MkIconProps) => React.JSX.Element;
|
|
14
|
-
export declare const Icon3Dots: (props: MkIconProps) => React.JSX.Element;
|
|
15
|
-
//# sourceMappingURL=MkIcons.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface MkInfiniteListProps<T> {
|
|
3
|
-
items: T[];
|
|
4
|
-
renderItem: ({ item, index }: {
|
|
5
|
-
item: T;
|
|
6
|
-
index: number;
|
|
7
|
-
}) => React.ReactElement | null;
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
isRefreshing?: boolean;
|
|
10
|
-
hasMore?: boolean;
|
|
11
|
-
onLoadMore: () => void;
|
|
12
|
-
onRefresh: () => void;
|
|
13
|
-
emptyMessage?: string;
|
|
14
|
-
estimatedItemSize?: number;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* MkInfiniteList (Mobile)
|
|
18
|
-
* Optimized for React Native using best practices:
|
|
19
|
-
* Virtualization, memory management, and Batching.
|
|
20
|
-
*/
|
|
21
|
-
export declare function MkInfiniteList<T>({ items, renderItem, loading, isRefreshing, hasMore, onLoadMore, onRefresh, emptyMessage, estimatedItemSize }: MkInfiniteListProps<T>): React.JSX.Element;
|
|
22
|
-
//# sourceMappingURL=MkInfiniteList.d.ts.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface MkInputProps {
|
|
3
|
-
label?: string;
|
|
4
|
-
error?: string;
|
|
5
|
-
success?: boolean;
|
|
6
|
-
helperText?: string;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
value?: string;
|
|
9
|
-
iconLeft?: React.ReactNode;
|
|
10
|
-
iconRight?: React.ReactNode;
|
|
11
|
-
onChangeText?: (text: string) => void;
|
|
12
|
-
secureTextEntry?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const MkInput: React.FC<MkInputProps>;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=MkInput.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
export interface MkLoadingProps {
|
|
4
|
-
visible?: boolean;
|
|
5
|
-
label?: string;
|
|
6
|
-
size?: 'sm' | 'md' | 'lg';
|
|
7
|
-
overlay?: boolean;
|
|
8
|
-
color?: string;
|
|
9
|
-
style?: ViewStyle;
|
|
10
|
-
}
|
|
11
|
-
export declare const MkLoading: React.FC<MkLoadingProps>;
|
|
12
|
-
//# sourceMappingURL=MkLoading.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface MkModalProps {
|
|
3
|
-
isOpen: boolean;
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
title?: string;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
confirmText?: string;
|
|
8
|
-
cancelText?: string;
|
|
9
|
-
onConfirm?: () => void;
|
|
10
|
-
showCancel?: boolean;
|
|
11
|
-
variant?: 'default' | 'destructive' | 'warning' | 'success';
|
|
12
|
-
size?: 'sm' | 'md' | 'lg' | 'full';
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* MkModal (Mobile)
|
|
16
|
-
* 🚀 Parity with Web version using React Native's <Modal>.
|
|
17
|
-
* Features backdrop blur and smooth slide-up animation.
|
|
18
|
-
*/
|
|
19
|
-
export declare const MkModal: React.FC<MkModalProps>;
|
|
20
|
-
//# sourceMappingURL=MkModal.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
export interface MkProgressBarProps {
|
|
4
|
-
value: number;
|
|
5
|
-
max?: number;
|
|
6
|
-
label?: string;
|
|
7
|
-
showPercent?: boolean;
|
|
8
|
-
variant?: 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
9
|
-
size?: 'sm' | 'md' | 'lg';
|
|
10
|
-
style?: ViewStyle;
|
|
11
|
-
}
|
|
12
|
-
export declare const MkProgressBar: React.FC<MkProgressBarProps>;
|
|
13
|
-
//# sourceMappingURL=MkProgressBar.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
export interface MkRadioOption {
|
|
4
|
-
value: string | number;
|
|
5
|
-
label: string;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface MkRadioProps {
|
|
9
|
-
label?: string;
|
|
10
|
-
options: MkRadioOption[];
|
|
11
|
-
value?: string | number | null;
|
|
12
|
-
onChange?: (value: string | number) => void;
|
|
13
|
-
direction?: 'horizontal' | 'vertical';
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
error?: string;
|
|
16
|
-
size?: 'sm' | 'md' | 'lg';
|
|
17
|
-
style?: ViewStyle;
|
|
18
|
-
}
|
|
19
|
-
export declare const MkRadio: React.FC<MkRadioProps>;
|
|
20
|
-
//# sourceMappingURL=MkRadio.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
/**
|
|
4
|
-
* @module MkSearchInput (Mobile)
|
|
5
|
-
* @description Search input with integrated debounce. Same API as mk-web.
|
|
6
|
-
*/
|
|
7
|
-
export interface MkSearchInputProps {
|
|
8
|
-
onSearch: (term: string) => void;
|
|
9
|
-
delay?: number;
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
value?: string;
|
|
12
|
-
defaultValue?: string;
|
|
13
|
-
size?: 'sm' | 'md' | 'lg';
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
loading?: boolean;
|
|
16
|
-
clearable?: boolean;
|
|
17
|
-
style?: ViewStyle;
|
|
18
|
-
autoFocus?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export declare const MkSearchInput: React.FC<MkSearchInputProps>;
|
|
21
|
-
//# sourceMappingURL=MkSearchInput.d.ts.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface Option {
|
|
3
|
-
label: string;
|
|
4
|
-
value: string | number;
|
|
5
|
-
}
|
|
6
|
-
interface MkSelectProps {
|
|
7
|
-
label?: string;
|
|
8
|
-
error?: string;
|
|
9
|
-
options: Option[];
|
|
10
|
-
value?: string | number;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
onSelect: (value: string | number) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const MkSelect: React.FC<MkSelectProps>;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=MkSelect.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
export interface MkSkeletonProps {
|
|
4
|
-
variant?: 'text' | 'circle' | 'rect';
|
|
5
|
-
width?: number | string;
|
|
6
|
-
height?: number;
|
|
7
|
-
lines?: number;
|
|
8
|
-
gap?: number;
|
|
9
|
-
radius?: number;
|
|
10
|
-
style?: ViewStyle;
|
|
11
|
-
}
|
|
12
|
-
export declare const MkSkeleton: React.FC<MkSkeletonProps>;
|
|
13
|
-
//# sourceMappingURL=MkSkeleton.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
export interface MkSwitchProps {
|
|
4
|
-
label?: string;
|
|
5
|
-
checked?: boolean;
|
|
6
|
-
onChange?: (checked: boolean) => void;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
size?: 'sm' | 'md' | 'lg';
|
|
9
|
-
error?: string;
|
|
10
|
-
style?: ViewStyle;
|
|
11
|
-
}
|
|
12
|
-
export declare const MkSwitch: React.FC<MkSwitchProps>;
|
|
13
|
-
//# sourceMappingURL=MkSwitch.d.ts.map
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
import type { MkDropdownOptionType } from './MkDropDown';
|
|
4
|
-
/**
|
|
5
|
-
* @module MkTable (Mobile)
|
|
6
|
-
* @description Data table as a FlatList with column headers, sort indicators, row actions, and pagination.
|
|
7
|
-
* Equivalent to mk-web's MkTable — adapted for React Native's layout system.
|
|
8
|
-
*/
|
|
9
|
-
interface Column<T> {
|
|
10
|
-
key: keyof T | string;
|
|
11
|
-
label: string;
|
|
12
|
-
render?: (item: T) => React.ReactNode;
|
|
13
|
-
sortable?: boolean;
|
|
14
|
-
flex?: number;
|
|
15
|
-
}
|
|
16
|
-
interface MkTableProps<T> {
|
|
17
|
-
data: T[];
|
|
18
|
-
columns: Column<T>[];
|
|
19
|
-
loading?: boolean;
|
|
20
|
-
onSort?: (field: string) => void;
|
|
21
|
-
sortField?: string;
|
|
22
|
-
sortOrder?: 'asc' | 'desc';
|
|
23
|
-
pagination?: {
|
|
24
|
-
current_page?: number;
|
|
25
|
-
last_page?: number;
|
|
26
|
-
total?: number;
|
|
27
|
-
};
|
|
28
|
-
onPageChange?: (page: number) => void;
|
|
29
|
-
actions?: (item: T) => MkDropdownOptionType[];
|
|
30
|
-
onAction?: (action: string | number, item: T) => void;
|
|
31
|
-
emptyMessage?: string;
|
|
32
|
-
keyExtractor?: (item: T, index: number) => string;
|
|
33
|
-
onRefresh?: () => void;
|
|
34
|
-
refreshing?: boolean;
|
|
35
|
-
style?: ViewStyle;
|
|
36
|
-
}
|
|
37
|
-
export declare function MkTable<T>({ data, columns, loading, onSort, sortField, sortOrder, pagination, onPageChange, actions, onAction, emptyMessage, keyExtractor, onRefresh, refreshing, style, }: MkTableProps<T>): React.JSX.Element;
|
|
38
|
-
export {};
|
|
39
|
-
//# sourceMappingURL=MkTable.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
export interface MkTabItem {
|
|
4
|
-
key: string;
|
|
5
|
-
label: string;
|
|
6
|
-
icon?: React.ReactNode;
|
|
7
|
-
badge?: number | string;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface MkTabsProps {
|
|
11
|
-
tabs: MkTabItem[];
|
|
12
|
-
activeKey?: string;
|
|
13
|
-
onChange?: (key: string) => void;
|
|
14
|
-
variant?: 'underline' | 'pills' | 'segmented';
|
|
15
|
-
size?: 'sm' | 'md';
|
|
16
|
-
style?: ViewStyle;
|
|
17
|
-
}
|
|
18
|
-
export declare const MkTabs: React.FC<MkTabsProps>;
|
|
19
|
-
//# sourceMappingURL=MkTabs.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
export interface MkTextAreaProps {
|
|
4
|
-
label?: string;
|
|
5
|
-
error?: string;
|
|
6
|
-
helperText?: string;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
value?: string;
|
|
9
|
-
onChangeText?: (text: string) => void;
|
|
10
|
-
rows?: number;
|
|
11
|
-
maxLength?: number;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
showCount?: boolean;
|
|
14
|
-
style?: ViewStyle;
|
|
15
|
-
}
|
|
16
|
-
export declare const MkTextArea: React.FC<MkTextAreaProps>;
|
|
17
|
-
//# sourceMappingURL=MkTextArea.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
/**
|
|
4
|
-
* @module MkTooltip (Mobile)
|
|
5
|
-
* @description Long-press tooltip/popover for mobile. Shows info on press since hover doesn't exist in RN.
|
|
6
|
-
* Same conceptual API as web MkTooltip — adapted for touch interaction.
|
|
7
|
-
*/
|
|
8
|
-
export interface MkTooltipProps {
|
|
9
|
-
content: string;
|
|
10
|
-
position?: 'top' | 'bottom';
|
|
11
|
-
children: React.ReactElement;
|
|
12
|
-
style?: ViewStyle;
|
|
13
|
-
}
|
|
14
|
-
export declare const MkTooltip: React.FC<MkTooltipProps>;
|
|
15
|
-
//# sourceMappingURL=MkTooltip.d.ts.map
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
/**
|
|
4
|
-
* @module MkWindowList (Mobile)
|
|
5
|
-
* @description High-performance virtualized list backed by FlashList.
|
|
6
|
-
* Equivalent API to mk-web's MkWindowList — same props for items, renderItem, loading, hasMore, etc.
|
|
7
|
-
*
|
|
8
|
-
* RN's FlatList natively virtualizes, so this is a thin wrapper that:
|
|
9
|
-
* 1. Standardizes the API to match web's MkWindowList
|
|
10
|
-
* 2. Adds infinite scroll (onEndReached → onLoadMore)
|
|
11
|
-
* 3. Handles empty states and loading indicators
|
|
12
|
-
* 4. Provides pull-to-refresh
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```tsx
|
|
16
|
-
* <MkWindowList
|
|
17
|
-
* items={products}
|
|
18
|
-
* renderItem={(item, index) => <ProductCard product={item} />}
|
|
19
|
-
* itemHeight={80}
|
|
20
|
-
* loading={loading}
|
|
21
|
-
* hasMore={hasMore}
|
|
22
|
-
* onLoadMore={loadMore}
|
|
23
|
-
* onRefresh={refresh}
|
|
24
|
-
* />
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export interface MkWindowListProps<T> {
|
|
28
|
-
items: T[];
|
|
29
|
-
renderItem: (item: T, index: number) => React.ReactElement;
|
|
30
|
-
/** Estimated item height for FlashList optimization. */
|
|
31
|
-
itemHeight: number;
|
|
32
|
-
/** Container height — in mobile this is typically flex-auto. Can pass explicit value. */
|
|
33
|
-
containerHeight?: number;
|
|
34
|
-
/** Extra items to render outside viewport. Default 5. */
|
|
35
|
-
overscan?: number;
|
|
36
|
-
loading?: boolean;
|
|
37
|
-
hasMore?: boolean;
|
|
38
|
-
onLoadMore?: () => void;
|
|
39
|
-
emptyMessage?: string;
|
|
40
|
-
/** Pull-to-refresh handler. */
|
|
41
|
-
onRefresh?: () => void;
|
|
42
|
-
refreshing?: boolean;
|
|
43
|
-
keyExtractor?: (item: T, index: number) => string;
|
|
44
|
-
style?: ViewStyle;
|
|
45
|
-
}
|
|
46
|
-
export declare function MkWindowList<T>({ items, renderItem, itemHeight, containerHeight, overscan, loading, hasMore, onLoadMore, emptyMessage, onRefresh, refreshing, keyExtractor, style, }: MkWindowListProps<T>): React.JSX.Element;
|
|
47
|
-
//# sourceMappingURL=MkWindowList.d.ts.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export * from './MkButton';
|
|
2
|
-
export * from './MkInput';
|
|
3
|
-
export * from './MkTextArea';
|
|
4
|
-
export * from './MkCheck';
|
|
5
|
-
export * from './MkSwitch';
|
|
6
|
-
export * from './MkRadio';
|
|
7
|
-
export * from './MkSelect';
|
|
8
|
-
export * from './MkFileUpload';
|
|
9
|
-
export * from './MkSearchInput';
|
|
10
|
-
export * from './MkDatePicker';
|
|
11
|
-
export * from './MkAccordion';
|
|
12
|
-
export * from './MkAlert';
|
|
13
|
-
export * from './MkAvatar';
|
|
14
|
-
export * from './MkBadge';
|
|
15
|
-
export * from './MkCard';
|
|
16
|
-
export * from './MkDivider';
|
|
17
|
-
export * from './MkEmptyState';
|
|
18
|
-
export * from './MkLoading';
|
|
19
|
-
export * from './MkProgressBar';
|
|
20
|
-
export * from './MkSkeleton';
|
|
21
|
-
export * from './MkTabs';
|
|
22
|
-
export * from './MkTooltip';
|
|
23
|
-
export * from './MkModal';
|
|
24
|
-
export * from './MkDropDown';
|
|
25
|
-
export * from './MkToastRenderer';
|
|
26
|
-
export * from './MkTable';
|
|
27
|
-
export * from './MkInfiniteList';
|
|
28
|
-
export * from './MkWindowList';
|
|
29
|
-
export * from './MkIcons';
|
|
30
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface MkApiContextType {
|
|
4
|
-
waiting: number;
|
|
5
|
-
setWaiting: (change: number, origin?: string) => void;
|
|
6
|
-
baseUrl: string;
|
|
7
|
-
headers: Record<string, string>;
|
|
8
|
-
}
|
|
9
|
-
export declare function MkApiProvider({ children, baseUrl, initialHeaders }: {
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
baseUrl?: string;
|
|
12
|
-
initialHeaders?: Record<string, string>;
|
|
13
|
-
}): React.JSX.Element;
|
|
14
|
-
export declare function useMkApiContext(): MkApiContextType;
|
|
15
|
-
//# sourceMappingURL=MkApiContext.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { MkAuthContextType } from '@mk/core';
|
|
4
|
-
export interface MkAuthProviderProps {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
endpoints?: {
|
|
7
|
-
login?: string;
|
|
8
|
-
logout?: string;
|
|
9
|
-
user?: string;
|
|
10
|
-
};
|
|
11
|
-
storage?: {
|
|
12
|
-
getItem: (key: string) => Promise<string | null> | string | null;
|
|
13
|
-
setItem: (key: string, value: string) => Promise<void> | void;
|
|
14
|
-
removeItem: (key: string) => Promise<void> | void;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export declare const MkAuthProvider: React.FC<MkAuthProviderProps>;
|
|
18
|
-
export declare const useMkAuth: () => MkAuthContextType;
|
|
19
|
-
//# sourceMappingURL=MkAuthContext.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { MkConfirmContextValue } from '@mk/core';
|
|
4
|
-
export declare const MkConfirmProvider: React.FC<{
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
}>;
|
|
7
|
-
export declare const useMkConfirm: () => MkConfirmContextValue;
|
|
8
|
-
//# sourceMappingURL=MkConfirmContext.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { MkToastOptions, MkToastContextValue } from '@mk/core';
|
|
4
|
-
export interface MkToastProviderProps {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
/** Default position for toasts. Default: 'top-right'. */
|
|
7
|
-
defaultPosition?: MkToastOptions['position'];
|
|
8
|
-
/** Default timeout in ms. Default: 4000. */
|
|
9
|
-
defaultTimeout?: number;
|
|
10
|
-
/** Maximum concurrent toasts. Default: 5. */
|
|
11
|
-
maxToasts?: number;
|
|
12
|
-
}
|
|
13
|
-
export declare const MkToastProvider: React.FC<MkToastProviderProps>;
|
|
14
|
-
/**
|
|
15
|
-
* Hook to access toast operations.
|
|
16
|
-
* Must be used within MkToastProvider.
|
|
17
|
-
*/
|
|
18
|
-
export declare const useMkToast: () => MkToastContextValue;
|
|
19
|
-
//# sourceMappingURL=MkToastContext.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module filePicker.types
|
|
3
|
-
* @internal
|
|
4
|
-
* Shared types for MkFileUpload picker adapters.
|
|
5
|
-
*/
|
|
6
|
-
import type { MkFilePickerResult } from '../components/MkFileUpload';
|
|
7
|
-
/** Return type of useMkFilePickerExpo and useMkFilePickerCli. */
|
|
8
|
-
export interface UseMkFilePickerReturn {
|
|
9
|
-
/** Pass directly to MkFileUpload's `onTap` prop. */
|
|
10
|
-
pick: () => Promise<MkFilePickerResult[]>;
|
|
11
|
-
}
|
|
12
|
-
export type { MkFilePickerResult };
|
|
13
|
-
//# sourceMappingURL=filePicker.types.d.ts.map
|
package/dist/hooks/useApi.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { MkResponse, ApiStatus } from '@mk/core';
|
|
2
|
-
interface UseApiOptions {
|
|
3
|
-
baseUrl?: string;
|
|
4
|
-
headers?: Record<string, string>;
|
|
5
|
-
}
|
|
6
|
-
export declare function useApi(options?: UseApiOptions): {
|
|
7
|
-
status: ApiStatus;
|
|
8
|
-
data: any;
|
|
9
|
-
error: any;
|
|
10
|
-
waiting: number;
|
|
11
|
-
loading: boolean;
|
|
12
|
-
get: (endpoint: string, params?: any) => Promise<MkResponse<unknown>>;
|
|
13
|
-
post: (endpoint: string, body: any) => Promise<MkResponse<unknown>>;
|
|
14
|
-
put: (endpoint: string, body: any) => Promise<MkResponse<unknown>>;
|
|
15
|
-
delete: (endpoint: string) => Promise<MkResponse<unknown>>;
|
|
16
|
-
remove: (endpoint: string) => Promise<MkResponse<unknown>>;
|
|
17
|
-
};
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=useApi.d.ts.map
|