@still-void/ui 3.1.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 +81 -0
- package/README.md +5 -2
- package/dist/react/client/index.cjs +541 -90
- package/dist/react/client/index.cjs.map +1 -1
- package/dist/react/client/index.d.cts +152 -2
- package/dist/react/client/index.d.ts +152 -2
- package/dist/react/client/index.js +543 -90
- package/dist/react/client/index.js.map +1 -1
- package/dist/react/index.cjs +322 -37
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +156 -3
- package/dist/react/index.d.ts +156 -3
- package/dist/react/index.js +313 -39
- package/dist/react/index.js.map +1 -1
- package/dist/style.css +489 -2
- 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,24 +509,24 @@ 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,
|
|
515
|
+
CameraIcon,
|
|
425
516
|
CheckCircleIcon,
|
|
426
517
|
CheckIcon,
|
|
427
518
|
ChevronDownIcon,
|
|
428
519
|
ChevronLeftIcon,
|
|
429
520
|
ChevronRightIcon,
|
|
430
521
|
ChevronUpIcon,
|
|
522
|
+
ClockIcon,
|
|
431
523
|
DocumentDuplicateIcon,
|
|
432
524
|
ExclamationCircleIcon,
|
|
433
525
|
ExclamationTriangleIcon,
|
|
434
526
|
InformationCircleIcon,
|
|
435
527
|
MagnifyingGlassIcon,
|
|
436
528
|
MoonIcon,
|
|
529
|
+
NoSymbolIcon,
|
|
437
530
|
SunIcon,
|
|
438
531
|
XMarkIcon
|
|
439
532
|
} from "@heroicons/react/24/outline";
|
|
@@ -452,7 +545,10 @@ var ICON_GLYPHS = {
|
|
|
452
545
|
sun: SunIcon,
|
|
453
546
|
moon: MoonIcon,
|
|
454
547
|
search: MagnifyingGlassIcon,
|
|
455
|
-
menu: Bars3Icon
|
|
548
|
+
menu: Bars3Icon,
|
|
549
|
+
camera: CameraIcon,
|
|
550
|
+
blocked: NoSymbolIcon,
|
|
551
|
+
pending: ClockIcon
|
|
456
552
|
};
|
|
457
553
|
var ICON_NAMES = Object.keys(ICON_GLYPHS);
|
|
458
554
|
var ICON_FALLBACK_NAME = "alert-circle";
|
|
@@ -467,6 +563,7 @@ var Icon = React.forwardRef(
|
|
|
467
563
|
{
|
|
468
564
|
...props,
|
|
469
565
|
ref,
|
|
566
|
+
"data-icon-name": name,
|
|
470
567
|
className: cn(
|
|
471
568
|
"sv-icon",
|
|
472
569
|
size === "sm" && "sv-icon--sm",
|
|
@@ -482,13 +579,357 @@ var Icon = React.forwardRef(
|
|
|
482
579
|
);
|
|
483
580
|
Icon.displayName = "Icon";
|
|
484
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
|
+
|
|
485
924
|
// src/components/ui/dialog.tsx
|
|
486
|
-
import
|
|
487
|
-
|
|
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;
|
|
488
929
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
489
930
|
var DialogPortal = DialogPrimitive.Portal;
|
|
490
931
|
var DialogClose = DialogPrimitive.Close;
|
|
491
|
-
var DialogOverlay =
|
|
932
|
+
var DialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
492
933
|
DialogPrimitive.Overlay,
|
|
493
934
|
{
|
|
494
935
|
ref,
|
|
@@ -497,37 +938,40 @@ var DialogOverlay = React2.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
497
938
|
}
|
|
498
939
|
));
|
|
499
940
|
DialogOverlay.displayName = "DialogOverlay";
|
|
500
|
-
var DialogContent =
|
|
501
|
-
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
/* @__PURE__ */
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
941
|
+
var DialogContent = React3.forwardRef(({ className, children, showCloseButton = true, closeLabel: closeLabelProp, ...props }, ref) => {
|
|
942
|
+
const closeLabel = closeLabelProp && closeLabelProp.trim().length > 0 ? closeLabelProp : "Close dialog";
|
|
943
|
+
return /* @__PURE__ */ jsxs3(DialogPortal, { children: [
|
|
944
|
+
/* @__PURE__ */ jsx9(DialogOverlay, {}),
|
|
945
|
+
/* @__PURE__ */ jsxs3(
|
|
946
|
+
DialogPrimitive.Content,
|
|
947
|
+
{
|
|
948
|
+
ref,
|
|
949
|
+
className: cn("sv-dialog", className),
|
|
950
|
+
...props,
|
|
951
|
+
"aria-modal": "true",
|
|
952
|
+
children: [
|
|
953
|
+
children,
|
|
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 })
|
|
957
|
+
] }) : null
|
|
958
|
+
]
|
|
959
|
+
}
|
|
960
|
+
)
|
|
961
|
+
] });
|
|
962
|
+
});
|
|
519
963
|
DialogContent.displayName = "DialogContent";
|
|
520
964
|
var DialogHeader = ({
|
|
521
965
|
className,
|
|
522
966
|
...props
|
|
523
|
-
}) => /* @__PURE__ */
|
|
967
|
+
}) => /* @__PURE__ */ jsx9("div", { className: cn("sv-dialog__header", className), ...props });
|
|
524
968
|
DialogHeader.displayName = "DialogHeader";
|
|
525
969
|
var DialogFooter = ({
|
|
526
970
|
className,
|
|
527
971
|
...props
|
|
528
|
-
}) => /* @__PURE__ */
|
|
972
|
+
}) => /* @__PURE__ */ jsx9("div", { className: cn("sv-dialog__footer", className), ...props });
|
|
529
973
|
DialogFooter.displayName = "DialogFooter";
|
|
530
|
-
var DialogTitle =
|
|
974
|
+
var DialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
531
975
|
DialogPrimitive.Title,
|
|
532
976
|
{
|
|
533
977
|
ref,
|
|
@@ -536,7 +980,7 @@ var DialogTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
536
980
|
}
|
|
537
981
|
));
|
|
538
982
|
DialogTitle.displayName = "DialogTitle";
|
|
539
|
-
var DialogDescription =
|
|
983
|
+
var DialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
540
984
|
DialogPrimitive.Description,
|
|
541
985
|
{
|
|
542
986
|
ref,
|
|
@@ -547,13 +991,13 @@ var DialogDescription = React2.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
547
991
|
DialogDescription.displayName = "DialogDescription";
|
|
548
992
|
|
|
549
993
|
// src/components/ui/alert-dialog.tsx
|
|
550
|
-
import * as
|
|
994
|
+
import * as React4 from "react";
|
|
551
995
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
552
|
-
import { jsx as
|
|
996
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
553
997
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
554
998
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
555
999
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
556
|
-
var AlertDialogOverlay =
|
|
1000
|
+
var AlertDialogOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
557
1001
|
AlertDialogPrimitive.Overlay,
|
|
558
1002
|
{
|
|
559
1003
|
ref,
|
|
@@ -562,9 +1006,9 @@ var AlertDialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /*
|
|
|
562
1006
|
}
|
|
563
1007
|
));
|
|
564
1008
|
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
565
|
-
var AlertDialogContent =
|
|
566
|
-
/* @__PURE__ */
|
|
567
|
-
/* @__PURE__ */
|
|
1009
|
+
var AlertDialogContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs4(AlertDialogPortal, { children: [
|
|
1010
|
+
/* @__PURE__ */ jsx10(AlertDialogOverlay, {}),
|
|
1011
|
+
/* @__PURE__ */ jsx10(
|
|
568
1012
|
AlertDialogPrimitive.Content,
|
|
569
1013
|
{
|
|
570
1014
|
ref,
|
|
@@ -578,14 +1022,14 @@ AlertDialogContent.displayName = "AlertDialogContent";
|
|
|
578
1022
|
var AlertDialogHeader = ({
|
|
579
1023
|
className,
|
|
580
1024
|
...props
|
|
581
|
-
}) => /* @__PURE__ */
|
|
1025
|
+
}) => /* @__PURE__ */ jsx10("div", { className: cn("sv-dialog__header", className), ...props });
|
|
582
1026
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
583
1027
|
var AlertDialogFooter = ({
|
|
584
1028
|
className,
|
|
585
1029
|
...props
|
|
586
|
-
}) => /* @__PURE__ */
|
|
1030
|
+
}) => /* @__PURE__ */ jsx10("div", { className: cn("sv-dialog__footer", className), ...props });
|
|
587
1031
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
588
|
-
var AlertDialogTitle =
|
|
1032
|
+
var AlertDialogTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
589
1033
|
AlertDialogPrimitive.Title,
|
|
590
1034
|
{
|
|
591
1035
|
ref,
|
|
@@ -594,7 +1038,7 @@ var AlertDialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
594
1038
|
}
|
|
595
1039
|
));
|
|
596
1040
|
AlertDialogTitle.displayName = "AlertDialogTitle";
|
|
597
|
-
var AlertDialogDescription =
|
|
1041
|
+
var AlertDialogDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
598
1042
|
AlertDialogPrimitive.Description,
|
|
599
1043
|
{
|
|
600
1044
|
ref,
|
|
@@ -603,7 +1047,7 @@ var AlertDialogDescription = React3.forwardRef(({ className, ...props }, ref) =>
|
|
|
603
1047
|
}
|
|
604
1048
|
));
|
|
605
1049
|
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
606
|
-
var AlertDialogAction =
|
|
1050
|
+
var AlertDialogAction = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
607
1051
|
AlertDialogPrimitive.Action,
|
|
608
1052
|
{
|
|
609
1053
|
ref,
|
|
@@ -612,7 +1056,7 @@ var AlertDialogAction = React3.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
612
1056
|
}
|
|
613
1057
|
));
|
|
614
1058
|
AlertDialogAction.displayName = "AlertDialogAction";
|
|
615
|
-
var AlertDialogCancel =
|
|
1059
|
+
var AlertDialogCancel = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
616
1060
|
AlertDialogPrimitive.Cancel,
|
|
617
1061
|
{
|
|
618
1062
|
ref,
|
|
@@ -623,19 +1067,19 @@ var AlertDialogCancel = React3.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
623
1067
|
AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
624
1068
|
|
|
625
1069
|
// src/components/ui/select.tsx
|
|
626
|
-
import * as
|
|
1070
|
+
import * as React5 from "react";
|
|
627
1071
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
628
|
-
import { jsx as
|
|
1072
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
629
1073
|
var Select = SelectPrimitive.Root;
|
|
630
1074
|
var SelectGroup = SelectPrimitive.Group;
|
|
631
1075
|
var SelectValue = SelectPrimitive.Value;
|
|
632
|
-
var SelectTrigger =
|
|
633
|
-
({ className, children, icon = /* @__PURE__ */
|
|
1076
|
+
var SelectTrigger = React5.forwardRef(
|
|
1077
|
+
({ className, children, icon = /* @__PURE__ */ jsx11(Icon, { name: "chevron-down" }), ...props }, ref) => (
|
|
634
1078
|
// The trigger IS a form field, so it shares .sv-field with Input, Textarea
|
|
635
1079
|
// and NativeSelect rather than restating the frame. The utility string this
|
|
636
1080
|
// replaces named `ring-offset-background` and `focus:ring-accent`, neither
|
|
637
1081
|
// of which this package ever declared: the field had no visible focus.
|
|
638
|
-
/* @__PURE__ */
|
|
1082
|
+
/* @__PURE__ */ jsxs5(
|
|
639
1083
|
SelectPrimitive.Trigger,
|
|
640
1084
|
{
|
|
641
1085
|
ref,
|
|
@@ -643,34 +1087,34 @@ var SelectTrigger = React4.forwardRef(
|
|
|
643
1087
|
...props,
|
|
644
1088
|
children: [
|
|
645
1089
|
children,
|
|
646
|
-
icon === null ? null : /* @__PURE__ */
|
|
1090
|
+
icon === null ? null : /* @__PURE__ */ jsx11(SelectPrimitive.Icon, { children: icon })
|
|
647
1091
|
]
|
|
648
1092
|
}
|
|
649
1093
|
)
|
|
650
1094
|
)
|
|
651
1095
|
);
|
|
652
1096
|
SelectTrigger.displayName = "SelectTrigger";
|
|
653
|
-
var SelectScrollUpButton =
|
|
1097
|
+
var SelectScrollUpButton = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
654
1098
|
SelectPrimitive.ScrollUpButton,
|
|
655
1099
|
{
|
|
656
1100
|
ref,
|
|
657
1101
|
className: cn("sv-pop__scroll", className),
|
|
658
1102
|
...props,
|
|
659
|
-
children: /* @__PURE__ */
|
|
1103
|
+
children: /* @__PURE__ */ jsx11(Icon, { name: "chevron-up" })
|
|
660
1104
|
}
|
|
661
1105
|
));
|
|
662
1106
|
SelectScrollUpButton.displayName = "SelectScrollUpButton";
|
|
663
|
-
var SelectScrollDownButton =
|
|
1107
|
+
var SelectScrollDownButton = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
664
1108
|
SelectPrimitive.ScrollDownButton,
|
|
665
1109
|
{
|
|
666
1110
|
ref,
|
|
667
1111
|
className: cn("sv-pop__scroll", className),
|
|
668
1112
|
...props,
|
|
669
|
-
children: /* @__PURE__ */
|
|
1113
|
+
children: /* @__PURE__ */ jsx11(Icon, { name: "chevron-down" })
|
|
670
1114
|
}
|
|
671
1115
|
));
|
|
672
1116
|
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
673
|
-
var SelectContent =
|
|
1117
|
+
var SelectContent = React5.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx11(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs5(
|
|
674
1118
|
SelectPrimitive.Content,
|
|
675
1119
|
{
|
|
676
1120
|
ref,
|
|
@@ -678,8 +1122,8 @@ var SelectContent = React4.forwardRef(({ className, children, position = "popper
|
|
|
678
1122
|
position,
|
|
679
1123
|
...props,
|
|
680
1124
|
children: [
|
|
681
|
-
/* @__PURE__ */
|
|
682
|
-
/* @__PURE__ */
|
|
1125
|
+
/* @__PURE__ */ jsx11(SelectScrollUpButton, {}),
|
|
1126
|
+
/* @__PURE__ */ jsx11(
|
|
683
1127
|
SelectPrimitive.Viewport,
|
|
684
1128
|
{
|
|
685
1129
|
className: cn(
|
|
@@ -689,25 +1133,25 @@ var SelectContent = React4.forwardRef(({ className, children, position = "popper
|
|
|
689
1133
|
children
|
|
690
1134
|
}
|
|
691
1135
|
),
|
|
692
|
-
/* @__PURE__ */
|
|
1136
|
+
/* @__PURE__ */ jsx11(SelectScrollDownButton, {})
|
|
693
1137
|
]
|
|
694
1138
|
}
|
|
695
1139
|
) }));
|
|
696
1140
|
SelectContent.displayName = "SelectContent";
|
|
697
|
-
var SelectItem =
|
|
1141
|
+
var SelectItem = React5.forwardRef(({ className, children, icon = /* @__PURE__ */ jsx11(Icon, { name: "check" }), ...props }, ref) => /* @__PURE__ */ jsxs5(
|
|
698
1142
|
SelectPrimitive.Item,
|
|
699
1143
|
{
|
|
700
1144
|
ref,
|
|
701
1145
|
className: cn("sv-menu-item", className),
|
|
702
1146
|
...props,
|
|
703
1147
|
children: [
|
|
704
|
-
icon === null ? null : /* @__PURE__ */
|
|
705
|
-
/* @__PURE__ */
|
|
1148
|
+
icon === null ? null : /* @__PURE__ */ jsx11(SelectPrimitive.ItemIndicator, { className: "sv-menu-item__indicator", children: icon }),
|
|
1149
|
+
/* @__PURE__ */ jsx11(SelectPrimitive.ItemText, { children })
|
|
706
1150
|
]
|
|
707
1151
|
}
|
|
708
1152
|
));
|
|
709
1153
|
SelectItem.displayName = "SelectItem";
|
|
710
|
-
var SelectLabel =
|
|
1154
|
+
var SelectLabel = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
711
1155
|
SelectPrimitive.Label,
|
|
712
1156
|
{
|
|
713
1157
|
ref,
|
|
@@ -716,7 +1160,7 @@ var SelectLabel = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
716
1160
|
}
|
|
717
1161
|
));
|
|
718
1162
|
SelectLabel.displayName = "SelectLabel";
|
|
719
|
-
var SelectSeparator =
|
|
1163
|
+
var SelectSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
720
1164
|
SelectPrimitive.Separator,
|
|
721
1165
|
{
|
|
722
1166
|
ref,
|
|
@@ -727,17 +1171,17 @@ var SelectSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
727
1171
|
SelectSeparator.displayName = "SelectSeparator";
|
|
728
1172
|
|
|
729
1173
|
// src/components/ui/dropdown-menu.tsx
|
|
730
|
-
import * as
|
|
1174
|
+
import * as React6 from "react";
|
|
731
1175
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
732
|
-
import { jsx as
|
|
1176
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
733
1177
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
734
1178
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
735
1179
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
736
1180
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
737
1181
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
738
1182
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
739
|
-
var DropdownMenuSubTrigger =
|
|
740
|
-
({ 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(
|
|
741
1185
|
DropdownMenuPrimitive.SubTrigger,
|
|
742
1186
|
{
|
|
743
1187
|
ref,
|
|
@@ -751,7 +1195,7 @@ var DropdownMenuSubTrigger = React5.forwardRef(
|
|
|
751
1195
|
)
|
|
752
1196
|
);
|
|
753
1197
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
754
|
-
var DropdownMenuSubContent =
|
|
1198
|
+
var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
755
1199
|
DropdownMenuPrimitive.SubContent,
|
|
756
1200
|
{
|
|
757
1201
|
ref,
|
|
@@ -760,7 +1204,7 @@ var DropdownMenuSubContent = React5.forwardRef(({ className, ...props }, ref) =>
|
|
|
760
1204
|
}
|
|
761
1205
|
));
|
|
762
1206
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
763
|
-
var DropdownMenuContent =
|
|
1207
|
+
var DropdownMenuContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx12(
|
|
764
1208
|
DropdownMenuPrimitive.Content,
|
|
765
1209
|
{
|
|
766
1210
|
ref,
|
|
@@ -769,7 +1213,7 @@ var DropdownMenuContent = React5.forwardRef(({ className, ...props }, ref) => /*
|
|
|
769
1213
|
}
|
|
770
1214
|
) }));
|
|
771
1215
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
772
|
-
var DropdownMenuItem =
|
|
1216
|
+
var DropdownMenuItem = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
773
1217
|
DropdownMenuPrimitive.Item,
|
|
774
1218
|
{
|
|
775
1219
|
ref,
|
|
@@ -778,35 +1222,35 @@ var DropdownMenuItem = React5.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
778
1222
|
}
|
|
779
1223
|
));
|
|
780
1224
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
781
|
-
var DropdownMenuCheckboxItem =
|
|
1225
|
+
var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, icon = /* @__PURE__ */ jsx12(Icon, { name: "check" }), ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
782
1226
|
DropdownMenuPrimitive.CheckboxItem,
|
|
783
1227
|
{
|
|
784
1228
|
ref,
|
|
785
1229
|
className: cn("sv-menu-item", className),
|
|
786
1230
|
...props,
|
|
787
1231
|
children: [
|
|
788
|
-
icon === null ? null : /* @__PURE__ */
|
|
1232
|
+
icon === null ? null : /* @__PURE__ */ jsx12(DropdownMenuPrimitive.ItemIndicator, { className: "sv-menu-item__indicator", children: icon }),
|
|
789
1233
|
children
|
|
790
1234
|
]
|
|
791
1235
|
}
|
|
792
1236
|
));
|
|
793
1237
|
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
794
|
-
var DropdownMenuRadioItem =
|
|
795
|
-
({ 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(
|
|
796
1240
|
DropdownMenuPrimitive.RadioItem,
|
|
797
1241
|
{
|
|
798
1242
|
ref,
|
|
799
1243
|
className: cn("sv-menu-item", className),
|
|
800
1244
|
...props,
|
|
801
1245
|
children: [
|
|
802
|
-
icon === null ? null : /* @__PURE__ */
|
|
1246
|
+
icon === null ? null : /* @__PURE__ */ jsx12(DropdownMenuPrimitive.ItemIndicator, { className: "sv-menu-item__indicator", children: icon }),
|
|
803
1247
|
children
|
|
804
1248
|
]
|
|
805
1249
|
}
|
|
806
1250
|
)
|
|
807
1251
|
);
|
|
808
1252
|
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
809
|
-
var DropdownMenuLabel =
|
|
1253
|
+
var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
810
1254
|
DropdownMenuPrimitive.Label,
|
|
811
1255
|
{
|
|
812
1256
|
ref,
|
|
@@ -815,7 +1259,7 @@ var DropdownMenuLabel = React5.forwardRef(({ className, inset, ...props }, ref)
|
|
|
815
1259
|
}
|
|
816
1260
|
));
|
|
817
1261
|
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
818
|
-
var DropdownMenuSeparator =
|
|
1262
|
+
var DropdownMenuSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
819
1263
|
DropdownMenuPrimitive.Separator,
|
|
820
1264
|
{
|
|
821
1265
|
ref,
|
|
@@ -827,14 +1271,14 @@ DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
|
827
1271
|
var DropdownMenuShortcut = ({
|
|
828
1272
|
className,
|
|
829
1273
|
...props
|
|
830
|
-
}) => /* @__PURE__ */
|
|
1274
|
+
}) => /* @__PURE__ */ jsx12("span", { className: cn("sv-menu-shortcut", className), ...props });
|
|
831
1275
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
832
1276
|
|
|
833
1277
|
// src/components/ui/tabs.tsx
|
|
834
|
-
import * as
|
|
1278
|
+
import * as React7 from "react";
|
|
835
1279
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
836
|
-
import { jsx as
|
|
837
|
-
var Tabs =
|
|
1280
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1281
|
+
var Tabs = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
838
1282
|
TabsPrimitive.Root,
|
|
839
1283
|
{
|
|
840
1284
|
ref,
|
|
@@ -843,7 +1287,7 @@ var Tabs = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
843
1287
|
}
|
|
844
1288
|
));
|
|
845
1289
|
Tabs.displayName = "Tabs";
|
|
846
|
-
var TabsList =
|
|
1290
|
+
var TabsList = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
847
1291
|
TabsPrimitive.List,
|
|
848
1292
|
{
|
|
849
1293
|
ref,
|
|
@@ -852,7 +1296,7 @@ var TabsList = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
852
1296
|
}
|
|
853
1297
|
));
|
|
854
1298
|
TabsList.displayName = "TabsList";
|
|
855
|
-
var TabsTrigger =
|
|
1299
|
+
var TabsTrigger = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
856
1300
|
TabsPrimitive.Trigger,
|
|
857
1301
|
{
|
|
858
1302
|
ref,
|
|
@@ -861,7 +1305,7 @@ var TabsTrigger = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
861
1305
|
}
|
|
862
1306
|
));
|
|
863
1307
|
TabsTrigger.displayName = "TabsTrigger";
|
|
864
|
-
var TabsContent =
|
|
1308
|
+
var TabsContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
865
1309
|
TabsPrimitive.Content,
|
|
866
1310
|
{
|
|
867
1311
|
ref,
|
|
@@ -872,13 +1316,13 @@ var TabsContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
872
1316
|
TabsContent.displayName = "TabsContent";
|
|
873
1317
|
|
|
874
1318
|
// src/components/ui/tooltip.tsx
|
|
875
|
-
import * as
|
|
1319
|
+
import * as React8 from "react";
|
|
876
1320
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
877
|
-
import { jsx as
|
|
1321
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
878
1322
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
879
1323
|
var Tooltip = TooltipPrimitive.Root;
|
|
880
1324
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
881
|
-
var TooltipContent =
|
|
1325
|
+
var TooltipContent = React8.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
882
1326
|
TooltipPrimitive.Content,
|
|
883
1327
|
{
|
|
884
1328
|
ref,
|
|
@@ -902,7 +1346,7 @@ export {
|
|
|
902
1346
|
AlertDialogTrigger,
|
|
903
1347
|
CopyButton,
|
|
904
1348
|
DEFAULT_STORAGE_KEY,
|
|
905
|
-
Dialog,
|
|
1349
|
+
Dialog2 as Dialog,
|
|
906
1350
|
DialogClose,
|
|
907
1351
|
DialogContent,
|
|
908
1352
|
DialogDescription,
|
|
@@ -938,6 +1382,10 @@ export {
|
|
|
938
1382
|
SelectSeparator,
|
|
939
1383
|
SelectTrigger,
|
|
940
1384
|
SelectValue,
|
|
1385
|
+
SidebarInset,
|
|
1386
|
+
SidebarPanel,
|
|
1387
|
+
SidebarProvider,
|
|
1388
|
+
SidebarTrigger,
|
|
941
1389
|
TableOfContents,
|
|
942
1390
|
Tabs,
|
|
943
1391
|
TabsContent,
|
|
@@ -945,16 +1393,21 @@ export {
|
|
|
945
1393
|
TabsTrigger,
|
|
946
1394
|
ThemeProvider,
|
|
947
1395
|
ThemeToggle,
|
|
1396
|
+
ToastProvider,
|
|
948
1397
|
Tooltip,
|
|
949
1398
|
TooltipContent,
|
|
950
1399
|
TooltipProvider,
|
|
951
1400
|
TooltipTrigger,
|
|
952
1401
|
copyToClipboard,
|
|
1402
|
+
createMediaQuery,
|
|
953
1403
|
createReadingProgress,
|
|
954
1404
|
createScrollSpy,
|
|
955
1405
|
createThemeManager,
|
|
1406
|
+
useMediaQuery,
|
|
956
1407
|
useReadingProgress,
|
|
957
1408
|
useScrollSpy,
|
|
958
|
-
|
|
1409
|
+
useSidebar,
|
|
1410
|
+
useTheme,
|
|
1411
|
+
useToast
|
|
959
1412
|
};
|
|
960
1413
|
//# sourceMappingURL=index.js.map
|