@j3m-quantum/ui 0.7.0 → 0.7.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/index.cjs +134 -117
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +132 -115
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +238 -21
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -62,7 +62,7 @@ declare function ButtonGroupText({ className, asChild, ...props }: React$1.Compo
|
|
|
62
62
|
}): react_jsx_runtime.JSX.Element;
|
|
63
63
|
declare function ButtonGroupSeparator({ className, orientation, ...props }: React$1.ComponentProps<typeof Separator>): react_jsx_runtime.JSX.Element;
|
|
64
64
|
|
|
65
|
-
declare
|
|
65
|
+
declare function Input({ className, type, ...props }: React$1.ComponentProps<"input">): react_jsx_runtime.JSX.Element;
|
|
66
66
|
|
|
67
67
|
declare function InputGroup({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
68
68
|
declare const inputGroupAddonVariants: (props?: ({
|
|
@@ -169,12 +169,12 @@ declare function FieldError({ className, children, errors, ...props }: React.Com
|
|
|
169
169
|
} | undefined>;
|
|
170
170
|
}): react_jsx_runtime.JSX.Element | null;
|
|
171
171
|
|
|
172
|
-
declare
|
|
173
|
-
declare
|
|
174
|
-
declare
|
|
175
|
-
declare
|
|
176
|
-
declare
|
|
177
|
-
declare
|
|
172
|
+
declare function Card({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
173
|
+
declare function CardHeader({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
174
|
+
declare function CardTitle({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
175
|
+
declare function CardDescription({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
176
|
+
declare function CardContent({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
177
|
+
declare function CardFooter({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
178
178
|
|
|
179
179
|
declare function Table({ className, ...props }: React$1.ComponentProps<"table">): react_jsx_runtime.JSX.Element;
|
|
180
180
|
declare function TableHeader({ className, ...props }: React$1.ComponentProps<"thead">): react_jsx_runtime.JSX.Element;
|
|
@@ -497,9 +497,9 @@ declare function HoverCardContent({ className, align, sideOffset, ...props }: Re
|
|
|
497
497
|
declare function ScrollArea({ className, children, ...props }: React$1.ComponentProps<typeof ScrollAreaPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
498
498
|
declare function ScrollBar({ className, orientation, ...props }: React$1.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
|
|
499
499
|
|
|
500
|
-
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
501
|
-
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): react_jsx_runtime.JSX.Element;
|
|
502
|
-
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): react_jsx_runtime.JSX.Element;
|
|
500
|
+
declare function Collapsible({ ...props }: React$1.ComponentProps<typeof CollapsiblePrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
501
|
+
declare function CollapsibleTrigger({ ...props }: React$1.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): react_jsx_runtime.JSX.Element;
|
|
502
|
+
declare function CollapsibleContent({ className, ...props }: React$1.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): react_jsx_runtime.JSX.Element;
|
|
503
503
|
|
|
504
504
|
declare function ResizablePanelGroup({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>): react_jsx_runtime.JSX.Element;
|
|
505
505
|
declare function ResizablePanel({ ...props }: React$1.ComponentProps<typeof ResizablePrimitive.Panel>): react_jsx_runtime.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ declare function ButtonGroupText({ className, asChild, ...props }: React$1.Compo
|
|
|
62
62
|
}): react_jsx_runtime.JSX.Element;
|
|
63
63
|
declare function ButtonGroupSeparator({ className, orientation, ...props }: React$1.ComponentProps<typeof Separator>): react_jsx_runtime.JSX.Element;
|
|
64
64
|
|
|
65
|
-
declare
|
|
65
|
+
declare function Input({ className, type, ...props }: React$1.ComponentProps<"input">): react_jsx_runtime.JSX.Element;
|
|
66
66
|
|
|
67
67
|
declare function InputGroup({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
68
68
|
declare const inputGroupAddonVariants: (props?: ({
|
|
@@ -169,12 +169,12 @@ declare function FieldError({ className, children, errors, ...props }: React.Com
|
|
|
169
169
|
} | undefined>;
|
|
170
170
|
}): react_jsx_runtime.JSX.Element | null;
|
|
171
171
|
|
|
172
|
-
declare
|
|
173
|
-
declare
|
|
174
|
-
declare
|
|
175
|
-
declare
|
|
176
|
-
declare
|
|
177
|
-
declare
|
|
172
|
+
declare function Card({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
173
|
+
declare function CardHeader({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
174
|
+
declare function CardTitle({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
175
|
+
declare function CardDescription({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
176
|
+
declare function CardContent({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
177
|
+
declare function CardFooter({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
178
178
|
|
|
179
179
|
declare function Table({ className, ...props }: React$1.ComponentProps<"table">): react_jsx_runtime.JSX.Element;
|
|
180
180
|
declare function TableHeader({ className, ...props }: React$1.ComponentProps<"thead">): react_jsx_runtime.JSX.Element;
|
|
@@ -497,9 +497,9 @@ declare function HoverCardContent({ className, align, sideOffset, ...props }: Re
|
|
|
497
497
|
declare function ScrollArea({ className, children, ...props }: React$1.ComponentProps<typeof ScrollAreaPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
498
498
|
declare function ScrollBar({ className, orientation, ...props }: React$1.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
|
|
499
499
|
|
|
500
|
-
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
501
|
-
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): react_jsx_runtime.JSX.Element;
|
|
502
|
-
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): react_jsx_runtime.JSX.Element;
|
|
500
|
+
declare function Collapsible({ ...props }: React$1.ComponentProps<typeof CollapsiblePrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
501
|
+
declare function CollapsibleTrigger({ ...props }: React$1.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): react_jsx_runtime.JSX.Element;
|
|
502
|
+
declare function CollapsibleContent({ className, ...props }: React$1.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): react_jsx_runtime.JSX.Element;
|
|
503
503
|
|
|
504
504
|
declare function ResizablePanelGroup({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>): react_jsx_runtime.JSX.Element;
|
|
505
505
|
declare function ResizablePanel({ ...props }: React$1.ComponentProps<typeof ResizablePrimitive.Panel>): react_jsx_runtime.JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React8 from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
@@ -44,8 +44,8 @@ import * as ResizablePrimitive from 'react-resizable-panels';
|
|
|
44
44
|
// src/hooks/use-mobile.ts
|
|
45
45
|
var MOBILE_BREAKPOINT = 768;
|
|
46
46
|
function useIsMobile() {
|
|
47
|
-
const [isMobile, setIsMobile] =
|
|
48
|
-
|
|
47
|
+
const [isMobile, setIsMobile] = React8.useState(void 0);
|
|
48
|
+
React8.useEffect(() => {
|
|
49
49
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
50
50
|
const onChange = () => {
|
|
51
51
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -86,7 +86,7 @@ var buttonVariants = cva(
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
);
|
|
89
|
-
var Button =
|
|
89
|
+
var Button = React8.forwardRef(
|
|
90
90
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
91
91
|
const Comp = asChild ? Slot : "button";
|
|
92
92
|
return /* @__PURE__ */ jsx(
|
|
@@ -185,23 +185,22 @@ function ButtonGroupSeparator({
|
|
|
185
185
|
}
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
Input.displayName = "Input";
|
|
188
|
+
function Input({ className, type, ...props }) {
|
|
189
|
+
return /* @__PURE__ */ jsx(
|
|
190
|
+
"input",
|
|
191
|
+
{
|
|
192
|
+
type,
|
|
193
|
+
"data-slot": "input",
|
|
194
|
+
className: cn(
|
|
195
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
196
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
197
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
198
|
+
className
|
|
199
|
+
),
|
|
200
|
+
...props
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
}
|
|
205
204
|
function Textarea({ className, ...props }) {
|
|
206
205
|
return /* @__PURE__ */ jsx(
|
|
207
206
|
"textarea",
|
|
@@ -449,7 +448,7 @@ function Slider({
|
|
|
449
448
|
max = 100,
|
|
450
449
|
...props
|
|
451
450
|
}) {
|
|
452
|
-
const _values =
|
|
451
|
+
const _values = React8.useMemo(
|
|
453
452
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
454
453
|
[value, defaultValue, min, max]
|
|
455
454
|
);
|
|
@@ -735,7 +734,7 @@ function Toggle({
|
|
|
735
734
|
}
|
|
736
735
|
);
|
|
737
736
|
}
|
|
738
|
-
var ToggleGroupContext =
|
|
737
|
+
var ToggleGroupContext = React8.createContext({
|
|
739
738
|
size: "default",
|
|
740
739
|
variant: "default",
|
|
741
740
|
spacing: 0
|
|
@@ -772,7 +771,7 @@ function ToggleGroupItem({
|
|
|
772
771
|
size,
|
|
773
772
|
...props
|
|
774
773
|
}) {
|
|
775
|
-
const context =
|
|
774
|
+
const context = React8.useContext(ToggleGroupContext);
|
|
776
775
|
return /* @__PURE__ */ jsx(
|
|
777
776
|
ToggleGroupPrimitive.Item,
|
|
778
777
|
{
|
|
@@ -827,7 +826,7 @@ function InputOTPSlot({
|
|
|
827
826
|
className,
|
|
828
827
|
...props
|
|
829
828
|
}) {
|
|
830
|
-
const inputOTPContext =
|
|
829
|
+
const inputOTPContext = React8.useContext(OTPInputContext);
|
|
831
830
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
832
831
|
return /* @__PURE__ */ jsxs(
|
|
833
832
|
"div",
|
|
@@ -866,7 +865,7 @@ function Label2({
|
|
|
866
865
|
);
|
|
867
866
|
}
|
|
868
867
|
var Form = FormProvider;
|
|
869
|
-
var FormFieldContext =
|
|
868
|
+
var FormFieldContext = React8.createContext(
|
|
870
869
|
{}
|
|
871
870
|
);
|
|
872
871
|
var FormField = ({
|
|
@@ -875,8 +874,8 @@ var FormField = ({
|
|
|
875
874
|
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
876
875
|
};
|
|
877
876
|
var useFormField = () => {
|
|
878
|
-
const fieldContext =
|
|
879
|
-
const itemContext =
|
|
877
|
+
const fieldContext = React8.useContext(FormFieldContext);
|
|
878
|
+
const itemContext = React8.useContext(FormItemContext);
|
|
880
879
|
const { getFieldState } = useFormContext();
|
|
881
880
|
const formState = useFormState({ name: fieldContext.name });
|
|
882
881
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
@@ -893,11 +892,11 @@ var useFormField = () => {
|
|
|
893
892
|
...fieldState
|
|
894
893
|
};
|
|
895
894
|
};
|
|
896
|
-
var FormItemContext =
|
|
895
|
+
var FormItemContext = React8.createContext(
|
|
897
896
|
{}
|
|
898
897
|
);
|
|
899
898
|
function FormItem({ className, ...props }) {
|
|
900
|
-
const id =
|
|
899
|
+
const id = React8.useId();
|
|
901
900
|
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx(
|
|
902
901
|
"div",
|
|
903
902
|
{
|
|
@@ -1176,56 +1175,69 @@ function FieldError({
|
|
|
1176
1175
|
}
|
|
1177
1176
|
);
|
|
1178
1177
|
}
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
)
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
)
|
|
1228
|
-
|
|
1178
|
+
function Card({ className, ...props }) {
|
|
1179
|
+
return /* @__PURE__ */ jsx(
|
|
1180
|
+
"div",
|
|
1181
|
+
{
|
|
1182
|
+
"data-slot": "card",
|
|
1183
|
+
className: cn(
|
|
1184
|
+
"bg-card text-card-foreground rounded-xl border shadow",
|
|
1185
|
+
className
|
|
1186
|
+
),
|
|
1187
|
+
...props
|
|
1188
|
+
}
|
|
1189
|
+
);
|
|
1190
|
+
}
|
|
1191
|
+
function CardHeader({ className, ...props }) {
|
|
1192
|
+
return /* @__PURE__ */ jsx(
|
|
1193
|
+
"div",
|
|
1194
|
+
{
|
|
1195
|
+
"data-slot": "card-header",
|
|
1196
|
+
className: cn("flex flex-col gap-1.5 p-6", className),
|
|
1197
|
+
...props
|
|
1198
|
+
}
|
|
1199
|
+
);
|
|
1200
|
+
}
|
|
1201
|
+
function CardTitle({ className, ...props }) {
|
|
1202
|
+
return /* @__PURE__ */ jsx(
|
|
1203
|
+
"div",
|
|
1204
|
+
{
|
|
1205
|
+
"data-slot": "card-title",
|
|
1206
|
+
className: cn("leading-none font-semibold tracking-tight", className),
|
|
1207
|
+
...props
|
|
1208
|
+
}
|
|
1209
|
+
);
|
|
1210
|
+
}
|
|
1211
|
+
function CardDescription({ className, ...props }) {
|
|
1212
|
+
return /* @__PURE__ */ jsx(
|
|
1213
|
+
"div",
|
|
1214
|
+
{
|
|
1215
|
+
"data-slot": "card-description",
|
|
1216
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1217
|
+
...props
|
|
1218
|
+
}
|
|
1219
|
+
);
|
|
1220
|
+
}
|
|
1221
|
+
function CardContent({ className, ...props }) {
|
|
1222
|
+
return /* @__PURE__ */ jsx(
|
|
1223
|
+
"div",
|
|
1224
|
+
{
|
|
1225
|
+
"data-slot": "card-content",
|
|
1226
|
+
className: cn("p-6 pt-0", className),
|
|
1227
|
+
...props
|
|
1228
|
+
}
|
|
1229
|
+
);
|
|
1230
|
+
}
|
|
1231
|
+
function CardFooter({ className, ...props }) {
|
|
1232
|
+
return /* @__PURE__ */ jsx(
|
|
1233
|
+
"div",
|
|
1234
|
+
{
|
|
1235
|
+
"data-slot": "card-footer",
|
|
1236
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
1237
|
+
...props
|
|
1238
|
+
}
|
|
1239
|
+
);
|
|
1240
|
+
}
|
|
1229
1241
|
function Table({ className, ...props }) {
|
|
1230
1242
|
return /* @__PURE__ */ jsx(
|
|
1231
1243
|
"div",
|
|
@@ -1680,8 +1692,8 @@ function CalendarDayButton({
|
|
|
1680
1692
|
...props
|
|
1681
1693
|
}) {
|
|
1682
1694
|
const defaultClassNames = getDefaultClassNames();
|
|
1683
|
-
const ref =
|
|
1684
|
-
|
|
1695
|
+
const ref = React8.useRef(null);
|
|
1696
|
+
React8.useEffect(() => {
|
|
1685
1697
|
if (modifiers.focused) ref.current?.focus();
|
|
1686
1698
|
}, [modifiers.focused]);
|
|
1687
1699
|
return /* @__PURE__ */ jsx(
|
|
@@ -1704,9 +1716,9 @@ function CalendarDayButton({
|
|
|
1704
1716
|
}
|
|
1705
1717
|
);
|
|
1706
1718
|
}
|
|
1707
|
-
var CarouselContext =
|
|
1719
|
+
var CarouselContext = React8.createContext(null);
|
|
1708
1720
|
function useCarousel() {
|
|
1709
|
-
const context =
|
|
1721
|
+
const context = React8.useContext(CarouselContext);
|
|
1710
1722
|
if (!context) {
|
|
1711
1723
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
1712
1724
|
}
|
|
@@ -1728,20 +1740,20 @@ function Carousel({
|
|
|
1728
1740
|
},
|
|
1729
1741
|
plugins
|
|
1730
1742
|
);
|
|
1731
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
1732
|
-
const [canScrollNext, setCanScrollNext] =
|
|
1733
|
-
const onSelect =
|
|
1743
|
+
const [canScrollPrev, setCanScrollPrev] = React8.useState(false);
|
|
1744
|
+
const [canScrollNext, setCanScrollNext] = React8.useState(false);
|
|
1745
|
+
const onSelect = React8.useCallback((api2) => {
|
|
1734
1746
|
if (!api2) return;
|
|
1735
1747
|
setCanScrollPrev(api2.canScrollPrev());
|
|
1736
1748
|
setCanScrollNext(api2.canScrollNext());
|
|
1737
1749
|
}, []);
|
|
1738
|
-
const scrollPrev =
|
|
1750
|
+
const scrollPrev = React8.useCallback(() => {
|
|
1739
1751
|
api?.scrollPrev();
|
|
1740
1752
|
}, [api]);
|
|
1741
|
-
const scrollNext =
|
|
1753
|
+
const scrollNext = React8.useCallback(() => {
|
|
1742
1754
|
api?.scrollNext();
|
|
1743
1755
|
}, [api]);
|
|
1744
|
-
const handleKeyDown =
|
|
1756
|
+
const handleKeyDown = React8.useCallback(
|
|
1745
1757
|
(event) => {
|
|
1746
1758
|
if (event.key === "ArrowLeft") {
|
|
1747
1759
|
event.preventDefault();
|
|
@@ -1753,11 +1765,11 @@ function Carousel({
|
|
|
1753
1765
|
},
|
|
1754
1766
|
[scrollPrev, scrollNext]
|
|
1755
1767
|
);
|
|
1756
|
-
|
|
1768
|
+
React8.useEffect(() => {
|
|
1757
1769
|
if (!api || !setApi) return;
|
|
1758
1770
|
setApi(api);
|
|
1759
1771
|
}, [api, setApi]);
|
|
1760
|
-
|
|
1772
|
+
React8.useEffect(() => {
|
|
1761
1773
|
if (!api) return;
|
|
1762
1774
|
onSelect(api);
|
|
1763
1775
|
api.on("reInit", onSelect);
|
|
@@ -1890,9 +1902,9 @@ function CarouselNext({
|
|
|
1890
1902
|
);
|
|
1891
1903
|
}
|
|
1892
1904
|
var THEMES = { light: "", dark: ".dark" };
|
|
1893
|
-
var ChartContext =
|
|
1905
|
+
var ChartContext = React8.createContext(null);
|
|
1894
1906
|
function useChart() {
|
|
1895
|
-
const context =
|
|
1907
|
+
const context = React8.useContext(ChartContext);
|
|
1896
1908
|
if (!context) {
|
|
1897
1909
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
1898
1910
|
}
|
|
@@ -1905,7 +1917,7 @@ function ChartContainer({
|
|
|
1905
1917
|
config,
|
|
1906
1918
|
...props
|
|
1907
1919
|
}) {
|
|
1908
|
-
const uniqueId =
|
|
1920
|
+
const uniqueId = React8.useId();
|
|
1909
1921
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
1910
1922
|
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
1911
1923
|
"div",
|
|
@@ -1966,7 +1978,7 @@ function ChartTooltipContent({
|
|
|
1966
1978
|
labelKey
|
|
1967
1979
|
}) {
|
|
1968
1980
|
const { config } = useChart();
|
|
1969
|
-
const tooltipLabel =
|
|
1981
|
+
const tooltipLabel = React8.useMemo(() => {
|
|
1970
1982
|
if (hideLabel || !payload?.length) {
|
|
1971
1983
|
return null;
|
|
1972
1984
|
}
|
|
@@ -2689,16 +2701,16 @@ var M = (e, i, s, u, m, a, l, h) => {
|
|
|
2689
2701
|
} catch (n) {
|
|
2690
2702
|
}
|
|
2691
2703
|
};
|
|
2692
|
-
var x =
|
|
2704
|
+
var x = React8.createContext(void 0);
|
|
2693
2705
|
var U = { setTheme: (e) => {
|
|
2694
2706
|
}, themes: [] };
|
|
2695
2707
|
var z = () => {
|
|
2696
2708
|
var e;
|
|
2697
|
-
return (e =
|
|
2709
|
+
return (e = React8.useContext(x)) != null ? e : U;
|
|
2698
2710
|
};
|
|
2699
|
-
|
|
2711
|
+
React8.memo(({ forcedTheme: e, storageKey: i, attribute: s, enableSystem: u, enableColorScheme: m, defaultTheme: a, value: l, themes: h, nonce: d, scriptProps: w }) => {
|
|
2700
2712
|
let p = JSON.stringify([s, i, a, e, h, l, u, m]).slice(1, -1);
|
|
2701
|
-
return
|
|
2713
|
+
return React8.createElement("script", { ...w, suppressHydrationWarning: true, nonce: typeof window == "undefined" ? d : "", dangerouslySetInnerHTML: { __html: `(${M.toString()})(${p})` } });
|
|
2702
2714
|
});
|
|
2703
2715
|
var Toaster = ({ ...props }) => {
|
|
2704
2716
|
const { theme = "system" } = z();
|
|
@@ -4359,12 +4371,17 @@ function CollapsibleTrigger2({
|
|
|
4359
4371
|
);
|
|
4360
4372
|
}
|
|
4361
4373
|
function CollapsibleContent2({
|
|
4374
|
+
className,
|
|
4362
4375
|
...props
|
|
4363
4376
|
}) {
|
|
4364
4377
|
return /* @__PURE__ */ jsx(
|
|
4365
4378
|
CollapsiblePrimitive.CollapsibleContent,
|
|
4366
4379
|
{
|
|
4367
4380
|
"data-slot": "collapsible-content",
|
|
4381
|
+
className: cn(
|
|
4382
|
+
"data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down overflow-hidden",
|
|
4383
|
+
className
|
|
4384
|
+
),
|
|
4368
4385
|
...props
|
|
4369
4386
|
}
|
|
4370
4387
|
);
|
|
@@ -4414,9 +4431,9 @@ var SIDEBAR_WIDTH = "16rem";
|
|
|
4414
4431
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
4415
4432
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
4416
4433
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4417
|
-
var SidebarContext =
|
|
4434
|
+
var SidebarContext = React8.createContext(null);
|
|
4418
4435
|
function useSidebar() {
|
|
4419
|
-
const context =
|
|
4436
|
+
const context = React8.useContext(SidebarContext);
|
|
4420
4437
|
if (!context) {
|
|
4421
4438
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
4422
4439
|
}
|
|
@@ -4432,10 +4449,10 @@ function SidebarProvider({
|
|
|
4432
4449
|
...props
|
|
4433
4450
|
}) {
|
|
4434
4451
|
const isMobile = useIsMobile();
|
|
4435
|
-
const [openMobile, setOpenMobile] =
|
|
4436
|
-
const [_open, _setOpen] =
|
|
4452
|
+
const [openMobile, setOpenMobile] = React8.useState(false);
|
|
4453
|
+
const [_open, _setOpen] = React8.useState(defaultOpen);
|
|
4437
4454
|
const open = openProp ?? _open;
|
|
4438
|
-
const setOpen =
|
|
4455
|
+
const setOpen = React8.useCallback(
|
|
4439
4456
|
(value) => {
|
|
4440
4457
|
const openState = typeof value === "function" ? value(open) : value;
|
|
4441
4458
|
if (setOpenProp) {
|
|
@@ -4447,10 +4464,10 @@ function SidebarProvider({
|
|
|
4447
4464
|
},
|
|
4448
4465
|
[setOpenProp, open]
|
|
4449
4466
|
);
|
|
4450
|
-
const toggleSidebar =
|
|
4467
|
+
const toggleSidebar = React8.useCallback(() => {
|
|
4451
4468
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
4452
4469
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
4453
|
-
|
|
4470
|
+
React8.useEffect(() => {
|
|
4454
4471
|
const handleKeyDown = (event) => {
|
|
4455
4472
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
4456
4473
|
event.preventDefault();
|
|
@@ -4461,7 +4478,7 @@ function SidebarProvider({
|
|
|
4461
4478
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
4462
4479
|
}, [toggleSidebar]);
|
|
4463
4480
|
const state = open ? "expanded" : "collapsed";
|
|
4464
|
-
const contextValue =
|
|
4481
|
+
const contextValue = React8.useMemo(
|
|
4465
4482
|
() => ({
|
|
4466
4483
|
state,
|
|
4467
4484
|
open,
|
|
@@ -4919,7 +4936,7 @@ function SidebarMenuSkeleton({
|
|
|
4919
4936
|
showIcon = false,
|
|
4920
4937
|
...props
|
|
4921
4938
|
}) {
|
|
4922
|
-
const width =
|
|
4939
|
+
const width = React8.useMemo(() => {
|
|
4923
4940
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
4924
4941
|
}, []);
|
|
4925
4942
|
return /* @__PURE__ */ jsxs(
|
|
@@ -5062,7 +5079,7 @@ var sectionVariants = cva(
|
|
|
5062
5079
|
}
|
|
5063
5080
|
);
|
|
5064
5081
|
var isGlassVariant = (variant) => variant?.startsWith("glass-") ?? false;
|
|
5065
|
-
var Section =
|
|
5082
|
+
var Section = React8.forwardRef(
|
|
5066
5083
|
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5067
5084
|
"section",
|
|
5068
5085
|
{
|
|
@@ -5074,7 +5091,7 @@ var Section = React10.forwardRef(
|
|
|
5074
5091
|
)
|
|
5075
5092
|
);
|
|
5076
5093
|
Section.displayName = "Section";
|
|
5077
|
-
var SectionHeader =
|
|
5094
|
+
var SectionHeader = React8.forwardRef(
|
|
5078
5095
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5079
5096
|
"div",
|
|
5080
5097
|
{
|
|
@@ -5089,7 +5106,7 @@ var SectionHeader = React10.forwardRef(
|
|
|
5089
5106
|
)
|
|
5090
5107
|
);
|
|
5091
5108
|
SectionHeader.displayName = "SectionHeader";
|
|
5092
|
-
var SectionTitle =
|
|
5109
|
+
var SectionTitle = React8.forwardRef(
|
|
5093
5110
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5094
5111
|
"h2",
|
|
5095
5112
|
{
|
|
@@ -5103,7 +5120,7 @@ var SectionTitle = React10.forwardRef(
|
|
|
5103
5120
|
)
|
|
5104
5121
|
);
|
|
5105
5122
|
SectionTitle.displayName = "SectionTitle";
|
|
5106
|
-
var SectionDescription =
|
|
5123
|
+
var SectionDescription = React8.forwardRef(
|
|
5107
5124
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5108
5125
|
"p",
|
|
5109
5126
|
{
|
|
@@ -5117,7 +5134,7 @@ var SectionDescription = React10.forwardRef(
|
|
|
5117
5134
|
)
|
|
5118
5135
|
);
|
|
5119
5136
|
SectionDescription.displayName = "SectionDescription";
|
|
5120
|
-
var SectionContent =
|
|
5137
|
+
var SectionContent = React8.forwardRef(
|
|
5121
5138
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5122
5139
|
"div",
|
|
5123
5140
|
{
|
|
@@ -5131,7 +5148,7 @@ var SectionContent = React10.forwardRef(
|
|
|
5131
5148
|
)
|
|
5132
5149
|
);
|
|
5133
5150
|
SectionContent.displayName = "SectionContent";
|
|
5134
|
-
var SectionFooter =
|
|
5151
|
+
var SectionFooter = React8.forwardRef(
|
|
5135
5152
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5136
5153
|
"div",
|
|
5137
5154
|
{
|