@makroz/mobile 1.0.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/dist/__mocks__/flash-list.d.ts.map +1 -0
- package/dist/__mocks__/flash-list.js +15 -0
- package/dist/__mocks__/flash-list.js.map +1 -0
- package/dist/__mocks__/react-native.d.ts.map +1 -0
- package/dist/__mocks__/react-native.js +58 -0
- package/dist/__mocks__/react-native.js.map +1 -0
- package/dist/auth/MkAuthForm.js +1 -1
- package/dist/auth/MkAuthForm.js.map +1 -1
- package/dist/auth/secureStorage.js +1 -1
- package/dist/auth/types.js +2 -2
- package/dist/components/MkAccordion.js +1 -1
- package/dist/components/MkAccordion.js.map +1 -1
- package/dist/components/MkAccordion.test.d.ts.map +1 -0
- package/dist/components/MkAccordion.test.js +30 -0
- package/dist/components/MkAccordion.test.js.map +1 -0
- package/dist/components/MkAlert.test.d.ts.map +1 -0
- package/dist/components/MkAlert.test.js +30 -0
- package/dist/components/MkAlert.test.js.map +1 -0
- package/dist/components/MkAvatar.test.d.ts.map +1 -0
- package/dist/components/MkAvatar.test.js +30 -0
- package/dist/components/MkAvatar.test.js.map +1 -0
- package/dist/components/MkBadge.test.d.ts.map +1 -0
- package/dist/components/MkBadge.test.js +30 -0
- package/dist/components/MkBadge.test.js.map +1 -0
- package/dist/components/MkButton.js +1 -1
- package/dist/components/MkButton.js.map +1 -1
- package/dist/components/MkButton.test.d.ts.map +1 -0
- package/dist/components/MkButton.test.js +30 -0
- package/dist/components/MkButton.test.js.map +1 -0
- package/dist/components/MkCard.js +1 -1
- package/dist/components/MkCard.js.map +1 -1
- package/dist/components/MkCard.test.d.ts.map +1 -0
- package/dist/components/MkCard.test.js +30 -0
- package/dist/components/MkCard.test.js.map +1 -0
- package/dist/components/MkCheck.js +1 -1
- package/dist/components/MkCheck.js.map +1 -1
- package/dist/components/MkCheck.test.d.ts.map +1 -0
- package/dist/components/MkCheck.test.js +30 -0
- package/dist/components/MkCheck.test.js.map +1 -0
- package/dist/components/MkDatePicker.js +1 -1
- package/dist/components/MkDatePicker.js.map +1 -1
- package/dist/components/MkDatePicker.test.d.ts.map +1 -0
- package/dist/components/MkDatePicker.test.js +30 -0
- package/dist/components/MkDatePicker.test.js.map +1 -0
- package/dist/components/MkDivider.test.d.ts.map +1 -0
- package/dist/components/MkDivider.test.js +30 -0
- package/dist/components/MkDivider.test.js.map +1 -0
- package/dist/components/MkDropDown.js +1 -1
- package/dist/components/MkDropDown.js.map +1 -1
- package/dist/components/MkDropDown.test.d.ts.map +1 -0
- package/dist/components/MkDropDown.test.js +30 -0
- package/dist/components/MkDropDown.test.js.map +1 -0
- package/dist/components/MkEmptyState.test.d.ts.map +1 -0
- package/dist/components/MkEmptyState.test.js +30 -0
- package/dist/components/MkEmptyState.test.js.map +1 -0
- package/dist/components/MkFileUpload.test.d.ts.map +1 -0
- package/dist/components/MkFileUpload.test.js +30 -0
- package/dist/components/MkFileUpload.test.js.map +1 -0
- package/dist/components/MkIcons.d.ts.map +1 -1
- package/dist/components/MkInfiniteList.d.ts.map +1 -1
- package/dist/components/MkInfiniteList.js +1 -3
- package/dist/components/MkInfiniteList.js.map +1 -1
- package/dist/components/MkInfiniteList.test.d.ts.map +1 -0
- package/dist/components/MkInfiniteList.test.js +30 -0
- package/dist/components/MkInfiniteList.test.js.map +1 -0
- package/dist/components/MkInput.js +1 -1
- package/dist/components/MkInput.js.map +1 -1
- package/dist/components/MkInput.test.d.ts.map +1 -0
- package/dist/components/MkInput.test.js +30 -0
- package/dist/components/MkInput.test.js.map +1 -0
- package/dist/components/MkLoading.test.d.ts.map +1 -0
- package/dist/components/MkLoading.test.js +30 -0
- package/dist/components/MkLoading.test.js.map +1 -0
- package/dist/components/MkModal.test.d.ts.map +1 -0
- package/dist/components/MkModal.test.js +30 -0
- package/dist/components/MkModal.test.js.map +1 -0
- package/dist/components/MkProgressBar.test.d.ts.map +1 -0
- package/dist/components/MkProgressBar.test.js +30 -0
- package/dist/components/MkProgressBar.test.js.map +1 -0
- package/dist/components/MkRadio.test.d.ts.map +1 -0
- package/dist/components/MkRadio.test.js +30 -0
- package/dist/components/MkRadio.test.js.map +1 -0
- package/dist/components/MkSearchInput.test.d.ts.map +1 -0
- package/dist/components/MkSearchInput.test.js +30 -0
- package/dist/components/MkSearchInput.test.js.map +1 -0
- package/dist/components/MkSelect.js +1 -1
- package/dist/components/MkSelect.js.map +1 -1
- package/dist/components/MkSelect.test.d.ts.map +1 -0
- package/dist/components/MkSelect.test.js +30 -0
- package/dist/components/MkSelect.test.js.map +1 -0
- package/dist/components/MkSkeleton.test.d.ts.map +1 -0
- package/dist/components/MkSkeleton.test.js +30 -0
- package/dist/components/MkSkeleton.test.js.map +1 -0
- package/dist/components/MkSwitch.test.d.ts.map +1 -0
- package/dist/components/MkSwitch.test.js +30 -0
- package/dist/components/MkSwitch.test.js.map +1 -0
- package/dist/components/MkTable.d.ts.map +1 -1
- package/dist/components/MkTable.js +1 -1
- package/dist/components/MkTable.js.map +1 -1
- package/dist/components/MkTable.test.d.ts.map +1 -0
- package/dist/components/MkTable.test.js +30 -0
- package/dist/components/MkTable.test.js.map +1 -0
- package/dist/components/MkTabs.js +1 -1
- package/dist/components/MkTabs.js.map +1 -1
- package/dist/components/MkTabs.test.d.ts.map +1 -0
- package/dist/components/MkTabs.test.js +30 -0
- package/dist/components/MkTabs.test.js.map +1 -0
- package/dist/components/MkTextArea.js +1 -1
- package/dist/components/MkTextArea.js.map +1 -1
- package/dist/components/MkTextArea.test.d.ts.map +1 -0
- package/dist/components/MkTextArea.test.js +30 -0
- package/dist/components/MkTextArea.test.js.map +1 -0
- package/dist/components/MkToastRenderer.test.d.ts.map +1 -0
- package/dist/components/MkToastRenderer.test.js +30 -0
- package/dist/components/MkToastRenderer.test.js.map +1 -0
- package/dist/components/MkTooltip.test.d.ts.map +1 -0
- package/dist/components/MkTooltip.test.js +30 -0
- package/dist/components/MkTooltip.test.js.map +1 -0
- package/dist/components/MkWindowList.d.ts.map +1 -1
- package/dist/components/MkWindowList.js +1 -1
- package/dist/components/MkWindowList.js.map +1 -1
- package/dist/components/MkWindowList.test.d.ts.map +1 -0
- package/dist/components/MkWindowList.test.js +30 -0
- package/dist/components/MkWindowList.test.js.map +1 -0
- package/dist/context/MkApiContext.d.ts.map +1 -1
- package/dist/context/MkAuthContext.d.ts.map +1 -1
- package/dist/context/MkAuthContext.js +1 -1
- package/dist/context/MkAuthContext.js.map +1 -1
- package/dist/context/MkConfirmContext.d.ts.map +1 -1
- package/dist/context/MkToastContext.d.ts.map +1 -1
- package/dist/hooks/useApi.d.ts.map +1 -1
- package/dist/hooks/useMkCrud.d.ts.map +1 -1
- package/dist/hooks/useMkEvent.js +1 -1
- package/dist/hooks/useMkForm.d.ts.map +1 -1
- package/dist/hooks/useMkForm.js +1 -1
- package/dist/hooks/useMkForm.js.map +1 -1
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/test-setup.js +41 -0
- package/dist/test-setup.js.map +1 -0
- package/dist/test-utils.d.ts.map +1 -0
- package/dist/test-utils.js +178 -0
- package/dist/test-utils.js.map +1 -0
- package/dist/theme/MkThemeProvider.d.ts.map +1 -1
- package/dist/theme/MkThemeProvider.js +1 -1
- package/dist/theme/MkThemeProvider.js.map +1 -1
- package/package.json +14 -9
- 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/MkAlert.d.ts +0 -18
- package/dist/components/MkAvatar.d.ts +0 -12
- package/dist/components/MkBadge.d.ts +0 -11
- package/dist/components/MkButton.d.ts +0 -13
- package/dist/components/MkCard.d.ts +0 -15
- package/dist/components/MkCheck.d.ts +0 -18
- package/dist/components/MkDatePicker.d.ts +0 -30
- package/dist/components/MkDivider.d.ts +0 -11
- package/dist/components/MkDropDown.d.ts +0 -37
- package/dist/components/MkEmptyState.d.ts +0 -11
- package/dist/components/MkFileUpload.d.ts +0 -63
- package/dist/components/MkIcons.d.ts +0 -15
- package/dist/components/MkInfiniteList.d.ts +0 -22
- package/dist/components/MkInput.d.ts +0 -16
- package/dist/components/MkLoading.d.ts +0 -12
- package/dist/components/MkModal.d.ts +0 -20
- package/dist/components/MkProgressBar.d.ts +0 -13
- package/dist/components/MkRadio.d.ts +0 -20
- package/dist/components/MkSearchInput.d.ts +0 -21
- package/dist/components/MkSelect.d.ts +0 -16
- package/dist/components/MkSkeleton.d.ts +0 -13
- package/dist/components/MkSwitch.d.ts +0 -13
- package/dist/components/MkTable.d.ts +0 -39
- package/dist/components/MkTabs.d.ts +0 -19
- package/dist/components/MkTextArea.d.ts +0 -17
- package/dist/components/MkToastRenderer.d.ts +0 -3
- package/dist/components/MkTooltip.d.ts +0 -15
- package/dist/components/MkWindowList.d.ts +0 -47
- 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/theme/MkThemeProvider.d.ts +0 -14
package/dist/auth/useMkAuth.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `useMkAuth` — the public hook for consuming the auth context.
|
|
3
|
-
*
|
|
4
|
-
* Kept in its own module so the *type* of the context (and the
|
|
5
|
-
* `createContext` call) can be imported in isolation by tests
|
|
6
|
-
* and tooling without dragging in the full provider tree.
|
|
7
|
-
*/
|
|
8
|
-
import { type MkAuthContextValue } from './MkAuthContext';
|
|
9
|
-
/**
|
|
10
|
-
* Access the current auth context value.
|
|
11
|
-
*
|
|
12
|
-
* Throws if used outside an `<MkAuthProvider>` — this is a
|
|
13
|
-
* developer error, not a runtime condition, so failing loudly
|
|
14
|
-
* is the right call.
|
|
15
|
-
*/
|
|
16
|
-
export declare function useMkAuth(): MkAuthContextValue;
|
|
17
|
-
//# sourceMappingURL=useMkAuth.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
export interface MkAccordionItem {
|
|
4
|
-
key: string;
|
|
5
|
-
title: string;
|
|
6
|
-
content: React.ReactNode;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface MkAccordionProps {
|
|
10
|
-
items: MkAccordionItem[];
|
|
11
|
-
multiple?: boolean;
|
|
12
|
-
defaultExpanded?: string[];
|
|
13
|
-
expanded?: string[];
|
|
14
|
-
onChange?: (expandedKeys: string[]) => void;
|
|
15
|
-
variant?: 'default' | 'bordered' | 'separated';
|
|
16
|
-
style?: ViewStyle;
|
|
17
|
-
}
|
|
18
|
-
export declare const MkAccordion: React.FC<MkAccordionProps>;
|
|
19
|
-
//# sourceMappingURL=MkAccordion.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
/**
|
|
4
|
-
* @module MkAlert (Mobile)
|
|
5
|
-
* @description Inline alert banner. Same API as mk-web MkAlert.
|
|
6
|
-
*/
|
|
7
|
-
export interface MkAlertProps {
|
|
8
|
-
variant?: 'info' | 'success' | 'warning' | 'error' | 'default';
|
|
9
|
-
title?: string;
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
icon?: React.ReactNode;
|
|
12
|
-
dismissible?: boolean;
|
|
13
|
-
onDismiss?: () => void;
|
|
14
|
-
action?: React.ReactNode;
|
|
15
|
-
style?: ViewStyle;
|
|
16
|
-
}
|
|
17
|
-
export declare const MkAlert: React.FC<MkAlertProps>;
|
|
18
|
-
//# sourceMappingURL=MkAlert.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
export interface MkAvatarProps {
|
|
4
|
-
src?: string | null;
|
|
5
|
-
name?: string;
|
|
6
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
7
|
-
status?: 'online' | 'offline' | 'away' | 'busy' | null;
|
|
8
|
-
style?: ViewStyle;
|
|
9
|
-
onPress?: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const MkAvatar: React.FC<MkAvatarProps>;
|
|
12
|
-
//# sourceMappingURL=MkAvatar.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
export interface MkBadgeProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
variant?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
6
|
-
size?: 'sm' | 'md';
|
|
7
|
-
dot?: boolean;
|
|
8
|
-
style?: ViewStyle;
|
|
9
|
-
}
|
|
10
|
-
export declare const MkBadge: React.FC<MkBadgeProps>;
|
|
11
|
-
//# sourceMappingURL=MkBadge.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
interface MkButtonProps {
|
|
4
|
-
label: string;
|
|
5
|
-
variant?: 'primary' | 'outline' | 'ghost' | 'error';
|
|
6
|
-
loading?: boolean;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
onPress?: () => void;
|
|
9
|
-
style?: ViewStyle;
|
|
10
|
-
}
|
|
11
|
-
export declare const MkButton: React.FC<MkButtonProps>;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=MkButton.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
export interface MkCardProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
title?: string;
|
|
6
|
-
subtitle?: string;
|
|
7
|
-
headerRight?: React.ReactNode;
|
|
8
|
-
footer?: React.ReactNode;
|
|
9
|
-
variant?: 'default' | 'outlined' | 'elevated';
|
|
10
|
-
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
11
|
-
onPress?: () => void;
|
|
12
|
-
style?: ViewStyle;
|
|
13
|
-
}
|
|
14
|
-
export declare const MkCard: React.FC<MkCardProps>;
|
|
15
|
-
//# sourceMappingURL=MkCard.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
/**
|
|
4
|
-
* @module MkCheck
|
|
5
|
-
* @description Checkbox component for React Native. Same prop API as mk-web MkCheck.
|
|
6
|
-
*/
|
|
7
|
-
export interface MkCheckProps {
|
|
8
|
-
label?: string;
|
|
9
|
-
checked?: boolean;
|
|
10
|
-
indeterminate?: boolean;
|
|
11
|
-
onChange?: (checked: boolean) => void;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
error?: string;
|
|
14
|
-
size?: 'sm' | 'md' | 'lg';
|
|
15
|
-
style?: ViewStyle;
|
|
16
|
-
}
|
|
17
|
-
export declare const MkCheck: React.FC<MkCheckProps>;
|
|
18
|
-
//# sourceMappingURL=MkCheck.d.ts.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
/**
|
|
4
|
-
* @module MkDatePicker (Mobile)
|
|
5
|
-
* @description Dependency-free DatePicker wrapper for React Native.
|
|
6
|
-
* Uses a dynamic import for `@react-native-community/datetimepicker` to show a modal picker.
|
|
7
|
-
*
|
|
8
|
-
* **Requires**: `npm install @react-native-community/datetimepicker`
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* <MkDatePicker
|
|
13
|
-
* label="Fecha de nacimiento"
|
|
14
|
-
* value="2000-01-01"
|
|
15
|
-
* onChange={setDate}
|
|
16
|
-
* />
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export interface MkDatePickerProps {
|
|
20
|
-
label?: string;
|
|
21
|
-
value?: string;
|
|
22
|
-
onChange?: (value: string) => void;
|
|
23
|
-
error?: string;
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
min?: string;
|
|
26
|
-
max?: string;
|
|
27
|
-
style?: ViewStyle;
|
|
28
|
-
}
|
|
29
|
-
export declare const MkDatePicker: React.FC<MkDatePickerProps>;
|
|
30
|
-
//# sourceMappingURL=MkDatePicker.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
export interface MkDividerProps {
|
|
4
|
-
label?: string;
|
|
5
|
-
orientation?: 'horizontal' | 'vertical';
|
|
6
|
-
variant?: 'solid' | 'dashed' | 'dotted';
|
|
7
|
-
spacing?: 'sm' | 'md' | 'lg';
|
|
8
|
-
style?: ViewStyle;
|
|
9
|
-
}
|
|
10
|
-
export declare const MkDivider: React.FC<MkDividerProps>;
|
|
11
|
-
//# sourceMappingURL=MkDivider.d.ts.map
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ViewStyle } from 'react-native';
|
|
3
|
-
/**
|
|
4
|
-
* @module MkDropDown (Mobile)
|
|
5
|
-
* @description Floating action menu as a Modal bottom-sheet-style popup.
|
|
6
|
-
* Same prop API as mk-web's MkDropDown: options, onSelect, withSearch, value.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* <MkDropDown
|
|
11
|
-
* options={[
|
|
12
|
-
* { value: 'edit', label: 'Editar', icon: <EditIcon /> },
|
|
13
|
-
* { value: 'delete', label: 'Eliminar' },
|
|
14
|
-
* ]}
|
|
15
|
-
* onSelect={(val) => handleAction(val)}
|
|
16
|
-
* withSearch
|
|
17
|
-
* />
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export interface MkDropdownOptionType {
|
|
21
|
-
value: string | number;
|
|
22
|
-
label: string;
|
|
23
|
-
icon?: React.ReactNode;
|
|
24
|
-
}
|
|
25
|
-
export interface MkDropDownProps {
|
|
26
|
-
options: MkDropdownOptionType[];
|
|
27
|
-
onSelect: (value: string | number) => void;
|
|
28
|
-
/** Custom trigger element. Default: "⋮" icon. */
|
|
29
|
-
initiator?: React.ReactNode;
|
|
30
|
-
withSearch?: boolean;
|
|
31
|
-
value?: string | number;
|
|
32
|
-
placeholder?: string;
|
|
33
|
-
/** Style for the container */
|
|
34
|
-
style?: ViewStyle;
|
|
35
|
-
}
|
|
36
|
-
export declare const MkDropDown: React.FC<MkDropDownProps>;
|
|
37
|
-
//# sourceMappingURL=MkDropDown.d.ts.map
|
|
@@ -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
|