@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.
- package/.turbo/turbo-build.log +8 -9
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +282 -186
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +282 -186
- package/package.json +5 -5
- package/src/components/FAB/ActionGroup/ActionItem.tsx +6 -1
- package/src/components/FAB/ActionGroup/StyledActionItem.tsx +1 -4
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +374 -202
- package/src/components/FAB/ActionGroup/index.tsx +15 -9
- package/src/components/FAB/AnimatedFABIcon.tsx +5 -3
- package/src/components/FAB/FAB.tsx +16 -3
- package/src/components/FAB/StyledFAB.tsx +10 -3
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +4 -4
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -2
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +74 -43
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +1 -0
- package/src/components/Switch/SelectorSwitch/Option.tsx +31 -5
- package/src/components/Switch/SelectorSwitch/StyledSelectorSwitch.tsx +18 -4
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +25 -18
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +49 -18
- package/src/components/Switch/SelectorSwitch/index.tsx +81 -17
- package/src/components/Switch/index.tsx +1 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +7 -9
- package/src/theme/components/fab.ts +7 -9
- package/types/components/FAB/ActionGroup/ActionItem.d.ts +1 -0
- package/types/components/FAB/StyledFAB.d.ts +5 -1
- 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/Switch/SelectorSwitch/Option.d.ts +4 -1
- package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +15 -9
- package/types/components/Switch/SelectorSwitch/index.d.ts +1 -1
- 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.
|
|
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.
|
|
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.
|
|
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.
|
|
64
|
+
"eslint-config-hd": "8.26.0",
|
|
65
65
|
"jest": "^27.3.1",
|
|
66
|
-
"prettier-config-hd": "8.
|
|
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
|
-
<
|
|
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
|
-
|
|
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,
|