poeticui 0.1.0
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 +95 -0
- package/package.json +62 -0
- package/src/core.ts +1 -0
- package/src/data-display.ts +1 -0
- package/src/feedback.ts +1 -0
- package/src/forms.ts +1 -0
- package/src/icons.ts +1 -0
- package/src/index.ts +22 -0
- package/src/layout.ts +1 -0
- package/src/lib.ts +1 -0
- package/src/misc.ts +1 -0
- package/src/navigation.ts +1 -0
- package/src/tables.ts +1 -0
- package/styles/tokens.css +6 -0
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# poeticui
|
|
2
|
+
|
|
3
|
+
> One install. Tokens + components in a single package. The convenience layer over `@artificialpoets/tokens` and `@artificialpoets/components`.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
bun add poeticui
|
|
7
|
+
pnpm add poeticui
|
|
8
|
+
npm install poeticui
|
|
9
|
+
yarn add poeticui
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
You also need React 19 + the standard styling peers (most projects have these already):
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
bun add react@^19 react-dom@^19 @headlessui/react@^2 clsx@^2 tailwind-merge@^3
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
For technical-content primitives (`<CodeBlock>`, `<BlockMath>`, `<PackageManagerTabs>`), install the separate content package — it has heavy peers (Shiki, KaTeX):
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
bun add @artificialpoets/content
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Quick start
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import { Button, Card, Heading, Text, Badge } from "poeticui";
|
|
28
|
+
|
|
29
|
+
export default function Welcome() {
|
|
30
|
+
return (
|
|
31
|
+
<Card>
|
|
32
|
+
<Badge color="green">v0.1.0</Badge>
|
|
33
|
+
<Heading as="h2">Welcome to Poetic UI</Heading>
|
|
34
|
+
<Text>Built with poeticui.</Text>
|
|
35
|
+
<Button color="dark/zinc">Get started</Button>
|
|
36
|
+
</Card>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Wire the CSS once in your app entry:
|
|
42
|
+
|
|
43
|
+
```css
|
|
44
|
+
@import "tailwindcss";
|
|
45
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
46
|
+
@import "poeticui/styles/tokens";
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
That's the full install. The library paints with a neutral theme by default; override the 6-slot theme contract in your own CSS to rebrand.
|
|
50
|
+
|
|
51
|
+
## Two import styles
|
|
52
|
+
|
|
53
|
+
Pick whichever feels right — both are supported and tree-shake equally well:
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
// Barrel — simplest
|
|
57
|
+
import { Button, Card, Heading, Input, Switch } from "poeticui";
|
|
58
|
+
|
|
59
|
+
// Subpath — explicit category, slightly easier to grep for in big codebases
|
|
60
|
+
import { Button } from "poeticui/core";
|
|
61
|
+
import { Card, Heading } from "poeticui/data-display";
|
|
62
|
+
import { Input, Switch } from "poeticui/forms";
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Subpaths
|
|
66
|
+
|
|
67
|
+
| Subpath | What it re-exports |
|
|
68
|
+
|---|---|
|
|
69
|
+
| `poeticui` | Everything from `@artificialpoets/components` |
|
|
70
|
+
| `poeticui/core` | Button, Link, TouchTarget |
|
|
71
|
+
| `poeticui/data-display` | Avatar, Badge, BadgeButton, Card, Code, DescriptionList family, Divider, Heading, Skeleton, Stat, Strong, Subheading, Table family, Text, TextLink |
|
|
72
|
+
| `poeticui/forms` | Checkbox, Combobox, Fieldset family, Input, Select, Switch family, Textarea, Date-range-picker |
|
|
73
|
+
| `poeticui/feedback` | Alert, Callout, Dialog family, EmptyState, Hint |
|
|
74
|
+
| `poeticui/layout` | DrawerShell, PageHeader, SidebarLayout, StackedLayout |
|
|
75
|
+
| `poeticui/navigation` | Breadcrumbs, Navbar family, Pagination, SegmentedTabs, Sidebar family, Tabs |
|
|
76
|
+
| `poeticui/tables` | DataTable family, FilteredTable, TablePaginationFooter, useDataTableState |
|
|
77
|
+
| `poeticui/misc` | Dropdown family, Popover |
|
|
78
|
+
| `poeticui/icons` | ServiceIcon |
|
|
79
|
+
| `poeticui/lib` | cx() helper |
|
|
80
|
+
| `poeticui/styles/tokens` | CSS — OKLCH palette + semantic variables + Tailwind theme mapping + neutral default theme |
|
|
81
|
+
|
|
82
|
+
## What this is (and isn't)
|
|
83
|
+
|
|
84
|
+
This package is a **thin wrapper** — it adds zero source code, zero behavior, and depends on the underlying packages via `^0.1.0`. Use it for ergonomics: one install command, one canonical import path. The underlying packages continue to work and remain installable standalone:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Granular install style — also supported, identical components
|
|
88
|
+
bun add @artificialpoets/components @artificialpoets/tokens
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The two styles are interchangeable. Pick whichever fits your project.
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
Apache-2.0. See [LICENSE](../../LICENSE) at the repo root.
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "poeticui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Poetic UI — a neutral, agent-friendly React design system. One install for tokens + components. Apache-2.0.",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"design-system",
|
|
9
|
+
"react",
|
|
10
|
+
"tailwind",
|
|
11
|
+
"components",
|
|
12
|
+
"tokens",
|
|
13
|
+
"ui",
|
|
14
|
+
"headless-ui",
|
|
15
|
+
"oklch",
|
|
16
|
+
"themable",
|
|
17
|
+
"agent-friendly"
|
|
18
|
+
],
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/artificialpoets/poeticui.git",
|
|
22
|
+
"directory": "packages/poeticui"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"registry": "https://registry.npmjs.org",
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"src",
|
|
30
|
+
"styles"
|
|
31
|
+
],
|
|
32
|
+
"main": "./src/index.ts",
|
|
33
|
+
"types": "./src/index.ts",
|
|
34
|
+
"sideEffects": [
|
|
35
|
+
"./styles/*.css"
|
|
36
|
+
],
|
|
37
|
+
"exports": {
|
|
38
|
+
".": "./src/index.ts",
|
|
39
|
+
"./core": "./src/core.ts",
|
|
40
|
+
"./data-display": "./src/data-display.ts",
|
|
41
|
+
"./forms": "./src/forms.ts",
|
|
42
|
+
"./feedback": "./src/feedback.ts",
|
|
43
|
+
"./layout": "./src/layout.ts",
|
|
44
|
+
"./misc": "./src/misc.ts",
|
|
45
|
+
"./navigation": "./src/navigation.ts",
|
|
46
|
+
"./tables": "./src/tables.ts",
|
|
47
|
+
"./icons": "./src/icons.ts",
|
|
48
|
+
"./lib": "./src/lib.ts",
|
|
49
|
+
"./styles/tokens": "./styles/tokens.css"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@artificialpoets/components": "^0.1.0",
|
|
53
|
+
"@artificialpoets/tokens": "^0.1.0"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"react": "^19.0.0",
|
|
57
|
+
"react-dom": "^19.0.0",
|
|
58
|
+
"@headlessui/react": "^2.0.0",
|
|
59
|
+
"clsx": "^2.0.0",
|
|
60
|
+
"tailwind-merge": "^3.0.0"
|
|
61
|
+
}
|
|
62
|
+
}
|
package/src/core.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@artificialpoets/components/core";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@artificialpoets/components/data-display";
|
package/src/feedback.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@artificialpoets/components/feedback";
|
package/src/forms.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@artificialpoets/components/forms";
|
package/src/icons.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@artificialpoets/components/icons";
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @artificialpoets/poeticui — convenience barrel.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the entire surface of @artificialpoets/components. Tokens are
|
|
5
|
+
* CSS-only and consumed via the `./styles/tokens` subpath, not from here.
|
|
6
|
+
*
|
|
7
|
+
* Two valid import styles:
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // Barrel — simplest:
|
|
11
|
+
* import { Button, Card, Heading } from "@artificialpoets/poeticui";
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // Subpath — explicit, helps some bundlers tree-shake:
|
|
15
|
+
* import { Button } from "@artificialpoets/poeticui/core";
|
|
16
|
+
* import { Card } from "@artificialpoets/poeticui/data-display";
|
|
17
|
+
*
|
|
18
|
+
* For technical-content primitives (CodeBlock, Math, tabs), install
|
|
19
|
+
* `@artificialpoets/content` separately. It carries heavy peer deps
|
|
20
|
+
* (Shiki, KaTeX) and isn't pulled in here.
|
|
21
|
+
*/
|
|
22
|
+
export * from "@artificialpoets/components";
|
package/src/layout.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@artificialpoets/components/layout";
|
package/src/lib.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@artificialpoets/components/lib";
|
package/src/misc.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@artificialpoets/components/misc";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@artificialpoets/components/navigation";
|
package/src/tables.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@artificialpoets/components/tables";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/* @artificialpoets/poeticui — tokens entry.
|
|
2
|
+
* Pass-through to @artificialpoets/tokens so consumers have one CSS import
|
|
3
|
+
* to remember. Tokens carry zero JS — pure CSS, OKLCH palette, semantic
|
|
4
|
+
* variables, Tailwind v4 theme mapping, neutral default theme.
|
|
5
|
+
*/
|
|
6
|
+
@import "@artificialpoets/tokens";
|