diff --git a/packages/core/client/src/user/CurrentUser.tsx b/packages/core/client/src/user/CurrentUser.tsx index 6a640085d..fe6213f83 100644 --- a/packages/core/client/src/user/CurrentUser.tsx +++ b/packages/core/client/src/user/CurrentUser.tsx @@ -185,7 +185,7 @@ const useStyles = createStyles(({ css, token }) => { white-space: nowrap; text-overflow: ellipsis; cursor: pointer; - padding: '16px'; + padding: 16px; color: ${token.colorTextHeaderMenu}; `, }; diff --git a/packages/plugins/@hera/plugin-approval-mobile/package.json b/packages/plugins/@hera/plugin-approval-mobile/package.json index 3490376db..919dadd51 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/package.json +++ b/packages/plugins/@hera/plugin-approval-mobile/package.json @@ -10,7 +10,6 @@ "antd": "5.16.1", "antd-mobile": "^5.35.0", "antd-mobile-icons": "^0.3.0", - "classnames": "^2.3.1", "lodash": "4.17.21", "react-i18next": "^11.15.1", "react-router-dom": "6.x" diff --git a/packages/plugins/@hera/plugin-core/src/client/components/context-menu/animateComponent.jsx b/packages/plugins/@hera/plugin-core/src/client/components/context-menu/animateComponent.jsx index d716802a5..451f62b4b 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/context-menu/animateComponent.jsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/context-menu/animateComponent.jsx @@ -1,4 +1,5 @@ import React from 'react'; + import CSSTransition from 'react-transition-group/CSSTransition'; const AnimateComponent = ({ children, isVisible, timeout, className }) => { diff --git a/packages/plugins/@hera/plugin-core/src/client/components/context-menu/contextMenu.jsx b/packages/plugins/@hera/plugin-core/src/client/components/context-menu/contextMenu.jsx index 06b313c1d..9a1e9235f 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/context-menu/contextMenu.jsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/context-menu/contextMenu.jsx @@ -1,9 +1,11 @@ -import React, { useRef, useEffect, useState, useCallback } from 'react'; +import React, { useCallback, useEffect, useRef, useState } from 'react'; + +import cx from 'classnames'; import ReactDOM from 'react-dom'; -import classnames from 'classnames'; -import { registerEvent, callHideEvent } from './registerEvent'; + import AnimateComponent from './animateComponent'; import { throttle } from './helper'; +import { callHideEvent, registerEvent } from './registerEvent'; function ContextMenu({ children, @@ -120,7 +122,7 @@ function ContextMenu({ const ContextComponent = () => (
any; }; diff --git a/packages/plugins/@hera/plugin-core/src/client/components/modal-full-screen/ModalFullScreen.tsx b/packages/plugins/@hera/plugin-core/src/client/components/modal-full-screen/ModalFullScreen.tsx index 3e995f634..69d0371cd 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/modal-full-screen/ModalFullScreen.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/modal-full-screen/ModalFullScreen.tsx @@ -1,6 +1,8 @@ import React from 'react'; +import { ClassNamesArg, css, cx } from '@tachybase/client'; + import ReactDOM from 'react-dom'; -import { cx, css, ClassNamesArg } from '@tachybase/client'; + import { ModalHeader } from './ModalFullScreenChild'; interface ModalFullScreenProps { diff --git a/packages/plugins/@tachybase/plugin-data-source-manager/package.json b/packages/plugins/@tachybase/plugin-data-source-manager/package.json index 78e5b1188..bc543a2eb 100644 --- a/packages/plugins/@tachybase/plugin-data-source-manager/package.json +++ b/packages/plugins/@tachybase/plugin-data-source-manager/package.json @@ -14,7 +14,6 @@ "@tachybase/schema": "workspace:*", "ahooks": "^3.7.2", "antd": "5.16.1", - "classnames": "^2.3.1", "lodash": "4.17.21", "react-i18next": "^11.15.1", "react-router-dom": "^6.11.2", diff --git a/packages/plugins/@tachybase/plugin-data-source-manager/src/client/component/CollectionsManager/components/CollectionName.tsx b/packages/plugins/@tachybase/plugin-data-source-manager/src/client/component/CollectionsManager/components/CollectionName.tsx index b7b1e556d..576b74caa 100644 --- a/packages/plugins/@tachybase/plugin-data-source-manager/src/client/component/CollectionsManager/components/CollectionName.tsx +++ b/packages/plugins/@tachybase/plugin-data-source-manager/src/client/component/CollectionsManager/components/CollectionName.tsx @@ -1,11 +1,10 @@ import React from 'react'; -import { useCollectionRecord } from '@tachybase/client'; +import { cx, useCollectionRecord } from '@tachybase/client'; import { usePrefixCls } from '@tachybase/components'; import { connect, mapProps, mapReadPretty } from '@tachybase/schema'; import { LoadingOutlined } from '@ant-design/icons'; import { Input as AntdInput } from 'antd'; -import cls from 'classnames'; const ReadPretty = (props) => { const prefixCls = usePrefixCls('description-input', props); @@ -13,7 +12,7 @@ const ReadPretty = (props) => { data: { name, tableName }, } = useCollectionRecord() as any; return ( -
+
{name !== tableName ? ( <> {name} ({tableName}) diff --git a/packages/plugins/@tachybase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFieldsTableArray.tsx b/packages/plugins/@tachybase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFieldsTableArray.tsx index ce2760ce4..550fb637b 100644 --- a/packages/plugins/@tachybase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFieldsTableArray.tsx +++ b/packages/plugins/@tachybase/plugin-data-source-manager/src/client/component/MainDataSourceManager/Configuration/CollectionFieldsTableArray.tsx @@ -1,6 +1,7 @@ import React, { useState } from 'react'; import { css, + cx, RecordIndexProvider, RecordProvider, SchemaComponent, @@ -13,7 +14,6 @@ import { import { ArrayField, Field, observer, RecursionField, Schema, useField, useFieldSchema } from '@tachybase/schema'; import { Table, TableColumnProps } from 'antd'; -import { default as classNames } from 'classnames'; import { findIndex } from 'lodash'; import { useTranslation } from 'react-i18next'; @@ -31,7 +31,7 @@ export const components = { cell: (props) => ( = ({ color, onChange, alpha, style }) => { }; return wrapSSR( -
+
{(colorMode === 'HEX' || colorMode === 'RGB') && ( = ({ color, style, className, dark, .. return warpSSR(
= ({ } return wrapSSR( -
+
{selectedTokens && selectedTokens.length > 0 && ( <>
diff --git a/packages/plugins/@tachybase/plugin-theme-editor/src/client/antd-token-previewer/IconSwitch.tsx b/packages/plugins/@tachybase/plugin-theme-editor/src/client/antd-token-previewer/IconSwitch.tsx index b811bea05..0d1cb2fa9 100644 --- a/packages/plugins/@tachybase/plugin-theme-editor/src/client/antd-token-previewer/IconSwitch.tsx +++ b/packages/plugins/@tachybase/plugin-theme-editor/src/client/antd-token-previewer/IconSwitch.tsx @@ -1,6 +1,5 @@ import React from 'react'; - -import classNames from 'classnames'; +import { cx } from '@tachybase/client'; import makeStyle from './utils/makeStyle'; @@ -88,15 +87,15 @@ export default function IconSwitch({ const [wrapSSR, hashId] = useStyle(); return wrapSSR( -
+
{ onChange?.(!leftChecked); }} > - {leftIcon} - {rightIcon} + {leftIcon} + {rightIcon}
, ); diff --git a/packages/plugins/@tachybase/plugin-theme-editor/src/client/antd-token-previewer/ThemeEditor.tsx b/packages/plugins/@tachybase/plugin-theme-editor/src/client/antd-token-previewer/ThemeEditor.tsx index e0252c277..8e2788d1a 100644 --- a/packages/plugins/@tachybase/plugin-theme-editor/src/client/antd-token-previewer/ThemeEditor.tsx +++ b/packages/plugins/@tachybase/plugin-theme-editor/src/client/antd-token-previewer/ThemeEditor.tsx @@ -1,7 +1,7 @@ import React, { forwardRef, useImperativeHandle, useMemo, useState } from 'react'; +import { cx } from '@tachybase/client'; import type { DerivativeFunc } from '@ant-design/cssinjs'; -import classNames from 'classnames'; import { antdComponents } from './component-panel'; import useControlledTheme from './hooks/useControlledTheme'; @@ -116,7 +116,7 @@ const ThemeEditor = forwardRef( return wrapSSR( -
+
({ }, })); -const ThemeSelect: FC = (props) => { +const ThemeSelect = (props: ThemeSelectProps) => { const { onEnabledThemeChange, onShownThemeChange, enabledThemes, shownThemes, themes, showAddTheme } = props; const [wrapSSR, hashId] = useStyle(); @@ -159,7 +159,7 @@ const ThemeSelect: FC = (props) => { ); return wrapSSR( -
+
{shownThemeEntities.map((theme) => ( { @@ -173,7 +173,7 @@ const ThemeSelect: FC = (props) => { ); }} key={theme.key} - className={classNames('previewer-theme-select-tag', { + className={cx('previewer-theme-select-tag', { 'previewer-theme-select-tag-active': enabledThemes.includes(theme.key), })} > @@ -201,7 +201,7 @@ const ThemeSelect: FC = (props) => { placement="bottomRight" trigger={['click']} overlay={} - overlayClassName={classNames('previewer-theme-select-dropdown', hashId)} + overlayClassName={cx('previewer-theme-select-dropdown', hashId)} > diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/components/renderEngineReference.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/components/renderEngineReference.tsx index 3d0c61d82..51c93e100 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/components/renderEngineReference.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/components/renderEngineReference.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import { css, i18n } from '@tachybase/client'; import { evaluators } from '@tachybase/evaluators/client'; -import React from 'react'; export const renderEngineReference = (key: string) => { const engine = evaluators.get(key);