Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/@gluestack style/react@1.0.32 #1593

Merged
merged 54 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
8f09b23
fix: uselayout effect warning
Viraj-10 Dec 12, 2023
91f3929
fix: multiple theme support with css variables
Jan 3, 2024
66306d5
fix: mobile theme resolution issue
Jan 3, 2024
7cf4dca
fix: typing
Jan 3, 2024
9c0bdce
v1.0.31-alpha.1
Jan 3, 2024
4e9c308
v1.0.31-alpha.2
Jan 3, 2024
f26efb7
fix: typing and backward compatibility
Jan 4, 2024
e97c462
fix: color scheme with theme resolver
Jan 4, 2024
44b1618
fix: typing
Jan 4, 2024
a451a69
fix: single config injection in variables
Jan 4, 2024
8a94437
v1.0.31-alpha.3
Jan 4, 2024
a0426e3
Merge pull request #1582 from gluestack/main
Viraj-10 Jan 5, 2024
b19323a
feat: set isCollapsible to true by default
DaminiPandey Jan 5, 2024
b71bde2
Merge pull request #1583 from gluestack/update/accordion-docs
amars29 Jan 5, 2024
2994949
v1.0.31-alpha.11
ankit-tailor Jan 5, 2024
4ed9e0b
feat: babel support for multiple theme
ankit-tailor Jan 8, 2024
dff1a16
Merge branch 'feat/multiple-theme-css-variables' of github.com:gluest…
ankit-tailor Jan 8, 2024
5e5690a
feat: multiple theme typings support
ankit-tailor Jan 8, 2024
d2f0efc
feat: data theme id support for color mode
ankit-tailor Jan 8, 2024
66ab9d3
feat: change color mode to be considered as theme
ankit-tailor Jan 8, 2024
fb133a6
Merge branch 'patch' into feat/multiple-theme-css-variables
ankit-tailor Jan 8, 2024
6384aa2
v1.0.31-alpha.12
ankit-tailor Jan 8, 2024
bd958c0
fix: media queries
ankit-tailor Jan 8, 2024
0c4cd3e
fix: default color mode theme
ankit-tailor Jan 8, 2024
7aef5da
Merge branch 'patch' of github.com:gluestack/gluestack-ui into fix/us…
Viraj-10 Jan 8, 2024
ca685b9
v1.0.31-alpha.13
ankit-tailor Jan 8, 2024
22a309d
fix: useLayoutEffect warning
Viraj-10 Jan 8, 2024
c2ec17f
Merge pull request #1487 from gluestack/fix/uselayout-waring-fix
ankit-tailor Jan 8, 2024
3ea8e1a
fix: expo router example
ankit-tailor Jan 8, 2024
eab34a2
Merge branch 'feat/multiple-theme-css-variables' of github.com:gluest…
ankit-tailor Jan 8, 2024
82aa636
v1.0.31-alpha.14
ankit-tailor Jan 8, 2024
e11e0c5
fix: color mode
ankit-tailor Jan 8, 2024
de52cbf
v1.0.31-alpha.15
ankit-tailor Jan 8, 2024
7e5144c
fix: package json version
ankit-tailor Jan 8, 2024
77aaa5d
fix: config resolution
Jan 8, 2024
cd5dd9f
v1.0.31-alpha.17
ankit-tailor Jan 8, 2024
9667643
fix: non string values
ankit-tailor Jan 8, 2024
7d3dacb
fix: convert token value from unicode
ankit-tailor Jan 9, 2024
91abaa6
fix: forward config to style sheet for inline props
ankit-tailor Jan 9, 2024
9260f8e
fix: refactor code
ankit-tailor Jan 9, 2024
58f6436
v1.0.31-alpha.18
ankit-tailor Jan 9, 2024
a5dd70f
v1.0.31-alpha.19
ankit-tailor Jan 9, 2024
1972acc
v1.0.31-alpha.20
ankit-tailor Jan 9, 2024
02ff3b6
v1.0.31-alpha.21
ankit-tailor Jan 9, 2024
f080e3a
fix: box shaodw issue
ankit-tailor Jan 10, 2024
6851130
feat: theme support for useTheme
ankit-tailor Jan 10, 2024
4ddb132
fix: undefined colormode
ankit-tailor Jan 10, 2024
00050b1
fix: allow any theme
ankit-tailor Jan 10, 2024
a3cd903
feat: default colormode for gui provider
ankit-tailor Jan 10, 2024
268e251
Merge branch 'patch' into feat/multiple-theme-css-variables
ankit-tailor Jan 10, 2024
9285964
fix: version
ankit-tailor Jan 10, 2024
4b79995
Merge branch 'feat/multiple-theme-css-variables' of github.com:gluest…
ankit-tailor Jan 10, 2024
5febbdf
Merge pull request #1578 from gluestack/feat/multiple-theme-css-varia…
ankit-tailor Jan 10, 2024
89fbf78
v1.0.32
ankit-tailor Jan 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ node_modules
# testing
coverage

