@croquiscom/pds 8.18.0 → 8.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @croquiscom/pds
2
2
 
3
+ ## 8.19.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 94e23bc: ColorPicker import 오류 수정
8
+
9
+ ## 8.19.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 722d402: ColorPicker 추가
14
+
3
15
  ## 8.18.0
4
16
 
5
17
  ### Minor Changes
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export interface ColorChipProps {
3
+ color?: string;
4
+ displayedColor?: string;
5
+ label?: string;
6
+ selected?: boolean;
7
+ disabled?: boolean;
8
+ onClick: (color: string) => void;
9
+ }
10
+ interface ColorChipInstance {
11
+ focus: () => void;
12
+ }
13
+ export declare const ColorChip: React.ForwardRefExoticComponent<ColorChipProps & React.RefAttributes<ColorChipInstance>>;
14
+ export {};
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import { ColorPickerSize, PresetType } from './types';
3
+ export type ColorPickerLayout = 'custom' | 'preset';
4
+ export interface ColorPickerProps {
5
+ /**
6
+ * hex color code (ex: #FFFFFF)
7
+ */
8
+ value?: string;
9
+ /**
10
+ * @param code hex color code (ex: FFFFFF, #FFFFFF6D)
11
+ */
12
+ onChange(code: string): void;
13
+ disabled?: boolean;
14
+ /**
15
+ * @default medium
16
+ */
17
+ size?: ColorPickerSize;
18
+ /**
19
+ * preset props이 없으면 layout=preset이 적용되지 않습니다.
20
+ * @default custom
21
+ */
22
+ layout?: ColorPickerLayout;
23
+ alpha?: boolean;
24
+ preset?: PresetType[];
25
+ resetText?: string;
26
+ settingText?: string;
27
+ /**
28
+ * 기본값으로 [ZIndexOrder](https://github.com/croquiscom/pds/blob/main/src/styles/zIndex.ts) 규칙을 적용합니다.
29
+ * @default 1035
30
+ */
31
+ zIndex?: number;
32
+ className?: string;
33
+ }
34
+ export declare const ColorPicker: React.FC<ColorPickerProps>;
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { ColorPicker, ColorPickerProps } from './ColorPicker';
3
+ declare const meta: Meta<typeof ColorPicker>;
4
+ export default meta;
5
+ type Story = StoryObj<ColorPickerProps>;
6
+ export declare const Default: Story;
7
+ export declare const State: Story;
@@ -0,0 +1,8 @@
1
+ import React, { ButtonHTMLAttributes } from 'react';
2
+ import { ColorPickerSize } from './types';
3
+ export interface ColorPickerTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
+ color?: string;
5
+ opened?: boolean;
6
+ size?: ColorPickerSize;
7
+ }
8
+ export declare const ColorPickerTrigger: React.ForwardRefExoticComponent<ColorPickerTriggerProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface ControllerProps {
3
+ code?: string;
4
+ support_alpha?: boolean;
5
+ onCodeChange(code: string): void;
6
+ zIndex?: number;
7
+ }
8
+ export declare const Controller: React.FC<ControllerProps>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { HslColor } from 'polished/lib/types/color';
3
+ export interface ControllerProps {
4
+ value?: string;
5
+ onChange(code: HslColor): void;
6
+ }
7
+ export declare const HslController: React.FC<ControllerProps>;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { PresetType } from './types';
3
+ export interface PresetProps {
4
+ /**
5
+ * @desc hex 컬러 코드 (ex: #000000)
6
+ */
7
+ selected_color?: string;
8
+ onSelect(color: string): void;
9
+ preset?: PresetType[];
10
+ }
11
+ export declare const Preset: React.FC<PresetProps>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { RgbColor } from 'polished/lib/types/color';
3
+ export interface ControllerProps {
4
+ value?: string;
5
+ onChange(code: RgbColor): void;
6
+ }
7
+ export declare const RgbController: React.FC<ControllerProps>;
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './ColorPicker';
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ export declare const checker: import("@emotion/utils").SerializedStyles;
3
+ export declare const NoArrowNumberInput: import("@emotion/styled").StyledComponent<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "width" | "size"> & import("../input/InputBase").InputBaseType & import("../../types/common").AriaFocusProps & import("../input/InputAffix").InputAffixProps & import("react").RefAttributes<HTMLInputElement> & {
4
+ theme?: import("@emotion/react").Theme;
5
+ }, {}, {}>;
6
+ export declare const Unit: import("@emotion/styled").StyledComponent<{
7
+ theme?: import("@emotion/react").Theme;
8
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>;
9
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
10
+ export declare const InputContainer: import("@emotion/styled").StyledComponent<{
11
+ theme?: import("@emotion/react").Theme;
12
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>;
13
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,10 @@
1
+ export type ColorPickerSize = 'small' | 'medium';
2
+ export interface PresetType {
3
+ label: string;
4
+ colors: Array<{
5
+ label: string;
6
+ color: string;
7
+ disabled?: boolean;
8
+ displayedColor?: string;
9
+ }>;
10
+ }
@@ -0,0 +1,4 @@
1
+ export declare const toHexCode: (code?: string) => string;
2
+ export declare const toRegular: (code?: string) => string;
3
+ export declare const alphaToHex: (alpha?: number) => string;
4
+ export declare const removeAlpha: (code: string) => string;
@@ -34,3 +34,4 @@ export * from './list-item';
34
34
  export * from './column-view-controller';
35
35
  export * from './chip';
36
36
  export * from './category-selector';
37
+ export * from './color-picker';