diff --git a/.changeset/old-dryers-pull.md b/.changeset/old-dryers-pull.md new file mode 100644 index 00000000..19f0cff2 --- /dev/null +++ b/.changeset/old-dryers-pull.md @@ -0,0 +1,14 @@ +--- +"@design-blocks/unstyled": patch +"tsconfig": patch +"@design-blocks/colors": patch +"@design-blocks/primitives": patch +"@design-blocks/system": patch +"@design-blocks/theme": patch +"@design-blocks/types": patch +"@design-blocks/utils": patch +"@design-blocks/block": patch +"@design-blocks/native": patch +--- + +Fixed export types diff --git a/examples/basic/App.tsx b/examples/basic/App.tsx index 62f1333f..69ae0a90 100644 --- a/examples/basic/App.tsx +++ b/examples/basic/App.tsx @@ -1,7 +1,8 @@ import React from 'react'; -import { StatusBar } from 'expo-status-bar'; import { SafeAreaView, useColorScheme } from 'react-native'; +import { StatusBar } from 'expo-status-bar'; + import { ThemeProvider } from '@design-blocks/native'; import { themes, block } from './blocks.config'; diff --git a/examples/basic/block.d.ts b/examples/basic/block.d.ts index ebe2dcbc..4951eb8b 100644 --- a/examples/basic/block.d.ts +++ b/examples/basic/block.d.ts @@ -1,27 +1,24 @@ -import "@design-blocks/native"; +import '@design-blocks/native'; -import * as RN from "react-native"; +import * as RN from 'react-native'; -import { lightTheme, darkTheme } from "./blocks.config"; +import { lightTheme, darkTheme } from './blocks.config'; -import type { Leaves, LooseAutocomplete } from "@design-blocks/native"; -import type { TailwindCssColors } from "@design-blocks/colors"; +import type { Leaves, LooseAutocomplete, ColorMapProps } from '@design-blocks/native'; type AppTheme = typeof lightTheme.tokens & typeof lightTheme.extendTokens & typeof darkTheme.tokens & typeof darkTheme.extendTokens; -type ColorsAppTheme = AppTheme["colors"]; -type SpacingsCustom = AppTheme["spacings"]; -type RadiiCustom = AppTheme["radii"]; -type FontSizesCustom = AppTheme["fontSizes"]; -type ColorsValueMap = - | LooseAutocomplete> - | Omit; +type ColorsAppTheme = typeof lightTheme.tokens.colors | typeof lightTheme.tokens.colors; +type SpacingsCustom = AppTheme['spacings']; +type RadiiCustom = AppTheme['radii']; +type FontSizesCustom = AppTheme['fontSizes']; +type ColorsValueMap = LooseAutocomplete> | Omit; -declare module "@design-blocks/native" { - export interface Colors extends TailwindCssColors, ColorsAppTheme {} +declare module '@design-blocks/native' { + export interface Colors extends ColorsAppTheme {} export interface Spacings extends SpacingsCustom {} export interface Radii extends RadiiCustom {} export interface FontSizes extends FontSizesCustom {} diff --git a/examples/basic/blocks.config.ts b/examples/basic/blocks.config.ts index d305bde6..36e36067 100644 --- a/examples/basic/blocks.config.ts +++ b/examples/basic/blocks.config.ts @@ -26,10 +26,6 @@ export const darkTheme = { tokens: { colors: { ...colors, - blue: { - ...colors.blue, - 950: 'red', - }, }, }, extendTokens: { diff --git a/examples/basic/src/screens/DS/screen.tsx b/examples/basic/src/screens/DS/screen.tsx deleted file mode 100644 index be077a99..00000000 --- a/examples/basic/src/screens/DS/screen.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { ScrollView, View } from 'react-native'; - -import { Text, Box, Stack } from '@design-blocks/primitives'; - -import { block } from '../../../blocks.config'; - -const ScrollViewBlock = block(ScrollView)(({ theme }) => { - return { - backgroundColor: theme.colors.blue[950], - height: '100%', - }; -}); - -function DSScreen() { - return ( - - - Blocks v0.0.1 - - - - - Box 1 - - - - Box 2 - - - - Box 3 - - - - View - - - - ); -} - -export default DSScreen; diff --git a/examples/basic/src/screens/demo/screen.tsx b/examples/basic/src/screens/demo/screen.tsx deleted file mode 100644 index 50b47bb1..00000000 --- a/examples/basic/src/screens/demo/screen.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { ScrollView } from 'react-native'; - -import { Box, Text } from '@design-blocks/primitives'; - -function DemoScreen() { - return ( - - - demo - - - ); -} - -export default DemoScreen; diff --git a/packages/@blocks-unstyled/src/Button/ButtonContext.tsx b/packages/@blocks-unstyled/src/Button/ButtonContext.tsx index 0d4dc099..5879c2fe 100644 --- a/packages/@blocks-unstyled/src/Button/ButtonContext.tsx +++ b/packages/@blocks-unstyled/src/Button/ButtonContext.tsx @@ -2,6 +2,6 @@ import { createContext } from 'react'; import type { ButtonContextProps } from './Button.types'; -export const ButtonContext = createContext(null as any); +export const ButtonContext = createContext({}); ButtonContext.displayName = 'Block.ButtonContext'; diff --git a/packages/@blocks-unstyled/src/Button/ButtonRoot.tsx b/packages/@blocks-unstyled/src/Button/ButtonRoot.tsx index 102bbbbf..12a115f9 100644 --- a/packages/@blocks-unstyled/src/Button/ButtonRoot.tsx +++ b/packages/@blocks-unstyled/src/Button/ButtonRoot.tsx @@ -32,6 +32,8 @@ export function ButtonRoot({