@schemavaults/ui 0.57.1 → 0.59.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -106,6 +106,8 @@ export * from "./progress-bar";
106
106
  export type * from "./progress-bar";
107
107
  export * from "./circular-progress";
108
108
  export type * from "./circular-progress";
109
+ export * from "./scroll-progress";
110
+ export type * from "./scroll-progress";
109
111
  export * from "./gauge";
110
112
  export type * from "./gauge";
111
113
  export * from "./breadcrumb";
@@ -170,3 +172,5 @@ export * from "./countdown";
170
172
  export type * from "./countdown";
171
173
  export * from "./floating-action-button";
172
174
  export type * from "./floating-action-button";
175
+ export * from "./notification-bell";
176
+ export type * from "./notification-bell";
@@ -52,6 +52,7 @@ export * from "./slider";
52
52
  export * from "./switch";
53
53
  export * from "./progress-bar";
54
54
  export * from "./circular-progress";
55
+ export * from "./scroll-progress";
55
56
  export * from "./gauge";
56
57
  export * from "./breadcrumb";
57
58
  export * from "./pagination";
@@ -84,4 +85,5 @@ export * from "./tree-view";
84
85
  export * from "./carousel";
85
86
  export * from "./countdown";
86
87
  export * from "./floating-action-button";
88
+ export * from "./notification-bell";
87
89
  //# 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,aAAa,CAAC;AAG5B,cAAc,SAAS,CAAC;AAGxB,cAAc,WAAW,CAAC;AAG1B,cAAc,SAAS,CAAC;AAGxB,cAAc,mBAAmB,CAAC;AAGlC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,UAAU,CAAC;AAGzB,cAAc,SAAS,CAAC;AAGxB,cAAc,kBAAkB,CAAC;AAGjC,cAAc,aAAa,CAAC;AAG5B,cAAc,kCAAkC,CAAC;AAGjD,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAGxB,cAAc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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,WAAW,EAAE,2BAA2B;YACxC,OAAO,EAAE,oCAAoC;YAC7C,OAAO,EAAE,yBAAyB;YAClC,OAAO,EAAE,0BAA0B;YACnC,KAAK,EAAE,oDAAoD;SACD;KAC7D;IACD,eAAe,EAAE;QACf,gBAAgB,EAAE,aAAa;KAChC;CACF,CACF,CAAC;AAEF,MAAM,qBAAqB,GACzB;IACE,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,cAAc;IACvB,OAAO,EAAE,eAAe;IACxB,KAAK,EAAE,4BAA4B;CACpC,CAAC;AAEJ,MAAM,oBAAoB,GAGtB;I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eAAe,gBAAgB,CAAC"}
@@ -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,aAAa;CACc,CAAC;AAI9B,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CACvC,8EAA8E,EAC9E;IACE,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,GAAG,EAAE,4BAA4B;YACjC,MAAM,EAAE,+BAA+B;YACvC,MAAM,EAAE,UAAU;SACgC;QACpD,IAAI,EAAE;YACJ,EAAE,EAAE,OAAO;YACX,OAAO,EAAE,KAAK;YACd,EAAE,EAAE,OAAO;SACmC;KACjD;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAChD,0DAA0D,EAC1D;IACE,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EACL,yEAAyE;YAC3E,KAAK,EAAE,4BAA4B;YACnC,OAAO,EAAE,YAAY;YACrB,QAAQ,EAAE,cAAc;YACxB,OAAO,EAAE,eAAe;YACxB,WAAW,EAAE,gBAAgB;SACkB;KAClD;IACD,eAAe,EAAE;QACf,KAAK,EAAE,SAAS;KACjB;CACF,CACF,CAAC;AAiBF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,KAAK,GAAG,sBAAsB,EAC9B,SAAS,EACT,kBAAkB,EAClB,GAAG,KAAK,EACY;IACpB,MAAM,YAAY,GAAmB,gBAAgB,EAAE,CAAC;IACxD,MAAM,EAAE,eAAe,EAAE,GAAG,SAAS,CACnC,YAAY,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,SAAS,CACvD,CAAC;IACF,MAAM,cAAc,GAAG,SAAS,CAAC,eAAe,EAAE;QAChD,SAAS,EAAE,GAAG;QACd,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,GAAG;QACT,SAAS,EAAE,KAAK;KACjB,CAAC,CAAC;IAEH,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"}
@@ -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";
@@ -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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schemavaults/ui",
3
- "version": "0.57.1",
3
+ "version": "0.59.1",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "description": "React.js UI components for SchemaVaults frontend applications",