bianic-ui 2.1.0-beta.4 → 2.2.0-beta.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/dist/cjs/index.js +128 -124
- package/dist/cjs/lib.css +1 -1
- package/dist/cjs/types/components/Alert/Alert.d.ts +4 -1
- package/dist/cjs/types/components/Badge/Badge.d.ts +1 -0
- package/dist/cjs/types/components/Button/buttonConfigs.d.ts +6 -0
- package/dist/cjs/types/components/Forms/Dropdown/DropdownContainer.d.ts +1 -0
- package/dist/cjs/types/components/Menu/MenuContainer.d.ts +1 -0
- package/dist/cjs/types/components/Popover/PropInterface.d.ts +21 -0
- package/dist/cjs/types/components/Popover/index.d.ts +2 -10
- package/dist/cjs/types/components/Tooltip/PropsInterface.d.ts +6 -2
- package/dist/cjs/types/stories/Alert/Alert.stories.d.ts +1 -0
- package/dist/cjs/types/stories/Button/Button.stories.d.ts +1 -0
- package/dist/esm/index.js +128 -124
- package/dist/esm/lib.css +1 -1
- package/dist/esm/types/components/Alert/Alert.d.ts +4 -1
- package/dist/esm/types/components/Badge/Badge.d.ts +1 -0
- package/dist/esm/types/components/Button/buttonConfigs.d.ts +6 -0
- package/dist/esm/types/components/Forms/Dropdown/DropdownContainer.d.ts +1 -0
- package/dist/esm/types/components/Menu/MenuContainer.d.ts +1 -0
- package/dist/esm/types/components/Popover/PropInterface.d.ts +21 -0
- package/dist/esm/types/components/Popover/index.d.ts +2 -10
- package/dist/esm/types/components/Tooltip/PropsInterface.d.ts +6 -2
- package/dist/esm/types/stories/Alert/Alert.stories.d.ts +1 -0
- package/dist/esm/types/stories/Button/Button.stories.d.ts +1 -0
- package/dist/index.d.ts +17 -6
- package/package.json +1 -1
|
@@ -6,9 +6,12 @@ export interface AlertProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
6
6
|
visible?: boolean;
|
|
7
7
|
setVisible?: (arg0: boolean) => void;
|
|
8
8
|
visibleIcon?: boolean;
|
|
9
|
+
visibleMiniIcon?: boolean;
|
|
10
|
+
customIcon?: React.ReactNode;
|
|
11
|
+
customMiniIcon?: React.ReactNode;
|
|
9
12
|
visibleClose?: boolean;
|
|
10
13
|
}
|
|
11
|
-
declare function Alert({ title, caption, variant, visible, setVisible, visibleIcon, visibleClose, children, }: AlertProps): false | React.JSX.Element;
|
|
14
|
+
declare function Alert({ title, caption, variant, visible, setVisible, visibleIcon, visibleClose, customIcon, customMiniIcon, children, }: AlertProps): false | React.JSX.Element;
|
|
12
15
|
declare namespace Alert {
|
|
13
16
|
var defaultProps: {
|
|
14
17
|
title: string;
|
|
@@ -7,6 +7,7 @@ interface BadgeProps extends ComponentPropsWithoutRef<'span'> {
|
|
|
7
7
|
declare function Badge({ type, children, color, isInverted, className, }: BadgeProps): React.JSX.Element;
|
|
8
8
|
declare namespace Badge {
|
|
9
9
|
var defaultProps: {
|
|
10
|
+
type: string;
|
|
10
11
|
isInverted: boolean;
|
|
11
12
|
color: undefined;
|
|
12
13
|
};
|
|
@@ -36,6 +36,12 @@ export declare const iconOnlySizeConfig: {
|
|
|
36
36
|
sm: string;
|
|
37
37
|
tn: string;
|
|
38
38
|
};
|
|
39
|
+
export declare const doubleIconSizeConfig: {
|
|
40
|
+
lg: string;
|
|
41
|
+
md: string;
|
|
42
|
+
sm: string;
|
|
43
|
+
tn: string;
|
|
44
|
+
};
|
|
39
45
|
export declare const variantConfig: {
|
|
40
46
|
default: string;
|
|
41
47
|
primary: string;
|
|
@@ -9,6 +9,7 @@ export interface DropdownContainerProps extends ComponentPropsWithRef<'div'> {
|
|
|
9
9
|
size?: 'sm' | 'md';
|
|
10
10
|
zIndex?: number;
|
|
11
11
|
anchorRef?: React.RefObject<HTMLElement>;
|
|
12
|
+
matchAnchorWidth?: undefined | 'min' | 'exact';
|
|
12
13
|
onClickItem?: (event: React.MouseEvent<HTMLDivElement>, val: string | number | object) => void;
|
|
13
14
|
}
|
|
14
15
|
declare const DropdownContainer: {
|
|
@@ -8,6 +8,7 @@ interface MenuContainerProps extends ComponentPropsWithRef<'div'> {
|
|
|
8
8
|
zIndex?: number;
|
|
9
9
|
onClickItem?: () => void;
|
|
10
10
|
anchorRef?: React.RefObject<HTMLElement>;
|
|
11
|
+
matchAnchorWidth?: undefined | 'min' | 'exact';
|
|
11
12
|
}
|
|
12
13
|
import React, { ComponentPropsWithRef } from 'react';
|
|
13
14
|
declare const MenuContainer: {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface PopoverProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
content: string;
|
|
6
|
+
delay?: number;
|
|
7
|
+
maxWidth?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
zIndex?: number;
|
|
11
|
+
direction?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
12
|
+
}
|
|
13
|
+
export interface PopoverItemProps {
|
|
14
|
+
anchorRef: React.RefObject<HTMLElement>;
|
|
15
|
+
className?: string;
|
|
16
|
+
content: string;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
title: string;
|
|
19
|
+
zIndex?: number;
|
|
20
|
+
direction: 'top' | 'right' | 'bottom' | 'left' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
21
|
+
}
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
content: string;
|
|
5
|
-
delay?: number;
|
|
6
|
-
direction?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
7
|
-
title?: string;
|
|
8
|
-
maxWidth?: string;
|
|
9
|
-
}
|
|
10
|
-
declare function Popover({ children, content, delay, direction, title, maxWidth, }: PopoverProps): React.JSX.Element;
|
|
2
|
+
import { PopoverProps } from './PropInterface';
|
|
3
|
+
declare function Popover({ className, children, content, direction, maxWidth, title, style, zIndex, }: PopoverProps): React.JSX.Element;
|
|
11
4
|
declare namespace Popover {
|
|
12
5
|
var defaultProps: {
|
|
13
|
-
delay: number;
|
|
14
6
|
direction: string;
|
|
15
7
|
title: string;
|
|
16
8
|
};
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ReactNode, RefObject } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, ComponentPropsWithRef, ReactNode, RefObject } from 'react';
|
|
2
2
|
interface TooltipProps extends Omit<ComponentPropsWithoutRef<'div'>, 'content'> {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
content: ReactNode | string;
|
|
5
5
|
delay?: number;
|
|
6
6
|
maxWidth?: string;
|
|
7
|
+
zIndex?: number;
|
|
7
8
|
direction?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
8
9
|
}
|
|
9
10
|
interface TooltipItemProps {
|
|
10
11
|
anchorRef: RefObject<HTMLDivElement>;
|
|
11
|
-
|
|
12
|
+
className?: string;
|
|
12
13
|
content: ReactNode | string;
|
|
13
14
|
tooltipContainerRef: React.RefObject<HTMLDivElement>;
|
|
14
15
|
tooltipContainerStyle: React.CSSProperties;
|
|
16
|
+
style?: ComponentPropsWithRef<'div'>['style'];
|
|
17
|
+
zIndex: number;
|
|
18
|
+
direction?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
15
19
|
}
|
|
16
20
|
export { TooltipProps, TooltipItemProps };
|
|
@@ -28,5 +28,6 @@ export declare const WarningOutlined: Story;
|
|
|
28
28
|
export declare const DemoWithIconLeft: Story;
|
|
29
29
|
export declare const DemoWithIconRight: Story;
|
|
30
30
|
export declare const DemoWithIconBoth: Story;
|
|
31
|
+
export declare const DemoWithIconOnlyBoth: Story;
|
|
31
32
|
export declare const DemoWithIconOnly: Story;
|
|
32
33
|
export declare const DemoWithMovingIcon: Story;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import React$1, { ComponentPropsWithoutRef, ComponentPropsWithRef, ChangeEvent, ReactNode, MouseEvent, HTMLAttributes } from 'react';
|
|
2
3
|
|
|
3
4
|
interface AccordionsProps extends ComponentPropsWithoutRef<'div'> {
|
|
@@ -13,9 +14,12 @@ interface AlertProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
13
14
|
visible?: boolean;
|
|
14
15
|
setVisible?: (arg0: boolean) => void;
|
|
15
16
|
visibleIcon?: boolean;
|
|
17
|
+
visibleMiniIcon?: boolean;
|
|
18
|
+
customIcon?: React$1.ReactNode;
|
|
19
|
+
customMiniIcon?: React$1.ReactNode;
|
|
16
20
|
visibleClose?: boolean;
|
|
17
21
|
}
|
|
18
|
-
declare function Alert({ title, caption, variant, visible, setVisible, visibleIcon, visibleClose, children, }: AlertProps): false | React$1.JSX.Element;
|
|
22
|
+
declare function Alert({ title, caption, variant, visible, setVisible, visibleIcon, visibleClose, customIcon, customMiniIcon, children, }: AlertProps): false | React$1.JSX.Element;
|
|
19
23
|
declare namespace Alert {
|
|
20
24
|
var defaultProps: {
|
|
21
25
|
title: string;
|
|
@@ -48,6 +52,7 @@ interface BadgeProps extends ComponentPropsWithoutRef<'span'> {
|
|
|
48
52
|
declare function Badge({ type, children, color, isInverted, className, }: BadgeProps): React$1.JSX.Element;
|
|
49
53
|
declare namespace Badge {
|
|
50
54
|
var defaultProps: {
|
|
55
|
+
type: string;
|
|
51
56
|
isInverted: boolean;
|
|
52
57
|
color: undefined;
|
|
53
58
|
};
|
|
@@ -162,6 +167,7 @@ interface MenuContainerProps extends ComponentPropsWithRef<'div'> {
|
|
|
162
167
|
zIndex?: number;
|
|
163
168
|
onClickItem?: () => void;
|
|
164
169
|
anchorRef?: React$1.RefObject<HTMLElement>;
|
|
170
|
+
matchAnchorWidth?: undefined | 'min' | 'exact';
|
|
165
171
|
}
|
|
166
172
|
|
|
167
173
|
declare const MenuContainer: {
|
|
@@ -292,6 +298,7 @@ interface DropdownContainerProps extends ComponentPropsWithRef<'div'> {
|
|
|
292
298
|
size?: 'sm' | 'md';
|
|
293
299
|
zIndex?: number;
|
|
294
300
|
anchorRef?: React$1.RefObject<HTMLElement>;
|
|
301
|
+
matchAnchorWidth?: undefined | 'min' | 'exact';
|
|
295
302
|
onClickItem?: (event: React$1.MouseEvent<HTMLDivElement>, val: string | number | object) => void;
|
|
296
303
|
}
|
|
297
304
|
declare const DropdownContainer: {
|
|
@@ -599,17 +606,20 @@ declare namespace Pills {
|
|
|
599
606
|
}
|
|
600
607
|
|
|
601
608
|
interface PopoverProps {
|
|
602
|
-
|
|
609
|
+
className?: string;
|
|
610
|
+
children: React.ReactNode;
|
|
603
611
|
content: string;
|
|
604
612
|
delay?: number;
|
|
605
|
-
direction?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
606
|
-
title?: string;
|
|
607
613
|
maxWidth?: string;
|
|
614
|
+
title?: string;
|
|
615
|
+
style?: React.CSSProperties;
|
|
616
|
+
zIndex?: number;
|
|
617
|
+
direction?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
608
618
|
}
|
|
609
|
-
|
|
619
|
+
|
|
620
|
+
declare function Popover({ className, children, content, direction, maxWidth, title, style, zIndex, }: PopoverProps): React$1.JSX.Element;
|
|
610
621
|
declare namespace Popover {
|
|
611
622
|
var defaultProps: {
|
|
612
|
-
delay: number;
|
|
613
623
|
direction: string;
|
|
614
624
|
title: string;
|
|
615
625
|
};
|
|
@@ -733,6 +743,7 @@ interface TooltipProps extends Omit<ComponentPropsWithoutRef<'div'>, 'content'>
|
|
|
733
743
|
content: ReactNode | string;
|
|
734
744
|
delay?: number;
|
|
735
745
|
maxWidth?: string;
|
|
746
|
+
zIndex?: number;
|
|
736
747
|
direction?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
737
748
|
}
|
|
738
749
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"@biaenergi:registry": "https://gitlab.com/api/v4/projects/50905269/packages/npm/"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.2.0-beta.1",
|
|
7
7
|
"description": "Design Language System develop by BIAENERGI",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"rollup": "rollup -c",
|