@utilitywarehouse/hearth-react-native 0.2.0 → 0.3.1

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 (289) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-lint.log +3 -1
  3. package/CHANGELOG.md +34 -0
  4. package/build/components/Alert/AlertCloseButton.js +25 -3
  5. package/build/components/Alert/AlertIcon.js +17 -1
  6. package/build/components/Alert/AlertIconButton.js +27 -1
  7. package/build/components/Alert/AlertLink.js +47 -1
  8. package/build/components/Alert/AlertText.d.ts +1 -1
  9. package/build/components/Alert/AlertText.js +26 -2
  10. package/build/components/Alert/AlertTitle.d.ts +1 -1
  11. package/build/components/Alert/AlertTitle.js +26 -2
  12. package/build/components/Badge/Badge.js +101 -14
  13. package/build/components/Badge/Badge.props.d.ts +2 -2
  14. package/build/components/Badge/BadgeIcon.js +27 -29
  15. package/build/components/Badge/BadgeText.js +29 -31
  16. package/build/components/Button/Button.d.ts +2 -2
  17. package/build/components/Button/ButtonGroupRoot.d.ts +3 -2
  18. package/build/components/Button/ButtonGroupRoot.js +9 -0
  19. package/build/components/Button/ButtonRoot.js +1 -0
  20. package/build/components/Card/Card.props.d.ts +2 -2
  21. package/build/components/Checkbox/Checkbox.d.ts +2 -2
  22. package/build/components/Checkbox/Checkbox.js +11 -10
  23. package/build/components/Checkbox/Checkbox.props.d.ts +3 -1
  24. package/build/components/Checkbox/CheckboxIcon.js +1 -1
  25. package/build/components/Checkbox/CheckboxImage.d.ts +6 -0
  26. package/build/components/Checkbox/CheckboxImage.js +5 -0
  27. package/build/components/Checkbox/CheckboxTileRoot.js +1 -1
  28. package/build/components/Checkbox/index.d.ts +3 -2
  29. package/build/components/Checkbox/index.js +2 -1
  30. package/build/components/CurrencyInput/CurrencyInput.d.ts +6 -0
  31. package/build/components/CurrencyInput/CurrencyInput.js +47 -0
  32. package/build/components/CurrencyInput/CurrencyInput.props.d.ts +14 -0
  33. package/build/components/CurrencyInput/CurrencyInput.props.js +1 -0
  34. package/build/components/CurrencyInput/index.d.ts +1 -0
  35. package/build/components/CurrencyInput/index.js +1 -0
  36. package/build/components/DescriptionList/DescriptionList.context.d.ts +6 -0
  37. package/build/components/DescriptionList/DescriptionList.context.js +9 -0
  38. package/build/components/DescriptionList/DescriptionList.d.ts +6 -0
  39. package/build/components/DescriptionList/DescriptionList.js +25 -0
  40. package/build/components/DescriptionList/DescriptionList.props.d.ts +18 -0
  41. package/build/components/DescriptionList/DescriptionList.props.js +1 -0
  42. package/build/components/DescriptionList/DescriptionListItem.d.ts +6 -0
  43. package/build/components/DescriptionList/DescriptionListItem.js +49 -0
  44. package/build/components/DescriptionList/DescriptionListItem.props.d.ts +17 -0
  45. package/build/components/DescriptionList/DescriptionListItem.props.js +1 -0
  46. package/build/components/DescriptionList/index.d.ts +4 -0
  47. package/build/components/DescriptionList/index.js +2 -0
  48. package/build/components/Divider/Divider.js +46 -0
  49. package/build/components/Divider/Divider.props.d.ts +2 -2
  50. package/build/components/Flex/Flex.props.d.ts +3 -2
  51. package/build/components/Grid/Grid.props.d.ts +2 -2
  52. package/build/components/IconContainer/IconContainer.d.ts +5 -0
  53. package/build/components/IconContainer/IconContainer.js +161 -0
  54. package/build/components/IconContainer/IconContainer.props.d.ts +15 -0
  55. package/build/components/IconContainer/IconContainer.props.js +1 -0
  56. package/build/components/IconContainer/index.d.ts +2 -0
  57. package/build/components/IconContainer/index.js +1 -0
  58. package/build/components/Icons/CircleIcon.js +3 -3
  59. package/build/components/Input/Input.js +2 -34
  60. package/build/components/Input/Input.props.d.ts +1 -17
  61. package/build/components/Input/InputField.js +0 -7
  62. package/build/components/Link/Link.d.ts +1 -1
  63. package/build/components/Link/Link.js +4 -4
  64. package/build/components/Link/Link.props.d.ts +3 -0
  65. package/build/components/Modal/Modal.js +17 -1
  66. package/build/components/Radio/Radio.d.ts +2 -2
  67. package/build/components/Radio/Radio.js +9 -8
  68. package/build/components/Radio/Radio.props.d.ts +3 -1
  69. package/build/components/Radio/RadioImage.d.ts +6 -0
  70. package/build/components/Radio/RadioImage.js +5 -0
  71. package/build/components/Radio/RadioTileRoot.js +1 -1
  72. package/build/components/Radio/index.d.ts +3 -2
  73. package/build/components/Radio/index.js +2 -1
  74. package/build/components/SectionHeader/SectionHeader.js +1 -0
  75. package/build/components/Select/SelectOption.js +1 -7
  76. package/build/components/Tabs/Tab.d.ts +18 -0
  77. package/build/components/Tabs/Tab.js +74 -0
  78. package/build/components/Tabs/Tab.props.d.ts +14 -0
  79. package/build/components/Tabs/Tab.props.js +1 -0
  80. package/build/components/Tabs/TabPanel.d.ts +3 -0
  81. package/build/components/Tabs/TabPanel.js +34 -0
  82. package/build/components/Tabs/TabPanel.props.d.ts +8 -0
  83. package/build/components/Tabs/TabPanel.props.js +1 -0
  84. package/build/components/Tabs/Tabs.context.d.ts +23 -0
  85. package/build/components/Tabs/Tabs.context.js +8 -0
  86. package/build/components/Tabs/Tabs.d.ts +6 -0
  87. package/build/components/Tabs/Tabs.js +114 -0
  88. package/build/components/Tabs/Tabs.props.d.ts +19 -0
  89. package/build/components/Tabs/Tabs.props.js +1 -0
  90. package/build/components/Tabs/TabsList.d.ts +6 -0
  91. package/build/components/Tabs/TabsList.js +112 -0
  92. package/build/components/Tabs/TabsList.props.d.ts +6 -0
  93. package/build/components/Tabs/TabsList.props.js +1 -0
  94. package/build/components/Tabs/index.d.ts +8 -0
  95. package/build/components/Tabs/index.js +4 -0
  96. package/build/components/UnstyledIconButton/UnstyledIconButton.d.ts +1 -1
  97. package/build/components/UnstyledIconButton/UnstyledIconButton.js +4 -4
  98. package/build/components/UnstyledIconButton/UnstyledIconButton.props.d.ts +2 -1
  99. package/build/components/index.d.ts +4 -0
  100. package/build/components/index.js +4 -0
  101. package/build/core/themes.d.ts +428 -160
  102. package/build/core/themes.js +57 -1
  103. package/build/tokens/color.d.ts +88 -80
  104. package/build/tokens/color.js +44 -40
  105. package/build/tokens/components/dark/alert.d.ts +13 -0
  106. package/build/tokens/components/dark/alert.js +13 -0
  107. package/build/tokens/components/dark/button.d.ts +1 -0
  108. package/build/tokens/components/dark/button.js +1 -0
  109. package/build/tokens/components/dark/checkbox.d.ts +4 -1
  110. package/build/tokens/components/dark/checkbox.js +4 -1
  111. package/build/tokens/components/dark/icon-button.d.ts +10 -3
  112. package/build/tokens/components/dark/icon-button.js +10 -3
  113. package/build/tokens/components/dark/index.d.ts +1 -0
  114. package/build/tokens/components/dark/index.js +1 -0
  115. package/build/tokens/components/dark/link.d.ts +5 -0
  116. package/build/tokens/components/dark/link.js +5 -0
  117. package/build/tokens/components/dark/progress-bar.d.ts +41 -0
  118. package/build/tokens/components/dark/progress-bar.js +40 -0
  119. package/build/tokens/components/dark/radio.d.ts +1 -1
  120. package/build/tokens/components/dark/radio.js +1 -1
  121. package/build/tokens/components/dark/tabs.d.ts +2 -0
  122. package/build/tokens/components/dark/tabs.js +2 -0
  123. package/build/tokens/components/light/alert.d.ts +13 -0
  124. package/build/tokens/components/light/alert.js +13 -0
  125. package/build/tokens/components/light/badge.d.ts +1 -1
  126. package/build/tokens/components/light/badge.js +1 -1
  127. package/build/tokens/components/light/button.d.ts +1 -0
  128. package/build/tokens/components/light/button.js +1 -0
  129. package/build/tokens/components/light/checkbox.d.ts +6 -3
  130. package/build/tokens/components/light/checkbox.js +6 -3
  131. package/build/tokens/components/light/icon-button.d.ts +8 -1
  132. package/build/tokens/components/light/icon-button.js +8 -1
  133. package/build/tokens/components/light/index.d.ts +1 -0
  134. package/build/tokens/components/light/index.js +1 -0
  135. package/build/tokens/components/light/link.d.ts +5 -0
  136. package/build/tokens/components/light/link.js +5 -0
  137. package/build/tokens/components/light/progress-bar.d.ts +41 -0
  138. package/build/tokens/components/light/progress-bar.js +40 -0
  139. package/build/tokens/components/light/radio.d.ts +3 -3
  140. package/build/tokens/components/light/radio.js +3 -3
  141. package/build/tokens/components/light/tabs.d.ts +2 -0
  142. package/build/tokens/components/light/tabs.js +2 -0
  143. package/build/tokens/index.d.ts +1 -0
  144. package/build/tokens/index.js +1 -0
  145. package/build/tokens/layout.d.ts +48 -30
  146. package/build/tokens/layout.js +24 -15
  147. package/build/tokens/motion.d.ts +23 -0
  148. package/build/tokens/motion.js +22 -0
  149. package/build/tokens/primitive.d.ts +19 -0
  150. package/build/tokens/primitive.js +19 -0
  151. package/build/tokens/semantic-dark.d.ts +26 -24
  152. package/build/tokens/semantic-dark.js +26 -24
  153. package/build/tokens/semantic-light.d.ts +18 -16
  154. package/build/tokens/semantic-light.js +18 -16
  155. package/build/types/values.d.ts +2 -1
  156. package/build/utils/formatThousands.d.ts +2 -0
  157. package/build/utils/formatThousands.js +16 -0
  158. package/build/utils/index.d.ts +1 -0
  159. package/build/utils/index.js +1 -0
  160. package/docs/assets/bank-logo.png +0 -0
  161. package/docs/assets/bank-logo1.png +0 -0
  162. package/docs/components/AllComponents.web.tsx +97 -8
  163. package/docs/components/NextPrevPage.tsx +11 -3
  164. package/docs/components/UsageWrap.tsx +2 -2
  165. package/docs/components/index.ts +6 -7
  166. package/docs/heplers/addReactNativePrefix.ts +8 -0
  167. package/docs/heplers/index.ts +1 -0
  168. package/docs/introduction.mdx +3 -3
  169. package/docs/theme-tokens.mdx +42 -0
  170. package/package.json +13 -13
  171. package/src/components/Alert/AlertCloseButton.tsx +33 -5
  172. package/src/components/Alert/AlertIcon.tsx +17 -1
  173. package/src/components/Alert/AlertIconButton.tsx +37 -4
  174. package/src/components/Alert/AlertLink.tsx +52 -1
  175. package/src/components/Alert/AlertText.tsx +28 -3
  176. package/src/components/Alert/AlertTitle.tsx +28 -3
  177. package/src/components/Badge/Badge.docs.mdx +7 -7
  178. package/src/components/Badge/Badge.props.ts +3 -2
  179. package/src/components/Badge/Badge.stories.tsx +81 -92
  180. package/src/components/Badge/Badge.tsx +101 -14
  181. package/src/components/Badge/BadgeIcon.tsx +27 -29
  182. package/src/components/Badge/BadgeText.tsx +29 -31
  183. package/src/components/Button/ButtonGroupRoot.tsx +12 -2
  184. package/src/components/Button/ButtonRoot.tsx +1 -0
  185. package/src/components/Card/Card.docs.mdx +1 -1
  186. package/src/components/Card/Card.props.ts +2 -2
  187. package/src/components/Checkbox/Checkbox.docs.mdx +45 -7
  188. package/src/components/Checkbox/Checkbox.props.ts +3 -1
  189. package/src/components/Checkbox/Checkbox.stories.tsx +37 -1
  190. package/src/components/Checkbox/Checkbox.tsx +12 -9
  191. package/src/components/Checkbox/CheckboxIcon.tsx +1 -1
  192. package/src/components/Checkbox/CheckboxImage.tsx +9 -0
  193. package/src/components/Checkbox/CheckboxTileRoot.tsx +1 -1
  194. package/src/components/Checkbox/index.ts +3 -2
  195. package/src/components/CurrencyInput/CurrencyInput.docs.mdx +120 -0
  196. package/src/components/CurrencyInput/CurrencyInput.props.ts +19 -0
  197. package/src/components/CurrencyInput/CurrencyInput.stories.tsx +116 -0
  198. package/src/components/CurrencyInput/CurrencyInput.tsx +91 -0
  199. package/src/components/CurrencyInput/index.ts +1 -0
  200. package/src/components/DescriptionList/DescriptionList.context.ts +18 -0
  201. package/src/components/DescriptionList/DescriptionList.docs.mdx +98 -0
  202. package/src/components/DescriptionList/DescriptionList.props.ts +20 -0
  203. package/src/components/DescriptionList/DescriptionList.stories.tsx +154 -0
  204. package/src/components/DescriptionList/DescriptionList.tsx +64 -0
  205. package/src/components/DescriptionList/DescriptionListItem.props.ts +19 -0
  206. package/src/components/DescriptionList/DescriptionListItem.tsx +101 -0
  207. package/src/components/DescriptionList/index.ts +4 -0
  208. package/src/components/Divider/Divider.props.ts +2 -2
  209. package/src/components/Divider/Divider.stories.tsx +3 -3
  210. package/src/components/Divider/Divider.tsx +46 -0
  211. package/src/components/Flex/Flex.docs.mdx +4 -4
  212. package/src/components/Flex/Flex.props.ts +3 -2
  213. package/src/components/Flex/Flex.stories.tsx +1 -1
  214. package/src/components/Grid/Grid.docs.mdx +12 -12
  215. package/src/components/Grid/Grid.props.ts +2 -2
  216. package/src/components/Grid/Grid.stories.tsx +2 -2
  217. package/src/components/IconContainer/IconContainer.docs.mdx +90 -0
  218. package/src/components/IconContainer/IconContainer.props.ts +17 -0
  219. package/src/components/IconContainer/IconContainer.stories.tsx +130 -0
  220. package/src/components/IconContainer/IconContainer.tsx +180 -0
  221. package/src/components/IconContainer/index.tsx +2 -0
  222. package/src/components/Icons/CircleIcon.tsx +9 -11
  223. package/src/components/Input/Input.docs.mdx +3 -3
  224. package/src/components/Input/Input.props.ts +0 -20
  225. package/src/components/Input/Input.stories.tsx +0 -6
  226. package/src/components/Input/Input.tsx +2 -49
  227. package/src/components/Input/InputField.tsx +0 -7
  228. package/src/components/Link/Link.props.ts +3 -0
  229. package/src/components/Link/Link.tsx +12 -6
  230. package/src/components/List/List.docs.mdx +24 -23
  231. package/src/components/Modal/Modal.tsx +18 -0
  232. package/src/components/Radio/Radio.docs.mdx +96 -124
  233. package/src/components/Radio/Radio.props.ts +3 -1
  234. package/src/components/Radio/Radio.stories.tsx +47 -0
  235. package/src/components/Radio/Radio.tsx +10 -7
  236. package/src/components/Radio/RadioImage.tsx +9 -0
  237. package/src/components/Radio/RadioTileRoot.tsx +1 -1
  238. package/src/components/Radio/index.ts +3 -2
  239. package/src/components/SectionHeader/SectionHeader.tsx +1 -0
  240. package/src/components/Select/Select.docs.mdx +6 -6
  241. package/src/components/Select/Select.stories.tsx +7 -7
  242. package/src/components/Select/SelectOption.tsx +4 -10
  243. package/src/components/Tabs/Tab.props.ts +16 -0
  244. package/src/components/Tabs/Tab.tsx +113 -0
  245. package/src/components/Tabs/TabPanel.props.ts +10 -0
  246. package/src/components/Tabs/TabPanel.tsx +46 -0
  247. package/src/components/Tabs/Tabs.context.ts +26 -0
  248. package/src/components/Tabs/Tabs.docs.mdx +214 -0
  249. package/src/components/Tabs/Tabs.props.ts +21 -0
  250. package/src/components/Tabs/Tabs.stories.tsx +270 -0
  251. package/src/components/Tabs/Tabs.tsx +139 -0
  252. package/src/components/Tabs/TabsList.props.ts +8 -0
  253. package/src/components/Tabs/TabsList.tsx +194 -0
  254. package/src/components/Tabs/index.ts +8 -0
  255. package/src/components/UnstyledIconButton/UnstyledIconButton.props.ts +2 -1
  256. package/src/components/UnstyledIconButton/UnstyledIconButton.tsx +9 -3
  257. package/src/components/index.ts +4 -0
  258. package/src/core/themes.ts +57 -1
  259. package/src/tokens/color.ts +44 -40
  260. package/src/tokens/components/dark/alert.ts +13 -0
  261. package/src/tokens/components/dark/button.ts +1 -0
  262. package/src/tokens/components/dark/checkbox.ts +4 -1
  263. package/src/tokens/components/dark/icon-button.ts +10 -3
  264. package/src/tokens/components/dark/index.ts +1 -0
  265. package/src/tokens/components/dark/link.ts +5 -0
  266. package/src/tokens/components/dark/progress-bar.ts +41 -0
  267. package/src/tokens/components/dark/radio.ts +1 -1
  268. package/src/tokens/components/dark/tabs.ts +2 -0
  269. package/src/tokens/components/light/alert.ts +13 -0
  270. package/src/tokens/components/light/badge.ts +1 -1
  271. package/src/tokens/components/light/button.ts +1 -0
  272. package/src/tokens/components/light/checkbox.ts +6 -3
  273. package/src/tokens/components/light/icon-button.ts +8 -1
  274. package/src/tokens/components/light/index.ts +1 -0
  275. package/src/tokens/components/light/link.ts +5 -0
  276. package/src/tokens/components/light/progress-bar.ts +41 -0
  277. package/src/tokens/components/light/radio.ts +3 -3
  278. package/src/tokens/components/light/tabs.ts +2 -0
  279. package/src/tokens/index.ts +1 -0
  280. package/src/tokens/layout.ts +24 -15
  281. package/src/tokens/motion.ts +23 -0
  282. package/src/tokens/primitive.ts +19 -0
  283. package/src/tokens/semantic-dark.ts +26 -24
  284. package/src/tokens/semantic-light.ts +18 -16
  285. package/src/types/values.ts +3 -1
  286. package/src/utils/formatThousands.ts +14 -0
  287. package/src/utils/index.ts +1 -0
  288. package/docs/assets/react-native-pig.png +0 -0
  289. package/docs/components/AdvancedRadioExample.tsx +0 -126
