@hero-design/rn 8.104.1-alpha.2 → 8.105.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 +6 -10
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +683 -402
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +683 -401
- package/package.json +1 -1
- package/src/components/Calendar/CalendarRange.tsx +35 -117
- package/src/components/Calendar/__tests__/helper.spec.ts +197 -0
- package/src/components/Calendar/constants.ts +9 -0
- package/src/components/Calendar/helpers.ts +112 -0
- package/src/components/Calendar/index.tsx +34 -159
- package/src/components/Calendar/shared/hooks/useCalendarLayout.ts +37 -0
- package/src/components/Calendar/types.ts +62 -0
- package/src/components/DatePicker/DatePickerCalendar.tsx +2 -1
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +2 -0
- package/src/components/SegmentedControl/SegmentedItem.tsx +192 -0
- package/src/components/SegmentedControl/StyledSegmentedControl.tsx +62 -0
- package/src/components/SegmentedControl/__tests__/SegmentedItem.spec.tsx +162 -0
- package/src/components/SegmentedControl/__tests__/__snapshots__/SegmentedItem.spec.tsx.snap +131 -0
- package/src/components/SegmentedControl/__tests__/__snapshots__/index.spec.tsx.snap +359 -0
- package/src/components/SegmentedControl/__tests__/index.spec.tsx +247 -0
- package/src/components/SegmentedControl/index.tsx +61 -0
- package/src/components/SegmentedControl/types.ts +46 -0
- package/src/components/Typography/Body/StyledBody.tsx +2 -2
- package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +51 -0
- package/src/components/Typography/Body/__tests__/index.spec.tsx +1 -0
- package/src/components/Typography/Body/index.tsx +2 -13
- package/src/components/Typography/Caption/StyledCaption.tsx +2 -2
- package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +50 -0
- package/src/components/Typography/Caption/__tests__/index.spec.tsx +1 -0
- package/src/components/Typography/Caption/index.tsx +2 -13
- package/src/components/Typography/Label/StyledLabel.tsx +2 -2
- package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +48 -0
- package/src/components/Typography/Label/__tests__/index.spec.tsx +1 -0
- package/src/components/Typography/Label/index.tsx +2 -13
- package/src/components/Typography/Title/StyledTitle.tsx +2 -2
- package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +51 -0
- package/src/components/Typography/Title/__tests__/index.spec.tsx +1 -0
- package/src/components/Typography/Title/index.tsx +2 -13
- package/src/components/Typography/types.ts +3 -2
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +54 -0
- package/src/theme/components/segmentedControl.ts +60 -0
- package/src/theme/components/typography.ts +1 -0
- package/src/theme/getTheme.ts +3 -0
- package/src/types.ts +2 -0
- package/stats/8.104.0/rn-stats.html +3 -1
- package/stats/8.105.0/rn-stats.html +4844 -0
- package/types/components/Calendar/CalendarRange.d.ts +4 -16
- package/types/components/Calendar/constants.d.ts +4 -0
- package/types/components/Calendar/helpers.d.ts +14 -0
- package/types/components/Calendar/index.d.ts +5 -56
- package/types/components/Calendar/shared/hooks/useCalendarLayout.d.ts +8 -0
- package/types/components/Calendar/types.d.ts +58 -0
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/SegmentedControl/SegmentedItem.d.ts +18 -0
- package/types/components/SegmentedControl/StyledSegmentedControl.d.ts +26 -0
- package/types/components/SegmentedControl/index.d.ts +31 -0
- package/types/components/SegmentedControl/types.d.ts +43 -0
- package/types/components/TextInput/index.d.ts +1 -1
- package/types/components/Typography/Body/StyledBody.d.ts +2 -2
- package/types/components/Typography/Body/index.d.ts +2 -1
- package/types/components/Typography/Caption/StyledCaption.d.ts +2 -2
- package/types/components/Typography/Caption/index.d.ts +2 -1
- package/types/components/Typography/Label/StyledLabel.d.ts +2 -2
- package/types/components/Typography/Label/index.d.ts +2 -1
- package/types/components/Typography/Title/StyledTitle.d.ts +2 -2
- package/types/components/Typography/Title/index.d.ts +2 -1
- package/types/components/Typography/types.d.ts +1 -1
- package/types/index.d.ts +2 -1
- package/types/theme/components/segmentedControl.d.ts +46 -0
- package/types/theme/components/typography.d.ts +1 -0
- package/types/theme/getTheme.d.ts +2 -0
- package/types/types.d.ts +2 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import type { TextProps as NativeTextProps, StyleProp, TextStyle } from 'react-native';
|
|
4
|
+
import type { TypographyIntent } from '../types';
|
|
4
5
|
export interface TitleProps extends NativeTextProps {
|
|
5
6
|
/**
|
|
6
7
|
* Text content.
|
|
@@ -9,7 +10,7 @@ export interface TitleProps extends NativeTextProps {
|
|
|
9
10
|
/**
|
|
10
11
|
* Visual intent color to apply to the text.
|
|
11
12
|
*/
|
|
12
|
-
intent?:
|
|
13
|
+
intent?: TypographyIntent;
|
|
13
14
|
/**
|
|
14
15
|
* Additional style.
|
|
15
16
|
*/
|
|
@@ -3,4 +3,4 @@ export declare const FONTWEIGHT_MAP: {
|
|
|
3
3
|
readonly regular: "regular";
|
|
4
4
|
readonly 'semi-bold': "semiBold";
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type TypographyIntent = 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted' | 'archived' | 'disabled' | 'muted' | 'inactive';
|
package/types/index.d.ts
CHANGED
|
@@ -55,8 +55,9 @@ import PageControl from './components/PageControl';
|
|
|
55
55
|
import Portal from './components/Portal';
|
|
56
56
|
import { ScrollViewWithFAB, SectionListWithFAB, FlatListWithFAB } from './components/AnimatedScroller';
|
|
57
57
|
import Search from './components/Search';
|
|
58
|
+
import SegmentedControl from './components/SegmentedControl';
|
|
58
59
|
import FloatingIsland from './components/FloatingIsland';
|
|
59
60
|
import LocaleProvider from './components/LocaleProvider';
|
|
60
61
|
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, };
|
|
62
|
+
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, SegmentedControl, ScrollViewWithFAB, SectionHeading, SectionListWithFAB, Select, Success, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, Rate, RefreshControl, RichTextEditor, FloatingIsland, LocaleProvider, FilterTrigger, styled, };
|
|
62
63
|
export * from './types';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { GlobalTheme } from '../global';
|
|
2
|
+
declare const getSegmentedControlTheme: (theme: GlobalTheme) => {
|
|
3
|
+
sizes: {
|
|
4
|
+
itemHeight: {
|
|
5
|
+
medium: number;
|
|
6
|
+
large: number;
|
|
7
|
+
};
|
|
8
|
+
wrapperHeight: {
|
|
9
|
+
medium: number;
|
|
10
|
+
large: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
colors: {
|
|
14
|
+
itemBackground: {
|
|
15
|
+
inactive: string;
|
|
16
|
+
active: string;
|
|
17
|
+
};
|
|
18
|
+
wrapperBackground: string;
|
|
19
|
+
};
|
|
20
|
+
shadows: {
|
|
21
|
+
item: {
|
|
22
|
+
inactive: undefined;
|
|
23
|
+
active: import("../global/shadows/types").ShadowStyles;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
radii: {
|
|
27
|
+
item: {
|
|
28
|
+
medium: number;
|
|
29
|
+
large: number;
|
|
30
|
+
};
|
|
31
|
+
wrapper: {
|
|
32
|
+
medium: number;
|
|
33
|
+
large: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
space: {
|
|
37
|
+
wrapperHorizontalPadding: number;
|
|
38
|
+
itemLabelGap: number;
|
|
39
|
+
itemLabelMarginEnd: number;
|
|
40
|
+
itemAffixGap: number;
|
|
41
|
+
};
|
|
42
|
+
lineHeights: {
|
|
43
|
+
itemText: number | undefined;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export default getSegmentedControlTheme;
|
|
@@ -53,6 +53,7 @@ import getFloatingIslandTheme from './components/floatingIsland';
|
|
|
53
53
|
import getAppCueTheme from './components/appCue';
|
|
54
54
|
import { ThemeMode } from './global/colors/types';
|
|
55
55
|
import getFilterTriggerTheme from './components/filterTrigger';
|
|
56
|
+
import getSegmentedControlTheme from './components/segmentedControl';
|
|
56
57
|
type Theme = GlobalTheme & {
|
|
57
58
|
themeMode?: ThemeMode;
|
|
58
59
|
} & {
|
|
@@ -110,6 +111,7 @@ type Theme = GlobalTheme & {
|
|
|
110
111
|
toolbar: ReturnType<typeof getToolbarTheme>;
|
|
111
112
|
typography: ReturnType<typeof getTypographyTheme>;
|
|
112
113
|
floatingIsland: ReturnType<typeof getFloatingIslandTheme>;
|
|
114
|
+
segmentedControl: ReturnType<typeof getSegmentedControlTheme>;
|
|
113
115
|
};
|
|
114
116
|
};
|
|
115
117
|
declare const getTheme: (scale?: Scale, systemPallete?: SystemPalette) => Theme;
|
package/types/types.d.ts
CHANGED
|
@@ -38,4 +38,5 @@ import { PinInputHandler } from './components/PinInput';
|
|
|
38
38
|
import { ThemeScale } from './components/Box/types';
|
|
39
39
|
import { TimePickerProps } from './components/TimePicker/types';
|
|
40
40
|
import { DatePickerProps } from './components/DatePicker/types';
|
|
41
|
-
|
|
41
|
+
import type { SegmentedControlItemConfig } from './components/SegmentedControl/types';
|
|
42
|
+
export type { Space, CaptionProps, Radii, TitleProps, CarouselData, CarouselImageProps, PinInputHandler, ThemeScale, ToastProps, ActionGroupProps, ToolbarItemProps, BottomNavigationTabType, IconName, SingleSelectProps, MultiSelectProps, ListRenderOptionInfo, SectionListRenderOptionInfo, SelectOptionType, SwipeableProps, RichTextEditorProps, RichTextEditorRef, TabType, TextInputProps, TextProps, TextInputHandles, Theme, CardCarouselHandles, FABHandles, ActionGroupHandles, ActionItemProps, SliderRangeValue, CalendarDateRange, LocaleCode, LocaleValues, DateTimeFormats, ColumnChartProps, LineChartProps, Scale, SystemPalette, BrandSystemPalette, GlobalSystemPalette, IconProps, CheckboxProps, SwitchOptionType, BoxProps, BodyProps, ToolbarButtonName, ListItemProps, IconButtonProps, BadgeProps, TimePickerProps, DatePickerProps, SegmentedControlItemConfig, };
|