@prefecthq/prefab-ui 0.12.0 → 0.12.1
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.
- package/dist/playground.html +7 -66
- package/package.json +1 -1
package/dist/playground.html
CHANGED
|
@@ -17305,11 +17305,10 @@ automatically converted to declaration strings.
|
|
|
17305
17305
|
|
|
17306
17306
|
from prefab_ui.themes.base import Theme
|
|
17307
17307
|
from prefab_ui.themes.basic import Basic
|
|
17308
|
-
from prefab_ui.themes.dashboard import Dashboard
|
|
17309
17308
|
from prefab_ui.themes.minimal import Minimal
|
|
17310
17309
|
from prefab_ui.themes.presentation import Presentation
|
|
17311
17310
|
|
|
17312
|
-
__all__ = ["Basic", "
|
|
17311
|
+
__all__ = ["Basic", "Minimal", "Presentation", "Theme"]
|
|
17313
17312
|
`,"prefab_ui/themes/base.py":`"""Base theme class and Tailwind color palette."""
|
|
17314
17313
|
|
|
17315
17314
|
from __future__ import annotations
|
|
@@ -17580,62 +17579,6 @@ class Basic(Theme):
|
|
|
17580
17579
|
font_mono=self.font_mono,
|
|
17581
17580
|
gradient=self.gradient,
|
|
17582
17581
|
).to_json()
|
|
17583
|
-
`,"prefab_ui/themes/dashboard.py":`"""Dashboard theme — Inter font, tabular numerals, thicker progress bars."""
|
|
17584
|
-
|
|
17585
|
-
from __future__ import annotations
|
|
17586
|
-
|
|
17587
|
-
from typing import Any
|
|
17588
|
-
|
|
17589
|
-
from prefab_ui.themes.basic import _BASIC_DARK_CSS, _BASIC_LIGHT_CSS, Basic, Theme
|
|
17590
|
-
|
|
17591
|
-
_DASHBOARD_CSS = """\\
|
|
17592
|
-
/* Table — tabular numerals, slightly taller rows */
|
|
17593
|
-
.pf-table-cell {
|
|
17594
|
-
font-variant-numeric: tabular-nums;
|
|
17595
|
-
padding: 0.65rem 0.5rem;
|
|
17596
|
-
}
|
|
17597
|
-
|
|
17598
|
-
/* Progress / Slider — slightly thicker default track */
|
|
17599
|
-
.pf-progress,
|
|
17600
|
-
.pf-progress-track {
|
|
17601
|
-
height: 0.5rem;
|
|
17602
|
-
}
|
|
17603
|
-
.pf-progress-vertical {
|
|
17604
|
-
width: 0.5rem;
|
|
17605
|
-
}
|
|
17606
|
-
"""
|
|
17607
|
-
|
|
17608
|
-
|
|
17609
|
-
class Dashboard(Basic):
|
|
17610
|
-
"""Inter font, tabular numerals, and thicker progress bars.
|
|
17611
|
-
|
|
17612
|
-
Adds data-oriented polish on top of Basic. Layout (gaps, card padding)
|
|
17613
|
-
is handled by the base renderer.
|
|
17614
|
-
"""
|
|
17615
|
-
|
|
17616
|
-
font: str | None = "Inter"
|
|
17617
|
-
css: str = _DASHBOARD_CSS
|
|
17618
|
-
|
|
17619
|
-
def to_json(self) -> dict[str, Any]:
|
|
17620
|
-
"""Emit Dashboard CSS plus Basic accent handling."""
|
|
17621
|
-
if self.accent is None:
|
|
17622
|
-
return Theme(
|
|
17623
|
-
css=self.css,
|
|
17624
|
-
mode=self.mode,
|
|
17625
|
-
font=self.font,
|
|
17626
|
-
font_mono=self.font_mono,
|
|
17627
|
-
gradient=self.gradient,
|
|
17628
|
-
).to_json()
|
|
17629
|
-
return Theme(
|
|
17630
|
-
light_css=_BASIC_LIGHT_CSS,
|
|
17631
|
-
dark_css=_BASIC_DARK_CSS,
|
|
17632
|
-
accent=self.accent,
|
|
17633
|
-
mode=self.mode,
|
|
17634
|
-
css=self.css,
|
|
17635
|
-
font=self.font,
|
|
17636
|
-
font_mono=self.font_mono,
|
|
17637
|
-
gradient=self.gradient,
|
|
17638
|
-
).to_json()
|
|
17639
17582
|
`,"prefab_ui/themes/minimal.py":`"""Minimal theme — strips all renderer defaults for full manual control."""
|
|
17640
17583
|
|
|
17641
17584
|
from __future__ import annotations
|
|
@@ -17651,7 +17594,7 @@ class Minimal(Theme):
|
|
|
17651
17594
|
via component kwargs (\`gap\`, \`css_class\`, etc.).
|
|
17652
17595
|
"""
|
|
17653
17596
|
|
|
17654
|
-
light_css: str = "--card-padding: 0; --layout-gap: 0;"
|
|
17597
|
+
light_css: str = "--card-padding-y: 0; --layout-gap: 0;"
|
|
17655
17598
|
gradient: bool = False
|
|
17656
17599
|
`,"prefab_ui/themes/presentation.py":`"""Presentation (always-dark data dashboard) theme."""
|
|
17657
17600
|
|
|
@@ -17661,7 +17604,7 @@ from prefab_ui.themes.base import Theme
|
|
|
17661
17604
|
|
|
17662
17605
|
_PRESENTATION_VARS = (
|
|
17663
17606
|
# Blue-tinted dark chrome (Tailwind Slate palette)
|
|
17664
|
-
"--card-padding:
|
|
17607
|
+
"--card-padding-y: 2.5rem; --layout-gap: 1.5rem;"
|
|
17665
17608
|
" --background: #0f1117;"
|
|
17666
17609
|
" --foreground: #e2e8f0;"
|
|
17667
17610
|
" --card: #1a1d2e;"
|
|
@@ -17700,13 +17643,11 @@ _PRESENTATION_CSS = """\\
|
|
|
17700
17643
|
font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
|
|
17701
17644
|
}
|
|
17702
17645
|
|
|
17703
|
-
/* Card — generous padding for slide-like presentation
|
|
17704
|
-
Uses a CSS variable so user css_class overrides still win. */
|
|
17646
|
+
/* Card — generous horizontal padding for slide-like presentation */
|
|
17705
17647
|
.pf-card-header,
|
|
17706
|
-
.pf-card-content
|
|
17707
|
-
|
|
17708
|
-
padding-
|
|
17709
|
-
padding-right: 0;
|
|
17648
|
+
.pf-card-content {
|
|
17649
|
+
padding-left: 2rem;
|
|
17650
|
+
padding-right: 2rem;
|
|
17710
17651
|
}
|
|
17711
17652
|
|
|
17712
17653
|
/* Progress/Slider — dark navy tracks */
|