@underverse-ui/underverse 0.1.3 → 0.1.5
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 +59 -3
- package/dist/index.cjs +2767 -2287
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +261 -21
- package/dist/index.d.ts +261 -21
- package/dist/index.js +2722 -2243
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { InputHTMLAttributes, TextareaHTMLAttributes, ReactNode, HTMLAttributes } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
5
|
import { VariantProps } from 'class-variance-authority';
|
|
5
6
|
import { ClassValue } from 'clsx';
|
|
@@ -125,7 +126,7 @@ interface CardProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
|
125
126
|
contentClassName?: string;
|
|
126
127
|
noPadding?: boolean;
|
|
127
128
|
}
|
|
128
|
-
declare const Card: ({ title, description, children, footer, className, hoverable, clickable, innerClassName, contentClassName, noPadding, onClick, ...rest }: CardProps) =>
|
|
129
|
+
declare const Card: ({ title, description, children, footer, className, hoverable, clickable, innerClassName, contentClassName, noPadding, onClick, ...rest }: CardProps) => react_jsx_runtime.JSX.Element;
|
|
129
130
|
|
|
130
131
|
interface CheckboxProps extends React$1.InputHTMLAttributes<HTMLInputElement> {
|
|
131
132
|
label?: React$1.ReactNode;
|
|
@@ -184,7 +185,7 @@ interface AvatarProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
184
185
|
size?: "sm" | "md" | "lg";
|
|
185
186
|
onClick?: () => void;
|
|
186
187
|
}
|
|
187
|
-
declare const Avatar: ({ src, alt, fallback, size, className, onClick, ...props }: AvatarProps) =>
|
|
188
|
+
declare const Avatar: ({ src, alt, fallback, size, className, onClick, ...props }: AvatarProps) => react_jsx_runtime.JSX.Element;
|
|
188
189
|
|
|
189
190
|
interface SkeletonProps {
|
|
190
191
|
className?: string;
|
|
@@ -328,7 +329,7 @@ interface AlertProps {
|
|
|
328
329
|
onClose?: () => void;
|
|
329
330
|
actions?: ReactNode;
|
|
330
331
|
}
|
|
331
|
-
declare const Alert: ({ title, description, variant, className, icon, dismissible, onClose, actions }: AlertProps) =>
|
|
332
|
+
declare const Alert: ({ title, description, variant, className, icon, dismissible, onClose, actions }: AlertProps) => react_jsx_runtime.JSX.Element | null;
|
|
332
333
|
|
|
333
334
|
interface GlobalLoadingProps {
|
|
334
335
|
className?: string;
|
|
@@ -583,7 +584,7 @@ interface CategoryTreeSelectProps {
|
|
|
583
584
|
placeholder?: string;
|
|
584
585
|
disabled?: boolean;
|
|
585
586
|
}
|
|
586
|
-
declare function CategoryTreeSelect({ categories, value, onChange, placeholder, disabled }: CategoryTreeSelectProps):
|
|
587
|
+
declare function CategoryTreeSelect({ categories, value, onChange, placeholder, disabled }: CategoryTreeSelectProps): react_jsx_runtime.JSX.Element;
|
|
587
588
|
|
|
588
589
|
type Fit = "cover" | "contain";
|
|
589
590
|
interface SmartImageProps {
|
|
@@ -612,7 +613,7 @@ interface SmartImageProps {
|
|
|
612
613
|
/** Optional fallback src if original fails. */
|
|
613
614
|
fallbackSrc?: string;
|
|
614
615
|
}
|
|
615
|
-
declare function SmartImage({ src, alt, className, ratioClass, roundedClass, fill, width, height, sizes, priority, quality, fit, fallbackSrc, }: SmartImageProps):
|
|
616
|
+
declare function SmartImage({ src, alt, className, ratioClass, roundedClass, fill, width, height, sizes, priority, quality, fit, fallbackSrc, }: SmartImageProps): react_jsx_runtime.JSX.Element;
|
|
616
617
|
|
|
617
618
|
interface UploadedImage {
|
|
618
619
|
id: number;
|
|
@@ -640,28 +641,20 @@ interface ImageUploadProps {
|
|
|
640
641
|
supportedFormatsText?: string;
|
|
641
642
|
}
|
|
642
643
|
declare function ImageUpload({ onUpload, onRemove, maxSize, // Convert bytes to MB
|
|
643
|
-
accept, multiple, disabled, className, showPreview, previewSize, dragDropText, browseText, supportedFormatsText }: ImageUploadProps):
|
|
644
|
-
|
|
645
|
-
interface ProductImageUploadProps {
|
|
646
|
-
value?: string;
|
|
647
|
-
onChange: (url: string) => void;
|
|
648
|
-
disabled?: boolean;
|
|
649
|
-
className?: string;
|
|
650
|
-
}
|
|
651
|
-
declare const ProductImageUpload: React__default.FC<ProductImageUploadProps>;
|
|
644
|
+
accept, multiple, disabled, className, showPreview, previewSize, dragDropText, browseText, supportedFormatsText }: ImageUploadProps): react_jsx_runtime.JSX.Element;
|
|
652
645
|
|
|
653
646
|
interface CarouselProps {
|
|
654
647
|
children: React$1.ReactNode[];
|
|
655
648
|
autoScroll?: boolean;
|
|
656
649
|
autoScrollInterval?: number;
|
|
657
650
|
}
|
|
658
|
-
declare function Carousel({ children, autoScroll, autoScrollInterval }: CarouselProps):
|
|
651
|
+
declare function Carousel({ children, autoScroll, autoScrollInterval }: CarouselProps): react_jsx_runtime.JSX.Element;
|
|
659
652
|
|
|
660
653
|
interface ClientOnlyProps {
|
|
661
654
|
children: React.ReactNode;
|
|
662
655
|
fallback?: React.ReactNode;
|
|
663
656
|
}
|
|
664
|
-
declare function ClientOnly({ children, fallback }: ClientOnlyProps):
|
|
657
|
+
declare function ClientOnly({ children, fallback }: ClientOnlyProps): react_jsx_runtime.JSX.Element;
|
|
665
658
|
|
|
666
659
|
interface LoadingSpinnerProps {
|
|
667
660
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -725,7 +718,7 @@ interface DataTableProps<T> {
|
|
|
725
718
|
className?: string;
|
|
726
719
|
}
|
|
727
720
|
declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, onQueryChange, caption, toolbar, enableColumnVisibilityToggle, enableDensityToggle, striped, // Mặc định bật màu nền sẽn kẽ cho các dòng
|
|
728
|
-
className, }: DataTableProps<T>):
|
|
721
|
+
className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
729
722
|
|
|
730
723
|
interface TableProps extends React__default.HTMLAttributes<HTMLTableElement> {
|
|
731
724
|
containerClassName?: string;
|
|
@@ -756,12 +749,12 @@ interface NotificationModalProps {
|
|
|
756
749
|
onClose: () => void;
|
|
757
750
|
notification: NotificationItem | null;
|
|
758
751
|
}
|
|
759
|
-
declare function NotificationModal({ isOpen, onClose, notification }: NotificationModalProps):
|
|
752
|
+
declare function NotificationModal({ isOpen, onClose, notification }: NotificationModalProps): react_jsx_runtime.JSX.Element | null;
|
|
760
753
|
|
|
761
754
|
interface FloatingContactsProps {
|
|
762
755
|
className?: string;
|
|
763
756
|
}
|
|
764
|
-
declare function FloatingContacts({ className }: FloatingContactsProps):
|
|
757
|
+
declare function FloatingContacts({ className }: FloatingContactsProps): react_jsx_runtime.JSX.Element | null;
|
|
765
758
|
|
|
766
759
|
type Variant = "destructive" | "warning" | "info";
|
|
767
760
|
interface AccessDeniedProps {
|
|
@@ -774,7 +767,7 @@ interface AccessDeniedProps {
|
|
|
774
767
|
className?: string;
|
|
775
768
|
children?: React__default.ReactNode;
|
|
776
769
|
}
|
|
777
|
-
declare function AccessDenied({ title, description, variant, icon: Icon, className, children, }: AccessDeniedProps):
|
|
770
|
+
declare function AccessDenied({ title, description, variant, icon: Icon, className, children, }: AccessDeniedProps): react_jsx_runtime.JSX.Element;
|
|
778
771
|
|
|
779
772
|
declare function cn(...inputs: ClassValue[]): string;
|
|
780
773
|
|
|
@@ -882,4 +875,251 @@ declare const VARIANT_STYLES_ALERT: {
|
|
|
882
875
|
error: string;
|
|
883
876
|
};
|
|
884
877
|
|
|
885
|
-
|
|
878
|
+
declare const underverseMessages: {
|
|
879
|
+
readonly en: {
|
|
880
|
+
Common: {
|
|
881
|
+
close: string;
|
|
882
|
+
closeAlert: string;
|
|
883
|
+
notifications: string;
|
|
884
|
+
newNotification: string;
|
|
885
|
+
readStatus: string;
|
|
886
|
+
openLink: string;
|
|
887
|
+
theme: string;
|
|
888
|
+
lightTheme: string;
|
|
889
|
+
darkTheme: string;
|
|
890
|
+
systemTheme: string;
|
|
891
|
+
density: string;
|
|
892
|
+
compact: string;
|
|
893
|
+
normal: string;
|
|
894
|
+
comfortable: string;
|
|
895
|
+
columns: string;
|
|
896
|
+
};
|
|
897
|
+
ValidationInput: {
|
|
898
|
+
required: string;
|
|
899
|
+
typeMismatch: string;
|
|
900
|
+
pattern: string;
|
|
901
|
+
tooShort: string;
|
|
902
|
+
tooLong: string;
|
|
903
|
+
rangeUnderflow: string;
|
|
904
|
+
rangeOverflow: string;
|
|
905
|
+
stepMismatch: string;
|
|
906
|
+
badInput: string;
|
|
907
|
+
invalid: string;
|
|
908
|
+
};
|
|
909
|
+
Loading: {
|
|
910
|
+
loadingPage: string;
|
|
911
|
+
pleaseWait: string;
|
|
912
|
+
};
|
|
913
|
+
DatePicker: {
|
|
914
|
+
placeholder: string;
|
|
915
|
+
today: string;
|
|
916
|
+
clear: string;
|
|
917
|
+
};
|
|
918
|
+
Pagination: {
|
|
919
|
+
navigationLabel: string;
|
|
920
|
+
showingResults: string;
|
|
921
|
+
firstPage: string;
|
|
922
|
+
previousPage: string;
|
|
923
|
+
previous: string;
|
|
924
|
+
nextPage: string;
|
|
925
|
+
next: string;
|
|
926
|
+
lastPage: string;
|
|
927
|
+
pageNumber: string;
|
|
928
|
+
itemsPerPage: string;
|
|
929
|
+
search: string;
|
|
930
|
+
noOptions: string;
|
|
931
|
+
};
|
|
932
|
+
OCR: {
|
|
933
|
+
imageUpload: {
|
|
934
|
+
dragDropText: string;
|
|
935
|
+
browseFiles: string;
|
|
936
|
+
supportedFormats: string;
|
|
937
|
+
};
|
|
938
|
+
};
|
|
939
|
+
};
|
|
940
|
+
readonly vi: {
|
|
941
|
+
Common: {
|
|
942
|
+
close: string;
|
|
943
|
+
closeAlert: string;
|
|
944
|
+
notifications: string;
|
|
945
|
+
newNotification: string;
|
|
946
|
+
readStatus: string;
|
|
947
|
+
openLink: string;
|
|
948
|
+
theme: string;
|
|
949
|
+
lightTheme: string;
|
|
950
|
+
darkTheme: string;
|
|
951
|
+
systemTheme: string;
|
|
952
|
+
density: string;
|
|
953
|
+
compact: string;
|
|
954
|
+
normal: string;
|
|
955
|
+
comfortable: string;
|
|
956
|
+
columns: string;
|
|
957
|
+
};
|
|
958
|
+
ValidationInput: {
|
|
959
|
+
required: string;
|
|
960
|
+
typeMismatch: string;
|
|
961
|
+
pattern: string;
|
|
962
|
+
tooShort: string;
|
|
963
|
+
tooLong: string;
|
|
964
|
+
rangeUnderflow: string;
|
|
965
|
+
rangeOverflow: string;
|
|
966
|
+
stepMismatch: string;
|
|
967
|
+
badInput: string;
|
|
968
|
+
invalid: string;
|
|
969
|
+
};
|
|
970
|
+
Loading: {
|
|
971
|
+
loadingPage: string;
|
|
972
|
+
pleaseWait: string;
|
|
973
|
+
};
|
|
974
|
+
DatePicker: {
|
|
975
|
+
placeholder: string;
|
|
976
|
+
today: string;
|
|
977
|
+
clear: string;
|
|
978
|
+
};
|
|
979
|
+
Pagination: {
|
|
980
|
+
navigationLabel: string;
|
|
981
|
+
showingResults: string;
|
|
982
|
+
firstPage: string;
|
|
983
|
+
previousPage: string;
|
|
984
|
+
previous: string;
|
|
985
|
+
nextPage: string;
|
|
986
|
+
next: string;
|
|
987
|
+
lastPage: string;
|
|
988
|
+
pageNumber: string;
|
|
989
|
+
itemsPerPage: string;
|
|
990
|
+
search: string;
|
|
991
|
+
noOptions: string;
|
|
992
|
+
};
|
|
993
|
+
OCR: {
|
|
994
|
+
imageUpload: {
|
|
995
|
+
dragDropText: string;
|
|
996
|
+
browseFiles: string;
|
|
997
|
+
supportedFormats: string;
|
|
998
|
+
};
|
|
999
|
+
};
|
|
1000
|
+
};
|
|
1001
|
+
};
|
|
1002
|
+
type UnderverseLocale = keyof typeof underverseMessages;
|
|
1003
|
+
declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
1004
|
+
Common: {
|
|
1005
|
+
close: string;
|
|
1006
|
+
closeAlert: string;
|
|
1007
|
+
notifications: string;
|
|
1008
|
+
newNotification: string;
|
|
1009
|
+
readStatus: string;
|
|
1010
|
+
openLink: string;
|
|
1011
|
+
theme: string;
|
|
1012
|
+
lightTheme: string;
|
|
1013
|
+
darkTheme: string;
|
|
1014
|
+
systemTheme: string;
|
|
1015
|
+
density: string;
|
|
1016
|
+
compact: string;
|
|
1017
|
+
normal: string;
|
|
1018
|
+
comfortable: string;
|
|
1019
|
+
columns: string;
|
|
1020
|
+
};
|
|
1021
|
+
ValidationInput: {
|
|
1022
|
+
required: string;
|
|
1023
|
+
typeMismatch: string;
|
|
1024
|
+
pattern: string;
|
|
1025
|
+
tooShort: string;
|
|
1026
|
+
tooLong: string;
|
|
1027
|
+
rangeUnderflow: string;
|
|
1028
|
+
rangeOverflow: string;
|
|
1029
|
+
stepMismatch: string;
|
|
1030
|
+
badInput: string;
|
|
1031
|
+
invalid: string;
|
|
1032
|
+
};
|
|
1033
|
+
Loading: {
|
|
1034
|
+
loadingPage: string;
|
|
1035
|
+
pleaseWait: string;
|
|
1036
|
+
};
|
|
1037
|
+
DatePicker: {
|
|
1038
|
+
placeholder: string;
|
|
1039
|
+
today: string;
|
|
1040
|
+
clear: string;
|
|
1041
|
+
};
|
|
1042
|
+
Pagination: {
|
|
1043
|
+
navigationLabel: string;
|
|
1044
|
+
showingResults: string;
|
|
1045
|
+
firstPage: string;
|
|
1046
|
+
previousPage: string;
|
|
1047
|
+
previous: string;
|
|
1048
|
+
nextPage: string;
|
|
1049
|
+
next: string;
|
|
1050
|
+
lastPage: string;
|
|
1051
|
+
pageNumber: string;
|
|
1052
|
+
itemsPerPage: string;
|
|
1053
|
+
search: string;
|
|
1054
|
+
noOptions: string;
|
|
1055
|
+
};
|
|
1056
|
+
OCR: {
|
|
1057
|
+
imageUpload: {
|
|
1058
|
+
dragDropText: string;
|
|
1059
|
+
browseFiles: string;
|
|
1060
|
+
supportedFormats: string;
|
|
1061
|
+
};
|
|
1062
|
+
};
|
|
1063
|
+
} | {
|
|
1064
|
+
Common: {
|
|
1065
|
+
close: string;
|
|
1066
|
+
closeAlert: string;
|
|
1067
|
+
notifications: string;
|
|
1068
|
+
newNotification: string;
|
|
1069
|
+
readStatus: string;
|
|
1070
|
+
openLink: string;
|
|
1071
|
+
theme: string;
|
|
1072
|
+
lightTheme: string;
|
|
1073
|
+
darkTheme: string;
|
|
1074
|
+
systemTheme: string;
|
|
1075
|
+
density: string;
|
|
1076
|
+
compact: string;
|
|
1077
|
+
normal: string;
|
|
1078
|
+
comfortable: string;
|
|
1079
|
+
columns: string;
|
|
1080
|
+
};
|
|
1081
|
+
ValidationInput: {
|
|
1082
|
+
required: string;
|
|
1083
|
+
typeMismatch: string;
|
|
1084
|
+
pattern: string;
|
|
1085
|
+
tooShort: string;
|
|
1086
|
+
tooLong: string;
|
|
1087
|
+
rangeUnderflow: string;
|
|
1088
|
+
rangeOverflow: string;
|
|
1089
|
+
stepMismatch: string;
|
|
1090
|
+
badInput: string;
|
|
1091
|
+
invalid: string;
|
|
1092
|
+
};
|
|
1093
|
+
Loading: {
|
|
1094
|
+
loadingPage: string;
|
|
1095
|
+
pleaseWait: string;
|
|
1096
|
+
};
|
|
1097
|
+
DatePicker: {
|
|
1098
|
+
placeholder: string;
|
|
1099
|
+
today: string;
|
|
1100
|
+
clear: string;
|
|
1101
|
+
};
|
|
1102
|
+
Pagination: {
|
|
1103
|
+
navigationLabel: string;
|
|
1104
|
+
showingResults: string;
|
|
1105
|
+
firstPage: string;
|
|
1106
|
+
previousPage: string;
|
|
1107
|
+
previous: string;
|
|
1108
|
+
nextPage: string;
|
|
1109
|
+
next: string;
|
|
1110
|
+
lastPage: string;
|
|
1111
|
+
pageNumber: string;
|
|
1112
|
+
itemsPerPage: string;
|
|
1113
|
+
search: string;
|
|
1114
|
+
noOptions: string;
|
|
1115
|
+
};
|
|
1116
|
+
OCR: {
|
|
1117
|
+
imageUpload: {
|
|
1118
|
+
dragDropText: string;
|
|
1119
|
+
browseFiles: string;
|
|
1120
|
+
supportedFormats: string;
|
|
1121
|
+
};
|
|
1122
|
+
};
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
export { AccessDenied, Alert, Avatar, Badge, Badge as BadgeBase, BottomSheet, Breadcrumb, Button, ButtonLoading, Card, Carousel, CategoryTreeSelect, Checkbox, ClientOnly, Combobox, DataTable, DatePicker, date as DateUtils, Drawer, DropdownMenu, FloatingContacts, GlobalLoading, GradientBadge, ImageUpload, InlineLoading, Input, InteractiveBadge, Label, LoadingBar, LoadingDots, LoadingSpinner, Modal, MultiCombobox, NotificationBadge, NotificationModal, PageLoading, Pagination, PillTabs, Popover, Progress, PulseBadge, RadioGroup, SIZE_STYLES_BTN, ScrollArea, Section, Sheet, SidebarSheet, SimpleTabs, Skeleton, SlideOver, Slider, SmartImage, StatusBadge, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TagBadge, Textarea, ToastProvider, Tooltip, type UnderverseLocale, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VerticalTabs, cn, getUnderverseMessages, underverseMessages, useToast };
|