cooterlabs 1.0.1 → 2.0.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 +77 -14
- package/bin/index.js +510 -75
- package/package.json +12 -4
- package/templates/action-sheet/action-sheet.tsx +113 -0
- package/templates/alert/alert.tsx +96 -0
- package/templates/avatar/avatar.tsx +21 -4
- package/templates/badge/badge.tsx +106 -15
- package/templates/breadcrumb/breadcrumb.tsx +113 -0
- package/templates/button/button.tsx +40 -2
- package/templates/button-group/button-group.tsx +93 -0
- package/templates/card/card.tsx +31 -19
- package/templates/checkbox/checkbox.tsx +4 -3
- package/templates/context-menu/context-menu.tsx +177 -0
- package/templates/dialog/dialog.tsx +127 -0
- package/templates/dropdown/dropdown.tsx +180 -0
- package/templates/input/input.tsx +30 -3
- package/templates/label/label.tsx +2 -2
- package/templates/list/list.tsx +96 -0
- package/templates/loader/loader.tsx +38 -0
- package/templates/navbar-bottom/navbar-bottom.tsx +76 -0
- package/templates/navbar-top/navbar-top.tsx +84 -0
- package/templates/page-control/page-control.tsx +55 -0
- package/templates/pagination/pagination.tsx +109 -0
- package/templates/progress/progress.tsx +69 -0
- package/templates/radio/radio.tsx +41 -0
- package/templates/stepper/stepper.tsx +93 -0
- package/templates/tabs/tabs.tsx +57 -0
- package/templates/textarea/textarea.tsx +1 -1
- package/templates/toggle/toggle.tsx +27 -0
- package/templates/tooltip/tooltip.tsx +37 -0
package/README.md
CHANGED
|
@@ -17,15 +17,42 @@ It brings components directly to you. We do not provide a generic NPM library pa
|
|
|
17
17
|
|
|
18
18
|
1. Open your terminal at the root of your project directory.
|
|
19
19
|
2. Ensure you have `tailwind-merge` and `clsx` properly configured in a central utility path or installed manually (some components will auto-detect and install these).
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
### Initialization (Themes & CSS Base)
|
|
22
|
+
|
|
23
|
+
To swiftly set up a cohesive Tailwind theme and properly configure your base CSS file (e.g. `index.css` or `globals.css`), run:
|
|
21
24
|
|
|
22
25
|
```bash
|
|
23
|
-
npx cooterlabs
|
|
26
|
+
npx cooterlabs init
|
|
24
27
|
```
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
This will give you a list of carefully curated designer themes to apply global default variables (background, foreground, primary borders, etc.) out-of-the-box.
|
|
30
|
+
|
|
31
|
+
The default theme is **`aeon`** — the complete Aeon Product Design System as a Tailwind CSS v4 `@theme` block. It ships:
|
|
32
|
+
|
|
33
|
+
- **Semantic colors**: `primary` (deep teal `#0d3435`), `secondary`, `muted`, `accent`, `destructive`, `border`, `ring`, plus `success` / `info` / `warning` / `error` — each with a full 50–900 primitive scale (`primary-50`…`primary-900`, `grey-*`, `success-*`, …).
|
|
34
|
+
- **Text sizes as Tailwind CSS variables**: the full Aeon type ramp is exposed as `--text-*` theme variables, giving you utilities like `text-h1`…`text-h5` (headings), `text-s1`/`text-s2` (subtitles), `text-b1`…`text-b4` (body), `text-c1`…`text-c3` (captions), `text-label`, and button sizes `text-btn-giant`…`text-btn-tiny` — each with the correct size, line-height, and weight baked in.
|
|
35
|
+
- **Radius scale**: `rounded-xxs` (4px) through `rounded-xl` (24px).
|
|
36
|
+
- **Elevation**: `shadow-100` through `shadow-800`.
|
|
37
|
+
- **Font**: Inter.
|
|
38
|
+
|
|
39
|
+
To apply it non-interactively:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx cooterlabs init aeon
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Legacy `zinc` and `slate` themes (Tailwind v3 / shadcn HSL format) remain available.
|
|
46
|
+
|
|
47
|
+
### Adding Components
|
|
27
48
|
|
|
28
|
-
|
|
49
|
+
Run the CLI tool without arguments to get an interactive autocomplete prompt:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx cooterlabs add
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If you know exactly what component you want, bypass the interactive wizard and supply the name:
|
|
29
56
|
|
|
30
57
|
```bash
|
|
31
58
|
# Example: Adding a Button
|
|
@@ -35,18 +62,54 @@ npx cooterlabs add button
|
|
|
35
62
|
npx cooterlabs add avatar
|
|
36
63
|
```
|
|
37
64
|
|
|
38
|
-
|
|
65
|
+
### Install All Components At Once
|
|
39
66
|
|
|
40
|
-
|
|
67
|
+
Need a complete starting block? Add the `--all` flag to scaffold the entire library in one go:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx cooterlabs add --all
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Available Components
|
|
41
74
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
- `
|
|
46
|
-
- `
|
|
47
|
-
- `input` -
|
|
48
|
-
- `
|
|
49
|
-
- `
|
|
75
|
+
The full Aeon Product Design System, scaffolded as owned code:
|
|
76
|
+
|
|
77
|
+
**Form controls**
|
|
78
|
+
- `button` - Filled / outline / clear styles in five sizes (giant → tiny), icon-only mode, Radix `Slot` support.
|
|
79
|
+
- `button-group` - Segmented control matching the button size ramp.
|
|
80
|
+
- `input` - Aeon-styled HTML `<input />` with error and disabled states.
|
|
81
|
+
- `textarea` - Matching multiline input.
|
|
82
|
+
- `label` - Accessible Radix-backed `<label />`.
|
|
83
|
+
- `checkbox` - Radix checkbox with indeterminate support.
|
|
84
|
+
- `radio` - Radix radio group.
|
|
85
|
+
- `toggle` - Radix switch.
|
|
86
|
+
|
|
87
|
+
**Feedback**
|
|
88
|
+
- `alert` - Filled and soft appearances across default / success / info / warning / error severities.
|
|
89
|
+
- `badge` - Status pills plus dismissible `Chip`.
|
|
90
|
+
- `avatar` - Radix avatar with the Aeon size ramp.
|
|
91
|
+
- `progress` - Radix progress bar.
|
|
92
|
+
- `loader` - CSS spinner in five sizes.
|
|
93
|
+
- `tooltip` - Radix dark tooltip.
|
|
94
|
+
|
|
95
|
+
**Overlays**
|
|
96
|
+
- `dialog` - Radix dialog (Pop-Up).
|
|
97
|
+
- `action-sheet` - Mobile bottom sheet built on Radix dialog.
|
|
98
|
+
- `context-menu` - Radix context menu.
|
|
99
|
+
- `dropdown` - Radix dropdown menu.
|
|
100
|
+
- `list` - Mobile list rows with leading/trailing slots.
|
|
101
|
+
|
|
102
|
+
**Navigation**
|
|
103
|
+
- `tabs` - Radix tabs.
|
|
104
|
+
- `breadcrumb` - Accessible breadcrumb trail.
|
|
105
|
+
- `pagination` - Page navigation.
|
|
106
|
+
- `page-control` - Mobile page-indicator dots.
|
|
107
|
+
- `stepper` - Horizontal step indicator.
|
|
108
|
+
- `navbar-top` - Mobile top app bar.
|
|
109
|
+
- `navbar-bottom` - Mobile bottom tab bar.
|
|
110
|
+
|
|
111
|
+
**Layout**
|
|
112
|
+
- `card` - Header, footer, body, title, and description wrappers.
|
|
50
113
|
|
|
51
114
|
## How it works under-the-hood
|
|
52
115
|
|