@utilitywarehouse/hearth-react-native 0.6.0 → 0.8.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/.storybook/main.ts +12 -6
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-lint.log +1 -1
- package/CHANGELOG.md +18 -0
- package/build/components/Banner/Banner.d.ts +6 -0
- package/build/components/Banner/Banner.js +161 -0
- package/build/components/Banner/Banner.props.d.ts +82 -0
- package/build/components/Banner/Banner.props.js +1 -0
- package/build/components/Banner/index.d.ts +2 -0
- package/build/components/Banner/index.js +1 -0
- package/build/components/BottomSheet/BottomSheetBackdrop.js +1 -5
- package/build/components/BottomSheet/BottomSheetFlatList.js +1 -5
- package/build/components/BottomSheet/BottomSheetHandle.js +1 -5
- package/build/components/BottomSheet/useBottomSheetLogic.d.ts +1 -1
- package/build/components/Button/ButtonIcon.js +2 -1
- package/build/components/Button/ButtonRoot.js +2 -6
- package/build/components/Button/ButtonText.js +4 -1
- package/build/components/Card/Card.context.d.ts +7 -0
- package/build/components/Card/CardAction/CardAction.context.d.ts +9 -0
- package/build/components/Card/{CardAction.context.js → CardAction/CardAction.context.js} +7 -1
- package/build/components/Card/CardAction/CardAction.d.ts +18 -0
- package/build/components/Card/CardAction/CardAction.js +7 -0
- package/build/components/Card/CardAction/CardAction.props.d.ts +63 -0
- package/build/components/Card/CardAction/CardAction.props.js +1 -0
- package/build/components/Card/CardAction/CardActionContent.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionContent.js +13 -0
- package/build/components/Card/CardAction/CardActionHelperText.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionHelperText.js +13 -0
- package/build/components/Card/CardAction/CardActionIcon.d.ts +9 -0
- package/build/components/Card/CardAction/CardActionIcon.js +19 -0
- package/build/components/Card/CardAction/CardActionLeadingContent.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionLeadingContent.js +5 -0
- package/build/components/Card/CardAction/CardActionRoot.d.ts +12 -0
- package/build/components/Card/CardAction/CardActionRoot.js +155 -0
- package/build/components/Card/CardAction/CardActionText.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionText.js +9 -0
- package/build/components/Card/CardAction/CardActionTrailingContent.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionTrailingContent.js +5 -0
- package/build/components/Card/CardAction/CardActionTrailingIcon.d.ts +9 -0
- package/build/components/Card/CardAction/CardActionTrailingIcon.js +19 -0
- package/build/components/Card/CardAction/index.d.ts +10 -0
- package/build/components/Card/CardAction/index.js +9 -0
- package/build/components/Card/CardContent.d.ts +6 -0
- package/build/components/Card/CardContent.js +33 -0
- package/build/components/Card/CardPressHandler.context.d.ts +6 -0
- package/build/components/Card/CardPressHandler.context.js +6 -0
- package/build/components/Card/{CardAction.d.ts → CardPressHandler.d.ts} +3 -3
- package/build/components/Card/CardPressHandler.js +13 -0
- package/build/components/Card/CardRoot.js +103 -11
- package/build/components/Card/index.d.ts +3 -2
- package/build/components/Card/index.js +3 -2
- package/build/components/Checkbox/CheckboxIcon.js +2 -1
- package/build/components/Container/Container.js +3 -3
- package/build/components/CurrencyInput/CurrencyInput.js +1 -1
- package/build/components/Expandable/Expandable.d.ts +6 -0
- package/build/components/Expandable/Expandable.js +44 -0
- package/build/components/Expandable/Expandable.props.d.ts +38 -0
- package/build/components/Expandable/Expandable.props.js +1 -0
- package/build/components/Expandable/index.d.ts +2 -0
- package/build/components/Expandable/index.js +1 -0
- package/build/components/ExpandableCard/ExpandableCard.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCard.js +23 -0
- package/build/components/ExpandableCard/ExpandableCard.props.d.ts +69 -0
- package/build/components/ExpandableCard/ExpandableCard.props.js +1 -0
- package/build/components/ExpandableCard/ExpandableCardContent.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardContent.js +14 -0
- package/build/components/ExpandableCard/ExpandableCardExpandedContent.d.ts +11 -0
- package/build/components/ExpandableCard/ExpandableCardExpandedContent.js +18 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.js +17 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.props.d.ts +25 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.props.js +1 -0
- package/build/components/ExpandableCard/ExpandableCardHelperText.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardHelperText.js +13 -0
- package/build/components/ExpandableCard/ExpandableCardIcon.d.ts +9 -0
- package/build/components/ExpandableCard/ExpandableCardIcon.js +19 -0
- package/build/components/ExpandableCard/ExpandableCardLeadingContent.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardLeadingContent.js +5 -0
- package/build/components/ExpandableCard/ExpandableCardText.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardText.js +7 -0
- package/build/components/ExpandableCard/ExpandableCardTrailingContent.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardTrailingContent.js +5 -0
- package/build/components/ExpandableCard/ExpandableCardTrailingIcon.d.ts +9 -0
- package/build/components/ExpandableCard/ExpandableCardTrailingIcon.js +17 -0
- package/build/components/ExpandableCard/ExpandableCardTrigger.d.ts +17 -0
- package/build/components/ExpandableCard/ExpandableCardTrigger.js +7 -0
- package/build/components/ExpandableCard/ExpandableCardTrigger.props.d.ts +44 -0
- package/build/components/ExpandableCard/ExpandableCardTrigger.props.js +1 -0
- package/build/components/ExpandableCard/ExpandableCardTriggerRoot.d.ts +11 -0
- package/build/components/ExpandableCard/ExpandableCardTriggerRoot.js +91 -0
- package/build/components/ExpandableCard/index.d.ts +14 -0
- package/build/components/ExpandableCard/index.js +11 -0
- package/build/components/Helper/HelperIcon.js +2 -1
- package/build/components/HighlightBanner/HighlightBanner.d.ts +6 -0
- package/build/components/HighlightBanner/HighlightBanner.js +86 -0
- package/build/components/HighlightBanner/HighlightBanner.props.d.ts +14 -0
- package/build/components/HighlightBanner/HighlightBanner.props.js +1 -0
- package/build/components/HighlightBanner/index.d.ts +2 -0
- package/build/components/HighlightBanner/index.js +1 -0
- package/build/components/Icon/Icon.d.ts +2 -6
- package/build/components/IconButton/IconButtonIcon.js +2 -1
- package/build/components/IconContainer/IconContainer.d.ts +4 -3
- package/build/components/IconContainer/IconContainer.js +3 -3
- package/build/components/Input/InputField.js +4 -2
- package/build/components/Input/InputIcon.js +2 -1
- package/build/components/Link/LinkIcon.js +3 -2
- package/build/components/List/ListAction/ListActionTrailingIcon.js +2 -1
- package/build/components/List/ListItem/ListItemIcon.js +2 -1
- package/build/components/List/ListItem/ListItemTrailingIcon.js +2 -3
- package/build/components/Radio/RadioIcon.js +7 -2
- package/build/components/RadioCard/RadioCardIcon.js +3 -2
- package/build/components/Spinner/Spinner.web.d.ts +2 -1
- package/build/components/Switch/Switch.js +5 -3
- package/build/components/Textarea/TextareaField.js +1 -1
- package/build/components/ToggleButton/ToggleButtonIcon.js +2 -1
- package/build/components/ToggleButton/ToggleButtonRoot.js +2 -2
- package/build/components/UnstyledIconButton/UnstyledIconButtonIcon.js +2 -1
- package/build/components/index.d.ts +5 -1
- package/build/components/index.js +5 -1
- package/build/core/index.d.ts +3 -3
- package/build/core/index.js +3 -3
- package/build/core/themes.d.ts +24 -12
- package/build/hooks/useColorMode.d.ts +1 -1
- package/build/hooks/useColorMode.js +7 -8
- package/build/tokens/components/dark/banner.d.ts +19 -0
- package/build/tokens/components/dark/banner.js +19 -0
- package/build/tokens/components/dark/card-action.d.ts +11 -0
- package/build/tokens/components/dark/card-action.js +10 -0
- package/build/tokens/components/dark/card-content.d.ts +25 -0
- package/build/tokens/components/dark/card-content.js +24 -0
- package/build/tokens/components/dark/drawer.d.ts +29 -0
- package/build/tokens/components/dark/drawer.js +28 -0
- package/build/tokens/components/dark/illustrations.d.ts +0 -1
- package/build/tokens/components/dark/illustrations.js +0 -1
- package/build/tokens/components/dark/index.d.ts +3 -0
- package/build/tokens/components/dark/index.js +3 -0
- package/build/tokens/components/light/banner.d.ts +19 -0
- package/build/tokens/components/light/banner.js +19 -0
- package/build/tokens/components/light/card-action.d.ts +11 -0
- package/build/tokens/components/light/card-action.js +10 -0
- package/build/tokens/components/light/card-content.d.ts +25 -0
- package/build/tokens/components/light/card-content.js +24 -0
- package/build/tokens/components/light/drawer.d.ts +29 -0
- package/build/tokens/components/light/drawer.js +28 -0
- package/build/tokens/components/light/illustrations.d.ts +0 -1
- package/build/tokens/components/light/illustrations.js +0 -1
- package/build/tokens/components/light/index.d.ts +3 -0
- package/build/tokens/components/light/index.js +3 -0
- package/build/tokens/layout.d.ts +6 -6
- package/build/tokens/layout.js +3 -3
- package/build/tokens/typography.d.ts +6 -0
- package/build/tokens/typography.js +3 -0
- package/docs/components/AllComponents.web.tsx +75 -4
- package/docs/components/NextPrevPage.tsx +5 -5
- package/docs/components/VariantTitle.tsx +17 -7
- package/package.json +16 -14
- package/src/components/Banner/Banner.docs.mdx +402 -0
- package/src/components/Banner/Banner.props.ts +106 -0
- package/src/components/Banner/Banner.stories.tsx +494 -0
- package/src/components/Banner/Banner.tsx +264 -0
- package/src/components/Banner/index.ts +2 -0
- package/src/components/BottomSheet/BottomSheetBackdrop.tsx +1 -2
- package/src/components/BottomSheet/BottomSheetFlatList.tsx +1 -3
- package/src/components/BottomSheet/BottomSheetHandle.tsx +0 -1
- package/src/components/Button/ButtonIcon.tsx +2 -1
- package/src/components/Button/ButtonRoot.tsx +2 -6
- package/src/components/Button/ButtonText.tsx +4 -1
- package/src/components/Card/Card.context.ts +7 -0
- package/src/components/Card/Card.docs.mdx +221 -15
- package/src/components/Card/Card.stories.tsx +50 -3
- package/src/components/Card/CardAction/CardAction.context.ts +22 -0
- package/src/components/Card/CardAction/CardAction.props.ts +87 -0
- package/src/components/Card/CardAction/CardAction.stories.tsx +265 -0
- package/src/components/Card/CardAction/CardAction.tsx +10 -0
- package/src/components/Card/CardAction/CardActionContent.tsx +20 -0
- package/src/components/Card/CardAction/CardActionHelperText.tsx +21 -0
- package/src/components/Card/CardAction/CardActionIcon.tsx +32 -0
- package/src/components/Card/CardAction/CardActionLeadingContent.tsx +9 -0
- package/src/components/Card/CardAction/CardActionRoot.tsx +258 -0
- package/src/components/Card/CardAction/CardActionText.tsx +17 -0
- package/src/components/Card/CardAction/CardActionTrailingContent.tsx +9 -0
- package/src/components/Card/CardAction/CardActionTrailingIcon.tsx +32 -0
- package/src/components/Card/CardAction/index.ts +10 -0
- package/src/components/Card/CardContent.tsx +40 -0
- package/src/components/Card/CardPressHandler.context.ts +12 -0
- package/src/components/Card/CardPressHandler.tsx +20 -0
- package/src/components/Card/CardRoot.tsx +128 -13
- package/src/components/Card/index.ts +3 -2
- package/src/components/Checkbox/CheckboxIcon.tsx +2 -1
- package/src/components/Container/Container.tsx +3 -3
- package/src/components/CurrencyInput/CurrencyInput.tsx +1 -1
- package/src/components/Expandable/Expandable.docs.mdx +201 -0
- package/src/components/Expandable/Expandable.props.ts +46 -0
- package/src/components/Expandable/Expandable.stories.tsx +284 -0
- package/src/components/Expandable/Expandable.tsx +92 -0
- package/src/components/Expandable/index.ts +2 -0
- package/src/components/ExpandableCard/ExpandableCard.docs.mdx +312 -0
- package/src/components/ExpandableCard/ExpandableCard.props.ts +85 -0
- package/src/components/ExpandableCard/ExpandableCard.stories.tsx +326 -0
- package/src/components/ExpandableCard/ExpandableCard.tsx +76 -0
- package/src/components/ExpandableCard/ExpandableCardContent.tsx +21 -0
- package/src/components/ExpandableCard/ExpandableCardExpandedContent.tsx +42 -0
- package/src/components/ExpandableCard/ExpandableCardGroup.props.ts +31 -0
- package/src/components/ExpandableCard/ExpandableCardGroup.tsx +40 -0
- package/src/components/ExpandableCard/ExpandableCardHelperText.tsx +21 -0
- package/src/components/ExpandableCard/ExpandableCardIcon.tsx +32 -0
- package/src/components/ExpandableCard/ExpandableCardLeadingContent.tsx +9 -0
- package/src/components/ExpandableCard/ExpandableCardText.tsx +14 -0
- package/src/components/ExpandableCard/ExpandableCardTrailingContent.tsx +9 -0
- package/src/components/ExpandableCard/ExpandableCardTrailingIcon.tsx +30 -0
- package/src/components/ExpandableCard/ExpandableCardTrigger.props.ts +47 -0
- package/src/components/ExpandableCard/ExpandableCardTrigger.tsx +10 -0
- package/src/components/ExpandableCard/ExpandableCardTriggerRoot.tsx +154 -0
- package/src/components/ExpandableCard/index.ts +14 -0
- package/src/components/Helper/HelperIcon.tsx +2 -1
- package/src/components/HighlightBanner/HighlightBanner.docs.mdx +277 -0
- package/src/components/HighlightBanner/HighlightBanner.props.ts +29 -0
- package/src/components/HighlightBanner/HighlightBanner.stories.tsx +259 -0
- package/src/components/HighlightBanner/HighlightBanner.tsx +122 -0
- package/src/components/HighlightBanner/index.ts +2 -0
- package/src/components/Icon/Icon.tsx +4 -3
- package/src/components/IconButton/IconButtonIcon.tsx +2 -1
- package/src/components/IconContainer/IconContainer.tsx +17 -19
- package/src/components/Input/InputField.tsx +2 -1
- package/src/components/Input/InputIcon.tsx +2 -1
- package/src/components/Link/LinkIcon.tsx +3 -2
- package/src/components/List/ListAction/ListActionTrailingIcon.tsx +2 -1
- package/src/components/List/ListItem/ListItemIcon.tsx +2 -1
- package/src/components/List/ListItem/ListItemTrailingIcon.tsx +2 -3
- package/src/components/Radio/RadioIcon.tsx +8 -3
- package/src/components/RadioCard/RadioCardIcon.tsx +4 -3
- package/src/components/Switch/Switch.tsx +10 -5
- package/src/components/Switch/Switch.web.tsx +1 -0
- package/src/components/Textarea/TextareaField.tsx +1 -1
- package/src/components/ToggleButton/ToggleButtonIcon.tsx +2 -1
- package/src/components/ToggleButton/ToggleButtonRoot.tsx +2 -2
- package/src/components/UnstyledIconButton/UnstyledIconButtonIcon.tsx +2 -1
- package/src/components/index.ts +5 -9
- package/src/core/index.ts +14 -11
- package/src/hooks/useColorMode.ts +9 -12
- package/src/tokens/components/dark/banner.ts +19 -0
- package/src/tokens/components/dark/card-action.ts +11 -0
- package/src/tokens/components/dark/card-content.ts +25 -0
- package/src/tokens/components/dark/drawer.ts +29 -0
- package/src/tokens/components/dark/illustrations.ts +0 -1
- package/src/tokens/components/dark/index.ts +3 -0
- package/src/tokens/components/light/banner.ts +19 -0
- package/src/tokens/components/light/card-action.ts +11 -0
- package/src/tokens/components/light/card-content.ts +25 -0
- package/src/tokens/components/light/drawer.ts +29 -0
- package/src/tokens/components/light/illustrations.ts +0 -1
- package/src/tokens/components/light/index.ts +3 -0
- package/src/tokens/layout.ts +3 -3
- package/src/tokens/typography.ts +3 -0
- package/build/components/Card/CardAction.context.d.ts +0 -6
- package/build/components/Card/CardAction.js +0 -13
- package/src/components/Card/CardAction.context.ts +0 -12
- package/src/components/Card/CardAction.tsx +0 -18
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Image, View } from 'react-native';
|
|
3
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
4
|
+
import { BodyText } from '../BodyText';
|
|
5
|
+
import { Card } from '../Card';
|
|
6
|
+
const HighlightBanner = ({ heading, headingColor, image, imageContainerHeight, description, link, button, variant = 'emphasis', style, ...props }) => {
|
|
7
|
+
styles.useVariants({ headingColor, variant });
|
|
8
|
+
return (_jsx(Card, { variant: variant, noPadding: true, style: style, ...props, children: _jsxs(View, { style: [styles.container], children: [_jsx(View, { style: [styles.header], children: _jsx(BodyText, { size: "md", textAlign: "center", weight: "semibold", children: heading }) }), _jsx(View, { style: styles.imageContainer(imageContainerHeight), children: _jsx(Image, { resizeMode: "cover", ...image, style: [styles.image, image?.style] }) }), _jsxs(View, { style: styles.footer, children: [_jsx(BodyText, { size: "md", textAlign: "center", children: description }), link && _jsx(View, { style: styles.linkContainer, children: link }), button && _jsx(View, { style: styles.buttonContainer, children: button })] })] }) }));
|
|
9
|
+
};
|
|
10
|
+
HighlightBanner.displayName = 'HighlightBanner';
|
|
11
|
+
const styles = StyleSheet.create(theme => ({
|
|
12
|
+
container: {
|
|
13
|
+
overflow: 'hidden',
|
|
14
|
+
flex: 1,
|
|
15
|
+
width: '100%',
|
|
16
|
+
},
|
|
17
|
+
header: {
|
|
18
|
+
padding: theme.components.banner.highlight.padding,
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
justifyContent: 'center',
|
|
21
|
+
variants: {
|
|
22
|
+
headingColor: {
|
|
23
|
+
highlight: {
|
|
24
|
+
backgroundColor: theme.color.surface.highlight.subtle,
|
|
25
|
+
},
|
|
26
|
+
pig: {
|
|
27
|
+
backgroundColor: theme.color.surface.pig.subtle,
|
|
28
|
+
},
|
|
29
|
+
energy: {
|
|
30
|
+
backgroundColor: theme.color.surface.energy.subtle,
|
|
31
|
+
},
|
|
32
|
+
broadband: {
|
|
33
|
+
backgroundColor: theme.color.surface.broadband.subtle,
|
|
34
|
+
},
|
|
35
|
+
mobile: {
|
|
36
|
+
backgroundColor: theme.color.surface.mobile.subtle,
|
|
37
|
+
},
|
|
38
|
+
insurance: {
|
|
39
|
+
backgroundColor: theme.color.surface.insurance.subtle,
|
|
40
|
+
},
|
|
41
|
+
cashback: {
|
|
42
|
+
backgroundColor: theme.color.surface.cashback.subtle,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
variant: {
|
|
46
|
+
emphasis: {
|
|
47
|
+
borderColor: theme.color.border.strong,
|
|
48
|
+
borderBottomWidth: theme.borderWidth[2],
|
|
49
|
+
},
|
|
50
|
+
subtle: {
|
|
51
|
+
borderColor: theme.color.border.subtle,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
imageContainer: (height = 200) => ({
|
|
57
|
+
width: '100%',
|
|
58
|
+
height,
|
|
59
|
+
}),
|
|
60
|
+
image: {
|
|
61
|
+
width: '100%',
|
|
62
|
+
height: '100%',
|
|
63
|
+
},
|
|
64
|
+
footer: {
|
|
65
|
+
padding: theme.components.banner.highlight.padding,
|
|
66
|
+
gap: theme.components.banner.highlight.content.gap,
|
|
67
|
+
variants: {
|
|
68
|
+
variant: {
|
|
69
|
+
emphasis: {
|
|
70
|
+
borderColor: theme.color.border.strong,
|
|
71
|
+
borderTopWidth: theme.borderWidth[2],
|
|
72
|
+
},
|
|
73
|
+
subtle: {
|
|
74
|
+
borderColor: theme.color.border.subtle,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
linkContainer: {
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
},
|
|
82
|
+
buttonContainer: {
|
|
83
|
+
alignItems: 'stretch',
|
|
84
|
+
},
|
|
85
|
+
}));
|
|
86
|
+
export default HighlightBanner;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ImageProps } from 'react-native';
|
|
3
|
+
import CardProps from '../Card/Card.props';
|
|
4
|
+
interface HighlightBannerProps extends Omit<CardProps, 'noPadding' | 'variant' | 'space' | 'gap' | 'rowGap' | 'columnGap' | 'flexDirection' | 'flexWrap' | 'alignItems' | 'justifyContent'> {
|
|
5
|
+
heading?: string;
|
|
6
|
+
headingColor?: 'pig' | 'energy' | 'broadband' | 'mobile' | 'insurance' | 'cashback' | 'highlight';
|
|
7
|
+
variant?: 'emphasis' | 'subtle';
|
|
8
|
+
image?: ImageProps;
|
|
9
|
+
imageContainerHeight?: number;
|
|
10
|
+
description?: string;
|
|
11
|
+
link?: ReactElement;
|
|
12
|
+
button?: ReactElement;
|
|
13
|
+
}
|
|
14
|
+
export default HighlightBannerProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as HighlightBanner } from './HighlightBanner';
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
+
import type React from 'react';
|
|
1
2
|
import type IconProps from './Icon.props';
|
|
2
|
-
export declare const Icon:
|
|
3
|
-
uniProps?: import("react-native-unistyles/lib/typescript/src/core/withUnistyles/types").Mappings<IconProps> | undefined;
|
|
4
|
-
} & import("react").RefAttributes<never>) | {
|
|
5
|
-
fill?: import("react-native").ColorValue | undefined;
|
|
6
|
-
stroke?: import("react-native").ColorValue | undefined;
|
|
7
|
-
}>;
|
|
3
|
+
export declare const Icon: React.ForwardRefExoticComponent<IconProps>;
|
|
8
4
|
export default Icon;
|
|
@@ -13,7 +13,8 @@ const IconButtonIcon = (props) => {
|
|
|
13
13
|
size,
|
|
14
14
|
});
|
|
15
15
|
return (_jsx(Icon, { ...props, style: Platform.OS === 'web'
|
|
16
|
-
?
|
|
16
|
+
? // @ts-expect-error - style prop type issue
|
|
17
|
+
{ ...styles.icon, ...props.style }
|
|
17
18
|
: [styles.icon, props.style], children: props.children }));
|
|
18
19
|
};
|
|
19
20
|
IconButtonIcon.displayName = 'IconButtonIcon';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type IconContainerProps from './IconContainer.props';
|
|
2
|
-
declare const IconContainer:
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const IconContainer: {
|
|
3
|
+
({ icon: IconComp, size, radiusNone, variant, color, style, ...props }: IconContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
5
6
|
export default IconContainer;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import { StyleSheet
|
|
3
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
4
4
|
import { Icon } from '../Icon';
|
|
5
|
-
const IconContainer =
|
|
5
|
+
const IconContainer = ({ icon: IconComp, size = 'md', radiusNone = false, variant = 'subtle', color = 'pig', style, ...props }) => {
|
|
6
6
|
styles.useVariants({ size, radiusNone, variant, color });
|
|
7
7
|
return (_jsx(View, { style: [styles.container, style], ...props, children: IconComp ? _jsx(Icon, { as: IconComp, style: styles.icon }) : null }));
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
9
|
IconContainer.displayName = 'IconContainer';
|
|
10
10
|
const styles = StyleSheet.create(theme => ({
|
|
11
11
|
container: {
|
|
@@ -9,7 +9,9 @@ const InputField = ({ style, inBottomSheet = false, ...props }) => {
|
|
|
9
9
|
styles.useVariants({ focused, type });
|
|
10
10
|
const { color } = useTheme();
|
|
11
11
|
if (inBottomSheet) {
|
|
12
|
-
return (
|
|
12
|
+
return (
|
|
13
|
+
// @ts-expect-error - BottomSheetTextInput type issue
|
|
14
|
+
_jsx(BottomSheetTextInput, { placeholderTextColor: color.text.secondary, selectionColor: color.purple[700], cursorColor: color.purple[700], verticalAlign: "middle", "aria-disabled": disabled, ...props, style: [styles.input, style] }));
|
|
13
15
|
}
|
|
14
16
|
return (_jsx(RNTextInput, { placeholderTextColor: color.text.secondary, selectionColor: color.purple[700], cursorColor: color.purple[700], verticalAlign: "middle", "aria-disabled": disabled, ...props, style: [styles.input, style] }));
|
|
15
17
|
};
|
|
@@ -24,7 +26,7 @@ const styles = StyleSheet.create(theme => ({
|
|
|
24
26
|
color: theme.color.text.primary,
|
|
25
27
|
fontSize: theme.typography.mobile.bodyText.md.fontSize,
|
|
26
28
|
fontFamily: theme.typography.mobile.bodyText.fontFamily,
|
|
27
|
-
fontWeight: theme.typography.mobile.bodyText.fontWeight
|
|
29
|
+
fontWeight: `${theme.typography.mobile.bodyText.fontWeight}`,
|
|
28
30
|
borderWidth: 0,
|
|
29
31
|
variants: {
|
|
30
32
|
focused: {
|
|
@@ -4,7 +4,8 @@ import { StyleSheet } from 'react-native-unistyles';
|
|
|
4
4
|
import { Icon } from '../Icon';
|
|
5
5
|
const InputIcon = ({ children, ...props }) => {
|
|
6
6
|
return (_jsx(Icon, { ...props, style: Platform.OS === 'web'
|
|
7
|
-
?
|
|
7
|
+
? // @ts-expect-error - style prop type issue
|
|
8
|
+
{ ...styles.icon, ...props.style }
|
|
8
9
|
: [styles.icon, props.style], children: children }));
|
|
9
10
|
};
|
|
10
11
|
InputIcon.displayName = 'InputIcon';
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
|
-
import { useLinkContext } from './Link.context';
|
|
4
3
|
import { StyleSheet } from 'react-native-unistyles';
|
|
5
4
|
import { Icon } from '../Icon';
|
|
5
|
+
import { useLinkContext } from './Link.context';
|
|
6
6
|
const LinkIcon = ({ children, ...props }) => {
|
|
7
7
|
const { active, inverted, disabled } = useLinkContext();
|
|
8
8
|
styles.useVariants({ active, inverted, disabled });
|
|
9
9
|
return (_jsx(Icon, { ...props, style: Platform.OS === 'web'
|
|
10
|
-
?
|
|
10
|
+
? // @ts-expect-error - style prop type issue
|
|
11
|
+
{ ...styles.icon, ...props.style }
|
|
11
12
|
: [styles.icon, props.style], children: children }));
|
|
12
13
|
};
|
|
13
14
|
LinkIcon.displayName = 'LinkIcon';
|
|
@@ -4,7 +4,8 @@ import { StyleSheet } from 'react-native-unistyles';
|
|
|
4
4
|
import { Icon } from '../../Icon';
|
|
5
5
|
const ListActionTrailingIcon = ({ children, ...props }) => {
|
|
6
6
|
return (_jsx(Icon, { ...props, style: Platform.OS === 'web'
|
|
7
|
-
?
|
|
7
|
+
? // @ts-expect-error - style prop type issue
|
|
8
|
+
{ ...styles.icon, ...props.style }
|
|
8
9
|
: [styles.icon, props.style], children: children }));
|
|
9
10
|
};
|
|
10
11
|
ListActionTrailingIcon.displayName = 'ListActionTrailingIcon';
|
|
@@ -4,7 +4,8 @@ import { StyleSheet } from 'react-native-unistyles';
|
|
|
4
4
|
import { Icon } from '../../Icon';
|
|
5
5
|
const ListItemIcon = ({ children, ...props }) => {
|
|
6
6
|
return (_jsx(Icon, { ...props, style: Platform.OS === 'web'
|
|
7
|
-
?
|
|
7
|
+
? // @ts-expect-error - style prop type issue
|
|
8
|
+
{ ...styles.icon, ...props.style }
|
|
8
9
|
: [styles.icon, props.style], children: children }));
|
|
9
10
|
};
|
|
10
11
|
ListItemIcon.displayName = 'ListItemIcon';
|
|
@@ -4,15 +4,14 @@ import { StyleSheet } from 'react-native-unistyles';
|
|
|
4
4
|
import { Icon } from '../../Icon';
|
|
5
5
|
const ListItemTrailingIcon = ({ children, ...props }) => {
|
|
6
6
|
return (_jsx(Icon, { ...props, style: Platform.OS === 'web'
|
|
7
|
-
?
|
|
7
|
+
? // @ts-expect-error - style prop type issue
|
|
8
|
+
{ ...styles.icon, ...props.style }
|
|
8
9
|
: [styles.icon, props.style], children: children }));
|
|
9
10
|
};
|
|
10
11
|
ListItemTrailingIcon.displayName = 'ListItemTrailingIcon';
|
|
11
12
|
const styles = StyleSheet.create(theme => ({
|
|
12
13
|
icon: {
|
|
13
14
|
color: theme.color.icon.primary,
|
|
14
|
-
width: 24,
|
|
15
|
-
height: 24,
|
|
16
15
|
},
|
|
17
16
|
}));
|
|
18
17
|
export default ListItemTrailingIcon;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Platform } from 'react-native';
|
|
2
3
|
import { StyleSheet } from 'react-native-unistyles';
|
|
3
4
|
import { Icon } from '../Icon';
|
|
4
5
|
import { CircleIcon } from '../Icons';
|
|
5
|
-
import { Platform } from 'react-native';
|
|
6
6
|
const RadioIcon = ({ style, ...props }) => {
|
|
7
7
|
return (_jsx(Icon, { as: CircleIcon, ...props, style: Platform.OS === 'web'
|
|
8
|
-
?
|
|
8
|
+
? {
|
|
9
|
+
// @ts-expect-error - style prop type issue
|
|
10
|
+
...styles.container,
|
|
11
|
+
// @ts-expect-error - style prop type issue
|
|
12
|
+
...props.style,
|
|
13
|
+
}
|
|
9
14
|
: [styles.container, style] }));
|
|
10
15
|
};
|
|
11
16
|
RadioIcon.displayName = 'RadioIcon';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Platform } from 'react-native';
|
|
2
3
|
import { StyleSheet } from 'react-native-unistyles';
|
|
3
4
|
import { Icon } from '../Icon';
|
|
4
5
|
import { CircleIcon } from '../Icons';
|
|
5
|
-
import { Platform } from 'react-native';
|
|
6
6
|
const RadioCardIcon = ({ style, ...props }) => {
|
|
7
7
|
return (_jsx(Icon, { as: CircleIcon, ...props, style: Platform.OS === 'web'
|
|
8
|
-
?
|
|
8
|
+
? // @ts-expect-error - style prop type issue
|
|
9
|
+
{ ...styles.container, ...props.style }
|
|
9
10
|
: [styles.container, style] }));
|
|
10
11
|
};
|
|
11
12
|
RadioCardIcon.displayName = 'RadioCardIcon';
|
|
@@ -4,10 +4,12 @@ import { useEffect } from 'react';
|
|
|
4
4
|
import { Pressable } from 'react-native';
|
|
5
5
|
import Animated, { Easing, interpolateColor, useAnimatedStyle, useReducedMotion, useSharedValue, withSpring, withTiming, } from 'react-native-reanimated';
|
|
6
6
|
import { StyleSheet } from 'react-native-unistyles';
|
|
7
|
+
import { useAnimatedTheme } from 'react-native-unistyles/reanimated';
|
|
7
8
|
import { useTheme } from '../../hooks';
|
|
8
9
|
import { Icon } from '../Icon';
|
|
9
10
|
const CustomSwitch = ({ value = false, onValueChange, disabled = false, size = 'medium', ...accessibilityProps }) => {
|
|
10
11
|
const { components, color } = useTheme();
|
|
12
|
+
const theme = useAnimatedTheme();
|
|
11
13
|
const SWITCH_WIDTH = size === 'medium' ? components.switch.md.width : components.switch.sm.width;
|
|
12
14
|
const THUMB_SIZE = size === 'medium' ? components.switch.md.circle.size : components.switch.sm.circle.size;
|
|
13
15
|
const PADDING = components.switch.padding;
|
|
@@ -17,11 +19,11 @@ const CustomSwitch = ({ value = false, onValueChange, disabled = false, size = '
|
|
|
17
19
|
const progress = useSharedValue(value ? 1 : 0);
|
|
18
20
|
const animatedThumbStyle = useAnimatedStyle(() => ({
|
|
19
21
|
transform: [{ translateX: offset.value }],
|
|
20
|
-
}));
|
|
22
|
+
}), [offset]);
|
|
21
23
|
const animatedSwitchBackgroundStyle = useAnimatedStyle(() => {
|
|
22
24
|
const backgroundColor = interpolateColor(progress.value, [0, 1], [
|
|
23
|
-
color.interactive.functional.surface.strong.default,
|
|
24
|
-
color.interactive.brand.surface.strong.default,
|
|
25
|
+
theme.value.color.interactive.functional.surface.strong.default,
|
|
26
|
+
theme.value.color.interactive.brand.surface.strong.default,
|
|
25
27
|
]);
|
|
26
28
|
return { backgroundColor };
|
|
27
29
|
});
|
|
@@ -20,7 +20,7 @@ const styles = StyleSheet.create(theme => ({
|
|
|
20
20
|
color: theme.color.text.primary,
|
|
21
21
|
fontSize: theme.typography.mobile.bodyText.md.fontSize,
|
|
22
22
|
fontFamily: theme.typography.mobile.bodyText.fontFamily,
|
|
23
|
-
fontWeight: theme.typography.mobile.bodyText.fontWeight
|
|
23
|
+
fontWeight: `${theme.typography.mobile.bodyText.fontWeight}`,
|
|
24
24
|
borderWidth: 0,
|
|
25
25
|
outlineWidth: 0,
|
|
26
26
|
_web: {
|
|
@@ -7,7 +7,8 @@ const ButtonIcon = ({ children, toggled, as = TickSmallIcon, ...props }) => {
|
|
|
7
7
|
styles.useVariants({ toggled });
|
|
8
8
|
const IconAny = Icon;
|
|
9
9
|
return (_jsx(IconAny, { as: as, ...props, style: Platform.OS === 'web'
|
|
10
|
-
?
|
|
10
|
+
? // @ts-ignore
|
|
11
|
+
{ ...styles.icon, ...props.style }
|
|
11
12
|
: [styles.icon, props.style], children: children }));
|
|
12
13
|
};
|
|
13
14
|
ButtonIcon.displayName = 'ButtonIcon';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Pressable } from 'react-native';
|
|
3
3
|
import { StyleSheet } from 'react-native-unistyles';
|
|
4
|
-
import {
|
|
4
|
+
import { useCardPressHandlerContext } from '../Card';
|
|
5
5
|
const ButtonRoot = ({ children, onToggle, toggled, states, onPress, ...props }) => {
|
|
6
6
|
const { active } = states || {};
|
|
7
|
-
const { pressed } =
|
|
7
|
+
const { pressed } = useCardPressHandlerContext();
|
|
8
8
|
styles.useVariants({
|
|
9
9
|
toggled,
|
|
10
10
|
active: active || pressed,
|
|
@@ -7,7 +7,8 @@ const UnstyledIconButtonIcon = ({ children, ...props }) => {
|
|
|
7
7
|
const { active, inverted, size } = useUnstyledIconButtonContext();
|
|
8
8
|
styles.useVariants({ active, inverted, size });
|
|
9
9
|
return (_jsx(Icon, { ...props, style: Platform.OS === 'web'
|
|
10
|
-
?
|
|
10
|
+
? // @ts-ignore
|
|
11
|
+
{ ...styles.icon, ...props.style }
|
|
11
12
|
: [styles.icon, props.style], children: children }));
|
|
12
13
|
};
|
|
13
14
|
UnstyledIconButtonIcon.displayName = 'UnstyledIconButtonIcon';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './Accordion';
|
|
2
2
|
export * from './Alert';
|
|
3
3
|
export * from './Badge';
|
|
4
|
+
export * from './Banner';
|
|
4
5
|
export * from './BodyText';
|
|
5
6
|
export * from './BottomSheet';
|
|
6
7
|
export * from './Box';
|
|
@@ -16,11 +17,14 @@ export * from './DatePickerInput';
|
|
|
16
17
|
export * from './DescriptionList';
|
|
17
18
|
export * from './DetailText';
|
|
18
19
|
export * from './Divider';
|
|
20
|
+
export * from './Expandable';
|
|
21
|
+
export * from './ExpandableCard';
|
|
19
22
|
export * from './Flex';
|
|
20
23
|
export * from './FormField';
|
|
21
24
|
export * from './Grid';
|
|
22
25
|
export * from './Heading';
|
|
23
26
|
export * from './Helper';
|
|
27
|
+
export * from './HighlightBanner';
|
|
24
28
|
export * from './HTMLElements';
|
|
25
29
|
export * from './Icon';
|
|
26
30
|
export * from './IconButton';
|
|
@@ -44,6 +48,6 @@ export * from './Tabs';
|
|
|
44
48
|
export * from './Textarea';
|
|
45
49
|
export * from './ThemedImage';
|
|
46
50
|
export * from './ToggleButtonCard';
|
|
47
|
-
export { FlatList, Image, KeyboardAvoidingView, ScrollView, SectionList,
|
|
51
|
+
export { FlatList, Image, KeyboardAvoidingView, ScrollView, SectionList, View } from 'react-native';
|
|
48
52
|
export { Pressable } from 'react-native';
|
|
49
53
|
export { createIcon } from '@gluestack-ui/icon';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export * from './Accordion';
|
|
3
3
|
export * from './Alert';
|
|
4
4
|
export * from './Badge';
|
|
5
|
+
export * from './Banner';
|
|
5
6
|
export * from './BodyText';
|
|
6
7
|
export * from './BottomSheet';
|
|
7
8
|
export * from './Box';
|
|
@@ -17,11 +18,14 @@ export * from './DatePickerInput';
|
|
|
17
18
|
export * from './DescriptionList';
|
|
18
19
|
export * from './DetailText';
|
|
19
20
|
export * from './Divider';
|
|
21
|
+
export * from './Expandable';
|
|
22
|
+
export * from './ExpandableCard';
|
|
20
23
|
export * from './Flex';
|
|
21
24
|
export * from './FormField';
|
|
22
25
|
export * from './Grid';
|
|
23
26
|
export * from './Heading';
|
|
24
27
|
export * from './Helper';
|
|
28
|
+
export * from './HighlightBanner';
|
|
25
29
|
export * from './HTMLElements';
|
|
26
30
|
export * from './Icon';
|
|
27
31
|
export * from './IconButton';
|
|
@@ -45,6 +49,6 @@ export * from './Tabs';
|
|
|
45
49
|
export * from './Textarea';
|
|
46
50
|
export * from './ThemedImage';
|
|
47
51
|
export * from './ToggleButtonCard';
|
|
48
|
-
export { FlatList, Image, KeyboardAvoidingView, ScrollView, SectionList,
|
|
52
|
+
export { FlatList, Image, KeyboardAvoidingView, ScrollView, SectionList, View } from 'react-native';
|
|
49
53
|
export { Pressable } from 'react-native';
|
|
50
54
|
export { createIcon } from '@gluestack-ui/icon';
|
package/build/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './breakpoints';
|
|
3
|
-
export { StyleSheet, UnistylesRuntime, withUnistyles, Hide, Display, ScopedTheme, mq, getServerUnistyles, useUnistyles, hydrateServerUnistyles, useServerUnistyles, resetServerUnistyles, } from 'react-native-unistyles';
|
|
1
|
+
export { createUnistylesElement, Display, getServerUnistyles, Hide, hydrateServerUnistyles, mq, NavigationBar, resetServerUnistyles, ScopedTheme, StatusBar, StyleSheet, UnistylesRuntime, useServerUnistyles, useUnistyles, withUnistyles, } from 'react-native-unistyles';
|
|
4
2
|
export type { UnistylesBreakpoints, UnistylesThemes, UnistylesVariants, } from 'react-native-unistyles';
|
|
3
|
+
export * from './breakpoints';
|
|
4
|
+
export * from './themes';
|
|
5
5
|
export type * from '../types/unistyles';
|
package/build/core/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native-unistyles';
|
|
2
|
-
import { themes } from './themes';
|
|
3
2
|
import { breakpoints } from './breakpoints';
|
|
4
|
-
|
|
3
|
+
import { themes } from './themes';
|
|
4
|
+
export { createUnistylesElement, Display, getServerUnistyles, Hide, hydrateServerUnistyles, mq, NavigationBar, resetServerUnistyles, ScopedTheme, StatusBar, StyleSheet, UnistylesRuntime, useServerUnistyles, useUnistyles, withUnistyles, } from 'react-native-unistyles';
|
|
5
5
|
export * from './breakpoints';
|
|
6
|
-
export
|
|
6
|
+
export * from './themes';
|
|
7
7
|
StyleSheet.configure({
|
|
8
8
|
breakpoints,
|
|
9
9
|
themes,
|