@altimateai/ui-components 0.0.52 → 0.0.53
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/CoachForm.css +1 -1
- package/dist/CoachForm.js +3 -3
- package/dist/Stack.js +27 -27
- package/dist/TagsInput.js +2450 -2407
- package/dist/index.js +1 -1
- package/dist/lineage/index.js +273 -273
- package/dist/main.js +75 -75
- package/dist/redux-toolkit.modern.js +1 -1
- package/dist/shadcn/index.d.ts +2 -1
- package/dist/shadcn/index.js +989 -1011
- package/dist/storybook/Combobox.stories.tsx +73 -0
- package/package.json +1 -1
|
@@ -9,6 +9,79 @@ export default {
|
|
|
9
9
|
component: Combobox,
|
|
10
10
|
} as Meta;
|
|
11
11
|
|
|
12
|
+
export const ComboboxSearchModeExample: StoryFn = () => {
|
|
13
|
+
const options = [
|
|
14
|
+
{ value: "react", label: "React" },
|
|
15
|
+
{ value: "vue", label: "Vue" },
|
|
16
|
+
{ value: "angular", label: "Angular" },
|
|
17
|
+
{ value: "svelte", label: "Svelte" },
|
|
18
|
+
{ value: "nextjs", label: "Next.js" },
|
|
19
|
+
{ value: "remix", label: "Remix" },
|
|
20
|
+
{ value: "gatsby", label: "Gatsby" },
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
const [searchModeValue, setSearchModeValue] = useState("");
|
|
24
|
+
const [normalModeValue, setNormalModeValue] = useState("");
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div className="al-flex al-flex-col al-gap-8 al-justify-start al-items-start">
|
|
28
|
+
<div className="al-flex al-flex-col al-gap-2">
|
|
29
|
+
<h3 className="al-text-lg al-font-medium">Search Mode Comparison</h3>
|
|
30
|
+
<p className="al-text-sm al-text-muted-foreground">
|
|
31
|
+
Compare search mode (shows input directly) with normal mode (shows button)
|
|
32
|
+
</p>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div className="al-flex al-flex-col al-gap-4">
|
|
36
|
+
<div className="al-flex al-flex-col al-gap-2">
|
|
37
|
+
<label className="al-text-sm al-font-medium">Search Mode (searchMode=true)</label>
|
|
38
|
+
<p className="al-text-xs al-text-muted-foreground">
|
|
39
|
+
Shows an input field directly. Click or focus to open dropdown.
|
|
40
|
+
</p>
|
|
41
|
+
<Combobox
|
|
42
|
+
options={options}
|
|
43
|
+
value={searchModeValue}
|
|
44
|
+
onChange={value => setSearchModeValue(value as string)}
|
|
45
|
+
placeholder="Search frameworks..."
|
|
46
|
+
searchMode={true}
|
|
47
|
+
/>
|
|
48
|
+
<div className="al-text-sm">Selected: {searchModeValue || "None"}</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div className="al-flex al-flex-col al-gap-2">
|
|
52
|
+
<label className="al-text-sm al-font-medium">Search Mode with Icon</label>
|
|
53
|
+
<p className="al-text-xs al-text-muted-foreground">Search mode with custom icon</p>
|
|
54
|
+
<Combobox
|
|
55
|
+
options={options}
|
|
56
|
+
value={searchModeValue}
|
|
57
|
+
onChange={value => setSearchModeValue(value as string)}
|
|
58
|
+
placeholder="Type to search..."
|
|
59
|
+
searchMode={true}
|
|
60
|
+
icon={<DatabaseIcon className="al-h-4 al-w-4" />}
|
|
61
|
+
buttonProps={{ className: "al-w-[300px]" }}
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div className="al-flex al-flex-col al-gap-2">
|
|
66
|
+
<label className="al-text-sm al-font-medium">Normal Mode (Default)</label>
|
|
67
|
+
<p className="al-text-xs al-text-muted-foreground">
|
|
68
|
+
Shows a button. Click to open dropdown with search inside.
|
|
69
|
+
</p>
|
|
70
|
+
<Combobox
|
|
71
|
+
options={options}
|
|
72
|
+
value={normalModeValue}
|
|
73
|
+
onChange={value => setNormalModeValue(value as string)}
|
|
74
|
+
placeholder="Select framework..."
|
|
75
|
+
searchMode={false}
|
|
76
|
+
buttonProps={{ className: "al-w-[300px]" }}
|
|
77
|
+
/>
|
|
78
|
+
<div className="al-text-sm">Selected: {normalModeValue || "None"}</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
12
85
|
export const ComboboxExample: StoryFn = () => {
|
|
13
86
|
const options = [
|
|
14
87
|
{ value: "react", label: "React" },
|