expo-dev-client-components 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/.eslintrc.js +5 -0
  2. package/CHANGELOG.md +15 -0
  3. package/README.md +37 -0
  4. package/assets/check-icon.png +0 -0
  5. package/assets/check-icon@2x.png +0 -0
  6. package/assets/check-icon@3x.png +0 -0
  7. package/assets/chevron-right-icon.png +0 -0
  8. package/assets/chevron-right-icon@2x.png +0 -0
  9. package/assets/chevron-right-icon@3x.png +0 -0
  10. package/assets/home-filled-active-icon.png +0 -0
  11. package/assets/home-filled-active-icon@2x.png +0 -0
  12. package/assets/home-filled-active-icon@3x.png +0 -0
  13. package/assets/home-filled-inactive-icon.png +0 -0
  14. package/assets/home-filled-inactive-icon@2x.png +0 -0
  15. package/assets/home-filled-inactive-icon@3x.png +0 -0
  16. package/assets/info-icon.png +0 -0
  17. package/assets/info-icon@2x.png +0 -0
  18. package/assets/info-icon@3x.png +0 -0
  19. package/assets/logo-icon.png +0 -0
  20. package/assets/logo-icon@2x.png +0 -0
  21. package/assets/logo-icon@3x.png +0 -0
  22. package/assets/question-mark-icon.png +0 -0
  23. package/assets/question-mark-icon@2x.png +0 -0
  24. package/assets/question-mark-icon@3x.png +0 -0
  25. package/assets/refresh-icon.png +0 -0
  26. package/assets/refresh-icon@2x.png +0 -0
  27. package/assets/refresh-icon@3x.png +0 -0
  28. package/assets/settings-filled-active-icon.png +0 -0
  29. package/assets/settings-filled-active-icon@2x.png +0 -0
  30. package/assets/settings-filled-active-icon@3x.png +0 -0
  31. package/assets/settings-filled-inactive-icon.png +0 -0
  32. package/assets/settings-filled-inactive-icon@2x.png +0 -0
  33. package/assets/settings-filled-inactive-icon@3x.png +0 -0
  34. package/assets/shake-device-icon.png +0 -0
  35. package/assets/shake-device-icon@2x.png +0 -0
  36. package/assets/shake-device-icon@3x.png +0 -0
  37. package/assets/show-menu-at-launch-icon.png +0 -0
  38. package/assets/show-menu-at-launch-icon@2x.png +0 -0
  39. package/assets/show-menu-at-launch-icon@3x.png +0 -0
  40. package/assets/terminal-icon.png +0 -0
  41. package/assets/terminal-icon@2x.png +0 -0
  42. package/assets/terminal-icon@3x.png +0 -0
  43. package/assets/three-finger-long-press-icon.png +0 -0
  44. package/assets/three-finger-long-press-icon@2x.png +0 -0
  45. package/assets/three-finger-long-press-icon@3x.png +0 -0
  46. package/assets/toolbar-overlay-icon.png +0 -0
  47. package/assets/toolbar-overlay-icon@2x.png +0 -0
  48. package/assets/toolbar-overlay-icon@3x.png +0 -0
  49. package/assets/user-icon.png +0 -0
  50. package/assets/user-icon@2x.png +0 -0
  51. package/assets/user-icon@3x.png +0 -0
  52. package/assets/x-icon.png +0 -0
  53. package/assets/x-icon@2x.png +0 -0
  54. package/assets/x-icon@3x.png +0 -0
  55. package/build/Button.d.ts +52 -0
  56. package/build/Button.js +154 -0
  57. package/build/Button.js.map +1 -0
  58. package/build/Image.d.ts +7 -0
  59. package/build/Image.js +37 -0
  60. package/build/Image.js.map +1 -0
  61. package/build/Text.d.ts +31 -0
  62. package/build/Text.js +66 -0
  63. package/build/Text.js.map +1 -0
  64. package/build/View.d.ts +61 -0
  65. package/build/View.js +172 -0
  66. package/build/View.js.map +1 -0
  67. package/build/icons/CheckIcon.d.ts +3 -0
  68. package/build/icons/CheckIcon.js +7 -0
  69. package/build/icons/CheckIcon.js.map +1 -0
  70. package/build/icons/ChevronRightIcon.d.ts +3 -0
  71. package/build/icons/ChevronRightIcon.js +7 -0
  72. package/build/icons/ChevronRightIcon.js.map +1 -0
  73. package/build/icons/ExpoLogoIcon.d.ts +3 -0
  74. package/build/icons/ExpoLogoIcon.js +7 -0
  75. package/build/icons/ExpoLogoIcon.js.map +1 -0
  76. package/build/icons/HomeFilledIcon.d.ts +7 -0
  77. package/build/icons/HomeFilledIcon.js +9 -0
  78. package/build/icons/HomeFilledIcon.js.map +1 -0
  79. package/build/icons/InfoIcon.d.ts +3 -0
  80. package/build/icons/InfoIcon.js +7 -0
  81. package/build/icons/InfoIcon.js.map +1 -0
  82. package/build/icons/QuestionMarkIcon.d.ts +3 -0
  83. package/build/icons/QuestionMarkIcon.js +7 -0
  84. package/build/icons/QuestionMarkIcon.js.map +1 -0
  85. package/build/icons/RefreshIcon.d.ts +3 -0
  86. package/build/icons/RefreshIcon.js +7 -0
  87. package/build/icons/RefreshIcon.js.map +1 -0
  88. package/build/icons/SettingsFilledIcon.d.ts +7 -0
  89. package/build/icons/SettingsFilledIcon.js +9 -0
  90. package/build/icons/SettingsFilledIcon.js.map +1 -0
  91. package/build/icons/ShakeDeviceIcon.d.ts +3 -0
  92. package/build/icons/ShakeDeviceIcon.js +7 -0
  93. package/build/icons/ShakeDeviceIcon.js.map +1 -0
  94. package/build/icons/ShowMenuIcon.d.ts +3 -0
  95. package/build/icons/ShowMenuIcon.js +7 -0
  96. package/build/icons/ShowMenuIcon.js.map +1 -0
  97. package/build/icons/TerminalIcon.d.ts +3 -0
  98. package/build/icons/TerminalIcon.js +7 -0
  99. package/build/icons/TerminalIcon.js.map +1 -0
  100. package/build/icons/ThreeFingerPressIcon.d.ts +3 -0
  101. package/build/icons/ThreeFingerPressIcon.js +7 -0
  102. package/build/icons/ThreeFingerPressIcon.js.map +1 -0
  103. package/build/icons/ToolbarOverlayIcon.d.ts +3 -0
  104. package/build/icons/ToolbarOverlayIcon.js +7 -0
  105. package/build/icons/ToolbarOverlayIcon.js.map +1 -0
  106. package/build/icons/UserIcon.d.ts +3 -0
  107. package/build/icons/UserIcon.js +7 -0
  108. package/build/icons/UserIcon.js.map +1 -0
  109. package/build/icons/XIcon.d.ts +3 -0
  110. package/build/icons/XIcon.js +7 -0
  111. package/build/icons/XIcon.js.map +1 -0
  112. package/build/icons/index.d.ts +15 -0
  113. package/build/icons/index.js +16 -0
  114. package/build/icons/index.js.map +1 -0
  115. package/build/index.d.ts +7 -0
  116. package/build/index.js +8 -0
  117. package/build/index.js.map +1 -0
  118. package/build/theme.d.ts +345 -0
  119. package/build/theme.js +191 -0
  120. package/build/theme.js.map +1 -0
  121. package/build/useExpoTheme.d.ts +4 -0
  122. package/build/useExpoTheme.js +10 -0
  123. package/build/useExpoTheme.js.map +1 -0
  124. package/package.json +40 -0
  125. package/src/Button.tsx +199 -0
  126. package/src/Image.tsx +42 -0
  127. package/src/Text.tsx +78 -0
  128. package/src/View.tsx +202 -0
  129. package/src/icons/CheckIcon.tsx +9 -0
  130. package/src/icons/ChevronRightIcon.tsx +9 -0
  131. package/src/icons/ExpoLogoIcon.tsx +9 -0
  132. package/src/icons/HomeFilledIcon.tsx +15 -0
  133. package/src/icons/InfoIcon.tsx +9 -0
  134. package/src/icons/QuestionMarkIcon.tsx +9 -0
  135. package/src/icons/RefreshIcon.tsx +9 -0
  136. package/src/icons/SettingsFilledIcon.tsx +15 -0
  137. package/src/icons/ShakeDeviceIcon.tsx +9 -0
  138. package/src/icons/ShowMenuIcon.tsx +9 -0
  139. package/src/icons/TerminalIcon.tsx +9 -0
  140. package/src/icons/ThreeFingerPressIcon.tsx +9 -0
  141. package/src/icons/ToolbarOverlayIcon.tsx +9 -0
  142. package/src/icons/UserIcon.tsx +9 -0
  143. package/src/icons/XIcon.tsx +9 -0
  144. package/src/icons/index.ts +15 -0
  145. package/src/index.ts +7 -0
  146. package/src/theme.ts +225 -0
  147. package/src/useExpoTheme.ts +14 -0
  148. package/tsconfig.json +9 -0
