@schandlergarcia/sf-web-components 1.0.16 → 1.0.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schandlergarcia/sf-web-components",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Reusable Salesforce web components library with Tailwind CSS v4 and shadcn/ui",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,15 +1,54 @@
1
- import { RocketLaunchIcon } from "@heroicons/react/24/outline";
2
- import { EmptyState } from '@schandlergarcia/sf-web-components';
1
+ import { useState } from "react";
2
+ import { UIInput, UIButton } from '@schandlergarcia/sf-web-components';
3
+ import { Search } from "lucide-react";
3
4
 
4
5
  export default function HomePage() {
6
+ const [searchQuery, setSearchQuery] = useState("");
7
+
8
+ const handleSearch = () => {
9
+ const trimmed = searchQuery.trim();
10
+ if (trimmed) {
11
+ console.log("Search:", trimmed);
12
+ // Navigate to your search results page
13
+ }
14
+ };
15
+
16
+ const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
17
+ if (e.key === "Enter") {
18
+ e.preventDefault();
19
+ handleSearch();
20
+ }
21
+ };
22
+
5
23
  return (
6
- <div className="flex min-h-screen items-center justify-center bg-slate-50 dark:bg-slate-950 transition-colors">
7
- <EmptyState
8
- size="lg"
9
- icon={<RocketLaunchIcon className="h-14 w-14" />}
10
- heading="Bespoke App Template"
11
- body="Component library loaded and ready to go."
12
- />
24
+ <div className="flex min-h-[80vh] items-center justify-center px-4 sm:px-6 lg:px-8 bg-slate-50 dark:bg-slate-950 transition-colors">
25
+ <div className="w-full max-w-4xl">
26
+ <div className="text-center mb-8">
27
+ <h1 className="text-4xl font-bold text-slate-900 dark:text-slate-50 mb-4">Search</h1>
28
+ <p className="text-lg text-slate-600 dark:text-slate-300">Find records across your organization.</p>
29
+ </div>
30
+ <div className="flex flex-col gap-4">
31
+ <div className="relative">
32
+ <Search className="absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-slate-400" />
33
+ <UIInput
34
+ type="text"
35
+ value={searchQuery}
36
+ onChange={(e) => setSearchQuery(e.target.value)}
37
+ onKeyDown={handleKeyDown}
38
+ placeholder="Search..."
39
+ className="pl-10 w-full"
40
+ />
41
+ </div>
42
+ <div className="flex gap-3 justify-center">
43
+ <UIButton onClick={handleSearch} variant="primary">
44
+ Search
45
+ </UIButton>
46
+ <UIButton onClick={() => console.log("Browse All")} variant="secondary">
47
+ Browse All
48
+ </UIButton>
49
+ </div>
50
+ </div>
51
+ </div>
13
52
  </div>
14
53
  );
15
54
  }