@dreamtree-org/twreact-ui 1.1.58 β 1.1.59
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 +1 -1
- package/doc/README.md +128 -0
- package/doc/assets/upi-qr.png +0 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ If this library has saved you time, sparked an idea, or made your app a little m
|
|
|
26
26
|
**π· Scan the QR with any UPI app** (Google Pay, PhonePe, Paytm, BHIM, β¦) to pay instantly:
|
|
27
27
|
|
|
28
28
|
<p>
|
|
29
|
-
<img src="doc/assets/upi-qr.png" alt="Scan to pay Dreamtree Global via UPI" width="220" height="220" />
|
|
29
|
+
<img src="https://unpkg.com/@dreamtree-org/twreact-ui@latest/doc/assets/upi-qr.png" alt="Scan to pay Dreamtree Global via UPI" width="220" height="220" />
|
|
30
30
|
</p>
|
|
31
31
|
|
|
32
32
|
> **UPI ID:** `dhrugantha.llp@kotak` β’ **Payee:** Dreamtree Global
|
package/doc/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# @dreamtree-org/twreact-ui β Documentation
|
|
2
|
+
|
|
3
|
+
A React + Tailwind component library for building modern web apps.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
### Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @dreamtree-org/twreact-ui
|
|
13
|
+
# or
|
|
14
|
+
yarn add @dreamtree-org/twreact-ui
|
|
15
|
+
# or
|
|
16
|
+
pnpm add @dreamtree-org/twreact-ui
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Peer dependencies
|
|
20
|
+
|
|
21
|
+
Ensure **React 18+** and **react-dom** are installed:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install react react-dom
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Basic usage
|
|
28
|
+
|
|
29
|
+
Wrap your app with the store provider (if using store/Toast), then import components and styles:
|
|
30
|
+
|
|
31
|
+
```jsx
|
|
32
|
+
import React from 'react';
|
|
33
|
+
import { createRoot } from 'react-dom/client';
|
|
34
|
+
import { Button, Input, Alert } from '@dreamtree-org/twreact-ui';
|
|
35
|
+
// Styles are included when you import the package
|
|
36
|
+
import '@dreamtree-org/twreact-ui/dist/index.css';
|
|
37
|
+
|
|
38
|
+
function App() {
|
|
39
|
+
return (
|
|
40
|
+
<div className="p-4">
|
|
41
|
+
<Button variant="primary">Click me</Button>
|
|
42
|
+
<Input label="Email" placeholder="you@example.com" />
|
|
43
|
+
<Alert variant="info" title="Note">Welcome to the app.</Alert>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
createRoot(document.getElementById('root')).render(<App />);
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### With Store & Toast (optional)
|
|
52
|
+
|
|
53
|
+
```jsx
|
|
54
|
+
import { StoreProvider, ToastContainer, useToast } from '@dreamtree-org/twreact-ui';
|
|
55
|
+
|
|
56
|
+
function App() {
|
|
57
|
+
return (
|
|
58
|
+
<StoreProvider>
|
|
59
|
+
<ToastContainer toasts={toasts} onRemove={removeToast} />
|
|
60
|
+
<YourRoutes />
|
|
61
|
+
</StoreProvider>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Component overview
|
|
69
|
+
|
|
70
|
+
| Component | Category | Description | Doc |
|
|
71
|
+
|-----------|----------|-------------|-----|
|
|
72
|
+
| [Input](Input.md) | Core | Text input with label, error, clear, password toggle | [Input.md](Input.md) |
|
|
73
|
+
| [Button](Button.md) | Core | Button with variants, sizes, loading, icons | [Button.md](Button.md) |
|
|
74
|
+
| [Select](Select.md) | Core | Single/multi select, searchable, grouped, creatable | [Select.md](Select.md) |
|
|
75
|
+
| [Table](Table.md) | Core | Data table with sort, filter, pagination, selection | [Table.md](Table.md) |
|
|
76
|
+
| [Form](Form.md) | Core | Form wrapper with react-hook-form integration | [Form.md](Form.md) |
|
|
77
|
+
| [Accordion](Accordion.md) | Core | Expandable/collapsible content panels | [Accordion.md](Accordion.md) |
|
|
78
|
+
| [Checkbox](Checkbox.md) | Core | Checkbox with label, sizes, indeterminate | [Checkbox.md](Checkbox.md) |
|
|
79
|
+
| [ColorPicker](ColorPicker.md) | Core | Color selection input | [ColorPicker.md](ColorPicker.md) |
|
|
80
|
+
| [DatePicker](DatePicker.md) | Core | Single date picker | [DatePicker.md](DatePicker.md) |
|
|
81
|
+
| [DateRangePicker](DateRangePicker.md) | Core | Start/end date range picker | [DateRangePicker.md](DateRangePicker.md) |
|
|
82
|
+
| [Loader](Loader.md) | Core | Loading spinner | [Loader.md](Loader.md) |
|
|
83
|
+
| [PriceRangePicker](PriceRangePicker.md) | Core | Min/max price or number range | [PriceRangePicker.md](PriceRangePicker.md) |
|
|
84
|
+
| [ProgressBar](ProgressBar.md) | Core | Progress bar (percentage) | [ProgressBar.md](ProgressBar.md) |
|
|
85
|
+
| [Radio](Radio.md) | Core | Radio button group | [Radio.md](Radio.md) |
|
|
86
|
+
| [Rate](Rate.md) | Core | Star rating input | [Rate.md](Rate.md) |
|
|
87
|
+
| [RoundedTag](RoundedTag.md) | Core | Tag/chip display | [RoundedTag.md](RoundedTag.md) |
|
|
88
|
+
| [Skeleton](Skeleton.md) | Core | Skeleton placeholder | [Skeleton.md](Skeleton.md) |
|
|
89
|
+
| [Switch](Switch.md) | Core | Toggle switch | [Switch.md](Switch.md) |
|
|
90
|
+
| [Tabs](Tabs.md) | Core | Tabbed content | [Tabs.md](Tabs.md) |
|
|
91
|
+
| [ThreeDotPopover](ThreeDotPopover.md) | Core | Actions menu (e.g. Edit, Delete) | [ThreeDotPopover.md](ThreeDotPopover.md) |
|
|
92
|
+
| [Tooltip](Tooltip.md) | Core | Tooltip on hover/focus | [Tooltip.md](Tooltip.md) |
|
|
93
|
+
| [LocationPicker](LocationPicker.md) | Core | Location/address picker | [LocationPicker.md](LocationPicker.md) |
|
|
94
|
+
| [SpeechToText](SpeechToText.md) | Core | Voice-to-text (Web Speech API) | [SpeechToText.md](SpeechToText.md) |
|
|
95
|
+
| [TextToSpeech](TextToSpeech.md) | Core | Text-to-speech playback | [TextToSpeech.md](TextToSpeech.md) |
|
|
96
|
+
| [Navbar](Navbar.md) | Navigation | Top navigation bar | [Navbar.md](Navbar.md) |
|
|
97
|
+
| [Sidebar](Sidebar.md) | Navigation | Side navigation / menu | [Sidebar.md](Sidebar.md) |
|
|
98
|
+
| [FootNav](FootNav.md) | Navigation | Bottom navigation (mobile) | [FootNav.md](FootNav.md) |
|
|
99
|
+
| [Breadcrumbs](Breadcrumbs.md) | Navigation | Breadcrumb trail | [Breadcrumbs.md](Breadcrumbs.md) |
|
|
100
|
+
| [Dialog](Dialog.md) | Feedback | Modal dialog | [Dialog.md](Dialog.md) |
|
|
101
|
+
| [Toast](Toast.md) | Feedback | Toast notifications + useToast | [Toast.md](Toast.md) |
|
|
102
|
+
| [Alert](Alert.md) | Feedback | Inline alert (info/success/warning/error) | [Alert.md](Alert.md) |
|
|
103
|
+
| [Badge](Badge.md) | Utility | Badge / count pill | [Badge.md](Badge.md) |
|
|
104
|
+
| [Avatar](Avatar.md) | Utility | User avatar (image or initials) | [Avatar.md](Avatar.md) |
|
|
105
|
+
| [Card](Card.md) | Utility | Card container | [Card.md](Card.md) |
|
|
106
|
+
| [Pagination](Pagination.md) | Utility | Page navigation controls | [Pagination.md](Pagination.md) |
|
|
107
|
+
| [Stepper](Stepper.md) | Utility | Step indicator | [Stepper.md](Stepper.md) |
|
|
108
|
+
| [FileUpload](FileUpload.md) | Utility | File upload input/zone | [FileUpload.md](FileUpload.md) |
|
|
109
|
+
| [Condition](Condition.md) | Utility | Conditional render wrapper | [Condition.md](Condition.md) |
|
|
110
|
+
| [Carousel](Carousel.md) | Utility | Image/content carousel | [Carousel.md](Carousel.md) |
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Hooks & utilities
|
|
115
|
+
|
|
116
|
+
- **useTheme** / **ThemeProvider** β Theme context
|
|
117
|
+
- **useMixins** β Store/get helpers, emitter, in-memory state
|
|
118
|
+
- **useApi** β Axios-based API hook
|
|
119
|
+
- **cn** β `cn(...classes)` for merging Tailwind classes
|
|
120
|
+
- **StoreProvider** β Redux store + persist wrapper
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Tailwind
|
|
125
|
+
|
|
126
|
+
The library uses Tailwind CSS classes (e.g. `primary-500`, `success-600`). Ensure your project uses Tailwind and that the same palette/theme is available, or include the libraryβs CSS so design tokens apply.
|
|
127
|
+
|
|
128
|
+
[β Back to repository](https://github.com/preethamkrishnadev/dreamtree-ui)
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dreamtree-org/twreact-ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.59",
|
|
4
4
|
"description": "A comprehensive React + Tailwind components library for building modern web apps",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Partha Preetham Krishna",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"mcp/catalog-snapshot.mjs",
|
|
23
23
|
"mcp/catalog.snapshot.json",
|
|
24
24
|
"ai-skills",
|
|
25
|
+
"doc/assets/upi-qr.png",
|
|
25
26
|
"package.json",
|
|
26
27
|
"README.md"
|
|
27
28
|
],
|