@schemavaults/ui 0.55.0 → 0.56.2

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.
@@ -0,0 +1,43 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import type { ButtonHTMLAttributes, ReactElement, ReactNode, Ref } from "react";
3
+ export declare const floatingActionButtonVariantIds: ["primary", "secondary", "destructive", "outline", "brand"];
4
+ export type FloatingActionButtonVariantId = (typeof floatingActionButtonVariantIds)[number];
5
+ export declare const floatingActionButtonSizeIds: ["sm", "default", "lg"];
6
+ export type FloatingActionButtonSizeId = (typeof floatingActionButtonSizeIds)[number];
7
+ export declare const floatingActionButtonPositionIds: ["bottom-right", "bottom-left", "top-right", "top-left", "static"];
8
+ export type FloatingActionButtonPositionId = (typeof floatingActionButtonPositionIds)[number];
9
+ declare const floatingActionButtonVariants: (props?: ({
10
+ variant?: "destructive" | "secondary" | "outline" | "primary" | "brand" | null | undefined;
11
+ size?: "sm" | "default" | "lg" | null | undefined;
12
+ extended?: boolean | null | undefined;
13
+ position?: "static" | "bottom-right" | "bottom-left" | "top-right" | "top-left" | null | undefined;
14
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
15
+ export interface FloatingActionButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children">, VariantProps<typeof floatingActionButtonVariants> {
16
+ ref?: Ref<HTMLButtonElement>;
17
+ /**
18
+ * Icon rendered inside the FAB. Required for icon-only mode.
19
+ */
20
+ icon: ReactNode;
21
+ /**
22
+ * Optional label rendered alongside the icon. When provided, the FAB
23
+ * switches to its extended layout (icon + text) unless `extended` is
24
+ * explicitly set to false.
25
+ */
26
+ label?: ReactNode;
27
+ /**
28
+ * Accessible label for the button. Strongly recommended in icon-only
29
+ * mode where no visible text describes the action.
30
+ */
31
+ "aria-label"?: string;
32
+ /**
33
+ * Render the button as a different element via Radix Slot (useful for
34
+ * wrapping with a Link component while preserving styles).
35
+ */
36
+ asChild?: boolean;
37
+ }
38
+ declare function FloatingActionButton({ className, variant, size, position, extended, icon, label, asChild, type, ref, ...props }: FloatingActionButtonProps): ReactElement;
39
+ declare namespace FloatingActionButton {
40
+ var displayName: string;
41
+ }
42
+ export { FloatingActionButton, floatingActionButtonVariants };
43
+ export default FloatingActionButton;
@@ -0,0 +1,76 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../../../lib/utils";
6
+ export const floatingActionButtonVariantIds = [
7
+ "primary",
8
+ "secondary",
9
+ "destructive",
10
+ "outline",
11
+ "brand",
12
+ ];
13
+ export const floatingActionButtonSizeIds = [
14
+ "sm",
15
+ "default",
16
+ "lg",
17
+ ];
18
+ export const floatingActionButtonPositionIds = [
19
+ "bottom-right",
20
+ "bottom-left",
21
+ "top-right",
22
+ "top-left",
23
+ "static",
24
+ ];
25
+ const floatingActionButtonVariants = cva("group/fab inline-flex items-center justify-center gap-2 font-medium ring-offset-background shadow-lg transition-[background-color,border-color,color,box-shadow,transform] hover:shadow-xl active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none z-40", {
26
+ variants: {
27
+ variant: {
28
+ primary: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-primary/25",
29
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-secondary/25",
30
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-destructive/30",
31
+ outline: "border border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground",
32
+ brand: "bg-schemavaults-brand-blue text-primary-foreground hover:bg-schemavaults-brand-blue/90 shadow-schemavaults-brand-blue/30",
33
+ },
34
+ size: {
35
+ sm: "h-10 w-10 rounded-full text-sm [&_svg]:size-4",
36
+ default: "h-14 w-14 rounded-full text-base [&_svg]:size-6",
37
+ lg: "h-16 w-16 rounded-full text-base [&_svg]:size-7",
38
+ },
39
+ extended: {
40
+ true: "rounded-full w-auto",
41
+ false: "",
42
+ },
43
+ position: {
44
+ "bottom-right": "fixed bottom-6 right-6",
45
+ "bottom-left": "fixed bottom-6 left-6",
46
+ "top-right": "fixed top-6 right-6",
47
+ "top-left": "fixed top-6 left-6",
48
+ static: "",
49
+ },
50
+ },
51
+ compoundVariants: [
52
+ { extended: true, size: "sm", class: "h-10 px-4" },
53
+ { extended: true, size: "default", class: "h-14 px-6" },
54
+ { extended: true, size: "lg", class: "h-16 px-8" },
55
+ ],
56
+ defaultVariants: {
57
+ variant: "primary",
58
+ size: "default",
59
+ extended: false,
60
+ position: "bottom-right",
61
+ },
62
+ });
63
+ function FloatingActionButton({ className, variant, size, position, extended, icon, label, asChild = false, type = "button", ref, ...props }) {
64
+ const Comp = asChild ? Slot : "button";
65
+ const isExtended = extended ?? Boolean(label);
66
+ return (_jsxs(Comp, { ref: ref, type: asChild ? undefined : type, "data-slot": "floating-action-button", "data-extended": isExtended || undefined, className: cn(floatingActionButtonVariants({
67
+ variant,
68
+ size,
69
+ position,
70
+ extended: isExtended,
71
+ }), className), ...props, children: [_jsx("span", { "aria-hidden": "true", "data-slot": "floating-action-button-icon", className: "inline-flex shrink-0 items-center justify-center", children: icon }), isExtended && label != null ? (_jsx("span", { "data-slot": "floating-action-button-label", className: "truncate", children: label })) : null] }));
72
+ }
73
+ FloatingActionButton.displayName = "FloatingActionButton";
74
+ export { FloatingActionButton, floatingActionButtonVariants };
75
+ export default FloatingActionButton;
76
+ //# sourceMappingURL=floating-action-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floating-action-button.js","sourceRoot":"","sources":["../../../../src/components/ui/floating-action-button/floating-action-button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,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f,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,cAAc;KACzB;CACF,CACF,CAAC;AA4BF,SAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,OAAO,GAAG,KAAK,EACf,IAAI,GAAG,QAAQ,EACf,GAAG,EACH,GAAG,KAAK,EACkB;IAC1B,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;IACvC,MAAM,UAAU,GAAG,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;IAE9C,OAAO,CACL,MAAC,IAAI,IACH,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,eACtB,wBAAwB,mBACnB,UAAU,IAAI,SAAS,EACtC,SAAS,EAAE,EAAE,CACX,4BAA4B,CAAC;YAC3B,OAAO;YACP,IAAI;YACJ,QAAQ;YACR,QAAQ,EAAE,UAAU;SACrB,CAAC,EACF,SAAS,CACV,KACG,KAAK,aAET,8BACc,MAAM,eACR,6BAA6B,EACvC,SAAS,EAAC,kDAAkD,YAE3D,IAAI,GACA,EACN,UAAU,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAC7B,4BACY,8BAA8B,EACxC,SAAS,EAAC,UAAU,YAEnB,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,IACH,CACR,CAAC;AACJ,CAAC;AACD,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,CAAC;AAE9D,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./floating-action-button";
2
+ export type * from "./floating-action-button";
3
+ export { default } from "./floating-action-button";
@@ -0,0 +1,3 @@
1
+ export * from "./floating-action-button";
2
+ export { default } from "./floating-action-button";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/floating-action-button/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AAGzC,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC"}
@@ -166,3 +166,5 @@ export * from "./carousel";
166
166
  export type * from "./carousel";
167
167
  export * from "./countdown";
168
168
  export type * from "./countdown";
169
+ export * from "./floating-action-button";
170
+ export type * from "./floating-action-button";
@@ -82,4 +82,5 @@ export * from "./theme-selector";
82
82
  export * from "./tree-view";
83
83
  export * from "./carousel";
84
84
  export * from "./countdown";
85
+ export * from "./floating-action-button";
85
86
  //# 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,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,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;A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BAAqB,CAAC;AAGpC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,aAAa,CAAC;AAG5B,cAAc,YAAY,CAAC;AAG3B,cAAc,aAAa,CAAC;AAG5B,cAAc,0BAA0B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schemavaults/ui",
3
- "version": "0.55.0",
3
+ "version": "0.56.2",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "description": "React.js UI components for SchemaVaults frontend applications",