logs/

# next.js
.next/
.swc/
Expand Down
4 changes: 3 additions & 1 deletion example/expo-router-example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ yarn-error.*
# The following patterns were generated by expo-cli

expo-env.d.ts
# @end expo-cli
# @end expo-cli

.gluestack
156 changes: 11 additions & 145 deletions example/expo-router-example/app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
@@ -1,161 +1,27 @@
import { StyleSheet } from 'react-native';
import React from 'react';
import { Text, View, Pressable } from 'react-native';
import { styled } from '@gluestack-style/react';
import { Link } from 'expo-router';
import { Text, View } from 'react-native';
import { Theme, styled } from '@gluestack-style/react';

const Box = styled(
View,
{
p: '$10',
bg: '$amber500',
},
{
componentName: 'Boxxx',
}
);

const StyledButton = styled(
Pressable,
{
'p': '$3',
'bg': '$blue500',
'variants': {
variant: {
solid: {
':active': {
bg: '$pink500',
},
// '_text': {
// ':active': {
// bg: '$textLight0',
// },
// },
},
},
},

'props': {
variant: 'solid',
},

':disabled': {
opacity: 0.4,
_light: {
bg: '$amber400',
},
p: '$10',
},
{
descendantStyle: ['_text'],
componentName: 'Button',
componentName: 'MyBox',
}
);

const Button = ({ children, onPressIn, onPressOut, ...props }: any) => {
const [active, setActive] = React.useState(false);
return (
<StyledButton
role={props?.role || 'button'}
states={{
active,
}}
onPressIn={() => {
setActive(true);
onPressIn && onPressIn();
}}
onPressOut={() => {
setActive(false);
onPressOut && onPressOut();
}}
{...props}
>
{children}
</StyledButton>
);
};

const linkSx = {
props: {
as: View,
},
};

const WrapperComp = ({ children }: any) => {
console.log('herhehre');

React.useEffect(() => {
console.log('mounted');

return () => {
console.log('unmounted');
};
}, []);

return children;
};
const MyText = styled(Text, {});

export default function TabOneScreen() {
// const [click, setClick] = React.useState(false);
return (
<View style={styles.container}>
<Text style={styles.title}>dlfkvndlnv One</Text>
<Button
// onPressIn={() => setClick(true)}
// onPressOut={() => setClick(false)}
onPress={() => {
console.log('Hello word');
}}
sx={{
_text: {
// color: click ? '$red500' : '$amber500',
':active': {
bg: '$textLight0',
},
},
}}
>
<Box
href="/modal"
sx={{
props: {
as: Link,
},
}}
/>
</Button>
<Button
sx={{
_text: {
':active': {
bg: '$textLight0',
},
},
}}
>
<Box
href="/modal"
as={Link}
sx={{
bg: '$red500',
}}
/>
</Button>
</View>
<>
<Box $light-bg="pink" $t_modern-bg="purple" states={{ hover: true }} />
<MyText fontFamily="$body">hello</MyText>
</>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
gap: 12,
},
title: {
fontSize: 20,
fontWeight: 'bold',
},
separator: {
marginVertical: 30,
height: 1,
width: '80%',
},
});
2 changes: 1 addition & 1 deletion example/expo-router-example/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function RootLayoutNav() {
const colorScheme = useColorScheme();

return (
<StyledProvider config={config.theme}>
<StyledProvider config={config} colorMode="light">
<ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
Expand Down
131 changes: 118 additions & 13 deletions example/expo-router-example/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,128 @@
const path = require('path');
const myBabel = require('../../packages/styled/babel-plugin-styled-resolver/src/index');

module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
[
'module-resolver',
{
alias: {
// For development, we want to alias the library to the source
['@gluestack-style/react']: path.join(
__dirname,
'../../packages/react/src'
),
},
},
],
// Required for expo-router
// [
// myBabel,
// {
// styled: [path.join(__dirname, '../../packages/styled/react/src')],
// },
// ],
process.env.NODE_ENV !== 'production'
? [
'module-resolver',
{
alias: {
'@gluestack-ui/themed': path.join(
__dirname,
'../../packages/themed/src'
),
'@gluestack-ui/config': path.join(
__dirname,
'../../packages/config/src/gluestack-ui.config'
),
'@gluestack-style/react': path.join(
__dirname,
'../../packages/styled/react/src'
),
'@gluestack-style/animation-resolver': path.join(
__dirname,
'../../packages/styled/animation-resolver/src'
),
'@gluestack-style/legend-motion-animation-driver': path.join(
__dirname,
'../../packages/styled/animation-legend-motion-driver/src'
),
'@gluestack-style/babel-plugin-styled-resolver': path.join(
__dirname,
'../../packages/styled/babel-plugin-styled-resolver/src'
),
'@react-native-aria/interactions': path.join(
__dirname,
'../../packages/react-native-aria/interactions/src'
),
'@react-native-aria/button': path.join(
__dirname,
'../../packages/react-native-aria/button/src'
),
'@react-native-aria/checkbox': path.join(
__dirname,
'../../packages/react-native-aria/checkbox/src'
),
'@react-native-aria/combobox': path.join(
__dirname,
'../../packages/react-native-aria/combobox/src'
),
'@react-native-aria/dialog': path.join(
__dirname,
'../../packages/react-native-aria/dialog/src'
),
'@react-native-aria/disclosure': path.join(
__dirname,
'../../packages/react-native-aria/disclosure/src'
),
'@react-native-aria/focus': path.join(
__dirname,
'../../packages/react-native-aria/focus/src'
),
'@react-native-aria/listbox': path.join(
__dirname,
'../../packages/react-native-aria/listbox/src'
),
'@react-native-aria/menu': path.join(
__dirname,
'../../packages/react-native-aria/menu/src'
),
'@react-native-aria/overlays': path.join(
__dirname,
'../../packages/react-native-aria/overlays/src'
),
'@react-native-aria/radio': path.join(
__dirname,
'../../packages/react-native-aria/radio/src'
),
'@react-native-aria/separator': path.join(
__dirname,
'../../packages/react-native-aria/separator/src'
),
'@react-native-aria/slider': path.join(
__dirname,
'../../packages/react-native-aria/slider/src'
),
'@react-native-aria/switch': path.join(
__dirname,
'../../packages/react-native-aria/switch/src'
),
'@react-native-aria/tabs': path.join(
__dirname,
'../../packages/react-native-aria/tabs/src'
),
'@react-native-aria/toggle': path.join(
__dirname,
'../../packages/react-native-aria/toggle/src'
),
'@react-native-aria/tooltip': path.join(
__dirname,
'../../packages/react-native-aria/tooltip/src'
),
'@react-native-aria/utils': path.join(
__dirname,
'../../packages/react-native-aria/utils/src'
),
},
},
]
: [
'babel-plugin-react-docgen-typescript',
{
exclude: 'node_modules',
},
],
'@babel/plugin-transform-modules-commonjs',
'expo-router/babel',
],
};
Expand Down
Loading