@openpeepshq/rn-components 0.6.1 → 0.6.3
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/package.json +7 -6
- package/src/components/conversations/ConversationMessageBubble.tsx +11 -1
- package/src/components/custom/navigation/side-menu.tsx +2 -1
- package/src/components/icons/index.ts +8 -0
- package/src/components/index.ts +1 -0
- package/src/components/layout/PlusButton.tsx +4 -2
- package/src/components/layout/pageChrome.tsx +2 -0
- package/src/components/navigation/helpers.ts +3 -0
- package/src/components/navigation/main-navigator.tsx +4 -0
- package/src/components/navigation/nativeRouter.tsx +11 -0
- package/src/components/navigation/tab-navigator.tsx +13 -3
- package/src/components/navigation/types/main.ts +6 -0
- package/src/components/navigation/types/tabs.ts +2 -0
- package/src/components/post/CompactReplyParent.tsx +22 -0
- package/src/components/post/FeedPostContent.tsx +4 -0
- package/src/components/post/NewResourceButton.tsx +57 -0
- package/src/components/post/PostDetail.tsx +3 -0
- package/src/components/post/index.ts +1 -0
- package/src/components/post/pieces/PostMenu.tsx +15 -9
- package/src/components/post/post-form/PostTypeSwitcher.tsx +19 -1
- package/src/components/post/post-form/ResourceForm.tsx +241 -0
- package/src/components/post/post-form/index.ts +1 -0
- package/src/components/post/types/index.ts +1 -0
- package/src/components/post/types/resource/FullResource.tsx +177 -0
- package/src/components/resources/ResourceCard.tsx +289 -0
- package/src/components/resources/ResourceLibrary.tsx +371 -0
- package/src/components/resources/index.ts +4 -0
- package/src/global.css +42 -42
- package/src/pages/conversations/Index.tsx +12 -59
- package/src/pages/groups/Show.tsx +19 -1
- package/src/pages/index.ts +3 -0
- package/src/pages/resources/Edit.tsx +72 -0
- package/src/pages/resources/Index.tsx +25 -0
- package/src/pages/resources/New.tsx +55 -0
- package/src/theme/defaults.ts +21 -105
- package/src/theme/utils.ts +15 -9
- package/tailwind.config.js +33 -30
package/tailwind.config.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
const { hairlineWidth } = require('nativewind/theme');
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
/**
|
|
4
|
+
* NOTE: NativeWind v4 does not resolve Tailwind's `<alpha-value>` token,
|
|
5
|
+
* so the `rgb(var(--x) / <alpha-value>)` "channel()" pattern used on web
|
|
6
|
+
* breaks ALL color classes on native. Colors use plain `var(--x)` references
|
|
7
|
+
* instead. Opacity modifiers (`bg-primary/10`) are handled via inline styles
|
|
8
|
+
* in the components that need them (see ConversationMessageBubble).
|
|
9
|
+
*/
|
|
8
10
|
export default {
|
|
9
11
|
// NOTE: Update this to include the paths to all of your component files.
|
|
10
12
|
darkMode: 'class',
|
|
@@ -14,60 +16,61 @@ export default {
|
|
|
14
16
|
theme: {
|
|
15
17
|
extend: {
|
|
16
18
|
colors: {
|
|
17
|
-
'border':
|
|
18
|
-
'input':
|
|
19
|
-
'ring':
|
|
20
|
-
'background':
|
|
21
|
-
'foreground':
|
|
19
|
+
'border': 'var(--border)',
|
|
20
|
+
'input': 'var(--input)',
|
|
21
|
+
'ring': 'var(--ring)',
|
|
22
|
+
'background': 'var(--background)',
|
|
23
|
+
'foreground': 'var(--foreground)',
|
|
22
24
|
'primary': {
|
|
23
|
-
DEFAULT:
|
|
24
|
-
foreground:
|
|
25
|
+
DEFAULT: 'var(--primary)',
|
|
26
|
+
foreground: 'var(--primary-foreground)',
|
|
25
27
|
},
|
|
26
28
|
'secondary': {
|
|
27
|
-
DEFAULT:
|
|
28
|
-
foreground:
|
|
29
|
+
DEFAULT: 'var(--secondary)',
|
|
30
|
+
foreground: 'var(--secondary-foreground)',
|
|
29
31
|
},
|
|
30
32
|
'destructive': {
|
|
31
|
-
DEFAULT:
|
|
32
|
-
foreground:
|
|
33
|
+
DEFAULT: 'var(--destructive)',
|
|
34
|
+
foreground: 'var(--destructive-foreground)',
|
|
33
35
|
},
|
|
34
36
|
'muted': {
|
|
35
|
-
DEFAULT:
|
|
36
|
-
foreground:
|
|
37
|
+
DEFAULT: 'var(--muted)',
|
|
38
|
+
foreground: 'var(--muted-foreground)',
|
|
37
39
|
},
|
|
38
40
|
'accent': {
|
|
39
|
-
DEFAULT:
|
|
40
|
-
foreground:
|
|
41
|
+
DEFAULT: 'var(--accent)',
|
|
42
|
+
foreground: 'var(--accent-foreground)',
|
|
41
43
|
},
|
|
42
44
|
'popover': {
|
|
43
|
-
DEFAULT:
|
|
44
|
-
foreground:
|
|
45
|
+
DEFAULT: 'var(--popover)',
|
|
46
|
+
foreground: 'var(--popover-foreground)',
|
|
45
47
|
},
|
|
46
48
|
'card': {
|
|
47
|
-
DEFAULT:
|
|
48
|
-
foreground:
|
|
49
|
+
DEFAULT: 'var(--card)',
|
|
50
|
+
foreground: 'var(--card-foreground)',
|
|
49
51
|
},
|
|
50
52
|
// `surface` mirrors `muted` (same token on the web preset).
|
|
51
53
|
'surface': {
|
|
52
|
-
DEFAULT:
|
|
53
|
-
foreground:
|
|
54
|
+
DEFAULT: 'var(--muted)',
|
|
55
|
+
foreground: 'var(--muted-foreground)',
|
|
54
56
|
},
|
|
55
|
-
'surface-2':
|
|
56
|
-
'alpha':
|
|
57
|
+
'surface-2': 'var(--surface-2)',
|
|
58
|
+
'alpha': 'var(--alpha)',
|
|
57
59
|
},
|
|
58
60
|
// Override Tailwind's default `borderColor.DEFAULT` so bare `border`/`border-b`
|
|
59
61
|
// utilities follow the theme border color instead of a static gray.
|
|
60
62
|
borderColor: {
|
|
61
|
-
DEFAULT:
|
|
63
|
+
DEFAULT: 'var(--border)',
|
|
62
64
|
},
|
|
63
65
|
borderWidth: {
|
|
64
66
|
hairline: hairlineWidth(),
|
|
65
67
|
},
|
|
66
68
|
borderRadius: {
|
|
67
|
-
button: 'var(--theme-rounded-base)',
|
|
69
|
+
button: 'var(--theme-rounded-base, 9999px)',
|
|
68
70
|
lg: 'var(--theme-rounded-container, 0.5rem)',
|
|
69
71
|
md: 'calc(var(--theme-rounded-container, 0.5rem) - 2px)',
|
|
70
72
|
sm: 'calc(var(--theme-rounded-container, 0.5rem) - 4px)',
|
|
73
|
+
full: '9999px',
|
|
71
74
|
},
|
|
72
75
|
fontFamily: {
|
|
73
76
|
sans: 'var(--theme-font-family-base, system-ui)',
|