@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.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React8 = require('react');
|
|
4
4
|
var reactSlot = require('@radix-ui/react-slot');
|
|
5
5
|
var classVarianceAuthority = require('class-variance-authority');
|
|
6
6
|
var clsx = require('clsx');
|
|
@@ -62,7 +62,7 @@ function _interopNamespace(e) {
|
|
|
62
62
|
return Object.freeze(n);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
var
|
|
65
|
+
var React8__namespace = /*#__PURE__*/_interopNamespace(React8);
|
|
66
66
|
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
67
67
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
68
68
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
@@ -95,8 +95,8 @@ var ResizablePrimitive__namespace = /*#__PURE__*/_interopNamespace(ResizablePrim
|
|
|
95
95
|
// src/hooks/use-mobile.ts
|
|
96
96
|
var MOBILE_BREAKPOINT = 768;
|
|
97
97
|
function useIsMobile() {
|
|
98
|
-
const [isMobile, setIsMobile] =
|
|
99
|
-
|
|
98
|
+
const [isMobile, setIsMobile] = React8__namespace.useState(void 0);
|
|
99
|
+
React8__namespace.useEffect(() => {
|
|
100
100
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
101
101
|
const onChange = () => {
|
|
102
102
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -137,7 +137,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
);
|
|
140
|
-
var Button =
|
|
140
|
+
var Button = React8__namespace.forwardRef(
|
|
141
141
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
142
142
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
143
143
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -236,23 +236,22 @@ function ButtonGroupSeparator({
|
|
|
236
236
|
}
|
|
237
237
|
);
|
|
238
238
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
Input.displayName = "Input";
|
|
239
|
+
function Input({ className, type, ...props }) {
|
|
240
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
241
|
+
"input",
|
|
242
|
+
{
|
|
243
|
+
type,
|
|
244
|
+
"data-slot": "input",
|
|
245
|
+
className: cn(
|
|
246
|
+
"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",
|
|
247
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
248
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
249
|
+
className
|
|
250
|
+
),
|
|
251
|
+
...props
|
|
252
|
+
}
|
|
253
|
+
);
|
|
254
|
+
}
|
|
256
255
|
function Textarea({ className, ...props }) {
|
|
257
256
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
258
257
|
"textarea",
|
|
@@ -500,7 +499,7 @@ function Slider({
|
|
|
500
499
|
max = 100,
|
|
501
500
|
...props
|
|
502
501
|
}) {
|
|
503
|
-
const _values =
|
|
502
|
+
const _values = React8__namespace.useMemo(
|
|
504
503
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
505
504
|
[value, defaultValue, min, max]
|
|
506
505
|
);
|
|
@@ -786,7 +785,7 @@ function Toggle({
|
|
|
786
785
|
}
|
|
787
786
|
);
|
|
788
787
|
}
|
|
789
|
-
var ToggleGroupContext =
|
|
788
|
+
var ToggleGroupContext = React8__namespace.createContext({
|
|
790
789
|
size: "default",
|
|
791
790
|
variant: "default",
|
|
792
791
|
spacing: 0
|
|
@@ -823,7 +822,7 @@ function ToggleGroupItem({
|
|
|
823
822
|
size,
|
|
824
823
|
...props
|
|
825
824
|
}) {
|
|
826
|
-
const context =
|
|
825
|
+
const context = React8__namespace.useContext(ToggleGroupContext);
|
|
827
826
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
828
827
|
ToggleGroupPrimitive__namespace.Item,
|
|
829
828
|
{
|
|
@@ -878,7 +877,7 @@ function InputOTPSlot({
|
|
|
878
877
|
className,
|
|
879
878
|
...props
|
|
880
879
|
}) {
|
|
881
|
-
const inputOTPContext =
|
|
880
|
+
const inputOTPContext = React8__namespace.useContext(inputOtp.OTPInputContext);
|
|
882
881
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
883
882
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
884
883
|
"div",
|
|
@@ -917,7 +916,7 @@ function Label2({
|
|
|
917
916
|
);
|
|
918
917
|
}
|
|
919
918
|
var Form = reactHookForm.FormProvider;
|
|
920
|
-
var FormFieldContext =
|
|
919
|
+
var FormFieldContext = React8__namespace.createContext(
|
|
921
920
|
{}
|
|
922
921
|
);
|
|
923
922
|
var FormField = ({
|
|
@@ -926,8 +925,8 @@ var FormField = ({
|
|
|
926
925
|
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props }) });
|
|
927
926
|
};
|
|
928
927
|
var useFormField = () => {
|
|
929
|
-
const fieldContext =
|
|
930
|
-
const itemContext =
|
|
928
|
+
const fieldContext = React8__namespace.useContext(FormFieldContext);
|
|
929
|
+
const itemContext = React8__namespace.useContext(FormItemContext);
|
|
931
930
|
const { getFieldState } = reactHookForm.useFormContext();
|
|
932
931
|
const formState = reactHookForm.useFormState({ name: fieldContext.name });
|
|
933
932
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
@@ -944,11 +943,11 @@ var useFormField = () => {
|
|
|
944
943
|
...fieldState
|
|
945
944
|
};
|
|
946
945
|
};
|
|
947
|
-
var FormItemContext =
|
|
946
|
+
var FormItemContext = React8__namespace.createContext(
|
|
948
947
|
{}
|
|
949
948
|
);
|
|
950
949
|
function FormItem({ className, ...props }) {
|
|
951
|
-
const id =
|
|
950
|
+
const id = React8__namespace.useId();
|
|
952
951
|
return /* @__PURE__ */ jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
953
952
|
"div",
|
|
954
953
|
{
|
|
@@ -1196,7 +1195,7 @@ function FieldError({
|
|
|
1196
1195
|
errors,
|
|
1197
1196
|
...props
|
|
1198
1197
|
}) {
|
|
1199
|
-
const content =
|
|
1198
|
+
const content = React8.useMemo(() => {
|
|
1200
1199
|
if (children) {
|
|
1201
1200
|
return children;
|
|
1202
1201
|
}
|
|
@@ -1227,56 +1226,69 @@ function FieldError({
|
|
|
1227
1226
|
}
|
|
1228
1227
|
);
|
|
1229
1228
|
}
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
)
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
)
|
|
1279
|
-
|
|
1229
|
+
function Card({ className, ...props }) {
|
|
1230
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1231
|
+
"div",
|
|
1232
|
+
{
|
|
1233
|
+
"data-slot": "card",
|
|
1234
|
+
className: cn(
|
|
1235
|
+
"bg-card text-card-foreground rounded-xl border shadow",
|
|
1236
|
+
className
|
|
1237
|
+
),
|
|
1238
|
+
...props
|
|
1239
|
+
}
|
|
1240
|
+
);
|
|
1241
|
+
}
|
|
1242
|
+
function CardHeader({ className, ...props }) {
|
|
1243
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1244
|
+
"div",
|
|
1245
|
+
{
|
|
1246
|
+
"data-slot": "card-header",
|
|
1247
|
+
className: cn("flex flex-col gap-1.5 p-6", className),
|
|
1248
|
+
...props
|
|
1249
|
+
}
|
|
1250
|
+
);
|
|
1251
|
+
}
|
|
1252
|
+
function CardTitle({ className, ...props }) {
|
|
1253
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1254
|
+
"div",
|
|
1255
|
+
{
|
|
1256
|
+
"data-slot": "card-title",
|
|
1257
|
+
className: cn("leading-none font-semibold tracking-tight", className),
|
|
1258
|
+
...props
|
|
1259
|
+
}
|
|
1260
|
+
);
|
|
1261
|
+
}
|
|
1262
|
+
function CardDescription({ className, ...props }) {
|
|
1263
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1264
|
+
"div",
|
|
1265
|
+
{
|
|
1266
|
+
"data-slot": "card-description",
|
|
1267
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1268
|
+
...props
|
|
1269
|
+
}
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1272
|
+
function CardContent({ className, ...props }) {
|
|
1273
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1274
|
+
"div",
|
|
1275
|
+
{
|
|
1276
|
+
"data-slot": "card-content",
|
|
1277
|
+
className: cn("p-6 pt-0", className),
|
|
1278
|
+
...props
|
|
1279
|
+
}
|
|
1280
|
+
);
|
|
1281
|
+
}
|
|
1282
|
+
function CardFooter({ className, ...props }) {
|
|
1283
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1284
|
+
"div",
|
|
1285
|
+
{
|
|
1286
|
+
"data-slot": "card-footer",
|
|
1287
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
1288
|
+
...props
|
|
1289
|
+
}
|
|
1290
|
+
);
|
|
1291
|
+
}
|
|
1280
1292
|
function Table({ className, ...props }) {
|
|
1281
1293
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1282
1294
|
"div",
|
|
@@ -1731,8 +1743,8 @@ function CalendarDayButton({
|
|
|
1731
1743
|
...props
|
|
1732
1744
|
}) {
|
|
1733
1745
|
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
1734
|
-
const ref =
|
|
1735
|
-
|
|
1746
|
+
const ref = React8__namespace.useRef(null);
|
|
1747
|
+
React8__namespace.useEffect(() => {
|
|
1736
1748
|
if (modifiers.focused) ref.current?.focus();
|
|
1737
1749
|
}, [modifiers.focused]);
|
|
1738
1750
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1755,9 +1767,9 @@ function CalendarDayButton({
|
|
|
1755
1767
|
}
|
|
1756
1768
|
);
|
|
1757
1769
|
}
|
|
1758
|
-
var CarouselContext =
|
|
1770
|
+
var CarouselContext = React8__namespace.createContext(null);
|
|
1759
1771
|
function useCarousel() {
|
|
1760
|
-
const context =
|
|
1772
|
+
const context = React8__namespace.useContext(CarouselContext);
|
|
1761
1773
|
if (!context) {
|
|
1762
1774
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
1763
1775
|
}
|
|
@@ -1779,20 +1791,20 @@ function Carousel({
|
|
|
1779
1791
|
},
|
|
1780
1792
|
plugins
|
|
1781
1793
|
);
|
|
1782
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
1783
|
-
const [canScrollNext, setCanScrollNext] =
|
|
1784
|
-
const onSelect =
|
|
1794
|
+
const [canScrollPrev, setCanScrollPrev] = React8__namespace.useState(false);
|
|
1795
|
+
const [canScrollNext, setCanScrollNext] = React8__namespace.useState(false);
|
|
1796
|
+
const onSelect = React8__namespace.useCallback((api2) => {
|
|
1785
1797
|
if (!api2) return;
|
|
1786
1798
|
setCanScrollPrev(api2.canScrollPrev());
|
|
1787
1799
|
setCanScrollNext(api2.canScrollNext());
|
|
1788
1800
|
}, []);
|
|
1789
|
-
const scrollPrev =
|
|
1801
|
+
const scrollPrev = React8__namespace.useCallback(() => {
|
|
1790
1802
|
api?.scrollPrev();
|
|
1791
1803
|
}, [api]);
|
|
1792
|
-
const scrollNext =
|
|
1804
|
+
const scrollNext = React8__namespace.useCallback(() => {
|
|
1793
1805
|
api?.scrollNext();
|
|
1794
1806
|
}, [api]);
|
|
1795
|
-
const handleKeyDown =
|
|
1807
|
+
const handleKeyDown = React8__namespace.useCallback(
|
|
1796
1808
|
(event) => {
|
|
1797
1809
|
if (event.key === "ArrowLeft") {
|
|
1798
1810
|
event.preventDefault();
|
|
@@ -1804,11 +1816,11 @@ function Carousel({
|
|
|
1804
1816
|
},
|
|
1805
1817
|
[scrollPrev, scrollNext]
|
|
1806
1818
|
);
|
|
1807
|
-
|
|
1819
|
+
React8__namespace.useEffect(() => {
|
|
1808
1820
|
if (!api || !setApi) return;
|
|
1809
1821
|
setApi(api);
|
|
1810
1822
|
}, [api, setApi]);
|
|
1811
|
-
|
|
1823
|
+
React8__namespace.useEffect(() => {
|
|
1812
1824
|
if (!api) return;
|
|
1813
1825
|
onSelect(api);
|
|
1814
1826
|
api.on("reInit", onSelect);
|
|
@@ -1941,9 +1953,9 @@ function CarouselNext({
|
|
|
1941
1953
|
);
|
|
1942
1954
|
}
|
|
1943
1955
|
var THEMES = { light: "", dark: ".dark" };
|
|
1944
|
-
var ChartContext =
|
|
1956
|
+
var ChartContext = React8__namespace.createContext(null);
|
|
1945
1957
|
function useChart() {
|
|
1946
|
-
const context =
|
|
1958
|
+
const context = React8__namespace.useContext(ChartContext);
|
|
1947
1959
|
if (!context) {
|
|
1948
1960
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
1949
1961
|
}
|
|
@@ -1956,7 +1968,7 @@ function ChartContainer({
|
|
|
1956
1968
|
config,
|
|
1957
1969
|
...props
|
|
1958
1970
|
}) {
|
|
1959
|
-
const uniqueId =
|
|
1971
|
+
const uniqueId = React8__namespace.useId();
|
|
1960
1972
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
1961
1973
|
return /* @__PURE__ */ jsxRuntime.jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1962
1974
|
"div",
|
|
@@ -2017,7 +2029,7 @@ function ChartTooltipContent({
|
|
|
2017
2029
|
labelKey
|
|
2018
2030
|
}) {
|
|
2019
2031
|
const { config } = useChart();
|
|
2020
|
-
const tooltipLabel =
|
|
2032
|
+
const tooltipLabel = React8__namespace.useMemo(() => {
|
|
2021
2033
|
if (hideLabel || !payload?.length) {
|
|
2022
2034
|
return null;
|
|
2023
2035
|
}
|
|
@@ -2740,16 +2752,16 @@ var M = (e, i, s, u, m, a, l, h) => {
|
|
|
2740
2752
|
} catch (n) {
|
|
2741
2753
|
}
|
|
2742
2754
|
};
|
|
2743
|
-
var x =
|
|
2755
|
+
var x = React8__namespace.createContext(void 0);
|
|
2744
2756
|
var U = { setTheme: (e) => {
|
|
2745
2757
|
}, themes: [] };
|
|
2746
2758
|
var z = () => {
|
|
2747
2759
|
var e;
|
|
2748
|
-
return (e =
|
|
2760
|
+
return (e = React8__namespace.useContext(x)) != null ? e : U;
|
|
2749
2761
|
};
|
|
2750
|
-
|
|
2762
|
+
React8__namespace.memo(({ forcedTheme: e, storageKey: i, attribute: s, enableSystem: u, enableColorScheme: m, defaultTheme: a, value: l, themes: h, nonce: d, scriptProps: w }) => {
|
|
2751
2763
|
let p = JSON.stringify([s, i, a, e, h, l, u, m]).slice(1, -1);
|
|
2752
|
-
return
|
|
2764
|
+
return React8__namespace.createElement("script", { ...w, suppressHydrationWarning: true, nonce: typeof window == "undefined" ? d : "", dangerouslySetInnerHTML: { __html: `(${M.toString()})(${p})` } });
|
|
2753
2765
|
});
|
|
2754
2766
|
var Toaster = ({ ...props }) => {
|
|
2755
2767
|
const { theme = "system" } = z();
|
|
@@ -4410,12 +4422,17 @@ function CollapsibleTrigger2({
|
|
|
4410
4422
|
);
|
|
4411
4423
|
}
|
|
4412
4424
|
function CollapsibleContent2({
|
|
4425
|
+
className,
|
|
4413
4426
|
...props
|
|
4414
4427
|
}) {
|
|
4415
4428
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4416
4429
|
CollapsiblePrimitive__namespace.CollapsibleContent,
|
|
4417
4430
|
{
|
|
4418
4431
|
"data-slot": "collapsible-content",
|
|
4432
|
+
className: cn(
|
|
4433
|
+
"data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down overflow-hidden",
|
|
4434
|
+
className
|
|
4435
|
+
),
|
|
4419
4436
|
...props
|
|
4420
4437
|
}
|
|
4421
4438
|
);
|
|
@@ -4465,9 +4482,9 @@ var SIDEBAR_WIDTH = "16rem";
|
|
|
4465
4482
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
4466
4483
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
4467
4484
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4468
|
-
var SidebarContext =
|
|
4485
|
+
var SidebarContext = React8__namespace.createContext(null);
|
|
4469
4486
|
function useSidebar() {
|
|
4470
|
-
const context =
|
|
4487
|
+
const context = React8__namespace.useContext(SidebarContext);
|
|
4471
4488
|
if (!context) {
|
|
4472
4489
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
4473
4490
|
}
|
|
@@ -4483,10 +4500,10 @@ function SidebarProvider({
|
|
|
4483
4500
|
...props
|
|
4484
4501
|
}) {
|
|
4485
4502
|
const isMobile = useIsMobile();
|
|
4486
|
-
const [openMobile, setOpenMobile] =
|
|
4487
|
-
const [_open, _setOpen] =
|
|
4503
|
+
const [openMobile, setOpenMobile] = React8__namespace.useState(false);
|
|
4504
|
+
const [_open, _setOpen] = React8__namespace.useState(defaultOpen);
|
|
4488
4505
|
const open = openProp ?? _open;
|
|
4489
|
-
const setOpen =
|
|
4506
|
+
const setOpen = React8__namespace.useCallback(
|
|
4490
4507
|
(value) => {
|
|
4491
4508
|
const openState = typeof value === "function" ? value(open) : value;
|
|
4492
4509
|
if (setOpenProp) {
|
|
@@ -4498,10 +4515,10 @@ function SidebarProvider({
|
|
|
4498
4515
|
},
|
|
4499
4516
|
[setOpenProp, open]
|
|
4500
4517
|
);
|
|
4501
|
-
const toggleSidebar =
|
|
4518
|
+
const toggleSidebar = React8__namespace.useCallback(() => {
|
|
4502
4519
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
4503
4520
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
4504
|
-
|
|
4521
|
+
React8__namespace.useEffect(() => {
|
|
4505
4522
|
const handleKeyDown = (event) => {
|
|
4506
4523
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
4507
4524
|
event.preventDefault();
|
|
@@ -4512,7 +4529,7 @@ function SidebarProvider({
|
|
|
4512
4529
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
4513
4530
|
}, [toggleSidebar]);
|
|
4514
4531
|
const state = open ? "expanded" : "collapsed";
|
|
4515
|
-
const contextValue =
|
|
4532
|
+
const contextValue = React8__namespace.useMemo(
|
|
4516
4533
|
() => ({
|
|
4517
4534
|
state,
|
|
4518
4535
|
open,
|
|
@@ -4970,7 +4987,7 @@ function SidebarMenuSkeleton({
|
|
|
4970
4987
|
showIcon = false,
|
|
4971
4988
|
...props
|
|
4972
4989
|
}) {
|
|
4973
|
-
const width =
|
|
4990
|
+
const width = React8__namespace.useMemo(() => {
|
|
4974
4991
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
4975
4992
|
}, []);
|
|
4976
4993
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5113,7 +5130,7 @@ var sectionVariants = classVarianceAuthority.cva(
|
|
|
5113
5130
|
}
|
|
5114
5131
|
);
|
|
5115
5132
|
var isGlassVariant = (variant) => variant?.startsWith("glass-") ?? false;
|
|
5116
|
-
var Section =
|
|
5133
|
+
var Section = React8__namespace.forwardRef(
|
|
5117
5134
|
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5118
5135
|
"section",
|
|
5119
5136
|
{
|
|
@@ -5125,7 +5142,7 @@ var Section = React10__namespace.forwardRef(
|
|
|
5125
5142
|
)
|
|
5126
5143
|
);
|
|
5127
5144
|
Section.displayName = "Section";
|
|
5128
|
-
var SectionHeader =
|
|
5145
|
+
var SectionHeader = React8__namespace.forwardRef(
|
|
5129
5146
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5130
5147
|
"div",
|
|
5131
5148
|
{
|
|
@@ -5140,7 +5157,7 @@ var SectionHeader = React10__namespace.forwardRef(
|
|
|
5140
5157
|
)
|
|
5141
5158
|
);
|
|
5142
5159
|
SectionHeader.displayName = "SectionHeader";
|
|
5143
|
-
var SectionTitle =
|
|
5160
|
+
var SectionTitle = React8__namespace.forwardRef(
|
|
5144
5161
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5145
5162
|
"h2",
|
|
5146
5163
|
{
|
|
@@ -5154,7 +5171,7 @@ var SectionTitle = React10__namespace.forwardRef(
|
|
|
5154
5171
|
)
|
|
5155
5172
|
);
|
|
5156
5173
|
SectionTitle.displayName = "SectionTitle";
|
|
5157
|
-
var SectionDescription =
|
|
5174
|
+
var SectionDescription = React8__namespace.forwardRef(
|
|
5158
5175
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5159
5176
|
"p",
|
|
5160
5177
|
{
|
|
@@ -5168,7 +5185,7 @@ var SectionDescription = React10__namespace.forwardRef(
|
|
|
5168
5185
|
)
|
|
5169
5186
|
);
|
|
5170
5187
|
SectionDescription.displayName = "SectionDescription";
|
|
5171
|
-
var SectionContent =
|
|
5188
|
+
var SectionContent = React8__namespace.forwardRef(
|
|
5172
5189
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5173
5190
|
"div",
|
|
5174
5191
|
{
|
|
@@ -5182,7 +5199,7 @@ var SectionContent = React10__namespace.forwardRef(
|
|
|
5182
5199
|
)
|
|
5183
5200
|
);
|
|
5184
5201
|
SectionContent.displayName = "SectionContent";
|
|
5185
|
-
var SectionFooter =
|
|
5202
|
+
var SectionFooter = React8__namespace.forwardRef(
|
|
5186
5203
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5187
5204
|
"div",
|
|
5188
5205
|
{
|