fh-matui 0.9.10__py3-none-any.whl → 0.9.12__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.
- fh_matui/__init__.py +1 -1
- fh_matui/components.py +46 -29
- fh_matui/datatable.py +7 -23
- {fh_matui-0.9.10.dist-info → fh_matui-0.9.12.dist-info}/METADATA +1 -1
- fh_matui-0.9.12.dist-info/RECORD +14 -0
- fh_matui-0.9.10.dist-info/RECORD +0 -14
- {fh_matui-0.9.10.dist-info → fh_matui-0.9.12.dist-info}/WHEEL +0 -0
- {fh_matui-0.9.10.dist-info → fh_matui-0.9.12.dist-info}/entry_points.txt +0 -0
- {fh_matui-0.9.10.dist-info → fh_matui-0.9.12.dist-info}/licenses/LICENSE +0 -0
- {fh_matui-0.9.10.dist-info → fh_matui-0.9.12.dist-info}/top_level.txt +0 -0
fh_matui/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.9.
|
|
1
|
+
__version__ = "0.9.11"
|
fh_matui/components.py
CHANGED
|
@@ -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
|
-
'
|
|
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
|
|
229
|
-
"""
|
|
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', '
|
|
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
|
|
257
|
-
def
|
|
258
|
-
"""
|
|
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', '
|
|
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
|
-
#
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
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."""
|
fh_matui/datatable.py
CHANGED
|
@@ -280,31 +280,15 @@ def DataTable(
|
|
|
280
280
|
cls=ButtonT.primary
|
|
281
281
|
)
|
|
282
282
|
|
|
283
|
-
# Pagination controls
|
|
283
|
+
# Pagination controls (using reusable Pagination component)
|
|
284
284
|
pagination = None
|
|
285
285
|
if total_pages > 1:
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
hx_get=f"{base_route}?{prev_params}",
|
|
293
|
-
hx_target=f"#{container_id}",
|
|
294
|
-
hx_push_url="true",
|
|
295
|
-
disabled=page == 1,
|
|
296
|
-
cls="circle"
|
|
297
|
-
),
|
|
298
|
-
Span(f"Page {page} of {total_pages}", cls="middle"),
|
|
299
|
-
Button(
|
|
300
|
-
Icon("navigate_next"),
|
|
301
|
-
hx_get=f"{base_route}?{next_params}",
|
|
302
|
-
hx_target=f"#{container_id}",
|
|
303
|
-
hx_push_url="true",
|
|
304
|
-
disabled=page == total_pages,
|
|
305
|
-
cls="circle"
|
|
306
|
-
),
|
|
307
|
-
cls="row center-align"
|
|
286
|
+
pagination_params = urlencode({"search": search, "page_size": page_size})
|
|
287
|
+
pagination = Pagination(
|
|
288
|
+
current_page=page,
|
|
289
|
+
total_pages=total_pages,
|
|
290
|
+
hx_get=f"{base_route}?{pagination_params}",
|
|
291
|
+
hx_target=f"#{container_id}"
|
|
308
292
|
)
|
|
309
293
|
|
|
310
294
|
# Search form
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
fh_matui/__init__.py,sha256=4-YPRncYVIx_LEaOTQQk2IcNM-ASQoM7kDmtXA8kaRQ,24
|
|
2
|
+
fh_matui/_modidx.py,sha256=naHwPQ4kCo-5saE_uozmdPA881kp1gnqvKhmaG-Ya-4,23914
|
|
3
|
+
fh_matui/app_pages.py,sha256=Sn9-tgBpaPNbR-0nZtPLoSCmAWLOGB4UQ88IkFvzBRY,10361
|
|
4
|
+
fh_matui/components.py,sha256=5CBhmcStL88vyrbkThDBTRnj5rwCfvtvgZ0vbnljvVE,50418
|
|
5
|
+
fh_matui/core.py,sha256=xtVBN8CtC50ZJ4Iu7o-mUhaA87tWdnz8gBfKRk63Zhs,10680
|
|
6
|
+
fh_matui/datatable.py,sha256=LsVwuTuoFOh3rIvETXefsqZOqxos4xi9ct2F7YPIIv8,39266
|
|
7
|
+
fh_matui/foundations.py,sha256=b7PnObJpKN8ZAU9NzCm9xpfnHzFjjAROU7E2YvA_tj4,1820
|
|
8
|
+
fh_matui/web_pages.py,sha256=4mF-jpfVcZTVepfQ-aMGgIUp-nBp0YCkvcdsWhUYeaA,34879
|
|
9
|
+
fh_matui-0.9.12.dist-info/licenses/LICENSE,sha256=xV8xoN4VOL0uw9X8RSs2IMuD_Ss_a9yAbtGNeBWZwnw,11337
|
|
10
|
+
fh_matui-0.9.12.dist-info/METADATA,sha256=KbTK3cooiJMUGCYaVaFg1JbgEB7UvKHhpKvlo0AxE-s,10491
|
|
11
|
+
fh_matui-0.9.12.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
12
|
+
fh_matui-0.9.12.dist-info/entry_points.txt,sha256=zn4CR4gNTiAAxbFsCxHAf2tQhtW29_YOffjbUTgeoWI,38
|
|
13
|
+
fh_matui-0.9.12.dist-info/top_level.txt,sha256=l80d5eoA2ZjqtPYwAorLMS5PiHxUxz3zKzxMJ41Xoso,9
|
|
14
|
+
fh_matui-0.9.12.dist-info/RECORD,,
|
fh_matui-0.9.10.dist-info/RECORD
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
fh_matui/__init__.py,sha256=u_KIWOO-wJql3tmQezwk81ys0s3hKSCZ705RpLSz6vI,23
|
|
2
|
-
fh_matui/_modidx.py,sha256=naHwPQ4kCo-5saE_uozmdPA881kp1gnqvKhmaG-Ya-4,23914
|
|
3
|
-
fh_matui/app_pages.py,sha256=Sn9-tgBpaPNbR-0nZtPLoSCmAWLOGB4UQ88IkFvzBRY,10361
|
|
4
|
-
fh_matui/components.py,sha256=Q-koxO-BCxG9Dse2QUpP5WrGSrbDyzBSLoqIGatUAg8,49503
|
|
5
|
-
fh_matui/core.py,sha256=xtVBN8CtC50ZJ4Iu7o-mUhaA87tWdnz8gBfKRk63Zhs,10680
|
|
6
|
-
fh_matui/datatable.py,sha256=vtkk7D8GrlDFCHilKxLi8SrncqxPW5n-ErrCJcI7OS4,39875
|
|
7
|
-
fh_matui/foundations.py,sha256=b7PnObJpKN8ZAU9NzCm9xpfnHzFjjAROU7E2YvA_tj4,1820
|
|
8
|
-
fh_matui/web_pages.py,sha256=4mF-jpfVcZTVepfQ-aMGgIUp-nBp0YCkvcdsWhUYeaA,34879
|
|
9
|
-
fh_matui-0.9.10.dist-info/licenses/LICENSE,sha256=xV8xoN4VOL0uw9X8RSs2IMuD_Ss_a9yAbtGNeBWZwnw,11337
|
|
10
|
-
fh_matui-0.9.10.dist-info/METADATA,sha256=Cpydwe7SXoRz7urHUG1fxM70zskIs9F_cvBGdoB76_c,10491
|
|
11
|
-
fh_matui-0.9.10.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
12
|
-
fh_matui-0.9.10.dist-info/entry_points.txt,sha256=zn4CR4gNTiAAxbFsCxHAf2tQhtW29_YOffjbUTgeoWI,38
|
|
13
|
-
fh_matui-0.9.10.dist-info/top_level.txt,sha256=l80d5eoA2ZjqtPYwAorLMS5PiHxUxz3zKzxMJ41Xoso,9
|
|
14
|
-
fh_matui-0.9.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|