From c671d619855cb0f878709ef0ced9036dd7015c9b Mon Sep 17 00:00:00 2001 From: lobor Date: Fri, 3 Jan 2025 12:42:58 +0100 Subject: [PATCH 1/6] Increase checkbox --- .changeset/famous-goats-try.md | 5 + .../Checkbox/__tests__/Checkbox.spec.tsx | 35 +++ packages/ui/src/forms/Checkbox/index.tsx | 215 +++++++++++++----- packages/ui/src/forms/Checkbox/type.tsx | 36 ++- 4 files changed, 223 insertions(+), 68 deletions(-) create mode 100644 .changeset/famous-goats-try.md create mode 100644 packages/ui/src/forms/Checkbox/__tests__/Checkbox.spec.tsx diff --git a/.changeset/famous-goats-try.md b/.changeset/famous-goats-try.md new file mode 100644 index 00000000..98a0f19a --- /dev/null +++ b/.changeset/famous-goats-try.md @@ -0,0 +1,5 @@ +--- +'@crossed/ui': minor +--- + +Increase checkbox diff --git a/packages/ui/src/forms/Checkbox/__tests__/Checkbox.spec.tsx b/packages/ui/src/forms/Checkbox/__tests__/Checkbox.spec.tsx new file mode 100644 index 00000000..eae0b71b --- /dev/null +++ b/packages/ui/src/forms/Checkbox/__tests__/Checkbox.spec.tsx @@ -0,0 +1,35 @@ +/** + * Copyright (c) Paymium. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root of this projects source tree. + */ + +import { Checkbox } from '../index'; +import { screen, render, fireEvent } from '@crossed/test'; + +describe('Checkbox', () => { + test('Simple render', () => { + const onPress = jest.fn(); + render(Simple); + const checkbox = screen.getByRole('checkbox'); + expect(checkbox).toHaveAttribute('aria-checked', 'false'); + fireEvent.click(checkbox); + expect(checkbox).toHaveAttribute('aria-checked', 'true'); + expect(onPress).toHaveBeenCalled(); + }); + + test('Disabled', () => { + const onPress = jest.fn(); + render( + + Simple + + ); + const checkbox = screen.getByRole('checkbox'); + expect(checkbox).toHaveAttribute('aria-checked', 'false'); + fireEvent.click(checkbox); + expect(checkbox).toHaveAttribute('aria-checked', 'false'); + expect(onPress).not.toHaveBeenCalled(); + }); +}); diff --git a/packages/ui/src/forms/Checkbox/index.tsx b/packages/ui/src/forms/Checkbox/index.tsx index 6732603a..204d4f63 100644 --- a/packages/ui/src/forms/Checkbox/index.tsx +++ b/packages/ui/src/forms/Checkbox/index.tsx @@ -5,13 +5,23 @@ * LICENSE file in the root of this projects source tree. */ -import { useUncontrolled } from '@crossed/core'; -import { composeStyles, createStyles } from '@crossed/styled'; -import { useInteraction } from '@crossed/styled'; +import { + createScope, + useUncontrolled, + withStaticProperties, +} from '@crossed/core'; +import { composeStyles, createStyles, CrossedMethods } from '@crossed/styled'; import { Check } from '@crossed/unicons'; -import { useCallback, useTransition } from 'react'; -import { Pressable, View } from 'react-native'; +import { + forwardRef, + memo, + RefAttributes, + useCallback, + useTransition, +} from 'react'; +import { Pressable, View, ViewProps } from 'react-native'; import { Implementation } from './Implementation'; +import { Text } from '../../typography/Text'; import type { CheckboxComponent } from './type'; const checkboxStyles = createStyles((t) => ({ @@ -23,35 +33,33 @@ const checkboxStyles = createStyles((t) => ({ gap: t.space.md, }, }, + hover: { base: { borderColor: t.colors.border.tertiary } }, + disabled: { + base: { + backgroundColor: t.colors.primary['10'], + borderColor: t.colors.primary['10'], + }, + }, + active: { + base: { borderColor: t.colors.border.tertiary }, + 'web': { + base: { + transition: 'all 0.1s ease', + boxShadow: `0px 0px 0px 2px ${t.colors.border.secondary}`, + }, + }, + }, root: { 'base': { width: 16, height: 16, borderRadius: 4, borderWidth: 1, - // borderColor: t.colors.neutral[500], + borderColor: t.colors.border.secondary, alignItems: 'center', display: 'flex', justifyContent: 'center', - backgroundColor: 'white', - }, - ':hover': { - // borderColor: t.colors.neutral[600], - }, - ':active': { - // borderColor: t.colors.neutral[500], - shadowColor: 'black', - shadowOpacity: 0.1, - elevation: 5, - }, - ':disabled': { - // backgroundColor: t.colors.neutral[300], - // borderColor: t.colors.neutral[300], - }, - 'web': { - ':active': { - // boxShadow: `0px 0px 0px 2px ${t.colors.neutral[300]}`, - }, + backgroundColor: 'transparent', }, }, checked: { @@ -59,63 +67,144 @@ const checkboxStyles = createStyles((t) => ({ borderColor: t.colors.primary.primary, backgroundColor: t.colors.primary.primary, }, - ':active': { + }, + checkedActive: { + base: { borderColor: t.colors.primary.primary, backgroundColor: t.colors.primary.primary, }, }, })); -export const Checkbox: CheckboxComponent = ({ +type CheckboxContext = { checked: boolean }; +const [CheckboxProvider, useCheckboxContext] = createScope({ + checked: false, +}); +type CheckboxStateInteraction = { + active: boolean; + hover: boolean; + focus: boolean; + disabled: boolean; +}; +const [CheckboxInteractionProvider, useStateInteraction] = + createScope({ + active: false, + hover: false, + focus: false, + disabled: false, + }); + +type CheckboxThumbProps = Omit & { + style?: CrossedMethods; +}; +const CheckboxThumb = memo>( + forwardRef((props, ref) => { + const { checked } = useCheckboxContext(); + const { disabled, hover, active } = useStateInteraction(); + + return ( + + {checked && } + + ); + }) +); +CheckboxThumb.displayName = 'Checkbox.Thumb'; + +const CheckboxRoot: CheckboxComponent = ({ children, checked: checkedProps, defaultChecked = false, onChecked, + noThumb, + disabled, + style, + ...props }) => { const [checked, setChecked] = useUncontrolled({ defaultValue: defaultChecked, value: checkedProps, onChange: onChecked, }); - const { props } = useInteraction(); const [, setTransition] = useTransition(); - const handlePress = useCallback(() => { - setTransition(() => { - setChecked(!checked); - }); - }, [setChecked, checked, setTransition]); + const handlePress = useCallback( + (e) => { + props.onPress?.(e); + setTransition(() => { + setChecked(!checked); + }); + }, + [setChecked, checked, setTransition, props.onPress] + ); + + const renderCallback = useCallback( + ({ + pressed, + focused, + hovered, + }: { + pressed?: boolean; + focused?: boolean; + hovered?: boolean; + }) => ( + + + {!noThumb && } + {typeof children === 'string' ? {children} : children} + + ), + [children, checked, setChecked] + ); + return ( - - checkboxStyles.pressable.rnw({ - active: pressed, - hover: hovered, - focus: focused, - }).style - } - > - - + + composeStyles(checkboxStyles.pressable, style).rnw({ + active: pressed, + hover: hovered, + focus: focused, + }).style + } > - {checked && } - - {children} - + {renderCallback} + + ); }; -Checkbox.displayName = 'Checkbox'; +CheckboxRoot.displayName = 'Checkbox'; + +export const Checkbox = withStaticProperties(CheckboxRoot, { + Thumb: CheckboxThumb, +}); diff --git a/packages/ui/src/forms/Checkbox/type.tsx b/packages/ui/src/forms/Checkbox/type.tsx index d960bcb9..d887f5a8 100644 --- a/packages/ui/src/forms/Checkbox/type.tsx +++ b/packages/ui/src/forms/Checkbox/type.tsx @@ -6,12 +6,38 @@ */ import type { ComponentType, PropsWithChildren } from 'react'; +import type { PressableProps } from 'react-native'; +import { CrossedMethods } from '@crossed/styled'; -export type CheckboxProps = PropsWithChildren<{ - checked?: boolean; - defaultChecked?: boolean; - onChecked?: (_c: boolean) => void; -}>; +export type CheckboxProps = Omit & + PropsWithChildren<{ + /** + * if true, checkbox is checked + */ + checked?: boolean; + + /** + * default checked value + */ + defaultChecked?: boolean; + + /** + * Call when checked value change + */ + onChecked?: (_c: boolean) => void; + + /** + * Not show thumb + */ + noThumb?: boolean; + + /** + * If true, checkbox is disable + */ + disabled?: boolean; + + style?: CrossedMethods; + }>; export type ImplementationProps = { checked: boolean; setChecked: (_c: boolean) => void; From d8097473cd535495b1137795307dc6ea1115f8ad Mon Sep 17 00:00:00 2001 From: lobor Date: Fri, 3 Jan 2025 12:43:29 +0100 Subject: [PATCH 2/6] Increase radio --- .changeset/hungry-teachers-travel.md | 5 + packages/ui/src/forms/Radio/Radio.tsx | 230 +++++++++++++----- .../src/forms/Radio/__tests__/Radio.spec.tsx | 33 +++ 3 files changed, 205 insertions(+), 63 deletions(-) create mode 100644 .changeset/hungry-teachers-travel.md create mode 100644 packages/ui/src/forms/Radio/__tests__/Radio.spec.tsx diff --git a/.changeset/hungry-teachers-travel.md b/.changeset/hungry-teachers-travel.md new file mode 100644 index 00000000..e35627bb --- /dev/null +++ b/.changeset/hungry-teachers-travel.md @@ -0,0 +1,5 @@ +--- +'@crossed/ui': minor +--- + +Increase Radio diff --git a/packages/ui/src/forms/Radio/Radio.tsx b/packages/ui/src/forms/Radio/Radio.tsx index 554c9c1c..0952be07 100644 --- a/packages/ui/src/forms/Radio/Radio.tsx +++ b/packages/ui/src/forms/Radio/Radio.tsx @@ -5,10 +5,22 @@ * LICENSE file in the root of this projects source tree. */ -import { useUncontrolled } from '@crossed/core'; -import { composeStyles, createStyles } from '@crossed/styled'; -import { useCallback, useTransition, type PropsWithChildren } from 'react'; -import { Pressable, View } from 'react-native'; +import { + createScope, + useUncontrolled, + withStaticProperties, +} from '@crossed/core'; +import { composeStyles, createStyles, CrossedMethods } from '@crossed/styled'; +import { + forwardRef, + memo, + RefAttributes, + useCallback, + useTransition, + type PropsWithChildren, +} from 'react'; +import { Pressable, PressableProps, View, ViewProps } from 'react-native'; +import { Text } from '../../typography/Text'; const rootStyles = createStyles((t) => ({ default: { @@ -25,23 +37,32 @@ const rootStyles = createStyles((t) => ({ }, }, hover: { base: { borderColor: t.colors.border.tertiary } }, - active: { base: { shadowColor: 'black', shadowOpacity: 0.1, elevation: 5 } }, + active: { + base: { borderColor: t.colors.border.tertiary }, + 'web': { + base: { + transition: 'all 0.1s ease', + boxShadow: `0px 0px 0px 2px ${t.colors.border.secondary}`, + }, + }, + }, disabled: { base: { - backgroundColor: t.colors.primary[1], - borderColor: t.colors.primary[1], + backgroundColor: t.colors.primary['10'], + borderColor: t.colors.primary['10'], }, }, - checked: { base: { borderColor: t.colors.border.primary } }, - checkedActive: { base: { borderColor: t.colors.border.primary } }, + checked: { base: { borderColor: t.colors.primary.primary } }, + checkedActive: { base: { borderColor: t.colors.primary.primary } }, })); -const pressableStyles = createStyles(() => ({ +const pressableStyles = createStyles(({ space }) => ({ pressable: { base: { alignItems: 'center', display: 'flex', flexDirection: 'row', + gap: space.md, }, }, })); @@ -52,73 +73,156 @@ const thumbStyles = createStyles((t) => ({ width: 10, height: 10, borderRadius: 10, - overflow: 'hidden', - backgroundColor: 'white', + backgroundColor: 'transparent', }, }, checked: { - base: { backgroundColor: t.colors.background.primary }, + base: { backgroundColor: t.colors.primary.primary }, }, checkedActive: { - base: { backgroundColor: t.colors.background.primary }, + base: { backgroundColor: t.colors.primary['1'] }, + }, + checkedDisabled: { + base: { backgroundColor: t.colors.neutral['70'] }, }, })); -export const Radio = ({ +type RadioContext = { checked: boolean }; +const [RadioProvider, useRadioContext] = createScope({ + checked: false, +}); + +type RadioStateInteraction = { + active: boolean; + hover: boolean; + disabled: boolean; +}; +const [RadioInteractionProvider, useStateInteraction] = + createScope({ + active: false, + hover: false, + disabled: false, + }); + +type RadioThumbProps = Omit & { + style?: CrossedMethods; +}; +const RadioThumb = memo>( + forwardRef((props, ref) => { + const { active, hover, disabled } = useStateInteraction(); + const { checked } = useRadioContext(); + return ( + + + + ); + }) +); + +type RadioRootProps = Omit & + PropsWithChildren<{ + /** + * if true, radio is checked + */ + checked?: boolean; + + /** + * default checked value + */ + defaultChecked?: boolean; + + /** + * Call when checked value change + */ + onChecked?: (_c: boolean) => void; + + disabled?: boolean; + noThumb?: boolean; + style?: CrossedMethods; + }>; +export const RadioRoot = ({ children, disabled, -}: PropsWithChildren<{ disabled?: boolean }>) => { - const [checked, setChecked] = useUncontrolled({ defaultValue: false }); + checked: checkedProps, + defaultChecked = false, + onChecked, + noThumb, + style, + ...props +}: RadioRootProps) => { + const [checked, setChecked] = useUncontrolled({ + defaultValue: defaultChecked, + value: checkedProps, + onChange: onChecked, + }); const [, setTransition] = useTransition(); - const handlePress = useCallback(() => { - setTransition(() => { - setChecked(!checked); - }); - }, [setChecked, checked, setTransition]); + const handlePress = useCallback( + (e) => { + props.onPress?.(e); + setTransition(() => { + setChecked(!checked); + }); + }, + [setChecked, checked, setTransition, props.onPress] + ); return ( - - composeStyles(pressableStyles.pressable).rnw({ - active: pressed, - hover: hovered, - focus: focused, - }).style - } - > - {({ hovered, pressed }: { hovered?: boolean; pressed: boolean }) => ( - <> - + + composeStyles(pressableStyles.pressable, style).rnw({ + active: pressed, + hover: hovered, + focus: focused, + }).style + } + > + {({ hovered, pressed }: { hovered?: boolean; pressed: boolean }) => ( + - - - {children} - - )} - + {!noThumb && } + {typeof children === 'string' ? {children} : children} + + )} + + ); }; -Radio.displayName = 'Radio'; +RadioRoot.displayName = 'Radio'; + +export const Radio = withStaticProperties(RadioRoot, { Thumb: RadioThumb }); diff --git a/packages/ui/src/forms/Radio/__tests__/Radio.spec.tsx b/packages/ui/src/forms/Radio/__tests__/Radio.spec.tsx new file mode 100644 index 00000000..7336f809 --- /dev/null +++ b/packages/ui/src/forms/Radio/__tests__/Radio.spec.tsx @@ -0,0 +1,33 @@ +/** + * Copyright (c) Paymium. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root of this projects source tree. + */ + +import { Radio } from '../index'; +import { screen, render, fireEvent } from '@crossed/test'; + +describe('Radio', () => { + test('Simple render', () => { + render(Simple); + const radio = screen.getByRole('radio'); + expect(radio).toHaveAttribute('aria-checked', 'false'); + fireEvent.click(radio); + expect(radio).toHaveAttribute('aria-checked', 'true'); + }); + + test('Disabled', () => { + const onPress = jest.fn(); + render( + + Simple + + ); + const radio = screen.getByRole('radio'); + expect(radio).toHaveAttribute('aria-checked', 'false'); + fireEvent.click(radio); + expect(radio).toHaveAttribute('aria-checked', 'false'); + expect(onPress).not.toHaveBeenCalled(); + }); +}); From e4a854ab507b181803529d0a6c22b08864e53883 Mon Sep 17 00:00:00 2001 From: lobor Date: Fri, 3 Jan 2025 12:44:16 +0100 Subject: [PATCH 3/6] Add doc --- .changeset/curly-jeans-care.md | 5 ++++ .../@crossed-ui/Forms/Checkbox.stories.tsx | 30 +++++++++++++++---- .../src/@crossed-ui/Forms/Radio.stories.tsx | 8 +++++ 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 .changeset/curly-jeans-care.md diff --git a/.changeset/curly-jeans-care.md b/.changeset/curly-jeans-care.md new file mode 100644 index 00000000..04f12224 --- /dev/null +++ b/.changeset/curly-jeans-care.md @@ -0,0 +1,5 @@ +--- +'crossed-doc': minor +--- + +add doc checkbox and radio diff --git a/apps/doc/src/@crossed-ui/Forms/Checkbox.stories.tsx b/apps/doc/src/@crossed-ui/Forms/Checkbox.stories.tsx index a5a0b39e..76a44c07 100644 --- a/apps/doc/src/@crossed-ui/Forms/Checkbox.stories.tsx +++ b/apps/doc/src/@crossed-ui/Forms/Checkbox.stories.tsx @@ -20,20 +20,38 @@ const meta: Meta = { defaultChecked: { control: 'boolean' }, }, args: { onChecked: fn() }, + render(e) { + return My label; + }, }; export default meta; type Story = StoryObj; export const Primary: Story = { - args: { - children: 'My label', - }, + args: {}, }; export const DefaultChecked: Story = { - args: { - ...Primary.args, - defaultChecked: true, + args: { ...Primary.args, defaultChecked: true }, +}; + +export const Disabled: Story = { + args: { ...Primary.args, disabled: true }, +}; + +export const NoThumb: Story = { + args: { ...Primary.args, noThumb: true }, +}; + +export const CustomPlacementThumb: Story = { + args: { ...Primary.args, noThumb: true }, + render(e) { + return ( + + My label + + + ); }, }; diff --git a/apps/doc/src/@crossed-ui/Forms/Radio.stories.tsx b/apps/doc/src/@crossed-ui/Forms/Radio.stories.tsx index 006e678c..4da8880f 100644 --- a/apps/doc/src/@crossed-ui/Forms/Radio.stories.tsx +++ b/apps/doc/src/@crossed-ui/Forms/Radio.stories.tsx @@ -28,3 +28,11 @@ export const Primary: Story = { children: 'My label', }, }; + +export const Disabled: Story = { + args: { ...Primary.args, disabled: true }, +}; + +export const DisabledChecked: Story = { + args: { ...Primary.args, disabled: true, defaultChecked: true }, +}; From 8441f9a21db9404e37f11d6f38abb74c1cb1f278 Mon Sep 17 00:00:00 2001 From: lobor Date: Fri, 3 Jan 2025 12:45:07 +0100 Subject: [PATCH 4/6] clean peerdependencies --- .changeset/polite-beds-cross.md | 10 ++++++++++ packages/core/package.json | 4 ++-- packages/loader/package.json | 2 +- packages/next-adapter/package.json | 2 +- packages/primitive/package.json | 6 ++++-- packages/styled/package.json | 8 ++------ packages/ui/package.json | 14 ++++++-------- 7 files changed, 26 insertions(+), 20 deletions(-) create mode 100644 .changeset/polite-beds-cross.md diff --git a/.changeset/polite-beds-cross.md b/.changeset/polite-beds-cross.md new file mode 100644 index 00000000..954f8c65 --- /dev/null +++ b/.changeset/polite-beds-cross.md @@ -0,0 +1,10 @@ +--- +'@crossed/next-adapter': patch +'@crossed/primitive': patch +'@crossed/loader': patch +'@crossed/styled': patch +'@crossed/core': patch +'@crossed/ui': patch +--- + +clean peerdependencies diff --git a/packages/core/package.json b/packages/core/package.json index cbd7eb97..d4fc1b5e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -40,8 +40,8 @@ "typescript": "5.4.2" }, "peerDependencies": { - "react": "^18.3.1", - "react-native": "^0.73.6" + "react": "*", + "react-native": "*" }, "files": [ "lib/", diff --git a/packages/loader/package.json b/packages/loader/package.json index d2948e7a..3a4c14ad 100644 --- a/packages/loader/package.json +++ b/packages/loader/package.json @@ -27,7 +27,7 @@ "typescript": "^5.4.2" }, "peerDependencies": { - "@crossed/styled": "0.14.3", + "@crossed/styled": "*", "@crossed/theme": "workspace:^" }, "dependencies": { diff --git a/packages/next-adapter/package.json b/packages/next-adapter/package.json index df702b21..5f02f7b7 100644 --- a/packages/next-adapter/package.json +++ b/packages/next-adapter/package.json @@ -22,7 +22,7 @@ "type-check": "tsc --noEmit" }, "peerDependencies": { - "react": "18.3.1" + "react": "*" }, "husky": { "hooks": { diff --git a/packages/primitive/package.json b/packages/primitive/package.json index c8e22336..51ea3df8 100644 --- a/packages/primitive/package.json +++ b/packages/primitive/package.json @@ -46,8 +46,6 @@ "tsconfig": "*" }, "dependencies": { - "@crossed/core": "0.8.2", - "@gorhom/portal": "^1.0.14", "@react-native-aria/focus": "^0.2.8", "@react-native-aria/interactions": "^0.2.10", "react-aria": "^3.27.0", @@ -55,6 +53,10 @@ "react-focus-on": "^3.9.2", "react-remove-scroll": "^2.5.6" }, + "peerDependencies": { + "@crossed/core": "*", + "@gorhom/portal": "*" + }, "files": [ "lib/", "src/" diff --git a/packages/styled/package.json b/packages/styled/package.json index 15384183..ee21a9b1 100644 --- a/packages/styled/package.json +++ b/packages/styled/package.json @@ -83,21 +83,17 @@ "@types/jest": "^29.5.13", "@types/node": "^20.14.2", "@types/react": "^18.3.3", - "@types/react-dom": "^18.3.0", "csstype": "3.1.3", "jest-bench": "^29.7.1", "react": "^18.3.1", - "react-dom": "^18.3.1", "react-native": "^0.73.6", "react-native-web": "^0.19.10", "ts-loader": "^9.5.1", "typescript": "^5.4.2" }, "peerDependencies": { - "react": "^18.3.1", - "react-dom": "^18.3.1", - "react-native": "^0.73.6", - "react-native-web": "^0.19.10" + "react": "*", + "react-native": "*" }, "dependencies": { "@crossed/core": "^0.8.2", diff --git a/packages/ui/package.json b/packages/ui/package.json index 8b1e1dba..a31bc6fe 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -74,16 +74,14 @@ "type-check": "tsc --noEmit" }, "peerDependencies": { - "@crossed/build": "*", - "@crossed/core": "0.8.2", - "@crossed/primitive": "1.9.1", - "@crossed/styled": "workspace:^", + "@crossed/core": "*", + "@crossed/primitive": "*", + "@crossed/styled": "*", "@crossed/theme": "workspace:^", "@crossed/unicons": "3.0.1", - "@devvie/bottom-sheet": "0.3.0", - "react-native": "^0.73.6", - "react-native-gesture-handler": "~2.21.2", - "react-native-reanimated": "^3.10.1" + "react-native": "*", + "react-native-gesture-handler": "*", + "react-native-reanimated": "*" }, "devDependencies": { "@crossed/build": "*", From ec9142237787f32f11233e0136cbf9502373b523 Mon Sep 17 00:00:00 2001 From: lobor Date: Fri, 3 Jan 2025 12:47:01 +0100 Subject: [PATCH 5/6] update pnpm lock --- pnpm-lock.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 144777c7..3fe466a6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -540,10 +540,10 @@ importers: packages/primitive: dependencies: '@crossed/core': - specifier: 0.8.2 + specifier: '*' version: link:../core '@gorhom/portal': - specifier: ^1.0.14 + specifier: '*' version: 1.0.14(react-native@0.73.11)(react@18.3.1) '@react-native-aria/focus': specifier: ^0.2.8 @@ -655,9 +655,6 @@ importers: '@types/react': specifier: ^18.3.3 version: 18.3.11 - '@types/react-dom': - specifier: ^18.3.0 - version: 18.3.0 csstype: specifier: 3.1.3 version: 3.1.3 @@ -667,9 +664,6 @@ importers: react: specifier: ^18.3.1 version: 18.3.1 - react-dom: - specifier: ^18.3.1 - version: 18.3.1(react@18.3.1) react-native: specifier: ^0.73.6 version: 0.73.11(@babel/core@7.25.7)(@babel/preset-env@7.25.7)(react@18.3.1) From 62f2b53c3e94ea0605af86c1285accb3d6564d6b Mon Sep 17 00:00:00 2001 From: lobor Date: Fri, 3 Jan 2025 12:51:09 +0100 Subject: [PATCH 6/6] fix issue peer dependencies primitive package --- packages/primitive/package.json | 2 ++ pnpm-lock.yaml | 13 ++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/primitive/package.json b/packages/primitive/package.json index 51ea3df8..56df23c2 100644 --- a/packages/primitive/package.json +++ b/packages/primitive/package.json @@ -32,7 +32,9 @@ }, "devDependencies": { "@crossed/build": "*", + "@crossed/core": "0.8.2", "@crossed/test": "0.13.0", + "@gorhom/portal": "^1.0.14", "@testing-library/jest-dom": "^6.5.0", "@types/jest": "^29.5.13", "@types/react": "^18.3.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3fe466a6..c3f4f61d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -539,12 +539,6 @@ importers: packages/primitive: dependencies: - '@crossed/core': - specifier: '*' - version: link:../core - '@gorhom/portal': - specifier: '*' - version: 1.0.14(react-native@0.73.11)(react@18.3.1) '@react-native-aria/focus': specifier: ^0.2.8 version: 0.2.9(react-native@0.73.11)(react@18.3.1) @@ -567,9 +561,15 @@ importers: '@crossed/build': specifier: '*' version: link:../build + '@crossed/core': + specifier: 0.8.2 + version: link:../core '@crossed/test': specifier: 0.13.0 version: link:../test + '@gorhom/portal': + specifier: ^1.0.14 + version: 1.0.14(react-native@0.73.11)(react@18.3.1) '@testing-library/jest-dom': specifier: ^6.5.0 version: 6.5.0 @@ -3969,7 +3969,6 @@ packages: nanoid: 3.3.7 react: 18.3.1 react-native: 0.73.11(@babel/core@7.25.7)(@babel/preset-env@7.25.7)(react@18.3.1) - dev: false /@gorhom/portal@1.0.14(react-native@0.73.6)(react@18.3.1): resolution: {integrity: sha512-MXyL4xvCjmgaORr/rtryDNFy3kU4qUbKlwtQqqsygd0xX3mhKjOLn6mQK8wfu0RkoE0pBE0nAasRoHua+/QZ7A==}