Skip to content

Commit

Permalink
fix CJS dynamic import issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank99 committed Dec 14, 2023
1 parent 302c608 commit 53218f8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/itwinui-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itwin/itwinui-react",
"version": "3.1.3-dev.0",
"version": "3.1.3-dev.1",
"author": "Bentley Systems",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -95,7 +95,7 @@
"@types/node": "^18.0.0",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@types/react-transition-group": "^4.4.6",
"@types/react-transition-group": "^4.4.10",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"concurrently": "^5.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import { CSSTransition } from 'react-transition-group';
import type { CSSTransitionProps } from 'react-transition-group/CSSTransition';
import styles from '../../../styles.js';

export const WithCSSTransition = (
props: Partial<CSSTransitionProps> & {
props: Partial<React.ComponentPropsWithoutRef<typeof CSSTransition>> & {
children: JSX.Element;
dimension?: 'height' | 'width';
},
Expand All @@ -24,21 +23,21 @@ export const WithCSSTransition = (
in={visible}
timeout={200}
unmountOnExit={true}
onEnter={(node) => {
onEnter={(node: HTMLElement) => {
node.style[`min${dimensionCamelCase}`] = 'initial';
node.style[dimension] = '0px';
}}
onEntering={(node) => {
onEntering={(node: HTMLElement) => {
node.style[dimension] = `${expandedSize.current}px`;
}}
onEntered={(node) => {
onEntered={(node: HTMLElement) => {
node.style[`min${dimensionCamelCase}`] = '';
node.style[dimension] = '';
}}
onExit={(node) => {
onExit={(node: HTMLElement) => {
node.style[dimension] = `${expandedSize.current}px`;
}}
onExiting={(node) => {
onExiting={(node: HTMLElement) => {
node.style[`min${dimensionCamelCase}`] = 'initial';
node.style[dimension] = '0px';
}}
Expand Down
2 changes: 1 addition & 1 deletion packages/itwinui-react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"sourceMap": false,
"allowJs": false,
"jsx": "react",
"moduleResolution": "node",
"moduleResolution": "NodeNext",
"traceResolution": false,
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
Expand Down
19 changes: 15 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1613,6 +1613,17 @@
resolved "https://registry.yarnpkg.com/@itwin/itwinui-illustrations-react/-/itwinui-illustrations-react-2.1.0.tgz#44ddff71dcd84317cd2cbc52f413a0efe873ce79"
integrity sha512-5JR2A3mZy0d0qwwHpveSG3fsXLheJkO6a0GoWb8NQWw5edNZMRynJg0l3hVw3CHMgaaCGbUoKC77MuG0jWDzuA==

"@itwin/itwinui-react@*":
version "3.1.2"
resolved "https://registry.yarnpkg.com/@itwin/itwinui-react/-/itwinui-react-3.1.2.tgz#02b13d740eb6a60b5103bd982b2a77d9437be9ba"
integrity sha512-MGS+IemlfLudbVkN19tMBnhql9auIZ4VpfY0ffLcK6gt523yFJDWztSUYadqQkypwOW5mVanyvmULWzPzVGCbg==
dependencies:
"@floating-ui/react" "^0.26.3"
classnames "^2.3.2"
react-table "^7.8.0"
react-transition-group "^4.4.5"
tslib "^2.6.0"

"@jest/console@^29.5.0":
version "29.5.0"
resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.5.0.tgz#593a6c5c0d3f75689835f1b3b4688c4f8544cb57"
Expand Down Expand Up @@ -2914,10 +2925,10 @@
dependencies:
"@types/react" "*"

"@types/react-transition-group@^4.4.6":
version "4.4.6"
resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.6.tgz#18187bcda5281f8e10dfc48f0943e2fdf4f75e2e"
integrity sha512-VnCdSxfcm08KjsJVQcfBmhEQAPnLB8G08hAxn39azX1qYBQ/5RVQuoHuKIcfKOdncuaUvEpFKFzEvbtIMsfVew==
"@types/react-transition-group@^4.4.10":
version "4.4.10"
resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.10.tgz#6ee71127bdab1f18f11ad8fb3322c6da27c327ac"
integrity sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==
dependencies:
"@types/react" "*"

Expand Down

0 comments on commit 53218f8

Please sign in to comment.