bianic-ui 2.10.1 → 2.11.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/README.md +49 -49
- package/dist/cjs/Empty.svg +12 -12
- package/dist/cjs/index.js +124 -70
- package/dist/cjs/lib.css +1 -1
- package/dist/cjs/types/components/Countdown/index.d.ts +1 -0
- package/dist/cjs/types/components/Forms/SelectInput/index.d.ts +1 -1
- package/dist/cjs/types/components/Icons/Unlinked.d.ts +4 -0
- package/dist/cjs/types/components/Icons/index.d.ts +2 -1
- package/dist/cjs/types/components/Popover/PropInterface.d.ts +2 -0
- package/dist/cjs/types/components/Popover/configs.d.ts +8 -8
- package/dist/cjs/types/components/Popover/index.d.ts +1 -1
- package/dist/cjs/types/components/Table/TableUtility/TableFooterController.d.ts +2 -1
- package/dist/cjs/types/components/Table/TableUtility/TableHeaderController.d.ts +2 -1
- package/dist/cjs/types/components/Tooltip/PropsInterface.d.ts +1 -0
- package/dist/cjs/types/stories/Banner.stories.d.ts +1 -0
- package/dist/cjs/types/stories/Icons/Unlinked.stories.d.ts +14 -0
- package/dist/esm/Empty.svg +12 -12
- package/dist/esm/index.js +125 -72
- package/dist/esm/lib.css +1 -1
- package/dist/esm/types/components/Countdown/index.d.ts +1 -0
- package/dist/esm/types/components/Forms/SelectInput/index.d.ts +1 -1
- package/dist/esm/types/components/Icons/Unlinked.d.ts +4 -0
- package/dist/esm/types/components/Icons/index.d.ts +2 -1
- package/dist/esm/types/components/Popover/PropInterface.d.ts +2 -0
- package/dist/esm/types/components/Popover/configs.d.ts +8 -8
- package/dist/esm/types/components/Popover/index.d.ts +1 -1
- package/dist/esm/types/components/Table/TableUtility/TableFooterController.d.ts +2 -1
- package/dist/esm/types/components/Table/TableUtility/TableHeaderController.d.ts +2 -1
- package/dist/esm/types/components/Tooltip/PropsInterface.d.ts +1 -0
- package/dist/esm/types/stories/Banner.stories.d.ts +1 -0
- package/dist/esm/types/stories/Icons/Unlinked.stories.d.ts +14 -0
- package/dist/index.d.ts +12 -6
- package/package.json +143 -143
- package/src/font/SansCode/README.txt +88 -88
- package/src/style/color.css +650 -650
- package/src/style/scrollbar.css +78 -78
- package/tailwind.config.js +592 -574
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface CountdownProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
3
3
|
seconds: number;
|
|
4
|
+
maxSeconds: number;
|
|
4
5
|
variant?: 'countdown' | 'success';
|
|
5
6
|
}
|
|
6
7
|
declare const Countdown: React.ForwardRefExoticComponent<CountdownProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import SelectInputProps from './PropsInterface';
|
|
3
|
-
declare function SelectInput({ descText, disabled, size, id, isValid, label, options, required, selected, setSelected, onClickDropdown, children, dropContProps: { className: dropContClassName, ...restDropContProps }, ...props }: SelectInputProps): React.JSX.Element;
|
|
3
|
+
declare function SelectInput({ descText, disabled, size, id, isValid, label, options, readOnly, required, selected, setSelected, onClickDropdown, children, dropContProps: { className: dropContClassName, ...restDropContProps }, ...props }: SelectInputProps): React.JSX.Element;
|
|
4
4
|
declare namespace SelectInput {
|
|
5
5
|
var defaultProps: {
|
|
6
6
|
descText: string;
|
|
@@ -15,9 +15,10 @@ export { default as BCNeutral } from './Neutral';
|
|
|
15
15
|
export { default as BCNode } from './Node';
|
|
16
16
|
export { default as BCOutlet } from './Outlet';
|
|
17
17
|
export { default as BCPort } from './Port';
|
|
18
|
+
export { default as BCRhombus } from './Rhombus';
|
|
18
19
|
export { default as BCSelectAllAdd } from './SelectAllAdd';
|
|
19
20
|
export { default as BCSelectAllRemove } from './SelectAllRemove';
|
|
20
21
|
export { default as BCSpinner } from './Spinner';
|
|
21
22
|
export { default as BCStack } from './Stack';
|
|
22
|
-
export { default as
|
|
23
|
+
export { default as BCUnlinked } from './Unlinked';
|
|
23
24
|
export { default as BCVirtualPort } from './VirtualPort';
|
|
@@ -7,6 +7,7 @@ export interface PopoverProps {
|
|
|
7
7
|
title?: string;
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
9
|
zIndex?: number;
|
|
10
|
+
color?: 'black' | 'white';
|
|
10
11
|
direction?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
11
12
|
}
|
|
12
13
|
export interface PopoverItemProps {
|
|
@@ -16,5 +17,6 @@ export interface PopoverItemProps {
|
|
|
16
17
|
style?: React.CSSProperties;
|
|
17
18
|
title: string;
|
|
18
19
|
zIndex?: number;
|
|
20
|
+
color?: 'black' | 'white';
|
|
19
21
|
direction: 'top' | 'right' | 'bottom' | 'left' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
20
22
|
}
|
|
@@ -2,42 +2,42 @@ declare const classConfig: {
|
|
|
2
2
|
top: {
|
|
3
3
|
tooltipContainer: string;
|
|
4
4
|
triangleContainer: string;
|
|
5
|
-
|
|
5
|
+
triangleBorders: string;
|
|
6
6
|
};
|
|
7
7
|
right: {
|
|
8
8
|
tooltipContainer: string;
|
|
9
9
|
triangleContainer: string;
|
|
10
|
-
|
|
10
|
+
triangleBorders: string;
|
|
11
11
|
};
|
|
12
12
|
bottom: {
|
|
13
13
|
tooltipContainer: string;
|
|
14
14
|
triangleContainer: string;
|
|
15
|
-
|
|
15
|
+
triangleBorders: string;
|
|
16
16
|
};
|
|
17
17
|
left: {
|
|
18
18
|
tooltipContainer: string;
|
|
19
19
|
triangleContainer: string;
|
|
20
|
-
|
|
20
|
+
triangleBorders: string;
|
|
21
21
|
};
|
|
22
22
|
'top-right': {
|
|
23
23
|
tooltipContainer: string;
|
|
24
24
|
triangleContainer: string;
|
|
25
|
-
|
|
25
|
+
triangleBorders: string;
|
|
26
26
|
};
|
|
27
27
|
'top-left': {
|
|
28
28
|
tooltipContainer: string;
|
|
29
29
|
triangleContainer: string;
|
|
30
|
-
|
|
30
|
+
triangleBorders: string;
|
|
31
31
|
};
|
|
32
32
|
'bottom-right': {
|
|
33
33
|
tooltipContainer: string;
|
|
34
34
|
triangleContainer: string;
|
|
35
|
-
|
|
35
|
+
triangleBorders: string;
|
|
36
36
|
};
|
|
37
37
|
'bottom-left': {
|
|
38
38
|
tooltipContainer: string;
|
|
39
39
|
triangleContainer: string;
|
|
40
|
-
|
|
40
|
+
triangleBorders: string;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
export default classConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PopoverProps } from './PropInterface';
|
|
3
|
-
declare function Popover({ className, children, content, direction, maxWidth, title, style, zIndex, }: PopoverProps): React.JSX.Element;
|
|
3
|
+
declare function Popover({ className, children, content, direction, maxWidth, title, style, zIndex, color, }: PopoverProps): React.JSX.Element;
|
|
4
4
|
declare namespace Popover {
|
|
5
5
|
var defaultProps: {
|
|
6
6
|
direction: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
interface TableFooterControllerProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
size: 'sm' | 'md';
|
|
4
5
|
currentPage: number;
|
|
5
6
|
totalPages: number;
|
|
6
7
|
pageSize: number;
|
|
@@ -8,5 +9,5 @@ interface TableFooterControllerProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
8
9
|
setPageSize: Dispatch<SetStateAction<number>>;
|
|
9
10
|
isLoading?: boolean;
|
|
10
11
|
}
|
|
11
|
-
declare const TableFooterController: ({ currentPage, totalPages, pageSize, setCurrentPage, setPageSize, isLoading, }: TableFooterControllerProps) => React.JSX.Element;
|
|
12
|
+
declare const TableFooterController: ({ currentPage, totalPages, pageSize, setCurrentPage, setPageSize, isLoading, size, }: TableFooterControllerProps) => React.JSX.Element;
|
|
12
13
|
export default TableFooterController;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
interface TableHeaderControllerProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
size?: 'sm' | 'md';
|
|
3
4
|
buttonActions?: ReactNode[];
|
|
4
5
|
totalData?: number;
|
|
5
6
|
firstIndex?: number;
|
|
6
7
|
lastIndex?: number;
|
|
7
8
|
}
|
|
8
|
-
declare const TableHeaderController: ({ buttonActions, totalData, firstIndex, lastIndex, }: TableHeaderControllerProps) => React.JSX.Element;
|
|
9
|
+
declare const TableHeaderController: ({ size, buttonActions, totalData, firstIndex, lastIndex, }: TableHeaderControllerProps) => React.JSX.Element;
|
|
9
10
|
export default TableHeaderController;
|
|
@@ -10,6 +10,7 @@ interface TooltipProps extends Omit<ComponentPropsWithoutRef<'div'>, 'content'>
|
|
|
10
10
|
direction?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
11
11
|
}
|
|
12
12
|
interface TooltipItemProps {
|
|
13
|
+
active?: boolean;
|
|
13
14
|
anchorRef: RefObject<HTMLDivElement>;
|
|
14
15
|
className?: string;
|
|
15
16
|
content: ReactNode | string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ className, fill, size, }: import("../../components/Icons/interface").IconProps) => React.JSX.Element;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
args: {};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Preview: Story;
|
package/dist/esm/Empty.svg
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<svg width="92" height="92" viewBox="0 0 92 92" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M32.8825 12.968C33.8187 12.0283 35.0905 11.5 36.417 11.5H66.6521C69.4074 11.5 71.641 13.7336 71.641 16.489V75.1388C71.641 77.8941 69.4074 80.1278 66.6521 80.1278H25.8327C23.0774 80.1278 20.8437 77.8875 20.8438 75.1321C20.8438 56.1849 20.8438 44.6779 20.8438 27.1159C20.8438 25.7961 21.3667 24.528 22.2982 23.593L32.8825 12.968Z" fill="#DADEEB"/>
|
|
3
|
-
<path d="M32.8825 12.968C33.8187 12.0283 35.0905 11.5 36.417 11.5H66.6521C69.4074 11.5 71.641 13.7336 71.641 16.489V75.1388C71.641 77.8941 69.4074 80.1278 66.6521 80.1278H25.8327C23.0774 80.1278 20.8437 77.8875 20.8438 75.1321C20.8438 56.1849 20.8438 44.6779 20.8438 27.1159C20.8438 25.7961 21.3667 24.528 22.2982 23.593L32.8825 12.968Z" fill="white" fill-opacity="0.5"/>
|
|
4
|
-
<path d="M34.3638 11.5V16.1283C34.3638 21.0391 30.3828 25.02 25.472 25.02H20.8438L34.3638 11.5Z" fill="#DADEEB"/>
|
|
5
|
-
<rect x="28.1716" y="32.6677" width="18.7253" height="4.07072" rx="1.99559" fill="#DADEEB"/>
|
|
6
|
-
<rect x="28.1716" y="39.9949" width="36.6365" height="4.07072" rx="1.99559" fill="#DADEEB"/>
|
|
7
|
-
<rect x="28.1716" y="47.3223" width="36.6365" height="4.07072" rx="1.99559" fill="#DADEEB"/>
|
|
8
|
-
<rect x="28.1716" y="54.6497" width="36.6365" height="4.07072" rx="1.99559" fill="#DADEEB"/>
|
|
9
|
-
<rect x="28.1716" y="61.9768" width="36.6365" height="4.07072" rx="1.99559" fill="#DADEEB"/>
|
|
10
|
-
<path d="M58.7737 63.8789C63.267 59.3856 70.5519 59.3856 75.0452 63.8789C79.5382 68.3722 79.5384 75.6572 75.0452 80.1504C70.552 84.6436 63.267 84.6434 58.7737 80.1504C54.2804 75.6571 54.2804 68.3722 58.7737 63.8789Z" stroke="#54A0F9" stroke-width="1.70457"/>
|
|
11
|
-
<path d="M75.6475 80.1499L81.9753 86.4778" stroke="#54A0F9" stroke-width="1.70457"/>
|
|
12
|
-
</svg>
|
|
1
|
+
<svg width="92" height="92" viewBox="0 0 92 92" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M32.8825 12.968C33.8187 12.0283 35.0905 11.5 36.417 11.5H66.6521C69.4074 11.5 71.641 13.7336 71.641 16.489V75.1388C71.641 77.8941 69.4074 80.1278 66.6521 80.1278H25.8327C23.0774 80.1278 20.8437 77.8875 20.8438 75.1321C20.8438 56.1849 20.8438 44.6779 20.8438 27.1159C20.8438 25.7961 21.3667 24.528 22.2982 23.593L32.8825 12.968Z" fill="#DADEEB"/>
|
|
3
|
+
<path d="M32.8825 12.968C33.8187 12.0283 35.0905 11.5 36.417 11.5H66.6521C69.4074 11.5 71.641 13.7336 71.641 16.489V75.1388C71.641 77.8941 69.4074 80.1278 66.6521 80.1278H25.8327C23.0774 80.1278 20.8437 77.8875 20.8438 75.1321C20.8438 56.1849 20.8438 44.6779 20.8438 27.1159C20.8438 25.7961 21.3667 24.528 22.2982 23.593L32.8825 12.968Z" fill="white" fill-opacity="0.5"/>
|
|
4
|
+
<path d="M34.3638 11.5V16.1283C34.3638 21.0391 30.3828 25.02 25.472 25.02H20.8438L34.3638 11.5Z" fill="#DADEEB"/>
|
|
5
|
+
<rect x="28.1716" y="32.6677" width="18.7253" height="4.07072" rx="1.99559" fill="#DADEEB"/>
|
|
6
|
+
<rect x="28.1716" y="39.9949" width="36.6365" height="4.07072" rx="1.99559" fill="#DADEEB"/>
|
|
7
|
+
<rect x="28.1716" y="47.3223" width="36.6365" height="4.07072" rx="1.99559" fill="#DADEEB"/>
|
|
8
|
+
<rect x="28.1716" y="54.6497" width="36.6365" height="4.07072" rx="1.99559" fill="#DADEEB"/>
|
|
9
|
+
<rect x="28.1716" y="61.9768" width="36.6365" height="4.07072" rx="1.99559" fill="#DADEEB"/>
|
|
10
|
+
<path d="M58.7737 63.8789C63.267 59.3856 70.5519 59.3856 75.0452 63.8789C79.5382 68.3722 79.5384 75.6572 75.0452 80.1504C70.552 84.6436 63.267 84.6434 58.7737 80.1504C54.2804 75.6571 54.2804 68.3722 58.7737 63.8789Z" stroke="#54A0F9" stroke-width="1.70457"/>
|
|
11
|
+
<path d="M75.6475 80.1499L81.9753 86.4778" stroke="#54A0F9" stroke-width="1.70457"/>
|
|
12
|
+
</svg>
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useEffect, forwardRef, useRef,
|
|
1
|
+
import React, { useState, useEffect, forwardRef, useRef, useLayoutEffect, cloneElement, Children, useMemo, isValidElement, useCallback } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
|
|
4
4
|
function Accordions(_a) {
|
|
@@ -719,12 +719,29 @@ var variantConfig$2 = {
|
|
|
719
719
|
|
|
720
720
|
function Banner(_a) {
|
|
721
721
|
var children = _a.children, _b = _a.closeable, closeable = _b === void 0 ? true : _b, _c = _a.variant, variant = _c === void 0 ? 'black' : _c, open = _a.open, onClose = _a.onClose;
|
|
722
|
+
var textRef = useRef(null);
|
|
723
|
+
var _d = useState(false), isMultiLine = _d[0], setIsMultiLine = _d[1];
|
|
724
|
+
useLayoutEffect(function () {
|
|
725
|
+
var textElement = textRef.current;
|
|
726
|
+
if (!textElement)
|
|
727
|
+
return;
|
|
728
|
+
var observer = new ResizeObserver(function () {
|
|
729
|
+
var computedStyle = window.getComputedStyle(textElement);
|
|
730
|
+
var lineHeight = parseFloat(computedStyle.lineHeight);
|
|
731
|
+
var height = textElement.clientHeight;
|
|
732
|
+
if (lineHeight && height) {
|
|
733
|
+
setIsMultiLine(height > lineHeight * 1.5);
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
observer.observe(textElement);
|
|
737
|
+
return function () { return observer.disconnect(); };
|
|
738
|
+
}, [children]);
|
|
722
739
|
if (open) {
|
|
723
|
-
return (React.createElement("div", { className: "w-full
|
|
724
|
-
React.createElement("div", { className: "
|
|
725
|
-
|
|
726
|
-
React.createElement("
|
|
727
|
-
React.createElement(TbX, { className: "text-[18px] ".concat(variantConfig$2[variant].hover, " ").concat(variantConfig$2[variant].active) })))))
|
|
740
|
+
return (React.createElement("div", { className: "relative flex min-h-fit w-full justify-center gap-x-[15px] py-[22px] pl-[15px] pr-[48px] text-size-base font-semibold text-white ".concat(variantConfig$2[variant].bg, " ").concat(isMultiLine ? 'items-start' : 'items-center') },
|
|
741
|
+
React.createElement("div", { className: "font-segoe text-[14px] font-semibold leading-[21px]", ref: textRef }, children),
|
|
742
|
+
React.createElement("div", { className: "absolute right-[15px]", style: { display: closeable ? 'block' : 'none' } },
|
|
743
|
+
React.createElement("button", { className: "flex h-[18px] w-[18px] items-center justify-center text-xs text-white outline-2 ".concat(variantConfig$2[variant].focus), type: "button", onClick: function () { return onClose(false); } },
|
|
744
|
+
React.createElement(TbX, { className: "text-[18px] ".concat(variantConfig$2[variant].hover, " ").concat(variantConfig$2[variant].active) })))));
|
|
728
745
|
}
|
|
729
746
|
}
|
|
730
747
|
Banner.defaultProps = {
|
|
@@ -1743,17 +1760,24 @@ function Color() {
|
|
|
1743
1760
|
}))));
|
|
1744
1761
|
}
|
|
1745
1762
|
|
|
1746
|
-
var BORDER_COLOR = {
|
|
1747
|
-
countdown: 'border-bia-blue',
|
|
1748
|
-
success: 'border-bia-green',
|
|
1749
|
-
};
|
|
1750
1763
|
var Countdown = React.forwardRef(function (_a, ref) {
|
|
1751
|
-
var seconds = _a.seconds, _b = _a.variant, variant = _b === void 0 ? 'countdown' : _b, className = _a.className, props = __rest(_a, ["seconds", "variant", "className"]);
|
|
1764
|
+
var seconds = _a.seconds, maxSeconds = _a.maxSeconds, _b = _a.variant, variant = _b === void 0 ? 'countdown' : _b, className = _a.className, props = __rest(_a, ["seconds", "maxSeconds", "variant", "className"]);
|
|
1752
1765
|
var isCountdown = variant === 'countdown';
|
|
1753
|
-
var
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1766
|
+
var strokeWidth = 3;
|
|
1767
|
+
var size = 120;
|
|
1768
|
+
var radius = (size - strokeWidth) / 2;
|
|
1769
|
+
var circumference = 2 * Math.PI * radius;
|
|
1770
|
+
// Calculate how much stroke to show based on time remaining
|
|
1771
|
+
var strokeDashoffset = circumference - (seconds / maxSeconds) * circumference;
|
|
1772
|
+
return (React.createElement("div", __assign({ ref: ref, role: isCountdown ? 'timer' : 'status', "aria-live": "polite", "aria-atomic": "true", className: cn('relative flex aspect-square w-[120px] flex-col items-center justify-center rounded-radius-full', className) }, props, { style: { width: size, height: size } }),
|
|
1773
|
+
React.createElement("svg", { className: "absolute left-0 top-0 -rotate-90 transform" // Rotates SVG so progress starts at 12 o'clock
|
|
1774
|
+
, width: size, height: size },
|
|
1775
|
+
React.createElement("circle", { className: "text-bia-blue-light-90", stroke: "currentColor", fill: "transparent", strokeWidth: strokeWidth, cx: size / 2, cy: size / 2, r: radius }),
|
|
1776
|
+
isCountdown && (React.createElement("circle", { className: "text-bia-blue transition-all ease-linear ".concat(seconds !== maxSeconds ? 'duration-1000' : 'duration-0'), stroke: "currentColor", fill: "transparent", strokeWidth: strokeWidth, strokeDasharray: circumference, strokeDashoffset: strokeDashoffset, strokeLinecap: "round", cx: size / 2, cy: size / 2, r: radius })),
|
|
1777
|
+
React.createElement("circle", { className: "origin-center scale-y-[-1] text-bia-green transition-all ease-linear ".concat(isCountdown ? 'duration-0' : 'duration-1000'), stroke: "currentColor", fill: "transparent", strokeWidth: strokeWidth, strokeDasharray: circumference, strokeDashoffset: circumference - (isCountdown ? 0 : 1 / 1) * circumference, strokeLinecap: "round", cx: size / 2, cy: size / 2, r: radius })),
|
|
1778
|
+
isCountdown ? (React.createElement(React.Fragment, null,
|
|
1779
|
+
React.createElement(Heading, { key: seconds, variant: "2", className: "animate-number-drop" }, seconds),
|
|
1780
|
+
React.createElement(Text, { variant: "small-text", className: "font-segoe text-bia-coolgrey" }, seconds === 1 ? 'second' : 'seconds'))) : (React.createElement(TbCheck, { size: 46, className: "text-bia-green", "aria-label": "Countdown complete" }))));
|
|
1757
1781
|
});
|
|
1758
1782
|
Countdown.displayName = 'Countdown';
|
|
1759
1783
|
|
|
@@ -2237,12 +2261,12 @@ function Tooltip(props) {
|
|
|
2237
2261
|
}, [content, maxWidth, scrollWidth, offsetHeight]);
|
|
2238
2262
|
return (React.createElement("div", { className: "tooltip-wrapper relative inline-flex h-fit w-fit flex-col", onMouseEnter: showTip, onMouseLeave: hideTip, ref: anchorRef },
|
|
2239
2263
|
children,
|
|
2240
|
-
|
|
2264
|
+
React.createElement(TooltipItem, { anchorRef: anchorRef, direction: direction, content: content, tooltipContainerRef: tooltipContainerRef, tooltipContainerStyle: tooltipContainerStyle, bgColor: bgColor, textColor: textColor, zIndex: zIndex, className: className, style: style, active: active })));
|
|
2241
2265
|
}
|
|
2242
2266
|
var TooltipItem = function (_a) {
|
|
2243
|
-
var anchorRef = _a.anchorRef, className = _a.className, content = _a.content, direction = _a.direction, style = _a.style, tooltipContainerRef = _a.tooltipContainerRef, tooltipContainerStyle = _a.tooltipContainerStyle, _b = _a.bgColor, bgColor = _b === void 0 ? 'bia-black' : _b, _c = _a.textColor, textColor = _c === void 0 ? 'bia-white' : _c, zIndex = _a.zIndex;
|
|
2267
|
+
var anchorRef = _a.anchorRef, className = _a.className, content = _a.content, direction = _a.direction, style = _a.style, tooltipContainerRef = _a.tooltipContainerRef, tooltipContainerStyle = _a.tooltipContainerStyle, _b = _a.bgColor, bgColor = _b === void 0 ? 'bia-black' : _b, _c = _a.textColor, textColor = _c === void 0 ? 'bia-white' : _c, zIndex = _a.zIndex, _d = _a.active, active = _d === void 0 ? false : _d;
|
|
2244
2268
|
var positionStyle = usePopupPosition(anchorRef, tooltipContainerRef, direction)[0];
|
|
2245
|
-
return createPortal(React.createElement("div", { className: "tooltip-container break-word absolute inline-block break-all rounded-[4px] bg-".concat(bgColor, " px-[7px] py-[4px] text-size-sm text-").concat(textColor, " ").concat(className), style: __assign(__assign(__assign({ zIndex: zIndex }, positionStyle), tooltipContainerStyle), style), ref: tooltipContainerRef }, content), document.body);
|
|
2269
|
+
return createPortal(React.createElement("div", { className: "tooltip-container break-word absolute inline-block break-all rounded-[4px] bg-".concat(bgColor, " px-[7px] py-[4px] text-size-sm text-").concat(textColor, " ").concat(className), style: __assign(__assign(__assign(__assign({ zIndex: zIndex }, positionStyle), tooltipContainerStyle), style), { visibility: active ? 'visible' : 'hidden' }), ref: tooltipContainerRef }, content), document.body);
|
|
2246
2270
|
};
|
|
2247
2271
|
Tooltip.defaultProps = {
|
|
2248
2272
|
delay: 400,
|
|
@@ -2519,7 +2543,7 @@ var sizeUnion$3 = ['md', 'sm', 'tn'];
|
|
|
2519
2543
|
function Checkbox(_a) {
|
|
2520
2544
|
var _b = _a.disabled, disabled = _b === void 0 ? false : _b, id = _a.id, _c = _a.size, size = _c === void 0 ? 'md' : _c, label = _a.label, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, _e = _a.isIndeterminate, isIndeterminate = _e === void 0 ? false : _e, props = __rest(_a, ["disabled", "id", "size", "label", "onChange", "isIndeterminate"]);
|
|
2521
2545
|
var _f = sizeConfig$9[validUnion(size, sizeUnion$3)], checkClass = _f.checkClass, labelClass = _f.labelClass;
|
|
2522
|
-
var isValidIndeterminate = isIndeterminate && props.checked
|
|
2546
|
+
var isValidIndeterminate = isIndeterminate && props.checked;
|
|
2523
2547
|
var backgroundClass = size === 'tn' && props.checked ? 'bg-bia-blue' : 'bg-bia-white';
|
|
2524
2548
|
var peerCheckedClass = size === 'tn' ? '' : 'peer-checked:border-2';
|
|
2525
2549
|
return (React.createElement("div", { className: "flex items-center" },
|
|
@@ -2617,10 +2641,10 @@ DefaultDropdownItem.defaultProps = {
|
|
|
2617
2641
|
|
|
2618
2642
|
var sizeUnion$2 = ['md', 'sm'];
|
|
2619
2643
|
function SelectInput(_a) {
|
|
2620
|
-
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, id = _a.id, _d = _a.isValid, isValid = _d === void 0 ? null : _d, label = _a.label, _e = _a.options, options = _e === void 0 ? [] : _e, _f = _a.
|
|
2621
|
-
var
|
|
2644
|
+
var descText = _a.descText, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, id = _a.id, _d = _a.isValid, isValid = _d === void 0 ? null : _d, label = _a.label, _e = _a.options, options = _e === void 0 ? [] : _e, _f = _a.readOnly, readOnly = _f === void 0 ? false : _f, _g = _a.required, required = _g === void 0 ? false : _g, selected = _a.selected, setSelected = _a.setSelected, _h = _a.onClickDropdown, onClickDropdown = _h === void 0 ? function () { } : _h, children = _a.children, _j = _a.dropContProps, _k = _j === void 0 ? {} : _j, _l = _k.className, dropContClassName = _l === void 0 ? '' : _l, restDropContProps = __rest(_k, ["className"]), props = __rest(_a, ["descText", "disabled", "size", "id", "isValid", "label", "options", "readOnly", "required", "selected", "setSelected", "onClickDropdown", "children", "dropContProps"]);
|
|
2645
|
+
var _m = useState(false), isOpen = _m[0], setIsOpen = _m[1];
|
|
2622
2646
|
var validatedSize = validUnion(size, sizeUnion$2);
|
|
2623
|
-
var
|
|
2647
|
+
var _o = sizeConfig$8[validatedSize], searchSize = _o.searchSize, iconSize = _o.iconSize;
|
|
2624
2648
|
var inputRef = useRef(null);
|
|
2625
2649
|
var isObjectOptionItem = false;
|
|
2626
2650
|
if (options.every(function (item) { return typeof item === 'object' && item !== null; }))
|
|
@@ -2636,12 +2660,10 @@ function SelectInput(_a) {
|
|
|
2636
2660
|
if (!disabled && isExistValidation && !isValid)
|
|
2637
2661
|
descColor = 'text-bia-red';
|
|
2638
2662
|
var disabledClass = disabled ? 'cursor-not-allowed' : '';
|
|
2639
|
-
return (React.createElement("div", { className: "bianic-fgc-container bianic-text-input-container field-group flex w-full flex-col" },
|
|
2640
|
-
React.createElement(
|
|
2641
|
-
childrenElement(label),
|
|
2642
|
-
required && React.createElement("span", { className: "p-1 text-bia-red" }, "*")),
|
|
2663
|
+
return (React.createElement("div", { className: "bianic-fgc-container bianic-text-input-container field-group flex w-full flex-col gap-y-2" },
|
|
2664
|
+
label && (React.createElement(FormLabel, { htmlFor: id, required: required, readOnly: readOnly }, label)),
|
|
2643
2665
|
React.createElement("div", { className: "group relative w-full ".concat(disabledClass) },
|
|
2644
|
-
React.createElement("input", __assign({ className: "bianic-fgc-target field peer w-full
|
|
2666
|
+
React.createElement("input", __assign({ className: "bianic-fgc-target field peer w-full cursor-pointer rounded border border-bia-grey-dark-10 bg-primary-white pe-8 focus-visible:outline-none enabled:hover:rounded-b-none enabled:hover:border-b-bia-blue enabled:focus:rounded-b-none enabled:focus:border-b-bia-blue disabled:cursor-not-allowed disabled:bg-bia-grey-light-80 disabled:text-bia-coolgrey ".concat(searchSize), onClick: function () { return setIsOpen(!isOpen); }, value: selectedLabel, readOnly: true, id: id, disabled: disabled, ref: inputRef }, props)),
|
|
2645
2667
|
React.createElement("div", { className: "pointer-events-none absolute inset-y-0 flex items-center pl-3 text-bia-coolgrey peer-disabled:text-bia-coolgrey-light-50 ".concat(iconSize) }, isOpen ? React.createElement(TbChevronUp, null) : React.createElement(TbChevronDown, null)),
|
|
2646
2668
|
children === undefined && isOpen && (React.createElement("div", { className: "absolute z-10 w-full rounded-b-md border border-bia-grey-dark-10 bg-primary-white shadow-lg", ref: optionsRef, onClick: onClickDropdown }, options.map(function (option) {
|
|
2647
2669
|
var isSelected = JSON.stringify(option) === JSON.stringify(selected);
|
|
@@ -3097,10 +3119,19 @@ var FormGroup = function (_a) {
|
|
|
3097
3119
|
var children = _a.children, size = _a.size;
|
|
3098
3120
|
var validSize = validUnion(size, sizeUnion$1);
|
|
3099
3121
|
return (React.createElement("div", { className: "bianic-form-group flex items-end" }, Children.map(children, function (child) {
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3122
|
+
var _a;
|
|
3123
|
+
if (!React.isValidElement(child))
|
|
3124
|
+
return child;
|
|
3125
|
+
if (typeof child.type === 'string') {
|
|
3126
|
+
var existingClassName = (_a = child.props.className) !== null && _a !== void 0 ? _a : '';
|
|
3127
|
+
var mergedClassName = [existingClassName, 'bianic-fgc-container']
|
|
3128
|
+
.filter(Boolean)
|
|
3129
|
+
.join(' ');
|
|
3130
|
+
return cloneElement(child, {
|
|
3131
|
+
className: mergedClassName,
|
|
3132
|
+
});
|
|
3133
|
+
}
|
|
3134
|
+
return cloneElement(child, { size: validSize });
|
|
3104
3135
|
})));
|
|
3105
3136
|
};
|
|
3106
3137
|
|
|
@@ -4038,6 +4069,12 @@ var Port = function (_a) {
|
|
|
4038
4069
|
React.createElement("path", { d: "M11.9998 3.81818C16.5185 3.81818 20.1814 7.48121 20.1815 11.9998C20.1815 16.5185 16.5185 20.1815 11.9998 20.1815C7.4812 20.1814 3.81818 16.5185 3.81818 11.9998C3.81827 7.48127 7.48126 3.81828 11.9998 3.81818ZM12.0008 7.09064C11.7838 7.09064 11.5751 7.17744 11.4217 7.33088C11.2684 7.48427 11.1825 7.69214 11.1824 7.909V11.1815H7.909C7.69216 11.1816 7.48421 11.2684 7.33087 11.4217C7.17755 11.5751 7.09166 11.783 7.09161 11.9998C7.09161 12.2168 7.17743 12.4255 7.33087 12.5789C7.48419 12.7321 7.69224 12.8181 7.909 12.8182H11.1824V16.0906C11.1824 16.3076 11.2683 16.5163 11.4217 16.6697C11.5751 16.8231 11.7838 16.909 12.0008 16.909C12.2176 16.9089 12.4256 16.823 12.5789 16.6697C12.7324 16.5163 12.8182 16.3076 12.8182 16.0906V12.8182H16.0916C16.3084 12.8181 16.5164 12.7321 16.6697 12.5789C16.8232 12.4255 16.909 12.2168 16.909 11.9998C16.9089 11.7829 16.8231 11.5751 16.6697 11.4217C16.5164 11.2683 16.3085 11.1816 16.0916 11.1815H12.8182V7.909C12.8182 7.69213 12.7322 7.48428 12.5789 7.33088C12.4256 7.17755 12.2176 7.09076 12.0008 7.09064Z", fill: "inherit" })));
|
|
4039
4070
|
};
|
|
4040
4071
|
|
|
4072
|
+
var Rhombus = function (_a) {
|
|
4073
|
+
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4074
|
+
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4075
|
+
React.createElement("path", { d: "M11.5884 7.24696C11.8417 7.09495 12.1583 7.09495 12.4116 7.24696L18.8567 11.114C19.3745 11.4247 19.3745 12.1753 18.8567 12.486L12.4116 16.353C12.1583 16.505 11.8417 16.505 11.5884 16.353L5.14332 12.486C4.62545 12.1753 4.62545 11.4247 5.14332 11.114L11.5884 7.24696Z", fill: "inherit" })));
|
|
4076
|
+
};
|
|
4077
|
+
|
|
4041
4078
|
var SelectAllAdd = function (_a) {
|
|
4042
4079
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4043
4080
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -4065,10 +4102,13 @@ var Stack = function (_a) {
|
|
|
4065
4102
|
React.createElement("path", { d: "M11.5884 7.24696C11.8417 7.09495 12.1583 7.09495 12.4116 7.24696L18.8567 11.114C19.3745 11.4247 19.3745 12.1753 18.8567 12.486L12.4116 16.353C12.1583 16.505 11.8417 16.505 11.5884 16.353L5.14332 12.486C4.62545 12.1753 4.62545 11.4247 5.14332 11.114L11.5884 7.24696Z", fill: "inherit" })));
|
|
4066
4103
|
};
|
|
4067
4104
|
|
|
4068
|
-
var
|
|
4105
|
+
var Unlinked = function (_a) {
|
|
4069
4106
|
var className = _a.className, _b = _a.fill, fill = _b === void 0 ? 'currentColor' : _b, _c = _a.size, size = _c === void 0 ? 20 : _c;
|
|
4070
4107
|
return (React.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24", fill: fill, xmlns: "http://www.w3.org/2000/svg" },
|
|
4071
|
-
React.createElement("path", { d: "
|
|
4108
|
+
React.createElement("path", { d: "M21.293 16.293C21.6835 15.9025 22.3165 15.9024 22.707 16.293C23.0975 16.6835 23.0975 17.3165 22.707 17.707L20.9141 19.5L22.707 21.293C23.0975 21.6835 23.0975 22.3165 22.707 22.707C22.3165 23.0975 21.6835 23.0975 21.293 22.707L19.5 20.9141L17.707 22.707C17.3165 23.0975 16.6835 23.0975 16.293 22.707C15.9024 22.3165 15.9024 21.6835 16.293 21.293L18.0859 19.5L16.293 17.707C15.9024 17.3165 15.9024 16.6835 16.293 16.293C16.6835 15.9025 17.3165 15.9024 17.707 16.293L19.5 18.0859L21.293 16.293Z", fill: "#2F2F2F" }),
|
|
4109
|
+
React.createElement("path", { d: "M5.33789 10.251C5.75171 9.88533 6.38331 9.92416 6.74902 10.3379C7.11467 10.7517 7.07583 11.3833 6.66211 11.749L6.16016 12.1924C5.79549 12.5578 5.50566 12.9912 5.30664 13.4678C5.10428 13.9525 5.00006 14.4728 5 14.998C5 15.5234 5.10422 16.0445 5.30664 16.5293C5.50905 17.0139 5.80525 17.454 6.17871 17.8232C6.94016 18.5762 7.9682 18.9979 9.03906 18.998C10.0861 18.998 11.0926 18.5947 11.8486 17.873L12.1973 17.4033C12.5268 16.9601 13.1535 16.8678 13.5967 17.1973C14.0399 17.5268 14.1322 18.1535 13.8027 18.5967L13.4053 19.1309C13.3751 19.1714 13.3416 19.2096 13.3057 19.2451C12.1697 20.3683 10.6365 20.998 9.03906 20.998C7.44166 20.9979 5.90831 20.3683 4.77246 19.2451C4.21094 18.6898 3.76524 18.0285 3.46094 17.2998C3.15659 16.5709 3 15.788 3 14.998C3.00006 14.2083 3.15665 13.4261 3.46094 12.6973C3.76524 11.9685 4.21094 11.3072 4.77246 10.752C4.78565 10.7389 4.79958 10.7262 4.81348 10.7139L5.33789 10.251Z", fill: "#2F2F2F" }),
|
|
4110
|
+
React.createElement("path", { d: "M14.293 8.29297C14.6835 7.90244 15.3165 7.90244 15.707 8.29297C16.0976 8.68349 16.0976 9.31651 15.707 9.70703L9.70703 15.707C9.31651 16.0976 8.68349 16.0976 8.29297 15.707C7.90244 15.3165 7.90244 14.6835 8.29297 14.293L14.293 8.29297Z", fill: "#2F2F2F" }),
|
|
4111
|
+
React.createElement("path", { d: "M14.999 3C16.5903 3.00014 18.116 3.6325 19.2412 4.75781C20.3663 5.88307 20.999 7.40877 20.999 9C20.9989 10.5913 20.3665 12.118 19.2412 13.2432C19.2247 13.2597 19.2071 13.2757 19.1895 13.291L18.6562 13.7549C18.2394 14.1171 17.6074 14.073 17.2451 13.6562C16.8829 13.2394 16.927 12.6074 17.3438 12.2451L17.8506 11.8057C18.5863 11.0578 18.999 10.0499 18.999 9C18.999 7.93919 18.5772 6.92206 17.8271 6.17188C17.0771 5.42168 16.0599 5.00014 14.999 5C13.9496 4.99993 12.9422 5.41159 12.1943 6.14648L11.7568 6.65332C11.3959 7.07118 10.7646 7.11762 10.3467 6.75684C9.92881 6.39588 9.88237 5.76463 10.2432 5.34668L10.7061 4.81055C10.722 4.79214 10.7387 4.77404 10.7559 4.75684C11.8812 3.63164 13.4076 2.99989 14.999 3Z", fill: "#2F2F2F" })));
|
|
4072
4112
|
};
|
|
4073
4113
|
|
|
4074
4114
|
var VirtualPort = function (_a) {
|
|
@@ -4271,65 +4311,76 @@ Pills.defaultProps = {
|
|
|
4271
4311
|
var classConfig = {
|
|
4272
4312
|
top: {
|
|
4273
4313
|
tooltipContainer: 'bottom-[calc(100%+10px)] left-1/2 -translate-x-1/2',
|
|
4274
|
-
|
|
4275
|
-
|
|
4314
|
+
// Positioned at the bottom, pointing down: needs right and bottom borders
|
|
4315
|
+
triangleContainer: 'left-0 -bottom-[3px] flex justify-center w-full h-auto',
|
|
4316
|
+
triangleBorders: 'border-r border-b',
|
|
4276
4317
|
},
|
|
4277
4318
|
right: {
|
|
4278
4319
|
tooltipContainer: 'left-[calc(100%+10px)] top-1/2 -translate-y-1/2',
|
|
4279
|
-
|
|
4280
|
-
|
|
4320
|
+
// Positioned on the left, pointing left: needs bottom and left borders
|
|
4321
|
+
triangleContainer: '-left-[3px] bottom-0 flex items-center w-auto h-full',
|
|
4322
|
+
triangleBorders: 'border-b border-l',
|
|
4281
4323
|
},
|
|
4282
4324
|
bottom: {
|
|
4283
|
-
tooltipContainer: 'top-[calc(100%+
|
|
4284
|
-
|
|
4285
|
-
|
|
4325
|
+
tooltipContainer: 'top-[calc(100%+20px)] left-1/2 -translate-x-1/2',
|
|
4326
|
+
// Positioned at the top, pointing up: needs left and top borders
|
|
4327
|
+
triangleContainer: 'px-[10px] left-0 -top-[3px] flex justify-center w-full h-auto',
|
|
4328
|
+
triangleBorders: 'border-l border-t',
|
|
4286
4329
|
},
|
|
4287
4330
|
left: {
|
|
4288
4331
|
tooltipContainer: 'right-[calc(100%+10px)] top-1/2 -translate-y-1/2',
|
|
4289
|
-
|
|
4290
|
-
|
|
4332
|
+
// Positioned on the right, pointing right: needs top and right borders
|
|
4333
|
+
triangleContainer: '-right-[3px] bottom-0 flex items-center w-auto h-full',
|
|
4334
|
+
triangleBorders: 'border-t border-r',
|
|
4291
4335
|
},
|
|
4292
4336
|
'top-right': {
|
|
4293
4337
|
tooltipContainer: 'bottom-[calc(100%+10px)] right-0',
|
|
4294
|
-
triangleContainer: 'px-[10px] left-0 -bottom-[
|
|
4295
|
-
|
|
4338
|
+
triangleContainer: 'px-[10px] left-0 -bottom-[3px] flex justify-end w-full h-auto',
|
|
4339
|
+
triangleBorders: 'border-r border-b',
|
|
4296
4340
|
},
|
|
4297
4341
|
'top-left': {
|
|
4298
4342
|
tooltipContainer: 'bottom-[calc(100%+10px)] left-0',
|
|
4299
|
-
triangleContainer: 'px-[10px] left-0 -bottom-[
|
|
4300
|
-
|
|
4343
|
+
triangleContainer: 'px-[10px] left-0 -bottom-[3px] flex justify-start w-full h-auto',
|
|
4344
|
+
triangleBorders: 'border-r border-b',
|
|
4301
4345
|
},
|
|
4302
4346
|
'bottom-right': {
|
|
4303
4347
|
tooltipContainer: 'top-[calc(100%+10px)] right-0',
|
|
4304
|
-
triangleContainer: 'px-[10px] left-0 -top-[
|
|
4305
|
-
|
|
4348
|
+
triangleContainer: 'px-[10px] left-0 -top-[3px] flex justify-end w-full h-auto',
|
|
4349
|
+
triangleBorders: 'border-l border-t',
|
|
4306
4350
|
},
|
|
4307
4351
|
'bottom-left': {
|
|
4308
4352
|
tooltipContainer: 'top-[calc(100%+10px)] left-0',
|
|
4309
|
-
triangleContainer: 'px-[10px] left-0 -top-[
|
|
4310
|
-
|
|
4353
|
+
triangleContainer: 'px-[10px] left-0 -top-[3px] flex justify-start w-full h-auto',
|
|
4354
|
+
triangleBorders: 'border-l border-t',
|
|
4311
4355
|
},
|
|
4312
4356
|
};
|
|
4313
4357
|
|
|
4314
4358
|
function Popover(_a) {
|
|
4315
|
-
var className = _a.className, children = _a.children, content = _a.content, _b = _a.direction, direction = _b === void 0 ? 'bottom' : _b; _a.maxWidth; var _c = _a.title, title = _c === void 0 ? '' : _c, style = _a.style, zIndex = _a.zIndex;
|
|
4359
|
+
var className = _a.className, children = _a.children, content = _a.content, _b = _a.direction, direction = _b === void 0 ? 'bottom' : _b; _a.maxWidth; var _c = _a.title, title = _c === void 0 ? '' : _c, style = _a.style, zIndex = _a.zIndex, _d = _a.color, color = _d === void 0 ? 'black' : _d;
|
|
4316
4360
|
var wrapperRef = useRef(null);
|
|
4317
|
-
var
|
|
4361
|
+
var _e = useDetectOutsideClick(wrapperRef, false), isOpen = _e[0], setIsOpen = _e[1];
|
|
4318
4362
|
return (React.createElement("div", { className: "Bianic-popover-Wrapper relative block h-fit w-fit", role: "button", ref: wrapperRef, onClick: function () { return setIsOpen(true); } },
|
|
4319
4363
|
children,
|
|
4320
|
-
isOpen && (React.createElement(PopoverItem, { title: title, content: content, anchorRef: wrapperRef, direction: direction, className: className, style: style, zIndex: zIndex }))));
|
|
4364
|
+
isOpen && (React.createElement(PopoverItem, { title: title, content: content, anchorRef: wrapperRef, direction: direction, className: className, style: style, zIndex: zIndex, color: color }))));
|
|
4321
4365
|
}
|
|
4322
4366
|
var PopoverItem = function (_a) {
|
|
4323
|
-
var title = _a.title, content = _a.content, anchorRef = _a.anchorRef, direction = _a.direction, className = _a.className, style = _a.style, zIndex = _a.zIndex;
|
|
4367
|
+
var title = _a.title, content = _a.content, anchorRef = _a.anchorRef, direction = _a.direction, className = _a.className, style = _a.style, zIndex = _a.zIndex, _b = _a.color, color = _b === void 0 ? 'black' : _b;
|
|
4324
4368
|
var popoverRef = useRef(null);
|
|
4325
4369
|
var positionStyle = usePopupPosition(anchorRef, popoverRef, direction)[0];
|
|
4326
|
-
var
|
|
4327
|
-
|
|
4328
|
-
|
|
4370
|
+
var _c = classConfig[direction], triangleContainer = _c.triangleContainer, triangleBorders = _c.triangleBorders;
|
|
4371
|
+
var triangleThemeClasses = color === 'white'
|
|
4372
|
+
? "".concat(triangleBorders, " border-bia-grey bg-primary-white")
|
|
4373
|
+
: 'bg-primary-black';
|
|
4374
|
+
var colorClass = color === 'black'
|
|
4375
|
+
? 'bg-primary-black text-primary-white'
|
|
4376
|
+
: 'bg-primary-white border border-bia-grey text-primary-black';
|
|
4377
|
+
console.log('positionStyle', positionStyle);
|
|
4378
|
+
return createPortal(React.createElement("div", { ref: popoverRef, style: __assign(__assign(__assign({}, positionStyle), style), { zIndex: zIndex }), className: "Bianic-popover absolute z-50 w-fit" },
|
|
4379
|
+
React.createElement("div", { className: "text-bia-sm flex w-[245px] flex-col space-y-[5px] rounded-[4px] px-[20px] py-[17.5px] ".concat(colorClass, " ").concat(className) },
|
|
4329
4380
|
React.createElement("div", { className: "mb-[5px] font-humnst777 text-[16px] font-bold leading-[19.42px]" }, title),
|
|
4330
4381
|
React.createElement("div", { className: "break-words font-segoe text-[12px] font-normal" }, content)),
|
|
4331
|
-
React.createElement("div", { className: "triangle absolute ".concat(triangleContainer) },
|
|
4332
|
-
React.createElement("div", { className: "h-
|
|
4382
|
+
React.createElement("div", { className: "triangle absolute ".concat(triangleContainer, " pointer-events-none") },
|
|
4383
|
+
React.createElement("div", { className: "h-[7px] w-[7px] rotate-45 transform ".concat(triangleThemeClasses) }))), document.body);
|
|
4333
4384
|
};
|
|
4334
4385
|
Popover.defaultProps = {
|
|
4335
4386
|
direction: 'top',
|
|
@@ -4556,21 +4607,20 @@ SidebarContainer.displayName = 'SidebarContainer';
|
|
|
4556
4607
|
var SidebarMenu = function (_a) {
|
|
4557
4608
|
var _b = _a.color, color = _b === void 0 ? 'margueriteblue-dark-30' : _b, children = _a.children, _c = _a.isMinimized, isMinimized = _c === void 0 ? false : _c, _d = _a.activeId, activeId = _d === void 0 ? undefined : _d, _e = _a.setActiveId, setActiveId = _e === void 0 ? function () { } : _e;
|
|
4558
4609
|
var _f = useState(false), isAllExpanded = _f[0], setIsAllExpanded = _f[1];
|
|
4559
|
-
var menuClass = "transition-sidebar-menu-menu h-[60px]";
|
|
4560
4610
|
var minimizedMenuClass = isMinimized
|
|
4561
4611
|
? 'opacity-100 h-1 w-full delay-[600ms] duration-300 ease-[cubic-bezier(0.68,-0.1,0.32,2)]'
|
|
4562
|
-
: 'opacity-0
|
|
4612
|
+
: 'opacity-0 h-1 duration-500 ease-[cubic-bezier(0.32,-1,0.68,1)]';
|
|
4563
4613
|
return (React.createElement("div", null,
|
|
4564
|
-
React.createElement("div", { className: "relative flex w-full text-bia-white
|
|
4614
|
+
React.createElement("div", { className: "relative flex h-[60px] w-full text-bia-white" },
|
|
4565
4615
|
React.createElement("div", { className: "absolute left-0 top-[27.5px] px-[17px] ".concat(minimizedMenuClass) },
|
|
4566
|
-
React.createElement("div", { className: "h-[1px] w-full bg-white" })),
|
|
4567
|
-
React.createElement("div", { className:
|
|
4616
|
+
React.createElement("div", { className: "h-[1px] w-full bg-white opacity-35" })),
|
|
4617
|
+
React.createElement("div", { className: cn('transition-sidebar-item absolute bottom-[11px] flex w-full justify-between pr-[25px]', isMinimized ? 'pl-[58px]' : 'pl-[78px]') },
|
|
4568
4618
|
React.createElement(Text, { variant: "small-text", className: cn('truncate text-bia-white delay-[400ms]', isMinimized
|
|
4569
4619
|
? 'opacity-0 duration-300 ease-in-out'
|
|
4570
4620
|
: 'opacity-75 delay-1000 duration-700 ease-in-out') }, "Menu"),
|
|
4571
4621
|
React.createElement(ContextualButton, { onClick: function () { return setIsAllExpanded(function (prev) { return !prev; }); }, icon: React.createElement(TbChevronsDown, { className: cn('truncate text-bia-white delay-[400ms]', isMinimized
|
|
4572
4622
|
? 'opacity-0 duration-300 ease-in-out'
|
|
4573
|
-
: 'opacity-100 delay-1000 duration-700 ease-in-out'), size: 18 }), className: "ml-auto opacity-50 hover:opacity-100 ".concat(isAllExpanded ? 'rotate-180' : '') }))),
|
|
4623
|
+
: 'opacity-100 delay-1000 duration-700 ease-in-out'), size: 18 }), className: "ml-auto opacity-50 duration-300 ease-in hover:opacity-100 ".concat(isAllExpanded ? 'rotate-180' : '') }))),
|
|
4574
4624
|
Children.map(children, function (child) {
|
|
4575
4625
|
return isValidElement(child)
|
|
4576
4626
|
? cloneElement(child, {
|
|
@@ -5191,10 +5241,10 @@ var EmptyTable = function (_a) {
|
|
|
5191
5241
|
|
|
5192
5242
|
var tableSizeOption = [10, 20, 50, 100, 999];
|
|
5193
5243
|
var TableFooterController = function (_a) {
|
|
5194
|
-
var currentPage = _a.currentPage, totalPages = _a.totalPages, pageSize = _a.pageSize, setCurrentPage = _a.setCurrentPage, setPageSize = _a.setPageSize, isLoading = _a.isLoading;
|
|
5244
|
+
var currentPage = _a.currentPage, totalPages = _a.totalPages, pageSize = _a.pageSize, setCurrentPage = _a.setCurrentPage, setPageSize = _a.setPageSize, isLoading = _a.isLoading, _b = _a.size, size = _b === void 0 ? 'sm' : _b;
|
|
5195
5245
|
// Table Button
|
|
5196
5246
|
var tableSizeRef = useRef(null);
|
|
5197
|
-
var
|
|
5247
|
+
var _c = useState(false), isShownTableSizeDropdown = _c[0], setIsShownTableSizeDropdown = _c[1];
|
|
5198
5248
|
var handlePageSizeChange = function (size) {
|
|
5199
5249
|
setPageSize(size);
|
|
5200
5250
|
setCurrentPage(1);
|
|
@@ -5204,19 +5254,22 @@ var TableFooterController = function (_a) {
|
|
|
5204
5254
|
var displayValue = value === 999 ? 'All' : value;
|
|
5205
5255
|
return React.createElement(DropdownItem, { key: value, content: displayValue, value: value });
|
|
5206
5256
|
})));
|
|
5207
|
-
|
|
5257
|
+
var paddingSize = size === 'md' ? 'py-2.5 pt-[9px]' : 'py-[3.5px] pt-[4.5px]';
|
|
5258
|
+
return (React.createElement("div", { className: "table-controller-footer flex w-full justify-between gap-[5px] rounded-b-radius-lg border-t border-bia-grey bg-bia-grey-light-80 px-2.5 ".concat(paddingSize) },
|
|
5208
5259
|
React.createElement("div", { className: "action-container flex gap-[5px]" }, totalPages > 0 && (React.createElement(PaginationBar, { size: "sm", currentPage: currentPage, totalPages: totalPages, onPageChange: setCurrentPage, position: 'center' }))),
|
|
5209
5260
|
React.createElement(Button, { ref: tableSizeRef, label: pageSizeDisplay, minWidth: 0, size: "sm", iconRight: React.createElement(TbChevronDown, { size: 14 }), onClick: function () { return setIsShownTableSizeDropdown(function (oldState) { return !oldState; }); }, disabled: isLoading, className: "w-fit" }),
|
|
5210
5261
|
tableSizeDropdown));
|
|
5211
5262
|
};
|
|
5212
5263
|
|
|
5213
5264
|
var TableHeaderController = function (_a) {
|
|
5214
|
-
var buttonActions = _a.buttonActions, totalData = _a.totalData, firstIndex = _a.firstIndex, lastIndex = _a.lastIndex;
|
|
5265
|
+
var _b = _a.size, size = _b === void 0 ? 'sm' : _b, buttonActions = _a.buttonActions, totalData = _a.totalData, firstIndex = _a.firstIndex, lastIndex = _a.lastIndex;
|
|
5215
5266
|
var isShowHelperText = totalData || firstIndex || lastIndex;
|
|
5216
|
-
|
|
5267
|
+
var paddingSize = size === 'md' ? 'py-[13px] pt-[14px] ' : 'py-[7px] pt-2';
|
|
5268
|
+
var textSize = size === 'md' ? 'normal-text' : 'small-text';
|
|
5269
|
+
return (React.createElement("div", { className: "table-controller-header flex w-full justify-between rounded-t-radius-lg border-b border-bia-grey bg-bia-grey-light-80 px-2.5 ".concat(paddingSize) },
|
|
5217
5270
|
React.createElement("div", { className: "action-container flex grow gap-[5px] pe-2.5" }, buttonActions && (buttonActions === null || buttonActions === void 0 ? void 0 : buttonActions.map(function (button) { return button; }))),
|
|
5218
5271
|
isShowHelperText && (React.createElement("div", { className: "flex max-h-[22px] items-center font-segoe" },
|
|
5219
|
-
React.createElement(Text, { variant:
|
|
5272
|
+
React.createElement(Text, { variant: textSize, className: "text-bia-coolgrey" },
|
|
5220
5273
|
"View ",
|
|
5221
5274
|
lastIndex === 0 ? 0 : firstIndex,
|
|
5222
5275
|
" - ",
|
|
@@ -5478,4 +5531,4 @@ var useTableDataHandler = function (initialData, options) {
|
|
|
5478
5531
|
};
|
|
5479
5532
|
};
|
|
5480
5533
|
|
|
5481
|
-
export { Accordions, Alert, Avatar, AlertRoundedSquare as BCAlertRoundedSquare, CubeHeader as BCCubeHeader, Discrepancy as BCDiscrepancy, ExposedPort as BCExposedPort, FQAnalytical as BCFQAnalytical, FQGetaway as BCFQGetaway, FQModeler as BCFQModeler, FQOperation as BCFQOperation, FQWelldone as BCFQWelldone, Flowqount as BCFlowqount, Inlet as BCInlet, Legend as BCLegend, ModalBalance as BCModalBalance, Neutral as BCNeutral, Node as BCNode, Outlet as BCOutlet, Port as BCPort, Rhombus as BCRhombus, SelectAllAdd as BCSelectAllAdd, SelectAllRemove as BCSelectAllRemove, Spinner$1 as BCSpinner, Stack as BCStack, VirtualPort as BCVirtualPort, Badge, Banner, BlockLoading, Brand, Breadcrumb, Button, ButtonApp, Card, Checkbox, Color, ContextualButton, Countdown, DatePicker, Display, Divider, DropdownContainer, DropdownItem, EmptyTable, FileTree, FormGroup, FormGroupButton, FormGroupLabel, FormLabel, Heading, InfoPanel, Link, LiveSearch, MenuContainer, MenuItem, Modal, MonospaceBadge, Notification, P, PaginationBar, PickerCalendar, Pills, Popover, ProgressBar, ProgressCircle, Radio, ResizeableDiv, SegmentButtonGroup, SegmentButtonItem, SelectInput, SidebarContainer, SidebarItem, SidebarMenu, SidebarProfile, Slider, Spinner, Tab, TabMenu, Table, TableBody, TableCell, TableFooterController, TableHead, TableHeaderController, TableRow, TableSearchInput, TagLabel, Text, TextArea, TextInput, Toaster, Toggle, Tooltip, TreeItem, StepperItem as VerticalStepper, Window, getRelativeTime, useFileTree, useTableDataHandler };
|
|
5534
|
+
export { Accordions, Alert, Avatar, AlertRoundedSquare as BCAlertRoundedSquare, CubeHeader as BCCubeHeader, Discrepancy as BCDiscrepancy, ExposedPort as BCExposedPort, FQAnalytical as BCFQAnalytical, FQGetaway as BCFQGetaway, FQModeler as BCFQModeler, FQOperation as BCFQOperation, FQWelldone as BCFQWelldone, Flowqount as BCFlowqount, Inlet as BCInlet, Legend as BCLegend, ModalBalance as BCModalBalance, Neutral as BCNeutral, Node as BCNode, Outlet as BCOutlet, Port as BCPort, Rhombus as BCRhombus, SelectAllAdd as BCSelectAllAdd, SelectAllRemove as BCSelectAllRemove, Spinner$1 as BCSpinner, Stack as BCStack, Unlinked as BCUnlinked, VirtualPort as BCVirtualPort, Badge, Banner, BlockLoading, Brand, Breadcrumb, Button, ButtonApp, Card, Checkbox, Color, ContextualButton, Countdown, DatePicker, Display, Divider, DropdownContainer, DropdownItem, EmptyTable, FileTree, FormGroup, FormGroupButton, FormGroupLabel, FormLabel, Heading, InfoPanel, Link, LiveSearch, MenuContainer, MenuItem, Modal, MonospaceBadge, Notification, P, PaginationBar, PickerCalendar, Pills, Popover, ProgressBar, ProgressCircle, Radio, ResizeableDiv, SegmentButtonGroup, SegmentButtonItem, SelectInput, SidebarContainer, SidebarItem, SidebarMenu, SidebarProfile, Slider, Spinner, Tab, TabMenu, Table, TableBody, TableCell, TableFooterController, TableHead, TableHeaderController, TableRow, TableSearchInput, TagLabel, Text, TextArea, TextInput, Toaster, Toggle, Tooltip, TreeItem, StepperItem as VerticalStepper, Window, getRelativeTime, useFileTree, useTableDataHandler };
|