Metadata-Version: 2.4
Name: elua-design
Version: 0.1.0
Summary: Everything an elua app is drawn with, in Python: ready-made Qt components and a whole window, each in a style you pick (Elua's liquid glass by default, or Apple, Flat, Neumorphism, Glassmorphism, or your own).
Author: 691alpha
License-Expression: MIT OR Apache-2.0
Project-URL: Homepage, https://elua.691alpha.com
Keywords: elua,ui,design,components,qt,pyside6,styles
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: OS Independent
Classifier: Environment :: Win32 (MS Windows)
Classifier: Environment :: X11 Applications :: Qt
Classifier: Topic :: Software Development :: User Interfaces
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE-MIT
License-File: LICENSE-APACHE
Requires-Dist: elua-ui<0.2,>=0.1
Dynamic: license-file

# elua-design

Everything an elua app is drawn with, for Python: a whole window and
ready-made components, each drawn in a **style** you pick. Elua (every elua
app's own look, and the default), Apple, Flat, Neumorphism, Glassmorphism, or
one of your own. Built on [elua-ui](https://pypi.org/project/elua-ui/) and
[PySide6](https://pypi.org/project/PySide6/) (Qt).

## Install

```powershell
pip install elua-design
```

Python 3.9 or newer.

## Quick start

```python
import sys
from elua_design import Button, ButtonKind, Section, Switch, Text, Tone, app, toast

def build(win):
    win.add(Text.title("Hello"))
    general = Section("General")
    general.row("Start with Windows", Switch(True), "Opens when you sign in.")
    win.add(general)
    save = Button("Save", ButtonKind.PRIMARY)
    save.clicked.connect(lambda: toast(win, "Saved", Tone.OK))
    win.add(save)

sys.exit(app.run("hello", build))
```

`app.run(name, build, pages=[Row("Library", "Folder"), Row("Settings",
"Settings")])` adds a sidebar of pages; fill `win.pages[i]`.

See every component in every style, switched live:

```powershell
python -m elua_design
```

(or `elua-design-gallery`).

## What's included

- **Controls**: `Button` (primary, secondary, danger), `IconButton`, `Switch`,
  `Checkbox`, `Segmented`, `Slider`, `TextField`, `SearchField`.
- **Text and surfaces**: `Text` (title, heading, section, body, caption,
  hint, mono), `Card` (card, panel, inset), `Divider`.
- **Status**: `Tag`, `Badge`, `StatusDot`, `Avatar`, `Progress`, `Spinner`.
- **Feedback**: `Banner`, `EmptyState`, `toast`.
- **Settings**: `Section` with labelled rows.
- **Navigation**: `List`, `Sidebar`, `Menu`, `Link`, `Keys`.
- **The window**: `app.AppWindow` and `app.run`, on Mica or Acrylic.

## Styles

```python
from elua_design import Style, set_style, scoped, Button

set_style(Style.APPLE)                 # the whole app
Button("Save", style=Style.FLAT)       # one component
with scoped(Style.NEUMORPHISM):        # everything made in here
    ...
```

Save a choice with `style.id` and get it back with `Style.from_id(id)`. For a
style of your own, subclass `Skin`, give it `tokens(palette)`, and
`register(Style(MySkin()))`.

In the Elua style, components are drawn by elua-ui itself, so they look just
like the Rust apps. The other styles follow the Rust library's tokens and
are close to it, not pixel for pixel.

## What's not here yet

Table, LogView, Tabs, TextArea, Select, Swatches, Sheet, Meter, Sparkline,
IconView and the colour picker; the tab strip; Snap Layouts on the maximize
button. The look off Windows hasn't been tested.

## Licence

MIT OR Apache-2.0, at your choice.
