@schemavaults/ui 0.32.3 → 0.34.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/callout/callout.d.ts +38 -0
- package/dist/components/ui/callout/callout.js +66 -0
- package/dist/components/ui/callout/callout.js.map +1 -0
- package/dist/components/ui/callout/index.d.ts +3 -0
- package/dist/components/ui/callout/index.js +3 -0
- package/dist/components/ui/callout/index.js.map +1 -0
- package/dist/components/ui/code-block/code-block.d.ts +1 -1
- package/dist/components/ui/copy-button/copy-button.d.ts +1 -1
- package/dist/components/ui/index.d.ts +4 -0
- package/dist/components/ui/index.js +2 -0
- package/dist/components/ui/index.js.map +1 -1
- package/dist/components/ui/kbd/kbd.d.ts +1 -1
- package/dist/components/ui/number-ticker/index.d.ts +4 -0
- package/dist/components/ui/number-ticker/index.js +3 -0
- package/dist/components/ui/number-ticker/index.js.map +1 -0
- package/dist/components/ui/number-ticker/number-ticker-variants.d.ts +4 -0
- package/dist/components/ui/number-ticker/number-ticker-variants.js +17 -0
- package/dist/components/ui/number-ticker/number-ticker-variants.js.map +1 -0
- package/dist/components/ui/number-ticker/number-ticker.d.ts +37 -0
- package/dist/components/ui/number-ticker/number-ticker.js +118 -0
- package/dist/components/ui/number-ticker/number-ticker.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,38 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactElement, type ReactNode, type Ref } from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
export declare const calloutIntentIds: readonly ["note", "tip", "important", "warning", "caution"];
|
|
4
|
+
export type CalloutIntentId = (typeof calloutIntentIds)[number];
|
|
5
|
+
export declare const calloutAppearanceIds: readonly ["accent-bar", "subtle"];
|
|
6
|
+
export type CalloutAppearanceId = (typeof calloutAppearanceIds)[number];
|
|
7
|
+
declare const calloutVariants: (props?: ({
|
|
8
|
+
intent?: "note" | "warning" | "tip" | "important" | "caution" | null | undefined;
|
|
9
|
+
appearance?: "accent-bar" | "subtle" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
export interface CalloutProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof calloutVariants> {
|
|
12
|
+
/** Override the default icon for the intent. Pass `null` to hide. */
|
|
13
|
+
icon?: ReactNode | null;
|
|
14
|
+
/** Optional title; falls back to a default label for the intent. */
|
|
15
|
+
title?: ReactNode;
|
|
16
|
+
/** Render the title row even when no `title` is supplied. Defaults to true. */
|
|
17
|
+
showTitle?: boolean;
|
|
18
|
+
ref?: Ref<HTMLDivElement>;
|
|
19
|
+
}
|
|
20
|
+
declare function Callout({ className, intent, appearance, icon, title, showTitle, children, ref, ...props }: CalloutProps): ReactElement;
|
|
21
|
+
declare namespace Callout {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CalloutTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
25
|
+
ref?: Ref<HTMLHeadingElement>;
|
|
26
|
+
}
|
|
27
|
+
declare function CalloutTitle({ className, ref, children, ...props }: CalloutTitleProps): ReactElement;
|
|
28
|
+
declare namespace CalloutTitle {
|
|
29
|
+
var displayName: string;
|
|
30
|
+
}
|
|
31
|
+
export interface CalloutDescriptionProps extends HTMLAttributes<HTMLDivElement> {
|
|
32
|
+
ref?: Ref<HTMLDivElement>;
|
|
33
|
+
}
|
|
34
|
+
declare function CalloutDescription({ className, ref, ...props }: CalloutDescriptionProps): ReactElement;
|
|
35
|
+
declare namespace CalloutDescription {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
38
|
+
export { Callout, CalloutTitle, CalloutDescription, calloutVariants };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { Info, Lightbulb, AlertTriangle, AlertOctagon, MessageSquareWarning, } from "lucide-react";
|
|
5
|
+
import { cn } from "../../../lib/utils";
|
|
6
|
+
export const calloutIntentIds = [
|
|
7
|
+
"note",
|
|
8
|
+
"tip",
|
|
9
|
+
"important",
|
|
10
|
+
"warning",
|
|
11
|
+
"caution",
|
|
12
|
+
];
|
|
13
|
+
export const calloutAppearanceIds = [
|
|
14
|
+
"accent-bar",
|
|
15
|
+
"subtle",
|
|
16
|
+
];
|
|
17
|
+
const calloutVariants = cva("relative w-full text-sm text-foreground [&_a]:underline [&_a]:underline-offset-2", {
|
|
18
|
+
variants: {
|
|
19
|
+
intent: {
|
|
20
|
+
note: "[--callout-color:hsl(217_91%_60%)] [--callout-tint:hsl(217_91%_60%/0.08)]",
|
|
21
|
+
tip: "[--callout-color:hsl(142_71%_45%)] [--callout-tint:hsl(142_71%_45%/0.08)]",
|
|
22
|
+
important: "[--callout-color:hsl(258_90%_66%)] [--callout-tint:hsl(258_90%_66%/0.08)]",
|
|
23
|
+
warning: "[--callout-color:hsl(var(--warning))] [--callout-tint:hsl(var(--warning)/0.10)]",
|
|
24
|
+
caution: "[--callout-color:hsl(var(--destructive))] [--callout-tint:hsl(var(--destructive)/0.10)]",
|
|
25
|
+
},
|
|
26
|
+
appearance: {
|
|
27
|
+
"accent-bar": "rounded-md border-l-4 border-l-[var(--callout-color)] bg-[var(--callout-tint)] py-3 pl-4 pr-4",
|
|
28
|
+
subtle: "rounded-md border border-[var(--callout-color)]/30 bg-[var(--callout-tint)] p-4",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
intent: "note",
|
|
33
|
+
appearance: "accent-bar",
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
const defaultIcons = {
|
|
37
|
+
note: _jsx(Info, { "aria-hidden": true, className: "size-4" }),
|
|
38
|
+
tip: _jsx(Lightbulb, { "aria-hidden": true, className: "size-4" }),
|
|
39
|
+
important: _jsx(MessageSquareWarning, { "aria-hidden": true, className: "size-4" }),
|
|
40
|
+
warning: _jsx(AlertTriangle, { "aria-hidden": true, className: "size-4" }),
|
|
41
|
+
caution: _jsx(AlertOctagon, { "aria-hidden": true, className: "size-4" }),
|
|
42
|
+
};
|
|
43
|
+
const defaultLabels = {
|
|
44
|
+
note: "Note",
|
|
45
|
+
tip: "Tip",
|
|
46
|
+
important: "Important",
|
|
47
|
+
warning: "Warning",
|
|
48
|
+
caution: "Caution",
|
|
49
|
+
};
|
|
50
|
+
function Callout({ className, intent = "note", appearance = "accent-bar", icon, title, showTitle = true, children, ref, ...props }) {
|
|
51
|
+
const resolvedIntent = intent ?? "note";
|
|
52
|
+
const resolvedIcon = icon === null ? null : icon ?? defaultIcons[resolvedIntent];
|
|
53
|
+
const resolvedTitle = title ?? defaultLabels[resolvedIntent];
|
|
54
|
+
return (_jsxs("div", { ref: ref, role: "note", "data-slot": "callout", "data-intent": resolvedIntent, "data-appearance": appearance ?? "accent-bar", className: cn(calloutVariants({ intent, appearance }), className), ...props, children: [showTitle && (_jsxs("div", { className: "mb-1 flex items-center gap-2 text-[var(--callout-color)]", children: [resolvedIcon, _jsx("span", { className: "text-sm font-semibold leading-none", children: resolvedTitle })] })), children !== undefined && (_jsxs("div", { "data-slot": "callout-content", className: cn("text-sm leading-relaxed text-foreground/90", showTitle ? "" : "flex items-start gap-2"), children: [!showTitle && resolvedIcon !== null && (_jsx("span", { className: "mt-0.5 shrink-0 text-[var(--callout-color)]", children: resolvedIcon })), _jsx("div", { className: "min-w-0 flex-1", children: children })] }))] }));
|
|
55
|
+
}
|
|
56
|
+
Callout.displayName = "Callout";
|
|
57
|
+
function CalloutTitle({ className, ref, children, ...props }) {
|
|
58
|
+
return (_jsx("h5", { ref: ref, "data-slot": "callout-title", className: cn("mb-1 text-sm font-semibold leading-none tracking-tight text-[var(--callout-color)]", className), ...props, children: children }));
|
|
59
|
+
}
|
|
60
|
+
CalloutTitle.displayName = "CalloutTitle";
|
|
61
|
+
function CalloutDescription({ className, ref, ...props }) {
|
|
62
|
+
return (_jsx("div", { ref: ref, "data-slot": "callout-description", className: cn("text-sm leading-relaxed text-foreground/90 [&_p]:leading-relaxed", className), ...props }));
|
|
63
|
+
}
|
|
64
|
+
CalloutDescription.displayName = "CalloutDescription";
|
|
65
|
+
export { Callout, CalloutTitle, CalloutDescription, calloutVariants };
|
|
66
|
+
//# sourceMappingURL=callout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callout.js","sourceRoot":"","sources":["../../../../src/components/ui/callout/callout.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAQb,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,IAAI,EACJ,SAAS,EACT,aAAa,EACb,YAAY,EACZ,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM;IACN,KAAK;IACL,WAAW;IACX,SAAS;IACT,SAAS;CAC2B,CAAC;AAGvC,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,YAAY;IACZ,QAAQ;CAC4B,CAAC;AAGvC,MAAM,eAAe,GAAG,GAAG,CACzB,kFAAkF,EAClF;IACE,QAAQ,EAAE;QACR,MAAM,EAAE;YACN,IAAI,EAAE,2EAA2E;YACjF,GAAG,EAAE,2EAA2E;YAChF,SAAS,EACP,2EAA2E;YAC7E,OAAO,EACL,iFAAiF;YACnF,OAAO,EACL,yFAAyF;SAClD;QAC3C,UAAU,EAAE;YACV,YAAY,EACV,+FAA+F;YACjG,MAAM,EACJ,iFAAiF;SACtC;KAChD;IACD,eAAe,EAAE;QACf,MAAM,EAAE,MAAM;QACd,UAAU,EAAE,YAAY;KACzB;CACF,CACF,CAAC;AAEF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C,YACjD,aAAa,GACT,IACH,CACP,EACA,QAAQ,KAAK,SAAS,IAAI,CACzB,4BACY,iBAAiB,EAC3B,SAAS,EAAE,EAAE,CACX,4CAA4C,EAC5C,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,wBAAwB,CAC1C,aAEA,CAAC,SAAS,IAAI,YAAY,KAAK,IAAI,IAAI,CACtC,eAAM,SAAS,EAAC,6CAA6C,YAC1D,YAAY,GACR,CACR,EACD,cAAK,SAAS,EAAC,gBAAgB,YAAE,QAAQ,GAAO,IAC5C,CACP,IACG,CACP,CAAC;AACJ,CAAC;AACD,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAOhC,SAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,EACH,QAAQ,EACR,GAAG,KAAK,EACU;IAClB,OAAO,CACL,aACE,GAAG,EAAE,GAAG,eACE,eAAe,EACzB,SAAS,EAAE,EAAE,CACX,oFAAoF,EACpF,SAAS,CACV,KACG,KAAK,YAER,QAAQ,GACN,CACN,CAAC;AACJ,CAAC;AACD,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAO1C,SAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACgB;IACxB,OAAO,CACL,cACE,GAAG,EAAE,GAAG,eACE,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CACX,kEAAkE,EAClE,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AACD,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Callout, CalloutTitle, CalloutDescription, calloutVariants, calloutIntentIds, calloutAppearanceIds, } from "./callout";
|
|
2
|
+
export type { CalloutProps, CalloutTitleProps, CalloutDescriptionProps, CalloutIntentId, CalloutAppearanceId, } from "./callout";
|
|
3
|
+
export { Callout as default } from "./callout";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/callout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AASnB,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import { type HTMLAttributes, type ReactElement, type ReactNode, type Ref } from "react";
|
|
3
3
|
import { type CodeBlockSize, type CodeBlockVariant, codeBlockSizeIds, codeBlockVariantIds } from "./code-block-variants";
|
|
4
4
|
declare const codeBlockVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "
|
|
5
|
+
variant?: "default" | "subtle" | "terminal" | "contrast" | null | undefined;
|
|
6
6
|
size?: "sm" | "lg" | "md" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface CodeBlockProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "title">, VariantProps<typeof codeBlockVariants> {
|
|
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import { type ButtonHTMLAttributes, type ReactElement, type ReactNode, type Ref } from "react";
|
|
3
3
|
import { type CopyButtonSize, type CopyButtonVariant, copyButtonSizeIds, copyButtonVariantIds } from "./copy-button-variants";
|
|
4
4
|
declare const copyButtonVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "ghost" | "
|
|
5
|
+
variant?: "default" | "ghost" | "subtle" | "outline" | "brand" | null | undefined;
|
|
6
6
|
size?: "sm" | "lg" | "md" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface CopyButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "onCopy">, VariantProps<typeof copyButtonVariants> {
|
|
@@ -4,6 +4,8 @@ export * from "./accordion";
|
|
|
4
4
|
export type * from "./accordion";
|
|
5
5
|
export * from "./alert";
|
|
6
6
|
export type * from "./alert";
|
|
7
|
+
export * from "./callout";
|
|
8
|
+
export type * from "./callout";
|
|
7
9
|
export * from "./badge";
|
|
8
10
|
export type * from "./badge";
|
|
9
11
|
export * from "./background-blur";
|
|
@@ -132,3 +134,5 @@ export * from "./toggle";
|
|
|
132
134
|
export type * from "./toggle";
|
|
133
135
|
export * from "./chip";
|
|
134
136
|
export type * from "./chip";
|
|
137
|
+
export * from "./number-ticker";
|
|
138
|
+
export type * from "./number-ticker";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./avatar";
|
|
2
2
|
export * from "./accordion";
|
|
3
3
|
export * from "./alert";
|
|
4
|
+
export * from "./callout";
|
|
4
5
|
export * from "./badge";
|
|
5
6
|
export * from "./background-blur";
|
|
6
7
|
export * from "./themed-page-background";
|
|
@@ -65,4 +66,5 @@ export * from "./segmented-control";
|
|
|
65
66
|
export * from "./marquee";
|
|
66
67
|
export * from "./toggle";
|
|
67
68
|
export * from "./chip";
|
|
69
|
+
export * from "./number-ticker";
|
|
68
70
|
//# 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,aAAa,CAAC;AAG5B,cAAc,SAAS,CAAC;AAGxB,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;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G/B,cAAc,eAAe,CAAC;AAG9B,cAAc,WAAW,CAAC;AAG1B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAGxB,cAAc,UAAU,CAAC;AAGzB,cAAc,eAAe,CAAC;AAG9B,cAAc,qBAAqB,CAAC;AAGpC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,QAAQ,CAAC;AAGvB,cAAc,QAAQ,CAAC;AAGvB,cAAc,UAAU,CAAC;AAGzB,cAAc,UAAU,CAAC;AAGzB,cAAc,gBAAgB,CAAC;AAG/B,cAAc,qBAAqB,CAAC;AAGpC,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,qBAAqB,CAAC;AAGpC,cAAc,WAAW,CAAC;AAG1B,cAAc,UAAU,CAAC;AAGzB,cAAc,QAAQ,CAAC;AAGvB,cAAc,iBAAiB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import type { HTMLAttributes, ReactElement, ReactNode, Ref } from "react";
|
|
3
3
|
import { type KbdSize, type KbdVariant, kbdSizeIds, kbdVariantIds } from "./kbd-variants";
|
|
4
4
|
declare const kbdVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "
|
|
5
|
+
variant?: "default" | "subtle" | "outline" | "solid" | null | undefined;
|
|
6
6
|
size?: "sm" | "lg" | "md" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface KbdProps extends HTMLAttributes<HTMLElement>, VariantProps<typeof kbdVariants> {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { NumberTicker, NumberTicker as default, numberTickerVariants, } from "./number-ticker";
|
|
2
|
+
export type { NumberTickerProps, NumberTickerEase, } from "./number-ticker";
|
|
3
|
+
export { numberTickerVariantIds, numberTickerSizeIds, } from "./number-ticker-variants";
|
|
4
|
+
export type { NumberTickerVariant, NumberTickerSize, } from "./number-ticker-variants";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/number-ticker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,YAAY,IAAI,OAAO,EACvB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EACL,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const numberTickerVariantIds: readonly ["default", "primary", "muted", "destructive", "warning", "success"];
|
|
2
|
+
export type NumberTickerVariant = (typeof numberTickerVariantIds)[number];
|
|
3
|
+
export declare const numberTickerSizeIds: readonly ["sm", "default", "lg", "xl", "2xl", "3xl"];
|
|
4
|
+
export type NumberTickerSize = (typeof numberTickerSizeIds)[number];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const numberTickerVariantIds = [
|
|
2
|
+
"default",
|
|
3
|
+
"primary",
|
|
4
|
+
"muted",
|
|
5
|
+
"destructive",
|
|
6
|
+
"warning",
|
|
7
|
+
"success",
|
|
8
|
+
];
|
|
9
|
+
export const numberTickerSizeIds = [
|
|
10
|
+
"sm",
|
|
11
|
+
"default",
|
|
12
|
+
"lg",
|
|
13
|
+
"xl",
|
|
14
|
+
"2xl",
|
|
15
|
+
"3xl",
|
|
16
|
+
];
|
|
17
|
+
//# sourceMappingURL=number-ticker-variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-ticker-variants.js","sourceRoot":"","sources":["../../../../src/components/ui/number-ticker/number-ticker-variants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,SAAS;IACT,SAAS;IACT,OAAO;IACP,aAAa;IACb,SAAS;IACT,SAAS;CAC2B,CAAC;AAGvC,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI;IACJ,SAAS;IACT,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,KAAK;CAC+B,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type ComponentProps, type ReactElement, type Ref } from "react";
|
|
3
|
+
declare const numberTickerVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "warning" | "primary" | "muted" | "success" | null | undefined;
|
|
5
|
+
size?: "sm" | "default" | "lg" | "xl" | "2xl" | "3xl" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export type NumberTickerEase = "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate";
|
|
8
|
+
export interface NumberTickerProps extends Omit<ComponentProps<"span">, "children">, VariantProps<typeof numberTickerVariants> {
|
|
9
|
+
/** The target number to animate to. */
|
|
10
|
+
value: number;
|
|
11
|
+
/** The starting number for the animation. Defaults to `0`. */
|
|
12
|
+
from?: number;
|
|
13
|
+
/** Animation duration in seconds. Defaults to `1.5`. */
|
|
14
|
+
duration?: number;
|
|
15
|
+
/** Delay before the animation begins, in seconds. Defaults to `0`. */
|
|
16
|
+
delay?: number;
|
|
17
|
+
/** Number of decimal places to display. Defaults to `0`. */
|
|
18
|
+
decimals?: number;
|
|
19
|
+
/** String prepended to the formatted number (e.g. `$`). */
|
|
20
|
+
prefix?: string;
|
|
21
|
+
/** String appended to the formatted number (e.g. `%`). */
|
|
22
|
+
suffix?: string;
|
|
23
|
+
/** BCP-47 locale tag(s) used for `Intl.NumberFormat`. Defaults to `"en-US"`. */
|
|
24
|
+
locale?: string | string[];
|
|
25
|
+
/** Whether to use grouping separators (e.g. thousands commas). Defaults to `true`. */
|
|
26
|
+
useGrouping?: boolean;
|
|
27
|
+
/** When `true`, animation only starts once the element scrolls into the viewport. Defaults to `true`. */
|
|
28
|
+
startOnInView?: boolean;
|
|
29
|
+
/** Easing curve. Defaults to `"easeOut"`. */
|
|
30
|
+
ease?: NumberTickerEase;
|
|
31
|
+
ref?: Ref<HTMLSpanElement>;
|
|
32
|
+
}
|
|
33
|
+
export declare function NumberTicker({ value, from, duration, delay, decimals, prefix, suffix, locale, useGrouping, startOnInView, ease, variant, size, className, ref, ...props }: NumberTickerProps): ReactElement;
|
|
34
|
+
export declare namespace NumberTicker {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export { numberTickerVariants };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { useCallback, useEffect, useMemo, useRef, } from "react";
|
|
5
|
+
import { animate, useMotionValue, useReducedMotion, } from "../../../framer-motion";
|
|
6
|
+
import { cn } from "../../../lib/utils";
|
|
7
|
+
const numberTickerVariants = cva("inline-block tabular-nums font-semibold tracking-tight", {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "text-foreground",
|
|
11
|
+
primary: "text-primary",
|
|
12
|
+
muted: "text-muted-foreground",
|
|
13
|
+
destructive: "text-destructive",
|
|
14
|
+
warning: "text-warning",
|
|
15
|
+
success: "text-emerald-600 dark:text-emerald-400",
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
sm: "text-sm",
|
|
19
|
+
default: "text-base",
|
|
20
|
+
lg: "text-lg",
|
|
21
|
+
xl: "text-2xl",
|
|
22
|
+
"2xl": "text-4xl",
|
|
23
|
+
"3xl": "text-6xl",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "default",
|
|
28
|
+
size: "default",
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
export function NumberTicker({ value, from = 0, duration = 1.5, delay = 0, decimals = 0, prefix = "", suffix = "", locale = "en-US", useGrouping = true, startOnInView = true, ease = "easeOut", variant, size, className, ref, ...props }) {
|
|
32
|
+
const prefersReducedMotion = useReducedMotion();
|
|
33
|
+
const motionValue = useMotionValue(from);
|
|
34
|
+
const innerRef = useRef(null);
|
|
35
|
+
const startedRef = useRef(false);
|
|
36
|
+
const formatter = useMemo(() => new Intl.NumberFormat(locale, {
|
|
37
|
+
minimumFractionDigits: decimals,
|
|
38
|
+
maximumFractionDigits: decimals,
|
|
39
|
+
useGrouping,
|
|
40
|
+
}), [locale, decimals, useGrouping]);
|
|
41
|
+
const format = useCallback((n) => `${prefix}${formatter.format(n)}${suffix}`, [formatter, prefix, suffix]);
|
|
42
|
+
const setRefs = useCallback((node) => {
|
|
43
|
+
innerRef.current = node;
|
|
44
|
+
if (typeof ref === "function") {
|
|
45
|
+
ref(node);
|
|
46
|
+
}
|
|
47
|
+
else if (ref) {
|
|
48
|
+
ref.current = node;
|
|
49
|
+
}
|
|
50
|
+
}, [ref]);
|
|
51
|
+
// Subscribe to motion value updates and write the formatted text into the
|
|
52
|
+
// span imperatively. This avoids re-rendering the React tree on every frame.
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
const node = innerRef.current;
|
|
55
|
+
if (node) {
|
|
56
|
+
node.textContent = format(motionValue.get());
|
|
57
|
+
}
|
|
58
|
+
return motionValue.on("change", (latest) => {
|
|
59
|
+
const el = innerRef.current;
|
|
60
|
+
if (el) {
|
|
61
|
+
el.textContent = format(latest);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}, [motionValue, format]);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (prefersReducedMotion) {
|
|
67
|
+
motionValue.set(value);
|
|
68
|
+
startedRef.current = true;
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const runAnimation = () => {
|
|
72
|
+
const controls = animate(motionValue, value, {
|
|
73
|
+
type: "tween",
|
|
74
|
+
duration,
|
|
75
|
+
delay,
|
|
76
|
+
ease,
|
|
77
|
+
});
|
|
78
|
+
return controls.stop;
|
|
79
|
+
};
|
|
80
|
+
if (startedRef.current || !startOnInView) {
|
|
81
|
+
startedRef.current = true;
|
|
82
|
+
return runAnimation();
|
|
83
|
+
}
|
|
84
|
+
const el = innerRef.current;
|
|
85
|
+
if (!el) {
|
|
86
|
+
startedRef.current = true;
|
|
87
|
+
return runAnimation();
|
|
88
|
+
}
|
|
89
|
+
let stopAnimation;
|
|
90
|
+
const observer = new IntersectionObserver((entries) => {
|
|
91
|
+
for (const entry of entries) {
|
|
92
|
+
if (entry.isIntersecting) {
|
|
93
|
+
startedRef.current = true;
|
|
94
|
+
observer.disconnect();
|
|
95
|
+
stopAnimation = runAnimation();
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}, { threshold: 0.1 });
|
|
100
|
+
observer.observe(el);
|
|
101
|
+
return () => {
|
|
102
|
+
observer.disconnect();
|
|
103
|
+
stopAnimation?.();
|
|
104
|
+
};
|
|
105
|
+
}, [
|
|
106
|
+
value,
|
|
107
|
+
duration,
|
|
108
|
+
delay,
|
|
109
|
+
ease,
|
|
110
|
+
prefersReducedMotion,
|
|
111
|
+
startOnInView,
|
|
112
|
+
motionValue,
|
|
113
|
+
]);
|
|
114
|
+
return (_jsx("span", { ref: setRefs, "data-slot": "number-ticker", "aria-label": format(value), className: cn(numberTickerVariants({ variant, size }), className), ...props, children: format(from) }));
|
|
115
|
+
}
|
|
116
|
+
NumberTicker.displayName = "NumberTicker";
|
|
117
|
+
export { numberTickerVariants };
|
|
118
|
+
//# sourceMappingURL=number-ticker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-ticker.js","sourceRoot":"","sources":["../../../../src/components/ui/number-ticker/number-ticker.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,GAIP,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,OAAO,EACP,cAAc,EACd,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAMjC,MAAM,oBAAoB,GAAG,GAAG,CAC9B,wDAAwD,EACxD;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,iBAAiB;YAC1B,OAAO,EAAE,cAAc;YACvB,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,kBAAkB;YAC/B,OAAO,EAAE,cAAc;YACvB,OAAO,EAAE,wCAAwC;SACJ;QAC/C,IAAI,EAAE;YACJ,EAAE,EAAE,SAAS;YACb,OAAO,EAAE,WAAW;YACpB,EAAE,EAAE,SAAS;YACb,EAAE,EAAE,UAAU;YACd,KAAK,EAAE,UAAU;YACjB,KAAK,EAAE,UAAU;SACyB;KAC7C;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC;AA2CF,MAAM,UAAU,YAAY,CAAC,EAC3B,KAAK,EACL,IAAI,GAAG,CAAC,EACR,QAAQ,GAAG,GAAG,EACd,KAAK,GAAG,CAAC,EACT,QAAQ,GAAG,CAAC,EACZ,MAAM,GAAG,EAAE,EACX,MAAM,GAAG,EAAE,EACX,MAAM,GAAG,OAAO,EAChB,WAAW,GAAG,IAAI,EAClB,aAAa,GAAG,IAAI,EACpB,IAAI,GAAG,SAAS,EAChB,OAAO,EACP,IAAI,EACJ,SAAS,EACT,GAAG,EACH,GA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,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC;oBAC1B,QAAQ,CAAC,UAAU,EAAE,CAAC;oBACtB,aAAa,GAAG,YAAY,EAAE,CAAC;oBAC/B,MAAM;gBACR,CAAC;YACH,CAAC;QACH,CAAC,EACD,EAAE,SAAS,EAAE,GAAG,EAAE,CACnB,CAAC;QACF,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAErB,OAAO,GAAS,EAAE;YAChB,QAAQ,CAAC,UAAU,EAAE,CAAC;YACtB,aAAa,EAAE,EAAE,CAAC;QACpB,CAAC,CAAC;IACJ,CAAC,EAAE;QACD,KAAK;QACL,QAAQ;QACR,KAAK;QACL,IAAI;QACJ,oBAAoB;QACpB,aAAa;QACb,WAAW;KACZ,CAAC,CAAC;IAEH,OAAO,CACL,eACE,GAAG,EAAE,OAAO,eACF,eAAe,gBACb,MAAM,CAAC,KAAK,CAAC,EACzB,SAAS,EAAE,EAAE,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,KAC7D,KAAK,YAER,MAAM,CAAC,IAAI,CAAC,GACR,CACR,CAAC;AACJ,CAAC;AACD,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
package/dist/framer-motion.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { m, 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, 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, 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, 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,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,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,eAAe,CAAC"}
|