@fayz-ai/ui 0.1.6 → 0.1.7

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.
Files changed (2) hide show
  1. package/README.md +45 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # @fayz-ai/ui
2
+
3
+ > Radix + Tailwind primitives, a CRUD engine, and the admin shell every Fayz app wears.
4
+
5
+ [![npm](https://img.shields.io/npm/v/@fayz-ai/ui.svg)](https://www.npmjs.com/package/@fayz-ai/ui)
6
+ [![license](https://img.shields.io/npm/l/@fayz-ai/ui.svg)](https://github.com/FayaLabs/fayz-sdk/blob/main/LICENSE)
7
+
8
+ A composed Fayz app needs to look like one product, not a pile of plugins. `@fayz-ai/ui` is the design layer that makes that true: accessible Radix-backed primitives, a data table, layout shells (app shell, sidebar, module pages), a themeable token system, and a dashboard widget kit that plugins contribute KPIs, charts, and tables into. Salon, restaurant, clinic — same shell, same widgets, different brand.
9
+
10
+ The philosophy: plugins describe behavior, the UI renders it consistently. Define a KPI widget once and it lands in the dashboard grid with layout, ranges, and customization already wired. Drop in `AppShell` and `Sidebar` and the navigation a plugin declared just appears.
11
+
12
+ ## What's inside
13
+ - **Primitives** — Button, Input, Badge, Card, Modal, Sheet, Dropdown, Select, Tabs, Tooltip, Popover, `DataTable` (TanStack), Checkbox, DatePicker, TimePicker, SearchSelect, CurrencyInput, ConfirmDialog, SegmentedControl, toast (`sonner`)
14
+ - **Layout** — `AppShell`, `Sidebar`, `Topbar`, `ModulePage`, `SubpageHeader`, `SaveBar`, page transitions, and the module header/back-button slots
15
+ - **Dashboard kit** — `DashboardCanvas`, `WidgetGrid`, `DashboardGrid`, range controls, and `defineKpiWidget` / `defineChartWidget` / `defineTableWidget` / `defineOnboardingWidget` / `defineCustomWidget` with `KpiCard`, `ChartWidget`, `TableWidget`
16
+ - **Theme** — `ThemeProvider`, `useTheme`, `createFayzTheme`, `fayzThemePresets`, light/dark tokens
17
+ - **Stores + utils** — `useLayoutStore`, `useThemeStore`, `cn`, Avatar
18
+
19
+ ## Install
20
+ ```bash
21
+ npm install @fayz-ai/ui
22
+ ```
23
+ Peer deps: `react`, `react-dom` (^18/^19), `tailwindcss` (^3.4). Import `@fayz-ai/ui/styles.css`.
24
+
25
+ ## Usage
26
+ ```tsx
27
+ import { Button, KpiCard, defineKpiWidget } from '@fayz-ai/ui'
28
+ import '@fayz-ai/ui/styles.css'
29
+
30
+ export const revenueWidget = defineKpiWidget({
31
+ id: 'revenue',
32
+ title: 'Revenue',
33
+ value: { format: 'currency', amount: 12400, currency: 'BRL' },
34
+ })
35
+
36
+ export function Demo() {
37
+ return <Button variant="default">Save</Button>
38
+ }
39
+ ```
40
+
41
+ ## Part of the Fayz SDK
42
+ The presentation layer on top of `@fayz-ai/core`; the admin surface in `@fayz-ai/saas` is built from it.
43
+
44
+ ## Roadmap & contributing
45
+ Built and evolving in the open. See the [Fayz SDK roadmap](../../docs/ROADMAP.md#ui) for current gaps, missing features, and good first issues.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fayz-ai/ui",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Fayz SDK UI — Radix + Tailwind component library with CRUD engine and layout shells",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -75,8 +75,8 @@
75
75
  "sonner": "^1.5.0",
76
76
  "tailwind-merge": "^2.4.0",
77
77
  "zustand": "^4.5.0",
78
- "@fayz-ai/core": "^0.1.6",
79
- "@fayz-ai/auth": "^0.1.6"
78
+ "@fayz-ai/core": "^0.1.7",
79
+ "@fayz-ai/auth": "^0.1.7"
80
80
  },
81
81
  "devDependencies": {
82
82
  "@types/react": "^18.3.0",