@schemavaults/ui 0.14.12 → 0.15.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.
@@ -96,3 +96,5 @@ export * from "./progress-bar";
96
96
  export type * from "./progress-bar";
97
97
  export * from "./breadcrumb";
98
98
  export type * from "./breadcrumb";
99
+ export * from "./kbd";
100
+ export type * from "./kbd";
@@ -47,4 +47,5 @@ export * from "./slider";
47
47
  export * from "./switch";
48
48
  export * from "./progress-bar";
49
49
  export * from "./breadcrumb";
50
+ export * from "./kbd";
50
51
  //# 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,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,CAAC;AAGxB,cAAc,aAAa,CAAC;AAG5B,cAAc,YAAY,CAAC;AAG3B,cAAc,YAAY,CAAC;AAG3B,cAAc,cAAc,CAAC;AAG7B,cAAc,eAAe,CAAC;AAG9B,cAAc,YAAY,CAAC;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AAY,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;AAG/B,cAAc,cAAc,CAAC;AAG7B,cAAc,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { Kbd, Kbd as default, KbdGroup, kbdVariants, kbdGroupVariants } from "./kbd";
2
+ export type { KbdProps, KbdGroupProps } from "./kbd";
3
+ export { kbdVariantIds, kbdSizeIds } from "./kbd-variants";
4
+ export type { KbdVariant, KbdSize } from "./kbd-variants";
@@ -0,0 +1,3 @@
1
+ export { Kbd, Kbd as default, KbdGroup, kbdVariants, kbdGroupVariants } from "./kbd";
2
+ export { kbdVariantIds, kbdSizeIds } from "./kbd-variants";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/kbd/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,GAAG,IAAI,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAErF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const kbdVariantIds: readonly ["default", "outline", "solid", "subtle"];
2
+ export type KbdVariant = (typeof kbdVariantIds)[number];
3
+ export declare const kbdSizeIds: readonly ["sm", "md", "lg"];
4
+ export type KbdSize = (typeof kbdSizeIds)[number];
@@ -0,0 +1,8 @@
1
+ export const kbdVariantIds = [
2
+ "default",
3
+ "outline",
4
+ "solid",
5
+ "subtle",
6
+ ];
7
+ export const kbdSizeIds = ["sm", "md", "lg"];
8
+ //# sourceMappingURL=kbd-variants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kbd-variants.js","sourceRoot":"","sources":["../../../../src/components/ui/kbd/kbd-variants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,SAAS;IACT,SAAS;IACT,OAAO;IACP,QAAQ;CAC4B,CAAC;AAGvC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAsC,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import type { HTMLAttributes, ReactElement, ReactNode, Ref } from "react";
3
+ import { type KbdSize, type KbdVariant, kbdSizeIds, kbdVariantIds } from "./kbd-variants";
4
+ declare const kbdVariants: (props?: ({
5
+ variant?: "default" | "outline" | "solid" | "subtle" | null | undefined;
6
+ size?: "sm" | "lg" | "md" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ export interface KbdProps extends HTMLAttributes<HTMLElement>, VariantProps<typeof kbdVariants> {
9
+ ref?: Ref<HTMLElement>;
10
+ }
11
+ declare function Kbd({ className, variant, size, ref, ...props }: KbdProps): ReactElement;
12
+ declare namespace Kbd {
13
+ var displayName: string;
14
+ }
15
+ declare const kbdGroupVariants: (props?: ({
16
+ size?: "sm" | "lg" | "md" | null | undefined;
17
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
18
+ export interface KbdGroupProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof kbdGroupVariants> {
19
+ ref?: Ref<HTMLSpanElement>;
20
+ /**
21
+ * Optional separator rendered between children.
22
+ * Common values: "+", "·", "then"
23
+ */
24
+ separator?: ReactNode;
25
+ }
26
+ declare function KbdGroup({ className, size, separator, children, ref, ...props }: KbdGroupProps): ReactElement;
27
+ declare namespace KbdGroup {
28
+ var displayName: string;
29
+ }
30
+ export { Kbd, KbdGroup, kbdVariants, kbdGroupVariants, kbdSizeIds, kbdVariantIds };
31
+ export type { KbdSize, KbdVariant };
32
+ export default Kbd;
@@ -0,0 +1,55 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "../../../lib/utils";
5
+ import { kbdSizeIds, kbdVariantIds, } from "./kbd-variants";
6
+ const kbdVariants = cva("inline-flex items-center justify-center font-mono font-medium select-none whitespace-nowrap align-middle tracking-tight", {
7
+ variants: {
8
+ variant: {
9
+ default: "rounded border border-border bg-muted text-muted-foreground shadow-[inset_0_-1px_0_0_hsl(var(--border))]",
10
+ outline: "rounded border border-border bg-background text-foreground",
11
+ solid: "rounded border border-primary/20 bg-primary text-primary-foreground shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.2)]",
12
+ subtle: "rounded bg-muted/60 text-muted-foreground",
13
+ },
14
+ size: {
15
+ sm: "h-5 min-w-[1.25rem] px-1 text-[10px] leading-none",
16
+ md: "h-6 min-w-[1.5rem] px-1.5 text-xs leading-none",
17
+ lg: "h-7 min-w-[1.75rem] px-2 text-sm leading-none",
18
+ },
19
+ },
20
+ defaultVariants: {
21
+ variant: "default",
22
+ size: "md",
23
+ },
24
+ });
25
+ function Kbd({ className, variant, size, ref, ...props }) {
26
+ return (_jsx("kbd", { ref: ref, "data-slot": "kbd", className: cn(kbdVariants({ variant, size }), className), ...props }));
27
+ }
28
+ Kbd.displayName = "Kbd";
29
+ const kbdGroupVariants = cva("inline-flex items-center align-middle", {
30
+ variants: {
31
+ size: {
32
+ sm: "gap-0.5 text-[10px]",
33
+ md: "gap-1 text-xs",
34
+ lg: "gap-1.5 text-sm",
35
+ },
36
+ },
37
+ defaultVariants: {
38
+ size: "md",
39
+ },
40
+ });
41
+ function KbdGroup({ className, size, separator, children, ref, ...props }) {
42
+ if (separator === undefined) {
43
+ return (_jsx("span", { ref: ref, "data-slot": "kbd-group", className: cn(kbdGroupVariants({ size }), className), ...props, children: children }));
44
+ }
45
+ const items = Array.isArray(children) ? children : [children];
46
+ const visible = items.filter((c) => c !== null && c !== undefined && c !== false);
47
+ return (_jsx("span", { ref: ref, "data-slot": "kbd-group", className: cn(kbdGroupVariants({ size }), className), ...props, children: visible.map((child, idx) => {
48
+ const isLast = idx === visible.length - 1;
49
+ return (_jsxs("span", { className: "inline-flex items-center gap-1", children: [child, !isLast ? (_jsx("span", { "aria-hidden": "true", className: "text-muted-foreground/70 select-none", children: separator })) : null] }, idx));
50
+ }) }));
51
+ }
52
+ KbdGroup.displayName = "KbdGroup";
53
+ export { Kbd, KbdGroup, kbdVariants, kbdGroupVariants, kbdSizeIds, kbdVariantIds };
54
+ export default Kbd;
55
+ //# sourceMappingURL=kbd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kbd.js","sourceRoot":"","sources":["../../../../src/components/ui/kbd/kbd.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAGL,UAAU,EACV,aAAa,GACd,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,GAAG,GAAG,CACrB,yHAAyH,EACzH;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,0GAA0G;YAC5G,OAAO,EACL,4DAA4D;YAC9D,KAAK,EACH,+GAA+G;YACjH,MAAM,EACJ,2C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AAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAC1B,CAAC,CAAC,EAA8B,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,KAAK,CAChF,CAAC;IAEF,OAAO,CACL,eACE,GAAG,EAAE,GAAG,eACE,WAAW,EACrB,SAAS,EAAE,EAAE,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,KAChD,KAAK,YAER,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;YAC1B,MAAM,MAAM,GAAG,GAAG,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;YAC1C,OAAO,CACL,gBAAgB,SAAS,EAAC,gCAAgC,aACvD,KAAK,EACL,CAAC,MAAM,CAAC,CAAC,CAAC,CACT,8BACc,MAAM,EAClB,SAAS,EAAC,sCAAsC,YAE/C,SAAS,GACL,CACR,CAAC,CAAC,CAAC,IAAI,KATC,GAAG,CAUP,CACR,CAAC;QACJ,CAAC,CAAC,GACG,CACR,CAAC;AACJ,CAAC;AACD,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC;AAGnF,eAAe,GAAG,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schemavaults/ui",
3
- "version": "0.14.12",
3
+ "version": "0.15.0",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "description": "React.js UI components for SchemaVaults frontend applications",