@optigrit/optigrit-ui 0.0.9 → 0.0.10
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ButtonHTMLAttributes, ReactNode, HTMLAttributes, RefObject, TableHTMLAttributes } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { P as PopoverProps, a as InputProps } from '../
|
|
4
|
+
import { P as PopoverProps, a as InputProps, S as ShowWithAnimationProps } from '../types-BSufqQYT.js';
|
|
5
5
|
|
|
6
6
|
type ButtonVariant = "contained" | "outlined" | "soft" | "text";
|
|
7
7
|
type ButtonColor = "primary" | "secondary" | "error" | "success" | "warning" | "info";
|
|
@@ -48,7 +48,7 @@ type InputFieldProps = {
|
|
|
48
48
|
validateValue?: (value: string) => string | null;
|
|
49
49
|
onChangeValue?: (value: string) => void;
|
|
50
50
|
containerProps?: HTMLAttributes<HTMLDivElement> & {
|
|
51
|
-
ref
|
|
51
|
+
ref?: RefObject<HTMLDivElement | null>;
|
|
52
52
|
};
|
|
53
53
|
} & Omit<InputProps, 'value'>;
|
|
54
54
|
declare function InputField(props: InputFieldProps): react_jsx_runtime.JSX.Element;
|
|
@@ -86,6 +86,29 @@ interface SearchBarProps extends Omit<InputProps, 'value' | 'defaultValue'> {
|
|
|
86
86
|
}
|
|
87
87
|
declare const SearchBar: React__default.ForwardRefExoticComponent<SearchBarProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
88
88
|
|
|
89
|
+
type TabListProps = {
|
|
90
|
+
activeTabValue: string;
|
|
91
|
+
onChangeActiveTabValue: (value: string) => void;
|
|
92
|
+
tabs: Array<{
|
|
93
|
+
value: string;
|
|
94
|
+
label: string;
|
|
95
|
+
}>;
|
|
96
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, "children">;
|
|
97
|
+
declare function TabList(props: TabListProps): react_jsx_runtime.JSX.Element;
|
|
98
|
+
|
|
99
|
+
type RenderPanelProps = {
|
|
100
|
+
activePanelValue: string;
|
|
101
|
+
panels: Array<{
|
|
102
|
+
value: string;
|
|
103
|
+
content: ReactNode;
|
|
104
|
+
}>;
|
|
105
|
+
animationStyle?: ShowWithAnimationProps['animationStyle'];
|
|
106
|
+
panelRemoveOnHide?: boolean;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
type TabPanelProps = RenderPanelProps & Omit<HTMLAttributes<HTMLDivElement>, "children">;
|
|
110
|
+
declare function TabPanel(props: TabPanelProps): react_jsx_runtime.JSX.Element;
|
|
111
|
+
|
|
89
112
|
interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
90
113
|
stickyHeader?: boolean;
|
|
91
114
|
size?: "small" | "medium";
|
|
@@ -230,4 +253,4 @@ interface CardFooterProps extends React__default.HTMLAttributes<HTMLDivElement>
|
|
|
230
253
|
}
|
|
231
254
|
declare const CardFooter: React__default.ForwardRefExoticComponent<CardFooterProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
232
255
|
|
|
233
|
-
export { Button, type ButtonColor, type ButtonProps, type ButtonRoundness, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Carousel, type CarouselItem, type CarouselProps, Dialog, DialogContent, DialogFooter, DialogHeader, type DialogProps, Drawer, DrawerContent, DrawerFooter, DrawerHeader, type DrawerProps, IconButton, type IconButtonProps, InputField, type InputFieldProps, MultiSelect, type MultiSelectProps, SearchBar, type SearchBarProps, Select, type SelectProps, Separator, type SeparatorProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tooltip, type TooltipProps };
|
|
256
|
+
export { Button, type ButtonColor, type ButtonProps, type ButtonRoundness, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Carousel, type CarouselItem, type CarouselProps, Dialog, DialogContent, DialogFooter, DialogHeader, type DialogProps, Drawer, DrawerContent, DrawerFooter, DrawerHeader, type DrawerProps, IconButton, type IconButtonProps, InputField, type InputFieldProps, MultiSelect, type MultiSelectProps, SearchBar, type SearchBarProps, Select, type SelectProps, Separator, type SeparatorProps, TabList, type TabListProps, TabPanel, type TabPanelProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tooltip, type TooltipProps };
|
package/dist/components/index.js
CHANGED
|
@@ -777,6 +777,114 @@ var SearchBar = React.forwardRef(
|
|
|
777
777
|
);
|
|
778
778
|
SearchBar.displayName = "SearchBar";
|
|
779
779
|
|
|
780
|
+
// src/components/Navigation/Tab/TabList/index.tsx
|
|
781
|
+
import { useEffect as useEffect2, useRef as useRef8 } from "react";
|
|
782
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
783
|
+
function TabList(props) {
|
|
784
|
+
const {
|
|
785
|
+
tabs,
|
|
786
|
+
activeTabValue,
|
|
787
|
+
onChangeActiveTabValue,
|
|
788
|
+
...rest
|
|
789
|
+
} = props;
|
|
790
|
+
const tabsContainer = useRef8(null);
|
|
791
|
+
const activeIndicator = useRef8(null);
|
|
792
|
+
function handleValueChange() {
|
|
793
|
+
if (!tabsContainer.current || !activeIndicator.current) return;
|
|
794
|
+
const tab = tabsContainer.current.querySelector(`#${activeTabValue}`);
|
|
795
|
+
const tabLayoutInfo = tab?.getBoundingClientRect();
|
|
796
|
+
const containerLayoutInfo = tabsContainer.current.getBoundingClientRect();
|
|
797
|
+
if (!tabLayoutInfo) return;
|
|
798
|
+
activeIndicator.current.style.width = `${tabLayoutInfo.width}px`;
|
|
799
|
+
activeIndicator.current.style.height = `${tabLayoutInfo.height}px`;
|
|
800
|
+
activeIndicator.current.style.transform = `translateX(${tabLayoutInfo.left - containerLayoutInfo.left}px)`;
|
|
801
|
+
}
|
|
802
|
+
useEffect2(() => {
|
|
803
|
+
handleValueChange();
|
|
804
|
+
window.addEventListener("resize", handleValueChange);
|
|
805
|
+
tabsContainer.current?.addEventListener("scroll", handleValueChange);
|
|
806
|
+
return () => {
|
|
807
|
+
window.removeEventListener("resize", handleValueChange);
|
|
808
|
+
tabsContainer.current?.removeEventListener("scroll", handleValueChange);
|
|
809
|
+
};
|
|
810
|
+
}, [activeTabValue]);
|
|
811
|
+
return /* @__PURE__ */ jsxs9(
|
|
812
|
+
"div",
|
|
813
|
+
{
|
|
814
|
+
...rest,
|
|
815
|
+
className: cn("bg-bg-secondary w-full p-1 rounded-xl relative", rest.className),
|
|
816
|
+
children: [
|
|
817
|
+
/* @__PURE__ */ jsx10("div", { ref: activeIndicator, className: "absolute rounded-lg bg-primary transition-all duration-200" }),
|
|
818
|
+
/* @__PURE__ */ jsx10("div", { ref: tabsContainer, className: "flex items-center gap-1 w-full overflow-x-auto", children: tabs.map((tab) => /* @__PURE__ */ jsx10(
|
|
819
|
+
"div",
|
|
820
|
+
{
|
|
821
|
+
id: tab.value,
|
|
822
|
+
onClick: () => onChangeActiveTabValue(tab.value),
|
|
823
|
+
className: cn(
|
|
824
|
+
`px-3 py-1 rounded-lg cursor-pointer z-10 transition-all duration-200 whitespace-nowrap hover:bg-primary/20`,
|
|
825
|
+
activeTabValue === tab.value ? "text-white" : "text-text-secondary"
|
|
826
|
+
),
|
|
827
|
+
children: tab.label
|
|
828
|
+
},
|
|
829
|
+
tab.value
|
|
830
|
+
)) })
|
|
831
|
+
]
|
|
832
|
+
}
|
|
833
|
+
);
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
// src/components/Navigation/Tab/TabPanel/RenderPanel.tsx
|
|
837
|
+
import { memo } from "react";
|
|
838
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
839
|
+
var RenderPanel = memo((props) => {
|
|
840
|
+
const {
|
|
841
|
+
activePanelValue,
|
|
842
|
+
panels,
|
|
843
|
+
animationStyle,
|
|
844
|
+
panelRemoveOnHide
|
|
845
|
+
} = props;
|
|
846
|
+
if (panels.length === 0) return null;
|
|
847
|
+
return /* @__PURE__ */ jsx11(
|
|
848
|
+
ShowWithAnimation,
|
|
849
|
+
{
|
|
850
|
+
when: panels[0].value === activePanelValue,
|
|
851
|
+
containerProps: { className: "w-full h-full" },
|
|
852
|
+
className: "w-full h-full",
|
|
853
|
+
removeOnHide: panelRemoveOnHide,
|
|
854
|
+
otherwise: /* @__PURE__ */ jsx11(RenderPanel, { ...props, panels: panels.slice(1) }),
|
|
855
|
+
animationStyle: animationStyle ?? {
|
|
856
|
+
children: {
|
|
857
|
+
from: { scale: 0.9, opacity: 0 },
|
|
858
|
+
active: { scale: 1, opacity: 1 },
|
|
859
|
+
to: { scale: 1.1, opacity: 0 }
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
children: panels[0].content
|
|
863
|
+
}
|
|
864
|
+
);
|
|
865
|
+
});
|
|
866
|
+
|
|
867
|
+
// src/components/Navigation/Tab/TabPanel/index.tsx
|
|
868
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
869
|
+
function TabPanel(props) {
|
|
870
|
+
const {
|
|
871
|
+
activePanelValue,
|
|
872
|
+
panels,
|
|
873
|
+
animationStyle,
|
|
874
|
+
panelRemoveOnHide,
|
|
875
|
+
...rest
|
|
876
|
+
} = props;
|
|
877
|
+
return /* @__PURE__ */ jsx12("div", { ...rest, children: /* @__PURE__ */ jsx12(
|
|
878
|
+
RenderPanel,
|
|
879
|
+
{
|
|
880
|
+
activePanelValue,
|
|
881
|
+
panels,
|
|
882
|
+
animationStyle,
|
|
883
|
+
panelRemoveOnHide
|
|
884
|
+
}
|
|
885
|
+
) });
|
|
886
|
+
}
|
|
887
|
+
|
|
780
888
|
// src/components/DataDisplay/Table/Table.tsx
|
|
781
889
|
import { forwardRef as forwardRef3, useMemo } from "react";
|
|
782
890
|
|
|
@@ -789,11 +897,11 @@ var TableContext = createContext({
|
|
|
789
897
|
var useTableContext = () => useContext(TableContext);
|
|
790
898
|
|
|
791
899
|
// src/components/DataDisplay/Table/Table.tsx
|
|
792
|
-
import { jsx as
|
|
900
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
793
901
|
var Table = forwardRef3(
|
|
794
902
|
({ className = "", children, stickyHeader = false, size = "medium", ...props }, ref) => {
|
|
795
903
|
const value = useMemo(() => ({ size, stickyHeader }), [size, stickyHeader]);
|
|
796
|
-
return /* @__PURE__ */
|
|
904
|
+
return /* @__PURE__ */ jsx13(TableContext.Provider, { value, children: /* @__PURE__ */ jsx13(
|
|
797
905
|
"table",
|
|
798
906
|
{
|
|
799
907
|
ref,
|
|
@@ -809,10 +917,10 @@ var Table_default = Table;
|
|
|
809
917
|
|
|
810
918
|
// src/components/DataDisplay/Table/TableBody.tsx
|
|
811
919
|
import { forwardRef as forwardRef4 } from "react";
|
|
812
|
-
import { jsx as
|
|
920
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
813
921
|
var TableBody = forwardRef4(
|
|
814
922
|
({ className = "", children, ...props }, ref) => {
|
|
815
|
-
return /* @__PURE__ */
|
|
923
|
+
return /* @__PURE__ */ jsx14(
|
|
816
924
|
"tbody",
|
|
817
925
|
{
|
|
818
926
|
ref,
|
|
@@ -828,7 +936,7 @@ var TableBody_default = TableBody;
|
|
|
828
936
|
|
|
829
937
|
// src/components/DataDisplay/Table/TableCell.tsx
|
|
830
938
|
import { forwardRef as forwardRef5 } from "react";
|
|
831
|
-
import { jsx as
|
|
939
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
832
940
|
var TableCell = forwardRef5(
|
|
833
941
|
({ className = "", align = "left", padding, variant, component, children, ...props }, ref) => {
|
|
834
942
|
const { size, stickyHeader } = useTableContext();
|
|
@@ -847,7 +955,7 @@ var TableCell = forwardRef5(
|
|
|
847
955
|
checkbox: "p-0 w-[48px] text-center"
|
|
848
956
|
};
|
|
849
957
|
const effectivePadding = padding || "normal";
|
|
850
|
-
return /* @__PURE__ */
|
|
958
|
+
return /* @__PURE__ */ jsx15(
|
|
851
959
|
Component,
|
|
852
960
|
{
|
|
853
961
|
ref,
|
|
@@ -863,10 +971,10 @@ var TableCell_default = TableCell;
|
|
|
863
971
|
|
|
864
972
|
// src/components/DataDisplay/Table/TableContainer.tsx
|
|
865
973
|
import { forwardRef as forwardRef6 } from "react";
|
|
866
|
-
import { jsx as
|
|
974
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
867
975
|
var TableContainer = forwardRef6(
|
|
868
976
|
({ className = "", children, ...props }, ref) => {
|
|
869
|
-
return /* @__PURE__ */
|
|
977
|
+
return /* @__PURE__ */ jsx16(
|
|
870
978
|
"div",
|
|
871
979
|
{
|
|
872
980
|
ref,
|
|
@@ -882,10 +990,10 @@ var TableContainer_default = TableContainer;
|
|
|
882
990
|
|
|
883
991
|
// src/components/DataDisplay/Table/TableFooter.tsx
|
|
884
992
|
import { forwardRef as forwardRef7 } from "react";
|
|
885
|
-
import { jsx as
|
|
993
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
886
994
|
var TableFooter = forwardRef7(
|
|
887
995
|
({ className = "", children, ...props }, ref) => {
|
|
888
|
-
return /* @__PURE__ */
|
|
996
|
+
return /* @__PURE__ */ jsx17(
|
|
889
997
|
"tfoot",
|
|
890
998
|
{
|
|
891
999
|
ref,
|
|
@@ -901,10 +1009,10 @@ var TableFooter_default = TableFooter;
|
|
|
901
1009
|
|
|
902
1010
|
// src/components/DataDisplay/Table/TableHead.tsx
|
|
903
1011
|
import { forwardRef as forwardRef8 } from "react";
|
|
904
|
-
import { jsx as
|
|
1012
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
905
1013
|
var TableHead = forwardRef8(
|
|
906
1014
|
({ className = "", children, ...props }, ref) => {
|
|
907
|
-
return /* @__PURE__ */
|
|
1015
|
+
return /* @__PURE__ */ jsx18(
|
|
908
1016
|
"thead",
|
|
909
1017
|
{
|
|
910
1018
|
ref,
|
|
@@ -920,10 +1028,10 @@ var TableHead_default = TableHead;
|
|
|
920
1028
|
|
|
921
1029
|
// src/components/DataDisplay/Table/TableRow.tsx
|
|
922
1030
|
import { forwardRef as forwardRef9 } from "react";
|
|
923
|
-
import { jsx as
|
|
1031
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
924
1032
|
var TableRow = forwardRef9(
|
|
925
1033
|
({ className = "", children, hover = false, selected = false, ...props }, ref) => {
|
|
926
|
-
return /* @__PURE__ */
|
|
1034
|
+
return /* @__PURE__ */ jsx19(
|
|
927
1035
|
"tr",
|
|
928
1036
|
{
|
|
929
1037
|
ref,
|
|
@@ -938,8 +1046,8 @@ TableRow.displayName = "TableRow";
|
|
|
938
1046
|
var TableRow_default = TableRow;
|
|
939
1047
|
|
|
940
1048
|
// src/components/DataDisplay/Carousel/Carousel.tsx
|
|
941
|
-
import { useState as useState6, useEffect as
|
|
942
|
-
import { Fragment as Fragment4, jsx as
|
|
1049
|
+
import { useState as useState6, useEffect as useEffect3, useCallback as useCallback3, forwardRef as forwardRef10 } from "react";
|
|
1050
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
943
1051
|
var Carousel = forwardRef10(
|
|
944
1052
|
({
|
|
945
1053
|
items,
|
|
@@ -962,7 +1070,7 @@ var Carousel = forwardRef10(
|
|
|
962
1070
|
const goToIndex = (index) => {
|
|
963
1071
|
setCurrentIndex(index);
|
|
964
1072
|
};
|
|
965
|
-
|
|
1073
|
+
useEffect3(() => {
|
|
966
1074
|
if (!autoPlay || isHovered) return;
|
|
967
1075
|
const timer = setInterval(goToNext, interval);
|
|
968
1076
|
return () => clearInterval(timer);
|
|
@@ -970,7 +1078,7 @@ var Carousel = forwardRef10(
|
|
|
970
1078
|
if (!items || items.length === 0) {
|
|
971
1079
|
return null;
|
|
972
1080
|
}
|
|
973
|
-
return /* @__PURE__ */
|
|
1081
|
+
return /* @__PURE__ */ jsxs10(
|
|
974
1082
|
"div",
|
|
975
1083
|
{
|
|
976
1084
|
ref,
|
|
@@ -980,13 +1088,13 @@ var Carousel = forwardRef10(
|
|
|
980
1088
|
onMouseLeave: () => setIsHovered(false),
|
|
981
1089
|
...props,
|
|
982
1090
|
children: [
|
|
983
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ jsx20(
|
|
984
1092
|
"div",
|
|
985
1093
|
{
|
|
986
1094
|
className: "flex transition-transform duration-500 ease-in-out h-full w-full flex-1",
|
|
987
1095
|
style: { transform: `translateX(-${currentIndex * 100}%)` },
|
|
988
|
-
children: items.map((item) => /* @__PURE__ */
|
|
989
|
-
/* @__PURE__ */
|
|
1096
|
+
children: items.map((item) => /* @__PURE__ */ jsxs10("div", { className: "w-full h-full relative shrink-0", style: { flex: "0 0 100%" }, children: [
|
|
1097
|
+
/* @__PURE__ */ jsx20(
|
|
990
1098
|
"img",
|
|
991
1099
|
{
|
|
992
1100
|
src: item.imageUrl,
|
|
@@ -994,15 +1102,15 @@ var Carousel = forwardRef10(
|
|
|
994
1102
|
className: "w-full h-full object-cover"
|
|
995
1103
|
}
|
|
996
1104
|
),
|
|
997
|
-
(item.title || item.description) && /* @__PURE__ */
|
|
998
|
-
item.title && /* @__PURE__ */
|
|
999
|
-
item.description && /* @__PURE__ */
|
|
1105
|
+
(item.title || item.description) && /* @__PURE__ */ jsxs10("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent flex flex-col justify-end p-6 md:p-8", children: [
|
|
1106
|
+
item.title && /* @__PURE__ */ jsx20("h3", { className: "text-white text-xl md:text-3xl font-semibold mb-2 transform transition-all duration-500 translate-y-0 opacity-100", children: item.title }),
|
|
1107
|
+
item.description && /* @__PURE__ */ jsx20("p", { className: "text-white/80 text-sm md:text-base max-w-2xl transform transition-all duration-500 delay-100 translate-y-0 opacity-100", children: item.description })
|
|
1000
1108
|
] })
|
|
1001
1109
|
] }, item.id))
|
|
1002
1110
|
}
|
|
1003
1111
|
),
|
|
1004
|
-
showArrows && items.length > 1 && /* @__PURE__ */
|
|
1005
|
-
/* @__PURE__ */
|
|
1112
|
+
showArrows && items.length > 1 && /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
1113
|
+
/* @__PURE__ */ jsx20(
|
|
1006
1114
|
IconButton_default,
|
|
1007
1115
|
{
|
|
1008
1116
|
onClick: goToPrevious,
|
|
@@ -1010,7 +1118,7 @@ var Carousel = forwardRef10(
|
|
|
1010
1118
|
color: "secondary",
|
|
1011
1119
|
className: "absolute left-4 top-1/2 -translate-y-1/2 !bg-black/30 hover:!bg-black/50 text-white backdrop-blur-sm transition-all opacity-0 group-hover:opacity-100 disabled:opacity-0 z-10",
|
|
1012
1120
|
"aria-label": "Previous slide",
|
|
1013
|
-
children: /* @__PURE__ */
|
|
1121
|
+
children: /* @__PURE__ */ jsx20(
|
|
1014
1122
|
"svg",
|
|
1015
1123
|
{
|
|
1016
1124
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1019,12 +1127,12 @@ var Carousel = forwardRef10(
|
|
|
1019
1127
|
strokeWidth: 2,
|
|
1020
1128
|
stroke: "currentColor",
|
|
1021
1129
|
className: "w-5 h-5",
|
|
1022
|
-
children: /* @__PURE__ */
|
|
1130
|
+
children: /* @__PURE__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5L8.25 12l7.5-7.5" })
|
|
1023
1131
|
}
|
|
1024
1132
|
)
|
|
1025
1133
|
}
|
|
1026
1134
|
),
|
|
1027
|
-
/* @__PURE__ */
|
|
1135
|
+
/* @__PURE__ */ jsx20(
|
|
1028
1136
|
IconButton_default,
|
|
1029
1137
|
{
|
|
1030
1138
|
onClick: goToNext,
|
|
@@ -1032,7 +1140,7 @@ var Carousel = forwardRef10(
|
|
|
1032
1140
|
color: "secondary",
|
|
1033
1141
|
className: "absolute right-4 top-1/2 -translate-y-1/2 !bg-black/30 hover:!bg-black/50 text-white backdrop-blur-sm transition-all opacity-0 group-hover:opacity-100 disabled:opacity-0 z-10",
|
|
1034
1142
|
"aria-label": "Next slide",
|
|
1035
|
-
children: /* @__PURE__ */
|
|
1143
|
+
children: /* @__PURE__ */ jsx20(
|
|
1036
1144
|
"svg",
|
|
1037
1145
|
{
|
|
1038
1146
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1041,13 +1149,13 @@ var Carousel = forwardRef10(
|
|
|
1041
1149
|
strokeWidth: 2,
|
|
1042
1150
|
stroke: "currentColor",
|
|
1043
1151
|
className: "w-5 h-5",
|
|
1044
|
-
children: /* @__PURE__ */
|
|
1152
|
+
children: /* @__PURE__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" })
|
|
1045
1153
|
}
|
|
1046
1154
|
)
|
|
1047
1155
|
}
|
|
1048
1156
|
)
|
|
1049
1157
|
] }),
|
|
1050
|
-
showIndicators && items.length > 1 && /* @__PURE__ */
|
|
1158
|
+
showIndicators && items.length > 1 && /* @__PURE__ */ jsx20("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2 z-20", children: items.map((_, index) => /* @__PURE__ */ jsx20(
|
|
1051
1159
|
"button",
|
|
1052
1160
|
{
|
|
1053
1161
|
onClick: () => goToIndex(index),
|
|
@@ -1068,10 +1176,10 @@ Carousel.displayName = "Carousel";
|
|
|
1068
1176
|
|
|
1069
1177
|
// src/components/DataDisplay/Separator/Separator.tsx
|
|
1070
1178
|
import React3 from "react";
|
|
1071
|
-
import { jsx as
|
|
1179
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1072
1180
|
var Separator = React3.forwardRef(
|
|
1073
1181
|
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => {
|
|
1074
|
-
return /* @__PURE__ */
|
|
1182
|
+
return /* @__PURE__ */ jsx21(
|
|
1075
1183
|
"div",
|
|
1076
1184
|
{
|
|
1077
1185
|
ref,
|
|
@@ -1091,7 +1199,7 @@ Separator.displayName = "Separator";
|
|
|
1091
1199
|
|
|
1092
1200
|
// src/components/Overlay/Dialog/Dialog.tsx
|
|
1093
1201
|
import { createPortal } from "react-dom";
|
|
1094
|
-
import { jsx as
|
|
1202
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1095
1203
|
function Dialog(props) {
|
|
1096
1204
|
const {
|
|
1097
1205
|
open,
|
|
@@ -1123,7 +1231,7 @@ function Dialog(props) {
|
|
|
1123
1231
|
]);
|
|
1124
1232
|
if (typeof window === "undefined") return null;
|
|
1125
1233
|
return createPortal(
|
|
1126
|
-
/* @__PURE__ */
|
|
1234
|
+
/* @__PURE__ */ jsx22(
|
|
1127
1235
|
ShowWithAnimation,
|
|
1128
1236
|
{
|
|
1129
1237
|
when: open,
|
|
@@ -1151,7 +1259,7 @@ function Dialog(props) {
|
|
|
1151
1259
|
onClose?.();
|
|
1152
1260
|
}
|
|
1153
1261
|
},
|
|
1154
|
-
children: /* @__PURE__ */
|
|
1262
|
+
children: /* @__PURE__ */ jsx22(
|
|
1155
1263
|
ShowWithAnimation,
|
|
1156
1264
|
{
|
|
1157
1265
|
when: open,
|
|
@@ -1176,19 +1284,19 @@ function Dialog(props) {
|
|
|
1176
1284
|
}
|
|
1177
1285
|
|
|
1178
1286
|
// src/components/Overlay/Dialog/DialogHeader.tsx
|
|
1179
|
-
import { jsx as
|
|
1287
|
+
import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1180
1288
|
function DialogHeader(props) {
|
|
1181
1289
|
const { title, children, ...rest } = props;
|
|
1182
|
-
return /* @__PURE__ */
|
|
1183
|
-
/* @__PURE__ */
|
|
1290
|
+
return /* @__PURE__ */ jsxs11("div", { ...rest, className: "px-6 py-4 border-b border-border", children: [
|
|
1291
|
+
/* @__PURE__ */ jsx23(Show, { when: !!title, children: /* @__PURE__ */ jsx23("h1", { className: "text-lg font-medium", children: title }) }),
|
|
1184
1292
|
children
|
|
1185
1293
|
] });
|
|
1186
1294
|
}
|
|
1187
1295
|
|
|
1188
1296
|
// src/components/Overlay/Dialog/DialogFooter.tsx
|
|
1189
|
-
import { jsx as
|
|
1297
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1190
1298
|
function DialogFooter(props) {
|
|
1191
|
-
return /* @__PURE__ */
|
|
1299
|
+
return /* @__PURE__ */ jsx24(
|
|
1192
1300
|
"div",
|
|
1193
1301
|
{
|
|
1194
1302
|
...props,
|
|
@@ -1198,9 +1306,9 @@ function DialogFooter(props) {
|
|
|
1198
1306
|
}
|
|
1199
1307
|
|
|
1200
1308
|
// src/components/Overlay/Dialog/DialogContent.tsx
|
|
1201
|
-
import { jsx as
|
|
1309
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1202
1310
|
function DialogContent(props) {
|
|
1203
|
-
return /* @__PURE__ */
|
|
1311
|
+
return /* @__PURE__ */ jsx25(
|
|
1204
1312
|
"div",
|
|
1205
1313
|
{
|
|
1206
1314
|
...props,
|
|
@@ -1211,7 +1319,7 @@ function DialogContent(props) {
|
|
|
1211
1319
|
|
|
1212
1320
|
// src/components/Overlay/Drawer/Drawer.tsx
|
|
1213
1321
|
import { createPortal as createPortal2 } from "react-dom";
|
|
1214
|
-
import { jsx as
|
|
1322
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1215
1323
|
function Drawer(props) {
|
|
1216
1324
|
const {
|
|
1217
1325
|
open,
|
|
@@ -1246,7 +1354,7 @@ function Drawer(props) {
|
|
|
1246
1354
|
}[_size] + (isHorizontal ? "vw" : "vh");
|
|
1247
1355
|
})();
|
|
1248
1356
|
return createPortal2(
|
|
1249
|
-
/* @__PURE__ */
|
|
1357
|
+
/* @__PURE__ */ jsx26(
|
|
1250
1358
|
ShowWithAnimation,
|
|
1251
1359
|
{
|
|
1252
1360
|
when: open,
|
|
@@ -1276,7 +1384,7 @@ function Drawer(props) {
|
|
|
1276
1384
|
onClose?.();
|
|
1277
1385
|
}
|
|
1278
1386
|
},
|
|
1279
|
-
children: /* @__PURE__ */
|
|
1387
|
+
children: /* @__PURE__ */ jsx26(
|
|
1280
1388
|
ShowWithAnimation,
|
|
1281
1389
|
{
|
|
1282
1390
|
when: open,
|
|
@@ -1323,9 +1431,9 @@ function Drawer(props) {
|
|
|
1323
1431
|
}
|
|
1324
1432
|
|
|
1325
1433
|
// src/components/Overlay/Drawer/DrawerContent.tsx
|
|
1326
|
-
import { jsx as
|
|
1434
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1327
1435
|
function DrawerContent({ children, className, style }) {
|
|
1328
|
-
return /* @__PURE__ */
|
|
1436
|
+
return /* @__PURE__ */ jsx27(
|
|
1329
1437
|
"div",
|
|
1330
1438
|
{
|
|
1331
1439
|
className: cn("overflow-auto flex-1 p-4 relative hide-scrollbar", className),
|
|
@@ -1336,9 +1444,9 @@ function DrawerContent({ children, className, style }) {
|
|
|
1336
1444
|
}
|
|
1337
1445
|
|
|
1338
1446
|
// src/components/Overlay/Drawer/DrawerHeader.tsx
|
|
1339
|
-
import { jsx as
|
|
1447
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1340
1448
|
function DrawerHeader({ children, className, style }) {
|
|
1341
|
-
return /* @__PURE__ */
|
|
1449
|
+
return /* @__PURE__ */ jsx28(
|
|
1342
1450
|
"div",
|
|
1343
1451
|
{
|
|
1344
1452
|
className: cn("sticky top-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-b border-border", className),
|
|
@@ -1349,9 +1457,9 @@ function DrawerHeader({ children, className, style }) {
|
|
|
1349
1457
|
}
|
|
1350
1458
|
|
|
1351
1459
|
// src/components/Overlay/Drawer/DrawerFooter.tsx
|
|
1352
|
-
import { jsx as
|
|
1460
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1353
1461
|
function DrawerFooter({ children, className, style }) {
|
|
1354
|
-
return /* @__PURE__ */
|
|
1462
|
+
return /* @__PURE__ */ jsx29(
|
|
1355
1463
|
"div",
|
|
1356
1464
|
{
|
|
1357
1465
|
className: cn("sticky bottom-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-t border-border", className),
|
|
@@ -1363,10 +1471,10 @@ function DrawerFooter({ children, className, style }) {
|
|
|
1363
1471
|
|
|
1364
1472
|
// src/components/Surfaces/Card/Card.tsx
|
|
1365
1473
|
import React4 from "react";
|
|
1366
|
-
import { jsx as
|
|
1474
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1367
1475
|
var Card = React4.forwardRef(
|
|
1368
1476
|
({ className, children, ...props }, ref) => {
|
|
1369
|
-
return /* @__PURE__ */
|
|
1477
|
+
return /* @__PURE__ */ jsx30(
|
|
1370
1478
|
"div",
|
|
1371
1479
|
{
|
|
1372
1480
|
ref,
|
|
@@ -1384,22 +1492,22 @@ Card.displayName = "Card";
|
|
|
1384
1492
|
|
|
1385
1493
|
// src/components/Surfaces/Card/CardHeader.tsx
|
|
1386
1494
|
import React5 from "react";
|
|
1387
|
-
import { jsx as
|
|
1495
|
+
import { jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1388
1496
|
var CardHeader = React5.forwardRef(
|
|
1389
1497
|
({ className, avatar, action, title, subheader, ...props }, ref) => {
|
|
1390
|
-
return /* @__PURE__ */
|
|
1498
|
+
return /* @__PURE__ */ jsxs12(
|
|
1391
1499
|
"div",
|
|
1392
1500
|
{
|
|
1393
1501
|
ref,
|
|
1394
1502
|
className: cn("flex items-center p-6", className),
|
|
1395
1503
|
...props,
|
|
1396
1504
|
children: [
|
|
1397
|
-
avatar && /* @__PURE__ */
|
|
1398
|
-
/* @__PURE__ */
|
|
1399
|
-
title && /* @__PURE__ */
|
|
1400
|
-
subheader && /* @__PURE__ */
|
|
1505
|
+
avatar && /* @__PURE__ */ jsx31("div", { className: "mr-4 flex-shrink-0", children: avatar }),
|
|
1506
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex-1 flex flex-col gap-1", children: [
|
|
1507
|
+
title && /* @__PURE__ */ jsx31("div", { className: "font-semibold leading-none tracking-tight", children: title }),
|
|
1508
|
+
subheader && /* @__PURE__ */ jsx31("div", { className: "text-sm text-gray-500 dark:text-gray-400", children: subheader })
|
|
1401
1509
|
] }),
|
|
1402
|
-
action && /* @__PURE__ */
|
|
1510
|
+
action && /* @__PURE__ */ jsx31("div", { className: "ml-4 flex-shrink-0 self-start", children: action })
|
|
1403
1511
|
]
|
|
1404
1512
|
}
|
|
1405
1513
|
);
|
|
@@ -1409,10 +1517,10 @@ CardHeader.displayName = "CardHeader";
|
|
|
1409
1517
|
|
|
1410
1518
|
// src/components/Surfaces/Card/CardContent.tsx
|
|
1411
1519
|
import React6 from "react";
|
|
1412
|
-
import { jsx as
|
|
1520
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1413
1521
|
var CardContent = React6.forwardRef(
|
|
1414
1522
|
({ className, ...props }, ref) => {
|
|
1415
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ jsx32(
|
|
1416
1524
|
"div",
|
|
1417
1525
|
{
|
|
1418
1526
|
ref,
|
|
@@ -1426,10 +1534,10 @@ CardContent.displayName = "CardContent";
|
|
|
1426
1534
|
|
|
1427
1535
|
// src/components/Surfaces/Card/CardFooter.tsx
|
|
1428
1536
|
import React7 from "react";
|
|
1429
|
-
import { Fragment as Fragment5, jsx as
|
|
1537
|
+
import { Fragment as Fragment5, jsx as jsx33, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1430
1538
|
var CardFooter = React7.forwardRef(
|
|
1431
1539
|
({ className, text, action, children }, ref) => {
|
|
1432
|
-
return /* @__PURE__ */
|
|
1540
|
+
return /* @__PURE__ */ jsx33(
|
|
1433
1541
|
"div",
|
|
1434
1542
|
{
|
|
1435
1543
|
ref,
|
|
@@ -1437,9 +1545,9 @@ var CardFooter = React7.forwardRef(
|
|
|
1437
1545
|
"flex items-center justify-between p-6 bg-white dark:bg-gray-900 rounded-b-xl",
|
|
1438
1546
|
className
|
|
1439
1547
|
),
|
|
1440
|
-
children: children || /* @__PURE__ */
|
|
1441
|
-
text && /* @__PURE__ */
|
|
1442
|
-
action && /* @__PURE__ */
|
|
1548
|
+
children: children || /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
1549
|
+
text && /* @__PURE__ */ jsx33("div", { className: "text-sm text-gray-500 dark:text-gray-400", children: text }),
|
|
1550
|
+
action && /* @__PURE__ */ jsx33("div", { className: "ml-auto flex items-center gap-2", children: action })
|
|
1443
1551
|
] })
|
|
1444
1552
|
}
|
|
1445
1553
|
);
|
|
@@ -1467,6 +1575,8 @@ export {
|
|
|
1467
1575
|
SearchBar,
|
|
1468
1576
|
Select,
|
|
1469
1577
|
Separator,
|
|
1578
|
+
TabList,
|
|
1579
|
+
TabPanel,
|
|
1470
1580
|
Table_default as Table,
|
|
1471
1581
|
TableBody_default as TableBody,
|
|
1472
1582
|
TableCell_default as TableCell,
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { ReactNode
|
|
3
|
-
import { P as PopoverProps } from '../
|
|
4
|
-
export { I as Input, a as InputProps } from '../
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { P as PopoverProps, S as ShowWithAnimationProps } from '../types-BSufqQYT.js';
|
|
4
|
+
export { I as Input, a as InputProps } from '../types-BSufqQYT.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
declare function Popover(props: PopoverProps): React$1.ReactPortal | null;
|
|
@@ -59,31 +59,7 @@ interface SpinnerProps {
|
|
|
59
59
|
*/
|
|
60
60
|
declare function Spinner({ size, thickness, color, className, }: SpinnerProps): react_jsx_runtime.JSX.Element;
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
children: {
|
|
64
|
-
from: CSSProperties;
|
|
65
|
-
active: CSSProperties;
|
|
66
|
-
to?: CSSProperties;
|
|
67
|
-
};
|
|
68
|
-
otherwise?: {
|
|
69
|
-
from: CSSProperties;
|
|
70
|
-
active: CSSProperties;
|
|
71
|
-
to?: CSSProperties;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
type AnimationsType = 'fade' | 'slide';
|
|
75
|
-
type ShowWhenProps = {
|
|
76
|
-
when: boolean;
|
|
77
|
-
children: ReactNode;
|
|
78
|
-
otherwise?: ReactNode;
|
|
79
|
-
removeOnHide?: boolean;
|
|
80
|
-
animationDuration?: number;
|
|
81
|
-
animationType?: AnimationsType;
|
|
82
|
-
animationStyle?: AnimationStyles;
|
|
83
|
-
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
84
|
-
} & HTMLAttributes<HTMLDivElement>;
|
|
85
|
-
|
|
86
|
-
declare function ShowWithAnimation(props: ShowWhenProps): react_jsx_runtime.JSX.Element | null;
|
|
62
|
+
declare function ShowWithAnimation(props: ShowWithAnimationProps): react_jsx_runtime.JSX.Element | null;
|
|
87
63
|
|
|
88
64
|
type ShowProps = {
|
|
89
65
|
when: boolean;
|
|
@@ -92,4 +68,4 @@ type ShowProps = {
|
|
|
92
68
|
};
|
|
93
69
|
declare function Show({ when, children, otherwise }: ShowProps): ReactNode;
|
|
94
70
|
|
|
95
|
-
export { Popover, PopoverProps, Ripple, type RippleProps, type RippleRef, Show, type ShowProps,
|
|
71
|
+
export { Popover, PopoverProps, Ripple, type RippleProps, type RippleRef, Show, type ShowProps, ShowWithAnimation, ShowWithAnimationProps, Spinner, type SpinnerColor, type SpinnerProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { HTMLAttributes, RefObject, ReactNode, InputHTMLAttributes } from 'react';
|
|
2
|
+
import { HTMLAttributes, RefObject, ReactNode, InputHTMLAttributes, CSSProperties } from 'react';
|
|
3
3
|
|
|
4
4
|
type PopoverPosition = `${'top' | 'bottom' | 'left' | 'right'}-${'start' | 'center' | 'end'}`;
|
|
5
5
|
type PopoverProps = HTMLAttributes<HTMLDivElement> & {
|
|
@@ -38,4 +38,28 @@ declare const Input: React.ForwardRefExoticComponent<{
|
|
|
38
38
|
inputContainerProps?: HTMLAttributes<HTMLDivElement>;
|
|
39
39
|
} & Omit<InputHTMLAttributes<HTMLInputElement>, "required"> & React.RefAttributes<HTMLInputElement>>;
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
type AnimationStyles = {
|
|
42
|
+
children: {
|
|
43
|
+
from: CSSProperties;
|
|
44
|
+
active: CSSProperties;
|
|
45
|
+
to?: CSSProperties;
|
|
46
|
+
};
|
|
47
|
+
otherwise?: {
|
|
48
|
+
from: CSSProperties;
|
|
49
|
+
active: CSSProperties;
|
|
50
|
+
to?: CSSProperties;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
type AnimationsType = 'fade' | 'slide';
|
|
54
|
+
type ShowWithAnimationProps = {
|
|
55
|
+
when: boolean;
|
|
56
|
+
children: ReactNode;
|
|
57
|
+
otherwise?: ReactNode;
|
|
58
|
+
removeOnHide?: boolean;
|
|
59
|
+
animationDuration?: number;
|
|
60
|
+
animationType?: AnimationsType;
|
|
61
|
+
animationStyle?: AnimationStyles;
|
|
62
|
+
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
63
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
64
|
+
|
|
65
|
+
export { Input as I, type PopoverProps as P, type ShowWithAnimationProps as S, type InputProps as a };
|