Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions Composer/.eslintrc.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module.exports = {
extends: ['./.eslintrc.js', 'plugin:react/recommended', 'plugin:security/recommended'],
plugins: ['react-hooks', 'format-message', 'emotion', 'jsx-a11y', 'security'],
plugins: ['react-hooks', 'format-message', '@emotion', 'jsx-a11y', 'security'],
settings: {
react: {
version: '16.9.16',
Expand Down Expand Up @@ -41,7 +41,7 @@ module.exports = {
],

// emotion
'emotion/jsx-import': 'error',
'@emotion/jsx-import': 'error',

// jsx-a11y
// taken from https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/src/index.js
Expand Down
4 changes: 2 additions & 2 deletions Composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@
"@babel/preset-react": "^7.9.4",
"@babel/preset-typescript": "^7.9.0",
"@bfc/eslint-plugin-bfcomposer": "*",
"@emotion/babel-preset-css-prop": "^10.0.27",
"@emotion/babel-preset-css-prop": "^11.2.0",
"@emotion/eslint-plugin": "11.7.0",
"@typescript-eslint/eslint-plugin": "2.34.0",
"@typescript-eslint/parser": "2.34.0",
"concurrently": "^4.1.0",
Expand All @@ -135,7 +136,6 @@
"eslint": "7.0.0",
"eslint-config-prettier": "6.11.0",
"eslint-formatter-github-actions": "^1.0.0",
"eslint-plugin-emotion": "10.0.27",
"eslint-plugin-format-message": "6.2.3",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-jsx-a11y": "6.2.3",
Expand Down
4 changes: 2 additions & 2 deletions Composer/packages/adaptive-flow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"@bfc/extension-client": "*",
"@bfc/shared": "*",
"@bfc/ui-shared": "*",
"@emotion/core": "^10.0.27",
"@emotion/styled": "^10.0.27",
"@emotion/react": "^11.1.3",
"@emotion/styled": "^11.1.3",
"@fluentui/react": "^8.57.1",
"adaptive-expressions": "4.12.0-rc1",
"botbuilder-lg": "4.14.0-dev.391a2ab",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx, css, CacheProvider } from '@emotion/core';
import { jsx, css, CacheProvider } from '@emotion/react';
import createCache from '@emotion/cache';
import React, { useRef, useMemo, useEffect } from 'react';
import isEqual from 'lodash/isEqual';
Expand Down Expand Up @@ -36,7 +36,8 @@ formatMessage.setup({
});

const emotionCache = createCache({
// @ts-ignore
key: 'adaptive-form-cache',
// @ts-expect-error
nonce: window.__nonce__,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import { jsx, css } from '@emotion/react';
import { useRef, useEffect, ReactNode } from 'react';
import { ZoomInfo } from '@bfc/shared';
import { IconButton, IButtonStyles } from '@fluentui/react/lib/Button';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { useContext, useState } from 'react';
import formatMessage from 'format-message';
import { DefinitionSummary } from '@bfc/shared';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import { jsx, css } from '@emotion/react';
import {
IContextualMenuItem,
ContextualMenuItemType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { css, jsx } from '@emotion/core';
import { css, jsx } from '@emotion/react';
import { useRef, useContext, useEffect } from 'react';

import { SelectionContext } from '../contexts/SelectionContext';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { useContext } from 'react';
import formatMessage from 'format-message';
import { TooltipHost } from '@fluentui/react/lib/Tooltip';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* eslint-disable jsx-a11y/click-events-have-key-events */

/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import { jsx, css } from '@emotion/react';
import { useContext, useCallback, useEffect } from 'react';
import { generateActionTitle, PromptTab } from '@bfc/shared';
import { useShellApi } from '@bfc/extension-client';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { FC, Fragment } from 'react';
import get from 'lodash/get';
import { FlowEditorWidgetMap, FlowUISchema, SchemaDefinitions } from '@bfc/extension-client';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { useState, useContext, useMemo, useRef } from 'react';
import isEqual from 'lodash/isEqual';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';

export interface ArrowLineProps {
width: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';

import { ObiColors } from '../constants/ElementColors';
import { DiamondSize } from '../constants/ElementSizes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { Icon } from '@fluentui/react/lib/Icon';

import { IconBrickSize } from '../constants/ElementSizes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { Icon } from '@fluentui/react/lib/Icon';

import { LoopIconSize } from '../constants/ElementSizes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import React, { ReactNode } from 'react';

interface OffsetContainerProps {
interface OffsetContainerProps extends React.HTMLAttributes<HTMLElement> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since v11 emotion removed css property from component props. See here: https://github.dev/emotion-js/emotion/blob/71ca9be3368ddb0a95ef5b2db7a97c67ab440593/packages/react/types/jsx-namespace.d.ts#L33

There are workarounds for turning it on for all components globally, but all of them assume either react@17 or babel transform or a single tsconfig.json.

So, adding generic html element props directly to the props interface seems like a best fix for the issue at this point

offset: { x: number; y: number };
children: ReactNode;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';

export const SVGContainer = ({ children, width = 100, height = 100, hidden = false }) => (
<svg aria-hidden={hidden} css={{ overflow: 'visible', width, height, position: 'absolute', left: 0, top: 0 }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import { jsx, css } from '@emotion/react';
import { WidgetContainerProps, WidgetComponent, useShellApi } from '@bfc/extension-client';

import { CardComment } from './CardComment';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import { jsx, css } from '@emotion/react';
import React from 'react';
import { TruncatedText } from '@bfc/ui-shared';
import { NeutralColors } from '@fluentui/theme';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { FC, ReactNode } from 'react';
import { TextDiv } from '@bfc/ui-shared';
import { WidgetContainerProps } from '@bfc/extension-client';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { css } from '@emotion/core';
import { css } from '@emotion/react';

import { HeaderHeight, StandardSectionHeight, StandardNodeWidth } from '../../constants/ElementSizes';
import { DisabledContainer } from '../styles/DisabledStyle';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { useMemo, FunctionComponent, useContext } from 'react';

import { GraphNode } from '../models/GraphNode';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/** @jsx jsx */
import { useContext } from 'react';
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { generateActionTitle } from '@bfc/shared';
import { WidgetComponent, WidgetContainerProps } from '@bfc/extension-client';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { css } from '@emotion/core';
import { css } from '@emotion/react';
import { ColorlessFontCSS, TruncatedCSS } from '@bfc/ui-shared';

import { StandardNodeWidth, HeaderHeight } from '../../constants/ElementSizes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { Icon as FabricIcon } from '@fluentui/react/lib/Icon';

import { iconCss } from './iconStyles';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { css } from '@emotion/core';
import { css } from '@emotion/react';

export const iconCss = (size: number, color?: string) => {
return css`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { FC, useContext } from 'react';
import get from 'lodash/get';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import React from 'react';
import get from 'lodash/get';
import { LinkBtn, FixedInfo } from '@bfc/ui-shared';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { useMemo, FunctionComponent, useContext } from 'react';
import { WidgetContainerProps } from '@bfc/extension-client';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { FunctionComponent, useMemo, useContext } from 'react';
import { WidgetContainerProps } from '@bfc/extension-client';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { FC, useMemo, useContext } from 'react';
import { PromptTab } from '@bfc/shared';
import { WidgetContainerProps } from '@bfc/extension-client';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { FunctionComponent, useMemo, useContext } from 'react';
import { WidgetContainerProps } from '@bfc/extension-client';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/** @jsx jsx */

import { conceptLabels, getFriendlyName } from '@bfc/shared';
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import { Icon } from '@fluentui/react/lib/Icon';

import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { css } from '@emotion/core';
import { css } from '@emotion/react';

const DisabledColor = '#656565';

Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/adaptive-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@bfc/extension-client": "*",
"@bfc/intellisense": "*",
"@bfc/ui-shared": "*",
"@emotion/core": "^10.0.27",
"@emotion/react": "^11.1.3",
"lodash": "^4.17.19",
"react-error-boundary": "^1.2.5",
"tslib": "2.0.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import { jsx, css } from '@emotion/react';
import React from 'react';
import { FormErrors, JSONSchema7, UIOptions } from '@bfc/extension-client';
import ErrorBoundary from 'react-error-boundary';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { css, jsx } from '@emotion/core';
import { css, jsx } from '@emotion/react';
import { Fragment, useState, useEffect, useLayoutEffect, useRef } from 'react';
import { FontSizes, FontWeights } from '@fluentui/react/lib/Styling';
import { IconButton } from '@fluentui/react/lib/Button';
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/adaptive-form/src/components/Comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import { jsx, css } from '@emotion/react';
import React, { useState, useCallback, useRef, useEffect } from 'react';
import formatMessage from 'format-message';
import { IconMenu } from '@bfc/ui-shared';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import { jsx, css } from '@emotion/react';
import React, { useState, useRef, useEffect } from 'react';
import formatMessage from 'format-message';

Expand Down
Loading