@termuijs/ui 0.1.0 → 0.1.1

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 +52 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # @termuijs/ui
2
+
3
+ High-level interactive components. Modals, selects, tabs, toasts, forms, and more.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @termuijs/ui
9
+ ```
10
+
11
+ Requires `@termuijs/core` and `@termuijs/widgets`.
12
+
13
+ ## Components
14
+
15
+ | Component | What it does |
16
+ |-----------|-------------|
17
+ | `Select` | Dropdown selection with arrow-key navigation |
18
+ | `MultiSelect` | Multiple selection with checkboxes |
19
+ | `Modal` | Overlay dialog with focus trapping |
20
+ | `Tabs` | Tab container with keyboard switching |
21
+ | `Toast` | Timed notification popup |
22
+ | `Form` | Groups inputs with validation and submit handling |
23
+ | `Tree` | Collapsible tree view |
24
+ | `ConfirmDialog` | Yes/No confirmation dialog |
25
+ | `CommandPalette` | Fuzzy-search command launcher |
26
+ | `Divider` | Horizontal or vertical separator line |
27
+ | `Spacer` | Flexible whitespace |
28
+
29
+ ## Usage
30
+
31
+ ```typescript
32
+ import { Select, Modal, Toast } from '@termuijs/ui';
33
+
34
+ const select = new Select({
35
+ label: 'Choose a color',
36
+ options: ['Red', 'Green', 'Blue'],
37
+ onSelect: (value) => console.log(value),
38
+ });
39
+
40
+ const modal = new Modal({
41
+ title: 'Confirm',
42
+ content: 'Delete this file?',
43
+ onClose: () => {},
44
+ });
45
+
46
+ // Toasts auto-dismiss after a timeout
47
+ Toast.show('File saved', { duration: 2000 });
48
+ ```
49
+
50
+ ## License
51
+
52
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@termuijs/ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Rich component library for TermUI — Modal, Tabs, Select, Form, Toast, and more",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -20,8 +20,8 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@termuijs/core": "0.1.0",
24
- "@termuijs/widgets": "0.1.0"
23
+ "@termuijs/widgets": "0.1.1",
24
+ "@termuijs/core": "0.1.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "tsup": "^8.0.0",