fh-matui 0.9.11__tar.gz → 0.9.12__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.
Files changed (24) hide show
  1. {fh_matui-0.9.11/fh_matui.egg-info → fh_matui-0.9.12}/PKG-INFO +1 -1
  2. fh_matui-0.9.12/fh_matui/__init__.py +1 -0
  3. {fh_matui-0.9.11 → fh_matui-0.9.12}/fh_matui/components.py +46 -29
  4. {fh_matui-0.9.11 → fh_matui-0.9.12/fh_matui.egg-info}/PKG-INFO +1 -1
  5. {fh_matui-0.9.11 → fh_matui-0.9.12}/settings.ini +1 -1
  6. fh_matui-0.9.11/fh_matui/__init__.py +0 -1
  7. {fh_matui-0.9.11 → fh_matui-0.9.12}/LICENSE +0 -0
  8. {fh_matui-0.9.11 → fh_matui-0.9.12}/MANIFEST.in +0 -0
  9. {fh_matui-0.9.11 → fh_matui-0.9.12}/README.md +0 -0
  10. {fh_matui-0.9.11 → fh_matui-0.9.12}/fh_matui/_modidx.py +0 -0
  11. {fh_matui-0.9.11 → fh_matui-0.9.12}/fh_matui/app_pages.py +0 -0
  12. {fh_matui-0.9.11 → fh_matui-0.9.12}/fh_matui/core.py +0 -0
  13. {fh_matui-0.9.11 → fh_matui-0.9.12}/fh_matui/datatable.py +0 -0
  14. {fh_matui-0.9.11 → fh_matui-0.9.12}/fh_matui/foundations.py +0 -0
  15. {fh_matui-0.9.11 → fh_matui-0.9.12}/fh_matui/web_pages.py +0 -0
  16. {fh_matui-0.9.11 → fh_matui-0.9.12}/fh_matui.egg-info/SOURCES.txt +0 -0
  17. {fh_matui-0.9.11 → fh_matui-0.9.12}/fh_matui.egg-info/dependency_links.txt +0 -0
  18. {fh_matui-0.9.11 → fh_matui-0.9.12}/fh_matui.egg-info/entry_points.txt +0 -0
  19. {fh_matui-0.9.11 → fh_matui-0.9.12}/fh_matui.egg-info/not-zip-safe +0 -0
  20. {fh_matui-0.9.11 → fh_matui-0.9.12}/fh_matui.egg-info/requires.txt +0 -0
  21. {fh_matui-0.9.11 → fh_matui-0.9.12}/fh_matui.egg-info/top_level.txt +0 -0
  22. {fh_matui-0.9.11 → fh_matui-0.9.12}/pyproject.toml +0 -0
  23. {fh_matui-0.9.11 → fh_matui-0.9.12}/setup.cfg +0 -0
  24. {fh_matui-0.9.11 → fh_matui-0.9.12}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fh-matui
3
- Version: 0.9.11
3
+ Version: 0.9.12
4
4
  Summary: material-ui for fasthtml
5
5
  Home-page: https://github.com/abhisheksreesaila/fh-matui
6
6
  Author: abhishek sreesaila
@@ -0,0 +1 @@
1
+ __version__ = "0.9.11"
@@ -4,7 +4,7 @@
4
4
 
5
5
  # %% auto 0
