@schandlergarcia/sf-web-components 1.0.0 → 1.0.1

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.
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: outer-app
3
+ description: >-
4
+ Routing, layout, and conventions for the outer app (everything outside
5
+ /command-center). Use when working with app routes, auth, navigation,
6
+ shadcn components, or outer app pages.
7
+ ---
8
+
9
+ # Outer App (Non-Command-Center)
10
+
11
+ The outer app handles navigation, global search, and standard pages. It uses an entirely different UI stack from the command center.
12
+
13
+ ## UI Stack
14
+
15
+ - **Components:** shadcn/ui (`src/components/ui/`) — Radix UI primitives styled with CVA + Tailwind
16
+ - **Icons:** Lucide React (`lucide-react`) — NOT Heroicons
17
+ - **Utility:** `cn()` from `src/lib/utils.ts` (clsx + tailwind-merge)
18
+ - **Styling:** Tailwind CSS 4 + shadcn theme variables (oklch-based in `global.css`)
19
+ - **Language:** TypeScript (`.tsx`/`.ts`)
20
+
21
+ ## Routing
22
+
23
+ Routes defined in `src/routes.tsx` as `RouteObject[]`, consumed by `createBrowserRouter` in `src/app.tsx`.
24
+
25
+ Route tree:
26
+ - `/` — `AppLayout` (wraps all routes)
27
+ - `/` (index) — `Home` (renders `CommandCenter` — command center world)
28
+ - `/search` — Search page (global search input)
29
+ - `/test-acc` — Test ACC page
30
+ - `/global-search/:query` — Search results (Suspense-wrapped)
31
+ - `/object/:objectApiName/:recordId` — Detail page (Suspense-wrapped)
32
+ - `*` — `NotFound`
33
+
34
+ ### Adding a New Outer App Route
35
+
36
+ 1. Create page component in `src/pages/` or `src/features/*/pages/`
37
+ 2. Add route object in `src/routes.tsx` under the appropriate layout
38
+ 3. Set `handle: { showInNavigation: true, label: "..." }` if it should appear in the nav bar
39
+
40
+ ### Navigation
41
+
42
+ `AppLayout` (`src/appLayout.tsx`) auto-generates nav from routes with `handle.showInNavigation === true`. The nav uses React Router `<Link>` components.
43
+
44
+ ## shadcn/ui Components
45
+
46
+ Available in `src/components/ui/`: `alert`, `button`, `card`, `dialog`, `field`, `input`, `label`, `pagination`, `select`, `separator`, `skeleton`, `spinner`, `table`, `tabs`.
47
+
48
+ Add new ones via: `npx shadcn@latest add <component>`
49
+
50
+ Configuration in `src/components.json` (New York style, neutral base color).
51
+
52
+ ## Salesforce Integration
53
+
54
+ - SDK imports (`@salesforce/*`) are stubbed in standalone mode via Vite alias → `src/stubs/`
55
+ - Stubs return sample data (accounts, filters, object metadata) for local dev
56
+ - Real SDKs are linked via `file:` references when deployed to Salesforce
57
+
58
+ ## Do Not
59
+
60
+ - Import command center library (`@/components/library`) in outer app code
61
+ - Import Heroicons in outer app code (use Lucide)
62
+ - Import HeroUI components in outer app code
63
+ - Use `brand-*` Tailwind classes in outer app code (those are command center tokens)
64
+ - Add `.heroui-scope` class outside of `CommandCenter.tsx`
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # @salesforce/sf-web-components
1
+ # @schandlergarcia/sf-web-components
2
2
 
3
3
  Reusable Salesforce web components library with Tailwind CSS v4 and shadcn/ui components.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @salesforce/sf-web-components
8
+ npm install @schandlergarcia/sf-web-components
9
9
  ```
10
10
 
11
11
  ## Peer Dependencies
@@ -20,8 +20,8 @@ This package requires:
20
20
  ### Import Components
21
21
 
22
22
  ```tsx
23
- import { Button, Card } from '@salesforce/sf-web-components';
24
- import { cn } from '@salesforce/sf-web-components/lib';
23
+ import { Button, Card } from '@schandlergarcia/sf-web-components';
24
+ import { cn } from '@schandlergarcia/sf-web-components/lib';
25
25
 
26
26
  function App() {
27
27
  return (
@@ -37,7 +37,7 @@ function App() {
37
37
  Add to your main CSS file:
38
38
 
39
39
  ```css
40
- @import '@salesforce/sf-web-components/styles';
40
+ @import '@schandlergarcia/sf-web-components/styles';
41
41
  ```
42
42
 
43
43
  ### Tailwind Configuration
@@ -50,7 +50,7 @@ import type { Config } from 'tailwindcss';
50
50
  export default {
51
51
  content: [
52
52
  './src/**/*.{js,ts,jsx,tsx}',
53
- './node_modules/@salesforce/sf-web-components/dist/**/*.{js,jsx}'
53
+ './node_modules/@schandlergarcia/sf-web-components/dist/**/*.{js,jsx}'
54
54
  ],
55
55
  theme: {
56
56
  extend: {}
@@ -71,7 +71,7 @@ This library includes:
71
71
  ## Utilities
72
72
 
73
73
  ```tsx
74
- import { cn } from '@salesforce/sf-web-components/lib';
74
+ import { cn } from '@schandlergarcia/sf-web-components/lib';
75
75
 
76
76
  // Merge Tailwind classes with conflict resolution
77
77
  const className = cn('px-2 py-1', 'px-4'); // Result: 'py-1 px-4'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schandlergarcia/sf-web-components",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
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",