@schemavaults/ui 0.13.12 → 0.13.14
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/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/progress-bar/index.d.ts +3 -0
- package/dist/components/ui/progress-bar/index.js +3 -0
- package/dist/components/ui/progress-bar/index.js.map +1 -0
- package/dist/components/ui/progress-bar/progress-bar.d.ts +23 -0
- package/dist/components/ui/progress-bar/progress-bar.js +25 -0
- package/dist/components/ui/progress-bar/progress-bar.js.map +1 -0
- package/dist/components/ui/switch/index.d.ts +3 -0
- package/dist/components/ui/switch/index.js +3 -0
- package/dist/components/ui/switch/index.js.map +1 -0
- package/dist/components/ui/switch/switch.d.ts +9 -0
- package/dist/components/ui/switch/switch.js +9 -0
- package/dist/components/ui/switch/switch.js.map +1 -0
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,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,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAExB,cAAc,WAAW,CAAC;AAG1B,cAAc,YAAY,CAAC;AAG3B,cAAc,QAAQ,CAAC;AAGvB,cAAc,QAAQ,CAAC;AAGvB,cAAc,aAAa,CAAC;AAG5B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,WAAW,CAAC;AAG1B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,UAAU,CAAC;AAGzB,cAAc,WAAW,CAAC;AAG1B,cAAc,WAAW,CAAC;AAG1B,cAAc,SAAS,C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cAAc,YAAY,CAAC;AAG3B,cAAc,YAAY,CAAC;AAG3B,cAAc,cAAc,CAAC;AAG7B,cAAc,eAAe,CAAC;AAG9B,cAAc,YAAY,CAAC;AAG3B,cAAc,2BAA2B,CAAC;AAG1C,cAAc,kBAAkB,CAAC;AAGjC,cAAc,gBAAgB,CAAC;AAG/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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/progress-bar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEtF,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { ReactElement, HTMLAttributes } from "react";
|
|
3
|
+
export declare const progressBarVariants: (props?: ({
|
|
4
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export declare const progressBarSizeIds: readonly ["sm", "default", "lg"];
|
|
7
|
+
export type ProgressBarSizeId = (typeof progressBarSizeIds)[number];
|
|
8
|
+
export interface ProgressBarProps extends Omit<HTMLAttributes<HTMLDivElement>, "role">, VariantProps<typeof progressBarVariants> {
|
|
9
|
+
/** Current progress value (0-100) */
|
|
10
|
+
value: number;
|
|
11
|
+
/** Accessible label describing what the progress bar represents */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Minimum value (defaults to 0) */
|
|
14
|
+
min?: number;
|
|
15
|
+
/** Maximum value (defaults to 100) */
|
|
16
|
+
max?: number;
|
|
17
|
+
/** Additional classes for the filled indicator */
|
|
18
|
+
indicatorClassName?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function ProgressBar({ value, label, min, max, size, className, indicatorClassName, ...props }: ProgressBarProps): ReactElement;
|
|
21
|
+
export declare namespace ProgressBar {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { m } from "../../../framer-motion";
|
|
5
|
+
import { cn } from "../../../lib/utils";
|
|
6
|
+
export const progressBarVariants = cva("relative w-full overflow-hidden rounded-full bg-secondary", {
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
sm: "h-2",
|
|
10
|
+
default: "h-3",
|
|
11
|
+
lg: "h-5",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
size: "default",
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
export const progressBarSizeIds = ["sm", "default", "lg"];
|
|
19
|
+
export function ProgressBar({ value, label, min = 0, max = 100, size, className, indicatorClassName, ...props }) {
|
|
20
|
+
const clampedValue = Math.min(max, Math.max(min, value));
|
|
21
|
+
const percentage = ((clampedValue - min) / (max - min)) * 100;
|
|
22
|
+
return (_jsx("div", { role: "progressbar", "aria-valuenow": clampedValue, "aria-valuemin": min, "aria-valuemax": max, "aria-label": label, className: cn(progressBarVariants({ size }), className), ...props, children: _jsx(m.div, { initial: { width: 0 }, animate: { width: `${percentage}%` }, transition: { duration: 0.4, ease: "easeOut" }, className: cn("h-full rounded-full", "bg-gradient-to-r from-schemavaults-brand-blue to-schemavaults-brand-red", indicatorClassName) }) }));
|
|
23
|
+
}
|
|
24
|
+
ProgressBar.displayName = "ProgressBar";
|
|
25
|
+
//# sourceMappingURL=progress-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-bar.js","sourceRoot":"","sources":["../../../../src/components/ui/progress-bar/progress-bar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,CAAC,EAAE,MAAM,iBAAiB,CAAC;AACpC,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGjC,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CACpC,2DAA2D,EAC3D;IACE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE,KAAK;YACT,OAAO,EAAE,KAAK;YACd,EAAE,EAAE,KAAK;SACV;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAU,CAAC;AAmBnE,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,GAAG,GAAG,CAAC,EACP,GAAG,GAAG,GAAG,EACT,IAAI,EACJ,SAAS,EACT,kBAAkB,EAClB,GAAG,KAAK,EACS;IACjB,MAAM,YAAY,GAAW,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;IACjE,MAAM,UAAU,GAAW,CAAC,CAAC,YAAY,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;IAEtE,OAAO,CACL,cACE,IAAI,EAAC,aAAa,mBACH,YAAY,mBACZ,GAAG,mBACH,GAAG,gBACN,KAAK,EACjB,SAAS,EAAE,EAAE,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,KACnD,KAAK,YAET,KAAC,CAAC,CAAC,GAAG,IACJ,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EACrB,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,UAAU,GAAG,EAAE,EACpC,UAAU,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,EAC9C,SAAS,EAAE,EAAE,CACX,qBAAqB,EACrB,yEAAyE,EACzE,kBAAkB,CACnB,GACD,GACE,CACP,CAAC;AACJ,CAAC;AAED,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/switch/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
3
|
+
declare const Switch: {
|
|
4
|
+
({ className, ...props }: ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string | undefined;
|
|
6
|
+
};
|
|
7
|
+
export { Switch };
|
|
8
|
+
export type { SwitchProps } from "@radix-ui/react-switch";
|
|
9
|
+
export default Switch;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
4
|
+
import { cn } from "../../../lib/utils";
|
|
5
|
+
const Switch = ({ className, ...props }) => (_jsx(SwitchPrimitive.Root, { className: cn("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className), ...props, children: _jsx(SwitchPrimitive.Thumb, { className: cn("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") }) }));
|
|
6
|
+
Switch.displayName = SwitchPrimitive.Root.displayName;
|
|
7
|
+
export { Switch };
|
|
8
|
+
export default Switch;
|
|
9
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../../src/components/ui/switch/switch.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,MAAM,MAAM,GAAG,CAAC,EACd,SAAS,EACT,GAAG,KAAK,EAC8C,EAAE,EAAE,CAAC,CAC3D,KAAC,eAAe,CAAC,IAAI,IACnB,SAAS,EAAE,EAAE,CACX,oXAAoX,EACpX,SAAS,CACV,KACG,KAAK,YAET,KAAC,eAAe,CAAC,KAAK,IACpB,SAAS,EAAE,EAAE,CACX,4KAA4K,CAC7K,GACD,GACmB,CACxB,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC;AAEtD,OAAO,EAAE,MAAM,EAAE,CAAC;AAIlB,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schemavaults/ui",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "React.js UI components for SchemaVaults frontend applications",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"@radix-ui/react-tabs": "1.1.13",
|
|
29
29
|
"@radix-ui/react-tooltip": "1.2.7",
|
|
30
30
|
"@radix-ui/react-visually-hidden": "1.2.3",
|
|
31
|
+
"@radix-ui/react-switch": "1.2.6",
|
|
31
32
|
"@schemavaults/theme": "0.25.5",
|
|
32
33
|
"@tanstack/react-table": "8.20.1",
|
|
33
34
|
"class-variance-authority": "0.7.1",
|