@hero-design/rn 8.25.2 → 8.26.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.
Files changed (35) hide show
  1. package/.turbo/turbo-build.log +8 -9
  2. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  3. package/es/index.js +282 -186
  4. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  5. package/lib/index.js +282 -186
  6. package/package.json +5 -5
  7. package/src/components/FAB/ActionGroup/ActionItem.tsx +6 -1
  8. package/src/components/FAB/ActionGroup/StyledActionItem.tsx +1 -4
  9. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +374 -202
  10. package/src/components/FAB/ActionGroup/index.tsx +15 -9
  11. package/src/components/FAB/AnimatedFABIcon.tsx +5 -3
  12. package/src/components/FAB/FAB.tsx +16 -3
  13. package/src/components/FAB/StyledFAB.tsx +10 -3
  14. package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +4 -4
  15. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -2
  16. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +74 -43
  17. package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
  18. package/src/components/Icon/IconList.ts +1 -0
  19. package/src/components/Switch/SelectorSwitch/Option.tsx +31 -5
  20. package/src/components/Switch/SelectorSwitch/StyledSelectorSwitch.tsx +18 -4
  21. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +25 -18
  22. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +49 -18
  23. package/src/components/Switch/SelectorSwitch/index.tsx +81 -17
  24. package/src/components/Switch/index.tsx +1 -0
  25. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +7 -9
  26. package/src/theme/components/fab.ts +7 -9
  27. package/types/components/FAB/ActionGroup/ActionItem.d.ts +1 -0
  28. package/types/components/FAB/StyledFAB.d.ts +5 -1
  29. package/types/components/Icon/IconList.d.ts +1 -1
  30. package/types/components/Icon/index.d.ts +1 -1
  31. package/types/components/Icon/utils.d.ts +1 -1
  32. package/types/components/Switch/SelectorSwitch/Option.d.ts +4 -1
  33. package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +15 -9
  34. package/types/components/Switch/SelectorSwitch/index.d.ts +1 -1
  35. package/types/theme/components/fab.d.ts +4 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.25.2",
3
+ "version": "8.26.0",
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.2",
24
+ "@hero-design/colors": "8.26.0",
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.2",
48
+ "@hero-design/eslint-plugin": "8.26.0",
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,9 @@
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.2",
64
+ "eslint-config-hd": "8.26.0",
65
65
  "jest": "^27.3.1",
66
- "prettier-config-hd": "8.25.2",
66
+ "prettier-config-hd": "8.26.0",
67
67
  "react": "18.0.0",
68
68
  "react-native": "0.69.7",
69
69
  "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>
@@ -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,