6
6
  __all__ = ['BUTTON_SPECIALS', 'ButtonT', 'ANCHOR_SPECIALS', 'AT', 'NavToggleButton', 'SpaceT', 'GridSpanT', 'GridCell', 'Grid',
7
- 'DivLAligned', 'DivVStacked', 'DivHStacked', 'DivRAligned', 'DivCentered', 'DivFullySpaced', 'Icon',
7
+ 'DivHStacked', 'DivLAligned', 'DivVStacked', 'DivRAligned', 'DivCentered', 'DivFullySpaced', 'Icon',
8
8
  'NavBar', 'Modal', 'ModalButton', 'ModalCancel', 'ModalConfirm', 'ModalTitle', 'ModalBody', 'ModalFooter',
9
9
  'Field', 'LabelInput', 'FormLabel', 'CheckboxX', 'Radio', 'Switch', 'TextArea', 'Range', 'Select',
10
10
  'FormGrid', 'Progress', 'LoadingIndicator', 'Table', 'Td', 'Th', 'Thead', 'Tbody', 'Tfoot', 'TableFromLists',
@@ -225,19 +225,8 @@ def Grid(*cells, space=SpaceT.medium_space,
225
225
  return Div(*wrapped_cells, cls=stringify(dedupe_preserve_order(grid_cls)), **kwargs)
226
226
 
227
227
  # %% ../nbs/02_components.ipynb 16
228
- def DivLAligned(*c, cls='', **kwargs):
229
- """MonsterUI-compatible left-aligned row using BeerCSS tokens."""
230
- cls_tokens = normalize_tokens(cls)
231
- tokens = ['left-align']
232
- tokens.extend(cls_tokens)
233
- tokens = [t for t in tokens if t]
234
- return DivHStacked(*c, cls=stringify(dedupe_preserve_order(tokens)), **kwargs)
235
-
236
-
237
-
238
- # %% ../nbs/02_components.ipynb 18
239
- def DivVStacked(*c, responsive=True, padding=True, cls='', **kwargs):
240
- """Responsive vertical stack with padding and mobile compatibility."""
228
+ def DivHStacked(*c, responsive=True, padding=True, cls='', **kwargs):
229
+ """Responsive horizontal stack with padding and mobile compatibility."""
241
230
  cls_tokens = normalize_tokens(cls)
242
231
  tokens = []
243
232
  if responsive and 'responsive' not in cls_tokens:
@@ -245,7 +234,7 @@ def DivVStacked(*c, responsive=True, padding=True, cls='', **kwargs):
245
234
  if padding and 'padding' not in cls_tokens and 'no-padding' not in cls_tokens:
246
235
  tokens.append('padding')
247
236
  if 'grid' not in cls_tokens:
248
- tokens.extend(['row', 'vertical'])
237
+ tokens.extend(['row', 'middle-align'])
249
238
  if not _has_space_token(cls_tokens):
250
239
  tokens.append(SpaceT.medium_space)
251
240
  tokens.extend(cls_tokens)
@@ -253,9 +242,20 @@ def DivVStacked(*c, responsive=True, padding=True, cls='', **kwargs):
253
242
  return Div(*c, cls=stringify(dedupe_preserve_order(tokens)), **kwargs)
254
243
 
255
244
 
256
- # %% ../nbs/02_components.ipynb 20
257
- def DivHStacked(*c, responsive=True, padding=True, cls='', **kwargs):
258
- """Responsive horizontal stack with padding and mobile compatibility."""
245
+ # %% ../nbs/02_components.ipynb 17
246
+ def DivLAligned(*c, cls='', **kwargs):
247
+ """MonsterUI-compatible left-aligned row using BeerCSS tokens."""
248
+ cls_tokens = normalize_tokens(cls)
249
+ tokens = ['left-align']
250
+ tokens.extend(cls_tokens)
251
+ tokens = [t for t in tokens if t]
252
+ return DivHStacked(*c, cls=stringify(dedupe_preserve_order(tokens)), **kwargs)
253
+
254
+
255
+
256
+ # %% ../nbs/02_components.ipynb 19
257
+ def DivVStacked(*c, responsive=True, padding=True, cls='', **kwargs):
258
+ """Responsive vertical stack with padding and mobile compatibility."""
259
259
  cls_tokens = normalize_tokens(cls)
260
260
  tokens = []
261
261
  if responsive and 'responsive' not in cls_tokens:
@@ -263,7 +263,7 @@ def DivHStacked(*c, responsive=True, padding=True, cls='', **kwargs):
263
263
  if padding and 'padding' not in cls_tokens and 'no-padding' not in cls_tokens:
264
264
  tokens.append('padding')
265
265
  if 'grid' not in cls_tokens:
266
- tokens.extend(['row', 'middle-align'])
266
+ tokens.extend(['row', 'vertical'])
267
267
  if not _has_space_token(cls_tokens):
268
268
  tokens.append(SpaceT.medium_space)
269
269
  tokens.extend(cls_tokens)
@@ -332,7 +332,24 @@ def NavBar(*children, brand=None, sticky=False, cls='', **kwargs):
332
332
 
333
333
  # %% ../nbs/02_components.ipynb 35
334
334
  def Modal(*c, id=None, footer=None, active=False, overlay='default', position=None, cls=(), **kwargs):
335
- """BeerCSS modal dialog with position and overlay options."""
335
+ """BeerCSS modal dialog with position and overlay options.
336
+
337
+ Always returns a list for consistent unpacking with *Modal(...).
338
+ When overlay is enabled, clicking the overlay closes the modal.
339
+
340
+ Args:
341
+ *c: Modal content (title, body, etc.)
342
+ id: Modal ID for data-ui targeting
343
+ footer: Footer content (auto-wrapped in Nav if not already)
344
+ active: Whether modal starts active/visible
345
+ overlay: Overlay style - 'default' (plain), 'blur', 'small-blur',
346
+ 'medium-blur', 'large-blur', or False/None (no overlay)
347
+ position: Position - None (center), 'left', 'right', 'top', 'bottom'
348
+ cls: Additional CSS classes
349
+
350
+ Returns:
351
+ List of elements (overlay + dialog, or just [dialog] if no overlay)
352
+ """
336
353
  modal_cls = normalize_tokens(cls)
337
354
 
338
355
  # Add position class if specified
@@ -354,7 +371,7 @@ def Modal(*c, id=None, footer=None, active=False, overlay='default', position=No
354
371
  # Create the dialog
355
372
  dialog = Dialog(*children, id=id, cls=cls_str, **kwargs)
356
373
 
357
- # Handle overlay
374
+ # Handle overlay - always return a list for consistent *Modal(...) unpacking
358
375
  if overlay and overlay not in [False, None]:
359
376
  overlay_classes = ['overlay']
360
377
 
@@ -372,14 +389,14 @@ def Modal(*c, id=None, footer=None, active=False, overlay='default', position=No
372
389
  overlay_cls = ' '.join(overlay_classes)
373
390
  if active:
374
391
  overlay_cls += " active"
375
-
376
- # Return as a list - both elements need to be at same DOM level
377
- return [
378
- Div(cls=overlay_cls),
379
- dialog
380
- ]
381
-
382
- return dialog
392
+
393
+ # Overlay with data-ui to close modal on click (click-outside-to-close)
394
+ overlay_el = Div(cls=overlay_cls, data_ui=f"#{id}" if id else None)
395
+
396
+ return [overlay_el, dialog]
397
+
398
+ # No overlay - still return as list for consistent unpacking
399
+ return [dialog]
383
400
 
384
401
  def ModalButton(text: str, id: str, icon: str = None, cls=(), **kwargs):
385
402
  """Button that opens a modal via data-ui attribute."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fh-matui
3
- Version: 0.9.11
3
+ Version: 0.9.12
4
4
  Summary: material-ui for fasthtml
5
5
  Home-page: https://github.com/abhisheksreesaila/fh-matui
6
6
  Author: abhishek sreesaila
@@ -5,7 +5,7 @@
5
5
  ### Python library ###
6
6
  repo = fh-matui
7
7
  lib_name = %(repo)s
8
- version = 0.9.11
8
+ version = 0.9.12
9
9
  min_python = 3.9
10
10
  license = apache2
11
11
  black_formatting = False
@@ -1 +0,0 @@
1
- __version__ = "0.9.10"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes