@schemavaults/ui 0.57.1 → 0.60.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/dist/components/ui/alert-dialog/alert-dialog.d.ts +87 -0
- package/dist/components/ui/alert-dialog/alert-dialog.js +115 -0
- package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert-dialog/index.d.ts +3 -0
- package/dist/components/ui/alert-dialog/index.js +3 -0
- package/dist/components/ui/alert-dialog/index.js.map +1 -0
- package/dist/components/ui/index.d.ts +6 -0
- package/dist/components/ui/index.js +3 -0
- package/dist/components/ui/index.js.map +1 -1
- package/dist/components/ui/notification-bell/index.d.ts +4 -0
- package/dist/components/ui/notification-bell/index.js +3 -0
- package/dist/components/ui/notification-bell/index.js.map +1 -0
- package/dist/components/ui/notification-bell/notification-bell-variants.d.ts +6 -0
- package/dist/components/ui/notification-bell/notification-bell-variants.js +16 -0
- package/dist/components/ui/notification-bell/notification-bell-variants.js.map +1 -0
- package/dist/components/ui/notification-bell/notification-bell.d.ts +48 -0
- package/dist/components/ui/notification-bell/notification-bell.js +85 -0
- package/dist/components/ui/notification-bell/notification-bell.js.map +1 -0
- package/dist/components/ui/number-ticker/number-ticker.d.ts +1 -1
- package/dist/components/ui/scroll-progress/index.d.ts +3 -0
- package/dist/components/ui/scroll-progress/index.js +3 -0
- package/dist/components/ui/scroll-progress/index.js.map +1 -0
- package/dist/components/ui/scroll-progress/scroll-progress.d.ts +41 -0
- package/dist/components/ui/scroll-progress/scroll-progress.js +80 -0
- package/dist/components/ui/scroll-progress/scroll-progress.js.map +1 -0
- package/dist/framer-motion.d.ts +1 -1
- package/dist/framer-motion.js +1 -1
- package/dist/framer-motion.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type HTMLAttributes, type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
/**
|
|
5
|
+
* Tone drives the accent styling of the optional leading icon and the default
|
|
6
|
+
* styling of {@link AlertDialogAction}. Destructive confirmations (e.g. delete)
|
|
7
|
+
* should use the `destructive` tone so the confirm button is unmistakably risky.
|
|
8
|
+
*/
|
|
9
|
+
export declare const alertDialogToneIds: readonly ["default", "destructive", "warning", "success", "info"];
|
|
10
|
+
export type AlertDialogToneId = (typeof alertDialogToneIds)[number];
|
|
11
|
+
/**
|
|
12
|
+
* Root of the alert dialog. A modal, focus-trapped dialog that interrupts the
|
|
13
|
+
* user to confirm a consequential action. Unlike {@link Dialog}, it renders
|
|
14
|
+
* with `role="alertdialog"`, omits the corner close button, and does not
|
|
15
|
+
* dismiss on an outside click — the user must pick an explicit action.
|
|
16
|
+
*/
|
|
17
|
+
declare const AlertDialog: import("react").FC<DialogPrimitive.DialogProps>;
|
|
18
|
+
declare const AlertDialogTrigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
declare const AlertDialogPortal: import("react").FC<DialogPrimitive.DialogPortalProps>;
|
|
20
|
+
declare const AlertDialogOverlay: {
|
|
21
|
+
({ className, ...props }: ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>): ReactElement;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
export interface AlertDialogContentProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
25
|
+
/** Accent tone shared with the icon and default action button. */
|
|
26
|
+
tone?: AlertDialogToneId;
|
|
27
|
+
}
|
|
28
|
+
declare const AlertDialogContent: {
|
|
29
|
+
({ className, children, tone, onInteractOutside, ...props }: AlertDialogContentProps): ReactElement;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
declare const AlertDialogHeader: {
|
|
33
|
+
({ className, ...props }: HTMLAttributes<HTMLDivElement>): ReactElement;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
declare const AlertDialogFooter: {
|
|
37
|
+
({ className, ...props }: HTMLAttributes<HTMLDivElement>): ReactElement;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
40
|
+
declare const AlertDialogTitle: {
|
|
41
|
+
({ className, ...props }: ComponentPropsWithoutRef<typeof DialogPrimitive.Title>): ReactElement;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
declare const AlertDialogDescription: {
|
|
45
|
+
({ className, ...props }: ComponentPropsWithoutRef<typeof DialogPrimitive.Description>): ReactElement;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
48
|
+
declare const alertDialogIconVariants: (props?: ({
|
|
49
|
+
tone?: "default" | "info" | "warning" | "destructive" | "success" | null | undefined;
|
|
50
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
51
|
+
export interface AlertDialogIconProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children">, VariantProps<typeof alertDialogIconVariants> {
|
|
52
|
+
/** Override the auto-selected tone icon with a custom node. */
|
|
53
|
+
children?: ReactNode;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Optional themed icon for the header. When no `children` are provided, a
|
|
57
|
+
* sensible icon is chosen from the surrounding {@link AlertDialogContent} tone.
|
|
58
|
+
*/
|
|
59
|
+
declare const AlertDialogIcon: {
|
|
60
|
+
({ className, tone: toneProp, children, ...props }: AlertDialogIconProps): ReactElement;
|
|
61
|
+
displayName: string;
|
|
62
|
+
};
|
|
63
|
+
declare const alertDialogActionVariants: (props?: ({
|
|
64
|
+
tone?: "default" | "info" | "warning" | "destructive" | "success" | null | undefined;
|
|
65
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
66
|
+
export interface AlertDialogActionProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Close> {
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The confirm button. Clicking it runs the supplied `onClick` and then closes
|
|
70
|
+
* the dialog. By default it inherits the surrounding tone (e.g. a `destructive`
|
|
71
|
+
* tone yields a red confirm button); pass your own `className` to override.
|
|
72
|
+
*/
|
|
73
|
+
declare const AlertDialogAction: {
|
|
74
|
+
({ className, ...props }: AlertDialogActionProps): ReactElement;
|
|
75
|
+
displayName: string;
|
|
76
|
+
};
|
|
77
|
+
export interface AlertDialogCancelProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Close> {
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The dismiss button. Closes the dialog without performing the action and is
|
|
81
|
+
* the focused element when the dialog opens, so pressing Enter is always safe.
|
|
82
|
+
*/
|
|
83
|
+
declare const AlertDialogCancel: {
|
|
84
|
+
({ className, ...props }: AlertDialogCancelProps): ReactElement;
|
|
85
|
+
displayName: string;
|
|
86
|
+
};
|
|
87
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogIcon, AlertDialogAction, AlertDialogCancel, alertDialogIconVariants, alertDialogActionVariants, };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext, } from "react";
|
|
4
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
import { AlertTriangle, CheckCircle2, Info, TriangleAlert, } from "lucide-react";
|
|
7
|
+
import { cn } from "../../../lib/utils";
|
|
8
|
+
import { buttonVariants } from "../button";
|
|
9
|
+
/**
|
|
10
|
+
* Tone drives the accent styling of the optional leading icon and the default
|
|
11
|
+
* styling of {@link AlertDialogAction}. Destructive confirmations (e.g. delete)
|
|
12
|
+
* should use the `destructive` tone so the confirm button is unmistakably risky.
|
|
13
|
+
*/
|
|
14
|
+
export const alertDialogToneIds = [
|
|
15
|
+
"default",
|
|
16
|
+
"destructive",
|
|
17
|
+
"warning",
|
|
18
|
+
"success",
|
|
19
|
+
"info",
|
|
20
|
+
];
|
|
21
|
+
const AlertDialogContext = createContext({
|
|
22
|
+
tone: "default",
|
|
23
|
+
});
|
|
24
|
+
function useAlertDialogTone() {
|
|
25
|
+
return useContext(AlertDialogContext).tone;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Root of the alert dialog. A modal, focus-trapped dialog that interrupts the
|
|
29
|
+
* user to confirm a consequential action. Unlike {@link Dialog}, it renders
|
|
30
|
+
* with `role="alertdialog"`, omits the corner close button, and does not
|
|
31
|
+
* dismiss on an outside click — the user must pick an explicit action.
|
|
32
|
+
*/
|
|
33
|
+
const AlertDialog = DialogPrimitive.Root;
|
|
34
|
+
const AlertDialogTrigger = DialogPrimitive.Trigger;
|
|
35
|
+
const AlertDialogPortal = DialogPrimitive.Portal;
|
|
36
|
+
const AlertDialogOverlay = ({ className, ...props }) => (_jsx(DialogPrimitive.Overlay, { className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props }));
|
|
37
|
+
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
38
|
+
const AlertDialogContent = ({ className, children, tone = "default", onInteractOutside, ...props }) => (_jsx(AlertDialogContext.Provider, { value: { tone }, children: _jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(DialogPrimitive.Content, { role: "alertdialog", onInteractOutside: (event) => {
|
|
39
|
+
// Require an explicit choice — never dismiss on outside click.
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
onInteractOutside?.(event);
|
|
42
|
+
}, className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className), ...props, children: children })] }) }));
|
|
43
|
+
AlertDialogContent.displayName = "AlertDialogContent";
|
|
44
|
+
const AlertDialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props }));
|
|
45
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
46
|
+
const AlertDialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:gap-2", className), ...props }));
|
|
47
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
48
|
+
const AlertDialogTitle = ({ className, ...props }) => (_jsx(DialogPrimitive.Title, { className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props }));
|
|
49
|
+
AlertDialogTitle.displayName = "AlertDialogTitle";
|
|
50
|
+
const AlertDialogDescription = ({ className, ...props }) => (_jsx(DialogPrimitive.Description, { className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
51
|
+
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
52
|
+
const alertDialogIconVariants = cva("mx-auto flex size-11 shrink-0 items-center justify-center rounded-full sm:mx-0 [&>svg]:size-5", {
|
|
53
|
+
variants: {
|
|
54
|
+
tone: {
|
|
55
|
+
default: "bg-muted text-foreground",
|
|
56
|
+
destructive: "bg-destructive/15 text-destructive",
|
|
57
|
+
warning: "bg-warning/20 text-warning-foreground",
|
|
58
|
+
success: "bg-emerald-500/15 text-emerald-600 dark:text-emerald-400",
|
|
59
|
+
info: "bg-schemavaults-brand-blue/15 text-schemavaults-brand-blue",
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
defaultVariants: {
|
|
63
|
+
tone: "default",
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
const toneIcons = {
|
|
67
|
+
default: Info,
|
|
68
|
+
destructive: TriangleAlert,
|
|
69
|
+
warning: AlertTriangle,
|
|
70
|
+
success: CheckCircle2,
|
|
71
|
+
info: Info,
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Optional themed icon for the header. When no `children` are provided, a
|
|
75
|
+
* sensible icon is chosen from the surrounding {@link AlertDialogContent} tone.
|
|
76
|
+
*/
|
|
77
|
+
const AlertDialogIcon = ({ className, tone: toneProp, children, ...props }) => {
|
|
78
|
+
const contextTone = useAlertDialogTone();
|
|
79
|
+
const tone = toneProp ?? contextTone;
|
|
80
|
+
const FallbackIcon = toneIcons[tone];
|
|
81
|
+
return (_jsx("span", { "aria-hidden": "true", "data-slot": "alert-dialog-icon", className: cn(alertDialogIconVariants({ tone }), className), ...props, children: children ?? _jsx(FallbackIcon, {}) }));
|
|
82
|
+
};
|
|
83
|
+
AlertDialogIcon.displayName = "AlertDialogIcon";
|
|
84
|
+
const alertDialogActionVariants = cva("", {
|
|
85
|
+
variants: {
|
|
86
|
+
tone: {
|
|
87
|
+
default: "",
|
|
88
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
89
|
+
warning: "bg-warning text-warning-foreground hover:bg-warning/90",
|
|
90
|
+
success: "bg-emerald-600 text-white hover:bg-emerald-600/90 dark:bg-emerald-500 dark:hover:bg-emerald-500/90",
|
|
91
|
+
info: "bg-schemavaults-brand-blue text-primary-foreground hover:bg-schemavaults-brand-blue/90",
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
defaultVariants: {
|
|
95
|
+
tone: "default",
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
/**
|
|
99
|
+
* The confirm button. Clicking it runs the supplied `onClick` and then closes
|
|
100
|
+
* the dialog. By default it inherits the surrounding tone (e.g. a `destructive`
|
|
101
|
+
* tone yields a red confirm button); pass your own `className` to override.
|
|
102
|
+
*/
|
|
103
|
+
const AlertDialogAction = ({ className, ...props }) => {
|
|
104
|
+
const tone = useAlertDialogTone();
|
|
105
|
+
return (_jsx(DialogPrimitive.Close, { "data-slot": "alert-dialog-action", className: cn(buttonVariants({ variant: "default" }), alertDialogActionVariants({ tone }), className), ...props }));
|
|
106
|
+
};
|
|
107
|
+
AlertDialogAction.displayName = "AlertDialogAction";
|
|
108
|
+
/**
|
|
109
|
+
* The dismiss button. Closes the dialog without performing the action and is
|
|
110
|
+
* the focused element when the dialog opens, so pressing Enter is always safe.
|
|
111
|
+
*/
|
|
112
|
+
const AlertDialogCancel = ({ className, ...props }) => (_jsx(DialogPrimitive.Close, { "data-slot": "alert-dialog-cancel", className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ...props }));
|
|
113
|
+
AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
114
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogIcon, AlertDialogAction, AlertDialogCancel, alertDialogIconVariants, alertDialogActionVariants, };
|
|
115
|
+
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.js","sourceRoot":"","sources":["../../../../src/components/ui/alert-dialog/alert-dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,aAAa,EACb,UAAU,GAKX,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,aAAa,EACb,YAAY,EACZ,IAAI,EACJ,aAAa,GACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AA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KAAC,eAAe,CAAC,KAAK,iBACV,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CACX,cAAc,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,EACtC,yBAAyB,CAAC,EAAE,IAAI,EAAE,CAAC,EACnC,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC;AACF,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC;AAKpD;;;GAGG;AACH,MAAM,iBAAiB,GAAG,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACe,EAAgB,EAAE,CAAC,CAC1C,KAAC,eAAe,CAAC,KAAK,iBACV,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CACX,cAAc,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,EACtC,cAAc,EACd,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACF,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC;AAEpD,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,GAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/alert-dialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -48,6 +48,8 @@ export * from "./navigation-menu";
|
|
|
48
48
|
export type * from "./navigation-menu";
|
|
49
49
|
export * from "./dialog";
|
|
50
50
|
export type * from "./dialog";
|
|
51
|
+
export * from "./alert-dialog";
|
|
52
|
+
export type * from "./alert-dialog";
|
|
51
53
|
export * from "./popover";
|
|
52
54
|
export type * from "./popover";
|
|
53
55
|
export * from "./command";
|
|
@@ -106,6 +108,8 @@ export * from "./progress-bar";
|
|
|
106
108
|
export type * from "./progress-bar";
|
|
107
109
|
export * from "./circular-progress";
|
|
108
110
|
export type * from "./circular-progress";
|
|
111
|
+
export * from "./scroll-progress";
|
|
112
|
+
export type * from "./scroll-progress";
|
|
109
113
|
export * from "./gauge";
|
|
110
114
|
export type * from "./gauge";
|
|
111
115
|
export * from "./breadcrumb";
|
|
@@ -170,3 +174,5 @@ export * from "./countdown";
|
|
|
170
174
|
export type * from "./countdown";
|
|
171
175
|
export * from "./floating-action-button";
|
|
172
176
|
export type * from "./floating-action-button";
|
|
177
|
+
export * from "./notification-bell";
|
|
178
|
+
export type * from "./notification-bell";
|
|
@@ -23,6 +23,7 @@ export * from "./dropdown-menu";
|
|
|
23
23
|
export * from "./tooltip";
|
|
24
24
|
export * from "./navigation-menu";
|
|
25
25
|
export * from "./dialog";
|
|
26
|
+
export * from "./alert-dialog";
|
|
26
27
|
export * from "./popover";
|
|
27
28
|
export * from "./command";
|
|
28
29
|
export * from "./combobox";
|
|
@@ -52,6 +53,7 @@ export * from "./slider";
|
|
|
52
53
|
export * from "./switch";
|
|
53
54
|
export * from "./progress-bar";
|
|
54
55
|
export * from "./circular-progress";
|
|
56
|
+
export * from "./scroll-progress";
|
|
55
57
|
export * from "./gauge";
|
|
56
58
|
export * from "./breadcrumb";
|
|
57
59
|
export * from "./pagination";
|
|
@@ -84,4 +86,5 @@ export * from "./tree-view";
|
|
|
84
86
|
export * from "./carousel";
|
|
85
87
|
export * from "./countdown";
|
|
86
88
|
export * from "./floating-action-button";
|
|
89
|
+
export * from "./notification-bell";
|
|
87
90
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAGzB,cAAc,uBAAuB,CAAC;AAGtC,cAAc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c,mBAAmB,CAAC;AAGlC,cAAc,SAAS,CAAC;AAGxB,cAAc,cAAc,CAAC;AAG7B,cAAc,cAAc,CAAC;AAG7B,cAAc,OAAO,CAAC;AAGtB,cAAc,eAAe,CAAC;AAG9B,cAAc,WAAW,CAAC;AAG1B,cAAc,UAAU,CAAC;AAGzB,cAAc,eAAe,CAAC;AAG9B,cAAc,aAAa,CAAC;AAG5B,cAAc,YAAY,CAAC;AAG3B,cAAc,UAAU,CAAC;AAGzB,cAAc,gBAAgB,CAAC;AAG/B,cAAc,cAAc,CAAC;AAG7B,cAAc,eAAe,CAAC;AAG9B,cAAc,qBAAqB,CAAC;AAGpC,cAAc,WAAW,CAAC;AAG1B,cAAc,UAAU,CAAC;AAGzB,cAAc,QAAQ,CAAC;AAGvB,cAAc,cAAc,CAAC;AAG7B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,aAAa,CAAC;AAG5B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,oBAAoB,CAAC;AAGnC,cAAc,aAAa,CAAC;AAG5B,cAAc,aAAa,CAAC;AAG5B,cAAc,qBAAqB,CAAC;AAGpC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,aAAa,CAAC;AAG5B,cAAc,YAAY,CAAC;AAG3B,cAAc,aAAa,CAAC;AAG5B,cAAc,0BAA0B,CAAC;AAGzC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { NotificationBell, NotificationBell as default, notificationBellTriggerVariants, } from "./notification-bell";
|
|
2
|
+
export type { NotificationBellProps } from "./notification-bell";
|
|
3
|
+
export { notificationBellVariantIds, notificationBellSizeIds, notificationBellIndicatorVariantIds, } from "./notification-bell-variants";
|
|
4
|
+
export type { NotificationBellVariant, NotificationBellSize, NotificationBellIndicatorVariant, } from "./notification-bell-variants";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { NotificationBell, NotificationBell as default, notificationBellTriggerVariants, } from "./notification-bell";
|
|
2
|
+
export { notificationBellVariantIds, notificationBellSizeIds, notificationBellIndicatorVariantIds, } from "./notification-bell-variants";
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/notification-bell/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,IAAI,OAAO,EAC3B,+BAA+B,GAChC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,mCAAmC,GACpC,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const notificationBellVariantIds: readonly ["default", "outline", "ghost", "subtle", "brand"];
|
|
2
|
+
export type NotificationBellVariant = (typeof notificationBellVariantIds)[number];
|
|
3
|
+
export declare const notificationBellSizeIds: readonly ["sm", "md", "lg"];
|
|
4
|
+
export type NotificationBellSize = (typeof notificationBellSizeIds)[number];
|
|
5
|
+
export declare const notificationBellIndicatorVariantIds: readonly ["destructive", "primary", "success", "warning", "brand"];
|
|
6
|
+
export type NotificationBellIndicatorVariant = (typeof notificationBellIndicatorVariantIds)[number];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const notificationBellVariantIds = [
|
|
2
|
+
"default",
|
|
3
|
+
"outline",
|
|
4
|
+
"ghost",
|
|
5
|
+
"subtle",
|
|
6
|
+
"brand",
|
|
7
|
+
];
|
|
8
|
+
export const notificationBellSizeIds = ["sm", "md", "lg"];
|
|
9
|
+
export const notificationBellIndicatorVariantIds = [
|
|
10
|
+
"destructive",
|
|
11
|
+
"primary",
|
|
12
|
+
"success",
|
|
13
|
+
"warning",
|
|
14
|
+
"brand",
|
|
15
|
+
];
|
|
16
|
+
//# sourceMappingURL=notification-bell-variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-bell-variants.js","sourceRoot":"","sources":["../../../../src/components/ui/notification-bell/notification-bell-variants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,SAAS;IACT,SAAS;IACT,OAAO;IACP,QAAQ;IACR,OAAO;CAC6B,CAAC;AAIvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAsC,CAAC;AAG/F,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,aAAa;IACb,SAAS;IACT,SAAS;IACT,SAAS;IACT,OAAO;CAC6B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { ButtonHTMLAttributes, ReactElement, Ref } from "react";
|
|
3
|
+
import { type NotificationBellIndicatorVariant } from "./notification-bell-variants";
|
|
4
|
+
declare const notificationBellTriggerVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "outline" | "ghost" | "subtle" | "brand" | null | undefined;
|
|
6
|
+
size?: "sm" | "lg" | "md" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export interface NotificationBellProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children">, VariantProps<typeof notificationBellTriggerVariants> {
|
|
9
|
+
/**
|
|
10
|
+
* Number of unread notifications. When `0` (and `dot` is false), no
|
|
11
|
+
* indicator is shown. When greater than `maxCount`, the badge displays
|
|
12
|
+
* `${maxCount}+` instead of the raw value.
|
|
13
|
+
*/
|
|
14
|
+
count?: number;
|
|
15
|
+
/** Maximum count to show numerically. Defaults to `99`. */
|
|
16
|
+
maxCount?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Render a dot indicator instead of a count. Useful when the exact number
|
|
19
|
+
* is not meaningful (e.g. "there is something new"). Takes precedence over
|
|
20
|
+
* `count` for the visual style; the count is still considered for whether
|
|
21
|
+
* to show the indicator at all unless `forceIndicator` is set.
|
|
22
|
+
*/
|
|
23
|
+
dot?: boolean;
|
|
24
|
+
/** Always show the indicator, even when `count` is `0`. */
|
|
25
|
+
forceIndicator?: boolean;
|
|
26
|
+
/** Animate a soft ping around the indicator. */
|
|
27
|
+
ping?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Swap the bell glyph for an animated `BellRing` when the indicator is
|
|
30
|
+
* visible.
|
|
31
|
+
*/
|
|
32
|
+
ringWhenActive?: boolean;
|
|
33
|
+
/** Color/style applied to the count badge or dot. */
|
|
34
|
+
indicatorVariant?: NotificationBellIndicatorVariant;
|
|
35
|
+
/**
|
|
36
|
+
* Accessible label for the button. Defaults to `Notifications` (or
|
|
37
|
+
* `Notifications (N unread)` when a positive `count` is provided).
|
|
38
|
+
*/
|
|
39
|
+
"aria-label"?: string;
|
|
40
|
+
/** Forwarded to the underlying `<button>` element. */
|
|
41
|
+
ref?: Ref<HTMLButtonElement>;
|
|
42
|
+
}
|
|
43
|
+
export declare function NotificationBell({ className, variant, size, count, maxCount, dot, forceIndicator, ping, ringWhenActive, indicatorVariant, type, ref, ...props }: NotificationBellProps): ReactElement;
|
|
44
|
+
export declare namespace NotificationBell {
|
|
45
|
+
var displayName: string;
|
|
46
|
+
}
|
|
47
|
+
export { notificationBellTriggerVariants };
|
|
48
|
+
export default NotificationBell;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Bell, BellRing } from "lucide-react";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../../../lib/utils";
|
|
6
|
+
const notificationBellTriggerVariants = cva("relative inline-flex items-center justify-center rounded-md ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
10
|
+
outline: "border border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
11
|
+
ghost: "text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
12
|
+
subtle: "bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground",
|
|
13
|
+
brand: "bg-schemavaults-brand-blue text-primary-foreground hover:bg-schemavaults-brand-blue/90",
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
sm: "h-8 w-8 [&_svg]:size-4",
|
|
17
|
+
md: "h-9 w-9 [&_svg]:size-[18px]",
|
|
18
|
+
lg: "h-10 w-10 [&_svg]:size-5",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: "ghost",
|
|
23
|
+
size: "md",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
const indicatorVariants = cva("pointer-events-none absolute inline-flex items-center justify-center rounded-full font-medium tabular-nums ring-2 ring-background", {
|
|
27
|
+
variants: {
|
|
28
|
+
indicatorVariant: {
|
|
29
|
+
destructive: "bg-destructive text-white",
|
|
30
|
+
primary: "bg-primary text-primary-foreground",
|
|
31
|
+
success: "bg-green-500 text-white",
|
|
32
|
+
warning: "bg-yellow-500 text-black",
|
|
33
|
+
brand: "bg-schemavaults-brand-blue text-primary-foreground",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
indicatorVariant: "destructive",
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
const indicatorPingVariants = {
|
|
41
|
+
destructive: "bg-destructive",
|
|
42
|
+
primary: "bg-primary",
|
|
43
|
+
success: "bg-green-500",
|
|
44
|
+
warning: "bg-yellow-500",
|
|
45
|
+
brand: "bg-schemavaults-brand-blue",
|
|
46
|
+
};
|
|
47
|
+
const indicatorSizeClasses = {
|
|
48
|
+
sm: {
|
|
49
|
+
dot: "h-2 w-2",
|
|
50
|
+
count: "min-w-[14px] h-[14px] px-[3px] text-[9px] leading-none",
|
|
51
|
+
position: "-top-0.5 -right-0.5",
|
|
52
|
+
ping: "h-2 w-2",
|
|
53
|
+
},
|
|
54
|
+
md: {
|
|
55
|
+
dot: "h-2.5 w-2.5",
|
|
56
|
+
count: "min-w-[16px] h-[16px] px-1 text-[10px] leading-none",
|
|
57
|
+
position: "-top-0.5 -right-0.5",
|
|
58
|
+
ping: "h-2.5 w-2.5",
|
|
59
|
+
},
|
|
60
|
+
lg: {
|
|
61
|
+
dot: "h-3 w-3",
|
|
62
|
+
count: "min-w-[18px] h-[18px] px-1 text-[11px] leading-none",
|
|
63
|
+
position: "-top-1 -right-1",
|
|
64
|
+
ping: "h-3 w-3",
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
export function NotificationBell({ className, variant, size, count = 0, maxCount = 99, dot = false, forceIndicator = false, ping = false, ringWhenActive = false, indicatorVariant = "destructive", type = "button", ref, ...props }) {
|
|
68
|
+
const resolvedSize = size ?? "md";
|
|
69
|
+
const safeCount = Number.isFinite(count) && count > 0 ? Math.floor(count) : 0;
|
|
70
|
+
const showIndicator = forceIndicator || dot || safeCount > 0;
|
|
71
|
+
const displayLabel = safeCount > maxCount ? `${maxCount}+` : `${safeCount}`;
|
|
72
|
+
const sizeClasses = indicatorSizeClasses[resolvedSize];
|
|
73
|
+
const ariaLabel = props["aria-label"] ??
|
|
74
|
+
(safeCount > 0
|
|
75
|
+
? `Notifications (${safeCount} unread)`
|
|
76
|
+
: "Notifications");
|
|
77
|
+
const BellIcon = ringWhenActive && showIndicator ? BellRing : Bell;
|
|
78
|
+
return (_jsxs("button", { ref: ref, type: type, "aria-label": ariaLabel, className: cn(notificationBellTriggerVariants({ variant, size: resolvedSize }), className), ...props, children: [_jsx(BellIcon, { "aria-hidden": "true" }), showIndicator && (_jsx("span", { className: cn("absolute", sizeClasses.position), "aria-hidden": "true", children: _jsxs("span", { className: "relative flex items-center justify-center", children: [ping && (_jsx("span", { className: cn("absolute inline-flex rounded-full opacity-75 animate-ping", sizeClasses.ping, indicatorPingVariants[indicatorVariant]) })), _jsx("span", { className: cn(indicatorVariants({ indicatorVariant }), dot || safeCount === 0
|
|
79
|
+
? sizeClasses.dot
|
|
80
|
+
: sizeClasses.count), children: !dot && safeCount > 0 && displayLabel })] }) })), safeCount > 0 && (_jsxs("span", { className: "sr-only", "aria-live": "polite", children: [safeCount, " unread ", safeCount === 1 ? "notification" : "notifications"] }))] }));
|
|
81
|
+
}
|
|
82
|
+
NotificationBell.displayName = "NotificationBell";
|
|
83
|
+
export { notificationBellTriggerVariants };
|
|
84
|
+
export default NotificationBell;
|
|
85
|
+
//# sourceMappingURL=notification-bell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-bell.js","sourceRoot":"","sources":["../../../../src/components/ui/notification-bell/notification-bell.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAOjC,MAAM,+BAA+B,GAAG,GAAG,CACzC,2PAA2P,EAC3P;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,wDAAwD;YAC1D,OAAO,EACL,gGAAgG;YAClG,KAAK,EACH,6DAA6D;YAC/D,MAAM,EACJ,wEAAwE;YAC1E,KAAK,EACH,wFAAwF;SACzC;QACnD,IAAI,EAAE;YACJ,EAAE,EAAE,wBAAwB;YAC5B,EAAE,EAAE,6BAA6B;YACjC,EAAE,EAAE,0BAA0B;SACgB;KACjD;IACD,eAAe,EAAE;QACf,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,IAAI;KACX;CACF,CACF,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAG,CAC3B,mIAAmI,EACnI;IACE,QAAQ,EAAE;QACR,gBAAgB,EAAE;YAChB,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AAC,CAAC,WAAW,CAAC,KAAK,CACtB,YAEA,CAAC,GAAG,IAAI,SAAS,GAAG,CAAC,IAAI,YAAY,GACjC,IACF,GACF,CACR,EACA,SAAS,GAAG,CAAC,IAAI,CAChB,gBAAM,SAAS,EAAC,SAAS,eAAW,QAAQ,aACzC,SAAS,cAAU,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,IACjE,CACR,IACM,CACV,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAElD,OAAO,EAAE,+BAA+B,EAAE,CAAC;AAC3C,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import { type ComponentProps, type ReactElement, type Ref } from "react";
|
|
3
3
|
declare const numberTickerVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "warning" | "destructive" | "primary" | "
|
|
4
|
+
variant?: "default" | "warning" | "destructive" | "primary" | "success" | "muted" | null | undefined;
|
|
5
5
|
size?: "sm" | "default" | "lg" | "xl" | "2xl" | "3xl" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export type NumberTickerEase = "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ScrollProgress, scrollProgressVariants, scrollProgressIndicatorVariants, scrollProgressPositionIds, scrollProgressSizeIds, scrollProgressColorIds, } from "./scroll-progress";
|
|
2
|
+
export type * from "./scroll-progress";
|
|
3
|
+
export { ScrollProgress as default } from "./scroll-progress";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ScrollProgress, scrollProgressVariants, scrollProgressIndicatorVariants, scrollProgressPositionIds, scrollProgressSizeIds, scrollProgressColorIds, } from "./scroll-progress";
|
|
2
|
+
export { ScrollProgress as default } from "./scroll-progress";
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/scroll-progress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,+BAA+B,EAC/B,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { HTMLAttributes, ReactElement, RefObject } from "react";
|
|
3
|
+
export declare const scrollProgressPositionIds: ["top", "bottom", "static"];
|
|
4
|
+
export type ScrollProgressPositionId = (typeof scrollProgressPositionIds)[number];
|
|
5
|
+
export declare const scrollProgressSizeIds: ["sm", "default", "lg"];
|
|
6
|
+
export type ScrollProgressSizeId = (typeof scrollProgressSizeIds)[number];
|
|
7
|
+
export declare const scrollProgressColorIds: ["default", "brand", "primary", "positive", "warning", "destructive"];
|
|
8
|
+
export type ScrollProgressColorId = (typeof scrollProgressColorIds)[number];
|
|
9
|
+
export declare const scrollProgressVariants: (props?: ({
|
|
10
|
+
position?: "bottom" | "top" | "static" | null | undefined;
|
|
11
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
+
export declare const scrollProgressIndicatorVariants: (props?: ({
|
|
14
|
+
color?: "default" | "warning" | "destructive" | "primary" | "positive" | "brand" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
export interface ScrollProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, "color">, VariantProps<typeof scrollProgressVariants>, VariantProps<typeof scrollProgressIndicatorVariants> {
|
|
17
|
+
/**
|
|
18
|
+
* Optional ref to a scroll container to track. When omitted, the component
|
|
19
|
+
* tracks the document/window scroll.
|
|
20
|
+
*/
|
|
21
|
+
containerRef?: RefObject<HTMLElement | null>;
|
|
22
|
+
/** Accessible label describing what the progress represents. */
|
|
23
|
+
label?: string;
|
|
24
|
+
/** Additional classes applied to the filled indicator. */
|
|
25
|
+
indicatorClassName?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A horizontal scroll progress indicator that fills as the user scrolls a
|
|
29
|
+
* page or a scroll container. Useful for long-form content like articles,
|
|
30
|
+
* documentation, and changelogs to give the reader a sense of progress.
|
|
31
|
+
*
|
|
32
|
+
* When `containerRef` is omitted, the component tracks document/window scroll.
|
|
33
|
+
* Otherwise, it tracks the referenced element's vertical scroll progress.
|
|
34
|
+
*
|
|
35
|
+
* Animation uses a spring for a smooth follow, and respects
|
|
36
|
+
* `prefers-reduced-motion` by snapping directly to the scroll value.
|
|
37
|
+
*/
|
|
38
|
+
export declare function ScrollProgress({ position, size, color, containerRef, label, className, indicatorClassName, ...props }: ScrollProgressProps): ReactElement;
|
|
39
|
+
export declare namespace ScrollProgress {
|
|
40
|
+
var displayName: string;
|
|
41
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { m, useScroll, useSpring, useReducedMotion, } from "../../../framer-motion";
|
|
5
|
+
import { cn } from "../../../lib/utils";
|
|
6
|
+
export const scrollProgressPositionIds = [
|
|
7
|
+
"top",
|
|
8
|
+
"bottom",
|
|
9
|
+
"static",
|
|
10
|
+
];
|
|
11
|
+
export const scrollProgressSizeIds = [
|
|
12
|
+
"sm",
|
|
13
|
+
"default",
|
|
14
|
+
"lg",
|
|
15
|
+
];
|
|
16
|
+
export const scrollProgressColorIds = [
|
|
17
|
+
"default",
|
|
18
|
+
"brand",
|
|
19
|
+
"primary",
|
|
20
|
+
"positive",
|
|
21
|
+
"warning",
|
|
22
|
+
"destructive",
|
|
23
|
+
];
|
|
24
|
+
export const scrollProgressVariants = cva("z-50 w-full origin-left bg-secondary/40 backdrop-blur-sm pointer-events-none", {
|
|
25
|
+
variants: {
|
|
26
|
+
position: {
|
|
27
|
+
top: "fixed left-0 right-0 top-0",
|
|
28
|
+
bottom: "fixed left-0 right-0 bottom-0",
|
|
29
|
+
static: "relative",
|
|
30
|
+
},
|
|
31
|
+
size: {
|
|
32
|
+
sm: "h-0.5",
|
|
33
|
+
default: "h-1",
|
|
34
|
+
lg: "h-1.5",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
position: "top",
|
|
39
|
+
size: "default",
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
export const scrollProgressIndicatorVariants = cva("h-full w-full origin-left transition-colors duration-300", {
|
|
43
|
+
variants: {
|
|
44
|
+
color: {
|
|
45
|
+
default: "bg-gradient-to-r from-schemavaults-brand-blue to-schemavaults-brand-red",
|
|
46
|
+
brand: "bg-schemavaults-brand-blue",
|
|
47
|
+
primary: "bg-primary",
|
|
48
|
+
positive: "bg-green-500",
|
|
49
|
+
warning: "bg-yellow-500",
|
|
50
|
+
destructive: "bg-destructive",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
defaultVariants: {
|
|
54
|
+
color: "default",
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* A horizontal scroll progress indicator that fills as the user scrolls a
|
|
59
|
+
* page or a scroll container. Useful for long-form content like articles,
|
|
60
|
+
* documentation, and changelogs to give the reader a sense of progress.
|
|
61
|
+
*
|
|
62
|
+
* When `containerRef` is omitted, the component tracks document/window scroll.
|
|
63
|
+
* Otherwise, it tracks the referenced element's vertical scroll progress.
|
|
64
|
+
*
|
|
65
|
+
* Animation uses a spring for a smooth follow, and respects
|
|
66
|
+
* `prefers-reduced-motion` by snapping directly to the scroll value.
|
|
67
|
+
*/
|
|
68
|
+
export function ScrollProgress({ position, size, color, containerRef, label = "Page scroll progress", className, indicatorClassName, ...props }) {
|
|
69
|
+
const reduceMotion = useReducedMotion();
|
|
70
|
+
const { scrollYProgress } = useScroll(containerRef ? { container: containerRef } : undefined);
|
|
71
|
+
const smoothProgress = useSpring(scrollYProgress, {
|
|
72
|
+
stiffness: 140,
|
|
73
|
+
damping: 24,
|
|
74
|
+
mass: 0.4,
|
|
75
|
+
restDelta: 0.001,
|
|
76
|
+
});
|
|
77
|
+
return (_jsx("div", { role: "progressbar", "aria-label": label, "aria-valuemin": 0, "aria-valuemax": 100, className: cn(scrollProgressVariants({ position, size }), className), ...props, children: _jsx(m.div, { style: { scaleX: reduceMotion ? scrollYProgress : smoothProgress }, className: cn(scrollProgressIndicatorVariants({ color }), indicatorClassName) }) }));
|
|
78
|
+
}
|
|
79
|
+
ScrollProgress.displayName = "ScrollProgress";
|
|
80
|
+
//# sourceMappingURL=scroll-progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-progress.js","sourceRoot":"","sources":["../../../../src/components/ui/scroll-progress/scroll-progress.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,CAAC,EACD,SAAS,EACT,SAAS,EACT,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGjC,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,KAAK;IACL,QAAQ;IACR,QAAQ;CACmB,CAAC;AAK9B,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI;IACJ,SAAS;IACT,IAAI;CACuB,CAAC;AAI9B,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,SAAS;IACT,OAAO;IACP,SAAS;IACT,UAAU;IACV,SAAS;IACT,a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AEH,OAAO,CACL,cACE,IAAI,EAAC,aAAa,gBACN,KAAK,mBACF,CAAC,mBACD,GAAG,EAClB,SAAS,EAAE,EAAE,CAAC,sBAAsB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,KAChE,KAAK,YAET,KAAC,CAAC,CAAC,GAAG,IACJ,KAAK,EAAE,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,cAAc,EAAE,EAClE,SAAS,EAAE,EAAE,CACX,+BAA+B,CAAC,EAAE,KAAK,EAAE,CAAC,EAC1C,kBAAkB,CACnB,GACD,GACE,CACP,CAAC;AACJ,CAAC;AAED,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC"}
|
package/dist/framer-motion.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { m, animate, AnimatePresence, domAnimation, LazyMotion, useAnimate, useAnimationFrame, useTransform, useMotionValue, usePresence, useScroll, useMotionValueEvent, useReducedMotion, } from "framer-motion";
|
|
1
|
+
export { m, animate, AnimatePresence, domAnimation, LazyMotion, useAnimate, useAnimationFrame, useTransform, useMotionValue, usePresence, useScroll, useSpring, useMotionValueEvent, useReducedMotion, } from "framer-motion";
|
|
2
2
|
export type { MotionValue, AnimationScope } from "framer-motion";
|
package/dist/framer-motion.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { m, animate, AnimatePresence, domAnimation, LazyMotion, useAnimate, useAnimationFrame, useTransform, useMotionValue, usePresence, useScroll, useMotionValueEvent, useReducedMotion, } from "framer-motion";
|
|
2
|
+
export { m, animate, AnimatePresence, domAnimation, LazyMotion, useAnimate, useAnimationFrame, useTransform, useMotionValue, usePresence, useScroll, useSpring, useMotionValueEvent, useReducedMotion, } from "framer-motion";
|
|
3
3
|
//# sourceMappingURL=framer-motion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framer-motion.js","sourceRoot":"","sources":["../src/framer-motion.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EACL,CAAC,EACD,OAAO,EACP,eAAe,EACf,YAAY,EACZ,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"framer-motion.js","sourceRoot":"","sources":["../src/framer-motion.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EACL,CAAC,EACD,OAAO,EACP,eAAe,EACf,YAAY,EACZ,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,eAAe,CAAC"}
|