bianic-ui 2.10.0-beta.2 → 2.10.2-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/Empty.svg +12 -0
- package/dist/cjs/index.js +669 -3404
- package/dist/cjs/lib.css +1 -1
- package/dist/cjs/types/components/Countdown/index.d.ts +1 -0
- package/dist/cjs/types/components/Forms/Checkbox/index.d.ts +2 -1
- package/dist/cjs/types/components/Forms/Dropdown/DropdownContainer.d.ts +1 -1
- 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/Sidebar/SidebarCointainer.d.ts +7 -6
- package/dist/cjs/types/components/Sidebar/SidebarItem.d.ts +9 -5
- package/dist/cjs/types/components/Sidebar/SidebarMenu.d.ts +10 -0
- package/dist/cjs/types/components/Sidebar/SidebarProfile.d.ts +17 -0
- package/dist/cjs/types/components/Sidebar/config.d.ts +21 -0
- package/dist/cjs/types/components/Sidebar/index.d.ts +2 -0
- package/dist/cjs/types/components/Table/Table.d.ts +6 -0
- package/dist/cjs/types/components/Table/TableBody.d.ts +6 -0
- package/dist/cjs/types/components/Table/TableHead.d.ts +6 -0
- package/dist/cjs/types/components/Table/TableRow/index.d.ts +6 -0
- package/dist/cjs/types/components/Table/TableUtility/BlockLoading.d.ts +6 -0
- package/dist/cjs/types/components/Table/TableUtility/EmptyTable.d.ts +7 -0
- package/dist/cjs/types/components/Table/TableUtility/TableFooterController.d.ts +13 -0
- package/dist/cjs/types/components/Table/TableUtility/TableHeaderController.d.ts +10 -0
- package/dist/cjs/types/components/Table/TableUtility/TableSearchInput.d.ts +11 -0
- package/dist/cjs/types/components/Table/TableUtility/index.d.ts +5 -0
- package/dist/cjs/types/components/Table/index.d.ts +5 -0
- package/dist/cjs/types/components/TagLabel/index.d.ts +1 -1
- package/dist/cjs/types/components/Tooltip/PropsInterface.d.ts +1 -0
- package/dist/cjs/types/components/index.d.ts +3 -2
- package/dist/cjs/types/image/index.d.ts +2 -0
- package/dist/cjs/types/stories/Banner.stories.d.ts +1 -0
- package/dist/cjs/types/stories/Form/Checkbox/Checkbox.stories.d.ts +0 -1
- package/dist/cjs/types/stories/Form/Checkbox/CheckboxSimulation.stories.d.ts +0 -1
- package/dist/cjs/types/stories/Form/Dropdown/DropdownContainer.stories.d.ts +1 -1
- package/dist/cjs/types/stories/Icons/Unlinked.stories.d.ts +14 -0
- package/dist/cjs/types/stories/Sidebar/SidebarContainer.stories.d.ts +1 -2
- package/dist/cjs/types/stories/Sidebar/SidebarItem.stories.d.ts +1 -2
- package/dist/cjs/types/utility/helper.d.ts +2 -1
- package/dist/cjs/types/utility/hooks/useTableDataHandler.d.ts +54 -0
- package/dist/esm/Empty.svg +12 -0
- package/dist/esm/index.js +658 -3406
- package/dist/esm/lib.css +1 -1
- package/dist/esm/types/components/Countdown/index.d.ts +1 -0
- package/dist/esm/types/components/Forms/Checkbox/index.d.ts +2 -1
- package/dist/esm/types/components/Forms/Dropdown/DropdownContainer.d.ts +1 -1
- 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/Sidebar/SidebarCointainer.d.ts +7 -6
- package/dist/esm/types/components/Sidebar/SidebarItem.d.ts +9 -5
- package/dist/esm/types/components/Sidebar/SidebarMenu.d.ts +10 -0
- package/dist/esm/types/components/Sidebar/SidebarProfile.d.ts +17 -0
- package/dist/esm/types/components/Sidebar/config.d.ts +21 -0
- package/dist/esm/types/components/Sidebar/index.d.ts +2 -0
- package/dist/esm/types/components/Table/Table.d.ts +6 -0
- package/dist/esm/types/components/Table/TableBody.d.ts +6 -0
- package/dist/esm/types/components/Table/TableHead.d.ts +6 -0
- package/dist/esm/types/components/Table/TableRow/index.d.ts +6 -0
- package/dist/esm/types/components/Table/TableUtility/BlockLoading.d.ts +6 -0
- package/dist/esm/types/components/Table/TableUtility/EmptyTable.d.ts +7 -0
- package/dist/esm/types/components/Table/TableUtility/TableFooterController.d.ts +13 -0
- package/dist/esm/types/components/Table/TableUtility/TableHeaderController.d.ts +10 -0
- package/dist/esm/types/components/Table/TableUtility/TableSearchInput.d.ts +11 -0
- package/dist/esm/types/components/Table/TableUtility/index.d.ts +5 -0
- package/dist/esm/types/components/Table/index.d.ts +5 -0
- package/dist/esm/types/components/TagLabel/index.d.ts +1 -1
- package/dist/esm/types/components/Tooltip/PropsInterface.d.ts +1 -0
- package/dist/esm/types/components/index.d.ts +3 -2
- package/dist/esm/types/image/index.d.ts +2 -0
- package/dist/esm/types/stories/Banner.stories.d.ts +1 -0
- package/dist/esm/types/stories/Form/Checkbox/Checkbox.stories.d.ts +0 -1
- package/dist/esm/types/stories/Form/Checkbox/CheckboxSimulation.stories.d.ts +0 -1
- package/dist/esm/types/stories/Form/Dropdown/DropdownContainer.stories.d.ts +1 -1
- package/dist/esm/types/stories/Icons/Unlinked.stories.d.ts +14 -0
- package/dist/esm/types/stories/Sidebar/SidebarContainer.stories.d.ts +1 -2
- package/dist/esm/types/stories/Sidebar/SidebarItem.stories.d.ts +1 -2
- package/dist/esm/types/utility/helper.d.ts +2 -1
- package/dist/esm/types/utility/hooks/useTableDataHandler.d.ts +54 -0
- package/dist/index.d.ts +164 -18
- package/package.json +1 -1
- package/tailwind.config.js +19 -1
- package/src/font/SansCode/GoogleSansCode-Italic-VariableFont_MONO,wght.ttf:Zone.Identifier +0 -0
- package/src/font/SansCode/GoogleSansCode-VariableFont_MONO,wght.ttf:Zone.Identifier +0 -0
- package/src/font/SansCode/OFL.txt:Zone.Identifier +0 -0
- package/src/font/SansCode/README.txt:Zone.Identifier +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React$1, { ComponentPropsWithoutRef, ComponentPropsWithRef, ChangeEvent, ReactNode, MouseEvent, HTMLAttributes, KeyboardEvent } from 'react';
|
|
1
|
+
import React$1, { ComponentPropsWithoutRef, ComponentPropsWithRef, ChangeEvent, ReactNode, MouseEvent, HTMLAttributes, KeyboardEvent, Dispatch, SetStateAction } from 'react';
|
|
2
2
|
|
|
3
3
|
interface AccordionsProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
4
|
title: string;
|
|
@@ -153,6 +153,7 @@ declare function Color(): React$1.JSX.Element;
|
|
|
153
153
|
|
|
154
154
|
interface CountdownProps extends React$1.ComponentPropsWithoutRef<'div'> {
|
|
155
155
|
seconds: number;
|
|
156
|
+
maxSeconds: number;
|
|
156
157
|
variant?: 'countdown' | 'success';
|
|
157
158
|
}
|
|
158
159
|
declare const Countdown: React$1.ForwardRefExoticComponent<CountdownProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -328,8 +329,9 @@ interface CheckboxProps$1 extends Omit<ComponentPropsWithoutRef<'input'>, 'size'
|
|
|
328
329
|
label?: string;
|
|
329
330
|
onChange?: (event: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
330
331
|
value?: string | number | readonly string[] | undefined;
|
|
332
|
+
isIndeterminate?: boolean;
|
|
331
333
|
}
|
|
332
|
-
declare function Checkbox({ disabled, id, size, label, onChange, ...props }: CheckboxProps$1): React$1.JSX.Element;
|
|
334
|
+
declare function Checkbox({ disabled, id, size, label, onChange, isIndeterminate, ...props }: CheckboxProps$1): React$1.JSX.Element;
|
|
333
335
|
declare namespace Checkbox {
|
|
334
336
|
var defaultProps: {
|
|
335
337
|
disabled: boolean;
|
|
@@ -355,7 +357,7 @@ interface DropdownContainerProps extends ComponentPropsWithRef<'div'> {
|
|
|
355
357
|
onClickItem?: (event: React$1.MouseEvent<HTMLDivElement>, val: string | number | object) => void;
|
|
356
358
|
}
|
|
357
359
|
declare const DropdownContainer: {
|
|
358
|
-
(propsComp: DropdownContainerProps): React$1.JSX.Element
|
|
360
|
+
(propsComp: DropdownContainerProps): React$1.JSX.Element;
|
|
359
361
|
defaultProps: {
|
|
360
362
|
isTopFlat: boolean;
|
|
361
363
|
};
|
|
@@ -379,7 +381,7 @@ interface SelectInputProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size
|
|
|
379
381
|
dropContProps?: Omit<DropdownContainerProps, 'children'>;
|
|
380
382
|
}
|
|
381
383
|
|
|
382
|
-
declare function SelectInput({ descText, disabled, size, id, isValid, label, options, required, selected, setSelected, onClickDropdown, children, dropContProps: { className: dropContClassName, ...restDropContProps }, ...props }: SelectInputProps): React$1.JSX.Element;
|
|
384
|
+
declare function SelectInput({ descText, disabled, size, id, isValid, label, options, readOnly, required, selected, setSelected, onClickDropdown, children, dropContProps: { className: dropContClassName, ...restDropContProps }, ...props }: SelectInputProps): React$1.JSX.Element;
|
|
383
385
|
declare namespace SelectInput {
|
|
384
386
|
var defaultProps: {
|
|
385
387
|
descText: string;
|
|
@@ -600,6 +602,8 @@ declare const Outlet: ({ className, fill, size }: IconProps) => React$1.JSX.Elem
|
|
|
600
602
|
|
|
601
603
|
declare const Port: ({ className, fill, size }: IconProps) => React$1.JSX.Element;
|
|
602
604
|
|
|
605
|
+
declare const Rhombus: ({ className, fill, size, }: IconProps) => React$1.JSX.Element;
|
|
606
|
+
|
|
603
607
|
declare const SelectAllAdd: ({ className, fill, size, }: IconProps) => React$1.JSX.Element;
|
|
604
608
|
|
|
605
609
|
declare const SelectAllRemove: ({ className, fill, size, }: IconProps) => React$1.JSX.Element;
|
|
@@ -608,7 +612,7 @@ declare const Spinner$1: ({ className, fill, size }: IconProps) => React$1.JSX.E
|
|
|
608
612
|
|
|
609
613
|
declare const Stack: ({ className, fill, size }: IconProps) => React$1.JSX.Element;
|
|
610
614
|
|
|
611
|
-
declare const
|
|
615
|
+
declare const Unlinked: ({ className, fill, size, }: IconProps) => React$1.JSX.Element;
|
|
612
616
|
|
|
613
617
|
declare const VirtualPort: ({ className, fill, size }: IconProps) => React$1.JSX.Element;
|
|
614
618
|
|
|
@@ -678,10 +682,11 @@ interface PopoverProps {
|
|
|
678
682
|
title?: string;
|
|
679
683
|
style?: React.CSSProperties;
|
|
680
684
|
zIndex?: number;
|
|
685
|
+
color?: 'black' | 'white';
|
|
681
686
|
direction?: 'top' | 'right' | 'bottom' | 'left' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
682
687
|
}
|
|
683
688
|
|
|
684
|
-
declare function Popover({ className, children, content, direction, maxWidth, title, style, zIndex, }: PopoverProps): React$1.JSX.Element;
|
|
689
|
+
declare function Popover({ className, children, content, direction, maxWidth, title, style, zIndex, color, }: PopoverProps): React$1.JSX.Element;
|
|
685
690
|
declare namespace Popover {
|
|
686
691
|
var defaultProps: {
|
|
687
692
|
direction: string;
|
|
@@ -723,26 +728,56 @@ declare namespace ResizeableDiv {
|
|
|
723
728
|
};
|
|
724
729
|
}
|
|
725
730
|
|
|
726
|
-
interface SidebarContainerProps {
|
|
727
|
-
|
|
728
|
-
children?: ReactNode
|
|
731
|
+
interface SidebarContainerProps extends ComponentPropsWithoutRef<'div'> {
|
|
732
|
+
color?: string;
|
|
733
|
+
children?: ReactNode;
|
|
729
734
|
isMinimized?: boolean;
|
|
730
|
-
|
|
735
|
+
activeId?: string | null;
|
|
736
|
+
setActiveId?: (id?: string | null) => void;
|
|
731
737
|
}
|
|
732
|
-
declare const SidebarContainer:
|
|
738
|
+
declare const SidebarContainer: React$1.ForwardRefExoticComponent<SidebarContainerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
733
739
|
|
|
740
|
+
interface SidebarMenu {
|
|
741
|
+
color?: string;
|
|
742
|
+
children?: ReactNode;
|
|
743
|
+
isMinimized?: boolean;
|
|
744
|
+
activeId?: string | null;
|
|
745
|
+
setActiveId?: (id?: string | null) => void;
|
|
746
|
+
}
|
|
747
|
+
declare const SidebarMenu: ({ color, children, isMinimized, activeId, setActiveId, }: SidebarMenu) => React$1.JSX.Element;
|
|
748
|
+
|
|
749
|
+
type SidebarItemLevel = 0 | 1 | 2;
|
|
734
750
|
interface SidebarItemProps extends ComponentPropsWithoutRef<'button'> {
|
|
735
751
|
title: string;
|
|
736
752
|
icon?: React$1.ReactNode;
|
|
737
753
|
active?: boolean;
|
|
738
|
-
onClick?: () => void
|
|
754
|
+
onClick?: () => void;
|
|
739
755
|
children?: React$1.ReactNode;
|
|
740
756
|
isMinimized?: boolean;
|
|
741
|
-
isExpand?: boolean
|
|
742
|
-
notificationCount?: number
|
|
743
|
-
level?:
|
|
757
|
+
isExpand?: boolean;
|
|
758
|
+
notificationCount?: number;
|
|
759
|
+
level?: SidebarItemLevel;
|
|
760
|
+
activeId: string | null;
|
|
761
|
+
setActiveId?: (id?: string | null) => void;
|
|
762
|
+
color?: string;
|
|
763
|
+
}
|
|
764
|
+
declare const SidebarItem: React$1.ForwardRefExoticComponent<SidebarItemProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
765
|
+
|
|
766
|
+
interface SidebarProfileProps extends ComponentPropsWithoutRef<'button'> {
|
|
767
|
+
username: string;
|
|
768
|
+
role: string;
|
|
769
|
+
avatarImg?: React$1.ReactNode;
|
|
770
|
+
active?: boolean;
|
|
771
|
+
onClick?: () => void;
|
|
772
|
+
children?: React$1.ReactNode;
|
|
773
|
+
isMinimized?: boolean;
|
|
774
|
+
isExpand?: boolean;
|
|
775
|
+
notificationCount?: number;
|
|
776
|
+
activeId?: string | null;
|
|
777
|
+
setActiveId?: (id?: string | null) => void;
|
|
778
|
+
color?: string;
|
|
744
779
|
}
|
|
745
|
-
declare const
|
|
780
|
+
declare const SidebarProfile: React$1.ForwardRefExoticComponent<SidebarProfileProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
746
781
|
|
|
747
782
|
interface SliderProps {
|
|
748
783
|
disabled: boolean;
|
|
@@ -785,6 +820,14 @@ interface MoreDropdownTabProps extends BaseTabMenuProps {
|
|
|
785
820
|
type TabMenuProps = StandardTabProps | MoreDropdownTabProps;
|
|
786
821
|
declare const TabMenu: React$1.ForwardRefExoticComponent<TabMenuProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
787
822
|
|
|
823
|
+
interface tableProps extends ComponentPropsWithRef<'table'> {
|
|
824
|
+
}
|
|
825
|
+
declare const Table: ({ children, ...rest }: tableProps) => React$1.JSX.Element;
|
|
826
|
+
|
|
827
|
+
interface tableBodyProps extends ComponentPropsWithRef<'tbody'> {
|
|
828
|
+
}
|
|
829
|
+
declare const TableBody: ({ children, ...rest }: tableBodyProps) => React$1.JSX.Element;
|
|
830
|
+
|
|
788
831
|
interface TableCellProps extends ComponentPropsWithoutRef<'td'> {
|
|
789
832
|
variant?: 'head' | 'body';
|
|
790
833
|
lined?: boolean;
|
|
@@ -800,10 +843,59 @@ declare namespace TableCell {
|
|
|
800
843
|
};
|
|
801
844
|
}
|
|
802
845
|
|
|
846
|
+
interface tableHeadProps extends ComponentPropsWithRef<'thead'> {
|
|
847
|
+
}
|
|
848
|
+
declare const TableHead: ({ children, ...rest }: tableHeadProps) => React$1.JSX.Element;
|
|
849
|
+
|
|
850
|
+
interface TableRowProps extends ComponentPropsWithRef<'tr'> {
|
|
851
|
+
variant: 'head' | 'body';
|
|
852
|
+
}
|
|
853
|
+
declare const TableRow: ({ variant, children, ...rest }: TableRowProps) => React$1.JSX.Element;
|
|
854
|
+
|
|
855
|
+
interface BlockLoadingProps extends ComponentPropsWithoutRef<'div'> {
|
|
856
|
+
backgroundColor?: string;
|
|
857
|
+
}
|
|
858
|
+
declare const BlockLoading: ({ className, backgroundColor, }: BlockLoadingProps) => React$1.JSX.Element;
|
|
859
|
+
|
|
860
|
+
interface EmptyTableProps {
|
|
861
|
+
content?: string;
|
|
862
|
+
subContent: string;
|
|
863
|
+
}
|
|
864
|
+
declare const EmptyTable: ({ content, subContent }: EmptyTableProps) => React$1.JSX.Element;
|
|
865
|
+
|
|
866
|
+
interface TableFooterControllerProps extends ComponentPropsWithoutRef<'div'> {
|
|
867
|
+
size: 'sm' | 'md';
|
|
868
|
+
currentPage: number;
|
|
869
|
+
totalPages: number;
|
|
870
|
+
pageSize: number;
|
|
871
|
+
setCurrentPage: Dispatch<SetStateAction<number>>;
|
|
872
|
+
setPageSize: Dispatch<SetStateAction<number>>;
|
|
873
|
+
isLoading?: boolean;
|
|
874
|
+
}
|
|
875
|
+
declare const TableFooterController: ({ currentPage, totalPages, pageSize, setCurrentPage, setPageSize, isLoading, size, }: TableFooterControllerProps) => React$1.JSX.Element;
|
|
876
|
+
|
|
877
|
+
interface TableHeaderControllerProps extends ComponentPropsWithoutRef<'div'> {
|
|
878
|
+
size?: 'sm' | 'md';
|
|
879
|
+
buttonActions?: ReactNode[];
|
|
880
|
+
totalData?: number;
|
|
881
|
+
firstIndex?: number;
|
|
882
|
+
lastIndex?: number;
|
|
883
|
+
}
|
|
884
|
+
declare const TableHeaderController: ({ size, buttonActions, totalData, firstIndex, lastIndex, }: TableHeaderControllerProps) => React$1.JSX.Element;
|
|
885
|
+
|
|
886
|
+
interface TableSearchInputProps extends ComponentPropsWithoutRef<'input'> {
|
|
887
|
+
isShow: boolean;
|
|
888
|
+
onEnter?: any;
|
|
889
|
+
onClose?: any;
|
|
890
|
+
showEnter?: boolean;
|
|
891
|
+
showClose?: boolean;
|
|
892
|
+
}
|
|
893
|
+
declare const TableSearchInput: ({ isShow, value, onChange, placeholder, }: TableSearchInputProps) => React$1.JSX.Element | null;
|
|
894
|
+
|
|
803
895
|
interface TagLabelProps extends ComponentPropsWithoutRef<'div'> {
|
|
804
896
|
color: 'default' | 'blue' | 'teal' | 'green' | 'orange' | 'red' | 'black' | 'white' | 'custom';
|
|
805
897
|
size?: 'md' | 'sm' | 'tn';
|
|
806
|
-
variant?: 'label' | 'icon' | 'closeable';
|
|
898
|
+
variant?: 'label' | 'icon' | 'closeable' | 'monospace';
|
|
807
899
|
closeHandler?: () => void;
|
|
808
900
|
open?: boolean;
|
|
809
901
|
text: string;
|
|
@@ -957,4 +1049,58 @@ declare function Window({ size, title, zIndex, onClose, ...rest }: WindowProps):
|
|
|
957
1049
|
*/
|
|
958
1050
|
declare function getRelativeTime(date: Date): string;
|
|
959
1051
|
|
|
960
|
-
|
|
1052
|
+
type SortOrder = 'asc' | 'desc';
|
|
1053
|
+
/**
|
|
1054
|
+
* Configuration options for the useTableDataHandler hook.
|
|
1055
|
+
* * @interface UseTableDataOptions
|
|
1056
|
+
* @property {string[]} [searchKeys] - Specific object keys to check during client-side filtering. If omitted, defaults to all keys containing string values.
|
|
1057
|
+
* @property {string} [initialSortKey] - The object key to sort the table by on initial render.
|
|
1058
|
+
* @property {SortOrder} [initialSortOrder='asc'] - The initial sorting direction ('asc' or 'desc').
|
|
1059
|
+
* @property {boolean} [isFilterable=true] - Enables or disables client-side searching functionality.
|
|
1060
|
+
* @property {boolean} [isSortable=true] - Enables or disables client-side sorting functionality.
|
|
1061
|
+
* @property {boolean} [isServerSide=false] - If true, bypasses client-side processing, assuming filtering and sorting are handled by an API.
|
|
1062
|
+
*/
|
|
1063
|
+
interface UseTableDataOptions {
|
|
1064
|
+
searchKeys?: string[];
|
|
1065
|
+
initialSortKey?: string;
|
|
1066
|
+
initialSortOrder?: SortOrder;
|
|
1067
|
+
isFilterable?: boolean;
|
|
1068
|
+
isSortable?: boolean;
|
|
1069
|
+
isServerSide?: boolean;
|
|
1070
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* A custom hook to handle data processing for tables, managing internal states
|
|
1073
|
+
* for client-side filtering (searching) and sorting. It can also safely yield control
|
|
1074
|
+
* to server-side operations if configured.
|
|
1075
|
+
*
|
|
1076
|
+
* ### Key Features:
|
|
1077
|
+
* - **Automatic Key Detection:** Automatically finds string fields to search if no `searchKeys` are provided.
|
|
1078
|
+
* - **Smart Sorting:** Uses `localeCompare` for strings, standard operators for numbers, and gracefully handles `null`/`undefined` values by moving them to the bottom.
|
|
1079
|
+
* - **Server-Side Ready:** Setting `isServerSide: true` disables internal processing while preserving handlers for external API synchronization.
|
|
1080
|
+
*
|
|
1081
|
+
* @param {any[]} initialData - The raw array of data/rows to be displayed in the table.
|
|
1082
|
+
* @param {UseTableDataOptions} [options={}] - Optional configuration flags and initial states.
|
|
1083
|
+
* * @returns {Object} Table state and control handlers.
|
|
1084
|
+
* @returns {any[]} data - The processed array (filtered and sorted) ready for rendering.
|
|
1085
|
+
* @returns {string} searchTerm - The current text being filtered against.
|
|
1086
|
+
* @returns {string|undefined} sortKey - The current object key being used to sort.
|
|
1087
|
+
* @returns {SortOrder} sortOrder - The current direction of the sort ('asc' or 'desc').
|
|
1088
|
+
* @returns {(value: string) => void} handleSearchChange - Callback to update the search filter string.
|
|
1089
|
+
* @returns {(key: string) => void} handleSortChange - Callback to trigger sorting on a specific column. Toggles direction if called on the same column consecutively.
|
|
1090
|
+
*
|
|
1091
|
+
* @example
|
|
1092
|
+
* const { data, handleSearchChange, handleSortChange } = useTableDataHandler(users, {
|
|
1093
|
+
* searchKeys: ['name', 'email'],
|
|
1094
|
+
* initialSortKey: 'name'
|
|
1095
|
+
* });
|
|
1096
|
+
*/
|
|
1097
|
+
declare const useTableDataHandler: (initialData: any[], options?: UseTableDataOptions) => {
|
|
1098
|
+
data: any[];
|
|
1099
|
+
searchTerm: string;
|
|
1100
|
+
sortKey: string | undefined;
|
|
1101
|
+
sortOrder: SortOrder;
|
|
1102
|
+
handleSearchChange: (value: string) => void;
|
|
1103
|
+
handleSortChange: (key: string) => void;
|
|
1104
|
+
};
|
|
1105
|
+
|
|
1106
|
+
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 };
|
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.10.
|
|
6
|
+
"version": "2.10.2-beta.1",
|
|
7
7
|
"description": "Design Language System develop by BIAENERGI",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
package/tailwind.config.js
CHANGED
|
@@ -474,6 +474,10 @@ module.exports = {
|
|
|
474
474
|
},
|
|
475
475
|
},
|
|
476
476
|
extend: {
|
|
477
|
+
animation: {
|
|
478
|
+
// 0.45s animation duration running once, maintaining final state
|
|
479
|
+
'number-drop': 'number-drop 0.45s cubic-bezier(0.25, 1, 1, 1) forwards',
|
|
480
|
+
},
|
|
477
481
|
borderRadius: {
|
|
478
482
|
'radius-lg': '5px',
|
|
479
483
|
'radius-md': '4px',
|
|
@@ -481,7 +485,6 @@ module.exports = {
|
|
|
481
485
|
'radius-tn': '2.5px',
|
|
482
486
|
'radius-full': '1000px',
|
|
483
487
|
},
|
|
484
|
-
|
|
485
488
|
fontFamily: {
|
|
486
489
|
humnst777: ['humnst777', 'sans-serif'],
|
|
487
490
|
segoe: ['SegoeUI', 'sans-serif'],
|
|
@@ -568,6 +571,21 @@ module.exports = {
|
|
|
568
571
|
},
|
|
569
572
|
],
|
|
570
573
|
},
|
|
574
|
+
keyframes: {
|
|
575
|
+
'number-drop': {
|
|
576
|
+
'0%': {
|
|
577
|
+
transform: 'translateY(-50%)',
|
|
578
|
+
opacity: '0'
|
|
579
|
+
},
|
|
580
|
+
'40%': {
|
|
581
|
+
transform: 'translateY(7%)',
|
|
582
|
+
opacity: '1'
|
|
583
|
+
},
|
|
584
|
+
'100%': {
|
|
585
|
+
transform: 'translateY(0)'
|
|
586
|
+
},
|
|
587
|
+
},
|
|
588
|
+
},
|
|
571
589
|
},
|
|
572
590
|
},
|
|
573
591
|
plugins: [],
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|