@toolr/ui-design 0.1.4 → 0.1.5
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/components/sections/prompt-editor/tabbed-prompt-editor.tsx +3 -3
- package/components/ui/input.tsx +2 -2
- package/components/ui/nav-card.tsx +16 -9
- package/components/ui/registry-browser.tsx +2 -2
- package/dist/index.d.ts +13 -3
- package/dist/index.js +14 -12
- package/dist/tokens/semantic.css +1 -1
- package/package.json +1 -1
- package/tokens/semantic.css +1 -1
|
@@ -204,10 +204,10 @@ export function TabbedPromptEditor({
|
|
|
204
204
|
style.id = styleId
|
|
205
205
|
style.textContent = `
|
|
206
206
|
.template-variable-highlight {
|
|
207
|
-
background-color: rgba(
|
|
208
|
-
border: 1px solid rgba(
|
|
207
|
+
background-color: rgba(129, 140, 248, 0.2);
|
|
208
|
+
border: 1px solid rgba(129, 140, 248, 0.4);
|
|
209
209
|
border-radius: 3px;
|
|
210
|
-
color:
|
|
210
|
+
color: rgb(129, 140, 248) !important;
|
|
211
211
|
font-weight: 500;
|
|
212
212
|
}
|
|
213
213
|
`
|
package/components/ui/input.tsx
CHANGED
|
@@ -183,13 +183,13 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(function Input({
|
|
|
183
183
|
{debounceMs > 0 && debounceKey > 0 && (
|
|
184
184
|
<svg
|
|
185
185
|
key={debounceKey}
|
|
186
|
-
className="absolute inset-0 pointer-events-none"
|
|
186
|
+
className="absolute inset-0 pointer-events-none text-emerald-400/70"
|
|
187
187
|
style={{ width: '100%', height: '100%' }}
|
|
188
188
|
>
|
|
189
189
|
<rect
|
|
190
190
|
x="1" y="1" rx="5" ry="5"
|
|
191
191
|
fill="none"
|
|
192
|
-
stroke="
|
|
192
|
+
stroke="currentColor"
|
|
193
193
|
strokeWidth="1.5"
|
|
194
194
|
pathLength="100"
|
|
195
195
|
strokeDasharray="100"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Navigation card with icon, description,
|
|
1
|
+
/** Navigation card with icon, description, label, and hover lift effect. */
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
Settings, Puzzle, Zap, Shield, Folder, Code, Database, Globe,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from 'lucide-react'
|
|
8
8
|
import type { LucideIcon } from 'lucide-react'
|
|
9
9
|
import type { IconName } from './icon-button.tsx'
|
|
10
|
-
import {
|
|
10
|
+
import { Label, type LabelColor } from './label.tsx'
|
|
11
11
|
import { cn } from '../lib/cn.ts'
|
|
12
12
|
|
|
13
13
|
const iconSubset: Partial<Record<IconName, LucideIcon>> = {
|
|
@@ -23,9 +23,11 @@ export interface NavCardProps {
|
|
|
23
23
|
title: string
|
|
24
24
|
description?: string
|
|
25
25
|
icon?: IconName
|
|
26
|
+
/** Custom icon component. Takes precedence over icon name. */
|
|
27
|
+
IconComponent?: React.ComponentType<{ className?: string }>
|
|
26
28
|
iconColor?: string
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
label?: { text: string; color: LabelColor; tooltip: { description: string } }
|
|
30
|
+
stats?: string
|
|
29
31
|
onClick?: () => void
|
|
30
32
|
disabled?: boolean
|
|
31
33
|
className?: string
|
|
@@ -35,14 +37,15 @@ export function NavCard({
|
|
|
35
37
|
title,
|
|
36
38
|
description,
|
|
37
39
|
icon,
|
|
40
|
+
IconComponent,
|
|
38
41
|
iconColor = '#60a5fa',
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
label,
|
|
43
|
+
stats,
|
|
41
44
|
onClick,
|
|
42
45
|
disabled = false,
|
|
43
46
|
className,
|
|
44
47
|
}: NavCardProps) {
|
|
45
|
-
const Icon = icon ? iconSubset[icon] : undefined
|
|
48
|
+
const Icon = IconComponent ?? (icon ? iconSubset[icon] : undefined)
|
|
46
49
|
|
|
47
50
|
return (
|
|
48
51
|
<button
|
|
@@ -56,9 +59,9 @@ export function NavCard({
|
|
|
56
59
|
className,
|
|
57
60
|
)}
|
|
58
61
|
>
|
|
59
|
-
{
|
|
62
|
+
{label && (
|
|
60
63
|
<span className="absolute top-3 right-3">
|
|
61
|
-
<
|
|
64
|
+
<Label text={label.text} color={label.color} size="xs" tooltip={label.tooltip} />
|
|
62
65
|
</span>
|
|
63
66
|
)}
|
|
64
67
|
|
|
@@ -76,6 +79,10 @@ export function NavCard({
|
|
|
76
79
|
{description && (
|
|
77
80
|
<p className="mt-1 text-xs text-neutral-500 leading-relaxed line-clamp-2">{description}</p>
|
|
78
81
|
)}
|
|
82
|
+
|
|
83
|
+
{stats && (
|
|
84
|
+
<p className="mt-2 text-xs text-neutral-600">{stats}</p>
|
|
85
|
+
)}
|
|
79
86
|
</button>
|
|
80
87
|
)
|
|
81
88
|
}
|
|
@@ -172,13 +172,13 @@ export function RegistryBrowser({
|
|
|
172
172
|
{debounceKey != null && debounceKey > 0 && (
|
|
173
173
|
<svg
|
|
174
174
|
key={debounceKey}
|
|
175
|
-
className="absolute inset-0 pointer-events-none"
|
|
175
|
+
className="absolute inset-0 pointer-events-none text-emerald-400/70"
|
|
176
176
|
style={{ width: '100%', height: '100%' }}
|
|
177
177
|
>
|
|
178
178
|
<rect
|
|
179
179
|
x="1" y="1" rx="5" ry="5"
|
|
180
180
|
fill="none"
|
|
181
|
-
stroke="
|
|
181
|
+
stroke="currentColor"
|
|
182
182
|
strokeWidth="1.5"
|
|
183
183
|
pathLength="100"
|
|
184
184
|
strokeDasharray="100"
|
package/dist/index.d.ts
CHANGED
|
@@ -2587,14 +2587,24 @@ interface NavCardProps {
|
|
|
2587
2587
|
title: string;
|
|
2588
2588
|
description?: string;
|
|
2589
2589
|
icon?: IconName;
|
|
2590
|
+
/** Custom icon component. Takes precedence over icon name. */
|
|
2591
|
+
IconComponent?: React.ComponentType<{
|
|
2592
|
+
className?: string;
|
|
2593
|
+
}>;
|
|
2590
2594
|
iconColor?: string;
|
|
2591
|
-
|
|
2592
|
-
|
|
2595
|
+
label?: {
|
|
2596
|
+
text: string;
|
|
2597
|
+
color: LabelColor;
|
|
2598
|
+
tooltip: {
|
|
2599
|
+
description: string;
|
|
2600
|
+
};
|
|
2601
|
+
};
|
|
2602
|
+
stats?: string;
|
|
2593
2603
|
onClick?: () => void;
|
|
2594
2604
|
disabled?: boolean;
|
|
2595
2605
|
className?: string;
|
|
2596
2606
|
}
|
|
2597
|
-
declare function NavCard({ title, description, icon, iconColor,
|
|
2607
|
+
declare function NavCard({ title, description, icon, IconComponent, iconColor, label, stats, onClick, disabled, className, }: NavCardProps): react_jsx_runtime.JSX.Element;
|
|
2598
2608
|
|
|
2599
2609
|
interface ExtensionListCardProps {
|
|
2600
2610
|
/** Lucide icon component */
|
package/dist/index.js
CHANGED
|
@@ -1295,7 +1295,7 @@ var Input = forwardRef(function Input2({
|
|
|
1295
1295
|
debounceMs > 0 && debounceKey > 0 && /* @__PURE__ */ jsx10(
|
|
1296
1296
|
"svg",
|
|
1297
1297
|
{
|
|
1298
|
-
className: "absolute inset-0 pointer-events-none",
|
|
1298
|
+
className: "absolute inset-0 pointer-events-none text-emerald-400/70",
|
|
1299
1299
|
style: { width: "100%", height: "100%" },
|
|
1300
1300
|
children: /* @__PURE__ */ jsx10(
|
|
1301
1301
|
"rect",
|
|
@@ -1305,7 +1305,7 @@ var Input = forwardRef(function Input2({
|
|
|
1305
1305
|
rx: "5",
|
|
1306
1306
|
ry: "5",
|
|
1307
1307
|
fill: "none",
|
|
1308
|
-
stroke: "
|
|
1308
|
+
stroke: "currentColor",
|
|
1309
1309
|
strokeWidth: "1.5",
|
|
1310
1310
|
pathLength: "100",
|
|
1311
1311
|
strokeDasharray: "100",
|
|
@@ -4822,7 +4822,7 @@ function RegistryBrowser({
|
|
|
4822
4822
|
debounceKey != null && debounceKey > 0 && /* @__PURE__ */ jsx32(
|
|
4823
4823
|
"svg",
|
|
4824
4824
|
{
|
|
4825
|
-
className: "absolute inset-0 pointer-events-none",
|
|
4825
|
+
className: "absolute inset-0 pointer-events-none text-emerald-400/70",
|
|
4826
4826
|
style: { width: "100%", height: "100%" },
|
|
4827
4827
|
children: /* @__PURE__ */ jsx32(
|
|
4828
4828
|
"rect",
|
|
@@ -4832,7 +4832,7 @@ function RegistryBrowser({
|
|
|
4832
4832
|
rx: "5",
|
|
4833
4833
|
ry: "5",
|
|
4834
4834
|
fill: "none",
|
|
4835
|
-
stroke: "
|
|
4835
|
+
stroke: "currentColor",
|
|
4836
4836
|
strokeWidth: "1.5",
|
|
4837
4837
|
pathLength: "100",
|
|
4838
4838
|
strokeDasharray: "100",
|
|
@@ -8864,10 +8864,10 @@ ${varInfo.description}${varInfo.example ? `
|
|
|
8864
8864
|
style.id = styleId;
|
|
8865
8865
|
style.textContent = `
|
|
8866
8866
|
.template-variable-highlight {
|
|
8867
|
-
background-color: rgba(
|
|
8868
|
-
border: 1px solid rgba(
|
|
8867
|
+
background-color: rgba(129, 140, 248, 0.2);
|
|
8868
|
+
border: 1px solid rgba(129, 140, 248, 0.4);
|
|
8869
8869
|
border-radius: 3px;
|
|
8870
|
-
color:
|
|
8870
|
+
color: rgb(129, 140, 248) !important;
|
|
8871
8871
|
font-weight: 500;
|
|
8872
8872
|
}
|
|
8873
8873
|
`;
|
|
@@ -10850,14 +10850,15 @@ function NavCard({
|
|
|
10850
10850
|
title,
|
|
10851
10851
|
description,
|
|
10852
10852
|
icon,
|
|
10853
|
+
IconComponent,
|
|
10853
10854
|
iconColor = "#60a5fa",
|
|
10854
|
-
|
|
10855
|
-
|
|
10855
|
+
label,
|
|
10856
|
+
stats,
|
|
10856
10857
|
onClick,
|
|
10857
10858
|
disabled = false,
|
|
10858
10859
|
className
|
|
10859
10860
|
}) {
|
|
10860
|
-
const Icon = icon ? iconSubset6[icon] : void 0;
|
|
10861
|
+
const Icon = IconComponent ?? (icon ? iconSubset6[icon] : void 0);
|
|
10861
10862
|
return /* @__PURE__ */ jsxs51(
|
|
10862
10863
|
"button",
|
|
10863
10864
|
{
|
|
@@ -10871,7 +10872,7 @@ function NavCard({
|
|
|
10871
10872
|
className
|
|
10872
10873
|
),
|
|
10873
10874
|
children: [
|
|
10874
|
-
|
|
10875
|
+
label && /* @__PURE__ */ jsx57("span", { className: "absolute top-3 right-3", children: /* @__PURE__ */ jsx57(Label, { text: label.text, color: label.color, size: "xs", tooltip: label.tooltip }) }),
|
|
10875
10876
|
Icon && /* @__PURE__ */ jsx57(
|
|
10876
10877
|
"div",
|
|
10877
10878
|
{
|
|
@@ -10881,7 +10882,8 @@ function NavCard({
|
|
|
10881
10882
|
}
|
|
10882
10883
|
),
|
|
10883
10884
|
/* @__PURE__ */ jsx57("h3", { className: "text-sm font-medium text-neutral-200", children: title }),
|
|
10884
|
-
description && /* @__PURE__ */ jsx57("p", { className: "mt-1 text-xs text-neutral-500 leading-relaxed line-clamp-2", children: description })
|
|
10885
|
+
description && /* @__PURE__ */ jsx57("p", { className: "mt-1 text-xs text-neutral-500 leading-relaxed line-clamp-2", children: description }),
|
|
10886
|
+
stats && /* @__PURE__ */ jsx57("p", { className: "mt-2 text-xs text-neutral-600", children: stats })
|
|
10885
10887
|
]
|
|
10886
10888
|
}
|
|
10887
10889
|
);
|
package/dist/tokens/semantic.css
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
--surface-hover: var(--color-neutral-750);
|
|
22
22
|
|
|
23
23
|
/* Dialog backdrop: modal/dialog overlays */
|
|
24
|
-
--dialog-backdrop: rgba(0, 0, 0, 0.
|
|
24
|
+
--dialog-backdrop: rgba(0, 0, 0, 0.95);
|
|
25
25
|
|
|
26
26
|
/* Popover: floating panels, dropdown menus */
|
|
27
27
|
--popover: rgba(0, 0, 0, 0.8);
|
package/package.json
CHANGED
package/tokens/semantic.css
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
--surface-hover: var(--color-neutral-750);
|
|
22
22
|
|
|
23
23
|
/* Dialog backdrop: modal/dialog overlays */
|
|
24
|
-
--dialog-backdrop: rgba(0, 0, 0, 0.
|
|
24
|
+
--dialog-backdrop: rgba(0, 0, 0, 0.95);
|
|
25
25
|
|
|
26
26
|
/* Popover: floating panels, dropdown menus */
|
|
27
27
|
--popover: rgba(0, 0, 0, 0.8);
|