@utilitywarehouse/hearth-react-native 0.6.0 → 0.7.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 +6 -0
- package/build/components/BottomSheet/BottomSheetBackdrop.js +2 -2
- package/build/components/BottomSheet/BottomSheetFlatList.js +2 -2
- package/build/components/BottomSheet/BottomSheetHandle.js +2 -2
- 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/Helper/HelperIcon.js +2 -1
- 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.js +2 -0
- package/build/components/Spinner/Spinner.web.js +2 -0
- package/build/components/Switch/Switch.js +5 -3
- package/build/components/Switch/Switch.web.js +1 -0
- package/build/components/Tabs/TabsList.js +6 -1
- 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 +1 -1
- package/build/components/index.js +1 -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/NextPrevPage.tsx +5 -5
- package/docs/components/VariantTitle.tsx +17 -7
- package/package.json +16 -14
- package/src/components/BottomSheet/BottomSheetBackdrop.tsx +2 -2
- package/src/components/BottomSheet/BottomSheetFlatList.tsx +2 -3
- package/src/components/BottomSheet/BottomSheetHandle.tsx +1 -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 +212 -14
- 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/Helper/HelperIcon.tsx +2 -1
- 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/Spinner/Spinner.tsx +2 -0
- package/src/components/Spinner/Spinner.web.tsx +2 -0
- package/src/components/Switch/Switch.tsx +10 -5
- package/src/components/Switch/Switch.web.tsx +5 -0
- package/src/components/Tabs/TabsList.tsx +2 -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 +1 -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,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
export default {
|
|
5
|
+
footer: {
|
|
6
|
+
horizontal: {
|
|
7
|
+
gap: 16,
|
|
8
|
+
},
|
|
9
|
+
padding: 24,
|
|
10
|
+
vertical: {
|
|
11
|
+
gap: 8,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
gap: 20,
|
|
15
|
+
heading: {
|
|
16
|
+
gap: 8,
|
|
17
|
+
},
|
|
18
|
+
width: 360,
|
|
19
|
+
mobile: {
|
|
20
|
+
padding: 16,
|
|
21
|
+
},
|
|
22
|
+
tablet: {
|
|
23
|
+
padding: 24,
|
|
24
|
+
},
|
|
25
|
+
desktop: {
|
|
26
|
+
padding: 24,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
@@ -11,12 +11,15 @@ export { default as bottomSheet } from './bottom-sheet';
|
|
|
11
11
|
export { default as breadcrumb } from './breadcrumb';
|
|
12
12
|
export { default as button } from './button';
|
|
13
13
|
export { default as card } from './card';
|
|
14
|
+
export { default as cardAction } from './card-action';
|
|
15
|
+
export { default as cardContent } from './card-content';
|
|
14
16
|
export { default as carouselControl } from './carousel-control';
|
|
15
17
|
export { default as checkbox } from './checkbox';
|
|
16
18
|
export { default as datePicker } from './date-picker';
|
|
17
19
|
export { default as descriptionList } from './description-list';
|
|
18
20
|
export { default as dialog } from './dialog';
|
|
19
21
|
export { default as divider } from './divider';
|
|
22
|
+
export { default as drawer } from './drawer';
|
|
20
23
|
export { default as expandableCard } from './expandable-card';
|
|
21
24
|
export { default as formField } from './form-field';
|
|
22
25
|
export { default as iconButton } from './icon-button';
|
|
@@ -11,12 +11,15 @@ export { default as bottomSheet } from './bottom-sheet';
|
|
|
11
11
|
export { default as breadcrumb } from './breadcrumb';
|
|
12
12
|
export { default as button } from './button';
|
|
13
13
|
export { default as card } from './card';
|
|
14
|
+
export { default as cardAction } from './card-action';
|
|
15
|
+
export { default as cardContent } from './card-content';
|
|
14
16
|
export { default as carouselControl } from './carousel-control';
|
|
15
17
|
export { default as checkbox } from './checkbox';
|
|
16
18
|
export { default as datePicker } from './date-picker';
|
|
17
19
|
export { default as descriptionList } from './description-list';
|
|
18
20
|
export { default as dialog } from './dialog';
|
|
19
21
|
export { default as divider } from './divider';
|
|
22
|
+
export { default as drawer } from './drawer';
|
|
20
23
|
export { default as expandableCard } from './expandable-card';
|
|
21
24
|
export { default as formField } from './form-field';
|
|
22
25
|
export { default as iconButton } from './icon-button';
|
package/build/tokens/layout.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const mobile: {
|
|
|
7
7
|
readonly minWidth: 320;
|
|
8
8
|
};
|
|
9
9
|
readonly container: {
|
|
10
|
-
readonly
|
|
10
|
+
readonly marginHorizontal: 16;
|
|
11
11
|
readonly paddingBottom: 32;
|
|
12
12
|
readonly paddingTop: 24;
|
|
13
13
|
readonly width: 360;
|
|
@@ -35,7 +35,7 @@ export declare const tablet: {
|
|
|
35
35
|
readonly minWidth: 740;
|
|
36
36
|
};
|
|
37
37
|
readonly container: {
|
|
38
|
-
readonly
|
|
38
|
+
readonly marginHorizontal: 32;
|
|
39
39
|
readonly paddingBottom: 32;
|
|
40
40
|
readonly paddingTop: 24;
|
|
41
41
|
readonly width: 744;
|
|
@@ -63,7 +63,7 @@ export declare const desktop: {
|
|
|
63
63
|
readonly minWidth: 992;
|
|
64
64
|
};
|
|
65
65
|
readonly container: {
|
|
66
|
-
readonly
|
|
66
|
+
readonly marginHorizontal: 32;
|
|
67
67
|
readonly paddingBottom: 48;
|
|
68
68
|
readonly paddingTop: 32;
|
|
69
69
|
readonly width: 1096;
|
|
@@ -92,7 +92,7 @@ declare const layout: {
|
|
|
92
92
|
readonly minWidth: 320;
|
|
93
93
|
};
|
|
94
94
|
readonly container: {
|
|
95
|
-
readonly
|
|
95
|
+
readonly marginHorizontal: 16;
|
|
96
96
|
readonly paddingBottom: 32;
|
|
97
97
|
readonly paddingTop: 24;
|
|
98
98
|
readonly width: 360;
|
|
@@ -120,7 +120,7 @@ declare const layout: {
|
|
|
120
120
|
readonly minWidth: 740;
|
|
121
121
|
};
|
|
122
122
|
readonly container: {
|
|
123
|
-
readonly
|
|
123
|
+
readonly marginHorizontal: 32;
|
|
124
124
|
readonly paddingBottom: 32;
|
|
125
125
|
readonly paddingTop: 24;
|
|
126
126
|
readonly width: 744;
|
|
@@ -148,7 +148,7 @@ declare const layout: {
|
|
|
148
148
|
readonly minWidth: 992;
|
|
149
149
|
};
|
|
150
150
|
readonly container: {
|
|
151
|
-
readonly
|
|
151
|
+
readonly marginHorizontal: 32;
|
|
152
152
|
readonly paddingBottom: 48;
|
|
153
153
|
readonly paddingTop: 32;
|
|
154
154
|
readonly width: 1096;
|
package/build/tokens/layout.js
CHANGED
|
@@ -7,7 +7,7 @@ export const mobile = {
|
|
|
7
7
|
minWidth: 320,
|
|
8
8
|
},
|
|
9
9
|
container: {
|
|
10
|
-
|
|
10
|
+
marginHorizontal: 16,
|
|
11
11
|
paddingBottom: 32,
|
|
12
12
|
paddingTop: 24,
|
|
13
13
|
width: 360,
|
|
@@ -35,7 +35,7 @@ export const tablet = {
|
|
|
35
35
|
minWidth: 740,
|
|
36
36
|
},
|
|
37
37
|
container: {
|
|
38
|
-
|
|
38
|
+
marginHorizontal: 32,
|
|
39
39
|
paddingBottom: 32,
|
|
40
40
|
paddingTop: 24,
|
|
41
41
|
width: 744,
|
|
@@ -63,7 +63,7 @@ export const desktop = {
|
|
|
63
63
|
minWidth: 992,
|
|
64
64
|
},
|
|
65
65
|
container: {
|
|
66
|
-
|
|
66
|
+
marginHorizontal: 32,
|
|
67
67
|
paddingBottom: 48,
|
|
68
68
|
paddingTop: 32,
|
|
69
69
|
width: 1096,
|
|
@@ -85,6 +85,7 @@ export declare const mobile: {
|
|
|
85
85
|
readonly lineHeight: 36;
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
|
+
readonly listSpacing: 16;
|
|
88
89
|
};
|
|
89
90
|
export declare const tablet: {
|
|
90
91
|
readonly bodyText: {
|
|
@@ -170,6 +171,7 @@ export declare const tablet: {
|
|
|
170
171
|
readonly lineHeight: 36;
|
|
171
172
|
};
|
|
172
173
|
};
|
|
174
|
+
readonly listSpacing: 16;
|
|
173
175
|
};
|
|
174
176
|
export declare const desktop: {
|
|
175
177
|
readonly bodyText: {
|
|
@@ -255,6 +257,7 @@ export declare const desktop: {
|
|
|
255
257
|
readonly lineHeight: 48;
|
|
256
258
|
};
|
|
257
259
|
};
|
|
260
|
+
readonly listSpacing: 16;
|
|
258
261
|
};
|
|
259
262
|
declare const typography: {
|
|
260
263
|
readonly mobile: {
|
|
@@ -341,6 +344,7 @@ declare const typography: {
|
|
|
341
344
|
readonly lineHeight: 36;
|
|
342
345
|
};
|
|
343
346
|
};
|
|
347
|
+
readonly listSpacing: 16;
|
|
344
348
|
};
|
|
345
349
|
readonly tablet: {
|
|
346
350
|
readonly bodyText: {
|
|
@@ -426,6 +430,7 @@ declare const typography: {
|
|
|
426
430
|
readonly lineHeight: 36;
|
|
427
431
|
};
|
|
428
432
|
};
|
|
433
|
+
readonly listSpacing: 16;
|
|
429
434
|
};
|
|
430
435
|
readonly desktop: {
|
|
431
436
|
readonly bodyText: {
|
|
@@ -511,6 +516,7 @@ declare const typography: {
|
|
|
511
516
|
readonly lineHeight: 48;
|
|
512
517
|
};
|
|
513
518
|
};
|
|
519
|
+
readonly listSpacing: 16;
|
|
514
520
|
};
|
|
515
521
|
};
|
|
516
522
|
export default typography;
|
|
@@ -85,6 +85,7 @@ export const mobile = {
|
|
|
85
85
|
lineHeight: 36,
|
|
86
86
|
},
|
|
87
87
|
},
|
|
88
|
+
listSpacing: 16,
|
|
88
89
|
};
|
|
89
90
|
export const tablet = {
|
|
90
91
|
bodyText: {
|
|
@@ -170,6 +171,7 @@ export const tablet = {
|
|
|
170
171
|
lineHeight: 36,
|
|
171
172
|
},
|
|
172
173
|
},
|
|
174
|
+
listSpacing: 16,
|
|
173
175
|
};
|
|
174
176
|
export const desktop = {
|
|
175
177
|
bodyText: {
|
|
@@ -255,6 +257,7 @@ export const desktop = {
|
|
|
255
257
|
lineHeight: 48,
|
|
256
258
|
},
|
|
257
259
|
},
|
|
260
|
+
listSpacing: 16,
|
|
258
261
|
};
|
|
259
262
|
const typography = { mobile, tablet, desktop };
|
|
260
263
|
export default typography;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChevronLeftSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
|
-
import { Card,
|
|
3
|
+
import { Card, CardPressHandler, Heading, Link } from '../../src';
|
|
4
4
|
import { addReactNativePrefix } from '../heplers';
|
|
5
5
|
|
|
6
6
|
type NextPrevPageProps = {
|
|
@@ -34,7 +34,7 @@ const NextPrevPage: React.FC<NextPrevPageProps> = ({
|
|
|
34
34
|
{!!prevLink && (
|
|
35
35
|
<Card gap="100">
|
|
36
36
|
{!!prevTitle && <Heading size="sm">{prevTitle}</Heading>}
|
|
37
|
-
<
|
|
37
|
+
<CardPressHandler>
|
|
38
38
|
<Link
|
|
39
39
|
onPress={() => openLink(prevLink)}
|
|
40
40
|
iconPosition="left"
|
|
@@ -42,16 +42,16 @@ const NextPrevPage: React.FC<NextPrevPageProps> = ({
|
|
|
42
42
|
>
|
|
43
43
|
Prev Page
|
|
44
44
|
</Link>
|
|
45
|
-
</
|
|
45
|
+
</CardPressHandler>
|
|
46
46
|
</Card>
|
|
47
47
|
)}
|
|
48
48
|
<div />
|
|
49
49
|
{!!nextLink && (
|
|
50
50
|
<Card gap="100">
|
|
51
51
|
{!!nextTitle && <Heading size="sm">{nextTitle}</Heading>}
|
|
52
|
-
<
|
|
52
|
+
<CardPressHandler>
|
|
53
53
|
<Link onPress={() => openLink(nextLink)}>Next Page</Link>
|
|
54
|
-
</
|
|
54
|
+
</CardPressHandler>
|
|
55
55
|
</Card>
|
|
56
56
|
)}
|
|
57
57
|
</View>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ViewProps } from 'react-native';
|
|
2
|
-
import {
|
|
2
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
3
|
+
import { Box, DetailText } from '../../src';
|
|
3
4
|
|
|
4
5
|
const VariantTitle = ({
|
|
5
6
|
title,
|
|
@@ -12,14 +13,10 @@ const VariantTitle = ({
|
|
|
12
13
|
invert?: boolean;
|
|
13
14
|
children: ViewProps['children'];
|
|
14
15
|
}) => {
|
|
15
|
-
|
|
16
|
+
styles.useVariants({ invert });
|
|
16
17
|
return (
|
|
17
18
|
<Box gap="100" w="full">
|
|
18
|
-
<DetailText
|
|
19
|
-
textTransform={upperCase ? 'uppercase' : 'none'}
|
|
20
|
-
size="sm"
|
|
21
|
-
color={invert ? 'warmWhite50' : colorMode === 'light' ? 'grey600' : 'grey200'}
|
|
22
|
-
>
|
|
19
|
+
<DetailText textTransform={upperCase ? 'uppercase' : 'none'} size="sm" style={styles.text}>
|
|
23
20
|
{title}
|
|
24
21
|
</DetailText>
|
|
25
22
|
{children}
|
|
@@ -27,4 +24,17 @@ const VariantTitle = ({
|
|
|
27
24
|
);
|
|
28
25
|
};
|
|
29
26
|
|
|
27
|
+
const styles = StyleSheet.create(theme => ({
|
|
28
|
+
text: {
|
|
29
|
+
color: theme.colorMode === 'light' ? theme.color.grey[600] : theme.color.grey[200],
|
|
30
|
+
variants: {
|
|
31
|
+
invert: {
|
|
32
|
+
true: {
|
|
33
|
+
color: theme.color.warmWhite[50],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
}));
|
|
39
|
+
|
|
30
40
|
export default VariantTitle;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utilitywarehouse/hearth-react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Utility Warehouse React Native UI library",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -24,39 +24,41 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
|
27
|
-
"@chromatic-com/storybook": "^4.1.
|
|
27
|
+
"@chromatic-com/storybook": "^4.1.2",
|
|
28
28
|
"@figma/code-connect": "^1.3.3",
|
|
29
|
-
"@gorhom/bottom-sheet": "5.
|
|
30
|
-
"@storybook/addon-a11y": "^
|
|
31
|
-
"@storybook/addon-docs": "^
|
|
32
|
-
"@storybook/addon-vitest": "^
|
|
33
|
-
"@storybook/react
|
|
29
|
+
"@gorhom/bottom-sheet": "5.2.6",
|
|
30
|
+
"@storybook/addon-a11y": "^10.0.5",
|
|
31
|
+
"@storybook/addon-docs": "^10.0.5",
|
|
32
|
+
"@storybook/addon-vitest": "^10.0.5",
|
|
33
|
+
"@storybook/react": "^10.0.5",
|
|
34
|
+
"@storybook/react-native-web-vite": "^10.0.5",
|
|
34
35
|
"@types/prismjs": "^1.26.5",
|
|
35
36
|
"@types/react": "^19.1.10",
|
|
36
37
|
"@vitest/browser": "^3.2.4",
|
|
37
38
|
"@vitest/coverage-v8": "^3.2.4",
|
|
38
39
|
"chromatic": "^13.3.0",
|
|
39
|
-
"eslint-plugin-storybook": "
|
|
40
|
+
"eslint-plugin-storybook": "10.0.5",
|
|
40
41
|
"playwright": "^1.55.1",
|
|
41
42
|
"prismjs": "^1.30.0",
|
|
42
43
|
"react": "^19.1.0",
|
|
43
44
|
"react-native": "0.80.0",
|
|
44
45
|
"react-native-edge-to-edge": "1.6.1",
|
|
45
46
|
"react-native-gesture-handler": "2.26.0",
|
|
46
|
-
"react-native-nitro-modules": "^0.
|
|
47
|
-
"react-native-reanimated": "
|
|
47
|
+
"react-native-nitro-modules": "^0.31.4",
|
|
48
|
+
"react-native-reanimated": "4.1.3",
|
|
48
49
|
"react-native-svg": "^15.12.1",
|
|
49
|
-
"react-native-unistyles": "3.0.
|
|
50
|
+
"react-native-unistyles": "3.0.17",
|
|
50
51
|
"react-native-web": "^0.20.0",
|
|
52
|
+
"react-native-worklets": "^0.6.1",
|
|
51
53
|
"remark-gfm": "^4.0.1",
|
|
52
|
-
"storybook": "^
|
|
54
|
+
"storybook": "^10.0.5",
|
|
53
55
|
"typescript": "^5.7.3",
|
|
54
56
|
"vite": "^7.1.3",
|
|
55
57
|
"vite-plugin-svgr": "^4.5.0",
|
|
56
58
|
"vitest": "^3.2.4",
|
|
57
59
|
"@utilitywarehouse/hearth-fonts": "^0.0.4",
|
|
58
|
-
"@utilitywarehouse/hearth-react-icons": "^0.7.
|
|
59
|
-
"@utilitywarehouse/hearth-react-native-icons": "^0.7.
|
|
60
|
+
"@utilitywarehouse/hearth-react-icons": "^0.7.2",
|
|
61
|
+
"@utilitywarehouse/hearth-react-native-icons": "^0.7.2",
|
|
60
62
|
"@utilitywarehouse/hearth-svg-assets": "^0.2.0",
|
|
61
63
|
"@utilitywarehouse/hearth-tokens": "^0.1.3"
|
|
62
64
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BottomSheetBackdrop as Backdrop } from '@gorhom/bottom-sheet';
|
|
2
|
+
import { BottomSheetDefaultBackdropProps } from '@gorhom/bottom-sheet/lib/typescript/components/bottomSheetBackdrop/types';
|
|
2
3
|
import { StyleSheet, withUnistyles } from 'react-native-unistyles';
|
|
3
4
|
import { useTheme } from '../../hooks';
|
|
4
|
-
import { BottomSheetDefaultBackdropProps } from '@gorhom/bottom-sheet/lib/typescript/components/bottomSheetBackdrop/types';
|
|
5
5
|
|
|
6
6
|
const StyledBottomSheetBackdrop = withUnistyles(Backdrop);
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ const BottomSheetBackdrop = ({ style, ...props }: BottomSheetDefaultBackdropProp
|
|
|
9
9
|
const theme = useTheme();
|
|
10
10
|
return (
|
|
11
11
|
<StyledBottomSheetBackdrop
|
|
12
|
-
// @ts-expect-error - style
|
|
12
|
+
// @ts-expect-error - style prop type issue
|
|
13
13
|
style={[styles.backdrop, style]}
|
|
14
14
|
opacity={theme.components.overlay.opacity / 100}
|
|
15
15
|
appearsOnIndex={0}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
1
|
import { BottomSheetFlatList as FlatList } from '@gorhom/bottom-sheet';
|
|
2
|
+
import { BottomSheetFlatListProps } from '@gorhom/bottom-sheet/lib/typescript/components/bottomSheetScrollable/types';
|
|
3
3
|
import { StyleSheet, withUnistyles } from 'react-native-unistyles';
|
|
4
4
|
import { useBottomSheetContext } from './BottomSheet.context';
|
|
5
|
-
import { BottomSheetFlatListProps } from '@gorhom/bottom-sheet/lib/typescript/components/bottomSheetScrollable/types';
|
|
6
5
|
|
|
7
6
|
const StyledBottomSheetFlatList = withUnistyles(FlatList);
|
|
8
7
|
|
|
@@ -20,7 +19,7 @@ const BottomSheetFlatList = ({
|
|
|
20
19
|
|
|
21
20
|
return (
|
|
22
21
|
<StyledBottomSheetFlatList
|
|
23
|
-
// @ts-expect-error - style
|
|
22
|
+
// @ts-expect-error - style prop type issue
|
|
24
23
|
style={[styles.container, style]}
|
|
25
24
|
contentContainerStyle={[styles.contentContainer, contentContainerStyle]}
|
|
26
25
|
{...props}
|
|
@@ -7,7 +7,7 @@ const StyledBottomSheetHandle = withUnistyles(Handle);
|
|
|
7
7
|
const BottomSheetHandle = ({ style, indicatorStyle, ...props }: BottomSheetDefaultHandleProps) => {
|
|
8
8
|
return (
|
|
9
9
|
<StyledBottomSheetHandle
|
|
10
|
-
// @ts-expect-error - style
|
|
10
|
+
// @ts-expect-error - style prop type issue
|
|
11
11
|
style={[styles.handle, style]}
|
|
12
12
|
indicatorStyle={[styles.indicator, indicatorStyle]}
|
|
13
13
|
{...props}
|
|
@@ -13,7 +13,8 @@ const ButtonIcon = ({ children, ...props }: IconProps) => {
|
|
|
13
13
|
{...props}
|
|
14
14
|
style={
|
|
15
15
|
Platform.OS === 'web'
|
|
16
|
-
?
|
|
16
|
+
? // @ts-expect-error - style prop type issue
|
|
17
|
+
{ ...(styles.icon as StyleProp<ViewStyle>), ...props.style }
|
|
17
18
|
: [styles.icon as StyleProp<ViewStyle>, props.style]
|
|
18
19
|
}
|
|
19
20
|
>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { Pressable, ViewStyle } from 'react-native';
|
|
3
3
|
import { StyleSheet } from 'react-native-unistyles';
|
|
4
|
-
import {
|
|
4
|
+
import { useCardPressHandlerContext } from '../Card';
|
|
5
5
|
import { ButtonContext } from './Button.context';
|
|
6
6
|
import type { BaseButtonProps } from './Button.props';
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@ const ButtonRoot = ({
|
|
|
17
17
|
...props
|
|
18
18
|
}: BaseButtonProps & { states?: { active?: boolean; disabled?: boolean } }) => {
|
|
19
19
|
const { active, disabled = false } = states || {};
|
|
20
|
-
const { pressed } =
|
|
20
|
+
const { pressed } = useCardPressHandlerContext();
|
|
21
21
|
|
|
22
22
|
styles.useVariants({
|
|
23
23
|
variant,
|
|
@@ -103,7 +103,6 @@ const styles = StyleSheet.create(theme => ({
|
|
|
103
103
|
ghost: {
|
|
104
104
|
backgroundColor: 'transparent',
|
|
105
105
|
borderWidth: 0,
|
|
106
|
-
textDecoration: 'underline',
|
|
107
106
|
},
|
|
108
107
|
},
|
|
109
108
|
size: {
|
|
@@ -349,7 +348,6 @@ const styles = StyleSheet.create(theme => ({
|
|
|
349
348
|
variant: 'ghost',
|
|
350
349
|
colorScheme: 'functional',
|
|
351
350
|
styles: {
|
|
352
|
-
textDecorationColor: theme.color.interactive.functional.foreground.subtle,
|
|
353
351
|
_web: {
|
|
354
352
|
_hover: {
|
|
355
353
|
backgroundColor: theme.color.interactive.functional.surface.subtle.hover,
|
|
@@ -397,7 +395,6 @@ const styles = StyleSheet.create(theme => ({
|
|
|
397
395
|
variant: 'ghost',
|
|
398
396
|
colorScheme: 'affirmative',
|
|
399
397
|
styles: {
|
|
400
|
-
textDecorationColor: theme.color.interactive.affirmative.foreground.subtle,
|
|
401
398
|
_web: {
|
|
402
399
|
_hover: {
|
|
403
400
|
backgroundColor: theme.color.interactive.affirmative.surface.subtle.hover,
|
|
@@ -421,7 +418,6 @@ const styles = StyleSheet.create(theme => ({
|
|
|
421
418
|
variant: 'ghost',
|
|
422
419
|
colorScheme: 'destructive',
|
|
423
420
|
styles: {
|
|
424
|
-
textDecorationColor: theme.color.interactive.destructive.foreground.subtle,
|
|
425
421
|
_web: {
|
|
426
422
|
_hover: {
|
|
427
423
|
backgroundColor: theme.color.interactive.destructive.surface.subtle.hover,
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { createContext, useContext } from 'react';
|
|
2
|
+
import CardProps from './Card.props';
|
|
2
3
|
|
|
3
4
|
interface CardContextProps {
|
|
4
5
|
pressed?: boolean;
|
|
6
|
+
noPadding?: boolean;
|
|
7
|
+
hasActions?: boolean;
|
|
8
|
+
hasContent?: boolean;
|
|
9
|
+
hasOnlyActions?: boolean;
|
|
10
|
+
space?: CardProps['space'];
|
|
11
|
+
variant?: CardProps['variant'];
|
|
5
12
|
}
|
|
6
13
|
|
|
7
14
|
export const CardContext = createContext<CardContextProps>({});
|