@hero-design/rn 8.103.7 → 8.104.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 +3 -3
- package/CHANGELOG.md +12 -0
- package/es/index.js +215 -18
- package/lib/index.js +215 -17
- package/package.json +1 -1
- package/src/components/FilterTrigger/StyledFilterTrigger.tsx +104 -0
- package/src/components/FilterTrigger/__tests__/__snapshots__/index.spec.tsx.snap +637 -0
- package/src/components/FilterTrigger/__tests__/index.spec.tsx +161 -0
- package/src/components/FilterTrigger/index.tsx +106 -0
- package/src/components/Icon/HeroIcon/index.tsx +3 -1
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +45 -0
- package/src/components/Icon/__tests__/index.spec.tsx +1 -0
- package/src/components/Icon/index.tsx +2 -1
- package/src/components/Toolbar/StyledToolbar.tsx +0 -1
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarMessage.spec.tsx.snap +0 -4
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +71 -0
- package/src/theme/components/filterTrigger.ts +88 -0
- package/src/theme/components/icon.ts +1 -0
- package/src/theme/getTheme.ts +3 -0
- package/stats/8.104.0/rn-stats.html +4844 -0
- package/types/components/FilterTrigger/StyledFilterTrigger.d.ts +20 -0
- package/types/components/FilterTrigger/index.d.ts +39 -0
- package/types/components/Icon/HeroIcon/index.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/index.d.ts +2 -1
- package/types/theme/components/filterTrigger.d.ts +72 -0
- package/types/theme/components/icon.d.ts +1 -0
- package/types/theme/getTheme.d.ts +2 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type Variant = 'filled' | 'outlined' | 'ghost';
|
|
2
|
+
export declare const StyledFilterWrapper: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & import("react").RefAttributes<import("react-native").View> & {
|
|
3
|
+
theme?: import("@emotion/react").Theme;
|
|
4
|
+
as?: React.ElementType;
|
|
5
|
+
} & {
|
|
6
|
+
themeActive: boolean;
|
|
7
|
+
themeVariant: Variant;
|
|
8
|
+
themeHasLabel: boolean;
|
|
9
|
+
}, {}, {}>;
|
|
10
|
+
export declare const StyledBadge: import("@emotion/native").StyledComponent<(import("../Badge").BadgeProps & {
|
|
11
|
+
theme?: import("@emotion/react").Theme;
|
|
12
|
+
as?: React.ElementType;
|
|
13
|
+
}) & {
|
|
14
|
+
themeHasLabel: boolean;
|
|
15
|
+
}, {}, {}>;
|
|
16
|
+
export declare const StyledText: import("@emotion/native").StyledComponent<import("../..").BodyProps & {
|
|
17
|
+
theme?: import("@emotion/react").Theme;
|
|
18
|
+
as?: React.ElementType;
|
|
19
|
+
}, {}, {}>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { IconName } from '../Icon';
|
|
4
|
+
export interface FilterTriggerProps {
|
|
5
|
+
/**
|
|
6
|
+
* The label of the FilterTrigger.
|
|
7
|
+
*/
|
|
8
|
+
label?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the filter is currently active
|
|
11
|
+
*/
|
|
12
|
+
active?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The number of active filters
|
|
15
|
+
*/
|
|
16
|
+
filterCount?: number;
|
|
17
|
+
/**
|
|
18
|
+
* The testID of the FilterTrigger.
|
|
19
|
+
*/
|
|
20
|
+
testID?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The style of the FilterTrigger.
|
|
23
|
+
*/
|
|
24
|
+
style?: StyleProp<ViewStyle>;
|
|
25
|
+
/**
|
|
26
|
+
* The onPress callback
|
|
27
|
+
*/
|
|
28
|
+
onPress?: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* The variant of the FilterTrigger.
|
|
31
|
+
*/
|
|
32
|
+
variant?: 'filled' | 'outlined' | 'ghost';
|
|
33
|
+
/**
|
|
34
|
+
* The suffix of the FilterTrigger.
|
|
35
|
+
*/
|
|
36
|
+
suffix?: IconName;
|
|
37
|
+
}
|
|
38
|
+
declare const FilterTrigger: ({ label, active, filterCount, variant, suffix, onPress, testID, style, }: FilterTriggerProps) => React.JSX.Element;
|
|
39
|
+
export default FilterTrigger;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type ThemeSize = 'xxxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
2
|
-
type ThemeIntent = 'text' | 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted' | 'muted';
|
|
2
|
+
type ThemeIntent = 'text' | 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted' | 'muted' | 'inactive';
|
|
3
3
|
declare const StyledHeroIcon: import("@emotion/native").StyledComponent<import("react-native-vector-icons/Icon").IconProps & {
|
|
4
4
|
theme?: import("@emotion/react").Theme;
|
|
5
5
|
as?: React.ElementType;
|
|
@@ -10,7 +10,7 @@ export interface IconProps extends AccessibilityProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* Intent of the Icon.
|
|
12
12
|
*/
|
|
13
|
-
intent?: 'text' | 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted' | 'muted';
|
|
13
|
+
intent?: 'text' | 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted' | 'muted' | 'inactive';
|
|
14
14
|
/**
|
|
15
15
|
* Size of the Icon.
|
|
16
16
|
*/
|
package/types/index.d.ts
CHANGED
|
@@ -57,5 +57,6 @@ import { ScrollViewWithFAB, SectionListWithFAB, FlatListWithFAB } from './compon
|
|
|
57
57
|
import Search from './components/Search';
|
|
58
58
|
import FloatingIsland from './components/FloatingIsland';
|
|
59
59
|
import LocaleProvider from './components/LocaleProvider';
|
|
60
|
-
|
|
60
|
+
import FilterTrigger from './components/FilterTrigger';
|
|
61
|
+
export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, withTheme, swagSystemPalette, swagLightSystemPalette, swagLightJobsSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, ehWorkDarkSystemPalette, ehWorkSystemPalette, ehJobsSystemPalette, Accordion, Alert, AppCue, Attachment, Avatar, useAvatarColors, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Chart, 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, LocaleProvider, FilterTrigger, styled, };
|
|
61
62
|
export * from './types';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { GlobalTheme } from '../global';
|
|
2
|
+
declare const getFilterTriggerTheme: (theme: GlobalTheme) => {
|
|
3
|
+
colors: {
|
|
4
|
+
wrapper: {
|
|
5
|
+
activeBackground: string;
|
|
6
|
+
inactiveBackground: string;
|
|
7
|
+
background: {
|
|
8
|
+
active: {
|
|
9
|
+
filled: string;
|
|
10
|
+
outlined: string;
|
|
11
|
+
ghost: string;
|
|
12
|
+
filledLabeless: string;
|
|
13
|
+
};
|
|
14
|
+
inactive: {
|
|
15
|
+
filled: string;
|
|
16
|
+
outlined: string;
|
|
17
|
+
ghost: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
border: {
|
|
21
|
+
active: {
|
|
22
|
+
filled: string;
|
|
23
|
+
outlined: string;
|
|
24
|
+
ghost: string;
|
|
25
|
+
filledLabeless: string;
|
|
26
|
+
};
|
|
27
|
+
inactive: {
|
|
28
|
+
filled: string;
|
|
29
|
+
outlined: string;
|
|
30
|
+
ghost: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
space: {
|
|
36
|
+
wrapper: {
|
|
37
|
+
default: {
|
|
38
|
+
paddingHorizontal: number;
|
|
39
|
+
paddingVertical: number;
|
|
40
|
+
};
|
|
41
|
+
labeless: {
|
|
42
|
+
paddingHorizontal: number;
|
|
43
|
+
paddingVertical: number;
|
|
44
|
+
};
|
|
45
|
+
itemGap: number;
|
|
46
|
+
};
|
|
47
|
+
badge: {
|
|
48
|
+
labelessRight: number;
|
|
49
|
+
labelessBottom: number;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
radii: {
|
|
53
|
+
wrapper: {
|
|
54
|
+
default: number;
|
|
55
|
+
labeless: number;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
borderWidths: {
|
|
59
|
+
wrapper: {
|
|
60
|
+
filled: number;
|
|
61
|
+
outlined: number;
|
|
62
|
+
ghost: number;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
sizes: {
|
|
66
|
+
wrapperHeight: number;
|
|
67
|
+
};
|
|
68
|
+
lineHeights: {
|
|
69
|
+
text: number;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
export default getFilterTriggerTheme;
|
|
@@ -52,6 +52,7 @@ import getMapPinTheme from './components/mapPin';
|
|
|
52
52
|
import getFloatingIslandTheme from './components/floatingIsland';
|
|
53
53
|
import getAppCueTheme from './components/appCue';
|
|
54
54
|
import { ThemeMode } from './global/colors/types';
|
|
55
|
+
import getFilterTriggerTheme from './components/filterTrigger';
|
|
55
56
|
type Theme = GlobalTheme & {
|
|
56
57
|
themeMode?: ThemeMode;
|
|
57
58
|
} & {
|
|
@@ -80,6 +81,7 @@ type Theme = GlobalTheme & {
|
|
|
80
81
|
empty: EmptyThemeType;
|
|
81
82
|
error: ErrorThemeType;
|
|
82
83
|
fab: FABThemeType;
|
|
84
|
+
filterTrigger: ReturnType<typeof getFilterTriggerTheme>;
|
|
83
85
|
icon: ReturnType<typeof getIconTheme>;
|
|
84
86
|
image: ReturnType<typeof getImageTheme>;
|
|
85
87
|
list: ReturnType<typeof getListTheme>;
|