@@ -1,20 +1,18 @@
1
1
  import { createIcon } from '@gluestack-ui/icon';
2
- import { Svg, Path } from 'react-native-svg';
2
+ import { Path, Svg } from 'react-native-svg';
3
3
 
4
4
  const CircleIcon = createIcon({
5
5
  Root: Svg,
6
6
  viewBox: '0 0 24 24',
7
7
  path: (
8
- <>
9
- <Path
10
- d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
11
- fill="currentColor"
12
- stroke="currentColor"
13
- strokeWidth="2"
14
- strokeLinecap="round"
15
- strokeLinejoin="round"
16
- />
17
- </>
8
+ <Path
9
+ d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
10
+ fill="currentColor"
11
+ stroke="currentColor"
12
+ strokeWidth="2"
13
+ strokeLinecap="round"
14
+ strokeLinejoin="round"
15
+ />
18
16
  ),
19
17
  });
20
18
 
@@ -57,12 +57,12 @@ import { EmailMediumIcon } from '@utilitywarehouse/hearth-react-native-icons';
57
57
 
58
58
  const MyComponent = () => {
59
59
  const [value, setValue] = useState('');
60
- const handleChange = e => {
61
- setValue(e.target.value);
60
+ const handleChange = val => {
61
+ setValue(val);
62
62
  };
63
63
  return (
64
64
  <Input
65
- onChange={handleChange}
65
+ onChangeText={handleChange}
66
66
  value={value}
67
67
  placeholder="Placeholder"
68
68
  leadingIcon={EmailMediumIcon}
@@ -70,24 +70,6 @@ interface PasswordInputSpecificProps extends InputWithoutChildrenBaseProps {
70
70
  onClear?: never;
71
71
  }
72
72
 
73
- interface DateInputSpecificProps extends InputWithoutChildrenBaseProps {
74
- type: 'date';
75
- format?: string;
76
- showPasswordToggle?: never;
77
- loading?: never;
78
- clearable?: never;
79
- onClear?: never;
80
- }
81
-
82
- interface CurrencyInputSpecificProps extends InputWithoutChildrenBaseProps {
83
- type: 'currency';
84
- format?: string;
85
- showPasswordToggle?: never;
86
- loading?: never;
87
- clearable?: never;
88
- onClear?: never;
89
- }
90
-
91
73
  interface SearchInputSpecificProps extends InputWithoutChildrenBaseProps {
92
74
  type: 'search';
93
75
  loading?: boolean;
@@ -101,8 +83,6 @@ interface SearchInputSpecificProps extends InputWithoutChildrenBaseProps {
101
83
  export type InputWithoutChildrenProps =
102
84
  | TextInputSpecificProps
103
85
  | PasswordInputSpecificProps
104
- | DateInputSpecificProps
105
- | CurrencyInputSpecificProps
106
86
  | SearchInputSpecificProps;
107
87
 
108
88
  /**
@@ -130,12 +130,6 @@ export const Variants: Story = {
130
130
  <VariantTitle title="Type search - loading">
131
131
  <Input placeholder="Input placeholder" type="search" loading />
132
132
  </VariantTitle>
133
- <VariantTitle title="Type currency">
134
- <Input type="currency" />
135
- </VariantTitle>
136
- <VariantTitle title="Type date">
137
- <Input type="date" />
138
- </VariantTitle>
139
133
  <VariantTitle title="Valid">
140
134
  <Input validationStatus="valid" placeholder="Input placeholder" />
141
135
  </VariantTitle>
@@ -3,15 +3,12 @@ import { ComponentType, useState } from 'react';
3
3
  import type InputProps from './Input.props';
4
4
 
5
5
  import {
6
- CalendarMediumIcon,
7
6
  CloseSmallIcon,
8
7
  EyeOffSmallIcon,
9
8
  EyeSmallIcon,
10
9
  SearchMediumIcon,
11
10
  } from '@utilitywarehouse/hearth-react-native-icons';
12
- import { Platform } from 'react-native';
13
11
  import { useTheme } from '../../hooks';
14
- import { DetailText } from '../DetailText';
15
12
  import { useFormFieldContext } from '../FormField';
16
13
  import { Spinner } from '../Spinner';
17
14
  import { UnstyledIconButton } from '../UnstyledIconButton';
@@ -59,26 +56,6 @@ const Input = ({
59
56
  );
60
57
  const { color } = useTheme();
61
58
 
62
- const defaultFornat = (() => {
63
- if (type === 'currency') {
64
- return '0.00';
65
- }
66
- if (type === 'date') {
67
- return 'DD/MM/YYYY';
68
- }
69
- return;
70
- })();
71
-
72
- const getPlaceholder = (() => {
73
- if (type === 'currency') {
74
- return props.placeholder ?? format ?? defaultFornat;
75
- }
76
- if (type === 'date') {
77
- return props.placeholder ?? format ?? defaultFornat;
78
- }
79
- return props.placeholder;
80
- })();
81
-
82
59
  const shouldShowPasswordToggle = type === 'password' && showPasswordToggle;
83
60
  const shouldShowClear = clearable && !!(props as InputWithoutChildrenProps)?.value;
84
61
 
@@ -93,17 +70,7 @@ const Input = ({
93
70
  return leadingIcon;
94
71
  })();
95
72
 
96
- const trailingIconComponent = ((): ComponentType | undefined => {
97
- if (type === 'date') {
98
- return CalendarMediumIcon;
99
- }
100
- return trailingIcon;
101
- })();
102
-
103
73
  const getInputMode = (() => {
104
- if (type === 'currency') {
105
- return 'decimal';
106
- }
107
74
  if (type === 'search') {
108
75
  return 'search';
109
76
  }
@@ -130,25 +97,11 @@ const Input = ({
130
97
  <InputIcon as={leadingIconComponent} />
131
98
  </InputSlot>
132
99
  )}
133
- {type === 'currency' && (
134
- <InputSlot>
135
- <DetailText
136
- size="4xl"
137
- style={{
138
- // todo: fix this
139
- ...(Platform.OS === 'ios' && { lineHeight: 46 }),
140
- }}
141
- >
142
- £
143
- </DetailText>
144
- </InputSlot>
145
- )}
146
100
  <InputField
147
101
  type={fieldType}
148
102
  inputMode={getInputMode}
149
103
  inBottomSheet={inBottomSheet}
150
104
  {...props}
151
- placeholder={getPlaceholder}
152
105
  />
153
106
  {shouldShowClear && (
154
107
  <InputSlot>
@@ -168,9 +121,9 @@ const Input = ({
168
121
  />
169
122
  </InputSlot>
170
123
  )}
171
- {!!trailingIconComponent && (
124
+ {!!trailingIcon && (
172
125
  <InputSlot>
173
- <InputIcon as={trailingIconComponent} />
126
+ <InputIcon as={trailingIcon} />
174
127
  </InputSlot>
175
128
  )}
176
129
  </>
@@ -64,13 +64,6 @@ const styles = StyleSheet.create(theme => ({
64
64
  text: {},
65
65
  password: {},
66
66
  search: {},
67
- currency: {
68
- fontSize: theme.typography.mobile.detailText['4xl'].fontSize,
69
- fontFamily: theme.typography.mobile.detailText.fontFamily,
70
- fontWeight: theme.typography.mobile.detailText.fontWeight,
71
- paddingTop: 0,
72
- paddingBottom: 0,
73
- },
74
67
  date: {},
75
68
  },
76
69
  },
@@ -1,5 +1,6 @@
1
1
  import { ComponentType } from 'react';
2
2
  import { PressableProps, TextProps } from 'react-native';
3
+ import { IconProps } from '../Icon';
3
4
 
4
5
  export interface LinkProps extends Omit<PressableProps, 'children'> {
5
6
  children: TextProps['children'];
@@ -10,6 +11,8 @@ export interface LinkProps extends Omit<PressableProps, 'children'> {
10
11
  icon?: ComponentType;
11
12
  iconPosition?: 'left' | 'right';
12
13
  showIcon?: boolean;
14
+ textStyle?: TextProps['style'];
15
+ iconStyle?: IconProps['style'];
13
16
  }
14
17
 
15
18
  export default LinkProps;
@@ -1,9 +1,9 @@
1
- import type { LinkProps } from './Link.props';
2
1
  import { createLink } from '@gluestack-ui/link';
2
+ import { ChevronRightSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
3
+ import type { LinkProps } from './Link.props';
4
+ import LinkIcon from './LinkIcon';
3
5
  import LinkRoot from './LinkRoot';
4
6
  import LinkTextComponent from './LinkText';
5
- import LinkIcon from './LinkIcon';
6
- import { ChevronRightSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
7
7
 
8
8
  const LinkComponent = createLink({
9
9
  Root: LinkRoot,
@@ -21,14 +21,20 @@ const Link = ({
21
21
  target = '_self',
22
22
  iconPosition = 'right',
23
23
  showIcon = true,
24
+ textStyle,
25
+ iconStyle,
24
26
  ...props
25
27
  }: LinkProps) => {
26
28
  const LinkAny = LinkComponent as any;
27
29
  return (
28
30
  <LinkAny {...props} isDisabled={disabled} isExternal={target === '_blank'}>
29
- {showIcon && icon && iconPosition === 'left' ? <LinkIcon as={icon} /> : null}
30
- <LinkText>{children}</LinkText>
31
- {showIcon && icon && iconPosition === 'right' ? <LinkIcon as={icon} /> : null}
31
+ {showIcon && icon && iconPosition === 'left' ? (
32
+ <LinkIcon as={icon} style={iconStyle} />
33
+ ) : null}
34
+ <LinkText style={textStyle}>{children}</LinkText>
35
+ {showIcon && icon && iconPosition === 'right' ? (
36
+ <LinkIcon as={icon} style={iconStyle} />
37
+ ) : null}
32
38
  </LinkAny>
33
39
  );
34
40
  };
@@ -4,7 +4,8 @@ import {
4
4
  ChevronRightSmallIcon,
5
5
  ElectricityMediumIcon,
6
6
  GasMediumIcon,
7
- HomeFilledMediumIcon,
7
+ InfoMediumIcon as HomeMediumIcon,
8
+ // HomeMediumIcon,
8
9
  PaymentMediumIcon,
9
10
  UserMediumIcon,
10
11
  } from '@utilitywarehouse/hearth-react-native-icons';
@@ -15,7 +16,6 @@ import {
15
16
  FlatList,
16
17
  Image,
17
18
  List,
18
- SectionHeader,
19
19
  ListItem,
20
20
  ListItemContent,
21
21
  ListItemHelperText,
@@ -24,6 +24,7 @@ import {
24
24
  ListItemText,
25
25
  ListItemTrailingContent,
26
26
  ListItemTrailingIcon,
27
+ SectionHeader,
27
28
  } from '../../';
28
29
  import { BackToTopButton, BadgeList, UsageWrap, ViewFigmaButton } from '../../../docs/components';
29
30
  import * as Stories from './List.stories';
@@ -87,21 +88,21 @@ const MyComponent = () => (
87
88
 
88
89
  ### `List`
89
90
 
90
- | Name | Type | Default | Description |
91
- | ----------------------- | ------------------------------------------------------------------------------------------------- | --------- | ---------------------------------------------------------- |
92
- | container | `'none' \| 'subtleWhite' \| 'emphasisWhite' \|` <br /> `'subtleWarmWhite' \| 'emphasisWarmWhite'` | `'none'` | The container style of the list. |
93
- | heading | `string` | | The text to display in the heading of the list. |
94
- | helperText | `string` | | The supporting text to display in the heading of the list. |
95
- | linkText | `string` | | The text for the link in the heading. |
96
- | linkHref | `string` | | The href for the link in the heading. |
97
- | linkOnPress | `() => void` | | Callback function when the heading link is pressed. |
98
- | linkTarget | `'_blank' \| '_self' \| '_parent' \| '_top'` | | Target for the link in the heading. | |
99
- | linkIcon | `ComponentType` | | Icon for the heading link. |
100
- | linkIconPosition | `'left' \| 'right'` | `'right'` | Position of the icon in the heading link. |
101
- | linkShowIcon | `boolean` | `true` | Whether to show the icon in the heading link. |
102
- | divider | `boolean` | `false` | Whether to display a divider below the list items. |
103
- | loading | `boolean` | `false` | Whether to show the list items in loading state. |
104
- | disabled | `boolean` | `false` | Whether to disable the list. |
91
+ | Name | Type | Default | Description |
92
+ | ---------------- | ------------------------------------------------------------------------------------------------- | --------- | ---------------------------------------------------------- | --- |
93
+ | container | `'none' \| 'subtleWhite' \| 'emphasisWhite' \|` <br /> `'subtleWarmWhite' \| 'emphasisWarmWhite'` | `'none'` | The container style of the list. |
94
+ | heading | `string` | | The text to display in the heading of the list. |
95
+ | helperText | `string` | | The supporting text to display in the heading of the list. |
96
+ | linkText | `string` | | The text for the link in the heading. |
97
+ | linkHref | `string` | | The href for the link in the heading. |
98
+ | linkOnPress | `() => void` | | Callback function when the heading link is pressed. |
99
+ | linkTarget | `'_blank' \| '_self' \| '_parent' \| '_top'` | | Target for the link in the heading. | |
100
+ | linkIcon | `ComponentType` | | Icon for the heading link. |
101
+ | linkIconPosition | `'left' \| 'right'` | `'right'` | Position of the icon in the heading link. |
102
+ | linkShowIcon | `boolean` | `true` | Whether to show the icon in the heading link. |
103
+ | divider | `boolean` | `false` | Whether to display a divider below the list items. |
104
+ | loading | `boolean` | `false` | Whether to show the list items in loading state. |
105
+ | disabled | `boolean` | `false` | Whether to disable the list. |
105
106
 
106
107
  ### `ListItem`
107
108
 
@@ -172,7 +173,7 @@ If you need to use the List component in a more advanced way, you can use the pa
172
173
  </ListItem>
173
174
  <ListItem onPress={() => console.log('pressed')}>
174
175
  <ListItemLeadingContent>
175
- <ListItemIcon as={HomeFilledMediumIcon} />
176
+ <ListItemIcon as={HomeMediumIcon} />
176
177
  </ListItemLeadingContent>
177
178
  <ListItemContent>
178
179
  <ListItemText>Moving home</ListItemText>
@@ -214,7 +215,7 @@ import {
214
215
  BillMediumIcon,
215
216
  ChevronRightSmallIcon,
216
217
  PaymentMediumIcon,
217
- HomeFilledMediumIcon,
218
+ HomeMediumIcon,
218
219
  UserMediumIcon,
219
220
  } from '@utilitywarehouse/hearth-react-native-icons';
220
221
 
@@ -247,7 +248,7 @@ const MyComponent = () => (
247
248
  </ListItem>
248
249
  <ListItem onPress={() => console.log('pressed')}>
249
250
  <ListItemLeadingContent>
250
- <ListItemIcon as={HomeFilledMediumIcon} />
251
+ <ListItemIcon as={HomeMediumIcon} />
251
252
  </ListItemLeadingContent>
252
253
  <ListItemContent>
253
254
  <ListItemText>Moving home</ListItemText>
@@ -302,7 +303,7 @@ the `Card` and child `ListItem` components.
302
303
  onPress={() => console.log('item pressed')}
303
304
  />
304
305
  <ListItem
305
- leadingContent={<HomeFilledMediumIcon />}
306
+ leadingContent={<HomeMediumIcon />}
306
307
  text="Moving Home"
307
308
  onPress={() => console.log('item pressed')}
308
309
  />
@@ -314,7 +315,7 @@ import { List, ListItem, Card } from '@utilitywarehouse/hearth-react-native';
314
315
  import {
315
316
  BillMediumIcon,
316
317
  PaymentMediumIcon,
317
- HomeFilledMediumIcon,
318
+ HomeMediumIcon,
318
319
  } from '@utilitywarehouse/hearth-react-native-icons';
319
320
 
320
321
  const MyComponent = () => (
@@ -332,7 +333,7 @@ const MyComponent = () => (
332
333
  onPress={() => console.log('item pressed')}
333
334
  />
334
335
  <ListItem
335
- leadingContent={<HomeFilledMediumIcon />}
336
+ leadingContent={<HomeMediumIcon />}
336
337
  text="Moving Home"
337
338
  onPress={() => console.log('item pressed')}
338
339
  />
@@ -154,6 +154,8 @@ const Modal = ({
154
154
  }
155
155
  };
156
156
 
157
+ styles.useVariants({ loading });
158
+
157
159
  const content = (
158
160
  <>
159
161
  {loading ? (
@@ -261,6 +263,7 @@ const Modal = ({
261
263
  {...props}
262
264
  onChange={handleChange}
263
265
  >
266
+ {loading ? <View style={styles.loadingTop} /> : null}
264
267
  <BottomSheetScrollView contentContainerStyle={styles.container} ref={scrollViewRef}>
265
268
  {content}
266
269
  </BottomSheetScrollView>
@@ -272,6 +275,13 @@ const styles = StyleSheet.create((theme, rt) => ({
272
275
  container: {
273
276
  flex: 1,
274
277
  gap: theme.components.dialog.gap,
278
+ variants: {
279
+ loading: {
280
+ true: {
281
+ paddingTop: 0,
282
+ },
283
+ },
284
+ },
275
285
  },
276
286
  header: {
277
287
  flexDirection: 'row',
@@ -293,7 +303,15 @@ const styles = StyleSheet.create((theme, rt) => ({
293
303
  textContent: {
294
304
  gap: theme.components.dialog.content.gap,
295
305
  },
306
+ loadingTop: {
307
+ borderTopLeftRadius: theme.components.dialog.borderRadius,
308
+ borderTopRightRadius: theme.components.dialog.borderRadius,
309
+ height: 16,
310
+ backgroundColor: theme.color.surface.neutral.strong,
311
+ },
296
312
  loadingContainer: {
313
+ borderTopLeftRadius: theme.components.dialog.borderRadius,
314
+ borderTopRightRadius: theme.components.dialog.borderRadius,
297
315
  flex: 1,
298
316
  alignItems: 'center',
299
317
  justifyContent: 'center',