@dreamtree-org/twreact-ui 1.0.94 → 1.0.95
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/package.json +1 -1
- package/dist/README.md +0 -237
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/package.json +0 -110
package/package.json
CHANGED
package/dist/README.md
DELETED
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
# Dreamtree UI
|
|
2
|
-
|
|
3
|
-
A comprehensive React + Tailwind CSS components library for building modern web applications. Built with accessibility, customization, and developer experience in mind.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- 🎨 **Modern Design**: Clean, professional components with Tailwind CSS
|
|
8
|
-
- 🌙 **Dark Mode**: Built-in dark/light mode support
|
|
9
|
-
- ♿ **Accessible**: ARIA compliant with keyboard navigation
|
|
10
|
-
- 📱 **Responsive**: Mobile-first design approach
|
|
11
|
-
- 🎯 **TypeScript Ready**: Full TypeScript support
|
|
12
|
-
- 🧩 **Composable**: Flexible APIs with props, slots, and render functions
|
|
13
|
-
- 🎨 **Customizable**: Easy theming with Tailwind config
|
|
14
|
-
- 📦 **Tree Shakeable**: Import only what you need
|
|
15
|
-
|
|
16
|
-
## Installation
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npm install dreamtree-ui
|
|
20
|
-
# or
|
|
21
|
-
yarn add dreamtree-ui
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Quick Start
|
|
25
|
-
|
|
26
|
-
```jsx
|
|
27
|
-
import { Button, Input, Card } from 'dreamtree-ui';
|
|
28
|
-
|
|
29
|
-
function App() {
|
|
30
|
-
return (
|
|
31
|
-
<div className="p-4">
|
|
32
|
-
<Card>
|
|
33
|
-
<Card.Header>
|
|
34
|
-
<Card.Title>Welcome to Dreamtree UI</Card.Title>
|
|
35
|
-
</Card.Header>
|
|
36
|
-
<Card.Content>
|
|
37
|
-
<Input placeholder="Enter your name" />
|
|
38
|
-
<Button className="mt-4">Get Started</Button>
|
|
39
|
-
</Card.Content>
|
|
40
|
-
</Card>
|
|
41
|
-
</div>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Components
|
|
47
|
-
|
|
48
|
-
### Core Components
|
|
49
|
-
|
|
50
|
-
- **Input** - Text inputs with validation states, icons, and clear functionality
|
|
51
|
-
- **Button** - Various button styles and states
|
|
52
|
-
- **Select** - Dropdown select with search, multi-select, and grouping
|
|
53
|
-
- **DatePicker** - Calendar-based date selection
|
|
54
|
-
- **Table** - Data tables with sorting, filtering, and pagination
|
|
55
|
-
- **Form** - Declarative form builder with validation
|
|
56
|
-
|
|
57
|
-
### Navigation
|
|
58
|
-
|
|
59
|
-
- **Sidebar** - Collapsible sidebar navigation
|
|
60
|
-
- **Navbar** - Top navigation bar with user menu
|
|
61
|
-
- **FootNav** - Mobile bottom navigation
|
|
62
|
-
- **Breadcrumbs** - Page hierarchy navigation
|
|
63
|
-
|
|
64
|
-
### Feedback & Overlay
|
|
65
|
-
|
|
66
|
-
- **Dialog** - Modal dialogs with customizable sizes
|
|
67
|
-
- **Toast** - Notification messages with different types
|
|
68
|
-
- **Tooltip** - Contextual help text
|
|
69
|
-
- **Alert** - Status messages and notifications
|
|
70
|
-
- **Loader** - Loading states and skeletons
|
|
71
|
-
|
|
72
|
-
### Utility Components
|
|
73
|
-
|
|
74
|
-
- **Tabs** - Tabbed content organization
|
|
75
|
-
- **Accordion** - Collapsible content sections
|
|
76
|
-
- **Badge** - Status indicators and labels
|
|
77
|
-
- **Avatar** - User profile images with fallbacks
|
|
78
|
-
- **Card** - Content containers with header/body/footer
|
|
79
|
-
- **Pagination** - Page navigation controls
|
|
80
|
-
- **Stepper** - Step-by-step process indicators
|
|
81
|
-
- **FileUpload** - Drag & drop file upload with preview
|
|
82
|
-
|
|
83
|
-
## Theming
|
|
84
|
-
|
|
85
|
-
Dreamtree UI supports custom theming through Tailwind CSS configuration:
|
|
86
|
-
|
|
87
|
-
```js
|
|
88
|
-
// tailwind.config.js
|
|
89
|
-
module.exports = {
|
|
90
|
-
theme: {
|
|
91
|
-
extend: {
|
|
92
|
-
colors: {
|
|
93
|
-
primary: {
|
|
94
|
-
50: '#eff6ff',
|
|
95
|
-
500: '#3b82f6',
|
|
96
|
-
600: '#2563eb',
|
|
97
|
-
// ... your custom colors
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## Dark Mode
|
|
106
|
-
|
|
107
|
-
Enable dark mode with the built-in theme provider:
|
|
108
|
-
|
|
109
|
-
```jsx
|
|
110
|
-
import { ThemeProvider } from 'dreamtree-ui';
|
|
111
|
-
|
|
112
|
-
function App() {
|
|
113
|
-
return (
|
|
114
|
-
<ThemeProvider defaultTheme="dark">
|
|
115
|
-
{/* Your app content */}
|
|
116
|
-
</ThemeProvider>
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## Examples
|
|
122
|
-
|
|
123
|
-
### Form with Validation
|
|
124
|
-
|
|
125
|
-
```jsx
|
|
126
|
-
import { Form } from 'dreamtree-ui';
|
|
127
|
-
|
|
128
|
-
const formFields = [
|
|
129
|
-
{
|
|
130
|
-
type: 'text',
|
|
131
|
-
name: 'firstName',
|
|
132
|
-
label: 'First Name',
|
|
133
|
-
required: true,
|
|
134
|
-
placeholder: 'Enter your first name'
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
type: 'email',
|
|
138
|
-
name: 'email',
|
|
139
|
-
label: 'Email',
|
|
140
|
-
required: true,
|
|
141
|
-
placeholder: 'Enter your email'
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
type: 'select',
|
|
145
|
-
name: 'country',
|
|
146
|
-
label: 'Country',
|
|
147
|
-
options: [
|
|
148
|
-
{ value: 'us', label: 'United States' },
|
|
149
|
-
{ value: 'ca', label: 'Canada' }
|
|
150
|
-
]
|
|
151
|
-
}
|
|
152
|
-
];
|
|
153
|
-
|
|
154
|
-
function ContactForm() {
|
|
155
|
-
const handleSubmit = (data) => {
|
|
156
|
-
console.log('Form data:', data);
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
return (
|
|
160
|
-
<Form
|
|
161
|
-
fields={formFields}
|
|
162
|
-
onSubmit={handleSubmit}
|
|
163
|
-
submitText="Send Message"
|
|
164
|
-
/>
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### Data Table
|
|
170
|
-
|
|
171
|
-
```jsx
|
|
172
|
-
import { Table } from 'dreamtree-ui';
|
|
173
|
-
|
|
174
|
-
const columns = [
|
|
175
|
-
{ key: 'name', label: 'Name', sortable: true },
|
|
176
|
-
{ key: 'email', label: 'Email', sortable: true },
|
|
177
|
-
{ key: 'role', label: 'Role' }
|
|
178
|
-
];
|
|
179
|
-
|
|
180
|
-
const data = [
|
|
181
|
-
{ name: 'John Doe', email: 'john@example.com', role: 'Admin' },
|
|
182
|
-
{ name: 'Jane Smith', email: 'jane@example.com', role: 'User' }
|
|
183
|
-
];
|
|
184
|
-
|
|
185
|
-
function UserTable() {
|
|
186
|
-
return (
|
|
187
|
-
<Table
|
|
188
|
-
columns={columns}
|
|
189
|
-
data={data}
|
|
190
|
-
sortable
|
|
191
|
-
filterable
|
|
192
|
-
pagination
|
|
193
|
-
pageSize={10}
|
|
194
|
-
/>
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### Toast Notifications
|
|
200
|
-
|
|
201
|
-
```jsx
|
|
202
|
-
import { useToast, ToastContainer } from 'dreamtree-ui';
|
|
203
|
-
|
|
204
|
-
function App() {
|
|
205
|
-
const { toast, toasts, removeToast } = useToast();
|
|
206
|
-
|
|
207
|
-
const showSuccess = () => {
|
|
208
|
-
toast.success('Success!', 'Your changes have been saved.');
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
const showError = () => {
|
|
212
|
-
toast.error('Error!', 'Something went wrong.');
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
return (
|
|
216
|
-
<div>
|
|
217
|
-
<button onClick={showSuccess}>Show Success</button>
|
|
218
|
-
<button onClick={showError}>Show Error</button>
|
|
219
|
-
<ToastContainer toasts={toasts} onRemove={removeToast} />
|
|
220
|
-
</div>
|
|
221
|
-
);
|
|
222
|
-
}
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
## Contributing
|
|
226
|
-
|
|
227
|
-
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
228
|
-
|
|
229
|
-
## License
|
|
230
|
-
|
|
231
|
-
MIT License - see [LICENSE](LICENSE) for details.
|
|
232
|
-
|
|
233
|
-
## Support
|
|
234
|
-
|
|
235
|
-
- 📖 [Documentation](https://dreamtree-ui.dev)
|
|
236
|
-
- 🐛 [Issue Tracker](https://github.com/dreamtree-ui/dreamtree-ui/issues)
|
|
237
|
-
- 💬 [Discussions](https://github.com/dreamtree-ui/dreamtree-ui/discussions)
|