From bdf8804a8b1923a461bd1f2cee68dc3079539dad Mon Sep 17 00:00:00 2001 From: Brion Date: Tue, 22 Oct 2024 20:06:37 +0530 Subject: [PATCH 1/5] fix(react): fix `Dialog` className composition issue --- packages/react/src/components/Dialog/Dialog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/components/Dialog/Dialog.tsx b/packages/react/src/components/Dialog/Dialog.tsx index 08f69e76..9add530a 100644 --- a/packages/react/src/components/Dialog/Dialog.tsx +++ b/packages/react/src/components/Dialog/Dialog.tsx @@ -56,7 +56,7 @@ const Dialog: ForwardRefExoticComponent = forwardRef( ( {className, ...rest}: DialogProps, ref: Ref, - ): ReactElement => , + ): ReactElement => , ) as ForwardRefExoticComponent; export default Dialog; From 559796f101df6266cd2d85000beb1ff3c72e52cb Mon Sep 17 00:00:00 2001 From: Brion Date: Tue, 22 Oct 2024 20:07:51 +0530 Subject: [PATCH 2/5] fix(react): remove `MuiOutlinedInput` unwanted padding override --- .../react/src/components/TextField/TextField.tsx | 14 +++++++++++--- packages/react/src/theme/default-theme.ts | 7 ------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/react/src/components/TextField/TextField.tsx b/packages/react/src/components/TextField/TextField.tsx index 8211723a..8a47a429 100644 --- a/packages/react/src/components/TextField/TextField.tsx +++ b/packages/react/src/components/TextField/TextField.tsx @@ -175,7 +175,7 @@ const PasswordFieldWithCriteria: ForwardRefExoticComponent = for */ const TextField: OverridableComponent> = forwardRef( ( - {className, id, label, type, InputLabelProps, variant, ...rest}: TextFieldProps, + {className, id, label, type, InputLabelProps, variant, size = 'small', ...rest}: TextFieldProps, ref: Ref, ): ReactElement => { const classes: string = clsx('oxygen-text-field', className); @@ -186,9 +186,17 @@ const TextField: OverridableComponent> = forw {label} {type === TextFieldInputTypes.INPUT_PASSWORD ? ( - + ) : ( - + )} ); diff --git a/packages/react/src/theme/default-theme.ts b/packages/react/src/theme/default-theme.ts index cd05d82f..0202ee17 100644 --- a/packages/react/src/theme/default-theme.ts +++ b/packages/react/src/theme/default-theme.ts @@ -153,13 +153,6 @@ export const generateDefaultThemeOptions = (baseTheme: Theme): RecursivePartial< }, }, }, - MuiOutlinedInput: { - styleOverrides: { - input: { - padding: '0.67857143em 1em', - }, - }, - }, MuiTypography: { defaultProps: { variantMapping: { From ab542a25f82fb694c9a7275d8e4e106fd0d73cab Mon Sep 17 00:00:00 2001 From: Brion Date: Wed, 23 Oct 2024 09:41:02 +0530 Subject: [PATCH 3/5] ci: stop dependencies from version bumps --- examples/multi-brand-identity/package.json | 4 ++-- release/scripts/workspaces.mjs | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/multi-brand-identity/package.json b/examples/multi-brand-identity/package.json index 2341e7f0..54d129c1 100644 --- a/examples/multi-brand-identity/package.json +++ b/examples/multi-brand-identity/package.json @@ -32,8 +32,8 @@ "dependencies": { "@fontsource/inter": "^4.5.14", "@fontsource/montserrat": "^4.5.13", - "@oxygen-ui/primitives": "1.15.1", - "@oxygen-ui/react": "1.15.1", + "@oxygen-ui/primitives": "workspace:*", + "@oxygen-ui/react": "workspace:../../packages/react/dist", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/release/scripts/workspaces.mjs b/release/scripts/workspaces.mjs index 106fa0ff..06b07248 100644 --- a/release/scripts/workspaces.mjs +++ b/release/scripts/workspaces.mjs @@ -336,6 +336,13 @@ export default class WorkspacesPlugin extends Plugin { for (let dependency in dependencies) { if (workspaces.find((w) => w.name === dependency)) { const existingVersion = dependencies[dependency]; + + // ignore workspace dependencies. + // Workaround for https://github.com/wso2/oxygen-ui/issues/297. + if (existingVersion.includes('workspace')) { + return; + } + const replacementVersion = this._buildReplacementDepencencyVersion( existingVersion, newVersion From 677d9f1360ffb9cc2e992f4a26f47caf039f2221 Mon Sep 17 00:00:00 2001 From: Brion Date: Wed, 23 Oct 2024 09:43:24 +0530 Subject: [PATCH 4/5] chore: update lockfile --- pnpm-lock.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 75ffa892..70377937 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -112,11 +112,11 @@ importers: specifier: ^4.5.13 version: 4.5.13 '@oxygen-ui/primitives': - specifier: 1.15.1 + specifier: workspace:* version: link:../../packages/primitives '@oxygen-ui/react': - specifier: 1.15.1 - version: link:../../packages/react + specifier: workspace:../../packages/react/dist + version: link:../../packages/react/dist react: specifier: ^18.2.0 version: 18.2.0 From 046963d10d719c6216b7299f0611283ec4bbb310 Mon Sep 17 00:00:00 2001 From: Brion Date: Wed, 23 Oct 2024 10:07:47 +0530 Subject: [PATCH 5/5] chore(react): update snapshots --- .../__tests__/__snapshots__/Autocomplete.test.tsx.snap | 4 ++-- .../__test__/__snapshots__/OutlinedInput.test.tsx.snap | 4 ++-- .../__snapshots__/PhoneNumberInput.test.tsx.snap | 8 ++++---- .../__tests__/__snapshots__/Select.test.tsx.snap | 4 ++-- .../__tests__/__snapshots__/SignIn.test.tsx.snap | 10 +++++----- .../__test__/__snapshots__/TextField.test.tsx.snap | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/react/src/components/Autocomplete/__tests__/__snapshots__/Autocomplete.test.tsx.snap b/packages/react/src/components/Autocomplete/__tests__/__snapshots__/Autocomplete.test.tsx.snap index c7c23a16..d11b8d49 100644 --- a/packages/react/src/components/Autocomplete/__tests__/__snapshots__/Autocomplete.test.tsx.snap +++ b/packages/react/src/components/Autocomplete/__tests__/__snapshots__/Autocomplete.test.tsx.snap @@ -21,7 +21,7 @@ exports[`Alert should match the snapshot 1`] = ` class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root OxygenTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root" >
diff --git a/packages/react/src/components/PhoneNumberInput/__test__/__snapshots__/PhoneNumberInput.test.tsx.snap b/packages/react/src/components/PhoneNumberInput/__test__/__snapshots__/PhoneNumberInput.test.tsx.snap index 9308fc3d..14fa25cd 100644 --- a/packages/react/src/components/PhoneNumberInput/__test__/__snapshots__/PhoneNumberInput.test.tsx.snap +++ b/packages/react/src/components/PhoneNumberInput/__test__/__snapshots__/PhoneNumberInput.test.tsx.snap @@ -17,13 +17,13 @@ exports[`TextField should match the snapshot 1`] = ` class="oxygen-box oxygen-select-input MuiBox-root css-0" >