@still-void/ui 3.2.0 → 3.3.0
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/CHANGELOG.md +65 -0
- package/README.md +5 -2
- package/dist/react/client/index.cjs +522 -77
- package/dist/react/client/index.cjs.map +1 -1
- package/dist/react/client/index.d.cts +145 -2
- package/dist/react/client/index.d.ts +145 -2
- package/dist/react/client/index.js +521 -77
- package/dist/react/client/index.js.map +1 -1
- package/dist/react/index.cjs +35 -8
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +7 -1
- package/dist/react/index.d.ts +7 -1
- package/dist/react/index.js +44 -17
- package/dist/react/index.js.map +1 -1
- package/dist/style.css +343 -1
- package/package.json +2 -1
|
@@ -266,7 +266,73 @@ function CopyButton({
|
|
|
266
266
|
import { useMemo as useMemo2 } from "react";
|
|
267
267
|
|
|
268
268
|
// src/react/client/hooks.ts
|
|
269
|
-
import { useEffect as useEffect3, useState as useState3 } from "react";
|
|
269
|
+
import { useEffect as useEffect3, useSyncExternalStore, useState as useState3 } from "react";
|
|
270
|
+
|
|
271
|
+
// src/behaviors/mediaQuery.ts
|
|
272
|
+
function createMediaQuery(query) {
|
|
273
|
+
if (typeof window === "undefined" || !window.matchMedia) {
|
|
274
|
+
return {
|
|
275
|
+
getSnapshot: () => false,
|
|
276
|
+
subscribe: () => () => {
|
|
277
|
+
},
|
|
278
|
+
// no-op unsubscribe
|
|
279
|
+
destroy: () => {
|
|
280
|
+
}
|
|
281
|
+
// no-op
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
const mql = window.matchMedia(query);
|
|
285
|
+
const listeners = [];
|
|
286
|
+
let currentMatches = mql.matches;
|
|
287
|
+
let attached = false;
|
|
288
|
+
const handleChange = () => {
|
|
289
|
+
const newMatches = mql.matches;
|
|
290
|
+
if (newMatches !== currentMatches) {
|
|
291
|
+
currentMatches = newMatches;
|
|
292
|
+
for (const listener of [...listeners]) {
|
|
293
|
+
listener();
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
const attachListener = () => {
|
|
298
|
+
if (attached) return;
|
|
299
|
+
attached = true;
|
|
300
|
+
if (mql.addEventListener) {
|
|
301
|
+
mql.addEventListener("change", handleChange);
|
|
302
|
+
} else if (mql.addListener) {
|
|
303
|
+
mql.addListener(handleChange);
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
const detachListener = () => {
|
|
307
|
+
if (!attached) return;
|
|
308
|
+
attached = false;
|
|
309
|
+
if (mql.removeEventListener) {
|
|
310
|
+
mql.removeEventListener("change", handleChange);
|
|
311
|
+
} else if (mql.removeListener) {
|
|
312
|
+
mql.removeListener(handleChange);
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
return {
|
|
316
|
+
getSnapshot: () => mql.matches,
|
|
317
|
+
subscribe: (listener) => {
|
|
318
|
+
listeners.push(listener);
|
|
319
|
+
attachListener();
|
|
320
|
+
return () => {
|
|
321
|
+
const index = listeners.indexOf(listener);
|
|
322
|
+
if (index >= 0) {
|
|
323
|
+
listeners.splice(index, 1);
|
|
324
|
+
}
|
|
325
|
+
if (listeners.length === 0) {
|
|
326
|
+
detachListener();
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
},
|
|
330
|
+
destroy: () => {
|
|
331
|
+
listeners.length = 0;
|
|
332
|
+
detachListener();
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
}
|
|
270
336
|
|
|
271
337
|
// src/behaviors/readingProgress.ts
|
|
272
338
|
var raf = typeof window !== "undefined" && typeof window.requestAnimationFrame === "function" ? (cb) => window.requestAnimationFrame(cb) : (
|
|
@@ -373,6 +439,30 @@ function useReadingProgress(target, step = 1) {
|
|
|
373
439
|
}, [target, step]);
|
|
374
440
|
return percent;
|
|
375
441
|
}
|
|
442
|
+
function useMediaQuery(query) {
|
|
443
|
+
const mq = useSyncExternalStore(
|
|
444
|
+
// subscribe: attach listener and return unsubscribe
|
|
445
|
+
(onStoreChange) => {
|
|
446
|
+
const mediaQuery = createMediaQuery(query);
|
|
447
|
+
const unsubscribe = mediaQuery.subscribe(onStoreChange);
|
|
448
|
+
return () => {
|
|
449
|
+
unsubscribe();
|
|
450
|
+
mediaQuery.destroy();
|
|
451
|
+
};
|
|
452
|
+
},
|
|
453
|
+
// getSnapshot: return current state (after hydration)
|
|
454
|
+
() => {
|
|
455
|
+
const mediaQuery = createMediaQuery(query);
|
|
456
|
+
const matches = mediaQuery.getSnapshot();
|
|
457
|
+
mediaQuery.destroy();
|
|
458
|
+
return matches;
|
|
459
|
+
},
|
|
460
|
+
// getServerSnapshot: return initial state during SSR (desktop/false)
|
|
461
|
+
// R5-01 AC-4: SSR returns false without error
|
|
462
|
+
() => false
|
|
463
|
+
);
|
|
464
|
+
return mq;
|
|
465
|
+
}
|
|
376
466
|
|
|
377
467
|
// src/react/client/TableOfContents.tsx
|
|
378
468
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
@@ -405,9 +495,12 @@ function ReadingProgress({ target, announce, className, ...rest }) {
|
|
|
405
495
|
return /* @__PURE__ */ jsx5("div", { className: cx(readingProgress(), className), ...a11yProps, ...rest, children: /* @__PURE__ */ jsx5("div", { className: readingProgressClasses.bar }) });
|
|
406
496
|
}
|
|
407
497
|
|
|
408
|
-
// src/
|
|
498
|
+
// src/react/client/ToastProvider.tsx
|
|
409
499
|
import * as React2 from "react";
|
|
410
|
-
import * as
|
|
500
|
+
import * as Toast from "@radix-ui/react-toast";
|
|
501
|
+
|
|
502
|
+
// src/components/ui/icon.tsx
|
|
503
|
+
import * as React from "react";
|
|
411
504
|
|
|
412
505
|
// src/lib/utils.ts
|
|
413
506
|
import { clsx } from "clsx";
|
|
@@ -416,9 +509,6 @@ function cn(...inputs) {
|
|
|
416
509
|
return twMerge(clsx(inputs));
|
|
417
510
|
}
|
|
418
511
|
|
|
419
|
-
// src/components/ui/icon.tsx
|
|
420
|
-
import * as React from "react";
|
|
421
|
-
|
|
422
512
|
// src/components/ui/icon-set.ts
|
|
423
513
|
import {
|
|
424
514
|
Bars3Icon,
|
|
@@ -473,6 +563,7 @@ var Icon = React.forwardRef(
|
|
|
473
563
|
{
|
|
474
564
|
...props,
|
|
475
565
|
ref,
|
|
566
|
+
"data-icon-name": name,
|
|
476
567
|
className: cn(
|
|
477
568
|
"sv-icon",
|
|
478
569
|
size === "sm" && "sv-icon--sm",
|
|
@@ -488,13 +579,357 @@ var Icon = React.forwardRef(
|
|
|
488
579
|
);
|
|
489
580
|
Icon.displayName = "Icon";
|
|
490
581
|
|
|
582
|
+
// src/react/client/ToastProvider.tsx
|
|
583
|
+
import { Fragment, jsx as jsx7, jsxs } from "react/jsx-runtime";
|
|
584
|
+
var ToastContext = React2.createContext(null);
|
|
585
|
+
function useToast() {
|
|
586
|
+
const context = React2.useContext(ToastContext);
|
|
587
|
+
if (!context) {
|
|
588
|
+
throw new Error("useToast must be used within ToastProvider");
|
|
589
|
+
}
|
|
590
|
+
return context;
|
|
591
|
+
}
|
|
592
|
+
var variantConfig = {
|
|
593
|
+
info: { icon: "info", type: "background" },
|
|
594
|
+
success: { icon: "check-circle", type: "background" },
|
|
595
|
+
warning: { icon: "alert-triangle", type: "foreground" },
|
|
596
|
+
danger: { icon: "alert-circle", type: "foreground" }
|
|
597
|
+
};
|
|
598
|
+
function toastReducer(state, action) {
|
|
599
|
+
switch (action.type) {
|
|
600
|
+
case "ADD": {
|
|
601
|
+
return [...state, action.entry];
|
|
602
|
+
}
|
|
603
|
+
case "REMOVE": {
|
|
604
|
+
return state.filter((t) => t.id !== action.id);
|
|
605
|
+
}
|
|
606
|
+
case "UPDATE": {
|
|
607
|
+
return state.map(
|
|
608
|
+
(t) => t.id === action.id ? { ...t, ...action.patch, version: t.version + 1 } : t
|
|
609
|
+
);
|
|
610
|
+
}
|
|
611
|
+
case "REMOVE_ALL": {
|
|
612
|
+
return [];
|
|
613
|
+
}
|
|
614
|
+
/* v8 ignore next 2 */
|
|
615
|
+
default: {
|
|
616
|
+
return state;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
function ToastProvider({
|
|
621
|
+
children,
|
|
622
|
+
duration = 5e3,
|
|
623
|
+
max = 3,
|
|
624
|
+
label = "Notifications",
|
|
625
|
+
closeLabel = "Close",
|
|
626
|
+
swipeDirection = "right"
|
|
627
|
+
}) {
|
|
628
|
+
const [allToasts, dispatch] = React2.useReducer(toastReducer, []);
|
|
629
|
+
const isMountedRef = React2.useRef(true);
|
|
630
|
+
React2.useEffect(() => {
|
|
631
|
+
isMountedRef.current = true;
|
|
632
|
+
return () => {
|
|
633
|
+
isMountedRef.current = false;
|
|
634
|
+
};
|
|
635
|
+
}, []);
|
|
636
|
+
const validatedMax = typeof max === "number" && Number.isFinite(max) && max > 0 ? Math.floor(max) : 3;
|
|
637
|
+
const displayedToasts = allToasts.slice(-validatedMax);
|
|
638
|
+
const toast = React2.useCallback(
|
|
639
|
+
(options) => {
|
|
640
|
+
if (!isMountedRef.current) return { id: "", dismiss: () => {
|
|
641
|
+
}, update: () => {
|
|
642
|
+
} };
|
|
643
|
+
const id = Math.random().toString(36).substr(2, 9);
|
|
644
|
+
const variant = options.variant ?? "info";
|
|
645
|
+
const duration_val = typeof options.duration === "number" && options.duration > 0 ? options.duration : duration;
|
|
646
|
+
const entry = {
|
|
647
|
+
...options,
|
|
648
|
+
variant,
|
|
649
|
+
duration: duration_val,
|
|
650
|
+
id,
|
|
651
|
+
version: 0
|
|
652
|
+
};
|
|
653
|
+
dispatch({ type: "ADD", entry });
|
|
654
|
+
return {
|
|
655
|
+
id,
|
|
656
|
+
dismiss: () => dispatch({ type: "REMOVE", id }),
|
|
657
|
+
update: (patch) => {
|
|
658
|
+
dispatch({ type: "UPDATE", id, patch });
|
|
659
|
+
}
|
|
660
|
+
};
|
|
661
|
+
},
|
|
662
|
+
[duration]
|
|
663
|
+
);
|
|
664
|
+
const dismiss = React2.useCallback((id) => {
|
|
665
|
+
dispatch({ type: "REMOVE", id });
|
|
666
|
+
}, []);
|
|
667
|
+
const dismissAll = React2.useCallback(() => {
|
|
668
|
+
dispatch({ type: "REMOVE_ALL" });
|
|
669
|
+
}, []);
|
|
670
|
+
React2.useEffect(() => {
|
|
671
|
+
if (allToasts.length > validatedMax) {
|
|
672
|
+
const toRemove = allToasts[0];
|
|
673
|
+
if (toRemove) {
|
|
674
|
+
dismiss(toRemove.id);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}, [allToasts.length, validatedMax, dismiss]);
|
|
678
|
+
const value = {
|
|
679
|
+
toast,
|
|
680
|
+
dismiss,
|
|
681
|
+
dismissAll,
|
|
682
|
+
toasts: displayedToasts
|
|
683
|
+
};
|
|
684
|
+
return /* @__PURE__ */ jsx7(ToastContext.Provider, { value, children: /* @__PURE__ */ jsxs(Toast.Provider, { duration, label, swipeDirection, children: [
|
|
685
|
+
children,
|
|
686
|
+
/* @__PURE__ */ jsx7(Toast.Viewport, { className: "sv-toast__viewport" }),
|
|
687
|
+
/* @__PURE__ */ jsx7(
|
|
688
|
+
ToastViewportRenderer,
|
|
689
|
+
{
|
|
690
|
+
toasts: displayedToasts,
|
|
691
|
+
closeLabel,
|
|
692
|
+
duration,
|
|
693
|
+
dismiss
|
|
694
|
+
}
|
|
695
|
+
)
|
|
696
|
+
] }) });
|
|
697
|
+
}
|
|
698
|
+
function ToastViewportRenderer({
|
|
699
|
+
toasts,
|
|
700
|
+
closeLabel,
|
|
701
|
+
duration,
|
|
702
|
+
dismiss
|
|
703
|
+
}) {
|
|
704
|
+
return /* @__PURE__ */ jsx7(Fragment, { children: toasts.map((entry) => {
|
|
705
|
+
const { id, title, description, variant = "info", action } = entry;
|
|
706
|
+
const config = variantConfig[variant];
|
|
707
|
+
const toastDuration = entry.duration ?? duration;
|
|
708
|
+
const handleActionClick = () => {
|
|
709
|
+
if (action?.onClick) {
|
|
710
|
+
action.onClick();
|
|
711
|
+
}
|
|
712
|
+
dismiss(id);
|
|
713
|
+
};
|
|
714
|
+
return /* @__PURE__ */ jsxs(
|
|
715
|
+
Toast.Root,
|
|
716
|
+
{
|
|
717
|
+
open: true,
|
|
718
|
+
onOpenChange: (open) => {
|
|
719
|
+
if (!open) {
|
|
720
|
+
dismiss(id);
|
|
721
|
+
}
|
|
722
|
+
},
|
|
723
|
+
duration: toastDuration,
|
|
724
|
+
type: config.type,
|
|
725
|
+
"data-variant": variant,
|
|
726
|
+
className: cn("sv-toast", `sv-toast--${variant}`),
|
|
727
|
+
children: [
|
|
728
|
+
/* @__PURE__ */ jsx7(Icon, { name: config.icon, className: "sv-toast__icon", "aria-hidden": "true", "data-name": config.icon }),
|
|
729
|
+
/* @__PURE__ */ jsxs("div", { className: "sv-toast__content", children: [
|
|
730
|
+
title && /* @__PURE__ */ jsx7(Toast.Title, { className: "sv-toast__title", children: title }),
|
|
731
|
+
description && /* @__PURE__ */ jsx7(Toast.Description, { className: "sv-toast__description", children: description })
|
|
732
|
+
] }),
|
|
733
|
+
/* @__PURE__ */ jsxs("div", { className: "sv-toast__actions", children: [
|
|
734
|
+
action && /* @__PURE__ */ jsx7(
|
|
735
|
+
Toast.Action,
|
|
736
|
+
{
|
|
737
|
+
altText: action.altText,
|
|
738
|
+
asChild: true,
|
|
739
|
+
children: /* @__PURE__ */ jsx7(
|
|
740
|
+
"button",
|
|
741
|
+
{
|
|
742
|
+
type: "button",
|
|
743
|
+
className: "sv-toast__action",
|
|
744
|
+
onClick: handleActionClick,
|
|
745
|
+
children: action.label
|
|
746
|
+
}
|
|
747
|
+
)
|
|
748
|
+
}
|
|
749
|
+
),
|
|
750
|
+
/* @__PURE__ */ jsx7(Toast.Close, { asChild: true, children: /* @__PURE__ */ jsx7("button", { type: "button", className: "sv-toast__close", "aria-label": closeLabel, children: /* @__PURE__ */ jsx7(Icon, { name: "x" }) }) })
|
|
751
|
+
] })
|
|
752
|
+
]
|
|
753
|
+
},
|
|
754
|
+
`${id}-${entry.version}`
|
|
755
|
+
);
|
|
756
|
+
}) });
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
// src/react/client/SidebarProvider.tsx
|
|
760
|
+
import {
|
|
761
|
+
createContext as createContext3,
|
|
762
|
+
useContext as useContext3,
|
|
763
|
+
useId,
|
|
764
|
+
useState as useState4,
|
|
765
|
+
useCallback as useCallback2,
|
|
766
|
+
useRef as useRef4,
|
|
767
|
+
forwardRef as forwardRef2
|
|
768
|
+
} from "react";
|
|
769
|
+
import * as Dialog from "@radix-ui/react-dialog";
|
|
770
|
+
import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
771
|
+
function composeRefs(...refs) {
|
|
772
|
+
return (node) => {
|
|
773
|
+
for (const ref of refs) {
|
|
774
|
+
if (typeof ref === "function") {
|
|
775
|
+
ref(node);
|
|
776
|
+
} else if (ref !== null && ref !== void 0) {
|
|
777
|
+
;
|
|
778
|
+
ref.current = node;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
var SidebarContext = createContext3(null);
|
|
784
|
+
function SidebarProvider({
|
|
785
|
+
children,
|
|
786
|
+
defaultOpen = true,
|
|
787
|
+
open: controlledOpen,
|
|
788
|
+
onOpenChange,
|
|
789
|
+
collapsible: collapsibleProp = "offcanvas",
|
|
790
|
+
breakpoint: breakpointProp
|
|
791
|
+
}) {
|
|
792
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState4(defaultOpen);
|
|
793
|
+
const panelId = useId();
|
|
794
|
+
const triggerRef = useRef4(null);
|
|
795
|
+
const breakpoint = (() => {
|
|
796
|
+
if (breakpointProp === void 0 || breakpointProp === 0 || breakpointProp < 0 || Number.isNaN(breakpointProp) || !Number.isFinite(breakpointProp)) {
|
|
797
|
+
return 1024;
|
|
798
|
+
}
|
|
799
|
+
return breakpointProp;
|
|
800
|
+
})();
|
|
801
|
+
const isMobile = !useMediaQuery(`(min-width: ${breakpoint}px)`);
|
|
802
|
+
const isControlled = controlledOpen !== void 0;
|
|
803
|
+
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
804
|
+
const setOpen = useCallback2(
|
|
805
|
+
(newOpen) => {
|
|
806
|
+
if (collapsibleProp === "none") return;
|
|
807
|
+
if (isControlled) {
|
|
808
|
+
onOpenChange?.(newOpen);
|
|
809
|
+
} else {
|
|
810
|
+
setUncontrolledOpen(newOpen);
|
|
811
|
+
}
|
|
812
|
+
},
|
|
813
|
+
[collapsibleProp, isControlled, onOpenChange]
|
|
814
|
+
);
|
|
815
|
+
const toggle = useCallback2(() => {
|
|
816
|
+
if (collapsibleProp === "none") return;
|
|
817
|
+
if (isControlled) {
|
|
818
|
+
onOpenChange?.(!controlledOpen);
|
|
819
|
+
} else {
|
|
820
|
+
setUncontrolledOpen((prev) => !prev);
|
|
821
|
+
}
|
|
822
|
+
}, [collapsibleProp, isControlled, controlledOpen, onOpenChange]);
|
|
823
|
+
const contextValue = {
|
|
824
|
+
open,
|
|
825
|
+
setOpen,
|
|
826
|
+
toggle,
|
|
827
|
+
isMobile,
|
|
828
|
+
collapsible: collapsibleProp,
|
|
829
|
+
panelId,
|
|
830
|
+
triggerRef
|
|
831
|
+
};
|
|
832
|
+
return /* @__PURE__ */ jsx8(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx8(
|
|
833
|
+
"div",
|
|
834
|
+
{
|
|
835
|
+
className: "sv-app-shell",
|
|
836
|
+
"data-state": open ? "open" : "closed",
|
|
837
|
+
"data-collapsible": collapsibleProp,
|
|
838
|
+
"data-mobile": isMobile,
|
|
839
|
+
children
|
|
840
|
+
}
|
|
841
|
+
) });
|
|
842
|
+
}
|
|
843
|
+
function useSidebar() {
|
|
844
|
+
const context = useContext3(SidebarContext);
|
|
845
|
+
if (!context) {
|
|
846
|
+
throw new Error("useSidebar must be used within SidebarProvider");
|
|
847
|
+
}
|
|
848
|
+
return context;
|
|
849
|
+
}
|
|
850
|
+
var SidebarPanel = forwardRef2(
|
|
851
|
+
function SidebarPanel2({ className, title = "Navigation", children, ...props }, ref) {
|
|
852
|
+
const { open, setOpen, isMobile, collapsible, panelId, triggerRef } = useSidebar();
|
|
853
|
+
if (isMobile && collapsible !== "none") {
|
|
854
|
+
return /* @__PURE__ */ jsx8(Dialog.Root, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs2(Dialog.Portal, { children: [
|
|
855
|
+
/* @__PURE__ */ jsx8(Dialog.Overlay, { className: "sv-overlay" }),
|
|
856
|
+
/* @__PURE__ */ jsxs2(
|
|
857
|
+
Dialog.Content,
|
|
858
|
+
{
|
|
859
|
+
ref,
|
|
860
|
+
className: cn("sv-app-sidebar sv-app-sidebar__drawer", className),
|
|
861
|
+
role: "dialog",
|
|
862
|
+
"aria-modal": "true",
|
|
863
|
+
id: panelId,
|
|
864
|
+
onCloseAutoFocus: (event) => {
|
|
865
|
+
event.preventDefault();
|
|
866
|
+
triggerRef.current?.focus();
|
|
867
|
+
},
|
|
868
|
+
...props,
|
|
869
|
+
children: [
|
|
870
|
+
/* @__PURE__ */ jsx8(Dialog.Title, { className: "sv-sr-only", children: title }),
|
|
871
|
+
/* @__PURE__ */ jsx8("div", { className: "sv-app-sidebar__body", children }),
|
|
872
|
+
/* @__PURE__ */ jsx8(Dialog.Close, { className: "sv-dialog__close", asChild: true, children: /* @__PURE__ */ jsx8("button", { "aria-label": "Close sidebar", children: /* @__PURE__ */ jsx8(Icon, { name: "x" }) }) })
|
|
873
|
+
]
|
|
874
|
+
}
|
|
875
|
+
)
|
|
876
|
+
] }) });
|
|
877
|
+
}
|
|
878
|
+
return /* @__PURE__ */ jsx8(
|
|
879
|
+
"aside",
|
|
880
|
+
{
|
|
881
|
+
ref,
|
|
882
|
+
className: cn("sv-app-sidebar", className),
|
|
883
|
+
id: panelId,
|
|
884
|
+
...props,
|
|
885
|
+
children: /* @__PURE__ */ jsx8("div", { className: "sv-app-sidebar__body", children })
|
|
886
|
+
}
|
|
887
|
+
);
|
|
888
|
+
}
|
|
889
|
+
);
|
|
890
|
+
SidebarPanel.displayName = "SidebarPanel";
|
|
891
|
+
var SidebarTrigger = forwardRef2(
|
|
892
|
+
function SidebarTrigger2({ className, label, children, onClick, ...props }, ref) {
|
|
893
|
+
const { open, toggle, collapsible, panelId, triggerRef } = useSidebar();
|
|
894
|
+
if (collapsible === "none") {
|
|
895
|
+
return null;
|
|
896
|
+
}
|
|
897
|
+
return /* @__PURE__ */ jsx8(
|
|
898
|
+
"button",
|
|
899
|
+
{
|
|
900
|
+
ref: composeRefs(ref, triggerRef),
|
|
901
|
+
type: "button",
|
|
902
|
+
...props,
|
|
903
|
+
className: cn("sv-app-sidebar-trigger", className),
|
|
904
|
+
"aria-expanded": open,
|
|
905
|
+
"aria-controls": panelId,
|
|
906
|
+
"aria-label": label || "Toggle sidebar",
|
|
907
|
+
onClick: (event) => {
|
|
908
|
+
onClick?.(event);
|
|
909
|
+
toggle();
|
|
910
|
+
},
|
|
911
|
+
children: children || /* @__PURE__ */ jsx8(Icon, { name: "menu" })
|
|
912
|
+
}
|
|
913
|
+
);
|
|
914
|
+
}
|
|
915
|
+
);
|
|
916
|
+
SidebarTrigger.displayName = "SidebarTrigger";
|
|
917
|
+
var SidebarInset = forwardRef2(
|
|
918
|
+
function SidebarInset2({ className, ...props }, ref) {
|
|
919
|
+
return /* @__PURE__ */ jsx8("main", { ref, className: cn("sv-app-sidebar-inset", className), ...props });
|
|
920
|
+
}
|
|
921
|
+
);
|
|
922
|
+
SidebarInset.displayName = "SidebarInset";
|
|
923
|
+
|
|
491
924
|
// src/components/ui/dialog.tsx
|
|
492
|
-
import
|
|
493
|
-
|
|
925
|
+
import * as React3 from "react";
|
|
926
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
927
|
+
import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
928
|
+
var Dialog2 = DialogPrimitive.Root;
|
|
494
929
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
495
930
|
var DialogPortal = DialogPrimitive.Portal;
|
|
496
931
|
var DialogClose = DialogPrimitive.Close;
|
|
497
|
-
var DialogOverlay =
|
|
932
|
+
var DialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
498
933
|
DialogPrimitive.Overlay,
|
|
499
934
|
{
|
|
500
935
|
ref,
|
|
@@ -503,11 +938,11 @@ var DialogOverlay = React2.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
503
938
|
}
|
|
504
939
|
));
|
|
505
940
|
DialogOverlay.displayName = "DialogOverlay";
|
|
506
|
-
var DialogContent =
|
|
941
|
+
var DialogContent = React3.forwardRef(({ className, children, showCloseButton = true, closeLabel: closeLabelProp, ...props }, ref) => {
|
|
507
942
|
const closeLabel = closeLabelProp && closeLabelProp.trim().length > 0 ? closeLabelProp : "Close dialog";
|
|
508
|
-
return /* @__PURE__ */
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
943
|
+
return /* @__PURE__ */ jsxs3(DialogPortal, { children: [
|
|
944
|
+
/* @__PURE__ */ jsx9(DialogOverlay, {}),
|
|
945
|
+
/* @__PURE__ */ jsxs3(
|
|
511
946
|
DialogPrimitive.Content,
|
|
512
947
|
{
|
|
513
948
|
ref,
|
|
@@ -516,9 +951,9 @@ var DialogContent = React2.forwardRef(({ className, children, showCloseButton =
|
|
|
516
951
|
"aria-modal": "true",
|
|
517
952
|
children: [
|
|
518
953
|
children,
|
|
519
|
-
showCloseButton ? /* @__PURE__ */
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
/* @__PURE__ */
|
|
954
|
+
showCloseButton ? /* @__PURE__ */ jsxs3(DialogPrimitive.Close, { className: "sv-dialog__close", children: [
|
|
955
|
+
/* @__PURE__ */ jsx9(Icon, { name: "x" }),
|
|
956
|
+
/* @__PURE__ */ jsx9("span", { className: "sv-sr-only", children: closeLabel })
|
|
522
957
|
] }) : null
|
|
523
958
|
]
|
|
524
959
|
}
|
|
@@ -529,14 +964,14 @@ DialogContent.displayName = "DialogContent";
|
|
|
529
964
|
var DialogHeader = ({
|
|
530
965
|
className,
|
|
531
966
|
...props
|
|
532
|
-
}) => /* @__PURE__ */
|
|
967
|
+
}) => /* @__PURE__ */ jsx9("div", { className: cn("sv-dialog__header", className), ...props });
|
|
533
968
|
DialogHeader.displayName = "DialogHeader";
|
|
534
969
|
var DialogFooter = ({
|
|
535
970
|
className,
|
|
536
971
|
...props
|
|
537
|
-
}) => /* @__PURE__ */
|
|
972
|
+
}) => /* @__PURE__ */ jsx9("div", { className: cn("sv-dialog__footer", className), ...props });
|
|
538
973
|
DialogFooter.displayName = "DialogFooter";
|
|
539
|
-
var DialogTitle =
|
|
974
|
+
var DialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
540
975
|
DialogPrimitive.Title,
|
|
541
976
|
{
|
|
542
977
|
ref,
|
|
@@ -545,7 +980,7 @@ var DialogTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
545
980
|
}
|
|
546
981
|
));
|
|
547
982
|
DialogTitle.displayName = "DialogTitle";
|
|
548
|
-
var DialogDescription =
|
|
983
|
+
var DialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
549
984
|
DialogPrimitive.Description,
|
|
550
985
|
{
|
|
551
986
|
ref,
|
|
@@ -556,13 +991,13 @@ var DialogDescription = React2.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
556
991
|
DialogDescription.displayName = "DialogDescription";
|
|
557
992
|
|
|
558
993
|
// src/components/ui/alert-dialog.tsx
|
|
559
|
-
import * as
|
|
994
|
+
import * as React4 from "react";
|
|
560
995
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
561
|
-
import { jsx as
|
|
996
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
562
997
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
563
998
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
564
999
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
565
|
-
var AlertDialogOverlay =
|
|
1000
|
+
var AlertDialogOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
566
1001
|
AlertDialogPrimitive.Overlay,
|
|
567
1002
|
{
|
|
568
1003
|
ref,
|
|
@@ -571,9 +1006,9 @@ var AlertDialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /*
|
|
|
571
1006
|
}
|
|
572
1007
|
));
|
|
573
1008
|
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
574
|
-
var AlertDialogContent =
|
|
575
|
-
/* @__PURE__ */
|
|
576
|
-
/* @__PURE__ */
|
|
1009
|
+
var AlertDialogContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs4(AlertDialogPortal, { children: [
|
|
1010
|
+
/* @__PURE__ */ jsx10(AlertDialogOverlay, {}),
|
|
1011
|
+
/* @__PURE__ */ jsx10(
|
|
577
1012
|
AlertDialogPrimitive.Content,
|
|
578
1013
|
{
|
|
579
1014
|
ref,
|
|
@@ -587,14 +1022,14 @@ AlertDialogContent.displayName = "AlertDialogContent";
|
|
|
587
1022
|
var AlertDialogHeader = ({
|
|
588
1023
|
className,
|
|
589
1024
|
...props
|
|
590
|
-
}) => /* @__PURE__ */
|
|
1025
|
+
}) => /* @__PURE__ */ jsx10("div", { className: cn("sv-dialog__header", className), ...props });
|
|
591
1026
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
592
1027
|
var AlertDialogFooter = ({
|
|
593
1028
|
className,
|
|
594
1029
|
...props
|
|
595
|
-
}) => /* @__PURE__ */
|
|
1030
|
+
}) => /* @__PURE__ */ jsx10("div", { className: cn("sv-dialog__footer", className), ...props });
|
|
596
1031
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
597
|
-
var AlertDialogTitle =
|
|
1032
|
+
var AlertDialogTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
598
1033
|
AlertDialogPrimitive.Title,
|
|
599
1034
|
{
|
|
600
1035
|
ref,
|
|
@@ -603,7 +1038,7 @@ var AlertDialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
603
1038
|
}
|
|
604
1039
|
));
|
|
605
1040
|
AlertDialogTitle.displayName = "AlertDialogTitle";
|
|
606
|
-
var AlertDialogDescription =
|
|
1041
|
+
var AlertDialogDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
607
1042
|
AlertDialogPrimitive.Description,
|
|
608
1043
|
{
|
|
609
1044
|
ref,
|
|
@@ -612,7 +1047,7 @@ var AlertDialogDescription = React3.forwardRef(({ className, ...props }, ref) =>
|
|
|
612
1047
|
}
|
|
613
1048
|
));
|
|
614
1049
|
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
615
|
-
var AlertDialogAction =
|
|
1050
|
+
var AlertDialogAction = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
616
1051
|
AlertDialogPrimitive.Action,
|
|
617
1052
|
{
|
|
618
1053
|
ref,
|
|
@@ -621,7 +1056,7 @@ var AlertDialogAction = React3.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
621
1056
|
}
|
|
622
1057
|
));
|
|
623
1058
|
AlertDialogAction.displayName = "AlertDialogAction";
|
|
624
|
-
var AlertDialogCancel =
|
|
1059
|
+
var AlertDialogCancel = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
625
1060
|
AlertDialogPrimitive.Cancel,
|
|
626
1061
|
{
|
|
627
1062
|
ref,
|
|
@@ -632,19 +1067,19 @@ var AlertDialogCancel = React3.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
632
1067
|
AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
633
1068
|
|
|
634
1069
|
// src/components/ui/select.tsx
|
|
635
|
-
import * as
|
|
1070
|
+
import * as React5 from "react";
|
|
636
1071
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
637
|
-
import { jsx as
|
|
1072
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
638
1073
|
var Select = SelectPrimitive.Root;
|
|
639
1074
|
var SelectGroup = SelectPrimitive.Group;
|
|
640
1075
|
var SelectValue = SelectPrimitive.Value;
|
|
641
|
-
var SelectTrigger =
|
|
642
|
-
({ className, children, icon = /* @__PURE__ */
|
|
1076
|
+
var SelectTrigger = React5.forwardRef(
|
|
1077
|
+
({ className, children, icon = /* @__PURE__ */ jsx11(Icon, { name: "chevron-down" }), ...props }, ref) => (
|
|
643
1078
|
// The trigger IS a form field, so it shares .sv-field with Input, Textarea
|
|
644
1079
|
// and NativeSelect rather than restating the frame. The utility string this
|
|
645
1080
|
// replaces named `ring-offset-background` and `focus:ring-accent`, neither
|
|
646
1081
|
// of which this package ever declared: the field had no visible focus.
|
|
647
|
-
/* @__PURE__ */
|
|
1082
|
+
/* @__PURE__ */ jsxs5(
|
|
648
1083
|
SelectPrimitive.Trigger,
|
|
649
1084
|
{
|
|
650
1085
|
ref,
|
|
@@ -652,34 +1087,34 @@ var SelectTrigger = React4.forwardRef(
|
|
|
652
1087
|
...props,
|
|
653
1088
|
children: [
|
|
654
1089
|
children,
|
|
655
|
-
icon === null ? null : /* @__PURE__ */
|
|
1090
|
+
icon === null ? null : /* @__PURE__ */ jsx11(SelectPrimitive.Icon, { children: icon })
|
|
656
1091
|
]
|
|
657
1092
|
}
|
|
658
1093
|
)
|
|
659
1094
|
)
|
|
660
1095
|
);
|
|
661
1096
|
SelectTrigger.displayName = "SelectTrigger";
|
|
662
|
-
var SelectScrollUpButton =
|
|
1097
|
+
var SelectScrollUpButton = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
663
1098
|
SelectPrimitive.ScrollUpButton,
|
|
664
1099
|
{
|
|
665
1100
|
ref,
|
|
666
1101
|
className: cn("sv-pop__scroll", className),
|
|
667
1102
|
...props,
|
|
668
|
-
children: /* @__PURE__ */
|
|
1103
|
+
children: /* @__PURE__ */ jsx11(Icon, { name: "chevron-up" })
|
|
669
1104
|
}
|
|
670
1105
|
));
|
|
671
1106
|
SelectScrollUpButton.displayName = "SelectScrollUpButton";
|
|
672
|
-
var SelectScrollDownButton =
|
|
1107
|
+
var SelectScrollDownButton = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
673
1108
|
SelectPrimitive.ScrollDownButton,
|
|
674
1109
|
{
|
|
675
1110
|
ref,
|
|
676
1111
|
className: cn("sv-pop__scroll", className),
|
|
677
1112
|
...props,
|
|
678
|
-
children: /* @__PURE__ */
|
|
1113
|
+
children: /* @__PURE__ */ jsx11(Icon, { name: "chevron-down" })
|
|
679
1114
|
}
|
|
680
1115
|
));
|
|
681
1116
|
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
682
|
-
var SelectContent =
|
|
1117
|
+
var SelectContent = React5.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx11(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs5(
|
|
683
1118
|
SelectPrimitive.Content,
|
|
684
1119
|
{
|
|
685
1120
|
ref,
|
|
@@ -687,8 +1122,8 @@ var SelectContent = React4.forwardRef(({ className, children, position = "popper
|
|
|
687
1122
|
position,
|
|
688
1123
|
...props,
|
|
689
1124
|
children: [
|
|
690
|
-
/* @__PURE__ */
|
|
691
|
-
/* @__PURE__ */
|
|
1125
|
+
/* @__PURE__ */ jsx11(SelectScrollUpButton, {}),
|
|
1126
|
+
/* @__PURE__ */ jsx11(
|
|
692
1127
|
SelectPrimitive.Viewport,
|
|
693
1128
|
{
|
|
694
1129
|
className: cn(
|
|
@@ -698,25 +1133,25 @@ var SelectContent = React4.forwardRef(({ className, children, position = "popper
|
|
|
698
1133
|
children
|
|
699
1134
|
}
|
|
700
1135
|
),
|
|
701
|
-
/* @__PURE__ */
|
|
1136
|
+
/* @__PURE__ */ jsx11(SelectScrollDownButton, {})
|
|
702
1137
|
]
|
|
703
1138
|
}
|
|
704
1139
|
) }));
|
|
705
1140
|
SelectContent.displayName = "SelectContent";
|
|
706
|
-
var SelectItem =
|
|
1141
|
+
var SelectItem = React5.forwardRef(({ className, children, icon = /* @__PURE__ */ jsx11(Icon, { name: "check" }), ...props }, ref) => /* @__PURE__ */ jsxs5(
|
|
707
1142
|
SelectPrimitive.Item,
|
|
708
1143
|
{
|
|
709
1144
|
ref,
|
|
710
1145
|
className: cn("sv-menu-item", className),
|
|
711
1146
|
...props,
|
|
712
1147
|
children: [
|
|
713
|
-
icon === null ? null : /* @__PURE__ */
|
|
714
|
-
/* @__PURE__ */
|
|
1148
|
+
icon === null ? null : /* @__PURE__ */ jsx11(SelectPrimitive.ItemIndicator, { className: "sv-menu-item__indicator", children: icon }),
|
|
1149
|
+
/* @__PURE__ */ jsx11(SelectPrimitive.ItemText, { children })
|
|
715
1150
|
]
|
|
716
1151
|
}
|
|
717
1152
|
));
|
|
718
1153
|
SelectItem.displayName = "SelectItem";
|
|
719
|
-
var SelectLabel =
|
|
1154
|
+
var SelectLabel = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
720
1155
|
SelectPrimitive.Label,
|
|
721
1156
|
{
|
|
722
1157
|
ref,
|
|
@@ -725,7 +1160,7 @@ var SelectLabel = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
725
1160
|
}
|
|
726
1161
|
));
|
|
727
1162
|
SelectLabel.displayName = "SelectLabel";
|
|
728
|
-
var SelectSeparator =
|
|
1163
|
+
var SelectSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
729
1164
|
SelectPrimitive.Separator,
|
|
730
1165
|
{
|
|
731
1166
|
ref,
|
|
@@ -736,17 +1171,17 @@ var SelectSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
736
1171
|
SelectSeparator.displayName = "SelectSeparator";
|
|
737
1172
|
|
|
738
1173
|
// src/components/ui/dropdown-menu.tsx
|
|
739
|
-
import * as
|
|
1174
|
+
import * as React6 from "react";
|
|
740
1175
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
741
|
-
import { jsx as
|
|
1176
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
742
1177
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
743
1178
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
744
1179
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
745
1180
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
746
1181
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
747
1182
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
748
|
-
var DropdownMenuSubTrigger =
|
|
749
|
-
({ className, inset, children, icon = /* @__PURE__ */
|
|
1183
|
+
var DropdownMenuSubTrigger = React6.forwardRef(
|
|
1184
|
+
({ className, inset, children, icon = /* @__PURE__ */ jsx12(Icon, { name: "chevron-right" }), ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
750
1185
|
DropdownMenuPrimitive.SubTrigger,
|
|
751
1186
|
{
|
|
752
1187
|
ref,
|
|
@@ -760,7 +1195,7 @@ var DropdownMenuSubTrigger = React5.forwardRef(
|
|
|
760
1195
|
)
|
|
761
1196
|
);
|
|
762
1197
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
763
|
-
var DropdownMenuSubContent =
|
|
1198
|
+
var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
764
1199
|
DropdownMenuPrimitive.SubContent,
|
|
765
1200
|
{
|
|
766
1201
|
ref,
|
|
@@ -769,7 +1204,7 @@ var DropdownMenuSubContent = React5.forwardRef(({ className, ...props }, ref) =>
|
|
|
769
1204
|
}
|
|
770
1205
|
));
|
|
771
1206
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
772
|
-
var DropdownMenuContent =
|
|
1207
|
+
var DropdownMenuContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx12(
|
|
773
1208
|
DropdownMenuPrimitive.Content,
|
|
774
1209
|
{
|
|
775
1210
|
ref,
|
|
@@ -778,7 +1213,7 @@ var DropdownMenuContent = React5.forwardRef(({ className, ...props }, ref) => /*
|
|
|
778
1213
|
}
|
|
779
1214
|
) }));
|
|
780
1215
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
781
|
-
var DropdownMenuItem =
|
|
1216
|
+
var DropdownMenuItem = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
782
1217
|
DropdownMenuPrimitive.Item,
|
|
783
1218
|
{
|
|
784
1219
|
ref,
|
|
@@ -787,35 +1222,35 @@ var DropdownMenuItem = React5.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
787
1222
|
}
|
|
788
1223
|
));
|
|
789
1224
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
790
|
-
var DropdownMenuCheckboxItem =
|
|
1225
|
+
var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, icon = /* @__PURE__ */ jsx12(Icon, { name: "check" }), ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
791
1226
|
DropdownMenuPrimitive.CheckboxItem,
|
|
792
1227
|
{
|
|
793
1228
|
ref,
|
|
794
1229
|
className: cn("sv-menu-item", className),
|
|
795
1230
|
...props,
|
|
796
1231
|
children: [
|
|
797
|
-
icon === null ? null : /* @__PURE__ */
|
|
1232
|
+
icon === null ? null : /* @__PURE__ */ jsx12(DropdownMenuPrimitive.ItemIndicator, { className: "sv-menu-item__indicator", children: icon }),
|
|
798
1233
|
children
|
|
799
1234
|
]
|
|
800
1235
|
}
|
|
801
1236
|
));
|
|
802
1237
|
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
803
|
-
var DropdownMenuRadioItem =
|
|
804
|
-
({ className, children, icon = /* @__PURE__ */
|
|
1238
|
+
var DropdownMenuRadioItem = React6.forwardRef(
|
|
1239
|
+
({ className, children, icon = /* @__PURE__ */ jsx12("span", { className: "sv-menu-item__dot" }), ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
805
1240
|
DropdownMenuPrimitive.RadioItem,
|
|
806
1241
|
{
|
|
807
1242
|
ref,
|
|
808
1243
|
className: cn("sv-menu-item", className),
|
|
809
1244
|
...props,
|
|
810
1245
|
children: [
|
|
811
|
-
icon === null ? null : /* @__PURE__ */
|
|
1246
|
+
icon === null ? null : /* @__PURE__ */ jsx12(DropdownMenuPrimitive.ItemIndicator, { className: "sv-menu-item__indicator", children: icon }),
|
|
812
1247
|
children
|
|
813
1248
|
]
|
|
814
1249
|
}
|
|
815
1250
|
)
|
|
816
1251
|
);
|
|
817
1252
|
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
818
|
-
var DropdownMenuLabel =
|
|
1253
|
+
var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
819
1254
|
DropdownMenuPrimitive.Label,
|
|
820
1255
|
{
|
|
821
1256
|
ref,
|
|
@@ -824,7 +1259,7 @@ var DropdownMenuLabel = React5.forwardRef(({ className, inset, ...props }, ref)
|
|
|
824
1259
|
}
|
|
825
1260
|
));
|
|
826
1261
|
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
827
|
-
var DropdownMenuSeparator =
|
|
1262
|
+
var DropdownMenuSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
828
1263
|
DropdownMenuPrimitive.Separator,
|
|
829
1264
|
{
|
|
830
1265
|
ref,
|
|
@@ -836,14 +1271,14 @@ DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
|
836
1271
|
var DropdownMenuShortcut = ({
|
|
837
1272
|
className,
|
|
838
1273
|
...props
|
|
839
|
-
}) => /* @__PURE__ */
|
|
1274
|
+
}) => /* @__PURE__ */ jsx12("span", { className: cn("sv-menu-shortcut", className), ...props });
|
|
840
1275
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
841
1276
|
|
|
842
1277
|
// src/components/ui/tabs.tsx
|
|
843
|
-
import * as
|
|
1278
|
+
import * as React7 from "react";
|
|
844
1279
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
845
|
-
import { jsx as
|
|
846
|
-
var Tabs =
|
|
1280
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1281
|
+
var Tabs = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
847
1282
|
TabsPrimitive.Root,
|
|
848
1283
|
{
|
|
849
1284
|
ref,
|
|
@@ -852,7 +1287,7 @@ var Tabs = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
852
1287
|
}
|
|
853
1288
|
));
|
|
854
1289
|
Tabs.displayName = "Tabs";
|
|
855
|
-
var TabsList =
|
|
1290
|
+
var TabsList = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
856
1291
|
TabsPrimitive.List,
|
|
857
1292
|
{
|
|
858
1293
|
ref,
|
|
@@ -861,7 +1296,7 @@ var TabsList = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
861
1296
|
}
|
|
862
1297
|
));
|
|
863
1298
|
TabsList.displayName = "TabsList";
|
|
864
|
-
var TabsTrigger =
|
|
1299
|
+
var TabsTrigger = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
865
1300
|
TabsPrimitive.Trigger,
|
|
866
1301
|
{
|
|
867
1302
|
ref,
|
|
@@ -870,7 +1305,7 @@ var TabsTrigger = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
870
1305
|
}
|
|
871
1306
|
));
|
|
872
1307
|
TabsTrigger.displayName = "TabsTrigger";
|
|
873
|
-
var TabsContent =
|
|
1308
|
+
var TabsContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
874
1309
|
TabsPrimitive.Content,
|
|
875
1310
|
{
|
|
876
1311
|
ref,
|
|
@@ -881,13 +1316,13 @@ var TabsContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
881
1316
|
TabsContent.displayName = "TabsContent";
|
|
882
1317
|
|
|
883
1318
|
// src/components/ui/tooltip.tsx
|
|
884
|
-
import * as
|
|
1319
|
+
import * as React8 from "react";
|
|
885
1320
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
886
|
-
import { jsx as
|
|
1321
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
887
1322
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
888
1323
|
var Tooltip = TooltipPrimitive.Root;
|
|
889
1324
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
890
|
-
var TooltipContent =
|
|
1325
|
+
var TooltipContent = React8.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
891
1326
|
TooltipPrimitive.Content,
|
|
892
1327
|
{
|
|
893
1328
|
ref,
|
|
@@ -911,7 +1346,7 @@ export {
|
|
|
911
1346
|
AlertDialogTrigger,
|
|
912
1347
|
CopyButton,
|
|
913
1348
|
DEFAULT_STORAGE_KEY,
|
|
914
|
-
Dialog,
|
|
1349
|
+
Dialog2 as Dialog,
|
|
915
1350
|
DialogClose,
|
|
916
1351
|
DialogContent,
|
|
917
1352
|
DialogDescription,
|
|
@@ -947,6 +1382,10 @@ export {
|
|
|
947
1382
|
SelectSeparator,
|
|
948
1383
|
SelectTrigger,
|
|
949
1384
|
SelectValue,
|
|
1385
|
+
SidebarInset,
|
|
1386
|
+
SidebarPanel,
|
|
1387
|
+
SidebarProvider,
|
|
1388
|
+
SidebarTrigger,
|
|
950
1389
|
TableOfContents,
|
|
951
1390
|
Tabs,
|
|
952
1391
|
TabsContent,
|
|
@@ -954,16 +1393,21 @@ export {
|
|
|
954
1393
|
TabsTrigger,
|
|
955
1394
|
ThemeProvider,
|
|
956
1395
|
ThemeToggle,
|
|
1396
|
+
ToastProvider,
|
|
957
1397
|
Tooltip,
|
|
958
1398
|
TooltipContent,
|
|
959
1399
|
TooltipProvider,
|
|
960
1400
|
TooltipTrigger,
|
|
961
1401
|
copyToClipboard,
|
|
1402
|
+
createMediaQuery,
|
|
962
1403
|
createReadingProgress,
|
|
963
1404
|
createScrollSpy,
|
|
964
1405
|
createThemeManager,
|
|
1406
|
+
useMediaQuery,
|
|
965
1407
|
useReadingProgress,
|
|
966
1408
|
useScrollSpy,
|
|
967
|
-
|
|
1409
|
+
useSidebar,
|
|
1410
|
+
useTheme,
|
|
1411
|
+
useToast
|
|
968
1412
|
};
|
|
969
1413
|
//# sourceMappingURL=index.js.map
|