@hero-design/rn 8.25.3 → 8.26.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 (39) hide show
  1. package/.eslintrc.js +2 -1
  2. package/.turbo/turbo-build.log +8 -9
  3. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  4. package/es/index.js +350 -198
  5. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  6. package/lib/index.js +350 -198
  7. package/package.json +6 -5
  8. package/src/components/FAB/ActionGroup/ActionItem.tsx +6 -1
  9. package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +17 -3
  10. package/src/components/FAB/ActionGroup/StyledActionItem.tsx +1 -4
  11. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +704 -1040
  12. package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +9 -15
  13. package/src/components/FAB/ActionGroup/index.tsx +111 -43
  14. package/src/components/FAB/AnimatedFABIcon.tsx +5 -3
  15. package/src/components/FAB/FAB.tsx +16 -3
  16. package/src/components/FAB/StyledFAB.tsx +10 -3
  17. package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +4 -4
  18. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -2
  19. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +74 -43
  20. package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
  21. package/src/components/Icon/IconList.ts +1 -0
  22. package/src/components/Switch/SelectorSwitch/Option.tsx +31 -5
  23. package/src/components/Switch/SelectorSwitch/StyledSelectorSwitch.tsx +18 -4
  24. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +25 -18
  25. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +49 -18
  26. package/src/components/Switch/SelectorSwitch/index.tsx +81 -17
  27. package/src/components/Switch/index.tsx +1 -0
  28. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +8 -9
  29. package/src/theme/components/fab.ts +8 -9
  30. package/types/components/FAB/ActionGroup/ActionItem.d.ts +1 -0
  31. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +7 -1
  32. package/types/components/FAB/StyledFAB.d.ts +5 -1
  33. package/types/components/Icon/IconList.d.ts +1 -1
  34. package/types/components/Icon/index.d.ts +1 -1
  35. package/types/components/Icon/utils.d.ts +1 -1
  36. package/types/components/Switch/SelectorSwitch/Option.d.ts +4 -1
  37. package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +15 -9
  38. package/types/components/Switch/SelectorSwitch/index.d.ts +1 -1
  39. package/types/theme/components/fab.d.ts +5 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.25.3",
3
+ "version": "8.26.1",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@emotion/native": "^11.9.3",
23
23
  "@emotion/react": "^11.9.3",
24
- "@hero-design/colors": "8.25.3",
24
+ "@hero-design/colors": "8.26.1",
25
25
  "date-fns": "^2.16.1",
26
26
  "events": "^3.2.0",
27
27
  "hero-editor": "^1.9.21"
@@ -45,7 +45,7 @@
45
45
  "@babel/preset-typescript": "^7.17.12",
46
46
  "@babel/runtime": "^7.18.9",
47
47
  "@emotion/jest": "^11.9.3",
48
- "@hero-design/eslint-plugin": "8.25.3",
48
+ "@hero-design/eslint-plugin": "8.26.1",
49
49
  "@react-native-community/datetimepicker": "^3.5.2",
50
50
  "@react-native-community/slider": "4.1.12",
51
51
  "@rollup/plugin-babel": "^5.3.1",
@@ -61,9 +61,10 @@
61
61
  "@types/react-native": "^0.67.7",
62
62
  "@types/react-native-vector-icons": "^6.4.10",
63
63
  "babel-plugin-inline-import": "^3.0.0",
64
- "eslint-config-hd": "8.25.3",
64
+ "eslint-config-hd": "8.26.1",
65
+ "eslint-plugin-import": "^2.27.5",
65
66
  "jest": "^27.3.1",
66
- "prettier-config-hd": "8.25.3",
67
+ "prettier-config-hd": "8.26.1",
67
68
  "react": "18.0.0",
68
69
  "react-native": "0.69.7",
69
70
  "react-native-gesture-handler": "~2.1.0",
@@ -8,6 +8,7 @@ import {
8
8
  StyledIcon,
9
9
  } from './StyledActionItem';
10
10
  import { useTheme } from '../../../theme';
11
+ import { StyledIconContainer } from '../StyledFAB';
11
12
 
12
13
  export interface ActionItemProps {
13
14
  testID?: string;
@@ -15,6 +16,7 @@ export interface ActionItemProps {
15
16
  icon: ComponentProps<typeof Icon>['icon'];
16
17
  onPress?: () => void;
17
18
  style?: StyleProp<ViewStyle>;
19
+ key?: string;
18
20
  }
19
21
  const ActionItem = ({
20
22
  icon,
@@ -24,6 +26,7 @@ const ActionItem = ({
24
26
  testID,
25
27
  }: ActionItemProps) => {
26
28
  const theme = useTheme();
29
+
27
30
  return (
28
31
  <StyledActionItem
29
32
  underlayColor={theme.__hd__.fab.colors.actionItemPressedBackground}
@@ -32,7 +35,9 @@ const ActionItem = ({
32
35
  testID={testID}
33
36
  >
34
37
  <>
35
- <StyledIcon icon={icon} />
38
+ <StyledIconContainer>
39
+ <StyledIcon size="xsmall" icon={icon} />
40
+ </StyledIconContainer>
36
41
  <StyledActionItemText>{title}</StyledActionItemText>
37
42
  </>
38
43
  </StyledActionItem>
@@ -34,10 +34,11 @@ const StyledBackdrop = styled(Animated.View)<
34
34
  ComponentProps<typeof Animated.View>
35
35
  >(({ theme }) => ({
36
36
  position: 'absolute',
37
- left: 0,
38
- right: 0,
39
- top: 0,
37
+ flex: 1,
38
+ height: '100%',
39
+ width: '100%',
40
40
  bottom: 0,
41
+ right: 0,
41
42
  backgroundColor: theme.__hd__.fab.colors.backdropBackground,
42
43
  }));
43
44
 
@@ -51,10 +52,23 @@ const StyledHeaderText = styled(Typography.Text)<TextProps>(({ theme }) => ({
51
52
  textAlign: 'right',
52
53
  }));
53
54
 
55
+ const StyledModalView = styled(View)({
56
+ position: 'absolute',
57
+ flex: 1,
58
+ height: '100%',
59
+ width: '100%',
60
+ bottom: 0,
61
+ right: 0,
62
+ justifyContent: 'flex-end',
63
+ alignItems: 'flex-end',
64
+ backgroundColor: 'transparent',
65
+ });
66
+
54
67
  export {
55
68
  StyledHeaderText,
56
69
  StyledBackdrop,
57
70
  StyledContainer,
58
71
  StyledActionGroupContainer,
59
72
  StyledFAB,
73
+ StyledModalView,
60
74
  };
@@ -6,10 +6,7 @@ import Icon from '../../Icon';
6
6
  import type { IconProps } from '../../Icon';
7
7
 
8
8
  const StyledActionItem = styled(TouchableHighlight)(({ theme }) => ({
9
- paddingLeft: theme.__hd__.fab.space.actionItemPaddingLeft,
10
- paddingRight: theme.__hd__.fab.space.actionItemPaddingRight,
11
- paddingTop: theme.__hd__.fab.space.actionItemPaddingTop,
12
- paddingBottom: theme.__hd__.fab.space.actionItemPaddingBottom,
9
+ padding: theme.__hd__.fab.space.actionItemPadding,
13
10
  margin: theme.__hd__.fab.space.actionItemMargin,
14
11
  marginRight: theme.__hd__.fab.space.actionItemMarginRight,
15
12
  backgroundColor: theme.__hd__.fab.colors.actionItemBackground,