@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.
Files changed (77) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/CHANGELOG.md +6 -10
  3. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  4. package/es/index.js +683 -402
  5. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  6. package/lib/index.js +683 -401
  7. package/package.json +1 -1
  8. package/src/components/Calendar/CalendarRange.tsx +35 -117
  9. package/src/components/Calendar/__tests__/helper.spec.ts +197 -0
  10. package/src/components/Calendar/constants.ts +9 -0
  11. package/src/components/Calendar/helpers.ts +112 -0
  12. package/src/components/Calendar/index.tsx +34 -159
  13. package/src/components/Calendar/shared/hooks/useCalendarLayout.ts +37 -0
  14. package/src/components/Calendar/types.ts +62 -0
  15. package/src/components/DatePicker/DatePickerCalendar.tsx +2 -1
  16. package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
  17. package/src/components/Icon/IconList.ts +2 -0
  18. package/src/components/SegmentedControl/SegmentedItem.tsx +192 -0
  19. package/src/components/SegmentedControl/StyledSegmentedControl.tsx +62 -0
  20. package/src/components/SegmentedControl/__tests__/SegmentedItem.spec.tsx +162 -0
  21. package/src/components/SegmentedControl/__tests__/__snapshots__/SegmentedItem.spec.tsx.snap +131 -0
  22. package/src/components/SegmentedControl/__tests__/__snapshots__/index.spec.tsx.snap +359 -0
  23. package/src/components/SegmentedControl/__tests__/index.spec.tsx +247 -0
  24. package/src/components/SegmentedControl/index.tsx +61 -0
  25. package/src/components/SegmentedControl/types.ts +46 -0
  26. package/src/components/Typography/Body/StyledBody.tsx +2 -2
  27. package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +51 -0
  28. package/src/components/Typography/Body/__tests__/index.spec.tsx +1 -0
  29. package/src/components/Typography/Body/index.tsx +2 -13
  30. package/src/components/Typography/Caption/StyledCaption.tsx +2 -2
  31. package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +50 -0
  32. package/src/components/Typography/Caption/__tests__/index.spec.tsx +1 -0
  33. package/src/components/Typography/Caption/index.tsx +2 -13
  34. package/src/components/Typography/Label/StyledLabel.tsx +2 -2
  35. package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +48 -0
  36. package/src/components/Typography/Label/__tests__/index.spec.tsx +1 -0
  37. package/src/components/Typography/Label/index.tsx +2 -13
  38. package/src/components/Typography/Title/StyledTitle.tsx +2 -2
  39. package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +51 -0
  40. package/src/components/Typography/Title/__tests__/index.spec.tsx +1 -0
  41. package/src/components/Typography/Title/index.tsx +2 -13
  42. package/src/components/Typography/types.ts +3 -2
  43. package/src/index.ts +2 -0
  44. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +54 -0
  45. package/src/theme/components/segmentedControl.ts +60 -0
  46. package/src/theme/components/typography.ts +1 -0
  47. package/src/theme/getTheme.ts +3 -0
  48. package/src/types.ts +2 -0
  49. package/stats/8.104.0/rn-stats.html +3 -1
  50. package/stats/8.105.0/rn-stats.html +4844 -0
  51. package/types/components/Calendar/CalendarRange.d.ts +4 -16
  52. package/types/components/Calendar/constants.d.ts +4 -0
  53. package/types/components/Calendar/helpers.d.ts +14 -0
  54. package/types/components/Calendar/index.d.ts +5 -56
  55. package/types/components/Calendar/shared/hooks/useCalendarLayout.d.ts +8 -0
  56. package/types/components/Calendar/types.d.ts +58 -0
  57. package/types/components/Icon/IconList.d.ts +1 -1
  58. package/types/components/Icon/index.d.ts +1 -1
  59. package/types/components/SegmentedControl/SegmentedItem.d.ts +18 -0
  60. package/types/components/SegmentedControl/StyledSegmentedControl.d.ts +26 -0
  61. package/types/components/SegmentedControl/index.d.ts +31 -0
  62. package/types/components/SegmentedControl/types.d.ts +43 -0
  63. package/types/components/TextInput/index.d.ts +1 -1
  64. package/types/components/Typography/Body/StyledBody.d.ts +2 -2
  65. package/types/components/Typography/Body/index.d.ts +2 -1
  66. package/types/components/Typography/Caption/StyledCaption.d.ts +2 -2
  67. package/types/components/Typography/Caption/index.d.ts +2 -1
  68. package/types/components/Typography/Label/StyledLabel.d.ts +2 -2
  69. package/types/components/Typography/Label/index.d.ts +2 -1
  70. package/types/components/Typography/Title/StyledTitle.d.ts +2 -2
  71. package/types/components/Typography/Title/index.d.ts +2 -1
  72. package/types/components/Typography/types.d.ts +1 -1
  73. package/types/index.d.ts +2 -1
  74. package/types/theme/components/segmentedControl.d.ts +46 -0
  75. package/types/theme/components/typography.d.ts +1 -0
  76. package/types/theme/getTheme.d.ts +2 -0
  77. 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?: 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted' | 'archived' | 'disabled' | 'muted';
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 ThemeIntent = 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted' | 'archived' | 'disabled' | 'muted';
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;
@@ -13,6 +13,7 @@ declare const getTypographyTheme: (theme: GlobalTheme) => {
13
13
  archived: string;
14
14
  disabled: string;
15
15
  muted: string;
16
+ inactive: string;
16
17
  };
17
18
  fonts: import("../global/typography").Fonts;
18
19
  fontSizes: {
@@ -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
- 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, };
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, };