base-themes 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 +174 -0
- package/dist/base-themes.css +2 -0
- package/dist/base-themes.js +918 -0
- package/dist/types/components/ui/Accordion.d.ts +15 -0
- package/dist/types/components/ui/AlertDialog.d.ts +16 -0
- package/dist/types/components/ui/Autocomplete.d.ts +20 -0
- package/dist/types/components/ui/Avatar.d.ts +16 -0
- package/dist/types/components/ui/Button.d.ts +9 -0
- package/dist/types/components/ui/Checkbox.d.ts +9 -0
- package/dist/types/components/ui/CheckboxGroup.d.ts +11 -0
- package/dist/types/components/ui/Collapsible.d.ts +12 -0
- package/dist/types/components/ui/Combobox.d.ts +13 -0
- package/dist/types/components/ui/ContextMenu.d.ts +17 -0
- package/dist/types/components/ui/CspProvider.d.ts +5 -0
- package/dist/types/components/ui/Dialog.d.ts +13 -0
- package/dist/types/components/ui/DirectionProvider.d.ts +6 -0
- package/dist/types/components/ui/Drawer.d.ts +14 -0
- package/dist/types/components/ui/Field.d.ts +11 -0
- package/dist/types/components/ui/Fieldset.d.ts +8 -0
- package/dist/types/components/ui/Form.d.ts +7 -0
- package/dist/types/components/ui/Input.d.ts +13 -0
- package/dist/types/components/ui/Menu.d.ts +17 -0
- package/dist/types/components/ui/Menubar.d.ts +18 -0
- package/dist/types/components/ui/Meter.d.ts +9 -0
- package/dist/types/components/ui/NavigationMenu.d.ts +16 -0
- package/dist/types/components/ui/NumberField.d.ts +8 -0
- package/dist/types/components/ui/OtpField.d.ts +9 -0
- package/dist/types/components/ui/Popover.d.ts +13 -0
- package/dist/types/components/ui/PreviewCard.d.ts +14 -0
- package/dist/types/components/ui/Progress.d.ts +9 -0
- package/dist/types/components/ui/Radio.d.ts +8 -0
- package/dist/types/components/ui/RadioGroup.d.ts +13 -0
- package/dist/types/components/ui/ScrollArea.d.ts +5 -0
- package/dist/types/components/ui/Select.d.ts +9 -0
- package/dist/types/components/ui/Separator.d.ts +5 -0
- package/dist/types/components/ui/Slider.d.ts +7 -0
- package/dist/types/components/ui/Switch.d.ts +9 -0
- package/dist/types/components/ui/Tabs.d.ts +16 -0
- package/dist/types/components/ui/Toast.d.ts +7 -0
- package/dist/types/components/ui/Toggle.d.ts +5 -0
- package/dist/types/components/ui/ToggleGroup.d.ts +13 -0
- package/dist/types/components/ui/Toolbar.d.ts +8 -0
- package/dist/types/components/ui/Tooltip.d.ts +14 -0
- package/dist/types/components/ui/index.d.ts +82 -0
- package/dist/types/components/ui/useDirection.d.ts +1 -0
- package/dist/types/components/ui/useToastManager.d.ts +4 -0
- package/dist/types/hooks/useTheme.d.ts +10 -0
- package/dist/types/lib.d.ts +3 -0
- package/package.json +68 -0
- package/public/previews/base-themes-bento.png +0 -0
- package/public/previews/base-themes-neo-brutalism.png +0 -0
- package/public/previews/base-themes-shadcn.png +0 -0
- package/registry/registry.json +64 -0
- package/skills/base-themes/SKILL.md +107 -0
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "base-themes",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Themeable Base UI React components with Bento, shadcn, and neo brutalism styles.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"sideEffects": [
|
|
9
|
+
"**/*.css"
|
|
10
|
+
],
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/base-themes.js",
|
|
13
|
+
"dist/base-themes.css",
|
|
14
|
+
"dist/types",
|
|
15
|
+
"public/previews",
|
|
16
|
+
"registry",
|
|
17
|
+
"skills/base-themes/SKILL.md",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/types/lib.d.ts",
|
|
23
|
+
"import": "./dist/base-themes.js"
|
|
24
|
+
},
|
|
25
|
+
"./styles.css": "./dist/base-themes.css",
|
|
26
|
+
"./registry.json": "./registry/registry.json",
|
|
27
|
+
"./skill": "./skills/base-themes/SKILL.md"
|
|
28
|
+
},
|
|
29
|
+
"types": "./dist/types/lib.d.ts",
|
|
30
|
+
"module": "./dist/base-themes.js",
|
|
31
|
+
"scripts": {
|
|
32
|
+
"dev": "vite",
|
|
33
|
+
"build": "npm run build:docs && npm run build:types && npm run build:lib",
|
|
34
|
+
"build:docs": "tsc -b && vite build",
|
|
35
|
+
"build:types": "tsc -p tsconfig.lib.json",
|
|
36
|
+
"build:lib": "vite build --config vite.lib.config.ts",
|
|
37
|
+
"lint": "eslint .",
|
|
38
|
+
"registry:check": "node scripts/validate-registry.mjs",
|
|
39
|
+
"prepack": "npm run registry:check && npm run lint && npm run build",
|
|
40
|
+
"preview": "vite preview"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@base-ui/react": "^1.5.0",
|
|
44
|
+
"react": "^19.0.0",
|
|
45
|
+
"react-dom": "^19.0.0"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"clsx": "^2.1.1",
|
|
49
|
+
"lucide-react": "^1.16.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@eslint/js": "^10.0.1",
|
|
53
|
+
"@types/node": "^24.12.3",
|
|
54
|
+
"@types/react": "^19.2.14",
|
|
55
|
+
"@types/react-dom": "^19.2.3",
|
|
56
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
57
|
+
"@base-ui/react": "^1.5.0",
|
|
58
|
+
"eslint": "^10.3.0",
|
|
59
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
60
|
+
"eslint-plugin-react-refresh": "^0.5.2",
|
|
61
|
+
"globals": "^17.6.0",
|
|
62
|
+
"typescript": "~6.0.2",
|
|
63
|
+
"typescript-eslint": "^8.59.2",
|
|
64
|
+
"vite": "^8.0.12",
|
|
65
|
+
"react": "^19.2.6",
|
|
66
|
+
"react-dom": "^19.2.6"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry.json",
|
|
3
|
+
"name": "base-themes",
|
|
4
|
+
"homepage": "https://base-ui.com/",
|
|
5
|
+
"dependencies": ["@base-ui/react", "clsx", "lucide-react"],
|
|
6
|
+
"style": {
|
|
7
|
+
"tokens": "src/styles/tokens.css",
|
|
8
|
+
"global": "src/index.css",
|
|
9
|
+
"default": "bento",
|
|
10
|
+
"variants": ["bento", "shadcn", "neo-brutalism"]
|
|
11
|
+
},
|
|
12
|
+
"components": [
|
|
13
|
+
{ "name": "accordion", "title": "Accordion", "files": ["src/components/ui/Accordion.tsx", "src/components/ui/Accordion.css"] },
|
|
14
|
+
{ "name": "alert-dialog", "title": "Alert Dialog", "files": ["src/components/ui/AlertDialog.tsx", "src/components/ui/AlertDialog.css"] },
|
|
15
|
+
{ "name": "autocomplete", "title": "Autocomplete", "files": ["src/components/ui/Autocomplete.tsx", "src/components/ui/Autocomplete.css", "src/components/ui/Combobox.css"] },
|
|
16
|
+
{ "name": "avatar", "title": "Avatar", "files": ["src/components/ui/Avatar.tsx", "src/components/ui/Avatar.css"] },
|
|
17
|
+
{ "name": "button", "title": "Button", "files": ["src/components/ui/Button.tsx", "src/components/ui/Button.css"] },
|
|
18
|
+
{ "name": "checkbox", "title": "Checkbox", "files": ["src/components/ui/Checkbox.tsx", "src/components/ui/Checkbox.css"] },
|
|
19
|
+
{ "name": "checkbox-group", "title": "Checkbox Group", "files": ["src/components/ui/CheckboxGroup.tsx", "src/components/ui/Checkbox.css"] },
|
|
20
|
+
{ "name": "collapsible", "title": "Collapsible", "files": ["src/components/ui/Collapsible.tsx", "src/components/ui/Collapsible.css"] },
|
|
21
|
+
{ "name": "combobox", "title": "Combobox", "files": ["src/components/ui/Combobox.tsx", "src/components/ui/Combobox.css"] },
|
|
22
|
+
{ "name": "context-menu", "title": "Context Menu", "files": ["src/components/ui/ContextMenu.tsx", "src/components/ui/ContextMenu.css", "src/components/ui/Menu.css"] },
|
|
23
|
+
{ "name": "csp-provider", "title": "CSP Provider", "files": ["src/components/ui/CspProvider.tsx"] },
|
|
24
|
+
{ "name": "dialog", "title": "Dialog", "files": ["src/components/ui/Dialog.tsx", "src/components/ui/Dialog.css"] },
|
|
25
|
+
{ "name": "direction-provider", "title": "Direction Provider", "files": ["src/components/ui/DirectionProvider.tsx", "src/components/ui/useDirection.ts"] },
|
|
26
|
+
{ "name": "drawer", "title": "Drawer", "files": ["src/components/ui/Drawer.tsx", "src/components/ui/Drawer.css"] },
|
|
27
|
+
{ "name": "field", "title": "Field", "files": ["src/components/ui/Field.tsx", "src/components/ui/Field.css"] },
|
|
28
|
+
{ "name": "fieldset", "title": "Fieldset", "files": ["src/components/ui/Fieldset.tsx", "src/components/ui/Fieldset.css"] },
|
|
29
|
+
{ "name": "form", "title": "Form", "files": ["src/components/ui/Form.tsx", "src/components/ui/Form.css"] },
|
|
30
|
+
{ "name": "input", "title": "Input", "files": ["src/components/ui/Input.tsx", "src/components/ui/Input.css"] },
|
|
31
|
+
{ "name": "menu", "title": "Menu", "files": ["src/components/ui/Menu.tsx", "src/components/ui/Menu.css"] },
|
|
32
|
+
{ "name": "menubar", "title": "Menubar", "files": ["src/components/ui/Menubar.tsx", "src/components/ui/Menubar.css", "src/components/ui/Menu.css"] },
|
|
33
|
+
{ "name": "meter", "title": "Meter", "files": ["src/components/ui/Meter.tsx", "src/components/ui/Meter.css"] },
|
|
34
|
+
{ "name": "navigation-menu", "title": "Navigation Menu", "files": ["src/components/ui/NavigationMenu.tsx", "src/components/ui/NavigationMenu.css"] },
|
|
35
|
+
{ "name": "number-field", "title": "Number Field", "files": ["src/components/ui/NumberField.tsx", "src/components/ui/NumberField.css"] },
|
|
36
|
+
{ "name": "otp-field", "title": "OTP Field", "files": ["src/components/ui/OtpField.tsx", "src/components/ui/OtpField.css"] },
|
|
37
|
+
{ "name": "popover", "title": "Popover", "files": ["src/components/ui/Popover.tsx", "src/components/ui/Popover.css"] },
|
|
38
|
+
{ "name": "preview-card", "title": "Preview Card", "files": ["src/components/ui/PreviewCard.tsx", "src/components/ui/PreviewCard.css"] },
|
|
39
|
+
{ "name": "progress", "title": "Progress", "files": ["src/components/ui/Progress.tsx", "src/components/ui/Progress.css"] },
|
|
40
|
+
{ "name": "radio", "title": "Radio", "files": ["src/components/ui/Radio.tsx", "src/components/ui/RadioGroup.css"] },
|
|
41
|
+
{ "name": "radio-group", "title": "Radio Group", "files": ["src/components/ui/RadioGroup.tsx", "src/components/ui/RadioGroup.css"] },
|
|
42
|
+
{ "name": "scroll-area", "title": "Scroll Area", "files": ["src/components/ui/ScrollArea.tsx", "src/components/ui/ScrollArea.css"] },
|
|
43
|
+
{ "name": "select", "title": "Select", "files": ["src/components/ui/Select.tsx", "src/components/ui/Select.css"] },
|
|
44
|
+
{ "name": "separator", "title": "Separator", "files": ["src/components/ui/Separator.tsx", "src/components/ui/Separator.css"] },
|
|
45
|
+
{ "name": "slider", "title": "Slider", "files": ["src/components/ui/Slider.tsx", "src/components/ui/Slider.css"] },
|
|
46
|
+
{ "name": "switch", "title": "Switch", "files": ["src/components/ui/Switch.tsx", "src/components/ui/Switch.css"] },
|
|
47
|
+
{ "name": "tabs", "title": "Tabs", "files": ["src/components/ui/Tabs.tsx", "src/components/ui/Tabs.css"] },
|
|
48
|
+
{ "name": "toast", "title": "Toast", "files": ["src/components/ui/Toast.tsx", "src/components/ui/Toast.css", "src/components/ui/useToastManager.ts"] },
|
|
49
|
+
{ "name": "toggle", "title": "Toggle", "files": ["src/components/ui/Toggle.tsx", "src/components/ui/ToggleGroup.css"] },
|
|
50
|
+
{ "name": "toggle-group", "title": "Toggle Group", "files": ["src/components/ui/ToggleGroup.tsx", "src/components/ui/ToggleGroup.css"] },
|
|
51
|
+
{ "name": "toolbar", "title": "Toolbar", "files": ["src/components/ui/Toolbar.tsx", "src/components/ui/Toolbar.css"] },
|
|
52
|
+
{ "name": "tooltip", "title": "Tooltip", "files": ["src/components/ui/Tooltip.tsx", "src/components/ui/Tooltip.css"] }
|
|
53
|
+
],
|
|
54
|
+
"blocks": [
|
|
55
|
+
{ "name": "dashboard-shell", "title": "Dashboard Shell", "route": "/blocks", "components": ["button", "progress", "meter"] },
|
|
56
|
+
{ "name": "settings-form", "title": "Settings Form", "route": "/blocks", "components": ["fieldset", "field", "switch", "button"] }
|
|
57
|
+
],
|
|
58
|
+
"pages": [
|
|
59
|
+
{ "name": "components", "route": "/components/button" },
|
|
60
|
+
{ "name": "blocks", "route": "/blocks" },
|
|
61
|
+
{ "name": "themes", "route": "/themes" },
|
|
62
|
+
{ "name": "installation", "route": "/docs/installation" }
|
|
63
|
+
]
|
|
64
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: base-themes
|
|
3
|
+
description: Install and extend the Base Themes React component kit built on Base UI primitives, with Bento, shadcn, and neo brutalism styles, blocks, theme tokens, and registry metadata. Use when adding Base Themes components, blocks, custom themes, or installation guidance to a React app.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Base Themes
|
|
7
|
+
|
|
8
|
+
## Quick Start
|
|
9
|
+
|
|
10
|
+
Install the package and peer dependencies in the target React app:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install base-themes @base-ui/react react react-dom
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Import the styles once:
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import 'base-themes/styles.css'
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Use a packaged component:
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { Button, Select } from 'base-themes'
|
|
26
|
+
|
|
27
|
+
export function Example() {
|
|
28
|
+
return (
|
|
29
|
+
<div data-style="bento" data-theme="light">
|
|
30
|
+
<Button>Save changes</Button>
|
|
31
|
+
<Select
|
|
32
|
+
id="density"
|
|
33
|
+
label="Density"
|
|
34
|
+
defaultValue="comfortable"
|
|
35
|
+
items={{ compact: 'Compact', comfortable: 'Comfortable', spacious: 'Spacious' }}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
For source-copy installs, copy the component wrappers and styles:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
cp -R src/components/ui ./target-app/src/components/ui
|
|
46
|
+
cp -R src/styles ./target-app/src/styles
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Import the tokens once from app CSS:
|
|
50
|
+
|
|
51
|
+
```css
|
|
52
|
+
@import './styles/tokens.css';
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Workflows
|
|
56
|
+
|
|
57
|
+
### Add A Component
|
|
58
|
+
|
|
59
|
+
1. Check `registry/registry.json` for the component entry.
|
|
60
|
+
2. Copy every file listed in the entry's `files` array.
|
|
61
|
+
3. Ensure `src/styles/tokens.css`, `src/styles/shadcn.css`, and `src/styles/neo-brutalism.css` are imported by the target app when source-copying.
|
|
62
|
+
4. Install dependencies from the registry `dependencies` array.
|
|
63
|
+
5. Import the component from `src/components/ui`.
|
|
64
|
+
|
|
65
|
+
### Add A Block
|
|
66
|
+
|
|
67
|
+
1. Open `registry/registry.json` and find the block under `blocks`.
|
|
68
|
+
2. Copy the components listed in the block's `components` array.
|
|
69
|
+
3. Recreate the block layout from `/blocks` or adapt it into the target route.
|
|
70
|
+
4. Keep block styles token-based; avoid hard-coded one-off colors.
|
|
71
|
+
|
|
72
|
+
### Customize Theme
|
|
73
|
+
|
|
74
|
+
Override variables in `src/styles/tokens.css`, or add style-specific overrides under `[data-style='shadcn']` and `[data-style='neo-brutalism']`:
|
|
75
|
+
|
|
76
|
+
```css
|
|
77
|
+
:root {
|
|
78
|
+
--bg: #f8fafc;
|
|
79
|
+
--surface: #ffffff;
|
|
80
|
+
--text-strong: #111827;
|
|
81
|
+
--accent: #f97316;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-theme='dark'] {
|
|
85
|
+
--bg: #0b1120;
|
|
86
|
+
--surface: #111827;
|
|
87
|
+
--text-strong: #f1f5f9;
|
|
88
|
+
--accent: #fb923c;
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Verification
|
|
93
|
+
|
|
94
|
+
Run these checks after changing components, registry, blocks, or theme tokens:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
node scripts/validate-registry.mjs
|
|
98
|
+
npm run lint
|
|
99
|
+
npm run build
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Use the docs app for manual verification:
|
|
103
|
+
|
|
104
|
+
- `/components/button` for component pages
|
|
105
|
+
- `/blocks` for block examples
|
|
106
|
+
- `/themes` for token customization
|
|
107
|
+
- `/docs/installation` for install instructions
|