eidosui 0.4.0__py3-none-any.whl → 0.6.0__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.
- eidos/__init__.py +270 -0
- eidos/components/__init__.py +11 -0
- eidos/components/headers.py +16 -14
- eidos/components/navigation.py +44 -35
- eidos/components/table.py +84 -0
- eidos/components/tabs.py +140 -0
- eidos/css/styles.css +155 -0
- eidos/plugins/__init__.py +1 -1
- eidos/plugins/markdown/__init__.py +3 -3
- eidos/plugins/markdown/components.py +10 -22
- eidos/plugins/markdown/extensions/__init__.py +1 -1
- eidos/plugins/markdown/extensions/alerts.py +68 -78
- eidos/plugins/markdown/renderer.py +19 -24
- eidos/styles.py +58 -11
- eidos/tags.py +144 -86
- eidos/utils.py +42 -38
- eidosui-0.6.0.dist-info/METADATA +113 -0
- eidosui-0.6.0.dist-info/RECORD +25 -0
- eidosui-0.4.0.dist-info/METADATA +0 -127
- eidosui-0.4.0.dist-info/RECORD +0 -22
- {eidosui-0.4.0.dist-info → eidosui-0.6.0.dist-info}/WHEEL +0 -0
- {eidosui-0.4.0.dist-info → eidosui-0.6.0.dist-info}/licenses/LICENSE +0 -0
eidosui-0.4.0.dist-info/METADATA
DELETED
@@ -1,127 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: eidosui
|
3
|
-
Version: 0.4.0
|
4
|
-
Summary: A modern, Tailwind CSS-based UI library for air development
|
5
|
-
Project-URL: Homepage, https://github.com/isaac-flath/EidosUI
|
6
|
-
Project-URL: Repository, https://github.com/isaac-flath/EidosUI
|
7
|
-
Project-URL: Issues, https://github.com/isaac-flath/EidosUI/issues
|
8
|
-
Project-URL: Documentation, https://github.com/isaac-flath/EidosUI#readme
|
9
|
-
Author: Isaac Flath
|
10
|
-
License-Expression: MIT
|
11
|
-
License-File: LICENSE
|
12
|
-
Keywords: air,components,css,fastapi,tailwind,ui,web
|
13
|
-
Classifier: Development Status :: 3 - Alpha
|
14
|
-
Classifier: Intended Audience :: Developers
|
15
|
-
Classifier: License :: OSI Approved :: MIT License
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
17
|
-
Classifier: Programming Language :: Python :: 3.10
|
18
|
-
Classifier: Programming Language :: Python :: 3.11
|
19
|
-
Classifier: Programming Language :: Python :: 3.12
|
20
|
-
Classifier: Programming Language :: Python :: 3.13
|
21
|
-
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
22
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
23
|
-
Requires-Python: >=3.10
|
24
|
-
Requires-Dist: air>=0.12
|
25
|
-
Requires-Dist: fastapi[standard]
|
26
|
-
Requires-Dist: uvicorn
|
27
|
-
Provides-Extra: dev
|
28
|
-
Requires-Dist: black; extra == 'dev'
|
29
|
-
Requires-Dist: isort; extra == 'dev'
|
30
|
-
Requires-Dist: mypy; extra == 'dev'
|
31
|
-
Requires-Dist: pytest; extra == 'dev'
|
32
|
-
Requires-Dist: ruff; extra == 'dev'
|
33
|
-
Provides-Extra: markdown
|
34
|
-
Requires-Dist: markdown>=3.4; extra == 'markdown'
|
35
|
-
Description-Content-Type: text/markdown
|
36
|
-
|
37
|
-
# EidosUI 🎨
|
38
|
-
|
39
|
-
A modern, flexible Tailwind CSS-based UI library for Python web frameworks. Built for maximum developer flexibility while providing excellent defaults.
|
40
|
-
|
41
|
-
> [!CAUTION]
|
42
|
-
> This library is not ready for anything yet. IN fact, this readme is more of design ideas than anything as much of what's in here isn't implemented yet!
|
43
|
-
|
44
|
-
|
45
|
-
## Design
|
46
|
-
|
47
|
-
### Base CSS
|
48
|
-
|
49
|
-
- `styles.css` : defines all the core css logic to create classes like `edios-mark`, `eidos-small`, etc.
|
50
|
-
- `light.css`/`dark.css` : These define lots of css variables used in `styles.css` and are themes
|
51
|
-
|
52
|
-
Users would create a custom theme by copying light/dark css files and changing the variable definitions.
|
53
|
-
|
54
|
-
### Styles
|
55
|
-
|
56
|
-
This has enums that make the Base CSS clases accessible in python. For example:
|
57
|
-
|
58
|
-
`styles.typography.h1` or `styles.buttons.primary`
|
59
|
-
|
60
|
-
### Tags
|
61
|
-
|
62
|
-
```python
|
63
|
-
def H1(*content, cls: str = None, **kwargs) -> air.H1:
|
64
|
-
"""Semantic H1 heading"""
|
65
|
-
return air.H1(*content, cls=stringify(styles.typography.h1, cls), **kwargs)
|
66
|
-
|
67
|
-
def Mark(*content, cls: str = None, **kwargs) -> air.Mark:
|
68
|
-
"""Highlighted text"""
|
69
|
-
return .Mark(*content, cls=stringify(styles.typography.mark, cls), **kwargs)
|
70
|
-
|
71
|
-
def Small(*content, cls: str = , **kwargs) -> air.Small:
|
72
|
-
"""Small text"""
|
73
|
-
return air.Small(*content, cls=stringify(styles.typography.small, cls), **kwargs)
|
74
|
-
```
|
75
|
-
|
76
|
-
### Components (Not Built Yet)
|
77
|
-
|
78
|
-
Theses are things that go beyond just exposing css to python. Here's a simple example of what might be added.
|
79
|
-
|
80
|
-
```python
|
81
|
-
class Table:
|
82
|
-
def __init__(self, cls: str = None, **kwargs):
|
83
|
-
"""Create an empty table with optional styling"""
|
84
|
-
self.cls = cls
|
85
|
-
self.kwargs = kwargs
|
86
|
-
|
87
|
-
@classmethod
|
88
|
-
def from_lists(cls, data: list[list], headers: list[str] = None, cls_: str = None, **kwargs):
|
89
|
-
"""Create table from list of lists"""
|
90
|
-
thead = []
|
91
|
-
if headers:
|
92
|
-
thead = THead(Tr(*[Th(header) for header in headers]))
|
93
|
-
|
94
|
-
tbody_rows = []
|
95
|
-
for data in row_data:
|
96
|
-
tbody_rows.append(Tr(*map(Td, row_data)))
|
97
|
-
tbody = TBody(*tbody_rows)
|
98
|
-
|
99
|
-
return Table(thead+tbody, cls=cls_, **kwargs)
|
100
|
-
|
101
|
-
@classmethod
|
102
|
-
def from_dicts(cls, data: list[dict], headers: list[str] = None, cls_: str = None, **kwargs):
|
103
|
-
"""Create table from list of dictionaries"""
|
104
|
-
thead = []
|
105
|
-
if headers:
|
106
|
-
thead = THead(Tr(*[Th(header) for header in headers]))
|
107
|
-
|
108
|
-
tbody_rows = []
|
109
|
-
for row in data:
|
110
|
-
tbody_rows.append(Tr(*[Td(row.get(header, "")) for header in (headers or list(row.keys()))]))
|
111
|
-
tbody = TBody(*tbody_rows)
|
112
|
-
|
113
|
-
return Table(thead+tbody, cls=cls_, **kwargs)
|
114
|
-
|
115
|
-
# Usage examples:
|
116
|
-
Table.from_lists([["A", "B"], ["C", "D"]], headers=["Col1", "Col2"])
|
117
|
-
Table.from_dicts([{"name": "John", "age": 25}], headers=["Name", "Age"])
|
118
|
-
```
|
119
|
-
|
120
|
-
## Plugins
|
121
|
-
|
122
|
-
### edios-md
|
123
|
-
|
124
|
-
This will be installable with `pip install "eidos[markdown]"`.
|
125
|
-
|
126
|
-
This is a plugin for rendering markdown that is well scoped to just markdown rendering. This module does markdown rendering well with table of contents with scrollspy, code highlighting, latex rendering, etc. It must be used with `EidosUI` as it uses css variables from there for the styling (so it is always in sync with the theme)
|
127
|
-
|
eidosui-0.4.0.dist-info/RECORD
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
eidos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
eidos/styles.py,sha256=QupOwC0VuSZ6zdNJiNFT_PqTnvbJvaNplKO5M5xzMVI,2380
|
3
|
-
eidos/tags.py,sha256=1IlB7x2AR3G5KI5yTQQ7ors5x5dMIYRvGKrlswNrYqs,9195
|
4
|
-
eidos/utils.py,sha256=DUw2a--J2rpZLY7YD3-xtHSmrK0YrnJuPi4rwV41zT8,2345
|
5
|
-
eidos/components/headers.py,sha256=M4SZ_w_ius9cj7uRALo2niAkBz-iLYMVYAX8p556vyo,2005
|
6
|
-
eidos/components/navigation.py,sha256=_8xQxVuZYmOIWk_85pa1L1ECYAXphIxV4iFmolNRwWQ,2515
|
7
|
-
eidos/css/styles.css,sha256=KvrqNpdi7y0felLNhXwgys7cD4mbWjd5EzSqQWxjRgg,9770
|
8
|
-
eidos/css/themes/dark.css,sha256=yUDNz7iLEJ_Q63MrKXlrhYcpojm1L2eNUOthzhYc3Vs,4170
|
9
|
-
eidos/css/themes/eidos-variables.css,sha256=s4_CUivnqvndE4c7T1stp59orEHL_0C9tmN0rxai7bU,5686
|
10
|
-
eidos/css/themes/light.css,sha256=kESbN5Z4ovCn-Q3fxilQcjafgMCIyyJiocU9kMC5sIM,2674
|
11
|
-
eidos/js/eidos.js,sha256=ag6aoyWIE234ZoMiXJV-KVgBTsPR-fZd5Qhuo4rEeh0,5048
|
12
|
-
eidos/plugins/__init__.py,sha256=Cv4nNAV74tOvyPyb2oEg7q2yhrHLC1lGwbWYjdT9Z4Y,25
|
13
|
-
eidos/plugins/markdown/__init__.py,sha256=FuifCP1MmO0ACy7mq_kTwKLMnw8K15td_6E3Ihlrir4,555
|
14
|
-
eidos/plugins/markdown/components.py,sha256=jz3yu4LIgBOTx0MS2o703al90jAquScmKehQQHV2dmY,1388
|
15
|
-
eidos/plugins/markdown/renderer.py,sha256=NJYTJWgDySTUkrihYudLvRSR4hr6QeAqTpzZGN4eyo8,1971
|
16
|
-
eidos/plugins/markdown/css/markdown.css,sha256=RxNx7aJDmJMx3zuydX10uAMaPFtl9r6zOFDni9Idsdk,6226
|
17
|
-
eidos/plugins/markdown/extensions/__init__.py,sha256=wOdOyCcb-4lxEm77GMnJLst8JepecDcrN4sp3HO_q9A,28
|
18
|
-
eidos/plugins/markdown/extensions/alerts.py,sha256=q1d49KyjPoTiK6OJ7gKvuwrFxM3BjPwssQnp6qhpFDs,4541
|
19
|
-
eidosui-0.4.0.dist-info/METADATA,sha256=PRrT8laWJlSp14pGvjHP6kOKkaS6n2SZze85MyAcprg,4749
|
20
|
-
eidosui-0.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
21
|
-
eidosui-0.4.0.dist-info/licenses/LICENSE,sha256=evjPJs6lg9eka9CYtC6ErQrZ71IovVbdvZqqz3ax8E8,1064
|
22
|
-
eidosui-0.4.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|