From 2722850c0d68224c4641725b64938568b87397c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=A2=E6=9E=9C=E6=B1=81?= Date: Thu, 18 May 2023 13:34:06 +0800 Subject: [PATCH] chore: sync @rc-component/color-picker@1.1.0 (#42445) * fix: sync @rc-component/color-picker@1.1.0 * Update package.json Co-authored-by: afc163 --------- Co-authored-by: lijianan <574980606@qq.com> Co-authored-by: afc163 --- components/color-picker/ColorPicker.tsx | 22 ++++++++------------ components/color-picker/ColorPickerPanel.tsx | 4 ++-- components/color-picker/interface.ts | 8 +++++++ package.json | 2 +- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/components/color-picker/ColorPicker.tsx b/components/color-picker/ColorPicker.tsx index 56a7dbf006..697af63d5a 100644 --- a/components/color-picker/ColorPicker.tsx +++ b/components/color-picker/ColorPicker.tsx @@ -1,8 +1,4 @@ -import type { - ColorPickerPanelProps as RcColorPickerPanelProps, - TriggerPlacement, - TriggerType, -} from '@rc-component/color-picker'; +import type { ColorPickerProps as RcColorPickerProps } from '@rc-component/color-picker'; import classNames from 'classnames'; import useMergedState from 'rc-util/lib/hooks/useMergedState'; import type { CSSProperties } from 'react'; @@ -17,15 +13,18 @@ import ColorPickerPanel from './ColorPickerPanel'; import type { Color } from './color'; import ColorTrigger from './components/ColorTrigger'; import useColorState from './hooks/useColorState'; -import type { ColorFormat, ColorPickerBaseProps, PresetsItem } from './interface'; +import type { + ColorFormat, + ColorPickerBaseProps, + PresetsItem, + TriggerPlacement, + TriggerType, +} from './interface'; import useStyle from './style/index'; import { customizePrefixCls, generateColor } from './util'; export interface ColorPickerProps - extends Omit< - RcColorPickerPanelProps, - 'onChange' | 'arrow' | 'value' | 'defaultValue' | 'children' | 'panelRender' - > { + extends Omit { value?: Color | string; defaultValue?: Color | string; children?: React.ReactNode; @@ -37,9 +36,6 @@ export interface ColorPickerProps allowClear?: boolean; presets?: PresetsItem[]; arrow?: boolean | { pointAtCenter: boolean }; - prefixCls?: string; - className?: string; - style?: CSSProperties; styles?: { popup?: CSSProperties }; rootClassName?: string; onOpenChange?: (open: boolean) => void; diff --git a/components/color-picker/ColorPickerPanel.tsx b/components/color-picker/ColorPickerPanel.tsx index ec2fd60e6f..8a4115cdd2 100644 --- a/components/color-picker/ColorPickerPanel.tsx +++ b/components/color-picker/ColorPickerPanel.tsx @@ -1,4 +1,4 @@ -import { ColorPickerPanel as RcColorPickerPanel } from '@rc-component/color-picker'; +import RcColorPicker from '@rc-component/color-picker'; import type { FC } from 'react'; import React from 'react'; import Divider from '../divider'; @@ -41,7 +41,7 @@ const ColorPickerPanel: FC = (props) => { ); return ( -