fh-matui 0.9.4__tar.gz → 0.9.6__tar.gz
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.
- fh_matui-0.9.6/PKG-INFO +243 -0
- fh_matui-0.9.6/README.md +205 -0
- fh_matui-0.9.6/fh_matui/__init__.py +1 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/fh_matui/_modidx.py +9 -1
- {fh_matui-0.9.4 → fh_matui-0.9.6}/fh_matui/datatable.py +247 -95
- fh_matui-0.9.6/fh_matui.egg-info/PKG-INFO +243 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/settings.ini +1 -1
- fh_matui-0.9.4/PKG-INFO +0 -187
- fh_matui-0.9.4/README.md +0 -149
- fh_matui-0.9.4/fh_matui/__init__.py +0 -1
- fh_matui-0.9.4/fh_matui.egg-info/PKG-INFO +0 -187
- {fh_matui-0.9.4 → fh_matui-0.9.6}/LICENSE +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/MANIFEST.in +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/fh_matui/app_pages.py +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/fh_matui/components.py +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/fh_matui/core.py +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/fh_matui/foundations.py +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/fh_matui/web_pages.py +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/fh_matui.egg-info/SOURCES.txt +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/fh_matui.egg-info/dependency_links.txt +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/fh_matui.egg-info/entry_points.txt +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/fh_matui.egg-info/not-zip-safe +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/fh_matui.egg-info/requires.txt +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/fh_matui.egg-info/top_level.txt +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/pyproject.toml +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/setup.cfg +0 -0
- {fh_matui-0.9.4 → fh_matui-0.9.6}/setup.py +0 -0
fh_matui-0.9.6/PKG-INFO
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fh-matui
|
|
3
|
+
Version: 0.9.6
|
|
4
|
+
Summary: material-ui for fasthtml
|
|
5
|
+
Home-page: https://github.com/abhisheksreesaila/fh-matui
|
|
6
|
+
Author: abhishek sreesaila
|
|
7
|
+
Author-email: abhishek.sreesaila@gmail.com
|
|
8
|
+
License: Apache Software License 2.0
|
|
9
|
+
Keywords: nbdev jupyter notebook python
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Natural Language :: English
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
|
+
Requires-Python: >=3.9
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: python-fasthtml
|
|
22
|
+
Requires-Dist: fastcore
|
|
23
|
+
Requires-Dist: markdown
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Dynamic: author
|
|
26
|
+
Dynamic: author-email
|
|
27
|
+
Dynamic: classifier
|
|
28
|
+
Dynamic: description
|
|
29
|
+
Dynamic: description-content-type
|
|
30
|
+
Dynamic: home-page
|
|
31
|
+
Dynamic: keywords
|
|
32
|
+
Dynamic: license
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
Dynamic: provides-extra
|
|
35
|
+
Dynamic: requires-dist
|
|
36
|
+
Dynamic: requires-python
|
|
37
|
+
Dynamic: summary
|
|
38
|
+
|
|
39
|
+
# fh-matui
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
|
|
43
|
+
|
|
44
|
+
## What is fh-matui?
|
|
45
|
+
|
|
46
|
+
**fh-matui** is a Python library that brings Google’s Material Design to
|
|
47
|
+
[FastHTML](https://fastht.ml/) applications. It provides a comprehensive
|
|
48
|
+
set of pre-built UI components that integrate seamlessly with FastHTML’s
|
|
49
|
+
hypermedia-driven architecture.
|
|
50
|
+
|
|
51
|
+
Built on top of [BeerCSS](https://www.beercss.com/) (a lightweight
|
|
52
|
+
Material Design 3 CSS framework), fh-matui enables you to create modern,
|
|
53
|
+
responsive web interfaces entirely in Python — no JavaScript required.
|
|
54
|
+
|
|
55
|
+
## ✨ Key Features
|
|
56
|
+
|
|
57
|
+
| Feature | Description |
|
|
58
|
+
|----|----|
|
|
59
|
+
| 🎨 **Material Design 3** | Modern, beautiful components following Google’s latest design language |
|
|
60
|
+
| ⚡ **Zero JavaScript** | Build interactive UIs entirely in Python with FastHTML |
|
|
61
|
+
| 📱 **Responsive** | Mobile-first design with automatic breakpoint handling |
|
|
62
|
+
| 🌙 **Dark Mode** | Built-in light/dark theme support with 20+ color schemes |
|
|
63
|
+
| 🧩 **Composable** | Chainable styling APIs inspired by MonsterUI |
|
|
64
|
+
| 📊 **Data Tables** | Full-featured tables with pagination, search, sorting, and CRUD |
|
|
65
|
+
| 🔧 **nbdev-powered** | Literate programming with documentation built from notebooks |
|
|
66
|
+
|
|
67
|
+
## 🏗️ Architecture
|
|
68
|
+
|
|
69
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
70
|
+
│ fh-matui │
|
|
71
|
+
├─────────────────────────────────────────────────────────────┤
|
|
72
|
+
│ Foundations │ Core styling utilities, helpers, enums │
|
|
73
|
+
│ Core │ Theme system, MatTheme color presets │
|
|
74
|
+
│ Components │ Buttons, Cards, Modals, Forms, Tables │
|
|
75
|
+
│ App Pages │ Full-page layouts, navigation patterns │
|
|
76
|
+
│ Data Tables │ DataTable, DataTableResource for CRUD │
|
|
77
|
+
│ Web Pages │ Landing pages, marketing components │
|
|
78
|
+
├─────────────────────────────────────────────────────────────┤
|
|
79
|
+
│ BeerCSS │ Material Design 3 CSS framework │
|
|
80
|
+
│ FastHTML │ Python hypermedia web framework │
|
|
81
|
+
└─────────────────────────────────────────────────────────────┘
|
|
82
|
+
|
|
83
|
+
## 🎨 Available Themes
|
|
84
|
+
|
|
85
|
+
fh-matui includes 15+ pre-configured Material Design 3 color themes:
|
|
86
|
+
|
|
87
|
+
| Theme | Preview | Theme | Preview |
|
|
88
|
+
|-----------------------|---------|-----------------------|---------|
|
|
89
|
+
| `MatTheme.red` | 🔴 | `MatTheme.pink` | 🩷 |
|
|
90
|
+
| `MatTheme.purple` | 🟣 | `MatTheme.deepPurple` | 💜 |
|
|
91
|
+
| `MatTheme.indigo` | 🔵 | `MatTheme.blue` | 💙 |
|
|
92
|
+
| `MatTheme.lightBlue` | 🩵 | `MatTheme.cyan` | 🌊 |
|
|
93
|
+
| `MatTheme.teal` | 🩶 | `MatTheme.green` | 💚 |
|
|
94
|
+
| `MatTheme.lightGreen` | 🍀 | `MatTheme.lime` | 💛 |
|
|
95
|
+
| `MatTheme.yellow` | 🌟 | `MatTheme.amber` | 🧡 |
|
|
96
|
+
| `MatTheme.orange` | 🟠 | `MatTheme.deepOrange` | 🔶 |
|
|
97
|
+
|
|
98
|
+
**Usage:**
|
|
99
|
+
|
|
100
|
+
``` python
|
|
101
|
+
# Choose your theme
|
|
102
|
+
app, rt = fast_app(hdrs=[MatTheme.deepPurple.headers()])
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## 🚀 Quick Start
|
|
106
|
+
|
|
107
|
+
Here’s a minimal example to get you started:
|
|
108
|
+
|
|
109
|
+
``` python
|
|
110
|
+
from fasthtml.common import *
|
|
111
|
+
from fh_matui.core import MatTheme
|
|
112
|
+
from fh_matui.components import Button, Card, FormField
|
|
113
|
+
|
|
114
|
+
# Create a themed FastHTML app
|
|
115
|
+
app, rt = fast_app(hdrs=[MatTheme.indigo.headers()])
|
|
116
|
+
|
|
117
|
+
@rt('/')
|
|
118
|
+
def home():
|
|
119
|
+
return Div(
|
|
120
|
+
Card(
|
|
121
|
+
H3("Welcome to fh-matui!"),
|
|
122
|
+
P("Build beautiful Material Design apps with Python."),
|
|
123
|
+
FormField("email", label="Email", type="email"),
|
|
124
|
+
Button("Get Started", cls="primary"),
|
|
125
|
+
),
|
|
126
|
+
cls="padding"
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
serve()
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## 📦 Installation
|
|
133
|
+
|
|
134
|
+
``` bash
|
|
135
|
+
pip install fh-matui
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Dependencies
|
|
139
|
+
|
|
140
|
+
fh-matui automatically includes: - **python-fasthtml** - The core
|
|
141
|
+
FastHTML framework - **BeerCSS** - Loaded via CDN for Material Design 3
|
|
142
|
+
styling
|
|
143
|
+
|
|
144
|
+
### What This Code Does
|
|
145
|
+
|
|
146
|
+
1. **`MatTheme.indigo.headers()`** - Loads BeerCSS with the indigo
|
|
147
|
+
color scheme
|
|
148
|
+
2. **[`Card`](https://abhisheksreesaila.github.io/fh-matui/components.html#card)** -
|
|
149
|
+
Creates a Material Design card component with elevation
|
|
150
|
+
3. **[`FormField`](https://abhisheksreesaila.github.io/fh-matui/components.html#formfield)** -
|
|
151
|
+
Generates a styled input with floating label
|
|
152
|
+
4. **`Button`** - Renders a Material Design button with ripple effects
|
|
153
|
+
|
|
154
|
+
## 📚 Module Reference
|
|
155
|
+
|
|
156
|
+
| Module | Description | Key Components |
|
|
157
|
+
|----|----|----|
|
|
158
|
+
| [Foundations](foundations.html) | Base utilities and helper functions | `BeerHeaders`, `display`, styling helpers |
|
|
159
|
+
| [Core](core.html) | Theme system and styling | `MatTheme`, color presets, theme configuration |
|
|
160
|
+
| [Components](components.html) | UI component library | `Button`, [`Card`](https://abhisheksreesaila.github.io/fh-matui/components.html#card), [`FormField`](https://abhisheksreesaila.github.io/fh-matui/components.html#formfield), [`FormModal`](https://abhisheksreesaila.github.io/fh-matui/components.html#formmodal), [`Grid`](https://abhisheksreesaila.github.io/fh-matui/components.html#grid) |
|
|
161
|
+
| [App Pages](app_pages.html) | Application layouts | Navigation, sidebars, full-page layouts |
|
|
162
|
+
| [Data Tables](05_table.html) | Data management components | [`DataTable`](https://abhisheksreesaila.github.io/fh-matui/datatable.html#datatable), [`DataTableResource`](https://abhisheksreesaila.github.io/fh-matui/datatable.html#datatableresource), CRUD operations |
|
|
163
|
+
| [Web Pages](web_pages.html) | Marketing/landing pages | Hero sections, feature grids, testimonials |
|
|
164
|
+
|
|
165
|
+
## 🛠️ Development
|
|
166
|
+
|
|
167
|
+
### Install in Development Mode
|
|
168
|
+
|
|
169
|
+
``` bash
|
|
170
|
+
# Clone the repository
|
|
171
|
+
git clone https://github.com/user/fh-matui.git
|
|
172
|
+
cd fh-matui
|
|
173
|
+
|
|
174
|
+
# Install in editable mode
|
|
175
|
+
pip install -e .
|
|
176
|
+
|
|
177
|
+
# Make changes under nbs/ directory, then compile
|
|
178
|
+
nbdev_prepare
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## 🤝 Why fh-matui?
|
|
182
|
+
|
|
183
|
+
| Challenge | fh-matui Solution |
|
|
184
|
+
|----|----|
|
|
185
|
+
| **CSS complexity** | Pre-built Material Design 3 components via BeerCSS |
|
|
186
|
+
| **JavaScript fatigue** | FastHTML handles interactivity declaratively |
|
|
187
|
+
| **Component consistency** | Unified API across all components |
|
|
188
|
+
| **Dark mode support** | Built-in with automatic system preference detection |
|
|
189
|
+
| **Responsive design** | Mobile-first grid system and responsive utilities |
|
|
190
|
+
| **Form handling** | [`FormField`](https://abhisheksreesaila.github.io/fh-matui/components.html#formfield), [`FormGrid`](https://abhisheksreesaila.github.io/fh-matui/components.html#formgrid), [`FormModal`](https://abhisheksreesaila.github.io/fh-matui/components.html#formmodal) for rapid form building |
|
|
191
|
+
| **Data management** | [`DataTable`](https://abhisheksreesaila.github.io/fh-matui/datatable.html#datatable) and [`DataTableResource`](https://abhisheksreesaila.github.io/fh-matui/datatable.html#datatableresource) for CRUD operations |
|
|
192
|
+
|
|
193
|
+
## 🤖 For LLM Users
|
|
194
|
+
|
|
195
|
+
fh-matui includes **comprehensive documentation bundles** for Large
|
|
196
|
+
Language Models, enabling AI assistants (like Claude, ChatGPT, or GitHub
|
|
197
|
+
Copilot) to help you build FastHTML apps with complete knowledge of the
|
|
198
|
+
component APIs.
|
|
199
|
+
|
|
200
|
+
### 📥 Download Context File
|
|
201
|
+
|
|
202
|
+
**[📄
|
|
203
|
+
llms-ctx.txt](https://raw.githubusercontent.com/abhisheksreesaila/fh-matui/main/llms-ctx.txt)**
|
|
204
|
+
— Complete API documentation in LLM-optimized format
|
|
205
|
+
|
|
206
|
+
### 💡 How to Use
|
|
207
|
+
|
|
208
|
+
1. **Download the context file** from the link above
|
|
209
|
+
2. **Attach it to your LLM conversation** (drag & drop or paste
|
|
210
|
+
contents)
|
|
211
|
+
3. **Ask for implementation** using natural language
|
|
212
|
+
|
|
213
|
+
**Example Prompt:**
|
|
214
|
+
|
|
215
|
+
I'm using fh-matui (context attached). Create a dashboard with:
|
|
216
|
+
- A sidebar navigation with 5 menu items
|
|
217
|
+
- A DataTable showing products with pagination
|
|
218
|
+
- A modal form to add/edit products
|
|
219
|
+
- Use the deep purple theme
|
|
220
|
+
|
|
221
|
+
The LLM will generate production-ready FastHTML code using the exact
|
|
222
|
+
component APIs from the documentation.
|
|
223
|
+
|
|
224
|
+
### 🔄 Staying Up to Date
|
|
225
|
+
|
|
226
|
+
The `llms-ctx.txt` file is automatically regenerated with each release
|
|
227
|
+
to ensure it stays synchronized with the latest API changes. Always
|
|
228
|
+
download the version matching your installed package version for the
|
|
229
|
+
most accurate results.
|
|
230
|
+
|
|
231
|
+
> **📌 Note:** The context file is generated from the same literate
|
|
232
|
+
> programming notebooks that build the library itself, ensuring 100%
|
|
233
|
+
> accuracy with the actual implementation.
|
|
234
|
+
|
|
235
|
+
## 📄 License
|
|
236
|
+
|
|
237
|
+
This project is licensed under the Apache 2.0 License - see the
|
|
238
|
+
[LICENSE](https://github.com/user/fh-matui/blob/main/LICENSE) file for
|
|
239
|
+
details.
|
|
240
|
+
|
|
241
|
+
------------------------------------------------------------------------
|
|
242
|
+
|
|
243
|
+
**Built with ❤️ using FastHTML and nbdev**
|
fh_matui-0.9.6/README.md
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# fh-matui
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
|
|
5
|
+
|
|
6
|
+
## What is fh-matui?
|
|
7
|
+
|
|
8
|
+
**fh-matui** is a Python library that brings Google’s Material Design to
|
|
9
|
+
[FastHTML](https://fastht.ml/) applications. It provides a comprehensive
|
|
10
|
+
set of pre-built UI components that integrate seamlessly with FastHTML’s
|
|
11
|
+
hypermedia-driven architecture.
|
|
12
|
+
|
|
13
|
+
Built on top of [BeerCSS](https://www.beercss.com/) (a lightweight
|
|
14
|
+
Material Design 3 CSS framework), fh-matui enables you to create modern,
|
|
15
|
+
responsive web interfaces entirely in Python — no JavaScript required.
|
|
16
|
+
|
|
17
|
+
## ✨ Key Features
|
|
18
|
+
|
|
19
|
+
| Feature | Description |
|
|
20
|
+
|----|----|
|
|
21
|
+
| 🎨 **Material Design 3** | Modern, beautiful components following Google’s latest design language |
|
|
22
|
+
| ⚡ **Zero JavaScript** | Build interactive UIs entirely in Python with FastHTML |
|
|
23
|
+
| 📱 **Responsive** | Mobile-first design with automatic breakpoint handling |
|
|
24
|
+
| 🌙 **Dark Mode** | Built-in light/dark theme support with 20+ color schemes |
|
|
25
|
+
| 🧩 **Composable** | Chainable styling APIs inspired by MonsterUI |
|
|
26
|
+
| 📊 **Data Tables** | Full-featured tables with pagination, search, sorting, and CRUD |
|
|
27
|
+
| 🔧 **nbdev-powered** | Literate programming with documentation built from notebooks |
|
|
28
|
+
|
|
29
|
+
## 🏗️ Architecture
|
|
30
|
+
|
|
31
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
32
|
+
│ fh-matui │
|
|
33
|
+
├─────────────────────────────────────────────────────────────┤
|
|
34
|
+
│ Foundations │ Core styling utilities, helpers, enums │
|
|
35
|
+
│ Core │ Theme system, MatTheme color presets │
|
|
36
|
+
│ Components │ Buttons, Cards, Modals, Forms, Tables │
|
|
37
|
+
│ App Pages │ Full-page layouts, navigation patterns │
|
|
38
|
+
│ Data Tables │ DataTable, DataTableResource for CRUD │
|
|
39
|
+
│ Web Pages │ Landing pages, marketing components │
|
|
40
|
+
├─────────────────────────────────────────────────────────────┤
|
|
41
|
+
│ BeerCSS │ Material Design 3 CSS framework │
|
|
42
|
+
│ FastHTML │ Python hypermedia web framework │
|
|
43
|
+
└─────────────────────────────────────────────────────────────┘
|
|
44
|
+
|
|
45
|
+
## 🎨 Available Themes
|
|
46
|
+
|
|
47
|
+
fh-matui includes 15+ pre-configured Material Design 3 color themes:
|
|
48
|
+
|
|
49
|
+
| Theme | Preview | Theme | Preview |
|
|
50
|
+
|-----------------------|---------|-----------------------|---------|
|
|
51
|
+
| `MatTheme.red` | 🔴 | `MatTheme.pink` | 🩷 |
|
|
52
|
+
| `MatTheme.purple` | 🟣 | `MatTheme.deepPurple` | 💜 |
|
|
53
|
+
| `MatTheme.indigo` | 🔵 | `MatTheme.blue` | 💙 |
|
|
54
|
+
| `MatTheme.lightBlue` | 🩵 | `MatTheme.cyan` | 🌊 |
|
|
55
|
+
| `MatTheme.teal` | 🩶 | `MatTheme.green` | 💚 |
|
|
56
|
+
| `MatTheme.lightGreen` | 🍀 | `MatTheme.lime` | 💛 |
|
|
57
|
+
| `MatTheme.yellow` | 🌟 | `MatTheme.amber` | 🧡 |
|
|
58
|
+
| `MatTheme.orange` | 🟠 | `MatTheme.deepOrange` | 🔶 |
|
|
59
|
+
|
|
60
|
+
**Usage:**
|
|
61
|
+
|
|
62
|
+
``` python
|
|
63
|
+
# Choose your theme
|
|
64
|
+
app, rt = fast_app(hdrs=[MatTheme.deepPurple.headers()])
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## 🚀 Quick Start
|
|
68
|
+
|
|
69
|
+
Here’s a minimal example to get you started:
|
|
70
|
+
|
|
71
|
+
``` python
|
|
72
|
+
from fasthtml.common import *
|
|
73
|
+
from fh_matui.core import MatTheme
|
|
74
|
+
from fh_matui.components import Button, Card, FormField
|
|
75
|
+
|
|
76
|
+
# Create a themed FastHTML app
|
|
77
|
+
app, rt = fast_app(hdrs=[MatTheme.indigo.headers()])
|
|
78
|
+
|
|
79
|
+
@rt('/')
|
|
80
|
+
def home():
|
|
81
|
+
return Div(
|
|
82
|
+
Card(
|
|
83
|
+
H3("Welcome to fh-matui!"),
|
|
84
|
+
P("Build beautiful Material Design apps with Python."),
|
|
85
|
+
FormField("email", label="Email", type="email"),
|
|
86
|
+
Button("Get Started", cls="primary"),
|
|
87
|
+
),
|
|
88
|
+
cls="padding"
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
serve()
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## 📦 Installation
|
|
95
|
+
|
|
96
|
+
``` bash
|
|
97
|
+
pip install fh-matui
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Dependencies
|
|
101
|
+
|
|
102
|
+
fh-matui automatically includes: - **python-fasthtml** - The core
|
|
103
|
+
FastHTML framework - **BeerCSS** - Loaded via CDN for Material Design 3
|
|
104
|
+
styling
|
|
105
|
+
|
|
106
|
+
### What This Code Does
|
|
107
|
+
|
|
108
|
+
1. **`MatTheme.indigo.headers()`** - Loads BeerCSS with the indigo
|
|
109
|
+
color scheme
|
|
110
|
+
2. **[`Card`](https://abhisheksreesaila.github.io/fh-matui/components.html#card)** -
|
|
111
|
+
Creates a Material Design card component with elevation
|
|
112
|
+
3. **[`FormField`](https://abhisheksreesaila.github.io/fh-matui/components.html#formfield)** -
|
|
113
|
+
Generates a styled input with floating label
|
|
114
|
+
4. **`Button`** - Renders a Material Design button with ripple effects
|
|
115
|
+
|
|
116
|
+
## 📚 Module Reference
|
|
117
|
+
|
|
118
|
+
| Module | Description | Key Components |
|
|
119
|
+
|----|----|----|
|
|
120
|
+
| [Foundations](foundations.html) | Base utilities and helper functions | `BeerHeaders`, `display`, styling helpers |
|
|
121
|
+
| [Core](core.html) | Theme system and styling | `MatTheme`, color presets, theme configuration |
|
|
122
|
+
| [Components](components.html) | UI component library | `Button`, [`Card`](https://abhisheksreesaila.github.io/fh-matui/components.html#card), [`FormField`](https://abhisheksreesaila.github.io/fh-matui/components.html#formfield), [`FormModal`](https://abhisheksreesaila.github.io/fh-matui/components.html#formmodal), [`Grid`](https://abhisheksreesaila.github.io/fh-matui/components.html#grid) |
|
|
123
|
+
| [App Pages](app_pages.html) | Application layouts | Navigation, sidebars, full-page layouts |
|
|
124
|
+
| [Data Tables](05_table.html) | Data management components | [`DataTable`](https://abhisheksreesaila.github.io/fh-matui/datatable.html#datatable), [`DataTableResource`](https://abhisheksreesaila.github.io/fh-matui/datatable.html#datatableresource), CRUD operations |
|
|
125
|
+
| [Web Pages](web_pages.html) | Marketing/landing pages | Hero sections, feature grids, testimonials |
|
|
126
|
+
|
|
127
|
+
## 🛠️ Development
|
|
128
|
+
|
|
129
|
+
### Install in Development Mode
|
|
130
|
+
|
|
131
|
+
``` bash
|
|
132
|
+
# Clone the repository
|
|
133
|
+
git clone https://github.com/user/fh-matui.git
|
|
134
|
+
cd fh-matui
|
|
135
|
+
|
|
136
|
+
# Install in editable mode
|
|
137
|
+
pip install -e .
|
|
138
|
+
|
|
139
|
+
# Make changes under nbs/ directory, then compile
|
|
140
|
+
nbdev_prepare
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## 🤝 Why fh-matui?
|
|
144
|
+
|
|
145
|
+
| Challenge | fh-matui Solution |
|
|
146
|
+
|----|----|
|
|
147
|
+
| **CSS complexity** | Pre-built Material Design 3 components via BeerCSS |
|
|
148
|
+
| **JavaScript fatigue** | FastHTML handles interactivity declaratively |
|
|
149
|
+
| **Component consistency** | Unified API across all components |
|
|
150
|
+
| **Dark mode support** | Built-in with automatic system preference detection |
|
|
151
|
+
| **Responsive design** | Mobile-first grid system and responsive utilities |
|
|
152
|
+
| **Form handling** | [`FormField`](https://abhisheksreesaila.github.io/fh-matui/components.html#formfield), [`FormGrid`](https://abhisheksreesaila.github.io/fh-matui/components.html#formgrid), [`FormModal`](https://abhisheksreesaila.github.io/fh-matui/components.html#formmodal) for rapid form building |
|
|
153
|
+
| **Data management** | [`DataTable`](https://abhisheksreesaila.github.io/fh-matui/datatable.html#datatable) and [`DataTableResource`](https://abhisheksreesaila.github.io/fh-matui/datatable.html#datatableresource) for CRUD operations |
|
|
154
|
+
|
|
155
|
+
## 🤖 For LLM Users
|
|
156
|
+
|
|
157
|
+
fh-matui includes **comprehensive documentation bundles** for Large
|
|
158
|
+
Language Models, enabling AI assistants (like Claude, ChatGPT, or GitHub
|
|
159
|
+
Copilot) to help you build FastHTML apps with complete knowledge of the
|
|
160
|
+
component APIs.
|
|
161
|
+
|
|
162
|
+
### 📥 Download Context File
|
|
163
|
+
|
|
164
|
+
**[📄
|
|
165
|
+
llms-ctx.txt](https://raw.githubusercontent.com/abhisheksreesaila/fh-matui/main/llms-ctx.txt)**
|
|
166
|
+
— Complete API documentation in LLM-optimized format
|
|
167
|
+
|
|
168
|
+
### 💡 How to Use
|
|
169
|
+
|
|
170
|
+
1. **Download the context file** from the link above
|
|
171
|
+
2. **Attach it to your LLM conversation** (drag & drop or paste
|
|
172
|
+
contents)
|
|
173
|
+
3. **Ask for implementation** using natural language
|
|
174
|
+
|
|
175
|
+
**Example Prompt:**
|
|
176
|
+
|
|
177
|
+
I'm using fh-matui (context attached). Create a dashboard with:
|
|
178
|
+
- A sidebar navigation with 5 menu items
|
|
179
|
+
- A DataTable showing products with pagination
|
|
180
|
+
- A modal form to add/edit products
|
|
181
|
+
- Use the deep purple theme
|
|
182
|
+
|
|
183
|
+
The LLM will generate production-ready FastHTML code using the exact
|
|
184
|
+
component APIs from the documentation.
|
|
185
|
+
|
|
186
|
+
### 🔄 Staying Up to Date
|
|
187
|
+
|
|
188
|
+
The `llms-ctx.txt` file is automatically regenerated with each release
|
|
189
|
+
to ensure it stays synchronized with the latest API changes. Always
|
|
190
|
+
download the version matching your installed package version for the
|
|
191
|
+
most accurate results.
|
|
192
|
+
|
|
193
|
+
> **📌 Note:** The context file is generated from the same literate
|
|
194
|
+
> programming notebooks that build the library itself, ensuring 100%
|
|
195
|
+
> accuracy with the actual implementation.
|
|
196
|
+
|
|
197
|
+
## 📄 License
|
|
198
|
+
|
|
199
|
+
This project is licensed under the Apache 2.0 License - see the
|
|
200
|
+
[LICENSE](https://github.com/user/fh-matui/blob/main/LICENSE) file for
|
|
201
|
+
details.
|
|
202
|
+
|
|
203
|
+
------------------------------------------------------------------------
|
|
204
|
+
|
|
205
|
+
**Built with ❤️ using FastHTML and nbdev**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.9.5"
|
|
@@ -128,10 +128,15 @@ d = { 'settings': { 'branch': 'master',
|
|
|
128
128
|
'fh_matui.core._ThemeNamespace.violet': ('core.html#_themenamespace.violet', 'fh_matui/core.py'),
|
|
129
129
|
'fh_matui.core._ThemeNamespace.yellow': ('core.html#_themenamespace.yellow', 'fh_matui/core.py'),
|
|
130
130
|
'fh_matui.core._ThemeNamespace.zinc': ('core.html#_themenamespace.zinc', 'fh_matui/core.py')},
|
|
131
|
-
'fh_matui.datatable': { 'fh_matui.datatable.
|
|
131
|
+
'fh_matui.datatable': { 'fh_matui.datatable.CrudContext': ('datatable.html#crudcontext', 'fh_matui/datatable.py'),
|
|
132
|
+
'fh_matui.datatable.DataTable': ('datatable.html#datatable', 'fh_matui/datatable.py'),
|
|
132
133
|
'fh_matui.datatable.DataTableResource': ('datatable.html#datatableresource', 'fh_matui/datatable.py'),
|
|
133
134
|
'fh_matui.datatable.DataTableResource.__init__': ( 'datatable.html#datatableresource.__init__',
|
|
134
135
|
'fh_matui/datatable.py'),
|
|
136
|
+
'fh_matui.datatable.DataTableResource._build_context': ( 'datatable.html#datatableresource._build_context',
|
|
137
|
+
'fh_matui/datatable.py'),
|
|
138
|
+
'fh_matui.datatable.DataTableResource._call_hook': ( 'datatable.html#datatableresource._call_hook',
|
|
139
|
+
'fh_matui/datatable.py'),
|
|
135
140
|
'fh_matui.datatable.DataTableResource._error_toast': ( 'datatable.html#datatableresource._error_toast',
|
|
136
141
|
'fh_matui/datatable.py'),
|
|
137
142
|
'fh_matui.datatable.DataTableResource._filter_by_search': ( 'datatable.html#datatableresource._filter_by_search',
|
|
@@ -152,7 +157,10 @@ d = { 'settings': { 'branch': 'master',
|
|
|
152
157
|
'fh_matui/datatable.py'),
|
|
153
158
|
'fh_matui.datatable.DataTableResource._wrap_modal': ( 'datatable.html#datatableresource._wrap_modal',
|
|
154
159
|
'fh_matui/datatable.py'),
|
|
160
|
+
'fh_matui.datatable.DataTableResource._wrap_response': ( 'datatable.html#datatableresource._wrap_response',
|
|
161
|
+
'fh_matui/datatable.py'),
|
|
155
162
|
'fh_matui.datatable._action_menu': ('datatable.html#_action_menu', 'fh_matui/datatable.py'),
|
|
163
|
+
'fh_matui.datatable._is_htmx_request': ('datatable.html#_is_htmx_request', 'fh_matui/datatable.py'),
|
|
156
164
|
'fh_matui.datatable._page_size_select': ('datatable.html#_page_size_select', 'fh_matui/datatable.py'),
|
|
157
165
|
'fh_matui.datatable._safe_int': ('datatable.html#_safe_int', 'fh_matui/datatable.py'),
|
|
158
166
|
'fh_matui.datatable._to_dict': ('datatable.html#_to_dict', 'fh_matui/datatable.py'),
|