Skip to content

Commit

Permalink
type(Color): fix type export issue. (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Feb 17, 2024
1 parent e992882 commit 07f8485
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 20 deletions.
43 changes: 25 additions & 18 deletions packages/color/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
export * from '@uiw/color-convert';

export { default as Alpha } from '@uiw/react-color-alpha';
export { default as Block } from '@uiw/react-color-block';
export { default as Compact } from '@uiw/react-color-compact';
export { default as Chrome } from '@uiw/react-color-chrome';
export { default as Colorful } from '@uiw/react-color-colorful';
export { default as Circle } from '@uiw/react-color-circle';
export { default as EditableInput } from '@uiw/react-color-editable-input';
export { default as EditableInputRGBA } from '@uiw/react-color-editable-input-rgba';
export { default as EditableInputHSLA } from '@uiw/react-color-editable-input-hsla';
export { default as Hue } from '@uiw/react-color-hue';
export { default as Github } from '@uiw/react-color-github';
export { default as Material } from '@uiw/react-color-material';
export { default as Saturation } from '@uiw/react-color-saturation';
export { default as ShadeSlider } from '@uiw/react-color-shade-slider';
export { default as Slider } from '@uiw/react-color-slider';
export { default as Sketch } from '@uiw/react-color-sketch';
export { default as Swatch } from '@uiw/react-color-swatch';
export { default as Wheel } from '@uiw/react-color-wheel';
export { default as Alpha, type AlphaProps, type PointerProps, BACKGROUND_IMG, Pointer } from '@uiw/react-color-alpha';
export { default as Block, type BlockProps } from '@uiw/react-color-block';
export { default as Chrome, type ChromeInputType, type ChromeProps } from '@uiw/react-color-chrome';
export { default as Circle, type CircleProps } from '@uiw/react-color-circle';
export { default as Colorful, type ColorfulProps } from '@uiw/react-color-colorful';
export { default as Compact, type CompactProps } from '@uiw/react-color-compact';
export { default as EditableInput, type EditableInputProps } from '@uiw/react-color-editable-input';
export { default as EditableInputRGBA, type EditableInputRGBAProps } from '@uiw/react-color-editable-input-rgba';
export { default as EditableInputHSLA, type EditableInputHSLAProps } from '@uiw/react-color-editable-input-hsla';
export { default as Github, type GithubProps, type GithubPlacement, type GithubRectRenderProps } from '@uiw/react-color-github';
export { default as Hue, type HueProps } from '@uiw/react-color-hue';
export { default as Material, type MaterialProps } from '@uiw/react-color-material';
export {
default as colorNameToHex,
type ColorKeywords,
colorKeywords,
baseNamed,
colorKeywordsBase,
} from '@uiw/react-color-name';
export { default as Saturation, type SaturationProps } from '@uiw/react-color-saturation';
export { default as ShadeSlider, type ShadeSliderProps } from '@uiw/react-color-shade-slider';
export { default as Sketch, type SketchProps } from '@uiw/react-color-sketch';
export { default as Slider, type SliderProps } from '@uiw/react-color-slider';
export { default as Swatch, type SwatchProps, type SwatchPresetColor, type SwatchRectRenderProps } from '@uiw/react-color-swatch';
export { default as Wheel, type WheelProps } from '@uiw/react-color-wheel';
4 changes: 2 additions & 2 deletions test/convert.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { color, getContrastingColor } from '../packages/color-convert/src';
// HEX
import { hexToHsva, hexToRgba, hsvaToHex, hsvaToHexa } from '../packages/color-convert/src';
import { equalHex } from '../packages/color-convert/src/utils';
import { equalHex } from '../packages/color-convert/src';
// HSLA
import { hsvaToHsla, hslaToHsva, HsvaColor, HslaColor } from '../packages/color-convert/src';
// HSL
Expand All @@ -24,7 +24,7 @@ import { hsvaToHsvaString, hsvaToHslaString, hsvaStringToHsva } from '../package
import { hsvaToHsv } from '../packages/color-convert/src';
// HSV string
import { hsvaToHsvString, hsvStringToHsva } from '../packages/color-convert/src';
import { equalColorString, equalColorObjects, validHex } from '../packages/color-convert/src/utils';
import { equalColorString, equalColorObjects, validHex } from '../packages/color-convert/src';

it('Converts color => getContrastingColor', () => {
expect(getContrastingColor('#d0021b')).toEqual('#ffffff');
Expand Down

0 comments on commit 07f8485

Please sign in to comment.