@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
@@ -21,11 +21,14 @@ export const mobile = {
21
21
  margin: 16,
22
22
  },
23
23
  spacing: {
24
- lg: 20,
25
- md: 16,
26
- sm: 12,
27
- xl: 28,
28
- xs: 8,
24
+ '2xl': 28,
25
+ '2xs': 2,
26
+ lg: 16,
27
+ md: 12,
28
+ none: 0,
29
+ sm: 8,
30
+ xl: 20,
31
+ xs: 4,
29
32
  },
30
33
  } as const;
31
34
 
@@ -48,11 +51,14 @@ export const tablet = {
48
51
  margin: 32,
49
52
  },
50
53
  spacing: {
51
- lg: 24,
52
- md: 16,
53
- sm: 12,
54
- xl: 28,
55
- xs: 8,
54
+ '2xl': 28,
55
+ '2xs': 2,
56
+ lg: 16,
57
+ md: 12,
58
+ none: 0,
59
+ sm: 8,
60
+ xl: 24,
61
+ xs: 4,
56
62
  },
57
63
  } as const;
58
64
 
@@ -75,11 +81,14 @@ export const desktop = {
75
81
  margin: 32,
76
82
  },
77
83
  spacing: {
78
- lg: 24,
79
- md: 16,
80
- sm: 12,
81
- xl: 40,
82
- xs: 8,
84
+ '2xl': 40,
85
+ '2xs': 2,
86
+ lg: 16,
87
+ md: 12,
88
+ none: 0,
89
+ sm: 8,
90
+ xl: 24,
91
+ xs: 4,
83
92
  },
84
93
  } as const;
85
94
 
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+
5
+ export default {
6
+ duration: {
7
+ '100': 130,
8
+ '200': 160,
9
+ '300': 190,
10
+ '400': 220,
11
+ '500': 250,
12
+ '600': 300,
13
+ '700': 350,
14
+ '800': 400,
15
+ '900': 450,
16
+ '1000': 500,
17
+ },
18
+ ease: {
19
+ in: 'cubic-bezier(0.42, 0, 1, 1)',
20
+ inOut: 'cubic-bezier(0, 0, 1, 1)',
21
+ out: 'cubic-bezier(0.19, 0.91, 0.38, 1)',
22
+ },
23
+ } as const;
@@ -82,6 +82,25 @@ export default {
82
82
  '1100': 72,
83
83
  '1200': 90,
84
84
  },