package/.eslintrc.js ADDED
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ root: true,
3
+ extends: ['universe/native', 'universe/web'],
4
+ ignorePatterns: ['build'],
5
+ };
package/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ ## Unpublished
4
+
5
+ ### 🛠 Breaking changes
6
+
7
+ ### 🎉 New features
8
+
9
+ ### 🐛 Bug fixes
10
+
11
+ ### 💡 Others
12
+
13
+ ## 1.0.0 — 2021-12-22
14
+
15
+ _This version does not introduce any user-facing changes._
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # expo-dev-client-components
2
+
3
+ A package for sharing React Native components between different dev-client RN apps
4
+
5
+ ## API documentation
6
+
7
+ ```tsx
8
+ import { View, Spacer, Row, useExpoTheme, ChevronRightICon } from 'expo-dev-client-components';
9
+
10
+ function ExampleRow() {
11
+ const theme = useExpoTheme();
12
+
13
+ return (
14
+ <View px="small" py="large">
15
+ <Row align="center">
16
+ <ChevronRightIcon />
17
+ <Spacer.Horizontal size="tiny" />
18
+ <Text size="large" style={{ color: theme.text.default }}>
19
+ Enter URL manually
20
+ </Text>
21
+ </Row>
22
+ </View>
23
+ );
24
+ }
25
+ ```
26
+
27
+ ## Installation in managed Expo projects
28
+
29
+ There are no native dependencies exported and so this module should be compatible with any RN project
30
+
31
+ ## Installation in bare React Native projects
32
+
33
+ There are no native dependencies exported and so this module should be compatible with any RN project
34
+
35
+ ## Contributing
36
+
37
+ Contributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing).
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,52 @@
1
+ import * as React from 'react';
2
+ import { Animated } from 'react-native';
3
+ declare const Container: React.ForwardRefExoticComponent<Pick<Animated.AnimatedProps<import("react-native").PressableProps & React.RefAttributes<import("react-native").View>> & {
4
+ children?: React.ReactNode;
5
+ } & {
6
+ margin?: "small" | "medium" | "large" | "micro" | "tiny" | "xl" | undefined;
7
+ mx?: "small" | "medium" | "large" | "micro" | "tiny" | undefined;
8
+ my?: "small" | "medium" | "large" | "micro" | "tiny" | undefined;
9
+ padding?: "small" | "medium" | "large" | "micro" | "tiny" | "xl" | undefined;
10
+ px?: "small" | "medium" | "large" | "micro" | "tiny" | "xl" | undefined;
11
+ py?: "small" | "medium" | "large" | "micro" | "tiny" | "xl" | undefined;
12
+ rounded?: "none" | "small" | "medium" | "large" | "full" | undefined;
13
+ roundedTop?: "none" | "small" | "medium" | "large" | "full" | undefined;
14
+ roundedBottom?: "none" | "small" | "medium" | "large" | "full" | undefined;
15
+ bg?: "transparent" | "primary" | "secondary" | "tertiary" | "ghost" | "default" | "disabled" | undefined;
16
+ border?: "ghost" | undefined;
17
+ shadow?: "button" | undefined;
18
+ }, keyof import("react-native").PressableProps | "key" | "bg" | "border" | "shadow" | "margin" | "mx" | "my" | "padding" | "px" | "py" | "rounded" | "roundedTop" | "roundedBottom"> & React.RefAttributes<Animated.AnimatedProps<import("react-native").PressableProps & React.RefAttributes<import("react-native").View>>>>;
19
+ export declare const Button: {
20
+ Container: React.ForwardRefExoticComponent<Pick<Animated.AnimatedProps<import("react-native").PressableProps & React.RefAttributes<import("react-native").View>> & {
21
+ children?: React.ReactNode;
22
+ } & {
23
+ margin?: "small" | "medium" | "large" | "micro" | "tiny" | "xl" | undefined;
24
+ mx?: "small" | "medium" | "large" | "micro" | "tiny" | undefined;
25
+ my?: "small" | "medium" | "large" | "micro" | "tiny" | undefined;
26
+ padding?: "small" | "medium" | "large" | "micro" | "tiny" | "xl" | undefined;
27
+ px?: "small" | "medium" | "large" | "micro" | "tiny" | "xl" | undefined;
28
+ py?: "small" | "medium" | "large" | "micro" | "tiny" | "xl" | undefined;
29
+ rounded?: "none" | "small" | "medium" | "large" | "full" | undefined;
30
+ roundedTop?: "none" | "small" | "medium" | "large" | "full" | undefined;
31
+ roundedBottom?: "none" | "small" | "medium" | "large" | "full" | undefined;
32
+ bg?: "transparent" | "primary" | "secondary" | "tertiary" | "ghost" | "default" | "disabled" | undefined;
33
+ border?: "ghost" | undefined;
34
+ shadow?: "button" | undefined;
35
+ }, keyof import("react-native").PressableProps | "key" | "bg" | "border" | "shadow" | "margin" | "mx" | "my" | "padding" | "px" | "py" | "rounded" | "roundedTop" | "roundedBottom"> & React.RefAttributes<Animated.AnimatedProps<import("react-native").PressableProps & React.RefAttributes<import("react-native").View>>>>;
36
+ ScaleOnPressContainer: typeof ScaleOnPressContainer;
37
+ Text: React.ForwardRefExoticComponent<import("react-native").TextProps & {
38
+ children?: React.ReactNode;
39
+ } & {
40
+ color?: "transparent" | "primary" | "secondary" | "tertiary" | "ghost" | "default" | undefined;
41
+ align?: "center" | undefined;
42
+ size?: "small" | "medium" | "large" | undefined;
43
+ leading?: "large" | undefined;
44
+ type?: "mono" | undefined;
45
+ weight?: "normal" | "bold" | "medium" | "thin" | "extralight" | "light" | "semibold" | "extrabold" | "black" | undefined;
46
+ } & React.RefAttributes<import("react-native").TextProps>>;
47
+ };
48
+ declare type ScalingPressableProps = {
49
+ minScale?: number;
50
+ };
51
+ declare function ScaleOnPressContainer({ minScale, ...props }: React.ComponentProps<typeof Container> & ScalingPressableProps): JSX.Element;
52
+ export {};
@@ -0,0 +1,154 @@
1
+ import { lightTheme, darkTheme, borderRadius, shadows, palette } from '@expo/styleguide-native';
2
+ import * as React from 'react';
3
+ import { Pressable as RNPressable, Text as RNText, Animated, useColorScheme } from 'react-native';
4
+ import { create } from 'react-native-primitives';
5
+ import { rounded, margin, padding, text } from './theme';
6
+ const AnimatedPressable = Animated.createAnimatedComponent(RNPressable);
7
+ const Text = create(RNText, {
8
+ base: {
9
+ fontWeight: '400',
10
+ color: lightTheme.text.default,
11
+ fontSize: 16,
12
+ },
13
+ props: {
14
+ accessibilityRole: 'text',
15
+ },
16
+ variants: {
17
+ ...text,
18
+ color: {
19
+ primary: { color: lightTheme.button.primary.foreground },
20
+ secondary: { color: lightTheme.button.secondary.foreground },
21
+ tertiary: { color: lightTheme.button.tertiary.foreground },
22
+ ghost: { color: lightTheme.button.ghost.foreground },
23
+ transparent: { color: lightTheme.button.transparent.foreground },
24
+ default: { color: lightTheme.text.default },
25
+ },
26
+ },
27
+ selectors: {
28
+ dark: {
29
+ base: {
30
+ color: darkTheme.text.default,
31
+ },
32
+ color: {
33
+ primary: { color: darkTheme.button.primary.foreground },
34
+ secondary: { color: darkTheme.button.secondary.foreground },
35
+ tertiary: { color: darkTheme.button.tertiary.foreground },
36
+ ghost: { color: darkTheme.button.ghost.foreground },
37
+ transparent: { color: darkTheme.button.transparent.foreground },
38
+ default: { color: darkTheme.text.default },
39
+ },
40
+ },
41
+ },
42
+ });
43
+ const Container = create(AnimatedPressable, {
44
+ base: {
45
+ overflow: 'hidden',
46
+ borderRadius: borderRadius.medium,
47
+ },
48
+ props: {
49
+ accessibilityRole: 'button',
50
+ android_disableSound: true,
51
+ },
52
+ variants: {
53
+ bg: {
54
+ default: { backgroundColor: lightTheme.background.default },
55
+ primary: { backgroundColor: lightTheme.button.primary.background },
56
+ secondary: { backgroundColor: lightTheme.button.secondary.background },
57
+ tertiary: { backgroundColor: lightTheme.button.tertiary.background },
58
+ ghost: { backgroundColor: lightTheme.button.ghost.background },
59
+ transparent: { backgroundColor: lightTheme.button.transparent.background },
60
+ disabled: { backgroundColor: lightTheme.status.default },
61
+ },
62
+ border: {
63
+ ghost: { borderColor: lightTheme.button.ghost.border, borderWidth: 1 },
64
+ },
65
+ shadow: {
66
+ button: shadows.button,
67
+ },
68
+ ...rounded,
69
+ ...padding,
70
+ ...margin,
71
+ },
72
+ selectors: {
73
+ dark: {
74
+ bg: {
75
+ default: { backgroundColor: darkTheme.background.default },
76
+ primary: { backgroundColor: darkTheme.button.primary.background },
77
+ secondary: { backgroundColor: darkTheme.button.secondary.background },
78
+ tertiary: { backgroundColor: darkTheme.button.tertiary.background },
79
+ ghost: { backgroundColor: darkTheme.button.ghost.background },
80
+ transparent: { backgroundColor: darkTheme.button.transparent.background },
81
+ disabled: { backgroundColor: darkTheme.status.default },
82
+ },
83
+ },
84
+ },
85
+ });
86
+ export const Button = {
87
+ Container,
88
+ ScaleOnPressContainer,
89
+ Text,
90
+ };
91
+ const lightHighlightColorMap = {
92
+ disabled: 'transparent',
93
+ default: lightTheme.background.secondary,
94
+ primary: lightTheme.background.tertiary,
95
+ secondary: lightTheme.background.quaternary,
96
+ tertiary: palette.light.gray[600],
97
+ ghost: lightTheme.background.tertiary,
98
+ transparent: lightTheme.background.secondary,
99
+ };
100
+ const darkHighlightColorMap = {
101
+ disabled: 'transparent',
102
+ default: darkTheme.background.secondary,
103
+ primary: darkTheme.background.tertiary,
104
+ secondary: darkTheme.background.quaternary,
105
+ tertiary: palette.dark.gray[600],
106
+ ghost: darkTheme.background.tertiary,
107
+ transparent: darkTheme.background.secondary,
108
+ };
109
+ const highlightColorMap = {
110
+ dark: darkHighlightColorMap,
111
+ light: lightHighlightColorMap,
112
+ };
113
+ function ScaleOnPressContainer({ minScale = 0.975, ...props }) {
114
+ const theme = useColorScheme();
115
+ const animatedValue = React.useRef(new Animated.Value(0));
116
+ const [isPressing, setIsPressing] = React.useState(false);
117
+ const onPressIn = React.useCallback(() => {
118
+ setIsPressing(true);
119
+ Animated.spring(animatedValue.current, {
120
+ toValue: 1,
121
+ stiffness: 1000,
122
+ damping: 500,
123
+ mass: 3,
124
+ overshootClamping: true,
125
+ useNativeDriver: true,
126
+ }).start();
127
+ }, []);
128
+ const onPressOut = React.useCallback(() => {
129
+ setIsPressing(false);
130
+ Animated.spring(animatedValue.current, {
131
+ toValue: 0,
132
+ stiffness: 1000,
133
+ damping: 500,
134
+ mass: 3,
135
+ overshootClamping: true,
136
+ useNativeDriver: true,
137
+ }).start();
138
+ }, []);
139
+ const scale = animatedValue.current.interpolate({
140
+ inputRange: [0, 1],
141
+ outputRange: [1, minScale],
142
+ });
143
+ const scaleStyle = { transform: [{ scale }] };
144
+ let backgroundColor = 'transparent';
145
+ if (props.bg && isPressing && theme != null) {
146
+ backgroundColor = highlightColorMap[theme][props.bg];
147
+ }
148
+ const underlayStyle = {
149
+ backgroundColor,
150
+ };
151
+ return (React.createElement(Container, { onPressIn: onPressIn, onPressOut: onPressOut, ...props, style: [scaleStyle] },
152
+ React.createElement(Animated.View, { style: underlayStyle }, props.children)));
153
+ }
154
+ //# sourceMappingURL=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AAC,CAAC;KACtD;IAED,MAAM,aAAa,GAAG;QACpB,eAAe;KAChB,CAAC;IAEF,OAAO,CACL,oBAAC,SAAS,IAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,KAAM,KAAK,EAAE,KAAK,EAAE,CAAC,UAAU,CAAC;QACrF,oBAAC,QAAQ,CAAC,IAAI,IAAC,KAAK,EAAE,aAAa,IAAG,KAAK,CAAC,QAAQ,CAAiB,CAC3D,CACb,CAAC;AACJ,CAAC","sourcesContent":["import { lightTheme, darkTheme, borderRadius, shadows, palette } from '@expo/styleguide-native';\nimport * as React from 'react';\nimport { Pressable as RNPressable, Text as RNText, Animated, useColorScheme } from 'react-native';\nimport { create } from 'react-native-primitives';\n\nimport { rounded, margin, padding, text } from './theme';\n\nconst AnimatedPressable = Animated.createAnimatedComponent(RNPressable);\n\nconst Text = create(RNText, {\n base: {\n fontWeight: '400',\n color: lightTheme.text.default,\n fontSize: 16,\n },\n\n props: {\n accessibilityRole: 'text',\n },\n\n variants: {\n ...text,\n\n color: {\n primary: { color: lightTheme.button.primary.foreground },\n secondary: { color: lightTheme.button.secondary.foreground },\n tertiary: { color: lightTheme.button.tertiary.foreground },\n ghost: { color: lightTheme.button.ghost.foreground },\n transparent: { color: lightTheme.button.transparent.foreground },\n default: { color: lightTheme.text.default },\n },\n },\n\n selectors: {\n dark: {\n base: {\n color: darkTheme.text.default,\n },\n\n color: {\n primary: { color: darkTheme.button.primary.foreground },\n secondary: { color: darkTheme.button.secondary.foreground },\n tertiary: { color: darkTheme.button.tertiary.foreground },\n ghost: { color: darkTheme.button.ghost.foreground },\n transparent: { color: darkTheme.button.transparent.foreground },\n default: { color: darkTheme.text.default },\n },\n },\n },\n});\n\nconst Container = create(AnimatedPressable, {\n base: {\n overflow: 'hidden',\n borderRadius: borderRadius.medium,\n },\n\n props: {\n accessibilityRole: 'button',\n android_disableSound: true,\n },\n\n variants: {\n bg: {\n default: { backgroundColor: lightTheme.background.default },\n primary: { backgroundColor: lightTheme.button.primary.background },\n secondary: { backgroundColor: lightTheme.button.secondary.background },\n tertiary: { backgroundColor: lightTheme.button.tertiary.background },\n ghost: { backgroundColor: lightTheme.button.ghost.background },\n transparent: { backgroundColor: lightTheme.button.transparent.background },\n disabled: { backgroundColor: lightTheme.status.default },\n },\n\n border: {\n ghost: { borderColor: lightTheme.button.ghost.border, borderWidth: 1 },\n },\n\n shadow: {\n button: shadows.button,\n },\n\n ...rounded,\n ...padding,\n ...margin,\n },\n\n selectors: {\n dark: {\n bg: {\n default: { backgroundColor: darkTheme.background.default },\n primary: { backgroundColor: darkTheme.button.primary.background },\n secondary: { backgroundColor: darkTheme.button.secondary.background },\n tertiary: { backgroundColor: darkTheme.button.tertiary.background },\n ghost: { backgroundColor: darkTheme.button.ghost.background },\n transparent: { backgroundColor: darkTheme.button.transparent.background },\n disabled: { backgroundColor: darkTheme.status.default },\n },\n },\n },\n});\n\nexport const Button = {\n Container,\n ScaleOnPressContainer,\n Text,\n};\n\ntype ScalingPressableProps = {\n minScale?: number;\n};\n\ntype NoOptionals<T> = {\n [P in keyof T]-?: T[P];\n};\n\ntype ContainerProps = React.ComponentProps<typeof Container>;\ntype ContainerBackgroundColors = NoOptionals<ContainerProps>['bg'];\n\nconst lightHighlightColorMap: Record<ContainerBackgroundColors, string> = {\n disabled: 'transparent',\n default: lightTheme.background.secondary,\n primary: lightTheme.background.tertiary,\n secondary: lightTheme.background.quaternary,\n tertiary: palette.light.gray[600],\n ghost: lightTheme.background.tertiary,\n transparent: lightTheme.background.secondary,\n};\n\nconst darkHighlightColorMap: Record<ContainerBackgroundColors, string> = {\n disabled: 'transparent',\n default: darkTheme.background.secondary,\n primary: darkTheme.background.tertiary,\n secondary: darkTheme.background.quaternary,\n tertiary: palette.dark.gray[600],\n ghost: darkTheme.background.tertiary,\n transparent: darkTheme.background.secondary,\n};\n\nconst highlightColorMap = {\n dark: darkHighlightColorMap,\n light: lightHighlightColorMap,\n};\n\nfunction ScaleOnPressContainer({\n minScale = 0.975,\n ...props\n}: React.ComponentProps<typeof Container> & ScalingPressableProps) {\n const theme = useColorScheme();\n const animatedValue = React.useRef(new Animated.Value(0));\n const [isPressing, setIsPressing] = React.useState(false);\n\n const onPressIn = React.useCallback(() => {\n setIsPressing(true);\n\n Animated.spring(animatedValue.current, {\n toValue: 1,\n stiffness: 1000,\n damping: 500,\n mass: 3,\n overshootClamping: true,\n useNativeDriver: true,\n }).start();\n }, []);\n\n const onPressOut = React.useCallback(() => {\n setIsPressing(false);\n Animated.spring(animatedValue.current, {\n toValue: 0,\n stiffness: 1000,\n damping: 500,\n mass: 3,\n overshootClamping: true,\n useNativeDriver: true,\n }).start();\n }, []);\n\n const scale = animatedValue.current.interpolate({\n inputRange: [0, 1],\n outputRange: [1, minScale],\n });\n\n const scaleStyle = { transform: [{ scale }] };\n\n let backgroundColor = 'transparent';\n\n if (props.bg && isPressing && theme != null) {\n backgroundColor = highlightColorMap[theme][props.bg];\n }\n\n const underlayStyle = {\n backgroundColor,\n };\n\n return (\n <Container onPressIn={onPressIn} onPressOut={onPressOut} {...props} style={[scaleStyle]}>\n <Animated.View style={underlayStyle}>{props.children}</Animated.View>\n </Container>\n );\n}\n"]}
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const Image: import("react").ForwardRefExoticComponent<import("react-native").ImageProps & {
3
+ children?: import("react").ReactNode;
4
+ } & {
5
+ size?: "small" | "large" | "tiny" | "xl" | undefined;
6
+ rounded?: "small" | "medium" | "large" | "full" | "huge" | undefined;
7
+ } & import("react").RefAttributes<import("react-native").ImageProps>>;
package/build/Image.js ADDED
@@ -0,0 +1,37 @@
1
+ import { borderRadius, iconSize } from '@expo/styleguide-native';
2
+ import { Image as RNImage } from 'react-native';
3
+ import { create } from 'react-native-primitives';
4
+ import { scale } from './theme';
5
+ export const Image = create(RNImage, {
6
+ base: {
7
+ resizeMode: 'cover',
8
+ },
9
+ variants: {
10
+ size: {
11
+ tiny: {
12
+ height: scale.small,
13
+ width: scale.small,
14
+ },
15
+ small: {
16
+ height: iconSize.small,
17
+ width: iconSize.small,
18
+ },
19
+ large: {
20
+ height: iconSize.large,
21
+ width: iconSize.large,
22
+ },
23
+ xl: {
24
+ height: scale.xl,
25
+ width: scale.xl,
26
+ },
27
+ },
28
+ rounded: {
29
+ small: { borderRadius: borderRadius.small },
30
+ medium: { borderRadius: borderRadius.medium },
31
+ large: { borderRadius: borderRadius.large },
32
+ huge: { borderRadius: borderRadius.huge },
33
+ full: { borderRadius: 99999 },
34
+ },
35
+ },
36
+ });
37
+ //# sourceMappingURL=Image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.js","sourceRoot":"","sources":["../src/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,EAAE;IACnC,IAAI,EAAE;QACJ,UAAU,EAAE,OAAO;KACpB;IAED,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,IAAI,EAAE;gBACJ,MAAM,EAAE,KAAK,CAAC,KAAK;gBACnB,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB;YACD,KAAK,EAAE;gBACL,MAAM,EAAE,QAAQ,CAAC,KAAK;gBACtB,KAAK,EAAE,QAAQ,CAAC,KAAK;aACtB;YAED,KAAK,EAAE;gBACL,MAAM,EAAE,QAAQ,CAAC,KAAK;gBACtB,KAAK,EAAE,QAAQ,CAAC,KAAK;aACtB;YAED,EAAE,EAAE;gBACF,MAAM,EAAE,KAAK,CAAC,EAAE;gBAChB,KAAK,EAAE,KAAK,CAAC,EAAE;aAChB;SACF;QAED,OAAO,EAAE;YACP,KAAK,EAAE,EAAE,YAAY,EAAE,YAAY,CAAC,KAAK,EAAE;YAC3C,MAAM,EAAE,EAAE,YAAY,EAAE,YAAY,CAAC,MAAM,EAAE;YAC7C,KAAK,EAAE,EAAE,YAAY,EAAE,YAAY,CAAC,KAAK,EAAE;YAC3C,IAAI,EAAE,EAAE,YAAY,EAAE,YAAY,CAAC,IAAI,EAAE;YACzC,IAAI,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;SAC9B;KACF;CACF,CAAC,CAAC","sourcesContent":["import { borderRadius, iconSize } from '@expo/styleguide-native';\nimport { Image as RNImage } from 'react-native';\nimport { create } from 'react-native-primitives';\n\nimport { scale } from './theme';\n\nexport const Image = create(RNImage, {\n base: {\n resizeMode: 'cover',\n },\n\n variants: {\n size: {\n tiny: {\n height: scale.small,\n width: scale.small,\n },\n small: {\n height: iconSize.small,\n width: iconSize.small,\n },\n\n large: {\n height: iconSize.large,\n width: iconSize.large,\n },\n\n xl: {\n height: scale.xl,\n width: scale.xl,\n },\n },\n\n rounded: {\n small: { borderRadius: borderRadius.small },\n medium: { borderRadius: borderRadius.medium },\n large: { borderRadius: borderRadius.large },\n huge: { borderRadius: borderRadius.huge },\n full: { borderRadius: 99999 },\n },\n },\n});\n"]}
@@ -0,0 +1,31 @@
1
+ /// <reference types="react" />
2
+ export declare const Heading: import("react").ForwardRefExoticComponent<import("react-native").TextProps & {
3
+ children?: import("react").ReactNode;
4
+ } & {
5
+ size?: "small" | "medium" | "large" | undefined;
6
+ align?: "center" | undefined;
7
+ leading?: "large" | undefined;
8
+ type?: "mono" | undefined;
9
+ weight?: "normal" | "bold" | "medium" | "thin" | "extralight" | "light" | "semibold" | "extrabold" | "black" | undefined;
10
+ color?: "primary" | "secondary" | "default" | "error" | "warning" | "success" | undefined;
11
+ } & import("react").RefAttributes<import("react-native").TextProps>>;
12
+ export declare const Text: import("react").ForwardRefExoticComponent<import("react-native").TextProps & {
13
+ children?: import("react").ReactNode;
14
+ } & {
15
+ align?: "center" | undefined;
16
+ size?: "small" | "medium" | "large" | undefined;
17
+ leading?: "large" | undefined;
18
+ type?: "mono" | undefined;
19
+ weight?: "normal" | "bold" | "medium" | "thin" | "extralight" | "light" | "semibold" | "extrabold" | "black" | undefined;
20
+ color?: "primary" | "secondary" | "default" | "error" | "warning" | "success" | undefined;
21
+ } & import("react").RefAttributes<import("react-native").TextProps>>;
22
+ export declare const TextInput: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & {
23
+ children?: import("react").ReactNode;
24
+ } & {
25
+ align?: "center" | undefined;
26
+ size?: "small" | "medium" | "large" | undefined;
27
+ leading?: "large" | undefined;
28
+ type?: "mono" | undefined;
29
+ weight?: "normal" | "bold" | "medium" | "thin" | "extralight" | "light" | "semibold" | "extrabold" | "black" | undefined;
30
+ color?: "primary" | "secondary" | "default" | "error" | "warning" | "success" | undefined;
31
+ } & import("react").RefAttributes<import("react-native").TextInputProps>>;
package/build/Text.js ADDED
@@ -0,0 +1,66 @@
1
+ import { lightTheme } from '@expo/styleguide-native';
2
+ import { Text as RNText, TextInput as RNTextInput } from 'react-native';
3
+ import { create } from 'react-native-primitives';
4
+ import { text, textDark } from './theme';
5
+ export const Heading = create(RNText, {
6
+ base: {
7
+ fontSize: 22,
8
+ lineHeight: 28,
9
+ fontWeight: '600',
10
+ color: lightTheme.text.default,
11
+ },
12
+ props: {
13
+ accessibilityRole: 'header',
14
+ },
15
+ variants: {
16
+ ...text,
17
+ size: {
18
+ small: {
19
+ fontSize: 18,
20
+ lineHeight: 20,
21
+ },
22
+ medium: {
23
+ fontSize: 22,
24
+ lineHeight: 28,
25
+ },
26
+ large: {
27
+ fontSize: 28,
28
+ lineHeight: 32,
29
+ },
30
+ },
31
+ },
32
+ selectors: {
33
+ dark: textDark,
34
+ },
35
+ });
36
+ export const Text = create(RNText, {
37
+ base: {
38
+ fontWeight: 'normal',
39
+ color: lightTheme.text.default,
40
+ fontSize: 16,
41
+ },
42
+ props: {
43
+ accessibilityRole: 'text',
44
+ },
45
+ variants: {
46
+ ...text,
47
+ },
48
+ selectors: {
49
+ dark: textDark,
50
+ },
51
+ });
52
+ export const TextInput = create(RNTextInput, {
53
+ base: {
54
+ fontWeight: 'normal',
55
+ color: lightTheme.text.default,
56
+ fontSize: 16,
57
+ lineHeight: 18,
58
+ },
59
+ variants: {
60
+ ...text,
61
+ },
62
+ selectors: {
63
+ dark: textDark,
64
+ },
65
+ });
66
+ //# sourceMappingURL=Text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.js","sourceRoot":"","sources":["../src/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE;IACpC,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO;KAC/B;IAED,KAAK,EAAE;QACL,iBAAiB,EAAE,QAAQ;KAC5B;IAED,QAAQ,EAAE;QACR,GAAG,IAAI;QAEP,IAAI,EAAE;YACJ,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,EAAE;aACf;YACD,MAAM,EAAE;gBACN,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,EAAE;aACf;YACD,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,EAAE;aACf;SACF;KACF;IAED,SAAS,EAAE;QACT,IAAI,EAAE,QAAQ;KACf;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE;IACjC,IAAI,EAAE;QACJ,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO;QAC9B,QAAQ,EAAE,EAAE;KACb;IAED,KAAK,EAAE;QACL,iBAAiB,EAAE,MAAM;KAC1B;IAED,QAAQ,EAAE;QACR,GAAG,IAAI;KACR;IAED,SAAS,EAAE;QACT,IAAI,EAAE,QAAQ;KACf;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,EAAE;IAC3C,IAAI,EAAE;QACJ,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO;QAC9B,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;KACf;IAED,QAAQ,EAAE;QACR,GAAG,IAAI;KACR;IAED,SAAS,EAAE;QACT,IAAI,EAAE,QAAQ;KACf;CACF,CAAC,CAAC","sourcesContent":["import { lightTheme } from '@expo/styleguide-native';\nimport { Text as RNText, TextInput as RNTextInput } from 'react-native';\nimport { create } from 'react-native-primitives';\n\nimport { text, textDark } from './theme';\n\nexport const Heading = create(RNText, {\n base: {\n fontSize: 22,\n lineHeight: 28,\n fontWeight: '600',\n color: lightTheme.text.default,\n },\n\n props: {\n accessibilityRole: 'header',\n },\n\n variants: {\n ...text,\n\n size: {\n small: {\n fontSize: 18,\n lineHeight: 20,\n },\n medium: {\n fontSize: 22,\n lineHeight: 28,\n },\n large: {\n fontSize: 28,\n lineHeight: 32,\n },\n },\n },\n\n selectors: {\n dark: textDark,\n },\n});\n\nexport const Text = create(RNText, {\n base: {\n fontWeight: 'normal',\n color: lightTheme.text.default,\n fontSize: 16,\n },\n\n props: {\n accessibilityRole: 'text',\n },\n\n variants: {\n ...text,\n },\n\n selectors: {\n dark: textDark,\n },\n});\n\nexport const TextInput = create(RNTextInput, {\n base: {\n fontWeight: 'normal',\n color: lightTheme.text.default,\n fontSize: 16,\n lineHeight: 18,\n },\n\n variants: {\n ...text,\n },\n\n selectors: {\n dark: textDark,\n },\n});\n"]}