@hero-design/rn 8.5.0 → 8.6.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.
Files changed (31) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  3. package/es/index.js +456 -205
  4. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  5. package/lib/index.js +456 -204
  6. package/package.json +5 -5
  7. package/src/components/Carousel/CarouselItem.tsx +19 -7
  8. package/src/components/Carousel/StyledCarousel.tsx +13 -1
  9. package/src/components/Carousel/index.tsx +11 -1
  10. package/src/components/Carousel/types.ts +8 -2
  11. package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
  12. package/src/components/Icon/IconList.ts +2 -0
  13. package/src/components/List/ListItem.tsx +1 -5
  14. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +8 -8
  15. package/src/components/SwipeableV2/StyledSwipeable.tsx +14 -0
  16. package/src/components/SwipeableV2/__tests__/__snapshots__/index.spec.tsx.snap +161 -0
  17. package/src/components/SwipeableV2/__tests__/index.spec.tsx +48 -0
  18. package/src/components/SwipeableV2/index.tsx +364 -0
  19. package/src/index.ts +2 -0
  20. package/types/components/Calendar/helpers.d.ts +2 -2
  21. package/types/components/Carousel/StyledCarousel.d.ts +10 -2
  22. package/types/components/Carousel/index.d.ts +5 -1
  23. package/types/components/Carousel/types.d.ts +7 -2
  24. package/types/components/Icon/IconList.d.ts +1 -1
  25. package/types/components/Icon/index.d.ts +1 -1
  26. package/types/components/Icon/utils.d.ts +1 -1
  27. package/types/components/Select/helpers.d.ts +1 -1
  28. package/types/components/SwipeableV2/StyledSwipeable.d.ts +15 -0
  29. package/types/components/SwipeableV2/index.d.ts +46 -0
  30. package/types/index.d.ts +2 -1
  31. package/types/testHelpers/renderWithTheme.d.ts +1 -1
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+ import { GestureResponderEvent, PanResponderGestureState, StyleProp, ViewStyle } from 'react-native';
3
+ export declare type SwipeableV2Props = {
4
+ /**
5
+ * Content panel that is going to be revealed from the left side when user swipes right.
6
+ */
7
+ leftContent?: React.ReactNode;
8
+ /**
9
+ * Content panel that is going to be revealed from the right side when user swipes left.
10
+ */
11
+ rightContent?: React.ReactNode;
12
+ /**
13
+ * If the user swipe a distance greater than this value, the callback onSwipeRightEnd is called.
14
+ */
15
+ leftActionsWidth?: number;
16
+ /**
17
+ * If the user swipe a distance greater than this value, the callback onSwipeLeftEnd is called.
18
+ */
19
+ rightActionsWidth?: number;
20
+ /**
21
+ * Callback when start swiping to left.
22
+ */
23
+ onSwipeLeftStart?: (event: GestureResponderEvent, gestureState: PanResponderGestureState) => void;
24
+ /**
25
+ * Callback when end swiping to left.
26
+ */
27
+ onSwipeLeftEnd?: (event: GestureResponderEvent, gestureState: PanResponderGestureState) => void;
28
+ /**
29
+ * Callback when start swiping to right.
30
+ */
31
+ onSwipeRightStart?: (event: GestureResponderEvent, gestureState: PanResponderGestureState) => void;
32
+ /**
33
+ * Callback when end swiping to right.
34
+ */
35
+ onSwipeRightEnd?: (event: GestureResponderEvent, gestureState: PanResponderGestureState) => void;
36
+ /**
37
+ * additional styles
38
+ */
39
+ style?: StyleProp<ViewStyle>;
40
+ /**
41
+ * React node that is swipeable.
42
+ */
43
+ children: React.ReactNode;
44
+ };
45
+ declare const SwipeableV2: ({ children, leftContent, rightContent, style, leftActionsWidth, onSwipeLeftStart, onSwipeLeftEnd, rightActionsWidth, onSwipeRightStart, onSwipeRightEnd, ...rest }: SwipeableV2Props) => JSX.Element;
46
+ export default SwipeableV2;
package/types/index.d.ts CHANGED
@@ -28,6 +28,7 @@ import Progress from './components/Progress';
28
28
  import Slider from './components/Slider';
29
29
  import Spinner from './components/Spinner';
30
30
  import Swipeable from './components/Swipeable';
31
+ import SwipeableV2 from './components/SwipeableV2';
31
32
  import Radio from './components/Radio';
32
33
  import SectionHeading from './components/SectionHeading';
33
34
  import Select from './components/Select';
@@ -41,5 +42,5 @@ import Toolbar from './components/Toolbar';
41
42
  import Typography from './components/Typography';
42
43
  import RefreshControl from './components/RefreshControl';
43
44
  import RichTextEditor from './components/RichTextEditor';
44
- export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, swagSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, Accordion, Alert, Attachment, Avatar, useAvatarColors, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Carousel, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, FAB, Icon, Image, List, PinInput, Progress, Slider, Spinner, Swipeable, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RefreshControl, RichTextEditor, };
45
+ export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, swagSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, Accordion, Alert, Attachment, Avatar, useAvatarColors, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Carousel, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, FAB, Icon, Image, List, PinInput, Progress, Slider, Spinner, Swipeable, SwipeableV2, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RefreshControl, RichTextEditor, };
45
46
  export * from './types';
@@ -1,3 +1,3 @@
1
1
  import type { RenderOptions } from '@testing-library/react-native';
2
- declare const renderWithTheme: (ui: JSX.Element, options?: RenderOptions | undefined) => import("@testing-library/react-native").RenderAPI;
2
+ declare const renderWithTheme: (ui: JSX.Element, options?: RenderOptions) => import("@testing-library/react-native").RenderAPI;
3
3
  export default renderWithTheme;