@julien-wiegandt/open-ui 0.3.4 → 0.3.8
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/dist/components/dropdown/index.d.ts +39 -0
- package/dist/components/dropdown/style.d.ts +65 -0
- package/dist/index.d.ts +1 -0
- package/dist/open-ui.js +2265 -1987
- package/dist/open-ui.umd.cjs +99 -78
- package/dist/theme/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Color, Radius, Variant } from '../../theme/types';
|
|
3
|
+
import { MarginProps, PaddingProps } from '../common/types';
|
|
4
|
+
import { DropdownSize } from './style';
|
|
5
|
+
export type DropdownOption = {
|
|
6
|
+
key: string;
|
|
7
|
+
label: string;
|
|
8
|
+
data?: any;
|
|
9
|
+
};
|
|
10
|
+
export type DropdownProps = {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
trigger?: "hover" | "click";
|
|
13
|
+
options?: Array<DropdownOption>;
|
|
14
|
+
onSelect?: (option: DropdownOption) => void;
|
|
15
|
+
content?: React.ReactNode;
|
|
16
|
+
placement?: "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "left-top" | "left-bottom" | "right" | "right-top" | "right-bottom";
|
|
17
|
+
gap?: number;
|
|
18
|
+
color?: Color | string;
|
|
19
|
+
variant?: Variant;
|
|
20
|
+
bgcolor?: string;
|
|
21
|
+
radius?: Radius;
|
|
22
|
+
size?: DropdownSize;
|
|
23
|
+
zIndex?: number;
|
|
24
|
+
} & MarginProps & PaddingProps & Omit<React.HTMLAttributes<HTMLDivElement>, "content">;
|
|
25
|
+
export declare const Dropdown: React.ForwardRefExoticComponent<{
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
trigger?: "hover" | "click";
|
|
28
|
+
options?: Array<DropdownOption>;
|
|
29
|
+
onSelect?: (option: DropdownOption) => void;
|
|
30
|
+
content?: React.ReactNode;
|
|
31
|
+
placement?: "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "left-top" | "left-bottom" | "right" | "right-top" | "right-bottom";
|
|
32
|
+
gap?: number;
|
|
33
|
+
color?: Color | string;
|
|
34
|
+
variant?: Variant;
|
|
35
|
+
bgcolor?: string;
|
|
36
|
+
radius?: Radius;
|
|
37
|
+
size?: DropdownSize;
|
|
38
|
+
zIndex?: number;
|
|
39
|
+
} & MarginProps & PaddingProps & Omit<React.HTMLAttributes<HTMLDivElement>, "content"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Color, Radius, Variant } from '../../theme/types';
|
|
2
|
+
export type DropdownSize = "sm" | "md" | "lg";
|
|
3
|
+
export type StyledDropdownContainerProps = {
|
|
4
|
+
color: Color | string;
|
|
5
|
+
variant: Variant;
|
|
6
|
+
bgcolor?: string;
|
|
7
|
+
radius?: Radius;
|
|
8
|
+
size: DropdownSize;
|
|
9
|
+
};
|
|
10
|
+
export declare const StyledDropdownContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<{
|
|
11
|
+
elevation?: import('../..').Elevation;
|
|
12
|
+
direction?: import('../flex').FlexDirection;
|
|
13
|
+
gap?: string | number;
|
|
14
|
+
align?: import('../flex').FlexAlign;
|
|
15
|
+
justify?: import('../flex').FlexJustify;
|
|
16
|
+
wrap?: import('../flex').FlexWrap;
|
|
17
|
+
width?: string;
|
|
18
|
+
height?: string;
|
|
19
|
+
minWidth?: string;
|
|
20
|
+
minheight?: string;
|
|
21
|
+
hoverstyle?: import('styled-components/dist/types').Styles<object>;
|
|
22
|
+
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>, StyledDropdownContainerProps>> & string & Omit<import('react').ForwardRefExoticComponent<{
|
|
23
|
+
elevation?: import('../..').Elevation;
|
|
24
|
+
direction?: import('../flex').FlexDirection;
|
|
25
|
+
gap?: string | number;
|
|
26
|
+
align?: import('../flex').FlexAlign;
|
|
27
|
+
justify?: import('../flex').FlexJustify;
|
|
28
|
+
wrap?: import('../flex').FlexWrap;
|
|
29
|
+
width?: string;
|
|
30
|
+
height?: string;
|
|
31
|
+
minWidth?: string;
|
|
32
|
+
minheight?: string;
|
|
33
|
+
hoverstyle?: import('styled-components/dist/types').Styles<object>;
|
|
34
|
+
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
|
|
35
|
+
export type StyledDropdownOptionProps = {
|
|
36
|
+
color: Color | string;
|
|
37
|
+
variant: Variant;
|
|
38
|
+
size: DropdownSize;
|
|
39
|
+
radius?: Radius;
|
|
40
|
+
};
|
|
41
|
+
export declare const StyledDropdownOption: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<{
|
|
42
|
+
elevation?: import('../..').Elevation;
|
|
43
|
+
direction?: import('../flex').FlexDirection;
|
|
44
|
+
gap?: string | number;
|
|
45
|
+
align?: import('../flex').FlexAlign;
|
|
46
|
+
justify?: import('../flex').FlexJustify;
|
|
47
|
+
wrap?: import('../flex').FlexWrap;
|
|
48
|
+
width?: string;
|
|
49
|
+
height?: string;
|
|
50
|
+
minWidth?: string;
|
|
51
|
+
minheight?: string;
|
|
52
|
+
hoverstyle?: import('styled-components/dist/types').Styles<object>;
|
|
53
|
+
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>, StyledDropdownOptionProps>> & string & Omit<import('react').ForwardRefExoticComponent<{
|
|
54
|
+
elevation?: import('../..').Elevation;
|
|
55
|
+
direction?: import('../flex').FlexDirection;
|
|
56
|
+
gap?: string | number;
|
|
57
|
+
align?: import('../flex').FlexAlign;
|
|
58
|
+
justify?: import('../flex').FlexJustify;
|
|
59
|
+
wrap?: import('../flex').FlexWrap;
|
|
60
|
+
width?: string;
|
|
61
|
+
height?: string;
|
|
62
|
+
minWidth?: string;
|
|
63
|
+
minheight?: string;
|
|
64
|
+
hoverstyle?: import('styled-components/dist/types').Styles<object>;
|
|
65
|
+
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './components/button';
|
|
|
2
2
|
export * from './components/checkbox';
|
|
3
3
|
export * from './components/chip';
|
|
4
4
|
export * from './components/divider';
|
|
5
|
+
export * from './components/dropdown';
|
|
5
6
|
export * from './components/flex';
|
|
6
7
|
export * from './components/icons';
|
|
7
8
|
export * from './components/image';
|