@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,4 +1,4 @@
1
1
 
2
- > @utilitywarehouse/hearth-react-native@0.2.0 build /home/runner/work/hearth/hearth/packages/react-native
2
+ > @utilitywarehouse/hearth-react-native@0.3.1 build /home/runner/work/hearth/hearth/packages/react-native
3
3
  > tsc
4
4
 
@@ -1,6 +1,8 @@
1
1
 
2
- > @utilitywarehouse/hearth-react-native@0.2.0 lint /home/runner/work/hearth/hearth/packages/react-native
2
+ > @utilitywarehouse/hearth-react-native@0.3.1 lint /home/runner/work/hearth/hearth/packages/react-native
3
3
  > TIMING=1 eslint --max-warnings 0
4
4
 
5
5
  Rule | Time (ms) | Relative
6
6
  :----|----------:|--------:
7
+ Rule | Time (ms) | Relative
8
+ :----|----------:|--------:
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @utilitywarehouse/hearth-react-native
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#472](https://github.com/utilitywarehouse/hearth/pull/472) [`009fe4b`](https://github.com/utilitywarehouse/hearth/commit/009fe4bff4fc54e424f22629040f715d3d4714ea) Thanks [@jordmccord](https://github.com/jordmccord)! - Add `image` prop to `Checkbox` and `Radio` components
8
+
9
+ - [#500](https://github.com/utilitywarehouse/hearth/pull/500) [`cc49e74`](https://github.com/utilitywarehouse/hearth/commit/cc49e74e3736b9647e8c5576ce45020add258625) Thanks [@jordmccord](https://github.com/jordmccord)! - - Updated dependencies [[`8dac8c1`](https://github.com/utilitywarehouse/hearth/commit/8dac8c1def9083d8e4efa1385e0ee7be23428c46)]:
10
+
11
+ - @utilitywarehouse/hearth-react-native-icons@0.4.0
12
+
13
+ - [#499](https://github.com/utilitywarehouse/hearth/pull/499) [`7b6781c`](https://github.com/utilitywarehouse/hearth/commit/7b6781cc054cf9f1ed4969a2c663abceb526c249) Thanks [@jordmccord](https://github.com/jordmccord)! - Fixes dark mode styles for several components
14
+
15
+ ## 0.3.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [`ce2b445`](https://github.com/utilitywarehouse/hearth/commit/ce2b445dfdd11a2912b4328d8259a604a77b31cd) Thanks [@jordmccord](https://github.com/jordmccord)! - Adds `IconContainer` component
20
+
21
+ - [#423](https://github.com/utilitywarehouse/hearth/pull/423) [`af2deea`](https://github.com/utilitywarehouse/hearth/commit/af2deea62be55d6e40fe5bbb41700e054082b583) Thanks [@jordmccord](https://github.com/jordmccord)! - Adds `DescriptionList` component
22
+
23
+ - [#421](https://github.com/utilitywarehouse/hearth/pull/421) [`a7974df`](https://github.com/utilitywarehouse/hearth/commit/a7974df554cb0eb499923a140ebea523fa49761c) Thanks [@jordmccord](https://github.com/jordmccord)! - [BREAKING] Removes `date` and `currency` type from the `Input` component
24
+
25
+ - [#426](https://github.com/utilitywarehouse/hearth/pull/426) [`997e7cb`](https://github.com/utilitywarehouse/hearth/commit/997e7cb847e4f70de7b995c00aeeee18f1a0a1cd) Thanks [@jordmccord](https://github.com/jordmccord)! - [BREAKING] Adds updated `Badge` colour schemes and variants, replaces `solid` with `emphasis`
26
+
27
+ - [#429](https://github.com/utilitywarehouse/hearth/pull/429) [`1a818ff`](https://github.com/utilitywarehouse/hearth/commit/1a818ffc97a04f412deac4e892fc2400b8ad8735) Thanks [@jordmccord](https://github.com/jordmccord)! - Adds `Tabs` component
28
+
29
+ - [#421](https://github.com/utilitywarehouse/hearth/pull/421) [`a7974df`](https://github.com/utilitywarehouse/hearth/commit/a7974df554cb0eb499923a140ebea523fa49761c) Thanks [@jordmccord](https://github.com/jordmccord)! - Adds `CurrencyInput` component
30
+
31
+ ### Patch Changes
32
+
33
+ - [#430](https://github.com/utilitywarehouse/hearth/pull/430) [`a151f3a`](https://github.com/utilitywarehouse/hearth/commit/a151f3a116b97ce2756b89c07f2ac3f3105c3ff7) Thanks [@jordmccord](https://github.com/jordmccord)! - Added `autoFormatThousands` prop to `CurrencyInput` component
34
+
35
+ - [#426](https://github.com/utilitywarehouse/hearth/pull/426) [`997e7cb`](https://github.com/utilitywarehouse/hearth/commit/997e7cb847e4f70de7b995c00aeeee18f1a0a1cd) Thanks [@jordmccord](https://github.com/jordmccord)! - Adds 2 new layout spacing sizes, '2xs' and '2xl'
36
+
3
37
  ## 0.2.0
4
38
 
5
39
  ### Minor Changes
@@ -2,14 +2,36 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { CloseSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
3
3
  import { StyleSheet } from 'react-native-unistyles';
4
4
  import { UnstyledIconButton } from '../UnstyledIconButton';
5
- const AlertCloseButton = ({ style, icon = CloseSmallIcon, ...props }) => (_jsx(UnstyledIconButton, { ...props, size: "sm", style: [styles.icon, style], icon: icon }));
5
+ import { useAlertContext } from './Alert.context';
6
+ const AlertCloseButton = ({ style, icon = CloseSmallIcon, ...props }) => {
7
+ const { colorScheme } = useAlertContext();
8
+ styles.useVariants({ colorScheme });
9
+ return (_jsx(UnstyledIconButton, { ...props, size: "sm", style: [styles.button, style], icon: icon, iconStyle: styles.icon }));
10
+ };
6
11
  const styles = StyleSheet.create(theme => ({
7
- icon: {
12
+ button: {
8
13
  alignSelf: 'flex-start',
9
- color: theme.color.icon.primary,
10
14
  minWidth: 20,
11
15
  minHeight: 20,
12
16
  },
17
+ icon: {
18
+ variants: {
19
+ colorScheme: {
20
+ info: {
21
+ color: theme.color.feedback.info.foreground.default,
22
+ },
23
+ positive: {
24
+ color: theme.color.feedback.positive.foreground.default,
25
+ },
26
+ danger: {
27
+ color: theme.color.feedback.danger.foreground.default,
28
+ },
29
+ warning: {
30
+ color: theme.color.feedback.warning.foreground.default,
31
+ },
32
+ },
33
+ },
34
+ },
13
35
  }));
14
36
  AlertCloseButton.displayName = 'AlertCloseButton';
15
37
  export default AlertCloseButton;
@@ -14,6 +14,7 @@ const AlertIcon = (props) => {
14
14
  }
15
15
  return InfoMediumIcon;
16
16
  })();
17
+ styles.useVariants({ colorScheme });
17
18
  return _jsx(Icon, { ...props, as: props.as ?? asProp, style: styles.icon });
18
19
  };
19
20
  AlertIcon.displayName = 'AlertIcon';
@@ -24,7 +25,22 @@ const styles = StyleSheet.create(theme => ({
24
25
  minWidth: 24,
25
26
  minHeight: 24,
26
27
  alignSelf: 'flex-start',
27
- color: theme.color.icon.primary,
28
+ variants: {
29
+ colorScheme: {
30
+ info: {
31
+ color: theme.color.feedback.info.foreground.default,
32
+ },
33
+ positive: {
34
+ color: theme.color.feedback.positive.foreground.default,
35
+ },
36
+ danger: {
37
+ color: theme.color.feedback.danger.foreground.default,
38
+ },
39
+ warning: {
40
+ color: theme.color.feedback.warning.foreground.default,
41
+ },
42
+ },
43
+ },
28
44
  },
29
45
  }));
30
46
  export default AlertIcon;
@@ -1,6 +1,32 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ChevronRightSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
3
+ import { StyleSheet } from 'react-native-unistyles';
3
4
  import { UnstyledIconButton } from '../UnstyledIconButton';
4
- const AlertIconButton = ({ style, icon = ChevronRightSmallIcon, ...props }) => (_jsx(UnstyledIconButton, { ...props, size: "sm", style: style, icon: icon }));
5
+ import { useAlertContext } from './Alert.context';
6
+ const AlertIconButton = ({ style, icon = ChevronRightSmallIcon, ...props }) => {
7
+ const { colorScheme } = useAlertContext();
8
+ styles.useVariants({ colorScheme });
9
+ return (_jsx(UnstyledIconButton, { ...props, size: "sm", style: style, icon: icon, iconStyle: styles.icon }));
10
+ };
11
+ const styles = StyleSheet.create(theme => ({
12
+ icon: {
13
+ variants: {
14
+ colorScheme: {
15
+ info: {
16
+ color: theme.color.feedback.info.foreground.default,
17
+ },
18
+ positive: {
19
+ color: theme.color.feedback.positive.foreground.default,
20
+ },
21
+ danger: {
22
+ color: theme.color.feedback.danger.foreground.default,
23
+ },
24
+ warning: {
25
+ color: theme.color.feedback.warning.foreground.default,
26
+ },
27
+ },
28
+ },
29
+ },
30
+ }));
5
31
  AlertIconButton.displayName = 'AlertIconButton';
6
32
  export default AlertIconButton;
@@ -1,7 +1,53 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { StyleSheet } from 'react-native-unistyles';
2
3
  import { Link } from '../Link';
4
+ import { useAlertContext } from './Alert.context';
3
5
  const AlertLink = ({ children, ...props }) => {
4
- return _jsx(Link, { ...props, children: children });
6
+ const { colorScheme } = useAlertContext();
7
+ styles.useVariants({ colorScheme });
8
+ return (_jsx(Link, { ...props, textStyle: styles.text, iconStyle: styles.icon, children: children }));
5
9
  };
10
+ const styles = StyleSheet.create(theme => ({
11
+ text: {
12
+ variants: {
13
+ colorScheme: {
14
+ info: {
15
+ color: theme.color.feedback.info.foreground.default,
16
+ textDecorationColor: theme.color.feedback.info.foreground.default,
17
+ },
18
+ positive: {
19
+ color: theme.color.feedback.positive.foreground.default,
20
+ textDecorationColor: theme.color.feedback.positive.foreground.default,
21
+ },
22
+ danger: {
23
+ color: theme.color.feedback.danger.foreground.default,
24
+ textDecorationColor: theme.color.feedback.danger.foreground.default,
25
+ },
26
+ warning: {
27
+ color: theme.color.feedback.warning.foreground.default,
28
+ textDecorationColor: theme.color.feedback.warning.foreground.default,
29
+ },
30
+ },
31
+ },
32
+ },
33
+ icon: {
34
+ variants: {
35
+ colorScheme: {
36
+ info: {
37
+ color: theme.color.feedback.info.foreground.default,
38
+ },
39
+ positive: {
40
+ color: theme.color.feedback.positive.foreground.default,
41
+ },
42
+ danger: {
43
+ color: theme.color.feedback.danger.foreground.default,
44
+ },
45
+ warning: {
46
+ color: theme.color.feedback.warning.foreground.default,
47
+ },
48
+ },
49
+ },
50
+ },
51
+ }));
6
52
  AlertLink.displayName = 'AlertLink';
7
53
  export default AlertLink;
@@ -1,6 +1,6 @@
1
1
  import { TextProps } from 'react-native';
2
2
  declare const AlertText: {
3
- ({ children, ...props }: TextProps & {
3
+ ({ children, style, ...props }: TextProps & {
4
4
  semibold?: boolean;
5
5
  }): import("react/jsx-runtime").JSX.Element;
6
6
  displayName: string;
@@ -1,7 +1,31 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { StyleSheet } from 'react-native-unistyles';
2
3
  import { BodyText } from '../BodyText';
3
- const AlertText = ({ children, ...props }) => {
4
- return (_jsx(BodyText, { size: "md", ...props, children: children }));
4
+ import { useAlertContext } from './Alert.context';
5
+ const AlertText = ({ children, style, ...props }) => {
6
+ const { colorScheme } = useAlertContext();
7
+ styles.useVariants({ colorScheme });
8
+ return (_jsx(BodyText, { size: "md", style: [styles.text, style], ...props, children: children }));
5
9
  };
10
+ const styles = StyleSheet.create(theme => ({
11
+ text: {
12
+ variants: {
13
+ colorScheme: {
14
+ info: {
15
+ color: theme.color.feedback.info.foreground.default,
16
+ },
17
+ positive: {
18
+ color: theme.color.feedback.positive.foreground.default,
19
+ },
20
+ danger: {
21
+ color: theme.color.feedback.danger.foreground.default,
22
+ },
23
+ warning: {
24
+ color: theme.color.feedback.warning.foreground.default,
25
+ },
26
+ },
27
+ },
28
+ },
29
+ }));
6
30
  AlertText.displayName = 'AlertText';
7
31
  export default AlertText;
@@ -1,6 +1,6 @@
1
1
  import type { TextProps } from 'react-native';
2
2
  declare const AlertTitle: {
3
- ({ children, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
3
+ ({ children, style, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
6
  export default AlertTitle;
@@ -1,7 +1,31 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { StyleSheet } from 'react-native-unistyles';
2
3
  import { DetailText } from '../DetailText';
3
- const AlertTitle = ({ children, ...props }) => {
4
- return (_jsx(DetailText, { size: "md", ...props, children: children }));
4
+ import { useAlertContext } from './Alert.context';
5
+ const AlertTitle = ({ children, style, ...props }) => {
6
+ const { colorScheme } = useAlertContext();
7
+ styles.useVariants({ colorScheme });
8
+ return (_jsx(DetailText, { size: "md", style: [styles.title, style], ...props, children: children }));
5
9
  };
10
+ const styles = StyleSheet.create(theme => ({
11
+ title: {
12
+ variants: {
13
+ colorScheme: {
14
+ info: {
15
+ color: theme.color.feedback.info.foreground,
16
+ },
17
+ positive: {
18
+ color: theme.color.feedback.positive.foreground,
19
+ },
20
+ danger: {
21
+ color: theme.color.feedback.danger.foreground,
22
+ },
23
+ warning: {
24
+ color: theme.color.feedback.warning.foreground,
25
+ },
26
+ },
27
+ },
28
+ },
29
+ }));
6
30
  AlertTitle.displayName = 'AlertTitle';
7
31
  export default AlertTitle;
@@ -6,7 +6,7 @@ import { BadgeContext } from './Badge.context';
6
6
  import BadgeIcon from './BadgeIcon';
7
7
  import BadgeText from './BadgeText';
8
8
  const Badge = ({ children, ...props }) => {
9
- const { variant = 'solid', icon, colorScheme = 'info', flatBase = false, size = 'sm', style, ...rest } = props;
9
+ const { variant = 'subtle', icon, colorScheme = 'info', flatBase = false, size = 'sm', style, ...rest } = props;
10
10
  const value = useMemo(() => ({ colorScheme, flatBase, variant, size }), [colorScheme, flatBase, variant, size]);
11
11
  const childIsText = typeof children === 'string' || typeof children === 'number';
12
12
  styles.useVariants({ colorScheme, flatBase, variant, size });
@@ -34,9 +34,11 @@ const styles = StyleSheet.create(theme => ({
34
34
  insurance: {},
35
35
  cashback: {},
36
36
  pig: {},
37
+ highlight: {},
37
38
  },
38
39
  variant: {
39
- solid: {},
40
+ subtle: {},
41
+ emphasis: {},
40
42
  outline: {
41
43
  borderWidth: theme.components.badge.outline.borderWidth,
42
44
  borderColor: theme.color.border.subtle,
@@ -61,84 +63,169 @@ const styles = StyleSheet.create(theme => ({
61
63
  },
62
64
  },
63
65
  compoundVariants: [
64
- // Solid
66
+ // Emphasis
65
67
  {
66
68
  colorScheme: 'info',
67
- variant: 'solid',
69
+ variant: 'emphasis',
68
70
  styles: {
69
71
  backgroundColor: theme.color.feedback.info.surface.default,
70
72
  },
71
73
  },
72
74
  {
73
75
  colorScheme: 'danger',
74
- variant: 'solid',
76
+ variant: 'emphasis',
75
77
  styles: {
76
78
  backgroundColor: theme.color.feedback.danger.surface.default,
77
79
  },
78
80
  },
79
81
  {
80
82
  colorScheme: 'positive',
81
- variant: 'solid',
83
+ variant: 'emphasis',
82
84
  styles: {
83
85
  backgroundColor: theme.color.feedback.positive.surface.default,
84
86
  },
85
87
  },
86
88
  {
87
89
  colorScheme: 'warning',
88
- variant: 'solid',
90
+ variant: 'emphasis',
89
91
  styles: {
90
92
  backgroundColor: theme.color.feedback.warning.surface.default,
91
93
  },
92
94
  },
93
95
  {
94
96
  colorScheme: 'functional',
95
- variant: 'solid',
97
+ variant: 'emphasis',
96
98
  styles: {
97
99
  backgroundColor: theme.color.feedback.functional.surface.default,
98
100
  },
99
101
  },
100
102
  {
101
103
  colorScheme: 'energy',
102
- variant: 'solid',
104
+ variant: 'emphasis',
103
105
  styles: {
104
106
  backgroundColor: theme.color.surface.energy.default,
105
107
  },
106
108
  },
107
109
  {
108
110
  colorScheme: 'broadband',
109
- variant: 'solid',
111
+ variant: 'emphasis',
110
112
  styles: {
111
113
  backgroundColor: theme.color.surface.broadband.default,
112
114
  },
113
115
  },
114
116
  {
115
117
  colorScheme: 'mobile',
116
- variant: 'solid',
118
+ variant: 'emphasis',
117
119
  styles: {
118
120
  backgroundColor: theme.color.surface.mobile.default,
119
121
  },
120
122
  },
121
123
  {
122
124
  colorScheme: 'insurance',
123
- variant: 'solid',
125
+ variant: 'emphasis',
124
126
  styles: {
125
127
  backgroundColor: theme.color.surface.insurance.default,
126
128
  },
127
129
  },
128
130
  {
129
131
  colorScheme: 'cashback',
130
- variant: 'solid',
132
+ variant: 'emphasis',
131
133
  styles: {
132
134
  backgroundColor: theme.color.surface.cashback.default,
133
135
  },
134
136
  },
135
137
  {
136
138
  colorScheme: 'pig',
137
- variant: 'solid',
139
+ variant: 'emphasis',
138
140
  styles: {
139
141
  backgroundColor: theme.color.surface.pig.default,
140
142
  },
141
143
  },
144
+ // Subtle
145
+ {
146
+ colorScheme: 'info',
147
+ variant: 'subtle',
148
+ styles: {
149
+ backgroundColor: theme.color.feedback.info.surface.subtle,
150
+ },
151
+ },
152
+ {
153
+ colorScheme: 'danger',
154
+ variant: 'subtle',
155
+ styles: {
156
+ backgroundColor: theme.color.feedback.danger.surface.subtle,
157
+ },
158
+ },
159
+ {
160
+ colorScheme: 'positive',
161
+ variant: 'subtle',
162
+ styles: {
163
+ backgroundColor: theme.color.feedback.positive.surface.subtle,
164
+ },
165
+ },
166
+ {
167
+ colorScheme: 'warning',
168
+ variant: 'subtle',
169
+ styles: {
170
+ backgroundColor: theme.color.feedback.warning.surface.subtle,
171
+ },
172
+ },
173
+ {
174
+ colorScheme: 'functional',
175
+ variant: 'subtle',
176
+ styles: {
177
+ backgroundColor: theme.color.feedback.functional.surface.subtle,
178
+ },
179
+ },
180
+ {
181
+ colorScheme: 'energy',
182
+ variant: 'subtle',
183
+ styles: {
184
+ backgroundColor: theme.color.surface.energy.subtle,
185
+ },
186
+ },
187
+ {
188
+ colorScheme: 'broadband',
189
+ variant: 'subtle',
190
+ styles: {
191
+ backgroundColor: theme.color.surface.broadband.subtle,
192
+ },
193
+ },
194
+ {
195
+ colorScheme: 'mobile',
196
+ variant: 'subtle',
197
+ styles: {
198
+ backgroundColor: theme.color.surface.mobile.subtle,
199
+ },
200
+ },
201
+ {
202
+ colorScheme: 'insurance',
203
+ variant: 'subtle',
204
+ styles: {
205
+ backgroundColor: theme.color.surface.insurance.subtle,
206
+ },
207
+ },
208
+ {
209
+ colorScheme: 'cashback',
210
+ variant: 'subtle',
211
+ styles: {
212
+ backgroundColor: theme.color.surface.cashback.subtle,
213
+ },
214
+ },
215
+ {
216
+ colorScheme: 'pig',
217
+ variant: 'subtle',
218
+ styles: {
219
+ backgroundColor: theme.color.surface.pig.subtle,
220
+ },
221
+ },
222
+ {
223
+ colorScheme: 'highlight',
224
+ variant: 'subtle',
225
+ styles: {
226
+ backgroundColor: theme.color.surface.highlight.subtle,
227
+ },
228
+ },
142
229
  // Outline
143
230
  {
144
231
  colorScheme: 'info',
@@ -1,8 +1,8 @@
1
1
  import type { ComponentType } from 'react';
2
2
  import type { ViewProps } from 'react-native';
3
3
  interface BadgeProps extends ViewProps {
4
- variant?: 'solid' | 'outline';
5
- colorScheme?: 'info' | 'positive' | 'danger' | 'warning' | 'functional' | 'energy' | 'broadband' | 'mobile' | 'insurance' | 'cashback' | 'pig';
4
+ variant?: 'subtle' | 'emphasis' | 'outline';
5
+ colorScheme?: 'info' | 'positive' | 'danger' | 'warning' | 'functional' | 'energy' | 'broadband' | 'mobile' | 'insurance' | 'cashback' | 'pig' | 'highlight';
6
6
  size?: 'sm' | 'md';
7
7
  icon?: ComponentType;
8
8
  flatBase?: boolean;
@@ -27,91 +27,89 @@ const styles = StyleSheet.create(theme => ({
27
27
  insurance: {},
28
28
  cashback: {},
29
29
  pig: {},
30
+ highlight: {},
30
31
  },
31
32
  variant: {
32
- solid: {
33
+ emphasis: {
34
+ color: theme.color.text.primary,
35
+ },
36
+ subtle: {
33
37
  color: theme.color.text.primary,
34
38
  },
35
39
  outline: {},
36
40
  },
37
41
  },
38
42
  compoundVariants: [
39
- // Solid
43
+ // Emphasis
40
44
  {
41
45
  colorScheme: 'info',
42
- variant: 'solid',
46
+ variant: 'emphasis',
43
47
  styles: {
44
48
  color: theme.color.feedback.info.foreground.default,
45
49
  },
46
50
  },
47
51
  {
48
52
  colorScheme: 'danger',
49
- variant: 'solid',
53
+ variant: 'emphasis',
50
54
  styles: {
51
55
  color: theme.color.feedback.danger.foreground.default,
52
56
  },
53
57
  },
54
58
  {
55
59
  colorScheme: 'positive',
56
- variant: 'solid',
60
+ variant: 'emphasis',
57
61
  styles: {
58
62
  color: theme.color.feedback.positive.foreground.default,
59
63
  },
60
64
  },
61
65
  {
62
66
  colorScheme: 'warning',
63
- variant: 'solid',
67
+ variant: 'emphasis',
64
68
  styles: {
65
69
  color: theme.color.feedback.warning.foreground.default,
66
70
  },
67
71
  },
68
72
  {
69
73
  colorScheme: 'functional',
70
- variant: 'solid',
74
+ variant: 'emphasis',
71
75
  styles: {
72
76
  color: theme.color.feedback.functional.foreground.default,
73
77
  },
74
78
  },
79
+ // Subtle
75
80
  {
76
- colorScheme: 'energy',
77
- variant: 'solid',
78
- styles: {
79
- color: theme.color.icon.primary,
80
- },
81
- },
82
- {
83
- colorScheme: 'broadband',
84
- variant: 'solid',
81
+ colorScheme: 'info',
82
+ variant: 'subtle',
85
83
  styles: {
86
- color: theme.color.icon.primary,
84
+ color: theme.color.feedback.info.foreground.default,
87
85
  },
88
86
  },
89
87
  {
90
- colorScheme: 'mobile',
91
- variant: 'solid',
88
+ colorScheme: 'danger',
89
+ variant: 'subtle',
92
90
  styles: {
93
- color: theme.color.icon.primary,
91
+ color: theme.color.feedback.danger.foreground.default,
94
92
  },
95
93
  },
96
94
  {
97
- colorScheme: 'insurance',
98
- variant: 'solid',
95
+ colorScheme: 'positive',
96
+ variant: 'subtle',
99
97
  styles: {
100
- color: theme.color.icon.primary,
98
+ color: theme.color.feedback.positive.foreground.default,
101
99
  },
102
100
  },
103
101
  {
104
- colorScheme: 'cashback',
105
- variant: 'solid',
102
+ colorScheme: 'warning',
103
+ variant: 'subtle',
106
104
  styles: {
107
- color: theme.color.icon.primary,
105
+ color: theme.color.feedback.warning.foreground.default,
108
106
  },
109
107
  },
110
108
  {
111
- colorScheme: 'pig',
112
- variant: 'solid',
109
+ colorScheme: 'functional',
110
+ variant: 'subtle',
113
111
  styles: {
114
- color: theme.color.icon.primary,
112
+ color: theme.color.feedback.functional.foreground.default,
115
113
  },
116
114
  },
117
115
  // Outline