85
+ motion: {
86
+ duration: {
87
+ '100': 130,
88
+ '200': 160,
89
+ '300': 190,
90
+ '400': 220,
91
+ '500': 250,
92
+ '600': 300,
93
+ '700': 350,
94
+ '800': 400,
95
+ '900': 450,
96
+ '1000': 500,
97
+ },
98
+ ease: {
99
+ in: 'cubic-bezier(0.42, 0, 1, 1)',
100
+ inOut: 'cubic-bezier(0, 0, 1, 1)',
101
+ out: 'cubic-bezier(0.19, 0.91, 0.38, 1)',
102
+ },
103
+ },
85
104
  space: {
86
105
  '0': 0,
87
106
  '25': 2,
@@ -4,7 +4,7 @@
4
4
 
5
5
  export default {
6
6
  background: {
7
- brand: '#996cda',
7
+ brand: '#7a42c8',
8
8
  primary: '#191917',
9
9
  secondary: '#232323',
10
10
  },
@@ -16,56 +16,56 @@ export default {
16
16
  danger: {
17
17
  border: '#ff7964',
18
18
  foreground: {
19
- default: '#fcfbf2',
19
+ default: '#101010',
20
20
  subtle: '#ff7964',
21
21
  },
22
22
  surface: {
23
- default: '#de2612',
24
- subtle: '#521a16',
23
+ default: '#ff634a',
24
+ subtle: '#ffa89d',
25
25
  },
26
26
  },
27
27
  functional: {
28
28
  border: '#b2afae',
29
29
  foreground: {
30
- default: '#fcfbf2',
30
+ default: '#101010',
31
31
  subtle: '#b2afae',
32
32
  },
33
33
  surface: {
34
- default: '#888888',
35
- subtle: '#232323',
34
+ default: '#919191',
35
+ subtle: '#d3d3d3',
36
36
  },
37
37
  },
38
38
  info: {
39
39
  border: '#6bb0ff',
40
40
  foreground: {
41
- default: '#fcfbf2',
41
+ default: '#101010',
42
42
  subtle: '#6bb0ff',
43
43
  },
44
44
  surface: {
45
- default: '#1c6cd4',
46
- subtle: '#042455',
45
+ default: '#6bb0ff',
46
+ subtle: '#bcddff',
47
47
  },
48
48
  },
49
49
  positive: {
50
50
  border: '#58ca93',
51
51
  foreground: {
52
- default: '#fcfbf2',
52
+ default: '#101010',
53
53
  subtle: '#58ca93',
54
54
  },
55
55
  surface: {
56
- default: '#0f834a',
57
- subtle: '#033d21',
56
+ default: '#36bf7d',
57
+ subtle: '#a2e2c3',
58
58
  },
59
59
  },
60
60
  warning: {
61
61
  border: '#ff9639',
62
62
  foreground: {
63
- default: '#fcfbf2',
63
+ default: '#101010',
64
64
  subtle: '#ff9639',
65
65
  },
66
66
  surface: {
67
- default: '#cb5b00',
68
- subtle: '#6b2d00',
67
+ default: '#ff8010',
68
+ subtle: '#ffcca8',
69
69
  },
70
70
  },
71
71
  },
@@ -80,7 +80,7 @@ export default {
80
80
  interactive: {
81
81
  affirmative: {
82
82
  border: {
83
- strong: '#ebebeb',
83
+ strong: '#101010',
84
84
  subtle: '#58ca93',
85
85
  },
86
86
  foreground: {
@@ -116,7 +116,7 @@ export default {
116
116
  },
117
117
  destructive: {
118
118
  border: {
119
- strong: '#ebebeb',
119
+ strong: '#101010',
120
120
  subtle: '#ff7964',
121
121
  },
122
122
  foreground: {
@@ -137,14 +137,14 @@ export default {
137
137
  },
138
138
  functional: {
139
139
  border: {
140
+ inverted: '#f7f7f7',
140
141
  strong: '#ebebeb',
141
142
  subtle: '#ebebeb',
142
- inverted: '#f7f7f7',
143
143
  },
144
144
  foreground: {
145
+ inverted: '#f7f7f7',
145
146
  strong: '#fcfbf2',
146
147
  subtle: '#ebebeb',
147
- inverted: '#f7f7f7',
148
148
  },
149
149
  surface: {
150
150
  strong: {
@@ -156,15 +156,15 @@ export default {
156
156
  active: '#4c4c4c',
157
157
  hover: '#3a3837',
158
158
  inverted: {
159
- active: '#d3d3d3',
160
- hover: '#ebebeb',
159
+ active: '#3a3837',
160
+ hover: '#3f3f3f',
161
161
  },
162
162
  },
163
163
  },
164
164
  },
165
165
  highlight: {
166
166
  border: {
167
- strong: '#f7f7f7',
167
+ strong: '#101010',
168
168
  },
169
169
  foreground: {
170
170
  strong: '#101010',
@@ -245,7 +245,9 @@ export default {
245
245
  },
246
246
  },
247
247
  text: {
248
- inverted: '#191917',
248
+ affirmative: '#58ca93',
249
+ brand: '#af90de',
250
+ inverted: '#fcfbf2',
249
251
  primary: '#ebebeb',
250
252
  secondary: '#b2afae',
251
253
  },
@@ -16,55 +16,55 @@ export default {
16
16
  danger: {
17
17
  border: '#de2612',
18
18
  foreground: {
19
- default: '#fcfbf2',
19
+ default: '#101010',
20
20
  subtle: '#de2612',
21
21
  },
22
22
  surface: {
23
- default: '#de2612',
24
- subtle: '#ffccc5',
23
+ default: '#ff634a',
24
+ subtle: '#ffa89d',
25
25
  },
26
26
  },
27
27
  functional: {
28
- border: '#888888',
28
+ border: '#5b5b5b',
29
29
  foreground: {
30
- default: '#fcfbf2',
31
- subtle: '#888888',
30
+ default: '#101010',
31
+ subtle: '#5b5b5b',
32
32
  },
33
33
  surface: {
34
- default: '#888888',
34
+ default: '#919191',
35
35
  subtle: '#d3d3d3',
36
36
  },
37
37
  },
38
38
  info: {
39
39
  border: '#1c6cd4',
40
40
  foreground: {
41
- default: '#fcfbf2',
41
+ default: '#101010',
42
42
  subtle: '#1c6cd4',
43
43
  },
44
44
  surface: {
45
- default: '#1c6cd4',
45
+ default: '#6bb0ff',
46
46
  subtle: '#bcddff',
47
47
  },
48
48
  },
49
49
  positive: {
50
50
  border: '#0f834a',
51
51
  foreground: {
52
- default: '#fcfbf2',
52
+ default: '#101010',
53
53
  subtle: '#0f834a',
54
54
  },
55
55
  surface: {
56
- default: '#0f834a',
56
+ default: '#36bf7d',
57
57
  subtle: '#a2e2c3',
58
58
  },
59
59
  },
60
60
  warning: {
61
61
  border: '#be5400',
62
62
  foreground: {
63
- default: '#fcfbf2',
63
+ default: '#101010',
64
64
  subtle: '#be5400',
65
65
  },
66
66
  surface: {
67
- default: '#be5400',
67
+ default: '#ff8010',
68
68
  subtle: '#ffcca8',
69
69
  },
70
70
  },
@@ -137,14 +137,14 @@ export default {
137
137
  },
138
138
  functional: {
139
139
  border: {
140
+ inverted: '#f7f7f7',
140
141
  strong: '#101010',
141
142
  subtle: '#101010',
142
- inverted: '#f7f7f7',
143
143
  },
144
144
  foreground: {
145
+ inverted: '#f7f7f7',
145
146
  strong: '#fcfbf2',
146
147
  subtle: '#101010',
147
- inverted: '#f7f7f7',
148
148
  },
149
149
  surface: {
150
150
  strong: {
@@ -245,8 +245,10 @@ export default {
245
245
  },
246
246
  },
247
247
  text: {
248
+ affirmative: '#0f834a',
249
+ brand: '#7a42c8',
248
250
  inverted: '#fcfbf2',
249
251
  primary: '#101010',
250
- secondary: '#888888',
252
+ secondary: '#5b5b5b',
251
253
  },
252
254
  } as const;
@@ -1,5 +1,5 @@
1
1
  import { AnimatableNumericValue, DimensionValue } from 'react-native';
2
- import { lightTheme } from '../core/themes';
2
+ import { lightTheme, themes } from '../core/themes';
3
3
  import color from '../tokens/color';
4
4
 
5
5
  export type addPrefixToObject<T, P extends string> = {
@@ -80,3 +80,5 @@ export type BordeWidthValue =
80
80
  | undefined;
81
81
 
82
82
  export type OpacityValue = AnimatableNumericValue | undefined;
83
+
84
+ export type SpacingValues = keyof (typeof themes)['light']['globalStyle']['variants']['space'];
@@ -0,0 +1,14 @@
1
+ const formatThousands = (value: string) => {
2
+ if (!value) return value;
3
+ // Remove existing commas first
4
+ const cleaned = value.replace(/,/g, '');
5
+ // Allow leading minus, digits, optional decimal part
6
+ const match = cleaned.match(/^(-)?(\d*)(\.\d*)?$/);
7
+ if (!match) return value; // If it doesn't match a numeric pattern, return original (lets user continue typing)
8
+ const [, sign = '', intPart = '', decimalPart = ''] = match;
9
+ if (!intPart) return sign + intPart + decimalPart; // nothing to format yet
10
+ const withCommas = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
11
+ return sign + withCommas + (decimalPart || '');
12
+ };
13
+
14
+ export default formatThousands;
@@ -1,4 +1,5 @@
1
1
  export { default as coloursAsArray, extractLightColorValues } from './coloursAsArray';
2
+ export { default as formatThousands } from './formatThousands';
2
3
  export { default as getFlattenedColorValue } from './getFlattenedColorValue';
3
4
  export { default as getStyleValue } from './getStyleValue';
4
5
  export { default as hexWithOpacity } from './hexWithOpacity';
Binary file
@@ -1,126 +0,0 @@
1
- import { TickSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
2
- import { useState } from 'react';
3
- import {
4
- Badge,
5
- BodyText,
6
- Box,
7
- Heading,
8
- Radio,
9
- RadioGroup,
10
- RadioIcon,
11
- RadioIndicator,
12
- type RadioProps as NativeUIRadioProps,
13
- } from '../../src';
14
-
15
- import { TextProps, ViewProps } from 'react-native';
16
- import { StyleSheet } from 'react-native-unistyles';
17
-
18
- interface RadioProps {
19
- currentValue: string;
20
- }
21
-
22
- const styles = StyleSheet.create(({ colorMode, color, borderRadius, borderWidth, space }) => ({
23
- radio: {
24
- borderWidth: borderWidth[2],
25
- borderColor: colorMode === 'light' ? color.grey[500] : color.grey[700],
26
- borderRadius: borderRadius.xl,
27
- padding: space[200],
28
- variants: {
29
- checked: {
30
- true: {
31
- borderColor: colorMode === 'light' ? color.green[500] : color.green[700],
32
- },
33
- },
34
- },
35
- },
36
- indicator: {
37
- variants: {
38
- checked: {
39
- true: {
40
- backgroundColor: colorMode === 'light' ? color.green[500] : color.green[700],
41
- borderColor: colorMode === 'light' ? color.green[500] : color.green[700],
42
- },
43
- },
44
- },
45
- },
46
- heading: {
47
- marginBottom: space[100],
48
- },
49
- badge: {
50
- marginRight: space[200],
51
- alignSelf: 'flex-end',
52
- },
53
- }));
54
-
55
- const CustomRadio = ({
56
- children,
57
- currentValue,
58
- ...props
59
- }: RadioProps &
60
- Omit<
61
- NativeUIRadioProps,
62
- 'label' | 'helperText' | 'helperIcon' | 'invalidText' | 'validText' | 'showValidationIcon'
63
- >) => {
64
- styles.useVariants({ checked: currentValue === props.value });
65
- return (
66
- <Radio style={styles.radio} {...props}>
67
- <Box flexDirection="row" flex={1}>
68
- <Box pr="200" flex={1}>
69
- {children}
70
- </Box>
71
- <RadioIndicator style={styles.indicator}>
72
- <RadioIcon as={TickSmallIcon} color="white" />
73
- </RadioIndicator>
74
- </Box>
75
- </Radio>
76
- );
77
- };
78
-
79
- const BulletListItem = ({ children }: { children: TextProps['children'] }) => (
80
- <BodyText>
81
- {'\u2022'} {children}
82
- </BodyText>
83
- );
84
-
85
- const BulletList = ({ children }: { children: ViewProps['children'] }) => (
86
- <Box pl="200" gap="100">
87
- {children}
88
- </Box>
89
- );
90
-
91
- const AdvancedRadioExample = () => {
92
- const [value, setValue] = useState('Option 1');
93
-
94
- const handleChange = (val: string) => setValue(val);
95
-
96
- return (
97
- <RadioGroup onChange={handleChange} value={value} gap="200">
98
- <Box>
99
- <Badge colorScheme={value === 'Option 1' ? 'green' : 'grey'} flatBase style={styles.badge}>
100
- Recommended
101
- </Badge>
102
- <CustomRadio value="Option 1" currentValue={value}>
103
- <Heading size="md" style={styles.heading}>
104
- Instant bank transfer
105
- </Heading>
106
- <BulletList>
107
- <BulletListItem>Receive your money instantly</BulletListItem>
108
- <BulletListItem>No fees</BulletListItem>
109
- <BulletListItem>Available 24/7</BulletListItem>
110
- </BulletList>
111
- </CustomRadio>
112
- </Box>
113
- <CustomRadio value="Option 2" currentValue={value}>
114
- <Heading size="md" style={styles.heading}>
115
- Debit card payment
116
- </Heading>
117
- <BulletList>
118
- <BulletListItem>£0.35 fee</BulletListItem>
119
- <BulletListItem>Available 24/7</BulletListItem>
120
- </BulletList>
121
- </CustomRadio>
122
- </RadioGroup>
123
- );
124
- };
125
-
126
- export default AdvancedRadioExample;