@croquiscom/pds 0.18.2 → 0.19.0
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 +10 -0
- package/dist/dropdown/DropdownArrowButton.d.ts +3 -0
- package/dist/dropdown/DropdownInput.d.ts +14 -0
- package/dist/dropdown/DropdownInput.stories.d.ts +8 -0
- package/dist/dropdown/DropdownItem.d.ts +5 -0
- package/dist/dropdown/index.d.ts +1 -0
- package/dist/dropdown/styles.d.ts +3 -0
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DropdownProps } from './Dropdown';
|
|
3
|
+
export interface DropdownInputOption<OptionValue> {
|
|
4
|
+
label: string;
|
|
5
|
+
value: OptionValue;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface DropdownInputProps<OptionValue> extends Omit<DropdownProps<OptionValue>, 'options' | 'keyExtractor' | 'onChange'> {
|
|
9
|
+
onSearch?: (inputValue: string) => void;
|
|
10
|
+
onChange?: (value: OptionValue | undefined) => void;
|
|
11
|
+
options: Array<DropdownInputOption<OptionValue>>;
|
|
12
|
+
keyExtractor?: (item: DropdownInputOption<OptionValue>, index: number) => string | number;
|
|
13
|
+
}
|
|
14
|
+
export declare const DropdownInput: <OptionValue extends string | number>({ className, width, disabled, options, placeholder, value, keyExtractor, onSearch, onChange, }: DropdownInputProps<OptionValue>) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
import { DropdownInput } from './DropdownInput';
|
|
4
|
+
declare const _default: ComponentMeta<(<OptionValue extends string | number>({ className, width, disabled, options, placeholder, value, keyExtractor, onSearch, onChange, }: import("./DropdownInput").DropdownInputProps<OptionValue>) => JSX.Element)>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Base: any;
|
|
7
|
+
export declare const Disabled: any;
|
|
8
|
+
export declare const Controlled: ComponentStory<typeof DropdownInput>;
|
|
@@ -6,5 +6,10 @@ export interface DropdownItemProps extends LiHTMLAttributes<HTMLLIElement> {
|
|
|
6
6
|
* Option 선택 여부
|
|
7
7
|
*/
|
|
8
8
|
selected?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* @default false
|
|
11
|
+
* Option focus 여부
|
|
12
|
+
*/
|
|
13
|
+
focused?: boolean;
|
|
9
14
|
}
|
|
10
15
|
export declare const DropdownItem: React.ForwardRefExoticComponent<DropdownItemProps & React.RefAttributes<HTMLLIElement>>;
|
package/dist/dropdown/index.d.ts
CHANGED