fh-pydantic-form 0.2.1__py3-none-any.whl → 0.2.2__py3-none-any.whl

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.

@@ -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("outer_margin", self.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("outer_margin", self.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("outer_margin", self.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-center",
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,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fh-pydantic-form
3
- Version: 0.2.1
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,14 +1,14 @@
1
1
  fh_pydantic_form/__init__.py,sha256=auqrMQyy6WsEeiMIdXVrjHpSuW_L7CpW2AZ1FOXb8QE,4058
2
2
  fh_pydantic_form/defaults.py,sha256=IzBA_soBOdXP_XAUqfFAtniDQaW6N23hiXmWJD2xq0c,5168
3
- fh_pydantic_form/field_renderers.py,sha256=OsyN1SLHE18GT42Oe1fs2xXXFErSU8Qx86h8DkeZ6-4,53504
3
+ fh_pydantic_form/field_renderers.py,sha256=D0GGqVpUUsJMIyX3tQEgNGPIQ6x8S3OEMj8qp94YDnE,53561
4
4
  fh_pydantic_form/form_parser.py,sha256=9jSJya4TR5q2LMGV_PK-xiAjoEhq-FYKDN27lFNn5n0,24389
5
5
  fh_pydantic_form/form_renderer.py,sha256=2f1n--_DD891x1-2ci4JFBVmO8yO7X_b5Ol8W5SA42E,35580
6
6
  fh_pydantic_form/list_path.py,sha256=AA8bmDmaYy4rlGIvQOOZ0fP2tgcimNUB2Re5aVGnYc8,5182
7
7
  fh_pydantic_form/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  fh_pydantic_form/registry.py,sha256=sufK-85ST3rc3Vu0XmjjjdTqTAqgHr_ZbMGU0xRgTK8,4996
9
9
  fh_pydantic_form/type_helpers.py,sha256=bWHOxu52yh9_79d_x5L3cfMqnZo856OsbL4sTttDoa4,4367
10
- fh_pydantic_form/ui_style.py,sha256=6QeE4mw0IUEmaTkXPPkKwxjOTwRLpa5auH4S2Dho7nc,4233
11
- fh_pydantic_form-0.2.1.dist-info/METADATA,sha256=S44iSa9r6R5CZzo-1h4aCgGhEl1DFAGD4s5IWJZSDN4,26356
12
- fh_pydantic_form-0.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
13
- fh_pydantic_form-0.2.1.dist-info/licenses/LICENSE,sha256=AOi2eNK3D2aDycRHfPRiuACZ7WPBsKHTV2tTYNl7cls,577
14
- fh_pydantic_form-0.2.1.dist-info/RECORD,,
10
+ fh_pydantic_form/ui_style.py,sha256=tJWY3MYO7XLmP0nm5x6qllEywarkoS1R-6jdxxKnYlU,4749
11
+ fh_pydantic_form-0.2.2.dist-info/METADATA,sha256=FSBPbRTJ2FFWxnRPoUHsSnixeeO1L6ZdRTLuZB6q5kA,26356
12
+ fh_pydantic_form-0.2.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
13
+ fh_pydantic_form-0.2.2.dist-info/licenses/LICENSE,sha256=AOi2eNK3D2aDycRHfPRiuACZ7WPBsKHTV2tTYNl7cls,577
14
+ fh_pydantic_form-0.2.2.dist-info/RECORD,,