@julien-wiegandt/open-ui 0.3.4 → 0.3.9
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/common/index.d.ts +1 -0
- package/dist/components/divider/index.d.ts +3 -2
- package/dist/components/dropdown/index.d.ts +39 -0
- package/dist/components/dropdown/style.d.ts +73 -0
- package/dist/components/flex/index.d.ts +5 -1
- package/dist/components/modal/index.d.ts +4 -0
- package/dist/components/popover/style.d.ts +4 -0
- package/dist/components/toast/style.d.ts +4 -0
- package/dist/components/tooltip/style.d.ts +4 -0
- package/dist/components/utils/use-auto-contrast-color.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/llm-docs/index.d.ts +1 -0
- package/dist/open-ui.js +3276 -2636
- package/dist/open-ui.umd.cjs +379 -96
- package/dist/theme/create-theme.d.ts +2 -0
- package/dist/theme/types.d.ts +11 -0
- package/dist/theme/utils/colors.d.ts +4 -0
- package/package.json +1 -1
|
@@ -3,3 +3,4 @@ export declare const toRem: (value: number | string) => string;
|
|
|
3
3
|
export declare const getMarginsCSS: (props: MarginProps) => string;
|
|
4
4
|
export declare const getPaddingCSS: (props: PaddingProps) => string;
|
|
5
5
|
export declare const getScrollbarCSS: () => string;
|
|
6
|
+
export declare const resolveThemeColor: (color: any, theme: any) => any;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { Color } from '../../theme/types';
|
|
1
2
|
export type DividerProps = {
|
|
2
|
-
color?: string;
|
|
3
|
+
color?: Color | string;
|
|
3
4
|
orientation?: "vertical" | "horizontal";
|
|
4
5
|
size?: "sm" | "md" | "lg";
|
|
5
6
|
type?: "solid" | "dotted" | "dashed" | "double";
|
|
6
7
|
} & React.HTMLAttributes<HTMLDivElement>;
|
|
7
8
|
export declare const Divider: import('react').ForwardRefExoticComponent<{
|
|
8
|
-
color?: string;
|
|
9
|
+
color?: Color | string;
|
|
9
10
|
orientation?: "vertical" | "horizontal";
|
|
10
11
|
size?: "sm" | "md" | "lg";
|
|
11
12
|
type?: "solid" | "dotted" | "dashed" | "double";
|
|
@@ -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,73 @@
|
|
|
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
|
+
bgcolor?: Color | string;
|
|
23
|
+
color?: Color | string;
|
|
24
|
+
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>, StyledDropdownContainerProps>> & string & Omit<import('react').ForwardRefExoticComponent<{
|
|
25
|
+
elevation?: import('../..').Elevation;
|
|
26
|
+
direction?: import('../flex').FlexDirection;
|
|
27
|
+
gap?: string | number;
|
|
28
|
+
align?: import('../flex').FlexAlign;
|
|
29
|
+
justify?: import('../flex').FlexJustify;
|
|
30
|
+
wrap?: import('../flex').FlexWrap;
|
|
31
|
+
width?: string;
|
|
32
|
+
height?: string;
|
|
33
|
+
minWidth?: string;
|
|
34
|
+
minheight?: string;
|
|
35
|
+
hoverstyle?: import('styled-components/dist/types').Styles<object>;
|
|
36
|
+
bgcolor?: Color | string;
|
|
37
|
+
color?: Color | string;
|
|
38
|
+
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
|
|
39
|
+
export type StyledDropdownOptionProps = {
|
|
40
|
+
color: Color | string;
|
|
41
|
+
variant: Variant;
|
|
42
|
+
size: DropdownSize;
|
|
43
|
+
radius?: Radius;
|
|
44
|
+
};
|
|
45
|
+
export declare const StyledDropdownOption: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<{
|
|
46
|
+
elevation?: import('../..').Elevation;
|
|
47
|
+
direction?: import('../flex').FlexDirection;
|
|
48
|
+
gap?: string | number;
|
|
49
|
+
align?: import('../flex').FlexAlign;
|
|
50
|
+
justify?: import('../flex').FlexJustify;
|
|
51
|
+
wrap?: import('../flex').FlexWrap;
|
|
52
|
+
width?: string;
|
|
53
|
+
height?: string;
|
|
54
|
+
minWidth?: string;
|
|
55
|
+
minheight?: string;
|
|
56
|
+
hoverstyle?: import('styled-components/dist/types').Styles<object>;
|
|
57
|
+
bgcolor?: Color | string;
|
|
58
|
+
color?: Color | string;
|
|
59
|
+
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>, StyledDropdownOptionProps>> & string & Omit<import('react').ForwardRefExoticComponent<{
|
|
60
|
+
elevation?: import('../..').Elevation;
|
|
61
|
+
direction?: import('../flex').FlexDirection;
|
|
62
|
+
gap?: string | number;
|
|
63
|
+
align?: import('../flex').FlexAlign;
|
|
64
|
+
justify?: import('../flex').FlexJustify;
|
|
65
|
+
wrap?: import('../flex').FlexWrap;
|
|
66
|
+
width?: string;
|
|
67
|
+
height?: string;
|
|
68
|
+
minWidth?: string;
|
|
69
|
+
minheight?: string;
|
|
70
|
+
hoverstyle?: import('styled-components/dist/types').Styles<object>;
|
|
71
|
+
bgcolor?: Color | string;
|
|
72
|
+
color?: Color | string;
|
|
73
|
+
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Elevation } from '../../theme/types';
|
|
1
|
+
import { Color, Elevation } from '../../theme/types';
|
|
2
2
|
import { Styles } from 'styled-components/dist/types';
|
|
3
3
|
import { MarginProps, PaddingProps } from '../common/types';
|
|
4
4
|
export type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
|
|
@@ -17,6 +17,8 @@ export type FlexProps = {
|
|
|
17
17
|
minWidth?: string;
|
|
18
18
|
minheight?: string;
|
|
19
19
|
hoverstyle?: Styles<object>;
|
|
20
|
+
bgcolor?: Color | string;
|
|
21
|
+
color?: Color | string;
|
|
20
22
|
} & MarginProps & PaddingProps & Omit<React.HTMLAttributes<HTMLDivElement>, "content">;
|
|
21
23
|
export declare const Flex: import('react').ForwardRefExoticComponent<{
|
|
22
24
|
elevation?: Elevation;
|
|
@@ -30,4 +32,6 @@ export declare const Flex: import('react').ForwardRefExoticComponent<{
|
|
|
30
32
|
minWidth?: string;
|
|
31
33
|
minheight?: string;
|
|
32
34
|
hoverstyle?: Styles<object>;
|
|
35
|
+
bgcolor?: Color | string;
|
|
36
|
+
color?: Color | string;
|
|
33
37
|
} & MarginProps & PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -14,6 +14,8 @@ export type ModalProps = {
|
|
|
14
14
|
bodyStyle?: React.CSSProperties;
|
|
15
15
|
close?: React.ReactNode;
|
|
16
16
|
closeStyle?: React.CSSProperties;
|
|
17
|
+
bgcolor?: string;
|
|
18
|
+
color?: string;
|
|
17
19
|
} & React.HTMLAttributes<HTMLDivElement>;
|
|
18
20
|
export declare const Modal: React.ForwardRefExoticComponent<{
|
|
19
21
|
isOpen: boolean;
|
|
@@ -29,4 +31,6 @@ export declare const Modal: React.ForwardRefExoticComponent<{
|
|
|
29
31
|
bodyStyle?: React.CSSProperties;
|
|
30
32
|
close?: React.ReactNode;
|
|
31
33
|
closeStyle?: React.CSSProperties;
|
|
34
|
+
bgcolor?: string;
|
|
35
|
+
color?: string;
|
|
32
36
|
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -11,6 +11,8 @@ export declare const StyledPopover: import('styled-components/dist/types').IStyl
|
|
|
11
11
|
minWidth?: string;
|
|
12
12
|
minheight?: string;
|
|
13
13
|
hoverstyle?: import('styled-components/dist/types').Styles<object>;
|
|
14
|
+
bgcolor?: import('../..').Color | string;
|
|
15
|
+
color?: import('../..').Color | string;
|
|
14
16
|
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>, Omit<PopoverStyleProps, "content" | "children" | "body">>> & string & Omit<import('react').ForwardRefExoticComponent<{
|
|
15
17
|
elevation?: import('../..').Elevation;
|
|
16
18
|
direction?: import('../flex').FlexDirection;
|
|
@@ -23,4 +25,6 @@ export declare const StyledPopover: import('styled-components/dist/types').IStyl
|
|
|
23
25
|
minWidth?: string;
|
|
24
26
|
minheight?: string;
|
|
25
27
|
hoverstyle?: import('styled-components/dist/types').Styles<object>;
|
|
28
|
+
bgcolor?: import('../..').Color | string;
|
|
29
|
+
color?: import('../..').Color | string;
|
|
26
30
|
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
|
|
@@ -11,6 +11,8 @@ export declare const StyledToast: import('styled-components/dist/types').IStyled
|
|
|
11
11
|
minWidth?: string;
|
|
12
12
|
minheight?: string;
|
|
13
13
|
hoverstyle?: import('styled-components/dist/types').Styles<object>;
|
|
14
|
+
bgcolor?: import('../..').Color | string;
|
|
15
|
+
color?: import('../..').Color | string;
|
|
14
16
|
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>, Omit<ToastProps, "id">>> & string & Omit<import('react').ForwardRefExoticComponent<{
|
|
15
17
|
elevation?: import('../..').Elevation;
|
|
16
18
|
direction?: import('../flex').FlexDirection;
|
|
@@ -23,4 +25,6 @@ export declare const StyledToast: import('styled-components/dist/types').IStyled
|
|
|
23
25
|
minWidth?: string;
|
|
24
26
|
minheight?: string;
|
|
25
27
|
hoverstyle?: import('styled-components/dist/types').Styles<object>;
|
|
28
|
+
bgcolor?: import('../..').Color | string;
|
|
29
|
+
color?: import('../..').Color | string;
|
|
26
30
|
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
|
|
@@ -19,6 +19,8 @@ export declare const StyledTooltip: import('styled-components/dist/types').IStyl
|
|
|
19
19
|
minWidth?: string;
|
|
20
20
|
minheight?: string;
|
|
21
21
|
hoverstyle?: import('styled-components/dist/types').Styles<object>;
|
|
22
|
+
bgcolor?: Color | string;
|
|
23
|
+
color?: Color | string;
|
|
22
24
|
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>, StyledTooltipProps>> & string & Omit<import('react').ForwardRefExoticComponent<{
|
|
23
25
|
elevation?: import('../..').Elevation;
|
|
24
26
|
direction?: import('../flex').FlexDirection;
|
|
@@ -31,4 +33,6 @@ export declare const StyledTooltip: import('styled-components/dist/types').IStyl
|
|
|
31
33
|
minWidth?: string;
|
|
32
34
|
minheight?: string;
|
|
33
35
|
hoverstyle?: import('styled-components/dist/types').Styles<object>;
|
|
36
|
+
bgcolor?: Color | string;
|
|
37
|
+
color?: Color | string;
|
|
34
38
|
} & import('../common/types').MarginProps & import('../common/types').PaddingProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, "content"> & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
export declare function useAutoContrastColor(elementRef: RefObject<Element | null>, skip?: boolean): string | undefined;
|
|
2
|
+
export declare function useAutoContrastColor(elementRef: RefObject<Element | null>, skip?: boolean, initialBgColor?: string): string | undefined;
|
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';
|
|
@@ -25,3 +26,4 @@ export * from './theme/constants';
|
|
|
25
26
|
export * from './theme/create-theme';
|
|
26
27
|
export * from './theme/index';
|
|
27
28
|
export * from './theme/types';
|
|
29
|
+
export * from './llm-docs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LLM_DOCS: Record<string, string>;
|