@optigrit/optigrit-ui 0.0.5 → 0.0.6
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/{Input-CWxBHfX8.d.ts → Input-CBAdjRy6.d.ts} +3 -3
- package/dist/{ThemeProvider-D_1vZWeu.d.ts → ThemeProvider-CvUNY0S2.d.ts} +2 -2
- package/dist/components/index.d.ts +55 -23
- package/dist/components/index.js +214 -19
- package/dist/core/index.d.ts +5 -5
- package/dist/hooks/index.d.ts +1 -1
- package/dist/theme/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { HTMLAttributes, RefObject, ReactNode, InputHTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
type PopoverPosition = `${'top' | 'bottom' | 'left' | 'right'}-${'start' | 'center' | 'end'}`;
|
|
@@ -24,7 +24,7 @@ type InputProps = {
|
|
|
24
24
|
fullWidth?: boolean;
|
|
25
25
|
inputContainerProps?: HTMLAttributes<HTMLDivElement>;
|
|
26
26
|
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'required'>;
|
|
27
|
-
declare const Input:
|
|
27
|
+
declare const Input: React.ForwardRefExoticComponent<{
|
|
28
28
|
label?: string;
|
|
29
29
|
labelShrink?: boolean;
|
|
30
30
|
required?: boolean;
|
|
@@ -36,6 +36,6 @@ declare const Input: react.ForwardRefExoticComponent<{
|
|
|
36
36
|
primaryColor?: string;
|
|
37
37
|
fullWidth?: boolean;
|
|
38
38
|
inputContainerProps?: HTMLAttributes<HTMLDivElement>;
|
|
39
|
-
} & Omit<InputHTMLAttributes<HTMLInputElement>, "required"> &
|
|
39
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "required"> & React.RefAttributes<HTMLInputElement>>;
|
|
40
40
|
|
|
41
41
|
export { Input as I, type PopoverProps as P, type InputProps as a };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
type Theme = "dark" | "light" | "system";
|
|
5
5
|
type ThemeProviderProps = {
|
|
6
|
-
children:
|
|
6
|
+
children: React__default.ReactNode;
|
|
7
7
|
defaultTheme?: Theme;
|
|
8
8
|
storageKey?: string;
|
|
9
9
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React$1 from 'react';
|
|
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 '../Input-
|
|
4
|
+
import { P as PopoverProps, a as InputProps } from '../Input-CBAdjRy6.js';
|
|
5
5
|
|
|
6
6
|
type ButtonVariant = "contained" | "outlined" | "soft" | "text";
|
|
7
7
|
type ButtonColor = "primary" | "secondary" | "error" | "success" | "warning" | "info";
|
|
@@ -18,7 +18,7 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
18
18
|
rightIcon?: ReactNode;
|
|
19
19
|
disableRipple?: boolean;
|
|
20
20
|
}
|
|
21
|
-
declare const Button:
|
|
21
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
22
22
|
|
|
23
23
|
interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
24
24
|
variant?: ButtonVariant;
|
|
@@ -28,7 +28,7 @@ interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
28
28
|
loading?: boolean;
|
|
29
29
|
disableRipple?: boolean;
|
|
30
30
|
}
|
|
31
|
-
declare const IconButton:
|
|
31
|
+
declare const IconButton: React$1.ForwardRefExoticComponent<IconButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
32
32
|
|
|
33
33
|
type SIZE = "xs" | "sm" | "md" | "lg" | "xl";
|
|
34
34
|
|
|
@@ -81,11 +81,11 @@ interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
|
81
81
|
stickyHeader?: boolean;
|
|
82
82
|
size?: "small" | "medium";
|
|
83
83
|
}
|
|
84
|
-
declare const Table:
|
|
84
|
+
declare const Table: React$1.ForwardRefExoticComponent<TableProps & React$1.RefAttributes<HTMLTableElement>>;
|
|
85
85
|
|
|
86
86
|
interface TableBodyProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
87
87
|
}
|
|
88
|
-
declare const TableBody:
|
|
88
|
+
declare const TableBody: React$1.ForwardRefExoticComponent<TableBodyProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
89
89
|
|
|
90
90
|
interface TableCellProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
91
91
|
align?: "left" | "center" | "right" | "justify" | "inherit";
|
|
@@ -93,37 +93,53 @@ interface TableCellProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
|
93
93
|
variant?: "head" | "body" | "footer";
|
|
94
94
|
component?: "td" | "th";
|
|
95
95
|
}
|
|
96
|
-
declare const TableCell:
|
|
96
|
+
declare const TableCell: React$1.ForwardRefExoticComponent<TableCellProps & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
97
97
|
|
|
98
98
|
interface TableContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
99
99
|
}
|
|
100
|
-
declare const TableContainer:
|
|
100
|
+
declare const TableContainer: React$1.ForwardRefExoticComponent<TableContainerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
101
101
|
|
|
102
102
|
interface TableFooterProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
103
103
|
}
|
|
104
|
-
declare const TableFooter:
|
|
104
|
+
declare const TableFooter: React$1.ForwardRefExoticComponent<TableFooterProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
105
105
|
|
|
106
106
|
interface TableHeadProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
107
107
|
}
|
|
108
|
-
declare const TableHead:
|
|
108
|
+
declare const TableHead: React$1.ForwardRefExoticComponent<TableHeadProps & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
109
109
|
|
|
110
110
|
interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
|
|
111
111
|
hover?: boolean;
|
|
112
112
|
selected?: boolean;
|
|
113
113
|
}
|
|
114
|
-
declare const TableRow:
|
|
114
|
+
declare const TableRow: React$1.ForwardRefExoticComponent<TableRowProps & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
115
|
+
|
|
116
|
+
interface CarouselItem {
|
|
117
|
+
id: string | number;
|
|
118
|
+
imageUrl: string;
|
|
119
|
+
altText?: string;
|
|
120
|
+
title?: React__default.ReactNode;
|
|
121
|
+
description?: React__default.ReactNode;
|
|
122
|
+
}
|
|
123
|
+
interface CarouselProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
124
|
+
items: CarouselItem[];
|
|
125
|
+
autoPlay?: boolean;
|
|
126
|
+
interval?: number;
|
|
127
|
+
showArrows?: boolean;
|
|
128
|
+
showIndicators?: boolean;
|
|
129
|
+
}
|
|
130
|
+
declare const Carousel: React__default.ForwardRefExoticComponent<CarouselProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
115
131
|
|
|
116
132
|
type DialogProps = {
|
|
117
133
|
open: boolean;
|
|
118
134
|
onClose?: () => void;
|
|
119
|
-
children?:
|
|
135
|
+
children?: React__default.ReactNode;
|
|
120
136
|
backdropClose?: boolean;
|
|
121
137
|
className?: string;
|
|
122
138
|
closeOnEsc?: boolean;
|
|
123
139
|
animationDuration?: number;
|
|
124
140
|
size?: SIZE | "full" | "auto";
|
|
125
141
|
};
|
|
126
|
-
declare function Dialog(props: DialogProps):
|
|
142
|
+
declare function Dialog(props: DialogProps): React__default.ReactPortal | null;
|
|
127
143
|
|
|
128
144
|
type DialogHeaderProps = HTMLAttributes<HTMLDivElement> & {
|
|
129
145
|
title?: string;
|
|
@@ -137,7 +153,7 @@ declare function DialogContent(props: HTMLAttributes<HTMLDivElement>): react_jsx
|
|
|
137
153
|
type DrawerProps = {
|
|
138
154
|
open: boolean;
|
|
139
155
|
onClose?: () => void;
|
|
140
|
-
children?:
|
|
156
|
+
children?: React__default.ReactNode;
|
|
141
157
|
backdropClose?: boolean;
|
|
142
158
|
className?: string;
|
|
143
159
|
closeOnEsc?: boolean;
|
|
@@ -146,27 +162,43 @@ type DrawerProps = {
|
|
|
146
162
|
size?: SIZE | number;
|
|
147
163
|
rounded?: number;
|
|
148
164
|
};
|
|
149
|
-
declare function Drawer(props: DrawerProps):
|
|
165
|
+
declare function Drawer(props: DrawerProps): React__default.ReactPortal | null;
|
|
150
166
|
|
|
151
167
|
type DrawerContentProps = {
|
|
152
|
-
children?:
|
|
168
|
+
children?: React__default.ReactNode;
|
|
153
169
|
className?: string;
|
|
154
|
-
style?:
|
|
170
|
+
style?: React__default.CSSProperties;
|
|
155
171
|
};
|
|
156
172
|
declare function DrawerContent({ children, className, style }: DrawerContentProps): react_jsx_runtime.JSX.Element;
|
|
157
173
|
|
|
158
174
|
type DrawerHeaderProps = {
|
|
159
|
-
children?:
|
|
175
|
+
children?: React__default.ReactNode;
|
|
160
176
|
className?: string;
|
|
161
|
-
style?:
|
|
177
|
+
style?: React__default.CSSProperties;
|
|
162
178
|
};
|
|
163
179
|
declare function DrawerHeader({ children, className, style }: DrawerHeaderProps): react_jsx_runtime.JSX.Element;
|
|
164
180
|
|
|
165
181
|
type DrawerFooterProps = {
|
|
166
|
-
children?:
|
|
182
|
+
children?: React__default.ReactNode;
|
|
167
183
|
className?: string;
|
|
168
|
-
style?:
|
|
184
|
+
style?: React__default.CSSProperties;
|
|
169
185
|
};
|
|
170
186
|
declare function DrawerFooter({ children, className, style }: DrawerFooterProps): react_jsx_runtime.JSX.Element;
|
|
171
187
|
|
|
172
|
-
|
|
188
|
+
interface CardProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
189
|
+
}
|
|
190
|
+
declare const Card: React__default.ForwardRefExoticComponent<CardProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
191
|
+
|
|
192
|
+
interface CardHeaderProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
193
|
+
avatar?: React__default.ReactNode;
|
|
194
|
+
action?: React__default.ReactNode;
|
|
195
|
+
title?: React__default.ReactNode;
|
|
196
|
+
subheader?: React__default.ReactNode;
|
|
197
|
+
}
|
|
198
|
+
declare const CardHeader: React__default.ForwardRefExoticComponent<CardHeaderProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
199
|
+
|
|
200
|
+
interface CardContentProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
201
|
+
}
|
|
202
|
+
declare const CardContent: React__default.ForwardRefExoticComponent<CardContentProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
203
|
+
|
|
204
|
+
export { Button, type ButtonColor, type ButtonProps, type ButtonRoundness, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, 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, Select, type SelectProps, 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
|
@@ -784,9 +784,138 @@ var TableRow = forwardRef9(
|
|
|
784
784
|
TableRow.displayName = "TableRow";
|
|
785
785
|
var TableRow_default = TableRow;
|
|
786
786
|
|
|
787
|
+
// src/components/DataDisplay/Carousel/Carousel.tsx
|
|
788
|
+
import { useState as useState5, useEffect, useCallback as useCallback3, forwardRef as forwardRef10 } from "react";
|
|
789
|
+
import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
790
|
+
var Carousel = forwardRef10(
|
|
791
|
+
({
|
|
792
|
+
items,
|
|
793
|
+
autoPlay = false,
|
|
794
|
+
interval = 5e3,
|
|
795
|
+
showArrows = true,
|
|
796
|
+
showIndicators = true,
|
|
797
|
+
className,
|
|
798
|
+
style,
|
|
799
|
+
...props
|
|
800
|
+
}, ref) => {
|
|
801
|
+
const [currentIndex, setCurrentIndex] = useState5(0);
|
|
802
|
+
const [isHovered, setIsHovered] = useState5(false);
|
|
803
|
+
const goToNext = useCallback3(() => {
|
|
804
|
+
setCurrentIndex((prevIndex) => prevIndex === items.length - 1 ? 0 : prevIndex + 1);
|
|
805
|
+
}, [items.length]);
|
|
806
|
+
const goToPrevious = useCallback3(() => {
|
|
807
|
+
setCurrentIndex((prevIndex) => prevIndex === 0 ? items.length - 1 : prevIndex - 1);
|
|
808
|
+
}, [items.length]);
|
|
809
|
+
const goToIndex = (index) => {
|
|
810
|
+
setCurrentIndex(index);
|
|
811
|
+
};
|
|
812
|
+
useEffect(() => {
|
|
813
|
+
if (!autoPlay || isHovered) return;
|
|
814
|
+
const timer = setInterval(goToNext, interval);
|
|
815
|
+
return () => clearInterval(timer);
|
|
816
|
+
}, [autoPlay, interval, goToNext, isHovered]);
|
|
817
|
+
if (!items || items.length === 0) {
|
|
818
|
+
return null;
|
|
819
|
+
}
|
|
820
|
+
return /* @__PURE__ */ jsxs7(
|
|
821
|
+
"div",
|
|
822
|
+
{
|
|
823
|
+
ref,
|
|
824
|
+
className: cn("relative w-full overflow-hidden rounded-xl bg-surface-100 group flex flex-col", !className?.includes("h-") && !className?.includes("aspect") && "aspect-video max-h-[600px]", className),
|
|
825
|
+
style,
|
|
826
|
+
onMouseEnter: () => setIsHovered(true),
|
|
827
|
+
onMouseLeave: () => setIsHovered(false),
|
|
828
|
+
...props,
|
|
829
|
+
children: [
|
|
830
|
+
/* @__PURE__ */ jsx14(
|
|
831
|
+
"div",
|
|
832
|
+
{
|
|
833
|
+
className: "flex transition-transform duration-500 ease-in-out h-full w-full flex-1",
|
|
834
|
+
style: { transform: `translateX(-${currentIndex * 100}%)` },
|
|
835
|
+
children: items.map((item) => /* @__PURE__ */ jsxs7("div", { className: "w-full h-full relative shrink-0", style: { flex: "0 0 100%" }, children: [
|
|
836
|
+
/* @__PURE__ */ jsx14(
|
|
837
|
+
"img",
|
|
838
|
+
{
|
|
839
|
+
src: item.imageUrl,
|
|
840
|
+
alt: item.altText || "Carousel item",
|
|
841
|
+
className: "w-full h-full object-cover"
|
|
842
|
+
}
|
|
843
|
+
),
|
|
844
|
+
(item.title || item.description) && /* @__PURE__ */ jsxs7("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: [
|
|
845
|
+
item.title && /* @__PURE__ */ jsx14("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 }),
|
|
846
|
+
item.description && /* @__PURE__ */ jsx14("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 })
|
|
847
|
+
] })
|
|
848
|
+
] }, item.id))
|
|
849
|
+
}
|
|
850
|
+
),
|
|
851
|
+
showArrows && items.length > 1 && /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
852
|
+
/* @__PURE__ */ jsx14(
|
|
853
|
+
IconButton_default,
|
|
854
|
+
{
|
|
855
|
+
onClick: goToPrevious,
|
|
856
|
+
variant: "contained",
|
|
857
|
+
color: "secondary",
|
|
858
|
+
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",
|
|
859
|
+
"aria-label": "Previous slide",
|
|
860
|
+
children: /* @__PURE__ */ jsx14(
|
|
861
|
+
"svg",
|
|
862
|
+
{
|
|
863
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
864
|
+
fill: "none",
|
|
865
|
+
viewBox: "0 0 24 24",
|
|
866
|
+
strokeWidth: 2,
|
|
867
|
+
stroke: "currentColor",
|
|
868
|
+
className: "w-5 h-5",
|
|
869
|
+
children: /* @__PURE__ */ jsx14("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5L8.25 12l7.5-7.5" })
|
|
870
|
+
}
|
|
871
|
+
)
|
|
872
|
+
}
|
|
873
|
+
),
|
|
874
|
+
/* @__PURE__ */ jsx14(
|
|
875
|
+
IconButton_default,
|
|
876
|
+
{
|
|
877
|
+
onClick: goToNext,
|
|
878
|
+
variant: "contained",
|
|
879
|
+
color: "secondary",
|
|
880
|
+
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",
|
|
881
|
+
"aria-label": "Next slide",
|
|
882
|
+
children: /* @__PURE__ */ jsx14(
|
|
883
|
+
"svg",
|
|
884
|
+
{
|
|
885
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
886
|
+
fill: "none",
|
|
887
|
+
viewBox: "0 0 24 24",
|
|
888
|
+
strokeWidth: 2,
|
|
889
|
+
stroke: "currentColor",
|
|
890
|
+
className: "w-5 h-5",
|
|
891
|
+
children: /* @__PURE__ */ jsx14("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" })
|
|
892
|
+
}
|
|
893
|
+
)
|
|
894
|
+
}
|
|
895
|
+
)
|
|
896
|
+
] }),
|
|
897
|
+
showIndicators && items.length > 1 && /* @__PURE__ */ jsx14("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2 z-20", children: items.map((_, index) => /* @__PURE__ */ jsx14(
|
|
898
|
+
"button",
|
|
899
|
+
{
|
|
900
|
+
onClick: () => goToIndex(index),
|
|
901
|
+
"aria-label": `Go to slide ${index + 1}`,
|
|
902
|
+
className: cn(
|
|
903
|
+
"w-2.5 h-2.5 rounded-full transition-all duration-300 shadow-sm",
|
|
904
|
+
currentIndex === index ? "bg-white w-8" : "bg-white/50 hover:bg-white/80"
|
|
905
|
+
)
|
|
906
|
+
},
|
|
907
|
+
index
|
|
908
|
+
)) })
|
|
909
|
+
]
|
|
910
|
+
}
|
|
911
|
+
);
|
|
912
|
+
}
|
|
913
|
+
);
|
|
914
|
+
Carousel.displayName = "Carousel";
|
|
915
|
+
|
|
787
916
|
// src/components/Overlay/Dialog/Dialog.tsx
|
|
788
917
|
import { createPortal } from "react-dom";
|
|
789
|
-
import { jsx as
|
|
918
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
790
919
|
function Dialog(props) {
|
|
791
920
|
const {
|
|
792
921
|
open,
|
|
@@ -818,7 +947,7 @@ function Dialog(props) {
|
|
|
818
947
|
]);
|
|
819
948
|
if (typeof window === "undefined") return null;
|
|
820
949
|
return createPortal(
|
|
821
|
-
/* @__PURE__ */
|
|
950
|
+
/* @__PURE__ */ jsx15(
|
|
822
951
|
ShowWithAnimation,
|
|
823
952
|
{
|
|
824
953
|
when: open,
|
|
@@ -846,7 +975,7 @@ function Dialog(props) {
|
|
|
846
975
|
onClose?.();
|
|
847
976
|
}
|
|
848
977
|
},
|
|
849
|
-
children: /* @__PURE__ */
|
|
978
|
+
children: /* @__PURE__ */ jsx15(
|
|
850
979
|
ShowWithAnimation,
|
|
851
980
|
{
|
|
852
981
|
when: open,
|
|
@@ -871,19 +1000,19 @@ function Dialog(props) {
|
|
|
871
1000
|
}
|
|
872
1001
|
|
|
873
1002
|
// src/components/Overlay/Dialog/DialogHeader.tsx
|
|
874
|
-
import { jsx as
|
|
1003
|
+
import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
875
1004
|
function DialogHeader(props) {
|
|
876
1005
|
const { title, children, ...rest } = props;
|
|
877
|
-
return /* @__PURE__ */
|
|
878
|
-
/* @__PURE__ */
|
|
1006
|
+
return /* @__PURE__ */ jsxs8("div", { ...rest, className: "px-6 py-4 border-b border-border", children: [
|
|
1007
|
+
/* @__PURE__ */ jsx16(Show, { when: !!title, children: /* @__PURE__ */ jsx16("h1", { className: "text-lg font-medium", children: title }) }),
|
|
879
1008
|
children
|
|
880
1009
|
] });
|
|
881
1010
|
}
|
|
882
1011
|
|
|
883
1012
|
// src/components/Overlay/Dialog/DialogFooter.tsx
|
|
884
|
-
import { jsx as
|
|
1013
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
885
1014
|
function DialogFooter(props) {
|
|
886
|
-
return /* @__PURE__ */
|
|
1015
|
+
return /* @__PURE__ */ jsx17(
|
|
887
1016
|
"div",
|
|
888
1017
|
{
|
|
889
1018
|
...props,
|
|
@@ -893,9 +1022,9 @@ function DialogFooter(props) {
|
|
|
893
1022
|
}
|
|
894
1023
|
|
|
895
1024
|
// src/components/Overlay/Dialog/DialogContent.tsx
|
|
896
|
-
import { jsx as
|
|
1025
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
897
1026
|
function DialogContent(props) {
|
|
898
|
-
return /* @__PURE__ */
|
|
1027
|
+
return /* @__PURE__ */ jsx18(
|
|
899
1028
|
"div",
|
|
900
1029
|
{
|
|
901
1030
|
...props,
|
|
@@ -906,7 +1035,7 @@ function DialogContent(props) {
|
|
|
906
1035
|
|
|
907
1036
|
// src/components/Overlay/Drawer/Drawer.tsx
|
|
908
1037
|
import { createPortal as createPortal2 } from "react-dom";
|
|
909
|
-
import { jsx as
|
|
1038
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
910
1039
|
function Drawer(props) {
|
|
911
1040
|
const {
|
|
912
1041
|
open,
|
|
@@ -941,7 +1070,7 @@ function Drawer(props) {
|
|
|
941
1070
|
}[_size] + (isHorizontal ? "vw" : "vh");
|
|
942
1071
|
})();
|
|
943
1072
|
return createPortal2(
|
|
944
|
-
/* @__PURE__ */
|
|
1073
|
+
/* @__PURE__ */ jsx19(
|
|
945
1074
|
ShowWithAnimation,
|
|
946
1075
|
{
|
|
947
1076
|
when: open,
|
|
@@ -971,7 +1100,7 @@ function Drawer(props) {
|
|
|
971
1100
|
onClose?.();
|
|
972
1101
|
}
|
|
973
1102
|
},
|
|
974
|
-
children: /* @__PURE__ */
|
|
1103
|
+
children: /* @__PURE__ */ jsx19(
|
|
975
1104
|
ShowWithAnimation,
|
|
976
1105
|
{
|
|
977
1106
|
when: open,
|
|
@@ -1018,9 +1147,9 @@ function Drawer(props) {
|
|
|
1018
1147
|
}
|
|
1019
1148
|
|
|
1020
1149
|
// src/components/Overlay/Drawer/DrawerContent.tsx
|
|
1021
|
-
import { jsx as
|
|
1150
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1022
1151
|
function DrawerContent({ children, className, style }) {
|
|
1023
|
-
return /* @__PURE__ */
|
|
1152
|
+
return /* @__PURE__ */ jsx20(
|
|
1024
1153
|
"div",
|
|
1025
1154
|
{
|
|
1026
1155
|
className: cn("overflow-auto flex-1 p-4 relative hide-scrollbar", className),
|
|
@@ -1031,9 +1160,9 @@ function DrawerContent({ children, className, style }) {
|
|
|
1031
1160
|
}
|
|
1032
1161
|
|
|
1033
1162
|
// src/components/Overlay/Drawer/DrawerHeader.tsx
|
|
1034
|
-
import { jsx as
|
|
1163
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1035
1164
|
function DrawerHeader({ children, className, style }) {
|
|
1036
|
-
return /* @__PURE__ */
|
|
1165
|
+
return /* @__PURE__ */ jsx21(
|
|
1037
1166
|
"div",
|
|
1038
1167
|
{
|
|
1039
1168
|
className: cn("sticky top-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-b border-border", className),
|
|
@@ -1044,9 +1173,9 @@ function DrawerHeader({ children, className, style }) {
|
|
|
1044
1173
|
}
|
|
1045
1174
|
|
|
1046
1175
|
// src/components/Overlay/Drawer/DrawerFooter.tsx
|
|
1047
|
-
import { jsx as
|
|
1176
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1048
1177
|
function DrawerFooter({ children, className, style }) {
|
|
1049
|
-
return /* @__PURE__ */
|
|
1178
|
+
return /* @__PURE__ */ jsx22(
|
|
1050
1179
|
"div",
|
|
1051
1180
|
{
|
|
1052
1181
|
className: cn("sticky bottom-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-t border-border", className),
|
|
@@ -1055,8 +1184,74 @@ function DrawerFooter({ children, className, style }) {
|
|
|
1055
1184
|
}
|
|
1056
1185
|
);
|
|
1057
1186
|
}
|
|
1187
|
+
|
|
1188
|
+
// src/components/Surfaces/Card/Card.tsx
|
|
1189
|
+
import React2 from "react";
|
|
1190
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1191
|
+
var Card = React2.forwardRef(
|
|
1192
|
+
({ className, ...props }, ref) => {
|
|
1193
|
+
return /* @__PURE__ */ jsx23(
|
|
1194
|
+
"div",
|
|
1195
|
+
{
|
|
1196
|
+
ref,
|
|
1197
|
+
className: cn(
|
|
1198
|
+
"w-full rounded-xl border border-gray-200 bg-white text-gray-950 shadow-sm dark:border-gray-800 dark:bg-gray-900 dark:text-gray-50",
|
|
1199
|
+
className
|
|
1200
|
+
),
|
|
1201
|
+
...props
|
|
1202
|
+
}
|
|
1203
|
+
);
|
|
1204
|
+
}
|
|
1205
|
+
);
|
|
1206
|
+
Card.displayName = "Card";
|
|
1207
|
+
|
|
1208
|
+
// src/components/Surfaces/Card/CardHeader.tsx
|
|
1209
|
+
import React3 from "react";
|
|
1210
|
+
import { jsx as jsx24, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1211
|
+
var CardHeader = React3.forwardRef(
|
|
1212
|
+
({ className, avatar, action, title, subheader, ...props }, ref) => {
|
|
1213
|
+
return /* @__PURE__ */ jsxs9(
|
|
1214
|
+
"div",
|
|
1215
|
+
{
|
|
1216
|
+
ref,
|
|
1217
|
+
className: cn("flex items-center p-6", className),
|
|
1218
|
+
...props,
|
|
1219
|
+
children: [
|
|
1220
|
+
avatar && /* @__PURE__ */ jsx24("div", { className: "mr-4 flex-shrink-0", children: avatar }),
|
|
1221
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex-1 flex flex-col gap-1", children: [
|
|
1222
|
+
title && /* @__PURE__ */ jsx24("div", { className: "font-semibold leading-none tracking-tight", children: title }),
|
|
1223
|
+
subheader && /* @__PURE__ */ jsx24("div", { className: "text-sm text-gray-500 dark:text-gray-400", children: subheader })
|
|
1224
|
+
] }),
|
|
1225
|
+
action && /* @__PURE__ */ jsx24("div", { className: "ml-4 flex-shrink-0 self-start", children: action })
|
|
1226
|
+
]
|
|
1227
|
+
}
|
|
1228
|
+
);
|
|
1229
|
+
}
|
|
1230
|
+
);
|
|
1231
|
+
CardHeader.displayName = "CardHeader";
|
|
1232
|
+
|
|
1233
|
+
// src/components/Surfaces/Card/CardContent.tsx
|
|
1234
|
+
import React4 from "react";
|
|
1235
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1236
|
+
var CardContent = React4.forwardRef(
|
|
1237
|
+
({ className, ...props }, ref) => {
|
|
1238
|
+
return /* @__PURE__ */ jsx25(
|
|
1239
|
+
"div",
|
|
1240
|
+
{
|
|
1241
|
+
ref,
|
|
1242
|
+
className: cn("p-6 pt-0", className),
|
|
1243
|
+
...props
|
|
1244
|
+
}
|
|
1245
|
+
);
|
|
1246
|
+
}
|
|
1247
|
+
);
|
|
1248
|
+
CardContent.displayName = "CardContent";
|
|
1058
1249
|
export {
|
|
1059
1250
|
Button_default as Button,
|
|
1251
|
+
Card,
|
|
1252
|
+
CardContent,
|
|
1253
|
+
CardHeader,
|
|
1254
|
+
Carousel,
|
|
1060
1255
|
Dialog,
|
|
1061
1256
|
DialogContent,
|
|
1062
1257
|
DialogFooter,
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
2
|
import { ReactNode, CSSProperties, HTMLAttributes } from 'react';
|
|
3
|
-
import { P as PopoverProps } from '../Input-
|
|
4
|
-
export { I as Input, a as InputProps } from '../Input-
|
|
3
|
+
import { P as PopoverProps } from '../Input-CBAdjRy6.js';
|
|
4
|
+
export { I as Input, a as InputProps } from '../Input-CBAdjRy6.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
declare function Popover(props: PopoverProps):
|
|
7
|
+
declare function Popover(props: PopoverProps): React$1.ReactPortal | null;
|
|
8
8
|
|
|
9
9
|
interface RippleRef {
|
|
10
10
|
/**
|
|
@@ -29,7 +29,7 @@ interface RippleProps {
|
|
|
29
29
|
* Ripple component that provides a material-like ripple effect.
|
|
30
30
|
* It should be placed inside a container with `relative` and `overflow-hidden` styles.
|
|
31
31
|
*/
|
|
32
|
-
declare const Ripple:
|
|
32
|
+
declare const Ripple: React$1.ForwardRefExoticComponent<RippleProps & React$1.RefAttributes<RippleRef>>;
|
|
33
33
|
|
|
34
34
|
type SpinnerColor = "primary" | "secondary" | "error" | "info" | "success" | "warning" | "inherit";
|
|
35
35
|
interface SpinnerProps {
|
package/dist/hooks/index.d.ts
CHANGED
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { T as Theme, a as ThemeProvider, b as ThemeProviderProps, c as ThemeProviderState, u as useTheme } from '../ThemeProvider-
|
|
1
|
+
export { T as Theme, a as ThemeProvider, b as ThemeProviderProps, c as ThemeProviderState, u as useTheme } from '../ThemeProvider-CvUNY0S2.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
|