@voyantjs/ui 0.16.0 → 0.17.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/confirm-action-button.d.ts +2 -1
- package/dist/components/confirm-action-button.d.ts.map +1 -1
- package/dist/components/confirm-action-button.js +2 -2
- package/dist/components/contract-template-authoring-help.d.ts +13 -1
- package/dist/components/contract-template-authoring-help.d.ts.map +1 -1
- package/dist/components/contract-template-authoring-help.js +3 -2
- package/dist/components/notification-template-authoring-help.d.ts +15 -1
- package/dist/components/notification-template-authoring-help.d.ts.map +1 -1
- package/dist/components/notification-template-authoring-help.js +3 -2
- package/dist/components/selection-action-bar.d.ts +3 -1
- package/dist/components/selection-action-bar.d.ts.map +1 -1
- package/dist/components/selection-action-bar.js +2 -2
- package/package.json +6 -5
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type * as React from "react";
|
|
2
2
|
import { Button } from "./button";
|
|
3
|
-
declare function ConfirmActionButton({ buttonLabel, confirmLabel, title, description, onConfirm, disabled, variant, confirmVariant, }: {
|
|
3
|
+
declare function ConfirmActionButton({ buttonLabel, confirmLabel, cancelLabel, title, description, onConfirm, disabled, variant, confirmVariant, }: {
|
|
4
4
|
buttonLabel: string;
|
|
5
5
|
confirmLabel: string;
|
|
6
|
+
cancelLabel?: string;
|
|
6
7
|
title: string;
|
|
7
8
|
description: React.ReactNode;
|
|
8
9
|
onConfirm: () => Promise<void> | void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-action-button.d.ts","sourceRoot":"","sources":["../../src/components/confirm-action-button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAanC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,iBAAS,mBAAmB,CAAC,EAC3B,WAAW,EACX,YAAY,EACZ,KAAK,EACL,WAAW,EACX,SAAS,EACT,QAAgB,EAChB,OAAmB,EACnB,cAA0B,GAC3B,EAAE;IACD,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAA;IACxD,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAA;CAChE,2CA0CA;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"confirm-action-button.d.ts","sourceRoot":"","sources":["../../src/components/confirm-action-button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAanC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,iBAAS,mBAAmB,CAAC,EAC3B,WAAW,EACX,YAAY,EACZ,WAAsB,EACtB,KAAK,EACL,WAAW,EACX,SAAS,EACT,QAAgB,EAChB,OAAmB,EACnB,cAA0B,GAC3B,EAAE;IACD,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAA;IACxD,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAA;CAChE,2CA0CA;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { Loader2 } from "lucide-react";
|
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from "./alert-dialog";
|
|
5
5
|
import { Button } from "./button";
|
|
6
|
-
function ConfirmActionButton({ buttonLabel, confirmLabel, title, description, onConfirm, disabled = false, variant = "outline", confirmVariant = "default", }) {
|
|
6
|
+
function ConfirmActionButton({ buttonLabel, confirmLabel, cancelLabel = "Cancel", title, description, onConfirm, disabled = false, variant = "outline", confirmVariant = "default", }) {
|
|
7
7
|
const [open, setOpen] = useState(false);
|
|
8
8
|
const [pending, setPending] = useState(false);
|
|
9
9
|
const handleConfirm = async () => {
|
|
@@ -16,6 +16,6 @@ function ConfirmActionButton({ buttonLabel, confirmLabel, title, description, on
|
|
|
16
16
|
setPending(false);
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
return (_jsxs(AlertDialog, { open: open, onOpenChange: setOpen, children: [_jsx(AlertDialogTrigger, { disabled: disabled || pending, render: _jsx(Button, { variant: variant, size: "sm" }), children: buttonLabel }), _jsxs(AlertDialogContent, { size: "sm", children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: title }), _jsx(AlertDialogDescription, { children: description })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { disabled: pending, children:
|
|
19
|
+
return (_jsxs(AlertDialog, { open: open, onOpenChange: setOpen, children: [_jsx(AlertDialogTrigger, { disabled: disabled || pending, render: _jsx(Button, { variant: variant, size: "sm" }), children: buttonLabel }), _jsxs(AlertDialogContent, { size: "sm", children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: title }), _jsx(AlertDialogDescription, { children: description })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { disabled: pending, children: cancelLabel }), _jsxs(AlertDialogAction, { variant: confirmVariant, disabled: pending, onClick: () => void handleConfirm(), children: [pending ? _jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : null, confirmLabel] })] })] })] }));
|
|
20
20
|
}
|
|
21
21
|
export { ConfirmActionButton };
|
|
@@ -26,7 +26,19 @@ type ContractTemplateAuthoringHelpProps = {
|
|
|
26
26
|
className?: string;
|
|
27
27
|
title?: string;
|
|
28
28
|
description?: string;
|
|
29
|
+
messages?: {
|
|
30
|
+
tabs?: {
|
|
31
|
+
variables?: string;
|
|
32
|
+
liquid?: string;
|
|
33
|
+
};
|
|
34
|
+
searchPlaceholder?: string;
|
|
35
|
+
noVariables?: string;
|
|
36
|
+
example?: string;
|
|
37
|
+
insert?: string;
|
|
38
|
+
liquidUsage?: string;
|
|
39
|
+
noLiquidSnippets?: string;
|
|
40
|
+
};
|
|
29
41
|
};
|
|
30
|
-
export declare function ContractTemplateAuthoringHelp({ variableGroups, snippets, onInsertVariable, onInsertSnippet, className, title, description, }: ContractTemplateAuthoringHelpProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare function ContractTemplateAuthoringHelp({ variableGroups, snippets, onInsertVariable, onInsertSnippet, className, title, description, messages, }: ContractTemplateAuthoringHelpProps): import("react/jsx-runtime").JSX.Element;
|
|
31
43
|
export {};
|
|
32
44
|
//# sourceMappingURL=contract-template-authoring-help.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-template-authoring-help.d.ts","sourceRoot":"","sources":["../../src/components/contract-template-authoring-help.tsx"],"names":[],"mappings":"AAYA,MAAM,MAAM,yBAAyB,GAAG;IACtC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,yBAAyB,EAAE,CAAA;CACvC,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,KAAK,kCAAkC,GAAG;IACxC,cAAc,EAAE,8BAA8B,EAAE,CAAA;IAChD,QAAQ,CAAC,EAAE,wBAAwB,EAAE,CAAA;IACrC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,yBAAyB,KAAK,IAAI,CAAA;IAChE,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAA;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"contract-template-authoring-help.d.ts","sourceRoot":"","sources":["../../src/components/contract-template-authoring-help.tsx"],"names":[],"mappings":"AAYA,MAAM,MAAM,yBAAyB,GAAG;IACtC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,yBAAyB,EAAE,CAAA;CACvC,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,KAAK,kCAAkC,GAAG;IACxC,cAAc,EAAE,8BAA8B,EAAE,CAAA;IAChD,QAAQ,CAAC,EAAE,wBAAwB,EAAE,CAAA;IACrC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,yBAAyB,KAAK,IAAI,CAAA;IAChE,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAA;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE;QACT,IAAI,CAAC,EAAE;YACL,SAAS,CAAC,EAAE,MAAM,CAAA;YAClB,MAAM,CAAC,EAAE,MAAM,CAAA;SAChB,CAAA;QACD,iBAAiB,CAAC,EAAE,MAAM,CAAA;QAC1B,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAC1B,CAAA;CACF,CAAA;AAMD,wBAAgB,6BAA6B,CAAC,EAC5C,cAAc,EACd,QAAa,EACb,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,KAA4B,EAC5B,WAAwH,EACxH,QAAQ,GACT,EAAE,kCAAkC,2CAiLpC"}
|
|
@@ -11,7 +11,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs";
|
|
|
11
11
|
function matchesSearch(haystack, query) {
|
|
12
12
|
return haystack.toLowerCase().includes(query);
|
|
13
13
|
}
|
|
14
|
-
export function ContractTemplateAuthoringHelp({ variableGroups, snippets = [], onInsertVariable, onInsertSnippet, className, title = "Template variables", description = "Templates render with Liquid. Use output tags for variables and control tags for loops and conditionals.", }) {
|
|
14
|
+
export function ContractTemplateAuthoringHelp({ variableGroups, snippets = [], onInsertVariable, onInsertSnippet, className, title = "Template variables", description = "Templates render with Liquid. Use output tags for variables and control tags for loops and conditionals.", messages, }) {
|
|
15
15
|
const [search, setSearch] = React.useState("");
|
|
16
16
|
const normalizedQuery = search.trim().toLowerCase();
|
|
17
17
|
const filteredGroups = React.useMemo(() => {
|
|
@@ -33,5 +33,6 @@ export function ContractTemplateAuthoringHelp({ variableGroups, snippets = [], o
|
|
|
33
33
|
}
|
|
34
34
|
return snippets.filter((snippet) => matchesSearch([snippet.label, snippet.description, snippet.code].filter(Boolean).join(" "), normalizedQuery));
|
|
35
35
|
}, [normalizedQuery, snippets]);
|
|
36
|
-
return (_jsxs("div", { className: cn("rounded-md border bg-muted/20", className), children: [_jsxs("div", { className: "flex flex-col gap-1 border-b px-4 py-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(SparklesIcon, { className: "h-4 w-4 text-muted-foreground" }), _jsx("h3", { className: "text-sm font-medium", children: title })] }), _jsx("p", { className: "text-xs text-muted-foreground", children: description })] }), _jsxs(Tabs, { defaultValue: "variables", className: "gap-3 p-4", children: [_jsxs(TabsList, { className: "w-full", children: [_jsx(TabsTrigger, { value: "variables", children: "Variables" }), _jsx(TabsTrigger, { value: "liquid", children: "Liquid" })] }), _jsxs("div", { className: "relative", children: [_jsx(SearchIcon, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }), _jsx(Input, { value: search, onChange: (event) => setSearch(event.target.value), placeholder: "Search variables or snippets...", className: "pl-9" })] }), _jsx(TabsContent, { value: "variables", children: _jsx(ScrollArea, { className: "h-80", children: _jsx("div", { className: "space-y-4 pr-3", children: filteredGroups.length === 0 ? (_jsx("p", { className: "text-sm text-muted-foreground", children: "No variables match this search." })) : (filteredGroups.map((group) => (_jsxs("section", { className: "space-y-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("h4", { className: "text-sm font-medium", children: group.label }), _jsx(Badge, { variant: "outline", children: group.variables.length })] }), group.description ? (_jsx("p", { className: "text-xs text-muted-foreground", children: group.description })) : null] }), _jsx("div", { className: "space-y-2", children: group.variables.map((variable) => (_jsx("div", { className: "rounded-md border bg-background p-3 shadow-xs", children: _jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("p", { className: "text-sm font-medium", children: variable.label }), _jsx(Badge, { variant: "outline", className: "font-normal", children: variable.type })] }), _jsx("code", { className: "rounded bg-muted px-1.5 py-0.5 font-mono text-xs", children: `{{ ${variable.key} }}` }), variable.description ? (_jsx("p", { className: "text-xs text-muted-foreground", children: variable.description })) : null, _jsxs("p", { className: "text-xs text-muted-foreground", children: ["Example:", " ", _jsx("span", { className: "font-mono text-foreground", children: variable.example })] })] }), onInsertVariable ? (_jsx(Button, { type: "button", size: "sm", variant: "outline", onClick: () => onInsertVariable(variable), children: "Insert" })) : null] }) }, variable.key))) })] }, group.id)))) }) }) }), _jsx(TabsContent, { value: "liquid", children: _jsx(ScrollArea, { className: "h-80", children: _jsxs("div", { className: "space-y-3 pr-3", children: [
|
|
36
|
+
return (_jsxs("div", { className: cn("rounded-md border bg-muted/20", className), children: [_jsxs("div", { className: "flex flex-col gap-1 border-b px-4 py-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(SparklesIcon, { className: "h-4 w-4 text-muted-foreground" }), _jsx("h3", { className: "text-sm font-medium", children: title })] }), _jsx("p", { className: "text-xs text-muted-foreground", children: description })] }), _jsxs(Tabs, { defaultValue: "variables", className: "gap-3 p-4", children: [_jsxs(TabsList, { className: "w-full", children: [_jsx(TabsTrigger, { value: "variables", children: messages?.tabs?.variables ?? "Variables" }), _jsx(TabsTrigger, { value: "liquid", children: messages?.tabs?.liquid ?? "Liquid" })] }), _jsxs("div", { className: "relative", children: [_jsx(SearchIcon, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }), _jsx(Input, { value: search, onChange: (event) => setSearch(event.target.value), placeholder: messages?.searchPlaceholder ?? "Search variables or snippets...", className: "pl-9" })] }), _jsx(TabsContent, { value: "variables", children: _jsx(ScrollArea, { className: "h-80", children: _jsx("div", { className: "space-y-4 pr-3", children: filteredGroups.length === 0 ? (_jsx("p", { className: "text-sm text-muted-foreground", children: messages?.noVariables ?? "No variables match this search." })) : (filteredGroups.map((group) => (_jsxs("section", { className: "space-y-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("h4", { className: "text-sm font-medium", children: group.label }), _jsx(Badge, { variant: "outline", children: group.variables.length })] }), group.description ? (_jsx("p", { className: "text-xs text-muted-foreground", children: group.description })) : null] }), _jsx("div", { className: "space-y-2", children: group.variables.map((variable) => (_jsx("div", { className: "rounded-md border bg-background p-3 shadow-xs", children: _jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("p", { className: "text-sm font-medium", children: variable.label }), _jsx(Badge, { variant: "outline", className: "font-normal", children: variable.type })] }), _jsx("code", { className: "rounded bg-muted px-1.5 py-0.5 font-mono text-xs", children: `{{ ${variable.key} }}` }), variable.description ? (_jsx("p", { className: "text-xs text-muted-foreground", children: variable.description })) : null, _jsxs("p", { className: "text-xs text-muted-foreground", children: [messages?.example ?? "Example", ":", " ", _jsx("span", { className: "font-mono text-foreground", children: variable.example })] })] }), onInsertVariable ? (_jsx(Button, { type: "button", size: "sm", variant: "outline", onClick: () => onInsertVariable(variable), children: messages?.insert ?? "Insert" })) : null] }) }, variable.key))) })] }, group.id)))) }) }) }), _jsx(TabsContent, { value: "liquid", children: _jsx(ScrollArea, { className: "h-80", children: _jsxs("div", { className: "space-y-3 pr-3", children: [_jsx("div", { className: "rounded-md border bg-background p-3 text-xs text-muted-foreground", children: messages?.liquidUsage ??
|
|
37
|
+
"Use {{ ... }} for output and {% ... %} for control flow." }), filteredSnippets.length === 0 ? (_jsx("p", { className: "text-sm text-muted-foreground", children: messages?.noLiquidSnippets ?? "No Liquid snippets match this search." })) : (filteredSnippets.map((snippet) => (_jsxs("div", { className: "rounded-md border bg-background p-3 shadow-xs", children: [_jsxs("div", { className: "mb-2 flex items-start justify-between gap-3", children: [_jsxs("div", { children: [_jsx("p", { className: "text-sm font-medium", children: snippet.label }), _jsx("p", { className: "text-xs text-muted-foreground", children: snippet.description })] }), onInsertSnippet ? (_jsx(Button, { type: "button", size: "sm", variant: "outline", onClick: () => onInsertSnippet(snippet), children: messages?.insert ?? "Insert" })) : null] }), _jsx("pre", { className: "whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-xs text-foreground", children: snippet.code })] }, snippet.id))))] }) }) })] })] }));
|
|
37
38
|
}
|
|
@@ -5,7 +5,21 @@ type NotificationTemplateAuthoringHelpProps = {
|
|
|
5
5
|
onInsertVariable?: (variable: NotificationTemplateVariableDefinition) => void;
|
|
6
6
|
onInsertSnippet?: (snippet: NotificationLiquidSnippet) => void;
|
|
7
7
|
className?: string;
|
|
8
|
+
messages?: {
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
tabs?: {
|
|
12
|
+
variables?: string;
|
|
13
|
+
liquid?: string;
|
|
14
|
+
};
|
|
15
|
+
searchPlaceholder?: string;
|
|
16
|
+
noVariables?: string;
|
|
17
|
+
example?: string;
|
|
18
|
+
insert?: string;
|
|
19
|
+
liquidUsage?: string;
|
|
20
|
+
noLiquidSnippets?: string;
|
|
21
|
+
};
|
|
8
22
|
};
|
|
9
|
-
export declare function NotificationTemplateAuthoringHelp({ variableGroups, snippets, onInsertVariable, onInsertSnippet, className, }: NotificationTemplateAuthoringHelpProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function NotificationTemplateAuthoringHelp({ variableGroups, snippets, onInsertVariable, onInsertSnippet, className, messages, }: NotificationTemplateAuthoringHelpProps): import("react/jsx-runtime").JSX.Element;
|
|
10
24
|
export {};
|
|
11
25
|
//# sourceMappingURL=notification-template-authoring-help.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-template-authoring-help.d.ts","sourceRoot":"","sources":["../../src/components/notification-template-authoring-help.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,yBAAyB,EACzB,oCAAoC,EACpC,sCAAsC,EACvC,MAAM,yBAAyB,CAAA;AAShC,KAAK,sCAAsC,GAAG;IAC5C,cAAc,EAAE,oCAAoC,EAAE,CAAA;IACtD,QAAQ,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACtC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,sCAAsC,KAAK,IAAI,CAAA;IAC7E,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,IAAI,CAAA;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"notification-template-authoring-help.d.ts","sourceRoot":"","sources":["../../src/components/notification-template-authoring-help.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,yBAAyB,EACzB,oCAAoC,EACpC,sCAAsC,EACvC,MAAM,yBAAyB,CAAA;AAShC,KAAK,sCAAsC,GAAG;IAC5C,cAAc,EAAE,oCAAoC,EAAE,CAAA;IACtD,QAAQ,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACtC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,sCAAsC,KAAK,IAAI,CAAA;IAC7E,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,IAAI,CAAA;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,IAAI,CAAC,EAAE;YACL,SAAS,CAAC,EAAE,MAAM,CAAA;YAClB,MAAM,CAAC,EAAE,MAAM,CAAA;SAChB,CAAA;QACD,iBAAiB,CAAC,EAAE,MAAM,CAAA;QAC1B,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAC1B,CAAA;CACF,CAAA;AAED,wBAAgB,iCAAiC,CAAC,EAChD,cAAc,EACd,QAAa,EACb,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,QAAQ,GACT,EAAE,sCAAsC,2CAkBxC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { ContractTemplateAuthoringHelp, } from "./contract-template-authoring-help";
|
|
4
|
-
export function NotificationTemplateAuthoringHelp({ variableGroups, snippets = [], onInsertVariable, onInsertSnippet, className, }) {
|
|
5
|
-
return (_jsx(ContractTemplateAuthoringHelp, { className: className, title: "Notification variables", description:
|
|
4
|
+
export function NotificationTemplateAuthoringHelp({ variableGroups, snippets = [], onInsertVariable, onInsertSnippet, className, messages, }) {
|
|
5
|
+
return (_jsx(ContractTemplateAuthoringHelp, { className: className, title: messages?.title ?? "Notification variables", description: messages?.description ??
|
|
6
|
+
"Notifications render with Liquid. Use variables for subject/body content and control tags for conditionals or loops.", messages: messages, variableGroups: variableGroups, snippets: snippets, onInsertVariable: onInsertVariable, onInsertSnippet: onInsertSnippet }));
|
|
6
7
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type * as React from "react";
|
|
2
|
-
declare function SelectionActionBar({ selectedCount, onClear, children, }: {
|
|
2
|
+
declare function SelectionActionBar({ selectedCount, onClear, selectionSummary, clearLabel, children, }: {
|
|
3
3
|
selectedCount: number;
|
|
4
4
|
onClear: () => void;
|
|
5
|
+
selectionSummary?: React.ReactNode;
|
|
6
|
+
clearLabel?: string;
|
|
5
7
|
children?: React.ReactNode;
|
|
6
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export { SelectionActionBar };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-action-bar.d.ts","sourceRoot":"","sources":["../../src/components/selection-action-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAInC,iBAAS,kBAAkB,CAAC,EAC1B,aAAa,EACb,OAAO,EACP,QAAQ,GACT,EAAE;IACD,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,
|
|
1
|
+
{"version":3,"file":"selection-action-bar.d.ts","sourceRoot":"","sources":["../../src/components/selection-action-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAInC,iBAAS,kBAAkB,CAAC,EAC1B,aAAa,EACb,OAAO,EACP,gBAAgB,EAChB,UAA8B,EAC9B,QAAQ,GACT,EAAE;IACD,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAClC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,2CAoBA;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from "./button";
|
|
3
3
|
import { Card, CardContent } from "./card";
|
|
4
|
-
function SelectionActionBar({ selectedCount, onClear, children, }) {
|
|
5
|
-
return (_jsx(Card, { size: "sm", children: _jsxs(CardContent, { className: "flex flex-col gap-3 py-1 md:flex-row md:items-center md:justify-between", children: [
|
|
4
|
+
function SelectionActionBar({ selectedCount, onClear, selectionSummary, clearLabel = "Clear Selection", children, }) {
|
|
5
|
+
return (_jsx(Card, { size: "sm", children: _jsxs(CardContent, { className: "flex flex-col gap-3 py-1 md:flex-row md:items-center md:justify-between", children: [_jsx("p", { className: "text-sm", children: selectionSummary ?? (_jsxs("span", { children: [_jsx("span", { className: "font-medium", children: selectedCount }), " selected"] })) }), _jsxs("div", { className: "flex items-center gap-2", children: [children, _jsx(Button, { variant: "outline", size: "sm", onClick: onClear, children: clearLabel })] })] }) }));
|
|
6
6
|
}
|
|
7
7
|
export { SelectionActionBar };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"license": "FSL-1.1-Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -34,10 +34,11 @@
|
|
|
34
34
|
"tailwind-merge": "^3.3.1",
|
|
35
35
|
"tw-animate-css": "^1.3.5",
|
|
36
36
|
"vaul": "^1.1.2",
|
|
37
|
-
"zod": "^3.
|
|
38
|
-
"@voyantjs/
|
|
39
|
-
"@voyantjs/
|
|
40
|
-
"@voyantjs/notifications
|
|
37
|
+
"zod": "^4.3.6",
|
|
38
|
+
"@voyantjs/i18n": "0.17.0",
|
|
39
|
+
"@voyantjs/notifications-react": "0.17.0",
|
|
40
|
+
"@voyantjs/notifications": "0.17.0",
|
|
41
|
+
"@voyantjs/utils": "0.17.0"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
44
|
"@tailwindcss/postcss": "^4.1.11",
|