@hero-design/rn 7.12.1 → 7.14.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 (185) hide show
  1. package/.eslintrc.json +3 -1
  2. package/.turbo/turbo-build.log +3 -2
  3. package/assets/fonts/hero-icons.ttf +0 -0
  4. package/babel.config.js +16 -0
  5. package/es/index.js +35840 -16325
  6. package/lib/assets/fonts/hero-icons.ttf +0 -0
  7. package/lib/index.js +35847 -16327
  8. package/package.json +9 -4
  9. package/rollup.config.js +1 -0
  10. package/src/components/Accordion/AccordionItem.tsx +50 -0
  11. package/src/components/Accordion/StyledAccordion.tsx +29 -0
  12. package/src/components/Accordion/__tests__/AccordionItem.spec.tsx +56 -0
  13. package/src/components/Accordion/__tests__/StyledAccordion.spec.tsx +17 -0
  14. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +529 -0
  15. package/src/components/Accordion/__tests__/__snapshots__/StyledAccordion.spec.tsx.snap +33 -0
  16. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +822 -0
  17. package/src/components/Accordion/__tests__/index.spec.tsx +54 -0
  18. package/src/components/Accordion/index.tsx +82 -0
  19. package/src/components/Accordion/utils.tsx +11 -0
  20. package/src/components/Button/Button.tsx +64 -60
  21. package/src/components/Button/IconButton.tsx +1 -1
  22. package/src/components/Button/StyledButton.tsx +4 -6
  23. package/src/components/Button/__tests__/StyledButton.spec.tsx +11 -4
  24. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +312 -78
  25. package/src/components/Calendar/CalendarRowItem.tsx +54 -0
  26. package/src/components/Calendar/StyledCalendar.tsx +76 -0
  27. package/src/components/Calendar/__tests__/CalendarRowItem.spec.tsx +76 -0
  28. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +411 -0
  29. package/src/components/Calendar/__tests__/helper.spec.ts +50 -0
  30. package/src/components/Calendar/__tests__/index.spec.tsx +99 -0
  31. package/src/components/Calendar/helpers.ts +29 -0
  32. package/src/components/Calendar/index.tsx +217 -0
  33. package/src/components/Collapse/index.tsx +13 -15
  34. package/src/components/ContentNavigator/index.tsx +6 -0
  35. package/src/components/DatePicker/DatePickerAndroid.tsx +59 -0
  36. package/src/components/DatePicker/DatePickerIOS.tsx +87 -0
  37. package/src/components/DatePicker/StyledDatePicker.tsx +8 -0
  38. package/src/components/DatePicker/__tests__/DatePicker.spec.tsx +34 -0
  39. package/src/components/DatePicker/__tests__/DatePickerAndroid.spec.tsx +39 -0
  40. package/src/components/DatePicker/__tests__/DatePickerIOS.spec.tsx +46 -0
  41. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +199 -0
  42. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +513 -0
  43. package/src/components/DatePicker/index.tsx +15 -0
  44. package/src/components/DatePicker/types.ts +49 -0
  45. package/src/components/Empty/StyledEmpty.tsx +47 -0
  46. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +66 -0
  47. package/src/components/Empty/__tests__/index.spec.tsx +17 -0
  48. package/src/components/Empty/index.tsx +53 -0
  49. package/src/components/FAB/ActionGroup/ActionItem.tsx +6 -2
  50. package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +1 -0
  51. package/src/components/FAB/ActionGroup/StyledActionItem.tsx +7 -1
  52. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +84 -22
  53. package/src/components/FAB/ActionGroup/index.tsx +8 -1
  54. package/src/components/Icon/HeroIcon/selection.json +1 -1
  55. package/src/components/Icon/IconList.ts +13 -0
  56. package/src/components/List/BasicListItem.tsx +44 -34
  57. package/src/components/List/ListItem.tsx +67 -58
  58. package/src/components/List/StyledBasicListItem.tsx +2 -3
  59. package/src/components/List/StyledListItem.tsx +2 -2
  60. package/src/components/List/__tests__/StyledBasicListItem.spec.tsx +5 -2
  61. package/src/components/List/__tests__/StyledListItem.spec.tsx +4 -1
  62. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +15 -10
  63. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +52 -32
  64. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +128 -48
  65. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +132 -52
  66. package/src/components/RichTextEditor/EditorEvent.ts +7 -0
  67. package/src/components/RichTextEditor/EditorToolbar.tsx +220 -0
  68. package/src/components/RichTextEditor/MentionList.tsx +69 -0
  69. package/src/components/RichTextEditor/RichTextEditor.tsx +396 -0
  70. package/src/components/RichTextEditor/StyledRichTextEditor.ts +20 -0
  71. package/src/components/RichTextEditor/StyledToolbar.ts +32 -0
  72. package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +130 -0
  73. package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +109 -0
  74. package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +245 -0
  75. package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +324 -0
  76. package/src/components/RichTextEditor/__tests__/__snapshots__/MentionList.spec.tsx.snap +45 -0
  77. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +526 -0
  78. package/src/components/RichTextEditor/constants.ts +20 -0
  79. package/src/components/RichTextEditor/hero-editor.d.ts +8 -0
  80. package/src/components/RichTextEditor/index.tsx +8 -0
  81. package/src/components/RichTextEditor/utils/events.ts +31 -0
  82. package/src/components/RichTextEditor/utils/rnWebView.ts +19 -0
  83. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +77 -0
  84. package/src/components/SectionHeading/__tests__/index.spec.tsx +14 -0
  85. package/src/components/SectionHeading/index.tsx +16 -9
  86. package/src/components/Tag/StyledTag.tsx +12 -2
  87. package/src/components/Tag/__tests__/Tag.spec.tsx +35 -8
  88. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +118 -4
  89. package/src/components/Tag/index.tsx +9 -2
  90. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +1 -0
  91. package/src/components/TimePicker/TimePickerIOS.tsx +1 -1
  92. package/src/components/TimePicker/types.ts +1 -1
  93. package/src/components/Typography/Text/StyledText.tsx +2 -1
  94. package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +1 -0
  95. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +22 -0
  96. package/src/components/Typography/Text/index.tsx +2 -1
  97. package/src/index.ts +10 -0
  98. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +119 -4
  99. package/src/theme/components/accordion.ts +19 -0
  100. package/src/theme/components/button.ts +12 -0
  101. package/src/theme/components/calendar.ts +34 -0
  102. package/src/theme/components/card.ts +1 -1
  103. package/src/theme/components/datePicker.ts +11 -0
  104. package/src/theme/components/empty.ts +38 -0
  105. package/src/theme/components/fab.ts +4 -3
  106. package/src/theme/components/list.ts +1 -0
  107. package/src/theme/components/pinInput.ts +1 -1
  108. package/src/theme/components/richTextEditor.ts +34 -0
  109. package/src/theme/components/tag.ts +8 -2
  110. package/src/theme/components/typography.ts +1 -0
  111. package/src/theme/global/borders.ts +6 -6
  112. package/src/theme/global/colors.ts +5 -1
  113. package/src/theme/index.ts +15 -0
  114. package/testUtils/setup.tsx +17 -0
  115. package/types/components/Accordion/AccordionItem.d.ts +14 -0
  116. package/types/components/Accordion/StyledAccordion.d.ts +32 -0
  117. package/types/components/Accordion/__tests__/AccordionItem.spec.d.ts +1 -0
  118. package/types/components/Accordion/__tests__/StyledAccordion.spec.d.ts +1 -0
  119. package/types/components/Accordion/__tests__/index.spec.d.ts +1 -0
  120. package/types/components/Accordion/index.d.ts +38 -0
  121. package/types/components/Accordion/utils.d.ts +1 -0
  122. package/types/components/Button/IconButton.d.ts +1 -1
  123. package/types/components/Button/StyledButton.d.ts +3 -3
  124. package/types/components/Calendar/CalendarRowItem.d.ts +10 -0
  125. package/types/components/Calendar/StyledCalendar.d.ts +54 -0
  126. package/types/components/Calendar/__tests__/CalendarRowItem.spec.d.ts +1 -0
  127. package/types/components/Calendar/__tests__/helper.spec.d.ts +1 -0
  128. package/types/components/Calendar/__tests__/index.spec.d.ts +1 -0
  129. package/types/components/Calendar/helpers.d.ts +3 -0
  130. package/types/components/Calendar/index.d.ts +40 -0
  131. package/types/components/Collapse/index.d.ts +1 -1
  132. package/types/components/ContentNavigator/index.d.ts +5 -1
  133. package/types/components/DatePicker/DatePickerAndroid.d.ts +3 -0
  134. package/types/components/DatePicker/DatePickerIOS.d.ts +3 -0
  135. package/types/components/DatePicker/StyledDatePicker.d.ts +8 -0
  136. package/types/components/DatePicker/__tests__/DatePicker.spec.d.ts +1 -0
  137. package/types/components/DatePicker/__tests__/DatePickerAndroid.spec.d.ts +1 -0
  138. package/types/components/DatePicker/__tests__/DatePickerIOS.spec.d.ts +1 -0
  139. package/types/components/DatePicker/index.d.ts +3 -0
  140. package/types/components/DatePicker/types.d.ts +48 -0
  141. package/types/components/Empty/StyledEmpty.d.ts +31 -0
  142. package/types/components/Empty/__tests__/index.spec.d.ts +1 -0
  143. package/types/components/Empty/index.d.ts +26 -0
  144. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +6 -1
  145. package/types/components/FAB/ActionGroup/index.d.ts +6 -1
  146. package/types/components/FAB/index.d.ts +1 -1
  147. package/types/components/Icon/IconList.d.ts +1 -1
  148. package/types/components/Icon/utils.d.ts +1 -1
  149. package/types/components/List/StyledBasicListItem.d.ts +3 -3
  150. package/types/components/List/StyledListItem.d.ts +3 -3
  151. package/types/components/RichTextEditor/EditorEvent.d.ts +3 -0
  152. package/types/components/RichTextEditor/EditorToolbar.d.ts +17 -0
  153. package/types/components/RichTextEditor/MentionList.d.ts +12 -0
  154. package/types/components/RichTextEditor/RichTextEditor.d.ts +65 -0
  155. package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +16 -0
  156. package/types/components/RichTextEditor/StyledToolbar.d.ts +21 -0
  157. package/types/components/RichTextEditor/__tests__/EditorToolbar.spec.d.ts +1 -0
  158. package/types/components/RichTextEditor/__tests__/MentionList.spec.d.ts +1 -0
  159. package/types/components/RichTextEditor/__tests__/RichTextEditor.spec.d.ts +1 -0
  160. package/types/components/RichTextEditor/constants.d.ts +19 -0
  161. package/types/components/RichTextEditor/index.d.ts +5 -0
  162. package/types/components/RichTextEditor/utils/events.d.ts +8 -0
  163. package/types/components/RichTextEditor/utils/rnWebView.d.ts +7 -0
  164. package/types/components/SectionHeading/index.d.ts +2 -2
  165. package/types/components/Select/MultiSelect/OptionList.d.ts +1 -1
  166. package/types/components/Select/SingleSelect/OptionList.d.ts +1 -1
  167. package/types/components/Tag/StyledTag.d.ts +1 -1
  168. package/types/components/Tag/index.d.ts +1 -1
  169. package/types/components/TimePicker/types.d.ts +1 -1
  170. package/types/components/Typography/Text/StyledText.d.ts +1 -1
  171. package/types/components/Typography/Text/index.d.ts +1 -1
  172. package/types/index.d.ts +6 -1
  173. package/types/theme/components/accordion.d.ts +13 -0
  174. package/types/theme/components/button.d.ts +12 -0
  175. package/types/theme/components/calendar.d.ts +26 -0
  176. package/types/theme/components/datePicker.d.ts +6 -0
  177. package/types/theme/components/empty.d.ts +28 -0
  178. package/types/theme/components/fab.d.ts +1 -0
  179. package/types/theme/components/list.d.ts +1 -0
  180. package/types/theme/components/richTextEditor.d.ts +26 -0
  181. package/types/theme/components/tag.d.ts +8 -2
  182. package/types/theme/components/typography.d.ts +1 -0
  183. package/types/theme/global/colors.d.ts +5 -1
  184. package/types/theme/global/index.d.ts +5 -1
  185. package/types/theme/index.d.ts +10 -0
