@utilitywarehouse/hearth-react-native 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-lint.log +1 -1
  3. package/CHANGELOG.md +44 -0
  4. package/build/components/Alert/AlertTitle.js +6 -6
  5. package/build/components/Badge/Badge.js +3 -3
  6. package/build/components/Badge/Badge.props.d.ts +1 -0
  7. package/build/components/Button/ButtonRoot.js +4 -0
  8. package/build/components/Button/ButtonText.js +2 -2
  9. package/build/components/Card/CardRoot.js +1 -1
  10. package/build/components/Carousel/Carousel.context.d.ts +4 -0
  11. package/build/components/Carousel/Carousel.context.js +4 -0
  12. package/build/components/Carousel/Carousel.d.ts +6 -0
  13. package/build/components/Carousel/Carousel.js +278 -0
  14. package/build/components/Carousel/Carousel.props.d.ts +65 -0
  15. package/build/components/Carousel/Carousel.props.js +1 -0
  16. package/build/components/Carousel/CarouselControlItem.d.ts +24 -0
  17. package/build/components/Carousel/CarouselControlItem.js +64 -0
  18. package/build/components/Carousel/CarouselControls.d.ts +4 -0
  19. package/build/components/Carousel/CarouselControls.js +74 -0
  20. package/build/components/Carousel/CarouselItem.d.ts +6 -0
  21. package/build/components/Carousel/CarouselItem.js +38 -0
  22. package/build/components/Carousel/index.d.ts +5 -0
  23. package/build/components/Carousel/index.js +5 -0
  24. package/build/components/DescriptionList/DescriptionList.d.ts +1 -1
  25. package/build/components/DescriptionList/DescriptionList.js +2 -2
  26. package/build/components/DescriptionList/DescriptionList.props.d.ts +1 -8
  27. package/build/components/DescriptionList/DescriptionListItem.d.ts +1 -1
  28. package/build/components/DescriptionList/DescriptionListItem.js +4 -3
  29. package/build/components/DescriptionList/DescriptionListItem.props.d.ts +3 -8
  30. package/build/components/IndicatorIconButton/IndicatorIconButton.d.ts +6 -0
  31. package/build/components/IndicatorIconButton/IndicatorIconButton.js +26 -0
  32. package/build/components/IndicatorIconButton/IndicatorIconButton.props.d.ts +8 -0
  33. package/build/components/IndicatorIconButton/IndicatorIconButton.props.js +1 -0
  34. package/build/components/IndicatorIconButton/index.d.ts +2 -0
  35. package/build/components/IndicatorIconButton/index.js +1 -0
  36. package/build/components/Link/LinkText.js +3 -3
  37. package/build/components/List/List.context.d.ts +0 -2
  38. package/build/components/List/List.d.ts +1 -1
  39. package/build/components/List/List.js +5 -5
  40. package/build/components/List/List.props.d.ts +1 -9
  41. package/build/components/List/ListAction/ListAction.d.ts +18 -0
  42. package/build/components/List/ListAction/ListAction.js +103 -0
  43. package/build/components/List/ListAction/ListAction.props.d.ts +8 -0
  44. package/build/components/List/ListAction/ListAction.props.js +1 -0
  45. package/build/components/List/ListAction/ListActionContent.d.ts +6 -0
  46. package/build/components/List/ListAction/ListActionContent.js +14 -0
  47. package/build/components/List/ListAction/ListActionText.d.ts +6 -0
  48. package/build/components/List/ListAction/ListActionText.js +7 -0
  49. package/build/components/List/ListAction/ListActionTrailingContent.d.ts +6 -0
  50. package/build/components/List/ListAction/ListActionTrailingContent.js +5 -0
  51. package/build/components/List/ListAction/ListActionTrailingIcon.d.ts +9 -0
  52. package/build/components/List/ListAction/ListActionTrailingIcon.js +18 -0
  53. package/build/components/List/ListAction/index.d.ts +6 -0
  54. package/build/components/List/ListAction/index.js +5 -0
  55. package/build/components/List/ListItem/ListItem.context.d.ts +1 -1
  56. package/build/components/List/ListItem/ListItem.props.d.ts +9 -5
  57. package/build/components/List/ListItem/ListItemRoot.d.ts +1 -1
  58. package/build/components/List/ListItem/ListItemRoot.js +10 -12
  59. package/build/components/List/ListItem/index.d.ts +4 -4
  60. package/build/components/List/ListItem/index.js +3 -3
  61. package/build/components/List/index.d.ts +1 -0
  62. package/build/components/List/index.js +1 -0
  63. package/build/components/ProgressStepper/ProgressStep.d.ts +10 -0
  64. package/build/components/ProgressStepper/ProgressStep.js +100 -0
  65. package/build/components/ProgressStepper/ProgressStepper.d.ts +6 -0
  66. package/build/components/ProgressStepper/ProgressStepper.js +22 -0
  67. package/build/components/ProgressStepper/ProgressStepper.props.d.ts +22 -0
  68. package/build/components/ProgressStepper/ProgressStepper.props.js +1 -0
  69. package/build/components/ProgressStepper/ProgressStepperRoot.d.ts +6 -0
  70. package/build/components/ProgressStepper/ProgressStepperRoot.js +16 -0
  71. package/build/components/ProgressStepper/index.d.ts +3 -0
  72. package/build/components/ProgressStepper/index.js +2 -0
  73. package/build/components/SectionHeader/SectionHeader.d.ts +1 -1
  74. package/build/components/SectionHeader/SectionHeader.js +6 -3
  75. package/build/components/SectionHeader/SectionHeader.props.d.ts +9 -16
  76. package/build/components/SectionHeader/SectionHeaderTrailingContent.d.ts +6 -0
  77. package/build/components/SectionHeader/SectionHeaderTrailingContent.js +13 -0
  78. package/build/components/SectionHeader/index.d.ts +1 -0
  79. package/build/components/SectionHeader/index.js +1 -0
  80. package/build/components/Tabs/Tab.js +2 -2
  81. package/build/components/ToggleButton/ToggleButtonText.js +2 -2
  82. package/build/components/UnstyledIconButton/UnstyledIconButton.props.d.ts +4 -1
  83. package/build/components/index.d.ts +3 -0
  84. package/build/components/index.js +3 -0
  85. package/build/core/themes.d.ts +12 -24
  86. package/build/tokens/components/dark/button.d.ts +1 -1
  87. package/build/tokens/components/dark/button.js +1 -1
  88. package/build/tokens/components/dark/dialog.d.ts +1 -0
  89. package/build/tokens/components/dark/dialog.js +1 -0
  90. package/build/tokens/components/dark/illustrations.d.ts +1 -0
  91. package/build/tokens/components/dark/illustrations.js +1 -0
  92. package/build/tokens/components/dark/toast.d.ts +4 -1
  93. package/build/tokens/components/dark/toast.js +4 -1
  94. package/build/tokens/components/light/button.d.ts +1 -1
  95. package/build/tokens/components/light/button.js +1 -1
  96. package/build/tokens/components/light/dialog.d.ts +1 -0
  97. package/build/tokens/components/light/dialog.js +1 -0
  98. package/build/tokens/components/light/illustrations.d.ts +1 -0
  99. package/build/tokens/components/light/illustrations.js +1 -0
  100. package/build/tokens/components/light/toast.d.ts +4 -1
  101. package/build/tokens/components/light/toast.js +4 -1
  102. package/build/tokens/layout.d.ts +6 -12
  103. package/build/tokens/layout.js +3 -6
  104. package/docs/components/AllComponents.web.tsx +86 -4
  105. package/docs/components/BadgeList.tsx +20 -56
  106. package/docs/components/SwitchList.tsx +4 -8
  107. package/docs/getting-started.mdx +30 -14
  108. package/docs/introduction.mdx +1 -1
  109. package/package.json +4 -4
  110. package/src/components/Alert/AlertTitle.tsx +7 -7
  111. package/src/components/Badge/Badge.props.ts +1 -0
  112. package/src/components/Badge/Badge.tsx +3 -2
  113. package/src/components/Button/ButtonRoot.tsx +4 -0
  114. package/src/components/Button/ButtonText.tsx +3 -3
  115. package/src/components/Card/CardRoot.tsx +2 -0
  116. package/src/components/Carousel/Carousel.context.tsx +8 -0
  117. package/src/components/Carousel/Carousel.docs.mdx +389 -0
  118. package/src/components/Carousel/Carousel.props.ts +89 -0
  119. package/src/components/Carousel/Carousel.stories.tsx +317 -0
  120. package/src/components/Carousel/Carousel.tsx +444 -0
  121. package/src/components/Carousel/CarouselControlItem.tsx +87 -0
  122. package/src/components/Carousel/CarouselControls.tsx +150 -0
  123. package/src/components/Carousel/CarouselItem.tsx +68 -0
  124. package/src/components/Carousel/index.ts +6 -0
  125. package/src/components/DescriptionList/DescriptionList.docs.mdx +24 -27
  126. package/src/components/DescriptionList/DescriptionList.props.ts +1 -8
  127. package/src/components/DescriptionList/DescriptionList.stories.tsx +13 -19
  128. package/src/components/DescriptionList/DescriptionList.tsx +2 -14
  129. package/src/components/DescriptionList/DescriptionListItem.props.ts +3 -8
  130. package/src/components/DescriptionList/DescriptionListItem.tsx +13 -21
  131. package/src/components/IndicatorIconButton/IndicatorIconButton.docs.mdx +85 -0
  132. package/src/components/IndicatorIconButton/IndicatorIconButton.props.ts +12 -0
  133. package/src/components/IndicatorIconButton/IndicatorIconButton.stories.tsx +142 -0
  134. package/src/components/IndicatorIconButton/IndicatorIconButton.tsx +36 -0
  135. package/src/components/IndicatorIconButton/index.tsx +2 -0
  136. package/src/components/Link/LinkText.tsx +4 -4
  137. package/src/components/List/List.context.ts +0 -1
  138. package/src/components/List/List.docs.mdx +376 -179
  139. package/src/components/List/List.props.ts +1 -9
  140. package/src/components/List/List.stories.tsx +289 -38
  141. package/src/components/List/List.tsx +5 -26
  142. package/src/components/List/ListAction/ListAction.props.ts +10 -0
  143. package/src/components/List/ListAction/ListAction.tsx +133 -0
  144. package/src/components/List/ListAction/ListActionContent.tsx +21 -0
  145. package/src/components/List/ListAction/ListActionText.tsx +14 -0
  146. package/src/components/List/ListAction/ListActionTrailingContent.tsx +9 -0
  147. package/src/components/List/ListAction/ListActionTrailingIcon.tsx +32 -0
  148. package/src/components/List/ListAction/index.ts +6 -0
  149. package/src/components/List/ListItem/ListItem.context.ts +1 -1
  150. package/src/components/List/ListItem/ListItem.props.ts +9 -5
  151. package/src/components/List/ListItem/ListItemRoot.tsx +18 -14
  152. package/src/components/List/ListItem/index.ts +4 -4
  153. package/src/components/List/index.ts +1 -0
  154. package/src/components/ProgressStepper/ProgressStep.tsx +134 -0
  155. package/src/components/ProgressStepper/ProgressStepper.docs.mdx +87 -0
  156. package/src/components/ProgressStepper/ProgressStepper.props.ts +27 -0
  157. package/src/components/ProgressStepper/ProgressStepper.stories.tsx +108 -0
  158. package/src/components/ProgressStepper/ProgressStepper.tsx +26 -0
  159. package/src/components/ProgressStepper/ProgressStepperRoot.tsx +32 -0
  160. package/src/components/ProgressStepper/index.ts +3 -0
  161. package/src/components/SectionHeader/SectionHeader.props.ts +9 -16
  162. package/src/components/SectionHeader/SectionHeader.stories.tsx +28 -18
  163. package/src/components/SectionHeader/SectionHeader.tsx +18 -19
  164. package/src/components/SectionHeader/SectionHeaderTrailingContent.tsx +20 -0
  165. package/src/components/SectionHeader/Sectionheader.docs.mdx +9 -24
  166. package/src/components/SectionHeader/index.ts +1 -0
  167. package/src/components/Switch/Switch.docs.mdx +0 -4
  168. package/src/components/Tabs/Tab.tsx +4 -2
  169. package/src/components/ToggleButton/ToggleButtonText.tsx +3 -3
  170. package/src/components/UnstyledIconButton/UnstyledIconButton.props.ts +2 -1
  171. package/src/components/index.ts +3 -0
  172. package/src/tokens/components/dark/button.ts +1 -1
  173. package/src/tokens/components/dark/dialog.ts +1 -0
  174. package/src/tokens/components/dark/illustrations.ts +1 -0
  175. package/src/tokens/components/dark/toast.ts +4 -1
  176. package/src/tokens/components/light/button.ts +1 -1
  177. package/src/tokens/components/light/dialog.ts +1 -0
  178. package/src/tokens/components/light/illustrations.ts +1 -0
  179. package/src/tokens/components/light/toast.ts +4 -1
  180. package/src/tokens/layout.ts +3 -6
