@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.
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-lint.log +1 -1
- package/CHANGELOG.md +44 -0
- package/build/components/Alert/AlertTitle.js +6 -6
- package/build/components/Badge/Badge.js +3 -3
- package/build/components/Badge/Badge.props.d.ts +1 -0
- package/build/components/Button/ButtonRoot.js +4 -0
- package/build/components/Button/ButtonText.js +2 -2
- package/build/components/Card/CardRoot.js +1 -1
- package/build/components/Carousel/Carousel.context.d.ts +4 -0
- package/build/components/Carousel/Carousel.context.js +4 -0
- package/build/components/Carousel/Carousel.d.ts +6 -0
- package/build/components/Carousel/Carousel.js +278 -0
- package/build/components/Carousel/Carousel.props.d.ts +65 -0
- package/build/components/Carousel/Carousel.props.js +1 -0
- package/build/components/Carousel/CarouselControlItem.d.ts +24 -0
- package/build/components/Carousel/CarouselControlItem.js +64 -0
- package/build/components/Carousel/CarouselControls.d.ts +4 -0
- package/build/components/Carousel/CarouselControls.js +74 -0
- package/build/components/Carousel/CarouselItem.d.ts +6 -0
- package/build/components/Carousel/CarouselItem.js +38 -0
- package/build/components/Carousel/index.d.ts +5 -0
- package/build/components/Carousel/index.js +5 -0
- package/build/components/DescriptionList/DescriptionList.d.ts +1 -1
- package/build/components/DescriptionList/DescriptionList.js +2 -2
- package/build/components/DescriptionList/DescriptionList.props.d.ts +1 -8
- package/build/components/DescriptionList/DescriptionListItem.d.ts +1 -1
- package/build/components/DescriptionList/DescriptionListItem.js +4 -3
- package/build/components/DescriptionList/DescriptionListItem.props.d.ts +3 -8
- package/build/components/IndicatorIconButton/IndicatorIconButton.d.ts +6 -0
- package/build/components/IndicatorIconButton/IndicatorIconButton.js +26 -0
- package/build/components/IndicatorIconButton/IndicatorIconButton.props.d.ts +8 -0
- package/build/components/IndicatorIconButton/IndicatorIconButton.props.js +1 -0
- package/build/components/IndicatorIconButton/index.d.ts +2 -0
- package/build/components/IndicatorIconButton/index.js +1 -0
- package/build/components/Link/LinkText.js +3 -3
- package/build/components/List/List.context.d.ts +0 -2
- package/build/components/List/List.d.ts +1 -1
- package/build/components/List/List.js +5 -5
- package/build/components/List/List.props.d.ts +1 -9
- package/build/components/List/ListAction/ListAction.d.ts +18 -0
- package/build/components/List/ListAction/ListAction.js +103 -0
- package/build/components/List/ListAction/ListAction.props.d.ts +8 -0
- package/build/components/List/ListAction/ListAction.props.js +1 -0
- package/build/components/List/ListAction/ListActionContent.d.ts +6 -0
- package/build/components/List/ListAction/ListActionContent.js +14 -0
- package/build/components/List/ListAction/ListActionText.d.ts +6 -0
- package/build/components/List/ListAction/ListActionText.js +7 -0
- package/build/components/List/ListAction/ListActionTrailingContent.d.ts +6 -0
- package/build/components/List/ListAction/ListActionTrailingContent.js +5 -0
- package/build/components/List/ListAction/ListActionTrailingIcon.d.ts +9 -0
- package/build/components/List/ListAction/ListActionTrailingIcon.js +18 -0
- package/build/components/List/ListAction/index.d.ts +6 -0
- package/build/components/List/ListAction/index.js +5 -0
- package/build/components/List/ListItem/ListItem.context.d.ts +1 -1
- package/build/components/List/ListItem/ListItem.props.d.ts +9 -5
- package/build/components/List/ListItem/ListItemRoot.d.ts +1 -1
- package/build/components/List/ListItem/ListItemRoot.js +10 -12
- package/build/components/List/ListItem/index.d.ts +4 -4
- package/build/components/List/ListItem/index.js +3 -3
- package/build/components/List/index.d.ts +1 -0
- package/build/components/List/index.js +1 -0
- package/build/components/ProgressStepper/ProgressStep.d.ts +10 -0
- package/build/components/ProgressStepper/ProgressStep.js +100 -0
- package/build/components/ProgressStepper/ProgressStepper.d.ts +6 -0
- package/build/components/ProgressStepper/ProgressStepper.js +22 -0
- package/build/components/ProgressStepper/ProgressStepper.props.d.ts +22 -0
- package/build/components/ProgressStepper/ProgressStepper.props.js +1 -0
- package/build/components/ProgressStepper/ProgressStepperRoot.d.ts +6 -0
- package/build/components/ProgressStepper/ProgressStepperRoot.js +16 -0
- package/build/components/ProgressStepper/index.d.ts +3 -0
- package/build/components/ProgressStepper/index.js +2 -0
- package/build/components/SectionHeader/SectionHeader.d.ts +1 -1
- package/build/components/SectionHeader/SectionHeader.js +6 -3
- package/build/components/SectionHeader/SectionHeader.props.d.ts +9 -16
- package/build/components/SectionHeader/SectionHeaderTrailingContent.d.ts +6 -0
- package/build/components/SectionHeader/SectionHeaderTrailingContent.js +13 -0
- package/build/components/SectionHeader/index.d.ts +1 -0
- package/build/components/SectionHeader/index.js +1 -0
- package/build/components/Tabs/Tab.js +2 -2
- package/build/components/ToggleButton/ToggleButtonText.js +2 -2
- package/build/components/UnstyledIconButton/UnstyledIconButton.props.d.ts +4 -1
- package/build/components/index.d.ts +3 -0
- package/build/components/index.js +3 -0
- package/build/core/themes.d.ts +12 -24
- package/build/tokens/components/dark/button.d.ts +1 -1
- package/build/tokens/components/dark/button.js +1 -1
- package/build/tokens/components/dark/dialog.d.ts +1 -0
- package/build/tokens/components/dark/dialog.js +1 -0
- package/build/tokens/components/dark/illustrations.d.ts +1 -0
- package/build/tokens/components/dark/illustrations.js +1 -0
- package/build/tokens/components/dark/toast.d.ts +4 -1
- package/build/tokens/components/dark/toast.js +4 -1
- package/build/tokens/components/light/button.d.ts +1 -1
- package/build/tokens/components/light/button.js +1 -1
- package/build/tokens/components/light/dialog.d.ts +1 -0
- package/build/tokens/components/light/dialog.js +1 -0
- package/build/tokens/components/light/illustrations.d.ts +1 -0
- package/build/tokens/components/light/illustrations.js +1 -0
- package/build/tokens/components/light/toast.d.ts +4 -1
- package/build/tokens/components/light/toast.js +4 -1
- package/build/tokens/layout.d.ts +6 -12
- package/build/tokens/layout.js +3 -6
- package/docs/components/AllComponents.web.tsx +86 -4
- package/docs/components/BadgeList.tsx +20 -56
- package/docs/components/SwitchList.tsx +4 -8
- package/docs/getting-started.mdx +30 -14
- package/docs/introduction.mdx +1 -1
- package/package.json +4 -4
- package/src/components/Alert/AlertTitle.tsx +7 -7
- package/src/components/Badge/Badge.props.ts +1 -0
- package/src/components/Badge/Badge.tsx +3 -2
- package/src/components/Button/ButtonRoot.tsx +4 -0
- package/src/components/Button/ButtonText.tsx +3 -3
- package/src/components/Card/CardRoot.tsx +2 -0
- package/src/components/Carousel/Carousel.context.tsx +8 -0
- package/src/components/Carousel/Carousel.docs.mdx +389 -0
- package/src/components/Carousel/Carousel.props.ts +89 -0
- package/src/components/Carousel/Carousel.stories.tsx +317 -0
- package/src/components/Carousel/Carousel.tsx +444 -0
- package/src/components/Carousel/CarouselControlItem.tsx +87 -0
- package/src/components/Carousel/CarouselControls.tsx +150 -0
- package/src/components/Carousel/CarouselItem.tsx +68 -0
- package/src/components/Carousel/index.ts +6 -0
- package/src/components/DescriptionList/DescriptionList.docs.mdx +24 -27
- package/src/components/DescriptionList/DescriptionList.props.ts +1 -8
- package/src/components/DescriptionList/DescriptionList.stories.tsx +13 -19
- package/src/components/DescriptionList/DescriptionList.tsx +2 -14
- package/src/components/DescriptionList/DescriptionListItem.props.ts +3 -8
- package/src/components/DescriptionList/DescriptionListItem.tsx +13 -21
- package/src/components/IndicatorIconButton/IndicatorIconButton.docs.mdx +85 -0
- package/src/components/IndicatorIconButton/IndicatorIconButton.props.ts +12 -0
- package/src/components/IndicatorIconButton/IndicatorIconButton.stories.tsx +142 -0
- package/src/components/IndicatorIconButton/IndicatorIconButton.tsx +36 -0
- package/src/components/IndicatorIconButton/index.tsx +2 -0
- package/src/components/Link/LinkText.tsx +4 -4
- package/src/components/List/List.context.ts +0 -1
- package/src/components/List/List.docs.mdx +376 -179
- package/src/components/List/List.props.ts +1 -9
- package/src/components/List/List.stories.tsx +289 -38
- package/src/components/List/List.tsx +5 -26
- package/src/components/List/ListAction/ListAction.props.ts +10 -0
- package/src/components/List/ListAction/ListAction.tsx +133 -0
- package/src/components/List/ListAction/ListActionContent.tsx +21 -0
- package/src/components/List/ListAction/ListActionText.tsx +14 -0
- package/src/components/List/ListAction/ListActionTrailingContent.tsx +9 -0
- package/src/components/List/ListAction/ListActionTrailingIcon.tsx +32 -0
- package/src/components/List/ListAction/index.ts +6 -0
- package/src/components/List/ListItem/ListItem.context.ts +1 -1
- package/src/components/List/ListItem/ListItem.props.ts +9 -5
- package/src/components/List/ListItem/ListItemRoot.tsx +18 -14
- package/src/components/List/ListItem/index.ts +4 -4
- package/src/components/List/index.ts +1 -0
- package/src/components/ProgressStepper/ProgressStep.tsx +134 -0
- package/src/components/ProgressStepper/ProgressStepper.docs.mdx +87 -0
- package/src/components/ProgressStepper/ProgressStepper.props.ts +27 -0
- package/src/components/ProgressStepper/ProgressStepper.stories.tsx +108 -0
- package/src/components/ProgressStepper/ProgressStepper.tsx +26 -0
- package/src/components/ProgressStepper/ProgressStepperRoot.tsx +32 -0
- package/src/components/ProgressStepper/index.ts +3 -0
- package/src/components/SectionHeader/SectionHeader.props.ts +9 -16
- package/src/components/SectionHeader/SectionHeader.stories.tsx +28 -18
- package/src/components/SectionHeader/SectionHeader.tsx +18 -19
- package/src/components/SectionHeader/SectionHeaderTrailingContent.tsx +20 -0
- package/src/components/SectionHeader/Sectionheader.docs.mdx +9 -24
- package/src/components/SectionHeader/index.ts +1 -0
- package/src/components/Switch/Switch.docs.mdx +0 -4
- package/src/components/Tabs/Tab.tsx +4 -2
- package/src/components/ToggleButton/ToggleButtonText.tsx +3 -3
- package/src/components/UnstyledIconButton/UnstyledIconButton.props.ts +2 -1
- package/src/components/index.ts +3 -0
- package/src/tokens/components/dark/button.ts +1 -1
- package/src/tokens/components/dark/dialog.ts +1 -0
- package/src/tokens/components/dark/illustrations.ts +1 -0
- package/src/tokens/components/dark/toast.ts +4 -1
- package/src/tokens/components/light/button.ts +1 -1
- package/src/tokens/components/light/dialog.ts +1 -0
- package/src/tokens/components/light/illustrations.ts +1 -0
- package/src/tokens/components/light/toast.ts +4 -1
- package/src/tokens/layout.ts +3 -6
|
@@ -2,6 +2,7 @@ import { Meta, StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { SettingsMediumIcon } from '@utilitywarehouse/hearth-react-native-icons';
|
|
3
3
|
import { VariantTitle } from '../../../docs/components';
|
|
4
4
|
import { Flex } from '../Flex';
|
|
5
|
+
import { Link } from '../Link';
|
|
5
6
|
import SectionHeader from './SectionHeader';
|
|
6
7
|
|
|
7
8
|
const meta = {
|
|
@@ -16,15 +17,10 @@ const meta = {
|
|
|
16
17
|
control: 'text',
|
|
17
18
|
description: 'The heading supporting text to be displayed.',
|
|
18
19
|
},
|
|
19
|
-
linkText: {
|
|
20
|
-
control: 'text',
|
|
21
|
-
description: 'Link text to display',
|
|
22
|
-
},
|
|
23
20
|
},
|
|
24
21
|
args: {
|
|
25
22
|
heading: 'This is the section heading',
|
|
26
23
|
helperText: 'Helper text',
|
|
27
|
-
linkText: 'See more',
|
|
28
24
|
},
|
|
29
25
|
} satisfies Meta<typeof SectionHeader>;
|
|
30
26
|
|
|
@@ -33,13 +29,7 @@ type Story = StoryObj<typeof meta>;
|
|
|
33
29
|
|
|
34
30
|
export const Playground: Story = {
|
|
35
31
|
render: () => {
|
|
36
|
-
return
|
|
37
|
-
<SectionHeader
|
|
38
|
-
heading="This is the section heading"
|
|
39
|
-
helperText="Helper text"
|
|
40
|
-
linkText="See more"
|
|
41
|
-
/>
|
|
42
|
-
);
|
|
32
|
+
return <SectionHeader heading="This is the section heading" helperText="Helper text" />;
|
|
43
33
|
},
|
|
44
34
|
};
|
|
45
35
|
|
|
@@ -51,23 +41,43 @@ export const KitchenSink: Story = {
|
|
|
51
41
|
return (
|
|
52
42
|
<Flex space="xl" direction="column" style={{ width: '100%' }}>
|
|
53
43
|
<VariantTitle title="Default SectionHeader with helper text and link">
|
|
54
|
-
<SectionHeader
|
|
44
|
+
<SectionHeader
|
|
45
|
+
heading="Heading"
|
|
46
|
+
helperText="Helper text"
|
|
47
|
+
trailingContent={<Link>See more</Link>}
|
|
48
|
+
/>
|
|
55
49
|
</VariantTitle>
|
|
56
50
|
<VariantTitle title="SectionHeader with icon on the left of the link ">
|
|
57
51
|
<SectionHeader
|
|
58
52
|
heading="Heading"
|
|
59
53
|
helperText="Helper text"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
trailingContent={
|
|
55
|
+
<Link icon={SettingsMediumIcon} iconPosition="left">
|
|
56
|
+
Settings
|
|
57
|
+
</Link>
|
|
58
|
+
}
|
|
63
59
|
/>
|
|
64
60
|
</VariantTitle>
|
|
65
61
|
<VariantTitle title="SectionHeader with no icon">
|
|
66
62
|
<SectionHeader
|
|
67
63
|
heading="Heading"
|
|
68
64
|
helperText="Helper text"
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
trailingContent={<Link showIcon={false}>Call to action</Link>}
|
|
66
|
+
/>
|
|
67
|
+
</VariantTitle>
|
|
68
|
+
<VariantTitle title="SectionHeader with badge">
|
|
69
|
+
<SectionHeader
|
|
70
|
+
heading="Heading"
|
|
71
|
+
helperText="Helper text"
|
|
72
|
+
badge={{ text: "I'm a badge" }}
|
|
73
|
+
/>
|
|
74
|
+
</VariantTitle>
|
|
75
|
+
<VariantTitle title="SectionHeader with badge and link">
|
|
76
|
+
<SectionHeader
|
|
77
|
+
heading="Heading"
|
|
78
|
+
helperText="Helper text"
|
|
79
|
+
trailingContent={<Link>Show more</Link>}
|
|
80
|
+
badge={{ text: 'New' }}
|
|
71
81
|
/>
|
|
72
82
|
</VariantTitle>
|
|
73
83
|
</Flex>
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
+
import { ErrorCircleSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
|
|
1
2
|
import { View } from 'react-native';
|
|
2
3
|
import { StyleSheet } from 'react-native-unistyles';
|
|
3
|
-
import {
|
|
4
|
+
import { Badge } from '../Badge';
|
|
5
|
+
import { Helper } from '../Helper';
|
|
4
6
|
import SectionHeaderProps from './SectionHeader.props';
|
|
5
7
|
import SectionHeaderTitle from './SectionHeaderHeading';
|
|
6
8
|
import SectionHeaderHelperText from './SectionHeaderHelperText';
|
|
7
9
|
import SectionHeaderTextContent from './SectionHeaderTextContent';
|
|
10
|
+
import SectionHeaderTrailingContent from './SectionHeaderTrailingContent';
|
|
8
11
|
|
|
9
12
|
const SectionHeader = ({
|
|
10
13
|
heading,
|
|
11
14
|
helperText,
|
|
12
15
|
children,
|
|
13
16
|
style,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
linkOnPress,
|
|
18
|
-
linkShowIcon,
|
|
19
|
-
linkTarget,
|
|
20
|
-
linkText,
|
|
17
|
+
trailingContent,
|
|
18
|
+
badge,
|
|
19
|
+
invalidText,
|
|
21
20
|
...props
|
|
22
21
|
}: SectionHeaderProps) => {
|
|
23
22
|
return (
|
|
@@ -29,18 +28,18 @@ const SectionHeader = ({
|
|
|
29
28
|
<SectionHeaderTextContent>
|
|
30
29
|
<SectionHeaderTitle>{heading}</SectionHeaderTitle>
|
|
31
30
|
{!!helperText && <SectionHeaderHelperText>{helperText}</SectionHeaderHelperText>}
|
|
31
|
+
{!!invalidText && (
|
|
32
|
+
<Helper
|
|
33
|
+
validationStatus="invalid"
|
|
34
|
+
showIcon
|
|
35
|
+
icon={ErrorCircleSmallIcon}
|
|
36
|
+
text={invalidText || ''}
|
|
37
|
+
/>
|
|
38
|
+
)}
|
|
32
39
|
</SectionHeaderTextContent>
|
|
33
|
-
{!!
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
onPress={linkOnPress}
|
|
37
|
-
icon={linkIcon}
|
|
38
|
-
showIcon={linkShowIcon}
|
|
39
|
-
iconPosition={linkIconPosition}
|
|
40
|
-
target={linkTarget}
|
|
41
|
-
>
|
|
42
|
-
{linkText}
|
|
43
|
-
</Link>
|
|
40
|
+
{!!badge && <Badge {...badge} />}
|
|
41
|
+
{!!trailingContent && (
|
|
42
|
+
<SectionHeaderTrailingContent>{trailingContent}</SectionHeaderTrailingContent>
|
|
44
43
|
)}
|
|
45
44
|
</>
|
|
46
45
|
)}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { View, type ViewProps } from 'react-native';
|
|
2
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
3
|
+
|
|
4
|
+
const SectionHeaderTrailingContent = ({ children, ...props }: ViewProps) => {
|
|
5
|
+
return (
|
|
6
|
+
<View {...props} style={[styles.container, props.style]}>
|
|
7
|
+
{children}
|
|
8
|
+
</View>
|
|
9
|
+
);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
SectionHeaderTrailingContent.displayName = 'SectionHeaderTrailingContent';
|
|
13
|
+
|
|
14
|
+
const styles = StyleSheet.create({
|
|
15
|
+
container: {
|
|
16
|
+
alignSelf: 'flex-start',
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export default SectionHeaderTrailingContent;
|
|
@@ -26,7 +26,7 @@ Use the `Section Header` component to help define and separate content within a
|
|
|
26
26
|
|
|
27
27
|
## Anatomy
|
|
28
28
|
|
|
29
|
-
Section Header consists of: Heading, Helper Text and Link
|
|
29
|
+
Section Header consists of: Heading, Helper Text, a Badge (optional) and a trailing content (optional, usually a Link or Button).
|
|
30
30
|
|
|
31
31
|
### Heading
|
|
32
32
|
|
|
@@ -42,41 +42,26 @@ A helper text property is included in the component to be able to add helper tex
|
|
|
42
42
|
|
|
43
43
|
Use helper text when users need extra clarity or explanation before engaging with the section.
|
|
44
44
|
|
|
45
|
-
### Link
|
|
46
|
-
|
|
47
|
-
The Section Header component includes an optional Link that provides users with a related navigation option.
|
|
48
|
-
|
|
49
|
-
Use the Link to provide a shortcut to additional details or a more comprehensive view.
|
|
50
|
-
|
|
51
|
-
Use when users may need to navigate away or view extended content (e.g. view all)
|
|
52
|
-
|
|
53
45
|
## Usage
|
|
54
46
|
|
|
55
47
|
<UsageWrap>
|
|
56
|
-
<SectionHeader heading="Heading" helperText="Helper text"
|
|
48
|
+
<SectionHeader heading="Heading" helperText="Helper text" />
|
|
57
49
|
</UsageWrap>
|
|
58
50
|
|
|
59
51
|
```tsx
|
|
60
52
|
import { SectionHeader } from '@utilitywarehouse/hearth-react-native';
|
|
61
53
|
|
|
62
|
-
const MyComponent = () =>
|
|
63
|
-
<SectionHeader heading="Heading" helperText="Helper text" linkText="See more" />
|
|
64
|
-
);
|
|
54
|
+
const MyComponent = () => <SectionHeader heading="Heading" helperText="Helper text" />;
|
|
65
55
|
```
|
|
66
56
|
|
|
67
57
|
## Props
|
|
68
58
|
|
|
69
|
-
| Name
|
|
70
|
-
|
|
|
71
|
-
| heading
|
|
72
|
-
| helperText
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
| linkOnPress | `() => void` | | Callback function when the link is pressed. |
|
|
76
|
-
| linkTarget | `'_blank' \| '_self' \| '_parent' \| '_top'` | `'_blank'` | Target for the link in the heading. |
|
|
77
|
-
| linkIcon | `ComponentType` | | Icon for the link. |
|
|
78
|
-
| linkIconPosition | `'left' \| 'right'` | `'right'` | Position of the icon in the link. |
|
|
79
|
-
| linkShowIcon | `boolean` | `true` | Whether to show the icon in the link. |
|
|
59
|
+
| Name | Type | Default | Description |
|
|
60
|
+
| --------------- | ----------------- | ------- | ------------------------------------------------------ |
|
|
61
|
+
| heading | `string` | | The text to display in the heading of the list. |
|
|
62
|
+
| helperText | `string` | | The helper text to display in the heading of the list. |
|
|
63
|
+
| trailingContent | `React.ReactNode` | | Optional content to display on the right side. |
|
|
64
|
+
| badge | `BadgeProps` | | Optional badge to display next to the heading. |
|
|
80
65
|
|
|
81
66
|
## Variants
|
|
82
67
|
|
|
@@ -2,3 +2,4 @@ export { default as SectionHeader } from './SectionHeader';
|
|
|
2
2
|
export { default as SectionHeaderHeading } from './SectionHeaderHeading';
|
|
3
3
|
export { default as SectionHeaderHelperText } from './SectionHeaderHelperText';
|
|
4
4
|
export { default as SectionHeaderTextContent } from './SectionHeaderTextContent';
|
|
5
|
+
export { default as SectionHeaderTrailingContent } from './SectionHeaderTrailingContent';
|
|
@@ -137,7 +137,6 @@ const SwitchList = () => {
|
|
|
137
137
|
<ListItem
|
|
138
138
|
text="Notifications"
|
|
139
139
|
helperText="Allow notifications"
|
|
140
|
-
divider
|
|
141
140
|
leadingContent={<ListItemIcon as={BellMediumIcon} />}
|
|
142
141
|
trailingContent={
|
|
143
142
|
<Switch value={notifications} onValueChange={setNotifications} size="small" />
|
|
@@ -147,7 +146,6 @@ const SwitchList = () => {
|
|
|
147
146
|
<ListItem
|
|
148
147
|
text="Secure ID"
|
|
149
148
|
helperText="Use secure ID"
|
|
150
|
-
divider
|
|
151
149
|
leadingContent={<ListItemIcon as={LockMediumIcon} />}
|
|
152
150
|
trailingContent={<Switch value={secureId} onValueChange={setSecureId} size="small" />}
|
|
153
151
|
onPress={() => setSecureId(!secureId)}
|
|
@@ -155,7 +153,6 @@ const SwitchList = () => {
|
|
|
155
153
|
<ListItem
|
|
156
154
|
text="Location"
|
|
157
155
|
helperText="Allow location"
|
|
158
|
-
divider
|
|
159
156
|
leadingContent={<ListItemIcon as={LocationMediumIcon} />}
|
|
160
157
|
trailingContent={<Switch value={location} onValueChange={setLocation} size="small" />}
|
|
161
158
|
onPress={() => setLocation(!location)}
|
|
@@ -163,7 +160,6 @@ const SwitchList = () => {
|
|
|
163
160
|
<ListItem
|
|
164
161
|
text="Dark mode"
|
|
165
162
|
helperText="Enable dark mode"
|
|
166
|
-
divider
|
|
167
163
|
leadingContent={<ListItemIcon as={EyeMediumIcon} />}
|
|
168
164
|
trailingContent={<Switch value={darkMode} onValueChange={setDarkMode} size="small" />}
|
|
169
165
|
onPress={() => setDarkMode(!darkMode)}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCallback, useRef } from 'react';
|
|
2
2
|
import { Platform, Pressable, View } from 'react-native';
|
|
3
3
|
import { StyleSheet } from 'react-native-unistyles';
|
|
4
|
-
import { DetailText } from '../DetailText';
|
|
5
4
|
import { Icon } from '../Icon';
|
|
6
5
|
import type TabProps from './Tab.props';
|
|
7
6
|
import { useTabsContext } from './Tabs.context';
|
|
8
7
|
|
|
9
8
|
import { createPressable } from '@gluestack-ui/pressable';
|
|
9
|
+
import { BodyText } from '../BodyText';
|
|
10
10
|
|
|
11
11
|
const Tab = ({
|
|
12
12
|
value,
|
|
@@ -54,7 +54,9 @@ const Tab = ({
|
|
|
54
54
|
>
|
|
55
55
|
<View style={styles.content}>
|
|
56
56
|
{icon ? <Icon as={icon} /> : null}
|
|
57
|
-
<
|
|
57
|
+
<BodyText size={size} weight="semibold">
|
|
58
|
+
{children}
|
|
59
|
+
</BodyText>
|
|
58
60
|
</View>
|
|
59
61
|
</Pressable>
|
|
60
62
|
);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type TextProps } from 'react-native';
|
|
2
2
|
import { StyleSheet } from 'react-native-unistyles';
|
|
3
|
-
import {
|
|
3
|
+
import { BodyText } from '../BodyText';
|
|
4
4
|
|
|
5
5
|
const ToggleButtonText = ({ children, toggled, ...props }: TextProps & { toggled: boolean }) => {
|
|
6
6
|
styles.useVariants({ toggled });
|
|
7
7
|
return (
|
|
8
|
-
<
|
|
8
|
+
<BodyText size="md" weight="semibold" {...props} style={[styles.text, props.style]}>
|
|
9
9
|
{children}
|
|
10
|
-
</
|
|
10
|
+
</BodyText>
|
|
11
11
|
);
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
2
|
import type { PressableProps, ViewProps } from 'react-native';
|
|
3
|
+
import { ColorValue } from '../../types';
|
|
3
4
|
|
|
4
5
|
export type UnstyledIconButtonProps = {
|
|
5
6
|
/*
|
|
@@ -29,5 +30,5 @@ export type UnstyledIconButtonProps = {
|
|
|
29
30
|
*/
|
|
30
31
|
inverted?: boolean;
|
|
31
32
|
children?: React.ReactNode;
|
|
32
|
-
iconStyle?: ViewProps['style'];
|
|
33
|
+
iconStyle?: ViewProps['style'] & { color?: ColorValue };
|
|
33
34
|
} & PressableProps;
|
package/src/components/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './BottomSheet';
|
|
|
7
7
|
export * from './Box';
|
|
8
8
|
export * from './Button';
|
|
9
9
|
export * from './Card';
|
|
10
|
+
export * from './Carousel';
|
|
10
11
|
export * from './Center';
|
|
11
12
|
export * from './Checkbox';
|
|
12
13
|
export * from './CurrencyInput';
|
|
@@ -24,12 +25,14 @@ export * from './HTMLElements';
|
|
|
24
25
|
export * from './Icon';
|
|
25
26
|
export * from './IconButton';
|
|
26
27
|
export * from './IconContainer';
|
|
28
|
+
export * from './IndicatorIconButton';
|
|
27
29
|
export * from './InlineLink';
|
|
28
30
|
export * from './Input';
|
|
29
31
|
export * from './Label';
|
|
30
32
|
export * from './Link';
|
|
31
33
|
export * from './List';
|
|
32
34
|
export * from './Modal';
|
|
35
|
+
export * from './ProgressStepper';
|
|
33
36
|
export * from './Radio';
|
|
34
37
|
export * from './RadioCard';
|
|
35
38
|
export * from './SectionHeader';
|
package/src/tokens/layout.ts
CHANGED
|
@@ -8,8 +8,8 @@ export const mobile = {
|
|
|
8
8
|
minWidth: 320,
|
|
9
9
|
},
|
|
10
10
|
container: {
|
|
11
|
+
margin: 16,
|
|
11
12
|
paddingBottom: 32,
|
|
12
|
-
paddingHorizontal: 16,
|
|
13
13
|
paddingTop: 24,
|
|
14
14
|
width: 360,
|
|
15
15
|
},
|
|
@@ -18,7 +18,6 @@ export const mobile = {
|
|
|
18
18
|
columnWidth: 64,
|
|
19
19
|
gridSize: 8,
|
|
20
20
|
gutter: 16,
|
|
21
|
-
margin: 16,
|
|
22
21
|
},
|
|
23
22
|
spacing: {
|
|
24
23
|
'2xl': 28,
|
|
@@ -38,8 +37,8 @@ export const tablet = {
|
|
|
38
37
|
minWidth: 740,
|
|
39
38
|
},
|
|
40
39
|
container: {
|
|
40
|
+
margin: 32,
|
|
41
41
|
paddingBottom: 32,
|
|
42
|
-
paddingHorizontal: 32,
|
|
43
42
|
paddingTop: 24,
|
|
44
43
|
width: 744,
|
|
45
44
|
},
|
|
@@ -48,7 +47,6 @@ export const tablet = {
|
|
|
48
47
|
columnWidth: 64,
|
|
49
48
|
gridSize: 8,
|
|
50
49
|
gutter: 24,
|
|
51
|
-
margin: 32,
|
|
52
50
|
},
|
|
53
51
|
spacing: {
|
|
54
52
|
'2xl': 28,
|
|
@@ -68,8 +66,8 @@ export const desktop = {
|
|
|
68
66
|
minWidth: 992,
|
|
69
67
|
},
|
|
70
68
|
container: {
|
|
69
|
+
margin: 32,
|
|
71
70
|
paddingBottom: 48,
|
|
72
|
-
paddingHorizontal: 32,
|
|
73
71
|
paddingTop: 32,
|
|
74
72
|
width: 1096,
|
|
75
73
|
},
|
|
@@ -78,7 +76,6 @@ export const desktop = {
|
|
|
78
76
|
columnWidth: 64,
|
|
79
77
|
gridSize: 8,
|
|
80
78
|
gutter: 24,
|
|
81
|
-
margin: 32,
|
|
82
79
|
},
|
|
83
80
|
spacing: {
|
|
84
81
|
'2xl': 40,
|