@hero-design/rn 8.74.1 → 8.75.0
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 +2 -2
- package/CHANGELOG.md +6 -0
- package/es/index.js +243 -129
- package/lib/index.js +243 -128
- package/package.json +1 -1
- package/src/components/FloatingIsland/StyledFloatingIsland.tsx +32 -0
- package/src/components/FloatingIsland/__tests__/__snapshots__/index.spec.tsx.snap +561 -0
- package/src/components/FloatingIsland/__tests__/index.spec.tsx +67 -0
- package/src/components/FloatingIsland/index.tsx +94 -0
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +30 -0
- package/src/theme/components/floatingIsland.ts +31 -0
- package/src/theme/getTheme.ts +3 -0
- package/stats/8.75.0/rn-stats.html +4844 -0
- package/types/components/FloatingIsland/StyledFloatingIsland.d.ts +19 -0
- package/types/components/FloatingIsland/index.d.ts +23 -0
- package/types/index.d.ts +2 -1
- package/types/theme/components/floatingIsland.d.ts +32 -0
- package/types/theme/getTheme.d.ts +2 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const StyledWrapper: import("@emotion/native").StyledComponent<import("react-native/types").TouchableOpacityProps & {
|
|
2
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
3
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
4
|
+
}, {}, {
|
|
5
|
+
ref?: import("react").Ref<import("react-native/types").TouchableOpacity> | undefined;
|
|
6
|
+
}>;
|
|
7
|
+
declare const StyledPrefixWrapper: import("@emotion/native").StyledComponent<import("../Box").BoxProps & {
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
10
|
+
}, {}, {}>;
|
|
11
|
+
declare const StyledSuffixWrapper: import("@emotion/native").StyledComponent<import("../Box").BoxProps & {
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
14
|
+
}, {}, {}>;
|
|
15
|
+
declare const StyledIcon: import("@emotion/native").StyledComponent<import("../Icon").IconProps & {
|
|
16
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
17
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
18
|
+
}, {}, {}>;
|
|
19
|
+
export { StyledWrapper, StyledPrefixWrapper, StyledSuffixWrapper, StyledIcon };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ViewProps } from 'react-native';
|
|
3
|
+
import { IconName } from '../Icon';
|
|
4
|
+
export interface FloatingIslandProps extends ViewProps {
|
|
5
|
+
/**
|
|
6
|
+
* Callback that is called when the floating island is pressed.
|
|
7
|
+
*/
|
|
8
|
+
onPress?: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* Children of the floating island.
|
|
11
|
+
*/
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Prefix element that is displayed before the children.
|
|
15
|
+
*/
|
|
16
|
+
prefix?: IconName | ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Suffix element that is displayed after the children.
|
|
19
|
+
*/
|
|
20
|
+
suffix?: IconName | ReactNode;
|
|
21
|
+
}
|
|
22
|
+
declare const FloatingIsland: ({ onPress, onLayout, style, children, prefix, suffix, ...props }: FloatingIslandProps) => React.JSX.Element;
|
|
23
|
+
export default FloatingIsland;
|
package/types/index.d.ts
CHANGED
|
@@ -52,5 +52,6 @@ import PageControl from './components/PageControl';
|
|
|
52
52
|
import Portal from './components/Portal';
|
|
53
53
|
import { ScrollViewWithFAB, SectionListWithFAB, FlatListWithFAB } from './components/AnimatedScroller';
|
|
54
54
|
import Search from './components/Search';
|
|
55
|
-
|
|
55
|
+
import FloatingIsland from './components/FloatingIsland';
|
|
56
|
+
export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, withTheme, swagSystemPalette, swagLightSystemPalette, swagLightJobsSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, Accordion, Alert, Attachment, Avatar, useAvatarColors, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Carousel, Chip, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, Error, FAB, FlatListWithFAB, Icon, Image, HeroDesignProvider, MapPin, List, PinInput, Progress, Portal, PageControl, Skeleton, Slider, Spinner, Swipeable, Radio, Search, ScrollViewWithFAB, SectionHeading, SectionListWithFAB, Select, Success, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, Rate, RefreshControl, RichTextEditor, FloatingIsland, };
|
|
56
57
|
export * from './types';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { GlobalTheme } from '../global';
|
|
2
|
+
declare const getFloatingIslandTheme: (theme: GlobalTheme) => {
|
|
3
|
+
colors: {
|
|
4
|
+
wrapperBackground: string;
|
|
5
|
+
};
|
|
6
|
+
radii: {
|
|
7
|
+
wrapper: number;
|
|
8
|
+
};
|
|
9
|
+
shadows: {
|
|
10
|
+
wrapper: {
|
|
11
|
+
shadowOffset: {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
};
|
|
15
|
+
shadowColor: string;
|
|
16
|
+
shadowOpacity: number;
|
|
17
|
+
shadowRadius: number;
|
|
18
|
+
elevation: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
space: {
|
|
22
|
+
wrapperPadding: number;
|
|
23
|
+
wrapperTop: number;
|
|
24
|
+
prefixMarginRight: number;
|
|
25
|
+
suffixMarginLeft: number;
|
|
26
|
+
iconPadding: number;
|
|
27
|
+
};
|
|
28
|
+
fontSizes: {
|
|
29
|
+
iconSize: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export default getFloatingIslandTheme;
|
|
@@ -47,6 +47,7 @@ import getTypographyTheme from './components/typography';
|
|
|
47
47
|
import type { GlobalTheme, Scale, SystemPalette } from './global';
|
|
48
48
|
import getSearchTheme from './components/search';
|
|
49
49
|
import getMapPinTheme from './components/mapPin';
|
|
50
|
+
import getFloatingIslandTheme from './components/floatingIsland';
|
|
50
51
|
declare type Theme = GlobalTheme & {
|
|
51
52
|
__hd__: {
|
|
52
53
|
accordion: ReturnType<typeof getAccordionTheme>;
|
|
@@ -97,6 +98,7 @@ declare type Theme = GlobalTheme & {
|
|
|
97
98
|
toast: ReturnType<typeof getToastTheme>;
|
|
98
99
|
toolbar: ReturnType<typeof getToolbarTheme>;
|
|
99
100
|
typography: ReturnType<typeof getTypographyTheme>;
|
|
101
|
+
floatingIsland: ReturnType<typeof getFloatingIslandTheme>;
|
|
100
102
|
};
|
|
101
103
|
};
|
|
102
104
|
declare const getTheme: (scale?: Scale, systemPallete?: SystemPalette) => Theme;
|