@@ -1,64 +1,28 @@
1
- import {
2
- Badge,
3
- BadgeText,
4
- Box,
5
- Flex,
6
- List,
7
- ListItem,
8
- ListItemContent,
9
- ListItemHelperText,
10
- ListItemIcon,
11
- ListItemLeadingContent,
12
- ListItemText,
13
- ListItemTrailingContent,
14
- ListItemTrailingIcon,
15
- } from '../../src';
1
+ import { IconContainer, List, ListItem } from '../../src';
16
2
 
17
- import {
18
- ChevronRightMediumIcon,
19
- ElectricityMediumIcon,
20
- GasMediumIcon,
21
- } from '@utilitywarehouse/hearth-react-native-icons';
3
+ import { ElectricityMediumIcon, GasMediumIcon } from '@utilitywarehouse/hearth-react-native-icons';
22
4
 
23
5
  const BadgeList = () => {
24
6
  return (
25
7
  <List>
26
- <ListItem onPress={() => console.log('pressed')} divider>
27
- <ListItemLeadingContent>
28
- <Box padding="300" borderRadius="lg" bg="energyBlue300">
29
- <ListItemIcon as={ElectricityMediumIcon} color="energyBlue600" />
30
- </Box>
31
- </ListItemLeadingContent>
32
- <ListItemContent>
33
- <ListItemText>Electricity</ListItemText>
34
- <Badge colorScheme="info">
35
- <BadgeText>Text</BadgeText>
36
- </Badge>
37
- <ListItemHelperText>Last reading 23/03/24</ListItemHelperText>
38
- </ListItemContent>
39
- <ListItemTrailingContent>
40
- <ListItemTrailingIcon as={ChevronRightMediumIcon} />
41
- </ListItemTrailingContent>
42
- </ListItem>
43
- <ListItem onPress={() => console.log('pressed')} divider={false}>
44
- <ListItemLeadingContent>
45
- <Box padding="300" borderRadius="lg" bg="energyBlue300">
46
- <ListItemIcon as={GasMediumIcon} color="energyBlue600" />
47
- </Box>
48
- </ListItemLeadingContent>
49
- <ListItemContent>
50
- <Flex direction="row" style={{ justifyContent: 'space-between' }}>
51
- <ListItemText>Gas</ListItemText>
52
- <Badge colorScheme="positive">
53
- <BadgeText>Smart meter</BadgeText>
54
- </Badge>
55
- </Flex>
56
- <ListItemHelperText>Last reading 23/03/24</ListItemHelperText>
57
- </ListItemContent>
58
- <ListItemTrailingContent>
59
- <ListItemTrailingIcon as={ChevronRightMediumIcon} />
60
- </ListItemTrailingContent>
61
- </ListItem>
8
+ <ListItem
9
+ heading="Electricity"
10
+ helperText="Last reading 23/03/24"
11
+ onPress={() => console.log('pressed')}
12
+ leadingContent={
13
+ <IconContainer icon={ElectricityMediumIcon} size="md" variant="emphasis" color="energy" />
14
+ }
15
+ badge={{ text: 'Text' }}
16
+ />
17
+ <ListItem
18
+ heading="Gas"
19
+ helperText="Last reading 23/03/24"
20
+ onPress={() => console.log('pressed')}
21
+ leadingContent={
22
+ <IconContainer icon={GasMediumIcon} size="md" variant="emphasis" color="energy" />
23
+ }
24
+ badge={{ text: 'Smart Meter' }}
25
+ />
62
26
  </List>
63
27
  );
64
28
  };
