@hero-design/rn 8.40.3 → 8.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +613 -709
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +615 -713
- package/package.json +7 -8
- package/rollup.config.js +0 -1
- package/src/components/Error/StyledError.tsx +2 -1
- package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +115 -97
- package/src/components/Error/__tests__/index.spec.tsx +9 -6
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +1 -0
- package/src/components/Modal/__tests__/__snapshots__/index.spec.tsx.snap +117 -0
- package/src/components/Modal/__tests__/index.spec.tsx +99 -0
- package/src/components/Modal/index.tsx +178 -82
- package/src/components/Portal/__tests__/__snapshots__/index.spec.tsx.snap +29 -0
- package/src/components/Portal/__tests__/index.spec.tsx +19 -0
- package/src/components/Portal/index.tsx +18 -5
- package/src/components/Success/StyledSuccess.tsx +2 -1
- package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +115 -95
- package/src/components/Success/__tests__/index.spec.tsx +9 -6
- package/src/index.ts +0 -2
- package/testUtils/setup.tsx +0 -18
- package/types/components/Error/StyledError.d.ts +3 -5
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/components/Modal/index.d.ts +12 -8
- package/types/components/Portal/index.d.ts +10 -5
- package/types/components/Success/StyledSuccess.d.ts +3 -5
- package/types/index.d.ts +1 -2
- package/src/components/Modal/ModalContentWrapper.tsx +0 -112
- package/src/components/Modal/ModalPresenter/ModalPresenter.tsx +0 -135
- package/src/components/Modal/ModalPresenter/index.tsx +0 -9
- package/src/components/Modal/ModalProvider.tsx +0 -8
- package/types/components/Modal/ModalContentWrapper.d.ts +0 -16
- package/types/components/Modal/ModalPresenter/ModalPresenter.d.ts +0 -34
- package/types/components/Modal/ModalPresenter/index.d.ts +0 -3
- package/types/components/Modal/ModalProvider.d.ts +0 -5
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ViewProps } from 'react-native';
|
|
3
|
-
export type ModalPresenterHandles = {
|
|
4
|
-
animatedOut: (completion?: () => void) => void;
|
|
5
|
-
};
|
|
6
|
-
export type ModalDismissFunc = (onDismiss?: () => void) => void;
|
|
7
|
-
export type ModalUpdateFunc = (content: React.ReactNode) => void;
|
|
8
|
-
/**
|
|
9
|
-
* Modal handler is returned by `showModal` function.
|
|
10
|
-
*/
|
|
11
|
-
export type ModalHandler = {
|
|
12
|
-
/**
|
|
13
|
-
* Same `dismiss` function as in `ModalContentProps`.
|
|
14
|
-
*/
|
|
15
|
-
dismiss: ModalDismissFunc;
|
|
16
|
-
/**
|
|
17
|
-
* Same `update` function as in `ModalContentProps`.
|
|
18
|
-
*/
|
|
19
|
-
update: ModalUpdateFunc;
|
|
20
|
-
};
|
|
21
|
-
declare const ModalPresenter: React.ForwardRefExoticComponent<ViewProps & React.RefAttributes<ModalPresenterHandles>>;
|
|
22
|
-
/**
|
|
23
|
-
* Present a modal on screen immediately.
|
|
24
|
-
*
|
|
25
|
-
* The new presented modal will be on top of existing modals if there are any.
|
|
26
|
-
*
|
|
27
|
-
* @param Content A component to be presented as a modal on screen.
|
|
28
|
-
* This component will be centered horizontally and vertically on screen with
|
|
29
|
-
* a semitransparent black overlay underneath.
|
|
30
|
-
* @param contentProps Props for this modal component.
|
|
31
|
-
* @returns A `ModalHandler` you can use to dismiss the modal.
|
|
32
|
-
*/
|
|
33
|
-
export declare const showModal: (content: React.ReactNode) => ModalHandler;
|
|
34
|
-
export default ModalPresenter;
|