fh-matui 0.9.13__tar.gz → 0.9.14__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.13/fh_matui.egg-info → fh_matui-0.9.14}/PKG-INFO +1 -1
- fh_matui-0.9.14/fh_matui/__init__.py +1 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/fh_matui/_modidx.py +1 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/fh_matui/components.py +33 -10
- {fh_matui-0.9.13 → fh_matui-0.9.14}/fh_matui/core.py +5 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/fh_matui/datatable.py +1 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/fh_matui/foundations.py +3 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14/fh_matui.egg-info}/PKG-INFO +1 -1
- {fh_matui-0.9.13 → fh_matui-0.9.14}/settings.ini +1 -1
- fh_matui-0.9.13/fh_matui/__init__.py +0 -1
- {fh_matui-0.9.13 → fh_matui-0.9.14}/LICENSE +0 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/MANIFEST.in +0 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/README.md +0 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/fh_matui/app_pages.py +0 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/fh_matui/web_pages.py +0 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/fh_matui.egg-info/SOURCES.txt +0 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/fh_matui.egg-info/dependency_links.txt +0 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/fh_matui.egg-info/entry_points.txt +0 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/fh_matui.egg-info/not-zip-safe +0 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/fh_matui.egg-info/requires.txt +0 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/fh_matui.egg-info/top_level.txt +0 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/pyproject.toml +0 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/setup.cfg +0 -0
- {fh_matui-0.9.13 → fh_matui-0.9.14}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.9.13"
|
|
@@ -54,6 +54,7 @@ d = { 'settings': { 'branch': 'master',
|
|
|
54
54
|
'fh_matui.components.NavSideBarLinks': ('components.html#navsidebarlinks', 'fh_matui/components.py'),
|
|
55
55
|
'fh_matui.components.NavSubtitle': ('components.html#navsubtitle', 'fh_matui/components.py'),
|
|
56
56
|
'fh_matui.components.NavToggleButton': ('components.html#navtogglebutton', 'fh_matui/components.py'),
|
|
57
|
+
'fh_matui.components.Page': ('components.html#page', 'fh_matui/components.py'),
|
|
57
58
|
'fh_matui.components.Pagination': ('components.html#pagination', 'fh_matui/components.py'),
|
|
58
59
|
'fh_matui.components.Progress': ('components.html#progress', 'fh_matui/components.py'),
|
|
59
60
|
'fh_matui.components.Q': ('components.html#q', 'fh_matui/components.py'),
|
|
@@ -10,9 +10,9 @@ __all__ = ['BUTTON_SPECIALS', 'ButtonT', 'ANCHOR_SPECIALS', 'AT', 'NavToggleButt
|
|
|
10
10
|
'FormGrid', 'Progress', 'LoadingIndicator', 'Table', 'Td', 'Th', 'Thead', 'Tbody', 'Tfoot', 'TableFromLists',
|
|
11
11
|
'TableFromDicts', 'TableControls', 'Pagination', 'Card', 'Toolbar', 'Toast', 'Snackbar', 'ContainerT',
|
|
12
12
|
'FormField', 'FormModal', 'NavContainer', 'NavHeaderLi', 'NavDividerLi', 'NavCloseLi', 'NavSubtitle',
|
|
13
|
-
'BottomNav', 'NavSideBarHeader', 'NavSideBarLinks', 'NavSideBarContainer', '
|
|
14
|
-
'CodeSpan', 'CodeBlock', 'Blockquote', 'Q', 'Em', 'Strong', 'Small', 'Mark', 'Abbr', 'Sub',
|
|
15
|
-
'CookiesBanner']
|
|
13
|
+
'BottomNav', 'NavSideBarHeader', 'NavSideBarLinks', 'NavSideBarContainer', 'Page', 'Layout', 'TextT',
|
|
14
|
+
'TextPresets', 'CodeSpan', 'CodeBlock', 'Blockquote', 'Q', 'Em', 'Strong', 'Small', 'Mark', 'Abbr', 'Sub',
|
|
15
|
+
'Sup', 'FAQItem', 'CookiesBanner']
|
|
16
16
|
|
|
17
17
|
# %% ../nbs/02_components.ipynb 2
|
|
18
18
|
from fastcore.utils import *
|
|
@@ -339,7 +339,7 @@ def NavBar(*children, brand=None, sticky=False, cls='', size='small',
|
|
|
339
339
|
hx_target: Target element for boosted links (default '#main-content')
|
|
340
340
|
"""
|
|
341
341
|
size_cls = size if size else ''
|
|
342
|
-
nav_cls = f"{'sticky top' if sticky else ''} surface
|
|
342
|
+
nav_cls = f"{'sticky top' if sticky else ''} surface {size_cls} {cls}".strip()
|
|
343
343
|
|
|
344
344
|
# HTMX SPA optimizations
|
|
345
345
|
if hx_boost: kwargs['hx_boost'] = 'true'
|
|
@@ -1115,7 +1115,7 @@ def NavSideBarContainer(*children, position='left', size='m', cls='', active=Fal
|
|
|
1115
1115
|
if 'HX-Request' in req.headers: return content # HTMX swap
|
|
1116
1116
|
return Layout(content) # Full page load
|
|
1117
1117
|
"""
|
|
1118
|
-
base_cls = f"{size} {position} surface
|
|
1118
|
+
base_cls = f"{size} {position} surface"
|
|
1119
1119
|
if active: base_cls += " active"
|
|
1120
1120
|
nav_cls = f"{base_cls} {cls}".strip()
|
|
1121
1121
|
|
|
@@ -1128,6 +1128,26 @@ def NavSideBarContainer(*children, position='left', size='m', cls='', active=Fal
|
|
|
1128
1128
|
|
|
1129
1129
|
# %% ../nbs/02_components.ipynb 107
|
|
1130
1130
|
#| code-fold: true
|
|
1131
|
+
def Page(*c, active=True, position=None, cls='', **kwargs):
|
|
1132
|
+
"""BeerCSS animated page container.
|
|
1133
|
+
|
|
1134
|
+
Pages are containers that can be a main page, multiple pages, or animated elements.
|
|
1135
|
+
|
|
1136
|
+
Args:
|
|
1137
|
+
active: Show page (default True)
|
|
1138
|
+
position: Animation direction - 'left', 'right', 'top', 'bottom' (optional)
|
|
1139
|
+
cls: Additional classes
|
|
1140
|
+
|
|
1141
|
+
Example:
|
|
1142
|
+
Page(H1("Dashboard"), P("Content here")) # Default active page
|
|
1143
|
+
Page(content, position='right') # Slide from right animation
|
|
1144
|
+
"""
|
|
1145
|
+
page_cls = ['page']
|
|
1146
|
+
if active: page_cls.append('active')
|
|
1147
|
+
if position: page_cls.append(position)
|
|
1148
|
+
if cls: page_cls.extend(normalize_tokens(cls))
|
|
1149
|
+
return Div(*c, cls=stringify(page_cls), **kwargs)
|
|
1150
|
+
|
|
1131
1151
|
def Layout(*content, sidebar=None, sidebar_links=None, nav_bar=None, container_size=ContainerT.expand,
|
|
1132
1152
|
main_bg='surface', sidebar_id='app-sidebar', main_id='main-content', cls='', **kwargs):
|
|
1133
1153
|
"""App layout with HTMX SPA navigation.
|
|
@@ -1150,7 +1170,7 @@ def Layout(*content, sidebar=None, sidebar_links=None, nav_bar=None, container_s
|
|
|
1150
1170
|
# Build content wrapper with history caching
|
|
1151
1171
|
content_wrapper = None
|
|
1152
1172
|
if content:
|
|
1153
|
-
content_wrapper = Div(*content,
|
|
1173
|
+
content_wrapper = Div(*content, hx_history_elt='true')
|
|
1154
1174
|
|
|
1155
1175
|
# No sidebar - simple layout
|
|
1156
1176
|
if not sidebar and not sidebar_links:
|
|
@@ -1161,7 +1181,8 @@ def Layout(*content, sidebar=None, sidebar_links=None, nav_bar=None, container_s
|
|
|
1161
1181
|
result.append(nav_bar)
|
|
1162
1182
|
if content_wrapper:
|
|
1163
1183
|
container_cls = stringify((container_size, 'padding', main_bg))
|
|
1164
|
-
|
|
1184
|
+
page_content = Page(content_wrapper, id=main_id)
|
|
1185
|
+
result.append(Main(page_content, cls=container_cls))
|
|
1165
1186
|
return Div(*result, cls=cls, **kwargs) if result else Div(cls=cls, **kwargs)
|
|
1166
1187
|
|
|
1167
1188
|
# Sidebar layout with hx-boost
|
|
@@ -1184,12 +1205,14 @@ def Layout(*content, sidebar=None, sidebar_links=None, nav_bar=None, container_s
|
|
|
1184
1205
|
layout_children.append(nav_rail)
|
|
1185
1206
|
|
|
1186
1207
|
if content_wrapper:
|
|
1187
|
-
container_cls = stringify((container_size, 'round', '
|
|
1188
|
-
|
|
1208
|
+
container_cls = stringify((container_size, 'surface-container', 'round', 'padding', 'bottom-margin'))
|
|
1209
|
+
page_content = Page(content_wrapper, id=main_id)
|
|
1210
|
+
layout_children.append(Main(page_content, cls=container_cls))
|
|
1189
1211
|
|
|
1190
|
-
final_cls = f"surface
|
|
1212
|
+
final_cls = f"surface {cls}".strip() if cls else "surface"
|
|
1191
1213
|
return Div(*layout_children, cls=final_cls, **kwargs)
|
|
1192
1214
|
|
|
1215
|
+
|
|
1193
1216
|
# %% ../nbs/02_components.ipynb 113
|
|
1194
1217
|
#| code-fold: true
|
|
1195
1218
|
class TextT(VEnum):
|
|
@@ -19,6 +19,7 @@ from nbdev.showdoc import show_doc
|
|
|
19
19
|
|
|
20
20
|
# %% ../nbs/01_core.ipynb 5
|
|
21
21
|
#| code-fold: true
|
|
22
|
+
#| code-fold: true
|
|
22
23
|
HEADER_URLS = {
|
|
23
24
|
"beercss_css": "https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/beer.min.css",
|
|
24
25
|
"beercss_js": "https://cdn.jsdelivr.net/npm/beercss@3.13.1/dist/cdn/beer.min.js",
|
|
@@ -33,6 +34,7 @@ beer_hdrs = (
|
|
|
33
34
|
|
|
34
35
|
# %% ../nbs/01_core.ipynb 7
|
|
35
36
|
#| code-fold: true
|
|
37
|
+
#| code-fold: true
|
|
36
38
|
# All BeerCSS color names
|
|
37
39
|
COLOR_NAMES = ['amber', 'blue', 'blue_grey', 'brown', 'cyan', 'deep_orange', 'deep_purple',
|
|
38
40
|
'green', 'grey', 'indigo', 'light_blue', 'light_green', 'lime', 'orange',
|
|
@@ -90,6 +92,7 @@ ALL_HELPERS = (SIZES + WIDTH_HEIGHT + ELEVATES + DIRECTIONS + FORMS + MARGINS +
|
|
|
90
92
|
|
|
91
93
|
# %% ../nbs/01_core.ipynb 10
|
|
92
94
|
#| code-fold: true
|
|
95
|
+
#| code-fold: true
|
|
93
96
|
class _ThemeChain:
|
|
94
97
|
"""Internal class for building themed headers"""
|
|
95
98
|
def __init__(self, color=None):
|
|
@@ -156,6 +159,7 @@ class _ThemeChain:
|
|
|
156
159
|
|
|
157
160
|
# %% ../nbs/01_core.ipynb 11
|
|
158
161
|
#| code-fold: true
|
|
162
|
+
#| code-fold: true
|
|
159
163
|
class _ThemeNamespace:
|
|
160
164
|
"""Namespace providing color properties that return _ThemeChain instances"""
|
|
161
165
|
@property
|
|
@@ -215,6 +219,7 @@ MatTheme = _ThemeNamespace()
|
|
|
215
219
|
|
|
216
220
|
# %% ../nbs/01_core.ipynb 15
|
|
217
221
|
#| code-fold: true
|
|
222
|
+
#| code-fold: true
|
|
218
223
|
class BeerCssChain:
|
|
219
224
|
"""Base class for chaining Beer CSS helper classes together"""
|
|
220
225
|
def __init__(self, tokens=None):
|
|
@@ -13,6 +13,7 @@ from nbdev.showdoc import show_doc
|
|
|
13
13
|
|
|
14
14
|
# %% ../nbs/00_foundations.ipynb 4
|
|
15
15
|
#| code-fold: true
|
|
16
|
+
#| code-fold: true
|
|
16
17
|
class VEnum(Enum):
|
|
17
18
|
"""Enum with string conversion and concatenation support"""
|
|
18
19
|
def __str__(self): return self.value
|
|
@@ -21,6 +22,7 @@ class VEnum(Enum):
|
|
|
21
22
|
|
|
22
23
|
# %% ../nbs/00_foundations.ipynb 8
|
|
23
24
|
#| code-fold: true
|
|
25
|
+
#| code-fold: true
|
|
24
26
|
def stringify(o):
|
|
25
27
|
"""Converts input types into strings that can be passed to FT components"""
|
|
26
28
|
if is_listy(o):
|
|
@@ -29,6 +31,7 @@ def stringify(o):
|
|
|
29
31
|
|
|
30
32
|
# %% ../nbs/00_foundations.ipynb 12
|
|
31
33
|
#| code-fold: true
|
|
34
|
+
#| code-fold: true
|
|
32
35
|
def normalize_tokens(cls):
|
|
33
36
|
"""Normalize class input to list of string tokens"""
|
|
34
37
|
if cls is None:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.9.12"
|
|
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
|