@@ -0,0 +1,65 @@
1
+ import React, { Ref } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ export interface RichTextEditorRef {
4
+ requestBlur: VoidFunction;
5
+ }
6
+ export declare type EditorValue = {
7
+ type: string;
8
+ children: any;
9
+ }[];
10
+ export interface RichTextEditorProps {
11
+ /**
12
+ * Error message
13
+ */
14
+ error?: string;
15
+ /**
16
+ * Field value
17
+ */
18
+ value?: EditorValue;
19
+ /**
20
+ * Unique name used to communicate with webview
21
+ */
22
+ name: string;
23
+ /**
24
+ * Callback function called when the field value changed
25
+ */
26
+ onChange: (data: EditorValue) => void;
27
+ /**
28
+ * Callback function called when the cursor position changed
29
+ */
30
+ onCursorChange?: (params: {
31
+ position: {
32
+ top: number;
33
+ };
34
+ }) => void;
35
+ /**
36
+ * Field placeholder
37
+ */
38
+ placeholder?: string;
39
+ /**
40
+ * Additional styles
41
+ */
42
+ style?: StyleProp<ViewStyle>;
43
+ /**
44
+ * Field label
45
+ */
46
+ label: string;
47
+ /**
48
+ * Field helper text
49
+ */
50
+ helpText?: string;
51
+ /**
52
+ * Whether the input is required, if true, an asterisk will be appended to the label.
53
+ * */
54
+ required?: boolean;
55
+ /**
56
+ * Testing ID of the component
57
+ */
58
+ testID?: string;
59
+ /**
60
+ * Imperative ref to expose the component method
61
+ */
62
+ forwardedRef?: Ref<RichTextEditorRef>;
63
+ }
64
+ declare const _default: React.ForwardRefExoticComponent<Omit<RichTextEditorProps, "forwardedRef"> & React.RefAttributes<RichTextEditorRef>>;
65
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { View } from 'react-native';
2
+ import { WebView } from 'react-native-webview';
3
+ export declare const StyledWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
4
+ theme?: import("@emotion/react").Theme | undefined;
5
+ as?: import("react").ElementType<any> | undefined;
6
+ }, {}, {
7
+ ref?: import("react").Ref<View> | undefined;
8
+ }>;
9
+ export declare const StyledWebView: import("@emotion/native").StyledComponent<import("react-native-webview/lib/WebViewTypes").IOSWebViewProps & import("react-native-webview/lib/WebViewTypes").AndroidWebViewProps & import("react-native-webview/lib/WebViewTypes").WindowsWebViewProps & {
10
+ theme?: import("@emotion/react").Theme | undefined;
11
+ as?: import("react").ElementType<any> | undefined;
12
+ } & {
13
+ height: number | undefined;
14
+ }, {}, {
15
+ ref?: import("react").Ref<WebView<unknown>> | undefined;
16
+ }>;
@@ -0,0 +1,21 @@
1
+ import { TouchableOpacity, View } from 'react-native';
2
+ export declare const StyledToolbarButton: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ } & {
6
+ selected: boolean;
7
+ }, {}, {
8
+ ref?: import("react").Ref<TouchableOpacity> | undefined;
9
+ }>;
10
+ export declare const StyledToolbar: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
11
+ theme?: import("@emotion/react").Theme | undefined;
12
+ as?: import("react").ElementType<any> | undefined;
13
+ }, {}, {
14
+ ref?: import("react").Ref<View> | undefined;
15
+ }>;
16
+ export declare const StyledSeparator: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any> | undefined;
19
+ }, {}, {
20
+ ref?: import("react").Ref<View> | undefined;
21
+ }>;
@@ -0,0 +1,19 @@
1
+ export declare enum ToolbarEvents {
2
+ Bold = "bold",
3
+ Italic = "italic",
4
+ Underline = "underline",
5
+ BulletedList = "bulleted-list",
6
+ NumberedList = "numbered-list",
7
+ HeadingOne = "heading-one",
8
+ HeadingTwo = "heading-two"
9
+ }
10
+ export declare enum ToolbarButtonName {
11
+ Bold = "bold",
12
+ Italic = "italic",
13
+ Underline = "underline",
14
+ BulletedList = "bulletedList",
15
+ NumberedList = "numberedList",
16
+ HeadingOne = "headingOne",
17
+ HeadingTwo = "headingTwo",
18
+ Seperator = "|"
19
+ }
@@ -0,0 +1,5 @@
1
+ declare const _default: import("react").ForwardRefExoticComponent<Omit<import("./RichTextEditor").RichTextEditorProps, "forwardedRef"> & import("react").RefAttributes<import("./RichTextEditor").RichTextEditorRef>> & {
2
+ MentionList: ({ name: eventPrefix, render }: import("./MentionList").MentionListProps) => JSX.Element | null;
3
+ Toolbar: ({ name, buttons, testID, }: import("./EditorToolbar").EditorToolbarProps) => JSX.Element | null;
4
+ };
5
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { EventEmitter } from 'events';
2
+ export interface Listener<T> {
3
+ (data: T): void;
4
+ }
5
+ export declare const off: <T>(emitter: EventEmitter, eventName: string, listener: Listener<T>) => void;
6
+ export declare const emit: <T>(emitter: EventEmitter, eventName: string, data: T) => boolean;
7
+ export declare const setMaxListeners: (emitter: EventEmitter, n: number) => void;
8
+ export declare const on: <T>(emitter: EventEmitter, eventName: string, listener: Listener<T>) => () => void;
@@ -0,0 +1,7 @@
1
+ import WebView from 'react-native-webview';
2
+ export declare const requestBlurEditor: (element: WebView) => void;
3
+ export interface WebViewEventMessage {
4
+ type: string;
5
+ data: any;
6
+ }
7
+ export declare const postMessage: (element: WebView, message: WebViewEventMessage) => void;
@@ -1,6 +1,6 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { StyleProp, ViewProps, ViewStyle } from 'react-native';
3
- import { IconName } from '../Icon';
3
+ import { IconName, IconProps } from '../Icon';
4
4
  export interface SectionHeadingProps extends ViewProps {
5
5
  /**
6
6
  * Heading text.
@@ -9,7 +9,7 @@ export interface SectionHeadingProps extends ViewProps {
9
9
  /**
10
10
  * Name of the Icon.
11
11
  */
12
- icon?: IconName;
12
+ icon?: IconName | ReactElement<IconProps>;
13
13
  /**
14
14
  * Right corner content
15
15
  */
@@ -5,5 +5,5 @@ interface OptionListProps<T> extends MultiSelectProps<T> {
5
5
  */
6
6
  onPress: (value: T[]) => void;
7
7
  }
8
- declare const OptionList: <T>({ keyExtractor, loading, onEndReached, onPress, onQueryChange, options, value, }: Pick<OptionListProps<T>, "loading" | "onPress" | "value" | "options" | "keyExtractor" | "onEndReached" | "onQueryChange">) => JSX.Element;
8
+ declare const OptionList: <T>({ keyExtractor, loading, onEndReached, onPress, onQueryChange, options, value, }: Pick<OptionListProps<T>, "value" | "onPress" | "loading" | "options" | "keyExtractor" | "onEndReached" | "onQueryChange">) => JSX.Element;
9
9
  export default OptionList;
@@ -5,5 +5,5 @@ interface OptionListProps<T> extends SingleSelectProps<T> {
5
5
  */
6
6
  onPress: (value: T | null) => void;
7
7
  }
8
- declare const OptionList: <T>({ keyExtractor, loading, onEndReached, onPress, onQueryChange, options, value, }: Pick<OptionListProps<T>, "loading" | "onPress" | "value" | "options" | "keyExtractor" | "onEndReached" | "onQueryChange">) => JSX.Element;
8
+ declare const OptionList: <T>({ keyExtractor, loading, onEndReached, onPress, onQueryChange, options, value, }: Pick<OptionListProps<T>, "value" | "onPress" | "loading" | "options" | "keyExtractor" | "onEndReached" | "onQueryChange">) => JSX.Element;
9
9
  export default OptionList;
@@ -1,5 +1,5 @@
1
1
  import { View, Text } from 'react-native';
2
- declare type ThemeIntent = 'success' | 'warning' | 'danger' | 'info';
2
+ declare type ThemeIntent = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'archived';
3
3
  declare const StyledView: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
4
4
  theme?: import("@emotion/react").Theme | undefined;
5
5
  as?: import("react").ElementType<any> | undefined;
@@ -7,7 +7,7 @@ interface TagProps extends ViewProps {
7
7
  /**
8
8
  * Visual intent color to apply to Tag.
9
9
  */
10
- intent?: 'success' | 'warning' | 'danger' | 'info';
10
+ intent?: 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'archived';
11
11
  /**
12
12
  * Additional style.
13
13
  */
@@ -7,7 +7,7 @@ export interface TimePickerProps {
7
7
  /**
8
8
  * Current time value. Must be in correct default format or format provided via format prop.
9
9
  */
10
- value: Date | null;
10
+ value?: Date;
11
11
  /**
12
12
  * Input placeholder. Time format will be used as placeholder if not specified.
13
13
  */
@@ -5,7 +5,7 @@ declare const StyledText: import("@emotion/native").StyledComponent<import("reac
5
5
  } & {
6
6
  themeFontSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxxxlarge';
7
7
  themeFontWeight: 'light' | 'regular' | 'semi-bold';
8
- themeIntent: 'body' | 'subdued' | 'primary' | 'success' | 'info' | 'warning' | 'danger';
8
+ themeIntent: 'body' | 'subdued' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
9
9
  }, {}, {
10
10
  ref?: import("react").Ref<Text> | undefined;
11
11
  }>;
@@ -16,7 +16,7 @@ export interface TextProps extends NativeTextProps {
16
16
  /**
17
17
  * Visual intent color to apply to the text.
18
18
  */
19
- intent?: 'body' | 'subdued' | 'primary' | 'success' | 'info' | 'warning' | 'danger';
19
+ intent?: 'body' | 'subdued' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
20
20
  /**
21
21
  * Additional style.
22
22
  */
package/types/index.d.ts CHANGED
@@ -1,17 +1,21 @@
1
1
  import theme, { getTheme, ThemeProvider, useTheme } from './theme';
2
2
  import { scale } from './utils/scale';
3
+ import Accordion from './components/Accordion';
3
4
  import Alert from './components/Alert';
4
5
  import Avatar from './components/Avatar';
5
6
  import Badge from './components/Badge';
6
7
  import BottomNavigation from './components/BottomNavigation';
7
8
  import BottomSheet from './components/BottomSheet';
8
9
  import Button from './components/Button';
10
+ import Calendar from './components/Calendar';
9
11
  import Card from './components/Card';
10
12
  import Collapse from './components/Collapse';
11
13
  import Checkbox from './components/Checkbox';
12
14
  import ContentNavigator from './components/ContentNavigator';
15
+ import DatePicker from './components/DatePicker';
13
16
  import Divider from './components/Divider';
14
17
  import Drawer from './components/Drawer';
18
+ import Empty from './components/Empty';
15
19
  import FAB from './components/FAB';
16
20
  import Icon from './components/Icon';
17
21
  import List from './components/List';
@@ -29,5 +33,6 @@ import TimePicker from './components/TimePicker';
29
33
  import Toast from './components/Toast';
30
34
  import Toolbar from './components/Toolbar';
31
35
  import Typography from './components/Typography';
32
- export { theme, getTheme, useTheme, scale, ThemeProvider, Alert, Avatar, Badge, BottomNavigation, BottomSheet, Button, Card, Collapse, Checkbox, ContentNavigator, Divider, Drawer, FAB, Icon, List, PinInput, Progress, Spinner, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, };
36
+ import RichTextEditor from './components/RichTextEditor';
37
+ export { theme, getTheme, useTheme, scale, ThemeProvider, Accordion, Alert, Avatar, Badge, BottomNavigation, BottomSheet, Button, Calendar, Card, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, FAB, Icon, List, PinInput, Progress, Spinner, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RichTextEditor, };
33
38
  export * from './types';
@@ -0,0 +1,13 @@
1
+ import { GlobalTheme } from '../global';
2
+ declare const getAccordionTheme: (theme: GlobalTheme) => {
3
+ colors: {
4
+ background: string;
5
+ };
6
+ space: {
7
+ padding: number;
8
+ };
9
+ radii: {
10
+ card: number;
11
+ };
12
+ };
13
+ export default getAccordionTheme;
@@ -31,6 +31,18 @@ declare const getButtonTheme: (theme: GlobalTheme) => {
31
31
  disabledBackground: string;
32
32
  invertedText: string;
33
33
  utilityBackground: string;
34
+ underlayColors: {
35
+ 'filled-primary': string;
36
+ 'filled-secondary': string;
37
+ 'filled-danger': string;
38
+ 'outlined-primary': string;
39
+ 'outlined-secondary': string;
40
+ 'outlined-danger': string;
41
+ 'text-primary': string;
42
+ 'text-secondary': string;
43
+ 'text-danger': string;
44
+ 'basic-transparent': string;
45
+ };
34
46
  };
35
47
  lineHeight: {
36
48
  default: number;
@@ -0,0 +1,26 @@
1
+ import { GlobalTheme } from '../global';
2
+ declare const getCalendarTheme: (theme: GlobalTheme) => {
3
+ radii: {
4
+ default: number;
5
+ };
6
+ colors: {
7
+ background: string;
8
+ border: string;
9
+ primary: string;
10
+ inverted: string;
11
+ };
12
+ sizes: {
13
+ cellWidth: number;
14
+ cellHeight: number;
15
+ cellCircleWidth: number;
16
+ cellCircleHeight: number;
17
+ markWidth: number;
18
+ markHeight: number;
19
+ };
20
+ space: {
21
+ rowVerticalPadding: number;
22
+ headerVerticalPadding: number;
23
+ headerHorizontalPadding: number;
24
+ };
25
+ };
26
+ export default getCalendarTheme;
@@ -0,0 +1,6 @@
1
+ declare const getDatePickerTheme: () => {
2
+ sizes: {
3
+ height: number;
4
+ };
5
+ };
6
+ export default getDatePickerTheme;
@@ -0,0 +1,28 @@
1
+ import { GlobalTheme } from '../global';
2
+ declare const getEmptyTheme: (theme: GlobalTheme) => {
3
+ fontSizes: {
4
+ title: number;
5
+ description: number;
6
+ };
7
+ colors: {
8
+ text: string;
9
+ invertedText: string;
10
+ subduedText: string;
11
+ illustrationBackground: string;
12
+ };
13
+ sizes: {
14
+ illustration: number;
15
+ };
16
+ space: {
17
+ medium: number;
18
+ large: number;
19
+ };
20
+ fonts: {
21
+ title: string;
22
+ description: string;
23
+ };
24
+ radii: {
25
+ illustration: number;
26
+ };
27
+ };
28
+ export default getEmptyTheme;
@@ -20,6 +20,7 @@ declare const getFABTheme: (theme: GlobalTheme) => {
20
20
  actionItemBackground: string;
21
21
  backdropBackground: string;
22
22
  titleText: string;
23
+ actionItemText: string;
23
24
  };
24
25
  sizes: {
25
26
  width: number;
@@ -2,6 +2,7 @@ import { GlobalTheme } from '../global';
2
2
  declare const getListTheme: (theme: GlobalTheme) => {
3
3
  colors: {
4
4
  checkedListItemContainerBackground: string;
5
+ highlightedListItemContainerBackground: string;
5
6
  listItemContainerBackground: string;
6
7
  leadingStatus: {
7
8
  danger: string;
@@ -0,0 +1,26 @@
1
+ import { GlobalTheme } from '../global';
2
+ declare const getRichTextEditorTheme: (theme: GlobalTheme) => {
3
+ colors: {
4
+ toolbarBorderColor: string;
5
+ toolbarBackgroundColor: string;
6
+ toolbarButtonSelectedBackground: string;
7
+ };
8
+ space: {
9
+ wrapperMarginBottom: number;
10
+ toolbarHorizontalPadding: number;
11
+ editorPadding: number;
12
+ };
13
+ borderWidths: {
14
+ webViewBorderBottomWidth: number;
15
+ };
16
+ fontSizes: {
17
+ editor: number;
18
+ };
19
+ sizes: {
20
+ editorMinHeight: number;
21
+ toolbarButtonSize: number;
22
+ toolbarSeparatorWidth: number;
23
+ toolbarSeparatorHeight: number;
24
+ };
25
+ };
26
+ export default getRichTextEditorTheme;
@@ -4,14 +4,20 @@ declare const getTagTheme: (theme: GlobalTheme) => {
4
4
  default: number;
5
5
  };
6
6
  colors: {
7
- danger: string;
8
- dangerBackground: string;
7
+ default: string;
8
+ defaultBackground: undefined;
9
+ primary: string;
10
+ primaryBackground: string;
9
11
  info: string;
10
12
  infoBackground: string;
11
13
  success: string;
12
14
  successBackground: string;
13
15
  warning: string;
14
16
  warningBackground: string;
17
+ danger: string;
18
+ dangerBackground: string;
19
+ archived: string;
20
+ archivedBackground: string;
15
21
  };
16
22
  fonts: {
17
23
  default: string;
@@ -8,6 +8,7 @@ declare const getTypographyTheme: (theme: GlobalTheme) => {
8
8
  danger: string;
9
9
  warning: string;
10
10
  success: string;
11
+ inverted: string;
11
12
  };
12
13
  fonts: {
13
14
  light: string;
@@ -3,8 +3,10 @@ declare const systemPalette: {
3
3
  primaryLight: string;
4
4
  primaryDark: string;
5
5
  primaryBackground: string;
6
+ primaryBackgroundDark: string;
6
7
  secondary: string;
7
8
  secondaryLight: string;
9
+ secondaryBackground: string;
8
10
  info: string;
9
11
  infoMediumLight: string;
10
12
  infoLight: string;
@@ -30,8 +32,10 @@ declare const systemPalette: {
30
32
  disabledLightText: string;
31
33
  invertedText: string;
32
34
  outline: string;
33
- archivedDark: string;
34
35
  archived: string;
36
+ archivedLight: string;
37
+ archivedDark: string;
38
+ archivedBackground: string;
35
39
  black: string;
36
40
  inactiveBackground: string;
37
41
  shadow: string;
@@ -6,8 +6,10 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
6
6
  primaryLight: string;
7
7
  primaryDark: string;
8
8
  primaryBackground: string;
9
+ primaryBackgroundDark: string;
9
10
  secondary: string;
10
11
  secondaryLight: string;
12
+ secondaryBackground: string;
11
13
  info: string;
12
14
  infoMediumLight: string;
13
15
  infoLight: string;
@@ -33,8 +35,10 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
33
35
  disabledLightText: string;
34
36
  invertedText: string;
35
37
  outline: string;
36
- archivedDark: string;
37
38
  archived: string;
39
+ archivedLight: string;
40
+ archivedDark: string;
41
+ archivedBackground: string;
38
42
  black: string;
39
43
  inactiveBackground: string;
40
44
  shadow: string;
@@ -1,21 +1,26 @@
1
1
  import { GlobalTheme, Scale, SystemPalette } from './global';
2
+ import getAccordionTheme from './components/accordion';
2
3
  import getAlertTheme from './components/alert';
3
4
  import getAvatarTheme from './components/avatar';
4
5
  import getBadgeTheme from './components/badge';
5
6
  import getBottomNavigationTheme from './components/bottomNavigation';
6
7
  import getBottomSheetTheme from './components/bottomSheet';
7
8
  import getButtonTheme from './components/button';
9
+ import getCalendarTheme from './components/calendar';
8
10
  import getCardTheme from './components/card';
9
11
  import getCheckboxTheme from './components/checkbox';
10
12
  import getContentNavigatorTheme from './components/contentNavigator';
13
+ import getDatePickerTheme from './components/datePicker';
11
14
  import getDividerTheme from './components/divider';
12
15
  import getDrawerTheme from './components/drawer';
16
+ import getEmptyTheme from './components/empty';
13
17
  import getFABTheme from './components/fab';
14
18
  import getIconTheme from './components/icon';
15
19
  import getListTheme from './components/list';
16
20
  import getPinInputTheme from './components/pinInput';
17
21
  import getProgressTheme from './components/progress';
18
22
  import getRadioTheme from './components/radio';
23
+ import getRichTextEditorTheme from './components/richTextEditor';
19
24
  import getSectionHeadingTheme from './components/sectionHeading';
20
25
  import getSelectTheme from './components/select';
21
26
  import getSpinnerTheme from './components/spinner';
@@ -29,23 +34,28 @@ import getToolbarTheme from './components/toolbar';
29
34
  import getTypographyTheme from './components/typography';
30
35
  declare type Theme = GlobalTheme & {
31
36
  __hd__: {
37
+ accordion: ReturnType<typeof getAccordionTheme>;
32
38
  alert: ReturnType<typeof getAlertTheme>;
33
39
  avatar: ReturnType<typeof getAvatarTheme>;
34
40
  badge: ReturnType<typeof getBadgeTheme>;
35
41
  bottomNavigation: ReturnType<typeof getBottomNavigationTheme>;
36
42
  bottomSheet: ReturnType<typeof getBottomSheetTheme>;
37
43
  button: ReturnType<typeof getButtonTheme>;
44
+ calendar: ReturnType<typeof getCalendarTheme>;
38
45
  card: ReturnType<typeof getCardTheme>;
39
46
  checkbox: ReturnType<typeof getCheckboxTheme>;
40
47
  contentNavigator: ReturnType<typeof getContentNavigatorTheme>;
48
+ datePicker: ReturnType<typeof getDatePickerTheme>;
41
49
  divider: ReturnType<typeof getDividerTheme>;
42
50
  drawer: ReturnType<typeof getDrawerTheme>;
51
+ empty: ReturnType<typeof getEmptyTheme>;
43
52
  fab: ReturnType<typeof getFABTheme>;
44
53
  icon: ReturnType<typeof getIconTheme>;
45
54
  list: ReturnType<typeof getListTheme>;
46
55
  pinInput: ReturnType<typeof getPinInputTheme>;
47
56
  progress: ReturnType<typeof getProgressTheme>;
48
57
  radio: ReturnType<typeof getRadioTheme>;
58
+ richTextEditor: ReturnType<typeof getRichTextEditorTheme>;
49
59
  sectionHeading: ReturnType<typeof getSectionHeadingTheme>;
50
60
  select: ReturnType<typeof getSelectTheme>;
51
61
  spinner: ReturnType<typeof getSpinnerTheme>;