fh-pydantic-form 0.2.1__tar.gz → 0.2.2__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.
Potentially problematic release.
This version of fh-pydantic-form might be problematic. Click here for more details.
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/PKG-INFO +1 -1
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/RELEASE_NOTES.md +6 -2
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/pyproject.toml +1 -1
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/src/fh_pydantic_form/field_renderers.py +6 -6
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/src/fh_pydantic_form/ui_style.py +21 -1
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/.github/workflows/build.yaml +0 -0
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/.github/workflows/publish.yaml +0 -0
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/.gitignore +0 -0
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/.pre-commit-config.yaml +0 -0
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/LICENSE +0 -0
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/README.md +0 -0
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/src/fh_pydantic_form/__init__.py +0 -0
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/src/fh_pydantic_form/defaults.py +0 -0
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/src/fh_pydantic_form/form_parser.py +0 -0
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/src/fh_pydantic_form/form_renderer.py +0 -0
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/src/fh_pydantic_form/list_path.py +0 -0
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/src/fh_pydantic_form/py.typed +0 -0
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/src/fh_pydantic_form/registry.py +0 -0
- {fh_pydantic_form-0.2.1 → fh_pydantic_form-0.2.2}/src/fh_pydantic_form/type_helpers.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fh-pydantic-form
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: a library to turn any pydantic BaseModel object into a fasthtml/monsterui input form
|
|
5
5
|
Project-URL: Homepage, https://github.com/Marcura/fh-pydantic-form
|
|
6
6
|
Project-URL: Repository, https://github.com/Marcura/fh-pydantic-form
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
-
## Version 0.2.
|
|
3
|
+
## Version 0.2.2 (2025-06-16 )
|
|
4
|
+
|
|
5
|
+
- fix left alignment issue with inputs in the presence of outside css influences
|
|
6
|
+
|
|
7
|
+
## Version 0.2.1
|
|
4
8
|
|
|
5
9
|
### 🔧 UI/UX Improvements
|
|
6
10
|
|
|
@@ -44,7 +48,7 @@ While v0.2.0 introduced major features like enum support and compact mode, v0.2.
|
|
|
44
48
|
|
|
45
49
|
---
|
|
46
50
|
|
|
47
|
-
## Version 0.2.0
|
|
51
|
+
## Version 0.2.0
|
|
48
52
|
|
|
49
53
|
### 🎉 Major Features
|
|
50
54
|
|
|
@@ -214,9 +214,9 @@ class BaseFieldRenderer:
|
|
|
214
214
|
fh.Div(
|
|
215
215
|
label_component,
|
|
216
216
|
input_component,
|
|
217
|
-
cls=f"flex {spacing('horizontal_gap', self.spacing)} {spacing('label_align', self.spacing)}",
|
|
217
|
+
cls=f"flex {spacing('horizontal_gap', self.spacing)} {spacing('label_align', self.spacing)} w-full",
|
|
218
218
|
),
|
|
219
|
-
cls=spacing(
|
|
219
|
+
cls=f"{spacing('outer_margin', self.spacing)} w-full",
|
|
220
220
|
)
|
|
221
221
|
else:
|
|
222
222
|
# Vertical layout for normal mode (existing behavior)
|
|
@@ -354,9 +354,9 @@ class BooleanFieldRenderer(BaseFieldRenderer):
|
|
|
354
354
|
fh.Div(
|
|
355
355
|
label_component,
|
|
356
356
|
checkbox_component,
|
|
357
|
-
cls="flex items-center gap-2", # Use flexbox to align items horizontally with a small gap
|
|
357
|
+
cls="flex items-center gap-2 w-full", # Use flexbox to align items horizontally with a small gap
|
|
358
358
|
),
|
|
359
|
-
cls=spacing(
|
|
359
|
+
cls=f"{spacing('outer_margin', self.spacing)} w-full",
|
|
360
360
|
)
|
|
361
361
|
|
|
362
362
|
|
|
@@ -672,7 +672,7 @@ class BaseModelFieldRenderer(BaseFieldRenderer):
|
|
|
672
672
|
id=accordion_id, # ID for the accordion container (ul)
|
|
673
673
|
multiple=True, # Allow multiple open (though only one exists)
|
|
674
674
|
collapsible=True, # Allow toggling
|
|
675
|
-
cls=f"{spacing('accordion_divider', self.spacing)} {spacing('accordion_content', self.spacing)}".strip(),
|
|
675
|
+
cls=f"{spacing('accordion_divider', self.spacing)} {spacing('accordion_content', self.spacing)} w-full".strip(),
|
|
676
676
|
)
|
|
677
677
|
|
|
678
678
|
return accordion_container
|
|
@@ -929,7 +929,7 @@ class ListFieldRenderer(BaseFieldRenderer):
|
|
|
929
929
|
return fh.Div(
|
|
930
930
|
label_with_icon,
|
|
931
931
|
self.render_input(),
|
|
932
|
-
cls=spacing(
|
|
932
|
+
cls=f"{spacing('outer_margin', self.spacing)} w-full",
|
|
933
933
|
)
|
|
934
934
|
|
|
935
935
|
def render_input(self) -> FT:
|
|
@@ -72,7 +72,7 @@ SPACING_MAP: Dict[SpacingTheme, Dict[str, str]] = {
|
|
|
72
72
|
"input_size": "uk-form-small",
|
|
73
73
|
"input_padding": "p-1",
|
|
74
74
|
"horizontal_gap": "gap-2",
|
|
75
|
-
"label_align": "items-
|
|
75
|
+
"label_align": "items-start",
|
|
76
76
|
},
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -88,6 +88,26 @@ def spacing(token: str, spacing: SpacingValue) -> str:
|
|
|
88
88
|
COMPACT_EXTRA_CSS = fh.Style("""
|
|
89
89
|
/* Compact polish – applies ONLY inside .fhpf-compact ------------------- */
|
|
90
90
|
.fhpf-compact {
|
|
91
|
+
/* Force full width and left alignment */
|
|
92
|
+
width: 100% !important;
|
|
93
|
+
|
|
94
|
+
/* Ensure all direct children are full width and left aligned */
|
|
95
|
+
& > * {
|
|
96
|
+
width: 100% !important;
|
|
97
|
+
justify-content: flex-start !important;
|
|
98
|
+
align-items: flex-start !important;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Target the field containers specifically */
|
|
102
|
+
& > div > div {
|
|
103
|
+
width: 100% !important;
|
|
104
|
+
justify-content: flex-start !important;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Ensure flex containers don't center */
|
|
108
|
+
.flex {
|
|
109
|
+
justify-content: flex-start !important;
|
|
110
|
+
}
|
|
91
111
|
|
|
92
112
|
/* Accordion chrome: remove border and default 20 px gap */
|
|
93
113
|
.uk-accordion > li,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|