pxengine 0.1.157 → 0.1.158
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/README.md +136 -136
- package/config/tailwind-preset.js +159 -159
- package/dist/index.cjs +2149 -2180
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -17
- package/dist/index.d.ts +2 -17
- package/dist/index.mjs +1900 -1930
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +240 -293
- package/package.json +138 -138
package/README.md
CHANGED
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
# @pxengine-ui
|
|
2
|
-
|
|
3
|
-
> **Shadcn-based UI component library for agent-driven interfaces**
|
|
4
|
-
|
|
5
|
-
A UI component library built on top of shadcn/ui, published to npm as **`pxengine`**, designed specifically for agent-driven interfaces: LLM agents emit a JSON schema, and `PXEngineRenderer` maps it to a React component. Components follow Atomic Design principles and are optimized for schema-driven rendering. Primary consumer is `pxengine-builder`, which links it locally (`"pxengine": "file:../@pxengine-ui"`).
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
`@pxengine-ui` provides a robust foundation for building modern dashboard and AI-integrated applications:
|
|
12
|
-
|
|
13
|
-
- **Built on shadcn/ui** - Industry-standard base layer using Radix UI primitives.
|
|
14
|
-
- **Themeable via CSS variables** - No hardcoded palette. Components read `--px-*`/host CSS custom properties at render time (falling back to internal purple/indigo defaults when a consumer doesn't supply them), so a dark-gold host app (like `pxengine-builder`) and a light one render the same components on entirely different themes with zero component changes.
|
|
15
|
-
- **Agent-First** - Fully schema-driven atoms and molecules ready for AI generation via `PXEngineRenderer`.
|
|
16
|
-
- **Atomic Design** - 52 Atoms and 60+ Composed Molecules across two domains (generic dashboard + creator discovery).
|
|
17
|
-
- **Zero Configuration** - Inherits Tailwind config and CSS variables from the host application; the host just needs `"node_modules/pxengine/**/*.{js,ts,jsx,tsx}"` in its Tailwind `content` array or production builds purge all pxengine classes.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Structure
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
@pxengine-ui/
|
|
25
|
-
├── src/
|
|
26
|
-
│ ├── atoms/ # Foundation UI (Button, Input, Slider, etc.) — 52 components
|
|
27
|
-
│ ├── molecules/ # Composed Patterns
|
|
28
|
-
│ │ ├── generic/ # Cross-domain dashboard widgets (~48 components)
|
|
29
|
-
│ │ └── creator-discovery/ # Niche-specific for creator search (~16 components)
|
|
30
|
-
│ ├── types/ # Schema & Component definitions
|
|
31
|
-
│ └── lib/ # Shared utilities
|
|
32
|
-
├── scripts/
|
|
33
|
-
│ ├── generate-metadata.ts # Builds dist/registry.json (component catalog for agents)
|
|
34
|
-
│ └── generate-molecule-registry.ts # Builds the molecule-only registry
|
|
35
|
-
├── tailwind-preset.js # Shared Tailwind preset re-exported for consumers
|
|
36
|
-
└── dist/ # Compiled assets (tsup: CJS + ESM + DTS) & Registry
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## Component Catalog
|
|
42
|
-
|
|
43
|
-
### Atoms (Foundation Primitives)
|
|
44
|
-
|
|
45
|
-
52 accessible atoms wrapping Radix-based shadcn components:
|
|
46
|
-
|
|
47
|
-
- **Forms**: Input, Checkbox, RadioGroup, Select, Switch, Slider, Textarea, Toggle.
|
|
48
|
-
- **Navigation**: DropdownMenu, ContextMenu, Pagination, Breadcrumb, Tabs, Command.
|
|
49
|
-
- **Overlay**: Dialog, AlertDialog, Drawer, Sheet, Popover, Tooltip.
|
|
50
|
-
- **Display**: Card, Badge, Avatar, Accordion, AspectRatio, Skeleton, Separator, Progress.
|
|
51
|
-
- **Specialized**: Resizable Panels, InputOTP, Kbd (Keyboard shortcuts).
|
|
52
|
-
|
|
53
|
-
### Molecules (High-Level Patterns)
|
|
54
|
-
|
|
55
|
-
#### Generic Dashboard (`src/molecules/generic/`)
|
|
56
|
-
|
|
57
|
-
Cross-domain widgets, including job-card families for long-running agent work (`ResearchReportJobCard`, `PresentationJobCard`, `WebSearchJobCard` — share layout/state conventions via `job-card-shared/`), data/table components (`DataGrid`, `DataTableCard`, `TablePagination`), integration cards (`GitHubConnectCard`, `GitHubRepoHealthCard`, `GoogleSheetsCard`, `GoogleSheetsConnectCard`), and general dashboard primitives:
|
|
58
|
-
|
|
59
|
-
- **StatsGrid** / **KPIStatsCard**: Data visualization with trends & icons.
|
|
60
|
-
- **EmptyState**, **LoadingOverlay**: Placeholder/loading states.
|
|
61
|
-
- **FilterBar**, **FileUpload**, **TagCloud**, **FormCard**, **DynamicFormCard**, **EditableField**: Input & filtering patterns.
|
|
62
|
-
- **ChecklistCard**, **ApprovalCard**, **ConfirmationCard**, **PollCard**: Decision/workflow patterns.
|
|
63
|
-
- **CampaignBriefCard**, **ChannelPlanCard**, **BudgetAllocCard**, **CalendarEventCard**: Campaign-planning widgets.
|
|
64
|
-
|
|
65
|
-
#### Creator Discovery (`src/molecules/creator-discovery/`)
|
|
66
|
-
|
|
67
|
-
- **CreatorGridCard**: Detailed discovery card with banner and metrics.
|
|
68
|
-
- **AudienceMetricCard** / **AudienceDemographicsCard**: Progress-based demographics.
|
|
69
|
-
- **BrandAffinityGroup**: Visual recently associated brand logos.
|
|
70
|
-
- **ContentPreviewGallery**: Video/Image thumbnail grids.
|
|
71
|
-
- **CreatorProfileSummary**, **CreatorSearchBox**, **CreatorWidget**, **CreatorActionHeader**: Search & profile patterns.
|
|
72
|
-
- **PlatformIconGroup**, **GrowthChartCard**, **TopPostsGrid**: Reach & performance summaries.
|
|
73
|
-
- **SearchSpecCard**, **MCQCard**, **CampaignSeedCard**, **CampaignConceptCard**: Agent-driven intake/spec patterns.
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## Usage
|
|
78
|
-
|
|
79
|
-
### Registry-Driven Rendering
|
|
80
|
-
|
|
81
|
-
`npm run build` runs `generate-metadata` automatically (`tsup.config.ts`'s `onSuccess` hook), producing `dist/registry.json` — component metadata + schemas so agents (the server's `ui_generator`/`widget_builder` agents) know what they can render. **Never hand-edit `dist/registry.json`** — it's derived output; if a new molecule isn't showing up in agent suggestions, rebuild and confirm the registry picked it up. `PXEngineRenderer` (exported from the package root) maps a schema's `type` field to a React component via a discriminated-union registry — adding a new molecule requires registering its `type` string there or it silently won't render.
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
import { PXEngineRenderer } from "pxengine";
|
|
85
|
-
|
|
86
|
-
const schema = {
|
|
87
|
-
type: "stats-grid",
|
|
88
|
-
items: [
|
|
89
|
-
{
|
|
90
|
-
label: "Total Reach",
|
|
91
|
-
value: "1.2M",
|
|
92
|
-
trend: "+12%",
|
|
93
|
-
trendDirection: "up",
|
|
94
|
-
},
|
|
95
|
-
],
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
return <PXEngineRenderer schema={schema} />;
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Direct Component Import
|
|
102
|
-
|
|
103
|
-
All components are exported for standard React usage:
|
|
104
|
-
|
|
105
|
-
```tsx
|
|
106
|
-
import { CreatorGridCard } from "pxengine";
|
|
107
|
-
|
|
108
|
-
<CreatorGridCard
|
|
109
|
-
name="Jane Doe"
|
|
110
|
-
handle="janedoe"
|
|
111
|
-
metrics={[{ label: "Followers", value: "500K" }]}
|
|
112
|
-
platforms={["Instagram", "TikTok"]}
|
|
113
|
-
/>;
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
## Design System
|
|
119
|
-
|
|
120
|
-
Components are **theme-agnostic by design** — they read CSS custom properties (`--px-*`, plus the host's own tokens) at render time rather than hardcoding a palette, so `cn()` (re-exported from `pxengine`, not `clsx`, for consumers) composes host classes on top of component defaults. A few atoms (e.g. `AvatarAtom`) fall back to internal indigo/purple/slate defaults (`var(--px-bg-color, var(--purple50))`) when a host doesn't supply theme vars — that fallback palette is NOT what most consumers actually see. `pxengine-builder`, the primary consumer, supplies a dark, gold-accented theme (`--gold: #C0AE82`, `surface.chat #0A0A0A` → `surface.elevated #1E1E1F`, see its README) via `globals.css`, and every pxengine component renders on that theme with zero component-level changes.
|
|
121
|
-
|
|
122
|
-
- **Border Radius**: Generous `rounded-3xl` and `rounded-[32px]` for major components.
|
|
123
|
-
- **Backdrop**: Uses `backdrop-blur-md` for overlay/glass surfaces where the host theme calls for it.
|
|
124
|
-
- **Shadows**: Subtle, layered soft shadows for depth.
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
## Tech Stack
|
|
129
|
-
|
|
130
|
-
- **Framework**: React (peer dep `^18.0.0 || ^19.0.0`; primary consumer runs 19) — built with **tsup** (CJS + ESM + `.d.ts`), not Vite
|
|
131
|
-
- **Styling**: Tailwind CSS + `class-variance-authority` + `tailwind-preset.js` (shared preset re-exported for consumers)
|
|
132
|
-
- **Primitives**: Radix UI (via shadcn/ui)
|
|
133
|
-
- **Animations**: Framer Motion (peer dep, external — not bundled)
|
|
134
|
-
- **Icons**: Lucide React (bundled into the build via `tsup`'s `noExternal`, along with `date-fns`, `@date-fns/tz`, `react-day-picker`)
|
|
135
|
-
- **Charts**: Highcharts + `highcharts-react-official`, and Recharts — all peer deps, external
|
|
136
|
-
- **Data/validation**: Zod
|
|
1
|
+
# @pxengine-ui
|
|
2
|
+
|
|
3
|
+
> **Shadcn-based UI component library for agent-driven interfaces**
|
|
4
|
+
|
|
5
|
+
A UI component library built on top of shadcn/ui, published to npm as **`pxengine`**, designed specifically for agent-driven interfaces: LLM agents emit a JSON schema, and `PXEngineRenderer` maps it to a React component. Components follow Atomic Design principles and are optimized for schema-driven rendering. Primary consumer is `pxengine-builder`, which links it locally (`"pxengine": "file:../@pxengine-ui"`).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
`@pxengine-ui` provides a robust foundation for building modern dashboard and AI-integrated applications:
|
|
12
|
+
|
|
13
|
+
- **Built on shadcn/ui** - Industry-standard base layer using Radix UI primitives.
|
|
14
|
+
- **Themeable via CSS variables** - No hardcoded palette. Components read `--px-*`/host CSS custom properties at render time (falling back to internal purple/indigo defaults when a consumer doesn't supply them), so a dark-gold host app (like `pxengine-builder`) and a light one render the same components on entirely different themes with zero component changes.
|
|
15
|
+
- **Agent-First** - Fully schema-driven atoms and molecules ready for AI generation via `PXEngineRenderer`.
|
|
16
|
+
- **Atomic Design** - 52 Atoms and 60+ Composed Molecules across two domains (generic dashboard + creator discovery).
|
|
17
|
+
- **Zero Configuration** - Inherits Tailwind config and CSS variables from the host application; the host just needs `"node_modules/pxengine/**/*.{js,ts,jsx,tsx}"` in its Tailwind `content` array or production builds purge all pxengine classes.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
@pxengine-ui/
|
|
25
|
+
├── src/
|
|
26
|
+
│ ├── atoms/ # Foundation UI (Button, Input, Slider, etc.) — 52 components
|
|
27
|
+
│ ├── molecules/ # Composed Patterns
|
|
28
|
+
│ │ ├── generic/ # Cross-domain dashboard widgets (~48 components)
|
|
29
|
+
│ │ └── creator-discovery/ # Niche-specific for creator search (~16 components)
|
|
30
|
+
│ ├── types/ # Schema & Component definitions
|
|
31
|
+
│ └── lib/ # Shared utilities
|
|
32
|
+
├── scripts/
|
|
33
|
+
│ ├── generate-metadata.ts # Builds dist/registry.json (component catalog for agents)
|
|
34
|
+
│ └── generate-molecule-registry.ts # Builds the molecule-only registry
|
|
35
|
+
├── tailwind-preset.js # Shared Tailwind preset re-exported for consumers
|
|
36
|
+
└── dist/ # Compiled assets (tsup: CJS + ESM + DTS) & Registry
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Component Catalog
|
|
42
|
+
|
|
43
|
+
### Atoms (Foundation Primitives)
|
|
44
|
+
|
|
45
|
+
52 accessible atoms wrapping Radix-based shadcn components:
|
|
46
|
+
|
|
47
|
+
- **Forms**: Input, Checkbox, RadioGroup, Select, Switch, Slider, Textarea, Toggle.
|
|
48
|
+
- **Navigation**: DropdownMenu, ContextMenu, Pagination, Breadcrumb, Tabs, Command.
|
|
49
|
+
- **Overlay**: Dialog, AlertDialog, Drawer, Sheet, Popover, Tooltip.
|
|
50
|
+
- **Display**: Card, Badge, Avatar, Accordion, AspectRatio, Skeleton, Separator, Progress.
|
|
51
|
+
- **Specialized**: Resizable Panels, InputOTP, Kbd (Keyboard shortcuts).
|
|
52
|
+
|
|
53
|
+
### Molecules (High-Level Patterns)
|
|
54
|
+
|
|
55
|
+
#### Generic Dashboard (`src/molecules/generic/`)
|
|
56
|
+
|
|
57
|
+
Cross-domain widgets, including job-card families for long-running agent work (`ResearchReportJobCard`, `PresentationJobCard`, `WebSearchJobCard` — share layout/state conventions via `job-card-shared/`), data/table components (`DataGrid`, `DataTableCard`, `TablePagination`), integration cards (`GitHubConnectCard`, `GitHubRepoHealthCard`, `GoogleSheetsCard`, `GoogleSheetsConnectCard`), and general dashboard primitives:
|
|
58
|
+
|
|
59
|
+
- **StatsGrid** / **KPIStatsCard**: Data visualization with trends & icons.
|
|
60
|
+
- **EmptyState**, **LoadingOverlay**: Placeholder/loading states.
|
|
61
|
+
- **FilterBar**, **FileUpload**, **TagCloud**, **FormCard**, **DynamicFormCard**, **EditableField**: Input & filtering patterns.
|
|
62
|
+
- **ChecklistCard**, **ApprovalCard**, **ConfirmationCard**, **PollCard**: Decision/workflow patterns.
|
|
63
|
+
- **CampaignBriefCard**, **ChannelPlanCard**, **BudgetAllocCard**, **CalendarEventCard**: Campaign-planning widgets.
|
|
64
|
+
|
|
65
|
+
#### Creator Discovery (`src/molecules/creator-discovery/`)
|
|
66
|
+
|
|
67
|
+
- **CreatorGridCard**: Detailed discovery card with banner and metrics.
|
|
68
|
+
- **AudienceMetricCard** / **AudienceDemographicsCard**: Progress-based demographics.
|
|
69
|
+
- **BrandAffinityGroup**: Visual recently associated brand logos.
|
|
70
|
+
- **ContentPreviewGallery**: Video/Image thumbnail grids.
|
|
71
|
+
- **CreatorProfileSummary**, **CreatorSearchBox**, **CreatorWidget**, **CreatorActionHeader**: Search & profile patterns.
|
|
72
|
+
- **PlatformIconGroup**, **GrowthChartCard**, **TopPostsGrid**: Reach & performance summaries.
|
|
73
|
+
- **SearchSpecCard**, **MCQCard**, **CampaignSeedCard**, **CampaignConceptCard**: Agent-driven intake/spec patterns.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Usage
|
|
78
|
+
|
|
79
|
+
### Registry-Driven Rendering
|
|
80
|
+
|
|
81
|
+
`npm run build` runs `generate-metadata` automatically (`tsup.config.ts`'s `onSuccess` hook), producing `dist/registry.json` — component metadata + schemas so agents (the server's `ui_generator`/`widget_builder` agents) know what they can render. **Never hand-edit `dist/registry.json`** — it's derived output; if a new molecule isn't showing up in agent suggestions, rebuild and confirm the registry picked it up. `PXEngineRenderer` (exported from the package root) maps a schema's `type` field to a React component via a discriminated-union registry — adding a new molecule requires registering its `type` string there or it silently won't render.
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
import { PXEngineRenderer } from "pxengine";
|
|
85
|
+
|
|
86
|
+
const schema = {
|
|
87
|
+
type: "stats-grid",
|
|
88
|
+
items: [
|
|
89
|
+
{
|
|
90
|
+
label: "Total Reach",
|
|
91
|
+
value: "1.2M",
|
|
92
|
+
trend: "+12%",
|
|
93
|
+
trendDirection: "up",
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
return <PXEngineRenderer schema={schema} />;
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Direct Component Import
|
|
102
|
+
|
|
103
|
+
All components are exported for standard React usage:
|
|
104
|
+
|
|
105
|
+
```tsx
|
|
106
|
+
import { CreatorGridCard } from "pxengine";
|
|
107
|
+
|
|
108
|
+
<CreatorGridCard
|
|
109
|
+
name="Jane Doe"
|
|
110
|
+
handle="janedoe"
|
|
111
|
+
metrics={[{ label: "Followers", value: "500K" }]}
|
|
112
|
+
platforms={["Instagram", "TikTok"]}
|
|
113
|
+
/>;
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Design System
|
|
119
|
+
|
|
120
|
+
Components are **theme-agnostic by design** — they read CSS custom properties (`--px-*`, plus the host's own tokens) at render time rather than hardcoding a palette, so `cn()` (re-exported from `pxengine`, not `clsx`, for consumers) composes host classes on top of component defaults. A few atoms (e.g. `AvatarAtom`) fall back to internal indigo/purple/slate defaults (`var(--px-bg-color, var(--purple50))`) when a host doesn't supply theme vars — that fallback palette is NOT what most consumers actually see. `pxengine-builder`, the primary consumer, supplies a dark, gold-accented theme (`--gold: #C0AE82`, `surface.chat #0A0A0A` → `surface.elevated #1E1E1F`, see its README) via `globals.css`, and every pxengine component renders on that theme with zero component-level changes.
|
|
121
|
+
|
|
122
|
+
- **Border Radius**: Generous `rounded-3xl` and `rounded-[32px]` for major components.
|
|
123
|
+
- **Backdrop**: Uses `backdrop-blur-md` for overlay/glass surfaces where the host theme calls for it.
|
|
124
|
+
- **Shadows**: Subtle, layered soft shadows for depth.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Tech Stack
|
|
129
|
+
|
|
130
|
+
- **Framework**: React (peer dep `^18.0.0 || ^19.0.0`; primary consumer runs 19) — built with **tsup** (CJS + ESM + `.d.ts`), not Vite
|
|
131
|
+
- **Styling**: Tailwind CSS + `class-variance-authority` + `tailwind-preset.js` (shared preset re-exported for consumers)
|
|
132
|
+
- **Primitives**: Radix UI (via shadcn/ui)
|
|
133
|
+
- **Animations**: Framer Motion (peer dep, external — not bundled)
|
|
134
|
+
- **Icons**: Lucide React (bundled into the build via `tsup`'s `noExternal`, along with `date-fns`, `@date-fns/tz`, `react-day-picker`)
|
|
135
|
+
- **Charts**: Highcharts + `highcharts-react-official`, and Recharts — all peer deps, external
|
|
136
|
+
- **Data/validation**: Zod
|
|
@@ -1,159 +1,159 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @pxengine/ui Tailwind Preset
|
|
3
|
-
*
|
|
4
|
-
* This file allows consumers of the @pxengine/ui library to easily inherit
|
|
5
|
-
* the custom theme, colors, and animations required for the components.
|
|
6
|
-
*
|
|
7
|
-
* Usage in tailwind.config.js:
|
|
8
|
-
* presets: [require("@pxengine/ui/config/tailwind-preset")]
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
module.exports = {
|
|
12
|
-
theme: {
|
|
13
|
-
container: {
|
|
14
|
-
center: true,
|
|
15
|
-
padding: "2rem",
|
|
16
|
-
screens: {
|
|
17
|
-
"2xl": "1400px",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
extend: {
|
|
21
|
-
fontFamily: {
|
|
22
|
-
sans: ["Inter", "system-ui", "sans-serif"],
|
|
23
|
-
noto: ["Noto Sans", "system-ui", "sans-serif"],
|
|
24
|
-
grotesk: ["Space Grotesk", "system-ui", "sans-serif"],
|
|
25
|
-
roboto: ["Roboto", "system-ui", "sans-serif"],
|
|
26
|
-
},
|
|
27
|
-
colors: {
|
|
28
|
-
border: "hsl(var(--border))",
|
|
29
|
-
input: "hsl(var(--input))",
|
|
30
|
-
ring: "hsl(var(--ring))",
|
|
31
|
-
background: "hsl(var(--background))",
|
|
32
|
-
foreground: "hsl(var(--foreground))",
|
|
33
|
-
primary: {
|
|
34
|
-
DEFAULT: "hsl(var(--primary))",
|
|
35
|
-
foreground: "hsl(var(--primary-foreground))",
|
|
36
|
-
},
|
|
37
|
-
secondary: {
|
|
38
|
-
DEFAULT: "hsl(var(--secondary))",
|
|
39
|
-
foreground: "hsl(var(--secondary-foreground))",
|
|
40
|
-
},
|
|
41
|
-
interactive: {
|
|
42
|
-
DEFAULT: "var(--interactive)",
|
|
43
|
-
foreground: "var(--interactive-foreground)",
|
|
44
|
-
},
|
|
45
|
-
destructive: {
|
|
46
|
-
DEFAULT: "hsl(var(--destructive))",
|
|
47
|
-
foreground: "hsl(var(--destructive-foreground))",
|
|
48
|
-
},
|
|
49
|
-
muted: {
|
|
50
|
-
DEFAULT: "hsl(var(--muted))",
|
|
51
|
-
foreground: "hsl(var(--muted-foreground))",
|
|
52
|
-
},
|
|
53
|
-
accent: {
|
|
54
|
-
DEFAULT: "hsl(var(--accent))",
|
|
55
|
-
foreground: "hsl(var(--accent-foreground))",
|
|
56
|
-
},
|
|
57
|
-
popover: {
|
|
58
|
-
DEFAULT: "hsl(var(--popover))",
|
|
59
|
-
foreground: "hsl(var(--popover-foreground))",
|
|
60
|
-
},
|
|
61
|
-
card: {
|
|
62
|
-
DEFAULT: "hsl(var(--card))",
|
|
63
|
-
foreground: "hsl(var(--card-foreground))",
|
|
64
|
-
},
|
|
65
|
-
// Custom PXEngine colors
|
|
66
|
-
gray25: "var(--gray25)",
|
|
67
|
-
gray50: "var(--gray50)",
|
|
68
|
-
gray100: "var(--gray100)",
|
|
69
|
-
gray200: "var(--gray200)",
|
|
70
|
-
gray300: "var(--gray300)",
|
|
71
|
-
gray400: "var(--gray400)",
|
|
72
|
-
gray500: "var(--gray500)",
|
|
73
|
-
gray600: "var(--gray600)",
|
|
74
|
-
gray700: "var(--gray700)",
|
|
75
|
-
gray800: "var(--gray800)",
|
|
76
|
-
gray900: "var(--gray900)",
|
|
77
|
-
txtColor: "var(--txtColor)",
|
|
78
|
-
samepurple200: "#988cff",
|
|
79
|
-
purple100: "var(--purple100)",
|
|
80
|
-
purple200: "var(--purple200)",
|
|
81
|
-
purple500: "var(--purple500)",
|
|
82
|
-
purpleText: "var(--purple-text)",
|
|
83
|
-
purple50: "var(--purple50)",
|
|
84
|
-
purple20: "var(--purple20)",
|
|
85
|
-
purpleBorder2: "var(--purpleBorder2)",
|
|
86
|
-
purpleTextHover: "var(--purple-text-hover)",
|
|
87
|
-
purpleBorder: "var(--purple-border)",
|
|
88
|
-
green500: "var(--green500)",
|
|
89
|
-
grayPill: "var(--grayPill)",
|
|
90
|
-
sliderFill: "var(--slider-fill)",
|
|
91
|
-
sliderUnfill: "var(--slider-unfill)",
|
|
92
|
-
sliderButton: "var(--slider-button)",
|
|
93
|
-
lightSuccess: "#17C653",
|
|
94
|
-
lightWarning: "#DFA000",
|
|
95
|
-
success: "#5cb85c",
|
|
96
|
-
warningcolor: "var(--warning-color)",
|
|
97
|
-
label: "#071437",
|
|
98
|
-
paperBackground: "var(--paperBackground)",
|
|
99
|
-
darkModeCoal: "#0D0E12",
|
|
100
|
-
tutorialBorder: "var(--tutorialBorder)",
|
|
101
|
-
tutorialBg: "var(--tutorialBg)",
|
|
102
|
-
tutorialText: "var(--tutorialText)",
|
|
103
|
-
greenBackground: "var(--greenBackground)",
|
|
104
|
-
greenText: "var(--greenText)",
|
|
105
|
-
orangeBackground: "var(--orangeBackground)",
|
|
106
|
-
orangeText: "var(--orangeText)",
|
|
107
|
-
redBackground: "var(--redBackground)",
|
|
108
|
-
redText: "var(--redText)",
|
|
109
|
-
chart1: "var(--chart-1)",
|
|
110
|
-
chart2: "var(--chart-2)",
|
|
111
|
-
chart3: "var(--chart-3)",
|
|
112
|
-
chart4: "var(--chart-4)",
|
|
113
|
-
chart5: "var(--chart-5)",
|
|
114
|
-
primaryText: "var(--primaryText)",
|
|
115
|
-
primaryDark2: "var(--primaryDark2)",
|
|
116
|
-
purple200Dark: "var(--purple200Dark)",
|
|
117
|
-
purple20Dark: "var(--purple20Dark)",
|
|
118
|
-
purpleText1: "var(--purple-text-1)",
|
|
119
|
-
textPlaceholder: "var(--textPlaceholder)",
|
|
120
|
-
textSecondary: "var(--textSecondary)",
|
|
121
|
-
interactionBg: "var(--interaction-bg)",
|
|
122
|
-
purpleLight: "var(--purpleLight)",
|
|
123
|
-
purpleText2: "var(--purple-text-2)",
|
|
124
|
-
gold: "var(--gold)",
|
|
125
|
-
cardSurface: "var(--cardSurface)",
|
|
126
|
-
cardText: "var(--cardText)",
|
|
127
|
-
cardBorder: "var(--cardBorder)",
|
|
128
|
-
green100: "#dcfce7",
|
|
129
|
-
// Landing page colors
|
|
130
|
-
landingDarkestBlue: "var(--landing-darkest-blue)",
|
|
131
|
-
landingBlue: "var(--landing-blue)",
|
|
132
|
-
landingPurple: "var(--landing-purple)",
|
|
133
|
-
landingTextParagraph: "var(--landing-text-paragraph)",
|
|
134
|
-
landingTextHeading: "var(--landing-text-heading)",
|
|
135
|
-
landingBorderMain: "var(--landing-border-main)",
|
|
136
|
-
},
|
|
137
|
-
borderRadius: {
|
|
138
|
-
lg: "var(--radius)",
|
|
139
|
-
md: "calc(var(--radius) - 2px)",
|
|
140
|
-
sm: "calc(var(--radius) - 4px)",
|
|
141
|
-
},
|
|
142
|
-
keyframes: {
|
|
143
|
-
"accordion-down": {
|
|
144
|
-
from: { height: "0" },
|
|
145
|
-
to: { height: "var(--radix-accordion-content-height)" },
|
|
146
|
-
},
|
|
147
|
-
"accordion-up": {
|
|
148
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
149
|
-
to: { height: "0" },
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
animation: {
|
|
153
|
-
"accordion-down": "accordion-down 0.2s ease-out",
|
|
154
|
-
"accordion-up": "accordion-up 0.2s ease-out",
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
plugins: [require("tailwindcss-animate")],
|
|
159
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @pxengine/ui Tailwind Preset
|
|
3
|
+
*
|
|
4
|
+
* This file allows consumers of the @pxengine/ui library to easily inherit
|
|
5
|
+
* the custom theme, colors, and animations required for the components.
|
|
6
|
+
*
|
|
7
|
+
* Usage in tailwind.config.js:
|
|
8
|
+
* presets: [require("@pxengine/ui/config/tailwind-preset")]
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
module.exports = {
|
|
12
|
+
theme: {
|
|
13
|
+
container: {
|
|
14
|
+
center: true,
|
|
15
|
+
padding: "2rem",
|
|
16
|
+
screens: {
|
|
17
|
+
"2xl": "1400px",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
extend: {
|
|
21
|
+
fontFamily: {
|
|
22
|
+
sans: ["Inter", "system-ui", "sans-serif"],
|
|
23
|
+
noto: ["Noto Sans", "system-ui", "sans-serif"],
|
|
24
|
+
grotesk: ["Space Grotesk", "system-ui", "sans-serif"],
|
|
25
|
+
roboto: ["Roboto", "system-ui", "sans-serif"],
|
|
26
|
+
},
|
|
27
|
+
colors: {
|
|
28
|
+
border: "hsl(var(--border))",
|
|
29
|
+
input: "hsl(var(--input))",
|
|
30
|
+
ring: "hsl(var(--ring))",
|
|
31
|
+
background: "hsl(var(--background))",
|
|
32
|
+
foreground: "hsl(var(--foreground))",
|
|
33
|
+
primary: {
|
|
34
|
+
DEFAULT: "hsl(var(--primary))",
|
|
35
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
36
|
+
},
|
|
37
|
+
secondary: {
|
|
38
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
39
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
40
|
+
},
|
|
41
|
+
interactive: {
|
|
42
|
+
DEFAULT: "var(--interactive)",
|
|
43
|
+
foreground: "var(--interactive-foreground)",
|
|
44
|
+
},
|
|
45
|
+
destructive: {
|
|
46
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
47
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
48
|
+
},
|
|
49
|
+
muted: {
|
|
50
|
+
DEFAULT: "hsl(var(--muted))",
|
|
51
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
52
|
+
},
|
|
53
|
+
accent: {
|
|
54
|
+
DEFAULT: "hsl(var(--accent))",
|
|
55
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
56
|
+
},
|
|
57
|
+
popover: {
|
|
58
|
+
DEFAULT: "hsl(var(--popover))",
|
|
59
|
+
foreground: "hsl(var(--popover-foreground))",
|
|
60
|
+
},
|
|
61
|
+
card: {
|
|
62
|
+
DEFAULT: "hsl(var(--card))",
|
|
63
|
+
foreground: "hsl(var(--card-foreground))",
|
|
64
|
+
},
|
|
65
|
+
// Custom PXEngine colors
|
|
66
|
+
gray25: "var(--gray25)",
|
|
67
|
+
gray50: "var(--gray50)",
|
|
68
|
+
gray100: "var(--gray100)",
|
|
69
|
+
gray200: "var(--gray200)",
|
|
70
|
+
gray300: "var(--gray300)",
|
|
71
|
+
gray400: "var(--gray400)",
|
|
72
|
+
gray500: "var(--gray500)",
|
|
73
|
+
gray600: "var(--gray600)",
|
|
74
|
+
gray700: "var(--gray700)",
|
|
75
|
+
gray800: "var(--gray800)",
|
|
76
|
+
gray900: "var(--gray900)",
|
|
77
|
+
txtColor: "var(--txtColor)",
|
|
78
|
+
samepurple200: "#988cff",
|
|
79
|
+
purple100: "var(--purple100)",
|
|
80
|
+
purple200: "var(--purple200)",
|
|
81
|
+
purple500: "var(--purple500)",
|
|
82
|
+
purpleText: "var(--purple-text)",
|
|
83
|
+
purple50: "var(--purple50)",
|
|
84
|
+
purple20: "var(--purple20)",
|
|
85
|
+
purpleBorder2: "var(--purpleBorder2)",
|
|
86
|
+
purpleTextHover: "var(--purple-text-hover)",
|
|
87
|
+
purpleBorder: "var(--purple-border)",
|
|
88
|
+
green500: "var(--green500)",
|
|
89
|
+
grayPill: "var(--grayPill)",
|
|
90
|
+
sliderFill: "var(--slider-fill)",
|
|
91
|
+
sliderUnfill: "var(--slider-unfill)",
|
|
92
|
+
sliderButton: "var(--slider-button)",
|
|
93
|
+
lightSuccess: "#17C653",
|
|
94
|
+
lightWarning: "#DFA000",
|
|
95
|
+
success: "#5cb85c",
|
|
96
|
+
warningcolor: "var(--warning-color)",
|
|
97
|
+
label: "#071437",
|
|
98
|
+
paperBackground: "var(--paperBackground)",
|
|
99
|
+
darkModeCoal: "#0D0E12",
|
|
100
|
+
tutorialBorder: "var(--tutorialBorder)",
|
|
101
|
+
tutorialBg: "var(--tutorialBg)",
|
|
102
|
+
tutorialText: "var(--tutorialText)",
|
|
103
|
+
greenBackground: "var(--greenBackground)",
|
|
104
|
+
greenText: "var(--greenText)",
|
|
105
|
+
orangeBackground: "var(--orangeBackground)",
|
|
106
|
+
orangeText: "var(--orangeText)",
|
|
107
|
+
redBackground: "var(--redBackground)",
|
|
108
|
+
redText: "var(--redText)",
|
|
109
|
+
chart1: "var(--chart-1)",
|
|
110
|
+
chart2: "var(--chart-2)",
|
|
111
|
+
chart3: "var(--chart-3)",
|
|
112
|
+
chart4: "var(--chart-4)",
|
|
113
|
+
chart5: "var(--chart-5)",
|
|
114
|
+
primaryText: "var(--primaryText)",
|
|
115
|
+
primaryDark2: "var(--primaryDark2)",
|
|
116
|
+
purple200Dark: "var(--purple200Dark)",
|
|
117
|
+
purple20Dark: "var(--purple20Dark)",
|
|
118
|
+
purpleText1: "var(--purple-text-1)",
|
|
119
|
+
textPlaceholder: "var(--textPlaceholder)",
|
|
120
|
+
textSecondary: "var(--textSecondary)",
|
|
121
|
+
interactionBg: "var(--interaction-bg)",
|
|
122
|
+
purpleLight: "var(--purpleLight)",
|
|
123
|
+
purpleText2: "var(--purple-text-2)",
|
|
124
|
+
gold: "var(--gold)",
|
|
125
|
+
cardSurface: "var(--cardSurface)",
|
|
126
|
+
cardText: "var(--cardText)",
|
|
127
|
+
cardBorder: "var(--cardBorder)",
|
|
128
|
+
green100: "#dcfce7",
|
|
129
|
+
// Landing page colors
|
|
130
|
+
landingDarkestBlue: "var(--landing-darkest-blue)",
|
|
131
|
+
landingBlue: "var(--landing-blue)",
|
|
132
|
+
landingPurple: "var(--landing-purple)",
|
|
133
|
+
landingTextParagraph: "var(--landing-text-paragraph)",
|
|
134
|
+
landingTextHeading: "var(--landing-text-heading)",
|
|
135
|
+
landingBorderMain: "var(--landing-border-main)",
|
|
136
|
+
},
|
|
137
|
+
borderRadius: {
|
|
138
|
+
lg: "var(--radius)",
|
|
139
|
+
md: "calc(var(--radius) - 2px)",
|
|
140
|
+
sm: "calc(var(--radius) - 4px)",
|
|
141
|
+
},
|
|
142
|
+
keyframes: {
|
|
143
|
+
"accordion-down": {
|
|
144
|
+
from: { height: "0" },
|
|
145
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
|
146
|
+
},
|
|
147
|
+
"accordion-up": {
|
|
148
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
149
|
+
to: { height: "0" },
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
animation: {
|
|
153
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
154
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
plugins: [require("tailwindcss-animate")],
|
|
159
|
+
};
|