@@ -16,9 +16,8 @@ const SwitchList = () => {
16
16
  return (
17
17
  <List container="subtleWhite">
18
18
  <ListItem
19
- text="Notifications"
19
+ heading="Notifications"
20
20
  helperText="Allow notifications"
21
- divider
22
21
  leadingContent={<ListItemIcon as={BellMediumIcon} />}
23
22
  trailingContent={
24
23
  <Switch value={notifications} onValueChange={setNotifications} size="small" />
@@ -26,25 +25,22 @@ const SwitchList = () => {
26
25
  onPress={() => setNotifications(!notifications)}
27
26
  />
28
27
  <ListItem
29
- text="Secure ID"
28
+ heading="Secure ID"
30
29
  helperText="Use secure ID"
31
- divider
32
30
  leadingContent={<ListItemIcon as={LockMediumIcon} />}
33
31
  trailingContent={<Switch value={secureId} onValueChange={setSecureId} size="small" />}
34
32
  onPress={() => setSecureId(!secureId)}
35
33
  />
36
34
  <ListItem
37
- text="Location"
35
+ heading="Location"
38
36
  helperText="Allow location"
39
- divider
40
37
  leadingContent={<ListItemIcon as={LocationMediumIcon} />}
41
38
  trailingContent={<Switch value={location} onValueChange={setLocation} size="small" />}
42
39
  onPress={() => setLocation(!location)}
43
40
  />
44
41
  <ListItem
45
- text="Dark mode"
42
+ heading="Dark mode"
46
43
  helperText="Enable dark mode"
47
- divider
48
44
  leadingContent={<ListItemIcon as={EyeMediumIcon} />}
49
45
  trailingContent={<Switch value={darkMode} onValueChange={setDarkMode} size="small" />}
50
46
  onPress={() => setDarkMode(!darkMode)}
@@ -8,6 +8,7 @@ import { BackToTopButton, NextPrevPage } from './components';
8
8
 
9
9
  You can just start using the components from the `@utilitywarehouse/hearth-react-native` package.
10
10
  Although there are a few components that require a `BottomSheetModalProvider` to be wrapped around your app.
11
+ You should also make sure you're app is wrapped in a `GestureHandlerRootView` from `react-native-gesture-handler`.
11
12
 
12
13
  ```tsx
13
14
  import {
@@ -16,14 +17,17 @@ import {
16
17
  BodyText,
17
18
  BottomSheetModalProvider,
18
19
  } from '@utilitywarehouse/hearth-react-native';
20
+ import { GestureHandlerRootView } from 'react-native-gesture-handler';
19
21
 
20
22
  const App: React.FC = () => (
21
- <BottomSheetModalProvider>
22
- <Box p="200">
23
- <Alert variant="info" text="Welcome to Hearth React Native!" />
24
- <BodyText>Start building your app with Hearth React Native components.</BodyText>
25
- </Box>
26
- </BottomSheetModalProvider>
23
+ <GestureHandlerRootView>
24
+ <BottomSheetModalProvider>
25
+ <Box p="200">
26
+ <Alert colorScheme="positive" text="Welcome to Hearth React Native!" />
27
+ <BodyText>Start building your app with Hearth React Native components.</BodyText>
28
+ </Box>
29
+ </BottomSheetModalProvider>
30
+ </GestureHandlerRootView>
27
31
  );
28
32
  ```
29
33
 
@@ -33,19 +37,31 @@ By default the light colour mode is enabled. If you want to enable dark mode, yo
33
37
  use the `useColorMode` hook to toggle between light and dark modes.
34
38
 
35
39
  ```tsx
36
- import { useColorMode, Box, Alert, BodyText, Button } from '@utilitywarehouse/hearth-react-native';
40
+ import {
41
+ useColorMode,
42
+ Box,
43
+ Alert,
44
+ BodyText,
45
+ Button,
46
+ BottomSheetModalProvider,
47
+ } from '@utilitywarehouse/hearth-react-native';
48
+ import { GestureHandlerRootView } from 'react-native-gesture-handler';
37
49
 
38
50
  const App: React.FC = () => {
39
51
  const [colorMode, setColorMode] = useColorMode();
40
52
 
41
53
  return (
42
- <Box p="200">
43
- <Alert variant="info" text="Welcome to Hearth React Native!" />
44
- <BodyText>Start building your app with Hearth React Native components.</BodyText>
45
- <Button onPress={() => setColorMode(colorMode === 'light' ? 'dark' : 'light')}>
46
- Toggle Color Mode
47
- </Button>
48
- </Box>
54
+ <GestureHandlerRootView>
55
+ <BottomSheetModalProvider>
56
+ <Box p="200">
57
+ <Alert colorScheme="positive" text="Welcome to Hearth React Native!" />
58
+ <BodyText>Start building your app with Hearth React Native components.</BodyText>
59
+ <Button onPress={() => setColorMode(colorMode === 'light' ? 'dark' : 'light')}>
60
+ Toggle Color Mode
61
+ </Button>
62
+ </Box>
63
+ </BottomSheetModalProvider>
64
+ </GestureHandlerRootView>
49
65
  );
50
66
  };
51
67
  ```
@@ -42,7 +42,7 @@ npm install @utilitywarehouse/hearth-react-native
42
42
  To install the peer dependencies, you can run the following command:
43
43
 
44
44
  ```console
45
- npm install react-native-unistyles react-native-edge-to-edge react-native-nitro-modules@0.28.1 @gorhom/bottom-sheet react-native-svg react-native-reanimated react-native-worklets react-native-gesture-handler @utilitywarehouse/hearth-react-native-icons
45
+ npm install react-native-unistyles react-native-edge-to-edge react-native-nitro-modules @gorhom/bottom-sheet react-native-svg react-native-reanimated react-native-worklets react-native-gesture-handler @utilitywarehouse/hearth-react-native-icons
46
46
  ```
47
47
 
48
48
  For more information on how to install and configure `react-native-svg`, `react-native-gesture-handler` and `react-native-reanimated`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utilitywarehouse/hearth-react-native",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "Utility Warehouse React Native UI library",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -53,14 +53,14 @@
53
53
  "typescript": "^5.7.3",
54
54
  "vite": "^7.1.3",
55
55
  "vitest": "^3.2.4",
56
- "@utilitywarehouse/hearth-react-icons": "^0.5.0",
57
56
  "@utilitywarehouse/hearth-fonts": "^0.0.4",
58
- "@utilitywarehouse/hearth-react-native-icons": "^0.5.0",
57
+ "@utilitywarehouse/hearth-react-icons": "^0.7.0",
58
+ "@utilitywarehouse/hearth-react-native-icons": "^0.7.0",
59
59
  "@utilitywarehouse/hearth-tokens": "^0.1.3"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "@gorhom/bottom-sheet": "^5.0.0",
63
- "@utilitywarehouse/hearth-react-native-icons": "0.4.0",
63
+ "@utilitywarehouse/hearth-react-native-icons": "0.6.0",
64
64
  "react": ">=17 || ^18.0.0 || ^19.0.0",
65
65
  "react-native": ">=0.77",
66
66
  "react-native-gesture-handler": "^2.22.0",
@@ -1,15 +1,15 @@
1
1
  import type { TextProps, TextStyle } from 'react-native';
2
2
  import { StyleSheet } from 'react-native-unistyles';
3
- import { DetailText } from '../DetailText';
3
+ import { BodyText } from '../BodyText';
4
4
  import { useAlertContext } from './Alert.context';
5
5
 
6
6
  const AlertTitle = ({ children, style, ...props }: TextProps) => {
7
7
  const { colorScheme } = useAlertContext();
8
8
  styles.useVariants({ colorScheme });
9
9
  return (
10
- <DetailText size="md" style={[styles.title as TextStyle, style]} {...props}>
10
+ <BodyText size="md" weight="semibold" style={[styles.title as TextStyle, style]} {...props}>
11
11
  {children}
12
- </DetailText>
12
+ </BodyText>
13
13
  );
14
14
  };
15
15
 
@@ -18,16 +18,16 @@ const styles = StyleSheet.create(theme => ({
18
18
  variants: {
19
19
  colorScheme: {
20
20
  info: {
21
- color: theme.color.feedback.info.foreground,
21
+ color: theme.color.feedback.info.foreground.default,
22
22
  },
23
23
  positive: {
24
- color: theme.color.feedback.positive.foreground,
24
+ color: theme.color.feedback.positive.foreground.default,
25
25
  },
26
26
  danger: {
27
- color: theme.color.feedback.danger.foreground,
27
+ color: theme.color.feedback.danger.foreground.default,
28
28
  },
29
29
  warning: {
30
- color: theme.color.feedback.warning.foreground,
30
+ color: theme.color.feedback.warning.foreground.default,
31
31
  },
32
32
  },
33
33
  },
@@ -19,6 +19,7 @@ interface BadgeProps extends ViewProps {
19
19
  size?: 'sm' | 'md';
20
20
  icon?: ComponentType;
21
21
  flatBase?: boolean;
22
+ text?: string | number;
22
23
  }
23
24
 
24
25
  export default BadgeProps;
@@ -14,6 +14,7 @@ const Badge = ({ children, ...props }: BadgeProps) => {
14
14
  flatBase = false,
15
15
  size = 'sm',
16
16
  style,
17
+ text,
17
18
  ...rest
18
19
  } = props;
19
20
 
@@ -22,7 +23,7 @@ const Badge = ({ children, ...props }: BadgeProps) => {
22
23
  [colorScheme, flatBase, variant, size]
23
24
  );
24
25
 
25
- const childIsText = typeof children === 'string' || typeof children === 'number';
26
+ const childIsText = typeof children === 'string' || typeof children === 'number' || !!text;
26
27
 
27
28
  styles.useVariants({ colorScheme, flatBase, variant, size });
28
29
 
@@ -30,7 +31,7 @@ const Badge = ({ children, ...props }: BadgeProps) => {
30
31
  <BadgeContext.Provider value={value}>
31
32
  <View {...rest} style={[styles.container, style]}>
32
33
  {!!icon && <BadgeIcon as={icon} />}
33
- {childIsText ? <BadgeText>{children}</BadgeText> : children}
34
+ {childIsText ? <BadgeText>{text ?? children}</BadgeText> : children}
34
35
  </View>
35
36
  </BadgeContext.Provider>
36
37
  );
@@ -103,6 +103,7 @@ const styles = StyleSheet.create(theme => ({
103
103
  ghost: {
104
104
  backgroundColor: 'transparent',
105
105
  borderWidth: 0,
106
+ textDecoration: 'underline',
106
107
  },
107
108
  },
108
109
  size: {
@@ -348,6 +349,7 @@ const styles = StyleSheet.create(theme => ({
348
349
  variant: 'ghost',
349
350
  colorScheme: 'functional',
350
351
  styles: {
352
+ textDecorationColor: theme.color.interactive.functional.foreground.subtle,
351
353
  _web: {
352
354
  _hover: {
353
355
  backgroundColor: theme.color.interactive.functional.surface.subtle.hover,
@@ -395,6 +397,7 @@ const styles = StyleSheet.create(theme => ({
395
397
  variant: 'ghost',
396
398
  colorScheme: 'affirmative',
397
399
  styles: {
400
+ textDecorationColor: theme.color.interactive.affirmative.foreground.subtle,
398
401
  _web: {
399
402
  _hover: {
400
403
  backgroundColor: theme.color.interactive.affirmative.surface.subtle.hover,
@@ -418,6 +421,7 @@ const styles = StyleSheet.create(theme => ({
418
421
  variant: 'ghost',
419
422
  colorScheme: 'destructive',
420
423
  styles: {
424
+ textDecorationColor: theme.color.interactive.destructive.foreground.subtle,
421
425
  _web: {
422
426
  _hover: {
423
427
  backgroundColor: theme.color.interactive.destructive.surface.subtle.hover,
@@ -1,15 +1,15 @@
1
1
  import { TextProps } from 'react-native';
2
2
  import { StyleSheet } from 'react-native-unistyles';
3
- import { DetailText } from '../DetailText';
3
+ import { BodyText } from '../BodyText';
4
4
  import { useButtonContext } from './Button.context';
5
5
 
6
6
  const ButtonText = ({ children, ...props }: TextProps) => {
7
7
  const { colorScheme, variant, inverted, disabled } = useButtonContext();
8
8
  styles.useVariants({ colorScheme, variant, inverted, disabled });
9
9
  return (
10
- <DetailText size="md" {...props} style={[styles.text, props.style]}>
10
+ <BodyText size="md" weight="semibold" {...props} style={[styles.text, props.style]}>
11
11
  {children}
12
- </DetailText>
12
+ </BodyText>
13
13
  );
14
14
  };
15
15
 
@@ -85,6 +85,8 @@ const Card = ({
85
85
  disabled={disabled}
86
86
  style={[styles.card, computedStyles, style as ViewStyle]}
87
87
  onPress={handlePress}
88
+ accessible={showPressed}
89
+ importantForAccessibility={showPressed ? 'yes' : 'no'}
88
90
  >
89
91
  {children}
90
92
  </Pressable>
@@ -0,0 +1,8 @@
1
+ import { createContext, useContext } from 'react';
2
+ import { CarouselContextValue } from './Carousel.props';
3
+
4
+ const CarouselContext = createContext<CarouselContextValue>({} as CarouselContextValue);
5
+
6
+ export const useCarouselContext = () => useContext(CarouselContext);
7
+
8
+ export default CarouselContext;