@schemavaults/ui 0.79.3 → 0.80.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.
@@ -148,6 +148,8 @@ export * from "./number-input";
148
148
  export type * from "./number-input";
149
149
  export * from "./code-block";
150
150
  export type * from "./code-block";
151
+ export * from "./snippet";
152
+ export type * from "./snippet";
151
153
  export * from "./secret-reveal";
152
154
  export type * from "./secret-reveal";
153
155
  export * from "./json-viewer";
@@ -73,6 +73,7 @@ export * from "./timeline";
73
73
  export * from "./rating";
74
74
  export * from "./number-input";
75
75
  export * from "./code-block";
76
+ export * from "./snippet";
76
77
  export * from "./secret-reveal";
77
78
  export * from "./json-viewer";
78
79
  export * from "./diff-viewer";
@@ -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,eAAe,CAAC;AAG9B,cAAc,SAAS,CAAC;AAGxB,cAAc,WAAW,CAAC;AAG1B,cAAc,cAAc,CAAC;AAG7B,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,mBAAmB,CAAC;AAGlC,cAAc,QAAQ,CAAC;AAGvB,cAAc,QAAQ,CAAC;AAGvB,cAAc,aAAa,CAAC;AAG5B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,WAAW,CAAC;AAG1B,cAA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AGhC,cAAc,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { Snippet, Snippet as default, snippetVariants, } from "./snippet";
2
+ export type { SnippetProps } from "./snippet";
3
+ export { snippetSizeIds, snippetSymbolGlyphs, snippetSymbolIds, snippetVariantIds, } from "./snippet-variants";
4
+ export type { SnippetSize, SnippetSymbol, SnippetVariant, } from "./snippet-variants";
@@ -0,0 +1,3 @@
1
+ export { Snippet, Snippet as default, snippetVariants, } from "./snippet";
2
+ export { snippetSizeIds, snippetSymbolGlyphs, snippetSymbolIds, snippetVariantIds, } from "./snippet-variants";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/snippet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,OAAO,IAAI,OAAO,EAClB,eAAe,GAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,26 @@
1
+ export declare const snippetVariantIds: readonly ["default", "terminal", "subtle", "contrast", "brand"];
2
+ export type SnippetVariant = (typeof snippetVariantIds)[number];
3
+ export declare const snippetSizeIds: readonly ["sm", "md", "lg"];
4
+ export type SnippetSize = (typeof snippetSizeIds)[number];
5
+ /**
6
+ * Built-in symbol presets that render before the snippet value. Useful for
7
+ * conveying the context of a single-line command (e.g. a shell prompt or a
8
+ * package-manager binary name).
9
+ */
10
+ export declare const snippetSymbolIds: readonly ["dollar", "angle", "percent", "hash", "npm", "bun", "pnpm", "yarn", "git", "python", "node", "psql", "sql"];
11
+ export type SnippetSymbol = (typeof snippetSymbolIds)[number];
12
+ export declare const snippetSymbolGlyphs: {
13
+ readonly dollar: "$";
14
+ readonly angle: ">";
15
+ readonly percent: "%";
16
+ readonly hash: "#";
17
+ readonly npm: "npm";
18
+ readonly bun: "bun";
19
+ readonly pnpm: "pnpm";
20
+ readonly yarn: "yarn";
21
+ readonly git: "git";
22
+ readonly python: ">>>";
23
+ readonly node: "node";
24
+ readonly psql: "=#";
25
+ readonly sql: "SQL>";
26
+ };
@@ -0,0 +1,44 @@
1
+ export const snippetVariantIds = [
2
+ "default",
3
+ "terminal",
4
+ "subtle",
5
+ "contrast",
6
+ "brand",
7
+ ];
8
+ export const snippetSizeIds = ["sm", "md", "lg"];
9
+ /**
10
+ * Built-in symbol presets that render before the snippet value. Useful for
11
+ * conveying the context of a single-line command (e.g. a shell prompt or a
12
+ * package-manager binary name).
13
+ */
14
+ export const snippetSymbolIds = [
15
+ "dollar",
16
+ "angle",
17
+ "percent",
18
+ "hash",
19
+ "npm",
20
+ "bun",
21
+ "pnpm",
22
+ "yarn",
23
+ "git",
24
+ "python",
25
+ "node",
26
+ "psql",
27
+ "sql",
28
+ ];
29
+ export const snippetSymbolGlyphs = {
30
+ dollar: "$",
31
+ angle: ">",
32
+ percent: "%",
33
+ hash: "#",
34
+ npm: "npm",
35
+ bun: "bun",
36
+ pnpm: "pnpm",
37
+ yarn: "yarn",
38
+ git: "git",
39
+ python: ">>>",
40
+ node: "node",
41
+ psql: "=#",
42
+ sql: "SQL>",
43
+ };
44
+ //# sourceMappingURL=snippet-variants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snippet-variants.js","sourceRoot":"","sources":["../../../../src/components/ui/snippet/snippet-variants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,SAAS;IACT,UAAU;IACV,QAAQ;IACR,UAAU;IACV,OAAO;CAC6B,CAAC;AAGvC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAsC,CAAC;AAGtF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ;IACR,OAAO;IACP,SAAS;IACT,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,QAAQ;IACR,MAAM;IACN,MAAM;IACN,KAAK;CAC+B,CAAC;AAGvC,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,MAAM,EAAE,GAAG;IACX,KAAK,EAAE,GAAG;IACV,OAAO,EAAE,GAAG;IACZ,IAAI,EAAE,GAAG;IACT,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,IAAI;IACV,GAAG,EAAE,MAAM;CACqC,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import { type HTMLAttributes, type ReactElement, type Ref } from "react";
3
+ import { snippetSizeIds, snippetSymbolGlyphs, snippetSymbolIds, snippetVariantIds, type SnippetSize, type SnippetSymbol, type SnippetVariant } from "./snippet-variants";
4
+ declare const snippetContainerVariants: (props?: ({
5
+ variant?: "default" | "subtle" | "terminal" | "brand" | "contrast" | null | undefined;
6
+ size?: "sm" | "lg" | "md" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ export interface SnippetProps extends Omit<HTMLAttributes<HTMLDivElement>, "children">, VariantProps<typeof snippetContainerVariants> {
9
+ /**
10
+ * The command or single-line value to display. This is also what gets copied
11
+ * to the clipboard unless `copyValue` is provided.
12
+ */
13
+ value: string;
14
+ /**
15
+ * Override the value that gets copied to the clipboard. Use this when the
16
+ * visible value differs from what should actually land on the clipboard
17
+ * (e.g. show `npm install foo` but copy `npm install foo --save-exact`).
18
+ */
19
+ copyValue?: string;
20
+ /**
21
+ * Prefix symbol shown before the value. Pass one of the built-in IDs
22
+ * (e.g. `"dollar"`, `"bun"`, `"git"`) or an arbitrary string to render a
23
+ * custom prompt. Pass `false` to hide the prefix entirely. Defaults to
24
+ * `"dollar"` (`"$"`).
25
+ */
26
+ symbol?: SnippetSymbol | (string & {}) | boolean;
27
+ /**
28
+ * Hide the built-in copy button. Defaults to `false`.
29
+ */
30
+ hideCopyButton?: boolean;
31
+ /**
32
+ * Accessible label for the copy button. Defaults to
33
+ * `"Copy snippet to clipboard"`.
34
+ */
35
+ copyAriaLabel?: string;
36
+ ref?: Ref<HTMLDivElement>;
37
+ }
38
+ declare function Snippet({ value, copyValue, symbol, variant, size, hideCopyButton, copyAriaLabel, className, ref, ...props }: SnippetProps): ReactElement;
39
+ declare namespace Snippet {
40
+ var displayName: string;
41
+ }
42
+ export { Snippet, snippetContainerVariants as snippetVariants, snippetSizeIds, snippetSymbolGlyphs, snippetSymbolIds, snippetVariantIds, };
43
+ export type { SnippetSize, SnippetSymbol, SnippetVariant };
44
+ export default Snippet;
@@ -0,0 +1,69 @@
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 { CopyButton } from "../../ui/copy-button";
6
+ import { snippetSizeIds, snippetSymbolGlyphs, snippetSymbolIds, snippetVariantIds, } from "./snippet-variants";
7
+ const snippetContainerVariants = cva("group/snippet inline-flex w-full max-w-full items-center overflow-hidden rounded-md border font-mono transition-colors", {
8
+ variants: {
9
+ variant: {
10
+ default: "border-border bg-muted text-foreground",
11
+ terminal: "border-zinc-800 bg-zinc-950 text-zinc-100 dark:border-zinc-700",
12
+ subtle: "border-transparent bg-muted/60 text-muted-foreground",
13
+ contrast: "border-foreground/10 bg-foreground text-background",
14
+ brand: "border-schemavaults-brand-blue/30 bg-schemavaults-brand-blue/10 text-foreground",
15
+ },
16
+ size: {
17
+ sm: "h-7 gap-1.5 pl-2 pr-1 text-xs",
18
+ md: "h-9 gap-2 pl-3 pr-1.5 text-sm",
19
+ lg: "h-11 gap-2.5 pl-4 pr-2 text-base",
20
+ },
21
+ },
22
+ defaultVariants: {
23
+ variant: "default",
24
+ size: "md",
25
+ },
26
+ });
27
+ const snippetSymbolVariants = cva("select-none font-mono leading-none", {
28
+ variants: {
29
+ variant: {
30
+ default: "text-muted-foreground",
31
+ terminal: "text-emerald-400",
32
+ subtle: "text-muted-foreground/80",
33
+ contrast: "text-background/60",
34
+ brand: "text-schemavaults-brand-blue",
35
+ },
36
+ },
37
+ defaultVariants: {
38
+ variant: "default",
39
+ },
40
+ });
41
+ const snippetCopyButtonSizeByContainer = {
42
+ sm: "icon-sm",
43
+ md: "icon-sm",
44
+ lg: "icon-md",
45
+ };
46
+ function resolveSymbolText(symbol) {
47
+ if (symbol === undefined || symbol === null)
48
+ return snippetSymbolGlyphs.dollar;
49
+ if (symbol === false)
50
+ return null;
51
+ if (symbol === true)
52
+ return snippetSymbolGlyphs.dollar;
53
+ if (snippetSymbolIds.includes(symbol)) {
54
+ return snippetSymbolGlyphs[symbol];
55
+ }
56
+ return symbol;
57
+ }
58
+ function Snippet({ value, copyValue, symbol, variant, size, hideCopyButton = false, copyAriaLabel = "Copy snippet to clipboard", className, ref, ...props }) {
59
+ const symbolText = resolveSymbolText(symbol);
60
+ const effectiveCopyValue = copyValue ?? value;
61
+ const resolvedVariant = variant ?? "default";
62
+ const resolvedSize = size ?? "md";
63
+ const copyButtonSize = snippetCopyButtonSizeByContainer[resolvedSize];
64
+ return (_jsxs("div", { ref: ref, "data-slot": "snippet", "data-variant": resolvedVariant, "data-size": resolvedSize, className: cn(snippetContainerVariants({ variant, size }), className), ...props, children: [symbolText !== null ? (_jsx("span", { "aria-hidden": "true", "data-slot": "snippet-symbol", className: snippetSymbolVariants({ variant }), children: symbolText })) : null, _jsx("span", { "data-slot": "snippet-value", className: "min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap leading-none", title: value, children: value }), hideCopyButton ? null : (_jsx(CopyButton, { "data-slot": "snippet-copy-button", value: effectiveCopyValue, size: copyButtonSize, variant: "ghost", ariaLabel: copyAriaLabel, className: "shrink-0" }))] }));
65
+ }
66
+ Snippet.displayName = "Snippet";
67
+ export { Snippet, snippetContainerVariants as snippetVariants, snippetSizeIds, snippetSymbolGlyphs, snippetSymbolIds, snippetVariantIds, };
68
+ export default Snippet;
69
+ //# sourceMappingURL=snippet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snippet.js","sourceRoot":"","sources":["../../../../src/components/ui/snippet/snippet.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAOlE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,UAAU,EAAuB,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,GAIlB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,wBAAwB,GAAG,GAAG,CAClC,wHAAwH,EACxH;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,wCAAwC;YACjD,QAAQ,EACN,gEAAgE;YAClE,MAAM,EACJ,sDAAsD;YACxD,QAAQ,EAAE,oDAAoD;YAC9D,KAAK,EACH,iFAAiF;SAC3C;QAC1C,IAAI,EAAE;YACJ,EAAE,EAAE,+BAA+B;YACnC,EAAE,EAAE,+BAA+B;YACnC,EAAE,EAAE,kCAAkC;SACD;KACxC;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,IAAI;KACX;CACF,CACF,CAAC;AAEF,MAAM,qBAAqB,GAAG,GAAG,CAC/B,oCAAoC,EACpC;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,uBAAuB;YAChC,QAAQ,EAAE,kBAAkB;YAC5B,MAAM,EAAE,0BAA0B;YAClC,QAAQ,EAAE,oBAAoB;YAC9B,KAAK,EAAE,8BAA8B;SACG;KAC3C;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAC;AAEF,MAAM,gC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AC,EAAE,OAAO,EAAE,CAAC,YAE5C,UAAU,GACN,CACR,CAAC,CAAC,CAAC,IAAI,EACR,4BACY,eAAe,EACzB,SAAS,EAAC,6EAA6E,EACvF,KAAK,EAAE,KAAK,YAEX,KAAK,GACD,EACN,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACvB,KAAC,UAAU,iBACC,qBAAqB,EAC/B,KAAK,EAAE,kBAAkB,EACzB,IAAI,EAAE,cAAc,EACpB,OAAO,EAAC,OAAO,EACf,SAAS,EAAE,aAAa,EACxB,SAAS,EAAC,UAAU,GACpB,CACH,IACG,CACP,CAAC;AACJ,CAAC;AACD,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEhC,OAAO,EACL,OAAO,EACP,wBAAwB,IAAI,eAAe,EAC3C,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,GAClB,CAAC;AAGF,eAAe,OAAO,CAAC"}
@@ -3,20 +3,20 @@ import type { ReactElement } from "react";
3
3
  declare const Tabs: import("react").ForwardRefExoticComponent<TabsPrimitive.TabsProps & import("react").RefAttributes<HTMLDivElement>>;
4
4
  export interface TabsListProps extends TabsPrimitive.TabsListProps {
5
5
  }
6
- declare function TabsList(props: TabsListProps): ReactElement;
6
+ declare function TabsList({ className, ...props }: TabsListProps): ReactElement;
7
7
  declare namespace TabsList {
8
8
  var displayName: string | undefined;
9
9
  }
10
10
  export interface TabsTriggerProps extends TabsPrimitive.TabsTriggerProps {
11
11
  className?: string;
12
12
  }
13
- declare function TabsTrigger(props: TabsTriggerProps): ReactElement;
13
+ declare function TabsTrigger({ className, ...props }: TabsTriggerProps): ReactElement;
14
14
  declare namespace TabsTrigger {
15
15
  var displayName: string | undefined;
16
16
  }
17
17
  export interface TabsContentProps extends TabsPrimitive.TabsContentProps {
18
18
  }
19
- declare function TabsContent(props: TabsContentProps): ReactElement;
19
+ declare function TabsContent({ className, ...props }: TabsContentProps): ReactElement;
20
20
  declare namespace TabsContent {
21
21
  var displayName: string | undefined;
22
22
  }
@@ -3,16 +3,16 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as TabsPrimitive from "@radix-ui/react-tabs";
4
4
  import { cn } from "../../../lib/utils";
5
5
  const Tabs = TabsPrimitive.Root;
6
- function TabsList(props) {
7
- return (_jsx(TabsPrimitive.List, { className: cn("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground", props.className), ...props }));
6
+ function TabsList({ className, ...props }) {
7
+ return (_jsx(TabsPrimitive.List, { className: cn("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground", className), ...props }));
8
8
  }
9
9
  TabsList.displayName = TabsPrimitive.List.displayName;
10
- function TabsTrigger(props) {
11
- return (_jsx(TabsPrimitive.Trigger, { className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow", props.className), ...props }));
10
+ function TabsTrigger({ className, ...props }) {
11
+ return (_jsx(TabsPrimitive.Trigger, { className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow", className), ...props }));
12
12
  }
13
13
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
14
- function TabsContent(props) {
15
- return (_jsx(TabsPrimitive.Content, { className: cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", props.className), ...props }));
14
+ function TabsContent({ className, ...props }) {
15
+ return (_jsx(TabsPrimitive.Content, { className: cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className), ...props }));
16
16
  }
17
17
  TabsContent.displayName = TabsPrimitive.Content.displayName;
18
18
  export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/components/ui/tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGjC,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC;AAIhC,SAAS,QAAQ,CAAC,KAAoB;IACpC,OAAO,CACL,KAAC,aAAa,CAAC,IAAI,IACjB,SAAS,EAAE,EAAE,CACX,2FAA2F,EAC3F,KAAK,CAAC,SAAS,CAChB,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AACD,QAAQ,CAAC,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;AAMtD,SAAS,WAAW,CAAC,KAAuB;IAC1C,OAAO,CACL,KAAC,aAAa,CAAC,OAAO,IACpB,SAAS,EAAE,EAAE,CACX,gYAAgY,EAChY,KAAK,CAAC,SAAS,CAChB,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AACD,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC;AAI5D,SAAS,WAAW,CAAC,KAAuB;IAC1C,OAAO,CACL,KAAC,aAAa,CAAC,OAAO,IACpB,SAAS,EAAE,EAAE,CACX,iIAAiI,EACjI,KAAK,CAAC,SAAS,CAChB,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AACD,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC;AAE5D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../../src/components/ui/tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGjC,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC;AAIhC,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiB;IACtD,OAAO,CACL,KAAC,aAAa,CAAC,IAAI,IACjB,SAAS,EAAE,EAAE,CACX,2FAA2F,EAC3F,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AACD,QAAQ,CAAC,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;AAMtD,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB;IAC5D,OAAO,CACL,KAAC,aAAa,CAAC,OAAO,IACpB,SAAS,EAAE,EAAE,CACX,gYAAgY,EAChY,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AACD,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC;AAI5D,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB;IAC5D,OAAO,CACL,KAAC,aAAa,CAAC,OAAO,IACpB,SAAS,EAAE,EAAE,CACX,iIAAiI,EACjI,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AACD,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC;AAE5D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schemavaults/ui",
3
- "version": "0.79.3",
3
+ "version": "0.80.0",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "description": "React.js UI components for SchemaVaults frontend applications",